1(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,846696,t=>{"use strict";var e=t.i(271645),a=t.i(174080);let r=Array(12).fill(0),s=({visible:t,className:a})=>e.default.createElement("div",{className:["sonner-loading-wrapper",a].filter(Boolean).join(" "),"data-visible":t},e.default.createElement("div",{className:"sonner-spinner"},r.map((t,a)=>e.default.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${a}`})))),n=e.default.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},e.default.createElement("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z",clipRule:"evenodd"})),i=e.default.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20"},e.default.createElement("path",{fillRule:"evenodd",d:"M9.401 3.003c1.155-2 4.043-2 5.197 0l7.355 12.748c1.154 2-.29 4.5-2.599 4.5H4.645c-2.309 0-3.752-2.5-2.598-4.5L9.4 3.003zM12 8.25a.75.75 0 01.75.75v3.75a.75.75 0 01-1.5 0V9a.75.75 0 01.75-.75zm0 8.25a.75.75 0 100-1.5.75.75 0 000 1.5z",clipRule:"evenodd"})),o=e.default.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},e.default.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a.75.75 0 000 1.5h.253a.25.25 0 01.244.304l-.459 2.066A1.75 1.75 0 0010.747 15H11a.75.75 0 000-1.5h-.253a.25.25 0 01-.244-.304l.459-2.066A1.75 1.75 0 009.253 9H9z",clipRule:"evenodd"})),l=e.default.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},e.default.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z",clipRule:"evenodd"})),u=e.default.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"},e.default.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),e.default.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"})),c=1,d=new class{constructor(){this.subscribe=t=>(this.subscribers.push(t),()=>{let e=this.subscribers.indexOf(t);this.subscribers.splice(e,1)}),this.publish=t=>{this.subscribers.forEach(e=>e(t))},this.addToast=t=>{this.publish(t),this.toasts=[...this.toasts,t]},this.create=t=>{var e;let{message:a,...r}=t,s="number"==typeof(null==t?void 0:t.id)||(null==(e=t.id)?void 0:e.length)>0?t.id:c++,n=this.toasts.find(t=>t.id===s),i=void 0===t.dismissible||t.dismissible;return this.dismissedToasts.has(s)&&this.dismissedToasts.delete(s),n?this.toasts=this.toasts.map(e=>e.id===s?(this.publish({...e,...t,id:s,title:a}),{...e,...t,id:s,dismissible:i,title:a}):e):this.addToast({title:a,...r,dismissible:i,id:s}),s},this.dismiss=t=>(t?(this.dismissedToasts.add(t),requestAnimationFrame(()=>this.subscribers.forEach(e=>e({id:t,dismiss:!0})))):this.toasts.forEach(t=>{this.subscribers.forEach(e=>e({id:t.id,dismiss:!0}))}),t),this.message=(t,e)=>this.create({...e,message:t}),this.error=(t,e)=>this.create({...e,message:t,type:"error"}),this.success=(t,e)=>this.create({...e,type:"success",message:t}),this.info=(t,e)=>this.create({...e,type:"info",message:t}),this.warning=(t,e)=>this.create({...e,type:"warning",message:t}),this.loading=(t,e)=>this.create({...e,type:"loading",message:t}),this.promise=(t,a)=>{let r,s;if(!a)return;void 0!==a.loading&&(s=this.create({...a,promise:t,type:"loading",message:a.loading,description:"function"!=typeof a.description?a.description:void 0}));let n=Promise.resolve(t instanceof Function?t():t),i=void 0!==s,o=n.then(async t=>{if(r=["resolve",t],e.default.isValidElement(t))i=!1,this.create({id:s,type:"default",message:t});else if(h(t)&&!t.ok){i=!1;let r="function"==typeof a.error?await a.error(`HTTP error! status: ${t.status}`):a.error,n="function"==typeof a.description?await a.description(`HTTP error! status: ${t.status}`):a.description,o="object"!=typeof r||e.default.isValidElement(r)?{message:r}:r;this.create({id:s,type:"error",description:n,...o})}else if(t instanceof Error){i=!1;let r="function"==typeof a.error?await a.error(t):a.error,n="function"==typeof a.description?await a.description(t):a.description,o="object"!=typeof r||e.default.isValidElement(r)?{message:r}:r;this.create({id:s,type:"error",description:n,...o})}else if(void 0!==a.success){i=!1;let r="function"==typeof a.success?await a.success(t):a.success,n="function"==typeof a.description?await a.description(t):a.description,o="object"!=typeof r||e.default.isValidElement(r)?{message:r}:r;this.create({id:s,type:"success",description:n,...o})}}).catch(async t=>{if(r=["reject",t],void 0!==a.error){i=!1;let r="function"==typeof a.error?await a.error(t):a.error,n="function"==typeof a.description?await a.description(t):a.description,o="object"!=typeof r||e.default.isValidElement(r)?{message:r}:r;this.create({id:s,type:"error",description:n,...o})}}).finally(()=>
1{i&&(this.dismiss(s),s=void 0),null==a.finally||a.finally.call(a)}),l=()=>new Promise((t,e)=>o.then(()=>"reject"===r[0]?e(r[1]):t(r[1])).catch(e));return"string"!=typeof s&&"number"!=typeof s?{unwrap:l}:Object.assign(s,{unwrap:l})},this.custom=(t,e)=>{let a=(null==e?void 0:e.id)||c++;return this.create({jsx:t(a),id:a,...e}),a},this.getActiveToasts=()=>this.toasts.filter(t=>!this.dismissedToasts.has(t.id)),this.subscribers=[],this.toasts=[],this.dismissedToasts=new Set}},h=t=>t&&"object"==typeof t&&"ok"in t&&"boolean"==typeof t.ok&&"status"in t&&"number"==typeof t.status,f=Object.assign((t,e)=>{let a=(null==e?void 0:e.id)||c++;return d.addToast({title:t,...e,id:a}),a},{success:d.success,info:d.info,warning:d.warning,error:d.error,custom:d.custom,message:d.message,promise:d.promise,dismiss:d.dismiss,loading:d.loading},{getHistory:()=>d.toasts,getToasts:()=>d.getActiveToasts()});function p(t){return void 0!==t.label}function m(...t){return t.filter(Boolean).join(" ")}!function(t){if(!t||"undefined"==typeof document)return;let e=document.head||document.getElementsByTagName("head")[0],a=document.createElement("style");a.type="text/css",e.appendChild(a),a.styleSheet?a.styleSheet.cssText=t:a.appendChild(document.createTextNode(t))}
vendor: 14,864 bytes, line 1
1("[data-sonner-toaster][dir=ltr],html[dir=ltr]{--toast-icon-margin-start:-3px;--toast-icon-margin-end:4px;--toast-svg-margin-start:-1px;--toast-svg-margin-end:0px;--toast-button-margin-start:auto;--toast-button-margin-end:0;--toast-close-button-start:0;--toast-close-button-end:unset;--toast-close-button-transform:translate(-35%, -35%)}[data-sonner-toaster][dir=rtl],html[dir=rtl]{--toast-icon-margin-start:4px;--toast-icon-margin-end:-3px;--toast-svg-margin-start:0px;--toast-svg-margin-end:-1px;--toast-button-margin-start:0;--toast-button-margin-end:auto;--toast-close-button-start:unset;--toast-close-button-end:0;--toast-close-button-transform:translate(35%, -35%)}[data-sonner-toaster]{position:fixed;width:var(--width);font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;--gray1:hsl(0, 0%, 99%);--gray2:hsl(0, 0%, 97.3%);--gray3:hsl(0, 0%, 95.1%);--gray4:hsl(0, 0%, 93%);--gray5:hsl(0, 0%, 90.9%);--gray6:hsl(0, 0%, 88.7%);--gray7:hsl(0, 0%, 85.8%);--gray8:hsl(0, 0%, 78%);--gray9:hsl(0, 0%, 56.1%);--gray10:hsl(0, 0%, 52.3%);--gray11:hsl(0, 0%, 43.5%);--gray12:hsl(0, 0%, 9%);--border-radius:8px;box-sizing:border-box;padding:0;margin:0;list-style:none;outline:0;z-index:999999999;transition:transform .4s ease}@media (hover:none) and (pointer:coarse){[data-sonner-toaster][data-lifted=true]{transform:none}}[data-sonner-toaster][data-x-position=right]{right:var(--offset-right)}[data-sonner-toaster][data-x-position=left]{left:var(--offset-left)}[data-sonner-toaster][data-x-position=center]{left:50%;transform:translateX(-50%)}[data-sonner-toaster][data-y-position=top]{top:var(--offset-top)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--offset-bottom)}[data-sonner-toast]{--y:translateY(100%);--lift-amount:calc(var(--lift) * var(--gap));z-index:var(--z-index);position:absolute;opacity:0;transform:var(--y);touch-action:none;transition:transform .4s,opacity .4s,height .4s,box-shadow .2s;box-sizing:border-box;outline:0;overflow-wrap:anywhere}[data-sonner-toast][data-styled=true]{padding:16px;background:var(--normal-bg);border:1px solid var(--normal-border);color:var(--normal-text);border-radius:var(--border-radius);box-shadow:0 4px 12px rgba(0,0,0,.1);width:var(--width);font-size:13px;display:flex;align-items:center;gap:6px}[data-sonner-toast]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-y-position=top]{top:0;--y:translateY(-100%);--lift:1;--lift-amount:calc(1 * var(--gap))}[data-sonner-toast][data-y-position=bottom]{bottom:0;--y:translateY(100%);--lift:-1;--lift-amount:calc(var(--lift) * var(--gap))}[data-sonner-toast][data-styled=true] [data-description]{font-weight:400;line-height:1.4;color:#3f3f3f}[data-rich-colors=true][data-sonner-toast][data-styled=true] [data-description]{color:inherit}[data-sonner-toaster][data-sonner-theme=dark] [data-description]{color:#e8e8e8}[data-sonner-toast][data-styled=true] [data-title]{font-weight:500;line-height:1.5;color:inherit}[data-sonner-toast][data-styled=true] [data-icon]{display:flex;height:16px;width:16px;position:relative;justify-content:flex-start;align-items:center;flex-shrink:0;margin-left:var(--toast-icon-margin-start);margin-right:var(--toast-icon-margin-end)}[data-sonner-toast][data-promise=true] [data-icon]>svg{opacity:0;transform:scale(.8);transform-origin:center;animation:sonner-fade-in .3s ease forwards}[data-sonner-toast][data-styled=true] [data-icon]>*{flex-shrink:0}[data-sonner-toast][data-styled=true] [data-icon] svg{margin-left:var(--toast-svg-margin-start);margin-right:var(--toast-svg-margin-end)}[data-sonner-toast][data-styled=true] [data-content]{display:flex;flex-direction:column;gap:2px}[data-sonner-toast][data-styled=true] [data-button]{border-radius:4px;padding-left:8px;padding-right:8px;height:24px;font-size:12px;color:var(--normal-bg);background:var(--normal-text);margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end);border:none;font-weight:500;cursor:pointer;outline:0;display:flex;align-items:center;flex-shrink:0;transition:opacity .4s,box-shadow .2s}[data-sonner-toast][data-styled=true] [data-button]:focus-visible{box-shadow:0 0 0 2px rgba(0,0,0,.4)}[data-sonner-toast][data-styled=true] [data-button]:first-of-type{margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end)}[data-sonner-toast][data-styled=true] [data-cancel]{color:var(--normal-text);background:rgba(0,0,0,.08)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-styled=true] [data-cancel]{background:rgba(255,255,255,.3)}[data-sonner-toast][data-styled=true] [data-close-button]{position:absolute;left:var(--toast-close-button-start);right:var(--toast-close-button-end);top:0;height:20px;width:20px;display:flex;justify-content:center;align-items:center;padding:0;color:var(--gray12);background:var(--normal-bg);border:1px solid var(--gray4);transform:var(--toast-close-button-transform);border-radius:50%;cursor:pointer;z-index:1;transition:opacity .1s,background .2s,border-color .2s}[data-sonner-toast][data-styled=true] [data-close-button]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-styled=true] [data-disabled=true]{cursor:not-allowed}[data-sonner-toast][data-styled=true]:hover [data-close-button]:hover{background:var(--gray2);border-color:var(--gray5)}[data-sonner-toast][data-swiping=true]::before{content:'';position:absolute;left:-100%;right:-100%;height:100%;z-index:-1}[data-sonner-toast][data-y-position=top][data-swiping=true]::before{bottom:50%;transform:scaleY(3) translateY(50%)}[data-sonner-toast][data-y-position=bottom][data-swiping=true]::before{top:50%;transform:scaleY(3) translateY(-50%)}[data-sonner-toast][data-swiping=false][data-removed=true]::before{content:'';position:absolute;inset:0;transform:scaleY(2)}[data-sonner-toast][data-expanded=true]::after{content:'';position:absolute;left:0;height:calc(var(--gap) + 1px);bottom:100%;width:100%}[data-sonner-toast][data-mounted=true]{--y:translateY(0);opacity:1}[data-sonner-toast][data-expanded=false][data-front=false]{--scale:var(--toasts-before) * 0.05 + 1;--y:translateY(calc(var(--lift-amount) * var(--toasts-before))) scale(calc(-1 * var(--scale)));height:var(--front-toast-height)}[data-sonner-toast]>*{transition:opacity .4s}[data-sonner-toast][data-x-position=right]{right:0}[data-sonner-toast][data-x-position=left]{left:0}[data-sonner-toast][data-expanded=false][data-front=false][data-styled=true]>*{opacity:0}[data-sonner-toast][data-visible=false]{opacity:0;pointer-events:none}[data-sonner-toast][data-mounted=true][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset)));height:var(--initial-height)}[data-sonner-toast][data-removed=true][data-front=true][data-swipe-out=false]{--y:translateY(calc(var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset) + var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=false]{--y:translateY(40%);opacity:0;transition:transform .5s,opacity .2s}[data-sonner-toast][data-removed=true][data-front=false]::before{height:calc(var(--initial-height) + 20%)}[data-sonner-toast][data-swiping=true]{transform:var(--y) translateY(var(--swipe-amount-y,0)) translateX(var(--swipe-amount-x,0));transition:none}[data-sonner-toast][data-swiped=true]{user-select:none}[data-sonner-toast][data-swipe-out=true][data-y-position=bottom],[data-sonner-toast][data-swipe-out=true][data-y-position=top]{animation-duration:.2s;animation-timing-function:ease-out;animation-fill-mode:forwards}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=left]{animation-name:swipe-out-left}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=right]{animation-name:swipe-out-right}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=up]{animation-name:swipe-out-up}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=down]{animation-name:swipe-out-down}@keyframes swipe-out-left{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) - 100%));opacity:0}}@keyframes swipe-out-right{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) + 100%));opacity:0}}@keyframes swipe-out-up{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) - 100%));opacity:0}}@keyframes swipe-out-down{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) + 100%));opacity:0}}@media (max-width:600px){[data-sonner-toaster]{position:fixed;right:var(--mobile-offset-right);left:var(--mobile-offset-left);width:100%}[data-sonner-toaster][dir=rtl]{left:calc(var(--mobile-offset-left) * -1)}[data-sonner-toaster] [data-sonner-toast]{left:0;right:0;width:calc(100% - var(--mobile-offset-left) * 2)}[data-sonner-toaster][data-x-position=left]{left:var(--mobile-offset-left)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--mobile-offset-bottom)}[data-sonner-toaster][data-y-position=top]{top:var(--mobile-offset-top)}[data-sonner-toaster][data-x-position=center]{left:var(--mobile-offset-left);right:var(--mobile-offset-right);transform:none}}[data-sonner-toaster][data-sonner-theme=light]{--normal-bg:#fff;--normal-border:var(--gray4);--normal-text:var(--gray12);--success-bg:hsl(143, 85%, 96%);--success-border:hsl(145, 92%, 87%);--success-text:hsl(140, 100%, 27%);--info-bg:hsl(208, 100%, 97%);--info-border:hsl(221, 91%, 93%);--info-text:hsl(210, 92%, 45%);--warning-bg:hsl(49, 100%, 97%);--warning-border:hsl(49, 91%, 84%);--warning-text:hsl(31, 92%, 45%);--error-bg:hsl(359, 100%, 97%);--error-border:hsl(359, 100%, 94%);--error-text:hsl(360, 100%, 45%)}[data-sonner-toaster][data-sonner-theme=light] [data-sonner-toast][data-invert=true]{--normal-bg:#000;--normal-border:hsl(0, 0%, 20%);--normal-text:var(--gray1)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-invert=true]{--normal-bg:#fff;--normal-border:var(--gray3);--normal-text:var(--gray12)}[data-sonner-toaster][data-sonner-theme=dark]{--normal-bg:#000;--normal-bg-hover:hsl(0, 0%, 12%);--normal-border:hsl(0, 0%, 20%);--normal-border-hover:hsl(0, 0%, 25%);--normal-text:var(--gray1);--success-bg:hsl(150, 100%, 6%);--success-border:hsl(147, 100%, 12%);--success-text:hsl(150, 86%, 65%);--info-bg:hsl(215, 100%, 6%);--info-border:hsl(223, 43%, 17%);--info-text:hsl(216, 87%, 65%);--warning-bg:hsl(64, 100%, 6%);--warning-border:hsl(60, 100%, 9%);--warning-text:hsl(46, 87%, 65%);--error-bg:hsl(358, 76%, 10%);--error-border:hsl(357, 89%, 16%);--error-text:hsl(358, 100%, 81%)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]{background:var(--normal-bg);border-color:var(--normal-border);color:var(--normal-text)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]:hover{background:var(--normal-bg-hover);border-color:var(--normal-border-hover)}[data-rich-colors=true][data-sonner-toast][data-type=success]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=success] [data-close-button]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=info]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=info] [data-close-button]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning] [data-close-button]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=error]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}[data-rich-colors=true][data-sonner-toast][data-type=error] [data-close-button]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}.sonner-loading-wrapper{--size:16px;height:var(--size);width:var(--size);position:absolute;inset:0;z-index:10}.sonner-loading-wrapper[data-visible=false]{transform-origin:center;animation:sonner-fade-out .2s ease forwards}.sonner-spinner{position:relative;top:50%;left:50%;height:var(--size);width:var(--size)}.sonner-loading-bar{animation:sonner-spin 1.2s linear infinite;background:var(--gray11);border-radius:6px;height:8%;left:-10%;position:absolute;top:-3.9%;width:24%}.sonner-loading-bar:first-child{animation-delay:-1.2s;transform:rotate(.0001deg) translate(146%)}.sonner-loading-bar:nth-child(2){animation-delay:-1.1s;transform:rotate(30deg) translate(146%)}.sonner-loading-bar:nth-child(3){animation-delay:-1s;transform:rotate(60deg) translate(146%)}.sonner-loading-bar:nth-child(4){animation-delay:-.9s;transform:rotate(90deg) translate(146%)}.sonner-loading-bar:nth-child(5){animation-delay:-.8s;transform:rotate(120deg) translate(146%)}.sonner-loading-bar:nth-child(6){animation-delay:-.7s;transform:rotate(150deg) translate(146%)}.sonner-loading-bar:nth-child(7){animation-delay:-.6s;transform:rotate(180deg) translate(146%)}.sonner-loading-bar:nth-child(8){animation-delay:-.5s;transform:rotate(210deg) translate(146%)}.sonner-loading-bar:nth-child(9){animation-delay:-.4s;transform:rotate(240deg) translate(146%)}.sonner-loading-bar:nth-child(10){animation-delay:-.3s;transform:rotate(270deg) translate(146%)}.sonner-loading-bar:nth-child(11){animation-delay:-.2s;transform:rotate(300deg) translate(146%)}.sonner-loading-bar:nth-child(12){animation-delay:-.1s;transform:rotate(330deg) translate(146%)}@keyframes sonner-fade-in{0%{opacity:0;transform:scale(.8)}100%{opacity:1;transform:scale(1)}}@keyframes sonner-fade-out{0%{opacity:1;transform:scale(1)}100%{opacity:0;transform:scale(.8)}}@keyframes sonner-spin{0%{opacity:1}100%{opacity:.15}}@media (prefers-reduced-motion){.sonner-loading-bar,[data-sonner-toast],[data-sonner-toast]>*{transition:none!important;animation:none!important}}.sonner-loader{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);transform-origin:center;transition:opacity .2s,transform .2s}.sonner-loader[data-visible=false]{opacity:0;transform:scale(.8) translate(-50%,-50%)}");
1let y=t=>{var a,r,c,d,h,f,y,g,b,v,w,x,S;let{invert:E,toast:C,unstyled:k,interacting:T,setHeights:O,visibleToasts:P,heights:M,index:A,toasts:j,expanded:F,removeToast:_,defaultRichColors:D,closeButton:q,style:R,cancelButtonStyle:I,actionButtonStyle:N,className:L="",descriptionClassName:U="",duration:$,position:Q,gap:B,expandByDefault:H,classNames:K,icons:z,closeButtonAriaLabel:J="Close toast"}=t,[Y,G]=e.default.useState(null),[V,W]=e.default.useState(null),[X,Z]=e.default.useState(!1),[tt,te]=e.default.useState(!1),[ta,tr]=e.default.useState(!1),[ts,tn]=e.default.useState(!1),[ti,to]=e.default.useState(!1),[tl,tu]=e.default.useState(0),[tc,td]=e.default.useState(0),th=e.default.useRef(C.duration||$||4e3),tf=e.default.useRef(null),tp=e.default.useRef(null),tm=0===A,ty=A+1<=P,tg=C.type,tb=!1!==C.dismissible,tv=C.className||"",tw=C.descriptionClassName||"",tx=e.default.useMemo(()=>M.findIndex(t=>t.toastId===C.id)||0,[M,C.id]),tS=e.default.useMemo(()=>{var t;return null!=(t=C.closeButton)?t:q},[C.closeButton,q]),tE=e.default.useMemo(()=>C.duration||$||4e3,[C.duration,$]),tC=e.default.useRef(0),tk=e.default.useRef(0),tT=e.default.useRef(0),tO=e.default.useRef(null),[tP,tM]=Q.split("-"),tA=e.default.useMemo(()=>M.reduce((t,e,a)=>a>=tx?t:t+e.height,0),[M,tx]),tj=(()=>
1{let[t,a]=e.default.useState(document.hidden);return e.default.useEffect(()=>{let t=()=>{a(document.hidden)};return document.addEventListener("visibilitychange",t),()=>window.removeEventListener("visibilitychange",t)},[]),t})(),tF=C.invert||E,t_="loading"===tg;tk.current=e.default.useMemo(()=>tx*B+tA,[tx,tA]),e.default.useEffect(()=>{th.current=tE},[tE]),e.default.useEffect(()=>{Z(!0)},[]),e.default.useEffect(()=>{let t=tp.current;if(t){let e=t.getBoundingClientRect().height;return td(e),O(t=>[{toastId:C.id,height:e,position:C.position},...t]),()=>O(t=>t.filter(t=>t.toastId!==C.id))}},[O,C.id]),e.default.useLayoutEffect(()=>{if(!X)return;let t=tp.current,e=t.style.height;t.style.height="auto";let a=t.getBoundingClientRect().height;t.style.height=e,td(a),O(t=>t.find(t=>t.toastId===C.id)?t.map(t=>t.toastId===C.id?{...t,height:a}:t):[{toastId:C.id,height:a,position:C.position},...t])},[X,C.title,C.description,O,C.id,C.jsx,C.action,C.cancel]);let tD=e.default.useCallback(()=>{te(!0),tu(tk.current),O(t=>t.filter(t=>t.toastId!==C.id)),setTimeout(()=>{_(C)},200)},[C,_,O,tk]);e.default.useEffect(()=>{let t;if((!C.promise||"loading"!==tg)&&C.duration!==1/0&&"loading"!==C.type){if(F||T||tj){if(tT.current<tC.current){let t=new Date().getTime()-tC.current;th.current=th.current-t}tT.current=new Date().getTime()}else th.current!==1/0&&(tC.current=new Date().getTime(),t=setTimeout(()=>{null==C.onAutoClose||C.onAutoClose.call(C,C),tD()},th.current));return()=>clearTimeout(t)}},[F,T,C,tg,tj,tD]),e.default.useEffect(()=>{C.delete&&(tD(),null==C.onDismiss||C.onDismiss.call(C,C))},[tD,C.delete]);let tq=C.icon||(null==z?void 0:z[tg])||(t=>{switch(t){case"success":return n;case"info":return o;case"warning":return i;case"error":return l;default:return null}})(tg);return e.default.createElement("li",{tabIndex:0,ref:tp,className:m(L,tv,null==K?void 0:K.toast,null==C||null==(a=C.classNames)?void 0:a.toast,null==K?void 0:K.default,null==K?void 0:K[tg],null==C||null==(r=C.classNames)?void 0:r[tg]),"data-sonner-toast":"","data-rich-colors":null!=(v=C.richColors)?v:D,"data-styled":!(C.jsx||C.unstyled||k),"data-mounted":X,"data-promise":!!C.promise,"data-swiped":ti,"data-removed":tt,"data-visible":ty,"data-y-position":tP,"data-x-position":tM,"data-index":A,"data-front":tm,"data-swiping":ta,"data-dismissible":tb,"data-type":tg,"data-invert":tF,"data-swipe-out":ts,"data-swipe-direction":V,"data-expanded":!!(F||H&&X),"data-testid":C.testId,style:{"--index":A,"--toasts-before":A,"--z-index":j.length-A,"--offset":`${tt?tl:tk.current}px`,"--initial-height":H?"auto":`${tc}px`,...R,...C.style},onDragEnd:()=>{tr(!1),G(null),tO.current=null},onPointerDown:t=>{2===t.button||t_||!tb||(tf.current=new Date,tu(tk.current),t.target.setPointerCapture(t.pointerId),"BUTTON"!==t.target.tagName&&(tr(!0),tO.current={x:t.clientX,y:t.clientY}))},onPointerUp:()=>{var t,e,a,r,s;if(ts||!tb)return;tO.current=null;let n=Number((null==(t=tp.current)?void 0:t.style.getPropertyValue("--swipe-amount-x").replace("px",""))||0),i=Number((null==(e=tp.current)?void 0:e.style.getPropertyValue("--swipe-amount-y").replace("px",""))||0),o=new Date().getTime()-(null==(a=tf.current)?void 0:a.getTime()),l="x"===Y?n:i,u=Math.abs(l)/o;if(Math.abs(l)>=45||u>.11){tu(tk.current),null==C.onDismiss||C.onDismiss.call(C,C),"x"===Y?W(n>0?"right":"left"):W(i>0?"down":"up"),tD(),tn(!0);return}null==(r=tp.current)||r.style.setProperty("--swipe-amount-x","0px"),null==(s=tp.current)||s.style.setProperty("--swipe-amount-y","0px"),to(!1),tr(!1),G(null)},onPointerMove:e=>{var a,r,s,n;if(!tO.current||!tb||(null==(a=window.getSelection())?void 0:a.toString().length)>0)return;let i=e.clientY-tO.current.y,o=e.clientX-tO.current.x,l=null!=(n=t.swipeDirections)?n:function(t){let[e,a]=t.split("-"),r=[];return e&&r.push(e),a&&r.push(a),r}(Q);!Y&&(Math.abs(o)>1||Math.abs(i)>1)&&G(Math.abs(o)>Math.abs(i)?"x":"y");let u={x:0,y:0},c=t=>1/(1.5+Math.abs(t)/20);if("y"===Y){if(l.includes("top")||l.includes("bottom"))if(l.includes("top")&&i<0||l.includes("bottom")&&i>0)u.y=i;else{let t=i*c(i);u.y=Math.abs(t)<Math.abs(i)?t:i}}else if("x"===Y&&(l.includes("left")||l.includes("right")))if(l.includes("left")&&o<0||l.includes("right")&&o>0)u.x=o;else{let t=o*c(o);u.x=Math.abs(t)<Math.abs(o)?t:o}(Math.abs(u.x)>0||Math.abs(u.y)>0)&&to(!0),null==(r=tp.current)||r.style.setProperty("--swipe-amount-x",`${u.x}px`),null==(s=tp.current)||s.style.setProperty("--swipe-amount-y",`${u.y}px`)}},tS&&!C.jsx&&"loading"!==tg?e.default.createElement("button",{"aria-label":J,"data-disabled":t_,"data-close-button":!0,onClick:t_||!tb?()=>{}:()=>{tD(),null==C.onDismiss||C.onDismiss.call(C,C)},className:m(null==K?void 0:K.closeButton,null==C||null==(c=C.classNames)?void 0:c.closeButton)},null!=(w=null==z?void 0:z.close)?w:u):null,(tg||C.icon||C.promise)&&null!==C.icon&&((null==z?void 0:z[tg])!==null||C.icon)?e.default.createElement("div",{"data-icon":"",className:m(null==K?void 0:K.icon,null==C||null==(d=C.classNames)?void 0:d.icon)},C.promise||"loading"===C.type&&!C.icon?C.icon||((null==z?void 0:z.loading)?e.default.createElement("div",{className:m(null==K?void 0:K.loader,null==C||null==(S=C.classNames)?void 0:S.loader,"sonner-loader"),"data-visible":"loading"===tg},z.loading):e.default.createElement(s,{className:m(null==K?void 0:K.loader,null==C||null==(x=C.classNames)?void 0:x.loader),visible:"loading"===tg})):null,"loading"!==C.type?tq:null):null,e.default.createElement("div",{"data-content":"",className:m(null==K?void 0:K.content,null==C||null==(h=C.classNames)?void 0:h.content)},e.default.createElement("div",{"data-title":"",className:m(null==K?void 0:K.title,null==C||null==(f=C.classNames)?void 0:f.title)},C.jsx?C.jsx:"function"==typeof C.title?C.title():C.title),C.description?e.default.createElement("div",{"data-description":"",className:m(U,tw,null==K?void 0:K.description,null==C||null==(y=C.classNames)?void 0:y.description)},"function"==typeof C.description?C.description():C.description):null),e.default.isValidElement(C.cancel)?C.cancel:C.cancel&&p(C.cancel)?e.default.createElement("button",{"data-button":!0,"data-cancel":!0,style:C.cancelButtonStyle||I,onClick:t=>{!p(C.cancel)||tb&&(null==C.cancel.onClick||C.cancel.onClick.call(C.cancel,t),tD())},className:m(null==K?void 0:K.cancelButton,null==C||null==(g=C.classNames)?void 0:g.cancelButton)}
1,C.cancel.label):null,e.default.isValidElement(C.action)?C.action:C.action&&p(C.action)?e.default.createElement("button",{"data-button":!0,"data-action":!0,style:C.actionButtonStyle||N,onClick:t=>{!p(C.action)||(null==C.action.onClick||C.action.onClick.call(C.action,t),t.defaultPrevented||tD())},className:m(null==K?void 0:K.actionButton,null==C||null==(b=C.classNames)?void 0:b.actionButton)},C.action.label):null)};function g(){if("undefined"==typeof window||"undefined"==typeof document)return"ltr";let t=document.documentElement.getAttribute("dir");return"auto"!==t&&t?t:window.getComputedStyle(document.documentElement).direction}function b(){let[t,r]=e.default.useState([]);return e.default.useEffect(()=>d.subscribe(t=>{t.dismiss?setTimeout(()=>{a.default.flushSync(()=>{r(e=>e.filter(e=>e.id!==t.id))})}):setTimeout(()=>{a.default.flushSync(()=>{r(e=>{let a=e.findIndex(e=>e.id===t.id);return -1!==a?[...e.slice(0,a),{...e[a],...t},...e.slice(a+1)]:[t,...e]})})})}),[]),{toasts:t}}let v=e.default.forwardRef(function(t,r){let{id:s,invert:n,position:i="bottom-right",hotkey:o=["altKey","KeyT"],expand:l,closeButton:u,className:c,offset:h,mobileOffset:f,theme:p="light",richColors:m,duration:b,style:v,visibleToasts:w=3,toastOptions:x,dir:S=g(),gap:E=14,icons:C,containerAriaLabel:k="Notifications"}=t,[T,O]=e.default.useState([]),P=e.default.useMemo(()=>s?T.filter(t=>t.toasterId===s):T.filter(t=>!t.toasterId),[T,s]),M=e.default.useMemo(()=>Array.from(new Set([i].concat(P.filter(t=>t.position).map(t=>t.position)))),[P,i]),[A,j]=e.default.useState([]),[F,_]=e.default.useState(!1),[D,q]=e.default.useState(!1),[R,I]=e.default.useState("system"!==p?p:"undefined"!=typeof window&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),N=e.default.useRef(null),L=o.join("+").replace(/Key/g,"").replace(/Digit/g,""),U=e.default.useRef(null),$=e.default.useRef(!1),Q=e.default.useCallback(t=>{O(e=>{var a;return(null==(a=e.find(e=>e.id===t.id))?void 0:a.delete)||d.dismiss(t.id),e.filter(({id:e})=>e!==t.id)})},[]);return e.default.useEffect(()=>d.subscribe(t=>{t.dismiss?requestAnimationFrame(()=>{O(e=>e.map(e=>e.id===t.id?{...e,delete:!0}:e))}):setTimeout(()=>{a.default.flushSync(()=>{O(e=>{let a=e.findIndex(e=>e.id===t.id);return -1!==a?[...e.slice(0,a),{...e[a],...t},...e.slice(a+1)]:[t,...e]})})})}),[T]),e.default.useEffect(()=>{if("system"!==p)return void I(p);if("system"===p&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?I("dark"):I("light")),"undefined"==typeof window)return;let t=window.matchMedia("(prefers-color-scheme: dark)");try{t.addEventListener("change",({matches:t})=>{t?I("dark"):I("light")})}catch(e){t.addListener(({matches:t})=>{try{t?I("dark"):I("light")}catch(t){console.error(t)}})}},[p]),e.default.useEffect(()=>{T.length<=1&&_(!1)},[T]),e.default.useEffect(()=>{let t=t=>{var e,a;o.every(e=>t[e]||t.code===e)&&(_(!0),null==(a=N.current)||a.focus()),"Escape"===t.code&&(document.activeElement===N.current||(null==(e=N.current)?void 0:e.contains(document.activeElement)))&&_(!1)};return document.addEventListener("keydown",t),()=>document.removeEventListener("keydown",t)},[o]),e.default.useEffect(()=>{if(N.current)return()=>{U.current&&(U.current.focus({preventScroll:!0}),U.current=null,$.current=!1)}},[N.current]),e.default.createElement("section",{ref:r,"aria-label":`${k} ${L}`,tabIndex:-1,"aria-live":"polite","aria-relevant":"additions text","aria-atomic":"false",suppressHydrationWarning:!0},M.map((a,r)=>{var s;let i,[o,d]=a.split("-");return P.length?e.default.createElement("ol",{key:a,dir:"auto"===S?g():S,tabIndex:-1,ref:N,className:c,"data-sonner-toaster":!0,"data-sonner-theme":R,"data-y-position":o,"data-x-position":d,style:{"--front-toast-height":`${(null==(s=A[0])?void 0:s.height)||0}px`,"--width":"356px","--gap":`${E}px`,...v,...(i={},[h,f].forEach((t,e)=>{let a=1===e,r=a?"--mobile-offset":"--offset",s=a?"16px":"24px";function n(t){["top","right","bottom","left"].forEach(e=>{i[`${r}-${e}`]="number"==typeof t?`${t}px`:t})}"number"==typeof t||"string"==typeof t?n(t):"object"==typeof t?["top","right","bottom","left"].forEach(e
1=>{void 0===t[e]?i[`${r}-${e}`]=s:i[`${r}-${e}`]="number"==typeof t[e]?`${t[e]}px`:t[e]}):n(s)}),i)},onBlur:t=>{$.current&&!t.currentTarget.contains(t.relatedTarget)&&($.current=!1,U.current&&(U.current.focus({preventScroll:!0}),U.current=null))},onFocus:t=>{!(t.target instanceof HTMLElement&&"false"===t.target.dataset.dismissible)&&($.current||($.current=!0,U.current=t.relatedTarget))},onMouseEnter:()=>_(!0),onMouseMove:()=>_(!0),onMouseLeave:()=>{D||_(!1)},onDragEnd:()=>_(!1),onPointerDown:t=>{t.target instanceof HTMLElement&&"false"===t.target.dataset.dismissible||q(!0)},onPointerUp:()=>q(!1)},P.filter(t=>!t.position&&0===r||t.position===a).map((r,s)=>{var i,o;return e.default.createElement(y,{key:r.id,icons:C,index:s,toast:r,defaultRichColors:m,duration:null!=(i=null==x?void 0:x.duration)?i:b,className:null==x?void 0:x.className,descriptionClassName:null==x?void 0:x.descriptionClassName,invert:n,visibleToasts:w,closeButton:null!=(o=null==x?void 0:x.closeButton)?o:u,interacting:D,position:a,style:null==x?void 0:x.style,unstyled:null==x?void 0:x.unstyled,classNames:null==x?void 0:x.classNames,cancelButtonStyle:null==x?void 0:x.cancelButtonStyle,actionButtonStyle:null==x?void 0:x.actionButtonStyle,closeButtonAriaLabel:null==x?void 0:x.closeButtonAriaLabel,removeToast:Q,toasts:P.filter(t=>t.position==r.position),heights:A.filter(t=>t.position==r.position),setHeights:j,expandByDefault:l,gap:E,expanded:F,swipeDirections:t.swipeDirections})})):null}))});t.s(["Toaster",()=>v,"toast",()=>f,"useSonner",()=>b])},715580,t=>{"use strict";let e="/admin/crm/lists/training";function a(t){return t===e||t?.startsWith(`${e}/`)===!0}t.s(["isTrainingModeRoute",()=>a])},787700,t=>{"use strict";let e=null;function a(){if("undefined"==typeof document)return null;if(e)return e;try{let t=document.getElementById("__admin_session");t?.textContent&&(e=JSON.parse(t.textContent))}catch{e=null}return e}t.s(["readAdminSessionSeed",()=>a])},163481,961072,876323,894191,t=>{"use strict";var e=t.i(843476),a=t.i(271645),r=t.i(618566),s=t.i(408623),n=t.i(95251),i=t.i(787700);let o="vertbuild:sidebar-changed",l={data:null,timestamp:0,token:null};function u(){let t=(0,i.readAdminSessionSeed)()?.sidebar??null,[e,r]=(0,a.useState)(()=>t?.sections??[]),[u,c]=(0,a.useState)(()=>!t),[d,h]=(0,a.useState)(null),[f,p]=(0,a.useState)(()=>t?.lastUpdated??null),m=(0,a.useRef)(!0),y=(0,a.useRef)(0),g=(0,a.useCallback)(async(t=!1)=>{let e=++y.current,a=null;try{let t=(0,n.createClient)(),{data:{session:e}}=await t.auth.getSession();a=e?.access_token??localStorage.getItem("auth_token")}catch{a=localStorage.getItem("auth_token")}if(!a){m.current&&e===y.current&&(r([]),c(!1),h("No authentication token"));return}let i=Date.now();if(!t&&l.data&&l.token===a&&i-l.timestamp<6e4&&l.data){m.current&&e===y.current&&(r(l.data.sections),p(l.data.lastUpdated),c(!1),h(null));return}try{m.current&&e===y.current&&(c(!0),h(null));let t=await fetch((0,s.createApiUrl)("rbac/sidebar-navigation"),{headers:{Authorization:`Bearer ${a}`}});if(!t.ok)throw Error(`Failed to fetch sidebar navigation: ${t.status}`);let n=await t.json();if(e!==y.current)return;l={data:n,timestamp:i,token:a},m.current&&e===y.current&&(r(n.sections),p(n.lastUpdated),h(null))}catch(t){console.error("Failed to fetch sidebar navigation:",t),m.current&&e===y.current&&(h(t instanceof Error?t.message:"Unknown error"),r([]))}finally{m.current&&e===y.current&&c(!1)}},[]),b=(0,a.useCallback)(()=>{l={data:null,timestamp:0,token:null}},[]),v=(0,a.useCallback)(async()=>{b(),await g(!0)},[g,b]);return(0,a.useEffect)(()=>{m.current=!0,g(!0);let t=()=>{v()},e=e=>{(e.key===o||"auth_token"===e.key)&&t()},a=window.setInterval(()=>{document.hidden||t()},6e4);return window.addEventListener(o,t),window.addEventListener("focus",t),window.addEventListener("storage",e),()=>{m.current=!1,y.current++,window.clearInterval(a),window.removeEventListener(o,t),window.removeEventListener("focus",t),window.removeEventListener("storage",e)}},[g,v]),{sections:e,loading:u,error:d,lastUpdated:f,refetch:v,invalidateCache:b}}function c(){l={data:null,timestamp:0,token:null},window.dispatchEvent(new Event(o));try{localStorage.setItem(o,String(Date.now()))}catch{}}function d(){let[t,e]=(0,a.useState)([]),[r,n]=(0,a.useState)([]),[i,o]=(0,a.useState)([]),[l,u]=(0,a.useState)(!0),[d,h]=(0,a.useState)(null),f=(0,a.useCallback)(()=>{let t=localStorage.getItem("auth_token");return{"Content-Type":"application/json",...t?{Authorization:`Bearer ${t}`}:{}}},[]),p=(0,a.useCallback)(async()=>{try{u(!0),h(null);let[t,a,r]=await Promise.all([fetch((0,s.createApiUrl)("rbac/sidebar-sections"),{headers:f()}),fetch((0,s.createApiUrl)("rbac/page-groups"),{headers:f()}),fetch((0,s.createApiUrl)("rbac/sidebar-roles"),{headers:f()})]);if(!t.ok)throw Error(`Failed to fetch sections: ${t.statusText}`);let i=await t.json(),l=a.ok?await a.json():[],c=r.ok?await r.json():[];e(Array.isArray(i)?i:[]),n(Array.isArray(l)?l:[]),o(Array.isArray(c)?c:[])}catch(t){console.error("Error fetching sidebar admin data:",t),h(t instanceof Error?t.message:"Unknown error")}finally{u(!1)}},[f]);(0,a.useEffect)(()=>{p()},[p]);let m=async(t,e)=>{if(!(await fetch((0,s.createApiUrl)(`rbac/sidebar-sections/${t}`),{method:"PUT",headers:f(),body:JSON.stringify(e)})).ok)throw Error("Failed to update section");c(),await p()},y=async(t,e)=>{if(!(await fetch((0,s.createApiUrl)(`rbac/sidebar-items/${t}`),{method:"PUT",headers:f(),body:JSON.stringify(e)})).ok)throw Error("Failed to update item");c(),await p()},g=async(t,e)=>{await y(t,{isLocked:e})},b=async t=>{if(!(await fetch((0,s.createApiUrl)("rbac/sidebar-sections"),{method:"POST",headers:f(),body:JSON.stringify(t)})).ok)throw Error("Failed to create section");c(),await p()},v=async(t,e)=>{if(!(await fetch((0,s.createApiUrl)("rbac/sidebar-items"),{method:"POST",headers:f(),body:JSON.stringify({...e,sectionId:t})})).ok)throw Error("Failed to create item");c(),await p()},w=async t=>{if(!(await fetch((0,s.createApiUrl)(`rbac/sidebar-sections/${t}`),{method:"DELETE",headers:f()})).ok)throw Error("Failed to delete section");c(),await p()},x=async t=>{if(!(await fetch((0,s.createApiUrl)(`rbac/sidebar-items/${t}`),{method:"DELETE",headers:f()})).ok)throw Error("Failed to delete item");c(),await p()},S=async t=>{if(!(await fetch((0,s.createApiUrl)("rbac/sidebar-sections/reorder"),{method:"POST",headers:f(),body:JSON.stringify({orders:t})})).ok)throw Error("Failed to reorder sections");c(),await p()},E=async t=>{if(!(await fetch((0,s.createApiUrl)("rbac/sidebar-items/reorder"),{method:"POST",headers:f(),body:JSON.stringify({orders:t})})).ok)throw Error("Failed to reorder items");c(),await p()},C=async(t,e)=>{let a=t.map(t=>fetch((0,s.createApiUrl)(`rbac/sidebar-items/${t}`),{method:"PUT",headers:f(),body:JSON.stringify(e)}));if((await Promise.all(a)).some(t=>!t.ok))throw Error("Some items could not be updated; refresh before retrying");c(),await p()},k=async()=>{let e=t.flatMap(t=>t.items.map(t=>
1t.id));await C(e,{isLocked:!0})},T=async()=>{let e=t.flatMap(t=>t.items.map(t=>t.id));await C(e,{isLocked:!1})},O=async e=>{let a=t.find(t=>t.id===e);if(!a)return;let r=a.items.map(t=>t.id);await C(r,{isLocked:!0})},P=async e=>{let a=t.find(t=>t.id===e);if(!a)return;let r=a.items.map(t=>t.id);await C(r,{isLocked:!1})},M=async(t,e)=>{await m(t,{isVisible:e})},A=async t=>{let e=await fetch((0,s.createApiUrl)(`rbac/sidebar-sections/${t}/roles`),{headers:f()});if(!e.ok)throw Error("Failed to fetch section roles");return e.json()},j=async(t,e)=>{if(!(await fetch((0,s.createApiUrl)(`rbac/sidebar-sections/${t}/roles`),{method:"POST",headers:f(),body:JSON.stringify({roleIds:e})})).ok)throw Error("Failed to assign roles to section");c(),await p()},F=async(t,e)=>{if(!(await fetch((0,s.createApiUrl)(`rbac/sidebar-sections/${t}/roles/${e}`),{method:"POST",headers:f()})).ok)throw Error("Failed to add role to section");c(),await p()},_=async(t,e)=>{if(!(await fetch((0,s.createApiUrl)(`rbac/sidebar-sections/${t}/roles/${e}`),{method:"DELETE",headers:f()})).ok)throw Error("Failed to remove role from section");c(),await p()},D=async(t,e,a)=>{if(!(await fetch((0,s.createApiUrl)(`rbac/sidebar-sections/${t}/roles/${e}`),{method:"PATCH",headers:f(),body:JSON.stringify(a)})).ok)throw Error("Failed to update role section assignment");c()},q=(0,a.useCallback)(async t=>{let e=await fetch((0,s.createApiUrl)(`rbac/sidebar-items/${t}/roles`),{headers:f()});if(!e.ok)throw Error("Failed to fetch item roles");let a=await e.json();return Array.isArray(a)?a:[]},[f]);return{sections:t,pageGroups:r,roles:i,isLoading:l,error:d,refetch:p,updateSection:m,updateItem:y,toggleItemLocked:g,createSection:b,createItem:v,deleteSection:w,deleteItem:x,reorderSections:S,reorderItems:E,lockAllItems:k,unlockAllItems:T,lockSectionItems:O,unlockSectionItems:P,toggleSectionVisibility:M,getSectionRoles:A,assignRolesToSection:j,addRoleToSection:F,removeRoleFromSection:_,updateRoleSectionAssignment:D,getItemRoles:q,assignRolesToItem:(0,a.useCallback)(async(t,e)=>{if(!(await fetch((0,s.createApiUrl)(`rbac/sidebar-items/${t}/roles`),{method:"POST",headers:f(),body:JSON.stringify({roleIds:e})})).ok)throw Error("Failed to assign roles to item");c()},[f]),removeRoleFromItem:async(t,e)=>{if(!(await fetch((0,s.createApiUrl)(`rbac/sidebar-items/${t}/roles/${e}`),{method:"DELETE",headers:f()})).ok)throw Error("Failed to remove role from item")}}}t.s(["invalidateSidebarCache",()=>c,"useSidebarNavigation",()=>u],961072),t.s(["useSidebarAdmin",()=>d],876323),t.s([],894191);let h=(0,a.createContext)(void 0),f=["/proposal","/auth","/privacy","/terms","/contact"];function p(t){return f.some(e=>t.startsWith(e))}function m({children:t}){let s=(0,i.readAdminSessionSeed)(),[n,o]=(0,a.useState)(s?.permissions??null),[l,u]=(0,a.useState)(!s),[d,f]=(0,a.useState)(+!!s),[m,y]=(0,a.useState)(s?.mustChangePassword??!1),g=(0,r.usePathname)(),b=(0,r.useRouter)(),v=(0,a.useRef)(!!s),w=(0,a.useRef)(!!s),x=(0,a.useCallback)((t,e)=>{w.current||(w.current=!0,o(t),y(e),u(!1),f(t=>t+1))},[]),S=(0,a.useCallback)(async()=>{if(p(g||"")){o(null),y(!1),u(!1);return}try{let t=localStorage.getItem("auth_token");if(!t){o(null),y(!1),u(!1);return}let[e,a]=await Promise.all([fetch("/api/rbac/my-permissions",{headers:{Authorization:`Bearer ${t}`}}),fetch("/api/auth/profile",{headers:{Authorization:`Bearer ${t}`}})]);if(e.ok){let t=await e.json();o(t),f(t=>t+1),c()}else o(null);if(a.ok){let t=await a.json();y(!!t?.profile?.must_change_password)}else y(!1)}catch(t){console.error("Failed to fetch permissions:",t),o(null)}finally{u(!1)}},[g]);(0,a.useEffect)(()=>{if(v.current){v.current=!1;return}if((g||"").startsWith("/admin")&&!(0,i.readAdminSessionSeed)()){let t=!1,e=e=>{t||(t=!0,a.disconnect(),window.clearTimeout(r),e?x(e.permissions,e.mustChangePassword):S())},a=new MutationObserver(()=>{let t=(0,i.readAdminSessionSeed)();t&&e(t)});a.observe(document.documentElement,{childList:!0,subtree:!0});let r=window.setTimeout(()=>e((0,i.readAdminSessionSeed)()),1500),s=(0,i.readAdminSessionSeed)();return s&&e(s),()=>{t=!0,a.disconnect(),window.clearTimeout(r)}}S()},[S,g,x]),(0,a.useEffect)(()=>{(g||"").startsWith("/admin")||(w.current=!1)},[g]),(0,a.useEffect)(()=>{m&&!p(g||"")&&b.replace("/auth/change-password?required=true")},[m,g,b]);let E=(0,a.useCallback)((t,e="view")=>{if(!n)return!1;if(n.roles.includes("super_admin"))return!0;
1if(n.pages[t]){let a=n.pages[t];if("view"===e&&a.canView||"edit"===e&&a.canEdit||"delete"===e&&a.canDelete)return!0}for(let a of Object.keys(n.pages).filter(t=>t.includes("/*"))){let r=a.replace("/*","");if(t.startsWith(r)){let t=n.pages[a];if(t&&("view"===e&&t.canView||"edit"===e&&t.canEdit||"delete"===e&&t.canDelete))return!0}}return!1},[n]),C=(0,a.useCallback)((t,e="view")=>{if(!n)return!1;if(n.roles.includes("super_admin"))return!0;let a=n.pageGroups[t];return!!a&&("view"===e&&!!a.canView||"edit"===e&&!!a.canEdit||"delete"===e&&!!a.canDelete)||!1},[n]),k=(0,a.useCallback)(t=>n?.roles.includes(t)||!1,[n]),T=n?.roles.some(t=>t.endsWith("_admin")||"super_admin"===t)||!1,O=n?.roles.includes("super_admin")||!1,P=m&&!p(g||"");return(0,e.jsx)(h.Provider,{value:{permissions:n,loading:l,canAccessPage:E,canAccessPageGroup:C,hasRole:k,isAdmin:T,isSuperAdmin:O,refetchPermissions:S,permissionVersion:d,mustChangePassword:m,seed:x},children:P?(0,e.jsx)("div",{className:"min-h-screen bg-black flex items-center justify-center",children:(0,e.jsx)("div",{className:"w-6 h-6 border-2 border-[#3D7D30] border-t-transparent rounded-full animate-spin"})}):t})}function y({permissions:t,mustChangePassword:e}){let{seed:r}=g(),s=(0,a.useRef)(!1);return(0,a.useLayoutEffect)(()=>{s.current||(s.current=!0,r(t,e))},[r,t,e]),null}function g(){let t=(0,a.useContext)(h);if(!t)throw Error("useRbac must be used within RbacProvider");return t}t.s(["RbacProvider",()=>m,"RbacSeed",()=>y,"useRbac",()=>g],163481)},600338,t=>{"use strict";let e=["jtbd-survey-amazon","jtbd-survey-doordash","jtbd-survey-starbucks"];function a(t){return!!t&&e.some(e=>t===`/f/${e}`)}t.s(["isJtbdFormPath",()=>a])},24535,t=>{"use strict";var e=t.i(247167),a=t.i(600338);let r=e.default.env.NEXT_PUBLIC_POSTHOG_KEY,s=e.default.env.NEXT_PUBLIC_POSTHOG_HOST||"https://us.i.posthog.com",n=["/admin","/admin/my-agent","/actions","/approve","/sign-agreement","/workshop"],i=!1,o=null,l=null,u=new Set(["$identify","lead_form_submitted"]);function c(t){o&&(o.set_config({autocapture:!t,capture_pageleave:!t,disable_session_recording:t}),t?o.stopSessionRecording():o.startSessionRecording())}function d(){return!!r}function h(t){return!!t&&!n.some(e=>t===e||t.startsWith(`${e}/`))}async function f(){return!!d()&&(!!i||l||(l=(async()=>{o=(await t.A(644985)).default;let e=(0,a.isJtbdFormPath)(window.location.pathname);return o.init(r,{api_host:s,person_profiles:"identified_only",capture_pageview:!1,capture_pageleave:!e,autocapture:!e,disable_session_recording:e,before_send:t=>{var e,r;return t?(e=window.location.pathname,r=t.event,h(e)&&(!(0,a.isJtbdFormPath)(e)||"string"==typeof r&&u.has(r)))?t:null:t}}),i=!0,!0})()))}async function p(){if(d()&&await f())try{o?.capture("$pageview")}catch{}}async function m(t,e){if(d()&&t)try{if(!await f())return;let{name:a,...r}=e??{};o?.identify(t,a?{name:a}:void 0),o?.capture("lead_form_submitted",{...a?{name:a}:{},...r})}catch{}}t.s(["capturePageview",()=>p,"isPostHogEnabled",()=>d,"isPublicPath",()=>h,"setJtbdCaptureSuspended",()=>c,"trackLeadFormSubmitted",()=>m])},180166,t=>{"use strict";var e={setTimeout:(t,e)=>setTimeout(t,e),clearTimeout:t=>clearTimeout(t),setInterval:(t,e)=>setInterval(t,e),clearInterval:t=>clearInterval(t)},a=new class{#t=e;#e=!1;setTimeoutProvider(t){this.#t=t}setTimeout(t,e){return this.#t.setTimeout(t,e)}clearTimeout(t){this.#t.clearTimeout(t)}setInterval(t,e){return this.#t.setInterval(t,e)}clearInterval(t){this.#t.clearInterval(t)}};function r(t){setTimeout(t,0)}t.s(["systemSetTimeoutZero",()=>r,"timeoutManager",()=>a])},619273,t=>{"use strict";var e=t.i(180166),a="undefined"==typeof window||"Deno"in globalThis;function r(){}function s(t,e){return"function"==typeof t?t(e):t}function n(t){return"number"==typeof t&&t>=0&&t!==1/0}function i(t,e){return Math.max(t+(e||0)-Date.now(),0)}function o(t,e){return"function"==typeof t?t(e):t}function l(t,e){return"function"==typeof t?t(e):t}function u(t,e){let{type:a="all",exact:r,fetchStatus:s,predicate:n,queryKey:i,stale:o}=t;if(i){if(r){if(e.queryHash!==d(i,e.options))return!1}else if(!f(e.queryKey,i))return!1}if("all"!==a){let t=e.isActive();if("active"===a&&!t||"inactive"===a&&t)return!1}return("boolean"!=typeof o||e.isStale()===o)&&(!s||s===e.state.fetchStatus)&&(!n||!!n(e))}function c(t,e){let{exact:a,status:r,predicate:s,mutationKey:n}=t;if(n){if(!e.options.mutationKey)return!1;if(a){if(h(e.options.mutationKey)!==h(n))return!1}else if(!f(e.options.mutationKey,n))return!1}return(!r||e.state.status===r)&&(!s||!!s(e))}function d(t,e){return(e?.queryKeyHashFn||h)(t)}function h(t){return JSON.stringify(t,(t,e)=>g(e)?Object.keys(e).sort().reduce((t,a)=>(t[a]=e[a],t),{}):e)}function f(t,e){return t===e||typeof t==typeof e&&!!t&&!!e&&"object"==typeof t&&"object"==typeof e&&Object.keys(e).every(a=>f(t[a],e[a]))}var p=Object.prototype.hasOwnProperty;function m(t,e){if(!e||Object.keys(t).length!==Object.keys(e).length)return!1;for(let a in t)if(t[a]!==e[a])return!1;return!0}function y(t){return Array.isArray(t)&&t.length===Object.keys(t).length}function g(t){if(!b(t))return!1;let e=t.constructor;if(void 0===e)return!0;let a=e.prototype;return!!b(a)&&!!a.hasOwnProperty("isPrototypeOf")&&Object.getPrototypeOf(t)===Object.prototype}function b(t){return"[object Object]"===Object.prototype.toString.call(t)}function v(t){return new Promise(a=>{e.timeoutManager.setTimeout(a,t)})}function w(t,e,a){return"function"==typeof a.structuralSharing?a.structuralSharing(t,e):!1!==a.structuralSharing?function t(e,a){if(e===a)return e;let r=y(e)&&y(a);if(!r&&!(g(e)&&g(a)))return a;let s=(r?e:Object.keys(e)).length,n=r?a:Object.keys(a),i=n.length,o=r?Array(i):{},l=0;for(let u=0;u<i;u++){let i=r?u:n[u],c=e[i],d=a[i];if(c===d){o[i]=c,(r?u<s:p.call(e,i))&&l++;continue}if(null===c||null===d||"object"!=typeof c||"object"!=typeof d){o[i]=d;continue}let h=t(c,d);o[i]=h,h===c&&l++}return s===i&&l===s?e:o}(t,e):e}function x(t,e,a=0){let r=[...t,e];return a&&r.length>a?r.slice(1):r}function S(t,e,a=0){let r=[e,...t];return a&&r.length>a?r.slice(0,-1):r}var E=Symbol();function C(t,e){return!t.queryFn&&e?.initialPromise?()=>e.initialPromise:t.queryFn&&t.queryFn!==E?t.queryFn:()=>Promise.reject(Error(`Missing queryFn: '${t.queryHash}'`))}function k(t,e){return"function"==typeof t?t(...e):!!t}t.s(["addToEnd",()=>x,"addToStart",()=>S,"ensureQueryFn",()=>C,"functionalUpdate",()=>s,"hashKey",()=>h,"hashQueryKeyByOptions",()=>d,"isServer",()=>a,"isValidTimeout",()=>n,"matchMutation",()=>c,"matchQuery",()=>u,"noop",()=>r,"partialMatchKey",()=>f,"replaceData",()=>w,"resolveEnabled",()=>l,"resolveStaleTime",()=>o,"shallowEqualObjects",()=>m,"shouldThrowError",()=>k,"skipToken",()=>E,"sleep",()=>v,"timeUntilStale",()=>i])},540143,t=>{"use strict";let e,a,r,s,n,i;var o=t.i(180166).systemSetTimeoutZero,l=(e=[],a=0,r=t=>{t()},s=t=>{t()},n=o,{batch:t=>{let i;a++;try{i=t()}finally{let t;--a||(t=e,e=[],t.length&&n(()=>{s(()=>{t.forEach(t=>{r(t)})})}))}return i},batchCalls:t=>(...e)=>{i(()=>{t(...e)})},schedule:i=t=>{a?e.push(t):n(()=>{r(t)})},setNotifyFunction:t=>{r=t},setBatchNotifyFunction:t=>{s=t},setScheduler:t=>{n=t}});t.s(["notifyManager",()=>l])},915823,t=>{"use strict";var e=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(t){return this.listeners.add(t),this.onSubscribe(),()=>{this.listeners.delete(t),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}};t.s(["Subscribable",()=>e])},175555,t=>{"use strict";var e=t.i(915823),a=t.i(619273),r=new class extends e.Subscribable{#a;#r;#s;constructor(){super(),this.#s=t=>{if(!a.isServer&&window.addEventListener){let e=()=>t();return window.addEventListener("visibilitychange",e,!1),()=>{window.removeEventListener("visibilitychange",e)}}}}onSubscribe(){this.#r||this.setEventListener(this.#s)}onUnsubscribe(){this.hasListeners()||(this.#r?.(),this.#r=void 0)}setEventListener(t){this.#s=t,this.#r?.(),this.#r=t(t=>{"boolean"==typeof t?this.setFocused(t):this.onFocus()})}setFocused(t){this.#a!==t&&(this.#a=t,this.onFocus())}onFocus(){let t=this.isFocused();
1this.listeners.forEach(e=>{e(t)})}isFocused(){return"boolean"==typeof this.#a?this.#a:globalThis.document?.visibilityState!=="hidden"}};t.s(["focusManager",()=>r])},936553,814448,793803,t=>{"use strict";var e=t.i(175555),a=t.i(915823),r=t.i(619273),s=new class extends a.Subscribable{#n=!0;#r;#s;constructor(){super(),this.#s=t=>{if(!r.isServer&&window.addEventListener){let e=()=>t(!0),a=()=>t(!1);return window.addEventListener("online",e,!1),window.addEventListener("offline",a,!1),()=>{window.removeEventListener("online",e),window.removeEventListener("offline",a)}}}}onSubscribe(){this.#r||this.setEventListener(this.#s)}onUnsubscribe(){this.hasListeners()||(this.#r?.(),this.#r=void 0)}setEventListener(t){this.#s=t,this.#r?.(),this.#r=t(this.setOnline.bind(this))}setOnline(t){this.#n!==t&&(this.#n=t,this.listeners.forEach(e=>{e(t)}))}isOnline(){return this.#n}};function n(){let t,e,a=new Promise((a,r)=>{t=a,e=r});function r(t){Object.assign(a,t),delete a.resolve,delete a.reject}return a.status="pending",a.catch(()=>{}),a.resolve=e=>{r({status:"fulfilled",value:e}),t(e)},a.reject=t=>{r({status:"rejected",reason:t}),e(t)},a}function i(t){return Math.min(1e3*2**t,3e4)}function o(t){return(t??"online")!=="online"||s.isOnline()}t.s(["onlineManager",()=>s],814448),t.s(["pendingThenable",()=>n],793803);var l=class extends Error{constructor(t){super("CancelledError"),this.revert=t?.revert,this.silent=t?.silent}};function u(t){let a,u=!1,c=0,d=n(),h=()=>e.focusManager.isFocused()&&("always"===t.networkMode||s.isOnline())&&t.canRun(),f=()=>o(t.networkMode)&&t.canRun(),p=t=>{"pending"===d.status&&(a?.(),d.resolve(t))},m=t=>{"pending"===d.status&&(a?.(),d.reject(t))},y=()=>new Promise(e=>{a=t=>{("pending"!==d.status||h())&&e(t)},t.onPause?.()}).then(()=>{a=void 0,"pending"===d.status&&t.onContinue?.()}),g=()=>{let e;if("pending"!==d.status)return;let a=0===c?t.initialPromise:void 0;try{e=a??t.fn()}catch(t){e=Promise.reject(t)}Promise.resolve(e).then(p).catch(e=>{if("pending"!==d.status)return;let a=t.retry??3*!r.isServer,s=t.retryDelay??i,n="function"==typeof s?s(c,e):s,o=!0===a||"number"==typeof a&&c<a||"function"==typeof a&&a(c,e);u||!o?m(e):(c++,t.onFail?.(c,e),(0,r.sleep)(n).then(()=>h()?void 0:y()).then(()=>{u?m(e):g()}))})};return{promise:d,status:()=>d.status,cancel:e=>{if("pending"===d.status){let a=new l(e);m(a),t.onCancel?.(a)}},continue:()=>(a?.(),d),cancelRetry:()=>{u=!0},continueRetry:()=>{u=!1},canStart:f,start:()=>(f()?g():y().then(g),d)}}t.s(["CancelledError",()=>l,"canFetch",()=>o,"createRetryer",()=>u],936553)},88587,t=>{"use strict";var e=t.i(180166),a=t.i(619273),r=class{#i;destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),(0,a.isValidTimeout)(this.gcTime)&&(this.#i=e.timeoutManager.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(t){this.gcTime=Math.max(this.gcTime||0,t??(a.isServer?1/0:3e5))}clearGcTimeout(){this.#i&&(e.timeoutManager.clearTimeout(this.#i),this.#i=void 0)}};t.s(["Removable",()=>r])},286491,t=>{"use strict";var e=t.i(619273),a=t.i(540143),r=t.i(936553),s=t.i(88587),n=class extends s.Removable{#o;#l;#u;#c;#d;#h;#f;constructor(t){super(),this.#f=!1,this.#h=t.defaultOptions,this.setOptions(t.options),this.observers=[],this.#c=t.client,this.#u=this.#c.getQueryCache(),this.queryKey=t.queryKey,this.queryHash=t.queryHash,this.#o=l(this.options),this.state=t.state??this.#o,this.scheduleGc()}get meta(){return this.options.meta}get promise(){return this.#d?.promise}setOptions(t){if(this.options={...this.#h,...t},this.updateGcTime(this.options.gcTime),this.state&&void 0===this.state.data){let t=l(this.options);void 0!==t.data&&(this.setState(o(t.data,t.dataUpdatedAt)),this.#o=t)}}optionalRemove(){this.observers.length||"idle"!==this.state.fetchStatus||this.#u.remove(this)}setData(t,a){let r=(0,e.replaceData)(this.state.data,t,this.options);return this.#p({data:r,type:"success",dataUpdatedAt:a?.updatedAt,manual:a?.manual}),r}setState(t,e){this.#p({type:"setState",state:t,setStateOptions:e})}cancel(t){let a=this.#d?.promise;return this.#d?.cancel(t),a?a.then(e.noop).catch(e.noop):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(this.#o)}isActive(){return this.observers.some(t=>!1!==(0,e.resolveEnabled)(t.options.enabled,this))}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===e.skipToken||this.state.dataUpdateCount+this.state.errorUpdate
1Count===0}isStatic(){return this.getObserversCount()>0&&this.observers.some(t=>"static"===(0,e.resolveStaleTime)(t.options.staleTime,this))}isStale(){return this.getObserversCount()>0?this.observers.some(t=>t.getCurrentResult().isStale):void 0===this.state.data||this.state.isInvalidated}isStaleByTime(t=0){return void 0===this.state.data||"static"!==t&&(!!this.state.isInvalidated||!(0,e.timeUntilStale)(this.state.dataUpdatedAt,t))}onFocus(){let t=this.observers.find(t=>t.shouldFetchOnWindowFocus());t?.refetch({cancelRefetch:!1}),this.#d?.continue()}onOnline(){let t=this.observers.find(t=>t.shouldFetchOnReconnect());t?.refetch({cancelRefetch:!1}),this.#d?.continue()}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),this.#u.notify({type:"observerAdded",query:this,observer:t}))}removeObserver(t){this.observers.includes(t)&&(this.observers=this.observers.filter(e=>e!==t),this.observers.length||(this.#d&&(this.#f?this.#d.cancel({revert:!0}):this.#d.cancelRetry()),this.scheduleGc()),this.#u.notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||this.#p({type:"invalidate"})}async fetch(t,a){let s;if("idle"!==this.state.fetchStatus&&this.#d?.status()!=="rejected"){if(void 0!==this.state.data&&a?.cancelRefetch)this.cancel({silent:!0});else if(this.#d)return this.#d.continueRetry(),this.#d.promise}if(t&&this.setOptions(t),!this.options.queryFn){let t=this.observers.find(t=>t.options.queryFn);t&&this.setOptions(t.options)}let n=new AbortController,i=t=>{Object.defineProperty(t,"signal",{enumerable:!0,get:()=>(this.#f=!0,n.signal)})},o=()=>{let t,r=(0,e.ensureQueryFn)(this.options,a),s=(i(t={client:this.#c,queryKey:this.queryKey,meta:this.meta}),t);return(this.#f=!1,this.options.persister)?this.options.persister(r,s,this):r(s)},l=(i(s={fetchOptions:a,options:this.options,queryKey:this.queryKey,client:this.#c,state:this.state,fetchFn:o}),s);this.options.behavior?.onFetch(l,this),this.#l=this.state,("idle"===this.state.fetchStatus||this.state.fetchMeta!==l.fetchOptions?.meta)&&this.#p({type:"fetch",meta:l.fetchOptions?.meta}),this.#d=(0,r.createRetryer)({initialPromise:a?.initialPromise,fn:l.fetchFn,onCancel:t=>{t instanceof r.CancelledError&&t.revert&&this.setState({...this.#l,fetchStatus:"idle"}),n.abort()},onFail:(t,e)=>{this.#p({type:"failed",failureCount:t,error:e})},onPause:()=>{this.#p({type:"pause"})},onContinue:()=>{this.#p({type:"continue"})},retry:l.options.retry,retryDelay:l.options.retryDelay,networkMode:l.options.networkMode,canRun:()=>!0});try{let t=await this.#d.start();if(void 0===t)throw Error(`${this.queryHash} data is undefined`);return this.setData(t),this.#u.config.onSuccess?.(t,this),this.#u.config.onSettled?.(t,this.state.error,this),t}catch(t){if(t instanceof r.CancelledError){if(t.silent)return this.#d.promise;else if(t.revert){if(void 0===this.state.data)throw t;return this.state.data}}throw this.#p({type:"error",error:t}),this.#u.config.onError?.(t,this),this.#u.config.onSettled?.(this.state.data,t,this),t}finally{this.scheduleGc()}}#p(t){let e=e=>{switch(t.type){case"failed":return{...e,fetchFailureCount:t.failureCount,fetchFailureReason:t.error};case"pause":return{...e,fetchStatus:"paused"};case"continue":return{...e,fetchStatus:"fetching"};case"fetch":return{...e,...i(e.data,this.options),fetchMeta:t.meta??null};case"success":let a={...e,...o(t.data,t.dataUpdatedAt),dataUpdateCount:e.dataUpdateCount+1,...!t.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return this.#l=t.manual?a:void 0,a;case"error":let r=t.error;return{...e,error:r,errorUpdateCount:e.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:e.fetchFailureCount+1,fetchFailureReason:r,fetchStatus:"idle",status:"error"};case"invalidate":return{...e,isInvalidated:!0};case"setState":return{...e,...t.state}}};this.state=e(this.state),a.notifyManager.batch(()=>{this.observers.forEach(t=>{t.onQueryUpdate()}),this.#u.notify({query:this,type:"updated",action:t})})}};function i(t,e){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:(0,r.canFetch)(e.networkMode)?"fetching":"paused",...void 0===t&&{error:null,status:"pending"}}}function o(t,e){return{data:t,dataUpdatedAt:e??Date.now(),error:null,isInvalidated:!1,status:"success"}}function l(t){let e="function"==typeof t.initialData?t.initialData():t.initialData,a=void 0!==e,r=a?"function"==typeof t.initialDataUpdatedAt?t.initialDataUpdatedAt():t.initialDataUpdatedAt:0;return{data:e,dataUpdateCount:0,dataUpdatedAt:a?r??Date.now():0,error:null,errorUpdate
1Count:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:a?"success":"pending",fetchStatus:"idle"}}t.s(["Query",()=>n,"fetchState",()=>i])},912598,t=>{"use strict";var e=t.i(271645),a=t.i(843476),r=e.createContext(void 0),s=t=>{let a=e.useContext(r);if(t)return t;if(!a)throw Error("No QueryClient set, use QueryClientProvider to set one");return a},n=({client:t,children:s})=>(e.useEffect(()=>(t.mount(),()=>{t.unmount()}),[t]),(0,a.jsx)(r.Provider,{value:t,children:s}));t.s(["QueryClientProvider",()=>n,"useQueryClient",()=>s])},114272,t=>{"use strict";var e=t.i(540143),a=t.i(88587),r=t.i(936553),s=class extends a.Removable{#c;#m;#y;#d;constructor(t){super(),this.#c=t.client,this.mutationId=t.mutationId,this.#y=t.mutationCache,this.#m=[],this.state=t.state||n(),this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options=t,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(t){this.#m.includes(t)||(this.#m.push(t),this.clearGcTimeout(),this.#y.notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){this.#m=this.#m.filter(e=>e!==t),this.scheduleGc(),this.#y.notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){this.#m.length||("pending"===this.state.status?this.scheduleGc():this.#y.remove(this))}continue(){return this.#d?.continue()??this.execute(this.state.variables)}async execute(t){let e=()=>{this.#p({type:"continue"})},a={client:this.#c,meta:this.options.meta,mutationKey:this.options.mutationKey};this.#d=(0,r.createRetryer)({fn:()=>this.options.mutationFn?this.options.mutationFn(t,a):Promise.reject(Error("No mutationFn found")),onFail:(t,e)=>{this.#p({type:"failed",failureCount:t,error:e})},onPause:()=>{this.#p({type:"pause"})},onContinue:e,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>this.#y.canRun(this)});let s="pending"===this.state.status,n=!this.#d.canStart();try{if(s)e();else{this.#p({type:"pending",variables:t,isPaused:n}),await this.#y.config.onMutate?.(t,this,a);let e=await this.options.onMutate?.(t,a);e!==this.state.context&&this.#p({type:"pending",context:e,variables:t,isPaused:n})}let r=await this.#d.start();return await this.#y.config.onSuccess?.(r,t,this.state.context,this,a),await this.options.onSuccess?.(r,t,this.state.context,a),await this.#y.config.onSettled?.(r,null,this.state.variables,this.state.context,this,a),await this.options.onSettled?.(r,null,t,this.state.context,a),this.#p({type:"success",data:r}),r}catch(e){try{throw await this.#y.config.onError?.(e,t,this.state.context,this,a),await this.options.onError?.(e,t,this.state.context,a),await this.#y.config.onSettled?.(void 0,e,this.state.variables,this.state.context,this,a),await this.options.onSettled?.(void 0,e,t,this.state.context,a),e}finally{this.#p({type:"error",error:e})}}finally{this.#y.runNext(this)}}#p(t){this.state=(e=>{switch(t.type){case"failed":return{...e,failureCount:t.failureCount,failureReason:t.error};case"pause":return{...e,isPaused:!0};case"continue":return{...e,isPaused:!1};case"pending":return{...e,context:t.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:t.isPaused,status:"pending",variables:t.variables,submittedAt:Date.now()};case"success":return{...e,data:t.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...e,data:void 0,error:t.error,failureCount:e.failureCount+1,failureReason:t.error,isPaused:!1,status:"error"}}})(this.state),e.notifyManager.batch(()=>{this.#m.forEach(e=>{e.onMutationUpdate(t)}),this.#y.notify({mutation:this,type:"updated",action:t})})}};function n(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}t.s(["Mutation",()=>s,"getDefaultState",()=>n])},566154,t=>{"use strict";function e(t){if(!t)return!1;try{let e=t=>JSON.parse(atob(t.replace(/-/g,"+").replace(/_/g,"/"))),[a,r]=t.split(".");return"VBDEMO"===e(a).typ||"vertbuild-demo"===e(r).purpose}catch{return!1}}function a(t){return"/portal"===t||t.startsWith("/portal/")}function r(t){if(!e(t))return null;try{let e=JSON.parse(atob(t.split(".")[1].replace(/-/g,"+").replace(/_/g,"/"))),a=e?.originalAdmin?.email;if("string"!=typeof a||!a.includes("@"))return null;
1let r=a.split("@")[0].split(/[._-]+/).filter(Boolean).map(t=>t.charAt(0).toUpperCase()+t.slice(1).toLowerCase());if(0===r.length)return null;let s=r.slice(0,2).map(t=>t.charAt(0)).join("");return{name:r.join(" "),initials:s,email:a}}catch{return null}}function s(){let t=document.cookie.split(";").map(t=>t.trim()).find(t=>t.startsWith("auth_token="))?.slice(11),a=null;try{a=localStorage.getItem("auth_token")}catch{}return e(t)?t:e(a)?a:null}t.s(["DEMO_RECOVERY_PATH",0,"/auth/demo-return","DEMO_SIGNIN_PATH",0,"/auth/signin?redirect=/admin/demo","browserDemoToken",()=>s,"demoPresenter",()=>r,"isPortalPath",()=>a])},992011,t=>{"use strict";var e=t.i(271645);function a(t,a){(0,e.useEffect)(()=>{if(!a)return;let e=t.current;if(!e)return;let r=document.activeElement,s=()=>Array.from(e.querySelectorAll('a[href],button:not([disabled]),textarea:not([disabled]),input:not([disabled]),select:not([disabled]),[tabindex]:not([tabindex="-1"])'));e.contains(document.activeElement)||(s()[0]??e).focus();let n=t=>{if("Tab"!==t.key)return;let a=s();if(0===a.length){t.preventDefault(),e.focus();return}let r=a[0],n=a[a.length-1],i=document.activeElement;e.contains(i)?t.shiftKey&&i===r?(t.preventDefault(),n.focus()):t.shiftKey||i!==n||(t.preventDefault(),r.focus()):(t.preventDefault(),r.focus())};return document.addEventListener("keydown",n),()=>{document.removeEventListener("keydown",n),r?.focus?.()}},[a,t])}t.s(["useFocusTrap",()=>a])},975608,t=>{"use strict";var e=t.i(843476),a=t.i(271645),r=t.i(992011);function s({isOpen:t,onClose:s,title:n,message:i,type:o="alert",onConfirm:l,confirmText:u="OK",cancelText:c="Cancel",variant:d="info"}){let h=(0,a.useRef)(null);(0,r.useFocusTrap)(h,t);let f=(0,a.useCallback)(t=>{"Escape"===t.key&&s()},[s]);if((0,a.useEffect)(()=>{if(t)return document.addEventListener("keydown",f),()=>document.removeEventListener("keydown",f)},[t,f]),!t)return null;let p=()=>{s()};return(0,e.jsx)("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/70 backdrop-blur-sm",onClick:p,children:(0,e.jsxs)("div",{ref:h,tabIndex:-1,className:`bg-[#111] border ${{info:"border-blue-500/40",warning:"border-amber-500/40",error:"border-red-500/40",success:"border-green-500/40"}[d]} rounded-lg p-6 max-w-md w-full mx-4 shadow-2xl`,onClick:t=>t.stopPropagation(),role:"dialog","aria-modal":"true","aria-labelledby":n?"modal-title":void 0,"aria-label":n?void 0:i,children:[n&&(0,e.jsx)("div",{id:"modal-title",className:`text-xl font-semibold mb-4 ${{info:"text-blue-400",warning:"text-amber-400",error:"text-red-400",success:"text-green-400"}[d]}`,children:n}),(0,e.jsx)("div",{className:"text-gray-200 whitespace-pre-wrap mb-6",children:i}),(0,e.jsxs)("div",{className:"flex gap-3 justify-end",children:["confirm"===o&&(0,e.jsx)("button",{onClick:p,className:"px-4 py-2 bg-[#222] border border-[#444] text-gray-300 rounded hover:bg-[#2a2a2a] transition-colors",children:c}),(0,e.jsx)("button",{onClick:()=>{l&&l(),s()},className:"px-4 py-2 bg-[#3D7D30] hover:bg-[#4a9a3a] text-white rounded transition-colors",autoFocus:!0,children:u})]})]})})}let n=null;function i(t){n=t}async function o(t,e){n?await n({message:t,title:e?.title,variant:e?.variant||"info",type:"alert"}):alert(t)}async function l(t,e){return n?await n({message:t,title:e?.title,variant:e?.variant||"warning",type:"confirm",confirmText:e?.confirmText,cancelText:e?.cancelText}):confirm(t)}t.s(["Modal",()=>s,"setGlobalModalHandler",()=>i,"showAlert",()=>o,"showConfirm",()=>l])},808341,(t,e,a)=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0});var r={cancelIdleCallback:function(){return i},requestIdleCallback:function(){return n}};for(var s in r)Object.defineProperty(a,s,{enumerable:!0,get:r[s]});let n="undefined"!=typeof self&&self.requestIdleCallback&&self.requestIdleCallback.bind(window)||function(t){let e=Date.now();return self.setTimeout(function(){t({didTimeout:!1,timeRemaining:function(){return Math.max(0,50-(Date.now()-e))}})},1)},i="undefined"!=typeof self&&self.cancelIdleCallback&&self.cancelIdleCallback.bind(window)||function(t){return clearTimeout(t)};("function"==typeof a.default||"object"==typeof a.default&&null!==a.default)&&void 0===a.default.__esModule&&(Object.defineProperty(a.default,"__esMo
1dule",{value:!0}),Object.assign(a.default,a),e.exports=a.default)},479520,(t,e,a)=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0});var r={default:function(){return v},handleClientScriptLoad:function(){return y},initScriptLoader:function(){return g}};for(var s in r)Object.defineProperty(a,s,{enumerable:!0,get:r[s]});let n=t.r(563141),i=t.r(151836),o=t.r(843476),l=n._(t.r(174080)),u=i._(t.r(271645)),c=t.r(742732),d=t.r(922737),h=t.r(808341),f=new Map,p=new Set,m=t=>{let{src:e,id:a,onLoad:r=()=>{},onReady:s=null,dangerouslySetInnerHTML:n,children:i="",strategy:o="afterInteractive",onError:u,stylesheets:c}=t,h=a||e;if(h&&p.has(h))return;if(f.has(e)){p.add(h),f.get(e).then(r,u);return}let m=()=>{s&&s(),p.add(h)},y=document.createElement("script"),g=new Promise((t,e)=>{y.addEventListener("load",function(e){t(),r&&r.call(this,e),m()}),y.addEventListener("error",function(t){e(t)})}).catch(function(t){u&&u(t)});n?(y.innerHTML=n.__html||"",m()):i?(y.textContent="string"==typeof i?i:Array.isArray(i)?i.join(""):"",m()):e&&(y.src=e,f.set(e,g)),(0,d.setAttributesFromProps)(y,t),"worker"===o&&y.setAttribute("type","text/partytown"),y.setAttribute("data-nscript",o),c&&(t=>{if(l.default.preinit)return t.forEach(t=>{l.default.preinit(t,{as:"style"})});if("undefined"!=typeof window){let e=document.head;t.forEach(t=>{let a=document.createElement("link");a.type="text/css",a.rel="stylesheet",a.href=t,e.appendChild(a)})}})(c),document.body.appendChild(y)};function y(t){let{strategy:e="afterInteractive"}=t;"lazyOnload"===e?window.addEventListener("load",()=>{(0,h.requestIdleCallback)(()=>m(t))}):m(t)}function g(t){t.forEach(y),[...document.querySelectorAll('[data-nscript="beforeInteractive"]'),...document.querySelectorAll('[data-nscript="beforePageRender"]')].forEach(t=>{let e=t.id||t.getAttribute("src");p.add(e)})}function b(t){let{id:e,src:a="",onLoad:r=()=>{},onReady:s=null,strategy:n="afterInteractive",onError:i,stylesheets:d,...f}=t,{updateScripts:y,scripts:g,getIsSsr:b,appDir:v,nonce:w}=(0,u.useContext)(c.HeadManagerContext);w=f.nonce||w;let x=(0,u.useRef)(!1);(0,u.useEffect)(()=>{let t=e||a;x.current||(s&&t&&p.has(t)&&s(),x.current=!0)},[s,e,a]);let S=(0,u.useRef)(!1);if((0,u.useEffect)(()=>{if(!S.current){if("afterInteractive"===n)m(t);else"lazyOnload"===n&&("complete"===document.readyState?(0,h.requestIdleCallback)(()=>m(t)):window.addEventListener("load",()=>{(0,h.requestIdleCallback)(()=>m(t))}));S.current=!0}},[t,n]),("beforeInteractive"===n||"worker"===n)&&(y?(g[n]=(g[n]||[]).concat([{id:e,src:a,onLoad:r,onReady:s,onError:i,...f,nonce:w}]),y(g)):b&&b()?p.add(e||a):b&&!b()&&m({...t,nonce:w})),v){if(d&&d.forEach(t=>{l.default.preinit(t,{as:"style"})}),"beforeInteractive"===n)if(!a)return f.dangerouslySetInnerHTML&&(f.children=f.dangerouslySetInnerHTML.__html,delete f.dangerouslySetInnerHTML),(0,o.jsx)("script",{nonce:w,dangerouslySetInnerHTML:{__html:`(self.__next_s=self.__next_s||[]).push(${JSON.stringify([0,{...f,id:e}])})`}});else return l.default.preload(a,f.integrity?{as:"script",integrity:f.integrity,nonce:w,crossOrigin:f.crossOrigin}:{as:"script",nonce:w,crossOrigin:f.crossOrigin}),(0,o.jsx)("script",{nonce:w,dangerouslySetInnerHTML:{__html:`(self.__next_s=self.__next_s||[]).push(${JSON.stringify([a,{...f,id:e}])})`}});"afterInteractive"===n&&a&&l.default.preload(a,f.integrity?{as:"script",integrity:f.integrity,nonce:w,crossOrigin:f.crossOrigin}:{as:"script",nonce:w,crossOrigin:f.crossOrigin})}return null}Object.defineProperty(b,"__nextScript",{value:!0});let v=b;("function"==typeof a.default||"object"==typeof a.default&&null!==a.default)&&void 0===a.default.__esModule&&(Object.defineProperty(a.default,"__esModule",{value:!0}),Object.assign(a.default,a),e.exports=a.default)},74591,t=>{"use strict";var e=t.i(271645),a=t.i(618566),r=t.i(566154);function s(){let t=(0,a.usePathname)();return(0,e.useEffect)(()=>{let t=()=>{let t=window.location.pathname;t!==r.DEMO_RECOVERY_PATH&&!(0,r.isPortalPath)(t)&&(0,r.browserDemoToken)()&&window.location.replace(r.DEMO_RECOVERY_PATH)};return t(),window.addEventListener("pageshow",t),()=>window.removeEventListener("pageshow",t)},[t]),null}t.s(["default",()=>s])},476617,t=>{"use strict";var e=t.i(843476),a=t.i(271645),r=t.i(975608);function s({children:t}){let[s,n]=(0,a.useState)(null),[i,o]=(0,a.useState)(null);(0,a.useEffect)(()=>{(0,r.setGlobalModalHandler)(async t=>new Promise(e=>{n(t),o(()=>e)}
1))},[]);let l=t=>{i&&i(t),n(null),o(null)};return(0,e.jsxs)(e.Fragment,{children:[t,s&&(0,e.jsx)(r.Modal,{isOpen:!0,onClose:()=>l(!1),onConfirm:"confirm"===s.type?()=>l(!0):void 0,...s})]})}t.s(["ModalProvider",()=>s])},228670,t=>{"use strict";var e=t.i(843476),a=t.i(619273),r=t.i(286491),s=t.i(540143),n=t.i(915823),i=class extends n.Subscribable{constructor(t={}){super(),this.config=t,this.#g=new Map}#g;build(t,e,s){let n=e.queryKey,i=e.queryHash??(0,a.hashQueryKeyByOptions)(n,e),o=this.get(i);return o||(o=new r.Query({client:t,queryKey:n,queryHash:i,options:t.defaultQueryOptions(e),state:s,defaultOptions:t.getQueryDefaults(n)}),this.add(o)),o}add(t){this.#g.has(t.queryHash)||(this.#g.set(t.queryHash,t),this.notify({type:"added",query:t}))}remove(t){let e=this.#g.get(t.queryHash);e&&(t.destroy(),e===t&&this.#g.delete(t.queryHash),this.notify({type:"removed",query:t}))}clear(){s.notifyManager.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}get(t){return this.#g.get(t)}getAll(){return[...this.#g.values()]}find(t){let e={exact:!0,...t};return this.getAll().find(t=>(0,a.matchQuery)(e,t))}findAll(t={}){let e=this.getAll();return Object.keys(t).length>0?e.filter(e=>(0,a.matchQuery)(t,e)):e}notify(t){s.notifyManager.batch(()=>{this.listeners.forEach(e=>{e(t)})})}onFocus(){s.notifyManager.batch(()=>{this.getAll().forEach(t=>{t.onFocus()})})}onOnline(){s.notifyManager.batch(()=>{this.getAll().forEach(t=>{t.onOnline()})})}},o=t.i(114272),l=n,u=class extends l.Subscribable{constructor(t={}){super(),this.config=t,this.#b=new Set,this.#v=new Map,this.#w=0}#b;#v;#w;build(t,e,a){let r=new o.Mutation({client:t,mutationCache:this,mutationId:++this.#w,options:t.defaultMutationOptions(e),state:a});return this.add(r),r}add(t){this.#b.add(t);let e=c(t);if("string"==typeof e){let a=this.#v.get(e);a?a.push(t):this.#v.set(e,[t])}this.notify({type:"added",mutation:t})}remove(t){if(this.#b.delete(t)){let e=c(t);if("string"==typeof e){let a=this.#v.get(e);if(a)if(a.length>1){let e=a.indexOf(t);-1!==e&&a.splice(e,1)}else a[0]===t&&this.#v.delete(e)}}this.notify({type:"removed",mutation:t})}canRun(t){let e=c(t);if("string"!=typeof e)return!0;{let a=this.#v.get(e),r=a?.find(t=>"pending"===t.state.status);return!r||r===t}}runNext(t){let e=c(t);if("string"!=typeof e)return Promise.resolve();{let a=this.#v.get(e)?.find(e=>
1e!==t&&e.state.isPaused);return a?.continue()??Promise.resolve()}}clear(){s.notifyManager.batch(()=>{this.#b.forEach(t=>{this.notify({type:"removed",mutation:t})}),this.#b.clear(),this.#v.clear()})}getAll(){return Array.from(this.#b)}find(t){let e={exact:!0,...t};return this.getAll().find(t=>(0,a.matchMutation)(e,t))}findAll(t={}){return this.getAll().filter(e=>(0,a.matchMutation)(t,e))}notify(t){s.notifyManager.batch(()=>{this.listeners.forEach(e=>{e(t)})})}resumePausedMutations(){let t=this.getAll().filter(t=>t.state.isPaused);return s.notifyManager.batch(()=>Promise.all(t.map(t=>t.continue().catch(a.noop))))}};function c(t){return t.options.scope?.id}var d=t.i(175555),h=t.i(814448);function f(t){return{onFetch:(e,r)=>{let s=e.options,n=e.fetchOptions?.meta?.fetchMore?.direction,i=e.state.data?.pages||[],o=e.state.data?.pageParams||[],l={pages:[],pageParams:[]},u=0,c=async()=>{let r=!1,c=(0,a.ensureQueryFn)(e.options,e.fetchOptions),d=async(t,s,n)=>{let i;if(r)return Promise.reject();if(null==s&&t.pages.length)return Promise.resolve(t);let o=(Object.defineProperty(i={client:e.client,queryKey:e.queryKey,pageParam:s,direction:n?"backward":"forward",meta:e.options.meta},"signal",{enumerable:!0,get:()=>(e.signal.aborted?r=!0:e.signal.addEventListener("abort",()=>{r=!0}),e.signal)}),i),l=await c(o),{maxPages:u}=e.options,d=n?a.addToStart:a.addToEnd;return{pages:d(t.pages,l,u),pageParams:d(t.pageParams,s,u)}};if(n&&i.length){let t="backward"===n,e={pages:i,pageParams:o},a=(t?function(t,{pages:e,pageParams:a}){return e.length>0?t.getPreviousPageParam?.(e[0],e,a[0],a):void 0}:p)(s,e);l=await d(e,a,t)}else{let e=t??i.length;do{let t=0===u?o[0]??s.initialPageParam:p(s,l);if(u>0&&null==t)break;l=await d(l,t),u++}while(u<e)}return l};e.options.persister?e.fetchFn=()=>e.options.persister?.(c,{client:e.client,queryKey:e.queryKey,meta:e.options.meta,signal:e.signal},r):e.fetchFn=c}}}function p(t,{pages:e,pageParams:a}){let r=e.length-1;return e.length>0?t.getNextPageParam(e[r],e,a[r],a):void 0}var m=class{#x;#y;#h;#S;#E;#C;#k;#T;constructor(t={}){this.#x=t.queryCache||new i,this.#y=t.mutationCache||new u,this.#h=t.defaultOptions||{},this.#S=new Map,this.#E=new Map,this.#C=0}mount(){this.#C++,1===this.#C&&(this.#k=d.focusManager.subscribe(async t=>{t&&(await this.resumePausedMutations(),this.#x.onFocus())}),this.#T=h.onlineManager.subscribe(async t=>{t&&(await this.resumePausedMutations(),this.#x.onOnline())}))}unmount(){this.#C--,0===this.#C&&(this.#k?.(),this.#k=void 0,this.#T?.(),this.#T=void 0)}isFetching(t){return this.#x.findAll({...t,fetchStatus:"fetching"}).length}isMutating(t){return this.#y.findAll({...t,status:"pending"}).length}getQueryData(t){let e=this.defaultQueryOptions({queryKey:t});return this.#x.get(e.queryHash)?.state.data}ensureQueryData(t){let e=this.defaultQueryOptions(t),r=this.#x.build(this,e),s=r.state.data;return void 0===s?this.fetchQuery(t):(t.revalidateIfStale&&r.isStaleByTime((0,a.resolveStaleTime)(e.staleTime,r))&&this.prefetchQuery(e),Promise.resolve(s))}getQueriesData(t){return this.#x.findAll(t).map(({queryKey:t,state:e})=>[t,e.data])}setQueryData(t,e,r){let s=this.defaultQueryOptions({queryKey:t}),n=this.#x.get(s.queryHash),i=n?.state.data,o=(0,a.functionalUpdate)(e,i);if(void 0!==o)return this.#x.build(this,s).setData(o,{...r,manual:!0})}setQueriesData(t,e,a){return s.notifyManager.batch(()=>this.#x.findAll(t).map(({queryKey:t})=>[t,this.setQueryData(t,e,a)]))}getQueryState(t){let e=this.defaultQueryOptions({queryKey:t});return this.#x.get(e.queryHash)?.state}removeQueries(t){let e=this.#x;s.notifyManager.batch(()=>{e.findAll(t).forEach(t=>{e.remove(t)})})}resetQueries(t,e){let a=this.#x;return s.notifyManager.batch(()=>(a.findAll(t).forEach(t=>{t.reset()}),this.refetchQueries({type:"active",...t},e)))}cancelQueries(t,e={}){let r={revert:!0,...e};return Promise.all(s.notifyManager.batch(()=>this.#x.findAll(t).map(t=>t.cancel(r)))).then(a.noop).catch(a.noop)}invalidateQueries(t,e={}){return s.notifyManager.batch(()=>(this.#x.findAll(t).forEach(t=>{t.invalidate()}),t?.refetchType==="none")?Promise.resolve():this.refetchQueries({...t,type:t?.refetchType??t?.type??"active"},e))}refetchQueries(t,e={}){let r={...e,cancelRefetch:e.cancelRefetch??!0};return Promise.all(s.notifyManager.batch(()=>this.#x.findAll(t).filter(t=>!t.isDisabled()&&!t.isStatic()).map(t=>{let e=t.fetch(void 0,r);return r.throwOnError||(e=e.catch(a.noop)),"paused"===t.state.fetchStatus?Promise.resolve():e}))).then(a.noop)}fetchQuery(t){let e=this.defaultQueryOptions(t);void 0===e.retry&&(e.retry=!1);let r=this.#x.build(this,e);return r.isStaleByTime((0,a.resolveStaleTime)(e.staleTime,r))?r.fetch(e):Promise.resolve(r.state.data)}prefetchQuery(t){return this.fetchQuery(t).then(a.noop).catch(a.noop)}fetchInfiniteQuery(t){return t.behavior=f(t.pages),this.fetchQuery(t)}prefetchInfiniteQuery(t){return this.fetchInfiniteQuery(t).then(a.noop).catch(a.noop)}ensureInfiniteQueryData(t){return t.behavior=f(t.pages),this.ensureQueryData(t)}resumePausedMutations(){return h.onlineManager.isOnline()?this.#y.resumePausedMutations():Promise.resolve()}getQueryCache(){return this.#x}getMutationCache(){return this.#y}getDefaultOptions(){return this.#h}setDefaultOptions(t){this.#h=t}setQueryDefaults(t,e){this.#S.set((0,a.hashKey)(t),{queryKey:t,defaultOptions:e})}getQueryDefaults(t){let e=[...this.#S.values()],r={};
1return e.forEach(e=>{(0,a.partialMatchKey)(t,e.queryKey)&&Object.assign(r,e.defaultOptions)}),r}setMutationDefaults(t,e){this.#E.set((0,a.hashKey)(t),{mutationKey:t,defaultOptions:e})}getMutationDefaults(t){let e=[...this.#E.values()],r={};return e.forEach(e=>{(0,a.partialMatchKey)(t,e.mutationKey)&&Object.assign(r,e.defaultOptions)}),r}defaultQueryOptions(t){if(t._defaulted)return t;let e={...this.#h.queries,...this.getQueryDefaults(t.queryKey),...t,_defaulted:!0};return e.queryHash||(e.queryHash=(0,a.hashQueryKeyByOptions)(e.queryKey,e)),void 0===e.refetchOnReconnect&&(e.refetchOnReconnect="always"!==e.networkMode),void 0===e.throwOnError&&(e.throwOnError=!!e.suspense),!e.networkMode&&e.persister&&(e.networkMode="offlineFirst"),e.queryFn===a.skipToken&&(e.enabled=!1),e}defaultMutationOptions(t){return t?._defaulted?t:{...this.#h.mutations,...t?.mutationKey&&this.getMutationDefaults(t.mutationKey),...t,_defaulted:!0}}clear(){this.#x.clear(),this.#y.clear()}},y=t.i(912598),g=t.i(271645);function b({children:t}){let[a]=(0,g.useState)(()=>new m({defaultOptions:{queries:{refetchOnWindowFocus:!1,staleTime:3e5,retry:1},mutations:{retry:1}}}));return(0,e.jsx)(y.QueryClientProvider,{client:a,children:t})}t.s(["QueryProvider",()=>b],228670)},351469,t=>{"use strict";var e=t.i(843476),a=t.i(271645),r=t.i(618566),s=t.i(24535),n=t.i(600338);function i({children:t}){let i=(0,r.usePathname)();return(0,a.useEffect)(()=>{if(!(0,s.isPostHogEnabled)()||!(0,s.isPublicPath)(i))return;let t=(0,n.isJtbdFormPath)(i);(0,s.setJtbdCaptureSuspended)(t),t||(0,s.capturePageview)()},[i]),(0,e.jsx)(e.Fragment,{children:t})}t.s(["PostHogProvider",()=>i])},3303,(t,e,a)=>{e.exports=t.r(479520)},119764,t=>{"use strict";var e=t.i(843476),a=t.i(3303),r=t.i(618566),s=t.i(715580),n=t.i(600338);let i="GTM-PDNCFSCF";function o(){let t=(0,r.usePathname)();if((0,s.isTrainingModeRoute)(t))return null;let o=(0,n.isJtbdFormPath)(t);return(0,e.jsxs)(e.Fragment,{children:[(0,e.jsx)(a.default,{id:"gtm-script",strategy:"afterInteractive",dangerouslySetInnerHTML:{__html:` 2 (function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start': 3 new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0], 4 j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src=
5 'https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f); 6 })(window,document,'script','dataLayer','${i}'); 7 `}}),!o&&(0,e.jsxs)(e.Fragment,{children:[(0,e.jsx)(a.default,{id:"wc-init",strategy:"beforeInteractive",dangerouslySetInnerHTML:{__html:"var $wc_load=function(a){return JSON.parse(JSON.stringify(a))},$wc_leads=$wc_leads||{doc:{url:$wc_load(document.URL),ref:$wc_load(document.referrer),search:$wc_load(location.search),hash:$wc_load(location.hash)}};"}}),(0,e.jsx)(a.default,{id:"wc-script",src:"//s.ksrndkehqnwntyxlhgto.com/157810.js",strategy:"afterInteractive"}),(0,e.jsx)(a.default,{id:"lucky-orange",src:"https://tools.luckyorange.com/core/lo.js?site-id=0c40cb67",strategy:"afterInteractive"})]}),(0,e.jsx)("noscript",{"data-testid":"gtm-fallback",children:(0,e.jsx)("iframe",{title:"Google Tag Manager",src:`https://www.googletagmanager.com/ns.html?id=${i}`,height:"0",width:"0",style:{display:"none",visibility:"hidden"}})})]})}t.s(["GlobalTracking",()=>o])},309397,t=>{"use strict";var e=t.i(843476);function a(){return(0,e.jsx)("a",{href:"#main-content",onClick:t=>{t.preventDefault();let e=document.getElementById("main-content")||document.querySelector("main")||document.querySelector('[role="main"]')||document.querySelector("h1");e instanceof HTMLElement&&(e.hasAttribute("tabindex")||e.setAttribute("tabindex","-1"),e.focus(),e.scrollIntoView({behavior:"smooth",block:"start"}))},className:"sr-only focus:not-sr-only focus:fixed focus:top-2 focus:left-2 focus:z-[200] focus:rounded focus:bg-white focus:px-4 focus:py-2 focus:text-black focus:shadow-lg focus:outline-none focus:ring-2 focus:ring-green-500",children:"Skip to main content"})}t.s(["SkipToContent",()=>a])},644985,t=>{t.v(e=>Promise.all(["static/chunks/bec9a8a367142db7.js"].map(e=>t.l(e))).then(()=>e(604570)))}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.