1"use strict";(self.webpackChunk_overleaf_web=self.webpackChunk_overleaf_web||[]).push([[9851],{20336(e,t,n){var r=n(27395);const{nlpUrl:o,metricsUrl:a,authUrl:i,customerPortalUrl:A,suggestMaxWordsPart:l,overleafAuthDomain:s,bugsnagStage:c,growthbookApiHost:u,growthbookClientKey:m,growthbookDecryptionKey:d,bugsnagApiKey:p,metricsAmplitudeKey:g,dimensionsBadgeApiUrl:f,version:h}=(0,r.A)("ol-writefullEnv")??{},w={VITE_WF_NLP_URL:o,VITE_WF_METRICS_URL:a,VITE_WF_AUTH_URL:i,VITE_WF_CUSTOMER_PORTAL_URL:A,VITE_WF_SUGGEST_MAX_WORDS_PART:l,VITE_OVERLEAF_AUTH_DOMAIN:s,VITE_BUGSNAG_STAGE:c,VITE_GROWTHBOOK_API_HOST:u,VITE_GROWTHBOOK_CLIENT_KEY:m,VITE_GROWTHBOOK_DECRYPTION_KEY:d,VITE_METRICS_AMPLITUDE_KEY:g,VITE_BUGSNAG_API_KEY:p,VITE_DIMENSIONS_BADGE_API_URL:f,VERSION:h,VITE_WF_VERBOSE_LOGGER:!1,VITE_WF_VERBOSE_METRICS:!1,VITE_WF_VERBOSE_STATE:!1,VITE_GROWTHBOOK_DEVELOPMENT_MODE:!1};n.d(t,["A",0,w])},54573(e,t,n){n.d(t,{A:()=>l});var r=n(44273),o=n(66485),a=n(13947),i=n(39439),A=n(90072);function l(e){let{configuration:t,scrollContainer:n,onOpen:l,onClose:s}=e;const c=(0,o.useRef)(null),u=(0,o.useRef)(s),m=a.Ay.use.position(),d=a.Ay.use.isOpen(),p=a.Ay.use.draggableArea(),g=a.Ay.use.resizableArea(),f=a.Ay.use.triggerSelector(),h=(0,a.Ay)(e=>!!e.pinData?.on),w=a.Ay.use.pinData(),x=a.Ay.use.close(),b=a.Ay.use.pin(),v=a.Ay.use.unpin(),B=(0,o.useMemo)(()=>({mainAxis:0,crossAxis:-40}),[]),y=(0,o.useCallback)(e=>{e||x()},[x]),I=(0,o.useCallback)(()=>{if(h)v();else{const{x:e,y:t}=c.current.getBoundingClientRect(),{width:n,height:r}=g.getBoundingClientRect();b(n,r,e+40,t)}},[h,g,b,v]);return(0,o.useEffect)(()=>{u.current=s},[s]),(0,o.useEffect)(()=>{d||u.current()},[d]),m?(0,r.jsx)(i.A,{open:d,setOpen:y,x:w?.position.x??m?.x,y:w?.position.y??m?.y,offsetPx:B,placement:"bottom-start",className:"pointer-events-none",scrollInContainer:n,onScrollInContainerEnd:l,disableFlip:!0,usesPortal:!1,outsidePressExcludedElements:f?[f]:[],draggable:{area:p,enabled:!h},children:(0,r.jsx)("div",{ref:c,children:(0,r.jsx)(A.A,{configuration:t,onPinClick:I})})}):null}},69263(e,t,n){n.d(t,{A:()=>i});var r=n(44273),o=n(41510),a=n(21443);function i(e){let{className:t=""}=e;return(0,r.jsxs)("p",{className:(0,o.$z)(t,"text-xs text-gray-500 dark:text-gray-300 leading-4"),children:[(0,a.A)("language-model.using-this-feature")," ",(0,r.jsx)("a",{href:"https://docs.overleaf.com/integrations-and-add-ons/ai-features/writefull",target:"_blank",rel:"noopener noreferrer",className:(0,o.$z)("underline"),children:(0,a.A)("language-model.learn-more")})]})}},98415(e,t,n){n.d(t,{w:()=>i});var r=n(44273),o=n(41510);const a=n.p+"images/logo-e9a0cfff96366492d8c5.svg";function i(e){let{className:t="",sizePx:n=18}=e;return(0,r.jsx)("img",{src:a,alt:"Writefull logo",className:(0,o.$z)(t),style:{height:n}})}},24599(e,t,n){var r=n(68063),o=n(38555);n.d(t,["F",0,()=>{const e=(0,r.Ay)(e=>e.session?.user.isPremium),t=(0,o.aW)()||(0,o.O$)();return e||t}])},26571(e,t,n){n.d(t,{K:()=>A});var r=n(7310),o=n(83764),a=n.n(o),i=n(44273);function A(e){let{responsive:t,bordered:n,striped:r,children:o}=e;return(0,i.jsx)("div",{className:a()("table-container",{"table-container-bordered":n,"table-responsive":t,"table-striped":r}),children:o})}const l=function(e){let{container:t=!0,responsive:n,bordered:o,striped:a,...l}=e;return t?(0,i.jsx)(A,{responsive:n,bordered:o,children:(0,i.jsx)(r.A,{striped:a,...l})}):(0,i.jsx)(r.A,{...l})};n.d(t,["A",0,l])},31843(e,t,n){n.r(t),n.d(t,{default:()=>Yo});var r=n.cw(function(e,t){var n=[];function r(e){for(var t=-1,r=0;r<n.length;r++)if(n[r].identifier===e){t=r;break}return t}function o(e,t){for(var o={},i=[],A=0;A<e.length;A++){var l=e[A],s=t.base?l[0]+t.base:l[0],c=o[s]||0,u="".concat(s," ").concat(c);o[s]=c+1;var m=r(u),d={css:l[1],media:l[2],sourceMap:l[3],supports:l[4],layer:l[5]};if(-1!==m)n[m].references++,n[m].updater(d);else{var p=a(d,t);t.byIndex=A,n.splice(A,0,{identifier:u,updater:p,references:1})}i.push(u)}return i}function a(e,t){var n=t.domAPI(t);n.update(e);return function(t){if(t){if(t.css===e.css&&t.media===e.media&&t.sourceMap===e.sourceMap&&t.supports===e.supports&&t.layer===e.layer)return;n.update(e=t)}else n.remove()}}e.exports=function(e,t){var a=o(e=e||[],t=t||{});return function(e){e=e||[];for(var i=0;i<a.length;i++){var A=r(a[i]);n[A].references--}for(var l=o(e,t),s=0;s<a.length;s++){var c=r(a[s]);0===n[c].references&&(n[c].updater(),n.splice(c,1))}a=l}}}),o=n.cw(function(e,t){var n={};e.exports=function(e,t){var r=function(e){if(void 0===n[e]){var t=document.querySelector(e);
1if(window.HTMLIFrameElement&&t instanceof window.HTMLIFrameElement)try{t=t.contentDocument.head}catch(e){t=null}n[e]=t}return n[e]}(e);if(!r)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");r.appendChild(t)}}),a=n.cw(function(e,t){e.exports=function(e){var t=document.createElement("style");return e.setAttributes(t,e.attributes),e.insert(t,e.options),t}}),i=n.cw(function(e,t){e.exports=function(e){var t=n.nc;t&&e.setAttribute("nonce",t)}}),A=n.cw(function(e,t){e.exports=function(e){if("undefined"==typeof document)return{update:function(){},remove:function(){}};var t=e.insertStyleElement(e);return{update:function(n){!function(e,t,n){var r="";n.supports&&(r+="@supports (".concat(n.supports,") {")),n.media&&(r+="@media ".concat(n.media," {"));var o=void 0!==n.layer;o&&(r+="@layer".concat(n.layer.length>0?" ".concat(n.layer):""," {")),r+=n.css,o&&(r+="}"),n.media&&(r+="}"),n.supports&&(r+="}");var a=n.sourceMap;a&&"undefined"!=typeof btoa&&(r+="\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(a))))," */")),t.styleTagTransform(r,e,t.options)}(t,e,n)},remove:function(){!function(e){if(null===e.parentNode)return!1;e.parentNode.removeChild(e)}(t)}}}}),l=n.cw(function(e,t){e.exports=function(e,t){if(t.styleSheet)t.styleSheet.cssText=e;else{for(;t.firstChild;)t.removeChild(t.firstChild);t.appendChild(document.createTextNode(e))}}}),s=n(66485),c=n(47980),u=(n(36650),n(15765),n(78245),n(48387)),m=n(37119),d=n(96389),p=n(72910);const g=["writefull-login-complete","writefull-ai-assist-show-paywall"],f={"writefull-login-complete":new Map,"writefull-ai-assist-show-paywall":new Map},h={"writefull-login-complete":e=>{const t=t=>{const{session:n}=t.detail;if(!n?.idToken)return;e({method:n?.method||"unknown",isPremium:n?.user?.isPremium||"unknown",source:n?.user?.source||"unknown",reason:n?.user?.reason||"unknown"})};return document.addEventListener(p.lS.authCompleted,t),{eventName:p.lS.authCompleted,fn:t}},"writefull-ai-assist-show-paywall":e=>{const t=t=>{const{origin:n}=t.detail;e({origin:n})};return document.addEventListener(p.lS.aiAssistShowPaywall,t),{eventName:p.lS.aiAssistShowPaywall,fn:t}}};const w={addEventListener:function(e,t){if(!g.includes(e))throw new Error(`Event ${e} is not available.`);const n=t;if(f[e].has(n))return void console.warn(`Event ${e} already subscribed for callback ${t}`);const{eventName:r,fn:o}=h[e](n);f[e].set(n,{eventName:r,fn:o})},removeEventListener:function(e,t){const n=f[e],r=n.get(t);if(!r)return;const{eventName:o,fn:a}=r;n.delete(t),a&&document.removeEventListener(o,a)},openTableGenerator:function(){(0,m.w)()},openEquationGenerator:function(){(0,u._)()},openFigureGenerator:function(){(0,d.W)()}};var x=n(99889),b=n(44273),v=n(54834),B=n(31147),y=n(85942),I=n(4920),C=n(1190),j=(n(36342),n(8922),n(71124),n(86687)),k=n(26318);const E="Ultimately, geography helps us understand global issues, from climate change to resource management and urban plans, fostering a holistic view of our interconnected plannet.",S={context:E,index:110,length:7,type:"grammar",target:"plans,",replacements:[{score:1,value:"planning,",from:110,to:117,text:"plans,"}],sentence_text:E,sentence_index:0,isRejected:!1,partId:"1234567890abcdef1234567890abcdef12345678",sentencePatches:[]},N={text:E,suggestions:[S],premium:!0,englishVariant:"en_US"};var F=n(23189),_=n(73840),O=n(6321),R=n(43454),P=n(46397),z=n(27474),T=n(57673),M=n(21443),$=n(82150),L=n(56815),D=n(25500),U=n(32387),W=n(36164),q=n(1419);function Q(e){let{show:t,target:n,message:r,onDismiss:o,forcefullyEnabled:a=!1}=e;return(0,s.useEffect)(()=>{t&&(0,q.c)("onboarding","viewed",{source:"suggestion",autoLoginForcefullyEnabled:a})},[t,a]),(0,b.jsxs)(W.Li,{show:t,onHide:o,children:[(0,b.jsx)(W.IK,{children:(0,b.jsx)(W.rA,{children:(0,M.A)("welcome.language-suggestions")})}),(0,b.jsx)(W.$8,{children:r}),(0,b.jsx)(W.E9,{children:(0,b.jsx)(U.A,{variant:"secondary",onClick:o,children:(0,M.A)("welcome.ok")})})]})}var H=n(1895),Y=n(99179),G=n(83764),X=n.n(G);function V(e){let{linkText:t,dismissText:n,linkButtonVariant:r="link",icon:o,className:a,onLinkClick:i,onDismissClick:A,children:l=""}=e;return(0,b.jsxs)("div",{className:X()("suggestion-card__banner",a),children:[o&&(0,b.jsx)(I.p2,{icon:o,size:5}),(0,b.jsx)("span",{children:l}),t&&(0,b.jsx)(U.A,{size:"sm",className:X()("suggestion-card__banner__link","link"===r?"suggestion-card__banner__link--light":""),variant:r,onClick:()=>i?.(),children:t}),A&&(0,b.jsx)("div",{className:"suggestion-card__banner__dismiss",children:n?(0,b.jsx)(U.A,{variant:"link",size:"sm",className:"suggestion-card__banner__link--light",onClick:A,children:n}):(0,b.jsx)(Y.A,{id:"dismiss-banner-message",icon:"close",tooltip:"Dismiss",onClick:A})})]})}var K=n(84160),Z=n(76950);function J(){const{currentDocument:e}=(0,K.Wq)();return e?(0,b.jsx)(V,{icon:(0,b.jsx)(k.A,{type:"info"}
1),linkText:(0,M.A)("suggestion-card.banner.non-english.choose-model"),linkButtonVariant:"secondary",onLinkClick:H.L,dismissText:(0,M.A)("suggestion-card.banner.non-english.disable"),onDismissClick:()=>{(0,Z.$4)()},className:"suggestion-card__non-english-banner",children:(0,M.A)("suggestion-card.banner.non-english.introduction")}):null}function ee(e){let{setFocusBlockedEdit:t,focusBlockedEdit:n,onSuggestionBlock:r,showBlockedSuggestionSignpost:o,interactionDisabled:a}=e;return(0,b.jsx)("div",{onMouseEnter:()=>t(!0),onMouseLeave:()=>t(!1),onFocus:()=>t(!0),onBlur:()=>t(!1),children:(0,b.jsx)(Y.A,{id:"suggestion-card-block",tooltip:o?(0,M.A)("blocked-suggestion-signpost.tooltip"):(0,M.A)("suggestion-card.block-edit"),icon:"block",onClick:r,forceShowTooltip:o||n,disabled:a})})}function te(e){let{forceShowTooltip:t=!1,disabled:n=!1}=e;const r=y.Ay.use.showTrackChanges(),o=y.Ay.use.toggleShowTrackChanges();return(0,b.jsx)(Y.A,{id:"suggestion-card-show-track-changes",tooltip:r?(0,M.A)("suggestion-card.track-changes.show"):(0,M.A)("suggestion-card.track-changes.hide"),icon:"strikethrough_s",variant:r?"secondary":"ghost",size:"sm",onClick:o,disabled:n,forceShowTooltip:t})}function ne(e){let{patch:t,showTrackChanges:n=!1,shiftPressed:r=!1,isSingleSuggestion:o=!1,isRejected:a,className:i="",onClick:A,disabled:l=!1}=e;const{type:c,value:u}=t,m=(0,s.useCallback)(()=>{t?.suggestion&&A&&A(t)},[A,t]),d=(0,s.useCallback)(e=>{" "===e.key&&A&&(A(t),e.preventDefault(),e.stopPropagation())},[A,t]);return(0,b.jsx)("span",{role:"button",tabIndex:A&&!l?0:-1,onKeyDown:t.suggestion&&!l?d:void 0,onClick:t.suggestion&&!l?m:void 0,className:X()("suggestion-card-patch",i,"added"===c&&!a||"removed"===c&&a?"suggestion-card-patch--bold":"","removed"===c&&!a||"added"===c&&a&&n?"suggestion-card-patch--strikethrough":"","removed"!==c||n?"":"suggestion-card-patch--hidden","unchanged"===c?"suggestion-card-patch--cursor-text":"",t.suggestion?"suggestion-card-patch--cursor-pointer":"suggestion-card-patch--cursor-default",o||"removed"!==c&&"added"!==c||a?"":"suggestion-card-patch--cursor-remove",o||"removed"!==c&&"added"!==c||!a?"":"suggestion-card-patch--cursor-keep"),"aria-label":o?r?`Suggestion to remove: ${u}. Press Space to remove.`:`Suggestion to add: ${u}. Press Space to accept.`:void 0,title:o?r?"Click to keep your text":"Click to accept this suggestion":void 0,children:u})}function re(e,t){let{children:n="",height:r="auto",width:o="auto",minWidth:a="auto",maxWidth:i="auto",minHeight:A="auto",maxHeight:l="auto",className:s="",leftActions:c,rightActions:u}=e;return(0,b.jsxs)("div",{ref:t,className:X()("wf-card",s),style:{minWidth:a,maxWidth:i,minHeight:A,maxHeight:l,height:r,width:o},children:[n,(!!c||!!u)&&(0,b.jsxs)("div",{className:"wf-card__actions",children:[(0,b.jsx)("div",{className:"wf-card__actions-left",children:c}),(0,b.jsx)("div",{className:"wf-card__actions-right",children:u})]})]})}const oe=(0,s.forwardRef)(re);var ae=n(35149),ie=n(70515),Ae=n(539),le=n(77227);function se(e){let{handleClose:t}=e;const n=(0,D.ZO)(ie.l),{premiumSuggestionResetDate:r}=(0,x.mi)(),{message:o,code:a}=(0,s.useMemo)(()=>n.getQuotaMessage(),[n]),i=Ae.Ay.use.suggestionClickedQuotaResetDate(),A=Ae.Ay.use.frontEndQuotaRestoreTime(),l=(0,s.useMemo)(()=>r?r?.getTime():i?i.getTime():A,[r,i,A]),[c,u]=(0,s.useState)(!1);(0,s.useEffect)(()=>{(0,q.c)("message",`${a}-suggestion-click`)},[a]);const m=(0,s.useCallback)(()=>{u(!0)},[]),d=(0,s.useCallback)(()=>{(0,ae.Aw)(),t()},[t]),p=(0,s.useCallback)(()=>{(0,ae.LT)(),t()},[t]),g=(0,s.useCallback)(()=>{o.cta?.action?.(),t()},[o.cta,t]);return c?(0,b.jsxs)("div",{className:"suggestion-card__paywall",children:[(0,b.jsx)("div",{className:"suggestion-card__paywall__title",children:(0,M.A)("suggestion-card.hide-suggestions.title")}),(0,b.jsx)("div",{className:"suggestion-card__paywall__body",children:(0,M.A)("suggestion-card.hide-suggestions.question")}),(0,b.jsxs)("div",{className:"suggestion-card__paywall__actions",children:[(0,b.jsx)(U.A,{variant:"secondary",size:"sm",onClick:d,children:(0,M.A)("yes")}),(0,b.jsx)(U.A,{variant:"secondary",size:"sm",onClick:p,children:(0,M.A)("no")})]})]}):(0,b.jsxs)("div",{className:"suggestion-card__paywall",children:[(0,b.jsx)("div",{className:"suggestion-card__paywall__title",children:(0,M.A)("paywall.title.new-plans")}),(0,b.jsx)(le.A,{restoreTime:l,onUpgrade:g,onHide:m})]})}function ce(e){let{cardRef:t,containerRef:n,rejectButtonContainerRef:r,shouldWelcomeUserAutoLoginEnabled:o=!1,shouldWelcomeUser:a=!1,pinned:i=!1,pinnedSize:A,showBlockedSuggestionSignpost:l=!1,isSingleSuggestion:c,suggestionsForPart:u,sentencePatches:m,showTrackChanges:d=!1,showBanners:p=!1,shiftPressed:g=!1,disableInteraction:f=!1,suggestionSelection:h,setDraggable:w,onTogglePin:x,onAcceptAllSuggestions:v,onRejectAllSuggestions:B,onGroupClick:y,onSuggestionClick:I,onSuggestionBlock:C,onAutoLoginEnabledWelcomeAcknowledge:j,getPremium:k=!1}=e;const{currentDocument:E}=(0,K.Wq)(),S=P.Ay.use.model(),{canMakeUseOfGenerativeAIFeatures:N}=(0,T.A)(),F=z.Ay.use.close(),_=R.Ay.use.isEnglish(),W=L.Ay.use.viewed(),q=(0,D.XK)("wfo:back-door-tests:text-to-speech:enable"),[H,G]=(0,s.use
1State)(!1),[V,Z]=(0,s.useState)(!1),re=m?.filter(e=>"unchanged"!==e.type).length??0,ae=m?.filter(e=>"unchanged"!==e.type&&!0!==e.isRejected).length??0,ie=E?.doc_id,Ae=(0,O.Ay)(e=>e[ie??""]?.isEnglish),le="writefull"===S&&(u?.language_code?"en"!==u.language_code:!1===_)&&!Ae&&N,ce=le&&p||f||k,ue=le&&p&&!a&&!o&&!k,me=(0,s.useCallback)(()=>{(0,$.K)("text-to-speech")},[]),de=(0,s.useCallback)(()=>{Z(e=>!e)},[]),pe=(0,s.useRef)(null),ge=le&&p||k?"suggestion-card--blur":"";return(0,b.jsxs)(oe,{className:X()("suggestion-card",a||o||le||k?"":"suggestion-card--padded-top"),ref:t,minWidth:400,maxWidth:1500,minHeight:104,maxHeight:500,width:i&&A?.width?`${A.width}px`:"500px",height:i&&A?.height?`${A.height}px`:void 0,leftActions:(0,b.jsxs)("div",{className:X()("suggestion-card__left-actions",ge),children:[(0,b.jsx)(te,{disabled:ce}),(0,b.jsx)(Y.A,{id:"suggestion-card-pin",tooltip:i?(0,M.A)("suggestion-card.unpin"):(0,M.A)("suggestion-card.pin"),icon:"push_pin",variant:i?"secondary":"ghost",size:"sm",onClick:x,disabled:ce}),(a||o)&&(0,b.jsx)("div",{ref:pe,children:(0,b.jsx)(Y.A,{id:"suggestion-card-info",icon:"info",unfilled:!0,tooltip:(0,M.A)("suggestion-card.show-info"),onClick:de,disabled:ce})}),q&&!W?.["text-to-speech"]&&(0,b.jsx)(Y.A,{id:"suggestion-card-text-to-speech",icon:"text_to_speech",tooltip:(0,M.A)("fake-door-test.text-to-speech.try"),onClick:me,disabled:ce}),(0,b.jsx)("div",{className:"suggestion-card__left-actions__draggable",ref:w,children:"Â "})]}),rightActions:(0,b.jsx)("div",{className:X()("suggestion-card__right-actions",ge),children:(0,b.jsxs)(b.Fragment,{children:[(0,b.jsxs)(U.A,{variant:"secondary",size:"sm",onClick:v,disabled:!c&&0===ae||k,children:[(0,M.A)("accept")," ",c?null:(0,b.jsx)("span",{className:"suggestion-card__actions__counter",children:ae})]}),(0,b.jsx)("div",{ref:r,children:(0,b.jsxs)(U.A,{variant:"ghost",size:"sm",onClick:B,disabled:k,children:[(0,M.A)("reject")," ",c?null:(0,b.jsx)("span",{className:"suggestion-card__actions__counter",children:re})]})}),(0,b.jsx)(ee,{setFocusBlockedEdit:G,focusBlockedEdit:H,onSuggestionBlock:C,showBlockedSuggestionSignpost:l,interactionDisabled:ce})]})}),children:[(a||o)&&!k&&(0,b.jsx)(Q,{show:V,target:pe.current,message:(0,M.A)(o?"welcome.writefull-enabled":"welcome.writefull"),onDismiss:()=>{Z(!1),o&&j(!0)},forcefullyEnabled:o}),ue&&(0,b.jsx)(J,{}),(0,b.jsx)("div",{ref:n,className:X()("suggestion-card__content","suggestion-card__content--padded",ge),tabIndex:ce?-1:0,children:m.map((e,t)=>"group"===e.type?(0,b.jsx)("span",{"data-selected":!0,className:X()("suggestion-card__content__group",(H||l)&&h?.suggestion?.index!==e.suggestion.index?"suggestion-card--blur":""),onClick:e=>y(e,t),onKeyDown:e=>y(e,t),role:"button",tabIndex:c||k?-1:0,"aria-label":e.isRejected?"Click to accept this suggestion":"Click to keep your text",title:e.isRejected?"Click to accept this suggestion":"Click to keep your text",children:e.value.map(t=>(0,b.jsx)(ne,{patch:t,showTrackChanges:d,onClick:c?I:void 0,shiftPressed:g,isSingleSuggestion:c,isRejected:e.isRejected,disabled:k},t.value))},t):(0,b.jsx)(ne,{patch:e,className:X()(H||l?"suggestion-card--blur":"")},t))}),k&&(0,b.jsx)(se,{handleClose:F},h?.suggestion?`${h.suggestion.partId}-${h.suggestion.sentence_index}-${h.suggestion.index}`:void 0)]})}n(18527);const ue=(e,t)=>
1{if(!e||!t)return[];const n=e.text.replace(/\n/g," "),r=t.sentence_text.replace(/\n/g," "),o=e.suggestions.filter(e=>{const n=e.replacements?.length>0;return e.sentence_index===t.sentence_index&&!e.isRejected&&n}),a=[];let i=n.indexOf(r,0);for(;i>=0;)a.push(i),i=n.indexOf(r,i+1);let A=-1;a.forEach(e=>{const n=e+r.length;t.index>=e&&t.index<=n&&(A=e)});const l=[];let s=0;return o.forEach(e=>{const n=e.index-A,a=[],i={...e,partId:t.partId};s<n&&l.push({type:"unchanged",value:r.slice(s,n),suggestion:i}),a.push({type:"removed",value:e.target,suggestion:i}),a.push({type:"added",value:e.replacements[0].value,suggestion:i}),l.push({type:"group",value:a,suggestion:i}),s=n+e.target.length,e===o[o.length-1]&&l.push({type:"unchanged",value:r.slice(s),suggestion:i})}),l};var me=n(26571);function de(){const[e,t]=(0,s.useState)(!1),[n,r]=(0,s.useState)(!1),[o,a]=(0,s.useState)([]),[i,A]=(0,s.useState)(void 0),l=(0,s.useMemo)(()=>0===i?.length&&!n,[i?.length,n]),c=(0,s.useMemo)(()=>0===i?.length?ue(N,S):[],[i?.length]);return(0,s.useEffect)(()=>{(async()=>{t(!0);try{const e=await(0,_.K)();A(e),e.length>0&&r(!0)}catch(e){console.error("Error fetching dictionary data:",e)}finally{t(!1)}})()},[]),(0,b.jsxs)("div",{className:"flex flex-col gap-4 px-5",children:[(0,b.jsx)("p",{className:"text-sm",children:(0,b.jsx)(j.x,{i18nKey:l?"writefull:blocked-language-suggestions-modal.no-suggestions":"writefull:blocked-language-suggestions-modal.description",components:{icon:(0,b.jsx)(I.p2,{icon:(0,b.jsx)(k.A,{type:"block",className:"text-[15px]"}),className:"!inline-flex align-text-top"})}})}),void 0===i||e?(0,b.jsx)("p",{className:"text-center",children:(0,M.A)("loading")}):(0,b.jsx)(b.Fragment,{children:l?(0,b.jsx)(ce,{isSingleSuggestion:!1,sentencePatches:c,suggestionsForPart:N,showBlockedSuggestionSignpost:!0,showTrackChanges:!0,disableInteraction:!0,suggestionSelection:{suggestion:S},setDraggable:()=>{},onSuggestionClick:()=>{},onGroupClick:()=>{},onAcceptAllSuggestions:()=>{},onRejectAllSuggestions:()=>{},onAutoLoginEnabledWelcomeAcknowledge:()=>{},onSuggestionBlock:()=>{},onTogglePin:()=>{}}):(0,b.jsxs)(me.A,{bordered:!0,responsive:!0,striped:!0,children:[i&&i.length>0&&(0,b.jsx)("thead",{children:(0,b.jsxs)("tr",{children:[(0,b.jsx)("th",{scope:"col",className:"col-3",children:(0,M.A)("blocked-language-suggestions-modal.from")}),(0,b.jsx)("th",{scope:"col",className:"col-3",children:(0,M.A)("blocked-language-suggestions-modal.to")}),(0,b.jsx)("th",{scope:"col",className:"col-2",children:"Â "})]})}),(0,b.jsxs)("tbody",{children:[i?.length>0&&i.map(e=>(0,b.jsxs)("tr",{children:[(0,b.jsx)("td",{children:e.from}),(0,b.jsx)("td",{children:e.to}),(0,b.jsx)("td",{className:"text-right",children:(0,b.jsx)(U.A,{onClick:()=>(async e=>{a(t=>[...t,e]);try{await(0,F.w)(e.from,e.to),A(t=>t?.filter(t=>t.from!==e.from||t.to!==e.to))}catch(e){console.error("Error deleting blocked language suggestion:",e)}finally{a(t=>t.filter(t=>t!==e))}})(e),disabled:o.includes(e),variant:"danger",size:"sm",children:(0,M.A)("blocked-language-suggestions-modal.delete")})})]},`${e.from}-${e.to}`)),!l&&0===i?.length&&(0,b.jsx)("tr",{children:(0,b.jsx)("td",{colSpan:3,className:"text-center py-4",children:(0,M.A)("blocked-language-suggestions-modal.empty-state")})})]})]})})]})}function pe(e){let{onOpen:t,onClose:n}=e;const r=C.Ay.use.isOpen(),o=C.Ay.use.closeModal(),a=C.Ay.use.onCloseCallback(),i=(0,s.useRef)(null);return(0,s.useEffect)(()=>{a&&(i.current=a)},[a]),(0,s.useEffect)(()=>{r?t():(n(),i?.current&&setTimeout(()=>{i.current?.(),i.current=null},100))},[r,t,n]),(0,b.jsxs)(W.Li,{show:r,onHide:o,children:[(0,b.jsx)(W.IK,{children:(0,b.jsx)(W.rA,{children:(0,M.A)("blocked-language-suggestions-modal.title")})}),(0,b.jsx)(W.$8,{children:(0,b.jsx)(de,{})})]})}const ge=(0,s.memo)((0,I.jA)(function(e){let{onOpen:t,onClose:n}=e;const r=(0,s.useCallback)(()=>{t("blocked-language-suggestions")},[t]),o=(0,s.useCallback)(()=>{n("blocked-language-suggestions")},[n]);return(0,b.jsx)(v.A,{children:(0,b.jsx)(pe,{onOpen:r,onClose:o})})},{wrapWithId:"writefull-blocked-language-suggestions-modal"}));var fe=n(74463),he=n(54573),we=n(68063),xe=n(38555);function be(){const e=(0,D.rt)(fe.M),t=(0,we.Ay)(e=>!!e.session?.user),n=(0,y.Ay)(e=>e.aiSpaceTriggerDisabled),r=(0,s.useCallback)(()=>{t&&"default"===(0,xe.bP)()&&!n?e.addPlaceholder("Press 'Space' for help writing"):e.removePlaceholder()},[e,t,n]);(0,s.useEffect)(()=>{r();const e=(0,xe.Q9)(()=>{r()});return()=>{e()}},[r])}var ve=n(5134),Be=n(13947);function ye(e){let{onOpen:t,onClose:n}=e;const r=(0,Be.Ay)(e=>e.isOpen&&!!e.position),{configuration:o}=(0,ve.A)({isOpen:r}),a=(0,D.rt)(fe.M);be();const i=(0,s.useCallback)(()=>{t("context-menu")},[t]),A=(0,s.useCallback)(()=>{n("context-menu")},[n]);return(0,b.jsx)(v.A,{children:(0,b.jsx)(he.A,{scrollContainer:a.getScrollC
1ontainer(),configuration:o,onOpen:i,onClose:A})})}const Ie=(0,s.memo)(ye);var Ce=n(44304);const je={"text-to-speech":{shouldOpenSuggestionCard:!0,title:(0,M.A)("fake-door-test.text-to-speech.title"),introduction:(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)("p",{children:(0,M.A)("fake-door-test.text-to-speech.introduction_p1")}),(0,b.jsx)("p",{children:(0,M.A)("fake-door-test.text-to-speech.introduction_p2")})]}),moreInformationIfYes:(0,b.jsx)("p",{children:(0,M.A)("fake-door-test.text-to-speech.more-information-if-yes")}),moreInformationIfNo:(0,b.jsx)("p",{children:(0,M.A)("fake-door-test.text-to-speech.more-information-if-no")}),closing:{title:(0,M.A)("fake-door-test.text-to-speech.closing.title"),body:(0,b.jsx)("p",{children:(0,M.A)("fake-door-test.text-to-speech.closing.body")})}}};var ke=n(75756),Ee=n(41510),Se=n(36083);function Ne(e){let{type:t,onClose:n,children:r=""}=e;const[o,a]=(0,s.useState)(null),[i,A]=(0,s.useState)(""),[l,c]=(0,s.useState)("initial"),u=(0,s.useRef)(null),m=(0,s.useCallback)(()=>(0,Se.me)({level:"info",heading:je[t].closing.title,body:je[t].closing.body,duration:5e3}),[t]),d=(0,s.useCallback)(()=>{c("initial"),n()},[n]),p=(0,s.useCallback)(async e=>{switch(a(e),await(0,ke.z)(t,e),e){case"yes":case"no":c("reason");break;case"do not know":d(),m()}},[m,d,t]),g=(0,s.useCallback)(async()=>{o&&(await(0,Ce.x)(t,o,i),d(),m())},[m,d,i,t,o]);return(0,s.useEffect)(()=>{"reason"===l&&u.current?.focus()},[l]),(0,b.jsxs)("div",{"data-suggestion-card-close-excluded-element":!0,children:[(0,b.jsxs)(I.aF,{onClose:d,isOpen:null!==l,containerClassName:"max-w-[450px]",children:[(0,b.jsx)(I.pf,{className:(0,Ee.$z)("absolute right-0.5 top-0.5 bg-gray-200 hover:text-black"),onClose:d}),(0,b.jsxs)("div",{className:"flex flex-col gap-4 px-5",children:[(0,b.jsx)("h1",{className:"text-xl",children:je[t].title}),(0,b.jsxs)("div",{className:"flex flex-col gap-4",children:["initial"===l&&(0,b.jsxs)(b.Fragment,{children:[je[t].introduction,(0,b.jsxs)("div",{className:"flex justify-center gap-4",children:[(0,b.jsx)(I.$n,{variant:"primary",onClick:()=>p("yes"),children:(0,M.A)("yes")}),(0,b.jsx)(I.$n,{variant:"primary",onClick:()=>p("no"),children:(0,M.A)("no")}),(0,b.jsx)(I.$n,{variant:"primary",onClick:()=>p("do not know"),children:(0,M.A)("do-not-know")})]})]}),"reason"===l&&(0,b.jsxs)(b.Fragment,{children:["yes"===o?je[t].moreInformationIfYes:je[t].moreInformationIfNo,(0,b.jsx)(I.TM,{id:"reason",name:"reason",rows:4,value:i,ref:u,onKeyDown:e=>{e.stopPropagation()},onChange:e=>{A(e.target.value),e.stopPropagation(),e.preventDefault()}}),(0,b.jsx)("div",{className:"flex gap-4 justify-end",children:(0,b.jsx)(I.$n,{variant:"primary",onClick:g,children:(0,M.A)("submit")})})]})]})]})]}),(0,b.jsx)("button",{onClick:()=>c("initial"),children:r})]})}(0,I.jA)(Ne,{wrapWithId:"writefull-fake-door-test-modal"});const Fe=(0,I.jA)(function(){const e=L.Ay.use.showing(),t=L.Ay.use.close(),n=(0,D.XK)("wfo:back-door-tests:text-to-speech:enable"),r=(0,s.useCallback)(()=>{e&&t(e)},[t,e]);return n&&e?(0,b.jsx)(v.A,{children:(0,b.jsx)(Ne,{type:e,onClose:r})}):null},{wrapWithId:"writefull-fake-door-test-modal"});n(96660),n(64219),n(42142);function _e(e){let{file:t,disabled:n=!1}=e;
1const[r,o]=(0,s.useState)(null);return(0,s.useEffect)(()=>{n||fetch(t,{method:"GET"}).then(async e=>{if(!e.ok)throw new Error("Failed to preload asset");const t=await e.blob();o(URL.createObjectURL(t))}).catch(e=>{"AbortError"!==e.name&&console.error(e)})},[n,t]),r}var Oe=n(57197);const Re={"equation-generator":{src:"https://wfo-cdn.writefull.ai/video/Equation-generator.mp4",alt:"Equation generator"},"table-generator":{src:"https://wfo-cdn.writefull.ai/video/Table-generator.mp4",alt:"Table generator"}};const Pe=(0,I.jA)(function(){const e=y.Ay.use.featuresMigratedToOLAdvises(),t=y.Ay.use.setHasSeenFeatureMigratedToOLAdvise(),n=(0,Oe.l)(),r=(0,Oe.P)(),o=_e({file:Re["equation-generator"].src,disabled:!r}),a=_e({file:Re["table-generator"].src,disabled:!n}),i=e=>{t(e),(0,q.c)("generic","feature-migrated-to-ol-advise-seen",{feature:e})},A=(0,s.useMemo)(()=>({"equation-generator":[{order:1,title:"Equation generator has now moved",description:(0,b.jsxs)("div",{className:"flex flex-col gap-2 justify-center items-center",children:["You can generate an Equation using an image or a prompt via the Insert math icon.",o&&(0,b.jsx)("video",{loop:!0,autoPlay:!0,muted:!0,className:"w-full h-full",children:(0,b.jsx)("source",{src:o})})]}),referenceElementDataSelector:'[aria-label="Insert math"]',fallbackReferenceElementDataSelector:".ol-cm-toolbar.toolbar-editor",highlightReferenceElement:!0,placement:"bottom"}],"table-generator":[{order:1,title:"Table generator has now moved",description:(0,b.jsxs)("div",{className:"flex flex-col gap-2 justify-center items-center",children:["You can generate a Table using an image or a prompt via the Insert Table icon.",a&&(0,b.jsx)("video",{loop:!0,autoPlay:!0,muted:!0,className:"w-full h-full",children:(0,b.jsx)("source",{src:a})})]}),referenceElementDataSelector:'[aria-label="Insert table"]',fallbackReferenceElementDataSelector:".ol-cm-toolbar.toolbar-editor",highlightReferenceElement:!0,placement:"bottom"}]}),[o,a]);return(0,b.jsxs)(v.A,{children:[e["table-generator"].show&&(0,b.jsx)(I.L_,{steps:A["table-generator"],withOverlay:!0,onClose:()=>i("table-generator")}),e["equation-generator"].show&&(0,b.jsx)(I.L_,{withOverlay:!0,steps:A["equation-generator"],onClose:()=>i("equation-generator")})]})},{wrapWithId:"writefull-feature-migrated-to-ol-advises",forcedTheme:"light"});n(43080);var ze=n(3298),Te=n(39439);function Me(e){let{tooltip:t,iconType:n,iconSize:r=4,onClick:o}=e;const[a,i]=(0,s.useState)(!1);return(0,b.jsxs)("div",{className:"flex relative items-center justify-center",onMouseEnter:t?()=>{i(!0)}:void 0,onMouseLeave:t?()=>{i(!1)}:void 0,children:[(0,b.jsx)("button",{type:"button",className:(0,Ee.$z)("p-1.5 rounded-full hover:bg-gray-100 dark:hover:bg-slate-700 transition-colors"),onClick:o,onMouseUp:e=>{e.stopPropagation()},"aria-label":t,children:(0,b.jsx)(I.p2,{icon:n,size:r,className:(0,Ee.$z)("text-gold-500 h-4 w-4")})}),a&&t&&(0,b.jsx)("div",{className:(0,Ee.$z)("absolute bottom-full left-1/2 -translate-x-1/2 mb-2 px-3 py-2","bg-gray-800 dark:bg-black text-white text-xs rounded-lg whitespace-nowrap"),children:t})]})}function $e(e){let{options:t,onOptionClick:n}=e;return(0,b.jsx)(I.mc,{className:(0,Ee.$z)("px-1.5 max-w-[200px]"),role:"menu",children:(0,b.jsx)("ul",{className:(0,Ee.$z)("flex flex-col gap-1.5 min-w-[60px]"),children:t.map(e=>(0,b.jsx)("li",{className:(0,Ee.$z)("overflow-hidden px-1.5 rounded text-gray-700 dark:text-gray-200 hover:bg-slate-200 hover:dark:bg-slate-600"),role:"menuitem",children:(0,b.jsx)("button",{type:"button",className:(0,Ee.$z)("w-full truncate text-left"),onClick:()=>n(e.code),children:e.name})},e.code))})})}const Le=(0,s.memo)($e);function De(e){let{subOptions:t,onClick:n,...r}=e;const[o,a]=(0,s.useState)(!1);return(0,b.jsx)(Te.A,{open:o,offsetPx:{crossAxis:-12,mainAxis:8},placement:"bottom",setOpen:a,trigger:(0,b.jsx)(Me,{...r,onClick:()=>a(!o)}),children:o&&(0,b.jsx)(Le,{options:t.map(e=>({code:e.code,name:e.label})),onOptionClick:e=>{a(!1),n(e)}})})}const Ue=(0,s.memo)(De);var We=n(99220),qe=n(83809),Qe=n(25692);function He(e){let{configuration:t,onOpen:n,onClose:r}=e;
1const[o,a]=(0,s.useState)(!1),i=ze.Ay.use.position(),A=ze.Ay.use.placement(),l=y.Ay.use.floatingButtonDisabled(),c=ze.Ay.use.closeModal(),u=y.Ay.use.showFloatingButtonDisabledMessage(),m=null===l,{x:d,y:p,strategy:g,refs:f,context:h}=(0,We.we)({open:o,placement:"top-end",strategy:"fixed",middleware:[(0,qe.cY)({mainAxis:-20})],onOpenChange:a}),w=(0,We.Mk)(h,{delay:{open:1e3},enabled:m,handleClose:(0,We.iB)({requireIntent:!1})}),{getFloatingProps:x}=(0,We.bv)([w]),v=(0,s.useMemo)(()=>({mainAxis:18,crossAxis:-10}),[]),B=(0,s.useCallback)(()=>{a(!1),c()},[c]),I=(0,s.useCallback)(e=>{e||B()},[B]);return(0,s.useEffect)(()=>{i?n():r()},[i,n,r]),i&&t?(0,b.jsx)(Te.A,{open:!!i,setOpen:I,x:i?.x,y:i?.y,offsetPx:v,zIndex:990,placement:A,children:(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)("div",{ref:f.setReference,className:(0,Ee.$z)("flex flex-row items-center gap-2 p-1.5","rounded-full shadow-md bg-white dark:bg-slate-800 border border-gray-100 dark:border-none"),children:t.options.filter(e=>e.some(e=>e.visible)).map((e,t)=>(0,b.jsx)("div",{className:(0,Ee.$z)("flex flex-row items-center gap-0.5"),children:e.filter(e=>e.visible).map(e=>e.subOptions?.length?(0,b.jsx)(Ue,{tooltip:m?void 0:e.tooltip,iconType:e.icon,iconSize:e.iconSize,subOptions:e.subOptions,onClick:t=>((e,t)=>{e.onClick(t),B()})(e,t)},e.tooltip):(0,b.jsx)(Me,{tooltip:m?void 0:e.tooltip,iconType:e.icon,iconSize:e.iconSize,onClick:()=>(e=>{e.onClick(),B()})(e)},e.tooltip))},t))}),o&&m&&(0,b.jsx)("button",{ref:f.setFloating,style:{position:g,top:p??0,left:d??0,zIndex:100},...x(),className:(0,Ee.$z)("absolute right-0 top-0 translate-x-1 -translate-y-2 w-5 h-5","flex items-center justify-center","rounded-full bg-white dark:bg-white text-black dark:text-slate-900 border-2 border-gray-200 dark:border-slate-900","hover:bg-gray-100 dark:hover:bg-gray-100"),"aria-label":(0,M.A)("close"),onClick:()=>{(0,Qe.T)(),u()},children:(0,b.jsx)(k.A,{type:"close"})})]})}):null}var Ye=n(90120);function Ge(e){return void 0!==e.clientX}var Xe=n(1879);const Ve=()=>{const e=y.Ay.use.floatingButtonDisabled();return!1===e||null===e};var Ke=n(24226);function Ze(){const e=(0,D.rt)(fe.M),t=(0,we.Ay)(e=>!!e.session?.user),n=Ve(),r=!t||!n,o=(0,s.useMemo)(()=>(0,Ee.sg)(Ye.t,200),[]);(0,s.useEffect)(()=>{if(r)return()=>{};const t=R.Ay.subscribe(e=>e.selection,(t,n)=>{if(!1!==t?.isEmpty)return void(0,Ke.H)();if(n&&Ge(t)&&Ge(n)&&t.clientX===n.clientX&&t.clientY===n.clientY&&t.isEmpty===n.isEmpty)return;if(n&&!Ge(t)&&!Ge(n)&&t.range.from===n.range.from&&t.range.to===n.range.to&&t.isEmpty===n.isEmpty)return;const r=Ge(t)?((e,t)=>{const n=t.getContentContainer().getBoundingClientRect();return{x:Math.min(Math.max(e.clientX,n.left),n.right),y:Math.min(Math.max(e.clientY,n.top),n.bottom)}})(t,e):((e,t,n)=>{if(t||!e){const e=n.getBoundingClientRect();return(0,Xe.A)(e)}const{top:r,left:o}=e;return{x:o,y:r}})(e.getCursorCurrentCoords(),t.isFullDocument,e.getScrollContainer()),a=((e,t)=>{if(document.querySelector(".review-tooltip-menu-container.cm-tooltip-above"))return"bottom";const n=t.getScrollContainer().getBoundingClientRect().top;return e.y<n+100?(e.y+=10,"left"):"top-start"})(r,e);o(r,a)});return()=>{t()}},[r,e,o])}var Je=n(94667),et=n(54599),tt=n(53568);const nt=e=>({options:[[{tooltip:(0,M.A)("writing-tools"),icon:(0,b.jsx)(tt.A,{color:"gold"}),iconSize:5,visible:!0,onClick:()=>{const t=(0,et.I)(e);(0,Je.$)(t,"editor")}}]]});const rt=(0,I.jA)(function(e){let{onOpen:t,onClose:n}=e;const{configuration:r}=function(){const e=(0,D.rt)(fe.M),t=(0,ze.Ay)(e=>!!e.position);return{configuration:(0,s.useMemo)(()=>t?nt(e):void 0,[e,t])}}();Ze();const o=(0,s.useCallback)(()=>{t("floating-button")},[t]),a=(0,s.useCallback)(()=>{n("floating-button")},[n]);return(0,b.jsx)(v.A,{children:(0,b.jsx)(He,{configuration:r,onOpen:o,onClose:a})})},{wrapWithId:"writefull-floating-button"});var ot=n(98774),at=n(69263),it=n(36568),At=n(7550);function lt(e){let{label:t,description:n,value:r,checked:o,requiresPremium:a=!1,borderBottom:i=!1,className:A="",children:l="",onChange:s}=e;const c=(0,we.Ay)(e=>e.session?.user.isPremium),u=(0,D.Br)("wfo:get-premium:campaign:settings"),m=u?.ctaUpgradeButton;return(0,b.jsxs)("div",{className:(0,Ee.$z)(A,"flex flex-col gap-2 px-[var(--px)]",i?" border-b border-gray-200 dark:border-gray-700 pb-[var(--gap-y)]":""),children:[(0,b.jsxs)("label",{className:(0,Ee.$z)("flex flex-row justify-between gap-1"),"aria-disabled":a&&!c,children:[(0,b.jsxs)("div",{children:[(0,b.jsx)("div",{className:(0,Ee.$z)("flex flex-row items-center justify-between mb-1"),children:t}),(0,b.jsx)("div",{className:(0,Ee.$z)("text-sm text-slate-500 dark:text-slate-300 leading-4"),children:n})]}),a&&!c?(0,b.jsx)(I.Ex,{className:"h-fit m-t-1",type:"primary",children:"With AI Assist"}):(0,b.jsx)(I.b3,{id:r,label:t,value:r,name:"model",checked:o,onChange:()=>s(r)})]}),a&&!c&&(0,b.jsx)(I.qy,{className:"mt-2 mb-1 w-fit",variant:"primary",size:"small",onClick:()=>{(0,it.f)("language-model")},icon:m?.icon?(0,At.A)(m.icon):(0,b.jsx)(b.Fragment,{}),children:m?.label??(0,M.A)("get-writefull-claim")}),l]})}function st(e){let{option:t,prompt:n,onOptionChange:r,onPromptChange:o,onAccept:a}=e;const i=(0,P.Ay)(e=>!e.isSelected),A=(0,we.Ay)(e=>e.session?.user.isPremium),l=(0,s.useRef)(null);return(0,ot.A)({containerRef:l}),(0,b.jsxs)("form",{ref:l,className:(0,Ee.$z)("[--px:1.25rem]"),onSubmit:e=>{e.preventDefault(),a()},children:[i&&(0,b.jsx)("div",{className:(0,Ee.$z)("p-[var(--px)] text-slate-500 dark:text-slate-300 leading-5"),children:(0,M.A)("language-model.writefull-automatically-revises")}),(0,b.jsx)("div",{className:(0,Ee.$z)("px-[var(--px)]"),children:(0,M.A)("language-model.which-language-model")}
1),(0,b.jsxs)("div",{className:(0,Ee.$z)("[--gap-y:0.75rem] flex flex-col gap-[var(--gap-y)] mt-4"),children:[(0,b.jsx)(lt,{label:(0,M.A)("language-model.writefulls-model"),description:(0,M.A)("language-model.for-research-writing"),value:"writefull",checked:"writefull"===t,borderBottom:!0,onChange:()=>r("writefull")}),(0,b.jsx)(lt,{label:(0,M.A)("language-model.gpt-model"),description:(0,M.A)("language-model.for-any-language"),value:"gpt",checked:"gpt"===t,borderBottom:!0,onChange:()=>r("gpt"),children:(0,b.jsx)(at.A,{})}),(0,b.jsxs)(lt,{label:(0,M.A)("language-model.gpt-model-custom-prompt"),description:(0,b.jsxs)(b.Fragment,{children:[(0,M.A)("language-model.customize-your-edits"),(0,b.jsx)("span",{className:"ml-1 text-sm italic leading-3",children:(0,M.A)("language-model.correct-the-text")})]}),value:"gpt-prompt",checked:"gpt-prompt"===t,requiresPremium:!0,onChange:()=>r("gpt-prompt"),children:[(0,b.jsx)(I.TM,{id:"prompt",name:"prompt",value:n,rows:3,required:!0,disabled:!A||"gpt-prompt"!==t,onChange:e=>{o(e.target.value)},className:"!invalid:ring-red-500"}),A&&(0,b.jsx)(at.A,{})]})]}),(0,b.jsx)("div",{className:(0,Ee.$z)("flex justify-end px-[var(--px)] mt-4"),children:(0,b.jsx)(I.$n,{type:"submit",variant:"primary",size:"large",children:(0,M.A)("language-model.choose-model")})})]})}var ct=n(29847);function ut(e){let{onOpen:t,onClose:n}=e;const r=P.Ay.use.isOpen(),o=P.Ay.use.closeModal(),a=P.Ay.use.onCloseCallback(),i=P.Ay.use.model(),A=P.Ay.use.prompt(),[l,c]=(0,s.useState)("writefull"),[u,m]=(0,s.useState)(),d=(0,s.useRef)(null);(0,s.useEffect)(()=>{a&&(d.current=a)},[a]),(0,s.useEffect)(()=>{c(i),m(A)},[i,A]);const p=(0,s.useCallback)(async()=>{o();const{model:e,prompt:t}=await(0,ct.a)(l,u);c(e),m(t)},[o,l,u]),g=(0,s.useCallback)(()=>{o(),c(i),m(A)},[o,i,A]);return(0,s.useEffect)(()=>{r?t():(n(),d?.current&&setTimeout(()=>{d.current?.(),d.current=null},100))},[r,t,n]),{isOpen:r,option:l,prompt:u??"",setOption:c,setPrompt:m,handleAccept:p,handleCancel:g}}var mt=n(24599),dt=n(90593),pt=n(28957),gt=n(26591);function ft(){return(0,b.jsxs)("p",{className:"language-model-gpt-tos",children:[(0,M.A)("language-model.using-this-feature")," ",(0,b.jsx)("a",{href:"https://docs.overleaf.com/integrations-and-add-ons/ai-features/writefull",target:"_blank",rel:"noopener noreferrer",className:"underline",children:(0,M.A)("language-model.learn-more")})]})}var ht=n(19603);function wt(e){let{label:t,description:n,value:r,checked:o,requiresPremium:a=!1,borderBottom:i=!1,className:A="",children:l="",onChange:s}=e;const c=(0,mt.F)();return(0,b.jsxs)("div",{className:`language-model-option ${i?"language-model-option--border-bottom":""} ${A}`.trim(),children:[(0,b.jsxs)("label",{className:"language-model-option__label","aria-disabled":a&&!c,children:[(0,b.jsxs)("div",{className:"language-model-option__label-container",children:[(0,b.jsx)("div",{className:"language-model-option__label-label",children:t}),(0,b.jsx)("div",{className:"language-model-option__label-description",children:n})]}),a&&!c?(0,b.jsx)(U.A,{variant:"premium",size:"sm",className:"mt-2",onClick:()=>{(0,it.f)("language-model")},children:(0,M.A)("paywall.upgrade")}):(0,b.jsx)(ht.A,{id:r,value:r,name:"model",checked:o,onChange:()=>s(r)})]}),l]})}function xt(e){let{formId:t,option:n,prompt:r,onOptionChange:o,onPromptChange:a,onAccept:i}=e;const A=(0,P.Ay)(e=>!e.isSelected),l=(0,mt.F)(),c=(0,s.useRef)(null);return(0,ot.A)({containerRef:c}),(0,b.jsxs)(dt.A,{ref:c,id:t,className:"language-model-content",onSubmit:e=>{e.preventDefault(),i()},children:[A&&(0,b.jsx)("div",{className:"language-model-content-intro",children:(0,M.A)("language-model.writefull-automatically-revises")}),(0,b.jsx)("div",{className:"language-model-content-question",children:(0,M.A)("language-model.which-language-model")}),(0,b.jsxs)("div",{className:"language-model-content-options",children:[(0,b.jsx)(wt,{label:(0,M.A)("language-model.writefulls-model"),description:(0,M.A)("language-model.for-research-writing"),value:"writefull",checked:"writefull"===n,borderBottom:!0,onChange:()=>o("writefull")}),(0,b.jsx)(wt,{label:(0,M.A)("language-model.gpt-model"),description:(0,M.A)("language-model.for-any-language"),value:"gpt",checked:"gpt"===n,borderBottom:!0,onChange:()=>o("gpt"),children:(0,b.jsx)(ft,{})}),(0,b.jsxs)(wt,{label:(0,M.A)("language-model.gpt-model-custom-prompt"),description:(0,b.jsxs)(b.Fragment,{children:[(0,M.A)("language-model.customize-your-edits"),(0,b.jsx)("span",{className:"language-model-option__description-note",children:(0,M.A)("language-model.correct-the-text")})]}),value:"gpt-prompt",checked:"gpt-prompt"===n,requiresPremium:!0,onChange:()=>o("gpt-prompt"),children:[(0,b.jsx)(gt.A,{children:(0,b.jsx)(pt.A,{as:"textarea",
1name:"prompt",onChange:e=>{a(e.target.value)},value:r,required:!0,disabled:!l||"gpt-prompt"!==n})}),l&&(0,b.jsx)(ft,{})]})]})]})}const bt="language-model-form";function vt(e){let{onOpen:t,onClose:n}=e;const{isOpen:r,option:o,prompt:a,setOption:i,setPrompt:A,handleAccept:l,handleCancel:s}=ut({onOpen:t,onClose:n});return(0,b.jsxs)(W.Li,{className:"language-model-modal",show:r,onHide:s,returnFocusOnDeactivate:!0,children:[(0,b.jsx)(W.IK,{children:(0,b.jsx)(W.rA,{children:(0,M.A)("language-model.choose-language-model")})}),(0,b.jsx)(W.$8,{children:(0,b.jsx)(xt,{formId:bt,option:o,prompt:a,onOptionChange:i,onPromptChange:A,onAccept:l})}),(0,b.jsx)(W.E9,{children:(0,b.jsx)(U.A,{type:"submit",form:bt,variant:"primary",size:"lg",children:(0,M.A)("language-model.choose-model")})})]})}const Bt=(0,I.jA)(function(e){let{onOpen:t,onClose:n}=e;const{isOpen:r,option:o,prompt:a,setOption:i,setPrompt:A,handleAccept:l,handleCancel:s}=ut({onOpen:t,onClose:n});return(0,b.jsxs)(I.aF,{isOpen:r,containerClassName:"w-[30rem] py-4",onClose:s,children:[(0,b.jsx)(I.pf,{className:(0,Ee.$z)("absolute right-0.5 top-0.5 bg-gray-200 hover:text-black"),onClose:s}),(0,b.jsx)(st,{option:o,prompt:a,onOptionChange:i,onPromptChange:A,onAccept:l})]})},{wrapWithId:"writefull-language-modal"}),yt=(0,s.memo)(function(e){let{onOpen:t,onClose:n}=e;const r=(0,B.u)(p.hS.rebrand),o=(0,s.useCallback)(()=>{t("language-model")},[t]),a=(0,s.useCallback)(()=>{n("language-model")},[n]),i=r?vt:Bt;return(0,b.jsx)(v.A,{children:(0,b.jsx)(i,{onOpen:o,onClose:a})})}),It=yt;var Ct=n(55753),jt=n(28871);function kt(){const{hasSuggestionsLeft:e,premiumSuggestionResetDate:t}=(0,x.mi)(),n=(0,jt.Ay)(e=>e.open),r=(0,jt.Ay)(e=>e.level??"info"),o=(0,jt.Ay)(e=>e.hideLevelIcon??!1),a=(0,jt.Ay)(e=>e.heading),i=(0,jt.Ay)(e=>e.body),A=(0,jt.Ay)(e=>e.footer),l=(0,jt.Ay)(e=>e.duration??3e3),c=(0,jt.Ay)(e=>e.cta),u=(0,jt.Ay)(e=>e.secondaryCta),m=(0,s.useCallback)(()=>{(0,Ct.G)()},[]);return(0,s.useEffect)(()=>{if(!n||!l)return;const e=setTimeout(()=>{m()},l);return()=>{clearTimeout(e)}},[l,n,m]),e?null:(0,b.jsx)("div",{"aria-live":"assertive",className:(0,Ee.$z)("fixed bottom-4 left-4 sm:bottom-6 sm:left-6 z-[120] w-full max-w-sm"),children:(0,b.jsxs)(I.eB,{show:n,enterFrom:"opacity-0 -translate-x-full",enterTo:"opacity-100 translate-y-0",leaveTo:"opacity-0 -translate-x-full",children:[(0,b.jsx)("button",{"aria-label":"Close notification",className:"absolute top-2 right-2 w-6 h-6 flex items-center justify-center rounded-full bg-gray-200 hover:bg-gray-300 text-gray-500 hover:text-gray-700",onClick:m,children:"Ã"}),"fire"===r?(0,b.jsx)("div",{className:"p-4 flex flex-col gap-4",children:(0,b.jsx)(le.A,{restoreTime:t?.getTime()??null,containerClassName:"p-4 flex flex-col gap-4",buttonClassName:"px-4 text-sm",onUpgrade:c?.action||(()=>{})})}):(0,b.jsx)(I.QB,{level:r,hideLevelIcon:o,heading:a,body:i,footer:A,cta:c,secondaryCta:u,onClose:m})]})})}const Et=function(){return(0,b.jsx)(v.A,{children:(0,b.jsx)(kt,{})})};var St=n(47606),Nt=n(13394),Ft=n(31868);function _t(e){let{isOpen:t,title:n,footer:r,className:o="",contentClassName:a="",children:i="",onClose:A}=e;return(0,b.jsx)(b.Fragment,{children:(0,b.jsxs)("div",{className:(0,Ee.$z)("fixed inset-0 flex items-start justify-center z-50",t?"":"pointer-events-none"),children:[(0,b.jsx)(I.hJ,{isOpen:t,onClose:A,zIndex:0}),(0,b.jsx)(I.eB,{show:t,enterFrom:"opacity-0 translate-y-0",enterTo:"opacity-100 translate-y-[1.75rem]",leaveTo:"opacity-0 translate-y-0",children:(0,b.jsxs)("div",{className:(0,Ee.$z)(o,"relative z-10","flex flex-col overflow-hidden","max-w-[80vw] sm:max-w-[70vw] md:max-w-[60vw] lg:max-w-[50vw] max-h-[90vh]","bg-[var(--bs-body-bg)] rounder-overleaf","transform transition-all duration-300 ease-out"),children:[(0,b.jsxs)("div",{className:(0,Ee.$z)("py-3 px-4 flex flex-row gap-2.5 text-xl heading-overleaf items-center justify-between separator-overleaf-b"),children:[n,(0,b.jsx)("button",{onClick:A,className:"p-2 cursor-pointer opacity-100 hover:opacity-75",children:(0,b.jsx)(k.A,{type:"close"})})]}),(0,b.jsx)("div",{className:(0,Ee.$z)(a,"p-4 overflow-auto flex-1"),children:i}),(0,b.jsx)("div",{className:"p-4 flex flex-row gap-2.5 items-center justify-end separator-overleaf-t",children:r})]})})]})})}n(61053);var Ot=n(74758);function Rt(e){let{type:t,store:n}=e;return(0,s.useCallback)(()=>{const{result:e,hasCopiedResult:r,resultsHistory:o,error:a,hasInsertedResult:i,hasInsertedWithEnter:A,search:l}
1=n.getState(),s=!a&&!!e&&e.results.length>0&&e.results.every(e=>"error"!==e.type);l&&(0,q.c)(`generate-${t}`,(e=>e instanceof File?"image":"prompt")(l),{cardAction:(0,Ot.C)(s,r,i),ableToRespond:a||e?s:void 0,numberOfTrials:o?.filter(e=>null!==e).length||void 0,...i?{withEnter:A}:{}})},[n,t])}var Pt=n(99805);const zt=(0,s.createContext)(null);function Tt(){const e=(0,s.useContext)(zt);if(!e)throw new Error("Missing StoreProvider");return e}const Mt=function(e){const t=(0,s.useContext)(zt);if(!t)throw new Error("Missing StoreProvider");return(0,Pt.P)(t,e)};var $t=n(44403),Lt=n(41695);function Dt(e){let{type:t="button",variant:n,size:r="lg",disabled:o=!1,loading:a=!1,loadingText:i,children:A="",className:l="",onClick:c,...u}=e;const m=(0,s.useRef)(null);return(0,b.jsx)(b.Fragment,{children:(0,b.jsx)("button",{...u,type:t,ref:m,className:(0,Ee.$z)(l,"flex flex-row justify-center items-center relative overflow-hidden","sm"===r?"text-sm px-2 py-1":"px-4 py-1.5","rounded-full text-[length:--bs-btn-font-size] font-overleaf font-semibold","focus-overleaf","premium"===n?"enabled:hover:[--premium-gradient:var(--blue-70)] before:bg-[--blue-70] text-[color:--content-primary-dark]":"","secondary"===n?"bg-transparent before:bg-[#f4f6f8] text-overleaf border-overleaf enabled:hover:bg-[--bg-light-tertiary]":"","ghost"===n?"bg-transparent before:bg-transparent text-overleaf !px-0 !py-0.5 enabled:hover:bg-[--bg-light-tertiary]":"",a?'before:content-[""] before:absolute before:w-1 before:top-0 before:left-0 before:bottom-0 before:animate-[width_6s_linear_infinite_alternate]':"before:content-none",o?"cursor-not-allowed !bg-[#E7E9EE] !text-[#AFB5C0]":""),disabled:o||a,onClick:c,style:{..."premium"!==n||o?{}:{background:"var(--premium-gradient)"}},children:(0,b.jsx)("div",{className:(0,Ee.$z)("z-1 relative"),children:a&&i?i:A})})})}const Ut=new URL(n(73800),n.b);function Wt(e){let{textToCopy:t,onClick:n,...r}=e;const[o,a]=(0,s.useState)(!1);return(0,b.jsx)(Dt,{...r,onClick:async e=>{a(!0),await(0,Ee.lW)(t),n?.(e),setTimeout(()=>{a(!1)},3e3)},children:(0,b.jsxs)("div",{className:"flex flex-row gap-1 items-center text-sm",children:[o?(0,b.jsx)(k.A,{type:"check"}):(0,b.jsx)("img",{src:Ut.href,alt:"Copy icon",style:{height:16}}),o?(0,M.A)("copy-code-copied"):(0,M.A)("copy-code")]})})}var qt=n(58104),Qt=n(54219),Ht=n(16803);function Yt(e){let{restoreTime:t}=e;const n=(0,Qt.XW)(),r=n?.aiUsageQuota,o=Math.max((t??0)-(new Date).getTime(),0)/1e3,{hours:a,minutes:i}=(0,Ht.M)(o);return(0,b.jsx)(b.Fragment,{children:(0,b.jsx)("p",{children:(0,M.A)("unlimited"===r?"paywall.body.fair-usage":"paywall.body",{hours:a,minutes:i})})})}function GeneratorResultError(e){let{restoreTime:t}=e;const n=Mt(e=>e.result),r=Mt(e=>e.error);return r&&(0,$t.WZ)(r)?(0,b.jsx)(Yt,{restoreTime:t}):r&&(0,$t.MB)(r)&&(0,$t.GQ)(r)?r.body:0===n?.results.length?"No results found.":"Sorry, something went wrong."}function Gt(){const{premiumSuggestionResetDate:e}=(0,x.mi)(),t=Mt(e=>e.result),n=Mt(e=>e.error),r=Mt(e=>e.isExecuting),o=Mt(e=>e.copyResult),a=e?e.getTime():null;return r&&!t?(0,b.jsx)(Lt.A,{className:(0,Ee.$z)("flex-1"),loading:!0,loadingBars:9,variant:"clear"}):n&&!t||0===t?.results.length?(0,b.jsx)(GeneratorResultError,{restoreTime:a}):t?(0,b.jsxs)("div",{className:"flex flex-col flex-1 bg-white overflow-hidden",children:[(0,b.jsx)(qt.A,{className:(0,Ee.$z)("flex-1 overflow-auto"),result:t,onCopyResult:o,variant:"clear"}),(0,b.jsx)(Wt,{variant:"ghost",className:"self-end mr-3 my-1",onClick:o,textToCopy:t.results[0].value})]}):null}function Xt(e){let{color:t,className:n="",sizePx:r=30}=e;return(0,b.jsxs)("svg",{width:"30",height:"29",viewBox:"0 0 30 29",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:n,style:{height:r,width:r,...t?{"--star-fill":t}:{}},children:[(0,b.jsxs)("g",{id:"noun-sparkle-3345125 1",clipPath:"url(#clip0_1884_12679)",children:[(0,b.jsx)("path",{id:"Vector",d:"M29.6881 15.9825C29.6143 15.8361 29.4316 15.7626 29.2849 15.726C28.441 15.726 21.1861 15.4332 21.1861 7.00439C21.1861 6.74819 20.9665 6.52829 20.7091 6.52829C20.4535 6.52829 20.2336 6.74819 20.2336 7.00439C20.2336 15.4332 12.9778 15.726 12.1714 15.726C12.0616 15.726 11.9515 15.7626 11.8783 15.8361C11.8048 15.8727 11.7679 15.9456 11.7319 15.9825C11.6584 16.1292 11.6584 16.3122 11.7319 16.4589C11.8051 16.6059 11.9881 16.7154 12.1714 16.7154C12.1714 16.7154 12.1714 16.7154 12.208
116.7154C13.051 16.7154 20.2702 17.0088 20.2702 25.4367C20.2702 25.6929 20.4898 25.9131 20.7469 25.9131C21.0034 25.9131 21.2227 25.6929 21.2227 25.4367C21.2227 17.0451 28.4416 16.7154 29.2852 16.7154C29.4682 16.7154 29.6146 16.6059 29.725 16.4589C29.7976 16.3122 29.7976 16.1295 29.6881 15.9825Z",fill:"var(--star-fill, url(#paint0_linear_1884_12679))"}),(0,b.jsx)("path",{id:"Vector_2",d:"M10.4483 21.9927C10.0085 21.9927 6.05091 21.846 6.05091 17.2287C6.05091 16.9719 5.83101 16.752 5.57481 16.752C5.31831 16.752 5.09841 16.9716 5.09841 17.2287C5.09841 21.846 1.14081 21.9927 0.701009 21.9927C0.664409 21.9927 0.664409 21.9927 0.664409 21.9927C0.407909 22.0293 0.224609 22.212 0.224609 22.4688C0.224609 22.7256 0.444509 22.9455 0.701009 22.9455C1.17741 22.9455 5.09841 23.0916 5.09841 27.7089C5.09841 27.9651 5.31831 28.1856 5.57481 28.1856C5.79471 28.2588 6.01461 28.0392 6.01461 27.7458C6.01461 23.1282 9.97221 22.9818 10.412 22.9818H10.4486C10.7051 22.9818 10.925 22.7622 10.925 22.4688C10.9247 22.212 10.7048 21.9927 10.4483 21.9927Z",fill:"var(--star-fill, url(#paint1_linear_1884_12679))"}),(0,b.jsx)("path",{id:"Vector_3",d:"M14.6629 6.45509C14.9197 6.45509 15.1396 6.23519 15.1396 5.94209C15.1396 5.68559 14.9197 5.46599 14.6629 5.46599C14.2237 5.46599 10.2658 5.31929 10.2658 0.702291C10.2658 0.445791 10.0459 0.225891 9.78935 0.225891C9.53285 0.225891 9.31325 0.445791 9.31325 0.702291C9.31325 5.31959 5.35535 5.46599 4.91585 5.46599C4.87895 5.46599 4.87895 5.46599 4.87895 5.46599C4.62245 5.50259 4.43945 5.68559 4.43945 5.94209C4.43945 6.19859 4.65935 6.41849 4.91585 6.41849C5.39225 6.41849 9.31325 6.56489 9.31325 11.1822C9.31325 11.4387 9.53285 11.6586 9.78935 11.6586C10.0093 11.6955 10.2292 11.4756 10.2292 11.2188C10.2292 6.60149 14.1865 6.45509 14.6266 6.45509H14.6629Z",fill:"var(--star-fill, url(#paint2_linear_1884_12679))"})]}),(0,b.jsxs)("defs",{children:[(0,b.jsxs)("linearGradient",{id:"paint0_linear_1884_12679",x1:"29.7755",y1:"6.52829",x2:"8.20766",y2:"15.6501",gradientUnits:"userSpaceOnUse",children:[(0,b.jsx)("stop",{stopColor:"#214475"}),(0,b.jsx)("stop",{offset:"0.295154",stopColor:"#254C84"}),(0,b.jsx)("stop",{offset:"1",stopColor:"#6597E0"})]}),(0,b.jsxs)("linearGradient",{id:"paint1_linear_1884_12679",x1:"10.925",y1:"16.752",x2:"-1.82202",
1y2:"22.1493",gradientUnits:"userSpaceOnUse",children:[(0,b.jsx)("stop",{stopColor:"#214475"}),(0,b.jsx)("stop",{offset:"0.295154",stopColor:"#254C84"}),(0,b.jsx)("stop",{offset:"1",stopColor:"#6597E0"})]}),(0,b.jsxs)("linearGradient",{id:"paint2_linear_1884_12679",x1:"15.1396",y1:"0.225892",x2:"2.3965",y2:"5.62652",gradientUnits:"userSpaceOnUse",children:[(0,b.jsx)("stop",{stopColor:"#214475"}),(0,b.jsx)("stop",{offset:"0.295154",stopColor:"#254C84"}),(0,b.jsx)("stop",{offset:"1",stopColor:"#6597E0"})]}),(0,b.jsx)("clipPath",{id:"clip0_1884_12679",children:(0,b.jsx)("rect",{width:"30",height:"28.2",fill:"white"})})]})]})}function TitleError(e){let{error:t}=e;const n=(0,Qt.XW)(),r=n?.aiUsageQuota;return(0,$t.WZ)(t)?(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(Xt,{}),(0,M.A)("unlimited"===r?"paywall.title.new-plans.fair-usage":"paywall.title.new-plans")]}):(0,b.jsxs)(b.Fragment,{children:[t.type&&(0,b.jsx)(k.A,{type:"error",className:(0,Ee.$z)("warning"===t.type?"text-yellow-600":"text-red-600")}),t.title]})}function Vt(e){let{name:t}=e;const n=Mt(e=>e.error);return(0,b.jsx)("div",{className:(0,Ee.$z)("flex items-center gap-4 font-semibold text-sm text-overleaf",n?"":"[@media(max-height:570px)]:hidden"),children:n?(0,b.jsx)(TitleError,{error:n}):(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(Xt,{}),(0,M.A)("create-modal.your-result",{name:t})]})})}function Kt(e){let{...t}=e;return(0,b.jsx)(I.uU,{...t,placeholderClassName:"border-overleaf !border-dashed rounded-none !bg-[#D9D9D9] text-overleaf-secondary"})}function Zt(e,t){let{id:n,name:r,placeholder:o="",value:a,rows:i,disabled:A=!1,required:l=!1,className:s="",onChange:c,onEnter:u,onPaste:m,onFocus:d,onBlur:p}=e;return(0,b.jsx)("textarea",{id:n,name:r,required:l,disabled:A,ref:t,className:(0,Ee.$z)(s,"border-overleaf rounded p-2 w-full focus-overleaf"),placeholder:o,value:a??"",rows:i,onChange:c,onKeyDown:e=>{u&&"Enter"===e.key&&!e.shiftKey&&(e.preventDefault(),u())},onPaste:m,onFocus:d,onBlur:p})}const Jt=(0,s.forwardRef)(Zt);const en=function(e){let{htmlFor:t,className:n="",children:r=""}=e;return(0,b.jsx)("label",{className:(0,Ee.$z)(n,"text-sm hidden hmd:inline"),htmlFor:t,children:r})};n(58234),n(74422);var tn=n(88508),nn=n(18865);function rn(e){let{type:t,abortControllerRef:n}=e;const r=Mt(e=>e.currentPrompt),o=Mt(e=>e.currentImage),a=Mt(e=>e.setSearch),i=Mt(e=>e.setError),A=Mt(e=>
1e.setResult),l=Mt(e=>e.setIsExecuting),c=Mt(e=>e.closeModal),u=(0,nn.A)({setResult:A,setError:i,setIsExecuting:l,close:c});return(0,s.useCallback)(()=>{if(!prompt&&!o)return;const e=r??o;a(e),u("ai",`generate-${t}`,()=>(0,tn.Qx)(`generate-${t}`,e,n.current.signal),!0)},[o,r,t,n,u,a])}function on(e){let{type:t,abortControllerRef:n}=e;const r=rn({type:t,abortControllerRef:n}),[o,a]=(0,s.useState)(),[i,A]=(0,s.useState)(),l=Mt(e=>e.search),c=Mt(e=>e.currentPrompt),u=Mt(e=>e.currentImage),m=Mt(e=>e.setCurrentPrompt),d=Mt(e=>e.setCurrentImage),p=(0,s.useRef)(null);return(0,s.useEffect)(()=>{a(null),A(null)},[l]),(0,s.useEffect)(()=>{p.current?.focus()},[]),{textAreaRef:p,currentPrompt:c,currentImage:u,handleEnterPressed:()=>{!c?.length||l&&l===c||r()},handleImageChange:e=>{if(!e)return d(null),void m(o??null);d(e),A(e),m(null)},handlePasted:e=>{const t=(e=>{const{items:t}=e.clipboardData,n=new Array(t.length).fill(null).map((e,n)=>t[n]).filter(e=>"file"===e.kind&&/^image\//.exec(e.type)).at(-1);if(!n)return null;const r=n.getAsFile();return r?new File([r],"clipboard-image",{type:r.type}):null})(e);t&&(d(t),A(t),m(null),e.preventDefault())},handlePromptChange:e=>{const{value:t}=e.target;m(t),a(t),t.length?d(null):i&&d(i)}}}function an(e){let{type:t,name:n,promptPlaceholder:r,imagePickerPlaceholder:o,abortControllerRef:a,hideImagePicker:i=!0}=e;const{currentPrompt:A,currentImage:l,textAreaRef:s,handlePromptChange:c,handleImageChange:u,handleEnterPressed:m,handlePasted:d}=on({type:t,abortControllerRef:a});return(0,b.jsxs)("div",{className:(0,Ee.$z)("flex flex-col gap-4 shrink-0 max-h-[14rem] overflow-hidden"),children:[(0,b.jsx)(en,{htmlFor:"prompt",className:"!text-base",children:(0,M.A)(i?"create-modal.enter-prompt":"create-modal.enter-prompt-or-paste-image",{name:n})}),(0,b.jsxs)("div",{className:"grid grid-cols-2 gap-x-4 gap-y-2 overflow-hidden ",children:[(0,b.jsx)(Jt,{id:"prompt",name:"prompt",className:(0,Ee.$z)("resize-vertical",i?"col-span-2":""),ref:s,value:A??"",required:!l,rows:3,placeholder:r,onChange:c,onEnter:m,onPaste:d}),!i&&(0,b.jsx)(Kt,{id:"image",name:"image",value:l??void 0,placeholder:o,onChange:u})]})]})}var An=n(42686);function ln(){const e=Mt(e=>e.resultsHistory.indexOf(e.result)),t=Mt(e=>e.resultsHistory),n=Mt(e=>e.goNextResult),r=Mt(e=>e.goPreviousResult);return(0,b.jsx)(An.A,{currentPage:e,totalPages:t.length,goNextResult:n,goPreviousResult:r,disableKeyNavigation:!0})}function sn(e){let{type:t,name:n,promptPlaceholder:r,imagePickerPlaceholder:o,abortControllerRef:a,hideImagePicker:i=!1}=e;const A=Mt(e=>e.result),l=Mt(e=>e.error),s=Mt(e=>e.isExecuting),c=Mt(e=>e.resultsHistory.length>0||null!==e.error),u=!!l&&(0,$t.WZ)(l);return(0,b.jsxs)("div",{className:(0,Ee.$z)("flex flex-col gap-4 overflow-hidden p-0.5",c&&!u?"h-[16rem] hsm:h-[18rem] hmd:h-[32rem]":""),"aria-busy":s,children:[(0,b.jsx)(an,{name:n,type:t,promptPlaceholder:r,imagePickerPlaceholder:o,abortControllerRef:a,hideImagePicker:i}),(!!A||s||!!l)&&(0,b.jsxs)("div",{className:"flex-1 flex flex-col gap-4 py-4 px-5 rounded-lg bg-[#F1F4F9] overflow-hidden",children:[(0,b.jsx)(Vt,{name:n}),(0,b.jsx)(Gt,{}),(0,b.jsxs)("div",{className:"flex justify-between",children:[(0,b.jsx)(ln,{}),!!A&&(0,b.jsx)("span",{className:"text-overleaf-secondary text-xs",children:(0,M.A)("create-modal.disclaimer")})]})]})]})}function cn(){const e=Mt(e=>e.cancel);return(0,b.jsx)(b.Fragment,{children:(0,b.jsx)(Dt,{variant:"secondary",onClick:e,children:(0,M.A)("close")})})}function un(e){let{error:t}=e;const n=(0,Qt.XW)(),r=n?.aiUsageQuota,o=Mt(e=>e.cancel),a=(0,s.useCallback)(()=>{(0,it.f)(t.source)},[t.source]);return(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(Dt,{variant:"secondary",onClick:o,children:(0,M.A)("cancel")}),"unlimited"!==r&&(0,b.jsx)(Dt,{variant:"premium",onClick:a,children:(0,b.jsxs)("div",{className:"flex flex-row items-center gap-2",children:[(0,b.jsx)(tt.A,{color:"white"}),(0,M.A)("paywall.upgrade")]})})]})}function mn(e){let{regenerating:t,children:n="",regeneratingLabel:r="Regenerating",...o}=e;return(0,b.jsx)(Dt,{className:"gap-2",loading:t,...o,children:(0,b.jsxs)("div",{className:(0,Ee.$z)("flex flex-row gap-2 items-center"),children:[(0,b.jsx)(k.A,{type:"autorenew",className:t?"animate-spin":""}),t?r:n]})})}n(18683);var dn=n(25390);function pn(e){let{type:t,abortControllerRef:n}=e;const r=rn({type:t,abortControllerRef:n}),o=function(){const e=Mt(e=>e.result),t=Mt(e=>e.closeInsertion),n=(0,s.useCallback)(function(){let n=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(!e)return;const{value:r}=e.results.find(e=>"latex"===e.type);(0,dn.e)(r),t(n)},[t,e]);return n}(),a=Mt(e=>e.resultsHistory.filter(e=>!!e).length>0),i=Mt(e=>!!e.result?.results.length&&!e.isExecuting),A=Mt(e=>e.isExecuting),l=Mt(e=>(e.currentPrompt?.length??0)>0||!!e.currentImage),c=Mt(e=>e.cancel);return(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(Dt,{variant:"secondary",onClick:c,children:(0,M.A)("cancel")}),(0,b.jsx)(mn,{variant:a?"secondary":"premium",regenerating:A,regeneratingLabel:a?(0,M.A)("regenerating"):(0,M.A)("generating"),disabled:!l,onClick:r,children:a?(0,M.A)("regenerate"):(0,M.A)("generate")}),a&&(0,b.jsx)(Dt,{variant:"premium",disabled:!i,onClick:()=>o(),children:(0,M.A)("insert")})]})}function gn(){const{giveAiConsent:e}=(0,Nt.A)();return(0,b.jsx)(b.Fragment,{children:(0,b.jsx)(Dt,{variant:"secondary",onClick:e,children:(0,M.A)("accept-and-continue")})})}function fn(e){let{type:t,abortControllerRef:n}=e;const r=(0,we.Ay)(e=>e.session?.user),{hasGivenAiConsent:o}=(0,Nt.A)(),a=Mt(e=>e.error);return r?o?a&&(0,$t.WZ)(a)?(0,b.jsx)(un,{error:a}):(0,b.jsx)(pn,{type:t,abortControllerRef:n}):(0,b.jsx)(gn,{}):(0,b.jsx)(cn,{})}function hn(e){let{name:t}=e;const n=(0,we.Ay)(e=>e.session?.user),{hasGivenAiConsent:r}=(0,Nt.A)();return n?r?(0,M.A)("create-modal.title",{name:t}):(0,M.A)("create-modal.accept-tos",{context:t,name:t}):(0,M.A)("create-modal.unavailable.title")}function wn(e){let{name:t}=e;return(0,b.jsxs)("div",{className:"flex items-center gap-2",children:[(0,b.jsx)(hn,{name:t}),(0,b.jsx)(tt.A,{})]})}function xn(e){let{type:t,name:n,promptPlaceholder:r,hideImagePicker:o=!1,onOpen:a,onClose:i}=e;const{hasGivenAiConsent:A}=(0,Nt.A)(),l=Mt(e=>e.isOpen),c=(0,we.Ay)(e=>e.session?.user),u=Rt({type:t,store:Tt()}
1),m=Mt(e=>e.closeModal),d=!!c,p=(0,s.useRef)(null);return(0,s.useEffect)(()=>{l?(p.current=new AbortController,a()):(u(),i(),p.current?.abort())},[l,u,a,i]),(0,b.jsx)(_t,{isOpen:l,className:"w-[40rem] font-overleaf",contentClassName:"flex flex-col overflow-hidden",title:(0,b.jsx)(wn,{name:n}),footer:(0,b.jsx)(fn,{type:t,abortControllerRef:p}),onClose:m,children:d?A?(0,b.jsx)(sn,{type:t,name:n,promptPlaceholder:r,imagePickerPlaceholder:(0,M.A)("create-modal.image-picker-placeholder",{name:n}),hideImagePicker:o,abortControllerRef:p}):(0,b.jsx)(Ft.A,{}):(0,M.A)("create-modal.unavailable.content")})}const bn=(0,s.memo)(xn);function vn(e){let{onOpen:t,onClose:n}=e;const r=(0,D.rt)(St.rY);return(0,b.jsx)(zt.Provider,{value:r.getStore(),children:(0,b.jsx)(bn,{type:"equation",name:(0,M.A)("equation"),promptPlaceholder:"Example: provide the Friedmann Equations",onOpen:t,onClose:n})})}function Bn(e){let{onOpen:t,onClose:n}=e;be();const r=(0,s.useCallback)(()=>{t("overleaf-equation-generator")},[t]),o=(0,s.useCallback)(()=>{n("overleaf-equation-generator")},[n]);return(0,b.jsx)(v.A,{children:(0,b.jsx)(vn,{onOpen:r,onClose:o})})}const yn=(0,I.jA)((0,s.memo)(Bn),{wrapWithId:"overleaf-equation-generator",forcedTheme:"light"});var In=n(32932);function Cn(e){let{onOpen:t,onClose:n}=e;const r=(0,D.rt)(In.rR);return(0,b.jsx)(zt.Provider,{value:r.getStore(),children:(0,b.jsx)(bn,{type:"tikz",name:(0,M.A)("figure"),promptPlaceholder:"Example: Create a bar chart. The x-axis should be labelled 'Reading' and the y-axis should be labeled 'Hour of day'",onOpen:t,onClose:n,hideImagePicker:!0})})}function jn(e){let{onOpen:t,onClose:n}=e;be();const r=(0,s.useCallback)(()=>{t("overleaf-figure-generator")},[t]),o=(0,s.useCallback)(()=>{n("overleaf-figure-generator")},[n]);return(0,b.jsx)(v.A,{children:(0,b.jsx)(Cn,{onOpen:r,onClose:o})})}const kn=(0,I.jA)((0,s.memo)(jn),{wrapWithId:"overleaf-figure-generator",forcedTheme:"light"});var En=n(38266);function Sn(e){let{onOpen:t,onClose:n}=e;const r=(0,D.rt)(En.P8);return(0,b.jsx)(zt.Provider,{value:r.getStore(),children:(0,b.jsx)(bn,{type:"table",name:(0,M.A)("table"),promptPlaceholder:"Example: create a table with 6 rows and 6 columns, centered, with a horizontal line after the heading",onOpen:t,onClose:n})})}function Nn(e){let{onOpen:t,onClose:n}=e;be();const r=(0,s.useCallback)(()=>{t("overleaf-table-generator")},[t]),o=(0,s.useCallback)(()=>{n("overleaf-table-generator")},[n]);return(0,b.jsx)(v.A,{children:(0,b.jsx)(Sn,{onOpen:r,onClose:o})})}const Fn=(0,I.jA)((0,s.memo)(Nn),{wrapWithId:"overleaf-table-generator",forcedTheme:"light"}),_n=e=>Symbol.iterator in e,On=e=>"entries"in e,Rn=(e,t)=>{const n=e instanceof Map?e:new Map(e.entries()),r=t instanceof Map?t:new Map(t.entries());if(n.size!==r.size)return!1;for(const[e,t]of n)if(!r.has(e)||!Object.is(t,r.get(e)))return!1;return!0};function Pn(e,t){return!!Object.is(e,t)||"object"==typeof e&&null!==e&&"object"==typeof t&&null!==t&&(Object.getPrototypeOf(e)===Object.getPrototypeOf(t)&&(_n(e)&&_n(t)?On(e)&&On(t)?Rn(e,t):((e,t)=>{const n=e[Symbol.iterator](),r=t[Symbol.iterator]();let o=n.next(),a=r.next();for(;!o.done&&!a.done;){if(!Object.is(o.value,a.value))return!1;o=n.next(),a=r.next()}return!!o.done&&!!a.done})(e,t):Rn({entries:()=>Object.entries(e)},{entries:()=>Object.entries(t)})))}var zn=n(18643),Tn=n(98415);function Mn(e){let{x:t,y:n,type:r,setOpen:o}=e;const a=z.Ay.use.close(),i=(0,D.ZO)(ie.l),A=(0,s.useMemo)(()=>i.getMessage("offline"===r?"offline":"quota-check-not-available"),[i,r]);return(0,b.jsx)(Te.A,{setOpen:o,x:t,y:n,open:!0,children:(0,b.jsx)(I.Zp,{minWidth:400,maxWidth:450,children:(0,b.jsx)(I.QB,{...A,icon:(0,b.jsx)(Tn.w,{}),onClose:a})})})}var $n=n(87492),Ln=n(70399),Dn=n(31477),Un=n(11739),Wn=n(17232),qn=n(19936);function Qn(){const e=(0,xe.Jw)();return{isUserInNewUsersAfterMay:(0,s.useMemo)(()=>!!e&&new Date(e).getTime()>=new Date("2025-05-01").getTime(),[e])}}var Hn=n(48598);const Yn=(0,I.jA)(function(e){let{reference:t,onClose:n,onRejectJustOnce:r,onRejectAndBlock:o}=e;const[a,i]=(0,s.useState)(!0),{x:A,y:l,refs:c,strategy:u,context:m}=(0,We.we)({open:a,onOpenChange:i,elements:{reference:t.current},placement:"bottom",middleware:[(0,qe.UU)(),(0,qe.BN)(),(0,qe.cY)(10)],strategy:"fixed",whileElementsMounted:Hn.ll}),d=(0,We.s9)(m,{outsidePress:()=>(i(!1),n(),!0)}),{getFloatingProps:p}=(0,We.bv)([d]);return a?(0,b.jsx)("div",{style:{position:u,top:l,left:A,zIndex:1e3},ref:c.setFloating,...p(),children:(0,b.jsxs)(I.mc,{className:X()("flex flex-col gap-4 !p-3 max-w-[21rem] text-center"),children:[(0,b.jsx)("span",{children:(0,M.A)("blocked-suggestion-signpost.question")}),(0,b.jsxs)("div",{className:X()("flex flex-row justify-center gap-4"),children:[(0,b.jsx)(I.$n,{variant:"primary",onClick:()=>{o(),i(!1)},children:(0,M.A)("blocked-suggestion-signpost.reject-and-block")}),(0,b.jsx)(I.$n,{variant:"secondary",onClick:()=>{r(),i(!1)},children:(0,M.A)("blocked-suggestion-signpost.reject-just-once")})]})]})}):null},{wrapWithId:"writefull-blocked-suggestion-signpost"});const Gn="suggestion-card";function Xn(e){let{suggestionsForPart:t,suggestion:n,x:r,y:o,showBanners:a=!0,setOpen:i,shiftPressed:A,getPremium:l=!1}=e;const c=(0,s.useRef)(null),u=(0,xe.CA)(),{isUserInNewUsersAfterMay:m}=Qn(),d=y.Ay.use.showTrackChanges(),p=z.Ay.use.suggestionSelection(),g=(0,y.Ay)(e=>u&&!e.hasAcceptedAutoLogin),f=(0,y.Ay)(e=>u&&!!e.hasAcceptedAutoLogin&&!e.hasAcknowledgedAutoLoginEnabledWelcome&&m),h=(0,y.Ay)(e=>!!e.advices["blocked-suggestion"]?.hasSeen),w=y.Ay.use.setHasSeenAdvice(),x=(0,s.useMemo)(()=>
1ue(t,n),[t,n]),[v,B]=(0,s.useState)(x),[I,C]=(0,s.useState)(!1),j=(0,s.useMemo)(()=>1===x.filter(e=>"unchanged"!==e.type).length,[x]),k=(0,s.createRef)(),E=(0,s.useRef)(null),[S,N]=(0,s.useState)(),[F,_]=(0,s.useState)(Date.now()),O=(0,s.useRef)(null),R=(0,s.useCallback)(()=>{_(Date.now())},[]),{pinned:P,pinnedSize:T,pinnedPosition:M,handleTogglePin:$}=function(e){let{x:t,y:n,key:r,cardRef:o,onRefresh:a}=e;const i=z.Ay.use.pinned(),A=z.Ay.use.pinnedSize(),l=z.Ay.use.pinnedPosition(),c=z.Ay.use.pin(),u=z.Ay.use.unpin(),m=z.Ay.use.changeSize(),d=z.Ay.use.resetPosition();(0,s.useEffect)(()=>{if(i)return;const e=o.current?.getBoundingClientRect();t&&n&&e&&e.x>0&&e.y>0&&t>=e.x&&t<=e.x+e.width&&n>=e.y&&n<=e.y+e.height&&(m({width:e.width,height:e.height}),d(),a())},[o,r,i,t,n,a,m,d]);const p=(0,s.useCallback)(()=>{if(i)u();else{const e=o.current?.getBoundingClientRect();c({x:e?.x??0,y:e?.y??0},{width:e?.width??0,height:e?.height??0})}},[o,i,c,u]);return{pinned:i,pinnedSize:A,pinnedPosition:l,handleTogglePin:p}}({x:r,y:o,key:F,cardRef:E,onRefresh:R});(e=>{let{elementRef:t,enabled:n=!0}=e;const r=(0,s.useCallback)(e=>{t.current&&t.current.style.setProperty("resize",e?"both":"none")},[t]);(0,s.useEffect)(()=>{r(n)},[n,r])})({elementRef:E,enabled:!P}),(0,s.useEffect)(()=>{if(!v||0===v.length)return;const e=k.current?.querySelector("[data-selected]");e&&e.scrollIntoView({behavior:"smooth",block:"center"})},[k,v]);const L=(0,s.useCallback)(()=>{g&&(0,$n.n)(),f&&(0,Ln.t)(!0)},[g,f]),D=(0,s.useCallback)(e=>{!e&&l&&O.current?.()||i(e)},[i,l]);if(!n?.replacements.length)return null;return(0,b.jsxs)(Te.A,{usesPortal:!1,setOpen:D,x:M?.x??r,y:M?.y??o,draggable:{area:S??null,enabled:!P},autofocus:!0,disableAutoUpdate:!0,placement:(()=>{if(P)return"bottom-start";const e=document.querySelector(".ol-cm-spelling-context-menu-tooltip");if(e){return e.classList.contains("cm-tooltip-below")?"top":"top-end"}return"bottom"})(),offsetPx:P?0:10,disableFlip:P,outsidePressExcludedElements:['[data-suggestion-card-close-excluded-element="true"]'],open:!0,children:[(0,b.jsx)(ce,{cardRef:E,containerRef:k,rejectButtonContainerRef:c,shouldWelcomeUser:g,shouldWelcomeUserAutoLoginEnabled:f,pinned:P,pinnedSize:T,showBlockedSuggestionSignpost:I,isSingleSuggestion:j,sentencePatches:v,suggestionsForPart:t,showTrackChanges:d,shiftPressed:A,showBanners:a,suggestionSelection:p,setDraggable:N,onTogglePin:$,onAcceptAllSuggestions:()=>{L();const e=v.filter(e=>e.isRejected);if(e.length>0){const t=v.filter(e=>"group"===e.type&&!e.isRejected).map(e=>e.value.find(e=>"added"===e.type)?.suggestion).filter(Boolean),n=e.map(e=>e.value.find(e=>"removed"===e.type)?.suggestion).filter(Boolean);(0,Un.E)(Gn,t,n)}else(0,Dn.ZY)(Gn)},onRejectAllSuggestions:()=>{L(),h?(0,qn.kE)(Gn):C(!0)},onGroupClick:(e,t)=>{if(L(),!j&&("click"===e.type||" "===e.key)){e.preventDefault(),e.stopPropagation();const n=[...v],r=n[t];r.isRejected=!r.isRejected,B(n)}},onSuggestionClick:e=>{L(),j&&(A?(0,qn._h)(Gn,e.suggestion):(0,Dn.Z0)(Gn,e.suggestion))},onSuggestionBlock:()=>{L(),(0,Wn.M)(Gn)},onAutoLoginEnabledWelcomeAcknowledge:Ln.t,getPremium:l,dismissInterceptorRef:O}),I&&(0,b.jsx)(Yn,{reference:c,onClose:()=>{w("blocked-suggestion")},onRejectJustOnce:()=>{w("blocked-suggestion"),(0,qn.kE)(Gn,!0)},onRejectAndBlock:()=>{w("blocked-suggestion"),(0,Wn.M)(Gn,!0)}})]},F)}function Vn(e){let{onOpen:t,onClose:n}=e;const{hasSuggestionsLeft:r}=(0,x.mi)(),o=zn.Ay.use.isOnline(),a=zn.Ay.use.isQuotaCheckAvailable(),i=(0,we.Ay)(e=>!0===e.session?.user?.isPremium),A=(0,Ae.Ay)(e=>e.frontEndQuotaExceeded||e.backEndQuotaExceeded.suggest),l=!r||!i&&A,c=z.Ay.use.suggestionsForPart(),u=(0,z.Ay)(e=>e.suggestionSelection?.suggestion??null),m=z.Ay.use.isOpen(),d=z.Ay.use.close(),{x:p,y:g}=(0,z.Ay)(function(e){const t=s.useRef(void 0);return n=>{const r=e(n);return Pn(t.current,r)?t.current:t.current=r}}(e=>e.suggestionSelection??{x:void 0,y:void 0})),f=(0,s.useCallback)(e=>{e||d()},[d]);(0,s.useEffect)(()=>{m?t():n()},[m,t,n]);const[h,w]=(0,s.useState)(!1),v=(0,s.useCallback)(e=>{const t=document.activeElement?.shadowRoot?.activeElement,n="button"===t?.role||"BUTTON"===t?.nodeName;"Shift"!==e.key?n||"Tab"===e.key?n&&"Enter"!==e.key&&"Tab"!==e.key&&" "!==e.key&&d():d():w(!0)},[d]),B=(0,s.useCallback)(e=>{"Shift"===e.key&&w(!1)},[]);return(0,s.useEffect)(()=>(document.addEventListener("keydown",v),document.addEventListener("keyup",B),()=>{document.removeEventListener("keydown",v),document.removeEventListener("keyup",B)}),[v,B,w]),m&&u&&c?o&&a?(0,b.jsx)(Xn,{suggestionsForPart:c,suggestion:u,x:p,y:g,setOpen:f,shiftPressed:h,getPremium:l}):(0,b.jsx)(Mn,{type:o?"quota-check-not-available":"offline",x:p,y:g,setOpen:f}):null}function Kn(e){let{onOpen:t,onClose:n}=e;const r=(0,s.useCallback)(()=>{t("suggestion-card")},[t]),o=(0,s.useCallback)(()=>{n("suggestion-card")},[n]);return(0,b.jsx)(v.A,{children:(0,b.jsx)(Vn,{onOpen:r,onClose:o})})}var Zn=n(66740);function Jn(e){let{onOpen:t,onClose:n}=e;const r=(0,D.rt)(fe.M),o=y.Ay.use.setHasSeenAdvice(),{steps:a}=function(){const e=Zn.Ay.use.openMenuModal();return{steps:(0,s.useMemo)(()=>[{order:1,title:"NEW! Turn on Supercomplete for faster writing",titleIcon:(0,b.jsx)(Tn.w,{}),description:(0,b.jsx)(b.Fragment,{children:"Supercomplete offers suggestions as you write to help you finish sentences faster."}),referenceElementDataSelector:'[data-journey="toolbar-group-wf-settings"]:not(.hidden)',fallbackReferenceElementDataSelector:".writefull #toolbar-more",offset:{crossAxis:0,mainAxis:6},beforeNext:()=>{(0,q.c)("supercomplete-guide","turn-on-clicked")},afterNext:()=>{const t=document.querySelector(".writefull #toolbar-more"),n=document.querySelector('[data-journey="toolbar-group-wf-settings"]:not(.hidden) button'),r=t&&!n?t.getBoundingClientRect():n?.getBoundingClientRect();e({x:r?.left??0,y:r?.bottom??0})},highlightReferenceElement:!0,placement:"bottom",buttonLabel:"Turn on",buttonVariant:"secondary",buttonRounded:"full",className:"!w-[450px]"},{order:2,title:"How to use Supercomplete",titleIcon:(0,b.jsx)(Tn.w,{}),description:(0,b.jsxs)("ol",{className:"list-decimal pl-4",children:[(0,b.jsx)("li",{children:"Toggle Supercomplete on"}),(0,b.jsx)("li",{children:"Press Shift + Space to see a completion"}),(0,b.jsx)("li",{children:"Press Tab to insert it into your document"})]}),referenceElementDataSelector:'[data-journey="supercomplete-step2"]',"data-settings-close-excluded-element":!0,placement:"right",highlightReferenceElement:!0,offset:{crossAxis:0,mainAxis:2},hideButton:!0}],[e])}}();return(0,s.useEffect)(()=>{t(),(0,q.c)("supercomplete-guide","displayed")},[t]),(0,s.useEffect)(()=>
1(r.getScrollContainer().addEventListener("scroll",n),()=>{r.getScrollContainer().removeEventListener("scroll",n)}),[n,r]),(0,s.useEffect)(()=>{o("supercomplete")},[o]),(0,b.jsx)(I.L_,{steps:a,onClose:n,onCompleted:n,hidePager:!0,withOverlay:!1})}var er=n(63271);const tr=(0,I.jA)(function(e){let{onOpen:t}=e;const n=(0,we.Ay)(e=>!!e.session?.user),r=(0,er.g9)(p.hS.enableFreemiumSuperComplete),o=(0,er.g9)(p.hS.enableSuperCompletePromotion),a=(0,we.Ay)(e=>!e.session?.user.isInstitutional&&(!!e.session?.user?.isPremium||r)),i=(0,y.Ay)(e=>!!e.advices.supercomplete?.hasSeen),A=(0,y.Ay)(e=>!!e.advices.translate?.hasSeen),l=(0,xe.Jw)(),c=(0,s.useMemo)(()=>{const e=new Date;if(!l||!A||!o)return!1;const t=new Date(l),n=Math.abs(e.getTime()-t.getTime());return Math.ceil(n/864e5)>=6},[A,l,o]),u=(0,y.Ay)(e=>e.toolbarVisible),m=y.Ay.use.superCompleteEnabled(),d=y.Ay.use._isSynchronized(),g=y.Ay.use.setHasSeenAdvice(),[f,h]=(0,s.useState)(!1),w=(0,s.useCallback)(()=>{h(!1)},[]);return(0,s.useEffect)(()=>{d&&(m?g("supercomplete"):n&&a&&c&&!i&&!m&&u&&h(!0))},[d,a,c,i,n,m,u,g]),f?(0,b.jsx)(v.A,{children:(0,b.jsx)(Jn,{onOpen:t,onClose:w})}):null},{wrapWithId:"writefull-supercomplete-guide"});var nr=n(60420);function rr(e){let{focus:t,score:n,value:r,onClick:o,onMouseEnter:a}=e;const i=`${Math.round(100*n).toFixed(0)}%`;return(0,b.jsxs)("div",{className:"result-choices-choice",children:[(0,b.jsx)("button",{type:"button",className:X()("result-choices-button",t?"result-choices-button--focus":""),onClick:o,onMouseEnter:a,role:"menuitem","aria-current":t,"data-before":r,style:{"--width":i},children:(0,b.jsx)("div",{className:"result-choices-button-text",children:r})}),(0,b.jsx)("div",{className:"result-choices-score",children:i})]})}function or(e){let{choices:t,className:n="",onChoiceSelected:r}=e;const[o,a]=(0,s.useState)(t[0]);return(0,I.WT)({key:"value",options:t,currentOption:o,setFocus:a}),(0,I.ZT)({keys:[{key:"Enter",onCaptured:()=>{o&&r(o)}}]}),(0,b.jsx)("div",{className:X()(n,"result-choices"),role:"menu",children:t.sort((e,t)=>t.score-e.score).map(e=>(0,b.jsx)(rr,{value:e.value,score:e.score,focus:o?.value===e.value,onClick:()=>r(e),onMouseEnter:()=>a(e)},e.value))})}const ar=(0,s.memo)(or);var ir=n(31427);function Ar(){const e=nr.Ay.use.result(),t=nr.Ay.use.selection(),n=nr.Ay.use.closeInsertion(),r=(0,s.useCallback)(r=>{const o=(0,ir.G)(t,e.replacementIndices??r.offset??null);(0,dn.e)(r.value,o,!1),n()},[t,e,n]);return(0,b.jsx)(ar,{choices:e.results,onChoiceSelected:r})}const lr=(0,s.memo)(Ar);var sr=n(48336);function cr(){return(0,s.useCallback)(()=>{const{result:e,error:t,hasInsertedResult:n}=nr.Ay.getState(),r=!t&&!!e&&e.results.length>0;(0,q.c)("generate-synonyms",t||e?"in-context":"closed",{cardAction:(0,Ot.C)(r,!1,n),ableToRespond:r})},[])}function SynonymsInContextError(){const e=cr(),t=nr.Ay.use.error(),n=nr.Ay.use.close();return(0,b.jsx)("div",{className:"synonyms-in-context__error-wrapper",children:(0,b.jsx)(sr.A,{className:"synonyms-in-context__error-panel",error:t??{type:"warning",title:"No synonyms",body:"No suitable synonyms were found. Please select fewer or more words, and try again."},close:n,track:e})})}const ur=(0,s.memo)(SynonymsInContextError);var mr=n(43552);function dr(){const e=(0,nr.Ay)(e=>e.result),t=(0,nr.Ay)(e=>e.error);return(0,nr.Ay)(e=>e.isExecuting)&&!e?(0,b.jsx)(mr.E,{bars:3,type:"percentages"}):t&&!e||0===e?.results.length?(0,b.jsx)(ur,{}):e?(0,b.jsx)(lr,{}):null}const pr=(0,s.memo)(dr);function gr(e){let{maxHeight:t}=e;const n=nr.Ay.use.selection(),r=nr.Ay.use.error(),o=nr.Ay.use.setResult(),a=nr.Ay.use.setError(),i=nr.Ay.use.setIsExecuting(),A=cr(),l=nr.Ay.use.closeModal(),c=(0,nn.A)({setResult:o,setError:a,setIsExecuting:i,close:l}),u=(0,s.useRef)(null),m=(0,s.useCallback)(()=>{c("ai","generate-synonyms",()=>(0,tn.OI)(n.context,n.target,u.current.signal),!0)},[c,n]);return(0,s.useEffect)(()=>(u.current=new AbortController,m(),()=>{u.current?.abort(),A()}),[m,A]),(0,b.jsx)("div",{className:X()("synonyms-in-context",r?"synonyms-in-context--error":""),style:{height:t?`${t}px`:"auto"},children:(0,b.jsx)(I.az,{title:(0,M.A)("synonyms-in-context"),icon:(0,b.jsx)(k.A,{type:"find_replace"}),className:"synonyms-in-context__container",contentClassName:"synonyms-in-context__content",children:(0,b.jsx)(pr,{})})})}const fr=(0,s.memo)(gr);function hr(e){let{onOpen:t,onClose:n}=e;const r=(0,s.useRef)(n),o=(0,s.useRef)(t),a=nr.Ay.use.isOpen(),i=nr.Ay.use.position(),A=nr.Ay.use.selection(),l=nr.Ay.use.triggerSelector(),c=nr.Ay.use.closeModal(),u=(0,s.useMemo)(()=>({mainAxis:0,crossAxis:-40}),[]),m=(0,s.useCallback)(e=>{e||c()},[c]);return(0,s.useEffect)(()=>{r.current=n,o.current=t},[n,t]),(0,s.useEffect)(()=>{a?o.current():r.current()},[a]),a&&A&&i?(0,b.jsx)(Te.A,{usesPortal:!1,open:a,setOpen:m,x:i?.x,y:i?.y,placement:"bottom-start",disableFlip:!0,offsetPx:u,outsidePressExcludedElements:l?[l]:[],className:"pointer-events-none",children:(0,b.jsx)(fr,{maxHeight:290})}):null}const wr=(0,s.memo)(hr);function xr(e){let{onOpen:t,onClose:n}=e;const r=(0,s.useCallback)(()=>{t("synonyms-in-context")},[t]),o=(0,s.useCallback)(()=>{n("synonyms-in-context")},[n]);return(0,b.jsx)(v.A,{children:(0,b.jsx)(wr,{onOpen:r,onClose:o})})}var br=n(82636),vr=n(63364);function Br(){const{loading:e,send:t}
1=function(){const[e,t]=(0,s.useState)(!1);return{send:(0,s.useCallback)(async()=>{try{t(!0),await(0,vr.y)(),(0,Se.hL)()}catch(e){(0,Se.UG)(e.message)}finally{t(!1)}},[]),loading:e}}(),n=br.Ay.use.closeModal(),r=(0,s.useRef)(null);return(0,b.jsxs)("form",{className:(0,Ee.$z)("[--px:1rem]"),ref:r,onSubmit:async e=>{e.preventDefault(),await t(),n()},"aria-busy":e,children:[(0,b.jsx)("div",{className:(0,Ee.$z)("px-[var(--px)] text-slate-800 dark:text-slate-50"),children:"Premium access via your institution"}),(0,b.jsx)("div",{className:(0,Ee.$z)("flex flex-col mt-4 px-[var(--px)]"),children:"Your institution can get a combined Overleaf-Writefull license instead of you paying for a subscription. Want to help make this happen? Register your interest here! We'll gather the numbers to approach your institution and share your email with them to strengthen our case."}),(0,b.jsxs)("div",{className:(0,Ee.$z)("flex flex-row justify-center"),children:[(0,b.jsx)("div",{className:(0,Ee.$z)("flex justify-end mt-4"),children:(0,b.jsx)(I.$n,{type:"button",variant:"secondary",size:"large",onClick:n,children:"No, thanks"})}),(0,b.jsx)("div",{className:(0,Ee.$z)("flex justify-end px-[var(--px)] mt-4"),children:(0,b.jsx)(I.$n,{type:"submit",variant:"primary",size:"large",children:"Yes, count me in!"})})]})]})}function yr(e){let{onOpen:t,onClose:n}=e;const r=br.Ay.use.isOpen(),o=br.Ay.use.closeModal(),a=()=>{o()};return(0,s.useEffect)(()=>{r?t():n?.()},[r,t,n]),(0,b.jsxs)(I.aF,{isOpen:r,containerClassName:"w-[30rem] relative py-4",onClose:a,children:[(0,b.jsx)(I.pf,{className:(0,Ee.$z)("absolute right-2 top-2 bg-gray-200 hover:text-black dark:text-gray-600 dark:bg-gray-300 hover:dark:text-black"),onClose:a}),(0,b.jsx)(Br,{})]})}const Ir=(0,I.jA)(function(e){let{onOpen:t}=e;return(0,b.jsx)(v.A,{children:(0,b.jsx)(yr,{onOpen:t})})},{wrapWithId:"writefull-try-via-institution-modal"});var Cr=n(8919),jr=n(87231),kr=n(62553),Er=n(53715),Sr=n(3970),Nr=n(56015),Fr=n(98443),_r=n(76202),Or=n(60526),Rr=n(55917);const Pr={"suggestion-card":{close:Or.P,closeWhenScrolling:()=>!z.Ay.getState().pinned&&!Rr.Ay.getState().isOpeningNext,focusEditorOnClose:!0},"context-menu":{close:Cr.b,closeWhenScrolling:()=>!Be.Ay.getState().pinData?.on,focusEditorOnClose:!0},"synonyms-in-context":{close:Sr.X,closeWhenScrolling:()=>!0,focusEditorOnClose:!0},"floating-button":{close:Ke.H,closeWhenScrolling:()=>!0,focusEditorOnClose:!1},"toolbar-settings":{close:_r.h,closeWhenScrolling:()=>!0,focusEditorOnClose:!0},"language-model":{close:Fr.b,closeWhenScrolling:()=>!0,focusEditorOnClose:!0},"overleaf-equation-generator":{close:jr.G,closeWhenScrolling:()=>!0,focusEditorOnClose:!0},"overleaf-figure-generator":{close:kr.a,closeWhenScrolling:()=>!0,focusEditorOnClose:!0},"overleaf-table-generator":{close:Er.w,closeWhenScrolling:()=>!0,focusEditorOnClose:!0},"blocked-language-suggestions":{close:Nr.b,closeWhenScrolling:()=>!0,focusEditorOnClose:!0}};function zr(){const e=(0,D.rt)(fe.M),t=(0,s.useRef)(),n=(0,s.useCallback)(()=>{t.current&&e.getScrollContainer().removeEventListener("scroll",t.current)},[e]),r=(0,s.useCallback)(()=>{Object.values(Pr).forEach(e=>{let{close:t}=e;return t()}),n()},[n]),o=(0,s.useCallback)(t=>{const{focusEditorOnClose:r}=Pr[t];r&&e.focus(),n()},[e,n]),a=(0,s.useCallback)(r=>{const a=()=>{const{close:e,closeWhenScrolling:t}=Pr[r];t()&&(e(),o(r),n())};n(),t.current=a,Object.entries(Pr).filter(e=>{let[t]=e;return t!==r}).forEach(e=>{let[,{close:t}]=e;return t()}),e.getScrollContainer().addEventListener("scroll",a)},[e,o,n]);return(0,s.useEffect)(()=>()=>{n()},[n]),{closeAllFloatingElements:r,handleFloatingElementClosed:o,handleFloatingItemOpened:a}}function Tr(e){let{autofocus:t=!1,children:n=""}=e;const r=(0,s.useRef)(null);return(0,ot.A)({containerRef:t?r:void 0}),(0,b.jsx)("div",{ref:r,children:n})}var Mr=n(20336),$r=n(23462);function Lr(e){let{right:t,secondaryText:n,children:r,className:o="",subitems:a,disableClickWithEnter:i=!1,onClick:A,...l}=e;return(0,b.jsxs)("div",{tabIndex:A?0:-1,className:(0,Ee.$z)(o,"[--px:0.75rem] select-none ",A?"hover:bg-gray-50 dark:hover:bg-slate-700 cursor-pointer focus-inset outline-none":""),role:"menuitem",onClick:A,onKeyUp:e=>{i||"Enter"!==e.key||A?.()},...l,children:[(0,b.jsxs)("div",{className:(0,Ee.$z)("flex flex-row items-center py-2 px-[var(--px)]"),children:[(0,b.jsxs)("div",{className:(0,Ee.$z)("flex-1 truncate"),children:[r,n&&(0,b.jsx)("div",{className:(0,Ee.$z)("text-xs text-slate-400"),children:n})]}),t&&(0,b.jsx)("div",{className:(0,Ee.$z)("shrink-0"),children:t})]}),a&&(0,b.jsx)("div",{className:(0,Ee.$z)("flex flex-col"),children:a.filter(e=>!e.hidden).map(e=>
1(0,b.jsxs)("div",{tabIndex:-1,className:(0,Ee.$z)("flex flex-row items-center","py-1 px-[var(--px)]","overflow-hidden",e.onClick?"hover:bg-gray-50 dark:hover:bg-slate-700 cursor-pointer ":""),role:"menuitem",onClick:e.onClick,onKeyDown:t=>{"Enter"!==t.key&&" "!==t.key||(t.target===t.currentTarget||" "!==t.key?(t.preventDefault(),e.onClick?.(t)):t.preventDefault())},children:[(0,b.jsx)("div",{className:(0,Ee.$z)("flex-1 text-xs truncate"),children:e.title}),(0,b.jsx)("div",{className:(0,Ee.$z)("shrink-0"),children:e.right})]},e.title))})]})}function Dr(e){let{children:t="",onClick:n}=e;return(0,b.jsx)(Lr,{className:"group",onClick:n,right:(0,b.jsx)(k.A,{type:"open_in_new",className:(0,Ee.$z)("text-gray-400 opacity-0 transition-opacity","group-hover:opacity-100 group-focus:opacity-100","align-sub")}),children:t})}const Ur=`${Mr.A.VITE_WF_CUSTOMER_PORTAL_URL}/account`;function Wr(){const e=(0,we.Ay)(e=>"login-with-overleaf"===e.session?.method);return(0,b.jsx)(Dr,{onClick:()=>{(0,$r.s)("open-account"),(0,q.c)("generic","opened-account");let t=Ur;if(e){t+=`?overleafUserId=${(0,xe.ms)()}`}window.open(t,"_blank","noopener,noreferrer")},children:(0,M.A)("settings.account")})}var qr=n(63810);function Qr(){return(0,b.jsx)(Dr,{onClick:()=>{(0,q.c)("generic","manage-plan"),(0,qr.f)()},children:(0,M.A)("settings.manage-plan.wf-premium")})}var Hr=n(90951);function Yr(){return(0,b.jsx)(Lr,{onClick:()=>{(0,$r.s)("log-out"),(0,q.c)("sign","sign-out"),(0,Hr.C)()},children:(0,M.A)("settings.sign-out")})}var Gr=n(86770),Xr=n(15429);function Vr(e){let{onClick:t,...n}=e;return(0,b.jsx)("button",{type:"button",onClick:t,"aria-label":(0,M.A)("settings.open"),...n,children:(0,b.jsx)(I.p2,{icon:(0,b.jsx)(k.A,{type:"chevron_right"}),className:(0,Ee.$z)("w-4 h-4 opacity-60 hover:opacity-100 transition-opacity translate-y-[2px]")})})}const Kr=()=>{requestAnimationFrame(()=>{const e=document.querySelector('[data-overflow="wf-settings-option"]');if(e instanceof HTMLElement){const t=e.querySelector('button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])');t instanceof HTMLElement?t.focus():e.focus()}})};function Zr(){const e=y.Ay.use.languageCheckEnabled(),t=y.Ay.use.englishVariant(),n=P.Ay.use.model(),r=(0,B.u)(p.hS.rebrand)?"toggle-accent-green":void 0,o=()=>{e?(0,Z.$4)():(0,Z.Oo)()},a=e=>{(0,_r.h)(),(0,H.L)("keydown"===e.type?Kr:void 0)},i=e=>{(0,_r.h)(),(0,Gr.T)("keydown"===e.type?Kr:void 0)},A="writefull"===n?(0,M.A)("settings.writefulls-model"):`${(0,M.A)("settings.gpt-model")}${"gpt-prompt"===n?(0,M.A)("settings.with-custom-prompt"):""}`;return(0,b.jsx)(Lr,{subitems:[{onClick:o,right:(0,b.jsx)(I.lM,{size:"small",checked:e,onChange:o,"aria-label":(0,M.A)("settings.language-check"),className:r}),title:(0,M.A)("settings.language-check")},{hidden:!e,onClick:a,right:(0,b.jsx)(Vr,{onClick:a,"aria-label":A}),title:A},{hidden:!e,onClick:Xr.C,right:(0,b.jsx)(I.Wu,{size:"small",checked:"en_US"===t,onChange:Xr.C,"aria-label":(0,M.A)("settings.english-variant",{variant:"en_US"===t?"American":"British"}),className:r}),title:(0,M.A)("settings.english-variant",{variant:"en_US"===t?"American":"British"})},{right:(0,b.jsx)(Vr,{onClick:i,"aria-label":(0,M.A)("settings.blocked-language-suggestions")}),onClick:i,title:(0,M.A)("settings.blocked-language-suggestions")}],children:(0,M.A)("settings.language-suggestions")})}var Jr=n(50058);function eo(){const e=y.Ay.use.partsDebugEnabled();return(0,b.jsx)(Lr,{right:(0,b.jsx)(I.lM,{size:"small",checked:e,onChange:Jr.O,className:"toggle-accent-green"}),secondaryText:"Reload to apply changes","aria-label":"Toggle suggestions parts debug mode","aria-description":"Reload to apply changes",children:"Suggestions parts debug"})}var to=n(64024);function no(){const e=y.Ay.use.superCompleteEnabled(),{hasGivenAiConsent:t}=(0,Nt.A)(),[n,r]=(0,s.useState)(!1),[o,a]=(0,s.useState)(null),i=()=>{t||e?(0,to.r)():r(!0)},A=(0,s.useRef)(null);return(0,s.useEffect)(()=>{setTimeout(()=>{if(A.current){const e=A.current.getBoundingClientRect();a({x:e.right,y:e.top})}},0)},[A]),(0,b.jsxs)("div",{ref:A,children:[(0,b.jsx)(Lr,{onClick:i,right:(0,b.jsx)(I.lM,{size:"small",checked:e,onChange:i,"aria-label":(0,M.A)("settings.supercomplete"),"aria-description":(0,M.A)("settings.complete-sentences-with-shift-space"),className:"toggle-accent-green"}),secondaryText:(0,M.A)("settings.complete-sentences-with-shift-space"),disableClickWithEnter:n,"data-journey":"supercomplete-step2",children:(0,M.A)("settings.supercomplete")}
1),(0,b.jsx)(Te.A,{open:n,className:"max-w-[500px]",x:o?.x,y:o?.y,setOpen:r,placement:"bottom-start",disableDismiss:!0,children:n&&(0,b.jsx)(I.mc,{className:"p-4",children:(0,b.jsx)(sr.A,{disableCloseWithEnter:!0,error:{title:(0,M.A)("settings.terms-of-service"),type:"accept-tos",onAccepted:()=>{(0,to.r)(),r(!1)}}})})})]})}var ro=n(78010);function oo(){const e=y.Ay.use.aiSpaceTriggerDisabled(),t=Ve(),n="default"===(0,xe.bP)();return(0,b.jsx)(Lr,{subitems:[{onClick:Qe.T,right:(0,b.jsx)(I.lM,{size:"small",checked:t,onChange:Qe.T,"aria-label":(0,M.A)("settings.active-on-text-selection"),className:"toggle-accent-green"}),title:(0,M.A)("settings.active-on-text-selection")},...n?[{onClick:ro.v,right:(0,b.jsx)(I.lM,{size:"small",checked:!e,onChange:ro.v,"aria-label":(0,M.A)("settings.active-with-space-on-empty-line"),className:"toggle-accent-green"}),title:(0,M.A)("settings.active-with-space-on-empty-line")}]:[]],children:(0,M.A)("settings.texgpt-context-menu")})}function ao(){const e=(0,we.Ay)(e=>e.session?.user);return e?(0,b.jsx)(Lr,{children:(0,b.jsx)("span",{className:(0,Ee.$z)("text-[11px] uppercase text-slate-500 dark:text-slate-400 text-xs"),children:e.email})}):null}function io(){return(0,b.jsx)(Lr,{children:(0,b.jsxs)("div",{className:(0,Ee.$z)("text-xs text-slate-400"),children:["version ",(0,b.jsx)("span",{className:(0,Ee.$z)("select-text"),children:p.ix})]})})}function Ao(e){let{onOpen:t,onClose:n}=e;const r=(0,Zn.Ay)(e=>e.menu.open),o=(0,Zn.Ay)(e=>e.menu.position),a=Zn.Ay.use.closeMenuModal(),i=(0,we.Ay)(e=>e.session?.user),A=(0,s.useRef)(null),{hasAutoCreatedAccountUX:l}={hasAutoCreatedAccountUX:"login-with-overleaf"===(0,we.Ay)(e=>e.session?.method)},c=(0,xe.CA)()||l,u=!c,m=!c,d=!c,g=(0,we.Ay)(e=>c&&!e?.session?.user.isPremium&&!e?.session?.user.isPaid),f=(0,we.Ay)(e=>c&&!!e?.session?.user?.subscription?.paymentProvider&&"group"!==e?.session?.user?.subscription?.paymentProvider&&e?.session?.user.isPaid),h="enabled"===(0,B.Q9)(p.hS.enableFreemiumSuperComplete).variant,w=i?.config?.features?.enableDebugMode,x=i?.isInstitutional,v=!x&&(i?.isPremium||h),y=(0,s.useCallback)(e=>{e?t("toolbar-settings"):(a(),n("toolbar-settings"))},[n,t,a]);return r&&o?(0,b.jsx)(Te.A,{open:r,setOpen:y,x:o.x,y:o.y,outsidePressExcludedElements:['[aria-label="Settings"]','[data-settings-close-excluded-element="true"]'],children:(0,b.jsxs)("div",{ref:A,className:(0,Ee.$z)("w-[284px] bg-white dark:bg-slate-800 rounded-md shadow-md","font-os antialiased text-black dark:text-white text-sm","divide-y divide-gray-100 dark:divide-slate-700"),"aria-label":(0,M.A)("settings.settings"),"aria-description":(0,M.A)("settings.settings-description"),children:[m&&(0,b.jsx)(Tr,{children:(0,b.jsx)(ao,{})}),(0,b.jsx)(Tr,{autofocus:!0,children:(0,b.jsx)(Zr,{})}),(0,b.jsx)(Tr,{children:(0,b.jsx)(oo,{})}),v&&(0,b.jsx)(Tr,{children:(0,b.jsx)(no,{})}),w&&(0,b.jsx)(Tr,{children:(0,b.jsx)(eo,{})}),(!0===f||!0===g||d||u)&&(0,b.jsxs)(Tr,{children:[f&&(0,b.jsx)(Qr,{}),d&&(0,b.jsx)(Wr,{}),u&&(0,b.jsx)(Yr,{})]}),(0,b.jsx)(Tr,{children:(0,b.jsx)(io,{})})]})}):null}function lo(e){let{onOpen:t,onClose:n}=e;return(0,b.jsx)(Ao,{onOpen:t,onClose:n})}function so(){const e=(0,B.u)(p.hS.rebrand),t=y.Ay.use.toolbarVisible(),n=y.Ay.use.languageCheckEnabled(),r=Ve(),o=(0,B.u)("writefull-toolbar-migration"),{closeAllFloatingElements:a,handleFloatingElementClosed:i,handleFloatingItemOpened:A}=zr();return(0,b.jsxs)("div",{className:"writefull",children:[(0,b.jsx)(Et,{}),(0,b.jsx)(Fn,{onOpen:A,onClose:i}),(0,b.jsx)(yn,{onOpen:A,onClose:i}),(0,b.jsx)(kn,{onOpen:A,onClose:i}),(0,b.jsx)(Fe,{}),!e&&(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(Ie,{onOpen:A,onClose:i}),(0,b.jsx)(xr,{onOpen:A,onClose:i})]}),t&&(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(lo,{onOpen:A,onClose:i}),(0,b.jsx)(ge,{onOpen:A,onClose:i}),(0,b.jsx)(tr,{onOpen:a}),(0,b.jsx)(Pe,{})]}),(t||n)&&(0,b.jsx)(b.Fragment,{children:(0,b.jsx)(Ir,{onOpen:a})}),!e&&n&&(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(Kn,{onOpen:A,onClose:i}),(0,b.jsx)(It,{onOpen:A,onClose:i})]}),!o&&r&&(0,b.jsx)(rt,{onOpen:A,onClose:i})]})}var co=n(61979),uo=n(31465);var mo=n(63919),po=n(78852),go=n(28151),fo=n(6854);var ho=n(51845);function wo(){const{currentDocument:e}=(0,K.Wq)(),t=(0,D.rt)(fe.M),n=(0,D.rt)(co.w),r=(0,D.rt)(fo.L),o=(0,D.rt)(ho.C),a=we.Ay.use.session(),i=z.Ay.use.open(),A=z.Ay.use.close(),l=z.Ay.use.selectSuggestion();!function(){const e=(0,D.rt)(fo.L);(0,s.useEffect)(()=>{const t=P.Ay.subscribe((t,n)=>{let{model:r,prompt:o}=t,{model:a,prompt:i}=n;r===a&&o===i||e.onLanguageModelChanged()});return()=>{t()}},[e])}(),function(){const e=(0,D.rt)(fo.L);(0,s.useEffect)(()=>{const t=y.Ay.subscribe(e=>e.englishVariant,(t,n)=>e.onEnglishVariantChanged(n));return()=>{t()}},[e])}(),function(){const e=(0,D.rt)(fo.L);(0,s.useEffect)(()=>{const t=y.Ay.subscribe(e=>e.languageCheckEnabled,()=>e.onLanguageCheckEnabledChanged());return()=>{t()}},[e])}(),function(){const e=(0,D.rt)(fo.L);(0,s.useEffect)(()=>{const t=Ae.Ay.subscribe(e=>e.frontEndQuotaExceeded,(t,n)=>{t&&t!==n&&e.forceRecheck()});return()=>{t()}},[e])}(),function(){const e=(0,D.rt)(fo.L);(0,s.useEffect)(()=>{const t=R.Ay.subscribe(e=>e.hasUserInteracted,t=>{t&&e.forceRecheck()});return()=>{t()}},[e])}(),(0,s.useEffect)(()=>()=>{r.deinit()},[r]),(0,s.useEffect)(()=>
1{if(n){const{data:e}=n.onAuthStateChange(e=>{"SIGNED_OUT"!==e&&"REFRESH_TOKEN_EXPIRED"!==e||(r?.reset(),A())});return()=>{e?.unsubscribe()}}return()=>{}},[n,r,A]),(0,s.useEffect)(()=>{if(!t||!a?.initialized)return;const e=()=>{A()},n=()=>{const e=r.getSuggestionSelection(),t=r.getSuggestionsForPart(e.suggestion.partId);l(e,t)},s=e=>{(e=>{const{source:t,selectionAlreadyClicked:n,origin:a}=e?.detail||{};"right-click"!==a&&setTimeout(()=>{i();const{frontEndQuotaExceeded:e,backEndQuotaExceeded:A}=Ae.Ay.getState(),l=r.getSuggestionSelection();n||e||A.suggest||(0,q.c)("suggestion","clicked",{type:l?.suggestion?.type,source:t,origin:a}),o.check()},100)})(e)},c=()=>{A()},u=e=>{const{numberOfAcceptedSuggestions:t}=e.detail;(0,po.u)(t).then(()=>{c()})},m=e=>{const{numberOfRejectedSuggestions:t}=e.detail;(0,go.b)(t).then(()=>{c()})};return document.addEventListener(p.lS.editorViewportChanged,e),document.addEventListener(p.lS.suggestSuggestionSelected,n),document.addEventListener(p.lS.suggestSuggestionClicked,s),document.addEventListener(p.lS.suggestSuggestionUnselected,c),document.addEventListener(p.lS.suggestSuggestionAccepted,u),document.addEventListener(p.lS.suggestSuggestionRejected,m),r.init(),()=>{document.removeEventListener(p.lS.editorViewportChanged,e),document.removeEventListener(p.lS.suggestSuggestionSelected,n),document.removeEventListener(p.lS.suggestSuggestionClicked,s),document.removeEventListener(p.lS.suggestSuggestionUnselected,c),document.removeEventListener(p.lS.suggestSuggestionAccepted,u),document.removeEventListener(p.lS.suggestSuggestionRejected,m)}},[r,n,t,a?.initialized,e,A,i,l,o]),(0,s.useEffect)(()=>{r&&n&&(0,mo.w)()},[r,a?.user?.config,n])}function xo(){return wo(),function(){const e=(0,xe.Yq)(),t=(0,D.rt)(fe.M),n=(0,D.rt)(co.w),r=(0,D.QE)(uo.Q),o=we.Ay.use.session();(0,s.useEffect)(()=>{if(!e)return;t&&o?.initialized&&r?.init();const{data:a}=n?n.onAuthStateChange(e=>{"SIGNED_OUT"!==e&&"REFRESH_TOKEN_EXPIRED"!==e||r?.reset()}):{data:null};return()=>{a?.unsubscribe(),r?.deinit()}},[e,t,o,n,r])}(),null}var bo=n(19472),vo=n(13591),Bo=n(98798),yo=(n(79929),n(79063),n(25226),n(19031),n(64144),n(66663),n(70091),n(80332));const Io=new Set(["the","be","to","of","and","a","in","that","have","i","it","for","not","on","with","he","as","you","do","at"]),Co={e:12.7,t:9.1,a:8.2,o:7.5,i:7,n:6.7,s:6.3,h:6.1,r:6,d:4.3},jo=["th","he","an","in","er","on","at","en","es","ing"],ko=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:.55,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:20;if(n<1)throw new Error("minWordCount must be at least 1");if(t<0||t>1)throw new Error("threshold must be between 0 and 1");if(!e||"string"!=typeof e)return null;const r=(e=>{const t=e.replaceAll(yo.Im,"").replaceAll(yo.tA,"").replaceAll(yo.w3,"").replaceAll(yo.Bj,"").replaceAll(yo.Cm,"").replaceAll(yo.FF,"|<BD>|").replaceAll(yo.Fj,"|<ED>|").replaceAll(yo.Y3,"|<BCJK>|").replaceAll(yo.yy,"|<ECJK>|").replaceAll(yo.SQ,"").replaceAll(yo.Ws,"").replaceAll(yo.eS,"").replaceAll(yo.qi,"").replaceAll(yo.NN,"").replaceAll(yo.pZ,"").replaceAll(yo.eM,"").replaceAll(yo.PB,"").replaceAll(yo._b,"").replaceAll(yo.EE,"").replaceAll(yo.rA,"").replaceAll(yo.z8,"").replaceAll(yo.r2,"").replaceAll(yo.gS,"").replaceAll(yo.Iv,"").replaceAll(yo.E9,"").replaceAll(yo.YO,"").replaceAll(yo.UP,"").replaceAll(yo.FN,"").replaceAll(yo.eC,"").replaceAll(yo.MM,"").replaceAll(yo.c1,"").replaceAll(yo.vP,"").replaceAll(yo.Tv,"").replaceAll(yo.tp,"").replaceAll(yo.$j,"").replaceAll(yo.AS,"").replaceAll(yo.cA,"").replaceAll(yo.G5,""),n=/\|<BD>\|/.exec(t),r=/\|<ED>\|/.exec(t);let o=t;if(null!==n&&null!==r){const e=n.index+n[0].length,a=r.index;o=t.substring(e,a)}return o})(e),o=(0,Ee.rj)(r);if(o<n||0===o)return null;const a=r.toLowerCase().trim(),i=(e=>{const t=(0,Ee.yM)(e);return 0===t.length?0:t.filter(e=>Io.has(e)).length/t.length})(a),A=(e=>{const t=e.replace(/[^a-z]/g,"");if(0===t.length)return 0;const n={};for(const e of t)n[e]=(n[e]||0)+1;let r=0;for(const[e,o]of Object.entries(Co)){const a=100*(n[e]||0)/t.length,i=Math.abs(o-a);r+=Math.max(0,1-i/o)}return r/Object.keys(Co).length})(a),l=(e=>{let t=0;for(const n of jo){const r=new RegExp(n,"g");t+=(e.match(r)??[]).length}return Math.min(1,t/(e.length/10))})(a),s=(e=>
1{const t=e.split(/[.!?]+/).filter(Boolean);if(0===t.length)return 0;let n=0;for(const e of t)/^[A-Z].*\s+.*$/g.test(e.trim())&&(n+=1);return n/t.length})(r);return.4*i+.3*A+.2*l+.1*s>=t};var Eo=n(79702),So=n(32129);function No(){const{view:e}=(0,Eo.xl)(),{currentDocument:t}=(0,K.Wq)(),n=(0,D.rt)(fe.M),r=(0,s.useRef)(!1),o=R.Ay.use.setSelection(),a=R.Ay.use.setIsEnglish(),i=R.Ay.use.setUserHasInteracted(),A=(0,s.useCallback)((e,t)=>{const n=O.Ay.getState()[e]?.isEnglish;if(n)return void a(!0);const r=ko(t);a(r)},[a]),l=(0,s.useCallback)(e=>{const t=e.transactions[0]?.annotations,n=t?.map(e=>e.value).filter(e=>"string"==typeof e);n?.length&&!R.Ay.getState().hasUserInteracted&&i()},[i]),c=(0,s.useCallback)(e=>{if(!e.transactions?.length)return;const t=e.transactions[0]?.annotations,n=t?.map(e=>e.value).filter(e=>"string"==typeof e);n?.length&&(document.dispatchEvent(new CustomEvent(p.lS.editorUserEvent,{detail:n[0]})),l(e))},[l]),u=(0,s.useCallback)(e=>{const t=e.transactions.some(e=>e.isUserEvent("input")||e.isUserEvent("delete")||e.isUserEvent("move")||e.annotation(e.constructor.remote));t&&o(null),document.dispatchEvent(new CustomEvent(p.lS.editorViewportChanged,{detail:{...e?.view?.viewState?.viewport,userUpdatedEvent:t}})),l(e)},[l,o]),m=(0,s.useCallback)(async e=>{const t=e?.state?.selection?.ranges[0],{from:r,to:o}=t,a=n.underlineMarkerManager.getMarkersInRange({from:o,to:o});if(a?.length){const e=n.getCoordsAtPos(r),t=n.getCoordsAtPos(o);if(!e||!t)return void document.dispatchEvent(new CustomEvent(p.lS.editorMarkerUnselected));const{top:i,left:A}=e,{right:l,bottom:s}=t,{suggestion:c}=a[0],{x:u,y:m}=(0,Xe.A)({top:i,left:A,right:l,bottom:s});await(0,Bo.H)()||document.dispatchEvent(new CustomEvent(p.lS.editorMarkerSelected,{detail:{suggestion:c,event:{clientX:u,clientY:m}}}))}else document.dispatchEvent(new CustomEvent(p.lS.editorMarkerUnselected))},[n]),d=(0,s.useCallback)(e=>{const t=e.transactions[0];t.isUserEvent("select")&&!t.isUserEvent("select.pointer")&&document.dispatchEvent(new CustomEvent(p.lS.editorSelectionChanged))},[]),g=(0,s.useCallback)(e=>{c(e),(e.docChanged||e.viewportChanged)&&(u(e),e.transactions.some(e=>e.isUserEvent("undo"))&&(e=>{document.dispatchEvent(new CustomEvent(p.lS.editorDocUndo,{detail:e}))})(e)),e.selectionSet&&(d(e),m(e))},[u,m,d,c]),f=(0,s.useCallback)(e=>{setTimeout(()=>{const t=n.getSelection();o({...t,clientX:e.detail.clientX,clientY:e.detail.clientY})},0)},[n,o]),h=(0,s.useCallback)(()=>{const e=n.getSelection();o(e)},[n,o]),w=(0,s.useCallback)(e=>{r.current=n?.getContentContainer().contains(e.target)},[n]),x=(0,s.useCallback)(()=>{n.getScrollContainer().removeEventListener("scroll",x),i()},[n,i]),b=(0,s.useCallback)(e=>{let{clientX:t,clientY:n}=e;r.current&&document.dispatchEvent(new CustomEvent(p.lS.editorMouseUp,{detail:{clientX:t,clientY:n}})),r.current=!1},[]);(0,s.useEffect)(()=>{t&&e&&e.dispatch({effects:vo.Pe.appendConfig.of([bo.Lz.updateListener.of(g)])})},[e,t,g]),(0,s.useEffect)(()=>{if(!t||!e)return;(0,So.N)((0,xe.EP)())&&A(t.doc_id,e.state.doc.toString())},[e,t,A]),(0,s.useEffect)(()=>{const e=(0,Ee.sg)(h,50);return document.addEventListener(p.lS.editorMouseUp,f),document.addEventListener(p.lS.editorSelectionChanged,e),document.addEventListener("mousedown",w),document.addEventListener("mouseup",b),n.getScrollContainer().addEventListener("scroll",x),()=>{document.removeEventListener(p.lS.editorMouseUp,f),document.removeEventListener(p.lS.editorSelectionChanged,e),document.removeEventListener("mousedown",w),document.removeEventListener("mouseup",b),n.getScrollContainer().removeEventListener("scroll",x),n.onDeinit()}},[n,f,h,w,b,x])}function Fo(){const e=y.Ay.use.languageCheckEnabled();return function(){const e=y.Ay.use.hasAcceptedAutoLogin(),t=y.Ay.use.acceptAutoLogin(),{isUserInNewUsersAfterMay:n}=Qn();(0,s.useEffect)(()=>{(0,xe.CA)()&&n&&null===e&&t(!0)},[e,n,t])}(),No(),(0,b.jsx)(b.Fragment,{children:e&&(0,b.jsx)(xo,{})})}function _o(){const e=(0,we.Ay)(e=>e.session);return!!e?.user&&e?(0,xe.CA)()&&"login-with-overleaf"===e.method&&e.user?.overleaf?.id!==(0,xe.ms)()?(console.warn("Overleaf ID mismatch. The session Overleaf ID does not match the current Overleaf ID."),null):(0,b.jsx)(Fo,{}):null}
1r(),A(),o(),i(),a(),l();var Oo=n(27642),Ro={};Ro.styleTagTransform=function e(){return e.c||(e.c=n.n(l()))}()(),Ro.setAttributes=function e(){return e.c||(e.c=n.n(i()))}()(),Ro.insert=function e(){return e.c||(e.c=n.n(o()))}()().bind(null,"head"),Ro.domAPI=function e(){return e.c||(e.c=n.n(A()))}()(),Ro.insertStyleElement=function e(){return e.c||(e.c=n.n(a()))}()();(function e(){return e.c||(e.c=n.n(r()))})()()(Oo.A,Ro);Oo.A&&Oo.A.locals&&Oo.A.locals;var Po=n(67785);function zo(){const e=(0,B.u)(p.hS.rebrand),t=y.Ay.use.languageCheckEnabled(),{handleFloatingElementClosed:n,handleFloatingItemOpened:r}=zr();return e?(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(Ie,{onOpen:r,onClose:n}),(0,b.jsx)(xr,{onOpen:r,onClose:n}),t&&(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(Kn,{onOpen:r,onClose:n}),(0,b.jsx)(It,{onOpen:r,onClose:n})]})]}):null}function To(){const{setPremiumSuggestionResetDate:e,setSuggestionsLeft:t,suggestionsLeft:n,premiumSuggestionResetDate:r}=(0,x.mi)(),o=Ae.Ay.use.overleafOverleafSuggestionsLeft(),a=Ae.Ay.use.overleafOverleafPremiumSuggestionResetDate();return(0,s.useEffect)(()=>{null!==o&&n!==o&&t(o)},[n,o,t]),(0,s.useEffect)(()=>{r!==a&&null!==a&&e(a)},[r,a,e]),(0,b.jsx)(b.Fragment,{})}var Mo=n(19519),$o=n(44033),Lo=n(36155),Do=n(6265);const Uo="#toolbar-menu-bar-item-insert",Wo=(0,b.jsx)("img",{src:Lo,alt:"","aria-hidden":"true",style:{width:"1em",height:"1em"}});function qo(e){return()=>{const t=document.querySelector(Uo),n=t?.getBoundingClientRect(),r=n?{x:n.left,y:n.bottom}:null;(0,Je.$)(r,"toolbar",e,null,Uo)}}function Qo(){return function(){const{openEntity:e}=(0,Do.r)(),t=(0,So.V)(e?.entity?.name);(0,Mo.w)(()=>{if(t)return[{id:"writefull-abstract-generator",label:(0,M.A)("insert-menu.abstract-generator"),leadingIcon:Wo,handler:qo($o.X.abstractGenerator)},{id:"writefull-keywords-generator",label:(0,M.A)("insert-menu.keywords-generator"),leadingIcon:Wo,handler:qo($o.X.keywordsGenerator)},{id:"writefull-title-generator",label:(0,M.A)("insert-menu.title-generator"),leadingIcon:Wo,handler:qo($o.X.titleGenerator)}]},[t])}(),null}
1function Ho(){const{isInfrastructureInitialized:e}=(0,Po.D)();return e?(0,b.jsx)(D.Ht,{children:(0,b.jsxs)(v.A,{children:[(0,b.jsx)(_o,{}),(0,b.jsx)(so,{}),(0,b.jsx)(zo,{}),(0,b.jsx)(To,{}),(0,b.jsx)(Qo,{})]})}):null}function Yo(){const[e,t]=(0,s.useState)(!1),{writefullInstance:n,setWritefullInstance:r}=(0,x.mi)(),o=!!n,a=(0,s.useCallback)(()=>{t(!0)},[]);return(0,s.useEffect)(()=>{if(!o)try{const e=(c.$.log("[Writefull] Initializing"),window.setTimeout(()=>{window.dispatchEvent(new Event("editor:extension-loaded"))},100),w);r(e)}catch(e){t(!0),c.$.error("Error loading Writefull",e)}},[o,r]),!o||e?null:(0,b.jsx)(v.A,{onError:a,children:(0,b.jsx)(Ho,{})})}},27642(e,t,n){var r=n(19504),o=n.n(r),a=n(67984),i=n.n(a)()(o());i.push([e.id,'.\\!container {\n width: 100% !important\n}\n.container {\n width: 100% !important\n}\n@media (min-width: 500px) {\n .\\!container {\n max-width: 500px !important\n }\n .container {\n max-width: 500px !important\n }\n}\n@media (min-width: 640px) {\n .\\!container {\n max-width: 640px !important\n }\n .container {\n max-width: 640px !important\n }\n}\n@media (min-width: 650px) {\n .\\!container {\n max-width: 650px !important\n }\n .container {\n max-width: 650px !important\n }\n}\n@media (min-width: 768px) {\n .\\!container {\n max-width: 768px !important\n }\n .container {\n max-width: 768px !important\n }\n}\n@media (min-width: 1024px) {\n .\\!container {\n max-width: 1024px !important\n }\n .container {\n max-width: 1024px !important\n }\n}\n@media (min-width: 1280px) {\n .\\!container {\n max-width: 1280px !important\n }\n .container {\n max-width: 1280px !important\n }\n}\n@media (min-width: 1536px) {\n .\\!container {\n max-width: 1536px !important\n }\n .container {\n max-width: 1536px !important\n }\n}\n.writefull .sr-only {\n position: absolute !important;\n width: 1px !important;\n height: 1px !important;\n padding: 0 !important;\n margin: -1px !important;\n overflow: hidden !important;\n clip: rect(0, 0, 0, 0) !important;\n white-space: nowrap !important;\n border-width: 0 !important\n}\n.writefull .pointer-events-none {\n pointer-events: none !important\n}\n.writefull .pointer-events-auto {\n pointer-events: auto !important\n}\n.writefull .visible {\n visibility: visible !important\n}\n.writefull .static {\n position: static !important\n}\n.writefull .fixed {\n position: fixed !important\n}\n.writefull .absolute {\n position: absolute !important\n}\n.writefull .relative {\n position: relative !important\n}\n.writefull .sticky {\n position: sticky !important\n}\n.writefull .inset-0 {\n inset: 0px !important\n}\n.writefull .bottom-4 {\n bottom: 1rem !important\n}\n.writefull .bottom-\\[10px\\] {\n bottom: 10px !important\n}\n.writefull .bottom-full {\n bottom: 100% !important\n}\n.writefull .left-1\\/2 {\n left: 50% !important\n}\n.writefull .left-4 {\n left: 1rem !important\n}\n.writefull .right-0 {\n right: 0px !important\n}\n.writefull .right-0\\.5 {\n right: 0.125rem !important\n}\n.writefull .right-2 {\n right: 0.5rem !important\n}\n.writefull .right-3 {\n right: 0.75rem !important\n}\n.writefull .right-\\[50px\\] {\n right: 50px !important\n}\n.writefull .top-0 {\n top: 0px !important\n}\n.writefull .top-0\\.5 {\n top: 0.125rem !important\n}\n.writefull .top-1\\/2 {\n top: 50% !important\n}\n.writefull .top-2 {\n top: 0.5rem !important\n}\n.writefull .top-3 {\n top: 0.75rem !important\n}\n.writefull .z-10 {\n z-index: 10 !important\n}\n.writefull .z-50 {\n z-index: 50 !important\n}\n.writefull .z-\\[120\\] {\n z-index: 120 !important\n}\n.writefull .col-span-2 {\n grid-column: span 2 / span 2 !important\n}\n.writefull .m-0\\.5 {\n margin: 0.125rem !important\n}\n.writefull .mx-4 {\n margin-left: 1rem !important;\n margin-right: 1rem !important\n}\n.writefull .my-1 {\n margin-top: 0.25rem !important;\n margin-bottom: 0.25rem !important\n}\n.writefull .mb-1 {\n margin-bottom: 0.25rem !important\n}\n.writefull .mb-10 {\n margin-bottom: 2.5rem !important\n}\n.writefull .mb-12 {\n margin-bottom: 3rem !important\n}\n.writefull .mb-2 {\n margin-bottom: 0.5rem !important\n}\n.writefull .mb-4 {\n margin-bottom: 1rem !important\n}\n.writefull .mb-6 {\n margin-bottom: 1.5rem !important\n}\n.writefull .mb-8 {\n margin-bottom: 2rem !important\n}\n.writefull .me-2 {\n margin-inline-end: 0.5rem !important\n}\n.writefull .ml-1 {\n margin-left: 0.25rem !important\n}\n.writefull .ml-3 {\n margin-left: 0.75rem !important\n}\n.writefull .ml-4 {\n margin-left: 1rem !important\n}\n.writefull .mr-2 {\n margin-right: 0.5rem !important\n}\n.writefull .mr-3 {\n margin-right: 0.75rem !important\n}\n.writefull .mt-0 {\n margin-top: 0px !important\n}\n.writefull .mt-1 {\n margin-top: 0.25rem !important\n}\n.writefull .mt-2 {\n margin-top: 0.5rem !important\n}\n.writefull .mt-3 {\n margin-top: 0.75rem !important\n}\n.writefull .mt-4 {\n margin-top: 1rem !important\n}\n.writefull .mt-\\[28px\\] {\n margin-top: 28px !important\n}\n.writefull .block {\n display: block !important\n}\n.writefull .inline {\n display: inline !important\n}\n.writefull .flex {\n display: flex !important\n}\n.writefull .\\!inline-flex {\n display: inline-flex !important\n}\n.writefull .table {\n display: table !important\n}\n.writefull .grid {\n display: grid !important\n}\n.writefull .hidden {\n display: none !important\n}\n.writefull .h-4 {\n height: 1rem !important\n}\n.writefull .h-5 {\n height: 1.25rem !important\n}\n.writefull .h-6 {\n height: 1.5rem !important\n}\n.writefull .h-\\[16rem\\] {\n height: 16rem !important\n}\n.writefull .h-\\[24px\\] {\n height: 24px !important\n}\n.writefull .h-\\[42px\\] {\n height: 42px !important\n}\n.writefull .h-fit {\n height: -moz-fit-content !important;\n height: fit-content !important\n}\n.writefull .h-full {\n height: 100% !important\n}\n.writefull .max-h-\\[14rem\\] {\n max-height: 14rem !important\n}\n.writefull .max-h-\\[18rem\\] {\n max-height: 18rem !important\n}\n.writefull .max-h-\\[90vh\\] {\n max-height: 90vh !important\n}\n.writefull .\\!w-\\[450px\\] {\n width: 450px !important\n}\n.writefull .w-4 {\n width: 1rem !important\n}\n.writefull .w-5 {\n width: 1.25rem !important\n}\n.writefull .w-6 {\n width: 1.5rem !important\n}\n.writefull .w-\\[284px\\] {\n width: 284px !important\n}\n.writefull .w-\\[30rem\\] {\n width: 30rem !important\n}\n.writefull .w-\\[40rem\\] {\n width: 40rem !important\n}\n.writefull .w-\\[450px\\] {\n width: 450px !important\n}\n.writefull .w-fit {\n width: -moz-fit-content !important;\n width: fit-content !important\n}\n.writefull .w-full {\n width: 100% !important\n}\n.writefull .w-max {\n width: -moz-max-content !important;\n width: max-content !important\n}\n.writefull .min-w-\\[60px\\] {\n min-width: 60px !important\n}\n.writefull .min-w-\\[var\\(--width\\)\\] {\n min-width: var(--width) !important\n}\n.writefull .max-w-\\[100vw\\] {\n max-width: 100vw !important\n}\n.writefull .max-w-\\[11rem\\] {\n max-width: 11rem !important\n}\n.writefull .max-w-\\[200px\\] {\n max-width: 200px !important\n}\n.writefull .max-w-\\[20rem\\] {\n max-width: 20rem !important\n}\n.writefull .max-w-\\[21rem\\] {\n max-width: 21rem !important\n}\n.writefull .max-w-\\[300px\\] {\n max-width: 300px !important\n}\n.writefull .max-w-\\[450px\\] {\n max-width: 450px !important\n}\n.writefull .max-w-\\[500px\\] {\n max-width: 500px !important\n}\n.writefull .max-w-\\[80vw\\] {\n max-width: 80vw !important\n}\n.writefull .max-w-\\[90vw\\] {\n max-width: 90vw !important\n}\n.writefull .max-w-\\[var\\(--width\\)\\] {\n max-width: var(--width) !important\n}\n.writefull .max-w-sm {\n max-width: 24rem !important\n}\n.writefull .flex-1 {\n flex: 1 1 0% !important\n}\n.writefull .shrink-0 {\n flex-shrink: 0 !important\n}\n.writefull .-translate-x-1\\/2 {\n --tw-translate-x: -50% !important;\n transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y)) !important\n}\n.writefull .-translate-x-full {\n --tw-translate-x: -100% !important;\n transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y)) !important\n}\n.writefull .-translate-y-1\\/2 {\n --tw-translate-y: -50% !important;\n transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y)) !important\n}\n.writefull .-translate-y-2 {\n --tw-translate-y: -0.5rem !important;\n transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y)) !important\n}\n.writefull .translate-x-1 {\n --tw-translate-x: 0.25rem !important;\n transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y)) !important\n}\n.writefull .translate-y-0 {\n --tw-translate-y: 0px !important;\n transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y)) !important\n}\n.writefull .translate-y-\\[1\\.75rem\\] {\n --tw-translate-y: 1.75rem !important;\n transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y)) !important\n}\n.writefull .translate-y-\\[2px\\] {\n --tw-translate-y: 2px !important;\n transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y)) !important\n}\n.writefull .rotate-90 {\n --tw-rotate: 90deg !important;\n transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y)) !important\n}\n.writefull .transform {\n transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y)) !important\n}\n@keyframes spin {\n to {\n transform: rotate(360deg)\n }\n}\n.writefull .animate-spin {\n animation: spin 1s linear infinite !important\n}\n.writefull .cursor-default {\n cursor: default !important\n}
1\n.writefull .cursor-not-allowed {\n cursor: not-allowed !important\n}\n.writefull .cursor-pointer {\n cursor: pointer !important\n}\n.writefull .cursor-wait {\n cursor: wait !important\n}\n.writefull .select-none {\n -webkit-user-select: none !important;\n -moz-user-select: none !important;\n user-select: none !important\n}\n.writefull .select-text {\n -webkit-user-select: text !important;\n -moz-user-select: text !important;\n user-select: text !important\n}\n.writefull .resize {\n resize: both !important\n}\n.writefull .list-decimal {\n list-style-type: decimal !important\n}\n.writefull .list-disc {\n list-style-type: disc !important\n}\n.writefull .grid-cols-2 {\n grid-template-columns: repeat(2, minmax(0, 1fr)) !important\n}\n.writefull .flex-row {\n flex-direction: row !important\n}\n.writefull .flex-col {\n flex-direction: column !important\n}\n.writefull .items-start {\n align-items: flex-start !important\n}\n.writefull .items-center {\n align-items: center !important\n}\n.writefull .justify-end {\n justify-content: flex-end !important\n}\n.writefull .justify-center {\n justify-content: center !important\n}\n.writefull .justify-between {\n justify-content: space-between !important\n}\n.writefull .gap-0\\.5 {\n gap: 0.125rem !important\n}\n.writefull .gap-1 {\n gap: 0.25rem !important\n}\n.writefull .gap-1\\.5 {\n gap: 0.375rem !important\n}\n.writefull .gap-2 {\n gap: 0.5rem !important\n}\n.writefull .gap-2\\.5 {\n gap: 0.625rem !important\n}\n.writefull .gap-3 {\n gap: 0.75rem !important\n}\n.writefull .gap-4 {\n gap: 1rem !important\n}\n.writefull .gap-8 {\n gap: 2rem !important\n}\n.writefull .gap-\\[var\\(--gap-y\\)\\] {\n gap: var(--gap-y) !important\n}\n.writefull .gap-x-4 {\n -moz-column-gap: 1rem !important;\n column-gap: 1rem !important\n}\n.writefull .gap-y-2 {\n row-gap: 0.5rem !important\n}\n.writefull :is(.divide-y > :not([hidden]) ~ :not([hidden])) {\n --tw-divide-y-reverse: 0 !important;\n border-top-width: calc(1px * calc(1 - var(--tw-divide-y-reverse))) !important;\n border-bottom-width: calc(1px * var(--tw-divide-y-reverse)) !important\n}\n.writefull :is(.divide-gray-100 > :not([hidden]) ~ :not([hidden])) {\n --tw-divide-opacity: 1 !important;\n border-color: rgb(243 244 246 / var(--tw-divide-opacity, 1)) !important\n}\n.writefull .self-end {\n align-self: flex-end !important\n}\n.writefull .overflow-auto {\n overflow: auto !important\n}\n.writefull .overflow-hidden {\n overflow: hidden !important\n}\n.writefull .overflow-y-auto {\n overflow-y: auto !important\n}\n.writefull .truncate {\n overflow: hidden !important;\n text-overflow: ellipsis !important;\n white-space: nowrap !important\n}\n.writefull .whitespace-nowrap {\n white-space: nowrap !important\n}\n.writefull .rounded {\n border-radius: 0.25rem !important\n}\n.writefull .rounded-\\[4px\\] {\n border-radius: 4px !important\n}\n.writefull .rounded-full {\n border-radius: 9999px !important\n}\n.writefull .rounded-lg {\n border-radius: 0.5rem !important\n}\n.writefull .rounded-md {\n border-radius: 0.375rem !important\n}\n.writefull .rounded-none {\n border-radius: 0px !important\n}\n.writefull .border {\n border-width: 1px !important\n}\n.writefull .border-0 {\n border-width: 0px !important\n}\n.writefull .border-2 {\n border-width: 2px !important\n}\n.writefull .border-b {\n border-bottom-width: 1px !important\n}\n.writefull .\\!border-dashed {\n border-style: dashed !important\n}\n.writefull .border-blue-600 {\n --tw-border-opacity: 1 !important;\n border-color: rgb(37 99 235 / var(--tw-border-opacity, 1)) !important\n}\n.writefull .border-gray-100 {\n --tw-border-opacity: 1 !important;\n border-color: rgb(243 244 246 / var(--tw-border-opacity, 1)) !important\n}\n.writefull .border-gray-200 {\n --tw-border-opacity: 1 !important;\n border-color: rgb(229 231 235 / var(--tw-border-opacity, 1)) !important\n}\n.writefull .border-overleaf {\n --tw-border-opacity: 1 !important;\n border-color: rgb(9 136 66 / var(--tw-border-opacity, 1)) !important\n}\n.writefull .\\!bg-\\[\\#D9D9D9\\] {\n --tw-bg-opacity: 1 !important;\n background-color: rgb(217 217 217 / var(--tw-bg-opacity, 1)) !important\n}\n.writefull .\\!bg-\\[\\#E7E9EE\\] {\n --tw-bg-opacity: 1 !important;\n background-color: rgb(231 233 238 / var(--tw-bg-opacity, 1)) !important\n}\n.writefull .\\!bg-slate-400 {\n --tw-bg-opacity: 1 !important;\n background-color: rgb(148 163 184 / var(--tw-bg-opacity, 1)) !important\n}\n.writefull .bg-\\[\\#1B222C\\] {\n --tw-bg-opacity: 1 !important;\n background-color: rgb(27 34 44 / var(--tw-bg-opacity, 1)) !important\n}\n.writefull .bg-\\[\\#F1F4F9\\] {\n --tw-bg-opacity: 1 !important;\n background-color: rgb(241 244 249 / var(--tw-bg-opacity, 1)) !important\n}\n.writefull .bg-\\[var\\(--bs-body-bg\\)\\] {\n background-color: var(--bs-body-bg) !important\n}\n.writefull .bg-gray-200 {\n --tw-bg-opacity: 1 !important;\n background-color: rgb(229 231 235 / var(--tw-bg-opacity, 1)) !important\n}\n.writefull .bg-gray-800 {\n --tw-bg-opacity: 1 !important;\n background-color: rgb(31 41 55 / var(--tw-bg-opacity, 1)) !important\n}\n.writefull .bg-slate-100 {\n --tw-bg-opacity: 1 !important;\n background-color: rgb(241 245 249 / var(--tw-bg-opacity, 1)) !important\n}\n.writefull .bg-slate-800 {\n --tw-bg-opacity: 1 !important;\n background-color: rgb(30 41 59 / var(--tw-bg-opacity, 1)) !important\n}\n.writefull .bg-transparent {\n background-color: transparent !important\n}\n.writefull .bg-white {\n --tw-bg-opacity: 1 !important;\n background-color: rgb(255 255 255 / var(--tw-bg-opacity, 1)) !important\n}\n.writefull .\\!p-3 {\n padding: 0.75rem !important\n}\n.writefull .p-0 {\n padding: 0px !important\n}\n.writefull .p-0\\.5 {\n padding: 0.125rem !important\n}\n.writefull .p-1\\.5 {\n padding: 0.375rem !important\n}\n.writefull .p-2 {\n padding: 0.5rem !important\n}\n.writefull .p-4 {\n padding: 1rem !important\n}\n.writefull .p-8 {\n padding: 2rem !important\n}\n.writefull .p-\\[var\\(--px\\)\\] {\n padding: var(--px) !important\n}\n.writefull .\\!px-0 {\n padding-left: 0px !important;\n padding-right: 0px !important\n}\n.writefull .\\!py-0\\.5 {\n padding-top: 0.125rem !important;\n padding-bottom: 0.125rem !important\n}\n.writefull .px-1 {\n padding-left: 0.25rem !important;\n padding-right: 0.25rem !important\n}\n.writefull .px-1\\.5 {\n padding-left: 0.375rem !important;\n padding-right: 0.375rem !important\n}\n.writefull .px-2 {\n padding-left: 0.5rem !important;\n padding-right: 0.5rem !important\n}\n.writefull .px-3 {\n padding-left: 0.75rem !important;\n padding-right: 0.75rem !important\n}\n.writefull .px-4 {\n padding-left: 1rem !important;\n padding-right: 1rem !important\n}\n.writefull .px-5 {\n padding-left: 1.25rem !important;\n padding-right: 1.25rem !important\n}\n.writefull .px-\\[var\\(--px\\)\\] {\n padding-left: var(--px) !important;\n padding-right: var(--px) !important\n}\n.writefull .py-1 {\n padding-top: 0.25rem !important;\n padding-bottom: 0.25rem !important\n}\n.writefull .py-1\\.5 {\n padding-top: 0.375rem !important;\n padding-bottom: 0.375rem !important\n}\n.writefull .py-2 {\n padding-top: 0.5rem !important;\n padding-bottom: 0.5rem !important\n}\n.writefull .py-3 {\n padding-top: 0.75rem !important;\n padding-bottom: 0.75rem !important\n}\n.writefull .py-4 {\n padding-top: 1rem !important;\n padding-bottom: 1rem !important\n}\n.writefull .py-6 {\n padding-top: 1.5rem !important;\n padding-bottom: 1.5rem !important\n}\n.writefull .py-\\[11px\\] {\n padding-top: 11px !important;\n padding-bottom: 11px !important\n}\n.writefull .py-\\[4px\\] {\n padding-top: 4px !important;\n padding-bottom: 4px !important\n}\n.writefull .py-\\[5px\\] {\n padding-top: 5px !important;\n padding-bottom: 5px !important\n}\n.writefull .pb-1 {\n padding-bottom: 0.25rem !important\n}\n.writefull .pb-3 {\n padding-bottom: 0.75rem !important\n}\n.writefull .pb-\\[1px\\] {\n padding-bottom: 1px !important\n}\n.writefull .pb-\\[3px\\] {\n padding-bottom: 3px !important\n}\n.writefull .pb-\\[var\\(--gap-y\\)\\] {\n padding-bottom: var(--gap-y) !important\n}\n.writefull .pl-3 {\n padding-left: 0.75rem !important\n}\n.writefull .pl-4 {\n padding-left: 1rem !important\n}\n.writefull .pl-6 {\n padding-left: 1.5rem !important\n}\n.writefull .pr-2 {\n padding-right: 0.5rem !important\n}\n.writefull .pr-6 {\n padding-right: 1.5rem !important\n}\n.writefull .pt-2 {\n padding-top: 0.5rem !important\n}\n.writefull .pt-\\[4px\\] {\n padding-top: 4px !important\n}\n.writefull .text-left {\n text-align: left !important\n}\n.writefull .text-center {\n text-align: center !important\n}\n.writefull .text-right {\n text-align: right !important\n}\n.writefull .align-text-top {\n vertical-align: text-top !important\n}\n.writefull .align-sub {\n vertical-align: sub !important\n}\n.writefull .font-os {\n font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji" !important\n}\n.writefull .\\!text-base {\n font-size: 1rem !important;\n line-height: 1.5rem !important\n}\n.writefull .text-\\[11px\\] {\n font-size: 11px !important\n}\n.writefull .text-\\[13px\\] {\n font-size: 13px !important\n}\n.writefull .text-\\[15px\\] {\n font-size: 15px !important\n}\n.writefull .text-\\[16px\\] {\n font-size: 16px !important\n}\n.writefull .text-\\[length\\:--bs-btn-font-size\\] {\n font-size: var(--bs-btn-font-size) !important\n}\n.writefull .text-base {\n font-size: 1rem !important;\n line-height: 1.5rem !important\n}\n.writefull .text-sm {\n font-size: 0.875rem !important;\n line-height: 1.25rem !important\n}\n.writefull .text-xl {\n font-size: 1.25rem !important;\n line-height: 1.75rem !important\n}\n.writefull .text-xs {\n font-size: 0.75rem !important;\n line-height: 1rem !important\n}\n.writefull .font-bold {\n font-weight: 700 !important\n}\n.writefull .font-normal {\n font-weight: 400 !important\n}\n.writefull .font-semibold {\n font-weight: 600 !important\n}\n.writefull .uppercase {\n text-transform: uppercase !important\n}\n.writefull .italic {\n font-style: italic !important\n}\n.writefull .leading-3 {\n line-height: .75rem !important\n}\n.writefull .leading-4 {\n line-height: 1rem !important\n}
1\n.writefull .leading-5 {\n line-height: 1.25rem !important\n}\n.writefull .leading-\\[16px\\] {\n line-height: 16px !important\n}\n.writefull .leading-relaxed {\n line-height: 1.625 !important\n}\n.writefull .\\!text-\\[\\#AFB5C0\\] {\n --tw-text-opacity: 1 !important;\n color: rgb(175 181 192 / var(--tw-text-opacity, 1)) !important\n}\n.writefull .\\!text-white {\n --tw-text-opacity: 1 !important;\n color: rgb(255 255 255 / var(--tw-text-opacity, 1)) !important\n}\n.writefull .text-\\[\\#1B222C\\] {\n --tw-text-opacity: 1 !important;\n color: rgb(27 34 44 / var(--tw-text-opacity, 1)) !important\n}\n.writefull .text-\\[color\\:--content-primary-dark\\] {\n color: var(--content-primary-dark) !important\n}\n.writefull .text-black {\n --tw-text-opacity: 1 !important;\n color: rgb(0 0 0 / var(--tw-text-opacity, 1)) !important\n}\n.writefull .text-blue-600 {\n --tw-text-opacity: 1 !important;\n color: rgb(37 99 235 / var(--tw-text-opacity, 1)) !important\n}\n.writefull .text-gold-500 {\n --tw-text-opacity: 1 !important;\n color: rgb(255 215 0 / var(--tw-text-opacity, 1)) !important\n}\n.writefull .text-gray-400 {\n --tw-text-opacity: 1 !important;\n color: rgb(156 163 175 / var(--tw-text-opacity, 1)) !important\n}\n.writefull .text-gray-500 {\n --tw-text-opacity: 1 !important;\n color: rgb(107 114 128 / var(--tw-text-opacity, 1)) !important\n}\n.writefull .text-gray-600 {\n --tw-text-opacity: 1 !important;\n color: rgb(75 85 99 / var(--tw-text-opacity, 1)) !important\n}\n.writefull .text-gray-700 {\n --tw-text-opacity: 1 !important;\n color: rgb(55 65 81 / var(--tw-text-opacity, 1)) !important\n}\n.writefull .text-gray-900 {\n --tw-text-opacity: 1 !important;\n color: rgb(17 24 39 / var(--tw-text-opacity, 1)) !important\n}\n.writefull .text-overleaf {\n --tw-text-opacity: 1 !important;\n color: rgb(9 136 66 / var(--tw-text-opacity, 1)) !important\n}\n.writefull .text-primary {\n --tw-text-opacity: 1 !important;\n color: rgb(255 215 0 / var(--tw-text-opacity, 1)) !important\n}\n.writefull .text-red-600 {\n --tw-text-opacity: 1 !important;\n color: rgb(220 38 38 / var(--tw-text-opacity, 1)) !important\n}\n.writefull .text-slate-400 {\n --tw-text-opacity: 1 !important;\n color: rgb(148 163 184 / var(--tw-text-opacity, 1)) !important\n}\n.writefull .text-slate-500 {\n --tw-text-opacity: 1 !important;\n color: rgb(100 116 139 / var(--tw-text-opacity, 1)) !important\n}\n.writefull .text-slate-800 {\n --tw-text-opacity: 1 !important;\n color: rgb(30 41 59 / var(--tw-text-opacity, 1)) !important\n}\n.writefull .text-white {\n --tw-text-opacity: 1 !important;\n color: rgb(255 255 255 / var(--tw-text-opacity, 1)) !important\n}\n.writefull .text-yellow-600 {\n --tw-text-opacity: 1 !important;\n color: rgb(202 138 4 / var(--tw-text-opacity, 1)) !important\n}\n.writefull .underline {\n text-decoration-line: underline !important\n}\n.writefull .antialiased {\n -webkit-font-smoothing: antialiased !important;\n -moz-osx-font-smoothing: grayscale !important\n}\n.writefull .opacity-0 {\n opacity: 0 !important\n}\n.writefull .opacity-100 {\n opacity: 1 !important\n}\n.writefull .opacity-50 {\n opacity: 0.5 !important\n}\n.writefull .opacity-60 {\n opacity: 0.6 !important\n}\n.writefull .shadow-lg {\n --tw-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1) !important;
1\n --tw-shadow-colored: 0 10px 15px -3px var(--tw-shadow-color), 0 4px 6px -4px var(--tw-shadow-color) !important;\n box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow) !important\n}\n.writefull .shadow-md {\n --tw-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1) !important;\n --tw-shadow-colored: 0 4px 6px -1px var(--tw-shadow-color), 0 2px 4px -2px var(--tw-shadow-color) !important;\n box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow) !important\n}\n.writefull .outline-none {\n outline: 2px solid transparent !important;\n outline-offset: 2px !important\n}\n.writefull .outline {\n outline-style: solid !important\n}\n.writefull .ring-1 {\n --tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color) !important;\n --tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color) !important;\n box-shadow: var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-sha
1dow, 0 0 #0000) !important\n}\n.writefull .ring-gray-300 {\n --tw-ring-opacity: 1 !important;\n --tw-ring-color: rgb(209 213 219 / var(--tw-ring-opacity, 1)) !important\n}\n.writefull .brightness-0 {\n --tw-brightness: brightness(0) !important;\n filter: var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow) !important\n}\n.writefull .invert-\\[\\.32\\] {\n --tw-invert: invert(.32) !important;\n filter: var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow) !important\n}\n.writefull .filter {\n filter: var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow) !important\n}\n.writefull .transition {\n transition-property: color, background-color, border-color, text-decoration-color, fill, stroke, opacity, box-shadow, transform, filter, -webkit-backdrop-filter !important;\n transition-property: color, background-color, border-color, text-decoration-color, fill, stroke, opacity, box-shadow, transform, filter, backdrop-filter !important;\n transition-property: color, background-color, border-color, text-decoration-color, fill, stroke, opacity, box-shadow, transform, filter, backdrop-filter, -webkit-backdrop-filter !important;\n transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1) !important;\n transition-duration: 150ms !important\n}\n.writefull .transition-\\[opacity\\2c transform_100_ease-in-out\\] {\n transition-property: opacity,transform 100 ease-in-out !important;\n transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1) !important;\n transition-duration: 150ms !important\n}\n.writefull .transition-all {\n transition-property: all !important;\n transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1) !important;\n transition-duration: 150ms !important\n}\n.writefull .transition-colors {\n transition-property: color, background-color, border-color, text-decoration-color, fill, stroke !important;\n transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1) !important;\n transition-duration: 150ms !important\n}\n.writefull .transition-opacity {\n transition-property: opacity !important;\n transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1) !important;\n transition-duration: 150ms !important\n}\n.writefull .duration-300 {\n transition-duration: 300ms !important\n}\n.writefull .ease-out {\n transition-timing-function: cubic-bezier(0, 0, 0.2, 1) !important\n}\n.writefull .font-overleaf {\n font-family: Noto Sans, sans-serif !important\n}\n.writefull .separator-overleaf-t {\n border-top: var(--bs-border-width) var(--bs-border-style) var(--bs-border-color) !important\n}\n.writefull .separator-overleaf-b {\n border-bottom: var(--bs-border-width) var(--bs-border-style) var(--bs-border-color) !important\n}\n.writefull .border-overleaf {\n border: 1px solid var(--border-primary) !important\n}\n.writefull .rounder-overleaf {\n border-radius: var(--border-radius-base) !important\n}\n.writefull .heading-overleaf {\n color: var(--bs-heading-color) !important;\n font-weight: 500 !important;\n font-family: Noto Sans, sans-serif !important\n}\n.writefull .text-overleaf {\n color: #1B222C !important\n}\n.writefull .text-overleaf-secondary {\n color: #495365 !important\n}\n.writefull .focus-overleaf:focus-within {\n box-shadow: 0 0 0 2px #97b6e5 !important;\n outline: none !important\n}\n.writefull .toggle-accent-green {\n --bg-checked: var(--bg-accent-01, #098842) !important\n}\n.writefull .focus:focus-within {\n box-shadow: 0 0 0 2px #97b6e5 !important;\n outline: none !important\n}\n.writefull .focus-inset:focus-within {\n box-shadow: inset 0 0 0 2px #97b6e5 !important;\n outline: none !important\n}\n.writefull .theme {\n --tw-bg-opacity: 1 !important;\n background-color: rgb(255 255 255 / var(--tw-bg-opacity, 1)) !important;\n --tw-text-opacity: 1 !important;\n color: rgb(15 23 42 / var(--tw-text-opacity, 1)) !important\n}\n.writefull .theme:where([data-theme="default"], [data-theme="default"] *) {\n --tw-bg-opacity: 1 !important;\n background-color: rgb(30 41 59 / var(--tw-bg-opacity, 1)) !important;\n --tw-text-opacity: 1 !important;\n color: rgb(226 232 240 / var(--tw-text-opacity, 1)) !important\n}\n.writefull .\\[--gap-y\\:0\\.75rem\\] {\n --gap-y: 0.75rem !important\n}\n.writefull .\\[--px\\:0\\.75rem\\] {\n --px: 0.75rem !important\n}\n.writefull .\\[--px\\:1\\.25rem\\] {\n --px: 1.25rem !important\n}\n.writefull .\\[--px\\:1rem\\] {\n --px: 1rem !important\n}\n.writefull .\\[--width\\:35rem\\] {\n --width: 35rem !important\n}\n.writefull .placeholder\\:font-medium::-moz-placeholder {\n font-weight: 500 !important\n}\n.writefull .placeholder\\:font-medium::placeholder {\n font-weight: 500 !important\n}\n.writefull .placeholder\\:text-gray-400::-moz-placeholder {\n --tw-text-opacity: 1 !important;\n color: rgb(156 163 175 / var(--tw-text-opacity, 1)) !important\n}\n.writefull .placeholder\\:text-gray-400::placeholder {\n --tw-text-opacity: 1 !important;\n color: rgb(156 163 175 / var(--tw-text-opacity, 1)) !important\n}\n.writefull .before\\:absolute::before {\n content: var(--tw-content) !important;\n position: absolute !important\n}\n.writefull .before\\:bottom-0::before {\n content: var(--tw-content) !important;\n bottom: 0px !important\n}\n.writefull .before\\:left-0::before {\n content: var(--tw-content) !important;\n left: 0px !important\n}\n.writefull .before\\:top-0::before {\n content: var(--tw-content) !important;\n top: 0px !important\n}\n.writefull .before\\:w-1::before {\n content: var(--tw-content) !important;\n width: 0.25rem !important\n}\n@keyframes width {\n 100% {\n content: var(--tw-content);\n width: 100%\n }\n}\n.writefull .before\\:animate-\\[width_6s_linear_infinite_alternate\\]::before {\n content: var(--tw-content) !important;\n animation: width 6s linear infinite alternate !important\n}\n.writefull .before\\:bg-\\[\\#f4f6f8\\]::before {\n content: var(--tw-content) !important;\n --tw-bg-opacity: 1 !important;\n background-color: rgb(244 246 248 / var(--tw-bg-opacity, 1)) !important\n}\n.writefull .before\\:bg-\\[--blue-70\\]::before {\n content: var(--tw-content) !important;\n background-color: var(--blue-70) !important\n}\n.writefull .before\\:bg-transparent::before {\n content: var(--tw-content) !important;\n background-color: transparent !important\n}\n.writefull .before\\:content-\\[\\"\\"\\]::before {\n --tw-content: "" !important;\n content: var(--tw-content) !important\n}\n.writefull .before\\:content-none::before {\n --tw-content: none !important;\n content: var(--tw-content) !important\n}\n.writefull .hover\\:bg-gray-100:hover {\n --tw-bg-opacity: 1 !important;\n background-color: rgb(243 244 246 / var(--tw-bg-opacity, 1)) !important\n}\n.writefull .hover\\:bg-gray-300:hover {\n --tw-bg-opacity: 1 !important;\n background-color: rgb(209 213 219 / var(--tw-bg-opacity, 1)) !important\n}\n.writefull .hover\\:bg-gray-50:hover {\n --tw-bg-opacity: 1 !important;\n background-color: rgb(249 250 251 / var(--tw-bg-opacity, 1)) !important\n}\n.writefull .hover\\:bg-slate-200:hover {\n --tw-bg-opacity: 1 !important;\n background-color: rgb(226 232 240 / var(--tw-bg-opacity, 1)) !important\n}\n.writefull .hover\\:bg-slate-900:hover {\n --tw-bg-opacity: 1 !important;\n background-color: rgb(15 23 42 / var(--tw-bg-opacity, 1)) !important\n}\n.writefull .hover\\:text-black:hover {\n --tw-text-opacity: 1 !important;\n color: rgb(0 0 0 / var(--tw-text-opacity, 1)) !important\n}\n.writefull .hover\\:text-gray-700:hover {\n --tw-text-opacity: 1 !important;\n color: rgb(55 65 81 / var(--tw-text-opacity, 1)) !important\n}\n.writefull .hover\\:underline:hover {\n text-decoration-line: underline !important\n}\n.writefull .hover\\:opacity-100:hover {\n opacity: 1 !important\n}\n.writefull .hover\\:opacity-75:hover {\n opacity: 0.75 !important\n}\n.writefull .focus\\:z-10:focus {\n z-index: 10 !important\n}\n.writefull .focus\\:ring-2:focus {\n --tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color) !important;\n --tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color) !important;\n box-shadow: var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-sha
1dow, 0 0 #0000) !important\n}\n.writefull .focus\\:ring-gray-900:focus {\n --tw-ring-opacity: 1 !important;\n --tw-ring-color: rgb(17 24 39 / var(--tw-ring-opacity, 1)) !important\n}\n.writefull .focus\\:ring-opacity-100:focus {\n --tw-ring-opacity: 1 !important\n}\n.writefull .focus-visible\\:outline-none:focus-visible {\n outline: 2px solid transparent !important;\n outline-offset: 2px !important\n}\n.writefull .enabled\\:hover\\:bg-\\[--bg-light-tertiary\\]:hover:enabled {\n background-color: var(--bg-light-tertiary) !important\n}\n.writefull .enabled\\:hover\\:\\[--premium-gradient\\:var\\(--blue-70\\)\\]:hover:enabled {\n --premium-gradient: var(--blue-70) !important\n}\n.writefull :is(.group:hover .group-hover\\:opacity-100) {\n opacity: 1 !important\n}\n.writefull :is(.group:focus .group-focus\\:opacity-100) {\n opacity: 1 !important\n}\n@media (min-width: 500px) {\n .writefull .hsm\\:h-\\[18rem\\] {\n height: 18rem !important\n }\n .writefull .hsm\\:max-h-\\[28rem\\] {\n max-height: 28rem !important\n }\n .writefull .hsm\\:min-h-\\[20rem\\] {\n min-height: 20rem !important\n }\n}\n@media (min-width: 640px) {\n .writefull .sm\\:bottom-6 {\n bottom: 1.5rem !important\n }\n .writefull .sm\\:left-6 {\n left: 1.5rem !important\n }\n .writefull .sm\\:w-\\[416px\\] {\n width: 416px !important\n }\n .writefull .sm\\:max-w-\\[70vw\\] {\n max-width: 70vw !important\n }\n .writefull .sm\\:text-\\[15px\\] {\n font-size: 15px !important\n }\n .writefull .sm\\:leading-6 {\n line-height: 1.5rem !important\n }\n}\n@media (min-width: 650px) {\n .writefull .hmd\\:inline {\n display: inline !important\n }\n .writefull .hmd\\:h-\\[32rem\\] {\n height: 32rem !important\n }\n}\n@media (min-width: 768px) {\n .writefull .md\\:max-w-\\[60vw\\] {\n max-width: 60vw !important\n }\n .writefull .md\\:bg-white {\n --tw-bg-opacity: 1 !important;\n background-color: rgb(255 255 255 / var(--tw-bg-opacity, 1)) !important\n }\n}\n@media (min-width: 1024px) {\n .writefull .lg\\:max-w-\\[50vw\\] {\n max-width: 50vw !important\n }\n}\n.writefull :is(.dark\\:divide-slate-700:where([data-theme="default"], [data-theme="default"] *) > :not([hidden]) ~ :not([hidden])) {\n --tw-divide-opacity: 1 !important;\n border-color: rgb(51 65 85 / var(--tw-divide-opacity, 1)) !important\n}\n.writefull .dark\\:border-none:where([data-theme="default"], [data-theme="default"] *) {\n border-style: none !important\n}\n.writefull .dark\\:border-blue-500:where([data-theme="default"], [data-theme="default"] *) {\n --tw-border-opacity: 1 !important;\n border-color: rgb(59 130 246 / var(--tw-border-opacity, 1)) !important\n}\n.writefull .dark\\:border-gray-700:where([data-theme="default"], [data-theme="default"] *) {\n --tw-border-opacity: 1 !important;\n border-color: rgb(55 65 81 / var(--tw-border-opacity, 1)) !important\n}\n.writefull .dark\\:border-slate-900:where([data-theme="default"], [data-theme="default"] *) {\n --tw-border-opacity: 1 !important;\n border-color: rgb(15 23 42 / var(--tw-border-opacity, 1)) !important\n}\n.writefull .dark\\:bg-black:where([data-theme="default"], [data-theme="default"] *) {\n --tw-bg-opacity: 1 !important;\n background-color: rgb(0 0 0 / var(--tw-bg-opacity, 1)) !important\n}\n.writefull .dark\\:bg-gray-300:where([data-theme="default"], [data-theme="default"] *) {\n --tw-bg-opacity: 1 !important;\n background-color: rgb(209 213 219 / var(--tw-bg-opacity, 1)) !important\n}\n.writefull .dark\\:bg-slate-600:where([data-theme="default"], [data-theme="default"] *) {\n --tw-bg-opacity: 1 !important;\n background-color: rgb(71 85 105 / var(--tw-bg-opacity, 1)) !important\n}\n.writefull .dark\\:bg-slate-700:where([data-theme="default"], [data-theme="default"] *) {\n --tw-bg-opacity: 1 !important;\n background-color: rgb(51 65 85 / var(--tw-bg-opacity, 1)) !important\n}\n.writefull .dark\\:bg-slate-800:where([data-theme="default"], [data-theme="default"] *) {\n --tw-bg-opacity: 1 !important;\n background-color: rgb(30 41 59 / var(--tw-bg-opacity, 1)) !important\n}\n.writefull .dark\\:bg-white:where([data-theme="default"], [data-theme="default"] *) {\n --tw-bg-opacity: 1 !important;\n background-color: rgb(255 255 255 / var(--tw-bg-opacity, 1)) !important\n}\n.writefull .dark\\:text-gray-200:where([data-theme="default"], [data-theme="default"] *) {\n --tw-text-opacity: 1 !important;\n color: rgb(229 231 235 / var(--tw-text-opacity, 1)) !important\n}\n.writefull .dark\\:text-gray-300:where([data-theme="default"], [data-theme="default"] *) {\n --tw-text-opacity: 1 !important;\n color: rgb(209 213 219 / var(--tw-text-opacity, 1)) !important\n}\n.writefull .dark\\:text-gray-600:where([data-theme="default"], [data-theme="default"] *) {\n --tw-text-opacity: 1 !important;\n color: rgb(75 85 99 / var(--tw-text-opacity, 1)) !important\n}\n.writefull .dark\\:text-slate-300:where([data-theme="default"], [data-theme="default"] *) {\n --tw-text-opacity: 1 !important;\n color: rgb(203 213 225 / var(--tw-text-opacity, 1)) !important\n}\n.writefull .dark\\:text-slate-400:where([data-theme="default"], [data-theme="default"] *) {\n --tw-text-opacity: 1 !important;\n color: rgb(148 163 184 / var(--tw-text-opacity, 1)) !important\n}\n.writefull .dark\\:text-slate-50:where([data-theme="default"], [data-theme="default"] *) {\n --tw-text-opacity: 1 !important;\n color: rgb(248 250 252 / var(--tw-text-opacity, 1)) !important\n}\n.writefull .dark\\:text-slate-900:where([data-theme="default"], [data-theme="default"] *) {\n --tw-text-opacity: 1 !important;\n color: rgb(15 23 42 / var(--tw-text-opacity, 1)) !important\n}\n.writefull .dark\\:text-white:where([data-theme="default"], [data-theme="default"] *) {\n --tw-text-opacity: 1 !important;\n color: rgb(255 255 255 / var(--tw-text-opacity, 1)) !important\n}\n.writefull .dark\\:contrast-75:where([data-theme="default"], [data-theme="default"] *) {\n --tw-contrast: contrast(.75) !important;\n filter: var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow) !important\n}\n.writefull .dark\\:invert-\\[\\.9\\]:where([data-theme="default"], [data-theme="default"] *) {\n --tw-invert: invert(.9) !important;\n filter: var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow) !important\n}
1\n.writefull .dark\\:saturate-100:where([data-theme="default"], [data-theme="default"] *) {\n --tw-saturate: saturate(1) !important;\n filter: var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow) !important\n}\n.writefull .dark\\:sepia-\\[\\.07\\]:where([data-theme="default"], [data-theme="default"] *) {\n --tw-sepia: sepia(.07) !important;\n filter: var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow) !important\n}\n.writefull .dark\\:hover\\:bg-gray-100:hover:where([data-theme="default"], [data-theme="default"] *) {\n --tw-bg-opacity: 1 !important;\n background-color: rgb(243 244 246 / var(--tw-bg-opacity, 1)) !important\n}\n.writefull .dark\\:hover\\:bg-slate-700:hover:where([data-theme="default"], [data-theme="default"] *) {\n --tw-bg-opacity: 1 !important;\n background-color: rgb(51 65 85 / var(--tw-bg-opacity, 1)) !important\n}\n.writefull .hover\\:dark\\:bg-slate-600:where([data-theme="default"], [data-theme="default"] *):hover {\n --tw-bg-opacity: 1 !important;\n background-color: rgb(71 85 105 / var(--tw-bg-opacity, 1)) !important\n}\n.writefull .hover\\:dark\\:text-black:where([data-theme="default"], [data-theme="default"] *):hover {\n --tw-text-opacity: 1 !important;\n color: rgb(0 0 0 / var(--tw-text-opacity, 1)) !important\n}\n.writefull :is(.\\[\\&_a\\]\\:underline a) {\n text-decoration-line: underline !important\n}\n@media(max-height:570px) {\n .writefull .\\[\\@media\\(max-height\\:570px\\)\\]\\:hidden {\n display: none !important\n }\n}\n',"",{version:3,sources:["webpack://./modules/writefull/frontend/js/integration/src/styles/global-elements.css"],names:[],mappings:"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",sourcesContent:["@tailwind components;\n@tailwind utilities;\n"],sourceRoot:""}]);const A=i;n.d(t,["A",0,A])},67984(e){e.exports=function(e){var t=[];return t.toString=function(){return this.map(function(t){var n="",r=void 0!==t[5];return t[4]&&(n+="@supports (".concat(t[4],") {")),t[2]&&(n+="@media ".concat(t[2]," {")),r&&(n+="@layer".concat(t[5].length>0?" ".concat(t[5]):""," {")),n+=e(t),r&&(n+="}"),t[2]&&(n+="}"),t[4]&&(n+="}"),n}).join("")},t.i=function(e,n,r,o,a){"string"==typeof e&&(e=[[null,e,void 0]]);var i={};if(r)for(var A=0;A<this.length;A++){var l=this[A][0];null!=l&&(i[l]=!0)}for(var s=0;s<e.length;s++){var c=[].concat(e[s]);r&&i[c[0]]||(void 0!==a&&(void 0===c[5]||(c[1]="@layer".concat(c[5].length>0?" ".concat(c[5]):""," {").concat(c[1],"}")),c[5]=a),n&&(c[2]?(c[1]="@media ".concat(c[2]," {").concat(c[1],"}"),c[2]=n):c[2]=n),o&&(c[4]?(c[1]="@supports (".concat(c[4],") {").concat(c[1],"}"),c[4]=o):c[4]="".concat(o)),t.push(c))}},t}},19504(e){e.exports=function(e){var t=e[1],n=e[3];
1if(!n)return t;if("function"==typeof btoa){var r=btoa(unescape(encodeURIComponent(JSON.stringify(n)))),o="sourceMappingURL=data:application/json;charset=utf-8;base64,".concat(r),a="/*# ".concat(o," */");return[t].concat([a]).join("\n")}return[t].join("\n")}},7310(e,t,n){var r=n(83764),o=n.n(r),a=n(66485),i=n(12962),A=n(44273);const l=a.forwardRef(({bsPrefix:e,className:t,striped:n,bordered:r,borderless:a,hover:l,size:s,variant:c,responsive:u,...m},d)=>{const p=(0,i.oU)(e,"table"),g=o()(t,p,c&&`${p}-${c}`,s&&`${p}-${s}`,n&&`${p}-${"string"==typeof n?`striped-${n}`:"striped"}`,r&&`${p}-bordered`,a&&`${p}-borderless`,l&&`${p}-hover`),f=(0,A.jsx)("table",{...m,className:g,ref:d});if(u){let e=`${p}-responsive`;return"string"==typeof u&&(e=`${e}-${u}`),(0,A.jsx)("div",{className:e,children:f})}return f});l.displayName="Table";const s=l;n.d(t,["A",0,s])},73800(e,t,n){e.exports=n.p+"images/copy-fbfd4c55d9604a5156c4.svg"}}]);
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.