1(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,808341,(e,t,n)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0});var r={cancelIdleCallback:function(){return a},requestIdleCallback:function(){return o}};for(var s in r)Object.defineProperty(n,s,{enumerable:!0,get:r[s]});let o="u">typeof self&&self.requestIdleCallback&&self.requestIdleCallback.bind(window)||function(e){let t=Date.now();return self.setTimeout(function(){e({didTimeout:!1,timeRemaining:function(){return Math.max(0,50-(Date.now()-t))}})},1)},a="u">typeof self&&self.cancelIdleCallback&&self.cancelIdleCallback.bind(window)||function(e){return clearTimeout(e)};("function"==typeof n.default||"object"==typeof n.default&&null!==n.default)&&void 0===n.default.__esModule&&(Object.defineProperty(n.default,"__esModule",{value:!0}),Object.assign(n.default,n),t.exports=n.default)},519083,(e,t,n)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0});var r={ESCAPE_REGEX:function(){return a},htmlEscapeAttributeString:function(){return c},htmlEscapeJsonString:function(){return d}};for(var s in r)Object.defineProperty(n,s,{enumerable:!0,get:r[s]});let o={"&":"\\u0026",">":"\\u003e","<":"\\u003c","\u2028":"\\u2028","\u2029":"\\u2029"},a=/[&><\u2028\u2029]/g,i={"&":"&",'"':""","'":"'","<":"<",">":">"},l=/[&"'<>]/g;function d(e){return e.replace(a,e=>o[e])}function c(e){return e.replace(l,e=>i[e])}},479520,(e,t,n)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0});var r={default:function(){return x},handleClientScriptLoad:function(){return f},initScriptLoader:function(){return y}};for(var s in r)Object.defineProperty(n,s,{enumerable:!0,get:r[s]});let o=e.r(555682),a=e.r(190809),i=e.r(843476),l=o._(e.r(174080)),d=a._(e.r(271645)),c=e.r(742732),u=e.r(922737),_=e.r(808341),m=e.r(519083),p=new Map,h=new Set,g=e=>{let{src:t,id:n,onLoad:r=()=>{},onReady:s=null,dangerouslySetInnerHTML:o,children:a="",strategy:i="afterInteractive",onError:d,stylesheets:c}=e,_=n||t;if(_&&h.has(_))return;if(p.has(t)){h.add(_),p.get(t).then(r,d);return}let m=()=>{s&&s(),h.add(_)},g=document.createElement("script"),f=new Promise((e,t)=>{g.addEventListener("load",function(t){e(),r&&r.call(this,t),m()}),g.addEventListener("error",function(e){t(e)})}).catch(function(e){d&&d(e)});o?(g.innerHTML=o.__html||"",m()):a?(g.textContent="string"==typeof a?a:Array.isArray(a)?a.join(""):"",m()):t&&(g.src=t,p.set(t,f)),(0,u.setAttributesFromProps)(g,e),"worker"===i&&g.setAttribute("type","text/partytown"),g.setAttribute("data-nscript",i),c&&(e=>{if(l.default.preinit)return e.forEach(e=>{l.default.preinit(e,{as:"style"})});if("u">typeof window){let t=document.head;e.forEach(e=>{let n=document.createElement("link");n.type="text/css",n.rel="stylesheet",n.href=e,t.appendChild(n)})}})(c),document.body.appendChild(g)};function f(e){let{strategy:t="afterInteractive"}=e;"lazyOnload"===t?window.addEventListener("load",()=>{(0,_.requestIdleCallback)(()=>g(e))}):g(e)}function y(e){e.forEach(f),[...document.querySelectorAll('[data-nscript="beforeInteractive"]'),...document.querySelectorAll('[data-nscript="beforePageRender"]')].forEach(e=>{let t=e.id||e.getAttribute("src");h.add(t)})}function b(e){let{id:t,src:n="",onLoad:r=()=>{},onReady:s=null,strategy:o="afterInteractive",onError:a,stylesheets:u,...p}=e,{updateScripts:f,scripts:y,getIsSsr:b,appDir:x,nonce:v}=(0,d.useContext)(c.HeadManagerContext);v=p.nonce||v;let w=(0,d.useRef)(!1);(0,d.useEffect)(()=>{let e=t||n;w.current||(s&&e&&h.has(e)&&s(),w.current=!0)},[s,t,n]);let S=(0,d.useRef)(!1);if((0,d.useEffect)(()=>{if(!S.current){if("afterInteractive"===o)g(e);else"lazyOnload"===o&&("complete"===document.readyState?(0,_.requestIdleCallback)(()=>g(e)):window.addEventListener("load",()=>{(0,_.requestIdleCallback)(()=>g(e))}));S.current=!0}},[e,o]),("beforeInteractive"===o||"worker"===o)&&(f?(y[o]=(y[o]||[]).concat([{id:t,src:n,onLoad:r,onReady:s,onError:a,...p,nonce:v}]),f(y)):b&&b()?h.add(t||n):b&&!b()&&g({...e,nonce:v})),x){if(u&&u.forEach(e=>{l.default.preinit(e,{as:"style"})}),"beforeInteractive"===o)if(!n)return p.dangerouslySetInnerHTML&&(p.children=p.dangerouslySetInnerHTML.__html,delete p.dangerouslySetInnerHTML),(0,i.jsx)("script",{nonce:v,dangerouslySetInnerHTML:{__html:`(self.__next_s=self.__next_s||[]).push(${(0,m.htmlEscapeJsonString)(JSON.stringify([0,{...p,id:t}]))})`}});else return l.default.preload(n,p.integrity?{as:"script",integrity:p.integrity,nonce:v,crossOrigin:p.crossOrigin}:{as:"script",nonce:v,crossOrigin:p.crossOrigin}),(0,i.jsx)("script",{nonce:v,dangerouslySetInnerHTML:{__html:`(self.__next_s=self.__next_s||[]).push(${(0,m.htmlEscapeJsonString)(JSON.stringify([n,{...p,id:t}]))})`}});"afterInteractive"===o&&n&&l.default.preload(n,p.integrity?{as:"script",integrity:p.integrity,nonce:v,crossOrigin:p.crossOrigin}:{as:"script",nonce:v,crossOrigin:p.crossOrigin})}return null}Object.defineProperty(b,"__nextScript",{value:!0});let x=b;("function"==typeof n.default||"object"==typeof n.default&&null!==n.default)&&void 0===n.default.__esModule&&(Object.defineProperty(n.default,"__esMo
1dule",{value:!0}),Object.assign(n.default,n),t.exports=n.default)},3303,(e,t,n)=>{t.exports=e.r(479520)},153642,e=>{"use strict";let t,n,r,s,o;var a=e.i(247167),i=e.i(843476),l=e.i(69431),d=e.i(479578);function c(){if(void 0!==a.default)return!1;{let e=window.location?.hostname??"";if("localhost"===e||"127.0.0.1"===e||e.includes(".local")||e.includes("vercel.app")&&!e.startsWith("twinmind"))return!0}return void 0===a.default}Date.now();("u">typeof a.default?a.default.env.NEXT_PUBLIC_VERCEL_TOOLBAR_HOST:void 0)??"https://vercel.live","u">typeof a.default&&a.default.env.NEXT_PUBLIC_VERCEL_TOOLBAR_OWNER_ID,"u">typeof a.default&&a.default.env.NEXT_PUBLIC_VERCEL_TOOLBAR_PROJECT_ID,"u">typeof a.default&&a.default.env.NEXT_PUBLIC_VERCEL_TOOLBAR_BRANCH,a.default;var u=e.i(3303),_={scriptHostname:("u">typeof a.default?a.default.env.NEXT_PUBLIC_VERCEL_TOOLBAR_HOST:void 0)??"https://vercel.live",ownerId:"u">typeof a.default?a.default.env.NEXT_PUBLIC_VERCEL_TOOLBAR_OWNER_ID:void 0,projectId:"u">typeof a.default?a.default.env.NEXT_PUBLIC_VERCEL_TOOLBAR_PROJECT_ID:void 0,branch:"u">typeof a.default?a.default.env.NEXT_PUBLIC_VERCEL_TOOLBAR_BRANCH:void 0,deploymentId:"u">typeof a.default?"dpl_4QgG1NoxtNYFXWaSoGW23Ni1TP4J":void 0},m=e.i(271645);["1","true"].includes(a.default.env.NEXT_PUBLIC_VERCEL_TOOLBAR_INJECT_IN_DEVELOPMENT??"");var p=e.i(174080);if("u">typeof document){let e=document.getElementById("feedback-tool-styles-annotation-popup-css-styles");e||((e=document.createElement("style")).id="feedback-tool-styles-annotation-popup-css-styles",e.textContent='svg[fill=none] {\n fill: none !important;\n}\n\n@keyframes styles-module__popupEnter___AuQDN {\n from {\n opacity: 0;\n transform: translateX(-50%) scale(0.95) translateY(4px);\n }\n to {\n opacity: 1;\n transform: translateX(-50%) scale(1) translateY(0);\n }\n}\n@keyframes styles-module__popupExit___JJKQX {\n from {\n opacity: 1;\n transform: translateX(-50%) scale(1) translateY(0);\n }\n to {\n opacity: 0;\n transform: translateX(-50%) scale(0.95) translateY(4px);\n }\n}\n@keyframes styles-module__shake___jdbWe {\n 0%, 100% {\n transform: translateX(-50%) scale(1) translateY(0) translateX(0);\n }\n 20% {\n transform: translateX(-50%) scale(1) translateY(0) translateX(-3px);\n }\n 40% {\n transform: translateX(-50%) scale(1) translateY(0) translateX(3px);\n }\n 60% {\n transform: translateX(-50%) scale(1) translateY(0) translateX(-2px);\n }\n 80% {\n transform: translateX(-50%) scale(1) translateY(0) translateX(2px);\n }\n}\n.styles-module__popup___IhzrD {\n position: fixed;\n transform: translateX(-50%);\n width: 280px;\n padding: 0.75rem 1rem 14px;\n background: #1a1a1a;\n border-radius: 16px;\n box-shadow: 0 4px 24px rgba(0, 0, 0, 0.3), 0 0 0 1px rgba(255, 255, 255, 0.08);\n cursor: default;\n z-index: 100001;\n font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;\n will-change: transform, opacity;\n opacity: 0;\n}\n.styles-module__popup___IhzrD.styles-module__enter___L7U7N {\n animation: styles-module__popupEnter___AuQDN 0.2s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;\n}\n.styles-module__popup___IhzrD.styles-module__entered___COX-w {\n opacity: 1;\n transform: translateX(-50%) scale(1) translateY(0);\n}\n.styles-module__popup___IhzrD.styles-module__exit___5eGjE {\n animation: styles-module__popupExit___JJKQX 0.15s ease-in forwards;\n}\n.styles-module__popup___IhzrD.styles-module__entered___COX-w.styles-module__shake___jdbWe {\n animation: styles-module__shake___jdbWe 0.25s ease-out;\n}\n\n.styles-module__header___wWsSi {\n display: flex;\n align-items: center;\n justify-content: space-between;\n margin-bottom: 0.5625rem;\n}\n\n.styles-module__element___fTV2z {\n font-size: 0.75rem;\n font-weight: 400;\n color: rgba(255, 255, 255, 0.5);\n max-width: 100%;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n flex: 1;\n}\n\n.styles-module__headerToggle___WpW0b {\n display: flex;\n align-items: center;\n gap: 0.25rem;\n background: none;\n border: none;\n padding: 0;\n cursor: pointer;\n flex: 1;\n min-width: 0;\n text-align: left;\n}\n.styles-module__headerToggle___WpW0b .styles-module__element___fTV2z {\n flex: 1;\n}\n\n.styles-module__chevron___ZZJlR {\n color: rgba(255, 255, 255, 0.5);\n transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);\n flex-shrink: 0;\n}\n.styles-module__chevron___ZZJlR.styles-module__expanded___2Hxgv {\n transform: rotate(90deg);\n}\n\n.styles-module__stylesWrapper___pnHgy {\n display: grid;\n grid-template-rows: 0fr;\n transition: grid-template-rows 0.3s cubic-bezier(0.16, 1, 0.3, 1);\n}\n.styles-module__stylesWrapper___pnHgy.styles-module__expanded___2Hxgv {\n grid-template-rows: 1fr;\n}\n\n.styles-module__stylesInner___YYZe2 {\n overflow: hidden;\n}\n\n.styles-module__stylesBlock___VfQKn {\n background: rgba(255, 255, 255, 0.05);\n border-radius: 0.375rem;\n padding: 0.5rem 0.625rem;\n margin-bottom: 0.5rem;\n font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;\n font-size: 0.6875rem;\n line-height: 1.5;\n}\n\n.styles-module__styleLine___1YQiD {\n color: rgba(255, 255, 255, 0.85);\n word-break: break-word;\n}\n\n.styles-module__styleProperty___84L1i {\n color: #c792ea;\n}\n\n.styles-module__styleValue___q51-h {\n color: rgba(255, 255, 255, 0.85);\n}\n\n.styles-module__timestamp___Dtpsv {\n font-size: 0.625rem;\n font-weight: 500;\n color: rgba(255, 255, 255, 0.35);\n font-variant-numeric: tabular-nums;\n margin-left: 0.5rem;\n flex-shrink: 0;\n}\n\n.styles-module__quote___mcMmQ {\n font-size: 12px;\n font-style: italic;\n color: rgba(255, 255, 255, 0.6);\n margin-bottom: 0.5rem;\n padding: 0.4rem 0.5rem;\n background: rgba(255, 255, 255, 0.05);\n border-radius: 0.25rem;\n line-height: 1.45;\n}\n\n.styles-module__textarea___jrSae {\n width: 100%;\n padding: 0.5rem 0.625rem;\n font-size: 0.8125rem;\n font-family: inherit;\n background: rgba(255, 255, 255, 0.05);\n color: #fff;\n border: 1px solid rgba(255, 255, 255, 0.15);\n border-radius: 8px;\n resize: none;\n outline: none;\n transition: border-color 0.15s ease;\n}\n.styles-module__textarea___jrSae:focus {\n border-color: #3c82f7;\n}\n.styles-module__textarea___jrSae.styles-module__green___99l3h:focus {\n border-color: #34c759;\n}\n.styles-module__textarea___jrSae::placeholder {\n color: rgba(255, 255, 255, 0.35);\n}\n.styles-module__textarea___jrSae::-webkit-scrollbar {\n width: 6px;\n}\n.styles-module__textarea___jrSae::-webkit-scrollbar-track {\n background: transparent;\n}\n.styles-module__textarea___jrSae::-webkit-scrollbar-thumb {\n background: rgba(255, 255, 255, 0.2);\n border-radius: 3px;\n}\n\n.styles-module__actions___D6x3f {\n display: flex;\n justify-content: flex-end;\n gap: 0.375rem;\n margin-top: 0.5rem;\n}\n\n.styles-module__cancel___hRjnL,\n.styles-module__submit___K-mIR {\n padding: 0.4rem 0.875rem;\n font-size: 0.75rem;\n font-weight: 500;\n border-radius: 1rem;\n border: none;\n cursor: pointer;\n transition: background-color 0.15s ease, color 0.15s ease, opacity 0.15s ease;\n}\n\n.styles-module__cancel___hRjnL {\n background: transparent;\n color: rgba(255, 255, 255, 0.5);\n}\n.styles-module__cancel___hRjnL:hover {\n background: rgba(255, 255, 255, 0.1);\n color: rgba(255, 255, 255, 0.8);\n}\n\n.styles-module__submit___K-mIR {\n color: white;\n}\n.styles-module__submit___K-mIR:hover:not(:disabled) {\n filter: brightness(0.9);\n}
1\n.styles-module__submit___K-mIR:disabled {\n cursor: not-allowed;\n}\n\n.styles-module__deleteWrapper___oSjdo {\n margin-right: auto;\n}\n\n.styles-module__deleteButton___4VuAE {\n cursor: pointer;\n display: flex;\n align-items: center;\n justify-content: center;\n width: 28px;\n height: 28px;\n border-radius: 50%;\n border: none;\n background: transparent;\n color: rgba(255, 255, 255, 0.4);\n transition: background-color 0.15s ease, color 0.15s ease, transform 0.1s ease;\n}\n.styles-module__deleteButton___4VuAE:hover {\n background: rgba(255, 59, 48, 0.25);\n color: #ff3b30;\n}\n.styles-module__deleteButton___4VuAE:active {\n transform: scale(0.92);\n}\n\n.styles-module__light___6AaSQ.styles-module__popup___IhzrD {\n background: #fff;\n box-shadow: 0 4px 24px rgba(0, 0, 0, 0.12), 0 0 0 1px rgba(0, 0, 0, 0.06);\n}\n.styles-module__light___6AaSQ .styles-module__element___fTV2z {\n color: rgba(0, 0, 0, 0.6);\n}\n.styles-module__light___6AaSQ .styles-module__timestamp___Dtpsv {\n color: rgba(0, 0, 0, 0.4);\n}\n.styles-module__light___6AaSQ .styles-module__chevron___ZZJlR {\n color: rgba(0, 0, 0, 0.4);\n}\n.styles-module__light___6AaSQ .styles-module__stylesBlock___VfQKn {\n background: rgba(0, 0, 0, 0.03);\n}\n.styles-module__light___6AaSQ .styles-module__styleLine___1YQiD {\n color: rgba(0, 0, 0, 0.75);\n}\n.styles-module__light___6AaSQ .styles-module__styleProperty___84L1i {\n color: #7c3aed;\n}\n.styles-module__light___6AaSQ .styles-module__styleValue___q51-h {\n color: rgba(0, 0, 0, 0.75);\n}\n.styles-module__light___6AaSQ .styles-module__quote___mcMmQ {\n color: rgba(0, 0, 0, 0.55);\n background: rgba(0, 0, 0, 0.04);\n}\n.styles-module__light___6AaSQ .styles-module__textarea___jrSae {\n background: rgba(0, 0, 0, 0.03);\n color: #1a1a1a;\n border-color: rgba(0, 0, 0, 0.12);\n}\n.styles-module__light___6AaSQ .styles-module__textarea___jrSae::placeholder {\n color: rgba(0, 0, 0, 0.4);\n}\n.styles-module__light___6AaSQ .styles-module__textarea___jrSae::-webkit-scrollbar-thumb {\n background: rgba(0, 0, 0, 0.15);\n}\n.styles-module__light___6AaSQ .styles-module__cancel___hRjnL {\n color: rgba(0, 0, 0, 0.5);\n}\n.styles-module__light___6AaSQ .styles-module__cancel___hRjnL:hover {\n background: rgba(0, 0, 0, 0.06);\n color: rgba(0, 0, 0, 0.75);\n}\n.styles-module__light___6AaSQ .styles-module__deleteButton___4VuAE {\n color: rgba(0, 0, 0, 0.4);\n}\n.styles-module__light___6AaSQ .styles-module__deleteButton___4VuAE:hover {\n background: rgba(255, 59, 48, 0.15);\n color: #ff3b30;\n}',document.head.appendChild(e))}var h="styles-module__element___fTV2z",g="styles-module__expanded___2Hxgv",f=({size:e=24})=>(0,i.jsx)("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,i.jsx)("path",{d:"M13.5 4C14.7426 4 15.75 5.00736 15.75 6.25V7H18.5C18.9142 7 19.25 7.33579 19.25 7.75C19.25 8.16421 18.9142 8.5 18.5 8.5H17.9678L17.6328 16.2217C17.61 16.7475 17.5912 17.1861 17.5469 17.543C17.5015 17.9087 17.4225 18.2506 17.2461 18.5723C16.9747 19.0671 16.5579 19.4671 16.0518 19.7168C15.7227 19.8791 15.3772 19.9422 15.0098 19.9717C14.6514 20.0004 14.2126 20 13.6865 20H10.3135C9.78735 20 9.34856 20.0004 8.99023 19.9717C8.62278 19.9422 8.27729 19.8791 7.94824 19.7168C7.44205 19.4671 7.02532 19.0671 6.75391 18.5723C6.57751 18.2506 6.49853 17.9087 6.45312 17.543C6.40883 17.1861 6.39005 16.7475 6.36719 16.2217L6.03223 8.5H5.5C5.08579 8.5 4.75 8.16421 4.75 7.75C4.75 7.33579 5.08579 7 5.5 7H8.25V6.25C8.25 5.00736 9.25736 4 10.5 4H13.5ZM7.86621 16.1562C7.89013 16.7063 7.90624 17.0751 7.94141 17.3584C7.97545 17.6326 8.02151 17.7644 8.06934 17.8516C8.19271 18.0763 8.38239 18.2577 8.6123 18.3711C8.70153 18.4151 8.83504 18.4545 9.11035 18.4766C9.39482 18.4994 9.76335 18.5 10.3135 18.5H13.6865C14.2367 18.5 14.6052 18.4994 14.8896 18.4766C15.165 18.4545 15.2985 18.4151 15.3877 18.3711C15.6176 18.2577 15.8073 18.0763 15.9307 17.8516C15.9785 17.7644 16.0245 17.6326 16.0586 17.3584C16.0938 17.0751 16.1099 16.7063 16.1338 16.1562L16.4668 8.5H7.5332L7.86621 16.1562ZM9.97656 10.75C10.3906 10.7371 10.7371 11.0626 10.75 11.4766L10.875 15.4766C10.8879 15.8906 10.5624 16.2371 10.1484 16.25C9.73443 16.2629 9.38794 15.9374 9.375 15.5234L9.25 11.5234C9.23706 11.1094 9.56255 10.7629 9.97656 10.75ZM14.0244 10.75C14.4383 10.7635 14.7635 11.1105 14.75 11.5244L14.6201 15.5244C14.6066 15.9384 14.2596 16.2634 13.8457 16.25C13.43
117 16.2365 13.1067 15.8896 13.1201 15.4756L13.251 11.4756C13.2645 11.0617 13.6105 10.7366 14.0244 10.75ZM10.5 5.5C10.0858 5.5 9.75 5.83579 9.75 6.25V7H14.25V6.25C14.25 5.83579 13.9142 5.5 13.5 5.5H10.5Z",fill:"currentColor"})}),y=["data-feedback-toolbar","data-annotation-popup","data-annotation-marker"],b=y.flatMap(e=>[`:not([${e}])`,`:not([${e}] *)`]).join(""),x="__agentation_freeze",v=function(){if("u"<typeof window)return{frozen:!1,installed:!0,origSetTimeout:setTimeout,origSetInterval:setInterval,origRAF:e=>0,pausedAnimations:[],frozenTimeoutQueue:[],frozenRAFQueue:[]};let e=window;return e[x]||(e[x]={frozen:!1,installed:!1,origSetTimeout:null,origSetInterval:null,origRAF:null,pausedAnimations:[],frozenTimeoutQueue:[],frozenRAFQueue:[]}),e[x]}();"u">typeof window&&!v.installed&&(v.origSetTimeout=window.setTimeout.bind(window),v.origSetInterval=window.setInterval.bind(window),v.origRAF=window.requestAnimationFrame.bind(window),window.setTimeout=(e,t,...n)=>"string"==typeof e?v.origSetTimeout(e,t):v.origSetTimeout((...t)=>{v.frozen?v.frozenTimeoutQueue.push(()=>e(...t)):e(...t)},t,...n),window.setInterval=(e,t,...n)=>"string"==typeof e?v.origSetInterval(e,t):v.origSetInterval((...t)=>{v.frozen||e(...t)},t,...n),window.requestAnimationFrame=e=>v.origRAF(t=>{v.frozen?v.frozenRAFQueue.push(e):e(t)}),v.installed=!0);var w=v.origSetTimeout,S=v.origSetInterval;(0,m.forwardRef)(function({element:e,timestamp:t,selectedText:n,placeholder:r="What should change?",initialValue:s="",submitLabel:o="Add",onSubmit:a,onCancel:l,onDelete:d,style:c,accentColor:u="#3c82f7",isExiting:_=!1,lightMode:p=!1,computedStyles:y},b){let[x,v]=(0,m.useState)(s),[S,C]=(0,m.useState)(!1),[k,j]=(0,m.useState)("initial"),[E,N]=(0,m.useState)(!1),[T,R]=(0,m.useState)(!1),A=(0,m.useRef)(null),I=(0,m.useRef)(null),M=(0,m.useRef)(null),L=(0,m.useRef)(null);(0,m.useEffect)(()=>{_&&"exit"!==k&&j("exit")},[_,k]),(0,m.useEffect)(()=>{w(()=>{j("enter")},0);let e=w(()=>{j("entered")},200),t=w(()=>{let e=A.current;e&&(e.focus(),e.selectionStart=e.selectionEnd=e.value.length,e.scrollTop=e.scrollHeight)},50);return()=>{clearTimeout(e),clearTimeout(t),M.current&&clearTimeout(M.current),L.current&&clearTimeout(L.current)}},[]);let P=(0,m.useCallback)(()=>{L.current&&clearTimeout(L.current),C(!0),L.current=w(()=>{C(!1),A.current?.focus()},250)},[]);(0,m.useImperativeHandle)(b,()=>({shake:P}),[P]);let D=(0,m.useCallback)(()=>{j("exit"),M.current=w(()=>{l()},150)},[l]),O=(0,m.useCallback)(()=>{x.trim()&&a(x.trim())},[x,a]),F=(0,m.useCallback)(e=>{e.nativeEvent.isComposing||("Enter"!==e.key||e.shiftKey||(e.preventDefault(),O()),"Escape"===e.key&&D())},[O,D]),B=["styles-module__popup___IhzrD",p?"styles-module__light___6AaSQ":"","enter"===k?"styles-module__enter___L7U7N":"","entered"===k?"styles-module__entered___COX-w":"","exit"===k?"styles-module__exit___5eGjE":"",S?"styles-module__shake___jdbWe":""].filter(Boolean).join(" ");return(0,i.jsxs)("div",{ref:I,className:B,"data-annotation-popup":!0,style:c,onClick:e=>e.stopPropagation(),children:[(0,i.jsxs)("div",{className:"styles-module__header___wWsSi",children:[y&&Object.keys(y).length>0?(0,i.jsxs)("button",{className:"styles-module__headerToggle___WpW0b",onClick:()=>{R(!T),T&&w(()=>A.current?.focus(),0)},type:"button",children:[(0,i.jsx)("svg",{className:`styles-module__chevron___ZZJlR ${T?g:""}`,width:"14",height:"14",viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,i.jsx)("path",{d:"M5.5 10.25L9 7.25L5.75 4",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})}),(0,i.jsx)("span",{className:h,children:e})]}):(0,i.jsx)("span",{className:h,children:e}),t&&(0,i.jsx)("span",{className:"styles-module__timestamp___Dtpsv",children:t})]}),y&&Object.keys(y).length>0&&(0,i.jsx)("div",{className:`styles-module__stylesWrapper___pnHgy ${T?g:""}`,children:(0,i.jsx)("div",{className:"styles-module__stylesInner___YYZe2",children:(0,i.jsx)("div",{className:"styles-module__stylesBlock___VfQKn",children:Object.entries(y).map(([e,t])=>(0,i.jsxs)("div",{className:"styles-module__styleLine___1YQiD",children:[(0,i.jsx)("span",{className:"styles-module__styleProperty___84L1i",children:e.replace(/([A-Z])/g,"-$1").toLowerCase()}),": ",(0,i.jsx)("span",{className:"styles-module__styleValue___q51-h",children:t}),";"]},e))})})}),n&&(0,i.jsxs)("div",{className:"styles-module__quote___mcMmQ",children:["â",n.slice(0,80),n.length>80?"...":"","â"]}),(0,i.jsx)("textarea",{ref:A,className:"styles-module__textarea___jrSae",style:{borderColor:E?u:void 0},placeholder:r,value:x,onChange:e=>v(e.target.value),onFocus:()=>N(!0),onBlur:()=>N(!1),rows:2,onKeyDown:F}),(0,i.jsxs)("div",{className:"styles-module__actions___D6x3f",children:[d&&(0,i.jsx)("div",{className:"styles-module__deleteWrapper___oSjdo",children:(0,i.jsx)("button",{className:"styles-module__deleteButton___4VuAE",onClick:d,type:"button",children:(0,i.jsx)(f,{size:22})})}),(0,i.jsx)("button",{className:"styles-module__cancel___hRjnL",onClick:D,children:"Cancel"}),(0,i.jsx)("button",{className:"styles-module__submit___K-mIR",style:{backgroundColor:u,opacity:x.trim()?1:.4},onClick:O,disabled:!x.trim(),children:o})]})]})});if("u">typeof document){let e=document.getElementById("feedback-tool-styles-page-toolbar-css-styles");e||((e=document.createElement("style")).id="feedback-tool-styles-page-toolbar-css-styles",e.textContent='svg[fill=none] {\n fill: none !important;\n}\n\n@keyframes styles-module__toolbarEnter___u8RRu {\n from {\n opacity: 0;\n transform: scale(0.5) rotate(90deg);\n }\n to {\n opacity: 1;\n transform: scale(1) rotate(0deg);\n }\n}\n@keyframes styles-module__badgeEnter___mVQLj {\n from {\n opacity: 0;\n transform: scale(0);\n }\n to {\n opacity: 1;\n transform: scale(1);\n }\n}\n@keyframes styles-module__scaleIn___c-r1K {\n from {\n opacity: 0;\n transform: scale(0.85);\n }\n to {\n opacity: 1;\n transform: scale(1);\n }\n}\n@keyframes styles-module__scaleOut___Wctwz {\n from {\n opacity: 1;\n transform: scale(1);\n }\n to {\n opacity: 0;\n transform: scale(0.85);\n }\n}\n@keyframes styles-module__slideUp___kgD36 {\n from {\n opacity: 0;\n transform: scale(0.85) translateY(8px);\n }\n to {\n opacity: 1;\n transform: scale(1) translateY(0);\n }\n}\n@keyframes styles-module__slideDown___zcdje {\n from {\n opacity: 1;\n transform: scale(1) translateY(0);\n }\n to {\n opacity: 0;\n transform: scale(0.85) translateY(8px);\n }\n}\n@keyframes styles-module__markerIn___5FaAP {\n 0% {\n opacity: 0;\n transform: translate(-50%, -50%) scale(0.3);\n }\n 100% {\n opacity: 1;\n transform: translate(-50%, -50%) scale(1);\n }\n}\n@keyframes styles-module__markerOut___GU5jX {\n 0% {\n opacity: 1;\n transform: translate(-50%, -50%) scale(1);\n }\n 100% {\n opacity: 0;\n transform: translate(-50%, -50%) scale(0.3);\n }\n}\n@keyframes styles-module__fadeIn___b9qmf {\n from {\n opacity: 0;\n }\n to {\n opacity: 1;\n }\n}\n@keyframes styles-module__fadeOut___6Ut6- {\n from {\n opacity: 1;\n }\n to {\n opacity: 0;\n }\n}\n@keyframes styles-module__tooltipIn___0N31w {\n from {\n opacity: 0;\n transform: translateX(-50%) translateY(2px) scale(0.891);\n }\n to {\n opacity: 1;\n transform: translateX(-50%) translateY(0) scale(0.909);\n }\n}\n@keyframes styles-module__hoverHighlightIn___6WYHY {\n from {\n opacity: 0;\n transform: scale(0.98);\n }\n to {\n opacity: 1;\n transform: scale(1);\n }\n}\n@keyframes styles-module__hoverTooltipIn___FYGQx {\n from {\n opacity: 0;\n transform: scale(0.95) translateY(4px);\n }\n to {\n opacity: 1;\n transform: scale(1) translateY(0);\n }\n}\n@keyframes styles-module__settingsPanelIn___MGfO8 {\n from {\n opacity: 0;\n transform: translateY(10px) scale(0.95);\n filter: blur(5px);\n }\n to {\n opacity: 1;\n transform: translateY(0) scale(1);\n filter: blur(0px);\n }\n}\n@keyframes styles-module__settingsPanelOut___Zfymi {\n from {\n opacity: 1;\n transform: translateY(0) scale(1);\n filter: blur(0px);\n }\n to {\n opacity: 0;\n transform: translateY(20px) scale(0.95);\n filter: blur(5px);\n }\n}\n.styles-module__toolbar___wNsdK {\n position: fixed;\n bottom: 1.25rem;\n right: 1.25rem;\n width: 297px;\n z-index: 100000;\n font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;\n pointer-events: none;\n transition: left 0s, top 0s, right 0s, bottom 0s;\n}\n\n.styles-module__toolbarContainer___dIhma {\n user-select: none;\n margin-left: auto;\n align-self: flex-end;\n display: flex;\n align-items: center;\n justify-content: center;\n background: #1a1a1a;\n color: #fff;\n border: none;\n box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2), 0 4px 16px rgba(0, 0, 0, 0.1);\n pointer-events: auto;\n cursor: grab;\n transition: width 0.4s cubic-bezier(0.19, 1, 0.22, 1), transform 0.4s cubic-bezier(0.19, 1, 0.22, 1);\n}\n.styles-module__toolbarContainer___dIhma.styles-module__dragging___xrolZ {\n transition: width 0.4s cubic-bezier(0.19, 1, 0.22, 1);\n cursor: grabbing;\n}\n.styles-module__toolbarContainer___dIhma.styles-module__entrance___sgHd8 {\n animation: styles-module__toolbarEnter___u8RRu 0.5s cubic-bezier(0.34, 1.2, 0.64, 1) forwards;\n}\n.styles-module__toolbarContainer___dIhma.styles-module__collapsed___Rydsn {\n width: 44px;\n height: 44px;\n border-radius: 22px;\n padding: 0;\n cursor: pointer;\n}\n.styles-module__toolbarContainer___dIhma.styles-module__collapsed___Rydsn svg {\n margin-top: -1
1px;\n}\n.styles-module__toolbarContainer___dIhma.styles-module__collapsed___Rydsn:hover {\n background: #2a2a2a;\n}\n.styles-module__toolbarContainer___dIhma.styles-module__collapsed___Rydsn:active {\n transform: scale(0.95);\n}\n.styles-module__toolbarContainer___dIhma.styles-module__expanded___ofKPx {\n height: 44px;\n border-radius: 1.5rem;\n padding: 0.375rem;\n width: 257px;\n}\n.styles-module__toolbarContainer___dIhma.styles-module__expanded___ofKPx.styles-module__serverConnected___Gfbou {\n width: 297px;\n}\n\n.styles-module__toggleContent___0yfyP {\n position: absolute;\n display: flex;\n align-items: center;\n justify-content: center;\n transition: opacity 0.1s cubic-bezier(0.19, 1, 0.22, 1);\n}\n.styles-module__toggleContent___0yfyP.styles-module__visible___KHwEW {\n opacity: 1;\n visibility: visible;\n pointer-events: auto;\n}\n.styles-module__toggleContent___0yfyP.styles-module__hidden___Ae8H4 {\n opacity: 0;\n pointer-events: none;\n}\n\n.styles-module__controlsContent___9GJWU {\n display: flex;\n align-items: center;\n gap: 0.375rem;\n transition: filter 0.8s cubic-bezier(0.19, 1, 0.22, 1), opacity 0.8s cubic-bezier(0.19, 1, 0.22, 1), transform 0.6s cubic-bezier(0.19, 1, 0.22, 1);\n}\n.styles-module__controlsContent___9GJWU.styles-module__visible___KHwEW {\n opacity: 1;\n filter: blur(0px);\n transform: scale(1);\n visibility: visible;\n pointer-events: auto;\n}\n.styles-module__controlsContent___9GJWU.styles-module__hidden___Ae8H4 {\n pointer-events: none;\n opacity: 0;\n filter: blur(10px);\n transform: scale(0.4);\n}\n\n.styles-module__badge___2XsgF {\n position: absolute;\n top: -13px;\n right: -13px;\n user-select: none;\n min-width: 18px;\n height: 18px;\n padding: 0 5px;\n border-radius: 9px;\n background: #3c82f7;\n color: white;\n font-size: 0.625rem;\n font-weight: 600;\n display: flex;\n align-items: center;\n justify-content: center;\n box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15), inset 0 0 0 1px rgba(255, 255, 255, 0.04);\n opacity: 1;\n transition: transform 0.3s ease, opacity 0.2s ease;\n transform: scale(1);\n}\n.styles-module__badge___2XsgF.styles-module__fadeOut___6Ut6- {\n opacity: 0;\n transform: scale(0);\n pointer-events: none;\n}\n.styles-module__badge___2XsgF.styles-module__entrance___sgHd8 {\n animation: styles-module__badgeEnter___mVQLj 0.3s cubic-bezier(0.34, 1.2, 0.64, 1) 0.4s both;\n}\n\n.styles-module__controlButton___8Q0jc {\n position: relative;\n cursor: pointer !important;\n display: flex;\n align-items: center;\n justify-content: center;\n width: 34px;\n height: 34px;\n border-radius: 50%;\n border: none;\n background: transparent;\n color: rgba(255, 255, 255, 0.85);\n transition: background-color 0.15s ease, color 0.15s ease, transform 0.1s ease, opacity 0.2s ease;\n}\n.styles-module__controlButton___8Q0jc:hover:not(:disabled):not([data-active=true]):not([data-failed=true]):not([data-auto-sync=true]):not([data-error=true]):not([data-no-hover=true]) {\n background: rgba(255, 255, 255, 0.12);\n color: #fff;\n}\n.styles-module__controlButton___8Q0jc:active:not(:disabled) {\n transform: scale(0.92);\n}\n.styles-module__controlButton___8Q0jc:disabled {\n opacity: 0.35;\n cursor: not-allowed;\n}\n.styles-module__controlButton___8Q0jc[data-active=true] {\n color: #3c82f7;\n background: rgba(60, 130, 247, 0.25);\n}\n.styles-module__controlButton___8Q0jc[data-error=true] {\n color: #ff3b30;\n background: rgba(255, 59, 48, 0.25);\n}\n.styles-module__controlButton___8Q0jc[data-danger]:hover:not(:disabled):not([data-active=true]):not([data-failed=true]) {\n background: rgba(255, 59, 48, 0.25);\n color: #ff3b30;\n}\n.styles-module__controlButton___8Q0jc[data-no-hover=true], .styles-module__controlButton___8Q0jc.styles-module__statusShowing___te6iu {\n cursor: default !important;\n pointer-events: none;\n background: transparent !important;\n}\n.styles-module__controlButton___8Q0jc[data-auto-sync=true] {\n color: #34c759;\n background: transparent;\n cursor: default;\n}\n.styles-module__controlButton___8Q0jc[data-failed=true] {\n color: #ff3b30;\n background: rgba(255, 59, 48, 0.25);\n}\n\n.styles-module__buttonBadge___NeFWb {\n position: absolute;\n top: 0px;\n right: 0px;\n min-width: 16px;\n height: 16px;\n padding: 0 4px;\n border-radius: 8px;\n background: #3c82f7;\n color: white;\n font-size: 0.625rem;\n font-weight: 600;\n display: flex;\n align-items: center;\n justify-content: center;\n box-shadow: 0 0 0 2px #1a1a1a, 0 1px 3px rgba(0, 0, 0, 0.2);\n pointer-events: none;\n}\n.styles-module__buttonBadge___NeFWb.styles-module__light___r6n4Y {\n box-shadow: 0 0 0 2px #fff, 0 1px 3px rgba(0, 0, 0, 0.2);\n}\n\n@keyframes styles-module__mcpIndicatorPulseConnected___EDodZ {\n 0%, 100% {\n box-shadow: 0 0 0 0 rgba(52, 199, 89, 0.5);\n }\n 50% {\n box-shadow: 0 0 0 5px rgba(52, 199, 89, 0);\n }\n}\n@keyframes styles-module__mcpIndicatorPulseConnecting___cCYte {\n 0%, 100% {\n box-shadow: 0 0 0 0 rgba(245, 166, 35, 0.5);\n }\n 50% {\n box-shadow: 0 0 0 5px rgba(245, 166, 35, 0);\n }\n}\n.styles-module__mcpIndicator___zGJeL {\n position: absolute;\n top: 3px;\n right: 3px;\n width: 6px;\n height: 6px;\n border-radius: 50%;\n pointer-events: none;\n transition: background 0.3s ease, opacity 0.15s ease, transform 0.15s ease;\n opacity: 1;\n transform: scale(1);\n}\n.styles-module__mcpIndicator___zGJeL.styles-module__connected___7c28g {\n background: #34c759;\n animation: styles-module__mcpIndicatorPulseConnected___EDodZ 2.5s ease-in-out infinite;\n}\n.styles-module__mcpIndicator___zGJeL.styles-module__connecting___uo-CW {\n background: #f5a623;\n animation: styles-module__mcpIndicatorPulseConnecting___cCYte 1.5s ease-in-out infinite;\n}\n.styles-module__mcpIndicator___zGJeL.styles-module__hidden___Ae8H4 {\n opacity: 0;\n transform: scale(0);\n animation: none;\n}\n\n@keyframes styles-module__connectionPulse___-Zycw {\n 0%, 100% {\n opacity: 1;\n transform: scale(1);\n }\n 50% {\n opacity: 0.6;\n transform: scale(0.9);\n }\n}\n.styles-module__connectionIndicatorWrapper___L-e-3 {\n width: 8px;\n height: 34px;\n margin-left: 6px;\n margin-right: 6px;\n}\n\n.styles-module__connectionIndicator___afk9p {\n position: relative;\n width: 8px;\n height: 8px;\n border-radius: 50%;\n opacity: 0;\n transition: opacity 0.3s ease, background 0.3s ease;
1\n cursor: default;\n}\n\n.styles-module__connectionIndicatorVisible___C-i5B {\n opacity: 1;\n}\n\n.styles-module__connectionIndicatorConnected___IY8pR {\n background: #34c759;\n animation: styles-module__connectionPulse___-Zycw 2.5s ease-in-out infinite;\n}\n\n.styles-module__connectionIndicatorDisconnected___kmpaZ {\n background: #ff3b30;\n animation: none;\n}\n\n.styles-module__connectionIndicatorConnecting___QmSLH {\n background: #f59e0b;\n animation: styles-module__connectionPulse___-Zycw 1s ease-in-out infinite;\n}\n\n.styles-module__buttonWrapper___rBcdv {\n position: relative;\n display: flex;\n align-items: center;\n justify-content: center;\n}\n.styles-module__buttonWrapper___rBcdv:hover .styles-module__buttonTooltip___Burd9 {\n opacity: 1;\n visibility: visible;\n transform: translateX(-50%) scale(1);\n transition-delay: 0.85s;\n}\n.styles-module__buttonWrapper___rBcdv:has(.styles-module__controlButton___8Q0jc:disabled):hover .styles-module__buttonTooltip___Burd9 {\n opacity: 0;\n visibility: hidden;\n}\n\n.styles-module__sendButtonWrapper___UUxG6 {\n width: 0;\n opacity: 0;\n overflow: hidden;\n pointer-events: none;\n margin-left: -0.375rem;\n transition: width 0.4s cubic-bezier(0.19, 1, 0.22, 1), opacity 0.3s cubic-bezier(0.19, 1, 0.22, 1), margin 0.4s cubic-bezier(0.19, 1, 0.22, 1);\n}\n.styles-module__sendButtonWrapper___UUxG6 .styles-module__controlButton___8Q0jc {\n transform: scale(0.8);\n transition: transform 0.4s cubic-bezier(0.19, 1, 0.22, 1);\n}\n.styles-module__sendButtonWrapper___UUxG6.styles-module__sendButtonVisible___WPSQU {\n width: 34px;\n opacity: 1;\n overflow: visible;\n pointer-events: auto;\n margin-left: 0;\n}\n.styles-module__sendButtonWrapper___UUxG6.styles-module__sendButtonVisible___WPSQU .styles-module__controlButton___8Q0jc {\n transform: scale(1);\n}\n\n.styles-module__buttonTooltip___Burd9 {\n position: absolute;\n bottom: calc(100% + 14px);\n left: 50%;\n transform: translateX(-50%) scale(0.95);\n padding: 6px 10px;\n background: #1a1a1a;\n color: rgba(255, 255, 255, 0.9);\n font-size: 12px;\n font-weight: 500;\n border-radius: 8px;\n white-space: nowrap;\n opacity: 0;\n visibility: hidden;\n pointer-events: none;\n z-index: 100001;\n box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);\n transition: opacity 0.135s ease, transform 0.135s ease, visibility 0.135s ease;\n}\n.styles-module__buttonTooltip___Burd9::after {\n content: "";\n position: absolute;\n top: calc(100% - 4px);\n left: 50%;\n transform: translateX(-50%) rotate(45deg);\n width: 8px;\n height: 8px;\n background: #1a1a1a;\n border-radius: 0 0 2px 0;\n}\n\n.styles-module__shortcut___lEAQk {\n margin-left: 4px;\n opacity: 0.5;\n}\n\n.styles-module__tooltipBelow___m6ats .styles-module__buttonTooltip___Burd9 {\n bottom: auto;\n top: calc(100% + 14px);\n transform: translateX(-50%) scale(0.95);\n}\n.styles-module__tooltipBelow___m6ats .styles-module__buttonTooltip___Burd9::after {\n top: -4px;\n bottom: auto;\n border-radius: 2px 0 0 0;\n}\n\n.styles-module__tooltipBelow___m6ats .styles-module__buttonWrapper___rBcdv:hover .styles-module__buttonTooltip___Burd9 {\n transform: translateX(-50%) scale(1);\n}\n\n.styles-module__tooltipsHidden___VtLJG .styles-module__buttonTooltip___Burd9 {\n opacity: 0 !important;\n visibility: hidden !important;\n transition: none !important;\n}\n\n.styles-module__tooltipVisible___0jcCv,\n.styles-module__tooltipsHidden___VtLJG .styles-module__tooltipVisible___0jcCv {\n opacity: 1 !important;\n visibility: visible !important;\n transform: translateX(-50%) scale(1) !important;\n transition-delay: 0s !important;\n}\n\n.styles-module__buttonWrapperAlignLeft___myzIp .styles-module__buttonTooltip___Burd9 {\n left: 50%;\n transform: translateX(-12px) scale(0.95);\n}\n.styles-module__buttonWrapperAlignLeft___myzIp .styles-module__buttonTooltip___Burd9::after {\n left: 16px;\n}\n.styles-module__buttonWrapperAlignLeft___myzIp:hover .styles-module__buttonTooltip___Burd9 {\n transform: translateX(-12px) scale(1);\n}\n\n.styles-module__tooltipBelow___m6ats .styles-module__buttonWrapperAlignLeft___myzIp .styles-module__buttonTooltip___Burd9 {\n transform: translateX(-12px) scale(0.95);\n}\n.styles-module__tooltipBelow___m6ats .styles-module__buttonWrapperAlignLeft___myzIp:hover .styles-module__buttonTooltip___Burd9 {\n transform: translateX(-12px) scale(1);\n}\n\n.styles-module__buttonWrapperAlignRight___HCQFR .styles-module__buttonTooltip___Burd9 {\n left: 50%;\n transform: translateX(calc(-100% + 12px)) scale(0.95);\n}\n.styles-module__buttonWrapperAlignRight___HCQFR .styles-module__buttonTooltip___Burd9::after {\n left: auto;\n right: 8px;\n}\n.styles-module__buttonWrapperAlignRight___HCQFR:hover .styles-module__buttonTooltip___Burd9 {\n transform: translateX(calc(-100% + 12px)) scale(1);\n}\n\n.styles-module__tooltipBelow___m6ats .styles-module__buttonWrapperAlignRight___HCQFR .styles-module__buttonTooltip___Burd9 {\n transform: translateX(calc(-100% + 12px)) scale(0.95);\n}\n.styles-module__tooltipBelow___m6ats .styles-module__buttonWrapperAlignRight___HCQFR:hover .styles-module__buttonTooltip___Burd9 {\n transform: translateX(calc(-100% + 12px)) scale(1);\n}\n\n.styles-module__divider___c--s1 {\n width: 1px;\n height: 12px;\n background: rgba(255, 255, 255, 0.15);\n margin: 0 0.125rem;\n}\n\n.styles-module__overlay___Q1O9y {\n position: fixed;\n inset: 0;\n z-index: 99997;\n pointer-events: none;\n}\n.styles-module__overlay___Q1O9y > * {\n pointer-events: auto;\n}\n\n.styles-module__hoverHighlight___ogakW {\n position: fixed;\n border: 2px solid rgba(60, 130, 247, 0.5);\n border-radius: 4px;\n pointer-events: none !important;\n background: rgba(60, 130, 247, 0.04);\n box-sizing: border-box;\n will-change: opacity;\n contain: layout style;\n}\n.styles-module__hoverHighlight___ogakW.styles-module__enter___WFIki {\n animation: styles-module__hoverHighlightIn___6WYHY 0.12s ease-out forwards;\n}\n\n.styles-module__multiSelectOutline___cSJ-m {\n position: fixed;\n border: 2px dashed rgba(52, 199, 89, 0.6);\n border-radius: 4px;\n pointer-events: none !important;\n background: rgba(52, 199, 89, 0.05);\n box-sizing: border-box;\n will-change: opacity;\n}\n.styles-module__multiSelectOutline___cSJ-m.styles-module__enter___WFIki {\n animation: styles-module__fadeIn___b9qmf 0.15s ease-out forwards;\n}\n.styles-module__multiSelectOutline___cSJ-m.styles-module__exit___fyOJ0 {\n animation: styles-module__fadeOut___6Ut6- 0.15s ease-out forwards;\n}\n\n.styles-module__singleSelectOutline___QhX-O {\n position: fixed;\n border: 2px solid rgba(60, 130, 247, 0.6);\n border-radius: 4px;\n pointer-events: none !important;\n background: rgba(60, 130, 247, 0.05);\n box-sizing: border-box;\n will-change: opacity;\n}\n.styles-module__singleSelectOutline___QhX-O.styles-module__enter___WFIki {\n animation: styles-module__fadeIn___b9qmf 0.15s ease-out forwards;\n}\n.styles-module__singleSelectOutline___QhX-O.styles-module__exit___fyOJ0 {\n animation: styles-module__fadeOut___6Ut6- 0.15s ease-out forwards;\n}\n\n.styles-module__hoverTooltip___bvLk7 {\n position: fixed;\n font-size: 0.6875rem;\n font-weight: 500;\n color: #fff;\n background: rgba(0, 0, 0, 0.85);\n padding: 0.35rem 0.6rem;\n border-radius: 0.375rem;\n pointer-events: none !important;\n white-space: nowrap;\n max-width: 280px;\n overflow: hidden;\n text-overflow: ellipsis;\n}\n.styles-module__hoverTooltip___bvLk7.styles-module__enter___WFIki {\n animation: styles-module__hoverTooltipIn___FYGQx 0.1s ease-out forwards;\n}\n\n.styles-module__hoverReactPath___gx1IJ {\n font-size: 0.625rem;\n color: rgba(255, 255, 255, 0.6);\n margin-bottom: 0.15rem;\n overflow: hidden;\n text-overflow: ellipsis;\n}\n\n.styles-module__hoverElementName___QMLMl {\n overflow: hidden;\n text-overflow: ellipsis;\n}\n\n.styles-module__markersLayer___-25j1 {\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n height: 0;\n z-index: 99998;\n pointer-events: none;\n}\n.styles-module__markersLayer___-25j1 > * {\n pointer-events: auto;\n}\n\n.styles-module__fixedMarkersLayer___ffyX6 {\n position: fixed;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n z-index: 99998;\n pointer-events: none;\n}\n.styles-module__fixedMarkersLayer___ffyX6 > * {\n pointer-events: auto;\n}\n\n.styles-module__marker___6sQrs {\n position: absolute;\n width: 22px;\n height: 22px;\n background: #3c82f7;\n color: white;\n border-radius: 50%;\n display: flex;\n align-items: center;\n justify-content: center;\n font-size: 0.6875rem;\n font-weight: 600;\n transform: translate(-50%, -50%) scale(1);\n opacity: 1;\n cursor: pointer;\n box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2), inset 0 0 0 1px rgba(0, 0, 0, 0.04);\n user-select: none;\n will-change: transform, opacity;\n contain: layout style;\n z-index: 1;\n}\n.styles-module__marker___6sQrs:hover {\n z-index: 2;\n}\n.styles-module__marker___6sQrs:not(.styles-module__enter___WFIki):not(.styles-module__exit___fyOJ0):not(.styles-module__clearing___FQ--7) {\n transition: background-color 0.15s ease, transform 0.1s ease;\n}\n.styles-module__marker___6sQrs.styles-module__enter___WFIki {\n animation: styles-module__markerIn___5FaAP 0.25s cubic-bezier(0.22, 1, 0.36, 1) both;\n}\n.styles-module__marker___6sQrs.styles-module__exit___fyOJ0 {\n animation: styles-module__markerOut___GU5jX 0.2s ease-out both;\n pointer-events: none;\n}\n.styles-module__marker___6sQrs.styles-module__clearing___FQ--7 {\n animation: styles-module__markerOut___GU5jX 0.15s ease-out both;\n pointer-events: none;\n}\n.styles-module__marker___6sQrs:not(.styles-module__enter___WFIki):not(.styles-module__exit___fyOJ0):not(.styles-module__clearing___FQ--7):hover {\n transform: translate(-50%, -50%) scale(1.1);\n}\n.styles-module__marker___6sQrs.styles-module__pending___2IHLC {\n position: fixed;\n background: #3c82f7;\n}\n.styles-module__marker___6sQrs.styles-module__fixed___dBMHC {\n position: fixed;\n}\n.styles-module__marker___6sQrs.styles-module__multiSelect___YWiuz {\n background: #34c759;\n width: 26px;
1\n height: 26px;\n border-radius: 6px;\n font-size: 0.75rem;\n}\n.styles-module__marker___6sQrs.styles-module__multiSelect___YWiuz.styles-module__pending___2IHLC {\n background: #34c759;\n}\n.styles-module__marker___6sQrs.styles-module__hovered___ZgXIy {\n background: #ff3b30;\n}\n\n.styles-module__renumber___nCTxD {\n display: block;\n animation: styles-module__renumberRoll___Wgbq3 0.2s ease-out;\n}\n\n@keyframes styles-module__renumberRoll___Wgbq3 {\n 0% {\n transform: translateX(-40%);\n opacity: 0;\n }\n 100% {\n transform: translateX(0);\n opacity: 1;\n }\n}\n.styles-module__markerTooltip___aLJID {\n position: absolute;\n top: calc(100% + 10px);\n left: 50%;\n transform: translateX(-50%) scale(0.909);\n z-index: 100002;\n background: #1a1a1a;\n padding: 8px 0.75rem;\n border-radius: 0.75rem;\n font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;\n font-weight: 400;\n color: #fff;\n box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3), 0 0 0 1px rgba(255, 255, 255, 0.08);\n min-width: 120px;\n max-width: 200px;\n pointer-events: none;\n cursor: default;\n}\n.styles-module__markerTooltip___aLJID.styles-module__enter___WFIki {\n animation: styles-module__tooltipIn___0N31w 0.1s ease-out forwards;\n}\n\n.styles-module__markerQuote___FHmrz {\n display: block;\n font-size: 12px;\n font-style: italic;\n color: rgba(255, 255, 255, 0.6);\n margin-bottom: 0.3125rem;\n line-height: 1.4;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n}\n\n.styles-module__markerNote___QkrrS {\n display: block;\n font-size: 13px;\n font-weight: 400;\n line-height: 1.4;\n color: #fff;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n padding-bottom: 2px;\n}\n\n.styles-module__markerHint___2iF-6 {\n display: block;\n font-size: 0.625rem;\n font-weight: 400;\n color: rgba(255, 255, 255, 0.6);\n margin-top: 0.375rem;\n white-space: nowrap;\n}\n\n.styles-module__settingsPanel___OxX3Y {\n position: absolute;\n right: 5px;\n bottom: calc(100% + 0.5rem);\n z-index: 1;\n overflow: hidden;\n background: #1c1c1c;\n border-radius: 1rem;\n padding: 13px 0 16px;\n min-width: 205px;\n cursor: default;\n opacity: 1;\n box-shadow: 0 1px 8px rgba(0, 0, 0, 0.25), 0 0 0 1px rgba(0, 0, 0, 0.04);\n transition: background 0.25s ease, box-shadow 0.25s ease;\n}\n.styles-module__settingsPanel___OxX3Y::before, .styles-module__settingsPanel___OxX3Y::after {\n content: "";\n position: absolute;\n top: 0;\n bottom: 0;\n width: 16px;\n z-index: 2;\n pointer-events: none;\n}\n.styles-module__settingsPanel___OxX3Y::before {\n left: 0;\n background: linear-gradient(to right, #1c1c1c 0%, transparent 100%);\n}\n.styles-module__settingsPanel___OxX3Y::after {\n right: 0;\n background: linear-gradient(to left, #1c1c1c 0%, transparent 100%);\n}\n.styles-module__settingsPanel___OxX3Y .styles-module__settingsHeader___pwDY9,\n.styles-module__settingsPanel___OxX3Y .styles-module__settingsBrand___0gJeM,\n.styles-module__settingsPanel___OxX3Y .styles-module__settingsBrandSlash___uTG18,\n.styles-module__settingsPanel___OxX3Y .styles-module__settingsVersion___TUcFq,\n.styles-module__settingsPanel___OxX3Y .styles-module__settingsSection___m-YM2,\n.styles-module__settingsPanel___OxX3Y .styles-module__settingsLabel___8UjfX,\n.styles-module__settingsPanel___OxX3Y .styles-module__cycleButton___FMKfw,\n.styles-module__settingsPanel___OxX3Y .styles-module__cycleDot___nPgLY,\n.styles-module__settingsPanel___OxX3Y .styles-module__dropdownButton___16NPz,\n.styles-module__settingsPanel___OxX3Y .styles-module__toggleLabel___Xm8Aa,\n.styles-module__settingsPanel___OxX3Y .styles-module__customCheckbox___U39ax,\n.styles-module__settingsPanel___OxX3Y .styles-module__sliderLabel___U8sPr,\n.styles-module__settingsPanel___OxX3Y .styles-module__slider___GLdxp,\n.styles-module__settingsPanel___OxX3Y .styles-module__helpIcon___xQg56,\n.styles-module__settingsPanel___OxX3Y .styles-module__themeToggle___2rUjA {\n transition: background 0.25s ease, color 0.25s ease, border-color 0.25s ease;\n}\n.styles-module__settingsPanel___OxX3Y.styles-module__enter___WFIki {\n opacity: 1;\n transform: translateY(0) scale(1);\n filter: blur(0px);\n transition: opacity 0.2s ease, transform 0.2s ease, filter 0.2s ease;\n}\n.styles-module__settingsPanel___OxX3Y.styles-module__exit___fyOJ0 {\n opacity: 0;\n transform: translateY(8px) scale(0.95);\n filter: blur(5px);\n pointer-events: none;\n transition: opacity 0.1s ease, transform 0.1s ease, filter 0.1s ease;\n}\n.styles-module__settingsPanel___OxX3Y.styles-module__dark___ILIQf {\n background: #1a1a1a;\n box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3), 0 0 0 1px rgba(255, 255, 255, 0.08);\n}\n.styles-module__settingsPanel___OxX3Y.styles-module__dark___ILIQf .styles-module__settingsLabel___8UjfX {\n color: rgba(255, 255, 255, 0.6);\n}\n.styles-module__settingsPanel___OxX3Y.styles-module__dark___ILIQf .styles-module__settingsOption___UNa12 {\n color: rgba(255, 255, 255, 0.85);\n}\n.styles-module__settingsPanel___OxX3Y.styles-module__dark___ILIQf .styles-module__settingsOption___UNa12:hover {\n background: rgba(255, 255, 255, 0.1);\n}\n.styles-module__settingsPanel___OxX3Y.styles-module__dark___ILIQf .styles-module__settingsOption___UNa12.styles-module__selected___OwRqP {\n background: rgba(255, 255, 255, 0.15);\n color: #fff;\n}\n.styles-module__settingsPanel___OxX3Y.styles-module__dark___ILIQf .styles-module__toggleLabel___Xm8Aa {\n color: rgba(255, 255, 255, 0.85);\n}\n\n.styles-module__settingsPanelContainer___Xksv8 {\n overflow: visible;\n position: relative;\n display: flex;\n padding: 0 1rem;\n}\n.styles-module__settingsPanelContainer___Xksv8.styles-module__transitioning___qxzCk {\n overflow-x: clip;\n overflow-y: visible;\n}\n\n.styles-module__settingsPage___6YfHH {\n min-width: 100%;\n flex-shrink: 0;\n transition: transform 0.35s cubic-bezier(0.32, 0.72, 0, 1), opacity 0.2s ease-out;\n opacity: 1;\n}\n\n.styles-module__settingsPage___6YfHH.styles-module__slideLeft___Ps01J {\n transform: translateX(-100%);\n opacity: 0;\n}\n\n.styles-module__automationsPage___uvCq6 {\n position: absolute;\n top: 0;\n left: 100%;\n width: 100%;\n height: 100%;\n padding: 3px 1rem 0;\n box-sizing: border-box;\n display: flex;\n flex-direction: column;\n transition: transform 0.35s cubic-bezier(0.32, 0.72, 0, 1), opacity 0.25s ease-out 0.1s;\n opacity: 0;\n}\n\n.styles-module__automationsPage___uvCq6.styles-module__slideIn___4-qXe {\n transform: translateX(-100%);\n opacity: 1;\n}\n\n.styles-module__settingsNavLink___wCzJt {\n display: flex;\n align-items: center;\n justify-content: space-between;\n width: 100%;\n padding: 0;\n border: none;\n background: transparent;\n font-family: inherit;\n font-size: 0.8125rem;\n font-weight: 400;\n color: rgba(255, 255, 255, 0.5);\n cursor: pointer;\n transition: color 0.15s ease;\n}
1\n.styles-module__settingsNavLink___wCzJt:hover {\n color: rgba(255, 255, 255, 0.9);\n}\n.styles-module__settingsNavLink___wCzJt.styles-module__light___r6n4Y {\n color: rgba(0, 0, 0, 0.5);\n}\n.styles-module__settingsNavLink___wCzJt.styles-module__light___r6n4Y:hover {\n color: rgba(0, 0, 0, 0.8);\n}\n.styles-module__settingsNavLink___wCzJt svg {\n color: rgba(255, 255, 255, 0.4);\n transition: color 0.15s ease;\n}\n.styles-module__settingsNavLink___wCzJt:hover svg {\n color: #fff;\n}\n.styles-module__settingsNavLink___wCzJt.styles-module__light___r6n4Y svg {\n color: rgba(0, 0, 0, 0.25);\n}\n.styles-module__settingsNavLink___wCzJt.styles-module__light___r6n4Y:hover svg {\n color: rgba(0, 0, 0, 0.8);\n}\n\n.styles-module__settingsNavLinkRight___ZWwhj {\n display: flex;\n align-items: center;\n gap: 6px;\n}\n\n.styles-module__mcpNavIndicator___cl9pO {\n width: 8px;\n height: 8px;\n border-radius: 50%;\n flex-shrink: 0;\n}\n.styles-module__mcpNavIndicator___cl9pO.styles-module__connected___7c28g {\n background: #34c759;\n animation: styles-module__mcpPulse___uNggr 2.5s ease-in-out infinite;\n}\n.styles-module__mcpNavIndicator___cl9pO.styles-module__connecting___uo-CW {\n background: #f5a623;\n animation: styles-module__mcpPulse___uNggr 1.5s ease-in-out infinite;\n}\n\n.styles-module__settingsBackButton___bIe2j {\n display: flex;\n align-items: center;\n gap: 4px;\n padding: 6px 0 12px 0;\n margin: -6px 0 0.5rem 0;\n border: none;\n border-bottom: 1px solid rgba(255, 255, 255, 0.07);\n border-radius: 0;\n background: transparent;\n font-family: inherit;\n font-size: 0.8125rem;\n font-weight: 500;\n letter-spacing: -0.15px;\n color: #fff;\n cursor: pointer;\n transition: transform 0.12s cubic-bezier(0.32, 0.72, 0, 1);\n}\n.styles-module__settingsBackButton___bIe2j svg {\n opacity: 0.4;\n flex-shrink: 0;\n transition: opacity 0.15s ease, transform 0.18s cubic-bezier(0.32, 0.72, 0, 1);\n}\n.styles-module__settingsBackButton___bIe2j:hover svg {\n opacity: 1;\n}\n.styles-module__settingsBackButton___bIe2j.styles-module__light___r6n4Y {\n color: rgba(0, 0, 0, 0.85);\n border-bottom-color: rgba(0, 0, 0, 0.08);\n}\n\n.styles-module__automationHeader___InP0r {\n display: flex;\n align-items: center;\n gap: 0.125rem;\n font-size: 0.8125rem;\n font-weight: 400;\n color: #fff;\n}\n.styles-module__automationHeader___InP0r .styles-module__helpIcon___xQg56 svg {\n transform: none;\n}\n.styles-module__automationHeader___InP0r.styles-module__light___r6n4Y {\n color: rgba(0, 0, 0, 0.85);\n}\n\n.styles-module__automationDescription___NKlmo {\n font-size: 0.6875rem;\n font-weight: 300;\n color: rgba(255, 255, 255, 0.5);\n margin-top: 2px;\n line-height: 14px;\n}\n.styles-module__automationDescription___NKlmo.styles-module__light___r6n4Y {\n color: rgba(0, 0, 0, 0.5);\n}\n\n.styles-module__learnMoreLink___8xv-x {\n color: rgba(255, 255, 255, 0.8);\n text-decoration: underline dotted;\n text-decoration-color: rgba(255, 255, 255, 0.2);\n text-underline-offset: 2px;\n transition: color 0.15s ease;\n}\n.styles-module__learnMoreLink___8xv-x:hover {\n color: #fff;\n}\n.styles-module__learnMoreLink___8xv-x.styles-module__light___r6n4Y {\n color: rgba(0, 0, 0, 0.6);\n text-decoration-color: rgba(0, 0, 0, 0.2);\n}\n.styles-module__learnMoreLink___8xv-x.styles-module__light___r6n4Y:hover {\n color: rgba(0, 0, 0, 0.85);\n}\n\n.styles-module__autoSendRow___UblX5 {\n display: flex;\n align-items: center;\n gap: 8px;\n}\n\n.styles-module__autoSendLabel___icDc2 {\n font-size: 0.6875rem;\n font-weight: 400;\n color: rgba(255, 255, 255, 0.4);\n transition: color 0.15s ease;\n}\n.styles-module__autoSendLabel___icDc2.styles-module__active___-zoN6 {\n color: #66b8ff;\n}\n.styles-module__autoSendLabel___icDc2.styles-module__light___r6n4Y {\n color: rgba(0, 0, 0, 0.4);\n}\n.styles-module__autoSendLabel___icDc2.styles-module__light___r6n4Y.styles-module__active___-zoN6 {\n color: #3c82f7;\n}\n\n.styles-module__webhookUrlInput___2375C {\n display: block;\n width: 100%;\n flex: 1;\n min-height: 60px;\n box-sizing: border-box;\n margin-top: 11px;\n padding: 8px 10px;\n border: 1px solid rgba(255, 255, 255, 0.1);\n border-radius: 6px;\n background: rgba(255, 255, 255, 0.03);\n font-family: inherit;\n font-size: 0.75rem;\n font-weight: 400;\n color: #fff;\n outline: none;\n resize: none;\n cursor: text !important;\n user-select: text;\n transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;\n}\n.styles-module__webhookUrlInput___2375C::placeholder {\n color: rgba(255, 255, 255, 0.3);\n}\n.styles-module__webhookUrlInput___2375C:focus {\n border-color: rgba(255, 255, 255, 0.3);\n background: rgba(255, 255, 255, 0.08);\n}\n.styles-module__webhookUrlInput___2375C.styles-module__light___r6n4Y {\n border-color: rgba(0, 0, 0, 0.1);\n background: rgba(0, 0, 0, 0.03);\n color: rgba(0, 0, 0, 0.85);\n}\n.styles-module__webhookUrlInput___2375C.styles-module__light___r6n4Y::placeholder {\n color: rgba(0, 0, 0, 0.3);\n}\n.styles-module__webhookUrlInput___2375C.styles-module__light___r6n4Y:focus {\n border-color: rgba(0, 0, 0, 0.25);\n background: rgba(0, 0, 0, 0.05);\n}\n\n.styles-module__settingsHeader___pwDY9 {\n display: flex;\n align-items: center;\n justify-content: space-between;\n min-height: 24px;\n margin-bottom: 0.5rem;\n padding-bottom: 9px;\n border-bottom: 1px solid rgba(255, 255, 255, 0.07);\n}\n\n.styles-module__settingsBrand___0gJeM {\n font-size: 0.8125rem;\n font-weight: 600;\n letter-spacing: -0.0094em;\n color: #fff;\n}\n\n.styles-module__settingsBrandSlash___uTG18 {\n color: rgba(255, 255, 255, 0.5);\n}\n\n.styles-module__settingsVersion___TUcFq {\n font-size: 11px;\n font-weight: 400;\n color: rgba(255, 255, 255, 0.4);\n margin-left: auto;\n letter-spacing: -0.0094em;\n}\n\n.styles-module__settingsSection___m-YM2 + .styles-module__settingsSection___m-YM2 {\n margin-top: 0.5rem;\n padding-top: 0.5rem;\n border-top: 1px solid rgba(255, 255, 255, 0.07);\n}\n.styles-module__settingsSection___m-YM2.styles-module__settingsSectionExtraPadding___jdhFV {\n padding-top: calc(0.5rem + 4px);\n}\n\n.styles-module__settingsSectionGrow___h-5HZ {\n flex: 1;\n display: flex;\n flex-direction: column;\n}\n\n.styles-module__settingsRow___3sdhc {\n display: flex;\n align-items: center;\n justify-content: space-between;\n min-height: 24px;\n}\n.styles-module__settingsRow___3sdhc.styles-module__settingsRowMarginTop___zA0Sp {\n margin-top: 8px;\n}\n\n.styles-module__dropdownContainer___BVnxe {\n position: relative;\n}\n\n.styles-module__dropdownButton___16NPz {\n display: flex;\n align-items: center;\n gap: 0.5rem;\n padding: 0.25rem 0.5rem;\n border: none;\n border-radius: 0.375rem;\n background: transparent;\n font-size: 0.8125rem;\n font-weight: 600;\n color: #fff;
1\n cursor: pointer;\n transition: background-color 0.15s ease, color 0.15s ease;\n letter-spacing: -0.0094em;\n}\n.styles-module__dropdownButton___16NPz:hover {\n background: rgba(255, 255, 255, 0.08);\n}\n.styles-module__dropdownButton___16NPz svg {\n opacity: 0.6;\n}\n\n.styles-module__cycleButton___FMKfw {\n display: flex;\n align-items: center;\n gap: 0.5rem;\n padding: 0;\n border: none;\n background: transparent;\n font-size: 0.8125rem;\n font-weight: 500;\n color: #fff;\n cursor: pointer;\n letter-spacing: -0.0094em;\n}\n.styles-module__cycleButton___FMKfw.styles-module__light___r6n4Y {\n color: rgba(0, 0, 0, 0.85);\n}\n.styles-module__cycleButton___FMKfw:disabled {\n opacity: 0.35;\n cursor: not-allowed;\n}\n\n.styles-module__settingsRowDisabled___EgS0V .styles-module__settingsLabel___8UjfX {\n color: rgba(255, 255, 255, 0.2);\n}\n.styles-module__settingsRowDisabled___EgS0V .styles-module__settingsLabel___8UjfX.styles-module__light___r6n4Y {\n color: rgba(0, 0, 0, 0.2);\n}\n.styles-module__settingsRowDisabled___EgS0V .styles-module__toggleSwitch___l4Ygm {\n opacity: 0.4;\n cursor: not-allowed;\n}\n\n@keyframes styles-module__cycleTextIn___Q6zJf {\n 0% {\n opacity: 0;\n transform: translateY(-6px);\n }\n 100% {\n opacity: 1;\n transform: translateY(0);\n }\n}\n.styles-module__cycleButtonText___fD1LR {\n display: inline-block;\n animation: styles-module__cycleTextIn___Q6zJf 0.2s ease-out;\n}\n\n.styles-module__cycleDots___LWuoQ {\n display: flex;\n flex-direction: column;\n gap: 2px;\n}\n\n.styles-module__cycleDot___nPgLY {\n width: 3px;\n height: 3px;\n border-radius: 50%;\n background: rgba(255, 255, 255, 0.3);\n transform: scale(0.667);\n transition: background-color 0.25s ease-out, transform 0.25s ease-out;\n}\n.styles-module__cycleDot___nPgLY.styles-module__active___-zoN6 {\n background: #fff;\n transform: scale(1);\n}\n.styles-module__cycleDot___nPgLY.styles-module__light___r6n4Y {\n background: rgba(0, 0, 0, 0.2);\n}\n.styles-module__cycleDot___nPgLY.styles-module__light___r6n4Y.styles-module__active___-zoN6 {\n background: rgba(0, 0, 0, 0.7);\n}\n\n.styles-module__dropdownMenu___k73ER {\n position: absolute;\n right: 0;\n top: calc(100% + 0.25rem);\n background: #1a1a1a;\n border-radius: 0.5rem;\n padding: 0.25rem;\n min-width: 120px;\n box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3), 0 0 0 1px rgba(255, 255, 255, 0.1);\n z-index: 10;\n animation: styles-module__scaleIn___c-r1K 0.15s ease-out;\n}\n\n.styles-module__dropdownItem___ylsLj {\n width: 100%;\n display: flex;\n align-items: center;\n padding: 0.5rem 0.625rem;\n border: none;\n border-radius: 0.375rem;\n background: transparent;\n font-size: 0.8125rem;\n font-weight: 500;\n color: rgba(255, 255, 255, 0.85);\n cursor: pointer;\n text-align: left;\n transition: background-color 0.15s ease, color 0.15s ease;\n letter-spacing: -0.0094em;\n}\n.styles-module__dropdownItem___ylsLj:hover {\n background: rgba(255, 255, 255, 0.08);\n}\n.styles-module__dropdownItem___ylsLj.styles-module__selected___OwRqP {\n background: rgba(255, 255, 255, 0.12);\n color: #fff;\n font-weight: 600;\n}\n\n.styles-module__settingsLabel___8UjfX {\n font-size: 0.8125rem;\n font-weight: 400;\n letter-spacing: -0.0094em;\n color: rgba(255, 255, 255, 0.5);\n display: flex;\n align-items: center;\n gap: 0.125rem;\n}\n.styles-module__settingsLabel___8UjfX.styles-module__light___r6n4Y {\n color: rgba(0, 0, 0, 0.5);\n}\n\n.styles-module__settingsLabelMarker___ewdtV {\n padding-top: 3px;\n margin-bottom: 10px;\n}\n\n.styles-module__settingsOptions___LyrBA {\n display: flex;\n gap: 0.25rem;\n}\n\n.styles-module__settingsOption___UNa12 {\n flex: 1;\n display: flex;\n align-items: center;\n justify-content: center;\n gap: 0.25rem;\n padding: 0.375rem 0.5rem;\n border: none;\n border-radius: 0.375rem;\n background: transparent;\n font-size: 0.6875rem;\n font-weight: 500;\n color: rgba(0, 0, 0, 0.7);\n cursor: pointer;\n transition: background-color 0.15s ease, color 0.15s ease;\n}\n.styles-module__settingsOption___UNa12:hover {\n background: rgba(0, 0, 0, 0.05);\n}\n.styles-module__settingsOption___UNa12.styles-module__selected___OwRqP {\n background: rgba(60, 130, 247, 0.15);\n color: #3c82f7;\n}\n\n.styles-module__sliderContainer___ducXj {\n display: flex;\n flex-direction: column;\n gap: 0.5rem;\n}\n\n.styles-module__slider___GLdxp {\n -webkit-appearance: none;\n appearance: none;\n width: 100%;\n height: 4px;\n background: rgba(255, 255, 255, 0.15);\n border-radius: 2px;\n outline: none;\n cursor: pointer;\n}\n.styles-module__slider___GLdxp::-webkit-slider-thumb {\n -webkit-appearance: none;\n appearance: none;\n width: 14px;\n height: 14px;\n background: white;\n border-radius: 50%;\n cursor: pointer;\n transition: transform 0.15s ease, box-shadow 0.15s ease;\n box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);\n}\n.styles-module__slider___GLdxp::-moz-range-thumb {\n width: 14px;\n height: 14px;\n background: white;\n border: none;\n border-radius: 50%;\n cursor: pointer;\n transition: transform 0.15s ease, box-shadow 0.15s ease;\n box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);\n}\n.styles-module__slider___GLdxp:hover::-webkit-slider-thumb {\n transform: scale(1.15);\n box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);\n}\n.styles-module__slider___GLdxp:hover::-moz-range-thumb {\n transform: scale(1.15);\n box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);\n}\n\n.styles-module__sliderLabels___FhLDB {\n display: flex;\n justify-content: space-between;\n}\n\n.styles-module__sliderLabel___U8sPr {\n font-size: 0.625rem;\n font-weight: 500;\n color: rgba(255, 255, 255, 0.4);\n cursor: pointer;\n transition: color 0.15s ease;\n}
1\n.styles-module__sliderLabel___U8sPr:hover {\n color: rgba(255, 255, 255, 0.7);\n}\n.styles-module__sliderLabel___U8sPr.styles-module__active___-zoN6 {\n color: rgba(255, 255, 255, 0.9);\n}\n\n.styles-module__colorOptions___iHCNX {\n display: flex;\n gap: 0.5rem;\n margin-top: 0.375rem;\n margin-bottom: 1px;\n}\n\n.styles-module__colorOption___IodiY {\n display: block;\n width: 20px;\n height: 20px;\n border-radius: 50%;\n border: 2px solid transparent;\n cursor: pointer;\n transition: transform 0.2s cubic-bezier(0.25, 1, 0.5, 1);\n}\n.styles-module__colorOption___IodiY:hover {\n transform: scale(1.15);\n}\n.styles-module__colorOption___IodiY.styles-module__selected___OwRqP {\n transform: scale(0.83);\n}\n\n.styles-module__colorOptionRing___U2xpo {\n display: flex;\n width: 24px;\n height: 24px;\n border: 2px solid transparent;\n border-radius: 50%;\n transition: border-color 0.3s ease;\n}\n.styles-module__settingsToggle___fBrFn {\n display: flex;\n align-items: center;\n gap: 0.5rem;\n cursor: pointer;\n}\n.styles-module__settingsToggle___fBrFn + .styles-module__settingsToggle___fBrFn {\n margin-top: calc(0.5rem + 6px);\n}\n.styles-module__settingsToggle___fBrFn input[type=checkbox] {\n position: absolute;\n opacity: 0;\n width: 0;\n height: 0;\n}\n.styles-module__settingsToggle___fBrFn.styles-module__settingsToggleMarginBottom___MZUyF {\n margin-bottom: calc(0.5rem + 6px);\n}\n\n.styles-module__customCheckbox___U39ax {\n position: relative;\n width: 14px;\n height: 14px;\n border: 1px solid rgba(255, 255, 255, 0.2);\n border-radius: 4px;\n background: rgba(255, 255, 255, 0.05);\n display: flex;\n align-items: center;\n justify-content: center;\n flex-shrink: 0;\n transition: background 0.25s ease, border-color 0.25s ease;\n}
1\n.styles-module__customCheckbox___U39ax svg {\n color: #1a1a1a;\n opacity: 1;\n transition: opacity 0.15s ease;\n}\ninput[type=checkbox]:checked + .styles-module__customCheckbox___U39ax {\n border-color: rgba(255, 255, 255, 0.3);\n background: rgb(255, 255, 255);\n}\n.styles-module__customCheckbox___U39ax.styles-module__light___r6n4Y {\n border: 1px solid rgba(0, 0, 0, 0.15);\n background: #fff;\n}\n.styles-module__customCheckbox___U39ax.styles-module__light___r6n4Y.styles-module__checked___mnZLo {\n border-color: #1a1a1a;\n background: #1a1a1a;\n}\n.styles-module__customCheckbox___U39ax.styles-module__light___r6n4Y.styles-module__checked___mnZLo svg {\n color: #fff;\n}\n\n.styles-module__toggleLabel___Xm8Aa {\n font-size: 0.8125rem;\n font-weight: 400;\n color: rgba(255, 255, 255, 0.5);\n letter-spacing: -0.0094em;\n display: flex;\n align-items: center;\n gap: 0.25rem;\n}\n.styles-module__toggleLabel___Xm8Aa.styles-module__light___r6n4Y {\n color: rgba(0, 0, 0, 0.5);\n}\n\n.styles-module__toggleSwitch___l4Ygm {\n position: relative;\n display: inline-block;\n width: 24px;\n height: 16px;\n flex-shrink: 0;\n cursor: pointer;\n transition: opacity 0.15s ease;\n}\n.styles-module__toggleSwitch___l4Ygm input {\n opacity: 0;\n width: 0;\n height: 0;\n}\n.styles-module__toggleSwitch___l4Ygm input:checked + .styles-module__toggleSlider___wprIn {\n background: #3c82f7;\n}\n.styles-module__toggleSwitch___l4Ygm input:checked + .styles-module__toggleSlider___wprIn::before {\n transform: translateX(8px);\n}\n.styles-module__toggleSwitch___l4Ygm.styles-module__disabled___332Jw {\n opacity: 0.4;\n pointer-events: none;\n}\n.styles-module__toggleSwitch___l4Ygm.styles-module__disabled___332Jw .styles-module__toggleSlider___wprIn {\n cursor: not-allowed;\n}\n\n.styles-module__toggleSlider___wprIn {\n position: absolute;\n cursor: pointer;\n inset: 0;\n border-radius: 16px;\n background: #484848;\n}\n.styles-module__light___r6n4Y .styles-module__toggleSlider___wprIn {\n background: #dddddd;\n}\n.styles-module__toggleSlider___wprIn::before {\n content: "";\n position: absolute;\n height: 12px;\n width: 12px;\n left: 2px;\n bottom: 2px;\n background: white;\n border-radius: 50%;\n transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1);\n box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);\n}\n\n@keyframes styles-module__mcpPulse___uNggr {\n 0% {\n box-shadow: 0 0 0 0 rgba(52, 199, 89, 0.5);\n }\n 70% {\n box-shadow: 0 0 0 6px rgba(52, 199, 89, 0);\n }\n 100% {\n box-shadow: 0 0 0 0 rgba(52, 199, 89, 0);\n }\n}\n@keyframes styles-module__mcpPulseError___fov9B {\n 0% {\n box-shadow: 0 0 0 0 rgba(255, 59, 48, 0.5);\n }\n 70% {\n box-shadow: 0 0 0 6px rgba(255, 59, 48, 0);\n }\n 100% {\n box-shadow: 0 0 0 0 rgba(255, 59, 48, 0);\n }\n}\n.styles-module__mcpStatusDot___ibgkc {\n width: 8px;\n height: 8px;\n border-radius: 50%;\n flex-shrink: 0;\n}\n.styles-module__mcpStatusDot___ibgkc.styles-module__connecting___uo-CW {\n background: #f5a623;\n animation: styles-module__mcpPulse___uNggr 1.5s infinite;\n}\n.styles-module__mcpStatusDot___ibgkc.styles-module__connected___7c28g {\n background: #34c759;\n animation: styles-module__mcpPulse___uNggr 2.5s ease-in-out infinite;\n}\n.styles-module__mcpStatusDot___ibgkc.styles-module__disconnected___cHPxR {\n background: #ff3b30;\n animation: styles-module__mcpPulseError___fov9B 2s infinite;\n}\n\n.styles-module__helpIcon___xQg56 {\n position: relative;\n display: inline-flex;\n align-items: center;\n justify-content: center;\n cursor: help;\n margin-left: 0;\n}\n.styles-module__helpIcon___xQg56 svg {\n display: block;\n transform: translateY(1px);\n color: rgba(255, 255, 255, 0.2);\n transition: color 0.15s ease;\n}\n.styles-module__helpIcon___xQg56:hover svg {\n color: rgba(255, 255, 255, 0.5);\n}\n.styles-module__helpIcon___xQg56.styles-module__helpIconNudgeDown___0cqpM svg {\n transform: translateY(1px);\n}\n.styles-module__helpIcon___xQg56.styles-module__helpIconNoNudge___abogC svg {\n transform: translateY(0.5px);\n}
1\n.styles-module__helpIcon___xQg56.styles-module__helpIconNudge1-5___DM2TQ svg {\n transform: translateY(1.5px);\n}\n.styles-module__helpIcon___xQg56.styles-module__helpIconNudge2___TfWgC svg {\n transform: translateY(2px);\n}\n\n.styles-module__dragSelection___kZLq2 {\n position: fixed;\n top: 0;\n left: 0;\n border: 2px solid rgba(52, 199, 89, 0.6);\n border-radius: 4px;\n background: rgba(52, 199, 89, 0.08);\n pointer-events: none;\n z-index: 99997;\n will-change: transform, width, height;\n contain: layout style;\n}\n\n.styles-module__dragCount___KM90j {\n position: absolute;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%);\n background: #34c759;\n color: white;\n font-size: 0.875rem;\n font-weight: 600;\n padding: 0.25rem 0.5rem;\n border-radius: 1rem;\n min-width: 1.5rem;\n text-align: center;\n}\n\n.styles-module__highlightsContainer___-0xzG {\n position: fixed;\n top: 0;\n left: 0;\n pointer-events: none;\n z-index: 99996;\n}\n\n.styles-module__selectedElementHighlight___fyVlI {\n position: fixed;\n top: 0;\n left: 0;\n border: 2px solid rgba(52, 199, 89, 0.5);\n border-radius: 4px;\n background: rgba(52, 199, 89, 0.06);\n pointer-events: none;\n will-change: transform, width, height;\n contain: layout style;\n}\n\n.styles-module__light___r6n4Y.styles-module__toolbarContainer___dIhma {\n background: #fff;\n color: rgba(0, 0, 0, 0.85);\n box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08), 0 4px 16px rgba(0, 0, 0, 0.06), 0 0 0 1px rgba(0, 0, 0, 0.04);\n}\n.styles-module__light___r6n4Y.styles-module__toolbarContainer___dIhma.styles-module__collapsed___Rydsn:hover {\n background: #f5f5f5;\n}\n.styles-module__light___r6n4Y.styles-module__controlButton___8Q0jc {\n color: rgba(0, 0, 0, 0.5);\n}\n.styles-module__light___r6n4Y.styles-module__controlButton___8Q0jc:hover:not(:disabled):not([data-active=true]):not([data-failed=true]):not([data-auto-sync=true]):not([data-error=true]):not([data-no-hover=true]) {\n background: rgba(0, 0, 0, 0.06);\n color: rgba(0, 0, 0, 0.85);\n}\n.styles-module__light___r6n4Y.styles-module__controlButton___8Q0jc[data-active=true] {\n color: #3c82f7;\n background: rgba(60, 130, 247, 0.15);\n}\n.styles-module__light___r6n4Y.styles-module__controlButton___8Q0jc[data-error=true] {\n color: #ff3b30;\n background: rgba(255, 59, 48, 0.15);\n}\n.styles-module__light___r6n4Y.styles-module__controlButton___8Q0jc[data-danger]:hover:not(:disabled):not([data-active=true]):not([data-failed=true]) {\n background: rgba(255, 59, 48, 0.15);\n color: #ff3b30;\n}\n.styles-module__light___r6n4Y.styles-module__controlButton___8Q0jc[data-auto-sync=true] {\n color: #34c759;\n background: transparent;\n}\n.styles-module__light___r6n4Y.styles-module__controlButton___8Q0jc[data-failed=true] {\n color: #ff3b30;\n background: rgba(255, 59, 48, 0.15);\n}\n.styles-module__light___r6n4Y.styles-module__buttonTooltip___Burd9 {\n background: #fff;\n color: rgba(0, 0, 0, 0.85);\n box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08), 0 4px 16px rgba(0, 0, 0, 0.06), 0 0 0 1px rgba(0, 0, 0, 0.04);\n}\n.styles-module__light___r6n4Y.styles-module__buttonTooltip___Burd9::after {\n background: #fff;\n}\n.styles-module__light___r6n4Y.styles-module__divider___c--s1 {\n background: rgba(0, 0, 0, 0.1);\n}\n.styles-module__light___r6n4Y.styles-module__markerTooltip___aLJID {\n background: #fff;\n box-shadow: 0 4px 20px rgba(0, 0, 0, 0.12), 0 0 0 1px rgba(0, 0, 0, 0.06);\n}\n.styles-module__light___r6n4Y.styles-module__markerTooltip___aLJID .styles-module__markerQuote___FHmrz {\n color: rgba(0, 0, 0, 0.5);\n}\n.styles-module__light___r6n4Y.styles-module__markerTooltip___aLJID .styles-module__markerNote___QkrrS {\n color: rgba(0, 0, 0, 0.85);\n}\n.styles-module__light___r6n4Y.styles-module__markerTooltip___aLJID .styles-module__markerHint___2iF-6 {\n color: rgba(0, 0, 0, 0.35);\n}\n.styles-module__light___r6n4Y.styles-module__settingsPanel___OxX3Y {\n background: #fff;\n box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08), 0 4px 16px rgba(0, 0, 0, 0.06), 0 0 0 1px rgba(0, 0, 0, 0.04);\n}\n.styles-module__light___r6n4Y.styles-module__settingsPanel___OxX3Y::before {\n background: linear-gradient(to right, #fff 0%, transparent 100%);\n}\n.styles-module__light___r6n4Y.styles-module__settingsPanel___OxX3Y::after {\n background: linear-gradient(to left, #fff 0%, transparent 100%);\n}\n.styles-module__light___r6n4Y.styles-module__settingsPanel___OxX3Y .styles-module__settingsHeader___pwDY9 {\n border-bottom-color: rgba(0, 0, 0, 0.08);\n}\n.styles-module__light___r6n4Y.styles-module__settingsPanel___OxX3Y .styles-module__settingsBrand___0gJeM {\n color: rgba(0, 0, 0, 0.85);\n}\n.styles-module__light___r6n4Y.styles-module__settingsPanel___OxX3Y .styles-module__settingsBrandSlash___uTG18 {\n color: rgba(0, 0, 0, 0.4);\n}\n.styles-module__light___r6n4Y.styles-module__settingsPanel___OxX3Y .styles-module__settingsVersion___TUcFq {\n
1color: rgba(0, 0, 0, 0.4);\n}\n.styles-module__light___r6n4Y.styles-module__settingsPanel___OxX3Y .styles-module__settingsSection___m-YM2 {\n border-top-color: rgba(0, 0, 0, 0.08);\n}\n.styles-module__light___r6n4Y.styles-module__settingsPanel___OxX3Y .styles-module__settingsLabel___8UjfX {\n color: rgba(0, 0, 0, 0.5);\n}\n.styles-module__light___r6n4Y.styles-module__settingsPanel___OxX3Y .styles-module__cycleButton___FMKfw {\n color: rgba(0, 0, 0, 0.85);\n}\n.styles-module__light___r6n4Y.styles-module__settingsPanel___OxX3Y .styles-module__cycleDot___nPgLY {\n background: rgba(0, 0, 0, 0.2);\n}\n.styles-module__light___r6n4Y.styles-module__settingsPanel___OxX3Y .styles-module__cycleDot___nPgLY.styles-module__active___-zoN6 {\n background: rgba(0, 0, 0, 0.7);\n}\n.styles-module__light___r6n4Y.styles-module__settingsPanel___OxX3Y .styles-module__dropdownButton___16NPz {\n color: rgba(0, 0, 0, 0.85);\n}\n.styles-module__light___r6n4Y.styles-module__settingsPanel___OxX3Y .styles-module__dropdownButton___16NPz:hover {\n background: rgba(0, 0, 0, 0.05);\n}\n.styles-module__light___r6n4Y.styles-module__settingsPanel___OxX3Y .styles-module__toggleLabel___Xm8Aa {\n color: rgba(0, 0, 0, 0.5);\n}\n.styles-module__light___r6n4Y.styles-module__settingsPanel___OxX3Y .styles-module__customCheckbox___U39ax {\n border: 1px solid rgba(0, 0, 0, 0.15);\n background: #fff;\n}\n.styles-module__light___r6n4Y.styles-module__settingsPanel___OxX3Y .styles-module__customCheckbox___U39ax.styles-module__checked___mnZLo {\n border-color: #1a1a1a;\n background: #1a1a1a;\n}\n.styles-module__light___r6n4Y.styles-module__settingsPanel___OxX3Y .styles-module__customCheckbox___U39ax.styles-module__checked___mnZLo svg {\n
1color: #fff;\n}\n.styles-module__light___r6n4Y.styles-module__settingsPanel___OxX3Y .styles-module__sliderLabel___U8sPr {\n color: rgba(0, 0, 0, 0.4);\n}\n.styles-module__light___r6n4Y.styles-module__settingsPanel___OxX3Y .styles-module__sliderLabel___U8sPr:hover {\n color: rgba(0, 0, 0, 0.7);\n}\n.styles-module__light___r6n4Y.styles-module__settingsPanel___OxX3Y .styles-module__sliderLabel___U8sPr.styles-module__active___-zoN6 {\n color: rgba(0, 0, 0, 0.9);\n}\n.styles-module__light___r6n4Y.styles-module__settingsPanel___OxX3Y .styles-module__slider___GLdxp {\n background: rgba(0, 0, 0, 0.1);\n}\n.styles-module__light___r6n4Y.styles-module__settingsPanel___OxX3Y .styles-module__slider___GLdxp::-webkit-slider-thumb {\n background: #1a1a1a;\n}\n.styles-module__light___r6n4Y.styles-module__settingsPanel___OxX3Y .styles-module__slider___GLdxp::-moz-range-thumb {\n background: #1a1a1a;\n}\n.styles-module__light___r6n4Y.styles-module__settingsPanel___OxX3Y .styles-module__helpIcon___xQg56 svg {\n color: rgba(0, 0, 0, 0.2);\n}\n.styles-module__light___r6n4Y.styles-module__settingsPanel___OxX3Y .styles-module__helpIcon___xQg56:hover svg {\n color: rgba(0, 0, 0, 0.5);\n}\n\n.styles-module__themeToggle___2rUjA {\n display: flex;\n align-items: center;\n justify-content: center;\n width: 22px;\n height: 22px;\n margin-left: 0.5rem;\n border: none;\n border-radius: 6px;\n background: transparent;\n color: rgba(255, 255, 255, 0.4);\n cursor: pointer;\n transition: background-color 0.15s ease, color 0.15s ease;\n}\n.styles-module__themeToggle___2rUjA:hover {\n background: rgba(255, 255, 255, 0.1);\n color: rgba(255, 255, 255, 0.8);\n}\n.styles-module__light___r6n4Y .styles-module__themeToggle___2rUjA {\n color: rgba(0, 0, 0, 0.4);\n}\n.styles-module__light___r6n4Y .styles-module__themeToggle___2rUjA:hover {\n background: rgba(0, 0, 0, 0.06);\n color: rgba(0, 0, 0, 0.7);\n}\n\n.styles-module__themeIconWrapper___LsJIM {\n display: flex;\n align-items: center;\n justify-content: center;\n position: relative;\n width: 20px;\n height: 20px;\n}\n\n.styles-module__themeIcon___lCCmo {\n display: flex;\n align-items: center;\n justify-content: center;\n animation: styles-module__themeIconIn___TU6ML 0.35s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;\n}\n\n@keyframes styles-module__themeIconIn___TU6ML {\n 0% {\n opacity: 0;\n transform: scale(0.8) rotate(-30deg);\n }\n 100% {\n opacity: 1;\n transform: scale(1) rotate(0deg);\n }\n}',document.head.appendChild(e))}var C=e.i(926743),k=e.i(737806),j=e.i(798125),E=e.i(947414);function N({children:e,isValidProp:t,...n}){t&&(0,j.loadExternalIsValidProp)(t);let r=(0,m.useContext)(k.MotionConfigContext);(n={...r,...n}).transition=(0,C.resolveTransition)(n.transition,r.transition),n.isStatic=(0,E.useConstant)(()=>n.isStatic);let s=(0,m.useMemo)(()=>n,[JSON.stringify(n.transition),n.transformPagePoint,n.reducedMotion,n.skipAnimations]);return(0,i.jsx)(k.MotionConfigContext.Provider,{value:s,children:e})}var T=e.i(618566);e.i(453653);var R=e.i(192932),A=e.i(932341),I=e.i(923367);let M=(0,m.createContext)(void 0);function L({children:e}){let[t,n]=(0,m.useState)(null);return(0,i.jsx)(M.Provider,{value:{rightActions:t,setRightActions:n},children:e})}let P=(0,m.createContext)(void 0);function D({children:e}){let[t,n]=(0,m.useState)(""),[r,s]=(0,m.useState)(!1),[o,a]=(0,m.useState)(),[l,d]=(0,m.useState)(),[c,u]=(0,m.useState)([]),[_,p]=(0,m.useState)([]);return(0,i.jsx)(P.Provider,{value:{searchQuery:t,setSearchQuery:n,isSearchPopoverOpen:r,setIsSearchPopoverOpen:s,selectedMemoryId:o,selectedChatId:l,setSelectedMemoryId:a,setSelectedChatId:d,groupedMemories:c,groupedChatSessions:_,setGroupedMemories:u,setGroupedChatSessions:p},children:e})}function O(){let e=(0,m.useContext)(P);if(void 0===e)throw Error("useSearch must be used within a SearchProvider");return e}var F=e.i(457527),B=e.i(737654),z=e.i(33118),Y=e.i(689664),H=e.i(716327);let U="u">typeof window,X=U?window:null,W=U?document:null,Q={replace:0,none:1,blend:2},$=Symbol(),G=Symbol(),V=Symbol(),q=Symbol();Symbol();let J=Symbol(),K=((r=new Map).set("x","translateX"),r.set("y","translateY"),r.set("z","translateZ"),r),Z=["translateX","translateY","translateZ","rotate","rotateX","rotateY","rotateZ","scale","scaleX","scaleY","scaleZ","skew","skewX","skewY","matrix","matrix3d","perspective"],ee=Z.reduce((e,t)=>
1({...e,[t]:t+"("}),{}),et=()=>{},en=/\)\s*[-.\d]/,er=/(^#([\da-f]{3}){1,2}$)|(^#([\da-f]{4}){1,2}$)/i,es=/rgb\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)/i,eo=/rgba\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*,\s*(-?\d+|-?\d*.\d+)\s*\)/i,ea=/hsl\(\s*(-?\d+|-?\d*.\d+)\s*,\s*(-?\d+|-?\d*.\d+)%\s*,\s*(-?\d+|-?\d*.\d+)%\s*\)/i,ei=/hsla\(\s*(-?\d+|-?\d*.\d+)\s*,\s*(-?\d+|-?\d*.\d+)%\s*,\s*(-?\d+|-?\d*.\d+)%\s*,\s*(-?\d+|-?\d*.\d+)\s*\)/i,el=/[-+]?\d*\.?\d+(?:e[-+]?\d)?/gi,ed=/^([-+]?\d*\.?\d+(?:e[-+]?\d+)?)([a-z]+|%)$/i,ec=/([a-z])([A-Z])/g,eu=/(\w+)(\([^)]+\)+)/g,e_=/var\(\s*(--[\w-]+)(?:\s*,\s*([^)]+))?\s*\)/,em={id:null,keyframes:null,playbackEase:null,playbackRate:1,frameRate:240,loop:0,reversed:!1,alternate:!1,autoplay:!0,persist:!1,duration:1e3,delay:0,loopDelay:0,ease:"out(2)",composition:Q.replace,modifier:e=>e,onBegin:et,onBeforeUpdate:et,onUpdate:et,onLoop:et,onPause:et,onComplete:et,onRender:et},ep={defaults:em,precision:4,timeScale:1,tickThreshold:200},eh=U&&X.AnimeJSDevTools,eg={version:"4.3.5",engine:null};U&&(X.AnimeJS||(X.AnimeJS=[]),X.AnimeJS.push(eg));let ef=e=>e.replace(ec,"$1-$2").toLowerCase(),ey=(e,t)=>0===e.indexOf(t),eb=Date.now,ex=Array.isArray,ev=e=>e&&e.constructor===Object,ew=e=>"number"==typeof e&&!isNaN(e),eS=e=>"string"==typeof e,eC=e=>"function"==typeof e,ek=e=>void 0===e,ej=e=>ek(e)||null===e,eE=e=>U&&e instanceof SVGElement,eN=e=>!ep.defaults.hasOwnProperty(e),eT=["opacity","rotate","overflow","color"],eR=Math.pow,eA=Math.sqrt,eI=Math.sin,eM=Math.cos,eL=Math.floor,eP=Math.asin,eD=Math.PI,eO=Math.round,eF=(e,t,n)=>e<t?t:e>n?n:e,eB={},ez=(e,t)=>{if(t<0)return e;if(!t)return eO(e);let n=eB[t];return n||(n=eB[t]=10**t),eO(e*n)/n}
1,eY=(e,t,n)=>e+(t-e)*n,eH=e=>e===1/0?1e12:e===-1/0?-1e12:e,eU=e=>e<=1e-11?1e-11:eH(ez(e,11)),eX=e=>ex(e)?[...e]:e,eW=(e,t,n,r="_prev",s="_next")=>{let o=e._head,a=s;for(n&&(o=e._tail,a=r);o;){let e=o[a];t(o),o=e}},eQ=(e,t,n="_prev",r="_next")=>{let s=t[n],o=t[r];s?s[r]=o:e._head=o,o?o[n]=s:e._tail=s,t[n]=null,t[r]=null},e$=(e,t,n,r="_prev",s="_next")=>{let o=e._tail;for(;o&&n&&n(o,t);)o=o[r];let a=o?o[s]:e._head;o?o[s]=t:e._head=t,a?a[r]=t:e._tail=t,t[r]=o,t[s]=a};function eG(e){let t=eS(e)?W.querySelectorAll(e):e;if(t instanceof NodeList||t instanceof HTMLCollection)return t}let eV=(e,t,n)=>(n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+(t-e)*6*n:n<.5?t:n<2/3?e+(t-e)*(2/3-n)*6:e),eq=(e,t)=>ek(e)?t:e,eJ=(e,t,n,r,s)=>{let o;if(eC(e))o=()=>{let s=e(t,n,r);return isNaN(+s)?s||0:+s};else{if(!(eS(e)&&ey(e,"var(")))return e;o=()=>{let n=e.match(e_),r=n[1],s=n[2],o=getComputedStyle(t)?.getPropertyValue(r);return(!o||""===o.trim())&&s&&(o=s.trim()),o||0}}return s&&(s.func=o),o()},eK=(e,t)=>e[G]?e[V]&&((e,t)=>{if(eT.includes(t))return!1;if(e.getAttribute(t)||t in e){if("scale"===t){let t=e.parentNode;return t&&"filter"===t.tagName}return!0}})(e,t)?1:Z.includes(t)||K.get(t)?3:ey(t,"--")?4:t in e.style?2:t in e?0:1:0,eZ=(e,t,n)=>{let r=e.style[t];r&&n&&(n[t]=r);let s=r||getComputedStyle(e[J]||e).getPropertyValue(t);return"auto"===s?"0":s},e0=(e,t,n,r)=>{let s=ek(n)?eK(e,t):n;return 0===s?e[t]||0:1===s?e.getAttribute(t):3===s?((e,t,n)=>{let r,s=e.style.transform;if(s){let o,a=e[q];for(;o=eu.exec(s);){let e=o[1],s=o[2].slice(1,-1);a[e]=s,e===t&&(r=s,n&&(n[t]=s))}}return s&&!ek(r)?r:ey(t,"scale")?"1":ey(t,"rotate")||ey(t,"skew")?"0deg":"0px"})(e,t,r):4===s?eZ(e,t,r).trimStart():eZ(e,t,r)},e1=(e,t,n)=>"-"===n?e-t:"+"===n?e+t:e*t,e5=()=>({t:0,n:0,u:null,o:null,d:null,s:null}),e2=(e,t)=>{if(t.t=0,t.n=0,t.u=null,t.o=null,t.d=null,t.s=null,!e)return t;let n=+e;if(!isNaN(n))return t.n=n,t;{let n=e;"="===n[1]&&(t.o=n[0],n=n.slice(2));let r=!n.includes(" ")&&ed.exec(n);if(r)return t.t=1,t.n=+r[1],t.u=r[2],t;if(t.o)return t.n=+n,t;{if((e=>er.test(e)||(ey(e,"rgb")||ey(e,"hsl"))&&(")"===e[e.length-1]||!en.test(e)))(n))return t.t=2,t.d=(e=>{let t,n,r,s;return ey(e,"rgb")?(n=ek((t=es.exec(e)||eo.exec(e))[4])?1:+t[4],[+t[1],+t[2],+t[3],n]):er.test(e)?(s=4===(r=e.length)||5===r,[+("0x"+e[1]+e[s?1:2]),+("0x"+e[s?2:3]+e[s?2:4]),+("0x"+e[s?3:5]+e[s?3:6]),5===r||9===r?+(("0x"+e[s?4:7]+e[s?4:8])/255).toFixed(3):1]):ey(e,"hsl")?(e=>{let t,n,r,s=ea.exec(e)||ei.exec(e),o=s[1]/360,a=s[2]/100,i=s[3]/100,l=ek(s[4])?1:+s[4];if(0===a)t=n=r=i;else{let e=i<.5?i*(1+a):i+a-i*a,s=2*i-e;t=ez(255*eV(s,e,o+1/3),0),n=ez(255*eV(s,e,o),0),r=ez(255*eV(s,e,o-1/3),0)}return[t,n,r,l]})(e):[0,0,0,1]})(n),t;let e=n.match(el);return t.t=3,t.d=e?e.map(Number):[],t.s=n.split(el)||[],t}}},e4=(e,t)=>(t.t=e._valueType,t.n=e._toNumber,t.u=e._unit,t.o=null,t.d=eX(e._toNumbers),t.s=eX(e._strings),t),e3=e5(),e6={},e7=(e,t,n)=>{if(3===n)return K.get(e)||e;if(!(2===n||1===n&&eE(t)&&e in t.style))return e;{let t=e6[e];if(t)return t;{let t=e?ef(e):e;return e6[e]=t,t}}},e8=e=>(e._hasChildren?eW(e,e8,!0):(e.pause(),eW(e,t=>{let n=t.property,r=t.target;if(r[G]){let s=r.style,o=t._inlineValue,a=ej(o)||""===o;if(3===t._tweenType){let e=r[q];if(a?delete e[n]:e[n]=o,t._renderTransforms)if(Object.keys(e).length){let t="";for(let n in e)t+=ee[n]+e[n]+") ";s.transform=t}else s.removeProperty("transform")}else a?s.removeProperty(ef(n)):s[n]=o;e._tail===t&&e.targets.forEach(e=>{e.getAttribute&&""===e.getAttribute("style")&&e.removeAttribute("style")})}})),e),e9={deg:1,rad:180/eD,turn:360},te={},tt=(e,t,n,r=!1)=>{let s=t.u,o=t.n;if(1===t.t&&s===n)return t;let a=o+s+n,i=te[a];if(ek(i)||r){let r;if(s in e9)r=o*e9[s]/e9[n];else{let t=e.cloneNode(),a=e.parentNode,i=a&&a!==W?a:W.body;i.appendChild(t);let l=t.style;l.width=100+s;let d=t.offsetWidth||100;l.width=100+n;let c=t.offsetWidth||100;i.removeChild(t),r=d/c*o}t.n=r,te[a]=r}else t.n=i;return t.t,t.u=n,t},tn=e=>e,tr=(e=1.68)=>t=>eR(t,+e),ts={in:e=>t=>e(t),out:e=>t=>1-e(1-t),inOut:e=>t=>t<.5?e(2*t)/2:1-e(-2*t+2)/2,outIn:e=>t=>t<.5?(1-e(1-2*t))/2:(e(2*t-1)+1)/2},to=eD/2,ta=2*eD,ti={"":tr,Quad:tr(2),Cubic:tr(3),Quart:tr(4),Quint:tr(5),Sine:e=>1-eM(e*to),Circ:e=>1-eA(1-e*e),Expo:e=>e?eR(2,10*e-10):0,Bounce:e=>{let t,n=4;for(;e<((t=eR(2,--n))-1)/11;);return 1/eR(4,3-n)-7.5625*eR((3*t-2)/22-e,2)},Back:(e=1.7)=>t=>(+e+1)*t*t*t-e*t*t,Elastic:(e=1,t=.3)=>{let n=eF(+e,1,10),r=eF(+t,1e-11,2),s=r/ta*eP(1/n),o=ta/r;return e=>0===e||1===e?e:-n*eR(2,-10*(1-e))*eI((1-e-s)*o)}},tl=(()=>{let e={linear:tn,none:tn};for(let t in ts)for(let n in ti){let r=ti[n],s=ts[t];e[t+n]=""===n||"Back"===n||"Elastic"===n?(e,t)=>s(r(e,t)):s(r)}return e})(),td={linear:tn,none:tn},tc=["steps(","irregular(","linear(","cubicBezier("],tu=e=>{if(eS(e)){for(let t=0,n=tc.length;t<n;t++)if(ey(e,tc[t]))return console.warn(`String syntax for \`ease: "${e}"\` has been removed from the core and replaced by importing and passing the easing function directly: \`ease: ${e}\``),tn}return eC(e)?e:eS(e)?(e=>{if(td[e])return td[e];if(-1>=e.indexOf("(")){let t=ts[e]||e.includes("Back")||e.includes("Elastic")?tl[e]():tl[e];return t?td[e]=t:tn}{let t=e.slice(0,-1).split("("),n=tl[t[0]];return n?td[e]=n(...t[1].split(",")):tn}})(e):tn}
1,t_=(e,t,n,r,s)=>{let o=e.parent,a=e.duration,i=e.completed,l=e.iterationDuration,d=e.iterationCount,c=e._currentIteration,u=e._loopDelay,_=e._reversed,m=e._alternate,p=e._hasChildren,h=e._delay,g=e._currentTime,f=h+l,y=t-h,b=eF(g,-h,a),x=eF(y,-h,a),v=y-g,w=x>0,S=x>=a,C=a<=1e-11,k=2===s,j=0,E=y,N=0;d>1&&(e._currentIteration=eF(~~(x/(l+(S?0:u))),0,d),S&&e._currentIteration--,j=e._currentIteration%2,E=x%(l+u)||0);let T=_^(m&&j),R=e._ease,A=S?T?0:a:T?l-E:E;R&&(A=l*R(A/l)||0);let I=(o?o.backwards:y<g)?!T:!!T;if(e._currentTime=y,e._iterationTime=A,e.backwards=I,w&&!e.began?(e.began=!0,n||o&&(I||!o.began)||e.onBegin(e)):y<=0&&(e.began=!1),n||p||!w||e._currentIteration===c||e.onLoop(e),k||1===s&&(t>=h&&t<=f||t<=h&&b>h||t>=f&&b!==a)||A>=f&&b!==a||A<=h&&b>0||t<=b&&b===a&&i||S&&!i&&C){if(w&&(e.computeDeltaTime(b),n||e.onBeforeUpdate(e)),!p){let t,s,a,i,l=k||(I?-1*v:v)>=ep.tickThreshold,d=e._offset+(o?o._offset:0)+h+A,c=e._head,u=0;for(;c;){let e=c._composition,n=c._currentTime,o=c._changeDuration,_=c._absoluteStartTime+c._changeDuration,m=c._nextRep,p=c._prevRep,h=e!==Q.none;if((l||(n!==o||d<=_+(m?m._delay:0))&&(0!==n||d>=c._absoluteStartTime))&&(!h||!c._isOverridden&&(!c._isOverlapped||d<=_)&&(!m||m._isOverridden||d<=m._absoluteStartTime)&&(!p||p._isOverridden||d>=p._absoluteStartTime+p._changeDuration+c._delay))){let n,l,d=c._currentTime=eF(A-c._startTime,0,o),_=c._ease(d/c._updateDuration),m=c._modifier,p=c._valueType,g=c._tweenType,f=0===g,y=0===p,b=y&&f||0===_||1===_?-1:ep.precision;if(y)n=l=m(ez(eY(c._fromNumber,c._toNumber,_),b));else if(1===p)l=m(ez(eY(c._fromNumber,c._toNumber,_),b)),n=`${l}${c._unit}`;else if(2===p){let e=c._fromNumbers,t=c._toNumbers,r=ez(eF(m(eY(e[0],t[0],_)),0,255),0),s=ez(eF(m(eY(e[1],t[1],_)),0,255),0),o=ez(eF(m(eY(e[2],t[2],_)),0,255),0),a=eF(m(ez(eY(e[3],t[3],_),b)),0,1);if(n=`rgba(${r},${s},${o},${a})`,h){let e=c._numbers;e[0]=r,e[1]=s,e[2]=o,e[3]=a}}else if(3===p){n=c._strings[0];for(let e=0,t=c._toNumbers.length;e<t;e++){let t=m(ez(eY(c._fromNumbers[e],c._toNumbers[e],_),b)),r=c._strings[e+1];n+=`${r?t+r:t}`,h&&(c._numbers[e]=t)}}if(h&&(c._number=l),r||e===Q.blend)c._value=n;else{let e=c.property;t=c.target,f?t[e]=n:1===g?t.setAttribute(e,n):(s=t.style,3===g?(t!==a&&(a=t,i=t[q]),i[e]=n,u=1):2===g?s[e]=n:4===g&&s.setProperty(e,n)),w&&(N=1)}}if(u&&c._renderTransforms){let e="";for(let t in i)e+=`${ee[t]}${i[t]}) `;s.transform=e,u=0}c=c._next}!n&&N&&e.onRender(e)}!n&&w&&e.onUpdate(e)}return o&&C?!n&&(o.began&&!I&&y>0&&!i||I&&y<=1e-11&&i)&&(e.onComplete(e),e.completed=!I):w&&S?d===1/0?e._startTime+=e.duration:e._currentIteration>=d-1&&(e.paused=!0,!i&&!p&&(e.completed=!0,n||o&&(I||!o.began)||(e.onComplete(e),e._resolve(e)))):e.completed=!1,N},tm=(e,t,n,r,s)=>{let o=e._currentIteration;if(t_(e,t,n,r,s),e._hasChildren){let a=e.backwards,i=r?t:e._iterationTime,l=eb(),d=0,c=!0;if(!r&&e._currentIteration!==o){let t=e.iterationDuration;eW(e,e=>{if(a){let r=e.duration,s=e._offset+e._delay;n||!(r<=1e-11)||s&&s+r!==t||e.onComplete(e)}else e.completed||e.backwards||!(e._currentTime<e.iterationDuration)||t_(e,t,n,1,2),e.began=!1,e.completed=!1}),n||e.onLoop(e)}eW(e,t=>{let o=ez((i-t._offset)*t._speed,12),a=t._fps<e._fps?t.requestTick(l):s;d+=t_(t,o,n,r,a),!t.completed&&c&&(c=!1)},a),!n&&d&&e.onRender(e),(c||a)&&e._currentTime>=e.duration&&(e.paused=!0,!e.completed&&(e.completed=!0,n||(e.onComplete(e),e._resolve(e))))}};class tp{constructor(e=0){this.deltaTime=0,this._currentTime=e,this._lastTickTime=e,this._startTime=e,this._lastTime=e,this._scheduledTime=0,this._frameDuration=1e3/240,this._fps=240,this._speed=1,this._hasChildren=!1,this._head=null,this._tail=null}get fps(){return this._fps}set fps(e){let t=this._frameDuration,n=+e,r=n<1e-11?1e-11:n,s=1e3/r;r>em.frameRate&&(em.frameRate=r),this._fps=r,this._frameDuration=s,this._scheduledTime+=s-t}get speed(){return this._speed}set speed(e){let t=+e;this._speed=t<1e-11?1e-11:t}requestTick(e){let t=this._scheduledTime;if(this._lastTickTime=e,e<t)return 0;let n=this._frameDuration,r=e-t;return this._scheduledTime+=r<n?n:r,1}computeDeltaTime(e){let t=e-this._lastTime;return this.deltaTime=t,this._lastTime=e,t}}let th={animation:null,update:et},tg=U?requestAnimationFrame:setImmediate,tf=U?cancelAnimationFrame:clearImmediate,ty=(s=new class e extends tp{constructor(e){super(e),this.useDefaultMainLoop=!0,this.pauseOnDocumentHidden=!0,this.defaults=em,this.paused=!0,this.reqId=0}update(){let e=this._currentTime=eb();
1if(this.requestTick(e)){this.computeDeltaTime(e);let t=this._speed,n=this._fps,r=this._head;for(;r;){let s=r._next;r.paused?(eQ(this,r),this._hasChildren=!!this._tail,r._running=!1,r.completed&&!r._cancelled&&r.cancel()):tm(r,(e-r._startTime)*r._speed*t,0,0,r._fps<n?r.requestTick(e):1),r=s}th.update()}}wake(){return this.useDefaultMainLoop&&!this.reqId&&(this.requestTick(eb()),this.reqId=tg(tb)),this}pause(){if(this.reqId)return this.paused=!0,tx()}resume(){if(this.paused)return this.paused=!1,eW(this,e=>e.resetTime()),this.wake()}get speed(){return this._speed*(1===ep.timeScale?1:1e3)}set speed(e){this._speed=e*ep.timeScale,eW(this,e=>e.speed=e._speed)}get timeUnit(){return 1===ep.timeScale?"ms":"s"}set timeUnit(e){let t="s"===e,n=t?.001:1;if(ep.timeScale!==n){ep.timeScale=n,ep.tickThreshold=200*n;let e=t?.001:1e3;this.defaults.duration*=e,this._speed*=e}}get precision(){return ep.precision}set precision(e){ep.precision=e}}(eb()),U&&(eg.engine=s,W.addEventListener("visibilitychange",()=>{s.pauseOnDocumentHidden&&(W.hidden?s.pause():s.resume())})),s),tb=()=>{ty._head?(ty.reqId=tg(tb),ty.update()):ty.reqId=0},tx=()=>(tf(ty.reqId),ty.reqId=0,ty),tv={_rep:new WeakMap,_add:new Map},tw=(e,t,n="_rep")=>{let r=tv[n],s=r.get(e);return s||(s={},r.set(e,s)),s[t]?s[t]:s[t]={_head:null,_tail:null}},tS=(e,t)=>e._isOverridden||e._absoluteStartTime>t._absoluteStartTime,tC=e=>{e._isOverlapped=1,e._isOverridden=1,e._changeDuration=1e-11,e._currentTime=1e-11},tk=(e,t)=>{let n=e._composition;if(n===Q.replace){let n=e._absoluteStartTime;e$(t,e,tS,"_prevRep","_nextRep");let r=e._prevRep;if(r){let t=r.parent,s=r._absoluteStartTime+r._changeDuration;if(e.parent.id!==t.id&&t.iterationCount>1&&s+(t.duration-t.iterationDuration)>n){tC(r);let e=r._prevRep;for(;e&&e.parent.id===t.id;)tC(e),e=e._prevRep}let o=n-e._delay;if(s>o){let e=r._startTime,t=ez(o-(s-(e+r._updateDuration))-e,12);r._changeDuration=t,r._currentTime=t,r._isOverlapped=1,t<1e-11&&tC(r)}let a=!0;if(eW(t,e=>{e._isOverlapped||(a=!1)}),a){let e=t.parent;if(e){let n=!0;eW(e,e=>{e!==t&&eW(e,e=>{e._isOverlapped||(n=!1)})}),n&&e.cancel()}else t.cancel()}}}else if(n===Q.blend){var r;let t,n=tw(e.target,e.property,"_add"),s=(r=tv._add,(t=th.animation)||(th.animation=t={duration:1e-11,computeDeltaTime:et,_offset:0,_delay:0,_head:null,_tail:null},th.update=()=>{r.forEach(e=>{for(let t in e){let n=e[t],r=n._head;if(r){let e=r._valueType,t=3===e||2===e?eX(r._fromNumbers):null,s=r._fromNumber,o=n._tail;for(;o&&o!==r;){if(t)for(let e=0,n=o._numbers.length;e<n;e++)t[e]+=o._numbers[e];else s+=o._number;o=o._prevAdd}r._toNumber=s,r._toNumbers=t}}}),t_(t,1,1,0,2)}),t),o=n._head;o||((o={...e})._composition=Q.replace,o._updateDuration=1e-11,o._startTime=0,o._numbers=eX(e._fromNumbers),o._number=0,o._next=null,o._prev=null,e$(n,o),e$(s,o));let a=e._toNumber;if(e._fromNumber=o._fromNumber-a,e._toNumber=0,e._numbers=eX(e._fromNumbers),e._number=0,o._fromNumber=a,e._toNumbers){let t=eX(e._toNumbers);t&&t.forEach((t,n)=>{e._fromNumbers[n]=o._fromNumbers[n]-t,e._toNumbers[n]=0}),o._fromNumbers=t}e$(n,e,null,"_prevAdd","_nextAdd")}return e},tj=e=>{let t=e._composition;if(t!==Q.none){let n=e.target,r=e.property;if(eQ(tv._rep.get(n)[r],e,"_prevRep","_nextRep"),t===Q.blend){let t=tv._add,s=t.get(n);if(!s)return;let o=s[r],a=th.animation;eQ(o,e,"_prevAdd","_nextAdd");let i=o._head;if(i&&i===o._tail){eQ(o,i,"_prevAdd","_nextAdd"),eQ(a,i);let e=!0;for(let t in s)if(s[t]._head){e=!1;break}e&&t.delete(n)}}}return e},tE=e=>(e.paused=!0,e.began=!1,e.completed=!1,e),tN=e=>(e._cancelled&&(e._hasChildren?eW(e,tN):eW(e,e=>{e._composition!==Q.none&&tk(e,tw(e.target,e.property))}),e._cancelled=0),e),tT=0;class tR extends tp{constructor(e={},t=null,n=0){super(0),++tT;const{id:r,delay:s,duration:o,reversed:a,alternate:i,loop:l,loopDelay:d,autoplay:c,frameRate:u,playbackRate:_,onComplete:m,onLoop:p,onPause:h,onBegin:g,onBeforeUpdate:f,onUpdate:y}=e;const b=t?0:ty._lastTickTime,x=t?t.defaults:ep.defaults,v=eC(s)||ek(s)?x.delay:+s,w=eC(o)||ek(o)?1/0:+o,S=eq(l,x.loop),C=eq(d,x.loopDelay);let k=!0===S||S===1/0||S<0?1/0:S+1;if(eh){const n=k===1/0;
1if(eh.register(this,e,n)&&n){const e=i?2:1;k=Math.max(t?eh.maxNestedInfiniteLoops:eh.maxInfiniteLoops,e)}}let j=0;t?j=n:(ty.reqId||ty.requestTick(eb()),j=(ty._lastTickTime-ty._startTime)*ep.timeScale),this.id=ek(r)?tT:r,this.parent=t,this.duration=eH((w+C)*k-C)||1e-11,this.backwards=!1,this.paused=!0,this.began=!1,this.completed=!1,this.onBegin=g||x.onBegin,this.onBeforeUpdate=f||x.onBeforeUpdate,this.onUpdate=y||x.onUpdate,this.onLoop=p||x.onLoop,this.onPause=h||x.onPause,this.onComplete=m||x.onComplete,this.iterationDuration=w,this.iterationCount=k,this._autoplay=!t&&eq(c,x.autoplay),this._offset=j,this._delay=v,this._loopDelay=C,this._iterationTime=0,this._currentIteration=0,this._resolve=et,this._running=!1,this._reversed=+eq(a,x.reversed),this._reverse=this._reversed,this._cancelled=0,this._alternate=eq(i,x.alternate),this._prev=null,this._next=null,this._lastTickTime=b,this._startTime=b,this._lastTime=b,this._fps=eq(u,x.frameRate),this._speed=eq(_,x.playbackRate)}get cancelled(){return!!this._cancelled}set cancelled(e){e?this.cancel():this.reset(!0).play()}get currentTime(){return eF(ez(this._currentTime,ep.precision),-this._delay,this.duration)}set currentTime(e){let t=this.paused;this.pause().seek(+e),t||this.resume()}get iterationCurrentTime(){return eF(ez(this._iterationTime,ep.precision),0,this.iterationDuration)}set iterationCurrentTime(e){this.currentTime=this.iterationDuration*this._currentIteration+e}get progress(){return eF(ez(this._currentTime/this.duration,10),0,1)}set progress(e){this.currentTime=this.duration*e}get iterationProgress(){return eF(ez(this._iterationTime/this.iterationDuration,10),0,1)}set iterationProgress(e){let t=this.iterationDuration;this.currentTime=t*this._currentIteration+t*e}get currentIteration(){return this._currentIteration}set currentIteration(e){this.currentTime=this.iterationDuration*eF(+e,0,this.iterationCount-1)}get reversed(){return!!this._reversed}set reversed(e){e?this.reverse():this.play()}get speed(){return super.speed}set speed(e){super.speed=e,this.resetTime()}reset(e=!1){return tN(this),this._reversed&&!this._reverse&&(this.reversed=!1),this._iterationTime=this.iterationDuration,tm(this,0,1,~~e,2),tE(this),this._hasChildren&&eW(this,tE),this}init(e=!1){this.fps=this._fps,this.speed=this._speed,!e&&this._hasChildren&&tm(this,this.duration,1,~~e,2),this.reset(e);let t=this._autoplay;return!0===t?this.resume():t&&!ek(t.linked)&&t.link(this),this}resetTime(){let e=1/(this._speed*ty._speed);return this._startTime=eb()-(this._currentTime+this._delay)*e,this}pause(){return this.paused||(this.paused=!0,this.onPause(this)),this}resume(){return this.paused&&(this.paused=!1,this.duration<=1e-11&&!this._hasChildren?tm(this,1e-11,0,0,2):(this._running||(e$(ty,this),ty._hasChildren=!0,this._running=!0),this.resetTime(),this._startTime-=12,ty.wake())),this}restart(){return this.reset().resume()}seek(e,t=0,n=0){tN(this),this.completed=!1;let r=this.paused;return this.paused=!0,tm(this,e+this._delay,~~t,~~n,1),r?this:this.resume()}alternate(){let e=this._reversed,t=this.iterationCount,n=this.iterationDuration,r=t===1/0?eL(1e12/n):t;return this._reversed=+(this._alternate&&!(r%2)?e:!e),t===1/0?this.iterationProgress=this._reversed?1-this.iterationProgress:this.iterationProgress:this.seek(n*r-this._currentTime),this.resetTime(),this}play(){return this._reversed&&this.alternate(),this.resume()}reverse(){return this._reversed||this.alternate(),this.resume()}cancel(){return this._hasChildren?eW(this,e=>e.cancel(),!0):eW(this,tj),this._cancelled=1,this.pause()}stretch(e){let t=this.duration,n=eU(e);if(t===n)return this;let r=e/t,s=e<=1e-11;return this.duration=s?1e-11:n,this.iterationDuration=s?1e-11:eU(this.iterationDuration*r),this._offset*=r,this._delay*=r,this._loopDelay*=r,this}revert(){tm(this,0,1,0,1);let e=this._autoplay;return e&&e.linked&&e.linked===this&&e.revert(),this.cancel()}complete(e=0){return this.seek(this.duration,e).cancel()}then(e=et){let t=this.then,n=()=>{this.then=null,e(this),this.then=t,this._resolve=et};return new Promise(e=>(this._resolve=()=>e(n()),this.completed&&this._resolve(),this))}}let tA=e5(),tI=e5(),tM={},tL={func:null},tP={func:null}
1,tD=[null],tO=[null,null],tF={to:null},tB=0,tz=0;class tY extends tR{constructor(e,r,s,o,a=!1,i=0,l=0){super(r,s,o),++tz;const d=function(e){let t=function(e){if(ej(e))return[];if(!U)return ex(e)&&e.flat(1/0)||[e];if(ex(e)){let t=e.flat(1/0),n=[];for(let e=0,r=t.length;e<r;e++){let r=t[e];if(!ej(r)){let e=eG(r);if(e)for(let t=0,r=e.length;t<r;t++){let r=e[t];if(!ej(r)){let e=!1;for(let t=0,s=n.length;t<s;t++)if(n[t]===r){e=!0;break}e||n.push(r)}}else{let e=!1;for(let t=0,s=n.length;t<s;t++)if(n[t]===r){e=!0;break}e||n.push(r)}}}return n}let t=eG(e);return t?Array.from(t):[e]}(e),n=t.length;if(n)for(let e=0;e<n;e++){let n=t[e];if(!n[$]){n[$]=!0;let e=eE(n);(n.nodeType||e)&&(n[G]=!0,n[V]=e,n[q]={})}}return t}(e),c=d.length,u=r.keyframes,_=u?((e,t)=>{let n={...e};for(let r in t){let s=e[r];n[r]=ek(s)?t[r]:s}return n})(((e,t)=>{let n={};if(ex(e)){let t=[].concat(...e.map(e=>Object.keys(e))).filter(eN);for(let r=0,s=t.length;r<s;r++){let s=t[r],o=e.map(e=>{let t={};for(let n in e){let r=e[n];eN(n)?n===s&&(t.to=r):t[n]=r}return t});n[s]=o}}else{let r=eq(t.duration,ep.defaults.duration);for(let t in Object.keys(e).map(t=>({o:parseFloat(t)/100,p:e[t]})).sort((e,t)=>e.o-t.o).forEach(e=>{let t=e.o,s=e.p;for(let e in s)if(eN(e)){let o=n[e];o||(o=n[e]=[]);let a=t*r,i=o.length,l=o[i-1],d={to:s[e]},c=0;for(let e=0;e<i;e++)c+=o[e].duration;1===i&&(d.from=l.to),s.ease&&(d.ease=s.ease),d.duration=a-(i?c:0),o.push(d)}return e}),n){let e,r=n[t];for(let t=0,n=r.length;t<n;t++){let n=r[t],s=n.ease;n.ease=e||void 0,e=s}r[0].duration||r.shift()}}return n})(u,r),r):r,{id:m,delay:p,duration:h,ease:g,playbackEase:f,modifier:y,composition:b,onRender:x}=_,v=s?s.defaults:ep.defaults,w=eq(g,v.ease),S=eq(f,v.playbackEase),C=S?tu(S):null,k=!ek(w.ease),j=k?w.ease:eq(g,C?"linear":v.ease),E=k?w.settlingDuration:eq(h,v.duration),N=eq(p,v.delay),T=y||v.modifier,R=ek(b)&&c>=1e3?Q.none:ek(b)?v.composition:b,A=this._offset+(s?s._offset:0);k&&(w.parent=this);let I=NaN,M=NaN,L=0,P=0;for(let e=0;e<c;e++){const r=d[e],o=i||e,u=l||c;let m=NaN,p=NaN;for(let e in _)if(eN(e)){const i=eK(r,e),l=e7(e,r,i);let d=_[e];const c=ex(d);if(a&&!c&&(tO[0]=d,tO[1]=d,d=tO),c){const e=d.length,n=!ev(d[0]);2===e&&n?(tF.to=d,tD[0]=tF,t=tD):e>2&&n?(t=[],d.forEach((e,n)=>{n?1===n?(tO[1]=e,t.push(tO)):t.push(e):tO[0]=e})):t=d}else tD[0]=d,t=tD;let h=null,g=null,f=NaN,y=0,b=0;for(let e=t.length;b<e;b++){let a;const d=t[b];ev(d)?n=d:(tF.to=d,n=tF),tL.func=null,tP.func=null;const c=eJ(n.to,r,o,u,tL);ev(c)&&!ek(c.to)?(n=c,a=c.to):a=c;const _=eJ(n.from,r,o,u),m=n.ease||j,p=eJ(m,r,o,u),x=eC(p)||eS(p)?p:m,v=!ek(x)&&!ek(x.ease),w=v?x.ease:x,S=v?x.settlingDuration:eJ(eq(n.duration,e>1?eJ(E,r,o,u)/e:E),r,o,u),C=eJ(eq(n.delay,b?0:N),r,o,u),k=eJ(eq(n.composition,R),r,o,u),I=ew(k)?k:Q[k],M=n.modifier||T,D=!ek(_),O=!ek(a),F=ex(a),B=F||D&&O,z=g?y+C:C,Y=ez(A+z,12);!P&&(D||F)&&(P=1);let H=g;if(I!==Q.none){h||(h=tw(r,l));let e=h._head;for(;e&&!e._isOverridden&&e._absoluteStartTime<=Y;)if(H=e,(e=e._nextRep)&&e._absoluteStartTime>=Y)for(;e;)tC(e),e=e._nextRep}if(B){e2(F?eJ(a[0],r,o,u,tP):_,tA),e2(F?eJ(a[1],r,o,u,tL):a,tI);const e=e0(r,l,i,tM);0===tA.t&&(H?1===H._valueType&&(tA.t=1,tA.u=H._unit):(e2(e,e3),1===e3.t&&(tA.t=1,tA.u=e3.u)))}else O?e2(a,tI):g?e4(g,tI):e2(s&&H&&H.parent.parent===s?H._value:e0(r,l,i,tM),tI),D?e2(_,tA):g?e4(g,tA):e2(s&&H&&H.parent.parent===s?H._value:e0(r,l,i,tM),tA);if(tA.o&&(tA.n=e1(H?H._toNumber:e2(e0(r,l,i,tM),e3).n,tA.n,tA.o)),tI.o&&(tI.n=e1(tA.n,tI.n,tI.o)),tA.t!==tI.t){if(3===tA.t||3===tI.t){const e=3===tA.t?tA:tI,t=3===tA.t?tI:tA;t.t=3,t.s=eX(e.s),t.d=e.d.map(()=>t.n)}else if(1===tA.t||1===tI.t){const e=1===tA.t?tA:tI,t=1===tA.t?tI:tA;t.t=1,t.u=e.u}else if(2===tA.t||2===tI.t){const e=2===tA.t?tA:tI,t=2===tA.t?tI:tA;t.t=2,t.s=e.s,t.d=[0,0,0,1]}}if(tA.u!==tI.u){let e=tI.u?tA:tI;e=tt(r,e,tI.u?tI.u:tA.u,!1)}if(tI.d&&tA.d&&tI.d.length!==tA.d.length){const e=tA.d.length>tI.d.length?tA:tI,t=e===tA?tI:tA;t.d=e.d.map((e,n)=>ek(t.d[n])?0:t.d[n]),t.s=eX(e.s)}const U=ez(+S||1e-11,12);let X=tM[l];ej(X)||(tM[l]=null);const W={parent:this,id:tB++,property:l,target:r,_value:null,_toFunc:tL.func,_fromFunc:tP.func,_ease:tu(w),_fromNumbers:eX(tA.d),_toNumbers:eX(tI.d),_strings:eX(tI.s),_fromNumber:tA.n,_toNumber:tI.n,_numbers:eX(tA.d),_number:tA.n,_unit:tI.u,_modifier:M,_currentTime:0,_startTime:z,_delay:+C,_updateDuration:U,_changeDuration:U,_absoluteStartTime:Y,_tweenType:i,_valueType:tI.t,_composition:I,_isOverlapped:0,_isOverrid
1den:0,_renderTransforms:0,_inlineValue:X,_prevRep:null,_nextRep:null,_prevAdd:null,_nextAdd:null,_prev:null,_next:null};I!==Q.none&&tk(W,h),isNaN(f)&&(f=W._startTime),y=ez(z+U,12),g=W,L++,e$(this,W)}(isNaN(M)||f<M)&&(M=f),(isNaN(I)||y>I)&&(I=y),3===i&&(m=L-b,p=L)}if(!isNaN(m)){let e=0;eW(this,t=>{e>=m&&e<p&&(t._renderTransforms=1,t._composition===Q.blend&&eW(th.animation,e=>{e.id===t.id&&(e._renderTransforms=1)})),e++})}}c||console.warn("No target found. Make sure the element you're trying to animate is accessible before creating your animation."),M?(eW(this,e=>{e._startTime-e._delay||(e._delay-=M),e._startTime-=M}),I-=M):M=0,I||(I=1e-11,this.iterationCount=0),this.targets=d,this.id=ek(m)?tz:m,this.duration=1e-11===I?1e-11:eH((I+this._loopDelay)*this.iterationCount-this._loopDelay)||1e-11,this.onRender=x||v.onRender,this._ease=C,this._delay=M,this.iterationDuration=I,!this._autoplay&&P&&this.onRender(this)}stretch(e){let t=this.duration;if(t===eU(e))return this;let n=e/t;return eW(this,e=>{e._updateDuration=eU(e._updateDuration*n),e._changeDuration=eU(e._changeDuration*n),e._currentTime*=n,e._startTime*=n,e._absoluteStartTime*=n}),super.stretch(e)}refresh(){return eW(this,e=>{let t=e._toFunc,n=e._fromFunc;(t||n)&&(n?(e2(n(),tA),tA.u!==e._unit&&e.target[G]&&tt(e.target,tA,e._unit,!0),e._fromNumbers=eX(tA.d),e._fromNumber=tA.n):t&&(e2(e0(e.target,e.property,e._tweenType),e3),e._fromNumbers=eX(e3.d),e._fromNumber=e3.n),t&&(e2(t(),tI),e._toNumbers=eX(tI.d),e._strings=eX(tI.s),e._toNumber=tI.o?e1(e._fromNumber,tI.n,tI.o):tI.n))}),1e-11===this.duration&&this.restart(),this}revert(){return super.revert(),e8(this)}then(e){return super.then(e)}}let tH=(e,t)=>new tY(e,t,null,0,!1).init(),tU=[{version:"3.27.0",date:"2026-03-30",title:"Polish & Fixes",items:["Improved","Sidebar hover colours now match the design system","Model selector no longer shows provider icons","Sidepanel hidden on the pricing page for a focused checkout flow","Fixed","Deleted memories no longer reappear after page refresh","Memory download and share buttons stay reachable on all screen sizes","Audio player loads with proper skeleton and duration","Dropdown menus close when tapping outside"]},{version:"3.26.0",date:"2026-03-25",title:"Fixes & Polish",items:["Fixed","Link preview thumbnails update when you rename a memory","Bottom sheets close fully on drag-down instead of getting stuck","Memory title edits save reliably without getting skipped","Chat stays scrolled up when reading older messages during streaming","To-do drag-and-drop order persists after moving tasks","Payment success page icons display correctly","Improved","Sharing a link via chat auto-sends the message after sign-in","Daily Digest banner appears when any past digest exists","Memory pages no longer jump to wrong scroll position on load"]},{version:"3.24.0",date:"2026-02-20",time:"16:00 EET",title:"Daily Digest & Composer",items:["Added","Daily Digest with personalized morning briefing, date navigation, and section cards","Digest banner on home page shows when your digest is ready","Talk to TwinMind via WhatsApp from settings","Improved","Memory chat composer collapses into a pill and expands on focus","Model selector integrated directly into the chat composer","Sticky headers on memory page scroll without jank","Share modal auto-submits email addresses typed into the field","Transcription recovers when enhancement gets stuck","Transcription falls back to English when language is missing","Unsaved-work warning catches all navigation on the transcribe page","Version history modal centered on screen","Fixed","Editor no longer jumps on desktop when switching tabs","Transcript tab shows text even when speaker metadata is missing"]},{version:"3.23.0",date:"2026-02-12",time:"12:00 EET",title:"Sign-In & Chat Polish",items:["Added","New sign-in modal with clearer layout","Improved","Chat message text larger and easier to read","Memory chat fits better in narrow panels","Unified chat experience across memory and conversation pages","Extension onboarding with feature carousel","Summary editing and regeneration workflow","Version history easier to use on mobile","Fixed","Apple sign-in error resolved","Copy summary to Google Docs preserves formatting","Page no longer jumps when focu
1sing chat on iOS Safari"]},{version:"3.22.0",date:"2026-02-04",time:"04:00 EET",title:"Memory Chat Attachments",items:["Added","Attach files in memory chat conversations","Improved","Chat bubbles have clearer visual distinction","Streaming responses render without flicker","Summary page scrolls more smoothly","Changelog modal has action buttons on mobile"]},{version:"3.21.1",date:"2026-02-03",time:"18:00 EET",title:"Chat Polish",items:["Improved","Chat animations feel smoother and more responsive","Swipe to open sidebar works better on mobile","Chat input collapses more reliably when navigating away"]},{version:"3.21.0",date:"2026-02-03",time:"12:00 EET",title:"Memory Chat Redesign",items:["Added","Voice input in memory chat conversations","Chat input stays visible on mobile even when sheet is closed","Improved","Memory chat input has a modern glass design with animated focus effect",'"Ask this note" button smoothly animates in and out',"Onboarding carousel controls easier to see and tap","Fixed","File uploads work correctly on Safari mobile"]},{version:"3.20.0",date:"2026-02-02",time:"18:00 EET",title:"Smarter Chat",items:["Added","See how the AI thinks with expandable reasoning sections","Web sources show site icons for easier recognition","Clickable citations link directly to source pages","Tables display properly in AI responses","URLs and emails in replies are now clickable","Copy your own messages with a hover button","Improved","Chat stays scrolled to bottom during long responses","Login page fits better on mobile screens"]},{version:"3.19.3",date:"2026-01-30",time:"18:00 EET",title:"Chat & Download Banner",items:["Improved","Chat scroll behavior on iOS: smoother auto-scroll and fewer jumps","Mobile download banner taller and easier to tap","Fixed","Navbar repositions correctly after dismissing download banner on mobile"]},{version:"3.19.2",date:"2026-01-30",time:"16:00 EET",title:"Chat Scroll Button",items:["Improved","Scroll-to-bottom button has clearer press feedback and smoother animation","Scroll button position more consistent in chat"]},{version:"3.19.1",date:"2026-01-30",time:"12:00 EET",title:"Home Logo Update",items:["Improved","Home page logo uses updated icon"]},{version:"3.19.0",date:"2026-01-30",time:"09:00 EET",title:"Home & Chat Polish",items:["Improved","Home uses new default background and single image","Greeting text easier to read with updated styles","Fixed","Chat padding consistent across iOS, Android, and desktop","Improved","Loading screens look consistent across the app","Summary action buttons clearer and easier to tap on mobile"]},{version:"3.18.0",date:"2026-01-29",time:"18:00 EET",title:"Get the App",items:["Added","Download banner for mobile app and Chrome extension","Dismiss once and it stays hidden"]},{version:"3.17.0",date:"2026-01-29",time:"14:00 EET",title:"Smarter Notes",items:["Improved","Notes tab content included when regenerating summaries","Clearer button text for saving notes"]},{version:"3.16.1",date:"2026-01-29",time:"10:00 EET",title:"Extension Integration",items:["Fixed","Prevented duplicate extension sync during login","Fixed double logout handling from Chrome extension","Improved","Added logging for extension login flow debugging"]},{version:"3.16.0",date:"2026-01-29",time:"09:30 EET",title:"Account Management",items:["Added","Delete account option in profile settings","Account deletion confirmation modal with clear warnings"]},{version:"3.15.0",date:"2026-01-29",time:"09:00 EET",title:"Onboarding Experience",items:["Added","New onboarding flow for first-time users","Onboarding pages for web app and Chrome extension","Language selection and profile setup steps"]},{version:"3.14.1",date:"2026-01-29",time:"08:00 EET",title:"Visual Polish",items:["Added","Tables display properly in AI chat replies","Improved","Audio loading handles cold starts faster"]},{version:"3.14.0",date:"2026-01-28",title:"Message Persistence",items:["Added","Messages sent before login are preserved","Messages auto-send after authentication completes"]},{version:"3.13.1",date:"2026-01-25",title:"Mobile Chat Fix",items:["Fixed","Chat input no longer clipped on Chrome Android","Chat input width matches message area on all devices"]},{version:"3.13.0",date:"2026-01-24",title:"Transcript & Chat Polish",items:["Added","Copy button on transcript tab","Improved","Chat auto-scrolls to latest messages","Chat input positioned at bottom on mobile home screen","Desktop chat panel fits viewport on memory pages","Cleaner home page with updated logo and search bar"]},{version:"3.12.0",date:"2026-01-24",title:"Home Page Refresh",items:["Added","Sunset background and glassmorphism on home screen","Multiple tool chips display when AI uses several tools","Fixed","Chat history loads correctly when opening past conversations",'"What\'s New" opens from any page, not just home']},{version:"3.11.0",date:"2026-01-24",title:"Editor Refinements",items:["Improved","Side menu aligns properly with headings in notes","Trailing blank lines removed from chat messages","Better mobile padding in chat input"]},{version:"3.10.0",date:"2026-01-23",title:"Memory Page Polish",items:["Added","Edit and Regenerate buttons on memory summaries","Improved","Chat panel positioning and visibility on memory pages","Memory title syncs in real-time when editing","Cleaner font sizes and spacing throughout memory pages","Slash menu styling in the editor"]},{version:"3.9.0",date:"2026-01-22",title:"Reliable Sync",items:["Fixed","Todo list syncs reliably across browser and extension"]}
1,{version:"3.8.0",date:"2026-01-21",title:"Smoother Workflows",items:["Fixed","Memories from Chrome Extension appear instantly in sidebar","Add Note modal saves without getting stuck","Improved","Cleaner typography and spacing on memory pages","Skeleton loaders while memories and chats load"]},{version:"3.7.0",date:"2026-01-19",title:"Document Attachments",items:["Added","Attach PDF and DOCX files to chat","Improved","Easier to drag bottom sheets on mobile"]},{version:"3.6.0",date:"2026-01-19",title:"Stay in the Loop",items:["Added",'"What\'s New" popup shows recent updates on app launch',"Access past updates anytime via profile menu"]},{version:"3.5.0",date:"2026-01-19",title:"Faster Sign-In",items:["Added","Sign in faster with Google One Tap on homepage","Fixed","Personalization settings save instantly","Changed","Cleaner homepage without download banner"]},{version:"3.4.0",date:"2026-01-18",title:"Memory Editing & More",items:["Added","Share memories via WhatsApp short link",'"Restore" button added to version history on mobile',"Fixed","Edits persist through page refresh","Regenerated summaries save correctly","Sidebar reflects title changes immediately","Ctrl+Z works as expected in editor","Block reordering saves properly","Scrolling no longer dismisses bottom sheets","Copy includes the memory title","Audio playback works reliably","Improved","Simplified mobile editor toolbar"]}];function tX(){return tU[0]?.version??"1.0.0"}var tW=e.i(340974);function tQ({onClose:e,onDontShowAgain:t,isMobile:n}){return(0,i.jsxs)("div",{className:(0,tW.cn)("flex items-center gap-3 pt-5 mt-5 border-t border-brand-primary/10",n?"flex-col":"flex-col-reverse sm:flex-row"),children:[t&&(0,i.jsx)("button",{type:"button",onClick:t,className:(0,tW.cn)("px-4 py-2 text-sm font-medium text-secondary-text hover:text-brand-primary hover:bg-brand-action-bg-hover rounded-full transition-colors",n?"w-full order-2":"w-full sm:w-auto"),"data-testid":"changelog-dont-show-again",children:"Don't show on startup"}),(0,i.jsx)("button",{type:"button",onClick:e,className:(0,tW.cn)("px-6 py-2 bg-brand-primary text-white text-sm font-medium rounded-full hover:bg-brand-primary-hover transition-colors",n?"w-full order-1":"w-full sm:w-auto sm:ml-auto"),"data-testid":"changelog-got-it",children:"Sounds good"})]})}function t$({entry:e,isFirst:t}){return(0,i.jsxs)("div",{className:(0,tW.cn)("rounded-xl p-4 transition-colors",t?"bg-brand-action-bg-hover":"bg-[#FBFBFB]"),children:[(0,i.jsxs)("div",{className:"flex items-start justify-between gap-3 mb-2",children:[(0,i.jsx)("h3",{className:"text-base font-semibold text-brand-primary leading-snug",children:e.title}),(0,i.jsxs)("span",{className:"shrink-0 text-xs font-medium text-brand-action-text bg-white px-2 py-0.5 rounded-full border border-brand-primary/10",children:["v",e.version]})]}),(0,i.jsx)("p",{className:"text-xs text-secondary-text mb-3",children:function(e,t){let n=new Date(e),r=n.toLocaleDateString("en-US",{month:"short",day:"numeric",year:"numeric"});if(!t)return r;let[s,o]=t.split(":").map(Number),a=new Date(n);a.setHours(s,o,0,0);let i=a.toLocaleTimeString("en-US",{hour:"numeric",minute:"2-digit",hour12:!0});return`${r}, ${i}`}(e.date,e.time)}),(0,i.jsx)("ul",{className:"space-y-2",children:e.items.map((e,t)=>/^(Added|Fixed|Improved|Changed):?$/i.test(e.trim())?(0,i.jsx)("li",{className:"pt-2 first:pt-0",children:(0,i.jsx)("span",{className:"text-xs font-semibold text-secondary-text uppercase tracking-wide",children:e.replace(/:$/,"")})},t):(0,i.jsxs)("li",{className:"flex items-start gap-2 text-sm text-gray-700",children:[(0,i.jsx)(Y.Check,{className:"shrink-0 mt-0.5 text-brand-primary",size:14,strokeWidth:2.5,"aria-hidden":"true"}),(0,i.jsx)("span",{children:e})]},t))})]})}function tG({initialEntries:e,onClose:t,onDontShowAgain:n,isMobile:r,hideFooter:s=!1,isExpanded:o,onToggleExpand:a,isAnimating:l,onAnimationStart:d,onAnimationComplete:c}){let u=(0,m.useRef)(null),_=tU.length,p=_>e,h=_-e,g=tU.slice(0,e),f=tU.slice(e),y=(0,m.useCallback)(()=>{if(l||!u.current)return;let e=u.current;if(o){d();let t=e.offsetHeight,n=e.querySelectorAll('[data-visible-entry="true"]'),r=0;
1n.forEach((e,t)=>{r+=e.offsetHeight,t<n.length-1&&(r+=12)}),tH(e,{height:[t,r],duration:300,ease:"out-cubic",onComplete:()=>{a(),e.style.height="auto",c()}})}else{let t=e.offsetHeight;a(),d(),requestAnimationFrame(()=>{let n=e.scrollHeight;e.style.height=`${t}px`,tH(e,{height:[t,n],duration:300,ease:"out-cubic",onComplete:()=>{e.style.height="auto",c()}})})}},[o,l,a,d,c]);return(0,i.jsxs)("div",{className:"flex flex-col",children:[(0,i.jsxs)("div",{className:"mb-5",children:[(0,i.jsx)("h2",{className:"text-brand-primary text-xl font-semibold leading-tight mb-1",children:"Here's what's new"}),(0,i.jsx)("p",{className:"text-sm text-secondary-text",children:"Recent updates to make TwinMind better for you"})]}),(0,i.jsxs)("div",{className:(0,tW.cn)("overflow-y-auto -mx-1 px-1",r?"max-h-[50vh]":"max-h-[55vh]"),style:{scrollbarGutter:"stable"},children:[(0,i.jsxs)("div",{ref:u,className:"flex flex-col gap-3 overflow-hidden",children:[g.map((e,t)=>(0,i.jsx)("div",{"data-visible-entry":"true",children:(0,i.jsx)(t$,{entry:e,isFirst:0===t})},`changelog-entry-${t}`)),(o||l)&&f.map((t,n)=>(0,i.jsx)("div",{"data-hidden-entry":"true",children:(0,i.jsx)(t$,{entry:t,isFirst:!1})},`changelog-entry-${e+n}`))]}),p&&(0,i.jsxs)("button",{type:"button",onClick:y,disabled:l,className:"flex items-center justify-center gap-1.5 py-3 w-full text-sm font-medium text-brand-primary hover:text-brand-primary-hover transition-colors disabled:opacity-50",children:[(0,i.jsx)("span",{children:o?"Show less":`Show ${h} more`}),(0,i.jsx)(H.ChevronDown,{size:16,className:(0,tW.cn)("transition-transform duration-300",o&&"rotate-180")})]})]}),!s&&(0,i.jsx)(tQ,{onClose:t,onDontShowAgain:n,isMobile:r})]})}function tV({isOpen:e,onClose:t,onDontShowAgain:n,initialEntries:r=2}){let s=(0,z.useMediaQuery)("(max-width: 640px)"),[o,a]=(0,m.useState)(!1),[l,d]=(0,m.useState)(!1),c={initialEntries:r,onClose:t,onDontShowAgain:n,isExpanded:o,onToggleExpand:()=>a(e=>!e),isAnimating:l,onAnimationStart:()=>d(!0),onAnimationComplete:()=>d(!1)};return s?(0,i.jsx)(B.BottomSheet,{open:e,onDismiss:t,snapPoints:({maxHeight:e})=>.85*e,footer:(0,i.jsx)(tQ,{onClose:t,onDontShowAgain:n,isMobile:!0}),testID:"changelog-modal",children:(0,i.jsx)(tG,{...c,isMobile:!0,hideFooter:!0})}):(0,i.jsx)(B.Modal,{isOpen:e,onClose:t,size:"md",closeOnOverlayClick:!0,closeOnEscape:!0,testId:"changelog-modal",ariaLabel:"What's new in this version",showDismissButton:!0,children:(0,i.jsx)(tG,{...c,isMobile:!1})})}e.i(66563);var tq=e.i(644804);let tJ=(0,d.createModuleLogger)("ChangelogModal"),tK="changelog-dismissal",tZ=["/"],t0=(0,m.createContext)(null);function t1({children:e}){let{isAuthenticated:t,loading:n}=(0,A.useAuth)(),r=(0,T.usePathname)(),{isOpen:s,setIsOpen:o,dismiss:a,setIsManuallyOpened:l}=function(e,t){let[n,r]=(0,m.useState)(null),[s,o]=(0,m.useState)(!1),[a,i]=(0,m.useState)(!1),[l,d]=(0,m.useState)(!1),c=(0,m.useCallback)(()=>{try{return tq.StorageCache.get(tK,31536e7)||null}catch(e){return tJ.warn({error:e},"Failed to load changelog dismissal state"),null}},[]),u=(0,m.useCallback)(e=>{try{tq.StorageCache.save(tK,e),r(e)}catch(e){tJ.warn({error:e},"Failed to save changelog dismissal state")}},[]),_=(0,m.useCallback)((e,t)=>{let n=e.split(".").map(e=>parseInt(e,10)),r=t.split(".").map(e=>parseInt(e,10));if(n.some(isNaN)||r.some(isNaN))return tJ.warn({v1:e,v2:t},"Invalid version format - contains non-numeric parts"),!1;for(let e=0;e<Math.max(n.length,r.length);e++){let t=n[e]||0,s=r[e]||0;if(t>s)return!0;if(t<s)break}return!1},[]),p=(0,m.useCallback)(e=>!e||!e.dontShowAgain&&_(tX(),e.lastSeenVersion),[_]),h=(0,m.useCallback)(()=>!!s&&!!p(n)&&!!t&&tZ.includes(t),[n,s,p,t]);return(0,m.useEffect)(()=>{"loading"!==e.status&&(r(c()),o(!0))},[e.status,c]),{shouldShow:h,dismiss:(0,m.useCallback)((e=!1)=>{u({lastSeenVersion:tX(),dismissedAt:Date.now(),dontShowAgain:e}),i(!1),d(!1)},[u]),isOpen:a,setIsOpen:i,setIsManuallyOpened:d}}((0,m.useMemo)(()=>n?{status:"loading"}:t?{status:"authenticated"}:{status:"unauthenticated"},[t,n]),r),d=(0,m.useCallback)(()=>{l(!0),o(!0)},[l,o]),c=(0,m.useCallback)(()=>a(),[a]),u=(0,m.useCallback)(()=>a(!0),[a]);return(0,i.jsxs)(t0.Provider,{value:{openChangelog:d},children:[(0,i.jsx)(tV,{isOpen:s,onClose:c,onDontShowAgain:u}),e]})}e.i(828103);var t5=e.i(697467),t2=e.i(651168),t4=e.i(659619),t3=e.i(370432),t6=e.i(694164);let t7=` 2.gradient-button { 3 background: linear-gradient(to bottom, rgb(24, 87, 122), rgb(81, 124,
3148)); 4 transition: background-color 0.3s ease; 5} 6.gradient-button:hover { 7 background: linear-gradient(to bottom, rgb(17, 64, 90), rgb(24, 87, 122)); 8} 9.sticky-header-outer-container { 10 /* Styles for the TRANSPARENT sticky container */ 11 position: sticky; 12 top: 0; 13 z-index: 50; 14 /* NO background or backdrop-filter here */ 15 /* Pointer events none allows clicks to pass through the empty space */ 16 pointer-events: none; 17} 18 19.header-card-fullwidth { 20 /* New class name for clarity */ 21 pointer-events: auto; 22 /* Apply frosted glass effect HERE */ 23 background-color: rgba(255, 255, 255, 0.85); 24 backdrop-filter: blur(12px) saturate(150%); 25 -webkit-backdrop-filter: blur(12px) saturate(150%); 26 27 /* REMOVED max-width, mx-auto */ 28 /* REMOVED border-radius (optional, can keep if desired) */ 29 /* Apply border (e.g., only bottom border might look good full-width) */ 30 border-bottom-width: 1px; 31 border-color: rgba(209, 213, 219, 0); /* border-gray-300/80 */ 32 33 /* Flex layout for content */ 34 display: flex; 35 justify-content: space-between; 36 align-items: center; 37 38 /* Padding inside the card - Controls spacing from screen edges */ 39 padding-left: 1.5rem; /* px-6 */ 40 padding-right: 1.5rem; /* px-6 */ 41 padding-top: 0.5rem; /* p-3 */ 42 padding-bottom: 0.5rem; /* p-3 */ 43} 44 45.header-card { 46 /* Styles for the INNER visual card */ 47 /* Enable pointer events for the card itself and its contents */ 48 pointer-events: auto; 49 /* Apply frosted glass effect HERE */ 50 background-color: rgba(255, 255, 255, 0.65); /* White with 85% opacity */ 51 backdrop-filter: blur(12px) saturate(150%); 52 -webkit-backdrop-filter: blur(12px) saturate(150%); 53 /* Add border, rounded corners etc. */ 54 border-width: 1px; 55 border-color: rgba(209, 213, 219, 0.8); /* Equivalent to border-gray-300/80 */ 56 border-radius: 0.75rem; /* Equivalent to rounded-xl */ 57 /* Max width and centering */ 58 margin-left: 1%; 59 margin-right: 1%; 60 /* Flex layout for content */ 61 display: flex; 62 justify-content: space-between; 63 align-items: center; 64 /* Padding inside the card */ 65 padding: 6px; /* Equivalent to p-3 */ 66 padding-right: 12px; 67} 68`;e.i(664079);var t8=e.i(669032),t9=e.i(882442),ne=e.i(604570),nt=e.i(720565);function nn(){let e=(0,T.usePathname)(),t=(0,T.useSearchParams)(),n=(0,nt.usePostHog)();return(0,m.useEffect)(()=>{if(e&&n){let r=window.origin+e;t.toString()&&(r=`${r}?${t.toString()}`),n.capture("$pageview",{$current_url:r})}},[e,t,n]),null}function nr(){return(0,i.jsx)(m.Suspense,{fallback:null,children:(0,i.jsx)(nn,{})})}var ns=e.i(509788),no=e.i(858338);function na({children:e}){return(0,m.useEffect)(()=>{let e="phc_d41mYPnccOymHINVfENDvLgpzNbBObxD9JvsWYXTU8T",t=a.default.env.NEXT_PUBLIC_POSTHOG_HOST,n="true"===a.default.env.NEXT_PUBLIC_DEBUG_POSTHOG;e&&t&&!ne.default.__loaded?ne.default.init(e,{api_host:t,person_profiles:"identified_only",capture_pageview:!1,capture_pageleave:!0,...!(0,l.isProduction)()&&n&&{loaded:e=>{console.log("PostHog initialized")}}}):(0,l.isProduction)()||!n||e&&t||console.warn("PostHog is not initialized. Add NEXT_PUBLIC_POSTHOG_KEY and NEXT_PUBLIC_POSTHOG_HOST to your environment variables.")},[]),(0,m.useEffect)(()=>((0,ns.initCrashReporter)(),ns.teardownCrashReporter),[]),(0,m.useEffect)(()=>((0,no.initWebVitals)(),(0,no.initReportingObserver)()),[]),(0,i.jsxs)(nt.PostHogProvider,{client:ne.default,children:[(0,i.jsx)(nr,{}),e]})}var ni=e.i(985956),nl=e.i(393784);function nd({children:e}){return(0,T.useServerInsertedHTML)(()=>{let e=nl.StyleSheet.getSheet();return e?.textContent?(0,m.createElement)("style",{id:"react-native-web-styles",dangerouslySetInnerHTML:{__html:e.textContent}}):null}),(0,i.jsx)(i.Fragment,{children:e})}function nc({children:e}){return(0,i.jsx)(i.Fragment,{children:e})}var nu=e.i(880222),n_=e.i(912598);function nm(){return"u">typeof window}function np(){return"production"}function nh(){return"development"===((nm()?window.vam:np())||"production")}function ng(e){return(0,m.useEffect)(()=>{var t;e.beforeSend&&(null==(t=window.va)||t.call(window,"beforeSend",e.beforeSend))},[e.beforeSend]),(0,m.useEffect)(()=>{!function(e={debug:!0}){var t;if(!nm())return;!function(e="auto"){if("auto"===e){window.vam=np();return}window.vam=e}(e.mode),window.va||(window.va=function(...e){(window.vaq=window.vaq||[]).push(e)}),e.beforeSend&&(null==(t=window.va)||t.call(window,"beforeSend",e.beforeSend));let n=e.scriptSrc?e.scriptSrc:nh()?"https://va.vercel-scripts.com/v1/script.debug.js":e.basePath?`${e.basePath}
68/insights/script.js`:"/_vercel/insights/script.js";if(document.head.querySelector(`script[src*="${n}"]`))return;let r=document.createElement("script");r.src=n,r.defer=!0,r.dataset.sdkn="@vercel/analytics"+(e.framework?`/${e.framework}`:""),r.dataset.sdkv="1.6.1",e.disableAutoTrack&&(r.dataset.disableAutoTrack="1"),e.endpoint?r.dataset.endpoint=e.endpoint:e.basePath&&(r.dataset.endpoint=`${e.basePath}/insights`),e.dsn&&(r.dataset.dsn=e.dsn),r.onerror=()=>{let e=nh()?"Please check if any ad blockers are enabled and try again.":"Be sure to enable Web Analytics for your project and deploy again. See https://vercel.com/docs/analytics/quickstart for more information.";console.log(`[Vercel Web Analytics] Failed to load script from ${n}. ${e}`)},nh()&&!1===e.debug&&(r.dataset.debug="false"),document.head.appendChild(r)}({framework:e.framework||"react",basePath:e.basePath??function(){if(void 0!==a.default&&void 0!==a.default.env)return a.default.env.REACT_APP_VERCEL_OBSERVABILITY_BASEPATH}(),...void 0!==e.route&&{disableAutoTrack:!0},...e})},[]),(0,m.useEffect)(()=>{e.route&&e.path&&function({route:e,path:t}){var n;null==(n=window.va)||n.call(window,"pageview",{route:e,path:t})}({route:e.route,path:e.path})},[e.route,e.path]),null}var nf=e.i(508734),ny=e.i(632781),nb=e.i(341987),nx=e.i(263676);let nv=!1;"u">typeof window&&(window.OneSignalDeferred=window.OneSignalDeferred||[],(o=document.createElement("script")).id="onesignal-sdk",o.defer=!0,o.src="https://cdn.onesignal.com/sdks/web/v16/OneSignalSDK.page.js",o.onerror=()=>{},document.head.appendChild(o));var nw=e.i(853138),nS=e.i(573474),nC=e.i(657688);e.i(402954);var nk=e.i(200039),nj=e.i(888840),nE=e.i(882792);function nN({isOpen:e,displayName:t,email:n,photoURL:r,onClose:s,onAccountDeleted:o,getAuthToken:a}){let l=(0,T.useRouter)(),d=(0,z.useMediaQuery)("(max-width: 768px)"),{toasts:c,removeToast:u,error:_,success:p}=(0,nk.useToast)(),[h,g]=(0,m.useState)(!1),[f,y]=(0,m.useState)(!1),[b,x]=(0,m.useState)(!1),v=t?.charAt(0)||n?.charAt(0)||"U",w=()=>{y(!1),x(!1),s()},S=async()=>{x(!0);try{let e=await a();if(!e){_("Authentication required. Please log in again."),x(!1);return}let t=await fetch((0,nE.getApiUrl)(t6.API_ENDPOINTS.V2.USERS.DELETE),{method:"DELETE",headers:{Authorization:`Bearer ${e}`,"Content-Type":"application/json"}});if(!t.ok){let e=await t.json().catch(()=>({})),n="string"==typeof e?.error?e.error:"Unknown error";_(`Failed to delete account: ${n}`),x(!1);return}await o(),p("Your account has been successfully deleted."),y(!1),s(),l.push("/login")}catch(e){_(`Failed to delete account: ${e instanceof Error?e.message:"Unknown error"}`)}finally{x(!1)}},C=(0,i.jsxs)("div",{className:"flex items-center justify-end py-4 px-2 gap-2",children:[(0,i.jsx)("button",{type:"button",onClick:()=>y(!1),disabled:b,className:"px-4 py-2 bg-[#F1F6F8] border border-[#0B4F7533] text-[#0B4F75] rounded-full hover:bg-gray-50 transition-colors text-sm font-medium disabled:opacity-50",children:"Cancel"}),(0,i.jsx)("button",{type:"button",onClick:S,disabled:b,className:"flex items-center gap-2 px-4 py-2 bg-[#FF5257] text-white rounded-full hover:bg-[#e64a4f] transition-colors text-sm font-medium disabled:opacity-50",children:b?(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(ny.Loader2,{size:16,className:"animate-spin"}),(0,i.jsx)("span",{children:"Deleting..."})]}):(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(nS.Trash2,{size:16}),(0,i.jsx)("span",{children:"Delete Account"})]})})]}),k=(0,i.jsxs)("div",{className:"flex items-center justify-end py-4 px-2 border-t border-gray-200 gap-2",children:[(0,i.jsx)("button",{type:"button",onClick:()=>y(!1),disabled:b,className:"px-4 py-2 bg-[#F1F6F8] border border-[#0B4F7533] text-[#0B4F75] rounded-full hover:bg-gray-50 transition-colors text-sm font-medium disabled:opacity-50",children:"Cancel"}),(0,i.jsx)("button",{type:"button",onClick:S,disabled:b,className:"flex items-center gap-2 px-4 py-2 bg-[#FF5257] text-white rounded-full hover:bg-[#e64a4f] transition-colors text-sm font-medium disabled:opacity-50",children:b?(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(ny.Loader2,{size:16,className:"animate-spin"}),(0,i.jsx)("span",{children:"Deleting..."})]}):(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(nS.Trash2,{size:16}),(0,i.jsx)("span",{children:"Delete Account"})]})})]}),j=(0,i.jsx)("div",{className:"flex items-center justify-end py-4 px-2",children:(0,i.jsx)("button",{type:"button",onClick:()=>y(!0),className:"text-sm text-[#FF5257] underline hover:text-[#e64a4f] transition-colors",children:"Delete Account"})}),E=(0,i.jsx)("div",{className:"flex items-center justify-end py-4 px-2 border-t border-gray-200",children:(0,i.jsx)("button",{type:"button",onClick:()=>y(!0),className:"text-sm text-[#FF5257] underline hover:text-[#e64a4f] transition-colors",children:"Delete Account"})}),N=(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)("div",{className:"flex items-center justify-between p-2 border-b border-gray-200",children:(0,i.jsx)("h2",{className:"text-xl font-semibold text-[#0B4F75]",children:"Delete Account"})}),(0,i.jsxs)("div",{className:"px-2 py-4 gap-4 flex flex-col",children:[(0,i.jsx)("div",{className:"flex justify-center",children:(0,i.jsx)(nw.AlertTriangle,{size:48,className:"text-[#FF5257]"})}),(0,i.jsx)("h3",{className:"text-lg font-semibold text-gray-900 text-center",children:"Are you sure you want to delete your account?"}),(0,i.jsx)("p",{className:"text-gray-600 text-center text-sm",children:"This action cannot be undone and will:"}),(0,i.jsxs)("ul",{className:"text-gray-600 text-sm space-y-1 list-disc list-inside",children:[(0,i.jsx)("li",{children:"Delete all your memories and conversations"}),(0,i.jsx)("li",{children:"Cancel any active calendar subscriptions"}),(0,i.jsx)("li",{children:"Remove all your personal data"}),(0,i.jsx)("li",{children:"Sign you out permanently"})]})]}),!d&&k]}),R=(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)("div",{className:"flex items-center p-2 border-b border-gray-200",children:(0,i.jsx)("h2",{className:"text-xl font-semibold text-[#0B4F75]",children:"Account"})}),(0,i.jsxs)("div",{className:"px-2 py-4 gap-6 flex flex-col",children:[(0,i.jsxs)("div",{className:"flex flex-col items-center gap-3",children:[r&&!h?(0,i.jsx)(nC.default,{src:r,alt:"Profile",width:80,height:80,className:"rounded-full object-cover",onError:()=>g(!0),referrerPolicy:"no-referrer",unoptimized:!0}):(0,i.jsx)("div",{className:"w-20 h-20 rounded-full bg-[#d9e2ec] text-[#0B4F75] flex items-center justify-center",children:(0,i.jsx)("span",{className:"text-3xl font-semibold uppercase",children:v})}),(0,i.jsx)("h2",{className:"text-xl font-medium text-gray-900",children:t||n})]}),(0,i.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,i.jsxs)("div",{className:"flex justify-between items-center",children:[(0,i.jsx)("span",{className:"text-sm font-medium text-gray-900",children:"Name:"}),(0,i.jsx)("span",{className:"text-sm text-gray-500 text-left",children:t||"-"})]}),(0,i.jsxs)("div",{className:"flex justify-between items-center",children:[(0,i.jsx)("span",{className:"text-sm font-medium text-gray-900",children:"Email:"}),(0,i.jsx)("span",{className:"text-sm text-gray-500 text-left",children:n})]})]})]}),!d&&E]}),A=f?N:R;return e?(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(nj.ToastContainer,{toasts:c,onRemoveToast:u}),d?(0,i.jsx)(B.BottomSheet,{open:e,onDismiss:w,footer:f?C:j,snapPoints:({maxHeight:e})=>.85*e,testID:"manage-account-modal-sheet",children:A}):(0,i.jsx)(B.Modal,{isOpen:e,onClose:w,size:"md",padding:!1,className:"max-w-[400px] p-2 gap-2 flex flex-col",dismissButtonProps:{size:20,"aria-label":"Close modal"},children:A})]}):null}var nT=e.i(71287),nR=e.i(40815),nA=e.i(811766),nI=e.i(187130);let nM=["mousedown","touchstart"];var nL=e.i(711241),nP=e.i(456420);let nD=(0,nP.default)("audio-lines",[["path",{d:"M2 10v3",key:"1fnikh"}],["path",{d:"M6 6v11",key:"11sgs0"}],["path",{d:"M10 3v18",key:"yhl04a"}],["path",{d:"M14 8v7",key:"3a1oy3"}],["path",{d:"M18 5v13",key:"123xd1"}],["path",{d:"M22 10v3",key:"154ddg"}]]),nO=(0,nP.default)("list-checks",[["path",{d:"M13 5h8",key:"a7qcls"}],["path",{d:"M13 12h8",key:"h98zly"}],["path",{d:"M13 19h8",key:"c3s6r1"}],["path",{d:"m3 17 2 2 4-4",key:"1jhpwq"}],["path",{d:"m3 7 2 2 4-4",key:"1obspn"}]]);
68var nF=e.i(638292),nB=e.i(566595),nz=e.i(819759),nY=e.i(522016);e.i(4069);var nH=e.i(485533),nU=e.i(109775);e.i(314424);var nX=e.i(585832);let nW=(0,nP.default)("panel-left-close",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M9 3v18",key:"fh3hqa"}],["path",{d:"m16 15-3-3 3-3",key:"14y99z"}]]),nQ=(0,m.forwardRef)(({value:e,onChange:t,placeholder:n="Search",className:r,onFocus:s,onBlur:o,showClearButton:a=!1,testId:l="search-input"},d)=>{let c=a&&e.length>0;return(0,i.jsxs)("div",{className:(0,tW.cn)("relative w-full",r),children:[(0,i.jsx)("input",{ref:d,type:"text",value:e,placeholder:n,onChange:e=>t(e.target.value),onFocus:s,onBlur:o,"data-testid":l,className:(0,tW.cn)("w-full h-[38px] px-4 pr-10 py-2","bg-white rounded-full","border border-[#0B4F7566]","placeholder-[#0B4F75CC] placeholder:font-medium","focus:outline-none focus:border-[#0B4F75]","transition-colors duration-300")}),(0,i.jsx)("div",{className:"absolute right-3 top-1/2 -translate-y-1/2 flex items-center pointer-events-none",children:c?(0,i.jsx)("button",{type:"button",onClick:()=>t(""),className:"pointer-events-auto text-[#0B4F75]/60 hover:text-[#0B4F75] transition-colors focus:outline-none focus-visible:ring-2 focus-visible:ring-[#0B4F75]/50 rounded-full","aria-label":"Clear search",children:(0,i.jsx)(nx.X,{size:16})}):(0,i.jsx)(nB.Search,{size:16,className:"text-[#0B4F75]/80","aria-hidden":"true"})})]})});nQ.displayName="SearchInput";let n$=({searchQuery:e,onSearchChange:t,searchPlaceholder:n,className:r,isExpanded:s,onExpandedChange:o,isMobile:a,ref:l})=>(0,i.jsxs)("div",{className:(0,tW.cn)("flex items-center",s?"gap-2 px-4 py-3.25":"justify-center px-2 py-6",r),children:[!a&&o&&(0,i.jsx)("button",{type:"button",onClick:()=>o?.(!s),className:"shrink-0 size-[38px] flex items-center justify-center rounded-lg hover:bg-[#F7F7FB] focus:outline-none focus-visible:ring-2 focus-visible:ring-[#0B4F75]/50","aria-label":s?"Collapse sidebar":"Expand sidebar",children:(0,i.jsx)(nW,{size:30,strokeWidth:1,className:"text-[#0B4F75]","aria-hidden":"true"})}),(0,i.jsx)(nQ,{ref:l,value:e,onChange:t,placeholder:n,showClearButton:!0,testId:"sidepanel-search-input",className:(0,tW.cn)("transition-opacity duration-100",s?"opacity-100":"opacity-0 pointer-events-none absolute")})]});function nG({photoURL:e,displayName:t,size:n=44,className:r}){let[s,o]=(0,m.useState)(!1),a=(t?.[0]||"U").toUpperCase(),l=!e||s;return(0,i.jsx)("div",{className:(0,tW.cn)("relative shrink-0 rounded-full bg-[#e5f9ff] overflow-hidden",r),style:{width:n,height:n},children:l?(0,i.jsx)("div",{className:"flex items-center justify-center size-full text-[#0B4F75] font-medium text-lg",children:a}):(0,i.jsx)("img",{src:e,alt:t||"User",width:n,height:n,className:"object-cover size-full",referrerPolicy:"no-referrer",onError:()=>o(!0)})})}n$.displayName="SidepanelHeader";let nV={backgroundImage:"linear-gradient(104deg, #0B4F75 2.26%, #1689C9 48%, #FF7400 96.81%)"};function nq({source:e,onClick:t,className:n=""}){return(0,i.jsx)(nY.default,{href:"/pricing",onClick:()=>{(0,t4.track)("UpgradeButtonClicked",{source:e}),t?.()},className:(0,tW.cn)("flex items-center justify-center px-3 py-1.5 h-7 rounded-[32px] whitespace-nowrap select-none shrink-0",n),style:nV,children:(0,i.jsx)("span",{className:"font-inter font-semibold text-[12px] text-white leading-[1.4]",children:"Upgrade"})})}var nJ=e.i(149882),nK=e.i(96315);(0,d.createModuleLogger)("sidepanel"),nJ.Calendar,nK.Mail;var nZ=e.i(379187),n0=e.i(447196),n1=e.i(546002),n5=e.i(706870),n2=e.i(744709);let n4=n2.spacing.xs,n3=n2.spacing.xs,n6={shadowColor:"#0B4F75",shadowOffset:{width:0,height:3},shadowOpacity:.12,shadowRadius:6,elevation:3};function n7({tabs:e,activeValue:t,onTabPress:n,height:r=32,radius:s=24,backgroundColor:o="#F6F6F6",borderColor:a="#C7D5E0",activeBorderColor:l="#588097",activeTextColor:d="#0B4F75",inactiveTextColor:c="#454652",shadowStyle:u=n6,containerStyle:_,tabStyle:p,activeTabStyle:h,labelStyle:g,activeLabelStyle:f}){let[y,b]=(0,m.useState)(0),x=(0,m.useMemo)(()=>e.findIndex(e=>e.value===t),[t,e]),v=(0,m.useMemo)(()=>new nZ.Animated.Value(0),[]),w=(0,m.useMemo)(()=>[n8.container,{borderColor:a,backgroundColor:o,borderRadius:s,padding:n3}
68,_].filter(Boolean),[o,a,_,s]),S=(0,m.useMemo)(()=>[n8.tab,{height:r,borderRadius:s},p].filter(Boolean),[r,s,p]),C=(0,m.useMemo)(()=>y&&0!==e.length?(y-2*n3-n4*Math.max(e.length-1,0))/e.length:0,[y,e.length]),k=(0,m.useCallback)(({nativeEvent:e})=>{let t=e.layout.width;b(e=>e===t?e:t)},[]);(0,m.useEffect)(()=>{C<=0||x<0||nZ.Animated.spring(v,{toValue:x*(C+n4),friction:12,tension:140,useNativeDriver:!1}).start()},[x,v,C]);let j=(0,m.useCallback)((e,t)=>()=>{t||n(e)},[n]);return(0,i.jsxs)(n1.View,{style:w,onLayout:k,children:[(0,i.jsx)(nZ.Animated.View,{style:[n8.activeIndicator,n8.activeIndicatorDisabled,{width:C,height:r,borderRadius:s,borderColor:l,transform:[{translateX:v}]},u,h].filter(Boolean)}),e.map(e=>{let n=e.value===t,r=[n8.label,{color:c},g,n?[n8.activeLabel,{color:d},f]:null].filter(Boolean);return(0,i.jsx)(n5.AnimatedPressable,{style:S,onPress:j(e.value,n),testID:e.testID,children:(0,i.jsx)(n0.Text,{style:r,children:e.label})},e.value)})]})}let n8=nl.StyleSheet.create({container:{flexDirection:"row",alignItems:"center",gap:n4,borderWidth:.5,position:"relative"},tab:{flex:1,alignItems:"center",justifyContent:"center",paddingHorizontal:14,zIndex:1},activeIndicator:{position:"absolute",top:n3,left:n3,backgroundColor:"#FFFFFF",borderWidth:.4,zIndex:0},activeIndicatorDisabled:{pointerEvents:"none"},label:{fontSize:16,fontWeight:"400",textAlign:"center",fontFamily:"Inter",lineHeight:16,letterSpacing:-.4},activeLabel:{fontWeight:"500",fontFamily:"Inter"}});function n9({activeTab:e,onTabChange:t,className:n}){return(0,i.jsx)("div",{className:(0,tW.cn)("m-4 md:m-6",n),"data-tabs-container":!0,children:(0,i.jsx)(n7,{tabs:[{label:"Notes",value:"memories",testID:"sidepanel-tab-notes"},{label:"Chats",value:"chats",testID:"sidepanel-tab-chats"}],activeValue:e,onTabPress:t,backgroundColor:"#F6F6F6",borderColor:"#C7D5E0",activeBorderColor:"transparent",activeTextColor:"#0B4F75",inactiveTextColor:"#6d95ac",containerStyle:{width:"100%",borderWidth:.5},activeTabStyle:{border:"0.4px solid transparent",backgroundImage:"linear-gradient(white, white), linear-gradient(223.37deg, rgba(88, 128, 151, 0.3) 29.86%, rgba(11, 79, 117, 0.3) 87.84%)",backgroundOrigin:"border-box",backgroundClip:"padding-box, border-box",boxShadow:"0 1px 2px 0 rgba(11, 79, 117, 0.10), 0 6px 12px 0 rgba(11, 79, 117, 0.03)"},shadowStyle:{}})})}var re=e.i(846932),rt=e.i(88653),rn=e.i(377833);function rr({formattedDate:e,isExpanded:t,onToggle:n,disableAnimation:r=!1}){let s=void 0!==n;return(0,i.jsxs)("button",{"data-date-header":!0,onClick:n,disabled:!s,className:`w-full text-left p-3 flex items-center justify-between gap-2 rounded-lg focus:outline-none focus-visible:ring-2 focus-visible:ring-[#0B4F75]/50 ${s?"hover:bg-[#F7F7FB] cursor-pointer transition-colors duration-200 ease-out":"cursor-default"}`,children:[(0,i.jsx)("span",{className:"text-[16px] font-semibold text-[#727588] capitalize truncate min-w-0",children:e}),(0,i.jsx)(re.motion.div,{initial:!1,animate:{rotate:180*!!t},transition:r?{duration:0}:{duration:.2,ease:"easeInOut"},className:"shrink-0",children:(0,i.jsx)(H.ChevronDown,{className:"h-6 w-6 text-[#727588]"})})]})}var rs=e.i(708448),ro=e.i(648119),ra=e.i(334780),ra=ra;let ri=(0,nP.default)("monitor",[["rect",{width:"20",height:"14",x:"2",y:"3",rx:"2",key:"48i651"}],["line",{x1:"8",x2:"16",y1:"21",y2:"21",key:"1svkeh"}],["line",{x1:"12",x2:"12",y1:"17",y2:"21",key:"vw1qmm"}]]),rl=(0,nP.default)("smartphone",[["rect",{width:"14",height:"20",x:"5",y:"2",rx:"2",ry:"2",key:"1yt0o3"}],["path",{d:"M12 18h.01",key:"mhygvu"}]]),rd=(0,nP.default)("watch",[["path",{d:"M12 10v2.2l1.6 1",key:"n3r21l"}],["path",{d:"m16.13 7.66-.81-4.05a2 2 0 0 0-2-1.61h-2.68a2 2 0 0 0-2 1.61l-.78 4.05",key:"18k57s"}],["path",{d:"m7.88 16.36.8 4a2 2 0 0 0 2 1.61h2.72a2 2 0 0 0 2-1.61l.81-4.05",key:"16ny36"}],["circle",{cx:"12",cy:"12",r:"6",key:"1vlfrh"}]]);function rc({size:e=20,className:t,strokeWidth:n=2}){return(0,i.jsxs)("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:n,strokeLinecap:"round",strokeLinejoin:"round",xmlns:"http://www.w3.org/2000/svg",className:t,"aria-hidden":"true",children:[(0,i.jsx)("circle",{cx:"12",cy:"12",r:"10"}),(0,i.jsx)("circle",{cx:"12",cy:"12",r:"4"}),(0,i.jsx)("line",{x1:"21.17",y1:"8",x2:"12",y2:"8"}),(0,i.jsx)("line",{x1:"3.95",y1:"6.06",x2:"8.54",y2:"14"}),(0,i.jsx)("line",{x1:"10.88",y1:"21.94",x2:"15.46",y2:"14"})]})}let ru={match:"text-gray-700",nonMatch:"text-gray-700/60"},r_={match:"text-[#0B4F75] font-semibold",nonMatch:"text-[#0B4F75]/70"};function rm(e,t,n="text-gray-700",r="text-gray-700/60"){if(!t.trim())return e;let s=t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),o=RegExp(`(${s})`,"gi");return e.split(o).map((e,t)=>RegExp(`^${s}$`,"i").test(e)?(0,i.jsx)("span",{className:n,children:e},t):(0,i.jsx)("span",{className:r,children:e},t))}let rp=e=>{let t=e.reduce((e,t)=>
68{let n=new Date(t.start_time||t.createdAt);if(isNaN(n.getTime()))return e;let r=n.getFullYear(),s=(n.getMonth()+1).toString().padStart(2,"0"),o=n.getDate().toString().padStart(2,"0"),a=`${r}-${s}-${o}`;return e[a]||(e[a]=[]),e[a].push(t),e},{});return Object.keys(t).sort((e,t)=>new Date(t).getTime()-new Date(e).getTime()).map(e=>({date:e,memories:t[e].sort((e,t)=>{let n=new Date(e.start_time||e.createdAt).getTime();return new Date(t.start_time||t.createdAt).getTime()-n})}))},rh=e=>Object.entries(e.reduce((e,t)=>{let n=new Date(t.created_at);if(isNaN(n.getTime()))return e;let r=n.getFullYear(),s=(n.getMonth()+1).toString().padStart(2,"0"),o=n.getDate().toString().padStart(2,"0"),a=`${r}-${s}-${o}`;return e[a]||(e[a]=[]),e[a].push(t),e},{})).map(([e,t])=>({date:e,sessions:t.sort((e,t)=>new Date(t.created_at).getTime()-new Date(e.created_at).getTime())})).sort((e,t)=>new Date(t.date).getTime()-new Date(e.date).getTime()),rg=e=>{let[t,n,r]=e.split("-").map(Number),s=new Date(t,n-1,r),o=new Date,a=new Date;return(a.setDate(o.getDate()-1),s.toDateString()===o.toDateString())?"Today":s.toDateString()===a.toDateString()?"Yesterday":s.toLocaleDateString("en-US",{year:"numeric",month:"long",day:"numeric"})},rf=(e,t)=>{let n=(e=>{let t=e.toLowerCase().trim(),n=new Date().getFullYear(),r=t.match(/\b(20\d{2})\b/);if(r)return{type:"year",year:parseInt(r[1])};for(let[e,r]of Object.entries({january:0,jan:0,february:1,feb:1,march:2,mar:2,april:3,apr:3,may:4,june:5,jun:5,july:6,jul:6,august:7,aug:7,september:8,sep:8,sept:8,october:9,oct:9,november:10,nov:10,december:11,dec:11}))if(t===e){let e=t.match(/\b(20\d{2})\b/);return{type:"month",month:r,year:e?parseInt(e[1]):n}}let s=t.match(/\b(\d{1,2})[-\/](\d{4})\b/);if(s){let e=parseInt(s[1])-1,t=parseInt(s[2]);if(e>=0&&e<=11)return{type:"month",month:e,year:t}}let o=[/\b(\d{1,2})[-\/](\d{1,2})[-\/](\d{4})\b/,/\b(\d{4})[-\/](\d{1,2})[-\/](\d{1,2})\b/];for(let e=0;e<o.length;e++){let n=t.match(o[e]);if(n){let t,r,s;if(0===e?(r=parseInt(n[1])-1,s=parseInt(n[2]),t=parseInt(n[3])):(t=parseInt(n[1]),r=parseInt(n[2])-1,s=parseInt(n[3])),r>=0&&r<=11&&s>=1&&s<=31)return{type:"date",year:t,month:r,day:s}}}return null})(t);if(n){let[t,r,s]=e.split("-").map(Number);switch(n.type){case"year":return t===n.year;case"month":return t===n.year&&r-1===n.month;case"date":return t===n.year&&r-1===n.month&&s===n.day;default:return!1}}return((e,t)=>{let n=t.toLowerCase().trim();if(0===n.length)return!1;let[r,s,o]=e.split("-").map(Number),a=new Date(r,s-1,o),i=a.toLocaleDateString("en-US",{month:"long"}).toLowerCase(),l=a.toLocaleDateString("en-US",{month:"short"}).toLowerCase();return i.startsWith(n)||l.startsWith(n)})(e,t)},ry=e=>{let t=e.title?.trim();return t?t.length>50?`${t.substring(0,50)}...`:t:"Untitled Chat"},rb=(e,t)=>""===t.trim()?e:e.map(e=>{if(rf(e.date,t))return e;let n=e.sessions.filter(e=>ry(e).toLowerCase().includes(t.toLowerCase()));return{...e,sessions:n}}).filter(e=>e.sessions.length>0),rx=e=>{if(!e)return"0m";let t=Math.floor(e/3600),n=Math.floor(e%3600/60),r=Math.floor(e%60);return t>0?`${t}h ${n}m`:n>0?`${n}m ${r}s`:`${r}s`},rv=e=>new Date(e).toLocaleTimeString("en-US",{hour:"numeric",minute:"2-digit",hour12:!0}).replace(/\s/g,"");function rw({memory:e,isSelected:t,searchQuery:n,index:r,disableAnimation:s=!1,onClick:o,onDelete:a,isMobile:l=!1,isSidepanelExpanded:d=!0}){let c,[u,_]=(0,m.useState)(!1),[p,h]=(0,m.useState)(!1),[g,f]=(0,m.useState)(!1),[y,b]=(0,m.useState)(!1),x=(0,m.useRef)(null),v=(0,m.useRef)(null),w=e.hasAudio||e.metadata?.isAudioTranscribe,S=n.trim().length>0,C="complete"!==e.lifecycle_status||!a;(0,m.useEffect)(()=>()=>{x.current&&(clearTimeout(x.current),x.current=null),v.current&&(clearTimeout(v.current),v.current=null)},[]);let[k,j]=(0,m.useState)(d);d!==k&&(j(d),!d&&p&&h(!1));let E=(0,m.useCallback)(()=>{l&&(v.current&&(clearTimeout(v.current),v.current=null),x.current&&(clearTimeout(x.current),x.current=null),x.current=setTimeout(()=>{b(!0),h(!0)},500))},[l]),N=(0,m.useCallback)(()=>{x.current&&(clearTimeout(x.current),x.current=null),v.current&&(clearTimeout(v.current),v.current=null),v.current=setTimeout(()=>{b(!1),v.current=null},100)},[]),T=(0,m.useCallback)(()=>{x.current&&(clearTimeout(x.current),x.current=null)},[]),R=(0,m.useCallback)(()=>{y||o()},[y,o]),A=function(e){switch(e?.toLowerCase()){case"iphone":case"android":return rl;case"mac":return ri;case"apple_watch":return rd;case"chrome_extension":return rc;default:return ra.default}}(e.metadata?.deviceType),I=[{id:"delete",label:"Delete",icon:(0,i.jsx)(nS.Trash2,{size:16}),onClick:()=>{C||a(e.id)},disabled:C}];return(0,i.jsx)(re.motion.li,{"data-note-item":!0,initial:s?{x:0,opacity:1}:{x:-10,opacity:0}
68,animate:{x:0,opacity:1},transition:s?{duration:0}:{delay:.05*r,duration:.2},className:`cursor-pointer rounded-lg select-none relative overflow-hidden ${S?"mb-0":"mb-1"} ${t?"bg-[#EEF7FB]":u||p?"bg-[#F7F7FB]":""} transition-colors duration-200 ease-out`,onMouseEnter:()=>_(!0),onMouseLeave:()=>!p&&_(!1),onClick:R,onTouchStart:E,onTouchEnd:N,onTouchMove:T,children:(0,i.jsxs)("div",{className:"relative flex items-start gap-3 p-3",children:[(0,i.jsx)("div",{className:`shrink-0 flex items-center justify-center rounded-[10px] size-10 transition-colors duration-200 ease-out ${t||u||p?"":"bg-[#F7F7FB]"}`,children:(0,i.jsx)(A,{size:20,className:t?"text-[#54849E]":"text-[#0B4F75]"})}),(0,i.jsxs)("div",{className:"flex flex-col items-start gap-2 flex-1 min-w-0 overflow-hidden",children:[(0,i.jsxs)("div",{className:"flex items-center justify-between w-full gap-2 min-w-0",children:[(0,i.jsx)("h3",{className:"font-medium truncate text-sm flex-1 min-w-0 text-[#0B4F75]",children:S?(c=t?r_:ru,rm(e.title,n,c.match,c.nonMatch)):e.title}),(0,i.jsx)("div",{className:"flex items-center gap-1 shrink-0",children:(0,i.jsx)("div",{onClick:e=>e.stopPropagation(),onMouseEnter:e=>{e.stopPropagation(),_(!1),f(!0)},onMouseLeave:e=>{e.stopPropagation(),_(!0),f(!1)},className:"text-[#0B4F75]",children:(0,i.jsx)(rs.DropdownMenu,{items:I,trigger:(0,i.jsx)("button",{type:"button",className:`p-1 rounded-full hover:bg-black/10 focus:outline-none focus-visible:ring-2 focus-visible:ring-[#0B4F75]/50 focus-visible:ring-offset-1 focus-visible:opacity-100 transition-opacity duration-150 ${l||u||p||g?"opacity-100":"opacity-0"}`,"aria-label":"More options",children:(0,i.jsx)(ro.MoreHorizontal,{size:16})}),onSelect:e=>e.onClick(),getItemKey:e=>e.id,getItemDisplay:e=>e.label,getItemIcon:e=>e.icon,getItemDisabled:e=>e.disabled??!1,getItemClassName:(e,t,n)=>`text-[#DF4131] rounded-lg ${n?"opacity-50 cursor-not-allowed":"hover:!bg-[#CB00001A]"}`,onOpenChange:e=>{h(e),e||_(!1)},usePortal:!0,contentClassName:"bg-white border border-gray-200 rounded-2xl shadow-lg p-1 z-[9999] min-w-[120px]! w-auto! max-h-none!"})})})]}),(0,i.jsxs)("p",{className:"text-xs text-[#727588] flex items-center",children:[(0,i.jsx)("span",{className:"truncate",children:rv(e.start_time||e.createdAt)}),(0,i.jsx)("span",{className:"opacity-60 mx-1",children:"·"}),(0,i.jsx)("span",{className:"truncate",children:rx(e.duration)}),w&&(0,i.jsx)(nD,{size:16,strokeWidth:1.5,className:"text-[#727588] shrink-0 ml-1"})]})]})]})})}let rS=(0,nP.default)("message-square-text",[["path",{d:"M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z",key:"18887p"}],["path",{d:"M7 11h10",key:"1twpyw"}],["path",{d:"M7 15h6",key:"d9of3u"}],["path",{d:"M7 7h8",key:"af5zfr"}]]);function rC({session:e,isSelected:t,searchQuery:n="",index:r,disableAnimation:s=!1,isMobile:o=!1,onClick:a,onDelete:l,isSidepanelExpanded:d=!0}){let c,[u,_]=(0,m.useState)(!1),[p,h]=(0,m.useState)(!1),[g,f]=(0,m.useState)(!1),[y,b]=(0,m.useState)(!1),x=(0,m.useRef)(null),v=n.trim().length>0,w=ry(e),[S,C]=(0,m.useState)(d);d!==S&&(C(d),!d&&p&&h(!1));let k=(0,m.useCallback)(()=>{o&&(x.current=setTimeout(()=>{b(!0),h(!0)},500))},[o]),j=(0,m.useCallback)(()=>{x.current&&(clearTimeout(x.current),x.current=null),setTimeout(()=>b(!1),100)},[]),E=(0,m.useCallback)(()=>{x.current&&(clearTimeout(x.current),x.current=null)},[]),N=(0,m.useCallback)(()=>{y||a()},[y,a]),T=[{id:"delete",label:"Delete",icon:(0,i.jsx)(nS.Trash2,{size:16}),onClick:()=>l?.(e.session_id)}];return(0,i.jsx)(re.motion.li,{"data-chat-item":!0,initial:s?{x:0,opacity:1}:{x:-10,opacity:0},animate:{x:0,opacity:1},transition:s?{duration:0}:{delay:.05*r,duration:.2},className:`cursor-pointer rounded-lg select-none relative overflow-hidden ${v?"mb-0":"mb-1"} ${t?"bg-[#EEF7FB]":u||p?"bg-[#F7F7FB]":""} transition-colors duration-200 ease-out`,onClick:N,onMouseEnter:()=>_(!0),onMouseLeave:()=>!p&&_(!1),onTouchStart:k,onTouchEnd:j,onTouchMove:E,children:(0,i.jsxs)("div",{className:"relative flex items-start gap-3 p-3",children:[(0,i.jsx)("div",{className:`shrink-0 flex items-center justify-center rounded-[10px] size-10 transition-colors duration-200 ease-out ${t||u||p?"":"bg-[#F7F7FB]"}`,children:(0,i.jsx)("div",{className:t?"text-[#54849E]":"text-[#0B4F75]",children:(0,i.jsx)(rS,{size:20,strokeWidth:2})})}),(0,i.jsxs)("div",{className:"flex flex-col items-start gap-2 flex-1 min-w-0 overflow-hidden",children:[(0,i.jsxs)("div",{className:"flex items-center justify-between w-full gap-2 min-w-0",children:[(0,i.jsx)("h3",{className:"font-medium truncate text-sm flex-1 min-w-0 text-[#0B4F75]",children:v?rm(w,n,(c=t?r_:ru).match,c.nonMatch):w}),(0,i.jsx)("div",{className:"flex items-center gap-1 shrink-0",children:(0,i.jsx)("div",{onClick:e=>e.stopPropagation(),onMouseEnter:e=>{e.stopPropagation(),_(!1),f(!0)},onMouseLeave:e=>{e.stopPropagation(),_(!0),f(!1)},className:"text-[#0B4F75]",children:(0,i.jsx)(rs.DropdownMenu,{items:T,trigger:(0,i.jsx)("button",{type:"button",className:`p-1 rounded-full hover:bg-black/10 focus:outline-none focus-visible:ring-2 focus-visible:ring-[#0B4F75]/50 focus-visible:ring-offset-1 focus-visible:opacity-100 transition-opacity duration-150 ${o||u||p||g?"opacity-100":"opacity-0"}`,"aria-label":"More options",children:(0,i.jsx)(ro.MoreHorizontal,{size:16})}),onSelect:e=>e.onClick(),getItemKey:e=>e.id,getItemDisplay:e=>e.label,getItemIcon:e=>e.icon,getItemClassName:()=>"text-[#DF4131] hover:!bg-[#CB00001A] rounded-lg",onOpenChange:e=>{h(e),e||_(!1)},usePortal:!0,contentClassName:"bg-white border border-gray-200 rounded-2xl shadow-lg p-1 z-[9999] min-w-[120px]! w-auto! max-h-none!"})})})]}),(0,i.jsx)("p",{className:"text-xs truncate text-[#727588]",children:rv(e.created_at)})]})]})})}function rk(){return(0,i.jsx)("div",{className:"space-y-4 px-6",children:[1,2,3].map(e=>(0,i.jsxs)("div",{className:"space-y-2",children:[(0,i.jsx)("div",{className:"h-6 w-32 animate-pulse rounded bg-gray-200/50"}),(0,i.jsx)("div",{className:"space-y-1 pl-2 border-l border-gray-200",children:[1,2,3].map(t=>(0,i.jsxs)("div",{className:"rounded-lg bg-gray-100/50 p-3 space-y-2 animate-pulse",style:{animationDelay:`${(e-1)*300+100*t}ms`},children:[(0,i.jsx)("div",{className:"h-4 w-3/4 rounded bg-gray-200/70"}
68),(0,i.jsx)("div",{className:"h-3 w-1/2 rounded bg-gray-200/50"})]},t))})]},e))})}var rj=e.i(437902);function rE({message:e}){return(0,i.jsx)("div",{className:"p-4 text-red-600 text-center whitespace-nowrap",children:e??"Unable to search memories."})}function rN(){return(0,i.jsxs)("div",{className:"flex flex-col items-center justify-center min-h-[50vh] pt-[15vh]",children:[(0,i.jsx)("p",{className:"text-[#0B4F75] font-medium text-center",children:"Couldn't spot any notes with that term"}),(0,i.jsx)("p",{className:"text-[#54849E] mt-1 text-center",children:"Want to try a different one?"})]})}function rT(){return(0,i.jsxs)("div",{className:"p-4 text-gray-500 text-center w-[90%] mx-auto flex flex-col gap-4",children:[(0,i.jsx)("p",{children:"No memories found."}),(0,i.jsx)("p",{children:"Download TwinMind to start capturing your memories!"})]})}function rR({index:e}){let t=["w-4/5","w-3/4","w-2/3","w-5/6","w-3/5"],n=["w-1/3","w-2/5","w-1/4","w-1/3","w-2/5"];return(0,i.jsxs)("li",{style:{animationDelay:`${50*e}ms`,animationFillMode:"backwards"},className:"jsx-ecc5db921110bff rounded-lg mb-1 px-2 py-1 animate-[fadeSlideIn_0.3s_ease-out]",children:[(0,i.jsxs)("div",{className:"jsx-ecc5db921110bff flex flex-col items-start gap-2",children:[(0,i.jsx)("div",{className:"jsx-ecc5db921110bff flex items-center justify-between w-full",children:(0,i.jsx)("div",{"data-skeleton-shimmer":"true",style:{background:"linear-gradient(90deg, rgba(11, 79, 117, 0.08) 0%, rgba(11, 79, 117, 0.15) 50%, rgba(11, 79, 117, 0.08) 100%)",backgroundSize:"200% 100%",animation:"shimmer 1.5s ease-in-out infinite"},className:`jsx-ecc5db921110bff h-5 rounded ${t[e%t.length]}`})}),(0,i.jsx)("div",{"data-skeleton-shimmer":"true",style:{background:"linear-gradient(90deg, rgba(11, 79, 117, 0.08) 0%, rgba(11, 79, 117, 0.15) 50%, rgba(11, 79, 117, 0.08) 100%)",backgroundSize:"200% 100%",animation:"shimmer 1.5s ease-in-out infinite",animationDelay:"0.1s"},className:`jsx-ecc5db921110bff h-3 rounded ${n[e%n.length]}`})]}),(0,i.jsx)(rj.default,{id:"ecc5db921110bff",children:"@keyframes shimmer{0%{background-position:200% 0}to{background-position:-200% 0}}@keyframes fadeSlideIn{0%{opacity:0;transform:translate(-8px)}to{opacity:1;transform:translate(0)}}"})]})}function rA(){return(0,i.jsx)("ul",{className:"border-l",children:Array.from({length:5}).map((e,t)=>(0,i.jsx)(rR,{index:t},t))})}function rI(){return(0,i.jsx)("ul",{className:"border-l",children:Array.from({length:5}).map((e,t)=>(0,i.jsx)(rR,{index:t},t))})}function rM(){return(0,i.jsxs)("div",{className:"flex flex-col items-center justify-center min-h-[50vh] pt-[15vh]",children:[(0,i.jsx)("p",{className:"text-[#0B4F75] font-medium text-center",children:"Couldn't spot any chats with that term"}),(0,i.jsx)("p",{className:"text-[#54849E] mt-1 text-center",children:"Want to try a different one?"})]})}function rL(){return(0,i.jsxs)("div",{className:"p-4 text-gray-500 text-center w-[90%] mx-auto flex flex-col gap-4",children:[(0,i.jsx)("p",{children:"No chat history found."}),(0,i.jsx)("p",{children:"Start a new conversation to see your chat history here!"})]})}function rP({uuid:e,filteredMemories:t,searchQuery:n,searchStatus:r,searchError:s,memoryError:o=null,onRetryFetch:a,isLoading:l,isSmallScreen:d,setIsSidebarOpen:c,expandedGroups:u,toggleGroup:_,isTabSwitching:m,onDeleteMemory:p,noResultsAtQueryLength:h=null,isSidepanelExpanded:g=!0,onCloseSidepanel:f}){let y=(0,rn.useGuardedRouter)(),{setSelectedMemoryId:b}=O(),x=n.trim(),v="loading"===r&&(null===h||x.length<h);return x||!o||l||0!==t.length?x&&v&&0===t.length?(0,i.jsx)(rI,{}):t.length>0?(0,i.jsx)("ul",{children:t.map(({date:t,memories:r})=>(0,i.jsxs)("li",{className:"mb-4",children:[(0,i.jsx)(rr,{date:t,formattedDate:rg(t),isExpanded:!!n.trim()||u[t],onToggle:n.trim()?void 0:()=>{_(t),(0,t4.track)("webapp_memory_date_group_clicked",{memory_group_date:t})},disableAnimation:m||!!n.trim()}),(0,i.jsx)(rt.AnimatePresence,{initial:!1,children:(u[t]||n.trim())&&(0,i.jsx)(re.motion.div,{initial:m||n.trim()?{height:"auto",opacity:1}:{height:0,opacity:0},animate:{height:"auto",opacity:1},exit:m||n.trim()?{height:"auto",opacity:1}:{height:0,opacity:0}
68,transition:m||n.trim()?{duration:0}:{duration:.3,ease:"easeInOut",opacity:{duration:.2}},className:"overflow-hidden",children:(0,i.jsx)("ul",{className:"mt-1",children:r.map((t,r)=>(0,i.jsx)(rw,{memory:t,isSelected:t.id===e,searchQuery:n,index:r,disableAnimation:m,isMobile:d,isSidepanelExpanded:g,onClick:()=>{b(t.id),y.push(`/m/${t.id}`),d?c?.(!1):f?.(),(0,t4.track)("MemoryCardClicked",{meeting_uuid:t.id,meeting_title:t.title,memory_owner_name:t.summary_owner,page_name:"sidepanel"})},onDelete:p?()=>p(t.id,t.title):void 0},t.id))})})})]},t))}):x?v?(0,i.jsx)(rI,{}):"error"===r?(0,i.jsx)(rE,{message:s}):(0,i.jsx)(rN,{}):l?(0,i.jsx)(rk,{}):(0,i.jsx)(rT,{}):(0,i.jsxs)("div",{className:"p-4 text-center",children:[(0,i.jsx)("p",{className:"text-sm text-red-600",children:o}),a?(0,i.jsx)("button",{type:"button",className:"mt-3 inline-flex items-center justify-center rounded-md border border-gray-200 bg-white px-3 py-1.5 text-sm font-medium text-gray-900 hover:bg-gray-50",onClick:a,children:"Retry"}):null]})}function rD({uuid:e,filteredChatSessions:t,searchQuery:n,chatSearchStatus:r,isLoadingChats:s,chatError:o=null,onRetryFetch:a,isSmallScreen:l,setIsSidebarOpen:d,expandedGroups:c,toggleGroup:u,isTabSwitching:_,noChatResultsAtQueryLength:m=null,isSidepanelExpanded:p=!0,onDeleteChat:h,onCloseSidepanel:g}){let f=(0,rn.useGuardedRouter)(),{setSelectedChatId:y}=O(),b=n.trim(),x="loading"===r&&(null===m||b.length<m);return b&&x&&0===t.length?(0,i.jsx)(rA,{}):t.length>0?(0,i.jsx)("ul",{children:t.map(({date:t,sessions:r})=>(0,i.jsxs)("li",{className:"mb-4",children:[(0,i.jsx)(rr,{date:t,formattedDate:rg(t),isExpanded:!!n.trim()||c[t],onToggle:n.trim()?void 0:()=>{u(t),(0,t4.track)("webapp_chat_date_group_clicked",{chat_group_date:t})},disableAnimation:_||!!n.trim()}),(0,i.jsx)(rt.AnimatePresence,{initial:!1,children:(c[t]||n.trim())&&(0,i.jsx)(re.motion.div,{initial:_||n.trim()?{height:"auto",opacity:1}:{height:0,opacity:0},animate:{height:"auto",opacity:1},exit:_||n.trim()?{height:"auto",opacity:1}:{height:0,opacity:0},transition:_||n.trim()?{duration:0}:{duration:.3,ease:"easeInOut",opacity:{duration:.2}},className:"overflow-hidden",children:(0,i.jsx)("ul",{className:"mt-1",children:r.map((t,r)=>(0,i.jsx)(rC,{session:t,isSelected:t.session_id===e,searchQuery:n,index:r,disableAnimation:_,isMobile:l,isSidepanelExpanded:p,onClick:()=>
68{y(t.session_id),f.push(`/c/${t.session_id}`),l?d?.(!1):g?.(),(0,t4.track)("webapp_chat_session_clicked",{session_id:t.session_id,chat_title:ry(t)})},onDelete:h?e=>{h(e,ry(t))}:void 0},t.session_id))})})})]},t))}):b?x?(0,i.jsx)(rA,{}):(0,i.jsx)(rM,{}):s?(0,i.jsx)(rk,{}):o?(0,i.jsxs)("div",{className:"p-4 text-center",children:[(0,i.jsx)("p",{className:"text-sm text-red-600",children:o}),a?(0,i.jsx)("button",{type:"button",className:"mt-3 inline-flex items-center justify-center rounded-md border border-gray-200 bg-white px-3 py-1.5 text-sm font-medium text-gray-900 hover:bg-gray-50",onClick:a,children:"Retry"}):null]}):(0,i.jsx)(rL,{})}var rO=e.i(736796),rF=e.i(539752),rB=m;class rz extends rB.Component{state={hasError:!1};static getDerivedStateFromError(){return{hasError:!0}}componentDidCatch(e,t){d.logger.error({error:e.message,stack:e.stack,componentStack:t.componentStack},"[SidepanelErrorBoundary] Caught error")}handleReload=()=>{window.location.reload()};render(){return this.state.hasError?(0,i.jsx)("div",{className:"h-full w-full p-4 flex items-center justify-center",children:(0,i.jsxs)("div",{className:"w-full max-w-sm text-center",children:[(0,i.jsx)("h2",{className:"text-sm font-semibold text-gray-900",children:"Sidebar crashed"}),(0,i.jsx)("p",{className:"mt-1 text-sm text-gray-600",children:"Something went wrong in the sidebar. Reload to continue."}),(0,i.jsx)("button",{type:"button",className:"mt-3 inline-flex items-center justify-center rounded-md border border-gray-200 bg-white px-3 py-1.5 text-sm font-medium text-gray-900 hover:bg-gray-50",onClick:this.handleReload,children:"Reload"})]})}):this.props.children}}e.i(353872);var rY=e.i(300286),rH=e.i(248425),rU=e.i(296626),rX=e.i(30030),rW=e.i(820783),rQ=e.i(30207),r$=m.createContext(void 0),rG=e.i(934620),rV=e.i(981140),rq="ScrollArea",[rJ,rK]=(0,rX.createContextScope)(rq),[rZ,r0]=rJ(rq),r1=m.forwardRef((e,t)=>{let n,{__scopeScrollArea:r,type:s="hover",dir:o,scrollHideDelay:a=600,...l}=e,[d,c]=m.useState(null),[u,_]=m.useState(null),[p,h]=m.useState(null),[g,f]=m.useState(null),[y,b]=m.useState(null),[x,v]=m.useState(0),[w,S]=m.useState(0),[C,k]=m.useState(!1),[j,E]=m.useState(!1),N=(0,rW.useComposedRefs)(t,e=>c(e)),T=(n=m.useContext(r$),o||n||"ltr");return(0,i.jsx)(rZ,{scope:r,type:s,dir:T,scrollHideDelay:a,scrollArea:d,viewport:u,onViewportChange:_,content:p,onContentChange:h,scrollbarX:g,onScrollbarXChange:f,scrollbarXEnabled:C,onScrollbarXEnabledChange:k,scrollbarY:y,onScrollbarYChange:b,scrollbarYEnabled:j,onScrollbarYEnabledChange:E,onCornerWidthChange:v,onCornerHeightChange:S,children:(0,i.jsx)(rH.Primitive.div,{dir:T,...l,ref:N,style:{position:"relative","--radix-scroll-area-corner-width":x+"px","--radix-scroll-area-corner-height":w+"px",...e.style}})})});r1.displayName=rq;var r5="ScrollAreaViewport",r2=m.forwardRef((e,t)=>{let{__scopeScrollArea:n,children:r,nonce:s,...o}=e,a=r0(r5,n),l=m.useRef(null),d=(0,rW.useComposedRefs)(t,l,a.onViewportChange);return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)("style",{dangerouslySetInnerHTML:{__html:"[data-radix-scroll-area-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-scroll-area-viewport]::-webkit-scrollbar{display:none}"},nonce:s}),(0,i.jsx)(rH.Primitive.div,{"data-radix-scroll-area-viewport":"",...o,ref:d,style:{overflowX:a.scrollbarXEnabled?"scroll":"hidden",overflowY:a.scrollbarYEnabled?"scroll":"hidden",...e.style},children:(0,i.jsx)("div",{ref:a.onContentChange,style:{minWidth:"100%",display:"table"},children:r})})]})});r2.displayName=r5;var r4="ScrollAreaScrollbar",r3=m.forwardRef((e,t)=>{let{forceMount:n,...r}=e,s=r0(r4,e.__scopeScrollArea),{onScrollbarXEnabledChange:o,onScrollbarYEnabledChange:a}=s,l="horizontal"===e.orientation;return m.useEffect(()=>(l?o(!0):a(!0),()=>{l?o(!1):a(!1)}),[l,o,a]),"hover"===s.type?(0,i.jsx)(r6,{...r,ref:t,forceMount:n}):"scroll"===s.type?(0,i.jsx)(r7,{...r,ref:t,forceMount:n}):"auto"===s.type?(0,i.jsx)(r8,{...r,ref:t,forceMount:n}):"always"===s.type?(0,i.jsx)(r9,{...r,ref:t}):null});r3.displayName=r4;var r6=m.forwardRef((e,t)=>
68{let{forceMount:n,...r}=e,s=r0(r4,e.__scopeScrollArea),[o,a]=m.useState(!1);return m.useEffect(()=>{let e=s.scrollArea,t=0;if(e){let n=()=>{window.clearTimeout(t),a(!0)},r=()=>{t=window.setTimeout(()=>a(!1),s.scrollHideDelay)};return e.addEventListener("pointerenter",n),e.addEventListener("pointerleave",r),()=>{window.clearTimeout(t),e.removeEventListener("pointerenter",n),e.removeEventListener("pointerleave",r)}}},[s.scrollArea,s.scrollHideDelay]),(0,i.jsx)(rU.Presence,{present:n||o,children:(0,i.jsx)(r8,{"data-state":o?"visible":"hidden",...r,ref:t})})}),r7=m.forwardRef((e,t)=>{var n;let{forceMount:r,...s}=e,o=r0(r4,e.__scopeScrollArea),a="horizontal"===e.orientation,l=sf(()=>c("SCROLL_END"),100),[d,c]=(n={hidden:{SCROLL:"scrolling"},scrolling:{SCROLL_END:"idle",POINTER_ENTER:"interacting"},interacting:{SCROLL:"interacting",POINTER_LEAVE:"idle"},idle:{HIDE:"hidden",SCROLL:"scrolling",POINTER_ENTER:"interacting"}},m.useReducer((e,t)=>n[e][t]??e,"hidden"));return m.useEffect(()=>{if("idle"===d){let e=window.setTimeout(()=>c("HIDE"),o.scrollHideDelay);return()=>window.clearTimeout(e)}},[d,o.scrollHideDelay,c]),m.useEffect(()=>{let e=o.viewport,t=a?"scrollLeft":"scrollTop";if(e){let n=e[t],r=()=>{let r=e[t];n!==r&&(c("SCROLL"),l()),n=r};return e.addEventListener("scroll",r),()=>e.removeEventListener("scroll",r)}},[o.viewport,a,c,l]),(0,i.jsx)(rU.Presence,{present:r||"hidden"!==d,children:(0,i.jsx)(r9,{"data-state":"hidden"===d?"hidden":"visible",...s,ref:t,onPointerEnter:(0,rV.composeEventHandlers)(e.onPointerEnter,()=>c("POINTER_ENTER")),onPointerLeave:(0,rV.composeEventHandlers)(e.onPointerLeave,()=>c("POINTER_LEAVE"))})})}),r8=m.forwardRef((e,t)=>{let n=r0(r4,e.__scopeScrollArea),{forceMount:r,...s}=e,[o,a]=m.useState(!1),l="horizontal"===e.orientation,d=sf(()=>{if(n.viewport){let e=n.viewport.offsetWidth<n.viewport.scrollWidth,t=n.viewport.offsetHeight<n.viewport.scrollHeight;a(l?e:t)}},10);return sy(n.viewport,d),sy(n.content,d),(0,i.jsx)(rU.Presence,{present:r||o,children:(0,i.jsx)(r9,{"data-state":o?"visible":"hidden",...s,ref:t})})}),r9=m.forwardRef((e,t)=>{let{orientation:n="vertical",...r}=e,s=r0(r4,e.__scopeScrollArea),o=m.useRef(null),a=m.useRef(0),[l,d]=m.useState({content:0,viewport:0,scrollbar:{size:0,paddingStart:0,paddingEnd:0}}),c=s_(l.viewport,l.content),u={...r,sizes:l,onSizesChange:d,hasThumb:!!(c>0&&c<1),onThumbChange:e=>o.current=e,onThumbPointerUp:()=>a.current=0,onThumbPointerDown:e=>a.current=e};function _(e,t){return function(e,t,n,r="ltr"){let s=sm(n),o=t||s/2,a=n.scrollbar.paddingStart+o,i=n.scrollbar.size-n.scrollbar.paddingEnd-(s-o),l=n.content-n.viewport;return sh([a,i],"ltr"===r?[0,l]:[-1*l,0])(e)}(e,a.current,l,t)}return"horizontal"===n?(0,i.jsx)(se,{...u,ref:t,onThumbPositionChange:()=>{if(s.viewport&&o.current){let e=sp(s.viewport.scrollLeft,l,s.dir);o.current.style.transform=`translate3d(${e}px, 0, 0)`}},onWheelScroll:e=>{s.viewport&&(s.viewport.scrollLeft=e)},onDragScroll:e=>{s.viewport&&(s.viewport.scrollLeft=_(e,s.dir))}}):"vertical"===n?(0,i.jsx)(st,{...u,ref:t,onThumbPositionChange:()=>{if(s.viewport&&o.current){let e=sp(s.viewport.scrollTop,l);o.current.style.transform=`translate3d(0, ${e}px, 0)`}},onWheelScroll:e=>{s.viewport&&(s.viewport.scrollTop=e)},onDragScroll:e=>{s.viewport&&(s.viewport.scrollTop=_(e))}}):null}),se=m.forwardRef((e,t)=>{let{sizes:n,onSizesChange:r,...s}=e,o=r0(r4,e.__scopeScrollArea),[a,l]=m.useState(),d=m.useRef(null),c=(0,rW.useComposedRefs)(t,d,o.onScrollbarXChange);return m.useEffect(()=>{d.current&&l(getComputedStyle(d.current))},[d]),(0,i.jsx)(ss,{"data-orientation":"horizontal",...s,ref:c,sizes:n,style:{bottom:0,left:"rtl"===o.dir?"var(--radix-scroll-area-corner-width)":0,right:"ltr"===o.dir?"var(--radix-scroll-area-corner-width)":0,"--radix-scroll-area-thumb-width":sm(n)+"px",...e.style},onThumbPointerDown:t=>e.onThumbPointerDown(t.x),onDragScroll:t=>e.onDragScroll(t.x),onWheelScroll:(t,n)=>{if(o.viewport){var r,s;let a=o.viewport.scrollLeft+t.deltaX;e.onWheelScroll(a),r=a,s=n,r>0&&r<s&&t.preventDefault()}},onResize:()=>{d.current&&o.viewport&&a&&r({content:o.viewport.scrollWidth,viewport:o.viewport.offsetWidth,scrollbar:{size:d.current.clientWidth,paddingStart:su(a.paddingLeft),paddingEnd:su(a.paddingRight)}})}})}),st=m.forwardRef((e,t)=>
68{let{sizes:n,onSizesChange:r,...s}=e,o=r0(r4,e.__scopeScrollArea),[a,l]=m.useState(),d=m.useRef(null),c=(0,rW.useComposedRefs)(t,d,o.onScrollbarYChange);return m.useEffect(()=>{d.current&&l(getComputedStyle(d.current))},[d]),(0,i.jsx)(ss,{"data-orientation":"vertical",...s,ref:c,sizes:n,style:{top:0,right:"ltr"===o.dir?0:void 0,left:"rtl"===o.dir?0:void 0,bottom:"var(--radix-scroll-area-corner-height)","--radix-scroll-area-thumb-height":sm(n)+"px",...e.style},onThumbPointerDown:t=>e.onThumbPointerDown(t.y),onDragScroll:t=>e.onDragScroll(t.y),onWheelScroll:(t,n)=>{if(o.viewport){var r,s;let a=o.viewport.scrollTop+t.deltaY;e.onWheelScroll(a),r=a,s=n,r>0&&r<s&&t.preventDefault()}},onResize:()=>{d.current&&o.viewport&&a&&r({content:o.viewport.scrollHeight,viewport:o.viewport.offsetHeight,scrollbar:{size:d.current.clientHeight,paddingStart:su(a.paddingTop),paddingEnd:su(a.paddingBottom)}})}})}),[sn,sr]=rJ(r4),ss=m.forwardRef((e,t)=>{let{__scopeScrollArea:n,sizes:r,hasThumb:s,onThumbChange:o,onThumbPointerUp:a,onThumbPointerDown:l,onThumbPositionChange:d,onDragScroll:c,onWheelScroll:u,onResize:_,...p}=e,h=r0(r4,n),[g,f]=m.useState(null),y=(0,rW.useComposedRefs)(t,e=>f(e)),b=m.useRef(null),x=m.useRef(""),v=h.viewport,w=r.content-r.viewport,S=(0,rQ.useCallbackRef)(u),C=(0,rQ.useCallbackRef)(d),k=sf(_,10);function j(e){b.current&&c({x:e.clientX-b.current.left,y:e.clientY-b.current.top})}return m.useEffect(()=>{let e=e=>{let t=e.target;g?.contains(t)&&S(e,w)};return document.addEventListener("wheel",e,{passive:!1}),()=>document.removeEventListener("wheel",e,{passive:!1})},[v,g,w,S]),m.useEffect(C,[r,C]),sy(g,k),sy(h.content,k),(0,i.jsx)(sn,{scope:n,scrollbar:g,hasThumb:s,onThumbChange:(0,rQ.useCallbackRef)(o),onThumbPointerUp:(0,rQ.useCallbackRef)(a),onThumbPositionChange:C,onThumbPointerDown:(0,rQ.useCallbackRef)(l),children:(0,i.jsx)(rH.Primitive.div,{...p,ref:y,style:{position:"absolute",...p.style},onPointerDown:(0,rV.composeEventHandlers)(e.onPointerDown,e=>{0===e.button&&(e.target.setPointerCapture(e.pointerId),b.current=g.getBoundingClientRect(),x.current=document.body.style.webkitUserSelect,document.body.style.webkitUserSelect="none",h.viewport&&(h.viewport.style.scrollBehavior="auto"),j(e))}),onPointerMove:(0,rV.composeEventHandlers)(e.onPointerMove,j),onPointerUp:(0,rV.composeEventHandlers)(e.onPointerUp,e=>{let t=e.target;t.hasPointerCapture(e.pointerId)&&t.releasePointerCapture(e.pointerId),document.body.style.webkitUserSelect=x.current,h.viewport&&(h.viewport.style.scrollBehavior=""),b.current=null})})})}),so="ScrollAreaThumb",sa=m.forwardRef((e,t)=>{let{forceMount:n,...r}=e,s=sr(so,e.__scopeScrollArea);return(0,i.jsx)(rU.Presence,{present:n||s.hasThumb,children:(0,i.jsx)(si,{ref:t,...r})})}),si=m.forwardRef((e,t)=>{let{__scopeScrollArea:n,style:r,...s}=e,o=r0(so,n),a=sr(so,n),{onThumbPositionChange:l}=a,d=(0,rW.useComposedRefs)(t,e=>a.onThumbChange(e)),c=m.useRef(void 0),u=sf(()=>{c.current&&(c.current(),c.current=void 0)},100);return m.useEffect(()=>{let e=o.viewport;if(e){let t=()=>{u(),c.current||(c.current=sg(e,l),l())};return l(),e.addEventListener("scroll",t),()=>e.removeEventListener("scroll",t)}},[o.viewport,u,l]),(0,i.jsx)(rH.Primitive.div,{"data-state":a.hasThumb?"visible":"hidden",...s,ref:d,style:{width:"var(--radix-scroll-area-thumb-width)",height:"var(--radix-scroll-area-thumb-height)",...r},onPointerDownCapture:(0,rV.composeEventHandlers)(e.onPointerDownCapture,e=>{let t=e.target.getBoundingClientRect(),n=e.clientX-t.left,r=e.clientY-t.top;a.onThumbPointerDown({x:n,y:r})}),onPointerUp:(0,rV.composeEventHandlers)(e.onPointerUp,a.onThumbPointerUp)})});sa.displayName=so;var sl="ScrollAreaCorner",sd=m.forwardRef((e,t)=>{let n=r0(sl,e.__scopeScrollArea),r=!!(n.scrollbarX&&n.scrollbarY);return"scroll"!==n.type&&r?(0,i.jsx)(sc,{...e,ref:t}):null});sd.displayName=sl;var sc=m.forwardRef((e,t)=>{let{__scopeScrollArea:n,...r}=e,s=r0(sl,n),[o,a]=m.useState(0),[l,d]=m.useState(0),c=!!(o&&l);return sy(s.scrollbarX,()=>{let e=s.scrollbarX?.offsetHeight||0;s.onCornerHeightChange(e),d(e)}),sy(s.scrollbarY,()=>{let e=s.scrollbarY?.offsetWidth||0;s.onCornerWidthChange(e),a(e)}),c?(0,i.jsx)(rH.Primitive.div,{...r,ref:t,style:{width:o,height:l,position:"absolute",right:"ltr"===s.dir?0:void 0,left:"rtl"===s.dir?0:void 0,bottom:0,...e.style}}):null});function su(e){return e?parseInt(e,10):0}function s_(e,t){let n=e/t;return isNaN(n)?0:n}function sm(e){let t=s_(e.viewport,e.content),n=e.scrollbar.paddingStart+e.scrollbar.paddingEnd;return Math.max((e.scrollbar.size-n)*t,18)}function sp(e,t,n="ltr"){let r=sm(t),s=t.scrollbar.paddingStart+t.scrollbar.paddingEnd,o=t.scrollbar.size-s,a=t.content-t.viewport,i=function(e,[t,n]){return Math.min(n,Math.max(t,e))}(e,"ltr"===n?[0,a]:[-1*a,0]);return sh([0,a],[0,o-r])(i)}function sh(e,t){return n=>{if(e[0]===e[1]||t[0]===t[1])return t[0];let r=(t[1]-t[0])/(e[1]-e[0]);return t[0]+r*(n-e[0])}}var sg=(e,t=()=>{})=>{let n={left:e.scrollLeft,top:e.scrollTop},r=0;return!function s(){let o={left:e.scrollLeft,top:e.scrollTop},a=n.left!==o.left,i=n.top!==o.top;(a||i)&&t(),n=o,r=window.requestAnimationFrame(s)}(),()=>window.cancelAnimationFrame(r)};function sf(e,t){let n=(0,rQ.useCallbackRef)(e),r=m.useRef(0);return m.useEffect(()=>()=>window.clearTimeout(r.current),[]),m.useCallback(()=>{window.clearTimeout(r.current),r.current=window.setTimeout(n,t)},[n,t])}function sy(e,t){let n=(0,rQ.useCallbackRef)(t);(0,rG.useLayoutEffect)(()=>{let t=0;if(e){let r=new ResizeObserver(()=>{cancelAnimationFrame(t),t=window.requestAnimationFrame(n)});return r.observe(e),()=>{window.cancelAnimationFrame(t),r.unobserve(e)}}},[e,n])}let sb=m.forwardRef(({className:e,children:t,viewportRef:n,disableScrollbar:r=!1,...s},o)=>(0,i.jsxs)(r1,{ref:o,className:(0,tW.cn)("relative overflow-hidden overscroll-auto",e),...s,children:[(0,i.jsx)(r2,{ref:n,className:"size-full rounded-[inherit] [&>div]:!block [&>div]:!min-w-0",children:t}),(0,i.jsx)(sx,{className:r?"pointer-events-none opacity-0":""}),(0,i.jsx)(sd,{})]}));sb.displayName=r1.displayName;let sx=m.forwardRef(({className:e,orientation:t="vertical",...n},r)=>(0,i.jsx)(r3,{ref:r,orientation:t,className:(0,tW.cn)("flex touch-none select-none transition-colors","vertical"===t&&"h-full w-2.5 border-l border-l-transparent p-px","horizontal"===t&&"h-2.5 flex-col border-t border-t-transparent p-px",e),...n,children:(0,i.jsx)(sa,{className:"relative flex-1 rounded-full bg-[var(--color-border)]"})}));function sv(e={}){let{autoExpandCount:t=3,disableAnimationOnInit:n=!0}=e,[r,s]=(0,m.useState)({}),[o,a]=(0,m.useState)(!1),[i,l]=(0,m.useState)(!1),d=(0,m.useCallback)(e=>{s(t=>({...t,[e]:!t[e]}))},[]),c=(0,m.useCallback)(()=>{a(!0);let e=setTimeout(()=>a(!1),100);return()=>clearTimeout(e)},[]),u=(0,m.useCallback)(e=>{if(i||0===e.length)return;let r={};
68e.slice(0,t).forEach(e=>{r[e.date]=!0}),n&&(a(!0),setTimeout(()=>a(!1),100)),s(r),l(!0)},[t,n,i]);return(0,m.useMemo)(()=>({expandedGroups:r,toggleGroup:d,setExpandedGroups:s,isAnimationDisabled:o,initializeExpansion:u,disableAnimations:c}),[r,d,s,o,u,c])}sx.displayName=r3.displayName;var sw=e.i(41900),sS=e.i(238212),sC=e.i(780096);let sk=async(e,t,n=50)=>{let r=e.trim();if(!r)return[];let s=(0,sS.createMemoryService)(t);return rp(((await s.searchMemories(r,n)).memories??[]).map(e=>(e=>{let t=0;if(e.start_time&&e.end_time){let n=new Date(e.start_time).getTime(),r=new Date(e.end_time).getTime();isNaN(n)||isNaN(r)||(t=Math.round((r-n)/1e3))}let n=(0,sC.getMemoryTitle)(e.title?.trim()||e.meeting_title);return{id:e.meeting_id,title:n,summary:"",createdAt:e.time_created||e.start_time||new Date().toISOString(),modifiedAt:e.date_modified||e.time_created||"",duration:t,action:"",transcript:"",summaryTitle:n,summaryText:"",is_duplicate:!1,original_uuid:"",summary_owner:"",summary_id:e.summary_id||e.meeting_id,metadata:e.metadata||{},start_time:e.start_time,end_time:e.end_time,hasAudio:e.hasAudio,lifecycle_status:e.lifecycle_status}})(e)))};e.i(348096),(0,d.createModuleLogger)("performance");class sj{static instance;cacheHits=0;cacheMisses=0;cacheAges=[];loadMetrics=[];scrollMetrics=[];apiCallCounts=[];static getInstance(){return sj.instance||(sj.instance=new sj),sj.instance}recordCacheHit(e){this.cacheHits++,this.cacheAges.push(e)}recordCacheMiss(){this.cacheMisses++}recordLoadMetrics(e){this.loadMetrics.push(e),this.apiCallCounts.push(e.apiCallCount)}recordScrollMetrics(e){this.scrollMetrics.push(e)}getCacheMetrics(){let e=this.cacheHits+this.cacheMisses,t=e>0?this.cacheHits/e*100:0,n=this.cacheAges.length>0?this.cacheAges.reduce((e,t)=>e+t,0)/this.cacheAges.length:0;return{hits:this.cacheHits,misses:this.cacheMisses,hitRate:Math.round(100*t)/100,avgCacheAge:Math.round(n),totalLoads:e}}getLoadMetrics(){return[...this.loadMetrics]}getScrollMetrics(){return[...this.scrollMetrics]}getAverageLoadTime(){return 0===this.loadMetrics.length?0:Math.round(this.loadMetrics.reduce((e,t)=>e+t.totalLoadTime,0)/this.loadMetrics.length)}getAverageApiCalls(){return 0===this.apiCallCounts.length?0:Math.round(this.apiCallCounts.reduce((e,t)=>e+t,0)/this.apiCallCounts.length*100)/100}getColdVsWarmComparison(){let e=this.loadMetrics.filter(e=>"cold"===e.loadType),t=this.loadMetrics.filter(e=>"warm_cache"===e.loadType),n=e.length>0?e.reduce((e,t)=>e+t.totalLoadTime,0)/e.length:0,r=t.length>0?t.reduce((e,t)=>e+t.totalLoadTime,0)/t.length:0;return{coldAvg:Math.round(n),warmAvg:Math.round(r),improvement:Math.round(10*(n>0&&r>0?n/r:0))/10}}reset(){this.cacheHits=0,this.cacheMisses=0,this.cacheAges=[],this.loadMetrics=[],this.scrollMetrics=[],this.apiCallCounts=[]}exportMetrics(){return JSON.stringify({cache:this.getCacheMetrics(),loads:this.loadMetrics,scrolls:this.scrollMetrics,averages:{loadTime:this.getAverageLoadTime(),apiCalls:this.getAverageApiCalls()},comparison:this.getColdVsWarmComparison()},null,2)}}let sE=sj.getInstance();window.getMemoryPerformance=()=>{let e={cache:sE.getCacheMetrics(),averages:{loadTime:sE.getAverageLoadTime(),apiCalls:sE.getAverageApiCalls()},comparison:sE.getColdVsWarmComparison(),totalLoads:sE.getLoadMetrics().length,totalScrolls:sE.getScrollMetrics().length};return console.group("ð Memory Performance Summary"),console.log("\nð¯ Cache Performance:"),console.log(` Hits: ${e.cache.hits}`),console.log(` Misses: ${e.cache.misses}`),console.log(` Hit Rate: ${e.cache.hitRate}%`),console.log(` Avg Cache Age: ${Math.round(e.cache.avgCacheAge/1e3)}s`),console.log("\nâ¡ Load Performance:"),console.log(` Average Load Time: ${e.averages.loadTime}ms`),console.log(` Average API Calls: ${e.averages.apiCalls}`),console.log("\nð¥ Cold vs Warm Comparison:"),console.log(` Cold Load Average: ${e.comparison.coldAvg}ms`),console.log(` Warm Load Average: ${e.comparison.warmAvg}ms`),console.log(` Speed Improvement: ${e.comparison.improvement}x faster`),console.log("\nð Usage Stats:"),console.log(` Total Loads: ${e.totalLoads}`),console.log(` Infinite Scrolls: ${e.totalScrolls}`),console.groupEnd(),e},window.exportMemoryMetrics=()=>{let e=sE.exportMetrics();
68return console.log("ð¦ Exported Metrics (copy this):"),console.log(e),navigator.clipboard&&navigator.clipboard.writeText(e).then(()=>{console.log("â
Copied to clipboard!")}).catch(()=>{console.log("â Failed to copy to clipboard")}),e},window.resetMemoryMetrics=()=>{sE.reset(),console.log("â
Memory performance metrics reset")};var sN=e.i(190234),sT=e.i(902434),sT=sT;let sR=[{href:"/",label:"Home",icon:(0,i.jsx)(sT.default,{size:18}),matchPattern:/^\/$/,eventName:"webapp_home_link_clicked"},{href:"/digest",label:"View Digest",icon:(0,i.jsx)(nH.LampChargeIcon,{}),eventName:"ViewDigestButtonClicked",testId:"mobile-digest-link"},{href:"/todo",label:"To-Do List",icon:(0,i.jsx)(nO,{size:18}),matchPattern:/^\/todo/,eventName:"webapp_todo_list_button_clicked"},{href:"/transcribe",label:"Transcribe",icon:(0,i.jsx)(nD,{size:18}),matchPattern:/^\/transcribe/,eventName:"webapp_transcribe_button_clicked"}];function sA({onNavigate:e,className:t}){let n=(0,T.usePathname)();return(0,i.jsx)("nav",{className:(0,tW.cn)("border-b border-gray-100",t),children:(0,i.jsx)("ul",{className:"py-2 px-4",children:sR.map(t=>{let r=t.matchPattern?t.matchPattern.test(n||""):n===t.href;return(0,i.jsx)("li",{children:(0,i.jsxs)(nY.default,{href:t.href,onClick:()=>{t.eventName&&(0,t4.track)(t.eventName),e?.()},"data-testid":t.testId,className:(0,tW.cn)("flex items-center gap-3 px-4 py-3 rounded-lg transition-colors duration-200 ease-out","focus:outline-none focus-visible:ring-2 focus-visible:ring-[#0B4F75]/50 focus-visible:ring-inset",r?"bg-[#EEF7FB] text-[#0B4F75]":"text-[#0B4F75] hover:bg-[#EEF7FB]"),children:[(0,i.jsx)("span",{className:(0,tW.cn)(r?"text-[#0B4F75]":"text-[#0B4F75]/70"),children:t.icon}),(0,i.jsx)("span",{className:"font-medium",children:t.label})]})},t.href)})})})}function sI({user:e,onClose:t,onSettingsClick:n,onCloseSidepanel:r,className:s}){let{isMax:o,isPro:a}=(0,F.useSubscription)(),l=!o&&a;return(0,i.jsxs)("div",{className:(0,tW.cn)("flex items-center justify-between px-4 py-3 border-b border-gray-100",s),children:[(0,i.jsxs)("button",{type:"button",onClick:()=>{r?.(),n()},className:"flex items-center gap-3 flex-1 min-w-0 text-left hover:bg-gray-50 -mx-2 px-2 py-1 rounded-lg transition-colors focus:outline-none focus-visible:ring-2 focus-visible:ring-[#0B4F75]/50",children:[(0,i.jsx)(nG,{photoURL:e.photoURL,displayName:e.displayName,size:44}),(0,i.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,i.jsx)("p",{className:"text-[16px] font-semibold text-[#0B4F75] truncate leading-[1.2]",children:e.displayName||"User"}),(0,i.jsx)("p",{className:"text-sm text-gray-500",children:"Settings"})]}),o&&(0,i.jsx)("span",{className:"flex items-center justify-center px-3 py-1.5 h-7 bg-[#EF6D00] text-white text-[12px] font-semibold italic leading-[1.4] rounded-[32px] whitespace-nowrap select-none shrink-0",children:"MAX"}),l&&(0,i.jsx)("span",{className:"flex items-center justify-center px-3 py-1.5 h-7 bg-[#0B4F75] text-white text-[12px] font-semibold leading-[1.4] rounded-[32px] whitespace-nowrap select-none shrink-0",children:"PRO"})]}),!o&&!l&&(0,i.jsx)(nq,{source:"mobile_sidepanel",onClick:()=>r?.()}),(0,i.jsx)("button",{type:"button",onClick:t,className:"shrink-0 size-[38px] flex items-center justify-center rounded-lg hover:bg-[#F1F6F8] active:scale-95 transition-[background-color,transform] duration-75 ml-2 focus:outline-none focus-visible:ring-2 focus-visible:ring-[#0B4F75]/50","aria-label":"Close sidebar",children:(0,i.jsx)(nW,{size:30,strokeWidth:1,className:"text-[#0B4F75]","aria-hidden":"true"})})]})}let sM=1/3;function sL(){return Math.round(window.innerWidth*sM)}function sP({uuid:e,isExpanded:t,isMobile:n,isMobileOpen:r,setMobileOpen:s,onExpandedChange:o,className:a,activeTab:l,searchQuery:d,searchInputRef:c,searchPlaceholder:u,noResultsAtQueryLength:_,noChatResultsAtQueryLength:h,filteredMemories:g,searchStatus:f,searchError:y,isLoading:b,memoryError:x,filteredChatSessions:v,chatSearchStatus:w,isLoadingChats:S,chatError:C,memoryExpansion:k,chatExpansion:j,isTabSwitching:E,scrollContainerCallbackRef:N,user:T,onTabChange:R,onSearchChange:A,refreshMemories:I,fetchChatHistory:M,onSignOut:L,onOpenChangelog:P,onOpenProfile:D,onOpenSettings:O,onCloseSidepanel:F,showPersonalize:z,setShowPersonalize:Y,personalizationForm:H,setPersonalizationForm:U,onPersonalizationSubmit:X,isSubmitting:W,personalizationError:Q,deleteModalState:$,openDeleteModal:G,openDeleteChatModal:V,closeDeleteModal:q,confirmDelete:J}){let K=(0,m.useRef)(null),Z=(0,m.useRef)(null),ee=(0,m.useRef)(null),[et,en]=(0,m.useState)(()=>sL()),[er,es]=(0,m.useState)(!1),[eo,ea]=(0,m.useState)(1);(0,sN.useIOSBouncePrevent)({containerRef:ee,enabled:n&&r}),function({containerRef:e,enabled:t=!0}){(0,m.useEffect)(()=>
68{if(!t)return;let n=e.current;if(!n)return;let r=n.scrollHeight,s=new MutationObserver(()=>{requestAnimationFrame(()=>{let e=n.scrollHeight;if(e<r){let t=Math.max(0,e-n.clientHeight);n.scrollTop>t&&(n.scrollTop=t)}r=e})});return s.observe(n,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["style","class"]}),()=>{s.disconnect()}},[t,e])}({containerRef:ee,enabled:n&&r}),(0,m.useEffect)(()=>{if(!n||!r)return;let e=ee.current;if(!e)return;let t=()=>{ea(Math.max(0,Math.min(1,1-e.scrollTop/80)))};return t(),e.addEventListener("scroll",t,{passive:!0}),()=>e.removeEventListener("scroll",t)},[n,r]);let ei=(0,m.useCallback)(e=>{N(e),ee.current=e},[N]);(0,m.useEffect)(()=>{if(n)return;en(sL());let e=()=>en(sL());return window.addEventListener("resize",e),()=>window.removeEventListener("resize",e)},[n]);let el=(0,i.jsxs)(i.Fragment,{children:[(0,i.jsxs)("div",{className:"px-2 py-4 gap-4 flex flex-col",children:[Q?(0,i.jsx)("div",{className:"rounded-lg border border-red-200 bg-red-50 px-3 py-2 text-sm text-red-900",children:Q}):null,(0,i.jsxs)("div",{children:[(0,i.jsx)("label",{className:"block text-sm font-medium text-[#0B4F75] mb-1",children:"Name"}),(0,i.jsx)("input",{type:"text",value:H.name,onChange:e=>U({...H,name:e.target.value}),className:"w-full px-3 py-2 border border-gray-200 rounded-xl focus:outline-none focus:ring-2 focus:ring-[#0B4F75]"})]}),(0,i.jsxs)("div",{children:[(0,i.jsx)("label",{className:"block text-sm font-medium text-[#0B4F75] mb-1",children:"Occupation"}),(0,i.jsx)("input",{type:"text",value:H.occupation,onChange:e=>U({...H,occupation:e.target.value}),className:"w-full px-3 py-2 border border-gray-200 rounded-xl focus:outline-none focus:ring-2 focus:ring-[#0B4F75]"})]}),(0,i.jsxs)("div",{children:[(0,i.jsx)("label",{className:"block text-sm font-medium text-[#0B4F75] mb-1",children:"Preferred Language"}),(0,i.jsxs)("select",{value:H.preferredLanguage,onChange:e=>U({...H,preferredLanguage:e.target.value}),className:"w-full px-3 py-2 border border-gray-200 rounded-xl focus:outline-none focus:ring-2 focus:ring-[#0B4F75]",children:[(0,i.jsx)("option",{value:"English",children:"English"},"English"),(0,i.jsx)("option",{value:"Spanish",children:"Spanish"},"Spanish"),(0,i.jsx)("option",{value:"French",children:"French"},"French"),(0,i.jsx)("option",{value:"German",children:"German"},"German")]})]}),(0,i.jsxs)("div",{children:[(0,i.jsx)("label",{className:"block text-sm font-medium text-[#0B4F75] mb-1",children:"Personalization Prompt"}),(0,i.jsx)("textarea",{value:H.personalizationPrompt,onChange:e=>U({...H,personalizationPrompt:e.target.value}),rows:4,className:"w-full px-3 py-2 border border-gray-200 rounded-xl focus:outline-none focus:ring-2 focus:ring-[#0B4F75]",placeholder:"Tell us about yourself..."})]})]}),(0,i.jsxs)("div",{className:"flex items-center justify-end py-4 px-2 border-t border-gray-200 gap-2",children:[(0,i.jsx)("button",{type:"button",onClick:()=>Y(!1),className:"px-4 py-2 bg-[#F1F6F8] border border-[#0B4F7533] text-[#0B4F75] rounded-full hover:bg-gray-50 transition-colors text-sm font-medium",children:"Cancel"}),(0,i.jsx)("button",{type:"button",onClick:X,disabled:W,className:"px-4 py-2 bg-[#0B4F75] text-white rounded-full hover:bg-[#0B4F75]/90 transition-colors text-sm font-medium disabled:opacity-50",children:W?"Saving...":"Save"})]})]}),ed=n?r:t,ec=(0,m.useCallback)(()=>{s?.(!1),o?.(!1),O?O():Y(!0)},[s,o,Y,O]),eu=(0,m.useCallback)(()=>{es(!0);let e=ee.current;e&&n&&e.scrollTo({top:150,behavior:"smooth"})},[n]),e_=(0,m.useCallback)(()=>{es(!1)},[]),em=(0,m.useCallback)((e,t)=>{s?.(!1),o?.(!1),G(e,t)},[s,o,G]),ep=(0,m.useCallback)((e,t)=>{s?.(!1),o?.(!1),V(e,t)},[s,o,V]);return(0,i.jsxs)(i.Fragment,{children:[ed&&(0,i.jsx)("div",{className:"fixed inset-0 z-[65] bg-black/30",onClick:()=>{n?s?.(!1):o?.(!1)},"aria-hidden":"true"}),(0,i.jsxs)("div",{className:(0,tW.cn)("flex flex-col h-screen bg-white","transition-transform duration-300 ease-out","fixed inset-y-0 left-0 z-70 border-r border-[rgba(11,79,117,0.2)]",n?["w-[85%] max-w-[85%]",r?"translate-x-0":"-translate-x-full"]:[t?"translate-x-0":"-translate-x-full"],a),style:n?void 0:{width:et},"data-testid":"sidepanel",children:[n?(0,i.jsxs)("div",{className:"flex flex-col flex-1 min-h-0",children:[T&&(0,i.jsx)(sI,{user:T,onClose:()=>s?.(!1),onSettingsClick:ec,onSignOut:L,onOpenProfile:D,onOpenChangelog:P,onCloseSidepanel:()=>s?.(!1),isSidepanelOpen:r}),(0,i.jsxs)("div",{ref:ei,className:"flex-1 overflow-y-auto overflow-x-hidden overscroll-contain",children:[(0,i.jsx)("div",{style:{opacity:eo,transition:"opacity 0.1s ease-out"},children:(0,i.jsx)(sA,{onNavigate:()=>s?.(!1)})}),(0,i.jsxs)("div",{className:"sticky top-0 z-10 bg-white pt-2",children:[(0,i.jsx)("div",{ref:Z,children:(0,i.jsx)(n9,{activeTab:l,onTabChange:R,className:"shrink-0"})}),(0,i.jsx)("div",{className:"px-4 pb-3 border-b border-gray-100",children:(0,i.jsx)(nQ,{ref:c,value:d,onChange:A,placeholder:u,showClearButton:!0,testId:"sidepanel-search-input",onFocus:eu,onBlur:e_})})]}),(0,i.jsxs)("div",{className:"px-4",style:{paddingBottom:er?"calc(50vh + env(safe-area-inset-bottom, 0px))":"calc(6rem + env(safe-area-inset-bottom, 0px))"},children:["memories"===l&&(0,i.jsx)(rP,{uuid:e,filteredMemories:g,searchQuery:d,searchStatus:f,searchError:y,memoryError:x,onRetryFetch:I,isLoading:b,isSmallScreen:n,setIsSidebarOpen:()=>s?.(!1),expandedGroups:k.expandedGroups,toggleGroup:k.toggleGroup,isTabSwitching:E,onDeleteMemory:em,noResultsAtQueryLength:_,isSidepanelExpanded:r,onCloseSidepanel:F}),"chats"===l&&(0,i.jsx)(rD,{uuid:e,filteredChatSessions:v,searchQuery:d,chatSearchStatus:w,isLoadingChats:S,chatError:C,onRetryFetch:M,isSmallScreen:n,setIsSidebarOpen:()=>s?.(!1),expandedGroups:j.expandedGroups,toggleGroup:j.toggleGroup,isTabSwitching:E,noChatResultsAtQueryLength:h,isSidepanelExpanded:r,onDeleteChat:ep,onCloseSidepanel:F})]})]})]}):(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(n$,{ref:c,searchQuery:d,onSearchChange:A,searchPlaceholder:u,isExpanded:t,onExpandedChange:o,isMobile:n}),(0,i.jsxs)("div",{ref:K,className:(0,tW.cn)("flex flex-col flex-1 min-h-0 overflow-hidden transition-opacity duration-100",t?"opacity-100":"opacity-0 pointer-events-none"),children:[(0,i.jsx)("div",{ref:Z,children:(0,i.jsx)(n9,{activeTab:l,onTabChange:R,className:"shrink-0"})}),(0,i.jsxs)(sb,{className:"flex-1 h-0 px-6",viewportRef:N,disableScrollbar:!1,children:["memories"===l&&(0,i.jsx)(rP,{uuid:e,filteredMemories:g,searchQuery:d,searchStatus:f,searchError:y,memoryError:x,onRetryFetch:I,isLoading:b,isSmallScreen:n,setIsSidebarOpen:()=>s?.(!1),expandedGroups:k.expandedGroups,toggleGroup:k.toggleGroup,isTabSwitching:E,onDeleteMemory:em,noResultsAtQueryLength:_,isSidepanelExpanded:t,onCloseSidepanel:()=>{n||o?.(!1),F?.()}}),"chats"===l&&(0,i.jsx)(rD,{uuid:e,filteredChatSessions:v,searchQuery:d,chatSearchStatus:w,isLoadingChats:S,chatError:C,onRetryFetch:M,isSmallScreen:n,setIsSidebarOpen:()=>s?.(!1),expandedGroups:j.expandedGroups,toggleGroup:j.toggleGroup,isTabSwitching:E,noChatResultsAtQueryLength:h,isSidepanelExpanded:t,onDeleteChat:ep,onCloseSidepanel:()=>{n||o?.(!1),F?.()}})]})]}),T&&(0,i.jsx)(sD,{user:T,isExpanded:t,onSettingsClick:ec,onCollapse:()=>o?.(!1)})]}),z&&"u">typeof document&&(0,p.createPortal)(n?(0,i.jsx)(B.BottomSheet,{open:z,onDismiss:()=>Y(!1),snapPoints:({maxHeight:e})=>.85*e,header:(0,i.jsx)("span",{style:{fontSize:18,fontWeight:600,color:"#0b4f75",paddingBottom:8},children:"Personalization"}),children:el}):(0,i.jsxs)(B.Modal,{isOpen:z,onClose:()=>Y(!1),size:"md",padding:!1,className:"max-w-[400px] p-2 gap-2 flex flex-col",dismissButtonProps:{size:20,"aria-label":"Close modal"},children:[(0,i.jsx)("div",{className:"mb-5",children:(0,i.jsx)("h2",{className:"text-brand-primary text-xl font-semibold leading-tight",children:"Personalization"})}),el]}),document.body),"u">typeof document&&(0,p.createPortal)((0,i.jsx)(rY.DeleteConfirmationModal,{isOpen:$.isOpen,onClose:q,onConfirm:J,isDeleting:$.isDeleting,title:"chat"===$.type?"Delete Chat?":"Delete Memory?",description:"chat"===$.type?"Are you sure you want to permanently delete this item? This action cannot be undone.":`Are you sure you want to delete "${$.title||"this memory"}"? Once deleted, it cannot be recovered.`}),document.body)]})]})}function sD({user:e,isExpanded:t,onSettingsClick:n,onCollapse:r}){let{isMax:s,isPro:o}=(0,F.useSubscription)(),a=!s&&o;return(0,i.jsxs)("div",{className:(0,tW.cn)("relative shrink-0 mt-auto h-16 overflow-hidden bg-[#EEF7FB] hover:bg-[#D3E5EE] transition-colors",t?"px-5 flex items-center gap-3":"flex items-center justify-center"),style:{borderTop:"0.5px solid #CED3DB",boxShadow:"6px 0 12px 0 rgba(0, 0, 0, 0.12)"},children:[(0,i.jsxs)("button",{type:"button",className:(0,tW.cn)("flex items-center gap-3 cursor-pointer rounded-xl","focus:outline-none focus-visible:ring-2 focus-visible:ring-[#0B4F75]/50","p-1",t?"flex-1 min-w-0":""),onClick:n,"aria-label":"Open settings",children:[(0,i.jsx)(nG,{photoURL:e.ph
68otoURL,displayName:e.displayName,size:36}),(0,i.jsx)("div",{className:(0,tW.cn)("flex-1 min-w-0 transition-opacity duration-200",t?"opacity-100":"opacity-0 pointer-events-none absolute"),children:(0,i.jsx)("p",{className:"text-[16px] font-medium text-[#0B4F75] truncate leading-[1.2] text-left",children:e.displayName||"User"})})]}),t&&s&&(0,i.jsx)("span",{className:"flex items-center justify-center px-3 py-1.5 h-7 bg-[#EF6D00] text-white text-[12px] font-semibold italic leading-[1.4] rounded-[32px] whitespace-nowrap select-none shrink-0",children:"MAX"}),t&&a&&(0,i.jsx)("span",{className:"flex items-center justify-center px-3 py-1.5 h-7 bg-[#0B4F75] text-white text-[12px] font-semibold leading-[1.4] rounded-[32px] whitespace-nowrap select-none shrink-0",children:"PRO"}),t&&!s&&!a&&(0,i.jsx)(nq,{source:"sidepanel",onClick:r})]})}var sO=e.i(536076),sF=e.i(537621);let sB=e=>{if(!e||!e.memories)return[];let t=new Map;return e.memories.forEach(e=>{let n=e.meeting_id;if(!n)return;let r=e.time_created;if(!r)return;let s=new Date(r);if(isNaN(s.getTime()))return;let o=t.get(n);(!o||s>o.creationTime)&&t.set(n,{creationTime:s,originalItem:e})}),Array.from(t.values()).map(({originalItem:e})=>({meeting_id:e.meeting_id,meeting_title:(0,sC.getMemoryTitle)(e.title?.trim()||e.meeting_title),time_created:e.time_created,start_time:e.start_time,end_time:e.end_time,summary_id:e.summary_id,date_modified:e.date_modified,hasAudio:e.hasAudio,lifecycle_status:e.lifecycle_status,metadata:e.metadata}))};var sz=e.i(674513);let sY={groupedMemories:[],filteredMemories:[],isLoading:!1,isFetching:!1,error:null,hasMore:!0,isLoadingMore:!1,offset:0,locallyAddedIds:[]};function sH(e,t){switch(t.type){case"FETCH_START":return{...e,isLoading:!0,isFetching:!0,error:null,locallyAddedIds:[]};case"FETCH_SUCCESS":return{...e,groupedMemories:t.payload.grouped,filteredMemories:t.payload.grouped,isLoading:!1,isFetching:!1,hasMore:t.payload.hasMore??e.hasMore,offset:t.payload.offset??e.offset};case"FETCH_ERROR":return{...e,isLoading:!1,isFetching:!1,error:t.payload};case"FETCH_COMPLETE":return{...e,isLoading:!1,isFetching:!1};case"SET_GROUPED":{if(0===e.locallyAddedIds.length)return{...e,groupedMemories:t.payload};let n=new Set(t.payload.flatMap(e=>e.memories.map(e=>e.id))),r=e.locallyAddedIds.filter(e=>!n.has(e));if(0===r.length)return{...e,groupedMemories:t.payload,locallyAddedIds:[]};let s=new Set(r),o=e.groupedMemories.flatMap(e=>e.memories).filter(e=>s.has(e.id)),a=new Map;for(let e of o){let t=new Date(e.start_time||e.createdAt),n=`${t.getFullYear()}-${String(t.getMonth()+1).padStart(2,"0")}-${String(t.getDate()).padStart(2,"0")}`;a.has(n)||a.set(n,[]),a.get(n).push(e)}let i=t.payload;for(let[e,t]of a){let n=i.findIndex(t=>t.date===e);n>=0?(i=[...i])[n]={...i[n],memories:[...t,...i[n].memories]}:i=[{date:e,memories:t},...i]}return{...e,groupedMemories:i,locallyAddedIds:r}}case"SET_FILTERED":return{...e,filteredMemories:t.payload};case"ADD_MEMORY":{let n,r=t.payload;if(e.groupedMemories.some(e=>e.memories.some(e=>e.id===r.id)))return e;let s=new Date(r.start_time||r.createdAt),o=`${s.getFullYear()}-${String(s.getMonth()+1).padStart(2,"0")}-${String(s.getDate()).padStart(2,"0")}`,a=e.groupedMemories.findIndex(e=>e.date===o);return a>=0?(n=[...e.groupedMemories])[a]={...n[a],memories:[r,...n[a].memories]}:n=[{date:o,memories:[r]},...e.groupedMemories],{...e,groupedMemories:n,filteredMemories:n,locallyAddedIds:[...e.locallyAddedIds,r.id]}}case"MERGE_MEMORIES":return{...e,groupedMemories:t.payload,filteredMemories:t.payload};case"LOAD_MORE_START":return{...e,isLoadingMore:!0};case"LOAD_MORE_SUCCESS":return{...e,groupedMemories:t.payload.grouped,filteredMemories:t.payload.grouped,isLoadingMore:!1,hasMore:t.payload.hasMore,offset:t.payload.offset};case"LOAD_MORE_ERROR":return{...e,isLoadingMore:!1,error:t.payload};case"SET_HAS_MORE":return{...e,hasMore:t.payload};case"SET_OFFSET":return{...e,offset:t.payload};case"CLEAR_ERROR":return{...e,error:null};case"REMOVE_MEMORY":{let n=t.payload,r=e=>e.map(e=>({...e,memories:e.memories.filter(e=>e.id!==n)})).filter(e=>e.memories.length>0);return{...e,groupedMemories:r(e.groupedMemories),filteredMemories:r(e.filteredMemories)}}case"RESET":return sY;default:return e}}let sU={query:"",memoryStatus:"idle",chatStatus:"idle",memoryError:null,noMemoryResultsAtLength:null,noChatResultsAtLength:null};function sX(e,t){switch(t.type){case"SET_QUERY":return{...e,query:t.payload};case"MEMORY_SEARCH_START":return{...e,memoryStatus:"loading",memoryError:null};case"MEMORY_SEARCH_SUCCESS":{let{hasResults:n,queryLength:r}=t.payload;return{...e,memoryStatus:"idle",memoryError:null,noMemoryResultsAtLength:n?null:null===e.n
68oMemoryResultsAtLength?r:e.noMemoryResultsAtLength}}case"MEMORY_SEARCH_ERROR":return{...e,memoryStatus:"error",memoryError:t.payload};case"MEMORY_SEARCH_IDLE":return{...e,memoryStatus:"idle"};case"CHAT_SEARCH_START":return{...e,chatStatus:"loading"};case"CHAT_SEARCH_SUCCESS":{let{hasResults:n,queryLength:r}=t.payload;return{...e,chatStatus:"idle",noChatResultsAtLength:n?null:null===e.noChatResultsAtLength?r:e.noChatResultsAtLength}}case"CHAT_SEARCH_IDLE":return{...e,chatStatus:"idle"};case"RESET_NO_RESULTS":return{...e,noMemoryResultsAtLength:null,noChatResultsAtLength:null};case"CLEAR_ERROR":return{...e,memoryError:null};case"RESET":return sU;default:return e}}let sW={history:[],groupedSessions:[],filteredSessions:[],isLoading:!1,error:null};function sQ(e,t){switch(t.type){case"FETCH_START":return{...e,isLoading:!0,error:null};case"FETCH_SUCCESS":return{...e,history:t.payload.history,groupedSessions:t.payload.grouped,filteredSessions:t.payload.grouped,isLoading:!1};case"FETCH_ERROR":return{...e,isLoading:!1,error:t.payload};case"SET_HISTORY":return{...e,history:t.payload};case"SET_GROUPED":return{...e,groupedSessions:t.payload};case"SET_FILTERED":return{...e,filteredSessions:t.payload};case"ADD_SESSIONS":return{...e,history:t.payload.history,groupedSessions:t.payload.grouped,filteredSessions:t.payload.filtered,isLoading:!1};case"ADD_CHAT":{let{session:n,matchesSearch:r}=t.payload,s=new Date(n.created_at),o=s.getFullYear(),a=(s.getMonth()+1).toString().padStart(2,"0"),i=s.getDate().toString().padStart(2,"0"),l=`${o}-${a}-${i}`,d=e=>{let t=e.findIndex(e=>e.date===l);if(!(t>=0))return[{date:l,sessions:[n]},...e];{let r=[...e];return r[t]={...r[t],sessions:[n,...r[t].sessions]},r}};return{...e,history:[n,...e.history],groupedSessions:d(e.groupedSessions),filteredSessions:r?d(e.filteredSessions):e.filteredSessions}}case"REMOVE_CHAT":{let n=t.payload,r=e=>e.map(e=>({...e,sessions:e.sessions.filter(e=>e.session_id!==n)})).filter(e=>e.sessions.length>0);return{...e,history:e.history.filter(e=>e.session_id!==n),groupedSessions:r(e.groupedSessions),filteredSessions:r(e.filteredSessions)}}case"CLEAR_ERROR":return{...e,error:null};case"RESET":return sW;default:return e}}let s$=(0,d.createModuleLogger)("sidepanel"),sG=(0,d.createModuleLogger)("sidepanel"),sV=(0,m.forwardRef)(({uuid:e,isExpanded:t=!0,onExpandedChange:n,isMobile:r=!1,isMobileOpen:s=!1,setMobileOpen:o,className:a,onOpenChangelog:l,onOpenProfile:d,onOpenSettings:c,onCloseSidepanel:u},_)=>{let p,{user:h,logout:g}=(0,A.useAuth)(),{openChangelog:f}=function(){let e=(0,m.useContext)(t0);if(!e)throw Error("useChangelog must be used within a ChangelogProvider");return e}(),[y,b]=(0,m.useState)(null),x=(0,m.useCallback)(()=>{l?l():f()},[l,f]),v=(0,m.useCallback)(async()=>{o?.(!1),await g()},[o,g]),w=function({uuid:e}){let{user:t}=(0,A.useAuth)(),n=(0,rn.useGuardedRouter)(),r=(0,nk.useToast)(),{setGroupedMemories:s,setGroupedChatSessions:o,setSelectedMemoryId:a,setSelectedChatId:i}=O(),[l,d]=(0,m.useState)("memories"),[c,u]=(0,m.useReducer)(sX,sU),{query:_,memoryStatus:p,chatStatus:h,memoryError:g,noMemoryResultsAtLength:f,noChatResultsAtLength:y}=c,b=(0,m.useCallback)(e=>{u({type:"SET_QUERY",payload:e})},[]),[x,v]=(0,m.useState)(null),w=(0,m.useRef)(0),S=(0,m.useRef)(null),[C,k]=(0,m.useReducer)(sH,sY),{groupedMemories:j,filteredMemories:E,isLoading:N,isFetching:T,error:R}=C,I=(0,m.useMemo)(()=>"memories"===l&&!_.trim()&&j.length>0?j:E,[l,_,j,E]),M=(0,m.useRef)(!1),L=(0,m.useRef)(j),[P,D]=(0,m.useReducer)(sQ,sW),{history:F,groupedSessions:B,filteredSessions:z,isLoading:Y,error:H}=P,U=(0,m.useRef)(!1),X=(0,m.useMemo)(()=>"chats"===l&&!_.trim()&&B.length>0?B:z,[l,_,B,z]),[W,Q]=(0,m.useState)([]),$=(0,m.useRef)(null),G=sv({autoExpandCount:3,disableAnimationOnInit:!0}),V=sv({autoExpandCount:1,disableAnimationOnInit:!0}),{initializeExpansion:q,disableAnimations:J}=G,{initializeExpansion:K,disableAnimations:Z}=V,ee=(0,m.useCallback)(e=>{J(),Z(),d(e)},[J,Z]),et=G.isAnimationDisabled||V.isAnimationDisabled,[en,er]=(0,m.useState)(!1),[es,eo]=(0,m.useState)({name:"",occupation:"",preferredLanguage:"English",personalizationPrompt:""}),[ea,ei]=(0,m.useState)(!1),{onelinkUrl:el}=(0,sF.useReferralLink)(),[ed,ec]=(0,m.useState)(!0),[eu,e_]=(0,m.useState)({isOpen:!1,type:null,id:null,title:null,isDeleting:!1}),em=(0,m.useMemo)(()=>t?(0,sS.createMemoryService)(()=>t.getIdToken(),{getDefaultHeaders:()=>({"x-vercel-protection-bypass":"K1oNTqR7cjtbhehlqxQgxSP9As13QAeE"})}):null,[t]),ep=(0,m.useMemo)(()=>t?(0,sw.createChatService)(()=>t.getIdToken(),{getDefaultHeaders:()=>({"x-vercel-protection-bypass":"K1oNTqR7cjtbhehlqxQgxSP9As13QAeE"})}):null,[t]);L.current=j;let eh=(0,m.useCallback)(async()=>
68{if(t&&!M.current){if(k({type:"CLEAR_ERROR"}),(0,sO.isTestUserMode)()){k({type:"FETCH_START"}),k({type:"FETCH_SUCCESS",payload:{grouped:rp(sO.mockMemories)}}),M.current=!1;return}if(!em){k({type:"SET_GROUPED",payload:[]}),k({type:"FETCH_COMPLETE"});return}M.current=!0,k({type:"FETCH_START"});try{let e=[],t=0,n=!0,r=!0;for(;n;){let s=await em.getMemoryTitles({distinctByMeeting:!0,limit:30,offset:t}),o=s?.memories??[];if(!Array.isArray(o)||0===o.length){n=!1;break}e=[...e,...o];let a=sB({memories:e}).map(e=>{let t=0;if(e.start_time&&e.end_time){let n=new Date(e.start_time).getTime(),r=new Date(e.end_time).getTime();isNaN(n)||isNaN(r)||(t=Math.round((r-n)/1e3))}return{id:e.meeting_id,title:e.meeting_title||e.title||"",summary:"",createdAt:e.time_created||e.start_time||"",modifiedAt:e.date_modified||"",start_time:e.start_time,end_time:e.end_time,duration:t,action:"",transcript:"",summaryTitle:e.meeting_title||e.title,summaryText:"",is_duplicate:!1,original_uuid:"",summary_owner:"",summary_id:e.summary_id||"",hasAudio:e.hasAudio,lifecycle_status:e.lifecycle_status,metadata:e.metadata}});k({type:"SET_GROUPED",payload:rp(a)}),r&&(k({type:"FETCH_COMPLETE"}),r=!1),t+=30,n=30===o.length}}catch(t){let e=t instanceof Error?t.message:"Failed to load memories";s$.error({err:t},"Fetch memories failed"),k({type:"FETCH_ERROR",payload:e})}finally{M.current=!1,k({type:"FETCH_COMPLETE"})}}},[t,em]),eg=(0,m.useCallback)(e=>{$.current=e},[]),ef=(0,m.useCallback)(async()=>{if(t&&!U.current){if((0,sO.isTestUserMode)()){U.current=!0,D({type:"FETCH_START"});let e=rh(sO.mockChatSessions);D({type:"FETCH_SUCCESS",payload:{history:sO.mockChatSessions,grouped:e}}),U.current=!1;return}if(U.current=!0,D({type:"FETCH_START"}),!ep){D({type:"FETCH_SUCCESS",payload:{history:[],grouped:[]}}),U.current=!1;return}try{let e,t=[],n=0;do{n++;let r=await ep.listChats({limit:100,cursor:e}),s=new Set(t.map(e=>e.session_id)),o=r.sessions.filter(e=>!s.has(e.session_id));t=[...t,...o];let a=rh(t);D({type:"ADD_SESSIONS",payload:{history:t,grouped:a,filtered:a}}),e=r.nextCursor??void 0}while(e&&n<100)e&&n>=100&&s$.warn({maxIterations:100},"Fetch chat history stopped: MAX_ITERATIONS reached")}catch(t){let e=t instanceof Error?t.message:"Failed to load chat history";s$.error({err:t},"Fetch chat history failed"),D({type:"FETCH_ERROR",payload:e})}finally{U.current=!1}}},[t,ep]),ey=(0,m.useCallback)(async()=>{Q([])},[]);(0,m.useEffect)(()=>{let e=setTimeout(()=>{eh()},100);return()=>clearTimeout(e)},[eh]),(0,m.useEffect)(()=>{"chats"===l&&0===F.length&&t&&ef()},[l,t,ef,F.length]),(0,m.useEffect)(()=>{if("memories"!==l)return;let e=_.trim();if(!e){L.current.length>0&&k({type:"SET_FILTERED",payload:L.current}),u({type:"MEMORY_SEARCH_IDLE"}),u({type:"CLEAR_ERROR"}),u({type:"RESET_NO_RESULTS"});return}if(null!==f&&e.length>=f){u({type:"MEMORY_SEARCH_IDLE"}),k({type:"SET_FILTERED",payload:[]});return}if(u({type:"MEMORY_SEARCH_START"}),k({type:"SET_FILTERED",payload:[]}),!t&&!(0,sO.isTestUserMode)()){var n;let t,r=(n=L.current,(t=e.toLowerCase().trim())?n.map(e=>({date:e.date,memories:e.memories.filter(e=>{let n=e.title?.toLowerCase()||"",r=e.summary?.toLowerCase()||"",s=e.action?.toLowerCase()||"",o=e.transcript?.toLowerCase()||"";return n.includes(t)||r.includes(t)||s.includes(t)||o.includes(t)})})).filter(e=>e.memories.length>0):n);k({type:"SET_FILTERED",payload:r}),u({type:"MEMORY_SEARCH_SUCCESS",payload:{hasResults:r.length>0,queryLength:e.length}});return}let r=w.current+1;w.current=r;let s=window.setTimeout(()=>{if((0,sO.isTestUserMode)()){let t=sO.mockMemories.filter(t=>t.title.toLowerCase().includes(e.toLowerCase()));if(w.current===r){let n=rp(t);k({type:"SET_FILTERED",payload:n}),u({type:"MEMORY_SEARCH_SUCCESS",payload:{hasResults:n.length>0,queryLength:e.length}})}return}sk(e,()=>t?.getIdToken()??Promise.resolve(null),50).then(t=>{w.current===r&&(k({type:"SET_FILTERED",payload:t}),u({type:"MEMORY_SEARCH_SUCCESS",payload:{hasResults:t.length>0,queryLength:e.length}}))}).catch(e=>{w.current===r&&(u({type:"MEMORY_SEARCH_ERROR",payload:e instanceof Error?e.message:"Unable to search memories."}),k({type:"SET_FILTERED",payload:[]}))})},250);return()=>clearTimeout(s)},[l,_,t,f]),(0,m.useEffect)(()=>
68{if("chats"!==l)return;let e=_.trim();if(!e){D({type:"SET_FILTERED",payload:B}),u({type:"CHAT_SEARCH_IDLE"});return}if(null!==y&&e.length>=y){u({type:"CHAT_SEARCH_IDLE"}),D({type:"SET_FILTERED",payload:[]});return}u({type:"CHAT_SEARCH_START"}),D({type:"SET_FILTERED",payload:[]});let t=window.setTimeout(()=>{let t=rb(B,e);D({type:"SET_FILTERED",payload:t}),u({type:"CHAT_SEARCH_SUCCESS",payload:{hasResults:t.length>0,queryLength:e.length}})},150);return()=>clearTimeout(t)},[l,_,B,y]),(0,m.useEffect)(()=>{j.length>0&&!_.trim()&&"memories"===l&&q(j)},[j,_,l,q]),(0,m.useEffect)(()=>{B.length>0&&!_.trim()&&"chats"===l&&K(B)},[B,_,l,K]),(0,m.useEffect)(()=>{s(j)},[j,s]),(0,m.useEffect)(()=>{o(B)},[B,o]),(0,m.useEffect)(()=>{if(e){let t=j.some(t=>t.memories.some(t=>t.id===e)),n=B.some(t=>t.sessions.some(t=>t.session_id===e));t?a(e):n&&i(e)}},[e,j,B,a,i]);let eb=(0,m.useCallback)(()=>{M.current=!1,eh()},[eh]),ex=(0,m.useMemo)(()=>"memories"===l?"Search Notes":"chats"===l?"Search Chats":"Search",[l]),ev=(0,m.useCallback)(e=>{k({type:"ADD_MEMORY",payload:"meeting_id"in e?{id:e.meeting_id,title:e.meeting_title,summary:e.summary,summary_owner:e.name,createdAt:e.time_created,modifiedAt:e.time_created,start_time:e.start_time,end_time:e.end_time,duration:parseFloat(String(e.duration))||0,transcript:e.transcript||"",action:e.action||"",summary_id:e.meeting_id,metadata:e.metadata}:e}),s$.debug("New memory added to local memories list")},[]),ew=(0,m.useCallback)(e=>{let{session_id:t,userMessage:n}=e,r={session_id:t,created_at:new Date().toISOString(),title:n.text},s=!_.trim()||ry(r).toLowerCase().includes(_.toLowerCase());D({type:"ADD_CHAT",payload:{session:r,matchesSearch:s}}),ef(),s$.debug("New chat added to local chat list")},[_,ef]),eS=(0,m.useCallback)((e,t)=>{e_({isOpen:!0,type:"memory",id:e,title:t,isDeleting:!1}),(0,t4.track)("webapp_delete_button_clicked_from_sidepanel",{meeting_uuid:e,meeting_title:t})},[]),eC=(0,m.useCallback)((e,t)=>{e_({isOpen:!0,type:"chat",id:e,title:t,isDeleting:!1}),(0,t4.track)("webapp_delete_chat_button_clicked_from_sidepanel",{session_id:e,chat_title:t})},[]),ek=(0,m.useCallback)(()=>{e_({isOpen:!1,type:null,id:null,title:null,isDeleting:!1})},[]),ej=(0,m.useCallback)(async()=>{if(t&&eu.id&&"memory"===eu.type){e_(e=>({...e,isDeleting:!0})),v(null);try{if(!(await sz.deleteMemory(t,eu.id)).success)throw Error("Delete operation failed");(0,t4.track)("webapp_memory_deleted_successfully_from_sidepanel",{meeting_uuid:eu.id,meeting_title:eu.title||"Untitled"}),k({type:"REMOVE_MEMORY",payload:eu.id}),window.dispatchEvent(new CustomEvent("refreshMemoryList",{detail:{deletedMemoryId:eu.id,source:"delete-from-sidepanel"}})),ek(),e===eu.id&&n.push("/")}catch(t){let e=t instanceof Error?t.message:"Failed to delete memory";(0,t4.track)("webapp_memory_delete_failed_from_sidepanel",{meeting_uuid:eu.id,meeting_title:eu.title||"Untitled",error:e}),s$.error({err:t},"Delete memory failed"),r.error(e),v(e),e_(e=>({...e,isDeleting:!1}))}}},[t,eu,ek,e,n,r]),eE=(0,m.useCallback)(async()=>{if(ep&&eu.id&&"chat"===eu.type){e_(e=>({...e,isDeleting:!0})),v(null);try{await ep.deleteChat(eu.id),D({type:"REMOVE_CHAT",payload:eu.id});try{localStorage.removeItem(`@twinmind:chat_conversation_${eu.id}`)}catch{}(0,t4.track)("webapp_chat_deleted_successfully_from_sidepanel",{session_id:eu.id,chat_title:eu.title||"Untitled"}),ek(),e===eu.id&&n.push("/")}catch(t){let e=t instanceof Error?t.message:"Failed to delete chat";(0,t4.track)("webapp_chat_delete_failed_from_sidepanel",{session_id:eu.id,chat_title:eu.title||"Untitled",error:e}),s$.error({err:t},"Delete chat failed"),r.error(e),v(e),e_(e=>({...e,isDeleting:!1}))}}},[ep,eu,ek,e,n,r]),eN=(0,m.useCallback)(async()=>{"memory"===eu.type?await ej():"chat"===eu.type&&await eE()},[eu,ej,eE]);return{activeTab:l,setActiveTab:ee,searchQuery:_,setSearchQuery:b,searchStatus:p,chatSearchStatus:h,searchError:g,searchInputRef:S,searchPlaceholder:ex,noResultsAtQueryLength:f,noChatResultsAtQueryLength:y,memoryError:R,chatError:H,deleteError:x,clearMemoryError:()=>k({type:"CLEAR_ERROR"}),clearChatError:()=>D({type:"CLEAR_ERROR"}),clearDeleteError:()=>v(null),groupedMemories:j,filteredMemories:I,isLoading:N,isFetching:T,chatHistory:F,groupedChatSessions:B,filteredChatSessions:X,isLoadingChats:Y,folders:W,memoryExpansion:G,chatExpansion:V,isTabSwitching:et,scrollC
68ontainerCallbackRef:eg,showPersonalize:en,setShowPersonalize:er,personalizationForm:es,setPersonalizationForm:eo,isSubmitting:ea,setIsSubmitting:ei,showDownloadBanner:ed,setShowDownloadBanner:ec,onelinkUrl:el,user:t,router:n,fetchMemories:eh,refreshMemories:eb,fetchChatHistory:ef,fetchFolders:ey,addMemory:ev,addChat:ew,setSelectedMemoryId:a,setSelectedChatId:i,deleteModalState:eu,openDeleteModal:eS,openDeleteChatModal:eC,closeDeleteModal:ek,confirmDelete:eN,removeMemory:function(e){k({type:"REMOVE_MEMORY",payload:e})}}}({uuid:e}),{setActiveTab:S,setSearchQuery:C,setIsSubmitting:k,setShowPersonalize:j,personalizationForm:E,searchInputRef:N}=w,T=(0,m.useRef)(w.addMemory),R=(0,m.useRef)(w.addChat),I=(0,m.useRef)(w.refreshMemories),M=(0,m.useRef)(w.fetchChatHistory),L=(0,m.useRef)(w.removeMemory),P=(0,m.useRef)(t4.track);(0,m.useEffect)(()=>{T.current=w.addMemory},[w.addMemory]),(0,m.useEffect)(()=>{R.current=w.addChat},[w.addChat]),(0,m.useEffect)(()=>{I.current=w.refreshMemories},[w.refreshMemories]),(0,m.useEffect)(()=>{M.current=w.fetchChatHistory},[w.fetchChatHistory]),(0,m.useEffect)(()=>{L.current=w.removeMemory},[w.removeMemory]),(0,m.useEffect)(()=>{P.current=t4.track},[]);let D=(0,m.useCallback)(e=>{S(e),(0,t4.track)("TabChanged",{tab:e,page_name:"sidepanel"})},[S]),F=(0,m.useCallback)(e=>{C(e)},[C]),B=(0,m.useCallback)(()=>{I.current(),M.current()},[]),z=(0,m.useCallback)(async()=>{if(h){k(!0),b(null);try{await (0,rF.updatePersonalizationSettings)(h,{...E,transcriptionSettings:{translationEnabled:!1,translationLanguage:"",vocabulary:[]}}),j(!1),(0,t4.track)("SavePersonalizationClicked",{page_name:"sidepanel",has_name:!!E.name,has_occupation:!!E.occupation,has_prompt:!!E.personalizationPrompt})}catch(e){e instanceof rO.PersonalizationValidationError?(sG.error({fieldErrors:e.fieldErrors},"Personalization validation failed"),b("Please correct the highlighted fields and try again.")):(sG.error({err:e},"Failed to save personalization"),b("Unable to save personalization right now. Please try again."))}finally{k(!1)}}},[h,k,E,j]),Y=(0,m.useCallback)(()=>{r&&!s&&o&&o(!0),setTimeout(()=>{N.current?.focus()},50)},[r,s,o,N]);(0,m.useImperativeHandle)(_,()=>({openAndFocusSearch:Y}),[Y]);let H=r?s:t,U=(p=(0,m.useRef)(void 0),(0,m.useEffect)(()=>{p.current=H}),p.current);return(0,m.useEffect)(()=>{!1===U&&!0===H&&B()},[B,H,U]),(0,m.useEffect)(()=>{let e=e=>"object"==typeof e&&null!==e,t=t=>{let n=t.detail;if(e(n)&&"memory"in n){let t=n.memory;if(!(e(t)&&"string"==typeof t.id))return;T.current(t),P.current("Memory Added via Event",{memory_id:t.id,source:"transcribe_page"});return}if(e(n)&&"string"==typeof n.meeting_id){let e;T.current((e=n.time_created??n.start_time??new Date().toISOString(),{id:n.meeting_id,title:n.meeting_title??"",summary:n.summary??"",summary_owner:n.name??"",createdAt:e,modifiedAt:e,start_time:n.start_time??e,end_time:n.end_time??"",duration:"number"==typeof n.duration?n.duration:Number(n.duration??0),transcript:n.transcript??"",action:n.action??"",summary_id:n.meeting_id,metadata:n.metadata})),P.current("Memory Added via Event",{memory_id:n.meeting_id,source:"transcribe_page"})}};return window.addEventListener("memoryAdded",t),()=>{window.removeEventListener("memoryAdded",t)}},[]),(0,m.useEffect)(()=>{let e=e=>"object"==typeof e&&null!==e,t=t=>{let n,r=t.detail;if(!e(r))return;let s="string"==typeof r.session_id?r.session_id:"string"==typeof r.sessionId?r.sessionId:null;s&&e(n=r.userMessage)&&"string"==typeof n.text&&R.current({session_id:s,userMessage:r.userMessage})};return window.addEventListener("newChatCreated",t),()=>{window.removeEventListener("newChatCreated",t)}},[]),(0,m.useEffect)(()=>{let e=e=>{let t=e.detail;"object"==typeof t&&null!==t&&"deletedMemoryId"in t&&"string"==typeof t.deletedMemoryId&&L.current(t.deletedMemoryId),I.current(),P.current("Memory List Refreshed via Event",{source:"external_trigger"})};return window.addEventListener("refreshMemoryList",e),()=>{window.removeEventListener("refreshMemoryList",e)}},[]),(0,i.jsx)(rz,{children:(0,i.jsx)(sP,{uuid:e,isExpanded:t,isMobile:r,isMobileOpen:s,setMobileOpen:o,onExpandedChange:n,className:a,...w,personalizationError:y,onTabChange:D,onSearchChange:F,onPersonalizationSubmit:z,onSignOut:v,onOpenChangelog:x,onOpenProfile:d,onOpenSettings:c,onCloseSidepanel:u})})});sV.displayName="SidepanelContainer";var sq=e.i(844763);e.i(421351);var sJ=e.i(167815);function sK({tabs:e,activeTab:t,onTabChange:n}){return(0,i.jsx)("div",{className:"flex gap-2",role:"tablist","aria-label":"Search result categories",children:e.map(e=>{let r=t===e.id;return(0,i.jsx)(sJ.Button,{id:`tab-${e.id}`,onClick:()=>n(e.id),className:(0,tW.cn)("h-9 px-4 py-2 rounded-[32px] text-base transition-colors border-[0.5px] flex items-center justify-center gap-[7px]","bg-transparent hover:bg-transparent shadow-none",r?"bg-brand-primary-selected-bg border-brand-primary text-brand-primary font-medium":"bg-white border-brand-primary/60 text-brand-primary font-normal"),"aria-selected":r,"aria-controls":e.ariaControl
68s,role:"tab",children:e.label},e.id)})})}var sZ=e.i(867927);function s0({date:e,isExpanded:t,shouldAnimate:n,onToggle:r}){return(0,i.jsxs)(sJ.Button,{onClick:r,className:"flex items-center justify-between py-[12px] pl-[12px] pr-2 rounded-[99px] w-full hover:bg-gray-50 transition-colors bg-transparent border-none h-auto shadow-none","aria-expanded":t,children:[(0,i.jsx)("span",{className:"capitalize font-semibold text-brand-primary text-[14px] leading-normal whitespace-nowrap",children:rg(e)}),(0,i.jsx)(sZ.ChevronRight,{className:(0,tW.cn)("w-[17px] h-[17px] text-brand-primary shrink-0",n&&"transition-transform duration-200",t&&"rotate-90"),"aria-hidden":"true"})]})}function s1({memory:e,index:t,searchQuery:n,isSearching:r,selectedMemoryId:s,formattedDate:o,formattedTime:a,formattedDuration:l,onClick:d,highlightSearchMatch:c}){let u=e.id===s,_=0===t&&r,m=r&&o;return(0,i.jsxs)("div",{className:`flex flex-col gap-2 px-2 py-1 rounded-lg cursor-pointer transition-colors duration-100 w-full ${u||_?"bg-app-bg-item-selected":"hover:bg-app-bg-item-hover active:bg-app-bg-item-hover"}`,onClick:()=>d(e.id),onKeyDown:t=>{("Enter"===t.key||" "===t.key)&&(t.preventDefault(),d(e.id))},tabIndex:0,"aria-selected":u,role:"option",children:[(0,i.jsxs)("div",{className:"flex items-center justify-between gap-2 min-w-0 w-full",children:[(0,i.jsx)("p",{className:"font-medium text-brand-primary text-[14px] leading-normal flex-1 min-w-0 block truncate max-w-[240px]",title:e.title,children:r?c(e.title,n):e.title}),(e.hasAudio||e.metadata?.isAudioTranscribe)&&(0,i.jsx)(nD,{size:16,strokeWidth:1.5,className:"text-brand-primary shrink-0"})]}),(0,i.jsxs)("div",{className:"flex gap-1 items-center",children:[m&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)("p",{className:"font-medium text-brand-primary text-xs opacity-60",children:o}),(0,i.jsx)("span",{className:"size-px bg-brand-primary opacity-60"})]}),(0,i.jsx)("p",{className:"font-medium text-brand-primary text-xs opacity-60",children:a}),l&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)("span",{className:"size-px bg-brand-primary opacity-60"}),(0,i.jsx)("p",{className:"font-medium text-brand-primary text-xs opacity-60",children:l})]})]})]})}function s5({session:e,index:t,searchQuery:n,isSearching:r,selectedChatId:s,formattedDate:o,formattedTime:a,onClick:l,highlightSearchMatch:d,getChatTitle:c}){let u=e.session_id===s,_=0===t&&r,m=r&&o,p=c(e);return(0,i.jsxs)("div",{className:`flex flex-col gap-2 px-2 py-1 rounded-lg cursor-pointer transition-colors duration-100 w-full ${u||_?"bg-app-bg-item-selected":"hover:bg-app-bg-item-hover active:bg-app-bg-item-hover"}`,onClick:()=>l(e),"aria-selected":u,role:"option",children:[(0,i.jsx)("p",{className:"font-medium text-brand-primary text-[14px] leading-normal w-full block truncate max-w-[240px]",title:p,children:r?d(p,n):p}),(0,i.jsxs)("div",{className:"flex gap-1 items-center",children:[m&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)("p",{className:"font-medium text-brand-primary text-xs opacity-60",children:o}),(0,i.jsx)("span",{className:"size-px bg-brand-primary opacity-60"})]}),(0,i.jsx)("p",{className:"font-medium text-brand-primary text-xs opacity-60",children:a})]})]})}var s2=e.i(744339);let s4=[{id:"memories",label:"Notes",ariaControls:"search-results-memories"},{id:"chats",label:"Chats",ariaControls:"search-results-chats"}],s3="No results found.",s6="Start typing to search notes...",s7="No notes",s8="No chat results found.",s9="Start typing to search chats...",oe="No chats",ot=(e,t)=>{if(!t.trim())return e;let n=t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),r=RegExp(`(${n})`,"gi");return e.split(r).map((e,t)=>RegExp(`^${n}`,"i").test(e)?(0,i.jsx)("span",{className:"text-brand-primary inline",children:e},t):(0,i.jsx)("span",{className:"text-brand-primary/60 inline",children:e},t))},on=e=>{let t=new Date(e);if(isNaN(t.getTime()))return"";let n=(t.getMonth()+1).toString().padStart(2,"0"),r=t.getDate().toString().padStart(2,"0"),s=t.getFullYear().toString().slice(-2);return`${n}/${r}/${s}`};function or({items:e,expandedGroups:t,shouldAnimateChevrons:n,shouldAnimateContent:r,borderColor:s,onToggleGroup:o,renderItem:a,getItemKey:l}){return(0,i.jsx)("div",{className:`flex flex-col ${s2.SEARCH_RESULTS_SPACING.GROUP_GAP}`,children:e.map(({date:e,items:d})=>(0,i.jsxs)("div",{className:`flex flex-col ${s2.SEARCH_RESULTS_SPACING.GROUP_GAP}`,children:[(0,i.jsx)(s0,{date:e,isExpanded:t[e],shouldAnimate:n,onToggle:()=>
68o(e)}),(0,i.jsx)(rt.AnimatePresence,{initial:r,children:t[e]&&(0,i.jsxs)(re.motion.div,{initial:r?{height:0,opacity:0}:void 0,animate:{height:"auto",opacity:1},exit:r?{height:0,opacity:0}:void 0,transition:{duration:.3*!!r,ease:"easeInOut",opacity:{duration:.2*!!r}},style:{overflow:"hidden"},className:`flex ${s2.SEARCH_RESULTS_SPACING.BORDER_GAP} w-full`,children:[(0,i.jsx)("div",{className:`w-1 ${s} shrink-0`}),(0,i.jsx)("div",{className:`flex flex-col ${s2.SEARCH_RESULTS_SPACING.ITEM_GAP} flex-1`,children:d.map((e,t)=>(0,i.jsx)(m.default.Fragment,{children:a(e,t)},l(e)))})]})})]},e))})}function os({activeTab:e,displayMemories:t,displayChats:n,expandedGroups:r,shouldAnimateChevrons:s,shouldAnimateContent:o,searchQuery:a,selectedMemoryId:l,selectedChatId:d,isSearching:c,hasAnyMemories:u,hasAnyChats:_,onTabChange:m,onToggleGroup:p,onMemoryClick:h,onChatClick:g,popoverRef:f}){return(0,i.jsx)("div",{ref:f,className:"absolute top-full inset-x-0 mt-2 bg-white border-[0.5px] border-brand-primary-light rounded-2xl shadow-lg z-[60] max-h-[600px] overflow-x-hidden flex flex-col w-[345px]",role:"dialog","aria-label":"Search results","aria-modal":"true",style:{overflowX:"hidden"},children:(0,i.jsxs)("div",{className:"flex flex-col gap-4 p-[14px]",children:[(0,i.jsx)(sK,{tabs:s4,activeTab:e,onTabChange:m}),(0,i.jsx)("div",{id:"memories"===e?"search-results-memories":"search-results-chats",className:"overflow-y-auto overflow-x-hidden flex-1 min-h-0",role:"tabpanel","aria-labelledby":`tab-${e}`,children:"memories"===e?t.length>0?(0,i.jsx)(or,{items:t.map(({date:e,memories:t})=>({date:e,items:t})),expandedGroups:r,shouldAnimateChevrons:s,shouldAnimateContent:o,borderColor:s2.SEARCH_RESULTS_BORDERS.MEMORIES,onToggleGroup:p,getItemKey:e=>e.id,renderItem:(e,t)=>{let n=e.start_time||e.createdAt;return(0,i.jsx)(s1,{memory:e,index:t,searchQuery:a,isSearching:c,selectedMemoryId:l,formattedDate:n?on(n):void 0,formattedTime:rv(n),formattedDuration:"number"==typeof e.duration?rx(e.duration):void 0,onClick:h,highlightSearchMatch:ot},e.id)}}):c?(0,i.jsx)("div",{className:"p-4 text-gray-500 text-center",children:s3}):u?(0,i.jsx)("div",{className:"p-4 text-gray-500 text-center",children:s6}):(0,i.jsx)("div",{className:"p-4 text-gray-500 text-center",children:s7}):n.length>0?(0,i.jsx)(or,{items:n.map(({date:e,sessions:t})=>({date:e,items:t})),expandedGroups:r,shouldAnimateChevrons:s,shouldAnimateContent:o,borderColor:s2.SEARCH_RESULTS_BORDERS.CHATS,onToggleGroup:p,getItemKey:e=>e.session_id,renderItem:(e,t)=>(0,i.jsx)(s5,{session:e,index:t,searchQuery:a,isSearching:c,selectedChatId:d,formattedDate:on(e.created_at),formattedTime:rv(e.created_at),onClick:g,highlightSearchMatch:ot,getChatTitle:ry},e.session_id)}):c?(0,i.jsx)("div",{className:"p-4 text-gray-500 text-center",children:s8}):_?(0,i.jsx)("div",{className:"p-4 text-gray-500 text-center",children:s9}):(0,i.jsx)("div",{className:"p-4 text-gray-500 text-center",children:oe})})]})})}function oo({searchQuery:e,groupedMemories:t,groupedChatSessions:n,selectedMemoryId:r,selectedChatId:s,onResultSelect:o,onClose:a,isOpen:l}){let[d,c]=(0,m.useState)("memories"),[u,_]=(0,m.useState)({memories:{},chats:{}}),[p,h]=(0,m.useState)(!1),g=(0,m.useRef)(d),f=(0,m.useRef)(e),y=(0,m.useRef)(l);(g.current!==d||f.current!==e||y.current!==l)&&(g.current=d,f.current=e,y.current=l,p&&h(!1));let b=(0,m.useRef)(null),x=(0,rn.useGuardedRouter)(),v=""===e.trim()?t:t.map(t=>rf(t.date,e)?t:{...t,memories:t.memories.filter(t=>t.title.toLowerCase().includes(e.toLowerCase()))}).filter(e=>e.memories.length>0),w=rb(n,e),S=(0,m.useCallback)(()=>{let e={};return"memories"===d?v.forEach(t=>{e[t.date]=!0}):w.forEach(t=>{e[t.date]=!0}),e},[d,v,w]),C=(0,m.useCallback)(()=>{let e={};if("memories"===d&&r){for(let n of t)if(n.memories.some(e=>e.id===r)){e[n.date]=!0;break}}else if("chats"===d&&s){for(let t of n)if(t.sessions.some(e=>e.session_id===s)){e[t.date]=!0;break}}return e},[d,r,s,t,n]),k=(0,m.useCallback)(e=>{"Escape"===e.key&&l&&a()},[l,a]);(0,m.useEffect)(()=>{if(l)return document.addEventListener("keydown",k),()=>{document.removeEventListener("keydown",k)}},[l,k]);let j=e.trim().length>0,E=u[d],N=(0,m.useMemo)(()=>
68{if(j)return{...S(),...E};let e=C();return Object.keys(e).length>0?{...e,...E}:E},[j,S,C,E]),T=j?v:t,R=j?w:n,A=t.some(e=>e.memories.length>0),I=n.some(e=>e.sessions.length>0);return l?(0,i.jsx)(os,{activeTab:d,displayMemories:T,displayChats:R,expandedGroups:N,shouldAnimateChevrons:p,shouldAnimateContent:p,searchQuery:e,selectedMemoryId:r,selectedChatId:s,isSearching:j,hasAnyMemories:A,hasAnyChats:I,onTabChange:c,onToggleGroup:e=>{h(!0),_(t=>{let n=t[d]||{};return{...t,[d]:{...n,[e]:!n[e]}}})},onMemoryClick:e=>{o("memory",e),x.push(`/m/${e}`),setTimeout(()=>{a()},100)},onChatClick:e=>{o("chat",e.session_id),x.push(`/c/${e.session_id}`),setTimeout(()=>{a()},100)},popoverRef:b}):null}function oa({isAuthenticated:e,isMobileView:t,pathname:n,uuid:r,isMemoryRoute:s,isTodoRoute:o,isRecordCallRoute:a,searchQuery:l,isMobileSearchActive:d,isSearchPopoverOpen:c,selectedMemoryId:u,selectedChatId:_,groupedMemories:m,groupedChatSessions:p,searchPlaceholder:h,searchWidth:g,onSearchChange:f,onResultSelect:y,onMobileNavOpen:b,onCloseMobileSearch:x,onNavigate:v,onPrefetchTodoLists:w,onOpenSearchPopover:S,onCloseSearchPopover:C,onOpenMobileSearch:k,searchDropdownRef:j,searchInputRef:E,canStartNewChat:N=!0,rightActions:T,mobileDownloadBannerVisible:R=!1,currentPlan:A="free",showFadeInAnimation:I=!1}){if(n?.startsWith("/onboarding"))return null;let M=R&&("/"===n||"/todo"===n||"/transcribe"===n||"/enhance-transcribe"===n||"/my-mind"===n||n?.startsWith("/digest")),L="/"===n,P=L&&t&&e,D=M?nU.MOBILE_BANNER_HEIGHT:0,O=!t&&(n?.startsWith("/m/")||n?.startsWith("/s/"))||n?.startsWith("/digest");return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)("div",{className:`z-50 ${L?"fixed left-0 right-0 bg-transparent transition-[top] duration-300 ease-out":M?"fixed left-0 right-0 bg-app-bg-navbar border-b border-gray-200 transition-[top] duration-300 ease-out":!t&&(n?.startsWith("/m/")||n?.startsWith("/s/"))||n?.startsWith("/digest")?"fixed top-0 left-0 right-0 bg-app-bg-navbar border-b border-gray-200 z-50":"sticky top-0 bg-app-bg-navbar border-b border-gray-200"}`,style:{"--navbar-height":"64px",height:"64px",...M?{top:D}:{}},children:(0,i.jsxs)("div",{className:`flex items-center h-full ${t?"justify-between gap-2 px-6":"gap-4 px-6"} ${I?"animate-navbar-fade-in":""}`,children:[e&&!t&&(0,i.jsx)(nX.MobileNavbar.Hamburger,{onClick:b}),t&&e&&(0,i.jsxs)(i.Fragment,{children:[P?(0,i.jsx)(nX.MobileNavbar.ViewMemories,{onClick:S}):(0,i.jsxs)("div",{className:"flex min-w-0 flex-1 items-center gap-2",children:[(0,i.jsx)(nX.MobileNavbar.Hamburger,{onClick:b}),(0,i.jsx)("div",{"data-testid":"mobile-navbar-search",className:"min-w-0 w-[50vw] max-w-[50vw]",onMouseDownCapture:e=>e.stopPropagation(),children:(0,i.jsx)(nQ,{value:l,onChange:f,placeholder:"View Memories",onFocus:()=>{S()},className:"w-full"})})]}),(0,i.jsxs)(nX.MobileNavbar.Actions,{className:"shrink-0 gap-1",children:[T,(0,i.jsx)(nY.default,{href:"/",onClick:()=>(0,t4.track)("webapp_navbar_logo_clicked"),className:"flex items-center transition-opacity hover:opacity-80 active:opacity-70",children:(0,i.jsx)(nC.default,{src:"/icons/twin_mind_icon_home_page_black.svg",alt:"TwinMind",width:42,he
68ight:28,className:"h-7 w-[42px] object-contain"})}),N&&(0,i.jsx)(nX.MobileNavbar.NewChat,{onClick:()=>{(0,t4.track)("webapp_new_chat_button_clicked"),v("/")}})]})]}),t&&!e&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)("div",{className:"flex items-center",children:(0,i.jsx)(nC.default,{src:"/icons/twin_mind_icon_home_page_black.svg",alt:"TwinMind",width:51,height:28,className:"h-7 w-auto"})}),(0,i.jsx)("button",{type:"button",onClick:()=>{(0,t4.track)("webapp_sign_in_button_clicked"),v("/login")},className:"bg-[#0b4f75] hover:bg-[#0b4f75]/80 duration-300 transition-all text-white rounded-full px-4 py-2 text-sm font-medium",children:"Sign in"})]}),!t&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsxs)("div",{className:"flex items-center gap-4 grow",children:[!e&&(0,i.jsx)("div",{className:"flex items-center",children:(0,i.jsx)(nC.default,{src:"/icons/twin_mind_icon_home_page_black.svg",alt:"TwinMind",width:58,height:32,className:"h-8 w-auto"})}),e&&!t&&(0,i.jsxs)("div",{className:"relative group w-full",ref:j,style:g?{maxWidth:`${g}px`}:void 0,children:[(0,i.jsx)(nQ,{ref:E,value:l,onChange:f,placeholder:h,onFocus:e=>{e.stopPropagation(),window.innerWidth<450?k():S()}}),c&&!d&&(0,i.jsx)(oo,{searchQuery:l,groupedMemories:m,groupedChatSessions:p,selectedMemoryId:u,selectedChatId:_,onResultSelect:y,onClose:C,isOpen:c})]}),d&&(0,i.jsx)("div",{className:"fixed inset-0 z-9999 bg-black/50",children:(0,i.jsxs)("div",{className:"fixed inset-0 bg-app-bg-navbar flex flex-col",children:[(0,i.jsxs)("div",{className:"flex items-center gap-3 p-4 border-b border-gray-200",children:[(0,i.jsx)("button",{type:"button",onClick:x,className:"p-2 hover:bg-gray-100 rounded-full transition-colors",children:(0,i.jsx)(nL.ArrowLeft,{size:20,className:"text-gray-700"})}),(0,i.jsxs)("div",{className:"flex-1 relative",children:[(0,i.jsx)("div",{className:"absolute inset-y-0 left-0 pl-3 flex items-center pointer-events-none",children:(0,i.jsx)(nB.Search,{className:"size-5 text-[#0B4F7533]"})}),(0,i.jsx)("input",{type:"text",ref:E,placeholder:"Search",value:l,onChange:e=>f(e.target.value),className:"w-full pl-10 pr-4 py-2 placeholder-[#0B4F7533] border border-[#0B4F7566] rounded-full focus:outline-hidden focus:border-[#0B4F75]"})]})]}),(0,i.jsx)("div",{className:"flex-1 overflow-hidden",children:(0,i.jsx)(sV,{uuid:r,isMobile:!0,isMobileOpen:!0,setMobileOpen:()=>{},isExpanded:!0,onExpandedChange:()=>{},onCloseSidepanel:x})})]})})]}),(0,i.jsx)("div",{className:"flex items-center gap-6 shrink-0",children:e?(0,i.jsxs)(i.Fragment,{children:[(0,i.jsxs)("div",{className:`hidden lg:flex items-center gap-6 ${I?"animate-navbar-fade-in":""}`,children:[N&&(0,i.jsxs)(nY.default,{href:"/?reset=true",onClick:()=>(0,t4.track)("webapp_new_chat_button_clicked"),className:"flex items-center gap-1.5 px-5 py-2 h-[38px] bg-white rounded-[32px] text-[#0b4f75] transition-colors hover:bg-[#f1f3f5]",children:[(0,i.jsx)(nz.SquarePen,{size:18}),(0,i.jsx)("span",{className:"font-medium text-sm tracking-[-0.14px]",children:"New Chat"})]}),(0,i.jsxs)(nY.default,{href:"/digest",onClick:()=>(0,t4.track)("ViewDigestButtonClicked"),className:"flex items-center gap-1.5 px-5 py-2 h-[38px] bg-white rounded-[32px] text-[#0b4f75] transition-colors hover:bg-[#f1f3f5]","data-testid":"desktop-digest-link",children:[(0,i.jsx)(nH.LampChargeIcon,{}),(0,i.jsx)("span",{className:"font-medium text-sm tracking-[-0.14px]",children:"View Digest"})]}),(0,i.jsxs)(nY.default,{href:"/todo",onMouseEnter:w,onFocus:w,onClick:()=>{(0,t4.track)("webapp_todo_list_button_clicked"),w()},className:"flex items-center gap-1.5 px-5 py-2 h-[38px] bg-white rounded-[32px] text-[#0b4f75] transition-colors hover:bg-[#f1f3f5]",children:[(0,i.jsx)(nO,{size:18}),(0,i.jsx)("span",{className:"font-medium text-sm tracking-[-0.14px]",children:"To-Do List"})]}),(0,i.jsxs)(nY.default,{href:"/transcribe",onClick:e=>{(0,t4.track)("webapp_transcribe_button_clicked"),"/transcribe"===n&&(e.preventDefault(),window.dispatchEvent(new Event("transcribe:reset")))},className:"flex items-center gap-1.5 px-5 py-2 h-[38px] bg-white rounded-[32px] text-[#0b4f75] transition-colors hover:bg-[#f1f3f5]",children:[(0,i.jsx)(nD,{size:20}),(0,i.jsx)("span",{className:"font-medium text-sm tracking-[-0.14px]",children:"Transcribe"})]}),(0,i.jsxs)(nY.default,{href:"/record-call",className:"flex items-center gap-1.5 px-5 py-2 h-[38px] bg-white rounded-[32px] text-[#0b4f75] transition-colors hover:bg-[#f1f3f5]",style:{display:"none"},children:[(0,i.jsx)(nF.Mic,{size:16}),(0,i.jsx)("span",{className:"font-medium text-sm tracking-[-0.14px]",children:"Record Phone Call"})]})]}),(0,i.jsxs)("div",{className:"hidden md:flex items-center gap-2",children:[(0,i.jsx)(nY.default,{href:"/",onClick:()=>(0,t4.track)("webapp_navbar_logo_clicked"),className:"flex items-center transition-opacity hover:opacity-80 active:opacity-70",children:(0,i.jsx)(nC.default,{src:"/"===n?"/images/TwinMind Logo 2000px black.svg":"/icons/twin_mind_icon_home_page_black.svg",alt:"TwinMind",width:58,height:32,className:"h-8 w-[58px] object-contain"})}),"max"===A?(0,i.jsx)("span",{className:"flex items-center justify-center px-3 py-1.5 h-7 bg-[#EF6D00] text-white text-[12px] font-semibold italic leading-[1.4] rounded-[32px] whitespace-nowrap select-none",children:"MAX"}):"pro"===A?(0,i.jsx)("span",{className:"flex items-center justify-center px-3 py-1.5 h-7 bg-[#0B4F75] text-white text-[12px] font-semibold leading-[1.4] rounded-[32px] whitespace-nowrap select-none",children:"PRO"}):null]})]}):(0,i.jsxs)(i.Fragment,{children:[!t&&(0,i.jsx)("button",{type:"button",onClick:()=>{(0,t4.track)("webapp_download_mobile_app_button_clicked"),window.open(sq.APP_DOWNLOAD_URLS.ios,"_blank")},className:"bg-[#ff7400] hover:bg-[#ff7400]/80 duration-300 transition-all text-white rounded-full px-4 py-2 flex items-center gap-2",children:"Download Mobile App"}),(0,i.jsx)("button",{type:"button",onClick:()=>{(0,t4.track)("webapp_sign_in_button_clicked"),v("/login")},className:"bg-[#0b4f75] hover:bg-[#0b4f75]/80 duration-300 transition-all text-white rounded-full px-5 py-2 flex items-center gap-2",children:"Sign in"})]})})]})]})}),M&&!L&&(0,i.jsx)("div",{className:"h-16 shrink-0","aria-hidden":!0,style:{height:"64px"}}),O&&!M&&(0,i.jsx)("div",{className:"h-16 shrink-0","aria-hidden":!0,style:{height:"64px"}})]})}var oi=e.i(429174);function ol({isAuthenticated:e,isMobileView:t,pathname:n,uuid:r,isMemoryRoute:s,isTodoRoute:o,isRecordCallRoute:a,prefetchTodoLists:l,searchPlaceholder:d,searchWidth:c,sidepanelRef:u,searchInputRef:_,canStartNewChat:p=!0,mobileDownloadBannerVisible:h=!1,show
68FadeInAnimation:g=!1}){let f=(0,rn.useGuardedRouter)(),[y,b]=(0,m.useState)(!1),[x,v]=(0,m.useState)(!1),{isMax:w,isPro:S}=(0,F.useSubscription)(),{openSidebar:C}=(0,oi.useAppSidebar)(),{searchQuery:k,setSearchQuery:j,isSearchPopoverOpen:E,setIsSearchPopoverOpen:N,selectedMemoryId:T,selectedChatId:R,setSelectedMemoryId:A,setSelectedChatId:I,groupedMemories:L,groupedChatSessions:P}=O(),{rightActions:D}=function(){let e=(0,m.useContext)(M);if(void 0===e)throw Error("useNavbarActions must be used within a NavbarActionsProvider");return e}(),B=(0,m.useRef)(null),z=(0,m.useCallback)(e=>{j(e),e.trim().length>0&&N(!0)},[j,N]),Y=(0,m.useCallback)((e,t)=>{"memory"===e?A(t):I(t),N(!1)},[A,I,N]),H=(0,m.useCallback)(e=>{if(!y&&!E)return;let t=e.target,n=!!t&&B.current?.contains(t),r=e.target?.closest('[role="dialog"][aria-label="Search results"]');n||r||(b(!1),v(!1),N(!1))},[y,E,N]),U=(0,m.useCallback)(()=>{b(!1),v(!1)},[]);!function(e,t,n=nM){let r=(0,nA.useSyncedRef)(t),s=(0,nA.useSyncedRef)(e);(0,m.useEffect)(()=>{function e(e){if(!s.current.current)return;let{target:t}=e,n=r.current;t&&(!t||s.current.current.contains(t))||n.call(this,e)}for(let t of n)(0,nI.on)(document,t,e,{passive:!0});return()=>{for(let t of n)(0,nI.off)(document,t,e,{passive:!0})}},[...n])}(B,H,["mousedown"]),(0,m.useEffect)(()=>(window.addEventListener("closeSearchDropdown",U),()=>{window.removeEventListener("closeSearchDropdown",U)}),[U]);let X=(0,m.useCallback)(()=>{v(!1),b(!1),(0,t4.track)("webapp_close_mobile_search_clicked")},[]),W=(0,m.useCallback)(()=>{v(!0),b(!0),(0,t4.track)("webapp_view_memories_pill_clicked")},[]),Q=(0,m.useCallback)(()=>{(0,t4.track)("webapp_hamburger_menu_clicked"),C()},[C]);(0,m.useEffect)(()=>{if(!x)return;let e=window.requestAnimationFrame(()=>{_.current?.focus()});return()=>{window.cancelAnimationFrame(e)}},[x,_]);let $=(0,m.useCallback)(()=>{(0,t4.track)("webapp_view_memories_pill_clicked"),C(),setTimeout(()=>{u?.current?.openAndFocusSearch()},s2.SIDEBAR_TIMINGS.SIDEBAR_RENDER_DELAY_MS)},[C,u]),G=(0,m.useCallback)(()=>{N(!1)},[N]),V=(0,m.useCallback)(e=>{f.push(e)},[f]);return(0,i.jsx)(oa,{isAuthenticated:e,isMobileView:t,pathname:n,uuid:r,isMemoryRoute:s,isTodoRoute:o,isRecordCallRoute:a,searchQuery:k,isMobileSearchActive:x,isSearchPopoverOpen:E,selectedMemoryId:T??void 0,selectedChatId:R??void 0,groupedMemories:L,groupedChatSessions:P,searchPlaceholder:d,searchWidth:c,onSearchChange:z,onResultSelect:Y,onMobileNavOpen:Q,onCloseMobileSearch:X,onNavigate:V,onPrefetchTodoLists:l,onOpenSearchPopover:$,onCloseSearchPopover:G,onOpenMobileSearch:W,searchDropdownRef:B,searchInputRef:_,canStartNewChat:p,rightActions:D,mobileDownloadBannerVisible:h,currentPlan:w?"max":S?"pro":"free",showFadeInAnimation:g})}let od="w-full rounded-[8px] border border-[#CED8DC] bg-white px-[16px] py-[8px] font-inter text-[14px] font-medium text-[#373746] placeholder:text-[#9DA3AF] placeholder:font-medium focus:border-[#0B4F75] focus:outline-none focus:ring-1 focus:ring-[#0B4F75] transition-colors disabled:opacity-50",oc=`${od} h-[36px] leading-[16px]`,ou=`${od} h-[134px] leading-[20px] resize-none`,o_=[{id:"personalization-name",label:"What should TwinMind call you?",placeholder:"e.g, John Doe",field:"name",type:"input"},{id:"personalization-occupation",label:"What do you do?",placeholder:"Student, engineer, etc",field:"occupation",type:"input"},{id:"personalization-language",label:"Preferred language for summaries and responses",placeholder:"e.g, English",field:"preferredLanguage",type:"input"},{id:"personalization-prompt",label:"Anything else TwinMind should know about you?",placeholder:"e.g, I am a product designer at TwinMind. Use concise summaries that cut right to the chase of the answer I am looking for.",field:"personalizationPrompt",type:"textarea"}];function om(){return(0,i.jsx)(n1.View,{style:{paddingBottom:8},children:(0,i.jsx)(n0.Text,{style:{fontSize:20,fontWeight:"600",color:"#0B4F75"},children:"Personalization"})})}function op({value:e,onChange:t,isSaving:n=!1}){return(0,i.jsx)("div",{className:"flex flex-col gap-[20px]",children:o_.map(r=>{let s={id:r.id,name:r.id,placeholder:r.placeholder,value:e[r.field],onChange:e=>t(r.field,e.target.value)};return(0,i.jsxs)("div",{className:"flex flex-col gap-[8px]",children:[(0,i.jsx)("label",{className:"font-inter text-[14px] font-medium text-[#26283B] leading-[28px] tracking-[-0.44px]",htmlFor:r.id,children:r.label}),"textarea"===r.type?(0,i.jsx)("textarea",{...s,className:ou,disabled:n}):(0,i.jsx)("input",{type:"text",...s,className:oc,disabled:n})]},r.id)})})}function oh({onClose:e,onSubmit:t,isSaving:n=!1}){return(0,i.jsxs)("div",{className:"flex justify-end gap-[12px] p-4",children:[(0,i.jsx)("button",{type:"button",onClick:e,disabled:n,className:"h-[44px] px-[20px] py-[10px] rounded-[32px] border border-[#85A7BA] bg-white font-inter text-[14px] font-medium text-[#85A7BA] leading-[1.4] transition-colors hover:bg-[#F8F9FA] disabled:opacity-50",children:"Cancel"}),(0,i.jsx)("button",{type:"button",onClick:t,disabled:n,className:"h-[44px] px-[20px] py-[10px] rounded-[32px] bg-[#0B4F75] font-inter text-[14px] font-medium text-white leading-[1.4] transition-colors hover:bg-[#094161] disabled:bg-[#B2CBD9] disabled:cursor-not-allowed",children:n?"Saving...":"Save"})]})}
68function og({value:e,onChange:t,onClose:n,onSubmit:r,isSaving:s=!1}){let o=(0,z.useMediaQuery)("(max-width: 768px)"),[a,l]=(0,m.useState)(!1);return((0,m.useEffect)(()=>{l(!0)},[]),a)?o?(0,i.jsx)(B.BottomSheet,{open:!0,onDismiss:n,header:(0,i.jsx)(om,{}),footer:(0,i.jsx)(oh,{onClose:n,onSubmit:r,isSaving:s}),snapPoints:({maxHeight:e})=>.85*e,testId:"personalization-modal-sheet",children:(0,i.jsx)("div",{className:"px-4 pb-4",children:(0,i.jsx)(op,{value:e,onChange:t,isSaving:s})})}):(0,i.jsx)(B.Modal,{isOpen:!0,onClose:n,size:"md",padding:!1,className:"max-h-[90vh] overflow-y-auto rounded-xl",dismissButtonProps:{size:20,"aria-label":"Close modal"},children:(0,i.jsxs)("div",{className:"p-6",children:[(0,i.jsx)("h2",{className:"mb-4 text-xl font-semibold text-[#0B4F75]",children:"Personalization"}),(0,i.jsx)(op,{value:e,onChange:t,isSaving:s}),(0,i.jsxs)("div",{className:"mt-6 flex justify-end gap-[12px]",children:[(0,i.jsx)("button",{type:"button",onClick:n,disabled:s,className:"h-[44px] px-[20px] py-[10px] rounded-[32px] border border-[#85A7BA] bg-white font-inter text-[14px] font-medium text-[#85A7BA] leading-[1.4] transition-colors hover:bg-[#F8F9FA] disabled:opacity-50",children:"Cancel"}),(0,i.jsx)("button",{type:"button",onClick:r,disabled:s,className:"h-[44px] px-[20px] py-[10px] rounded-[32px] bg-[#0B4F75] font-inter text-[14px] font-medium text-white leading-[1.4] transition-colors hover:bg-[#094161] disabled:bg-[#B2CBD9] disabled:cursor-not-allowed",children:s?"Saving...":"Save"})]})]})}):null}e.i(582168);var of=e.i(878621);e.i(80704);var oy=e.i(534197),ob=e.i(581822);function ox({message:e,onDismiss:t}){let[n,r]=(0,m.useState)(!1);return((0,m.useEffect)(()=>{let n;if(!e)return void r(!1);(0,t4.track)("PricingBannerShown",{message:e});let s=setTimeout(()=>r(!0),50),o=setTimeout(()=>{r(!1),n=setTimeout(t,300)},4e3);return()=>{clearTimeout(s),clearTimeout(o),clearTimeout(n)}},[e,t]),e)?(0,i.jsx)("div",{role:"status","aria-live":"polite",className:`fixed top-3 left-0 right-0 z-[1100] flex items-center justify-center px-4 py-3 transition-all duration-300 ${n?"translate-y-0 opacity-100":"-translate-y-full opacity-0"}`,children:(0,i.jsxs)("div",{className:"flex items-center gap-3 w-full max-w-[800px] bg-white border border-[#CED3DB] rounded-[12px] px-4 py-3 shadow-[0px_4px_12px_rgba(0,0,0,0.08)]",children:[(0,i.jsxs)("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",className:"shrink-0",children:[(0,i.jsx)("circle",{cx:"10",cy:"10",r:"10",fill:"#0B4F75"}),(0,i.jsx)("path",{d:"M6 10L9 13L14 7",stroke:"white",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})]}),(0,i.jsx)("span",{className:"flex-1 font-inter font-medium text-[14px] text-[#0F0F12] leading-[1.4]",children:e}),(0,i.jsx)("button",{type:"button",onClick:()=>{(0,t4.track)("PricingBannerDismissed",{message:e}),r(!1),setTimeout(t,300)},className:"shrink-0 p-1 hover:bg-gray-100 rounded-full transition-colors cursor-pointer","aria-label":"Dismiss",children:(0,i.jsx)(nx.X,{className:"size-4 text-[#45556C]"})})]})}):null}var ov=e.i(536921);function ow(e){return(0,ov.useSettingsSearchParam)(e),null}function oS(e){return(0,i.jsx)(m.Suspense,{fallback:null,children:(0,i.jsx)(ow,{...e})})}e.i(979310);var oC=e.i(826045),ok=m;let oj="search",oE=(0,d.createModuleLogger)("sidebar-search-param");class oN extends ok.default.Component{state={hasError:!1};static getDerivedStateFromError(e){return{hasError:!0}}componentDidCatch(e,t){oE.error({err:e,componentStack:t.componentStack},"Sidebar search param handler error")}render(){return this.state.hasError?(0,i.jsx)(i.Fragment,{}):this.props.children}}function oT({sidepanelRef:e,setIsMobileNavOpen:t,maxFocusAttempts:n=20,pollInterval:r=50}){return!function(e,t,n=s2.SIDEBAR_TIMINGS.SEARCH_FOCUS_MAX_ATTEMPTS,r=s2.SIDEBAR_TIMINGS.SEARCH_FOCUS_POLL_INTERVAL_MS){let s=(0,T.useSearchParams)(),o=(0,T.useRouter)(),a=(0,T.usePathname)(),i=s.get("sidebar"),d=(0,m.useRef)(!1);(0,m.useEffect)(()=>{if(i===oj&&!d.current){(0,l.isProduction)()||console.log("[useSidebarSearchParam] ð Handling sidebar=search parameter"),d.current=!0;let i=s.toString(),c=a||"/";(0,l.isProduction)()||console.log("[useSidebarSearchParam] ð Opening sidebar..."),t(!0),function(e,t=s2.SIDEBAR_TIMINGS.SEARCH_FOCUS_MAX_ATTEMPTS,n=s2.SIDEBAR_TIMINGS.SEARCH_FOCUS_POLL_INTERVAL_MS,r=s2.SIDEBAR_TIMINGS.SEARCH_FOCUS_INITIAL_DELAY_MS){new Promise(s=>{let o=0,a=()=>{o++;let r=document.querySelector('input[type="text"][placeholder*="Search"]');
68if(r&&null!==r.offsetParent){r.focus(),(0,l.isProduction)()||console.log("[useSidebarSearchParam] â
Search input focused via DOM query"),s(!0);return}if(e.current?.openAndFocusSearch)try{e.current.openAndFocusSearch(),(0,l.isProduction)()||console.log("[useSidebarSearchParam] â
Search input focused via ref method"),s(!0);return}catch(e){(0,l.isProduction)()||console.log("[useSidebarSearchParam] â ï¸ Ref method failed:",e)}o<t?setTimeout(a,n):((0,l.isProduction)()||console.log("[useSidebarSearchParam] â Max attempts reached, could not focus search input"),s(!1))};setTimeout(a,r)})}(e,n,r,s2.SIDEBAR_TIMINGS.SEARCH_FOCUS_INITIAL_DELAY_MS);let u=s2.SIDEBAR_TIMINGS.SEARCH_FOCUS_INITIAL_DELAY_MS+n*r+200;(0,l.isProduction)()||console.log(`[useSidebarSearchParam] â±ï¸ URL cleanup scheduled in ${u}ms`);let _=setTimeout(()=>{(0,l.isProduction)()||console.log("[useSidebarSearchParam] ð§¹ Cleaning up URL parameter...");let e=new URLSearchParams(i);e.delete("sidebar");let t=e.toString();o.replace(t?`${c}?${t}`:c,{scroll:!1}),d.current=!1,(0,l.isProduction)()||console.log("[useSidebarSearchParam] â
URL parameter removed")},u);return()=>{clearTimeout(_)}}i!==oj&&(d.current=!1)},[i,t,o,e,n,r])}(e,t,n,r),null}function oR(e){return(0,i.jsx)(oN,{children:(0,i.jsx)(ok.Suspense,{fallback:null,children:(0,i.jsx)(oT,{...e})})})}var oA=e.i(52160),oI=e.i(977981),oM=e.i(644190),oL=e.i(393423),oP=e.i(625780);function oD({children:e,fontClassName:t,isNativeLogin:n=!1}){let r=(0,T.usePathname)(),s=(0,n_.useQueryClient)(),{user:o,isAuthenticated:c,loading:u,logout:_,analyticsUserId:h}=(0,A.useAuth)(),[,g]=(0,m.useTransition)(),f=(0,m.useRef)(null),y=(0,nu.useDebouncedCallback)(()=>{o&&g(()=>{s.prefetchQuery((0,oC.todoPageListsQueryOptions)(o,h))})},[s,g,o],300),b=(0,m.useCallback)(()=>{y()},[y]),x=(0,t2.useIsDirectHomeBootstrap)(),v=r?!s2.BANNER_EXCLUDED_ROUTES.some(e=>r.startsWith(e))&&!x:!x,w=!r||!s2.SIDEPANEL_EXCLUDED_ROUTES.some(e=>r.startsWith(e)),[S,C]=(0,m.useState)(!1),[k,j]=(0,m.useState)(!1),E=(0,m.useRef)(!1),[N,R]=(0,m.useState)(!1),[I,M]=(0,m.useState)(!1),[L,P]=(0,m.useState)(!1),[D,O]=(0,m.useState)(!1),[F,B]=(0,m.useState)("View Notes & Chats"),[H,U]=(0,m.useState)(()=>(0,s2.getDesktopSidepanelSearchInputWidth)()),X=(0,m.useRef)(null),W=(0,m.useRef)(null),Q=(0,m.useRef)(null),[$,G]=(0,m.useState)(!1),[V,q]=(0,m.useState)(!1),J=(0,m.useRef)(null),K=(0,m.useRef)(null),[Z,ee]=(0,m.useState)({top:0,right:0}),et=(0,z.useMediaQuery)("(max-width: 1023px)"),[en,er]=(0,m.useState)(!1),[es,eo]=(0,m.useState)(!1),{allowCloseInNative:ea,handleCloseSettings:ei,handleCloseSignInModal:el,handleOpenProfile:ed,handleOpenSettings:ec,handleOpenSettingsTab:eu,handleSettingsRequireSignIn:e_,handleSettingsTabChange:em,isSettingsModalOpen:ep,settingsDefaultTab:eh,settingsInitialMobileView:eg,signInRedirectPath:ef}=function(){let e=(0,T.usePathname)(),t=(0,T.useRouter)(),[n,r]=(0,m.useState)(!1),[s,o]=(0,m.useState)("apps"),[a,i]=(0,m.useState)("content"),[l,d]=(0,m.useState)(null),[c,u]=(0,m.useState)(null),_=(n,r=null)=>{let s=e||window.location.pathname||"/",o=new URLSearchParams(window.location.search);n?(o.set(ov.SETTINGS_PARAM_KEY,n),r?o.set(ov.SETTINGS_SOURCE_PARAM_KEY,r):o.delete(ov.SETTINGS_SOURCE_PARAM_KEY)):(o.delete(ov.SETTINGS_PARAM_KEY),o.delete(ov.SETTINGS_SOURCE_PARAM_KEY));let a=o.toString(),i=window.location.hash||"",l=`${s}${a?`?${a}`:""}${i}`;l!==`${window.location.pathname}${window.location.search}${window.location.hash}`&&t.replace(l,{scroll:!1})};return{allowCloseInNative:"artifact"===l,handleCloseSettings:()=>{r(!1),d(null),_(null,null)},handleCloseSignInModal:e=>{u(null),"success"!==e&&_(null,null)},handleOpenProfile:()=>{let e="account";o(e),i("content"),d(null),r(!0),_(e,null)},handleOpenSettings:()=>{let e="account";o(e),i("list"),d(null),r(!0),_(e,null)},handleOpenSettingsTab:(e,t=null)=>{o(e),i("content"),d(t),r(!0),_(e,t)},handleSettingsRequireSignIn:e=>{let t=new URLSearchParams(window.location.search);t.set(ov.SETTINGS_PARAM_KEY,e),u(`${window.location.pathname}?${t.toString()}`)},handleSettingsTabChange:e=>{o(e),_(e,l)},isSettingsModalOpen:n,settingsDefaultTab:s,settingsInitialMobileView:a,signInRedirectPath:c}}(),[ey,eb]=(0,m.useState)(!1),{settings:ex,isSaving:ev,updateField:ew,save:eS}=(0,oA.usePersonalizationSettings)(),eC="true"===a.default.env.NEXT_PUBLIC_DEBUG_PROFILE_PICTURE,ek=(0,l.isProduction)();(0,m.useEffect)(()=>
68{if(eC){if(o)return void d.logger.debug({hasPhotoURL:!!o.photoURL,photoURL:o.photoURL,willRender:c&&!et&&!!o.photoURL},"ð [Profile Picture Debug] Navbar render - user photoURL");d.logger.debug("ð [Profile Picture Debug] Navbar render - no user")}},[o,c,et,eC]);let{onelinkUrl:ej,loading:eE}=(0,sF.useReferralLink)(),{toasts:eN,removeToast:eT}=(0,nk.useToast)(),eR=(0,m.useCallback)(()=>eI(null),[]),[eA,eI]=(0,m.useState)(null);(0,m.useEffect)(()=>{if(eA)return;let e=sessionStorage.getItem("pricing_toast");e&&(sessionStorage.removeItem("pricing_toast"),eI(e))},[r,eA]),(0,m.useEffect)(()=>{let e=e=>{let t=e.detail?.message;t&&eI(t)};return window.addEventListener("pricing-banner",e),()=>window.removeEventListener("pricing-banner",e)},[]);let eM=(0,m.useMemo)(()=>r?.match(/\/(?:[msc]|ce)\/([^/]+)/)?.[1]||"",[r]),eL=r?.startsWith("/m/")||r?.startsWith("/ce/"),eP=r?.startsWith("/todo"),eD=(0,m.useCallback)(async()=>{await _()},[_]),eO=(0,m.useCallback)(async()=>{await _()},[_]),eF=async()=>{await eS()&&eo(!1)},eB=r?.startsWith("/record-call"),ez="/"===r;r?.startsWith("/c/")||r?.startsWith("/todo");let eY=r?.startsWith("/login"),eH=ez&&!u,eU=(0,ob.useIsMobileDownloadBannerVisible)(),[eX,eW]=(0,m.useState)(!1),[eQ,e$]=(0,m.useState)(!1),eG=(0,m.useRef)(eU);(0,m.useEffect)(()=>{if(eU){eW(!1),e$(!1),eG.current=!0;return}if(eG.current){eG.current=!1,eW(!0),e$(!1);let e=requestAnimationFrame(()=>{requestAnimationFrame(()=>e$(!0))});return()=>cancelAnimationFrame(e)}},[eU]),(0,m.useEffect)(()=>{if(!eX||!eQ)return;let e=setTimeout(()=>eW(!1),300);return()=>clearTimeout(e)},[eX,eQ]),(0,m.useEffect)(()=>{let e=window.innerWidth<1280;(0,m.startTransition)(()=>{R(e),M(!0)})},[]),(0,m.useEffect)(()=>{if(!I)return;let e=()=>{let e=window.innerWidth<1280;e!==N&&R(e)};return window.addEventListener("resize",e),()=>{window.removeEventListener("resize",e)}},[I,N]),(0,m.useEffect)(()=>{let e=()=>{let e=window.innerWidth;B(e<450?"Search":"View Memories"),e<450?U(105):e>=450&&e<640?U(Math.round(105+(e-450)/190*135)):U((0,s2.getDesktopSidepanelSearchInputWidth)(e))};return e(),window.addEventListener("resize",e),()=>{window.removeEventListener("resize",e)}},[]),(0,m.useEffect)(()=>{(async()=>{if(!S&&!k&&!u){j(!0);let e=await fetch("/api/v2/summary/amplitude",{method:"GET"}),t=await e.json(),n=o?await o.getIdToken():null,r=(0,oI.getAmplitudeUserId)(n,o?.uid);try{(0,oI.init)(t.api_key,{defaultTracking:!1,userId:r,flushIntervalMillis:100,flushQueueSize:10}),C(!0),(0,oM.initExperiment)("c4e82112ad94e3bc6b2d5a7c1cb39df0")}catch{}}})()},[u,S,k,o]),(0,m.useEffect)(()=>{if(!S||u)return;if(!o){(0,oI.setUserId)(void 0),(0,oL.logoutWebEngage)();return}let e=!0;return o.getIdToken().then(t=>{if(!e)return;let n=(0,oI.getAmplitudeUserId)(t,o.uid);(0,oI.setUserId)(n),n&&(0,oL.loginWebEngage)(n,o.email??void 0)}).catch(()=>{}),()=>{e=!1}},[S,o,u]),(0,m.useEffect)(()=>{S&&!E.current&&(E.current=!0,(0,t4.track)("webapp_app.twinmind_open",{is_authenticated:c}))},[S,c]),(0,m.useEffect)(()=>{(async()=>{if(o&&!u)try{var e,t;await (e={appId:a.default.env.ONESIGNAL_APP_ID||"8294903e-de32-4a28-a82b-ccaf7251ab33"},nv?Promise.reject("OneSignal is already initialized."):e&&e.appId?document?((null==(t=e.welcomeNotification)?void 0:t.disabled)!==void 0&&(e.welcomeNotification.disable=e.welcomeNotification.disabled),new Promise((t,n)=>{var r;null==(r=window.OneSignalDeferred)||r.push(r=>{r.init(e).then(()=>{nv=!0,t()}).catch(n)})})):Promise.reject("Document is not defined."):Promise.reject("You need to provide your OneSignal appId."))}catch(e){}})()},[o,u]),(0,m.useCallback)(()=>{if(J.current){let e=J.current.getBoundingClientRect();ee({top:e.bottom+8,right:window.innerWidth-e.right})}G(!0)},[]),(0,m.useEffect)(()=>{function e(e){$&&K.current&&J.current&&!K.current.contains(e.target)&&!J.current.contains(e.target)&&(G(!1),q(!1)),L&&X.current&&!X.current.contains(e.target)&&P(!1),D&&W.current&&!W.current.contains(e.target)&&O(!1)}return($||L||D)&&document.addEventListener("mousedown",e),()=>{document.removeEventListener("mousedown",e)}},[$,L,D]),(0,m.useEffect)(()=>{let e=()=>{O(!1)};return window.addEventListener("closeSearchDropdown",e),()=>{window.removeEventListener("closeSearchDropdown",e)}},[]),(0,m.useCallback)(()=>{en?(er(!1),Q.current?.blur()):(er(!0),setTimeout(()=>{Q.current?.focus()},s2.SIDEBAR_TIMINGS.SIDEBAR_RENDER_DELAY_MS))},[en]);let eV=(0,m.useRef)(null),eq=(0,m.useCallback)(()=>{let e=document.body;if(!e)return;
68if((0,oP.isIOSWebKit)()){if(eV.current)return;let t=window.scrollY||window.pageYOffset;eV.current={scrollY:t,overflow:e.style.overflow,position:e.style.position,top:e.style.top,left:e.style.left,right:e.style.right,width:e.style.width,paddingRight:e.style.paddingRight},e.style.position="fixed",e.style.top=`-${t}px`,e.style.left="0",e.style.right="0",e.style.width="100%",e.style.overflow="hidden",e.style.paddingRight="";return}let t=window.innerWidth-document.documentElement.clientWidth;e.style.overflow="hidden",e.style.paddingRight=`${t}px`},[]),eJ=(0,m.useCallback)(()=>{let e=document.body;if(e){if(eV.current){let{scrollY:t,overflow:n,position:r,top:s,left:o,right:a,width:i,paddingRight:l}=eV.current;e.style.overflow=n,e.style.position=r,e.style.top=s,e.style.left=o,e.style.right=a,e.style.width=i,e.style.paddingRight=l,eV.current=null,window.scrollTo(0,t);return}e.style.overflow="",e.style.paddingRight=""}},[]);(0,m.useEffect)(()=>(en?eq():eJ(),()=>{eJ()}),[en,eq,eJ]);let eK=r?.startsWith("/ce/");return!u||ez||eK?(0,i.jsxs)(oi.AppSidebarProvider,{isOpen:en,onOpen:()=>er(!0),onClose:()=>er(!1),children:[(0,i.jsxs)("div",{className:"flex flex-col h-full",children:[(0,i.jsx)(oR,{sidepanelRef:f,setIsMobileNavOpen:er}),(0,i.jsx)(oS,{isAuthenticated:c,authLoading:u,onOpenSettingsTab:eu,onRequireSignIn:e_}),(0,i.jsx)(nj.ToastContainer,{toasts:eN,onRemoveToast:eT}),(0,i.jsx)(oy.NewUserAppDownloadPromptModal,{}),(0,i.jsx)(ox,{message:eA,onDismiss:eR}),!n&&(0,i.jsx)(ob.AppDownloadBannerMobile,{}),!n&&eX&&(0,i.jsx)("div",{className:"shrink-0 overflow-hidden transition-[height] ease-out bg-transparent md:hidden",style:{height:48*!eQ,transitionDuration:"300ms"},"aria-hidden":!0}),v&&!n&&!eY&&!(et&&eL)&&!(ez&&u)&&(0,i.jsx)(ol,{isAuthenticated:c,isMobileView:et,pathname:r,uuid:eM,isMemoryRoute:eL,isTodoRoute:eP,isRecordCallRoute:eB,prefetchTodoLists:b,searchPlaceholder:F,searchWidth:H,sidepanelRef:f,searchInputRef:Q,canStartNewChat:!ez,mobileDownloadBannerVisible:eU&&et,showFadeInAnimation:eH}),(0,i.jsx)("div",{className:`relative flex justify-center w-full flex-1 min-h-0 ${ez?"overflow-hidden":""}`,children:(0,i.jsx)("div",{className:"flex-1 min-w-0 h-full",children:e})})]}),ek?(0,i.jsx)(ng,{}):null,$&&(0,p.createPortal)((0,i.jsx)("div",{ref:K,className:"fixed bg-white border border-gray-200 rounded-2xl shadow-md z-9999 max-w-[400px]",style:{top:`${Z.top}px`,right:`${Z.right}px`},children:(0,i.jsx)("div",{className:"px-6 py-4",children:ej&&!eE?(0,i.jsxs)(i.Fragment,{children:[(0,i.jsxs)("div",{className:"flex items-center justify-between",children:[(0,i.jsx)("p",{className:"font-semibold text-[#1c5077] mb-4 mt-2",children:"Give & Get a Month of Pro!"}),(0,i.jsx)("button",{type:"button",className:"text-[#bbbbbb] mb-3 rounded-full hover:bg-gray-100 p-1",onClick:()=>{G(!1),q(!1)},children:(0,i.jsx)(nx.X,{size:16})})]}),(0,i.jsxs)("div",{className:"mb-4",children:[(0,i.jsxs)("div",{className:"flex items-center gap-3 mb-3",children:[(0,i.jsx)("div",{className:"size-8 rounded-full bg-[#ff7400]/10 flex items-center justify-center",children:(0,i.jsx)(nb.Share2,{size:16,className:"text-[#ff7400]"})}),(0,i.jsx)("p",{className:"text-sm text-gray-600",children:"Share your referral link with friends."})]}),(0,i.jsxs)("div",{className:"flex items-center gap-3",children:[(0,i.jsx)("div",{className:"w-11 h-8 rounded-full bg-[#ff7400]/10 flex items-center justify-center",children:(0,i.jsx)(Y.Check,{size:16,className:"text-[#ff7400]"})}),(0,i.jsx)("p",{className:"text-sm text-gray-600",children:"For every friend that joins TwinMind, you'll both get 1 month of PRO."})]})]}),(0,i.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,i.jsx)("button",{type:"button",className:"flex items-center gap-2 py-2 px-4 bg-[#f1f1f1] border-[#bbbbbb] rounded-lg border-2 border-dashed cursor-pointer w-full text-left",onClick:()=>{navigator.clipboard.writeText(ej),q(!0),setTimeout(()=>{q(!1)},3e3)},children:(0,i.jsx)("p",{className:"flex-1 text-sm bg-transparent border-none outline-hidden text-[#757575] truncate",children:ej})}),(0,i.jsx)("button",{type:"button",onClick:()=>{navigator.clipboard.writeText(ej),q(!0),setTimeout(()=>{q(!1)},3e3)},className:"text-white bg-[#ff7400] font-medium rounded-xl px-4 py-2 mb-2 mt-1 hover:bg-[#ff7400]/80 transition-colors duration-300",children:V?(0,i.jsxs)("div",{className:"flex items-center gap-2 justify-center",children:[(0,i.jsx)(Y.Check,{size:16}),"Copied Link!"]}):(0,i.jsxs)("div",{className:"flex items-center gap-2 justify-center",children:[(0,i.jsx)(nf.Copy,{size:16}),"Copy Link"]})}),(0,i.jsx)("button",{type:"button",onClick:()=>{navigator.share&&navigator.share({title:"Join TwinMind and get a month of Pro!",text:"Check out TwinMind - your AI second brain. Use my referral link and we both get a month of Pro!",url:ej})},className:"text-[#084e74] bg-white font-medium rounded-xl border border-[#084e74] px-4 py-2 hover:bg-gray-50 transition-colors duration-300",children:(0,i.jsxs)("div",{className:"flex items-center gap-2 justify-center",children:[(0,i.jsx)(nb.Share2,{size:16}),"Share"]})})]})]}):(0,i.jsx)("div",{className:"flex items-center justify-center py-8",children:(0,i.jsx)(ny.Loader2,{className:"animate-spin",size:24})})})}),document.body),es&&ex&&(0,i.jsx)(og,{value:ex,onChange:(e,t)=>
68{ew(e,t)},onClose:()=>eo(!1),onSubmit:eF,isSaving:ev}),w&&(0,i.jsx)(sV,{ref:f,uuid:eM,isMobile:et,isMobileOpen:en,setMobileOpen:e=>{e||er(!1)},isExpanded:!!et||en,onExpandedChange:e=>{e||er(!1)},onOpenProfile:ed,onOpenSettings:ec},o?.uid),ey&&o&&(0,i.jsx)(nN,{isOpen:ey,displayName:o.displayName||o.email?.split("@")[0]||"User",email:o.email||"",photoURL:o.photoURL,onClose:()=>eb(!1),onAccountDeleted:eD,getAuthToken:async()=>o?o.getIdToken():null}),(0,i.jsx)(of.SettingsModal,{isOpen:ep,onClose:ei,onSignOut:eO,defaultTab:eh,initialMobileView:eg,allowCloseInNative:ea,onTabChange:em}),ef&&(0,p.createPortal)((0,i.jsx)(nT.default,{onClose:el,redirectPath:ef}),document.body)]}):(0,i.jsx)(nR.default,{})}let oO=(0,d.createModuleLogger)("global-error");function oF(){return(0,m.useEffect)(()=>{"serviceWorker"in navigator&&navigator.serviceWorker.register("/sw.js").catch(e=>{e.message?.includes("404")||e.message?.includes("bad HTTP response code")||d.logger.error({err:e},"Service Worker registration failed")})},[]),(0,m.useEffect)(()=>(function(){if(!c())return()=>{};let e=async e=>{if((e.ctrlKey||e.metaKey)&&e.shiftKey&&"d"===e.key.toLowerCase())return e.preventDefault(),void console.log("[DebugCapture] Not enabled. Call enableDebugCapture() first.")};return window.addEventListener("keydown",e),console.log("[DebugCapture] Shortcut registered: Ctrl+Shift+D to copy logs."),()=>{window.removeEventListener("keydown",e)}})(),[]),(0,m.useEffect)(()=>{let e=e=>{let t=e.message??"",n=e.filename??"",r=["googletagmanager.com","onesignal.com","amplitude.com","appsflyer.com","websdk.appsflyer.com","webengage.com","widgets.webengage.com"].some(e=>n.includes(e)||t.includes(e)),s=t.includes("ERR_NAME_NOT_RESOLVED")||t.includes("Failed to fetch")||t.includes("NetworkError")||t.includes("net::ERR_"),o=t.includes("Manifest fetch")||n.includes("manifest.json");if(r&&s||o)return e.preventDefault(),!1;oO.error({err:e.error,source:n,line:e.lineno,col:e.colno},t||"Uncaught error")},t=e=>{let t=e.reason,n=t instanceof Error?t.message:String(t??"");if(n.includes("ERR_NAME_NOT_RESOLVED")||n.includes("Failed to fetch")||n.includes("NetworkError")||n.includes("net::ERR_"))return e.preventDefault(),!1;let r=t instanceof Error?t:Error(n);oO.error({err:r},"Unhandled promise rejection")};return window.addEventListener("error",e),window.addEventListener("unhandledrejection",t),()=>{window.removeEventListener("error",e),window.removeEventListener("unhandledrejection",t)}},[]),null}e.s(["default",0,function({children:e}){let t=(0,T.usePathname)(),n="/native-login"===t,[r,s]=(0,m.useState)(!1);(0,m.useEffect)(()=>{s(function(e){try{return"/native-login"===e&&sessionStorage.setItem(t6.NATIVE_LOGIN_STORAGE_KEY,"true"),"true"===sessionStorage.getItem(t6.NATIVE_LOGIN_STORAGE_KEY)}catch{return!1}}(t))},[t]);let o=(0,l.isProduction)()&&!n;(0,m.useEffect)(()=>{(0,t3.captureReferralParams)()},[]);let a="80a29467-82c7-4749-b273-f21863346e3c",d="76ab922";return(0,i.jsxs)("html",{lang:"en",className:"h-full",children:[(0,i.jsxs)("head",{children:[(0,i.jsx)("style",{suppressHydrationWarning:!0,children:t7}),(0,i.jsx)("link",{rel:"icon",href:"/favicon.svg",type:"image/svg+xml"}),(0,i.jsx)("link",{rel:"icon",href:"/images/favicon.png",type:"image/png"}),(0,i.jsx)("link",{rel:"manifest",href:"/manifest.json"}),(0,i.jsx)("meta",{name:"theme-color",content:"#000000"}),(0,i.jsx)("meta",{name:"viewport",content:"width=device-width, initial-scale=1, viewport-fit=cover"}),(0,i.jsx)("meta",{name:"mobile-web-app-capable",content:"yes"}),(0,i.jsx)("meta",{name:"apple-mobile-web-app-capable",content:"yes"}),(0,i.jsx)("meta",{name:"apple-mobile-web-app-status-bar-style",content:"default"}),(0,i.jsx)("meta",{name:"apple-mobile-web-app-title",content:"TwinMind"}),!n&&(0,i.jsx)("script",{src:"https://accounts.google.com/gsi/client",async:!0,defer:!0}),!n&&d&&(0,i.jsx)(u.default,{id:"_webengage_script_tag",strategy:"afterInteractive",children:`var webengage;!function(w,e,b,n,g){function o(e,t){e[t[t.length-1]]=function(){r.__queue.push([t.join("."),arguments])}}var i,s,r=w[b],z=" ",l="init options track screen onReady".split(z),a="webPersonalization feedback survey notification notificationInbox".split(z),c="options render clear abort".split(z),p="Prepare Render Open Close Submit Complete View Click".split(z),u="identify login logout setAttribute".split(z);if(!r||!r.__v){for(w[b]=r={__queue:[],__v:"6.0",user:{}},i=0;i < l.length;i++)o(r,[l[i]]);for(i=0;i < a.length;i++){for(r[a[i]]={},s=0;s < c.length;s++)o(r[a[i]],[a[i],c[s]]);for(s=0;s < p.length;s++)o(r[a[i]],[a[i],"on"+p[s]])}for(i=0;i < u.length;i++)o(r.user,["user",u[i]]);setTimeout(function(){var f=e.createElement("script"),d=e.getElementById("_webengage_script_tag");f.type="text/javascript",f.async=!0,f.src=("https:"==e.location.protocol?"https://ssl.widgets.webengage.com":"http://cdn.widgets.webengage.com")+"/js/webengage-min-v-6.0.js",d.parentNode.insertBefore(f,d)})}}(window,document,"webengage");
68webengage.init("${d}");`}),o&&a?(0,i.jsx)(u.default,{id:"appsflyer-pba-sdk",strategy:"afterInteractive",children:`!function(t,e,n,s,a,c,i,o,p){t.AppsFlyerSdkObject=a,t.AF=t.AF||function(){(t.AF.q=t.AF.q||[]).push([Date.now()].concat(Array.prototype.slice.call(arguments)))},t.AF.id=t.AF.id||i,t.AF.plugins={},o=e.createElement(n),p=e.getElementsByTagName(n)[0],o.async=1,o.src="https://websdk.appsflyer.com?"+(c.length>0?"st="+c.split(",").sort().join(",")+"&":"")+(i.length>0?"af_id="+i:""),p.parentNode.insertBefore(o,p)}(window,document,"script",0,"AF","pba",{pba:{webAppId:"${a}"}});`}):null]}),(0,i.jsxs)("body",{className:"w-full h-full bg-app-bg-white",suppressHydrationWarning:!0,children:[n?e:(0,i.jsx)(N,{reducedMotion:"user",children:(0,i.jsx)(nd,{children:(0,i.jsx)(ni.QueryProvider,{children:(0,i.jsx)(na,{children:(0,i.jsx)(nc,{children:(0,i.jsx)(A.AuthProvider,{children:(0,i.jsx)(F.SubscriptionProvider,{children:(0,i.jsx)(D,{children:(0,i.jsx)(L,{children:(0,i.jsx)(t8.TodoProvider,{children:(0,i.jsx)(t9.NavigationHistoryProvider,{children:(0,i.jsx)(m.Suspense,{fallback:null,children:(0,i.jsx)(t2.DirectBootstrapSearchParamSync,{children:(0,i.jsx)(R.ChatBarProvider,{children:(0,i.jsxs)(t1,{children:[(0,i.jsx)(oF,{}),(0,i.jsx)(t5.DownloadBannerProvider,{children:(0,i.jsx)(I.NativeLoginProvider,{isNativeLogin:r,children:(0,i.jsx)(oD,{fontClassName:"",isNativeLogin:r,children:e})})})]})})})})})})})})})})})})})})}),!1,!1]})]})}],153642)}]);
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.