1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2075,4792],{86458:function(e,t,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/docs/presenter/[docId]",function(){return n(98284)}])},99309:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var n in t)Object.defineProperty(e,n,{enumerable:!0,get:t[n]})}(t,{noSSR:function(){return a},default:function(){return l}});let r=n(43219),o=(n(2784),r._(n(70220)));function i(e){return{default:(null==e?void 0:e.default)||e}}function a(e,t){return delete t.webpack,delete t.modules,e(t)}function l(e,t){let n=o.default,r={loading:e=>{let{error:t,isLoading:n,pastDelay:r}=e;return null}};e instanceof Promise?r.loader=()=>e:"function"==typeof e?r.loader=e:"object"==typeof e&&(r={...r,...e}),r={...r,...t};let l=r.loader;return(r.loadableGenerated&&(r={...r,...r.loadableGenerated},delete r.loadableGenerated),"boolean"!=typeof r.ssr||r.ssr)?n({...r,loader:()=>null!=l?l().then(i):Promise.resolve(i(()=>null))}):(delete r.webpack,delete r.modules,a(n,r))}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},38437:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"LoadableContext",{enumerable:!0,get:function(){return i}});let r=n(43219),o=r._(n(2784)),i=o.default.createContext(null)},70220:function(e,t,n){"use strict";/** 2@copyright (c) 2017-present James Kyle <[email protected]> 3 MIT License 4 Permission is hereby granted, free of charge, to any person obtaining 5a copy of this software and associated documentation files (the 6"Software"), to deal in the Software without restriction, including 7without limitation the rights to use, copy, modify, merge, publish, 8distribute, sublicense, and/or sell copies of the Software, and to 9permit persons to whom the Software is furnished to do so, subject to 10the following conditions: 11 The above copyright notice and this permission notice shall be 12included in all copies or substantial portions of the Software. 13 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 14EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 15MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 16NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE 17LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION 18OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION 19WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE 20*/Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"default",{enumerable:!0,get:function(){return m}});let r=n(43219),o=r._(n(2784)),i=n(38437),a=[],l=[],s=!1;function d(e){let t=e(),n={loading:!0,loaded:null,error:null};return n.promise=t.then(e=>(n.loading=!1,n.loaded=e,e)).catch(e=>{throw n.loading=!1,n.error=e,e}),n}class c{promise(){return this._res.promise}retry(){this._clearTimeouts(),this._res=this._loadFn(this._opts.loader),this._state={pastDelay:!1,timedOut:!1};let{_res:e,_opts:t}=this;e.loading&&("number"==typeof t.delay&&(0===t.delay?this._state.pastDelay=!0:this._delay=setTimeout(()=>{this._update({pastDelay:!0})},t.delay)),"number"==typeof t.timeout&&(this._timeout=setTimeout(()=>{this._update({timedOut:!0})},t.timeout))),this._res.promise.then(()=>{this._update({}),this._clearTimeouts()}).catch(e=>{this._update({}),this._clearTimeouts()}),this._update({})}_update(e){this._state={...this._state,error:this._res.error,loaded:this._res.loaded,loading:this._res.loading,...e},this._callbacks.forEach(e=>e())}_clearTimeouts(){clearTimeout(this._delay),clearTimeout(this._timeout)}getCurrentValue(){return this._state}subscribe(e){return this._callbacks.add(e),()=>{this._callbacks.delete(e)}}constructor(e,t){this._loadFn=e,this._opts=t,this._callbacks=new Set,this._delay=null,this._timeout=null,this.retry()}}function u(e){return function(e,t){let n=Object.assign({loader:null,loading:null,delay:200,timeout:null,webpack:null,modules:null},t),r=null;function a(){if(!r){let t=new c(e,n);r={getCurrentValue:t.getCurrentValue.bind(t),subscribe:t.subscribe.bind(t),retry:t.retry.bind(t),promise:t.promise.bind(t)}}return r.promise()}if(!s){let e=n.webpack?n.webpack():n.modules;e&&l.push(t=>{for(let n of e)if(t.includes(n))return a()})}function d(e,t){!function(){a();let e=o.default.useContext(i.LoadableContext);
20e&&Array.isArray(n.modules)&&n.modules.forEach(t=>{e(t)})}();let l=o.default.useSyncExternalStore(r.subscribe,r.getCurrentValue,r.getCurrentValue);return o.default.useImperativeHandle(t,()=>({retry:r.retry}),[]),o.default.useMemo(()=>{var t;return l.loading||l.error?o.default.createElement(n.loading,{isLoading:l.loading,pastDelay:l.pastDelay,timedOut:l.timedOut,error:l.error,retry:r.retry}):l.loaded?o.default.createElement((t=l.loaded)&&t.default?t.default:t,e):null},[e,l])}return d.preload=()=>a(),d.displayName="LoadableComponent",o.default.forwardRef(d)}(d,e)}function p(e,t){let n=[];for(;e.length;){let r=e.pop();n.push(r(t))}return Promise.all(n).then(()=>{if(e.length)return p(e,t)})}u.preloadAll=()=>new Promise((e,t)=>{p(a).then(e,t)}),u.preloadReady=e=>(void 0===e&&(e=[]),new Promise(t=>{let n=()=>(s=!0,t());p(l,e).then(n,n)})),window.__NEXT_PRELOADREADY=u.preloadReady;let m=u},71537:function(e,t,n){"use strict";n.d(t,{z:function(){return ep}});var r=n(52322);n(98248),n(61219);var o=n(55671),i=n(62202),a=n(18200),l=n(81674),s=n(94523),d=n(97729),c=n.n(d),u=n(5632),p=n(2784),m=n(43997),h=n(14274),g=n(93202),f=n(2013);let b=e=>{let t=["malformed","encoded","illegal"];return e.includes("URIError")&&e.split(" ").some(e=>t.includes(e))};class v extends p.Component{componentDidMount(){window.addEventListener("error",this.handleError),window.addEventListener("unhandledrejection",this.handleUnhandledRejection)}componentWillUnmount(){window.removeEventListener("error",this.handleError),window.removeEventListener("unhandledrejection",this.handleUnhandledRejection)}componentDidCatch(e,t){if("dev"===h.v.APPLICATION_ENVIRONMENT)throw e}static getDerivedStateFromError(e){return{hasError:!0,errMessage:e.message,shouldMountChildren:!1}}handleError(e){if("dev"===h.v.APPLICATION_ENVIRONMENT)throw Error("[ErrorBoundary]: ".concat(e.message))}handleUnhandledRejection(e){let t=this.props.unhandledRejectionFilter(e);if(t){var n;let t=(null===(n=e.reason)||void 0===n?void 0:n.message)||"";this.setState({hasError:!0,errMessage:t})}}render(){let e=!0===b(this.state.errMessage)?{opacity:"0.65",starOverlay:!1}:{};return(0,r.jsxs)(r.Fragment,{children:[this.state.hasError&&(0,r.jsx)(f.q,{pos:"absolute",top:0,...e,errMessage:""===this.state.errMessage?void 0:this.state.errMessage,showDisclosure:!0}),this.state.shouldMountChildren&&this.props.children]})}constructor(e){super(e),this.state={hasError:!1,errMessage:"",shouldMountChildren:!0},this.handleError=this.handleError.bind(this),this.handleUnhandledRejection=this.handleUnhandledRejection.bind(this)}}v.defaultProps={unhandledRejectionFilter:e=>{var t;return!!b((null===(t=e.reason)||void 0===t?void 0:t.message)||"")||e.reason instanceof g.YBv&&!1===document.hidden||e.reason instanceof g.R5s}},n(61036),n(62376),n(6991),n(76298),n(4466),n(43839),n(40917);var x=n(11050),w=n(42005);let y=()=>{let e=(0,p.useRef)(!1),t=(0,p.useRef)(new Map);(0,p.useEffect)(()=>{if("production"!==h.v.APPLICATION_ENVIRONMENT)return;let n=()=>{if(e.current)return;let n=t.current.get("total"),r=t.current.get("notTrusted"),o=r/n>.5;o&&n>5&&(e.current=!0,w.c.track(x.xW.NOT_TRUSTED_EVENTS_DETECTED,{totalEvents:n,notTrustedEvents:r}))},r=e=>{e.isTrusted||t.current.set("notTrusted",(t.current.get("notTrusted")||0)+1),t.current.set("total",(t.current.get("total")||0)+1),n()};return document.addEventListener("paste",r,{capture:!0}),document.addEventListener("mousedown",r,{capture:!0}),document.addEventListener("keydown",r,{capture:!0}),()=>{document.removeEventListener("paste",r,{capture:!0}),document.removeEventListener("mousedown",r,{capture:!0}),document.removeEventListener("keydown",r,{capture:!0})}},[])};var k=n(79254),C=n(27354),j=n(42111),_=n(32019),E=n(99092),I=n(36651);let S=(e,t)=>{E.H.init(h.v.HIGHLIGHT_PROJECT_ID,{environment:h.v.APPLICATION_ENVIRONMENT,sessionShortcut:!!t&&"shift+command+0",enableStrictPrivacy:e,enableSegmentIntegration:!0,networkRecording:{enabled:!0,recordHeadersAndBody:!0}}),x.co.loadSdkPromise.then(e=>{e&&e.addSourceMiddleware(E.LZ)})},P=e=>{let{children:t}=e,{user:n,anonymousUser:o,isGammaOrgUser:i,isUserLoading:a}=(0,I.SE)(),{enabled:l,enableStrictPrivacy:s}=(0,j.ye)("highlight");return(0,p.useEffect)(()=>{l&&!a&&n&&S(s,i)},[s,l,i,a,n]),(0,p.useEffect)(()=>
20{if(!a){if(n){let{id:e,displayName:t,email:r,profileImageUrl:o}=n;E.H.identify(e,{highlightDisplayName:t,email:r,avatar:o})}else if(null==o?void 0:o.id){let{id:e,displayName:t}=o;E.H.identify("",{anonDisplayName:t||"",anonId:e})}}},[n,o,a]),(0,r.jsx)(r.Fragment,{children:t})};var A=n(34881),T=n(87254),D=n(5879),N=n(44754);let R=e=>{let{children:t}=e;return(0,N.b)(),(0,r.jsx)(D.bd,{i18n:T.ag,children:t})};var L=n(18875),O=n(17292),U=n(55478),H=n(76332),M=n(6912),F=n(27902),z=n(21733),G=n(78462),B=n(72354),W=n(1163),Y=n(2953);let K="get-gamma-pro",q=e=>{var t,n;let{children:o}=e,{currentWorkspace:i,isUserLoading:a}=(0,z.SE)(),[l,s]=(0,p.useState)(!1),d=(0,F.z$)(),c=(0,j.ye)("upsellUXEnabled_Pro"),{data:u,refetch:m}=(0,H.FaU)({variables:{workspaceId:null==i?void 0:i.id,includeExpired:!0},skip:!(null==i?void 0:i.id)}),h=null==u?void 0:u.subscription;(0,M.ET)({subscription:h,workspace:i,autoLaunch:!0});let{data:g}=(0,H.kNl)({variables:{workspaceId:null==i?void 0:i.id},skip:!i}),f=null==g?void 0:null===(t=g.products)||void 0===t?void 0:t.find(e=>"pro"===e.key),b=null==f?void 0:null===(n=f.prices)||void 0===n?void 0:n.find(e=>e.frequencyUnit===H.C_B.Year),v=(0,W.K9)(i),{isOpen:x,onOpen:w,onClose:y}=(0,U.q)({id:"upsell-modal"}),k=(0,p.useRef)(null),C=(0,p.useCallback)(e=>{let{onOpenCallback:t,onCloseCallback:n,insufficientCreditsWarning:r,segmentEvent:o}=e;c&&(s(!!r),null==t||t(),w(),null==d||d.track(o),k.current=n||null)},[d,w,c]),_=(0,p.useCallback)(()=>{var e;null==k||null===(e=k.current)||void 0===e||e.call(k),y(),k.current=null,s(!1)},[y]),[E,I]=(0,p.useState)({openUpsellModal:C,product:v,subscription:h,proYearlyProductPrice:b});return(0,p.useEffect)(()=>{let e="true"===(0,G.SJ)()[K];
20e&&!a&&i&&(w(),(0,A.lO)({query:{...(0,G.SJ)(),[K]:void 0},emitChange:!1}))},[w,i,a]),(0,p.useEffect)(()=>{I({openUpsellModal:C,refetchSubscription:m,product:v,subscription:h,proYearlyProductPrice:b})},[C,v,h,b,m]),(0,r.jsxs)(Y.P.Provider,{value:E,children:[o,(0,r.jsx)(B.b,{insufficientCreditsWarning:l,isUpsellModalOpen:x,closeUpsellModal:_}),(0,r.jsx)(M.S1,{})]})};var V=n(99268),X=n(25944),Z=n(19902);let Q="no_org_id",J=e=>{let{children:t}=e;(0,X.iZ)();let{user:n,anonymousUser:o,currentWorkspace:i,isUserLoading:a}=(0,I.SE)();return(0,p.useEffect)(()=>{let e=(0,Z.K)();(0,V.$n)(e.get()),e.fetch().then(V.$n).catch(()=>{})},[]),(0,p.useEffect)(()=>{let e;if(!a){if(n){let{id:t,email:r}=n,o=!!r&&r.endsWith("@gamma.app"),a=(null==i?void 0:i.id)||Q;e={userId:t,isGammaUser:o,userOrgId:a,anonymousUser:!1,gammaUserFirstName:o?n.firstName:""}}else e={userId:"anonymous_user",isGammaUser:!1,userOrgId:Q,anonymousUser:!0,gammaUserFirstName:""};(0,V.$n)(e)}},[a,n,o,i]),(0,r.jsx)(r.Fragment,{children:t})};var $=n(54839),ee=n(91994),et=n(89311),en=n(95426),er=n(1198),eo=n(90221),ei=n(60742),ea=n(13265),el=n(90383);l.vc.autoAddCss=!1;let es=(0,ee.bh)(),ed=(0,g.RqP)(),ec=(0,g.PGq)(),eu=(0,i.B1)(s.qZ,{styles:{global:{".ProseMirror":{outline:"0 none"}}}});((e,t)=>{let n=(0,$.I)({theme:t});e.globalToast=n})(window,eu),(0,ei.Lq)(),O.F7.initialize(),(0,A.lt)(),x.co.init(),(0,L.S1)(),(0,C.u7)(),(0,en.a)("appMainBundleLoaded"),console.log("\uD83D\uDE80 GammaApp main wrapper imported"),j.VH.get("debugLogging")||(window.console.debug=()=>{});let ep=e=>function(t){return(0,r.jsx)(em,{children:(0,r.jsx)(e,{...t})})},em=e=>{let{children:t}=e;console.log("\uD83D\uDE80 GammaApp main wrapper rendered");let n=(0,u.useRouter)();(0,et.l)(),(0,ea.k)(),y(),(0,p.useEffect)(()=>{let e=(e,t)=>{let{shallow:n}=t;console.debug("[GammaApp - handleRouteChange] App is changing to ".concat(e," ").concat(n?"with":"without"," shallow routing"))};return n.events.on("routeChangeStart",e),()=>{n.events.off("routeChangeStart",e)}},[n]);let i=(0,er.aY)();return(0,r.jsx)(m.zt,{store:es,children:(0,r.jsx)(R,{children:(0,r.jsx)(a.x,{theme:eu,resetCSS:!0,children:(0,r.jsx)(v,{children:(0,r.jsx)(o.e,{client:ed,children:(0,r.jsxs)(g.mdV,{client:ec,children:[(0,r.jsx)(eg,{}),(0,r.jsx)(k.H6,{}),(0,r.jsx)(L.GQ,{}),(0,r.jsxs)(I.fS,{children:[(0,r.jsx)(F.qA,{children:(0,r.jsx)(j.dF,{children:(0,r.jsx)(q,{children:(0,r.jsx)(g.Imj,{children:(0,r.jsx)(J,{children:(0,r.jsx)(P,{children:(0,r.jsx)(er.dv,{value:i,children:(0,r.jsx)(_.u,{children:t})})})})})})})}),(0,r.jsx)(j.MG,{})]})]})})})})})})},eh="A new medium for presenting ideas, powered by AI. Beautiful, engaging content with none of the formatting and design work.",eg=()=>{let e=h.v.APPLICATION_ENVIRONMENT;return(0,r.jsxs)(c(),{children:[(0,r.jsx)("title",{children:"Gamma"}),(0,r.jsx)("meta",{name:"viewport",content:"width=device-width, initial-scale=1.0, viewport-fit=cover"}),(0,r.jsx)("link",{rel:"manifest",href:"/manifest.json"}),(0,r.jsx)("link",{rel:"shortcut icon",href:"production"===e?"/favicons/favicon-transparent-96x96.png":"staging"===e?"/favicons/favicon_staging.jpg":"/favicons/favicon_local.jpg"}),(0,r.jsx)("meta",{content:eh,name:"description"},"description"),(0,r.jsx)("meta",{content:"Gamma",property:"og:title"},"og:title"),(0,r.jsx)("meta",{content:eh,property:"og:description"},"og:description"),(0,r.jsx)("meta",{content:h.v.OG_IMAGE_URL,property:"og:image"},"og:image"),(0,r.jsx)("meta",{content:"Gamma",property:"twitter:title"},"twitter:title"),(0,r.jsx)("meta",{content:eh,property:"twitter:description"},"twitter:description"),(0,r.jsx)("meta",{content:h.v.OG_IMAGE_URL,property:"twitter:image"},"twitter:image"),(0,r.jsx)("meta",{property:"og:type",content:"website"},"og:type"),(0,r.jsx)("meta",{content:"summary_large_image",name:"twitter:card"},"twitter:card"),(0,r.jsx)("link",{href:"https://fonts.googleapis.com/css2?family=Inter:wght@100;200;300;400;500;600;700;800;900",rel:"stylesheet"}),(0,r.jsx)("link",{rel:"stylesheet",href:"https://use.typekit.net/tiw2cwq.css"}),!(0,eo.l6)()&&!(0,el.wg)()&&(0,r.jsx)("script",{async:!0,src:"https://cdn.optimizely.com/js/20579410255.js"}),(0,r.jsx)("script",{src:"//cdn.iframe.ly/embed.js",async:!0,charSet:"utf-8"})]})}},2013:function(e,t,n){"use strict";n.d(t,{q:function(){return k}});var r=n(52322),o=n(38035),i=n(77533),a=n(49259),l=n(87436),s=n(95897),d=n(28535),c=n(89511),u=n(11121),p=n(44438),m=n(42822),h=n(62614),g=n(75009),f=n(94523),b=n(5879),v=n(3543),x=n(92981);let w=(0,r.jsx)(b.cC,{id:"HiX9QN"}),y={bgImage:"radial-gradient(1px 1px at 20px 30px, #eee, rgba(0,0,0,0)),\n radial-gradient(1px 1px at 40px 70px, #fff, rgba(0,0,0,0)),\n radial-gradient(1px 1px at 50px 160px, #ddd, rgba(0,0,0,0)),\n radial-gradient(1px 1px at 90px 40px, #fff, rgba(0,0,0,0)),\n radial-gradient(1px 1px at 130px 80px, #fff, rgba(0,0,0,0)),\n radial-gradient(1px 1px at 160px 120px, #ddd, rgba(0,0,0,0))",bgRepeat:"repeat",bgSize:"200px 200px",transform:"translate(-50%,-50%)",borderRadius:{base:0,lg:"100px"},pos:"relative",maxW:"8xl",maxH:"5xl",minH:{base:0,lg:"5xl"}},k=e=>{let{errMessage:t=w,showDisclosure:n=!1,opacity:k=1,starOverlay:C=!0,backgroundColor:j=f.qZ.colors.trueblue[900],..._}=e,E=C?y:{};return(0,r.jsx)(o.k,{"data-error-component":!0,w:"100vw",h:"100vh",overflow:"hidden",zIndex:99999,backgroundColor:(0,v.tT)(j,k),..._,children:(0,r.jsx)(o.k,{...E,justifyContent:"center",alignItems:"center",flex:1,p:[4,16],left
20:"50%",top:"50%",children:(0,r.jsxs)(x.qX,{lede:"",title:(0,r.jsx)(b.cC,{id:"HbR60U"}),stackProps:{shadow:"lg-dark",position:"relative"},children:[(0,r.jsx)(i.x,{children:(0,r.jsx)(b.cC,{id:"1gm+lP"})}),n&&(0,r.jsx)(a.U,{allowToggle:!0,pt:4,children:(0,r.jsxs)(l.Q,{children:[(0,r.jsxs)(s.K,{px:0,_hover:{bgColor:"none"},borderStyle:"none",children:[(0,r.jsx)(d.xu,{flex:"1",textAlign:"left",children:(0,r.jsx)(b.cC,{id:"qug3k/"})}),(0,r.jsx)(c.X,{})]}),(0,r.jsx)(u.H,{pb:4,children:(0,r.jsx)(p.E,{colorScheme:"red",children:t})})]})}),(0,r.jsx)(m.M,{children:(0,r.jsx)(h.z,{variant:"solid",size:"lg",m:6,onClick:()=>{window.location.reload()},children:(0,r.jsx)(b.cC,{id:"C6f2hU"})})}),(0,r.jsx)(g.E,{pos:"absolute",w:36,bottom:"calc(-100% + 120px)",right:-12,src:"/_next/static/media/Sal-Asteroid-Parachute.ad317576.png",pointerEvents:"none",opacity:{base:0,md:1}})]})})})}},79254:function(e,t,n){"use strict";n.d(t,{$C:function(){return p},H6:function(){return u},Uj:function(){return m}});var r=n(52322),o=n(5632),i=n(73534),a=n.n(i),l=n(14274),s=n(93441),d=n(34385);let c=["/signin","/signup","/invitations/workspaces/[workspaceId]"],u=()=>{let e=(0,o.useRouter)().pathname;return!(0,s.gF)()||c.includes(e)?null:(0,r.jsx)("style",{children:".grecaptcha-badge { visibility: hidden; }"})},p=()=>(0,r.jsx)(a(),{src:"https://www.google.com/recaptcha/enterprise.js?render=".concat(l.v.RECAPTCHA_SCORING_KEY),async:!0,defer:!0}),m=async e=>(await (0,d.X)(50,100)(()=>!!window.grecaptcha).catch(()=>{throw Error("Timed out waiting for grecaptcha")}),new Promise((t,n)=>{grecaptcha.enterprise.ready(async()=>{try{let n=await grecaptcha.enterprise.execute(l.v.RECAPTCHA_SCORING_KEY,{action:e});t(n)}catch(e){console.log(e),n(e)}})}))},18469:function(e,t,n){"use strict";n.d(t,{p:function(){return h}});var r=n(43019),o=n(9850),i=n.n(o),a=n(54073),l=n.n(a),s=n(30764),d=n(2784),c=n(42111),u=n(91994),p=n(91073),m=n(66625);let h=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1?arguments[1]:void 0,n=(0,u.TL)(),o=(0,c.ye)("cardTextComputedEnabled");(0,d.useEffect)(()=>{if(!t||!o)return;let e=l()(()=>{let e={};t.state.doc.descendants((n,o)=>{if((0,p.KH)(n)&&n.attrs.id){let i=n.toJSON(),a=(0,r.getCardTitle)(i),l=t.state.doc.resolve(o),s=0===l.parentOffset&&1===l.depth;e[n.attrs.id]={title:a,text:g(t.schema,i,a),isFirstCard:s}}return!0}),n((0,m.uD)({localCardTextMap:e}))},1e3,{leading:!0,trailing:!0,maxWait:1e3});return e(),t.on("update",e),()=>{t.off("update",e)}},[t,n,o]),(0,d.useEffect)(()=>{e&&n((0,m.eJ)({cards:e}))},[n,e]),(0,d.useEffect)(()=>()=>{n((0,m.mc)())},[])},g=(e,t,n)=>{try{var o;let a=i()(t),l=(0,r.removeNodesOfType)(a,["cardNotes"]);if(!l)return"";l.content=null===(o=l.content)||void 0===o?void 0:o.map(e=>{if("card"!==e.type)return e;let t=(0,r.getCardTitle)(e);return{type:"paragraph",content:t?[{type:"text",text:t}]:[]}});let d=s.NB.fromJSON(e,l),c=d.textBetween(0,d.content.size,"\n\n",e=>{let t=e.type.name;return r.nodeSerializers[t]&&r.nodeSerializers[t](e)||" "});if(n)return(0,r.removeTitle)(c,n);return c}catch(e){return""}}},6912:function(e,t,n){"use strict";n.d(t,{S1:function(){return w},B_:function(){return C},ET:function(){return y}});var r=n(2784),o=n(14274),i=n(88232),a=n(42111),l=n(49152),s=n(44663),d=n(1163),c=n(11050),u=n(90221),p=n(23284),m=n(90383),h=n(87254),g=n(82108),f=n.n(g),b=n(94199);let v=(e,t)=>{let n=f()(t);return{[e]:{next:h.ag._({id:"hXzOVo"}),back:h.ag._({id:"iH8pgl"}),nevermind:h.ag._({id:"CKyk7Q"}),goToAccount:h.ag._({id:"C9yTHG",values:{GAMMA_PROPER_NOUN:b.N6}}),getHelp:h.ag._({id:"pWsyuL"}),declineOffer:h.ag._({id:"aIFikE"}),confirmAndCancel:h.ag._({id:"G9nPRC"}),pauseSubscription:h.ag._({id:"2RgEmU"}),cancelSubscription:h.ag._({id:"dEgA5A"}),discountSubscription:h.ag._({id:"qG4Wa/"}),claimOffer:h.ag._({id:"/Gl/RK"}),discountOff:h.ag._({id:"Bdtwnw"}),discountFor:h.ag._({id:"sQv06Y"}),discountForever:h.ag._({id:"FsOOWf"}),discountOneTime:h.ag._({id:"HpXCa4"}),day:h.ag._({id:"5YWExy"}),month:h.ag._({id:"obrMay"}),year:h.ag._({id:"/Tw548"}),error:h.ag._({id:"wTrpxV"}),genericErrorDescription:h.ag._({id:"PUjJ3A"}),cancelNow:h.ag._({id:"EiakwV"}),applyingDiscount:h.ag._({id:"8kSYjw"}),applyingCancel:h.ag._({id:"VpuvNv"}),applyingResume:h.ag._({id:"eIoGiX"}),applyingPause:h.ag._({id:"UD7gOq"}),discountApplied:h.ag._({id:"jdYyiz"}),discountAppliedMessage:h.ag._({id:"DhHX6G"}),pauseApplied:h.ag._({id:"eeITvj"}),pauseAppliedMessage:h.ag._({id:"nm0VaE"}),pauseAppliedResumeMessage:h.ag._({id:"qOe0SS"}),pauseScheduledMessage:h.ag._({id:"mqRc6d"}),until:h.ag._({id:"C51N+0"}),cancelApplied:h.ag._({id:"Wcg6zu"}),cancelAppliedMessage:h.ag._({id:"8vN97Y"}),cancelAppliedDateMessage:h.ag._({id:"BS/SGu"}),howLongToPausePrompt:h.ag._({id:"HLyJ9n"}),whatCouldWeHaveDone:h.ag._({id:"fcbm8H"}),weReadEveryAnswer:h.ag._({id:"nkuKRd"}),applyingCustomerAction:h.ag._({id:"PXwF+s"}),loading:h.ag._({id:"Z3FXyt"}),pauseWallCardPunch:h.ag._({id:"iL2TQ6"}),pauseWallCta:h.ag._({id:"TvXj47"}),pauseWallCardHeading:h.ag._({id:"kHm8Fg"}),scheduledToReactivate:h.ag._({id:"aH7vi8"}),resumeApplied:h.ag._({id:"diOgYK"}),resumeAppliedMessage:h.ag._({id:"YqFvUY"}),resumeNextChargeMessage:h.ag._({id:"VDqPUf"}),resumeNextChargeMessageWithoutAmount:h.ag._({id:"RrvVAn"}),resumeAccountDataInfo:h.ag._({id:"dJCJXA"}),subscriptionPauseNotice:h.ag._({id:"fpxliT"}),failedPaymentNotice:h.ag._({id:"Vxg5vO"}),chargedMultipleTimeNotice:h.ag._({id:"lAlv46"}),failedPaymentCardPunch:h.ag._({id:"KEZrHg",values:{GAMMA_PROPER_NOUN:b.N6,productName:n}}),resumeHey:h.ag._({id:"hdOctW"}),invoicePaidTitle:h.ag._({id:"aJGfDL"}),logout:h.ag._({id:"W+3RJN"}),note:h.ag._({id:"ycCSuD"}),discount:h.ag._({id:"HmpVeZ"}),discountNoticeHeadline:h.ag._({id:"5P1dmt"}),discountNoticePrepend:h.ag._({id:"yjadEY"}),discountOverride:h.ag._({id:"JfBDWL"}),discountValidUntil:h.ag._({id:"uXxNua"}),updateBilling:h.ag._({id:"tQilrI"}),extendTrialCTA:h.ag._({id:"m3l7VI"}),extendTrialPunch:h.ag._({id:"s5pINo"}),extendTrialOfferTitle:h.ag._({id:"SyzXYh"}),trialExtended:h.ag._({id:"fezME2"}),trialExtendedMessage:h.ag._({id:"QE4mUs"}),applyingTrialExtension:h.ag._({id:"vI2q9R"}),switchPlanCTA:h.ag._({id:"P2mx2L"}),changePlanHighlights:h.ag._({id:"qbgW+C"}),changePlanOfferPunch:h.ag._({id:"MRkiFP"}),planChanged:h.ag._({id:"ByFtyh"}),planChangedMessage:h.ag._({id:"Pf5z1G"}),applyingPlanChange:h.ag._({id:"9vKKLI"}),surveyStepTag:h.ag._({id:"cSUBI1"}),freeFormStepTag:h.ag._({id:"cSUBI1"}),finalConfirmation:h.ag._({id:"1/oP/N"}),offerDiscountTag:h.ag._({id:"LTgtxG"}),offerChangePlanTag:h.ag._({id:"ENMJv2"}),offerExtendTrialTag:h.ag._({id:"MWKntz"}),offerRedirectTag:h.ag._({id:"cvpAvL"}),offerContactTag:h.ag._({id:"cvpAvL"}),offerPauseTag:h.ag._({id:"+T6DGl"}),completeTag:h.ag._({id:"K5c1e7"}),errorTag:h.ag._({id:"EuvbIW"}),offerAccepted:h.ag._({id:"ZU0opP"})}}},x="\n!function(){ \n if (!window.churnkey || !window.churnkey.created) {\n window.churnkey = { created: true };\n const a = document.createElement('script');\n a.src = 'https://assets.churnkey.co/js/app.js?appId=".concat(o.v.CHURNKEY_APP_ID,"';\n a.async = true;\n const b = document.getElementsByTagName('script')[0];\n b.parentNode.insertBefore(a, b);\n }\n }();\n"),w=()=>{let e=!(0,u.l6)()&&!(0,m.wg)();return(0,p.G)(e,x),null},y=e=>{let{subscription:t,workspace:n,autoLaunch:c=!0}
20=e,u=(0,a.ye)("churnkeyFailedPaymentWallEnabled"),p=(0,l.l)(),m=(0,d.K9)(n),h=(0,s.G)(),g=(0,r.useCallback)(async()=>{if(t&&m&&u)return(0,i.d6)("churnkey").then(e=>{var n,r;if(!e||!t.billingSubscriptionId||!(null===(n=t.createdByUser)||void 0===n?void 0:n.billingCustomerId)){console.error("[Churnkey] launchFailedPayment Missing hmac or subscription data",{hmac:e,subscription:t});return}console.debug("[Churnkey] launchFailedPayment - launching churnkey with:",{hmac:e,appId:o.v.CHURNKEY_APP_ID,subscriptionId:t.billingSubscriptionId,customerId:null===(r=t.createdByUser)||void 0===r?void 0:r.billingCustomerId}),k({authHash:e,subscription:t,localeKey:p,productKey:m,launchIntercomUI:h})})},[t,m,u,p,h]);return(0,r.useEffect)(()=>{c&&g()},[g,c]),{launchFailedPaymentFlow:g,failedPaymentFlowEnabled:u}},k=async e=>{var t,n;let{authHash:r,subscription:i,localeKey:a,productKey:l,launchIntercomUI:s}=e;null===(n=window.churnkey)||void 0===n||n.check("failed-payment",{subscriptionId:i.billingSubscriptionId,customerId:null===(t=i.createdByUser)||void 0===t?void 0:t.billingCustomerId,authHash:r,customerAttributes:{language:a},i18n:{lang:a,messages:v(a,l)},appId:o.v.CHURNKEY_APP_ID,mode:o.v.CHURNKEY_MODE,provider:"stripe",softWall:!0,forceCheck:!1,gracePeriodDays:3,ignoreInvoicesWithoutAttempt:!1,handleSupportRequest(){var e;s(),c.co.track(c.AA.CHURNKEY_HANDLE_SUPPORT_CLICK,{source:"failed-payment-wall",subscriptionId:i.billingSubscriptionId,customerId:null===(e=i.createdByUser)||void 0===e?void 0:e.billingCustomerId})},async handleCancel(e){var t,n;return c.co.track(c.AA.CANCEL_SUBSCRIPTION_CLICK,{source:"failed-payment-wall",subscriptionId:i.billingSubscriptionId,customerId:null===(t=i.createdByUser)||void 0===t?void 0:t.billingCustomerId}),console.debug("[launchChurnkeyFailedPayment.handleCancel]",{subscriptionId:i.billingSubscriptionId,customerId:null===(n=i.createdByUser)||void 0===n?void 0:n.billingCustomerId,customer:e}),j({authHash:r,subscription:i,localeKey:a,productKey:l,launchIntercomUI:s,customerAttributes:{viaFailedPayment:!0}}).catch(e=>k({authHash:r,subscription:i,localeKey:a,productKey:l,launchIntercomUI:s}))},onFailedPaymentWallActivated(){var e;c.co.track(c.AA.CHURNKEY_FAILED_PAYMENT_WALL_SHOWN,{subscriptionId:i.billingSubscriptionId,customerId:null===(e=i.createdByUser)||void 0===e?void 0:e.billingCustomerId})},onUpdatePaymentInformation(){var e;c.co.track(c.AA.CHURNKEY_PAYMENT_METHOD_UPDATED,{source:"failed-payment-wall",subscriptionId:i.billingSubscriptionId,customerId:null===(e=i.createdByUser)||void 0===e?void 0:e.billingCustomerId})},onFailedPaymentWallClose(){var e;c.co.track(c.AA.CHURNKEY_FAILED_PAYMENT_WALL_CLOSED,{subscriptionId:i.billingSubscriptionId,customerId:null===(e=i.createdByUser)||void 0===e?void 0:e.billingCustomerId})},onCancel(){var e;c.co.track(c.AA.CHURNKEY_CANCEL_SUBSCRIPTION_COMPLETE,{source:"failed-payment-wall",subscriptionId:i.billingSubscriptionId,customerId:null===(e=i.createdByUser)||void 0===e?void 0:e.billingCustomerId})},onError(e,t){console.warn('Churnkey check("failed-payment", ...) error',e,t)}})},C=(e,t)=>{let n=(0,a.ye)("churnkeyCancelFlowEnabled"),o=(0,l.l)(),c=(0,d.K9)(t),u=(0,s.G)(),p=(0,r.useCallback)(()=>{if(e&&c&&n)return(0,i.d6)("churnkey").then(t=>{var n;if(!t||!e.billingSubscriptionId||!(null===(n=e.createdByUser)||void 0===n?void 0:n.billingCustomerId)){console.debug("[Churnkey] handleCancel - Missing hmac or subscription data",{hmac:t,subscription:e});return}return j({authHash:t,subscription:e,localeKey:o,productKey:c,launchIntercomUI:u})})},[n,o,c,e,u]);return{launchCancelFlow:p,cancelFlowEnabled:n}},j=async e=>{let{authHash:t,subscription:n,localeKey:r,productKey:i,customerAttributes:a={},launchIntercomUI:l}=e;return new Promise((e,s)=>{var u,p,m;null===(m=window.churnkey)||void 0===m||m.init("show",{subscriptionId:n.billingSubscriptionId,customerId:null===(u=n.createdByUser)||void 0===u?void 0:u.billingCustomerId,authHash:t,customerAttributes:{language:r,frequency:null===(p=(0,d.OJ)(n))||void 0===p?void 0:p.frequencyUnit,productKey:i,...a},i18n:{lang:r,messages:v(r,i)},appId:o.v.CHURNKEY_APP_ID,mode:o.v.CHURNKEY_MODE,provider:"stripe",record:!0,handleSupportRequest
20(){var e;l(),c.co.track(c.AA.CHURNKEY_HANDLE_SUPPORT_CLICK,{source:"cancel-flow",subscriptionId:n.billingSubscriptionId,customerId:null===(e=n.createdByUser)||void 0===e?void 0:e.billingCustomerId})},onCancel(e,t,r){var o;c.co.track(c.AA.CHURNKEY_CANCEL_SUBSCRIPTION_COMPLETE,{source:"cancel-flow",subscriptionId:n.billingSubscriptionId,customerId:null===(o=n.createdByUser)||void 0===o?void 0:o.billingCustomerId,surveyResponse:t,freeformFeedback:r}),console.debug("[launchChurnkeyCancelFlow.onCancel]",{surveyResponse:t,freeformFeedback:r})},onGoToAccount(t){console.debug("[launchChurnkeyCancelFlow.onGoToAccount]",{sessionResults:t}),e({sessionResults:t})},onClose(t){if(console.debug("[launchChurnkeyCancelFlow.onClose]",{sessionResults:t}),!t||t.aborted){s("Churnkey cancel flow aborted");return}e({sessionResults:t})},onError(e){console.warn("[launchChurnkeyCancelFlow.onError]",{message:e}),s({message:e})}})})}},33022:function(e,t,n){"use strict";n.d(t,{C:function(){return v}});var r=n(52322),o=n(29117),i=n(5740),a=n(77533),l=n(28535),s=n(43297),d=n(74409),c=n(20437),u=n(74008),p=n(62614),m=n(42946),h=n(54933),g=n(49929),f=n(5879);n(2784);let b=e=>{let{label:t,shortcuts:n}=e;return(0,r.jsxs)(o.U,{children:[n.map((e,t)=>(0,r.jsx)(i.T,{padding:1,children:e},t)),(0,r.jsx)(a.x,{fontSize:"sm",fontWeight:"medium",whiteSpace:"nowrap",children:t})]})},v=e=>{let{onClose:t,showExitPresentMode:n=!0}=e;return(0,r.jsx)(l.xu,{children:(0,r.jsxs)(s.K,{spacing:6,children:[(0,r.jsxs)(s.K,{spacing:1,children:[(0,r.jsxs)(o.U,{color:"gray.500",children:[(0,r.jsx)(g.G,{icon:m.UFh})," ",(0,r.jsx)(d.X,{size:"xs",fontWeight:"normal",children:(0,r.jsx)(f.cC,{id:"h7MgpO"})})]}),(0,r.jsx)(d.X,{size:"md",children:(0,r.jsx)(f.cC,{id:"UodEcE"})})]}),(0,r.jsxs)(c.M,{spacing:3,columns:1,children:[(0,r.jsx)(b,{label:(0,r.jsx)(f.cC,{id:"9xCxY6"}),shortcuts:[(0,r.jsx)(g.G,{icon:h.acZ},"left"),(0,r.jsx)(g.G,{icon:h.eFW},"right")]}),n&&(0,r.jsx)(b,{label:(0,r.jsx)(f.cC,{id:"IkakN2"}),shortcuts:["Esc"]}),(0,r.jsx)(b,{label:(0,r.jsx)(f.cC,{id:"K0Oq/D"}),shortcuts:["R"]}),(0,r.jsx)(u.i,{borderColor:"gray.300"}),(0,r.jsx)(b,{label:(0,r.jsx)(f.cC,{id:"CgmvBu"}),shortcuts:["S"]}),(0,r.jsx)(b,{label:(0,r.jsx)(f.cC,{id:"/5i2oX"}),shortcuts:[(0,r.jsx)(g.G,{icon:h.FPD},"up"),(0,r.jsx)(g.G,{icon:h.r5q},"down")]}),(0,r.jsx)(b,{label:(0,r.jsx)(f.cC,{id:"rEj/lx"}),shortcuts:["Enter"]})]}),(0,r.jsx)(p.z,{size:"sm",variant:"solid",onClick:t,children:(0,r.jsx)(f.cC,{id:"76gPWk"})})]})},"coach-bar")}},18153:function(e,t,n){"use strict";n.d(t,{j:function(){return l}});var r=n(5632),o=n(2784),i=n(82089);let a=e=>{let{queryKey:t}=e;if(!t)return;let{searchParams:n}=new URL(window.location.href);n.delete(t);let r=Object.fromEntries(n.entries());(0,i.lO)({query:r})},l=e=>{let{queryKey:t}=e,{isReady:n}=(0,r.useRouter)();(0,o.useEffect)(()=>{n&&a({queryKey:t})},[n,t])}},48832:function(e,t,n){"use strict";n.d(t,{BK:function(){return k},Dw:function(){return y},Km:function(){return w},dN:function(){return v},p6:function(){return x}});var r=n(87254),o=n(82282),i=n(32361),a=n(96740),l=n(31807),s=n(73871),d=n(57907),c=n(21346),u=n(48053),p=n(1363),m=n(49738),h=n(90535),g=n(9283),f=n(75528);let b={en:d.Z,"pt-br":c.Z,ja:u.Z,"zh-cn":p.Z,"zh-tw":m.Z,es:h.Z,fr:g.Z,ko:f.Z},v=()=>b[r.ag.locale]||void 0,x=(e,t)=>e?(0,o.Z)((0,l.Z)(e),t,{locale:v()}):"",w=(e,t)=>e?(0,a.Z)((0,l.Z)(e),t?(0,l.Z)(t):new Date,{locale:v()}):"",y=e=>e?(0,i.Z)((0,l.Z)(e),{locale:v()}):"",k=e=>e?(0,s.Z)((0,l.Z)(e),new Date,{locale:v(),addSuffix:!0,roundingMethod:"floor"}):""},25944:function(e,t,n){"use strict";n.d(t,{bf:function(){return g},iZ:function(){return m},lh:function(){return p},wK:function(){return h}});var r=n(2784),o=n(42111),i=n(91994),a=n(47968),l=n(90604),s=n(56400),d=n(99268);let c=e=>Math.random()<=1/e;class u{setupProvider(){this.t1SetupProvider||(this.t1SetupProvider=performance.now())}downloadDoc(){this.t2DownloadDoc||(this.t2DownloadDoc=performance.now())}onCreate(){this.t3OnCreate||(this.t3OnCreate=performance.now())}report(){return null===this.t1SetupProvider||null===this.t2DownloadDoc||null===this.t3OnCreate?null:{downloadDoc:this.t2DownloadDoc-this.t1SetupProvider,onCreate:this.t3OnCreate-this.t2DownloadDoc}}constructor(){this.t1SetupProvider=null,this.t2DownloadDoc=null,this.t3OnCreate=null}}let p=(e,t)=>{let n=(0,i.CG)(a.Pw),o=(0,r.useRef)(n);(0,r.useEffect)(()=>{o.current=n},[n]),(0,r.useEffect)(()=>
20{if(e)return window.addEventListener("keydown",n,!0),()=>{window.removeEventListener("keydown",n,!0)};function n(e){let n=e.target.closest(".ProseMirror");if(!n||!o.current||!c(t))return;let r=performance.now();requestAnimationFrame(()=>{let t=e.key;" "===t&&(t="Space");let n=performance.now()-r;(0,d.EF)({...(0,s.H)(),key:t,duration:n})})}},[e,o,t])},m=()=>{let e=(0,o.ye)("rumSampleRate");(0,r.useEffect)(()=>{(0,d._k)(e)},[e])},h=e=>{let t=(0,r.useCallback)(t=>{let{isFullscreen:n=!1}=t;if(!e)return;let r=performance.now();requestAnimationFrame(()=>{requestAnimationFrame(()=>{let e=performance.now()-r;(0,d.gG)({...(0,s.H)(),toMode:l.q.SLIDE_VIEW,duration:e,isFullscreen:n})})})},[e]),n=(0,r.useCallback)(t=>{let{isFullscreen:n=!1}=t;if(!e)return;let r=performance.now();requestAnimationFrame(()=>{requestAnimationFrame(()=>{let e=performance.now()-r;(0,d.gG)({...(0,s.H)(),toMode:l.q.DOC_VIEW,duration:e,isFullscreen:n})})})},[e]);return{recordExitSlideModePerformance:n,recordEnterSlideModePerformance:t}},g=()=>{let[e]=(0,r.useState)(()=>new u),t=(0,r.useCallback)(()=>{e.setupProvider()},[e]),n=(0,r.useCallback)(()=>{e.downloadDoc()},[e]),o=(0,r.useCallback)(()=>{e.onCreate();let t=e.report();if(null===t){console.warn("[HoneycombDocLoadTimer] failed to generate doc timings");return}(0,d.Py)({...(0,s.H)(),duration:t.onCreate}),(0,d.aZ)({...(0,s.H)(),duration:t.downloadDoc})},[e]);return{timeOnCreate:o,timeOnSetupProvider:t,timeOnDownloadDoc:n}}},89311:function(e,t,n){"use strict";n.d(t,{l:function(){return l}});var r=n(5632),o=n(2784),i=n(7e4),a=n(88640);let l=()=>{let{pathname:e,isReady:t}=(0,r.useRouter)(),n=(0,o.useRef)(!1),[l,s]=(0,i.X)(a.H.lastHomeUrl,"/");(0,o.useEffect)(()=>{if(n.current||!t)return;let r="/inspiration"===e||"/templates"===e?e:"/";s(r),n.current=!0},[s,t,e])}},85326:function(e,t,n){"use strict";n.d(t,{Lu:function(){return s},O1:function(){return l},lP:function(){return d}});var r=n(2784),o=n(91994),i=n(47968),a=n(36651);let l=()=>{let e=(0,o.CG)(i.yx),t=(0,a.py)("edit",e),n=(0,r.useRef)(t);return e&&(n.current=t),n.current},s=()=>{let e=(0,o.CG)(i.yx),t=(0,a.py)("manage",e),n=(0,r.useRef)(t);return e&&(n.current=t),n.current},d=()=>{let e=l(),t=(0,o.CG)(i.yx),n=(0,a.py)("edit",t);return(null==t?void 0:t.site)?e:n}},32186:function(e,t,n){"use strict";n.d(t,{m:function(){return f},n:function(){return v}});var r=n(52322),o=n(28535),i=n(2784),a=n(43997),l=n(18469),s=n(52332),d=n(30870),c=n(65878),u=n(47968),p=n(28858),m=n(90507),h=n(85069),g=n(77377);let f=e=>{let{reduxData:t,...n}=e,o=(0,h.c)(t);return(0,r.jsx)(a.zt,{store:o,children:(0,r.jsx)(b,{...n})})},b=e=>{let{onCreate:t=()=>{},initialContent:n,content:h,theme:f,isThumbnail:b,portalComponent:v}=e,[x,w]=(0,i.useState)(!1),y=(0,i.useMemo)(()=>(0,g.e)(),[]),k=(0,a.I0)();(0,i.useEffect)(()=>{k((0,u.Dc)({theme:f||null})),k((0,u.iS)({isAllowedToEdit:!1})),k((0,u.Nr)({animationsEnabled:!1}))},[f,k]);let C=(0,m.jE)({async onCreate(e){var n;let{editor:r}=e;console.debug("[EditorPreview][onCreate] TipTap editor is now ready"),null===(n=d.Z8.getState(r.state))||void 0===n||n.compute(r.state).processChanges(k),r.commands.command(()=>((0,s.E0)(r.state.doc,k),!0)),w(!0),null==t||t({editor:r})},extensions:y,content:n,editable:!1});return(C.isThumbnail=b,(0,i.useEffect)(()=>{var e;h&&C&&(C.commands.setContent(h),C.commands.command(()=>((0,s.E0)(C.state.doc,k),!0)),null===(e=c.S.getState(C.state))||void 0===e||e.compute(C.state.doc).processChanges(k))},[h,C,k]),(0,l.p)([],C),x)?(0,r.jsx)(o.xu,{className:"editor-preview-root","data-variation-preview":!0,"data-testid":"editor-preview-root",width:"100%",position:"relative",sx:p.I,children:(0,r.jsx)(m.kg,{editor:C,portalComponent:v,style:{width:"100%",height:"100%"},className:"highlight-mask"})}):(0,r.jsx)(r.Fragment,{})},v={"[data-thumbnail-hidden]":{display:"none !important"},"*":{backdropFilter:"none !important",webkitBackdropFilter:"none !important","-webkit-transition":"none !important","-moz-transition":"none !important","-o-transition":"none !important","-ms-transition":"none !important",transition:"none !important",vectorEffect:"none !important"},contain:"paint",".editor-core-root, .editor-preview-root":{height:"100% !important",width:"auto !important"},".doc-content-wrapper":{pb:"0 !important",minH:"auto !important"},"[data-doc-background-element], [data-doc-background-element-present-mode]":{display:"none !important"},".card2-background":{mt:0}}},86783:function(e,t,n){"use strict";n.d(t,{z:function(){return v}});var r=n(52322),o=n(38035),i=n(87254),a=n(2784),l=n(64467),s=n(91994),d=n(80720),c=n(91579),u=n(58879),p=n(46741),m=n(97676);let h={fontFamily:'"Inter", sans-serif !important',fontWeight:"500",lineHeight:"1.5 !important",textTransform:"none",letterSpacing:"normal !important",textAlign:"left !important",margin:"0 !important",color:"gray.800 !important",background:"none !important",border:"0 none !important",padding:"0 !important",content:'""'},g={".block-paragraph,.block-heading,.block-title,.block-todo,.block-numbered,.block-bullet":{...h,margin:0,my:"0.75em",":first-child":{mt:"0px !important"},":last-child":{mb:"0px !important"}},".block-paragraph":{fontSize:"1em"},".block-heading,.block-title":{fontWeight:"bold",lineHeight:{fontSize:"1.25"},'.heading[level="1"]':{fontSize:"1.5em"},'.heading[level="2"]':{fontSize:"1.25em"},'.heading[level="3"]':{fontSize:"1.125em"},'.heading[level="4"]':{fontSize:"1em"}},".block-title":{".title":{fontSize:"1.75em"}},a:{...h,color:"var(--chakra-colors-blue-500) !important","&:hover":{textDecoration:"underline"},cursor:"pointer"},".mention":{bgColor:"trueblue.50",whiteSpace:"break-spaces"},code:{backgroundColor:"var(--chakra-colors-trueblue-50)",color:"var(--body-color)",...m.FC}},f={".block-paragraph,.block-heading,.block-title,.block-todo,.block-numbered,.block-bullet":{...h,margin:0,my:"0.75em",":first-child":{mt:"0px !important"},":last-child":{mb:"0px !important"},color:"white"},code:{backgroundColor:"var(--chakra-colors-whiteAlpha-100)",color:"var(--chakra-colors-gray-200)",...m.FC},".block-todo label.chakra-checkbox .chakra-checkbox__control[data-checked]":{backgroundColor:"var(--chakra-colors-whiteAlpha-100)",color:"var(--chakra-colors-white)"}},b=e=>{let{isDark:t=!1}=e;return{".ProseMirror":{height:"100%"},...g,...p.dE,"--box-border-radius":"var(--chakra-radii-sm)","--link-color":t?"var(--chakra-colors-trueblue-100)":"var(--chakra-colors-trueblue-500)",".block-todo label.chakra-checkbox .chakra-checkbox__control:not([data-checked])":{borderColor:"var(--chakra-colors-chakra-border-color)"},"--body-color-inverted":t?"black":"white",...t?f:{},".is-selecting-node":{"[data-selection-ring]":{_before:{content:'""',position:"absolute",inset:0,borderRadius:"inherit",outline:"2px s
20olid",outlineColor:t?"trueblue.100":"trueblue.300",pointerEvents:"none",zIndex:1}},'[data-selection-ring="padded"]':{_before:{outlineOffset:"0.25em"}}}}},v=(0,a.memo)(e=>{let{isEditable:t,notesSx:n,canShowEditHint:p=!1,isDark:m=!1}=e,[h,g]=(0,a.useState)(null),{destroyEditor:f,mountEditor:v}=(0,s.CG)(l.Vy);(0,a.useEffect)(()=>(v&&g(v()),()=>{null==f||f(),g(null)}),[f,v]),(0,a.useEffect)(()=>{h&&t&&h.commands.focus("end")},[t,h]),(0,a.useEffect)(()=>{if(h){if(h.shouldUseLiteMenus=!0,t&&!h.isEditable){h.setEditable(!0);return}if(!t&&h.isEditable){h.setEditable(!1);return}}},[t,h]);let x=t?i.ag._({id:"fnNtuR"}):"Double click to edit",w=p&&h&&h.isEmpty,y=b({isDark:m});return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(o.k,{className:"card-notes-editor",overflowY:"auto",border:"1px solid",borderColor:m?"gray.700":"gray.200",borderRadius:"md",flex:1,p:4,wordBreak:"break-word",sx:{".block.block-paragraph.first-block.last-block.is-empty::before":{...u.BI,content:'"'.concat(x,'"')},...y,...n,_before:w?{...u.BI,top:2,left:2,height:"auto",width:"auto",content:'"'.concat(i.ag._({id:"CvH5f/"}),'"')}:{}},pos:"relative",children:(0,r.jsx)(o.k,{flex:1,flexDirection:"column",children:h&&(0,r.jsx)(c.k,{editor:h,className:"highlight-mask",style:{height:"100%"}})})}),h&&(0,r.jsx)(d.u,{editor:h})]})});v.displayName="CardNotesEditor"},46409:function(e,t,n){"use strict";n.d(t,{Y:function(){return H}});var r=n(52322),o=n(84586),i=n(28165),a=n(2784),l=n(13608),s=n(71997),d=n(4878);let c={fontSize:"var(--chakra-fontSizes-sm) !important",fontFamily:'"Inter", sans-serif !important',fontWeight:"500 !important",lineHeight:"1.5 !important",textTransform:"none",letterSpacing:"normal !important",textAlign:"left !important",margin:"0 !important",color:"var(--chakra-colors-gray-900) !important",background:"none !important",blockquote:{borderLeftWidth:"0px !important",borderLeftStyle:"solid !important",borderLeftColor:"transparent !important",padding:"0 !important",color:"var(--chakra-colors-gray-900) !important",fontStyle:"normal !important"},border:"0 none !important",padding:"0 !important",content:'""'},u={...c,color:"var(--chakra-colors-blue-500) !important","&:hover":{textDecoration:"underline"},cursor:"pointer"},p={"p,h1,h2,h3,h4,h5,h6, .title, .section-title":{...c,margin:0},a:u,"ul, ol":{marginLeft:"1.2em"},blockquote:{borderLeft:"3px solid var(--chakra-colors-gray-200)",paddingLeft:"0.5em"},color:"var(--chakra-colors-gray-900) !important",wordBreak:"break-word",lineHeight:"1.5 !important",letterSpacing:"normal !important",".mention":{bgColor:"trueblue.50",whiteSpace:"break-spaces"}},m={fontFamily:'"Inter", sans-serif !important',fontWeight:"500","@media screen and (max-width: 30rem)":{".controls-wrapper":{}},"@media screen and (min-width: 30rem)":{".controls-wrapper":{paddingLeft:"var(--comment-padding)"},".controls-wrapper__gridLayout, .controls-wrapper__gallery":{paddingLeft:"calc(-1 * var(--grid-padding) + var(--comment-padding))"}},".comments-list":{".comments-sign-up":{a:{...c,...u,fontSize:"xs",color:"gray.500",fontWeight:"bold","&:hover":{color:"gray.500",textDecoration:"underline"}}},".comment":{".reactions-row ul":{marginLeft:"auto"},".comment-date":{fontSize:"var(--chakra-fontSizes-xs) !important",color:"var(--chakra-colors-gray-500) !important"},...p},".block-image":{"&.is-focused":{"img, .image, .placeholder":{boxShadow:"var(--chakra-shadows-outline)"}}},".block-target-html":{"p,h1,h2,h3,h4,h5,h6,blockquote,ol,ul,li, .title, .section-title":{...c,"::after":c},a:{...u},li:{margin:"0 !important",padding:"0 !important",listStyle:"none !important",p:{margin:0}},img:{maxWidth:"200px",maxHeight:"80px"}}},".comment-editor .ProseMirror":{...p,"\n @media only screen and (max-device-width: 812px) and (-webkit-min-device-pixel-ratio: 2),\n @media only screen and (max-device-width: 812px) and (-webkit-min-device-pixel-ratio: 3),\n @media only screen and (max-device-width: 640px) and (-webkit-min-device-pixel-ratio: 4)\n ":{fontSize:"16px !important"},padding:"12px",borderRadius:"5px","&.focus-visible":{boxShadow:"0 0 0 2px rgb(49, 130, 206)"},"a.image-link":{pointerEvents:"none"}}};var h=n(73235),g=n(56974),f=n.n(g),b=n(24992),v=n(93814),x=n(65301);function w(){let e=(0,h._)(["\n 0% {\n box-shadow: ",";\n }
20\n 7%,\n 60% {\n box-shadow: var(--link-box-shadow);\n }\n 100% {\n box-shadow: ",";\n }\n"]);return w=function(){return e},e}function y(){let e=(0,h._)(["\n 0% \n 100% {\n box-shadow: ",";\n }\n"]);return y=function(){return e},e}let k="0 0 0 0 rgba(0, 0, 0, 0.0)",C=(0,i.F4)(w(),k,k),j=(0,i.F4)(y(),k);var _=n(12304);let E={"math-display":{fontSize:"1.125em",".katex":{whiteSpace:"normal"}},"math-inline":{"&.ProseMirror-selectednode":{marginY:"-0.25em"}},"math-display, math-inline":{"&.ProseMirror-selectednode":{boxShadow:"outline",borderRadius:"var(--box-border-radius)",backgroundColor:"gray.100",padding:".25em",marginX:"3px",".math-src":{color:"gray.700"}}}};var I=n(49354),S=n(58879),P=n(87254);let A=e=>({".block-smartLayout":{'[data-node-view-content-outer="smartLayout"]':{display:"contents"},'[data-node-view-content-inner="smartLayout"]':{display:"contents"},"[data-selection-ring]":{outlineStyle:"none",outlineWidth:"1px",outlineColor:"var(--grid-outline-color)"},'[data-selection-ring="padded"]':{outlineOffset:"0.25em",".add-button":{m:"-0.25em"}},"&:not(.is-focused)":{"[data-content-empty=true] > [data-node-view-content]":{height:0}},"&.is-focused":{"[data-content-empty=true]":{"[placeholder]::before":S.BI}},["&.is-focused, &:hover, &[".concat(x.r,"]")]:{".is-editable":{"[data-selection-ring]":{outlineStyle:"solid"},".add-button":{opacity:1}}}},".node-smartLayoutCell":{display:"contents","> [data-node-view-wrapper]":{display:"contents"},"--heading-placeholder":(0,S.iI)(P.ag._({id:"HX5SVx"})),'[data-node-view-content-inner="smartLayoutCell"] > .first-block':{mt:[0,0]},'[data-node-view-content-inner="smartLayoutCell"] > .last-block':{mb:[0,0]},".slash-menu-prompt":{display:"none"},".block-heading, .block-title":{...(0,I.iL)(e).tight},".block-paragraph":{...(0,I.YW)(e).tight}}});var T=n(97676),D=n(89),N=n(46741);function R(){let e=(0,h._)(["\n 0% {\n align-items: flex-start;\n grid-template-rows: 0.2fr;\n overflow: hidden;\n }\n 99% {\n align-items: flex-start;\n overflow: hidden;\n }\n 100% {\n align-items: initial;\n grid-template-rows: 1fr;\n overflow: visible;\n }\n"]);return R=function(){return e},e}let L=(0,i.F4)(R()),O=e=>({height:"100%",outlineWidth:"0px",lineHeight:e?"1.6 !important":_.I0,"&.is-focused":{".is-empty":{"[data-placeholder]":{_after:S.BI},"[data-multiline-placeholder]":{position:"relative",_after:S.cY,"> [data-node-view-content-inner]":{position:"absolute",width:"100%",minH:"1em"}}}},"--block-margin":(0,I.l1)(e),"--box-border-color":"var(--chakra-colors-blackAlpha-200)","--grid-border":"1px","--grid-padding":"1.22em","&.is-dark":{"--box-border-color":"var(--chakra-colors-whiteAlpha-400)",".block-blockquote":{blockquote:{borderLeftColor:"var(--accent-color)"}},...T.KX.dark,...D.E_.dark},".block-card":{"&.expandable-node":{"&-selected .expandable-selected":{animation:"".concat(C," 3000ms ease-in-out forwards")},"&-reset .expandable-selected":{animation:"".concat(j)}}},".block":{my:"var(--block-margin)",fontFamily:"var(--body-font)",fontWeight:"var(--body-font-weight)",color:"var(--body-color)"},"&.is-nested":{display:"grid",animation:"".concat(L," ").concat(v.nY,"ms ease-out forwards")},"&.is-full-width":{".block.is-full-width":{width:"var(--full-width)",position:"relative",left:"50%",transform:"translateX(-50%)"}},'[data-node-view-content-inner="cardLayoutItem"], [data-node-view-content-inner="card"]':{"> .first-block":{mt:"0em"},"> .last-block":{mb:"0em"}},"a.link":{color:"var(--text-color, var(--link-color))",cursor:"pointer",fontWeight:"bold",textDecoration:"underline",'&[href=""]':{textDecorationStyle:"dashed"},"&:hover":{color:"var(--link-color-hover)"},"&:active":{color:"var(--link-color-hover)"}},".block-toggle":{"&.expandable-node":{"&-selected .toggle":{animation:"".concat(C," 3000ms ease-in-out forwards")},"&-reset .toggle":{animation:"".concat(j)}},'[data-open="false"]':{'[data-node-view-content-inner="toggle"]':{"> :not(:first-child)":{display:"none"}}}},..._.g6,...T.KX.default,...D.E_.default,...N.dE,...E,".block-codeBlock":{pre:{fontFamily:"mono",fontSize:I.um.codeBlock,"@media print":{fontSize:f()(I.um.codeBlock)},color:"var(--body-color)",background:"var(--accent-color-background-muted)",borderRadius:"var(--box-border-radius)",overflow:"hidden",code:{display:"block",padding:".75em 1em"}}},code:{backgroundColor:"var(--accent-color-background-muted)",color:"var(--body-color)",...T.FC},".block-blockquote":{blockquote:{pl:"1.5em"}},".block-embed, .block-video":{"&.expandable-node":{"&-selected":{".embed-preview, .embed-viewer, .video-player":{animation:"".concat(C," 3000ms ease-in-out forwards")}},"&-reset":{".embed-preview, .embed-viewer, .video-player":{animation:"".concat(j)}}}},".block-image":{"&.expandable-node":{"&-selected":{"[data-selection-ring]":{animation:"".concat(C," 3000ms ease-in-out forwards")}},"&-reset ":{"[data-selection-ring]":{animation:"".concat(j)}}}},".block-contributors":{".contributors-list":{fontSize:"1.25em",fontWeight:"bold"}},".mention":{bgColor:"var(--accent-color-100)"},".block-gallery":{mx:"calc(-1 * var(--grid-padding))",my:"calc(-0.25 * var(--grid-padding))",".gallery":{px:"var(--grid-padding)",py:"calc(0.75 * var(--grid-padding))",border:"1px solid",borderColor:"transparent",borderRadius:"var(--box-border-radius)",".add-image":{mb:"calc(0.75 * var(--grid-padding))"},["&.".concat(b.A)]:{border:"1px dashed var(--chakra-colors-trueblue-300) !important",backgroundColor:"var(--chakra-colors-trueblue-50) !important",".gallery-placeholder":{pointerEvents:"none"}}},"&.is-focused, &.is-empty":{".gallery":{backgroundColor:"blackAlpha.50"}},["&.is-focused, &:hover, &[".concat(x.r,"]")]:{".gallery":{borderColor:"var(--grid-outline-color)"},".add-image":{opacity:1}},"&.expandable-node":{"&-selected .gallery":{animation:"".concat(C," 3000ms ease-in-out forwards")},"&-reset .gallery":{animation:"".concat(j)}}},...A(e),".block-gridLayout":{mx:"calc(-1 * var(--grid-padding))",".layout-content":{display:"contents","> div":{display:"contents"}},".grid-cell":{position:"relative",height:"100%",paddingX:"var(--grid-padding)",display:"flex",flexDirection:"column",outlineWidth:"1px",outlineStyle:"none",outlineColor:"var(--grid-outline-color)",".block-gallery":{my:"0"}},["&.is-focused, &:hover, &[".concat(x.r,"]")]:{".is-editable":{".grid-cell":{outlineStyle:"solid"}},".add-column":{opacity:1}}},".node-cardLayoutItem, .node-cardAccentLayoutItem":{position:"relative",display:"flex",flexDirection:"column",justifyContent:"stretch",minWidth:0,minHeight:0,"> [data-node-view-wrapper]":{position:"relative",height:"100%",width:"100%"}},".node-cardNotes":{display:"none"},".block-table":{table:{'[data-node-view-content-inner="table"]':{display:"contents",'[data-node-view-content-inner="tableRow"]':{display:"contents"},td:{verticalAlign:"top",".block-heading [data-placeholder]::before":{display:"none"}}}},td:{minWidth:"3em",paddingX:"1em",position:"relative",".block":{maxWidth:e?"75vw":void 0},"&:not(:first-of-type)":{borderLeft:"1px solid transparent"}},".selectedCell:after":{zIndex:2,position:"absolute",content:'""',left:0,right:0,top:0,bottom:0,backgroundColor:"trueblue.100",pointerEvents:"none",opacity:.4},"&.is-focused, &:hover":{"td:not(:first-of-type)":{borderLeft:"1px solid var(--grid-outline-color)"}}},".tippy-arrow":{borderLeftColor:"red"},".footnote-label":{textDecoration:"underline",textDecorationColor:"var(--link-color)",_hover:{bgColor:"var(--accent-color-100)",color:"gray.800",borderRadius:"sm"}},".footnote":{color:"var(--link-color)",_hover:{_after:{bgColor:"var(--accent-color-100)",color:"gray.800"}}},".node-emoji":{color:"initial"},".block-paragraph":{...(0,_.v0)("default")},".block-heading":{...(0,I.iL)(e).default,".heading":{position:"relative"},'.heading[level="1"]':{...(0,_.v0)("h1")},'.heading[level="2"]':{...(0,_.v0)("h2")},'.heading[level="3"]':{...(0,_.v0)("h3")},'.heading[level="4"]':{...(0,_.v0)("h4")}},".block-title":{...(0,I.iL)(e).default,".title":{position:"relative",...(0,_.v0)("title")}}
20,".node-gridLayout, .node-calloutBox":{".block-heading, .block-title":{...(0,I.iL)(e).compact},".block-paragraph":{...(0,I.YW)(e).compact}},".block-table td":{".block":{...(0,I.YW)(e).tight},".block-heading, .block-title":{...(0,I.iL)(e).tight}},'[data-node-view-content-inner="card"]:not(:has(> .node-cardAccentLayoutItem)) [data-node-view-content-inner="cardLayoutItem"] > .first-block:not(.last-block)':{"&.block-heading, &.block-title":{"&:not(:has(+ .block-heading, + .block-title, + .node-gridLayout))":{mb:(0,I.iL)(e).relaxed.mb}}},'[data-node-view-content-inner="cardLayoutItem"] > .first-block:not(.last-block)':{"&.block-paragraph":{...(0,I.YW)(e).compact,"+ .block-heading, + .block-title":{mt:(0,I.iL)(e).compact.mt}},'&.block-heading:has([level="2"], [level="3"], [level="4"])':{mb:(0,I.iL)(e).compact.mb,"+ .block-heading, + .block-title":{mt:(0,I.iL)(e).compact.mt}}}});var U=n(3561);let H=(0,a.memo)(()=>{let e=(0,d.TZ)();return(0,r.jsx)(i.xB,{styles:t=>{let n={[".".concat(l.pL)]:O(e),[".".concat(U.G)]:m,[".".concat(s.d)]:s.l};if(!n)return;let r=(0,o.iv)(n)(t);return r}})});H.displayName="GlobalCardStyles"},58879:function(e,t,n){"use strict";n.d(t,{BI:function(){return r},cY:function(){return o},iI:function(){return i}});let r={content:"attr(data-placeholder)",position:"absolute",top:0,opacity:.25,pointerEvents:"none",left:0,width:"100%",color:"var(--heading-color)",lineClamp:1,textOverflow:"ellipsis",overflow:"hidden",boxOrient:"vertical",wordBreak:"break-all",height:"100%",whiteSpace:"nowrap"},o={...r,content:"attr(data-multiline-placeholder)",color:"inherit",position:"relative",lineClamp:0,whiteSpace:"normal",wordBreak:"normal"},i=e=>'"'.concat(e,'"')},98284:function(e,t,n){"use strict";n.r(t),n.d(t,{default:function(){return eC}});var r=n(52322),o=n(5632),i=n(2784),a=n(71537),l=n(18153);let s=(0,i.createContext)({sessionId:null}),d=()=>(0,i.useContext)(s);var c=n(55478),u=n(29117),p=n(43679),m=n(28535),h=n(34071),g=n(32899),f=n(39429),b=n(48394),v=n(36474),x=n(77533),w=n(38035),y=n(75768),k=n(62614),C=n(78071),j=n(43297),_=n(42946),E=n(54933),I=n(49929),S=n(94523),P=n(5879),A=n(87254),T=n(97729),D=n.n(T),N=n(43997),R=n(33022),L=n(91994),O=n(56356),U=n(86783),H=n(4878),M=n(47968),F=n(52926),z=n(97590);let G=[{transform:"translateX(0px)"},{transform:"translateX(5px)"},{transform:"translateX(0px)"},{transform:"translateX(-5px)"},{transform:"translateX(0px)"}],B={duration:200},W=[.8,1,1.25,1.5,1.9,2.4];var Y=n(26284),K=n(70065),q=n(64467),V=n(98462),X=n(96255),Z=n(36651),Q=n(78462);let J="meeting-link-copied-toast",$=e=>{var t,n,o,a;let{user:l}=(0,Z.SE)(),s=null==e?void 0:null===(n=e.accessLinks)||void 0===n?void 0:null===(t=n[0])||void 0===t?void 0:t.url,d=!!(null==e?void 0:null===(a=e.accessLinks)||void 0===a?void 0:null===(o=a[0])||void 0===o?void 0:o.permission),c=s?(0,Q.eo)(s,{followOnStart:!0,followingId:null==l?void 0:l.id}):null,{onCopy:u}=(0,Y.V)(c||""),p=(0,K.p)(),m=(0,i.useCallback)(()=>{u(),p.isActive(J)||p({id:J,title:(0,r.jsx)(P.cC,{id:"pQjjYo"}),status:"success",duration:5e3})},[u,p]);return{onCopyMeetingLink:m,showMeetingLinkCopyButton:d&&!!c}},ee=e=>{let t=Math.floor(e/3600).toString().padStart(2,"0"),n=Math.floor(e%3600/60).toString().padStart(2,"0"),r=(e%60).toString().padStart(2,"0");return"".concat(t,":").concat(n,":").concat(r)},et=()=>{let[e,t]=(0,i.useState)(!1),[n,r]=(0,i.useState)(0),o=(0,i.useRef)(null),a=(0,i.useCallback)(()=>{r(0)},[]),l=ee(n);(0,i.useEffect)(()=>(e&&(o.current=setInterval(()=>{r(e=>e>=35999?(t(!1),e):e+1)},1e3)),()=>{o.current&&(clearInterval(o.current),o.current=null)}),[e]);let s=(0,i.useCallback)(()=>{n>=35999||t(!e)},[n,e]);return{isTimerRunning:e,resetTimer:a,currentTime:l,toggleTimer:s,hasTimerStarted:n>0}},en=e=>{let{cardId:t,editor:n,isReadonly:r}=e,o=(0,L.TL)();(0,i.useEffect)(()=>{if(!n)return;let e=(0,X.Bw)(n,t);if((null==e?void 0:e.pos)&&(null==e?void 0:e.node)&&(n.commands.setNodeSelection(e.pos),!(0,V.Qp)(e.node))){if(r){o((0,q.NK)());return}(0,V.Fi)(n,e.pos)}},[t,o,n,r])};var er=n(28316),eo=n(15151),ei=n(32186),ea=n(56253),el=n(46409),es=n(91073),ed=n(791);let ec=(0,i.createContext)({presentingCardPreviewRefMap:{}});function eu(){let e=(0,i.useContext)(ec);return e}var ep=n(17292),em=n(75692);let eh=e=>{let{enabled:t}=e,n=(0,L.CG)(M.uD),r=(0,L.CG)(M.e0),o=null==r?void 0:r.sessionId,a=null==r?void 0:r.id,{sessionId:l}=d(),s=(0,i.useCallback)((e,t)=>{if(!n||!o||!l)return;let{eventKey:r,method:i="keyboard"}=t||{},s={type:"presentModeNavigation",payload:{fromUserId:a,fromSessionId:o,toSessionId:l,...e,eventKe
20y:r,method:i}};n.sendStateless(JSON.stringify(s))},[n,o,a,l]);return(0,i.useEffect)(()=>{if(t)return ep.F7.on("keydown","PRESENTER_VIEW",e=>{let t=e.key;switch(em.vP.has(t)&&e.preventDefault(),t){case"s":return s({action:"toggleSpotlight"},{eventKey:t}),!0;case"l":case"ArrowRight":return s({action:"arrowRight"},{eventKey:t}),!0;case"h":case"ArrowLeft":return s({action:"arrowLeft"},{eventKey:t}),!0;case"j":case"ArrowDown":case"PageDown":return s({action:"arrowDown"},{eventKey:t}),!0;case"k":case"ArrowUp":case"PageUp":return s({action:"arrowUp"},{eventKey:t}),!0;case"r":return s({action:"restart"},{eventKey:t}),!0;case"Enter":return s({action:"toggleExpanded"},{eventKey:t}),!0;case"Escape":return s({action:"cancelCurrentAction"},{eventKey:t}),!0;default:return!1}})},[t,s]),{sendMessage:s}},eg=e=>{let[t,n]=(0,i.useState)("start"),r=(0,i.useRef)(null);(0,i.useEffect)(()=>{let t=r.current;if(!t)return;let n=t.children[e];if(!(n instanceof HTMLElement))return;let o=n.offsetWidth/2,i=t.offsetWidth/2,a=n.offsetLeft-i+o;t.scrollTo({left:a,behavior:"smooth"})},[e]);let o=(0,i.useCallback)(()=>{let e=r.current;e&&(e&&0===e.scrollLeft?n("start"):e.scrollLeft>=e.scrollWidth-e.clientWidth?n("end"):n("middle"))},[n]);return{scrollContainerRef:r,scrollPos:t,handleScroll:o}},ef=Math.floor(190/1.618),eb=e=>{let{cardId:t}=e,{presentingCardPreviewRefMap:n}=eu(),o=(0,L.CG)(M.Pu),i=(0,eo.J)(o,!1);return(0,r.jsx)(w.k,{className:"presenter-view-nav-item-wrapper",sx:ei.n,css:{"--editor-width":"".concat(190,"px"),"--editor-font-size":"calc(var(--editor-width) / ".concat(ea.DB,")"),"--thumbnail-min-height":"".concat(ef,"px")},justifyContent:"center",overflow:"hidden",pointerEvents:"none",bg:"gray.100",maxH:"".concat(ef,"px"),w:"var(--editor-width)",userSelect:"none",children:(0,r.jsx)("div",{className:"ProseMirror",children:(0,r.jsx)(w.k,{className:"doc-content-wrapper",direction:"column",align:"center",sx:i,children:(0,r.jsx)("div",{style:{width:"100%"},ref:e=>{e&&(n[t]=e)}})})})})},ev=e=>{let{renderers:t}=e,{presentingCardPreviewRefMap:n}=eu();return(0,r.jsx)(r.Fragment,{children:Object.entries(t).map(e=>{let[t,r]=e,o=r.props.node;if("document"===o.type.name)return null;let i=(0,es.KH)(o)?n[o.attrs.id]:null;return er.createPortal(r.reactElement,i||r.element,t)})})},ex=(0,i.memo)(e=>{let{cardId:t,editor:n,isEditing:o}=e,a=(0,i.useRef)(null),l=(0,i.useRef)(null),s=(0,L.CG)(M.Pu),{content:d}=(0,ed.i)(n),c=null==d?void 0:d.content,p=(null==c?void 0:c[0].content)||[],h=p.findIndex(e=>{var n;return(null===(n=e.attrs)||void 0===n?void 0:n.id)===t}),g=(0,L.CG)(M.pN),f=g.findIndex(e=>e===t),{scrollContainerRef:b,scrollPos:v,handleScroll:y}=eg(h),{sendMessage:C}=eh({enabled:!o}),j=(0,i.useRef)({presentingCardPreviewRefMap:{}});return(0,r.jsx)(ec.Provider,{value:j.current,children:(0,r.jsxs)(u.U,{h:"".concat(ef,"px"),position:"relative",children:[(0,r.jsx)(el.Y,{}),(0,r.jsx)(S.kH,{label:"Previous card",children:(0,r.jsx)(k.z,{ref:a,w:14,size:"lg",h:"100%",onClick:()=>{if(h>0){let e=g[f-1];e&&C({action:"arrowLeft"},{method:"buttonClick"})}else a.current&&a.current.animate(G,B)},children:(0,r.jsx)(I.G,{icon:_.acZ,size:"sm"})})}),(0,r.jsx)(w.k,{position:"absolute",top:0,left:14,bottom:0,w:5,bgImage:"linear-gradient(90deg, rgba(255,255,255,1) 50%, rgba(255,255,255,0) 100%)",pointerEvents:"none",transitionProperty:"all",transitionDuration:"normal",zIndex:1,opacity:"start"!==v?1:0}),(0,r.jsx)(w.k,{position:"absolute",top:0,right:14,bottom:0,w:5,bgImage:"linear-gradient(-90deg, rgba(255,255,255,1) 50%, rgba(255,255,255,0) 100%)",pointerEvents:"none",transitionProperty:"all",transitionDuration:"normal",zIndex:1,opacity:"end"!==v?1:0}),(0,r.jsx)(m.xu,{w:"0",children:(0,r.jsx)(ei.m,{theme:s,content:d,isThumbnail:!0,portalComponent:ev})}),(0,r.jsx)(w.k,{overflowX:"scroll",sx:{"::-webkit-scrollbar":{display:"none"}},flex:1,ref:b,onScroll:y,pos:"relative",className:"navigation-scrolling-container",children:p.map((e,n)=>{var o,i;let a=null===(o=e.attrs)||void 0===o?void 0:o.id,l=a===t;return(0,r.jsxs)(m.xu,{mr:n===p.length-1?0:2,height:"".concat(ef,"px"),borderWidth:"2px",onClick:()=>{a&&C({action:"goToCard",cardId:a},{method:"buttonClick"})},minW:"".concat(190,"px"),borderRadius:"md",borderColor:l?"trueblue.400":"gray.200",transitionProperty:"common",transitionDuration:"normal",_hover:{cursor:"pointer",borderColor:l?"trueblue.400":"gray.400"},pos:"relative",overflow:"hidden",children:[a&&(0,r.jsx)(eb,{cardId:a}),(0,r.jsx)(w.k,{position:"absolute",bg:"white",boxSize:"5",borderRadius:"md",bottom:1,left:1,justify:"center",align:"center",borderWidth:"1px",shadow:"sm",userSelect:"none",children:(0,r.jsx)(x.x,{fontSize:"12px",fontWeight:"bold",children:n+1})})]},null==e?void 0:null===(i=e.attrs)||void 0===i?void 0:i.id)})}),(0,r.jsx)(S.kH,{label:"Next card",children:(0,r.jsx)(k.z,{ref:l,w:14,size:"lg",h:"100%",onClick:()=>
20{if(h<p.length-1){let e=g[f+1];e&&C({action:"arrowRight"},{method:"buttonClick"})}else l.current&&l.current.animate(G,B)},children:(0,r.jsx)(I.G,{icon:_.eFW,size:"sm"})})})]})})}),ew=(0,i.memo)(e=>{let{doc:t}=e,{isOpen:n,onToggle:o,onClose:i}=(0,c.q)(),{isTimerRunning:a,resetTimer:l,currentTime:s,toggleTimer:d,hasTimerStarted:w}=et(),{onCopyMeetingLink:y,showMeetingLinkCopyButton:k}=$(t);return(0,r.jsxs)(u.U,{children:[(0,r.jsxs)(p.J,{returnFocusOnClose:!1,isOpen:n,onClose:i,closeOnBlur:!0,children:[(0,r.jsx)(S.kH,{label:(0,r.jsx)(P.cC,{id:"ICJTpm"}),placement:"right",children:(0,r.jsx)(m.xu,{children:(0,r.jsx)(h.x,{children:(0,r.jsx)(g.h,{"aria-label":A.ag._({id:"tuJCjP"}),pointerEvents:"auto",size:"sm",variant:"ghost",icon:(0,r.jsx)(I.G,{icon:_.UFh}),onClick:o})})})}),(0,r.jsx)(f.y,{width:"auto",outline:"0",shadow:"lg",ml:2,_focus:{outline:"none"},children:(0,r.jsx)(b.b,{children:(0,r.jsx)(R.C,{onClose:i,showExitPresentMode:!1})})})]}),(0,r.jsx)(v.L,{}),(0,r.jsxs)(u.U,{children:[(0,r.jsx)(S.kH,{label:(0,r.jsx)(P.cC,{id:"4EfHvn"}),children:(0,r.jsx)(g.h,{"aria-label":A.ag._({id:"4EfHvn"}),size:"sm",variant:"ghost",isDisabled:!w,icon:(0,r.jsx)(I.G,{icon:_.UO1}),onClick:l})}),(0,r.jsx)(x.x,{textAlign:"center",w:"5rem",fontSize:"0.9rem",css:{fontVariantNumeric:"tabular-nums"},children:s}),(0,r.jsx)(S.kH,{label:a?(0,r.jsx)(P.cC,{id:"4oudPb"}):w?(0,r.jsx)(P.cC,{id:"F6mSJG"}):(0,r.jsx)(P.cC,{id:"UBj8RW"}),children:(0,r.jsx)(g.h,{size:"sm",variant:"ghost","aria-label":A.ag._({id:"4oudPb"}),icon:a?(0,r.jsx)(I.G,{icon:E.XQY}):(0,r.jsx)(I.G,{icon:E.zc}),onClick:d})})]}),(0,r.jsx)(v.L,{}),k&&(0,r.jsx)(S.kH,{label:(0,r.jsx)(P.cC,{id:"bDH6DG"}),placement:"left",children:(0,r.jsx)(g.h,{"aria-label":A.ag._({id:"bDH6DG"}),size:"sm",variant:"ghost",icon:(0,r.jsx)(I.G,{icon:_.ASo}),onClick:y})})]})});ew.displayName="PresentViewHeader";let ey=(0,i.memo)(e=>{let{isEditing:t,setIsEditing:n}=e,[o,a]=(0,i.useState)(1),l=(0,H.Br)("edit");return(0,r.jsxs)(w.k,{flex:1,direction:"column",position:"relative",onDoubleClick:()=>{t||n(!0)},overflowY:"auto",children:[(0,r.jsx)(U.z,{isEditable:t,canShowEditHint:!t&&l,notesSx:{".block":{fontSize:"calc(1rem * ".concat(W[o]||1,")")}}}),(0,r.jsxs)(w.k,{flex:1,position:"absolute",bottom:"1px",right:"1px",left:"1px",borderBottomRadius:"md",p:2,px:4,pt:12,bgImage:t?"linear-gradient(0deg, rgba(255,255,255,1) 50%, rgba(255,255,255,0) 100%)":"none",transitionProperty:"all",transitionDuration:"normal",pointerEvents:"none",children:[(0,r.jsxs)(y.h,{left:2,isAttached:!0,size:"sm",variant:"plain",zIndex:1,pointerEvents:"auto",onDoubleClick:e=>{e.stopPropagation()},children:[(0,r.jsx)(S.kH,{label:(0,r.jsx)(P.cC,{id:"+3R1LR"}),placement:"top",children:(0,r.jsx)(g.h,{"aria-label":A.ag._({id:"+3R1LR"}),isDisabled:0===o,icon:(0,r.jsx)(I.G,{icon:_.Kl4,size:"sm"}),shadow:"none",onClick:()=>{a(Math.max(o-1,0))}})}),(0,r.jsx)(S.kH,{label:(0,r.jsx)(P.cC,{id:"xR1+5L"}),placement:"top",children:(0,r.jsx)(k.z,{"aria-label":A.ag._({id:"xR1+5L"}),borderLeft:"none",borderRight:"none",shadow:"none",onClick:()=>{a(1)},children:(0,r.jsx)(m.xu,{children:(0,r.jsx)(I.G,{icon:_.nUG,size:"sm"})})})}),(0,r.jsx)(S.kH,{label:(0,r.jsx)(P.cC,{id:"Z4p2Vv"}),placement:"top",children:(0,r.jsx)(g.h,{"aria-label":A.ag._({id:"Z4p2Vv"}),isDisabled:o===W.length-1,icon:(0,r.jsx)(I.G,{icon:_.r8p,size:"sm"}),shadow:"none",onClick:()=>{a(Math.min(o+1,W.length-1))}})})]}),(0,r.jsx)(v.L,{}),(0,r.jsx)(C.p,{in:t,unmountOnExit:!0,children:(0,r.jsxs)(u.U,{pointerEvents:"auto",children:[(0,r.jsx)(x.x,{fontSize:"sm",children:"You're editing this note."}),(0,r.jsx)(k.z,{variant:"solid",size:"sm",onClick:()=>{n(!1)},children:"Done"})]})})]})]})});ey.displayName="CardNotesEditorPanel";let ek=(0,F.eT)(()=>{let[e,t]=(0,i.useState)(!1),n=(0,N.I0)();(0,i.useEffect)(()=>{n((0,M.ty)({isPresenterViewEditor:!0}))},[n]);let{docId:o,setCollaborativeEditorInstance:a,editor:l}=(0,F._i)(),s=(0,L.CG)(z.yx),{sessionId:c}=d(),u=(0,L.CG)((0,M.Nf)(c)),p=(0,H.Br)("edit");en({cardId:u,editor:l,isReadonly:!p});let h=(0,i.useCallback)(e=>{p&&t(e)},[p]);return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)(j.K,{minH:"100vh",maxH:"100vh",p:2,direction:"column",bg:"white",children:[(0,r.jsx)(D(),{children:(0,r.jsxs)("title",{children:["Presenter view - ",(null==s?void 0:s.title)||"Untitled"," - Gamma"]})}),(0,r.jsx)(ew,{doc:s}),(0,r.jsx)(ey,{isEditing:e,setIsEditing:h}),(0,r.jsx)(ex,{cardId:u,editor:l,isEditing:e})]}),(0,r.jsx)(m.xu,{display:"none",children:(0,r.jsx)(O.Ge,{doc:s,docId:o,readOnly:!0,onCreate:a,scrollingParentSelector:"body"})})]})});var eC=(0,a.z)(()=>{let[e,t]=(0,i.useState)({sessionId:null}),{query:n}=(0,o.useRouter)(),a=n.sessionId;return(0,i.useEffect)(()=>{null===e.sessionId&&"string"==typeof a&&t({sessionId:a})},[a,e]),(0,l.j)({queryKey:"sessionId"}),(0,r.jsx)(s.Provider,{value:e,children:(0,r.jsx)(ek,{})})})},52926:function(e,t,n){"use strict";n.d(t,{_i:function(){return A._},eT:function(){return J}});var r=n(52322),o=n(70065),i=n(56920),a=n(5879),l=n(5632),s=n(2784),d=n(93202),c=n(18724),u=n(18469),p=n(91994),m=n(36651),h=n(19585),g=n(34919);let f=e=>{let t=(0,p.TL)(),{currentWorkspace:n}=(0,m.SE)();(0,s.useEffect)(()=>
20{if(e)return h.VH.updateWorkspaceInLdContext(e).then(()=>{t((0,g.vH)({isDocWorkspaceSet:!0}))}),()=>{h.VH.updateWorkspaceInLdContext(n).then(()=>{t((0,g.vH)({isDocWorkspaceSet:!1}))})}},[n,t,e])};var b=n(34881),v=n(73235),x=n(57981);function w(){let e=(0,v._)(["\n fragment DefaultCardFields on Card {\n id\n archived\n docId\n title\n text\n previewUrl\n createdTime\n updatedTime\n }\n"]);return w=function(){return e},e}function y(){let e=(0,v._)(["\n mutation CreateCard($id: ID!, $docId: ID!) {\n createCard(id: $id, docId: $docId) {\n id\n }\n }\n"]);return y=function(){return e},e}function k(){let e=(0,v._)(["\n ","\n query GetCard($id: ID!, $docId: ID!) {\n card(id: $id, docId: $docId) {\n ...DefaultCardFields\n }\n }\n"]);return k=function(){return e},e}function C(){let e=(0,v._)(["\n ","\n query GetCards($docId: ID!) {\n docCards(docId: $docId, archived: false) {\n ...DefaultCardFields\n }\n }\n"]);return C=function(){return e},e}function j(){let e=(0,v._)(["\n ","\n subscription SubscribeToCards($docId: ID!) {\n docCards(docId: $docId) {\n ...DefaultCardFields\n }\n }\n"]);return j=function(){return e},e}let _=(0,x.Ps)(w());(0,x.Ps)(y()),(0,x.Ps)(k(),_),(0,x.Ps)(C(),_);let E=(0,x.Ps)(j(),_);var I=n(78462),S=n(56943),P=n(97590),A=n(12825),T=n(55478),D=n(41774),N=n(92850),R=n(26468),L=n(22226),O=n(54326),U=n(2338),H=n(97217),M=n(43297),F=n(77533),z=n(50250),G=n(75768),B=n(62614),W=n(80498);let Y=e=>{var t;let n=(null===(t=(0,p.CG)((0,D.oH)(e||"")))||void 0===t?void 0:t.status)==="running",r=(0,s.useRef)(n);r.current=n;let[o,i]=(0,s.useState)(()=>new W.B),a=(0,s.useCallback)(()=>{o.resolve()},[o]),{isOpen:l,onOpen:d,onClose:c}=(0,T.q)(),u=(0,s.useCallback)(()=>{if(!r.current)return Promise.resolve();let e=new W.B;return i(e),d(),e.promise},[d]);return{confirmNavigationFn:u,confirmNavigationModalProps:{isOpen:l,onClose:c,onConfirm:a}}},K=e=>{let{isOpen:t,onClose:n,onConfirm:o}=e;return(0,r.jsxs)(N.u_,{onClose:n,isOpen:t,isCentered:!0,children:[(0,r.jsx)(R.Z,{}),(0,r.jsxs)(L.h,{children:[(0,r.jsx)(O.x,{children:(0,r.jsx)(a.cC,{id:"YeK6T+"})}),(0,r.jsx)(U.o,{}),(0,r.jsx)(H.f,{children:(0,r.jsxs)(M.K,{spacing:4,children:[(0,r.jsx)(F.x,{fontWeight:"bold",children:(0,r.jsx)(a.cC,{id:"Wr6Y7m"})}),(0,r.jsx)(F.x,{children:(0,r.jsx)(a.cC,{id:"n0Fn6S"})})]})}),(0,r.jsx)(z.m,{children:(0,r.jsxs)(G.h,{children:[(0,r.jsx)(B.z,{variant:"ghost",onClick:n,children:(0,r.jsx)(a.cC,{id:"dEgA5A"})}),(0,r.jsx)(B.z,{variant:"ghost",color:"red.600",onClick:o,children:(0,r.jsx)(a.cC,{id:"QxM8i/"})})]})})]})]})};var q=n(76332),V=n(85326),X=n(31181);let Z=e=>{var t;let{doc:n}=e,r=null==n?void 0:n.id,o=null==n?void 0:null===(t=n.site)||void 0===t?void 0:t.id,i=(0,p.TL)(),a=(0,V.O1)(),l=!!(!r||!o||!a),{data:d}=(0,q.ZUZ)({variables:{id:o},returnPartialData:!0,nextFetchPolicy:"cache-and-network",skip:l}),c=null==d?void 0:d.site;(0,s.useEffect)(()=>{c&&r&&a&&(0,X.zs)(i)({site:c,docId:r})},[r,i,c,a])},Q=e=>{let{children:t}=e,n=(0,o.p)(),h=(0,m.we)(),g=(0,p.CG)(P.XV),{user:v,userStatus:x}=(0,m.SE)(),w=(0,s.useRef)(null),y=(0,p.TL)(),{push:k,replace:C}=(0,l.useRouter)(),j=(0,p.CG)(P.yx),[_,T,D]=(0,I.NO)(),N=T&&T.match(I.sg),R=N?N[0]:null,{confirmNavigationFn:L,confirmNavigationModalProps:O}
20=Y(R),[U,H]=(0,s.useState)({isUnauthorized:void 0,setCollaborativeEditorInstance:e=>{w.current=e,H(t=>({...t,editor:e}))},getCollaborativeEditorInstance:()=>w.current,confirmNavigation:L,editor:void 0});(0,c.ts)(j),f(null==j?void 0:j.organization);let[M,{data:F,loading:z,called:G,subscribeToMore:B}]=(0,d.WMx)({variables:{id:R},returnPartialData:!0,nextFetchPolicy:"cache-only"}),W=(0,m.py)("view",null==F?void 0:F.doc),q=(0,m.Is)("edit",null==F?void 0:F.doc);Z({doc:null==F?void 0:F.doc}),(0,m.$K)(M),(0,s.useEffect)(()=>{if(B&&U.docId&&G)return B({document:S.dU,variables:{id:U.docId},updateQuery:(e,t)=>{let{subscriptionData:n}=t;return n.data&&n.data.doc&&e.doc?{doc:{...e.doc,...n.data.doc,__typename:"Doc"}}:e}})},[U.docId,B,G]);let[V,{data:X,called:Q,subscribeToMore:J}]=(0,d.WBF)({variables:{docId:R},returnPartialData:!0,nextFetchPolicy:"cache-only"});return((0,u.p)(null==X?void 0:X.docCards,U.editor),(0,s.useEffect)(()=>{if(J&&U.docId&&Q)return J({document:E,variables:{docId:U.docId},updateQuery:(e,t)=>{let{subscriptionData:n}=t;return n.data&&n.data.docCards?n.data:e}})},[U.docId,J,Q]),(0,s.useEffect)(()=>{if(U.docId!==R&&T){if(!R){n({id:"invalid_doc_id_error",title:(0,r.jsx)(a.cC,{id:"742lf1"}),description:"",status:"error",position:"top",isClosable:!1,duration:null});return}M(),V(),H(e=>({...e,docId:R}))}},[U.docId,T,R,M,V,y,n]),(0,s.useEffect)(()=>{if("loading"!==x&&G&&!z&&T){if(!F||!F.doc||!1===W){"loggedOut"===x&&k("/signin?redirect_to=".concat(encodeURIComponent(window.location.href))),H(e=>({...e,isUnauthorized:!0}));return}if(F&&null===F.doc.currentSnapshotId&&q){H(e=>({...e,isUnauthorized:!0}));return}if(!g&&F.doc.archived){C("/");return}H(e=>!1===e.isUnauthorized?e:{...e,isUnauthorized:!1}),y((0,P.pl)({doc:F.doc}))}},[h,W,q,F,z,T,G,g,x,k,y,C,v]),(0,s.useEffect)(()=>()=>{y((0,P.mc)())},[y]),(0,s.useEffect)(()=>{if(!j||!R)return;let e="".concat(j.title?"".concat((0,i.lV)(j.title),"-"):"").concat(R);T!==e&&(0,b.lO)({pathname:"".concat(_,"/").concat(e).concat(D||""),emitChange:!1})},[j,R,T,_,D]),U.docId)?(0,r.jsxs)(A.r.Provider,{value:U,children:[t,(0,r.jsx)(K,{...O})]}):(0,r.jsx)(r.Fragment,{})};function J(e){return(0,s.memo)(t=>(0,r.jsx)(Q,{children:(0,r.jsx)(e,{...t})}))}},75692:function(e,t,n){"use strict";n.d(t,{nP:function(){return S},tE:function(){return j},vP:function(){return C}});var r=n(52322),o=n(77533),i=n(332),a=n(28535),l=n(74409),s=n(69251),d=n(30523),c=n(19783),u=n(32899),p=n(54933),m=n(49929),h=n(5879),g=n(87254),f=n(87202),b=n(2784),v=n(17292),x=n(87827),w=n(91994),y=n(58184);let k=(0,f.ZP)("mod+Escape"),C=new Set(["h","j","k","l","s","PageUp","PageDown","ArrowRight","ArrowLeft","ArrowDown","ArrowUp","Enter","Escape"]),j=e=>{let{enabled:t,setActiveKey:n}=e,r=(0,w.CG)(x.C),{handlePresentNavigationEvent:o,spotlightingByBlock:i}=(0,y._)();return(0,b.useEffect)(function(){if(t)return v.F7.on("keydown","NAVIGATION_CONTROLS",e=>{var t,i;let a=e.target;if((null==a?void 0:null===(t=a.closest)||void 0===t?void 0:t.call(a,"[data-gamma-child-tiptap-editor]"))||(null==a?void 0:null===(i=a.closest)||void 0===i?void 0:i.call(a,"input"))||e.metaKey||r)return!1;let l=e.key;switch(C.has(l)&&("s"!==l&&(n(e.key),setTimeout(()=>{n(null)},100)),e.preventDefault()),l){case"s":return o({eventType:"toggleSpotlight",eventKey:l});case"l":case"ArrowRight":return o({eventType:"arrowRight",eventKey:l});case"h":case"ArrowLeft":return o({eventType:"arrowLeft",eventKey:l});case"j":case"ArrowDown":case"PageDown":return o({eventType:"arrowDown",eventKey:l});case"k":case"ArrowUp":case"PageUp":return o({eventType:"arrowUp",eventKey:l});case"r":return o({eventType:"restart",eventKey:l});case"Escape":if(k(e))return!1;return o({eventType:"cancelCurrentAction",eventKey:l});case"Enter":return o({eventType:"toggleExpanded",eventKey:l});default:return!1}})},[t,o,r,n]),i},_=e=>{let t=new KeyboardEvent("keydown",{key:e});n.g.dispatchEvent(t)},E={ArrowUp:{icon:p.FPD,label:(0,r.jsx)(h.cC,{id:"VbggDE"}),ariaLabel:()=>g.ag._({id:"VbggDE"}),shortcuts:["â","K"],key:"ArrowUp",onClick:()=>{_("ArrowUp")},gridPos:[1,2]},ArrowLeft:{icon:p.acZ,label:(0,r.jsx)(h.cC,{id:"4jciC3"}),ariaLabel:()=>
20g.ag._({id:"4jciC3"}),shortcuts:["â","H"],key:"ArrowLeft",onClick:()=>{_("ArrowLeft")},gridPos:[2,1]},ArrowDown:{icon:p.r5q,label:(0,r.jsx)(h.cC,{id:"e3GOIZ"}),ariaLabel:()=>g.ag._({id:"e3GOIZ"}),shortcuts:["â","J"],key:"ArrowDown",onClick:()=>{_("ArrowDown")},gridPos:[2,2]},ArrowRight:{icon:p.eFW,label:(0,r.jsx)(h.cC,{id:"ZjQRVw"}),ariaLabel:()=>g.ag._({id:"ZjQRVw"}),shortcuts:["â","L"],key:"ArrowRight",onClick:()=>{_("ArrowRight")},gridPos:[2,3]},Spotlight:{icon:p.GTX,label:(0,r.jsx)(h.cC,{id:"Xon9jp"}),ariaLabel:()=>g.ag._({id:"Xon9jp"}),shortcuts:["S"],key:"S",onClick:()=>{_("s")},gridPos:[1,3]}},I=e=>{let{shortcuts:t}=e;return(0,r.jsx)(o.x,{as:"span",color:"gray.400",ml:2,children:t.map((e,n)=>(0,r.jsxs)(b.Fragment,{children:[e,n===t.length-1?null:(0,r.jsx)(o.x,{fontSize:"11px",as:"span",color:"gray.500",mx:1,children:"or"})]},e))})},S=e=>{let{activeKey:t,spotlightingByBlock:n}=e;return(0,r.jsx)(i.h,{children:(0,r.jsxs)(a.xu,{position:"absolute",bottom:4,right:6,zIndex:"sticky",children:[(0,r.jsx)(l.X,{children:(0,r.jsx)(h.cC,{id:"wja8aL"})}),(0,r.jsx)(s.r,{gridTemplateColumns:"repeat(3, 1fr)",gridTemplateRows:"repeat(2, 1fr)",children:Object.values(E).map(e=>{let{gridPos:i,icon:a,label:l,ariaLabel:s,shortcuts:p,key:h,onClick:g}=e,f=t===h;return(0,r.jsx)(d.P,{gridColumn:i[1],gridRow:i[0],children:(0,r.jsx)(c.u,{hasArrow:!0,placement:"top",label:(0,r.jsxs)(o.x,{whiteSpace:"nowrap",children:[l,(0,r.jsx)(I,{shortcuts:p})]}),children:(0,r.jsx)(u.h,{m:1,shadow:"base",size:"md",variant:"S"==h&&n?"solid":"plain",isActive:f||"S"===h&&n,onClick:g,onMouseDown:e=>e.preventDefault(),"aria-label":s(),icon:(0,r.jsx)(m.G,{icon:a})})})},h)})})]})})}},58184:function(e,t,n){"use strict";n.d(t,{_:function(){return g}});var r=n(2784),o=n(34922),i=n(91994),a=n(24781),l=n(11050),s=n(97857),d=n(61750),c=n(82400),u=n(54999),p=n(47968),m=n(12825);let h=function(e,t){let n=!(arguments.length>2)||void 0===arguments[2]||arguments[2],r=(0,a.cC)("editor"),o=r.scroller;if(!o)return;e.commands.turnOffSpotlight();let i=o.scrollHeight-o.offsetHeight;if("down"===t){let t=r.isAtBottom(90),a=t&&n&&e.commands.spotlightNextCard(!1,"top");if(!a){let e=o.scrollTop+.5*o.offsetHeight;e>i-150&&(e=i),r.scrollTo({top:e})}}else{let t=r.isAtTop(90),i=t&&n&&e.commands.spotlightNextCard(!0,"bottom");if(!i){let e=o.scrollTop-.5*o.offsetHeight;e<150&&(e=0),r.scrollTo({top:e})}}},g=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:l.R0.MAIN_PRESENT_VIEW,{editor:t}=(0,m._)(),n=(0,l.z$)(),{enabled:a}=(0,d.gZ)(t),g=(0,i.qr)(),f=(0,r.useCallback)(r=>{let{eventType:i,eventKey:a,method:d="keyboard",payload:m={}}=r;if(!t)return!1;let f=g.getState(),b=(0,p.k8)(f),v=null==b?void 0:b.pos,x=!!(t&&b&&(0,c.Jg)(t,b)),w=Object.keys((0,p.X9)(f).tree);switch(i){case"toggleSpotlight":return x?null==t||t.commands.turnOffSpotlight():null==t||t.commands.spotlightNextBlock(),!0;case"goToCard":{let{cardId:e}=m;if(!e)return!1;return t.commands.spotlightCardById(e,x),g.dispatch((0,p.Qx)({attached:!1})),!0}case"arrowRight":return(0,o.p7)(),g.dispatch((0,p.Qx)({attached:!1})),null==n||n.trackDocEvent(l.AA.PRESENT_MODE_NAVIGATED,{direction:l.xQ.CARD_NEXT,method:"keyboard"===d?l.SY.KEYBOARD:l.SY.BUTTON_CLICK,source:e,...void 0!==a&&{key:a}}),t.commands.spotlightNextCard();case"arrowLeft":return(0,o.p7)(),g.dispatch((0,p.Qx)({attached:!1})),null==n||n.trackDocEvent(l.AA.PRESENT_MODE_NAVIGATED,{direction:l.xQ.CARD_PREV,method:"keyboard"===d?l.SY.KEYBOARD:l.SY.BUTTON_CLICK,source:e,...void 0!==a&&{key:a}}),t.commands.spotlightNextCard(!0);case"arrowDown":if((0,o.p7)(),g.dispatch((0,p.Qx)({attached:!1})),!x){let e=(0,s.ei)(t.state.selection);return t.commands.goToNextExpandableNode()||h(t,"down",!e),!0}return null==n||n.trackDocEvent(l.AA.PRESENT_MODE_NAVIGATED,{direction:l.xQ.TELEPROMPTER_DOWN,method:"keyboard"===d?l.SY.KEYBOARD:l.SY.BUTTON_CLICK,source:e,...void 0!==a&&{key:a}}),t.commands.spotlightNextBlock();case"arrowUp":if((0,o.p7)(),g.dispatch((0,p.Qx)({attached:!1})),!x){let e=(0,s.ei)(t.state.selection);return t.commands.goToNextExpandableNode(!0)||h(t,"up",!e),!0}return null==n||n.trackDocEvent(l.AA.PRESENT_MODE_NAVIGATED,{direction:l.xQ.TELEPROMPTER_UP,method:"keyboard"===d?l.SY.KEYBOARD:l.SY.BUTTON_CLICK,source:e,...void 0!==a&&{key:a}}),t.commands.spotlightNextBlock(!0);case"restart":if(w[0])return(0,o.p7)(),t.commands.spotlightCardById(w[0]),g.dispatch((0,p.Qx)({attached:!1})),!0;return!1;case"cancelCurrentAction":{let e=x&&v;if(t.commands.spotlightCollapseNearestExpandableNode(e?v:null))return t.commands.reHighlightExpandableNode(),!0;if(x)return t.commands.turnOffSpotlight(),!0;return g.dispatch((0,p.Qx)({attached:!1})),null==n||n.track(l.AA.CARD_COLLAPSED,{is_present_mode:!0,method:"escape_key"}),t.commands.ascendUpToParentCard(!1)}case"toggleExpanded":{let e=x&&v,n=t.commands.expandOrCollapseExpandableNode(e?v:null);if(n)return!0;
20if(e){let e=t.state.doc.resolve(v),n=e.parent;if(n&&(0,u.AH)(n))return(0,u.xB)(n.attrs.id,!1),t.commands.spotlightNextBlock(!0),!0;return t.commands.spotlightCollapseNearestExpandableNode(v)}return!1}default:return!1}},[n,t,e,g]);return{handlePresentNavigationEvent:f,spotlightingByBlock:a}}},90439:function(e,t,n){"use strict";n.d(t,{Oj:function(){return l},Pv:function(){return a},QX:function(){return i},cx:function(){return o}});var r=n(14274);let o=r.v.GAMMA_PUPPETEER_SERVICE,i=o&&"pptx"===window.format,a=o&&"pdf"===window.format,l=o&&"screenshot"===window.format},7e4:function(e,t,n){"use strict";n.d(t,{X:function(){return i}});var r=n(2784),o=n(18733);function i(e,t){let[n,i]=(0,r.useState)(()=>{try{let n=o.Q.getItem(e);if(null===n)return t;return JSON.parse(n)}catch(e){return console.error("[useSessionStorage.getItem] Error getting sessionStorage item",e),t}}),a=(0,r.useCallback)(t=>{try{o.Q.setItem(e,JSON.stringify(t)),i(t)}catch(e){console.error("[useSessionStorage.setItem] Error setting sessionStorage item",e)}},[e]);return[n,a]}},62376:function(){},6991:function(){},76298:function(){},4466:function(){},43839:function(){},25237:function(e,t,n){e.exports=n(99309)},19783:function(e,t,n){"use strict";n.d(t,{u:function(){return _}});var r={exit:{scale:.85,opacity:0,transition:{opacity:{duration:.15,easings:"easeInOut"},scale:{duration:.2,easings:"easeInOut"}}},enter:{scale:1,opacity:1,transition:{opacity:{easings:"easeOut",duration:.2},scale:{duration:.2,ease:[.175,.885,.4,1.1]}}}},o=n(75800),i=n(70339),a=n(79626),l=n(36502),s=n(32465),d=n(85244),c=n(31053),u=n(2784),p=e=>{var t;return(null==(t=e.current)?void 0:t.ownerDocument)||document},m=e=>{var t,n;return(null==(n=null==(t=e.current)?void 0:t.ownerDocument)?void 0:n.defaultView)||window},h="chakra-ui:close-tooltip",g=n(332),f=n(76801),b=n(68023),v=n(91982),x=n(84586),w=n(91148),y=n(38045),k=n(25925),C=n(52322),j=(0,f.m)(y.E.div),_=(0,b.G)((e,t)=>{var n,b;let y;let _=(0,v.mq)("Tooltip",e),E=(0,x.Lr)(e),I=(0,w.F)(),{children:S,label:P,shouldWrapChildren:A,"aria-label":T,hasArrow:D,bg:N,portalProps:R,background:L,backgroundColor:O,bgColor:U,motionProps:H,...M}=E,F=null!=(b=null!=(n=null!=L?L:O)?n:N)?b:U;if(F){_.bg=F;let e=(0,x.K1)(I,"colors",F);_[a.Dq.arrowBg.var]=e}let z=function(e={}){let{openDelay:t=0,closeDelay:n=0,closeOnClick:r=!0,closeOnMouseDown:g,closeOnScroll:f,closeOnPointerDown:b=g,closeOnEsc:v=!0,onOpen:x,onClose:w,placement:y,id:k,isOpen:C,defaultIsOpen:j,arrowSize:_=10,arrowShadowColor:E,arrowPadding:I,modifiers:S,isDisabled:P,gutter:A,offset:T,direction:D,...N}=e,{isOpen:R,onOpen:L,onClose:O}=(0,l.q)({isOpen:C,defaultIsOpen:j,onOpen:x,onClose:w}),{referenceRef:U,getPopperProps:H,getArrowInnerProps:M,getArrowProps:F}=(0,i.D)({enabled:R,placement:y,arrowPadding:I,modifiers:S,gutter:A,offset:T,direction:D}),z=(0,u.useId)(),G=`tooltip-${null!=k?k:z}`,B=(0,u.useRef)(null),W=(0,u.useRef)(),Y=(0,u.useCallback)(()=>{W.current&&(clearTimeout(W.current),W.current=void 0)},[]),K=(0,u.useRef)(),q=(0,u.useCallback)(()=>{K.current&&(clearTimeout(K.current),K.current=void 0)},[]),V=(0,u.useCallback)(()=>{q(),O()},[O,q]),X=((0,u.useEffect)(()=>{let e=p(B);return e.addEventListener(h,V),()=>e.removeEventListener(h,V)},[V,B]),()=>{let e=p(B),t=m(B);e.dispatchEvent(new t.CustomEvent(h))}),Z=(0,u.useCallback)(()=>{if(!P&&!W.current){R&&X();let e=m(B);W.current=e.setTimeout(L,t)}},[X,P,R,L,t]),Q=(0,u.useCallback)(()=>{Y();let e=m(B);K.current=e.setTimeout(V,n)},[n,V,Y]),J=(0,u.useCallback)(()=>{R&&r&&Q()},[r,Q,R]),$=(0,u.useCallback)(()=>{R&&b&&Q()},[b,Q,R]),ee=(0,u.useCallback)(e=>{R&&"Escape"===e.key&&Q()},[R,Q]);(0,s.O)(()=>p(B),"keydown",v?ee:void 0),(0,s.O)(()=>{if(!f)return null;let e=B.current;if(!e)return null;let t=function e(t){return["html","body","#document"].includes(t.localName)?t.ownerDocument.body:(0,o.Re)(t)&&function(e){let t=e.ownerDocument.defaultView||window,{overflow:n,overflowX:r,overflowY:o}=t.getComputedStyle(e);return/auto|scroll|overlay|hidden/.test(n+o+r)}(t)?t:e("html"===t.localName?t:t.assignedSlot||t.parentElement||t.ownerDocument.documentElement)}(e);return"body"===t.localName?m(B):t},"scroll",()=>{R&&f&&V()},{passive:!0,capture:!0}),(0,u.useEffect)(()=>{P&&(Y(),R&&O())},[P,R,O,Y]),(0,u.useEffect)(()=>()=>{Y(),q()},[Y,q]),(0,s.O)(()=>B.current,"pointerleave",Q);let et=(0,u.useCallback)((e={},t=null)=>{let n={...e,ref:(0,d.lq)(B,t,U),onPointerEnter:(0,c.v0)(e.onPointerEnter,e=>{"touch"!==e.pointerType&&Z()}),onClick:(0,c.v0)(e.onClick,J),onPointerDown:(0,c.v0)(e.onPointerDown,$),onFocus:(0,c.v0)(e.onFocus,Z),onBlur:(0,c.v0)(e.onBlur,Q),"aria-describedby":R?G:void 0};return n},[Z,Q,$,R,G,J,U]),en=(0,u.useCallback)((e={},t=null)=>H({...e,style:{...e.style,[a.Dq.arrowSize.var]:_?`${_}px`:void 0,[a.Dq.arrowShadowColor.var]:E}},t),[H,_,E]),er=(0,u.useCallback)((e={},t=null)=>{let n={...e.style,position:"relative",transformOrigin:a.Dq.transformOrigin.varRef};return{ref:t,...N,...e,id:G,role:"tooltip",style:n}}
20,[N,G]);return{isOpen:R,show:Z,hide:Q,getTriggerProps:et,getTooltipProps:er,getTooltipPositionerProps:en,getArrowProps:F,getArrowInnerProps:M}}({...M,direction:I.direction}),G="string"==typeof S||A;if(G)y=(0,C.jsx)(f.m.span,{display:"inline-block",tabIndex:0,...z.getTriggerProps(),children:S});else{let e=u.Children.only(S);y=(0,u.cloneElement)(e,z.getTriggerProps(e.props,e.ref))}let B=!!T,W=z.getTooltipProps({},t),Y=B?function(e,t=[]){let n=Object.assign({},e);for(let e of t)e in n&&delete n[e];return n}(W,["role","id"]):W,K=function(e,t){let n={};for(let r of t)r in e&&(n[r]=e[r]);return n}(W,["role","id"]);return P?(0,C.jsxs)(C.Fragment,{children:[y,(0,C.jsx)(k.M,{children:z.isOpen&&(0,C.jsx)(g.h,{...R,children:(0,C.jsx)(f.m.div,{...z.getTooltipPositionerProps(),__css:{zIndex:_.zIndex,pointerEvents:"none"},children:(0,C.jsxs)(j,{variants:r,initial:"exit",animate:"enter",exit:"exit",...H,...Y,__css:_,children:[P,B&&(0,C.jsx)(f.m.span,{srOnly:!0,...K,children:T}),D&&(0,C.jsx)(f.m.div,{"data-popper-arrow":!0,className:"chakra-tooltip__arrow-wrapper",children:(0,C.jsx)(f.m.div,{"data-popper-arrow-inner":!0,className:"chakra-tooltip__arrow",__css:{bg:_.bg}})})]})})})})]}):(0,C.jsx)(C.Fragment,{children:S})});_.displayName="Tooltip"}},function(e){e.O(0,[9774,7662,8433,2182,2812,8774,6694,4078,3273,9025,5333,4424,8707,146,3661,3016,2545,9808,5112,3693,931,2808,4328,205,2252,1537,6656,2681,7174,9718,4001,2888,179],function(){return e(e.s=86458)}),_N_E=e.O()}]); 21//# sourceMappingURL=[docId]-372c6c2bff0c2f67.js.map
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.