1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3185],{24040:function(e,t,n){Promise.resolve().then(n.t.bind(n,47960,23)),Promise.resolve().then(n.t.bind(n,85624,23)),Promise.resolve().then(n.bind(n,22457)),Promise.resolve().then(n.bind(n,46037)),Promise.resolve().then(n.bind(n,78848)),Promise.resolve().then(n.bind(n,78977)),Promise.resolve().then(n.bind(n,76939)),Promise.resolve().then(n.t.bind(n,3671,23))},15689:function(e,t,n){"use strict";n.d(t,{Q:function(){return h},trackError:function(){return d},z:function(){return f}});var r=n(57437),i=n(39899),o=n(23664),l=n(2265),s=n(99376),a=n(59010);let c="_canonical_uid";function d(e,t){if(i.ZP.__loaded)try{i.ZP.capture(e,t)}catch(e){}}function u(){let e=(0,s.usePathname)(),t=(0,s.useSearchParams)(),n=(0,o.U0)();return(0,l.useEffect)(()=>{if(e&&n){let r=window.origin+e,i=null==t?void 0:t.toString();i&&(r+="?".concat(i)),n.capture("$pageview",{$current_url:r})}},[e,t,n]),null}function f(e){let{children:t}=e;return(0,l.useEffect)(()=>{let e=function(){if("undefined"==typeof document)return;let e=document.cookie.match(RegExp("(?:^|; )"+c+"=([^;]*)"));return e?decodeURIComponent(e[1]):void 0}();i.ZP.init("phc_uv6iBe4HUecB857EiGoBJqtBFBmHhbSRdDdToh3GZ35v",{api_host:"/ingest",ui_host:"https://us.i.posthog.com",defaults:"2026-01-30",capture_pageview:!1,capture_pageleave:!0,disable_session_recording:!1,session_recording:{maskAllInputs:!0},before_send:e=>{var t,n;return e&&(null==e?void 0:e.event)==="$exception"&&(null!==(n=null===(t=e.properties)||void 0===t?void 0:t.$exception_list)&&void 0!==n?n:[]).some(e=>{var t,n;return(null==e?void 0:e.value)==="Script error."&&!(null==e?void 0:null===(n=e.stacktrace)||void 0===n?void 0:null===(t=n.frames)||void 0===t?void 0:t.length)})?null:e},...e?{bootstrap:{distinctID:e}}:{}});let t=i.ZP.get_distinct_id();t&&"undefined"!=typeof document&&(document.cookie="".concat(c,"=").concat(encodeURIComponent(t),"; max-age=").concat(63072e3,"; path=/; SameSite=Lax"))},[!0]),(0,r.jsxs)(o.zf,{client:i.ZP,children:[(0,r.jsx)(l.Suspense,{fallback:null,children:(0,r.jsx)(u,{})}),t]})}function h(){let{user:e}=(0,a.a)(),t=(0,o.U0)();return(0,l.useEffect)(()=>{t&&(e?t.identify(e.email,{email:e.email,portal_user_id:e.id}):t.reset())},[e,t]),null}},22457:function(e,t,n){"use strict";n.d(t,{Providers:function(){return H}});var r=n(57437),i=n(59010),o=n(40823),l=n(7304),s=n(35505),a=n(99376);let c=["/dashboard","/admin","/cart","/checkout","/settings","/profile"];function d(){let{isLoading:e}=(0,i.a)(),t=(0,a.usePathname)(),n=c.some(e=>null==t?void 0:t.startsWith(e));return e&&n?(0,r.jsx)("div",{style:{position:"fixed",inset:0,zIndex:9999,display:"flex",alignItems:"center",justifyContent:"center",backgroundColor:"rgba(255, 255, 255, 0.85)",backdropFilter:"blur(2px)"},"aria-label":"Loading",children:(0,r.jsxs)("div",{style:{display:"flex",flexDirection:"column",alignItems:"center",gap:"16px"},children:[(0,r.jsx)("svg",{width:"40",height:"40",viewBox:"0 0 40 40",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:{animation:"auth-spin 0.8s linear infinite"},children:(0,r.jsx)("circle",{cx:"20",cy:"20",r:"16",stroke:"#292521",strokeWidth:"3",strokeDasharray:"80",strokeDashoffset:"30",strokeLinecap:"round"})}),(0,r.jsx)("style",{children:"\n @keyframes auth-spin {\n from { transform: rotate(0deg); }\n to { transform: rotate(360deg); }\n }\n "})]})}):null}var u=n(57590),f=n(2265);function h(){return(0,f.useEffect)(()=>{try{window.markerConfig={project:"69cc49bea7cecf862b6604b4",source:"snippet"},function(e,t,n){if(!e.__Marker){e.__Marker={};var r=[],i={__cs:r};["show","hide","isVisible","capture","cancelCapture","unload","reload","isExtensionInstalled","setReporter","clearReporter","setCustomData","on","off"].forEach(function(e){i[e]=function(){var t=Array.prototype.slice.call(arguments);t.unshift(e),r.push(t)}}),e.Marker=i;var o=t.createElement("script");o.async=1,o.src="https://edge.marker.io/latest/shim.js";var l=t.getElementsByTagName("script")[0];l.parentNode.insertBefore(o,l)}}(window,document,0),setTimeout(()=>{window.Marker},2e3)}catch(e){console.error("â Error initializing Marker.io:",e)}},[]),null}var p=n(15689);let g="dmf_perf_metrics_v1",m=null,x=null,v=new Set;function y(){return m||(m=function(){try{let e=window.localStorage.getItem(g);return e?JSON.parse(e):{}}catch(e){return{}}}()),m}function b(){x||(x=setTimeout(()=>{if(x=null,m)try{window.localStorage.setItem(g,JSON.stringify(m))}catch(e){}},400))}
1function j(){v.forEach(e=>e())}function w(e,t){return e[t]||(e[t]={lcp:[],resources:{},lastVisit:Date.now()}),e[t].lastVisit=Date.now(),e[t]}function k(e){let t=Object.keys(e);t.length<=150||t.sort((t,n)=>e[t].lastVisit-e[n].lastVisit).slice(0,t.length-150).forEach(t=>delete e[t])}function S(e,t,n){if(!e||!Number.isFinite(t)||t<=0)return;let r=y(),i=w(r,e);i.lcp.push({value:t,at:Date.now(),nav:n}),i.lcp.length>40&&i.lcp.splice(0,i.lcp.length-40),k(r),b(),j()}function _(e){var t,n;let r=y()[e],i=null!==(t=null==r?void 0:r.lcp)&&void 0!==t?t:[];if(0===i.length)return{path:e,current:null,largest:null,average:null,count:0,lastVisit:null!==(n=null==r?void 0:r.lastVisit)&&void 0!==n?n:0};let o=i.map(e=>e.value);return{path:e,current:o[o.length-1],largest:Math.max(...o),average:o.reduce((e,t)=>e+t,0)/o.length,count:o.length,lastVisit:r.lastVisit}}function C(){return Object.keys(y()).map(e=>_(e)).filter(e=>e.count>0).sort((e,t)=>{var n,r;return(null!==(n=t.average)&&void 0!==n?n:0)-(null!==(r=e.average)&&void 0!==r?r:0)})}function P(e){let t=y(),n=[];for(let r of e?[e]:Object.keys(t)){let e=t[r];if(e)for(let[t,i]of Object.entries(e.resources)){let e=i.samples.map(e=>e.duration);0!==e.length&&n.push({path:r,name:t,kind:i.kind,average:e.reduce((e,t)=>e+t,0)/e.length,max:Math.max(...e),count:e.length})}}return n.sort((e,t)=>t.average-e.average)}var E=n(96430);function M(e){return e<=2.5?{label:"Good",color:"#16a34a"}:e<=4?{label:"Needs improvement",color:"#eab308"}:{label:"Poor",color:"#dc2626"}}function L(e){return null==e?"â":"".concat(e.toFixed(2),"s")}function I(e){return null==e?"â":"".concat(Math.round(e),"ms")}var T=n(12);let N="ui-monospace, SFMono-Regular, Menlo, Consolas, monospace";function W(e){let{currentPath:t,onClose:n}=e,[i,o]=(0,f.useState)("pages"),[l,s]=(0,f.useState)("current"),a=C(),c=P("current"===l?t:void 0);return(0,r.jsx)("div",{style:{position:"fixed",inset:0,zIndex:999998,background:"rgba(0,0,0,0.55)",display:"flex",alignItems:"center",justifyContent:"center",fontFamily:N},onClick:n,children:(0,r.jsxs)("div",{onClick:e=>e.stopPropagation(),style:{width:"min(760px, 92vw)",maxHeight:"84vh",background:"#111",color:"#fff",borderRadius:10,boxShadow:"0 8px 32px rgba(0,0,0,0.5)",display:"flex",flexDirection:"column",overflow:"hidden"},children:[(0,r.jsxs)("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",padding:"12px 16px",borderBottom:"1px solid rgba(255,255,255,0.12)"},children:[(0,r.jsx)("div",{style:{fontWeight:700,fontSize:13,letterSpacing:.5},children:"Performance Report"}),(0,r.jsxs)("div",{style:{display:"flex",gap:8},children:[(0,r.jsx)("button",{onClick:()=>{let e=new Blob([JSON.stringify({exportedAt:new Date().toISOString(),pages:C(),resources:P(),raw:JSON.parse(JSON.stringify(y()))},null,2)],{type:"application/json"}),t="perf-metrics-".concat(new Date().toISOString().replace(/[:.]/g,"-"),".json");(0,T.saveAs)(e,t)},style:D,children:"Export JSON"}),(0,r.jsx)("button",{onClick:()=>{window.confirm("Clear all recorded performance metrics?")&&function(){m={};try{window.localStorage.removeItem(g)}catch(e){}j()}()},style:D,children:"Clear metrics"}),(0,r.jsx)("button",{onClick:n,style:D,children:"Close â"})]})]}),(0,r.jsxs)("div",{style:{display:"flex",gap:4,padding:"8px 16px 0",borderBottom:"1px solid rgba(255,255,255,0.12)"},children:[(0,r.jsxs)(R,{active:"pages"===i,onClick:()=>o("pages"),children:["Pages (",a.length,")"]}),(0,r.jsx)(R,{active:"resources"===i,onClick:()=>o("resources"),children:"API / Resources"})]}),(0,r.jsx)("div",{style:{padding:16,overflowY:"auto",fontSize:12},children:"pages"===i?(0,r.jsx)(O,{pages:a,currentPath:t}):(0,r.jsx)(A,{resources:c,scope:l,onScopeChange:s,currentPath:t})})]})})}function O(e){let{pages:t,currentPath:n}=e;if(0===t.length)return(0,r.jsx)(B,{text:"No LCP samples recorded yet â browse a few pages."});let i=Math.max(...t.map(e=>{var t;return null!==(t=e.average)&&void 0!==t?t:0}),.001);return(0,r.jsxs)("div",{children:[(0,r.jsxs)("div",{style:{opacity:.6,marginBottom:10},children:["Average LCP by page (worst first) â ",t.length," page",1===t.length?"":"s"," tracked"]}),(0,r.jsx)("div",{style:{display:"flex",flexDirection:"column",gap:6},children:t.map(e=>{var t,o;let{color:l}=M(null!==(t=e.average)&&void 0!==t?t:0),s=Math.max(2,(null!==(o=e.average)&&void 0!==o?o:0)/i*100),a=e.path===n;return(0,r.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:8},children:[(0,r.jsxs)("div",{title:e.path,style:{width:190,flexShrink:0,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",o
1pacity:a?1:.75,fontWeight:a?700:400},children:[a?"⸠":"",e.path]}),(0,r.jsxs)("svg",{width:220,height:16,style:{flexShrink:0},children:[(0,r.jsx)("rect",{x:0,y:2,width:220,height:12,rx:3,fill:"rgba(255,255,255,0.08)"}),(0,r.jsx)("rect",{x:0,y:2,width:s/100*220,height:12,rx:3,fill:l})]}),(0,r.jsx)("div",{style:{width:64},children:L(e.average)}),(0,r.jsxs)("div",{style:{width:64,opacity:.6},children:["max ",L(e.largest)]}),(0,r.jsxs)("div",{style:{opacity:.4},children:["\xd7",e.count]})]},e.path)})})]})}function A(e){let{resources:t,scope:n,onScopeChange:i,currentPath:o}=e;return(0,r.jsxs)("div",{children:[(0,r.jsxs)("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",marginBottom:10},children:[(0,r.jsx)("div",{style:{opacity:.6},children:"Slowest API calls and resources, by average duration"}),(0,r.jsxs)("div",{style:{display:"flex",gap:4},children:[(0,r.jsx)(R,{small:!0,active:"current"===n,onClick:()=>i("current"),children:"This page"}),(0,r.jsx)(R,{small:!0,active:"all"===n,onClick:()=>i("all"),children:"All pages"})]})]}),0===t.length?(0,r.jsx)(B,{text:"No resource/API samples recorded yet."}):(0,r.jsxs)("table",{style:{width:"100%",borderCollapse:"collapse"},children:[(0,r.jsx)("thead",{children:(0,r.jsxs)("tr",{style:{textAlign:"left",opacity:.5},children:[(0,r.jsx)("th",{style:F,children:"Name"}),"all"===n&&(0,r.jsx)("th",{style:F,children:"Page"}),(0,r.jsx)("th",{style:F,children:"Kind"}),(0,r.jsx)("th",{style:F,children:"Avg"}),(0,r.jsx)("th",{style:F,children:"Max"}),(0,r.jsx)("th",{style:F,children:"Count"})]})}),(0,r.jsx)("tbody",{children:t.slice(0,30).map((e,t)=>(0,r.jsxs)("tr",{style:{borderTop:"1px solid rgba(255,255,255,0.08)"},children:[(0,r.jsx)("td",{style:{...z,wordBreak:"break-all"},children:e.name}),"all"===n&&(0,r.jsx)("td",{style:{...z,opacity:e.path===o?1:.5,maxWidth:140,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},title:e.path,children:e.path}),(0,r.jsx)("td",{style:z,children:(0,r.jsx)("span",{style:{padding:"1px 6px",borderRadius:4,fontSize:10,background:"api"===e.kind?"rgba(59,130,246,0.2)":"rgba(255,255,255,0.1)",color:"api"===e.kind?"#60a5fa":"#ccc"},children:e.kind})}),(0,r.jsx)("td",{style:{...z,color:e.average>1e3?"#dc2626":"#fff"},children:I(e.average)}),(0,r.jsx)("td",{style:z,children:I(e.max)}),(0,r.jsx)("td",{style:{...z,opacity:.6},children:e.count})]},"".concat(e.path,"-").concat(e.name,"-").concat(t)))})]})]})}function R(e){let{active:t,onClick:n,children:i,small:o}=e;return(0,r.jsx)("button",{onClick:n,style:{background:t?"rgba(255,255,255,0.12)":"transparent",color:t?"#fff":"rgba(255,255,255,0.5)",border:"none",borderRadius:6,padding:o?"3px 8px":"6px 12px",fontSize:o?11:12,fontFamily:N,cursor:"pointer",fontWeight:t?700:400},children:i})}function B(e){let{text:t}=e;return(0,r.jsx)("div",{style:{opacity:.5,padding:"20px 0"},children:t})}let D={background:"transparent",color:"rgba(255,255,255,0.7)",border:"1px solid rgba(255,255,255,0.2)",borderRadius:6,padding:"4px 10px",fontSize:11,fontFamily:N,cursor:"pointer"},F={padding:"4px 8px 6px 0",fontWeight:400},z={padding:"6px 8px 6px 0"};var V=n(25566);let J=()=>"true"===V.env.NEXT_PUBLIC_LCP_OVERLAY_ENABLED;function U(){let[e,t]=(0,f.useState)(!1),[n,i]=(0,f.useState)(!1),[,o]=(0,f.useState)(0),l=(0,a.usePathname)();(0,f.useEffect)(()=>{if(J())try{t("true"===window.localStorage.getItem("showLCP"))}catch(e){}},[]),(0,f.useEffect)(()=>{if(e){var t;return t=()=>o(e=>e+1),v.add(t),()=>v.delete(t)}},[e]);let{liveLcpSeconds:s}=function(e){let t=(0,a.usePathname)(),[n,r]=(0,f.useState)(null),i=(0,f.useRef)([]),o=(0,f.useRef)(!0);return(0,f.useEffect)(()=>{e&&((0,E.NO)(e=>r(e.value/1e3),{reportAllChanges:!0}),(0,E.NO)(e=>{S(window.location.pathname,e.value/1e3,"hard")}))},[e]),(0,f.useEffect)(()=>{e&&t&&(i.current.push({path:t,time:performance.now()}),i.current.length>200&&i.current.shift())},[e,t]),(0,f.useEffect)(()=>{let n;if(!e||!t)return;if(o.current){o.current=!1;return}let i=performance.now(),l=0,s=!1;try{(n=new PerformanceObserver(e=>{for(let t of e.getEntries())t.startTime>=i&&(l=Math.max(l,t.startTime),r((l-i)/1e3))})).observe({type:"largest-contentful-paint",buffered:!1})}catch(e){return}let a=()=>{s||(s=!0,null==n||n.disconnect(),l>i&&S(t,(l-i)/1e3,"spa"),document.removeEventListener("visibilitychange",c))},c=()=>{"hidden"===document.visibilityState&&a()};document.addEventListener("visibilitychange",c);let d=setTimeout(a,8e3);return()=>{clearTimeout(d),a()}},[e,t]),(0,f.useEffect)(()=>{let t;if(e){try{(t=new PerformanceObserver(e=>{for(let t of e.getEntries()){if("resource"!==t.entryType)continue;let{key:e,kind:n}=function(e){let t;try{t=new URL(e.name,window.location.origin)}catch(t){return{key:e.name,kind:"resource"}}let n=t.origin===window.location.origin;if(n&&t.pathname.startsWith("/api/"))return{key:t.pathname,kind:"api"};let r=n?"(same-origin)":t.hostname,i=e.initiatorType||"other";return{key:"".concat(r," \xb7 ").concat(i),kind:"resource"}}(t),r=function(e,t){var n,r;let i=null!==(r=null===(n=e[0])||void 0===n?void 0:n.path)&&void 0!==r?r:window.location.pathname;for(let n of e)if(n.time<=t)i=n.path;else break;return i}(i.current,t.startTime);!function(e,t,n,r){if(!e||!t||!Number.isFinite(n)||n<=0)return;let i=y(),o=w(i,e);if(!o.resources[t]){if(Object.keys(o.resources).length>=40)return;o.resources[t]={kind:r,samples:[]}}let l=o.resources[t];l.samples.push({duration:n,at:Date.now()}),l.samples.length>20&&l.samples.splice(0,l.samples.length-20),k(i),b(),j()}(r,e,t.duration,n)}})).observe({type:"resource",buffered:!0})}catch(e){}return()=>null==t?void 0:t.disconnect()}},[e]),{liveLcpSeconds:n}}(e);if(!e)return null;
1let c=l||"/",d=_(c),u=null!=s?s:d.current,{label:h,color:p}=M(null!=u?u:0);return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)("button",{onClick:()=>i(e=>!e),title:"Click for the full performance report",style:{position:"fixed",bottom:16,right:16,zIndex:999999,background:"rgba(17,17,17,0.92)",color:"#fff",fontFamily:"ui-monospace, SFMono-Regular, Menlo, Consolas, monospace",fontSize:12,lineHeight:1.4,padding:"10px 14px",borderRadius:8,border:"none",borderLeft:"4px solid ".concat(p),boxShadow:"0 2px 8px rgba(0,0,0,0.35)",cursor:"pointer",textAlign:"left",minWidth:170},children:[(0,r.jsxs)("div",{style:{fontWeight:700,letterSpacing:.5},children:["LCP: ",L(u),(0,r.jsx)("span",{style:{color:p,fontWeight:600,marginLeft:6},children:h})]}),(0,r.jsxs)("div",{style:{opacity:.75,marginTop:4,display:"flex",gap:10},children:[(0,r.jsxs)("span",{children:["Largest: ",L(d.largest)]}),(0,r.jsxs)("span",{children:["Avg: ",L(d.average)]})]}),(0,r.jsxs)("div",{style:{opacity:.5,marginTop:2},children:[d.count," visit",1===d.count?"":"s"," recorded"]}),(0,r.jsx)("div",{style:{opacity:.4,marginTop:2,wordBreak:"break-all"},children:c}),(0,r.jsx)("div",{style:{opacity:.4,marginTop:4,fontSize:11},children:"Click for full report â¸"})]}),n&&(0,r.jsx)(W,{currentPath:c,onClose:()=>i(!1)})]})}function H(e){let{children:t}=e;return(0,r.jsx)(p.z,{children:(0,r.jsx)(u.y1,{children:(0,r.jsxs)(i.H,{children:[(0,r.jsx)(p.Q,{}),(0,r.jsx)(o.v,{children:(0,r.jsx)(l.o,{children:(0,r.jsxs)(s.V,{children:[(0,r.jsx)(d,{}),(0,r.jsx)(h,{}),(0,r.jsx)(U,{}),t]})})})]})})})}},46037:function(e,t,n){"use strict";n.d(t,{default:function(){return c}});var r=n(99376),i=n(2265);let o=new WeakSet,l=new WeakSet,s=new WeakSet;function a(e){window.__DEBUG_STYLES__;let t=0;for(let n of Array.from(document.styleSheets)){let r=n.ownerNode;if(!r)continue;if(o.has(r)){n.disabled=!e;continue}if(l.has(r)){n.disabled=e;continue}if(s.has(r))continue;let i=function(e,t){var n,r;let i=[],o=null===(n=e.getAttribute)||void 0===n?void 0:n.call(e,"data-href");if(o&&i.push(o),e instanceof HTMLLinkElement){let t=e.getAttribute("href");t&&i.push(t)}for(let t of(null===(r=e.getAttribute)||void 0===r||r.call(e,"data-precedence"),i)){let e=t.toLowerCase();if(e.includes("/admin/")||e.includes("/admin.")||e.includes("admin-globals")||e.includes("admin%2f"))return"admin";if(e.includes("(frontend)")||e.includes("%28frontend%29")||t.startsWith("/styles/")||t.startsWith("/styles-min/")||e.includes("checkout.css")||e.includes("non-cms-pages")||e.includes("confirmation.css"))return"frontend"}if(t.href){let e=t.href;if(e.includes("/admin/")||e.includes("admin-globals")||e.includes("admin%2f"))return"admin";if(e.includes("(frontend)")||e.includes("%28frontend%29")||e.includes("/styles/")||e.includes("/styles-min/"))return"frontend"}try{let e=t.cssRules,n=e.length;if(0===n)return"unknown";let r=Math.min(n,120);for(let t=0;t<r;t++){let n=e[t].cssText;if(n.includes("__admin-css-marker"))return"admin";if(n.includes("__frontend-css-marker"))return"frontend"}for(let t=n-1;t>=Math.max(0,n-r);t--){let n=e[t].cssText;if(n.includes("__admin-css-marker"))return"admin";if(n.includes("__frontend-css-marker"))return"frontend"}let i=Math.min(n,200),o=0,l=0;for(let t=0;t<i;t++){let n=e[t].cssText;(n.includes(".admin-shell")||n.includes(".admin-sidebar")||n.includes(".admin-header"))&&(o+=2),(n.includes(".checkout-")||n.includes("#MainContent")||n.includes(".header-menu")||n.includes(".footer-"))&&(l+=2)}if(o>0&&0===l)return"admin";if(l>0&&0===o)return"frontend"}catch(e){return"unknown"}return null}(r,n);"admin"===i?(o.add(r),n.disabled=!e):"frontend"===i?(l.add(r),n.disabled=e):"unknown"===i?t++:s.add(r)}return t}function c(){var e;let t=(0,r.usePathname)(),n=null!==(e=null==t?void 0:t.startsWith("/admin"))&&void 0!==e&&e,o=(0,i.useRef)(n);return(0,i.useLayoutEffect)(()=>{document.documentElement.setAttribute("data-route-group",n?"admin":"frontend"),o.current!==n&&(o.current=n),a(n);let e=0,t=new MutationObserver(()=>{cancelAnimationFrame(e),e=requestAnimationFrame(()=>{a(n)})});t.observe(document.head,{childList:!0});let r=0,i=requestAnimationFrame(()=>{a(n)>0&&(r=window.setTimeout(()=>{a(n)},500))});return()=>{t.disconnect(),cancelAnimationFrame(e),cancelAnimationFrame(i),clearTimeout(r)}},[n]),null}},35505:function(e,t,n){"use strict";n.d(t,{V:function(){return s},p:function(){return c}});var r=n(57437),i=n(2265),o=n(15689);let l=(0,i.createContext)(void 0);function s(e){let{children:t}=e,[n,s]=(0,i.useState)([]),c=(0,i.useCallback)(function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"success",n=arguments.length>2?arguments[2]:void 0,r=Date.now().toString()+Math.random().toString(36).slice(2),i=function(e){if(null!=e){if("string"==typeof e)return e;if("object"==typeof e&&"string"==typeof e.message)return e.message;try{return String(e)}catch(e){return}}}(n);s(n=>[...n,{id:r,message:e,type:t,description:i}]),"error"===t&&(0,o.trackError)("toast_error",{source:"toast",message:e,description:i,page:window.location.pathname})},[]),d=(0,i.useCallback)(e=>{s(t=>t.filter(t=>t.id!==e))},[]);return(0,r.jsxs)(l.Provider,{value:{showToast:c},children:[t,(0,r.jsx)("div",{style:{position:"fixed",top:"24px",right:"24px",zIndex:1e7,display:"flex",flexDirection:"column",gap:"8px",maxWidth:"380px"},children:n.map(e=>(0,r.jsx)(a,{toast:e,onRemove:()=>d(e.id)},e.id))})]})}function a(e){let{toast:t,onRemove:n}=e;(0,i.useEffect)(()=>{let e=setTimeout(n,5e3);return()=>clearTimeout(e)},[n]);let o={success:{bg:"#dcfce7",border:"#bbf7d0",icon:"#16a34a",text:"#166534"},error:{bg:"#ffffff",border:"#e5e0db",icon:"#ef4444",text:"#1a1a1a"},info:{bg:"#ffffff",border:"#e5e0db",icon:"#3b82f6",text:"#1a1a1a"},warning:{bg:"#ffffff",border:"#e5e0db",icon:"#f59e0b",text:"#1a1a1a"}}[t.type],l={success:(0,r.jsxs)("svg",{width:"18",height:"18",viewBox:"0 0 18 18",fill:"none",children:[(0,r.jsx)("circle",{cx:"9",cy:"9",r:"8",stroke:o.icon,strokeWidth:"1.5"}),(0,r.jsx)("path",{d:"M5.5 9.5L7.5 11.5L12.5 6.5",stroke:o.icon,strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})]}),error:(0,r.jsxs)("svg",{width:"18",height:"18",viewBox:"0 0 18 18",fill:"none",children:[(0,r.jsx)("circle",{cx:"9",cy:"9",r:"8",stroke:o.icon,strokeWidth:"1.5"}),(0,r.jsx)("path",{d:"M6.5 6.5L11.5 11.5M11.5 6.5L6.5 11.5",stroke:o.icon,strokeWidth:"1.5",strokeLinecap:"round"})]}),info:(0,r.jsxs)("svg",{width:"18",height:"18",viewBox:"0 0 18 18",fill:"none",children:[(0,r.jsx)("circle",{cx:"9",cy:"9",r:"8",stroke:o.icon,strokeWidth:"1.5"}),(0,r.jsx)("path",{d:"M9 5.5V6M9 8V12.5",stroke:o.icon,strokeWidth:"1.5",strokeLinecap:"round"})]}),warning:(0,r.jsxs)("svg",{width:"18",height:"18",viewBox:"0 0 18 18",fill:"none",children:[(0,r.jsx)("path",{d:"M9 2L16.5 15H1.5L9 2Z",stroke:o.icon,strokeWidth:"1.5",strokeLinejoin:"round"}),(0,r.jsx)("path",{d:"M9 7V10.5M9 12.5V13",stroke:o.icon,strokeWidth:"1.5",strokeLinecap:"round"})]})};return(0,r.jsxs)("div",{style:{backgroundColor:o.bg,border:"1px solid ".concat(o.border),borderRadius:"12px",padding:"14px 16px",display:"flex",gap:"12px",alignItems:"flex-start",boxShadow:"0 8px 24px rgba(0,0,0,0.12)",animation:"toast-slide-in 0.3s ease",fontFamily:'"Neue Haas Grotesk Display Pro", -apple-system, sans-serif'},children:[(0,r.jsx)("div",{style:{flexShrink:0,marginTop:"1px"},children:l[t.type]}),(0,r.jsxs)("div",{style:{flex:1,minWidth:0},children:[(0,r.jsx)("div",{style:{fontSize:"14px",fontWeight:500,color:o.text,lineHeight:1.3},children:t.message}),t.description&&(0,r.jsx)("div",{style:{fontSize:"13px",color:o.text,marginTop:"2px",lineHeight:1.4,opacity:.75},children:t.description})]}),(0,r.jsx)("button",{onClick:n,style:{background:"none",border:"none",cursor:"pointer",padding:"2px",color:"#9a9590",flexShrink:0,display:"flex"},children:(0,r.jsx)("svg",{width:"14",height:"14",viewBox:"0 0 14 14",fill:"none",children:(0,r.jsx)("path",{d:"M10.5 3.5L3.5 10.5M3.5 3.5L10.5 10.5",stroke:"currentColor",strokeWidth:"1.3",strokeLinecap:"round"})})}),(0,r.jsx)("style",{children:"@keyframes toast-slide-in { from { transform: translateX(100%); opacity: 0; } to { transform: translateX(0); opacity: 1; } }"})]})}function c(){let e=(0,i.useContext)(l);if(void 0===e)throw Error("useToast must be used within a ToastProvider");return e}},57590:function(e,t,n){"use strict";n.d(t,{FR:function(){return h},Sv:function(){return p},y1:function(){return f}});var r=n(57437),i=n(2265);let o=(0,i.createContext)({messages:{},loaded:!1,msg:function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return t},refresh:async()=>{}}),l="smsg_v3",s=null,a=null,c=new Set;
1function d(){c.forEach(e=>e())}async function u(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(e||null===s){if(!e){let e=function(){if("undefined"==typeof localStorage)return null;try{let e=localStorage.getItem(l);if(!e)return null;let{data:t,ts:n}=JSON.parse(e);if(Date.now()-n>18e5)return localStorage.removeItem(l),null;return t}catch(e){return null}}();if(e){s=e,d();return}}try{let e=await fetch("/api/site-messages",{cache:"no-store"});if(e.ok){let t=await e.json();t.success&&t.data&&(s=t.data,function(e){if("undefined"!=typeof localStorage)try{localStorage.setItem(l,JSON.stringify({data:e,ts:Date.now()}))}catch(e){}}(s),d())}}catch(e){}}}function f(e){let{children:t}=e,[n,d]=(0,i.useState)(()=>null!=s?s:{}),[f,h]=(0,i.useState)(()=>null!==s);(0,i.useEffect)(()=>{let e=()=>{s&&(d(s),h(!0))};return c.add(e),()=>{c.delete(e)}},[]),(0,i.useEffect)(()=>{if(null!==s){d(s),h(!0);return}a||(a=u().finally(()=>{a=null,h(!0)})),a.then(()=>{s&&(d(s),h(!0))})},[]);let p=(0,i.useCallback)(async()=>{!function(){if("undefined"!=typeof localStorage)try{localStorage.removeItem(l)}catch(e){}}(),s=null,a=u(!0).finally(()=>{a=null}),await a,s&&(d(s),h(!0))},[]),g=(0,i.useCallback)(function(e){var t;let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",r=arguments.length>2?arguments[2]:void 0,i=null==s?void 0:s[e];return t=null!=i?i:n,r?Object.entries(r).reduce((e,t)=>{let[n,r]=t;return e.replace(RegExp("\\{".concat(n,"\\}"),"g"),r)},t):t},[]);return(0,r.jsx)(o.Provider,{value:{messages:n,loaded:f,msg:g,refresh:p},children:t})}function h(){return(0,i.useContext)(o)}function p(){let{msg:e}=(0,i.useContext)(o);return e}},7304:function(e,t,n){"use strict";n.d(t,{o:function(){return d},t:function(){return u}});var r=n(57437),i=n(2265),o=n(59010),l=n(40823);let s=(0,i.createContext)(void 0),a="portal360_pricing_tiers",c="portal360_pricing_tiers_ts";function d(e){let{children:t}=e,{user:n,metafields:d,metafieldsLoading:u,locations:f}=(0,o.a)(),{currentLocation:h}=(0,l.T)(),[p,g]=(0,i.useState)([]),[m,x]=(0,i.useState)(!1),v=(0,i.useRef)(!1),y=(0,i.useCallback)(async function(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(!v.current){if(!e&&"undefined"!=typeof sessionStorage)try{let e=sessionStorage.getItem(a),t=sessionStorage.getItem(c);if(e&&t&&Date.now()-parseInt(t,10)<6e5){let t=JSON.parse(e);if(t.length>0){g(t),x(!0);return}}}catch(e){}v.current=!0;try{let e=await fetch("/api/pricing-tiers",{credentials:"include"});if(e.ok){var t,n;let r=await e.json(),i=null!==(n=null!==(t=r.data)&&void 0!==t?t:r)&&void 0!==n?n:[];if(g(i),x(!0),"undefined"!=typeof sessionStorage)try{sessionStorage.setItem(a,JSON.stringify(i)),sessionStorage.setItem(c,String(Date.now()))}catch(e){}}}catch(e){console.error("[PricingProvider] Failed to fetch tiers:",e)}finally{v.current=!1}}},[]);(0,i.useEffect)(()=>{n?y():(g([]),x(!1))},[n,y]);let b=(0,i.useCallback)(async()=>{await y(!0)},[y]),j=(0,i.useMemo)(()=>{let e=new Map;for(let t of p)e.set(t.tier_name.toUpperCase(),t);return e},[p]),w=(0,i.useMemo)(()=>!d||u?null:d.tier||d.Tier||null,[d,u]),k=(0,i.useMemo)(()=>{var e;return m&&w&&null!==(e=j.get(w.toUpperCase()))&&void 0!==e?e:null},[m,w,j]),S=(0,i.useMemo)(()=>!!n&&!!m&&!u&&!!h,[n,m,u,h]),_=(0,i.useCallback)(e=>S?k&&0!==k.price_adjustment?Math.round(e*(1+k.price_adjustment/100)*100)/100:e:null,[S,k]),C=(0,i.useMemo)(()=>S&&k?k.free_freight_threshold:null,[S,k]),P=(0,i.useMemo)(()=>{let e=new Map;if(!f||!m)return e;for(let s of f){var t,n,r,i,o,l;let a=null!==(t=s.locationId)&&void 0!==t?t:s.location_id;if(null==a)continue;let c=(null==h?void 0:h.locationId)===a||(null==h?void 0:h.location_id)===a?w:null,d=c&&null!==(n=j.get(c.toUpperCase()))&&void 0!==n?n:null;e.set(a,{locationId:a,displayName:null!==(i=null!==(r=s.displayName)&&void 0!==r?r:s.display_name)&&void 0!==i?i:"",shopifyCompanyLocationId:null!==(o=s.shopifyCompanyLocationId)&&void 0!==o?o:null,isPrimaryLocation:null!==(l=s.isPrimaryLocation)&&void 0!==l&&l,tierName:c,tier:d})}return e},[f,m,h,w,j]),E=(0,i.useMemo)(()=>({tiers:p,tiersLoaded:m,currentTier:k,currentTierName:w,pricingReady:S,calculatePrice:_,freeFreightThreshold:C,locationPricingMap:P,refreshTiers:b}),[p,m,k,w,S,_,C,P,b]);return(0,r.jsx)(s.Provider,{value:E,children:t})}function u(){let e=(0,i.useContext)(s);if(void 0===e)throw Error("usePricing must be used within a PricingProvider");return e}},47960:function(){},85624:function(){}},function(e){e.O(0,[7364,9866,3664,6971,664,9883,9010,6822,823,2971,2117,1744],function(){return e(e.s=24040)}),_N_E=e.O()}]);
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.