From dad7d5af6a3f79538e155a0f402b915f0d50dfc0 Mon Sep 17 00:00:00 2001 From: devleejb <52884648+devleejb@users.noreply.github.com> Date: Sat, 13 Jul 2024 13:27:25 +0000 Subject: [PATCH] =?UTF-8?q?Deploying=20to=20gh-pages=20from=20@=20yorkie-t?= =?UTF-8?q?eam/codepair@e1cebe0ec3304b2ad8cdad94926a25fadef39da3=20?= =?UTF-8?q?=F0=9F=9A=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../{index-5nSp_ynV.js => index-0B7fR9fo.js} | 38 +++++++++---------- index.html | 2 +- 2 files changed, 20 insertions(+), 20 deletions(-) rename assets/{index-5nSp_ynV.js => index-0B7fR9fo.js} (98%) diff --git a/assets/index-5nSp_ynV.js b/assets/index-0B7fR9fo.js similarity index 98% rename from assets/index-5nSp_ynV.js rename to assets/index-0B7fR9fo.js index d5b438e6..04a93dcc 100644 --- a/assets/index-5nSp_ynV.js +++ b/assets/index-0B7fR9fo.js @@ -1,4 +1,4 @@ -var owe=Object.defineProperty;var lwe=(e,t,n)=>t in e?owe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var uwe=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports);var Ms=(e,t,n)=>(lwe(e,typeof t!="symbol"?t+"":t,n),n),LD=(e,t,n)=>{if(!t.has(e))throw TypeError("Cannot "+n)};var Le=(e,t,n)=>(LD(e,t,"read from private field"),n?n.call(e):t.get(e)),En=(e,t,n)=>{if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,n)},sn=(e,t,n,r)=>(LD(e,t,"write to private field"),r?r.call(e,n):t.set(e,n),n);var yC=(e,t,n,r)=>({set _(i){sn(e,t,i,n)},get _(){return Le(e,t,r)}}),or=(e,t,n)=>(LD(e,t,"access private method"),n);var HCt=uwe((iAt,f_)=>{(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},t=new Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="3267b286-4612-4926-8807-27d5deada124",e._sentryDebugIdIdentifier="sentry-dbid-3267b286-4612-4926-8807-27d5deada124")}catch{}})();function Tie(e,t){for(var n=0;nr[i]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}var cwe=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};cwe.SENTRY_RELEASE={id:"e6b76e4166bcb90441d6c0e2b11ba5fb9acd5812"};(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))r(i);new MutationObserver(i=>{for(const a of i)if(a.type==="childList")for(const s of a.addedNodes)s.tagName==="LINK"&&s.rel==="modulepreload"&&r(s)}).observe(document,{childList:!0,subtree:!0});function n(i){const a={};return i.integrity&&(a.integrity=i.integrity),i.referrerPolicy&&(a.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?a.credentials="include":i.crossOrigin==="anonymous"?a.credentials="omit":a.credentials="same-origin",a}function r(i){if(i.ep)return;i.ep=!0;const a=n(i);fetch(i.href,a)}})();var mf=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function xd(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function dwe(e){if(e.__esModule)return e;var t=e.default;if(typeof t=="function"){var n=function r(){return this instanceof r?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};n.prototype=t.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(e).forEach(function(r){var i=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(n,r,i.get?i:{enumerable:!0,get:function(){return e[r]}})}),n}var kie={exports:{}},O5={},Cie={exports:{}},Pr={};/** +var owe=Object.defineProperty;var lwe=(e,t,n)=>t in e?owe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var uwe=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports);var Ms=(e,t,n)=>(lwe(e,typeof t!="symbol"?t+"":t,n),n),LD=(e,t,n)=>{if(!t.has(e))throw TypeError("Cannot "+n)};var Le=(e,t,n)=>(LD(e,t,"read from private field"),n?n.call(e):t.get(e)),En=(e,t,n)=>{if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,n)},sn=(e,t,n,r)=>(LD(e,t,"write to private field"),r?r.call(e,n):t.set(e,n),n);var yC=(e,t,n,r)=>({set _(i){sn(e,t,i,n)},get _(){return Le(e,t,r)}}),or=(e,t,n)=>(LD(e,t,"access private method"),n);var VCt=uwe((aAt,f_)=>{(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},t=new Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="6b1939f5-834b-4aac-99e4-ae7e76039a05",e._sentryDebugIdIdentifier="sentry-dbid-6b1939f5-834b-4aac-99e4-ae7e76039a05")}catch{}})();function Tie(e,t){for(var n=0;nr[i]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}var cwe=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};cwe.SENTRY_RELEASE={id:"e1cebe0ec3304b2ad8cdad94926a25fadef39da3"};(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))r(i);new MutationObserver(i=>{for(const a of i)if(a.type==="childList")for(const s of a.addedNodes)s.tagName==="LINK"&&s.rel==="modulepreload"&&r(s)}).observe(document,{childList:!0,subtree:!0});function n(i){const a={};return i.integrity&&(a.integrity=i.integrity),i.referrerPolicy&&(a.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?a.credentials="include":i.crossOrigin==="anonymous"?a.credentials="omit":a.credentials="same-origin",a}function r(i){if(i.ep)return;i.ep=!0;const a=n(i);fetch(i.href,a)}})();var mf=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function xd(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function dwe(e){if(e.__esModule)return e;var t=e.default;if(typeof t=="function"){var n=function r(){return this instanceof r?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};n.prototype=t.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(e).forEach(function(r){var i=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(n,r,i.get?i:{enumerable:!0,get:function(){return e[r]}})}),n}var kie={exports:{}},O5={},Cie={exports:{}},Pr={};/** * @license React * react.production.min.js * @@ -595,37 +595,37 @@ l0,-`+(n+144)+`c-2,-159.3,-10,-310.7,-24,-454c-53.3,-528,-210,-949.7, 6.47 6.47,2 12,2M15.59,7L12,10.59L8.41,7L7,8.41L10.59,12L7,15.59L8.41,17L12, 13.41L15.59,17L17,15.59L13.41,12L17,8.41L15.59,7Z`}))},Sbt=function(t){return hn.createElement(Jm,Object.assign({},t),hn.createElement("path",{d:`M13,9H11V7H13M13,17H11V11H13M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0, 0 22,12A10,10 0 0,0 12,2Z`}))},qA={fontSize:20,marginInlineEnd:8},Ebt={default:void 0,success:hn.createElement(ybt,{style:qA}),warning:hn.createElement(vbt,{style:qA}),error:hn.createElement(Obt,{style:qA}),info:hn.createElement(Sbt,{style:qA})};function nw(e,t){return e.reduce(function(n,r){return r==null?n:function(){for(var a=arguments.length,s=new Array(a),o=0;o .MuiCollapse-container, & > .MuiCollapse-root",wrapper:"& > .MuiCollapse-container > .MuiCollapse-wrapper, & > .MuiCollapse-root > .MuiCollapse-wrapper"},f7=16,gg="SnackbarContainer",td={root:gg+"-root",rootDense:gg+"-rootDense",top:gg+"-top",bottom:gg+"-bottom",left:gg+"-left",right:gg+"-right",center:gg+"-center"},Cbt=Re("div")(function(e){var t,n,r,i,a,s,o=e.theme;return s={},s["&."+td.root]=(t={boxSizing:"border-box",display:"flex",maxHeight:"100%",position:"fixed",zIndex:o.zIndex.snackbar,height:"auto",width:"auto",transition:"top 300ms ease 0ms, right 300ms ease 0ms, bottom 300ms ease 0ms, left 300ms ease 0ms, margin 300ms ease 0ms, max-width 300ms ease 0ms",pointerEvents:"none"},t[d7.container]={pointerEvents:"all"},t[d7.wrapper]={padding:xh.snackbar.default+"px 0px",transition:"padding 300ms ease 0ms"},t.maxWidth="calc(100% - "+xh.view.default*2+"px)",t[o.breakpoints.down("sm")]={width:"100%",maxWidth:"calc(100% - "+f7*2+"px)"},t),s["&."+td.rootDense]=(n={},n[d7.wrapper]={padding:xh.snackbar.dense+"px 0px"},n),s["&."+td.top]={top:xh.view.default-xh.snackbar.default,flexDirection:"column"},s["&."+td.bottom]={bottom:xh.view.default-xh.snackbar.default,flexDirection:"column-reverse"},s["&."+td.left]=(r={left:xh.view.default},r[o.breakpoints.up("sm")]={alignItems:"flex-start"},r[o.breakpoints.down("sm")]={left:f7+"px"},r),s["&."+td.right]=(i={right:xh.view.default},i[o.breakpoints.up("sm")]={alignItems:"flex-end"},i[o.breakpoints.down("sm")]={right:f7+"px"},i),s["&."+td.center]=(a={left:"50%",transform:"translateX(-50%)"},a[o.breakpoints.up("sm")]={alignItems:"center"},a),s}),Abt=function(t){var n=t.className,r=t.anchorOrigin,i=t.dense,a=Gm(t,["className","anchorOrigin","dense"]),s=Ox(td[r.vertical],td[r.horizontal],td.root,n,i&&td.rootDense);return hn.createElement(Cbt,Object.assign({className:s},a))},_bt=hn.memo(Abt),Rbt=function(e){ubt(t,e);function t(r){var i;return i=e.call(this,r)||this,i.enqueueSnackbar=function(a,s){s===void 0&&(s={});var o=s,l=o.key,u=o.preventDuplicate,c=Gm(o,["key","preventDuplicate"]),f=QA(l),h=f?l:new Date().getTime()+Math.random(),g=hbt(c,i.props,Ug),b=Bi({key:h},c,{message:a,open:!0,entered:!1,requestClose:!1,variant:g("variant"),anchorOrigin:g("anchorOrigin"),autoHideDuration:g("autoHideDuration")});return c.persist&&(b.autoHideDuration=void 0),i.setState(function(S){if(u===void 0&&i.props.preventDuplicate||u){var E=function(C){return f?C.key===l:C.message===a},w=S.queue.findIndex(E)>-1,x=S.snacks.findIndex(E)>-1;if(w||x)return S}return i.handleDisplaySnack(Bi({},S,{queue:[].concat(S.queue,[b])}))}),h},i.handleDisplaySnack=function(a){var s=a.snacks;return s.length>=i.maxSnack?i.handleDismissOldest(a):i.processQueue(a)},i.processQueue=function(a){var s=a.queue,o=a.snacks;return s.length>0?Bi({},a,{snacks:[].concat(o,[s[0]]),queue:s.slice(1,s.length)}):a},i.handleDismissOldest=function(a){if(a.snacks.some(function(c){return!c.open||c.requestClose}))return a;var s=!1,o=!1,l=a.snacks.reduce(function(c,f){return c+(f.open&&f.persist?1:0)},0);l===i.maxSnack&&(o=!0);var u=a.snacks.map(function(c){return!s&&(!c.persist||o)?(s=!0,c.entered?(c.onClose&&c.onClose(null,pm.MAXSNACK,c.key),i.props.onClose&&i.props.onClose(null,pm.MAXSNACK,c.key),Bi({},c,{open:!1})):Bi({},c,{requestClose:!0})):Bi({},c)});return Bi({},a,{snacks:u})},i.handleEnteredSnack=function(a,s,o){if(!QA(o))throw new Error("handleEnteredSnack Cannot be called with undefined key");i.setState(function(l){var u=l.snacks;return{snacks:u.map(function(c){return c.key===o?Bi({},c,{entered:!0}):Bi({},c)})}})},i.handleCloseSnack=function(a,s,o){if(i.props.onClose&&i.props.onClose(a,s,o),s!==pm.CLICKAWAY){var l=o===void 0;i.setState(function(u){var c=u.snacks,f=u.queue;return{snacks:c.map(function(h){return!l&&h.key!==o?Bi({},h):h.entered?Bi({},h,{open:!1}):Bi({},h,{requestClose:!0})}),queue:f.filter(function(h){return h.key!==o})}})}},i.closeSnackbar=function(a){var s=i.state.snacks.find(function(o){return o.key===a});QA(a)&&s&&s.onClose&&s.onClose(null,pm.INSTRUCTED,a),i.handleCloseSnack(null,pm.INSTRUCTED,a)},i.handleExitedSnack=function(a,s,o){var l=s||o;if(!QA(l))throw new Error("handleExitedSnack Cannot be called with undefined key");i.setState(function(u){var c=i.processQueue(Bi({},u,{snacks:u.snacks.filter(function(f){return f.key!==l})}));return c.queue.length===0?c:i.handleDismissOldest(c)})},i.state={snacks:[],queue:[],contextValue:{enqueueSnackbar:i.enqueueSnackbar.bind(cre(i)),closeSnackbar:i.closeSnackbar.bind(cre(i))}},i}var n=t.prototype;return n.render=function(){var i=this,a=this.state.contextValue,s=this.props,o=s.iconVariant,l=s.dense,u=l===void 0?Ug.dense:l,c=s.hideIconVariant,f=c===void 0?Ug.hideIconVariant:c,h=s.domRoot,g=s.children,b=s.classes,S=b===void 0?{}:b,E=Gm(s,["maxSnack","preventDuplicate","variant","anchorOrigin","iconVariant","dense","hideIconVariant","domRoot","children","classes"]),w=this.state.snacks.reduce(function(k,C){var R,A=dbt(C.anchorOrigin),D=k[A]||[];return Bi({},k,(R={},R[A]=[].concat(D,[C]),R))},{}),x=Object.keys(w).map(function(k){var C=w[k];return hn.createElement(_bt,{key:k,dense:u,anchorOrigin:C[0].anchorOrigin,className:Ox(S.containerRoot,S[J4.toContainerAnchorOrigin(k)])},C.map(function(R){return hn.createElement(kbt,Object.assign({},E,{key:R.key,snack:R,dense:u,iconVariant:o,hideIconVariant:f,classes:fbt(S),onClose:i.handleCloseSnack,onExited:nw([i.handleExitedSnack,i.props.onExited]),onEntered:nw([i.handleEnteredSnack,i.props.onEntered])}))}))});return hn.createElement(obe.Provider,{value:a},g,h?T1.createPortal(x,h):x)},lbt(t,[{key:"maxSnack",get:function(){return this.props.maxSnack||Ug.maxSnack}}]),t}(N.Component),YI=function(){return N.useContext(obe)};function Ibt(e){const{title:t,feature:n,onClose:r}=e,i=Ni(),a=kT(),s=pi(AO),{data:o,memoryKey:l,isLoading:u,isComplete:c,mutateAsync:f}=sbt(n),{data:h,isLoading:g,isComplete:b,mutateAsync:S}=obt(l),[E,w]=N.useState(""),x=document.getElementById($B),k=N.useMemo(()=>u||g,[u,g]),C=N.useMemo(()=>c||b,[c,b]),R=N.useMemo(()=>h||o,[o,h]),{enqueueSnackbar:A}=YI(),D=N.useRef(null),B=r1e(),{reset:L,formState:F}=B;N.useEffect(()=>{F.isSubmitSuccessful&&L({content:""})},[F.isSubmitSuccessful,L]),N.useEffect(()=>{w((x==null?void 0:x.getAttribute("content"))??"")},[x]),N.useEffect(()=>{E&&f(E)},[E,f]),N.useEffect(()=>{R&&D.current&&D.current.scrollTo({behavior:"smooth",top:D.current.scrollHeight})},[R]);const W=async()=>{R&&(await F1.write(R),A("URL Copied!",{variant:"success"}))},V=async()=>{S("Recreate the last statement with a paraphrase or adjust it slightly to better suit the user's input.")},Z=H=>{S(H.content)},Q=(H=!1)=>{var be,ee;if(!s.cmView)return;const J=s.cmView.state.selection.main;let K=Math.min(J.to,J.from);const X=Math.max(J.to,J.from);let te=R;H||(K=X,te=` -${te}`);const z=H?K:K+1,Te=K+te.length;(be=s.doc)==null||be.update((ye,Oe)=>{ye.content.edit(K,X,te),Oe.set({selection:ye.content.indexRangeToPosRange([z,Te])})}),(ee=s.cmView)==null||ee.dispatch({changes:{from:K,to:X,insert:te},selection:{anchor:z,head:Te}}),r()};return I.jsxs(lr,{gap:4,children:[I.jsx(Ts,{bgcolor:i.palette.background.paper,p:1,borderRadius:2,border:1,children:I.jsx(xr,{children:t})}),k&&I.jsx(bp,{sx:{marginX:"auto"}}),I.jsx(Ts,{ref:D,sx:{height:350,overflow:"auto"},children:!k&&I.jsx(S0e,{source:$L(R||""),wrapperElement:{"data-color-mode":a}})}),I.jsxs(lr,{gap:2,children:[I.jsx(tp,{in:C,children:I.jsxs(lr,{direction:"row",justifyContent:"flex-end",gap:1,children:[I.jsx(Ws,{variant:"outlined",onClick:V,children:I.jsx(Bge,{fontSize:"small"})}),I.jsx(Ws,{variant:"outlined",onClick:W,children:I.jsx(UI,{fontSize:"small"})}),I.jsx(Ws,{variant:"outlined",onClick:()=>Q(),children:"Insert below"}),I.jsx(Ws,{variant:"contained",onClick:()=>Q(!0),children:"Replace"})]})}),I.jsx(kd,{children:I.jsx(JT,{defaultValues:{content:""},formContext:B,onSuccess:Z,children:I.jsx(lr,{gap:4,alignItems:"flex-end",children:I.jsx(GI,{variant:"outlined",name:"content",placeholder:"Tell Yorkie what to do next",required:!0,fullWidth:!0,disabled:!C,size:"small",InputProps:{startAdornment:I.jsx(Dw,{position:"start",children:I.jsx("img",{src:"/yorkie.png",height:20})}),endAdornment:I.jsx(tp,{in:C,children:I.jsx(Dw,{position:"end",children:I.jsx(wa,{type:"submit",edge:"end",children:I.jsx(abe,{})})})})}})})})})]})]})}function Dbt(e){const{onCloseIntelligence:t,...n}=e,r=()=>{var a;(a=n==null?void 0:n.onClose)==null||a.call(n,new Event("Close Modal"),"escapeKeyDown")},i=()=>{t(),r()};return I.jsx(S0,{disableAutoFocus:!0,...n,children:I.jsx(Zs,{sx:{position:"absolute",top:"50%",left:"50%",transform:"translate(-50%, -50%)",p:4},children:I.jsxs(lr,{gap:4,children:[I.jsxs(lr,{alignItems:"center",gap:1,children:[I.jsx("img",{src:"/yorkie.png",alt:"yorkie",width:60}),I.jsxs(xr,{variant:"h6",align:"center",children:["Do you want to discard",I.jsx("br",{}),"the Yorkie response?"]})]}),I.jsxs(lr,{direction:"row",gap:1,justifyContent:"center",children:[I.jsx(Ws,{variant:"outlined",onClick:i,children:"Discard"}),I.jsx(Ws,{variant:"contained",onClick:r,children:"Cancel"})]})]})})})}function Nbt(e){const{onClose:t}=e,n=Ni(),r=pi(AO),i=N.useRef(null),[a,s]=N.useState(null),[o,l]=N.useState(null),[u,c]=N.useState(),[f,h]=N.useState(!1),g=N.useRef(null),b=N.useMemo(()=>r.cmView.contentDOM.getBoundingClientRect().width-12,[r.cmView]);N.useEffect(()=>{if(i.current)return c(i.current),()=>{c(void 0)}},[]);const S=(w,x)=>{l(w),s(x)},E=()=>{h(w=>!w)};return I.jsxs(Ts,{sx:{position:"absolute",mt:1},children:[I.jsx("span",{ref:i,style:{marginTop:4}}),I.jsx(RR,{open:!!u,anchorEl:u,anchorOrigin:{vertical:"bottom",horizontal:"left"},transformOrigin:{vertical:"top",horizontal:"left"},onClose:E,children:I.jsx(hF,{ref:g,sx:{boxShadow:n.shadows[11],borderRadius:2,width:b,padding:2},children:o&&a?I.jsx(Ibt,{title:a,feature:o,onClose:t}):I.jsx(qft,{onSelectFeature:S})})}),I.jsx(Dbt,{open:f,onCloseIntelligence:t,onClose:E})]})}function Pbt(){const e=Ni(),[t,n]=N.useState(!1),[r,i]=N.useState(null),[a,s]=N.useState(null),[o,l]=N.useState(null);bW(()=>{l(r)},500,[r]),N.useEffect(()=>{document.addEventListener("selectionchange",function(){const c=document.getElementById(spe),f=document.getElementById($B);i(c),s(f),c||(n(!1),l(null))})},[]);const u=()=>{n(c=>!c)};if(!(!o||!a))return I.jsxs(I.Fragment,{children:[I.jsx(wO,{open:!!o,anchorEl:o,placement:"top-start",transition:!0,children:({TransitionProps:c})=>I.jsx(tp,{...c,children:I.jsx(hF,{sx:{boxShadow:e.shadows[11],borderRadius:2,mb:1},children:I.jsx(Qoe,{sx:{paddingX:1.3,paddingY:.3},onClick:u,children:I.jsxs(lr,{direction:"row",alignItems:"center",gap:1,children:[I.jsx("img",{src:"/yorkie.png",height:20}),I.jsx(xr,{variant:"subtitle1",children:"Yorkie Intelligence"})]})})})})}),t&&T1.createPortal(I.jsx(Nbt,{onClose:u}),a)]})}function Mbt(){var l,u;const e=Du(),t=x0(),n=pi(zF),r=pi(rI),{data:i}=QF(t.workspaceSlug),{data:a}=fUe(i==null?void 0:i.id,t.documentId),{doc:s,client:o}=Nge(a==null?void 0:a.yorkieDocumentId,(l=n.data)==null?void 0:l.nickname);return N.useEffect(()=>{if(!(!s||!o))return e(t3(s)),e(n3(o)),()=>{e(t3(null)),e(n3(null))}},[e,o,s]),I.jsxs(Ts,{height:"calc(100% - 64px)",children:[I.jsx(xge,{}),((u=r.yorkieIntelligence)==null?void 0:u.enable)&&I.jsx(Pbt,{})]})}function Lbt(){return I.jsx(lr,{sx:{flexGrow:1,height:"100vh"},children:I.jsx(kF,{})})}function $bt(){const e=Du(),t=Wf(),[n]=CF();return N.useEffect(()=>{const r=n.get("token");if(!r){t("/");return}e(gW(r))},[e,t,n]),I.jsx(Ts,{})}var qW={},Fbt=ca;Object.defineProperty(qW,"__esModule",{value:!0});var ube=qW.default=void 0,Bbt=Fbt(da()),Ubt=I;ube=qW.default=(0,Bbt.default)((0,Ubt.jsx)("path",{d:"M3 18h18v-2H3zm0-5h18v-2H3zm0-7v2h18V6z"}),"Menu");var GW={},zbt=ca;Object.defineProperty(GW,"__esModule",{value:!0});var cbe=GW.default=void 0,jbt=zbt(da()),Hbt=I;cbe=GW.default=(0,jbt.default)((0,Hbt.jsx)("path",{d:"m17 7-1.41 1.41L18.17 11H8v2h10.17l-2.58 2.58L17 17l5-5zM4 5h8V3H4c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h8v-2H4z"}),"Logout");var YW={},Vbt=ca;Object.defineProperty(YW,"__esModule",{value:!0});var ZW=YW.default=void 0,Wbt=Vbt(da()),Qbt=I;ZW=YW.default=(0,Wbt.default)((0,Qbt.jsx)("path",{d:"M12 3c-4.97 0-9 4.03-9 9s4.03 9 9 9 9-4.03 9-9c0-.46-.04-.92-.1-1.36-.98 1.37-2.58 2.26-4.4 2.26-2.98 0-5.4-2.42-5.4-5.4 0-1.81.89-3.42 2.26-4.4-.44-.06-.9-.1-1.36-.1"}),"DarkMode");var XW={},qbt=ca;Object.defineProperty(XW,"__esModule",{value:!0});var KW=XW.default=void 0,Gbt=qbt(da()),Ybt=I;KW=XW.default=(0,Gbt.default)((0,Ybt.jsx)("path",{d:"M12 7c-2.76 0-5 2.24-5 5s2.24 5 5 5 5-2.24 5-5-2.24-5-5-5M2 13h2c.55 0 1-.45 1-1s-.45-1-1-1H2c-.55 0-1 .45-1 1s.45 1 1 1m18 0h2c.55 0 1-.45 1-1s-.45-1-1-1h-2c-.55 0-1 .45-1 1s.45 1 1 1M11 2v2c0 .55.45 1 1 1s1-.45 1-1V2c0-.55-.45-1-1-1s-1 .45-1 1m0 18v2c0 .55.45 1 1 1s1-.45 1-1v-2c0-.55-.45-1-1-1s-1 .45-1 1M5.99 4.58c-.39-.39-1.03-.39-1.41 0-.39.39-.39 1.03 0 1.41l1.06 1.06c.39.39 1.03.39 1.41 0s.39-1.03 0-1.41zm12.37 12.37c-.39-.39-1.03-.39-1.41 0-.39.39-.39 1.03 0 1.41l1.06 1.06c.39.39 1.03.39 1.41 0 .39-.39.39-1.03 0-1.41zm1.06-10.96c.39-.39.39-1.03 0-1.41-.39-.39-1.03-.39-1.41 0l-1.06 1.06c-.39.39-.39 1.03 0 1.41s1.03.39 1.41 0zM7.05 18.36c.39-.39.39-1.03 0-1.41-.39-.39-1.03-.39-1.41 0l-1.06 1.06c-.39.39-.39 1.03 0 1.41s1.03.39 1.41 0z"}),"LightMode");function Zbt(e){const t=Du(),n=kT(),r=()=>{t(gW(null)),t(Q8(null))},i=()=>{t(iue(n=="light"?"dark":"light"))};return I.jsx(RR,{anchorOrigin:{vertical:"bottom",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"right"},...e,children:I.jsxs(kO,{children:[I.jsxs(np,{onClick:i,children:[I.jsx(Nw,{children:n==="light"?I.jsx(KW,{}):I.jsx(ZW,{})}),I.jsx(t0,{children:"Appearance"})]}),I.jsxs(np,{onClick:r,children:[I.jsx(Nw,{children:I.jsx(cbe,{fontSize:"small"})}),I.jsx(t0,{children:"Logout"})]})]})})}var JW={},Xbt=ca;Object.defineProperty(JW,"__esModule",{value:!0});var dbe=JW.default=void 0,Kbt=Xbt(da()),pre=I;dbe=JW.default=(0,Kbt.default)([(0,pre.jsx)("path",{d:"M17.59 18 19 16.59 14.42 12 19 7.41 17.59 6l-6 6z"},"0"),(0,pre.jsx)("path",{d:"m11 18 1.41-1.41L7.83 12l4.58-4.59L11 6l-6 6z"},"1")],"KeyboardDoubleArrowLeft");var eQ={},Jbt=ca;Object.defineProperty(eQ,"__esModule",{value:!0});var fbe=eQ.default=void 0,eyt=Jbt(da()),mre=I;fbe=eQ.default=(0,eyt.default)([(0,mre.jsx)("path",{d:"M6.41 6 5 7.41 9.58 12 5 16.59 6.41 18l6-6z"},"0"),(0,mre.jsx)("path",{d:"m13 6-1.41 1.41L16.17 12l-4.58 4.59L13 18l6-6z"},"1")],"KeyboardDoubleArrowRight");function hbe(e){return I.jsx(Jm,{...e,children:I.jsxs("svg",{width:"40",height:"38",viewBox:"0 0 40 38",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:{width:30,height:30},children:[I.jsx("path",{d:"M11.8574 11.4048L18.8525 21.4507C19.2947 22.086 20.1683 22.2423 20.8036 21.8001C20.9398 21.7052 21.0581 21.5869 21.153 21.4507L28.148 11.4048C29.0327 10.1343 28.7198 8.3872 27.4495 7.5027C26.9794 7.17549 26.4205 7 25.8477 7H14.1577C12.6095 7 11.3545 8.25503 11.3545 9.80322C11.3547 10.3758 11.5302 10.9347 11.8574 11.4048Z",fill:"#514C49"}),I.jsx("path",{d:"M22.8637 29.5446C23.3612 29.8283 23.9338 29.9528 24.5042 29.9014L37.2991 28.7469C38.3271 28.6542 39.0851 27.7457 38.9924 26.7178C38.9876 26.6636 38.9803 26.6096 38.9706 26.556C38.5862 24.4114 37.8296 22.3507 36.7352 20.4668C35.6407 18.5829 34.2255 16.9048 32.5532 15.5085C31.761 14.8471 30.5825 14.953 29.9211 15.7455C29.8862 15.7872 29.8532 15.8305 29.8219 15.8752L22.4807 26.418C22.1535 26.888 21.978 27.4469 21.978 28.0198V27.9849C21.978 28.3055 22.0604 28.6208 22.2176 28.9002C22.3826 29.1751 22.6155 29.4029 22.8942 29.5617",fill:"#FDC433"}),I.jsx("path",{d:"M17.8492 28.7605C17.6844 29.097 17.4222 29.376 17.0969 29.5616L17.1365 29.539C16.6391 29.8227 16.0665 29.9472 15.4961 29.8959L2.70114 28.7414C2.64694 28.7365 2.59295 28.7293 2.53935 28.7196C1.52348 28.5375 0.847507 27.5663 1.02965 26.5505C1.41407 24.4057 2.17064 22.3451 3.26489 20.4611C4.35914 18.577 5.77455 16.8993 7.44706 15.5028C7.48877 15.4679 7.53208 15.4349 7.57681 15.4037C8.42384 14.8139 9.58841 15.0225 10.1784 15.8695L17.5196 26.4124C17.8468 26.8825 18.0223 27.4414 18.0223 28.0142V27.9685C18.0223 28.343 17.9096 28.7091 17.6991 29.019",fill:"#FDC433"})]})})}const tyt=Re(Toe,{shouldForwardProp:e=>e!=="open"})(({theme:e,open:t})=>({transition:e.transitions.create(["margin","width"],{easing:e.transitions.easing.sharp,duration:e.transitions.duration.leavingScreen}),...t&&{width:`calc(100% - ${dv}px)`,marginLeft:`${dv}px`,transition:e.transitions.create(["margin","width"],{easing:e.transitions.easing.easeOut,duration:e.transitions.duration.enteringScreen})}}));function nyt(e){var h,g;const{open:t,onDrawerOpen:n}=e,r=Ni(),i=Wf(),a=pi(zF),s=pi(pT),[o,l]=N.useState(null),u=b=>{l(b.currentTarget)},c=()=>{l(null)},f=()=>{var b;i(`/${(b=s.data)==null?void 0:b.slug}`)};return I.jsxs(tyt,{position:"fixed",open:t,children:[I.jsx(Ole,{children:I.jsxs(lr,{width:"100%",direction:"row-reverse",justifyContent:"space-between",alignItems:"center",children:[I.jsx(wa,{onClick:u,children:I.jsx(fF,{children:(g=(h=a.data)==null?void 0:h.nickname)==null?void 0:g.charAt(0)})}),I.jsxs(lr,{direction:"row",children:[I.jsx(wa,{color:"inherit","aria-label":"open drawer",onClick:n,edge:"start",sx:{mr:2},children:t?r.direction==="ltr"?I.jsx(dbe,{}):I.jsx(fbe,{}):I.jsx(ube,{})}),I.jsx(wa,{onClick:f,children:I.jsx(hbe,{})})]})]})}),I.jsx(Zbt,{open:!!o,anchorEl:o,onClose:c})]})}var tQ={},ryt=ca;Object.defineProperty(tQ,"__esModule",{value:!0});var pbe=tQ.default=void 0,iyt=ryt(da()),ayt=I;pbe=tQ.default=(0,iyt.default)((0,ayt.jsx)("path",{d:"M7.41 8.59 12 13.17l4.59-4.58L18 10l-6 6-6-6z"}),"KeyboardArrowDown");var nQ={},syt=ca;Object.defineProperty(nQ,"__esModule",{value:!0});var mbe=nQ.default=void 0,oyt=syt(da()),lyt=I;mbe=nQ.default=(0,oyt.default)((0,lyt.jsx)("path",{d:"M7.41 15.41 12 10.83l4.59 4.58L18 14l-6-6-6 6z"}),"KeyboardArrowUp");class Sx extends N.Component{constructor(t){super(t),this.scrollListener=this.scrollListener.bind(this),this.eventListenerOptions=this.eventListenerOptions.bind(this),this.mousewheelListener=this.mousewheelListener.bind(this)}componentDidMount(){this.pageLoaded=this.props.pageStart,this.options=this.eventListenerOptions(),this.attachScrollListener()}componentDidUpdate(){if(this.props.isReverse&&this.loadMore){const t=this.getParentElement(this.scrollComponent);t.scrollTop=t.scrollHeight-this.beforeScrollHeight+this.beforeScrollTop,this.loadMore=!1}this.attachScrollListener()}componentWillUnmount(){this.detachScrollListener(),this.detachMousewheelListener()}isPassiveSupported(){let t=!1;const n={get passive(){t=!0}};try{document.addEventListener("test",null,n),document.removeEventListener("test",null,n)}catch{}return t}eventListenerOptions(){let t=this.props.useCapture;return this.isPassiveSupported()?t={useCapture:this.props.useCapture,passive:!0}:t={passive:!1},t}setDefaultLoader(t){this.defaultLoader=t}detachMousewheelListener(){let t=window;this.props.useWindow===!1&&(t=this.scrollComponent.parentNode),t.removeEventListener("mousewheel",this.mousewheelListener,this.options?this.options:this.props.useCapture)}detachScrollListener(){let t=window;this.props.useWindow===!1&&(t=this.getParentElement(this.scrollComponent)),t.removeEventListener("scroll",this.scrollListener,this.options?this.options:this.props.useCapture),t.removeEventListener("resize",this.scrollListener,this.options?this.options:this.props.useCapture)}getParentElement(t){const n=this.props.getScrollParent&&this.props.getScrollParent();return n??(t&&t.parentNode)}filterProps(t){return t}attachScrollListener(){const t=this.getParentElement(this.scrollComponent);if(!this.props.hasMore||!t)return;let n=window;this.props.useWindow===!1&&(n=t),n.addEventListener("mousewheel",this.mousewheelListener,this.options?this.options:this.props.useCapture),n.addEventListener("scroll",this.scrollListener,this.options?this.options:this.props.useCapture),n.addEventListener("resize",this.scrollListener,this.options?this.options:this.props.useCapture),this.props.initialLoad&&this.scrollListener()}mousewheelListener(t){t.deltaY===1&&!this.isPassiveSupported()&&t.preventDefault()}scrollListener(){const t=this.scrollComponent,n=window,r=this.getParentElement(t);let i;if(this.props.useWindow){const a=document.documentElement||document.body.parentNode||document.body,s=n.pageYOffset!==void 0?n.pageYOffset:a.scrollTop;this.props.isReverse?i=s:i=this.calculateOffset(t,s)}else this.props.isReverse?i=r.scrollTop:i=t.scrollHeight-r.scrollTop-r.clientHeight;i{this.scrollComponent=w,c&&c(w)};const E=[n];return i&&(o?s?E.unshift(o):E.push(o):this.defaultLoader&&(s?E.unshift(this.defaultLoader):E.push(this.defaultLoader))),hn.createElement(r,S,E)}}Ms(Sx,"propTypes",{children:Y.node.isRequired,element:Y.node,hasMore:Y.bool,initialLoad:Y.bool,isReverse:Y.bool,loader:Y.node,loadMore:Y.func.isRequired,pageStart:Y.number,ref:Y.func,getScrollParent:Y.func,threshold:Y.number,useCapture:Y.bool,useWindow:Y.bool}),Ms(Sx,"defaultProps",{element:"div",hasMore:!1,initialLoad:!0,pageStart:0,ref:null,threshold:250,useWindow:!0,isReverse:!1,useCapture:!1,loader:null,getScrollParent:null});var rQ={},uyt=ca;Object.defineProperty(rQ,"__esModule",{value:!0});var gbe=rQ.default=void 0,cyt=uyt(da()),dyt=I;gbe=rQ.default=(0,cyt.default)((0,dyt.jsx)("path",{d:"M9 16.17 4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z"}),"Check");var iQ={},fyt=ca;Object.defineProperty(iQ,"__esModule",{value:!0});var ZI=iQ.default=void 0,hyt=fyt(da()),pyt=I;ZI=iQ.default=(0,hyt.default)((0,pyt.jsx)("path",{d:"M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6z"}),"Add");var aQ={},myt=ca;Object.defineProperty(aQ,"__esModule",{value:!0});var XI=aQ.default=void 0,gyt=myt(da()),byt=I;XI=aQ.default=(0,gyt.default)((0,byt.jsx)("path",{d:"M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"}),"Close");const yyt=e=>["check","name-conflict",e],bbe=e=>RO({queryKey:yyt(e||""),enabled:!!e,queryFn:async()=>(await Sr.post("/check/name-conflict",{name:e})).data});function ybe(e){const{title:t,onSuccess:n,enableConflictCheck:r,...i}=e,[a,s]=N.useState(""),[o,l]=N.useState(""),{data:u}=bbe(o),c=N.useMemo(()=>u!=null&&u.conflict?"Already Exists":null,[u==null?void 0:u.conflict]);bW(()=>{l(a)},500,[a]);const f=()=>{var b;(b=i==null?void 0:i.onClose)==null||b.call(i,new Event("Close Modal"),"escapeKeyDown")},h=async b=>{await n(b),f()},g=b=>{r&&s(b.target.value)};return I.jsx(S0,{disableAutoFocus:!0,...i,children:I.jsxs(Zs,{sx:{position:"absolute",top:"50%",left:"50%",transform:"translate(-50%, -50%)",p:4,width:400},children:[I.jsx(wa,{sx:{position:"absolute",top:28,right:28},onClick:f,children:I.jsx(XI,{})}),I.jsxs(lr,{gap:4,children:[I.jsxs(xr,{variant:"h5",children:["Create New ",t]}),I.jsx(kd,{children:I.jsx(JT,{defaultValues:{title:""},onSuccess:h,children:I.jsxs(lr,{gap:4,alignItems:"flex-end",children:[I.jsx(GI,{variant:"standard",name:"title",label:`Title of New ${t}`,required:!0,fullWidth:!0,inputProps:{maxLength:255},onChange:g,error:!!c,helperText:c}),I.jsx(Ws,{type:"submit",variant:"contained",size:"large",disabled:!!c,children:"OK"})]})})})]})]})})}function vyt(e){const{width:t,...n}=e,r=Wf(),i=x0(),{data:a,hasNextPage:s,fetchNextPage:o}=yUe(),{mutateAsync:l}=vUe(),u=N.useMemo(()=>(a==null?void 0:a.pages.reduce((E,w)=>E.concat(w.workspaces),[]))??[],[a==null?void 0:a.pages]),[c,f]=N.useState(!1),h=E=>{r(`/${E}`)},g=E=>{var w;i.workspaceSlug!==E&&(h(E),(w=n==null?void 0:n.onClose)==null||w.call(n,new Event("Close Popover"),"backdropClick"))},b=()=>{var E;f(w=>!w),n.open&&((E=n==null?void 0:n.onClose)==null||E.call(n,new Event("Close Popover"),"backdropClick"))},S=async E=>{const w=await l(E);h(w.slug)};return I.jsxs(I.Fragment,{children:[I.jsx(RR,{anchorOrigin:{vertical:"bottom",horizontal:"center"},transformOrigin:{vertical:"top",horizontal:"center"},...n,children:I.jsxs(kO,{sx:{width:t},children:[I.jsx(Ts,{style:{maxHeight:300,overflow:"auto"},children:I.jsx(Sx,{pageStart:0,loadMore:()=>o(),hasMore:s,loader:I.jsx(Ts,{className:"loader",children:I.jsx(bp,{size:"sm"})},0),useWindow:!1,children:u.map(E=>I.jsxs(np,{onClick:()=>g(E.slug),children:[I.jsx(t0,{primaryTypographyProps:{noWrap:!0,variant:"body2"},children:E.title}),i.workspaceSlug===E.slug&&I.jsx(gF,{children:I.jsx(gbe,{fontSize:"small"})})]},E.id))})}),I.jsx(c1,{}),I.jsxs(np,{onClick:b,children:[I.jsx(Nw,{children:I.jsx(ZI,{fontSize:"small"})}),I.jsx(t0,{children:"Create Workspace"})]})]})}),I.jsx(ybe,{open:c,title:"Workspace",onClose:b,onSuccess:S,enableConflictCheck:!0})]})}var sQ={},Oyt=ca;Object.defineProperty(sQ,"__esModule",{value:!0});var vbe=sQ.default=void 0,Syt=Oyt(da()),Eyt=I;vbe=sQ.default=(0,Syt.default)((0,Eyt.jsx)("path",{d:"M16 11c1.66 0 2.99-1.34 2.99-3S17.66 5 16 5c-1.66 0-3 1.34-3 3s1.34 3 3 3m-8 0c1.66 0 2.99-1.34 2.99-3S9.66 5 8 5C6.34 5 5 6.34 5 8s1.34 3 3 3m0 2c-2.33 0-7 1.17-7 3.5V19h14v-2.5c0-2.33-4.67-3.5-7-3.5m8 0c-.29 0-.62.02-.97.05 1.16.84 1.97 1.97 1.97 3.45V19h6v-2.5c0-2.33-4.67-3.5-7-3.5"}),"People");function wyt(e){var h;const{open:t}=e,n=w0(),r=x0(),i=Wf(),a=pi(pT),[s,o]=N.useState(null),l=N.useMemo(()=>n.pathname.split("/")[2]??"main",[n.pathname]),u=g=>{o(g.currentTarget)},c=()=>{o(null)},f=()=>{i(`/${r.workspaceSlug}/member`)};return I.jsxs(vDe,{sx:{width:dv,flexShrink:0,"& .MuiDrawer-paper":{width:dv,boxSizing:"border-box"}},variant:"persistent",anchor:"left",open:t,children:[I.jsx(Obe,{children:I.jsxs(A8,{disablePadding:!0,children:[I.jsxs(dZ,{onClick:u,children:[I.jsx(t0,{primary:(h=a.data)==null?void 0:h.title,primaryTypographyProps:{variant:"subtitle1",noWrap:!0}}),I.jsx(gF,{children:I.jsx(wa,{children:s?I.jsx(mbe,{}):I.jsx(pbe,{})})})]}),I.jsx(vyt,{open:!!s,anchorEl:s,onClose:c,width:dv-32})]})}),I.jsx(c1,{}),I.jsx(A8,{disablePadding:!0,children:I.jsxs(dZ,{onClick:f,selected:l==="member",children:[I.jsx(Nw,{children:I.jsx(vbe,{})}),I.jsx(t0,{primary:"Members"})]})})]})}const dv=282,xyt=Re("main",{shouldForwardProp:e=>e!=="open"})(({theme:e,open:t})=>({flexGrow:1,paddingLeft:e.spacing(3),paddingRight:e.spacing(3),paddingTop:e.spacing(3),transition:e.transitions.create("margin",{easing:e.transitions.easing.sharp,duration:e.transitions.duration.leavingScreen}),marginLeft:`-${dv}px`,...t&&{transition:e.transitions.create("margin",{easing:e.transitions.easing.easeOut,duration:e.transitions.duration.enteringScreen}),marginLeft:0}})),Obe=Re("div")(({theme:e})=>({display:"flex",alignItems:"center",padding:e.spacing(0,1),...e.mixins.toolbar,justifyContent:"flex-end"}));function Tyt(){const{drawerOpen:e}=pi(PF),t=Du(),n=()=>{t(oFe(!e))};return I.jsxs(Ts,{sx:{display:"flex"},children:[I.jsx(nyt,{open:e,onDrawerOpen:n}),I.jsx(wyt,{open:e}),I.jsxs(xyt,{open:e,children:[I.jsx(Obe,{}),I.jsx(kF,{})]})]})}const oQ=hn.createContext({isLoading:!0,isLoggedIn:!1}),kyt=e=>{var a;const{children:t}=e,{isLoggedIn:n}=N.useContext(oQ),r=w0(),i=pi(zF);return n?I.jsx(TF,{to:`/${(a=i.data)==null?void 0:a.lastWorkspaceSlug}`,state:{from:r},replace:!0}):t},Cyt=()=>["settings"],Ayt=()=>{const e=Du(),t=pi(rI),n=RO({queryKey:Cyt(),enabled:t.yorkieIntelligence===null&&t.fileUpload===null,queryFn:async()=>(await Sr.get("/settings")).data,staleTime:1e3*60*60*24});return N.useEffect(()=>{if(!n.isSuccess)return;const r=n.data;e(KZe(r.yorkieIntelligence)),e(JZe(r.fileUpload))},[e,n.data,n.isSuccess]),n},_yt=e=>{const{children:t}=e,{isLoggedIn:n,isLoading:r}=N.useContext(oQ),i=w0();return Ayt(),r?I.jsx(aT,{open:!0,children:I.jsx(bp,{color:"inherit"})}):n?t:I.jsx(TF,{to:"/",state:{from:i},replace:!0})};//! moment.js +${te}`);const z=H?K:K+1,Te=K+te.length;(be=s.doc)==null||be.update((ye,Oe)=>{ye.content.edit(K,X,te),Oe.set({selection:ye.content.indexRangeToPosRange([z,Te])})}),(ee=s.cmView)==null||ee.dispatch({changes:{from:K,to:X,insert:te},selection:{anchor:z,head:Te}}),r()};return I.jsxs(lr,{gap:4,children:[I.jsx(Ts,{bgcolor:i.palette.background.paper,p:1,borderRadius:2,border:1,children:I.jsx(xr,{children:t})}),k&&I.jsx(bp,{sx:{marginX:"auto"}}),I.jsx(Ts,{ref:D,sx:{height:350,overflow:"auto"},children:!k&&I.jsx(S0e,{source:$L(R||""),wrapperElement:{"data-color-mode":a}})}),I.jsxs(lr,{gap:2,children:[I.jsx(tp,{in:C,children:I.jsxs(lr,{direction:"row",justifyContent:"flex-end",gap:1,children:[I.jsx(Ws,{variant:"outlined",onClick:V,children:I.jsx(Bge,{fontSize:"small"})}),I.jsx(Ws,{variant:"outlined",onClick:W,children:I.jsx(UI,{fontSize:"small"})}),I.jsx(Ws,{variant:"outlined",onClick:()=>Q(),children:"Insert below"}),I.jsx(Ws,{variant:"contained",onClick:()=>Q(!0),children:"Replace"})]})}),I.jsx(kd,{children:I.jsx(JT,{defaultValues:{content:""},formContext:B,onSuccess:Z,children:I.jsx(lr,{gap:4,alignItems:"flex-end",children:I.jsx(GI,{variant:"outlined",name:"content",placeholder:"Tell Yorkie what to do next",required:!0,fullWidth:!0,disabled:!C,size:"small",InputProps:{startAdornment:I.jsx(Dw,{position:"start",children:I.jsx("img",{src:"/yorkie.png",height:20})}),endAdornment:I.jsx(tp,{in:C,children:I.jsx(Dw,{position:"end",children:I.jsx(wa,{type:"submit",edge:"end",children:I.jsx(abe,{})})})})}})})})})]})]})}function Dbt(e){const{onCloseIntelligence:t,...n}=e,r=()=>{var a;(a=n==null?void 0:n.onClose)==null||a.call(n,new Event("Close Modal"),"escapeKeyDown")},i=()=>{t(),r()};return I.jsx(S0,{disableAutoFocus:!0,...n,children:I.jsx(Zs,{sx:{position:"absolute",top:"50%",left:"50%",transform:"translate(-50%, -50%)",p:4},children:I.jsxs(lr,{gap:4,children:[I.jsxs(lr,{alignItems:"center",gap:1,children:[I.jsx("img",{src:"/yorkie.png",alt:"yorkie",width:60}),I.jsxs(xr,{variant:"h6",align:"center",children:["Do you want to discard",I.jsx("br",{}),"the Yorkie response?"]})]}),I.jsxs(lr,{direction:"row",gap:1,justifyContent:"center",children:[I.jsx(Ws,{variant:"outlined",onClick:i,children:"Discard"}),I.jsx(Ws,{variant:"contained",onClick:r,children:"Cancel"})]})]})})})}function Nbt(e){const{onClose:t}=e,n=Ni(),r=pi(AO),i=N.useRef(null),[a,s]=N.useState(null),[o,l]=N.useState(null),[u,c]=N.useState(),[f,h]=N.useState(!1),g=N.useRef(null),b=N.useMemo(()=>r.cmView.contentDOM.getBoundingClientRect().width-12,[r.cmView]);N.useEffect(()=>{if(i.current)return c(i.current),()=>{c(void 0)}},[]);const S=(w,x)=>{l(w),s(x)},E=()=>{h(w=>!w)};return I.jsxs(Ts,{sx:{position:"absolute",mt:1},children:[I.jsx("span",{ref:i,style:{marginTop:4}}),I.jsx(RR,{open:!!u,anchorEl:u,anchorOrigin:{vertical:"bottom",horizontal:"left"},transformOrigin:{vertical:"top",horizontal:"left"},onClose:E,children:I.jsx(hF,{ref:g,sx:{boxShadow:n.shadows[11],borderRadius:2,width:b,padding:2},children:o&&a?I.jsx(Ibt,{title:a,feature:o,onClose:t}):I.jsx(qft,{onSelectFeature:S})})}),I.jsx(Dbt,{open:f,onCloseIntelligence:t,onClose:E})]})}function Pbt(){const e=Ni(),[t,n]=N.useState(!1),[r,i]=N.useState(null),[a,s]=N.useState(null),[o,l]=N.useState(null);bW(()=>{l(r)},500,[r]),N.useEffect(()=>{document.addEventListener("selectionchange",function(){const c=document.getElementById(spe),f=document.getElementById($B);i(c),s(f),c||(n(!1),l(null))})},[]);const u=()=>{n(c=>!c)};if(!(!o||!a))return I.jsxs(I.Fragment,{children:[I.jsx(wO,{open:!!o,anchorEl:o,placement:"top-start",transition:!0,children:({TransitionProps:c})=>I.jsx(tp,{...c,children:I.jsx(hF,{sx:{boxShadow:e.shadows[11],borderRadius:2,mb:1},children:I.jsx(Qoe,{sx:{paddingX:1.3,paddingY:.3},onClick:u,children:I.jsxs(lr,{direction:"row",alignItems:"center",gap:1,children:[I.jsx("img",{src:"/yorkie.png",height:20}),I.jsx(xr,{variant:"subtitle1",children:"Yorkie Intelligence"})]})})})})}),t&&T1.createPortal(I.jsx(Nbt,{onClose:u}),a)]})}function Mbt(){var l,u;const e=Du(),t=x0(),n=pi(zF),r=pi(rI),{data:i}=QF(t.workspaceSlug),{data:a}=fUe(i==null?void 0:i.id,t.documentId),{doc:s,client:o}=Nge(a==null?void 0:a.yorkieDocumentId,(l=n.data)==null?void 0:l.nickname);return N.useEffect(()=>{if(!(!s||!o))return e(t3(s)),e(n3(o)),()=>{e(t3(null)),e(n3(null))}},[e,o,s]),I.jsxs(Ts,{height:"calc(100% - 64px)",children:[I.jsx(xge,{}),((u=r.yorkieIntelligence)==null?void 0:u.enable)&&I.jsx(Pbt,{})]})}function Lbt(){return I.jsx(lr,{sx:{flexGrow:1,height:"100vh"},children:I.jsx(kF,{})})}function $bt(){const e=Du(),t=Wf(),[n]=CF();return N.useEffect(()=>{const r=n.get("token");if(!r){t("/");return}e(gW(r))},[e,t,n]),I.jsx(Ts,{})}var qW={},Fbt=ca;Object.defineProperty(qW,"__esModule",{value:!0});var ube=qW.default=void 0,Bbt=Fbt(da()),Ubt=I;ube=qW.default=(0,Bbt.default)((0,Ubt.jsx)("path",{d:"M3 18h18v-2H3zm0-5h18v-2H3zm0-7v2h18V6z"}),"Menu");var GW={},zbt=ca;Object.defineProperty(GW,"__esModule",{value:!0});var cbe=GW.default=void 0,jbt=zbt(da()),Hbt=I;cbe=GW.default=(0,jbt.default)((0,Hbt.jsx)("path",{d:"m17 7-1.41 1.41L18.17 11H8v2h10.17l-2.58 2.58L17 17l5-5zM4 5h8V3H4c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h8v-2H4z"}),"Logout");var YW={},Vbt=ca;Object.defineProperty(YW,"__esModule",{value:!0});var ZW=YW.default=void 0,Wbt=Vbt(da()),Qbt=I;ZW=YW.default=(0,Wbt.default)((0,Qbt.jsx)("path",{d:"M12 3c-4.97 0-9 4.03-9 9s4.03 9 9 9 9-4.03 9-9c0-.46-.04-.92-.1-1.36-.98 1.37-2.58 2.26-4.4 2.26-2.98 0-5.4-2.42-5.4-5.4 0-1.81.89-3.42 2.26-4.4-.44-.06-.9-.1-1.36-.1"}),"DarkMode");var XW={},qbt=ca;Object.defineProperty(XW,"__esModule",{value:!0});var KW=XW.default=void 0,Gbt=qbt(da()),Ybt=I;KW=XW.default=(0,Gbt.default)((0,Ybt.jsx)("path",{d:"M12 7c-2.76 0-5 2.24-5 5s2.24 5 5 5 5-2.24 5-5-2.24-5-5-5M2 13h2c.55 0 1-.45 1-1s-.45-1-1-1H2c-.55 0-1 .45-1 1s.45 1 1 1m18 0h2c.55 0 1-.45 1-1s-.45-1-1-1h-2c-.55 0-1 .45-1 1s.45 1 1 1M11 2v2c0 .55.45 1 1 1s1-.45 1-1V2c0-.55-.45-1-1-1s-1 .45-1 1m0 18v2c0 .55.45 1 1 1s1-.45 1-1v-2c0-.55-.45-1-1-1s-1 .45-1 1M5.99 4.58c-.39-.39-1.03-.39-1.41 0-.39.39-.39 1.03 0 1.41l1.06 1.06c.39.39 1.03.39 1.41 0s.39-1.03 0-1.41zm12.37 12.37c-.39-.39-1.03-.39-1.41 0-.39.39-.39 1.03 0 1.41l1.06 1.06c.39.39 1.03.39 1.41 0 .39-.39.39-1.03 0-1.41zm1.06-10.96c.39-.39.39-1.03 0-1.41-.39-.39-1.03-.39-1.41 0l-1.06 1.06c-.39.39-.39 1.03 0 1.41s1.03.39 1.41 0zM7.05 18.36c.39-.39.39-1.03 0-1.41-.39-.39-1.03-.39-1.41 0l-1.06 1.06c-.39.39-.39 1.03 0 1.41s1.03.39 1.41 0z"}),"LightMode");function Zbt(e){const t=Du(),n=kT(),r=()=>{t(gW(null)),t(Q8(null))},i=()=>{t(iue(n=="light"?"dark":"light"))};return I.jsx(RR,{anchorOrigin:{vertical:"bottom",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"right"},...e,children:I.jsxs(kO,{children:[I.jsxs(np,{onClick:i,children:[I.jsx(Nw,{children:n==="light"?I.jsx(KW,{}):I.jsx(ZW,{})}),I.jsx(t0,{children:"Appearance"})]}),I.jsxs(np,{onClick:r,children:[I.jsx(Nw,{children:I.jsx(cbe,{fontSize:"small"})}),I.jsx(t0,{children:"Logout"})]})]})})}var JW={},Xbt=ca;Object.defineProperty(JW,"__esModule",{value:!0});var dbe=JW.default=void 0,Kbt=Xbt(da()),pre=I;dbe=JW.default=(0,Kbt.default)([(0,pre.jsx)("path",{d:"M17.59 18 19 16.59 14.42 12 19 7.41 17.59 6l-6 6z"},"0"),(0,pre.jsx)("path",{d:"m11 18 1.41-1.41L7.83 12l4.58-4.59L11 6l-6 6z"},"1")],"KeyboardDoubleArrowLeft");var eQ={},Jbt=ca;Object.defineProperty(eQ,"__esModule",{value:!0});var fbe=eQ.default=void 0,eyt=Jbt(da()),mre=I;fbe=eQ.default=(0,eyt.default)([(0,mre.jsx)("path",{d:"M6.41 6 5 7.41 9.58 12 5 16.59 6.41 18l6-6z"},"0"),(0,mre.jsx)("path",{d:"m13 6-1.41 1.41L16.17 12l-4.58 4.59L13 18l6-6z"},"1")],"KeyboardDoubleArrowRight");function hbe(e){return I.jsx(Jm,{...e,children:I.jsxs("svg",{width:"40",height:"38",viewBox:"0 0 40 38",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:{width:30,height:30},children:[I.jsx("path",{d:"M11.8574 11.4048L18.8525 21.4507C19.2947 22.086 20.1683 22.2423 20.8036 21.8001C20.9398 21.7052 21.0581 21.5869 21.153 21.4507L28.148 11.4048C29.0327 10.1343 28.7198 8.3872 27.4495 7.5027C26.9794 7.17549 26.4205 7 25.8477 7H14.1577C12.6095 7 11.3545 8.25503 11.3545 9.80322C11.3547 10.3758 11.5302 10.9347 11.8574 11.4048Z",fill:"#514C49"}),I.jsx("path",{d:"M22.8637 29.5446C23.3612 29.8283 23.9338 29.9528 24.5042 29.9014L37.2991 28.7469C38.3271 28.6542 39.0851 27.7457 38.9924 26.7178C38.9876 26.6636 38.9803 26.6096 38.9706 26.556C38.5862 24.4114 37.8296 22.3507 36.7352 20.4668C35.6407 18.5829 34.2255 16.9048 32.5532 15.5085C31.761 14.8471 30.5825 14.953 29.9211 15.7455C29.8862 15.7872 29.8532 15.8305 29.8219 15.8752L22.4807 26.418C22.1535 26.888 21.978 27.4469 21.978 28.0198V27.9849C21.978 28.3055 22.0604 28.6208 22.2176 28.9002C22.3826 29.1751 22.6155 29.4029 22.8942 29.5617",fill:"#FDC433"}),I.jsx("path",{d:"M17.8492 28.7605C17.6844 29.097 17.4222 29.376 17.0969 29.5616L17.1365 29.539C16.6391 29.8227 16.0665 29.9472 15.4961 29.8959L2.70114 28.7414C2.64694 28.7365 2.59295 28.7293 2.53935 28.7196C1.52348 28.5375 0.847507 27.5663 1.02965 26.5505C1.41407 24.4057 2.17064 22.3451 3.26489 20.4611C4.35914 18.577 5.77455 16.8993 7.44706 15.5028C7.48877 15.4679 7.53208 15.4349 7.57681 15.4037C8.42384 14.8139 9.58841 15.0225 10.1784 15.8695L17.5196 26.4124C17.8468 26.8825 18.0223 27.4414 18.0223 28.0142V27.9685C18.0223 28.343 17.9096 28.7091 17.6991 29.019",fill:"#FDC433"})]})})}const tyt=Re(Toe,{shouldForwardProp:e=>e!=="open"})(({theme:e,open:t})=>({transition:e.transitions.create(["margin","width"],{easing:e.transitions.easing.sharp,duration:e.transitions.duration.leavingScreen}),...t&&{width:`calc(100% - ${dv}px)`,marginLeft:`${dv}px`,transition:e.transitions.create(["margin","width"],{easing:e.transitions.easing.easeOut,duration:e.transitions.duration.enteringScreen})}}));function nyt(e){var h,g;const{open:t,onDrawerOpen:n}=e,r=Ni(),i=Wf(),a=pi(zF),s=pi(pT),[o,l]=N.useState(null),u=b=>{l(b.currentTarget)},c=()=>{l(null)},f=()=>{var b;i(`/${(b=s.data)==null?void 0:b.slug}`)};return I.jsxs(tyt,{position:"fixed",open:t,children:[I.jsx(Ole,{children:I.jsxs(lr,{width:"100%",direction:"row-reverse",justifyContent:"space-between",alignItems:"center",children:[I.jsx(wa,{onClick:u,children:I.jsx(fF,{children:(g=(h=a.data)==null?void 0:h.nickname)==null?void 0:g.charAt(0)})}),I.jsxs(lr,{direction:"row",children:[I.jsx(wa,{color:"inherit","aria-label":"open drawer",onClick:n,edge:"start",sx:{mr:2},children:t?r.direction==="ltr"?I.jsx(dbe,{}):I.jsx(fbe,{}):I.jsx(ube,{})}),I.jsx(wa,{onClick:f,children:I.jsx(hbe,{})})]})]})}),I.jsx(Zbt,{open:!!o,anchorEl:o,onClose:c})]})}var tQ={},ryt=ca;Object.defineProperty(tQ,"__esModule",{value:!0});var pbe=tQ.default=void 0,iyt=ryt(da()),ayt=I;pbe=tQ.default=(0,iyt.default)((0,ayt.jsx)("path",{d:"M7.41 8.59 12 13.17l4.59-4.58L18 10l-6 6-6-6z"}),"KeyboardArrowDown");var nQ={},syt=ca;Object.defineProperty(nQ,"__esModule",{value:!0});var mbe=nQ.default=void 0,oyt=syt(da()),lyt=I;mbe=nQ.default=(0,oyt.default)((0,lyt.jsx)("path",{d:"M7.41 15.41 12 10.83l4.59 4.58L18 14l-6-6-6 6z"}),"KeyboardArrowUp");class Sx extends N.Component{constructor(t){super(t),this.scrollListener=this.scrollListener.bind(this),this.eventListenerOptions=this.eventListenerOptions.bind(this),this.mousewheelListener=this.mousewheelListener.bind(this)}componentDidMount(){this.pageLoaded=this.props.pageStart,this.options=this.eventListenerOptions(),this.attachScrollListener()}componentDidUpdate(){if(this.props.isReverse&&this.loadMore){const t=this.getParentElement(this.scrollComponent);t.scrollTop=t.scrollHeight-this.beforeScrollHeight+this.beforeScrollTop,this.loadMore=!1}this.attachScrollListener()}componentWillUnmount(){this.detachScrollListener(),this.detachMousewheelListener()}isPassiveSupported(){let t=!1;const n={get passive(){t=!0}};try{document.addEventListener("test",null,n),document.removeEventListener("test",null,n)}catch{}return t}eventListenerOptions(){let t=this.props.useCapture;return this.isPassiveSupported()?t={useCapture:this.props.useCapture,passive:!0}:t={passive:!1},t}setDefaultLoader(t){this.defaultLoader=t}detachMousewheelListener(){let t=window;this.props.useWindow===!1&&(t=this.scrollComponent.parentNode),t.removeEventListener("mousewheel",this.mousewheelListener,this.options?this.options:this.props.useCapture)}detachScrollListener(){let t=window;this.props.useWindow===!1&&(t=this.getParentElement(this.scrollComponent)),t.removeEventListener("scroll",this.scrollListener,this.options?this.options:this.props.useCapture),t.removeEventListener("resize",this.scrollListener,this.options?this.options:this.props.useCapture)}getParentElement(t){const n=this.props.getScrollParent&&this.props.getScrollParent();return n??(t&&t.parentNode)}filterProps(t){return t}attachScrollListener(){const t=this.getParentElement(this.scrollComponent);if(!this.props.hasMore||!t)return;let n=window;this.props.useWindow===!1&&(n=t),n.addEventListener("mousewheel",this.mousewheelListener,this.options?this.options:this.props.useCapture),n.addEventListener("scroll",this.scrollListener,this.options?this.options:this.props.useCapture),n.addEventListener("resize",this.scrollListener,this.options?this.options:this.props.useCapture),this.props.initialLoad&&this.scrollListener()}mousewheelListener(t){t.deltaY===1&&!this.isPassiveSupported()&&t.preventDefault()}scrollListener(){const t=this.scrollComponent,n=window,r=this.getParentElement(t);let i;if(this.props.useWindow){const a=document.documentElement||document.body.parentNode||document.body,s=n.pageYOffset!==void 0?n.pageYOffset:a.scrollTop;this.props.isReverse?i=s:i=this.calculateOffset(t,s)}else this.props.isReverse?i=r.scrollTop:i=t.scrollHeight-r.scrollTop-r.clientHeight;i{this.scrollComponent=w,c&&c(w)};const E=[n];return i&&(o?s?E.unshift(o):E.push(o):this.defaultLoader&&(s?E.unshift(this.defaultLoader):E.push(this.defaultLoader))),hn.createElement(r,S,E)}}Ms(Sx,"propTypes",{children:Y.node.isRequired,element:Y.node,hasMore:Y.bool,initialLoad:Y.bool,isReverse:Y.bool,loader:Y.node,loadMore:Y.func.isRequired,pageStart:Y.number,ref:Y.func,getScrollParent:Y.func,threshold:Y.number,useCapture:Y.bool,useWindow:Y.bool}),Ms(Sx,"defaultProps",{element:"div",hasMore:!1,initialLoad:!0,pageStart:0,ref:null,threshold:250,useWindow:!0,isReverse:!1,useCapture:!1,loader:null,getScrollParent:null});var rQ={},uyt=ca;Object.defineProperty(rQ,"__esModule",{value:!0});var gbe=rQ.default=void 0,cyt=uyt(da()),dyt=I;gbe=rQ.default=(0,cyt.default)((0,dyt.jsx)("path",{d:"M9 16.17 4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z"}),"Check");var iQ={},fyt=ca;Object.defineProperty(iQ,"__esModule",{value:!0});var ZI=iQ.default=void 0,hyt=fyt(da()),pyt=I;ZI=iQ.default=(0,hyt.default)((0,pyt.jsx)("path",{d:"M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6z"}),"Add");var aQ={},myt=ca;Object.defineProperty(aQ,"__esModule",{value:!0});var XI=aQ.default=void 0,gyt=myt(da()),byt=I;XI=aQ.default=(0,gyt.default)((0,byt.jsx)("path",{d:"M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"}),"Close");const yyt=e=>["check","name-conflict",e],bbe=e=>RO({queryKey:yyt(e||""),enabled:!!e,queryFn:async()=>(await Sr.post("/check/name-conflict",{name:e})).data});function ybe(e){const{title:t,onSuccess:n,enableConflictCheck:r,...i}=e,[a,s]=N.useState(""),[o,l]=N.useState(""),{data:u}=bbe(o),c=N.useMemo(()=>u!=null&&u.conflict?"Already Exists":null,[u==null?void 0:u.conflict]);bW(()=>{l(a)},500,[a]);const f=()=>{var b;(b=i==null?void 0:i.onClose)==null||b.call(i,new Event("Close Modal"),"escapeKeyDown")},h=async b=>{await n(b),f()},g=b=>{r&&s(b.target.value)};return I.jsx(S0,{disableAutoFocus:!0,...i,children:I.jsxs(Zs,{sx:{position:"absolute",top:"50%",left:"50%",transform:"translate(-50%, -50%)",p:4,width:400},children:[I.jsx(wa,{sx:{position:"absolute",top:28,right:28},onClick:f,children:I.jsx(XI,{})}),I.jsxs(lr,{gap:4,children:[I.jsxs(xr,{variant:"h5",children:["Create New ",t]}),I.jsx(kd,{children:I.jsx(JT,{defaultValues:{title:""},onSuccess:h,children:I.jsxs(lr,{gap:4,alignItems:"flex-end",children:[I.jsx(GI,{variant:"standard",name:"title",label:`Title of New ${t}`,required:!0,fullWidth:!0,inputProps:{maxLength:255},onChange:g,error:!!c,helperText:c}),I.jsx(Ws,{type:"submit",variant:"contained",size:"large",disabled:!!c,children:"OK"})]})})})]})]})})}function vyt(e){const{width:t,...n}=e,r=Wf(),i=x0(),{data:a,hasNextPage:s,fetchNextPage:o}=yUe(),{mutateAsync:l}=vUe(),u=N.useMemo(()=>(a==null?void 0:a.pages.reduce((E,w)=>E.concat(w.workspaces),[]))??[],[a==null?void 0:a.pages]),[c,f]=N.useState(!1),h=E=>{r(`/${E}`)},g=E=>{var w;i.workspaceSlug!==E&&(h(E),(w=n==null?void 0:n.onClose)==null||w.call(n,new Event("Close Popover"),"backdropClick"))},b=()=>{var E;f(w=>!w),n.open&&((E=n==null?void 0:n.onClose)==null||E.call(n,new Event("Close Popover"),"backdropClick"))},S=async E=>{const w=await l(E);h(w.slug)};return I.jsxs(I.Fragment,{children:[I.jsx(RR,{anchorOrigin:{vertical:"bottom",horizontal:"center"},transformOrigin:{vertical:"top",horizontal:"center"},...n,children:I.jsxs(kO,{sx:{width:t},children:[I.jsx(Ts,{style:{maxHeight:300,overflow:"auto"},children:I.jsx(Sx,{pageStart:0,loadMore:()=>o(),hasMore:s,loader:I.jsx(Ts,{className:"loader",children:I.jsx(bp,{size:"sm"})},0),useWindow:!1,children:u.map(E=>I.jsxs(np,{onClick:()=>g(E.slug),children:[I.jsx(t0,{primaryTypographyProps:{noWrap:!0,variant:"body2"},children:E.title}),i.workspaceSlug===E.slug&&I.jsx(gF,{children:I.jsx(gbe,{fontSize:"small"})})]},E.id))})}),I.jsx(c1,{}),I.jsxs(np,{onClick:b,children:[I.jsx(Nw,{children:I.jsx(ZI,{fontSize:"small"})}),I.jsx(t0,{children:"Create Workspace"})]})]})}),I.jsx(ybe,{open:c,title:"Workspace",onClose:b,onSuccess:S,enableConflictCheck:!0})]})}var sQ={},Oyt=ca;Object.defineProperty(sQ,"__esModule",{value:!0});var vbe=sQ.default=void 0,Syt=Oyt(da()),Eyt=I;vbe=sQ.default=(0,Syt.default)((0,Eyt.jsx)("path",{d:"M16 11c1.66 0 2.99-1.34 2.99-3S17.66 5 16 5c-1.66 0-3 1.34-3 3s1.34 3 3 3m-8 0c1.66 0 2.99-1.34 2.99-3S9.66 5 8 5C6.34 5 5 6.34 5 8s1.34 3 3 3m0 2c-2.33 0-7 1.17-7 3.5V19h14v-2.5c0-2.33-4.67-3.5-7-3.5m8 0c-.29 0-.62.02-.97.05 1.16.84 1.97 1.97 1.97 3.45V19h6v-2.5c0-2.33-4.67-3.5-7-3.5"}),"People");function wyt(e){var h;const{open:t}=e,n=w0(),r=x0(),i=Wf(),a=pi(pT),[s,o]=N.useState(null),l=N.useMemo(()=>n.pathname.split("/")[2]??"main",[n.pathname]),u=g=>{o(g.currentTarget)},c=()=>{o(null)},f=()=>{i(`/${r.workspaceSlug}/member`)};return I.jsxs(vDe,{sx:{width:dv,flexShrink:0,"& .MuiDrawer-paper":{width:dv,boxSizing:"border-box"}},variant:"persistent",anchor:"left",open:t,children:[I.jsx(Obe,{children:I.jsxs(A8,{disablePadding:!0,children:[I.jsxs(dZ,{onClick:u,children:[I.jsx(t0,{primary:(h=a.data)==null?void 0:h.title,primaryTypographyProps:{variant:"subtitle1",noWrap:!0}}),I.jsx(gF,{children:I.jsx(wa,{children:s?I.jsx(mbe,{}):I.jsx(pbe,{})})})]}),I.jsx(vyt,{open:!!s,anchorEl:s,onClose:c,width:dv-32})]})}),I.jsx(c1,{}),I.jsx(A8,{disablePadding:!0,children:I.jsxs(dZ,{onClick:f,selected:l==="member",children:[I.jsx(Nw,{children:I.jsx(vbe,{})}),I.jsx(t0,{primary:"Members"})]})})]})}const dv=282,xyt=Re("main",{shouldForwardProp:e=>e!=="open"})(({theme:e,open:t})=>({flexGrow:1,paddingLeft:e.spacing(3),paddingRight:e.spacing(3),paddingTop:e.spacing(3),transition:e.transitions.create("margin",{easing:e.transitions.easing.sharp,duration:e.transitions.duration.leavingScreen}),marginLeft:`-${dv}px`,...t&&{transition:e.transitions.create("margin",{easing:e.transitions.easing.easeOut,duration:e.transitions.duration.enteringScreen}),marginLeft:0}})),Obe=Re("div")(({theme:e})=>({display:"flex",alignItems:"center",padding:e.spacing(0,1),...e.mixins.toolbar,justifyContent:"flex-end"}));function Tyt(){const{drawerOpen:e}=pi(PF),t=Du(),n=()=>{t(oFe(!e))};return I.jsxs(Ts,{sx:{display:"flex"},children:[I.jsx(nyt,{open:e,onDrawerOpen:n}),I.jsx(wyt,{open:e}),I.jsxs(xyt,{open:e,children:[I.jsx(Obe,{}),I.jsx(kF,{})]})]})}const oQ=hn.createContext({isLoading:!0,isLoggedIn:!1}),kyt=e=>{var a;const{children:t}=e,{isLoggedIn:n}=N.useContext(oQ),r=w0(),i=pi(zF);return n?I.jsx(TF,{to:`/${(a=i.data)==null?void 0:a.lastWorkspaceSlug}`,state:{from:r},replace:!0}):t},Cyt=e=>{const{children:t}=e,{isLoggedIn:n,isLoading:r}=N.useContext(oQ),i=w0();return r?I.jsx(aT,{open:!0,children:I.jsx(bp,{color:"inherit"})}):n?t:I.jsx(TF,{to:"/",state:{from:i},replace:!0})};//! moment.js //! version : 2.30.1 //! authors : Tim Wood, Iskren Chernev, Moment.js contributors //! license : MIT //! momentjs.com -var Sbe;function un(){return Sbe.apply(null,arguments)}function Ryt(e){Sbe=e}function Ed(e){return e instanceof Array||Object.prototype.toString.call(e)==="[object Array]"}function e1(e){return e!=null&&Object.prototype.toString.call(e)==="[object Object]"}function Jr(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function lQ(e){if(Object.getOwnPropertyNames)return Object.getOwnPropertyNames(e).length===0;var t;for(t in e)if(Jr(e,t))return!1;return!0}function pl(e){return e===void 0}function fp(e){return typeof e=="number"||Object.prototype.toString.call(e)==="[object Number]"}function ek(e){return e instanceof Date||Object.prototype.toString.call(e)==="[object Date]"}function Ebe(e,t){var n=[],r,i=e.length;for(r=0;r>>0,r;for(r=0;r0)for(n=0;n>>0,r;for(r=0;r0)for(n=0;n=0;return(a?n?"+":"":"-")+Math.pow(10,Math.max(0,i)).toString().substr(1)+r}var fQ=/(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|N{1,5}|YYYYYY|YYYYY|YYYY|YY|y{2,4}|yo?|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,GA=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,p7={},fv={};function Un(e,t,n,r){var i=r;typeof r=="string"&&(i=function(){return this[r]()}),e&&(fv[e]=i),t&&(fv[t[0]]=function(){return jf(i.apply(this,arguments),t[1],t[2])}),n&&(fv[n]=function(){return this.localeData().ordinal(i.apply(this,arguments),e)})}function Myt(e){return e.match(/\[[\s\S]/)?e.replace(/^\[|\]$/g,""):e.replace(/\\/g,"")}function Lyt(e){var t=e.match(fQ),n,r;for(n=0,r=t.length;n=0&&GA.test(e);)e=e.replace(GA,r),GA.lastIndex=0,n-=1;return e}var $yt={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"};function Fyt(e){var t=this._longDateFormat[e],n=this._longDateFormat[e.toUpperCase()];return t||!n?t:(this._longDateFormat[e]=n.match(fQ).map(function(r){return r==="MMMM"||r==="MM"||r==="DD"||r==="dddd"?r.slice(1):r}).join(""),this._longDateFormat[e])}var Byt="Invalid date";function Uyt(){return this._invalidDate}var zyt="%d",jyt=/\d{1,2}/;function Hyt(e){return this._ordinal.replace("%d",e)}var Vyt={future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",w:"a week",ww:"%d weeks",M:"a month",MM:"%d months",y:"a year",yy:"%d years"};function Wyt(e,t,n,r){var i=this._relativeTime[n];return rh(i)?i(e,t,n,r):i.replace(/%d/i,e)}function Qyt(e,t){var n=this._relativeTime[e>0?"future":"past"];return rh(n)?n(t):n.replace(/%s/i,t)}var yre={D:"date",dates:"date",date:"date",d:"day",days:"day",day:"day",e:"weekday",weekdays:"weekday",weekday:"weekday",E:"isoWeekday",isoweekdays:"isoWeekday",isoweekday:"isoWeekday",DDD:"dayOfYear",dayofyears:"dayOfYear",dayofyear:"dayOfYear",h:"hour",hours:"hour",hour:"hour",ms:"millisecond",milliseconds:"millisecond",millisecond:"millisecond",m:"minute",minutes:"minute",minute:"minute",M:"month",months:"month",month:"month",Q:"quarter",quarters:"quarter",quarter:"quarter",s:"second",seconds:"second",second:"second",gg:"weekYear",weekyears:"weekYear",weekyear:"weekYear",GG:"isoWeekYear",isoweekyears:"isoWeekYear",isoweekyear:"isoWeekYear",w:"week",weeks:"week",week:"week",W:"isoWeek",isoweeks:"isoWeek",isoweek:"isoWeek",y:"year",years:"year",year:"year"};function Lc(e){return typeof e=="string"?yre[e]||yre[e.toLowerCase()]:void 0}function hQ(e){var t={},n,r;for(r in e)Jr(e,r)&&(n=Lc(r),n&&(t[n]=e[r]));return t}var qyt={date:9,day:11,weekday:11,isoWeekday:11,dayOfYear:4,hour:13,millisecond:16,minute:14,month:8,quarter:7,second:15,weekYear:1,isoWeekYear:1,week:5,isoWeek:5,year:1};function Gyt(e){var t=[],n;for(n in e)Jr(e,n)&&t.push({unit:n,priority:qyt[n]});return t.sort(function(r,i){return r.priority-i.priority}),t}var kbe=/\d/,Mu=/\d\d/,Cbe=/\d{3}/,pQ=/\d{4}/,JI=/[+-]?\d{6}/,Wi=/\d\d?/,Abe=/\d\d\d\d?/,_be=/\d\d\d\d\d\d?/,e6=/\d{1,3}/,mQ=/\d{1,4}/,t6=/[+-]?\d{1,6}/,KO=/\d+/,n6=/[+-]?\d+/,Yyt=/Z|[+-]\d\d:?\d\d/gi,r6=/Z|[+-]\d\d(?::?\d\d)?/gi,Zyt=/[+-]?\d+(\.\d{1,3})?/,nk=/[0-9]{0,256}['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFF07\uFF10-\uFFEF]{1,256}|[\u0600-\u06FF\/]{1,256}(\s*?[\u0600-\u06FF]{1,256}){1,2}/i,JO=/^[1-9]\d?/,gQ=/^([1-9]\d|\d)/,u5;u5={};function bn(e,t,n){u5[e]=rh(t)?t:function(r,i){return r&&n?n:t}}function Xyt(e,t){return Jr(u5,e)?u5[e](t._strict,t._locale):new RegExp(Kyt(e))}function Kyt(e){return Gh(e.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,function(t,n,r,i,a){return n||r||i||a}))}function Gh(e){return e.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}function lc(e){return e<0?Math.ceil(e)||0:Math.floor(e)}function Nr(e){var t=+e,n=0;return t!==0&&isFinite(t)&&(n=lc(t)),n}var c9={};function vi(e,t){var n,r=t,i;for(typeof e=="string"&&(e=[e]),fp(t)&&(r=function(a,s){s[t]=Nr(a)}),i=e.length,n=0;n68?1900:2e3)};var Rbe=eS("FullYear",!0);function nvt(){return i6(this.year())}function eS(e,t){return function(n){return n!=null?(Ibe(this,e,n),un.updateOffset(this,t),this):Ex(this,e)}}function Ex(e,t){if(!e.isValid())return NaN;var n=e._d,r=e._isUTC;switch(t){case"Milliseconds":return r?n.getUTCMilliseconds():n.getMilliseconds();case"Seconds":return r?n.getUTCSeconds():n.getSeconds();case"Minutes":return r?n.getUTCMinutes():n.getMinutes();case"Hours":return r?n.getUTCHours():n.getHours();case"Date":return r?n.getUTCDate():n.getDate();case"Day":return r?n.getUTCDay():n.getDay();case"Month":return r?n.getUTCMonth():n.getMonth();case"FullYear":return r?n.getUTCFullYear():n.getFullYear();default:return NaN}}function Ibe(e,t,n){var r,i,a,s,o;if(!(!e.isValid()||isNaN(n))){switch(r=e._d,i=e._isUTC,t){case"Milliseconds":return void(i?r.setUTCMilliseconds(n):r.setMilliseconds(n));case"Seconds":return void(i?r.setUTCSeconds(n):r.setSeconds(n));case"Minutes":return void(i?r.setUTCMinutes(n):r.setMinutes(n));case"Hours":return void(i?r.setUTCHours(n):r.setHours(n));case"Date":return void(i?r.setUTCDate(n):r.setDate(n));case"FullYear":break;default:return}a=n,s=e.month(),o=e.date(),o=o===29&&s===1&&!i6(a)?28:o,i?r.setUTCFullYear(a,s,o):r.setFullYear(a,s,o)}}function rvt(e){return e=Lc(e),rh(this[e])?this[e]():this}function ivt(e,t){if(typeof e=="object"){e=hQ(e);var n=Gyt(e),r,i=n.length;for(r=0;r=0?(o=new Date(e+400,t,n,r,i,a,s),isFinite(o.getFullYear())&&o.setFullYear(e)):o=new Date(e,t,n,r,i,a,s),o}function wx(e){var t,n;return e<100&&e>=0?(n=Array.prototype.slice.call(arguments),n[0]=e+400,t=new Date(Date.UTC.apply(null,n)),isFinite(t.getUTCFullYear())&&t.setUTCFullYear(e)):t=new Date(Date.UTC.apply(null,arguments)),t}function c5(e,t,n){var r=7+t-n,i=(7+wx(e,0,r).getUTCDay()-t)%7;return-i+r-1}function $be(e,t,n,r,i){var a=(7+n-r)%7,s=c5(e,r,i),o=1+7*(t-1)+a+s,l,u;return o<=0?(l=e-1,u=rw(l)+o):o>rw(e)?(l=e+1,u=o-rw(e)):(l=e,u=o),{year:l,dayOfYear:u}}function xx(e,t,n){var r=c5(e.year(),t,n),i=Math.floor((e.dayOfYear()-r-1)/7)+1,a,s;return i<1?(s=e.year()-1,a=i+Yh(s,t,n)):i>Yh(e.year(),t,n)?(a=i-Yh(e.year(),t,n),s=e.year()+1):(s=e.year(),a=i),{week:a,year:s}}function Yh(e,t,n){var r=c5(e,t,n),i=c5(e+1,t,n);return(rw(e)-r+i)/7}Un("w",["ww",2],"wo","week");Un("W",["WW",2],"Wo","isoWeek");bn("w",Wi,JO);bn("ww",Wi,Mu);bn("W",Wi,JO);bn("WW",Wi,Mu);rk(["w","ww","W","WW"],function(e,t,n,r){t[r.substr(0,1)]=Nr(e)});function bvt(e){return xx(e,this._week.dow,this._week.doy).week}var yvt={dow:0,doy:6};function vvt(){return this._week.dow}function Ovt(){return this._week.doy}function Svt(e){var t=this.localeData().week(this);return e==null?t:this.add((e-t)*7,"d")}function Evt(e){var t=xx(this,1,4).week;return e==null?t:this.add((e-t)*7,"d")}Un("d",0,"do","day");Un("dd",0,0,function(e){return this.localeData().weekdaysMin(this,e)});Un("ddd",0,0,function(e){return this.localeData().weekdaysShort(this,e)});Un("dddd",0,0,function(e){return this.localeData().weekdays(this,e)});Un("e",0,0,"weekday");Un("E",0,0,"isoWeekday");bn("d",Wi);bn("e",Wi);bn("E",Wi);bn("dd",function(e,t){return t.weekdaysMinRegex(e)});bn("ddd",function(e,t){return t.weekdaysShortRegex(e)});bn("dddd",function(e,t){return t.weekdaysRegex(e)});rk(["dd","ddd","dddd"],function(e,t,n,r){var i=n._locale.weekdaysParse(e,r,n._strict);i!=null?t.d=i:gr(n).invalidWeekday=e});rk(["d","e","E"],function(e,t,n,r){t[r]=Nr(e)});function wvt(e,t){return typeof e!="string"?e:isNaN(e)?(e=t.weekdaysParse(e),typeof e=="number"?e:null):parseInt(e,10)}function xvt(e,t){return typeof e=="string"?t.weekdaysParse(e)%7||7:isNaN(e)?null:e}function yQ(e,t){return e.slice(t,7).concat(e.slice(0,t))}var Tvt="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),Fbe="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),kvt="Su_Mo_Tu_We_Th_Fr_Sa".split("_"),Cvt=nk,Avt=nk,_vt=nk;function Rvt(e,t){var n=Ed(this._weekdays)?this._weekdays:this._weekdays[e&&e!==!0&&this._weekdays.isFormat.test(t)?"format":"standalone"];return e===!0?yQ(n,this._week.dow):e?n[e.day()]:n}function Ivt(e){return e===!0?yQ(this._weekdaysShort,this._week.dow):e?this._weekdaysShort[e.day()]:this._weekdaysShort}function Dvt(e){return e===!0?yQ(this._weekdaysMin,this._week.dow):e?this._weekdaysMin[e.day()]:this._weekdaysMin}function Nvt(e,t,n){var r,i,a,s=e.toLocaleLowerCase();if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],r=0;r<7;++r)a=nh([2e3,1]).day(r),this._minWeekdaysParse[r]=this.weekdaysMin(a,"").toLocaleLowerCase(),this._shortWeekdaysParse[r]=this.weekdaysShort(a,"").toLocaleLowerCase(),this._weekdaysParse[r]=this.weekdays(a,"").toLocaleLowerCase();return n?t==="dddd"?(i=Da.call(this._weekdaysParse,s),i!==-1?i:null):t==="ddd"?(i=Da.call(this._shortWeekdaysParse,s),i!==-1?i:null):(i=Da.call(this._minWeekdaysParse,s),i!==-1?i:null):t==="dddd"?(i=Da.call(this._weekdaysParse,s),i!==-1||(i=Da.call(this._shortWeekdaysParse,s),i!==-1)?i:(i=Da.call(this._minWeekdaysParse,s),i!==-1?i:null)):t==="ddd"?(i=Da.call(this._shortWeekdaysParse,s),i!==-1||(i=Da.call(this._weekdaysParse,s),i!==-1)?i:(i=Da.call(this._minWeekdaysParse,s),i!==-1?i:null)):(i=Da.call(this._minWeekdaysParse,s),i!==-1||(i=Da.call(this._weekdaysParse,s),i!==-1)?i:(i=Da.call(this._shortWeekdaysParse,s),i!==-1?i:null))}function Pvt(e,t,n){var r,i,a;if(this._weekdaysParseExact)return Nvt.call(this,e,t,n);for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),r=0;r<7;r++){if(i=nh([2e3,1]).day(r),n&&!this._fullWeekdaysParse[r]&&(this._fullWeekdaysParse[r]=new RegExp("^"+this.weekdays(i,"").replace(".","\\.?")+"$","i"),this._shortWeekdaysParse[r]=new RegExp("^"+this.weekdaysShort(i,"").replace(".","\\.?")+"$","i"),this._minWeekdaysParse[r]=new RegExp("^"+this.weekdaysMin(i,"").replace(".","\\.?")+"$","i")),this._weekdaysParse[r]||(a="^"+this.weekdays(i,"")+"|^"+this.weekdaysShort(i,"")+"|^"+this.weekdaysMin(i,""),this._weekdaysParse[r]=new RegExp(a.replace(".",""),"i")),n&&t==="dddd"&&this._fullWeekdaysParse[r].test(e))return r;if(n&&t==="ddd"&&this._shortWeekdaysParse[r].test(e))return r;if(n&&t==="dd"&&this._minWeekdaysParse[r].test(e))return r;if(!n&&this._weekdaysParse[r].test(e))return r}}function Mvt(e){if(!this.isValid())return e!=null?this:NaN;var t=Ex(this,"Day");return e!=null?(e=wvt(e,this.localeData()),this.add(e-t,"d")):t}function Lvt(e){if(!this.isValid())return e!=null?this:NaN;var t=(this.day()+7-this.localeData()._week.dow)%7;return e==null?t:this.add(e-t,"d")}function $vt(e){if(!this.isValid())return e!=null?this:NaN;if(e!=null){var t=xvt(e,this.localeData());return this.day(this.day()%7?t:t-7)}else return this.day()||7}function Fvt(e){return this._weekdaysParseExact?(Jr(this,"_weekdaysRegex")||vQ.call(this),e?this._weekdaysStrictRegex:this._weekdaysRegex):(Jr(this,"_weekdaysRegex")||(this._weekdaysRegex=Cvt),this._weekdaysStrictRegex&&e?this._weekdaysStrictRegex:this._weekdaysRegex)}function Bvt(e){return this._weekdaysParseExact?(Jr(this,"_weekdaysRegex")||vQ.call(this),e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex):(Jr(this,"_weekdaysShortRegex")||(this._weekdaysShortRegex=Avt),this._weekdaysShortStrictRegex&&e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex)}function Uvt(e){return this._weekdaysParseExact?(Jr(this,"_weekdaysRegex")||vQ.call(this),e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex):(Jr(this,"_weekdaysMinRegex")||(this._weekdaysMinRegex=_vt),this._weekdaysMinStrictRegex&&e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex)}function vQ(){function e(c,f){return f.length-c.length}var t=[],n=[],r=[],i=[],a,s,o,l,u;for(a=0;a<7;a++)s=nh([2e3,1]).day(a),o=Gh(this.weekdaysMin(s,"")),l=Gh(this.weekdaysShort(s,"")),u=Gh(this.weekdays(s,"")),t.push(o),n.push(l),r.push(u),i.push(o),i.push(l),i.push(u);t.sort(e),n.sort(e),r.sort(e),i.sort(e),this._weekdaysRegex=new RegExp("^("+i.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp("^("+r.join("|")+")","i"),this._weekdaysShortStrictRegex=new RegExp("^("+n.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+t.join("|")+")","i")}function OQ(){return this.hours()%12||12}function zvt(){return this.hours()||24}Un("H",["HH",2],0,"hour");Un("h",["hh",2],0,OQ);Un("k",["kk",2],0,zvt);Un("hmm",0,0,function(){return""+OQ.apply(this)+jf(this.minutes(),2)});Un("hmmss",0,0,function(){return""+OQ.apply(this)+jf(this.minutes(),2)+jf(this.seconds(),2)});Un("Hmm",0,0,function(){return""+this.hours()+jf(this.minutes(),2)});Un("Hmmss",0,0,function(){return""+this.hours()+jf(this.minutes(),2)+jf(this.seconds(),2)});function Bbe(e,t){Un(e,0,0,function(){return this.localeData().meridiem(this.hours(),this.minutes(),t)})}Bbe("a",!0);Bbe("A",!1);function Ube(e,t){return t._meridiemParse}bn("a",Ube);bn("A",Ube);bn("H",Wi,gQ);bn("h",Wi,JO);bn("k",Wi,JO);bn("HH",Wi,Mu);bn("hh",Wi,Mu);bn("kk",Wi,Mu);bn("hmm",Abe);bn("hmmss",_be);bn("Hmm",Abe);bn("Hmmss",_be);vi(["H","HH"],as);vi(["k","kk"],function(e,t,n){var r=Nr(e);t[as]=r===24?0:r});vi(["a","A"],function(e,t,n){n._isPm=n._locale.isPM(e),n._meridiem=e});vi(["h","hh"],function(e,t,n){t[as]=Nr(e),gr(n).bigHour=!0});vi("hmm",function(e,t,n){var r=e.length-2;t[as]=Nr(e.substr(0,r)),t[fd]=Nr(e.substr(r)),gr(n).bigHour=!0});vi("hmmss",function(e,t,n){var r=e.length-4,i=e.length-2;t[as]=Nr(e.substr(0,r)),t[fd]=Nr(e.substr(r,2)),t[zh]=Nr(e.substr(i)),gr(n).bigHour=!0});vi("Hmm",function(e,t,n){var r=e.length-2;t[as]=Nr(e.substr(0,r)),t[fd]=Nr(e.substr(r))});vi("Hmmss",function(e,t,n){var r=e.length-4,i=e.length-2;t[as]=Nr(e.substr(0,r)),t[fd]=Nr(e.substr(r,2)),t[zh]=Nr(e.substr(i))});function jvt(e){return(e+"").toLowerCase().charAt(0)==="p"}var Hvt=/[ap]\.?m?\.?/i,Vvt=eS("Hours",!0);function Wvt(e,t,n){return e>11?n?"pm":"PM":n?"am":"AM"}var zbe={calendar:Nyt,longDateFormat:$yt,invalidDate:Byt,ordinal:zyt,dayOfMonthOrdinalParse:jyt,relativeTime:Vyt,months:svt,monthsShort:Dbe,week:yvt,weekdays:Tvt,weekdaysMin:kvt,weekdaysShort:Fbe,meridiemParse:Hvt},Yi={},jE={},Tx;function Qvt(e,t){var n,r=Math.min(e.length,t.length);for(n=0;n0;){if(i=a6(a.slice(0,n).join("-")),i)return i;if(r&&r.length>=n&&Qvt(a,r)>=n-1)break;n--}t++}return Tx}function Gvt(e){return!!(e&&e.match("^[^/\\\\]*$"))}function a6(e){var t=null,n;if(Yi[e]===void 0&&typeof f_<"u"&&f_&&f_.exports&&Gvt(e))try{t=Tx._abbr,n=require,n("./locale/"+e),Ym(t)}catch{Yi[e]=null}return Yi[e]}function Ym(e,t){var n;return e&&(pl(t)?n=wp(e):n=SQ(e,t),n?Tx=n:typeof console<"u"&&console.warn&&console.warn("Locale "+e+" not found. Did you forget to load it?")),Tx._abbr}function SQ(e,t){if(t!==null){var n,r=zbe;if(t.abbr=e,Yi[e]!=null)xbe("defineLocaleOverride","use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale See http://momentjs.com/guides/#/warnings/define-locale/ for more info."),r=Yi[e]._config;else if(t.parentLocale!=null)if(Yi[t.parentLocale]!=null)r=Yi[t.parentLocale]._config;else if(n=a6(t.parentLocale),n!=null)r=n._config;else return jE[t.parentLocale]||(jE[t.parentLocale]=[]),jE[t.parentLocale].push({name:e,config:t}),null;return Yi[e]=new dQ(l9(r,t)),jE[e]&&jE[e].forEach(function(i){SQ(i.name,i.config)}),Ym(e),Yi[e]}else return delete Yi[e],null}function Yvt(e,t){if(t!=null){var n,r,i=zbe;Yi[e]!=null&&Yi[e].parentLocale!=null?Yi[e].set(l9(Yi[e]._config,t)):(r=a6(e),r!=null&&(i=r._config),t=l9(i,t),r==null&&(t.abbr=e),n=new dQ(t),n.parentLocale=Yi[e],Yi[e]=n),Ym(e)}else Yi[e]!=null&&(Yi[e].parentLocale!=null?(Yi[e]=Yi[e].parentLocale,e===Ym()&&Ym(e)):Yi[e]!=null&&delete Yi[e]);return Yi[e]}function wp(e){var t;if(e&&e._locale&&e._locale._abbr&&(e=e._locale._abbr),!e)return Tx;if(!Ed(e)){if(t=a6(e),t)return t;e=[e]}return qvt(e)}function Zvt(){return u9(Yi)}function EQ(e){var t,n=e._a;return n&&gr(e).overflow===-2&&(t=n[Uh]<0||n[Uh]>11?Uh:n[vf]<1||n[vf]>bQ(n[Oo],n[Uh])?vf:n[as]<0||n[as]>24||n[as]===24&&(n[fd]!==0||n[zh]!==0||n[zg]!==0)?as:n[fd]<0||n[fd]>59?fd:n[zh]<0||n[zh]>59?zh:n[zg]<0||n[zg]>999?zg:-1,gr(e)._overflowDayOfYear&&(tvf)&&(t=vf),gr(e)._overflowWeeks&&t===-1&&(t=evt),gr(e)._overflowWeekday&&t===-1&&(t=tvt),gr(e).overflow=t),e}var Xvt=/^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,Kvt=/^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d|))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,Jvt=/Z|[+-]\d\d(?::?\d\d)?/,YA=[["YYYYYY-MM-DD",/[+-]\d{6}-\d\d-\d\d/],["YYYY-MM-DD",/\d{4}-\d\d-\d\d/],["GGGG-[W]WW-E",/\d{4}-W\d\d-\d/],["GGGG-[W]WW",/\d{4}-W\d\d/,!1],["YYYY-DDD",/\d{4}-\d{3}/],["YYYY-MM",/\d{4}-\d\d/,!1],["YYYYYYMMDD",/[+-]\d{10}/],["YYYYMMDD",/\d{8}/],["GGGG[W]WWE",/\d{4}W\d{3}/],["GGGG[W]WW",/\d{4}W\d{2}/,!1],["YYYYDDD",/\d{7}/],["YYYYMM",/\d{6}/,!1],["YYYY",/\d{4}/,!1]],m7=[["HH:mm:ss.SSSS",/\d\d:\d\d:\d\d\.\d+/],["HH:mm:ss,SSSS",/\d\d:\d\d:\d\d,\d+/],["HH:mm:ss",/\d\d:\d\d:\d\d/],["HH:mm",/\d\d:\d\d/],["HHmmss.SSSS",/\d\d\d\d\d\d\.\d+/],["HHmmss,SSSS",/\d\d\d\d\d\d,\d+/],["HHmmss",/\d\d\d\d\d\d/],["HHmm",/\d\d\d\d/],["HH",/\d\d/]],eOt=/^\/?Date\((-?\d+)/i,tOt=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|([+-]\d{4}))$/,nOt={UT:0,GMT:0,EDT:-4*60,EST:-5*60,CDT:-5*60,CST:-6*60,MDT:-6*60,MST:-7*60,PDT:-7*60,PST:-8*60};function jbe(e){var t,n,r=e._i,i=Xvt.exec(r)||Kvt.exec(r),a,s,o,l,u=YA.length,c=m7.length;if(i){for(gr(e).iso=!0,t=0,n=u;trw(s)||e._dayOfYear===0)&&(gr(e)._overflowDayOfYear=!0),n=wx(s,0,e._dayOfYear),e._a[Uh]=n.getUTCMonth(),e._a[vf]=n.getUTCDate()),t=0;t<3&&e._a[t]==null;++t)e._a[t]=r[t]=i[t];for(;t<7;t++)e._a[t]=r[t]=e._a[t]==null?t===2?1:0:e._a[t];e._a[as]===24&&e._a[fd]===0&&e._a[zh]===0&&e._a[zg]===0&&(e._nextDay=!0,e._a[as]=0),e._d=(e._useUTC?wx:gvt).apply(null,r),a=e._useUTC?e._d.getUTCDay():e._d.getDay(),e._tzm!=null&&e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),e._nextDay&&(e._a[as]=24),e._w&&typeof e._w.d<"u"&&e._w.d!==a&&(gr(e).weekdayMismatch=!0)}}function cOt(e){var t,n,r,i,a,s,o,l,u;t=e._w,t.GG!=null||t.W!=null||t.E!=null?(a=1,s=4,n=my(t.GG,e._a[Oo],xx(Vi(),1,4).year),r=my(t.W,1),i=my(t.E,1),(i<1||i>7)&&(l=!0)):(a=e._locale._week.dow,s=e._locale._week.doy,u=xx(Vi(),a,s),n=my(t.gg,e._a[Oo],u.year),r=my(t.w,u.week),t.d!=null?(i=t.d,(i<0||i>6)&&(l=!0)):t.e!=null?(i=t.e+a,(t.e<0||t.e>6)&&(l=!0)):i=a),r<1||r>Yh(n,a,s)?gr(e)._overflowWeeks=!0:l!=null?gr(e)._overflowWeekday=!0:(o=$be(n,r,i,a,s),e._a[Oo]=o.year,e._dayOfYear=o.dayOfYear)}un.ISO_8601=function(){};un.RFC_2822=function(){};function xQ(e){if(e._f===un.ISO_8601){jbe(e);return}if(e._f===un.RFC_2822){Hbe(e);return}e._a=[],gr(e).empty=!0;var t=""+e._i,n,r,i,a,s,o=t.length,l=0,u,c;for(i=Tbe(e._f,e._locale).match(fQ)||[],c=i.length,n=0;n0&&gr(e).unusedInput.push(s),t=t.slice(t.indexOf(r)+r.length),l+=r.length),fv[a]?(r?gr(e).empty=!1:gr(e).unusedTokens.push(a),Jyt(a,r,e)):e._strict&&!r&&gr(e).unusedTokens.push(a);gr(e).charsLeftOver=o-l,t.length>0&&gr(e).unusedInput.push(t),e._a[as]<=12&&gr(e).bigHour===!0&&e._a[as]>0&&(gr(e).bigHour=void 0),gr(e).parsedDateParts=e._a.slice(0),gr(e).meridiem=e._meridiem,e._a[as]=dOt(e._locale,e._a[as],e._meridiem),u=gr(e).era,u!==null&&(e._a[Oo]=e._locale.erasConvertYear(u,e._a[Oo])),wQ(e),EQ(e)}function dOt(e,t,n){var r;return n==null?t:e.meridiemHour!=null?e.meridiemHour(t,n):(e.isPM!=null&&(r=e.isPM(n),r&&t<12&&(t+=12),!r&&t===12&&(t=0)),t)}function fOt(e){var t,n,r,i,a,s,o=!1,l=e._f.length;if(l===0){gr(e).invalidFormat=!0,e._d=new Date(NaN);return}for(i=0;ithis?this:e:KI()});function Qbe(e,t){var n,r;if(t.length===1&&Ed(t[0])&&(t=t[0]),!t.length)return Vi();for(n=t[0],r=1;rthis.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()}function NOt(){if(!pl(this._isDSTShifted))return this._isDSTShifted;var e={},t;return cQ(e,this),e=Vbe(e),e._a?(t=e._isUTC?nh(e._a):Vi(e._a),this._isDSTShifted=this.isValid()&&xOt(e._a,t.toArray())>0):this._isDSTShifted=!1,this._isDSTShifted}function POt(){return this.isValid()?!this._isUTC:!1}function MOt(){return this.isValid()?this._isUTC:!1}function Gbe(){return this.isValid()?this._isUTC&&this._offset===0:!1}var LOt=/^(-|\+)?(?:(\d*)[. ])?(\d+):(\d+)(?::(\d+)(\.\d*)?)?$/,$Ot=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;function Md(e,t){var n=e,r=null,i,a,s;return t_(e)?n={ms:e._milliseconds,d:e._days,M:e._months}:fp(e)||!isNaN(+e)?(n={},t?n[t]=+e:n.milliseconds=+e):(r=LOt.exec(e))?(i=r[1]==="-"?-1:1,n={y:0,d:Nr(r[vf])*i,h:Nr(r[as])*i,m:Nr(r[fd])*i,s:Nr(r[zh])*i,ms:Nr(d9(r[zg]*1e3))*i}):(r=$Ot.exec(e))?(i=r[1]==="-"?-1:1,n={y:bg(r[2],i),M:bg(r[3],i),w:bg(r[4],i),d:bg(r[5],i),h:bg(r[6],i),m:bg(r[7],i),s:bg(r[8],i)}):n==null?n={}:typeof n=="object"&&("from"in n||"to"in n)&&(s=FOt(Vi(n.from),Vi(n.to)),n={},n.ms=s.milliseconds,n.M=s.months),a=new s6(n),t_(e)&&Jr(e,"_locale")&&(a._locale=e._locale),t_(e)&&Jr(e,"_isValid")&&(a._isValid=e._isValid),a}Md.fn=s6.prototype;Md.invalid=wOt;function bg(e,t){var n=e&&parseFloat(e.replace(",","."));return(isNaN(n)?0:n)*t}function Ore(e,t){var n={};return n.months=t.month()-e.month()+(t.year()-e.year())*12,e.clone().add(n.months,"M").isAfter(t)&&--n.months,n.milliseconds=+t-+e.clone().add(n.months,"M"),n}function FOt(e,t){var n;return e.isValid()&&t.isValid()?(t=kQ(t,e),e.isBefore(t)?n=Ore(e,t):(n=Ore(t,e),n.milliseconds=-n.milliseconds,n.months=-n.months),n):{milliseconds:0,months:0}}function Ybe(e,t){return function(n,r){var i,a;return r!==null&&!isNaN(+r)&&(xbe(t,"moment()."+t+"(period, number) is deprecated. Please use moment()."+t+"(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info."),a=n,n=r,r=a),i=Md(n,r),Zbe(this,i,e),this}}function Zbe(e,t,n,r){var i=t._milliseconds,a=d9(t._days),s=d9(t._months);e.isValid()&&(r=r??!0,s&&Pbe(e,Ex(e,"Month")+s*n),a&&Ibe(e,"Date",Ex(e,"Date")+a*n),i&&e._d.setTime(e._d.valueOf()+i*n),r&&un.updateOffset(e,a||s))}var BOt=Ybe(1,"add"),UOt=Ybe(-1,"subtract");function Xbe(e){return typeof e=="string"||e instanceof String}function zOt(e){return wd(e)||ek(e)||Xbe(e)||fp(e)||HOt(e)||jOt(e)||e===null||e===void 0}function jOt(e){var t=e1(e)&&!lQ(e),n=!1,r=["years","year","y","months","month","M","days","day","d","dates","date","D","hours","hour","h","minutes","minute","m","seconds","second","s","milliseconds","millisecond","ms"],i,a,s=r.length;for(i=0;in.valueOf():n.valueOf()9999?e_(n,t?"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYYYY-MM-DD[T]HH:mm:ss.SSSZ"):rh(Date.prototype.toISOString)?t?this.toDate().toISOString():new Date(this.valueOf()+this.utcOffset()*60*1e3).toISOString().replace("Z",e_(n,"Z")):e_(n,t?"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYY-MM-DD[T]HH:mm:ss.SSSZ")}function rSt(){if(!this.isValid())return"moment.invalid(/* "+this._i+" */)";var e="moment",t="",n,r,i,a;return this.isLocal()||(e=this.utcOffset()===0?"moment.utc":"moment.parseZone",t="Z"),n="["+e+'("]',r=0<=this.year()&&this.year()<=9999?"YYYY":"YYYYYY",i="-MM-DD[T]HH:mm:ss.SSS",a=t+'[")]',this.format(n+r+i+a)}function iSt(e){e||(e=this.isUtc()?un.defaultFormatUtc:un.defaultFormat);var t=e_(this,e);return this.localeData().postformat(t)}function aSt(e,t){return this.isValid()&&(wd(e)&&e.isValid()||Vi(e).isValid())?Md({to:this,from:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()}function sSt(e){return this.from(Vi(),e)}function oSt(e,t){return this.isValid()&&(wd(e)&&e.isValid()||Vi(e).isValid())?Md({from:this,to:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()}function lSt(e){return this.to(Vi(),e)}function Kbe(e){var t;return e===void 0?this._locale._abbr:(t=wp(e),t!=null&&(this._locale=t),this)}var Jbe=Mc("moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.",function(e){return e===void 0?this.localeData():this.locale(e)});function eye(){return this._locale}var d5=1e3,hv=60*d5,f5=60*hv,tye=(365*400+97)*24*f5;function pv(e,t){return(e%t+t)%t}function nye(e,t,n){return e<100&&e>=0?new Date(e+400,t,n)-tye:new Date(e,t,n).valueOf()}function rye(e,t,n){return e<100&&e>=0?Date.UTC(e+400,t,n)-tye:Date.UTC(e,t,n)}function uSt(e){var t,n;if(e=Lc(e),e===void 0||e==="millisecond"||!this.isValid())return this;switch(n=this._isUTC?rye:nye,e){case"year":t=n(this.year(),0,1);break;case"quarter":t=n(this.year(),this.month()-this.month()%3,1);break;case"month":t=n(this.year(),this.month(),1);break;case"week":t=n(this.year(),this.month(),this.date()-this.weekday());break;case"isoWeek":t=n(this.year(),this.month(),this.date()-(this.isoWeekday()-1));break;case"day":case"date":t=n(this.year(),this.month(),this.date());break;case"hour":t=this._d.valueOf(),t-=pv(t+(this._isUTC?0:this.utcOffset()*hv),f5);break;case"minute":t=this._d.valueOf(),t-=pv(t,hv);break;case"second":t=this._d.valueOf(),t-=pv(t,d5);break}return this._d.setTime(t),un.updateOffset(this,!0),this}function cSt(e){var t,n;if(e=Lc(e),e===void 0||e==="millisecond"||!this.isValid())return this;switch(n=this._isUTC?rye:nye,e){case"year":t=n(this.year()+1,0,1)-1;break;case"quarter":t=n(this.year(),this.month()-this.month()%3+3,1)-1;break;case"month":t=n(this.year(),this.month()+1,1)-1;break;case"week":t=n(this.year(),this.month(),this.date()-this.weekday()+7)-1;break;case"isoWeek":t=n(this.year(),this.month(),this.date()-(this.isoWeekday()-1)+7)-1;break;case"day":case"date":t=n(this.year(),this.month(),this.date()+1)-1;break;case"hour":t=this._d.valueOf(),t+=f5-pv(t+(this._isUTC?0:this.utcOffset()*hv),f5)-1;break;case"minute":t=this._d.valueOf(),t+=hv-pv(t,hv)-1;break;case"second":t=this._d.valueOf(),t+=d5-pv(t,d5)-1;break}return this._d.setTime(t),un.updateOffset(this,!0),this}function dSt(){return this._d.valueOf()-(this._offset||0)*6e4}function fSt(){return Math.floor(this.valueOf()/1e3)}function hSt(){return new Date(this.valueOf())}function pSt(){var e=this;return[e.year(),e.month(),e.date(),e.hour(),e.minute(),e.second(),e.millisecond()]}function mSt(){var e=this;return{years:e.year(),months:e.month(),date:e.date(),hours:e.hours(),minutes:e.minutes(),seconds:e.seconds(),milliseconds:e.milliseconds()}}function gSt(){return this.isValid()?this.toISOString():null}function bSt(){return uQ(this)}function ySt(){return Dm({},gr(this))}function vSt(){return gr(this).overflow}function OSt(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}}Un("N",0,0,"eraAbbr");Un("NN",0,0,"eraAbbr");Un("NNN",0,0,"eraAbbr");Un("NNNN",0,0,"eraName");Un("NNNNN",0,0,"eraNarrow");Un("y",["y",1],"yo","eraYear");Un("y",["yy",2],0,"eraYear");Un("y",["yyy",3],0,"eraYear");Un("y",["yyyy",4],0,"eraYear");bn("N",CQ);bn("NN",CQ);bn("NNN",CQ);bn("NNNN",ISt);bn("NNNNN",DSt);vi(["N","NN","NNN","NNNN","NNNNN"],function(e,t,n,r){var i=n._locale.erasParse(e,r,n._strict);i?gr(n).era=i:gr(n).invalidEra=e});bn("y",KO);bn("yy",KO);bn("yyy",KO);bn("yyyy",KO);bn("yo",NSt);vi(["y","yy","yyy","yyyy"],Oo);vi(["yo"],function(e,t,n,r){var i;n._locale._eraYearOrdinalRegex&&(i=e.match(n._locale._eraYearOrdinalRegex)),n._locale.eraYearOrdinalParse?t[Oo]=n._locale.eraYearOrdinalParse(e,i):t[Oo]=parseInt(e,10)});function SSt(e,t){var n,r,i,a=this._eras||wp("en")._eras;for(n=0,r=a.length;n=0)return a[r]}function wSt(e,t){var n=e.since<=e.until?1:-1;return t===void 0?un(e.since).year():un(e.since).year()+(t-e.offset)*n}function xSt(){var e,t,n,r=this.localeData().eras();for(e=0,t=r.length;ea&&(t=a),USt.call(this,e,t,n,r,i))}function USt(e,t,n,r,i){var a=$be(e,t,n,r,i),s=wx(a.year,0,a.dayOfYear);return this.year(s.getUTCFullYear()),this.month(s.getUTCMonth()),this.date(s.getUTCDate()),this}Un("Q",0,"Qo","quarter");bn("Q",kbe);vi("Q",function(e,t){t[Uh]=(Nr(e)-1)*3});function zSt(e){return e==null?Math.ceil((this.month()+1)/3):this.month((e-1)*3+this.month()%3)}Un("D",["DD",2],"Do","date");bn("D",Wi,JO);bn("DD",Wi,Mu);bn("Do",function(e,t){return e?t._dayOfMonthOrdinalParse||t._ordinalParse:t._dayOfMonthOrdinalParseLenient});vi(["D","DD"],vf);vi("Do",function(e,t){t[vf]=Nr(e.match(Wi)[0])});var aye=eS("Date",!0);Un("DDD",["DDDD",3],"DDDo","dayOfYear");bn("DDD",e6);bn("DDDD",Cbe);vi(["DDD","DDDD"],function(e,t,n){n._dayOfYear=Nr(e)});function jSt(e){var t=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)+1;return e==null?t:this.add(e-t,"d")}Un("m",["mm",2],0,"minute");bn("m",Wi,gQ);bn("mm",Wi,Mu);vi(["m","mm"],fd);var HSt=eS("Minutes",!1);Un("s",["ss",2],0,"second");bn("s",Wi,gQ);bn("ss",Wi,Mu);vi(["s","ss"],zh);var VSt=eS("Seconds",!1);Un("S",0,0,function(){return~~(this.millisecond()/100)});Un(0,["SS",2],0,function(){return~~(this.millisecond()/10)});Un(0,["SSS",3],0,"millisecond");Un(0,["SSSS",4],0,function(){return this.millisecond()*10});Un(0,["SSSSS",5],0,function(){return this.millisecond()*100});Un(0,["SSSSSS",6],0,function(){return this.millisecond()*1e3});Un(0,["SSSSSSS",7],0,function(){return this.millisecond()*1e4});Un(0,["SSSSSSSS",8],0,function(){return this.millisecond()*1e5});Un(0,["SSSSSSSSS",9],0,function(){return this.millisecond()*1e6});bn("S",e6,kbe);bn("SS",e6,Mu);bn("SSS",e6,Cbe);var Nm,sye;for(Nm="SSSS";Nm.length<=9;Nm+="S")bn(Nm,KO);function WSt(e,t){t[zg]=Nr(("0."+e)*1e3)}for(Nm="S";Nm.length<=9;Nm+="S")vi(Nm,WSt);sye=eS("Milliseconds",!1);Un("z",0,0,"zoneAbbr");Un("zz",0,0,"zoneName");function QSt(){return this._isUTC?"UTC":""}function qSt(){return this._isUTC?"Coordinated Universal Time":""}var Vt=tk.prototype;Vt.add=BOt;Vt.calendar=QOt;Vt.clone=qOt;Vt.diff=eSt;Vt.endOf=cSt;Vt.format=iSt;Vt.from=aSt;Vt.fromNow=sSt;Vt.to=oSt;Vt.toNow=lSt;Vt.get=rvt;Vt.invalidAt=vSt;Vt.isAfter=GOt;Vt.isBefore=YOt;Vt.isBetween=ZOt;Vt.isSame=XOt;Vt.isSameOrAfter=KOt;Vt.isSameOrBefore=JOt;Vt.isValid=bSt;Vt.lang=Jbe;Vt.locale=Kbe;Vt.localeData=eye;Vt.max=bOt;Vt.min=gOt;Vt.parsingFlags=ySt;Vt.set=ivt;Vt.startOf=uSt;Vt.subtract=UOt;Vt.toArray=pSt;Vt.toObject=mSt;Vt.toDate=hSt;Vt.toISOString=nSt;Vt.inspect=rSt;typeof Symbol<"u"&&Symbol.for!=null&&(Vt[Symbol.for("nodejs.util.inspect.custom")]=function(){return"Moment<"+this.format()+">"});Vt.toJSON=gSt;Vt.toString=tSt;Vt.unix=fSt;Vt.valueOf=dSt;Vt.creationData=OSt;Vt.eraName=xSt;Vt.eraNarrow=TSt;Vt.eraAbbr=kSt;Vt.eraYear=CSt;Vt.year=Rbe;Vt.isLeapYear=nvt;Vt.weekYear=PSt;Vt.isoWeekYear=MSt;Vt.quarter=Vt.quarters=zSt;Vt.month=Mbe;Vt.daysInMonth=hvt;Vt.week=Vt.weeks=Svt;Vt.isoWeek=Vt.isoWeeks=Evt;Vt.weeksInYear=FSt;Vt.weeksInWeekYear=BSt;Vt.isoWeeksInYear=LSt;Vt.isoWeeksInISOWeekYear=$St;Vt.date=aye;Vt.day=Vt.days=Mvt;Vt.weekday=Lvt;Vt.isoWeekday=$vt;Vt.dayOfYear=jSt;Vt.hour=Vt.hours=Vvt;Vt.minute=Vt.minutes=HSt;Vt.second=Vt.seconds=VSt;Vt.millisecond=Vt.milliseconds=sye;Vt.utcOffset=kOt;Vt.utc=AOt;Vt.local=_Ot;Vt.parseZone=ROt;Vt.hasAlignedHourOffset=IOt;Vt.isDST=DOt;Vt.isLocal=POt;Vt.isUtcOffset=MOt;Vt.isUtc=Gbe;Vt.isUTC=Gbe;Vt.zoneAbbr=QSt;Vt.zoneName=qSt;Vt.dates=Mc("dates accessor is deprecated. Use date instead.",aye);Vt.months=Mc("months accessor is deprecated. Use month instead",Mbe);Vt.years=Mc("years accessor is deprecated. Use year instead",Rbe);Vt.zone=Mc("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",COt);Vt.isDSTShifted=Mc("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",NOt);function GSt(e){return Vi(e*1e3)}function YSt(){return Vi.apply(null,arguments).parseZone()}function oye(e){return e}var ei=dQ.prototype;ei.calendar=Pyt;ei.longDateFormat=Fyt;ei.invalidDate=Uyt;ei.ordinal=Hyt;ei.preparse=oye;ei.postformat=oye;ei.relativeTime=Wyt;ei.pastFuture=Qyt;ei.set=Dyt;ei.eras=SSt;ei.erasParse=ESt;ei.erasConvertYear=wSt;ei.erasAbbrRegex=_St;ei.erasNameRegex=ASt;ei.erasNarrowRegex=RSt;ei.months=uvt;ei.monthsShort=cvt;ei.monthsParse=fvt;ei.monthsRegex=mvt;ei.monthsShortRegex=pvt;ei.week=bvt;ei.firstDayOfYear=Ovt;ei.firstDayOfWeek=vvt;ei.weekdays=Rvt;ei.weekdaysMin=Dvt;ei.weekdaysShort=Ivt;ei.weekdaysParse=Pvt;ei.weekdaysRegex=Fvt;ei.weekdaysShortRegex=Bvt;ei.weekdaysMinRegex=Uvt;ei.isPM=jvt;ei.meridiem=Wvt;function h5(e,t,n,r){var i=wp(),a=nh().set(r,t);return i[n](a,e)}function lye(e,t,n){if(fp(e)&&(t=e,e=void 0),e=e||"",t!=null)return h5(e,t,n,"month");var r,i=[];for(r=0;r<12;r++)i[r]=h5(e,r,n,"month");return i}function _Q(e,t,n,r){typeof e=="boolean"?(fp(t)&&(n=t,t=void 0),t=t||""):(t=e,n=t,e=!1,fp(t)&&(n=t,t=void 0),t=t||"");var i=wp(),a=e?i._week.dow:0,s,o=[];if(n!=null)return h5(t,(n+a)%7,r,"day");for(s=0;s<7;s++)o[s]=h5(t,(s+a)%7,r,"day");return o}function ZSt(e,t){return lye(e,t,"months")}function XSt(e,t){return lye(e,t,"monthsShort")}function KSt(e,t,n){return _Q(e,t,n,"weekdays")}function JSt(e,t,n){return _Q(e,t,n,"weekdaysShort")}function eEt(e,t,n){return _Q(e,t,n,"weekdaysMin")}Ym("en",{eras:[{since:"0001-01-01",until:1/0,offset:1,name:"Anno Domini",narrow:"AD",abbr:"AD"},{since:"0000-12-31",until:-1/0,offset:1,name:"Before Christ",narrow:"BC",abbr:"BC"}],dayOfMonthOrdinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(e){var t=e%10,n=Nr(e%100/10)===1?"th":t===1?"st":t===2?"nd":t===3?"rd":"th";return e+n}});un.lang=Mc("moment.lang is deprecated. Use moment.locale instead.",Ym);un.langData=Mc("moment.langData is deprecated. Use moment.localeData instead.",wp);var kh=Math.abs;function tEt(){var e=this._data;return this._milliseconds=kh(this._milliseconds),this._days=kh(this._days),this._months=kh(this._months),e.milliseconds=kh(e.milliseconds),e.seconds=kh(e.seconds),e.minutes=kh(e.minutes),e.hours=kh(e.hours),e.months=kh(e.months),e.years=kh(e.years),this}function uye(e,t,n,r){var i=Md(t,n);return e._milliseconds+=r*i._milliseconds,e._days+=r*i._days,e._months+=r*i._months,e._bubble()}function nEt(e,t){return uye(this,e,t,1)}function rEt(e,t){return uye(this,e,t,-1)}function Sre(e){return e<0?Math.floor(e):Math.ceil(e)}function iEt(){var e=this._milliseconds,t=this._days,n=this._months,r=this._data,i,a,s,o,l;return e>=0&&t>=0&&n>=0||e<=0&&t<=0&&n<=0||(e+=Sre(h9(n)+t)*864e5,t=0,n=0),r.milliseconds=e%1e3,i=lc(e/1e3),r.seconds=i%60,a=lc(i/60),r.minutes=a%60,s=lc(a/60),r.hours=s%24,t+=lc(s/24),l=lc(cye(t)),n+=l,t-=Sre(h9(l)),o=lc(n/12),n%=12,r.days=t,r.months=n,r.years=o,this}function cye(e){return e*4800/146097}function h9(e){return e*146097/4800}function aEt(e){if(!this.isValid())return NaN;var t,n,r=this._milliseconds;if(e=Lc(e),e==="month"||e==="quarter"||e==="year")switch(t=this._days+r/864e5,n=this._months+cye(t),e){case"month":return n;case"quarter":return n/3;case"year":return n/12}else switch(t=this._days+Math.round(h9(this._months)),e){case"week":return t/7+r/6048e5;case"day":return t+r/864e5;case"hour":return t*24+r/36e5;case"minute":return t*1440+r/6e4;case"second":return t*86400+r/1e3;case"millisecond":return Math.floor(t*864e5)+r;default:throw new Error("Unknown unit "+e)}}function xp(e){return function(){return this.as(e)}}var dye=xp("ms"),sEt=xp("s"),oEt=xp("m"),lEt=xp("h"),uEt=xp("d"),cEt=xp("w"),dEt=xp("M"),fEt=xp("Q"),hEt=xp("y"),pEt=dye;function mEt(){return Md(this)}function gEt(e){return e=Lc(e),this.isValid()?this[e+"s"]():NaN}function B1(e){return function(){return this.isValid()?this._data[e]:NaN}}var bEt=B1("milliseconds"),yEt=B1("seconds"),vEt=B1("minutes"),OEt=B1("hours"),SEt=B1("days"),EEt=B1("months"),wEt=B1("years");function xEt(){return lc(this.days()/7)}var Rh=Math.round,By={ss:44,s:45,m:45,h:22,d:26,w:null,M:11};function TEt(e,t,n,r,i){return i.relativeTime(t||1,!!n,e,r)}function kEt(e,t,n,r){var i=Md(e).abs(),a=Rh(i.as("s")),s=Rh(i.as("m")),o=Rh(i.as("h")),l=Rh(i.as("d")),u=Rh(i.as("M")),c=Rh(i.as("w")),f=Rh(i.as("y")),h=a<=n.ss&&["s",a]||a0,h[4]=r,TEt.apply(null,h)}function CEt(e){return e===void 0?Rh:typeof e=="function"?(Rh=e,!0):!1}function AEt(e,t){return By[e]===void 0?!1:t===void 0?By[e]:(By[e]=t,e==="s"&&(By.ss=t-1),!0)}function _Et(e,t){if(!this.isValid())return this.localeData().invalidDate();var n=!1,r=By,i,a;return typeof e=="object"&&(t=e,e=!1),typeof e=="boolean"&&(n=e),typeof t=="object"&&(r=Object.assign({},By,t),t.s!=null&&t.ss==null&&(r.ss=t.s-1)),i=this.localeData(),a=kEt(this,!n,r,i),n&&(a=i.pastFuture(+this,a)),i.postformat(a)}var g7=Math.abs;function ty(e){return(e>0)-(e<0)||+e}function l6(){if(!this.isValid())return this.localeData().invalidDate();var e=g7(this._milliseconds)/1e3,t=g7(this._days),n=g7(this._months),r,i,a,s,o=this.asSeconds(),l,u,c,f;return o?(r=lc(e/60),i=lc(r/60),e%=60,r%=60,a=lc(n/12),n%=12,s=e?e.toFixed(3).replace(/\.?0+$/,""):"",l=o<0?"-":"",u=ty(this._months)!==ty(o)?"-":"",c=ty(this._days)!==ty(o)?"-":"",f=ty(this._milliseconds)!==ty(o)?"-":"",l+"P"+(a?u+a+"Y":"")+(n?u+n+"M":"")+(t?c+t+"D":"")+(i||r||e?"T":"")+(i?f+i+"H":"")+(r?f+r+"M":"")+(e?f+s+"S":"")):"P0D"}var Wr=s6.prototype;Wr.isValid=EOt;Wr.abs=tEt;Wr.add=nEt;Wr.subtract=rEt;Wr.as=aEt;Wr.asMilliseconds=dye;Wr.asSeconds=sEt;Wr.asMinutes=oEt;Wr.asHours=lEt;Wr.asDays=uEt;Wr.asWeeks=cEt;Wr.asMonths=dEt;Wr.asQuarters=fEt;Wr.asYears=hEt;Wr.valueOf=pEt;Wr._bubble=iEt;Wr.clone=mEt;Wr.get=gEt;Wr.milliseconds=bEt;Wr.seconds=yEt;Wr.minutes=vEt;Wr.hours=OEt;Wr.days=SEt;Wr.weeks=xEt;Wr.months=EEt;Wr.years=wEt;Wr.humanize=_Et;Wr.toISOString=l6;Wr.toString=l6;Wr.toJSON=l6;Wr.locale=Kbe;Wr.localeData=eye;Wr.toIsoString=Mc("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",l6);Wr.lang=Jbe;Un("X",0,0,"unix");Un("x",0,0,"valueOf");bn("x",n6);bn("X",Zyt);vi("X",function(e,t,n){n._d=new Date(parseFloat(e)*1e3)});vi("x",function(e,t,n){n._d=new Date(Nr(e))});//! moment.js -un.version="2.30.1";Ryt(Vi);un.fn=Vt;un.min=yOt;un.max=vOt;un.now=OOt;un.utc=nh;un.unix=GSt;un.months=ZSt;un.isDate=ek;un.locale=Ym;un.invalid=KI;un.duration=Md;un.isMoment=wd;un.weekdays=KSt;un.parseZone=YSt;un.localeData=wp;un.isDuration=t_;un.monthsShort=XSt;un.weekdaysMin=eEt;un.defineLocale=SQ;un.updateLocale=Yvt;un.locales=Zvt;un.weekdaysShort=JSt;un.normalizeUnits=Lc;un.relativeTimeRounding=CEt;un.relativeTimeThreshold=AEt;un.calendarFormat=WOt;un.prototype=Vt;un.HTML5_FMT={DATETIME_LOCAL:"YYYY-MM-DDTHH:mm",DATETIME_LOCAL_SECONDS:"YYYY-MM-DDTHH:mm:ss",DATETIME_LOCAL_MS:"YYYY-MM-DDTHH:mm:ss.SSS",DATE:"YYYY-MM-DD",TIME:"HH:mm",TIME_SECONDS:"HH:mm:ss",TIME_MS:"HH:mm:ss.SSS",WEEK:"GGGG-[W]WW",MONTH:"YYYY-MM"};var RQ={},REt=ca;Object.defineProperty(RQ,"__esModule",{value:!0});var fye=RQ.default=void 0,IEt=REt(da()),Ere=I;fye=RQ.default=(0,IEt.default)([(0,Ere.jsx)("path",{d:"M11.99 2C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2M12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8"},"0"),(0,Ere.jsx)("path",{d:"M12.5 7H11v6l5.25 3.15.75-1.23-4.5-2.67z"},"1")],"AccessTime");function DEt(e){const{document:t}=e,n=Wf(),r=x0(),i=()=>{n(`/${r.workspaceSlug}/${t.id}`)};return I.jsx(hF,{sx:{width:"100%"},children:I.jsx(Qoe,{onClick:i,children:I.jsxs(VIe,{children:[I.jsx(xr,{variant:"h5",component:"div",noWrap:!0,children:t.title}),I.jsxs(lr,{direction:"row",alignItems:"center",gap:1,children:[I.jsx(fye,{fontSize:"small",sx:{color:"text.secondary"}}),I.jsxs(xr,{variant:"body2",color:"text.secondary",noWrap:!0,children:["Changed ",un(t.updatedAt).fromNow()]})]})]})})})}function NEt(){const e=x0(),t=Wf(),{data:n}=QF(e.workspaceSlug),{data:r,fetchNextPage:i,hasNextPage:a}=dUe(n==null?void 0:n.id),{mutateAsync:s}=hUe((n==null?void 0:n.id)||""),[o,l]=N.useState(!1),u=N.useMemo(()=>(r==null?void 0:r.pages.reduce((h,g)=>h.concat(g.documents),[]))??[],[r==null?void 0:r.pages]),c=()=>{l(h=>!h)},f=async h=>{const g=await s(h);t(g.id)};return I.jsxs(lr,{gap:2,children:[I.jsxs(lr,{direction:"row",justifyContent:"space-between",alignItems:"center",px:2,children:[I.jsxs(xr,{variant:"h5",fontWeight:"bold",children:[n==null?void 0:n.title," ",I.jsx(xr,{component:"span",variant:"inherit",color:"primary",children:r==null?void 0:r.pages[0].totalLength})]}),I.jsx(Ws,{variant:"contained",startIcon:I.jsx(ZI,{}),onClick:c,children:"New Note"})]}),I.jsx(lr,{style:{maxHeight:"calc(100vh - 144px)",overflow:"auto"},children:I.jsx(Sx,{pageStart:0,loadMore:()=>i(),hasMore:a,loader:I.jsx(lr,{className:"loader",alignItems:"center",children:I.jsx(bp,{size:20})},0),useWindow:!1,children:I.jsx(Ts,{p:2,width:1,children:I.jsx(_y,{container:!0,spacing:{xs:2,md:3},columns:{xs:4,sm:8,md:12,lg:12},children:u.map(h=>I.jsx(_y,{item:!0,xs:4,sm:4,md:4,lg:3,children:I.jsx(DEt,{document:h})},h.id))})})})}),I.jsx(ybe,{open:o,title:"Note",onSuccess:f,onClose:c})]})}function PEt(){const e=jle();return I.jsx(lr,{width:1,height:"100vh",alignItems:"center",justifyContent:"center",children:I.jsxs(lr,{alignItems:"center",children:[I.jsx(xr,{variant:"h5",children:"Something went wrong"}),wF(e)&&I.jsxs(xr,{variant:"subtitle1",children:["Status Code: ",e.status]})]})})}function MEt(){const e=x0(),t=Wf(),{mutateAsync:n}=SUe();return N.useEffect(()=>{e.invitationToken&&n({invitationToken:e.invitationToken}).then(r=>{t(`/${r.slug}`)})},[n,t,e.invitationToken]),I.jsx(aT,{open:!0,children:I.jsx(bp,{color:"inherit"})})}var LEt=function(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=e,n.c=t,n.d=function(r,i,a){n.o(r,i)||Object.defineProperty(r,i,{enumerable:!0,get:a})},n.r=function(r){typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(r,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(r,"__esModule",{value:!0})},n.t=function(r,i){if(1&i&&(r=n(r)),8&i||4&i&&typeof r=="object"&&r&&r.__esModule)return r;var a=Object.create(null);if(n.r(a),Object.defineProperty(a,"default",{enumerable:!0,value:r}),2&i&&typeof r!="string")for(var s in r)n.d(a,s,(function(o){return r[o]}).bind(null,s));return a},n.n=function(r){var i=r&&r.__esModule?function(){return r.default}:function(){return r};return n.d(i,"a",i),i},n.o=function(r,i){return Object.prototype.hasOwnProperty.call(r,i)},n.p="",n(n.s=4)}([function(e,t,n){e.exports=n(2)()},function(e,t){e.exports=N},function(e,t,n){var r=n(3);function i(){}function a(){}a.resetWarningCache=i,e.exports=function(){function s(u,c,f,h,g,b){if(b!==r){var S=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw S.name="Invariant Violation",S}}function o(){return s}s.isRequired=s;var l={array:s,bool:s,func:s,number:s,object:s,string:s,symbol:s,any:s,arrayOf:o,element:s,elementType:s,instanceOf:o,node:s,objectOf:o,oneOf:o,oneOfType:o,shape:o,exact:o,checkPropTypes:a,resetWarningCache:i};return l.PropTypes=l,l}},function(e,t,n){e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},function(e,t,n){n.r(t),n.d(t,"FacebookLoginButton",function(){return K}),n.d(t,"GoogleLoginButton",function(){return z}),n.d(t,"GithubLoginButton",function(){return ee}),n.d(t,"TwitterLoginButton",function(){return ie}),n.d(t,"AmazonLoginButton",function(){return qe}),n.d(t,"InstagramLoginButton",function(){return tt}),n.d(t,"LinkedInLoginButton",function(){return et}),n.d(t,"MicrosoftLoginButton",function(){return Je}),n.d(t,"BufferLoginButton",function(){return he}),n.d(t,"TelegramLoginButton",function(){return We}),n.d(t,"AppleLoginButton",function(){return ve}),n.d(t,"DiscordLoginButton",function(){return vt}),n.d(t,"OktaLoginButton",function(){return gt}),n.d(t,"SlackLoginButton",function(){return wt}),n.d(t,"YahooLoginButton",function(){return $n}),n.d(t,"createButton",function(){return Z}),n.d(t,"createSvgIcon",function(){return H}),n.d(t,"ZaloLoginButton",function(){return Ur}),n.d(t,"TikTokLoginButton",function(){return lt}),n.d(t,"MetamaskLoginButton",function(){return yn});var r={};n.r(r),n.d(r,"FacebookLoginButton",function(){return K}),n.d(r,"GoogleLoginButton",function(){return z}),n.d(r,"GithubLoginButton",function(){return ee}),n.d(r,"TwitterLoginButton",function(){return ie}),n.d(r,"AmazonLoginButton",function(){return qe}),n.d(r,"InstagramLoginButton",function(){return tt}),n.d(r,"LinkedInLoginButton",function(){return et}),n.d(r,"MicrosoftLoginButton",function(){return Je}),n.d(r,"BufferLoginButton",function(){return he}),n.d(r,"TelegramLoginButton",function(){return We}),n.d(r,"AppleLoginButton",function(){return ve}),n.d(r,"DiscordLoginButton",function(){return vt}),n.d(r,"OktaLoginButton",function(){return gt}),n.d(r,"SlackLoginButton",function(){return wt}),n.d(r,"YahooLoginButton",function(){return $n}),n.d(r,"createButton",function(){return Z}),n.d(r,"createSvgIcon",function(){return H}),n.d(r,"ZaloLoginButton",function(){return Ur}),n.d(r,"TikTokLoginButton",function(){return lt}),n.d(r,"MetamaskLoginButton",function(){return yn});var i=n(1),a=n.n(i),s=n(0),o=n.n(s),l=function(Qe){var Ye=Qe.name,ot=Qe.size,yt=Qe.format;return a.a.createElement("i",{className:yt(Ye),style:{fontSize:ot}})};l.propTypes={format:o.a.func,name:o.a.string.isRequired,size:o.a.oneOfType([o.a.string,o.a.number]).isRequired},l.defaultProps={format:function(Qe){return"demo-icon icon-".concat(Qe)},size:26};var u=l,c=function(Qe){var Ye=Qe.type,ot=Qe.size,yt=Qe.format,Yn=Qe.color,pn=Yn===void 0?"#FFFFFF":Yn;return typeof Ye=="string"?a.a.createElement(u,{format:yt,name:Ye,size:ot}):a.a.createElement(Ye,{size:ot,color:pn})};c.propTypes={format:o.a.func,size:o.a.oneOfType([o.a.number,o.a.string]),type:o.a.oneOfType([o.a.string,o.a.node,o.a.func]),color:o.a.string};var f=c;function h(Qe,Ye){var ot=Object.keys(Qe);if(Object.getOwnPropertySymbols){var yt=Object.getOwnPropertySymbols(Qe);Ye&&(yt=yt.filter(function(Yn){return Object.getOwnPropertyDescriptor(Qe,Yn).enumerable})),ot.push.apply(ot,yt)}return ot}function g(Qe){for(var Ye=1;Ye"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}();return function(){var ot,yt=R(Qe);if(Ye){var Yn=R(this).constructor;ot=Reflect.construct(yt,arguments,Yn)}else ot=yt.apply(this,arguments);return C(this,ot)}}function C(Qe,Ye){return!Ye||S(Ye)!=="object"&&typeof Ye!="function"?function(ot){if(ot===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return ot}(Qe):Ye}function R(Qe){return(R=Object.setPrototypeOf?Object.getPrototypeOf:function(Ye){return Ye.__proto__||Object.getPrototypeOf(Ye)})(Qe)}var A=function(Qe){(function(pn,Fn){if(typeof Fn!="function"&&Fn!==null)throw new TypeError("Super expression must either be null or a function");pn.prototype=Object.create(Fn&&Fn.prototype,{constructor:{value:pn,writable:!0,configurable:!0}}),Fn&&x(pn,Fn)})(Yn,Qe);var Ye,ot,yt=k(Yn);function Yn(pn){var Fn;return function(Pi,nt){if(!(Pi instanceof nt))throw new TypeError("Cannot call a class as a function")}(this,Yn),(Fn=yt.call(this,pn)).state={focused:!1,hovered:!1},Fn.handleMouseEnter=function(){Fn.setState({hovered:!0}),typeof Fn.props.onMouseEnter=="function"&&Fn.props.onMouseEnter()},Fn.handleMouseLeave=function(){Fn.setState({hovered:!1}),typeof Fn.props.onMouseLeave=="function"&&Fn.props.onMouseLeave()},Fn.handleFocus=function(){Fn.setState({focused:!0})},Fn.handleBlur=function(){Fn.setState({focused:!1})},Fn.handleClick=function(Pi){typeof Fn.props.onClick=="function"&&Fn.props.onClick(Pi)},Fn}return Ye=Yn,(ot=[{key:"render",value:function(){var pn=this.props,Fn=pn.activeStyle,Pi=pn.align,nt=pn.text,Be=pn.children,Dt=Be===void 0?nt:Be,en=pn.className,Vn=pn.icon,Zr=pn.iconFormat,Er=pn.iconSize,In=pn.iconColor,Wn=In===void 0?"#FFFFFF":In,ti=pn.preventActiveStyles,qa=pn.size,Fc=pn.style,kp=pn.disabled,H1=this.state,V1=H1.focused,W1=H1.hovered,Q1=B(L.button,{activeStyle:ti?Fc:Fn,customStyle:Fc,active:W1||V1,size:qa});return a.a.createElement("button",E({type:"button",style:Q1,onClick:this.handleClick,onMouseEnter:this.handleMouseEnter,onMouseLeave:this.handleMouseLeave,onFocus:this.handleFocus,onBlur:this.handleBlur},{className:en},{disabled:kp}),a.a.createElement("div",{style:L.flex},!D(Er)&&a.a.createElement("div",{style:{display:"flex",justifyContent:"center",minWidth:Er}},a.a.createElement(f,{type:Vn,size:Er,format:Zr,color:Wn})),!D(Er)&&a.a.createElement("div",{style:L.divider}),a.a.createElement("div",{style:{textAlign:Pi,width:"100%"}},Dt)))}}])&&w(Ye.prototype,ot),Yn}(i.Component),D=function(Qe){return Qe==="0"||Qe==="0px"||Qe===0},B=function(Qe,Ye){var ot=Ye.size,yt=Ye.customStyle,Yn=Ye.active,pn=Ye.activeStyle;return g(g(g({},Qe),{},{height:ot},yt),Yn&&pn)};A.propTypes={activeStyle:o.a.object,align:o.a.oneOf(["left","right","center"]),children:o.a.node,className:o.a.string,icon:o.a.oneOfType([o.a.string,o.a.node,o.a.func]),iconFormat:o.a.func,iconSize:o.a.string,iconColor:o.a.string,onClick:o.a.func,onMouseEnter:o.a.func,onMouseLeave:o.a.func,preventActiveStyles:o.a.bool,size:o.a.string,style:o.a.object,text:o.a.string,disabled:o.a.bool},A.defaultProps={align:"left",iconSize:"26px",preventActiveStyles:!1,size:"50px"};var L={button:{display:"block",border:0,borderRadius:3,boxShadow:"rgba(0, 0, 0, 0.5) 0 1px 2px",color:"#ffffff",cursor:"pointer",fontSize:"19px",margin:"5px",width:"calc(100% - 10px)",overflow:"hidden",padding:"0 10px",userSelect:"none"},divider:{width:"10px"},flex:{alignItems:"center",display:"flex",height:"100%"}};function F(Qe,Ye){var ot=Object.keys(Qe);if(Object.getOwnPropertySymbols){var yt=Object.getOwnPropertySymbols(Qe);Ye&&(yt=yt.filter(function(Yn){return Object.getOwnPropertyDescriptor(Qe,Yn).enumerable})),ot.push.apply(ot,yt)}return ot}function W(Qe){for(var Ye=1;Ye{window.location.href=`https://codepair-api.yorkie.dev/auth/login/${t}`};return I.jsx(qoe,{sx:{height:1},children:I.jsx(lr,{alignItems:"center",justifyContent:"center",sx:{height:1},children:I.jsx(Zs,{sx:{p:5,width:"small",boxShadow:2,maxWidth:"80%"},children:I.jsxs(lr,{gap:4,children:[I.jsxs(Ts,{children:[I.jsxs(lr,{direction:"row",gap:1,children:[I.jsx(hbe,{}),I.jsx(xr,{variant:"h6",children:"Login"})]}),I.jsx(xr,{variant:"body2",color:"text.secondary",maxWidth:320,children:"Real-time markdown editor for interviews, meetings and more..."})]}),I.jsxs(lr,{gap:2,children:[I.jsxs(_y,{container:!0,spacing:1,alignItems:"center",children:[I.jsx(_y,{item:!0,xs:!0,children:I.jsx(c1,{sx:{width:1}})}),I.jsx(_y,{item:!0,xs:"auto",children:I.jsx(xr,{variant:"body2",color:"text.secondary",children:"Login with"})}),I.jsx(_y,{item:!0,xs:!0,children:I.jsx(c1,{sx:{width:1}})})]}),$Et.map(({SocailLoginComponent:t,provider:n})=>I.jsx(t,{size:"48px",onClick:()=>e(n)},n))]})]})})})})}var IQ={},BEt=ca;Object.defineProperty(IQ,"__esModule",{value:!0});var hye=IQ.default=void 0,UEt=BEt(da()),zEt=I;hye=IQ.default=(0,UEt.default)((0,zEt.jsx)("path",{d:"M3 17.25V21h3.75L17.81 9.94l-3.75-3.75zM20.71 7.04c.39-.39.39-1.02 0-1.41l-2.34-2.34a.9959.9959 0 0 0-1.41 0l-1.83 1.83 3.75 3.75z"}),"Edit");var DQ={},jEt=ca;Object.defineProperty(DQ,"__esModule",{value:!0});var pye=DQ.default=void 0,HEt=jEt(da()),VEt=I;pye=DQ.default=(0,HEt.default)((0,VEt.jsx)("path",{d:"M3 15h8v-2H3zm0 4h8v-2H3zm0-8h8V9H3zm0-6v2h8V5zm10 0h8v14h-8z"}),"VerticalSplit");function WEt(){const e=Du(),t=kT(),n=()=>{e(iue(t=="light"?"dark":"light"))};return I.jsx(wa,{onClick:n,color:"inherit",children:t==="light"?I.jsx(KW,{}):I.jsx(ZW,{})})}var NQ={},QEt=ca;Object.defineProperty(NQ,"__esModule",{value:!0});var mye=NQ.default=void 0,qEt=QEt(da()),GEt=I;mye=NQ.default=(0,qEt.default)((0,GEt.jsx)("path",{d:"M18 16.08c-.76 0-1.44.3-1.96.77L8.91 12.7c.05-.23.09-.46.09-.7s-.04-.47-.09-.7l7.05-4.11c.54.5 1.25.81 2.04.81 1.66 0 3-1.34 3-3s-1.34-3-3-3-3 1.34-3 3c0 .24.04.47.09.7L8.04 9.81C7.5 9.31 6.79 9 6 9c-1.66 0-3 1.34-3 3s1.34 3 3 3c.79 0 1.5-.31 2.04-.81l7.12 4.16c-.05.21-.08.43-.08.65 0 1.61 1.31 2.92 2.92 2.92 1.61 0 2.92-1.31 2.92-2.92s-1.31-2.92-2.92-2.92"}),"Share");const mv=["No Limit","30 minutes","1 hour","8 hours","24 hours","7 days"];var p9=(e=>(e.READ="READ",e.EDIT="EDIT",e))(p9||{});function YEt(e){var c,f;const{...t}=e,n=x0(),[r,i]=N.useState(null),a=pi(WF),{mutateAsync:s}=pUe(((c=a.data)==null?void 0:c.workspaceId)||"",((f=a.data)==null?void 0:f.id)||""),{enqueueSnackbar:o}=YI(),l=async h=>{let g;if(h.expiredString===mv[0])g=null;else{const[S,E]=h.expiredString.split(" ");g=un().add(Number(S),E).toDate()}const{sharingToken:b}=await s({role:h.role,expiredAt:g});i(`${window.location.origin}/${n.workspaceSlug}/${n.documentId}/share?token=${b}`)},u=async()=>{r&&(await F1.write(r),o("URL Copied!",{variant:"success"}))};return I.jsx(S0,{disableAutoFocus:!0,...t,children:I.jsxs(Zs,{sx:{position:"absolute",top:"50%",left:"50%",transform:"translate(-50%, -50%)",p:4,width:400},children:[I.jsx(wa,{sx:{position:"absolute",top:28,right:28},onClick:h=>{var g;return(g=e.onClose)==null?void 0:g.call(e,h,"backdropClick")},children:I.jsx(XI,{})}),I.jsxs(lr,{gap:1,children:[I.jsx(xr,{variant:"subtitle1",children:"Share Link"}),I.jsx(kd,{children:I.jsx(JT,{defaultValues:{expiredString:mv[0],role:Object.values(p9)[0]},onSuccess:l,children:I.jsxs(lr,{gap:2,children:[I.jsx(s9,{label:"Role",name:"role",options:Object.values(p9).map(h=>({id:h,label:h})),size:"small",sx:{width:1},variant:"filled"}),I.jsx(s9,{label:"Expired Date",name:"expiredString",options:mv.map(h=>({id:h,label:h})),size:"small",sx:{width:1},variant:"filled"}),I.jsx(Ws,{type:"submit",variant:"contained",children:"Generate"})]})})}),!!r&&I.jsxs(lr,{direction:"row",alignItems:"center",gap:2,children:[I.jsx(xr,{variant:"body1",width:1,noWrap:!0,children:r}),I.jsx(wg,{title:"Copy URL",children:I.jsx(wa,{onClick:u,children:I.jsx(UI,{})})})]})]})]})})}function ZEt(){const[e,t]=N.useState(!1),n=()=>{t(r=>!r)};return I.jsxs(I.Fragment,{children:[I.jsx(wa,{onClick:n,color:"inherit",children:I.jsx(mye,{})}),I.jsx(YEt,{open:e,onClose:n})]})}var PQ={},XEt=ca;Object.defineProperty(PQ,"__esModule",{value:!0});var gye=PQ.default=void 0,KEt=XEt(da()),JEt=I;gye=PQ.default=(0,KEt.default)((0,JEt.jsx)("path",{d:"M17.77 3.77 16 2 6 12l10 10 1.77-1.77L9.54 12z"}),"ArrowBackIosNew");function e2t(){const e=Du(),t=Wf(),n=pi(AO),r=pi(pT),[i,{set:a,push:s,removeAt:o,clear:l,filter:u}]=Ift([]);N.useEffect(()=>{n.shareRole==="READ"&&e(W8("read"))},[e,n.shareRole]),N.useEffect(()=>{if(!n.doc)return;a(n.doc.getPresences());const h=n.doc.subscribe("others",g=>{var b,S;g.type==="watched"&&a(((S=(b=n.doc)==null?void 0:b.getPresences)==null?void 0:S.call(b))??[]),g.type==="unwatched"&&u(E=>E.clientID!==g.value.clientID)});return()=>{h(),l()}},[n.doc,l,s,o,a,u]);const c=h=>{h&&e(W8(h))},f=()=>{var h;t(`/${(h=r.data)==null?void 0:h.slug}`)};return I.jsx(Toe,{position:"static",sx:{zIndex:100},children:I.jsx(Ole,{children:I.jsxs(lr,{width:"100%",direction:"row",justifyContent:"space-between",children:[I.jsxs(lr,{direction:"row",spacing:1,alignItems:"center",children:[!n.shareRole&&I.jsx(wg,{title:"Back to Previous Page",children:I.jsx(wa,{color:"inherit",onClick:f,children:I.jsx(gye,{})})}),I.jsx(Zs,{children:n.shareRole!=="READ"&&I.jsxs(yLe,{value:n.mode,exclusive:!0,onChange:(h,g)=>c(g),size:"small",children:[I.jsx(ON,{value:"edit","aria-label":"edit",children:I.jsx(wg,{title:"Edit Mode",children:I.jsx(hye,{})})}),I.jsx(ON,{value:"both","aria-label":"both",children:I.jsx(wg,{title:"Both Mode",children:I.jsx(pye,{})})}),I.jsx(ON,{value:"read","aria-label":"read",children:I.jsx(wg,{title:"Read Mode",children:I.jsx(VW,{})})})]})})]}),I.jsxs(lr,{direction:"row",alignItems:"center",gap:1,children:[I.jsx(nIe,{max:4,children:i==null?void 0:i.map(h=>I.jsx(wg,{title:h.presence.name,children:I.jsx(fF,{alt:h.presence.name,sx:{bgcolor:h.presence.color},children:h.presence.name[0]})},h.clientID))}),!n.shareRole&&I.jsx(ZEt,{}),I.jsx(WEt,{})]})]})})})}function t2t(){return I.jsxs(Ts,{sx:{flexGrow:1},height:"100vh",children:[I.jsx(e2t,{}),I.jsx(kF,{})]})}const n2t=e=>["documents","share",e],r2t=e=>{const t=Du(),n=RO({queryKey:n2t(e||""),enabled:!!e,queryFn:async()=>(await Sr.get("/documents/share",{params:{token:e}})).data,meta:{errorMessage:"This is a non-existent or expired document."}});return N.useEffect(()=>(n.data&&t(s3(n.data)),()=>{t(s3(null))}),[t,n.data]),n};function i2t(){const e=Du(),t=w0(),[n]=CF(),r=N.useMemo(()=>n.get("token"),[n]),{data:i}=r2t(r),{doc:a,client:s}=Nge(i==null?void 0:i.yorkieDocumentId,"Anonymous");return N.useEffect(()=>{i!=null&&i.role&&(e(kBe(i.role)),i.role==="READ"&&e(W8("read")))},[e,i==null?void 0:i.role]),N.useEffect(()=>{if(!(!a||!s))return e(t3(a)),e(n3(s)),()=>{e(t3(null)),e(n3(null))}},[e,s,a]),r?I.jsx(Ts,{height:"calc(100% - 64px)",children:I.jsx(xge,{})}):I.jsx(TF,{to:"/",state:{from:t},replace:!0})}const a2t=e=>["workspaces",e,"users"],s2t=e=>VF({queryKey:a2t(e||""),queryFn:async({pageParam:t})=>(await Sr.get(`/workspaces/${e}/users`,{params:{cursor:t}})).data,enabled:!!e,initialPageParam:void 0,getPreviousPageParam:t=>t.cursor??void 0,getNextPageParam:t=>t.cursor??void 0});function o2t(e){var c;const{open:t,onClose:n}=e,r=pi(pT),{mutateAsync:i}=OUe(((c=r.data)==null?void 0:c.id)||""),{enqueueSnackbar:a}=YI(),[s,o]=N.useState(null),l=async f=>{let h;if(f.expiredString===mv[0])h=null;else{const[b,S]=f.expiredString.split(" ");h=un().add(Number(b),S).toDate()}const{invitationToken:g}=await i({expiredAt:h});o(`${window.location.origin}/join/${g}`)},u=async()=>{s&&(await F1.write(s),a("URL Copied!",{variant:"success"}))};return I.jsx(S0,{open:t,disableAutoFocus:!0,onClose:n,children:I.jsxs(Zs,{sx:{position:"absolute",top:"50%",left:"50%",transform:"translate(-50%, -50%)",p:4,width:538},children:[I.jsx(wa,{sx:{position:"absolute",top:28,right:28},onClick:n,children:I.jsx(XI,{})}),I.jsxs(lr,{gap:4,children:[I.jsxs(lr,{children:[I.jsx(xr,{variant:"h5",fontWeight:"bold",children:"Add Members"}),I.jsx(xr,{children:"Generate and share the link."})]}),I.jsx(lr,{gap:1,children:I.jsx(kd,{children:I.jsx(JT,{defaultValues:{expiredString:mv[0]},onSuccess:l,children:I.jsxs(lr,{gap:2,children:[I.jsx(s9,{label:"Expired Date",name:"expiredString",options:mv.map(f=>({id:f,label:f})),size:"small",sx:{width:1}}),I.jsx(Ws,{type:"submit",variant:"contained",children:"Generate"})]})})})}),I.jsxs(lr,{gap:1,children:[I.jsx(xr,{variant:"h6",fontWeight:"bold",children:"Invite Link"}),I.jsx(Ts,{height:40,children:s?I.jsxs(lr,{direction:"row",alignItems:"center",gap:2,children:[I.jsx(xr,{variant:"body1",children:s}),I.jsx(wg,{title:"Copy URL",children:I.jsx(wa,{onClick:u,children:I.jsx(UI,{})})})]}):I.jsx(xr,{mx:"auto",children:"No link has been generated."})})]})]})]})})}function l2t(){const e=x0(),{data:t}=QF(e.workspaceSlug),{data:n,fetchNextPage:r,hasNextPage:i}=s2t(t==null?void 0:t.id),[a,s]=N.useState(!1),o=N.useMemo(()=>(n==null?void 0:n.pages.reduce((u,c)=>u.concat(c.workspaceUsers),[]))??[],[n==null?void 0:n.pages]),l=()=>{s(u=>!u)};return I.jsxs(qoe,{maxWidth:"lg",children:[I.jsxs(lr,{gap:4,children:[I.jsxs(lr,{direction:"row",justifyContent:"space-between",alignItems:"center",px:2,children:[I.jsxs(xr,{variant:"h5",fontWeight:"bold",children:[t==null?void 0:t.title," ",I.jsx(xr,{component:"span",variant:"inherit",color:"primary",children:n==null?void 0:n.pages[0].workspaceUsers.length})]}),I.jsx(Ws,{variant:"contained",startIcon:I.jsx(ZI,{}),onClick:l,children:"Add Members"})]}),I.jsxs(aMe,{component:Ts,children:[I.jsx(c1,{}),I.jsx(Sx,{pageStart:0,loadMore:()=>r(),hasMore:i,loader:I.jsx(Ts,{className:"loader",children:I.jsx(bp,{size:"sm"})},0),useWindow:!1,style:{width:"100%"},children:I.jsxs(F8e,{children:[I.jsx(fMe,{children:I.jsxs(DZ,{children:[I.jsx(qb,{children:"Name"}),I.jsx(qb,{children:"Role"}),I.jsx(qb,{})]})}),I.jsx(Q8e,{style:{maxHeight:"100%",overflow:"auto"},children:o.map(u=>I.jsxs(DZ,{sx:{width:"100%"},children:[I.jsx(qb,{component:"th",scope:"row",children:u.nickname}),I.jsx(qb,{children:"-"}),I.jsx(qb,{children:"-"})]},u.id))})]})})]})]}),I.jsx(o2t,{open:a,onClose:l})]})}const u2t=[{path:"",accessType:2,element:I.jsx(Lbt,{}),children:[{path:"",element:I.jsx(FEt,{})}]},{path:":workspaceSlug",accessType:1,element:I.jsx(Tyt,{}),children:[{path:"",element:I.jsx(NEt,{})},{path:"member",element:I.jsx(l2t,{})}]},{path:":workspaceSlug",element:I.jsx(t2t,{}),children:[{path:":documentId",accessType:1,element:I.jsx(Mbt,{})},{path:":documentId/share",accessType:0,element:I.jsx(i2t,{})}]},{path:"auth/callback",accessType:2,element:I.jsx($bt,{})},{path:"join/:invitationToken",accessType:1,element:I.jsx(MEt,{})}],c2t=e=>{const t=n=>(n.accessType===1?n.element=I.jsx(_yt,{children:n.element}):n.accessType===2&&(n.element=I.jsx(kyt,{children:n.element})),n);return e.map(n=>(n=t(n),n!=null&&n.children&&(n.children=n.children.map(r=>t(r))),n.errorElement=I.jsx(PEt,{}),n))},d2t=c2t(u2t),bye=e=>["users",e],f2t=()=>{const e=Du(),t=pi(QT);t.accessToken&&(Sr.defaults.headers.common.Authorization=`Bearer ${t.accessToken}`);const n=RO({queryKey:bye(t.accessToken||""),enabled:!!t.accessToken,queryFn:async()=>(await Sr.get("/users")).data});return N.useEffect(()=>{n.isSuccess?e(Q8(n.data)):n.isError&&(e(gW(null)),e(Q8(null)),Sr.defaults.headers.common.Authorization="")},[e,n.data,n.isError,n.isSuccess]),n},h2t=()=>{const e=pi(QT),t=hT();return T0({mutationFn:async n=>(await Sr.put("/users",n)).data,onSuccess:()=>{t.invalidateQueries({queryKey:bye(e.accessToken||"")})}})};function p2t(e){const[t,n]=N.useState(""),[r,i]=N.useState(""),{data:a}=bbe(r),{mutateAsync:s}=h2t(),o=N.useMemo(()=>a!=null&&a.conflict?"Already Exists":null,[a==null?void 0:a.conflict]);bW(()=>{i(t)},500,[t]);const l=c=>{n(c.target.value)},u=async c=>{await s(c)};return I.jsx(S0,{disableAutoFocus:!0,...e,children:I.jsx(Zs,{sx:{position:"absolute",top:"50%",left:"50%",transform:"translate(-50%, -50%)",p:4,width:400},children:I.jsxs(lr,{gap:4,children:[I.jsx(xr,{variant:"h5",children:"Create Your Nickname"}),I.jsx(kd,{children:I.jsx(JT,{defaultValues:{nickname:""},onSuccess:u,children:I.jsxs(lr,{gap:4,alignItems:"flex-end",children:[I.jsx(GI,{variant:"standard",name:"nickname",label:"Enter your nickname",required:!0,fullWidth:!0,inputProps:{maxLength:255},onChange:l,error:!!o,helperText:o}),I.jsx(Ws,{type:"submit",variant:"contained",size:"large",disabled:!!o,children:"OK"})]})})})]})})})}function m2t(e){const{children:t}=e,{data:n,isSuccess:r,isLoading:i}=f2t(),a=N.useMemo(()=>r&&!n.nickname,[r,n==null?void 0:n.nickname]);return I.jsx(oQ.Provider,{value:{isLoggedIn:r,isLoading:i},children:a?I.jsx(p2t,{open:!0}):t})}function g2t(){const{enqueueSnackbar:e}=YI();return N.useCallback(n=>{e(n.message||"Something went wrong...",{variant:"error"})},[e])}const yye=Object.prototype.toString;function vye(e){switch(yye.call(e)){case"[object Error]":case"[object Exception]":case"[object DOMException]":return!0;default:return hp(e,Error)}}function tS(e,t){return yye.call(e)===`[object ${t}]`}function MQ(e){return tS(e,"ErrorEvent")}function wre(e){return tS(e,"DOMError")}function b2t(e){return tS(e,"DOMException")}function Uf(e){return tS(e,"String")}function LQ(e){return typeof e=="object"&&e!==null&&"__sentry_template_string__"in e&&"__sentry_template_values__"in e}function $Q(e){return e===null||LQ(e)||typeof e!="object"&&typeof e!="function"}function fO(e){return tS(e,"Object")}function u6(e){return typeof Event<"u"&&hp(e,Event)}function y2t(e){return typeof Element<"u"&&hp(e,Element)}function v2t(e){return tS(e,"RegExp")}function c6(e){return!!(e&&e.then&&typeof e.then=="function")}function O2t(e){return fO(e)&&"nativeEvent"in e&&"preventDefault"in e&&"stopPropagation"in e}function Oye(e){return typeof e=="number"&&e!==e}function hp(e,t){try{return e instanceof t}catch{return!1}}function Sye(e){return!!(typeof e=="object"&&e!==null&&(e.__isVue||e._isVue))}function gv(e,t=0){return typeof e!="string"||t===0||e.length<=t?e:`${e.slice(0,t)}...`}function xre(e,t){if(!Array.isArray(e))return"";const n=[];for(let r=0;rS2t(e,r,n))}function E2t(e,t,n=250,r,i,a,s){if(!a.exception||!a.exception.values||!s||!hp(s.originalException,Error))return;const o=a.exception.values.length>0?a.exception.values[a.exception.values.length-1]:void 0;o&&(a.exception.values=w2t(m9(e,t,i,s.originalException,r,a.exception.values,o,0),n))}function m9(e,t,n,r,i,a,s,o){if(a.length>=n+1)return a;let l=[...a];if(hp(r[i],Error)){Tre(s,o);const u=e(t,r[i]),c=l.length;kre(u,i,c,o),l=m9(e,t,n,r[i],i,[u,...l],u,c)}return Array.isArray(r.errors)&&r.errors.forEach((u,c)=>{if(hp(u,Error)){Tre(s,o);const f=e(t,u),h=l.length;kre(f,`errors[${c}]`,h,o),l=m9(e,t,n,u,i,[f,...l],f,h)}}),l}function Tre(e,t){e.mechanism=e.mechanism||{type:"generic",handled:!0},e.mechanism={...e.mechanism,is_exception_group:!0,exception_id:t}}function kre(e,t,n,r){e.mechanism=e.mechanism||{type:"generic",handled:!0},e.mechanism={...e.mechanism,type:"chained",source:t,exception_id:n,parent_id:r}}function w2t(e,t){return e.map(n=>(n.value&&(n.value=gv(n.value,t)),n))}function ZA(e){return e&&e.Math==Math?e:void 0}const si=typeof globalThis=="object"&&ZA(globalThis)||typeof window=="object"&&ZA(window)||typeof self=="object"&&ZA(self)||typeof global=="object"&&ZA(global)||function(){return this}()||{};function FQ(){return si}function Eye(e,t,n){const r=n||si,i=r.__SENTRY__=r.__SENTRY__||{};return i[e]||(i[e]=t())}const bv=FQ(),x2t=80;function kx(e,t={}){if(!e)return"";try{let n=e;const r=5,i=[];let a=0,s=0;const o=" > ",l=o.length;let u;const c=Array.isArray(t)?t:t.keyAttrs,f=!Array.isArray(t)&&t.maxStringLength||x2t;for(;n&&a++1&&s+i.length*l+u.length>=f));)i.push(u),s+=u.length,n=n.parentNode;return i.reverse().join(o)}catch{return""}}function T2t(e,t){const n=e,r=[];let i,a,s,o,l;if(!n||!n.tagName)return"";if(bv.HTMLElement&&n instanceof HTMLElement&&n.dataset&&n.dataset.sentryComponent)return n.dataset.sentryComponent;r.push(n.tagName.toLowerCase());const u=t&&t.length?t.filter(f=>n.getAttribute(f)).map(f=>[f,n.getAttribute(f)]):null;if(u&&u.length)u.forEach(f=>{r.push(`[${f[0]}="${f[1]}"]`)});else if(n.id&&r.push(`#${n.id}`),i=n.className,i&&Uf(i))for(a=i.split(/\s+/),l=0;l"u"||__SENTRY_DEBUG__,A2t="Sentry Logger ",g9=["debug","info","warn","error","log","assert","trace"],p5={};function d6(e){if(!("console"in si))return e();const t=si.console,n={},r=Object.keys(p5);r.forEach(i=>{const a=p5[i];n[i]=t[i],t[i]=a});try{return e()}finally{r.forEach(i=>{t[i]=n[i]})}}function _2t(){let e=!1;const t={enable:()=>{e=!0},disable:()=>{e=!1},isEnabled:()=>e};return nS?g9.forEach(n=>{t[n]=(...r)=>{e&&d6(()=>{si.console[n](`${A2t}[${n}]:`,...r)})}}):g9.forEach(n=>{t[n]=()=>{}}),t}const Pt=_2t(),R2t=/^(?:(\w+):)\/\/(?:(\w+)(?::(\w+)?)?@)([\w.-]+)(?::(\d+))?\/(.+)/;function I2t(e){return e==="http"||e==="https"}function ak(e,t=!1){const{host:n,path:r,pass:i,port:a,projectId:s,protocol:o,publicKey:l}=e;return`${o}://${l}${t&&i?`:${i}`:""}@${n}${a?`:${a}`:""}/${r&&`${r}/`}${s}`}function D2t(e){const t=R2t.exec(e);if(!t){d6(()=>{console.error(`Invalid Sentry Dsn: ${e}`)});return}const[n,r,i="",a,s="",o]=t.slice(1);let l="",u=o;const c=u.split("/");if(c.length>1&&(l=c.slice(0,-1).join("/"),u=c.pop()),u){const f=u.match(/^\d+/);f&&(u=f[0])}return xye({host:a,pass:i,path:l,projectId:u,port:s,protocol:n,publicKey:r})}function xye(e){return{protocol:e.protocol,publicKey:e.publicKey||"",pass:e.pass||"",host:e.host,port:e.port||"",path:e.path||"",projectId:e.projectId}}function N2t(e){if(!nS)return!0;const{port:t,projectId:n,protocol:r}=e;return["protocol","publicKey","host","projectId"].find(s=>e[s]?!1:(Pt.error(`Invalid Sentry Dsn: ${s} missing`),!0))?!1:n.match(/^\d+$/)?I2t(r)?t&&isNaN(parseInt(t,10))?(Pt.error(`Invalid Sentry Dsn: Invalid port ${t}`),!1):!0:(Pt.error(`Invalid Sentry Dsn: Invalid protocol ${r}`),!1):(Pt.error(`Invalid Sentry Dsn: Invalid projectId ${n}`),!1)}function P2t(e){const t=typeof e=="string"?D2t(e):xye(e);if(!(!t||!N2t(t)))return t}class Of extends Error{constructor(t,n="warn"){super(t),this.message=t,this.name=new.target.prototype.constructor.name,Object.setPrototypeOf(this,new.target.prototype),this.logLevel=n}}function qs(e,t,n){if(!(t in e))return;const r=e[t],i=n(r);typeof i=="function"&&Tye(i,r),e[t]=i}function Cx(e,t,n){try{Object.defineProperty(e,t,{value:n,writable:!0,configurable:!0})}catch{nS&&Pt.log(`Failed to add non-enumerable property "${t}" to object`,e)}}function Tye(e,t){try{const n=t.prototype||{};e.prototype=t.prototype=n,Cx(e,"__sentry_original__",t)}catch{}}function BQ(e){return e.__sentry_original__}function M2t(e){return Object.keys(e).map(t=>`${encodeURIComponent(t)}=${encodeURIComponent(e[t])}`).join("&")}function kye(e){if(vye(e))return{message:e.message,name:e.name,stack:e.stack,...Are(e)};if(u6(e)){const t={type:e.type,target:Cre(e.target),currentTarget:Cre(e.currentTarget),...Are(e)};return typeof CustomEvent<"u"&&hp(e,CustomEvent)&&(t.detail=e.detail),t}else return e}function Cre(e){try{return y2t(e)?kx(e):Object.prototype.toString.call(e)}catch{return""}}function Are(e){if(typeof e=="object"&&e!==null){const t={};for(const n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t}else return{}}function L2t(e,t=40){const n=Object.keys(kye(e));if(n.sort(),!n.length)return"[object has no keys]";if(n[0].length>=t)return gv(n[0],t);for(let r=n.length;r>0;r--){const i=n.slice(0,r).join(", ");if(!(i.length>t))return r===n.length?i:gv(i,t)}return""}function gc(e){return b9(e,new Map)}function b9(e,t){if($2t(e)){const n=t.get(e);if(n!==void 0)return n;const r={};t.set(e,r);for(const i of Object.keys(e))typeof e[i]<"u"&&(r[i]=b9(e[i],t));return r}if(Array.isArray(e)){const n=t.get(e);if(n!==void 0)return n;const r=[];return t.set(e,r),e.forEach(i=>{r.push(b9(i,t))}),r}return e}function $2t(e){if(!fO(e))return!1;try{const t=Object.getPrototypeOf(e).constructor.name;return!t||t==="Object"}catch{return!0}}const Cye=50,_re=/\(error: (.*)\)/,Rre=/captureMessage|captureException/;function Aye(...e){const t=e.sort((n,r)=>n[0]-r[0]).map(n=>n[1]);return(n,r=0)=>{const i=[],a=n.split(` -`);for(let s=r;s1024)continue;const l=_re.test(o)?o.replace(_re,"$1"):o;if(!l.match(/\S*Error: /)){for(const u of t){const c=u(l);if(c){i.push(c);break}}if(i.length>=Cye)break}}return B2t(i)}}function F2t(e){return Array.isArray(e)?Aye(...e):e}function B2t(e){if(!e.length)return[];const t=Array.from(e);return/sentryWrapped/.test(t[t.length-1].function||"")&&t.pop(),t.reverse(),Rre.test(t[t.length-1].function||"")&&(t.pop(),Rre.test(t[t.length-1].function||"")&&t.pop()),t.slice(0,Cye).map(n=>({...n,filename:n.filename||t[t.length-1].filename,function:n.function||"?"}))}const b7="";function pp(e){try{return!e||typeof e!="function"?b7:e.name||b7}catch{return b7}}const r_={},Ire={};function U1(e,t){r_[e]=r_[e]||[],r_[e].push(t)}function z1(e,t){Ire[e]||(t(),Ire[e]=!0)}function bd(e,t){const n=e&&r_[e];if(n)for(const r of n)try{r(t)}catch(i){nS&&Pt.error(`Error while triggering instrumentation handler. +`+new Error().stack),n=!1}return t.apply(this,arguments)},t)}var bre={};function xbe(e,t){un.deprecationHandler!=null&&un.deprecationHandler(e,t),bre[e]||(wbe(t),bre[e]=!0)}un.suppressDeprecationWarnings=!1;un.deprecationHandler=null;function rh(e){return typeof Function<"u"&&e instanceof Function||Object.prototype.toString.call(e)==="[object Function]"}function Ryt(e){var t,n;for(n in e)Jr(e,n)&&(t=e[n],rh(t)?this[n]=t:this["_"+n]=t);this._config=e,this._dayOfMonthOrdinalParseLenient=new RegExp((this._dayOfMonthOrdinalParse.source||this._ordinalParse.source)+"|"+/\d{1,2}/.source)}function l9(e,t){var n=Dm({},e),r;for(r in t)Jr(t,r)&&(e1(e[r])&&e1(t[r])?(n[r]={},Dm(n[r],e[r]),Dm(n[r],t[r])):t[r]!=null?n[r]=t[r]:delete n[r]);for(r in e)Jr(e,r)&&!Jr(t,r)&&e1(e[r])&&(n[r]=Dm({},n[r]));return n}function dQ(e){e!=null&&this.set(e)}var u9;Object.keys?u9=Object.keys:u9=function(e){var t,n=[];for(t in e)Jr(e,t)&&n.push(t);return n};var Iyt={sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"};function Dyt(e,t,n){var r=this._calendar[e]||this._calendar.sameElse;return rh(r)?r.call(t,n):r}function jf(e,t,n){var r=""+Math.abs(e),i=t-r.length,a=e>=0;return(a?n?"+":"":"-")+Math.pow(10,Math.max(0,i)).toString().substr(1)+r}var fQ=/(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|N{1,5}|YYYYYY|YYYYY|YYYY|YY|y{2,4}|yo?|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,GA=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,p7={},fv={};function Un(e,t,n,r){var i=r;typeof r=="string"&&(i=function(){return this[r]()}),e&&(fv[e]=i),t&&(fv[t[0]]=function(){return jf(i.apply(this,arguments),t[1],t[2])}),n&&(fv[n]=function(){return this.localeData().ordinal(i.apply(this,arguments),e)})}function Nyt(e){return e.match(/\[[\s\S]/)?e.replace(/^\[|\]$/g,""):e.replace(/\\/g,"")}function Pyt(e){var t=e.match(fQ),n,r;for(n=0,r=t.length;n=0&&GA.test(e);)e=e.replace(GA,r),GA.lastIndex=0,n-=1;return e}var Myt={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"};function Lyt(e){var t=this._longDateFormat[e],n=this._longDateFormat[e.toUpperCase()];return t||!n?t:(this._longDateFormat[e]=n.match(fQ).map(function(r){return r==="MMMM"||r==="MM"||r==="DD"||r==="dddd"?r.slice(1):r}).join(""),this._longDateFormat[e])}var $yt="Invalid date";function Fyt(){return this._invalidDate}var Byt="%d",Uyt=/\d{1,2}/;function zyt(e){return this._ordinal.replace("%d",e)}var jyt={future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",w:"a week",ww:"%d weeks",M:"a month",MM:"%d months",y:"a year",yy:"%d years"};function Hyt(e,t,n,r){var i=this._relativeTime[n];return rh(i)?i(e,t,n,r):i.replace(/%d/i,e)}function Vyt(e,t){var n=this._relativeTime[e>0?"future":"past"];return rh(n)?n(t):n.replace(/%s/i,t)}var yre={D:"date",dates:"date",date:"date",d:"day",days:"day",day:"day",e:"weekday",weekdays:"weekday",weekday:"weekday",E:"isoWeekday",isoweekdays:"isoWeekday",isoweekday:"isoWeekday",DDD:"dayOfYear",dayofyears:"dayOfYear",dayofyear:"dayOfYear",h:"hour",hours:"hour",hour:"hour",ms:"millisecond",milliseconds:"millisecond",millisecond:"millisecond",m:"minute",minutes:"minute",minute:"minute",M:"month",months:"month",month:"month",Q:"quarter",quarters:"quarter",quarter:"quarter",s:"second",seconds:"second",second:"second",gg:"weekYear",weekyears:"weekYear",weekyear:"weekYear",GG:"isoWeekYear",isoweekyears:"isoWeekYear",isoweekyear:"isoWeekYear",w:"week",weeks:"week",week:"week",W:"isoWeek",isoweeks:"isoWeek",isoweek:"isoWeek",y:"year",years:"year",year:"year"};function Lc(e){return typeof e=="string"?yre[e]||yre[e.toLowerCase()]:void 0}function hQ(e){var t={},n,r;for(r in e)Jr(e,r)&&(n=Lc(r),n&&(t[n]=e[r]));return t}var Wyt={date:9,day:11,weekday:11,isoWeekday:11,dayOfYear:4,hour:13,millisecond:16,minute:14,month:8,quarter:7,second:15,weekYear:1,isoWeekYear:1,week:5,isoWeek:5,year:1};function Qyt(e){var t=[],n;for(n in e)Jr(e,n)&&t.push({unit:n,priority:Wyt[n]});return t.sort(function(r,i){return r.priority-i.priority}),t}var kbe=/\d/,Mu=/\d\d/,Cbe=/\d{3}/,pQ=/\d{4}/,JI=/[+-]?\d{6}/,Wi=/\d\d?/,Abe=/\d\d\d\d?/,_be=/\d\d\d\d\d\d?/,e6=/\d{1,3}/,mQ=/\d{1,4}/,t6=/[+-]?\d{1,6}/,KO=/\d+/,n6=/[+-]?\d+/,qyt=/Z|[+-]\d\d:?\d\d/gi,r6=/Z|[+-]\d\d(?::?\d\d)?/gi,Gyt=/[+-]?\d+(\.\d{1,3})?/,nk=/[0-9]{0,256}['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFF07\uFF10-\uFFEF]{1,256}|[\u0600-\u06FF\/]{1,256}(\s*?[\u0600-\u06FF]{1,256}){1,2}/i,JO=/^[1-9]\d?/,gQ=/^([1-9]\d|\d)/,u5;u5={};function bn(e,t,n){u5[e]=rh(t)?t:function(r,i){return r&&n?n:t}}function Yyt(e,t){return Jr(u5,e)?u5[e](t._strict,t._locale):new RegExp(Zyt(e))}function Zyt(e){return Gh(e.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,function(t,n,r,i,a){return n||r||i||a}))}function Gh(e){return e.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}function lc(e){return e<0?Math.ceil(e)||0:Math.floor(e)}function Nr(e){var t=+e,n=0;return t!==0&&isFinite(t)&&(n=lc(t)),n}var c9={};function vi(e,t){var n,r=t,i;for(typeof e=="string"&&(e=[e]),fp(t)&&(r=function(a,s){s[t]=Nr(a)}),i=e.length,n=0;n68?1900:2e3)};var Rbe=eS("FullYear",!0);function evt(){return i6(this.year())}function eS(e,t){return function(n){return n!=null?(Ibe(this,e,n),un.updateOffset(this,t),this):Ex(this,e)}}function Ex(e,t){if(!e.isValid())return NaN;var n=e._d,r=e._isUTC;switch(t){case"Milliseconds":return r?n.getUTCMilliseconds():n.getMilliseconds();case"Seconds":return r?n.getUTCSeconds():n.getSeconds();case"Minutes":return r?n.getUTCMinutes():n.getMinutes();case"Hours":return r?n.getUTCHours():n.getHours();case"Date":return r?n.getUTCDate():n.getDate();case"Day":return r?n.getUTCDay():n.getDay();case"Month":return r?n.getUTCMonth():n.getMonth();case"FullYear":return r?n.getUTCFullYear():n.getFullYear();default:return NaN}}function Ibe(e,t,n){var r,i,a,s,o;if(!(!e.isValid()||isNaN(n))){switch(r=e._d,i=e._isUTC,t){case"Milliseconds":return void(i?r.setUTCMilliseconds(n):r.setMilliseconds(n));case"Seconds":return void(i?r.setUTCSeconds(n):r.setSeconds(n));case"Minutes":return void(i?r.setUTCMinutes(n):r.setMinutes(n));case"Hours":return void(i?r.setUTCHours(n):r.setHours(n));case"Date":return void(i?r.setUTCDate(n):r.setDate(n));case"FullYear":break;default:return}a=n,s=e.month(),o=e.date(),o=o===29&&s===1&&!i6(a)?28:o,i?r.setUTCFullYear(a,s,o):r.setFullYear(a,s,o)}}function tvt(e){return e=Lc(e),rh(this[e])?this[e]():this}function nvt(e,t){if(typeof e=="object"){e=hQ(e);var n=Qyt(e),r,i=n.length;for(r=0;r=0?(o=new Date(e+400,t,n,r,i,a,s),isFinite(o.getFullYear())&&o.setFullYear(e)):o=new Date(e,t,n,r,i,a,s),o}function wx(e){var t,n;return e<100&&e>=0?(n=Array.prototype.slice.call(arguments),n[0]=e+400,t=new Date(Date.UTC.apply(null,n)),isFinite(t.getUTCFullYear())&&t.setUTCFullYear(e)):t=new Date(Date.UTC.apply(null,arguments)),t}function c5(e,t,n){var r=7+t-n,i=(7+wx(e,0,r).getUTCDay()-t)%7;return-i+r-1}function $be(e,t,n,r,i){var a=(7+n-r)%7,s=c5(e,r,i),o=1+7*(t-1)+a+s,l,u;return o<=0?(l=e-1,u=rw(l)+o):o>rw(e)?(l=e+1,u=o-rw(e)):(l=e,u=o),{year:l,dayOfYear:u}}function xx(e,t,n){var r=c5(e.year(),t,n),i=Math.floor((e.dayOfYear()-r-1)/7)+1,a,s;return i<1?(s=e.year()-1,a=i+Yh(s,t,n)):i>Yh(e.year(),t,n)?(a=i-Yh(e.year(),t,n),s=e.year()+1):(s=e.year(),a=i),{week:a,year:s}}function Yh(e,t,n){var r=c5(e,t,n),i=c5(e+1,t,n);return(rw(e)-r+i)/7}Un("w",["ww",2],"wo","week");Un("W",["WW",2],"Wo","isoWeek");bn("w",Wi,JO);bn("ww",Wi,Mu);bn("W",Wi,JO);bn("WW",Wi,Mu);rk(["w","ww","W","WW"],function(e,t,n,r){t[r.substr(0,1)]=Nr(e)});function mvt(e){return xx(e,this._week.dow,this._week.doy).week}var gvt={dow:0,doy:6};function bvt(){return this._week.dow}function yvt(){return this._week.doy}function vvt(e){var t=this.localeData().week(this);return e==null?t:this.add((e-t)*7,"d")}function Ovt(e){var t=xx(this,1,4).week;return e==null?t:this.add((e-t)*7,"d")}Un("d",0,"do","day");Un("dd",0,0,function(e){return this.localeData().weekdaysMin(this,e)});Un("ddd",0,0,function(e){return this.localeData().weekdaysShort(this,e)});Un("dddd",0,0,function(e){return this.localeData().weekdays(this,e)});Un("e",0,0,"weekday");Un("E",0,0,"isoWeekday");bn("d",Wi);bn("e",Wi);bn("E",Wi);bn("dd",function(e,t){return t.weekdaysMinRegex(e)});bn("ddd",function(e,t){return t.weekdaysShortRegex(e)});bn("dddd",function(e,t){return t.weekdaysRegex(e)});rk(["dd","ddd","dddd"],function(e,t,n,r){var i=n._locale.weekdaysParse(e,r,n._strict);i!=null?t.d=i:gr(n).invalidWeekday=e});rk(["d","e","E"],function(e,t,n,r){t[r]=Nr(e)});function Svt(e,t){return typeof e!="string"?e:isNaN(e)?(e=t.weekdaysParse(e),typeof e=="number"?e:null):parseInt(e,10)}function Evt(e,t){return typeof e=="string"?t.weekdaysParse(e)%7||7:isNaN(e)?null:e}function yQ(e,t){return e.slice(t,7).concat(e.slice(0,t))}var wvt="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),Fbe="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),xvt="Su_Mo_Tu_We_Th_Fr_Sa".split("_"),Tvt=nk,kvt=nk,Cvt=nk;function Avt(e,t){var n=Ed(this._weekdays)?this._weekdays:this._weekdays[e&&e!==!0&&this._weekdays.isFormat.test(t)?"format":"standalone"];return e===!0?yQ(n,this._week.dow):e?n[e.day()]:n}function _vt(e){return e===!0?yQ(this._weekdaysShort,this._week.dow):e?this._weekdaysShort[e.day()]:this._weekdaysShort}function Rvt(e){return e===!0?yQ(this._weekdaysMin,this._week.dow):e?this._weekdaysMin[e.day()]:this._weekdaysMin}function Ivt(e,t,n){var r,i,a,s=e.toLocaleLowerCase();if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],r=0;r<7;++r)a=nh([2e3,1]).day(r),this._minWeekdaysParse[r]=this.weekdaysMin(a,"").toLocaleLowerCase(),this._shortWeekdaysParse[r]=this.weekdaysShort(a,"").toLocaleLowerCase(),this._weekdaysParse[r]=this.weekdays(a,"").toLocaleLowerCase();return n?t==="dddd"?(i=Da.call(this._weekdaysParse,s),i!==-1?i:null):t==="ddd"?(i=Da.call(this._shortWeekdaysParse,s),i!==-1?i:null):(i=Da.call(this._minWeekdaysParse,s),i!==-1?i:null):t==="dddd"?(i=Da.call(this._weekdaysParse,s),i!==-1||(i=Da.call(this._shortWeekdaysParse,s),i!==-1)?i:(i=Da.call(this._minWeekdaysParse,s),i!==-1?i:null)):t==="ddd"?(i=Da.call(this._shortWeekdaysParse,s),i!==-1||(i=Da.call(this._weekdaysParse,s),i!==-1)?i:(i=Da.call(this._minWeekdaysParse,s),i!==-1?i:null)):(i=Da.call(this._minWeekdaysParse,s),i!==-1||(i=Da.call(this._weekdaysParse,s),i!==-1)?i:(i=Da.call(this._shortWeekdaysParse,s),i!==-1?i:null))}function Dvt(e,t,n){var r,i,a;if(this._weekdaysParseExact)return Ivt.call(this,e,t,n);for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),r=0;r<7;r++){if(i=nh([2e3,1]).day(r),n&&!this._fullWeekdaysParse[r]&&(this._fullWeekdaysParse[r]=new RegExp("^"+this.weekdays(i,"").replace(".","\\.?")+"$","i"),this._shortWeekdaysParse[r]=new RegExp("^"+this.weekdaysShort(i,"").replace(".","\\.?")+"$","i"),this._minWeekdaysParse[r]=new RegExp("^"+this.weekdaysMin(i,"").replace(".","\\.?")+"$","i")),this._weekdaysParse[r]||(a="^"+this.weekdays(i,"")+"|^"+this.weekdaysShort(i,"")+"|^"+this.weekdaysMin(i,""),this._weekdaysParse[r]=new RegExp(a.replace(".",""),"i")),n&&t==="dddd"&&this._fullWeekdaysParse[r].test(e))return r;if(n&&t==="ddd"&&this._shortWeekdaysParse[r].test(e))return r;if(n&&t==="dd"&&this._minWeekdaysParse[r].test(e))return r;if(!n&&this._weekdaysParse[r].test(e))return r}}function Nvt(e){if(!this.isValid())return e!=null?this:NaN;var t=Ex(this,"Day");return e!=null?(e=Svt(e,this.localeData()),this.add(e-t,"d")):t}function Pvt(e){if(!this.isValid())return e!=null?this:NaN;var t=(this.day()+7-this.localeData()._week.dow)%7;return e==null?t:this.add(e-t,"d")}function Mvt(e){if(!this.isValid())return e!=null?this:NaN;if(e!=null){var t=Evt(e,this.localeData());return this.day(this.day()%7?t:t-7)}else return this.day()||7}function Lvt(e){return this._weekdaysParseExact?(Jr(this,"_weekdaysRegex")||vQ.call(this),e?this._weekdaysStrictRegex:this._weekdaysRegex):(Jr(this,"_weekdaysRegex")||(this._weekdaysRegex=Tvt),this._weekdaysStrictRegex&&e?this._weekdaysStrictRegex:this._weekdaysRegex)}function $vt(e){return this._weekdaysParseExact?(Jr(this,"_weekdaysRegex")||vQ.call(this),e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex):(Jr(this,"_weekdaysShortRegex")||(this._weekdaysShortRegex=kvt),this._weekdaysShortStrictRegex&&e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex)}function Fvt(e){return this._weekdaysParseExact?(Jr(this,"_weekdaysRegex")||vQ.call(this),e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex):(Jr(this,"_weekdaysMinRegex")||(this._weekdaysMinRegex=Cvt),this._weekdaysMinStrictRegex&&e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex)}function vQ(){function e(c,f){return f.length-c.length}var t=[],n=[],r=[],i=[],a,s,o,l,u;for(a=0;a<7;a++)s=nh([2e3,1]).day(a),o=Gh(this.weekdaysMin(s,"")),l=Gh(this.weekdaysShort(s,"")),u=Gh(this.weekdays(s,"")),t.push(o),n.push(l),r.push(u),i.push(o),i.push(l),i.push(u);t.sort(e),n.sort(e),r.sort(e),i.sort(e),this._weekdaysRegex=new RegExp("^("+i.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp("^("+r.join("|")+")","i"),this._weekdaysShortStrictRegex=new RegExp("^("+n.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+t.join("|")+")","i")}function OQ(){return this.hours()%12||12}function Bvt(){return this.hours()||24}Un("H",["HH",2],0,"hour");Un("h",["hh",2],0,OQ);Un("k",["kk",2],0,Bvt);Un("hmm",0,0,function(){return""+OQ.apply(this)+jf(this.minutes(),2)});Un("hmmss",0,0,function(){return""+OQ.apply(this)+jf(this.minutes(),2)+jf(this.seconds(),2)});Un("Hmm",0,0,function(){return""+this.hours()+jf(this.minutes(),2)});Un("Hmmss",0,0,function(){return""+this.hours()+jf(this.minutes(),2)+jf(this.seconds(),2)});function Bbe(e,t){Un(e,0,0,function(){return this.localeData().meridiem(this.hours(),this.minutes(),t)})}Bbe("a",!0);Bbe("A",!1);function Ube(e,t){return t._meridiemParse}bn("a",Ube);bn("A",Ube);bn("H",Wi,gQ);bn("h",Wi,JO);bn("k",Wi,JO);bn("HH",Wi,Mu);bn("hh",Wi,Mu);bn("kk",Wi,Mu);bn("hmm",Abe);bn("hmmss",_be);bn("Hmm",Abe);bn("Hmmss",_be);vi(["H","HH"],as);vi(["k","kk"],function(e,t,n){var r=Nr(e);t[as]=r===24?0:r});vi(["a","A"],function(e,t,n){n._isPm=n._locale.isPM(e),n._meridiem=e});vi(["h","hh"],function(e,t,n){t[as]=Nr(e),gr(n).bigHour=!0});vi("hmm",function(e,t,n){var r=e.length-2;t[as]=Nr(e.substr(0,r)),t[fd]=Nr(e.substr(r)),gr(n).bigHour=!0});vi("hmmss",function(e,t,n){var r=e.length-4,i=e.length-2;t[as]=Nr(e.substr(0,r)),t[fd]=Nr(e.substr(r,2)),t[zh]=Nr(e.substr(i)),gr(n).bigHour=!0});vi("Hmm",function(e,t,n){var r=e.length-2;t[as]=Nr(e.substr(0,r)),t[fd]=Nr(e.substr(r))});vi("Hmmss",function(e,t,n){var r=e.length-4,i=e.length-2;t[as]=Nr(e.substr(0,r)),t[fd]=Nr(e.substr(r,2)),t[zh]=Nr(e.substr(i))});function Uvt(e){return(e+"").toLowerCase().charAt(0)==="p"}var zvt=/[ap]\.?m?\.?/i,jvt=eS("Hours",!0);function Hvt(e,t,n){return e>11?n?"pm":"PM":n?"am":"AM"}var zbe={calendar:Iyt,longDateFormat:Myt,invalidDate:$yt,ordinal:Byt,dayOfMonthOrdinalParse:Uyt,relativeTime:jyt,months:ivt,monthsShort:Dbe,week:gvt,weekdays:wvt,weekdaysMin:xvt,weekdaysShort:Fbe,meridiemParse:zvt},Yi={},jE={},Tx;function Vvt(e,t){var n,r=Math.min(e.length,t.length);for(n=0;n0;){if(i=a6(a.slice(0,n).join("-")),i)return i;if(r&&r.length>=n&&Vvt(a,r)>=n-1)break;n--}t++}return Tx}function Qvt(e){return!!(e&&e.match("^[^/\\\\]*$"))}function a6(e){var t=null,n;if(Yi[e]===void 0&&typeof f_<"u"&&f_&&f_.exports&&Qvt(e))try{t=Tx._abbr,n=require,n("./locale/"+e),Ym(t)}catch{Yi[e]=null}return Yi[e]}function Ym(e,t){var n;return e&&(pl(t)?n=wp(e):n=SQ(e,t),n?Tx=n:typeof console<"u"&&console.warn&&console.warn("Locale "+e+" not found. Did you forget to load it?")),Tx._abbr}function SQ(e,t){if(t!==null){var n,r=zbe;if(t.abbr=e,Yi[e]!=null)xbe("defineLocaleOverride","use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale See http://momentjs.com/guides/#/warnings/define-locale/ for more info."),r=Yi[e]._config;else if(t.parentLocale!=null)if(Yi[t.parentLocale]!=null)r=Yi[t.parentLocale]._config;else if(n=a6(t.parentLocale),n!=null)r=n._config;else return jE[t.parentLocale]||(jE[t.parentLocale]=[]),jE[t.parentLocale].push({name:e,config:t}),null;return Yi[e]=new dQ(l9(r,t)),jE[e]&&jE[e].forEach(function(i){SQ(i.name,i.config)}),Ym(e),Yi[e]}else return delete Yi[e],null}function qvt(e,t){if(t!=null){var n,r,i=zbe;Yi[e]!=null&&Yi[e].parentLocale!=null?Yi[e].set(l9(Yi[e]._config,t)):(r=a6(e),r!=null&&(i=r._config),t=l9(i,t),r==null&&(t.abbr=e),n=new dQ(t),n.parentLocale=Yi[e],Yi[e]=n),Ym(e)}else Yi[e]!=null&&(Yi[e].parentLocale!=null?(Yi[e]=Yi[e].parentLocale,e===Ym()&&Ym(e)):Yi[e]!=null&&delete Yi[e]);return Yi[e]}function wp(e){var t;if(e&&e._locale&&e._locale._abbr&&(e=e._locale._abbr),!e)return Tx;if(!Ed(e)){if(t=a6(e),t)return t;e=[e]}return Wvt(e)}function Gvt(){return u9(Yi)}function EQ(e){var t,n=e._a;return n&&gr(e).overflow===-2&&(t=n[Uh]<0||n[Uh]>11?Uh:n[vf]<1||n[vf]>bQ(n[Oo],n[Uh])?vf:n[as]<0||n[as]>24||n[as]===24&&(n[fd]!==0||n[zh]!==0||n[zg]!==0)?as:n[fd]<0||n[fd]>59?fd:n[zh]<0||n[zh]>59?zh:n[zg]<0||n[zg]>999?zg:-1,gr(e)._overflowDayOfYear&&(tvf)&&(t=vf),gr(e)._overflowWeeks&&t===-1&&(t=Kyt),gr(e)._overflowWeekday&&t===-1&&(t=Jyt),gr(e).overflow=t),e}var Yvt=/^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,Zvt=/^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d|))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,Xvt=/Z|[+-]\d\d(?::?\d\d)?/,YA=[["YYYYYY-MM-DD",/[+-]\d{6}-\d\d-\d\d/],["YYYY-MM-DD",/\d{4}-\d\d-\d\d/],["GGGG-[W]WW-E",/\d{4}-W\d\d-\d/],["GGGG-[W]WW",/\d{4}-W\d\d/,!1],["YYYY-DDD",/\d{4}-\d{3}/],["YYYY-MM",/\d{4}-\d\d/,!1],["YYYYYYMMDD",/[+-]\d{10}/],["YYYYMMDD",/\d{8}/],["GGGG[W]WWE",/\d{4}W\d{3}/],["GGGG[W]WW",/\d{4}W\d{2}/,!1],["YYYYDDD",/\d{7}/],["YYYYMM",/\d{6}/,!1],["YYYY",/\d{4}/,!1]],m7=[["HH:mm:ss.SSSS",/\d\d:\d\d:\d\d\.\d+/],["HH:mm:ss,SSSS",/\d\d:\d\d:\d\d,\d+/],["HH:mm:ss",/\d\d:\d\d:\d\d/],["HH:mm",/\d\d:\d\d/],["HHmmss.SSSS",/\d\d\d\d\d\d\.\d+/],["HHmmss,SSSS",/\d\d\d\d\d\d,\d+/],["HHmmss",/\d\d\d\d\d\d/],["HHmm",/\d\d\d\d/],["HH",/\d\d/]],Kvt=/^\/?Date\((-?\d+)/i,Jvt=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|([+-]\d{4}))$/,eOt={UT:0,GMT:0,EDT:-4*60,EST:-5*60,CDT:-5*60,CST:-6*60,MDT:-6*60,MST:-7*60,PDT:-7*60,PST:-8*60};function jbe(e){var t,n,r=e._i,i=Yvt.exec(r)||Zvt.exec(r),a,s,o,l,u=YA.length,c=m7.length;if(i){for(gr(e).iso=!0,t=0,n=u;trw(s)||e._dayOfYear===0)&&(gr(e)._overflowDayOfYear=!0),n=wx(s,0,e._dayOfYear),e._a[Uh]=n.getUTCMonth(),e._a[vf]=n.getUTCDate()),t=0;t<3&&e._a[t]==null;++t)e._a[t]=r[t]=i[t];for(;t<7;t++)e._a[t]=r[t]=e._a[t]==null?t===2?1:0:e._a[t];e._a[as]===24&&e._a[fd]===0&&e._a[zh]===0&&e._a[zg]===0&&(e._nextDay=!0,e._a[as]=0),e._d=(e._useUTC?wx:pvt).apply(null,r),a=e._useUTC?e._d.getUTCDay():e._d.getDay(),e._tzm!=null&&e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),e._nextDay&&(e._a[as]=24),e._w&&typeof e._w.d<"u"&&e._w.d!==a&&(gr(e).weekdayMismatch=!0)}}function lOt(e){var t,n,r,i,a,s,o,l,u;t=e._w,t.GG!=null||t.W!=null||t.E!=null?(a=1,s=4,n=my(t.GG,e._a[Oo],xx(Vi(),1,4).year),r=my(t.W,1),i=my(t.E,1),(i<1||i>7)&&(l=!0)):(a=e._locale._week.dow,s=e._locale._week.doy,u=xx(Vi(),a,s),n=my(t.gg,e._a[Oo],u.year),r=my(t.w,u.week),t.d!=null?(i=t.d,(i<0||i>6)&&(l=!0)):t.e!=null?(i=t.e+a,(t.e<0||t.e>6)&&(l=!0)):i=a),r<1||r>Yh(n,a,s)?gr(e)._overflowWeeks=!0:l!=null?gr(e)._overflowWeekday=!0:(o=$be(n,r,i,a,s),e._a[Oo]=o.year,e._dayOfYear=o.dayOfYear)}un.ISO_8601=function(){};un.RFC_2822=function(){};function xQ(e){if(e._f===un.ISO_8601){jbe(e);return}if(e._f===un.RFC_2822){Hbe(e);return}e._a=[],gr(e).empty=!0;var t=""+e._i,n,r,i,a,s,o=t.length,l=0,u,c;for(i=Tbe(e._f,e._locale).match(fQ)||[],c=i.length,n=0;n0&&gr(e).unusedInput.push(s),t=t.slice(t.indexOf(r)+r.length),l+=r.length),fv[a]?(r?gr(e).empty=!1:gr(e).unusedTokens.push(a),Xyt(a,r,e)):e._strict&&!r&&gr(e).unusedTokens.push(a);gr(e).charsLeftOver=o-l,t.length>0&&gr(e).unusedInput.push(t),e._a[as]<=12&&gr(e).bigHour===!0&&e._a[as]>0&&(gr(e).bigHour=void 0),gr(e).parsedDateParts=e._a.slice(0),gr(e).meridiem=e._meridiem,e._a[as]=uOt(e._locale,e._a[as],e._meridiem),u=gr(e).era,u!==null&&(e._a[Oo]=e._locale.erasConvertYear(u,e._a[Oo])),wQ(e),EQ(e)}function uOt(e,t,n){var r;return n==null?t:e.meridiemHour!=null?e.meridiemHour(t,n):(e.isPM!=null&&(r=e.isPM(n),r&&t<12&&(t+=12),!r&&t===12&&(t=0)),t)}function cOt(e){var t,n,r,i,a,s,o=!1,l=e._f.length;if(l===0){gr(e).invalidFormat=!0,e._d=new Date(NaN);return}for(i=0;ithis?this:e:KI()});function Qbe(e,t){var n,r;if(t.length===1&&Ed(t[0])&&(t=t[0]),!t.length)return Vi();for(n=t[0],r=1;rthis.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()}function IOt(){if(!pl(this._isDSTShifted))return this._isDSTShifted;var e={},t;return cQ(e,this),e=Vbe(e),e._a?(t=e._isUTC?nh(e._a):Vi(e._a),this._isDSTShifted=this.isValid()&&EOt(e._a,t.toArray())>0):this._isDSTShifted=!1,this._isDSTShifted}function DOt(){return this.isValid()?!this._isUTC:!1}function NOt(){return this.isValid()?this._isUTC:!1}function Gbe(){return this.isValid()?this._isUTC&&this._offset===0:!1}var POt=/^(-|\+)?(?:(\d*)[. ])?(\d+):(\d+)(?::(\d+)(\.\d*)?)?$/,MOt=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;function Md(e,t){var n=e,r=null,i,a,s;return t_(e)?n={ms:e._milliseconds,d:e._days,M:e._months}:fp(e)||!isNaN(+e)?(n={},t?n[t]=+e:n.milliseconds=+e):(r=POt.exec(e))?(i=r[1]==="-"?-1:1,n={y:0,d:Nr(r[vf])*i,h:Nr(r[as])*i,m:Nr(r[fd])*i,s:Nr(r[zh])*i,ms:Nr(d9(r[zg]*1e3))*i}):(r=MOt.exec(e))?(i=r[1]==="-"?-1:1,n={y:bg(r[2],i),M:bg(r[3],i),w:bg(r[4],i),d:bg(r[5],i),h:bg(r[6],i),m:bg(r[7],i),s:bg(r[8],i)}):n==null?n={}:typeof n=="object"&&("from"in n||"to"in n)&&(s=LOt(Vi(n.from),Vi(n.to)),n={},n.ms=s.milliseconds,n.M=s.months),a=new s6(n),t_(e)&&Jr(e,"_locale")&&(a._locale=e._locale),t_(e)&&Jr(e,"_isValid")&&(a._isValid=e._isValid),a}Md.fn=s6.prototype;Md.invalid=SOt;function bg(e,t){var n=e&&parseFloat(e.replace(",","."));return(isNaN(n)?0:n)*t}function Ore(e,t){var n={};return n.months=t.month()-e.month()+(t.year()-e.year())*12,e.clone().add(n.months,"M").isAfter(t)&&--n.months,n.milliseconds=+t-+e.clone().add(n.months,"M"),n}function LOt(e,t){var n;return e.isValid()&&t.isValid()?(t=kQ(t,e),e.isBefore(t)?n=Ore(e,t):(n=Ore(t,e),n.milliseconds=-n.milliseconds,n.months=-n.months),n):{milliseconds:0,months:0}}function Ybe(e,t){return function(n,r){var i,a;return r!==null&&!isNaN(+r)&&(xbe(t,"moment()."+t+"(period, number) is deprecated. Please use moment()."+t+"(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info."),a=n,n=r,r=a),i=Md(n,r),Zbe(this,i,e),this}}function Zbe(e,t,n,r){var i=t._milliseconds,a=d9(t._days),s=d9(t._months);e.isValid()&&(r=r??!0,s&&Pbe(e,Ex(e,"Month")+s*n),a&&Ibe(e,"Date",Ex(e,"Date")+a*n),i&&e._d.setTime(e._d.valueOf()+i*n),r&&un.updateOffset(e,a||s))}var $Ot=Ybe(1,"add"),FOt=Ybe(-1,"subtract");function Xbe(e){return typeof e=="string"||e instanceof String}function BOt(e){return wd(e)||ek(e)||Xbe(e)||fp(e)||zOt(e)||UOt(e)||e===null||e===void 0}function UOt(e){var t=e1(e)&&!lQ(e),n=!1,r=["years","year","y","months","month","M","days","day","d","dates","date","D","hours","hour","h","minutes","minute","m","seconds","second","s","milliseconds","millisecond","ms"],i,a,s=r.length;for(i=0;in.valueOf():n.valueOf()9999?e_(n,t?"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYYYY-MM-DD[T]HH:mm:ss.SSSZ"):rh(Date.prototype.toISOString)?t?this.toDate().toISOString():new Date(this.valueOf()+this.utcOffset()*60*1e3).toISOString().replace("Z",e_(n,"Z")):e_(n,t?"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYY-MM-DD[T]HH:mm:ss.SSSZ")}function tSt(){if(!this.isValid())return"moment.invalid(/* "+this._i+" */)";var e="moment",t="",n,r,i,a;return this.isLocal()||(e=this.utcOffset()===0?"moment.utc":"moment.parseZone",t="Z"),n="["+e+'("]',r=0<=this.year()&&this.year()<=9999?"YYYY":"YYYYYY",i="-MM-DD[T]HH:mm:ss.SSS",a=t+'[")]',this.format(n+r+i+a)}function nSt(e){e||(e=this.isUtc()?un.defaultFormatUtc:un.defaultFormat);var t=e_(this,e);return this.localeData().postformat(t)}function rSt(e,t){return this.isValid()&&(wd(e)&&e.isValid()||Vi(e).isValid())?Md({to:this,from:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()}function iSt(e){return this.from(Vi(),e)}function aSt(e,t){return this.isValid()&&(wd(e)&&e.isValid()||Vi(e).isValid())?Md({from:this,to:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()}function sSt(e){return this.to(Vi(),e)}function Kbe(e){var t;return e===void 0?this._locale._abbr:(t=wp(e),t!=null&&(this._locale=t),this)}var Jbe=Mc("moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.",function(e){return e===void 0?this.localeData():this.locale(e)});function eye(){return this._locale}var d5=1e3,hv=60*d5,f5=60*hv,tye=(365*400+97)*24*f5;function pv(e,t){return(e%t+t)%t}function nye(e,t,n){return e<100&&e>=0?new Date(e+400,t,n)-tye:new Date(e,t,n).valueOf()}function rye(e,t,n){return e<100&&e>=0?Date.UTC(e+400,t,n)-tye:Date.UTC(e,t,n)}function oSt(e){var t,n;if(e=Lc(e),e===void 0||e==="millisecond"||!this.isValid())return this;switch(n=this._isUTC?rye:nye,e){case"year":t=n(this.year(),0,1);break;case"quarter":t=n(this.year(),this.month()-this.month()%3,1);break;case"month":t=n(this.year(),this.month(),1);break;case"week":t=n(this.year(),this.month(),this.date()-this.weekday());break;case"isoWeek":t=n(this.year(),this.month(),this.date()-(this.isoWeekday()-1));break;case"day":case"date":t=n(this.year(),this.month(),this.date());break;case"hour":t=this._d.valueOf(),t-=pv(t+(this._isUTC?0:this.utcOffset()*hv),f5);break;case"minute":t=this._d.valueOf(),t-=pv(t,hv);break;case"second":t=this._d.valueOf(),t-=pv(t,d5);break}return this._d.setTime(t),un.updateOffset(this,!0),this}function lSt(e){var t,n;if(e=Lc(e),e===void 0||e==="millisecond"||!this.isValid())return this;switch(n=this._isUTC?rye:nye,e){case"year":t=n(this.year()+1,0,1)-1;break;case"quarter":t=n(this.year(),this.month()-this.month()%3+3,1)-1;break;case"month":t=n(this.year(),this.month()+1,1)-1;break;case"week":t=n(this.year(),this.month(),this.date()-this.weekday()+7)-1;break;case"isoWeek":t=n(this.year(),this.month(),this.date()-(this.isoWeekday()-1)+7)-1;break;case"day":case"date":t=n(this.year(),this.month(),this.date()+1)-1;break;case"hour":t=this._d.valueOf(),t+=f5-pv(t+(this._isUTC?0:this.utcOffset()*hv),f5)-1;break;case"minute":t=this._d.valueOf(),t+=hv-pv(t,hv)-1;break;case"second":t=this._d.valueOf(),t+=d5-pv(t,d5)-1;break}return this._d.setTime(t),un.updateOffset(this,!0),this}function uSt(){return this._d.valueOf()-(this._offset||0)*6e4}function cSt(){return Math.floor(this.valueOf()/1e3)}function dSt(){return new Date(this.valueOf())}function fSt(){var e=this;return[e.year(),e.month(),e.date(),e.hour(),e.minute(),e.second(),e.millisecond()]}function hSt(){var e=this;return{years:e.year(),months:e.month(),date:e.date(),hours:e.hours(),minutes:e.minutes(),seconds:e.seconds(),milliseconds:e.milliseconds()}}function pSt(){return this.isValid()?this.toISOString():null}function mSt(){return uQ(this)}function gSt(){return Dm({},gr(this))}function bSt(){return gr(this).overflow}function ySt(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}}Un("N",0,0,"eraAbbr");Un("NN",0,0,"eraAbbr");Un("NNN",0,0,"eraAbbr");Un("NNNN",0,0,"eraName");Un("NNNNN",0,0,"eraNarrow");Un("y",["y",1],"yo","eraYear");Un("y",["yy",2],0,"eraYear");Un("y",["yyy",3],0,"eraYear");Un("y",["yyyy",4],0,"eraYear");bn("N",CQ);bn("NN",CQ);bn("NNN",CQ);bn("NNNN",_St);bn("NNNNN",RSt);vi(["N","NN","NNN","NNNN","NNNNN"],function(e,t,n,r){var i=n._locale.erasParse(e,r,n._strict);i?gr(n).era=i:gr(n).invalidEra=e});bn("y",KO);bn("yy",KO);bn("yyy",KO);bn("yyyy",KO);bn("yo",ISt);vi(["y","yy","yyy","yyyy"],Oo);vi(["yo"],function(e,t,n,r){var i;n._locale._eraYearOrdinalRegex&&(i=e.match(n._locale._eraYearOrdinalRegex)),n._locale.eraYearOrdinalParse?t[Oo]=n._locale.eraYearOrdinalParse(e,i):t[Oo]=parseInt(e,10)});function vSt(e,t){var n,r,i,a=this._eras||wp("en")._eras;for(n=0,r=a.length;n=0)return a[r]}function SSt(e,t){var n=e.since<=e.until?1:-1;return t===void 0?un(e.since).year():un(e.since).year()+(t-e.offset)*n}function ESt(){var e,t,n,r=this.localeData().eras();for(e=0,t=r.length;ea&&(t=a),FSt.call(this,e,t,n,r,i))}function FSt(e,t,n,r,i){var a=$be(e,t,n,r,i),s=wx(a.year,0,a.dayOfYear);return this.year(s.getUTCFullYear()),this.month(s.getUTCMonth()),this.date(s.getUTCDate()),this}Un("Q",0,"Qo","quarter");bn("Q",kbe);vi("Q",function(e,t){t[Uh]=(Nr(e)-1)*3});function BSt(e){return e==null?Math.ceil((this.month()+1)/3):this.month((e-1)*3+this.month()%3)}Un("D",["DD",2],"Do","date");bn("D",Wi,JO);bn("DD",Wi,Mu);bn("Do",function(e,t){return e?t._dayOfMonthOrdinalParse||t._ordinalParse:t._dayOfMonthOrdinalParseLenient});vi(["D","DD"],vf);vi("Do",function(e,t){t[vf]=Nr(e.match(Wi)[0])});var aye=eS("Date",!0);Un("DDD",["DDDD",3],"DDDo","dayOfYear");bn("DDD",e6);bn("DDDD",Cbe);vi(["DDD","DDDD"],function(e,t,n){n._dayOfYear=Nr(e)});function USt(e){var t=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)+1;return e==null?t:this.add(e-t,"d")}Un("m",["mm",2],0,"minute");bn("m",Wi,gQ);bn("mm",Wi,Mu);vi(["m","mm"],fd);var zSt=eS("Minutes",!1);Un("s",["ss",2],0,"second");bn("s",Wi,gQ);bn("ss",Wi,Mu);vi(["s","ss"],zh);var jSt=eS("Seconds",!1);Un("S",0,0,function(){return~~(this.millisecond()/100)});Un(0,["SS",2],0,function(){return~~(this.millisecond()/10)});Un(0,["SSS",3],0,"millisecond");Un(0,["SSSS",4],0,function(){return this.millisecond()*10});Un(0,["SSSSS",5],0,function(){return this.millisecond()*100});Un(0,["SSSSSS",6],0,function(){return this.millisecond()*1e3});Un(0,["SSSSSSS",7],0,function(){return this.millisecond()*1e4});Un(0,["SSSSSSSS",8],0,function(){return this.millisecond()*1e5});Un(0,["SSSSSSSSS",9],0,function(){return this.millisecond()*1e6});bn("S",e6,kbe);bn("SS",e6,Mu);bn("SSS",e6,Cbe);var Nm,sye;for(Nm="SSSS";Nm.length<=9;Nm+="S")bn(Nm,KO);function HSt(e,t){t[zg]=Nr(("0."+e)*1e3)}for(Nm="S";Nm.length<=9;Nm+="S")vi(Nm,HSt);sye=eS("Milliseconds",!1);Un("z",0,0,"zoneAbbr");Un("zz",0,0,"zoneName");function VSt(){return this._isUTC?"UTC":""}function WSt(){return this._isUTC?"Coordinated Universal Time":""}var Vt=tk.prototype;Vt.add=$Ot;Vt.calendar=VOt;Vt.clone=WOt;Vt.diff=KOt;Vt.endOf=lSt;Vt.format=nSt;Vt.from=rSt;Vt.fromNow=iSt;Vt.to=aSt;Vt.toNow=sSt;Vt.get=tvt;Vt.invalidAt=bSt;Vt.isAfter=QOt;Vt.isBefore=qOt;Vt.isBetween=GOt;Vt.isSame=YOt;Vt.isSameOrAfter=ZOt;Vt.isSameOrBefore=XOt;Vt.isValid=mSt;Vt.lang=Jbe;Vt.locale=Kbe;Vt.localeData=eye;Vt.max=mOt;Vt.min=pOt;Vt.parsingFlags=gSt;Vt.set=nvt;Vt.startOf=oSt;Vt.subtract=FOt;Vt.toArray=fSt;Vt.toObject=hSt;Vt.toDate=dSt;Vt.toISOString=eSt;Vt.inspect=tSt;typeof Symbol<"u"&&Symbol.for!=null&&(Vt[Symbol.for("nodejs.util.inspect.custom")]=function(){return"Moment<"+this.format()+">"});Vt.toJSON=pSt;Vt.toString=JOt;Vt.unix=cSt;Vt.valueOf=uSt;Vt.creationData=ySt;Vt.eraName=ESt;Vt.eraNarrow=wSt;Vt.eraAbbr=xSt;Vt.eraYear=TSt;Vt.year=Rbe;Vt.isLeapYear=evt;Vt.weekYear=DSt;Vt.isoWeekYear=NSt;Vt.quarter=Vt.quarters=BSt;Vt.month=Mbe;Vt.daysInMonth=dvt;Vt.week=Vt.weeks=vvt;Vt.isoWeek=Vt.isoWeeks=Ovt;Vt.weeksInYear=LSt;Vt.weeksInWeekYear=$St;Vt.isoWeeksInYear=PSt;Vt.isoWeeksInISOWeekYear=MSt;Vt.date=aye;Vt.day=Vt.days=Nvt;Vt.weekday=Pvt;Vt.isoWeekday=Mvt;Vt.dayOfYear=USt;Vt.hour=Vt.hours=jvt;Vt.minute=Vt.minutes=zSt;Vt.second=Vt.seconds=jSt;Vt.millisecond=Vt.milliseconds=sye;Vt.utcOffset=xOt;Vt.utc=kOt;Vt.local=COt;Vt.parseZone=AOt;Vt.hasAlignedHourOffset=_Ot;Vt.isDST=ROt;Vt.isLocal=DOt;Vt.isUtcOffset=NOt;Vt.isUtc=Gbe;Vt.isUTC=Gbe;Vt.zoneAbbr=VSt;Vt.zoneName=WSt;Vt.dates=Mc("dates accessor is deprecated. Use date instead.",aye);Vt.months=Mc("months accessor is deprecated. Use month instead",Mbe);Vt.years=Mc("years accessor is deprecated. Use year instead",Rbe);Vt.zone=Mc("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",TOt);Vt.isDSTShifted=Mc("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",IOt);function QSt(e){return Vi(e*1e3)}function qSt(){return Vi.apply(null,arguments).parseZone()}function oye(e){return e}var ei=dQ.prototype;ei.calendar=Dyt;ei.longDateFormat=Lyt;ei.invalidDate=Fyt;ei.ordinal=zyt;ei.preparse=oye;ei.postformat=oye;ei.relativeTime=Hyt;ei.pastFuture=Vyt;ei.set=Ryt;ei.eras=vSt;ei.erasParse=OSt;ei.erasConvertYear=SSt;ei.erasAbbrRegex=CSt;ei.erasNameRegex=kSt;ei.erasNarrowRegex=ASt;ei.months=ovt;ei.monthsShort=lvt;ei.monthsParse=cvt;ei.monthsRegex=hvt;ei.monthsShortRegex=fvt;ei.week=mvt;ei.firstDayOfYear=yvt;ei.firstDayOfWeek=bvt;ei.weekdays=Avt;ei.weekdaysMin=Rvt;ei.weekdaysShort=_vt;ei.weekdaysParse=Dvt;ei.weekdaysRegex=Lvt;ei.weekdaysShortRegex=$vt;ei.weekdaysMinRegex=Fvt;ei.isPM=Uvt;ei.meridiem=Hvt;function h5(e,t,n,r){var i=wp(),a=nh().set(r,t);return i[n](a,e)}function lye(e,t,n){if(fp(e)&&(t=e,e=void 0),e=e||"",t!=null)return h5(e,t,n,"month");var r,i=[];for(r=0;r<12;r++)i[r]=h5(e,r,n,"month");return i}function _Q(e,t,n,r){typeof e=="boolean"?(fp(t)&&(n=t,t=void 0),t=t||""):(t=e,n=t,e=!1,fp(t)&&(n=t,t=void 0),t=t||"");var i=wp(),a=e?i._week.dow:0,s,o=[];if(n!=null)return h5(t,(n+a)%7,r,"day");for(s=0;s<7;s++)o[s]=h5(t,(s+a)%7,r,"day");return o}function GSt(e,t){return lye(e,t,"months")}function YSt(e,t){return lye(e,t,"monthsShort")}function ZSt(e,t,n){return _Q(e,t,n,"weekdays")}function XSt(e,t,n){return _Q(e,t,n,"weekdaysShort")}function KSt(e,t,n){return _Q(e,t,n,"weekdaysMin")}Ym("en",{eras:[{since:"0001-01-01",until:1/0,offset:1,name:"Anno Domini",narrow:"AD",abbr:"AD"},{since:"0000-12-31",until:-1/0,offset:1,name:"Before Christ",narrow:"BC",abbr:"BC"}],dayOfMonthOrdinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(e){var t=e%10,n=Nr(e%100/10)===1?"th":t===1?"st":t===2?"nd":t===3?"rd":"th";return e+n}});un.lang=Mc("moment.lang is deprecated. Use moment.locale instead.",Ym);un.langData=Mc("moment.langData is deprecated. Use moment.localeData instead.",wp);var kh=Math.abs;function JSt(){var e=this._data;return this._milliseconds=kh(this._milliseconds),this._days=kh(this._days),this._months=kh(this._months),e.milliseconds=kh(e.milliseconds),e.seconds=kh(e.seconds),e.minutes=kh(e.minutes),e.hours=kh(e.hours),e.months=kh(e.months),e.years=kh(e.years),this}function uye(e,t,n,r){var i=Md(t,n);return e._milliseconds+=r*i._milliseconds,e._days+=r*i._days,e._months+=r*i._months,e._bubble()}function eEt(e,t){return uye(this,e,t,1)}function tEt(e,t){return uye(this,e,t,-1)}function Sre(e){return e<0?Math.floor(e):Math.ceil(e)}function nEt(){var e=this._milliseconds,t=this._days,n=this._months,r=this._data,i,a,s,o,l;return e>=0&&t>=0&&n>=0||e<=0&&t<=0&&n<=0||(e+=Sre(h9(n)+t)*864e5,t=0,n=0),r.milliseconds=e%1e3,i=lc(e/1e3),r.seconds=i%60,a=lc(i/60),r.minutes=a%60,s=lc(a/60),r.hours=s%24,t+=lc(s/24),l=lc(cye(t)),n+=l,t-=Sre(h9(l)),o=lc(n/12),n%=12,r.days=t,r.months=n,r.years=o,this}function cye(e){return e*4800/146097}function h9(e){return e*146097/4800}function rEt(e){if(!this.isValid())return NaN;var t,n,r=this._milliseconds;if(e=Lc(e),e==="month"||e==="quarter"||e==="year")switch(t=this._days+r/864e5,n=this._months+cye(t),e){case"month":return n;case"quarter":return n/3;case"year":return n/12}else switch(t=this._days+Math.round(h9(this._months)),e){case"week":return t/7+r/6048e5;case"day":return t+r/864e5;case"hour":return t*24+r/36e5;case"minute":return t*1440+r/6e4;case"second":return t*86400+r/1e3;case"millisecond":return Math.floor(t*864e5)+r;default:throw new Error("Unknown unit "+e)}}function xp(e){return function(){return this.as(e)}}var dye=xp("ms"),iEt=xp("s"),aEt=xp("m"),sEt=xp("h"),oEt=xp("d"),lEt=xp("w"),uEt=xp("M"),cEt=xp("Q"),dEt=xp("y"),fEt=dye;function hEt(){return Md(this)}function pEt(e){return e=Lc(e),this.isValid()?this[e+"s"]():NaN}function B1(e){return function(){return this.isValid()?this._data[e]:NaN}}var mEt=B1("milliseconds"),gEt=B1("seconds"),bEt=B1("minutes"),yEt=B1("hours"),vEt=B1("days"),OEt=B1("months"),SEt=B1("years");function EEt(){return lc(this.days()/7)}var Rh=Math.round,By={ss:44,s:45,m:45,h:22,d:26,w:null,M:11};function wEt(e,t,n,r,i){return i.relativeTime(t||1,!!n,e,r)}function xEt(e,t,n,r){var i=Md(e).abs(),a=Rh(i.as("s")),s=Rh(i.as("m")),o=Rh(i.as("h")),l=Rh(i.as("d")),u=Rh(i.as("M")),c=Rh(i.as("w")),f=Rh(i.as("y")),h=a<=n.ss&&["s",a]||a0,h[4]=r,wEt.apply(null,h)}function TEt(e){return e===void 0?Rh:typeof e=="function"?(Rh=e,!0):!1}function kEt(e,t){return By[e]===void 0?!1:t===void 0?By[e]:(By[e]=t,e==="s"&&(By.ss=t-1),!0)}function CEt(e,t){if(!this.isValid())return this.localeData().invalidDate();var n=!1,r=By,i,a;return typeof e=="object"&&(t=e,e=!1),typeof e=="boolean"&&(n=e),typeof t=="object"&&(r=Object.assign({},By,t),t.s!=null&&t.ss==null&&(r.ss=t.s-1)),i=this.localeData(),a=xEt(this,!n,r,i),n&&(a=i.pastFuture(+this,a)),i.postformat(a)}var g7=Math.abs;function ty(e){return(e>0)-(e<0)||+e}function l6(){if(!this.isValid())return this.localeData().invalidDate();var e=g7(this._milliseconds)/1e3,t=g7(this._days),n=g7(this._months),r,i,a,s,o=this.asSeconds(),l,u,c,f;return o?(r=lc(e/60),i=lc(r/60),e%=60,r%=60,a=lc(n/12),n%=12,s=e?e.toFixed(3).replace(/\.?0+$/,""):"",l=o<0?"-":"",u=ty(this._months)!==ty(o)?"-":"",c=ty(this._days)!==ty(o)?"-":"",f=ty(this._milliseconds)!==ty(o)?"-":"",l+"P"+(a?u+a+"Y":"")+(n?u+n+"M":"")+(t?c+t+"D":"")+(i||r||e?"T":"")+(i?f+i+"H":"")+(r?f+r+"M":"")+(e?f+s+"S":"")):"P0D"}var Wr=s6.prototype;Wr.isValid=OOt;Wr.abs=JSt;Wr.add=eEt;Wr.subtract=tEt;Wr.as=rEt;Wr.asMilliseconds=dye;Wr.asSeconds=iEt;Wr.asMinutes=aEt;Wr.asHours=sEt;Wr.asDays=oEt;Wr.asWeeks=lEt;Wr.asMonths=uEt;Wr.asQuarters=cEt;Wr.asYears=dEt;Wr.valueOf=fEt;Wr._bubble=nEt;Wr.clone=hEt;Wr.get=pEt;Wr.milliseconds=mEt;Wr.seconds=gEt;Wr.minutes=bEt;Wr.hours=yEt;Wr.days=vEt;Wr.weeks=EEt;Wr.months=OEt;Wr.years=SEt;Wr.humanize=CEt;Wr.toISOString=l6;Wr.toString=l6;Wr.toJSON=l6;Wr.locale=Kbe;Wr.localeData=eye;Wr.toIsoString=Mc("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",l6);Wr.lang=Jbe;Un("X",0,0,"unix");Un("x",0,0,"valueOf");bn("x",n6);bn("X",Gyt);vi("X",function(e,t,n){n._d=new Date(parseFloat(e)*1e3)});vi("x",function(e,t,n){n._d=new Date(Nr(e))});//! moment.js +un.version="2.30.1";Ayt(Vi);un.fn=Vt;un.min=gOt;un.max=bOt;un.now=yOt;un.utc=nh;un.unix=QSt;un.months=GSt;un.isDate=ek;un.locale=Ym;un.invalid=KI;un.duration=Md;un.isMoment=wd;un.weekdays=ZSt;un.parseZone=qSt;un.localeData=wp;un.isDuration=t_;un.monthsShort=YSt;un.weekdaysMin=KSt;un.defineLocale=SQ;un.updateLocale=qvt;un.locales=Gvt;un.weekdaysShort=XSt;un.normalizeUnits=Lc;un.relativeTimeRounding=TEt;un.relativeTimeThreshold=kEt;un.calendarFormat=HOt;un.prototype=Vt;un.HTML5_FMT={DATETIME_LOCAL:"YYYY-MM-DDTHH:mm",DATETIME_LOCAL_SECONDS:"YYYY-MM-DDTHH:mm:ss",DATETIME_LOCAL_MS:"YYYY-MM-DDTHH:mm:ss.SSS",DATE:"YYYY-MM-DD",TIME:"HH:mm",TIME_SECONDS:"HH:mm:ss",TIME_MS:"HH:mm:ss.SSS",WEEK:"GGGG-[W]WW",MONTH:"YYYY-MM"};var RQ={},AEt=ca;Object.defineProperty(RQ,"__esModule",{value:!0});var fye=RQ.default=void 0,_Et=AEt(da()),Ere=I;fye=RQ.default=(0,_Et.default)([(0,Ere.jsx)("path",{d:"M11.99 2C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2M12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8"},"0"),(0,Ere.jsx)("path",{d:"M12.5 7H11v6l5.25 3.15.75-1.23-4.5-2.67z"},"1")],"AccessTime");function REt(e){const{document:t}=e,n=Wf(),r=x0(),i=()=>{n(`/${r.workspaceSlug}/${t.id}`)};return I.jsx(hF,{sx:{width:"100%"},children:I.jsx(Qoe,{onClick:i,children:I.jsxs(VIe,{children:[I.jsx(xr,{variant:"h5",component:"div",noWrap:!0,children:t.title}),I.jsxs(lr,{direction:"row",alignItems:"center",gap:1,children:[I.jsx(fye,{fontSize:"small",sx:{color:"text.secondary"}}),I.jsxs(xr,{variant:"body2",color:"text.secondary",noWrap:!0,children:["Changed ",un(t.updatedAt).fromNow()]})]})]})})})}function IEt(){const e=x0(),t=Wf(),{data:n}=QF(e.workspaceSlug),{data:r,fetchNextPage:i,hasNextPage:a}=dUe(n==null?void 0:n.id),{mutateAsync:s}=hUe((n==null?void 0:n.id)||""),[o,l]=N.useState(!1),u=N.useMemo(()=>(r==null?void 0:r.pages.reduce((h,g)=>h.concat(g.documents),[]))??[],[r==null?void 0:r.pages]),c=()=>{l(h=>!h)},f=async h=>{const g=await s(h);t(g.id)};return I.jsxs(lr,{gap:2,children:[I.jsxs(lr,{direction:"row",justifyContent:"space-between",alignItems:"center",px:2,children:[I.jsxs(xr,{variant:"h5",fontWeight:"bold",children:[n==null?void 0:n.title," ",I.jsx(xr,{component:"span",variant:"inherit",color:"primary",children:r==null?void 0:r.pages[0].totalLength})]}),I.jsx(Ws,{variant:"contained",startIcon:I.jsx(ZI,{}),onClick:c,children:"New Note"})]}),I.jsx(lr,{style:{maxHeight:"calc(100vh - 144px)",overflow:"auto"},children:I.jsx(Sx,{pageStart:0,loadMore:()=>i(),hasMore:a,loader:I.jsx(lr,{className:"loader",alignItems:"center",children:I.jsx(bp,{size:20})},0),useWindow:!1,children:I.jsx(Ts,{p:2,width:1,children:I.jsx(_y,{container:!0,spacing:{xs:2,md:3},columns:{xs:4,sm:8,md:12,lg:12},children:u.map(h=>I.jsx(_y,{item:!0,xs:4,sm:4,md:4,lg:3,children:I.jsx(REt,{document:h})},h.id))})})})}),I.jsx(ybe,{open:o,title:"Note",onSuccess:f,onClose:c})]})}function DEt(){const e=jle();return I.jsx(lr,{width:1,height:"100vh",alignItems:"center",justifyContent:"center",children:I.jsxs(lr,{alignItems:"center",children:[I.jsx(xr,{variant:"h5",children:"Something went wrong"}),wF(e)&&I.jsxs(xr,{variant:"subtitle1",children:["Status Code: ",e.status]})]})})}function NEt(){const e=x0(),t=Wf(),{mutateAsync:n}=SUe();return N.useEffect(()=>{e.invitationToken&&n({invitationToken:e.invitationToken}).then(r=>{t(`/${r.slug}`)})},[n,t,e.invitationToken]),I.jsx(aT,{open:!0,children:I.jsx(bp,{color:"inherit"})})}var PEt=function(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=e,n.c=t,n.d=function(r,i,a){n.o(r,i)||Object.defineProperty(r,i,{enumerable:!0,get:a})},n.r=function(r){typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(r,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(r,"__esModule",{value:!0})},n.t=function(r,i){if(1&i&&(r=n(r)),8&i||4&i&&typeof r=="object"&&r&&r.__esModule)return r;var a=Object.create(null);if(n.r(a),Object.defineProperty(a,"default",{enumerable:!0,value:r}),2&i&&typeof r!="string")for(var s in r)n.d(a,s,(function(o){return r[o]}).bind(null,s));return a},n.n=function(r){var i=r&&r.__esModule?function(){return r.default}:function(){return r};return n.d(i,"a",i),i},n.o=function(r,i){return Object.prototype.hasOwnProperty.call(r,i)},n.p="",n(n.s=4)}([function(e,t,n){e.exports=n(2)()},function(e,t){e.exports=N},function(e,t,n){var r=n(3);function i(){}function a(){}a.resetWarningCache=i,e.exports=function(){function s(u,c,f,h,g,b){if(b!==r){var S=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw S.name="Invariant Violation",S}}function o(){return s}s.isRequired=s;var l={array:s,bool:s,func:s,number:s,object:s,string:s,symbol:s,any:s,arrayOf:o,element:s,elementType:s,instanceOf:o,node:s,objectOf:o,oneOf:o,oneOfType:o,shape:o,exact:o,checkPropTypes:a,resetWarningCache:i};return l.PropTypes=l,l}},function(e,t,n){e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},function(e,t,n){n.r(t),n.d(t,"FacebookLoginButton",function(){return K}),n.d(t,"GoogleLoginButton",function(){return z}),n.d(t,"GithubLoginButton",function(){return ee}),n.d(t,"TwitterLoginButton",function(){return ie}),n.d(t,"AmazonLoginButton",function(){return qe}),n.d(t,"InstagramLoginButton",function(){return tt}),n.d(t,"LinkedInLoginButton",function(){return et}),n.d(t,"MicrosoftLoginButton",function(){return Je}),n.d(t,"BufferLoginButton",function(){return he}),n.d(t,"TelegramLoginButton",function(){return We}),n.d(t,"AppleLoginButton",function(){return ve}),n.d(t,"DiscordLoginButton",function(){return vt}),n.d(t,"OktaLoginButton",function(){return gt}),n.d(t,"SlackLoginButton",function(){return wt}),n.d(t,"YahooLoginButton",function(){return $n}),n.d(t,"createButton",function(){return Z}),n.d(t,"createSvgIcon",function(){return H}),n.d(t,"ZaloLoginButton",function(){return Ur}),n.d(t,"TikTokLoginButton",function(){return lt}),n.d(t,"MetamaskLoginButton",function(){return yn});var r={};n.r(r),n.d(r,"FacebookLoginButton",function(){return K}),n.d(r,"GoogleLoginButton",function(){return z}),n.d(r,"GithubLoginButton",function(){return ee}),n.d(r,"TwitterLoginButton",function(){return ie}),n.d(r,"AmazonLoginButton",function(){return qe}),n.d(r,"InstagramLoginButton",function(){return tt}),n.d(r,"LinkedInLoginButton",function(){return et}),n.d(r,"MicrosoftLoginButton",function(){return Je}),n.d(r,"BufferLoginButton",function(){return he}),n.d(r,"TelegramLoginButton",function(){return We}),n.d(r,"AppleLoginButton",function(){return ve}),n.d(r,"DiscordLoginButton",function(){return vt}),n.d(r,"OktaLoginButton",function(){return gt}),n.d(r,"SlackLoginButton",function(){return wt}),n.d(r,"YahooLoginButton",function(){return $n}),n.d(r,"createButton",function(){return Z}),n.d(r,"createSvgIcon",function(){return H}),n.d(r,"ZaloLoginButton",function(){return Ur}),n.d(r,"TikTokLoginButton",function(){return lt}),n.d(r,"MetamaskLoginButton",function(){return yn});var i=n(1),a=n.n(i),s=n(0),o=n.n(s),l=function(Qe){var Ye=Qe.name,ot=Qe.size,yt=Qe.format;return a.a.createElement("i",{className:yt(Ye),style:{fontSize:ot}})};l.propTypes={format:o.a.func,name:o.a.string.isRequired,size:o.a.oneOfType([o.a.string,o.a.number]).isRequired},l.defaultProps={format:function(Qe){return"demo-icon icon-".concat(Qe)},size:26};var u=l,c=function(Qe){var Ye=Qe.type,ot=Qe.size,yt=Qe.format,Yn=Qe.color,pn=Yn===void 0?"#FFFFFF":Yn;return typeof Ye=="string"?a.a.createElement(u,{format:yt,name:Ye,size:ot}):a.a.createElement(Ye,{size:ot,color:pn})};c.propTypes={format:o.a.func,size:o.a.oneOfType([o.a.number,o.a.string]),type:o.a.oneOfType([o.a.string,o.a.node,o.a.func]),color:o.a.string};var f=c;function h(Qe,Ye){var ot=Object.keys(Qe);if(Object.getOwnPropertySymbols){var yt=Object.getOwnPropertySymbols(Qe);Ye&&(yt=yt.filter(function(Yn){return Object.getOwnPropertyDescriptor(Qe,Yn).enumerable})),ot.push.apply(ot,yt)}return ot}function g(Qe){for(var Ye=1;Ye"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}();return function(){var ot,yt=R(Qe);if(Ye){var Yn=R(this).constructor;ot=Reflect.construct(yt,arguments,Yn)}else ot=yt.apply(this,arguments);return C(this,ot)}}function C(Qe,Ye){return!Ye||S(Ye)!=="object"&&typeof Ye!="function"?function(ot){if(ot===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return ot}(Qe):Ye}function R(Qe){return(R=Object.setPrototypeOf?Object.getPrototypeOf:function(Ye){return Ye.__proto__||Object.getPrototypeOf(Ye)})(Qe)}var A=function(Qe){(function(pn,Fn){if(typeof Fn!="function"&&Fn!==null)throw new TypeError("Super expression must either be null or a function");pn.prototype=Object.create(Fn&&Fn.prototype,{constructor:{value:pn,writable:!0,configurable:!0}}),Fn&&x(pn,Fn)})(Yn,Qe);var Ye,ot,yt=k(Yn);function Yn(pn){var Fn;return function(Pi,nt){if(!(Pi instanceof nt))throw new TypeError("Cannot call a class as a function")}(this,Yn),(Fn=yt.call(this,pn)).state={focused:!1,hovered:!1},Fn.handleMouseEnter=function(){Fn.setState({hovered:!0}),typeof Fn.props.onMouseEnter=="function"&&Fn.props.onMouseEnter()},Fn.handleMouseLeave=function(){Fn.setState({hovered:!1}),typeof Fn.props.onMouseLeave=="function"&&Fn.props.onMouseLeave()},Fn.handleFocus=function(){Fn.setState({focused:!0})},Fn.handleBlur=function(){Fn.setState({focused:!1})},Fn.handleClick=function(Pi){typeof Fn.props.onClick=="function"&&Fn.props.onClick(Pi)},Fn}return Ye=Yn,(ot=[{key:"render",value:function(){var pn=this.props,Fn=pn.activeStyle,Pi=pn.align,nt=pn.text,Be=pn.children,Dt=Be===void 0?nt:Be,en=pn.className,Vn=pn.icon,Zr=pn.iconFormat,Er=pn.iconSize,In=pn.iconColor,Wn=In===void 0?"#FFFFFF":In,ti=pn.preventActiveStyles,qa=pn.size,Fc=pn.style,kp=pn.disabled,H1=this.state,V1=H1.focused,W1=H1.hovered,Q1=B(L.button,{activeStyle:ti?Fc:Fn,customStyle:Fc,active:W1||V1,size:qa});return a.a.createElement("button",E({type:"button",style:Q1,onClick:this.handleClick,onMouseEnter:this.handleMouseEnter,onMouseLeave:this.handleMouseLeave,onFocus:this.handleFocus,onBlur:this.handleBlur},{className:en},{disabled:kp}),a.a.createElement("div",{style:L.flex},!D(Er)&&a.a.createElement("div",{style:{display:"flex",justifyContent:"center",minWidth:Er}},a.a.createElement(f,{type:Vn,size:Er,format:Zr,color:Wn})),!D(Er)&&a.a.createElement("div",{style:L.divider}),a.a.createElement("div",{style:{textAlign:Pi,width:"100%"}},Dt)))}}])&&w(Ye.prototype,ot),Yn}(i.Component),D=function(Qe){return Qe==="0"||Qe==="0px"||Qe===0},B=function(Qe,Ye){var ot=Ye.size,yt=Ye.customStyle,Yn=Ye.active,pn=Ye.activeStyle;return g(g(g({},Qe),{},{height:ot},yt),Yn&&pn)};A.propTypes={activeStyle:o.a.object,align:o.a.oneOf(["left","right","center"]),children:o.a.node,className:o.a.string,icon:o.a.oneOfType([o.a.string,o.a.node,o.a.func]),iconFormat:o.a.func,iconSize:o.a.string,iconColor:o.a.string,onClick:o.a.func,onMouseEnter:o.a.func,onMouseLeave:o.a.func,preventActiveStyles:o.a.bool,size:o.a.string,style:o.a.object,text:o.a.string,disabled:o.a.bool},A.defaultProps={align:"left",iconSize:"26px",preventActiveStyles:!1,size:"50px"};var L={button:{display:"block",border:0,borderRadius:3,boxShadow:"rgba(0, 0, 0, 0.5) 0 1px 2px",color:"#ffffff",cursor:"pointer",fontSize:"19px",margin:"5px",width:"calc(100% - 10px)",overflow:"hidden",padding:"0 10px",userSelect:"none"},divider:{width:"10px"},flex:{alignItems:"center",display:"flex",height:"100%"}};function F(Qe,Ye){var ot=Object.keys(Qe);if(Object.getOwnPropertySymbols){var yt=Object.getOwnPropertySymbols(Qe);Ye&&(yt=yt.filter(function(Yn){return Object.getOwnPropertyDescriptor(Qe,Yn).enumerable})),ot.push.apply(ot,yt)}return ot}function W(Qe){for(var Ye=1;Ye{window.location.href=`https://codepair-api.yorkie.dev/auth/login/${t}`};return I.jsx(qoe,{sx:{height:1},children:I.jsx(lr,{alignItems:"center",justifyContent:"center",sx:{height:1},children:I.jsx(Zs,{sx:{p:5,width:"small",boxShadow:2,maxWidth:"80%"},children:I.jsxs(lr,{gap:4,children:[I.jsxs(Ts,{children:[I.jsxs(lr,{direction:"row",gap:1,children:[I.jsx(hbe,{}),I.jsx(xr,{variant:"h6",children:"Login"})]}),I.jsx(xr,{variant:"body2",color:"text.secondary",maxWidth:320,children:"Real-time markdown editor for interviews, meetings and more..."})]}),I.jsxs(lr,{gap:2,children:[I.jsxs(_y,{container:!0,spacing:1,alignItems:"center",children:[I.jsx(_y,{item:!0,xs:!0,children:I.jsx(c1,{sx:{width:1}})}),I.jsx(_y,{item:!0,xs:"auto",children:I.jsx(xr,{variant:"body2",color:"text.secondary",children:"Login with"})}),I.jsx(_y,{item:!0,xs:!0,children:I.jsx(c1,{sx:{width:1}})})]}),MEt.map(({SocailLoginComponent:t,provider:n})=>I.jsx(t,{size:"48px",onClick:()=>e(n)},n))]})]})})})})}var IQ={},$Et=ca;Object.defineProperty(IQ,"__esModule",{value:!0});var hye=IQ.default=void 0,FEt=$Et(da()),BEt=I;hye=IQ.default=(0,FEt.default)((0,BEt.jsx)("path",{d:"M3 17.25V21h3.75L17.81 9.94l-3.75-3.75zM20.71 7.04c.39-.39.39-1.02 0-1.41l-2.34-2.34a.9959.9959 0 0 0-1.41 0l-1.83 1.83 3.75 3.75z"}),"Edit");var DQ={},UEt=ca;Object.defineProperty(DQ,"__esModule",{value:!0});var pye=DQ.default=void 0,zEt=UEt(da()),jEt=I;pye=DQ.default=(0,zEt.default)((0,jEt.jsx)("path",{d:"M3 15h8v-2H3zm0 4h8v-2H3zm0-8h8V9H3zm0-6v2h8V5zm10 0h8v14h-8z"}),"VerticalSplit");function HEt(){const e=Du(),t=kT(),n=()=>{e(iue(t=="light"?"dark":"light"))};return I.jsx(wa,{onClick:n,color:"inherit",children:t==="light"?I.jsx(KW,{}):I.jsx(ZW,{})})}var NQ={},VEt=ca;Object.defineProperty(NQ,"__esModule",{value:!0});var mye=NQ.default=void 0,WEt=VEt(da()),QEt=I;mye=NQ.default=(0,WEt.default)((0,QEt.jsx)("path",{d:"M18 16.08c-.76 0-1.44.3-1.96.77L8.91 12.7c.05-.23.09-.46.09-.7s-.04-.47-.09-.7l7.05-4.11c.54.5 1.25.81 2.04.81 1.66 0 3-1.34 3-3s-1.34-3-3-3-3 1.34-3 3c0 .24.04.47.09.7L8.04 9.81C7.5 9.31 6.79 9 6 9c-1.66 0-3 1.34-3 3s1.34 3 3 3c.79 0 1.5-.31 2.04-.81l7.12 4.16c-.05.21-.08.43-.08.65 0 1.61 1.31 2.92 2.92 2.92 1.61 0 2.92-1.31 2.92-2.92s-1.31-2.92-2.92-2.92"}),"Share");const mv=["No Limit","30 minutes","1 hour","8 hours","24 hours","7 days"];var p9=(e=>(e.READ="READ",e.EDIT="EDIT",e))(p9||{});function qEt(e){var c,f;const{...t}=e,n=x0(),[r,i]=N.useState(null),a=pi(WF),{mutateAsync:s}=pUe(((c=a.data)==null?void 0:c.workspaceId)||"",((f=a.data)==null?void 0:f.id)||""),{enqueueSnackbar:o}=YI(),l=async h=>{let g;if(h.expiredString===mv[0])g=null;else{const[S,E]=h.expiredString.split(" ");g=un().add(Number(S),E).toDate()}const{sharingToken:b}=await s({role:h.role,expiredAt:g});i(`${window.location.origin}/${n.workspaceSlug}/${n.documentId}/share?token=${b}`)},u=async()=>{r&&(await F1.write(r),o("URL Copied!",{variant:"success"}))};return I.jsx(S0,{disableAutoFocus:!0,...t,children:I.jsxs(Zs,{sx:{position:"absolute",top:"50%",left:"50%",transform:"translate(-50%, -50%)",p:4,width:400},children:[I.jsx(wa,{sx:{position:"absolute",top:28,right:28},onClick:h=>{var g;return(g=e.onClose)==null?void 0:g.call(e,h,"backdropClick")},children:I.jsx(XI,{})}),I.jsxs(lr,{gap:1,children:[I.jsx(xr,{variant:"subtitle1",children:"Share Link"}),I.jsx(kd,{children:I.jsx(JT,{defaultValues:{expiredString:mv[0],role:Object.values(p9)[0]},onSuccess:l,children:I.jsxs(lr,{gap:2,children:[I.jsx(s9,{label:"Role",name:"role",options:Object.values(p9).map(h=>({id:h,label:h})),size:"small",sx:{width:1},variant:"filled"}),I.jsx(s9,{label:"Expired Date",name:"expiredString",options:mv.map(h=>({id:h,label:h})),size:"small",sx:{width:1},variant:"filled"}),I.jsx(Ws,{type:"submit",variant:"contained",children:"Generate"})]})})}),!!r&&I.jsxs(lr,{direction:"row",alignItems:"center",gap:2,children:[I.jsx(xr,{variant:"body1",width:1,noWrap:!0,children:r}),I.jsx(wg,{title:"Copy URL",children:I.jsx(wa,{onClick:u,children:I.jsx(UI,{})})})]})]})]})})}function GEt(){const[e,t]=N.useState(!1),n=()=>{t(r=>!r)};return I.jsxs(I.Fragment,{children:[I.jsx(wa,{onClick:n,color:"inherit",children:I.jsx(mye,{})}),I.jsx(qEt,{open:e,onClose:n})]})}var PQ={},YEt=ca;Object.defineProperty(PQ,"__esModule",{value:!0});var gye=PQ.default=void 0,ZEt=YEt(da()),XEt=I;gye=PQ.default=(0,ZEt.default)((0,XEt.jsx)("path",{d:"M17.77 3.77 16 2 6 12l10 10 1.77-1.77L9.54 12z"}),"ArrowBackIosNew");function KEt(){const e=Du(),t=Wf(),n=pi(AO),r=pi(pT),[i,{set:a,push:s,removeAt:o,clear:l,filter:u}]=Ift([]);N.useEffect(()=>{n.shareRole==="READ"&&e(W8("read"))},[e,n.shareRole]),N.useEffect(()=>{if(!n.doc)return;a(n.doc.getPresences());const h=n.doc.subscribe("others",g=>{var b,S;g.type==="watched"&&a(((S=(b=n.doc)==null?void 0:b.getPresences)==null?void 0:S.call(b))??[]),g.type==="unwatched"&&u(E=>E.clientID!==g.value.clientID)});return()=>{h(),l()}},[n.doc,l,s,o,a,u]);const c=h=>{h&&e(W8(h))},f=()=>{var h;t(`/${(h=r.data)==null?void 0:h.slug}`)};return I.jsx(Toe,{position:"static",sx:{zIndex:100},children:I.jsx(Ole,{children:I.jsxs(lr,{width:"100%",direction:"row",justifyContent:"space-between",children:[I.jsxs(lr,{direction:"row",spacing:1,alignItems:"center",children:[!n.shareRole&&I.jsx(wg,{title:"Back to Previous Page",children:I.jsx(wa,{color:"inherit",onClick:f,children:I.jsx(gye,{})})}),I.jsx(Zs,{children:n.shareRole!=="READ"&&I.jsxs(yLe,{value:n.mode,exclusive:!0,onChange:(h,g)=>c(g),size:"small",children:[I.jsx(ON,{value:"edit","aria-label":"edit",children:I.jsx(wg,{title:"Edit Mode",children:I.jsx(hye,{})})}),I.jsx(ON,{value:"both","aria-label":"both",children:I.jsx(wg,{title:"Both Mode",children:I.jsx(pye,{})})}),I.jsx(ON,{value:"read","aria-label":"read",children:I.jsx(wg,{title:"Read Mode",children:I.jsx(VW,{})})})]})})]}),I.jsxs(lr,{direction:"row",alignItems:"center",gap:1,children:[I.jsx(nIe,{max:4,children:i==null?void 0:i.map(h=>I.jsx(wg,{title:h.presence.name,children:I.jsx(fF,{alt:h.presence.name,sx:{bgcolor:h.presence.color},children:h.presence.name[0]})},h.clientID))}),!n.shareRole&&I.jsx(GEt,{}),I.jsx(HEt,{})]})]})})})}function JEt(){return I.jsxs(Ts,{sx:{flexGrow:1},height:"100vh",children:[I.jsx(KEt,{}),I.jsx(kF,{})]})}const e2t=e=>["documents","share",e],t2t=e=>{const t=Du(),n=RO({queryKey:e2t(e||""),enabled:!!e,queryFn:async()=>(await Sr.get("/documents/share",{params:{token:e}})).data,meta:{errorMessage:"This is a non-existent or expired document."}});return N.useEffect(()=>(n.data&&t(s3(n.data)),()=>{t(s3(null))}),[t,n.data]),n};function n2t(){const e=Du(),t=w0(),[n]=CF(),r=N.useMemo(()=>n.get("token"),[n]),{data:i}=t2t(r),{doc:a,client:s}=Nge(i==null?void 0:i.yorkieDocumentId,"Anonymous");return N.useEffect(()=>{i!=null&&i.role&&(e(kBe(i.role)),i.role==="READ"&&e(W8("read")))},[e,i==null?void 0:i.role]),N.useEffect(()=>{if(!(!a||!s))return e(t3(a)),e(n3(s)),()=>{e(t3(null)),e(n3(null))}},[e,s,a]),r?I.jsx(Ts,{height:"calc(100% - 64px)",children:I.jsx(xge,{})}):I.jsx(TF,{to:"/",state:{from:t},replace:!0})}const r2t=e=>["workspaces",e,"users"],i2t=e=>VF({queryKey:r2t(e||""),queryFn:async({pageParam:t})=>(await Sr.get(`/workspaces/${e}/users`,{params:{cursor:t}})).data,enabled:!!e,initialPageParam:void 0,getPreviousPageParam:t=>t.cursor??void 0,getNextPageParam:t=>t.cursor??void 0});function a2t(e){var c;const{open:t,onClose:n}=e,r=pi(pT),{mutateAsync:i}=OUe(((c=r.data)==null?void 0:c.id)||""),{enqueueSnackbar:a}=YI(),[s,o]=N.useState(null),l=async f=>{let h;if(f.expiredString===mv[0])h=null;else{const[b,S]=f.expiredString.split(" ");h=un().add(Number(b),S).toDate()}const{invitationToken:g}=await i({expiredAt:h});o(`${window.location.origin}/join/${g}`)},u=async()=>{s&&(await F1.write(s),a("URL Copied!",{variant:"success"}))};return I.jsx(S0,{open:t,disableAutoFocus:!0,onClose:n,children:I.jsxs(Zs,{sx:{position:"absolute",top:"50%",left:"50%",transform:"translate(-50%, -50%)",p:4,width:538},children:[I.jsx(wa,{sx:{position:"absolute",top:28,right:28},onClick:n,children:I.jsx(XI,{})}),I.jsxs(lr,{gap:4,children:[I.jsxs(lr,{children:[I.jsx(xr,{variant:"h5",fontWeight:"bold",children:"Add Members"}),I.jsx(xr,{children:"Generate and share the link."})]}),I.jsx(lr,{gap:1,children:I.jsx(kd,{children:I.jsx(JT,{defaultValues:{expiredString:mv[0]},onSuccess:l,children:I.jsxs(lr,{gap:2,children:[I.jsx(s9,{label:"Expired Date",name:"expiredString",options:mv.map(f=>({id:f,label:f})),size:"small",sx:{width:1}}),I.jsx(Ws,{type:"submit",variant:"contained",children:"Generate"})]})})})}),I.jsxs(lr,{gap:1,children:[I.jsx(xr,{variant:"h6",fontWeight:"bold",children:"Invite Link"}),I.jsx(Ts,{height:40,children:s?I.jsxs(lr,{direction:"row",alignItems:"center",gap:2,children:[I.jsx(xr,{variant:"body1",children:s}),I.jsx(wg,{title:"Copy URL",children:I.jsx(wa,{onClick:u,children:I.jsx(UI,{})})})]}):I.jsx(xr,{mx:"auto",children:"No link has been generated."})})]})]})]})})}function s2t(){const e=x0(),{data:t}=QF(e.workspaceSlug),{data:n,fetchNextPage:r,hasNextPage:i}=i2t(t==null?void 0:t.id),[a,s]=N.useState(!1),o=N.useMemo(()=>(n==null?void 0:n.pages.reduce((u,c)=>u.concat(c.workspaceUsers),[]))??[],[n==null?void 0:n.pages]),l=()=>{s(u=>!u)};return I.jsxs(qoe,{maxWidth:"lg",children:[I.jsxs(lr,{gap:4,children:[I.jsxs(lr,{direction:"row",justifyContent:"space-between",alignItems:"center",px:2,children:[I.jsxs(xr,{variant:"h5",fontWeight:"bold",children:[t==null?void 0:t.title," ",I.jsx(xr,{component:"span",variant:"inherit",color:"primary",children:n==null?void 0:n.pages[0].workspaceUsers.length})]}),I.jsx(Ws,{variant:"contained",startIcon:I.jsx(ZI,{}),onClick:l,children:"Add Members"})]}),I.jsxs(aMe,{component:Ts,children:[I.jsx(c1,{}),I.jsx(Sx,{pageStart:0,loadMore:()=>r(),hasMore:i,loader:I.jsx(Ts,{className:"loader",children:I.jsx(bp,{size:"sm"})},0),useWindow:!1,style:{width:"100%"},children:I.jsxs(F8e,{children:[I.jsx(fMe,{children:I.jsxs(DZ,{children:[I.jsx(qb,{children:"Name"}),I.jsx(qb,{children:"Role"}),I.jsx(qb,{})]})}),I.jsx(Q8e,{style:{maxHeight:"100%",overflow:"auto"},children:o.map(u=>I.jsxs(DZ,{sx:{width:"100%"},children:[I.jsx(qb,{component:"th",scope:"row",children:u.nickname}),I.jsx(qb,{children:"-"}),I.jsx(qb,{children:"-"})]},u.id))})]})})]})]}),I.jsx(a2t,{open:a,onClose:l})]})}const o2t=[{path:"",accessType:2,element:I.jsx(Lbt,{}),children:[{path:"",element:I.jsx(LEt,{})}]},{path:":workspaceSlug",accessType:1,element:I.jsx(Tyt,{}),children:[{path:"",element:I.jsx(IEt,{})},{path:"member",element:I.jsx(s2t,{})}]},{path:":workspaceSlug",element:I.jsx(JEt,{}),children:[{path:":documentId",accessType:1,element:I.jsx(Mbt,{})},{path:":documentId/share",accessType:0,element:I.jsx(n2t,{})}]},{path:"auth/callback",accessType:2,element:I.jsx($bt,{})},{path:"join/:invitationToken",accessType:1,element:I.jsx(NEt,{})}],l2t=e=>{const t=n=>(n.accessType===1?n.element=I.jsx(Cyt,{children:n.element}):n.accessType===2&&(n.element=I.jsx(kyt,{children:n.element})),n);return e.map(n=>(n=t(n),n!=null&&n.children&&(n.children=n.children.map(r=>t(r))),n.errorElement=I.jsx(DEt,{}),n))},u2t=l2t(o2t),bye=e=>["users",e],c2t=()=>{const e=Du(),t=pi(QT);t.accessToken&&(Sr.defaults.headers.common.Authorization=`Bearer ${t.accessToken}`);const n=RO({queryKey:bye(t.accessToken||""),enabled:!!t.accessToken,queryFn:async()=>(await Sr.get("/users")).data});return N.useEffect(()=>{n.isSuccess?e(Q8(n.data)):n.isError&&(e(gW(null)),e(Q8(null)),Sr.defaults.headers.common.Authorization="")},[e,n.data,n.isError,n.isSuccess]),n},d2t=()=>{const e=pi(QT),t=hT();return T0({mutationFn:async n=>(await Sr.put("/users",n)).data,onSuccess:()=>{t.invalidateQueries({queryKey:bye(e.accessToken||"")})}})};function f2t(e){const[t,n]=N.useState(""),[r,i]=N.useState(""),{data:a}=bbe(r),{mutateAsync:s}=d2t(),o=N.useMemo(()=>a!=null&&a.conflict?"Already Exists":null,[a==null?void 0:a.conflict]);bW(()=>{i(t)},500,[t]);const l=c=>{n(c.target.value)},u=async c=>{await s(c)};return I.jsx(S0,{disableAutoFocus:!0,...e,children:I.jsx(Zs,{sx:{position:"absolute",top:"50%",left:"50%",transform:"translate(-50%, -50%)",p:4,width:400},children:I.jsxs(lr,{gap:4,children:[I.jsx(xr,{variant:"h5",children:"Create Your Nickname"}),I.jsx(kd,{children:I.jsx(JT,{defaultValues:{nickname:""},onSuccess:u,children:I.jsxs(lr,{gap:4,alignItems:"flex-end",children:[I.jsx(GI,{variant:"standard",name:"nickname",label:"Enter your nickname",required:!0,fullWidth:!0,inputProps:{maxLength:255},onChange:l,error:!!o,helperText:o}),I.jsx(Ws,{type:"submit",variant:"contained",size:"large",disabled:!!o,children:"OK"})]})})})]})})})}function h2t(e){const{children:t}=e,{data:n,isSuccess:r,isLoading:i}=c2t(),a=N.useMemo(()=>r&&!n.nickname,[r,n==null?void 0:n.nickname]);return I.jsx(oQ.Provider,{value:{isLoggedIn:r,isLoading:i},children:a?I.jsx(f2t,{open:!0}):t})}function p2t(){const{enqueueSnackbar:e}=YI();return N.useCallback(n=>{e(n.message||"Something went wrong...",{variant:"error"})},[e])}const yye=Object.prototype.toString;function vye(e){switch(yye.call(e)){case"[object Error]":case"[object Exception]":case"[object DOMException]":return!0;default:return hp(e,Error)}}function tS(e,t){return yye.call(e)===`[object ${t}]`}function MQ(e){return tS(e,"ErrorEvent")}function wre(e){return tS(e,"DOMError")}function m2t(e){return tS(e,"DOMException")}function Uf(e){return tS(e,"String")}function LQ(e){return typeof e=="object"&&e!==null&&"__sentry_template_string__"in e&&"__sentry_template_values__"in e}function $Q(e){return e===null||LQ(e)||typeof e!="object"&&typeof e!="function"}function fO(e){return tS(e,"Object")}function u6(e){return typeof Event<"u"&&hp(e,Event)}function g2t(e){return typeof Element<"u"&&hp(e,Element)}function b2t(e){return tS(e,"RegExp")}function c6(e){return!!(e&&e.then&&typeof e.then=="function")}function y2t(e){return fO(e)&&"nativeEvent"in e&&"preventDefault"in e&&"stopPropagation"in e}function Oye(e){return typeof e=="number"&&e!==e}function hp(e,t){try{return e instanceof t}catch{return!1}}function Sye(e){return!!(typeof e=="object"&&e!==null&&(e.__isVue||e._isVue))}function gv(e,t=0){return typeof e!="string"||t===0||e.length<=t?e:`${e.slice(0,t)}...`}function xre(e,t){if(!Array.isArray(e))return"";const n=[];for(let r=0;rv2t(e,r,n))}function O2t(e,t,n=250,r,i,a,s){if(!a.exception||!a.exception.values||!s||!hp(s.originalException,Error))return;const o=a.exception.values.length>0?a.exception.values[a.exception.values.length-1]:void 0;o&&(a.exception.values=S2t(m9(e,t,i,s.originalException,r,a.exception.values,o,0),n))}function m9(e,t,n,r,i,a,s,o){if(a.length>=n+1)return a;let l=[...a];if(hp(r[i],Error)){Tre(s,o);const u=e(t,r[i]),c=l.length;kre(u,i,c,o),l=m9(e,t,n,r[i],i,[u,...l],u,c)}return Array.isArray(r.errors)&&r.errors.forEach((u,c)=>{if(hp(u,Error)){Tre(s,o);const f=e(t,u),h=l.length;kre(f,`errors[${c}]`,h,o),l=m9(e,t,n,u,i,[f,...l],f,h)}}),l}function Tre(e,t){e.mechanism=e.mechanism||{type:"generic",handled:!0},e.mechanism={...e.mechanism,is_exception_group:!0,exception_id:t}}function kre(e,t,n,r){e.mechanism=e.mechanism||{type:"generic",handled:!0},e.mechanism={...e.mechanism,type:"chained",source:t,exception_id:n,parent_id:r}}function S2t(e,t){return e.map(n=>(n.value&&(n.value=gv(n.value,t)),n))}function ZA(e){return e&&e.Math==Math?e:void 0}const si=typeof globalThis=="object"&&ZA(globalThis)||typeof window=="object"&&ZA(window)||typeof self=="object"&&ZA(self)||typeof global=="object"&&ZA(global)||function(){return this}()||{};function FQ(){return si}function Eye(e,t,n){const r=n||si,i=r.__SENTRY__=r.__SENTRY__||{};return i[e]||(i[e]=t())}const bv=FQ(),E2t=80;function kx(e,t={}){if(!e)return"";try{let n=e;const r=5,i=[];let a=0,s=0;const o=" > ",l=o.length;let u;const c=Array.isArray(t)?t:t.keyAttrs,f=!Array.isArray(t)&&t.maxStringLength||E2t;for(;n&&a++1&&s+i.length*l+u.length>=f));)i.push(u),s+=u.length,n=n.parentNode;return i.reverse().join(o)}catch{return""}}function w2t(e,t){const n=e,r=[];let i,a,s,o,l;if(!n||!n.tagName)return"";if(bv.HTMLElement&&n instanceof HTMLElement&&n.dataset&&n.dataset.sentryComponent)return n.dataset.sentryComponent;r.push(n.tagName.toLowerCase());const u=t&&t.length?t.filter(f=>n.getAttribute(f)).map(f=>[f,n.getAttribute(f)]):null;if(u&&u.length)u.forEach(f=>{r.push(`[${f[0]}="${f[1]}"]`)});else if(n.id&&r.push(`#${n.id}`),i=n.className,i&&Uf(i))for(a=i.split(/\s+/),l=0;l"u"||__SENTRY_DEBUG__,k2t="Sentry Logger ",g9=["debug","info","warn","error","log","assert","trace"],p5={};function d6(e){if(!("console"in si))return e();const t=si.console,n={},r=Object.keys(p5);r.forEach(i=>{const a=p5[i];n[i]=t[i],t[i]=a});try{return e()}finally{r.forEach(i=>{t[i]=n[i]})}}function C2t(){let e=!1;const t={enable:()=>{e=!0},disable:()=>{e=!1},isEnabled:()=>e};return nS?g9.forEach(n=>{t[n]=(...r)=>{e&&d6(()=>{si.console[n](`${k2t}[${n}]:`,...r)})}}):g9.forEach(n=>{t[n]=()=>{}}),t}const Pt=C2t(),A2t=/^(?:(\w+):)\/\/(?:(\w+)(?::(\w+)?)?@)([\w.-]+)(?::(\d+))?\/(.+)/;function _2t(e){return e==="http"||e==="https"}function ak(e,t=!1){const{host:n,path:r,pass:i,port:a,projectId:s,protocol:o,publicKey:l}=e;return`${o}://${l}${t&&i?`:${i}`:""}@${n}${a?`:${a}`:""}/${r&&`${r}/`}${s}`}function R2t(e){const t=A2t.exec(e);if(!t){d6(()=>{console.error(`Invalid Sentry Dsn: ${e}`)});return}const[n,r,i="",a,s="",o]=t.slice(1);let l="",u=o;const c=u.split("/");if(c.length>1&&(l=c.slice(0,-1).join("/"),u=c.pop()),u){const f=u.match(/^\d+/);f&&(u=f[0])}return xye({host:a,pass:i,path:l,projectId:u,port:s,protocol:n,publicKey:r})}function xye(e){return{protocol:e.protocol,publicKey:e.publicKey||"",pass:e.pass||"",host:e.host,port:e.port||"",path:e.path||"",projectId:e.projectId}}function I2t(e){if(!nS)return!0;const{port:t,projectId:n,protocol:r}=e;return["protocol","publicKey","host","projectId"].find(s=>e[s]?!1:(Pt.error(`Invalid Sentry Dsn: ${s} missing`),!0))?!1:n.match(/^\d+$/)?_2t(r)?t&&isNaN(parseInt(t,10))?(Pt.error(`Invalid Sentry Dsn: Invalid port ${t}`),!1):!0:(Pt.error(`Invalid Sentry Dsn: Invalid protocol ${r}`),!1):(Pt.error(`Invalid Sentry Dsn: Invalid projectId ${n}`),!1)}function D2t(e){const t=typeof e=="string"?R2t(e):xye(e);if(!(!t||!I2t(t)))return t}class Of extends Error{constructor(t,n="warn"){super(t),this.message=t,this.name=new.target.prototype.constructor.name,Object.setPrototypeOf(this,new.target.prototype),this.logLevel=n}}function qs(e,t,n){if(!(t in e))return;const r=e[t],i=n(r);typeof i=="function"&&Tye(i,r),e[t]=i}function Cx(e,t,n){try{Object.defineProperty(e,t,{value:n,writable:!0,configurable:!0})}catch{nS&&Pt.log(`Failed to add non-enumerable property "${t}" to object`,e)}}function Tye(e,t){try{const n=t.prototype||{};e.prototype=t.prototype=n,Cx(e,"__sentry_original__",t)}catch{}}function BQ(e){return e.__sentry_original__}function N2t(e){return Object.keys(e).map(t=>`${encodeURIComponent(t)}=${encodeURIComponent(e[t])}`).join("&")}function kye(e){if(vye(e))return{message:e.message,name:e.name,stack:e.stack,...Are(e)};if(u6(e)){const t={type:e.type,target:Cre(e.target),currentTarget:Cre(e.currentTarget),...Are(e)};return typeof CustomEvent<"u"&&hp(e,CustomEvent)&&(t.detail=e.detail),t}else return e}function Cre(e){try{return g2t(e)?kx(e):Object.prototype.toString.call(e)}catch{return""}}function Are(e){if(typeof e=="object"&&e!==null){const t={};for(const n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t}else return{}}function P2t(e,t=40){const n=Object.keys(kye(e));if(n.sort(),!n.length)return"[object has no keys]";if(n[0].length>=t)return gv(n[0],t);for(let r=n.length;r>0;r--){const i=n.slice(0,r).join(", ");if(!(i.length>t))return r===n.length?i:gv(i,t)}return""}function gc(e){return b9(e,new Map)}function b9(e,t){if(M2t(e)){const n=t.get(e);if(n!==void 0)return n;const r={};t.set(e,r);for(const i of Object.keys(e))typeof e[i]<"u"&&(r[i]=b9(e[i],t));return r}if(Array.isArray(e)){const n=t.get(e);if(n!==void 0)return n;const r=[];return t.set(e,r),e.forEach(i=>{r.push(b9(i,t))}),r}return e}function M2t(e){if(!fO(e))return!1;try{const t=Object.getPrototypeOf(e).constructor.name;return!t||t==="Object"}catch{return!0}}const Cye=50,_re=/\(error: (.*)\)/,Rre=/captureMessage|captureException/;function Aye(...e){const t=e.sort((n,r)=>n[0]-r[0]).map(n=>n[1]);return(n,r=0)=>{const i=[],a=n.split(` +`);for(let s=r;s1024)continue;const l=_re.test(o)?o.replace(_re,"$1"):o;if(!l.match(/\S*Error: /)){for(const u of t){const c=u(l);if(c){i.push(c);break}}if(i.length>=Cye)break}}return $2t(i)}}function L2t(e){return Array.isArray(e)?Aye(...e):e}function $2t(e){if(!e.length)return[];const t=Array.from(e);return/sentryWrapped/.test(t[t.length-1].function||"")&&t.pop(),t.reverse(),Rre.test(t[t.length-1].function||"")&&(t.pop(),Rre.test(t[t.length-1].function||"")&&t.pop()),t.slice(0,Cye).map(n=>({...n,filename:n.filename||t[t.length-1].filename,function:n.function||"?"}))}const b7="";function pp(e){try{return!e||typeof e!="function"?b7:e.name||b7}catch{return b7}}const r_={},Ire={};function U1(e,t){r_[e]=r_[e]||[],r_[e].push(t)}function z1(e,t){Ire[e]||(t(),Ire[e]=!0)}function bd(e,t){const n=e&&r_[e];if(n)for(const r of n)try{r(t)}catch(i){nS&&Pt.error(`Error while triggering instrumentation handler. Type: ${e} Name: ${pp(r)} -Error:`,i)}}function U2t(e){const t="console";U1(t,e),z1(t,z2t)}function z2t(){"console"in si&&g9.forEach(function(e){e in si.console&&qs(si.console,e,function(t){return p5[e]=t,function(...n){bd("console",{args:n,level:e});const i=p5[e];i&&i.apply(si.console,n)}})})}function La(){const e=si,t=e.crypto||e.msCrypto;let n=()=>Math.random()*16;try{if(t&&t.randomUUID)return t.randomUUID().replace(/-/g,"");t&&t.getRandomValues&&(n=()=>{const r=new Uint8Array(1);return t.getRandomValues(r),r[0]})}catch{}return("10000000100040008000"+1e11).replace(/[018]/g,r=>(r^(n()&15)>>r/4).toString(16))}function _ye(e){return e.exception&&e.exception.values?e.exception.values[0]:void 0}function mm(e){const{message:t,event_id:n}=e;if(t)return t;const r=_ye(e);return r?r.type&&r.value?`${r.type}: ${r.value}`:r.type||r.value||n||"":n||""}function y9(e,t,n){const r=e.exception=e.exception||{},i=r.values=r.values||[],a=i[0]=i[0]||{};a.value||(a.value=t||""),a.type||(a.type=n||"Error")}function Ax(e,t){const n=_ye(e);if(!n)return;const r={type:"generic",handled:!0},i=n.mechanism;if(n.mechanism={...r,...i,...t},t&&"data"in t){const a={...i&&i.data,...t.data};n.mechanism.data=a}}function Dre(e){if(e&&e.__sentry_captured__)return!0;try{Cx(e,"__sentry_captured__",!0)}catch{}return!1}function Rye(e){return Array.isArray(e)?e:[e]}const gy=si,j2t=1e3;let Nre,v9,O9;function H2t(e){const t="dom";U1(t,e),z1(t,V2t)}function V2t(){if(!gy.document)return;const e=bd.bind(null,"dom"),t=Pre(e,!0);gy.document.addEventListener("click",t,!1),gy.document.addEventListener("keypress",t,!1),["EventTarget","Node"].forEach(n=>{const r=gy[n]&&gy[n].prototype;!r||!r.hasOwnProperty||!r.hasOwnProperty("addEventListener")||(qs(r,"addEventListener",function(i){return function(a,s,o){if(a==="click"||a=="keypress")try{const l=this,u=l.__sentry_instrumentation_handlers__=l.__sentry_instrumentation_handlers__||{},c=u[a]=u[a]||{refCount:0};if(!c.handler){const f=Pre(e);c.handler=f,i.call(this,a,f,o)}c.refCount++}catch{}return i.call(this,a,s,o)}}),qs(r,"removeEventListener",function(i){return function(a,s,o){if(a==="click"||a=="keypress")try{const l=this,u=l.__sentry_instrumentation_handlers__||{},c=u[a];c&&(c.refCount--,c.refCount<=0&&(i.call(this,a,c.handler,o),c.handler=void 0,delete u[a]),Object.keys(u).length===0&&delete l.__sentry_instrumentation_handlers__)}catch{}return i.call(this,a,s,o)}}))})}function W2t(e){if(e.type!==v9)return!1;try{if(!e.target||e.target._sentryId!==O9)return!1}catch{}return!0}function Q2t(e,t){return e!=="keypress"?!1:!t||!t.tagName?!0:!(t.tagName==="INPUT"||t.tagName==="TEXTAREA"||t.isContentEditable)}function Pre(e,t=!1){return n=>{if(!n||n._sentryCaptured)return;const r=q2t(n);if(Q2t(n.type,r))return;Cx(n,"_sentryCaptured",!0),r&&!r._sentryId&&Cx(r,"_sentryId",La());const i=n.type==="keypress"?"input":n.type;W2t(n)||(e({event:n,name:i,global:t}),v9=n.type,O9=r?r._sentryId:void 0),clearTimeout(Nre),Nre=gy.setTimeout(()=>{O9=void 0,v9=void 0},j2t)}}function q2t(e){try{return e.target}catch{return null}}const S9=FQ();function Iye(){if(!("fetch"in S9))return!1;try{return new Headers,new Request("http://www.example.com"),new Response,!0}catch{return!1}}function E9(e){return e&&/^function fetch\(\)\s+\{\s+\[native code\]\s+\}$/.test(e.toString())}function G2t(){if(typeof EdgeRuntime=="string")return!0;if(!Iye())return!1;if(E9(S9.fetch))return!0;let e=!1;const t=S9.document;if(t&&typeof t.createElement=="function")try{const n=t.createElement("iframe");n.hidden=!0,t.head.appendChild(n),n.contentWindow&&n.contentWindow.fetch&&(e=E9(n.contentWindow.fetch)),t.head.removeChild(n)}catch(n){nS&&Pt.warn("Could not create sandbox iframe for pure fetch check, bailing to window.fetch: ",n)}return e}function Dye(e){const t="fetch";U1(t,e),z1(t,Y2t)}function Y2t(){G2t()&&qs(si,"fetch",function(e){return function(...t){const{method:n,url:r}=Z2t(t),i={args:t,fetchData:{method:n,url:r},startTimestamp:Date.now()};return bd("fetch",{...i}),e.apply(si,t).then(a=>{const s={...i,endTimestamp:Date.now(),response:a};return bd("fetch",s),a},a=>{const s={...i,endTimestamp:Date.now(),error:a};throw bd("fetch",s),a})}})}function w9(e,t){return!!e&&typeof e=="object"&&!!e[t]}function Mre(e){return typeof e=="string"?e:e?w9(e,"url")?e.url:e.toString?e.toString():"":""}function Z2t(e){if(e.length===0)return{method:"GET",url:""};if(e.length===2){const[n,r]=e;return{url:Mre(n),method:w9(r,"method")?String(r.method).toUpperCase():"GET"}}const t=e[0];return{url:Mre(t),method:w9(t,"method")?String(t.method).toUpperCase():"GET"}}let XA=null;function Nye(e){const t="error";U1(t,e),z1(t,X2t)}function X2t(){XA=si.onerror,si.onerror=function(e,t,n,r,i){return bd("error",{column:r,error:i,line:n,msg:e,url:t}),XA&&!XA.__SENTRY_LOADER__?XA.apply(this,arguments):!1},si.onerror.__SENTRY_INSTRUMENTED__=!0}let KA=null;function Pye(e){const t="unhandledrejection";U1(t,e),z1(t,K2t)}function K2t(){KA=si.onunhandledrejection,si.onunhandledrejection=function(e){return bd("unhandledrejection",e),KA&&!KA.__SENTRY_LOADER__?KA.apply(this,arguments):!0},si.onunhandledrejection.__SENTRY_INSTRUMENTED__=!0}const JA=FQ();function J2t(){const e=JA.chrome,t=e&&e.app&&e.app.runtime,n="history"in JA&&!!JA.history.pushState&&!!JA.history.replaceState;return!t&&n}const VE=si;let e4;function UQ(e){const t="history";U1(t,e),z1(t,ewt)}function ewt(){if(!J2t())return;const e=VE.onpopstate;VE.onpopstate=function(...n){const r=VE.location.href,i=e4;if(e4=r,bd("history",{from:i,to:r}),e)try{return e.apply(this,n)}catch{}};function t(n){return function(...r){const i=r.length>2?r[2]:void 0;if(i){const a=e4,s=String(i);e4=s,bd("history",{from:a,to:s})}return n.apply(this,r)}}qs(VE.history,"pushState",t),qs(VE.history,"replaceState",t)}const twt=si,Uy="__sentry_xhr_v3__";function Mye(e){const t="xhr";U1(t,e),z1(t,nwt)}function nwt(){if(!twt.XMLHttpRequest)return;const e=XMLHttpRequest.prototype;qs(e,"open",function(t){return function(...n){const r=Date.now(),i=Uf(n[0])?n[0].toUpperCase():void 0,a=rwt(n[1]);if(!i||!a)return t.apply(this,n);this[Uy]={method:i,url:a,request_headers:{}},i==="POST"&&a.match(/sentry_key/)&&(this.__sentry_own_request__=!0);const s=()=>{const o=this[Uy];if(o&&this.readyState===4){try{o.status_code=this.status}catch{}const l={args:[i,a],endTimestamp:Date.now(),startTimestamp:r,xhr:this};bd("xhr",l)}};return"onreadystatechange"in this&&typeof this.onreadystatechange=="function"?qs(this,"onreadystatechange",function(o){return function(...l){return s(),o.apply(this,l)}}):this.addEventListener("readystatechange",s),qs(this,"setRequestHeader",function(o){return function(...l){const[u,c]=l,f=this[Uy];return f&&Uf(u)&&Uf(c)&&(f.request_headers[u.toLowerCase()]=c),o.apply(this,l)}}),t.apply(this,n)}}),qs(e,"send",function(t){return function(...n){const r=this[Uy];if(!r)return t.apply(this,n);n[0]!==void 0&&(r.body=n[0]);const i={args:[r.method,r.url],startTimestamp:Date.now(),xhr:this};return bd("xhr",i),t.apply(this,n)}})}function rwt(e){if(Uf(e))return e;try{return e.toString()}catch{}}function iwt(){return"npm"}function awt(){const e=typeof WeakSet=="function",t=e?new WeakSet:[];function n(i){if(e)return t.has(i)?!0:(t.add(i),!1);for(let a=0;an?Lye(e,t-1,n):r}function x9(e,t,n=1/0,r=1/0,i=awt()){const[a,s]=i;if(t==null||["number","boolean","string"].includes(typeof t)&&!Oye(t))return t;const o=swt(e,t);if(!o.startsWith("[object "))return o;if(t.__sentry_skip_normalization__)return t;const l=typeof t.__sentry_override_normalization_depth__=="number"?t.__sentry_override_normalization_depth__:n;if(l===0)return o.replace("object ","");if(a(t))return"[Circular ~]";const u=t;if(u&&typeof u.toJSON=="function")try{const g=u.toJSON();return x9("",g,l-1,r,i)}catch{}const c=Array.isArray(t)?[]:{};let f=0;const h=kye(t);for(const g in h){if(!Object.prototype.hasOwnProperty.call(h,g))continue;if(f>=r){c[g]="[MaxProperties ~]";break}const b=h[g];c[g]=x9(g,b,l-1,r,i),f++}return s(t),c}function swt(e,t){try{if(e==="domain"&&t&&typeof t=="object"&&t._events)return"[Domain]";if(e==="domainEmitter")return"[DomainEmitter]";if(typeof global<"u"&&t===global)return"[Global]";if(typeof window<"u"&&t===window)return"[Window]";if(typeof document<"u"&&t===document)return"[Document]";if(Sye(t))return"[VueViewModel]";if(O2t(t))return"[SyntheticEvent]";if(typeof t=="number"&&t!==t)return"[NaN]";if(typeof t=="function")return`[Function: ${pp(t)}]`;if(typeof t=="symbol")return`[${String(t)}]`;if(typeof t=="bigint")return`[BigInt: ${String(t)}]`;const n=owt(t);return/^HTML(\w*)Element$/.test(n)?`[HTMLElement: ${n}]`:`[object ${n}]`}catch(n){return`**non-serializable** (${n})`}}function owt(e){const t=Object.getPrototypeOf(e);return t?t.constructor.name:"null prototype"}function lwt(e){return~-encodeURI(e).split(/%..|./).length}function uwt(e){return lwt(JSON.stringify(e))}var Ih;(function(e){e[e.PENDING=0]="PENDING";const n=1;e[e.RESOLVED=n]="RESOLVED";const r=2;e[e.REJECTED=r]="REJECTED"})(Ih||(Ih={}));function hO(e){return new hu(t=>{t(e)})}function zQ(e){return new hu((t,n)=>{n(e)})}class hu{constructor(t){hu.prototype.__init.call(this),hu.prototype.__init2.call(this),hu.prototype.__init3.call(this),hu.prototype.__init4.call(this),this._state=Ih.PENDING,this._handlers=[];try{t(this._resolve,this._reject)}catch(n){this._reject(n)}}then(t,n){return new hu((r,i)=>{this._handlers.push([!1,a=>{if(!t)r(a);else try{r(t(a))}catch(s){i(s)}},a=>{if(!n)i(a);else try{r(n(a))}catch(s){i(s)}}]),this._executeHandlers()})}catch(t){return this.then(n=>n,t)}finally(t){return new hu((n,r)=>{let i,a;return this.then(s=>{a=!1,i=s,t&&t()},s=>{a=!0,i=s,t&&t()}).then(()=>{if(a){r(i);return}n(i)})})}__init(){this._resolve=t=>{this._setResult(Ih.RESOLVED,t)}}__init2(){this._reject=t=>{this._setResult(Ih.REJECTED,t)}}__init3(){this._setResult=(t,n)=>{if(this._state===Ih.PENDING){if(c6(n)){n.then(this._resolve,this._reject);return}this._state=t,this._value=n,this._executeHandlers()}}}__init4(){this._executeHandlers=()=>{if(this._state===Ih.PENDING)return;const t=this._handlers.slice();this._handlers=[],t.forEach(n=>{n[0]||(this._state===Ih.RESOLVED&&n[1](this._value),this._state===Ih.REJECTED&&n[2](this._value),n[0]=!0)})}}}function cwt(e){const t=[];function n(){return e===void 0||t.lengthr(o)).then(null,()=>r(o).then(null,()=>{})),o}function a(s){return new hu((o,l)=>{let u=t.length;if(!u)return o(!0);const c=setTimeout(()=>{s&&s>0&&o(!1)},s);t.forEach(f=>{hO(f).then(()=>{--u||(clearTimeout(c),o(!0))},l)})})}return{$:t,add:i,drain:a}}function i_(e){if(!e)return{};const t=e.match(/^(([^:/?#]+):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?$/);if(!t)return{};const n=t[6]||"",r=t[8]||"";return{host:t[4],path:t[5],protocol:t[2],search:n,hash:r,relative:t[5]+n+r}}const dwt=["fatal","error","warning","log","info","debug"];function fwt(e){return e==="warn"?"warning":dwt.includes(e)?e:"log"}const $ye=1e3;function sk(){return Date.now()/$ye}function hwt(){const{performance:e}=si;if(!e||!e.now)return sk;const t=Date.now()-e.now(),n=e.timeOrigin==null?t:e.timeOrigin;return()=>(n+e.now())/$ye}const ok=hwt(),Hf=(()=>{const{performance:e}=si;if(!e||!e.now)return;const t=3600*1e3,n=e.now(),r=Date.now(),i=e.timeOrigin?Math.abs(e.timeOrigin+n-r):t,a=i{const a=Lre(i);for(const s of Object.keys(a))r[s]=a[s];return r},{});else{if(!e)return;t=Lre(e)}const n=Object.entries(t).reduce((r,[i,a])=>{if(i.match(pwt)){const s=i.slice(Fye.length);r[s]=a}return r},{});if(Object.keys(n).length>0)return n}function Bye(e){if(!e)return;const t=Object.entries(e).reduce((n,[r,i])=>(i&&(n[`${Fye}${r}`]=i),n),{});return bwt(t)}function Lre(e){return e.split(",").map(t=>t.split("=").map(n=>decodeURIComponent(n.trim()))).reduce((t,[n,r])=>(t[n]=r,t),{})}function bwt(e){if(Object.keys(e).length!==0)return Object.entries(e).reduce((t,[n,r],i)=>{const a=`${encodeURIComponent(n)}=${encodeURIComponent(r)}`,s=i===0?a:`${t},${a}`;return s.length>mwt?(nS&&Pt.warn(`Not adding key: ${n} with val: ${r} to baggage header due to exceeding baggage size limits.`),t):s},"")}const ywt=new RegExp("^[ \\t]*([0-9a-f]{32})?-?([0-9a-f]{16})?-?([01])?[ \\t]*$");function vwt(e){if(!e)return;const t=e.match(ywt);if(!t)return;let n;return t[3]==="1"?n=!0:t[3]==="0"&&(n=!1),{traceId:t[1],parentSampled:n,parentSpanId:t[2]}}function Owt(e,t){const n=vwt(e),r=gwt(t),{traceId:i,parentSpanId:a,parentSampled:s}=n||{};return n?{traceparentData:n,dynamicSamplingContext:r||{},propagationContext:{traceId:i||La(),parentSpanId:a||La().substring(16),spanId:La().substring(16),sampled:s,dsc:r||{}}}:{traceparentData:n,dynamicSamplingContext:void 0,propagationContext:{traceId:i||La(),spanId:La().substring(16)}}}function jQ(e=La(),t=La().substring(16),n){let r="";return n!==void 0&&(r=n?"-1":"-0"),`${e}-${t}${r}`}function rS(e,t=[]){return[e,t]}function Swt(e,t){const[n,r]=e;return[n,[...r,t]]}function $re(e,t){const n=e[1];for(const r of n){const i=r[0].type;if(t(r,i))return!0}return!1}function k9(e,t){return(t||new TextEncoder).encode(e)}function Ewt(e,t){const[n,r]=e;let i=JSON.stringify(n);function a(s){typeof i=="string"?i=typeof s=="string"?i+s:[k9(i,t),s]:i.push(typeof s=="string"?k9(s,t):s)}for(const s of r){const[o,l]=s;if(a(` +Error:`,i)}}function F2t(e){const t="console";U1(t,e),z1(t,B2t)}function B2t(){"console"in si&&g9.forEach(function(e){e in si.console&&qs(si.console,e,function(t){return p5[e]=t,function(...n){bd("console",{args:n,level:e});const i=p5[e];i&&i.apply(si.console,n)}})})}function La(){const e=si,t=e.crypto||e.msCrypto;let n=()=>Math.random()*16;try{if(t&&t.randomUUID)return t.randomUUID().replace(/-/g,"");t&&t.getRandomValues&&(n=()=>{const r=new Uint8Array(1);return t.getRandomValues(r),r[0]})}catch{}return("10000000100040008000"+1e11).replace(/[018]/g,r=>(r^(n()&15)>>r/4).toString(16))}function _ye(e){return e.exception&&e.exception.values?e.exception.values[0]:void 0}function mm(e){const{message:t,event_id:n}=e;if(t)return t;const r=_ye(e);return r?r.type&&r.value?`${r.type}: ${r.value}`:r.type||r.value||n||"":n||""}function y9(e,t,n){const r=e.exception=e.exception||{},i=r.values=r.values||[],a=i[0]=i[0]||{};a.value||(a.value=t||""),a.type||(a.type=n||"Error")}function Ax(e,t){const n=_ye(e);if(!n)return;const r={type:"generic",handled:!0},i=n.mechanism;if(n.mechanism={...r,...i,...t},t&&"data"in t){const a={...i&&i.data,...t.data};n.mechanism.data=a}}function Dre(e){if(e&&e.__sentry_captured__)return!0;try{Cx(e,"__sentry_captured__",!0)}catch{}return!1}function Rye(e){return Array.isArray(e)?e:[e]}const gy=si,U2t=1e3;let Nre,v9,O9;function z2t(e){const t="dom";U1(t,e),z1(t,j2t)}function j2t(){if(!gy.document)return;const e=bd.bind(null,"dom"),t=Pre(e,!0);gy.document.addEventListener("click",t,!1),gy.document.addEventListener("keypress",t,!1),["EventTarget","Node"].forEach(n=>{const r=gy[n]&&gy[n].prototype;!r||!r.hasOwnProperty||!r.hasOwnProperty("addEventListener")||(qs(r,"addEventListener",function(i){return function(a,s,o){if(a==="click"||a=="keypress")try{const l=this,u=l.__sentry_instrumentation_handlers__=l.__sentry_instrumentation_handlers__||{},c=u[a]=u[a]||{refCount:0};if(!c.handler){const f=Pre(e);c.handler=f,i.call(this,a,f,o)}c.refCount++}catch{}return i.call(this,a,s,o)}}),qs(r,"removeEventListener",function(i){return function(a,s,o){if(a==="click"||a=="keypress")try{const l=this,u=l.__sentry_instrumentation_handlers__||{},c=u[a];c&&(c.refCount--,c.refCount<=0&&(i.call(this,a,c.handler,o),c.handler=void 0,delete u[a]),Object.keys(u).length===0&&delete l.__sentry_instrumentation_handlers__)}catch{}return i.call(this,a,s,o)}}))})}function H2t(e){if(e.type!==v9)return!1;try{if(!e.target||e.target._sentryId!==O9)return!1}catch{}return!0}function V2t(e,t){return e!=="keypress"?!1:!t||!t.tagName?!0:!(t.tagName==="INPUT"||t.tagName==="TEXTAREA"||t.isContentEditable)}function Pre(e,t=!1){return n=>{if(!n||n._sentryCaptured)return;const r=W2t(n);if(V2t(n.type,r))return;Cx(n,"_sentryCaptured",!0),r&&!r._sentryId&&Cx(r,"_sentryId",La());const i=n.type==="keypress"?"input":n.type;H2t(n)||(e({event:n,name:i,global:t}),v9=n.type,O9=r?r._sentryId:void 0),clearTimeout(Nre),Nre=gy.setTimeout(()=>{O9=void 0,v9=void 0},U2t)}}function W2t(e){try{return e.target}catch{return null}}const S9=FQ();function Iye(){if(!("fetch"in S9))return!1;try{return new Headers,new Request("http://www.example.com"),new Response,!0}catch{return!1}}function E9(e){return e&&/^function fetch\(\)\s+\{\s+\[native code\]\s+\}$/.test(e.toString())}function Q2t(){if(typeof EdgeRuntime=="string")return!0;if(!Iye())return!1;if(E9(S9.fetch))return!0;let e=!1;const t=S9.document;if(t&&typeof t.createElement=="function")try{const n=t.createElement("iframe");n.hidden=!0,t.head.appendChild(n),n.contentWindow&&n.contentWindow.fetch&&(e=E9(n.contentWindow.fetch)),t.head.removeChild(n)}catch(n){nS&&Pt.warn("Could not create sandbox iframe for pure fetch check, bailing to window.fetch: ",n)}return e}function Dye(e){const t="fetch";U1(t,e),z1(t,q2t)}function q2t(){Q2t()&&qs(si,"fetch",function(e){return function(...t){const{method:n,url:r}=G2t(t),i={args:t,fetchData:{method:n,url:r},startTimestamp:Date.now()};return bd("fetch",{...i}),e.apply(si,t).then(a=>{const s={...i,endTimestamp:Date.now(),response:a};return bd("fetch",s),a},a=>{const s={...i,endTimestamp:Date.now(),error:a};throw bd("fetch",s),a})}})}function w9(e,t){return!!e&&typeof e=="object"&&!!e[t]}function Mre(e){return typeof e=="string"?e:e?w9(e,"url")?e.url:e.toString?e.toString():"":""}function G2t(e){if(e.length===0)return{method:"GET",url:""};if(e.length===2){const[n,r]=e;return{url:Mre(n),method:w9(r,"method")?String(r.method).toUpperCase():"GET"}}const t=e[0];return{url:Mre(t),method:w9(t,"method")?String(t.method).toUpperCase():"GET"}}let XA=null;function Nye(e){const t="error";U1(t,e),z1(t,Y2t)}function Y2t(){XA=si.onerror,si.onerror=function(e,t,n,r,i){return bd("error",{column:r,error:i,line:n,msg:e,url:t}),XA&&!XA.__SENTRY_LOADER__?XA.apply(this,arguments):!1},si.onerror.__SENTRY_INSTRUMENTED__=!0}let KA=null;function Pye(e){const t="unhandledrejection";U1(t,e),z1(t,Z2t)}function Z2t(){KA=si.onunhandledrejection,si.onunhandledrejection=function(e){return bd("unhandledrejection",e),KA&&!KA.__SENTRY_LOADER__?KA.apply(this,arguments):!0},si.onunhandledrejection.__SENTRY_INSTRUMENTED__=!0}const JA=FQ();function X2t(){const e=JA.chrome,t=e&&e.app&&e.app.runtime,n="history"in JA&&!!JA.history.pushState&&!!JA.history.replaceState;return!t&&n}const VE=si;let e4;function UQ(e){const t="history";U1(t,e),z1(t,K2t)}function K2t(){if(!X2t())return;const e=VE.onpopstate;VE.onpopstate=function(...n){const r=VE.location.href,i=e4;if(e4=r,bd("history",{from:i,to:r}),e)try{return e.apply(this,n)}catch{}};function t(n){return function(...r){const i=r.length>2?r[2]:void 0;if(i){const a=e4,s=String(i);e4=s,bd("history",{from:a,to:s})}return n.apply(this,r)}}qs(VE.history,"pushState",t),qs(VE.history,"replaceState",t)}const J2t=si,Uy="__sentry_xhr_v3__";function Mye(e){const t="xhr";U1(t,e),z1(t,ewt)}function ewt(){if(!J2t.XMLHttpRequest)return;const e=XMLHttpRequest.prototype;qs(e,"open",function(t){return function(...n){const r=Date.now(),i=Uf(n[0])?n[0].toUpperCase():void 0,a=twt(n[1]);if(!i||!a)return t.apply(this,n);this[Uy]={method:i,url:a,request_headers:{}},i==="POST"&&a.match(/sentry_key/)&&(this.__sentry_own_request__=!0);const s=()=>{const o=this[Uy];if(o&&this.readyState===4){try{o.status_code=this.status}catch{}const l={args:[i,a],endTimestamp:Date.now(),startTimestamp:r,xhr:this};bd("xhr",l)}};return"onreadystatechange"in this&&typeof this.onreadystatechange=="function"?qs(this,"onreadystatechange",function(o){return function(...l){return s(),o.apply(this,l)}}):this.addEventListener("readystatechange",s),qs(this,"setRequestHeader",function(o){return function(...l){const[u,c]=l,f=this[Uy];return f&&Uf(u)&&Uf(c)&&(f.request_headers[u.toLowerCase()]=c),o.apply(this,l)}}),t.apply(this,n)}}),qs(e,"send",function(t){return function(...n){const r=this[Uy];if(!r)return t.apply(this,n);n[0]!==void 0&&(r.body=n[0]);const i={args:[r.method,r.url],startTimestamp:Date.now(),xhr:this};return bd("xhr",i),t.apply(this,n)}})}function twt(e){if(Uf(e))return e;try{return e.toString()}catch{}}function nwt(){return"npm"}function rwt(){const e=typeof WeakSet=="function",t=e?new WeakSet:[];function n(i){if(e)return t.has(i)?!0:(t.add(i),!1);for(let a=0;an?Lye(e,t-1,n):r}function x9(e,t,n=1/0,r=1/0,i=rwt()){const[a,s]=i;if(t==null||["number","boolean","string"].includes(typeof t)&&!Oye(t))return t;const o=iwt(e,t);if(!o.startsWith("[object "))return o;if(t.__sentry_skip_normalization__)return t;const l=typeof t.__sentry_override_normalization_depth__=="number"?t.__sentry_override_normalization_depth__:n;if(l===0)return o.replace("object ","");if(a(t))return"[Circular ~]";const u=t;if(u&&typeof u.toJSON=="function")try{const g=u.toJSON();return x9("",g,l-1,r,i)}catch{}const c=Array.isArray(t)?[]:{};let f=0;const h=kye(t);for(const g in h){if(!Object.prototype.hasOwnProperty.call(h,g))continue;if(f>=r){c[g]="[MaxProperties ~]";break}const b=h[g];c[g]=x9(g,b,l-1,r,i),f++}return s(t),c}function iwt(e,t){try{if(e==="domain"&&t&&typeof t=="object"&&t._events)return"[Domain]";if(e==="domainEmitter")return"[DomainEmitter]";if(typeof global<"u"&&t===global)return"[Global]";if(typeof window<"u"&&t===window)return"[Window]";if(typeof document<"u"&&t===document)return"[Document]";if(Sye(t))return"[VueViewModel]";if(y2t(t))return"[SyntheticEvent]";if(typeof t=="number"&&t!==t)return"[NaN]";if(typeof t=="function")return`[Function: ${pp(t)}]`;if(typeof t=="symbol")return`[${String(t)}]`;if(typeof t=="bigint")return`[BigInt: ${String(t)}]`;const n=awt(t);return/^HTML(\w*)Element$/.test(n)?`[HTMLElement: ${n}]`:`[object ${n}]`}catch(n){return`**non-serializable** (${n})`}}function awt(e){const t=Object.getPrototypeOf(e);return t?t.constructor.name:"null prototype"}function swt(e){return~-encodeURI(e).split(/%..|./).length}function owt(e){return swt(JSON.stringify(e))}var Ih;(function(e){e[e.PENDING=0]="PENDING";const n=1;e[e.RESOLVED=n]="RESOLVED";const r=2;e[e.REJECTED=r]="REJECTED"})(Ih||(Ih={}));function hO(e){return new hu(t=>{t(e)})}function zQ(e){return new hu((t,n)=>{n(e)})}class hu{constructor(t){hu.prototype.__init.call(this),hu.prototype.__init2.call(this),hu.prototype.__init3.call(this),hu.prototype.__init4.call(this),this._state=Ih.PENDING,this._handlers=[];try{t(this._resolve,this._reject)}catch(n){this._reject(n)}}then(t,n){return new hu((r,i)=>{this._handlers.push([!1,a=>{if(!t)r(a);else try{r(t(a))}catch(s){i(s)}},a=>{if(!n)i(a);else try{r(n(a))}catch(s){i(s)}}]),this._executeHandlers()})}catch(t){return this.then(n=>n,t)}finally(t){return new hu((n,r)=>{let i,a;return this.then(s=>{a=!1,i=s,t&&t()},s=>{a=!0,i=s,t&&t()}).then(()=>{if(a){r(i);return}n(i)})})}__init(){this._resolve=t=>{this._setResult(Ih.RESOLVED,t)}}__init2(){this._reject=t=>{this._setResult(Ih.REJECTED,t)}}__init3(){this._setResult=(t,n)=>{if(this._state===Ih.PENDING){if(c6(n)){n.then(this._resolve,this._reject);return}this._state=t,this._value=n,this._executeHandlers()}}}__init4(){this._executeHandlers=()=>{if(this._state===Ih.PENDING)return;const t=this._handlers.slice();this._handlers=[],t.forEach(n=>{n[0]||(this._state===Ih.RESOLVED&&n[1](this._value),this._state===Ih.REJECTED&&n[2](this._value),n[0]=!0)})}}}function lwt(e){const t=[];function n(){return e===void 0||t.lengthr(o)).then(null,()=>r(o).then(null,()=>{})),o}function a(s){return new hu((o,l)=>{let u=t.length;if(!u)return o(!0);const c=setTimeout(()=>{s&&s>0&&o(!1)},s);t.forEach(f=>{hO(f).then(()=>{--u||(clearTimeout(c),o(!0))},l)})})}return{$:t,add:i,drain:a}}function i_(e){if(!e)return{};const t=e.match(/^(([^:/?#]+):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?$/);if(!t)return{};const n=t[6]||"",r=t[8]||"";return{host:t[4],path:t[5],protocol:t[2],search:n,hash:r,relative:t[5]+n+r}}const uwt=["fatal","error","warning","log","info","debug"];function cwt(e){return e==="warn"?"warning":uwt.includes(e)?e:"log"}const $ye=1e3;function sk(){return Date.now()/$ye}function dwt(){const{performance:e}=si;if(!e||!e.now)return sk;const t=Date.now()-e.now(),n=e.timeOrigin==null?t:e.timeOrigin;return()=>(n+e.now())/$ye}const ok=dwt(),Hf=(()=>{const{performance:e}=si;if(!e||!e.now)return;const t=3600*1e3,n=e.now(),r=Date.now(),i=e.timeOrigin?Math.abs(e.timeOrigin+n-r):t,a=i{const a=Lre(i);for(const s of Object.keys(a))r[s]=a[s];return r},{});else{if(!e)return;t=Lre(e)}const n=Object.entries(t).reduce((r,[i,a])=>{if(i.match(fwt)){const s=i.slice(Fye.length);r[s]=a}return r},{});if(Object.keys(n).length>0)return n}function Bye(e){if(!e)return;const t=Object.entries(e).reduce((n,[r,i])=>(i&&(n[`${Fye}${r}`]=i),n),{});return mwt(t)}function Lre(e){return e.split(",").map(t=>t.split("=").map(n=>decodeURIComponent(n.trim()))).reduce((t,[n,r])=>(t[n]=r,t),{})}function mwt(e){if(Object.keys(e).length!==0)return Object.entries(e).reduce((t,[n,r],i)=>{const a=`${encodeURIComponent(n)}=${encodeURIComponent(r)}`,s=i===0?a:`${t},${a}`;return s.length>hwt?(nS&&Pt.warn(`Not adding key: ${n} with val: ${r} to baggage header due to exceeding baggage size limits.`),t):s},"")}const gwt=new RegExp("^[ \\t]*([0-9a-f]{32})?-?([0-9a-f]{16})?-?([01])?[ \\t]*$");function bwt(e){if(!e)return;const t=e.match(gwt);if(!t)return;let n;return t[3]==="1"?n=!0:t[3]==="0"&&(n=!1),{traceId:t[1],parentSampled:n,parentSpanId:t[2]}}function ywt(e,t){const n=bwt(e),r=pwt(t),{traceId:i,parentSpanId:a,parentSampled:s}=n||{};return n?{traceparentData:n,dynamicSamplingContext:r||{},propagationContext:{traceId:i||La(),parentSpanId:a||La().substring(16),spanId:La().substring(16),sampled:s,dsc:r||{}}}:{traceparentData:n,dynamicSamplingContext:void 0,propagationContext:{traceId:i||La(),spanId:La().substring(16)}}}function jQ(e=La(),t=La().substring(16),n){let r="";return n!==void 0&&(r=n?"-1":"-0"),`${e}-${t}${r}`}function rS(e,t=[]){return[e,t]}function vwt(e,t){const[n,r]=e;return[n,[...r,t]]}function $re(e,t){const n=e[1];for(const r of n){const i=r[0].type;if(t(r,i))return!0}return!1}function k9(e,t){return(t||new TextEncoder).encode(e)}function Owt(e,t){const[n,r]=e;let i=JSON.stringify(n);function a(s){typeof i=="string"?i=typeof s=="string"?i+s:[k9(i,t),s]:i.push(typeof s=="string"?k9(s,t):s)}for(const s of r){const[o,l]=s;if(a(` ${JSON.stringify(o)} -`),typeof l=="string"||l instanceof Uint8Array)a(l);else{let u;try{u=JSON.stringify(l)}catch{u=JSON.stringify(um(l))}a(u)}}return typeof i=="string"?i:wwt(i)}function wwt(e){const t=e.reduce((i,a)=>i+a.length,0),n=new Uint8Array(t);let r=0;for(const i of e)n.set(i,r),r+=i.length;return n}function xwt(e,t){const n=typeof e.data=="string"?k9(e.data,t):e.data;return[gc({type:"attachment",length:n.length,filename:e.filename,content_type:e.contentType,attachment_type:e.attachmentType}),n]}const Twt={session:"session",sessions:"session",attachment:"attachment",transaction:"transaction",event:"error",client_report:"internal",user_report:"default",profile:"profile",replay_event:"replay",replay_recording:"replay",check_in:"monitor",feedback:"feedback",statsd:"unknown"};function Fre(e){return Twt[e]}function Uye(e){if(!e||!e.sdk)return;const{name:t,version:n}=e.sdk;return{name:t,version:n}}function kwt(e,t,n,r){const i=e.sdkProcessingMetadata&&e.sdkProcessingMetadata.dynamicSamplingContext;return{event_id:e.event_id,sent_at:new Date().toISOString(),...t&&{sdk:t},...!!n&&r&&{dsn:ak(r)},...i&&{trace:gc({...i})}}}function Cwt(e,t,n){const r=[{type:"client_report"},{timestamp:n||sk(),discarded_events:e}];return rS(t?{dsn:t}:{},[r])}const Awt=60*1e3;function _wt(e,t=Date.now()){const n=parseInt(`${e}`,10);if(!isNaN(n))return n*1e3;const r=Date.parse(`${e}`);return isNaN(r)?Awt:r-t}function Rwt(e,t){return e[t]||e.all||0}function Iwt(e,t,n=Date.now()){return Rwt(e,t)>n}function Dwt(e,{statusCode:t,headers:n},r=Date.now()){const i={...e},a=n&&n["x-sentry-rate-limits"],s=n&&n["retry-after"];if(a)for(const o of a.trim().split(",")){const[l,u]=o.split(":",2),c=parseInt(l,10),f=(isNaN(c)?60:c)*1e3;if(!u)i.all=r+f;else for(const h of u.split(";"))i[h]=r+f}else s?i.all=r+_wt(s,r):t===429&&(i.all=r+60*1e3);return i}const zn=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,f6="production";function HQ(){return Eye("globalEventProcessors",()=>[])}function Nwt(e){HQ().push(e)}function m5(e,t,n,r=0){return new hu((i,a)=>{const s=e[r];if(t===null||typeof s!="function")i(t);else{const o=s({...t},n);zn&&s.id&&o===null&&Pt.log(`Event processor "${s.id}" dropped event`),c6(o)?o.then(l=>m5(e,l,n,r+1).then(i)).then(null,a):m5(e,o,n,r+1).then(i).then(null,a)}})}function zye(e){const t=ok(),n={sid:La(),init:!0,timestamp:t,started:t,duration:0,status:"ok",errors:0,ignoreDuration:!1,toJSON:()=>Pwt(n)};return e&&S1(n,e),n}function S1(e,t={}){if(t.user&&(!e.ipAddress&&t.user.ip_address&&(e.ipAddress=t.user.ip_address),!e.did&&!t.did&&(e.did=t.user.id||t.user.email||t.user.username)),e.timestamp=t.timestamp||ok(),t.abnormal_mechanism&&(e.abnormal_mechanism=t.abnormal_mechanism),t.ignoreDuration&&(e.ignoreDuration=t.ignoreDuration),t.sid&&(e.sid=t.sid.length===32?t.sid:La()),t.init!==void 0&&(e.init=t.init),!e.did&&t.did&&(e.did=`${t.did}`),typeof t.started=="number"&&(e.started=t.started),e.ignoreDuration)e.duration=void 0;else if(typeof t.duration=="number")e.duration=t.duration;else{const n=e.timestamp-e.started;e.duration=n>=0?n:0}t.release&&(e.release=t.release),t.environment&&(e.environment=t.environment),!e.ipAddress&&t.ipAddress&&(e.ipAddress=t.ipAddress),!e.userAgent&&t.userAgent&&(e.userAgent=t.userAgent),typeof t.errors=="number"&&(e.errors=t.errors),t.status&&(e.status=t.status)}function jye(e,t){let n={};t?n={status:t}:e.status==="ok"&&(n={status:"exited"}),S1(e,n)}function Pwt(e){return gc({sid:`${e.sid}`,init:e.init,started:new Date(e.started*1e3).toISOString(),timestamp:new Date(e.timestamp*1e3).toISOString(),status:e.status,errors:e.errors,did:typeof e.did=="number"||typeof e.did=="string"?`${e.did}`:void 0,duration:e.duration,abnormal_mechanism:e.abnormal_mechanism,attrs:{release:e.release,environment:e.environment,ip_address:e.ipAddress,user_agent:e.userAgent}})}const Mwt=0,Hye=1;function VQ(e){const{spanId:t,traceId:n}=e.spanContext(),{data:r,op:i,parent_span_id:a,status:s,tags:o,origin:l}=Zo(e);return gc({data:r,op:i,parent_span_id:a,span_id:t,status:s,tags:o,trace_id:n,origin:l})}function h6(e){const{traceId:t,spanId:n}=e.spanContext(),r=Vye(e);return jQ(t,n,r)}function p6(e){return typeof e=="number"?Bre(e):Array.isArray(e)?e[0]+e[1]/1e9:e instanceof Date?Bre(e.getTime()):ok()}function Bre(e){return e>9999999999?e/1e3:e}function Zo(e){return Lwt(e)?e.getSpanJSON():typeof e.toJSON=="function"?e.toJSON():{}}function Lwt(e){return typeof e.getSpanJSON=="function"}function Vye(e){const{traceFlags:t}=e.spanContext();return!!(t&Hye)}function $wt(e,t,n,r,i,a){const{normalizeDepth:s=3,normalizeMaxBreadth:o=1e3}=e,l={...t,event_id:t.event_id||n.event_id||La(),timestamp:t.timestamp||sk()},u=n.integrations||e.integrations.map(E=>E.name);Fwt(l,e),zwt(l,u),t.type===void 0&&Bwt(l,e.stackParser);const c=Hwt(r,n.captureContext);n.mechanism&&Ax(l,n.mechanism);const f=i&&i.getEventProcessors?i.getEventProcessors():[],h=nxt().getScopeData();if(a){const E=a.getScopeData();Hre(h,E)}if(c){const E=c.getScopeData();Hre(h,E)}const g=[...n.attachments||[],...h.attachments];g.length&&(n.attachments=g),Gye(l,h);const b=[...f,...HQ(),...h.eventProcessors];return m5(b,l,n).then(E=>(E&&Uwt(E),typeof s=="number"&&s>0?jwt(E,s,o):E))}function Fwt(e,t){const{environment:n,release:r,dist:i,maxValueLength:a=250}=t;"environment"in e||(e.environment="environment"in t?n:f6),e.release===void 0&&r!==void 0&&(e.release=r),e.dist===void 0&&i!==void 0&&(e.dist=i),e.message&&(e.message=gv(e.message,a));const s=e.exception&&e.exception.values&&e.exception.values[0];s&&s.value&&(s.value=gv(s.value,a));const o=e.request;o&&o.url&&(o.url=gv(o.url,a))}const Ure=new WeakMap;function Bwt(e,t){const n=si._sentryDebugIds;if(!n)return;let r;const i=Ure.get(t);i?r=i:(r=new Map,Ure.set(t,r));const a=Object.keys(n).reduce((s,o)=>{let l;const u=r.get(o);u?l=u:(l=t(o),r.set(o,l));for(let c=l.length-1;c>=0;c--){const f=l[c];if(f.filename){s[f.filename]=n[o];break}}return s},{});try{e.exception.values.forEach(s=>{s.stacktrace.frames.forEach(o=>{o.filename&&(o.debug_id=a[o.filename])})})}catch{}}function Uwt(e){const t={};try{e.exception.values.forEach(r=>{r.stacktrace.frames.forEach(i=>{i.debug_id&&(i.abs_path?t[i.abs_path]=i.debug_id:i.filename&&(t[i.filename]=i.debug_id),delete i.debug_id)})})}catch{}if(Object.keys(t).length===0)return;e.debug_meta=e.debug_meta||{},e.debug_meta.images=e.debug_meta.images||[];const n=e.debug_meta.images;Object.keys(t).forEach(r=>{n.push({type:"sourcemap",code_file:r,debug_id:t[r]})})}function zwt(e,t){t.length>0&&(e.sdk=e.sdk||{},e.sdk.integrations=[...e.sdk.integrations||[],...t])}function jwt(e,t,n){if(!e)return null;const r={...e,...e.breadcrumbs&&{breadcrumbs:e.breadcrumbs.map(i=>({...i,...i.data&&{data:um(i.data,t,n)}}))},...e.user&&{user:um(e.user,t,n)},...e.contexts&&{contexts:um(e.contexts,t,n)},...e.extra&&{extra:um(e.extra,t,n)}};return e.contexts&&e.contexts.trace&&r.contexts&&(r.contexts.trace=e.contexts.trace,e.contexts.trace.data&&(r.contexts.trace.data=um(e.contexts.trace.data,t,n))),e.spans&&(r.spans=e.spans.map(i=>{const a=Zo(i).data;return a&&(i.data=um(a,t,n)),i})),r}function Hwt(e,t){if(!t)return e;const n=e?e.clone():new _f;return n.update(t),n}function Vwt(e){if(e)return Wwt(e)?{captureContext:e}:qwt(e)?{captureContext:e}:e}function Wwt(e){return e instanceof _f||typeof e=="function"}const Qwt=["user","level","extra","contexts","tags","fingerprint","requestSession","propagationContext"];function qwt(e){return Object.keys(e).some(t=>Qwt.includes(t))}function Gwt(e,t){return $c().captureException(e,Vwt(t))}function Wye(e,t){return $c().captureEvent(e,t)}function E1(e,t){$c().addBreadcrumb(e,t)}function Ywt(...e){const t=$c();if(e.length===2){const[n,r]=e;return n?t.withScope(()=>(t.getStackTop().scope=n,r(n))):t.withScope(r)}return t.withScope(e[0])}function eo(){return $c().getClient()}function Tp(){return $c().getScope()}function zre(e){const t=eo(),n=j1(),r=Tp(),{release:i,environment:a=f6}=t&&t.getOptions()||{},{userAgent:s}=si.navigator||{},o=zye({release:i,environment:a,user:r.getUser()||n.getUser(),...s&&{userAgent:s},...e}),l=n.getSession();return l&&l.status==="ok"&&S1(l,{status:"exited"}),Qye(),n.setSession(o),r.setSession(o),o}function Qye(){const e=j1(),t=Tp(),n=t.getSession()||e.getSession();n&&jye(n),qye(),e.setSession(),t.setSession()}function qye(){const e=j1(),t=Tp(),n=eo(),r=t.getSession()||e.getSession();r&&n&&n.captureSession&&n.captureSession(r)}function jre(e=!1){if(e){Qye();return}qye()}function g5(e){return e.transaction}function m6(e,t,n){const r=t.getOptions(),{publicKey:i}=t.getDsn()||{},{segment:a}=n&&n.getUser()||{},s=gc({environment:r.environment||f6,release:r.release,user_segment:a,public_key:i,trace_id:e});return t.emit&&t.emit("createDsc",s),s}function _x(e){const t=eo();if(!t)return{};const n=m6(Zo(e).trace_id||"",t,Tp()),r=g5(e);if(!r)return n;const i=r&&r._frozenDynamicSamplingContext;if(i)return i;const{sampleRate:a,source:s}=r.metadata;a!=null&&(n.sample_rate=`${a}`);const o=Zo(r);return s&&s!=="url"&&(n.transaction=o.description),n.sampled=String(Vye(r)),t.emit&&t.emit("createDsc",n),n}function Gye(e,t){const{fingerprint:n,span:r,breadcrumbs:i,sdkProcessingMetadata:a}=t;Zwt(e,t),r&&Jwt(e,r),ext(e,n),Xwt(e,i),Kwt(e,a)}function Hre(e,t){const{extra:n,tags:r,user:i,contexts:a,level:s,sdkProcessingMetadata:o,breadcrumbs:l,fingerprint:u,eventProcessors:c,attachments:f,propagationContext:h,transactionName:g,span:b}=t;WE(e,"extra",n),WE(e,"tags",r),WE(e,"user",i),WE(e,"contexts",a),WE(e,"sdkProcessingMetadata",o),s&&(e.level=s),g&&(e.transactionName=g),b&&(e.span=b),l.length&&(e.breadcrumbs=[...e.breadcrumbs,...l]),u.length&&(e.fingerprint=[...e.fingerprint,...u]),c.length&&(e.eventProcessors=[...e.eventProcessors,...c]),f.length&&(e.attachments=[...e.attachments,...f]),e.propagationContext={...e.propagationContext,...h}}function WE(e,t,n){if(n&&Object.keys(n).length){e[t]={...e[t]};for(const r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[t][r]=n[r])}}function Zwt(e,t){const{extra:n,tags:r,user:i,contexts:a,level:s,transactionName:o}=t,l=gc(n);l&&Object.keys(l).length&&(e.extra={...l,...e.extra});const u=gc(r);u&&Object.keys(u).length&&(e.tags={...u,...e.tags});const c=gc(i);c&&Object.keys(c).length&&(e.user={...c,...e.user});const f=gc(a);f&&Object.keys(f).length&&(e.contexts={...f,...e.contexts}),s&&(e.level=s),o&&(e.transaction=o)}function Xwt(e,t){const n=[...e.breadcrumbs||[],...t];e.breadcrumbs=n.length?n:void 0}function Kwt(e,t){e.sdkProcessingMetadata={...e.sdkProcessingMetadata,...t}}function Jwt(e,t){e.contexts={trace:VQ(t),...e.contexts};const n=g5(t);if(n){e.sdkProcessingMetadata={dynamicSamplingContext:_x(t),...e.sdkProcessingMetadata};const r=Zo(n).description;r&&(e.tags={transaction:r,...e.tags})}}function ext(e,t){e.fingerprint=e.fingerprint?Rye(e.fingerprint):[],t&&(e.fingerprint=e.fingerprint.concat(t)),e.fingerprint&&!e.fingerprint.length&&delete e.fingerprint}const txt=100;let y7;class _f{constructor(){this._notifyingListeners=!1,this._scopeListeners=[],this._eventProcessors=[],this._breadcrumbs=[],this._attachments=[],this._user={},this._tags={},this._extra={},this._contexts={},this._sdkProcessingMetadata={},this._propagationContext=Vre()}static clone(t){return t?t.clone():new _f}clone(){const t=new _f;return t._breadcrumbs=[...this._breadcrumbs],t._tags={...this._tags},t._extra={...this._extra},t._contexts={...this._contexts},t._user=this._user,t._level=this._level,t._span=this._span,t._session=this._session,t._transactionName=this._transactionName,t._fingerprint=this._fingerprint,t._eventProcessors=[...this._eventProcessors],t._requestSession=this._requestSession,t._attachments=[...this._attachments],t._sdkProcessingMetadata={...this._sdkProcessingMetadata},t._propagationContext={...this._propagationContext},t._client=this._client,t}setClient(t){this._client=t}getClient(){return this._client}addScopeListener(t){this._scopeListeners.push(t)}addEventProcessor(t){return this._eventProcessors.push(t),this}setUser(t){return this._user=t||{email:void 0,id:void 0,ip_address:void 0,segment:void 0,username:void 0},this._session&&S1(this._session,{user:t}),this._notifyScopeListeners(),this}getUser(){return this._user}getRequestSession(){return this._requestSession}setRequestSession(t){return this._requestSession=t,this}setTags(t){return this._tags={...this._tags,...t},this._notifyScopeListeners(),this}setTag(t,n){return this._tags={...this._tags,[t]:n},this._notifyScopeListeners(),this}setExtras(t){return this._extra={...this._extra,...t},this._notifyScopeListeners(),this}setExtra(t,n){return this._extra={...this._extra,[t]:n},this._notifyScopeListeners(),this}setFingerprint(t){return this._fingerprint=t,this._notifyScopeListeners(),this}setLevel(t){return this._level=t,this._notifyScopeListeners(),this}setTransactionName(t){return this._transactionName=t,this._notifyScopeListeners(),this}setContext(t,n){return n===null?delete this._contexts[t]:this._contexts[t]=n,this._notifyScopeListeners(),this}setSpan(t){return this._span=t,this._notifyScopeListeners(),this}getSpan(){return this._span}getTransaction(){const t=this._span;return t&&t.transaction}setSession(t){return t?this._session=t:delete this._session,this._notifyScopeListeners(),this}getSession(){return this._session}update(t){if(!t)return this;if(typeof t=="function"){const n=t(this);return n instanceof _f?n:this}return t instanceof _f?(this._tags={...this._tags,...t._tags},this._extra={...this._extra,...t._extra},this._contexts={...this._contexts,...t._contexts},t._user&&Object.keys(t._user).length&&(this._user=t._user),t._level&&(this._level=t._level),t._fingerprint&&(this._fingerprint=t._fingerprint),t._requestSession&&(this._requestSession=t._requestSession),t._propagationContext&&(this._propagationContext=t._propagationContext)):fO(t)&&(t=t,this._tags={...this._tags,...t.tags},this._extra={...this._extra,...t.extra},this._contexts={...this._contexts,...t.contexts},t.user&&(this._user=t.user),t.level&&(this._level=t.level),t.fingerprint&&(this._fingerprint=t.fingerprint),t.requestSession&&(this._requestSession=t.requestSession),t.propagationContext&&(this._propagationContext=t.propagationContext)),this}clear(){return this._breadcrumbs=[],this._tags={},this._extra={},this._user={},this._contexts={},this._level=void 0,this._transactionName=void 0,this._fingerprint=void 0,this._requestSession=void 0,this._span=void 0,this._session=void 0,this._notifyScopeListeners(),this._attachments=[],this._propagationContext=Vre(),this}addBreadcrumb(t,n){const r=typeof n=="number"?n:txt;if(r<=0)return this;const i={timestamp:sk(),...t},a=this._breadcrumbs;return a.push(i),this._breadcrumbs=a.length>r?a.slice(-r):a,this._notifyScopeListeners(),this}getLastBreadcrumb(){return this._breadcrumbs[this._breadcrumbs.length-1]}clearBreadcrumbs(){return this._breadcrumbs=[],this._notifyScopeListeners(),this}addAttachment(t){return this._attachments.push(t),this}getAttachments(){return this.getScopeData().attachments}clearAttachments(){return this._attachments=[],this}getScopeData(){const{_breadcrumbs:t,_attachments:n,_contexts:r,_tags:i,_extra:a,_user:s,_level:o,_fingerprint:l,_eventProcessors:u,_propagationContext:c,_sdkProcessingMetadata:f,_transactionName:h,_span:g}=this;return{breadcrumbs:t,attachments:n,contexts:r,tags:i,extra:a,user:s,level:o,fingerprint:l||[],eventProcessors:u,propagationContext:c,sdkProcessingMetadata:f,transactionName:h,span:g}}applyToEvent(t,n={},r=[]){Gye(t,this.getScopeData());const i=[...r,...HQ(),...this._eventProcessors];return m5(i,t,n)}setSDKProcessingMetadata(t){return this._sdkProcessingMetadata={...this._sdkProcessingMetadata,...t},this}setPropagationContext(t){return this._propagationContext=t,this}getPropagationContext(){return this._propagationContext}captureException(t,n){const r=n&&n.event_id?n.event_id:La();if(!this._client)return Pt.warn("No client configured on scope - will not capture exception!"),r;const i=new Error("Sentry syntheticException");return this._client.captureException(t,{originalException:t,syntheticException:i,...n,event_id:r},this),r}captureMessage(t,n,r){const i=r&&r.event_id?r.event_id:La();if(!this._client)return Pt.warn("No client configured on scope - will not capture message!"),i;const a=new Error(t);return this._client.captureMessage(t,n,{originalException:t,syntheticException:a,...r,event_id:i},this),i}captureEvent(t,n){const r=n&&n.event_id?n.event_id:La();return this._client?(this._client.captureEvent(t,{...n,event_id:r},this),r):(Pt.warn("No client configured on scope - will not capture event!"),r)}_notifyScopeListeners(){this._notifyingListeners||(this._notifyingListeners=!0,this._scopeListeners.forEach(t=>{t(this)}),this._notifyingListeners=!1)}}function nxt(){return y7||(y7=new _f),y7}function Vre(){return{traceId:La(),spanId:La().substring(16)}}const C9="7.99.0",Yye=parseFloat(C9),rxt=100;class Zye{constructor(t,n,r,i=Yye){this._version=i;let a;n?a=n:(a=new _f,a.setClient(t));let s;r?s=r:(s=new _f,s.setClient(t)),this._stack=[{scope:a}],t&&this.bindClient(t),this._isolationScope=s}isOlderThan(t){return this._version(this.popScope(),i),i=>{throw this.popScope(),i}):(this.popScope(),r)}getClient(){return this.getStackTop().client}getScope(){return this.getStackTop().scope}getIsolationScope(){return this._isolationScope}getStack(){return this._stack}getStackTop(){return this._stack[this._stack.length-1]}captureException(t,n){const r=this._lastEventId=n&&n.event_id?n.event_id:La(),i=new Error("Sentry syntheticException");return this.getScope().captureException(t,{originalException:t,syntheticException:i,...n,event_id:r}),r}captureMessage(t,n,r){const i=this._lastEventId=r&&r.event_id?r.event_id:La(),a=new Error(t);return this.getScope().captureMessage(t,n,{originalException:t,syntheticException:a,...r,event_id:i}),i}captureEvent(t,n){const r=n&&n.event_id?n.event_id:La();return t.type||(this._lastEventId=r),this.getScope().captureEvent(t,{...n,event_id:r}),r}lastEventId(){return this._lastEventId}addBreadcrumb(t,n){const{scope:r,client:i}=this.getStackTop();if(!i)return;const{beforeBreadcrumb:a=null,maxBreadcrumbs:s=rxt}=i.getOptions&&i.getOptions()||{};if(s<=0)return;const l={timestamp:sk(),...t},u=a?d6(()=>a(l,n)):l;u!==null&&(i.emit&&i.emit("beforeAddBreadcrumb",u,n),r.addBreadcrumb(u,s))}setUser(t){this.getScope().setUser(t),this.getIsolationScope().setUser(t)}setTags(t){this.getScope().setTags(t),this.getIsolationScope().setTags(t)}setExtras(t){this.getScope().setExtras(t),this.getIsolationScope().setExtras(t)}setTag(t,n){this.getScope().setTag(t,n),this.getIsolationScope().setTag(t,n)}setExtra(t,n){this.getScope().setExtra(t,n),this.getIsolationScope().setExtra(t,n)}setContext(t,n){this.getScope().setContext(t,n),this.getIsolationScope().setContext(t,n)}configureScope(t){const{scope:n,client:r}=this.getStackTop();r&&t(n)}run(t){const n=Wre(this);try{t(this)}finally{Wre(n)}}getIntegration(t){const n=this.getClient();if(!n)return null;try{return n.getIntegration(t)}catch{return zn&&Pt.warn(`Cannot retrieve integration ${t.id} from the current Hub`),null}}startTransaction(t,n){const r=this._callExtensionMethod("startTransaction",t,n);return zn&&!r&&(this.getClient()?Pt.warn(`Tracing extension 'startTransaction' has not been added. Call 'addTracingExtensions' before calling 'init': +`),typeof l=="string"||l instanceof Uint8Array)a(l);else{let u;try{u=JSON.stringify(l)}catch{u=JSON.stringify(um(l))}a(u)}}return typeof i=="string"?i:Swt(i)}function Swt(e){const t=e.reduce((i,a)=>i+a.length,0),n=new Uint8Array(t);let r=0;for(const i of e)n.set(i,r),r+=i.length;return n}function Ewt(e,t){const n=typeof e.data=="string"?k9(e.data,t):e.data;return[gc({type:"attachment",length:n.length,filename:e.filename,content_type:e.contentType,attachment_type:e.attachmentType}),n]}const wwt={session:"session",sessions:"session",attachment:"attachment",transaction:"transaction",event:"error",client_report:"internal",user_report:"default",profile:"profile",replay_event:"replay",replay_recording:"replay",check_in:"monitor",feedback:"feedback",statsd:"unknown"};function Fre(e){return wwt[e]}function Uye(e){if(!e||!e.sdk)return;const{name:t,version:n}=e.sdk;return{name:t,version:n}}function xwt(e,t,n,r){const i=e.sdkProcessingMetadata&&e.sdkProcessingMetadata.dynamicSamplingContext;return{event_id:e.event_id,sent_at:new Date().toISOString(),...t&&{sdk:t},...!!n&&r&&{dsn:ak(r)},...i&&{trace:gc({...i})}}}function Twt(e,t,n){const r=[{type:"client_report"},{timestamp:n||sk(),discarded_events:e}];return rS(t?{dsn:t}:{},[r])}const kwt=60*1e3;function Cwt(e,t=Date.now()){const n=parseInt(`${e}`,10);if(!isNaN(n))return n*1e3;const r=Date.parse(`${e}`);return isNaN(r)?kwt:r-t}function Awt(e,t){return e[t]||e.all||0}function _wt(e,t,n=Date.now()){return Awt(e,t)>n}function Rwt(e,{statusCode:t,headers:n},r=Date.now()){const i={...e},a=n&&n["x-sentry-rate-limits"],s=n&&n["retry-after"];if(a)for(const o of a.trim().split(",")){const[l,u]=o.split(":",2),c=parseInt(l,10),f=(isNaN(c)?60:c)*1e3;if(!u)i.all=r+f;else for(const h of u.split(";"))i[h]=r+f}else s?i.all=r+Cwt(s,r):t===429&&(i.all=r+60*1e3);return i}const zn=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,f6="production";function HQ(){return Eye("globalEventProcessors",()=>[])}function Iwt(e){HQ().push(e)}function m5(e,t,n,r=0){return new hu((i,a)=>{const s=e[r];if(t===null||typeof s!="function")i(t);else{const o=s({...t},n);zn&&s.id&&o===null&&Pt.log(`Event processor "${s.id}" dropped event`),c6(o)?o.then(l=>m5(e,l,n,r+1).then(i)).then(null,a):m5(e,o,n,r+1).then(i).then(null,a)}})}function zye(e){const t=ok(),n={sid:La(),init:!0,timestamp:t,started:t,duration:0,status:"ok",errors:0,ignoreDuration:!1,toJSON:()=>Dwt(n)};return e&&S1(n,e),n}function S1(e,t={}){if(t.user&&(!e.ipAddress&&t.user.ip_address&&(e.ipAddress=t.user.ip_address),!e.did&&!t.did&&(e.did=t.user.id||t.user.email||t.user.username)),e.timestamp=t.timestamp||ok(),t.abnormal_mechanism&&(e.abnormal_mechanism=t.abnormal_mechanism),t.ignoreDuration&&(e.ignoreDuration=t.ignoreDuration),t.sid&&(e.sid=t.sid.length===32?t.sid:La()),t.init!==void 0&&(e.init=t.init),!e.did&&t.did&&(e.did=`${t.did}`),typeof t.started=="number"&&(e.started=t.started),e.ignoreDuration)e.duration=void 0;else if(typeof t.duration=="number")e.duration=t.duration;else{const n=e.timestamp-e.started;e.duration=n>=0?n:0}t.release&&(e.release=t.release),t.environment&&(e.environment=t.environment),!e.ipAddress&&t.ipAddress&&(e.ipAddress=t.ipAddress),!e.userAgent&&t.userAgent&&(e.userAgent=t.userAgent),typeof t.errors=="number"&&(e.errors=t.errors),t.status&&(e.status=t.status)}function jye(e,t){let n={};t?n={status:t}:e.status==="ok"&&(n={status:"exited"}),S1(e,n)}function Dwt(e){return gc({sid:`${e.sid}`,init:e.init,started:new Date(e.started*1e3).toISOString(),timestamp:new Date(e.timestamp*1e3).toISOString(),status:e.status,errors:e.errors,did:typeof e.did=="number"||typeof e.did=="string"?`${e.did}`:void 0,duration:e.duration,abnormal_mechanism:e.abnormal_mechanism,attrs:{release:e.release,environment:e.environment,ip_address:e.ipAddress,user_agent:e.userAgent}})}const Nwt=0,Hye=1;function VQ(e){const{spanId:t,traceId:n}=e.spanContext(),{data:r,op:i,parent_span_id:a,status:s,tags:o,origin:l}=Zo(e);return gc({data:r,op:i,parent_span_id:a,span_id:t,status:s,tags:o,trace_id:n,origin:l})}function h6(e){const{traceId:t,spanId:n}=e.spanContext(),r=Vye(e);return jQ(t,n,r)}function p6(e){return typeof e=="number"?Bre(e):Array.isArray(e)?e[0]+e[1]/1e9:e instanceof Date?Bre(e.getTime()):ok()}function Bre(e){return e>9999999999?e/1e3:e}function Zo(e){return Pwt(e)?e.getSpanJSON():typeof e.toJSON=="function"?e.toJSON():{}}function Pwt(e){return typeof e.getSpanJSON=="function"}function Vye(e){const{traceFlags:t}=e.spanContext();return!!(t&Hye)}function Mwt(e,t,n,r,i,a){const{normalizeDepth:s=3,normalizeMaxBreadth:o=1e3}=e,l={...t,event_id:t.event_id||n.event_id||La(),timestamp:t.timestamp||sk()},u=n.integrations||e.integrations.map(E=>E.name);Lwt(l,e),Bwt(l,u),t.type===void 0&&$wt(l,e.stackParser);const c=zwt(r,n.captureContext);n.mechanism&&Ax(l,n.mechanism);const f=i&&i.getEventProcessors?i.getEventProcessors():[],h=ext().getScopeData();if(a){const E=a.getScopeData();Hre(h,E)}if(c){const E=c.getScopeData();Hre(h,E)}const g=[...n.attachments||[],...h.attachments];g.length&&(n.attachments=g),Gye(l,h);const b=[...f,...HQ(),...h.eventProcessors];return m5(b,l,n).then(E=>(E&&Fwt(E),typeof s=="number"&&s>0?Uwt(E,s,o):E))}function Lwt(e,t){const{environment:n,release:r,dist:i,maxValueLength:a=250}=t;"environment"in e||(e.environment="environment"in t?n:f6),e.release===void 0&&r!==void 0&&(e.release=r),e.dist===void 0&&i!==void 0&&(e.dist=i),e.message&&(e.message=gv(e.message,a));const s=e.exception&&e.exception.values&&e.exception.values[0];s&&s.value&&(s.value=gv(s.value,a));const o=e.request;o&&o.url&&(o.url=gv(o.url,a))}const Ure=new WeakMap;function $wt(e,t){const n=si._sentryDebugIds;if(!n)return;let r;const i=Ure.get(t);i?r=i:(r=new Map,Ure.set(t,r));const a=Object.keys(n).reduce((s,o)=>{let l;const u=r.get(o);u?l=u:(l=t(o),r.set(o,l));for(let c=l.length-1;c>=0;c--){const f=l[c];if(f.filename){s[f.filename]=n[o];break}}return s},{});try{e.exception.values.forEach(s=>{s.stacktrace.frames.forEach(o=>{o.filename&&(o.debug_id=a[o.filename])})})}catch{}}function Fwt(e){const t={};try{e.exception.values.forEach(r=>{r.stacktrace.frames.forEach(i=>{i.debug_id&&(i.abs_path?t[i.abs_path]=i.debug_id:i.filename&&(t[i.filename]=i.debug_id),delete i.debug_id)})})}catch{}if(Object.keys(t).length===0)return;e.debug_meta=e.debug_meta||{},e.debug_meta.images=e.debug_meta.images||[];const n=e.debug_meta.images;Object.keys(t).forEach(r=>{n.push({type:"sourcemap",code_file:r,debug_id:t[r]})})}function Bwt(e,t){t.length>0&&(e.sdk=e.sdk||{},e.sdk.integrations=[...e.sdk.integrations||[],...t])}function Uwt(e,t,n){if(!e)return null;const r={...e,...e.breadcrumbs&&{breadcrumbs:e.breadcrumbs.map(i=>({...i,...i.data&&{data:um(i.data,t,n)}}))},...e.user&&{user:um(e.user,t,n)},...e.contexts&&{contexts:um(e.contexts,t,n)},...e.extra&&{extra:um(e.extra,t,n)}};return e.contexts&&e.contexts.trace&&r.contexts&&(r.contexts.trace=e.contexts.trace,e.contexts.trace.data&&(r.contexts.trace.data=um(e.contexts.trace.data,t,n))),e.spans&&(r.spans=e.spans.map(i=>{const a=Zo(i).data;return a&&(i.data=um(a,t,n)),i})),r}function zwt(e,t){if(!t)return e;const n=e?e.clone():new _f;return n.update(t),n}function jwt(e){if(e)return Hwt(e)?{captureContext:e}:Wwt(e)?{captureContext:e}:e}function Hwt(e){return e instanceof _f||typeof e=="function"}const Vwt=["user","level","extra","contexts","tags","fingerprint","requestSession","propagationContext"];function Wwt(e){return Object.keys(e).some(t=>Vwt.includes(t))}function Qwt(e,t){return $c().captureException(e,jwt(t))}function Wye(e,t){return $c().captureEvent(e,t)}function E1(e,t){$c().addBreadcrumb(e,t)}function qwt(...e){const t=$c();if(e.length===2){const[n,r]=e;return n?t.withScope(()=>(t.getStackTop().scope=n,r(n))):t.withScope(r)}return t.withScope(e[0])}function eo(){return $c().getClient()}function Tp(){return $c().getScope()}function zre(e){const t=eo(),n=j1(),r=Tp(),{release:i,environment:a=f6}=t&&t.getOptions()||{},{userAgent:s}=si.navigator||{},o=zye({release:i,environment:a,user:r.getUser()||n.getUser(),...s&&{userAgent:s},...e}),l=n.getSession();return l&&l.status==="ok"&&S1(l,{status:"exited"}),Qye(),n.setSession(o),r.setSession(o),o}function Qye(){const e=j1(),t=Tp(),n=t.getSession()||e.getSession();n&&jye(n),qye(),e.setSession(),t.setSession()}function qye(){const e=j1(),t=Tp(),n=eo(),r=t.getSession()||e.getSession();r&&n&&n.captureSession&&n.captureSession(r)}function jre(e=!1){if(e){Qye();return}qye()}function g5(e){return e.transaction}function m6(e,t,n){const r=t.getOptions(),{publicKey:i}=t.getDsn()||{},{segment:a}=n&&n.getUser()||{},s=gc({environment:r.environment||f6,release:r.release,user_segment:a,public_key:i,trace_id:e});return t.emit&&t.emit("createDsc",s),s}function _x(e){const t=eo();if(!t)return{};const n=m6(Zo(e).trace_id||"",t,Tp()),r=g5(e);if(!r)return n;const i=r&&r._frozenDynamicSamplingContext;if(i)return i;const{sampleRate:a,source:s}=r.metadata;a!=null&&(n.sample_rate=`${a}`);const o=Zo(r);return s&&s!=="url"&&(n.transaction=o.description),n.sampled=String(Vye(r)),t.emit&&t.emit("createDsc",n),n}function Gye(e,t){const{fingerprint:n,span:r,breadcrumbs:i,sdkProcessingMetadata:a}=t;Gwt(e,t),r&&Xwt(e,r),Kwt(e,n),Ywt(e,i),Zwt(e,a)}function Hre(e,t){const{extra:n,tags:r,user:i,contexts:a,level:s,sdkProcessingMetadata:o,breadcrumbs:l,fingerprint:u,eventProcessors:c,attachments:f,propagationContext:h,transactionName:g,span:b}=t;WE(e,"extra",n),WE(e,"tags",r),WE(e,"user",i),WE(e,"contexts",a),WE(e,"sdkProcessingMetadata",o),s&&(e.level=s),g&&(e.transactionName=g),b&&(e.span=b),l.length&&(e.breadcrumbs=[...e.breadcrumbs,...l]),u.length&&(e.fingerprint=[...e.fingerprint,...u]),c.length&&(e.eventProcessors=[...e.eventProcessors,...c]),f.length&&(e.attachments=[...e.attachments,...f]),e.propagationContext={...e.propagationContext,...h}}function WE(e,t,n){if(n&&Object.keys(n).length){e[t]={...e[t]};for(const r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[t][r]=n[r])}}function Gwt(e,t){const{extra:n,tags:r,user:i,contexts:a,level:s,transactionName:o}=t,l=gc(n);l&&Object.keys(l).length&&(e.extra={...l,...e.extra});const u=gc(r);u&&Object.keys(u).length&&(e.tags={...u,...e.tags});const c=gc(i);c&&Object.keys(c).length&&(e.user={...c,...e.user});const f=gc(a);f&&Object.keys(f).length&&(e.contexts={...f,...e.contexts}),s&&(e.level=s),o&&(e.transaction=o)}function Ywt(e,t){const n=[...e.breadcrumbs||[],...t];e.breadcrumbs=n.length?n:void 0}function Zwt(e,t){e.sdkProcessingMetadata={...e.sdkProcessingMetadata,...t}}function Xwt(e,t){e.contexts={trace:VQ(t),...e.contexts};const n=g5(t);if(n){e.sdkProcessingMetadata={dynamicSamplingContext:_x(t),...e.sdkProcessingMetadata};const r=Zo(n).description;r&&(e.tags={transaction:r,...e.tags})}}function Kwt(e,t){e.fingerprint=e.fingerprint?Rye(e.fingerprint):[],t&&(e.fingerprint=e.fingerprint.concat(t)),e.fingerprint&&!e.fingerprint.length&&delete e.fingerprint}const Jwt=100;let y7;class _f{constructor(){this._notifyingListeners=!1,this._scopeListeners=[],this._eventProcessors=[],this._breadcrumbs=[],this._attachments=[],this._user={},this._tags={},this._extra={},this._contexts={},this._sdkProcessingMetadata={},this._propagationContext=Vre()}static clone(t){return t?t.clone():new _f}clone(){const t=new _f;return t._breadcrumbs=[...this._breadcrumbs],t._tags={...this._tags},t._extra={...this._extra},t._contexts={...this._contexts},t._user=this._user,t._level=this._level,t._span=this._span,t._session=this._session,t._transactionName=this._transactionName,t._fingerprint=this._fingerprint,t._eventProcessors=[...this._eventProcessors],t._requestSession=this._requestSession,t._attachments=[...this._attachments],t._sdkProcessingMetadata={...this._sdkProcessingMetadata},t._propagationContext={...this._propagationContext},t._client=this._client,t}setClient(t){this._client=t}getClient(){return this._client}addScopeListener(t){this._scopeListeners.push(t)}addEventProcessor(t){return this._eventProcessors.push(t),this}setUser(t){return this._user=t||{email:void 0,id:void 0,ip_address:void 0,segment:void 0,username:void 0},this._session&&S1(this._session,{user:t}),this._notifyScopeListeners(),this}getUser(){return this._user}getRequestSession(){return this._requestSession}setRequestSession(t){return this._requestSession=t,this}setTags(t){return this._tags={...this._tags,...t},this._notifyScopeListeners(),this}setTag(t,n){return this._tags={...this._tags,[t]:n},this._notifyScopeListeners(),this}setExtras(t){return this._extra={...this._extra,...t},this._notifyScopeListeners(),this}setExtra(t,n){return this._extra={...this._extra,[t]:n},this._notifyScopeListeners(),this}setFingerprint(t){return this._fingerprint=t,this._notifyScopeListeners(),this}setLevel(t){return this._level=t,this._notifyScopeListeners(),this}setTransactionName(t){return this._transactionName=t,this._notifyScopeListeners(),this}setContext(t,n){return n===null?delete this._contexts[t]:this._contexts[t]=n,this._notifyScopeListeners(),this}setSpan(t){return this._span=t,this._notifyScopeListeners(),this}getSpan(){return this._span}getTransaction(){const t=this._span;return t&&t.transaction}setSession(t){return t?this._session=t:delete this._session,this._notifyScopeListeners(),this}getSession(){return this._session}update(t){if(!t)return this;if(typeof t=="function"){const n=t(this);return n instanceof _f?n:this}return t instanceof _f?(this._tags={...this._tags,...t._tags},this._extra={...this._extra,...t._extra},this._contexts={...this._contexts,...t._contexts},t._user&&Object.keys(t._user).length&&(this._user=t._user),t._level&&(this._level=t._level),t._fingerprint&&(this._fingerprint=t._fingerprint),t._requestSession&&(this._requestSession=t._requestSession),t._propagationContext&&(this._propagationContext=t._propagationContext)):fO(t)&&(t=t,this._tags={...this._tags,...t.tags},this._extra={...this._extra,...t.extra},this._contexts={...this._contexts,...t.contexts},t.user&&(this._user=t.user),t.level&&(this._level=t.level),t.fingerprint&&(this._fingerprint=t.fingerprint),t.requestSession&&(this._requestSession=t.requestSession),t.propagationContext&&(this._propagationContext=t.propagationContext)),this}clear(){return this._breadcrumbs=[],this._tags={},this._extra={},this._user={},this._contexts={},this._level=void 0,this._transactionName=void 0,this._fingerprint=void 0,this._requestSession=void 0,this._span=void 0,this._session=void 0,this._notifyScopeListeners(),this._attachments=[],this._propagationContext=Vre(),this}addBreadcrumb(t,n){const r=typeof n=="number"?n:Jwt;if(r<=0)return this;const i={timestamp:sk(),...t},a=this._breadcrumbs;return a.push(i),this._breadcrumbs=a.length>r?a.slice(-r):a,this._notifyScopeListeners(),this}getLastBreadcrumb(){return this._breadcrumbs[this._breadcrumbs.length-1]}clearBreadcrumbs(){return this._breadcrumbs=[],this._notifyScopeListeners(),this}addAttachment(t){return this._attachments.push(t),this}getAttachments(){return this.getScopeData().attachments}clearAttachments(){return this._attachments=[],this}getScopeData(){const{_breadcrumbs:t,_attachments:n,_contexts:r,_tags:i,_extra:a,_user:s,_level:o,_fingerprint:l,_eventProcessors:u,_propagationContext:c,_sdkProcessingMetadata:f,_transactionName:h,_span:g}=this;return{breadcrumbs:t,attachments:n,contexts:r,tags:i,extra:a,user:s,level:o,fingerprint:l||[],eventProcessors:u,propagationContext:c,sdkProcessingMetadata:f,transactionName:h,span:g}}applyToEvent(t,n={},r=[]){Gye(t,this.getScopeData());const i=[...r,...HQ(),...this._eventProcessors];return m5(i,t,n)}setSDKProcessingMetadata(t){return this._sdkProcessingMetadata={...this._sdkProcessingMetadata,...t},this}setPropagationContext(t){return this._propagationContext=t,this}getPropagationContext(){return this._propagationContext}captureException(t,n){const r=n&&n.event_id?n.event_id:La();if(!this._client)return Pt.warn("No client configured on scope - will not capture exception!"),r;const i=new Error("Sentry syntheticException");return this._client.captureException(t,{originalException:t,syntheticException:i,...n,event_id:r},this),r}captureMessage(t,n,r){const i=r&&r.event_id?r.event_id:La();if(!this._client)return Pt.warn("No client configured on scope - will not capture message!"),i;const a=new Error(t);return this._client.captureMessage(t,n,{originalException:t,syntheticException:a,...r,event_id:i},this),i}captureEvent(t,n){const r=n&&n.event_id?n.event_id:La();return this._client?(this._client.captureEvent(t,{...n,event_id:r},this),r):(Pt.warn("No client configured on scope - will not capture event!"),r)}_notifyScopeListeners(){this._notifyingListeners||(this._notifyingListeners=!0,this._scopeListeners.forEach(t=>{t(this)}),this._notifyingListeners=!1)}}function ext(){return y7||(y7=new _f),y7}function Vre(){return{traceId:La(),spanId:La().substring(16)}}const C9="7.99.0",Yye=parseFloat(C9),txt=100;class Zye{constructor(t,n,r,i=Yye){this._version=i;let a;n?a=n:(a=new _f,a.setClient(t));let s;r?s=r:(s=new _f,s.setClient(t)),this._stack=[{scope:a}],t&&this.bindClient(t),this._isolationScope=s}isOlderThan(t){return this._version(this.popScope(),i),i=>{throw this.popScope(),i}):(this.popScope(),r)}getClient(){return this.getStackTop().client}getScope(){return this.getStackTop().scope}getIsolationScope(){return this._isolationScope}getStack(){return this._stack}getStackTop(){return this._stack[this._stack.length-1]}captureException(t,n){const r=this._lastEventId=n&&n.event_id?n.event_id:La(),i=new Error("Sentry syntheticException");return this.getScope().captureException(t,{originalException:t,syntheticException:i,...n,event_id:r}),r}captureMessage(t,n,r){const i=this._lastEventId=r&&r.event_id?r.event_id:La(),a=new Error(t);return this.getScope().captureMessage(t,n,{originalException:t,syntheticException:a,...r,event_id:i}),i}captureEvent(t,n){const r=n&&n.event_id?n.event_id:La();return t.type||(this._lastEventId=r),this.getScope().captureEvent(t,{...n,event_id:r}),r}lastEventId(){return this._lastEventId}addBreadcrumb(t,n){const{scope:r,client:i}=this.getStackTop();if(!i)return;const{beforeBreadcrumb:a=null,maxBreadcrumbs:s=txt}=i.getOptions&&i.getOptions()||{};if(s<=0)return;const l={timestamp:sk(),...t},u=a?d6(()=>a(l,n)):l;u!==null&&(i.emit&&i.emit("beforeAddBreadcrumb",u,n),r.addBreadcrumb(u,s))}setUser(t){this.getScope().setUser(t),this.getIsolationScope().setUser(t)}setTags(t){this.getScope().setTags(t),this.getIsolationScope().setTags(t)}setExtras(t){this.getScope().setExtras(t),this.getIsolationScope().setExtras(t)}setTag(t,n){this.getScope().setTag(t,n),this.getIsolationScope().setTag(t,n)}setExtra(t,n){this.getScope().setExtra(t,n),this.getIsolationScope().setExtra(t,n)}setContext(t,n){this.getScope().setContext(t,n),this.getIsolationScope().setContext(t,n)}configureScope(t){const{scope:n,client:r}=this.getStackTop();r&&t(n)}run(t){const n=Wre(this);try{t(this)}finally{Wre(n)}}getIntegration(t){const n=this.getClient();if(!n)return null;try{return n.getIntegration(t)}catch{return zn&&Pt.warn(`Cannot retrieve integration ${t.id} from the current Hub`),null}}startTransaction(t,n){const r=this._callExtensionMethod("startTransaction",t,n);return zn&&!r&&(this.getClient()?Pt.warn(`Tracing extension 'startTransaction' has not been added. Call 'addTracingExtensions' before calling 'init': Sentry.addTracingExtensions(); Sentry.init({...}); -`):Pt.warn("Tracing extension 'startTransaction' is missing. You should 'init' the SDK before calling 'startTransaction'")),r}traceHeaders(){return this._callExtensionMethod("traceHeaders")}captureSession(t=!1){if(t)return this.endSession();this._sendSessionUpdate()}endSession(){const n=this.getStackTop().scope,r=n.getSession();r&&jye(r),this._sendSessionUpdate(),n.setSession()}startSession(t){const{scope:n,client:r}=this.getStackTop(),{release:i,environment:a=f6}=r&&r.getOptions()||{},{userAgent:s}=si.navigator||{},o=zye({release:i,environment:a,user:n.getUser(),...s&&{userAgent:s},...t}),l=n.getSession&&n.getSession();return l&&l.status==="ok"&&S1(l,{status:"exited"}),this.endSession(),n.setSession(o),o}shouldSendDefaultPii(){const t=this.getClient(),n=t&&t.getOptions();return!!(n&&n.sendDefaultPii)}_sendSessionUpdate(){const{scope:t,client:n}=this.getStackTop(),r=t.getSession();r&&n&&n.captureSession&&n.captureSession(r)}_callExtensionMethod(t,...n){const i=lk().__SENTRY__;if(i&&i.extensions&&typeof i.extensions[t]=="function")return i.extensions[t].apply(this,n);zn&&Pt.warn(`Extension method ${t} couldn't be found, doing nothing.`)}}function lk(){return si.__SENTRY__=si.__SENTRY__||{extensions:{},hub:void 0},si}function Wre(e){const t=lk(),n=A9(t);return Xye(t,e),n}function $c(){const e=lk();if(e.__SENTRY__&&e.__SENTRY__.acs){const t=e.__SENTRY__.acs.getCurrentHub();if(t)return t}return ixt(e)}function j1(){return $c().getIsolationScope()}function ixt(e=lk()){return(!axt(e)||A9(e).isOlderThan(Yye))&&Xye(e,new Zye),A9(e)}function axt(e){return!!(e&&e.__SENTRY__&&e.__SENTRY__.hub)}function A9(e){return Eye("hub",()=>new Zye,e)}function Xye(e,t){if(!e)return!1;const n=e.__SENTRY__=e.__SENTRY__||{};return n.hub=t,!0}function iS(e){return(e||$c()).getScope().getTransaction()}let Qre=!1;function sxt(){Qre||(Qre=!0,Nye(_9),Pye(_9))}function _9(){const e=iS();if(e){const t="internal_error";zn&&Pt.log(`[Tracing] Transaction: ${t} -> Global error occured`),e.setStatus(t)}}_9.tag="sentry_tracingErrorCallback";const yv="sentry.source",zy="sentry.sample_rate",t4="sentry.op",jy="sentry.origin";var qre;(function(e){const t="ok";e.Ok=t;const n="deadline_exceeded";e.DeadlineExceeded=n;const r="unauthenticated";e.Unauthenticated=r;const i="permission_denied";e.PermissionDenied=i;const a="not_found";e.NotFound=a;const s="resource_exhausted";e.ResourceExhausted=s;const o="invalid_argument";e.InvalidArgument=o;const l="unimplemented";e.Unimplemented=l;const u="unavailable";e.Unavailable=u;const c="internal_error";e.InternalError=c;const f="unknown_error";e.UnknownError=f;const h="cancelled";e.Cancelled=h;const g="already_exists";e.AlreadyExists=g;const b="failed_precondition";e.FailedPrecondition=b;const S="aborted";e.Aborted=S;const E="out_of_range";e.OutOfRange=E;const w="data_loss";e.DataLoss=w})(qre||(qre={}));function oxt(e){if(e<400&&e>=100)return"ok";if(e>=400&&e<500)switch(e){case 401:return"unauthenticated";case 403:return"permission_denied";case 404:return"not_found";case 409:return"already_exists";case 413:return"failed_precondition";case 429:return"resource_exhausted";default:return"invalid_argument"}if(e>=500&&e<600)switch(e){case 501:return"unimplemented";case 503:return"unavailable";case 504:return"deadline_exceeded";default:return"internal_error"}return"unknown_error"}function WQ(e,t){e.setTag("http.status_code",String(t)),e.setData("http.response.status_code",t);const n=oxt(t);n!=="unknown_error"&&e.setStatus(n)}class Kye{constructor(t=1e3){this._maxlen=t,this.spans=[]}add(t){this.spans.length>this._maxlen?t.spanRecorder=void 0:this.spans.push(t)}}class QQ{constructor(t={}){this._traceId=t.traceId||La(),this._spanId=t.spanId||La().substring(16),this._startTime=t.startTimestamp||ok(),this.tags=t.tags?{...t.tags}:{},this.data=t.data?{...t.data}:{},this.instrumenter=t.instrumenter||"sentry",this._attributes={},this.setAttributes({[jy]:t.origin||"manual",[t4]:t.op,...t.attributes}),this._name=t.name||t.description,t.parentSpanId&&(this._parentSpanId=t.parentSpanId),"sampled"in t&&(this._sampled=t.sampled),t.status&&(this._status=t.status),t.endTimestamp&&(this._endTime=t.endTimestamp)}get name(){return this._name||""}set name(t){this.updateName(t)}get description(){return this._name}set description(t){this._name=t}get traceId(){return this._traceId}set traceId(t){this._traceId=t}get spanId(){return this._spanId}set spanId(t){this._spanId=t}set parentSpanId(t){this._parentSpanId=t}get parentSpanId(){return this._parentSpanId}get sampled(){return this._sampled}set sampled(t){this._sampled=t}get attributes(){return this._attributes}set attributes(t){this._attributes=t}get startTimestamp(){return this._startTime}set startTimestamp(t){this._startTime=t}get endTimestamp(){return this._endTime}set endTimestamp(t){this._endTime=t}get status(){return this._status}set status(t){this._status=t}get op(){return this._attributes[t4]}set op(t){this.setAttribute(t4,t)}get origin(){return this._attributes[jy]}set origin(t){this.setAttribute(jy,t)}spanContext(){const{_spanId:t,_traceId:n,_sampled:r}=this;return{spanId:t,traceId:n,traceFlags:r?Hye:Mwt}}startChild(t){const n=new QQ({...t,parentSpanId:this._spanId,sampled:this._sampled,traceId:this._traceId});n.spanRecorder=this.spanRecorder,n.spanRecorder&&n.spanRecorder.add(n);const r=g5(this);if(n.transaction=r,zn&&r){const i=t&&t.op||"< unknown op >",a=Zo(n).description||"< unknown name >",s=r.spanContext().spanId,o=`[Tracing] Starting '${i}' span on transaction '${a}' (${s}).`;Pt.log(o),this._logMessage=o}return n}setTag(t,n){return this.tags={...this.tags,[t]:n},this}setData(t,n){return this.data={...this.data,[t]:n},this}setAttribute(t,n){n===void 0?delete this._attributes[t]:this._attributes[t]=n}setAttributes(t){Object.keys(t).forEach(n=>this.setAttribute(n,t[n]))}setStatus(t){return this._status=t,this}setHttpStatus(t){return WQ(this,t),this}setName(t){this.updateName(t)}updateName(t){return this._name=t,this}isSuccess(){return this._status==="ok"}finish(t){return this.end(t)}end(t){if(this._endTime)return;const n=g5(this);if(zn&&n&&n.spanContext().spanId!==this._spanId){const r=this._logMessage;r&&Pt.log(r.replace("Starting","Finishing"))}this._endTime=p6(t)}toTraceparent(){return h6(this)}toContext(){return gc({data:this._getData(),description:this._name,endTimestamp:this._endTime,op:this.op,parentSpanId:this._parentSpanId,sampled:this._sampled,spanId:this._spanId,startTimestamp:this._startTime,status:this._status,tags:this.tags,traceId:this._traceId})}updateWithContext(t){return this.data=t.data||{},this._name=t.name||t.description,this._endTime=t.endTimestamp,this.op=t.op,this._parentSpanId=t.parentSpanId,this._sampled=t.sampled,this._spanId=t.spanId||this._spanId,this._startTime=t.startTimestamp||this._startTime,this._status=t.status,this.tags=t.tags||{},this._traceId=t.traceId||this._traceId,this}getTraceContext(){return VQ(this)}getSpanJSON(){return gc({data:this._getData(),description:this._name,op:this._attributes[t4],parent_span_id:this._parentSpanId,span_id:this._spanId,start_timestamp:this._startTime,status:this._status,tags:Object.keys(this.tags).length>0?this.tags:void 0,timestamp:this._endTime,trace_id:this._traceId,origin:this._attributes[jy]})}isRecording(){return!this._endTime&&!!this._sampled}toJSON(){return this.getSpanJSON()}_getData(){const{data:t,_attributes:n}=this,r=Object.keys(t).length>0,i=Object.keys(n).length>0;if(!(!r&&!i))return r&&i?{...t,...n}:r?t:n}}class Jye extends QQ{constructor(t,n){super(t),this._measurements={},this._contexts={},this._hub=n||$c(),this._name=t.name||"",this._metadata={...t.metadata},this._trimEnd=t.trimEnd,this.transaction=this;const r=this._metadata.dynamicSamplingContext;r&&(this._frozenDynamicSamplingContext={...r})}get name(){return this._name}set name(t){this.setName(t)}get metadata(){return{source:"custom",spanMetadata:{},...this._metadata,...this._attributes[yv]&&{source:this._attributes[yv]},...this._attributes[zy]&&{sampleRate:this._attributes[zy]}}}set metadata(t){this._metadata=t}setName(t,n="custom"){this._name=t,this.setAttribute(yv,n)}updateName(t){return this._name=t,this}initSpanRecorder(t=1e3){this.spanRecorder||(this.spanRecorder=new Kye(t)),this.spanRecorder.add(this)}setContext(t,n){n===null?delete this._contexts[t]:this._contexts[t]=n}setMeasurement(t,n,r=""){this._measurements[t]={value:n,unit:r}}setMetadata(t){this._metadata={...this._metadata,...t}}end(t){const n=p6(t),r=this._finishTransaction(n);if(r)return this._hub.captureEvent(r)}toContext(){const t=super.toContext();return gc({...t,name:this._name,trimEnd:this._trimEnd})}updateWithContext(t){return super.updateWithContext(t),this._name=t.name||"",this._trimEnd=t.trimEnd,this}getDynamicSamplingContext(){return _x(this)}setHub(t){this._hub=t}_finishTransaction(t){if(this._endTime!==void 0)return;this._name||(zn&&Pt.warn("Transaction has no name, falling back to ``."),this._name=""),super.end(t);const n=this._hub.getClient();if(n&&n.emit&&n.emit("finishTransaction",this),this._sampled!==!0){zn&&Pt.log("[Tracing] Discarding transaction because its trace was not chosen to be sampled."),n&&n.recordDroppedEvent("sample_rate","transaction");return}const r=this.spanRecorder?this.spanRecorder.spans.filter(l=>l!==this&&Zo(l).timestamp):[];if(this._trimEnd&&r.length>0){const l=r.map(u=>Zo(u).timestamp).filter(Boolean);this._endTime=l.reduce((u,c)=>u>c?u:c)}const{metadata:i}=this,{source:a}=i,s={contexts:{...this._contexts,trace:VQ(this)},spans:r,start_timestamp:this._startTime,tags:this.tags,timestamp:this._endTime,transaction:this._name,type:"transaction",sdkProcessingMetadata:{...i,dynamicSamplingContext:_x(this)},...a&&{transaction_info:{source:a}}};return Object.keys(this._measurements).length>0&&(zn&&Pt.log("[Measurements] Adding measurements to transaction",JSON.stringify(this._measurements,void 0,2)),s.measurements=this._measurements),zn&&Pt.log(`[Tracing] Finishing ${this.op} transaction: ${this._name}.`),s}}const a_={idleTimeout:1e3,finalTimeout:3e4,heartbeatInterval:5e3},lxt="finishReason",ny=["heartbeatFailed","idleTimeout","documentHidden","finalTimeout","externalFinish","cancelled"];class uxt extends Kye{constructor(t,n,r,i){super(i),this._pushActivity=t,this._popActivity=n,this.transactionSpanId=r}add(t){if(t.spanContext().spanId!==this.transactionSpanId){const n=t.end;t.end=(...r)=>(this._popActivity(t.spanContext().spanId),n.apply(t,r)),Zo(t).timestamp===void 0&&this._pushActivity(t.spanContext().spanId)}super.add(t)}}class cxt extends Jye{constructor(t,n,r=a_.idleTimeout,i=a_.finalTimeout,a=a_.heartbeatInterval,s=!1,o=!1){super(t,n),this._idleHub=n,this._idleTimeout=r,this._finalTimeout=i,this._heartbeatInterval=a,this._onScope=s,this.activities={},this._heartbeatCounter=0,this._finished=!1,this._idleTimeoutCanceledPermanently=!1,this._beforeFinishCallbacks=[],this._finishReason=ny[4],this._autoFinishAllowed=!o,s&&(zn&&Pt.log(`Setting idle transaction on scope. Span ID: ${this.spanContext().spanId}`),n.getScope().setSpan(this)),o||this._restartIdleTimeout(),setTimeout(()=>{this._finished||(this.setStatus("deadline_exceeded"),this._finishReason=ny[3],this.end())},this._finalTimeout)}end(t){const n=p6(t);if(this._finished=!0,this.activities={},this.op==="ui.action.click"&&this.setAttribute(lxt,this._finishReason),this.spanRecorder){zn&&Pt.log("[Tracing] finishing IdleTransaction",new Date(n*1e3).toISOString(),this.op);for(const r of this._beforeFinishCallbacks)r(this,n);this.spanRecorder.spans=this.spanRecorder.spans.filter(r=>{if(r.spanContext().spanId===this.spanContext().spanId)return!0;Zo(r).timestamp||(r.setStatus("cancelled"),r.end(n),zn&&Pt.log("[Tracing] cancelling span since transaction ended early",JSON.stringify(r,void 0,2)));const{start_timestamp:i,timestamp:a}=Zo(r),s=i&&i{this._finished||this._pushActivity(i)},r=i=>{this._finished||this._popActivity(i)};this.spanRecorder=new uxt(n,r,this.spanContext().spanId,t),zn&&Pt.log("Starting heartbeat"),this._pingHeartbeat()}this.spanRecorder.add(this)}cancelIdleTimeout(t,{restartOnChildSpanChange:n}={restartOnChildSpanChange:!0}){this._idleTimeoutCanceledPermanently=n===!1,this._idleTimeoutID&&(clearTimeout(this._idleTimeoutID),this._idleTimeoutID=void 0,Object.keys(this.activities).length===0&&this._idleTimeoutCanceledPermanently&&(this._finishReason=ny[5],this.end(t)))}setFinishReason(t){this._finishReason=t}sendAutoFinishSignal(){this._autoFinishAllowed||(zn&&Pt.log("[Tracing] Received finish signal for idle transaction."),this._restartIdleTimeout(),this._autoFinishAllowed=!0)}_restartIdleTimeout(t){this.cancelIdleTimeout(),this._idleTimeoutID=setTimeout(()=>{!this._finished&&Object.keys(this.activities).length===0&&(this._finishReason=ny[1],this.end(t))},this._idleTimeout)}_pushActivity(t){this.cancelIdleTimeout(void 0,{restartOnChildSpanChange:!this._idleTimeoutCanceledPermanently}),zn&&Pt.log(`[Tracing] pushActivity: ${t}`),this.activities[t]=!0,zn&&Pt.log("[Tracing] new activities count",Object.keys(this.activities).length)}_popActivity(t){if(this.activities[t]&&(zn&&Pt.log(`[Tracing] popActivity ${t}`),delete this.activities[t],zn&&Pt.log("[Tracing] new activities count",Object.keys(this.activities).length)),Object.keys(this.activities).length===0){const n=ok();this._idleTimeoutCanceledPermanently?this._autoFinishAllowed&&(this._finishReason=ny[5],this.end(n)):this._restartIdleTimeout(n+this._idleTimeout/1e3)}}_beat(){if(this._finished)return;const t=Object.keys(this.activities).join("");t===this._prevHeartbeatString?this._heartbeatCounter++:this._heartbeatCounter=1,this._prevHeartbeatString=t,this._heartbeatCounter>=3?this._autoFinishAllowed&&(zn&&Pt.log("[Tracing] Transaction finished because of no change for 3 heart beats"),this.setStatus("deadline_exceeded"),this._finishReason=ny[0],this.end()):this._pingHeartbeat()}_pingHeartbeat(){zn&&Pt.log(`pinging Heartbeat -> current counter: ${this._heartbeatCounter}`),setTimeout(()=>{this._beat()},this._heartbeatInterval)}}function g6(e){if(typeof __SENTRY_TRACING__=="boolean"&&!__SENTRY_TRACING__)return!1;const t=eo(),n=e||t&&t.getOptions();return!!n&&(n.enableTracing||"tracesSampleRate"in n||"tracesSampler"in n)}function eve(e,t,n){if(!g6(t))return e.sampled=!1,e;if(e.sampled!==void 0)return e.setAttribute(zy,Number(e.sampled)),e;let r;return typeof t.tracesSampler=="function"?(r=t.tracesSampler(n),e.setAttribute(zy,Number(r))):n.parentSampled!==void 0?r=n.parentSampled:typeof t.tracesSampleRate<"u"?(r=t.tracesSampleRate,e.setAttribute(zy,Number(r))):(r=1,e.setAttribute(zy,r)),dxt(r)?r?(e.sampled=Math.random()1?(zn&&Pt.warn(`[Tracing] Given sample rate is invalid. Sample rate must be between 0 and 1. Got ${e}.`),!1):!0}function fxt(){const t=this.getScope().getSpan();return t?{"sentry-trace":h6(t)}:{}}function hxt(e,t){const n=this.getClient(),r=n&&n.getOptions()||{},i=r.instrumenter||"sentry",a=e.instrumenter||"sentry";i!==a&&(zn&&Pt.error(`A transaction was started with instrumenter=\`${a}\`, but the SDK is configured with the \`${i}\` instrumenter. -The transaction will not be sampled. Please use the ${i} instrumentation to start transactions.`),e.sampled=!1);let s=new Jye(e,this);return s=eve(s,r,{parentSampled:e.parentSampled,transactionContext:e,...t}),s.isRecording()&&s.initSpanRecorder(r._experiments&&r._experiments.maxSpans),n&&n.emit&&n.emit("startTransaction",s),s}function Gre(e,t,n,r,i,a,s,o=!1){const l=e.getClient(),u=l&&l.getOptions()||{};let c=new cxt(t,e,n,r,s,i,o);return c=eve(c,u,{parentSampled:t.parentSampled,transactionContext:t,...a}),c.isRecording()&&c.initSpanRecorder(u._experiments&&u._experiments.maxSpans),l&&l.emit&&l.emit("startTransaction",c),c}function pxt(){const e=lk();e.__SENTRY__&&(e.__SENTRY__.extensions=e.__SENTRY__.extensions||{},e.__SENTRY__.extensions.startTransaction||(e.__SENTRY__.extensions.startTransaction=hxt),e.__SENTRY__.extensions.traceHeaders||(e.__SENTRY__.extensions.traceHeaders=fxt),sxt())}function tve(e){if(!g6())return;const t=gxt(e),n=$c(),r=e.scope?e.scope.getSpan():mxt();if(!(e.onlyIfParent&&!r)){if(r)return r.startChild(t);{const a=j1(),s=Tp(),{traceId:o,dsc:l,parentSpanId:u,sampled:c}={...a.getPropagationContext(),...s.getPropagationContext()};return n.startTransaction({traceId:o,parentSpanId:u,parentSampled:c,...t,metadata:{dynamicSamplingContext:l,...t.metadata}})}}}function mxt(){return Tp().getSpan()}function gxt(e){if(e.startTime){const t={...e};return t.startTimestamp=p6(e.startTime),delete t.startTime,t}return e}function bxt(e,t,n){const r=iS();r&&r.setMeasurement(e,t,n)}function yxt(e,t){return t&&(e.sdk=e.sdk||{},e.sdk.name=e.sdk.name||t.name,e.sdk.version=e.sdk.version||t.version,e.sdk.integrations=[...e.sdk.integrations||[],...t.integrations||[]],e.sdk.packages=[...e.sdk.packages||[],...t.packages||[]]),e}function vxt(e,t,n,r){const i=Uye(n),a={sent_at:new Date().toISOString(),...i&&{sdk:i},...!!r&&t&&{dsn:ak(t)}},s="aggregates"in e?[{type:"sessions"},e]:[{type:"session"},e.toJSON()];return rS(a,[s])}function Oxt(e,t,n,r){const i=Uye(n),a=e.type&&e.type!=="replay_event"?e.type:"event";yxt(e,n&&n.sdk);const s=kwt(e,i,r,t);return delete e.sdkProcessingMetadata,rS(s,[[{type:a},e]])}const Sxt="7";function Ext(e){const t=e.protocol?`${e.protocol}:`:"",n=e.port?`:${e.port}`:"";return`${t}//${e.host}${n}${e.path?`/${e.path}`:""}/api/`}function wxt(e){return`${Ext(e)}${e.projectId}/envelope/`}function xxt(e,t){return M2t({sentry_key:e.publicKey,sentry_version:Sxt,...t&&{sentry_client:`${t.name}/${t.version}`}})}function Txt(e,t={}){const n=typeof t=="string"?t:t.tunnel,r=typeof t=="string"||!t._metadata?void 0:t._metadata.sdk;return n||`${wxt(e)}?${xxt(e,r)}`}const Yre=[];function kxt(e){const t={};return e.forEach(n=>{const{name:r}=n,i=t[r];i&&!i.isDefaultInstance&&n.isDefaultInstance||(t[r]=n)}),Object.keys(t).map(n=>t[n])}function Cxt(e){const t=e.defaultIntegrations||[],n=e.integrations;t.forEach(s=>{s.isDefaultInstance=!0});let r;Array.isArray(n)?r=[...t,...n]:typeof n=="function"?r=Rye(n(t)):r=t;const i=kxt(r),a=_xt(i,s=>s.name==="Debug");if(a!==-1){const[s]=i.splice(a,1);i.push(s)}return i}function Axt(e,t){const n={};return t.forEach(r=>{r&&nve(e,r,n)}),n}function Zre(e,t){for(const n of t)n&&n.afterAllSetup&&n.afterAllSetup(e)}function nve(e,t,n){if(n[t.name]){zn&&Pt.log(`Integration skipped because it was already installed: ${t.name}`);return}if(n[t.name]=t,Yre.indexOf(t.name)===-1&&(t.setupOnce(Nwt,$c),Yre.push(t.name)),t.setup&&typeof t.setup=="function"&&t.setup(e),e.on&&typeof t.preprocessEvent=="function"){const r=t.preprocessEvent.bind(t);e.on("preprocessEvent",(i,a)=>r(i,a,e))}if(e.addEventProcessor&&typeof t.processEvent=="function"){const r=t.processEvent.bind(t),i=Object.assign((a,s)=>r(a,s,e),{id:t.name});e.addEventProcessor(i)}zn&&Pt.log(`Integration installed: ${t.name}`)}function _xt(e,t){for(let n=0;n0?`|#${r.map(([a,s])=>`${a}:${s}`).join(",")}`:"";t+=`${n.name}@${n.unit}:${n.metric}|${n.metricType}${i}|T${n.timestamp} -`}return t}function Ixt(e,t,n,r){const i={sent_at:new Date().toISOString()};n&&n.sdk&&(i.sdk={name:n.sdk.name,version:n.sdk.version}),r&&t&&(i.dsn=ak(t));const a=Dxt(e);return rS(i,[a])}function Dxt(e){const t=Rxt(e);return[{type:"statsd",length:t.length},t]}const Xre="Not capturing exception because it's already been captured.";class Nxt{constructor(t){if(this._options=t,this._integrations={},this._integrationsInitialized=!1,this._numProcessing=0,this._outcomes={},this._hooks={},this._eventProcessors=[],t.dsn?this._dsn=P2t(t.dsn):zn&&Pt.warn("No DSN provided, client will not send events."),this._dsn){const n=Txt(this._dsn,t);this._transport=t.transport({recordDroppedEvent:this.recordDroppedEvent.bind(this),...t.transportOptions,url:n})}}captureException(t,n,r){if(Dre(t)){zn&&Pt.log(Xre);return}let i=n&&n.event_id;return this._process(this.eventFromException(t,n).then(a=>this._captureEvent(a,n,r)).then(a=>{i=a})),i}captureMessage(t,n,r,i){let a=r&&r.event_id;const s=LQ(t)?t:String(t),o=$Q(t)?this.eventFromMessage(s,n,r):this.eventFromException(t,r);return this._process(o.then(l=>this._captureEvent(l,r,i)).then(l=>{a=l})),a}captureEvent(t,n,r){if(n&&n.originalException&&Dre(n.originalException)){zn&&Pt.log(Xre);return}let i=n&&n.event_id;return this._process(this._captureEvent(t,n,r).then(a=>{i=a})),i}captureSession(t){typeof t.release!="string"?zn&&Pt.warn("Discarded session because of missing or non-string release"):(this.sendSession(t),S1(t,{init:!1}))}getDsn(){return this._dsn}getOptions(){return this._options}getSdkMetadata(){return this._options._metadata}getTransport(){return this._transport}flush(t){const n=this._transport;return n?(this.metricsAggregator&&this.metricsAggregator.flush(),this._isClientDoneProcessing(t).then(r=>n.flush(t).then(i=>r&&i))):hO(!0)}close(t){return this.flush(t).then(n=>(this.getOptions().enabled=!1,this.metricsAggregator&&this.metricsAggregator.close(),n))}getEventProcessors(){return this._eventProcessors}addEventProcessor(t){this._eventProcessors.push(t)}setupIntegrations(t){(t&&!this._integrationsInitialized||this._isEnabled()&&!this._integrationsInitialized)&&this._setupIntegrations()}init(){this._isEnabled()&&this._setupIntegrations()}getIntegrationById(t){return this.getIntegrationByName(t)}getIntegrationByName(t){return this._integrations[t]}getIntegration(t){try{return this._integrations[t.id]||null}catch{return zn&&Pt.warn(`Cannot retrieve integration ${t.id} from the current Client`),null}}addIntegration(t){const n=this._integrations[t.name];nve(this,t,this._integrations),n||Zre(this,[t])}sendEvent(t,n={}){this.emit("beforeSendEvent",t,n);let r=Oxt(t,this._dsn,this._options._metadata,this._options.tunnel);for(const a of n.attachments||[])r=Swt(r,xwt(a,this._options.transportOptions&&this._options.transportOptions.textEncoder));const i=this._sendEnvelope(r);i&&i.then(a=>this.emit("afterSendEvent",t,a),null)}sendSession(t){const n=vxt(t,this._dsn,this._options._metadata,this._options.tunnel);this._sendEnvelope(n)}recordDroppedEvent(t,n,r){if(this._options.sendClientReports){const i=`${t}:${n}`;zn&&Pt.log(`Adding outcome: "${i}"`),this._outcomes[i]=this._outcomes[i]+1||1}}captureAggregateMetrics(t){zn&&Pt.log(`Flushing aggregated metrics, number of metrics: ${t.length}`);const n=Ixt(t,this._dsn,this._options._metadata,this._options.tunnel);this._sendEnvelope(n)}on(t,n){this._hooks[t]||(this._hooks[t]=[]),this._hooks[t].push(n)}emit(t,...n){this._hooks[t]&&this._hooks[t].forEach(r=>r(...n))}_setupIntegrations(){const{integrations:t}=this._options;this._integrations=Axt(this,t),Zre(this,t),this._integrationsInitialized=!0}_updateSessionFromEvent(t,n){let r=!1,i=!1;const a=n.exception&&n.exception.values;if(a){i=!0;for(const l of a){const u=l.mechanism;if(u&&u.handled===!1){r=!0;break}}}const s=t.status==="ok";(s&&t.errors===0||s&&r)&&(S1(t,{...r&&{status:"crashed"},errors:t.errors||Number(i||r)}),this.captureSession(t))}_isClientDoneProcessing(t){return new hu(n=>{let r=0;const i=1,a=setInterval(()=>{this._numProcessing==0?(clearInterval(a),n(!0)):(r+=i,t&&r>=t&&(clearInterval(a),n(!1)))},i)})}_isEnabled(){return this.getOptions().enabled!==!1&&this._transport!==void 0}_prepareEvent(t,n,r,i=j1()){const a=this.getOptions(),s=Object.keys(this._integrations);return!n.integrations&&s.length>0&&(n.integrations=s),this.emit("preprocessEvent",t,n),$wt(a,t,n,r,this,i).then(o=>{if(o===null)return o;const l={...i.getPropagationContext(),...r?r.getPropagationContext():void 0};if(!(o.contexts&&o.contexts.trace)&&l){const{traceId:c,spanId:f,parentSpanId:h,dsc:g}=l;o.contexts={trace:{trace_id:c,span_id:f,parent_span_id:h},...o.contexts};const b=g||m6(c,this,r);o.sdkProcessingMetadata={dynamicSamplingContext:b,...o.sdkProcessingMetadata}}return o})}_captureEvent(t,n={},r){return this._processEvent(t,n,r).then(i=>i.event_id,i=>{if(zn){const a=i;a.logLevel==="log"?Pt.log(a.message):Pt.warn(a)}})}_processEvent(t,n,r){const i=this.getOptions(),{sampleRate:a}=i,s=ive(t),o=rve(t),l=t.type||"error",u=`before send for type \`${l}\``;if(o&&typeof a=="number"&&Math.random()>a)return this.recordDroppedEvent("sample_rate","error",t),zQ(new Of(`Discarding event because it's not included in the random sample (sampling rate = ${a})`,"log"));const c=l==="replay_event"?"replay":l;return this._prepareEvent(t,n,r).then(f=>{if(f===null)throw this.recordDroppedEvent("event_processor",c,t),new Of("An event processor returned `null`, will not send event.","log");if(n.data&&n.data.__sentry__===!0)return f;const g=Mxt(i,f,n);return Pxt(g,u)}).then(f=>{if(f===null)throw this.recordDroppedEvent("before_send",c,t),new Of(`${u} returned \`null\`, will not send event.`,"log");const h=r&&r.getSession();!s&&h&&this._updateSessionFromEvent(h,f);const g=f.transaction_info;if(s&&g&&f.transaction!==t.transaction){const b="custom";f.transaction_info={...g,source:b}}return this.sendEvent(f,n),f}).then(null,f=>{throw f instanceof Of?f:(this.captureException(f,{data:{__sentry__:!0},originalException:f}),new Of(`Event processing pipeline threw an error, original event will not be sent. Details have been sent as a new event. -Reason: ${f}`))})}_process(t){this._numProcessing++,t.then(n=>(this._numProcessing--,n),n=>(this._numProcessing--,n))}_sendEnvelope(t){if(this.emit("beforeEnvelope",t),this._isEnabled()&&this._transport)return this._transport.send(t).then(null,n=>{zn&&Pt.error("Error while sending event:",n)});zn&&Pt.error("Transport disabled")}_clearOutcomes(){const t=this._outcomes;return this._outcomes={},Object.keys(t).map(n=>{const[r,i]=n.split(":");return{reason:r,category:i,quantity:t[n]}})}}function Pxt(e,t){const n=`${t} must return \`null\` or a valid event.`;if(c6(e))return e.then(r=>{if(!fO(r)&&r!==null)throw new Of(n);return r},r=>{throw new Of(`${t} rejected with ${r}`)});if(!fO(e)&&e!==null)throw new Of(n);return e}function Mxt(e,t,n){const{beforeSend:r,beforeSendTransaction:i}=e;return rve(t)&&r?r(t,n):ive(t)&&i?i(t,n):t}function rve(e){return e.type===void 0}function ive(e){return e.type==="transaction"}function Lxt(e,t){t.debug===!0&&(zn?Pt.enable():d6(()=>{console.warn("[Sentry] Cannot initialize SDK with `debug` option using a non-debug bundle.")})),Tp().update(t.initialScope);const r=new e(t);$xt(r),Fxt(r)}function $xt(e){const n=$c().getStackTop();n.client=e,n.scope.setClient(e)}function Fxt(e){e.init?e.init():e.setupIntegrations&&e.setupIntegrations()}const Bxt=30;function ave(e,t,n=cwt(e.bufferSize||Bxt)){let r={};const i=s=>n.drain(s);function a(s){const o=[];if($re(s,(f,h)=>{const g=Fre(h);if(Iwt(r,g)){const b=Kre(f,h);e.recordDroppedEvent("ratelimit_backoff",g,b)}else o.push(f)}),o.length===0)return hO();const l=rS(s[0],o),u=f=>{$re(l,(h,g)=>{const b=Kre(h,g);e.recordDroppedEvent(f,Fre(g),b)})},c=()=>t({body:Ewt(l,e.textEncoder)}).then(f=>(f.statusCode!==void 0&&(f.statusCode<200||f.statusCode>=300)&&zn&&Pt.warn(`Sentry responded with status code ${f.statusCode} to sent event.`),r=Dwt(r,f),f),f=>{throw u("network_error"),f});return n.add(c).then(f=>f,f=>{if(f instanceof Of)return zn&&Pt.error("Skipped sending event because buffer is full."),u("queue_overflow"),hO();throw f})}return a.__sentry__baseTransport__=!0,{send:a,flush:i}}function Kre(e,t){if(!(t!=="event"&&t!=="transaction"))return Array.isArray(e)?e[1]:void 0}function sve(e,t,n=[t],r="npm"){const i=e._metadata||{};i.sdk||(i.sdk={name:`sentry.javascript.${t}`,packages:n.map(a=>({name:`${r}:@sentry/${a}`,version:C9})),version:C9}),e._metadata=i}const Uxt=[/^Script error\.?$/,/^Javascript error: Script error\.? on line 0$/],zxt=[/^.*\/healthcheck$/,/^.*\/healthy$/,/^.*\/live$/,/^.*\/ready$/,/^.*\/heartbeat$/,/^.*\/health$/,/^.*\/healthz$/],ove="InboundFilters",jxt=(e={})=>({name:ove,setupOnce(){},processEvent(t,n,r){const i=r.getOptions(),a=Hxt(e,i);return Vxt(t,a)?null:t}}),lve=jxt;N0(ove,lve);function Hxt(e={},t={}){return{allowUrls:[...e.allowUrls||[],...t.allowUrls||[]],denyUrls:[...e.denyUrls||[],...t.denyUrls||[]],ignoreErrors:[...e.ignoreErrors||[],...t.ignoreErrors||[],...e.disableErrorDefaults?[]:Uxt],ignoreTransactions:[...e.ignoreTransactions||[],...t.ignoreTransactions||[],...e.disableTransactionDefaults?[]:zxt],ignoreInternal:e.ignoreInternal!==void 0?e.ignoreInternal:!0}}function Vxt(e,t){return t.ignoreInternal&&Zxt(e)?(zn&&Pt.warn(`Event dropped due to being internal Sentry Error. -Event: ${mm(e)}`),!0):Wxt(e,t.ignoreErrors)?(zn&&Pt.warn(`Event dropped due to being matched by \`ignoreErrors\` option. -Event: ${mm(e)}`),!0):Qxt(e,t.ignoreTransactions)?(zn&&Pt.warn(`Event dropped due to being matched by \`ignoreTransactions\` option. -Event: ${mm(e)}`),!0):qxt(e,t.denyUrls)?(zn&&Pt.warn(`Event dropped due to being matched by \`denyUrls\` option. +`):Pt.warn("Tracing extension 'startTransaction' is missing. You should 'init' the SDK before calling 'startTransaction'")),r}traceHeaders(){return this._callExtensionMethod("traceHeaders")}captureSession(t=!1){if(t)return this.endSession();this._sendSessionUpdate()}endSession(){const n=this.getStackTop().scope,r=n.getSession();r&&jye(r),this._sendSessionUpdate(),n.setSession()}startSession(t){const{scope:n,client:r}=this.getStackTop(),{release:i,environment:a=f6}=r&&r.getOptions()||{},{userAgent:s}=si.navigator||{},o=zye({release:i,environment:a,user:n.getUser(),...s&&{userAgent:s},...t}),l=n.getSession&&n.getSession();return l&&l.status==="ok"&&S1(l,{status:"exited"}),this.endSession(),n.setSession(o),o}shouldSendDefaultPii(){const t=this.getClient(),n=t&&t.getOptions();return!!(n&&n.sendDefaultPii)}_sendSessionUpdate(){const{scope:t,client:n}=this.getStackTop(),r=t.getSession();r&&n&&n.captureSession&&n.captureSession(r)}_callExtensionMethod(t,...n){const i=lk().__SENTRY__;if(i&&i.extensions&&typeof i.extensions[t]=="function")return i.extensions[t].apply(this,n);zn&&Pt.warn(`Extension method ${t} couldn't be found, doing nothing.`)}}function lk(){return si.__SENTRY__=si.__SENTRY__||{extensions:{},hub:void 0},si}function Wre(e){const t=lk(),n=A9(t);return Xye(t,e),n}function $c(){const e=lk();if(e.__SENTRY__&&e.__SENTRY__.acs){const t=e.__SENTRY__.acs.getCurrentHub();if(t)return t}return nxt(e)}function j1(){return $c().getIsolationScope()}function nxt(e=lk()){return(!rxt(e)||A9(e).isOlderThan(Yye))&&Xye(e,new Zye),A9(e)}function rxt(e){return!!(e&&e.__SENTRY__&&e.__SENTRY__.hub)}function A9(e){return Eye("hub",()=>new Zye,e)}function Xye(e,t){if(!e)return!1;const n=e.__SENTRY__=e.__SENTRY__||{};return n.hub=t,!0}function iS(e){return(e||$c()).getScope().getTransaction()}let Qre=!1;function ixt(){Qre||(Qre=!0,Nye(_9),Pye(_9))}function _9(){const e=iS();if(e){const t="internal_error";zn&&Pt.log(`[Tracing] Transaction: ${t} -> Global error occured`),e.setStatus(t)}}_9.tag="sentry_tracingErrorCallback";const yv="sentry.source",zy="sentry.sample_rate",t4="sentry.op",jy="sentry.origin";var qre;(function(e){const t="ok";e.Ok=t;const n="deadline_exceeded";e.DeadlineExceeded=n;const r="unauthenticated";e.Unauthenticated=r;const i="permission_denied";e.PermissionDenied=i;const a="not_found";e.NotFound=a;const s="resource_exhausted";e.ResourceExhausted=s;const o="invalid_argument";e.InvalidArgument=o;const l="unimplemented";e.Unimplemented=l;const u="unavailable";e.Unavailable=u;const c="internal_error";e.InternalError=c;const f="unknown_error";e.UnknownError=f;const h="cancelled";e.Cancelled=h;const g="already_exists";e.AlreadyExists=g;const b="failed_precondition";e.FailedPrecondition=b;const S="aborted";e.Aborted=S;const E="out_of_range";e.OutOfRange=E;const w="data_loss";e.DataLoss=w})(qre||(qre={}));function axt(e){if(e<400&&e>=100)return"ok";if(e>=400&&e<500)switch(e){case 401:return"unauthenticated";case 403:return"permission_denied";case 404:return"not_found";case 409:return"already_exists";case 413:return"failed_precondition";case 429:return"resource_exhausted";default:return"invalid_argument"}if(e>=500&&e<600)switch(e){case 501:return"unimplemented";case 503:return"unavailable";case 504:return"deadline_exceeded";default:return"internal_error"}return"unknown_error"}function WQ(e,t){e.setTag("http.status_code",String(t)),e.setData("http.response.status_code",t);const n=axt(t);n!=="unknown_error"&&e.setStatus(n)}class Kye{constructor(t=1e3){this._maxlen=t,this.spans=[]}add(t){this.spans.length>this._maxlen?t.spanRecorder=void 0:this.spans.push(t)}}class QQ{constructor(t={}){this._traceId=t.traceId||La(),this._spanId=t.spanId||La().substring(16),this._startTime=t.startTimestamp||ok(),this.tags=t.tags?{...t.tags}:{},this.data=t.data?{...t.data}:{},this.instrumenter=t.instrumenter||"sentry",this._attributes={},this.setAttributes({[jy]:t.origin||"manual",[t4]:t.op,...t.attributes}),this._name=t.name||t.description,t.parentSpanId&&(this._parentSpanId=t.parentSpanId),"sampled"in t&&(this._sampled=t.sampled),t.status&&(this._status=t.status),t.endTimestamp&&(this._endTime=t.endTimestamp)}get name(){return this._name||""}set name(t){this.updateName(t)}get description(){return this._name}set description(t){this._name=t}get traceId(){return this._traceId}set traceId(t){this._traceId=t}get spanId(){return this._spanId}set spanId(t){this._spanId=t}set parentSpanId(t){this._parentSpanId=t}get parentSpanId(){return this._parentSpanId}get sampled(){return this._sampled}set sampled(t){this._sampled=t}get attributes(){return this._attributes}set attributes(t){this._attributes=t}get startTimestamp(){return this._startTime}set startTimestamp(t){this._startTime=t}get endTimestamp(){return this._endTime}set endTimestamp(t){this._endTime=t}get status(){return this._status}set status(t){this._status=t}get op(){return this._attributes[t4]}set op(t){this.setAttribute(t4,t)}get origin(){return this._attributes[jy]}set origin(t){this.setAttribute(jy,t)}spanContext(){const{_spanId:t,_traceId:n,_sampled:r}=this;return{spanId:t,traceId:n,traceFlags:r?Hye:Nwt}}startChild(t){const n=new QQ({...t,parentSpanId:this._spanId,sampled:this._sampled,traceId:this._traceId});n.spanRecorder=this.spanRecorder,n.spanRecorder&&n.spanRecorder.add(n);const r=g5(this);if(n.transaction=r,zn&&r){const i=t&&t.op||"< unknown op >",a=Zo(n).description||"< unknown name >",s=r.spanContext().spanId,o=`[Tracing] Starting '${i}' span on transaction '${a}' (${s}).`;Pt.log(o),this._logMessage=o}return n}setTag(t,n){return this.tags={...this.tags,[t]:n},this}setData(t,n){return this.data={...this.data,[t]:n},this}setAttribute(t,n){n===void 0?delete this._attributes[t]:this._attributes[t]=n}setAttributes(t){Object.keys(t).forEach(n=>this.setAttribute(n,t[n]))}setStatus(t){return this._status=t,this}setHttpStatus(t){return WQ(this,t),this}setName(t){this.updateName(t)}updateName(t){return this._name=t,this}isSuccess(){return this._status==="ok"}finish(t){return this.end(t)}end(t){if(this._endTime)return;const n=g5(this);if(zn&&n&&n.spanContext().spanId!==this._spanId){const r=this._logMessage;r&&Pt.log(r.replace("Starting","Finishing"))}this._endTime=p6(t)}toTraceparent(){return h6(this)}toContext(){return gc({data:this._getData(),description:this._name,endTimestamp:this._endTime,op:this.op,parentSpanId:this._parentSpanId,sampled:this._sampled,spanId:this._spanId,startTimestamp:this._startTime,status:this._status,tags:this.tags,traceId:this._traceId})}updateWithContext(t){return this.data=t.data||{},this._name=t.name||t.description,this._endTime=t.endTimestamp,this.op=t.op,this._parentSpanId=t.parentSpanId,this._sampled=t.sampled,this._spanId=t.spanId||this._spanId,this._startTime=t.startTimestamp||this._startTime,this._status=t.status,this.tags=t.tags||{},this._traceId=t.traceId||this._traceId,this}getTraceContext(){return VQ(this)}getSpanJSON(){return gc({data:this._getData(),description:this._name,op:this._attributes[t4],parent_span_id:this._parentSpanId,span_id:this._spanId,start_timestamp:this._startTime,status:this._status,tags:Object.keys(this.tags).length>0?this.tags:void 0,timestamp:this._endTime,trace_id:this._traceId,origin:this._attributes[jy]})}isRecording(){return!this._endTime&&!!this._sampled}toJSON(){return this.getSpanJSON()}_getData(){const{data:t,_attributes:n}=this,r=Object.keys(t).length>0,i=Object.keys(n).length>0;if(!(!r&&!i))return r&&i?{...t,...n}:r?t:n}}class Jye extends QQ{constructor(t,n){super(t),this._measurements={},this._contexts={},this._hub=n||$c(),this._name=t.name||"",this._metadata={...t.metadata},this._trimEnd=t.trimEnd,this.transaction=this;const r=this._metadata.dynamicSamplingContext;r&&(this._frozenDynamicSamplingContext={...r})}get name(){return this._name}set name(t){this.setName(t)}get metadata(){return{source:"custom",spanMetadata:{},...this._metadata,...this._attributes[yv]&&{source:this._attributes[yv]},...this._attributes[zy]&&{sampleRate:this._attributes[zy]}}}set metadata(t){this._metadata=t}setName(t,n="custom"){this._name=t,this.setAttribute(yv,n)}updateName(t){return this._name=t,this}initSpanRecorder(t=1e3){this.spanRecorder||(this.spanRecorder=new Kye(t)),this.spanRecorder.add(this)}setContext(t,n){n===null?delete this._contexts[t]:this._contexts[t]=n}setMeasurement(t,n,r=""){this._measurements[t]={value:n,unit:r}}setMetadata(t){this._metadata={...this._metadata,...t}}end(t){const n=p6(t),r=this._finishTransaction(n);if(r)return this._hub.captureEvent(r)}toContext(){const t=super.toContext();return gc({...t,name:this._name,trimEnd:this._trimEnd})}updateWithContext(t){return super.updateWithContext(t),this._name=t.name||"",this._trimEnd=t.trimEnd,this}getDynamicSamplingContext(){return _x(this)}setHub(t){this._hub=t}_finishTransaction(t){if(this._endTime!==void 0)return;this._name||(zn&&Pt.warn("Transaction has no name, falling back to ``."),this._name=""),super.end(t);const n=this._hub.getClient();if(n&&n.emit&&n.emit("finishTransaction",this),this._sampled!==!0){zn&&Pt.log("[Tracing] Discarding transaction because its trace was not chosen to be sampled."),n&&n.recordDroppedEvent("sample_rate","transaction");return}const r=this.spanRecorder?this.spanRecorder.spans.filter(l=>l!==this&&Zo(l).timestamp):[];if(this._trimEnd&&r.length>0){const l=r.map(u=>Zo(u).timestamp).filter(Boolean);this._endTime=l.reduce((u,c)=>u>c?u:c)}const{metadata:i}=this,{source:a}=i,s={contexts:{...this._contexts,trace:VQ(this)},spans:r,start_timestamp:this._startTime,tags:this.tags,timestamp:this._endTime,transaction:this._name,type:"transaction",sdkProcessingMetadata:{...i,dynamicSamplingContext:_x(this)},...a&&{transaction_info:{source:a}}};return Object.keys(this._measurements).length>0&&(zn&&Pt.log("[Measurements] Adding measurements to transaction",JSON.stringify(this._measurements,void 0,2)),s.measurements=this._measurements),zn&&Pt.log(`[Tracing] Finishing ${this.op} transaction: ${this._name}.`),s}}const a_={idleTimeout:1e3,finalTimeout:3e4,heartbeatInterval:5e3},sxt="finishReason",ny=["heartbeatFailed","idleTimeout","documentHidden","finalTimeout","externalFinish","cancelled"];class oxt extends Kye{constructor(t,n,r,i){super(i),this._pushActivity=t,this._popActivity=n,this.transactionSpanId=r}add(t){if(t.spanContext().spanId!==this.transactionSpanId){const n=t.end;t.end=(...r)=>(this._popActivity(t.spanContext().spanId),n.apply(t,r)),Zo(t).timestamp===void 0&&this._pushActivity(t.spanContext().spanId)}super.add(t)}}class lxt extends Jye{constructor(t,n,r=a_.idleTimeout,i=a_.finalTimeout,a=a_.heartbeatInterval,s=!1,o=!1){super(t,n),this._idleHub=n,this._idleTimeout=r,this._finalTimeout=i,this._heartbeatInterval=a,this._onScope=s,this.activities={},this._heartbeatCounter=0,this._finished=!1,this._idleTimeoutCanceledPermanently=!1,this._beforeFinishCallbacks=[],this._finishReason=ny[4],this._autoFinishAllowed=!o,s&&(zn&&Pt.log(`Setting idle transaction on scope. Span ID: ${this.spanContext().spanId}`),n.getScope().setSpan(this)),o||this._restartIdleTimeout(),setTimeout(()=>{this._finished||(this.setStatus("deadline_exceeded"),this._finishReason=ny[3],this.end())},this._finalTimeout)}end(t){const n=p6(t);if(this._finished=!0,this.activities={},this.op==="ui.action.click"&&this.setAttribute(sxt,this._finishReason),this.spanRecorder){zn&&Pt.log("[Tracing] finishing IdleTransaction",new Date(n*1e3).toISOString(),this.op);for(const r of this._beforeFinishCallbacks)r(this,n);this.spanRecorder.spans=this.spanRecorder.spans.filter(r=>{if(r.spanContext().spanId===this.spanContext().spanId)return!0;Zo(r).timestamp||(r.setStatus("cancelled"),r.end(n),zn&&Pt.log("[Tracing] cancelling span since transaction ended early",JSON.stringify(r,void 0,2)));const{start_timestamp:i,timestamp:a}=Zo(r),s=i&&i{this._finished||this._pushActivity(i)},r=i=>{this._finished||this._popActivity(i)};this.spanRecorder=new oxt(n,r,this.spanContext().spanId,t),zn&&Pt.log("Starting heartbeat"),this._pingHeartbeat()}this.spanRecorder.add(this)}cancelIdleTimeout(t,{restartOnChildSpanChange:n}={restartOnChildSpanChange:!0}){this._idleTimeoutCanceledPermanently=n===!1,this._idleTimeoutID&&(clearTimeout(this._idleTimeoutID),this._idleTimeoutID=void 0,Object.keys(this.activities).length===0&&this._idleTimeoutCanceledPermanently&&(this._finishReason=ny[5],this.end(t)))}setFinishReason(t){this._finishReason=t}sendAutoFinishSignal(){this._autoFinishAllowed||(zn&&Pt.log("[Tracing] Received finish signal for idle transaction."),this._restartIdleTimeout(),this._autoFinishAllowed=!0)}_restartIdleTimeout(t){this.cancelIdleTimeout(),this._idleTimeoutID=setTimeout(()=>{!this._finished&&Object.keys(this.activities).length===0&&(this._finishReason=ny[1],this.end(t))},this._idleTimeout)}_pushActivity(t){this.cancelIdleTimeout(void 0,{restartOnChildSpanChange:!this._idleTimeoutCanceledPermanently}),zn&&Pt.log(`[Tracing] pushActivity: ${t}`),this.activities[t]=!0,zn&&Pt.log("[Tracing] new activities count",Object.keys(this.activities).length)}_popActivity(t){if(this.activities[t]&&(zn&&Pt.log(`[Tracing] popActivity ${t}`),delete this.activities[t],zn&&Pt.log("[Tracing] new activities count",Object.keys(this.activities).length)),Object.keys(this.activities).length===0){const n=ok();this._idleTimeoutCanceledPermanently?this._autoFinishAllowed&&(this._finishReason=ny[5],this.end(n)):this._restartIdleTimeout(n+this._idleTimeout/1e3)}}_beat(){if(this._finished)return;const t=Object.keys(this.activities).join("");t===this._prevHeartbeatString?this._heartbeatCounter++:this._heartbeatCounter=1,this._prevHeartbeatString=t,this._heartbeatCounter>=3?this._autoFinishAllowed&&(zn&&Pt.log("[Tracing] Transaction finished because of no change for 3 heart beats"),this.setStatus("deadline_exceeded"),this._finishReason=ny[0],this.end()):this._pingHeartbeat()}_pingHeartbeat(){zn&&Pt.log(`pinging Heartbeat -> current counter: ${this._heartbeatCounter}`),setTimeout(()=>{this._beat()},this._heartbeatInterval)}}function g6(e){if(typeof __SENTRY_TRACING__=="boolean"&&!__SENTRY_TRACING__)return!1;const t=eo(),n=e||t&&t.getOptions();return!!n&&(n.enableTracing||"tracesSampleRate"in n||"tracesSampler"in n)}function eve(e,t,n){if(!g6(t))return e.sampled=!1,e;if(e.sampled!==void 0)return e.setAttribute(zy,Number(e.sampled)),e;let r;return typeof t.tracesSampler=="function"?(r=t.tracesSampler(n),e.setAttribute(zy,Number(r))):n.parentSampled!==void 0?r=n.parentSampled:typeof t.tracesSampleRate<"u"?(r=t.tracesSampleRate,e.setAttribute(zy,Number(r))):(r=1,e.setAttribute(zy,r)),uxt(r)?r?(e.sampled=Math.random()1?(zn&&Pt.warn(`[Tracing] Given sample rate is invalid. Sample rate must be between 0 and 1. Got ${e}.`),!1):!0}function cxt(){const t=this.getScope().getSpan();return t?{"sentry-trace":h6(t)}:{}}function dxt(e,t){const n=this.getClient(),r=n&&n.getOptions()||{},i=r.instrumenter||"sentry",a=e.instrumenter||"sentry";i!==a&&(zn&&Pt.error(`A transaction was started with instrumenter=\`${a}\`, but the SDK is configured with the \`${i}\` instrumenter. +The transaction will not be sampled. Please use the ${i} instrumentation to start transactions.`),e.sampled=!1);let s=new Jye(e,this);return s=eve(s,r,{parentSampled:e.parentSampled,transactionContext:e,...t}),s.isRecording()&&s.initSpanRecorder(r._experiments&&r._experiments.maxSpans),n&&n.emit&&n.emit("startTransaction",s),s}function Gre(e,t,n,r,i,a,s,o=!1){const l=e.getClient(),u=l&&l.getOptions()||{};let c=new lxt(t,e,n,r,s,i,o);return c=eve(c,u,{parentSampled:t.parentSampled,transactionContext:t,...a}),c.isRecording()&&c.initSpanRecorder(u._experiments&&u._experiments.maxSpans),l&&l.emit&&l.emit("startTransaction",c),c}function fxt(){const e=lk();e.__SENTRY__&&(e.__SENTRY__.extensions=e.__SENTRY__.extensions||{},e.__SENTRY__.extensions.startTransaction||(e.__SENTRY__.extensions.startTransaction=dxt),e.__SENTRY__.extensions.traceHeaders||(e.__SENTRY__.extensions.traceHeaders=cxt),ixt())}function tve(e){if(!g6())return;const t=pxt(e),n=$c(),r=e.scope?e.scope.getSpan():hxt();if(!(e.onlyIfParent&&!r)){if(r)return r.startChild(t);{const a=j1(),s=Tp(),{traceId:o,dsc:l,parentSpanId:u,sampled:c}={...a.getPropagationContext(),...s.getPropagationContext()};return n.startTransaction({traceId:o,parentSpanId:u,parentSampled:c,...t,metadata:{dynamicSamplingContext:l,...t.metadata}})}}}function hxt(){return Tp().getSpan()}function pxt(e){if(e.startTime){const t={...e};return t.startTimestamp=p6(e.startTime),delete t.startTime,t}return e}function mxt(e,t,n){const r=iS();r&&r.setMeasurement(e,t,n)}function gxt(e,t){return t&&(e.sdk=e.sdk||{},e.sdk.name=e.sdk.name||t.name,e.sdk.version=e.sdk.version||t.version,e.sdk.integrations=[...e.sdk.integrations||[],...t.integrations||[]],e.sdk.packages=[...e.sdk.packages||[],...t.packages||[]]),e}function bxt(e,t,n,r){const i=Uye(n),a={sent_at:new Date().toISOString(),...i&&{sdk:i},...!!r&&t&&{dsn:ak(t)}},s="aggregates"in e?[{type:"sessions"},e]:[{type:"session"},e.toJSON()];return rS(a,[s])}function yxt(e,t,n,r){const i=Uye(n),a=e.type&&e.type!=="replay_event"?e.type:"event";gxt(e,n&&n.sdk);const s=xwt(e,i,r,t);return delete e.sdkProcessingMetadata,rS(s,[[{type:a},e]])}const vxt="7";function Oxt(e){const t=e.protocol?`${e.protocol}:`:"",n=e.port?`:${e.port}`:"";return`${t}//${e.host}${n}${e.path?`/${e.path}`:""}/api/`}function Sxt(e){return`${Oxt(e)}${e.projectId}/envelope/`}function Ext(e,t){return N2t({sentry_key:e.publicKey,sentry_version:vxt,...t&&{sentry_client:`${t.name}/${t.version}`}})}function wxt(e,t={}){const n=typeof t=="string"?t:t.tunnel,r=typeof t=="string"||!t._metadata?void 0:t._metadata.sdk;return n||`${Sxt(e)}?${Ext(e,r)}`}const Yre=[];function xxt(e){const t={};return e.forEach(n=>{const{name:r}=n,i=t[r];i&&!i.isDefaultInstance&&n.isDefaultInstance||(t[r]=n)}),Object.keys(t).map(n=>t[n])}function Txt(e){const t=e.defaultIntegrations||[],n=e.integrations;t.forEach(s=>{s.isDefaultInstance=!0});let r;Array.isArray(n)?r=[...t,...n]:typeof n=="function"?r=Rye(n(t)):r=t;const i=xxt(r),a=Cxt(i,s=>s.name==="Debug");if(a!==-1){const[s]=i.splice(a,1);i.push(s)}return i}function kxt(e,t){const n={};return t.forEach(r=>{r&&nve(e,r,n)}),n}function Zre(e,t){for(const n of t)n&&n.afterAllSetup&&n.afterAllSetup(e)}function nve(e,t,n){if(n[t.name]){zn&&Pt.log(`Integration skipped because it was already installed: ${t.name}`);return}if(n[t.name]=t,Yre.indexOf(t.name)===-1&&(t.setupOnce(Iwt,$c),Yre.push(t.name)),t.setup&&typeof t.setup=="function"&&t.setup(e),e.on&&typeof t.preprocessEvent=="function"){const r=t.preprocessEvent.bind(t);e.on("preprocessEvent",(i,a)=>r(i,a,e))}if(e.addEventProcessor&&typeof t.processEvent=="function"){const r=t.processEvent.bind(t),i=Object.assign((a,s)=>r(a,s,e),{id:t.name});e.addEventProcessor(i)}zn&&Pt.log(`Integration installed: ${t.name}`)}function Cxt(e,t){for(let n=0;n0?`|#${r.map(([a,s])=>`${a}:${s}`).join(",")}`:"";t+=`${n.name}@${n.unit}:${n.metric}|${n.metricType}${i}|T${n.timestamp} +`}return t}function _xt(e,t,n,r){const i={sent_at:new Date().toISOString()};n&&n.sdk&&(i.sdk={name:n.sdk.name,version:n.sdk.version}),r&&t&&(i.dsn=ak(t));const a=Rxt(e);return rS(i,[a])}function Rxt(e){const t=Axt(e);return[{type:"statsd",length:t.length},t]}const Xre="Not capturing exception because it's already been captured.";class Ixt{constructor(t){if(this._options=t,this._integrations={},this._integrationsInitialized=!1,this._numProcessing=0,this._outcomes={},this._hooks={},this._eventProcessors=[],t.dsn?this._dsn=D2t(t.dsn):zn&&Pt.warn("No DSN provided, client will not send events."),this._dsn){const n=wxt(this._dsn,t);this._transport=t.transport({recordDroppedEvent:this.recordDroppedEvent.bind(this),...t.transportOptions,url:n})}}captureException(t,n,r){if(Dre(t)){zn&&Pt.log(Xre);return}let i=n&&n.event_id;return this._process(this.eventFromException(t,n).then(a=>this._captureEvent(a,n,r)).then(a=>{i=a})),i}captureMessage(t,n,r,i){let a=r&&r.event_id;const s=LQ(t)?t:String(t),o=$Q(t)?this.eventFromMessage(s,n,r):this.eventFromException(t,r);return this._process(o.then(l=>this._captureEvent(l,r,i)).then(l=>{a=l})),a}captureEvent(t,n,r){if(n&&n.originalException&&Dre(n.originalException)){zn&&Pt.log(Xre);return}let i=n&&n.event_id;return this._process(this._captureEvent(t,n,r).then(a=>{i=a})),i}captureSession(t){typeof t.release!="string"?zn&&Pt.warn("Discarded session because of missing or non-string release"):(this.sendSession(t),S1(t,{init:!1}))}getDsn(){return this._dsn}getOptions(){return this._options}getSdkMetadata(){return this._options._metadata}getTransport(){return this._transport}flush(t){const n=this._transport;return n?(this.metricsAggregator&&this.metricsAggregator.flush(),this._isClientDoneProcessing(t).then(r=>n.flush(t).then(i=>r&&i))):hO(!0)}close(t){return this.flush(t).then(n=>(this.getOptions().enabled=!1,this.metricsAggregator&&this.metricsAggregator.close(),n))}getEventProcessors(){return this._eventProcessors}addEventProcessor(t){this._eventProcessors.push(t)}setupIntegrations(t){(t&&!this._integrationsInitialized||this._isEnabled()&&!this._integrationsInitialized)&&this._setupIntegrations()}init(){this._isEnabled()&&this._setupIntegrations()}getIntegrationById(t){return this.getIntegrationByName(t)}getIntegrationByName(t){return this._integrations[t]}getIntegration(t){try{return this._integrations[t.id]||null}catch{return zn&&Pt.warn(`Cannot retrieve integration ${t.id} from the current Client`),null}}addIntegration(t){const n=this._integrations[t.name];nve(this,t,this._integrations),n||Zre(this,[t])}sendEvent(t,n={}){this.emit("beforeSendEvent",t,n);let r=yxt(t,this._dsn,this._options._metadata,this._options.tunnel);for(const a of n.attachments||[])r=vwt(r,Ewt(a,this._options.transportOptions&&this._options.transportOptions.textEncoder));const i=this._sendEnvelope(r);i&&i.then(a=>this.emit("afterSendEvent",t,a),null)}sendSession(t){const n=bxt(t,this._dsn,this._options._metadata,this._options.tunnel);this._sendEnvelope(n)}recordDroppedEvent(t,n,r){if(this._options.sendClientReports){const i=`${t}:${n}`;zn&&Pt.log(`Adding outcome: "${i}"`),this._outcomes[i]=this._outcomes[i]+1||1}}captureAggregateMetrics(t){zn&&Pt.log(`Flushing aggregated metrics, number of metrics: ${t.length}`);const n=_xt(t,this._dsn,this._options._metadata,this._options.tunnel);this._sendEnvelope(n)}on(t,n){this._hooks[t]||(this._hooks[t]=[]),this._hooks[t].push(n)}emit(t,...n){this._hooks[t]&&this._hooks[t].forEach(r=>r(...n))}_setupIntegrations(){const{integrations:t}=this._options;this._integrations=kxt(this,t),Zre(this,t),this._integrationsInitialized=!0}_updateSessionFromEvent(t,n){let r=!1,i=!1;const a=n.exception&&n.exception.values;if(a){i=!0;for(const l of a){const u=l.mechanism;if(u&&u.handled===!1){r=!0;break}}}const s=t.status==="ok";(s&&t.errors===0||s&&r)&&(S1(t,{...r&&{status:"crashed"},errors:t.errors||Number(i||r)}),this.captureSession(t))}_isClientDoneProcessing(t){return new hu(n=>{let r=0;const i=1,a=setInterval(()=>{this._numProcessing==0?(clearInterval(a),n(!0)):(r+=i,t&&r>=t&&(clearInterval(a),n(!1)))},i)})}_isEnabled(){return this.getOptions().enabled!==!1&&this._transport!==void 0}_prepareEvent(t,n,r,i=j1()){const a=this.getOptions(),s=Object.keys(this._integrations);return!n.integrations&&s.length>0&&(n.integrations=s),this.emit("preprocessEvent",t,n),Mwt(a,t,n,r,this,i).then(o=>{if(o===null)return o;const l={...i.getPropagationContext(),...r?r.getPropagationContext():void 0};if(!(o.contexts&&o.contexts.trace)&&l){const{traceId:c,spanId:f,parentSpanId:h,dsc:g}=l;o.contexts={trace:{trace_id:c,span_id:f,parent_span_id:h},...o.contexts};const b=g||m6(c,this,r);o.sdkProcessingMetadata={dynamicSamplingContext:b,...o.sdkProcessingMetadata}}return o})}_captureEvent(t,n={},r){return this._processEvent(t,n,r).then(i=>i.event_id,i=>{if(zn){const a=i;a.logLevel==="log"?Pt.log(a.message):Pt.warn(a)}})}_processEvent(t,n,r){const i=this.getOptions(),{sampleRate:a}=i,s=ive(t),o=rve(t),l=t.type||"error",u=`before send for type \`${l}\``;if(o&&typeof a=="number"&&Math.random()>a)return this.recordDroppedEvent("sample_rate","error",t),zQ(new Of(`Discarding event because it's not included in the random sample (sampling rate = ${a})`,"log"));const c=l==="replay_event"?"replay":l;return this._prepareEvent(t,n,r).then(f=>{if(f===null)throw this.recordDroppedEvent("event_processor",c,t),new Of("An event processor returned `null`, will not send event.","log");if(n.data&&n.data.__sentry__===!0)return f;const g=Nxt(i,f,n);return Dxt(g,u)}).then(f=>{if(f===null)throw this.recordDroppedEvent("before_send",c,t),new Of(`${u} returned \`null\`, will not send event.`,"log");const h=r&&r.getSession();!s&&h&&this._updateSessionFromEvent(h,f);const g=f.transaction_info;if(s&&g&&f.transaction!==t.transaction){const b="custom";f.transaction_info={...g,source:b}}return this.sendEvent(f,n),f}).then(null,f=>{throw f instanceof Of?f:(this.captureException(f,{data:{__sentry__:!0},originalException:f}),new Of(`Event processing pipeline threw an error, original event will not be sent. Details have been sent as a new event. +Reason: ${f}`))})}_process(t){this._numProcessing++,t.then(n=>(this._numProcessing--,n),n=>(this._numProcessing--,n))}_sendEnvelope(t){if(this.emit("beforeEnvelope",t),this._isEnabled()&&this._transport)return this._transport.send(t).then(null,n=>{zn&&Pt.error("Error while sending event:",n)});zn&&Pt.error("Transport disabled")}_clearOutcomes(){const t=this._outcomes;return this._outcomes={},Object.keys(t).map(n=>{const[r,i]=n.split(":");return{reason:r,category:i,quantity:t[n]}})}}function Dxt(e,t){const n=`${t} must return \`null\` or a valid event.`;if(c6(e))return e.then(r=>{if(!fO(r)&&r!==null)throw new Of(n);return r},r=>{throw new Of(`${t} rejected with ${r}`)});if(!fO(e)&&e!==null)throw new Of(n);return e}function Nxt(e,t,n){const{beforeSend:r,beforeSendTransaction:i}=e;return rve(t)&&r?r(t,n):ive(t)&&i?i(t,n):t}function rve(e){return e.type===void 0}function ive(e){return e.type==="transaction"}function Pxt(e,t){t.debug===!0&&(zn?Pt.enable():d6(()=>{console.warn("[Sentry] Cannot initialize SDK with `debug` option using a non-debug bundle.")})),Tp().update(t.initialScope);const r=new e(t);Mxt(r),Lxt(r)}function Mxt(e){const n=$c().getStackTop();n.client=e,n.scope.setClient(e)}function Lxt(e){e.init?e.init():e.setupIntegrations&&e.setupIntegrations()}const $xt=30;function ave(e,t,n=lwt(e.bufferSize||$xt)){let r={};const i=s=>n.drain(s);function a(s){const o=[];if($re(s,(f,h)=>{const g=Fre(h);if(_wt(r,g)){const b=Kre(f,h);e.recordDroppedEvent("ratelimit_backoff",g,b)}else o.push(f)}),o.length===0)return hO();const l=rS(s[0],o),u=f=>{$re(l,(h,g)=>{const b=Kre(h,g);e.recordDroppedEvent(f,Fre(g),b)})},c=()=>t({body:Owt(l,e.textEncoder)}).then(f=>(f.statusCode!==void 0&&(f.statusCode<200||f.statusCode>=300)&&zn&&Pt.warn(`Sentry responded with status code ${f.statusCode} to sent event.`),r=Rwt(r,f),f),f=>{throw u("network_error"),f});return n.add(c).then(f=>f,f=>{if(f instanceof Of)return zn&&Pt.error("Skipped sending event because buffer is full."),u("queue_overflow"),hO();throw f})}return a.__sentry__baseTransport__=!0,{send:a,flush:i}}function Kre(e,t){if(!(t!=="event"&&t!=="transaction"))return Array.isArray(e)?e[1]:void 0}function sve(e,t,n=[t],r="npm"){const i=e._metadata||{};i.sdk||(i.sdk={name:`sentry.javascript.${t}`,packages:n.map(a=>({name:`${r}:@sentry/${a}`,version:C9})),version:C9}),e._metadata=i}const Fxt=[/^Script error\.?$/,/^Javascript error: Script error\.? on line 0$/],Bxt=[/^.*\/healthcheck$/,/^.*\/healthy$/,/^.*\/live$/,/^.*\/ready$/,/^.*\/heartbeat$/,/^.*\/health$/,/^.*\/healthz$/],ove="InboundFilters",Uxt=(e={})=>({name:ove,setupOnce(){},processEvent(t,n,r){const i=r.getOptions(),a=zxt(e,i);return jxt(t,a)?null:t}}),lve=Uxt;N0(ove,lve);function zxt(e={},t={}){return{allowUrls:[...e.allowUrls||[],...t.allowUrls||[]],denyUrls:[...e.denyUrls||[],...t.denyUrls||[]],ignoreErrors:[...e.ignoreErrors||[],...t.ignoreErrors||[],...e.disableErrorDefaults?[]:Fxt],ignoreTransactions:[...e.ignoreTransactions||[],...t.ignoreTransactions||[],...e.disableTransactionDefaults?[]:Bxt],ignoreInternal:e.ignoreInternal!==void 0?e.ignoreInternal:!0}}function jxt(e,t){return t.ignoreInternal&&Gxt(e)?(zn&&Pt.warn(`Event dropped due to being internal Sentry Error. +Event: ${mm(e)}`),!0):Hxt(e,t.ignoreErrors)?(zn&&Pt.warn(`Event dropped due to being matched by \`ignoreErrors\` option. +Event: ${mm(e)}`),!0):Vxt(e,t.ignoreTransactions)?(zn&&Pt.warn(`Event dropped due to being matched by \`ignoreTransactions\` option. +Event: ${mm(e)}`),!0):Wxt(e,t.denyUrls)?(zn&&Pt.warn(`Event dropped due to being matched by \`denyUrls\` option. Event: ${mm(e)}. -Url: ${b5(e)}`),!0):Gxt(e,t.allowUrls)?!1:(zn&&Pt.warn(`Event dropped due to not being matched by \`allowUrls\` option. +Url: ${b5(e)}`),!0):Qxt(e,t.allowUrls)?!1:(zn&&Pt.warn(`Event dropped due to not being matched by \`allowUrls\` option. Event: ${mm(e)}. -Url: ${b5(e)}`),!0)}function Wxt(e,t){return e.type||!t||!t.length?!1:Yxt(e).some(n=>ik(n,t))}function Qxt(e,t){if(e.type!=="transaction"||!t||!t.length)return!1;const n=e.transaction;return n?ik(n,t):!1}function qxt(e,t){if(!t||!t.length)return!1;const n=b5(e);return n?ik(n,t):!1}function Gxt(e,t){if(!t||!t.length)return!0;const n=b5(e);return n?ik(n,t):!0}function Yxt(e){const t=[];e.message&&t.push(e.message);let n;try{n=e.exception.values[e.exception.values.length-1]}catch{}return n&&n.value&&(t.push(n.value),n.type&&t.push(`${n.type}: ${n.value}`)),zn&&t.length===0&&Pt.error(`Could not extract message for event ${mm(e)}`),t}function Zxt(e){try{return e.exception.values[0].type==="SentryError"}catch{}return!1}function Xxt(e=[]){for(let t=e.length-1;t>=0;t--){const n=e[t];if(n&&n.filename!==""&&n.filename!=="[native code]")return n.filename||null}return null}function b5(e){try{let t;try{t=e.exception.values[0].stacktrace.frames}catch{}return t?Xxt(t):null}catch{return zn&&Pt.error(`Cannot extract url for event ${mm(e)}`),null}}let Jre;const uve="FunctionToString",eie=new WeakMap,Kxt=()=>({name:uve,setupOnce(){Jre=Function.prototype.toString;try{Function.prototype.toString=function(...e){const t=BQ(this),n=eie.has(eo())&&t!==void 0?t:this;return Jre.apply(n,e)}}catch{}},setup(e){eie.set(e,!0)}}),cve=Kxt;N0(uve,cve);const ia=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,ai=si;function Jxt(){ai&&ai.document?ai.document.addEventListener("visibilitychange",()=>{const e=iS();if(ai.document.hidden&&e){const t="cancelled",{op:n,status:r}=Zo(e);ia&&Pt.log(`[Tracing] Transaction: ${t} -> since tab moved to the background, op: ${n}`),r||e.setStatus(t),e.setTag("visibilitychange","document.hidden"),e.end()}}):ia&&Pt.warn("[Tracing] Could not set up background tab detection due to lack of global document")}const qQ=(e,t,n)=>{let r,i;return a=>{t.value>=0&&(a||n)&&(i=t.value-(r||0),(i||r===void 0)&&(r=t.value,t.delta=i,e(t)))}},eTt=()=>`v3-${Date.now()}-${Math.floor(Math.random()*(9e12-1))+1e12}`,tTt=()=>{const e=ai.performance.timing,t=ai.performance.navigation.type,n={entryType:"navigation",startTime:0,type:t==2?"back_forward":t===1?"reload":"navigate"};for(const r in e)r!=="navigationStart"&&r!=="toJSON"&&(n[r]=Math.max(e[r]-e.navigationStart,0));return n},dve=()=>ai.__WEB_VITALS_POLYFILL__?ai.performance&&(performance.getEntriesByType&&performance.getEntriesByType("navigation")[0]||tTt()):ai.performance&&performance.getEntriesByType&&performance.getEntriesByType("navigation")[0],fve=()=>{const e=dve();return e&&e.activationStart||0},GQ=(e,t)=>{const n=dve();let r="navigate";return n&&(ai.document.prerendering||fve()>0?r="prerender":r=n.type.replace(/_/g,"-")),{name:e,value:typeof t>"u"?-1:t,rating:"good",delta:0,entries:[],id:eTt(),navigationType:r}},b6=(e,t,n)=>{try{if(PerformanceObserver.supportedEntryTypes.includes(e)){const r=new PerformanceObserver(i=>{t(i.getEntries())});return r.observe(Object.assign({type:e,buffered:!0},n||{})),r}}catch{}},y6=(e,t)=>{const n=r=>{(r.type==="pagehide"||ai.document.visibilityState==="hidden")&&(e(r),t&&(removeEventListener("visibilitychange",n,!0),removeEventListener("pagehide",n,!0)))};addEventListener("visibilitychange",n,!0),addEventListener("pagehide",n,!0)},nTt=e=>{const t=GQ("CLS",0);let n,r=0,i=[];const a=o=>{o.forEach(l=>{if(!l.hadRecentInput){const u=i[0],c=i[i.length-1];r&&i.length!==0&&l.startTime-c.startTime<1e3&&l.startTime-u.startTime<5e3?(r+=l.value,i.push(l)):(r=l.value,i=[l]),r>t.value&&(t.value=r,t.entries=i,n&&n())}})},s=b6("layout-shift",a);if(s){n=qQ(e,t);const o=()=>{a(s.takeRecords()),n(!0)};return y6(o),o}};let s_=-1;const rTt=()=>ai.document.visibilityState==="hidden"&&!ai.document.prerendering?0:1/0,iTt=()=>{y6(({timeStamp:e})=>{s_=e},!0)},YQ=()=>(s_<0&&(s_=rTt(),iTt()),{get firstHiddenTime(){return s_}}),aTt=e=>{const t=YQ(),n=GQ("FID");let r;const i=o=>{o.startTime{o.forEach(i)},s=b6("first-input",a);r=qQ(e,n),s&&y6(()=>{a(s.takeRecords()),s.disconnect()},!0)},tie={},sTt=e=>{const t=YQ(),n=GQ("LCP");let r;const i=s=>{const o=s[s.length-1];if(o){const l=Math.max(o.startTime-fve(),0);l{tie[n.id]||(i(a.takeRecords()),a.disconnect(),tie[n.id]=!0,r(!0))};return["keydown","click"].forEach(o=>{addEventListener(o,s,{once:!0,capture:!0})}),y6(s,!0),s}},iw={},y5={};let hve,pve,mve;function oTt(e,t=!1){return XQ("cls",e,cTt,hve,t)}function lTt(e,t=!1){return XQ("lcp",e,fTt,mve,t)}function uTt(e){return XQ("fid",e,dTt,pve)}function ZQ(e,t){return gve(e,t),y5[e]||(hTt(e),y5[e]=!0),bve(e,t)}function v6(e,t){const n=iw[e];if(!(!n||!n.length))for(const r of n)try{r(t)}catch(i){ia&&Pt.error(`Error while triggering instrumentation handler. +Url: ${b5(e)}`),!0)}function Hxt(e,t){return e.type||!t||!t.length?!1:qxt(e).some(n=>ik(n,t))}function Vxt(e,t){if(e.type!=="transaction"||!t||!t.length)return!1;const n=e.transaction;return n?ik(n,t):!1}function Wxt(e,t){if(!t||!t.length)return!1;const n=b5(e);return n?ik(n,t):!1}function Qxt(e,t){if(!t||!t.length)return!0;const n=b5(e);return n?ik(n,t):!0}function qxt(e){const t=[];e.message&&t.push(e.message);let n;try{n=e.exception.values[e.exception.values.length-1]}catch{}return n&&n.value&&(t.push(n.value),n.type&&t.push(`${n.type}: ${n.value}`)),zn&&t.length===0&&Pt.error(`Could not extract message for event ${mm(e)}`),t}function Gxt(e){try{return e.exception.values[0].type==="SentryError"}catch{}return!1}function Yxt(e=[]){for(let t=e.length-1;t>=0;t--){const n=e[t];if(n&&n.filename!==""&&n.filename!=="[native code]")return n.filename||null}return null}function b5(e){try{let t;try{t=e.exception.values[0].stacktrace.frames}catch{}return t?Yxt(t):null}catch{return zn&&Pt.error(`Cannot extract url for event ${mm(e)}`),null}}let Jre;const uve="FunctionToString",eie=new WeakMap,Zxt=()=>({name:uve,setupOnce(){Jre=Function.prototype.toString;try{Function.prototype.toString=function(...e){const t=BQ(this),n=eie.has(eo())&&t!==void 0?t:this;return Jre.apply(n,e)}}catch{}},setup(e){eie.set(e,!0)}}),cve=Zxt;N0(uve,cve);const ia=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,ai=si;function Xxt(){ai&&ai.document?ai.document.addEventListener("visibilitychange",()=>{const e=iS();if(ai.document.hidden&&e){const t="cancelled",{op:n,status:r}=Zo(e);ia&&Pt.log(`[Tracing] Transaction: ${t} -> since tab moved to the background, op: ${n}`),r||e.setStatus(t),e.setTag("visibilitychange","document.hidden"),e.end()}}):ia&&Pt.warn("[Tracing] Could not set up background tab detection due to lack of global document")}const qQ=(e,t,n)=>{let r,i;return a=>{t.value>=0&&(a||n)&&(i=t.value-(r||0),(i||r===void 0)&&(r=t.value,t.delta=i,e(t)))}},Kxt=()=>`v3-${Date.now()}-${Math.floor(Math.random()*(9e12-1))+1e12}`,Jxt=()=>{const e=ai.performance.timing,t=ai.performance.navigation.type,n={entryType:"navigation",startTime:0,type:t==2?"back_forward":t===1?"reload":"navigate"};for(const r in e)r!=="navigationStart"&&r!=="toJSON"&&(n[r]=Math.max(e[r]-e.navigationStart,0));return n},dve=()=>ai.__WEB_VITALS_POLYFILL__?ai.performance&&(performance.getEntriesByType&&performance.getEntriesByType("navigation")[0]||Jxt()):ai.performance&&performance.getEntriesByType&&performance.getEntriesByType("navigation")[0],fve=()=>{const e=dve();return e&&e.activationStart||0},GQ=(e,t)=>{const n=dve();let r="navigate";return n&&(ai.document.prerendering||fve()>0?r="prerender":r=n.type.replace(/_/g,"-")),{name:e,value:typeof t>"u"?-1:t,rating:"good",delta:0,entries:[],id:Kxt(),navigationType:r}},b6=(e,t,n)=>{try{if(PerformanceObserver.supportedEntryTypes.includes(e)){const r=new PerformanceObserver(i=>{t(i.getEntries())});return r.observe(Object.assign({type:e,buffered:!0},n||{})),r}}catch{}},y6=(e,t)=>{const n=r=>{(r.type==="pagehide"||ai.document.visibilityState==="hidden")&&(e(r),t&&(removeEventListener("visibilitychange",n,!0),removeEventListener("pagehide",n,!0)))};addEventListener("visibilitychange",n,!0),addEventListener("pagehide",n,!0)},eTt=e=>{const t=GQ("CLS",0);let n,r=0,i=[];const a=o=>{o.forEach(l=>{if(!l.hadRecentInput){const u=i[0],c=i[i.length-1];r&&i.length!==0&&l.startTime-c.startTime<1e3&&l.startTime-u.startTime<5e3?(r+=l.value,i.push(l)):(r=l.value,i=[l]),r>t.value&&(t.value=r,t.entries=i,n&&n())}})},s=b6("layout-shift",a);if(s){n=qQ(e,t);const o=()=>{a(s.takeRecords()),n(!0)};return y6(o),o}};let s_=-1;const tTt=()=>ai.document.visibilityState==="hidden"&&!ai.document.prerendering?0:1/0,nTt=()=>{y6(({timeStamp:e})=>{s_=e},!0)},YQ=()=>(s_<0&&(s_=tTt(),nTt()),{get firstHiddenTime(){return s_}}),rTt=e=>{const t=YQ(),n=GQ("FID");let r;const i=o=>{o.startTime{o.forEach(i)},s=b6("first-input",a);r=qQ(e,n),s&&y6(()=>{a(s.takeRecords()),s.disconnect()},!0)},tie={},iTt=e=>{const t=YQ(),n=GQ("LCP");let r;const i=s=>{const o=s[s.length-1];if(o){const l=Math.max(o.startTime-fve(),0);l{tie[n.id]||(i(a.takeRecords()),a.disconnect(),tie[n.id]=!0,r(!0))};return["keydown","click"].forEach(o=>{addEventListener(o,s,{once:!0,capture:!0})}),y6(s,!0),s}},iw={},y5={};let hve,pve,mve;function aTt(e,t=!1){return XQ("cls",e,lTt,hve,t)}function sTt(e,t=!1){return XQ("lcp",e,cTt,mve,t)}function oTt(e){return XQ("fid",e,uTt,pve)}function ZQ(e,t){return gve(e,t),y5[e]||(dTt(e),y5[e]=!0),bve(e,t)}function v6(e,t){const n=iw[e];if(!(!n||!n.length))for(const r of n)try{r(t)}catch(i){ia&&Pt.error(`Error while triggering instrumentation handler. Type: ${e} Name: ${pp(r)} -Error:`,i)}}function cTt(){return nTt(e=>{v6("cls",{metric:e}),hve=e})}function dTt(){return aTt(e=>{v6("fid",{metric:e}),pve=e})}function fTt(){return sTt(e=>{v6("lcp",{metric:e}),mve=e})}function XQ(e,t,n,r,i=!1){gve(e,t);let a;return y5[e]||(a=n(),y5[e]=!0),r&&t({metric:r}),bve(e,t,i?a:void 0)}function hTt(e){const t={};e==="event"&&(t.durationThreshold=0),b6(e,n=>{v6(e,{entries:n})},t)}function gve(e,t){iw[e]=iw[e]||[],iw[e].push(t)}function bve(e,t,n){return()=>{n&&n();const r=iw[e];if(!r)return;const i=r.indexOf(t);i!==-1&&r.splice(i,1)}}function v7(e){return typeof e=="number"&&isFinite(e)}function pO(e,{startTimestamp:t,...n}){return t&&e.startTimestamp>t&&(e.startTimestamp=t),e.startChild({startTimestamp:t,...n})}const pTt=2147483647;function ns(e){return e/1e3}function yve(){return ai&&ai.addEventListener&&ai.performance}let nie=0,Ra={},of,aw;function mTt(){const e=yve();if(e&&Hf){e.mark&&ai.performance.mark("sentry-tracing-init");const t=OTt(),n=yTt(),r=vTt();return()=>{t(),n(),r()}}return()=>{}}function gTt(){ZQ("longtask",({entries:e})=>{for(const t of e){const n=iS();if(!n)return;const r=ns(Hf+t.startTime),i=ns(t.duration);n.startChild({description:"Main UI thread blocked",op:"ui.long-task",origin:"auto.ui.browser.metrics",startTimestamp:r,endTimestamp:r+i})}})}function bTt(){ZQ("event",({entries:e})=>{for(const t of e){const n=iS();if(!n)return;if(t.name==="click"){const r=ns(Hf+t.startTime),i=ns(t.duration),a={description:kx(t.target),op:`ui.interaction.${t.name}`,origin:"auto.ui.browser.metrics",startTimestamp:r,endTimestamp:r+i},s=wye(t.target);s&&(a.attributes={"ui.component_name":s}),n.startChild(a)}}})}function yTt(){return oTt(({metric:e})=>{const t=e.entries[e.entries.length-1];t&&(ia&&Pt.log("[Measurements] Adding CLS"),Ra.cls={value:e.value,unit:""},aw=t)},!0)}function vTt(){return lTt(({metric:e})=>{const t=e.entries[e.entries.length-1];t&&(ia&&Pt.log("[Measurements] Adding LCP"),Ra.lcp={value:e.value,unit:"millisecond"},of=t)},!0)}function OTt(){return uTt(({metric:e})=>{const t=e.entries[e.entries.length-1];if(!t)return;const n=ns(Hf),r=ns(t.startTime);ia&&Pt.log("[Measurements] Adding FID"),Ra.fid={value:e.value,unit:"millisecond"},Ra["mark.fid"]={value:n+r,unit:"second"}})}function STt(e){const t=yve();if(!t||!ai.performance.getEntries||!Hf)return;ia&&Pt.log("[Tracing] Adding & adjusting spans using Performance API");const n=ns(Hf),r=t.getEntries();let i,a;const{op:s,start_timestamp:o}=Zo(e);if(r.slice(nie).forEach(l=>{const u=ns(l.startTime),c=ns(l.duration);if(!(e.op==="navigation"&&o&&n+u{if(!Ra[u]||!o||n>=o)return;const c=Ra[u].value,f=n+ns(c),h=Math.abs((f-o)*1e3),g=h-c;ia&&Pt.log(`[Measurements] Normalized ${u} from ${c} to ${h} (${g})`),Ra[u].value=h});const l=Ra["mark.fid"];l&&Ra.fid&&(pO(e,{description:"first input delay",endTimestamp:l.value+ns(Ra.fid.value),op:"ui.action",origin:"auto.ui.browser.metrics",startTimestamp:l.value}),delete Ra["mark.fid"]),"fcp"in Ra||delete Ra.cls,Object.keys(Ra).forEach(u=>{bxt(u,Ra[u].value,Ra[u].unit)}),CTt(e)}of=void 0,aw=void 0,Ra={}}function ETt(e,t,n,r,i){const a=i+n,s=a+r;return pO(e,{description:t.name,endTimestamp:s,op:t.entryType,origin:"auto.resource.browser.metrics",startTimestamp:a}),a}function wTt(e,t,n){["unloadEvent","redirect","domContentLoadedEvent","loadEvent","connect"].forEach(r=>{n4(e,t,r,n)}),n4(e,t,"secureConnection",n,"TLS/SSL","connectEnd"),n4(e,t,"fetch",n,"cache","domainLookupStart"),n4(e,t,"domainLookup",n,"DNS"),xTt(e,t,n)}function n4(e,t,n,r,i,a){const s=a?t[a]:t[`${n}End`],o=t[`${n}Start`];!o||!s||pO(e,{op:"browser",origin:"auto.browser.browser.metrics",description:i||n,startTimestamp:r+ns(o),endTimestamp:r+ns(s)})}function xTt(e,t,n){t.responseEnd&&(pO(e,{op:"browser",origin:"auto.browser.browser.metrics",description:"request",startTimestamp:n+ns(t.requestStart),endTimestamp:n+ns(t.responseEnd)}),pO(e,{op:"browser",origin:"auto.browser.browser.metrics",description:"response",startTimestamp:n+ns(t.responseStart),endTimestamp:n+ns(t.responseEnd)}))}function TTt(e,t,n,r,i,a){if(t.initiatorType==="xmlhttprequest"||t.initiatorType==="fetch")return;const s=i_(n),o={};O7(o,t,"transferSize","http.response_transfer_size"),O7(o,t,"encodedBodySize","http.response_content_length"),O7(o,t,"decodedBodySize","http.decoded_response_content_length"),"renderBlockingStatus"in t&&(o["resource.render_blocking_status"]=t.renderBlockingStatus),s.protocol&&(o["url.scheme"]=s.protocol.split(":").pop()),s.host&&(o["server.address"]=s.host),o["url.same_origin"]=n.includes(ai.location.origin);const l=a+r,u=l+i;pO(e,{description:n.replace(ai.location.origin,""),endTimestamp:u,op:t.initiatorType?`resource.${t.initiatorType}`:"resource.other",origin:"auto.resource.browser.metrics",startTimestamp:l,data:o})}function kTt(e){const t=ai.navigator;if(!t)return;const n=t.connection;n&&(n.effectiveType&&e.setTag("effectiveConnectionType",n.effectiveType),n.type&&e.setTag("connectionType",n.type),v7(n.rtt)&&(Ra["connection.rtt"]={value:n.rtt,unit:"millisecond"})),v7(t.deviceMemory)&&e.setTag("deviceMemory",`${t.deviceMemory} GB`),v7(t.hardwareConcurrency)&&e.setTag("hardwareConcurrency",String(t.hardwareConcurrency))}function CTt(e){of&&(ia&&Pt.log("[Measurements] Adding LCP Data"),of.element&&e.setTag("lcp.element",kx(of.element)),of.id&&e.setTag("lcp.id",of.id),of.url&&e.setTag("lcp.url",of.url.trim().slice(0,200)),e.setTag("lcp.size",of.size)),aw&&aw.sources&&(ia&&Pt.log("[Measurements] Adding CLS Data"),aw.sources.forEach((t,n)=>e.setTag(`cls.source.${n+1}`,kx(t.node))))}function O7(e,t,n,r){const i=t[n];i!=null&&i0&&h.setAttribute("http.response_content_length",b)}}else e.error&&h.setStatus("internal_error");h.end(),delete r[f]}return}const s=Tp(),o=eo(),{method:l,url:u}=e.fetchData,c=a?tve({name:`${l} ${u}`,onlyIfParent:!0,attributes:{url:u,type:"fetch","http.method":l,[jy]:i},op:"http.client"}):void 0;if(c&&(e.fetchData.__span=c.spanContext().spanId,r[c.spanContext().spanId]=c),n(e.fetchData.url)&&o){const f=e.args[0];e.args[1]=e.args[1]||{};const h=e.args[1];h.headers=RTt(f,o,s,h,c)}return c}function RTt(e,t,n,r,i){const a=i||n.getSpan(),s=j1(),{traceId:o,spanId:l,sampled:u,dsc:c}={...s.getPropagationContext(),...n.getPropagationContext()},f=a?h6(a):jQ(o,l,u),h=Bye(c||(a?_x(a):m6(o,t,n))),g=r.headers||(typeof Request<"u"&&hp(e,Request)?e.headers:void 0);if(g)if(typeof Headers<"u"&&hp(g,Headers)){const b=new Headers(g);return b.append("sentry-trace",f),h&&b.append(T9,h),b}else if(Array.isArray(g)){const b=[...g,["sentry-trace",f]];return h&&b.push([T9,h]),b}else{const b="baggage"in g?g.baggage:void 0,S=[];return Array.isArray(b)?S.push(...b):b&&S.push(b),h&&S.push(h),{...g,"sentry-trace":f,baggage:S.length>0?S.join(","):void 0}}else return{"sentry-trace":f,baggage:h}}const R9=["localhost",/^\/(?!\/)/],I9={traceFetch:!0,traceXHR:!0,enableHTTPTimings:!0,tracingOrigins:R9,tracePropagationTargets:R9};function ITt(e){const{traceFetch:t,traceXHR:n,tracePropagationTargets:r,tracingOrigins:i,shouldCreateSpanForRequest:a,enableHTTPTimings:s}={traceFetch:I9.traceFetch,traceXHR:I9.traceXHR,...e},o=typeof a=="function"?a:c=>!0,l=c=>MTt(c,r||i),u={};t&&Dye(c=>{const f=_Tt(c,o,l,u);s&&f&&rie(f)}),n&&Mye(c=>{const f=LTt(c,o,l,u);s&&f&&rie(f)})}function DTt(e){return e.entryType==="resource"&&"initiatorType"in e&&typeof e.nextHopProtocol=="string"&&(e.initiatorType==="fetch"||e.initiatorType==="xmlhttprequest")}function rie(e){const{url:t}=Zo(e).data||{};if(!t||typeof t!="string")return;const n=ZQ("resource",({entries:r})=>{r.forEach(i=>{DTt(i)&&i.name.endsWith(t)&&(PTt(i).forEach(s=>e.setAttribute(...s)),setTimeout(n))})})}function NTt(e){let t="unknown",n="unknown",r="";for(const i of e){if(i==="/"){[t,n]=e.split("/");break}if(!isNaN(Number(i))){t=r==="h"?"http":r,n=e.split(r)[1];break}r+=i}return r===e&&(t=r),{name:t,version:n}}function tf(e=0){return((Hf||performance.timeOrigin)+e)/1e3}function PTt(e){const{name:t,version:n}=NTt(e.nextHopProtocol),r=[];return r.push(["network.protocol.version",n],["network.protocol.name",t]),Hf?[...r,["http.request.redirect_start",tf(e.redirectStart)],["http.request.fetch_start",tf(e.fetchStart)],["http.request.domain_lookup_start",tf(e.domainLookupStart)],["http.request.domain_lookup_end",tf(e.domainLookupEnd)],["http.request.connect_start",tf(e.connectStart)],["http.request.secure_connection_start",tf(e.secureConnectionStart)],["http.request.connection_end",tf(e.connectEnd)],["http.request.request_start",tf(e.requestStart)],["http.request.response_start",tf(e.responseStart)],["http.request.response_end",tf(e.responseEnd)]]:r}function MTt(e,t){return ik(e,t||R9)}function LTt(e,t,n,r){const i=e.xhr,a=i&&i[Uy];if(!g6()||!i||i.__sentry_own_request__||!a)return;const s=t(a.url);if(e.endTimestamp&&s){const f=i.__sentry_xhr_span_id__;if(!f)return;const h=r[f];h&&a.status_code!==void 0&&(WQ(h,a.status_code),h.end(),delete r[f]);return}const o=Tp(),l=j1(),u=s?tve({name:`${a.method} ${a.url}`,onlyIfParent:!0,attributes:{type:"xhr","http.method":a.method,url:a.url,[jy]:"auto.http.browser"},op:"http.client"}):void 0;u&&(i.__sentry_xhr_span_id__=u.spanContext().spanId,r[i.__sentry_xhr_span_id__]=u);const c=eo();if(i.setRequestHeader&&n(a.url)&&c){const{traceId:f,spanId:h,sampled:g,dsc:b}={...l.getPropagationContext(),...o.getPropagationContext()},S=u?h6(u):jQ(f,h,g),E=Bye(b||(u?_x(u):m6(f,c,o)));$Tt(i,S,E)}return u}function $Tt(e,t,n){try{e.setRequestHeader("sentry-trace",t),n&&e.setRequestHeader(T9,n)}catch{}}function FTt(e,t=!0,n=!0){if(!ai||!ai.location){ia&&Pt.warn("Could not initialize routing instrumentation due to invalid location");return}let r=ai.location.href,i;t&&(i=e({name:ai.location.pathname,startTimestamp:Hf?Hf/1e3:void 0,op:"pageload",origin:"auto.pageload.browser",metadata:{source:"url"}})),n&&UQ(({to:a,from:s})=>{if(s===void 0&&r&&r.indexOf(a)!==-1){r=void 0;return}s!==a&&(r=void 0,i&&(ia&&Pt.log(`[Tracing] Finishing current transaction with op: ${i.op}`),i.end()),i=e({name:ai.location.pathname,op:"navigation",origin:"auto.navigation.browser",metadata:{source:"url"}}))})}const BTt="BrowserTracing",UTt={...a_,markBackgroundTransactions:!0,routingInstrumentation:FTt,startTransactionOnLocationChange:!0,startTransactionOnPageLoad:!0,enableLongTask:!0,_experiments:{},...I9};class zTt{constructor(t){this.name=BTt,this._hasSetTracePropagationTargets=!1,pxt(),ia&&(this._hasSetTracePropagationTargets=!!(t&&(t.tracePropagationTargets||t.tracingOrigins))),this.options={...UTt,...t},this.options._experiments.enableLongTask!==void 0&&(this.options.enableLongTask=this.options._experiments.enableLongTask),t&&!t.tracePropagationTargets&&t.tracingOrigins&&(this.options.tracePropagationTargets=t.tracingOrigins),this._collectWebVitals=mTt(),this.options.enableLongTask&&gTt(),this.options._experiments.enableInteractions&&bTt()}setupOnce(t,n){this._getCurrentHub=n;const i=n().getClient(),a=i&&i.getOptions(),{routingInstrumentation:s,startTransactionOnLocationChange:o,startTransactionOnPageLoad:l,markBackgroundTransactions:u,traceFetch:c,traceXHR:f,shouldCreateSpanForRequest:h,enableHTTPTimings:g,_experiments:b}=this.options,S=a&&a.tracePropagationTargets,E=S||this.options.tracePropagationTargets;ia&&this._hasSetTracePropagationTargets&&S&&Pt.warn("[Tracing] The `tracePropagationTargets` option was set in the BrowserTracing integration and top level `Sentry.init`. The top level `Sentry.init` value is being used."),s(w=>{const x=this._createRouteTransaction(w);return this.options._experiments.onStartRouteTransaction&&this.options._experiments.onStartRouteTransaction(x,w,n),x},l,o),u&&Jxt(),b.enableInteractions&&this._registerInteractionListener(),ITt({traceFetch:c,traceXHR:f,tracePropagationTargets:E,shouldCreateSpanForRequest:h,enableHTTPTimings:g})}_createRouteTransaction(t){if(!this._getCurrentHub){ia&&Pt.warn(`[Tracing] Did not create ${t.op} transaction because _getCurrentHub is invalid.`);return}const n=this._getCurrentHub(),{beforeNavigate:r,idleTimeout:i,finalTimeout:a,heartbeatInterval:s}=this.options,o=t.op==="pageload";let l;if(o){const g=o?iie("sentry-trace"):"",b=o?iie("baggage"):void 0,{traceparentData:S,dynamicSamplingContext:E}=Owt(g,b);l={...t,...S,metadata:{...t.metadata,dynamicSamplingContext:S&&!E?{}:E},trimEnd:!0}}else l={...t,trimEnd:!0};const u=typeof r=="function"?r(l):l,c=u===void 0?{...l,sampled:!1}:u;c.metadata=c.name!==l.name?{...c.metadata,source:"custom"}:c.metadata,this._latestRouteName=c.name,this._latestRouteSource=jTt(c),c.sampled===!1&&ia&&Pt.log(`[Tracing] Will not send ${c.op} transaction because of beforeNavigate.`),ia&&Pt.log(`[Tracing] Starting ${c.op} transaction on scope`);const{location:f}=ai,h=Gre(n,c,i,a,!0,{location:f},s,o);return o&&(ai.document.addEventListener("readystatechange",()=>{["interactive","complete"].includes(ai.document.readyState)&&h.sendAutoFinishSignal()}),["interactive","complete"].includes(ai.document.readyState)&&h.sendAutoFinishSignal()),h.registerBeforeFinishCallback(g=>{this._collectWebVitals(),STt(g)}),h}_registerInteractionListener(){let t;const n=()=>{const{idleTimeout:r,finalTimeout:i,heartbeatInterval:a}=this.options,s="ui.action.click",o=iS();if(o&&o.op&&["navigation","pageload"].includes(o.op)){ia&&Pt.warn(`[Tracing] Did not create ${s} transaction because a pageload or navigation transaction is in progress.`);return}if(t&&(t.setFinishReason("interactionInterrupted"),t.end(),t=void 0),!this._getCurrentHub){ia&&Pt.warn(`[Tracing] Did not create ${s} transaction because _getCurrentHub is invalid.`);return}if(!this._latestRouteName){ia&&Pt.warn(`[Tracing] Did not create ${s} transaction because _latestRouteName is missing.`);return}const l=this._getCurrentHub(),{location:u}=ai,c={name:this._latestRouteName,op:s,trimEnd:!0,data:{[yv]:this._latestRouteSource||"url"}};t=Gre(l,c,r,i,!0,{location:u},a)};["click"].forEach(r=>{addEventListener(r,n,{once:!1,capture:!0})})}}function iie(e){const t=C2t(`meta[name=${e}]`);return t?t.getAttribute("content"):void 0}function jTt(e){const t=e.attributes&&e.attributes[yv],n=e.data&&e.data[yv],r=e.metadata&&e.metadata.source;return t||n||r}const ui=si;let D9=0;function vve(){return D9>0}function HTt(){D9++,setTimeout(()=>{D9--})}function mO(e,t={},n){if(typeof e!="function")return e;try{const i=e.__sentry_wrapped__;if(i)return i;if(BQ(e))return e}catch{return e}const r=function(){const i=Array.prototype.slice.call(arguments);try{n&&typeof n=="function"&&n.apply(this,arguments);const a=i.map(s=>mO(s,t));return e.apply(this,a)}catch(a){throw HTt(),Ywt(s=>{s.addEventProcessor(o=>(t.mechanism&&(y9(o,void 0,void 0),Ax(o,t.mechanism)),o.extra={...o.extra,arguments:i},o)),Gwt(a)}),a}};try{for(const i in e)Object.prototype.hasOwnProperty.call(e,i)&&(r[i]=e[i])}catch{}Tye(r,e),Cx(e,"__sentry_wrapped__",r);try{Object.getOwnPropertyDescriptor(r,"name").configurable&&Object.defineProperty(r,"name",{get(){return e.name}})}catch{}return r}const jh=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__;function Ove(e,t){const n=KQ(e,t),r={type:t&&t.name,value:qTt(t)};return n.length&&(r.stacktrace={frames:n}),r.type===void 0&&r.value===""&&(r.value="Unrecoverable error caught"),r}function VTt(e,t,n,r){const i=eo(),a=i&&i.getOptions().normalizeDepth,s={exception:{values:[{type:u6(t)?t.constructor.name:r?"UnhandledRejection":"Error",value:ZTt(t,{isUnhandledRejection:r})}]},extra:{__serialized__:Lye(t,a)}};if(n){const o=KQ(e,n);o.length&&(s.exception.values[0].stacktrace={frames:o})}return s}function S7(e,t){return{exception:{values:[Ove(e,t)]}}}function KQ(e,t){const n=t.stacktrace||t.stack||"",r=QTt(t);try{return e(n,r)}catch{}return[]}const WTt=/Minified React error #\d+;/i;function QTt(e){if(e){if(typeof e.framesToPop=="number")return e.framesToPop;if(WTt.test(e.message))return 1}return 0}function qTt(e){const t=e&&e.message;return t?t.error&&typeof t.error.message=="string"?t.error.message:t:"No error message"}function GTt(e,t,n,r){const i=n&&n.syntheticException||void 0,a=JQ(e,t,i,r);return Ax(a),a.level="error",n&&n.event_id&&(a.event_id=n.event_id),hO(a)}function YTt(e,t,n="info",r,i){const a=r&&r.syntheticException||void 0,s=N9(e,t,a,i);return s.level=n,r&&r.event_id&&(s.event_id=r.event_id),hO(s)}function JQ(e,t,n,r,i){let a;if(MQ(t)&&t.error)return S7(e,t.error);if(wre(t)||b2t(t)){const s=t;if("stack"in t)a=S7(e,t);else{const o=s.name||(wre(s)?"DOMError":"DOMException"),l=s.message?`${o}: ${s.message}`:o;a=N9(e,l,n,r),y9(a,l)}return"code"in s&&(a.tags={...a.tags,"DOMException.code":`${s.code}`}),a}return vye(t)?S7(e,t):fO(t)||u6(t)?(a=VTt(e,t,n,i),Ax(a,{synthetic:!0}),a):(a=N9(e,t,n,r),y9(a,`${t}`,void 0),Ax(a,{synthetic:!0}),a)}function N9(e,t,n,r){const i={};if(r&&n){const a=KQ(e,n);a.length&&(i.exception={values:[{value:t,stacktrace:{frames:a}}]})}if(LQ(t)){const{__sentry_template_string__:a,__sentry_template_values__:s}=t;return i.logentry={message:a,params:s},i}return i.message=t,i}function ZTt(e,{isUnhandledRejection:t}){const n=L2t(e),r=t?"promise rejection":"exception";return MQ(e)?`Event \`ErrorEvent\` captured as ${r} with message \`${e.message}\``:u6(e)?`Event \`${XTt(e)}\` (type=${e.type}) captured as ${r}`:`Object captured as ${r} with keys: ${n}`}function XTt(e){try{const t=Object.getPrototypeOf(e);return t?t.constructor.name:void 0}catch{}}function KTt(e,{metadata:t,tunnel:n,dsn:r}){const i={event_id:e.event_id,sent_at:new Date().toISOString(),...t&&t.sdk&&{sdk:{name:t.sdk.name,version:t.sdk.version}},...!!n&&!!r&&{dsn:ak(r)}},a=JTt(e);return rS(i,[a])}function JTt(e){return[{type:"user_report"},e]}class ekt extends Nxt{constructor(t){const n=ui.SENTRY_SDK_SOURCE||iwt();sve(t,"browser",["browser"],n),super(t),t.sendClientReports&&ui.document&&ui.document.addEventListener("visibilitychange",()=>{ui.document.visibilityState==="hidden"&&this._flushOutcomes()})}eventFromException(t,n){return GTt(this._options.stackParser,t,n,this._options.attachStacktrace)}eventFromMessage(t,n="info",r){return YTt(this._options.stackParser,t,n,r,this._options.attachStacktrace)}captureUserFeedback(t){if(!this._isEnabled()){jh&&Pt.warn("SDK not enabled, will not capture user feedback.");return}const n=KTt(t,{metadata:this.getSdkMetadata(),dsn:this.getDsn(),tunnel:this.getOptions().tunnel});this._sendEnvelope(n)}_prepareEvent(t,n,r){return t.platform=t.platform||"javascript",super._prepareEvent(t,n,r)}_flushOutcomes(){const t=this._clearOutcomes();if(t.length===0){jh&&Pt.log("No outcomes to send");return}if(!this._dsn){jh&&Pt.log("No dsn provided, will not send outcomes");return}jh&&Pt.log("Sending outcomes:",t);const n=Cwt(t,this._options.tunnel&&ak(this._dsn));this._sendEnvelope(n)}}let f2;function tkt(){if(f2)return f2;if(E9(ui.fetch))return f2=ui.fetch.bind(ui);const e=ui.document;let t=ui.fetch;if(e&&typeof e.createElement=="function")try{const n=e.createElement("iframe");n.hidden=!0,e.head.appendChild(n);const r=n.contentWindow;r&&r.fetch&&(t=r.fetch),e.head.removeChild(n)}catch(n){jh&&Pt.warn("Could not create sandbox iframe for pure fetch check, bailing to window.fetch: ",n)}return f2=t.bind(ui)}function nkt(){f2=void 0}function rkt(e,t=tkt()){let n=0,r=0;function i(a){const s=a.body.length;n+=s,r++;const o={body:a.body,method:"POST",referrerPolicy:"origin",headers:e.headers,keepalive:n<=6e4&&r<15,...e.fetchOptions};try{return t(e.url,o).then(l=>(n-=s,r--,{statusCode:l.status,headers:{"x-sentry-rate-limits":l.headers.get("X-Sentry-Rate-Limits"),"retry-after":l.headers.get("Retry-After")}}))}catch(l){return nkt(),n-=s,r--,zQ(l)}}return ave(e,i)}const ikt=4;function akt(e){function t(n){return new hu((r,i)=>{const a=new XMLHttpRequest;a.onerror=i,a.onreadystatechange=()=>{a.readyState===ikt&&r({statusCode:a.status,headers:{"x-sentry-rate-limits":a.getResponseHeader("X-Sentry-Rate-Limits"),"retry-after":a.getResponseHeader("Retry-After")}})},a.open("POST",e.url);for(const s in e.headers)Object.prototype.hasOwnProperty.call(e.headers,s)&&a.setRequestHeader(s,e.headers[s]);a.send(n.body)})}return ave(e,t)}const O6="?",skt=30,okt=40,lkt=50;function eq(e,t,n,r){const i={filename:e,function:t,in_app:!0};return n!==void 0&&(i.lineno=n),r!==void 0&&(i.colno=r),i}const ukt=/^\s*at (?:(.+?\)(?: \[.+\])?|.*?) ?\((?:address at )?)?(?:async )?((?:|[-a-z]+:|.*bundle|\/)?.*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,ckt=/\((\S*)(?::(\d+))(?::(\d+))\)/,dkt=e=>{const t=ukt.exec(e);if(t){if(t[2]&&t[2].indexOf("eval")===0){const a=ckt.exec(t[2]);a&&(t[2]=a[1],t[3]=a[2],t[4]=a[3])}const[r,i]=Sve(t[1]||O6,t[2]);return eq(i,r,t[3]?+t[3]:void 0,t[4]?+t[4]:void 0)}},fkt=[skt,dkt],hkt=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:[-a-z]+)?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js)|\/[\w\-. /=]+)(?::(\d+))?(?::(\d+))?\s*$/i,pkt=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i,mkt=e=>{const t=hkt.exec(e);if(t){if(t[3]&&t[3].indexOf(" > eval")>-1){const a=pkt.exec(t[3]);a&&(t[1]=t[1]||"eval",t[3]=a[1],t[4]=a[2],t[5]="")}let r=t[3],i=t[1]||O6;return[i,r]=Sve(i,r),eq(r,i,t[4]?+t[4]:void 0,t[5]?+t[5]:void 0)}},gkt=[lkt,mkt],bkt=/^\s*at (?:((?:\[object object\])?.+) )?\(?((?:[-a-z]+):.*?):(\d+)(?::(\d+))?\)?\s*$/i,ykt=e=>{const t=bkt.exec(e);return t?eq(t[2],t[1]||O6,+t[3],t[4]?+t[4]:void 0):void 0},vkt=[okt,ykt],Okt=[fkt,gkt,vkt],Skt=Aye(...Okt),Sve=(e,t)=>{const n=e.indexOf("safari-extension")!==-1,r=e.indexOf("safari-web-extension")!==-1;return n||r?[e.indexOf("@")!==-1?e.split("@")[0]:O6,n?`safari-extension:${t}`:`safari-web-extension:${t}`]:[e,t]},r4=1024,Eve="Breadcrumbs",Ekt=(e={})=>{const t={console:!0,dom:!0,fetch:!0,history:!0,sentry:!0,xhr:!0,...e};return{name:Eve,setupOnce(){},setup(n){t.console&&U2t(Tkt(n)),t.dom&&H2t(xkt(n,t.dom)),t.xhr&&Mye(kkt(n)),t.fetch&&Dye(Ckt(n)),t.history&&UQ(Akt(n)),t.sentry&&n.on&&n.on("beforeSendEvent",wkt(n))}}},wve=Ekt;N0(Eve,wve);function wkt(e){return function(n){eo()===e&&E1({category:`sentry.${n.type==="transaction"?"transaction":"event"}`,event_id:n.event_id,level:n.level,message:mm(n)},{event:n})}}function xkt(e,t){return function(r){if(eo()!==e)return;let i,a,s=typeof t=="object"?t.serializeAttribute:void 0,o=typeof t=="object"&&typeof t.maxStringLength=="number"?t.maxStringLength:void 0;o&&o>r4&&(jh&&Pt.warn(`\`dom.maxStringLength\` cannot exceed ${r4}, but a value of ${o} was configured. Sentry will use ${r4} instead.`),o=r4),typeof s=="string"&&(s=[s]);try{const u=r.event,c=_kt(u)?u.target:u;i=kx(c,{keyAttrs:s,maxStringLength:o}),a=wye(c)}catch{i=""}if(i.length===0)return;const l={category:`ui.${r.name}`,message:i};a&&(l.data={"ui.component_name":a}),E1(l,{event:r.event,name:r.name,global:r.global})}}function Tkt(e){return function(n){if(eo()!==e)return;const r={category:"console",data:{arguments:n.args,logger:"console"},level:fwt(n.level),message:xre(n.args," ")};if(n.level==="assert")if(n.args[0]===!1)r.message=`Assertion failed: ${xre(n.args.slice(1)," ")||"console.assert"}`,r.data.arguments=n.args.slice(1);else return;E1(r,{input:n.args,level:n.level})}}function kkt(e){return function(n){if(eo()!==e)return;const{startTimestamp:r,endTimestamp:i}=n,a=n.xhr[Uy];if(!r||!i||!a)return;const{method:s,url:o,status_code:l,body:u}=a,c={method:s,url:o,status_code:l},f={xhr:n.xhr,input:u,startTimestamp:r,endTimestamp:i};E1({category:"xhr",data:c,type:"http"},f)}}function Ckt(e){return function(n){if(eo()!==e)return;const{startTimestamp:r,endTimestamp:i}=n;if(i&&!(n.fetchData.url.match(/sentry_key/)&&n.fetchData.method==="POST"))if(n.error){const a=n.fetchData,s={data:n.error,input:n.args,startTimestamp:r,endTimestamp:i};E1({category:"fetch",data:a,level:"error",type:"http"},s)}else{const a=n.response,s={...n.fetchData,status_code:a&&a.status},o={input:n.args,response:a,startTimestamp:r,endTimestamp:i};E1({category:"fetch",data:s,type:"http"},o)}}}function Akt(e){return function(n){if(eo()!==e)return;let r=n.from,i=n.to;const a=i_(ui.location.href);let s=r?i_(r):void 0;const o=i_(i);(!s||!s.path)&&(s=a),a.protocol===o.protocol&&a.host===o.host&&(i=o.relative),a.protocol===s.protocol&&a.host===s.host&&(r=s.relative),E1({category:"navigation",data:{from:r,to:i}})}}function _kt(e){return!!e&&!!e.target}const xve="Dedupe",Rkt=()=>{let e;return{name:xve,setupOnce(){},processEvent(t){if(t.type)return t;try{if(Ikt(t,e))return jh&&Pt.warn("Event dropped due to being a duplicate of previously captured event."),null}catch{}return e=t}}},Tve=Rkt;N0(xve,Tve);function Ikt(e,t){return t?!!(Dkt(e,t)||Nkt(e,t)):!1}function Dkt(e,t){const n=e.message,r=t.message;return!(!n&&!r||n&&!r||!n&&r||n!==r||!Cve(e,t)||!kve(e,t))}function Nkt(e,t){const n=aie(t),r=aie(e);return!(!n||!r||n.type!==r.type||n.value!==r.value||!Cve(e,t)||!kve(e,t))}function kve(e,t){let n=sie(e),r=sie(t);if(!n&&!r)return!0;if(n&&!r||!n&&r||(n=n,r=r,r.length!==n.length))return!1;for(let i=0;i{const t={onerror:!0,onunhandledrejection:!0,...e};return{name:Ave,setupOnce(){Error.stackTraceLimit=50},setup(n){t.onerror&&(Mkt(n),oie("onerror")),t.onunhandledrejection&&(Lkt(n),oie("onunhandledrejection"))}}},_ve=Pkt;N0(Ave,_ve);function Mkt(e){Nye(t=>{const{stackParser:n,attachStacktrace:r}=Ive();if(eo()!==e||vve())return;const{msg:i,url:a,line:s,column:o,error:l}=t,u=l===void 0&&Uf(i)?Bkt(i,a,s,o):Rve(JQ(n,l||i,void 0,r,!1),a,s,o);u.level="error",Wye(u,{originalException:l,mechanism:{handled:!1,type:"onerror"}})})}function Lkt(e){Pye(t=>{const{stackParser:n,attachStacktrace:r}=Ive();if(eo()!==e||vve())return;const i=$kt(t),a=$Q(i)?Fkt(i):JQ(n,i,void 0,r,!0);a.level="error",Wye(a,{originalException:i,mechanism:{handled:!1,type:"onunhandledrejection"}})})}function $kt(e){if($Q(e))return e;const t=e;try{if("reason"in t)return t.reason;if("detail"in t&&"reason"in t.detail)return t.detail.reason}catch{}return e}function Fkt(e){return{exception:{values:[{type:"UnhandledRejection",value:`Non-Error promise rejection captured with value: ${String(e)}`}]}}}function Bkt(e,t,n,r){const i=/^(?:[Uu]ncaught (?:exception: )?)?(?:((?:Eval|Internal|Range|Reference|Syntax|Type|URI|)Error): )?(.*)$/i;let a=MQ(e)?e.message:e,s="Error";const o=a.match(i);return o&&(s=o[1],a=o[2]),Rve({exception:{values:[{type:s,value:a}]}},t,n,r)}function Rve(e,t,n,r){const i=e.exception=e.exception||{},a=i.values=i.values||[],s=a[0]=a[0]||{},o=s.stacktrace=s.stacktrace||{},l=o.frames=o.frames||[],u=isNaN(parseInt(r,10))?void 0:r,c=isNaN(parseInt(n,10))?void 0:n,f=Uf(t)&&t.length>0?t:k2t();return l.length===0&&l.push({colno:u,filename:f,function:"?",in_app:!0,lineno:c}),e}function oie(e){jh&&Pt.log(`Global Handler attached: ${e}`)}function Ive(){const e=eo();return e&&e.getOptions()||{stackParser:()=>[],attachStacktrace:!1}}const Dve="HttpContext",Ukt=()=>({name:Dve,setupOnce(){},preprocessEvent(e){if(!ui.navigator&&!ui.location&&!ui.document)return;const t=e.request&&e.request.url||ui.location&&ui.location.href,{referrer:n}=ui.document||{},{userAgent:r}=ui.navigator||{},i={...e.request&&e.request.headers,...n&&{Referer:n},...r&&{"User-Agent":r}},a={...e.request,...t&&{url:t},headers:i};e.request=a}}),Nve=Ukt;N0(Dve,Nve);const zkt="cause",jkt=5,Pve="LinkedErrors",Hkt=(e={})=>{const t=e.limit||jkt,n=e.key||zkt;return{name:Pve,setupOnce(){},preprocessEvent(r,i,a){const s=a.getOptions();E2t(Ove,s.stackParser,s.maxValueLength,n,t,r,i)}}},Mve=Hkt;N0(Pve,Mve);const Vkt=["EventTarget","Window","Node","ApplicationCache","AudioTrackList","BroadcastChannel","ChannelMergerNode","CryptoOperation","EventSource","FileReader","HTMLUnknownElement","IDBDatabase","IDBRequest","IDBTransaction","KeyOperation","MediaController","MessagePort","ModalWindow","Notification","SVGElementInstance","Screen","SharedWorker","TextTrack","TextTrackCue","TextTrackList","WebSocket","WebSocketWorker","Worker","XMLHttpRequest","XMLHttpRequestEventTarget","XMLHttpRequestUpload"],Lve="TryCatch",Wkt=(e={})=>{const t={XMLHttpRequest:!0,eventTarget:!0,requestAnimationFrame:!0,setInterval:!0,setTimeout:!0,...e};return{name:Lve,setupOnce(){t.setTimeout&&qs(ui,"setTimeout",lie),t.setInterval&&qs(ui,"setInterval",lie),t.requestAnimationFrame&&qs(ui,"requestAnimationFrame",Qkt),t.XMLHttpRequest&&"XMLHttpRequest"in ui&&qs(XMLHttpRequest.prototype,"send",qkt);const n=t.eventTarget;n&&(Array.isArray(n)?n:Vkt).forEach(Gkt)}}},$ve=Wkt;N0(Lve,$ve);function lie(e){return function(...t){const n=t[0];return t[0]=mO(n,{mechanism:{data:{function:pp(e)},handled:!1,type:"instrument"}}),e.apply(this,t)}}function Qkt(e){return function(t){return e.apply(this,[mO(t,{mechanism:{data:{function:"requestAnimationFrame",handler:pp(e)},handled:!1,type:"instrument"}})])}}function qkt(e){return function(...t){const n=this;return["onload","onerror","onprogress","onreadystatechange"].forEach(i=>{i in n&&typeof n[i]=="function"&&qs(n,i,function(a){const s={mechanism:{data:{function:i,handler:pp(a)},handled:!1,type:"instrument"}},o=BQ(a);return o&&(s.mechanism.data.handler=pp(o)),mO(a,s)})}),e.apply(this,t)}}function Gkt(e){const t=ui,n=t[e]&&t[e].prototype;!n||!n.hasOwnProperty||!n.hasOwnProperty("addEventListener")||(qs(n,"addEventListener",function(r){return function(i,a,s){try{typeof a.handleEvent=="function"&&(a.handleEvent=mO(a.handleEvent,{mechanism:{data:{function:"handleEvent",handler:pp(a),target:e},handled:!1,type:"instrument"}}))}catch{}return r.apply(this,[i,mO(a,{mechanism:{data:{function:"addEventListener",handler:pp(a),target:e},handled:!1,type:"instrument"}}),s])}}),qs(n,"removeEventListener",function(r){return function(i,a,s){const o=a;try{const l=o&&o.__sentry_wrapped__;l&&r.call(this,i,l,s)}catch{}return r.call(this,i,o,s)}}))}const Ykt=[lve(),cve(),$ve(),wve(),_ve(),Mve(),Tve(),Nve()];function Zkt(e){return[...Ykt]}function Xkt(e={}){e.defaultIntegrations===void 0&&(e.defaultIntegrations=Zkt()),e.release===void 0&&(typeof __SENTRY_RELEASE__=="string"&&(e.release=__SENTRY_RELEASE__),ui.SENTRY_RELEASE&&ui.SENTRY_RELEASE.id&&(e.release=ui.SENTRY_RELEASE.id)),e.autoSessionTracking===void 0&&(e.autoSessionTracking=!0),e.sendClientReports===void 0&&(e.sendClientReports=!0);const t={...e,stackParser:F2t(e.stackParser||Skt),integrations:Cxt(e),transport:e.transport||(Iye()?rkt:akt)};Lxt(ekt,t),e.autoSessionTracking&&Kkt()}function Kkt(){if(typeof ui.document>"u"){jh&&Pt.warn("Session tracking in non-browser environment with @sentry/browser is not supported.");return}zre({ignoreDuration:!0}),jre(),UQ(({from:e,to:t})=>{e!==void 0&&e!==t&&(zre({ignoreDuration:!0}),jre())})}function Jkt(e){const t={...e};sve(t,"react"),Xkt(t)}const eCt={"routing.instrumentation":"react-router-v6"};function tCt(e,t,n,r,i,a){return(s,o=!0,l=!0)=>{const u=ui&&ui.location&&ui.location.pathname;o&&u&&s({name:u,op:"pageload",origin:"auto.pageload.react.reactrouterv6",tags:eCt,metadata:{source:"url"}})}}Jkt({dsn:"https://d287d6df8c6f423189266360055e6ca7@o553194.ingest.sentry.io/5680102",release:"codepair@0.0.0",integrations:[new zTt({routingInstrumentation:tCt()})],tracesSampleRate:1});const nCt=Y9e(d2t);Sr.defaults.baseURL="https://codepair-api.yorkie.dev";function rCt(){const e=pi(PF),t=TO("(prefers-color-scheme: dark)"),n=N.useMemo(()=>{const a=t?"dark":"light";return Y$({typography:{button:{textTransform:"none"}},palette:{mode:e.theme=="default"?a:e.theme}})},[e.theme,t]),r=g2t(),i=N.useMemo(()=>new WBe({queryCache:new Nue({onError:r}),defaultOptions:{mutations:{onError:r}}}),[r]);return I.jsx(ZBe,{client:i,children:I.jsx(m2t,{children:I.jsxs(I4e,{theme:n,children:[I.jsx(E6e,{}),I.jsx(Ts,{minHeight:"100vh",children:I.jsx(i$e,{router:nCt})})]})})})}var tq={},nq={};nq.__esModule=!0;nq.default=sCt;function o_(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?o_=function(n){return typeof n}:o_=function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},o_(e)}function E7(){}var iCt={getItem:E7,setItem:E7,removeItem:E7};function aCt(e){if((typeof self>"u"?"undefined":o_(self))!=="object"||!(e in self))return!1;try{var t=self[e],n="redux-persist ".concat(e," test");t.setItem(n,"test"),t.getItem(n),t.removeItem(n)}catch{return!1}return!0}function sCt(e){var t="".concat(e,"Storage");return aCt(t)?self[t]:iCt}tq.__esModule=!0;tq.default=uCt;var oCt=lCt(nq);function lCt(e){return e&&e.__esModule?e:{default:e}}function uCt(e){var t=(0,oCt.default)(e);return{getItem:function(r){return new Promise(function(i,a){i(t.getItem(r))})},setItem:function(r,i){return new Promise(function(a,s){a(t.setItem(r,i))})},removeItem:function(r){return new Promise(function(i,a){i(t.removeItem(r))})}}}var Fve=void 0,cCt=dCt(tq);function dCt(e){return e&&e.__esModule?e:{default:e}}var fCt=(0,cCt.default)("local");Fve=fCt;var rq="persist:",Bve="persist/FLUSH",iq="persist/REHYDRATE",Uve="persist/PAUSE",zve="persist/PERSIST",jve="persist/PURGE",Hve="persist/REGISTER",hCt=-1;function l_(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?l_=function(n){return typeof n}:l_=function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},l_(e)}function uie(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function pCt(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function TCt(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,a;for(a=0;a=0)&&(n[i]=e[i]);return n}var kCt=5e3;function CCt(e,t){var n=e.version!==void 0?e.version:hCt;e.debug;var r=e.stateReconciler===void 0?gCt:e.stateReconciler,i=e.getStoredState||vCt,a=e.timeout!==void 0?e.timeout:kCt,s=null,o=!1,l=!0,u=function(f){return f._persist.rehydrated&&s&&!l&&s.update(f),f};return function(c,f){var h=c||{},g=h._persist,b=xCt(h,["_persist"]),S=b;if(f.type===zve){var E=!1,w=function(B,L){E||(f.rehydrate(e.key,B,L),E=!0)};if(a&&setTimeout(function(){!E&&w(void 0,new Error('redux-persist: persist timed out for persist key "'.concat(e.key,'"')))},a),l=!1,s||(s=bCt(e)),g)return Ch({},t(S,f),{_persist:g});if(typeof f.rehydrate!="function"||typeof f.register!="function")throw new Error("redux-persist: either rehydrate or register is not a function on the PERSIST action. This can happen if the action is being replayed. This is an unexplored use case, please open an issue and we will figure out a resolution.");return f.register(e.key),i(e).then(function(D){var B=e.migrate||function(L,F){return Promise.resolve(L)};B(D,n).then(function(L){w(L)},function(L){w(void 0,L)})},function(D){w(void 0,D)}),Ch({},t(S,f),{_persist:{version:n,rehydrated:!1}})}else{if(f.type===jve)return o=!0,f.result(SCt(e)),Ch({},t(S,f),{_persist:g});if(f.type===Bve)return f.result(s&&s.flush()),Ch({},t(S,f),{_persist:g});if(f.type===Uve)l=!0;else if(f.type===iq){if(o)return Ch({},S,{_persist:Ch({},g,{rehydrated:!0})});if(f.key===e.key){var x=t(S,f),k=f.payload,C=r!==!1&&k!==void 0?r(k,c,x,e):x,R=Ch({},C,{_persist:Ch({},g,{rehydrated:!0})});return u(R)}}}if(!g)return t(c,f);var A=t(S,f);return A===S?c:u(Ch({},A,{_persist:g}))}}function die(e){return RCt(e)||_Ct(e)||ACt()}function ACt(){throw new TypeError("Invalid attempt to spread non-iterable instance")}function _Ct(e){if(Symbol.iterator in Object(e)||Object.prototype.toString.call(e)==="[object Arguments]")return Array.from(e)}function RCt(e){if(Array.isArray(e)){for(var t=0,n=new Array(e.length);t0&&arguments[0]!==void 0?arguments[0]:Vve,n=arguments.length>1?arguments[1]:void 0;switch(n.type){case Hve:return P9({},t,{registry:[].concat(die(t.registry),[n.key])});case iq:var r=t.registry.indexOf(n.key),i=die(t.registry);return i.splice(r,1),P9({},t,{registry:i,bootstrapped:i.length===0});default:return t}};function NCt(e,t,n){var r=n||!1,i=_F(DCt,Vve,t&&t.enhancer?t.enhancer:void 0),a=function(u){i.dispatch({type:Hve,key:u})},s=function(u,c,f){var h={type:iq,payload:c,err:f,key:u};e.dispatch(h),i.dispatch(h),r&&o.getState().bootstrapped&&(r(),r=!1)},o=P9({},i,{purge:function(){var u=[];return e.dispatch({type:jve,result:function(f){u.push(f)}}),Promise.all(u)},flush:function(){var u=[];return e.dispatch({type:Bve,result:function(f){u.push(f)}}),Promise.all(u)},pause:function(){e.dispatch({type:Uve})},persist:function(){e.dispatch({type:zve,register:a,rehydrate:s})}});return t&&t.manualPersist||o.persist(),o}const PCt=Hle({auth:Cft,config:lFe,user:RBe,editor:ABe,workspace:gUe,document:uUe,setting:eXe}),MCt={key:"root",storage:Fve,whitelist:["auth","config"]},LCt=CCt(MCt,PCt),Wve=z$e({reducer:LCt,middleware:e=>e({serializableCheck:{ignoredActions:["persist/PERSIST","editor/setDoc","editor/setClient","editor/setCmView"],ignoredPaths:["editor.doc","editor.client","editor.cmView"]},immutableCheck:{ignoredPaths:["editor.doc","editor.client","editor.cmView"]}})});function u_(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?u_=function(n){return typeof n}:u_=function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},u_(e)}function $Ct(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function hie(e,t){for(var n=0;n"u"&&(window.dataLayer=window.dataLayer||[],window.gtag=function(){window.dataLayer.push(arguments)}),(o=window).gtag.apply(o,a)}},n=t;e.default=n})(Yve);var Zve={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=s;var t=/^(a|an|and|as|at|but|by|en|for|if|in|nor|of|on|or|per|the|to|vs?\.?|via)$/i;function n(o){return o.toString().trim().replace(/[A-Za-z0-9\u00C0-\u00FF]+[^\s-]*/g,function(l,u,c){return u>0&&u+l.length!==c.length&&l.search(t)>-1&&c.charAt(u-2)!==":"&&(c.charAt(u+l.length)!=="-"||c.charAt(u-1)==="-")&&c.charAt(u-1).search(/[^\s-]/)<0?l.toLowerCase():l.substr(1).search(/[A-Z]|\../)>-1?l:l.charAt(0).toUpperCase()+l.substr(1)})}function r(o){return typeof o=="string"&&o.indexOf("@")!==-1}var i="REDACTED (Potential Email Address)";function a(o){return r(o)?(console.warn("This arg looks like an email address, redacting."),i):o}function s(){var o=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"",l=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0,u=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,c=o||"";return l&&(c=n(o)),u&&(c=a(c)),c}})(Zve);(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=e.GA4=void 0;var t=s(Yve),n=s(Zve),r=["eventCategory","eventAction","eventLabel","eventValue","hitType"],i=["title","location"],a=["page","hitType"];function s(Q){return Q&&Q.__esModule?Q:{default:Q}}function o(Q,H){if(Q==null)return{};var J=l(Q,H),K,X;if(Object.getOwnPropertySymbols){var te=Object.getOwnPropertySymbols(Q);for(X=0;X=0)&&Object.prototype.propertyIsEnumerable.call(Q,K)&&(J[K]=Q[K])}return J}function l(Q,H){if(Q==null)return{};var J={},K=Object.keys(Q),X,te;for(te=0;te=0)&&(J[X]=Q[X]);return J}function u(Q){"@babel/helpers - typeof";return u=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(H){return typeof H}:function(H){return H&&typeof Symbol=="function"&&H.constructor===Symbol&&H!==Symbol.prototype?"symbol":typeof H},u(Q)}function c(Q){return g(Q)||h(Q)||x(Q)||f()}function f(){throw new TypeError(`Invalid attempt to spread non-iterable instance. +Error:`,i)}}function lTt(){return eTt(e=>{v6("cls",{metric:e}),hve=e})}function uTt(){return rTt(e=>{v6("fid",{metric:e}),pve=e})}function cTt(){return iTt(e=>{v6("lcp",{metric:e}),mve=e})}function XQ(e,t,n,r,i=!1){gve(e,t);let a;return y5[e]||(a=n(),y5[e]=!0),r&&t({metric:r}),bve(e,t,i?a:void 0)}function dTt(e){const t={};e==="event"&&(t.durationThreshold=0),b6(e,n=>{v6(e,{entries:n})},t)}function gve(e,t){iw[e]=iw[e]||[],iw[e].push(t)}function bve(e,t,n){return()=>{n&&n();const r=iw[e];if(!r)return;const i=r.indexOf(t);i!==-1&&r.splice(i,1)}}function v7(e){return typeof e=="number"&&isFinite(e)}function pO(e,{startTimestamp:t,...n}){return t&&e.startTimestamp>t&&(e.startTimestamp=t),e.startChild({startTimestamp:t,...n})}const fTt=2147483647;function ns(e){return e/1e3}function yve(){return ai&&ai.addEventListener&&ai.performance}let nie=0,Ra={},of,aw;function hTt(){const e=yve();if(e&&Hf){e.mark&&ai.performance.mark("sentry-tracing-init");const t=yTt(),n=gTt(),r=bTt();return()=>{t(),n(),r()}}return()=>{}}function pTt(){ZQ("longtask",({entries:e})=>{for(const t of e){const n=iS();if(!n)return;const r=ns(Hf+t.startTime),i=ns(t.duration);n.startChild({description:"Main UI thread blocked",op:"ui.long-task",origin:"auto.ui.browser.metrics",startTimestamp:r,endTimestamp:r+i})}})}function mTt(){ZQ("event",({entries:e})=>{for(const t of e){const n=iS();if(!n)return;if(t.name==="click"){const r=ns(Hf+t.startTime),i=ns(t.duration),a={description:kx(t.target),op:`ui.interaction.${t.name}`,origin:"auto.ui.browser.metrics",startTimestamp:r,endTimestamp:r+i},s=wye(t.target);s&&(a.attributes={"ui.component_name":s}),n.startChild(a)}}})}function gTt(){return aTt(({metric:e})=>{const t=e.entries[e.entries.length-1];t&&(ia&&Pt.log("[Measurements] Adding CLS"),Ra.cls={value:e.value,unit:""},aw=t)},!0)}function bTt(){return sTt(({metric:e})=>{const t=e.entries[e.entries.length-1];t&&(ia&&Pt.log("[Measurements] Adding LCP"),Ra.lcp={value:e.value,unit:"millisecond"},of=t)},!0)}function yTt(){return oTt(({metric:e})=>{const t=e.entries[e.entries.length-1];if(!t)return;const n=ns(Hf),r=ns(t.startTime);ia&&Pt.log("[Measurements] Adding FID"),Ra.fid={value:e.value,unit:"millisecond"},Ra["mark.fid"]={value:n+r,unit:"second"}})}function vTt(e){const t=yve();if(!t||!ai.performance.getEntries||!Hf)return;ia&&Pt.log("[Tracing] Adding & adjusting spans using Performance API");const n=ns(Hf),r=t.getEntries();let i,a;const{op:s,start_timestamp:o}=Zo(e);if(r.slice(nie).forEach(l=>{const u=ns(l.startTime),c=ns(l.duration);if(!(e.op==="navigation"&&o&&n+u{if(!Ra[u]||!o||n>=o)return;const c=Ra[u].value,f=n+ns(c),h=Math.abs((f-o)*1e3),g=h-c;ia&&Pt.log(`[Measurements] Normalized ${u} from ${c} to ${h} (${g})`),Ra[u].value=h});const l=Ra["mark.fid"];l&&Ra.fid&&(pO(e,{description:"first input delay",endTimestamp:l.value+ns(Ra.fid.value),op:"ui.action",origin:"auto.ui.browser.metrics",startTimestamp:l.value}),delete Ra["mark.fid"]),"fcp"in Ra||delete Ra.cls,Object.keys(Ra).forEach(u=>{mxt(u,Ra[u].value,Ra[u].unit)}),TTt(e)}of=void 0,aw=void 0,Ra={}}function OTt(e,t,n,r,i){const a=i+n,s=a+r;return pO(e,{description:t.name,endTimestamp:s,op:t.entryType,origin:"auto.resource.browser.metrics",startTimestamp:a}),a}function STt(e,t,n){["unloadEvent","redirect","domContentLoadedEvent","loadEvent","connect"].forEach(r=>{n4(e,t,r,n)}),n4(e,t,"secureConnection",n,"TLS/SSL","connectEnd"),n4(e,t,"fetch",n,"cache","domainLookupStart"),n4(e,t,"domainLookup",n,"DNS"),ETt(e,t,n)}function n4(e,t,n,r,i,a){const s=a?t[a]:t[`${n}End`],o=t[`${n}Start`];!o||!s||pO(e,{op:"browser",origin:"auto.browser.browser.metrics",description:i||n,startTimestamp:r+ns(o),endTimestamp:r+ns(s)})}function ETt(e,t,n){t.responseEnd&&(pO(e,{op:"browser",origin:"auto.browser.browser.metrics",description:"request",startTimestamp:n+ns(t.requestStart),endTimestamp:n+ns(t.responseEnd)}),pO(e,{op:"browser",origin:"auto.browser.browser.metrics",description:"response",startTimestamp:n+ns(t.responseStart),endTimestamp:n+ns(t.responseEnd)}))}function wTt(e,t,n,r,i,a){if(t.initiatorType==="xmlhttprequest"||t.initiatorType==="fetch")return;const s=i_(n),o={};O7(o,t,"transferSize","http.response_transfer_size"),O7(o,t,"encodedBodySize","http.response_content_length"),O7(o,t,"decodedBodySize","http.decoded_response_content_length"),"renderBlockingStatus"in t&&(o["resource.render_blocking_status"]=t.renderBlockingStatus),s.protocol&&(o["url.scheme"]=s.protocol.split(":").pop()),s.host&&(o["server.address"]=s.host),o["url.same_origin"]=n.includes(ai.location.origin);const l=a+r,u=l+i;pO(e,{description:n.replace(ai.location.origin,""),endTimestamp:u,op:t.initiatorType?`resource.${t.initiatorType}`:"resource.other",origin:"auto.resource.browser.metrics",startTimestamp:l,data:o})}function xTt(e){const t=ai.navigator;if(!t)return;const n=t.connection;n&&(n.effectiveType&&e.setTag("effectiveConnectionType",n.effectiveType),n.type&&e.setTag("connectionType",n.type),v7(n.rtt)&&(Ra["connection.rtt"]={value:n.rtt,unit:"millisecond"})),v7(t.deviceMemory)&&e.setTag("deviceMemory",`${t.deviceMemory} GB`),v7(t.hardwareConcurrency)&&e.setTag("hardwareConcurrency",String(t.hardwareConcurrency))}function TTt(e){of&&(ia&&Pt.log("[Measurements] Adding LCP Data"),of.element&&e.setTag("lcp.element",kx(of.element)),of.id&&e.setTag("lcp.id",of.id),of.url&&e.setTag("lcp.url",of.url.trim().slice(0,200)),e.setTag("lcp.size",of.size)),aw&&aw.sources&&(ia&&Pt.log("[Measurements] Adding CLS Data"),aw.sources.forEach((t,n)=>e.setTag(`cls.source.${n+1}`,kx(t.node))))}function O7(e,t,n,r){const i=t[n];i!=null&&i0&&h.setAttribute("http.response_content_length",b)}}else e.error&&h.setStatus("internal_error");h.end(),delete r[f]}return}const s=Tp(),o=eo(),{method:l,url:u}=e.fetchData,c=a?tve({name:`${l} ${u}`,onlyIfParent:!0,attributes:{url:u,type:"fetch","http.method":l,[jy]:i},op:"http.client"}):void 0;if(c&&(e.fetchData.__span=c.spanContext().spanId,r[c.spanContext().spanId]=c),n(e.fetchData.url)&&o){const f=e.args[0];e.args[1]=e.args[1]||{};const h=e.args[1];h.headers=ATt(f,o,s,h,c)}return c}function ATt(e,t,n,r,i){const a=i||n.getSpan(),s=j1(),{traceId:o,spanId:l,sampled:u,dsc:c}={...s.getPropagationContext(),...n.getPropagationContext()},f=a?h6(a):jQ(o,l,u),h=Bye(c||(a?_x(a):m6(o,t,n))),g=r.headers||(typeof Request<"u"&&hp(e,Request)?e.headers:void 0);if(g)if(typeof Headers<"u"&&hp(g,Headers)){const b=new Headers(g);return b.append("sentry-trace",f),h&&b.append(T9,h),b}else if(Array.isArray(g)){const b=[...g,["sentry-trace",f]];return h&&b.push([T9,h]),b}else{const b="baggage"in g?g.baggage:void 0,S=[];return Array.isArray(b)?S.push(...b):b&&S.push(b),h&&S.push(h),{...g,"sentry-trace":f,baggage:S.length>0?S.join(","):void 0}}else return{"sentry-trace":f,baggage:h}}const R9=["localhost",/^\/(?!\/)/],I9={traceFetch:!0,traceXHR:!0,enableHTTPTimings:!0,tracingOrigins:R9,tracePropagationTargets:R9};function _Tt(e){const{traceFetch:t,traceXHR:n,tracePropagationTargets:r,tracingOrigins:i,shouldCreateSpanForRequest:a,enableHTTPTimings:s}={traceFetch:I9.traceFetch,traceXHR:I9.traceXHR,...e},o=typeof a=="function"?a:c=>!0,l=c=>NTt(c,r||i),u={};t&&Dye(c=>{const f=CTt(c,o,l,u);s&&f&&rie(f)}),n&&Mye(c=>{const f=PTt(c,o,l,u);s&&f&&rie(f)})}function RTt(e){return e.entryType==="resource"&&"initiatorType"in e&&typeof e.nextHopProtocol=="string"&&(e.initiatorType==="fetch"||e.initiatorType==="xmlhttprequest")}function rie(e){const{url:t}=Zo(e).data||{};if(!t||typeof t!="string")return;const n=ZQ("resource",({entries:r})=>{r.forEach(i=>{RTt(i)&&i.name.endsWith(t)&&(DTt(i).forEach(s=>e.setAttribute(...s)),setTimeout(n))})})}function ITt(e){let t="unknown",n="unknown",r="";for(const i of e){if(i==="/"){[t,n]=e.split("/");break}if(!isNaN(Number(i))){t=r==="h"?"http":r,n=e.split(r)[1];break}r+=i}return r===e&&(t=r),{name:t,version:n}}function tf(e=0){return((Hf||performance.timeOrigin)+e)/1e3}function DTt(e){const{name:t,version:n}=ITt(e.nextHopProtocol),r=[];return r.push(["network.protocol.version",n],["network.protocol.name",t]),Hf?[...r,["http.request.redirect_start",tf(e.redirectStart)],["http.request.fetch_start",tf(e.fetchStart)],["http.request.domain_lookup_start",tf(e.domainLookupStart)],["http.request.domain_lookup_end",tf(e.domainLookupEnd)],["http.request.connect_start",tf(e.connectStart)],["http.request.secure_connection_start",tf(e.secureConnectionStart)],["http.request.connection_end",tf(e.connectEnd)],["http.request.request_start",tf(e.requestStart)],["http.request.response_start",tf(e.responseStart)],["http.request.response_end",tf(e.responseEnd)]]:r}function NTt(e,t){return ik(e,t||R9)}function PTt(e,t,n,r){const i=e.xhr,a=i&&i[Uy];if(!g6()||!i||i.__sentry_own_request__||!a)return;const s=t(a.url);if(e.endTimestamp&&s){const f=i.__sentry_xhr_span_id__;if(!f)return;const h=r[f];h&&a.status_code!==void 0&&(WQ(h,a.status_code),h.end(),delete r[f]);return}const o=Tp(),l=j1(),u=s?tve({name:`${a.method} ${a.url}`,onlyIfParent:!0,attributes:{type:"xhr","http.method":a.method,url:a.url,[jy]:"auto.http.browser"},op:"http.client"}):void 0;u&&(i.__sentry_xhr_span_id__=u.spanContext().spanId,r[i.__sentry_xhr_span_id__]=u);const c=eo();if(i.setRequestHeader&&n(a.url)&&c){const{traceId:f,spanId:h,sampled:g,dsc:b}={...l.getPropagationContext(),...o.getPropagationContext()},S=u?h6(u):jQ(f,h,g),E=Bye(b||(u?_x(u):m6(f,c,o)));MTt(i,S,E)}return u}function MTt(e,t,n){try{e.setRequestHeader("sentry-trace",t),n&&e.setRequestHeader(T9,n)}catch{}}function LTt(e,t=!0,n=!0){if(!ai||!ai.location){ia&&Pt.warn("Could not initialize routing instrumentation due to invalid location");return}let r=ai.location.href,i;t&&(i=e({name:ai.location.pathname,startTimestamp:Hf?Hf/1e3:void 0,op:"pageload",origin:"auto.pageload.browser",metadata:{source:"url"}})),n&&UQ(({to:a,from:s})=>{if(s===void 0&&r&&r.indexOf(a)!==-1){r=void 0;return}s!==a&&(r=void 0,i&&(ia&&Pt.log(`[Tracing] Finishing current transaction with op: ${i.op}`),i.end()),i=e({name:ai.location.pathname,op:"navigation",origin:"auto.navigation.browser",metadata:{source:"url"}}))})}const $Tt="BrowserTracing",FTt={...a_,markBackgroundTransactions:!0,routingInstrumentation:LTt,startTransactionOnLocationChange:!0,startTransactionOnPageLoad:!0,enableLongTask:!0,_experiments:{},...I9};class BTt{constructor(t){this.name=$Tt,this._hasSetTracePropagationTargets=!1,fxt(),ia&&(this._hasSetTracePropagationTargets=!!(t&&(t.tracePropagationTargets||t.tracingOrigins))),this.options={...FTt,...t},this.options._experiments.enableLongTask!==void 0&&(this.options.enableLongTask=this.options._experiments.enableLongTask),t&&!t.tracePropagationTargets&&t.tracingOrigins&&(this.options.tracePropagationTargets=t.tracingOrigins),this._collectWebVitals=hTt(),this.options.enableLongTask&&pTt(),this.options._experiments.enableInteractions&&mTt()}setupOnce(t,n){this._getCurrentHub=n;const i=n().getClient(),a=i&&i.getOptions(),{routingInstrumentation:s,startTransactionOnLocationChange:o,startTransactionOnPageLoad:l,markBackgroundTransactions:u,traceFetch:c,traceXHR:f,shouldCreateSpanForRequest:h,enableHTTPTimings:g,_experiments:b}=this.options,S=a&&a.tracePropagationTargets,E=S||this.options.tracePropagationTargets;ia&&this._hasSetTracePropagationTargets&&S&&Pt.warn("[Tracing] The `tracePropagationTargets` option was set in the BrowserTracing integration and top level `Sentry.init`. The top level `Sentry.init` value is being used."),s(w=>{const x=this._createRouteTransaction(w);return this.options._experiments.onStartRouteTransaction&&this.options._experiments.onStartRouteTransaction(x,w,n),x},l,o),u&&Xxt(),b.enableInteractions&&this._registerInteractionListener(),_Tt({traceFetch:c,traceXHR:f,tracePropagationTargets:E,shouldCreateSpanForRequest:h,enableHTTPTimings:g})}_createRouteTransaction(t){if(!this._getCurrentHub){ia&&Pt.warn(`[Tracing] Did not create ${t.op} transaction because _getCurrentHub is invalid.`);return}const n=this._getCurrentHub(),{beforeNavigate:r,idleTimeout:i,finalTimeout:a,heartbeatInterval:s}=this.options,o=t.op==="pageload";let l;if(o){const g=o?iie("sentry-trace"):"",b=o?iie("baggage"):void 0,{traceparentData:S,dynamicSamplingContext:E}=ywt(g,b);l={...t,...S,metadata:{...t.metadata,dynamicSamplingContext:S&&!E?{}:E},trimEnd:!0}}else l={...t,trimEnd:!0};const u=typeof r=="function"?r(l):l,c=u===void 0?{...l,sampled:!1}:u;c.metadata=c.name!==l.name?{...c.metadata,source:"custom"}:c.metadata,this._latestRouteName=c.name,this._latestRouteSource=UTt(c),c.sampled===!1&&ia&&Pt.log(`[Tracing] Will not send ${c.op} transaction because of beforeNavigate.`),ia&&Pt.log(`[Tracing] Starting ${c.op} transaction on scope`);const{location:f}=ai,h=Gre(n,c,i,a,!0,{location:f},s,o);return o&&(ai.document.addEventListener("readystatechange",()=>{["interactive","complete"].includes(ai.document.readyState)&&h.sendAutoFinishSignal()}),["interactive","complete"].includes(ai.document.readyState)&&h.sendAutoFinishSignal()),h.registerBeforeFinishCallback(g=>{this._collectWebVitals(),vTt(g)}),h}_registerInteractionListener(){let t;const n=()=>{const{idleTimeout:r,finalTimeout:i,heartbeatInterval:a}=this.options,s="ui.action.click",o=iS();if(o&&o.op&&["navigation","pageload"].includes(o.op)){ia&&Pt.warn(`[Tracing] Did not create ${s} transaction because a pageload or navigation transaction is in progress.`);return}if(t&&(t.setFinishReason("interactionInterrupted"),t.end(),t=void 0),!this._getCurrentHub){ia&&Pt.warn(`[Tracing] Did not create ${s} transaction because _getCurrentHub is invalid.`);return}if(!this._latestRouteName){ia&&Pt.warn(`[Tracing] Did not create ${s} transaction because _latestRouteName is missing.`);return}const l=this._getCurrentHub(),{location:u}=ai,c={name:this._latestRouteName,op:s,trimEnd:!0,data:{[yv]:this._latestRouteSource||"url"}};t=Gre(l,c,r,i,!0,{location:u},a)};["click"].forEach(r=>{addEventListener(r,n,{once:!1,capture:!0})})}}function iie(e){const t=T2t(`meta[name=${e}]`);return t?t.getAttribute("content"):void 0}function UTt(e){const t=e.attributes&&e.attributes[yv],n=e.data&&e.data[yv],r=e.metadata&&e.metadata.source;return t||n||r}const ui=si;let D9=0;function vve(){return D9>0}function zTt(){D9++,setTimeout(()=>{D9--})}function mO(e,t={},n){if(typeof e!="function")return e;try{const i=e.__sentry_wrapped__;if(i)return i;if(BQ(e))return e}catch{return e}const r=function(){const i=Array.prototype.slice.call(arguments);try{n&&typeof n=="function"&&n.apply(this,arguments);const a=i.map(s=>mO(s,t));return e.apply(this,a)}catch(a){throw zTt(),qwt(s=>{s.addEventProcessor(o=>(t.mechanism&&(y9(o,void 0,void 0),Ax(o,t.mechanism)),o.extra={...o.extra,arguments:i},o)),Qwt(a)}),a}};try{for(const i in e)Object.prototype.hasOwnProperty.call(e,i)&&(r[i]=e[i])}catch{}Tye(r,e),Cx(e,"__sentry_wrapped__",r);try{Object.getOwnPropertyDescriptor(r,"name").configurable&&Object.defineProperty(r,"name",{get(){return e.name}})}catch{}return r}const jh=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__;function Ove(e,t){const n=KQ(e,t),r={type:t&&t.name,value:WTt(t)};return n.length&&(r.stacktrace={frames:n}),r.type===void 0&&r.value===""&&(r.value="Unrecoverable error caught"),r}function jTt(e,t,n,r){const i=eo(),a=i&&i.getOptions().normalizeDepth,s={exception:{values:[{type:u6(t)?t.constructor.name:r?"UnhandledRejection":"Error",value:GTt(t,{isUnhandledRejection:r})}]},extra:{__serialized__:Lye(t,a)}};if(n){const o=KQ(e,n);o.length&&(s.exception.values[0].stacktrace={frames:o})}return s}function S7(e,t){return{exception:{values:[Ove(e,t)]}}}function KQ(e,t){const n=t.stacktrace||t.stack||"",r=VTt(t);try{return e(n,r)}catch{}return[]}const HTt=/Minified React error #\d+;/i;function VTt(e){if(e){if(typeof e.framesToPop=="number")return e.framesToPop;if(HTt.test(e.message))return 1}return 0}function WTt(e){const t=e&&e.message;return t?t.error&&typeof t.error.message=="string"?t.error.message:t:"No error message"}function QTt(e,t,n,r){const i=n&&n.syntheticException||void 0,a=JQ(e,t,i,r);return Ax(a),a.level="error",n&&n.event_id&&(a.event_id=n.event_id),hO(a)}function qTt(e,t,n="info",r,i){const a=r&&r.syntheticException||void 0,s=N9(e,t,a,i);return s.level=n,r&&r.event_id&&(s.event_id=r.event_id),hO(s)}function JQ(e,t,n,r,i){let a;if(MQ(t)&&t.error)return S7(e,t.error);if(wre(t)||m2t(t)){const s=t;if("stack"in t)a=S7(e,t);else{const o=s.name||(wre(s)?"DOMError":"DOMException"),l=s.message?`${o}: ${s.message}`:o;a=N9(e,l,n,r),y9(a,l)}return"code"in s&&(a.tags={...a.tags,"DOMException.code":`${s.code}`}),a}return vye(t)?S7(e,t):fO(t)||u6(t)?(a=jTt(e,t,n,i),Ax(a,{synthetic:!0}),a):(a=N9(e,t,n,r),y9(a,`${t}`,void 0),Ax(a,{synthetic:!0}),a)}function N9(e,t,n,r){const i={};if(r&&n){const a=KQ(e,n);a.length&&(i.exception={values:[{value:t,stacktrace:{frames:a}}]})}if(LQ(t)){const{__sentry_template_string__:a,__sentry_template_values__:s}=t;return i.logentry={message:a,params:s},i}return i.message=t,i}function GTt(e,{isUnhandledRejection:t}){const n=P2t(e),r=t?"promise rejection":"exception";return MQ(e)?`Event \`ErrorEvent\` captured as ${r} with message \`${e.message}\``:u6(e)?`Event \`${YTt(e)}\` (type=${e.type}) captured as ${r}`:`Object captured as ${r} with keys: ${n}`}function YTt(e){try{const t=Object.getPrototypeOf(e);return t?t.constructor.name:void 0}catch{}}function ZTt(e,{metadata:t,tunnel:n,dsn:r}){const i={event_id:e.event_id,sent_at:new Date().toISOString(),...t&&t.sdk&&{sdk:{name:t.sdk.name,version:t.sdk.version}},...!!n&&!!r&&{dsn:ak(r)}},a=XTt(e);return rS(i,[a])}function XTt(e){return[{type:"user_report"},e]}class KTt extends Ixt{constructor(t){const n=ui.SENTRY_SDK_SOURCE||nwt();sve(t,"browser",["browser"],n),super(t),t.sendClientReports&&ui.document&&ui.document.addEventListener("visibilitychange",()=>{ui.document.visibilityState==="hidden"&&this._flushOutcomes()})}eventFromException(t,n){return QTt(this._options.stackParser,t,n,this._options.attachStacktrace)}eventFromMessage(t,n="info",r){return qTt(this._options.stackParser,t,n,r,this._options.attachStacktrace)}captureUserFeedback(t){if(!this._isEnabled()){jh&&Pt.warn("SDK not enabled, will not capture user feedback.");return}const n=ZTt(t,{metadata:this.getSdkMetadata(),dsn:this.getDsn(),tunnel:this.getOptions().tunnel});this._sendEnvelope(n)}_prepareEvent(t,n,r){return t.platform=t.platform||"javascript",super._prepareEvent(t,n,r)}_flushOutcomes(){const t=this._clearOutcomes();if(t.length===0){jh&&Pt.log("No outcomes to send");return}if(!this._dsn){jh&&Pt.log("No dsn provided, will not send outcomes");return}jh&&Pt.log("Sending outcomes:",t);const n=Twt(t,this._options.tunnel&&ak(this._dsn));this._sendEnvelope(n)}}let f2;function JTt(){if(f2)return f2;if(E9(ui.fetch))return f2=ui.fetch.bind(ui);const e=ui.document;let t=ui.fetch;if(e&&typeof e.createElement=="function")try{const n=e.createElement("iframe");n.hidden=!0,e.head.appendChild(n);const r=n.contentWindow;r&&r.fetch&&(t=r.fetch),e.head.removeChild(n)}catch(n){jh&&Pt.warn("Could not create sandbox iframe for pure fetch check, bailing to window.fetch: ",n)}return f2=t.bind(ui)}function ekt(){f2=void 0}function tkt(e,t=JTt()){let n=0,r=0;function i(a){const s=a.body.length;n+=s,r++;const o={body:a.body,method:"POST",referrerPolicy:"origin",headers:e.headers,keepalive:n<=6e4&&r<15,...e.fetchOptions};try{return t(e.url,o).then(l=>(n-=s,r--,{statusCode:l.status,headers:{"x-sentry-rate-limits":l.headers.get("X-Sentry-Rate-Limits"),"retry-after":l.headers.get("Retry-After")}}))}catch(l){return ekt(),n-=s,r--,zQ(l)}}return ave(e,i)}const nkt=4;function rkt(e){function t(n){return new hu((r,i)=>{const a=new XMLHttpRequest;a.onerror=i,a.onreadystatechange=()=>{a.readyState===nkt&&r({statusCode:a.status,headers:{"x-sentry-rate-limits":a.getResponseHeader("X-Sentry-Rate-Limits"),"retry-after":a.getResponseHeader("Retry-After")}})},a.open("POST",e.url);for(const s in e.headers)Object.prototype.hasOwnProperty.call(e.headers,s)&&a.setRequestHeader(s,e.headers[s]);a.send(n.body)})}return ave(e,t)}const O6="?",ikt=30,akt=40,skt=50;function eq(e,t,n,r){const i={filename:e,function:t,in_app:!0};return n!==void 0&&(i.lineno=n),r!==void 0&&(i.colno=r),i}const okt=/^\s*at (?:(.+?\)(?: \[.+\])?|.*?) ?\((?:address at )?)?(?:async )?((?:|[-a-z]+:|.*bundle|\/)?.*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,lkt=/\((\S*)(?::(\d+))(?::(\d+))\)/,ukt=e=>{const t=okt.exec(e);if(t){if(t[2]&&t[2].indexOf("eval")===0){const a=lkt.exec(t[2]);a&&(t[2]=a[1],t[3]=a[2],t[4]=a[3])}const[r,i]=Sve(t[1]||O6,t[2]);return eq(i,r,t[3]?+t[3]:void 0,t[4]?+t[4]:void 0)}},ckt=[ikt,ukt],dkt=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:[-a-z]+)?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js)|\/[\w\-. /=]+)(?::(\d+))?(?::(\d+))?\s*$/i,fkt=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i,hkt=e=>{const t=dkt.exec(e);if(t){if(t[3]&&t[3].indexOf(" > eval")>-1){const a=fkt.exec(t[3]);a&&(t[1]=t[1]||"eval",t[3]=a[1],t[4]=a[2],t[5]="")}let r=t[3],i=t[1]||O6;return[i,r]=Sve(i,r),eq(r,i,t[4]?+t[4]:void 0,t[5]?+t[5]:void 0)}},pkt=[skt,hkt],mkt=/^\s*at (?:((?:\[object object\])?.+) )?\(?((?:[-a-z]+):.*?):(\d+)(?::(\d+))?\)?\s*$/i,gkt=e=>{const t=mkt.exec(e);return t?eq(t[2],t[1]||O6,+t[3],t[4]?+t[4]:void 0):void 0},bkt=[akt,gkt],ykt=[ckt,pkt,bkt],vkt=Aye(...ykt),Sve=(e,t)=>{const n=e.indexOf("safari-extension")!==-1,r=e.indexOf("safari-web-extension")!==-1;return n||r?[e.indexOf("@")!==-1?e.split("@")[0]:O6,n?`safari-extension:${t}`:`safari-web-extension:${t}`]:[e,t]},r4=1024,Eve="Breadcrumbs",Okt=(e={})=>{const t={console:!0,dom:!0,fetch:!0,history:!0,sentry:!0,xhr:!0,...e};return{name:Eve,setupOnce(){},setup(n){t.console&&F2t(wkt(n)),t.dom&&z2t(Ekt(n,t.dom)),t.xhr&&Mye(xkt(n)),t.fetch&&Dye(Tkt(n)),t.history&&UQ(kkt(n)),t.sentry&&n.on&&n.on("beforeSendEvent",Skt(n))}}},wve=Okt;N0(Eve,wve);function Skt(e){return function(n){eo()===e&&E1({category:`sentry.${n.type==="transaction"?"transaction":"event"}`,event_id:n.event_id,level:n.level,message:mm(n)},{event:n})}}function Ekt(e,t){return function(r){if(eo()!==e)return;let i,a,s=typeof t=="object"?t.serializeAttribute:void 0,o=typeof t=="object"&&typeof t.maxStringLength=="number"?t.maxStringLength:void 0;o&&o>r4&&(jh&&Pt.warn(`\`dom.maxStringLength\` cannot exceed ${r4}, but a value of ${o} was configured. Sentry will use ${r4} instead.`),o=r4),typeof s=="string"&&(s=[s]);try{const u=r.event,c=Ckt(u)?u.target:u;i=kx(c,{keyAttrs:s,maxStringLength:o}),a=wye(c)}catch{i=""}if(i.length===0)return;const l={category:`ui.${r.name}`,message:i};a&&(l.data={"ui.component_name":a}),E1(l,{event:r.event,name:r.name,global:r.global})}}function wkt(e){return function(n){if(eo()!==e)return;const r={category:"console",data:{arguments:n.args,logger:"console"},level:cwt(n.level),message:xre(n.args," ")};if(n.level==="assert")if(n.args[0]===!1)r.message=`Assertion failed: ${xre(n.args.slice(1)," ")||"console.assert"}`,r.data.arguments=n.args.slice(1);else return;E1(r,{input:n.args,level:n.level})}}function xkt(e){return function(n){if(eo()!==e)return;const{startTimestamp:r,endTimestamp:i}=n,a=n.xhr[Uy];if(!r||!i||!a)return;const{method:s,url:o,status_code:l,body:u}=a,c={method:s,url:o,status_code:l},f={xhr:n.xhr,input:u,startTimestamp:r,endTimestamp:i};E1({category:"xhr",data:c,type:"http"},f)}}function Tkt(e){return function(n){if(eo()!==e)return;const{startTimestamp:r,endTimestamp:i}=n;if(i&&!(n.fetchData.url.match(/sentry_key/)&&n.fetchData.method==="POST"))if(n.error){const a=n.fetchData,s={data:n.error,input:n.args,startTimestamp:r,endTimestamp:i};E1({category:"fetch",data:a,level:"error",type:"http"},s)}else{const a=n.response,s={...n.fetchData,status_code:a&&a.status},o={input:n.args,response:a,startTimestamp:r,endTimestamp:i};E1({category:"fetch",data:s,type:"http"},o)}}}function kkt(e){return function(n){if(eo()!==e)return;let r=n.from,i=n.to;const a=i_(ui.location.href);let s=r?i_(r):void 0;const o=i_(i);(!s||!s.path)&&(s=a),a.protocol===o.protocol&&a.host===o.host&&(i=o.relative),a.protocol===s.protocol&&a.host===s.host&&(r=s.relative),E1({category:"navigation",data:{from:r,to:i}})}}function Ckt(e){return!!e&&!!e.target}const xve="Dedupe",Akt=()=>{let e;return{name:xve,setupOnce(){},processEvent(t){if(t.type)return t;try{if(_kt(t,e))return jh&&Pt.warn("Event dropped due to being a duplicate of previously captured event."),null}catch{}return e=t}}},Tve=Akt;N0(xve,Tve);function _kt(e,t){return t?!!(Rkt(e,t)||Ikt(e,t)):!1}function Rkt(e,t){const n=e.message,r=t.message;return!(!n&&!r||n&&!r||!n&&r||n!==r||!Cve(e,t)||!kve(e,t))}function Ikt(e,t){const n=aie(t),r=aie(e);return!(!n||!r||n.type!==r.type||n.value!==r.value||!Cve(e,t)||!kve(e,t))}function kve(e,t){let n=sie(e),r=sie(t);if(!n&&!r)return!0;if(n&&!r||!n&&r||(n=n,r=r,r.length!==n.length))return!1;for(let i=0;i{const t={onerror:!0,onunhandledrejection:!0,...e};return{name:Ave,setupOnce(){Error.stackTraceLimit=50},setup(n){t.onerror&&(Nkt(n),oie("onerror")),t.onunhandledrejection&&(Pkt(n),oie("onunhandledrejection"))}}},_ve=Dkt;N0(Ave,_ve);function Nkt(e){Nye(t=>{const{stackParser:n,attachStacktrace:r}=Ive();if(eo()!==e||vve())return;const{msg:i,url:a,line:s,column:o,error:l}=t,u=l===void 0&&Uf(i)?$kt(i,a,s,o):Rve(JQ(n,l||i,void 0,r,!1),a,s,o);u.level="error",Wye(u,{originalException:l,mechanism:{handled:!1,type:"onerror"}})})}function Pkt(e){Pye(t=>{const{stackParser:n,attachStacktrace:r}=Ive();if(eo()!==e||vve())return;const i=Mkt(t),a=$Q(i)?Lkt(i):JQ(n,i,void 0,r,!0);a.level="error",Wye(a,{originalException:i,mechanism:{handled:!1,type:"onunhandledrejection"}})})}function Mkt(e){if($Q(e))return e;const t=e;try{if("reason"in t)return t.reason;if("detail"in t&&"reason"in t.detail)return t.detail.reason}catch{}return e}function Lkt(e){return{exception:{values:[{type:"UnhandledRejection",value:`Non-Error promise rejection captured with value: ${String(e)}`}]}}}function $kt(e,t,n,r){const i=/^(?:[Uu]ncaught (?:exception: )?)?(?:((?:Eval|Internal|Range|Reference|Syntax|Type|URI|)Error): )?(.*)$/i;let a=MQ(e)?e.message:e,s="Error";const o=a.match(i);return o&&(s=o[1],a=o[2]),Rve({exception:{values:[{type:s,value:a}]}},t,n,r)}function Rve(e,t,n,r){const i=e.exception=e.exception||{},a=i.values=i.values||[],s=a[0]=a[0]||{},o=s.stacktrace=s.stacktrace||{},l=o.frames=o.frames||[],u=isNaN(parseInt(r,10))?void 0:r,c=isNaN(parseInt(n,10))?void 0:n,f=Uf(t)&&t.length>0?t:x2t();return l.length===0&&l.push({colno:u,filename:f,function:"?",in_app:!0,lineno:c}),e}function oie(e){jh&&Pt.log(`Global Handler attached: ${e}`)}function Ive(){const e=eo();return e&&e.getOptions()||{stackParser:()=>[],attachStacktrace:!1}}const Dve="HttpContext",Fkt=()=>({name:Dve,setupOnce(){},preprocessEvent(e){if(!ui.navigator&&!ui.location&&!ui.document)return;const t=e.request&&e.request.url||ui.location&&ui.location.href,{referrer:n}=ui.document||{},{userAgent:r}=ui.navigator||{},i={...e.request&&e.request.headers,...n&&{Referer:n},...r&&{"User-Agent":r}},a={...e.request,...t&&{url:t},headers:i};e.request=a}}),Nve=Fkt;N0(Dve,Nve);const Bkt="cause",Ukt=5,Pve="LinkedErrors",zkt=(e={})=>{const t=e.limit||Ukt,n=e.key||Bkt;return{name:Pve,setupOnce(){},preprocessEvent(r,i,a){const s=a.getOptions();O2t(Ove,s.stackParser,s.maxValueLength,n,t,r,i)}}},Mve=zkt;N0(Pve,Mve);const jkt=["EventTarget","Window","Node","ApplicationCache","AudioTrackList","BroadcastChannel","ChannelMergerNode","CryptoOperation","EventSource","FileReader","HTMLUnknownElement","IDBDatabase","IDBRequest","IDBTransaction","KeyOperation","MediaController","MessagePort","ModalWindow","Notification","SVGElementInstance","Screen","SharedWorker","TextTrack","TextTrackCue","TextTrackList","WebSocket","WebSocketWorker","Worker","XMLHttpRequest","XMLHttpRequestEventTarget","XMLHttpRequestUpload"],Lve="TryCatch",Hkt=(e={})=>{const t={XMLHttpRequest:!0,eventTarget:!0,requestAnimationFrame:!0,setInterval:!0,setTimeout:!0,...e};return{name:Lve,setupOnce(){t.setTimeout&&qs(ui,"setTimeout",lie),t.setInterval&&qs(ui,"setInterval",lie),t.requestAnimationFrame&&qs(ui,"requestAnimationFrame",Vkt),t.XMLHttpRequest&&"XMLHttpRequest"in ui&&qs(XMLHttpRequest.prototype,"send",Wkt);const n=t.eventTarget;n&&(Array.isArray(n)?n:jkt).forEach(Qkt)}}},$ve=Hkt;N0(Lve,$ve);function lie(e){return function(...t){const n=t[0];return t[0]=mO(n,{mechanism:{data:{function:pp(e)},handled:!1,type:"instrument"}}),e.apply(this,t)}}function Vkt(e){return function(t){return e.apply(this,[mO(t,{mechanism:{data:{function:"requestAnimationFrame",handler:pp(e)},handled:!1,type:"instrument"}})])}}function Wkt(e){return function(...t){const n=this;return["onload","onerror","onprogress","onreadystatechange"].forEach(i=>{i in n&&typeof n[i]=="function"&&qs(n,i,function(a){const s={mechanism:{data:{function:i,handler:pp(a)},handled:!1,type:"instrument"}},o=BQ(a);return o&&(s.mechanism.data.handler=pp(o)),mO(a,s)})}),e.apply(this,t)}}function Qkt(e){const t=ui,n=t[e]&&t[e].prototype;!n||!n.hasOwnProperty||!n.hasOwnProperty("addEventListener")||(qs(n,"addEventListener",function(r){return function(i,a,s){try{typeof a.handleEvent=="function"&&(a.handleEvent=mO(a.handleEvent,{mechanism:{data:{function:"handleEvent",handler:pp(a),target:e},handled:!1,type:"instrument"}}))}catch{}return r.apply(this,[i,mO(a,{mechanism:{data:{function:"addEventListener",handler:pp(a),target:e},handled:!1,type:"instrument"}}),s])}}),qs(n,"removeEventListener",function(r){return function(i,a,s){const o=a;try{const l=o&&o.__sentry_wrapped__;l&&r.call(this,i,l,s)}catch{}return r.call(this,i,o,s)}}))}const qkt=[lve(),cve(),$ve(),wve(),_ve(),Mve(),Tve(),Nve()];function Gkt(e){return[...qkt]}function Ykt(e={}){e.defaultIntegrations===void 0&&(e.defaultIntegrations=Gkt()),e.release===void 0&&(typeof __SENTRY_RELEASE__=="string"&&(e.release=__SENTRY_RELEASE__),ui.SENTRY_RELEASE&&ui.SENTRY_RELEASE.id&&(e.release=ui.SENTRY_RELEASE.id)),e.autoSessionTracking===void 0&&(e.autoSessionTracking=!0),e.sendClientReports===void 0&&(e.sendClientReports=!0);const t={...e,stackParser:L2t(e.stackParser||vkt),integrations:Txt(e),transport:e.transport||(Iye()?tkt:rkt)};Pxt(KTt,t),e.autoSessionTracking&&Zkt()}function Zkt(){if(typeof ui.document>"u"){jh&&Pt.warn("Session tracking in non-browser environment with @sentry/browser is not supported.");return}zre({ignoreDuration:!0}),jre(),UQ(({from:e,to:t})=>{e!==void 0&&e!==t&&(zre({ignoreDuration:!0}),jre())})}function Xkt(e){const t={...e};sve(t,"react"),Ykt(t)}const Kkt={"routing.instrumentation":"react-router-v6"};function Jkt(e,t,n,r,i,a){return(s,o=!0,l=!0)=>{const u=ui&&ui.location&&ui.location.pathname;o&&u&&s({name:u,op:"pageload",origin:"auto.pageload.react.reactrouterv6",tags:Kkt,metadata:{source:"url"}})}}const eCt=()=>["settings"],tCt=()=>{const e=Du(),t=pi(rI),n=RO({queryKey:eCt(),enabled:t.yorkieIntelligence===null&&t.fileUpload===null,queryFn:async()=>(await Sr.get("/settings")).data,staleTime:1e3*60*60*24});return N.useEffect(()=>{if(!n.isSuccess)return;const r=n.data;e(KZe(r.yorkieIntelligence)),e(JZe(r.fileUpload))},[e,n.data,n.isSuccess]),n};Xkt({dsn:"https://d287d6df8c6f423189266360055e6ca7@o553194.ingest.sentry.io/5680102",release:"codepair@0.0.0",integrations:[new BTt({routingInstrumentation:Jkt()})],tracesSampleRate:1});const nCt=Y9e(u2t);Sr.defaults.baseURL="https://codepair-api.yorkie.dev";function rCt(){return tCt(),null}function iCt(){const e=pi(PF),t=TO("(prefers-color-scheme: dark)"),n=N.useMemo(()=>{const a=t?"dark":"light";return Y$({typography:{button:{textTransform:"none"}},palette:{mode:e.theme=="default"?a:e.theme}})},[e.theme,t]),r=p2t(),i=N.useMemo(()=>new WBe({queryCache:new Nue({onError:r}),defaultOptions:{mutations:{onError:r}}}),[r]);return I.jsx(ZBe,{client:i,children:I.jsx(h2t,{children:I.jsxs(I4e,{theme:n,children:[I.jsx(E6e,{}),I.jsx(rCt,{}),I.jsx(Ts,{minHeight:"100vh",children:I.jsx(i$e,{router:nCt})})]})})})}var tq={},nq={};nq.__esModule=!0;nq.default=oCt;function o_(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?o_=function(n){return typeof n}:o_=function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},o_(e)}function E7(){}var aCt={getItem:E7,setItem:E7,removeItem:E7};function sCt(e){if((typeof self>"u"?"undefined":o_(self))!=="object"||!(e in self))return!1;try{var t=self[e],n="redux-persist ".concat(e," test");t.setItem(n,"test"),t.getItem(n),t.removeItem(n)}catch{return!1}return!0}function oCt(e){var t="".concat(e,"Storage");return sCt(t)?self[t]:aCt}tq.__esModule=!0;tq.default=cCt;var lCt=uCt(nq);function uCt(e){return e&&e.__esModule?e:{default:e}}function cCt(e){var t=(0,lCt.default)(e);return{getItem:function(r){return new Promise(function(i,a){i(t.getItem(r))})},setItem:function(r,i){return new Promise(function(a,s){a(t.setItem(r,i))})},removeItem:function(r){return new Promise(function(i,a){i(t.removeItem(r))})}}}var Fve=void 0,dCt=fCt(tq);function fCt(e){return e&&e.__esModule?e:{default:e}}var hCt=(0,dCt.default)("local");Fve=hCt;var rq="persist:",Bve="persist/FLUSH",iq="persist/REHYDRATE",Uve="persist/PAUSE",zve="persist/PERSIST",jve="persist/PURGE",Hve="persist/REGISTER",pCt=-1;function l_(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?l_=function(n){return typeof n}:l_=function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},l_(e)}function uie(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function mCt(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function kCt(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,a;for(a=0;a=0)&&(n[i]=e[i]);return n}var CCt=5e3;function ACt(e,t){var n=e.version!==void 0?e.version:pCt;e.debug;var r=e.stateReconciler===void 0?bCt:e.stateReconciler,i=e.getStoredState||OCt,a=e.timeout!==void 0?e.timeout:CCt,s=null,o=!1,l=!0,u=function(f){return f._persist.rehydrated&&s&&!l&&s.update(f),f};return function(c,f){var h=c||{},g=h._persist,b=TCt(h,["_persist"]),S=b;if(f.type===zve){var E=!1,w=function(B,L){E||(f.rehydrate(e.key,B,L),E=!0)};if(a&&setTimeout(function(){!E&&w(void 0,new Error('redux-persist: persist timed out for persist key "'.concat(e.key,'"')))},a),l=!1,s||(s=yCt(e)),g)return Ch({},t(S,f),{_persist:g});if(typeof f.rehydrate!="function"||typeof f.register!="function")throw new Error("redux-persist: either rehydrate or register is not a function on the PERSIST action. This can happen if the action is being replayed. This is an unexplored use case, please open an issue and we will figure out a resolution.");return f.register(e.key),i(e).then(function(D){var B=e.migrate||function(L,F){return Promise.resolve(L)};B(D,n).then(function(L){w(L)},function(L){w(void 0,L)})},function(D){w(void 0,D)}),Ch({},t(S,f),{_persist:{version:n,rehydrated:!1}})}else{if(f.type===jve)return o=!0,f.result(ECt(e)),Ch({},t(S,f),{_persist:g});if(f.type===Bve)return f.result(s&&s.flush()),Ch({},t(S,f),{_persist:g});if(f.type===Uve)l=!0;else if(f.type===iq){if(o)return Ch({},S,{_persist:Ch({},g,{rehydrated:!0})});if(f.key===e.key){var x=t(S,f),k=f.payload,C=r!==!1&&k!==void 0?r(k,c,x,e):x,R=Ch({},C,{_persist:Ch({},g,{rehydrated:!0})});return u(R)}}}if(!g)return t(c,f);var A=t(S,f);return A===S?c:u(Ch({},A,{_persist:g}))}}function die(e){return ICt(e)||RCt(e)||_Ct()}function _Ct(){throw new TypeError("Invalid attempt to spread non-iterable instance")}function RCt(e){if(Symbol.iterator in Object(e)||Object.prototype.toString.call(e)==="[object Arguments]")return Array.from(e)}function ICt(e){if(Array.isArray(e)){for(var t=0,n=new Array(e.length);t0&&arguments[0]!==void 0?arguments[0]:Vve,n=arguments.length>1?arguments[1]:void 0;switch(n.type){case Hve:return P9({},t,{registry:[].concat(die(t.registry),[n.key])});case iq:var r=t.registry.indexOf(n.key),i=die(t.registry);return i.splice(r,1),P9({},t,{registry:i,bootstrapped:i.length===0});default:return t}};function PCt(e,t,n){var r=n||!1,i=_F(NCt,Vve,t&&t.enhancer?t.enhancer:void 0),a=function(u){i.dispatch({type:Hve,key:u})},s=function(u,c,f){var h={type:iq,payload:c,err:f,key:u};e.dispatch(h),i.dispatch(h),r&&o.getState().bootstrapped&&(r(),r=!1)},o=P9({},i,{purge:function(){var u=[];return e.dispatch({type:jve,result:function(f){u.push(f)}}),Promise.all(u)},flush:function(){var u=[];return e.dispatch({type:Bve,result:function(f){u.push(f)}}),Promise.all(u)},pause:function(){e.dispatch({type:Uve})},persist:function(){e.dispatch({type:zve,register:a,rehydrate:s})}});return t&&t.manualPersist||o.persist(),o}const MCt=Hle({auth:Cft,config:lFe,user:RBe,editor:ABe,workspace:gUe,document:uUe,setting:eXe}),LCt={key:"root",storage:Fve,whitelist:["auth","config"]},$Ct=ACt(LCt,MCt),Wve=z$e({reducer:$Ct,middleware:e=>e({serializableCheck:{ignoredActions:["persist/PERSIST","editor/setDoc","editor/setClient","editor/setCmView"],ignoredPaths:["editor.doc","editor.client","editor.cmView"]},immutableCheck:{ignoredPaths:["editor.doc","editor.client","editor.cmView"]}})});function u_(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?u_=function(n){return typeof n}:u_=function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},u_(e)}function FCt(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function hie(e,t){for(var n=0;n"u"&&(window.dataLayer=window.dataLayer||[],window.gtag=function(){window.dataLayer.push(arguments)}),(o=window).gtag.apply(o,a)}},n=t;e.default=n})(Yve);var Zve={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=s;var t=/^(a|an|and|as|at|but|by|en|for|if|in|nor|of|on|or|per|the|to|vs?\.?|via)$/i;function n(o){return o.toString().trim().replace(/[A-Za-z0-9\u00C0-\u00FF]+[^\s-]*/g,function(l,u,c){return u>0&&u+l.length!==c.length&&l.search(t)>-1&&c.charAt(u-2)!==":"&&(c.charAt(u+l.length)!=="-"||c.charAt(u-1)==="-")&&c.charAt(u-1).search(/[^\s-]/)<0?l.toLowerCase():l.substr(1).search(/[A-Z]|\../)>-1?l:l.charAt(0).toUpperCase()+l.substr(1)})}function r(o){return typeof o=="string"&&o.indexOf("@")!==-1}var i="REDACTED (Potential Email Address)";function a(o){return r(o)?(console.warn("This arg looks like an email address, redacting."),i):o}function s(){var o=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"",l=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0,u=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,c=o||"";return l&&(c=n(o)),u&&(c=a(c)),c}})(Zve);(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=e.GA4=void 0;var t=s(Yve),n=s(Zve),r=["eventCategory","eventAction","eventLabel","eventValue","hitType"],i=["title","location"],a=["page","hitType"];function s(Q){return Q&&Q.__esModule?Q:{default:Q}}function o(Q,H){if(Q==null)return{};var J=l(Q,H),K,X;if(Object.getOwnPropertySymbols){var te=Object.getOwnPropertySymbols(Q);for(X=0;X=0)&&Object.prototype.propertyIsEnumerable.call(Q,K)&&(J[K]=Q[K])}return J}function l(Q,H){if(Q==null)return{};var J={},K=Object.keys(Q),X,te;for(te=0;te=0)&&(J[X]=Q[X]);return J}function u(Q){"@babel/helpers - typeof";return u=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(H){return typeof H}:function(H){return H&&typeof Symbol=="function"&&H.constructor===Symbol&&H!==Symbol.prototype?"symbol":typeof H},u(Q)}function c(Q){return g(Q)||h(Q)||x(Q)||f()}function f(){throw new TypeError(`Invalid attempt to spread non-iterable instance. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function h(Q){if(typeof Symbol<"u"&&Q[Symbol.iterator]!=null||Q["@@iterator"]!=null)return Array.from(Q)}function g(Q){if(Array.isArray(Q))return k(Q)}function b(Q,H){var J=Object.keys(Q);if(Object.getOwnPropertySymbols){var K=Object.getOwnPropertySymbols(Q);H&&(K=K.filter(function(X){return Object.getOwnPropertyDescriptor(Q,X).enumerable})),J.push.apply(J,K)}return J}function S(Q){for(var H=1;HQ.length)&&(H=Q.length);for(var J=0,K=new Array(H);J2&&arguments[2]!==void 0?arguments[2]:"https://www.googletagmanager.com/gtag/js";if(!(typeof window>"u"||typeof document>"u")&&!H._hasLoadedGA){var te=document.createElement("script");te.async=!0,te.src="".concat(X,"?id=").concat(J),K&&te.setAttribute("nonce",K),document.body.appendChild(te),window.dataLayer=window.dataLayer||[],window.gtag=function(){window.dataLayer.push(arguments)},H._hasLoadedGA=!0}}),L(this,"_toGtagOptions",function(J){if(J){var K={cookieUpdate:"cookie_update",cookieExpires:"cookie_expires",cookieDomain:"cookie_domain",cookieFlags:"cookie_flags",userId:"user_id",clientId:"client_id",anonymizeIp:"anonymize_ip",contentGroup1:"content_group1",contentGroup2:"content_group2",contentGroup3:"content_group3",contentGroup4:"content_group4",contentGroup5:"content_group5",allowAdFeatures:"allow_google_signals",allowAdPersonalizationSignals:"allow_ad_personalization_signals",nonInteraction:"non_interaction",page:"page_path",hitCallback:"event_callback"},X=Object.entries(J).reduce(function(te,z){var Te=E(z,2),be=Te[0],ee=Te[1];return K[be]?te[K[be]]=ee:te[be]=ee,te},{});return X}}),L(this,"initialize",function(J){var K=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!J)throw new Error("Require GA_MEASUREMENT_ID");var X=typeof J=="string"?[{trackingId:J}]:J;H._currentMeasurementId=X[0].trackingId;var te=K.gaOptions,z=K.gtagOptions,Te=K.nonce,be=K.testMode,ee=be===void 0?!1:be,ye=K.gtagUrl;if(H._testMode=ee,ee||H._loadGA(H._currentMeasurementId,Te,ye),H.isInitialized||(H._gtag("js",new Date),X.forEach(function(_e){var Ie=S(S(S({},H._toGtagOptions(S(S({},te),_e.gaOptions))),z),_e.gtagOptions);Object.keys(Ie).length?H._gtag("config",_e.trackingId,Ie):H._gtag("config",_e.trackingId)})),H.isInitialized=!0,!ee){var Oe=c(H._queueGtag);for(H._queueGtag=[],H._isQueuing=!1;Oe.length;){var ie=Oe.shift();H._gtag.apply(H,c(ie)),ie[0]==="get"&&(H._isQueuing=!0)}}}),L(this,"set",function(J){if(!J){console.warn("`fieldsObject` is required in .set()");return}if(u(J)!=="object"){console.warn("Expected `fieldsObject` arg to be an Object");return}Object.keys(J).length===0&&console.warn("empty `fieldsObject` given to .set()"),H._gaCommand("set",J)}),L(this,"_gaCommandSendEvent",function(J,K,X,te,z){H._gtag("event",K,S(S({event_category:J,event_label:X,value:te},z&&{non_interaction:z.nonInteraction}),H._toGtagOptions(z)))}),L(this,"_gaCommandSendEventParameters",function(){for(var J=arguments.length,K=new Array(J),X=0;X1?K-1:0),te=1;teQ.length)&&(H=Q.length);for(var J=0,K=new Array(H);J2&&arguments[2]!==void 0?arguments[2]:"https://www.googletagmanager.com/gtag/js";if(!(typeof window>"u"||typeof document>"u")&&!H._hasLoadedGA){var te=document.createElement("script");te.async=!0,te.src="".concat(X,"?id=").concat(J),K&&te.setAttribute("nonce",K),document.body.appendChild(te),window.dataLayer=window.dataLayer||[],window.gtag=function(){window.dataLayer.push(arguments)},H._hasLoadedGA=!0}}),L(this,"_toGtagOptions",function(J){if(J){var K={cookieUpdate:"cookie_update",cookieExpires:"cookie_expires",cookieDomain:"cookie_domain",cookieFlags:"cookie_flags",userId:"user_id",clientId:"client_id",anonymizeIp:"anonymize_ip",contentGroup1:"content_group1",contentGroup2:"content_group2",contentGroup3:"content_group3",contentGroup4:"content_group4",contentGroup5:"content_group5",allowAdFeatures:"allow_google_signals",allowAdPersonalizationSignals:"allow_ad_personalization_signals",nonInteraction:"non_interaction",page:"page_path",hitCallback:"event_callback"},X=Object.entries(J).reduce(function(te,z){var Te=E(z,2),be=Te[0],ee=Te[1];return K[be]?te[K[be]]=ee:te[be]=ee,te},{});return X}}),L(this,"initialize",function(J){var K=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!J)throw new Error("Require GA_MEASUREMENT_ID");var X=typeof J=="string"?[{trackingId:J}]:J;H._currentMeasurementId=X[0].trackingId;var te=K.gaOptions,z=K.gtagOptions,Te=K.nonce,be=K.testMode,ee=be===void 0?!1:be,ye=K.gtagUrl;if(H._testMode=ee,ee||H._loadGA(H._currentMeasurementId,Te,ye),H.isInitialized||(H._gtag("js",new Date),X.forEach(function(_e){var Ie=S(S(S({},H._toGtagOptions(S(S({},te),_e.gaOptions))),z),_e.gtagOptions);Object.keys(Ie).length?H._gtag("config",_e.trackingId,Ie):H._gtag("config",_e.trackingId)})),H.isInitialized=!0,!ee){var Oe=c(H._queueGtag);for(H._queueGtag=[],H._isQueuing=!1;Oe.length;){var ie=Oe.shift();H._gtag.apply(H,c(ie)),ie[0]==="get"&&(H._isQueuing=!0)}}}),L(this,"set",function(J){if(!J){console.warn("`fieldsObject` is required in .set()");return}if(u(J)!=="object"){console.warn("Expected `fieldsObject` arg to be an Object");return}Object.keys(J).length===0&&console.warn("empty `fieldsObject` given to .set()"),H._gaCommand("set",J)}),L(this,"_gaCommandSendEvent",function(J,K,X,te,z){H._gtag("event",K,S(S({event_category:J,event_label:X,value:te},z&&{non_interaction:z.nonInteraction}),H._toGtagOptions(z)))}),L(this,"_gaCommandSendEventParameters",function(){for(var J=arguments.length,K=new Array(J),X=0;X1?K-1:0),te=1;te - +