vendor: 20,692 bytes, lines 1-3
1var e=Object.create,t=Object.defineProperty,n=Object.getOwnPropertyDescriptor,r=Object.getOwnPropertyNames,i=Object.getPrototypeOf,a=Object.prototype.hasOwnProperty,o=(e,t)=>()=>(e&&(t=e(e=0)),t),s=(e,t)=>()=>(t||(e((t={exports:{}}).exports,t),e=null),t.exports),c=(e,n)=>{let r={};for(var i in e)t(r,i,{get:e[i],enumerable:!0});return n||t(r,Symbol.toStringTag,{value:`Module`}),r},l=(e,i,o,s)=>{if(i&&typeof i==`object`||typeof i==`function`)for(var c=r(i),l=0,u=c.length,d;l<u;l++)d=c[l],!a.call(e,d)&&d!==o&&t(e,d,{get:(e=>i[e]).bind(null,d),enumerable:!(s=n(i,d))||s.enumerable});return e},u=(n,r,a)=>(a=n==null?{}:e(i(n)),l(r||!n||!n.__esModule?t(a,`default`,{value:n,enumerable:!0}):a,n)),d=e=>a.call(e,`module.exports`)?e[`module.exports`]:l(t({},`__esModule`,{value:!0}),e);(function(){let e=document.createElement(`link`).relList;if(e&&e.supports&&e.supports(`modulepreload`))return;for(let e of document.querySelectorAll(`link[rel="modulepreload"]`))n(e);new MutationObserver(e=>{for(let t of e)if(t.type===`childList`)for(let e of t.addedNodes)e.tagName===`LINK`&&e.rel===`modulepreload`&&n(e)}).observe(document,{childList:!0,subtree:!0});function t(e){let t={};return e.integrity&&(t.integrity=e.integrity),e.referrerPolicy&&(t.referrerPolicy=e.referrerPolicy),e.crossOrigin===`use-credentials`?t.credentials=`include`:e.crossOrigin===`anonymous`?t.credentials=`omit`:t.credentials=`same-origin`,t}function n(e){if(e.ep)return;e.ep=!0;let n=t(e);fetch(e.href,n)}})();var f=s((e=>{var t=Symbol.for(`react.transitional.element`),n=Symbol.for(`react.portal`),r=Symbol.for(`react.fragment`),i=Symbol.for(`react.strict_mode`),a=Symbol.for(`react.profiler`),o=Symbol.for(`react.consumer`),s=Symbol.for(`react.context`),c=Symbol.for(`react.forward_ref`),l=Symbol.for(`react.suspense`),u=Symbol.for(`react.memo`),d=Symbol.for(`react.lazy`),f=Symbol.for(`react.activity`),p=Symbol.iterator;function m(e){return typeof e!=`object`||!e?null:(e=p&&e[p]||e[`@@iterator`],typeof e==`function`?e:null)}var h={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},g=Object.assign,_={};function v(e,t,n){this.props=e,this.context=t,this.refs=_,this.updater=n||h}v.prototype.isReactComponent={},v.prototype.setState=function(e,t){if(typeof e!=`object`&&typeof e!=`function`&&e!=null)throw Error(`takes an object of state variables to update or a function which returns an object of state variables.`);this.updater.enqueueSetState(this,e,t,`setState`)},v.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,`forceUpdate`)};function y(){}y.prototype=v.prototype;function b(e,t,n){this.props=e,this.context=t,this.refs=_,this.updater=n||h}var x=b.prototype=new y;x.constructor=b,g(x,v.prototype),x.isPureReactComponent=!0;var S=Array.isArray;function C(){}var w={H:null,A:null,T:null,S:null},T=Object.prototype.hasOwnProperty;function E(e,n,r){var i=r.ref;return{$$typeof:t,type:e,key:n,ref:i===void 0?null:i,props:r}}function D(e,t){return E(e.type,t,e.props)}function O(e){return typeof e==`object`&&!!e&&e.$$typeof===t}function k(e){var t={"=":`=0`,":":`=2`};return`$`+e.replace(/[=:]/g,function(e){return t[e]})}var A=/\/+/g;function j(e,t){return typeof e==`object`&&e&&e.key!=null?k(``+e.key):t.toString(36)}function M(e){switch(e.status){case`fulfilled`:return e.value;case`rejected`:throw e.reason;default:switch(typeof e.status==`string`?e.then(C,C):(e.status=`pending`,e.then(function(t){e.status===`pending`&&(e.status=`fulfilled`,e.value=t)},function(t){e.status===`pending`&&(e.status=`rejected`,e.reason=t)})),e.status){case`fulfilled`:return e.value;case`rejected`:throw e.reason}}throw e}function N(e,r,i,a,o){var s=typeof e;(s===`undefined`||s===`boolean`)&&(e=null);var c=!1;if(e===null)c=!0;else switch(s){case`bigint`:case`string`:case`number`:c=!0;break;case`object`:switch(e.$$typeof){case t:case n:c=!0;break;case d:return c=e._init,N(c(e._payload),r,i,a,o)}}if(c)return o=o(e),c=a===``?`.`+j(e,0):a,S(o)?(i=``,c!=null&&(i=c.replace(A,`$&/`)+`/`),N(o,r,i,``,function(e){return e})):o!=null&&(O(o)&&(o=D(o,i+(o.key==null||e&&e.key===o.key?``:(``+o.key).replace(A,`$&/`)+`/`)+c)),r.push(o)),1;c=0;var l=a===``?`.`:a+`:`;if(S(e))for(var u=0;u<e.length;u++)a=e[u],s=l+j(a,u),c+=N(a,r,i,s,o);else if(u=m(e),typeof u==`function`)for(e=u.call(e),u=0;!(a=e.next()).done;)a=a.value,s=l+j(a,u++),c+=N(a,r,i,s,o);else if(s===`object`){if(typeof e.then==`function`)return N(M(e),r,i,a,o);throw r=String(e),Error(`Objects are not valid as a React child (found: `+(r===`[object Object]`?`object with keys {`+Object.keys(e).join(`, `)+`}`:r)+`). If you meant to render a collection of children, use an array instead.`)}return c}function P(e,t,n){if(e==null)return e;var r=[],i=0;return N(e,r,``,``,function(e){return t.call(n,e,i++)}),r}function F(e){if(e._status===-1){var t=e._result;t=t(),t.then(function(t){(e._status===0||e._status===-1)&&(e._status=1,e._result=t)},function(t){(e._status===0||e._status===-1)&&(e._status=2,e._result=t)}),e._status===-1&&(e._status=0,e._result=t)}if(e._status===1)return e._result.default;throw e._result}var ee=typeof reportError==`function`?reportError:function(e){if(typeof window==`object`&&typeof window.ErrorEvent==`function`){var t=new window.ErrorEvent(`error`,{bubbles:!0,cancelable:!0,message:typeof e==`object`&&e&&typeof e.message==`string`?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process==`object`&&typeof process.emit==`function`){process.emit(`uncaughtException`,e);return}console.error(e)},I={map:P,forEach:function(e,t,n){P(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return P(e,function(){t++}),t},toArray:function(e){return P(e,function(e){return e})||[]},only:function(e){if(!O(e))throw Error(`React.Children.only expected to receive a single React element child.`);return e}};e.Activity=f,e.Children=I,e.Component=v,e.Fragment=r,e.Profiler=a,e.PureComponent=b,e.StrictMode=i,e.Suspense=l,e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=w,e.__COMPILER_RUNTIME={__proto__:null,c:function(e){return w.H.useMemoCache(e)}},e.cache=function(e){return function(){return e.apply(null,arguments)}},e.cacheSignal=function(){return null},e.cloneElement=function(e,t,n){if(e==null)throw Error(`The argument must be a React element, but you passed `+e+`.`);var r=g({},e.props),i=e.key;if(t!=null)for(a in t.key!==void 0&&(i=``+t.key),t)!T.call(t,a)||a===`key`||a===`__self`||a===`__source`||a===`ref`&&t.ref===void 0||(r[a]=t[a]);var a=arguments.length-2;if(a===1)r.children=n;else if(1<a){for(var o=Array(a),s=0;s<a;s++)o[s]=arguments[s+2];r.children=o}return E(e.type,i,r)},e.createContext=function(e){return e={$$typeof:s,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null},e.Provider=e,e.Consumer={$$typeof:o,_context:e},e},e.createElement=function(e,t,n){var r,i={},a=null;if(t!=null)for(r in t.key!==void 0&&(a=``+t.key),t)T.call(t,r)&&r!==`key`&&r!==`__self`&&r!==`__source`&&(i[r]=t[r]);var o=arguments.length-2;if(o===1)i.children=n;else if(1<o){for(var s=Array(o),c=0;c<o;c++)s[c]=arguments[c+2];i.children=s}if(e&&e.defaultProps)for(r in o=e.defaultProps,o)i[r]===void 0&&(i[r]=o[r]);return E(e,a,i)},e.createRef=function(){return{current:null}},e.forwardRef=function(e){return{$$typeof:c,render:e}},e.isValidElement=O,e.lazy=function(e){return{$$typeof:d,_payload:{_status:-1,_result:e},_init:F}},e.memo=function(e,t){return{$$typeof:u,type:e,compare:t===void 0?null:t}},e.startTransition=function(e){var t=w.T,n={};w.T=n;try{var r=e(),i=w.S;i!==null&&i(n,r),typeof r==`object`&&r&&typeof r.then==`function`&&r.then(C,ee)}catch(e){ee(e)}finally{t!==null&&n.types!==null&&(t.types=n.types),w.T=t}},e.unstable_useCacheRefresh=function(){return w.H.useCacheRefresh()},e.use=function(e){return w.H.use(e)},e.useActionState=function(e,t,n){return w.H.useActionState(e,t,n)},e.useCallback=function(e,t){return w.H.useCallback(e,t)},e.useContext=function(e){return w.H.useContext(e)},e.useDebugValue=function(){},e.useDeferredValue=function(e,t){return w.H.useDeferredValue(e,t)},e.useEffect=function(e,t){return w.H.useEffect(e,t)},e.useEffectEvent=function(e){return w.H.useEffectEvent(e)},e.useId=function(){return w.H.useId()},e.useImperativeHandle=function(e,t,n){return w.H.useImperativeHandle(e,t,n)},e.useInsertionEffect=function(e,t){return w.H.useInsertionEffect(e,t)},e.useLayoutEffect=function(e,t){return w.H.useLayoutEffect(e,t)},e.useMemo=function(e,t){return w.H.useMemo(e,t)},e.useOptimistic=function(e,t){return w.H.useOptimistic(e,t)},e.useReducer=function(e,t,n){return w.H.useReducer(e,t,n)},e.useRef=function(e){return w.H.useRef(e)},e.useState=function(e){return w.H.useState(e)},e.useSyncExternalStore=function(e,t,n){return w.H.useSyncExternalStore(e,t,n)},e.useTransition=function(){return w.H.useTransition()},e.version=`19.2.5`})),p=s(((e,t)=>{t.exports=f()})),m=s((e=>{function t(e,t){var n=e.length;e.push(t);a:for(;0<n;){var r=n-1>>>1,a=e[r];if(0<i(a,t))e[r]=t,e[n]=a,n=r;else break a}}function n(e){return e.length===0?null:e[0]}function r(e){if(e.length===0)return null;var t=e[0],n=e.pop();if(n!==t){e[0]=n;a:for(var r=0,a=e.length,o=a>>>1;r<o;){var s=2*(r+1)-1,c=e[s],l=s+1,u=e[l];if(0>i(c,n))l<a&&0>i(u,c)?(e[r]=u,e[l]=n,r=l):(e[r]=c,e[s]=n,r=s);else if(l<a&&0>i(u,n))e[r]=u,e[l]=n,r=l;else break a}}return t}function i(e,t){var n=e.sortIndex-t.sortIndex;return n===0?e.id-t.id:n}if(e.unstable_now=void 0,typeof performance==`object`&&typeof performance.now==`function`){var a=performance;e.unstable_now=function(){return a.now()}}else{var o=Date,s=o.now();e.unstable_now=function(){return o.now()-s}}var c=[],l=[],u=1,d=null,f=3,p=!1,m=!1,h=!1,g=!1,_=typeof setTimeout==`function`?setTimeout:null,v=typeof clearTimeout==`function`?clearTimeout:null,y=typeof setImmediate<`u`?setImmediate:null;function b(e){for(var i=n(l);i!==null;){if(i.callback===null)r(l);else if(i.startTime<=e)r(l),i.sortIndex=i.expirationTime,t(c,i);else break;i=n(l)}}function x(e){if(h=!1,b(e),!m)if(n(c)!==null)m=!0,S||(S=!0,O());else{var t=n(l);t!==null&&j(x,t.startTime-e)}}var S=!1,C=-1,w=5,T=-1;function E(){return g?!0:!(e.unstable_now()-T<w)}function D(){if(g=!1,S){var t=e.unstable_now();T=t;var i=!0;try{a:{m=!1,h&&(h=!1,v(C),C=-1),p=!0;var a=f;try{b:{for(b(t),d=n(c);d!==null&&!(d.expirationTime>t&&E());){var o=d.callback;if(typeof o==`function`){d.callback=null,f=d.priorityLevel;var s=o(d.expirationTime<=t);if(t=e.unstable_now(),typeof s==`function`){d.callback=s,b(t),i=!0;break b}d===n(c)&&r(c),b(t)}else r(c);d=n(c)}if(d!==null)i=!0;else{var u=n(l);u!==null&&j(x,u.startTime-t),i=!1}}break a}finally{d=null,f=a,p=!1}i=void 0}}finally{i?O():S=!1}}}var O;if(typeof y==`function`)O=function(){y(D)};else if(typeof MessageChannel<`u`){var k=new MessageChannel,A=k.port2;k.port1.onmessage=D,O=function(){A.postMessage(null)}}else O=function(){_(D,0)};function j(t,n){C=_(function(){t(e.unstable_now())},n)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(e){e.callback=null},e.unstable_forceFrameRate=function(e){0>e||125<e?console.error(`forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported`):w=0<e?Math.floor(1e3/e):5},e.unstable_getCurrentPriorityLevel=function(){return f},e.unstable_next=function(e){switch(f){case 1:case 2:case 3:var t=3;break;default:t=f}var n=f;f=t;try{return e()}finally{f=n}},e.unstable_requestPaint=function(){g=!0},e.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var n=f;f=e;try{return t()}finally{f=n}},e.unstable_scheduleCallback=function(r,i,a){var o=e.unstable_now();switch(typeof a==`object`&&a?(a=a.delay,a=typeof a==`number`&&0<a?o+a:o):a=o,r){case 1:var s=-1;break;case 2:s=250;break;case 5:s=1073741823;break;case 4:s=1e4;break;default:s=5e3}return s=a+s,r={id:u++,callback:i,priorityLevel:r,startTime:a,expirationTime:s,sortIndex:-1},a>o?(r.sortIndex=a,t(l,r),n(c)===null&&r===n(l)&&(h?(v(C),C=-1):h=!0,j(x,a-o))):(r.sortIndex=s,t(c,r),m||p||(m=!0,S||(S=!0,O()))),r},e.unstable_shouldYield=E,e.unstable_wrapCallback=function(e){var t=f;return function(){var n=f;f=t;try{return e.apply(this,arguments)}finally{f=n}}}})),h=s(((e,t)=>{t.exports=m()})),g=s((e=>{var t=p();function n(e){var t=`https://react.dev/errors/`+e;if(1<arguments.length){t+=`?args[]=`+encodeURIComponent(arguments[1]);for(var n=2;n<arguments.length;n++)t+=`&args[]=`+encodeURIComponent(arguments[n])}return`Minified React error #`+e+`; visit `+t+` for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`}function r(){}var i={d:{f:r,r:function(){throw Error(n(522))},D:r,C:r,L:r,m:r,X:r,S:r,M:r},p:0,findDOMNode:null},a=Symbol.for(`react.portal`);function o(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:a,key:r==null?null:``+r,children:e,containerInfo:t,implementation:n}}var s=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function c(e,t){if(e===`font`)return``;if(typeof t==`string`)return t===`use-credentials`?t:``}e.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=i,e.createPortal=function(e,t){var r=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11)throw Error(n(299));return o(e,t,null,r)},e.flushSync=function(e){var t=s.T,n=i.p;try{if(s.T=null,i.p=2,e)return e()}finally{s.T=t,i.p=n,i.d.f()}},e.preconnect=function(e,t){typeof e==`string`&&(t?(t=t.crossOrigin,t=typeof t==`string`?t===`use-credentials`?t:``:void 0):t=null,i.d.C(e,t))},e.prefetchDNS=function(e){typeof e==`string`&&i.d.D(e)},e.preinit=function(e,t){if(typeof e==`string`&&t&&typeof t.as==`string`){var n=t.as,r=c(n,t.crossOrigin),a=typeof t.integrity==`string`?t.integrity:void 0,o=typeof t.fetchPriority==`string`?t.fetchPriority:void 0;n===`style`?i.d.S(e,typeof t.precedence==`string`?t.precedence:void 0,{crossOrigin:r,integrity:a,fetchPriority:o}):n===`script`&&i.d.X(e,{crossOrigin:r,integrity:a,fetchPriority:o,nonce:typeof t.nonce==`string`?t.nonce:void 0})}},e.preinitModule=function(e,t){if(typeof e==`string`)if(typeof t==`object`&&t){if(t.as==null||t.as===`script`){var n=c(t.as,t.crossOrigin);i.d.M(e,{crossOrigin:n,integrity:typeof t.integrity==`string`?t.integrity:void 0,nonce:typeof t.nonce==`string`?t.nonce:void 0})}}else t??i.d.M(e)},e.preload=function(e,t){if(typeof e==`string`&&typeof t==`object`&&t&&typeof t.as==`string`){var n=t.as,r=c(n,t.crossOrigin);i.d.L(e,n,{crossOrigin:r,integrity:typeof t.integrity==`string`?t.integrity:void 0,nonce:typeof t.nonce==`string`?t.nonce:void 0,type:typeof t.type==`string`?t.type:void 0,fetchPriority:typeof t.fetchPriority==`string`?t.fetchPriority:void 0,referrerPolicy:typeof t.referrerPolicy==`string`?t.referrerPolicy:void 0,imageSrcSet:typeof t.imageSrcSet==`string`?t.imageSrcSet:void 0,imageSizes:typeof t.imageSizes==`string`?t.imageSizes:void 0,media:typeof t.media==`string`?t.media:void 0})}},e.preloadModule=function(e,t){if(typeof e==`string`)if(t){var n=c(t.as,t.crossOrigin);i.d.m(e,{as:typeof t.as==`string`&&t.as!==`script`?t.as:void 0,crossOrigin:n,integrity:typeof t.integrity==`string`?t.integrity:void 0})}else i.d.m(e)},e.requestFormReset=function(e){i.d.r(e)},e.unstable_batchedUpdates=function(e,t){return e(t)},e.useFormState=function(e,t,n){return s.H.useFormState(e,t,n)},e.useFormStatus=function(){return s.H.useHostTransitionStatus()},e.version=`19.2.5`})),_=s(((e,t)=>{function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>`u`||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!=`function`))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(e){console.error(e)}}n(),t.exports=g()})),v=s((e=>{var t=h(),n=p(),r=_();function i(e){var t=`https://react.dev/errors/`+e;if(1<arguments.length){t+=`?args[]=`+encodeURIComponent(arguments[1]);for(var n=2;n<arguments.length;n++)t+=`&args[]=`+encodeURIComponent(arguments[n])}return`Minified React error #`+e+`; visit `+t+` for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`}function a(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function o(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,t.flags&4098&&(n=t.return),e=t.return;while(e)}return t.tag===3?n:null}function s(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function c(e){if(e.tag===31){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function l(e){if(o(e)!==e)throw Error(i(188))}function u(e){var t=e.alternate;if(!t){if(t=o(e),t===null)throw Error(i(188));return t===e?e:null}for(var n=e,r=t;;){var a=n.return;if(a===null)break;var s=a.alternate;if(s===null){if(r=a.return,r!==null){n=r;continue}break}if(a.child===s.child){for(s=a.child;s;){if(s===n)return l(a),e;if(s===r)return l(a),t;s=s.sibling}throw Error(i(188))}if(n.return!==r.return)n=a,r=s;else{for(var c=!1,u=a.child;u;){if(u===n){c=!0,n=a,r=s;break}if(u===r){c=!0,r=a,n=s;break}u=u.sibling}if(!c){for(u=s.child;u;){if(u===n){c=!0,n=s,r=a;break}if(u===r){c=!0,r=s,n=a;break}u=u.sibling}if(!c)throw Error(i(189))}}if(n.alternate!==r)throw Error(i(190))}if(n.tag!==3)throw Error(i(188));return n.stateNode.current===n?e:t}function d(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=d(e),t!==null)return t;e=e.sibling}return null}var f=Object.assign,m=Symbol.for(`react.element`),g=Symbol.for(`react.transitional.element`),v=Symbol.for(`react.portal`),y=Symbol.for(`react.fragment`),b=Symbol.for(`react.strict_mode`),x=Symbol.for(`react.profiler`),S=Symbol.for(`react.consumer`),C=Symbol.for(`react.context`),w=Symbol.for(`react.forward_ref`),T=Symbol.for(`react.suspense`),E=Symbol.for(`react.suspense_list`),D=Symbol.for(`react.memo`),O=Symbol.for(`react.lazy`),k=Symbol.for(`react.activity`),A=Symbol.for(`react.memo_cache_sentinel`),j=Symbol.iterator;function M(e){return typeof e!=`object`||!e?null:(e=j&&e[j]||e[`@@iterator`],typeof e==`function`?e:null)}var N=Symbol.for(`react.client.reference`);function P(e){if(e==null)return null;if(typeof e==`function`)return e.$$typeof===N?null:e.displayName||e.name||null;if(typeof e==`string`)return e;switch(e){case y:return`Fragment`;case x:return`Profiler`;case b:return`StrictMode`;case T:return`Suspense`;case E:return`SuspenseList`;case k:return`Activity`}if(typeof e==`object`)switch(e.$$typeof){case v:return`Portal`;case C:return e.displayName||`Context`;case S:return(e._context.displayName||`Context`)+`.Consumer`;case w:var t=e.render;return e=e.displayName,e||=(e=t.displayName||t.name||``,e===``?`ForwardRef`:`ForwardRef(`+e+`)`),e;case D:return t=e.displayName||null,t===null?P(e.type)||`Memo`:t;case O:t=e._payload,e=e._init;try{return P(e(t))}catch{}}return null}var F=Array.isArray,ee=n.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,I=r.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,te={pending:!1,data:null,method:null,action:null},ne=[],re=-1;function ie(e){return{current:e}}function ae(e){0>re||(e.current=ne[re],ne[re]=null,re--)}function oe(e,t){re++,ne[re]=e.current,e.current=t}var se=ie(null),ce=ie(null),le=ie(null),ue=ie(null);function de(e,t){switch(oe(le,t),oe(ce,e),oe(se,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?ef(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=ef(t),e=tf(t,e);else switch(e){case`svg`:e=1;break;case`math`:e=2;break;default:e=0}}ae(se),oe(se,e)}function fe(){ae(se),ae(ce),ae(le)}function L(e){e.memoizedState!==null&&oe(ue,e);var t=se.current,n=tf(t,e.type);t!==n&&(oe(ce,e),oe(se,n))}function pe(e){ce.current===e&&(ae(se),ae(ce)),ue.current===e&&(ae(ue),dp._currentValue=te)}var me,he;function ge(e){if(me===void 0)try{throw Error()}catch(e){var t=e.stack.trim().match(/\n( *(at )?)/);me=t&&t[1]||``,he=-1<e.stack.indexOf(` 2 at`)?` (<anonymous>)`:-1<e.stack.indexOf(`@`)?`@unknown:0:0`:``}return` 3`+me+e+he}var _e=!1;function ve(e,t){if(!e||_e)return``;_e=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var r={DetermineComponentFrameRoot:function(){try{if(t){var n=function(){throw Error()};if(Object.defineProperty(n.prototype,`props`,{set:function(){throw Error()}}),typeof Reflect==`object`&&Reflect.construct){try{Reflect.construct(n,[])}catch(e){var r=e}Reflect.construct(e,[],n)}
vendor: 6,582 bytes, lines 3-8
3else{try{n.call()}catch(e){r=e}e.call(n.prototype)}}else{try{throw Error()}catch(e){r=e}(n=e())&&typeof n.catch==`function`&&n.catch(function(){})}}catch(e){if(e&&r&&typeof e.stack==`string`)return[e.stack,r.stack]}return[null,null]}};r.DetermineComponentFrameRoot.displayName=`DetermineComponentFrameRoot`;var i=Object.getOwnPropertyDescriptor(r.DetermineComponentFrameRoot,`name`);i&&i.configurable&&Object.defineProperty(r.DetermineComponentFrameRoot,`name`,{value:`DetermineComponentFrameRoot`});var a=r.DetermineComponentFrameRoot(),o=a[0],s=a[1];if(o&&s){var c=o.split(` 4`),l=s.split(` 5`);for(i=r=0;r<c.length&&!c[r].includes(`DetermineComponentFrameRoot`);)r++;for(;i<l.length&&!l[i].includes(`DetermineComponentFrameRoot`);)i++;if(r===c.length||i===l.length)for(r=c.length-1,i=l.length-1;1<=r&&0<=i&&c[r]!==l[i];)i--;for(;1<=r&&0<=i;r--,i--)if(c[r]!==l[i]){if(r!==1||i!==1)do if(r--,i--,0>i||c[r]!==l[i]){var u=` 6`+c[r].replace(` at new `,` at `);return e.displayName&&u.includes(`<anonymous>`)&&(u=u.replace(`<anonymous>`,e.displayName)),u}while(1<=r&&0<=i);break}}}finally{_e=!1,Error.prepareStackTrace=n}return(n=e?e.displayName||e.name:``)?ge(n):``}function ye(e,t){switch(e.tag){case 26:case 27:case 5:return ge(e.type);case 16:return ge(`Lazy`);case 13:return e.child!==t&&t!==null?ge(`Suspense Fallback`):ge(`Suspense`);case 19:return ge(`SuspenseList`);case 0:case 15:return ve(e.type,!1);case 11:return ve(e.type.render,!1);case 1:return ve(e.type,!0);case 31:return ge(`Activity`);default:return``}}function be(e){try{var t=``,n=null;do t+=ye(e,n),n=e,e=e.return;while(e);return t}catch(e){return` 7Error generating stack: `+e.message+` 8`+e.stack}}var xe=Object.prototype.hasOwnProperty,Se=t.unstable_scheduleCallback,Ce=t.unstable_cancelCallback,we=t.unstable_shouldYield,Te=t.unstable_requestPaint,Ee=t.unstable_now,De=t.unstable_getCurrentPriorityLevel,Oe=t.unstable_ImmediatePriority,ke=t.unstable_UserBlockingPriority,Ae=t.unstable_NormalPriority,je=t.unstable_LowPriority,Me=t.unstable_IdlePriority,Ne=t.log,Pe=t.unstable_setDisableYieldValue,Fe=null,Ie=null;function Le(e){if(typeof Ne==`function`&&Pe(e),Ie&&typeof Ie.setStrictMode==`function`)try{Ie.setStrictMode(Fe,e)}catch{}}var Re=Math.clz32?Math.clz32:Ve,ze=Math.log,Be=Math.LN2;function Ve(e){return e>>>=0,e===0?32:31-(ze(e)/Be|0)|0}var He=256,Ue=262144,We=4194304;function Ge(e){var t=e&42;if(t!==0)return t;switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return e&261888;case 262144:case 524288:case 1048576:case 2097152:return e&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return e&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return e}}function Ke(e,t,n){var r=e.pendingLanes;if(r===0)return 0;var i=0,a=e.suspendedLanes,o=e.pingedLanes;e=e.warmLanes;var s=r&134217727;return s===0?(s=r&~a,s===0?o===0?n||(n=r&~e,n!==0&&(i=Ge(n))):i=Ge(o):i=Ge(s)):(r=s&~a,r===0?(o&=s,o===0?n||(n=s&~e,n!==0&&(i=Ge(n))):i=Ge(o)):i=Ge(r)),i===0?0:t!==0&&t!==i&&(t&a)===0&&(a=i&-i,n=t&-t,a>=n||a===32&&n&4194048)?t:i}function qe(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function Je(e,t){switch(e){case 1:case 2:case 4:case 8:case 64:return t+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function Ye(){var e=We;return We<<=1,!(We&62914560)&&(We=4194304),e}function Xe(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function Ze(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function Qe(e,t,n,r,i,a){var o=e.pendingLanes;e.pendingLanes=n,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=n,e.entangledLanes&=n,e.errorRecoveryDisabledLanes&=n,e.shellSuspendCounter=0;var s=e.entanglements,c=e.expirationTimes,l=e.hiddenUpdates;for(n=o&~n;0<n;){var u=31-Re(n),d=1<<u;s[u]=0,c[u]=-1;var f=l[u];if(f!==null)for(l[u]=null,u=0;u<f.length;u++){var p=f[u];p!==null&&(p.lane&=-536870913)}n&=~d}r!==0&&$e(e,r,0),a!==0&&i===0&&e.tag!==0&&(e.suspendedLanes|=a&~(o&~t))}function $e(e,t,n){e.pendingLanes|=t,e.suspendedLanes&=~t;var r=31-Re(t);e.entangledLanes|=t,e.entanglements[r]=e.entanglements[r]|1073741824|n&261930}function et(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-Re(n),i=1<<r;i&t|e[r]&t&&(e[r]|=t),n&=~i}}function tt(e,t){var n=t&-t;return n=n&42?1:nt(n),(n&(e.suspendedLanes|t))===0?n:0}function nt(e){switch(e){case 2:e=1;break;case 8:e=4;break;case 32:e=16;break;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:e=128;break;case 268435456:e=134217728;break;default:e=0}return e}function rt(e){return e&=-e,2<e?8<e?e&134217727?32:268435456:8:2}function it(){var e=I.p;return e===0?(e=window.event,e===void 0?32:Dp(e.type)):e}function at(e,t){var n=I.p;try{return I.p=e,t()}finally{I.p=n}}var ot=Math.random().toString(36).slice(2),st=`__reactFiber$`+ot,ct=`__reactProps$`+ot,lt=`__reactContainer$`+ot,ut=`__reactEvents$`+ot,dt=`__reactListeners$`+ot,ft=`__reactHandles$`+ot,pt=`__reactResources$`+ot,mt=`__reactMarker$`+ot;function ht(e){delete e[st],delete e[ct],delete e[ut],delete e[dt],delete e[ft]}function gt(e){var t=e[st];if(t)return t;for(var n=e.parentNode;n;){if(t=n[lt]||n[st]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=wf(e);e!==null;){if(n=e[st])return n;e=wf(e)}return t}e=n,n=e.parentNode}return null}function _t(e){if(e=e[st]||e[lt]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function vt(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(i(33))}function yt(e){var t=e[pt];return t||=e[pt]={hoistableStyles:new Map,hoistableScripts:new Map},t}function bt(e){e[mt]=!0}var xt=new Set,St={};function Ct(e,t){wt(e,t),wt(e+`Capture`,t)}function wt(e,t){for(St[e]=t,e=0;e<t.length;e++)xt.add(t[e])}var Tt=RegExp(`^[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u
8037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD][:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$`),Et={},Dt={};function Ot(e){return xe.call(Dt,e)?!0:xe.call(Et,e)?!1:Tt.test(e)?Dt[e]=!0:(Et[e]=!0,!1)}function kt(e,t,n){if(Ot(t))if(n===null)e.removeAttribute(t);else{switch(typeof n){case`undefined`:case`function`:case`symbol`:e.removeAttribute(t);return;case`boolean`:var r=t.toLowerCase().slice(0,5);if(r!==`data-`&&r!==`aria-`){e.removeAttribute(t);return}}e.setAttribute(t,``+n)}}function At(e,t,n){if(n===null)e.removeAttribute(t);else{switch(typeof n){case`undefined`:case`function`:case`symbol`:case`boolean`:e.removeAttribute(t);return}e.setAttribute(t,``+n)}}function jt(e,t,n,r){if(r===null)e.removeAttribute(n);else{switch(typeof r){case`undefined`:case`function`:case`symbol`:case`boolean`:e.removeAttribute(n);return}e.setAttributeNS(t,n,``+r)}}function Mt(e){switch(typeof e){case`bigint`:case`boolean`:case`number`:case`string`:case`undefined`:return e;case`object`:return e;default:return``}}function Nt(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()===`input`&&(t===`checkbox`||t===`radio`)}function Pt(e,t,n){var r=Object.getOwnPropertyDescriptor(e.constructor.prototype,t);if(!e.hasOwnProperty(t)&&r!==void 0&&typeof r.get==`function`&&typeof r.set==`function`){var i=r.get,a=r.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(e){n=``+e,a.call(this,e)}}),Object.defineProperty(e,t,{enumerable:r.enumerable}),{getValue:function(){return n},setValue:function(e){n=``+e},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Ft(e){if(!e._valueTracker){var t=Nt(e)?`checked`:`value`;e._valueTracker=Pt(e,t,``+e[t])}}function It(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r=``;return e&&(r=Nt(e)?e.checked?`true`:`false`:e.value),e=r,e===n?!1:(t.setValue(e),!0)}function Lt(e){if(e||=typeof document<`u`?document:void 0,e===void 0)return null;try{return e.activeElement||e.body}catch{return e.body}}var Rt=/[\n"\\]/g;function zt(e){return e.replace(Rt,function(e){return`\\`+e.charCodeAt(0).toString(16)+` `})}function Bt(e,t,n,r,i,a,o,s){e.name=``,o!=null&&typeof o!=`function`&&typeof o!=`symbol`&&typeof o!=`boolean`?e.type=o:e.removeAttribute(`type`),t==null?o!==`submit`&&o!==`reset`||e.removeAttribute(`value`):o===`number`?(t===0&&e.value===``||e.value!=t)&&(e.value=``+Mt(t)):e.value!==``+Mt(t)&&(e.value=``+Mt(t)),t==null?n==null?r!=null&&e.removeAttribute(`value`):Ht(e,o,Mt(n)):Ht(e,o,Mt(t)),i==null&&a!=null&&(e.defaultChecked=!!a),i!=null&&(e.checked=i&&typeof i!=`function`&&typeof i!=`symbol`),s!=null&&typeof s!=`function`&&typeof s!=`symbol`&&typeof s!=`boolean`?e.name=``+Mt(s):e.removeAttribute(`name`)}function Vt(e,t,n,r,i,a,o,s){if(a!=null&&typeof a!=`function`&&typeof a!=`symbol`&&typeof a!=`boolean`&&(e.type=a),t!=null||n!=null){if(!(a!==`submit`&&a!==`reset`||t!=null)){Ft(e);return}n=n==null?``:``+Mt(n),t=t==null?n:``+Mt(t),s||t===e.value||(e.value=t),e.defaultValue=t}r??=i,r=typeof r!=`function`&&typeof r!=`symbol`&&!!r,e.checked=s?e.checked:!!r,e.defaultChecked=!!r,o!=null&&typeof o!=`function`&&typeof o!=`symbol`&&typeof o!=`boolean`&&(e.name=o),Ft(e)}function Ht(e,t,n){t===`number`&&Lt(e.ownerDocument)===e||e.defaultValue===``+n||(e.defaultValue=``+n)}function Ut(e,t,n,r){if(e=e.options,t){t={};for(var i=0;i<n.length;i++)t[`$`+n[i]]=!0;for(n=0;n<e.length;n++)i=t.hasOwnProperty(`$`+e[n].value),e[n].selected!==i&&(e[n].selected=i),i&&r&&(e[n].defaultSelected=!0)}else{for(n=``+Mt(n),t=null,i=0;i<e.length;i++){if(e[i].value===n){e[i].selected=!0,r&&(e[i].defaultSelected=!0);return}t!==null||e[i].disabled||(t=e[i])}t!==null&&(t.selected=!0)}}function Wt(e,t,n){if(t!=null&&(t=``+Mt(t),t!==e.value&&(e.value=t),n==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=n==null?``:``+Mt(n)}function Gt(e,t,n,r){if(t==null){if(r!=null){if(n!=null)throw Error(i(92));if(F(r)){if(1<r.length)throw Error(i(93));r=r[0]}n=r}n??=``,t=n}
vendor: 87,520 bytes, line 8
8n=Mt(t),e.defaultValue=n,r=e.textContent,r===n&&r!==``&&r!==null&&(e.value=r),Ft(e)}function Kt(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var qt=new Set(`animationIterationCount aspectRatio borderImageOutset borderImageSlice borderImageWidth boxFlex boxFlexGroup boxOrdinalGroup columnCount columns flex flexGrow flexPositive flexShrink flexNegative flexOrder gridArea gridRow gridRowEnd gridRowSpan gridRowStart gridColumn gridColumnEnd gridColumnSpan gridColumnStart fontWeight lineClamp lineHeight opacity order orphans scale tabSize widows zIndex zoom fillOpacity floodOpacity stopOpacity strokeDasharray strokeDashoffset strokeMiterlimit strokeOpacity strokeWidth MozAnimationIterationCount MozBoxFlex MozBoxFlexGroup MozLineClamp msAnimationIterationCount msFlex msZoom msFlexGrow msFlexNegative msFlexOrder msFlexPositive msFlexShrink msGridColumn msGridColumnSpan msGridRow msGridRowSpan WebkitAnimationIterationCount WebkitBoxFlex WebKitBoxFlexGroup WebkitBoxOrdinalGroup WebkitColumnCount WebkitColumns WebkitFlex WebkitFlexGrow WebkitFlexPositive WebkitFlexShrink WebkitLineClamp`.split(` `));function Jt(e,t,n){var r=t.indexOf(`--`)===0;n==null||typeof n==`boolean`||n===``?r?e.setProperty(t,``):t===`float`?e.cssFloat=``:e[t]=``:r?e.setProperty(t,n):typeof n!=`number`||n===0||qt.has(t)?t===`float`?e.cssFloat=n:e[t]=(``+n).trim():e[t]=n+`px`}function Yt(e,t,n){if(t!=null&&typeof t!=`object`)throw Error(i(62));if(e=e.style,n!=null){for(var r in n)!n.hasOwnProperty(r)||t!=null&&t.hasOwnProperty(r)||(r.indexOf(`--`)===0?e.setProperty(r,``):r===`float`?e.cssFloat=``:e[r]=``);for(var a in t)r=t[a],t.hasOwnProperty(a)&&n[a]!==r&&Jt(e,a,r)}else for(var o in t)t.hasOwnProperty(o)&&Jt(e,o,t[o])}function Xt(e){if(e.indexOf(`-`)===-1)return!1;switch(e){case`annotation-xml`:case`color-profile`:case`font-face`:case`font-face-src`:case`font-face-uri`:case`font-face-format`:case`font-face-name`:case`missing-glyph`:return!1;default:return!0}}var Zt=new Map([[`acceptCharset`,`accept-charset`],[`htmlFor`,`for`],[`httpEquiv`,`http-equiv`],[`crossOrigin`,`crossorigin`],[`accentHeight`,`accent-height`],[`alignmentBaseline`,`alignment-baseline`],[`arabicForm`,`arabic-form`],[`baselineShift`,`baseline-shift`],[`capHeight`,`cap-height`],[`clipPath`,`clip-path`],[`clipRule`,`clip-rule`],[`colorInterpolation`,`color-interpolation`],[`colorInterpolationFilters`,`color-interpolation-filters`],[`colorProfile`,`color-profile`],[`colorRendering`,`color-rendering`],[`dominantBaseline`,`dominant-baseline`],[`enableBackground`,`enable-background`],[`fillOpacity`,`fill-opacity`],[`fillRule`,`fill-rule`],[`floodColor`,`flood-color`],[`floodOpacity`,`flood-opacity`],[`fontFamily`,`font-family`],[`fontSize`,`font-size`],[`fontSizeAdjust`,`font-size-adjust`],[`fontStretch`,`font-stretch`],[`fontStyle`,`font-style`],[`fontVariant`,`font-variant`],[`fontWeight`,`font-weight`],[`glyphName`,`glyph-name`],[`glyphOrientationHorizontal`,`glyph-orientation-horizontal`],[`glyphOrientationVertical`,`glyph-orientation-vertical`],[`horizAdvX`,`horiz-adv-x`],[`horizOriginX`,`horiz-origin-x`],[`imageRendering`,`image-rendering`],[`letterSpacing`,`letter-spacing`],[`lightingColor`,`lighting-color`],[`markerEnd`,`marker-end`],[`markerMid`,`marker-mid`],[`markerStart`,`marker-start`],[`overlinePosition`,`overline-position`],[`overlineThickness`,`overline-thickness`],[`paintOrder`,`paint-order`],[`panose-1`,`panose-1`],[`pointerEvents`,`pointer-events`],[`renderingIntent`,`rendering-intent`],[`shapeRendering`,`shape-rendering`],[`stopColor`,`stop-color`],[`stopOpacity`,`stop-opacity`],[`strikethroughPosition`,`strikethrough-position`],[`strikethroughThickness`,`strikethrough-thickness`],[`strokeDasharray`,`stroke-dasharray`],[`strokeDashoffset`,`stroke-dashoffset`],[`strokeLinecap`,`stroke-linecap`],[`strokeLinejoin`,`stroke-linejoin`],[`strokeMiterlimit`,`stroke-miterlimit`],[`strokeOpacity`,`stroke-opacity`],[`strokeWidth`,`stroke-width`],[`textAnchor`,`text-anchor`],[`textDecoration`,`text-decoration`],[`textRendering`,`text-rendering`],[`transformOrigin`,`transform-origin`],[`underlinePosition`,`underline-position`],[`underlineThickness`,`underline-thickness`],[`unicodeBidi`,`unicode-bidi`],[`unicodeRange`,`unicode-range`],[`unitsPerEm`,`units-per-em`],[`vAlphabetic`,`v-alphabetic`],[`vHanging`,`v-hanging`],[`vIdeographic`,`v-ideographic`],[`vMathematical`,`v-mathematical`],[`vectorEffect`,`vector-effect`],[`vertAdvY`,`vert-adv-y`],[`vertOriginX`,`vert-origin-x`],[`vertOriginY`,`vert-origin-y`],[`wordSpacing`,`word-spacing`],[`writingMode`,`writing-mode`],[`xmlnsXlink`,`xmlns:xlink`],[`xHeight`,`x-height`]]),Qt=/^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*:/i;function $t(e){return Qt.test(``+e)?`javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')`:e}function en(){}var tn=null;function nn(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var rn=null,an=null;function on(e){var t=_t(e);if(t&&(e=t.stateNode)){var n=e[ct]||null;a:switch(e=t.stateNode,t.type){case`input`:if(Bt(e,n.value,n.defaultValue,n.defaultValue,n.checked,n.defaultChecked,n.type,n.name),t=n.name,n.type===`radio`&&t!=null){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll(`input[name="`+zt(``+t)+`"][type="radio"]`),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var a=r[ct]||null;if(!a)throw Error(i(90));Bt(r,a.value,a.defaultValue,a.defaultValue,a.checked,a.defaultChecked,a.type,a.name)}}for(t=0;t<n.length;t++)r=n[t],r.form===e.form&&It(r)}break a;case`textarea`:Wt(e,n.value,n.defaultValue);break a;case`select`:t=n.value,t!=null&&Ut(e,!!n.multiple,t,!1)}}}var sn=!1;function cn(e,t,n){if(sn)return e(t,n);sn=!0;try{return e(t)}finally{if(sn=!1,(rn!==null||an!==null)&&(Au(),rn&&(t=rn,e=an,an=rn=null,on(t),e)))for(t=0;t<e.length;t++)on(e[t])}}function ln(e,t){var n=e.stateNode;if(n===null)return null;var r=n[ct]||null;if(r===null)return null;n=r[t];a:switch(t){case`onClick`:case`onClickCapture`:case`onDoubleClick`:case`onDoubleClickCapture`:case`onMouseDown`:case`onMouseDownCapture`:case`onMouseMove`:case`onMouseMoveCapture`:case`onMouseUp`:case`onMouseUpCapture`:case`onMouseEnter`:(r=!r.disabled)||(e=e.type,r=!(e===`button`||e===`input`||e===`select`||e===`textarea`)),e=!r;break a;default:e=!1}if(e)return null;if(n&&typeof n!=`function`)throw Error(i(231,t,typeof n));return n}var un=!(typeof window>`u`||window.document===void 0||window.document.createElement===void 0),dn=!1;if(un)try{var fn={};Object.defineProperty(fn,`passive`,{get:function(){dn=!0}}),window.addEventListener(`test`,fn,fn),window.removeEventListener(`test`,fn,fn)}catch{dn=!1}var pn=null,mn=null,hn=null;function gn(){if(hn)return hn;var e,t=mn,n=t.length,r,i=`value`in pn?pn.value:pn.textContent,a=i.length;for(e=0;e<n&&t[e]===i[e];e++);var o=n-e;for(r=1;r<=o&&t[n-r]===i[a-r];r++);return hn=i.slice(e,1<r?1-r:void 0)}function _n(e){var t=e.keyCode;return`charCode`in e?(e=e.charCode,e===0&&t===13&&(e=13)):e=t,e===10&&(e=13),32<=e||e===13?e:0}function vn(){return!0}function yn(){return!1}function bn(e){function t(t,n,r,i,a){for(var o in this._reactName=t,this._targetInst=r,this.type=n,this.nativeEvent=i,this.target=a,this.currentTarget=null,e)e.hasOwnProperty(o)&&(t=e[o],this[o]=t?t(i):i[o]);return this.isDefaultPrevented=(i.defaultPrevented==null?!1===i.returnValue:i.defaultPrevented)?vn:yn,this.isPropagationStopped=yn,this}return f(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var e=this.nativeEvent;e&&(e.preventDefault?e.preventDefault():typeof e.returnValue!=`unknown`&&(e.returnValue=!1),this.isDefaultPrevented=vn)},stopPropagation:function(){var e=this.nativeEvent;e&&(e.stopPropagation?e.stopPropagation():typeof e.cancelBubble!=`unknown`&&(e.cancelBubble=!0),this.isPropagationStopped=vn)},persist:function(){},isPersistent:vn}),t}var xn={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Sn=bn(xn),Cn=f({},xn,{view:0,detail:0}),wn=bn(Cn),Tn,En,Dn,On=f({},Cn,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:zn,button:0,buttons:0,relatedTarget:function(e){return e.relatedTarget===void 0?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return`movementX`in e?e.movementX:(e!==Dn&&(Dn&&e.type===`mousemove`?(Tn=e.screenX-Dn.screenX,En=e.screenY-Dn.screenY):En=Tn=0,Dn=e),Tn)},movementY:function(e){return`movementY`in e?e.movementY:En}}),kn=bn(On),An=bn(f({},On,{dataTransfer:0})),jn=bn(f({},Cn,{relatedTarget:0})),Mn=bn(f({},xn,{animationName:0,elapsedTime:0,pseudoElement:0})),Nn=bn(f({},xn,{clipboardData:function(e){return`clipboardData`in e?e.clipboardData:window.clipboardData}})),Pn=bn(f({},xn,{data:0})),Fn={Esc:`Escape`,Spacebar:` `,Left:`ArrowLeft`,Up:`ArrowUp`,Right:`ArrowRight`,Down:`ArrowDown`,Del:`Delete`,Win:`OS`,Menu:`ContextMenu`,Apps:`ContextMenu`,Scroll:`ScrollLock`,MozPrintableKey:`Unidentified`},In={8:`Backspace`,9:`Tab`,12:`Clear`,13:`Enter`,16:`Shift`,17:`Control`,18:`Alt`,19:`Pause`,20:`CapsLock`,27:`Escape`,32:` `,33:`PageUp`,34:`PageDown`,35:`End`,36:`Home`,37:`ArrowLeft`,38:`ArrowUp`,39:`ArrowRight`,40:`ArrowDown`,45:`Insert`,46:`Delete`,112:`F1`,113:`F2`,114:`F3`,115:`F4`,116:`F5`,117:`F6`,118:`F7`,119:`F8`,120:`F9`,121:`F10`,122:`F11`,123:`F12`,144:`NumLock`,145:`ScrollLock`,224:`Meta`},Ln={Alt:`altKey`,Control:`ctrlKey`,Meta:`metaKey`,Shift:`shiftKey`};function Rn(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=Ln[e])?!!t[e]:!1}function zn(){return Rn}var Bn=bn(f({},Cn,{key:function(e){if(e.key){var t=Fn[e.key]||e.key;if(t!==`Unidentified`)return t}return e.type===`keypress`?(e=_n(e),e===13?`Enter`:String.fromCharCode(e)):e.type===`keydown`||e.type===`keyup`?In[e.keyCode]||`Unidentified`:``},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:zn,charCode:function(e){return e.type===`keypress`?_n(e):0},keyCode:function(e){return e.type===`keydown`||e.type===`keyup`?e.keyCode:0},which:function(e){return e.type===`keypress`?_n(e):e.type===`keydown`||e.type===`keyup`?e.keyCode:0}})),Vn=bn(f({},On,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0})),Hn=bn(f({},Cn,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:zn})),Un=bn(f({},xn,{propertyName:0,elapsedTime:0,pseudoElement:0})),Wn=bn(f({},On,{deltaX:function(e){return`deltaX`in e?e.deltaX:`wheelDeltaX`in e?-e.wheelDeltaX:0},deltaY:function(e){return`deltaY`in e?e.deltaY:`wheelDeltaY`in e?-e.wheelDeltaY:`wheelDelta`in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0})),Gn=bn(f({},xn,{newState:0,oldState:0})),Kn=[9,13,27,32],qn=un&&`CompositionEvent`in window,Jn=null;un&&`documentMode`in document&&(Jn=document.documentMode);var Yn=un&&`TextEvent`in window&&!Jn,Xn=un&&(!qn||Jn&&8<Jn&&11>=Jn),Zn=` `,Qn=!1;function $n(e,t){switch(e){case`keyup`:return Kn.indexOf(t.keyCode)!==-1;case`keydown`:return t.keyCode!==229;case`keypress`:case`mousedown`:case`focusout`:return!0;default:return!1}}function er(e){return e=e.detail,typeof e==`object`&&`data`in e?e.data:null}var tr=!1;function nr(e,t){switch(e){case`compositionend`:return er(t);case`keypress`:return t.which===32?(Qn=!0,Zn):null;case`textInput`:return e=t.data,e===Zn&&Qn?null:e;default:return null}}function rr(e,t){if(tr)return e===`compositionend`||!qn&&$n(e,t)?(e=gn(),hn=mn=pn=null,tr=!1,e):null;switch(e){case`paste`:return null;case`keypress`:if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case`compositionend`:return Xn&&t.locale!==`ko`?null:t.data;default:return null}}var ir={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function ar(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t===`input`?!!ir[e.type]:t===`textarea`}function or(e,t,n,r){rn?an?an.push(r):an=[r]:rn=r,t=Rd(t,`onChange`),0<t.length&&(n=new Sn(`onChange`,`change`,null,n,r),e.push({event:n,listeners:t}))}var sr=null,cr=null;function lr(e){Ad(e,0)}function ur(e){if(It(vt(e)))return e}function dr(e,t){if(e===`change`)return t}var fr=!1;if(un){var pr;if(un){var mr=`oninput`in document;if(!mr){var hr=document.createElement(`div`);hr.setAttribute(`oninput`,`return;`),mr=typeof hr.oninput==`function`}pr=mr}else pr=!1;fr=pr&&(!document.documentMode||9<document.documentMode)}function gr(){sr&&(sr.detachEvent(`onpropertychange`,_r),cr=sr=null)}function _r(e){if(e.propertyName===`value`&&ur(cr)){var t=[];or(t,cr,e,nn(e)),cn(lr,t)}}function vr(e,t,n){e===`focusin`?(gr(),sr=t,cr=n,sr.attachEvent(`onpropertychange`,_r)):e===`focusout`&&gr()}function yr(e){if(e===`selectionchange`||e===`keyup`||e===`keydown`)return ur(cr)}function br(e,t){if(e===`click`)return ur(t)}function xr(e,t){if(e===`input`||e===`change`)return ur(t)}function Sr(e,t){return e===t&&(e!==0||1/e==1/t)||e!==e&&t!==t}var Cr=typeof Object.is==`function`?Object.is:Sr;function wr(e,t){if(Cr(e,t))return!0;if(typeof e!=`object`||!e||typeof t!=`object`||!t)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++){var i=n[r];if(!xe.call(t,i)||!Cr(e[i],t[i]))return!1}return!0}function Tr(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Er(e,t){var n=Tr(e);e=0;for(var r;n;){if(n.nodeType===3){if(r=e+n.textContent.length,e<=t&&r>=t)return{node:n,offset:t-e};e=r}a:{for(;n;){if(n.nextSibling){n=n.nextSibling;break a}n=n.parentNode}n=void 0}n=Tr(n)}}function Dr(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Dr(e,t.parentNode):`contains`in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Or(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=Lt(e.document);t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href==`string`}catch{n=!1}if(n)e=t.contentWindow;else break;t=Lt(e.document)}return t}function kr(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t===`input`&&(e.type===`text`||e.type===`search`||e.type===`tel`||e.type===`url`||e.type===`password`)||t===`textarea`||e.contentEditable===`true`)}var Ar=un&&`documentMode`in document&&11>=document.documentMode,jr=null,Mr=null,Nr=null,Pr=!1;function Fr(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Pr||jr==null||jr!==Lt(r)||(r=jr,`selectionStart`in r&&kr(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),Nr&&wr(Nr,r)||(Nr=r,r=Rd(Mr,`onSelect`),0<r.length&&(t=new Sn(`onSelect`,`select`,null,t,n),e.push({event:t,listeners:r}),t.target=jr)))}function Ir(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n[`Webkit`+e]=`webkit`+t,n[`Moz`+e]=`moz`+t,n}var Lr={animationend:Ir(`Animation`,`AnimationEnd`),animationiteration:Ir(`Animation`,`AnimationIteration`),animationstart:Ir(`Animation`,`AnimationStart`),transitionrun:Ir(`Transition`,`TransitionRun`),transitionstart:Ir(`Transition`,`TransitionStart`),transitioncancel:Ir(`Transition`,`TransitionCancel`),transitionend:Ir(`Transition`,`TransitionEnd`)},Rr={},zr={};un&&(zr=document.createElement(`div`).style,`AnimationEvent`in window||(delete Lr.animationend.animation,delete Lr.animationiteration.animation,delete Lr.animationstart.animation),`TransitionEvent`in window||delete Lr.transitionend.transition);function Br(e){if(Rr[e])return Rr[e];if(!Lr[e])return e;var t=Lr[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in zr)return Rr[e]=t[n];return e}var Vr=Br(`animationend`),Hr=Br(`animationiteration`),Ur=Br(`animationstart`),Wr=Br(`transitionrun`),Gr=Br(`transitionstart`),Kr=Br(`transitioncancel`),qr=Br(`transitionend`),Jr=new Map,Yr=`abort auxClick beforeToggle cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel`.split(` `);Yr.push(`scrollEnd`);function Xr(e,t){Jr.set(e,t),Ct(t,[e])}var Zr=typeof reportError==`function`?reportError:function(e){if(typeof window==`object`&&typeof window.ErrorEvent==`function`){var t=new window.ErrorEvent(`error`,{bubbles:!0,cancelable:!0,message:typeof e==`object`&&e&&typeof e.message==`string`?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process==`object`&&typeof process.emit==`function`){process.emit(`uncaughtException`,e);return}console.error(e)},Qr=[],$r=0,ei=0;function ti(){for(var e=$r,t=ei=$r=0;t<e;){var n=Qr[t];Qr[t++]=null;var r=Qr[t];Qr[t++]=null;var i=Qr[t];Qr[t++]=null;var a=Qr[t];if(Qr[t++]=null,r!==null&&i!==null){var o=r.pending;o===null?i.next=i:(i.next=o.next,o.next=i),r.pending=i}a!==0&&ai(n,i,a)}}function ni(e,t,n,r){Qr[$r++]=e,Qr[$r++]=t,Qr[$r++]=n,Qr[$r++]=r,ei|=r,e.lanes|=r,e=e.alternate,e!==null&&(e.lanes|=r)}function ri(e,t,n,r){return ni(e,t,n,r),oi(e)}function ii(e,t){return ni(e,null,null,t),oi(e)}function ai(e,t,n){e.lanes|=n;var r=e.alternate;r!==null&&(r.lanes|=n);for(var i=!1,a=e.return;a!==null;)a.childLanes|=n,r=a.alternate,r!==null&&(r.childLanes|=n),a.tag===22&&(e=a.stateNode,e===null||e._visibility&1||(i=!0)),e=a,a=a.return;return e.tag===3?(a=e.stateNode,i&&t!==null&&(i=31-Re(n),e=a.hiddenUpdates,r=e[i],r===null?e[i]=[t]:r.push(t),t.lane=n|536870912),a):null}function oi(e){if(50<xu)throw xu=0,Su=null,Error(i(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var si={};function ci(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function li(e,t,n,r){return new ci(e,t,n,r)}function ui(e){return e=e.prototype,!(!e||!e.isReactComponent)}function di(e,t){var n=e.alternate;return n===null?(n=li(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&65011712,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n.refCleanup=e.refCleanup,n}function fi(e,t){e.flags&=65011714;var n=e.alternate;return n===null?(e.childLanes=0,e.lanes=t,e.child=null,e.subtreeFlags=0,e.memoizedProps=null,e.memoizedState=null,e.updateQueue=null,e.dependencies=null,e.stateNode=null):(e.childLanes=n.childLanes,e.lanes=n.lanes,e.child=n.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=n.memoizedProps,e.memoizedState=n.memoizedState,e.updateQueue=n.updateQueue,e.type=n.type,t=n.dependencies,e.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext}),e}function pi(e,t,n,r,a,o){var s=0;if(r=e,typeof e==`function`)ui(e)&&(s=1);else if(typeof e==`string`)s=np(e,n,se.current)?26:e===`html`||e===`head`||e===`body`?27:5;else a:switch(e){case k:return e=li(31,n,t,a),e.elementType=k,e.lanes=o,e;case y:return mi(n.children,a,o,t);case b:s=8,a|=24;break;case x:return e=li(12,n,t,a|2),e.elementType=x,e.lanes=o,e;case T:return e=li(13,n,t,a),e.elementType=T,e.lanes=o,e;case E:return e=li(19,n,t,a),e.elementType=E,e.lanes=o,e;default:if(typeof e==`object`&&e)switch(e.$$typeof){case C:s=10;break a;case S:s=9;break a;case w:s=11;break a;case D:s=14;break a;case O:s=16,r=null;break a}s=29,n=Error(i(130,e===null?`null`:typeof e,``)),r=null}return t=li(s,n,t,a),t.elementType=e,t.type=r,t.lanes=o,t}function mi(e,t,n,r){return e=li(7,e,r,t),e.lanes=n,e}function hi(e,t,n){return e=li(6,e,null,t),e.lanes=n,e}function gi(e){var t=li(18,null,null,0);return t.stateNode=e,t}function _i(e,t,n){return t=li(4,e.children===null?[]:e.children,e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var vi=new WeakMap;function yi(e,t){if(typeof e==`object`&&e){var n=vi.get(e);return n===void 0?(t={value:e,source:t,stack:be(t)},vi.set(e,t),t):n}return{value:e,source:t,stack:be(t)}}var bi=[],xi=0,Si=null,Ci=0,wi=[],Ti=0,Ei=null,Di=1,Oi=``;function ki(e,t){bi[xi++]=Ci,bi[xi++]=Si,Si=e,Ci=t}function Ai(e,t,n){wi[Ti++]=Di,wi[Ti++]=Oi,wi[Ti++]=Ei,Ei=e;var r=Di;e=Oi;var i=32-Re(r)-1;r&=~(1<<i),n+=1;var a=32-Re(t)+i;if(30<a){var o=i-i%5;a=(r&(1<<o)-1).toString(32),r>>=o,i-=o,Di=1<<32-Re(t)+i|n<<i|r,Oi=a+e}else Di=1<<a|n<<i|r,Oi=e}function ji(e){e.return!==null&&(ki(e,1),Ai(e,1,0))}function Mi(e){for(;e===Si;)Si=bi[--xi],bi[xi]=null,Ci=bi[--xi],bi[xi]=null;for(;e===Ei;)Ei=wi[--Ti],wi[Ti]=null,Oi=wi[--Ti],wi[Ti]=null,Di=wi[--Ti],wi[Ti]=null}function Ni(e,t){wi[Ti++]=Di,wi[Ti++]=Oi,wi[Ti++]=Ei,Di=t.id,Oi=t.overflow,Ei=e}var Pi=null,Fi=null,Ii=!1,Li=null,Ri=!1,zi=Error(i(519));function Bi(e){throw Ki(yi(Error(i(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?`text`:`HTML`,``)),e)),zi}function Vi(e){var t=e.stateNode,n=e.type,r=e.memoizedProps;switch(t[st]=e,t[ct]=r,n){case`dialog`:jd(`cancel`,t),jd(`close`,t);break;case`iframe`:case`object`:case`embed`:jd(`load`,t);break;case`video`:case`audio`:for(n=0;n<Od.length;n++)jd(Od[n],t);break;case`source`:jd(`error`,t);break;case`img`:case`image`:case`link`:jd(`error`,t),jd(`load`,t);break;case`details`:jd(`toggle`,t);break;case`input`:jd(`invalid`,t),Vt(t,r.value,r.defaultValue,r.checked,r.defaultChecked,r.type,r.name,!0);break;case`select`:jd(`invalid`,t);break;case`textarea`:jd(`invalid`,t),Gt(t,r.value,r.defaultValue,r.children)}n=r.children,typeof n!=`string`&&typeof n!=`number`&&typeof n!=`bigint`||t.textContent===``+n||!0===r.suppressHydrationWarning||Wd(t.textContent,n)?(r.popover!=null&&(jd(`beforetoggle`,t),jd(`toggle`,t)),r.onScroll!=null&&jd(`scroll`,t),r.onScrollEnd!=null&&jd(`scrollend`,t),r.onClick!=null&&(t.onclick=en),t=!0):t=!1,t||Bi(e,!0)}function Hi(e){for(Pi=e.return;Pi;)switch(Pi.tag){case 5:case 31:case 13:Ri=!1;return;case 27:case 3:Ri=!0;return;default:Pi=Pi.return}}function Ui(e){if(e!==Pi)return!1;if(!Ii)return Hi(e),Ii=!0,!1;var t=e.tag,n;if((n=t!==3&&t!==27)&&((n=t===5)&&(n=e.type,n=!(n!==`form`&&n!==`button`)||nf(e.type,e.memoizedProps)),n=!n),n&&Fi&&Bi(e),Hi(e),t===13){if(e=e.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(i(317));Fi=Cf(e)}else if(t===31){if(e=e.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(i(317));Fi=Cf(e)}else t===27?(t=Fi,df(e.type)?(e=Sf,Sf=null,Fi=e):Fi=t):Fi=Pi?xf(e.stateNode.nextSibling):null;return!0}function Wi(){Fi=Pi=null,Ii=!1}function Gi(){var e=Li;return e!==null&&(cu===null?cu=e:cu.push.apply(cu,e),Li=null),e}function Ki(e){Li===null?Li=[e]:Li.push(e)}var qi=ie(null),Ji=null,Yi=null;function Xi(e,t,n){oe(qi,t._currentValue),t._currentValue=n}function Zi(e){e._currentValue=qi.current,ae(qi)}function Qi(e,t,n){for(;e!==null;){var r=e.alternate;if((e.childLanes&t)===t?r!==null&&(r.childLanes&t)!==t&&(r.childLanes|=t):(e.childLanes|=t,r!==null&&(r.childLanes|=t)),e===n)break;e=e.return}}function $i(e,t,n,r){var a=e.child;for(a!==null&&(a.return=e);a!==null;){var o=a.dependencies;if(o!==null){var s=a.child;o=o.firstContext;a:for(;o!==null;){var c=o;o=a;for(var l=0;l<t.length;l++)if(c.context===t[l]){o.lanes|=n,c=o.alternate,c!==null&&(c.lanes|=n),Qi(o.return,n,e),r||(s=null);break a}o=c.next}}else if(a.tag===18){if(s=a.return,s===null)throw Error(i(341));s.lanes|=n,o=s.alternate,o!==null&&(o.lanes|=n),Qi(s,n,e),s=null}else s=a.child;if(s!==null)s.return=a;else for(s=a;s!==null;){if(s===e){s=null;break}if(a=s.sibling,a!==null){a.return=s.return,s=a;break}s=s.return}a=s}}function ea(e,t,n,r){e=null;for(var a=t,o=!1;a!==null;){if(!o){if(a.flags&524288)o=!0;else if(a.flags&262144)break}if(a.tag===10){var s=a.alternate;if(s===null)throw Error(i(387));if(s=s.memoizedProps,s!==null){var c=a.type;Cr(a.pendingProps.value,s.value)||(e===null?e=[c]:e.push(c))}}else if(a===ue.current){if(s=a.alternate,s===null)throw Error(i(387));s.memoizedState.memoizedState!==a.memoizedState.memoizedState&&(e===null?e=[dp]:e.push(dp))}a=a.return}e!==null&&$i(t,e,n,r),t.flags|=262144}function ta(e){for(e=e.firstContext;e!==null;){if(!Cr(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function na(e){Ji=e,Yi=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function ra(e){return aa(Ji,e)}function ia(e,t){return Ji===null&&na(e),aa(e,t)}function aa(e,t){var n=t._currentValue;if(t={context:t,memoizedValue:n,next:null},Yi===null){if(e===null)throw Error(i(308));Yi=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else Yi=Yi.next=t;return n}var oa=typeof AbortController<`u`?AbortController:function(){var e=[],t=this.signal={aborted:!1,addEventListener:function(t,n){e.push(n)}};this.abort=function(){t.aborted=!0,e.forEach(function(e){return e()})}},sa=t.unstable_scheduleCallback,ca=t.unstable_NormalPriority,la={$$typeof:C,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function ua(){return{controller:new oa,data:new Map,refCount:0}}function da(e){e.refCount--,e.refCount===0&&sa(ca,function(){e.controller.abort()})}var fa=null,pa=0,ma=0,ha=null;function ga(e,t){if(fa===null){var n=fa=[];pa=0,ma=Sd(),ha={status:`pending`,value:void 0,then:function(e){n.push(e)}}}return pa++,t.then(_a,_a),t}function _a(){if(--pa===0&&fa!==null){ha!==null&&(ha.status=`fulfilled`);var e=fa;fa=null,ma=0,ha=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function va(e,t){var n=[],r={status:`pending`,value:null,reason:null,then:function(e){n.push(e)}};return e.then(function(){r.status=`fulfilled`,r.value=t;for(var e=0;e<n.length;e++)(0,n[e])(t)},function(e){for(r.status=`rejected`,r.reason=e,e=0;e<n.length;e++)(0,n[e])(void 0)}),r}var ya=ee.S;ee.S=function(e,t){du=Ee(),typeof t==`object`&&t&&typeof t.then==`function`&&ga(e,t),ya!==null&&ya(e,t)};var ba=ie(null);function xa(){var e=ba.current;return e===null?Kl.pooledCache:e}function Sa(e,t){t===null?oe(ba,ba.current):oe(ba,t.pool)}function Ca(){var e=xa();return e===null?null:{parent:la._currentValue,pool:e}}var wa=Error(i(460)),Ta=Error(i(474)),Ea=Error(i(542)),Da={then:function(){}};function Oa(e){return e=e.status,e===`fulfilled`||e===`rejected`}function ka(e,t,n){switch(n=e[n],n===void 0?e.push(t):n!==t&&(t.then(en,en),t=n),t.status){case`fulfilled`:return t.value;case`rejected`:throw e=t.reason,Na(e),e;default:if(typeof t.status==`string`)t.then(en,en);else{if(e=Kl,e!==null&&100<e.shellSuspendCounter)throw Error(i(482));e=t,e.status=`pending`,e.then(function(e){if(t.status===`pending`){var n=t;n.status=`fulfilled`,n.value=e}},function(e){if(t.status===`pending`){var n=t;n.status=`rejected`,n.reason=e}})}switch(t.status){case`fulfilled`:return t.value;case`rejected`:throw e=t.reason,Na(e),e}throw ja=t,wa}}function Aa(e){try{var t=e._init;return t(e._payload)}catch(e){throw typeof e==`object`&&e&&typeof e.then==`function`?(ja=e,wa):e}}var ja=null;function Ma(){if(ja===null)throw Error(i(459));var e=ja;return ja=null,e}function Na(e){if(e===wa||e===Ea)throw Error(i(483))}var Pa=null,Fa=0;function Ia(e){var t=Fa;return Fa+=1,Pa===null&&(Pa=[]),ka(Pa,e,t)}function La(e,t){t=t.props.ref,e.ref=t===void 0?null:t}function Ra(e,t){throw t.$$typeof===m?Error(i(525)):(e=Object.prototype.toString.call(t),Error(i(31,e===`[object Object]`?`object with keys {`+Object.keys(t).join(`, `)+`}`:e)))}function za(e){function t(t,n){if(e){var r=t.deletions;r===null?(t.deletions=[n],t.flags|=16):r.push(n)}}function n(n,r){if(!e)return null;for(;r!==null;)t(n,r),r=r.sibling;return null}function r(e){for(var t=new Map;e!==null;)e.key===null?t.set(e.index,e):t.set(e.key,e),e=e.sibling;return t}function a(e,t){return e=di(e,t),e.index=0,e.sibling=null,e}function o(t,n,r){return t.index=r,e?(r=t.alternate,r===null?(t.flags|=67108866,n):(r=r.index,r<n?(t.flags|=67108866,n):r)):(t.flags|=1048576,n)}function s(t){return e&&t.alternate===null&&(t.flags|=67108866),t}function c(e,t,n,r){return t===null||t.tag!==6?(t=hi(n,e.mode,r),t.return=e,t):(t=a(t,n),t.return=e,t)}function l(e,t,n,r){var i=n.type;return i===y?d(e,t,n.props.children,r,n.key):t!==null&&(t.elementType===i||typeof i==`object`&&i&&i.$$typeof===O&&Aa(i)===t.type)?(t=a(t,n.props),La(t,n),t.return=e,t):(t=pi(n.type,n.key,n.props,null,e.mode,r),La(t,n),t.return=e,t)}function u(e,t,n,r){return t===null||t.tag!==4||t.stateNode.containerInfo!==n.containerInfo||t.stateNode.implementation!==n.implementation?(t=_i(n,e.mode,r),t.return=e,t):(t=a(t,n.children||[]),t.return=e,t)}function d(e,t,n,r,i){return t===null||t.tag!==7?(t=mi(n,e.mode,r,i),t.return=e,t):(t=a(t,n),t.return=e,t)}function f(e,t,n){if(typeof t==`string`&&t!==``||typeof t==`number`||typeof t==`bigint`)return t=hi(``+t,e.mode,n),t.return=e,t;if(typeof t==`object`&&t){switch(t.$$typeof){case g:return n=pi(t.type,t.key,t.props,null,e.mode,n),La(n,t),n.return=e,n;case v:return t=_i(t,e.mode,n),t.return=e,t;case O:return t=Aa(t),f(e,t,n)}if(F(t)||M(t))return t=mi(t,e.mode,n,null),t.return=e,t;if(typeof t.then==`function`)return f(e,Ia(t),n);if(t.$$typeof===C)return f(e,ia(e,t),n);Ra(e,t)}return null}function p(e,t,n,r){var i=t===null?null:t.key;if(typeof n==`string`&&n!==``||typeof n==`number`||typeof n==`bigint`)return i===null?c(e,t,``+n,r):null;if(typeof n==`object`&&n){switch(n.$$typeof){case g:return n.key===i?l(e,t,n,r):null;case v:return n.key===i?u(e,t,n,r):null;case O:return n=Aa(n),p(e,t,n,r)}if(F(n)||M(n))return i===null?d(e,t,n,r,null):null;if(typeof n.then==`function`)return p(e,t,Ia(n),r);if(n.$$typeof===C)return p(e,t,ia(e,n),r);Ra(e,n)}return null}function m(e,t,n,r,i){if(typeof r==`string`&&r!==``||typeof r==`number`||typeof r==`bigint`)return e=e.get(n)||null,c(t,e,``+r,i);if(typeof r==`object`&&r){switch(r.$$typeof){case g:return e=e.get(r.key===null?n:r.key)||null,l(t,e,r,i);case v:return e=e.get(r.key===null?n:r.key)||null,u(t,e,r,i);case O:return r=Aa(r),m(e,t,n,r,i)}if(F(r)||M(r))return e=e.get(n)||null,d(t,e,r,i,null);if(typeof r.then==`function`)return m(e,t,n,Ia(r),i);if(r.$$typeof===C)return m(e,t,n,ia(t,r),i);Ra(t,r)}return null}function h(i,a,s,c){for(var l=null,u=null,d=a,h=a=0,g=null;d!==null&&h<s.length;h++){d.index>h?(g=d,d=null):g=d.sibling;var _=p(i,d,s[h],c);if(_===null){d===null&&(d=g);break}e&&d&&_.alternate===null&&t(i,d),a=o(_,a,h),u===null?l=_:u.sibling=_,u=_,d=g}if(h===s.length)return n(i,d),Ii&&ki(i,h),l;if(d===null){for(;h<s.length;h++)d=f(i,s[h],c),d!==null&&(a=o(d,a,h),u===null?l=d:u.sibling=d,u=d);return Ii&&ki(i,h),l}for(d=r(d);h<s.length;h++)g=m(d,i,h,s[h],c),g!==null&&(e&&g.alternate!==null&&d.delete(g.key===null?h:g.key),a=o(g,a,h),u===null?l=g:u.sibling=g,u=g);return e&&d.forEach(function(e){return t(i,e)}),Ii&&ki(i,h),l}function _(a,s,c,l){if(c==null)throw Error(i(151));for(var u=null,d=null,h=s,g=s=0,_=null,v=c.next();h!==null&&!v.done;g++,v=c.next()){h.index>g?(_=h,h=null):_=h.sibling;var y=p(a,h,v.value,l);if(y===null){h===null&&(h=_);break}e&&h&&y.alternate===null&&t(a,h),s=o(y,s,g),d===null?u=y:d.sibling=y,d=y,h=_}if(v.done)return n(a,h),Ii&&ki(a,g),u;if(h===null){for(;!v.done;g++,v=c.next())v=f(a,v.value,l),v!==null&&(s=o(v,s,g),d===null?u=v:d.sibling=v,d=v);return Ii&&ki(a,g),u}for(h=r(h);!v.done;g++,v=c.next())v=m(h,a,g,v.value,l),v!==null&&(e&&v.alternate!==null&&h.delete(v.key===null?g:v.key),s=o(v,s,g),d===null?u=v:d.sibling=v,d=v);return e&&h.forEach(function(e){return t(a,e)}),Ii&&ki(a,g),u}function b(e,r,o,c){if(typeof o==`object`&&o&&o.type===y&&o.key===null&&(o=o.props.children),typeof o==`object`&&o){switch(o.$$typeof){case g:a:{for(var l=o.key;r!==null;){if(r.key===l){if(l=o.type,l===y){if(r.tag===7){n(e,r.sibling),c=a(r,o.props.children),c.return=e,e=c;break a}}else if(r.elementType===l||typeof l==`object`&&l&&l.$$typeof===O&&Aa(l)===r.type){n(e,r.sibling),c=a(r,o.props),La(c,o),c.return=e,e=c;break a}n(e,r);break}else t(e,r);r=r.sibling}o.type===y?(c=mi(o.props.children,e.mode,c,o.key),c.return=e,e=c):(c=pi(o.type,o.key,o.props,null,e.mode,c),La(c,o),c.return=e,e=c)}return s(e);case v:a:{for(l=o.key;r!==null;){if(r.key===l)if(r.tag===4&&r.stateNode.containerInfo===o.containerInfo&&r.stateNode.implementation===o.implementation){n(e,r.sibling),c=a(r,o.children||[]),c.return=e,e=c;break a}else{n(e,r);break}else t(e,r);r=r.sibling}c=_i(o,e.mode,c),c.return=e,e=c}return s(e);case O:return o=Aa(o),b(e,r,o,c)}if(F(o))return h(e,r,o,c);if(M(o)){if(l=M(o),typeof l!=`function`)throw Error(i(150));return o=l.call(o),_(e,r,o,c)}if(typeof o.then==`function`)return b(e,r,Ia(o),c);if(o.$$typeof===C)return b(e,r,ia(e,o),c);Ra(e,o)}return typeof o==`string`&&o!==``||typeof o==`number`||typeof o==`bigint`?(o=``+o,r!==null&&r.tag===6?(n(e,r.sibling),c=a(r,o),c.return=e,e=c):(n(e,r),c=hi(o,e.mode,c),c.return=e,e=c),s(e)):n(e,r)}return function(e,t,n,r){try{Fa=0;var i=b(e,t,n,r);return Pa=null,i}catch(t){if(t===wa||t===Ea)throw t;var a=li(29,t,null,e.mode);return a.lanes=r,a.return=e,a}}}var Ba=za(!0),Va=za(!1),Ha=!1;function Ua(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Wa(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,callbacks:null})}function Ga(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function Ka(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,Gl&2){var i=r.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),r.pending=t,t=oi(e),ai(e,null,n),t}return ni(e,r,t,n),oi(e)}function qa(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,n&4194048)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,et(e,n)}}function Ja(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var i=null,a=null;if(n=n.firstBaseUpdate,n!==null){do{var o={lane:n.lane,tag:n.tag,payload:n.payload,callback:null,next:null};a===null?i=a=o:a=a.next=o,n=n.next}while(n!==null);a===null?i=a=t:a=a.next=t}else i=a=t;n={baseState:r.baseState,firstBaseUpdate:i,lastBaseUpdate:a,shared:r.shared,callbacks:r.callbacks},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}var Ya=!1;function Xa(){if(Ya){var e=ha;if(e!==null)throw e}}function Za(e,t,n,r){Ya=!1;var i=e.updateQueue;Ha=!1;var a=i.firstBaseUpdate,o=i.lastBaseUpdate,s=i.shared.pending;if(s!==null){i.shared.pending=null;var c=s,l=c.next;c.next=null,o===null?a=l:o.next=l,o=c;var u=e.alternate;u!==null&&(u=u.updateQueue,s=u.lastBaseUpdate,s!==o&&(s===null?u.firstBaseUpdate=l:s.next=l,u.lastBaseUpdate=c))}if(a!==null){var d=i.baseState;o=0,u=l=c=null,s=a;do{var p=s.lane&-536870913,m=p!==s.lane;if(m?(Jl&p)===p:(r&p)===p){p!==0&&p===ma&&(Ya=!0),u!==null&&(u=u.next={lane:0,tag:s.tag,payload:s.payload,callback:null,next:null});a:{var h=e,g=s;p=t;var _=n;switch(g.tag){case 1:if(h=g.payload,typeof h==`function`){d=h.call(_,d,p);break a}d=h;break a;case 3:h.flags=h.flags&-65537|128;case 0:if(h=g.payload,p=typeof h==`function`?h.call(_,d,p):h,p==null)break a;d=f({},d,p);break a;case 2:Ha=!0}}p=s.callback,p!==null&&(e.flags|=64,m&&(e.flags|=8192),m=i.callbacks,m===null?i.callbacks=[p]:m.push(p))}else m={lane:p,tag:s.tag,payload:s.payload,callback:s.callback,next:null},u===null?(l=u=m,c=d):u=u.next=m,o|=p;if(s=s.next,s===null){if(s=i.shared.pending,s===null)break;m=s,s=m.next,m.next=null,i.lastBaseUpdate=m,i.shared.pending=null}}while(1);u===null&&(c=d),i.baseState=c,i.firstBaseUpdate=l,i.lastBaseUpdate=u,a===null&&(i.shared.lanes=0),nu|=o,e.lanes=o,e.memoizedState=d}}function Qa(e,t){if(typeof e!=`function`)throw Error(i(191,e));e.call(t)}function $a(e,t){var n=e.callbacks;if(n!==null)for(e.callbacks=null,e=0;e<n.length;e++)Qa(n[e],t)}var eo=ie(null),to=ie(0);function no(e,t){e=eu,oe(to,e),oe(eo,t),eu=e|t.baseLanes}function ro(){oe(to,eu),oe(eo,eo.current)}function io(){eu=to.current,ae(eo),ae(to)}var ao=ie(null),oo=null;function so(e){var t=e.alternate;oe(po,po.current&1),oe(ao,e),oo===null&&(t===null||eo.current!==null||t.memoizedState!==null)&&(oo=e)}function co(e){oe(po,po.current),oe(ao,e),oo===null&&(oo=e)}function lo(e){e.tag===22?(oe(po,po.current),oe(ao,e),oo===null&&(oo=e)):uo(e)}function uo(){oe(po,po.current),oe(ao,ao.current)}function fo(e){ae(ao),oo===e&&(oo=null),ae(po)}var po=ie(0);function mo(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||vf(n)||yf(n)))return t}else if(t.tag===19&&(t.memoizedProps.revealOrder===`forwards`||t.memoizedProps.revealOrder===`backwards`||t.memoizedProps.revealOrder===`unstable_legacy-backwards`||t.memoizedProps.revealOrder===`together`)){if(t.flags&128)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var ho=0,go=null,_o=null,vo=null,yo=!1,bo=!1,xo=!1,So=0,Co=0,wo=null,To=0;function Eo(){throw Error(i(321))}function Do(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!Cr(e[n],t[n]))return!1;return!0}function Oo(e,t,n,r,i,a){return ho=a,go=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,ee.H=e===null||e.memoizedState===null?Gs:Ks,xo=!1,a=n(r,i),xo=!1,bo&&(a=Ao(t,n,r,i)),ko(e),a}function ko(e){ee.H=Ws;var t=_o!==null&&_o.next!==null;if(ho=0,vo=_o=go=null,yo=!1,Co=0,wo=null,t)throw Error(i(300));e===null||cc||(e=e.dependencies,e!==null&&ta(e)&&(cc=!0))}function Ao(e,t,n,r){go=e;var a=0;do{if(bo&&(wo=null),Co=0,bo=!1,25<=a)throw Error(i(301));if(a+=1,vo=_o=null,e.updateQueue!=null){var o=e.updateQueue;o.lastEffect=null,o.events=null,o.stores=null,o.memoCache!=null&&(o.memoCache.index=0)}ee.H=qs,o=t(n,r)}while(bo);return o}function jo(){var e=ee.H,t=e.useState()[0];return t=typeof t.then==`function`?Ro(t):t,e=e.useState()[0],(_o===null?null:_o.memoizedState)!==e&&(go.flags|=1024),t}function Mo(){var e=So!==0;return So=0,e}function No(e,t,n){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~n}function Po(e){if(yo){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}yo=!1}ho=0,vo=_o=go=null,bo=!1,Co=So=0,wo=null}function Fo(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return vo===null?go.memoizedState=vo=e:vo=vo.next=e,vo}function Io(){if(_o===null){var e=go.alternate;e=e===null?null:e.memoizedState}else e=_o.next;var t=vo===null?go.memoizedState:vo.next;if(t!==null)vo=t,_o=e;else{if(e===null)throw go.alternate===null?Error(i(467)):Error(i(310));_o=e,e={memoizedState:_o.memoizedState,baseState:_o.baseState,baseQueue:_o.baseQueue,queue:_o.queue,next:null},vo===null?go.memoizedState=vo=e:vo=vo.next=e}return vo}function Lo(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Ro(e){var t=Co;return Co+=1,wo===null&&(wo=[]),e=ka(wo,e,t),t=go,(vo===null?t.memoizedState:vo.next)===null&&(t=t.alternate,ee.H=t===null||t.memoizedState===null?Gs:Ks),e}function zo(e){if(typeof e==`object`&&e){if(typeof e.then==`function`)return Ro(e);if(e.$$typeof===C)return ra(e)}throw Error(i(438,String(e)))}function Bo(e){var t=null,n=go.updateQueue;if(n!==null&&(t=n.memoCache),t==null){var r=go.alternate;r!==null&&(r=r.updateQueue,r!==null&&(r=r.memoCache,r!=null&&(t={data:r.data.map(function(e){return e.slice()}),index:0})))}if(t??={data:[],index:0},n===null&&(n=Lo(),go.updateQueue=n),n.memoCache=t,n=t.data[t.index],n===void 0)for(n=t.data[t.index]=Array(e),r=0;r<e;r++)n[r]=A;return t.index++,n}function Vo(e,t){return typeof t==`function`?t(e):t}function Ho(e){return Uo(Io(),_o,e)}function Uo(e,t,n){var r=e.queue;if(r===null)throw Error(i(311));r.lastRenderedReducer=n;var a=e.baseQueue,o=r.pending;if(o!==null){if(a!==null){var s=a.next;a.next=o.next,o.next=s}t.baseQueue=a=o,r.pending=null}if(o=e.baseState,a===null)e.memoizedState=o;else{t=a.next;var c=s=null,l=null,u=t,d=!1;do{var f=u.lane&-536870913;if(f===u.lane?(ho&f)===f:(Jl&f)===f){var p=u.revertLane;if(p===0)l!==null&&(l=l.next={lane:0,revertLane:0,gesture:null,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null}),f===ma&&(d=!0);else if((ho&p)===p){u=u.next,p===ma&&(d=!0);continue}else f={lane:0,revertLane:u.revertLane,gesture:null,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null},l===null?(c=l=f,s=o):l=l.next=f,go.lanes|=p,nu|=p;f=u.action,xo&&n(o,f),o=u.hasEagerState?u.eagerState:n(o,f)}else p={lane:f,revertLane:u.revertLane,gesture:u.gesture,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null},l===null?(c=l=p,s=o):l=l.next=p,go.lanes|=f,nu|=f;u=u.next}while(u!==null&&u!==t);if(l===null?s=o:l.next=c,!Cr(o,e.memoizedState)&&(cc=!0,d&&(n=ha,n!==null)))throw n;e.memoizedState=o,e.baseState=s,e.baseQueue=l,r.lastRenderedState=o}return a===null&&(r.lanes=0),[e.memoizedState,r.dispatch]}function Wo(e){var t=Io(),n=t.queue;if(n===null)throw Error(i(311));n.lastRenderedReducer=e;var r=n.dispatch,a=n.pending,o=t.memoizedState;if(a!==null){n.pending=null;var s=a=a.next;do o=e(o,s.action),s=s.next;while(s!==a);Cr(o,t.memoizedState)||(cc=!0),t.memoizedState=o,t.baseQueue===null&&(t.baseState=o),n.lastRenderedState=o}return[o,r]}function Go(e,t,n){var r=go,a=Io(),o=Ii;if(o){if(n===void 0)throw Error(i(407));n=n()}else n=t();var s=!Cr((_o||a).memoizedState,n);if(s&&(a.memoizedState=n,cc=!0),a=a.queue,gs(Jo.bind(null,r,a,e),[e]),a.getSnapshot!==t||s||vo!==null&&vo.memoizedState.tag&1){if(r.flags|=2048,ds(9,{destroy:void 0},qo.bind(null,r,a,n,t),null),Kl===null)throw Error(i(349));o||ho&127||Ko(r,t,n)}return n}function Ko(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=go.updateQueue,t===null?(t=Lo(),go.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function qo(e,t,n,r){t.value=n,t.getSnapshot=r,Yo(t)&&Xo(e)}function Jo(e,t,n){return n(function(){Yo(t)&&Xo(e)})}function Yo(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!Cr(e,n)}catch{return!0}}function Xo(e){var t=ii(e,2);t!==null&&Tu(t,e,2)}function Zo(e){var t=Fo();if(typeof e==`function`){var n=e;if(e=n(),xo){Le(!0);try{n()}finally{Le(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Vo,lastRenderedState:e},t}function Qo(e,t,n,r){return e.baseState=n,Uo(e,_o,typeof r==`function`?r:Vo)}function $o(e,t,n,r,a){if(Vs(e))throw Error(i(485));if(e=t.action,e!==null){var o={payload:a,action:e,next:null,isTransition:!0,status:`pending`,value:null,reason:null,listeners:[],then:function(e){o.listeners.push(e)}};ee.T===null?o.isTransition=!1:n(!0),r(o),n=t.pending,n===null?(o.next=t.pending=o,es(t,o)):(o.next=n.next,t.pending=n.next=o)}}function es(e,t){var n=t.action,r=t.payload,i=e.state;if(t.isTransition){var a=ee.T,o={};ee.T=o;try{var s=n(i,r),c=ee.S;c!==null&&c(o,s),ts(e,t,s)}catch(n){rs(e,t,n)}finally{a!==null&&o.types!==null&&(a.types=o.types),ee.T=a}}else try{a=n(i,r),ts(e,t,a)}catch(n){rs(e,t,n)}}function ts(e,t,n){typeof n==`object`&&n&&typeof n.then==`function`?n.then(function(n){ns(e,t,n)},function(n){return rs(e,t,n)}):ns(e,t,n)}function ns(e,t,n){t.status=`fulfilled`,t.value=n,is(t),e.state=n,t=e.pending,t!==null&&(n=t.next,n===t?e.pending=null:(n=n.next,t.next=n,es(e,n)))}function rs(e,t,n){var r=e.pending;if(e.pending=null,r!==null){r=r.next;do t.status=`rejected`,t.reason=n,is(t),t=t.next;while(t!==r)}e.action=null}function is(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function as(e,t){return t}function os(e,t){if(Ii){var n=Kl.formState;if(n!==null){a:{var r=go;if(Ii){if(Fi){b:{for(var i=Fi,a=Ri;i.nodeType!==8;){if(!a){i=null;break b}if(i=xf(i.nextSibling),i===null){i=null;break b}}a=i.data,i=a===`F!`||a===`F`?i:null}if(i){Fi=xf(i.nextSibling),r=i.data===`F!`;break a}}Bi(r)}r=!1}r&&(t=n[0])}}return n=Fo(),n.memoizedState=n.baseState=t,r={pending:null,lanes:0,dispatch:null,lastRenderedReducer:as,lastRenderedState:t},n.queue=r,n=Rs.bind(null,go,r),r.dispatch=n,r=Zo(!1),a=Bs.bind(null,go,!1,r.queue),r=Fo(),i={state:t,dispatch:null,action:e,pending:null},r.queue=i,n=$o.bind(null,go,i,a,n),i.dispatch=n,r.memoizedState=e,[t,n,!1]}function ss(e){return cs(Io(),_o,e)}function cs(e,t,n){if(t=Uo(e,t,as)[0],e=Ho(Vo)[0],typeof t==`object`&&t&&typeof t.then==`function`)try{var r=Ro(t)}catch(e){throw e===wa?Ea:e}else r=t;t=Io();var i=t.queue,a=i.dispatch;return n!==t.memoizedState&&(go.flags|=2048,ds(9,{destroy:void 0},ls.bind(null,i,n),null)),[r,a,e]}function ls(e,t){e.action=t}function us(e){var t=Io(),n=_o;if(n!==null)return cs(t,n,e);Io(),t=t.memoizedState,n=Io();var r=n.queue.dispatch;return n.memoizedState=e,[t,r,!1]}function ds(e,t,n,r){return e={tag:e,create:n,deps:r,inst:t,next:null},t=go.updateQueue,t===null&&(t=Lo(),go.updateQueue=t),n=t.lastEffect,n===null?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e),e}function fs(){return Io().memoizedState}function ps(e,t,n,r){var i=Fo();go.flags|=e,i.memoizedState=ds(1|t,{destroy:void 0},n,r===void 0?null:r)}function ms(e,t,n,r){var i=Io();r=r===void 0?null:r;var a=i.memoizedState.inst;_o!==null&&r!==null&&Do(r,_o.memoizedState.deps)?i.memoizedState=ds(t,a,n,r):(go.flags|=e,i.memoizedState=ds(1|t,a,n,r))}function hs(e,t){ps(8390656,8,e,t)}function gs(e,t){ms(2048,8,e,t)}function _s(e){go.flags|=4;var t=go.updateQueue;if(t===null)t=Lo(),go.updateQueue=t,t.events=[e];else{var n=t.events;n===null?t.events=[e]:n.push(e)}}function vs(e){var t=Io().memoizedState;return _s({ref:t,nextImpl:e}),function(){if(Gl&2)throw Error(i(440));return t.impl.apply(void 0,arguments)}}function ys(e,t){return ms(4,2,e,t)}function bs(e,t){return ms(4,4,e,t)}function xs(e,t){if(typeof t==`function`){e=e();var n=t(e);return function(){typeof n==`function`?n():t(null)}}if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function Ss(e,t,n){n=n==null?null:n.concat([e]),ms(4,4,xs.bind(null,t,e),n)}function Cs(){}function ws(e,t){var n=Io();t=t===void 0?null:t;var r=n.memoizedState;return t!==null&&Do(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function Ts(e,t){var n=Io();t=t===void 0?null:t;var r=n.memoizedState;if(t!==null&&Do(t,r[1]))return r[0];if(r=e(),xo){Le(!0);try{e()}finally{Le(!1)}}return n.memoizedState=[r,t],r}function Es(e,t,n){return n===void 0||ho&1073741824&&!(Jl&261930)?e.memoizedState=t:(e.memoizedState=n,e=wu(),go.lanes|=e,nu|=e,n)}function Ds(e,t,n,r){return Cr(n,t)?n:eo.current===null?!(ho&42)||ho&1073741824&&!(Jl&261930)?(cc=!0,e.memoizedState=n):(e=wu(),go.lanes|=e,nu|=e,t):(e=Es(e,n,r),Cr(e,t)||(cc=!0),e)}function Os(e,t,n,r,i){var a=I.p;I.p=a!==0&&8>a?a:8;var o=ee.T,s={};ee.T=s,Bs(e,!1,t,n);try{var c=i(),l=ee.S;l!==null&&l(s,c),typeof c==`object`&&c&&typeof c.then==`function`?zs(e,t,va(c,r),Cu(e)):zs(e,t,r,Cu(e))}catch(n){zs(e,t,{then:function(){},status:`rejected`,reason:n},Cu())}finally{I.p=a,o!==null&&s.types!==null&&(o.types=s.types),ee.T=o}}function ks(){}function As(e,t,n,r){if(e.tag!==5)throw Error(i(476));var a=js(e).queue;Os(e,a,t,te,n===null?ks:function(){return Ms(e),n(r)})}function js(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:te,baseState:te,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Vo,lastRenderedState:te},next:null};var n={};return t.next={memoizedState:n,baseState:n,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Vo,lastRenderedState:n},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function Ms(e){var t=js(e);t.next===null&&(t=e.alternate.memoizedState),zs(e,t.next.queue,{},Cu())}function Ns(){return ra(dp)}function Ps(){return Io().memoizedState}function Fs(){return Io().memoizedState}function Is(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var n=Cu();e=Ga(n);var r=Ka(t,e,n);r!==null&&(Tu(r,t,n),qa(r,t,n)),t={cache:ua()},e.payload=t;return}t=t.return}}function Ls(e,t,n){var r=Cu();n={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null},Vs(e)?Hs(t,n):(n=ri(e,t,n,r),n!==null&&(Tu(n,e,r),Us(n,t,r)))}function Rs(e,t,n){zs(e,t,n,Cu())}function zs(e,t,n,r){var i={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null};if(Vs(e))Hs(t,i);else{var a=e.alternate;if(e.lanes===0&&(a===null||a.lanes===0)&&(a=t.lastRenderedReducer,a!==null))try{var o=t.lastRenderedState,s=a(o,n);if(i.hasEagerState=!0,i.eagerState=s,Cr(s,o))return ni(e,t,i,0),Kl===null&&ti(),!1}catch{}if(n=ri(e,t,i,r),n!==null)return Tu(n,e,r),Us(n,t,r),!0}return!1}function Bs(e,t,n,r){if(r={lane:2,revertLane:Sd(),gesture:null,action:r,hasEagerState:!1,eagerState:null,next:null},Vs(e)){if(t)throw Error(i(479))}else t=ri(e,n,r,2),t!==null&&Tu(t,e,2)}function Vs(e){var t=e.alternate;return e===go||t!==null&&t===go}function Hs(e,t){bo=yo=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function Us(e,t,n){if(n&4194048){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,et(e,n)}}var Ws={readContext:ra,use:zo,useCallback:Eo,useContext:Eo,useEffect:Eo,useImperativeHandle:Eo,useLayoutEffect:Eo,useInsertionEffect:Eo,useMemo:Eo,useReducer:Eo,useRef:Eo,useState:Eo,useDebugValue:Eo,useDeferredValue:Eo,useTransition:Eo,useSyncExternalStore:Eo,useId:Eo,useHostTransitionStatus:Eo,useFormState:Eo,useActionState:Eo,useOptimistic:Eo,useMemoCache:Eo,useCacheRefresh:Eo};Ws.useEffectEvent=Eo;var Gs={readContext:ra,use:zo,useCallback:function(e,t){return Fo().memoizedState=[e,t===void 0?null:t],e},useContext:ra,useEffect:hs,useImperativeHandle:function(e,t,n){n=n==null?null:n.concat([e]),ps(4194308,4,xs.bind(null,t,e),n)},useLayoutEffect:function(e,t){return ps(4194308,4,e,t)},useInsertionEffect:function(e,t){ps(4,2,e,t)},useMemo:function(e,t){var n=Fo();t=t===void 0?null:t;var r=e();if(xo){Le(!0);try{e()}finally{Le(!1)}}return n.memoizedState=[r,t],r},useReducer:function(e,t,n){var r=Fo();if(n!==void 0){var i=n(t);if(xo){Le(!0);try{n(t)}finally{Le(!1)}}}else i=t;return r.memoizedState=r.baseState=i,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:i},r.queue=e,e=e.dispatch=Ls.bind(null,go,e),[r.memoizedState,e]},useRef:function(e){var t=Fo();return e={current:e},t.memoizedState=e},useState:function(e){e=Zo(e);var t=e.queue,n=Rs.bind(null,go,t);return t.dispatch=n,[e.memoizedState,n]},useDebugValue:Cs,useDeferredValue:function(e,t){return Es(Fo(),e,t)},useTransition:function(){var e=Zo(!1);return e=Os.bind(null,go,e.queue,!0,!1),Fo().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,n){var r=go,a=Fo();if(Ii){if(n===void 0)throw Error(i(407));n=n()}else{if(n=t(),Kl===null)throw Error(i(349));Jl&127||Ko(r,t,n)}a.memoizedState=n;var o={value:n,getSnapshot:t};return a.queue=o,hs(Jo.bind(null,r,o,e),[e]),r.flags|=2048,ds(9,{destroy:void 0},qo.bind(null,r,o,n,t),null),n},useId:function(){var e=Fo(),t=Kl.identifierPrefix;if(Ii){var n=Oi,r=Di;n=(r&~(1<<32-Re(r)-1)).toString(32)+n,t=`_`+t+`R_`+n,n=So++,0<n&&(t+=`H`+n.toString(32)),t+=`_`}else n=To++,t=`_`+t+`r_`+n.toString(32)+`_`;return e.memoizedState=t},useHostTransitionStatus:Ns,useFormState:os,useActionState:os,useOptimistic:function(e){var t=Fo();t.memoizedState=t.baseState=e;var n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=n,t=Bs.bind(null,go,!0,n),n.dispatch=t,[e,t]},useMemoCache:Bo,useCacheRefresh:function(){return Fo().memoizedState=Is.bind(null,go)},useEffectEvent:function(e){var t=Fo(),n={impl:e};return t.memoizedState=n,function(){if(Gl&2)throw Error(i(440));return n.impl.apply(void 0,arguments)}}},Ks={readContext:ra,use:zo,useCallback:ws,useContext:ra,useEffect:gs,useImperativeHandle:Ss,useInsertionEffect:ys,useLayoutEffect:bs,useMemo:Ts,useReducer:Ho,useRef:fs,useState:function(){return Ho(Vo)},useDebugValue:Cs,useDeferredValue:function(e,t){return Ds(Io(),_o.memoizedState,e,t)},useTransition:function(){var e=Ho(Vo)[0],t=Io().memoizedState;return[typeof e==`boolean`?e:Ro(e),t]},useSyncExternalStore:Go,useId:Ps,useHostTransitionStatus:Ns,useFormState:ss,useActionState:ss,useOptimistic:function(e,t){return Qo(Io(),_o,e,t)},useMemoCache:Bo,useCacheRefresh:Fs};Ks.useEffectEvent=vs;var qs={readContext:ra,use:zo,useCallback:ws,useContext:ra,useEffect:gs,useImperativeHandle:Ss,useInsertionEffect:ys,useLayoutEffect:bs,useMemo:Ts,useReducer:Wo,useRef:fs,useState:function(){return Wo(Vo)},useDebugValue:Cs,useDeferredValue:function(e,t){var n=Io();return _o===null?Es(n,e,t):Ds(n,_o.memoizedState,e,t)},useTransition:function(){var e=Wo(Vo)[0],t=Io().memoizedState;return[typeof e==`boolean`?e:Ro(e),t]},useSyncExternalStore:Go,useId:Ps,useHostTransitionStatus:Ns,useFormState:us,useActionState:us,useOptimistic:function(e,t){var n=Io();return _o===null?(n.baseState=e,[e,n.queue.dispatch]):Qo(n,_o,e,t)},useMemoCache:Bo,useCacheRefresh:Fs};qs.useEffectEvent=vs;function Js(e,t,n,r){t=e.memoizedState,n=n(r,t),n=n==null?t:f({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var Ys={enqueueSetState:function(e,t,n){e=e._reactInternals;var r=Cu(),i=Ga(r);i.payload=t,n!=null&&(i.callback=n),t=Ka(e,i,r),t!==null&&(Tu(t,e,r),qa(t,e,r))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=Cu(),i=Ga(r);i.tag=1,i.payload=t,n!=null&&(i.callback=n),t=Ka(e,i,r),t!==null&&(Tu(t,e,r),qa(t,e,r))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=Cu(),r=Ga(n);r.tag=2,t!=null&&(r.callback=t),t=Ka(e,r,n),t!==null&&(Tu(t,e,n),qa(t,e,n))}};function Xs(e,t,n,r,i,a,o){return e=e.stateNode,typeof e.shouldComponentUpdate==`function`?e.shouldComponentUpdate(r,a,o):t.prototype&&t.prototype.isPureReactComponent?!wr(n,r)||!wr(i,a):!0}function Zs(e,t,n,r){e=t.state,typeof t.componentWillReceiveProps==`function`&&t.componentWillReceiveProps(n,r),typeof t.UNSAFE_componentWillReceiveProps==`function`&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&Ys.enqueueReplaceState(t,t.state,null)}function Qs(e,t){var n=t;if(`ref`in t)for(var r in n={},t)r!==`ref`&&(n[r]=t[r]);if(e=e.defaultProps)for(var i in n===t&&(n=f({},n)),e)n[i]===void 0&&(n[i]=e[i]);return n}function R(e){Zr(e)}function $s(e){console.error(e)}function ec(e){Zr(e)}function tc(e,t){try{var n=e.onUncaughtError;n(t.value,{componentStack:t.stack})}catch(e){setTimeout(function(){throw e})}}function nc(e,t,n){try{var r=e.onCaughtError;r(n.value,{componentStack:n.stack,errorBoundary:t.tag===1?t.stateNode:null})}catch(e){setTimeout(function(){throw e})}}function rc(e,t,n){return n=Ga(n),n.tag=3,n.payload={element:null},n.callback=function(){tc(e,t)},n}function ic(e){return e=Ga(e),e.tag=3,e}function ac(e,t,n,r){var i=n.type.getDerivedStateFromError;if(typeof i==`function`){var a=r.value;e.payload=function(){return i(a)},e.callback=function(){nc(t,n,r)}}var o=n.stateNode;o!==null&&typeof o.componentDidCatch==`function`&&(e.callback=function(){nc(t,n,r),typeof i!=`function`&&(mu===null?mu=new Set([this]):mu.add(this));var e=r.stack;this.componentDidCatch(r.value,{componentStack:e===null?``:e})})}function oc(e,t,n,r,a){if(n.flags|=32768,typeof r==`object`&&r&&typeof r.then==`function`){if(t=n.alternate,t!==null&&ea(t,n,a,!0),n=ao.current,n!==null){switch(n.tag){case 31:case 13:return oo===null?Lu():n.alternate===null&&tu===0&&(tu=3),n.flags&=-257,n.flags|=65536,n.lanes=a,r===Da?n.flags|=16384:(t=n.updateQueue,t===null?n.updateQueue=new Set([r]):t.add(r),nd(e,r,a)),!1;case 22:return n.flags|=65536,r===Da?n.flags|=16384:(t=n.updateQueue,t===null?(t={transitions:null,markerInstances:null,retryQueue:new Set([r])},n.updateQueue=t):(n=t.retryQueue,n===null?t.retryQueue=new Set([r]):n.add(r)),nd(e,r,a)),!1}throw Error(i(435,n.tag))}return nd(e,r,a),Lu(),!1}if(Ii)return t=ao.current,t===null?(r!==zi&&(t=Error(i(423),{cause:r}),Ki(yi(t,n))),e=e.current.alternate,e.flags|=65536,a&=-a,e.lanes|=a,r=yi(r,n),a=rc(e.stateNode,r,a),Ja(e,a),tu!==4&&(tu=2)):(!(t.flags&65536)&&(t.flags|=256),t.flags|=65536,t.lanes=a,r!==zi&&(e=Error(i(422),{cause:r}),Ki(yi(e,n)))),!1;var o=Error(i(520),{cause:r});if(o=yi(o,n),su===null?su=[o]:su.push(o),tu!==4&&(tu=2),t===null)return!0;r=yi(r,n),n=t;do{switch(n.tag){case 3:return n.flags|=65536,e=a&-a,n.lanes|=e,e=rc(n.stateNode,r,e),Ja(n,e),!1;case 1:if(t=n.type,o=n.stateNode,!(n.flags&128)&&(typeof t.getDerivedStateFromError==`function`||o!==null&&typeof o.componentDidCatch==`function`&&(mu===null||!mu.has(o))))return n.flags|=65536,a&=-a,n.lanes|=a,a=ic(a),ac(a,e,n,r),Ja(n,a),!1}n=n.return}while(n!==null);return!1}var sc=Error(i(461)),cc=!1;function lc(e,t,n,r){t.child=e===null?Va(t,null,n,r):Ba(t,e.child,n,r)}function uc(e,t,n,r,i){n=n.render;var a=t.ref;if(`ref`in r){var o={};for(var s in r)s!==`ref`&&(o[s]=r[s])}else o=r;return na(t),r=Oo(e,t,n,o,a,i),s=Mo(),e!==null&&!cc?(No(e,t,i),Nc(e,t,i)):(Ii&&s&&ji(t),t.flags|=1,lc(e,t,r,i),t.child)}function dc(e,t,n,r,i){if(e===null){var a=n.type;return typeof a==`function`&&!ui(a)&&a.defaultProps===void 0&&n.compare===null?(t.tag=15,t.type=a,fc(e,t,a,r,i)):(e=pi(n.type,null,r,t,t.mode,i),e.ref=t.ref,e.return=t,t.child=e)}if(a=e.child,!Pc(e,i)){var o=a.memoizedProps;if(n=n.compare,n=n===null?wr:n,n(o,r)&&e.ref===t.ref)return Nc(e,t,i)}return t.flags|=1,e=di(a,r),e.ref=t.ref,e.return=t,t.child=e}function fc(e,t,n,r,i){if(e!==null){var a=e.memoizedProps;if(wr(a,r)&&e.ref===t.ref)if(cc=!1,t.pendingProps=r=a,Pc(e,i))e.flags&131072&&(cc=!0);else return t.lanes=e.lanes,Nc(e,t,i)}return bc(e,t,n,r,i)}function pc(e,t,n,r){var i=r.children,a=e===null?null:e.memoizedState;if(e===null&&t.stateNode===null&&(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),r.mode===`hidden`){if(t.flags&128){if(a=a===null?n:a.baseLanes|n,e!==null){for(r=t.child=e.child,i=0;r!==null;)i=i|r.lanes|r.childLanes,r=r.sibling;r=i&~a}else r=0,t.child=null;return hc(e,t,a,n,r)}if(n&536870912)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&Sa(t,a===null?null:a.cachePool),a===null?ro():no(t,a),lo(t);else return r=t.lanes=536870912,hc(e,t,a===null?n:a.baseLanes|n,n,r)}else a===null?(e!==null&&Sa(t,null),ro(),uo(t)):(Sa(t,a.cachePool),no(t,a),uo(t),t.memoizedState=null);return lc(e,t,i,n),t.child}function mc(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function hc(e,t,n,r,i){var a=xa();return a=a===null?null:{parent:la._currentValue,pool:a},t.memoizedState={baseLanes:n,cachePool:a},e!==null&&Sa(t,null),ro(),lo(t),e!==null&&ea(e,t,r,!0),t.childLanes=i,null}function gc(e,t){return t=Oc({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function _c(e,t,n){return Ba(t,e.child,null,n),e=gc(t,t.pendingProps),e.flags|=2,fo(t),t.memoizedState=null,e}function vc(e,t,n){var r=t.pendingProps,a=(t.flags&128)!=0;if(t.flags&=-129,e===null){if(Ii){if(r.mode===`hidden`)return e=gc(t,r),t.lanes=536870912,mc(null,e);if(co(t),(e=Fi)?(e=_f(e,Ri),e=e!==null&&e.data===`&`?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Ei===null?null:{id:Di,overflow:Oi},retryLane:536870912,hydrationErrors:null},n=gi(e),n.return=t,t.child=n,Pi=t,Fi=null)):e=null,e===null)throw Bi(t);return t.lanes=536870912,null}return gc(t,r)}var o=e.memoizedState;if(o!==null){var s=o.dehydrated;if(co(t),a)if(t.flags&256)t.flags&=-257,t=_c(e,t,n);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(i(558));else if(cc||ea(e,t,n,!1),a=(n&e.childLanes)!==0,cc||a){if(r=Kl,r!==null&&(s=tt(r,n),s!==0&&s!==o.retryLane))throw o.retryLane=s,ii(e,s),Tu(r,e,s),sc;Lu(),t=_c(e,t,n)}else e=o.treeContext,Fi=xf(s.nextSibling),Pi=t,Ii=!0,Li=null,Ri=!1,e!==null&&Ni(t,e),t=gc(t,r),t.flags|=4096;return t}return e=di(e.child,{mode:r.mode,children:r.children}),e.ref=t.ref,t.child=e,e.return=t,e}function yc(e,t){var n=t.ref;if(n===null)e!==null&&e.ref!==null&&(t.flags|=4194816);else{if(typeof n!=`function`&&typeof n!=`object`)throw Error(i(284));(e===null||e.ref!==n)&&(t.flags|=4194816)}}function bc(e,t,n,r,i){return na(t),n=Oo(e,t,n,r,void 0,i),r=Mo(),e!==null&&!cc?(No(e,t,i),Nc(e,t,i)):(Ii&&r&&ji(t),t.flags|=1,lc(e,t,n,i),t.child)}function xc(e,t,n,r,i,a){return na(t),t.updateQueue=null,n=Ao(t,r,n,i),ko(e),r=Mo(),e!==null&&!cc?(No(e,t,a),Nc(e,t,a)):(Ii&&r&&ji(t),t.flags|=1,lc(e,t,n,a),t.child)}function Sc(e,t,n,r,i){if(na(t),t.stateNode===null){var a=si,o=n.contextType;typeof o==`object`&&o&&(a=ra(o)),a=new n(r,a),t.memoizedState=a.state!==null&&a.state!==void 0?a.state:null,a.updater=Ys,t.stateNode=a,a._reactInternals=t,a=t.stateNode,a.props=r,a.state=t.memoizedState,a.refs={},Ua(t),o=n.contextType,a.context=typeof o==`object`&&o?ra(o):si,a.state=t.memoizedState,o=n.getDerivedStateFromProps,typeof o==`function`&&(Js(t,n,o,r),a.state=t.memoizedState),typeof n.getDerivedStateFromProps==`function`||typeof a.getSnapshotBeforeUpdate==`function`||typeof a.UNSAFE_componentWillMount!=`function`&&typeof a.componentWillMount!=`function`||(o=a.state,typeof a.componentWillMount==`function`&&a.componentWillMount(),typeof a.UNSAFE_componentWillMount==`function`&&a.UNSAFE_componentWillMount(),o!==a.state&&Ys.enqueueReplaceState(a,a.state,null),Za(t,r,a,i),Xa(),a.state=t.memoizedState),typeof a.componentDidMount==`function`&&(t.flags|=4194308),r=!0}else if(e===null){a=t.stateNode;var s=t.memoizedProps,c=Qs(n,s);a.props=c;var l=a.context,u=n.contextType;o=si,typeof u==`object`&&u&&(o=ra(u));var d=n.getDerivedStateFromProps;u=typeof d==`function`||typeof a.getSnapshotBeforeUpdate==`function`,s=t.pendingProps!==s,u||typeof a.UNSAFE_componentWillReceiveProps!=`function`&&typeof a.componentWillReceiveProps!=`function`||(s||l!==o)&&Zs(t,a,r,o),Ha=!1;var f=t.memoizedState;a.state=f,Za(t,r,a,i),Xa(),l=t.memoizedState,s||f!==l||Ha?(typeof d==`function`&&(Js(t,n,d,r),l=t.memoizedState),(c=Ha||Xs(t,n,c,r,f,l,o))?(u||typeof a.UNSAFE_componentWillMount!=`function`&&typeof a.componentWillMount!=`function`||(typeof a.componentWillMount==`function`&&a.componentWillMount(),typeof a.UNSAFE_componentWillMount==`function`&&a.UNSAFE_componentWillMount()),typeof a.componentDidMount==`function`&&(t.flags|=4194308)):(typeof a.componentDidMount==`function`&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=l),a.props=r,a.state=l,a.context=o,r=c):(typeof a.componentDidMount==`function`&&(t.flags|=4194308),r=!1)}else{a=t.stateNode,Wa(e,t),o=t.memoizedProps,u=Qs(n,o),a.props=u,d=t.pendingProps,f=a.context,l=n.contextType,c=si,typeof l==`object`&&l&&(c=ra(l)),s=n.getDerivedStateFromProps,(l=typeof s==`function`||typeof a.getSnapshotBeforeUpdate==`function`)||typeof a.UNSAFE_componentWillReceiveProps!=`function`&&typeof a.componentWillReceiveProps!=`function`||(o!==d||f!==c)&&Zs(t,a,r,c),Ha=!1,f=t.memoizedState,a.state=f,Za(t,r,a,i),Xa();var p=t.memoizedState;o!==d||f!==p||Ha||e!==null&&e.dependencies!==null&&ta(e.dependencies)?(typeof s==`function`&&(Js(t,n,s,r),p=t.memoizedState),(u=Ha||Xs(t,n,u,r,f,p,c)||e!==null&&e.dependencies!==null&&ta(e.dependencies))?(l||typeof a.UNSAFE_componentWillUpdate!=`function`&&typeof a.componentWillUpdate!=`function`||(typeof a.componentWillUpdate==`function`&&a.componentWillUpdate(r,p,c),typeof a.UNSAFE_componentWillUpdate==`function`&&a.UNSAFE_componentWillUpdate(r,p,c)),typeof a.componentDidUpdate==`function`&&(t.flags|=4),typeof a.getSnapshotBeforeUpdate==`function`&&(t.flags|=1024)):(typeof a.componentDidUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof a.getSnapshotBeforeUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=p),a.props=r,a.state=p,a.context=c,r=u):(typeof a.componentDidUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof a.getSnapshotBeforeUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),r=!1)}return a=r,yc(e,t),r=(t.flags&128)!=0,a||r?(a=t.stateNode,n=r&&typeof n.getDerivedStateFromError!=`function`?null:a.render(),t.flags|=1,e!==null&&r?(t.child=Ba(t,e.child,null,i),t.child=Ba(t,null,n,i)):lc(e,t,n,i),t.memoizedState=a.state,e=t.child):e=Nc(e,t,i),e}function Cc(e,t,n,r){return Wi(),t.flags|=256,lc(e,t,n,r),t.child}var wc={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function Tc(e){return{baseLanes:e,cachePool:Ca()}}function Ec(e,t,n){return e=e===null?0:e.childLanes&~n,t&&(e|=au),e}function Dc(e,t,n){var r=t.pendingProps,a=!1,o=(t.flags&128)!=0,s;if((s=o)||(s=e!==null&&e.memoizedState===null?!1:(po.current&2)!=0),s&&(a=!0,t.flags&=-129),s=(t.flags&32)!=0,t.flags&=-33,e===null){if(Ii){if(a?so(t):uo(t),(e=Fi)?(e=_f(e,Ri),e=e!==null&&e.data!==`&`?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Ei===null?null:{id:Di,overflow:Oi},retryLane:536870912,hydrationErrors:null},n=gi(e),n.return=t,t.child=n,Pi=t,Fi=null)):e=null,e===null)throw Bi(t);return yf(e)?t.lanes=32:t.lanes=536870912,null}var c=r.children;return r=r.fallback,a?(uo(t),a=t.mode,c=Oc({mode:`hidden`,children:c},a),r=mi(r,a,n,null),c.return=t,r.return=t,c.sibling=r,t.child=c,r=t.child,r.memoizedState=Tc(n),r.childLanes=Ec(e,s,n),t.memoizedState=wc,mc(null,r)):(so(t),z(t,c))}var l=e.memoizedState;if(l!==null&&(c=l.dehydrated,c!==null)){if(o)t.flags&256?(so(t),t.flags&=-257,t=kc(e,t,n)):t.memoizedState===null?(uo(t),c=r.fallback,a=t.mode,r=Oc({mode:`visible`,children:r.children},a),c=mi(c,a,n,null),c.flags|=2,r.return=t,c.return=t,r.sibling=c,t.child=r,Ba(t,e.child,null,n),r=t.child,r.memoizedState=Tc(n),r.childLanes=Ec(e,s,n),t.memoizedState=wc,t=mc(null,r)):(uo(t),t.child=e.child,t.flags|=128,t=null);else if(so(t),yf(c)){if(s=c.nextSibling&&c.nextSibling.dataset,s)var u=s.dgst;s=u,r=Error(i(419)),r.stack=``,r.digest=s,Ki({value:r,source:null,stack:null}),t=kc(e,t,n)}else if(cc||ea(e,t,n,!1),s=(n&e.childLanes)!==0,cc||s){if(s=Kl,s!==null&&(r=tt(s,n),r!==0&&r!==l.retryLane))throw l.retryLane=r,ii(e,r),Tu(s,e,r),sc;vf(c)||Lu(),t=kc(e,t,n)}else vf(c)?(t.flags|=192,t.child=e.child,t=null):(e=l.treeContext,Fi=xf(c.nextSibling),Pi=t,Ii=!0,Li=null,Ri=!1,e!==null&&Ni(t,e),t=z(t,r.children),t.flags|=4096);return t}return a?(uo(t),c=r.fallback,a=t.mode,l=e.child,u=l.sibling,r=di(l,{mode:`hidden`,children:r.children}),r.subtreeFlags=l.subtreeFlags&65011712,u===null?(c=mi(c,a,n,null),c.flags|=2):c=di(u,c),c.return=t,r.return=t,r.sibling=c,t.child=r,mc(null,r),r=t.child,c=e.child.memoizedState,c===null?c=Tc(n):(a=c.cachePool,a===null?a=Ca():(l=la._currentValue,a=a.parent===l?a:{parent:l,pool:l}),c={baseLanes:c.baseLanes|n,cachePool:a}),r.memoizedState=c,r.childLanes=Ec(e,s,n),t.memoizedState=wc,mc(e.child,r)):(so(t),n=e.child,e=n.sibling,n=di(n,{mode:`visible`,children:r.children}),n.return=t,n.sibling=null,e!==null&&(s=t.deletions,s===null?(t.deletions=[e],t.flags|=16):s.push(e)),t.child=n,t.memoizedState=null,n)}function z(e,t){return t=Oc({mode:`visible`,children:t},e.mode),t.return=e,e.child=t}function Oc(e,t){return e=li(22,e,null,t),e.lanes=0,e}function kc(e,t,n){return Ba(t,e.child,null,n),e=z(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function Ac(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),Qi(e.return,t,n)}function jc(e,t,n,r,i,a){var o=e.memoizedState;o===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:i,treeForkCount:a}:(o.isBackwards=t,o.rendering=null,o.renderingStartTime=0,o.last=r,o.tail=n,o.tailMode=i,o.treeForkCount=a)}function Mc(e,t,n){var r=t.pendingProps,i=r.revealOrder,a=r.tail;r=r.children;var o=po.current,s=(o&2)!=0;if(s?(o=o&1|2,t.flags|=128):o&=1,oe(po,o),lc(e,t,r,n),r=Ii?Ci:0,!s&&e!==null&&e.flags&128)a:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&Ac(e,n,t);else if(e.tag===19)Ac(e,n,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break a;for(;e.sibling===null;){if(e.return===null||e.return===t)break a;e=e.return}e.sibling.return=e.return,e=e.sibling}switch(i){case`forwards`:for(n=t.child,i=null;n!==null;)e=n.alternate,e!==null&&mo(e)===null&&(i=n),n=n.sibling;n=i,n===null?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null),jc(t,!1,i,n,a,r);break;case`backwards`:case`unstable_legacy-backwards`:for(n=null,i=t.child,t.child=null;i!==null;){if(e=i.alternate,e!==null&&mo(e)===null){t.child=i;break}e=i.sibling,i.sibling=n,n=i,i=e}jc(t,!0,n,null,a,r);break;case`together`:jc(t,!1,null,null,void 0,r);break;default:t.memoizedState=null}return t.child}function Nc(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),nu|=t.lanes,(n&t.childLanes)===0)if(e!==null){if(ea(e,t,n,!1),(n&t.childLanes)===0)return null}else return null;if(e!==null&&t.child!==e.child)throw Error(i(153));if(t.child!==null){for(e=t.child,n=di(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=di(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function Pc(e,t){return(e.lanes&t)===0?(e=e.dependencies,!!(e!==null&&ta(e))):!0}function Fc(e,t,n){switch(t.tag){case 3:de(t,t.stateNode.containerInfo),Xi(t,la,e.memoizedState.cache),Wi();break;case 27:case 5:L(t);break;case 4:de(t,t.stateNode.containerInfo);break;case 10:Xi(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,co(t),null;break;case 13:var r=t.memoizedState;if(r!==null)return r.dehydrated===null?(n&t.child.childLanes)===0?(so(t),e=Nc(e,t,n),e===null?null:e.sibling):Dc(e,t,n):(so(t),t.flags|=128,null);so(t);break;case 19:var i=(e.flags&128)!=0;if(r=(n&t.childLanes)!==0,r||=(ea(e,t,n,!1),(n&t.childLanes)!==0),i){if(r)return Mc(e,t,n);t.flags|=128}if(i=t.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),oe(po,po.current),r)break;return null;case 22:return t.lanes=0,pc(e,t,n,t.pendingProps);case 24:Xi(t,la,e.memoizedState.cache)}return Nc(e,t,n)}function Ic(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps)cc=!0;else{if(!Pc(e,n)&&!(t.flags&128))return cc=!1,Fc(e,t,n);cc=!!(e.flags&131072)}else cc=!1,Ii&&t.flags&1048576&&Ai(t,Ci,t.index);switch(t.lanes=0,t.tag){case 16:a:{var r=t.pendingProps;if(e=Aa(t.elementType),t.type=e,typeof e==`function`)ui(e)?(r=Qs(e,r),t.tag=1,t=Sc(null,t,e,r,n)):(t.tag=0,t=bc(null,t,e,r,n));else{if(e!=null){var a=e.$$typeof;if(a===w){t.tag=11,t=uc(null,t,e,r,n);break a}else if(a===D){t.tag=14,t=dc(null,t,e,r,n);break a}}throw t=P(e)||e,Error(i(306,t,``))}}return t;case 0:return bc(e,t,t.type,t.pendingProps,n);case 1:return r=t.type,a=Qs(r,t.pendingProps),Sc(e,t,r,a,n);case 3:a:{if(de(t,t.stateNode.containerInfo),e===null)throw Error(i(387));r=t.pendingProps;var o=t.memoizedState;a=o.element,Wa(e,t),Za(t,r,null,n);var s=t.memoizedState;if(r=s.cache,Xi(t,la,r),r!==o.cache&&$i(t,[la],n,!0),Xa(),r=s.element,o.isDehydrated)if(o={element:r,isDehydrated:!1,cache:s.cache},t.updateQueue.baseState=o,t.memoizedState=o,t.flags&256){t=Cc(e,t,r,n);break a}else if(r!==a){a=yi(Error(i(424)),t),Ki(a),t=Cc(e,t,r,n);break a}else{switch(e=t.stateNode.containerInfo,e.nodeType){case 9:e=e.body;break;default:e=e.nodeName===`HTML`?e.ownerDocument.body:e}for(Fi=xf(e.firstChild),Pi=t,Ii=!0,Li=null,Ri=!0,n=Va(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling}else{if(Wi(),r===a){t=Nc(e,t,n);break a}lc(e,t,r,n)}t=t.child}return t;case 26:return yc(e,t),e===null?(n=Hf(t.type,null,t.pendingProps,null))?t.memoizedState=n:Ii||(n=t.type,e=t.pendingProps,r=$d(le.current).createElement(n),r[st]=t,r[ct]=e,qd(r,n,e),bt(r),t.stateNode=r):t.memoizedState=Hf(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return L(t),e===null&&Ii&&(r=t.stateNode=Tf(t.type,t.pendingProps,le.current),Pi=t,Ri=!0,a=Fi,df(t.type)?(Sf=a,Fi=xf(r.firstChild)):Fi=a),lc(e,t,t.pendingProps.children,n),yc(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&Ii&&((a=r=Fi)&&(r=hf(r,t.type,t.pendingProps,Ri),r===null?a=!1:(t.stateNode=r,Pi=t,Fi=xf(r.firstChild),Ri=!1,a=!0)),a||Bi(t)),L(t),a=t.type,o=t.pendingProps,s=e===null?null:e.memoizedProps,r=o.children,nf(a,o)?r=null:s!==null&&nf(a,s)&&(t.flags|=32),t.memoizedState!==null&&(a=Oo(e,t,jo,null,null,n),dp._currentValue=a),yc(e,t),lc(e,t,r,n),t.child;case 6:return e===null&&Ii&&((e=n=Fi)&&(n=gf(n,t.pendingProps,Ri),n===null?e=!1:(t.stateNode=n,Pi=t,Fi=null,e=!0)),e||Bi(t)),null;case 13:return Dc(e,t,n);case 4:return de(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=Ba(t,null,r,n):lc(e,t,r,n),t.child;case 11:return uc(e,t,t.type,t.pendingProps,n);case 7:return lc(e,t,t.pendingProps,n),t.child;case 8:return lc(e,t,t.pendingProps.children,n),t.child;case 12:return lc(e,t,t.pendingProps.children,n),t.child;case 10:return r=t.pendingProps,Xi(t,t.type,r.value),lc(e,t,r.children,n),t.child;case 9:return a=t.type._context,r=t.pendingProps.children,na(t),a=ra(a),r=r(a),t.flags|=1,lc(e,t,r,n),t.child;case 14:return dc(e,t,t.type,t.pendingProps,n);case 15:return fc(e,t,t.type,t.pendingProps,n);case 19:return Mc(e,t,n);case 31:return vc(e,t,n);case 22:return pc(e,t,n,t.pendingProps);case 24:return na(t),r=ra(la),e===null?(a=xa(),a===null&&(a=Kl,o=ua(),a.pooledCache=o,o.refCount++,o!==null&&(a.pooledCacheLanes|=n),a=o),t.memoizedState={parent:r,cache:a},Ua(t),Xi(t,la,a)):((e.lanes&n)!==0&&(Wa(e,t),Za(t,null,null,n),Xa()),a=e.memoizedState,o=t.memoizedState,a.parent===r?(r=o.cache,Xi(t,la,r),r!==a.cache&&$i(t,[la],n,!0)):(a={parent:r,cache:r},t.memoizedState=a,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=a),Xi(t,la,r))),lc(e,t,t.pendingProps.children,n),t.child;case 29:throw t.pendingProps}throw Error(i(156,t.tag))}function Lc(e){e.flags|=4}function Rc(e,t,n,r,i){if((t=(e.mode&32)!=0)&&(t=!1),t){if(e.flags|=16777216,(i&335544128)===i)if(e.stateNode.complete)e.flags|=8192;else if(Pu())e.flags|=8192;else throw ja=Da,Ta}else e.flags&=-16777217}function zc(e,t){if(t.type!==`stylesheet`||t.state.loading&4)e.flags&=-16777217;else if(e.flags|=16777216,!rp(t))if(Pu())e.flags|=8192;else throw ja=Da,Ta}function Bc(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag===22?536870912:Ye(),e.lanes|=t,ou|=t)}function Vc(e,t){if(!Ii)switch(e.tailMode){case`hidden`:t=e.tail;for(var n=null;t!==null;)t.alternate!==null&&(n=t),t=t.sibling;n===null?e.tail=null:n.sibling=null;break;case`collapsed`:n=e.tail;for(var r=null;n!==null;)n.alternate!==null&&(r=n),n=n.sibling;r===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:r.sibling=null}}function Hc(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,r=0;if(t)for(var i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags&65011712,r|=i.flags&65011712,i.return=e,i=i.sibling;else for(i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags,r|=i.flags,i.return=e,i=i.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function Uc(e,t,n){var r=t.pendingProps;switch(Mi(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Hc(t),null;case 1:return Hc(t),null;case 3:return n=t.stateNode,r=null,e!==null&&(r=e.memoizedState.cache),t.memoizedState.cache!==r&&(t.flags|=2048),Zi(la),fe(),n.pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),(e===null||e.child===null)&&(Ui(t)?Lc(t):e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,Gi())),Hc(t),null;case 26:var a=t.type,o=t.memoizedState;return e===null?(Lc(t),o===null?(Hc(t),Rc(t,a,null,r,n)):(Hc(t),zc(t,o))):o?o===e.memoizedState?(Hc(t),t.flags&=-16777217):(Lc(t),Hc(t),zc(t,o)):(e=e.memoizedProps,e!==r&&Lc(t),Hc(t),Rc(t,a,e,r,n)),null;case 27:if(pe(t),n=le.current,a=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==r&&Lc(t);else{if(!r){if(t.stateNode===null)throw Error(i(166));return Hc(t),null}e=se.current,Ui(t)?Vi(t,e):(e=Tf(a,r,n),t.stateNode=e,Lc(t))}return Hc(t),null;case 5:if(pe(t),a=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==r&&Lc(t);else{if(!r){if(t.stateNode===null)throw Error(i(166));return Hc(t),null}if(o=se.current,Ui(t))Vi(t,o);else{var s=$d(le.current);switch(o){case 1:o=s.createElementNS(`http://www.w3.org/2000/svg`,a);break;case 2:o=s.createElementNS(`http://www.w3.org/1998/Math/MathML`,a);break;default:switch(a){case`svg`:o=s.createElementNS(`http://www.w3.org/2000/svg`,a);break;case`math`:o=s.createElementNS(`http://www.w3.org/1998/Math/MathML`,a);break;case`script`:o=s.createElement(`div`),o.innerHTML=`<script><\/script>`,o=o.removeChild(o.firstChild);break;case`select`:o=typeof r.is==`string`?s.createElement(`select`,{is:r.is}):s.createElement(`select`),r.multiple?o.multiple=!0:r.size&&(o.size=r.size);break;default:o=typeof r.is==`string`?s.createElement(a,{is:r.is}):s.createElement(a)}}o[st]=t,o[ct]=r;a:for(s=t.child;s!==null;){if(s.tag===5||s.tag===6)o.appendChild(s.stateNode);else if(s.tag!==4&&s.tag!==27&&s.child!==null){s.child.return=s,s=s.child;continue}if(s===t)break a;for(;s.sibling===null;){if(s.return===null||s.return===t)break a;s=s.return}s.sibling.return=s.return,s=s.sibling}t.stateNode=o;a:switch(qd(o,a,r),a){case`button`:case`input`:case`select`:case`textarea`:r=!!r.autoFocus;break a;case`img`:r=!0;break a;default:r=!1}r&&Lc(t)}}return Hc(t),Rc(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,n),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==r&&Lc(t);else{if(typeof r!=`string`&&t.stateNode===null)throw Error(i(166));if(e=le.current,Ui(t)){if(e=t.stateNode,n=t.memoizedProps,r=null,a=Pi,a!==null)switch(a.tag){case 27:case 5:r=a.memoizedProps}e[st]=t,e=!!(e.nodeValue===n||r!==null&&!0===r.suppressHydrationWarning||Wd(e.nodeValue,n)),e||Bi(t,!0)}else e=$d(e).createTextNode(r),e[st]=t,t.stateNode=e}return Hc(t),null;case 31:if(n=t.memoizedState,e===null||e.memoizedState!==null){if(r=Ui(t),n!==null){if(e===null){if(!r)throw Error(i(318));if(e=t.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(i(557));e[st]=t}else Wi(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;Hc(t),e=!1}else n=Gi(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=n),e=!0;if(!e)return t.flags&256?(fo(t),t):(fo(t),null);if(t.flags&128)throw Error(i(558))}return Hc(t),null;case 13:if(r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(a=Ui(t),r!==null&&r.dehydrated!==null){if(e===null){if(!a)throw Error(i(318));if(a=t.memoizedState,a=a===null?null:a.dehydrated,!a)throw Error(i(317));a[st]=t}else Wi(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;Hc(t),a=!1}else a=Gi(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=a),a=!0;if(!a)return t.flags&256?(fo(t),t):(fo(t),null)}return fo(t),t.flags&128?(t.lanes=n,t):(n=r!==null,e=e!==null&&e.memoizedState!==null,n&&(r=t.child,a=null,r.alternate!==null&&r.alternate.memoizedState!==null&&r.alternate.memoizedState.cachePool!==null&&(a=r.alternate.memoizedState.cachePool.pool),o=null,r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(o=r.memoizedState.cachePool.pool),o!==a&&(r.flags|=2048)),n!==e&&n&&(t.child.flags|=8192),Bc(t,t.updateQueue),Hc(t),null);case 4:return fe(),e===null&&Pd(t.stateNode.containerInfo),Hc(t),null;case 10:return Zi(t.type),Hc(t),null;case 19:if(ae(po),r=t.memoizedState,r===null)return Hc(t),null;if(a=(t.flags&128)!=0,o=r.rendering,o===null)if(a)Vc(r,!1);else{if(tu!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(o=mo(e),o!==null){for(t.flags|=128,Vc(r,!1),e=o.updateQueue,t.updateQueue=e,Bc(t,e),t.subtreeFlags=0,e=n,n=t.child;n!==null;)fi(n,e),n=n.sibling;return oe(po,po.current&1|2),Ii&&ki(t,r.treeForkCount),t.child}e=e.sibling}r.tail!==null&&Ee()>fu&&(t.flags|=128,a=!0,Vc(r,!1),t.lanes=4194304)}else{if(!a)if(e=mo(o),e!==null){if(t.flags|=128,a=!0,e=e.updateQueue,t.updateQueue=e,Bc(t,e),Vc(r,!0),r.tail===null&&r.tailMode===`hidden`&&!o.alternate&&!Ii)return Hc(t),null}else 2*Ee()-r.renderingStartTime>fu&&n!==536870912&&(t.flags|=128,a=!0,Vc(r,!1),t.lanes=4194304);r.isBackwards?(o.sibling=t.child,t.child=o):(e=r.last,e===null?t.child=o:e.sibling=o,r.last=o)}return r.tail===null?(Hc(t),null):(e=r.tail,r.rendering=e,r.tail=e.sibling,r.renderingStartTime=Ee(),e.sibling=null,n=po.current,oe(po,a?n&1|2:n&1),Ii&&ki(t,r.treeForkCount),e);case 22:case 23:return fo(t),io(),r=t.memoizedState!==null,e===null?r&&(t.flags|=8192):e.memoizedState!==null!==r&&(t.flags|=8192),r?n&536870912&&!(t.flags&128)&&(Hc(t),t.subtreeFlags&6&&(t.flags|=8192)):Hc(t),n=t.updateQueue,n!==null&&Bc(t,n.retryQueue),n=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),r=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(r=t.memoizedState.cachePool.pool),r!==n&&(t.flags|=2048),e!==null&&ae(ba),null;case 24:return n=null,e!==null&&(n=e.memoizedState.cache),t.memoizedState.cache!==n&&(t.flags|=2048),Zi(la),Hc(t),null;case 25:return null;case 30:return null}throw Error(i(156,t.tag))}function Wc(e,t){switch(Mi(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Zi(la),fe(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return pe(t),null;case 31:if(t.memoizedState!==null){if(fo(t),t.alternate===null)throw Error(i(340));Wi()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(fo(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(i(340));Wi()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return ae(po),null;case 4:return fe(),null;case 10:return Zi(t.type),null;case 22:case 23:return fo(t),io(),e!==null&&ae(ba),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return Zi(la),null;case 25:return null;default:return null}}function Gc(e,t){switch(Mi(t),t.tag){case 3:Zi(la),fe();break;case 26:case 27:case 5:pe(t);break;case 4:fe();break;case 31:t.memoizedState!==null&&fo(t);break;case 13:fo(t);break;case 19:ae(po);break;case 10:Zi(t.type);break;case 22:case 23:fo(t),io(),e!==null&&ae(ba);break;case 24:Zi(la)}}function Kc(e,t){try{var n=t.updateQueue,r=n===null?null:n.lastEffect;if(r!==null){var i=r.next;n=i;do{if((n.tag&e)===e){r=void 0;var a=n.create,o=n.inst;r=a(),o.destroy=r}n=n.next}while(n!==i)}}catch(e){td(t,t.return,e)}}function qc(e,t,n){try{var r=t.updateQueue,i=r===null?null:r.lastEffect;if(i!==null){var a=i.next;r=a;do{if((r.tag&e)===e){var o=r.inst,s=o.destroy;if(s!==void 0){o.destroy=void 0,i=t;var c=n,l=s;try{l()}catch(e){td(i,c,e)}}}r=r.next}while(r!==a)}}catch(e){td(t,t.return,e)}}function Jc(e){var t=e.updateQueue;if(t!==null){var n=e.stateNode;try{$a(t,n)}catch(t){td(e,e.return,t)}}}function Yc(e,t,n){n.props=Qs(e.type,e.memoizedProps),n.state=e.memoizedState;try{n.componentWillUnmount()}catch(n){td(e,t,n)}}function Xc(e,t){try{var n=e.ref;if(n!==null){switch(e.tag){case 26:case 27:case 5:var r=e.stateNode;break;case 30:r=e.stateNode;break;default:r=e.stateNode}typeof n==`function`?e.refCleanup=n(r):n.current=r}}catch(n){td(e,t,n)}}function Zc(e,t){var n=e.ref,r=e.refCleanup;if(n!==null)if(typeof r==`function`)try{r()}catch(n){td(e,t,n)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof n==`function`)try{n(null)}catch(n){td(e,t,n)}else n.current=null}function Qc(e){var t=e.type,n=e.memoizedProps,r=e.stateNode;try{a:switch(t){case`button`:case`input`:case`select`:case`textarea`:n.autoFocus&&r.focus();break a;case`img`:n.src?r.src=n.src:n.srcSet&&(r.srcset=n.srcSet)}}catch(t){td(e,e.return,t)}}function $c(e,t,n){try{var r=e.stateNode;Jd(r,e.type,n,t),r[ct]=t}catch(t){td(e,e.return,t)}}function el(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&df(e.type)||e.tag===4}function tl(e){a:for(;;){for(;e.sibling===null;){if(e.return===null||el(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.tag===27&&df(e.type)||e.flags&2||e.child===null||e.tag===4)continue a;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function nl(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?(n.nodeType===9?n.body:n.nodeName===`HTML`?n.ownerDocument.body:n).insertBefore(e,t):(t=n.nodeType===9?n.body:n.nodeName===`HTML`?n.ownerDocument.body:n,t.appendChild(e),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=en));else if(r!==4&&(r===27&&df(e.type)&&(n=e.stateNode,t=null),e=e.child,e!==null))for(nl(e,t,n),e=e.sibling;e!==null;)nl(e,t,n),e=e.sibling}function rl(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(r===27&&df(e.type)&&(n=e.stateNode),e=e.child,e!==null))for(rl(e,t,n),e=e.sibling;e!==null;)rl(e,t,n),e=e.sibling}function il(e){var t=e.stateNode,n=e.memoizedProps;try{for(var r=e.type,i=t.attributes;i.length;)t.removeAttributeNode(i[0]);qd(t,r,n),t[st]=e,t[ct]=n}catch(t){td(e,e.return,t)}}var al=!1,ol=!1,sl=!1,cl=typeof WeakSet==`function`?WeakSet:Set,ll=null;function ul(e,t){if(e=e.containerInfo,Zd=bp,e=Or(e),kr(e)){if(`selectionStart`in e)var n={start:e.selectionStart,end:e.selectionEnd};else a:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var a=r.anchorOffset,o=r.focusNode;r=r.focusOffset;try{n.nodeType,o.nodeType}catch{n=null;break a}var s=0,c=-1,l=-1,u=0,d=0,f=e,p=null;b:for(;;){for(var m;f!==n||a!==0&&f.nodeType!==3||(c=s+a),f!==o||r!==0&&f.nodeType!==3||(l=s+r),f.nodeType===3&&(s+=f.nodeValue.length),(m=f.firstChild)!==null;)p=f,f=m;for(;;){if(f===e)break b;if(p===n&&++u===a&&(c=s),p===o&&++d===r&&(l=s),(m=f.nextSibling)!==null)break;f=p,p=f.parentNode}f=m}n=c===-1||l===-1?null:{start:c,end:l}}else n=null}n||={start:0,end:0}}else n=null;for(Qd={focusedElem:e,selectionRange:n},bp=!1,ll=t;ll!==null;)if(t=ll,e=t.child,t.subtreeFlags&1028&&e!==null)e.return=t,ll=e;else for(;ll!==null;){switch(t=ll,o=t.alternate,e=t.flags,t.tag){case 0:if(e&4&&(e=t.updateQueue,e=e===null?null:e.events,e!==null))for(n=0;n<e.length;n++)a=e[n],a.ref.impl=a.nextImpl;break;case 11:case 15:break;case 1:if(e&1024&&o!==null){e=void 0,n=t,a=o.memoizedProps,o=o.memoizedState,r=n.stateNode;try{var h=Qs(n.type,a);e=r.getSnapshotBeforeUpdate(h,o),r.__reactInternalSnapshotBeforeUpdate=e}catch(e){td(n,n.return,e)}}break;case 3:if(e&1024){if(e=t.stateNode.containerInfo,n=e.nodeType,n===9)mf(e);else if(n===1)switch(e.nodeName){case`HEAD`:case`HTML`:case`BODY`:mf(e);break;default:e.textContent=``}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if(e&1024)throw Error(i(163))}if(e=t.sibling,e!==null){e.return=t.return,ll=e;break}ll=t.return}}function dl(e,t,n){var r=n.flags;switch(n.tag){case 0:case 11:case 15:El(e,n),r&4&&Kc(5,n);break;case 1:if(El(e,n),r&4)if(e=n.stateNode,t===null)try{e.componentDidMount()}catch(e){td(n,n.return,e)}else{var i=Qs(n.type,t.memoizedProps);t=t.memoizedState;
vendor: 5,412 bytes, line 8
8try{e.componentDidUpdate(i,t,e.__reactInternalSnapshotBeforeUpdate)}catch(e){td(n,n.return,e)}}r&64&&Jc(n),r&512&&Xc(n,n.return);break;case 3:if(El(e,n),r&64&&(e=n.updateQueue,e!==null)){if(t=null,n.child!==null)switch(n.child.tag){case 27:case 5:t=n.child.stateNode;break;case 1:t=n.child.stateNode}try{$a(e,t)}catch(e){td(n,n.return,e)}}break;case 27:t===null&&r&4&&il(n);case 26:case 5:El(e,n),t===null&&r&4&&Qc(n),r&512&&Xc(n,n.return);break;case 12:El(e,n);break;case 31:El(e,n),r&4&&_l(e,n);break;case 13:El(e,n),r&4&&vl(e,n),r&64&&(e=n.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(n=ad.bind(null,n),bf(e,n))));break;case 22:if(r=n.memoizedState!==null||al,!r){t=t!==null&&t.memoizedState!==null||ol,i=al;var a=ol;al=r,(ol=t)&&!a?Ol(e,n,(n.subtreeFlags&8772)!=0):El(e,n),al=i,ol=a}break;case 30:break;default:El(e,n)}}function fl(e){var t=e.alternate;t!==null&&(e.alternate=null,fl(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&ht(t)),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}var pl=null,ml=!1;function hl(e,t,n){for(n=n.child;n!==null;)gl(e,t,n),n=n.sibling}function gl(e,t,n){if(Ie&&typeof Ie.onCommitFiberUnmount==`function`)try{Ie.onCommitFiberUnmount(Fe,n)}catch{}switch(n.tag){case 26:ol||Zc(n,t),hl(e,t,n),n.memoizedState?n.memoizedState.count--:n.stateNode&&(n=n.stateNode,n.parentNode.removeChild(n));break;case 27:ol||Zc(n,t);var r=pl,i=ml;df(n.type)&&(pl=n.stateNode,ml=!1),hl(e,t,n),Ef(n.stateNode),pl=r,ml=i;break;case 5:ol||Zc(n,t);case 6:if(r=pl,i=ml,pl=null,hl(e,t,n),pl=r,ml=i,pl!==null)if(ml)try{(pl.nodeType===9?pl.body:pl.nodeName===`HTML`?pl.ownerDocument.body:pl).removeChild(n.stateNode)}catch(e){td(n,t,e)}else try{pl.removeChild(n.stateNode)}catch(e){td(n,t,e)}break;case 18:pl!==null&&(ml?(e=pl,ff(e.nodeType===9?e.body:e.nodeName===`HTML`?e.ownerDocument.body:e,n.stateNode),Kp(e)):ff(pl,n.stateNode));break;case 4:r=pl,i=ml,pl=n.stateNode.containerInfo,ml=!0,hl(e,t,n),pl=r,ml=i;break;case 0:case 11:case 14:case 15:qc(2,n,t),ol||qc(4,n,t),hl(e,t,n);break;case 1:ol||(Zc(n,t),r=n.stateNode,typeof r.componentWillUnmount==`function`&&Yc(n,t,r)),hl(e,t,n);break;case 21:hl(e,t,n);break;case 22:ol=(r=ol)||n.memoizedState!==null,hl(e,t,n),ol=r;break;default:hl(e,t,n)}}function _l(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{Kp(e)}catch(e){td(t,t.return,e)}}}function vl(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{Kp(e)}catch(e){td(t,t.return,e)}}function yl(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new cl),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new cl),t;default:throw Error(i(435,e.tag))}}function bl(e,t){var n=yl(e);t.forEach(function(t){if(!n.has(t)){n.add(t);var r=od.bind(null,e,t);t.then(r,r)}})}function xl(e,t){var n=t.deletions;if(n!==null)for(var r=0;r<n.length;r++){var a=n[r],o=e,s=t,c=s;a:for(;c!==null;){switch(c.tag){case 27:if(df(c.type)){pl=c.stateNode,ml=!1;break a}break;case 5:pl=c.stateNode,ml=!1;break a;case 3:case 4:pl=c.stateNode.containerInfo,ml=!0;break a}c=c.return}if(pl===null)throw Error(i(160));gl(o,s,a),pl=null,ml=!1,o=a.alternate,o!==null&&(o.return=null),a.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)Cl(t,e),t=t.sibling}var Sl=null;function Cl(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:xl(t,e),wl(e),r&4&&(qc(3,e,e.return),Kc(3,e),qc(5,e,e.return));break;case 1:xl(t,e),wl(e),r&512&&(ol||n===null||Zc(n,n.return)),r&64&&al&&(e=e.updateQueue,e!==null&&(r=e.callbacks,r!==null&&(n=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=n===null?r:n.concat(r))));break;case 26:var a=Sl;if(xl(t,e),wl(e),r&512&&(ol||n===null||Zc(n,n.return)),r&4){var o=n===null?null:n.memoizedState;if(r=e.memoizedState,n===null)if(r===null)if(e.stateNode===null){a:{r=e.type,n=e.memoizedProps,a=a.ownerDocument||a;b:switch(r){case`title`:o=a.getElementsByTagName(`title`)[0],(!o||o[mt]||o[st]||o.namespaceURI===`http://www.w3.org/2000/svg`||o.hasAttribute(`itemprop`))&&(o=a.createElement(r),a.head.insertBefore(o,a.querySelector(`head > title`))),qd(o,r,n),o[st]=e,bt(o),r=o;break a;case`link`:var s=ep(`link`,`href`,a).get(r+(n.href||``));if(s){for(var c=0;c<s.length;c++)if(o=s[c],o.getAttribute(`href`)===(n.href==null||n.href===``?null:n.href)&&o.getAttribute(`rel`)===(n.rel==null?null:n.rel)&&o.getAttribute(`title`)===(n.title==null?null:n.title)&&o.getAttribute(`crossorigin`)===(n.crossOrigin==null?null:n.crossOrigin)){s.splice(c,1);break b}}o=a.createElement(r),qd(o,r,n),a.head.appendChild(o);break;case`meta`:if(s=ep(`meta`,`content`,a).get(r+(n.content||``))){for(c=0;c<s.length;c++)if(o=s[c],o.getAttribute(`content`)===(n.content==null?null:``+n.content)&&o.getAttribute(`name`)===(n.name==null?null:n.name)&&o.getAttribute(`property`)===(n.property==null?null:n.property)&&o.getAttribute(`http-equiv`)===(n.httpEquiv==null?null:n.httpEquiv)&&o.getAttribute(`charset`)===(n.charSet==null?null:n.charSet)){s.splice(c,1);break b}}o=a.createElement(r),qd(o,r,n),a.head.appendChild(o);break;default:throw Error(i(468,r))}o[st]=e,bt(o),r=o}e.stateNode=r}else tp(a,e.type,e.stateNode);else e.stateNode=Yf(a,r,e.memoizedProps);
vendor: 23,242 bytes, line 8
8else o===r?r===null&&e.stateNode!==null&&$c(e,e.memoizedProps,n.memoizedProps):(o===null?n.stateNode!==null&&(n=n.stateNode,n.parentNode.removeChild(n)):o.count--,r===null?tp(a,e.type,e.stateNode):Yf(a,r,e.memoizedProps))}break;case 27:xl(t,e),wl(e),r&512&&(ol||n===null||Zc(n,n.return)),n!==null&&r&4&&$c(e,e.memoizedProps,n.memoizedProps);break;case 5:if(xl(t,e),wl(e),r&512&&(ol||n===null||Zc(n,n.return)),e.flags&32){a=e.stateNode;try{Kt(a,``)}catch(t){td(e,e.return,t)}}r&4&&e.stateNode!=null&&(a=e.memoizedProps,$c(e,a,n===null?a:n.memoizedProps)),r&1024&&(sl=!0);break;case 6:if(xl(t,e),wl(e),r&4){if(e.stateNode===null)throw Error(i(162));r=e.memoizedProps,n=e.stateNode;try{n.nodeValue=r}catch(t){td(e,e.return,t)}}break;case 3:if($f=null,a=Sl,Sl=kf(t.containerInfo),xl(t,e),Sl=a,wl(e),r&4&&n!==null&&n.memoizedState.isDehydrated)try{Kp(t.containerInfo)}catch(t){td(e,e.return,t)}sl&&(sl=!1,Tl(e));break;case 4:r=Sl,Sl=kf(e.stateNode.containerInfo),xl(t,e),wl(e),Sl=r;break;case 12:xl(t,e),wl(e);break;case 31:xl(t,e),wl(e),r&4&&(r=e.updateQueue,r!==null&&(e.updateQueue=null,bl(e,r)));break;case 13:xl(t,e),wl(e),e.child.flags&8192&&e.memoizedState!==null!=(n!==null&&n.memoizedState!==null)&&(uu=Ee()),r&4&&(r=e.updateQueue,r!==null&&(e.updateQueue=null,bl(e,r)));break;case 22:a=e.memoizedState!==null;var l=n!==null&&n.memoizedState!==null,u=al,d=ol;if(al=u||a,ol=d||l,xl(t,e),ol=d,al=u,wl(e),r&8192)a:for(t=e.stateNode,t._visibility=a?t._visibility&-2:t._visibility|1,a&&(n===null||l||al||ol||Dl(e)),n=null,t=e;;){if(t.tag===5||t.tag===26){if(n===null){l=n=t;try{if(o=l.stateNode,a)s=o.style,typeof s.setProperty==`function`?s.setProperty(`display`,`none`,`important`):s.display=`none`;else{c=l.stateNode;var f=l.memoizedProps.style,p=f!=null&&f.hasOwnProperty(`display`)?f.display:null;c.style.display=p==null||typeof p==`boolean`?``:(``+p).trim()}}catch(e){td(l,l.return,e)}}}else if(t.tag===6){if(n===null){l=t;try{l.stateNode.nodeValue=a?``:l.memoizedProps}catch(e){td(l,l.return,e)}}}else if(t.tag===18){if(n===null){l=t;try{var m=l.stateNode;a?pf(m,!0):pf(l.stateNode,!1)}catch(e){td(l,l.return,e)}}}else if((t.tag!==22&&t.tag!==23||t.memoizedState===null||t===e)&&t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break a;for(;t.sibling===null;){if(t.return===null||t.return===e)break a;n===t&&(n=null),t=t.return}n===t&&(n=null),t.sibling.return=t.return,t=t.sibling}r&4&&(r=e.updateQueue,r!==null&&(n=r.retryQueue,n!==null&&(r.retryQueue=null,bl(e,n))));break;case 19:xl(t,e),wl(e),r&4&&(r=e.updateQueue,r!==null&&(e.updateQueue=null,bl(e,r)));break;case 30:break;case 21:break;default:xl(t,e),wl(e)}}function wl(e){var t=e.flags;if(t&2){try{for(var n,r=e.return;r!==null;){if(el(r)){n=r;break}r=r.return}if(n==null)throw Error(i(160));switch(n.tag){case 27:var a=n.stateNode;rl(e,tl(e),a);break;case 5:var o=n.stateNode;n.flags&32&&(Kt(o,``),n.flags&=-33),rl(e,tl(e),o);break;case 3:case 4:var s=n.stateNode.containerInfo;nl(e,tl(e),s);break;default:throw Error(i(161))}}catch(t){td(e,e.return,t)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function Tl(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;Tl(t),t.tag===5&&t.flags&1024&&t.stateNode.reset(),e=e.sibling}}function El(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)dl(e,t.alternate,t),t=t.sibling}function Dl(e){for(e=e.child;e!==null;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:qc(4,t,t.return),Dl(t);break;case 1:Zc(t,t.return);var n=t.stateNode;typeof n.componentWillUnmount==`function`&&Yc(t,t.return,n),Dl(t);break;case 27:Ef(t.stateNode);case 26:case 5:Zc(t,t.return),Dl(t);break;case 22:t.memoizedState===null&&Dl(t);break;case 30:Dl(t);break;default:Dl(t)}e=e.sibling}}function Ol(e,t,n){for(n&&=(t.subtreeFlags&8772)!=0,t=t.child;t!==null;){var r=t.alternate,i=e,a=t,o=a.flags;switch(a.tag){case 0:case 11:case 15:Ol(i,a,n),Kc(4,a);break;case 1:if(Ol(i,a,n),r=a,i=r.stateNode,typeof i.componentDidMount==`function`)try{i.componentDidMount()}catch(e){td(r,r.return,e)}if(r=a,i=r.updateQueue,i!==null){var s=r.stateNode;try{var c=i.shared.hiddenCallbacks;if(c!==null)for(i.shared.hiddenCallbacks=null,i=0;i<c.length;i++)Qa(c[i],s)}catch(e){td(r,r.return,e)}}n&&o&64&&Jc(a),Xc(a,a.return);break;case 27:il(a);case 26:case 5:Ol(i,a,n),n&&r===null&&o&4&&Qc(a),Xc(a,a.return);break;case 12:Ol(i,a,n);break;case 31:Ol(i,a,n),n&&o&4&&_l(i,a);break;case 13:Ol(i,a,n),n&&o&4&&vl(i,a);break;case 22:a.memoizedState===null&&Ol(i,a,n),Xc(a,a.return);break;case 30:break;default:Ol(i,a,n)}t=t.sibling}}function kl(e,t){var n=null;e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),e=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(e=t.memoizedState.cachePool.pool),e!==n&&(e!=null&&e.refCount++,n!=null&&da(n))}function Al(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&da(e))}function jl(e,t,n,r){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)Ml(e,t,n,r),t=t.sibling}function Ml(e,t,n,r){var i=t.flags;switch(t.tag){case 0:case 11:case 15:jl(e,t,n,r),i&2048&&Kc(9,t);break;case 1:jl(e,t,n,r);break;case 3:jl(e,t,n,r),i&2048&&(e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&da(e)));break;case 12:if(i&2048){jl(e,t,n,r),e=t.stateNode;try{var a=t.memoizedProps,o=a.id,s=a.onPostCommit;typeof s==`function`&&s(o,t.alternate===null?`mount`:`update`,e.passiveEffectDuration,-0)}catch(e){td(t,t.return,e)}}else jl(e,t,n,r);break;case 31:jl(e,t,n,r);break;case 13:jl(e,t,n,r);break;case 23:break;case 22:a=t.stateNode,o=t.alternate,t.memoizedState===null?a._visibility&2?jl(e,t,n,r):(a._visibility|=2,Nl(e,t,n,r,(t.subtreeFlags&10256)!=0||!1)):a._visibility&2?jl(e,t,n,r):Pl(e,t),i&2048&&kl(o,t);break;case 24:jl(e,t,n,r),i&2048&&Al(t.alternate,t);break;default:jl(e,t,n,r)}}function Nl(e,t,n,r,i){for(i&&=(t.subtreeFlags&10256)!=0||!1,t=t.child;t!==null;){var a=e,o=t,s=n,c=r,l=o.flags;switch(o.tag){case 0:case 11:case 15:Nl(a,o,s,c,i),Kc(8,o);break;case 23:break;case 22:var u=o.stateNode;o.memoizedState===null?(u._visibility|=2,Nl(a,o,s,c,i)):u._visibility&2?Nl(a,o,s,c,i):Pl(a,o),i&&l&2048&&kl(o.alternate,o);break;case 24:Nl(a,o,s,c,i),i&&l&2048&&Al(o.alternate,o);break;default:Nl(a,o,s,c,i)}t=t.sibling}}function Pl(e,t){if(t.subtreeFlags&10256)for(t=t.child;t!==null;){var n=e,r=t,i=r.flags;switch(r.tag){case 22:Pl(n,r),i&2048&&kl(r.alternate,r);break;case 24:Pl(n,r),i&2048&&Al(r.alternate,r);break;default:Pl(n,r)}t=t.sibling}}var Fl=8192;function Il(e,t,n){if(e.subtreeFlags&Fl)for(e=e.child;e!==null;)Ll(e,t,n),e=e.sibling}function Ll(e,t,n){switch(e.tag){case 26:Il(e,t,n),e.flags&Fl&&e.memoizedState!==null&&ip(n,Sl,e.memoizedState,e.memoizedProps);break;case 5:Il(e,t,n);break;case 3:case 4:var r=Sl;Sl=kf(e.stateNode.containerInfo),Il(e,t,n),Sl=r;break;case 22:e.memoizedState===null&&(r=e.alternate,r!==null&&r.memoizedState!==null?(r=Fl,Fl=16777216,Il(e,t,n),Fl=r):Il(e,t,n));break;default:Il(e,t,n)}}function Rl(e){var t=e.alternate;if(t!==null&&(e=t.child,e!==null)){t.child=null;do t=e.sibling,e.sibling=null,e=t;while(e!==null)}}function zl(e){var t=e.deletions;if(e.flags&16){if(t!==null)for(var n=0;n<t.length;n++){var r=t[n];ll=r,Hl(r,e)}Rl(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)Bl(e),e=e.sibling}function Bl(e){switch(e.tag){case 0:case 11:case 15:zl(e),e.flags&2048&&qc(9,e,e.return);break;case 3:zl(e);break;case 12:zl(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,Vl(e)):zl(e);break;default:zl(e)}}function Vl(e){var t=e.deletions;if(e.flags&16){if(t!==null)for(var n=0;n<t.length;n++){var r=t[n];ll=r,Hl(r,e)}Rl(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:qc(8,t,t.return),Vl(t);break;case 22:n=t.stateNode,n._visibility&2&&(n._visibility&=-3,Vl(t));break;default:Vl(t)}e=e.sibling}}function Hl(e,t){for(;ll!==null;){var n=ll;switch(n.tag){case 0:case 11:case 15:qc(8,n,t);break;case 23:case 22:if(n.memoizedState!==null&&n.memoizedState.cachePool!==null){var r=n.memoizedState.cachePool.pool;r!=null&&r.refCount++}break;case 24:da(n.memoizedState.cache)}if(r=n.child,r!==null)r.return=n,ll=r;else a:for(n=e;ll!==null;){r=ll;var i=r.sibling,a=r.return;if(fl(r),r===n){ll=null;break a}if(i!==null){i.return=a,ll=i;break a}ll=a}}}var Ul={getCacheForType:function(e){var t=ra(la),n=t.data.get(e);return n===void 0&&(n=e(),t.data.set(e,n)),n},cacheSignal:function(){return ra(la).controller.signal}},Wl=typeof WeakMap==`function`?WeakMap:Map,Gl=0,Kl=null,ql=null,Jl=0,Yl=0,Xl=null,Zl=!1,Ql=!1,$l=!1,eu=0,tu=0,nu=0,ru=0,iu=0,au=0,ou=0,su=null,cu=null,lu=!1,uu=0,du=0,fu=1/0,pu=null,mu=null,hu=0,gu=null,_u=null,vu=0,yu=0,bu=null,B=null,xu=0,Su=null;function Cu(){return Gl&2&&Jl!==0?Jl&-Jl:ee.T===null?it():Sd()}function wu(){if(au===0)if(!(Jl&536870912)||Ii){var e=Ue;Ue<<=1,!(Ue&3932160)&&(Ue=262144),au=e}else au=536870912;return e=ao.current,e!==null&&(e.flags|=32),au}function Tu(e,t,n){(e===Kl&&(Yl===2||Yl===9)||e.cancelPendingCommit!==null)&&(Mu(e,0),ku(e,Jl,au,!1)),Ze(e,n),(!(Gl&2)||e!==Kl)&&(e===Kl&&(!(Gl&2)&&(ru|=n),tu===4&&ku(e,Jl,au,!1)),md(e))}function Eu(e,t,n){if(Gl&6)throw Error(i(327));var r=!n&&(t&127)==0&&(t&e.expiredLanes)===0||qe(e,t),a=r?Bu(e,t):Ru(e,t,!0),o=r;do{if(a===0){Ql&&!r&&ku(e,t,0,!1);break}else{if(n=e.current.alternate,o&&!Ou(n)){a=Ru(e,t,!1),o=!1;continue}if(a===2){if(o=t,e.errorRecoveryDisabledLanes&o)var s=0;else s=e.pendingLanes&-536870913,s=s===0?s&536870912?536870912:0:s;if(s!==0){t=s;a:{var c=e;a=su;var l=c.current.memoizedState.isDehydrated;if(l&&(Mu(c,s).flags|=256),s=Ru(c,s,!1),s!==2){if($l&&!l){c.errorRecoveryDisabledLanes|=o,ru|=o,a=4;break a}o=cu,cu=a,o!==null&&(cu===null?cu=o:cu.push.apply(cu,o))}a=s}if(o=!1,a!==2)continue}}if(a===1){Mu(e,0),ku(e,t,0,!0);break}a:{switch(r=e,o=a,o){case 0:case 1:throw Error(i(345));case 4:if((t&4194048)!==t)break;case 6:ku(r,t,au,!Zl);break a;case 2:cu=null;break;case 3:case 5:break;default:throw Error(i(329))}if((t&62914560)===t&&(a=uu+300-Ee(),10<a)){if(ku(r,t,au,!Zl),Ke(r,0,!0)!==0)break a;vu=t,r.timeoutHandle=of(Du.bind(null,r,n,cu,pu,lu,t,au,ru,ou,Zl,o,`Throttled`,-0,0),a);break a}Du(r,n,cu,pu,lu,t,au,ru,ou,Zl,o,null,-0,0)}}break}while(1);md(e)}function Du(e,t,n,r,i,a,o,s,c,l,u,d,f,p){if(e.timeoutHandle=-1,d=t.subtreeFlags,d&8192||(d&16785408)==16785408){d={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:en},Ll(t,a,d);var m=(a&62914560)===a?uu-Ee():(a&4194048)===a?du-Ee():0;if(m=op(d,m),m!==null){vu=a,e.cancelPendingCommit=m(qu.bind(null,e,t,a,n,r,i,o,s,c,u,d,null,f,p)),ku(e,a,o,!l);return}}qu(e,t,a,n,r,i,o,s,c)}function Ou(e){for(var t=e;;){var n=t.tag;if((n===0||n===11||n===15)&&t.flags&16384&&(n=t.updateQueue,n!==null&&(n=n.stores,n!==null)))for(var r=0;r<n.length;r++){var i=n[r],a=i.getSnapshot;i=i.value;try{if(!Cr(a(),i))return!1}catch{return!1}}if(n=t.child,t.subtreeFlags&16384&&n!==null)n.return=t,t=n;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function ku(e,t,n,r){t&=~iu,t&=~ru,e.suspendedLanes|=t,e.pingedLanes&=~t,r&&(e.warmLanes|=t),r=e.expirationTimes;for(var i=t;0<i;){var a=31-Re(i),o=1<<a;r[a]=-1,i&=~o}n!==0&&$e(e,n,t)}function Au(){return Gl&6?!0:(hd(0,!1),!1)}function ju(){if(ql!==null){if(Yl===0)var e=ql.return;else e=ql,Yi=Ji=null,Po(e),Pa=null,Fa=0,e=ql;for(;e!==null;)Gc(e.alternate,e),e=e.return;ql=null}}function Mu(e,t){var n=e.timeoutHandle;n!==-1&&(e.timeoutHandle=-1,sf(n)),n=e.cancelPendingCommit,n!==null&&(e.cancelPendingCommit=null,n()),vu=0,ju(),Kl=e,ql=n=di(e.current,null),Jl=t,Yl=0,Xl=null,Zl=!1,Ql=qe(e,t),$l=!1,ou=au=iu=ru=nu=tu=0,cu=su=null,lu=!1,t&8&&(t|=t&32);var r=e.entangledLanes;if(r!==0)for(e=e.entanglements,r&=t;0<r;){var i=31-Re(r),a=1<<i;t|=e[i],r&=~a}return eu=t,ti(),n}function Nu(e,t){go=null,ee.H=Ws,t===wa||t===Ea?(t=Ma(),Yl=3):t===Ta?(t=Ma(),Yl=4):Yl=t===sc?8:typeof t==`object`&&t&&typeof t.then==`function`?6:1,Xl=t,ql===null&&(tu=1,tc(e,yi(t,e.current)))}function Pu(){var e=ao.current;return e===null?!0:(Jl&4194048)===Jl?oo===null:(Jl&62914560)===Jl||Jl&536870912?e===oo:!1}function Fu(){var e=ee.H;return ee.H=Ws,e===null?Ws:e}function Iu(){var e=ee.A;return ee.A=Ul,e}function Lu(){tu=4,Zl||(Jl&4194048)!==Jl&&ao.current!==null||(Ql=!0),!(nu&134217727)&&!(ru&134217727)||Kl===null||ku(Kl,Jl,au,!1)}function Ru(e,t,n){var r=Gl;Gl|=2;var i=Fu(),a=Iu();(Kl!==e||Jl!==t)&&(pu=null,Mu(e,t)),t=!1;var o=tu;a:do try{if(Yl!==0&&ql!==null){var s=ql,c=Xl;switch(Yl){case 8:ju(),o=6;break a;case 3:case 2:case 9:case 6:ao.current===null&&(t=!0);var l=Yl;if(Yl=0,Xl=null,Wu(e,s,c,l),n&&Ql){o=0;break a}break;default:l=Yl,Yl=0,Xl=null,Wu(e,s,c,l)}}zu(),o=tu;break}catch(t){Nu(e,t)}while(1);return t&&e.shellSuspendCounter++,Yi=Ji=null,Gl=r,ee.H=i,ee.A=a,ql===null&&(Kl=null,Jl=0,ti()),o}function zu(){for(;ql!==null;)Hu(ql)}function Bu(e,t){var n=Gl;Gl|=2;var r=Fu(),a=Iu();Kl!==e||Jl!==t?(pu=null,fu=Ee()+500,Mu(e,t)):Ql=qe(e,t);a:do try{if(Yl!==0&&ql!==null){t=ql;var o=Xl;b:switch(Yl){case 1:Yl=0,Xl=null,Wu(e,t,o,1);break;case 2:case 9:if(Oa(o)){Yl=0,Xl=null,Uu(t);break}t=function(){Yl!==2&&Yl!==9||Kl!==e||(Yl=7),md(e)},o.then(t,t);break a;case 3:Yl=7;break a;case 4:Yl=5;break a;case 7:Oa(o)?(Yl=0,Xl=null,Uu(t)):(Yl=0,Xl=null,Wu(e,t,o,7));break;case 5:var s=null;switch(ql.tag){case 26:s=ql.memoizedState;case 5:case 27:var c=ql;if(s?rp(s):c.stateNode.complete){Yl=0,Xl=null;var l=c.sibling;if(l!==null)ql=l;else{var u=c.return;u===null?ql=null:(ql=u,Gu(u))}break b}}Yl=0,Xl=null,Wu(e,t,o,5);break;case 6:Yl=0,Xl=null,Wu(e,t,o,6);break;case 8:ju(),tu=6;break a;default:throw Error(i(462))}}Vu();break}catch(t){Nu(e,t)}while(1);return Yi=Ji=null,ee.H=r,ee.A=a,Gl=n,ql===null?(Kl=null,Jl=0,ti(),tu):0}function Vu(){for(;ql!==null&&!we();)Hu(ql)}function Hu(e){var t=Ic(e.alternate,e,eu);e.memoizedProps=e.pendingProps,t===null?Gu(e):ql=t}function Uu(e){var t=e,n=t.alternate;switch(t.tag){case 15:case 0:t=xc(n,t,t.pendingProps,t.type,void 0,Jl);break;case 11:t=xc(n,t,t.pendingProps,t.type.render,t.ref,Jl);break;case 5:Po(t);default:Gc(n,t),t=ql=fi(t,eu),t=Ic(n,t,eu)}e.memoizedProps=e.pendingProps,t===null?Gu(e):ql=t}function Wu(e,t,n,r){Yi=Ji=null,Po(t),Pa=null,Fa=0;var i=t.return;try{if(oc(e,i,t,n,Jl)){tu=1,tc(e,yi(n,e.current)),ql=null;return}}catch(t){if(i!==null)throw ql=i,t;tu=1,tc(e,yi(n,e.current)),ql=null;return}t.flags&32768?(Ii||r===1?e=!0:Ql||Jl&536870912?e=!1:(Zl=e=!0,(r===2||r===9||r===3||r===6)&&(r=ao.current,r!==null&&r.tag===13&&(r.flags|=16384))),Ku(t,e)):Gu(t)}function Gu(e){var t=e;do{if(t.flags&32768){Ku(t,Zl);return}e=t.return;var n=Uc(t.alternate,t,eu);if(n!==null){ql=n;return}if(t=t.sibling,t!==null){ql=t;return}ql=t=e}while(t!==null);tu===0&&(tu=5)}function Ku(e,t){do{var n=Wc(e.alternate,e);if(n!==null){n.flags&=32767,ql=n;return}if(n=e.return,n!==null&&(n.flags|=32768,n.subtreeFlags=0,n.deletions=null),!t&&(e=e.sibling,e!==null)){ql=e;return}ql=e=n}while(e!==null);tu=6,ql=null}function qu(e,t,n,r,a,o,s,c,l){e.cancelPendingCommit=null;do Qu();while(hu!==0);if(Gl&6)throw Error(i(327));if(t!==null){if(t===e.current)throw Error(i(177));if(o=t.lanes|t.childLanes,o|=ei,Qe(e,n,o,s,c,l),e===Kl&&(ql=Kl=null,Jl=0),_u=t,gu=e,vu=n,yu=o,bu=a,B=r,t.subtreeFlags&10256||t.flags&10256?(e.callbackNode=null,e.callbackPriority=0,sd(Ae,function(){return $u(),null})):(e.callbackNode=null,e.callbackPriority=0),r=(t.flags&13878)!=0,t.subtreeFlags&13878||r){r=ee.T,ee.T=null,a=I.p,I.p=2,s=Gl,Gl|=4;try{ul(e,t,n)}finally{Gl=s,I.p=a,ee.T=r}}hu=1,Ju(),Yu(),Xu()}}function Ju(){if(hu===1){hu=0;var e=gu,t=_u,n=(t.flags&13878)!=0;if(t.subtreeFlags&13878||n){n=ee.T,ee.T=null;var r=I.p;I.p=2;var i=Gl;Gl|=4;try{Cl(t,e);var a=Qd,o=Or(e.containerInfo),s=a.focusedElem,c=a.selectionRange;if(o!==s&&s&&s.ownerDocument&&Dr(s.ownerDocument.documentElement,s)){if(c!==null&&kr(s)){var l=c.start,u=c.end;if(u===void 0&&(u=l),`selectionStart`in s)s.selectionStart=l,s.selectionEnd=Math.min(u,s.value.length);else{var d=s.ownerDocument||document,f=d&&d.defaultView||window;if(f.getSelection){var p=f.getSelection(),m=s.textContent.length,h=Math.min(c.start,m),g=c.end===void 0?h:Math.min(c.end,m);!p.extend&&h>g&&(o=g,g=h,h=o);var _=Er(s,h),v=Er(s,g);if(_&&v&&(p.rangeCount!==1||p.anchorNode!==_.node||p.anchorOffset!==_.offset||p.focusNode!==v.node||p.focusOffset!==v.offset)){var y=d.createRange();y.setStart(_.node,_.offset),p.removeAllRanges(),h>g?(p.addRange(y),p.extend(v.node,v.offset)):(y.setEnd(v.node,v.offset),p.addRange(y))}}}}for(d=[],p=s;p=p.parentNode;)p.nodeType===1&&d.push({element:p,left:p.scrollLeft,top:p.scrollTop});for(typeof s.focus==`function`&&s.focus(),s=0;s<d.length;s++){var b=d[s];b.element.scrollLeft=b.left,b.element.scrollTop=b.top}}bp=!!Zd,Qd=Zd=null}finally{Gl=i,I.p=r,ee.T=n}}e.current=t,hu=2}}function Yu(){if(hu===2){hu=0;var e=gu,t=_u,n=(t.flags&8772)!=0;if(t.subtreeFlags&8772||n){n=ee.T,ee.T=null;var r=I.p;I.p=2;var i=Gl;Gl|=4;try{dl(e,t.alternate,t)}finally{Gl=i,I.p=r,ee.T=n}}hu=3}}function Xu(){if(hu===4||hu===3){hu=0,Te();var e=gu,t=_u,n=vu,r=B;t.subtreeFlags&10256||t.flags&10256?hu=5:(hu=0,_u=gu=null,Zu(e,e.pendingLanes));var i=e.pendingLanes;if(i===0&&(mu=null),rt(n),t=t.stateNode,Ie&&typeof Ie.onCommitFiberRoot==`function`)try{Ie.onCommitFiberRoot(Fe,t,void 0,(t.current.flags&128)==128)}catch{}if(r!==null){t=ee.T,i=I.p,I.p=2,ee.T=null;try{for(var a=e.onRecoverableError,o=0;o<r.length;o++){var s=r[o];a(s.value,{componentStack:s.stack})}}finally{ee.T=t,I.p=i}}vu&3&&Qu(),md(e),i=e.pendingLanes,n&261930&&i&42?e===Su?xu++:(xu=0,Su=e):xu=0,hd(0,!1)}}function Zu(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,da(t)))}function Qu(){return Ju(),Yu(),Xu(),$u()}function $u(){if(hu!==5)return!1;var e=gu,t=yu;yu=0;var n=rt(vu),r=ee.T,a=I.p;try{I.p=32>n?32:n,ee.T=null,n=bu,bu=null;var o=gu,s=vu;if(hu=0,_u=gu=null,vu=0,Gl&6)throw Error(i(331));var c=Gl;if(Gl|=4,Bl(o.current),Ml(o,o.current,s,n),Gl=c,hd(0,!1),Ie&&typeof Ie.onPostCommitFiberRoot==`function`)try{Ie.onPostCommitFiberRoot(Fe,o)}catch{}return!0}finally{I.p=a,ee.T=r,Zu(e,t)}}function ed(e,t,n){t=yi(n,t),t=rc(e.stateNode,t,2),e=Ka(e,t,2),e!==null&&(Ze(e,2),md(e))}function td(e,t,n){if(e.tag===3)ed(e,e,n);else for(;t!==null;){if(t.tag===3){ed(t,e,n);break}else if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError==`function`||typeof r.componentDidCatch==`function`&&(mu===null||!mu.has(r))){e=yi(n,e),n=ic(2),r=Ka(t,n,2),r!==null&&(ac(n,r,t,e),Ze(r,2),md(r));break}}t=t.return}}function nd(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new Wl;var i=new Set;r.set(t,i)}else i=r.get(t),i===void 0&&(i=new Set,r.set(t,i));i.has(n)||($l=!0,i.add(n),e=rd.bind(null,e,t,n),t.then(e,e))}function rd(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),e.pingedLanes|=e.suspendedLanes&n,e.warmLanes&=~n,Kl===e&&(Jl&n)===n&&(tu===4||tu===3&&(Jl&62914560)===Jl&&300>Ee()-uu?!(Gl&2)&&Mu(e,0):iu|=n,ou===Jl&&(ou=0)),md(e)}function id(e,t){t===0&&(t=Ye()),e=ii(e,t),e!==null&&(Ze(e,t),md(e))}function ad(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),id(e,n)}function od(e,t){var n=0;switch(e.tag){case 31:case 13:var r=e.stateNode,a=e.memoizedState;a!==null&&(n=a.retryLane);break;case 19:r=e.stateNode;break;case 22:r=e.stateNode._retryCache;break;default:throw Error(i(314))}r!==null&&r.delete(t),id(e,n)}function sd(e,t){return Se(e,t)}var cd=null,ld=null,ud=!1,dd=!1,fd=!1,pd=0;function md(e){e!==ld&&e.next===null&&(ld===null?cd=ld=e:ld=ld.next=e),dd=!0,ud||(ud=!0,xd())}function hd(e,t){if(!fd&&dd){fd=!0;do for(var n=!1,r=cd;r!==null;){if(!t)if(e!==0){var i=r.pendingLanes;if(i===0)var a=0;else{var o=r.suspendedLanes,s=r.pingedLanes;a=(1<<31-Re(42|e)+1)-1,a&=i&~(o&~s),a=a&201326741?a&201326741|1:a?a|2:0}a!==0&&(n=!0,bd(r,a))}else a=Jl,a=Ke(r,r===Kl?a:0,r.cancelPendingCommit!==null||r.timeoutHandle!==-1),!(a&3)||qe(r,a)||(n=!0,bd(r,a));r=r.next}while(n);fd=!1}}function gd(){_d()}function _d(){dd=ud=!1;var e=0;pd!==0&&af()&&(e=pd);for(var t=Ee(),n=null,r=cd;r!==null;){var i=r.next,a=vd(r,t);a===0?(r.next=null,n===null?cd=i:n.next=i,i===null&&(ld=n)):(n=r,(e!==0||a&3)&&(dd=!0)),r=i}hu!==0&&hu!==5||hd(e,!1),pd!==0&&(pd=0)}function vd(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,i=e.expirationTimes,a=e.pendingLanes&-62914561;0<a;){var o=31-Re(a),s=1<<o,c=i[o];c===-1?((s&n)===0||(s&r)!==0)&&(i[o]=Je(s,t)):c<=t&&(e.expiredLanes|=s),a&=~s}if(t=Kl,n=Jl,n=Ke(e,e===t?n:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),r=e.callbackNode,n===0||e===t&&(Yl===2||Yl===9)||e.cancelPendingCommit!==null)return r!==null&&r!==null&&Ce(r),e.callbackNode=null,e.callbackPriority=0;if(!(n&3)||qe(e,n)){if(t=n&-n,t===e.callbackPriority)return t;switch(r!==null&&Ce(r),rt(n)){case 2:case 8:n=ke;break;case 32:n=Ae;break;case 268435456:n=Me;break;default:n=Ae}return r=yd.bind(null,e),n=Se(n,r),e.callbackPriority=t,e.callbackNode=n,t}return r!==null&&r!==null&&Ce(r),e.callbackPriority=2,e.callbackNode=null,2}function yd(e,t){if(hu!==0&&hu!==5)return e.callbackNode=null,e.callbackPriority=0,null;var n=e.callbackNode;if(Qu()&&e.callbackNode!==n)return null;var r=Jl;return r=Ke(e,e===Kl?r:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),r===0?null:(Eu(e,r,t),vd(e,Ee()),e.callbackNode!=null&&e.callbackNode===n?yd.bind(null,e):null)}function bd(e,t){if(Qu())return null;Eu(e,t,!0)}function xd(){lf(function(){Gl&6?Se(Oe,gd):_d()})}function Sd(){if(pd===0){var e=ma;e===0&&(e=He,He<<=1,!(He&261888)&&(He=256)),pd=e}return pd}function Cd(e){return e==null||typeof e==`symbol`||typeof e==`boolean`?null:typeof e==`function`?e:$t(``+e)}function wd(e,t){var n=t.ownerDocument.createElement(`input`);return n.name=t.name,n.value=t.value,e.id&&n.setAttribute(`form`,e.id),t.parentNode.insertBefore(n,t),e=new FormData(e),n.parentNode.removeChild(n),e}function Td(e,t,n,r,i){if(t===`submit`&&n&&n.stateNode===i){var a=Cd((i[ct]||null).action),o=r.submitter;o&&(t=(t=o[ct]||null)?Cd(t.formAction):o.getAttribute(`formAction`),t!==null&&(a=t,o=null));var s=new Sn(`action`,`action`,null,r,i);e.push({event:s,listeners:[{instance:null,listener:function(){if(r.defaultPrevented){if(pd!==0){var e=o?wd(i,o):new FormData(i);As(n,{pending:!0,data:e,method:i.method,action:a},null,e)}}else typeof a==`function`&&(s.preventDefault(),e=o?wd(i,o):new FormData(i),As(n,{pending:!0,data:e,method:i.method,action:a},a,e))},currentTarget:i}]})}}for(var Ed=0;Ed<Yr.length;Ed++){var Dd=Yr[Ed];Xr(Dd.toLowerCase(),`on`+(Dd[0].toUpperCase()+Dd.slice(1)))}Xr(Vr,`onAnimationEnd`),Xr(Hr,`onAnimationIteration`),Xr(Ur,`onAnimationStart`),Xr(`dblclick`,`onDoubleClick`),Xr(`focusin`,`onFocus`),Xr(`focusout`,`onBlur`),Xr(Wr,`onTransitionRun`),Xr(Gr,`onTransitionStart`),Xr(Kr,`onTransitionCancel`),Xr(qr,`onTransitionEnd`),wt(`onMouseEnter`,[`mouseout`,`mouseover`]),wt(`onMouseLeave`,[`mouseout`,`mouseover`]),wt(`onPointerEnter`,[`pointerout`,`pointerover`]),wt(`onPointerLeave`,[`pointerout`,`pointerover`]),Ct(`onChange`,`change click focusin focusout input keydown keyup selectionchange`.split(` `)),Ct(`onSelect`,`focusout contextmenu dragend focu
8sin keydown keyup mousedown mouseup selectionchange`.split(` `)),Ct(`onBeforeInput`,[`compositionend`,`keypress`,`textInput`,`paste`]),Ct(`onCompositionEnd`,`compositionend focusout keydown keypress keyup mousedown`.split(` `)),Ct(`onCompositionStart`,`compositionstart focusout keydown keypress keyup mousedown`.split(` `)),Ct(`onCompositionUpdate`,`compositionupdate focusout keydown keypress keyup mousedown`.split(` `));var Od=`abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting`.split(` `),kd=new Set(`beforetoggle cancel close invalid load scroll scrollend toggle`.split(` `).concat(Od));function Ad(e,t){t=(t&4)!=0;for(var n=0;n<e.length;n++){var r=e[n],i=r.event;r=r.listeners;a:{var a=void 0;if(t)for(var o=r.length-1;0<=o;o--){var s=r[o],c=s.instance,l=s.currentTarget;if(s=s.listener,c!==a&&i.isPropagationStopped())break a;a=s,i.currentTarget=l;try{a(i)}catch(e){Zr(e)}i.currentTarget=null,a=c}else for(o=0;o<r.length;o++){if(s=r[o],c=s.instance,l=s.currentTarget,s=s.listener,c!==a&&i.isPropagationStopped())break a;a=s,i.currentTarget=l;try{a(i)}catch(e){Zr(e)}i.currentTarget=null,a=c}}}}function jd(e,t){var n=t[ut];n===void 0&&(n=t[ut]=new Set);var r=e+`__bubble`;n.has(r)||(Fd(t,e,2,!1),n.add(r))}function Md(e,t,n){var r=0;t&&(r|=4),Fd(n,e,r,t)}var Nd=`_reactListening`+Math.random().toString(36).slice(2);function Pd(e){if(!e[Nd]){e[Nd]=!0,xt.forEach(function(t){t!==`selectionchange`&&(kd.has(t)||Md(t,!1,e),Md(t,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Nd]||(t[Nd]=!0,Md(`selectionchange`,!1,t))}}function Fd(e,t,n,r){switch(Dp(t)){case 2:var i=xp;break;case 8:i=Sp;break;default:i=Cp}n=i.bind(null,t,n,e),i=void 0,!dn||t!==`touchstart`&&t!==`touchmove`&&t!==`wheel`||(i=!0),r?i===void 0?e.addEventListener(t,n,!0):e.addEventListener(t,n,{capture:!0,passive:i}):i===void 0?e.addEventListener(t,n,!1):e.addEventListener(t,n,{passive:i})}function Id(e,t,n,r,i){var a=r;if(!(t&1)&&!(t&2)&&r!==null)a:for(;;){if(r===null)return;var s=r.tag;if(s===3||s===4){var c=r.stateNode.containerInfo;if(c===i)break;if(s===4)for(s=r.return;s!==null;){var l=s.tag;if((l===3||l===4)&&s.stateNode.containerInfo===i)return;s=s.return}for(;c!==null;){if(s=gt(c),s===null)return;if(l=s.tag,l===5||l===6||l===26||l===27){r=a=s;continue a}c=c.parentNode}}r=r.return}cn(function(){var r=a,i=nn(n),s=[];a:{var c=Jr.get(e);if(c!==void 0){var l=Sn,u=e;switch(e){case`keypress`:if(_n(n)===0)break a;case`keydown`:case`keyup`:l=Bn;break;case`focusin`:u=`focus`,l=jn;break;case`focusout`:u=`blur`,l=jn;break;case`beforeblur`:case`afterblur`:l=jn;break;case`click`:if(n.button===2)break a;case`auxclick`:case`dblclick`:case`mousedown`:case`mousemove`:case`mouseup`:case`mouseout`:case`mouseover`:case`contextmenu`:l=kn;break;case`drag`:case`dragend`:case`dragenter`:case`dragexit`:case`dragleave`:case`dragover`:case`dragstart`:case`drop`:l=An;break;case`touchcancel`:case`touchend`:case`touchmove`:case`touchstart`:l=Hn;break;case Vr:case Hr:case Ur:l=Mn;break;case qr:l=Un;break;case`scroll`:case`scrollend`:l=wn;break;case`wheel`:l=Wn;break;case`copy`:case`cut`:case`paste`:l=Nn;break;case`gotpointercapture`:case`lostpointercapture`:case`pointercancel`:case`pointerdown`:case`pointermove`:case`pointerout`:case`pointerover`:case`pointerup`:l=Vn;break;case`toggle`:case`beforetoggle`:l=Gn}var d=(t&4)!=0,f=!d&&(e===`scroll`||e===`scrollend`),p=d?c===null?null:c+`Capture`:c;d=[];for(var m=r,h;m!==null;){var g=m;if(h=g.stateNode,g=g.tag,g!==5&&g!==26&&g!==27||h===null||p===null||(g=ln(m,p),g!=null&&d.push(Ld(m,g,h))),f)break;m=m.return}0<d.length&&(c=new l(c,u,null,n,i),s.push({event:c,listeners:d}))}}if(!(t&7)){a:{if(c=e===`mouseover`||e===`pointerover`,l=e===`mouseout`||e===`pointerout`,c&&n!==tn&&(u=n.relatedTarget||n.fromElement)&&(gt(u)||u[lt]))break a;if((l||c)&&(c=i.window===i?i:(c=i.ownerDocument)?c.defaultView||c.parentWindow:window,l?(u=n.relatedTarget||n.toElement,l=r,u=u?gt(u):null,u!==null&&(f=o(u),d=u.tag,u!==f||d!==5&&d!==27&&d!==6)&&(u=null)):(l=null,u=r),l!==u)){if(d=kn,g=`onMouseLeave`,p=`onMouseEnter`,m=`mouse`,(e===`pointerout`||e===`pointerover`)&&(d=Vn,g=`onPointerLeave`,p=`onPointerEnter`,m=`pointer`),f=l==null?c:vt(l),h=u==null?c:vt(u),c=new d(g,m+`leave`,l,n,i),c.target=f,c.relatedTarget=h,g=null,gt(i)===r&&(d=new d(p,m+`enter`,u,n,i),d.target=h,d.relatedTarget=f,g=d),f=g,l&&u)b:{for(d=zd,p=l,m=u,h=0,g=p;g;g=d(g))h++;g=0;for(var _=m;_;_=d(_))g++;for(;0<h-g;)p=d(p),h--;for(;0<g-h;)m=d(m),g--;for(;h--;){if(p===m||m!==null&&p===m.alternate){d=p;break b}p=d(p),m=d(m)}d=null}else d=null;l!==null&&Bd(s,c,l,d,!1),u!==null&&f!==null&&Bd(s,f,u,d,!0)}}a:{if(c=r?vt(r):window,l=c.nodeName&&c.nodeName.toLowerCase(),l===`select`||l===`input`&&c.type===`file`)var v=dr;else if(ar(c))if(fr)v=xr;else{v=yr;var y=vr}else l=c.nodeName,!l||l.toLowerCase()!==`input`||c.type!==`checkbox`&&c.type!==`radio`?r&&Xt(r.elementType)&&(v=dr):v=br;if(v&&=v(e,r)){or(s,v,n,i);break a}y&&y(e,c,r),e===`focusout`&&r&&c.type===`number`&&r.memoizedProps.value!=null&&Ht(c,`number`,c.value)}switch(y=r?vt(r):window,e){case`focusin`:(ar(y)||y.contentEditable===`true`)&&(jr=y,Mr=r,Nr=null);break;case`focusout`:Nr=Mr=jr=null;break;case`mousedown`:Pr=!0;break;case`contextmenu`:case`mouseup`:case`dragend`:Pr=!1,Fr(s,n,i);break;case`selectionchange`:if(Ar)break;case`keydown`:case`keyup`:Fr(s,n,i)}var b;if(qn)b:{switch(e){case`compositionstart`:var x=`onCompositionStart`;break b;case`compositionend`:x=`onCompositionEnd`;break b;case`compositionupdate`:x=`onCompositionUpdate`;break b}x=void 0}else tr?$n(e,n)&&(x=`onCompositionEnd`):e===`keydown`&&n.keyCode===229&&(x=`onCompositionStart`);x&&(Xn&&n.locale!==`ko`&&(tr||x!==`onCompositionStart`?x===`onCompositionEnd`&&tr&&(b=gn()):(pn=i,mn=`value`in pn?pn.value:pn.textContent,tr=!0)),y=Rd(r,x),0<y.length&&(x=new Pn(x,e,null,n,i),s.push({event:x,listeners:y}),b?x.data=b:(b=er(n),b!==null&&(x.data=b)))),(b=Yn?nr(e,n):rr(e,n))&&(x=Rd(r,`onBeforeInput`),0<x.length&&(y=new Pn(`onBeforeInput`,`beforeinput`,null,n,i),s.push({event:y,listeners:x}),y.data=b)),Td(s,e,r,n,i)}Ad(s,t)})}function Ld(e,t,n){return{instance:e,listener:t,currentTarget:n}}function Rd(e,t){for(var n=t+`Capture`,r=[];e!==null;){var i=e,a=i.stateNode;if(i=i.tag,i!==5&&i!==26&&i!==27||a===null||(i=ln(e,n),i!=null&&r.unshift(Ld(e,i,a)),i=ln(e,t),i!=null&&r.push(Ld(e,i,a))),e.tag===3)return r;e=e.return}return[]}function zd(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function Bd(e,t,n,r,i){for(var a=t._reactName,o=[];n!==null&&n!==r;){var s=n,c=s.alternate,l=s.stateNode;if(s=s.tag,c!==null&&c===r)break;s!==5&&s!==26&&s!==27||l===null||(c=l,i?(l=ln(n,a),l!=null&&o.unshift(Ld(n,l,c))):i||(l=ln(n,a),l!=null&&o.push(Ld(n,l,c)))),n=n.return}o.length!==0&&e.push({event:t,listeners:o})}var Vd=/\r\n?/g,Hd=/\u0000|\uFFFD/g;function Ud(e){return(typeof e==`string`?e:``+e).replace(Vd,` 9`).replace(Hd,``)}function Wd(e,t){return t=Ud(t),Ud(e)===t}function Gd(e,t,n,r,a,o){switch(n){case`children`:typeof r==`string`?t===`body`||t===`textarea`&&r===``||Kt(e,r):(typeof r==`number`||typeof r==`bigint`)&&t!==`body`&&Kt(e,``+r);break;case`className`:At(e,`class`,r);break;case`tabIndex`:At(e,`tabindex`,r);break;
vendor: 10,096 bytes, line 9
9case`dir`:case`role`:case`viewBox`:case`width`:case`height`:At(e,n,r);break;case`style`:Yt(e,r,o);break;case`data`:if(t!==`object`){At(e,`data`,r);break}case`src`:case`href`:if(r===``&&(t!==`a`||n!==`href`)){e.removeAttribute(n);break}if(r==null||typeof r==`function`||typeof r==`symbol`||typeof r==`boolean`){e.removeAttribute(n);break}r=$t(``+r),e.setAttribute(n,r);break;case`action`:case`formAction`:if(typeof r==`function`){e.setAttribute(n,`javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')`);break}else typeof o==`function`&&(n===`formAction`?(t!==`input`&&Gd(e,t,`name`,a.name,a,null),Gd(e,t,`formEncType`,a.formEncType,a,null),Gd(e,t,`formMethod`,a.formMethod,a,null),Gd(e,t,`formTarget`,a.formTarget,a,null)):(Gd(e,t,`encType`,a.encType,a,null),Gd(e,t,`method`,a.method,a,null),Gd(e,t,`target`,a.target,a,null)));if(r==null||typeof r==`symbol`||typeof r==`boolean`){e.removeAttribute(n);break}r=$t(``+r),e.setAttribute(n,r);break;case`onClick`:r!=null&&(e.onclick=en);break;case`onScroll`:r!=null&&jd(`scroll`,e);break;case`onScrollEnd`:r!=null&&jd(`scrollend`,e);break;case`dangerouslySetInnerHTML`:if(r!=null){if(typeof r!=`object`||!(`__html`in r))throw Error(i(61));if(n=r.__html,n!=null){if(a.children!=null)throw Error(i(60));e.innerHTML=n}}break;case`multiple`:e.multiple=r&&typeof r!=`function`&&typeof r!=`symbol`;break;case`muted`:e.muted=r&&typeof r!=`function`&&typeof r!=`symbol`;break;case`suppressContentEditableWarning`:case`suppressHydrationWarning`:case`defaultValue`:case`defaultChecked`:case`innerHTML`:case`ref`:break;case`autoFocus`:break;case`xlinkHref`:if(r==null||typeof r==`function`||typeof r==`boolean`||typeof r==`symbol`){e.removeAttribute(`xlink:href`);break}n=$t(``+r),e.setAttributeNS(`http://www.w3.org/1999/xlink`,`xlink:href`,n);break;case`contentEditable`:case`spellCheck`:case`draggable`:case`value`:case`autoReverse`:case`externalResourcesRequired`:case`focusable`:case`preserveAlpha`:r!=null&&typeof r!=`function`&&typeof r!=`symbol`?e.setAttribute(n,``+r):e.removeAttribute(n);break;case`inert`:case`allowFullScreen`:case`async`:case`autoPlay`:case`controls`:case`default`:case`defer`:case`disabled`:case`disablePictureInPicture`:case`disableRemotePlayback`:case`formNoValidate`:case`hidden`:case`loop`:case`noModule`:case`noValidate`:case`open`:case`playsInline`:case`readOnly`:case`required`:case`reversed`:case`scoped`:case`seamless`:case`itemScope`:r&&typeof r!=`function`&&typeof r!=`symbol`?e.setAttribute(n,``):e.removeAttribute(n);break;case`capture`:case`download`:!0===r?e.setAttribute(n,``):!1!==r&&r!=null&&typeof r!=`function`&&typeof r!=`symbol`?e.setAttribute(n,r):e.removeAttribute(n);break;case`cols`:case`rows`:case`size`:case`span`:r!=null&&typeof r!=`function`&&typeof r!=`symbol`&&!isNaN(r)&&1<=r?e.setAttribute(n,r):e.removeAttribute(n);break;case`rowSpan`:case`start`:r==null||typeof r==`function`||typeof r==`symbol`||isNaN(r)?e.removeAttribute(n):e.setAttribute(n,r);break;case`popover`:jd(`beforetoggle`,e),jd(`toggle`,e),kt(e,`popover`,r);break;case`xlinkActuate`:jt(e,`http://www.w3.org/1999/xlink`,`xlink:actuate`,r);break;case`xlinkArcrole`:jt(e,`http://www.w3.org/1999/xlink`,`xlink:arcrole`,r);break;case`xlinkRole`:jt(e,`http://www.w3.org/1999/xlink`,`xlink:role`,r);break;case`xlinkShow`:jt(e,`http://www.w3.org/1999/xlink`,`xlink:show`,r);break;case`xlinkTitle`:jt(e,`http://www.w3.org/1999/xlink`,`xlink:title`,r);break;case`xlinkType`:jt(e,`http://www.w3.org/1999/xlink`,`xlink:type`,r);break;case`xmlBase`:jt(e,`http://www.w3.org/XML/1998/namespace`,`xml:base`,r);break;case`xmlLang`:jt(e,`http://www.w3.org/XML/1998/namespace`,`xml:lang`,r);break;case`xmlSpace`:jt(e,`http://www.w3.org/XML/1998/namespace`,`xml:space`,r);break;case`is`:kt(e,`is`,r);break;case`innerText`:case`textContent`:break;default:(!(2<n.length)||n[0]!==`o`&&n[0]!==`O`||n[1]!==`n`&&n[1]!==`N`)&&(n=Zt.get(n)||n,kt(e,n,r))}}function Kd(e,t,n,r,a,o){switch(n){case`style`:Yt(e,r,o);break;case`dangerouslySetInnerHTML`:if(r!=null){if(typeof r!=`object`||!(`__html`in r))throw Error(i(61));if(n=r.__html,n!=null){if(a.children!=null)throw Error(i(60));e.innerHTML=n}}break;case`children`:typeof r==`string`?Kt(e,r):(typeof r==`number`||typeof r==`bigint`)&&Kt(e,``+r);break;case`onScroll`:r!=null&&jd(`scroll`,e);break;case`onScrollEnd`:r!=null&&jd(`scrollend`,e);break;case`onClick`:r!=null&&(e.onclick=en);break;case`suppressContentEditableWarning`:case`suppressHydrationWarning`:case`innerHTML`:case`ref`:break;case`innerText`:case`textContent`:break;default:if(!St.hasOwnProperty(n))a:{if(n[0]===`o`&&n[1]===`n`&&(a=n.endsWith(`Capture`),t=n.slice(2,a?n.length-7:void 0),o=e[ct]||null,o=o==null?null:o[n],typeof o==`function`&&e.removeEventListener(t,o,a),typeof r==`function`)){typeof o!=`function`&&o!==null&&(n in e?e[n]=null:e.hasAttribute(n)&&e.removeAttribute(n)),e.addEventListener(t,r,a);break a}n in e?e[n]=r:!0===r?e.setAttribute(n,``):kt(e,n,r)}}}function qd(e,t,n){switch(t){case`div`:case`span`:case`svg`:case`path`:case`a`:case`g`:case`p`:case`li`:break;case`img`:jd(`error`,e),jd(`load`,e);var r=!1,a=!1,o;for(o in n)if(n.hasOwnProperty(o)){var s=n[o];if(s!=null)switch(o){case`src`:r=!0;break;case`srcSet`:a=!0;break;case`children`:case`dangerouslySetInnerHTML`:throw Error(i(137,t));default:Gd(e,t,o,s,n,null)}}a&&Gd(e,t,`srcSet`,n.srcSet,n,null),r&&Gd(e,t,`src`,n.src,n,null);return;case`input`:jd(`invalid`,e);var c=o=s=a=null,l=null,u=null;for(r in n)if(n.hasOwnProperty(r)){var d=n[r];if(d!=null)switch(r){case`name`:a=d;break;case`type`:s=d;break;case`checked`:l=d;break;case`defaultChecked`:u=d;break;case`value`:o=d;break;case`defaultValue`:c=d;break;case`children`:case`dangerouslySetInnerHTML`:if(d!=null)throw Error(i(137,t));break;default:Gd(e,t,r,d,n,null)}}Vt(e,o,c,l,u,s,a,!1);return;case`select`:for(a in jd(`invalid`,e),r=s=o=null,n)if(n.hasOwnProperty(a)&&(c=n[a],c!=null))switch(a){case`value`:o=c;break;case`defaultValue`:s=c;break;case`multiple`:r=c;default:Gd(e,t,a,c,n,null)}t=o,n=s,e.multiple=!!r,t==null?n!=null&&Ut(e,!!r,n,!0):Ut(e,!!r,t,!1);return;case`textarea`:for(s in jd(`invalid`,e),o=a=r=null,n)if(n.hasOwnProperty(s)&&(c=n[s],c!=null))switch(s){case`value`:r=c;break;case`defaultValue`:a=c;break;case`children`:o=c;break;case`dangerouslySetInnerHTML`:if(c!=null)throw Error(i(91));break;default:Gd(e,t,s,c,n,null)}Gt(e,r,a,o);return;case`option`:for(l in n)if(n.hasOwnProperty(l)&&(r=n[l],r!=null))switch(l){case`selected`:e.selected=r&&typeof r!=`function`&&typeof r!=`symbol`;break;default:Gd(e,t,l,r,n,null)}return;case`dialog`:jd(`beforetoggle`,e),jd(`toggle`,e),jd(`cancel`,e),jd(`close`,e);break;case`iframe`:case`object`:jd(`load`,e);break;case`video`:case`audio`:for(r=0;r<Od.length;r++)jd(Od[r],e);break;case`image`:jd(`error`,e),jd(`load`,e);break;case`details`:jd(`toggle`,e);break;case`embed`:case`source`:case`link`:jd(`error`,e),jd(`load`,e);case`area`:case`base`:case`br`:case`col`:case`hr`:case`keygen`:case`meta`:case`param`:case`track`:case`wbr`:case`menuitem`:for(u in n)if(n.hasOwnProperty(u)&&(r=n[u],r!=null))switch(u){case`children`:case`dangerouslySetInnerHTML`:throw Error(i(137,t));default:Gd(e,t,u,r,n,null)}return;default:if(Xt(t)){for(d in n)n.hasOwnProperty(d)&&(r=n[d],r!==void 0&&Kd(e,t,d,r,n,void 0));return}}for(c in n)n.hasOwnProperty(c)&&(r=n[c],r!=null&&Gd(e,t,c,r,n,null))}function Jd(e,t,n,r){switch(t){case`div`:case`span`:case`svg`:case`path`:case`a`:case`g`:case`p`:case`li`:break;case`input`:var a=null,o=null,s=null,c=null,l=null,u=null,d=null;for(m in n){var f=n[m];if(n.hasOwnProperty(m)&&f!=null)switch(m){case`checked`:break;case`value`:break;case`defaultValue`:l=f;default:r.hasOwnProperty(m)||Gd(e,t,m,null,r,f)}}for(var p in r){var m=r[p];if(f=n[p],r.hasOwnProperty(p)&&(m!=null||f!=null))switch(p){case`type`:o=m;break;case`name`:a=m;break;case`checked`:u=m;break;case`defaultChecked`:d=m;break;case`value`:s=m;break;case`defaultValue`:c=m;break;case`children`:case`dangerouslySetInnerHTML`:if(m!=null)throw Error(i(137,t));break;default:m!==f&&Gd(e,t,p,m,r,f)}}Bt(e,s,c,l,u,d,o,a);return;case`select`:for(o in m=s=c=p=null,n)if(l=n[o],n.hasOwnProperty(o)&&l!=null)switch(o){case`value`:break;case`multiple`:m=l;default:r.hasOwnProperty(o)||Gd(e,t,o,null,r,l)}for(a in r)if(o=r[a],l=n[a],r.hasOwnProperty(a)&&(o!=null||l!=null))switch(a){case`value`:p=o;break;case`defaultValue`:c=o;break;case`multiple`:s=o;default:o!==l&&Gd(e,t,a,o,r,l)}t=c,n=s,r=m,p==null?!!r!=!!n&&(t==null?Ut(e,!!n,n?[]:``,!1):Ut(e,!!n,t,!0)):Ut(e,!!n,p,!1);return;case`textarea`:for(c in m=p=null,n)if(a=n[c],n.hasOwnProperty(c)&&a!=null&&!r.hasOwnProperty(c))switch(c){case`value`:break;case`children`:break;default:Gd(e,t,c,null,r,a)}for(s in r)if(a=r[s],o=n[s],r.hasOwnProperty(s)&&(a!=null||o!=null))switch(s){case`value`:p=a;break;case`defaultValue`:m=a;break;case`children`:break;case`dangerouslySetInnerHTML`:if(a!=null)throw Error(i(91));break;default:a!==o&&Gd(e,t,s,a,r,o)}Wt(e,p,m);return;case`option`:for(var h in n)if(p=n[h],n.hasOwnProperty(h)&&p!=null&&!r.hasOwnProperty(h))switch(h){case`selected`:e.selected=!1;break;default:Gd(e,t,h,null,r,p)}for(l in r)if(p=r[l],m=n[l],r.hasOwnProperty(l)&&p!==m&&(p!=null||m!=null))switch(l){case`selected`:e.selected=p&&typeof p!=`function`&&typeof p!=`symbol`;break;default:Gd(e,t,l,p,r,m)}return;case`img`:case`link`:case`area`:case`base`:case`br`:case`col`:case`embed`:case`hr`:case`keygen`:case`meta`:case`param`:case`source`:case`track`:case`wbr`:case`menuitem`:for(var g in n)p=n[g],n.hasOwnProperty(g)&&p!=null&&!r.hasOwnProperty(g)&&Gd(e,t,g,null,r,p);for(u in r)if(p=r[u],m=n[u],r.hasOwnProperty(u)&&p!==m&&(p!=null||m!=null))switch(u){case`children`:case`dangerouslySetInnerHTML`:if(p!=null)throw Error(i(137,t));break;default:Gd(e,t,u,p,r,m)}return;default:if(Xt(t)){for(var _ in n)p=n[_],n.hasOwnProperty(_)&&p!==void 0&&!r.hasOwnProperty(_)&&Kd(e,t,_,void 0,r,p);
vendor: 4,463 bytes, line 9
9for(d in r)p=r[d],m=n[d],!r.hasOwnProperty(d)||p===m||p===void 0&&m===void 0||Kd(e,t,d,p,r,m);return}}for(var v in n)p=n[v],n.hasOwnProperty(v)&&p!=null&&!r.hasOwnProperty(v)&&Gd(e,t,v,null,r,p);for(f in r)p=r[f],m=n[f],!r.hasOwnProperty(f)||p===m||p==null&&m==null||Gd(e,t,f,p,r,m)}function Yd(e){switch(e){case`css`:case`script`:case`font`:case`img`:case`image`:case`input`:case`link`:return!0;default:return!1}}function Xd(){if(typeof performance.getEntriesByType==`function`){for(var e=0,t=0,n=performance.getEntriesByType(`resource`),r=0;r<n.length;r++){var i=n[r],a=i.transferSize,o=i.initiatorType,s=i.duration;if(a&&s&&Yd(o)){for(o=0,s=i.responseEnd,r+=1;r<n.length;r++){var c=n[r],l=c.startTime;if(l>s)break;var u=c.transferSize,d=c.initiatorType;u&&Yd(d)&&(c=c.responseEnd,o+=u*(c<s?1:(s-l)/(c-l)))}if(--r,t+=8*(a+o)/(i.duration/1e3),e++,10<e)break}}if(0<e)return t/e/1e6}return navigator.connection&&(e=navigator.connection.downlink,typeof e==`number`)?e:5}var Zd=null,Qd=null;function $d(e){return e.nodeType===9?e:e.ownerDocument}function ef(e){switch(e){case`http://www.w3.org/2000/svg`:return 1;case`http://www.w3.org/1998/Math/MathML`:return 2;default:return 0}}function tf(e,t){if(e===0)switch(t){case`svg`:return 1;case`math`:return 2;default:return 0}return e===1&&t===`foreignObject`?0:e}function nf(e,t){return e===`textarea`||e===`noscript`||typeof t.children==`string`||typeof t.children==`number`||typeof t.children==`bigint`||typeof t.dangerouslySetInnerHTML==`object`&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var rf=null;function af(){var e=window.event;return e&&e.type===`popstate`?e===rf?!1:(rf=e,!0):(rf=null,!1)}var of=typeof setTimeout==`function`?setTimeout:void 0,sf=typeof clearTimeout==`function`?clearTimeout:void 0,cf=typeof Promise==`function`?Promise:void 0,lf=typeof queueMicrotask==`function`?queueMicrotask:cf===void 0?of:function(e){return cf.resolve(null).then(e).catch(uf)};function uf(e){setTimeout(function(){throw e})}function df(e){return e===`head`}function ff(e,t){var n=t,r=0;do{var i=n.nextSibling;if(e.removeChild(n),i&&i.nodeType===8)if(n=i.data,n===`/$`||n===`/&`){if(r===0){e.removeChild(i),Kp(t);return}r--}else if(n===`$`||n===`$?`||n===`$~`||n===`$!`||n===`&`)r++;else if(n===`html`)Ef(e.ownerDocument.documentElement);else if(n===`head`){n=e.ownerDocument.head,Ef(n);for(var a=n.firstChild;a;){var o=a.nextSibling,s=a.nodeName;a[mt]||s===`SCRIPT`||s===`STYLE`||s===`LINK`&&a.rel.toLowerCase()===`stylesheet`||n.removeChild(a),a=o}}else n===`body`&&Ef(e.ownerDocument.body);n=i}while(n);Kp(t)}function pf(e,t){var n=e;e=0;do{var r=n.nextSibling;if(n.nodeType===1?t?(n._stashedDisplay=n.style.display,n.style.display=`none`):(n.style.display=n._stashedDisplay||``,n.getAttribute(`style`)===``&&n.removeAttribute(`style`)):n.nodeType===3&&(t?(n._stashedText=n.nodeValue,n.nodeValue=``):n.nodeValue=n._stashedText||``),r&&r.nodeType===8)if(n=r.data,n===`/$`){if(e===0)break;e--}else n!==`$`&&n!==`$?`&&n!==`$~`&&n!==`$!`||e++;n=r}while(n)}function mf(e){var t=e.firstChild;for(t&&t.nodeType===10&&(t=t.nextSibling);t;){var n=t;switch(t=t.nextSibling,n.nodeName){case`HTML`:case`HEAD`:case`BODY`:mf(n),ht(n);continue;case`SCRIPT`:case`STYLE`:continue;case`LINK`:if(n.rel.toLowerCase()===`stylesheet`)continue}e.removeChild(n)}}function hf(e,t,n,r){for(;e.nodeType===1;){var i=n;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!r&&(e.nodeName!==`INPUT`||e.type!==`hidden`))break}else if(!r)if(t===`input`&&e.type===`hidden`){var a=i.name==null?null:``+i.name;if(i.type===`hidden`&&e.getAttribute(`name`)===a)return e}else return e;else if(!e[mt])switch(t){case`meta`:if(!e.hasAttribute(`itemprop`))break;return e;case`link`:if(a=e.getAttribute(`rel`),a===`stylesheet`&&e.hasAttribute(`data-precedence`)||a!==i.rel||e.getAttribute(`href`)!==(i.href==null||i.href===``?null:i.href)||e.getAttribute(`crossorigin`)!==(i.crossOrigin==null?null:i.crossOrigin)||e.getAttribute(`title`)!==(i.title==null?null:i.title))break;return e;case`style`:if(e.hasAttribute(`data-precedence`))break;return e;case`script`:if(a=e.getAttribute(`src`),(a!==(i.src==null?null:i.src)||e.getAttribute(`type`)!==(i.type==null?null:i.type)||e.getAttribute(`crossorigin`)!==(i.crossOrigin==null?null:i.crossOrigin))&&a&&e.hasAttribute(`async`)&&!e.hasAttribute(`itemprop`))break;return e;default:return e}if(e=xf(e.nextSibling),e===null)break}return null}function gf(e,t,n){if(t===``)return null;for(;
vendor: 18,563 bytes, line 9
9e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!==`INPUT`||e.type!==`hidden`)&&!n||(e=xf(e.nextSibling),e===null))return null;return e}function _f(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!==`INPUT`||e.type!==`hidden`)&&!t||(e=xf(e.nextSibling),e===null))return null;return e}function vf(e){return e.data===`$?`||e.data===`$~`}function yf(e){return e.data===`$!`||e.data===`$?`&&e.ownerDocument.readyState!==`loading`}function bf(e,t){var n=e.ownerDocument;if(e.data===`$~`)e._reactRetry=t;else if(e.data!==`$?`||n.readyState!==`loading`)t();else{var r=function(){t(),n.removeEventListener(`DOMContentLoaded`,r)};n.addEventListener(`DOMContentLoaded`,r),e._reactRetry=r}}function xf(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t===`$`||t===`$!`||t===`$?`||t===`$~`||t===`&`||t===`F!`||t===`F`)break;if(t===`/$`||t===`/&`)return null}}return e}var Sf=null;function Cf(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n===`/$`||n===`/&`){if(t===0)return xf(e.nextSibling);t--}else n!==`$`&&n!==`$!`&&n!==`$?`&&n!==`$~`&&n!==`&`||t++}e=e.nextSibling}return null}function wf(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n===`$`||n===`$!`||n===`$?`||n===`$~`||n===`&`){if(t===0)return e;t--}else n!==`/$`&&n!==`/&`||t++}e=e.previousSibling}return null}function Tf(e,t,n){switch(t=$d(n),e){case`html`:if(e=t.documentElement,!e)throw Error(i(452));return e;case`head`:if(e=t.head,!e)throw Error(i(453));return e;case`body`:if(e=t.body,!e)throw Error(i(454));return e;default:throw Error(i(451))}}function Ef(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);ht(e)}var Df=new Map,Of=new Set;function kf(e){return typeof e.getRootNode==`function`?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var Af=I.d;I.d={f:jf,r:Mf,D:Ff,C:If,L:Lf,m:Rf,X:Bf,S:zf,M:Vf};function jf(){var e=Af.f(),t=Au();return e||t}function Mf(e){var t=_t(e);t!==null&&t.tag===5&&t.type===`form`?Ms(t):Af.r(e)}var Nf=typeof document>`u`?null:document;function Pf(e,t,n){var r=Nf;if(r&&typeof t==`string`&&t){var i=zt(t);i=`link[rel="`+e+`"][href="`+i+`"]`,typeof n==`string`&&(i+=`[crossorigin="`+n+`"]`),Of.has(i)||(Of.add(i),e={rel:e,crossOrigin:n,href:t},r.querySelector(i)===null&&(t=r.createElement(`link`),qd(t,`link`,e),bt(t),r.head.appendChild(t)))}}function Ff(e){Af.D(e),Pf(`dns-prefetch`,e,null)}function If(e,t){Af.C(e,t),Pf(`preconnect`,e,t)}function Lf(e,t,n){Af.L(e,t,n);var r=Nf;if(r&&e&&t){var i=`link[rel="preload"][as="`+zt(t)+`"]`;t===`image`&&n&&n.imageSrcSet?(i+=`[imagesrcset="`+zt(n.imageSrcSet)+`"]`,typeof n.imageSizes==`string`&&(i+=`[imagesizes="`+zt(n.imageSizes)+`"]`)):i+=`[href="`+zt(e)+`"]`;var a=i;switch(t){case`style`:a=Uf(e);break;case`script`:a=qf(e)}Df.has(a)||(e=f({rel:`preload`,href:t===`image`&&n&&n.imageSrcSet?void 0:e,as:t},n),Df.set(a,e),r.querySelector(i)!==null||t===`style`&&r.querySelector(Wf(a))||t===`script`&&r.querySelector(Jf(a))||(t=r.createElement(`link`),qd(t,`link`,e),bt(t),r.head.appendChild(t)))}}function Rf(e,t){Af.m(e,t);var n=Nf;if(n&&e){var r=t&&typeof t.as==`string`?t.as:`script`,i=`link[rel="modulepreload"][as="`+zt(r)+`"][href="`+zt(e)+`"]`,a=i;switch(r){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:a=qf(e)}if(!Df.has(a)&&(e=f({rel:`modulepreload`,href:e},t),Df.set(a,e),n.querySelector(i)===null)){switch(r){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:if(n.querySelector(Jf(a)))return}r=n.createElement(`link`),qd(r,`link`,e),bt(r),n.head.appendChild(r)}}}function zf(e,t,n){Af.S(e,t,n);var r=Nf;if(r&&e){var i=yt(r).hoistableStyles,a=Uf(e);t||=`default`;var o=i.get(a);if(!o){var s={loading:0,preload:null};if(o=r.querySelector(Wf(a)))s.loading=5;else{e=f({rel:`stylesheet`,href:e,"data-precedence":t},n),(n=Df.get(a))&&Zf(e,n);var c=o=r.createElement(`link`);bt(c),qd(c,`link`,e),c._p=new Promise(function(e,t){c.onload=e,c.onerror=t}),c.addEventListener(`load`,function(){s.loading|=1}),c.addEventListener(`error`,function(){s.loading|=2}),s.loading|=4,Xf(o,t,r)}o={type:`stylesheet`,instance:o,count:1,state:s},i.set(a,o)}}}function Bf(e,t){Af.X(e,t);var n=Nf;if(n&&e){var r=yt(n).hoistableScripts,i=qf(e),a=r.get(i);a||(a=n.querySelector(Jf(i)),a||(e=f({src:e,async:!0},t),(t=Df.get(i))&&Qf(e,t),a=n.createElement(`script`),bt(a),qd(a,`link`,e),n.head.appendChild(a)),a={type:`script`,instance:a,count:1,state:null},r.set(i,a))}}function Vf(e,t){Af.M(e,t);var n=Nf;if(n&&e){var r=yt(n).hoistableScripts,i=qf(e),a=r.get(i);a||(a=n.querySelector(Jf(i)),a||(e=f({src:e,async:!0,type:`module`},t),(t=Df.get(i))&&Qf(e,t),a=n.createElement(`script`),bt(a),qd(a,`link`,e),n.head.appendChild(a)),a={type:`script`,instance:a,count:1,state:null},r.set(i,a))}}function Hf(e,t,n,r){var a=(a=le.current)?kf(a):null;if(!a)throw Error(i(446));switch(e){case`meta`:case`title`:return null;case`style`:return typeof n.precedence==`string`&&typeof n.href==`string`?(t=Uf(n.href),n=yt(a).hoistableStyles,r=n.get(t),r||(r={type:`style`,instance:null,count:0,state:null},n.set(t,r)),r):{type:`void`,instance:null,count:0,state:null};case`link`:if(n.rel===`stylesheet`&&typeof n.href==`string`&&typeof n.precedence==`string`){e=Uf(n.href);var o=yt(a).hoistableStyles,s=o.get(e);if(s||(a=a.ownerDocument||a,s={type:`stylesheet`,instance:null,count:0,state:{loading:0,preload:null}},o.set(e,s),(o=a.querySelector(Wf(e)))&&!o._p&&(s.instance=o,s.state.loading=5),Df.has(e)||(n={rel:`preload`,as:`style`,href:n.href,crossOrigin:n.crossOrigin,integrity:n.integrity,media:n.media,hrefLang:n.hrefLang,referrerPolicy:n.referrerPolicy},Df.set(e,n),o||Kf(a,e,n,s.state))),t&&r===null)throw Error(i(528,``));return s}if(t&&r!==null)throw Error(i(529,``));return null;case`script`:return t=n.async,n=n.src,typeof n==`string`&&t&&typeof t!=`function`&&typeof t!=`symbol`?(t=qf(n),n=yt(a).hoistableScripts,r=n.get(t),r||(r={type:`script`,instance:null,count:0,state:null},n.set(t,r)),r):{type:`void`,instance:null,count:0,state:null};default:throw Error(i(444,e))}}function Uf(e){return`href="`+zt(e)+`"`}function Wf(e){return`link[rel="stylesheet"][`+e+`]`}function Gf(e){return f({},e,{"data-precedence":e.precedence,precedence:null})}function Kf(e,t,n,r){e.querySelector(`link[rel="preload"][as="style"][`+t+`]`)?r.loading=1:(t=e.createElement(`link`),r.preload=t,t.addEventListener(`load`,function(){return r.loading|=1}),t.addEventListener(`error`,function(){return r.loading|=2}),qd(t,`link`,n),bt(t),e.head.appendChild(t))}function qf(e){return`[src="`+zt(e)+`"]`}function Jf(e){return`script[async]`+e}function Yf(e,t,n){if(t.count++,t.instance===null)switch(t.type){case`style`:var r=e.querySelector(`style[data-href~="`+zt(n.href)+`"]`);if(r)return t.instance=r,bt(r),r;var a=f({},n,{"data-href":n.href,"data-precedence":n.precedence,href:null,precedence:null});return r=(e.ownerDocument||e).createElement(`style`),bt(r),qd(r,`style`,a),Xf(r,n.precedence,e),t.instance=r;case`stylesheet`:a=Uf(n.href);var o=e.querySelector(Wf(a));if(o)return t.state.loading|=4,t.instance=o,bt(o),o;r=Gf(n),(a=Df.get(a))&&Zf(r,a),o=(e.ownerDocument||e).createElement(`link`),bt(o);var s=o;return s._p=new Promise(function(e,t){s.onload=e,s.onerror=t}),qd(o,`link`,r),t.state.loading|=4,Xf(o,n.precedence,e),t.instance=o;case`script`:return o=qf(n.src),(a=e.querySelector(Jf(o)))?(t.instance=a,bt(a),a):(r=n,(a=Df.get(o))&&(r=f({},n),Qf(r,a)),e=e.ownerDocument||e,a=e.createElement(`script`),bt(a),qd(a,`link`,r),e.head.appendChild(a),t.instance=a);case`void`:return null;default:throw Error(i(443,t.type))}else t.type===`stylesheet`&&!(t.state.loading&4)&&(r=t.instance,t.state.loading|=4,Xf(r,n.precedence,e));return t.instance}function Xf(e,t,n){for(var r=n.querySelectorAll(`link[rel="stylesheet"][data-precedence],style[data-precedence]`),i=r.length?r[r.length-1]:null,a=i,o=0;o<r.length;o++){var s=r[o];if(s.dataset.precedence===t)a=s;else if(a!==i)break}a?a.parentNode.insertBefore(e,a.nextSibling):(t=n.nodeType===9?n.head:n,t.insertBefore(e,t.firstChild))}function Zf(e,t){e.crossOrigin??=t.crossOrigin,e.referrerPolicy??=t.referrerPolicy,e.title??=t.title}function Qf(e,t){e.crossOrigin??=t.crossOrigin,e.referrerPolicy??=t.referrerPolicy,e.integrity??=t.integrity}var $f=null;function ep(e,t,n){if($f===null){var r=new Map,i=$f=new Map;i.set(n,r)}else i=$f,r=i.get(n),r||(r=new Map,i.set(n,r));if(r.has(e))return r;for(r.set(e,null),n=n.getElementsByTagName(e),i=0;i<n.length;i++){var a=n[i];if(!(a[mt]||a[st]||e===`link`&&a.getAttribute(`rel`)===`stylesheet`)&&a.namespaceURI!==`http://www.w3.org/2000/svg`){var o=a.getAttribute(t)||``;o=e+o;var s=r.get(o);s?s.push(a):r.set(o,[a])}}return r}function tp(e,t,n){e=e.ownerDocument||e,e.head.insertBefore(n,t===`title`?e.querySelector(`head > title`):null)}function np(e,t,n){if(n===1||t.itemProp!=null)return!1;switch(e){case`meta`:case`title`:return!0;case`style`:if(typeof t.precedence!=`string`||typeof t.href!=`string`||t.href===``)break;return!0;case`link`:if(typeof t.rel!=`string`||typeof t.href!=`string`||t.href===``||t.onLoad||t.onError)break;switch(t.rel){case`stylesheet`:return e=t.disabled,typeof t.precedence==`string`&&e==null;default:return!0}case`script`:if(t.async&&typeof t.async!=`function`&&typeof t.async!=`symbol`&&!t.onLoad&&!t.onError&&t.src&&typeof t.src==`string`)return!0}return!1}function rp(e){return!(e.type===`stylesheet`&&!(e.state.loading&3))}function ip(e,t,n,r){if(n.type===`stylesheet`&&(typeof r.media!=`string`||!1!==matchMedia(r.media).matches)&&!(n.state.loading&4)){if(n.instance===null){var i=Uf(r.href),a=t.querySelector(Wf(i));if(a){t=a._p,typeof t==`object`&&t&&typeof t.then==`function`&&(e.count++,e=sp.bind(e),t.then(e,e)),n.state.loading|=4,n.instance=a,bt(a);return}a=t.ownerDocument||t,r=Gf(r),(i=Df.get(i))&&Zf(r,i),a=a.createElement(`link`),bt(a);var o=a;o._p=new Promise(function(e,t){o.onload=e,o.onerror=t}),qd(a,`link`,r),n.instance=a}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(n,t),(t=n.state.preload)&&!(n.state.loading&3)&&(e.count++,n=sp.bind(e),t.addEventListener(`load`,n),t.addEventListener(`error`,n))}}var ap=0;function op(e,t){return e.stylesheets&&e.count===0&&lp(e,e.stylesheets),0<e.count||0<e.imgCount?function(n){var r=setTimeout(function(){if(e.stylesheets&&lp(e,e.stylesheets),e.unsuspend){var t=e.unsuspend;e.unsuspend=null,t()}},6e4+t);0<e.imgBytes&&ap===0&&(ap=62500*Xd());var i=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&lp(e,e.stylesheets),e.unsuspend)){var t=e.unsuspend;e.unsuspend=null,t()}},(e.imgBytes>ap?50:800)+t);return e.unsuspend=n,function(){e.unsuspend=null,clearTimeout(r),clearTimeout(i)}}:null}function sp(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)lp(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var cp=null;function lp(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,cp=new Map,t.forEach(up,e),cp=null,sp.call(e))}function up(e,t){if(!(t.state.loading&4)){var n=cp.get(e);if(n)var r=n.get(null);else{n=new Map,cp.set(e,n);for(var i=e.querySelectorAll(`link[data-precedence],style[data-precedence]`),a=0;a<i.length;a++){var o=i[a];(o.nodeName===`LINK`||o.getAttribute(`media`)!==`not all`)&&(n.set(o.dataset.precedence,o),r=o)}r&&n.set(null,r)}i=t.instance,o=i.getAttribute(`data-precedence`),a=n.get(o)||r,a===r&&n.set(null,i),n.set(o,i),this.count++,r=sp.bind(this),i.addEventListener(`load`,r),i.addEventListener(`error`,r),a?a.parentNode.insertBefore(i,a.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(i,e.firstChild)),t.state.loading|=4}}var dp={$$typeof:C,Provider:null,Consumer:null,_currentValue:te,_currentValue2:te,_threadCount:0};function fp(e,t,n,r,i,a,o,s,c){this.tag=1,this.containerInfo=e,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=Xe(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Xe(0),this.hiddenUpdates=Xe(null),this.identifierPrefix=r,this.onUncaughtError=i,this.onCaughtError=a,this.onRecoverableError=o,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=c,this.incompleteTransitions=new Map}function pp(e,t,n,r,i,a,o,s,c,l,u,d){return e=new fp(e,t,n,o,c,l,u,d,s),t=1,!0===a&&(t|=24),a=li(3,null,null,t),e.current=a,a.stateNode=e,t=ua(),t.refCount++,e.pooledCache=t,t.refCount++,a.memoizedState={element:r,isDehydrated:n,cache:t},Ua(a),e}function mp(e){return e?(e=si,e):si}function hp(e,t,n,r,i,a){i=mp(i),r.context===null?r.context=i:r.pendingContext=i,r=Ga(t),r.payload={element:n},a=a===void 0?null:a,a!==null&&(r.callback=a),n=Ka(e,r,t),n!==null&&(Tu(n,e,t),qa(n,e,t))}function gp(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function _p(e,t){gp(e,t),(e=e.alternate)&&gp(e,t)}function vp(e){if(e.tag===13||e.tag===31){var t=ii(e,67108864);t!==null&&Tu(t,e,67108864),_p(e,67108864)}}function yp(e){if(e.tag===13||e.tag===31){var t=Cu();t=nt(t);var n=ii(e,t);n!==null&&Tu(n,e,t),_p(e,t)}}var bp=!0;function xp(e,t,n,r){var i=ee.T;ee.T=null;var a=I.p;try{I.p=2,Cp(e,t,n,r)}finally{I.p=a,ee.T=i}}function Sp(e,t,n,r){var i=ee.T;ee.T=null;var a=I.p;try{I.p=8,Cp(e,t,n,r)}finally{I.p=a,ee.T=i}}function Cp(e,t,n,r){if(bp){var i=wp(r);if(i===null)Id(e,t,r,Tp,n),Ip(e,r);else if(Rp(i,e,t,n,r))r.stopPropagation();else if(Ip(e,r),t&4&&-1<Fp.indexOf(e)){for(;i!==null;){var a=_t(i);if(a!==null)switch(a.tag){case 3:if(a=a.stateNode,a.current.memoizedState.isDehydrated){var o=Ge(a.pendingLanes);if(o!==0){var s=a;for(s.pendingLanes|=2,s.entangledLanes|=2;o;){var c=1<<31-Re(o);s.entanglements[1]|=c,o&=~c}md(a),!(Gl&6)&&(fu=Ee()+500,hd(0,!1))}}break;case 31:case 13:s=ii(a,2),s!==null&&Tu(s,a,2),Au(),_p(a,2)}if(a=wp(r),a===null&&Id(e,t,r,Tp,n),a===i)break;i=a}i!==null&&r.stopPropagation()}else Id(e,t,r,null,n)}}function wp(e){return e=nn(e),Ep(e)}var Tp=null;function Ep(e){if(Tp=null,e=gt(e),e!==null){var t=o(e);if(t===null)e=null;else{var n=t.tag;if(n===13){if(e=s(t),e!==null)return e;e=null}else if(n===31){if(e=c(t),e!==null)return e;e=null}else if(n===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null)}}return Tp=e,null}function Dp(e){switch(e){case`beforetoggle`:case`cancel`:case`click`:case`close`:case`contextmenu`:case`copy`:case`cut`:case`auxclick`:case`dblclick`:case`dragend`:case`dragstart`:case`drop`:case`focusin`:case`focusout`:case`input`:case`invalid`:case`keydown`:case`keypress`:case`keyup`:case`mousedown`:case`mouseup`:case`paste`:case`pause`:case`play`:case`pointercancel`:case`pointerdown`:case`pointerup`:case`ratechange`:case`reset`:case`resize`:case`seeked`:case`submit`:case`toggle`:case`touchcancel`:case`touchend`:case`touchstart`:case`volumechange`:case`change`:case`selectionchange`:case`textInput`:case`compositionstart`:case`compositionend`:case`compositionupdate`:case`beforeblur`:case`afterblur`:case`beforeinput`:case`blur`:case`fullscreenchange`:case`focus`:case`hashchange`:case`popstate`:case`select`:case`selectstart`:return 2;case`drag`:case`dragenter`:case`dragexit`:case`dragleave`:case`dragover`:case`mousemove`:case`mouseout`:case`mouseover`:case`pointermove`:case`pointerout`:case`pointerover`:case`scroll`:case`touchmove`:case`wheel`:case`mouseenter`:case`mouseleave`:case`pointerenter`:case`pointerleave`:return 8;case`message`:switch(De()){case Oe:return 2;case ke:return 8;case Ae:case je:return 32;case Me:return 268435456;default:return 32}default:return 32}}var Op=!1,kp=null,Ap=null,jp=null,Mp=new Map,Np=new Map,Pp=[],Fp=`mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset`.split(` `);function Ip(e,t){switch(e){case`focusin`:case`focusout`:kp=null;break;case`dragenter`:case`dragleave`:Ap=null;break;case`mouseover`:case`mouseout`:jp=null;break;case`pointerover`:case`pointerout`:Mp.delete(t.pointerId);break;case`gotpointercapture`:case`lostpointercapture`:Np.delete(t.pointerId)}}function Lp(e,t,n,r,i,a){return e===null||e.nativeEvent!==a?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:a,targetContainers:[i]},t!==null&&(t=_t(t),t!==null&&vp(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,i!==null&&t.indexOf(i)===-1&&t.push(i),e)}function Rp(e,t,n,r,i){switch(t){case`focusin`:return kp=Lp(kp,e,t,n,r,i),!0;case`dragenter`:return Ap=Lp(Ap,e,t,n,r,i),!0;case`mouseover`:return jp=Lp(jp,e,t,n,r,i),!0;case`pointerover`:var a=i.pointerId;return Mp.set(a,Lp(Mp.get(a)||null,e,t,n,r,i)),!0;case`gotpointercapture`:return a=i.pointerId,Np.set(a,Lp(Np.get(a)||null,e,t,n,r,i)),!0}return!1}function zp(e){var t=gt(e.target);if(t!==null){var n=o(t);if(n!==null){if(t=n.tag,t===13){if(t=s(n),t!==null){e.blockedOn=t,at(e.priority,function(){yp(n)});return}}else if(t===31){if(t=c(n),t!==null){e.blockedOn=t,at(e.priority,function(){yp(n)});return}}else if(t===3&&n.stateNode.current.memoizedState.isDehydrated){e.blockedOn=n.tag===3?n.stateNode.containerInfo:null;return}}}e.blockedOn=null}function Bp(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=wp(e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);tn=r,n.target.dispatchEvent(r),tn=null}else return t=_t(n),t!==null&&vp(t),e.blockedOn=n,!1;t.shift()}return!0}function Vp(e,t,n){Bp(e)&&n.delete(t)}function Hp(){Op=!1,kp!==null&&Bp(kp)&&(kp=null),Ap!==null&&Bp(Ap)&&(Ap=null),jp!==null&&Bp(jp)&&(jp=null),Mp.forEach(Vp),Np.forEach(Vp)}function Up(e,n){e.blockedOn===n&&(e.blockedOn=null,Op||(Op=!0,t.unstable_scheduleCallback(t.unstable_NormalPriority,Hp)))}var Wp=null;function Gp(e){Wp!==e&&(Wp=e,t.unstable_scheduleCallback(t.unstable_NormalPriority,function(){Wp===e&&(Wp=null);for(var t=0;t<e.length;t+=3){var n=e[t],r=e[t+1],i=e[t+2];if(typeof r!=`function`){if(Ep(r||n)===null)continue;break}var a=_t(n);a!==null&&(e.splice(t,3),t-=3,As(a,{pending:!0,data:i,method:n.method,action:r},r,i))}}))}function Kp(e){function t(t){return Up(t,e)}kp!==null&&Up(kp,e),Ap!==null&&Up(Ap,e),jp!==null&&Up(jp,e),Mp.forEach(t),Np.forEac
9h(t);for(var n=0;n<Pp.length;n++){var r=Pp[n];r.blockedOn===e&&(r.blockedOn=null)}for(;0<Pp.length&&(n=Pp[0],n.blockedOn===null);)zp(n),n.blockedOn===null&&Pp.shift();if(n=(e.ownerDocument||e).$$reactFormReplay,n!=null)for(r=0;r<n.length;r+=3){var i=n[r],a=n[r+1],o=i[ct]||null;if(typeof a==`function`)o||Gp(n);else if(o){var s=null;if(a&&a.hasAttribute(`formAction`)){if(i=a,o=a[ct]||null)s=o.formAction;else if(Ep(i)!==null)continue}else s=o.action;typeof s==`function`?n[r+1]=s:(n.splice(r,3),r-=3),Gp(n)}}}function qp(){function e(e){e.canIntercept&&e.info===`react-transition`&&e.intercept({handler:function(){return new Promise(function(e){return i=e})},focusReset:`manual`,scroll:`manual`})}function t(){i!==null&&(i(),i=null),r||setTimeout(n,20)}function n(){if(!r&&!navigation.transition){var e=navigation.currentEntry;e&&e.url!=null&&navigation.navigate(e.url,{state:e.getState(),info:`react-transition`,history:`replace`})}}if(typeof navigation==`object`){var r=!1,i=null;return navigation.addEventListener(`navigate`,e),navigation.addEventListener(`navigatesuccess`,t),navigation.addEventListener(`navigateerror`,t),setTimeout(n,100),function(){r=!0,navigation.removeEventListener(`navigate`,e),navigation.removeEventListener(`navigatesuccess`,t),navigation.removeEventListener(`navigateerror`,t),i!==null&&(i(),i=null)}}}function Jp(e){this._internalRoot=e}Yp.prototype.render=Jp.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(i(409));var n=t.current;hp(n,Cu(),e,t,null,null)},Yp.prototype.unmount=Jp.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;hp(e.current,2,null,e,null,null),Au(),t[lt]=null}};function Yp(e){this._internalRoot=e}Yp.prototype.unstable_scheduleHydration=function(e){if(e){var t=it();e={blockedOn:null,target:e,priority:t};for(var n=0;n<Pp.length&&t!==0&&t<Pp[n].priority;n++);Pp.splice(n,0,e),n===0&&zp(e)}};var Xp=n.version;if(Xp!==`19.2.5`)throw Error(i(527,Xp,`19.2.5`));I.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render==`function`?Error(i(188)):(e=Object.keys(e).join(`,`),Error(i(268,e)));return e=u(t),e=e===null?null:d(e),e=e===null?null:e.stateNode,e};var Zp={bundleType:0,version:`19.2.5`,rendererPackageName:`react-dom`,currentDispatcherRef:ee,reconcilerVersion:`19.2.5`};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<`u`){var Qp=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Qp.isDisabled&&Qp.supportsFiber)try{Fe=Qp.inject(Zp),Ie=Qp}catch{}}e.createRoot=function(e,t){if(!a(e))throw Error(i(299));var n=!1,r=``,o=R,s=$s,c=ec;return t!=null&&(!0===t.unstable_strictMode&&(n=!0),t.identifierPrefix!==void 0&&(r=t.identifierPrefix),t.onUncaughtError!==void 0&&(o=t.onUncaughtError),t.onCaughtError!==void 0&&(s=t.onCaughtError),t.onRecoverableError!==void 0&&(c=t.onRecoverableError)),t=pp(e,1,!1,null,null,n,r,null,o,s,c,qp),e[lt]=t.current,Pd(e),new Jp(t)}})),y=s(((e,t)=>{function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>`u`||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!=`function`))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(e){console.error(e)}}n(),t.exports=v()})),b=u(p(),1),x=u(_(),1),S=u(y(),1),C=`modulepreload`,w=function(e){return`/`+e},T={},E=function(e,t,n){let r=Promise.resolve();if(t&&t.length>0){let e=document.getElementsByTagName(`link`),i=document.querySelector(`meta[property=csp-nonce]`),a=i?.nonce||i?.getAttribute(`nonce`);function o(e){return Promise.all(e.map(e=>Promise.resolve(e).then(e=>({status:`fulfilled`,value:e}),e=>({status:`rejected`,reason:e}))))}r=o(t.map(t=>{if(t=w(t,n),t in T)return;T[t]=!0;let r=t.endsWith(`.css`),i=r?`[rel="stylesheet"]`:``;if(n)for(let n=e.length-1;n>=0;n--){let i=e[n];if(i.href===t&&(!r||i.rel===`stylesheet`))return}else if(document.querySelector(`link[href="${t}"]${i}`))return;let o=document.createElement(`link`);if(o.rel=r?`stylesheet`:C,r||(o.as=`script`),o.crossOrigin=``,o.href=t,a&&o.setAttribute(`nonce`,a),document.head.appendChild(o),r)return new Promise((e,n)=>{o.addEventListener(`load`,e),o.addEventListener(`error`,()=>n(Error(`Unable to preload CSS for ${t}`)))})}))}function i(e){let t=new Event(`vite:preloadError`,{cancelable:!0});if(t.payload=e,window.dispatchEvent(t),!t.defaultPrevented)throw e}return r.then(t=>{for(let e of t||[])e.status===`rejected`&&i(e.reason);return e().catch(i)})},D=e=>{throw TypeError(e)},O=(e,t,n)=>t.has(e)||D(`Cannot `+n),k=(e,t,n)=>(O(e,t,`read from private field`),n?n.call(e):t.get(e)),A=(e,t,n
9)=>t.has(e)?D(`Cannot add the same private member more than once`):t instanceof WeakSet?t.add(e):t.set(e,n),j=`popstate`;function M(e){return typeof e==`object`&&!!e&&`pathname`in e&&`search`in e&&`hash`in e&&`state`in e&&`key`in e}function N(e={}){function t(e,t){let n=t.state?.masked,{pathname:r,search:i,hash:a}=n||e.location;return te(``,{pathname:r,search:i,hash:a},t.state&&t.state.usr||null,t.state&&t.state.key||`default`,n?{pathname:e.location.pathname,search:e.location.search,hash:e.location.hash}:void 0)}function n(e,t){return typeof t==`string`?t:ne(t)}return ie(t,n,null,e)}function P(e,t){if(e===!1||e==null)throw Error(t)}function F(e,t){if(!e){typeof console<`u`&&console.warn(t);try{throw Error(t)}catch{}}}function ee(){return Math.random().toString(36).substring(2,10)}function I(e,t){return{usr:e.state,key:e.key,idx:t,masked:e.unstable_mask?{pathname:e.pathname,search:e.search,hash:e.hash}:void 0}}function te(e,t,n=null,r,i){return{pathname:typeof e==`string`?e:e.pathname,search:``,hash:``,...typeof t==`string`?re(t):t,state:n,key:t&&t.key||r||ee(),unstable_mask:i}}function ne({pathname:e=`/`,search:t=``,hash:n=``}){return t&&t!==`?`&&(e+=t.charAt(0)===`?`?t:`?`+t),n&&n!==`#`&&(e+=n.charAt(0)===`#`?n:`#`+n),e}function re(e){let t={};if(e){let n=e.indexOf(`#`);n>=0&&(t.hash=e.substring(n),e=e.substring(0,n));let r=e.indexOf(`?`);r>=0&&(t.search=e.substring(r),e=e.substring(0,r)),e&&(t.pathname=e)}return t}function ie(e,t,n,r={}){let{window:i=document.defaultView,v5Compat:a=!1}=r,o=i.history,s=`POP`,c=null,l=u();l??(l=0,o.replaceState({...o.state,idx:l},``));function u(){return(o.state||{idx:null}).idx}function d(){s=`POP`;let e=u(),t=e==null?null:e-l;l=e,c&&c({action:s,location:h.location,delta:t})}function f(e,t){s=`PUSH`;let r=M(e)?e:te(h.location,e,t);n&&n(r,e),l=u()+1;let d=I(r,l),f=h.createHref(r.unstable_mask||r);try{o.pushState(d,``,f)}catch(e){if(e instanceof DOMException&&e.name===`DataCloneError`)throw e;i.location.assign(f)}a&&c&&c({action:s,location:h.location,delta:1})}function p(e,t){s=`REPLACE`;let r=M(e)?e:te(h.location,e,t);n&&n(r,e),l=u();let i=I(r,l),d=h.createHref(r.unstable_mask||r);o.replaceState(i,``,d),a&&c&&c({action:s,location:h.location,delta:0})}function m(e){return ae(e)}let h={get action(){return s},get location(){return e(i,o)},listen(e){if(c)throw Error(`A history only accepts one active listener`);return i.addEventListener(j,d),c=e,()=>{i.removeEventListener(j,d),c=null}},createHref(e){return t(i,e)},createURL:m,encodeLocation(e){let t=m(e);return{pathname:t.pathname,search:t.search,hash:t.hash}},push:f,replace:p,go(e){return o.go(e)}};return h}function ae(e,t=!1){let n=`http://localhost`;typeof window<`u`&&(n=window.location.origin===`null`?window.location.href:window.location.origin),P(n,`No window.location.(origin|href) available to create URL`);let r=typeof e==`string`?e:ne(e);return r=r.replace(/ $/,`%20`),!t&&r.startsWith(`//`)&&(r=n+r),new URL(r,n)}var oe,se=class{constructor(e){if(A(this,oe,new Map),e)for(let[t,n]of e)this.set(t,n)}get(e){if(k(this,oe).has(e))return k(this,oe).get(e);if(e.defaultValue!==void 0)return e.defaultValue;throw Error(`No value found for context`)}set(e,t){k(this,oe).set(e,t)}};oe=new WeakMap;var ce=new Set([`lazy`,`caseSensitive`,`path`,`id`,`index`,`children`]);function le(e){return ce.has(e)}var ue=new Set([`lazy`,`caseSensitive`,`path`,`id`,`index`,`middleware`,`children`]);function de(e){return ue.has(e)}function fe(e){return e.index===!0}function L(e,t,n=[],r={},i=!1){return e.map((e,a)=>{let o=[...n,String(a)],s=typeof e.id==`string`?e.id:o.join(`-`);if(P(e.index!==!0||!e.children,`Cannot specify children on an index route`),P(i||!r[s],`Found a route id collision on i
9d "${s}". Route id's must be globally unique within Data Router usages`),fe(e)){let n={...e,id:s};return r[s]=pe(n,t(n)),n}else{let n={...e,id:s,children:void 0};return r[s]=pe(n,t(n)),e.children&&(n.children=L(e.children,t,o,r,i)),n}})}function pe(e,t){return Object.assign(e,{...t,...typeof t.lazy==`object`&&t.lazy!=null?{lazy:{...e.lazy,...t.lazy}}:{}})}function me(e,t,n=`/`){return he(e,t,n,!1)}function he(e,t,n,r){let i=Ne((typeof t==`string`?re(t):t).pathname||`/`,n);if(i==null)return null;let a=_e(e);ye(a);let o=null;for(let e=0;o==null&&e<a.length;++e){let t=Me(i);o=ke(a[e],t,r)}return o}function ge(e,t){let{route:n,pathname:r,params:i}=e;return{id:n.id,pathname:r,params:i,data:t[n.id],loaderData:t[n.id],handle:n.handle}}function _e(e,t=[],n=[],r=``,i=!1){let a=(e,a,o=i,s)=>{let c={relativePath:s===void 0?e.path||``:s,caseSensitive:e.caseSensitive===!0,childrenIndex:a,route:e};if(c.relativePath.startsWith(`/`)){if(!c.relativePath.startsWith(r)&&o)return;P(c.relativePath.startsWith(r),`Absolute route path "${c.relativePath}" nested under path "${r}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),c.relativePath=c.relativePath.slice(r.length)}let l=We([r,c.relativePath]),u=n.concat(c);e.children&&e.children.length>0&&(P(e.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${l}".`),_e(e.children,t,u,l,o)),!(e.path==null&&!e.index)&&t.push({path:l,score:De(l,e.index),routesMeta:u})};return e.forEach((e,t)=>{if(e.path===``||!e.path?.includes(`?`))a(e,t);else for(let n of ve(e.path))a(e,t,!0,n)}),t}function ve(e){let t=e.split(`/`);if(t.length===0)return[];let[n,...r]=t,i=n.endsWith(`?`),a=n.replace(/\?$/,``);if(r.length===0)return i?[a,``]:[a];let o=ve(r.join(`/`)),s=[];return s.push(...o.map(e=>e===``?a:[a,e].join(`/`))),i&&s.push(...o),s.map(t=>e.startsWith(`/`)&&t===``?`/`:t)}function ye(e){e.sort((e,t)=>e.score===t.score?Oe(e.routesMeta.map(e=>e.childrenIndex),t.routesMeta.map(e=>e.childrenIndex)):t.score-e.score)}var be=/^:[\w-]+$/,xe=3,Se=2,Ce=1,we=10,Te=-2,Ee=e=>e===`*`;function De(e,t){let n=e.split(`/`),r=n.length;return n.some(Ee)&&(r+=Te),t&&(r+=Se),n.filter(e=>!Ee(e)).reduce((e,t)=>e+(be.test(t)?xe:t===``?Ce:we),r)}function Oe(e,t){return e.length===t.length&&e.slice(0,-1).every((e,n)=>e===t[n])?e[e.length-1]-t[t.length-1]:0}function ke(e,t,n=!1){let{routesMeta:r}=e,i={},a=`/`,o=[];for(let e=0;e<r.length;++e){let s=r[e],c=e===r.length-1,l=a===`/`?t:t.slice(a.length)||`/`,u=Ae({path:s.relativePath,caseSensitive:s.caseSensitive,end:c},l),d=s.route;if(!u&&c&&n&&!r[r.length-1].route.index&&(u=Ae({path:s.relativePath,caseSensitive:s.caseSensitive,end:!1},l)),!u)return null;
9Object.assign(i,u.params),o.push({params:i,pathname:We([a,u.pathname]),pathnameBase:Ke(We([a,u.pathnameBase])),route:d}),u.pathnameBase!==`/`&&(a=We([a,u.pathnameBase]))}return o}function Ae(e,t){typeof e==`string`&&(e={path:e,caseSensitive:!1,end:!0});let[n,r]=je(e.path,e.caseSensitive,e.end),i=t.match(n);if(!i)return null;let a=i[0],o=a.replace(/(.)\/+$/,`$1`),s=i.slice(1);return{params:r.reduce((e,{paramName:t,isOptional:n},r)=>{if(t===`*`){let e=s[r]||``;o=a.slice(0,a.length-e.length).replace(/(.)\/+$/,`$1`)}let i=s[r];return n&&!i?e[t]=void 0:e[t]=(i||``).replace(/%2F/g,`/`),e},{}),pathname:a,pathnameBase:o,pattern:e}}function je(e,t=!1,n=!0){F(e===`*`||!e.endsWith(`*`)||e.endsWith(`/*`),`Route path "${e}" will be treated as if it were "${e.replace(/\*$/,`/*`)}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${e.replace(/\*$/,`/*`)}".`);let r=[],i=`^`+e.replace(/\/*\*?$/,``).replace(/^\/*/,`/`).replace(/[\\.*+^${}|()[\]]/g,`\\$&`).replace(/\/:([\w-]+)(\?)?/g,(e,t,n,i,a)=>{if(r.push({paramName:t,isOptional:n!=null}),n){let t=a.charAt(i+e.length);return t&&t!==`/`?`/([^\\/]*)`:`(?:/([^\\/]*))?`}return`/([^\\/]+)`}).replace(/\/([\w-]+)\?(\/|$)/g,`(/$1)?$2`);return e.endsWith(`*`)?(r.push({paramName:`*`}),i+=e===`*`||e===`/*`?`(.*)$`:`(?:\\/(.+)|\\/*)$`):n?i+=`\\/*$`:e!==``&&e!==`/`&&(i+=`(?:(?=\\/|$))`),[new RegExp(i,t?void 0:`i`),r]}function Me(e){try{return e.split(`/`).map(e=>decodeURIComponent(e).replace(/\//g,`%2F`)).join(`/`)}catch(t){return F(!1,`The URL path "${e}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${t}).`),e}}function Ne(e,t){if(t===`/`)return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith(`/`)?t.length-1:t.length,r=e.charAt(n);return r&&r!==`/`?null:e.slice(n)||`/`}function Pe({basename:e,pathname:t}){return t===`/`?e:We([e,t])}var Fe=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Ie=e=>Fe.test(e);function Le(e,t=`/`){let{pathname:n,search:r=``,hash:i=``}=typeof e==`string`?re(e):e,a;return n?(n=Ue(n),a=n.startsWith(`/`)?Re(n.substring(1),`/`):Re(n,t)):a=t,{pathname:a,search:qe(r),hash:Je(i)}}function Re(e,t){let n=Ge(t).split(`/`);return e.split(`/`).forEach(e=>{e===`..`?n.length>1&&n.pop():e!==`.`&&n.push(e)}),n.length>1?n.join(`/`):`/`}function ze(e,t,n,r){return`Cannot include a '${e}' character in a manually specified \`to.${t}\` field [${JSON.stringify(r)}]. Please separate it out to the \`to.${n}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`}function Be(e){return e.filter((e,t)=>t===0||e.route.path&&e.route.path.length>0)}function Ve(e){let t=Be(e);return t.map((e,n)=>n===t.length-1?e.pathname:e.pathnameBase)}function He(e,t,n,r=!1){let i;typeof e==`string`?i=re(e):(i={...e},P(!i.pathname||!i.pathname.includes(`?`),ze(`?`,`pathname`,`search`,i)),P(!i.pathname||!i.pathname.includes(`#`),ze(`#`,`pathname`,`hash`,i)),P(!i.search||!i.search.includes(`#`),ze(`#`,`search`,`hash`,i)));let a=e===``||i.pathname===``,o=a?`/`:i.pathname,s;if(o==null)s=n;else{let e=t.length-1;if(!r&&o.startsWith(`..`)){let t=o.split(`/`);for(;t[0]===`..`;)t.shift(),--e;i.pathname=t.join(`/`)}s=e>=0?t[e]:`/`}let c=Le(i,s),l=o&&o!==`/`&&o.endsWith(`/`),u=(a||o===`.`)&&n.endsWith(`/`);return!c.pathname.endsWith(`/`)&&(l||u)&&(c.pathname+=`/`),c}var Ue=e=>e.replace(/\/\/+/g,`/`),We=e=>Ue(e.join(`/`)),Ge=e=>e.replace(/\/+$/,``),Ke=e=>Ge(e).replace(/^\/*/,`/`),qe=e=>!e||e===`?`?``:e.startsWith(`?`)?e:`?`+e,Je=e=>!e||e===`#`?``:e.startsWith(`#`)?e:`#`+e,Ye=class{constructor(e,t,n,r=!1){this.status=e,this.statusText=t||``,this.internal=r,n instanceof Error?(this.data=n.toString(),this.error=n):this.data=n}};function Xe(e){return e!=null&&typeof e.status==`number`&&typeof e.statusText==`string`&&typeof e.internal==`boolean`&&`data`in e}function Ze(e){return We(e.map(e=>e.route.path).filter(Boolean))||`/`}var Qe=typeof window<`u`&&window.document!==void 0&&window.document.createElement!==void 0;function $e(e,t){let n=e;if(typeof n!=`string`||!Fe.test(n))return{absoluteURL:void 0,isExternal:!1,to:n};let r=n,i=!1;if(Qe)try{let e=new URL(window.location.href),r=n.startsWith(`//`)?new URL(e.protocol+n):new URL(n),a=Ne(r.pathname,t);r.origin===e.origin&&a!=null?n=a+r.search+r.hash:i=!0}catch{F(!1,`<Link to="${n}">
9 contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}return{absoluteURL:r,isExternal:i,to:n}}var et=Symbol(`Uninstrumented`);function tt(e,t){let n={lazy:[],"lazy.loader":[],"lazy.action":[],"lazy.middleware":[],middleware:[],loader:[],action:[]};e.forEach(e=>e({id:t.id,index:t.index,path:t.path,instrument(e){let t=Object.keys(n);for(let r of t)e[r]&&n[r].push(e[r])}}));let r={};if(typeof t.lazy==`function`&&n.lazy.length>0){let e=rt(n.lazy,t.lazy,()=>void 0);e&&(r.lazy=e)}if(typeof t.lazy==`object`){let e=t.lazy;[`middleware`,`loader`,`action`].forEach(t=>{let i=e[t],a=n[`lazy.${t}`];if(typeof i==`function`&&a.length>0){let e=rt(a,i,()=>void 0);e&&(r.lazy=Object.assign(r.lazy||{},{[t]:e}))}})}return[`loader`,`action`].forEach(e=>{let i=t[e];if(typeof i==`function`&&n[e].length>0){let t=i[et]??i,a=rt(n[e],t,(...e)=>at(e[0]));a&&(e===`loader`&&t.hydrate===!0&&(a.hydrate=!0),a[et]=t,r[e]=a)}}),t.middleware&&t.middleware.length>0&&n.middleware.length>0&&(r.middleware=t.middleware.map(e=>{let t=e[et]??e,r=rt(n.middleware,t,(...e)=>at(e[0]));return r?(r[et]=t,r):e})),r}function nt(e,t){let n={navigate:[],fetch:[]};if(t.forEach(e=>e({instrument(e){let t=Object.keys(e);for(let r of t)e[r]&&n[r].push(e[r])}})),n.navigate.length>0){let t=e.navigate[et]??e.navigate,r=rt(n.navigate,t,(...t)=>{let[n,r]=t;return{to:typeof n==`number`||typeof n==`string`?n:n?ne(n):`.`,...ot(e,r??{})}});r&&(r[et]=t,e.navigate=r)}if(n.fetch.length>0){let t=e.fetch[et]??e.fetch,r=rt(n.fetch,t,(...t)=>{let[n,,r,i]=t;return{href:r??`.`,fetcherKey:n,...ot(e,i??{})}});r&&(r[et]=t,e.fetch=r)}return e}function rt(e,t,n){return e.length===0?null:async(...r)=>{let i=await it(e,n(...r),()=>t(...r),e.length-1);if(i.type===`error`)throw i.value;return i.value}}async function it(e,t,n,r){let i=e[r],a;if(i){let o,s=async()=>(o?console.error(`You cannot call instrumented handlers more than once`):o=it(e,t,n,r-1),a=await o,P(a,`Expected a result`),a.type===`error`&&a.value instanceof Error?{status:`error`,error:a.value}:{status:`success`,error:void 0});try{await i(s,t)}catch(e){console.error(`An instrumentation function threw an error:`,e)}o||await s(),await o}else try{a={type:`success`,value:await n()}}catch(e){a={type:`error`,value:e}}return a||{type:`error`,value:Error(`No result assigned in instrumentation chain.`)}}function at(e){let{request:t,context:n,params:r,unstable_pattern:i}=e;return{request:st(t),params:{...r},unstable_pattern:i,context:ct(n)}}function ot(e,t){return{currentUrl:ne(e.state.location),...`formMethod`in t?{formMethod:t.formMethod}:{},...`formEncType`in t?{formEncType:t.formEncType}:{},...`formData`in t?{formData:t.formData}:{},...`body`in t?{body:t.body}:{}}}function st(e){return{method:e.method,url:e.url,headers:{get:(...t)=>e.headers.get(...t)}}}function ct(e){if(ut(e)){let t={...e};return Object.freeze(t),t}else return{get:t=>e.get(t)}}var lt=Object.getOwnPropertyNames(Object.prototype).sort().join(`\0`);function ut(e){if(typeof e!=`object`||!e)return!1;let t=Object.getPrototypeOf(e);return t===Object.prototype||t===null||Object.getOwnPropertyNames(t).sort().join(`\0`)===lt}var dt=[`POST`,`PUT`,`PATCH`,`DELETE`],ft=new Set(dt),pt=[`GET`,...dt],mt=new Set(pt),ht=new Set([301,302,303,307,308]),gt=new Set([307,308]),_t={state:`idle`,location:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},vt={state:`idle`,data:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},yt={state:`unblocked`,proceed:void 0,reset:void 0,location:void 0},bt=e=>({hasErrorBoundary:!!e.hasErrorBoundary}),xt=`remix-router-transitions`,St=Symbol(`ResetLoaderData`);function Ct(e){let t=e.window?e.window:typeof window<`u`?window:void 0,n=t!==void 0&&t.document!==void 0&&t.document.createElement!==void 0;P(e.routes.length>0,`You must provide a non-empty routes array to createRouter`);let r=e.hydrationRouteProperties||[],i=e.mapRouteProperties||bt,a=i;if(e.unstable_instrumentations){let t=e.unstable_instrumentations;a=e=>({...i(e),...tt(t.map(e=>
9e.route).filter(Boolean),e)})}let o={},s=L(e.routes,a,void 0,o),c,l=e.basename||`/`;l.startsWith(`/`)||(l=`/${l}`);let u=e.dataStrategy||Bt,d={unstable_passThroughRequests:!1,...e.future},f=null,p=new Set,m=null,h=null,g=null,_=e.hydrationData!=null,v=me(s,e.history.location,l),y=!1,b=null,x,S;if(v==null&&!e.patchRoutesOnNavigation){let t=dn(404,{pathname:e.history.location.pathname}),{matches:n,route:r}=un(s);x=!0,S=!x,v=n,b={[r.id]:t}}else if(v&&!e.hydrationData&&st(v,s,e.history.location.pathname).active&&(v=null),!v){x=!1,S=!x,v=[];let t=st(null,s,e.history.location.pathname);t.active&&t.matches&&(y=!0,v=t.matches)}else if(v.some(e=>e.route.lazy))x=!1,S=!x;else if(!v.some(e=>Ot(e.route)))x=!0,S=!x;else{let t=e.hydrationData?e.hydrationData.loaderData:null,n=e.hydrationData?e.hydrationData.errors:null,r=v;if(n){let e=v.findIndex(e=>n[e.route.id]!==void 0);r=r.slice(0,e+1)}S=!1,x=!0,r.forEach(e=>{let r=kt(e.route,t,n);S||=r.renderFallback,x&&=!r.shouldLoad})}let C,w={historyAction:e.history.action,location:e.history.location,matches:v,initialized:x,renderFallback:S,navigation:_t,restoreScrollPosition:e.hydrationData==null?null:!1,preventScrollReset:!1,revalidation:`idle`,loaderData:e.hydrationData&&e.hydrationData.loaderData||{},actionData:e.hydrationData&&e.hydrationData.actionData||null,errors:e.hydrationData&&e.hydrationData.errors||b,fetchers:new Map,blockers:new Map},T=`POP`,E=null,D=!1,O,k=!1,A=new Map,j=null,M=!1,N=!1,ee=new Set,I=new Map,ne=0,ie=-1,oe=new Map,ce=new Set,le=new Map,ue=new Map,de=new Set,fe=new Map,pe,_e=null;function ve(){if(f=e.history.listen(({action:t,location:n,delta:r})=>{if(pe){pe(),pe=void 0;return}F(fe.size===0||r!=null,"You are trying to use a blocker on a POP navigation to a location that was not created by @remix-run/router. This will fail silently in production. This can happen if you are navigating outside the router via `window.history.pushState`/`window.location.hash` instead of using router navigation APIs. This can also happen if you are using createHashRouter and the user manually changes the URL.");let i=$e({currentLocation:w.location,nextLocation:n,historyAction:t});if(i&&r!=null){let t=new Promise(e=>{pe=e});e.history.go(r*-1),Qe(i,{state:`blocked`,location:n,proceed(){Qe(i,{state:`proceeding`,proceed:void 0,reset:void 0,location:n}),t.then(()=>e.history.go(r))},reset(){let e=new Map(w.blockers);e.set(i,yt),xe({blockers:e})}}),E?.resolve(),E=null;return}return Te(t,n)}),n){Fn(t,A);let e=()=>In(t,A);t.addEventListener(`pagehide`,e),j=()=>t.removeEventListener(`pagehide`,e)}return w.initialized||Te(`POP`,w.location,{initialHydration:!0}),C}function ye(){f&&f(),j&&j(),p.clear(),O&&O.abort(),w.fetchers.forEach((e,t)=>Ue(t)),w.blockers.forEach((e,t)=>Ze(t))}function be(e){return p.add(e),()=>p.delete(e)}function xe(e,t={}){e.matches&&=e.matches.map(e=>{let t=o[e.route.id],n=e.route;return n.element!==t.element||n.errorElement!==t.errorElement||n.hydrateFallbackElement!==t.hydrateFallbackElement?{...e,route:t}:e}),w={...w,...e};let n=[],r=[];w.fetchers.forEach((e,t)=>{e.state===`idle`&&(de.has(t)?n.push(t):r.push(t))}),de.forEach(e=>{!w.fetchers.has(e)&&!I.has(e)&&n.push(e)}),[...p].forEach(r=>r(w,{deletedFetchers:n,newErrors:e.errors??null,viewTransitionOpts:t.viewTransitionOpts,flushSync:t.flushSync===!0})),n.forEach(e=>Ue(e)),r.forEach(e=>w.fetchers.delete(e))}function Se(t,n,{flushSync:r}={}){let i=w.actionData!=null&&w.navigation.formMethod!=null&&En(w.navigation.formMethod)&&w.navigation.state===`loading`&&t.state?._isRedirect!==!0,a;a=n.actionData?Object.keys(n.actionData).length>0?n.actionData:null:i?w.actionData:null;let o=n.loaderData?sn(w.loaderData,n.loaderData,n.matches||[],n.errors):w.loaderData,l=w.blockers;l.size>0&&(l=new Map(l),l.forEach((e,t)=>l.set(t,yt)));let u=M?!1:ot(t,n.matches||w.matches),d=D===!0||w.navigation.formMethod!=null&&En(w.navigation.formMethod)&&t.state?._isRedirect!==!0;c&&=(s=c,void 0),M||T===`POP`||(T===`PUSH`?e.history.push(t,t.state):T===`REPLACE`&&e.history.replace(t,t.state));let f;if(T===`POP`){let e=A.get(w.location.pathname);e&&e.has(t.pathname)?f={currentLocation:w.location,nextLocation:t}:A.has(t.pathname)&&(f={currentLocation:t,nextLocation:w.location})}else if(k){let e=A.get(w.location.pathname);e?e.add(t.pathname):(e=new Set([t.pathname]),A.set(w.location.pathname,e)),f={currentLocation:w.location,nextLocation:t}}xe({...n,actionData:a,loaderData:o,historyAction:T,location:t,initialized:!0,renderFallback:!1,navigation:_t,revalidation:`idle`,restoreScrollPosition:u,preventScrollReset:d,blockers:l},{viewTransitionOpts:f,flushSync:r===!0}),T=`POP`,D=!1,k=!1,M=!1,N=!1,E?.resolve(),E=null,_e?.resolve(),_e=null}async function Ce(t,n){if(E?.resolve(),E=null,typeof t==`number`){E||=Ln();let n=E.promise;return e.history.go(t),n}let{path:r,submission:i,error:a}=Et(!1,Tt(w.location,w.matches,l,t,n?.fromRouteId,n?.relative),n),o;n?.unstable_mask&&(o={pathname:``,search:``,hash:``,...typeof n.unstable_mask==`string`?re(n.unstable_mask):{...w.location.unstable_mask,...n.unstable_mask}});let s=w.location,c=te(s,r,n&&n.state,void 0,o);c={...c,...e.history.encodeLocation(c)};let u=n&&n.replace!=null?n.replace:void 0,d=`PUSH`;u===!0?d=`REPLACE`:u===!1||i!=null&&En(i.formMethod)&&i.formAction===w.location.pathname+w.location.search&&(d=`REPLACE`);let f=n&&`preventScrollReset`in n?n.preventScrollReset===!0:void 0,p=(n&&n.flushSync)===!0,m=$e({currentLocation:s,nextLocation:c,historyAction:d});if(m){Qe(m,{state:`blocked`,location:c,proceed(){Qe(m,{state:`proceeding`,proceed:void 0,reset:void 0,location:c}),Ce(t,n)},reset(){let e=new Map(w.blockers);e.set(m,yt),xe({blockers:e})}});return}await Te(d,c,{submission:i,pendingError:a,preventScrollReset:f,replace:n&&n.replace,enableViewTransition:n&&n.viewTransition,flushSync:p,callSiteDefaultShouldRevalidate:n&&n.unstable_defaultShouldRevalidate})}function we(){_e||=Ln(),Re(),xe({revalidation:`loading`});let e=_e.promise;return w.navigation.state===`submitting`?e:w.navigation.state===`idle`?(Te(w.historyAction,w.location,{startUninterruptedRevalidation:!0}
9),e):(Te(T||w.historyAction,w.navigation.location,{overrideNavigation:w.navigation,enableViewTransition:k===!0}),e)}async function Te(t,n,r){O&&O.abort(),O=null,T=t,M=(r&&r.startUninterruptedRevalidation)===!0,at(w.location,w.matches),D=(r&&r.preventScrollReset)===!0,k=(r&&r.enableViewTransition)===!0;let i=c||s,a=r&&r.overrideNavigation,o=r?.initialHydration&&w.matches&&w.matches.length>0&&!y?w.matches:me(i,n,l),u=(r&&r.flushSync)===!0;if(o&&w.initialized&&!N&&mn(w.location,n)&&!(r&&r.submission&&En(r.submission.formMethod))){Se(n,{matches:o},{flushSync:u});return}let d=st(o,i,n.pathname);if(d.active&&d.matches&&(o=d.matches),!o){let{error:e,notFoundMatches:t,route:r}=et(n.pathname);Se(n,{matches:t,loaderData:{},errors:{[r.id]:e}},{flushSync:u});return}O=new AbortController;let f=en(e.history,n,O.signal,r&&r.submission),p=e.getContext?await e.getContext():new se,m;if(r&&r.pendingError)m=[ln(o).route.id,{type:`error`,error:r.pendingError}];else if(r&&r.submission&&En(r.submission.formMethod)){let t=await Ee(f,n,r.submission,o,p,d.active,r&&r.initialHydration===!0,{replace:r.replace,flushSync:u});if(t.shortCircuited)return;if(t.pendingActionResult){let[e,r]=t.pendingActionResult;if(yn(r)&&Xe(r.error)&&r.error.status===404){O=null,Se(n,{matches:t.matches,loaderData:{},errors:{[e]:r.error}});return}}o=t.matches||o,m=t.pendingActionResult,a=An(n,r.submission),u=!1,d.active=!1,f=en(e.history,f.url,f.signal)}let{shortCircuited:h,matches:g,loaderData:_,errors:v}=await De(f,n,o,p,d.active,a,r&&r.submission,r&&r.fetcherSubmission,r&&r.replace,r&&r.initialHydration===!0,u,m,r&&r.callSiteDefaultShouldRevalidate);h||(O=null,Se(n,{matches:g||o,...cn(m),loaderData:_,errors:v}))}async function Ee(t,n,i,c,u,d,f,p={}){if(Re(),xe({navigation:jn(n,i)},{flushSync:p.flushSync===!0}),d){let e=await ct(c,n.pathname,t.signal);if(e.type===`aborted`)return{shortCircuited:!0};if(e.type===`error`){if(e.partialMatches.length===0){let{matches:t,route:n}=un(s);return{matches:t,pendingActionResult:[n.id,{type:`error`,error:e.error}]}}let t=ln(e.partialMatches).route.id;return{matches:e.partialMatches,pendingActionResult:[t,{type:`error`,error:e.error}]}}else if(e.matches)c=e.matches;else{let{notFoundMatches:e,error:t,route:r}=et(n.pathname);return{matches:e,pendingActionResult:[r.id,{type:`error`,error:t}]}}}let m,h=On(c,n);if(!h.route.action&&!h.route.lazy)m={type:`error`,error:dn(405,{method:t.method,pathname:n.pathname,routeId:h.route.id})};else{let e=await Fe(t,n,Kt(a,o,t,n,c,h,f?[]:r,u),u,null);if(m=e[h.route.id],!m){for(let t of c)if(e[t.route.id]){m=e[t.route.id];break}}if(t.signal.aborted)return{shortCircuited:!0}}if(bn(m)){let n;return n=p&&p.replace!=null?p.replace:$t(m.response.headers.get(`Location`),new URL(t.url),l,e.history)===w.location.pathname+w.location.search,await Pe(t,m,!0,{submission:i,replace:n}),{shortCircuited:!0}}if(yn(m)){let e=ln(c,h.route.id);return(p&&p.replace)!==!0&&(T=`PUSH`),{matches:c,pendingActionResult:[e.route.id,m,h.route.id]}}return{matches:c,pendingActionResult:[h.route.id,m]}}async function De(t,n,i,u,d,f,p,m,h,g,_,v,y){let b=f||An(n,p),x=p||m||kn(b),S=!M&&!g;if(d){if(S){let e=Oe(v);xe({navigation:b,...e===void 0?{}:{actionData:e}},{flushSync:_})}let e=await ct(i,n.pathname,t.signal);if(e.type===`aborted`)return{shortCircuited:!0};if(e.type===`error`){if(e.partialMatches.length===0){let{matches:t,route:n}=un(s);return{matches:t,loaderData:{},errors:{[n.id]:e.error}}}let t=ln(e.partialMatches).route.id;return{matches:e.partialMatches,loaderData:{},errors:{[t]:e.error}}}else if(e.matches)i=e.matches;else{let{error:e,notFoundMatches:t,route:r}=et(n.pathname);return{matches:t,loaderData:{},errors:{[r.id]:e}}}}let C=c||s,{dsMatches:T,revalidatingFetchers:E}=Dt(t,u,a,o,e.history,w,i,x,n,g?[]:r,g===!0,N,ee,de,le,ce,C,l,e.patchRoutesOnNavigation!=null,v,y);if(ie=++ne,!e.dataStrategy&&!T.some(e=>e.shouldLoad)&&!T.some(e=>e.route.middleware&&e.route.middleware.length>0)&&E.length===0){let e=qe();return Se(n,{matches:i,loaderData:{},errors:v&&yn(v[1])?{[v[0]]:v[1].error}:null,...cn(v),...e?{fetchers:new Map(w.fetchers)}:{}},{flushSync:_}),{shortCircuited:!0}}if(S){let e={};if(!d){e.navigation=b;let t=Oe(v);t!==void 0&&(e.actionData=t)}E.length>0&&(e.fetchers=ke(E)),xe(e,{flushSync:_})}
9E.forEach(e=>{Ge(e.key),e.controller&&I.set(e.key,e.controller)});let D=()=>E.forEach(e=>Ge(e.key));O&&O.signal.addEventListener(`abort`,D);let{loaderResults:k,fetcherResults:A}=await Le(T,E,t,n,u);if(t.signal.aborted)return{shortCircuited:!0};O&&O.signal.removeEventListener(`abort`,D),E.forEach(e=>I.delete(e.key));let j=fn(k);if(j)return await Pe(t,j.result,!0,{replace:h}),{shortCircuited:!0};if(j=fn(A),j)return ce.add(j.key),await Pe(t,j.result,!0,{replace:h}),{shortCircuited:!0};let{loaderData:P,errors:F}=on(w,i,k,v,E,A);g&&w.errors&&(F={...w.errors,...F});let te=qe(),re=Je(ie),ae=te||re||E.length>0;return{matches:i,loaderData:P,errors:F,...ae?{fetchers:new Map(w.fetchers)}:{}}}function Oe(e){if(e&&!yn(e[1]))return{[e[0]]:e[1].data};if(w.actionData)return Object.keys(w.actionData).length===0?null:w.actionData}function ke(e){return e.forEach(e=>{let t=w.fetchers.get(e.key),n=Mn(void 0,t?t.data:void 0);w.fetchers.set(e.key,n)}),new Map(w.fetchers)}async function Ae(t,n,r,i){Ge(t);let a=(i&&i.flushSync)===!0,o=c||s,u=Tt(w.location,w.matches,l,r,n,i?.relative),d=me(o,u,l),f=st(d,o,u);if(f.active&&f.matches&&(d=f.matches),!d){Be(t,n,dn(404,{pathname:u}),{flushSync:a});return}let{path:p,submission:m,error:h}=Et(!0,u,i);if(h){Be(t,n,h,{flushSync:a});return}let g=e.getContext?await e.getContext():new se,_=(i&&i.preventScrollReset)===!0;if(m&&En(m.formMethod)){await je(t,n,p,d,g,f.active,a,_,m,i&&i.unstable_defaultShouldRevalidate);return}le.set(t,{routeId:n,path:p}),await Me(t,n,p,d,g,f.active,a,_,m)}async function je(t,n,i,u,d,f,p,m,h,g){Re(),le.delete(t),ze(t,Nn(h,w.fetchers.get(t)),{flushSync:p});let _=new AbortController,v=en(e.history,i,_.signal,h);if(f){let e=await ct(u,new URL(v.url).pathname,v.signal,t);if(e.type===`aborted`)return;if(e.type===`error`){Be(t,n,e.error,{flushSync:p});return}else if(e.matches)u=e.matches;else{Be(t,n,dn(404,{pathname:i}),{flushSync:p});return}}let y=On(u,i);if(!y.route.action&&!y.route.lazy){Be(t,n,dn(405,{method:h.formMethod,pathname:i,routeId:n}),{flushSync:p});return}I.set(t,_);let b=ne,x=Kt(a,o,v,i,u,y,r,d),S=await Fe(v,i,x,d,t),C=S[y.route.id];if(!C){for(let e of x)if(S[e.route.id]){C=S[e.route.id];break}}if(v.signal.aborted){I.get(t)===_&&I.delete(t);return}if(de.has(t)){if(bn(C)||yn(C)){ze(t,Pn(void 0));return}}else{if(bn(C))if(I.delete(t),ie>b){ze(t,Pn(void 0));return}else return ce.add(t),ze(t,Mn(h)),Pe(v,C,!1,{fetcherSubmission:h,preventScrollReset:m});if(yn(C)){Be(t,n,C.error);return}}let E=w.navigation.location||w.location,D=en(e.history,E,_.signal),k=c||s,A=w.navigation.state===`idle`?w.matches:me(k,w.navigation.location,l);P(A,`Didn't find any matches after fetcher action`);let j=++ne;oe.set(t,j);let M=Mn(h,C.data);w.fetchers.set(t,M);let{dsMatches:F,revalidatingFetchers:te}=Dt(D,d,a,o,e.history,w,A,h,E,r,!1,N,ee,de,le,ce,k,l,e.patchRoutesOnNavigation!=null,[y.route.id,C],g);te.filter(e=>e.key!==t).forEach(e=>{let t=e.key,n=w.fetchers.get(t),r=Mn(void 0,n?n.data:void 0);w.fetchers.set(t,r),Ge(t),e.controller&&I.set(t,e.controller)}),xe({fetchers:new Map(w.fetchers)});let re=()=>te.forEach(e=>Ge(e.key));_.signal.addEventListener(`abort`,re);let{loaderResults:ae,fetcherResults:se}=await Le(F,te,D,E,d);if(_.signal.aborted)return;if(_.signal.removeEventListener(`abort`,re),oe.delete(t),I.delete(t),te.forEach(e=>I.delete(e.key)),w.fetchers.has(t)){let e=Pn(C.data);w.fetchers.set(t,e)}let ue=fn(ae);if(ue)return Pe(D,ue.result,!1,{preventScrollReset:m});if(ue=fn(se),ue)return ce.add(ue.key),Pe(D,ue.result,!1,{preventScrollReset:m});let{loaderData:fe,errors:L}=on(w,A,ae,void 0,te,se);Je(j),w.navigation.state===`loading`&&j>ie?(P(T,`Expected pending action`),O&&O.abort(),Se(w.navigation.location,{matches:A,loaderData:fe,errors:L,fetchers:new Map(w.fetchers)})):(xe({errors:L,loaderData:sn(w.loaderData,fe,A,L),fetchers:new Map(w.fetchers)}),N=!1)}async function Me(t,n,i,s,c,l,u,d,f){let p=w.fetchers.get(t);ze(t,Mn(f,p?p.data:void 0),{flushSync:u});let m=new AbortController,h=en(e.history,i,m.signal);if(l){let e=await ct(s,new URL(h.url).pathname,h.signal,t);if(e.type===`aborted`)return;if(e.type===`error`){Be(t,n,e.error,{flushSync:u});return}else if(e.matches)s=e.matches;else{Be(t,n,dn(404,{pathname:i}),{flushSync:u});return}}let g=On(s,i);I.set(t,m);let _=ne,v=await Fe(h,i,Kt(a,o,h,i,s,g,r,c),c,t),y=v[g.route.id];if(!y){for(let e of s)if(v[e.route.id]){y=v[e.route.id];break}}if(I.get(t)===m&&I.delete(t),!h.signal.aborted){if(de.has(t)){ze(t,Pn(void 0));return}if(bn(y))if(ie>_){ze(t,Pn(void 0));return}else{ce.add(t),await Pe(h,y,!1,{preventScrollReset:d});return}if(yn(y)){Be(t,n,y.error);return}ze(t,Pn(y.data))}}async function Pe(r,i,a,{submission:o,fetcherSubmission:s,preventScrollReset:c,replace:u}={}){a||(E?.resolve(),E=null),i.response.headers.has(`X-Remix-Revalidate`)&&(N=!0);let d=i.response.headers.get(`Location`);P(d,`Expected a Location header on the redirect Response`),d=$t(d,new URL(r.url),l,e.history);let f=te(w.location,d,{_isRedirect:!0});if(n){let e=!1;if(i.response.headers.has(`X-Remix-Reload-Document`))e=!0;else if(Ie(d)){let n=ae(d,!0);e=n.origin!==t.location.origin||Ne(n.pathname,l)==null}if(e){u?t.location.replace(d):t.location.assign(d);return}}O=null;let p=u===!0||i.response.headers.has(`X-Remix-Replace`)?`REPLACE`:`PUSH`,{formMethod:m,formAction:h,formEncType:g}=w.navigation;!o&&!s&&m&&h&&g&&(o=kn(w.navigation));let _=o||s;gt.has(i.response.status)&&_&&En(_.formMethod)?await Te(p,f,{submission:{..._,formAction:d},preventScrollReset:c||D,enableViewTransition:a?k:void 0}):await Te(p,f,{overrideNavigation:An(f,o),fetcherSubmission:s,preventScrollReset:c||D,enableViewTransition:a?k:void 0})}async function Fe(e,t,n,r,i){let a,o={};try{a=await qt(u,e,t,n,i,r,!1)}catch(e){return n.filter(e=>
9e.shouldLoad).forEach(t=>{o[t.route.id]={type:`error`,error:e}}),o}if(e.signal.aborted)return o;if(!En(e.method))for(let e of n){if(a[e.route.id]?.type===`error`)break;!a.hasOwnProperty(e.route.id)&&!w.loaderData.hasOwnProperty(e.route.id)&&(!w.errors||!w.errors.hasOwnProperty(e.route.id))&&e.shouldCallHandler()&&(a[e.route.id]={type:`error`,result:Error(`No result returned from dataStrategy for route ${e.route.id}`)})}for(let[t,r]of Object.entries(a))if(vn(r)){let i=r.result;o[t]={type:`redirect`,response:Zt(i,e,t,n,l)}}else o[t]=await Xt(r);return o}async function Le(e,t,n,r,i){let a=Fe(n,r,e,i,null),o=Promise.all(t.map(async e=>{if(e.matches&&e.match&&e.request&&e.controller){let t=(await Fe(e.request,e.path,e.matches,i,e.key))[e.match.route.id];return{[e.key]:t}}else return Promise.resolve({[e.key]:{type:`error`,error:dn(404,{pathname:e.path})}})}));return{loaderResults:await a,fetcherResults:(await o).reduce((e,t)=>Object.assign(e,t),{})}}function Re(){N=!0,le.forEach((e,t)=>{I.has(t)&&ee.add(t),Ge(t)})}function ze(e,t,n={}){w.fetchers.set(e,t),xe({fetchers:new Map(w.fetchers)},{flushSync:(n&&n.flushSync)===!0})}function Be(e,t,n,r={}){let i=ln(w.matches,t);Ue(e),xe({errors:{[i.route.id]:n},fetchers:new Map(w.fetchers)},{flushSync:(r&&r.flushSync)===!0})}function Ve(e){return ue.set(e,(ue.get(e)||0)+1),de.has(e)&&de.delete(e),w.fetchers.get(e)||vt}function He(e,t){Ge(e,t?.reason),ze(e,Pn(null))}function Ue(e){let t=w.fetchers.get(e);I.has(e)&&!(t&&t.state===`loading`&&oe.has(e))&&Ge(e),le.delete(e),oe.delete(e),ce.delete(e),de.delete(e),ee.delete(e),w.fetchers.delete(e)}function We(e){let t=(ue.get(e)||0)-1;t<=0?(ue.delete(e),de.add(e)):ue.set(e,t),xe({fetchers:new Map(w.fetchers)})}function Ge(e,t){let n=I.get(e);n&&(n.abort(t),I.delete(e))}function Ke(e){for(let t of e){let e=Pn(Ve(t).data);w.fetchers.set(t,e)}}function qe(){let e=[],t=!1;for(let n of ce){let r=w.fetchers.get(n);P(r,`Expected fetcher: ${n}`),r.state===`loading`&&(ce.delete(n),e.push(n),t=!0)}return Ke(e),t}function Je(e){let t=[];for(let[n,r]of oe)if(r<e){let e=w.fetchers.get(n);P(e,`Expected fetcher: ${n}`),e.state===`loading`&&(Ge(n),oe.delete(n),t.push(n))}return Ke(t),t.length>0}function Ye(e,t){let n=w.blockers.get(e)||yt;return fe.get(e)!==t&&fe.set(e,t),n}function Ze(e){w.blockers.delete(e),fe.delete(e)}function Qe(e,t){let n=w.blockers.get(e)||yt;P(n.state===`unblocked`&&t.state===`blocked`||n.state===`blocked`&&t.state===`blocked`||n.state===`blocked`&&t.state===`proceeding`||n.state===`blocked`&&t.state===`unblocked`||n.state===`proceeding`&&t.state===`unblocked`,`Invalid blocker state transition: ${n.state} -> ${t.state}`);let r=new Map(w.blockers);r.set(e,t),xe({blockers:r})}function $e({currentLocation:e,nextLocation:t,historyAction:n}){if(fe.size===0)return;fe.size>1&&F(!1,`A router only supports one blocker at a time`);let r=Array.from(fe.entries()),[i,a]=r[r.length-1],o=w.blockers.get(i);if(!(o&&o.state===`proceeding`)&&a({currentLocation:e,nextLocation:t,historyAction:n}))return i}function et(e){let t=dn(404,{pathname:e}),{matches:n,route:r}=un(c||s);return{notFoundMatches:n,route:r,error:t}}function rt(e,t,n){if(m=e,g=t,h=n||null,!_&&w.navigation===_t){_=!0;let e=ot(w.location,w.matches);e!=null&&xe({restoreScrollPosition:e})}return()=>{m=null,g=null,h=null}}function it(e,t){return h&&h(e,t.map(e=>ge(e,w.loaderData)))||e.key}function at(e,t){if(m&&g){let n=it(e,t);m[n]=g()}}function ot(e,t){if(m){let n=it(e,t),r=m[n];if(typeof r==`number`)return r}return null}function st(t,n,r){if(e.patchRoutesOnNavigation){if(!t)return{active:!0,matches:he(n,r,l,!0)||[]};if(Object.keys(t[0].params).length>0)return{active:!0,matches:he(n,r,l,!0)}}return{active:!1,matches:null}}async function ct(t,n,r,i){if(!e.patchRoutesOnNavigation)return{type:`success`,matches:t};let u=t;for(;;){let t=c==null,d=c||s,f=o;try{await e.patchRoutesOnNavigation({signal:r,path:n,matches:u,fetcherKey:i,patch:(e,t)=>{r.aborted||Nt(e,t,d,f,a,!1)}})}catch(e){return{type:`error`,error:e,partialMatches:u}}finally{t&&!r.aborted&&(s=[...s])}if(r.aborted)return{type:`aborted`};let p=me(d,n,l),m=null;if(p&&(Object.keys(p[0].params).length===0||(m=he(d,n,l,!0),!(m&&u.length<m.length&<(u,m.slice(0,u.length))))))return{type:`success`,matches:p};if(m||=he(d,n,l,!0),!m||lt(u,m))return{type:`success`,matches:null};u=m}}function lt(e,t){return e.length===t.length&&e.every((e,n)=>e.route.id===t[n].route.id)}function ut(e){o={},c=L(e,a,void 0,o)}function dt(e,t,n=!1){let r=c==null;Nt(e,t,c||s,o,a,n),r&&(s=[...s],xe({}))}return C={get basename(){return l},get future(){return d},get state(){return w},get routes(){return s},get window(){return t},initialize:ve,subscribe:be,enableScrollRestoration:rt,navigate:Ce,fetch:Ae,revalidate:we,createHref:t=>e.history.createHref(t),encodeLocation:t=>e.history.encodeLocation(t),getFetcher:Ve,resetFetcher:He,deleteFetcher:We,dispose:ye,getBlocker:Ye,deleteBlocker:Ze,patchRoutes:dt,_internalFetchControllers:I,_internalSetRoutes:ut,_internalSetStateDoNotUseOrYouWillBreakYourApp(e){xe(e)}},e.unstable_instrumentations&&(C=nt(C,e.unstable_instrumentations.map(e=>
9e.router).filter(Boolean))),C}function wt(e){return e!=null&&(`formData`in e&&e.formData!=null||`body`in e&&e.body!==void 0)}function Tt(e,t,n,r,i,a){let o,s;if(i){o=[];for(let e of t)if(o.push(e),e.route.id===i){s=e;break}}else o=t,s=t[t.length-1];let c=He(r||`.`,Ve(o),Ne(e.pathname,n)||e.pathname,a===`path`);if(r??(c.search=e.search,c.hash=e.hash),(r==null||r===``||r===`.`)&&s){let e=Dn(c.search);if(s.route.index&&!e)c.search=c.search?c.search.replace(/^\?/,`?index&`):`?index`;else if(!s.route.index&&e){let e=new URLSearchParams(c.search),t=e.getAll(`index`);e.delete(`index`),t.filter(e=>e).forEach(t=>e.append(`index`,t));let n=e.toString();c.search=n?`?${n}`:``}}return n!==`/`&&(c.pathname=Pe({basename:n,pathname:c.pathname})),ne(c)}function Et(e,t,n){if(!n||!wt(n))return{path:t};if(n.formMethod&&!Tn(n.formMethod))return{path:t,error:dn(405,{method:n.formMethod})};let r=()=>({path:t,error:dn(400,{type:`invalid-body`})}),i=(n.formMethod||`get`).toUpperCase(),a=pn(t);if(n.body!==void 0){if(n.formEncType===`text/plain`){if(!En(i))return r();let e=typeof n.body==`string`?n.body:n.body instanceof FormData||n.body instanceof URLSearchParams?Array.from(n.body.entries()).reduce((e,[t,n])=>`${e}${t}=${n} 10`,``):String(n.body);return{path:t,submission:{formMethod:i,formAction:a,formEncType:n.formEncType,formData:void 0,json:void 0,text:e}}}else if(n.formEncType===`application/json`){if(!En(i))return r();try{let e=typeof n.body==`string`?JSON.parse(n.body):n.body;return{path:t,submission:{formMethod:i,formAction:a,formEncType:n.formEncType,formData:void 0,json:e,text:void 0}}}catch{return r()}}}P(typeof FormData==`function`,`FormData is not available in this environment`);let o,s;if(n.formData)o=nn(n.formData),s=n.formData;else if(n.body instanceof FormData)o=nn(n.body),s=n.body;else if(n.body instanceof URLSearchParams)o=n.body,s=rn(o);else if(n.body==null)o=new URLSearchParams,s=new FormData;else try{o=new URLSearchParams(n.body),s=rn(o)}catch{return r()}let c={formMethod:i,formAction:a,formEncType:n&&n.formEncType||`application/x-www-form-urlencoded`,formData:s,json:void 0,text:void 0};if(En(c.formMethod))return{path:t,submission:c};let l=re(t);return e&&l.search&&Dn(l.search)&&o.append(`index`,``),l.search=`?${o}`,{path:ne(l),submission:c}}function Dt(e,t,n,r,i,a,o,s,c,l,u,d,f,p,m,h,g,_,v,y,b){let x=y?yn(y[1])?y[1].error:y[1].data:void 0,S=i.createURL(a.location),C=i.createURL(c),w;if(u&&a.errors){let e=Object.keys(a.errors)[0];w=o.findIndex(t=>t.route.id===e)}else if(y&&yn(y[1])){let e=y[0];w=o.findIndex(t=>t.route.id===e)-1}let T=y?y[1].statusCode:void 0,E=T&&T>=400,D={currentUrl:S,currentParams:a.matches[0]?.params||{},nextUrl:C,nextParams:o[0].params,...s,actionResult:x,actionStatus:T},O=Ze(o),k=o.map((i,o)=>{let{route:s}=i,f=null;if(w!=null&&o>w)f=!1;else if(s.lazy)f=!0;else if(!Ot(s))f=!1;else if(u){let{shouldLoad:e}=kt(s,a.loaderData,a.errors);f=e}else At(a.loaderData,a.matches[o],i)&&(f=!0);if(f!==null)return Gt(n,r,e,c,O,i,l,t,f);let p=!1;typeof b==`boolean`?p=b:E?p=!1:d||S.pathname+S.search===C.pathname+C.search?p=!0:S.search===C.search?jt(a.matches[o],i)&&(p=!0):p=!0;let m={...D,defaultShouldRevalidate:p};return Gt(n,r,e,c,O,i,l,t,Mt(i,m),m,b)}),A=[];return m.forEach((e,s)=>{if(u||!o.some(t=>t.route.id===e.routeId)||p.has(s))return;let c=a.fetchers.get(s),m=c&&c.state!==`idle`&&c.data===void 0,y=me(g,e.path,_);if(!y){if(v&&m)return;A.push({key:s,routeId:e.routeId,path:e.path,matches:null,match:null,request:null,controller:null});return}if(h.has(s))return;let x=On(y,e.path),S=new AbortController,C=en(i,e.path,S.signal),w=null;if(f.has(s))f.delete(s),w=Kt(n,r,C,e.path,y,x,l,t);else if(m)d&&(w=Kt(n,r,C,e.path,y,x,l,t));else{let i;i=typeof b==`boolean`?b:E?!1:d;let a={...D,defaultShouldRevalidate:i};Mt(x,a)&&(w=Kt(n,r,C,e.path,y,x,l,t,a))}w&&A.push({key:s,routeId:e.routeId,path:e.path,matches:w,match:x,request:C,controller:S})}),{dsMatches:k,revalidatingFetchers:A}}function Ot(e){return e.loader!=null||e.middleware!=null&&e.middleware.length>0}function kt(e,t,n){if(e.lazy)return{shouldLoad:!0,renderFallback:!0};if(!Ot(e))return{shouldLoad:!1,renderFallback:!1};let r=t!=null&&e.id in t,i=n!=null&&n[e.id]!==void 0;if(!r&&i)return{shouldLoad:!1,renderFallback:!1};if(typeof e.loader==`function`&&e.loader.hydrate===!0)return{shouldLoad:!0,renderFallback:!r};let a=!r&&!i;return{shouldLoad:a,renderFallback:a}}function At(e,t,n){let r=!t||n.route.id!==t.route.id,i=!e.hasOwnProperty(n.route.id);return r||i}function jt(e,t){let n=e.route.path;return e.pathname!==t.pathname||n!=null&&n.endsWith(`*`)&&e.params[`*`]!==t.params[`*`]}function Mt(e,t){if(e.route.shouldRevalidate){let n=e.route.shouldRevalidate(t);if(typeof n==`boolean`)return n}return t.defaultShouldRevalidate}function Nt(e,t,n,r,i,a){let o;if(e){let t=r[e];P(t,`No route found to patch children into: routeId = ${e}`),t.children||=[],o=t.children}else o=n;let s=[],c=[];
10if(t.forEach(e=>{let t=o.find(t=>Pt(e,t));t?c.push({existingRoute:t,newRoute:e}):s.push(e)}),s.length>0){let t=L(s,i,[e||`_`,`patch`,String(o?.length||`0`)],r);o.push(...t)}if(a&&c.length>0)for(let e=0;e<c.length;e++){let{existingRoute:t,newRoute:n}=c[e],r=t,[a]=L([n],i,[],{},!0);Object.assign(r,{element:a.element?a.element:r.element,errorElement:a.errorElement?a.errorElement:r.errorElement,hydrateFallbackElement:a.hydrateFallbackElement?a.hydrateFallbackElement:r.hydrateFallbackElement})}}function Pt(e,t){return`id`in e&&`id`in t&&e.id===t.id?!0:e.index===t.index&&e.path===t.path&&e.caseSensitive===t.caseSensitive?(!e.children||e.children.length===0)&&(!t.children||t.children.length===0)?!0:e.children?.every((e,n)=>t.children?.some(t=>Pt(e,t)))??!1:!1}var Ft=new WeakMap,It=({key:e,route:t,manifest:n,mapRouteProperties:r})=>{let i=n[t.id];if(P(i,`No route found in manifest`),!i.lazy||typeof i.lazy!=`object`)return;let a=i.lazy[e];if(!a)return;let o=Ft.get(i);o||(o={},Ft.set(i,o));let s=o[e];if(s)return s;let c=(async()=>{let t=le(e),n=i[e]!==void 0&&e!==`hasErrorBoundary`;if(t)F(!t,`Route property `+e+` is not a supported lazy route property. This property will be ignored.`),o[e]=Promise.resolve();else if(n)F(!1,`Route "${i.id}" has a static property "${e}" defined. The lazy property will be ignored.`);else{let t=await a();t!=null&&(Object.assign(i,{[e]:t}),Object.assign(i,r(i)))}typeof i.lazy==`object`&&(i.lazy[e]=void 0,Object.values(i.lazy).every(e=>e===void 0)&&(i.lazy=void 0))})();return o[e]=c,c},Lt=new WeakMap;function Rt(e,t,n,r,i){let a=n[e.id];if(P(a,`No route found in manifest`),!e.lazy)return{lazyRoutePromise:void 0,lazyHandlerPromise:void 0};if(typeof e.lazy==`function`){let t=Lt.get(a);if(t)return{lazyRoutePromise:t,lazyHandlerPromise:t};let n=(async()=>{P(typeof e.lazy==`function`,`No lazy route function found`);let t=await e.lazy(),n={};for(let e in t){let r=t[e];if(r===void 0)continue;let i=de(e),o=a[e]!==void 0&&e!==`hasErrorBoundary`;i?F(!i,`Route property `+e+` is not a supported property to be returned from a lazy route function. This property will be ignored.`):o?F(!o,`Route "${a.id}" has a static property "${e}" defined but its lazy function is also returning a value for this property. The lazy route property "${e}" will be ignored.`):n[e]=r}Object.assign(a,n),Object.assign(a,{...r(a),lazy:void 0})})();return Lt.set(a,n),n.catch(()=>{}),{lazyRoutePromise:n,lazyHandlerPromise:n}}let o=Object.keys(e.lazy),s=[],c;for(let a of o){if(i&&i.includes(a))continue;let o=It({key:a,route:e,manifest:n,mapRouteProperties:r});o&&(s.push(o),a===t&&(c=o))}let l=s.length>0?Promise.all(s).then(()=>{}):void 0;return l?.catch(()=>{}),c?.catch(()=>{}),{lazyRoutePromise:l,lazyHandlerPromise:c}}async function zt(e){let t=e.matches.filter(e=>e.shouldLoad),n={};return(await Promise.all(t.map(e=>e.resolve()))).forEach((e,r)=>{n[t[r].route.id]=e}),n}async function Bt(e){return e.matches.some(e=>e.route.middleware)?Vt(e,()=>zt(e)):zt(e)}function Vt(e,t){return Ht(e,t,e=>{if(wn(e))throw e;return e},gn,n);function n(t,n,r){if(r)return Promise.resolve(Object.assign(r.value,{[n]:{type:`error`,result:t}}));{let{matches:r}=e,i=ln(r,r[Math.min(Math.max(r.findIndex(e=>e.route.id===n),0),Math.max(r.findIndex(e=>e.shouldCallHandler()),0))].route.id).route.id;return Promise.resolve({[i]:{type:`error`,result:t}})}}}async function Ht(e,t,n,r,i){let{matches:a,...o}=e;return await Ut(o,a.flatMap(e=>e.route.middleware?e.route.middleware.map(t=>[e.route.id,t]):[]),t,n,r,i)}async function Ut(e,t,n,r,i,a,o=0){let{request:s}=e;if(s.signal.aborted)throw s.signal.reason??Error(`Request aborted: ${s.method} ${s.url}`);let c=t[o];if(!c)return await n();let[l,u]=c,d,f=async()=>{if(d)throw Error("You may only call `next()` once per middleware");try{return d={value:await Ut(e,t,n,r,i,a,o+1)},d.value}catch(e){return d={value:await a(e,l,d)},d.value}};try{let t=await u(e,f),n=t==null?void 0:r(t);return i(n)?n:d?n??d.value:(d={value:await f()},d.value)}catch(e){return await a(e,l,d)}}function Wt(e,t,n,r,i){let a=It({key:`middleware`,route:r.route,manifest:t,mapRouteProperties:e}),o=Rt(r.route,En(n.method)?`action`:`loader`,t,e,i);return{middleware:a,route:o.lazyRoutePromise,handler:o.lazyHandlerPromise}}function Gt(e,t,n,r,i,a,o,s,c,l=null,u){let d=!1,f=Wt(e,t,n,a,o);return{...a,_lazyPromises:f,shouldLoad:c,shouldRevalidateArgs:l,shouldCallHandler(e){return d=!0,l?typeof u==`boolean`?Mt(a,{...l,defaultShouldRevalidate:u}):typeof e==`boolean`?Mt(a,{...l,defaultShouldRevalidate:e}):Mt(a,l):c}
10,resolve(e){let{lazy:t,loader:o,middleware:l}=a.route,u=d||c||e&&!En(n.method)&&(t||o),p=l&&l.length>0&&!o&&!t;return u&&(En(n.method)||!p)?Jt({request:n,path:r,unstable_pattern:i,match:a,lazyHandlerPromise:f?.handler,lazyRoutePromise:f?.route,handlerOverride:e,scopedContext:s}):Promise.resolve({type:`data`,result:void 0})}}}function Kt(e,t,n,r,i,a,o,s,c=null){return i.map(l=>l.route.id===a.route.id?Gt(e,t,n,r,Ze(i),l,o,s,!0,c):{...l,shouldLoad:!1,shouldRevalidateArgs:c,shouldCallHandler:()=>!1,_lazyPromises:Wt(e,t,n,l,o),resolve:()=>Promise.resolve({type:`data`,result:void 0})})}async function qt(e,t,n,r,i,a,o){r.some(e=>e._lazyPromises?.middleware)&&await Promise.all(r.map(e=>e._lazyPromises?.middleware));let s={request:t,unstable_url:tn(t,n),unstable_pattern:Ze(r),params:r[0].params,context:a,matches:r},c=o?()=>{throw Error("You cannot call `runClientMiddleware()` from a static handler `dataStrategy`. Middleware is run outside of `dataStrategy` during SSR in order to bubble up the Response. You can enable middleware via the `respond` API in `query`/`queryRoute`")}:e=>{let t=s;return Vt(t,()=>e({...t,fetcherKey:i,runClientMiddleware:()=>{throw Error("Cannot call `runClientMiddleware()` from within an `runClientMiddleware` handler")}}))},l=await e({...s,fetcherKey:i,runClientMiddleware:c});try{await Promise.all(r.flatMap(e=>[e._lazyPromises?.handler,e._lazyPromises?.route]))}catch{}return l}async function Jt({request:e,path:t,unstable_pattern:n,match:r,lazyHandlerPromise:i,lazyRoutePromise:a,handlerOverride:o,scopedContext:s}){let c,l,u=En(e.method),d=u?`action`:`loader`,f=i=>{let a,c=new Promise((e,t)=>a=t);l=()=>a(),e.signal.addEventListener(`abort`,l);let u=a=>typeof i==`function`?i({request:e,unstable_url:tn(e,t),unstable_pattern:n,params:r.params,context:s},...a===void 0?[]:[a]):Promise.reject(Error(`You cannot call the handler for a route which defines a boolean "${d}" [routeId: ${r.route.id}]`)),f=(async()=>{try{return{type:`data`,result:await(o?o(e=>u(e)):u())}}catch(e){return{type:`error`,result:e}}})();return Promise.race([f,c])};try{let t=u?r.route.action:r.route.loader;if(i||a)if(t){let e,[n]=await Promise.all([f(t).catch(t=>{e=t}),i,a]);if(e!==void 0)throw e;c=n}else{await i;let t=u?r.route.action:r.route.loader;if(t)[c]=await Promise.all([f(t),a]);else if(d===`action`){let t=new URL(e.url),n=t.pathname+t.search;throw dn(405,{method:e.method,pathname:n,routeId:r.route.id})}else return{type:`data`,result:void 0}}else if(t)c=await f(t);else{let t=new URL(e.url);throw dn(404,{pathname:t.pathname+t.search})}}catch(e){return{type:`error`,result:e}}finally{l&&e.signal.removeEventListener(`abort`,l)}return c}async function Yt(e){let t=e.headers.get(`Content-Type`);return t&&/\bapplication\/json\b/.test(t)?e.body==null?null:e.json():e.text()}async function Xt(e){let{result:t,type:n}=e;if(Sn(t)){let e;try{e=await Yt(t)}catch(e){return{type:`error`,error:e}}return n===`error`?{type:`error`,error:new Ye(t.status,t.statusText,e),statusCode:t.status,headers:t.headers}:{type:`data`,data:e,statusCode:t.status,headers:t.headers}}return n===`error`?xn(t)?t.data instanceof Error?{type:`error`,error:t.data,statusCode:t.init?.status,headers:t.init?.headers?new Headers(t.init.headers):void 0}:{type:`error`,error:hn(t),statusCode:Xe(t)?t.status:void 0,headers:t.init?.headers?new Headers(t.init.headers):void 0}:{type:`error`,error:t,statusCode:Xe(t)?t.status:void 0}:xn(t)?{type:`data`,data:t.data,statusCode:t.init?.status,headers:t.init?.headers?new Headers(t.init.headers):void 0}:{type:`data`,data:t}}function Zt(e,t,n,r,i){let a=e.headers.get(`Location`);if(P(a,`Redirects returned/thrown from loaders/actions must have a Location header`),!Ie(a)){let o=r.slice(0,r.findIndex(e=>e.route.id===n)+1);a=Tt(new URL(t.url),o,i,a),e.headers.set(`Location`,a)}return e}var Qt=[`about:`,`blob:`,`chrome:`,`chrome-untrusted:`,`content:`,`data:`,`devtools:`,`file:`,`filesystem:`,`javascript:`];function $t(e,t,n,r){if(Ie(e)){let r=e,i=r.startsWith(`//`)?new URL(t.protocol+r):new URL(r);if(Qt.includes(i.protocol))throw Error(`Invalid redirect location`);let a=Ne(i.pathname,n)!=null;if(i.origin===t.origin&&a)return Ue(i.pathname)+i.search+i.hash}try{let t=r.createURL(e);if(Qt.includes(t.protocol))throw Error(`Invalid redirect location`)}catch{}return e}function en(e,t,n,r){let i=e.createURL(pn(t)).toString(),a={signal:n};if(r&&En(r.formMethod)){let{formMethod:e,formEncType:t}=r;a.method=e.toUpperCase(),t===`application/json`?(a.headers=new Headers({"Content-Type":t}),a.body=JSON.stringify(r.json)):t===`text/plain`?a.body=r.text:t===`application/x-www-form-urlencoded`&&r.formData?a.body=nn(r.formData):a.body=r.formData}
10return new Request(i,a)}function tn(e,t){let n=new URL(e.url),r=typeof t==`string`?re(t):t;if(n.pathname=r.pathname||`/`,r.search){let e=new URLSearchParams(r.search),t=e.getAll(`index`);e.delete(`index`);for(let n of t.filter(Boolean))e.append(`index`,n);n.search=e.size?`?${e.toString()}`:``}else n.search=``;return n.hash=r.hash||``,n}function nn(e){let t=new URLSearchParams;for(let[n,r]of e.entries())t.append(n,typeof r==`string`?r:r.name);return t}function rn(e){let t=new FormData;for(let[n,r]of e.entries())t.append(n,r);return t}function an(e,t,n,r=!1,i=!1){let a={},o=null,s,c=!1,l={},u=n&&yn(n[1])?n[1].error:void 0;return e.forEach(n=>{if(!(n.route.id in t))return;let d=n.route.id,f=t[d];if(P(!bn(f),`Cannot handle redirect results in processLoaderData`),yn(f)){let t=f.error;if(u!==void 0&&(t=u,u=void 0),o||={},i)o[d]=t;else{let n=ln(e,d);o[n.route.id]??(o[n.route.id]=t)}r||(a[d]=St),c||(c=!0,s=Xe(f.error)?f.error.status:500),f.headers&&(l[d]=f.headers)}else a[d]=f.data,f.statusCode&&f.statusCode!==200&&!c&&(s=f.statusCode),f.headers&&(l[d]=f.headers)}),u!==void 0&&n&&(o={[n[0]]:u},n[2]&&(a[n[2]]=void 0)),{loaderData:a,errors:o,statusCode:s||200,loaderHeaders:l}}function on(e,t,n,r,i,a){let{loaderData:o,errors:s}=an(t,n,r);return i.filter(e=>!e.matches||e.matches.some(e=>e.shouldLoad)).forEach(t=>{let{key:n,match:r,controller:i}=t;if(i&&i.signal.aborted)return;let o=a[n];if(P(o,`Did not find corresponding fetcher result`),yn(o)){let t=ln(e.matches,r?.route.id);s&&s[t.route.id]||(s={...s,[t.route.id]:o.error}),e.fetchers.delete(n)}else if(bn(o))P(!1,`Unhandled fetcher revalidation redirect`);else{let t=Pn(o.data);e.fetchers.set(n,t)}}),{loaderData:o,errors:s}}function sn(e,t,n,r){let i=Object.entries(t).filter(([,e])=>e!==St).reduce((e,[t,n])=>(e[t]=n,e),{});for(let a of n){let n=a.route.id;if(!t.hasOwnProperty(n)&&e.hasOwnProperty(n)&&a.route.loader&&(i[n]=e[n]),r&&r.hasOwnProperty(n))break}return i}function cn(e){return e?yn(e[1])?{actionData:{}}:{actionData:{[e[0]]:e[1].data}}:{}}function ln(e,t){return(t?e.slice(0,e.findIndex(e=>e.route.id===t)+1):[...e]).reverse().find(e=>e.route.hasErrorBoundary===!0)||e[0]}function un(e){let t=e.length===1?e[0]:e.find(e=>e.index||!e.path||e.path===`/`)||{id:`__shim-error-route__`};return{matches:[{params:{},pathname:``,pathnameBase:``,route:t}],route:t}}function dn(e,{pathname:t,routeId:n,method:r,type:i,message:a}={}){let o=`Unknown Server Error`,s=`Unknown @remix-run/router error`;return e===400?(o=`Bad Request`,r&&t&&n?s=`You made a ${r} request to "${t}" but did not provide a \`loader\` for route "${n}", so there is no way to handle the request.`:i===`invalid-body`&&(s=`Unable to encode submission body`)):e===403?(o=`Forbidden`,s=`Route "${n}" does not match URL "${t}"`):e===404?(o=`Not Found`,s=`No route matches URL "${t}"`):e===405&&(o=`Method Not Allowed`,r&&t&&n?s=`You made a ${r.toUpperCase()} request to "${t}" but did not provide an \`action\` for route "${n}", so there is no way to handle the request.`:r&&(s=`Invalid request method "${r.toUpperCase()}"`)),new Ye(e||500,o,Error(s),!0)}function fn(e){let t=Object.entries(e);for(let e=t.length-1;e>=0;e--){let[n,r]=t[e];if(bn(r))return{key:n,result:r}}}function pn(e){return ne({...typeof e==`string`?re(e):e,hash:``})}function mn(e,t){return e.pathname!==t.pathname||e.search!==t.search?!1:e.hash===``?t.hash!==``:e.hash===t.hash?!0:t.hash!==``}function hn(e){return new Ye(e.init?.status??500,e.init?.statusText??`Internal Server Error`,e.data)}function gn(e){return typeof e==`object`&&!!e&&Object.entries(e).every(([e,t])=>typeof e==`string`&&_n(t))}function _n(e){return typeof e==`object`&&!!e&&`type`in e&&`result`in e&&(e.type===`data`||e.type===`error`)}function vn(e){return Sn(e.result)&&ht.has(e.result.status)}function yn(e){return e.type===`error`}function bn(e){return(e&&e.type)===`redirect`}function xn(e){return typeof e==`object`&&!!e&&`type`in e&&`data`in e&&`init`in e&&e.type===`DataWithResponseInit`}function Sn(e){return e!=null&&typeof e.status==`number`&&typeof e.statusText==`string`&&typeof e.headers==`object`&&e.body!==void 0}function Cn(e){return ht.has(e)}function wn(e){return Sn(e)&&Cn(e.status)&&e.headers.has(`Location`)}function Tn(e){return mt.has(e.toUpperCase())}function En(e){return ft.has(e.toUpperCase())}function Dn(e){return new URLSearchParams(e).getAll(`index`).some(e=>e===``)}function On(e,t){let n=typeof t==`string`?re(t).search:t.search;if(e[e.length-1].route.index&&Dn(n||``))return e[e.length-1];let r=Be(e);return r[r.length-1]}function kn(e){let{formMethod:t,formAction:n,formEncType:r,text:i,formData:a,json:o}=e;if(!(!t||!n||!r)){if(i!=null)return{formMethod:t,formAction:n,formEncType:r,formData:void 0,json:void 0,text:i};if(a!=null)return{formMethod:t,formAction:n,formEncType:r,formData:a,json:void 0,text:void 0};if(o!==void 0)return{formMethod:t,formAction:n,formEncType:r,formData:void 0,json:o,text:void 0}}}function An(e,t){return t?{state:`loading`,location:e,formMethod:t.formMethod,formAction:t.formAction,formEncType:t.formEncType,formData:t.formData,json:t.json,text:t.text}:{state:`loading`,location:e,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0}}function jn(e,t){return{state:`submitting`,location:e,formMethod:t.formMethod,formAction:t.formAction,formEncType:t.formEncType,formData:t.formData,json:t.json,text:t.text}}function Mn(e,t){return e?{state:`loading`,formMethod:e.formMethod,formAction:e.formAction,formEncType:e.formEncType,formData:e.formData,json:e.json,text:e.text,data:t}:{state:`loading`,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:t}}function Nn(e,t){return{state:`submitting`,formMethod:e.formMethod,formAction:e.formAction,formEncType:e.formEncType,formData:e.formData,json:e.json,text:e.text,data:t?t.data:void 0}}function Pn(e){return{state:`idle`,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:e}}function Fn(e,t){try{let n=e.sessionStorage.getItem(xt);if(n){let e=JSON.parse(n);for(let[n,r]of Object.entries(e||{}))r&&Array.isArray(r)&&t.set(n,new Set(r||[]))}}catch{}}function In(e,t){if(t.size>0){let n={};for(let[e,r]of t)n[e]=[...r];try{e.sessionStorage.setItem(xt,JSON.stringify(n))}catch(e){F(!1,`Failed to save applied view transitions in sessionStorage (${e}).`)}}}function Ln(){let e,t,n=new Promise((r,i)=>{e=async e=>{r(e);try{await n}catch{}},t=async e=>{i(e);try{await n}catch{}}});return{promise:n,resolve:e,reject:t}}var Rn=b.createContext(null);Rn.displayName=`DataRouter`;var zn=b.createContext(null);zn.displayName=`DataRouterState`;var Bn=b.createContext(!1);function Vn(){return b.useContext(Bn)}var Hn=b.createContext({isTransitioning:!1});Hn.displayName=`ViewTransition`;var Un=b.createContext(new Map);Un.displayName=`Fetchers`;var Wn=b.createContext(null);Wn.displayName=`Await`;var Gn=b.createContext(null);Gn.displayName=`Navigation`;var Kn=b.createContext(null);Kn.displayName=`Location`;var qn=b.createContext({outlet:null,matches:[],isDataRoute:!1});qn.displayName=`Route`;var Jn=b.createContext(null);Jn.displayName=`RouteError`;var Yn=`REACT_ROUTER_ERROR`,Xn=`REDIRECT`,Zn=`ROUTE_ERROR_RESPONSE`;function Qn(e){if(e.startsWith(`${Yn}:${Xn}:{`))try{let t=JSON.parse(e.slice(28));if(typeof t==`object`&&t&&typeof t.status==`number`&&typeof t.statusText==`string`&&typeof t.location==`string`&&typeof t.reloadDocument==`boolean`&&typeof t.replace==`boolean`)return t}catch{}}function $n(e){if(e.startsWith(`${Yn}:${Zn}:{`))try{let t=JSON.parse(e.slice(40));if(typeof t==`object`&&t&&typeof t.status==`number`&&typeof t.statusText==`string`)return new Ye(t.status,t.statusText,t.data)}catch{}}function er(e,{relative:t}={}){P(tr(),`useHref() may be used only in the context of a <Router> component.`);let{basename:n,navigator:r}=b.useContext(Gn),{hash:i,pathname:a,search:o}=dr(e,{relative:t}),s=a;return n!==`/`&&(s=a===`/`?n:We([n,a])),r.createHref({pathname:s,search:o,hash:i})}function tr(){return b.useContext(Kn)!=null}function nr(){return P(tr(),`useLocation() may be used only in the context of a <Router> component.`),b.useContext(Kn).location}function rr(){return b.useContext(Kn).navigationType}var ir=`You should call navigate() in a React.useEffect(), not when your component is first rendered.`;function ar(e){b.useContext(Gn).static||b.useLayoutEffect(e)}function or(){let{isDataRoute:e}=b.useContext(qn);return e?kr():sr()}function sr(){P(tr(),`useNavigate() may be used only in the context of a <Router> component.`);let e=b.useContext(Rn),{basename:t,navigator:n}=b.useContext(Gn),{matches:r}=b.useContext(qn),{pathname:i}=nr(),a=JSON.stringify(Ve(r)),o=b.useRef(!1);return ar(()=>{o.current=!0}),b.useCallback((r,s={})=>
10{if(F(o.current,ir),!o.current)return;if(typeof r==`number`){n.go(r);return}let c=He(r,JSON.parse(a),i,s.relative===`path`);e==null&&t!==`/`&&(c.pathname=c.pathname===`/`?t:We([t,c.pathname])),(s.replace?n.replace:n.push)(c,s.state,s)},[t,n,a,i,e])}var cr=b.createContext(null);function lr(e){let t=b.useContext(qn).outlet;return b.useMemo(()=>t&&b.createElement(cr.Provider,{value:e},t),[t,e])}function ur(){let{matches:e}=b.useContext(qn);return e[e.length-1]?.params??{}}function dr(e,{relative:t}={}){let{matches:n}=b.useContext(qn),{pathname:r}=nr(),i=JSON.stringify(Ve(n));return b.useMemo(()=>He(e,JSON.parse(i),r,t===`path`),[e,i,r,t])}function fr(e,t,n){P(tr(),`useRoutes() may be used only in the context of a <Router> component.`);let{navigator:r}=b.useContext(Gn),{matches:i}=b.useContext(qn),a=i[i.length-1],o=a?a.params:{},s=a?a.pathname:`/`,c=a?a.pathnameBase:`/`,l=a&&a.route;{let e=l&&l.path||``;jr(s,!l||e.endsWith(`*`)||e.endsWith(`*?`),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${s}" (under <Route path="${e}">) but the parent route path has no trailing "*". This means if you navigate deeper, the parent won't match anymore and therefore the child routes will never render. 11 12Please change the parent <Route path="${e}"> to <Route path="${e===`/`?`*`:`${e}/*`}">.`)}let u=nr(),d;if(t){let e=typeof t==`string`?re(t):t;P(c===`/`||e.pathname?.startsWith(c),`When overriding the location using \`<Routes location>\` or \`useRoutes(routes, location)\`, the location pathname must begin with the portion of the URL pathname that was matched by all parent routes. The current pathname base is "${c}" but pathname "${e.pathname}" was given in the \`location\` prop.`),d=e}else d=u;let f=d.pathname||`/`,p=f;if(c!==`/`){let e=c.replace(/^\//,``).split(`/`);p=`/`+f.replace(/^\//,``).split(`/`).slice(e.length).join(`/`)}let m=me(e,{pathname:p});F(l||m!=null,`No routes matched location "${d.pathname}${d.search}${d.hash}" `),F(m==null||m[m.length-1].route.element!==void 0||m[m.length-1].route.Component!==void 0||m[m.length-1].route.lazy!==void 0,`Matched leaf route at location "${d.pathname}${d.search}${d.hash}" does not have an element or Component. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page.`);let h=yr(m&&m.map(e=>Object.assign({},e,{params:Object.assign({},o,e.params),pathname:We([c,r.encodeLocation?r.encodeLocation(e.pathname.replace(/%/g,`%25`).replace(/\?/g,`%3F`).replace(/#/g,`%23`)).pathname:e.pathname]),pathnameBase:e.pathnameBase===`/`?c:We([c,r.encodeLocation?r.encodeLocation(e.pathnameBase.replace(/%/g,`%25`).replace(/\?/g,`%3F`).replace(/#/g,`%23`)).pathname:e.pathnameBase])})),i,n);return t&&h?b.createElement(Kn.Provider,{value:{location:{pathname:`/`,search:``,hash:``,state:null,key:`default`,unstable_mask:void 0,...d},navigationType:`POP`}},h):h}function pr(){let e=Or(),t=Xe(e)?`${e.status} ${e.statusText}`:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null,r=`rgba(200,200,200, 0.5)`,i={padding:`0.5rem`,backgroundColor:r},a={padding:`2px 4px`,backgroundColor:r},o=null;return console.error(`Error handled by React Router default ErrorBoundary:`,e),o=b.createElement(b.Fragment,null,b.createElement(`p`,null,`ð¿ Hey developer ð`),b.createElement(`p`,null,`You can provide a way better UX than this when your app throws errors by providing your own `,b.createElement(`code`,{style:a},`ErrorBoundary`),` or`,` `,b.createElement(`code`,{style:a},`errorElement`),` prop on your route.`)),b.createElement(b.Fragment,null,b.createElement(`h2`,null,`Unexpected Application Error!`),b.createElement(`h3`,{style:{fontStyle:`italic`}},t),n?b.createElement(`pre`,{style:i},n):null,o)}var mr=b.createElement(pr,null),hr=class extends b.Component{constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,t){return t.location!==e.location||t.revalidation!==`idle`&&e.revalidation===`idle`?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:e.error===void 0?t.error:e.error,location:t.location,revalidation:e.revalidation||t.revalidation}}componentDidCatch(e,t){this.props.onError?this.props.onError(e,t):console.error(`React Router caught the following error during render`,e)}render(){let e=this.state.error;if(this.context&&typeof e==`object`&&e&&`digest`in e&&typeof e.digest==`string`){let t=$n(e.digest);t&&(e=t)}let t=e===void 0?this.props.children:b.createElement(qn.Provider,{value:this.props.routeContext},b.createElement(Jn.Provider,{value:e,children:this.props.component}));return this.context?b.createElement(_r,{error:e},t):t}};hr.contextType=Bn;var gr=new WeakMap;function _r({children:e,error:t}){let{basename:n}=b.useContext(Gn);if(typeof t==`object`&&t&&`digest`in t&&typeof t.digest==`string`){let e=Qn(t.digest);if(e){let r=gr.get(t);if(r)throw r;let i=$e(e.location,n);if(Qe&&!gr.get(t))if(i.isExternal||e.reloadDocument)window.location.href=i.absoluteURL||i.to;else{let n=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(i.to,{replace:e.replace}));throw gr.set(t,n),n}return b.createElement(`meta`,{httpEquiv:`refresh`,content:`0;url=${i.absoluteURL||i.to}`})}}return e}function vr({routeContext:e,match:t,children:n}){let r=b.useContext(Rn);return r&&r.static&&r.staticContext&&(t.route.errorElement||t.route.ErrorBoundary)&&(r.staticContext._deepestRenderedBoundaryId=t.route.id),b.createElement(qn.Provider,{value:e},n)}function yr(e,t=[],n){let r=n?.state;if(e==null){if(!r)return null;if(r.errors)e=r.matches;else if(t.length===0&&!r.initialized&&r.matches.length>0)e=r.matches;else return null}let i=e,a=r?.errors;if(a!=null){let e=i.findIndex(e=>e.route.id&&a?.[e.route.id]!==void 0);P(e>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(a).join(`,`)}`),i=i.slice(0,Math.min(i.length,e+1))}let o=!1,s=-1;if(n&&r){o=r.renderFallback;for(let e=0;e<i.length;e++){let t=i[e];if((t.route.HydrateFallback||t.route.hydrateFallbackElement)&&(s=e),t.route.id){let{loaderData:e,errors:a}
12=r,c=t.route.loader&&!e.hasOwnProperty(t.route.id)&&(!a||a[t.route.id]===void 0);if(t.route.lazy||c){n.isStatic&&(o=!0),i=s>=0?i.slice(0,s+1):[i[0]];break}}}}let c=n?.onError,l=r&&c?(e,t)=>{c(e,{location:r.location,params:r.matches?.[0]?.params??{},unstable_pattern:Ze(r.matches),errorInfo:t})}:void 0;return i.reduceRight((e,n,c)=>{let u,d=!1,f=null,p=null;r&&(u=a&&n.route.id?a[n.route.id]:void 0,f=n.route.errorElement||mr,o&&(s<0&&c===0?(jr(`route-fallback`,!1,"No `HydrateFallback` element provided to render during initial hydration"),d=!0,p=null):s===c&&(d=!0,p=n.route.hydrateFallbackElement||null)));let m=t.concat(i.slice(0,c+1)),h=()=>{let t;return t=u?f:d?p:n.route.Component?b.createElement(n.route.Component,null):n.route.element?n.route.element:e,b.createElement(vr,{match:n,routeContext:{outlet:e,matches:m,isDataRoute:r!=null},children:t})};return r&&(n.route.ErrorBoundary||n.route.errorElement||c===0)?b.createElement(hr,{location:r.location,revalidation:r.revalidation,component:f,error:u,children:h(),routeContext:{outlet:null,matches:m,isDataRoute:!0},onError:l}):h()},null)}function br(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function xr(e){let t=b.useContext(Rn);return P(t,br(e)),t}function Sr(e){let t=b.useContext(zn);return P(t,br(e)),t}function Cr(e){let t=b.useContext(qn);return P(t,br(e)),t}function wr(e){let t=Cr(e),n=t.matches[t.matches.length-1];return P(n.route.id,`${e} can only be used on routes that contain a unique "id"`),n.route.id}function Tr(){return wr(`useRouteId`)}function Er(){return Sr(`useNavigation`).navigation}function Dr(){let{matches:e,loaderData:t}=Sr(`useMatches`);return b.useMemo(()=>e.map(e=>ge(e,t)),[e,t])}function Or(){let e=b.useContext(Jn),t=Sr(`useRouteError`),n=wr(`useRouteError`);return e===void 0?t.errors?.[n]:e}function kr(){let{router:e}=xr(`useNavigate`),t=wr(`useNavigate`),n=b.useRef(!1);return ar(()=>{n.current=!0}),b.useCallback(async(r,i={})=>{F(n.current,ir),n.current&&(typeof r==`number`?await e.navigate(r):await e.navigate(r,{fromRouteId:t,...i}))},[e,t])}var Ar={};function jr(e,t,n){!t&&!Ar[e]&&(Ar[e]=!0,F(!1,n))}var Mr={};function Nr(e,t){!e&&!Mr[t]&&(Mr[t]=!0,console.warn(t))}var Pr=b.useOptimistic,Fr=()=>void 0;function Ir(e){return Pr?Pr(e):[e,Fr]}function Lr(e){let t={hasErrorBoundary:e.hasErrorBoundary||e.ErrorBoundary!=null||e.errorElement!=null};return e.Component&&(e.element&&F(!1,"You should not include both `Component` and `element` on your route - `Component` will be used."),Object.assign(t,{element:b.createElement(e.Component),Component:void 0})),e.HydrateFallback&&(e.hydrateFallbackElement&&F(!1,"You should not include both `HydrateFallback` and `hydrateFallbackElement` on your route - `HydrateFallback` will be used."),Object.assign(t,{hydrateFallbackElement:b.createElement(e.HydrateFallback),HydrateFallback:void 0})),e.ErrorBoundary&&(e.errorElement&&F(!1,"You should not include both `ErrorBoundary` and `errorElement` on your route - `ErrorBoundary` will be used."),Object.assign(t,{errorElement:b.createElement(e.ErrorBoundary),ErrorBoundary:void 0})),t}var Rr=[`HydrateFallback`,`hydrateFallbackElement`],zr=class{constructor(){this.status=`pending`,this.promise=new Promise((e,t)=>{this.resolve=t=>{this.status===`pending`&&(this.status=`resolved`,e(t))},this.reject=e=>{this.status===`pending`&&(this.status=`rejected`,t(e))}})}};function Br({router:e,flushSync:t,onError:n,unstable_useTransitions:r}){r=Vn()||r;let[i,a]=b.useState(e.state),[o,s]=Ir(i),[c,l]=b.useState(),[u,d]=b.useState({isTransitioning:!1}),[f,p]=b.useState(),[m,h]=b.useState(),[g,_]=b.useState(),v=b.useRef(new Map),y=b.useCallback((i,{deletedFetchers:o,newErrors:c,flushSync:u,viewTransitionOpts:g})=>{c&&n&&Object.values(c).forEach(e=>n(e,{location:i.location,params:i.matches[0]?.params??{},unstable_pattern:Ze(i.matches)})),i.fetchers.forEach((e,t)=>{e.data!==void 0&&v.current.set(t,e.data)}),o.forEach(e=>v.current.delete(e)),Nr(u===!1||t!=null,'You provided the `flushSync` option to a router update, but you are not using the `<RouterProvider>` from `react-router/dom` so `ReactDOM.flushSync()` is unavailable. Please update your app to `import { RouterProvider } from "react-router/dom"` and ensure you have `react-dom` installed as a dependency to use the `flushSync` option.');let y=e.window!=null&&e.window.document!=null&&typeof e.window.document.startViewTransition==`function`;if(Nr(g==null||y,"You provided the `viewTransition` option to a router update, but you do not appear to be running in a DOM environment as `window.startViewTransition` is not available."),!g||!y){t&&u?t(()=>a(i)):r===!1?a(i):b.startTransition(()=>{r===!0&&s(e=>Vr(e,i)),a(i)});return}if(t&&u){t(()=>{m&&(f?.resolve(),m.skipTransition()),d({isTransitioning:!0,flushSync:!0,currentLocation:g.currentLocation,nextLocation:g.nextLocation})});let n=e.window.document.startViewTransition(()=>{t(()=>a(i))});n.finished.finally(()=>{t(()=>{p(void 0),h(void 0),l(void 0),d({isTransitioning:!1})})}),t(()=>h(n));return}m?(f?.resolve(),m.skipTransition(),_({state:i,currentLocation:g.currentLocation,nextLocation:g.nextLocation})):(l(i),d({isTransitioning:!0,flushSync:!1,currentLocation:g.currentLocation,nextLocation:g.nextLocation}))},[e.window,t,m,f,r,s,n]);b.useLayoutEffect(()=>e.subscribe(y),[e,y]);let x=o.initialized;b.useLayoutEffect(()=>{!x&&e.state.initialized&&y(e.state,{deletedFetchers:[],flushSync:!1,newErrors:null})},[x,y,e.state]),b.useEffect(()=>{u.isTransitioning&&!u.flushSync&&p(new zr)},[u]),b.useEffect(()=>{if(f&&c&&e.window){let t=c,n=f.promise,i=e.window.document.startViewTransition(async()=>{r===!1?a(t):b.startTransition(()=>{r===!0&&s(e=>Vr(e,t)),a(t)}),await n});i.finished.finally(()=>{p(void 0),h(void 0),l(void 0),d({isTransitioning:!1})}),h(i)}},[c,f,e.window,r,s]),b.useEffect(()=>{f&&c&&o.location.key===c.location.key&&f.resolve()},[f,m,o.location,c]),b.useEffect(()=>{!u.isTransitioning&&g&&(l(g.state),d({isTransitioning:!0,flushSync:!1,currentLocation:g.currentLocation,nextLocation:g.nextLocation}),_(void 0))},[u.isTransitioning,g]);let S=b.useMemo(()=>({createHref:e.createHref,encodeLocation:e.encodeLocation,go:t=>e.navigate(t),push:(t,n,r)=>e.navigate(t,{state:n,preventScrollReset:r?.preventScrollReset}),replace:(t,n,r)=>e.navigate(t,{replace:!0,state:n,preventScrollReset:r?.preventScrollReset})}),[e]),C=e.basename||`/`,w=b.useMemo(()=>({router:e,navigator:S,static:!1,basename:C,onError:n}),[e,S,C,n]);return b.createElement(b.Fragment,null,b.createElement(Rn.Provider,{value:w},b.createElement(zn.Provider,{value:o},b.createElement(Un.Provider,{value:v.current},b.createElement(Hn.Provider,{value:u},b.createElement(Kr,{basename:C,location:o.location,navigationType:o.historyAction,navigator:S,unstable_useTransitions:r},b.createElement(Hr,{routes:e.routes,future:e.future,state:o,isStatic:!1,onError:n})))))),null)}function Vr(e,t){return{...e,navigation:t.navigation.state===`idle`?e.navigation:t.navigation,revalidation:t.revalidation===`idle`?e.revalidation:t.revalidation,actionData:t.navigation.state===`submitting`?e.actionData:t.actionData,fetchers:t.fetchers}}var Hr=b.memo(Ur);function Ur({routes:e,future:t,state:n,isStatic:r,onError:i}){return fr(e,void 0,{state:n,isStatic:r,onError:i,future:t})}function Wr({to:e,replace:t,state:n,relative:r}){P(tr(),`<Navigate> may be used only in the context of a <Router> component.`);let{static:i}=b.useContext(Gn);F(!i,`<Navigate> must not be used on the initial render in a <StaticRouter>. This is a no-op, but you should modify your code so the <Navigate> is only ever rendered in response to some user interaction or state change.`);let{matches:a}=b.useContext(qn),{pathname:o}=nr(),s=or(),c=He(e,Ve(a),o,r===`path`),l=JSON.stringify(c);return b.useEffect(()=>{s(JSON.parse(l),{replace:t,state:n,relative:r})},[s,l,r,t,n]),null}function Gr(e){return lr(e.context)}function Kr({basename:e=`/`,children:t=null,location:n,navigationType:r=`POP`,navigator:i,static:a=!1,unstable_useTransitions:o}){P(!tr(),`You cannot render a <Router> inside another <Router>. You should never have more than one in your app.`);let s=e.replace(/^\/*/,`/`),c=b.useMemo(()=>({basename:s,navigator:i,static:a,unstable_useTransitions:o,future:{}}),[s,i,a,o]);typeof n==`string`&&(n=re(n));let{pathname:l=`/`,search:u=``,hash:d=``,state:f=null,key:p=`default`,unstable_mask:m}=n,h=b.useMemo(()=>{let e=Ne(l,s);return e==null?null:{location:{pathname:e,search:u,hash:d,state:f,key:p,unstable_mask:m},navigationType:r}},[s,l,u,d,f,p,r,m]);
12return F(h!=null,`<Router basename="${s}"> is not able to match the URL "${l}${u}${d}" because it does not start with the basename, so the <Router> won't render anything.`),h==null?null:b.createElement(Gn.Provider,{value:c},b.createElement(Kn.Provider,{children:t,value:h}))}b.Component;var qr=`get`,Jr=`application/x-www-form-urlencoded`;function Yr(e){return typeof HTMLElement<`u`&&e instanceof HTMLElement}function Xr(e){return Yr(e)&&e.tagName.toLowerCase()===`button`}function Zr(e){return Yr(e)&&e.tagName.toLowerCase()===`form`}function Qr(e){return Yr(e)&&e.tagName.toLowerCase()===`input`}function $r(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function ei(e,t){return e.button===0&&(!t||t===`_self`)&&!$r(e)}function ti(e=``){return new URLSearchParams(typeof e==`string`||Array.isArray(e)||e instanceof URLSearchParams?e:Object.keys(e).reduce((t,n)=>{let r=e[n];return t.concat(Array.isArray(r)?r.map(e=>[n,e]):[[n,r]])},[]))}function ni(e,t){let n=ti(e);return t&&t.forEach((e,r)=>{n.has(r)||t.getAll(r).forEach(e=>{n.append(r,e)})}),n}var ri=null;function ii(){if(ri===null)try{new FormData(document.createElement(`form`),0),ri=!1}catch{ri=!0}return ri}var ai=new Set([`application/x-www-form-urlencoded`,`multipart/form-data`,`text/plain`]);function oi(e){return e!=null&&!ai.has(e)?(F(!1,`"${e}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${Jr}"`),null):e}function si(e,t){let n,r,i,a,o;if(Zr(e)){let o=e.getAttribute(`action`);r=o?Ne(o,t):null,n=e.getAttribute(`method`)||qr,i=oi(e.getAttribute(`enctype`))||Jr,a=new FormData(e)}else if(Xr(e)||Qr(e)&&(e.type===`submit`||e.type===`image`)){let o=e.form;if(o==null)throw Error(`Cannot submit a <button> or <input type="submit"> without a <form>`);let s=e.getAttribute(`formaction`)||o.getAttribute(`action`);if(r=s?Ne(s,t):null,n=e.getAttribute(`formmethod`)||o.getAttribute(`method`)||qr,i=oi(e.getAttribute(`formenctype`))||oi(o.getAttribute(`enctype`))||Jr,a=new FormData(o,e),!ii()){let{name:t,type:n,value:r}=e;if(n===`image`){let e=t?`${t}.`:``;a.append(`${e}x`,`0`),a.append(`${e}y`,`0`)}else t&&a.append(t,r)}}else if(Yr(e))throw Error(`Cannot submit element that is not <form>, <button>, or <input type="submit|image">`);else n=qr,r=null,i=Jr,o=e;return a&&i===`text/plain`&&(o=a,a=void 0),{action:r,method:n.toLowerCase(),encType:i,formData:a,body:o}}Object.getOwnPropertyNames(Object.prototype).sort().join(`\0`);var ci={"&":`\\u0026`,">":`\\u003e`,"<":`\\u003c`,"\u2028":`\\u2028`,"\u2029":`\\u2029`},li=/[&><\u2028\u2029]/g;function ui(e){return e.replace(li,e=>ci[e])}function di(e,t){if(e===!1||e==null)throw Error(t)}function fi(e,t,n,r){let i=typeof e==`string`?new URL(e,typeof window>`u`?`server://singlefetch/`:window.location.origin):e;return n?i.pathname.endsWith(`/`)?i.pathname=`${i.pathname}_.${r}`:i.pathname=`${i.pathname}.${r}`:i.pathname===`/`?i.pathname=`_root.${r}`:t&&Ne(i.pathname,t)===`/`?i.pathname=`${Ge(t)}/_root.${r}`:i.pathname=`${Ge(i.pathname)}.${r}`,i}async function pi(e,t){if(e.id in t)return t[e.id];try{let n=await E(()=>import(e.module),[]);return t[e.id]=n,n}catch(t){return console.error(`Error loading route module \`${e.module}\`, reloading page...`),console.error(t),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function mi(e){return e!=null&&typeof e.page==`string`}function hi(e){return e==null?!1:e.href==null?e.rel===`preload`&&typeof e.imageSrcSet==`string`&&typeof e.imageSizes==`string`:typeof e.rel==`string`&&typeof e.href==`string`}async function gi(e,t,n){return xi((await Promise.all(e.map(async e=>{let r=t.routes[e.route.id];if(r){let e=await pi(r,n);return e.links?e.links():[]}return[]}))).flat(1).filter(hi).filter(e=>e.rel===`stylesheet`||e.rel===`preload`).map(e=>e.rel===`stylesheet`?{...e,rel:`prefetch`,as:`style`}:{...e,rel:`prefetch`}))}function _i(e,t,n,r,i,a){let o=(e,t)=>n[t]?e.route.id!==n[t].route.id:!0,s=(e,t)=>n[t].pathname!==e.pathname||n[t].route.path?.endsWith(`*`)&&n[t].params[`*`]!==e.params[`*`];return a===`assets`?t.filter((e,t)=>
12o(e,t)||s(e,t)):a===`data`?t.filter((t,a)=>{let c=r.routes[t.route.id];if(!c||!c.hasLoader)return!1;if(o(t,a)||s(t,a))return!0;if(t.route.shouldRevalidate){let r=t.route.shouldRevalidate({currentUrl:new URL(i.pathname+i.search+i.hash,window.origin),currentParams:n[0]?.params||{},nextUrl:new URL(e,window.origin),nextParams:t.params,defaultShouldRevalidate:!0});if(typeof r==`boolean`)return r}return!0}):[]}function vi(e,t,{includeHydrateFallback:n}={}){return yi(e.map(e=>{let r=t.routes[e.route.id];if(!r)return[];let i=[r.module];return r.clientActionModule&&(i=i.concat(r.clientActionModule)),r.clientLoaderModule&&(i=i.concat(r.clientLoaderModule)),n&&r.hydrateFallbackModule&&(i=i.concat(r.hydrateFallbackModule)),r.imports&&(i=i.concat(r.imports)),i}).flat(1))}function yi(e){return[...new Set(e)]}function bi(e){let t={},n=Object.keys(e).sort();for(let r of n)t[r]=e[r];return t}function xi(e,t){let n=new Set,r=new Set(t);return e.reduce((e,i)=>{if(t&&!mi(i)&&i.as===`script`&&i.href&&r.has(i.href))return e;let a=JSON.stringify(bi(i));return n.has(a)||(n.add(a),e.push({key:a,link:i})),e},[])}function Si(){let e=b.useContext(Rn);return di(e,`You must render this element inside a <DataRouterContext.Provider> element`),e}function Ci(){let e=b.useContext(zn);return di(e,`You must render this element inside a <DataRouterStateContext.Provider> element`),e}var wi=b.createContext(void 0);wi.displayName=`FrameworkContext`;function Ti(){let e=b.useContext(wi);return di(e,`You must render this element inside a <HydratedRouter> element`),e}function Ei(e,t){let n=b.useContext(wi),[r,i]=b.useState(!1),[a,o]=b.useState(!1),{onFocus:s,onBlur:c,onMouseEnter:l,onMouseLeave:u,onTouchStart:d}=t,f=b.useRef(null);b.useEffect(()=>{if(e===`render`&&o(!0),e===`viewport`){let e=new IntersectionObserver(e=>{e.forEach(e=>{o(e.isIntersecting)})},{threshold:.5});return f.current&&e.observe(f.current),()=>{e.disconnect()}}},[e]),b.useEffect(()=>{if(r){let e=setTimeout(()=>{o(!0)},100);return()=>{clearTimeout(e)}}},[r]);let p=()=>{i(!0)},m=()=>{i(!1),o(!1)};return n?e===`intent`?[a,f,{onFocus:Di(s,p),onBlur:Di(c,m),onMouseEnter:Di(l,p),onMouseLeave:Di(u,m),onTouchStart:Di(d,p)}]:[a,f,{}]:[!1,f,{}]}function Di(e,t){return n=>{e&&e(n),n.defaultPrevented||t(n)}}function Oi({page:e,...t}){let n=Vn(),{router:r}=Si(),i=b.useMemo(()=>me(r.routes,e,r.basename),[r.routes,e,r.basename]);return i?n?b.createElement(Ai,{page:e,matches:i,...t}):b.createElement(ji,{page:e,matches:i,...t}):null}function ki(e){let{manifest:t,routeModules:n}=Ti(),[r,i]=b.useState([]);return b.useEffect(()=>{let r=!1;return gi(e,t,n).then(e=>{r||i(e)}),()=>{r=!0}},[e,t,n]),r}function Ai({page:e,matches:t,...n}){let r=nr(),{future:i}=Ti(),{basename:a}=Si(),o=b.useMemo(()=>{if(e===r.pathname+r.search+r.hash)return[];let n=fi(e,a,i.unstable_trailingSlashAwareDataRequests,`rsc`),o=!1,s=[];for(let e of t)typeof e.route.shouldRevalidate==`function`?o=!0:s.push(e.route.id);return o&&s.length>0&&n.searchParams.set(`_routes`,s.join(`,`)),[n.pathname+n.search]},[a,i.unstable_trailingSlashAwareDataRequests,e,r,t]);return b.createElement(b.Fragment,null,o.map(e=>b.createElement(`link`,{key:e,rel:`prefetch`,as:`fetch`,href:e,...n})))}function ji({page:e,matches:t,...n}){let r=nr(),{future:i,manifest:a,routeModules:o}=Ti(),{basename:s}=Si(),{loaderData:c,matches:l}=Ci(),u=b.useMemo(()=>_i(e,t,l,a,r,`data`),[e,t,l,a,r]),d=b.useMemo(()=>_i(e,t,l,a,r,`assets`),[e,t,l,a,r]),f=b.useMemo(()=>{if(e===r.pathname+r.search+r.hash)return[];let n=new Set,l=!1;if(t.forEach(e=>{let t=a.routes[e.route.id];!t||!t.hasLoader||(!u.some(t=>t.route.id===e.route.id)&&e.route.id in c&&o[e.route.id]?.shouldRevalidate||t.hasClientLoader?l=!0:n.add(e.route.id))}),n.size===0)return[];let d=fi(e,s,i.unstable_trailingSlashAwareDataRequests,`data`);return l&&n.size>0&&d.searchParams.set(`_routes`,t.filter(e=>n.has(e.route.id)).map(e=>e.route.id).join(`,`)),[d.pathname+d.search]},[s,i.unstable_trailingSlashAwareDataRequests,c,r,a,u,t,e,o]),p=b.useMemo(()=>vi(d,a),[d,a]),m=ki(d);return b.createElement(b.Fragment,null,f.map(e=>b.createElement(`link`,{key:e,rel:`prefetch`,as:`fetch`,href:e,...n})),p.map(e=>b.createElement(`link`,{key:e,rel:`modulepreload`,href:e,...n})),m.map(({key:e,link:t})=>b.createElement(`link`,{key:e,nonce:n.nonce,...t,crossOrigin:t.crossOrigin??n.crossOrigin})))}function Mi(...e){return t=>
12{e.forEach(e=>{typeof e==`function`?e(t):e!=null&&(e.current=t)})}}b.Component;var Ni=typeof window<`u`&&window.document!==void 0&&window.document.createElement!==void 0;try{Ni&&(window.__reactRouterVersion=`7.14.2`)}catch{}function Pi(e,t){return Ct({basename:t?.basename,getContext:t?.getContext,future:t?.future,history:N({window:t?.window}),hydrationData:t?.hydrationData||Fi(),routes:e,mapRouteProperties:Lr,hydrationRouteProperties:Rr,dataStrategy:t?.dataStrategy,patchRoutesOnNavigation:t?.patchRoutesOnNavigation,window:t?.window,unstable_instrumentations:t?.unstable_instrumentations}).initialize()}function Fi(){let e=window?.__staticRouterHydrationData;return e&&e.errors&&(e={...e,errors:Ii(e.errors)}),e}function Ii(e){if(!e)return null;let t=Object.entries(e),n={};for(let[e,r]of t)if(r&&r.__type===`RouteErrorResponse`)n[e]=new Ye(r.status,r.statusText,r.data,r.internal===!0);else if(r&&r.__type===`Error`){if(r.__subType){let t=window[r.__subType];if(typeof t==`function`)try{let i=new t(r.message);i.stack=``,n[e]=i}catch{}}if(n[e]==null){let t=Error(r.message);t.stack=``,n[e]=t}}else n[e]=r;return n}function Li({basename:e,children:t,history:n,unstable_useTransitions:r}){let[i,a]=b.useState({action:n.action,location:n.location}),o=b.useCallback(e=>{r===!1?a(e):b.startTransition(()=>a(e))},[r]);return b.useLayoutEffect(()=>n.listen(o),[n,o]),b.createElement(Kr,{basename:e,children:t,location:i.location,navigationType:i.action,navigator:n,unstable_useTransitions:r})}Li.displayName=`unstable_HistoryRouter`;var Ri=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,zi=b.forwardRef(function({onClick:e,discover:t=`render`,prefetch:n=`none`,relative:r,reloadDocument:i,replace:a,unstable_mask:o,state:s,target:c,to:l,preventScrollReset:u,viewTransition:d,unstable_defaultShouldRevalidate:f,...p},m){let{basename:h,navigator:g,unstable_useTransitions:_}=b.useContext(Gn),v=typeof l==`string`&&Ri.test(l),y=$e(l,h);l=y.to;let x=er(l,{relative:r}),S=nr(),C=null;if(o){let e=He(o,[],S.unstable_mask?S.unstable_mask.pathname:`/`,!0);h!==`/`&&(e.pathname=e.pathname===`/`?h:We([h,e.pathname])),C=g.createHref(e)}let[w,T,E]=Ei(n,p),D=Ki(l,{replace:a,unstable_mask:o,state:s,target:c,preventScrollReset:u,relative:r,viewTransition:d,unstable_defaultShouldRevalidate:f,unstable_useTransitions:_});function O(t){e&&e(t),t.defaultPrevented||D(t)}let k=!(y.isExternal||i),A=b.createElement(`a`,{...p,...E,href:(k?C:void 0)||y.absoluteURL||x,onClick:k?O:e,ref:Mi(m,T),target:c,"data-discover":!v&&t===`render`?`true`:void 0});return w&&!v?b.createElement(b.Fragment,null,A,b.createElement(Oi,{page:x})):A});zi.displayName=`Link`;var Bi=b.forwardRef(function({"aria-current":e=`page`,caseSensitive:t=!1,className:n=``,end:r=!1,style:i,to:a,viewTransition:o,children:s,...c},l){let u=dr(a,{relative:c.relative}),d=nr(),f=b.useContext(zn),{navigator:p,basename:m}=b.useContext(Gn),h=f!=null&&ra(u)&&o===!0,g=p.encodeLocation?p.encodeLocation(u).pathname:u.pathname,_=d.pathname,v=f&&f.navigation&&f.navigation.location?f.navigation.location.pathname:null;t||(_=_.toLowerCase(),v=v?v.toLowerCase():null,g=g.toLowerCase()),v&&m&&(v=Ne(v,m)||v);let y=g!==`/`&&g.endsWith(`/`)?g.length-1:g.length,x=_===g||!r&&_.startsWith(g)&&_.charAt(y)===`/`,S=v!=null&&(v===g||!r&&v.startsWith(g)&&v.charAt(g.length)===`/`),C={isActive:x,isPending:S,isTransitioning:h},w=x?e:void 0,T;T=typeof n==`function`?n(C):[n,x?`active`:null,S?`pending`:null,h?`transitioning`:null].filter(Boolean).join(` `);let E=typeof i==`function`?i(C):i;return b.createElement(zi,{...c,"aria-current":w,className:T,ref:l,style:E,to:a,viewTransition:o},typeof s==`function`?s(C):s)});Bi.displayName=`NavLink`;var Vi=b.forwardRef(({discover:e=`render`,fetcherKey:t,navigate:n,reloadDocument:r,replace:i,state:a,method:o=qr,action:s,onSubmit:c,relative:l,preventScrollReset:u,viewTransition:d,unstable_defaultShouldRevalidate:f,...p},m)=>{let{unstable_useTransitions:h}=b.useContext(Gn),g=Xi(),_=Zi(s,{relative:l}),v=o.toLowerCase()===`get`?`get`:`post`,y=typeof s==`string`&&Ri.test(s);return b.createElement(`form`,{ref:m,method:v,action:_,onSubmit:r?c:e=>{if(c&&c(e),e.defaultPrevented)return;e.preventDefault();let r=e.nativeEvent.submitter,s=r?.getAttribute(`formmethod`)||o,p=()=>g(r||e.currentTarget,{fetcherKey:t,method:s,navigate:n,replace:i,state:a,relative:l,preventScrollReset:u,viewTransition:d,unstable_defaultShouldRevalidate:f});h&&n!==!1?b.startTransition(()=>p()):p()},...p,"data-discover":!y&&e===`render`?`true`:void 0})});Vi.displayName=`Form`;function Hi({getKey:e,storageKey:t,...n}){let r=b.useContext(wi),{basename:i}=b.useContext(Gn),a=nr(),o=Dr();ta({getKey:e,storageKey:t});let s=b.useMemo(()=>
12{if(!r||!e)return null;let t=ea(a,o,i,e);return t===a.key?null:t},[]);if(!r||r.isSpaMode)return null;let c=((e,t)=>{if(!window.history.state||!window.history.state.key){let e=Math.random().toString(32).slice(2);window.history.replaceState({key:e},``)}try{let n=JSON.parse(sessionStorage.getItem(e)||`{}`)[t||window.history.state.key];typeof n==`number`&&window.scrollTo(0,n)}catch(t){console.error(t),sessionStorage.removeItem(e)}}).toString();return b.createElement(`script`,{...n,suppressHydrationWarning:!0,dangerouslySetInnerHTML:{__html:`(${c})(${ui(JSON.stringify(t||Qi))}, ${ui(JSON.stringify(s))})`}})}Hi.displayName=`ScrollRestoration`;function Ui(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function Wi(e){let t=b.useContext(Rn);return P(t,Ui(e)),t}function Gi(e){let t=b.useContext(zn);return P(t,Ui(e)),t}function Ki(e,{target:t,replace:n,unstable_mask:r,state:i,preventScrollReset:a,relative:o,viewTransition:s,unstable_defaultShouldRevalidate:c,unstable_useTransitions:l}={}){let u=or(),d=nr(),f=dr(e,{relative:o});return b.useCallback(p=>{if(ei(p,t)){p.preventDefault();let t=n===void 0?ne(d)===ne(f):n,m=()=>u(e,{replace:t,unstable_mask:r,state:i,preventScrollReset:a,relative:o,viewTransition:s,unstable_defaultShouldRevalidate:c});l?b.startTransition(()=>m()):m()}},[d,u,f,n,r,i,t,e,a,o,s,c,l])}function qi(e){F(typeof URLSearchParams<`u`,"You cannot use the `useSearchParams` hook in a browser that does not support the URLSearchParams API. If you need to support Internet Explorer 11, we recommend you load a polyfill such as https://github.com/ungap/url-search-params.");let t=b.useRef(ti(e)),n=b.useRef(!1),r=nr(),i=b.useMemo(()=>ni(r.search,n.current?null:t.current),[r.search]),a=or();return[i,b.useCallback((e,t)=>{let r=ti(typeof e==`function`?e(new URLSearchParams(i)):e);n.current=!0,a(`?`+r,t)},[a,i])]}var Ji=0,Yi=()=>`__${String(++Ji)}__`;function Xi(){let{router:e}=Wi(`useSubmit`),{basename:t}=b.useContext(Gn),n=Tr(),r=e.fetch,i=e.navigate;return b.useCallback(async(e,a={})=>{let{action:o,method:s,encType:c,formData:l,body:u}=si(e,t);a.navigate===!1?await r(a.fetcherKey||Yi(),n,a.action||o,{unstable_defaultShouldRevalidate:a.unstable_defaultShouldRevalidate,preventScrollReset:a.preventScrollReset,formData:l,body:u,formMethod:a.method||s,formEncType:a.encType||c,flushSync:a.flushSync}):await i(a.action||o,{unstable_defaultShouldRevalidate:a.unstable_defaultShouldRevalidate,preventScrollReset:a.preventScrollReset,formData:l,body:u,formMethod:a.method||s,formEncType:a.encType||c,replace:a.replace,state:a.state,fromRouteId:n,flushSync:a.flushSync,viewTransition:a.viewTransition})},[r,i,t,n])}function Zi(e,{relative:t}={}){let{basename:n}=b.useContext(Gn),r=b.useContext(qn);P(r,`useFormAction must be used inside a RouteContext`);let[i]=r.matches.slice(-1),a={...dr(e||`.`,{relative:t})},o=nr();if(e==null){a.search=o.search;let e=new URLSearchParams(a.search),t=e.getAll(`index`);if(t.some(e=>e===``)){e.delete(`index`),t.filter(e=>e).forEach(t=>e.append(`index`,t));let n=e.toString();a.search=n?`?${n}`:``}}return(!e||e===`.`)&&i.route.index&&(a.search=a.search?a.search.replace(/^\?/,`?index&`):`?index`),n!==`/`&&(a.pathname=a.pathname===`/`?n:We([n,a.pathname])),ne(a)}var Qi=`react-router-scroll-positions`,$i={};function ea(e,t,n,r){let i=null;return r&&(i=r(n===`/`?e:{...e,pathname:Ne(e.pathname,n)||e.pathname},t)),i??=e.key,i}function ta({getKey:e,storageKey:t}={}){let{router:n}=Wi(`useScrollRestoration`),{restoreScrollPosition:r,preventScrollReset:i}=Gi(`useScrollRestoration`),{basename:a}=b.useContext(Gn),o=nr(),s=Dr(),c=Er();b.useEffect(()=>(window.history.scrollRestoration=`manual`,()=>{window.history.scrollRestoration=`auto`}),[]),na(b.useCallback(()=>{if(c.state===`idle`){let t=ea(o,s,a,e);$i[t]=window.scrollY}try{sessionStorage.setItem(t||Qi,JSON.stringify($i))}catch(e){F(!1,`Failed to save scroll positions in sessionStorage, <ScrollRestoration /> will not work properly (${e}).`)}window.history.scrollRestoration=`auto`},[c.state,e,a,o,s,t])),typeof document<`u`&&(b.useLayoutEffect(()=>{try{let e=sessionStorage.getItem(t||Qi);e&&($i=JSON.parse(e))}catch{}},[t]),b.useLayoutEffect(()=>{let t=n?.enableScrollRestoration($i,()=>window.scrollY,e?(t,n)=>ea(t,n,a,e):void 0);return()=>t&&t()},[n,a,e]),b.useLayoutEffect(()=>{if(r!==!1){if(typeof r==`number`){window.scrollTo(0,r);return}try{if(o.hash){let e=document.getElementById(decodeURIComponent(o.hash.slice(1)));if(e){e.scrollIntoView();return}}}catch{F(!1,`"${o.hash.slice(1)}" is not a decodable element ID. The view will not scroll to it.`)}i!==!0&&window.scrollTo(0,0)}},[o,r,i]))}function na(e,t){let{capture:n}=t||{};b.useEffect(()=>{let t=n==null?void 0:{capture:n};return window.addEventListener(`pagehide`,e,t),()=>{window.removeEventListener(`pagehide`,e,t)}},[e,n])}function ra(e,{relative:t}={}){let n=b.useContext(Hn);P(n!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:r}=Wi(`useViewTransitionState`),i=dr(e,{relative:t});if(!n.isTransitioning)return!1;let a=Ne(n.currentLocation.pathname,r)||n.currentLocation.pathname,o=Ne(n.nextLocation.pathname,r)||n.nextLocation.pathname;return Ae(i.pathname,o)!=null||Ae(i.pathname,a)!=null}function ia(e){return b.createElement(Br,{flushSync:x.flushSync,...e})}var aa=s(((e,t)=>{var n=typeof Element<`u`,r=typeof Map==`function`,i=typeof Set==`function`,a=typeof ArrayBuffer==`function`&&!!ArrayBuffer.isView;function o(e,t){if(e===t)return!0;
12if(e&&t&&typeof e==`object`&&typeof t==`object`){if(e.constructor!==t.constructor)return!1;var s,c,l;if(Array.isArray(e)){if(s=e.length,s!=t.length)return!1;for(c=s;c--!==0;)if(!o(e[c],t[c]))return!1;return!0}var u;if(r&&e instanceof Map&&t instanceof Map){if(e.size!==t.size)return!1;for(u=e.entries();!(c=u.next()).done;)if(!t.has(c.value[0]))return!1;for(u=e.entries();!(c=u.next()).done;)if(!o(c.value[1],t.get(c.value[0])))return!1;return!0}if(i&&e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(u=e.entries();!(c=u.next()).done;)if(!t.has(c.value[0]))return!1;return!0}if(a&&ArrayBuffer.isView(e)&&ArrayBuffer.isView(t)){if(s=e.length,s!=t.length)return!1;for(c=s;c--!==0;)if(e[c]!==t[c])return!1;return!0}if(e.constructor===RegExp)return e.source===t.source&&e.flags===t.flags;if(e.valueOf!==Object.prototype.valueOf&&typeof e.valueOf==`function`&&typeof t.valueOf==`function`)return e.valueOf()===t.valueOf();if(e.toString!==Object.prototype.toString&&typeof e.toString==`function`&&typeof t.toString==`function`)return e.toString()===t.toString();if(l=Object.keys(e),s=l.length,s!==Object.keys(t).length)return!1;for(c=s;c--!==0;)if(!Object.prototype.hasOwnProperty.call(t,l[c]))return!1;if(n&&e instanceof Element)return!1;for(c=s;c--!==0;)if(!((l[c]===`_owner`||l[c]===`__v`||l[c]===`__o`)&&e.$$typeof)&&!o(e[l[c]],t[l[c]]))return!1;return!0}return e!==e&&t!==t}t.exports=function(e,t){try{return o(e,t)}catch(e){if((e.message||``).match(/stack|recursion/i))return console.warn(`react-fast-compare cannot handle circular refs`),!1;throw e}}})),oa=s(((e,t)=>{t.exports=function(e,t,n,r,i,a,o,s){if(!e){var c;if(t===void 0)c=Error(`Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.`);else{var l=[n,r,i,a,o,s],u=0;c=Error(t.replace(/%s/g,function(){return l[u++]})),c.name=`Invariant Violation`}throw c.framesToPop=1,c}}})),sa=s(((e,t)=>{t.exports=function(e,t,n,r){var i=n?n.call(r,e,t):void 0;if(i!==void 0)return!!i;if(e===t)return!0;if(typeof e!=`object`||!e||typeof t!=`object`||!t)return!1;var a=Object.keys(e),o=Object.keys(t);if(a.length!==o.length)return!1;for(var s=Object.prototype.hasOwnProperty.bind(t),c=0;c<a.length;c++){var l=a[c];if(!s(l))return!1;var u=e[l],d=t[l];if(i=n?n.call(r,u,d,l):void 0,i===!1||i===void 0&&u!==d)return!1}return!0}})),ca=u(aa()),la=u(oa()),ua=u(sa()),da=(e=>(e.BASE=`base`,e.BODY=`body`,e.HEAD=`head`,e.HTML=`html`,e.LINK=`link`,e.META=`meta`,e.NOSCRIPT=`noscript`,e.SCRIPT=`script`,e.STYLE=`style`,e.TITLE=`title`,e.FRAGMENT=`Symbol(react.fragment)`,e))(da||{}),fa={link:{rel:[`amphtml`,`canonical`,`alternate`]},script:{type:[`application/ld+json`]},meta:{charset:``,name:[`generator`,`robots`,`description`],property:[`og:type`,`og:title`,`og:url`,`og:image`,`og:image:alt`,`og:description`,`twitter:url`,`twitter:title`,`twitter:description`,`twitter:image`,`twitter:image:alt`,`twitter:card`,`twitter:site`]}},pa=Object.values(da),ma={accesskey:`accessKey`,charset:`charSet`,class:`className`,contenteditable:`contentEditable`,contextmenu:`contextMenu`,"http-equiv":`httpEquiv`,itemprop:`itemProp`,tabindex:`tabIndex`},ha=Object.entries(ma).reduce((e,[t,n])=>(e[n]=t,e),{}),ga=`data-rh`,_a={DEFAULT_TITLE:`defaultTitle`,DEFER:`defer`,ENCODE_SPECIAL_CHARACTERS:`encodeSpecialCharacters`,ON_CHANGE_CLIENT_STATE:`onChangeClientState`,TITLE_TEMPLATE:`titleTemplate`,PRIORITIZE_SEO_TAGS:`prioritizeSeoTags`},va=(e,t)=>{for(let n=e.length-1;n>=0;--n){let r=e[n];if(Object.prototype.hasOwnProperty.call(r,t))return r[t]}return null},ya=e=>{let t=va(e,`title`),n=va(e,_a.TITLE_TEMPLATE);if(Array.isArray(t)&&(t=t.join(``)),n&&t)return n.replace(/%s/g,()=>t);let r=va(e,_a.DEFAULT_TITLE);return t||r||void 0},ba=e=>va(e,_a.ON_CHANGE_CLIENT_STATE)||(()=>{}),xa=(e,t)=>t.filter(t=>t[e]!==void 0).map(t=>t[e]).reduce((e,t)=>({...e,...t}),{}),Sa=(e,t)=>t.filter(e=>e.base!==void 0).map(e=>e.base).reverse().reduce((t,n)=>{if(!t.length){let r=Object.keys(n);for(let i=0;i<r.length;i+=1){let a=r[i].toLowerCase();if(e.indexOf(a)!==-1&&n[a])return t.concat(n)}}return t},[]),Ca=e=>console&&typeof console.warn==`function`&&console.warn(e),wa=(e,t,n)=>{let r={};return n.filter(t=>Array.isArray(t[e])?!0:(t[e]!==void 0&&Ca(`Helmet: ${e} should be of type "Array". Instead found type "${typeof t[e]}"`),!1)).map(t=>t[e]).reverse().reduce((e,n)=>{let i={};n.filter(e=>{let n,a=Object.keys(e);for(let r=0;r<a.length;r+=1){let i=a[r],o=i.toLowerCase();t.indexOf(o)!==-1&&!(n===`rel`&&e[n].toLowerCase()===`canonical`)&&!(o===`rel`&&e[o].toLowerCase()===`stylesheet`)&&(n=o),t.indexOf(i)!==-1&&(i===`innerHTML`||i===`cssText`||i===`itemprop`)&&(n=i)}if(!n||!e[n])return!1;let o=e[n].toLowerCase();return r[n]||(r[n]={}),i[n]||(i[n]={}),r[n][o]?!1:(i[n][o]=!0,!0)}
12).reverse().forEach(t=>e.push(t));let a=Object.keys(i);for(let e=0;e<a.length;e+=1){let t=a[e];r[t]={...r[t],...i[t]}}return e},[]).reverse()},Ta=(e,t)=>{if(Array.isArray(e)&&e.length){for(let n=0;n<e.length;n+=1)if(e[n][t])return!0}return!1},Ea=e=>({baseTag:Sa([`href`],e),bodyAttributes:xa(`bodyAttributes`,e),defer:va(e,_a.DEFER),encode:va(e,_a.ENCODE_SPECIAL_CHARACTERS),htmlAttributes:xa(`htmlAttributes`,e),linkTags:wa(`link`,[`rel`,`href`],e),metaTags:wa(`meta`,[`name`,`charset`,`http-equiv`,`property`,`itemprop`],e),noscriptTags:wa(`noscript`,[`innerHTML`],e),onChangeClientState:ba(e),scriptTags:wa(`script`,[`src`,`innerHTML`],e),styleTags:wa(`style`,[`cssText`],e),title:ya(e),titleAttributes:xa(`titleAttributes`,e),prioritizeSeoTags:Ta(e,_a.PRIORITIZE_SEO_TAGS)}),Da=e=>Array.isArray(e)?e.join(``):e,Oa=(e,t)=>{let n=Object.keys(e);for(let r=0;r<n.length;r+=1)if(t[n[r]]&&t[n[r]].includes(e[n[r]]))return!0;return!1},ka=(e,t)=>Array.isArray(e)?e.reduce((e,n)=>(Oa(n,t)?e.priority.push(n):e.default.push(n),e),{priority:[],default:[]}):{default:e,priority:[]},Aa=(e,t)=>({...e,[t]:void 0}),ja=[`noscript`,`script`,`style`],Ma=(e,t=!0)=>t===!1?String(e):String(e).replace(/&/g,`&`).replace(/</g,`<`).replace(/>/g,`>`).replace(/"/g,`"`).replace(/'/g,`'`),Na=e=>Object.keys(e).reduce((t,n)=>{let r=e[n]===void 0?`${n}`:`${n}="${e[n]}"`;return t?`${t} ${r}`:r},``),Pa=(e,t,n,r)=>{let i=Na(n),a=Da(t);return i?`<${e} ${ga}="true" ${i}>${Ma(a,r)}</${e}>`:`<${e} ${ga}="true">${Ma(a,r)}</${e}>`},Fa=(e,t,n=!0)=>t.reduce((t,r)=>{let i=r,a=Object.keys(i).filter(e=>!(e===`innerHTML`||e===`cssText`)).reduce((e,t)=>{let r=i[t]===void 0?t:`${t}="${Ma(i[t],n)}"`;return e?`${e} ${r}`:r},``),o=i.innerHTML||i.cssText||``;return`${t}<${e} ${ga}="true" ${a}${ja.indexOf(e)===-1?`/>`:`>${o}</${e}>`}`},``),Ia=(e,t={})=>Object.keys(e).reduce((t,n)=>{let r=ma[n];return t[r||n]=e[n],t},t),La=(e,t,n)=>{let r=Ia(n,{key:t,[ga]:!0});return[b.createElement(`title`,r,t)]},Ra=(e,t)=>t.map((t,n)=>{let r={key:n,[ga]:!0};return Object.keys(t).forEach(e=>{let n=ma[e]||e;n===`innerHTML`||n===`cssText`?r.dangerouslySetInnerHTML={__html:t.innerHTML||t.cssText}:r[n]=t[e]}),b.createElement(e,r)}),za=(e,t,n=!0)=>{switch(e){case`title`:return{toComponent:()=>La(e,t.title,t.titleAttributes),toString:()=>Pa(e,t.title,t.titleAttributes,n)};case`bodyAttributes`:case`htmlAttributes`:return{toComponent:()=>Ia(t),toString:()=>Na(t)};default:return{toComponent:()=>Ra(e,t),toString:()=>Fa(e,t,n)}}},Ba=({metaTags:e,linkTags:t,scriptTags:n,encode:r})=>{let i=ka(e,fa.meta),a=ka(t,fa.link),o=ka(n,fa.script);return{priorityMethods:{toComponent:()=>[...Ra(`meta`,i.priority),...Ra(`link`,a.priority),...Ra(`script`,o.priority)],toString:()=>`${za(`meta`,i.priority,r)} ${za(`link`,a.priority,r)} ${za(`script`,o.priority,r)}`},metaTags:i.default,linkTags:a.default,scriptTags:o.default}},Va=e=>{let{baseTag:t,bodyAttributes:n,encode:r=!0,htmlAttributes:i,noscriptTags:a,styleTags:o,title:s=``,titleAttributes:c,prioritizeSeoTags:l}=e,{linkTags:u,metaTags:d,scriptTags:f}=e,p={toComponent:()=>[],toString:()=>``};return l&&({priorityMethods:p,linkTags:u,metaTags:d,scriptTags:f}=Ba(e)),{priority:p,base:za(`base`,t,r),bodyAttributes:za(`bodyAttributes`,n,r),htmlAttributes:za(`htmlAttributes`,i,r),link:za(`link`,u,r),meta:za(`meta`,d,r),noscript:za(`noscript`,a,r),script:za(`script`,f,r),style:za(`style`,o,r),title:za(`title`,{title:s,titleAttributes:c},r)}},Ha=[],Ua=!!(typeof window<`u`&&window.document&&window.document.createElement),Wa=class{instances=[];canUseDOM=Ua;context;value={setHelmet:e=>{this.context.helmet=e},helmetInstances:{get:()=>this.canUseDOM?Ha:this.instances,add:e=>{(this.canUseDOM?Ha:this.instances).push(e)},remove:e=>{let t=(this.canUseDOM?Ha:this.instances).indexOf(e);(this.canUseDOM?Ha:this.instances).splice(t,1)}}};constructor(e,t){this.context=e,this.canUseDOM=t||!1,t||(e.helmet=Va({baseTag:[],bodyAttributes:{},encodeSpecialCharacters:!0,htmlAttributes:{},linkTags:[],metaTags:[],noscriptTags:[],scriptTags:[],styleTags:[],title:``,titleAttributes:{}}))}},Ga=parseInt(`19.2.5`.split(`.`)[0],10)>=19,Ka=b.createContext({}),qa=class e extends b.Component{static canUseDOM=Ua;helmetData;constructor(t){super(t),Ga?this.helmetData=null:this.helmetData=new Wa(this.props.context||{},e.canUseDOM)}render(){return Ga?b.createElement(b.Fragment,null,this.props.children):b.createElement(Ka.Provider,{value:this.helmetData.value},this.props.children)}},Ja=(e,t)=>{let n=document.head||document.querySelector(`head`),r=n.querySelectorAll(`${e}[${ga}]`),i=[].slice.call(r),a=[],o;return t&&t.length&&t.forEach(t=>{let n=document.createElement(e);for(let e in t)if(Object.prototype.hasOwnProperty.call(t,e))if(e===`innerHTML`)n.innerHTML=t.innerHTML;else if(e===`cssText`){let e=t.cssText;n.appendChild(document.createTextNode(e))}else{let r=e,i=t[r]===void 0?``:t[r];n.setAttribute(e,i)}n.setAttribute(ga,`true`),i.some((e,t)=>(o=t,n.isEqualNode(e)))?i.splice(o,1):a.push(n)}
12),i.forEach(e=>e.parentNode?.removeChild(e)),a.forEach(e=>n.appendChild(e)),{oldTags:i,newTags:a}},Ya=(e,t)=>{let n=document.getElementsByTagName(e)[0];if(!n)return;let r=n.getAttribute(ga),i=r?r.split(`,`):[],a=[...i],o=Object.keys(t);for(let e of o){let r=t[e]||``;n.getAttribute(e)!==r&&n.setAttribute(e,r),i.indexOf(e)===-1&&i.push(e);let o=a.indexOf(e);o!==-1&&a.splice(o,1)}for(let e=a.length-1;e>=0;--e)n.removeAttribute(a[e]);i.length===a.length?n.removeAttribute(ga):n.getAttribute(ga)!==o.join(`,`)&&n.setAttribute(ga,o.join(`,`))},Xa=(e,t)=>{e!==void 0&&document.title!==e&&(document.title=Da(e)),Ya(`title`,t)},Za=(e,t)=>{let{baseTag:n,bodyAttributes:r,htmlAttributes:i,linkTags:a,metaTags:o,noscriptTags:s,onChangeClientState:c,scriptTags:l,styleTags:u,title:d,titleAttributes:f}=e;Ya(`body`,r),Ya(`html`,i),Xa(d,f);let p={baseTag:Ja(`base`,n),linkTags:Ja(`link`,a),metaTags:Ja(`meta`,o),noscriptTags:Ja(`noscript`,s),scriptTags:Ja(`script`,l),styleTags:Ja(`style`,u)},m={},h={};Object.keys(p).forEach(e=>{let{newTags:t,oldTags:n}=p[e];t.length&&(m[e]=t),n.length&&(h[e]=p[e].oldTags)}),t&&t(),c(e,m,h)},Qa=null,$a=e=>{Qa&&cancelAnimationFrame(Qa),e.defer?Qa=requestAnimationFrame(()=>{Za(e,()=>{Qa=null})}):(Za(e),Qa=null)},eo=class extends b.Component{rendered=!1;shouldComponentUpdate(e){return!(0,ua.default)(e,this.props)}componentDidUpdate(){this.emitChange()}componentWillUnmount(){let{helmetInstances:e}=this.props.context;e.remove(this),this.emitChange()}emitChange(){let{helmetInstances:e,setHelmet:t}=this.props.context,n=null,r=Ea(e.get().map(e=>{let{context:t,...n}=e.props;return n}));qa.canUseDOM?$a(r):Va&&(n=Va(r)),t(n)}init(){if(this.rendered)return;this.rendered=!0;let{helmetInstances:e}=this.props.context;e.add(this),this.emitChange()}render(){return this.init(),null}},to=[],no=e=>{let t={};for(let n of Object.keys(e))t[ha[n]||n]=e[n];return t},ro=e=>{let t={};for(let n of Object.keys(e)){let r=ma[n];t[r||n]=e[n]}return t},io=(e,t)=>{if(!Ua)return;let n=document.getElementsByTagName(e)[0];if(!n)return;let r=`data-rh-managed`,i=n.getAttribute(r),a=i?i.split(`,`):[],o=Object.keys(t);for(let e of a)o.includes(e)||n.removeAttribute(e);for(let e of o){let r=t[e];r==null||r===!1?n.removeAttribute(e):r===!0?n.setAttribute(e,``):n.setAttribute(e,String(r))}o.length>0?n.setAttribute(r,o.join(`,`)):n.removeAttribute(r)},ao=()=>{let e={},t={};for(let n of to){let{htmlAttributes:r,bodyAttributes:i}=n.props;r&&Object.assign(e,no(r)),i&&Object.assign(t,no(i))}io(`html`,e),io(`body`,t)},oo=class extends b.Component{componentDidMount(){to.push(this),ao()}componentDidUpdate(){ao()}componentWillUnmount(){let e=to.indexOf(this);e!==-1&&to.splice(e,1),ao()}resolveTitle(){let{title:e,titleTemplate:t,defaultTitle:n}=this.props;return e&&t?t.replace(/%s/g,()=>Array.isArray(e)?e.join(``):e):e||n||void 0}renderTitle(){let e=this.resolveTitle();if(e===void 0)return null;let t=this.props.titleAttributes||{};return b.createElement(`title`,ro(t),e)}renderBase(){let{base:e}=this.props;return e?b.createElement(`base`,ro(e)):null}renderMeta(){let{meta:e}=this.props;return!e||!Array.isArray(e)?null:e.map((e,t)=>b.createElement(`meta`,{key:t,...ro(e)}))}renderLink(){let{link:e}=this.props;return!e||!Array.isArray(e)?null:e.map((e,t)=>b.createElement(`link`,{key:t,...ro(e)}))}renderScript(){let{script:e}=this.props;return!e||!Array.isArray(e)?null:e.map((e,t)=>{let{innerHTML:n,...r}=e,i=ro(r);return n&&(i.dangerouslySetInnerHTML={__html:n}),b.createElement(`script`,{key:t,...i})})}renderStyle(){let{style:e}=this.props;return!e||!Array.isArray(e)?null:e.map((e,t)=>{let{cssText:n,...r}=e,i=ro(r);return n&&(i.dangerouslySetInnerHTML={__html:n}),b.createElement(`style`,{key:t,...i})})}renderNoscript(){let{noscript:e}=this.props;return!e||!Array.isArray(e)?null:e.map((e,t)=>{let{innerHTML:n,...r}=e,i=ro(r);return n&&(i.dangerouslySetInnerHTML={__html:n}),b.createElement(`noscript`,{key:t,...i})})}render(){return b.createElement(b.Fragment,null,this.renderTitle(),this.renderBase(),this.renderMeta(),this.renderLink(),this.renderScript(),this.renderStyle(),this.renderNoscript())}},so=class extends b.Component{static defaultProps={defer:!0,encodeSpecialCharacters:!0,prioritizeSeoTags:!1};shouldComponentUpdate(e){return!(0,ca.default)(Aa(this.props,`helmetData`),Aa(e,`helmetData`))}mapNestedChildrenToProps(e,t){if(!t)return null;switch(e.type){case`script`:case`noscript`:return{innerHTML:t};case`style`:return{cssText:t};default:throw Error(`<${e.type} /> elements are self-closing and can not contain children. Refer to our API for more information.`)}}flattenArrayTypeChildren(e,t,n,r){return{...t,[e.type]:[...t[e.type]||[],{...n,...this.mapNestedChildrenToProps(e,r)}]}}mapObjectTypeChildren(e,t,n,r){switch(e.type){case`title`:return{...t,[e.type]:r,titleAttributes:{...n}};case`body`:return{...t,bodyAttributes:{...n}};case`html`:return{...t,htmlAttributes:{...n}};default:return{...t,[e.type]:{...n}}}}mapArrayTypeChildrenToProps(e,t){let n={...t};return Object.keys(e).forEach(t=>{n={...n,[t]:e[t]}}),n}
12warnOnInvalidChildren(e,t){return(0,la.default)(pa.some(t=>e.type===t),typeof e.type==`function`?`You may be attempting to nest <Helmet> components within each other, which is not allowed. Refer to our API for more information.`:`Only elements types ${pa.join(`, `)} are allowed. Helmet does not support rendering <${e.type}> elements. Refer to our API for more information.`),(0,la.default)(!t||typeof t==`string`||Array.isArray(t)&&!t.some(e=>typeof e!=`string`),`Helmet expects a string as a child of <${e.type}>. Did you forget to wrap your children in braces? ( <${e.type}>{\`\`}</${e.type}> ) Refer to our API for more information.`),!0}mapChildrenToProps(e,t){let n={};return b.Children.forEach(e,e=>{if(!e||!e.props)return;let{children:r,...i}=e.props,a=Object.keys(i).reduce((e,t)=>(e[ha[t]||t]=i[t],e),{}),{type:o}=e;switch(typeof o==`symbol`?o=o.toString():this.warnOnInvalidChildren(e,r),o){case`Symbol(react.fragment)`:t=this.mapChildrenToProps(r,t);break;case`link`:case`meta`:case`noscript`:case`script`:case`style`:n=this.flattenArrayTypeChildren(e,n,a,r);break;default:t=this.mapObjectTypeChildren(e,t,a,r);break}}),this.mapArrayTypeChildrenToProps(n,t)}render(){let{children:e,...t}=this.props,n={...t},{helmetData:r}=t;return e&&(n=this.mapChildrenToProps(e,n)),r&&!(r instanceof Wa)&&(r=new Wa(r.context,!0),delete n.helmetData),Ga?b.createElement(oo,{...n}):r?b.createElement(eo,{...n,context:r.value}):b.createElement(Ka.Consumer,null,e=>b.createElement(eo,{...n,context:e}))}},co=3e4;function lo(e){let t={BASE_URL:`/`,DEV:!1,MODE:`production`,PROD:!0,SSR:!1,VITE_API_BASE_URL:`https://instasnag-api-production.up.railway.app`,VITE_GOOGLE_CLIENT_ID:`774437974294-bh1lpii8cv0t821e9m7a5h8ltt7sj0ot.apps.googleusercontent.com`,VITE_GOOGLE_MAPS_API_KEY:`AIzaSyCQV2noEFP4bmLG7ngMLA91aqk9R6bjXWE`,VITE_REVENUECAT_PUBLIC_API_KEY_WEB:`strp_gTdcVBCawkAqVXjzohIMiQcEsRm`,VITE_SITE_URL:`https://instasnag.ai`}[e];return typeof t==`string`?t.trim():``}function uo(e){return e?e.replace(/\/+$/,``):``}var fo={baseUrl:uo(lo(`VITE_API_BASE_URL`)),timeoutMs:Number.parseInt(lo(`VITE_API_TIMEOUT_MS`),10)||co};function po(e){return e===401?`unauthorized`:e===403?`forbidden`:e===404?`not_found`:e===422||e===400?`validation`:e===429?`rate_limited`:e>=500?`server`:`unknown`}function mo(e,t){return t?.message?t.message:e===401?`Unauthorized request`:e===403?`Forbidden request`:e===404?`Requested resource was not found`:e===429?`Too many requests`:e>=500?`Server error`:`Request failed`}var ho=class extends Error{status;type;details;requestId;constructor(e){super(mo(e.status,e.details)),this.name=`ApiError`,this.status=e.status,this.type=po(e.status),this.details=e.details,this.requestId=e.requestId}},go=class extends Error{constructor(e=`Network request failed`){super(e),this.name=`NetworkError`}},_o=class extends Error{constructor(e=`Request timed out`){super(e),this.name=`TimeoutError`}};function vo(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function yo(e){if(!vo(e))return null;let t=e.detail;return vo(t)?t:typeof t==`string`?{message:t}:typeof e.message==`string`?{message:e.message}:null}var bo=`instasnag.access_token`,xo=`instasnag.refresh_token`,So={};function Co(){return typeof window<`u`&&typeof localStorage<`u`}function wo(){return Co()?{accessToken:localStorage.getItem(bo)??void 0,refreshToken:localStorage.getItem(xo)??void 0}:{}}function To(e){Co()&&(e.accessToken?localStorage.setItem(bo,e.accessToken):localStorage.removeItem(bo),e.refreshToken?localStorage.setItem(xo,e.refreshToken):localStorage.removeItem(xo))}var Eo={getAccessToken(){return So.accessToken??wo().accessToken??null},getRefreshToken(){return So.refreshToken??wo().refreshToken??null},setTokens(e){So=e,To(e)},clear(){So={},To({})}},Do={"Content-Type":`application/json`,Accept:`application/json`},Oo=null,ko=null;function Ao(e,t){if(!t)return e;let n=new URLSearchParams;Object.entries(t).forEach(([e,t])=>{t!==void 0&&n.set(e,String(t))});let r=n.toString();return r?`${e}?${r}`:e}function jo(e,t){let n=e.startsWith(`/`)?e:`/${e}`;if(!fo.baseUrl)throw Error(`VITE_API_BASE_URL is not configured`);return`${fo.baseUrl}${Ao(n,t)}`}function Mo(e){let t=new Headers;if(e.rawBody||t.set(`Content-Type`,Do[`Content-Type`]),t.set(`Accept`,Do.Accept),e.headers&&Object.entries(e.headers).forEac
12h(([e,n])=>{t.set(e,n)}),!e.skipAuth){let e=Eo.getAccessToken();e&&t.set(`Authorization`,`Bearer ${e}`)}return t}async function No(e){if(e.status===204||e.status===205||!e.headers.get(`content-type`)?.includes(`application/json`))return null;let t=await e.text();if(!t.trim())return null;try{return JSON.parse(t)}catch{return null}}async function Po(e,t={},n=!1){let r=new AbortController,i=t.timeoutMs??fo.timeoutMs,a=window.setTimeout(()=>r.abort(),i),o=t.signal??r.signal;try{let r=await fetch(jo(e,t.query),{method:t.method??`GET`,headers:Mo(t),body:t.rawBody??(t.body?JSON.stringify(t.body):void 0),signal:o}),i=await No(r);if(!r.ok){if(r.status===401&&!t.skipRefresh&&!n&&(!e.startsWith(`/api/auth/`)||e===`/api/auth/me`||e===`/api/auth/logout`))return await Io(),Po(e,t,!0);throw r.status===401&&(Eo.clear(),ko?.()),new ho({status:r.status,details:yo(i),requestId:r.headers.get(`x-request-id`)})}return{data:i,status:r.status}}catch(e){throw e instanceof ho?e:e instanceof DOMException&&e.name===`AbortError`?new _o:new go(e instanceof Error?e.message:void 0)}finally{window.clearTimeout(a)}}async function Fo(){let e=Eo.getRefreshToken();if(!e)throw new ho({status:401,details:{error:`missing_refresh_token`,message:`Missing refresh token`},requestId:null});await new Promise(e=>setTimeout(e,Math.random()*50));let t=Eo.getRefreshToken(),n=Eo.getAccessToken();if(t&&t!==e&&n)return{accessToken:n,refreshToken:t};try{let t=await Po(`/api/auth/refresh`,{method:`POST`,body:{refresh_token:e},skipAuth:!0,skipRefresh:!0},!0),n={accessToken:t.data.access_token,refreshToken:t.data.refresh_token};return Eo.setTokens(n),n}catch(t){await new Promise(e=>setTimeout(e,50));let n=Eo.getRefreshToken(),r=Eo.getAccessToken();if(n&&n!==e&&r)return{accessToken:r,refreshToken:n};throw t}}async function Io(){return Oo||=Fo().catch(e=>{throw Eo.clear(),ko?.(),e}).finally(()=>{Oo=null}),Oo}var Lo={get(e,t){return Po(e,{...t,method:`GET`})},post(e,t,n){return Po(e,{...n,method:`POST`,body:t})},put(e,t,n){return Po(e,{...n,method:`PUT`,body:t})}
12,patch(e,t,n){return Po(e,{...n,method:`PATCH`,body:t})},delete(e,t){return Po(e,{...t,method:`DELETE`})},setOnUnauthorized(e){ko=e}};async function Ro(e){return(await Lo.post(`/api/contact/`,e,{skipAuth:!0})).data}function zo(e,t){return e instanceof ho?e.type===`rate_limited`?t(`contact.errorRateLimited`):e.type===`validation`?e.message:e.type===`server`?t(`contact.errorServer`):e.message||t(`contact.errorGeneric`):e instanceof go||e instanceof _o?t(`contact.errorNetwork`):t(`contact.errorGeneric`)}function Bo(e,t={}){return Lo.get(`/api/searches/${e}/conversations`,{query:{page:t.page??1,page_size:t.page_size??20}}).then(e=>e.data)}function Vo(e={}){let t=e.q?.trim();return Lo.get(`/api/conversations/`,{query:{page:e.page??1,per_page:e.per_page??50,...t?{q:t}:{}}}).then(e=>e.data)}function Ho(e,t={}){return Lo.get(`/api/conversations/${e}`,{query:{page:t.page??1,per_page:t.per_page??50,before:t.before}}).then(e=>e.data)}function Uo(e,t){return Lo.post(`/api/conversations/${e}/messages`,{content:t}).then(e=>e.data)}function Wo(e,t){return Lo.post(`/api/conversations/start`,{listing_id:e,...t?{message:t}:{}}).then(e=>e.data)}function Go(e,t){return Lo.put(`/api/conversations/${e}/ai-config`,t).then(e=>e.data)}function Ko(e){return e.marketplace_status?e.marketplace_status:e.is_available===!1?`unavailable`:`available`}function qo(e){return{id:String(e.id),provider:e.provider??null,location_label:e.location_label??null,city_distance:e.city_distance??null,title:e.title??null,price:e.price??null,currency_symbol:e.currency_symbol??null,url:e.url??null,primary_image_url:e.primary_image_url??null,images:e.images??null,year:e.year??null,mileage:e.mileage??null,radius:e.radius??null,condition:e.condition??null,listed_at:e.listed_at??null,found_at:e.found_at??null,is_new:e.is_new??!1,is_favorite:e.is_favorite??!1,description:e.description??null,seller_phones:e.seller_phones??null,valuation:e.valuation??null,transmission_type:e.transmission_type??null,fuel_type:e.fuel_type??null,exterior_color:e.exterior_color??null,interior_color:e.interior_color??null,can_refresh_from_facebook:e.can_refresh_from_facebook??!1,refresh_available_at:e.refresh_available_at??null,is_available:e.is_available??!0,marketplace_status:Ko(e)}}function Jo(e){return e.map(qo)}function Yo(e){return Lo.post(`/api/listings/${e}/share-link`).then(e=>e.data)}function Xo(e){if(e instanceof ho){let t=e.details;if(t?.error===`subscription_required`)return typeof t.message==`string`&&t.message||`Active subscription required to share listings.`;if(t?.error===`listing_not_found`)return`Listing not found.`;if(e.status>=500)return`Could not create share link. Please try again.`;if(typeof t?.message==`string`)return t.message}return`Could not create share link. Please try again.`}function Zo(e){return Lo.post(`/api/listings/${e}/mark-seen`).then(()=>void 0)}function Qo(e){return Lo.post(`/api/listings/${e}/refresh-from-facebook`).then(e=>({payload:e.data,summary:qo(e.data),refreshSkipped:e.data.refresh_skipped===!0}))}function $o(e){if(e instanceof ho){let t=e.details;if(t?.error===`refresh_cooldown`){let e=typeof t.refresh_available_at==`string`?t.refresh_available_at:null;if(e){let t=new Date(e);if(!Number.isNaN(t.getTime()))return`This listing was refreshed recently. Try again after ${t.toLocaleString()}.`}return typeof t.message==`string`&&t.message||`This listing was refreshed recently. Please try again later.`}if(t?.error===`listing_unavailable`)return typeof t.message==`string`&&t.message||`This listing is no longer available on Facebook.`;if(t?.error===`scraper_failed`)return typeof t.message==`string`&&t.message||`Could not fetch the latest data from Facebook.`;if(t?.error===`provider_not_supported`)return`Only Facebook listings can be resynced.`;if(e.status===404)return`Listing not found.`;if(typeof t?.message==`string`)return t.message}return`Could not refresh this listing. Please try again.`}var es=/(?:https?:\/\/)?(?:www\.)?facebook\.com\/marketplace\/item\/(\d+)\/?/i,ts=13,ns=18;function rs(e){let t=e.trim();return t?/^\d+$/.test(t)?t:es.exec(t)?.[1]??null:null}function is(e){return e.length>=ts&&e.length<=ns}function as(e){let t=e.trim();return/^https?:\/\//i.test(t)||(t=`https://${t.replace(/^\/+/,``)}`),t}
12function os(e,t=`item`){let n=e.trim(),r=rs(n);return!r||!is(r)?null:{providerItemId:r,url:n.toLowerCase().includes(`facebook.com/marketplace`)?as(n):null,listingType:t}}function ss(e){return{provider_item_id:e.providerItemId,provider:`facebook`,listing_type:e.listingType,...e.url?{url:e.url}:{}}}var cs={placeholder:`Facebook Marketplace URL or listing ID`,exampleUrl:`https://www.facebook.com/marketplace/item/1530928475510293/`,exampleId:`1530928475510293`,idLengthRange:`${ts}â${ns} digits`},ls=9e4;function us(e={}){return Lo.get(`/api/personal-listings/`,{query:{page:e.page??1,page_size:e.page_size??20,search:e.search,status:e.status}}).then(e=>e.data)}function ds(e){return Lo.get(`/api/personal-listings/${e}`).then(e=>e.data)}function fs(e,t){let n=new FormData;n.append(`data`,JSON.stringify(e));for(let e of t)n.append(`images`,e);return n}function ps(e,t){return Lo.post(`/api/personal-listings/manual`,void 0,{rawBody:fs(e,t),timeoutMs:ls}).then(e=>e.data)}function ms(e,t,n=[]){return Lo.put(`/api/personal-listings/${e}/manual`,void 0,{rawBody:fs(t,n),timeoutMs:ls}).then(e=>e.data)}function hs(e,t){return Lo.put(`/api/personal-listings/${e}/repost-config`,t).then(e=>e.data)}function gs(e,t){return Lo.post(`/api/personal-listings/${e}/repost-config/enable`,t??{}).then(e=>e.data)}function _s(e){return Lo.post(`/api/personal-listings/${e}/repost-config/disable`).then(e=>e.data)}function vs(e){return e instanceof ho?typeof e.details?.message==`string`&&e.details.message||e.message||`Could not save listing.`:e instanceof go?`Unable to reach the server. Check your connection and try again.`:e instanceof _o?`Saving the listing timed out. Please try again.`:`Could not save listing. Please try again.`}function ys(e){if(e instanceof ho){let t=typeof e.details?.error==`string`?e.details.error:null;return t===`repost_not_available`?`The repost add-on is required for this feature.`:t===`repost_config_incomplete`?`Complete all required listing fields before enabling repost.`:typeof e.details?.message==`string`&&e.details.message||e.message||`Could not update repost settings.`}return e instanceof go?`Unable to reach the server. Check your connection and try again.`:`Could not update repost settings. Please try again.`}function bs(e){let t=`providerItemId`in e?ss(e):ss({providerItemId:e.provider_item_id,url:e.url??null,listingType:e.listing_type});return Lo.post(`/api/personal-listings/`,t,{timeoutMs:ls}).then(e=>e.data)}function xs(e){if(e instanceof _o)return`Adding the listing timed out while fetching details from Facebook. Try again in a moment.`;if(e instanceof go)return`Unable to reach the server. Check your connection and try again.`;if(e instanceof ho){let t=e.details?.message;if(typeof e.details?.error==`string`&&e.details.error,t)return t;if(e.status===401)return`Please sign in again.`;if(e.status===403)return`An active subscription is required to add listings.`;if(e.status===409)return`This listing is already in your account.`;if(e.status===400)return`Could not fetch listing details from Facebook. Check the URL or ID and try again.`;if(e.status>=500)return`Server error while adding the listing. Please try again.`}return`Failed to add listing. Please try again.`}function Ss(e,t){return Lo.put(`/api/personal-listings/${e}/status`,{status:t}).then(e=>e.data)}function Cs(e,t){return Lo.put(`/api/personal-listings/${e}/ai-config`,t).then(e=>e.data)}function ws(e){return Lo.delete(`/api/personal-listings/${e}`).then(()=>void 0)}function Ts(e){return e instanceof ho?e.details?.message??`Could not update listing status.`:e instanceof go?`Unable to reach the server. Check your connection and try again.`:`Could not update listing status. Please try again.`}function Es(e){return e instanceof ho?e.details?.message??`Could not delete this listing.`:e instanceof go?`Unable to reach the server. Check your connection and try again.`:`Could not delete this listing. Please try again.`}function Ds(){return Lo.get(`/api/seller-addresses/`).then(e=>e.data)}function Os(e){return Lo.post(`/api/seller-addresses/`,e).then(e=>e.data)}function ks(e,t){return Lo.put(`/api/seller-addresses/${e}`,t).then(e=>e.data)}function As(e){return Lo.delete(`/api/seller-addresses/${e}`).then(()=>void 0)}function js(e){return ks(e,{is_default:!0})}function Ms(e,t){return e instanceof ho?e.message||t:e instanceof _o?`The request timed out. Please try again.`:e instanceof go?`Unable to reach the server. Check your connection and try again.`:t}function Ns(e){return Ms(e,`Something went wrong while loading meetup locations.`)}function Ps(e){return Ms(e,`Something went wrong while saving the meetup location.`)}function Fs(e){return Ms(e,`Something went wrong while deleting the meetup location.`)}function Is(){return Lo.get(`/api/user-availabilities/`).then(e=>e.data)}function Ls(e){return Lo.post(`/api/user-availabilities/`,e).then(e=>e.data)}function Rs(e,t){return Lo.put(`/api/user-availabilities/${e}`,t).then(e=>e.data)}function zs(e){return Lo.delete(`/api/user-availabilities/${e}`).then(()=>void 0)}function Bs(e){return Rs(e,{is_default:!0})}function Vs(e,t){return e instanceof ho?e.message||t:e instanceof _o?`The request timed out. Please try again.`:e instanceof go?`Unable to reach the server. Check your connection and try again.`:t}function Hs(e){return Vs(e,`Something went wrong while loading availability profiles.`)}function Us(e){return Vs(e,`Something went wrong while saving the availability profile.`)}function Ws(e){return Vs(e,`Something went wrong while deleting the availability profile.`)}function Gs(){return Lo.get(`/api/users/me/oauth-accounts`).then(e=>e.data)}function Ks(e){return Lo.post(`/api/users/me/oauth-accounts/link`,e).then(e=>e.data)}function qs(e){return Lo.delete(`/api/users/me/oauth-accounts/${e}`).then(e=>e.data)}function Js(e,t){return e instanceof ho?e.message||t:e instanceof _o?`The request timed out. Please try again.`:e instanceof go?`Unable to reach the server. Check your connection and try again.`:t}function Ys(e){return Js(e,`Something went wrong while loading linked accounts.`)}function Xs(e){return e instanceof ho?e.details?.error===`cannot_unlink_last_account`?`Set a password on your account before unlinking your last sign-in method.`:e.message||`Something went wrong while unlinking this account.`:Js(e,`Something went wrong while unlinking this account.`)}
12var Zs=class extends Error{kind;constructor(e,t){super(t),this.name=`PublicListingFetchError`,this.kind=e}};function Qs(e){let t=encodeURIComponent(e);return Lo.get(`/api/public/listings/${t}`,{skipAuth:!0}).then(e=>e.data).catch(e=>{if(e instanceof ho){let t=typeof e.details?.error==`string`?e.details.error:null;if(e.status===410||t===`share_link_expired`)throw new Zs(`expired`,`This share link has expired.`);if(t===`share_link_invalid`)throw new Zs(`invalid`,`This share link is invalid.`);if(e.status===404||t===`listing_not_found`)throw new Zs(`not_found`,`This listing is no longer available.`);if(e.status>=500)throw new Zs(`unknown`,`Unable to load this listing right now. Please try again.`);if(typeof e.details?.message==`string`)throw new Zs(`unknown`,e.details.message)}throw new Zs(`network`,`Unable to load this listing. Check your connection and try again.`)})}var R=`u`>typeof window?window:void 0,$s=`u`>typeof globalThis?globalThis:R,ec=$s?.navigator,tc=$s?.document,nc=$s?.location,rc=$s?.fetch,ic=$s?.XMLHttpRequest&&`withCredentials`in new $s.XMLHttpRequest?$s.XMLHttpRequest:void 0,ac=$s?.AbortController,oc=$s?.CompressionStream,sc=ec?.userAgent;function cc(){return!(!R||!1===R.navigator.onLine)}var lc=typeof globalThis<`u`?globalThis:R;lc&&typeof self>`u`&&(lc.self=lc),lc&&typeof File>`u`&&(lc.File=function(){});var uc=R??{},dc=`0.9.0`,fc={DEBUG:!1,LIB_VERSION:dc,LIB_NAME:`browser-common`,JS_SDK_VERSION:dc},pc=function(e){return e.AnonymousId=`anonymous_id`,e.DistinctId=`distinct_id`,e.Props=`props`,e.EnablePersonProcessing=`enable_person_processing`,e.PersonMode=`person_mode`,e.FeatureFlagDetails=`feature_flag_details`,e.FeatureFlags=`feature_flags`,e.FeatureFlagPayloads=`feature_flag_payloads`,e.BootstrapFeatureFlagDetails=`bootstrap_feature_flag_details`,e.BootstrapFeatureFlags=`bootstrap_feature_flags`,e.BootstrapFeatureFlagPayloads=`bootstrap_feature_flag_payloads`,e.OverrideFeatureFlags=`override_feature_flags`,e.Queue=`queue`,e.AiQueue=`ai_queue`,e.AiCaptureQueue=`ai_capture_queue`,e.LogsQueue=`logs_queue`,e.OptedOut=`opted_out`,e.SessionId=`session_id`,e.SessionStartTimestamp=`session_start_timestamp`,e.SessionLastTimestamp=`session_timestamp`,e.PersonProperties=`person_properties`,e.GroupProperties=`group_properties`,e.InstalledAppBuild=`installed_app_build`,e.InstalledAppVersion=`installed_app_version`,e.SessionReplay=`session_replay`,e.PushRegistered=`push_registered`,e.SessionReplayEventTriggerActivatedSession=`session_replay_event_trigger_activated_session`,e.SurveyLastSeenDate=`survey_last_seen_date`,e.SurveysInProgress=`surveys_in_progress`,e.SurveysSeen=`surveys_seen`,e.Surveys=`surveys`,e.RemoteConfig=`remote_config`,e.FlagsEndpointWasHit=`flags_endpoint_was_hit`,e.DeviceId=`device_id`,e}({}),mc=function(e){return e.GZipJS=`gzip-js`,e.Base64=`base64`,e}({}),hc=[`$snapshot`,`$pageview`,`$pageleave`,`$set`,`survey dismissed`,`survey sent`,`survey shown`,`$identify`,`$groupidentify`,`$create_alias`,`$$client_ingestion_warning`,`$web_experiment_applied`,`$feature_enrollment_update`,`$feature_flag_called`],gc=[`token`];function _c(e,t){return e.indexOf(t)!==-1}var vc=function(e){return e.trim()},yc=function(e){return e.replace(/^\$/,``)};function bc(e){let t=[];return JSON.stringify(e,function(e,n){if(typeof n==`bigint`)return n.toString();if(typeof n!=`function`&&typeof n!=`symbol`){if(n instanceof Error)return{name:n.name,message:n.message,stack:n.stack};if(n&&typeof n==`object`){for(;t.length>0&&t[t.length-1]!==this;)t.pop();if(t.includes(n))return`[Circular]`;t.push(n)}return n}})??`null`}var xc=Object.prototype,Sc=xc.hasOwnProperty,Cc=xc.toString,wc=Array.isArray||function(e){return Cc.call(e)===`[object Array]`},Tc=e=>typeof e==`function`,Ec=e=>e===Object(e)&&!wc(e),Dc=e=>{if(Ec(e)){for(let t in e)if(Sc.call(e,t))return!1;return!0}return!1},z=e=>e===void 0,Oc=e=>Cc.call(e)==`[object String]`,kc=e=>Oc(e)&&e.trim().length===0,Ac=e=>e===null,jc=e=>z(e)||Ac(e),Mc=e=>Cc.call(e)==`[object Number]`&&e==e,Nc=e=>Mc(e)&&e>0,Pc=e=>Cc.call(e)===`[object Boolean]`,Fc=e=>_c(hc,e),Ic=e=>_c(gc,e);function Lc(e){return typeof e!=`object`||!e}function Rc(e,t){return{}.toString.call(e)===`[object ${t}]`}function zc(e){switch({}
12.toString.call(e)){case`[object Error]`:case`[object Exception]`:case`[object DOMException]`:case`[object DOMError]`:case`[object WebAssembly.Exception]`:return!0;default:return Vc(e,Error)}}function Bc(e){return`u`>typeof Event&&Vc(e,Event)}function Vc(e,t){try{return e instanceof t}catch{return!1}}var Hc=[!0,`true`,1,`1`,`yes`],Uc=e=>_c(Hc,e),Wc=[!1,`false`,0,`0`,`no`];function Gc(e,t,n,r,i,a,o){try{var s=e[a](o),c=s.value}catch(e){n(e);return}s.done?t(c):Promise.resolve(c).then(r,i)}function Kc(e){return function(){var t=this,n=arguments;return new Promise(function(r,i){var a=e.apply(t,n);function o(e){Gc(a,r,i,o,s,`next`,e)}function s(e){Gc(a,r,i,o,s,`throw`,e)}o(void 0)})}}var qc=`amazonbot,amazonproductbot,app.hypefactors.com,applebot,archive.org_bot,awariobot,backlinksextendedbot,baiduspider,bingbot,bingpreview,chrome-lighthouse,dataforseobot,deepscan,duckduckbot,facebookexternal,facebookcatalog,http://yandex.com/bots,hubspot,ia_archiver,leikibot,linkedinbot,meta-externalagent,mj12bot,msnbot,nessus,petalbot,pinterestbot,prerender,rogerbot,screaming frog,sebot-wa,sitebulb,slackbot,slurp,trendictionbot,turnitin,twitterbot,vercel-screenshot,vercelbot,yahoo! slurp,yandexbot,zoombot,bot.htm,bot.php,(bot;,bot/,crawler,ahrefsbot,ahrefssiteaudit,semrushbot,siteauditbot,splitsignalbot,gptbot,oai-searchbot,chatgpt-user,perplexitybot,better uptime bot,sentryuptimebot,uptimerobot,headlesschrome,cypress,google-hoteladsverifier,adsbot-google,apis-google,duplexweb-google,feedfetcher-google,google favicon,google web preview,google-read-aloud,googlebot,googleother,google-cloudvertexbot,googleweblight,mediapartners-google,storebot-google,google-inspectiontool,bytespider`.split(`,`),Jc=function(e,t=[]){if(!e)return!1;let n=e.toLowerCase();return qc.concat(t).some(e=>{let t=e.toLowerCase();return n.indexOf(t)!==-1})};function Yc(e,t,n,r,i){return t>n&&(r.warn(`min cannot be greater than max.`),t=n),Mc(e)?e>n?(r.warn(` cannot be greater than max: `+n+`. Using max value instead.`),n):t>e?(r.warn(` cannot be less than min: `+t+`. Using min value instead.`),t):e:(r.warn(` must be a number. using max or fallback. max: `+n+`, fallback: `+i),Yc(i??n,t,n,r))}var Xc=class{constructor(e){this.C={},this.I=e.I,this.R=Yc(e.bucketSize,0,100,e.$),this.A=Yc(e.refillRate,0,this.R,e.$),this.O=Yc(e.refillInterval,0,864e5,e.$)}F(e,t){let n=Math.floor((t-e.lastAccess)/this.O);n>0&&(e.tokens=Math.min(e.tokens+n*this.A,this.R),e.lastAccess+=n*this.O)}consumeRateLimit(e){var t;let n=Date.now(),r=String(e),i=this.C[r];return i?this.F(i,n):(i={tokens:this.R,lastAccess:n},this.C[r]=i),i.tokens===0||(i.tokens--,i.tokens===0&&((t=this.I)==null||t.call(this,e)),i.tokens===0)}stop(){this.C={}}},Zc=`Mobile`,Qc=`Android`,$c=`Tablet`,el=`Android Tablet`,tl=`iPad`,nl=`Apple Watch`,rl=`Safari`,il=`BlackBerry`,al=`Samsung Internet`,ol=`Chrome`,sl=`Chrome iOS`,cl=`Internet Explorer`,ll=`Internet Explorer Mobile`,ul=`Opera`,dl=`Microsoft Edge`,fl=`Firefox`,pl=`Firefox iOS`,ml=`Nintendo`,hl=`PlayStation`,gl=`Xbox`,_l=`Android Mobile`,vl=`Mobile Safari`,yl=`Windows`,bl=`Windows Phone`,xl=`Nokia`,Sl=`Ouya`,Cl=`Generic `+Zc.toLowerCase(),wl=`Generic `+$c.toLowerCase(),Tl=`Konqueror`,El=`Oculus Browser`,Dl=`Vivaldi`,Ol=`Yandex`,kl=`Whale`,Al=`DuckDuckGo`,jl=`Pale Moon`,Ml=`Waterfox`,Nl=`Brave`,Pl=`Claude`,Fl=`Codex`,Il=`ChatGPT`,Ll=`Google Search App`,Rl=RegExp(`Version/(\\d+(\\.\\d+)?)`),zl=RegExp(`(Claude|Codex|ChatGPT)\\/(\\d+(\\.\\d+)?)`),Bl=new RegExp(gl,`i`),Vl=RegExp(`PlayStation \\w+`,`i`),Hl=RegExp(`Nintendo \\w+`,`i`),Ul=RegExp(`BlackBerry|PlayBook|BB10`,`i`),Wl={"NT3.51":`NT 3.11`,"NT4.0":`NT 4.0`,"5.0":`2000`,5.1:`XP`,5.2:`XP`,"6.0":`Vista`,6.1:`7`,6.2:`8`,6.3:`8.1`,6.4:`10`,"10.0":`10`},Gl=function(e,t,n,r){return t||=``,function(e){return e?.brave?Nl:null}(n)||(r?.detectGoogleSearchApp&&_c(e,`GSA/`)?Ll:_c(e,` OPR/`)&&_c(e,`Mini`)?`Opera Mini`:_c(e,` OPR/`)?ul:Ul.test(e)?il:_c(e,`IEMobile`)||_c(e,`WPDesktop`)?ll:_c(e,`OculusBrowser`)?El:_c(e,`SamsungBrowser`)?al:_c(e,`Edge`)||_c(e,`Edg/`)?dl:_c(e,`Vivaldi/`)?Dl:_c(e,`YaBrowser/`)?Ol:_c(e,`Whale/`)?kl:_c(e,`DuckDuckGo/`)||_c(e,`Ddg/`)?Al:_c(e,`Claude/`)?Pl:_c(e,`Codex/`)?Fl:_c(e,`ChatGPT/`)?Il:_c(e,`FBIOS`)?`Facebook Mobile`:_c(e,`UCWEB`)||_c(e,`UCBrowser`)?`UC Browser`:_c(e,`CriOS`)?sl:_c(e,`CrMo`)||_c(e,ol)?ol:_c(e,Qc)&&_c(e,rl)?_l:_c(e,`FxiOS`)?pl:_c(e.toLowerCase(),Tl.toLowerCase())?Tl:_c(e,`Brave/`)?Nl:((e,t)=>t&&_c(t,`Apple`)||function(e){return _c(e,rl)&&!_c(e,ol)&&!_c(e,Qc)}(e))(e,t)?_c(e,Zc)?vl:rl:_c(e,`PaleMoon/`)?jl:_c(e,`Waterfox/`)?Ml:_c(e,fl)?fl:_c(e,`MSIE`)||_c(e,`Trident/`)?cl:_c(e,`Gecko`)?fl:``)},Kl={[ll]:[RegExp(`rv:(\\d+(\\.\\d+)?)`)],[dl]:[RegExp(`Edge?\\/(\\d+(\\.\\d+)?)`)],[ol]:[RegExp(`(Chrome|CrMo)\\/(\\d+(\\.\\d+)?)`)],[sl]:[RegExp(`CriOS\\/(\\d+(\\.\\d+)?)`)],"UC Browser":[RegExp(`(UCBrowser|UCWEB)\\/(\\d+(\\.\\d+)?)`)],[rl]:[Rl],[vl]:[Rl],[ul]:[RegExp(`(Opera|OPR)\\/(\\d+(\\.\\d+)?)`)],[fl]:[RegExp(`Firefox\\/(\\d+(\\.\\d+)?)`)],[pl]:[RegExp(`FxiOS\\/(\\d+(\\.\\d+)?)`)],[Tl]:[RegExp(`Konqueror[:/]?(\\d+(\\.\\d+)?)`,`i`)],[il]:[RegExp(`BlackBerry (\\d+(\\.\\d+)?)`),Rl],[_l]:[RegExp(`android\\s(\\d+(\\.\\d+)?)`,`i`)],[al]:[RegExp(`SamsungBrowser\\/(\\d+(\\.\\d+)?)`)],[El]:[RegExp(`OculusBrowser\\/(\\d+(\\.\\d+)?)`)],[Dl]:[RegExp(`Vivaldi\\/(\\d+(\\.\\d+)?)`)],[Ol]:[RegExp(`YaBrowser\\/(\\d+(\\.\\d+)?)`)],[kl]:[RegExp(`Whale\\/(\\d+(\\.\\d+)?)`)],[Nl]:[RegExp(`Brave\\/(\\d+(\\.\\d+)?)`)],[Pl]:[zl],[Fl]:[zl],[Il]:[zl],[Al]:[RegExp(`(DuckDuckGo|Ddg)\\/(\\d+(\\.\\d+)?)`)],[jl]:[RegExp(`PaleMoon\\/(\\d+(\\.\\d+)?)`)],[Ml]:[RegExp(`Waterfox\\/(\\d+(\\.\\d+)?)`)],[Ll]:[RegExp(`GSA\\/(\\d+(\\.\\d+)?)`)],[cl]:[RegExp(`(rv:|MSIE )(\\d+(\\.\\d+)?)`)],Mozilla:[RegExp(`rv:(\\d+(\\.\\d+)?)`)]},ql=function(e,t,n,r){let i=Kl[Gl(e,t,n,r)];if(z(i))return null;for(let t=0;i.length>t;t++){let n=e.match(i[t]);if(n)return parseFloat(n[n.length-2])}return null},Jl=[[RegExp(`Xbox; Xbox (.*?)[);]`,`i`),e=>[gl,e&&e[1]||``]],[new RegExp(ml,`i`),[ml,``]],[new RegExp(hl,`i`),[hl,``]],[Ul,[il,``]],[new RegExp(yl,`i`),(e,t)=>{if(/Phone/.test(t)||/WPDesktop/.test(t))return[bl,``];if(new RegExp(Zc).test(t)&&!/IEMobile\b/.test(t))return[`Windows Mobile`,``];let n=/Windows NT ([0-9.]+)/i.exec(t);if(n&&n[1]){let e=Wl[n[1]]||``;return/arm/i.test(t)&&(e=`RT`),[yl,e]}return[yl,``]}],[/((iPhone|iPad|iPod).*?OS (\d+)_(\d+)_?(\d+)?|iPhone)/,e=>e&&e[3]?[`iOS`,[e[3],e[4],e[5]||`0`].join(`.`)]:[`iOS`,``]],[/(watch.*\/(\d+\.\d+\.\d+)|watch os,(\d+\.\d+),)/i,e=>{let t=``;return e&&e.length>=3&&(t=z(e[2])?e[3]:e[2]),[`watchOS`,t]}],[RegExp(`(Android (\\d+)\\.(\\d+)\\.?(\\d+)?|Android)`,`i`),e=>e&&e[2]?[Qc,[e[2],e[3],e[4]||`0`].join(`.`)]:[Qc,``]],[/Mac OS X (\d+)[_.](\d+)[_.]?(\d+)?/i,e=>{let t=[`Mac OS X`,``];return e&&e[1]&&(t[1]=[e[1],e[2],e[3]||`0`].join(`.`)),t}],[/Mac/i,[`Mac OS X`,``]],[/CrOS/,[`Chrome OS`,``]],[/Linux|debian/i,[`Linux`,``]]],Yl=function(e){for(let t=0;Jl.length>t;t++){let[n,r]=Jl[t],i=n.exec(e),a=i&&(Tc(r)?r(i,e):r);if(a)return a}return[``,``]},Xl=function(e){return Hl.test(e)?ml:Vl.test(e)?hl:Bl.test(e)?gl:new RegExp(Sl,`i`).test(e)?Sl:RegExp(`(Windows Phone|WPDesktop)`,`i`).test(e)?bl:/iPad/.test(e)?tl:/iPod/.test(e)?`iPod Touch`:/iPhone/.test(e)?`iPhone`:/(watch)(?: ?os[,/]|\d,\d\/)[\d.]+/i.test(e)?nl:Ul.test(e)?il:/(kobo)\s(ereader|touch)/i.test(e)?`Kobo`:new RegExp(xl,`i`).test(e)?xl:/(kf[a-z]{2}wi|aeo[c-r]{2})( bui|\))/i.test(e)||/(kf[a-z]+)( bui|\)).+silk\//i.test(e)?`Kindle Fire`:/(Android|ZTE)/i.test(e)?new RegExp(Zc).test(e)&&!/(9138B|TB782B|Nexus [97]|pixel c|HUAWEISHT|BTV|noble nook|smart ultra 6)/i.test(e)||/pixel[\daxl ]{1,6}/i.test(e)&&!/pixel c/i.test(e)||/(huaweimed-al00|tah-|APA|SM-G92|i980|zte|U304AA)/i.test(e)||/lmy47v/i.test(e)&&!/QTAQZ3/i.test(e)?Qc:el:RegExp(`(pda|Mobile)`,`i`).test(e)?Cl:new RegExp($c,`i`).test(e)&&!RegExp(`Tablet pc`,`i`).test(e)?wl:``},Zl=function(e,t){let n=Xl(e);return n===tl||n===el||n===`Kobo`||n===`Kindle Fire`||n===wl?$c:n===ml||n===gl||n===hl||n===Sl?`Console`:n===nl?`Wearable`:n?Zc:t?.userAgentDataPlatform===`Android`&&(t?.maxTouchPoints??0)>0?600>Math.min((r=t?.screenWidth)??0,(i=t?.screenHeight)??0)/((a=t?.devicePixelRatio)??1)?Zc:$c:`Desktop`;var r,i,a},Ql=/\bFBAV\/(\d+(?:\.\d+)*)/i,$l=[[/\bInstagram(?:[ /](\d+(?:\.\d+)*))?\b/i,`Instagram`],[/\bBarcelona[ /](\d+(?:\.\d+)*)?/i,`Threads`],[/\b(?:MessengerForiOS|(?:FBAN|FB_IAB)\/Orca-Android)\b/i,`Messenger`,Ql],[/\bFBAN\/EMA\b/i,`Facebook Lite`,Ql],[/\b(?:FBIOS|(?:FBAN|FB_IAB)\/(?:FB4A|FBIOS))\b/i,`Facebook`,Ql],[/\bLinkedInApp(?:\]?\/(\d+(?:\.\d+)*))?\b/i,`LinkedIn`],[/\bTwitter(?:Android| for (?:iPhone|iPad|Android))(?
12:\/(\d+(?:\.\d+)*))?\b/i,`Twitter`],[/\b(?:musical_ly|trill)(?:[_/](\d+\.\d+(?:\.\d+)*))?(?=\b|_)/i,`TikTok`,/\bapp_version\/(\d+(?:\.\d+)*)/i],[/\b(?:MicroMessenger|WeChat)\/(\d+(?:\.\d+)*)?/i,`WeChat`],[/\bLine\/(\d+(?:\.\d+)*)?/i,`Line`],[/\bGSA\/(\d+(?:\.\d+)*)?/i,`Google`],[/\[Pinterest\/(?:iOS|Android)\b|\bPinterest(?: for (?:Android(?: Tablet)?|iOS))?\/(\d+(?:\.\d+)*)/i,`Pinterest`],[/\b(?:WA4A|WAiOS)\/(\d+(?:\.\d+)*)?/i,`WhatsApp`],[/\bSnapchat[ /](\d+(?:\.\d+)*)?/i,`Snapchat`],[/\bBing(?:Web|Sapphire)\/(\d+(?:\.\d+)*)?/i,`Bing`],[/\bNAVER\(inapp; search;/i,`Naver`,/\bNAVER\(inapp; search;[^;)]*; (\d+(?:\.\d+)*)/i],[/\bKAKAOTALK[ /](\d+\.\d+(?:\.\d+)*)?/i,`KakaoTalk`]],eu=`[Truncated]`,tu=`[Unserializable]`;function nu(e){let t=``;for(let n=0;e.length>n;n++){let r=e.charCodeAt(n);if(55296>r||r>56319)t+=56320>r||r>57343?e[n]:`�`;else{let r=e.charCodeAt(n+1);56320>r||r>57343?t+=`�`:(t+=e[n]+e[n+1],n++)}}return t}function ru(e,t){if(!t)return e;let n=[];try{n=Object.keys(t)}catch{n=[]}for(let r of n){let n;try{n=t[r]}catch{n=tu}Object.defineProperty(e,r,{value:n,enumerable:!0,writable:!0,configurable:!0})}return e}var iu=3e5,au=class{record(e){if(e.kind===`too-large`)return;if(e.kind!==`retry-later`)return void this.reset();if(!e.retryAfterMs)return;let t=this.isOpen(),n=Date.now(),r=Math.min(e.retryAfterMs,iu);if(!t)return this.ts=n,void(this.es=n+r);this.es=Math.max(this.es,Math.min(n+r,this.ts+iu))}remainingMs(){let e=Date.now();if(this.ts-5e3>e)return this.reset(),0;let t=Math.min(iu,Math.max(0,this.es-e));return t===0&&this.reset(),t}isOpen(){return this.remainingMs()>0}reset(){this.es=0,this.ts=0}constructor(){this.es=0,this.ts=0}},ou=/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;function su(e,t){return typeof(n=e)==`string`&&ou.test(n)?e:t();var n}function cu(e,t){let n=Error(t);try{Object.defineProperty(n,`name`,{value:e,writable:!0,enumerable:!0,configurable:!0})}catch{}return n}function lu(e){return e&&e.split(`#`)[0]}function uu(e){try{return e()}catch{return}}function du(e,t){let n=setTimeout(e,t);return n!=null&&n.unref&&n?.unref(),n}function fu(e,t,n){return pu.apply(this,arguments)}function pu(){return(pu=Kc(function*(e,t,n){let r;try{return yield Promise.race([e,new Promise((e,i)=>{r=du(()=>{try{n?.(),e()}catch(e){i(e)}},t)})])}finally{clearTimeout(r)}})).apply(this,arguments)}var mu,hu,gu;function _u(e){let t=globalThis._posthogChunkIds;if(!t)return;let n=Object.keys(t);return gu&&n.length===hu||(hu=n.length,gu=n.reduce((n,r)=>{mu||={};let i=mu[r];if(i)n[i[0]]=i[1];else{let i=e(r);for(let e=i.length-1;e>=0;e--){let a=i[e]?.filename,o=t[r];if(a&&o){n[a]=o,mu[r]=[a,o];break}}}return n},{})),gu}function vu(e){return vu=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},vu(e)}function yu(e,t,n){return(t=function(e){var t=function(e){if(vu(e)!=`object`||!e)return e;var t=e[Symbol.toPrimitive];if(t!==void 0){var n=t.call(e,`string`);if(vu(n)!=`object`)return n;throw TypeError(`@@toPrimitive must return a primitive value.`)}return String(e)}(e);return vu(t)==`symbol`?t:t+``}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function bu(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function B(e){for(var t=1;arguments.length>t;t++){var n=arguments[t]==null?{}:arguments[t];t%2?bu(Object(n),!0).forEach(function(t){yu(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):bu(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}var xu=class{constructor(e,t,n=[]){this.coercers=e,this.stackParser=t,this.modifiers=n}buildFromUnknown(e,t={}){let n=t&&t.mechanism||{handled:!0,type:`generic`},r=this.buildCoercingContext(n,t,0).apply(e),i=this.buildParsingContext(t),a=this.parseStacktrace(r,i);return{$exception_list:this.convertToExceptionList(a,n),$exception_level:`error`}}modifyFrames(e){var t=this;return Kc(function*(){for(let n of e)n.stacktrace&&n.stacktrace.frames&&wc(n.stacktrace.frames)&&(n.stacktrace.frames=yield t.applyModifiers(n.stacktrace.frames));return e})()}coerceFallback(e){return{type:`Error`,value:`Unknown error`,stack:e.syntheticException?.stack,synthetic:!0}}parseStacktrace(e,t){let n,r;if(e.cause!=null&&(n=this.parseStacktrace(e.cause,t)),e.stack!=``&&e.stack!=null)try{r=this.applyChunkIds(this.stackParser(e.stack,e.synthetic?t.ski
12pFirstLines:0),t.chunkIdMap)}catch{}return B(B({},e),{},{cause:n,stack:r,errors:e.errors?.map(e=>this.parseStacktrace(e,t))})}applyChunkIds(e,t){return e.map(e=>(e.filename&&t&&(e.chunk_id=t[e.filename]),e))}applyCoercers(e,t){for(let n of this.coercers)if(n.match(e))return n.coerce(e,t);return this.coerceFallback(t)}applyModifiers(e){var t=this;return Kc(function*(){let n=e;for(let e of t.modifiers)n=yield e(n);return n})()}convertToExceptionList(e,t){let n=[],r=(e,i,a)=>{let o=n.length,s=i===void 0?B(B({type:typeof t.type==`string`&&t.type.length>0?t.type:`generic`},typeof t.handled==`boolean`?{handled:t.handled}:t.handled===void 0?{handled:!0}:{}),{},{synthetic:typeof t.synthetic==`boolean`?t.synthetic:e.synthetic,exception_id:o}):{type:`chained`,source:a,synthetic:e.synthetic,exception_id:o,parent_id:i},c={type:e.type,value:e.value,mechanism:s};e.stack&&(c.stacktrace={type:`raw`,frames:e.stack}),n.push(c),e.cause&&r(e.cause,o,`cause`);for(let t of e.errors??[])r(t,o,`member`)};return r(e),n}buildParsingContext(e){return{chunkIdMap:_u(this.stackParser),skipFirstLines:e.skipFirstLines??1}}getAggregateErrors(e){try{if(zc(e)){let t=Object.getPrototypeOf(e);for(let n=0;t&&100>n;n++){let n=Object.getOwnPropertyDescriptor(t,`constructor`)?.value;if(typeof n==`function`&&n.name===`AggregateError`){let t=e.errors;return wc(t)?t:void 0}t=Object.getPrototypeOf(t)}}}catch{}}buildCoercingContext(e,t,n=0){let r=0,i=0,a=!1,o=new Set,s=[],c={},l=(e,t,n=0)=>{let l=u(t,n),d=l.apply;if(l.apply=t=>{s.push(e);try{return d(t)}finally{s.pop()}},n>4||n>0&&s.indexOf(e)!==-1)return this.coerceFallback(l);let f=typeof e==`object`&&!!e||typeof e==`function`;if(n===0&&r>=50||f&&o.has(e))return;f&&o.add(e),n===0&&r++;let p=this.getAggregateErrors(e),m,h;a||=!!p;try{if(m=this.applyCoercers(e,l),!m)throw c}catch(e){if(e===c)return void(n===0&&r--);if(!a)throw e;m=this.coerceFallback(l)}if(!p||r>=50)return m;try{h=p.length}catch{return m}if(!Number.isInteger(h)||0>h||h>4294967295)return m;let g=[];for(let e=0;50>r&&1e3>i&&h>e;e++){let n;i++;try{n=l.next(p[e])}catch{r++,n=this.coerceFallback(u(t+1))}n&&g.push(n)}return B(B({},m),{},{errors:g})},u=(n,r=0)=>B(B({},t),{},{syntheticException:n==0?t.syntheticException:void 0,mechanism:n==0?e:{},apply(e){let t=l(e,n,r+1);if(!t)throw c;return t},next:e=>l(e,n+1)}),d=u(n);return B(B({},d),{},{apply:e=>l(e,n)??this.coerceFallback(d)})}},Su=/^([a-z][a-z0-9.+-]+):/i,Cu=[`http`,`https`,`file`,`blob`,`app`,`capacitor`,`ionic`,`webpack`,`webpack-internal`,`ng`];function wu(e){if(!e||e===`<anonymous>`)return!1;let t=Su.exec(e);return!t||Cu.includes(t[1].toLowerCase())}function Tu(e,t,n,r,i){let a={platform:e,filename:t,function:n===`<anonymous>`?`?`:n,in_app:wu(t)};return z(r)||(a.lineno=r),z(i)||(a.colno=i),a}var Eu=(e,t)=>{let n=e.indexOf(`safari-extension`)!==-1,r=e.indexOf(`safari-web-extension`)!==-1;return n||r?[e.indexOf(`@`)===-1?`?`:e.split(`@`)[0],n?`safari-extension:${t}`:`safari-web-extension:${t}`]:[e,t]},Du=/^\s*at (\S+?)(?::(\d+))(?::(\d+))\s*$/i,Ou=/^\s*at (?:(.+?\)(?: \[.+\])?|.*?) ?\((?:address at )?)?(?:async )?((?:<anonymous>|[-a-z]+:|.*bundle|\/)?.*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,ku=/\((\S*)(?::(\d+))(?::(\d+))\)/,Au=(e,t)=>{let n=Du.exec(e);if(n){let[,e,r,i]=n;return Tu(t,e,`?`,+r,+i)}let r=Ou.exec(e);if(r){if(r[2]&&r[2].indexOf(`eval`)===0){let e=ku.exec(r[2]);e&&(r[2]=e[1],r[3]=e[2],r[4]=e[3])}let[e,n]=Eu(r[1]||`?`,r[2]);return Tu(t,n,e,r[3]?+r[3]:void 0,r[4]?+r[4]:void 0)}},ju=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:[-a-z]+)?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js)|\/[\w\-. /=]+)(?::(\d+))?(?::(\d+))?\s*$/i,Mu=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i,Nu=(e,t)=>{let n=ju.exec(e);if(n){if(n[3]&&n[3].indexOf(` > eval`)>-1){let e=Mu.exec(n[3]);e&&(n[1]=n[1]||`eval`,n[3]=e[1],n[4]=e[2],n[5]=``)}let e=n[3],r=n[1]||`?`;return[r,e]=Eu(r,e),Tu(t,e,r,n[4]?+n[4]:void 0,n[5]?+n[5]:void 0)}},Pu=/\(error: (.*)\)/;function Fu(e,t){return e.filename===t.filename&&e.function===t.function&&e.module===t.module&&e.lineno===t.lineno&&e.colno===t.colno}function Iu(e){for(let t=1;10>=t;t++){let n=e.length-2*t;if(0>n)break;let r=!0;for(let i=0;t>i;i++)if(!Fu(e[n+i],e[n+t+i])){r=!1;break}if(r){for(let r=0;t>r;r++)e[n+r]=e[n+t+r];return e.length=n+t,{start:n,length:t}}}}function Lu(e,t){let n=t.start+t.length,r=zu(e,t);r&&e.splice(n+r===e.length?n:t.start,r)}function Ru(e,t){let n=t.start;for(;n>0&&Fu(e[n-1],e[n-1+t.length]);)n--;return t.start-n}function zu(e,t){let n=t.start+t.length,r=n;for(;e.length>r&&Fu(e[r],e[r-t.length]);)r++;return r-n}function Bu(e,t){let n=t[0],r=e.length-(n?Ru(e,n):0);for(let n of t)r-=zu(e,n);return r}function Vu(e,t,n){for(let r=0;e.length>r;r++){let i=e[(t+r)%e.length],a=e[(n+r)%e.length];if(i!==a)return a>i}return!1}var Hu=class{match(e){return this.isDOMException(e)||this.isDOMError(e)}coerce(e,t){let n=Oc(e.stack);return{type:this.getType(e),value:this.getValue(e),stack:n?e.stack:void 0,cause:e.cause?t.next(e.cause):void 0,synthetic:!1}}getType(e){return this.isDOMError(e)?`DOMError`:`DOMException`}getValue(e){let t=e.name||(this.isDOMError(e)?`DOMError`:`DOMException`);return e.message?`${t}: ${e.message}`:t}isDOMException(e){return Rc(e,`DOMException`)}isDOMError(e){return Rc(e,`DOMError`)}},Uu=class{match(e){return zc(e)}coerce(e,t){let n=this.getStack(e),r=n===void 0?t.syntheticException?.stack:void 0,i=!!r;return{type:this.getType(e),value:this.getMessage(e,t),stack:n??r,cause:e.cause?t.next(e.cause):void 0,synthetic:i}}getType(e){return e.name||e.constructor.name}getMessage(e,t){let n=e.message;return String(n.error&&typeof n.error.message==`string`?n.error.message:n)}getStack(e){try{let t=e.stacktrace;if(typeof t==`string`&&t.length>0)return t;let n=e.stack;return typeof n==`string`&&n.length>0?n:void 0}catch{return}}},Wu=class{match(e){return!!Rc(e,`ErrorEvent`)&&(e.error!=null||this.ur(e))}coerce(e,t){if(e.error!=null)return t.apply(e.error);let n=t.apply(e.message);return B(B({},n),{},{stack:this.cr(e)??n.stack,synthetic:!0})}ur(e){return Oc(e.message)&&e.message.length>0}cr(e){let t=e,n=t.lineno??0,r=t.colno??0;if(Oc(t.filename)&&t.filename.length!==0&&n!==0)return`Error\n at ${t.filename}:${n}:${r}`}},Gu=/^(?:[Uu]ncaught (?:exception: )?)?(?:((?:Eval|Internal|Range|Reference|Syntax|Type|URI|)Error): )?(.*)$/i,Ku=class{match(e){return typeof e==`string`}coerce(e,t){let[n,r]=this.getInfos(e);return{type:n??`Error`,value:r??e,stack:t.syntheticException?.stack,synthetic:!0}}getInfos(e){let t=`Error`,n=e,r=e.match(Gu);return r&&(t=r[1],n=r[2]),[t,n]}},qu=[`fatal`,`error`,`warning`,`log`,`info`,`debug`];function Ju(e,t=40){let n=Object.keys(e);if(n.sort(),!n.length)return`[object has no keys]`;for(let e=n.length;e>0;e--){let r=n.slice(0,e).join(`, `);if(t>=r.length)return e===n.length?r:r.length>t?`${r.slice(0,t)}...`:r}return``}var Yu=class{match(e){return typeof e==`object`&&!!e}coerce(e,t){let n=this.getErrorPropertyFromObject(e);return n?t.apply(n):{type:this.getType(e),value:this.getValue(e),stack:this.getStack(e)??t.syntheticException?.stack,level:this.isSeverityLevel(e.level)?e.level:`error`,synthetic:!0}}getType(e){if(Bc(e))return e.constructor.name;let t=`name`in e?e.name:void 0;return Oc(t)&&!kc(t)?t:`Error`}getValue(e){if(`name`in e&&typeof e.name==`string`){let t=`'${e.name}' captured as exception`;return`message`in e&&typeof e.message==`string`&&(t+=` with message: '${e.message}'`),t}if(`message`in e&&typeof e.message==`string`)return e.message;let t=this.getObjectClassName(e);return`${t&&t!==`Object`?`'${t}'`:`Object`} captured as exception with keys: ${Ju(e)}`}isSeverityLevel(e){return Oc(e)&&!kc(e)&&qu.indexOf(e)>=0}getStack(e){try{return Oc(e.stacktrace)&&e.stacktrace.length>0?e.stacktrace:Oc(e.stack)&&e.stack.length>0?e.stack:void 0}catch{return}}getErrorPropertyFromObject(e){for(let t in e)if({}.hasOwnProperty.call(e,t)){let n=e[t];if(zc(n))return n}}getObjectClassName(e){try{let t=Object.getPrototypeOf(e);return t?t.constructor.name:void 0}catch{return}}},Xu=class{match(e){return Bc(e)}coerce(e,t){let n=e.constructor.name;return{type:n,value:`${n} captured as exception with keys: ${Ju(e)}`,stack:t.syntheticException?.stack,synthetic:!0}}},Zu=class{match(e){return Lc(e)}coerce(e,t){return{type:`Error`,value:`Primitive value captured as exception: ${String(e)}`,stack:t.syntheticException?.stack,synthetic:!0}}},Qu=class{match(e){return Rc(e,`PromiseRejectionEvent`)||this.isCu
12stomEventWrappingRejection(e)}isCustomEventWrappingRejection(e){if(!Bc(e))return!1;try{let t=e.detail;return typeof t==`object`&&!!t&&`reason`in t}catch{return!1}}coerce(e,t){let n=this.getUnhandledRejectionReason(e);return Lc(n)?{type:`UnhandledRejection`,value:`Non-Error promise rejection captured with value: ${String(n)}`,stack:t.syntheticException?.stack,synthetic:!0}:t.apply(n)}getUnhandledRejectionReason(e){try{if(`reason`in e)return e.reason;if(`detail`in e&&e.detail!=null&&typeof e.detail==`object`&&`reason`in e.detail)return e.detail.reason}catch{}return e}},$u=`$message`,ed=`$timestamp`,td=new Set([$u,ed]),nd={enabled:!0,max_bytes:32768};function rd(e){return e?{enabled:e.enabled??nd.enabled,max_bytes:ad(e.max_bytes,nd.max_bytes)}:B({},nd)}var id=class{constructor(e){this.ns=[],this.ss=0,this.Rr=rd(e)}setConfig(e){this.Rr=rd(e),this.rs()}add(e){let t=function(e){let t;try{t=bc(e)}catch{return}try{let e=JSON.parse(t);if(!Ec(e))return;let n=e,r=n[$u],i=n[ed];return!Oc(r)||r.trim().length===0||!Oc(i)&&!Mc(i)?void 0:{step:n,json:t}}catch{return}}(e);if(!t)return;let n=function(e){if(`u`>typeof TextEncoder)return new TextEncoder().encode(e).length;let t=encodeURIComponent(e),n=0;for(let e=0;t.length>e;e++)t[e]===`%`?(n+=1,e+=2):n+=1;return n}(t.json);n>this.Rr.max_bytes||(this.ns.push({step:t.step,bytes:n}),this.ss+=n,this.rs())}getAttachable(){return this.ns.map(e=>e.step)}clear(){this.ns=[],this.ss=0}size(){return this.ns.length}rs(){for(;this.ss>this.Rr.max_bytes&&this.ns.length>0;){let e=this.ns.shift();e&&(this.ss-=e.bytes)}}};function ad(e,t){if(!Mc(e)||e===1/0||e===-1/0)return t;let n=Math.floor(e);return 0>n?t:n}var od=e=>{if(typeof e!=`string`)return e;try{return JSON.parse(e)}catch{return e}};function sd(e){return typeof e==`string`||e}function cd(e){return typeof e==`string`?e:void 0}var ld=`$feature_flag.$feature_flag_response.$feature_flag_has_experiment.$feature_flag_id.$feature_flag_version.$feature_flag_reason.$feature_flag_request_id.$feature_flag_evaluated_at.$feature_flag_error.locally_evaluated.$groups.$process_person_profile.$geoip_disable.$current_url.$pathname.$referring_domain.utm_source.utm_medium.utm_campaign.utm_content.utm_term.gad_source.mc_cid.gclid.gclsrc.dclid.gbraid.wbraid.fbclid.msclkid.twclid.li_fat_id.igshid.ttclid.rdt_cid.epik.qclid.sccid.irclid._kx.$session_id.$window_id.$lib.$lib_version.$device_id.$is_server`.split(`.`),ud=`NativeGzipValidationError`,dd=e=>e.length>=2&&e[0]===31&&e[1]===139,fd=(e,t)=>e===mc.GZipJS||t===mc.GZipJS||t===`gzip`,pd=e=>!(!e||typeof e!=`object`)&&(`name`in e?String(e.name):``)===`NotReadableError`,md,hd=e=>{throw cu(ud,`Native gzip produced invalid output: ${e}`)},gd=(_d=Kc(function*(e,t){18>e.size&&hd(`too-short`);let n=new Uint8Array(yield e.slice(0,10).arrayBuffer());dd(n)&&n[2]===8||hd(`invalid-header`);let r=new DataView(yield e.slice(e.size-8).arrayBuffer());r.getUint32(0,!0)!==(e=>{let t=(()=>{if(md)return md;md=[];for(let e=0;256>e;e++){let t=e;for(let e=0;8>e;e++)t=1&t?3988292384^t>>>1:t>>>1;md[e]=t>>>0}return md})(),n=4294967295;for(let r=0;e.length>r;r++)n=t[255&(n^e[r])]^n>>>8;return(4294967295^n)>>>0})(t)&&hd(`invalid-crc`);let i=t.length>>>0;r.getUint32(4,!0)!==i&&hd(`invalid-size`)}),function(e,t){return _d.apply(this,arguments)}),_d;function vd(){return vd=Kc(function*(e,t=!0,n){try{let t=new TextEncoder().encode(e),n=new globalThis.CompressionStream(`gzip`),i=n.writable.getWriter(),a=i.write(t).then(()=>i.close()).catch((r=Kc(function*(e){try{yield i.abort(e)}catch{}throw e}),function(e){return r.apply(this,arguments)})),o=new Response(n.readable).blob(),[s]=yield Promise.all([o,a]);return yield gd(s,t),s}catch(e){if(n?.rethrow)throw e;return t&&console.error(`Failed to gzip compress data`,e),null}var r}),vd.apply(this,arguments)}function yd(e,t){if(e==null)return{};var n,r,i=function(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.includes(r))continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;a.length>r;r++)t.includes(n=a[r])||{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}var bd={}.propertyIsEnumerable;function xd(e,t){try{return wd(e,t,{ancestors:new WeakSet,remainingNodes:1e4}
12,0)}catch{return[]}}function Sd(e,t,n,r){if(0>=n.remainingNodes)return{stringValue:eu};if(n.remainingNodes--,Pc(e))return{boolValue:e};if(typeof e==`bigint`)return function(e,t){let n=e.toString(),r=BigInt(`9223372036854775808`);return e>=r||-r>e?(t?.debug(`Attribute ${n} is outside the int64 range; encoding it as a string`),{stringValue:n}):{intValue:n}}(e,t);if(typeof e==`number`){if(!Number.isFinite(e))return{stringValue:String(e)};if(Number.isInteger(e)){if(Number.isSafeInteger(e))return{intValue:String(e)};if(typeof BigInt>`u`)return{stringValue:String(e)};let n=BigInt(e).toString();return e>=0x8000000000000000||-0x8000000000000000>e?(t?.debug(`Attribute ${n} is outside the int64 range; encoding it as a string`),{stringValue:n}):{intValue:n}}return{doubleValue:e}}if(typeof e==`string`)return{stringValue:nu(e)};if(typeof e==`function`)return{stringValue:`[Function]`};if(typeof e==`symbol`)return{stringValue:String(e)};if(typeof e==`object`&&e){if(n.ancestors.has(e))return{stringValue:`[Circular]`};if(r>=20)return{stringValue:eu};if(e instanceof Date){let t=e.getTime(),n=Number.isFinite(t)?e.toISOString():String(e);return{stringValue:typeof n==`string`?nu(n):String(n)}}n.ancestors.add(e);try{try{let i=e.toJSON;if(typeof i==`function`)return Sd(i.call(e),t,n,r+1)}catch{}return wc(e)?{arrayValue:{values:Cd(e,t,n,r+1)}}:{kvlistValue:{values:wd(e,t,n,r+1)}}}finally{n.ancestors.delete(e)}}return{stringValue:nu(String(e))}}function Cd(e,t,n,r){let i=[],a=Math.min(e.length,1e3),o=0;for(;a>o&&n.remainingNodes>0;o++)try{let a=o in e?e[o]:void 0;if(jc(a))continue;i.push(Sd(a,t,n,r))}catch{i.push({stringValue:tu})}return e.length>o&&i.push({stringValue:eu}),i}function wd(e,t,n,r){let i=[];for(let a in e)if(bd.call(e,a)){if(!a){t?.debug(`Dropping an attribute with an empty key`);continue}if(i.length>=1e3||0>=n.remainingNodes){t?.debug(`Attributes truncated: the value exceeds the OTLP encoder budget`);break}try{let o=e[a];if(Ac(o)||z(o))continue;i.push({key:nu(a),value:Sd(o,t,n,r)})}catch{i.push({key:nu(a),value:{stringValue:tu}})}}return i}function Td(e,t,n){return B(B(B(B({},ru({},e.resourceAttributes)),{},{"service.name":e.serviceName||`unknown_service`},e.environment&&{"deployment.environment":e.environment}),e.serviceVersion&&{"service.version":e.serviceVersion}),{},{"telemetry.sdk.name":t,"telemetry.sdk.version":n})}var Ed=[`service.name`,`deployment.environment`,`service.version`,`telemetry.sdk.name`,`telemetry.sdk.version`];function Dd(e,t){let n=ru({},e),r={};for(let e of Ed)({}).hasOwnProperty.call(n,e)&&(r[e]=n[e],delete n[e]);return[...xd(n,t),...xd(r,t)]}var Od={darwin:`macOS`,win32:`Windows`,cygwin:`Windows`,linux:`Linux`,android:`Android`,freebsd:`FreeBSD`,openbsd:`OpenBSD`,netbsd:`NetBSD`,sunos:`SunOS`,aix:`AIX`,haiku:`Haiku`,"Mac OS X":`macOS`},kd={trace:{text:`TRACE`,number:1},debug:{text:`DEBUG`,number:5},info:{text:`INFO`,number:9},warn:{text:`WARN`,number:13},error:{text:`ERROR`,number:17},fatal:{text:`FATAL`,number:21}},Ad=kd.info;function jd(e){try{return nu(String(e))}catch{return tu}}function Md(e,t,n,r){let{text:i,number:a}=kd[e.level||`info`]||Ad,o=function(e=Date.now()){return String(e)+`000000`}(Mc(r)?r:void 0),s={};t.distinctId&&(s.posthogDistinctId=t.distinctId),t.sessionId&&(s.sessionId=t.sessionId),t.windowId&&(s[`window.id`]=t.windowId),jc(t.sessionStartTimestamp)||(s.sessionStartTimestamp=String(t.sessionStartTimestamp)),jc(t.lastActivityTimestamp)||(s.lastActivityTimestamp=String(t.lastActivityTimestamp)),t.currentUrl&&(s[`url.full`]=t.currentUrl),t.screenName&&(s[`screen.name`]=t.screenName),t.appState&&(s[`app.state`]=t.appState),t.activeFeatureFlags&&t.activeFeatureFlags.length>0&&(s.feature_flags=t.activeFeatureFlags);let c=B({},s),l=e.attributes;if(l){let e=[];try{e=Object.keys(l)}catch{e=[]}for(let t of e){let e;try{e=l[t]}catch{e=tu}Object.defineProperty(c,t,{value:e,enumerable:!0,writable:!0,configurable:!0})}}let u={timeUnixNano:o,observedTimeUnixNano:o,severityNumber:a,severityText:i,body:{stringValue:jd(e.body)},attributes:xd(c,n)};return e.trace_id&&(u.traceId=e.trace_id),e.span_id&&(u.spanId=e.span_id),z(e.trace_flags)||(u.flags=e.trace_flags),u}function Nd(e,t,n){return Td(e,t,n)}function Pd(e,t,n,r){return{resourceLogs:[{resource:{attributes:Dd(t)},scopeLogs:[{scope:{name:n,version:r},logRecords:e}]}]}}var Fd=class{constructor(e){this.ls=e,this.us=0}get pending(){return!!this.hs}arm(e){this.clear(),this.us=Date.now()+e,this.hs=du(()=>{this.hs=void 0,this.ls()},e)}armNoEarlierThan(e){this.hs&&Date.now()+e<=this.us||this.arm(e)}clear(){this.hs&&=(clearTimeout(this.hs),void 0)}};function Id(){return .75+.5*Math.random()}function Ld(e,t,n,r){let i=e*2**Math.min(Math.max(0,t-1),6);return Math.round((r===void 0?i:Math.min(i,Math.max(r,e)))*n)}var Rd=class{constructor(e,t,n,r,i,a=()=>Promise.resolve(),o){this._instance=e,this.Rr=t,this.$=n,this.cs=r,this.ds=i,this.vs=a,this.fs=o,this.ps=new Fd(()=>this.gs()),this.ys=null,this.bs=0,this._s=0,this.ws=new au,this.ks=0,this.Ss=1,this.xs=0,this.Cs=0,this.$s=!1,this.Ts=t.maxBufferSize,this.Is=Math.max(t.maxQueueSize??t.maxBufferSize,t.maxBufferSize),this.Ms=t.flushIntervalMs,this.Es=t.maxBatchRecordsPerPost,this.Ps=t.rateCapWindowMs,this.Rs=t.maxLogsPerInterval}clearQueue(){this._s++,this._instance.setPersistedProperty(pc.LogsQueue,[])}reset(){this.ps.clear(),this.xs=0,this.Cs=0,this.$s=!1,this.ks=0,this.Ss=1,this.ws.reset(),this.Es=this.Rr.maxBatchRecordsPerPost}onReconnect(){this.ks=0,this.Ss=1,this.ws.isOpen()?this.As()&&this.Fs():this.gs()}captureLog(e,t){if(this._instance.isDisabled||this._instance.optedOut||!e?.body)return;let n=this.Os(e);if(n===null)return;if(!n.body)return void this.$.info(`Log was rejected in beforeSend function`);if(!this.Ds())return;let r={record:Md(n,t?.context??this.cs(),this.$,t?.occurredAtMs)};this.ds(()=>this.Ls(r))}Os(e){let t=this.Rr.beforeSend;if(!t)return e;let n=wc(t)?t:[t],r=e;for(let e of n)try{let t=e(r);if(!t)return this.$.info(`Log was rejected in beforeSend function`),null;r=t}catch(e){return this.$.error(`Error in beforeSend function for log:`,e),null}return r}Ds(){if(this.Rs===void 0)return!0;let e=Date.now(),t=e-this.xs;return this.Ps>t&&t>=0||(this.xs=e,this.Cs=0,this.$s=!1),this.Rs>this.Cs?(this.Cs++,!0):(this.$s||=(this.$.warn(`captureLog dropping logs: exceeded ${this.Rs} logs per ${this.Ps}ms`),!0),!1)}flush(){var e=this;return Kc(function*(){if(!e._instance.isDisabled)return e.ys||=e.Ns().finally(()=>{e.ys=null}),e.ys})()}Ns(){var e=this;
12return Kc(function*(){e.ps.clear();let t=e._instance.getPersistedProperty(pc.LogsQueue)??[];if(t.length===0)return;let n=t.length,r=0;for(;t.length>0&&n>r;){let n=e._s;e.bs=0;let i=Math.min(t.length,e.Es),a=t.slice(0,i),o=Pd(a.map(e=>e.record),e.qs(),e.fs??e._instance.getLibraryId(),e._instance.getLibraryVersion()),s=yield e._instance.js(o);if(e._s!==n)return;if(s.kind===`too-large`&&a.length>1)e.Es=Math.max(1,Math.floor(a.length/2)),e.$.warn(`Logs batch of size ${a.length} was too large for the ingestion endpoint, reducing batch size to ${e.Es}`);else if(e.ws.record(s),e.ps.pending&&e.ps.arm(Math.max(e.Ms,e.ws.remainingMs())),s.kind===`retry-later`||(s.kind===`too-large`?e.$.warn(`Dropping a single log record with batch size 1 â the record is larger than the server cap and cannot be split further.`):s.kind===`ok`&&e.Rr.maxBatchRecordsPerPost>e.Es&&(e.Es=Math.min(e.Rr.maxBatchRecordsPerPost,e.Es+1)),yield e.Bs(a.length),t=e._instance.getPersistedProperty(pc.LogsQueue)??[],r+=a.length,s.kind===`fatal`))throw s.error}})()}Bs(e){var t=this;return Kc(function*(){let n=Math.max(0,e-t.bs),r=t._instance.getPersistedProperty(pc.LogsQueue)??[];t._instance.setPersistedProperty(pc.LogsQueue,r.slice(n)),yield t.vs()})()}qs(){return Nd(this.Rr,this._instance.getLibraryId(),this._instance.getLibraryVersion())}Ls(e){if(this._instance.optedOut)return;let t=this._instance.getPersistedProperty(pc.LogsQueue)??[];this.Is>t.length||(t.shift(),this.bs++,this.$.info(`Logs queue is full, dropping oldest record.`)),t.push(e),this._instance.setPersistedProperty(pc.LogsQueue,t),this.Ts>t.length||this.ws.isOpen()?this.Fs():this.gs()}Fs(){this.ps.pending||this.ps.arm(Math.max(this.Ms,this.ws.remainingMs()))}Hs(){return Math.max(Ld(this.Ms,this.ks,this.Ss,3e4),this.ws.remainingMs())}As(){let e=this._instance.getPersistedProperty(pc.LogsQueue);return!!e&&e.length>0}shutdown(e){var t=this;return Kc(function*(){t.ps.clear();let n=t.flush().catch(()=>{});e===void 0?yield n:yield fu(n,e)})()}flushWithTimeout(e){var t=this;return Kc(function*(){let n=t.flush();yield fu(n,e,()=>{n.catch(()=>{})})})()}gs(){this.flush().then(()=>{this.ks=0,this.Ss=1},e=>{this.ks++,this.Ss=Id(),this.$.error(`PostHog logs flush failed:`,e)}).finally(()=>{!this._instance.isDisabled&&this.As()&&this.ps.armNoEarlierThan(this.Hs())})}},zd=[0,5,10,25,50,75,100,250,500,750,1e3,2500,5e3,7500,1e4];function Bd(e){return String(e)+`000000`}function Vd(e,t,n,r){let i=``;return r&&(i=Object.keys(r).sort().map(e=>`${JSON.stringify(e)}:${JSON.stringify(r[e])}`).join(`,`)),`${e}\0${t}\0${n??``}\0${i}`}var Hd=class{constructor(e,t,n){this._instance=e,this.Rr=t,this.$=n,this.zs=new Map,this.ps=new Fd(()=>this.flush().catch(e=>{this.$.error(`Metrics flush failed:`,e)})),this.ys=null,this.Us=!1,this.Ws=new Map,this.Vs=new Set,this.ws=new au,this.ks=0,this.Ss=1,this.Gs=0}count(e,t=1,n){this.Zs({name:e,type:`count`,value:t,unit:n?.unit,attributes:n?.attributes})}gauge(e,t,n){this.Zs({name:e,type:`gauge`,value:t,unit:n?.unit,attributes:n?.attributes})}histogram(e,t,n){this.Zs({name:e,type:`histogram`,value:t,unit:n?.unit,attributes:n?.attributes})}flush(){var e=this;let t=this.ys,n=function(){var n=Kc(function*(){t&&(yield t.catch(()=>{})),yield e.Qs()});return function(){return n.apply(this,arguments)}}()().finally(()=>{this.ys===n&&(this.ys=null)});return this.ys=n,n}drainWindow(){if(this.zs.size===0)return null;let e=this.zs;return this.zs=new Map,this.Us=!1,this.Ws=new Map,this.Vs=new Set,this.Js(e)}reset(){this.Gs++,this.ws.reset(),this.ks=0,this.Ss=1,this.ps.clear(),this.zs=new Map,this.ys=null,this.Us=!1,this.Ws=new Map,this.Vs=new Set}Zs(e){if(this._instance.isDisabled||this._instance.optedOut)return;let t=this.Os(e);if(t===null)return;if(!t.name||typeof t.name!=`string`)return void this.$.warn(`Dropping metric with empty name`);if(typeof t.value!=`number`||!Number.isFinite(t.value))return void this.$.warn(`Dropping metric '${t.name}': value must be a finite number`);if(t.type===`count`&&0>t.value)return void this.$.warn(`Dropping count '${t.name}': counters are monotonic, value must be >= 0`);let n,r;try{n=t.attributes?B({},t.attributes):void 0,r=Vd(t.type,t.name,t.unit,n)}catch(e){this.$.warn(`Dropping metric '${t.name}': attributes could not be serialized`,e);return}let i=this.zs.get(r);if(!i){if(!this.Ks())return;i={name:t.name,type:t.type,unit:t.unit,attributes:n,windowStartMs:Date.now()},this.zs.set(r,i)}let a=this.Ws.get(t.name);a===void 0?this.Ws.set(t.name,t.type):a===t.type||this.Vs.has(t.name)||(this.Vs.add(t.name),this.$.warn(`Metric name '${t.name}' is already used as a ${a}; recording it as a ${t.type} too will blend both series in charts. Use a distinct name.`)),this.Xs(i,t.value),this.Fs()}Ks(){return this.Rr.maxSeriesPerFlush>this.zs.size||(this.Us||(this.Us=!0,this.$.warn(`Metric series cap reached (${this.Rr.maxSeriesPerFlush} per flush window); dropping new series until the next flush. Reduce attribute cardinality.`)),!1)}Xs(e,t){switch(e.type){case`count`:e.total=(e.total??0)+t;break;case`gauge`:e.last=t;break;case`histogram`:{e.hist||={count:0,sum:0,min:t,max:t,bucketCounts:Array(zd.length+1).fill(0)};let n=e.hist;n.count+=1,n.sum+=t,n.min=Math.min(n.min,t),n.max=Math.max(n.max,t),n.bucketCounts[function(e,t){for(let n=0;t.length>n;n++)if(t[n]>=e)return n;return t.length}(t,zd)]+=1;break}}}Os(e){let t=this.Rr.beforeSend;if(!t)return e;let n=wc(t)?t:[t],r=e;for(let e of n)try{let t=e(r);if(!t)return this.$.info(`Metric was rejected in beforeSend function`),null;r=t}catch(e){return this.$.error(`Error in beforeSend function for metric:`,e),null}return r}Fs(){this.ps.pending||this.ps.arm(this.Hs())}Hs(){return Math.max(Ld(this.Rr.flushIntervalMs,this.ks,this.Ss,3e4),this.ws.remainingMs())}Qs(){var e=this;return Kc(function*(){if(e.ps.clear(),e.zs.size===0)return;let t=e.zs;e.zs=new Map,e.Us=!1,e.Ws=new Map,e.Vs=new Set;let n=e.Gs,r=yield e._instance.Ys(e.Js(t));if(n===e.Gs)switch(e.ws.record(r),r.kind===`retry-later`?(e.ks++,e.Ss=Id()):(e.ks=0,e.Ss=1),e.ps.pending&&e.ps.arm(e.Hs()),r.kind){case`ok`:return;case`retry-later`:e.ho(t),e.ps.armNoEarlierThan(e.Hs());return;case`too-large`:e.$.warn(`Metrics batch exceeded the server size limit and was dropped`);return;case`fatal`:e.$.error(`Failed to send metrics batch:`,r.error);return}})()}Js(e){return t=this.vo(e),n=function(e,t,n){return Td(e,t,n)}(this.Rr,this._instance.getLibraryId(),this._instance.getLibraryVersion()),r
12=this._instance.getLibraryId(),i=this._instance.getLibraryVersion(),{resourceMetrics:[{resource:{attributes:Dd(n)},scopeMetrics:[{scope:{name:r,version:i},metrics:t}]}]};var t,n,r,i}vo(e){let t=Bd(Date.now()),n=new Map;for(let r of e.values()){let e=Vd(r.type,r.name,r.unit,void 0),i=n.get(e);i||(i=B({name:r.name},r.unit&&{unit:r.unit}),r.type===`count`?i.sum={aggregationTemporality:1,isMonotonic:!0,dataPoints:[]}:r.type===`gauge`?i.gauge={dataPoints:[]}:i.histogram={aggregationTemporality:1,dataPoints:[]},n.set(e,i));let a=xd(r.attributes??{},this.$),o=Bd(r.windowStartMs);if(r.type===`count`){let e={attributes:a,startTimeUnixNano:o,timeUnixNano:t,asDouble:r.total??0};i.sum.dataPoints.push(e)}else if(r.type===`gauge`){let e={attributes:a,timeUnixNano:t,asDouble:r.last??0};i.gauge.dataPoints.push(e)}else r.hist&&i.histogram.dataPoints.push({attributes:a,startTimeUnixNano:o,timeUnixNano:t,count:r.hist.count,sum:r.hist.sum,min:r.hist.min,max:r.hist.max,bucketCounts:r.hist.bucketCounts,explicitBounds:zd})}return Array.from(n.values())}ho(e){for(let[t,n]of e){let e=this.zs.get(t);if(e)switch(e.windowStartMs=Math.min(e.windowStartMs,n.windowStartMs),e.type){case`count`:e.total=(e.total??0)+(n.total??0);break;case`gauge`:break;case`histogram`:if(n.hist)if(e.hist){e.hist.count+=n.hist.count,e.hist.sum+=n.hist.sum,e.hist.min=Math.min(e.hist.min,n.hist.min),e.hist.max=Math.max(e.hist.max,n.hist.max);for(let t=0;e.hist.bucketCounts.length>t;t++)e.hist.bucketCounts[t]+=n.hist.bucketCounts[t]}else e.hist=n.hist}else this.Ks()&&this.zs.set(t,n)}}},Ud=(e,{debugEnabled:t}={})=>{let n={N(n,...r){R&&(fc.DEBUG||R.POSTHOG_DEBUG||t)&&!z(R.console)&&R.console&&(`__rrweb_original__`in R.console[n]?R.console[n].__rrweb_original__:R.console[n])(e,...r)},debug(...e){n.N(`debug`,...e)},info(...e){n.N(`log`,...e)},warn(...e){n.N(`warn`,...e)},error(...e){n.N(`error`,...e)},critical(...t){console.error(e,...t)},uninitializedWarning(e){n.error(`You must initialize PostHog before calling ${e}`)},createLogger:(t,n)=>Ud(`${e} ${t}`,n)};return n},Wd=Ud(`[PostHog.js]`),Gd=Wd.createLogger,Kd=Gd(`[ExternalScriptsLoader]`),qd=e=>{let t=tc?.querySelectorAll(`script`);if(t){for(let n=0;t.length>n;n++)if(t[n].src===e||t[n].getAttribute(`src`)===e)return t[n]}},Jd=(e,t,n)=>{if(e.config.disable_external_dependency_loading)return Kd.warn(`${t} was requested but loading of external scripts is disabled.`),n(`Loading of external scripts is disabled`);let r=qd(t);if(r){if(r.__posthog_loading_callback_fired)return n();let e=r.__posthog_loading_error;return e?n(e):(r.addEventListener(`load`,e=>{r.__posthog_loading_callback_fired=!0,n(void 0,e)}),void r.addEventListener(`error`,e=>{r.__posthog_loading_error=e,n(e)}))}let i=()=>{if(!tc)return n(`document not found`);if(qd(t))return Jd(e,t,n);let r=tc.createElement(`script`);if(r.type=`text/javascript`,r.crossOrigin=`anonymous`,r.src=t,r.onload=e=>{r.__posthog_loading_callback_fired=!0,n(void 0,e)},r.onerror=e=>{r.__posthog_loading_error=e,n(e)},e.config.prepare_external_dependency_script&&(r=e.config.prepare_external_dependency_script(r)),!r)return n(`prepare_external_dependency_script returned null`);if(e.config.external_scripts_inject_target===`head`)tc.head.appendChild(r);else{let e=tc.querySelectorAll(`body > script`);var i;e.length>0?(i=e[0].parentNode)==null||i.insertBefore(r,e[0]):tc.body.appendChild(r)}};tc?.body?i():tc?.addEventListener(`DOMContentLoaded`,i)},Yd={},Xd=(e,t)=>{let n=`/static/${t}.js?v=${e.version}`;if(t===`toolbar`){let e=3e5;n=`${n}&t=${Math.floor(Date.now()/e)*e}`}return e.requestRouter.endpointFor(`assets`,n)};uc.__PosthogExtensions__=uc.__PosthogExtensions__||{},uc.__PosthogExtensions__.loadExternalDependency=(e,t,n)=>{if(t===`remote-config`){Jd(e,e.requestRouter.endpointFor(`assets`,`/array/${e.config.token}/config.js`),n);return}let r=e.config.strict_script_versioning;if(r){let i=e.requestRouter.endpointFor(`assets`,`/static/${e.version}/${t}.js`),a=Yd[i];if(r===`fallback`&&a){if(qd(a))return void Jd(e,a,n);delete Yd[i]}Jd(e,i,r===`fallback`?(r,a)=>{if(r)if(typeof r==`string`)n(r);else{var o;let r=Xd(e,t);Yd[i]=r;let a=qd(i);a==null||(o=a.parentNode)==null||o.removeChild(a),Jd(e,r,n)}else n(void 0,a)}:n);return}Jd(e,Xd(e,t),n)},uc.__PosthogExtensions__.loadSiteApp=(e,t,n)=>{Jd(e,e.requestRouter.endpointFor(`api`,t),n)},fc.DEBUG=!1,fc.LIB_VERSION=`1.435.1`,fc.LIB_NAME=`web`;var Zd=fc,Qd=`$people_distinct_id`,$d=`distinct_id`,ef=`$device_id`,tf=`$device_model`,nf=`__alias`,rf=`__cmpns`,af=`$fbc`,of=`$fbc_persistence`,sf=`$fbp`,cf=`$fbp_persistence`,lf=`__timers`,uf=`$autocapture_disabled_server_side`,df=`$heatmaps_enabled_server_side`,ff=`$exception_capture_enabled_server_side`,pf=`$error_tracking_suppression_rules`,mf=`$error_tracking_capture_extension_exceptions`,hf=`$web_vitals_enabled_server_side`,gf=`$dead_clicks_enabled_server_side`,_f=`$product_tours_enabled_server_side`,vf=`$logs_capture_enabled_server_side`,yf=`$web_vitals_allowed_metrics`,bf=`$session_recording_remote_config`,xf=`$session_recording_enabled_server_side`,Sf=`$replay_sample_rate`,Cf=`$replay_override_sampling`,wf=`$replay_override_linked_flag`,Tf=`$replay_override_url_trigger`,Ef=`$replay_override_event_trigger`,Df=`$sesid`,Of=`$session_is_sampled`,kf=`$session_past_minimum_duration`,Af=`$session_recording_url_trigger_activated_session`,jf=`$
12session_recording_event_trigger_activated_session`,Mf=`$debug_first_full_snapshot_timestamp`,Nf=`$sess_rec_flush_size`,Pf=`$enabled_feature_flags`,Ff=`$active_feature_flags`,If=`$early_access_features`,Lf=`$feature_flag_details`,Rf=`$feature_flag_payloads`,zf=`$feature_flag_request_id`,Bf=`$minimal_flag_called_events`,Vf=`$override_feature_flags`,Hf=`$override_feature_flag_payloads`,Uf=`$stored_person_properties`,Wf=`$stored_group_properties`,Gf=`$groups`,Kf=`$surveys`,qf=`$surveys_loaded_at`,Jf=`$surveys_activated`,Yf=`$surveys_activated_session`,Xf=`$surveys_activated_timestamps`,Zf=`ph_product_tours`,Qf=`$product_tours_activated`,$f=`$product_tours_activated_session`,ep=`$conversations_widget_session_id`,tp=`$conversations_ticket_id`,np=`$conversations_widget_state`,rp=`$conversations_user_traits`,ip=`$flag_call_reported`,ap=`$flag_call_reported_session_id`,op=`$feature_flag_errors`,sp=`$feature_flag_evaluated_at`,cp=`$user_state`,lp=`$client_session_props`,up=`$capture_rate_limit`,dp=`$initial_campaign_params`,fp=`$initial_referrer_info`,pp=`$initial_person_info`,mp=`$epp`,hp=`$posthog_cookieless`,gp=`$cookieless_mode`,_p=`$sdk_debug_extensions_init_method`,vp=`$sdk_debug_extensions_init_time_ms`,yp=`$sdk_debug_recording_script_not_loaded`,bp=`$sdk_debug_replay_stale_config`,xp=`$sdk_debug_replay_event_trigger_status`,Sp=`$sdk_debug_replay_linked_flag_trigger_status`,Cp=`$sdk_debug_replay_matched_recording_trigger_groups`,wp=`$sdk_debug_replay_pen
12ding_trigger_conditions`,Tp=`$sdk_debug_replay_remote_trigger_matching_config`,Ep=`$sdk_debug_replay_trigger_groups_count`,Dp=`$sdk_debug_replay_url_trigger_status`,Op=`$session_recording_start_reason`,kp=`PostHog loadExternalDependency extension not found.`,Ap=`anonymous`,jp=`identified`,Mp=`identified_only`,Np=`visibilitychange`,Pp=`beforeunload`,Fp=`$pageview`,Ip=`$pageleave`,Lp=`$identify`,Rp=`$groupidentify`;function zp(e,t){wc(e)&&e.forEach(t)}function Bp(e,t){if(!jc(e))if(wc(e))e.forEach(t);else if((e=>e instanceof FormData)(e))e.forEach((e,n)=>t(e,n));else for(let n in e)Sc.call(e,n)&&t(e[n],n)}var Vp=function(e,...t){for(let n of t)for(let t in n)n[t]!==void 0&&(e[t]=n[t]);return e};function Hp(e){let t=Object.keys(e),n=t.length,r=Array(n);for(;n--;)r[n]=[t[n],e[t[n]]];return r}var Up=function(e){return function(...t){try{return e.apply(this,t)}catch(e){Wd.critical(`Implementation error. Please turn on debug mode and open a ticket on https://app.posthog.com/home#panel=support%3Asupport%3A.`),Wd.critical(e)}}},Wp=function(e){let t={};return Bp(e,function(e,n){(Oc(e)&&e.length>0||Mc(e))&&(t[n]=e)}),t};function Gp(e){let t=B({},e);for(let n of[`name`,`message`,`stack`,`cause`,`errors`])try{n in e&&(t[n]=e[n])}catch{}return t}var Kp=[`herokuapp.com`,`vercel.app`,`netlify.app`];function qp(e){let t=e?.hostname;if(!Oc(t))return!1;let n=t.split(`.`).slice(-2).join(`.`);for(let e of Kp)if(n===e)return!1;return!0}function Jp(e,t,n,r){let{capture:i=!1,passive:a=!0}=r??{};e?.addEventListener(t,n,{capture:i,passive:a})}function Yp(e){return e.name===`ph_toolbar_internal`}var Xp=e=>{if(tc){try{let t=e+`=`,n=tc.cookie.split(`;`).filter(e=>e.length);for(let e=0;n.length>e;e++){let r=n[e];for(;r.charAt(0)==` `;)r=r.substring(1,r.length);if(r.indexOf(t)===0)return decodeURIComponent(r.substring(t.length,r.length))}}catch{}return null}};Math.trunc||(Math.trunc=function(e){return 0>e?Math.ceil(e):Math.floor(e)}),Number.isInteger||(Number.isInteger=function(e){return Mc(e)&&isFinite(e)&&Math.floor(e)===e});var Zp=class e{constructor(e){if(this.bytes=e,e.length!==16)throw TypeError(`not 128-bit length`)}static fromFieldsV7(t,n,r,i){if(!Number.isInteger(t)||!Number.isInteger(n)||!Number.isInteger(r)||!Number.isInteger(i)||0>t||0>n||0>r||0>i||t>0xffffffffffff||n>4095||r>1073741823||i>4294967295)throw RangeError(`invalid field value`);let a=new Uint8Array(16);return a[0]=t/2**40,a[1]=t/2**32,a[2]=t/2**24,a[3]=t/2**16,a[4]=t/256,a[5]=t,a[6]=112|n>>>8,a[7]=n,a[8]=128|r>>>24,a[9]=r>>>16,a[10]=r>>>8,a[11]=r,a[12]=i>>>24,a[13]=i>>>16,a[14]=i>>>8,a[15]=i,new e(a)}toString(){let e=``;for(let t=0;this.bytes.length>t;t++)e=e+(this.bytes[t]>>>4).toString(16)+(15&this.bytes[t]).toString(16),t!==3&&t!==5&&t!==7&&t!==9||(e+=`-`);if(e.length!==36)throw Error(`Invalid UUIDv7 was generated`);return e}clone(){return new e(this.bytes.slice(0))}equals(e){return this.compareTo(e)===0}compareTo(e){for(let t=0;16>t;t++){let n=this.bytes[t]-e.bytes[t];if(n!==0)return Math.sign(n)}return 0}},Qp=class{generate(){let e=this.generateOrAbort();if(!z(e))return e;{this.Ct=0;let e=this.generateOrAbort();if(z(e))throw Error(`Could not generate UUID after timestamp reset`);return e}}generateOrAbort(){let e=(()=>{let e=Date.now();return Mc(e)&&isFinite(e)?Math.min(Math.max(Math.floor(e),0),0xffffffffffff):0})();if(e>this.Ct)this.Ct=e,this.Mt();else{if(this.Ct>=e+1e4)return;this.It++,this.It>4398046511103&&(this.Ct++,this.Mt())}return Zp.fromFieldsV7(this.Ct,Math.trunc(this.It/2**30),this.It&2**30-1,this.Tt.nextUint32())}Mt(){this.It=1024*this.Tt.nextUint32()+(1023&this.Tt.nextUint32())}constructor(){this.Ct=0,this.It=0,this.Tt=new eee}},$p=e=>{if(`u`>typeof UUIDV7_DENY_WEAK_RNG&&UUIDV7_DENY_WEAK_RNG)throw Error(`no cryptographically strong RNG available`);for(let t=0;e.length>t;t++)e[t]=65536*Math.trunc(65536*Math.random())+Math.trunc(65536*Math.random());return e};R&&!z(R.crypto)&&crypto.getRandomValues&&($p=e=>crypto.getRandomValues(e));var eee=class{nextUint32(){return this.Rt.length>this.$t||($p(this.Rt),this.$t=0),this.Rt[this.$t++]}constructor(){this.Rt=new Uint32Array(8),this.$t=1/0}},tee,em=()=>nee().toString(),nee=()=>(tee||=new Qp).generate(),tm=``,ree=/[a-z0-9][a-z0-9-]+\.[a-z]{2,}$/i,nm=null,rm={Et(){if(!Ac(nm))return nm;if(nm=!1,tc)try{let e=`__ph_cookie_support_${em()}`;rm.At(e,`xyz`),nm=Xp(e)===`"xyz"`,rm.Lt(e)}catch{nm=!1}return nm},Pt(e){Wd.error(`cookieStore error: `+e)},Ot:Xp,Dt(e){let t;try{t=JSON.parse(rm.Ot(e))||{}}catch{}return t},At(e,t,n,r,i){if(!tc)return!1;try{let a=``,o=``,s=function(e,t){if(t){let t=function(e,t=tc){if(tm)return tm;if(!t||[`localhost`,`127.0.0.1`].includes(e))return``;
12let n=e.split(`.`),r=Math.min(n.length,8),i=`dmn_chk_`+em();for(;!tm&&r--;){let e=n.slice(r).join(`.`),a=i+`=1;domain=.`+e+`;path=/`;t.cookie=a+`;max-age=3`,t.cookie.includes(i)&&(t.cookie=a+`;max-age=0`,tm=e)}return tm}(e);if(!t){let n=(e=>{let t=e.match(ree);return t?t[0]:``})(e);n!==t&&Wd.info(`Warning: cookie subdomain discovery mismatch`,n,t),t=n}return t?`; domain=.`+t:``}return``}(tc.location.hostname,r);if(n){let e=new Date;e.setTime(e.getTime()+864e5*n),a=`; expires=`+e.toUTCString()}i&&(o=`; secure`);let c=e+`=`+encodeURIComponent(JSON.stringify(t))+a+`; SameSite=Lax; path=/`+s+o;return c.length>3686.4&&Wd.warn(`cookieStore warning: large cookie, len=`+c.length),tc.cookie=c,!0}catch{return!1}},Lt(e,t){if(tc?.cookie&&(!t||!Ac(Xp(e))))try{rm.At(e,``,-1,t)}catch{return}}},im=null,am={Et(){if(!Ac(im))return im;let e=!0;if(z(R))e=!1;else try{let t=`__mplssupport__`;am.At(t,`xyz`),am.Ot(t)!==`"xyz"`&&(e=!1),am.Lt(t)}catch{e=!1}return e||Wd.error(`localStorage unsupported; falling back to cookie store`),im=e,e},Pt(e){Wd.error(`localStorage error: `+e)},Ot(e){try{return R?.localStorage.getItem(e)}catch(e){am.Pt(e)}return null},Dt(e){try{return JSON.parse(am.Ot(e))||{}}catch{}return null},At(e,t){try{return R?.localStorage.setItem(e,JSON.stringify(t)),!0}catch(e){am.Pt(e)}return!1},Lt(e){try{R?.localStorage.removeItem(e)}catch(e){am.Pt(e)}}},om=[Uf,Ff,Pf,Lf,Rf,zf,sp,op,ip],sm=[ef,$d,Df,Of,mp,pp,of,cp],cm=e=>e+`_cpm`,iee=[`__proto__`,`constructor`,`prototype`],lm=e=>{if(!Ec(e))return{};let t={};return Object.keys(e).forEach(n=>{iee.indexOf(n)===-1&&(t[n]=e[n])}),t},um=(e,t=[])=>{let n={};return[...sm,...t].forEach(t=>{let r=e[t];z(r)||Ac(r)||r===``||(n[t]=r)}),n},dm=e=>{let t=5381,n=2166136261;for(let r=0;e.length>r;r++){let i=e.charCodeAt(r);t=33*t^i,n=Math.imul(n^i,16777619)}return e.length.toString(36)+`.`+(t>>>0).toString(36)+`.`+(n>>>0).toString(36)},fm=(e,t)=>({p:t,f:dm(JSON.stringify(e))}),pm=(e,t)=>{if(!t)return{properties:[],isValid:!1};try{let n=rm.Dt(cm(e)),r=n?.f===dm(t)&&wc(n.p);return{properties:r?n.p:[],isValid:r}}catch{return{properties:[],isValid:!1}}},mm=(e,t)=>t+`|`+(rm.Ot(cm(e))||``),hm={},gm={Et:()=>!0,Pt(e){Wd.error(`memoryStorage error: `+e)},Ot:e=>e in hm?hm[e]:null,Dt:e=>e in hm?hm[e]:null,At:(e,t)=>(hm[e]=t,!0),Lt(e){delete hm[e]}},_m=null,vm={Et(){if(!Ac(_m))return _m;if(_m=!0,z(R))_m=!1;else try{let e=`__support__`;vm.At(e,`xyz`),vm.Ot(e)!==`"xyz"`&&(_m=!1),vm.Lt(e)}catch{_m=!1}return _m},Pt(e){Wd.error(`sessionStorage error: `,e)},Ot(e){try{return R?.sessionStorage.getItem(e)}catch(e){vm.Pt(e)}return null},Dt(e){try{return JSON.parse(vm.Ot(e))||null}catch{}return null},At(e,t){try{return R?.sessionStorage.setItem(e,JSON.stringify(t)),!0}catch(e){vm.Pt(e)}return!1},Lt(e){try{R?.sessionStorage.removeItem(e)}catch(e){vm.Pt(e)}}},aee=class{constructor(e){this._instance=e}get Rr(){return this._instance.config}get consent(){return this.No()?0:this.qo}isOptedOut(){return this.Rr.cookieless_mode===`always`||this.isRejected()||this.consent===-1&&this.Rr.cookieless_mode===`on_reject`}isOptedIn(){return!this.isOptedOut()}isExplicitlyOptedOut(){return this.consent===0}isRejected(){return this.consent===0||this.consent===-1&&this.Rr.opt_out_capturing_by_default}optInOut(e){this.jo.At(this.Bo,+!!e,this.Rr.cookie_expiration,this.Rr.cross_subdomain_cookie,this.Rr.secure_cookie)}reset(){this.jo.Lt(this.Bo,this.Rr.cross_subdomain_cookie)}get Bo(){let{token:e,opt_out_capturing_cookie_prefix:t,consent_persistence_name:n}=this._instance.config;return n||(t?t+e:`__ph_opt_in_out_`+e)}get qo(){let e=this.jo.Ot(this.Bo);return Uc(e)?1:_c(Wc,e)?0:-1}get jo(){let e=this.Rr.opt_out_capturing_persistence_type,t=e===`localStorage`?am:rm,n=t.Et()?t:gm;if(!this.Ho||this.Ho!==n){this.Ho=n;let t=e===`localStorage`?rm:am;t.Ot(this.Bo)&&(this.Ho.Ot(this.Bo)||this.optInOut(Uc(t.Ot(this.Bo))),t.Lt(this.Bo,this.Rr.cross_subdomain_cookie))}return this.Ho}No(){return!!this.Rr.respect_dnt&&[ec?.doNotTrack,ec?.msDoNotTrack,uc.doNotTrack,ec?.globalPrivacyControl].some(e=>Uc(e))}};function ym(e,t){var n;let r=e==null||(n=e.config)==null?void 0:n.get_current_url;if(!Tc(r))return t;try{let e=r(t);return Oc(e)&&e?e:t}catch(e){return Wd.error(`Error in get_current_url, falling back to window.location.href`,e),t}}function bm(e){return e instanceof Element&&(e.id===`__POSTHOG_TOOLBAR__`||!!e.closest?.call(e,`.toolbar-global-fade-container`))}function xm(e){return!!e&&e.nodeType===1}function Sm(e,t){return!!e&&!!e.tagName&&e.tagName.toLowerCase()===t.toLowerCase()}function Cm(e){return!!e&&e.nodeType===3}function wm(e){return!!e&&e.nodeType===11&&xm(e.host)}function Tm(e){return e?vc(e).split(/\s+/):[]}function Em(e,t){let n=function(e){var t;let n=R==null||(t=R.location)==null?void 0:t.href;return z(n)?void 0:ym(e,n)}(t);return!!(n&&e&&e.some(e=>n.match(e)))}function Dm(e){let t=``;switch(typeof e.className){case`string`:t=e.className;break;case`object`:t=(e.className&&`baseVal`in e.className?e.className.baseVal:null)||e.getAttribute(`class`)||``;break;default:t=``}return Tm(t)}
12function Om(e){return jc(e)?null:vc(e).split(/(\s+)/).filter(e=>Xm(e)).join(``).replace(/[\r\n]/g,` `).replace(/[ ]+/g,` `).substring(0,255)}function km(e){let t=``;return Um(e)&&!Wm(e)&&e.childNodes&&e.childNodes.length&&Bp(e.childNodes,function(e){Cm(e)&&e.textContent&&(t+=Om(e.textContent)??``)}),vc(t)}function Am(e){return z(e.target)?e.srcElement||null:e.target?.shadowRoot?e.composedPath()[0]||null:e.target||null}var jm=[`a`,`button`,`form`,`input`,`select`,`textarea`,`label`];function Mm(e,t){let n=e.matches||e.matchesSelector||e.msMatchesSelector||e.mozMatchesSelector||e.webkitMatchesSelector||e.oMatchesSelector;try{return!!n&&n.call(e,t)}catch{return!1}}function Nm(e,t){if(z(t))return!0;for(let n of e)if(t.some(e=>Mm(n,e)))return!0;return!1}function Pm(e){let t=e.parentNode;return!(!t||!xm(t))&&t}var Fm=[`.ph-no-autocapture`,`[data-ph-no-autocapture]`],Im=[`next`,`previous`,`prev`,`>`,`<`],Lm=[...Im,`+`,`-`,`â`,`â`],Rm=(e,t)=>/[a-z0-9]/i.test(t)?e.includes(t):e===t,zm=[`.ph-no-rageclick`,`.ph-no-capture`],oee=[``,`text`,`search`,`email`,`password`,`url`,`tel`,`number`];function Bm(e,t){if(!R||Vm(e))return!1;let n,r,i;var a;if(Pc(t)?(n=!!t&&zm,r=void 0,i=!1):(n=t?.css_selector_ignorelist??zm,r=t?.content_ignorelist,i=(a=t?.ignore_text_selection)!=null&&a),!1===n||i&&function(e){return!(!e||!xm(e))&&(!!Sm(e,`textarea`)||(Sm(e,`input`)?_c(oee,(e.getAttribute(`type`)||``).toLowerCase()):function(e){if(e.isContentEditable)return!0;let t=e.getAttribute?.call(e,`contenteditable`);return t===`true`||t===``}(e)))}(e))return!1;let{targetElementList:o}=Hm(e,!1);return!function(e,t){if(!1===e||z(e))return!1;let n;if(!0===e)n=Im;else{if(!wc(e))return!1;if(e.length>10)return Wd.error(`[PostHog] content_ignorelist array cannot exceed 10 items. Use css_selector_ignorelist for more complex matching.`),!1;n=e.map(e=>e.toLowerCase())}return t.some(({safeText:e,ariaLabel:t})=>n.some(n=>Rm(e,n)||Rm(t,n)))}(r,o.map(e=>({safeText:km(e).toLowerCase(),ariaLabel:e.getAttribute(`aria-label`)?.toLowerCase().trim()||``})))&&!Nm(o,n)}var Vm=e=>!e||Sm(e,`html`)||!xm(e),Hm=(e,t)=>{if(!R||Vm(e))return{parentIsUsefulElement:!1,targetElementList:[]};let n=!1,r=[e],i=e;for(;i.parentNode&&!Sm(i,`body`);){if(wm(i.parentNode)){r.push(i.parentNode.host),i=i.parentNode.host;continue}let e=Pm(i);if(!e)break;if(t||jm.indexOf(e.tagName.toLowerCase())>-1)n=!0;else try{let t=R.getComputedStyle(e);t&&t.getPropertyValue(`cursor`)===`pointer`&&(n=!0)}catch{}r.push(e),i=e}return{parentIsUsefulElement:n,targetElementList:r}};function Um(e){let t=new Set,n=0;for(let r=e;r.parentNode&&!Sm(r,`body`);r=r.parentNode){if(n++>=1e3||t.has(r))return!1;t.add(r);let e=Dm(r);if(_c(e,`ph-sensitive`)||_c(e,`ph-no-capture`))return!1}if(_c(Dm(e),`ph-include`))return!0;let r=e.type||``;if(Oc(r))switch(r.toLowerCase()){case`hidden`:case`password`:return!1}let i=e.name||e.id||``;return!Oc(i)||!/^cc|cardnum|ccnum|creditcard|csc|cvc|cvv|exp|pass|pwd|routing|seccode|securitycode|securitynum|socialsec|socsec|ssn/i.test(i.replace(/[^a-zA-Z0-9]/g,``))}function Wm(e){return!!(Sm(e,`input`)&&![`button`,`checkbox`,`submit`,`reset`].includes(e.type)||Sm(e,`select`)||Sm(e,`textarea`)||e.getAttribute(`contenteditable`)===`true`)}var Gm=RegExp(`^(?:(4[0-9]{12}(?:[0-9]{3})?)|(5[1-5][0-9]{14})|(6(?:011|5[0-9]{2})[0-9]{12})|(3[47][0-9]{13})|(3(?:0[0-5]|[68][0-9])[0-9]{11})|((?:2131|1800|35[0-9]{3})[0-9]{11}))$`),Km=/(^|[^0-9A-Za-z_])([0-9][0-9 -]*[0-9])(?=$|[^0-9A-Za-z_])/g,see=[16,15,14,13],cee=RegExp(`^(\\d{3}-?\\d{2}-?\\d{4})$`),qm=RegExp(`(^|[^0-9])((?!000|666)[0-9]{3}-?(?!00)[0-9]{2}-?(?!0000)[0-9]{4})(?=$|([^0-9]))`,`g`),Jm=/[0-9A-Za-z_]/;function Ym(e){let t=0,n=!1;for(let r=e.length-1;r>=0;r--){let i=e.charCodeAt(r)-48;n&&(i*=2,i>9&&(i-=9)),t+=i,n=!n}return t%10==0}function Xm(e,t=!0){return!(jc(e)||Oc(e)&&(e=vc(e),(t?Gm.test((e||``).replace(/[- ]/g,``)):function(e){let t;for(Km.lastIndex=0;t=Km.exec(e);){let e=t[2];if(!e)continue;let n=e.replace(/[- ]/g,``);for(let e=0;n.length>e;e++)for(let t of see){let r=e+t;if(n.length>=r){let t=n.slice(e,r);if(Gm.test(t)&&Ym(t))return!0}}}return!1}(e))||(t?cee.test(e):function(e){let t;for(qm.lastIndex=0;t=qm.exec(e);){let e=t[1],n=t[3];if(!(e&&n&&Jm.test(e)&&Jm.test(n)))return!0}return!1}(e))))}function Zm(e){let t=km(e);return t=`${t} ${Qm(e)}`.trim(),Xm(t)?t:``}function Qm(e){let t=``;return e&&e.childNodes&&e.childNodes.length&&Bp(e.childNodes,function(e){if(e&&e.tagName?.toLowerCase()===`span`)try{let n=km(e);t=`${t} ${n}`.trim(),e.childNodes&&e.childNodes.length&&(t=`${t} ${Qm(e)}`.trim())}catch(e){Wd.error(`[AutoCapture]`,e)}}),t}function $m(e){return e.replace(/"|\\"/g,`\\"`)}function eh(e){let t=e.attr__class;if(t)return wc(t)?t:Tm(t)}var th=Gd(`[Dead Clicks]`),nh=()=>!0,lee=e=>{let t=!!e.instance.persistence?.get_property(gf),n=e.instance.config.capture_dead_clicks;return Pc(n)?n:!!Ec(n)||t},rh=class{get lazyLoadedDeadClicksAutocapture(){return this.zo}constructor(e,t,n){this.instance=e,this.isEnabled=t,this.onCapture=n,this.startIfEnabledOrStop()}onRemoteConfig(e){if(!e.ok)return;let t=e.config;`captureDeadClicks`in t&&(this.instance.persistence&&this.instance.persistence.register({[gf]:t.captureDeadClicks}),this.startIfEnabledOrStop())}startIfEnabledOrStop(){this.isEnabled(this)?this.Uo(()=>{this.Wo()}):this.stop()}Uo(e){var t,n;uc.__PosthogExtensions__?.initDeadClicksAutocapture?e():(t=uc.__PosthogExtensions__)==null||(n=t.loadExternalDependency)==null||n.call(t,this.instance,`dead-clicks-autocapture`,t=>{t?th.error(`failed to load script`,t):e()})}Wo(){if(tc){if(!this.zo&&uc.__PosthogExtensions__?.initDeadClicksAutocapture){let e=Ec(this.instance.config.capture_dead_clicks)?B({},this.instance.config.capture_dead_clicks):{};e.__onCapture=this.onCapture,this.onCapture&&(e.capture_dead_swipes=!1),this.zo=uc.__PosthogExtensions__.initDeadClicksAutocapture(this.instance,e),this.zo.start(tc),th.info(`starting...`)}}else th.error("`document` not found. Cannot start.")}stop(){this.zo&&(this.zo.stop(),this.zo=void 0,th.info(`stopping...`))}},ih=Gd(`[SegmentIntegration]`);function ah(e,t,n=!0){let r=e.config.segment;if(!r)return t();let{analytics:i,filterProperties:a}=(e=>Tc(e.register))(o=r)?{analytics:o}:o;var o;(function(e,t,n,r){let i=t=>{let i=()=>t.anonymousId()||em();e.config.get_device_id=i,r&&t.id()&&(e.register({distinct_id:t.id(),$device_id:i()}),e.persistence.set_property(cp,jp)),n(r?void 0:t.anonymousId()||void 0)},a=t.user();`then`in a&&Tc(a.then)?a.then(i):i(a)})(e,i,n=>{i.register(((e,t,{filterProperties:n}={})=>{typeof Promise<`u`&&Promise.resolve||ih.warn(`This browser does not have Promise support, and can not use the segment integration`);let r=(r,i)=>{if(!i)return r;let a=!!t&&r.event.anonymousId===t&&!r.event.userId;a||r.event.userId||r.event.anonymousId===e.get_distinct_id()||(ih.info(`No userId set, resetting PostHog`),e.reset()),a||(t=void 0),r.event.userId&&r.event.userId!==e.get_distinct_id()&&(ih.info(`UserId set, identifying with PostHog`),e.identify(r.event.userId)
12);let o=e.calculateEventProperties(i,r.event.properties);if(!jc(n)){let e=r.event.properties||{},t={};for(let n of Object.keys(o))Sc.call(e,n)||(t[n]=o[n]);let i=((e,t)=>{let n=wc(e)?e:[e],r=B({},t);for(let e of n)try{if(r=e(r),jc(r))return null}catch(e){return ih.error(`Error in Segment filterProperties:`,e),null}return r})(n,t);if(jc(i))return r;o=i}return r.event.properties=Object.assign({},o,r.event.properties),r};return{name:`PostHog JS`,type:`enrichment`,version:`1.0.0`,isLoaded(){return!0},load(){return Promise.resolve()},track(e){return r(e,e.event.event)},page(e){return r(e,Fp)},identify(e){return r(e,Lp)},screen(e){return r(e,`$screen`)}}})(e,n,{filterProperties:a})).then(()=>{t()},e=>{ih.error(`Failed to register the Segment integration`,e),t()})},n)}var oh=`posthog-js`;function sh(e,{organization:t,projectId:n,prefix:r,severityAllowList:i=[`error`],sendExceptionsToPostHog:a=!0}={}){return o=>{if(i!==`*`&&!i.includes(o.level)||!e.__loaded)return o;o.tags||={};let s=e.requestRouter.endpointFor(`ui`,`/project/${e.config.token}/person/${e.get_distinct_id()}`);o.tags[`PostHog Person URL`]=s,e.sessionRecordingStarted()&&(o.tags[`PostHog Recording URL`]=e.get_session_replay_url({withTimestamp:!0}));let c=o.exception?.values||[],l=c.map(e=>B(B({},e),{},{stacktrace:e.stacktrace?B(B({},e.stacktrace),{},{type:`raw`,frames:(e.stacktrace.frames||[]).map(e=>B(B({},e),{},{platform:`web:javascript`}))}):void 0})),u={$exception_message:c[0]?.value||o.message,$exception_type:c[0]?.type,$exception_level:o.level,$exception_list:l,$sentry_event_id:o.event_id,$sentry_exception:o.exception,$sentry_exception_message:c[0]?.value||o.message,$sentry_exception_type:c[0]?.type,$sentry_tags:o.tags};var d;return t&&n&&(u.$sentry_url=(r||`https://sentry.io/organizations/`)+t+`/issues/?project=`+n+`&query=`+o.event_id),a&&((d=e.exceptions)==null||d.sendExceptionEvent(u)),o}}var uee=class{constructor(e,t,n,r,i,a){this.name=oh,this.setupOnce=function(o){o(sh(e,{organization:t,projectId:n,prefix:r,severityAllowList:i,sendExceptionsToPostHog:a==null||a}))}}},ch=class{constructor(e){this.Vo=(e,t,n)=>{n&&(n.noSessionId||n.activityTimeout||n.sessionPastMaximumLength||n.crossTabAdoption)&&(Wd.info(`[PageViewManager] Session rotated, clearing pageview state`,{sessionId:e,changeReason:n}),this.Go=void 0,this._instance.scrollManager.resetContext())},this._instance=e,this.Zo()}Zo(){this.Qo=this._instance.sessionManager?.onSessionId(this.Vo)}destroy(){var e;(e=this.Qo)==null||e.call(this),this.Qo=void 0}doPageView(e,t){let n=this.Jo(e,t);return this.Go={pathname:R?.location.pathname??``,pageViewId:t,timestamp:e},this._instance.scrollManager.resetContext(),n}doPageLeave(e){return this.Jo(e,this.Go?.pageViewId)}doEvent(){return{$pageview_id:this.Go?.pageViewId}}Jo(e,t){let n=this.Go;if(!n)return{$pageview_id:t};let r={$pageview_id:t,$prev_pageview_id:n.pageViewId},i=this._instance.scrollManager.getContext();if(i&&!this._instance.config.disable_scroll_properties){let{maxScrollHeight:e,lastScrollY:t,maxScrollY:n,maxContentHeight:a,lastContentY:o,maxContentY:s}=i;if(!(z(e)||z(t)||z(n)||z(a)||z(o)||z(s))){e=Math.ceil(e),t=Math.ceil(t),n=Math.ceil(n),a=Math.ceil(a),o=Math.ceil(o),s=Math.ceil(s);let i=e>1?Yc(t/e,0,1,Wd):1,c=e>1?Yc(n/e,0,1,Wd):1,l=a>1?Yc(o/a,0,1,Wd):1,u=a>1?Yc(s/a,0,1,Wd):1;r=Vp(r,{$prev_pageview_last_scroll:t,$prev_pageview_last_scroll_percentage:i,$prev_pageview_max_scroll:n,$prev_pageview_max_scroll_percentage:c,$prev_pageview_last_content:o,$prev_pageview_last_content_percentage:l,$prev_pageview_max_content:s,$prev_pageview_max_content_percentage:u})}}return n.pathname&&(r.$prev_pageview_pathname=n.pathname),n.timestamp&&(r.$prev_pageview_duration=(e.getTime()-n.timestamp.getTime())/1e3),r}},lh=[`flags`,`surveys`],dee={[Qd]:{exposure:`hidden`},[nf]:{exposure:`hidden`},[rf]:{exposure:`hidden`},[lf]:{exposure:`hidden`},[of]:{exposure:`hidden`},[cf]:{exposure:`hidden`},[uf]:{exposure:`event`},[df]:{exposure:`hidden`},[vf]:{exposure:`hidden`},[ff]:{exposure:`event`},[pf]:{exposure:`hidden`},[mf]:{exposure:`event`},[hf]:{exposure:`event`},[gf]:{exposure:`event`},[_f]:{exposure:`hidden`},[yf]:{exposure:`event`},[bf]:{exposure:`hidden`},[xf]:{exposure:`hidden`},[Df]:{exposure:`hidden`},[Of]:{exposure:`event`},[Sf]:{exposure:`event`,shouldSkipFromEventProperties:e=>Ac(e)},[kf]:{exposure:`event`},[Af]:{exposure:`event`},[jf]:{exposure:`event`},[Mf]:{exposure:`event`},[Nf]:{exposure:`hidden`},[Pf]:{exposure:`hidden`,storageGroup:`flags`},[Ff]:{exposure:`hidden`,storageGroup:`flags`},[If]:{exposure:`hidden`},[Lf]:{exposure:`hidden`,storageGroup:`flags`},[Rf]:{exposure:`hidden`,storageGroup:`flags`},[zf]:{exposure:`hidden`,storageGroup:`flags`,volatile:!0},[Bf]:{exposure:`hidden`,storageGroup:`flags`},[Vf]:{exposure:`hidden`},[Hf]:{exposure:`hidden`},[Uf]:{exposure:`hidden`},[Wf]:{exposure:`hidden`},[Kf]:{exposure:`hidden`,storageGroup:`surveys`},[qf]:{exposure:`hidden`,storageGroup:`surveys`,volatile:!0},[Jf]:{exposure:`event`},[Yf]:{exposure:`hidden`},[Xf]:{exposure:`hidden`},[Zf]:{exposure:`hidden`},[Qf]:{exposure:`hidden`},[$f]:{exposure:`hidden`},[ep]:{exposure:`event`},[tp]:{exposure:`event`}
12,[np]:{exposure:`event`},[rp]:{exposure:`event`},[ip]:{exposure:`hidden`},[ap]:{exposure:`hidden`},[Gf]:{exposure:`event`},[op]:{exposure:`hidden`},[sp]:{exposure:`hidden`,storageGroup:`flags`,volatile:!0},[cp]:{exposure:`hidden`},[lp]:{exposure:`hidden`},[up]:{exposure:`hidden`},[dp]:{exposure:`hidden`},[fp]:{exposure:`hidden`},[pp]:{exposure:`hidden`},[mp]:{exposure:`hidden`},[Cf]:{exposure:`event`},[wf]:{exposure:`event`},[Tf]:{exposure:`event`},[Ef]:{exposure:`event`},[_p]:{exposure:`event`},[vp]:{exposure:`event`},[yp]:{exposure:`event`},[bp]:{exposure:`event`},[xp]:{exposure:`event`},[Sp]:{exposure:`event`},[Cp]:{exposure:`event`},[wp]:{exposure:`event`},[Tp]:{exposure:`event`},[Ep]:{exposure:`event`},[Dp]:{exposure:`event`},[Op]:{exposure:`event`}},fee=[[`$posthog_sr_group_event_trigger_`,{exposure:`hidden`}],[`$posthog_sr_group_url_trigger_`,{exposure:`hidden`}],[`$posthog_sr_group_sampling_`,{exposure:`hidden`}]],uh=e=>{let t=dee[e];if(t)return t;for(let[t,n]of fee)if(e.indexOf(t)===0)return n},dh=(e,t)=>{try{let n;return JSON.stringify(e,(e,t)=>zc(t)?(n??=new WeakMap,n.has(t)||n.set(t,Gp(t)),n.get(t)):typeof t==`bigint`?t.toString():t,t)}catch{return bc(e)}},fh=e=>{let t=tc?.createElement(`a`);return z(t)?null:(t.href=e,t)},ph=function(e,t){let n=((e.split(`#`)[0]||``).split(/\?(.*)/)[1]||``).replace(/^\?+/g,``).split(`&`),r;for(let e=0;n.length>e;e++){let i=n[e].split(`=`);
12if(i[0]===t){r=i;break}}if(!wc(r)||2>r.length)return``;{let e=r[1];try{e=decodeURIComponent(e)}catch{Wd.error(`Skipping decoding for malformed query param: `+e)}return e.replace(/\+/g,` `)}},mh=function(e,t,n){if(!e||!t||!t.length)return e;let r=e.split(`#`),i=r[1],a=(r[0]||``).split(`?`),o=a[1],s=a[0],c=(o||``).split(`&`),l=[];for(let e=0;c.length>e;e++){let r=c[e].split(`=`);wc(r)&&(t.includes(r[0])?l.push(r[0]+`=`+n):l.push(c[e]))}let u=s;return o!=null&&(u+=`?`+l.join(`&`)),i!=null&&(u+=`#`+i),u},hh=function(e,t){let n=e.match(RegExp(t+`=([^&]*)`));return n?n[1]:null},gh=(e,t)=>e>=t&&cc(),_h=(e,t,n,r)=>{if(e===0){if(cc()){let e=t+1;return e===n&&r(),e}return t}return 0},vh=[`gclid`,`gclsrc`,`dclid`,`gbraid`,`wbraid`,`fbclid`,`msclkid`,`twclid`,`li_fat_id`,`igshid`,`ttclid`,`rdt_cid`,`epik`,`qclid`,`sccid`,`irclid`,`_kx`],pee=[`utm_source`,`utm_medium`,`utm_campaign`,`utm_content`,`utm_term`,`gad_source`,`mc_cid`,...vh],yh=`<masked>`,mee=[`li_fat_id`];function bh(e,t,n){if(!tc)return{};let r=t?[...vh,...n||[]]:[],i=xh(mh(tc.URL,r,yh),e);return Vp(function(){let e={};return Bp(mee,function(t){e[t]=Xp(t)||null}),e}(),i)}function xh(e,t){let n=pee.concat(t||[]),r={};return Bp(n,function(t){r[t]=ph(e,t)||null}),r}function Sh(e){let t=function(e){return e?e.search(`https?://(.*)google.([^/?]*)`)===0?`google`:e.search(`https?://(.*)bing.com`)===0?`bing`:e.search(`https?://(.*)yahoo.com`)===0?`yahoo`:e.search(`https?://(.*)duckduckgo.com`)===0?`duckduckgo`:null:null}(e),n=t==`yahoo`?`p`:`q`,r={};if(!Ac(t)){r.$search_engine=t;let e=tc?ph(tc.referrer,n):``;e.length&&(r.ph_keyword=e)}return r}function Ch(){return navigator.language||navigator.userLanguage}function hee(){let e=Ch();return typeof e==`string`?e.split(`-`)[0]:void 0}var wh=`$direct`;function Th(){return tc?.referrer||wh}function Eh(e,t,n=!1){let r=e?[...vh,...t||[]]:[],i=(n?lu(nc?.href):nc?.href)?.substring(0,1e3);return{r:Th().substring(0,1e3),u:i?mh(i,r,yh):void 0}}function Dh(e,t=!1){let{r:n,u:r}=e,i=t?lu(r):r,a={$referrer:n,$referring_domain:n==null?void 0:n==wh?wh:fh(n)?.host};if(i){a.$current_url=i;let e=fh(i);a.$host=e?.host,a.$pathname=e?.pathname,Vp(a,xh(i))}return n&&Vp(a,Sh(n)),a}function Oh(){try{return Intl.DateTimeFormat().resolvedOptions().timeZone}catch{return}}function gee(){try{return new Date().getTimezoneOffset()}catch{return}}var _ee={flags:sp,surveys:qf},vee=[`cookie`,`localstorage`,`localstorage+cookie`,`sessionstorage`,`memory`],kh=e=>`${e}_cookie_identity_change_pending`,Ah=e=>{let t=``,n=0;for(let r of e){let e=encodeURIComponent(JSON.stringify(r).slice(1,-1)).length;if(n+e>1e3)break;t+=r,n+=e}return t},jh=`main`,Mh=[Pf,Ff,Lf,Rf,zf,sp,Bf,Uf],Nh=e=>Mh.indexOf(e)!==-1,Ph=[of,cf],Fh=e=>Ph.indexOf(e)!==-1,Ih=(e,t)=>{try{return JSON.stringify(e)===JSON.stringify(t)}catch{return e===t}},Lh=e=>{if(!e)return{};let t=JSON.parse(e);return Ec(t)?t:{}},Rh=(e,t)=>{Bp(e,(n,r)=>{let i=uh(r);i&&i.exposure!==`event`||{}.hasOwnProperty.call(t,r)||delete e[r]})},zh=class{constructor(e,t,n=!0){if(this.Ko={},this.Xo=!1,this.Yo=!1,this.ta=!1,this.ea=!1,this.ia=!1,this.na=new Map,this.sa=!1,this.ra=!1,this.oa=!1,this.aa=new Set,this.la=new Set,this.Rr=e,this.ua=n,this.props={},this.ha=void 0,this.ca=(e=>{let t=``;return e.token&&(t=e.token.replace(/\+/g,`PL`).replace(/\//g,`SL`).replace(/=/g,`EQ`)),e.persistence_name?`ph_`+e.persistence_name:`ph_`+t+`_posthog`})(e),this.mi=e.disable_persistence||!!t,this.jo=this.da(e),this.ta=this.va(e),this.load(),this.fa(),e.debug&&Wd.info(`Persistence loaded`,e.persistence,B({},this.props)),this.update_config(e,e,t),this.save(),R){let e=()=>this.flush();Jp(R,`beforeunload`,e,{capture:!1}),Jp(R,`pagehide`,e,{capture:!1}),this.pa=e=>{if(this.Xo&&(!e.storageArea||e.storageArea===R?.localStorage)&&e.key)if(e.key!==this.ca){if(this.ta){let t=lh.find(t=>e.key===this.ga(t));t&&this.ma(e.key,t)}}else this.ma(e.key,jh)},Jp(R,`storage`,this.pa)}}markCrossTabFeatureFlagChanges(e){Object.entries(e).forEach(([e,t])=>{let n=this.na.get(e);if(!Nh(e)||!0===n)return;if(!0===t)return void this.ya(e,!0);let r=new Set(n||[]);t.forEach(e=>r.add(e)),r.size&&this.ya(e,r)})}onCrossTabFeatureFlagChange(e){return this.la.add(e),()=>this.la.delete(e)}destroy(){this.pa&&R&&(R.removeEventListener(`storage`,this.pa),this.pa=void 0),this.la.clear()}ma(e,t,n=!0){if(this.mi)return!1;let r,i;try{if(i=am.Ot(e),Ac(i)){let e=this.ba(t);return e.storageValue=null,t!==jh&&(e.persisted=!1),!1}r=Lh(i)}catch{return!1}let a=t===jh?r:am.Dt(this.ca);if(a&&this._a(a))return!1;let o=this.wa(r,t,n);return t===jh&&this.ta&&!Ih(this.ka().main,r)||this.Sa(r,t,!0,i),o}_a(e){let t=this.props[$d],n=e[$d];return!z(t)&&!z(n)&&t!==n}Sa(e,t,n,r){let i=this.ba(t);i.storageValue=r,t!==jh&&(i.persisted=n);try{i.fingerprint=this.xa(e,t)}catch{i.fingerprint=void 0}}
12wa(e,t,n){let r=!1;return Mh.forEach(n=>{let i=uh(n)?.storageGroup;if(t===jh&&this.ta&&i||t!==jh&&i!==t)return;let a=n in e,o=this.Ca(n,a?e[n]:void 0),s=this.na.has(n)?n in this.props:a;s===n in this.props&&Ih(o,this.props[n])||(s?this.$a(n,o,!1):this.Ta(n,!1),r=!0)}),r&&n&&this.la.forEach(e=>e()),r}Ia(){if(!this.Xo)return!1;try{this.oa=!1;let e=am.Ot(this.ca),t=this.ba(jh),n,r=!1,i=!1;if(e!==t.storageValue)if(Ac(e))t.storageValue=null;else{if(n=Lh(e),this.oa=!this.ra&&this._a(n),this.oa)return!1;i=this.wa(n,jh,!1),!this.ta||Ih(this.ka().main,n)?this.Sa(n,jh,!0,e):t.storageValue=e,r=!0}return this.ta&&lh.forEach(e=>{let t=am.Ot(this.ga(e)),a=this.ba(e),o=n||{},s=r&&Mh.some(t=>uh(t)?.storageGroup===e&&t in o);if(t===a.storageValue&&!s)return;if(Ac(t))return a.storageValue=null,a.persisted=!1,void(s&&(i=this.wa(o,e,!1)||i));let c=Lh(t);i=this.wa(c,e,!1)||i,this.Sa(c,e,!0,t)}),i}catch{return!1}}ya(e,t){this.na.set(e,t);let n=uh(e);n!=null&&n.volatile||(this.ba((this.ta?n?.storageGroup:void 0)||jh).fingerprint=void 0,this.Ma(e))}Ea(){Mh.forEach(e=>this.na.set(e,!0))}fa(){if(this.Xo)try{let e=am.Ot(this.ca),t=Lh(e);this.ba(jh).storageValue=e,Mh.forEach(e=>{let n=this.ta?uh(e)?.storageGroup:void 0,r=n?am.Ot(this.ga(n)):null;if(n){let e=this.ba(n);e.storageValue=r,e.persisted=!Ac(r)}let i=n&&!Ac(r)?Lh(r):t;e in this.props?this.Pa(e,i[e],this.props[e]):e in i&&this.ya(e,!0)})}catch{}}Ca(e,t){let n=this.na.get(e);if(!n)return t;if(!0===n)return this.props[e];if(e===`$active_feature_flags`){let r=new Set(wc(t)?t:[]),i=new Set(wc(this.props[e])?this.props[e]:[]);return n.forEach(e=>i.has(e)?r.add(e):r.delete(e)),Array.from(r)}let r=Ec(t)?B({},t):{},i=Ec(this.props[e])?this.props[e]:{};return n.forEach(e=>{e in i?r[e]=i[e]:delete r[e]}),r}Pa(e,t,n){if(!Nh(e))return;let r=this.na.get(e);if(!0===r)return;let i=t;if(this.Xo)try{let t=this.ta?uh(e)?.storageGroup:void 0,n=t?this.ga(t):this.ca;i=Lh(am.Ot(n))[e]}catch{}let a=new Set(r||[]);if(e===`$active_feature_flags`){if(!z(t)&&!wc(t)||!z(i)&&!wc(i)||!wc(n))return void this.ya(e,!0);let r=new Set(t||[]),o=new Set(i||[]),s=new Set(n);new Set([...r,...s]).forEach(e=>{r.has(e)!==s.has(e)&&a.add(e)}),a.forEach(e=>{o.has(e)===s.has(e)&&a.delete(e)})}else{if(!Ec(n))return void(Ih(i,n)?this.na.delete(e):this.ya(e,!0));{if(!z(t)&&!Ec(t)||z(t)&&Dc(n)&&z(i))return void this.ya(e,!0);let r=Ec(t)?t:{},o=Ec(i)?i:{};new Set([...Object.keys(r),...Object.keys(n)]).forEach(e=>{e in r==e in n&&Ih(r[e],n[e])||a.add(e)}),a.forEach(e=>{e in o==e in n&&Ih(o[e],n[e])&&a.delete(e)})}}a.size?this.ya(e,a):this.na.delete(e)}Ra(){let e=this.Rr?.persistence_save_debounce_ms;return Mc(e)&&e>0?e:0}Aa(e){if(this.Rr.cookieWinsOnConflict&&this.Rr.persistence.toLowerCase()===`localstorage+cookie`)if(e)try{let t=um(e,this.Rr.cookie_persisted_properties||[]),n=fm(t,this.Rr.cookie_persisted_properties||[]),r=JSON.stringify(t)+`|`+JSON.stringify(n),i=rm.Ot(this.ca)||void 0;i&&mm(this.ca,i)===r&&(this.Fa=r,this.Oa=i)}catch{}else try{let e=rm.Ot(this.ca)||void 0;this.Fa=e?mm(this.ca,e):void 0,this.Oa=e}catch{}}syncCookieProperties(){return this.Da(this.Rr)}Da(e,t=!1){if(this.mi&&!t||this.ia||!e.cookieWinsOnConflict||e.persistence.toLowerCase()!==`localstorage+cookie`)return!1;let n;try{n=rm.Ot(this.ca)||void 0}catch{}if(!n||n===this.Oa)return!1;let r=mm(this.ca,n),i;try{i=lm(JSON.parse(n))}catch{return!1}if((rm.Ot(this.ca)||void 0)!==n)return!1;this.Fa=r,this.Oa=n;let a=pm(this.ca,n),o=[...sm,...a.properties],s={};
12if(Object.keys(i).forEach(e=>{let t=i[e];(z(t)||Ac(t)||t===``||e===`$user_state`&&t!==`anonymous`&&t!==`identified`)&&(s[e]=!0,delete i[e])}),Dc(i))return!1;let c=`distinct_id`in i||i.$user_state===`anonymous`||i.$user_state===`identified`,l=this.props,u=l[$d],d=l[cp],f=Vp({},l);[...sm,...e.cookie_persisted_properties||[]].forEach(e=>{if(o.indexOf(e)!==-1&&!(e in i)&&!s[e]&&(c||e!==`distinct_id`&&e!==`$user_state`)){let t=f[e];(a.isValid||sm.indexOf(e)===-1||!1!==t&&t!==0)&&delete f[e]}}),this.props=Vp(f,i),Mh.forEach(e=>{let t=e in this.props;e in l===t&&Ih(l[e],this.props[e])||(t?this.Pa(e,l[e],this.props[e]):this.ya(e,!0))}),!c||`$user_state`in i||`$user_state`in this.props||this.$a(cp,Ap);let p=this.props[$d],m=this.props[cp];return!c||p===u&&m===d||(this.ra=!0,this.ea=!0,vm.At(kh(this.ca),!0),this.Ta(Uf),this.Ta(Ff),this.Ta(Pf),this.Ta(Lf),this.Ta(Rf),this.Ta(zf),this.Ta(sp),this.Ta(op),this.Ta(ip),m!==`anonymous`||d!==`identified`&&i.$user_state!==`anonymous`&&(z(u)||p===u)||(Rh(this.props,i),this.Ta(Wf)),m===`identified`?this.props.$user_id=p:delete this.props.$user_id,this.Ta(nf)),!0}
12consumeCookieIdentityChange(){let e=kh(this.ca),t=this.ea||!!vm.Ot(e);return this.ea=!1,t&&vm.Lt(e),t}La(e=!1){return!(this.ia||this.mi&&!e||!this.Rr.cookieWinsOnConflict||this.Rr.persistence.toLowerCase()!==`localstorage+cookie`||(this.ia=!0,0))}Na(){this.ia&&(z(this.qa)||(clearTimeout(this.qa),this.qa=void 0),delete this.Ko[jh],this.ja(!0))}Ba(e=!0){if(this.ia)try{e?this.Na():z(this.qa)||(clearTimeout(this.qa),this.qa=void 0)}finally{this.ia=!1}}isDisabled(){return!!this.mi}da(e){vee.indexOf(e.persistence.toLowerCase())===-1&&(Wd.critical(`Unknown persistence type `+e.persistence+`; falling back to localStorage+cookie`),e.persistence=`localStorage+cookie`);let t=((e=[],t=!1)=>{let n=[...sm,...e];return B(B({},am),{},{Dt(e){try{let r,i={};try{r=rm.Ot(e)||void 0,i=r?lm(JSON.parse(r)):{}}catch{}let a=JSON.parse(am.Ot(e)||`{}`),o;if(t){let t=pm(e,r),s=[...sm,...t.properties],c={};Object.keys(i).forEach(e=>{let t=i[e];Ac(t)||t===``||e===`$user_state`&&t!==`anonymous`&&t!==`identified`||(c[e]=t)});let l=`distinct_id`in c||c.$user_state===`anonymous`||c.$user_state===`identified`;if(Object.keys(c).length>0){let e=a[$d],r=a.$user_state??Ap;n.forEach(e=>{if(s.indexOf(e)!==-1&&!(e in i)&&(l||e!==`distinct_id`&&e!==`$user_state`)){let n=a[e];(t.isValid||sm.indexOf(e)===-1||!1!==n&&n!==0)&&delete a[e]}}),!l||`$user_state`in i||`$user_state`in a||(a[cp]=Ap),!l||(`distinct_id`in c?c[$d]:a[$d])===e&&(`$user_state`in c?c[cp]:a[cp])===r||(om.forEach(e=>delete a[e]),c.$user_state===`identified`&&`distinct_id`in c?a.$user_id=c[$d]:delete a.$user_id,c.$user_state!==`identified`&&(delete a[Gf],delete a[Wf]),delete a.__alias)}o=Vp(a,c)}else o=Vp(i,a);return am.At(e,o),o}catch{}return null},At(n,r,i,a,o,s){let c=am.At(n,r,void 0,void 0,s);try{let l=um(r,e);if(Object.keys(l).length){if(t){let t=cm(n),u=fm(l,e);if(rm.At(t,u,i,a,o,s),rm.Ot(t)!==JSON.stringify(u)){rm.Lt(t,a);let e=um(r);return rm.At(n,e,i,a,o,s),c}}rm.At(n,l,i,a,o,s)}}catch(e){am.Pt(e)}return c},Lt(e,t){try{R?.localStorage.removeItem(e),rm.Lt(e,t),rm.Lt(cm(e),t)}catch(e){am.Pt(e)}}})})(e.cookie_persisted_properties||[],e.cookieWinsOnConflict),n,r=!1,i=!1,a=e.persistence.toLowerCase();return a===`localstorage`&&am.Et()?(n=am,i=!0):a===`localstorage+cookie`&&t.Et()?(n=t,i=!0,r=!0):a===`sessionstorage`&&vm.Et()?n=vm:a===`memory`?n=gm:a===`cookie`&&rm.Et()?(n=rm,r=!0):t.Et()?(n=t,i=!0,r=!0):rm.Et()?(n=rm,r=!0):n=gm,this.Xo=i,this.Yo=r,n}ga(e){return`${this.ca}__${e}`}va(e){return this.Xo&&!!e.split_storage}properties(){let e={};return Bp(this.props,(t,n)=>{let r=uh(n);if(!r||r.exposure===`event`){var i;if(!(r==null||(i=r.shouldSkipFromEventProperties)==null)&&i.call(r,t))return;e[n]=t}}),e}load(e=!1){if(this.mi&&!e)return;let t=this.Rr.cookieWinsOnConflict&&this.Rr.persistence.toLowerCase()===`localstorage+cookie`,n=t?am.Dt(this.ca):null,r={};if(t)try{r=lm(rm.Dt(this.ca)),Bp(r,(e,t)=>{(z(e)||Ac(e)||e===``)&&delete r[t]})}catch{}let i=this.jo.Dt(this.ca);if(i&&(this.props=Vp({},i)),this.ta&&this.Ha(),t&&i){let e=n?.[$d],t=n?.$user_state??Ap,a=i[$d],o=i.$user_state??Ap;if(a!==e||o!==t){this.ea=!0,vm.At(kh(this.ca),!0);let n=Vp({},this.props);om.forEach(e=>delete n[e]),o!==`anonymous`||t!==`identified`&&r.$user_state!==`anonymous`&&(z(e)||a===e)||(Rh(n,r),delete n[Wf]),this.props=n;let i=new Set;om.forEach(e=>{let t=uh(e)?.storageGroup;t&&i.add(t)}),i.forEach(e=>{let t={};Bp(this.props,(n,r)=>{uh(r)?.storageGroup===e&&(t[r]=n)}),Dc(t)?(am.Lt(this.ga(e)),this.Ko[e]={}):am.At(this.ga(e),t)&&(this.Ko[e]={persisted:!0,fingerprint:this.xa(t,e)})})}}vm.Ot(kh(this.ca))&&(this.ea=!0)}Ha(){for(let e of lh){let t=am.Dt(this.ga(e));if(t&&!Dc(t)){let n=this.ba(e);n.persisted=!0,this.za(e)||(n.fingerprint=this.xa(t,e)),this.Ua(e,t)||Vp(this.props,t)}}}za(e){return Object.keys(this.props).some(t=>uh(t)?.storageGroup===e)}Ua(e,t){let n=_ee[e];if(!n)return!1;let r=t[n],i=this.props[n];return Mc(r)&&Mc(i)&&i>r}refreshKey(e){if(this.mi||this.aa.has(e))return;let t=this.ta?uh(e)?.storageGroup:void 0,n=t?am.Dt(this.ga(t)):this.jo.Dt(this.ca);if(n&&e in n)this.$a(e,n[e],!1);else{if(t){let t=this.jo.Dt(this.ca);if(t&&e in t)return void this.$a(e,t[e],!1)}this.Ta(e,!1)}}save(){if(this.mi)return;let e=this.Ra();e>0?z(this.qa)&&(this.qa=setTimeout(()=>{this.qa=void 0,this.ja()},e)):this.ja()}flush(){z(this.qa)||(clearTimeout(this.qa),this.qa=void 0,this.ja())}ja(e=!1){if(this.mi||this.ia&&!e)return;e||(this.syncCookieProperties(),this.Rr.cookieWinsOnConflict&&this.Rr.persistence.toLowerCase()===`localstorage+cookie`||Ph.forEach(e
12=>this.refreshKey(e)));let t=!e&&!this.sa;t||(this.oa=!1);let n=!!t&&this.Ia();if(this.oa)return void(this.Rr.debug&&Wd.warn(`skipping persistence write because storage belongs to a different distinct ID`));if(this.ta)return this.Wa(),void(n&&this.la.forEach(e=>e()));let r=this.Va(this.jo,this.ca,this.props,jh);r===`written`&&this.Aa(this.props),r!==`failed`&&(this.na.clear(),this.ra=!1,this.aa.clear()),n&&this.la.forEach(e=>e())}Wa(){let{main:e,groups:t}=this.ka(),n=this.Va(this.jo,this.ca,e,jh);n===`written`&&this.Aa(e),n!==`failed`&&(this.ra=!1,this.aa.clear(),Mh.forEach(e=>{var t;(t=uh(e))!=null&&t.storageGroup||this.na.delete(e)}));for(let e of lh){let n=t[e];if(Dc(n)&&!this.Ko[e]?.persisted){Mh.forEach(t=>{uh(t)?.storageGroup===e&&this.na.delete(t)});continue}let r=this.Va(am,this.ga(e),n,e);r!==`failed`&&Mh.forEach(t=>{let n=uh(t);n?.storageGroup!==e||r!==`written`&&n.volatile||this.na.delete(t)})}}ka(){let e={},t={flags:{},surveys:{}};return Bp(this.props,(n,r)=>{let i=uh(r)?.storageGroup;i?t[i][r]=n:e[r]=n}),{main:e,groups:t}}xa(e,t){if(t===jh)return JSON.stringify(e)+`|`+this.Ga+`|`+this.Za+`|`+this.Qa;let n={};return Bp(e,(e,t)=>{n[t]=uh(t)?.volatile?`__volatile__`:e}),JSON.stringify(n)}Va(e,t,n,r){let i=this.ba(r);if(r!==jh&&!i.dirty&&!z(i.fingerprint))return`skipped`;let a;try{if(a=this.xa(n,r),a===i.fingerprint)return i.dirty=!1,`skipped`}catch{a=void 0}return e.At(t,n,this.Ga,this.Za,this.Qa,this.Rr.debug)?(i.dirty=!1,r!==jh&&(i.persisted=!0),z(a)||(i.fingerprint=a),this.Xo&&(i.storageValue=am.Ot(t)),`written`):(this.Rr.debug&&Wd.warn(`failed to persist storage entry "${t}"; will retry on next save`),`failed`)}remove({keepGroupEntries:e=!1}={}){if(this.Ea(),z(this.qa)||(clearTimeout(this.qa),this.qa=void 0),this.jo.Lt(this.ca,!1),this.jo.Lt(this.ca,!0),!e&&this.ua)for(let e of lh)am.Lt(this.ga(e));e?delete this.Ko[jh]:this.Ko={},this.Fa=void 0,this.Oa=void 0}clear(){this.remove(),this.props={}}register_once(e,t,n){if(Ec(e)){this.syncCookieProperties(),z(t)&&(t=`None`),this.Ga=z(n)?this.Ja:n;let r=!1;if(Bp(e,(e,n)=>{this.props.hasOwnProperty(n)&&this.props[n]!==t||(this.$a(n,e),r=!0)}),r)return this.save(),!0}return!1}register(e,t){if(Ec(e)){this.syncCookieProperties(),this.Ga=z(t)?this.Ja:t;let n=!1;if(Bp(e,(t,r)=>{e.hasOwnProperty(r)&&(this.props[r]!==t||Ec(t)||wc(t))&&(this.$a(r,t),n=!0)}),n)return this.save(),!0}return!1}unregister(e){this.syncCookieProperties();let t=typeof e==`string`?[e]:e,n=!1;for(let e of t)e in this.props&&(this.Ta(e),n=!0);n&&this.save()}update_campaign_params(){let e=tc?.URL;if(e===this.ha)return;let t=bh(this.Rr.custom_campaign_params,this.Rr.mask_personal_data_properties,this.Rr.custom_personal_data_properties),n=!Dc(Wp(t));return n&&this.register(t),this.ha=e,n?t:void 0}update_search_keyword(){this.register(function(){let e=tc?.referrer;return e?Sh(e):{}}())}update_referrer_info(){this.register_once({$referrer:Th(),$referring_domain:tc?.referrer&&fh(tc.referrer)?.host||wh},void 0)}set_initial_person_info(){if(this.props.$initial_campaign_params||this.props.$initial_referrer_info)return;let e=Eh(this.Rr.mask_personal_data_properties,this.Rr.custom_personal_data_properties,this.Rr.disable_capture_url_hashes);this.register_once({[pp]:this.Yo?{r:Ah(e.r),u:e.u?Ah(e.u):void 0}:e},void 0)}get_initial_props(){let e={};Bp([fp,dp],t=>{let n=this.props[t];n&&Bp(n,function(t,n){e[`$initial_`+yc(n)]=t})});let t=this.props[pp];return t&&Vp(e,function(e,t=!1){let n=Dh(e,t),r={};return Bp(n,function(e,t){r[`$initial_${yc(t)}`]=e}),r}(t,this.Rr.disable_capture_url_hashes)),e}safe_merge(e){return Bp(this.props,function(t,n){n in e||(e[n]=t)}),e}update_config(e,t,n){let r=e.persistence!==t.persistence,i=!((e,t)=>{if(e.length!==t.length)return!1;let n=[...e].sort(),r=[...t].sort();return n.every((e,t)=>e===r[t])})(e.cookie_persisted_properties||[],t.cookie_persisted_properties||[]),a=r||i,o=e.cookieWinsOnConflict!==t.cookieWinsOnConflict,s=e.disable_persistence||!!n,c=!!this.mi&&!s;s||this.Da(t,c),this.Rr=e,!s&&(r||i||o)&&(this.Fa=void 0,this.Oa=void 0,this.Da(B(B({},e),{},{cookie_persisted_properties:t.cookie_persisted_properties}),c));let l=a||o?this.da(e):this.jo;this.Ka();let u=this.va(e),d=a||u!==this.ta,f=!s&&(d||e.cross_subdomain_cookie!==this.Za||e.secure_cookie!==this.Qa)&&this.La(c);this.sa=d;try{if(this.Ja=this.Ga=e.cookie_expiration,this.set_disabled(s),this.set_cross_subdomain(e.cross_subdomain_cookie),this.set_secure(e.secure_cookie),d){let e=this.props;this.clear(),this.jo=l,this.ta=u,this.props=e,this.save()}else o&&(this.jo=l,s||(delete this.Ko[jh],this.ja()))}finally{this.sa=!1,f&&this.Ba()}}Ka(){let e=this.props[pp];if(!this.Yo||!Ec(e)||typeof e.r!=`string`)return;let t=Ah(e.r),n=typeof e.u==`string`?Ah(e.u):e.u;t===e.r&&n===e.u||this.$a(pp,B(B({},e),{},{r:t,u:n}))}set_disabled(e){this.mi=e,this.mi?this.remove():this.save()}set_cross_subdomain(e){e!==this.Za&&(this.Za=e,this.remove({keepGroupEntries:!0}),this.save())}set_secure(e){e!==this.Qa&&(this.Qa=e,this.remove({keepGroupEntries:!0}),this.save())}set_event_timer(e,t){let n=this.props.__timers||{};n[e]=t,this.$a(lf,n),this.save()}remove_event_timer(e){let t=this.props.__timers||{},n=t[e];return z(n)||(delete t[e],this.$a(lf,t),this.save()),n}get_property(e){return this.props[e]}set_property(e,t){this.$a(e,t),this.save()}$a(e,t,n=!0){var r;let i=this.props[e];this.props[e]=t,n&&(e!==`distinct_id`&&e!==`$user_state`||i===t||(this.ra=!0),Fh(e)&&!Ih(i,t)&&this.aa.add(e),this.Pa(e,i,t),(r=uh(e))!=null&&r.volatile||this.Ma(e))}Ta(e,t=!0){delete this.props[e],t&&(Nh(e)&&this.ya(e,!0),Fh(e)&&this.aa.add(e),this.Ma(e))}Ma(e){let t=uh(e)?.storageGroup;t&&(this.ba(t).dirty=!0)}ba(e){return this.Ko[e]||(this.Ko[e]={})}},Bh={GZipJS:`gzip-js`,Base64:`base64`},Vh={Activation:`events`,Cancellation:`cancelEvents`},Hh={Popover:`popover`,API:`api`,Widget:`widget`,ExternalSurvey:`external_survey`},Uh={SHOWN:`survey shown`,DISMISSED:`survey dismissed`,SENT:`survey sent`,ABANDONED:`survey abandoned`},Wh={SURVEY_ID:`$survey_id`,SURVEY_NAME:`$survey_name`,SURVEY_RESPONSE:`$survey_response`,SURVEY_ITERATION:`$survey_iteration`,SURVEY_ITERATION_
12START_DATE:`$survey_iteration_start_date`,SURVEY_PARTIALLY_COMPLETED:`$survey_partially_completed`,SURVEY_SUBMISSION_ID:`$survey_submission_id`,SURVEY_QUESTIONS:`$survey_questions`,SURVEY_COMPLETED:`$survey_completed`,PRODUCT_TOUR_ID:`$product_tour_id`,SURVEY_LAST_SEEN_DATE:`$survey_last_seen_date`,SURVEY_LANGUAGE:`$survey_language`},Gh={Popover:`popover`,Inline:`inline`};function Kh(e){let t=!0;return{dispose(){if(t){t=!1;let n=e();n&&Tc(n.then)&&n.then(void 0,()=>{})}}}}var yee={SHOWN:`product tour shown`,DISMISSED:`product tour dismissed`,COMPLETED:`product tour completed`,STEP_SHOWN:`product tour step shown`,STEP_COMPLETED:`product tour step completed`,BUTTON_CLICKED:`product tour button clicked`,STEP_SELECTOR_FAILED:`product tour step selector failed`,BANNER_CONTAINER_SELECTOR_FAILED:`product tour banner container selector failed`,BANNER_ACTION_CLICKED:`product tour banner action clicked`},qh={TOUR_ID:`$product_tour_id`,TOUR_NAME:`$product_tour_name`,TOUR_ITERATION:`$product_tour_iteration`,TOUR_RENDER_REASON:`$product_tour_render_reason`,TOUR_STEP_ID:`$product_tour_step_id`,TOUR_STEP_ORDER:`$product_tour_step_order`,TOUR_STEP_TYPE:`$product_tour_step_type`,TOUR_DISMISS_REASON:`$product_tour_dismiss_reason`,TOUR_BUTTON_TEXT:`$product_tour_button_text`,TOUR_BUTTON_ACTION:`$product_tour_button_action`,TOUR_BUTTON_LINK:`$product_tour_button_link`,TOUR_BUTTON_TOUR_ID:`$product_tour_button_tour_id`,TOUR_STEPS_COUNT:`$product_tour_steps_count`,TOUR_STEP_SELECTOR:`$product_tour_step_selector`,TOUR_STEP_SELECTOR_FOUND:`$product_tour_step_selector_found`,TOUR_STEP_ELEMENT_TAG:`$product_tour_step_element_tag`,TOUR_STEP_ELEMENT_ID:`$product_tour_step_element_id`,TOUR_STEP_ELEMENT_CLASSES:`$product_tour_step_element_classes`,TOUR_STEP_ELEMENT_TEXT:`$product_tour_step_element_text`,TOUR_ERROR:`$product_tour_error`,TOUR_MATCHES_COUNT:`$product_tour_matches_count`,TOUR_FAILURE_PHASE:`$product_tour_failure_phase`,TOUR_WAITED_FOR_ELEMENT:`$product_tour_waited_for_element`,TOUR_WAIT_DURATION_MS:`$product_tour_wait_duration_ms`,TOUR_BANNER_SELECTOR:`$product_tour_banner_selector`,TOUR_LINKED_SURVEY_ID:`$product_tour_linked_survey_id`,USE_MANUAL_SELECTOR:`$use_manual_selector`,INFERENCE_DATA_PRESENT:`$inference_data_present`,TOUR_LAST_SEEN_DATE:`$product_tour_last_seen_date`,TOUR_TYPE:`$product_tour_type`},Jh=Gd(`[RateLimiter]`),bee=class{constructor(e){this.serverLimits={},this.lastEventRateLimited=!1,this.checkForLimiting=e=>{let t=e.text;if(t&&t.length)try{(JSON.parse(t).quota_limited||[]).forEach(e=>{Jh.info(`${e||`events`} is quota limited.`),this.serverLimits[e]=new Date().getTime()+6e4})}catch(e){Jh.warn(`could not rate limit - continuing. Error: "${e?.message}"`,{text:t});return}},this.instance=e,this.lastEventRateLimited=this.clientRateLimitContext(!0).isRateLimited}get captureEventsPerSecond(){return this.instance.config.rate_limiting?.events_per_second||10}get captureEventsBurstLimit(){return Math.max(this.instance.config.rate_limiting?.events_burst_limit||10*this.captureEventsPerSecond,this.captureEventsPerSecond)}clientRateLimitContext(e=!1){var t;let{captureEventsBurstLimit:n,captureEventsPerSecond:r}=this,i=new Date().getTime(),a=this.instance.persistence?.get_property(`$capture_rate_limit`)??{tokens:n,last:i};a.tokens+=(i-a.last)/1e3*r,a.last=i,a.tokens>n&&(a.tokens=n);let o=1>a.tokens;if(o||e||(a.tokens=Math.max(0,a.tokens-1)),o&&!e){let e=(Mc(a.dropped)?a.dropped:0)+1;a.dropped=e,!this.lastEventRateLimited&&this.Xa(e)&&(a.dropped=0)}return this.lastEventRateLimited=o,(t=this.instance.persistence)==null||t.set_property(`$capture_rate_limit`,a),{isRateLimited:o,remainingTokens:a.tokens}}Ya(e){let t=this.instance.config.property_denylist;return!wc(t)||!t.includes(e)}tl(){if(this.Ya(`$current_url`)&&this.Ya(`$pathname`)&&nc?.pathname)return`${nc.origin??``}${nc.pathname}`}Xa(e){var t;let{captureEventsBurstLimit:n,captureEventsPerSecond:r}=this,i=this.tl(),a=this.Ya(`$session_id`)?(t=this.instance).get_session_id?.call(t):void 0,o=[`${e} event(s) dropped since the last warning`,i?`triggered on ${i}`:void 0,a?`session ${a}
12`:void 0].filter(Boolean).join(`, `);return!!this.instance.capture(`$$client_ingestion_warning`,{$$client_ingestion_warning_message:`posthog-js client rate limited: ${o}. Config is set to ${r} events per second and ${n} events burst limit.`},{skip_client_rate_limiting:!0})}isServerRateLimited(e){let t=this.serverLimits[e||`events`]||!1;return!1!==t&&new Date().getTime()<t}},Yh=Gd(`[RemoteConfig]`),Xh=class{constructor(e){this._instance=e}get remoteConfig(){var e;return(e=uc._POSTHOG_REMOTE_CONFIG)==null||(e=e[this._instance.config.token])==null?void 0:e.config}el(e){var t,n;uc.__PosthogExtensions__?.loadExternalDependency?(t=uc.__PosthogExtensions__)==null||(n=t.loadExternalDependency)==null||n.call(t,this._instance,`remote-config`,()=>e(this.remoteConfig)):e()}il(e){this._instance._send_request({method:`GET`,url:this._instance.requestRouter.endpointFor(`assets`,`/array/${this._instance.config.token}/config`),callback:e})}load(){try{if(this.remoteConfig)return Yh.info(`Using preloaded remote config`,this.remoteConfig),void this.nl(this.remoteConfig);if(this._instance.sl())return void Yh.warn(`Remote config is disabled. Falling back to local config.`);this.el(e=>{if(!e)return Yh.info(`No config found after loading remote JS config. Falling back to JSON.`),void this.il(e=>{this.nl(e.json,e)});this.nl(e)})}catch(e){Yh.error(`Error loading remote config`,e),this.nl()}}nl(e,t){!e&&t&&(t.statusCode===0?t.error||Yh.warn(`Failed to fetch remote config from PostHog.`):Yh.error(`Failed to fetch remote config from PostHog.`));try{this._instance.nl(e?{ok:!0,config:e}:{ok:!1})}catch(e){Yh.error(`Error applying remote config`,e)}if(!1!==e?.hasFeatureFlags&&!this._instance.config.advanced_disable_feature_flags_on_first_load)try{var n;(n=this._instance.featureFlags)==null||n.ensureFlagsLoaded()}catch(e){Yh.error(`Error loading feature flags`,e)}}},Zh=Uint8Array,Qh=Uint16Array,$h=Uint32Array,eg=new Zh([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0]),tg=new Zh([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0]),ng=new Zh([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),rg=function(e,t){for(var n=new Qh(31),r=0;31>r;++r)n[r]=t+=1<<e[r-1];var i=new $h(n[30]);for(r=1;30>r;++r)for(var a=n[r];n[r+1]>a;++a)i[a]=a-n[r]<<5|r;return[n,i]},ig=rg(eg,2),ag=ig[1];ig[0][28]=258,ag[258]=28;for(var og=rg(tg,0)[1],sg=new Qh(32768),cg=0;32768>cg;++cg){var lg=(43690&cg)>>>1|(21845&cg)<<1;sg[cg]=((65280&(lg=(61680&(lg=(52428&lg)>>>2|(13107&lg)<<2))>>>4|(3855&lg)<<4))>>>8|(255&lg)<<8)>>>1}var ug=function(e,t,n){for(var r=e.length,i=0,a=new Qh(t);r>i;++i)++a[e[i]-1];var o,s=new Qh(t);for(i=0;t>i;++i)s[i]=s[i-1]+a[i-1]<<1;if(n){o=new Qh(1<<t);var c=15-t;for(i=0;r>i;++i)if(e[i])for(var l=i<<4|e[i],u=t-e[i],d=s[e[i]-1]++<<u,f=d|(1<<u)-1;f>=d;++d)o[sg[d]>>>c]=l}else for(o=new Qh(r),i=0;r>i;++i)o[i]=sg[s[e[i]-1]++]>>>15-e[i];return o},dg=new Zh(288);for(cg=0;144>cg;++cg)dg[cg]=8;for(cg=144;256>cg;++cg)dg[cg]=9;for(cg=256;280>cg;++cg)dg[cg]=7;for(cg=280;288>cg;++cg)dg[cg]=8;var fg=new Zh(32);for(cg=0;32>cg;++cg)fg[cg]=5;var xee=ug(dg,9,0),See=ug(fg,5,0),pg=function(e){return(e/8|0)+(7&e&&1)},mg=function(e,t,n){(t==null||0>t)&&(t=0),(n==null||n>e.length)&&(n=e.length);var r=new(e instanceof Qh?Qh:e instanceof $h?$h:Zh)(n-t);return r.set(e.subarray(t,n)),r},hg=function(e,t,n){var r=t/8|0;e[r]|=n<<=7&t,e[r+1]|=n>>>8},gg=function(e,t,n){var r=t/8|0;e[r]|=n<<=7&t,e[r+1]|=n>>>8,e[r+2]|=n>>>16},_g=function(e,t){for(var n=[],r=0;e.length>r;++r)e[r]&&n.push({s:r,f:e[r]});var i=n.length,a=n.slice();if(!i)return[new Zh(0),0];if(i==1){var o=new Zh(n[0].s+1);return o[n[0].s]=1,[o,1]}n.sort(function(e,t){return e.f-t.f}),n.push({s:-1,f:25001});var s=n[0],c=n[1],l=0,u=1,d=2;for(n[0]={s:-1,f:s.f+c.f,l:s,r:c};u!=i-1;)s=n[n[d].f>n[l].f?l++:d++],c=n[l!=u&&n[d].f>n[l].f?l++:d++],n[u++]={s:-1,f:s.f+c.f,l:s,r:c};var f=a[0].s;for(r=1;i>r;++r)a[r].s>f&&(f=a[r].s);var p=new Qh(f+1),m=vg(n[u-1],p,0);if(m>t){r=0;var h=0,g=m-t,_=1<<g;for(a.sort(function(e,t){return p[t.s]-p[e.s]||e.f-t.f});i>r;++r){var v=a[r].s;if(t>=p[v])break;h+=_-(1<<m-p[v]),p[v]=t}for(h>>>=g;h>0;){var y=a[r].s;t>p[y]?h-=1<<t-p[y]++-1:++r}for(;r>=0&&h;--r){var b=a[r].s;p[b]==t&&(--p[b],++h)}m=t}return[new Zh(p),m]},vg=function(e,t,n){return e.s==-1?Math.max(vg(e.l,t,n+1),vg(e.r,t,n+1)):t[e.s]=n},yg=function(e){for(var t=e.length;t&&!e[--t];);for(var n=new Qh(++t),r=0,i=e[0],a=1,o=function(e){n[r++]=e},s=1;t>=s;++s)if(e[s]==i&&s!=t)++a;else{if(!i&&a>2){for(;a>138;a-=138)o(32754);a>
vendor: 5,132 bytes, line 12
122&&(o(a>10?a-11<<5|28690:a-3<<5|12305),a=0)}else if(a>3){for(o(i),--a;a>6;a-=6)o(8304);a>2&&(o(a-3<<5|8208),a=0)}for(;a--;)o(i);a=1,i=e[s]}return[n.subarray(0,r),t]},bg=function(e,t){for(var n=0,r=0;t.length>r;++r)n+=e[r]*t[r];return n},xg=function(e,t,n){var r=n.length,i=pg(t+2);e[i]=255&r,e[i+1]=r>>>8,e[i+2]=255^e[i],e[i+3]=255^e[i+1];for(var a=0;r>a;++a)e[i+a+4]=n[a];return 8*(i+4+r)},Sg=function(e,t,n,r,i,a,o,s,c,l,u){hg(t,u++,n),++i[256];for(var d=_g(i,15),f=d[0],p=d[1],m=_g(a,15),h=m[0],g=m[1],_=yg(f),v=_[0],y=_[1],b=yg(h),x=b[0],S=b[1],C=new Qh(19),w=0;v.length>w;++w)C[31&v[w]]++;for(w=0;x.length>w;++w)C[31&x[w]]++;for(var T=_g(C,7),E=T[0],D=T[1],O=19;O>4&&!E[ng[O-1]];--O);var k,A,j,M,N=l+5<<3,P=bg(i,dg)+bg(a,fg)+o,F=bg(i,f)+bg(a,h)+o+14+3*O+bg(C,E)+(2*C[16]+3*C[17]+7*C[18]);if(P>=N&&F>=N)return xg(t,u,e.subarray(c,c+l));if(hg(t,u,1+(P>F)),u+=2,P>F){k=ug(f,p,0),A=f,j=ug(h,g,0),M=h;var ee=ug(E,D,0);for(hg(t,u,y-257),hg(t,u+5,S-1),hg(t,u+10,O-4),u+=14,w=0;O>w;++w)hg(t,u+3*w,E[ng[w]]);u+=3*O;for(var I=[v,x],te=0;2>te;++te){var ne=I[te];for(w=0;ne.length>w;++w)hg(t,u,ee[re=31&ne[w]]),u+=E[re],re>15&&(hg(t,u,ne[w]>>>5&127),u+=ne[w]>>>12)}}else k=xee,A=dg,j=See,M=fg;for(w=0;s>w;++w)if(r[w]>255){var re;gg(t,u,k[257+(re=r[w]>>>18&31)]),u+=A[re+257],re>7&&(hg(t,u,r[w]>>>23&31),u+=eg[re]);var ie=31&r[w];gg(t,u,j[ie]),u+=M[ie],ie>3&&(gg(t,u,r[w]>>>5&8191),u+=tg[ie])}else gg(t,u,k[r[w]]),u+=A[r[w]];return gg(t,u,k[256]),u+A[256]},Cg=new $h([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),wg=new Zh(0),Tg=function(){for(var e=new $h(256),t=0;256>t;++t){for(var n=t,r=9;--r;)n=(1&n&&3988292384)^n>>>1;e[t]=n}return e}(),Eg=function(e,t,n){for(;n;++t)e[t]=n,n>>>=8};function Dg(e,t){t===void 0&&(t={});var n=function(){var e=4294967295;return{p(t){for(var n=e,r=0;t.length>r;++r)n=Tg[255&n^t[r]]^n>>>8;e=n},d(){return 4294967295^e}}}(),r=e.length;n.p(e);var i,a,o,s,c,l,u=(s=10+((i=t).filename&&i.filename.length+1||0),c=8,function(e,t,n,r,i,a){var o=e.length,s=new Zh(r+o+5*(1+Math.floor(o/7e3))+i),c=s.subarray(r,s.length-i),l=0;if(!t||8>o)for(var u=0;o>=u;u+=65535){var d=u+65535;o>d?l=xg(c,l,e.subarray(u,d)):(c[u]=a,l=xg(c,l,e.subarray(u,o)))}else{for(var f=Cg[t-1],p=f>>>13,m=8191&f,h=(1<<n)-1,g=new Qh(32768),_=new Qh(h+1),v=Math.ceil(n/3),y=2*v,b=function(t){return(e[t]^e[t+1]<<v^e[t+2]<<y)&h},x=new $h(25e3),S=new Qh(288),C=new Qh(32),w=0,T=0,E=(u=0,0),D=0,O=0;o>u;++u){var k=b(u),A=32767&u,j=_[k];if(g[A]=j,_[k]=A,u>=D){var M=o-u;if((w>7e3||E>24576)&&M>423){l=Sg(e,c,0,x,S,C,T,E,O,u-O,l),E=w=T=0,O=u;for(var N=0;286>N;++N)S[N]=0;for(N=0;30>N;++N)C[N]=0}var P=2,F=0,ee=m,I=A-j&32767;if(M>2&&k==b(u-I))for(var te=Math.min(p,M)-1,ne=Math.min(32767,u),re=Math.min(258,M);ne>=I&&--ee&&A!=j;){if(e[u+P]==e[u+P-I]){for(var ie=0;re>ie&&e[u+ie]==e[u+ie-I];++ie);if(ie>P){if(P=ie,F=I,ie>te)break;var ae=Math.min(I,ie-2),oe=0;for(N=0;ae>N;++N){var se=u-I+N+32768&32767,ce=se-g[se]+32768&32767;ce>oe&&(oe=ce,j=se)}}}I+=(A=j)-(j=g[A])+32768&32767}if(F){x[E++]=268435456|ag[P]<<18|og[F];var le=31&ag[P],ue=31&og[F];T+=eg[le]+tg[ue],++S[257+le],++C[ue],D=u+P,++w}else x[E++]=e[u],++S[e[u]]}}l=Sg(e,c,a,x,S,C,T,E,O,u-O,l),a||(l=xg(c,l,wg))}return mg(s,0,r+pg(l)+i)}(a=e,(o=t).level==null?6:o.level,o.mem==null?Math.ceil(1.5*Math.max(8,Math.min(13,Math.log(a.length)))):12+o.mem,s,c,!l)),d=u.length;return function(e,t){var n=t.filename;if(e[0]=31,e[1]=139,e[2]=8,e[8]=2>t.level?4:t.level==9?2:0,e[9]=3,t.mtime!=0&&Eg(e,4,Math.floor(new Date(t.mtime||Date.now())/1e3)),n){e[3]=8;for(var r=0;n.length>=r;++r)e[r+10]=n.charCodeAt(r)}}(u,t),Eg(u,d-8,n.d()),Eg(u,d-4,r),u}var Og=!!ic||!!rc,kg=new WeakMap,Ag=`text/plain`,jg=0,Mg=!1,Ng=(e,t)=>{let[n,r]=e.split(`#`),[i,a]=n.split(`?`);if(!a)return e;let o=a.split(`&`).filter(e=>e.split(`=`)[0]!==t).join(`&`);return`${i}${o?`?${o}`:``}${r?`#${r}`:``}`},Pg=(e,t,n=!0)=>{let[r,i]=e.split(`?`),a=B({},t),o=i?.split(`&`).map(e=>{var t;let[r,i]=e.split(`=`),o=n&&(t=a[r])!=null?t:i;return delete a[r],`${r}=${o}`})??[],s=function(e,t=`&`){let n,r,i=[];return Bp(e,function(e,t){z(e)||z(t)||t===`undefined`||(n=encodeURIComponent((e=>e instanceof File)(e)?e.name:e.toString()),r=encodeURIComponent(t),i[i.length]=r+`=`+n)}),i.join(t)}(a);return s&&o.push(s),o.length>0?`${r}?${o.join(`&`)}`:r},Fg=e=>{if(e.rl)return e.rl;let{data:t,compression:n}=e;if(!t)return;if(n===Bh.GZipJS){let e=Dg(function(e){var t=e.length;if(typeof TextEncoder<`u`)return new TextEncoder().encode(e);for(var n=new Zh(e.length+(e.length>>>1)),r=0,i=function(e){n[r++]=e},a=0;t>a;++a){if(r+5>n.length){var o=new Zh(r+8+(t-a<<1));o.set(n),n=o}var s=e.charCodeAt(a);128>s?i(s):2048>s?(i(192|s>>>6),i(128|63&s)):s>55295&&57344>s?(i(240|(s=65536+(1047552&s)|1023&e.charCodeAt(++a))>>>18),i(128|s>>>12&63),i(128|s>>>6&63),i(128|63&s)):(i(224|s>>>12),i(128|s>>>6&63),i(128|63&s))}return mg(n,0,r)}(dh(t)),{mtime:0});return{contentType:Ag,body:e.buffer.slice(e.byteOffset,e.byteOffset+e.byteLength),estimatedSize:e.byteLength}}if(n===Bh.Base64){let e=(e=>`data=`+encodeURIComponent(typeof e==`string`?e:dh(e)))(function(e){return e&&btoa(encodeURIComponent(e).replace(/%([0-9A-F]{2})/g,(e,t)=>
12String.fromCharCode(parseInt(t,16))))}(dh(t)));return{contentType:`application/x-www-form-urlencoded`,body:e,estimatedSize:new Blob([e]).size}}let r=dh(t);return{contentType:`application/json`,body:r,estimatedSize:new Blob([r]).size}},Ig=e=>{let t=()=>e.transport===`sendBeacon`?{url:Pg(e.url,{compression:Bh.Base64}),encodedBody:Fg(B(B({},e),{},{compression:Bh.Base64,rl:void 0}))}:{url:Ng(e.url,`compression`),encodedBody:Fg(B(B({},e),{},{compression:void 0,rl:void 0}))},n;try{n=Fg(e)}catch(n){if(fd(e.compression,ph(e.url,`compression`)))return Wd.error(`Failed to gzip request body, sending uncompressed payload`,n),t();throw n}return n&&fd(e.compression,ph(e.url,`compression`))&&!((r=n.body)instanceof ArrayBuffer?dd(new Uint8Array(r)):ArrayBuffer.isView(r)&&dd(new Uint8Array(r.buffer,r.byteOffset,r.byteLength)))?(Mg=!0,t()):{url:e.url,encodedBody:n};var r},Lg=e=>{try{return Ig(e)}catch(n){var t;Wd.error(n),(t=e.callback)==null||t.call(e,{statusCode:0,error:n});return}},Cee=function(){var e=Kc(function*(e){let t=yield function(e){return vd.apply(this,arguments)}(dh(e.data),Zd.DEBUG,{rethrow:!0});if(!t)return e;let n=yield t.arrayBuffer();return B(B({},e),{},{rl:{contentType:Ag,body:n,estimatedSize:n.byteLength}})});return function(t){return e.apply(this,arguments)}}(),wee=/Failed to fetch|NetworkError|Load failed/i,Rg=e=>e?.name===`TypeError`&&wee.test(e?.message||``),zg=e=>{try{let t=function(e,t=Date.now()){if(typeof e!=`string`||!e)return;let n=e.trim(),r=/^\d+\s*,/.test(n)?n.slice(0,n.indexOf(`,`)).trim():n;if(/^\d+$/.test(r)){let e=1e3*Math.min(Number(r),300);return e>0?e:void 0}if(!/^(Mon|Tue|Wed|Thu|Fri|Sat|Sun)[a-z]*[ ,]/.test(r))return;let i=/^\w{3} \w{3} /.test(r)?r+` GMT`:r,a=Date.parse(i)-t;return Number.isFinite(a)&&a>0?Math.min(a,iu):void 0}(e());return z(t)?void 0:Math.min(t,3e4)}catch{return}},Bg=e=>{let t=Lg(e);if(!t)return;let n=new ic;kg.set(n,!0);let{url:r,encodedBody:i}=t;n.open(e.method||`GET`,r,!0);let{contentType:a,body:o}=i??{};Bp(e.headers,function(e,t){n.setRequestHeader(t,e)}),a&&n.setRequestHeader(`Content-Type`,a),e.timeout&&(n.timeout=e.timeout),n.onreadystatechange=()=>{if(n.readyState===4){var t;let r={statusCode:n.status,text:n.responseText};if(n.status===200)try{r.json=JSON.parse(n.responseText)}catch{}(t=e.callback)==null||t.call(e,r,zg(()=>n.getResponseHeader(`Retry-After`)))}},n.send(o)},Vg=e=>{let t=Lg(e);if(!t)return;let{url:n,encodedBody:r}=t,{contentType:i,body:a,estimatedSize:o}=r??{},s=new Headers;Bp(e.headers,function(e,t){s.append(t,e)}),i&&s.append(`Content-Type`,i);let c=null,l=!1;if(ac){let t=new ac;c={signal:t.signal,timeout:setTimeout(()=>{l=!0;try{t.abort(cu(`AbortError`,`PostHog request timed out`+((n=e.timeout)?` after ${n}ms`:``)))}catch(e){d(e)}var n},e.timeout)}}let u=!1,d=t=>{var n;u||(u=!0,l&&t?.name===`AbortError`||Rg(t)?Wd.warn(t):Wd.error(t),(n=e.callback)==null||n.call(e,{statusCode:0,error:t}))},f=0,p=()=>{jg-=f,f=0,c&&clearTimeout(c.timeout)};try{let t=B({method:e?.method||`GET`,headers:s,referrerPolicy:`strict-origin`,body:a,signal:c?.signal},e.fetchOptions),r=o??(z(a)?0:void 0);t.keepalive=t.method===`POST`&&!e.ol&&!1!==t.keepalive&&t.body===a&&!z(r)&&r>=0&&52428.8>jg+r,t.keepalive&&(f=r,jg+=f),rc(n,t).then(t=>t.text().then(n=>{var r;if(u)return;let i={statusCode:t.status,text:n};if(t.status===200)try{i.json=JSON.parse(n)}catch(e){Wd.error(e)}u=!0,p(),(r=e.callback)==null||r.call(e,i,zg(()=>t.headers.get(`Retry-After`)))})).catch(e=>{p(),d(e)}).finally(p)}catch(e){p(),d(e)}},Hg=e=>{try{let{url:t,encodedBody:n}=Ig(e),{contentType:r,body:i,estimatedSize:a}=n??{};if(!i)return;let o=i instanceof Blob?i:new Blob([i],{type:r});if(ec.sendBeacon(t,o))return;let s=wc(e.data)?e.data:e.data?.batch;if(wc(s)&&s.length>1&&(a??0)>16384){let t=Math.ceil(s.length/2),n=t=>wc(e.data)?t:B(B({},e.data),{},{batch:t});Hg(B(B({},e),{},{data:n(s.slice(0,t))})),Hg(B(B({},e),{},{data:n(s.slice(t))}));return}Wd.warn(`Beacon of ~${a??0} bytes was rejected by the browser, falling back to ${rc?`fetch`:`XHR`}`),rc?Vg(B(B({},e),{},{ol:!0})):Bg(e)}catch(e){Wd.warn(`Beacon send failed`,e)}},Ug=(e,t,n,r)=>{let i=r===`query`?t===`POST`?`sent_at`:`_`:void 0;return Pg(n===Bh.GZipJS?Ng(e,`compression`):e,B(B({},i?{[i]:Date.now().toString()}:{}),n===Bh.GZipJS?{}:{compression:n}))},Tee=(()=>{let e=[];return rc&&e.push({transport:`fetch`,method:Vg}),ic&&e.push({transport:`XHR`,method:Bg}),ec!=null&&ec.sendBeacon&&e.push({transport:`sendBeacon`,method:Hg}),e})(),Wg=!Og&&sc?.indexOf(`MSIE`)===-1&&sc?.indexOf(`Mozilla`)===-1;function Gg(e,t,n){var r,i;n&&(t=B(B({},t),{},{callback:e=>n(e)})),e.__loaded?Wg?e.__request_queue.push(t):e.rateLimiter.isServerRateLimited(t.batchKey)?t.fireCallbackOnDrop&&((r=t.callback)==null||r.call(t,{statusCode:429})):(t.transport=t.transport||e.config.api_transport,t.headers=B(B({},e.config.request_headers),t.headers),t.compression=t.compression===`best-available`?e.compression??t.compressionFallback:t.compression,(z(e.config.disable_beacon)?e.config.__preview_disable_beacon:e.config.disable_beacon)&&(t.disableTransport=[`sendBeacon`]),t.fetchOptions=t.fetchOptions||e.config.fetch_options,
12((e,t)=>{let n=B(B({},e),{},{callback:t??(t=>e.callback?.call(e,t))});n.timeout=n.timeout||6e4;let r=n.transport??`fetch`;r===`sendBeacon`&&z(n.compression)&&n.data&&(n.compression=Bh.Base64),n.method===`POST`&&n.data&&(n.timestampMode===`capture-body`?n.data=(e=>{var t;let n=(wc(e)?e:[e]).map(e=>B(B({},e),e.timestamp instanceof Date&&!isNaN(e.timestamp.getTime())?{timestamp:e.timestamp.toISOString()}:{})),r=n[0];return{api_key:(r==null||(t=r.properties)==null?void 0:t.token)??r?.token,batch:n,sent_at:new Date().toISOString()}})(n.data):n.timestampMode===`body`&&(n.data=((e,t=new Date().toISOString())=>wc(e)?e.map(e=>B(B({},e),{},{sent_at:t})):B(B({},e),{},{sent_at:t}))(n.data))),n.url=Ug(n.url,n.method,n.compression,n.timestampMode);let i=Tee.filter(e=>!n.disableTransport||!e.transport||!n.disableTransport.includes(e.transport)),a=function(e,t){for(let n=0;e.length>n;n++)if(t(e[n]))return e[n]}(i,e=>e.transport===r)?.method??i[0].method;if(!a)throw Error(`No available transport method`);let o=e=>{try{a(e)}catch(e){var t;Rg(e)?Wd.warn(e):Wd.error(e),(t=n.callback)==null||t.call(n,{statusCode:0,error:e})}};r!==`sendBeacon`&&!n.preferSyncCompression&&n.data&&n.compression===Bh.GZipJS&&oc&&typeof Promise<`u`&&!Mg?Cee(n).then(e=>{o(e)}).catch(t=>{if(pd(t))return Mg=!0,void o(B(B({},n),{},{compression:void 0,url:Ug(e.url,e.method,void 0,e.timestampMode)}));(e=>{if(!e||typeof e!=`object`)return!1;let t=`name`in e?String(e.name):``;return pd(e)||t===ud})(t)&&(Mg=!0),o(n)}):o(n)})(t,(r,i)=>{var a,o,s;e.rateLimiter.checkForLimiting(r),400>r.statusCode||(a=(o=e.config).on_request_error)==null||a.call(o,r),n?n(r,i):(s=t.callback)==null||s.call(t,r)})):t.fireCallbackOnDrop&&((i=t.callback)==null||i.call(t,{statusCode:0}))}var Eee=class{constructor(e,t){this.al=!0,this.ll=[],this.ul=Yc(t?.flush_interval_ms||3e3,250,5e3,Wd.createLogger(`flush interval`),3e3),this.hl=e}enqueue(e){this.ll.push(e),this.cl||this.dl()}unload(){this.vl();let e=this.ll.length>0?this.fl():{},t=Object.values(e);[...t.filter(e=>e.url.indexOf(`/e`)===0),...t.filter(e=>e.url.indexOf(`/e`)!==0)].map(e=>{this.pl(e,`sendBeacon`)})}enable(){this.al=!1,this.dl()}dl(){this.al||(this.cl=setTimeout(()=>{if(this.vl(),this.ll.length>0){let e=this.fl();for(let t in e)this.pl(e[t])}},this.ul))}pl(e,t){try{this.hl(e,t)}catch(e){Wd.error(e)}}vl(){clearTimeout(this.cl),this.cl=void 0}fl(){let e={};return Bp(this.ll,t=>{var n;let r=t,i=((r?r.batchKey:null)||r.url)+(r.batchGroup?`:${r.batchGroup}`:``);z(e[i])&&(e[i]=B(B({},r),{},{data:[]})),(n=e[i].data)==null||n.push(r.data)}),this.ll=[],e}},Dee=[`retriesPerformedSoFar`],Oee=class{constructor(e){this._instance=e,this.gl=!1,this.ml=3e3,this.ll=[],this.ll=[],this.yl=!0,this.resume()}resume(){if(!z(R)&&`onLine`in R.navigator){if(this.yl=R.navigator.onLine,this.bl)return;this.bl=()=>{this.yl=!0,this._l()},this.wl=()=>{this.yl=!1},Jp(R,`online`,this.bl),Jp(R,`offline`,this.wl)}}get length(){return this.ll.length}retriableRequest(e,t){let{retriesPerformedSoFar:n}=e,r=yd(e,Dee);Nc(n)&&(r.url=Pg(r.url,{retry_count:n})),Gg(this._instance,t?B(B({},r),{},{transport:t}):r,(e,t)=>{var i;if(e.statusCode!==200&&(400>e.statusCode||e.statusCode>=500)){if((e.statusCode===0?3:10)>(n??0))return void this.Ls(B({retriesPerformedSoFar:n},r),t);e.statusCode===0&&Wd.warn(`Request failed before receiving an HTTP response; this can happen due to network issues, CORS, browser blocking, or ad blockers. Stopped retrying after ${n??0} retries.`)}(i=r.callback)==null||i.call(r,e)})}Ls(e,t){let n=e.retriesPerformedSoFar||0;e.retriesPerformedSoFar=n+1;let r=Math.max(function(e){let t=3e3*2**e,n=t/2,r=Math.min(18e5,t),i=(Math.random()-.5)*(r-n);return Math.ceil(r+i)}(n),t??0),i=Date.now()+r;this.ll.push({retryAt:i,requestOptions:e});let a=`Enqueued failed request for retry in ${r}`;navigator.onLine||(a+=` (Browser is offline)`),Wd.warn(a),this.gl||(this.gl=!0,this.kl())}kl(){if(this.Sl&&clearTimeout(this.Sl),this.ll.length===0)return this.gl=!1,void(this.Sl=void 0);this.Sl=setTimeout(()=>{this.yl&&this.ll.length>0&&this._l(),this.kl()},this.ml)}_l(){let e=Date.now(),t=[],n=this.ll.filter(n=>e>n.retryAt||(t.push(n),!1));if(this.ll=t,n.length>0)for(let{requestOptions:e}of n)this.retriableRequest(e)}unload(){this.Sl&&=(clearTimeout(this.Sl),void 0),this.gl=!1,z(R)||(this.bl&&=(R.removeEventListener(`online`,this.bl),void 0),this.wl&&=(R.removeEventListener(`offline`,this.wl),void 0));for(let{requestOptions:e}of this.ll)try{this._instance._send_request(B(B({},e),{},{transport:`sendBeacon`}))}catch(e){Wd.error(e)}this.ll=[]}},kee=class{constructor(e){this._instance=e,this.xl=()=>{this.Cl||={};let e=this.scrollElement(),t=this.scrollY(),n=e?Math.max(0,e.scrollHeight-e.clientHeight):0,r=t+(e?.clientHeight||0),i=e?.scrollHeight||0;this.Cl.lastScrollY=Math.ceil(t),this.Cl.maxScrollY=Math.max(t,this.Cl.maxScrollY??0),this.Cl.maxScrollHeight=Math.max(n,this.Cl.maxScrollHeight??0),this.Cl.lastContentY=r,this.Cl.maxContentY=Math.max(r,this.Cl.maxContentY??0),this.Cl.maxContentHeight=Math.max(i,this.Cl.maxContentHeight??0)}}get $l(){return this._instance.config.scroll_root_selector}getContext(){return this.Cl}resetContext(){let e=this.Cl;return this.Cl=void 0,setTimeout(this.xl,0),e}startMeasuringScrollPosition(){Jp(R,`scroll`,this.xl,{capture:!0}),Jp(R,`scrollend`,this.xl,{capture:!0}),Jp(R,`resize`,this.xl)}scrollElement(){if(this.$l){let t=wc(this.$l)?this.$l:[this.$l];for(let n of t){var e;let t=R==null||(e=R.document)==null?void 0:e.querySelector(n);if(t)return t}return}var t;return R==null||(t=R.document)==null?void 0:t.documentElement}Tl(e){var t,n;let r=e===`y`?`scrollTop`:`scrollLeft`;if(this.$l){let e=this.scrollElement();return e&&e[r]||0}return R?e===`y`?R.scrollY||R.pageYOffset||((t=R.document)==null||(t=t.documentElement)==null?void 0:t.scrollTop)||0:R.scrollX||R.pageXOffset||((n=R.document)==null||(n=n.documentElement)==null?void 0:n.scrollLeft)||0:0}scrollY(){return this.Tl(`y`)}scrollX(){return this.Tl(`x`)}},Kg=e=>Eh(e?.config.mask_personal_data_properties,e?.config.custom_personal_data_properties,e?.config.disable_capture_url_hashes
12),qg=class{constructor(e,t,n,r){this.Be=e=>{let t=this.Il();if(t&&t.sessionId===e)return;let n={sessionId:e,props:this.Ml(this._instance)};this.El.register({[lp]:n})},this._instance=e,this.Pl=t,this.El=n,this.Ml=r||Kg,this.Pl.onSessionId(this.Be)}Il(){return this.El.props[lp]}getSetOnceProps(){let e=this.Il()?.props;return e?`r`in e?Dh(e,this._instance.config.disable_capture_url_hashes):{$referring_domain:e.referringDomain,$pathname:e.initialPathName,utm_source:e.utm_source,utm_campaign:e.utm_campaign,utm_medium:e.utm_medium,utm_content:e.utm_content,utm_term:e.utm_term}:{}}getSessionProps(){let e={};return Bp(Wp(this.getSetOnceProps()),(t,n)=>{n===`$current_url`&&(n=`url`),e[`$session_entry_${yc(n)}`]=t}),e}},Jg=class{on(e,t){return this.Rl[e]||(this.Rl[e]=[]),this.Rl[e].push(t),()=>{this.Rl[e]=this.Rl[e].filter(e=>e!==t)}}emit(e,t){for(let n of this.Rl[e]||[])n(t);for(let n of this.Rl[`*`]||[])n(e,t)}constructor(){this.Rl={}}},Yg=Gd(`[SessionId]`),Xg=864e5,Zg=class{on(e,t){return this.Al.on(e,t)}constructor(e,t,n){var r;if(this.Fl=null,this.Ol=null,this.Dl=[],this.Ll=void 0,this.Nl=!1,this.Al=new Jg,this.ql=(e,t)=>!(!Nc(e)||!Nc(t))&&Math.abs(e-t)>this.sessionTimeoutMs,!e.persistence)throw Error(`SessionIdManager requires a PostHogPersistence instance`);if(e.config.cookieless_mode===`always`)throw Error(`SessionIdManager cannot be used with cookieless_mode="always"`);this.Rr=e.config,this.El=e.persistence,this.He=void 0,this.Xt=void 0,this._sessionStartTimestamp=null,this.jl=void 0,this._sessionActivityTimestamp=null,this.Bl=t||em,this.Hl=n||em;let i=this.Rr.persistence_name||this.Rr.token;if(this._sessionTimeoutMs=1e3*Yc(this.Rr.session_idle_timeout_seconds||1800,60,36e3,Yg.createLogger(`session_idle_timeout_seconds`),1800),e.register({$configured_session_timeout_ms:this._sessionTimeoutMs}),this.zl(),this.Ul=`ph_`+i+`_window_id`,this.Wl=`ph_`+i+`_primary_window_exists`,this.Vl()){let e=vm.Dt(this.Ul),t=vm.Dt(this.Wl);e&&!t?this.He=e:vm.Lt(this.Ul),vm.At(this.Wl,!0)}(r=this.Rr.bootstrap)!=null&&r.sessionID&&this.setBootstrapSessionId(this.Rr.bootstrap.sessionID),this.Gl()}get sessionTimeoutMs(){return this._sessionTimeoutMs}onSessionId(e){return z(this.Dl)&&(this.Dl=[]),this.Dl.push(e),this.Xt&&e(this.Xt,this.He),()=>{this.Dl=this.Dl.filter(t=>t!==e)}}Vl(){return this.Rr.persistence!==`memory`&&!this.El.mi&&vm.Et()}Zl(e){e!==this.He&&(this.He=e,this.Vl()&&vm.At(this.Ul,e))}Ql(){return this.He?this.He:this.Vl()?vm.Dt(this.Ul):null}Jl(e){let t=this.Fl;return!Ac(t)&&!Ac(e)&&5e3>Math.abs(e-t)}Kl(e,t,n){let r=t!==this._sessionActivityTimestamp,i=!(e!==this.Xt||n!==this._sessionStartTimestamp);this._sessionStartTimestamp=n,this._sessionActivityTimestamp=t,this.Xt=e,i&&!r||i&&this.Jl(t)||(this.Fl=t,this.El.register({[Df]:[t,e,n]}))}Xl(){let e=this.Rr?.persistence_save_debounce_ms;return Nc(e)&&e>0}Yl(){this.Xl()?this.El.refreshKey(Df):(this.El.flush(),this.El.load())}tu(){if(Ac(this._sessionActivityTimestamp)||this._sessionActivityTimestamp===this.Fl)return;this.Yl();let[,e,t]=this.eu();e===this.Xt&&t===this._sessionStartTimestamp&&(this.Fl=this._sessionActivityTimestamp,this.El.register({[Df]:[this._sessionActivityTimestamp,this.Xt??null,this._sessionStartTimestamp]}),this.El.flush())}iu(){let[e]=this.eu(),t=Nc(e)?e:0,n=Nc(this._sessionActivityTimestamp)?this._sessionActivityTimestamp:0;return Math.max(t,n)}nu(e){return this.Yl(),this.ql(e,this.iu())}eu(){let e=this.El.props[Df];return wc(e)&&e.length===2&&e.push(e[0]),e||[0,null,0]}resetSessionId(){this.Fl=null,this.jl=void 0,clearTimeout(this.su),this.su=void 0,this.Kl(null,null,null)}setBootstrapSessionId(e,t=!1){let n=((e,t=new Date().getTime())=>{try{let n=(e=>{let t=e.replace(/-/g,``);if(t.length!==32)throw Error(`Not a valid UUID`);if(t[12]!==`7`)throw Error(`Not a UUIDv7`);return parseInt(t.substring(0,12),16)})(e);return n>t+6e4?void Yg.error(`Bootstrap sessionID cannot be in the future`):n}catch(e){Yg.error(`Invalid sessionID in bootstrap`,e);return}})(e);return!z(n)&&(t?this.jl={sessionId:e,sessionStartTimestamp:n}:this.Kl(e,new Date().getTime(),n),!0)}destroy(){this.Nl=!0,this.tu(),clearTimeout(this.su),this.su=void 0,this.Ll&&R&&(R.removeEventListener(Pp,this.Ll,{capture:!1}),this.Ll=void 0),this.Dl=[]}Gl(){this.Ll=()=>{this.tu(),this.Vl()&&vm.Lt(this.Wl)},Jp(R,Pp,this.Ll,{capture:!1})}
12checkAndGetSessionAndWindowId(e=!1,t=null,n=!1){if(this.Rr.cookieless_mode===`always`)throw Error(`checkAndGetSessionAndWindowId should not be called with cookieless_mode="always"`);let r=t||new Date().getTime(),i=this.Xt;if(n)this.Ol=r;else if(Ac(this.Ol)||this.Ol>r||r-this.Ol>=1e3){var a,o;(a=(o=this.El).syncCookieProperties)==null||a.call(o),this.Ol=r}let[,s,c]=this.eu(),l=!z(i)&&s!==i,u=this.iu(),d=this.Ql(),f=this.jl,p=!!f&&(f.sessionStartTimestamp>r+6e4||r-f.sessionStartTimestamp>Xg),m=f?p:Nc(c)&&Math.abs(r-c)>Xg,h=!1,g=l,_=!s||!!f,v=s,y=!_&&!e&&this.ql(r,u);if(y&&(y=this.nu(r),y||Yg.info(`cross-tab refresh kept the session alive`,{sessionId:s}),[,s,c]=this.eu(),y||(_=!s||!!f)),_||y||m){g=!1;let e=f&&!p;s=e?f.sessionId:this.Bl(),d=this.Hl(),Yg.info(`new session ID assigned`,{sessionId:s,windowId:d,bootstrapped:!!e,changeReason:{noSessionId:_,activityTimeout:y,sessionPastMaximumLength:m}}),c=e?f.sessionStartTimestamp:r,this.jl=void 0,h=!0}else d||(d=this.Hl(),h=!0),g||=s!==v,g&&(Yg.info(`adopted cross-tab session id`,{sessionId:s,windowId:d}),h=!0);let b=Nc(u)&&e&&!m?u:r,x=Nc(c)?c:new Date().getTime();this.Zl(d),this.Kl(s,b,x),e||this.zl();let S={noSessionId:_,activityTimeout:y,sessionPastMaximumLength:m,crossTabAdoption:g};return h&&this.Dl.forEach(e=>e(s,d,S)),{sessionId:s,windowId:d,sessionStartTimestamp:x,changeReason:h?S:void 0,lastActivityTimestamp:u}}zl(){this.Nl||(clearTimeout(this.su),this.su=setTimeout(()=>{if(!this.Nl)if(this.nu(new Date().getTime())){let e=this.Xt;this.resetSessionId(),this.Al.emit(`forcedIdleReset`,{idleSessionId:e})}else this.zl()},1.1*this.sessionTimeoutMs))}},Qg=function(e,t){if(!e)return!1;let n=e.userAgent;if(n&&Jc(n,t))return!0;try{let n=e?.userAgentData;if(n?.brands&&n.brands.some(e=>Jc(e?.brand,t)))return!0}catch{}return!!e.webdriver};function $g(){return($g=Kc(function*(){let e=ec?.userAgentData;if(e?.getHighEntropyValues)try{let t=(yield e.getHighEntropyValues([`model`]))?.model;return Oc(t)&&t.length>0?t:void 0}catch(e){Wd.info(`Unable to resolve $device_model from userAgentData.getHighEntropyValues`,e);return}})).apply(this,arguments)}function e_(e,t){let n=`$survey_${t}/${e.id}`;return e.current_iteration&&e.current_iteration>0&&(n=`$survey_${t}/${e.id}/${e.current_iteration}`),n}function t_(e){var t;return!!(!((t=e.conditions)==null||(t=t.events)==null||(t=t.values)==null)&&t.length)}var n_=(e,t)=>{if(!(e=>{try{new RegExp(e)}catch{return!1}return!0})(t))return!1;try{return new RegExp(t).test(e)}catch{return!1}},r_=e=>e.toLowerCase(),i_={exact:(e,t)=>t.some(t=>e.some(e=>t===e)),is_not:(e,t)=>t.every(t=>e.every(e=>t!==e)),regex:(e,t)=>t.some(t=>e.some(e=>n_(t,e))),not_regex:(e,t)=>t.every(t=>e.every(e=>!n_(t,e))),icontains:(e,t)=>t.map(r_).some(t=>e.map(r_).some(e=>t.includes(e))),not_icontains:(e,t)=>t.map(r_).every(t=>e.map(r_).every(e=>!t.includes(e))),gt:(e,t)=>t.some(t=>{let n=parseFloat(t);return!isNaN(n)&&e.some(e=>n>parseFloat(e))}),lt:(e,t)=>t.some(t=>{let n=parseFloat(t);return!isNaN(n)&&e.some(e=>n<parseFloat(e))})};function a_(e,t){return!e||Object.entries(e).every(([e,n])=>{let r=t?.[e];if(r==null)return!1;let i=i_[n.operator];return!!i&&i(n.values.map(String),[String(r)])})}function o_(e,t,n){return dh({distinct_id:e,userPropertiesToSet:t,userPropertiesToSetOnce:n})}var s_=`custom`,c_=`i.posthog.com`,l_=/^\/static\//,u_=[`/s/`,`/e/`,`/i/`],d_=class{constructor(e){this.ru={},this.instance=e}get apiHost(){let e=this.instance.config.api_host.trim().replace(/\/$/,``);return e===`https://app.posthog.com`?`https://us.i.posthog.com`:e}get flagsApiHost(){let e=this.instance.config.flags_api_host;return e?e.trim().replace(/\/$/,``):this.apiHost}get uiHost(){let e=this.instance.config.ui_host?.replace(/\/$/,``);return e||=this.apiHost.replace(`.${c_}`,`.posthog.com`),e===`https://app.posthog.com`?`https://us.posthog.com`:e}get region(){return this.ru[this.apiHost]||(this.ru[this.apiHost]=/https:\/\/(app|us|us-assets)(\.i)?\.posthog\.com/i.test(this.apiHost)?`us`:/https:\/\/(eu|eu-assets)(\.i)?\.posthog\.com/i.test(this.apiHost)?`eu`:s_),this.ru[this.apiHost]}ou(e){if(!l_.test(e))return;let t=this.instance.config.asset_host;return typeof t==`string`&&t.trim().replace(/\/$/,``)||void 0}au(e){let t=fh(e);return t?t.protocol+`//`+t.host+t.pathname:void 0}lu(e,t,n){if(e===`ui`)return n;let r=n,i=this.instance.config.rewriteRequestPath;if(i){let e=fh(n)?.href||n;r=i(new URL(e)).toString()}if(i&&e===`api`&&u_.some(e=>t.indexOf(e)===0)){let e=this.au(r);if(e){let t=this.apiHost,n=this.uu;n?.apiHost===t&&n.rewriteRequestPath===i||(n={apiHost:t,rewriteRequestPath:i,urls:new Set},this.uu=n),n.urls.add(e)}}return r}isIngestionEndpoint(e){let t=this.uu,n=this.au(e);return t?.apiHost===this.apiHost&&t.rewriteRequestPath===this.instance.config.rewriteRequestPath&&!!n&&t.urls.has(n)}endpointFor(e,t=``){if(t&&=t[0]===`/`?t:`/${t}`,e===`ui`)return this.lu(e,t,this.uiHost+t);if(e===`flags`)return this.lu(e,t,this.flagsApiHost+t);if(e===`assets`){let n=this.ou(t);if(n)return this.lu(e,t,`${n}${t}`)}if(this.region===s_)return this.lu(e,t,this.apiHost+t);let n=c_+t;switch(e){case`assets`:return this.lu(e,t,`https://${this.region}-assets.${n}`);case`api`:return this.lu(e,t,`https://${this.region}.${n}`)}}},f_=Gd(`[Surveys]`),p_=e=>{try{let t=(e=>((e,t)=>`seenSurvey_${function(e){return e.current_iteration&&e.current_iteration>0?`${e.id}_${e.current_iteration}`:e.id}(t)}`)(0,e))(e);if(localStorage.getItem(t))return;localStorage.setItem(t,`true`)}catch(e){f_.error(`Failed to persist survey seen state`,e)}},m_=[Hh.Popover,Hh.Widget,Hh.API],h_={ignoreConditions:!1,ignoreDelay:!1,displayType:Gh.Popover}
12,g_=Gd(`[PostHog ExternalIntegrations]`),__={intercom:`intercom-integration`,crispChat:`crisp-chat-integration`},v_=class{constructor(e){this._instance=e}Uo(e,t){var n,r;(n=uc.__PosthogExtensions__)==null||(r=n.loadExternalDependency)==null||r.call(n,this._instance,e,e=>{if(e)return g_.error(`failed to load script`,e);t()})}startIfEnabledOrStop(){for(let[r,i]of Object.entries(this._instance.config.integrations??{})){var e,t,n;i&&!(!((e=uc.__PosthogExtensions__)==null||(e=e.integrations)==null)&&e[r])&&this.Uo(__[r],()=>{var e;(e=uc.__PosthogExtensions__)==null||(e=e.integrations)==null||(e=e[r])==null||e.start(this._instance)}),!i&&!((t=uc.__PosthogExtensions__)==null||(t=t.integrations)==null)&&t[r]&&((n=uc.__PosthogExtensions__)==null||(n=n.integrations)==null||(n=n[r])==null||n.stop())}}},Aee=class{constructor(e,t){this.$=e,this.wo=t,this.hu=new Map,this.Mo=!1}add(e){var t=this;return Kc(function*(){if(t.Mo)throw Error(`Cannot add an extension to a disposed ExtensionRuntime`);if(t.hu.has(e.name))throw Error(`Browser extension "${e.name}" is already registered`);t.hu.set(e.name,e);try{let n=e.setup(t.wo);n&&(yield n)}catch(n){let r=t.hu.get(e.name)===e;r&&t.hu.delete(e.name),t.$.error(`Failed to set up browser extension "${e.name}"`,n),r&&t.cu(e)}})()}getExtension(e){return this.hu.get(e)}dispose(){if(this.Mo)return;this.Mo=!0;let e=Array.from(this.hu.values()).reverse();this.hu.clear();for(let t of e)this.cu(t)}cu(e){try{let t=e.dispose?.call(e);t&&Tc(t.then)&&t.then(void 0,t=>{this.$.error(`Failed to dispose browser extension "${e.name}"`,t)})}catch(t){this.$.error(`Failed to dispose browser extension "${e.name}"`,t)}}},jee=class{constructor(e){this._instance=e}initialize(){}get(e){let t=this._instance.persistence;if(typeof e==`string`)return t?.get_property(e);let n={};for(let r of e){let e=t?.get_property(r);z(e)||(n[r]=e)}return n}set(e,t){var n;(n=this._instance.persistence)==null||n.register(typeof e==`string`?{[e]:t}:e)}remove(e){var t;(t=this._instance.persistence)==null||t.unregister(e)}},y_=`extensionsRemoteConfig`,Mee=class{constructor(e){this.instance=e,this.Mo=!1,this.$=Wd,this.du=e.vu,this.kv=new jee(e),this.onEvent=e=>Kh(this.instance.on(`eventCaptured`,t=>{try{e({event:t.event,properties:t.properties})}catch(e){this.$.error(`Browser extension event listener failed`,e)}})),this.onRemoteConfig=e=>{if(this.Mo)return Kh(()=>{});let t=t=>{try{e(t)}catch(e){this.$.error(`Browser extension remote config listener failed`,e)}},n=this.instance.fu.on(y_,t);return this.du&&t(this.du),Kh(n)},this.pu=new Aee(Wd.createLogger(`[BrowserExtensions]`),this)}get logger(){return this.$}get distinctId(){return this.instance.get_distinct_id()}get anonymousId(){return this.instance.get_property(`$device_id`)??this.distinctId}get deviceId(){let e=this.instance.get_property(ef);return typeof e==`string`?e:void 0}get library(){return{name:Zd.LIB_NAME,version:Zd.LIB_VERSION}}get initialPersonProperties(){return this.instance.persistence?.get_initial_props()??{}}get groups(){return this.instance.getGroups()}get session(){try{let e=this.instance.sessionManager?.checkAndGetSessionAndWindowId(!0);return{sessionId:e?.sessionId??``,windowId:e?.windowId??``,sessionStartTimestamp:e?.sessionStartTimestamp??0}}catch{return{sessionId:``,windowId:``,sessionStartTimestamp:0}}}get canCapture(){return this.instance.is_capturing()}get projectToken(){return this.instance.config.token}add(e){return this.pu.add(e)}getExtension(e){return this.pu.getExtension(e)}capture(e,t,n){n?this.instance.capture(e,t,{timestamp:n.timestamp,uuid:n.uuid,$set:n.set,$set_once:n.setOnce}):this.instance.capture(e,t)}registerDynamicEventProperties(e){return Kh(this.instance.gu(e))}handleRemoteConfig(e){this.Mo||(this.du=e,this.instance.fu.emit(y_,e))}sendRequest(e){var t=this;return Kc(function*(e,n={}){let r=t.instance.requestRouter.endpointFor(n.target??`api`,e),i={method:n.method,url:n.query?Pg(r,n.query):r,data:n.body,headers:n.headers,timeout:n.timeoutMs,fireCallbackOnDrop:!0,transport:n.transport,compression:n.compression,compressionFallback:n.target===`flags`&&n.compression===`best-available`?mc.Base64:void 0,timestampMode:n.sentAt};return n.transport===`sendBeacon`?(t.instance._send_request(i),{statusCode:202}):new Promise(e=>{i.callback=e,t.instance._send_request(i)})}).apply(this,arguments)}dispose(){this.Mo||(this.Mo=!0,this.pu.dispose())}},b_={},x_=0,S_=()=>{}
12,C_=`Consent opt in/out is not valid with cookieless_mode="always" and will be ignored`,w_=`Surveys module not available`,T_=`sanitize_properties is deprecated. Use before_send instead`,E_=`Invalid value for property_denylist config: `,Nee=/^[A-Za-z0-9_-]{1,400}$/,D_=/^fb\.[0-9]+\.[0-9]+\.[A-Za-z0-9_-]+(?:\.[A-Za-z0-9_-]+)?$/,O_=/^fb\.[0-9]+\.[0-9]+\.[0-9]+$/,Pee=[`token`,`distinct_id`,gp],k_=`posthog`,Fee=e=>{let t={};return e&&e!==`unset`?(`2025-11-30`>e||(t.strictMinimumDuration=!0),`2026-05-30`>e||(t.canvasCapture={resolutionScale:.6}),`2026-06-25`>e||(t.streamNetworkBody=!0),`2026-08-30`>e||(t.captureJsonLd=!0),t):t},A_=e=>{var t;return B({api_host:`https://us.i.posthog.com`,flags_api_host:null,ui_host:null,asset_host:null,token:``,autocapture:!0,cross_subdomain_cookie:qp(tc?.location),persistence:`localStorage+cookie`,persistence_name:``,cookie_persisted_properties:[],loaded:S_,save_campaign_params:!0,custom_campaign_params:[],custom_blocked_useragents:[],save_referrer:!0,capture_pageleave:`if_capture_pageview`,defaults:e??`unset`,__preview_deferred_init_extensions:!1,__preview_external_dependency_versioned_paths:!1,__preview_cookie_wins_on_conflict:!1,debug:nc&&Oc(nc?.search)&&nc.search.indexOf(`__posthog_debug=true`)!==-1||!1,cookie_expiration:365,upgrade:!1,disable_session_recording:!1,disable_persistence:!1,disable_web_experiments:!0,disable_surveys:!1,disable_surveys_automatic_display:!1,disable_conversations:!1,disable_product_tours:!1,disableDeviceModel:!1,reuseAnonymousId:!1,disable_external_dependency_loading:!1,strict_script_versioning:`fallback`,enable_recording_console_log:void 0,secure_cookie:(R==null||(t=R.location)==null?void 0:t.protocol)===`https:`,ip:!1,opt_out_capturing_by_default:!1,opt_out_persistence_by_default:!1,opt_out_useragent_filter:!1,opt_out_capturing_persistence_type:`localStorage`,consent_persistence_name:null,opt_out_capturing_cookie_prefix:null,opt_in_site_apps:!1,property_denylist:[],respect_dnt:!1,sanitize_properties:null,request_headers:{},request_batching:!0,properties_string_max_length:65535,mask_all_element_attributes:!1,mask_all_text:!1,mask_personal_data_properties:!1,custom_personal_data_properties:[],advanced_disable_flags:!1,advanced_disable_decide:!1,advanced_disable_feature_flags:!1,advanced_disable_feature_flags_on_first_load:!1,advanced_only_evaluate_survey_feature_flags:!1,advanced_feature_flags_dedup_per_session:!1,advanced_enable_surveys:!1,advanced_disable_toolbar_metrics:!1,feature_flag_request_timeout_ms:3e3,feature_flag_request_max_retries:1,surveys_request_timeout_ms:1e4,on_request_error(e){Wd.error(`Bad HTTP status: `+e.statusCode+` `+e.text)},get_device_id:e=>e,capture_performance:void 0,name:`posthog`,bootstrap:{},disable_compression:!1,session_idle_timeout_seconds:1800,person_profiles:Mp,before_send:void 0,get_current_url:void 0,request_queue_config:{flush_interval_ms:3e3},error_tracking:{},_onCapture:S_},(e=>({rageclick:e&&e>=`2026-05-30`?{content_ignorelist:Lm,ignore_text_selection:!0}
12:!e||`2025-11-30`>e||{content_ignorelist:!0},capture_pageview:!e||`2025-05-24`>e||`history_change`,session_recording:Fee(e),external_scripts_inject_target:e&&e>=`2026-01-30`?`head`:`body`,internal_or_test_user_hostname:e&&e>=`2026-01-30`?/^(localhost|127\.0\.0\.1)$/:void 0,persistence_save_debounce_ms:e&&e>=`2026-05-30`?250:0,split_storage:!(!e||`2026-05-30`>e),detect_google_search_app:!(!e||`2026-05-30`>e),disable_capture_url_hashes:!(!e||`2026-06-25`>e),cookieWinsOnConflict:!(!e||e===`unset`||`2026-08-29`>e)}))(e))},Iee=[[`process_person`,`person_profiles`],[`xhr_headers`,`request_headers`],[`cookie_name`,`persistence_name`],[`disable_cookie`,`disable_persistence`],[`__preview_disable_beacon`,`disable_beacon`],[`store_google`,`save_campaign_params`],[`verbose`,`debug`],[`__preview_cookie_wins_on_conflict`,`cookieWinsOnConflict`]],j_=e=>{let t={};for(let[n,r]of Iee)z(e[n])||(t[r]=e[n]);let n=Vp({},t,e),r=e.__preview_external_dependency_versioned_paths;return z(r)||(z(e.strict_script_versioning)&&(n.strict_script_versioning=!!r),Oc(r)&&z(e.asset_host)&&(n.asset_host=r)),wc(e.property_blacklist)&&(z(e.property_denylist)?n.property_denylist=e.property_blacklist:wc(e.property_denylist)?n.property_denylist=[...e.property_blacklist,...e.property_denylist]:Wd.error(E_+e.property_denylist)),n},Lee=class{constructor(){this.__forceAllowLocalhost=!1}get mu(){return this.__forceAllowLocalhost}set mu(e){Wd.error("WebPerformanceObserver is deprecated and has no impact on network capture. Use `_forceAllowLocalhostNetworkCapture` on `posthog.sessionRecording`"),this.__forceAllowLocalhost=e}},M_=class e{yu(e){if(!e)return;let t=this.hu.indexOf(e);t!==-1&&this.hu.splice(t,1)}bu(e,t){var n;return this.yu(e),this.hu.push(t),(n=t.initialize)==null||n.call(t),t}_u(){return this.config.cookieless_mode===`always`||this.config.cookieless_mode===`on_reject`&&this.consent.isRejected()}wu(){if(this.ku||this.config.reuseAnonymousId||this.config.segment||this._u())return;let e=this.config.persistence===`memory`||this.config.persistence===`sessionStorage`;if(!e&&!this.config.disable_persistence||this.Su)return;let t,n,r;e?(t=`persistence is set to '${this.config.persistence}'`,n=this.config.persistence===`memory`?`on every page load`:`for every new browser tab or window`,r=`Either set persistence to 'localStorage+cookie', keep this persistence and pass a stable ID through bootstrap.distinctID, or enable reuseAnonymousId.`):(t=`persistence is disabled (disable_persistence is true)`,n=`on every page load`,r=`Either set disable_persistence to false, keep persistence disabled and pass a stable ID through bootstrap.distinctID, or enable reuseAnonymousId.`),this.ku=!0,console.warn(`[PostHog.js]`,`${t} but no bootstrap.distinctID was provided. PostHog will mint a new distinct ID ${n}, so calling identify() merges a new ID onto the person each time. A person can then pass the distinct-ID limit and its events stop appearing on person pages and the session tab. ${r}`)}xu(){if(this._u()||this.get_distinct_id()!==`$posthog_cookieless`)return;let e=this.persistence;if(!e)return;this.Cu()||e.load(!0);let t=this.get_distinct_id();if(!t||t===`$posthog_cookieless`){let t=this.config.get_device_id(em());this.register({distinct_id:t,$device_id:t}),e.set_property(cp,Ap)}this.$u()}get decideEndpointWasHit(){var e;return(e=this.featureFlags?.hasLoadedFlags)!=null&&e}get flagsEndpointWasHit(){var e;return(e=this.featureFlags?.hasLoadedFlags)!=null&&e}constructor(){this.Tu=!1,this.Iu=!1,this.webPerformance=new Lee,this.Mu=!1,this.version=Zd.LIB_VERSION,this.Eu=new Set,this.Pu=``,this.fu=new Jg,this.hu=[],this.Ru=[],this.Su=!1,this.ku=!1,this._calculate_event_properties=this.calculateEventProperties.bind(this),this.config=A_(),this.SentryIntegration=uee,this.sentryIntegration=e=>function(e,t){let n=sh(e,t);return{name:oh,processEvent:e=>n(e)}}(this,e),this.__request_queue=[],this.__loaded=!1,this.analyticsDefaultEndpoint=`/e/`,this.Au=!1,this.Fu=null,this.Ou=null,this.Du=null,this.scrollManager=new kee(this),this.pageViewManager=new ch(this),this.rateLimiter=new bee(this),this.requestRouter=new d_(this),this.consent=new aee(this),this.externalIntegrations=new v_(this);let t=e.__defaultExtensionClasses??{};this.featureFlags=t.featureFlags&&new t.featureFlags(this),this.toolbar=t.toolbar&&new t.toolbar(this),this.surveys=t.surveys&&new t.surveys(this),this.conversations=t.conversations&&new t.conversations(this),this.logs=t.logs&&new t.logs(this),this.metrics=t.metrics&&new t.metrics(this),this.experiments=t.experiments&&new t.experiments(this),this.exceptions=t.exceptions&&new t.exceptions(this),this.people={set:(e,t,n)=>{let r=Oc(e)?{[e]:t}:e;this.setPersonProperties(r),n?.({})},set_once:(e,t,n)=>{let r=Oc(e)?{[e]:t}:e;this.setPersonProperties(void 0,r),n?.({})}},this.on(`eventCaptured`,e=>Wd.info(`send "${e?.event}"`,e))}init(t,n,r){if(r&&r!==k_){let i=b_[r]??new e;return i._init(t,n,r),b_[r]=i,b_[k_][r]=i,i}return this._init(t,n,r)}_init(e,t={},n){let r=Oc(e)?e.trim():``;if(!r)return Wd.critical(`PostHog was initialized without a token. This likely indicates a misconfiguration. Please check the first argument passed to posthog.init()`),this;if(this.__loaded)return r===this.config?.token?console.warn(`[PostHog.js]`,`You have already initialized PostHog! Re-initializing is a no-op`):console.warn(`[PostHog.js]`,`You have already initialized PostHog with a different project token! Re-initializing is a no-op, so events will keep going to the project this instance was initialized with. To capture into a second project, load PostHog once, then initialize a named instance after the SDK has loaded, e.g. posthog.init('${r}', { ... }, 'project2')`),this;this.__loaded=!0,this.config=A_(t.defaults),t.debug=this.Lu(t.debug),this.Nu=t,this.qu=[],t.person_profiles?this.Ou=t.person_profiles:t.process_person&&(this.Ou=t.process_person);
12let i=A_(t.defaults),a=j_(t),o=Vp({},i,a,{name:n,token:r});Ec(i.rageclick)&&Ec(a.rageclick)&&(o.rageclick=Vp({},i.rageclick,a.rageclick)),Ec(i.session_recording)&&Ec(a.session_recording)&&(o.session_recording=Vp({},i.session_recording,a.session_recording)),this.set_config(o),this.config.on_xhr_error&&Wd.error(`on_xhr_error is deprecated. Use on_request_error instead`),this.compression=t.disable_compression?void 0:Bh.GZipJS;let s=this.Cu();if(this.persistence=new zh(this.config,s),this.sessionPersistence=this.config.persistence===`sessionStorage`||this.config.persistence===`memory`?this.persistence:new zh(B(B({},this.config),{},{persistence:`sessionStorage`}),s,!1),this.Pu=`ph_`+(this.config.persistence_name||this.config.token)+`_session_registered_properties`,this.config.persistence!==`memory`&&!s&&vm.Et()){let e=vm.Dt(this.Pu);wc(e)&&e.forEach(e=>{Oc(e)&&this.Eu.add(e)})}else vm.Lt(this.Pu);let c=B({},this.persistence.props),l=B({},this.sessionPersistence.props);this.register({$initialization_time:new Date().toISOString()}),this.ju=new Eee((e,t)=>this.Bu(e,t),this.config.request_queue_config),this.Hu=new Oee(this),this.__request_queue=[];let u=this._u();u||(this.sessionManager=new Zg(this),this.sessionPropsManager=new qg(this,this.sessionManager,this.persistence),this.sessionManager.onSessionId((e,t,n)=>{(n!=null&&n.activityTimeout||n!=null&&n.sessionPastMaximumLength||n!=null&&n.crossTabAdoption)&&this.zu()})),this.Uu(),this.config.__preview_deferred_init_extensions?(Wd.info(`Deferring extension initialization to improve startup performance`),setTimeout(()=>{this.Wu(u)},0)):(Wd.info(`Initializing extensions synchronously`),this.Wu(u)),Zd.DEBUG=Zd.DEBUG||this.config.debug,Zd.DEBUG&&Wd.info(`Starting in debug mode`,{this:this,config:t,thisC:B({},this.config),p:c,s:l}),this.config.identity_distinct_id&&!t.bootstrap?.distinctID&&(t.bootstrap=B(B({},t.bootstrap),{},{distinctID:this.config.identity_distinct_id,isIdentifiedID:!0}));let d=t.bootstrap?.distinctID;if(this.Su=!!d&&!kc(d),t.bootstrap?.distinctID){let e=t.bootstrap.distinctID,n=this.get_distinct_id(),r=this.persistence.get_property(cp);if(t.bootstrap.isIdentifiedID&&n!=null&&n!==e&&r===`anonymous`)this.identify(e);else if(t.bootstrap.isIdentifiedID&&n!=null&&n!==e&&r===`identified`)Wd.warn(`Bootstrap distinctID differs from an already-identified user. The existing identity is preserved. Call reset() before reinitializing if you intend to switch users.`);else{let n=this.config.get_device_id(em()),r=t.bootstrap.isIdentifiedID?n:e;this.persistence.set_property(cp,t.bootstrap.isIdentifiedID?jp:Ap),this.register({distinct_id:e,$device_id:r})}}if(u)this.register_once({distinct_id:hp,$device_id:null},``);else if(!this.get_distinct_id()){let e=this.config.get_device_id(em());this.register_once({distinct_id:e,$device_id:e},``),this.persistence.set_property(cp,Ap)}return Jp(R,`onpagehide`in self?`pagehide`:`unload`,this._handle_unload.bind(this),{passive:!1}),Jp(R,`pageshow`,()=>{var e;this.Tu=!1,this.Iu||(e=this.Hu)==null||e.resume()}),t.segment?ah(this,()=>this.Vu()):this.Vu(),Tc(this.config._onCapture)&&this.config._onCapture!==S_&&(Wd.warn("onCapture is deprecated. Please use `before_send` instead"),this.on(`eventCaptured`,e=>this.config._onCapture(e.event,e))),this.config.ip&&Wd.warn('The `ip` config option has NO EFFECT AT ALL and has been deprecated. Use a custom transformation or "Discard IP data" project setting instead. See https://posthog.com/tutorials/web-redact-properties#hiding-customer-ip-address for more information.'),this.config.disableDeviceModel||function(){return $g.apply(this,arguments)}().then(e=>{e&&this.register({[tf]:e})}).catch(S_),this}Gu(e){let t=e;return Oc(t.name)&&Tc(t.setup)}Zu(e,t){this.Gu(e)?t.push(()=>{this.Qu().add(e).catch(()=>
12e.dispose?.call(e)).catch(t=>{Wd.error(`Failed to dispose browser extension "${e.name}"`,t)})}):this.hu.push(e)}Uu(){let t=this.config.__extensionClasses?.featureFlags??e.__defaultExtensionClasses?.featureFlags;var n,r,i;t&&(this.featureFlags&&this.featureFlags instanceof t||((n=this.Ju)==null||n.call(this),this.Ju=void 0,this.featureFlags=new t(this)),Tc(this.featureFlags.onReloading)&&Tc(this.featureFlags.setup)?this.Ju||(this.Ju=this.featureFlags.onReloading(()=>{this.fu.emit(`featureFlagsReloading`,!0)}),this.Qu().add(this.featureFlags)):(r=(i=this.featureFlags).initialize)==null||r.call(i))}Wu(t){let n=performance.now(),r=B(B({},e.__defaultExtensionClasses),this.config.__extensionClasses),i=[];r.exceptions&&this.hu.push(this.exceptions=this.exceptions??new r.exceptions(this)),r.historyAutocapture&&this.hu.push(this.historyAutocapture=new r.historyAutocapture(this)),r.tracingHeaders&&this.hu.push(this.tracingHeaders=new r.tracingHeaders(this)),r.siteApps&&this.hu.push(this.siteApps=new r.siteApps(this)),r.sessionRecording&&!t&&this.hu.push(this.sessionRecording=new r.sessionRecording(this)),this.config.disable_scroll_properties||i.push(()=>{this.scrollManager.startMeasuringScrollPosition()}),r.autocapture&&this.Zu(this.autocapture=new r.autocapture(this),i),r.surveys&&this.Zu(this.surveys=this.surveys??new r.surveys(this),i),r.logs&&this.Zu(this.logs=this.logs??new r.logs(this),i),r.metrics&&this.hu.push(this.metrics=this.metrics??new r.metrics(this)),r.conversations&&this.hu.push(this.conversations=this.conversations??new r.conversations(this)),r.productTours&&this.hu.push(this.productTours=new r.productTours(this)),r.heatmaps&&this.hu.push(this.heatmaps=new r.heatmaps(this)),r.webVitalsAutocapture&&this.hu.push(this.webVitalsAutocapture=new r.webVitalsAutocapture(this)),r.exceptionObserver&&this.hu.push(this.exceptionObserver=new r.exceptionObserver(this)),r.deadClicksAutocapture&&this.hu.push(this.deadClicksAutocapture=new r.deadClicksAutocapture(this,lee)),r.toolbar&&this.hu.push(this.toolbar=this.toolbar??new r.toolbar(this)),r.experiments&&this.hu.push(this.experiments=this.experiments??new r.experiments(this)),this.hu.forEach(e=>{e.initialize&&i.push(()=>{var t;(t=e.initialize)==null||t.call(e)})}),i.push(()=>{if(this.Ku){let e=this.Ku;this.Ku=void 0,this.hu.forEach(t=>t.onRemoteConfig?.call(t,e))}}),this.Xu(i,n)}Xu(e,t){for(;e.length>0;){if(this.config.__preview_deferred_init_extensions&&performance.now()-t>=30&&e.length>0)return void setTimeout(()=>{this.Xu(e,t)},0);let n=e.shift();if(n)try{n()}catch(e){Wd.error(`Error initializing extension:`,e)}}let n=Math.round(performance.now()-t);this.register_for_session({[_p]:this.config.__preview_deferred_init_extensions?`deferred`:`synchronous`,[vp]:n}),this.config.__preview_deferred_init_extensions&&Wd.info(`PostHog extensions initialized (${n}ms)`)}nl(e){var t;if(!tc||!tc.body)return Wd.info(`document not ready yet, trying again in 500 milliseconds...`),void setTimeout(()=>{this.nl(e)},500);if(this.config.__preview_deferred_init_extensions&&(this.Ku=e),this.vu=e,this.compression=void 0,e.ok){var n;let t=e.config;t.supportedCompression&&!this.config.disable_compression&&(this.compression=_c(t.supportedCompression,Bh.GZipJS)?Bh.GZipJS:_c(t.supportedCompression,Bh.Base64)?Bh.Base64:void 0),(n=t.analytics)!=null&&n.endpoint&&(this.analyticsDefaultEndpoint=t.analytics.endpoint)}this.set_config({person_profiles:this.Ou?this.Ou:Mp}),(t=this.Yu)==null||t.handleRemoteConfig(e),this.hu.forEach(t=>t.onRemoteConfig?.call(t,e))}Vu(){try{this.config.loaded(this)}catch(e){Wd.critical("`loaded` function failed",e)}if(this.th(),this.config.internal_or_test_user_hostname&&nc?.hostname){let e=nc.hostname,t=this.config.internal_or_test_user_hostname;(typeof t==`string`?e===t:t.test(e))&&this.setInternalOrTestUser()}this.config.capture_pageview&&setTimeout(()=>{(this.consent.isOptedIn()||this._u())&&this.eh()},1),this.ih=new Xh(this),this.ih.load()}th(){var e;this.is_capturing()&&this.config.request_batching&&((e=this.ju)==null||e.enable())}_dom_loaded(){this.is_capturing()&&zp(this.__request_queue,e=>this.Bu(e)),this.__request_queue=[],this.th()}_handle_unload(){var e,t,n,r,i,a;this.Tu=!0,(e=this.surveys)==null||(t=e.handlePageUnload)==null||t.call(e),(n=this.metrics)==null||n.flush(`sendBeacon`),this.config.request_batching?(this.nh()&&this.capture(Ip),(r=this.logs)==null||r.flushLogs(`sendBeacon`),(i=this.ju)==null||i.unload(),(a=this.Hu)==null||a.unload()):this.nh()&&this.capture(Ip,null,{transport:`sendBeacon`})}_send_request(e){Gg(this,e)}Bu(e,t){this.Hu?this.Hu.retriableRequest(e,t):this._send_request(t?B(B({},e),{},{transport:t}):e)}_execute_array(e){x_++;try{let t,n=[],r=[],i=[];zp(e,e=>{if(e)if(t=e[0],wc(t))i.push(e);else if(Tc(e))try{e.call(this)}catch(t){Wd.error(`Error executing queued PostHog call`,e,t)}else wc(e)&&t===`alias`?n.push(e):wc(e)&&t.indexOf(`capture`)!==-1&&Tc(this[t])?i.push(e):r.push(e)});let a=function(e,t){zp(e,function(e){try{if(wc(e[0])){let n=t;Bp(e,function(e){n=n[e[0]].apply(n,e.slice(1))})}else t[e[0]].apply(t,e.slice(1))}catch(t){Wd.error(`Error executing queued PostHog call`,e,t)}})};a(n,this),a(r,this),a(i,this)}finally{x_--}}push(t){if(x_>0&&wc(t)&&Oc(t[0])){let n=e.prototype[t[0]];Tc(n)&&n.apply(this,t.slice(1));return}this._execute_array([t])}get sh(){return{property:af,persistenceKey:of,cookieName:`_fbc`,pattern:D_,register:(e,t)=>this.persistence?.register({[of]:{value:e,delivered:t}}),unregister:()=>this.persistence?.unregister(of)}}get rh(){return{property:sf,persistenceKey:cf,cookieName:`_fbp`,pattern:O_,register:(e,t)=>this.persistence?.register({[cf]:{value:e,delivered:t}}),unregister:()=>this.persistence?.unregister(cf)}}oh(e){let t=this.persistence?.get_property(e.persistenceKey);return Oc(t)&&e.pattern.test(t)?{value:t,delivered:!1}:Ec(t)&&Oc(t.value)&&e.pattern.test(t.value)?{value:t.value,delivered:!0===t.delivered}:void 0}
12ah(e,t,n){return t===n?.value?{value:t,pending:!n.delivered}:(e.register(t,!1),{value:t,pending:!0})}uh(e){if(!this.config.save_campaign_params||this._u())return;let t=Xp(e.cookieName);return Oc(t)&&e.pattern.test(t)?t:void 0}hh(e,t,n,r){if(!this.persistence)return;let i=this.sh;this.persistence.refreshKey(i.persistenceKey);let a=this.oh(i);if(r)return void i.unregister();if(n)return Oc(t)&&D_.test(t)?this.ah(i,t,a):void i.unregister();let o=Oc(e)&&Nee.test(e)?e:void 0,s=this.uh(i);return s&&((e,t,n)=>{let r=e.split(`.`);if(t)return r[3]===t;if(!n)return!0;let i=n.value.split(`.`);return r[3]===i[3]||Number(r[2])>Number(i[2])})(s,o,a)?this.ah(i,s,a):o?a?.value.split(`.`)[3]===o?{value:a.value,pending:!a.delivered}:this.ah(i,`fb.1.${Date.now()}.${o}`,a):a?{value:a.value,pending:!a.delivered}:void 0}dh(e,t,n){if(!this.persistence)return;let r=this.rh;this.persistence.refreshKey(r.persistenceKey);let i=this.oh(r);if(n)return void r.unregister();if(t)return Oc(e)&&O_.test(e)?this.ah(r,e,i):void r.unregister();let a=this.uh(r);return a?this.ah(r,a,i):i?{value:i.value,pending:!i.delivered}:void 0}fh(e,t){if(!this.persistence)return;this.persistence.refreshKey(e.persistenceKey);let n=this.oh(e);n?.value!==t||n.delivered||e.register(t,!0)}capture(e,t,n){if(!(this.__loaded&&this.persistence&&this.sessionPersistence&&this.ju))return void Wd.uninitializedWarning(`posthog.capture`);if(!this.is_capturing())return;if(z(e)||!Oc(e))return void Wd.error(`No event name provided to posthog.capture`);this.xu();let r=!this.config.opt_out_useragent_filter&&this._is_bot();if(r&&!this.config.__preview_capture_bot_pageviews)return;let i=n?.skip_client_rate_limiting?void 0:this.rateLimiter.clientRateLimitContext();if(i?.isRateLimited)return void Wd.critical(`This capture call is ignored due to client rate limiting.`);let a;t!=null&&t.$current_url&&!Oc(t?.$current_url)&&(Wd.error("Invalid `$current_url` property provided to `posthog.capture`. Input must be a string. Ignoring provided value."),t==null||delete t.$current_url),e!==`$exception`||n!=null&&n.ph||Wd.warn("Using `posthog.capture('$exception')` is unreliable because it does not attach required metadata. Use `posthog.captureException(error)` instead, which attaches required metadata automatically."),this.sessionPersistence.update_search_keyword(),this.config.save_campaign_params&&(a=this.sessionPersistence.update_campaign_params()),this.config.save_referrer&&this.sessionPersistence.update_referrer_info(),(this.config.save_campaign_params||this.config.save_referrer)&&this.persistence.set_initial_person_info();let o=new Date,s=n?.timestamp||o,c=su(n?.uuid,em),l={uuid:c,event:e,properties:this.calculateEventProperties(e,t||{},s,c)};e===`$pageview`&&this.config.__preview_capture_bot_pageviews&&r&&(l.event=`$bot_pageview`,l.properties.$browser_type=`bot`),i&&(l.properties.$lib_rate_limit_remaining_tokens=i.remainingTokens);let u=e===`$feature_flag_called`&&!1===l.properties.$feature_flag_has_experiment&&!0===this.get_property(`$minimal_flag_called_events`);n!=null&&n.$set&&!u&&(l.$set=n?.$set);let d=Ec(t?.$set)?t.$set:void 0,f=wc(t?.$unset)?t.$unset:[],p=n?.$unset||[],m=e=>{var t;let r=!!n?.$set&&e in n.$set;return{hasProvided:r||!!d&&e in d,provided:r?n==null||(t=n.$set)==null?void 0:t[e]:d?.[e],unset:f.indexOf(e)!==-1||p.indexOf(e)!==-1}},h=m(af),g=m(sf),_=[{channel:this.sh,hasProvided:h.hasProvided,update:this.hh(a?.fbclid,h.provided,h.hasProvided,h.unset)},{channel:this.rh,hasProvided:g.hasProvided,update:this.dh(g.provided,g.hasProvided,g.unset)}];for(let{channel:e,hasProvided:t,update:n}of _)n&&!0===l.properties.$process_person_profile&&n.pending&&!t&&!u&&(l.$set=B({[e.property]:n.value},l.$set));let v=n?.$unset;v&&(l.$unset=v);let y=u?void 0:this.gh(n?.$set_once,e!==Rp,e===Lp);if(y&&(l.$set_once=y),n!=null&&n._noTruncate||(b=this.config.properties_string_max_length,l=function(e,t){let n=new Set;return function e(r,i){if(r!==Object(r))return t?t(r):r;if(n.has(r))return;let a;if(n.add(r),wc(r))a=[],zp(r,t=>{a.push(e(t))});else{let t={};Bp(zc(r)?Gp(r):r,(r,i)=>{n.has(r)||(t[i]=e(r,i))}),a=t}return a}(e)}(l,e=>Oc(e)?e.slice(0,b):e)),l.timestamp=s,z(n?.timestamp)||(l.properties.$event_time_override_provided=!0,l.properties.$event_time_override_system_time=o),u&&(l.properties=((e,t=[])=>{let n={},r=t=>{e[t]!==void 0&&(n[t]=e[t])};return ld.forEach(r),t.forEach(r),n})(l.properties,Pee)),e===Uh.DISMISSED||e===Uh.SENT){let n=t?.[Wh.SURVEY_ID],r=t?.[Wh.SURVEY_ITERATION];p_({id:n,current_iteration:r}),l.$set=B(B({},l.$set),{},{[e_({id:n,current_iteration:r},e===Uh.SENT?`responded`:`dismissed`)]:!0})}else e===Uh.SHOWN&&(l.$set=B(B({},l.$set),{},{[Wh.SURVEY_LAST_SEEN_DATE]:new Date().toISOString()}));var b;if(e===yee.SHOWN){let e=t?.[qh.TOUR_TYPE];e&&(l.$set=B(B({},l.$set),{},{[`${qh.TOUR_LAST_SEEN_DATE}/${e}`]:new Date().toISOString()}))}let x=B(B({},l.properties.$set),l.$set);if(Dc(x)||this.setPersonPropertiesForFlags(x),!jc(this.config.before_send)){let e=this.Os(l);if(!e)return;l=e,l.uuid=su(l.uuid,em)}let S=_.filter(({channel:e,update:t})=>{let n=l.$set?.[e.property]??(Ec(l.properties?.$set)?l.properties.$set[e.property]:void 0);return t?.pending&&n===t.value});this.fu.emit(`eventCaptured`,l);let C=n?._url??this.requestRouter.endpointFor(`api`,this.analyticsDefaultEndpoint),w=n?._batchKey===`recordings`||/\/s\/(?:\?|$)/.test(C),T=B(B(B({method:`POST`,url:C,data:l,compression:`best-available`,preferSyncCompression:n?.send_instantly,timestampMode:w?`body`:`capture-body`,batchKey:n?._batchKey},w&&l.properties?.$session_id?{batchGroup:l.properties.$session_id+(l.properties.$window_id?`-${l.properties.$window_id}`:``)}
12:{}),n?.transport?{transport:n.transport}:{}),S.length?{fireCallbackOnDrop:!0,callback:e=>{if(e.statusCode>=200&&300>e.statusCode)for(let{channel:e,update:t}of S)this.fh(e,t.value)}}:{});if(!this.config.request_batching||n&&!n?._batchKey||n?.send_instantly||S.length){let e;!T.transport&&!T.callback&&Dc(this.config.request_headers??{})&&this.Tu&&(e=`sendBeacon`),this.Bu(T,e)}else this.ju.enqueue(T);return l}_addCaptureHook(e){return this.on(`eventCaptured`,t=>e(t.event,t))}getExtension(e){return this.Yu?.getExtension(e)}Qu(){return this.Yu??=new Mee(this)}gu(e){this.Ru.push(e);let t=!0;return()=>{if(!t)return;t=!1;let n=this.Ru.indexOf(e);n!==-1&&this.Ru.splice(n,1)}}mh(e=!0){var t,n;return!!this.persistence?.consumeCookieIdentityChange()&&(this.Du=null,this.persistence.get_property(`$user_state`)===`anonymous`&&((n=this.sessionPersistence)==null||n.clear(),this.Eu.clear(),this.yh()),(t=this.featureFlags)==null||t.reset(),e&&this.reloadFeatureFlags(),!0)}calculateEventProperties(e,t,n,r,i){if(n||=new Date,!this.persistence||!this.sessionPersistence)return t;this.persistence.syncCookieProperties(),this.mh();let a=i?void 0:this.persistence.remove_event_timer(e),o=B({},t);if(o.token=this.config.token,o.$config_defaults=this.config.defaults,this._u()&&(o[gp]=!0),e===`$snapshot`){let e=B(B({},this.persistence.properties()),this.sessionPersistence.properties());return o.distinct_id=e.distinct_id,(!Oc(o.distinct_id)&&!Mc(o.distinct_id)||kc(o.distinct_id))&&Wd.error(`Invalid distinct_id for replay event. This indicates a bug in your implementation`),o}let s=function(e,t,n,r=!1){var i,a,o;if(!sc)return{};let s=e?[...vh,...t||[]]:[],[c,l]=Yl(sc),[u,d]=function(e){for(let t=0;$l.length>t;t++){let[n,r,i]=$l[t],a=e.match(n);if(a)return[r,(i&&e.match(i)||a)?.[1]||``]}return[``,``]}(sc),f=function(){return(`u`>typeof navigator?navigator:void 0)?.brave?{brave:!0}:{}}(),p={};z(n)||(p.detectGoogleSearchApp=n);let m={},h=(i=navigator)==null||(i=i.userAgentData)==null?void 0:i.platform,g=navigator?.maxTouchPoints,_=R==null||(a=R.screen)==null?void 0:a.width,v=R==null||(o=R.screen)==null?void 0:o.height,y=R?.devicePixelRatio;z(h)||(m.userAgentDataPlatform=h),z(g)||(m.maxTouchPoints=g),z(_)||(m.screenWidth=_),z(v)||(m.screenHeight=v),z(y)||(m.devicePixelRatio=y);let b=Vp(Wp({$os:c,$os_version:l,$browser:Gl(sc,navigator.vendor,f,p),$webview_app:u,$webview_app_version:d,$device:Xl(sc),$device_type:Zl(sc,m),$timezone:Oh(),$timezone_offset:gee()}),{$current_url:mh(r?lu(nc?.href):nc?.href,s,yh),$host:nc?.host,$pathname:nc?.pathname,$raw_user_agent:sc.length>1e3?sc.substring(0,997)+`...`:sc,$browser_version:ql(sc,navigator.vendor,f,p),$browser_language:Ch(),$browser_language_prefix:hee(),$screen_height:R?.screen.height,$screen_width:R?.screen.width,$viewport_height:R?.innerHeight,$viewport_width:R?.innerWidth,$lib:fc.LIB_NAME,$lib_version:fc.LIB_VERSION,$insert_id:Math.random().toString(36).substring(2,10)+Math.random().toString(36).substring(2,10),$time:Date.now()/1e3});return fc.SDK_DIST_CHANNEL&&(b.$sdk_dist_channel=fc.SDK_DIST_CHANNEL),b}(this.config.mask_personal_data_properties,this.config.custom_personal_data_properties,this.config.detect_google_search_app,this.config.disable_capture_url_hashes);if(this.sessionManager){let{sessionId:e,windowId:t}=this.sessionManager.checkAndGetSessionAndWindowId(i,n.getTime(),!0);o.$session_id=e,o.$window_id=t}this.sessionPropsManager&&Vp(o,this.sessionPropsManager.getSessionProps());try{this.sessionRecording&&Vp(o,this.sessionRecording.sdkDebugProperties),o.$sdk_debug_retry_queue_size=this.Hu?.length}catch(e){o.$sdk_debug_error_capturing_properties=String(e)}let c;if(this.requestRouter.region===s_&&(o.$lib_custom_api_host=this.config.api_host),c=e!==`$pageview`||i?e!==`$pageleave`||i?this.pageViewManager.doEvent():this.pageViewManager.doPageLeave(n):this.pageViewManager.doPageView(n,r),o=Vp(o,c),e===`$pageview`&&tc&&(o.title=tc.title),!z(a)){let e=n.getTime()-a;o.$duration=parseFloat((e/1e3).toFixed(3))}sc&&this.config.opt_out_useragent_filter&&(o.$browser_type=this._is_bot()?`bot`:`browser`);let l=this.persistence.properties(),u=this.sessionPersistence.properties(),d=o.$groups,f=l.$groups;Ec(d)&&!Dc(d)&&(o.$groups=B(B({},Ec(f)?f:{}),d)),Bp([`$referrer`,`$referring_domain`],e=>{e in l&&delete u[e]});let p={};if(this.Ru.length>0)for(let e of this.Ru.slice())try{Vp(p,e())}catch(e){Wd.error(`Failed to produce browser extension event properties`,e)}o=Vp({},s,l,u,B(B({},p),o)),o.$is_identified=this._isIdentified(),wc(this.config.property_denylist)?Bp(this.config.property_denylist,function(e){delete o[e]}):Wd.error(E_+this.config.property_denylist+` or property_blacklist config: `+this.config.property_blacklist);let m=this.config.sanitize_properties;m&&(Wd.error(T_),o=m(o,e));let h=this.bh();return o.$process_person_profile=h,h&&!i&&this._h(`_calculate_event_properties`),o}gh(e,t=!0,n=!1){if(!this.persistence||!this.bh()||this.Mu&&!n)return e;let r=Vp({},this.persistence.get_initial_props(),this.sessionPropsManager?.getSetOnceProps()||{},e||{}),i=this.config.sanitize_properties;return i&&(Wd.error(T_),r=i(r,`$set_once`)),t&&(this.Mu=!0),Dc(r)?void 0:r}register(e,t){var n;(n=this.persistence)==null||n.register(e,t)}register_once(e,t,n){var r;(r=this.persistence)==null||r.register_once(e,t,n)}register_for_session(e){var t,n;(t=this.persistence)==null||t.syncCookieProperties(),this.mh(),(n=this.sessionPersistence)==null||n.register(e),Object.keys(e).forEach(e
12=>this.Eu.add(e)),this.yh()}unregister(e){var t;(t=this.persistence)==null||t.unregister(e)}unregister_for_session(e){var t;(t=this.sessionPersistence)==null||t.unregister(e),this.Eu.delete(e),this.yh()}wh(e,t){this.register({[e]:t})}zu(){this.Eu.forEach(e=>{var t;(t=this.sessionPersistence)==null||t.unregister(e)}),this.Eu.clear(),this.yh()}yh(){if(!this.Pu)return;if(this.config.persistence===`memory`||this.sessionPersistence?.mi||!vm.Et())return void vm.Lt(this.Pu);let e=[];this.Eu.forEach(t=>e.push(t)),e.length>0?vm.At(this.Pu,e):vm.Lt(this.Pu)}getFeatureFlag(e,t){return this.featureFlags?.getFeatureFlag(e,t)}getFeatureFlagPayload(e){return this.featureFlags?.getFeatureFlagPayload(e)}getFeatureFlagResult(e,t){return this.featureFlags?.getFeatureFlagResult(e,t)}getAllFeatureFlags(){return this.featureFlags?.getAllFeatureFlags()??[]}isFeatureEnabled(e,t){return this.featureFlags?.isFeatureEnabled(e,t)??t?.defaultValue}reloadFeatureFlags(){var e;(e=this.featureFlags)==null||e.reloadFeatureFlags()}updateFlags(e,t,n){var r;(r=this.featureFlags)==null||r.updateFlags(e,t,n)}updateEarlyAccessFeatureEnrollment(e,t,n){var r;(r=this.featureFlags)==null||r.updateEarlyAccessFeatureEnrollment(e,t,n)}getEarlyAccessFeatures(e,t=!1,n){return this.featureFlags?.getEarlyAccessFeatures(e,t,n)}on(e,t){return this.fu.on(e,t)}onFeatureFlags(e){return this.featureFlags?this.featureFlags.onFeatureFlags(e):(e([],{},{errorsLoading:!0}),()=>{})}onSurveysLoaded(e){return this.surveys?this.surveys.onSurveysLoaded(e):(e([],{isLoaded:!1,error:w_}),()=>{})}onSessionId(e){return this.sessionManager?.onSessionId(e)??(()=>{})}getSurveys(e,t=!1){this.surveys?this.surveys.getSurveys(e,t):e([],{isLoaded:!1,error:w_})}getActiveMatchingSurveys(e,t=!1){this.surveys?this.surveys.getActiveMatchingSurveys(e,t):e([],{isLoaded:!1,error:w_})}onActiveMatchingSurveysChanged(e){return this.surveys?this.surveys.onActiveMatchingSurveysChanged(e):(e([],{isLoaded:!1,error:w_}),()=>{})}renderSurvey(e,t){var n;(n=this.surveys)==null||n.renderSurvey(e,t)}displaySurvey(e,t=h_){var n;(n=this.surveys)==null||n.displaySurvey(e,t)}cancelPendingSurvey(e){var t;(t=this.surveys)==null||t.cancelPendingSurvey(e)}canRenderSurvey(e){return this.surveys?.canRenderSurvey(e)??{visible:!1,disabledReason:w_}}canRenderSurveyAsync(e,t=!1){return this.surveys?.canRenderSurveyAsync(e,t)??Promise.resolve({visible:!1,disabledReason:w_})}kh(e){return!e||kc(e)?(Wd.critical(`Unique user id has not been set in posthog.identify`),!1):e===`$posthog_cookieless`?(Wd.critical(`The string "${e}" was set in posthog.identify which indicates an error. This ID is only used as a sentinel value.`),!1):![`distinct_id`,`distinctid`].includes(e.toLowerCase())&&![`undefined`,`null`].includes(e.toLowerCase())||(Wd.critical(`The string "${e}" was set in posthog.identify which indicates an error. This ID should be unique to the user and not a hardcoded string.`),!1)}identify(e,t,n){if(!this.__loaded||!this.persistence)return Wd.uninitializedWarning(`posthog.identify`);if(Mc(e)&&(e=e.toString(),Wd.warn(`The first argument to posthog.identify was a number, but it should be a string. It has been converted to a string.`)),!this.kh(e)||!this._h(`posthog.identify`))return;this.xu();let r=this.get_distinct_id(),i=this.persistence.syncCookieProperties()&&this.get_distinct_id()!==r,a=this.mh(!1),o=this.persistence.La(),s=!1;try{let r=this.get_distinct_id();this.register({$user_id:e}),this.get_property(`$device_id`)||this.register_once({$had_persisted_distinct_id:!0,$device_id:r},``),e!==r&&e!==this.get_property(`__alias`)&&(this.unregister(nf),this.register({distinct_id:e}));let o=(this.persistence.get_property(`$user_state`)||`anonymous`)===Ap,l=e!==r,u=!l&&o;if(l&&o){var c;let i=this.config.reuseAnonymousId?{distinct_id:e}:{distinct_id:e,$anon_distinct_id:r};this.persistence.set_property(cp,jp),this.setPersonPropertiesForFlags({$set:t||{},$set_once:n||{}},!1),this.config.cookieWinsOnConflict&&this.persistence.Na(),this.capture(`$identify`,i,{$set:t||{},$set_once:n||{}})&&(this.Du=o_(e,t,n)),(c=this.featureFlags)==null||c.setAnonymousDistinctId(this.config.reuseAnonymousId?void 0:r)}else if(u){this.persistence.set_property(cp,jp);let r=t||{},i=n||{};this.setPersonPropertiesForFlags({$set:r,$set_once:i},!1),this.config.cookieWinsOnConflict&&this.persistence.Na(),this.capture(`$set`,{$set:r,$set_once:i})&&(this.Du=o_(e,t,n))}else (t||n)&&this.setPersonProperties(t,n);l||i||a?(this.reloadFeatureFlags(),this.featureFlags?this.featureFlags.resetFlagCallReported():this.unregister(ip)):u&&(t||n)&&this.reloadFeatureFlags(),s=!0}finally{o&&this.persistence.Ba(s)}}setPersonProperties(e,t){if(!e&&!t||!this._h(`posthog.setPersonProperties`))return;let n=o_(this.get_distinct_id(),e,t);this.Du===n?Wd.info(`A duplicate setPersonProperties call was made with the same properties. It has been ignored.`):(this.setPersonPropertiesForFlags({$set:e||{},$set_once:t||{}},!0),this.capture(`$set`,{$set:e||{},$set_once:t||{}})&&(this.Du=n))}unsetPersonProperties(e){var t;let n=(wc(e)?e:[e]).filter(e=>Oc(e)&&e.length>0);n.length!==0&&this._h(`posthog.unsetPersonProperties`)&&((t=this.featureFlags)==null||t.unsetPersonPropertiesForFlags(n,!0),this.capture(`$set`,{$unset:n}),this.Du=null)}group(e,t,n){var r;if(!e||!t)return void Wd.error(`posthog.group requires a group type and group key`);(r=this.persistence)==null||r.syncCookieProperties(),this.mh();let i=this.getGroups(),a=i[e]!==t;if(a&&this.resetGroupPropertiesForFlags(e),this.register({$groups:B(B({},i),{},{[e]:t})}),(a||n)&&this.bh()){let r={$group_type:e,$group_key:t};n&&(r.$group_set=n),this.capture(Rp,r)}n&&this.setGroupPropertiesForFlags({[e]:n}),a&&!n&&this.reloadFeatureFlags()}resetGroups(){this.register({$groups:{}}),this.resetGroupPropertiesForFlags(),this.reloadFeatureFlags()}setPersonPropertiesForFlags(e,t=!0){var n;(n=this.featureFlags)==null||n.setPersonPropertiesForFlags(e,t)}resetPersonPropertiesForFlags(e=!0){var t;(t=this.featureFlags)==null||t.resetPersonPropertiesForFlags(e)}setGroupPropertiesForFlags(e,t=!0){var n;this._h(`posthog.setGroupPropertiesForFlags`)&&((n=this.featureFlags)==null||n.setGroupPropertiesForFlags(e,t))}resetGroupPropertiesForFlags(e){var t;(t=this.featureFlags)==null||t.resetGroupPropertiesForFlags(e)}reset(e){let t=Pc(e)?e:e?.resetDeviceID,n=Pc(e)||e==null?void 0:e.bootstrap;this.Sh(t,!1,n)}Sh(e,t=!1,n){var r,i,a,o,s;if(Wd.info(`reset`),!this.__loaded)return Wd.uninitializedWarning(`posthog.reset`);let c=n?.sessionID;this.config.bootstrap=n||this.Nu?.bootstrap||{},(r=this.featureFlags)==null||(i=r.updateConfig)==null||i.call(r,this.config,this.sl());let l=this.get_property(ef),u=this.get_property(tf),d=this.get_property(bf);(a=this.sessionRecording)==null||a.flushBeforeIdentityReset();let f=this.is_capturing();this.consent.reset(),t||!f||this.is_capturing()||console.warn(`[PostHog.js]`,"reset() cleared the stored consent, and capturing is now off because of `opt_out_capturing_by_default`. Call opt_in_capturing() again, and prefer calling reset() before opting in rather than after.");let p=(o=this.persistence)==null||(s=o.La)==null?void 0:s.call(o),m=!1;try{var h,g,_,v,y,b,x,S,C,w,T,E;if((h=this.persistence)==null||h.clear(),(g=this.sessionPersistence)==null||g.clear(),this.Eu.clear(),this.yh(),z(d)||(w=this.persistence)==null||w.register({$session_recording_remote_config:d}),(_=this.surveys)==null||_.reset(),(v=this.featureFlags)==null||v.reset(),(y=this.conversations)==null||y.reset(),(b=this.logs)==null||b.reset(),(x=this.metrics)==null||x.reset(),(S=this.persistence)==null||S.set_property(`$user_state`,`anonymous`),(C=this.sessionManager)==null||C.resetSessionId(),this.Du=null,this.config.cookieless_mode===`always`)this.register_once({distinct_id:hp,$device_id:null},``);else{let t=this.config.get_device_id(em());this.register_once({distinct_id:t,$device_id:e?t:l},``),e||z(u)||this.register({[tf]:u})}if(this.register({$last_posthog_reset:new Date().toISOString()},1),n&&(n.distinctID&&!this._u()&&((E=this.persistence)==null||E.set_property(`$user_state`,n.isIdentifiedID?`identified`:`anonymous`),this.register({distinct_id:n.distinctID})),(T=this.featureFlags)==null||T.initialize(),!jc(c)&&!this.sessionManager?.setBootstrapSessionId(c,!0))){let e=B({},n);delete e.sessionID,this.config.bootstrap=e}delete this.config.identity_distinct_id,delete this.config.identity_hash,delete this.config.identity_claims,m=!0}finally{var D,O;p&&((D=this.persistence)==null||(O=D.Ba)==null||O.call(D,m))}this.reloadFeatureFlags()}shutdown(e){var t=this;return Kc(function*(){var e,n,r,i,a,o,s,c;if(t.__loaded){t.Iu=!0,t.Qu().dispose(),(e=t.sessionRecording)==null||e.dispose(),(n=t.logs)==null||n.flushLogs(`sendBeacon`),(r=t.metrics)==null||r.flush(`sendBeacon`),(i=t.metrics)==null||i.dispose(),(a=t.ju)==null||a.unload(),(o=t.Hu)==null||o.unload();try{var l;(l=t.featureFlags)==null||l.destroy()}catch(e){Wd.error(`Error while destroying feature flags`,e)}(s=t.persistence)==null||s.destroy(),(c=t.sessionPersistence)==null||c.destroy()}else Wd.uninitializedWarning(`posthog.shutdown`)})()}setIdentity(e,t){var n;delete this.config.identity_claims,this.config.identity_distinct_id=e,this.config.identity_hash=t,this.alias(e),(n=this.conversations)==null||n.xh()}clearIdentity(){var e;delete this.config.identity_distinct_id,delete this.config.identity_hash,delete this.config.identity_claims,(e=this.conversations)==null||e.Ch()}get_distinct_id(){return this.get_property(`distinct_id`)}getGroups(){return this.get_property(`$groups`)||{}}get_session_id(){return this.sessionManager?.checkAndGetSessionAndWindowId(!0).sessionId??``}get_session_replay_url(e){if(!this.sessionManager)return``;let{sessionId:t,sessionStartTimestamp:n}=this.sessionManager.checkAndGetSessionAndWindowId(!0),r=this.requestRouter.endpointFor(`ui`,`/project/${this.config.token}/replay/${t}`);if(e?.withTimestamp&&n){let t=e.timestampLookBack??10;if(!n)return r;r+=`?t=${Math.max(Math.floor((new Date().getTime()-n)/1e3)-t,0)}`}return r}alias(e,t){return e===this.get_property(`$people_distinct_id`)?(Wd.critical(`Attempting to create alias for existing People user - aborting.`),-2):this._h(`posthog.alias`)?(z(t)&&(t=this.get_distinct_id()),e===t?(Wd.warn(`alias matches current distinct_id - skipping api call.`),this.identify(e),-1):(this.wh(nf,e),this.capture(`$create_alias`,{alias:e,distinct_id:t}))):void 0}set_config(e){let t=B({},this.config);if(Ec(e)){var n,r,i,a,o,s,c,l,u,d,f,p,m,h;Vp(this.config,j_(e));let _=this.Cu();(n=this.persistence)==null||n.update_config(this.config,t,_),this.sessionPersistence=this.config.persistence===`
12sessionStorage`||this.config.persistence===`memory`?this.persistence:new zh(B(B({},this.config),{},{persistence:`sessionStorage`}),_,!1);let v=this.Lu(this.config.debug);var g;Pc(v)&&(this.config.debug=v),Pc(this.config.debug)&&(this.config.debug?(Zd.DEBUG=!0,am.Et()&&am.At(`ph_debug`,!0),Wd.info(`set_config`,{config:e,oldConfig:t,newConfig:B({},this.config)})):(Zd.DEBUG=!1,am.Et()&&am.Lt(`ph_debug`))),(r=this.featureFlags)==null||(i=r.updateConfig)==null||i.call(r,this.config,this.sl()),(a=this.exceptionObserver)==null||a.onConfigChange(),(o=this.exceptions)==null||o.onConfigChange(),(s=this.metrics)==null||s.onConfigChange(),(c=this.sessionRecording)==null||c.startIfEnabledOrStop(),(l=this.tracingHeaders)==null||l.startIfEnabledOrStop(),(u=this.autocapture)==null||u.startIfEnabled(),(d=this.heatmaps)==null||d.startIfEnabled(),(`capture_pageview`in e||`disable_capture_url_hashes`in e)&&((g=this.historyAutocapture)==null||g.startIfEnabledOrStop()),(f=this.exceptionObserver)==null||f.startIfEnabledOrStop(),(p=this.deadClicksAutocapture)==null||p.startIfEnabledOrStop(),(m=this.surveys)==null||m.loadIfEnabled(),this.$u(),(h=this.externalIntegrations)==null||h.startIfEnabledOrStop(),!t.segment&&this.config.segment&&this.persistence&&ah(this,S_,!1)}}_overrideSDKInfo(e,t){Zd.LIB_NAME=e,Zd.LIB_VERSION=t}startSessionRecording(e){let t=!0===e,n={sampling:t||!!e?.sampling,linked_flag:t||!!e?.linked_flag,url_trigger:t||!!e?.url_trigger,event_trigger:t||!!e?.event_trigger};var r,i,a,o,s;Object.values(n).some(Boolean)&&((r=this.sessionManager)==null||r.checkAndGetSessionAndWindowId(),n.sampling&&((i=this.sessionRecording)==null||i.overrideSampling()),n.linked_flag&&((a=this.sessionRecording)==null||a.overrideLinkedFlag()),n.url_trigger&&((o=this.sessionRecording)==null||o.overrideTrigger(`url`)),n.event_trigger&&((s=this.sessionRecording)==null||s.overrideTrigger(`event`))),this.set_config({disable_session_recording:!1})}stopSessionRecording(){this.set_config({disable_session_recording:!0})}sessionRecordingStarted(){return!!this.sessionRecording?.started}captureException(e,t){try{if(!this.exceptions)return;let n=this.exceptions.buildProperties(e,{handled:!0,syntheticException:Error(`PostHog syntheticException`)});return this.exceptions.sendExceptionEvent(B(B({},n),t))}catch{return}}addExceptionStep(e,t){var n;(n=this.exceptions)==null||n.addExceptionStep(e,t)}captureLog(e){var t;(t=this.logs)==null||t.captureLog(e)}get logger(){return this.logs?.logger??e.$h}startExceptionAutocapture(e){this.set_config({capture_exceptions:e==null||e})}stopExceptionAutocapture(){this.set_config({capture_exceptions:!1})}loadToolbar(e){var t;return(t=this.toolbar?.loadToolbar(e))!=null&&t}get_property(e){return this.persistence?.props[e]}getSessionProperty(e){return this.sessionPersistence?.props[e]}toString(){let e=this.config.name??k_;return e!==k_&&(e=`posthog.`+e),e}_isIdentified(){return this.persistence?.get_property(`$user_state`)===`identified`||this.sessionPersistence?.get_property(`$user_state`)===`identified`}bh(){var e,t;return!(this.config.person_profiles===`never`||this.config.person_profiles===`identified_only`&&!this._isIdentified()&&Dc(this.getGroups())&&!(!((e=this.persistence)==null||(e=e.props)==null)&&e.__alias)&&!(!((t=this.persistence)==null||(t=t.props)==null)&&t.$epp))}nh(){return!0===this.config.capture_pageleave||this.config.capture_pageleave===`if_capture_pageview`&&!!this.config.capture_pageview}createPersonProfile(){this.bh()||this._h(`posthog.createPersonProfile`)&&this.setPersonProperties({},{})}setInternalOrTestUser(){this._h(`posthog.setInternalOrTestUser`)&&this.setPersonProperties({$internal_or_test_user:!0})}_h(e){return this.config.person_profiles===`never`?(Wd.error(e+` was called, but process_person is set to "never". This call will be ignored.`),!1):(this.wu(),this.wh(mp,!0),!0)}Cu(){if(this.config.cookieless_mode===`always`)return!0;let e=this.consent.isOptedOut();return this.config.disable_persistence||e&&!(!this.config.opt_out_persistence_by_default&&this.config.cookieless_mode!==`on_reject`)}$u(){let e=this.Cu();var t,n,r;return this.is_capturing()||(t=this.logs)==null||t.Th(),this.persistence?.mi!==e&&((n=this.persistence)==null||n.set_disabled(e)),this.sessionPersistence?.mi!==e&&((r=this.sessionPersistence)==null||r.set_disabled(e)),e&&(this.Eu.clear(),this.yh()),e}opt_in_capturing(t){var n;if(this.config.cookieless_mode!==`always`){if(this._u()){var r,i,a;(r=this.sessionRecording)==null||r.dispose({discardBufferedEvents:!0}),this.Sh(!0,!0),(i=this.sessionManager)==null||i.destroy(),(a=this.pageViewM
12anager)==null||a.destroy(),this.sessionManager=new Zg(this),this.pageViewManager=new ch(this),this.persistence&&(this.sessionPropsManager=new qg(this,this.sessionManager,this.persistence));let t=this.config.__extensionClasses?.sessionRecording??e.__defaultExtensionClasses?.sessionRecording;var o,s;t&&(this.sessionRecording=this.bu(this.sessionRecording,new t(this)),this.vu&&((o=this.sessionRecording)==null||(s=o.onRemoteConfig)==null||s.call(o,this.vu)))}var c;this.consent.optInOut(!0),this.$u(),this.th(),(n=this.sessionRecording)==null||n.startIfEnabledOrStop(),this.config.cookieless_mode==`on_reject`&&((c=this.surveys)==null||c.loadIfEnabled()),(z(t?.captureEventName)||t!=null&&t.captureEventName)&&this.capture(t?.captureEventName??`$opt_in`,t?.captureProperties,{send_instantly:!0}),this.config.capture_pageview&&this.eh()}else Wd.warn(C_)}opt_out_capturing(){if(this.config.cookieless_mode===`always`)return void Wd.warn(C_);let e=this.config.cookieless_mode===`on_reject`?this.sessionRecording:void 0;var t,n;e?.dispose({discardBufferedEvents:!0}),this.config.cookieless_mode===`on_reject`&&this.consent.isOptedIn()&&this.Sh(!0,!0),this.consent.optInOut(!1),this.$u(),this.config.cookieless_mode===`on_reject`&&(this.register({distinct_id:hp,$device_id:null}),this.yu(e),this.sessionRecording=void 0,(t=this.sessionManager)==null||t.destroy(),(n=this.pageViewManager)==null||n.destroy(),this.sessionManager=void 0,this.sessionPropsManager=void 0,this.config.capture_pageview&&this.eh(),this.th())}has_opted_in_capturing(){return this.consent.isOptedIn()}has_opted_out_capturing(){return this.consent.isOptedOut()}get_explicit_consent_status(){let e=this.consent.consent;return e===1?`granted`:e===0?`denied`:`pending`}is_capturing(){return this.config.cookieless_mode===`always`||(this.config.cookieless_mode===`on_reject`?this.consent.isRejected()||this.consent.isOptedIn():!this.has_opted_out_capturing())}clear_opt_in_out_capturing(){this.consent.reset(),this.$u()}_is_bot(){return ec?Qg(ec,this.config.custom_blocked_useragents):void 0}eh(){tc&&(tc.visibilityState===`visible`?this.Au||(this.Au=!0,this.capture(Fp,{title:tc.title},{send_instantly:!0}),this.Fu&&=(tc.removeEventListener(Np,this.Fu),null)):this.Fu||(this.Fu=this.eh.bind(this),Jp(tc,Np,this.Fu)))}debug(e){!1===e?(R?.console.log(`You've disabled debug mode.`),this.set_config({debug:!1})):(R?.console.log("You're now in debug mode. All calls to PostHog will be logged in your console.\nYou can disable this with `posthog.debug(false)`."),this.set_config({debug:!0}))}sl(){let e=this.Nu||{};return`advanced_disable_flags`in e?!!e.advanced_disable_flags:!1===this.config.advanced_disable_flags?!0===this.config.advanced_disable_decide?(Wd.warn(`Config field 'advanced_disable_decide' is deprecated. Please use 'advanced_disable_flags' instead. The old field will be removed in a future major version.`),!0):function(e,t,n,r,i){let a=t in e&&!jc(e[t]),o=n in e&&!jc(e[n]);return a?e[t]:!!o&&(i&&i.warn(`Config field '${n}' is deprecated. Please use '${t}' instead. The old field will be removed in a future major version.`),e[n])}(e,`advanced_disable_flags`,`advanced_disable_decide`,0,Wd):!!this.config.advanced_disable_flags}Os(e){if(jc(this.config.before_send))return e;let t=Object.keys(e.properties??{}).filter(Ic),n=wc(this.config.before_send)?this.config.before_send:[this.config.before_send],r=e;for(let t of n)try{if(r=t(r),jc(r)){let t=`Event '${e.event}' was rejected in beforeSend function`;return Fc(e.event)?Wd.warn(`${t}. This can cause unexpected behavior.`):Wd.info(t),null}r.properties&&!Dc(r.properties)||Wd.warn(`Event '${e.event}' has no properties after beforeSend function, this is likely an error.`)}catch(t){return Wd.error(`Error in beforeSend function for event '${e.event}':`,t),null}for(let n of t)if(r.properties&&jc(r.properties[n]))return Wd.warn(`Event '${e.event}' had its '${n}' property removed in a beforeSend function. This property is required for ingestion, so the event will be dropped.`),null;return r}getPageViewId(){return this.pageViewManager.Go?.pageViewId}captureTraceFeedback(e,t){this.capture(`$ai_feedback`,{$ai_trace_id:String(e),$ai_feedback_text:t})}captureTraceMetric(e,t,n){this.capture(`$ai_metric`,{$ai_trace_id:String(e),$ai_metric_name:t,$ai_metric_value:String(n)})}Lu(e){let t=Pc(e)&&!e,n=am.Et()&&am.Ot(`ph_debug`)===`true`;return!t&&(!!n||e)}};M_.__defaultExtensionClasses={},M_.$h=(()=>{let e=()=>{};return{trace:e,debug:e,info:e,warn:e,error:e,fatal:e}})(),function(e,t){for(let n=0;t.length>n;n++)e.prototype[t[n]]=Up(e.prototype[t[n]])}(M_,[`identify`]);var N_=class{constructor(e){this.disabled=!1===e;let t=Ec(e)?e:{};this.thresholdPx=t.threshold_px||30,this.timeoutMs=t.timeout_ms||1e3,this.clickCount=t.click_count||3,this.clicks=[]}isRageClick(e,t,n){if(this.disabled)return!1;let r=this.clicks[this.clicks.length-1];if(r&&Math.abs(e-r.x)+Math.abs(t-r.y)<this.thresholdPx&&this.timeoutMs>n-r.timestamp){if(this.clicks.push({x:e,y:t,timestamp:n}),this.clicks.length===this.clickCount)return!0}else this.clicks=[{x:e,y:t,timestamp:n}];return!1}},P_=`$copy_autocapture`,F_=Gd(`[AutoCapture]`);function I_(e,t){return t.length>e?t.slice(0,e)+`...`:t}function Ree(e){if(e.previousElementSibling)return e.previousElementSibling;let t=e;do t=t.previousSibling;while(t&&!xm(t));return t}function zee(e,{e:t,maskAllElementAttributes:n,maskAllText:r,elementAttributeIgnoreList:i,elementsC
12hainAsString:a,disableCaptureUrlHashes:o}){if(!xm(e))return{props:{}};let s=[e],c=new Set([e]),l=e;for(;l.parentNode&&!Sm(l,`body`)&&1e3>s.length;){if(wm(l.parentNode)){let e=l.parentNode.host;if(c.has(e))break;c.add(e),s.push(e),l=e;continue}if(!xm(l.parentNode)||c.has(l.parentNode))break;c.add(l.parentNode),s.push(l.parentNode),l=l.parentNode}let u=t.type===`click`&&e.namespaceURI===`http://www.w3.org/2000/svg`?s.findIndex(e=>Sm(e,`button`)||Sm(e,`a`)):-1;u>0&&(r||=s.slice(0,u+1).some(e=>!Um(e)||Wm(e)));let d=[],f={},p,m=!1,h=!1;if(Bp(s,e=>{let t=Um(e);if(Sm(e,`a`)&&!n&&!i?.includes(`href`)){let n=e.getAttribute(`href`);m=!!(t&&n&&Xm(n))&&(o?lu(n):n)}_c(Dm(e),`ph-no-capture`)&&(h=!0),d.push(function(e,t,n,r,i=!1){let a=e.tagName.toLowerCase(),o={tag_name:a};jm.indexOf(a)>-1&&!n&&(o.$el_text=a.toLowerCase()===`a`||a.toLowerCase()===`button`?I_(1024,Zm(e)):I_(1024,km(e)));let s=Dm(e);t||r!=null&&r.includes(`class`)||0>=s.length||(o.classes=s.filter(function(e){return e!==``})),Bp(e.attributes,function(n){var a;if((!Wm(e)||[`name`,`id`,`class`,`aria-label`].indexOf(n.name)!==-1)&&!r?.includes(n.name)&&!t&&Xm(n.value)&&(!Oc(a=n.name)||a.substring(0,10)!==`_ngcontent`&&a.substring(0,7)!==`_nghost`)){let e=n.value;n.name===`class`&&(e=Tm(e).join(` `)),o[`attr__`+n.name]=I_(1024,n.name===`href`&&i?lu(e):e)}});let c=1,l=1,u=e;for(;u=Ree(u);)c++,u.tagName===e.tagName&&l++;return o.nth_child=c,o.nth_of_type=l,o}(e,n,r,i,o)),Bp(function(e){if(!Um(e))return{};let t={};return Bp(e.attributes,function(e){if(e.name&&e.name.indexOf(`data-ph-capture-attribute`)===0){let n=e.name.replace(`data-ph-capture-attribute-`,``),r=e.value;n&&r&&Xm(r)&&(t[n]=r)}}),t}(e),(e,t)=>{({}).hasOwnProperty.call(f,t)||(f[t]=e)})}),h)return{props:{},explicitNoCapture:h};if(u>0&&(e=s[u],d.splice(0,u)),r||(d[0].$el_text=Sm(e,`a`)||Sm(e,`button`)?Zm(e):km(e)),m){var g;d[0].attr__href=m;let e=fh(m)?.host,t=R==null||(g=R.location)==null?void 0:g.host;e&&t&&e!==t&&(p=m)}return{props:Vp((v=t.type,{$event_type:v,$ce_version:1}),a?{}:{$elements:d},{$elements_chain:(_=d,wc(_)?function(e){return e.map(e=>{let t=``;if(e.tag_name&&(t+=e.tag_name),e.attr_class){e.attr_class.sort();for(let n of e.attr_class)t+=`.${n.replace(/"/g,``)}`}let n=B(B(B(B({},e.text?{text:e.text}:{}),{},{"nth-child":e.nth_child??0,"nth-of-type":e.nth_of_type??0},e.href?{href:e.href}:{}),e.attr_id?{attr_id:e.attr_id}:{}),e.attributes),r={};return Hp(n).sort(([e],[t])=>function(e,t){return t>e?-1:+(e>t)}(e,t)).forEach(([e,t])=>r[$m(e.toString())]=$m(t.toString())),t+=`:`,t+=Hp(r).map(([e,t])=>`${e}="${t}"`).join(``),t}).join(`;`)}(function(e){return e.map(e=>{let t={text:e.$el_text?.slice(0,400),tag_name:e.tag_name,href:e.attr__href?.slice(0,2048),attr_class:eh(e),attr_id:e.attr__id,nth_child:e.nth_child,nth_of_type:e.nth_of_type,attributes:{}};return Hp(e).filter(([e])=>e.indexOf(`attr__`)===0).forEach(([e,n])=>t.attributes[e]=n),t})}(_)):``)},d[0]?.$el_text?{$el_text:d[0]?.$el_text}:{},p&&t.type===`click`?{$external_click_url:p}:{},f),target:e};var _,v}var Bee=class{fo(){this.po=void 0,clearTimeout(this.mo),this.mo=void 0}yo(e){if(!Um(e))return!0;let t=this.bo().css_selector_ignorelist??Fm,n=new Set,r=e;for(;r;){if(n.size>=1e3||n.has(r))return!0;n.add(r);let e=r,i=Dm(e);if(_c(i,`ph-no-capture`)||_c(i,`ph-sensitive`)||Wm(e)||t.some(t=>Mm(e,t)))return!0;let a=r.parentNode;r=wm(a)?a.host:a&&xm(a)?a:null}return!1}_o(e){if(!this.isEnabled||e.type===`pointercancel`)return void this.fo();if(e.type===`pointerdown`){this.fo();let t=Am(e);e.isPrimary&&e.button===0&&!e.ctrlKey&&t&&xm(t)&&(this.po={target:t,excluded:this.yo(t),id:e.pointerId,x:e.clientX,y:e.clientY,released:!1,distinctId:this.wo?.distinctId});return}let t=this.po;t&&(e.pointerId!==t.id||Math.abs(e.clientX-t.x)>5||Math.abs(e.clientY-t.y)>5?this.fo():e.type===`pointerup`&&(t.released=!0,this.mo=setTimeout(()=>this.fo(),0)))}ko(e){let t=this.po;this.fo();let n=Am(e);if(t?.released&&t.target.isConnected&&t.distinctId===this.wo?.distinctId&&e.pointerId===t.id&&(e.detail>0||e.pointerType===`touch`||e.pointerType===`pen`)&&e.button===0&&5>=Math.abs(e.clientX-t.x)&&5>=Math.abs(e.clientY-t.y)&&n&&(Sm(n,`html`)||Sm(n,`body`))){if(t.excluded)return null;let e=this.bo().css_selector_ignorelist??Fm;return[n,tc?.documentElement,tc?.body].some(t=>{if(!t)return!1;let n=Dm(t);return _c(n,`ph-no-capture`)||_c(n,`ph-sensitive`)||!Um(t)||Wm(t)||e.some(e=>Mm(t,e))})?null:t.target}}constructor(e){this.So=e,this.name=`autocapture`,this.xo=!1,this.Co=null,this.$o=!1,this.To=new Map,this.Io=!1,this.Rr={enabled:!1,rageclick:!1,maskAllElementAttributes:!1,maskAllText:!1,disableCaptureUrlHashes:!1,remoteRequestsDisabled:!1},this.Mo=!1,this.So.refresh(this.Rr),this.rageclicks=new N_(this.Rr.rageclick),this.Eo=null}setup(e){this.Po(),this.wo=e;let t=e.onRemoteConfig(this.onRemoteConfig.bind(this));this.Mo?t.dispose():(this.Ro=t,this.startIfEnabled())}dispose(){var e;this.Mo||(this.Mo=!0,this.wo=void 0,(e=this.Ro)==null||e.dispose(),this.Ro=void 0,this.To.clear(),this.Eo=null,this.Ao())}bo(){return this.So.refresh(this.Rr),this.Rr}Po(){return this.bo(),this.Rr.url_allowlist=this.Rr.url_allowlist?.map(e=>new RegExp(e)),this.Rr.url_ignorelist=this.Rr.url_ignorelist?.map(e=>new RegExp(e)),this.Rr}
12Fo(){if(!this.isBrowserSupported())return void F_.info(`Disabling Automatic Event Collection because this browser is not supported`);if(!R||!tc)return;let e=this.Oo=e=>{e||=R?.event;try{if(e.type===`blur`)return void this.fo();if(e.type.indexOf(`pointer`)===0)return void this._o(e);let t=e.type===`click`?this.ko(e):void 0;if(Ac(t))return;this.Do(e,`$autocapture`,t)}catch(e){F_.error(`Failed to capture event`,e)}};if(Jp(R,`blur`,e),Jp(tc,`submit`,e,{capture:!0}),Jp(tc,`change`,e,{capture:!0}),Jp(tc,`click`,e,{capture:!0}),Bp([`pointerdown`,`pointermove`,`pointerup`,`pointercancel`],t=>{Jp(tc,t,e,{capture:!0})}),this.bo().capture_copied_text){let e=this.Lo=e=>{e||=R?.event;try{this.Do(e,P_)}catch(e){F_.error(`Failed to capture clipboard event`,e)}};Jp(tc,`copy`,e,{capture:!0}),Jp(tc,`cut`,e,{capture:!0}),Jp(tc,`paste`,e,{capture:!0})}}Ao(){this.fo(),this.Oo&&=(R?.removeEventListener(`blur`,this.Oo),Bp([`pointerdown`,`pointermove`,`pointerup`,`pointercancel`],e=>{tc?.removeEventListener(e,this.Oo,!0)}),tc?.removeEventListener(`submit`,this.Oo,!0),tc?.removeEventListener(`change`,this.Oo,!0),tc?.removeEventListener(`click`,this.Oo,!0),void 0),this.Lo&&=(tc?.removeEventListener(`copy`,this.Lo,!0),tc?.removeEventListener(`cut`,this.Lo,!0),tc?.removeEventListener(`paste`,this.Lo,!0),void 0),this.xo=!1}startIfEnabled(){this.isEnabled||this.fo(),!this.Mo&&this.wo&&this.isEnabled&&!this.xo&&(this.Fo(),this.xo=!0)}onRemoteConfig(e){if(this.Mo)return;if(this.$o=!0,!e.ok)return void this.startIfEnabled();let t=e.config;t.elementsChainAsString&&(this.Io=t.elementsChainAsString);let n=t.autocapture_opt_out;var r;Pc(n)&&((r=this.wo)==null||r.kv.set(`$autocapture_disabled_server_side`,n),this.Co=n),this.startIfEnabled()}setElementSelectors(e,t=this){if(this.Mo)return;e.size?this.To.set(t,new Set(e)):this.To.delete(t);let n=new Set;this.To.forEach(e=>{e.forEach(e=>n.add(e))}),this.Eo=n}getElementSelectors(e,t){var n;let r=[];return(n=this.Eo)==null||n.forEach(n=>{(tc?.querySelectorAll(n))?.forEach(i=>{e!==i&&t!==i||_c(r,n)||r.push(n)})}),r}get isEnabled(){if(this.Mo)return!1;let e=this.wo?.kv.get(uf),t=this.Co,n=this.bo();if(!n.remoteRequestsDisabled&&!this.$o)return!1;let r=n.remoteRequestsDisabled&&!this.$o;if(Ac(t)&&!Pc(e)&&!r)return!1;let i=this.Co??!!e;return!!n.enabled&&!i}Do(e,t=`$autocapture`,n){if(!this.isEnabled)return void this.fo();let r=n||Am(e);Cm(r)&&(r=r.parentNode||null);let i=this.Po();var a;t===`$autocapture`&&e.type===`click`&&e instanceof MouseEvent&&i.rageclick&&(a=this.rageclicks)!=null&&a.isRageClick(e.clientX,e.clientY,e.timeStamp||new Date().getTime())&&Bm(r,i.rageclick)&&this.Do(e,`$rageclick`,n);let o=t===P_,s=o?B(B({},i),{},{dom_event_allowlist:void 0}):i;if(r&&function(e,t,n,r,i,a){if(!R||Vm(e)||n?.url_allowlist&&!Em(n.url_allowlist,a)||n?.url_ignorelist&&Em(n.url_ignorelist,a))return!1;if(n?.dom_event_allowlist){let e=n.dom_event_allowlist;if(e&&!e.some(e=>t.type===e))return!1}let{parentIsUsefulElement:o,targetElementList:s}=Hm(e,r);if(!function(e,t){let n=t?.element_allowlist;if(z(n))return!0;for(let t of e)if(n.some(e=>t.tagName.toLowerCase()===e))return!0;return!1}(s,n)||!Nm(s,n?.css_selector_allowlist)||Nm(s,n?.css_selector_ignorelist??Fm))return!1;try{let n=R.getComputedStyle(e);if(n&&n.getPropertyValue(`cursor`)===`pointer`&&t.type===`click`)return!0}catch{}let c=e.tagName.toLowerCase();switch(c){case`html`:return!1;case`form`:return(i||[`submit`]).indexOf(t.type)>=0;case`input`:case`select`:case`textarea`:return(i||[`change`,`click`]).indexOf(t.type)>=0;default:return o?(i||[`click`]).indexOf(t.type)>=0:(i||[`click`]).indexOf(t.type)>=0&&(jm.indexOf(c)>-1||e.getAttribute(`contenteditable`)===`true`)}}(r,e,s,o,o?[`copy`,`cut`,`paste`]:void 0,{config:{get_current_url:i.getCurrentUrl}})){var c;let{props:n,explicitNoCapture:a,target:o}=zee(r,{e,maskAllElementAttributes:i.maskAllElementAttributes,maskAllText:i.maskAllText,elementAttributeIgnoreList:i.element_attribute_ignorelist,elementsChainAsString:this.Io,disableCaptureUrlHashes:i.disableCaptureUrlHashes});if(a)return!1;let s=this.getElementSelectors(r,o);if(s&&s.length>0&&(n.$element_selectors=s),t===P_){let t=e.type||`clipboard`;if(t!==`paste`){var l;let e=R==null||(l=R.getSelection())==null?void 0:l.toString(),t=Om(e);if(!t)return!1;n.$selected_content=t,n.$clipboard_text_length=e?.length??0}n.$copy_type=t}return(c=this.wo)==null||c.capture(t,n),!0}}isBrowserSupported(){return Tc(tc?.querySelectorAll)}},Vee=class{constructor(e){this._instance=e}refresh(e){let t=this._instance.config,n=Ec(t.autocapture)?t.autocapture:void 0;e.enabled=!!t.autocapture,e.rageclick=t.rageclick,e.maskAllElementAttributes=t.mask_all_element_attributes,e.maskAllText=t.mask_all_text,e.disableCaptureUrlHashes=t.disable_capture_url_hashes,e.getCurrentUrl=t.get_current_url,e.remoteRequestsDisabled=this._instance.sl(),e.url_allowlist=n?.url_allowlist,e.url_ignorelist=n?.url_ignorelist,e.dom_event_allowlist=n?.dom_event_allowlist,e.element_allowlist=n?.element_allowlist,e.css_selector_allowlist=n?.css_selector_allowlist,e.css_selector_ignorelist=n?.css_selector_ignorelist,e.element_attribute_ignorelist=n?.element_attribute_ignorelist,e.capture_copied_text=n?.capture_copied_text}},L_=Gd(`[ExceptionAutocapture]`),R_=()=>{},z_=e=>{if(Tc(e))return e.__posthog_layer__??e.__rrweb_layer__};function B_(e,t,n){try{if(!(t in e))return R_;let r={next:e[t]},i=n(function(...e){return r.next.apply(this,e)});return Tc(i)&&(i.prototype=i.prototype||{},Object.defineProperties(i,{__posthog_wrapped__:{enumerable:!1,value:!0},__posthog_layer__:{enumerable:!1,value:r}})),e[t]=i,()=>{if(e[t]===i)return void(e[t]=r.next);let n=e[t],a=z_(n);for(;a;){if(a.next===i)return void(a.next=r.next);n=a.next,a=z_(n)}}}catch{return R_}}var Hee=Gd(`[TracingHeaders]`),V_=Gd(`[Web Vitals]`),H_=9e5,U_=[`CLS`,`FCP`,`INP`,`LCP`],Uee=[`INP`,`LCP`],Wee=[`interactionTarget`,`interactionType`,`inputDelay`,`processingDuration`,`presentationDelay`,`loadState`,`target`,`url`,`timeToFirstByte`,`resourceLoadDelay`,`resourceLoadDuration`,`elementRenderDelay`,`largestShiftTarget`,`largestShiftTime`,`largestShiftValue`,`firstByteToFCP`],W_=`disabled`,G_=`lazy_loading`,K_=Gd(`[SessionRecording]`),Gee=Gd(`[Heatmaps]`);function q_(e){return Ec(e)&&`clientX`in e&&`clientY`in e&&Mc(e.clientX)&&Mc(e.clientY)}var J_=Gd(`[Product Tours]`),Y_=e=>!e.config.disable_product_tours&&!!e.persistence?.get_property(_f),Kee=[`$set_once`,`$set`],X_=Gd(`[SiteApps]`),Z_=`Error while initializing PostHog app with config id `,Q_=(e,t)=>e?.then?e.then(t):t(e),$_=`SDK is not enabled or survey functionality is not yet loaded`,ev=`Disabled. Not loading surveys.`,qee=class{constructor(e,t){this.So=e,this.Ih=t,this.name=`surveys`,this._surveyEventReceiver=null,this._surveyManager=null,this.Mh=!1,this.Eh=!1,this.Ph=[],this.Rh=[],this.Ah=null,this.Fh=null,this.Mo=!1,this.Oh=new Set,this.onRemoteConfig=e=>{if(this.Mo||this.Rr.disableSurveys)return;if(!e.ok)return this.Eh=!0,this.Dh({isLoaded:!1,error:`Remote config unavailable. Not loading surveys.`}),f_.warn(`Remote config unavailable. Not loading surveys.`);let t=e.config.surveys;if(jc(t))return f_.warn(`Flags not loaded yet. Not loading surveys.`);this.Lh=Pc(t)?t:t.length>0,f_.info(`flags response received, isSurveysEnabled: ${this.Lh}`),this.loadIfEnabled()},this.Dh=e=>
12{this.Rh.slice().forEach(t=>this.Nh(t,e))}}setup(e){if(!this.Mo)return this.qh=e,Q_(e.kv.initialize(),()=>{if(this.qh!==e||this.Mo)return;this.qh=void 0,this.wo=e;let t=e.onRemoteConfig(this.onRemoteConfig);this.Mo?t.dispose():(this.Ro=t,this.loadIfEnabled())})}dispose(){var e,t,n,r,i;this.Mo||(this.Mo=!0,this.qh=void 0,this.wo=void 0,(e=this.Ro)==null||e.dispose(),this.Ro=void 0,(t=this._surveyEventReceiver)==null||t.dispose(),this._surveyEventReceiver=null,(n=this._surveyManager)==null||(r=n.dispose)==null||r.call(n),this._surveyManager=null,this.Ph=[],this.Rh.forEach(e=>{e.active=!1}),this.Rh=[],(i=this.jh)==null||i.call(this),this.jh=void 0,this.Ah=null,this.Oh.forEach(e=>clearTimeout(e)),this.Oh.clear())}get Rr(){return this.So.get()}initialize(){this.loadIfEnabled()}reset(){var e,t;(e=this._surveyManager)==null||(t=e.clearInMemoryInProgressSurveyState)==null||t.call(e);try{var n;(n=this._surveyEventReceiver)==null||n.reset(),localStorage.removeItem(`lastSeenSurveyDate`);let e=[];for(let t=0;t<localStorage.length;t++){let n=localStorage.key(t);(n!=null&&n.startsWith(`seenSurvey_`)||n!=null&&n.startsWith(`inProgressSurvey_`))&&e.push(n)}e.forEach(e=>localStorage.removeItem(e))}catch{}this.Dh()}loadIfEnabled(){if(this.Mo||!this.wo)return;let e=this.Rr;if(this._surveyManager)return;if(this.Mh)return void f_.info(`Already initializing surveys, skipping...`);if(e.disableSurveys)return void f_.info(ev);if(e.cookielessMode&&this.So.isOptedOut())return void f_.info(`Not loading surveys in cookieless mode without consent.`);let t=this.So.getExtensions();if(!t)return void this.Bh(`PostHog Extensions not found.`);if(z(this.Lh)&&!e.advancedEnableSurveys)return;let n=this.Lh||e.advancedEnableSurveys;this.Mh=!0,this.Eh=!1;try{let e=t.generateSurveys;if(e)return this.Hh(e,n),void(this.Mh=!1);let r=t.loadExternalDependency;if(!r)return this.Bh(kp),void(this.Mh=!1);r(e=>{try{if(this.Mo)return;let t=this.So.getExtensions();e||!t?.generateSurveys?this.Bh(`Could not load surveys script`,e):this.Hh(t.generateSurveys,n)}finally{this.Mh=!1}})}catch(e){throw this.Mh=!1,this.Bh(`Error initializing surveys`,e),e}}Hh(e,t){if(this.Mo)return;this._surveyManager=e(t),this._surveyEventReceiver=this.So.createEventReceiver(this.Dh);let n=(this.wo??this.Ih)?.kv.get(Kf);n&&this.zh(n),f_.info(`Surveys loaded successfully`),this.Uh(),this.Dh(),this.Wh({isLoaded:!0})}Bh(e,t){this.Eh=!0,f_.error(e,t),this.Dh({isLoaded:!1,error:e}),this.Wh({isLoaded:!1,error:e})}onSurveysLoaded(e){return this.Ph.push(e),this._surveyManager&&this.Wh({isLoaded:!0}),()=>{this.Ph=this.Ph.filter(t=>t!==e)}}getSurveys(e,t=!1){let n=this.wo??this.Ih;if(!n||this.Mo)return;if(this.Rr.disableSurveys)return f_.info(ev),e([]);let r=n.kv.get(Kf);if(r&&!t)return e(r,{isLoaded:!0}),void(this.Vh()&&this.getSurveys(()=>{},!0));if(this.Ah)return void this.Ah.then(({surveys:t,context:n})=>{this.Mo||e(t,n)}).catch(e=>f_.error(`Error in survey callback`,e));let i=this.Gh(`/api/surveys/`,{method:`GET`,query:{token:n.projectToken},sentAt:`query`,timeoutMs:this.Rr.requestTimeoutMs}).then(e=>{try{return this.Zh(n,e)}catch(e){return f_.error(`Error processing surveys response`,e),this.Zh(n,{statusCode:0,error:e})}},e=>this.Zh(n,{statusCode:0,error:e}));this.Ah=i;let a=()=>{this.Ah===i&&(this.Ah=null)};i.then(t=>{a(),this.Mo||(this.Dh(t.context),e(t.surveys,t.context))},a).catch(e=>f_.error(`Error in survey callback`,e))}Gh(e,t){let n=this.wo;return n?n.sendRequest(e,t):new Promise(e=>e({statusCode:0,error:Error($_)}))}Zh(e,t){if(this.Mo)return{surveys:[],context:{isLoaded:!1,error:$_}};let n=t.statusCode;if(n!==200||!t.json){let e=`Surveys API could not be loaded, status: ${n}`;return n===0?t.error||f_.warn(e):f_.error(e),this.Fh=Date.now(),{surveys:[],context:{isLoaded:!1,error:e}}}this.Fh=null;let r=t.json.surveys||[];return e.kv.set({[Kf]:r,[qf]:Date.now()}),this.zh(r),{surveys:r,context:{isLoaded:!0}}}zh(e){var t;let n=e.filter(e=>function(e){return!(!e.start_date||e.end_date)}(e)&&(t_(e)||function(e){var t;return!!(!((t=e.conditions)==null||(t=t.actions)==null||(t=t.values)==null)&&t.length)}(e)));(t=this._surveyEventReceiver)==null||t.replace(n)}Vh(){return this.Qh()&&!this.Ah&&!this.Jh()}Qh(){let e=(this.wo??this.Ih)?.kv.get(qf);return Mc(e)&&Date.now()-e>3e5}Jh(){return Mc(this.Fh)&&3e5>Date.now()-this.Fh}markSurveyAsSeen(e,t){p_({id:e,current_iteration:t?.iteration??null});try{localStorage.setItem(`lastSeenSurveyDate`,new Date().toISOString())}catch{}this.Dh()}Wh(e){for(let t of this.Ph)try{if(!e.isLoaded)return t([],e);
12this.getSurveys(t)}catch(e){f_.error(`Error in survey callback`,e)}}getActiveMatchingSurveys(e,t=!1){if(!jc(this._surveyManager))return this._surveyManager.getActiveMatchingSurveys(e,t);f_.warn(`init was not called`)}onActiveMatchingSurveysChanged(e){if(this.Mo)return()=>{};let t={callback:e,active:!0,revision:0};this.Rh.push(t),this.Uh();let n=(this.wo??this.Ih)?.kv.get(Kf);return this.Rr.disableSurveys||!this._surveyManager&&this.Eh&&!this.Mh||!n&&!jc(this.Fh)&&!this.Ah?this.Nh(t,{isLoaded:!1}):this._surveyManager&&this.Nh(t),()=>{var e;t.active=!1,this.Rh=this.Rh.filter(e=>e!==t),this.Rh.length===0&&((e=this.jh)==null||e.call(this),this.jh=void 0)}}Uh(){var e;this._surveyManager&&this.Rh.length>0&&(this.jh??=(e=this.So).onMatchingConditionsChanged?.call(e,this.Dh))}Nh(e,t){if(this.Mo||!e.active)return;let n=++e.revision,r=r=>{if(!this.Mo&&e.active&&n===e.revision)try{let n=t??{isLoaded:!0},i=JSON.stringify([r,n]);if(i===e.lastResult)return;e.lastResult=i,e.callback(r,n)}catch(e){f_.error(`Error in active matching surveys callback`,e)}};try{t&&!t.isLoaded?r([]):this.getActiveMatchingSurveys(r)}catch(e){f_.error(`Error in active matching surveys callback`,e)}}Kh(e){let t=null;return this.getSurveys(n=>{t=n.find(t=>t.id===e)??null}),t}Xh(e){if(jc(this._surveyManager))return{eligible:!1,reason:$_};let t=typeof e==`string`?this.Kh(e):e;return t?this._surveyManager.checkSurveyEligibility(t):{eligible:!1,reason:`Survey not found`}}Yh(e){if(!this.So.isCapturing())return{eligible:!1,reason:`PostHog is not capturing, so a survey response cannot be recorded`};if(jc(this._surveyManager))return{eligible:!1,reason:$_};let t=typeof e==`string`?this.Kh(e):e;return t?this._surveyManager.checkSurveyRenderability(t):{eligible:!1,reason:`Survey not found`}}canRenderSurvey(e){if(jc(this._surveyManager))return f_.warn(`init was not called`),{visible:!1,disabledReason:$_};let t=this.Yh(e);return{visible:t.eligible,disabledReason:t.reason}}canRenderSurveyAsync(e,t){return jc(this._surveyManager)?(f_.warn(`init was not called`),Promise.resolve({visible:!1,disabledReason:$_})):new Promise(n=>{this.getSurveys(t=>{let r=t.find(t=>t.id===e)??null;if(r){let e=this.Yh(r);n({visible:e.eligible,disabledReason:e.reason})}else n({visible:!1,disabledReason:`Survey not found`})},t)})}renderSurvey(e,t,n){if(!this.So.isCapturing())return;if(jc(this._surveyManager))return void f_.warn(`init was not called`);let r=typeof e==`string`?this.Kh(e):e;if(!r?.id)return void f_.warn(`Survey not found`);if(!m_.includes(r.type))return void f_.warn(`Surveys of type ${r.type} cannot be rendered in the app`);let i=tc?.querySelector(t);if(i){if(r.appearance?.surveyPopupDelaySeconds){f_.info(`Rendering survey ${r.id} with delay of ${r.appearance.surveyPopupDelaySeconds} seconds`);let e=setTimeout(()=>{var t;this.Oh.delete(e),!this.Mo&&this.So.isCapturing()&&(f_.info(`Rendering survey ${r.id} with delay of ${r.appearance?.surveyPopupDelaySeconds} seconds`),(t=this._surveyManager)==null||t.renderSurvey(r,i,n),f_.info(`Survey ${r.id} rendered`))},1e3*r.appearance.surveyPopupDelaySeconds);this.Oh.add(e);return}this._surveyManager.renderSurvey(r,i,n)}else f_.warn(`Survey element not found`)}displaySurvey(e,t){var n;if(!this.So.isCapturing())return;if(jc(this._surveyManager))return void f_.warn(`init was not called`);let r=this.Kh(e);if(!r)return void f_.warn(`Survey not found`);let i=r;if((n=r.appearance)!=null&&n.surveyPopupDelaySeconds&&t.ignoreDelay&&(i=B(B({},r),{},{appearance:B(B({},r.appearance),{},{surveyPopupDelaySeconds:0})})),t.displayType!==Gh.Popover&&t.initialResponses&&f_.warn(`initialResponses is only supported for popover surveys. prefill will not be applied.`),!1===t.ignoreConditions){let e=this.Xh(r);if(!e.eligible)return void f_.warn(`Survey is not eligible to be displayed: `,e.reason)}t.displayType===Gh.Inline?this.renderSurvey(i,t.selector,t.properties):this._surveyManager.handlePopoverSurvey(i,t)}cancelPendingSurvey(e){jc(this._surveyManager)?f_.warn(`init was not called`):this._surveyManager.cancelSurvey(e)}handlePageUnload(){var e,t;(e=this._surveyManager)==null||(t=e.handlePageUnload)==null||t.call(e)}};function tv(e,t,n){if(jc(e))return!1;switch(n){case`exact`:return e===t;case`contains`:{let n=t.replace(/[.*+?^${}()|[\]\\]/g,`\\$&`).replace(/_/g,`.`).replace(/%/g,`.*`);return new RegExp(n,`i`).test(e)}case`regex`:try{return new RegExp(t).test(e)}catch{return!1}default:return!1}}var Jee=class{constructor(e){this._instance=e,this.tc=new Set,this.ec=new Set,this.nc=new Jg,this.sc=(e,t)=>this.rc(e,t)&&this.oc(e,t)&&this.ac(e,t)&&this.lc(e,t),this.rc=(e,t)=>!t?.event||e?.event===t?.event}init(){z(this._instance?._addCaptureHook)||(this.uc=this._instance?._addCaptureHook((e,t)=>{this.on(e,t)}))}dispose(){var e,t;(e=this.uc)==null||e.call(this),this.uc=void 0,(t=this._instance)==null||(t=t.autocapture)==null||t.setElementSelectors(new Set,this),this.nc=new Jg}register(e){if(!z(this._instance?._addCaptureHook)&&(e.forEach(e
12=>{var t;this.tc.add(e),(t=e.steps)==null||t.forEach(e=>{this.ec.add(e?.event||``)})}),this._instance?.autocapture)){let e=new Set;this.tc.forEach(t=>{var n;(n=t.steps)==null||n.forEach(t=>{t!=null&&t.selector&&e.add(t.selector)})}),this._instance.autocapture.setElementSelectors(e,this)}}replace(e){this.tc.clear(),this.ec.clear(),this.register(e)}on(e,t){t!=null&&e.length!=0&&(this.ec.has(e)||this.ec.has(t.event))&&this.tc.forEach(e=>{this.hc(t,e)&&this.nc.emit(`actionCaptured`,e.name)})}cc(e){this.onAction(`actionCaptured`,t=>e(t))}hc(e,t){if(t?.steps==null)return!1;for(let n of t.steps)if(this.sc(e,n))return!0;return!1}onAction(e,t){return this.nc.on(e,t)}oc(e,t){if(t?.url){var n;let r=e==null||(n=e.properties)==null?void 0:n.$current_url;if(!r||typeof r!=`string`||!tv(r,t.url,t.url_matching||`contains`))return!1}return!0}ac(e,t){return!!this.dc(e,t)&&!!this.vc(e,t)&&!!this.fc(e,t)}dc(e,t){var n;if(!t?.href)return!0;let r=this.gc(e);if(r.length>0)return r.some(e=>tv(e.href,t.href,t.href_matching||`exact`));let i=(e==null||(n=e.properties)==null?void 0:n.$elements_chain)||``;return!!i&&tv(function(e){let t=e.match(/(?::|")href="(.*?)"/);return t?t[1]:``}(i),t.href,t.href_matching||`exact`)}vc(e,t){var n;if(!t?.text)return!0;let r=this.gc(e);if(r.length>0)return r.some(e=>tv(e.text,t.text,t.text_matching||`exact`)||tv(e.$el_text,t.text,t.text_matching||`exact`));let i=(e==null||(n=e.properties)==null?void 0:n.$elements_chain)||``;return!!i&&(a=function(e){let t=[],n=/(?::|")text="(.*?)"/g,r;for(;!jc(r=n.exec(e));)t.includes(r[1])||t.push(r[1]);return t}(i),o=t.text,s=t.text_matching||`exact`,a.some(e=>tv(e,o,s)));var a,o,s}fc(e,t){var n,r;if(!t?.selector||(e==null||(n=e.properties)==null?void 0:n.$element_selectors)?.includes(t.selector))return!0;let i=(e==null||(r=e.properties)==null?void 0:r.$elements_chain)||``;if(t.selector_regex&&i)try{return new RegExp(t.selector_regex).test(i)}catch{return!1}return!1}gc(e){var t;return(e==null||(t=e.properties)==null?void 0:t.$elements)==null?[]:e?.properties.$elements}lc(e,t){return!t?.properties||t.properties.length===0||a_(t.properties.reduce((e,t)=>{let n=wc(t.value)?t.value.map(String):t.value==null?[]:[String(t.value)];return e[t.key]={values:n,operator:t.operator||`exact`},e},{}),e?.properties)}},Yee=class{constructor(e,t){var n,r;this.mc=[],this._instance=e,this.yc=t,this.bc=new Map,this._c=new Map,this.wc=new Map,this.kc=(n=this._instance)==null||(r=n.onSessionId)==null?void 0:r.call(n,e=>this.Sc(e))}xc(e){return!1}Cc(){return null}$c(e){}Tc(){}Ic(e,t){return!!e&&a_(e.propertyFilters,t?.properties)}Mc(e,t){let n=new Map;return e.forEach(e=>{var r;(r=e.conditions)==null||(r=r[t])==null||(r=r.values)==null||r.forEach(t=>{if(t?.name){let r=n.get(t.name)||[];r.push(e.id),n.set(t.name,r)}})}),n}Ec(e,t,n){let r=(n===Vh.Activation?this.bc:this._c).get(e),i=[];return this.Pc(e=>{i=e.filter(e=>r?.includes(e.id))}),i.filter(r=>{var i;let a=(i=r.conditions)==null||(i=i[n])==null||(i=i.values)==null?void 0:i.find(t=>t.name===e);return this.Ic(a,t)})}register(e){this.Rc(e,!1)}replace(e){this.Rc(e,!0)}Rc(e,t){z(this._instance?._addCaptureHook)||(this.Ac(e,t),this.Fc(e,t))}Fc(e,t){let n=e.filter(e=>{var t;return(t=e.conditions)==null||(t=t.actions)==null||(t=t.values)==null?void 0:t.length});var r;if(t&&this.wc.clear(),n.length===0)return void(t&&((r=this.Oc)==null||r.replace([])));this.Oc||(this.Oc=new Jee(this._instance),this.Oc.init(),this.Oc.cc(e=>this.onAction(e)));let i=[];n.forEach(e=>{var t;(t=e.conditions)==null||(t=t.actions)==null||t.values.forEach(t=>{if(i.push(t),t.name){let n=this.wc.get(t.name)??[];n.includes(e.id)||n.push(e.id),this.wc.set(t.name,n)}})}),t?this.Oc.replace(i):this.Oc.register(i)}Dc(e,t){t.forEach((t,n)=>{let r=e.get(n)??[];t.forEach(e=>{r.includes(e)||r.push(e)}),e.set(n,r)})}Ac(e,t){let n=e.filter(e=>{var t;return e.conditions?.events&&((t=e.conditions)==null||(t=t.events)==null||(t=t.values)==null?void 0:t.length)>0}),r=e.filter(e=>{var t;return e.conditions?.cancelEvents&&((t=e.conditions)==null||(t=t.cancelEvents)==null||(t=t.values)==null?void 0:t.length)>0}),i=this.Mc(e,Vh.Activation),a=this.Mc(e,Vh.Cancellation);t?(this.bc=i,this._c=a):(this.Dc(this.bc,i),this.Dc(this._c,a)),(n.length!==0||r.length!==0||e.some(e=>{var t;return(t=e.conditions)==null||(t=t.actions)==null||(t=t.values)==null?void 0:t.length}))&&(this.uc??=this._instance?._addCaptureHook((e,t)=>{this.onEvent(e,t)}))}onEvent(e,t){var n,r;let i=this.Lc(),a=(t==null||(n=t.properties)==null?void 0:n.$survey_id)||(t==null||(r=t.properties)==null?void 0:r.$product_tour_id);if(a&&this.getActivatedIds().includes(a)){let n=this.Nc(e,a,t);if(n===`consume`)return i.info(`event consumed activated item, remov
12ing it`,{event:e,itemId:a}),void this.qc([a]);if(n===`persist`)return i.info(`shown item promoted to persisted activation`,{event:e,itemId:a}),this.jc(a),void this.Bc([a])}if(this._c.has(e)){let n=this.Ec(e,t,Vh.Cancellation);n.length>0&&(i.info(`cancel event matched, cancelling items`,{event:e,itemsToCancel:n.map(e=>e.id)}),this.qc(n.map(e=>e.id)),n.forEach(e=>this.Hc(e.id)))}if(!this.bc.has(e))return;i.info(`event name matched`,{event:e,eventPayload:t,items:this.bc.get(e)});let o=this.Ec(e,t,Vh.Activation);this.zc(o.map(e=>e.id))}onAction(e){this.wc.has(e)&&this.zc(this.wc.get(e)||[])}zc(e){var t,n;if(e.length===0)return;let r=!!(!((t=this._instance)==null||(n=t.get_session_id)==null)&&n.call(t)),i=[];for(let t of e)r&&this.xc(t)?this.jc(t)&&this.Uc(t):i.push(t);i.length>0&&(this.mc=[...new Set([...this.mc,...i])]),this.Lc().info(`updating activated items`,{activatedItems:this.getActivatedIds()}),this.Wc()}jc(e){this.mc=this.mc.filter(t=>t!==e);let t=this.Vc();return!t.includes(e)&&(this.Gc([...t,e]),this.Zc(),!0)}qc(e){let t=new Set(e);this.mc=this.mc.filter(e=>!t.has(e));let n=this.Qc(),r=n.filter(e=>!t.has(e));r.length!==n.length&&(this.Gc(r),r.length===0&&this.Jc()),this.Bc(e),this.Wc()}Wc(){try{var e;(e=this.yc)==null||e.call(this)}catch(e){this.Lc().error(`Error while handling activated items change`,e)}}Kc(){var e;let t=this.Cc();if(!t)return{};let n=(e=this._instance)==null||(e=e.persistence)==null?void 0:e.props[t];return n&&typeof n==`object`?n:{}}Uc(e){if(!this.Cc())return;let t=this.Kc();this.$c(B(B({},t),{},{[e]:Date.now()}))}Bc(e){if(!this.Cc())return;let t=this.Kc(),n={},r=!1;for(let[i,a]of Object.entries(t))e.includes(i)?r=!0:n[i]=a;r&&(Dc(n)?this.Tc():this.$c(n))}Xc(){this.Cc()&&this.Tc()}getActivationTimestamp(e){if(!this.Vc().includes(e))return;let t=this.Kc()[e];return Mc(t)?t:void 0}Qc(){var e;let t=this.Yc();return((e=this._instance)==null||(e=e.persistence)==null?void 0:e.props[t])||[]}Vc(){var e,t,n;let r=this.Qc();if(r.length===0)return[];let i=(e=this._instance)==null||(e=e.persistence)==null?void 0:e.props[this.td()],a=(t=this._instance)==null||(n=t.get_session_id)==null?void 0:n.call(t);return a&&i===a?r:[]}Zc(){var e,t;let n=(e=this._instance)==null||(t=e.get_session_id)==null?void 0:t.call(e);n&&this.ed(n)}Jc(){this.nd()}Sc(e){var t;let n=(t=this._instance)==null||(t=t.persistence)==null?void 0:t.props[this.td()];if(n&&n!==e){let e=this.Qc(),t=this.Kc();e.length>0&&(this.Gc([]),e.filter(e=>Mc(t[e])).forEach(e=>this.Hc(e))),this.Jc(),this.Xc(),e.length>0&&this.Wc()}}getActivatedIds(){return[...new Set([...this.Vc(),...this.mc])].filter(e=>!this.sd(e))}dispose(){var e,t,n;(e=this.kc)==null||e.call(this),this.kc=void 0,(t=this.uc)==null||t.call(this),this.uc=void 0,(n=this.Oc)==null||n.dispose(),this.Oc=void 0}reset(){this.mc=[],this.Qc().length>0&&this.Gc([]),this.Jc(),this.Xc(),this.Wc()}getEventToItemsMap(){return this.bc}rd(){return this.Oc}},Xee=class extends Yee{constructor(e,t){super(e,t)}Yc(){return Jf}td(){return Yf}Cc(){return Xf}$c(e){var t;(t=this._instance)==null||(t=t.persistence)==null||t.register({$surveys_activated_timestamps:e})}Tc(){var e;(e=this._instance)==null||(e=e.persistence)==null||e.unregister(`$surveys_activated_timestamps`)}xc(e){var t;let n;this.Pc(t=>{n=t.find(t=>t.id===e)});let r=n==null||(t=n.appearance)==null?void 0:t.surveyPopupDelaySeconds;return Mc(r)&&r>0}od(){return Uh.SHOWN}Pc(e){var t;(t=this._instance)==null||t.getSurveys(e)}Hc(e){var t;(t=this._instance)==null||t.cancelPendingSurvey(e)}Lc(){return f_}Gc(e){var t;(t=this._instance)==null||(t=t.persistence)==null||t.register({$surveys_activated:e})}ed(e){var t;(t=this._instance)==null||(t=t.persistence)==null||t.register({$surveys_activated_session:e})}nd(){var e;(e=this._instance)==null||(e=e.persistence)==null||e.unregister(`$surveys_activated_session`)}sd(){return!1}Nc(e,t,n){var r;if(e===Uh.SENT&&!1===(n==null||(r=n.properties)==null?void 0:r.$survey_completed))return`ignore`;let i;return this.Pc(e=>{i=e.find(e=>e.id===t)}),!i||function(e){var t;return t_(e)&&!!(!((t=e.conditions)==null||(t=t.events)==null)&&t.repeatedActivation)||e.schedule===`always`}(i)?e===Uh.SHOWN?`consume`:`ignore`:e===Uh.SHOWN?`persist`:e===Uh.DISMISSED||e===Uh.SENT?`consume`:`ignore`}getSurveys(){return this.getActivatedIds()}
12getEventToSurveys(){return this.getEventToItemsMap()}},Zee=class{constructor(e){this._instance=e}initialize(){}get(e){if(typeof e==`string`)return this._instance.get_property(e);let t={};for(let n of e){let e=this._instance.get_property(n);z(e)||(t[n]=e)}return t}set(e,t){this._instance.register(typeof e==`string`?{[e]:t}:e)}remove(e){typeof e==`string`?this._instance.unregister(e):e.forEach(e=>this._instance.unregister(e))}},Qee=class{constructor(e){this._instance=e}get(){let e=this._instance.config;return{disableSurveys:e.disable_surveys,cookielessMode:!!e.cookieless_mode,advancedEnableSurveys:e.advanced_enable_surveys,requestTimeoutMs:e.surveys_request_timeout_ms}}isOptedOut(){return this._instance.consent.isOptedOut()}isCapturing(){return this._instance.is_capturing()}getExtensions(){let e=uc?.__PosthogExtensions__;if(!e)return;let{generateSurveys:t,loadExternalDependency:n}=e;return{generateSurveys:t?e=>t(this._instance,e):void 0,loadExternalDependency:n?e=>n(this._instance,`surveys`,e):void 0}}createEventReceiver(e){return new Xee(this._instance,e)}onMatchingConditionsChanged(e){let t=this._instance._addCaptureHook(t=>{t!==`$pageview`&&t!==Uh.SHOWN&&t!==Uh.DISMISSED&&t!==Uh.SENT||e()}),n=()=>e();Jp(R,`PHSurveyShown`,n);let r=!1,i=this._instance.onFeatureFlags(()=>{r&&e()});return r=!0,()=>{r=!1,t(),i(),R?.removeEventListener(`PHSurveyShown`,n)}}},$ee=R?.location?hh(R.location.hash,`__posthog`)||hh(location.hash,`state`):null,nv=`_postHogToolbarParams`,rv=Gd(`[Toolbar]`),iv=Gd(`[FeatureFlags]`),ete=class{constructor(e,t=!1){this.ad=!1,this.update(e,t)}update(e,t){this.ld=((e,t)=>({bootstrap:{featureFlags:e.bootstrap?.featureFlags??void 0,featureFlagPayloads:e.bootstrap?.featureFlagPayloads??void 0},remoteRequestsDisabled:t,featureFlagsDisabled:!!e.advanced_disable_feature_flags,onlyEvaluateSurveyFeatureFlags:!!e.advanced_only_evaluate_survey_feature_flags,deduplicateCallsPerSession:!!e.advanced_feature_flags_dedup_per_session,cacheTtlMs:e.feature_flag_cache_ttl_ms,refreshIntervalMs:e.remote_config_refresh_interval_ms??3e5,idleRefreshBackoff:z(e.remote_config_refresh_interval_ms),requestTimeoutMs:e.feature_flag_request_timeout_ms,requestMaxRetries:Math.max(0,e.feature_flag_request_max_retries??1),compression:e.disable_compression?void 0:`best-available`,evaluationContexts:e.evaluation_contexts??e.evaluation_environments??[],flagKeys:wc(e.flag_keys)?e.flag_keys:void 0}))(e,t),!e.evaluation_environments||e.evaluation_contexts||this.ad||(iv.warn(`evaluation_environments is deprecated. Use evaluation_contexts instead. evaluation_environments will be removed in a future version.`),this.ad=!0),z(e.flag_keys)||wc(e.flag_keys)||iv.error(`Invalid flag_keys found:`,e.flag_keys,`Expected array of non-empty strings`)}get(){return this.ld}},av=Gd(`[FeatureFlags]`),ov=Gd(`[FeatureFlags]`,{debugEnabled:!0}),sv=`" failed. Feature flags didn't load in time.`,tte=[502,504],cv=[`click`,`keydown`,`wheel`,`touchstart`,`pointerdown`],lv=`connection_error`,uv=e=>{let t={};for(let n=0;e.length>n;n++)t[e[n]]=!0;return t},dv=e=>{let t={};for(let[n,r]of Hp(e||{}))r&&(t[n]=r);return t},fv=e=>zc(e)&&(e.name===`RangeError`&&e.message.indexOf(`Maximum call stack size exceeded`)===0||e.name===`InternalError`&&e.message===`too much recursion`),pv=Gd(`[Error tracking]`),mv=`webkit-masked-url:`,nte=[{value:`isolatedAPI.contexts.topHostname`,exact:!1},{value:`No response from target`,exact:!0}],rte=[`chrome-extension://`,`moz-extension://`,`safari-extension:`,`safari-web-extension:`,mv],ite=[`__firefox__`,`__gCrWeb`],hv=`Refusing to render web experiment since the viewer is a likely bot`,ate={icontains:(e,t)=>t.toLowerCase().indexOf(e.toLowerCase())>-1,not_icontains:(e,t)=>t.toLowerCase().indexOf(e.toLowerCase())===-1,regex:(e,t)=>n_(t,e),not_regex:(e,t)=>!n_(t,e),exact:(e,t)=>t===e,is_not:(e,t)=>t!==e},gv=Gd(`[Conversations]`),_v=`Conversations not available yet.`;function vv(e,t){let n=e?.flushIntervalMs??3e3,r=e?.maxBufferSize??100,i=t?.consoleCapture?void 0:e?.maxLogsPerInterval??1e3,a=z(i)?Math.max(r,2048):Math.max(r,i),o=B(B({},function(){let e=``,t=``;try{let n=ec?.userAgent;n&&([e,t]=Yl(n))}catch{}return function(e,t){let n=function(e){if(e)return{}.hasOwnProperty.call(Od,e)?Od[e]:e}(e);return B(B({},n?{"os.name":n}:{}),t?{"os.version":t}:{})}(e,t)}()),e?.resourceAttributes);return{serviceName:o?.[`service.name`]??e?.serviceName??t?.serviceNameDefault,serviceVersion:o?.[`service.version`]??e?.serviceVersion,environment:o?.[`deployment.environment`]??e?.environment,resourceAttributes:o,beforeSend:e?.beforeSend,flushIntervalMs:n,maxBufferSize:r,maxQueueSize:a,maxBatchRecordsPerPost:100,rateCapWindowMs:n,maxLogsPerInterval:i,backgroundFlushBudgetMs:0,terminationFlushBudgetMs:0}}var ote=[`debug`,`log`,`warn`,`error`,`info`],ste=e=>{for(;e?.__rrweb_original__;)e=e.__rrweb_original__;return e},yv=`console`,bv=`__posthogHandledLogsRequestError`,xv=(e,t)=>{let n=e instanceof Error?e:Error(t);return n[bv]=!0,n},Sv=e=>!!e&&typeof e==`object`&&!0===e[bv],Cv=Gd(`[NetworkMetrics]`),wv=()=>{var e;return!(R==null||(e=R.performance)==null)&&e.now?R.performance.now():Date.now()},cte={"http:":80,"https:":443},lte=new Set([`CONNECT`,`DELETE`,`GET`,`HEAD`,`OPTIONS`,`PATCH`,`POST`,`PUT`,`TRACE`]),Tv=(e,t)=>
12{let n=String(t);return{method:String(e).toUpperCase(),url:fh(n)?.href||n}},Ev=(e,t,n,r,i,a,o=!1)=>{try{var s;let c=i();if(!c)return;let l=n||void 0,u=wv()-r,d=fh(t.url);if(d&&d.protocol!==`http:`&&d.protocol!==`https:`)return;let f={url:d?.href||t.url,method:t.method},p=Tc(c.name)?c.name(f):Oc(c.name)?c.name:`http.client.request.duration`;if(!p)return;let m=o&&!l?void 0:((e,t)=>e?400>e?void 0:String(e):t?.name||`_OTHER`)(l,a),h=B(B(B(B(B({},(e=>{let t=lte.has(e)?e:`_OTHER`;return B({"http.request.method":t},t===`_OTHER`&&e!==t?{"http.request.method_original":e}:{})})(f.method)),d?(e=>{return{"server.address":e.hostname.startsWith(`[`)&&e.hostname.endsWith(`]`)?e.hostname.slice(1,-1):e.hostname,"server.port":Number(e.port)||cte[e.protocol],"url.scheme":e.protocol.slice(0,-1),"url.template":(t=e.pathname,t.split(`/`).map(e=>(e=>/^\d+$/.test(e)||e.length>=8&&/^[0-9a-f-]*\d[0-9a-f-]*$/i.test(e))(e)?`:id`:e).join(`/`))};var t})(d):{}),l?{"http.response.status_code":l}:{}),m?{"error.type":m}:{}),c.attributes?.call(c,f,{status:l,durationMs:u}));(s=e.metrics)==null||s.histogram(p,u,{unit:`ms`,attributes:h})}catch(e){Cv.error(`Failed to record network metric`,e)}},Dv=()=>{},ute=(e,t)=>Tc(R?.fetch)?B_(R,`fetch`,n=>function(...r){let i=wv(),a=n.apply(this,r);if(!t())return a;try{let[n,o]=r,s=Tv(o?.method??n?.method??`GET`,n?.url??n);return a.then(n=>(Ev(e,s,n?.status,i,t,void 0,!0),n),n=>{throw Ev(e,s,void 0,i,t,n),n})}catch(e){return Cv.error(`Failed to observe fetch`,e),a}}):Dv,dte=(e,t)=>{var n;let r=R==null||(n=R.XMLHttpRequest)==null?void 0:n.prototype;if(!r)return Dv;let i=new WeakMap,a=B_(r,`open`,e=>function(...t){try{kg.has(this)||i.set(this,Tv(t[0],t[1]))}catch(e){Cv.error(`Failed to observe XHR open`,e)}return e.apply(this,t)}),o=B_(r,`send`,n=>function(...r){let a;try{let n=i.get(this);if(n&&t()){let r=wv();a=()=>{this.removeEventListener(`loadend`,a),Ev(e,n,this.status,r,t)},Jp(this,`loadend`,a)}}catch(e){Cv.error(`Failed to observe XHR send`,e)}try{return n.apply(this,r)}catch(e){throw a&&this.removeEventListener(`loadend`,a),e}});return()=>{a(),o()}},Ov={featureFlags:class{constructor(e){this.name=`featureFlags`,this.ud=!1,this.featureFlagEventHandlers=[],this.$=av,this.hd={},this.dd={},this.vd=[],this.fd=!1,this.pd=!1,this.gd=0,this.md=!1,this.yd=!1,this.bd=!1,this._d=!1,this.wd=0,this.kd=!1,this.an=()=>{let e=this.Sd();this.wd=0,e&&this.reloadFeatureFlags()},this.xd=()=>{let e=this.Cd,t=this.$d??e;z(e)||z(t)||this.Rr.remoteRequestsDisabled||!tc||tc.visibilityState===`hidden`||Date.now()-(this.Td??0)<t||(this.$d=this.kd||!this.Rr.idleRefreshBackoff?e:Math.min(2*t,36e5),this.kd=!1,this.reloadFeatureFlags(),this.Id())},this.Md=()=>{this.kd&&this.$d===this.Cd||this.Ed()},this.ln=()=>{tc?.visibilityState===`visible`&&this.Ed()},`get`in e?this.So=e:(this._instance=e,this.Pd=new ete(e.config,e.sl()),this.So=this.Pd)}updateConfig(e,t){var n;(n=this.Pd)==null||n.update(e,t),this.wo&&this.Rd()}setup(e){return this.qh=e,this.$=e.logger.createLogger(`[FeatureFlags]`),Q_(e.kv.initialize(),()=>{this.qh===e&&(this.qh=void 0,this.wo=e,this.Ad(e))})}Ad(e){var t;if(this.wo===e)return R&&Jp(R,`online`,this.an),this.Rd(),this.Fd=e.registerDynamicEventProperties(()=>this.Od()?this.hd:this.dd),this.Dd=(t=this._instance)==null||(t=t.persistence)==null?void 0:t.onCrossTabFeatureFlagChange(()=>{this.Ld(),this.Nd(),this.qd()}),this.Nd(),this.initialize()}Ed(){this.kd=!0,this.$d=this.Cd,this.xd()}Rd(){let e=this.Rr.refreshIntervalMs,t=!this.Rr.remoteRequestsDisabled&&tc&&!z(e)&&e>0?e:void 0;this.Rr.idleRefreshBackoff||(this.$d=t),t!==this.Cd&&(this.jd(),z(t)||(this.Cd=t,this.$d=t,this.Id(),tc!=null&&tc.addEventListener&&(Jp(tc,Np,this.ln),zp(cv,e=>{Jp(tc,e,this.Md,{capture:!0})}))))}Id(){z(this.Cd)||(z(this.Bd)||clearInterval(this.Bd),this.Td=Date.now(),this.Bd=setInterval(this.xd,this.Cd))}jd(){var e;z(this.Bd)||(clearInterval(this.Bd),this.Bd=void 0,tc==null||(e=tc.removeEventListener)==null||e.call(tc,`visibilitychange`,this.ln),zp(cv,e=>{var t;tc==null||(t=tc.removeEventListener)==null||t.call(tc,e,this.Md,{capture:!0})})),this.Cd=void 0,this.$d=void 0,this.kd=!1,this.Td=void 0}destroy(){this.Hd()}dispose(){this.Hd()}Hd(){var e,t;this.jd(),this.gd++,this.yd=!1,this.qh=void 0,this.wo&&=(this.zd(),(e=this.Fd)==null||e.dispose(),this.Fd=void 0,(t=this.Dd)==null||t.call(this),this.Dd=void 0,this.vd=[],R?.removeEventListener(`online`,this.an),void 0)}get Rr(){return this.So.get()}Ud(e){return this.Wd&&e in this.Wd?this.Wd[e]:this.wo?.kv.get(e)}Ld(){return!!this.Wd&&(this.Wd=void 0,!0)}Vd(){return!z(this.wo?.kv.get(`$enabled_feature_flags`))&&this.Ld()}At(e){this.Gd(()=>this.wo?.kv.set(e))}Zd(e,t,n){if(!this._instance?.persistence||!e.$enabled_feature_flags)return;let r=this.Ud(`$enabled_feature_flags`)||{},i=e.$enabled_feature_flags||{},a=t.flags||t.featureFlags,o=t.flags?Object.entries(t.flags).filter(([,e])=>!e?.failed).map(([e])=>e):[],s=!!t.errorsWhileComputingFlags&&!!t.flags,c=s?o:n&&!wc(a)?Object.keys(a||{}):Array.from(new Set([...Object.keys(r),...Object.keys(i)])),l=this.Ud(`$feature_flag_payloads`)||{},u=e.$feature_flag_payloads||{},d=s||n?c:Array.from(new Set([...Object.keys(l),...Object.keys(u)])),f=!s&&!n,p=!!f||c,m=!!f||d,h={[Ff]:p,[Pf]:p,[Rf]:m};e.$feature_flag_details&&(h[Lf]=p);for(let t of[zf,sp,Bf])z(e[t])||(h[t]=!0);this._instance.persistence.markCrossTabFeatureFlagChanges(h)}Lt(e){this.Gd(()=>this.wo?.kv.remove(e))}Gd(e){try{e()}catch(e){this.$.error(`Failed to update feature flag persistence`,e)}}Nd(){let e={};for(let t of[Ff,Rf,zf,Vf]){let n=this.Ud(t);z(n)||(e[t]=n)}this.hd=e;let t=B({},e),n=this.Ud(Pf);if(n)for(let[e,r]of Object.entries(n))t[`$feature/${e}`]=r;this.dd=t}Od(){let e=this.Rr.cacheTtlMs;
12if(!e||0>=e)return!1;let t=this.Ud(sp);return typeof t!=`number`||Date.now()-t>e}Qd(){return!!this.Od()&&(this._d||this.pd||(this._d=!0,this.$.warn(`Feature flag cache is stale, triggering refresh...`),this.reloadFeatureFlags()),!0)}Jd(){let e=this.Rr.evaluationContexts;return e?.length?e.filter(e=>{let t=e&&typeof e==`string`&&e.trim().length>0;return t||this.$.error(`Invalid evaluation context found:`,e,`Expected non-empty string`),t}):[]}Kd(){let e=this.Rr.flagKeys;if(!z(e))return e.filter(e=>{let t=e&&typeof e==`string`&&e.trim().length>0;return t||this.$.error(`Invalid flag key found:`,e,`Expected non-empty string`),t})}initialize(){let e=this.Rr,t=e.bootstrap?.featureFlags??{};if(Object.keys(t).length){let n=e.bootstrap?.featureFlagPayloads??{},r=Object.keys(t).filter(e=>!z(t[e])).reduce((e,n)=>(e[n]=t[n],e),{}),i=Object.keys(n).filter(e=>r[e]).reduce((e,t)=>(e[t]=n[t],e),{});return this.Xd({featureFlags:r,featureFlagPayloads:i},void 0,{persist:!1})}}updateFlags(e,t,n){var r,i;let a=n?.merge&&(r=this.Ud(`$enabled_feature_flags`))!=null?r:{},o=n?.merge&&(i=this.Ud(`$feature_flag_payloads`))!=null?i:{},s=B(B({},a),e),c=B(B({},o),t),l={};for(let[e,t]of Object.entries(s))l[e]={key:e,enabled:sd(t),variant:cd(t),reason:void 0,metadata:z(c?.[e])?void 0:{id:0,version:void 0,description:void 0,payload:c[e]}};this.Xd({flags:l})}get hasLoadedFlags(){return this.fd}getFlags(){return Object.keys(this.getFlagVariants())}getFlagsWithDetails(){let e=this.Ud(Lf),t=this.Ud(Vf),n=this.Ud(Hf);if(!n&&!t)return e||{};let r=Vp({},e||{}),i=[...new Set([...Object.keys(n||{}),...Object.keys(t||{})])];for(let e of i){var a;let i=r[e],s=t?.[e],c=z(s)?(a=i?.enabled)!=null&&a:!!s,l=z(s)?i?.variant:typeof s==`string`?s:void 0,u=n?.[e],d=B(B({},i),{},{enabled:c,variant:c?l??i?.variant:void 0});var o;c!==i?.enabled&&(d.original_enabled=i?.enabled),l!==i?.variant&&(d.original_variant=i?.variant),u&&(d.metadata=B(B({},i?.metadata),{},{payload:u,original_payload:i==null||(o=i.metadata)==null?void 0:o.payload})),r[e]=d}return this.ud||=(this.$.warn(` Overriding feature flag details!`,{flagDetails:e,overriddenPayloads:n,finalDetails:r}),!0),r}getAllFeatureFlags(){let e=this.getFlagVariants(),t=this.getFlagPayloads();return Object.keys(e).map(n=>{let r=e[n];return{key:n,enabled:sd(r),variant:cd(r),payload:od(t[n])}})}getFlagVariants(){let e=this.Ud(Pf),t=this.Ud(Vf);if(!t)return e||{};let n=Vp({},e||{}),r=Object.keys(t);for(let e=0;r.length>e;e++)n[r[e]]=t[r[e]];return this.ud||=(this.$.warn(` Overriding feature flags!`,{enabledFlags:e,overriddenFlags:t,finalFlags:n}),!0),n}getFlagPayloads(){let e=this.Ud(Rf),t=this.Ud(Hf);if(!t)return e||{};let n=Vp({},e||{}),r=Object.keys(t);for(let e=0;r.length>e;e++)n[r[e]]=t[r[e]];return this.ud||=(this.$.warn(` Overriding feature flag payloads!`,{flagPayloads:e,overriddenPayloads:t,finalPayloads:n}),!0),n}reloadFeatureFlags(){this.md||this.Rr.featureFlagsDisabled||this.Sd()||(this.pd&&(this.yd=!0),this.Yd||=(this.vd.slice().forEach(e=>{try{e()}catch(e){this.$.error(`Error while running feature flags reloading callback`,e)}}),setTimeout(()=>{this.tv()},5)))}zd(){clearTimeout(this.Yd),this.Yd=void 0}onReloading(e){return this.vd.push(e),()=>{this.vd=this.vd.filter(t=>t!==e)}}ensureFlagsLoaded(){this.fd||this.pd||this.Yd||this.reloadFeatureFlags()}setAnonymousDistinctId(e){this.$anon_distinct_id=e}setReloadingPaused(e){this.md=e}resetFlagCallReported(){this.Lt(ip)}tv(e){this.zd();let t=this.wo;if(!t||this.Rr.remoteRequestsDisabled||this.Sd())return;if(this.pd)return void(this.yd=!0);let n={token:t.projectToken,distinct_id:t.distinctId,groups:t.groups,$anon_distinct_id:this.$anon_distinct_id,person_properties:B(B(B({},t.initialPersonProperties),this.Ud(`$stored_person_properties`)||{}),{},{$lib:t.library.name,$lib_version:t.library.version}),group_properties:this.Ud(Wf),timezone:Oh()};z(t.deviceId)||(n.$device_id=t.deviceId),(e!=null&&e.disableFlags||this.Rr.featureFlagsDisabled)&&(n.disable_flags=!0);let r=this.Jd();r.length&&(n.evaluation_contexts=r);let i=this.Kd();z(i)||(n.flag_keys=i);let a=this.Rr.onlyEvaluateSurveyFeatureFlags,o=`/flags/?v=2`+(a?`&only_evaluate_survey_feature_flags=true`:``),s=this.gd;this.pd=!0;let c=()=>{this.yd&&(this.yd=!1,this.tv())},l=e=>{let t=e.json??{},r=e.statusCode!==200;if(this.pd=!1,s!==this.gd)return void c();if(this.ev(e.statusCode),r||this.yd||(this.$anon_distinct_id=void 0),n.disable_flags&&!this.yd)return;this.bd=!r;let i=[];e.error?i.push(e.error instanceof Error&&e.error.name===`AbortError`?`timeout`:e.error instanceof Error?lv:`unknown_error`):e.statusCode!==200&&i.push(`api_error_${e.statusCode}`),t.errorsWhileComputingFlags&&i.push(`errors_while_computing_flags`);let o=!!t.quotaLimited?.includes(`feature_flags`);o&&i.push(`quota_limited`),this.At({[op]:i}),o?this.$.warn(`You have hit your feature flags quota limit, and will not be able to load feature flags until the quota is reset. Please visit https://posthog.com/docs/billing/limits-alerts to learn more.`):n.disable_flags||this.Xd(t,r,{partialResponse:a}),c()},u=e=>{this.pd=!1,s===this.gd?(this.At({[op]:[lv]}),this.$.error(`Feature flag request failed`,e),this.Vd()&&this.qd(!0),c()):c()},d=this.Rr.requestMaxRetries,f=()=>d>0&&s===this.gd,p=()=>
12{if(s!==this.gd||!this.wo||this.Rr.remoteRequestsDisabled)return this.pd=!1,void c();try{t.sendRequest(o,{target:`flags`,method:`POST`,body:n,compression:this.Rr.compression,sentAt:`body`,timeoutMs:this.Rr.requestTimeoutMs}).then(e=>{if((e=>tte.includes(e.statusCode)||(e=>e.statusCode===0&&e.error instanceof Error&&e.error.name===`AbortError`)(e))(e)&&f())return d--,void setTimeout(p,500);l(e)}).catch(u)}catch(e){u(e)}};p()}Sd(){return gh(this.wd,3)}ev(e){this.wd=_h(e,this.wd,3,()=>this.$.warn(`Feature flag requests are failing before receiving an HTTP response; this can happen due to network issues, CORS, browser blocking, or ad blockers. Stopped refreshing feature flags; will try again when connectivity changes.`))}getFeatureFlag(e,t={}){if(t.fresh&&!this.bd)return;if(!(this.fd||this.getFlags()&&this.getFlags().length>0))return void this.$.warn(`getFeatureFlag for key "`+e+sv);if(this.Qd())return;let n=this.getFeatureFlagResult(e,t);return n?.variant??n?.enabled}getFeatureFlagDetails(e){return this.getFlagsWithDetails()[e]}getFeatureFlagPayload(e){return this.getFeatureFlagResult(e,{send_event:!1})?.payload}getFeatureFlagResult(e,t={}){if(t.fresh&&!this.bd)return;if(!(this.fd||this.getFlags()&&this.getFlags().length>0))return void this.$.warn(`getFeatureFlagResult for key "`+e+sv);if(this.Qd())return;let n=this.getFlagVariants(),r=e in n,i=n[e],a=this.getFlagPayloads()[e],o=String(i),s=this.Ud(`$feature_flag_request_id`)||void 0,c=this.Ud(`$feature_flag_evaluated_at`)||void 0,l,u=this.Ud(`$flag_call_reported`)||{};if(this.Rr.deduplicateCallsPerSession){let e=this.wo?.session.sessionId,t=this.Ud(ap);e&&e!==t&&(u={},l=e)}if(t.send_event||!(`send_event`in t))if(e in u&&u[e].includes(o))l&&this.At({[ip]:u,[ap]:l});else{var d,f,p,m,h,g,_,v;wc(u[e])?u[e].push(o):u[e]=[o],this.At(B({[ip]:u},l?{[ap]:l}:{}));let t=this.getFeatureFlagDetails(e),n=[...this.Ud(`$feature_flag_errors`)??[]];z(i)&&n.push(`flag_missing`);let r={$feature_flag:e,$feature_flag_response:i,$feature_flag_payload:a??null,$feature_flag_request_id:s,$feature_flag_evaluated_at:c,$feature_flag_bootstrapped_response:((d=this.Rr.bootstrap)==null||(d=d.featureFlags)==null?void 0:d[e])??null,$feature_flag_bootstrapped_payload:((f=this.Rr.bootstrap)==null||(f=f.featureFlagPayloads)==null?void 0:f[e])??null,$used_bootstrap_value:!this.bd};z(t==null||(p=t.metadata)==null?void 0:p.has_experiment)||(r.$feature_flag_has_experiment=t.metadata.has_experiment),z(t==null||(m=t.metadata)==null?void 0:m.version)||(r.$feature_flag_version=t.metadata.version);let b=(t==null||(h=t.reason)==null?void 0:h.description)??(t==null||(g=t.reason)==null?void 0:g.code);var y;b&&(r.$feature_flag_reason=b),!(t==null||(_=t.metadata)==null)&&_.id&&(r.$feature_flag_id=t.metadata.id),z(t?.original_variant)&&z(t?.original_enabled)||(r.$feature_flag_original_response=z(t.original_variant)?t.original_enabled:t.original_variant),!(t==null||(v=t.metadata)==null)&&v.original_payload&&(r.$feature_flag_original_payload=t==null||(y=t.metadata)==null?void 0:y.original_payload),n.length&&(r.$feature_flag_error=n.join(`,`)),this.iv(r)}else l&&this.At({[ip]:u,[ap]:l});return r?{key:e,enabled:!!i,variant:typeof i==`string`?i:void 0,payload:od(a)}:void 0}iv(e){try{var t;(t=this.wo)==null||t.capture(`$feature_flag_called`,e)}catch(e){this.$.error(`Failed to capture feature flag call`,e)}}getRemoteConfigPayload(e,t){this.nv(e,t)}nv(e,t){var n=this;return Kc(function*(){let r=n.wo;if(!r)return;let i={distinct_id:r.distinctId,token:r.projectToken,person_properties:{$lib:r.library.name,$lib_version:r.library.version}},a=n.Jd();a.length&&(i.evaluation_contexts=a);let o=n.Kd(),s;z(o)||(i.flag_keys=o);try{s=(yield r.sendRequest(`/flags/?v=2`,{target:`flags`,method:`POST`,body:i,compression:n.Rr.compression,sentAt:`body`,timeoutMs:n.Rr.requestTimeoutMs})).json?.featureFlagPayloads?.[e]||void 0}catch(e){n.$.error(`Remote config feature flag request failed`,e);return}try{t(s)}catch(e){n.$.error(`Remote config feature flag callback failed`,e)}})()}isFeatureEnabled(e,t={}){if(t.fresh&&!this.bd)return t.defaultValue;if(!(this.fd||this.getFlags()&&this.getFlags().length>
120))return this.$.warn(`isFeatureEnabled for key "`+e+sv),t.defaultValue;let n=this.getFeatureFlag(e,t);return z(n)?t.defaultValue:!!n}addFeatureFlagsHandler(e){this.featureFlagEventHandlers.push(e)}removeFeatureFlagsHandler(e){this.featureFlagEventHandlers=this.featureFlagEventHandlers.filter(t=>t!==e)}receivedFeatureFlags(e,t,n){this.Xd(e,t,n)}Xd(e,t,n){if(!this.wo)return;this.fd=!0;let r=((e,t={},n={},r={},i,a=av)=>{let o=((e,t)=>{let n=e.flags;if(n){let t=Object.fromEntries(Object.keys(n).map(e=>[e,n[e].variant??n[e].enabled])),r=Object.fromEntries(Object.keys(n).filter(e=>n[e].enabled).filter(e=>!z(n[e].metadata?.payload)).map(e=>[e,n[e].metadata?.payload]));return B(B({},e),{},{featureFlags:t,featureFlagPayloads:r})}return e.featureFlags&&t.warn(`Using an older version of the feature flags endpoint. Please upgrade your PostHog server to the latest version`),e})(e,a),s=o.flags,c=o.featureFlags,l=o.featureFlagPayloads;if(!c)return;let u=e.requestId,d=e.evaluatedAt;if(wc(c)){a.warn(`v1 of the feature flags endpoint is deprecated. Please use the latest version.`);let e={};if(c)for(let t=0;c.length>t;t++)e[c[t]]=!0;return{[Ff]:c,[Pf]:e,[Bf]:!1}}let f=c,p=l,m=s;if(i?.partialResponse){let e=Object.keys(f),i=p||{};f=B(B({},t),f),p=B(B({},n),i),e.forEach(e=>{e in i||p==null||delete p[e]}),m=B(B({},r),m)}else if(e.errorsWhileComputingFlags)if(s){let e=new Set(Object.keys(s).filter(e=>!s[e]?.failed));f=B(B({},t),Object.fromEntries(Object.entries(f).filter(([t])=>e.has(t))));let i=Object.fromEntries(Object.entries(p||{}).filter(([t])=>e.has(t)));p=B(B({},n),i),e.forEach(e=>{e in i||p==null||delete p[e]}),m=B(B({},r),Object.fromEntries(Object.entries(m||{}).filter(([t])=>e.has(t))))}else f=B(B({},t),f),p=B(B({},n),p),m=B(B({},r),m);return B(B({[Ff]:Object.keys(dv(f)),[Pf]:f||{},[Rf]:p||{},[Lf]:m||{},[Bf]:!0===e.minimalFlagCalledEvents},u?{[zf]:u}:{}),d?{[sp]:d}:{})})(e,this.getFlagVariants(),this.getFlagPayloads(),this.getFlagsWithDetails(),n,this.$);if(r)if(!1===n?.persist){let e=!z(this.wo.kv.get(Pf));this.Wd=r,e||this.At(r)}else this.Ld(),this.Zd(r,e,!!n?.partialResponse),this.At(r);else t&&this.Vd();t||(this._d=!1),this.qd(t)}override(e,t=!1){this.$.warn(`override is deprecated. Please use overrideFeatureFlags instead.`),this.overrideFeatureFlags({flags:e,suppressWarning:t})}overrideFeatureFlags(e){this.sv(e)}sv(e){if(this.wo){if(!1===e)return this.Lt([Vf,Hf]),this.qd(),void ov.info(`All overrides cleared`);if(wc(e))return this.At({[Vf]:uv(e)}),this.qd(),void ov.info(`Flag overrides set`,{flags:e});if(e&&typeof e==`object`&&(`flags`in e||`payloads`in e)){var t;let n=e;this.ud=!!((t=n.suppressWarning)!=null&&t);let r={},i=n.flags,a=n.payloads;i&&(r[Vf]=wc(i)?uv(i):i),a&&(r[Hf]=a),Object.keys(r).length&&this.At(r),!1===i&&!1===a?this.Lt([Vf,Hf]):!1===i?this.Lt(Vf):!1===a&&this.Lt(Hf),this.qd(),!1===i?ov.info(`Flag overrides cleared`):i&&ov.info(`Flag overrides set`,{flags:i}),!1===a?ov.info(`Payload overrides cleared`):a&&ov.info(`Payload overrides set`,{payloads:a});return}if(e&&typeof e==`object`)return this.At({[Vf]:e}),this.qd(),void ov.info(`Flag overrides set`,{flags:e});this.$.warn(`Invalid overrideOptions provided to overrideFeatureFlags`,{overrideOptions:e})}else this.$.warn(`posthog.featureFlags.overrideFeatureFlags called before feature flags were ready`)}onFeatureFlags(e){if(this.addFeatureFlagsHandler(e),this.fd){let{flags:t,flagVariants:n}=this.rv();try{e(t,n)}catch(e){this.$.error(`Error while running feature flags callback`,e)}}return()=>this.removeFeatureFlagsHandler(e)}updateEarlyAccessFeatureEnrollment(e,t,n){var r;let i=(this.Ud(`$early_access_features`)||[]).find(t=>t.flagKey===e),a={[`$feature_enrollment/${e}`]:t},o={$feature_flag:e,$feature_enrollment:t,$set:a};i&&(o.$early_access_feature_name=i.name),n&&(o.$feature_enrollment_stage=n);let s=B(B({},this.getFlagVariants()),{},{[e]:t});(r=this._instance)==null||(r=r.persistence)==null||r.markCrossTabFeatureFlagChanges({$active_feature_flags:[e],$enabled_feature_flags:[e],$stored_person_properties:Object.keys(a)}),this.At({[Ff]:Object.keys(dv(s)),[Pf]:s,[Uf]:B(B({},this.Ud(`$stored_person_properties`)||{}),a)}),this.qd();try{var c;(c=this.wo)==null||c.capture(`$feature_enrollment_update`,o)}catch(e){this.$.error(`Failed to capture early access feature enrollment`,e)}}getEarlyAccessFeatures(e,t=!1,n){let r=this.Ud(If);!r||t?this.ov(e,n):e(r)}ov(e,t){var n=this;return Kc(function*(){let r=n.wo;if(!r)return;let i=t?`&${t.map(e=>`stage=${e}`).join(`&`)}`:``,a;try{let e=yield r.sendRequest(`/api/early_access_features/?token=${r.projectToken}${i}`,{target:`api`,method:`GET`,sentAt:`query`});if(!e.json)return;a=e.json.earlyAccessFeatures,n.At({[If]:a})}catch(e){n.$.error(`Early access feature request failed`,e);return}try{e(a)}catch(e){n.$.error(`Early access feature callback failed`,e)}})()}rv(){let e=this.getFlags(),t=this.getFlagVariants();return{flags:e.filter(e=>t[e]),flagVariants:Object.keys(t).filter(e=>t[e]).reduce((e,n)=>(e[n]=t[n],e),{})}}qd(e){this.Nd();let{flags:t,flagVariants:n}=this.rv();
12this.featureFlagEventHandlers.forEach(r=>{try{r(t,n,{errorsLoading:e})}catch(e){this.$.error(`Error while running feature flags callback`,e)}})}setPersonPropertiesForFlags(e,t=!0){this.av(e,t)}av(e,t=!0){let n=this.Ud(`$stored_person_properties`)||{},r=e?.$set||(e?.$set_once?{}:e),i=e?.$set_once,a={};if(i)for(let e in i)({}).hasOwnProperty.call(i,e)&&(e in n||(a[e]=i[e]));this.At({[Uf]:B(B(B({},n),a),r)}),t&&this.reloadFeatureFlags()}unsetPersonPropertiesForFlags(e,t=!0){let n=B({},this.Ud(`$stored_person_properties`)||{});e.forEach(e=>{delete n[e]}),this.At({[Uf]:n}),t&&this.reloadFeatureFlags()}resetPersonPropertiesForFlags(e=!0){this.Lt(Uf),e&&this.reloadFeatureFlags()}setGroupPropertiesForFlags(e,t=!0){let n=this.Ud(`$stored_group_properties`)||{},r=B({},n);for(let t of Object.keys(e))r[t]=B(B({},n[t]),e[t]);this.At({[Wf]:r}),t&&this.reloadFeatureFlags()}resetGroupPropertiesForFlags(e){if(e){let t=this.Ud(`$stored_group_properties`)||{};this.At({[Wf]:B(B({},t),{},{[e]:{}})})}else this.Lt(Wf)}reset(){this.gd++,this.yd=!1,this.hd={},this.dd={},this.Wd=void 0,this.fd=!1,this.md=!1,this.bd=!1,this.$anon_distinct_id=void 0,this.zd(),this.ud=!1,this.wd=0}}},fte={sessionRecording:class{get Rr(){return this._instance.config}get El(){return this._instance.persistence}get started(){return!!this.lv?.isStarted}get status(){return this.uv===`awaiting_config`||this.uv===`missing_config`?this.uv:this.lv?.status??this.uv}constructor(e){if(this._instance=e,this._forceAllowLocalhostNetworkCapture=!1,this.uv=W_,this.hv=void 0,this.dv=!1,this.Xe=(()=>{var e,t;if(!tc?.visibilityState||tc.visibilityState===`visible`)return!0;let n=R==null||(e=R.performance)==null||(t=e.getEntriesByType)==null?void 0:t.call(e,`visibility-state`);return!n?.length||n.some(e=>e.name===`visible`)})(),this.ln=()=>{var e,t;tc?.visibilityState===`visible`&&(this.Xe=!0,(e=this.lv)==null||(t=e.setDocumentWasEverVisible)==null||t.call(e,!0))},!this._instance.sessionManager)throw K_.error(`started without valid sessionManager`),Error(`[SessionRecording] started without valid sessionManager. This is a bug.`);if(this.Rr.cookieless_mode===`always`)throw Error(`[SessionRecording] cannot be used with cookieless_mode="always"`);tc!=null&&tc.addEventListener&&Jp(tc,`visibilitychange`,this.ln)}initialize(){this.startIfEnabledOrStop()}dispose({discardBufferedEvents:e=!1}={}){var t;this.dv=!0,tc==null||(t=tc.removeEventListener)==null||t.call(tc,`visibilitychange`,this.ln),e?this.vv(!0):this.stopRecording()}get fv(){let e=!!this._instance.get_property(`$session_recording_remote_config`)?.enabled,t=!this.Rr.disable_session_recording,n=this.Rr.disable_session_recording||this._instance.consent.isOptedOut();return R&&e&&t&&!n}startIfEnabledOrStop(e){if(this.dv||this.fv&&this.lv?.isStarted)return;let t=!z(Object.assign)&&!z(Array.from);this.fv&&t?(this.pv(e),K_.info(`starting`)):(this.uv=W_,this.stopRecording())}pv(e){var t;if(this.fv)if(this.uv!==`awaiting_config`&&this.uv!==`missing_config`&&(this.uv=G_),!(uc==null||(t=uc.__PosthogExtensions__)==null||(t=t.rrweb)==null)&&t.record&&uc.__PosthogExtensions__?.initSessionRecording)this.gv(e);else{var n,r;let t=this._instance.sessionManager;(n=uc.__PosthogExtensions__)==null||(r=n.loadExternalDependency)==null||r.call(n,this._instance,this.mv,n=>{if(!this.dv&&this.fv&&this._instance.sessionManager===t)return n?(this._instance.register_for_session({$sdk_debug_recording_script_not_loaded:!0}),K_.error(`could not load recorder`,n)):void this.gv(e);this.uv=`disabled`})}}stopRecording(){var e,t;(e=this.hv)==null||e.call(this),this.hv=void 0,(t=this.lv)==null||t.stop()}vv(e=!1){var t,n;(t=this.hv)==null||t.call(this),this.hv=void 0,(n=this.lv)==null||n.discard({discardProducerEvents:e})}yv(){var e,t;(e=this.El)==null||e.unregister(`$session_is_sampled`),(t=this.El)==null||t.unregister(`$replay_sample_rate`)}bv(e,t){if(jc(e))return null;let n=Mc(e)?e:parseFloat(e);return typeof(r=n)!=`number`||!Number.isFinite(r)||0>r||r>1?(K_.warn(`${t} must be between 0 and 1. Ignoring invalid value:`,e),null):n;var r}_v(e){if(this.El){var t;let n=this.El,r=()=>{let t=!1===e.sessionRecording?void 0:e.sessionRecording,r=this.bv(this.Rr.session_recording?.sampleRate,`session_recording.sampleRate`),i=this.bv(t?.sampleRate,`remote config sampleRate`),a=r??i;jc(a)&&this.yv();let o=t?.minimumDurationMilliseconds;n.register({[bf]:B(B({cache_timestamp:Date.now(),enabled:!!t},t),{},{networkPayloadCapture:B({capturePerformance:e.capturePerformance},t?.networkPayloadCapture),canvasRecording:{enabled:t?.recordCanvas,fps:t?.canvasFps,quality:t?.canvasQuality},sampleRate:a,minimumDurationMilliseconds:z(o)?null:o,endpoint:t?.endpoint,triggerMatchType:t?.triggerMatchType,masking:t?.masking,urlTriggers:t?.urlTriggers,version:t?.version,triggerGroups:t?.triggerGroups})})};r(),(t=this.hv)==null||t.call(this),this.hv=this._instance.sessionManager?.onSessionId(r)}}onRemoteConfig(e){let t=e.ok?e.config:void 0;t&&`sessionRecording`in t?!1===t.sessionRecording?(this._v(t),this.vv()):(this._v(t),this.startIfEnabledOrStop()):(this.uv===`awaiting_config`&&(this.uv=`missing_config`,this._instance.register_for_session({[bp]:!0}),K_.warn(`config refresh failed, recording will not start until page reload`)),this.startIfEnabledOrStop())}log(e,t=`log`){this.lv?.log?this.lv.log(e,t):K_.warn(`log called before recorder was ready`)}get mv(){var e,t;let n=(e=this._instance)==null||(e=e.persistence)==null?void 0:e.get_property(bf);return(n==null||(t=n.scriptConfig)==null?void 0:t.script)||`lazy-recorder`}wv(){let e=this._instance.get_property(bf);if(!e)return!1;let t;try{t=typeof e==`object`?e:JSON.parse(e)}catch(e){return K_.warn(`persisted remote config for session recording is invali
12d and will be ignored`,e),!1}return!jc(t.cache_timestamp)&&36e5>=Date.now()-t.cache_timestamp}gv(e){var t,n;if(!this.dv&&this.fv&&this._instance.sessionManager){if(!uc.__PosthogExtensions__?.initSessionRecording)return K_.warn(`Called on script loaded before session recording is available. This can be caused by adblockers.`),void this._instance.register_for_session({[yp]:!0});if(this.lv||(this.lv=uc.__PosthogExtensions__?.initSessionRecording(this._instance,this.Xe),this.lv._forceAllowLocalhostNetworkCapture=this._forceAllowLocalhostNetworkCapture),!this.wv()){if(this.uv===`missing_config`||this.uv===`awaiting_config`)return;this.uv=`awaiting_config`,K_.info(`persisted remote config is stale, requesting fresh config before starting`),new Xh(this._instance).load();return}this.uv=G_,(t=(n=this.lv).setDocumentWasEverVisible)==null||t.call(n,this.Xe),this.lv.start(e)}else this.uv=W_}onRRwebEmit(e){var t,n;(t=this.lv)==null||(n=t.onRRwebEmit)==null||n.call(t,e)}overrideLinkedFlag(){var e,t;this.lv||(t=this.El)==null||t.register({$replay_override_linked_flag:!0}),(e=this.lv)==null||e.overrideLinkedFlag()}overrideSampling(){var e,t;this.lv||(t=this.El)==null||t.register({$replay_override_sampling:!0}),(e=this.lv)==null||e.overrideSampling()}overrideTrigger(e){var t,n;this.lv||(n=this.El)==null||n.register({[e===`url`?`$replay_override_url_trigger`:`$replay_override_event_trigger`]:!0}),(t=this.lv)==null||t.overrideTrigger(e)}get sdkDebugProperties(){return this.lv?.sdkDebugProperties||{$recording_status:this.status}}tryAddCustomEvent(e,t){return!!this.lv?.tryAddCustomEvent(e,t)}flushBeforeIdentityReset(){var e,t;(e=this.lv)==null||(t=e.flushBeforeIdentityReset)==null||t.call(e)}}},pte={autocapture:class extends Bee{constructor(e){super(new Vee(e)),this.instance=e}},historyAutocapture:class{constructor(e){this.Sv=!1,this._instance=e,this.xv=this.Cv()}initialize(){this.startIfEnabled()}get isEnabled(){let e=this.$v();return!!(e.path||e.search||this.Tv(e))}startIfEnabled(){this.isEnabled&&(Wd.info(`History API monitoring enabled, starting...`),this.monitorHistoryChanges())}startIfEnabledOrStop(){this.stop(),this.xv=this.Cv(),this.startIfEnabled()}stop(){this.Iv&&this.Iv(),this.Iv=void 0,this.Mv&&this.Mv(),this.Mv=void 0,Wd.info(`History API monitoring stopped`)}monitorHistoryChanges(){R&&R.history&&(this.Ev(`pushState`),this.Ev(`replaceState`),this.Pv(),this.Tv()&&this.Rv())}Ev(e){if(!R||R.history[e]?.__posthog_wrapped__)return;let t=this;B_(R.history,e,n=>function(r,i,a){var o;t.Av(a)&&t.Fv(),n.call(this,r,i,a),t.Ov(e,!t.Sv&&(R==null||(o=R.event)==null?void 0:o.type)!==`popstate`)})}Cv(){let e=R?.location;if(e?.pathname)return{pathname:e.pathname,search:e.search,hash:e.hash}}$v(){let e=this._instance.config.capture_pageview;return e===`history_change`?{path:!0}:Ec(e)?e:{}}Tv(e=this.$v()){return!!e.hash&&!this._instance.config.disable_capture_url_hashes}Dv(e){let t=this.$v(),n=this.xv;return!(!n||!(t.path&&e.pathname!==n.pathname||t.search&&e.search!==n.search||this.Tv(t)&&e.hash!==n.hash))}Ov(e,t=!1){try{t||this.Fv();let n=this.Cv();if(!n)return;if(this.Dv(n)){let n=()=>this._instance.capture(Fp,{navigation_type:e});t?(this.Lv=n,Promise.resolve().then(()=>this.Fv())):n()}this.xv=n}catch(t){Wd.error(`Error capturing ${e} pageview`,t)}}Av(e){return!(jc(e)||!R)&&fh(String(e))?.href!==R.location?.href}Fv(){let e=this.Lv;if(e){this.Lv=void 0,this.Sv=!0;try{e()}catch(e){Wd.error(`Error capturing deferred pageview`,e)}finally{this.Sv=!1}this.xv=this.Cv()}}Pv(){if(this.Iv)return;let e=()=>{this.Ov(`popstate`)};Jp(R,`popstate`,e),this.Iv=()=>{R&&R.removeEventListener(`popstate`,e)}}Rv(){if(this.Mv)return;let e=()=>{this.Ov(`hashchange`)};Jp(R,`hashchange`,e),this.Mv=()=>{R&&R.removeEventListener(`hashchange`,e)}}},heatmaps:class{get Rr(){return this.instance.config}constructor(e){this.Nv=!1,this.xo=!1,this.qv=null,this.instance=e,this.Nv=!!this.instance.persistence?.props[df],this.rageclicks=new N_(e.config.rageclick)}initialize(){this.startIfEnabled()}get flushIntervalMilliseconds(){let e=5e3;return Ec(this.Rr.capture_heatmaps)&&this.Rr.capture_heatmaps.flush_interval_milliseconds&&(e=this.Rr.capture_heatmaps.flush_interval_milliseconds),e}get isEnabled(){return jc(this.Rr.capture_heatmaps)?jc(this.Rr.enable_heatmaps)?this.Nv:this.Rr.enable_heatmaps:!1!==this.Rr.capture_heatmaps}startIfEnabled(){if(this.isEnabled){if(this.xo)return;Gee.info(`starting...`),this.jv(),this.ln()}else clearInterval(this.qv??void 0),this.Bv(),this.getAndClearBuffer()}onRemoteConfig(e){if(!e.ok)return;let t=e.config;if(!(`heatmaps`in t))return;let n=!!t.heatmaps;this.instance.persistence&&this.instance.persistence.register({[df]:n}),this.Nv=n,this.startIfEnabled()}getAndClearBuffer(){let e=this.Rt;return this.Rt=void 0,e}Hv(e){q_(e.originalEvent)&&this.Tr(e.originalEvent,`deadclick`)}ln(){this.qv&&clearInterval(this.qv),this.qv=tc?.visibilityState===`visible`?setInterval(this._l.bind(this),this.flushIntervalMilliseconds):null}jv(){R&&tc&&(this.zv=this._l.bind(this),Jp(R,Pp,this.zv),this.Uv=e=>this.Tr(e||R?.event),Jp(tc,`click`,this.Uv,{capture:!0}),this.Wv=e=>this.Vv(e||R?.event),Jp(tc,`mousemove`,this.Wv,{capture:!0}),this.Gv=new rh(this.instance,nh,this.Hv.bind(this)),this.Gv.startIfEnabledOrStop(),this.Zv=this.ln.bind(this),Jp(tc,Np,this.Zv),this.xo=!0)}Bv(){var e;R&&tc&&(this.zv&&R.removeEventListener(Pp,this.zv),this.Uv&&tc.removeEventListener(`click`,this.Uv,{capture:!0}),this.Wv&&tc.removeEventListener(`mousemove`,this.Wv,{capture:!0}),this.Zv&&tc.removeEventListener(Np,this.Zv),clearTimeout(this.Qv),(e=this.Gv)==null||e.stop(),this.xo=!1)}Jv(e,t){let n=this.instance.scrollManager.scrollY(),r=this.instance.scrollManager.scrollX(),i=this.instance.scrollManager.scrollElement(),a=function(e,t,n){let r=e;for(;r&&xm(r)&&!Sm(r,`body`);){if(r===n)return!1;let e;try{e=(r.ownerDocument?.defaultView??R)?.getComputedStyle(r).position}catch{return!1}if(_c(t,e))return!0;r=Pm(r)}return!1}(Am(e),[`fixed`,`sticky`],i);return{x:e.clientX+(a?0:r),y:e.clientY+(a?0:n),target_fixed:a,type:t}}Tr(e,t=`click`){var n;if(bm(e.target)||!q_(e))return;let r=this.Jv(e,t);(n=this.rageclicks)!=null&&n.isRageClick(e.clientX,e.clientY,new Date().getTime())&&Bm(Am(e),this.instance.config.rageclick)&&this.Zs(B(B({},r),{},{type:`rageclick`})),this.Zs(r)}Vv(e){!bm(e.target)&&q_(e)&&(clearTimeout(this.Qv),this.Qv=setTimeout(()=>{this.Zs(this.Jv(e,`mousemove`))},500))}Zs(e){if(!R)return;let t=this.Rr.disable_capture_url_hashes?lu(R.location.href):R.location.href,n=this.Rr.custom_personal_data_properties,r=mh(t,this.Rr.mask_personal_data_properties?[...vh,...n||[]]:[],yh);this.Rt=this.Rt||{},this.Rt[r]||(this.Rt[r]=[]),this.Rt[r].push(e)}_l(){this.Rt&&!Dc(this.Rt)&&this.instance.capture(`$$heatmap`,{$heatmap_data:this.getAndClearBuffer()})}},deadClicksAutocapture:rh,webVitalsAutocapture:class{constructor(e){this._instance=e,this.Nv=!1,this.xo=!1,this.Rt={navigationKey:void 0,url:void 0,metrics:[],firstMetricTimestamp:void 0},this.Kv=()=>{clearTimeout(this.Xv),this.Xv=void 0,this.Rt.metrics.length!==0&&(this._instance.capture(`$web_vitals`,B({$current_url:this.Rt.url},this.Rt.metrics.reduce((e,t)=>
12B(B({},e),{},{[`$web_vitals_${t.name}_event`]:B({},t),[`$web_vitals_${t.name}_value`]:t.value}),{}))),this.Rt={navigationKey:void 0,url:void 0,metrics:[],firstMetricTimestamp:void 0})},this.Yv=e=>{if(this.Rt=this.Rt||{navigationKey:void 0,url:void 0,metrics:[],firstMetricTimestamp:void 0},jc(e?.name)||jc(e?.value))return void V_.error(`Invalid metric received`,e);let t=typeof e.navigationURL==`string`?e.navigationURL:void 0,n=this.tf(t);if(z(n))return;let r=Mc(e.navigationId)||typeof e.navigationId==`string`?`navigation:${e.navigationId}`:`url:${n}`;if(this.ef&&e.value>=this.ef)return void V_.error(`Ignoring metric with value >= `+this.ef,e);this.Rt.navigationKey!==r&&(this.Kv(),this.Xv=setTimeout(this.Kv,this.flushToCaptureTimeoutMs)),z(this.Rt.navigationKey)&&(this.Rt.navigationKey=r,this.Rt.url=n),this.Rt.firstMetricTimestamp=z(this.Rt.firstMetricTimestamp)?Date.now():this.Rt.firstMetricTimestamp;let i=this._instance.sessionManager?.checkAndGetSessionAndWindowId(!0),a=B(B(B({},e),t?{navigationURL:n}:{}),{},{$current_url:n,timestamp:Date.now()});if(delete a.entries,Ec(e.attribution)&&this.attributionMetrics.indexOf(e.name)>-1){let t={};for(let n of Wee){let r=n===`url`&&typeof e.attribution[n]==`string`?this.tf(e.attribution[n]):e.attribution[n];z(r)||(t[n]=r)}a.attribution=t}else delete a.attribution;z(i)||(a.$session_id=i.sessionId,a.$window_id=i.windowId),this.Rt.metrics.push(a),this.Rt.metrics.length===this.allowedMetrics.length&&this.Kv()},this.if=()=>{if(this.xo)return;let e,t,n,r,i=!1,a=uc.__PosthogExtensions__,o=a?.postHogWebVitalsCallbacksByFlavor,s=o?.[this.nf]||(this.nf===`web-vitals`&&z(o)?a?.postHogWebVitalsCallbacks:void 0);if(!z(s)){let a=s.withoutAttribution,o=this.attributionMetrics;i=!z(a),e=o.indexOf(`LCP`)>-1?s.onLCP:a?.onLCP||s.onLCP,t=o.indexOf(`CLS`)>-1?s.onCLS:a?.onCLS||s.onCLS,n=o.indexOf(`FCP`)>-1?s.onFCP:a?.onFCP||s.onFCP,r=o.indexOf(`INP`)>-1?s.onINP:a?.onINP||s.onINP}if(!(e&&t&&n&&r))return void V_.error(`web vitals callbacks not loaded - not starting`);let c={reportSoftNavs:this.useSoftNavs},l=i&&this.attributionMetrics.indexOf(`INP`)>-1?B(B({},c),{},{includeProcessedEventEntries:!1}):c;this.allowedMetrics.indexOf(`LCP`)>-1&&e(this.Yv.bind(this),c),this.allowedMetrics.indexOf(`CLS`)>-1&&t(this.Yv.bind(this),c),this.allowedMetrics.indexOf(`FCP`)>-1&&n(this.Yv.bind(this),c),this.allowedMetrics.indexOf(`INP`)>-1&&r(this.Yv.bind(this),l),this.xo=!0},this.Nv=!!this._instance.persistence?.props[hf],this.startIfEnabled()}get sf(){return this._instance.config.capture_performance}get allowedMetrics(){let e=Ec(this.sf)?this.sf?.web_vitals_allowed_metrics:void 0;return jc(e)?this._instance.persistence?.props.$web_vitals_allowed_metrics||U_:e}get flushToCaptureTimeoutMs(){return(Ec(this.sf)?this.sf.web_vitals_delayed_flush_ms:void 0)||5e3}get attributionMetrics(){let e=Ec(this.sf)?this.sf.web_vitals_attribution:void 0;return Pc(e)?e?U_:[]:wc(e)?e:Uee}get useAttribution(){return this.attributionMetrics.length>0}get useSoftNavs(){let e=Ec(this.sf)?this.sf.__preview_web_vitals_soft_navs:void 0;return e!=null&&e}get ef(){let e=Ec(this.sf)&&Mc(this.sf.__web_vitals_max_value)?this.sf.__web_vitals_max_value:H_;return e>0&&6e4>=e?H_:e}get isEnabled(){let e=nc?.protocol;if(e!==`http:`&&e!==`https:`)return V_.info(`Web Vitals are disabled on non-http/https protocols`),!1;let t=Ec(this.sf)?this.sf.web_vitals:Pc(this.sf)?this.sf:void 0;return Pc(t)?t:this.Nv}startIfEnabled(){this.isEnabled&&!this.xo&&(V_.info(`enabled, starting...`),this.Uo(this.if))}onRemoteConfig(e){if(!e.ok)return;let t=e.config;if(!(`capturePerformance`in t))return;let n=Ec(t.capturePerformance)&&!!t.capturePerformance.web_vitals,r=Ec(t.capturePerformance)?t.capturePerformance.web_vitals_allowed_metrics:void 0;this._instance.persistence&&(this._instance.persistence.register({[hf]:n}),this._instance.persistence.register({[yf]:r})),this.Nv=n,this.startIfEnabled()}get nf(){return this.useSoftNavs?this.useAttribution?`web-vitals-with-attribution-soft-navs`:`web-vitals-soft-navs`:this.useAttribution?`web-vitals-with-attribution`:`web-vitals`}Uo(e){var t;let n=uc.__PosthogExtensions__,r=this.nf,i=n?.postHogWebVitalsCallbacksByFlavor;i?.[r]||r===`web-vitals`&&z(i)&&n?.postHogWebVitalsCallbacks?e():n==null||(t=n.loadExternalDependency)==null||t.call(n,this._instance,r,t=>{t?V_.error(`failed to load script`,t):e()})}tf(e){let t=e||R?.location.href;if(!t)return void V_.error(`Could not determine current URL`);let n=this._instance.config.disable_capture_url_hashes?lu(t):t,r=this._instance.config.custom_personal_data_properties;return mh(n,this._instance.config.mask_personal_data_properties?[...vh,...r||[]]:[],yh)}}},mte={exceptionObserver:class{constructor(e){this.if=()=>{if(!R||!this.isEnabled||!uc.__PosthogExtensions__?.errorWrappingFunctions)return;let e=uc.__PosthogExtensions__.errorWrappingFunctions.wrapOnError,t=uc.__PosthogExtensions__.errorWrappingFunctions.wrapUnhandledRejection,n=uc.__PosthogExtensions__.errorWrappingFunctions.wrapConsoleError;try{!this.rf&&this.Rr.capture_unhandled_errors&&(this.rf=e(this.captureException.bind(this))),!this.af&&this.Rr.capture_unhandled_rejections&&(this.af=t(this.captureException.bind(this))),!this.lf&&this.Rr.capture_console_errors&&(this.lf=n(this.captureException.bind(this)))}catch(e){L_.error(`failed to start`,e),this.uf()}},this._instance=e,this.hf=!!this._instance.persistence?.props[ff],this.wt=new Xc(B(B({},function(e={}){return{refillRate:e.exceptionRateLimiterRefillRate??e.__exceptionRateLimiterRefillRate??1,bucketSize:e.exceptionRateLimiterBucketSize??e.__exceptionRateLimiterBucketSize??10}}(this._instance.config.error_tracking)),{},{refillInterval:1e4,$:L_})),this.Rr=this.cf(),this.startIfEnabledOrStop()}cf(){let e=this._instance.config.capture_exceptions,t={capture_unhandled_errors:!1,capture_unhandled_rejections:!1,capture_console_errors:!1};return Ec(e)?t=B(B({},t),e):(z(e)?this.hf:e)&&(t=B(B({},t),{},{capture_unhandled_errors:!0,capture_unhandled_rejections:!0})),t}get isEnabled(){return this.Rr.capture_console_errors||this.Rr.capture_unhandled_errors||this.Rr.capture_unhandled_rejections}startIfEnabledOrStop(){this.isEnabled?(L_.info(`enabled`),this.uf(),this.Uo(this.if)):this.uf()}Uo(e){var t,n;uc.__PosthogExtensions__?.errorWrappingFunctions?e():(t=uc.__PosthogExtensions__)==null||(n=t.loadExternalDependency)==null||n.call(t,this._instance,`exception-autocapture`,t=>{if(t)return L_.error(`failed to load script`,t);
12e()})}uf(){var e,t,n;(e=this.rf)==null||e.call(this),this.rf=void 0,(t=this.af)==null||t.call(this),this.af=void 0,(n=this.lf)==null||n.call(this),this.lf=void 0}onRemoteConfig(e){if(!e.ok)return;let t=e.config;`autocaptureExceptions`in t&&(this.hf=!!t.autocaptureExceptions||!1,this._instance.persistence&&this._instance.persistence.register({[ff]:this.hf}),this.Rr=this.cf(),this.startIfEnabledOrStop())}onConfigChange(){this.Rr=this.cf()}captureException(e){try{var t,n;let r=(e==null||(t=e.$exception_list)==null||(t=t[0])==null?void 0:t.type)??`Exception`;if(this.wt.consumeRateLimit(r))return void L_.info(`Skipping exception capture because of client rate limiting.`,{exception:r});(n=this._instance.exceptions)==null||n.sendExceptionEvent(e)}catch{}}},exceptions:class{constructor(e){this.df=[],this.vf=new xu([new Hu,new Qu,new Wu,new Uu,new Xu,new Yu,new Ku,new Zu],function(e,...t){return(n,r=0)=>{let i=[],a=n.split(` 13`),o=Math.min(a.length,r+1e3),s=[];for(let n=r;o>n;n++){let r=a[n];if(r.length>1024)continue;let o=Pu.test(r)?r.replace(Pu,`$1`):r;if(!o.match(/\S*Error: /)){for(let n of t){let t=n(o,e);if(t){i.push(t);let e=Iu(i);if(e){for(let t=s.length-1;t>=0;t--){let n=s[t];if(e.start>=n.start+n.length)break;s.pop()}s.push(e)}break}}if(Bu(i,s)>=50)break}}let c=[...s].sort((e,t)=>t.start-e.start),l=c[c.length-1];if(l){let e=Ru(i,l);i.splice(l.start-e,e);for(let t of c)t.start-=e}for(let e of c)Lu(i,e);return s.some(e=>e.start===0&&i.length===e.length)&&function(e){let t=e.map(e=>`${e.function}|${e.filename}|${e.lineno}|${e.colno}|${e.module}`),n=0;for(let e=1;t.length>e;e++)Vu(t,e,n)&&(n=e);e.push(...e.splice(0,n))}(i),function(e){if(!e.length)return[];let t=Array.from(e);return t.reverse(),t.slice(0,50).map(e=>{return B(B({},e),{},{filename:e.filename||(n=t,n[n.length-1]||{}).filename,function:e.function||`?`});var n})}(i)}}(`web:javascript`,Au,Nu)),this._instance=e,this.df=this._instance.persistence?.get_property(`$error_tracking_suppression_rules`)??[],this.ff=rd(this.pf()),this.gf=new id(this.ff)}onConfigChange(){this.ff=rd(this.pf()),this.gf.setConfig(this.ff)}onRemoteConfig(e){if(!e.ok)return;let t=e.config;if(!(`errorTracking`in t))return;let n=t.errorTracking?.suppressionRules??[],r=t.errorTracking?.captureExtensionExceptions;this.df=n,this._instance.persistence&&this._instance.persistence.register({[pf]:this.df,[mf]:r})}get mf(){var e;let t=!!this._instance.get_property(mf);return(e=this._instance.config.error_tracking.captureExtensionExceptions??t)!=null&&e}buildProperties(e,t){return this.vf.buildFromUnknown(e,{syntheticException:t?.syntheticException,mechanism:{handled:t?.handled}})}addExceptionStep(e,t){if(this.ff.enabled)try{if(!Oc(e)||e.trim().length===0)return void pv.warn(`Ignoring exception step because message must be a non-empty string`);let{sanitizedProperties:n,droppedKeys:r}=function(e){if(!e)return{sanitizedProperties:{},droppedKeys:[]};let t=[];return{sanitizedProperties:Object.keys(e).reduce((n,r)=>td.has(r)?(t.push(r),n):(n[r]=e[r],n),{}),droppedKeys:t}}(this.yf(t));r.length>0&&pv.warn(`Ignoring reserved exception step fields`,{droppedKeys:r}),this.gf.add(B({[$u]:e,[ed]:new Date().toISOString()},n))}catch(e){pv.error(`Failed to add exception step. Ignoring breadcrumb.`,e)}}sendExceptionEvent(e){try{let t=e.$exception_list;if(this.bf(t)){if(this._f(t))return this.wf(`Exception dropped: matched a suppression rule`),void pv.info(`Skipping exception capture because a suppression rule matched`);if(!this.mf&&this.kf(t))return this.wf(`Exception dropped: thrown by a browser extension`),void pv.info(`Skipping exception capture because it was thrown by an extension`);if(!this.mf&&this.Sf(t))return this.wf(`Exception dropped: thrown by an injected browser script`),void pv.info(`Skipping exception capture because it was thrown by an injected browser script`);if(!this._instance.config.error_tracking.__capturePostHogExceptions&&this.xf(t))return this.wf(`Exception dropped: thrown by the PostHog SDK`),void pv.info(`Skipping exception capture because it was thrown by the PostHog SDK`)}let n=this.ff.enabled&&jc(e.$exception_steps)?this.Cf(e):e,r=function(){let e=globalThis._posthogReleaseId;return typeof e==`string`&&e.length>0?e:void 0}();r&&(n.$release_id=r);try{let e=this._instance.capture(`$exception`,n,{_noTruncate:!0,_batchKey:`exceptionEvent`,ph:!0});return e&&this.gf.clear(),e}catch(e){fv(e)||pv.error(`Failed to capture exception event. Dropping this exception.`,e),this.gf.clear();return}}catch(e){fv(e)||pv.error(`Failed to process exception event. Ignoring this exception.`,e);return}}Cf(e){try{let t=this.gf.getAttachable();return t.length===0?e:B(B({},e),{},{$exception_steps:t})}catch(t){return pv.error(`Failed to read buffered exception steps. Capturing exception without steps.`,t),e}}wf(e){this.ff.enabled&&this.gf.add({[$u]:e,[ed]:new Date().toISOString()})}yf(e){return Ec(e)?B({},e):{}}pf(){return this._instance.config.error_tracking?.exception_steps??{}}_f(e){if(e.length===0)return!1;try{let t=e.reduce((e,{type:t,value:n})=>(Oc(t)&&t.length>0&&e.$exception_types.push(t),Oc(n)&&n.length>0&&e.$exception_values.push(n),e),{$exception_types:[],$exception_values:[]});return this.df.some(e=>{let n=e.values.map(e=>{let n=i_[e.operator],r=t[e.key];if(!n||!r)return!1;let i=wc(e.value)?e.value:[e.value];return i.length>0&&n(i,r)});return e.type===`OR`?n.some(Boolean):n.every(Boolean)})}catch(e){return pv.warn(`Failed to evaluate suppression rules. Capturing the exception.`,e),!1}}kf(e){let t=e.flatMap(e=>e.stacktrace?.frames??[]),n=t.filter(({filename:e})=>!!e&&rte.some(t=>e.startsWith(t)));return n.length!==0&&(!n.every(({filename:e})=>!!e&&e.startsWith(mv))||e.some(({type:e,value:t})=>e===`NoResponse`||Oc(t)&&nte.some(({value:e,exact:n})=>n?t===e:t.includes(e)))&&!t.some(({in_app:e,filename:t})=>e&&!t?.startsWith(mv)))}Sf(e){return e.some(({value:e})=>Oc(e)&&ite.some(t=>e.includes(t)))}xf(e){if(e.length>0){var t,n;let r=e[0].stacktrace?.frames??[],i=r[r.length-1];return(t=i==null||(n=i.filename)==null?void 0:n.includes(`posthog.com/static`))!=null&&t}return!1}bf(e){return!jc(e)&&wc(e)}}},hte=B({productTours:class{get El(){return this._instance.persistence}constructor(e){this.$f=null,this.Tf=null,this._instance=e}initialize(){this.loadIfEnabled()}onRemoteConfig(e){if(!e.ok)return;let t=e.config;if(`productTours`in t){var n;if(this.El&&this.El.register({[_f]:!!t.productTours}),!Y_(this._instance))return!this.$f&&jc(this.El?.props.ph_product_tours)||J_.info(`product tours disabled; stopping and clearing cached tours`),(n=this.$f)==null||n.stop(),this.$f=null,void this.clearCache();this.loadIfEnabled()}}loadIfEnabled(){!this.$f&&Y_(this._instance)&&this.Uo(()=>this.If())}Uo(e){var t,n;uc.__PosthogExtensions__?.generateProductTours?e():(t=uc.__PosthogExtensions__)==null||(n=t.loadExternalDependency)==null||n.call(t,this._instance,`product-tours`,t=>{t?J_.error(`Could not load product tours script`,t):e()})}If(){var e;!this.$f&&(e=uc.__PosthogExtensions__)!=null&&e.generateProductTours&&(this.$f=uc.__PosthogExtensions__.generateProductTours(this._instance,!0))}getProductTours(e,t=!1){if(wc(this.Tf)&&!t)return void e(this.Tf,{isLoaded:!0});let n=this.El;if(n){let r=n.props[Zf];if(wc(r)&&!t)return this.Tf=r,void e(r,{isLoaded:!0})}this._instance._send_request({url:this._instance.requestRouter.endpointFor(`api`,`/api/product_tours/?token=${this._instance.config.token}`),method:`GET`,timestampMode:`query`,callback:t=>{if(!Y_(this._instance))return void e([],{isLoaded:!0});let r=t.statusCode;if(r!==200||!t.json){let n=`Product Tours API could not be loaded, status: ${r}`;r===0?t.error||J_.warn(n):J_.error(n),e([],{isLoaded:!1,error:n});return}let i=wc(t.json.product_tours)?t.json.product_tours:[];this.Tf=i,n&&n.register({[Zf]:i}),e(i,{isLoaded:!0})}})}getActiveProductTours(e){jc(this.$f)?e([],{isLoaded:!1,error:`Product tours not loaded`}):this.$f.getActiveProductTours(e)}showProductTour(e){var t;(t=this.$f)==null||t.showTourById(e)}previewTour(e){this.$f?this.$f.previewTour(e):this.Uo(()=>{var t;this.If(),(t=this.$f)==null||t.previewTour(e)})}dismissProductTour(){var e;(e=this.$f)==null||e.dismissTour(`user_clicked_skip`)}nextStep(){var e;(e=this.$f)==null||e.nextStep()}previousStep(){var e;(e=this.$f)==null||e.previousStep()}clearCache(){var e;this.Tf=null,(e=this.El)==null||e.unregister(`ph_product_tours`)}resetTour(e){var t;(t=this.$f)==null||t.resetTour(e)}resetAllTours(){var e;(e=this.$f)==null||e.resetAllTours()}cancelPendingTour(e){var t;(t=this.$f)==null||t.cancelPendingTour(e)}}},Ov),gte={siteApps:class{constructor(e){this._instance=e,this.Mf=0,this.Ef=[],this.apps={}}get isEnabled(){return!!this._instance.config.opt_in_site_apps}Pf(e,t){if(!t)return;let n=this.globalsForEvent(t);this.Ef.push(n),this.Ef.length>1e3&&(this.Ef=this.Ef.slice(10))}get siteAppLoaders(){var e;return(e=uc._POSTHOG_REMOTE_CONFIG)==null||(e=e[this._instance.config.token])==null?void 0:e.siteApps}initialize(){if(this.isEnabled){let e=this._instance._addCaptureHook(this.Pf.bind(this));this.Rf=()=>{e(),this.Ef=[],this.Rf=void 0}}}globalsForEvent(e){if(!e)throw Error(`Event payload is required`);let t={},n=this._instance.get_property(`$groups`)||[],r=this._instance.get_property(`$stored_group_properties`)||{};for(let[e,i]of Object.entries(r))t[e]={id:n[e],type:e,properties:i};let{$set_once:i,$set:a}=e;return{event:B(B({},yd(e,Kee)),{},{properties:B(B(B({},e.properties),a?{$set:B(B({},e.properties?.$set??{}),a)}:{}),i?{$set_once:B(B({},e.properties?.$set_once??{}),i)}:{}),elements_chain:e.properties?.$elements_chain??``,distinct_id:e.properties?.distinct_id}),person:{properties:this._instance.get_property(`$stored_person_properties`)},groups:t}}Af(e){let t=e.tagName?.toLowerCase();
13return t===`style`&&this._instance.config.prepare_external_dependency_stylesheet?this._instance.config.prepare_external_dependency_stylesheet(e)||(X_.error(`prepare_external_dependency_stylesheet returned null`),null):t===`script`&&this._instance.config.prepare_external_dependency_script?this._instance.config.prepare_external_dependency_script(e)||(X_.error(`prepare_external_dependency_script returned null`),null):e}Ff(){var e;if(!this._instance.config.prepare_external_dependency_stylesheet&&!this._instance.config.prepare_external_dependency_script)return()=>{};let t=tc?.defaultView,n=t==null||(e=t.Node)==null?void 0:e.prototype;if(!t||!n)return()=>{};if(this.Mf++,this.Of)return this.Df();let r=[],i=this,a=new WeakSet,o=(e,t,n)=>{if(!e?.[t])return;let i=e[t];e[t]=n(i),r.push(()=>{e[t]=i})},s=e=>{if(a.has(e))return e;let t=i.Af(e);return t&&a.add(t),t},c=e=>e.map(e=>typeof e==`string`?e:s(e)).filter(e=>!Ac(e));return o(n,`appendChild`,e=>function(t){let n=s(t);return n?e.call(this,n):t}),o(n,`insertBefore`,e=>function(t,n){let r=s(t);return r?e.call(this,r,n):t}),o(n,`replaceChild`,e=>function(t,n){let r=s(t);return r?e.call(this,r,n):n}),[t.Element?.prototype,t.Document?.prototype,t.DocumentFragment?.prototype].forEach(e=>{o(e,`append`,e=>function(...t){return e.apply(this,c(t))}),o(e,`prepend`,e=>function(...t){return e.apply(this,c(t))})}),[t.Element?.prototype,t.CharacterData?.prototype,t.DocumentType?.prototype].forEach(e=>{o(e,`before`,e=>function(...t){return e.apply(this,c(t))}),o(e,`after`,e=>function(...t){return e.apply(this,c(t))}),o(e,`replaceWith`,e=>function(...t){let n=c(t);return t.length&&!n.length?void 0:e.apply(this,n)})}),o(t.Element?.prototype,`insertAdjacentElement`,e=>function(t,n){let r=s(n);return r?e.call(this,t,r):null}),this.Of=()=>{r.forEach(e=>e()),this.Of=void 0},this.Df()}Df(){let e=!1;return()=>{var t;e||(e=!0,this.Mf--,this.Mf===0&&((t=this.Of)==null||t.call(this)))}}Lf(e,t=!0){let n=this.Ff();try{let r=e(n);return t&&n(),r}catch(e){throw n(),e}}setupSiteApp(e){let t=this.apps[e.id],n=()=>{var n;!t.errored&&this.Ef.length&&(X_.info(`Processing ${this.Ef.length} events for site app with id ${e.id}`),this.Ef.forEach(e=>this.Lf(()=>t.processEvent?.call(t,e))),t.processedBuffer=!0),Object.values(this.apps).every(e=>e.processedBuffer||e.errored)&&((n=this.Rf)==null||n.call(this))},r=!1,i=i=>{t.errored=!i,t.loaded=!0,X_.info(`Site app with id ${e.id} ${i?`loaded`:`errored`}`),r&&n()};try{let{processEvent:n}=this.Lf(t=>e.init({posthog:this._instance,callback(e){t(),i(e)}}),!1);n&&(t.processEvent=n),r=!0}catch(t){X_.error(Z_+e.id,t),i(!1)}if(r&&t.loaded)try{n()}catch(n){X_.error(`Error while processing buffered events PostHog app with config id ${e.id}`,n),t.errored=!0}}Nf(){let e=this.siteAppLoaders||[];for(let t of e)this.apps[t.id]={id:t.id,loaded:!1,errored:!1,processedBuffer:!1};for(let t of e)this.setupSiteApp(t)}qf(e){if(Object.keys(this.apps).length===0)return;let t=this.globalsForEvent(e);for(let n of Object.values(this.apps))try{this.Lf(()=>n.processEvent?.call(n,t))}catch(t){X_.error(`Error while processing event ${e.event} for site app ${n.id}`,t)}}onRemoteConfig(e){var t;if(this.siteAppLoaders?.length)return this.isEnabled?(this.Nf(),void this._instance.on(`eventCaptured`,e=>this.qf(e))):void X_.error(`PostHog site apps are disabled. Enable the "opt_in_site_apps" config to proceed.`);if((t=this.Rf)==null||t.call(this),!e.ok)return;let n=e.config;if(n.siteApps?.length)if(this.isEnabled)for(let{id:e,url:t}of n.siteApps){var r,i;uc[`__$$ph_site_app_${e}`]=this._instance,(r=uc.__PosthogExtensions__)==null||(i=r.loadSiteApp)==null||i.call(r,this._instance,t,t=>{if(t)return X_.error(Z_+e,t)})}else X_.error(`PostHog site apps are disabled. Enable the "opt_in_site_apps" config to proceed.`)}}},_te={tracingHeaders:class{constructor(e){this._instance=e,this.jf=void 0,this.Bf=void 0,this.Hf=void 0,this.if=()=>{let e=this.zf();var t,n;e?(z(this.jf)&&(this.jf=(t=uc.__PosthogExtensions__)==null||(t=t.tracingHeadersPatchFns)==null?void 0:t._patchXHR(e,()=>this._instance.get_distinct_id(),this._instance.sessionManager)),z(this.Bf)&&(this.Bf=(n=uc.__PosthogExtensions__)==null||(n=n.tracingHeadersPatchFns)==null?void 0:n._patchFetch(e,()=>this._instance.get_distinct_id(),this._instance.sessionManager))):this.uf()}}initialize(){this.startIfEnabledOrStop()}Uo(e){var t,n;uc.__PosthogExtensions__?.tracingHeadersPatchFns?e():(t=uc.__PosthogExtensions__)==null||(n=t.loadExternalDependency)==null||n.call(t,this._instance,`tracing-headers`,t=>{if(t)return Hee.error(`failed to load script`,t);
13e()})}Uf(){return this._instance.config.tracing_headers??this._instance.config.addTracingHeaders??this._instance.config.__add_tracing_headers}zf(){let e=this.Uf();return wc(e)?(wc(this.Hf)?this.Hf.splice(0,this.Hf.length,...e):this.Hf=[...e],e.length>0?this.Hf:void 0):(wc(this.Hf)&&this.Hf.splice(0),this.Hf=e||void 0,this.Hf)}uf(){var e,t;(e=this.jf)==null||e.call(this),(t=this.Bf)==null||t.call(this),this.jf=void 0,this.Bf=void 0}startIfEnabledOrStop(){this.zf()?this.Uo(this.if):this.uf()}}},vte=B({surveys:class extends qee{constructor(e){var t;super(new Qee(e),(t=e,{get projectToken(){return t.config.token},kv:new Zee(t)})),this._instance=e}Gh(e,t){let n=t.query?Pg(e,t.query):e;return new Promise(e=>{this._instance._send_request({method:t.method,url:this._instance.requestRouter.endpointFor(t.target??`api`,n),data:t.body,headers:t.headers,timeout:t.timeoutMs,fireCallbackOnDrop:!0,transport:t.transport,compression:t.compression,timestampMode:t.sentAt,callback:e})})}}},Ov),yte={toolbar:class{constructor(e){this.instance=e}Wf(e){uc.ph_toolbar_state=e}Vf(){return uc.ph_toolbar_state??0}initialize(){return this.maybeLoadToolbar()}maybeLoadToolbar(e=void 0,t=void 0,n=void 0){if(Yp(this.instance.config)||!R||!tc)return!1;e??=R.location,n??=R.history;try{if(!t){try{R.localStorage.setItem(`test`,`test`),R.localStorage.removeItem(`test`)}catch{return!1}t=R?.localStorage}let r=$ee||hh(e.hash,`__posthog`)||hh(e.hash,`state`),i,a=r?uu(()=>JSON.parse(atob(decodeURIComponent(r))))||uu(()=>JSON.parse(decodeURIComponent(r))):null;return a&&a.action===`ph_authorize`?(i=a,i.source=`url`,i&&Object.keys(i).length>0&&(a.desiredHash?e.hash=a.desiredHash:n?n.replaceState(n.state,``,e.pathname+e.search):e.hash=``)):(i=JSON.parse(t.getItem(nv)||`{}`),i.source=`localstorage`,delete i.userIntent),!(!i.token||this.instance.config.token!==i.token||(this.loadToolbar(i),0))}catch{return!1}}Gf(e){let t=uc.ph_load_toolbar||uc.ph_load_editor;!jc(t)&&Tc(t)?t(e,this.instance):rv.warn(`No toolbar load function found`)}loadToolbar(e){let t=!!tc?.getElementById(`__POSTHOG_TOOLBAR__`);if(!R||t)return!1;let n=this.instance.requestRouter.region===`custom`&&this.instance.config.advanced_disable_toolbar_metrics,r=B(B({token:this.instance.config.token},e),{},{apiURL:this.instance.requestRouter.endpointFor(`ui`)},n?{instrument:!1}:{});if(R.localStorage.setItem(nv,JSON.stringify(B(B({},r),{},{source:void 0}))),this.Vf()===2)this.Gf(r);else if(this.Vf()===0){var i,a;this.Wf(1),(i=uc.__PosthogExtensions__)==null||(a=i.loadExternalDependency)==null||a.call(i,this.instance,`toolbar`,e=>{if(e)return rv.error(`[Toolbar] Failed to load`,e),void this.Wf(0);this.Wf(2),this.Gf(r)}),Jp(R,`turbolinks:load`,()=>{this.Wf(0),this.loadToolbar(r)})}return!0}Zf(e){return this.loadToolbar(e)}maybeLoadEditor(e=void 0,t=void 0,n=void 0){return this.maybeLoadToolbar(e,t,n)}}},bte=B({experiments:class e{get Rr(){return this._instance.config}constructor(t){this._instance=t,this.getWebExperimentsAndEvaluateDisplayLogic=(t=!1)=>{this.getWebExperiments(t=>{e.Qf(`retrieved web experiments from the server`),this.Jf=new Map,t.forEach(t=>{if(t.feature_flag_key){var n;this.Jf&&(e.Qf(`setting flag key `,t.feature_flag_key,` to web experiment `,t),(n=this.Jf)==null||n.set(t.feature_flag_key,t));let r=this._instance.getFeatureFlag(t.feature_flag_key);Oc(r)&&t.variants[r]&&this.Kf(t.name,r,t.variants[r].transforms)}else if(t.variants)for(let n in t.variants){let r=t.variants[n];e.Xf(r,this._instance)&&this.Kf(t.name,n,r.transforms)}})},t)},this._instance.onFeatureFlags(e=>{this.onFeatureFlags(e)})}initialize(){}onFeatureFlags(t){if(this._is_bot())e.Qf(hv);else if(!this.Rr.disable_web_experiments){if(jc(this.Jf))return this.Jf=new Map,this.loadIfEnabled(),void this.previewWebExperiment();e.Qf(`applying feature flags`,t),t.forEach(e=>{if(this.Jf&&this.Jf?.has(e)){let t=this._instance.getFeatureFlag(e),n=this.Jf?.get(e);t&&n!=null&&n.variants[t]&&this.Kf(n.name,t,n.variants[t].transforms)}})}}previewWebExperiment(){let t=e.getWindowLocation();if(t?.search){let n=ph(t?.search,`__experiment_id`),r=ph(t?.search,`__experiment_variant`);n&&r&&(e.Qf(`previewing web experiments ${n} && ${r}`),this.getWebExperiments(e=>{this.Yf(parseInt(n),r,e)},!1,!0))}}loadIfEnabled(){this.Rr.disable_web_experiments||this.getWebExperimentsAndEvaluateDisplayLogic()}
13getWebExperiments(e,t,n){if(this.Rr.disable_web_experiments&&!n)return e([]);let r=this._instance.get_property(`$web_experiments`);if(r&&!t)return e(r);this._instance._send_request({url:this._instance.requestRouter.endpointFor(`api`,`/api/web_experiments/?token=${this.Rr.token}`),method:`GET`,timestampMode:`query`,callback:t=>e(t.statusCode===200&&t.json&&t.json.experiments||[])})}Yf(t,n,r){let i=r.filter(e=>e.id===t);i&&i.length>0&&(e.Qf(`Previewing web experiment [${i[0].name}] with variant [${n}]`),this.Kf(i[0].name,n,i[0].variants[n].transforms))}static Xf(t,n){return!jc(t.conditions)&&e.tp(t,n)&&e.ep(t)}static tp(t,n){if(jc(t.conditions)||jc(t.conditions?.url))return!0;let r=e.getWindowLocation();if(r){let e=ym(n,r.href);return!t.conditions?.url||ate[t.conditions?.urlMatchType??`icontains`](t.conditions.url,e)}return!1}static getWindowLocation(){return R?.location}static ep(e){if(jc(e.conditions)||jc(e.conditions?.utm))return!0;let t=bh();if(t.utm_source){var n,r,i,a,o,s,c,l;let u=!(!((n=e.conditions)==null||(n=n.utm)==null)&&n.utm_campaign)||((r=e.conditions)==null||(r=r.utm)==null?void 0:r.utm_campaign)==t.utm_campaign,d=!(!((i=e.conditions)==null||(i=i.utm)==null)&&i.utm_source)||((a=e.conditions)==null||(a=a.utm)==null?void 0:a.utm_source)==t.utm_source,f=!(!((o=e.conditions)==null||(o=o.utm)==null)&&o.utm_medium)||((s=e.conditions)==null||(s=s.utm)==null?void 0:s.utm_medium)==t.utm_medium,p=!(!((c=e.conditions)==null||(c=c.utm)==null)&&c.utm_term)||((l=e.conditions)==null||(l=l.utm)==null?void 0:l.utm_term)==t.utm_term;return u&&f&&p&&d}return!1}static Qf(e,...t){Wd.info(`[WebExperiments] ${e}`,t)}Kf(t,n,r){this._is_bot()?e.Qf(hv):n===`control`?e.Qf(`Control variants leave the page unmodified.`):r.forEach(r=>{r.selector&&(e.Qf(`applying transform of variant ${n} for experiment ${t} `,r),(document?.querySelectorAll(r.selector))?.forEach(e=>{let t=e;r.html&&(t.innerHTML=r.html),r.css&&t.setAttribute(`style`,r.css)}))})}_is_bot(){return ec&&this._instance?Qg(ec,this.Rr.custom_blocked_useragents):void 0}}},Ov),xte={conversations:class{constructor(e){this._instance=e,this.np=void 0,this._conversationsManager=null,this.sp=!1,this.ne=null,this.rp=!1}initialize(){this.loadIfEnabled()}onRemoteConfig(e){if(this._instance.config.disable_conversations||(this.op=e.ok,!e.ok))return;let t=e.config.conversations;jc(t)||(Pc(t)?this.np=t:(this.np=t.enabled,this.ne=t),this.loadIfEnabled())}reset(){var e;(e=this._conversationsManager)==null||e.reset(),this._conversationsManager=null,this.np=void 0,this.ne=null,this.op=void 0,this.rp=!1}loadIfEnabled(){if(this._conversationsManager||this.sp||this._instance.config.disable_conversations||Yp(this._instance.config)||this._instance.config.cookieless_mode&&this._instance.consent.isOptedOut())return;let e=uc?.__PosthogExtensions__;if(e&&!z(this.np)&&this.np)if(this.ne&&this.ne.token){this.sp=!0;try{let t=e.initConversations;if(t)return this.ap(t),void(this.sp=!1);let n=e.loadExternalDependency;if(!n)return void this.lp(kp);n(this._instance,`conversations`,t=>{t||!e.initConversations?this.lp(`Could not load conversations script`,t):this.ap(e.initConversations),this.sp=!1})}catch(e){this.lp(`Error initializing conversations`,e),this.sp=!1}}else gv.error(`Conversations enabled but missing token in remote config.`)}ap(e){if(this.ne)try{this._conversationsManager=e(this.ne,this._instance),this.rp=!1,gv.info(`Conversations loaded successfully`)}catch(e){this.lp(`Error completing conversations initialization`,e)}else gv.error(`Cannot complete initialization: remote config is null`)}lp(e,t){gv.error(e,t),this._conversationsManager=null,this.sp=!1,this.rp=!0}show(){this._conversationsManager?this._conversationsManager.show():gv.warn(`Conversations not loaded yet.`)}hide(){this._conversationsManager&&this._conversationsManager.hide()}isAvailable(){return!0===this.np&&!Ac(this._conversationsManager)}getUnavailableReason(){return this.isAvailable()?null:this._instance.config.disable_conversations?`disabled_by_config`:Yp(this._instance.config)?`disabled_for_toolbar`:this._instance.config.cookieless_mode&&this._instance.consent.isOptedOut()?`consent_opted_out`:!1===this.op?`remote_config_failed`:z(this.np)?this.op?`disabled_in_project`:`remote_config_pending`:this.np?jc(this.ne)||!this.ne.token?`missing_token`:uc?.__PosthogExtensions__?this.sp?`initializing`:this.rp?`load_failed`:`not_loaded`:`extensions_unavailable`:`disabled_in_project`}isVisible(){var e;return(e=this._conversationsManager?.isVisible())!=null&&e}sendMessage(e,t,n){var r=this;return Kc(function*(){return r._conversationsManager?r._conversationsManager.sendMessage(e,t,n):(gv.warn(_v),null)})()}getMessages(e,t){var n=this;return Kc(function*(){return n._conversationsManager?n._conversationsManager.getMessages(e,t):(gv.warn(_v),null)})()}markAsRead(e){var t=this;return Kc(function*(){return t._conversationsManager?t._conversationsManager.markAsRead(e):(gv.warn(_v),null)})()}getTickets(e){var t=this;return Kc(function*(){return t._conversationsManager?t._conversationsManager.getTickets(e):(gv.warn(_v),null)})()}requestRestoreLink(e){var t=this;return Kc(function*(){return t._conversationsManager?t._conversationsManager.requestRestoreLink(e):(gv.warn(_v),null)})()}restoreFromToken(e){var t=this;return Kc(function*(){return t._conversationsManager?t._conversationsManager.restoreFromToken(e):(gv.warn(_v),null)})()}restoreFromUrlToken(){var e=this;return Kc(function*(){return e._conversationsManager?e._conversationsManager.restoreFromUrlToken():(gv.warn(_v),null)})()}getCurrentTicketId(){return this._conversationsManager?.getCurrentTicketId()??null}getWidgetSessionId(){return this._conversationsManager?.getWidgetSessionId()??null}xh(){var e;(e=this._conversationsManager)==null||e.setIdentity()}Ch(){var e;(e=this._conversationsManager)==null||e.clearIdentity()}}},Ste={logs:class{constructor(e){var t;this._instance=e,this.name=`logs`,this.up=!1,this.hp=!1,this.cp=!1,this.$=Gd(`[logs]`),this.dp=B(B({},this.$),{},{error:(...e)=>{e.some(Sv)||this.$.error(...e)}}),this.ll=[],this.vp=[],this.wd=0,this.Mo=!1,this.fp=[],this.pp=[],this.gp=!1,this.mp=!1,this.yp=()=>{var e,t;this.Mo||(this.wd=0,(e=this.bp)==null||e.onReconnect(),(t=this._p)==null||t.onReconnect())},this._instance&&(t=this._instance.config.logs)!=null&&t.captureConsoleLogs&&(this.up=!0),R&&Jp(R,`online`,this.yp)}wp(e,t,n,r){var i;let a=vv((i=this._instance)==null||(i=i.config)==null?void 0:i.logs,n);return[new Rd(this.kp(e,t),a,this.dp,()=>this.Sp(),e=>e(),void 0,r),a]}xp(){var e;let t=(e=this._instance)==null||(e=e.config)==null?void 0:e.logs;var n;return this.bp&&this.Cp===t||((n=this.bp)==null||n.reset(),this.Cp=t,[this.bp,this.$p]=this.wp(()=>this.ll,e=>{this.ll=e})),this.bp}Tp(){var e;let t=(e=this._instance)==null||(e=e.config)==null?void 0:e.logs;var n;return this._p&&this.Ip===t||((n=this._p)==null||n.reset(),this.Ip=t,[this._p,this.Mp]=this.wp(()=>this.vp,e=>{this.vp=e},{serviceNameDefault:`posthog-browser-logs`,consoleCapture:!0},yv)),this._p}setup(e){var t;if(this.Mo)return;this.wo=e,!((t=this._instance)==null||(t=t.config)==null||(t=t.logs)==null)&&t.captureConsoleLogs&&(this.up=!0),(this.up||this.Ep()&&this.Pp())&&this.Rp();let n=!1,r=e.onRemoteConfig(e=>{n=e.ok&&!0===e.config.logs?.captureConsoleLogs,this.onRemoteConfig(e)});this.Mo?r.dispose():(this.Ro=r,n||this.loadIfEnabled())}dispose(){var e,t,n,r;this.Mo||(this.Mo=!0,this.Ap(),(e=this.Ro)==null||e.dispose(),this.Ro=void 0,this.wo=void 0,this.cp=!1,R?.removeEventListener(`online`,this.yp),(t=this.Fp)==null||t.call(this),this.Fp=void 0,(n=this.bp)==null||n.reset(),(r=this._p)==null||r.reset())}onRemoteConfig(e){var t;if(this.Mo)return;let n=e.ok?e.config.logs?.captureConsoleLogs:void 0;jc(n)?this.Op():((t=this._instance)==null||(t=t.persistence)==null||t.register({$logs_capture_enabled_server_side:!!n}),n?(this.up=!0,this.hp||this.Rp(),this.loadIfEnabled()):this.Op())}reset(){var e,t,n,r;this.Ap(),(e=this.bp)==null||e.clearQueue(),this.ll=[],(t=this.bp)==null||t.reset(),(n=this._p)==null||n.clearQueue(),this.vp=[],(r=this._p)==null||r.reset(),this.wd=0}captureLog(e){this.Mo||this.xp().captureLog(e)}captureConsoleLog(e){this.Mo||this.Tp().captureLog(e)}captureBufferedConsoleLog(e,t,n){this.Mo||this.Tp().captureLog(e,{context:t,occurredAtMs:n})}Pp(){var e;return!!(!((e=this._instance)==null||(e=e.persistence)==null||(e=e.props)==null)&&e[vf])}Ep(){var e,t,n;return!(!((e=this._instance)==null||(t=e.sl)==null)&&t.call(e))||!!(!((n=uc._POSTHOG_REMOTE_CONFIG)==null||(n=n[this._instance.config.token])==null)&&n.config)}Th(){var e;this.Ap(),(e=this._p)==null||e.clearQueue(),this.vp=[]}Op(){this.up||this.Ap()}Rp(){var e;if(this.gp||!uc?.console)return;let t=vv((e=this._instance)==null||(e=e.config)==null?void 0:e.logs).maxBufferSize,n=!0;this.pp.push(()=>{n=!1});for(let e of ote){let r;try{r=ste(uc.console[e])}catch{continue}
13r&&this.pp.push(B_(uc.console,e,i=>{let a=(...r)=>{try{n&&this.Dp(e,r,t)}catch{}return i.apply(uc.console,r)};return a.__rrweb_original__=r,a}))}this.gp=!0,this.Lp=setTimeout(()=>{this.Ap()},3e4)}Dp(e,t,n){if(this.gp&&!this.mp&&t.length!==0)if(this._instance?.is_capturing()){if(n>this.fp.length){this.mp=!0;try{this.fp.push({level:e,args:t,occurredAtMs:Date.now(),context:this.Sp()})}finally{this.mp=!1}}}else this.Ap()}Ap(){if(this.fp=[],this.gp){this.gp=!1,this.Lp&&=(clearTimeout(this.Lp),void 0);for(let e of this.pp)e();this.pp=[]}}Np(){let e=this.fp;return this.Ap(),e}get logger(){return this.qp||={trace:(e,t)=>this.captureLog({body:e,level:`trace`,attributes:t}),debug:(e,t)=>this.captureLog({body:e,level:`debug`,attributes:t}),info:(e,t)=>this.captureLog({body:e,level:`info`,attributes:t}),warn:(e,t)=>this.captureLog({body:e,level:`warn`,attributes:t}),error:(e,t)=>this.captureLog({body:e,level:`error`,attributes:t}),fatal:(e,t)=>this.captureLog({body:e,level:`fatal`,attributes:t})},this.qp}flushLogs(e){e?this.jp(e):(this.bp&&this.bp.flush().catch(e=>this.Bp(e)),this._p&&this._p.flush().catch(e=>this.Bp(e)))}Bp(e){Sv(e)||this.$.error(`PostHog logs flush failed:`,e)}loadIfEnabled(){if(this.Mo||!this.up||this.hp||this.cp)return;let e=uc?.__PosthogExtensions__;if(!e)return this.$.error(`PostHog Extensions not found.`),void this.Ap();let t=e.loadExternalDependency;if(!t)return this.$.error(kp),void this.Ap();this.cp=!0;try{t(this._instance,`logs`,t=>{if(this.cp=!1,this.Mo||!this.up)return;let n=e.logs;if(t||!n?.initializeLogs)this.$.error(`Could not load logs script`,t),this.Ap();else{let e=this.Np();var r;this.Fp=n.initializeLogs(this.wo??this._instance),this.hp=!0,e.length>0&&((r=n.replayConsoleBuffer)==null||r.call(n,this.wo??this._instance,e))}})}catch(e){throw this.cp=!1,e}}kp(e,t){let n=this._instance;return{get isDisabled(){return!1},get optedOut(){return!n.is_capturing()},getPersistedProperty:t=>t===pc.LogsQueue?e():void 0,setPersistedProperty(e,n){e===pc.LogsQueue&&t(n??[])},js:e=>this.js(e),getLibraryId:()=>Zd.LIB_NAME,getLibraryVersion:()=>Zd.LIB_VERSION}}js(e){return new Promise(t=>{if(gh(this.wd,3))return void t({kind:`fatal`,error:xv(void 0,`logs endpoint is unreachable, dropping batch`)});let n=!1,r=e=>{n||(n=!0,clearTimeout(i),t(e))},i=setTimeout(()=>{this.$.warn(`Logs request timed out before receiving a response`),r({kind:`retry-later`,error:xv(void 0,`logs request timed out`)})},9e4);this._instance._send_request({method:`POST`,url:this.Hp(),data:e,compression:`best-available`,batchKey:`logs`,fireCallbackOnDrop:!0,callback:e=>{let t=e.statusCode;this.zp(t),t>=200&&300>t?r({kind:`ok`}):t===413?r({kind:`too-large`}):t!==0&&t!==408&&t!==429&&500>t?r({kind:`fatal`,error:Error(`logs request failed with status ${t}`)}):t===0?(e.error||this.$.warn(`Logs request failed before receiving an HTTP response`),r({kind:`retry-later`,error:xv(e.error,`logs request failed before receiving an HTTP response`)})):r({kind:`retry-later`,error:e.error??Error(`logs request failed with status ${t}`)})}})})}zp(e){(e!==0||this._instance.__loaded)&&(this.wd=_h(e,this.wd,3,()=>this.$.warn(`Log requests are failing before receiving an HTTP response; this can happen due to network issues, CORS, browser blocking, or ad blockers. Stopped sending logs; will try again when connectivity changes.`)))}jp(e){this.ll.length>0&&this.Up(e,this.ll,this.$p,Zd.LIB_NAME,e=>{this.ll=e}),this.vp.length>0&&this.Up(e,this.vp,this.Mp,yv,e=>{this.vp=e})}Up(e,t,n,r,i){if(t.length===0)return;let a=t.map(e=>e.record);i([]);
13let o=Pd(a,Nd(n,Zd.LIB_NAME,Zd.LIB_VERSION),r,Zd.LIB_VERSION);this._instance._send_request({method:`POST`,url:this.Hp(),data:o,compression:`best-available`,batchKey:`logs`,transport:e})}Hp(){return this._instance.requestRouter.endpointFor(`api`,`/i/v1/logs`)+`?token=`+encodeURIComponent(this._instance.config.token)}Sp(){var e;let t={};if(t.distinctId=this._instance.get_distinct_id(),this._instance.sessionManager){let{sessionId:e,windowId:n,sessionStartTimestamp:r,lastActivityTimestamp:i}=this._instance.sessionManager.checkAndGetSessionAndWindowId(!0);t.sessionId=e,t.windowId=n,jc(r)||(t.sessionStartTimestamp=r),jc(i)||(t.lastActivityTimestamp=i)}if(!(uc==null||(e=uc.location)==null)&&e.href&&(t.currentUrl=this._instance.config.disable_capture_url_hashes?lu(uc.location.href):uc.location.href),this._instance.featureFlags){let e=this._instance.featureFlags.getFlags();e&&e.length>0&&(t.activeFeatureFlags=e)}return t}}},Cte={metrics:class{constructor(e){this._instance=e,this.$=Gd(`[metrics]`),this.Mo=!1}initialize(){this.onConfigChange()}onConfigChange(){if(this.Mo)return;let e=!!this._instance.config.metrics?.network;e&&!this.Wp?this.Wp=(e=>{let t=!0,n=()=>t?(e=>{let t=e.config.metrics?.network;return!0===t?{}:t||void 0})(e):void 0,r=ute(e,n),i=dte(e,n);return()=>{t=!1,r(),i()}})(this._instance):!e&&this.Wp&&(this.Wp(),this.Wp=void 0)}xp(){var e;let t=(e=this._instance)==null||(e=e.config)==null?void 0:e.metrics;var n;return this.bp&&this.Cp===t||((n=this.bp)==null||n.reset(),this.Cp=t,this.bp=new Hd(this.kp(),function(e){let t=e?.resourceAttributes;return{serviceName:t?.[`service.name`]??e?.serviceName,serviceVersion:t?.[`service.version`]??e?.serviceVersion,environment:t?.[`deployment.environment`]??e?.environment,resourceAttributes:t,beforeSend:e?.beforeSend,flushIntervalMs:e?.flushIntervalMs??1e4,maxSeriesPerFlush:e?.maxSeriesPerFlush??1e3}}(t),this.$)),this.bp}count(e,t=1,n){this.xp().count(e,t,n)}gauge(e,t,n){this.xp().gauge(e,t,n)}histogram(e,t,n){this.xp().histogram(e,t,n)}flush(e){if(!this.bp)return Promise.resolve();if(e){let t=this.bp.drainWindow();return t&&this.Ys(t,e),Promise.resolve()}return this.bp.flush().catch(e=>this.$.error(`PostHog metrics flush failed:`,e))}reset(){var e;(e=this.bp)==null||e.reset()}dispose(){var e,t;this.Mo=!0,(e=this.Wp)==null||e.call(this),this.Wp=void 0,(t=this.bp)==null||t.reset()}kp(){let e=this._instance,t=this;return{get isDisabled(){return!1},get optedOut(){return!e.is_capturing()},Ys:e=>t.Ys(e),getLibraryId:()=>Zd.LIB_NAME,getLibraryVersion:()=>Zd.LIB_VERSION}}Ys(e,t){return new Promise(n=>{let r=!1,i=e=>{r||(r=!0,clearTimeout(a),n(e))},a=setTimeout(()=>i({kind:`retry-later`,error:Error(`metrics request timed out`)}),9e4);this._instance._send_request(B(B({method:`POST`,url:this.Vp(),data:e,compression:`best-available`,batchKey:`metrics`},t&&{transport:t}),{},{fireCallbackOnDrop:!0,callback(e){let t=e.statusCode;i(t>=200&&300>t?{kind:`ok`}:t===413?{kind:`too-large`}:t!==0&&t!==408&&t!==429&&500>t?{kind:`fatal`,error:Error(`metrics request failed with status ${t}`)}:{kind:`retry-later`,error:e.error??Error(`metrics request failed with status ${t}`)})}}))})}Vp(){return this._instance.requestRouter.endpointFor(`api`,`/i/v1/metrics`)+`?token=`+encodeURIComponent(this._instance.config.token)}}};M_.__defaultExtensionClasses=B({},B(B(B(B(B(B(B(B(B(B(B(B(B({},Ov),fte),pte),mte),hte),gte),vte),_te),yte),bte),xte),Ste),Cte));var kv=function(){Zd.SDK_DIST_CHANNEL=`npm`;let e=b_[k_]=new M_;return function(){function e(){e.done||(e.done=!0,Wg=!1,Bp(b_,function(e){e._dom_loaded()}))}tc?.addEventListener?tc.readyState===`complete`?e():Jp(tc,`DOMContentLoaded`,e,{capture:!1}):R&&Wd.error("Browser doesn't support `document.addEventListener` so PostHog couldn't be initialized")}(),e}(),Av=!1,jv=(void 0)?.trim();function Mv(){return typeof crypto<`u`&&`randomUUID`in crypto?crypto.randomUUID():`${Date.now()}-${Math.random().toString(36).slice(2)}`}function wte(){let e=new URL(window.location.href);return e.search=``,e.hash=``,e.toString()}function Nv(){if(!(Av||!jv)){if(!window.fbq){let e=[],t=(...n)=>{t.callMethod?t.callMethod(...n):e.push(n)};t.push=t,t.loaded=!0,t.version=`2.0`,t.queue=e,window.fbq=t,window._fbq??=t;let n=document.createElement(`script`);n.async=!0,n.src=`https://connect.facebook.net/en_US/fbevents.js`,document.head.appendChild(n)}window.fbq(`init`,jv),Av=!0}}function Pv(e,{eventId:t=Mv(),customData:n={},sendToServer:r=!0}={}){!Av||!window.fbq||(window.fbq(`track`,e,n,{eventID:t}),r&&fetch(`/api/meta/events`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({event_name:e,event_id:t,event_source_url:wte(),custom_data:n}),keepalive:!0}
13).catch(()=>{}))}function Fv(){if(!Av)return{};try{let e=document.cookie.split(`;`).map(e=>e.trim());return Object.fromEntries([`fbp`,`fbc`].flatMap(t=>{let n=e.find(e=>e.startsWith(`_${t}=`))?.slice(t.length+2);return n?[[t,decodeURIComponent(n)]]:[]}))}catch{return{}}}function Iv(){return Av&&!0}function Tte(e,t,n,r){Pv(`Lead`,{eventId:r,sendToServer:!1,customData:{content_name:`InstaSnag mobile app`,content_category:`app_download`,store:e,placement:t,locale:n}})}var Lv=!1,Rv;function zv(e){return Object.fromEntries(Object.entries(e).map(([e,t])=>{if(typeof t==`string`&&/url|referrer/i.test(e)){let e=t;try{let e=new URL(t);e.search=``,e.hash=``,t=e.toString()}catch{t=e.split(/[?#]/)[0]}}else t&&typeof t==`object`&&!Array.isArray(t)&&(t=zv(t));return[e,t]}))}function Bv(e){let t=(void 0)?.trim(),n=(void 0)?.trim();if(!t||!n)return;Lv||=(kv.init(t,{api_host:n,person_profiles:`identified_only`,capture_pageview:!1,capture_pageleave:!0,autocapture:!1,disable_session_recording:!1,enable_recording_console_log:!1,session_recording:{maskAllInputs:!0,maskTextSelector:`*`,blockSelector:`input[type="hidden"], input[type="file"]`,recordHeaders:!1,recordBody:!1,recordCrossOriginIframes:!1,maskCapturedNetworkRequestFn:e=>({...e,name:e.name.split(/[?#]/)[0]})},before_send:e=>(e&&(e.properties=zv(e.properties)),e)}),!0);let r=kv.get_property(`$user_id`);r&&r!==e&&(kv.reset(),Rv=void 0),e&&kv.get_distinct_id()!==e&&kv.identify(e),Nv(),Vv()}function Vv(){if(!Lv)return;let e=`${window.location.origin}${window.location.pathname}`;e!==Rv&&(Rv=e,kv.capture(`$pageview`,{$current_url:e}),Pv(`PageView`,{sendToServer:!1}))}function Hv(e,t,n){if(!Lv)return;let r=Mv();kv.capture(`app_store_clicked`,{store:e,placement:t,locale:n,event_id:r,meta_tracking_enabled:Iv(),...Fv()},{transport:`sendBeacon`}),Tte(e,t,n,r)}function Uv(e,t,n,r=Mv()){if(Lv)try{if(kv.capture(e,{...n,event_id:r,meta_tracking_enabled:Iv(),...Fv()}),n.is_sandbox===!0)return;Pv(t,{eventId:r,customData:n,sendToServer:!1})}catch{}}function Wv(e,t){try{Bv(e),Uv(`account_created`,`CompleteRegistration`,{signup_method:t},`registration:${e}`)}catch{}}function Ete(e){let t=new URLSearchParams;return t.set(`username`,e.identifier.trim()),t.set(`password`,e.password),t}var Gv={async register(e){let t=await Lo.post(`/api/auth/register`,e,{skipAuth:!0});return Wv(t.data.user_id,`email`),t.data},async login(e){let t=await Lo.post(`/api/auth/login`,void 0,{skipAuth:!0,rawBody:Ete(e),headers:{"Content-Type":`application/x-www-form-urlencoded`}});return Eo.setTokens({accessToken:t.data.access_token,refreshToken:t.data.refresh_token}),t.data},async resendConfirmation(e){return(await Lo.post(`/api/auth/resend-confirmation`,{username_or_email:e.trim()},{skipAuth:!0})).data},async validateEmailVerificationToken(e){return(await Lo.get(`/api/auth/verify-email`,{query:{token:e.trim()},skipAuth:!0})).data},async requestPasswordReset(e){return(await Lo.post(`/api/auth/forgot-password`,{username_or_email:e.trim()},{skipAuth:!0})).data},async verifyPasswordResetCode(e,t){return(await Lo.post(`/api/auth/verify-reset-code`,{username_or_email:e.trim(),verification_code:t.replace(/\D/g,``)},{skipAuth:!0})).data},async resetPasswordWithToken(e,t,n){return(await Lo.post(`/api/auth/reset-password`,{username_or_email:e.trim(),reset_token:t,new_password:n},{skipAuth:!0})).data},async setupUsername(e){let t=await Lo.post(`/api/auth/setup-username`,e,{skipAuth:!0});return Eo.setTokens({accessToken:t.data.access_token,refreshToken:t.data.refresh_token}),Wv(t.data.user.id,`oauth`),t.data},async oauthLogin(e){return(await Lo.post(`/api/auth/oauth`,e,{skipAuth:!0})).data},async getCurrentUser(){return(await Lo.get(`/api/auth/me`)).data},async logout(){try{let e=Eo.getRefreshToken();await Lo.post(`/api/auth/logout`,e?{refresh_token:e}:void 0)}finally{Eo.clear()}}},Kv=(0,b.createContext)(null),Dte=s((e=>{var t=Symbol.for(`react.transitional.element`),n=Symbol.for(`react.fragment`);function r(e,n,r){var i=null;if(r!==void 0&&(i=``+r),n.key!==void 0&&(i=``+n.key),`key`in n)for(var a in r={},n)a!==`key`&&(r[a]=n[a]);else r=n;return n=r.ref,{$$typeof:t,type:e,key:i,ref:n===void 0?null:n,props:r}}e.Fragment=n,e.jsx=r,e.jsxs=r})),qv=s(((e,t)=>{t.exports=Dte()})),V=qv();function Ote({children:e}){let[t,n]=(0,b.useState)({status:`loading`,user:null});(0,b.useEffect)(()=>{t.status!==`loading`&&Bv(t.user?.id??null)},[t.status,t.user?.id]),(0,b.useEffect)(()=>{let e=!0,t=async()=>
13{if(!Eo.getAccessToken()){e&&n({status:`unauthenticated`,user:null});return}try{let t=await Gv.getCurrentUser();e&&n({status:`authenticated`,user:t})}catch{Eo.clear(),e&&n({status:`unauthenticated`,user:null})}},r=e=>{e.key===`instasnag.access_token`&&(e.newValue?t():n({status:`unauthenticated`,user:null}))};return window.addEventListener(`storage`,r),Lo.setOnUnauthorized(()=>{e&&n({status:`unauthenticated`,user:null})}),t(),()=>{e=!1,Lo.setOnUnauthorized(null),window.removeEventListener(`storage`,r)}},[]);let r=(0,b.useMemo)(()=>({...t,isAuthenticated:t.status===`authenticated`&&!!t.user,login:async e=>{n({status:`authenticated`,user:(await Gv.login(e)).user})},setupUsername:async(e,t)=>{n({status:`authenticated`,user:(await Gv.setupUsername({temp_user_id:e,username:t})).user})},refreshUser:async()=>{n({status:`authenticated`,user:await Gv.getCurrentUser()})},logout:async()=>{try{await Gv.logout()}finally{n({status:`unauthenticated`,user:null})}}}),[t]);return(0,V.jsx)(Kv.Provider,{value:r,children:e})}function Jv(){let e=(0,b.useContext)(Kv);if(!e)throw Error(`useAuth must be used within AuthProvider`);return e}function Yv(e,t){if(t instanceof _o)return e(`errors.timeout`);if(t instanceof go)return e(`errors.network`);if(t instanceof ho){if(t.status===403)return e(`errors.subscriptionRequired`);if(t.status===429)return e(`errors.rateLimited`);if(t.status>=500)return e(`errors.serverUnavailable`)}return e(`errors.loadSearches`)}function kte(e,t){if(t instanceof _o)return e(`errors.listingsSlow`);if(t instanceof go)return e(`errors.networkRetryListings`);if(t instanceof ho){if(t.status===401)return e(`errors.signInAgain`);if(t.status===403)return e(`errors.noSellerAccess`);if(t.status>=500)return e(`errors.listingsUnavailable`)}return e(`errors.loadListingsFailed`)}function Ate(e,t){if(t instanceof _o)return e(`errors.chatsSlow`);if(t instanceof go)return e(`errors.networkRetryListings`);if(t instanceof ho){if(t.status===403&&t.details?.error===`chatting_not_available`)return typeof t.details.message==`string`&&t.details.message||e(`errors.chattingNotAvailable`);if(t.status===401)return e(`errors.signInAgainChats`);if(t.status>=500)return e(`errors.chatsUnavailable`)}return e(`errors.loadConversations`)}function Xv(e,t){if(t instanceof _o)return e(`errors.conversationSlow`);if(t instanceof go)return e(`errors.networkRetryListings`);if(t instanceof ho){if(t.status===404)return e(`errors.conversationNotFound`);if(t.status===403&&t.details?.error===`chatting_not_available`)return typeof t.details.message==`string`&&t.details.message||e(`errors.chattingNotAvailable`);if(t.status===401)return e(`errors.signInAgainChatDetail`);if(t.status>=500)return e(`errors.conversationUnavailable`)}return e(`errors.loadConversations`)}function Zv(e,t){if(t instanceof ho){if(t.status===403&&t.details?.error===`chatting_not_available`)return typeof t.details.message==`string`&&t.details.message||e(`errors.messagingNotAvailable`);if(t.details?.error===`listing_not_available_for_chat`)return typeof t.details.message==`string`&&t.details.message||e(`errors.messagingNotAvailableListing`);if(t.details?.error===`conversation_disabled`)return typeof t.details.message==`string`&&t.details.message||e(`errors.messagingNotAvailableConversation`);if(t.status===404)return e(`errors.conversationNotFound`);if(t.status===401)return e(`errors.signInAgainSend`);if(typeof t.details?.message==`string`)return t.details.message}return t instanceof go?e(`errors.networkRetryListings`):t instanceof _o?e(`errors.sendSlow`):e(`errors.sendFailed`)}function Qv(e,t){return t instanceof ho?t.status===403?e(`feed.subscriptionRequired`):e(`errors.loadFeed`):e(`errors.networkShort`)}function $v(e,t){if(t instanceof _o)return e(`errors.timeout`);if(t instanceof go)return e(`errors.network`);if(t instanceof ho){if(t.status===401)return e(`searchWizard.categoryPicker.signInAgain`);if(t.status===429)return e(`errors.rateLimited`);if(t.status>=500)return e(`errors.serverUnavailable`)}return e(`searchWizard.categoryPicker.loadCategoriesError`)}function ey(e,t){if(t instanceof _o)return e(`errors.timeout`);if(t instanceof go)return e(`errors.network`);if(t instanceof ho){if(t.status===401)return e(`searchWizard.categoryPicker.signInAgain`);if(t.status===404)return e(`searchWizard.categoryPicker.categoryNotFound`);if(t.status===429)return e(`errors.rateLimited`);if(t.status>=500)return e(`errors.serverUnavailable`)}return e(`searchWizard.categoryPicker.loadSubcategoriesError`)}function ty(e,t){return t instanceof ho?t.status===403?e(`feed.subscriptionRequired`):e(`errors.loadFeedMore`):e(`errors.networkRetry`)}var ny=(0,b.createContext)(null),ry=`instasnag-locale`,iy=[`en`,`fr`];function ay(){try{let e=localStorage.getItem(ry);if(e===`en`||e===`fr`||e===`system`)return e}catch{}return`system`}function oy(){if(typeof navigator>`u`)return`en`;let e=navigator.language.slice(0,2).toLowerCase();return iy.includes(e)?e:`en`}function sy(e){return e===`system`?oy():iy.includes(e)?e:`en`}function cy({children:e}){let[t,n]=(0,b.useState)(ay),r=sy(t);(0,b.useEffect)(()=>{document.documentElement.lang=r},[r]),(0,b.useEffect)(()=>{let e=e=>{if(e.key!==`instasnag-locale`)return;let t=e.newValue;(t===`en`||t===`fr`||t===`system`)&&n(t)};return window.addEventListener(`storage`,e),()=>window.removeEventListener(`storage`,e)},[]);let i=(0,b.useCallback)(e=>{n(e);try{localStorage.setItem(ry,e)}catch{}},[]),a=(0,b.useMemo)(()=>({preference:t,locale:r,setPreference:i}),[t,r,i]);return(0,V.jsx)(ny.Provider,{value:a,children:e})}var ly={en:{common:{account:`Account`,close:`Close`,email:`Email`,logout:`Logout`,signOut:`Sign out`,goBack:`Go back`,settings:`Settings`,username:`Username`,verified:`Verified`,notVerified:`Not verified`,loadingSettings:`Loading settingsâ¦`,loadMore:`Load more`,loadingMore:`Loadingâ¦`,tryAgain:`Try again`,cancel:`Cancel`,continue:`Continue`,reload:`Reload page`,loading:`Loadingâ¦`,never:`Never`,notAvailable:`N/A`,untitledListing:`Untitled Listing`,listing:`Listing`,viewPlans:`View plans`,seePlans:`See plans`,createNewSearch:`Create New Search`,upgradeToAddSearch:`Upgrade to Add Search`,upgradeToAddListing:`Upgrade to Add Listing`,addNew:`Add New`,backToHome:`Back to Home`,exploreFeatures:`
13Explore Features`,contactSupport:`Contact Support`,openMenu:`Open menu`,closeMenu:`Close menu`,mobileNavigation:`Mobile navigation`,mainNav:`Main`,signIn:`Sign in`,startFreeTrial:`Start free trial`,dashboard:`Dashboard`},nav:{home:`Home`,searches:`Searches`,feed:`Feed`,myListings:`My Listings`,chats:`Chats`,mainMenu:`Main Menu`,dashboardAria:`Dashboard`,features:`Features`,download:`Download`,pricing:`Pricing`,contact:`Contact`},language:{title:`Language`,description:`Choose the display language for InstaSnag on this device.`,english:`English`,french:`Français`,system:`System`,systemDescription:`Matches your browser language`,englishDescription:`Use English everywhere in the app`,frenchDescription:`Use French everywhere in the app`,groupLabel:`App language`,switch:`Change language`},theme:{title:`Color theme`,groupLabel:`Color theme`,light:`Light`,dark:`Dark`,system:`System`,lightDescription:`Light background across the app`,darkDescription:`Dark background across the app`,systemDescription:`Matches your device ({mode} now)`,lightNow:`light`,darkNow:`dark`,lightMode:`Light mode`,darkMode:`Dark mode`,switchToLight:`Switch to light mode`,switchToDark:`Switch to dark mode`},settings:{title:`Settings`,subtitle:`Manage your account and preferences`,sectionsAria:`Settings sections`,navAria:`Settings navigation`,appearanceTitle:`Appearance`,appearanceDescription:`Theme, language, and display options.`,nav:{account:`Account`,plan:`Plan`,activity:`Activity`,preferences:`Preferences`,connectivity:`Connectivity`,ai:`AI`,information:`Information`,profile:`Profile`,profileDescription:`Your public identity and contact details`,linkedAccounts:`Linked accounts`,linkedAccountsDescription:`Google, Facebook, and other sign-in methods`,subscription:`Subscription`,subscriptionDescription:`Plan, billing, and usage limits`,favorites:`Favorite listings`,favoritesDescription:`Listings you saved from your feed`,appearance:`Appearance`,appearanceDescription:`Theme, language, and display options`,extension:`Browser extension`,extensionDescription:`Facebook Marketplace messaging bridge`,aiReplyDelay:`AI reply delay`,aiReplyDelayDescription:`Wait time before automatic AI replies`,meetupLocations:`Meetup locations`,meetupLocationsDescription:`Pickup locations for AI buyer negotiations`,availabilityTimes:`Availability times`,availabilityTimesDescription:`Weekly availability for AI buyer coordination`,legal:`Legal & support`,legalDescription:`Privacy, terms, and contact`},profile:{title:`Profile`,description:`Your account identity on InstaSnag. Contact support if you need to change these details.`,memberSince:`Member since`,timeZone:`Time zone`,localDeviceTime:`Local device time`},linkedAccounts:{title:`Linked accounts`,description:`Connect Google or Facebook so you can sign in without a password. Your InstaSnag email stays your primary account identity.`,primaryEmail:`Primary email`,primaryEmailDescription:`This is the email on your InstaSnag profile. Linked providers may use a different address.`,signInProviders:`Sign-in providers`,signInProvidersDescription:`Link or unlink third-party accounts used to access InstaSnag.`,googleDescription:`Use your Google account to sign in quickly and securely.`,facebookDescription:`Use your Facebook account as an additional sign-in method.`,unlinkTitle:`Unlink {provider}?`,unlinkDescription:`You will no longer be able to sign in with {provider}. You can reconnect it at any time.`},security:{title:`Security`,description:`Manage your password, sign-in options, and account deletion.`,password:`Password`,signInMethods:`Sign-in methods`,signInMethodsDescription:`How you can access your InstaSnag account.`,deleteAccount:`Delete account`,deleteAccountDescription:`Permanently remove your account and associated data.`},subscription:{title:`Subscription`,description:`Your plans and billing.`},favorites:{title:`Favorite listings`,description:`Listings you saved from your feed.`},extension:{title:`Browser extension`,description:`Connect the InstaSnag browser extension to send and receive Facebook Marketplace messages from your dashboard.`,setupGuide:`Setup guide`,setupGuideDescription:`Follow these steps to install, connect, and keep your extension running.`},aiReplyDelay:{title:`AI reply delay`,description:`Control how long the AI waits before sending automatic replies to buyer messages.`,presetDurations:`Preset durations`,customDelay:`Custom delay`},meetupLocations:{title:`Meetup locations`,description:`Add default meetup locations for your AI agent to propose during buyer negotiations.`,savedLocations:`Saved locations`},meetupTimes:{title:`Availability times`,description:`Define when you are available for meetups so your AI agent can coordinate with buyers automatically.`,savedSchedules:`Saved schedules`},legal:{title:`Legal & support`,description:`Policies, terms, and ways to reach our team.`,privacy:`Privacy policy`,privacyDescription:`How
13we collect and protect your data`,terms:`Terms of service`,termsDescription:`Rules for using InstaSnag`,contact:`Contact support`,contactDescription:`Questions, billing help, or feedback`},placeholder:{badge:`UI preview`,title:`Content coming next`,description:`The {section} section will be connected to the API in a follow-up step. Navigation and layout are ready.`}},time:{justNow:`Just now`,minutesAgo:`{count}m ago`,hoursAgo:`{count}h ago`},errors:{timeout:`The request timed out. Please try again.`,network:`Unable to reach the server. Check your connection.`,subscriptionRequired:`You need an active subscription to view searches.`,rateLimited:`Too many requests. Wait a moment and retry.`,serverUnavailable:`The server is temporarily unavailable.`,loadSearches:`Could not load searches.`,loadDashboard:`Failed to load Dashboard`,subscriptionRequiredListings:`Subscription required to view listings.`,loadFeed:`Failed to load feed. Please try again.`,loadFeedMore:`Could not load more listings. Try again.`,networkShort:`Network error. Please check your connection.`,networkRetry:`Network error. Try again.`,signInAgain:`Please sign in again to view your listings.`,noSellerAccess:`You do not have access to seller listings on your current plan.`,listingsUnavailable:`Listings are temporarily unavailable. Please try again.`,loadListingsFailed:`Something went wrong while loading your listings.`,listingsSlow:`Your listings are taking too long to load.`,networkRetryListings:`Unable to reach the server. Check your connection and try again.`,chatsSlow:`Conversations are taking too long to load.`,chatsUnavailable:`Chats are temporarily unavailable. Please try again.`,chattingNotAvailable:`Chatting is not available on your current plan.`,signInAgainChats:`Please sign in again to view your chats.`,conversationNotFound:`This conversation could not be found.`,loadConversations:`Something went wrong while loading conversations.`,conversationSlow:`This conversation is taking too long to load.`,signInAgainChatDetail:`Please sign in again to view this chat.`,conversationUnavailable:`This conversation is temporarily unavailable. Please try again.`,signInAgainSend:`Please sign in again to send messages.`,messagingNotAvailable:`Messaging is not available on your current plan.`,messagingNotAvailableListing:`Messaging is not available for this listing.`,messagingNotAvailableConversation:`Messaging is not available for this conversation.`,sendSlow:`Sending is taking too long. Please try again.`,sendFailed:`Failed to send message. Please try again.`},dashboard:{title:`Dashboard`,welcomeBack:`Welcome back, {username}. Here's what's happening.`,activeSearches:`Active Searches`,activeVsTotal:`Active vs Total`,everyMinutes:`Every {count} min`,tierFallback:`Tier {n}`,searchesRemaining:`Searches Remaining`,capacityUsed:`Capacity used`,listingsThisWeek:`Listings This Week`,vsLastWeek:`Vs Last Week`,listingsToday:`Listings Today`,vsYesterday:`Vs Yesterday`,recentListings:`Recent Listings`,viewAllFeed:`Vie
13w all feed`,noListingsYet:`No listings found yet`,noRecentListings:`No recent listings yet`,noListingsNoSearchesDescription:`You have not created any searches yet. Open your Searches page to set up your first one and start finding deals.`,noListingsWithSearchesDescription:`Your saved searches are working, but nothing new has landed here yet. Open the feed to see live matches, or check back soon.`,goToSearches:`Go to searches`,viewFeed:`View feed`,viewListingDetails:`View listing details`,openOnMarketplace:`Open on marketplace`,subscriptionTitle:`Subscription`,noActiveSubscription:`No active subscription`,noSubscription:`No subscription`,currentPlan:`Current plan`,activePlan:`Active Plan`,nextBilling:`Next billing:`,upgradeSubscription:`Upgrade Subscription`,upgradeToPro:`Upgrade to Pro`,manageSubscription:`Manage Subscription`,serviceLimits:`Service Limits`,recentSearches:`Recent Searches`,manageAll:`Manage all`,noSearchesYet:`No searches yet`,noSearchesDescription:`You have not created any searches. Open your Searches page to set up your first one and start monitoring marketplaces.`,backToDashboard:`Back to Dashboard`},searches:{title:`Searches`,savedCountOne:`{count} saved search`,savedCountMany:`{count} saved searches`,loading:`Loading searchesâ¦`,noSearchesYet:`No searches yet`,noSearchesDescription:`Start with the category wizard to set keywords, locations, and alerts. Your saved searches will show up here for quick access.`,subscribeToCreate:`Subscribe to create searches`,subscribeDescription:`You need an active plan with available capacity to add new searches. Upgrade or manage your subscription to continue.`},listings:{title:`My Listings`,loading:`Loading your listingsâ¦`,listingSynced:`{count} listing synced for seller tools`,listingsSynced:`{count} listings synced for seller tools`,greetingAddFirst:`Hi {name}. Add your first marketplace listing.`,noListingsYet:`No listings yet`,emptyCanAdd:`Add a Facebook Marketplace listing â paste the URL or listing ID from the marketplace page.`,emptyUpgrade:`Upgrade your plan to sync marketplace listings and manage seller tools on the web.`,deletedToast:`"{title}" was deleted.`,addedToast:`"{title}" was added successfully.`,backToMyListings:`Back to My Listings`},feed:{loading:`Loading listingsâ¦`,listingsFound:`{count} listings found`,grid:`Grid`,list:`List`,filters:`Filters`,subscriptionRequired:`Subscription required to view listings.`,viewSubscriptionPlans:`View subscription plans`,scrollToTop:`Scroll to top`,backToFeed:`Back to Feed`,newListing:`Listing`,newListings:`Listings`,subscribeTitle:`Subscribe to unlock your feed`,subscribeDescription:`Your listing feed shows matches from saved searches in real time. Choose a plan to start monitoring marketplaces and get notified when new deals land.`,somethingWrong:`Something went wrong`,noListingsFound:`No listings found`,noListingsHint:`Try adjusting your filters or active searches.`,clearAllFilters:`Clear all filters`,retry:`Retry`,newListingsPill:`{count} New {label}`},chats:{title:`Chats`,loading:`Loading chatsâ¦`,searchPlaceholder:`Search conversationsâ¦`,searchAria:`Search conversations`,clearSearch:`Clear search`,clearSearchFilter:`Clear search filter`,loadFailed:`Couldn't load chats`,noMatchingChats:`No matching chats`,noMatchingDescription:`Try a different search term or clear the search to see all conversations.`,noChatsForSearch:`No chats for this search`,noChatsForSearchDescription:`When you message sellers about listings from this search, conversations will show up here.`,noConversationsYet:`No conversations yet`,noConversationsDescription:`When buyers message you about a listing, conversations will show up here.`},subscription:{choosePlanTitle:`Choose a plan to get started`,choosePlanDescription:`InstaSnag has three products and you can subscribe to any combination of them. Pick the ones you need â you can add the others later.`,scraperName:`Scraper`,scraperDescription:`Monitor marketplace listings and get alerted the moment a match appears.`,repostName:`Repost`,repostDescription:`Automatically relist your own listings to keep them visible.`,aiName:`AI Negotiator`,aiDescription:`Chat with sellers and let AI draft and negotiate replies for you.`},searchCard:{multipleLocations:`Multiple Locations`,active:`Active`,inactive:`Inactive`,standard:`Standard`,minScan:`{minutes}min scan`,searchActions:`Search actions`,chat:`Chat`,editSearch:`Edit search`,deleteSearch:`Delete search`,pauseSearch:`Pause search`,cannotActivate:`Cannot activate search`,activateSearch:`Activate search`,deleteTitle:`Delete this search?`,deleteConfirm:`Delete search`,deleteDescription:`This will permanently remove "{name}". This action cannot be undone.`,locationsCount:`+{count} locations`,foundCount:`{count} found`,editNotAvailable:`Editing this search type from the web is not available yet.`},notFound:{title:`Deal's gone â page too`,description:`The page you're looking for has already been snagged or moved to a new location. Don't let the competition get aheadâget back on track.`,tagline:`Marketplace Monitoring`},routeError:{title:`Something went wrong on our end`,description:`This page hit an unexpected error. Reloading usually fixes it. If it keeps happening, get in touch and we'll sort it out for you.`},verifyEmail:{verifying:`Verifying your emailâ¦`,verifyingHint:`This only takes a moment.`,success:`Email verified`,successSignedIn:`You're all set â your account is ready to use.`,successSignedOut:`Your account is ready. Sign in to get started.`,failed:`Verification failed`,goToSignIn:`Go to sign in`,missingToken:`This verification link is missing its token. Please open the link from your email again.`,genericFailure:`We couldn't verify this email. Please request a new verification link and try again.`,networkFailure:`We couldn't reach the server. Check your connection and open the link again.`,timeoutFailure:`Verification timed out. Please open the link again in a moment.`},auth:{welcomeBack:`Welcome Back`,signInSubtitle:`Sign in to continue your enterprise journey`,createAccount:`Create Account`,createAccountSubtitle:`Start finding deals before anyone else`,joinToday:`Join thousands of professionals today`,usernamePlaceholder:`Username`,emailAddress:`Email Address`,usernameOrEmailRequired:`Username or email is required`,signIn:`Sign in`,signingIn:`Signing inâ¦`,getStarted:`Get Started`,creatingAccount:`Creating accountâ¦`,usernameOrEmail:`Username or email`,password:`Password`,showPassword:`Show password`,hidePassword:`Hide password`,forgotPassword:`Forgot Password?`,forgotPasswordTitle:`Forgot password`,sendCode:`Send code`,verifyCode:`Verify code`,emailNotVerified:`Email Not Verified`,emailNotVerifiedDescription:`Your email is not verified. Please check your inbox or spam/junk folder.`,resend:`Resend`,unableToSignIn:`Unable to sign in. Please try again.`,passwordRequired:`Password is required`,identifierRequired:`Email or username is required`,claimIdentity:`Claim Your Identity`,finalStep:`Final Step`,completeSetup:`Complete Setup`,chooseUsername:`Choose your username`,secureUnique:`Secure & Unique`,usernameRules:`Usernames must be 3-20 characters and can include letters, numbers, underscores, or hyphens.`,termsOfService:`Terms of Service`,privacyPolicy:`Privacy Policy`,support:`Support`},download:{heroBadge:`Available on all your devices`,heroTitle:`Take InstaSnag`,heroTitleAccent:`Wherever You Go`,heroSubtitle:`Download our native mobile apps for on-the-go alerts, and install our powerful browser extension to fully integrate with Facebook Marketplace.`,iosTitle:`iOS App`,iosBody:`Real-time push notifications and a native browsing experience for iPhone and iPad.`,iosCta:`Download on App Store`,androidTitle:`Android App`,androidBody:`Instant deal alerts and powerful filtering tailored for Android devices.`,androidCta:`Get it on Google Play`,extensionBadge:`Power User`,extensionTitle:`Browser Extension`,extensionBody:`Connect directly to Facebook Marketplace to send and receive messages seamlessly from your dashboard.`,extensionCta:`Add to Browser`},footer:{description:`Multi-marketplace monitoring with a single dashboard and timely alertsâsee new listings that match your watches without juggling tabs all day.`,product:`Product`,resources:`Resources`,legal:`Legal`,helpCenter:`Help Center`,community:`Community`,privacyPolicy:`Privacy Policy`,termsOfService:`Terms of Service`,copyright:`© {year} InstaSnag. All rights reserved. Built for buyers and sellers who watch listings daily.`,ariaX:`InstaSnag on X`,ariaFacebook:`InstaSnag on Facebook`,ariaLinkedIn:`InstaSnag on LinkedIn`},home:{heroBadge:`Listing alerts across major marketplaces`,heroTitle:`Dominate Markets.`,heroTitleAccent:`Zero Delay.`,heroSubtitle:`InstaSnag watches the marketplaces you choose, gathers matching listings into a single dashboard, and sends alerts when something fits your saved searchesâso you spend less time refreshing and more time deciding what to pursue.`,viewPricing:`View pricing`,trialTerms:`Trial terms apply. Cancel anytime.`,downloadOnThe:`Download on the`,appStore:`App Store`,getItOn:`GET IT ON`,googlePlay:`Google Play`,trustLabel:`Monitor the retail and resale platforms buyers and sellers rely on every day`,platformEyebrow:`Platform`,platformTitle:`Watches, a dashboard, and alertsâwithout living inside five different sites.`,bentoCloudTitle:`Cloud-backed delivery`,bentoCloudBody:`Backgroun
13d checks keep your watches fresh, with rate limits that respect how marketplaces behaveâso your feed stays useful, not noisy.`,bentoSecurityTitle:`Security-minded by design`,bentoSecurityBody:`Sign-in, encryption, and sensible account controlsâyour watches and listing history stay with your login, not scattered across shared spreadsheets.`,bentoNotifyTitle:`Timely notifications`,bentoNotifyBody:`Route matches to the channels you already useâemail, push, or in-appâso you see updates when conditions you care about are met.`,bentoOpsTitle:`Operational visibility`,bentoOpsBody:`See what matched, when it matched, and what you already skimmedâso you can tune filters and trust the dashboard instead of re-checking the same listings.`,reliabilityBadge:`Reliability`,reliabilityTitle:`Built to run quietly in the background.`,reliabilityBody:`InstaSnag focuses on dependable monitoring workflowsâclear configuration, predictable behavior, and guardrails that help you stay organized as volume grows.`,reliabilityBullet1:`Thoughtful defaults for high-churn catalog environments`,reliabilityBullet2:`Separation of concerns between discovery, alerting, and review`,reliabilityBullet3:`Room to integrate with your existing tooling over time`,reliabilityImageAlt:`Laptop showing a professional monitoring dashboard for marketplace listing activity and reliability metrics in a workspace.`,speedBadge:`Speed`,speedTitle:`Know first. Act faster.`,speedBody:`InstaSnag keeps your watches active and sends near-instant alerts when matching listings appear, so you can review opportunities from your phone without constant manual refreshes.`,speedImageAlt:`InstaSnag phone lock screen with marketplace deal alerts, price drops, and new listing matches from multiple sources`,unifiedBadge:`Unified experience`,unifiedTitle:`One place to run your monitors.`,unifiedBody:`Configure watches, review matches, and manage settings from a single surfaceâon the web, in the app, or the browser extension, wherever you already work.`,seeFeatures:`See features`,unifiedImageAlt:`InstaSnag dashboard unifying watches and matches across multiple marketplaces`,processEyebrow:`The Process`,processTitle:`From setup to signal in`,processTitleAccent:`three steps`,processSubtitle:`Pick what you want to watch, connect how you want to be notified, then review matches as they land in your dashboard.`,step1Title:`Define what matters`,step1Body:`Capture the products, categories, and constraints you want to follow. Refine filters so alerts stay relevant as inventory changes.`,step2Title:`Connect & notify`,step2Body:`Link storefronts and choose your alert channelsâemail, push, or in-app. Your watches and history stay securely under your account.`,step3Title:`Review & act`,step3Body:`When something matches, you get a concise alert with full context. Open the source listing in one tap to secure the deal.`,compareTitle:`Stop fighting the`,compareTitleAccent:`chaos`,compareSubtitle:`Informal tooling is brittle, loud, and lives in scattered tabs. InstaSnag provides a single, professional surface to monitor everything you care about.`,adhocTitle:`Ad hoc monitoring`,adhocBody:`Works for a whileâuntil volume grows or someone is out of office.`,adhoc1:`Lists and tabs that are easy to lose track of`,adhoc2:`Alerts that overlap or get missed across inboxes`,adhoc3:`Harder to review history on a phone`,adhoc4:`Shared logins and unclear ownership of changes`,withTitle:`With InstaSnag`,withBody:`A consistent place to configure watches, scan matches, and manage settings.`,with1:`One dashboard for watches, matches, and activity`,with2:`Email, push, and in-app alerts you can tune over time`,with3:`Web, mobile app, and browser extension for day-to-day use`,with4:`Individual accounts with your history in one place`,compareFootnoteBefore:`Trial terms apply.`,compareFootnoteAfter:`when you are ready to compare plans.`,testimonialsEyebrow:`What customers say`,testimonialsTitle:`Less noise, faster decisions.`,t1Quote:`I replaced a patchwork of alerts with one workflow. My notifications are quieter because only meaningful matches surface.`,t1Author:`Marcus T.`,t1Role:`Private seller`,t2Quote:`I get visibility without living in spreadsheets. At the end of the week I can scroll the dashboard instead of guessing which tab I checked last.`,t2Author:`Sarah L.`,t2Role:`Furniture flipper`,t3Quote:`The product feels restrained in a good wayâfewer sharp edges than tools that promised everything and delivered chaos.`,t3Author:`David K.`,t3Role:`Electronics buyer`,pricingEyebrow:`Pricing Plans`,pricingTitle:`Scale your`,pricingTitleAccent:`advantage`,pricingSubtitle:`Plan limits below mirror your current subscription configuration.`,faqTitle:`Frequently asked questions`,faqPlatformsQ:`Which platforms and devices are supported?`,faqPlatformsA:`Use InstaSnag on the web, in our mobile app, and with supported browser tooling so you can tune watches and review matches where you already work. Connected marketplaces depen
13d on your plan and regionâcheck pricing for the list that applies to you.`,faqNotificationsQ:`How do notifications work?`,faqNotificationsA:`You choose how InstaSnag reaches youâin-product feeds, email, or mobile pushâso matches surface where you will actually see them, without duplicating noise across every inbox.`,faqPrivacyQ:`Is my activity only visible to me?`,faqPrivacyA:`Your saved searches, match history, and account settings stay under your login. InstaSnag does not expose your personal monitoring activity to other marketplace users.`,faqContractQ:`Is there a minimum contract?`,faqContractA:`Subscriptions renew on the billing cadence you choose. Start with a trial where available, cancel before renewal if it is not a fit, and review checkout terms for the plan you pickâno multi-year lock-in.`,finalBadge:`Limited trial availability`,finalTitle:`Ready to find your next`,finalTitleAccent:`big opportunity?`,finalBody:`Join hundreds of successful traders who use InstaSnag to monitor global marketplaces. Start your free trial today and never miss a deal again.`,cancelAnytime:`Cancel anytime`,instantSetup:`Instant setup`},features:{heroBadge:`Capabilities`,heroTitle:`Features built for the`,heroTitleAccent:`competitive edge.`,heroSubtitle:`InstaSnag isn't just a scraper. It's a comprehensive monitoring ecosystem designed to give you speed, organization, and automation where it matters most.`,monitoringBadge:`Real-Time`,monitoringTitle:`High-Frequency Monitoring`,monitoringDescription:`Alert speed that matches the competition. Run searches at intervals as fast as 1 minute.`,monitoringDetail1:`1, 3, 5, and 9-minute intervals`,monitoringDetail2:`Intelligent rate-limiting`,monitoringDetail3:`Background discovery engine`,monitoringDetail4:`Multi-marketplace coverage`,automationBadge:`Advanced`,automationTitle:`Workflow Automation`,automationDescription:`Reduce manual tasks with first-message automation, AI-powered listing analysis, and optional marketplace reposting.`,automationDetail1:`Automated first-message on Facebook`,automationDetail2:`AI add-on for listing sentiment`,automationDetail3:`Repost add-on for automated relisting`,automationDetail4:`Smart search refining`,automationDetail5:`Auto-refresh dashboards`,operationsBadge:`Unified`,operationsTitle:`Operational Dashboard`,operationsDescription:`A single professional surface to manage all your watches and review matches.`,operationsDetail1:`Unified search results feed`,operationsDetail2:`Historical match tracking`,operationsDetail3:`Performance metrics`,operationsDetail4:`Team visibility controls`,extendedTitle:`Professional Tools for`,extendedTitleAccent:`Enterprise-Grade`,extendedTitleAfter:`Performance`,crossPlatformTitle:`Cross-Platform App`,crossPlatformBody:`Manage your searches and get push notifications on iOS and Android devices.`,browserExtensionTitle:`Browser Extension`,browserExtensionBody:`Integrate directly into marketplace sites for seamless communication and outreach.`,secureTitle:`Secure Environment`,secureBody:`Enterprise-grade encryption and individual account controls for your data.`,inAppChatTitle:`In-App Chatting`,inAppChatBody:`Centralized communication with sellers directly within the InstaSnag ecosystem.`,customAlertsTitle:`Custom Alert Channels`,customAlertsBody:`Route notifications via Email, Push, or In-App feeds based on your preference.`,intelligentFilterTitle:`Intelligent Filtering`,intelligentFilterBody:`Advanced constraints to eliminate noise and surface only high-value opportunities.`,traditionalLabel:`Traditional Sourcing`,traditionalTitle:`The Noise of Manual Monitoring`,traditional1:`Multiple browser tabs constantly refreshing`,traditional2:`Scattered notifications across email and apps`,traditional3:`Brittle spreadsheets to track history`,traditional4:`Zero automation for outreach`,traditional5:`Easily missed opportunities in high-churn categories`,advantageLabel:`The InstaSnag Advantage`,advantageTitle:`Precision and Workflow Control`,advantage1:`One unified dashboard for all platforms`,advantage2:`Centralized alerts via preferred channels`,advantage3:`Historical data for better decisions`,advantage4:`Outreach automation, AI intelligence, and listing reposting`,advantage5:`Dominate markets with 1-minute intervals`,faqTitle:`Feature Deep-Dive`,faqIntervalsQ:`How do the different monitoring intervals work?`,faqIntervalsA:`Monitoring intervals determine how often InstaSnag checks for new listings. Higher-tier plans offer faster intervals (down to 1 minute), which is critical for highly competitive categories where listings are snatched up quickly.`,faqAutomationQ:`What kind of automation is included?`,faqAutomationA:`Our "Max" plan includes automated first-message capabilities for Facebook Marketplace via our browser extension. Plus and Max also support optional add-ons: AI negotiation assistance and automated reposting for personal listings on Facebook Marketplace.`,faqDevicesQ:`Can I use InstaSnag on multiple devices?`,faqDevicesA:`Yes! Your InstaSnag account syncs across our web dashboard, mobile application, and browser extension. You can configure searches on your desktop and receive instant alerts on your phone while on the go.`,ctaTitle:`Experience the`,ctaTitleAccent:`Power of Precision.`,ctaBody:`Unlock high-frequency monitoring and start dominating your marketplace niche today with our 7-day free trial.`,ctaStartTrial:`Start Free Trial`,ctaViewPlans:`View All Plans`},pricing:{heroBadge:`Pricing Plans`,heroTitle:`Scale your monitoring`,heroTitleAccent:`advantage.`,heroSubtitle:`Transparent pricing designed for professional marketplace operations. Start with a free trial and upgrade as your volume grows.`,compareTitle:`Compare everything.`,compareSubtitle:`A transparent breakdown of capabilities across all plan levels.`,capabilities:`Capabilities`,monthlyPrice:`Monthly Price`,trialPeriod:`Trial Period`,trialDays:`{days} Days`,searchesAtInterval:`Searches at {interval}-min checks`,automatedFirstMessage:`Automated first message`,prioritySupport:`Priority Support`,marketplaceChatting:`Marketplace chatting`,automatedRelisting:`Automated relisting`,aiNegotiator:`AI Negotiator`,repost:`Repost`,compareFootnote:`AI Negotiator and Repost are separate subscriptions â buy either on its own, or alongside any scraper plan.`,faq
13SupportBadge:`Support`,faqHeading:`Billing &`,faqHeadingAccent:`Common Questions.`,faqIntro:`Everything you need to know about our plans, billing, and trial policy. Can't find what you're looking for? Reach out to our team.`,faqBillingQ:`How does the billing cycle work?`,faqBillingA:`Subscriptions are billed monthly. You can start with a 7-day free trial on any plan to test the speed and reliability of our monitoring before being charged.`,faqCancellationQ:`Can I cancel my subscription anytime?`,faqCancellationA:`Yes. You cancel wherever you subscribed â on the web here, or in Google Play or the App Store if you subscribed in the app â and you keep access until the end of the current billing period. Your subscription works on every platform no matter where you bought it.`,faqUpgradeQ:`What happens when I upgrade or downgrade?`,faqUpgradeA:`Upgrades take effect immediately and the price difference is prorated for the remainder of your billing cycle. Downgrades take effect at the end of your current period, so you keep your current plan until then.`,faqProductsQ:`What else can I subscribe to?`,faqProductsA:`Alongside the scraper plans, AI Negotiator and Repost are separate subscriptions you can buy on their own or in any combination â they do not require a scraper plan. AI Negotiator adds marketplace chatting and AI-drafted replies; Repost automatically relists your own listings.`,faqSupportQ:`Do you offer enterprise-level support?`,faqSupportA:`Yes, both Plus and Max plans include priority support. Max plan users additionally receive a dedicated account manager for custom setup and monitoring optimization.`,ctaTitle:`Ready to dominate`,ctaTitleAccent:`your market?`,ctaBody:`Start your 7-day free trial today. No long-term contracts. Cancel or switch plans anytime.`,ctaStartTrial:`Start Free Trial`,contactSales:`Contact Sales`},contact:{heroBadge:`Connect With Us`,heroTitle:`Let's build your`,heroTitleAccent:`unfair advantage.`,heroSubtitle:`Whether you're a solo flipper or scaling a global resale enterprise, our experts are ready to help you optimize your monitoring workflow.`,
13supportTitle:`Global Support`,avgResponse:`Avg. response: < 4 hours`,officeTitle:`Main Office`,company:`9564-5602 Québec Inc.`,addressLine1:`9580 Blvd de l'Acadie`,addressLine2:`Suite 207`,city:`Montréal, QC`,postalCode:`H4N 1L8`,country:`Canada (CA)`,socialProof:`Joined by {count} professional buyers & sellers globally.`,socialProofCount:`2,500+`,formTitle:`Send a message`,formSubtitle:`Fill out the secure form below to start your inquiry.`,fullName:`Full Name`,fullNamePlaceholder:`Jane Cooper`,emailPlaceholder:`[email protected]`,companyOptional:`Company (Optional)`,companyPlaceholder:`Acme Trading Co.`,subject:`Subject`,subjectPlaceholder:`Enterprise Plan Inquiry`,message:`Message`,messageMinHint:`Min 10 characters`,messagePlaceholder:`Tell us about your monitoring needs or questions...`,submit:`Initiate Inquiry`,submitting:`Processing...`,validationFullName:`Please enter your full name.`,validationEmail:`Please enter a valid email.`,validationSubject:`Subject is too short.`,validationMessage:`Please provide a bit more detail (min 10 chars).`,successFallback:`We've received your inquiry. A marketplace specialist will be in touch shortly.`,errorRateLimited:`Too many submissions. Please wait a minute and try again.`,errorServer:`We couldn't send your message right now. Please try again later.`,errorNetwork:`Network error. Check your connection and try again.`,errorGeneric:`Something went wrong. Please try again.`,iosSubject:`iOS App â Early Access & Beta Testing`,iosMessage:`Hello InstaSnag team, 14 15I am interested in early access to the InstaSnag iOS app and would like to join the beta tester program when it becomes available. 16 17Thank you.`},plans:{productAria:`Product`,tabScraper:`Scraper`,tabRepost:`Repost`,tabAi:`AI Negotiator`,loading:`Loading plansâ¦`,loadError:`We couldn't load plans. Please try again shortly.`,empty:`No plans are available for this product right now.`,mostPopular:`Most Popular`,perMonth:`/month`,trialBadge:`{days}-day free trial`,startTrial:`Start {days}-day free trial`,subscribe:`Subscribe`,currentPlan:`Current plan`,scheduled:`Scheduled`,scheduledNote:`Switches to this plan at the end of your billing period.`,upgrade:`Upgrade`,downgrade:`Downgrade`,changePlan:`Change plan`,upgradeNote:`Applied immediately, with the unused time on your current plan prorated.`,downgradeNote:`Takes effect at the end of your current billing period.`,managedElsewhere:`Managed elsewhere`,subscribedVia:`Subscribed via {store}. Manage it there.`,managedOutsideWeb:`Managed outside the web app.`,opening:`Openingâ¦`,working:`Workingâ¦`,storeWeb:`the web`,storePlay:`Google Play`,storeAppStore:`the App Store`,storeAmazon:`Amazon`,storePromo:`a promotional grant`,featCloudMonitoring:`24/7 cloud monitoring`,featPriorityPush:`Priority push alerts on new matches`,featActiveSearches:`{count} active searches ⢠{interval} alerts`,featIntervalMin:`{minutes}-min`,featIntervalOneHour:`1-hr`,featIntervalHours:`{hours}-hr`,featIntervalHoursMinutes:`{hours}h {minutes}m`,featFbFirstMessage:`Automated Facebook first message`,featAiChat:`AI-powered chat on Facebook Marketplace`,featAutoNegotiate:`Automatic price negotiation`,featBuyerSellerMessaging:`Buyer & seller messaging`,featExtension:`Runs through the InstaSnag browser extension`,featAutoRepost:`Auto-repost your personal listings`,featTopOfSearch:`Stay at the top of Marketplace search`,featSetAndForget:`Set-and-forget repost scheduling`},settingsExtension:{mustStayRunningTitle:`Extension must stay running`,mustStayRunningBody:`Messaging, automated first messages for new listings, and marketplace sync all depend on a live extension connection. When the extension is offline or paused, new messages cannot be sent from InstaSnag and default outreach for incoming listings will not run until the extension is active again.`,connectionStatus:`Connection status`,lastSeen:`Last seen {time}`,setupHint:`Complete the setup steps below to connect your extension.`,connectedHint:`Your extension is connected. Keep it running to maintain messaging and automated outreach.`,refresh:`Refresh`,bridgeBlurb:`The InstaSnag browser extension links your account to Facebook Marketplace for messaging and sync. Additional marketplaces are planned.`,addToChrome:`Add to Chrome`,openChromeWebStore:`Open Chrome Web Store listing`,stepInstallTitle:`Install the extension`,stepInstallBody:`Add InstaSnag to your browser from the Chrome Web Store using the link below.`,
17stepSignInTitle:`Sign in`,stepSignInBody:`Open the extension popup and sign in with the same InstaSnag account you use here.`,stepConnectTitle:`Connect your account`,stepConnectBody:`Click Connect in the extension to link it with your InstaSnag account and grant the required permissions.`,stepKeepRunningTitle:`Keep it running`,stepKeepRunningBody:`Leave the extension active in the background. If it is paused or unreachable, you will not be able to send messages from InstaSnag, and automated first messages for new listings will not be sent until the extension is live again.`,stepVerifyTitle:`Verify the connection`,stepVerifyBody:`Once connected, your extension syncs automatically. You can always check the current status using the status pill in Chats or by refreshing this page.`,statusActive:`Active`,statusOffline:`Offline`,statusPaused:`Paused`,statusUnknown:`Unknown`,composerPaused:`Extension paused â resume to send`,composerOffline:`Extension offline â connect to send`,composerRequired:`Extension required to send`},settingsFavorites:{subscribeTitle:`Subscribe to view favorites`,subscribeBody:`Save listings from your feed and open them here anytime. An active plan is required to browse saved listings.`,viewSubscriptionPlans:`View subscription plans`,subscriptionRequired:`Active subscription required to view favorite listings.`,loadError:`Could not load favorite listings. Please try again.`,noMatchesTitle:`No matches`,noMatchesBody:`No favorites match your search.`,clearSearch:`Clear search`,emptyTitle:`No favorites yet`,emptyBody:`Tap the heart on any listing in your feed to save it here.`,goToFeed:`Go to feed`,resultCountOne:`{count} result`,resultCountOther:`{count} results`,backToFavorites:`Back to favorites`,searchPlaceholder:`Search favoritesâ¦`,searchAriaLabel:`Search favorites`,clearSearchAriaLabel:`Clear search`},settingsLinked:{google:`Google`,facebook:`Facebook`,accountEmail:`Account email`,linkedSuccess:`{provider} account linked successfully`,emailMismatchNote:`The linked account uses a different email than your InstaSnag profile.`,unableToStartLinking:`Unable to start account linking.`,loadErrorTitle:`Unable to load linked accounts`,unlinkWarning:`If you unlink your only sign-in method, set a password first so you don't lose access to your account.`,unlinkConfirm:`Unlink account`,keepConnected:`Keep connected`,unlinking:`Unlinking accountâ¦`,connected:`Connected`,notConnected:`Not connected`,unlink:`Unlink`,connectProvider:`Connect {name}`,linkingNotConfigured:`{name} linking is not configured for this app.`},settingsAiDelay:{infoBlurb:`Set how long the AI waits before automatically replying to inquiries. Current delay: {delay}.`,allowedRangeMinutes:`Allowed range: 1 to 1440 minutes`,allowedRangeHours:`Allowed range: 1 to 24 hours`,delayUnitAria:`Delay unit`,unitMinutes:`minutes`,unitHours:`hours`,customValueAria:`Custom delay value`,unitSuffixMin:`min`,unitSuffixHr:`hr`,rangeError:`Please check the allowed range.`,updatedTo:`AI reply delay updated to {delay}.`,saving:`Savingâ¦`,saveChanges:`Save changes`,hourOne:`{count} hour`,hourOther:`{count} hours`,minuteOne:`{count} minute`,minuteOther:`{count} minutes`},settingsMeetupLoc:{infoBlurb:`When buyers ask where to pick up an item, your AI agent shares the meetup location you assign here. Mark one location as default to auto-fill new listing and conversation AI settings.`,locationsSavedOne:`{count} location saved`,locationsSavedOther:`{count} locations saved`,noLocationsYet:`No meetup locations yet`,addLocation:`Add location`,loadingAria:`Loading meetup locations`,emptyTitle:`No meetup locations yet`,emptyBody:`Add at least one location so your AI agent can suggest where buyers can pick up items during negotiations.`,defaultBadge:`Default`,setAsDefault:`Set as default`,edit:`Edit`,delete:`Delete`,actionsFor:`Actions for {name}`,newLocation:`New location`,editLocation:`Edit location`,addMeetupLocation:`Add meetup location`,editMeetupLocation:`Edit meetup location`,placeName:`Place name`,placeNameHint:`Give this location a memorable name.`,placeNamePlaceholder:`e.g., Home, Office, Coffee Shop`,nameRequired:`Please enter a name.`,meetingLocation:`Meeting location`,meetingLocationHint:`Full address where you'll meet buyers.`,addressPlaceholder:`Enter your meetup address`,addressRequired:`Please enter an address.`,suggestions:`Suggestions`,setAsDefaultLocationAria:`Set as default location`,defaultLocation:`Default location`,defaultLocationHint:`Use this address by default for new listings and AI negotiations.`,saving:`Savingâ¦`,saveChanges:`Save changes`,duplicateError:`A meeting address with this name or location already exists.`,deleteTitle:`Delete meetup location?`,deleteWillRemove:`This will remove {name} from your saved locations.`,deleteWarning:`Listings or conversations using this address for AI negotiations may need a new meetup location assigned.`,deleting:`Deletingâ¦`,deleteLocation:`Delete location`},settingsMeetupTimes:{infoBlurb:`When buyers ask about pickup timing, your AI agent uses these weekly schedules. Mark one as default to auto-fill new listing and conversation AI settings.`,schedulesSavedOne:`{count} schedule saved`,schedulesSavedOther:`{count} schedules saved`,noProfilesYet:`No availability profiles yet`,addSchedule:`Add schedule`,loadingAria:`Loading availability profiles`,emptyTitle:`No availability profiles yet`,emptyBody:`Add at least one weekly schedule so your AI agent can suggest availability during negotiations.`,defaultBadge:`Default`,setAsDefault:`Set as default`,edit:`Edit`,delete:`Delete`,
17showTimeSlots:`Show time slots`,hideTimeSlots:`Hide time slots`,actionsFor:`Actions for {name}`,noTimeSlotsDefined:`No time slots defined.`,noTimeSlots:`No time slots`,slotsOneDayOne:`{count} slot · {day}`,slotsOneDayOther:`{count} slots · {day}`,slotsMultiDayOne:`{count} slot · {days} days`,slotsMultiDayOther:`{count} slots · {days} days`,dayMon:`Mon`,dayTue:`Tue`,dayWed:`Wed`,dayThu:`Thu`,dayFri:`Fri`,daySat:`Sat`,daySun:`Sun`,newSchedule:`New schedule`,editSchedule:`Edit schedule`,addAvailabilityProfile:`Add availability profile`,editAvailabilityProfile:`Edit availability profile`,scheduleName:`Schedule name`,scheduleNameHint:`e.g. Weekday evenings, Weekend mornings`,scheduleNamePlaceholder:`e.g. Work hours`,nameRequired:`Please enter a schedule name.`,setAsDefaultScheduleAria:`Set as default schedule`,defaultSchedule:`Default schedule`,defaultScheduleHint:`Use this schedule by default for new AI negotiations.`,addTimeSlots:`Add time slots`,addTimeSlotsHint:`Select days and a time range, then add them to this schedule.`,days:`Days`,startTime:`Start time`,endTime:`End time`,selectAtLeastOneDay:`Select at least one day.`,endAfterStart:`End time must be after start time.`,addTimeSlot:`Add time slot`,savedSlots:`Saved slots`,slotCountOne:`{count} slot`,slotCountOther:`{count} slots`,noTimeSlotsYet:`No time slots yet`,addSlotBeforeSaving:`Add at least one slot before saving.`,slotsRequired:`Add at least one time slot.`,removeDaySlot:`Remove {day} slot`,saving:`Savingâ¦`,saveChanges:`Save changes`,deleteTitle:`Delete availability profile?`,deleteWillRemove:`This will remove {name} and all of its time slots.`,deleteWarning:`Listings or conversations using this schedule for AI negotiations may need a new availability profile assigned.`,deleting:`Deletingâ¦`,deleteSchedule:`Delete schedule`},settingsSub:{productScraper:`Scraper`,productRepost:`Repost`,productAi:`AI Negotiator`,opening:`Openingâ¦`,manageBilling:`Manage billing`,confirming:`Confirmingâ¦`,openingCheckout:`Opening checkoutâ¦`,dismiss:`Dismiss`,portalError:`Couldn't open billing management. Please try again shortly.`,loading:`Loading your subscriptionâ¦`,loadError:`We couldn't load your subscription. Please try again shortly.`,storeManageHint:`Each subscription is cancelled or changed wherever it was purchased â only that store can act on it.`,plans:`Plans`,addNewPlan:`Add a new plan`,subscribedToEverything:`You're subscribed to everything InstaSnag offers.`,changesToOn:`Changes to {name} on {date}.`,changesToPeriodEnd:`Changes to {name} at the end of this billing period.`,statusCancelling:`Cancelling`,statusExpired:`Expired`,statusPaymentFailed:`Payment failed`,statusFreeTrial:`Free trial`,statusActive:`Active`,statusUnknown:`Unknown`,accessUntil:`Access until {date}`,ended:`Ended {date}`,priceMonthly:`{price}/month`,updatePaymentMethod:`Update your payment method to keep access.`,freeUntilThen:`Free until {date} · then {price}`,freeUntil:`Free until {date}`,renewsWithPrice:`{price} · Renews {date}`,renews:`Renews {date}`,percentOff:`{percent}% off`,percentOffUntil:`{percent}% off until {date}`,uiTrial:`Trial`,uiCancelsAtPeriodEnd:`Cancels at period end`,uiPaymentIssue:`Payment issue`,uiPlanChangeScheduled:`Plan change scheduled`,uiPlanChangePending:`Plan change pending`,manageOnGooglePlay:`Manage on Google Play`,manageInAppStore:`Manage in the App Store`,manageOnAmazon:`Manage on Amazon`,billedThroughGooglePlay:`Billed through Google Play`,billedThroughAppStore:`Billed through the App Store`,billedThroughAmazon:`Billed through Amazon`,billedOnWeb:`Billed on the web`,grantedByInstaSnag:`Granted by InstaSnag`,billedElsewhere:`Billed elsewhere`,addPlanTitle:`Add a plan`,addPlanSubtitleMulti:`Choose a product, then pick a plan`,addPlanSubtitleSingle:`Pick a plan`},feedFilters:{filters:`Filters`,reset:`Reset`,searchTitlePlaceholder:`Search title...`,sortResults:`Sort Results`,sortRecentlyFound:`Recently Found`,sortRecentlyListed:`Recently Listed`,sortPriceLowToHigh:`Price: Low to High`,sortPriceHighToLow:`Price: High to Low`,selectPlaceholder:`Select...`,activeSearches:`Active Searches`,instaSnagPicks:`InstaSnag Picks`,priceRange:`Price Range`,minPrice:`Min price`,maxPrice:`Max price`,yearRange:`Year Range`,minYear:`Min year`,maxYear:`Max year`,mileageRange:`Mileage Range`,minMileage:`Min mileage`,max
17Mileage:`Max mileage`,color:`Color`,interior:`Interior`,exterior:`Exterior`,radius:`Radius`,distanceInMiles:`Distance in miles`,distanceInKm:`Distance in km`,hasPhone:`Has Phone`,listingsWithPhoneNumbers:`Listings with phone numbers`,marketplace:`Marketplace`,transmissionType:`Transmission Type`,fuelType:`Fuel Type`,condition:`Condition`,applying:`Applying...`,applyFilterOne:`Apply {count} Filter`,applyFilterOther:`Apply {count} Filters`,applyChanges:`Apply Changes`,clearAllFilters:`Clear All Filters`,distanceUnit:`Distance unit`,distanceUnitHint:`Cards, mileage, and radius filter`,distanceUnitAria:`Distance unit`,kilometers:`Kilometers`,miles:`Miles`,invalidAmount:`Invalid amount`,maxPriceIs:`Max price is {max}`,minExceedsMaxPrice:`Min exceeds max price`,minExceedsMaxYear:`Min exceeds max year`,yearMustBe4Digits:`Year must be 4 digits`,minExceedsMaxMileage:`Min exceeds max mileage`,maxMileageIs:`Max mileage is {max}`,invalidRadius:`Invalid radius`,maxRadiusIs:`Max radius is {max}`,labelSemiAutomatic:`Semi-Automatic`,labelEbay:`eBay`,labelFacebook:`Facebook`},searchWizard:{back:`Back`,backToSearches:`Back to searches`,backToCategories:`Back to categories`,hideStepNav:`Hide step navigation`,showStepNav:`Show step navigation`,selectPlaceholder:`Select...`,searchPlaceholder:`Search...`,loadingEllipsis:`Loading...`,menuEmptyHint:`Nothing to show here yet. Try again in a moment.`,noSearchMatches:`No matches for your search.`,optional:`(optional)`,minPrice:`Min price`,maxPrice:`Max price`,minIntervalLabel:`{mins} min`,kmAway:`{distance} km away`,kmUnit:`{km}km`,choice:{titleCreate:`Create a search`,titleDuplicate:`Duplicate a search`,subtitleChoice:`Start with a blank setup or copy settings from one of your saved searches.`,subtitlePick:`Choose which search to use as a template. You'll enter a new name and location before saving.`,startFreshTitle:`Start a new search`,startFreshBody:`Pick a category or keyword search and configure everything from scratch.`,duplicateTitle:`Duplicate existing`,duplicateBody:`Copy filters, keywords, and scan settings from a saved search. Name and location are entered fresh.`,searchFilterPlaceholder:`Search by name, query, or cityâ¦`,loadError:`Could not load your searches. Try again.`,loadingSearches:`Loading your searchesâ¦`,noFilterMatch:`No searches match your filter.`,savedSearchesAria:`Saved searches`,continueWithDuplicate:`Continue with duplicate`,typeVehicle:`Vehicle`,typeQuery:`Query`,locationsCount:`{count} locations`,multipleLocations:`Multiple locations`},categoryPicker:{title:`Create a search`,subtitle:`Choose Anything for a broad alert, or pick a category to narrow results.`,loadingCategories:`Loading categoriesâ¦`,anythingTitle:`Anything`,anythingBody:`Monitor across categories with flexible criteria.`,categoriesHeading:`Categories`,noCategories:`No categories are available right now.`,loadCategoriesError:`Could not load categories.`,subcategoriesTitle:`Subcategories`,subcategoriesSubtitle:`Choose a subcategory. Search details will be configured in the next step.`,loadingSubcategories:`Loading subcategoriesâ¦`,noSubcategories:`No subcategories for this category.`,categoryNotFound:`Category not found.`,loadSubcategoriesError:`Could not load subcategories.`,missingCategory:`Missing category.`,signInAgain:`Please sign in again to continue.`},shell:{editTitle:`Edit Search`,duplicateTitle:`Duplicate Search`,anythingTitle:`Anything Search`,categoryTitle:`Category search`,editDescription:`Update your marketplace, area, filters, and scan frequency.`,duplicateDescription:`Copy filters and settings from a saved search. Enter a new name and location before saving.`,anythingCreateDescription:`Set keywords, marketplace, area, and how often this search runs.`,anythingEditDescription:`Update keywords, marketplace, area, and scan frequency.`,categoryDescription:`Configure this catalog search: name, area, and how often it runs.`,notVehicleSearch:`This search is not a vehicle search or cannot be edited here.`,notVehicleDuplicate:`This search is not a vehicle search or cannot be duplicated here.`,loadSearchError:`Could not load this
17search.`,loadingSearch:`Loading searchâ¦`,preparingDuplicate:`Preparing duplicateâ¦`,missingSearchId:`Missing search id.`,missingCategorySubcategory:`Missing category or subcategory.`,duplicateTypeUnavailable:`Duplicating this search type from the web is not available yet.`},steps:{details:`Details`,detailsDescription:`Name your search and set keywords.`,location:`Location`,locationDescription:`Choose country, city, and optional nearby areas.`,preferences:`Preferences`,preferencesDescription:`Scan frequency, price range, and filters.`,defaultMessage:`Default Message`,defaultMessageDescription:`Configure the optional first message for Facebook outreach.`},fields:{searchName:`Search name`,searchTerm:`Search term`,marketplace:`Marketplace`,category:`Category`,subcategory:`Subcategory`,primaryLocation:`Primary location`,includeKeywords:`Include keywords`,includeKeywordsHint:`Words or phrases that must appear in listings (optional).`,excludeKeywords:`Exclude keywords`,excludeKeywordsHint:`Words or phrases to filter out from results (optional).`,advancedKeywordFilters:`Advanced keyword filters`,optionalFiltersHint:`Optional filters to narrow results beyond your main search term.`,searchNamePlaceholder:`e.g. Vintage camera hunt`,searchTermPlaceholder:`e.g. Leica M6`,categoryNamePlaceholder:`e.g. Civic under 15k`,keywordChipPlaceholder:`Type a word or phrase, then Enter`,characterLimitReached:`Character limit reached`,maxKeywordsReached:`Maximum keywords reached`,optionalKeywordsHint:`Optional. Titles must match an include term (if any) and must not contain excluded terms.`,howKeywordsWorkTitle:`How this works`,howKeywordsWorkBody:`The monitor runs on your search term above. Include and exclude keywords apply only to listing titles: they help surface closer matches and filter out unrelated results (for example generic parts listings or off-topic phrases) without changing the primary query the system executes.`,excludeKeywordPlaceholder:`e.g. parts, broken â then Enter`},stepLabel:`Step {step}`,categorySearchTitle:`{category} search`,catalogPrefsHint:`Set your search area, scan frequency, and optional filters for this category.`,vehicle:{chooseMakes:`Choose makes`,chooseModels:`Choose models`,selectAny:`Select Any`,selectAll:`Select All`,clearAll:`Clear All`,anyModelHelp:`Any model includes every model for that make in search results.`},location:{country:`Country`,city:`City`,loadingCountries:`Loading countriesâ¦`,loadingCities:`Loading citiesâ¦`,noCountries:`No countries are available for this marketplace.`,noCities:`No cities are available for this area.`,selectCity:`Select a city`,selectCountryFirst:`Select a country first`,selectCountry:`Please select a country.`,selectCityError:`Please select a city.`,radiusKm:`Radius (KM)`,clearRadius:`Clear radius`,radiusError:`Choose a radius from the list, or clear your selection.`,nearbyTitle:`Nearby locations (Max {max})`,nearbyBody:`One very large radius can dilute results. Adding nearby locations splits coverage into several smaller areas around your city, which usually improves how well listings are found. Each location you enable uses an additional active search from your plan. You can set how often each location is scanned on the next step.`,nearbyBodyAreas:`several smaller areas`,nearbyBodyAdditional:`additional active search`,nearbyBodyScanFrequency:`how often each location is scanned`},preferences:{scanFrequency:`Scan frequency`,clearAll:`Clear all`,scanFrequencyHint:`Pick a scan speed for every spot you enabled. In each menu, the numbers on the right are how many runs you still have at that speed after what you have already chosen, out of your plan limit for that tier.`,scanFrequencyHintBold:`how many runs you still have at that speed after what you have already chosen`,selectScanFrequency:`Select scan frequency`,selectScanFrequencyError:`Please select a scan frequency for this location.`,priceRangeOptional:`Price range (optional)`,includeUnpriced:`Include Unpriced`,includeUnpricedDescription:`Include listings with missing price data.`},defaultMessage:{title:`Default Message`,description:`Configure the optional first message for Facebook outreach.`,enableAutoReply:`Enable Auto-Reply`,enableAutoReplyDescription:`Send an immediate message to the seller upon match.`,placeholder:`Hi, is this still available?`},extensionBanner:{title:`Browser extension offline`,body:`Automated first messages will not be sent while your extension is disconnected. Turn the extension back on before relying on this setting.`,settingsLink:`Open extension settings for setup help`},marketplace:{selectMarketplace:`Select marketplace`,comingSoon:`Coming soon`,vehicleSearch:`Vehicle search`,autotraderVehicleOnly:`AutoTrader is for vehicle inventory.`,useCategoryOrVehicle:`Use a category or vehicle search`,selectMarketplaceError:`Select a marketplace`},actions:{saveChanges:`Save changes`,saveDuplicated:`Save duplicated search`,saveSearch:`Save Search`,saveSearchDeployed:`Search Agent Deployed.`,searchDuplicated:`Search duplicated.`,searchUpdated:`Search updated.`,updateFailed:`Update failed.`,deploymentFailed:`Deployment failed.`,onlyAnythingEditable:`Only Anything (keyword) searches can be edited here for now.`,marketplaceNotSupported:`This marketplace is not supported in the web editor yet.`,locationResolveError:`Could not resolve this search's location.`,searchStillLoading:`Search is still loading. Try again in a moment.`,catalogSaveUnavailable:`Saving non-vehicle catalog searches from the web is not available yet.`,chooseMarketplaceAndFrequency:`Choose a marketplace and scan frequency before saving.`},validation:{searchNameRequired:`Search name is required`,searchNameMax:`Search name must be {max} characters or less`,searchTermRequired:`Search term is required`,searchTermMin:`Search term must be at least {min} characters`,searchTermMax:`Search term must be {max} characters or less`,keywordsMaxTotal:`Keywords cannot exceed {max} characters total.`,keywordsMaxTotalTyping:`Keywords cannot exceed {max} characters total (including what you are typing).`,keywordPressEnter:`Press Enter to add this keyword, or clear the field.`,validNumber:`Please enter a valid number`,priceNegative:`Price cannot be negative`,priceRangeInvalid:`Max price must be greater than or equal to min price`,defaultMessageRequired:`Enter a default message or turn this option off`,defaultMessageMaxLines:`Message must be {max} lines or fewer`,defaultMessageMaxChars:`Message must be {max} characters or less`,quotaNeedSlots:`Quota for {interval} min: you need {count} search slots but only {remaining} remain for that interval. Reduce extra locations, change their scan frequencies, or upgrade.`,quotaLimitReached:`Quota limit reached for {interval}
17 min interval. Pick another frequency or upgrade your plan.`,selectMarketplace:`Select a marketplace.`,selectMake:`Select at least one make.`,selectModelPerMake:`For each make, pick models or Any model for that make.`,required:`Required`,invalidChoice:`Invalid choice`,selectMakeError:`Select makes`,selectMakesFirst:`Select makes first`,model:`Model`,selectModel:`Select model`,loadMakesError:`Could not load makes.`,loadModelsError:`Could not load some models.`,makes:`Makes`,models:`Models`,anyMake:`Any make`,anyModel:`Any model`,searchMakes:`Search makesâ¦`,searchModels:`Search models or makesâ¦`,minYear:`Min year`,maxYear:`Max year`,minMileage:`Min mileage`,maxMileage:`Max mileage`,transmission:`Transmission`,fuelType:`Fuel type`,automatic:`Automatic`,manual:`Manual`,semiAutomatic:`Semi-Automatic`,diesel:`Diesel`,electric:`Electric`,flexFuel:`Flex Fuel`,gasoline:`Gasoline`,hybrid:`Hybrid`,hydrogen:`Hydrogen`,plugInHybrid:`Plug-in Hybrid`,defaultCategory:`Default`,passengerVehicles:`Passenger vehicles`},locationLoad:{timeout:`This request took too long. Check your connection and try again.`,network:`We couldn't reach the server. Check your internet connection and try again.`,sessionExpired:`Your session may have expired. Sign in again, then reopen this list.`,forbidden:`You don't have permission to load this list. Try again or contact support if it continues.`,notAvailable:`This list isn't available right now. Try again in a moment.`,rateLimited:`Too many requests were sent. Please wait a short time and try again.`,badRequest:`The request couldn't be completed. Check your choices and try again.`,serverError:`The service is temporarily unavailable. Please try again in a few minutes.`,generic:`Something went wrong while loading this list. Please try again.`}},permissionToast:{subscriptionHint:`Open Subscription in Settings to review your options.`,searchCreateSubscription:`Cannot create searches right now`,searchCreateSubscriptionDesc:`Your subscription is inactive or has ended. Subscribe or renew to add new searches.`,searchCreateQuota:`Search limit reached`,searchCreateQuotaDesc:`You've used all search slots on your current plan. Delete an existing search, pause one, or upgrade to add more.`,searchEditSubscription:`Cannot edit searches right now`,searchEditSubscriptionDesc:`Editing saved searches requires an active subscription. Renew your plan to update search settings.`,searchActivateSubscription:`Cannot turn on search`,searchActivateSubscriptionDesc:`An active subscription is required to resume monitoring. Renew your plan to activate this search.`,searchActivateQuota:`Cannot turn on search`,searchActivateQuotaDesc:`You've reached your plan's search limit. Pause another search or upgrade your plan to activate this one.`,chatSubscription:`Chats not available`,chatSubscriptionDesc:`An active subscription is required for chats and My Listings.`,chatPlan:`Chats not included on your plan`,chatPlanDesc:`Your current plan does not include in-app chatting. Upgrade to a plan with chatting enabled.`,aiAddonRequired:`AI negotiation add-on required`,aiAddonRequiredDesc:`Enable the AI Negotiation add-on to use AI settings and negotiation features.`,aiSubscription:`AI features not available`,aiSubscriptionDesc:`An active subscription is required for AI negotiation. Renew your plan to continue.`,repostAddonRequired:`Repost add-on required`,repostAddonRequiredDesc:`Enable the Repost add-on to configure automated relisting for personal listings.`,repostSubscription:`Repost not available`,repostSubscriptionDesc:`An active subscription is required for repost features. Renew your plan to continue.`,generic:`This action isn't available right now`,genericDesc:`Check your subscription status and plan limits.`},searchActionToast:{activateTitle:`Could not turn on search`,deactivateTitle:`Could not pause search`,deleteTitle:`Could not delete search`,timeoutDesc:`That took longer than expected. Check your connection and try again.`,networkDesc:`We could not reach our servers. Check your internet connection and try again.`,genericError:`Something went wrong. Please try again.`,sessionExpired:`Your session has expired or you are signed out. Sign in again, then try once more.`,usageLimitDefault:`You have reached the maximum number of active searches allowed for that scan frequency on your plan. Pause another search or upgrade to continue.`,frequencyNotInPlan:`That scan frequency is not included on your current plan. Choose a different frequency or upgrade your subscription.`,noActiveSubscription:`An active subscription is required to turn on searches.`,usageLimitReached:`You have reached the maximum number of active searches for that scan frequency. Pause another search or upgrade your plan to continue.`,cannotActivatePlan:`This search cannot be turned on with your current plan. Pause another search or review your subscription.`,emailNotVerified:`Verify your email address using the link we sent you, then try again.`,subscriptionRequired:`An active subscription is required. Review your plan on the pricing page.`,notAllowed:`You are not allowed to perform this action with your current account. Contact support if you need help.`,searchNotFound:`This search is no longer available. Refresh the page to see your current searches.`,waitTitle:`Please wait a moment`,rateLimited:`You have sent several updates in a short time. Wait a minute, then try again.`,serverError:`We are having a temporary problem on our side. Please try again shortly.`,inactiveAccount:`This account is inactive. Contact support if you need your account restored.`,process
17Failed:`We could not process that request. Refresh the page and try again.`,tryAgainSoon:`Something went wrong. Please try again in a few seconds.`},listingOverlay:{back:`Back`,phone:`Phone`,primaryPhone:`Primary Phone`,textSms:`Text / SMS`,fromDescription:`From Description ({count})`,viewListing:`View listing`,viewOnProvider:`View on {provider}`,provider:`Provider`,invalidListing:`Invalid Listing`,brokenLink:`The link you followed seems to be broken.`,loadError:`Something went wrong while loading this listing.`,notFound:`Listing not found.`,mightBeRemoved:`This listing might have been removed.`,goBack:`Go Back`,specifications:`Specifications`,year:`Year`,mileage:`Mileage`,transmission:`Transmission`,fuel:`Fuel`,exterior:`Exterior`,interior:`Interior`,condition:`Condition`,aiMarketAnalysis:`AI Market Analysis`,estimatedMarketValue:`Estimated Market Value`,comparables:`Comparables`,foundCount:`{count} found`,marketRange:`Market Range`,description:`Description`,showLess:`Show less`,showMore:`Show more`,saved:`Saved`,saveListing:`Save Listing`,chatWithSeller:`Chat with seller`,openingChat:`Opening chatâ¦`,linkUnavailable:`Link unavailable`,resync:`Resync`,seller:`Seller`,contactNumbers:`Contact Numbers`,listed:`Listed`,found:`Found`,similarListings:`Similar Listings`,similarSubtitle:`Other vehicles that match this profile.`,noSimilar:`No similar listings found.`,share:`Share`,linkCopied:`Link copied`,shareCopied:`Share link copied to clipboard.`,shareCopiedExpires:`Share link copied. Expires {date}.`,invalidListingId:`Invalid listing`,subscriptionRequired:`Subscription required to view listings.`,couldNotLoad:`Could not load this listing.`,listingNotFoundChat:`This listing could not be found.`,signInAgainChat:`Please sign in again to start a chat.`,chatUnavailable:`Unable to start a chat right now. Please try again.`,chatStartFailed:`Something went wrong while starting the chat.`,shareListingAria:`Share listing`,resyncListingAria:`Resync listing from marketplace`,sold:`Sold`,pending:`Pending`,unavailable:`Unavailable`},chatsExtra:{couldntLoadConversation:`Couldn't load conversation`,inboxReadyTitle:`Your inbox is ready`,inboxReadyBody:`Pick a conversation from the list to read messages and reply to buyers.`,backToChatList:`Back to chat list`,viewListingDetails:`View listing details`,listingUnavailable:`Listing unavailable`,aiOn:`AI on`,openAiNegotiationSettings:`Open AI negotiation settings`,aiNegotiationSettings:`AI negotiation settings`,noMessagesYet:`No messages yet`,sendFirstMessage:`Send the first message to {name} and start the conversation.`,extensionTooltip:`The InstaSnag browser extension links your account to Facebook Marketplace for messaging. Keep it running in the background for real-time sync and automatic replies.`,readMore:`Read more`,aiNegotiationEnabled:`AI negotiation enabled`,needsAttention:`Needs attention`,unreadOne:`{count} unread message`,unreadOther:`{count} unread messages`},legalDoc:{effective:`Effective {date}`,lastUpdated:`Last updated {date}`,seeAlso:`See also:`,contact:`Contact:`,email:`Email:`,privacy:`Privacy:`,privacyContact:`Privacy contact`,legalContact:`InstaSnag legal contact`}},fr:{common:{account:`Compte`,close:`Fermer`,email:`Courriel`,logout:`Déconnexion`,signOut:`Se déconnecter`,goBack:`Retour`,settings:`Paramètres`,username:`Nom d'utilisateur`,verified:`Vérifié`,notVerified:`Non vérifié`,loadingSettings:`Chargement des paramètresâ¦`,loadMore:`Charger plus`,loadingMore:`Chargementâ¦`,tryAgain:`Réessayer`,cancel:`Annuler`,continue:`Continuer`,reload:`Recharger la page`,loading:`Chargementâ¦`,never:`Jamais`,notAvailable:`N/D`,untitledListing:`Annonce sans titre`,listing:`Annonce`,viewPlans:`Voir les forfaits`,seePlans:`Voir les forfaits`,createNewSearch:`Créer une recherche`,upgradeToAddSearch:`Mettre à niveau pour ajouter une recherche`,upgradeToAddListing:`Mettre à niveau pour ajouter une annonce`,addNew:`Ajouter`,backToHome:`Retour à l'accueil`,exploreFeatures:`Découvrir les fonctionnalités`,contactSupport:`Contacter l'assistance`,openMenu:`Ouvrir le menu`,closeMenu:`Fermer le menu`,mobileNavigation:`Navigation mobile`,mainNav:`Principal`,signIn:`Se connecter`,startFreeTrial:`Essai gratuit`,dashboard:`Tableau de bord`},nav:{home:`Accueil`,searches:`Recherches`,feed:`Fil`,myListings:`Mes annonces`,chats:`Discussions`,mainMenu:`Menu principal`,dashboardAria:`Tableau de bord`,features:`Fonctionnalités`,download:`Télécharger`,pricing:`Tarifs`,contact:`Contact`},language:{title:`Langue`,description:`Choisissez la langue d'affichage d'InstaSnag sur cet appareil.`,english:`English`,french:`Français`,system:`Système`,systemDescription:`Suit la langue du navigateur`,englishDescription:`Utiliser l'anglais partout dans l'application`,frenchDescription:`Utiliser le français partout dans l'application`,groupLabel:`Langue de l'application`,switch:`Changer de langue`},theme:{title:`Thème de couleur`,groupLabel:`Thème de couleur`,light:`Clair`,dark:`Sombre`,system:`Système`,lightDescription:`Arrière-plan clair dans toute l'application`,darkDescription:`Arrière-plan sombre dans toute l'application`,systemDescription:`Suit votre appareil ({mode} maintenant)`,lightNow:`clair`,darkNow:`sombre`,lightMode:`Mode clair`,darkMode:`Mode sombre`,switchToLight:`Passer au mode clair`,switchToDark:`Passer au mode sombre`}
17,settings:{title:`Paramètres`,subtitle:`Gérez votre compte et vos préférences`,sectionsAria:`Sections des paramètres`,navAria:`Navigation des paramètres`,appearanceTitle:`Apparence`,appearanceDescription:`Thème, langue et options d'affichage.`,nav:{account:`Compte`,plan:`Forfait`,activity:`Activité`,preferences:`Préférences`,connectivity:`Connectivité`,ai:`IA`,information:`Information`,profile:`Profil`,profileDescription:`Votre identité publique et vos coordonnées`,linkedAccounts:`Comptes liés`,linkedAccountsDescription:`Google, Facebook et autres méthodes de connexion`,subscription:`Abonnement`,subscriptionDescription:`Forfait, facturation et limites d'utilisation`,favorites:`Annonces favorites`,favoritesDescription:`Annonces enregistrées depuis votre fil`,appearance:`Apparence`,appearanceDescription:`Thème, langue et options d'affichage`,extension:`Extension de navigateur`,extensionDescription:`Pont de messagerie Facebook Marketplace`,aiReplyDelay:`Délai de réponse IA`,aiReplyDelayDescription:`Temps d'attente avant les réponses automatiques de l'IA`,meetupLocations:`Lieux de rencontre`,meetupLocationsDescription:`Lieux de retrait pour les négociations avec les acheteurs`,availabilityTimes:`Disponibilités`,availabilityTimesDescription:`Disponibilité hebdomadaire pour la coordination IA`,legal:`Mentions légales et assistance`,legalDescription:`Confidentialité, conditions et contact`},profile:{title:`Profil`,description:`Votre identité de compte sur InstaSnag. Contactez l'assistance si vous devez modifier ces informations.`,memberSince:`Membre depuis`,timeZone:`Fuseau horaire`,localDeviceTime:`Heure locale de l'appareil`},linkedAccounts:{title:`Comptes liés`,description:`Connectez Google ou Facebook pour vous connecter sans mot de passe. Votre courriel InstaSnag reste votre identité principale.`,primaryEmail:`Courriel principal`,primaryEmailDescription:`Il s'agit du courriel de votre profil InstaSnag. Les fournisseurs liés peuvent utiliser une autre adresse.`,signInProviders:`Fournisseurs de connexion`,signInProvidersDescription:`Liez ou dissociez les comptes tiers utilisés pour accéder à InstaSnag.`,googleDescription:`Utilisez votre compte Google pour vous connecter rapidement et en toute sécurité.`,facebookDescription:`Utilisez votre compte Facebook comme méthode de connexion supplémentaire.`,unlinkTitle:`Dissocier {provider} ?`,unlinkDescription:`Vous ne pourrez plus vous connecter avec {provider}. Vous pourrez le reconnecter à tout moment.`},security:{title:`Sécurité`,description:`Gérez votre mot de passe, vos options de connexion et la suppression du compte.`,password:`Mot de passe`,signInMethods:`Méthodes de connexion`,signInMethodsDescription:`Comment vous pouvez accéder à votre compte InstaSnag.`,deleteAccount:`Supprimer le compte`,deleteAccountDescription:`Supprimez définitivement votre compte et les données associées.`},subscription:{title:`Abonnement`,description:`Vos forfaits et votre facturation.`},favorites:{title:`Annonces favorites`,description:`Annonces enregistrées depuis votre fil.`},extension:{title:`Extension de navigateur`,description:`Connectez l'extension InstaSnag pour envoyer et recevoir des messages Facebook Marketplace depuis votre tableau de bord.`,setupGuide:`Guide d'installation`,setupGuideDescription:`Suivez ces étapes pour installer, connecter et maintenir votre extension.`},aiReplyDelay:{title:`Délai de réponse IA`,description:`Contrôlez le délai d'attente de l'IA avant l'envoi de réponses automatiques aux acheteurs.`,presetDurations:`Durées prédéfinies`,customDelay:`Délai personnalisé`},meetupLocations:{title:`Lieux de rencontre`,description:`Ajoutez des lieux de rencontre par défaut que votre agent IA peut proposer lors des négociations.`,savedLocations:`Lieux enregistrés`},meetupTimes:{title:`Disponibilités`,description:`Définissez vos disponibilités pour que votre agent IA coordonne les rencontres avec les acheteurs.`,savedSchedules:`Horaires enregistrés`},legal:{title:`Mentions légales et assistance`,description:`Politiques, conditions et moyens de contacter notre équipe.`,privacy:`Politique de confidentialité`,privacyDescription:`Comment nous collectons et protégeons vos données`,terms:`Conditions d'utilisation`,termsDescription:`Règles d'utilisation d'InstaSnag`,contact:`Contacter l'assistance`,contactDescription:`Questions, aide à la facturation ou commentaires`},placeholder:{badge:`Aperçu de l'interface`,title:`Contenu à venir`,description:`La section {section} sera connectée à l'API lors d'une prochaine étape. La navigation et la mise en page sont prêtes.`}},time:{justNow:`à l'instant`,minutesAgo:`Il y a {count} min`,hoursAgo:`Il y a {count} h`}
17,errors:{timeout:`La requête a expiré. Veuillez réessayer.`,network:`Impossible de joindre le serveur. Vérifiez votre connexion.`,subscriptionRequired:`Un abonnement actif est requis pour voir les recherches.`,rateLimited:`Trop de requêtes. Attendez un moment et réessayez.`,serverUnavailable:`Le serveur est temporairement indisponible.`,loadSearches:`Impossible de charger les recherches.`,loadDashboard:`Ãchec du chargement du tableau de bord`,subscriptionRequiredListings:`Un abonnement est requis pour voir les annonces.`,loadFeed:`Ãchec du chargement du fil. Veuillez réessayer.`,loadFeedMore:`Impossible de charger plus d'annonces. Réessayez.`,networkShort:`Erreur réseau. Vérifiez votre connexion.`,networkRetry:`Erreur réseau. Réessayez.`,signInAgain:`Veuillez vous reconnecter pour voir vos annonces.`,noSellerAccess:`Votre forfait actuel ne donne pas accès aux annonces vendeur.`,listingsUnavailable:`Les annonces sont temporairement indisponibles. Veuillez réessayer.`,loadListingsFailed:`Une erreur s'est produite lors du chargement de vos annonces.`,listingsSlow:`Le chargement de vos annonces prend trop de temps.`,networkRetryListings:`Impossible de joindre le serveur. Vérifiez votre connexion et réessayez.`,chatsSlow:`Le chargement des conversations prend trop de temps.`,chatsUnavailable:`Les discussions sont temporairement indisponibles. Veuillez réessayer.`,chattingNotAvailable:`La messagerie n'est pas disponible avec votre forfait actuel.`,signInAgainChats:`Veuillez vous reconnecter pour voir vos discussions.`,conversationNotFound:`Cette conversation est introuvable.`,loadConversations:`Une erreur s'est produite lors du chargement des conversations.`,conversationSlow:`Le chargement de cette conversation prend trop de temps.`,signInAgainChatDetail:`Veuillez vous reconnecter pour voir cette discussion.`,conversationUnavailable:`Cette conversation est temporairement indisponible. Veuillez réessayer.`,signInAgainSend:`Veuillez vous reconnecter pour envoyer des messages.`,messagingNotAvailable:`La messagerie n'est pas disponible avec votre forfait actuel.`,messagingNotAvailableListing:`La messagerie n'est pas disponible pour cette annonce.`,messagingNotAvailableConversation:`La messagerie n'est pas disponible pour cette conversation.`,sendSlow:`L'envoi prend trop de temps. Veuillez réessayer.`,sendFailed:`Ãchec de l'envoi du message. Veuillez réessayer.`},dashboard:{title:`Tableau de bord`,welcomeBack:`Bon retour, {username}. Voici ce qui se passe.`,activeSearches:`Recherches actives`,activeVsTotal:`Actives / total`,everyMinutes:`Toutes les {count} min`,tierFallback:`Palier {n}`,searchesRemaining:`Recherches restantes`,capacityUsed:`Capacité utilisée`,listingsThisWeek:`Annonces cette semaine`,vsLastWeek:`Vs semaine dernière`,listingsToday:`Annonces aujourd'hui`,vsYesterday:`Vs hier`,recentListings:`Annonces récentes`,viewAllFeed:`Voir tout le fil`,noListingsYet:`Aucune annonce trouvée`,noRecentListings:`Aucune annonce récente`,noListingsNoSearchesDescription:`Vous n'avez pas encore créé de recherche. Ouvrez la page Recherches pour configurer la première et trouver des bonnes affaires.`,noListingsWithSearchesDescription:`Vos recherches enregistrées fonctionnent, mais rien de nouveau n'est arrivé ici. Ouvrez le fil pour voir les correspondances en direct, ou revenez bientôt.`,goToSearches:`Aller aux recherches`,viewFeed:`Voir le fil`,viewListingDetails:`Voir les détails de l'annonce`,openOnMarketplace:`Ouvrir sur la place de marché`,subscriptionTitle:`Abonnement`,noActiveSubscription:`Aucun abonnement actif`,noSubscription:`Aucun abonnement`,currentPlan:`Forfait actuel`,activePlan:`Forfait actif`,nextBilling:`Prochaine facturation :`,upgradeSubscription:`Mettre à niveau l'abonnement`,upgradeToPro:`Passer à Pro`,manageSubscription:`Gérer l'abonnement`,serviceLimits:`Limites du service`,recentSearches:`Recherches récentes`,manageAll:`Tout gérer`,noSearchesYet:`Aucune recherche`,noSearchesDescription:`Vous n'avez pas encore créé de recherche. Ouvrez la page Recherches pour configurer la première et surveiller les places de marché.`,backToDashboard:`Retour au tableau de bord`},searches:{title:`Recherches`,savedCountOne:`{count} recherche enregistrée`,savedCountMany:`{count} recherches enregistrées`,loading:`Chargement des recherchesâ¦`,noSearchesYet:`Aucune recherche`,noSearchesDescription:`Commencez avec l'assistant de catégorie pour définir mots-clés, lieux et alertes. Vos recherches enregistrées apparaîtront ici.`,subscribeToCreate:`Abonnez-vous pour créer des recherches`,subscribeDescription:`Un forfait actif avec de la capacité disponible est requis pour ajouter des recherches. Mettez à niveau ou gérez votre abonnement pour continuer.`},listings:{title:`Mes annonces`,loading:`Chargement de vos annoncesâ¦`,listingSynced:`{count} annonce synchronisée pour les outils vendeur`,listingsSynced:`{count} annonces synchronisées pour les outils vendeur`,greetingAddFirst:`Bonjour {name}. Ajoutez votre première annonce sur la place de marché.`,noListingsYet:`Aucune annonce`,emptyCanAdd:`Ajoutez une annonce Facebook Marketplace â collez l'URL ou l'identifiant depuis la page de l'annonce.`,emptyUpgrade:`Mettez à niveau votre forfait pour synchroniser des annonces et gérer les outils vendeur sur le web.`,deletedToast:`« {title} » a été supprimée.`,addedToast:`« {title} » a été ajoutée avec succès.`,backToMyListings:`Retour à mes annonces`},feed:{loading:`Chargement des annoncesâ¦`,listingsFound:`{count} annonces trouvées`,grid:`Grille`,list:`Liste`,filters:`Filtres`,subscriptionRequired:`Un abonnement est requis pour voir les annonces.`,viewSubscriptionPlans:`Voir les forfaits`,scrollToTop:`Remonter en haut`,backToFeed:`Retour au fil`,newListing:`Annonce`,newListings:`Annonces`,subscribeTitle:`Abonnez-vous pour débloquer votre fil`,subscribeDescription:`Votre fil affiche en temps réel les correspondances de vos recherches enregistrées. Choisissez un forfait pour surveiller les places de marché et être alerté des nouvelles affaires.`,somethingWrong:`Une erreur s'est produite`,noListingsFound:`Aucune annonce trouvée`,noListingsHint:`Essayez d'ajuster vos filtres ou vos recherches actives.`,clearAllFilters:`Effacer tous les filtres`,retry:`Réessayer`,newListingsPill:`{count} nouvelle(s) {label}`},chats:{title:`Discussions`,loading:`Chargement des discussionsâ¦`,searchPlaceholder:`Rechercher des conversationsâ¦`,searchAria:`Rechercher des conversations`,clearSearch:`Effacer la recherche`,clearSearchFilter:`Effacer le filtre de recherche`,loadFailed:`Impossible de charger les discussions`,noMatchingChats:`Aucune discussion correspondante`,noMatchingDescription:`Essayez un autre terme de recherche ou effacez la recherche pour voir toutes les conversations.`,noChatsForSearch:`Aucune discussion pour cette recherche`,noChatsForSearchDescription:`Lorsque vous contactez des vendeurs pour des annonces de cette recherche, les conversations apparaîtront ici.`,noConversationsYet:`Aucune conversation`,noConversationsDescription:`Lorsque des acheteurs vous écrivent au sujet d'une annonce, les conversations apparaîtront ici.`},subscription:{choosePlanTitle:`Choisissez un forfait pour commencer`,choosePlanDescription:`InstaSnag propose trois produits et vous pouvez vous abonner à n'importe quelle combinaison. Choisissez ce dont vous avez besoin â vous pourrez en ajouter d'autres plus tard.`,scraperName:`Scraper`,scraperDescription:`Surveillez les annonces et recevez une alerte dès qu'une correspondance apparaît.`,repostName:`Repost`,repostDescription:`Republiez automatiquement vos annonces pour rester visible.`,aiName:`Négociateur IA`,aiDescription:`Discutez avec les vendeurs et laissez l'IA rédiger et négocier les réponses.`},searchCard:{multipleLocations:`Plusieurs lieux`,active:`Active`,inactive:`Inactive`,standard:`Standard`,minScan:`Scan {minutes} min`,searchActions:`Actions de recherche`,chat:`Discussion`,editSearch:`Modifier la recherche`,deleteSearch:`Supprimer la recherche`,pauseSearch:`Mettre en pause`,cannotActivate:`Impossible d'activer la recherche`,activateSearch:`Activer la recherche`,deleteTitle:`Supprimer cette recherche ?`,deleteConfirm:`Supprimer la recherche`,deleteDescription:`Cela supprimera définitivement « {name} ». Cette action est irréversible.`,locationsCount:`+{count} lieux`,foundCount:`{count} trouvée(s)`,editNotAvailable:`La modification de ce type de recherche sur le web n'est pas encore disponible.`},notFound:{title:`L'affaire est partie â la page aussi`,description:`La page que vous cherchez a déjà été prise ou déplacée. Ne laissez pas la concurrence prendre de l'avance â reprenez le fil.`,tagline:`Surveillance des places de marché`},routeError:{title:`Une erreur s'est produite de notre côté`,description:`Cette page a rencontré une erreur inattendue. Un rechargement règle généralement le problème. Si cela persiste, contactez-nous.`},verifyEmail:{verifying:`Vérification de votre courrielâ¦`,verifyingHint:`Cela ne prend qu'un instant.`,success:`Courriel vérifié`,successSignedIn:`Tout est prêt â votre compte est opérationnel.`,successSignedOut:`Votre c
17ompte est prêt. Connectez-vous pour commencer.`,failed:`Ãchec de la vérification`,goToSignIn:`Aller à la connexion`,missingToken:`Ce lien de vérification ne contient pas de jeton. Ouvrez le lien depuis votre courriel.`,genericFailure:`Impossible de vérifier ce courriel. Demandez un nouveau lien et réessayez.`,networkFailure:`Impossible de joindre le serveur. Vérifiez votre connexion et rouvrez le lien.`,timeoutFailure:`La vérification a expiré. Rouvrez le lien dans un moment.`},auth:{welcomeBack:`Bon retour`,signInSubtitle:`Connectez-vous pour poursuivre votre parcours`,createAccount:`Créer un compte`,createAccountSubtitle:`Trouvez des affaires avant tout le monde`,joinToday:`Rejoignez des milliers de professionnels`,usernamePlaceholder:`Nom d'utilisateur`,emailAddress:`Adresse courriel`,usernameOrEmailRequired:`Le nom d'utilisateur ou le courriel est requis`,signIn:`Se connecter`,signingIn:`Connexionâ¦`,getStarted:`Commencer`,creatingAccount:`Création du compteâ¦`,usernameOrEmail:`Nom d'utilisateur ou courriel`,password:`Mot de passe`,showPassword:`Afficher le mot de passe`,hidePassword:`Masquer le mot de passe`,forgotPassword:`Mot de passe oublié ?`,forgotPasswordTitle:`Mot de passe oublié`,sendCode:`Envoyer le code`,verifyCode:`Vérifier le code`,emailNotVerified:`Courriel non vérifié`,emailNotVerifiedDescription:`Votre courriel n'est pas vérifié. Consultez votre boîte de réception ou les courriers indésirables.`,resend:`Renvoyer`,unableToSignIn:`Connexion impossible. Veuillez réessayer.`,passwordRequired:`Le mot de passe est requis`,identifierRequired:`Le courriel ou le nom d'utilisateur est requis`,claimIdentity:`Choisissez votre identité`,finalStep:`Dernière étape`,completeSetup:`Terminer la configuration`,chooseUsername:`Choisissez votre nom d'utilisateur`,secureUnique:`Sécurisé et unique`,usernameRules:`3 à 20 caractères : lettres, chiffres, tirets bas ou tirets.`,termsOfService:`Conditions d'utilisation`,privacyPolicy:`Politique de confidentialité`,support:`Assistance`},download:{heroBadge:`Disponible sur tous vos appareils`,heroTitle:`Emportez InstaSnag`,heroTitleAccent:`Partout avec vous`,heroSubtitle:`Téléchargez nos applications mobiles natives pour des alertes en déplacement, et installez notre extension de navigateur pour vous intégrer pleinement à Facebook Marketplace.`,iosTitle:`Application iOS`,iosBody:`Notifications push en temps réel et expérience native pour iPhone et iPad.`,iosCta:`Télécharger sur l'App Store`,androidTitle:`Application Android`,androidBody:`Alertes d'affaires instantanées et filtres puissants conçus pour Android.`,androidCta:`Disponible sur Google Play`,extensionBadge:`Utilisateur avancé`,extensionTitle:`Extension de navigateur`,extensionBody:`Connectez-vous directement à Facebook Marketplace pour envoyer et recevoir des messages depuis votre tableau de bord.`,extensionCta:`Ajouter au navigateur`},footer:{description:`Surveillance multi-places de marché avec un seul tableau de bord et des alertes opportunes â voyez les nouvelles annonces qui correspondent à vos veilles sans jongler entre les onglets toute la journée.`,product:`Produit`,resources:`Ressources`,legal:`Mentions légales`,helpCenter:`Centre d'aide`,community:`Communauté`,privacyPolicy:`Politique de confidentialité`,termsOfService:`Conditions d'utilisation`,copyright:`© {year} InstaSnag. Tous droits réservés. Conçu pour les acheteurs et vendeurs qui surveillent les annonces chaque jour.`,ariaX:`InstaSnag sur X`,ariaFacebook:`InstaSnag sur Facebook`,ariaLinkedIn:`InstaSnag sur LinkedIn`},home:{heroBadge:`Alertes d'annonces sur les grandes places de marché`,heroTitle:`Dominez les marchés.`,heroTitleAccent:`Zéro délai.`,heroSubtitle:`InstaSnag surveille les places de marché que vous choisissez, rassemble les annonces correspondantes dans un seul tableau de bord et envoie des alertes quand quelque chose correspond à vos recherches â pour moins de temps à actualiser et plus de temps à décider.`,viewPricing:`Voir les tarifs`,trialTerms:`Conditions d'essai applicables. Annulez à tout moment.`,downloadOnThe:`Télécharger sur`,appStore:`l'App Store`,getItOn:`DISPONIBLE SUR`,googlePlay:`Google Play`,trustLabel:`Surveillez les plateformes de vente et de revente sur lesquelles acheteurs et vendeurs comptent chaque jour`,platformEyebrow:`Plateforme`,platformTitle:`Veilles, tableau de bord et alertes â sans vivre dans cinq sites différents.`,bentoCloudTitle:`Livraison cloud`,bentoCloudBody:`Des vérifications en arrière-plan gardent vos veilles à jour, avec des limites de débit qui respectent les places de marché â pour un fil utile, pas bruyant.`,bentoSecurityTitle:`Sécurité dès la conception`,bentoSecurityBo
17dy:`Connexion, chiffrement et contrôles de compte sensés â vos veilles et l'historique restent liés à votre compte, pas éparpillés dans des tableurs partagés.`,bentoNotifyTitle:`Notifications opportunes`,bentoNotifyBody:`Envoyez les correspondances vers les canaux que vous utilisez déjà â courriel, push ou in-app â pour voir les mises à jour au bon moment.`,bentoOpsTitle:`Visibilité opérationnelle`,bentoOpsBody:`Voyez ce qui a correspond, quand, et ce que vous avez déjà parcouru â pour affiner les filtres et faire confiance au tableau de bord.`,reliabilityBadge:`Fiabilité`,reliabilityTitle:`Conçu pour tourner discrètement en arrière-plan.`,reliabilityBody:`InstaSnag se concentre sur des flux de surveillance fiables â configuration claire, comportement prévisible et garde-fous pour rester organisé quand le volume augmente.`,reliabilityBullet1:`Paramètres par défaut pensés pour les catalogues à fort roulement`,reliabilityBullet2:`Séparation entre découverte, alertes et revue`,reliabilityBullet3:`Espace pour s'intégrer à vos outils existants au fil du temps`,reliabilityImageAlt:`Ordinateur portable affichant un tableau de bord professionnel de surveillance des annonces et des indicateurs de fiabilité.`,speedBadge:`Vitesse`,speedTitle:`Sachez en premier. Agissez plus vite.`,speedBody:`InstaSnag garde vos veilles actives et envoie des alertes quasi instantanées quand des annonces correspondent, pour examiner les opportunités depuis votre téléphone sans actualiser sans cesse.`,speedImageAlt:`Ãcran de verrouillage InstaSnag avec alertes d'affaires, baisses de prix et nouvelles correspondances`,unifiedBadge:`Expérience unifiée`,unifiedTitle:`Un seul endroit pour vos surveillances.`,unifiedBody:`Configurez les veilles, examinez les correspondances et gérez les réglages depuis une seule surface â web, application ou extension, là où vous travaillez déjà .`,seeFeatures:`Voir les fonctionnalités`,unifiedImageAlt:`Tableau de bord InstaSnag unifiant veilles et correspondances sur plusieurs places de marché`,processEyebrow:`Le processus`,processTitle:`De la configuration au signal en`,processTitleAccent:`trois étapes`,processSubtitle:`Choisissez ce que vous voulez surveiller, connectez vos notifications, puis examinez les correspondances dès qu'elles arrivent.`,step1Title:`Définissez ce qui compte`,step1Body:`Capturez les produits, catégories et contraintes à suivre. Affinez les filtres pour des alertes pertinentes au fil des stocks.`,step2Title:`Connectez et notifiez`,step2Body:`Liez les boutiques et choisissez vos canaux d'alerte â courriel, push ou in-app. Vos veilles restent sécurisées sous votre compte.`,step3Title:`Examinez et agissez`,step3Body:`Quand quelque chose correspond, vous recevez une alerte concise avec le contexte. Ouvrez l'annonce source en un tap.`,compareTitle:`Arrêtez de lutter contre le`,compareTitleAccent:`chaos`,compareSubtitle:`Les outils improvisés sont fragiles, bruyants et éparpillés. InstaSnag offre une surface professionnelle unique pour tout surveiller.`,adhocTitle:`Surveillance improvisée`,adhocBody:`Ãa marche un temps â jusqu'à ce que le volume croisse ou que quelqu'un soit absent.`,adhoc1:`Listes et onglets faciles à perdre de vue`,adhoc2:`Alertes qui se chevauchent ou se perdent`,adhoc3:`Historique difficile à consulter sur téléphone`,adhoc4:`Comptes partagés et propriété floue des changements`,withTitle:`Avec InstaSnag`,withBody:`Un endroit cohérent pour configurer les veilles, parcourir les correspondances et gérer les réglages.`,with1:`Un tableau de bord pour veilles, correspondances et activité`,with2:`Alertes courriel, push et in-app que vous pouvez affiner`,with3:`Web, application mobile et extension au quotidien`,with4:`Comptes individuels avec votre historique au même endroit`,compareFootnoteBefore:`Conditions d'essai applicables.`,compareFootnoteAfter:`quand vous êtes prêt à comparer les forfaits.`,testimonialsEyebrow:`Ce que disent les clients`,testimonialsTitle:`Moins de bruit, des décisions plus rapides.`,t1Quote:`J'ai remplacé un patchwork d'alertes par un seul flux. Mes notifications sont plus calmes parce que seules les correspondances utiles remontent.`,t1Author:`Marcus T.`,t1Role:`Vendeur particulier`,t2Quote:`J'ai de la visibilité sans vivre dans de
17s tableurs. En fin de semaine je parcours le tableau de bord au lieu de deviner quel onglet j'avais ouvert.`,t2Author:`Sarah L.`,t2Role:`Revendeuse de meubles`,t3Quote:`Le produit est retenu dans le bon sens â moins d'arêtes vives que les outils qui promettaient tout et livraient le chaos.`,t3Author:`David K.`,t3Role:`Acheteur d'électronique`,pricingEyebrow:`Forfaits`,pricingTitle:`Faites évoluer votre`,pricingTitleAccent:`avantage`,pricingSubtitle:`Les limites ci-dessous reflètent la configuration actuelle de votre abonnement.`,faqTitle:`Questions fréquentes`,faqPlatformsQ:`Quelles plateformes et quels appareils sont pris en charge ?`,faqPlatformsA:`Utilisez InstaSnag sur le web, dans notre application mobile et avec les outils de navigateur pris en charge. Les places de marché connectées dépendent de votre forfait et de votre région â consultez les tarifs.`,faqNotificationsQ:`Comment fonctionnent les notifications ?`,faqNotificationsA:`Vous choisissez comment InstaSnag vous joint â fils in-product, courriel ou push mobile â pour voir les correspondances là où vou
17s les remarquerez vraiment.`,faqPrivacyQ:`Mon activité n'est-elle visible que par moi ?`,faqPrivacyA:`Vos recherches enregistrées, l'historique et les réglages restent sous votre connexion. InstaSnag n'expose pas votre activité de surveillance aux autres utilisateurs.`,faqContractQ:`Y a-t-il un engagement minimum ?`,faqContractA:`Les abonnements se renouvellent selon le cycle que vous choisissez. Commencez par un essai si disponible, annulez avant le renouvellement si ça ne convient pas â pas d'engagement pluriannuel.`,finalBadge:`Essai à disponibilité limitée`,finalTitle:`Prêt à trouver votre prochaine`,finalTitleAccent:`grande opportunité ?`,finalBody:`Rejoignez des centaines de traders qui utilisent InstaSnag pour surveiller les places de marché mondiales. Commencez votre essai gratuit aujourd'hui.`,cancelAnytime:`Annulez à tout moment`,instantSetup:`Configuration instantanée`},features:{heroBadge:`Capacités`,heroTitle:`Des fonctionnalités pensées pour`,heroTitleAccent:`l'avantage concurrentiel.`,heroSubtitle:`InstaSnag n'est pas qu'un scraper. C'est un écosystème de surveillance complet pour la vitesse, l'organisation et l'automatisation là où ça compte.`,monitoringBadge:`Temps réel`,monitoringTitle:`Surveillance haute fréquence`,monitoringDescription:`Une vitesse d'alerte à la hauteur de la concurrence. Lancez des recherches jusqu'à chaque minute.`,monitoringDetail1:`Intervalles de 1, 3, 5 et 9 minutes`,monitoringDetail2:`Limitation de débit intelligente`,monitoringDetail3:`Moteur de découverte en arrière-plan`,monitoringDetail4:`Couverture multi-places de marché`,automationBadge:`Avancé`,automationTitle:`Automatisation des flux`,automationDescription:`Réduisez les tâches manuelles avec le premier message automatique, l'analyse IA et le repost optionnel.`,automationDetail1:`Premier message automatisé sur Facebook`,automationDetail2:`Module IA pour le sentiment des annonces`,automationDetail3:`Module Repost pour la republication automatique`,automationDetail4:`Affinage intelligent des recherches`,automationDetail5:`Actualisation auto des tableaux de bord`,operationsBadge:`Unifié`,operationsTitle:`Tableau de bord opérationnel`,operationsDescription:`Une surface professionnelle unique pour gérer vos veilles et examiner les correspondances.`,operationsDetail1:`Fil unifié des résultats de recherche`,operationsDetail2:`Suivi historique des correspondances`,operationsDetail3:`Indicateurs de performance`,operationsDetail4:`Contrôles de visibilité d'équipe`,extendedTitle:`Outils professionnels pour des`,extendedTitleAccent:`performances`,extendedTitleAfter:`de niveau entreprise`,crossPlatformTitle:`Application multiplateforme`,crossPlatformBody:`Gérez vos recherches et recevez des notifications push sur iOS et Android.`,browserExtensionTitle:`Extension de navigateur`,browserExtensionBody:`Intégrez-vous aux sites de places de marché pour une communication fluide.`,secureTitle:`Environnement sécurisé`,secureBody:`Chiffrement de niveau entreprise et contrôles de compte individuels.`,inAppChatTitle:`Messagerie intégrée`,inAppChatBody:`Communication centralisée avec les vendeurs dans l'écosystème InstaSnag.`,customAlertsTitle:`Canaux d'alerte personnalisés`,customAlertsBody:`Routez les notifications par courriel, push ou fils in-app selon vos préférences.`,intelligentFilterTitle:`Filtrage intelligent`,intelligentFilterBody:`Contraintes avancées pour éliminer le bruit et ne garder que les opportunités à forte valeur.`,traditionalLabel:`Sourcing traditionnel`,traditionalTitle:`Le bruit de la surveillance manuelle`,traditional1:`Plusieurs onglets qui s'actualisent sans cesse`,traditional2:`Notifications dispersées entre courriel et apps`,traditional3:`Tableurs fragiles pour suivre l'historique`,traditional4:`Zéro automatisation pour le premier contact`,traditional5:`Opportunités manquées dans les catégories à fort roulement`,advantageLabel:`L'avantage InstaSnag`,advantageTitle:`Précision et contrôle du flux`,advantage1:`Un tableau de bord unifié pour toutes les plateformes`,advantage2:`Alertes centralisées via vos canaux préférés`,advantage3:`Données historiques pour de meilleures décisions`,advantage4:`Automatisation du contact, intelligence IA et republication`,advantage5:`Dominez les marchés avec des intervalles d'1 minute`,faqTitle:`Plongée dans les fonctionnalités`,faqIntervalsQ:`Comment fonctionnent les intervalles de surveillance ?`,faqIntervalsA:`Les intervalles déterminent la fréquence des vérifications. Les forfaits supérieurs offrent des intervalles plus rapides (jusqu'à 1 minute), critiques pour les catégories très compétitives.`,faqAutomationQ:`Quel type d'automatisation est inclus ?`,faqAutomationA:`Notre forfait « Max » inclut le premier message automatisé sur Facebook Marketplace via l'extension. Plus et Max prennent aussi en charge des modules optionnels : assistance IA à la négociation et republication automatique.`,faqDevicesQ:`Puis-je utiliser InstaSnag sur plusieurs appareils ?`,faqDevicesA:`Oui ! Votre c
17ompte se synchronise entre le tableau de bord web, l'application mobile et l'extension. Configurez sur ordinateur et recevez des alertes sur téléphone.`,ctaTitle:`Découvrez la`,ctaTitleAccent:`puissance de la précision.`,ctaBody:`Débloquez la surveillance haute fréquence et dominez votre niche dès aujourd'hui avec notre essai gratuit de 7 jours.`,ctaStartTrial:`Commencer l'essai gratuit`,ctaViewPlans:`Voir tous les forfaits`},pricing:{heroBadge:`Forfaits`,heroTitle:`Faites évoluer votre`,heroTitleAccent:`avantage de surveillance.`,heroSubtitle:`Des tarifs transparents pour des opérations professionnelles. Commencez avec un essai gratuit et évoluez selon votre volume.`,compareTitle:`Comparez tout.`,compareSubtitle:`Une répartition transparente des capacités selon les niveaux de forfait.`,capabilities:`Capacités`,monthlyPrice:`Prix mensuel`,trialPeriod:`Période d'essai`,trialDays:`{days} jours`,searchesAtInterval:`Recherches à intervalles de {interval} min`,automatedFirstMessage:`Premier message automatisé`,prioritySupport:`Assistance prioritaire`,marketplaceChatting:`Messagerie Marketplace`,automatedRelisting:`Republication automatique`,aiNegotiator:`Négociateur IA`,repost:`Repost`,compareFootnote:`Le Négociateur IA et le Repost sont des abonnements séparés â achetez-les seuls ou avec n'importe quel forfait scraper.`,faqSupportBadge:`Assistance`,faqHeading:`Facturation et`,faqHeadingAccent:`questions fréquentes.`,faqIntro:`Tout ce qu'il faut savoir sur nos forfaits, la facturation et l'essai. Vous ne trouvez pas ? Contactez notre équipe.`,faqBillingQ:`Comment fonctionne le cycle de facturation ?`,faqBillingA:`Les abonnements sont facturés mensuellement. Vous pouvez commencer par un essai gratuit de 7 jours sur n'importe quel forfait avant d'être débité.`,faqCancellationQ:`Puis-je annuler mon abonnement à tout moment ?`,faqCancellationA:`Oui. Annulez là où vous vous êtes abonné â sur le web ici, ou dans Google Play / l'App Store â et conservez l'accès jusqu'à la fin de la période en cours. L'abonnement fonctionne partout.`,faqUpgradeQ:`Que se passe-t-il lors d'une mise à niveau ou d'une rétrogradation ?`,faqUpgradeA:`Les mises à niveau prennent effet immédiatement avec un prorata. Les rétrogradations s'appliquent en fin de période, vous conservez votre forfait actuel jusque-là .`,faqProductsQ:`à quoi d'autre puis-je m'abonner ?`,faqProductsA:`En plus des forfaits scraper, le Négociateur IA et le Repost sont des abonnements séparés, seuls ou combinés â sans forfait scraper requis.`,faqSupportQ:`Proposez-vous une assistance de niveau entreprise ?`,faqSupportA:`Oui, Plus et Max incluent une assistance prioritaire. Les utilisateurs Max ont aussi un gestionnaire de compte dédié.`,ctaTitle:`Prêt à dominer`,ctaTitleAccent:`votre marché ?`,ctaBody:`Commencez votre essai gratuit de 7 jours aujourd'hui. Sans engagement long. Annulez ou changez de forfait à tout moment.`,ctaStartTrial:`Commencer l'essai gratuit`,contactSales:`Contacter les ventes`},contact:{heroBadge:`Contactez-nous`,heroTitle:`Construisons votre`,heroTitleAccent:`avantage décisif.`,heroSubtitle:`Que vous soyez un flipper solo ou une entreprise de revente mondiale, nos experts sont prêts à optimiser votre flux de surveillance.`,supportTitle:`Assistance mondiale`,avgResponse:`Réponse moyenne : < 4 heures`,officeTitle:`Bureau principal`,company:`9564-5602 Québec Inc.`,addressLine1:`9580 Blvd de l'Acadie`,addressLine2:`Bureau 207`,city:`Montréal, QC`,postalCode:`H4N 1L8`,country:`Canada (CA)`,socialProof:`Rejoint par {count} acheteurs et vendeurs professionnels dans le monde.`,socialProofCount:`2 500+`,formTitle:`Envoyer un message`,formSubtitle:`Remplissez le formulaire sécurisé ci-dessous pour démarrer votre demande.`,fullName:`Nom complet`,fullNamePlaceholder:`Jane Cooper`,emailPlaceholder:`[email protected]`,companyOptional:`Entreprise (facultatif)`,companyPlaceholder:`Acme Trading Co.`,subject:`Objet`,subjectPlaceholder:`Demande forfait entreprise`,message:`Me
17ssage`,messageMinHint:`Min. 10 caractères`,messagePlaceholder:`Parlez-nous de vos besoins de surveillance ou de vos questionsâ¦`,submit:`Envoyer la demande`,submitting:`Traitementâ¦`,validationFullName:`Veuillez entrer votre nom complet.`,validationEmail:`Veuillez entrer un courriel valide.`,validationSubject:`L'objet est trop court.`,validationMessage:`Veuillez fournir un peu plus de détails (min. 10 caractères).`,successFallback:`Nous avons bien reçu votre demande. Un spécialiste vous contactera sous peu.`,errorRateLimited:`Trop d'envois. Veuillez attendre une minute et réessayer.`,errorServer:`Impossible d'envoyer votre message pour le moment. Réessayez plus tard.`,errorNetwork:`Erreur réseau. Vérifiez votre connexion et réessayez.`,errorGeneric:`Une erreur s'est produite. Veuillez réessayer.`,iosSubject:`Application iOS â Accès anticipé et bêta`,iosMessage:`Bonjour l'équipe InstaSnag, 18 19Je suis intéressé(e) par l'accès anticipé à l'application iOS InstaSnag et souhaite rejoindre le programme de bêta-testeurs dès qu'il sera disponible. 20 21Merci.`},plans:{productAria:`Produit`,tabScraper:`Scraper`,tabRepost:`Repost`,tabAi:`Négociateur IA`,loading:`Chargement des forfaitsâ¦`,loadError:`Impossible de charger les forfaits. Réessayez sous peu.`,empty:`Aucun forfait n'est disponible pour ce produit pour le moment.`,mostPopular:`Le plus populaire`,perMonth:`/mois`,trialBadge:`Essai gratuit de {days} jours`,startTrial:`Commencer l'essai de {days} jours`,subscribe:`S'abonner`,currentPlan:`Forfait actuel`,scheduled:`Planifié`,scheduledNote:`Passe à ce forfait à la fin de votre période de facturation.`,upgrade:`Mettre à niveau`,downgrade:`Rétrograder`,changePlan:`Changer de forfait`,upgradeNote:`Appliqué immédiatement, avec prorata du temps restant sur votre forfait actuel.`,downgradeNote:`Prend effet à la fin de votre période de facturation actuelle.`,managedElsewhere:`Géré ailleurs`,subscribedVia:`Abonné via {store}. Gérez-le là -bas.`,managedOutsideWeb:`Géré hors de l'application web.`,opening:`Ouvertureâ¦`,working:`Traitementâ¦`,storeWeb:`le web`,storePlay:`Google Play`,storeAppStore:`l'App Store`,storeAmazon:`Amazon`,storePromo:`une offre promotionnelle`,featCloudMonitoring:`Surveillance cloud 24 h/24`,featPriorityPush:`Alertes push prioritaires sur les nouvelles correspondances`,featActiveSearches:`{count} recherches actives ⢠alertes {interval}`,featIntervalMin:`{minutes} min`,featIntervalOneHour:`1 h`,featIntervalHours:`{hours} h`,featIntervalHoursMinutes:`{hours} h {minutes} min`,featFbFirstMessage:`Premier message Facebook automatisé`,featAiChat:`Chat IA sur Facebook Marketplace`,featAutoNegotiate:`Négociation automatique des prix`,featBuyerSellerMessaging:`Messagerie acheteur et vendeur`,featExtension:`Via l'extension de navigateur InstaSnag`,featAutoRepost:`Republication auto de vos annonces personnelles`,featTopOfSearch:`Restez en tête des recherches Marketplace`,featSetAndForget:`Planification de republication sans effort`},settingsExtension:{mustStayRunningTitle:`L'extension doit rester active`,mustStayRunningBody:`La messagerie, les premiers messages automatiques et la synchronisation Marketplace dépendent d'une extension connectée. Hors ligne ou en pause, aucun message ne peut être envoyé depuis InstaSnag et les contacts automatiques ne tourneront pas tant que l'extension n'est pas active.`,connectionStatus:`Ãtat de la connexion`,lastSeen:`Vu pour la dernière fois {time}`,setupHint:`Suivez les étapes ci-dessous pour connecter votre extension.`,connectedHint:`Votre extension est connectée. Gardez-la active pour la messagerie et les contacts automatiques.`,refresh:`Actualiser`,bridgeBlurb:`L'extension de navigateur InstaSnag lie votre compte à Facebook Marketplace pour la messagerie et la synchronisation. D'autres places de marché sont prévues.`,addToChrome:`Ajouter à Chrome`,openChromeWebStore:`Ouvrir la fiche Chrome Web Store`,stepInstallTitle:`Installer l'extension`,stepInstallBody:`Ajoutez InstaSnag à votre navigateur depuis le Chrome Web Store via le lien ci-dessous.`,stepSignInTitle:`Se connecter`,stepSignInBody:`Ouvrez le popup de l'extension et connectez-vous avec le même compte InstaSnag qu'ici.`,stepConnectTitle:`Connecter votre compte`,stepConnectBody:`Cliquez sur Connecter dans l'extension pour la lier à votre compte InstaSnag et accorder les permissions.`,stepKeepRunningTitle:`La garder active`,stepKeepRunningBody:`Laissez l'extension active en arr
21ière-plan. Si elle est en pause ou injoignable, vous ne pourrez pas envoyer de messages depuis InstaSnag, et les premiers messages automatiques ne seront pas envoyés.`,stepVerifyTitle:`Vérifier la connexion`,stepVerifyBody:`Une fois connectée, l'extension se synchronise automatiquement. Vérifiez l'état via le pastille dans Discussions ou en actualisant cette page.`,statusActive:`Active`,statusOffline:`Hors ligne`,statusPaused:`En pause`,statusUnknown:`Inconnu`,composerPaused:`Extension en pause â reprenez pour envoyer`,composerOffline:`Extension hors ligne â connectez-vous pour envoyer`,composerRequired:`Extension requise pour envoyer`},settingsFavorites:{subscribeTitle:`Abonnez-vous pour voir les favoris`,subscribeBody:`Enregistrez des annonces depuis votre fil et ouvrez-les ici. Un forfait actif est requis pour parcourir les favoris.`,viewSubscriptionPlans:`Voir les forfaits`,subscriptionRequired:`Un abonnement actif est requis pour voir les annonces favorites.`,loadError:`Impossible de charger les favoris. Veuillez réessayer.`,noMatchesTitle:`Aucun résultat`,noMatchesBody:`Aucun favori ne correspond à votre recherche.`,clearSearch:`Effacer la recherche`,emptyTitle:`Aucun favori`,emptyBody:`Appuyez sur le cÅur d'une annonce dans votre fil pour l'enregistrer ici.`,goToFeed:`Aller au fil`,resultCountOne:`{count} résultat`,resultCountOther:`{count} résultats`,backToFavorites:`Retour aux favoris`,searchPlaceholder:`Rechercher dans les favorisâ¦`,searchAriaLabel:`Rechercher dans les favoris`,clearSearchAriaLabel:`Effacer la recherche`},settingsLinked:{google:`Google`,facebook:`Facebook`,accountEmail:`Courriel du compte`,linkedSuccess:`Compte {provider} lié avec succès`,emailMismatchNote:`Le compte lié utilise un courriel différent de votre profil InstaSnag.`,unableToStartLinking:`Impossible de démarrer la liaison du compte.`,loadErrorTitle:`Impossible de charger les comptes liés`,unlinkWarning:`Si vous déliez votre seule méthode de connexion, définissez d'abord un mot de passe pour ne pas perdre l'accès.`,unlinkConfirm:`Délier le compte`,keepConnected:`Garder lié`,unlinking:`Déliaison du compteâ¦`,connected:`Connecté`,notConnected:`Non connecté`,unlink:`Délier`,connectProvider:`Connecter {name}`,linkingNotConfigured:`La liaison {name} n'est pas configurée pour cette application.`},settingsAiDelay:{infoBlurb:`Définissez le délai avant que l'IA réponde automatiquement. Délai actuel : {delay}.`,allowedRangeMinutes:`Plage autorisée : 1 à 1440 minutes`,allowedRangeHours:`Plage autorisée : 1 à 24 heures`,delayUnitAria:`Unité de délai`,unitMinutes:`minutes`,unitHours:`heures`,customValueAria:`Valeur de délai personnalisée`,unitSuffixMin:`min`,unitSuffixHr:`h`,rangeError:`Veuillez vérifier la plage autorisée.`,updatedTo:`Délai de réponse IA mis à jour : {delay}.`,saving:`Enregistrementâ¦`,saveChanges:`Enregistrer`,hourOne:`{count} heure`,hourOther:`{count} heures`,minuteOne:`{count} minute`,minuteOther:`{count} minutes`},settingsMeetupLoc:{infoBlurb:`Quand les acheteurs demandent où récupérer un article, votre agent IA partage le lieu de rendez-vous défini ici. Marquez un lieu par défaut pour préremplir les nouveaux réglages IA.`,locationsSavedOne:`{count} lieu enregistré`,locationsSavedOther:`{count} lieux enregistrés`,noLocationsYet:`Aucun lieu de rendez-vous`,addLocation:`Ajouter un lieu`,loadingAria:`Chargement des lieux de rendez-vous`,emptyTitle:`Aucun lieu de rendez-vous`,emptyBody:`Ajoutez au moins un lieu pour que votre agent IA puisse suggérer où les acheteurs peuvent récupérer les articles.`,defaultBadge:`Par défaut`,setAsDefault:`Définir par défaut`,edit:`Modifier`,delete:`Supprimer`,actionsFor:`Actions pour {name}`,newLocation:`Nouveau lieu`,editLocation:`Modifier le lieu`,addMeetupLocation:`Ajouter un lieu de rendez-vous`,editMeetupLocation:`Modifier le lieu de rendez-vous`,placeName:`Nom du lieu`,placeNameHint:`Donnez un nom mémorable à ce lieu.`,placeNamePlaceholder:`ex. Maison, Bureau, Café`,nameRequired:`Veuillez entrer un nom.`,meetingLocation:`Lieu de rencontre`,meetingLocationHint:`Adresse complète où vou
21s rencontrerez les acheteurs.`,addressPlaceholder:`Entrez l'adresse de rendez-vous`,addressRequired:`Veuillez entrer une adresse.`,suggestions:`Suggestions`,setAsDefaultLocationAria:`Définir comme lieu par défaut`,defaultLocation:`Lieu par défaut`,defaultLocationHint:`Utiliser cette adresse par défaut pour les nouvelles annonces et négociations IA.`,saving:`Enregistrementâ¦`,saveChanges:`Enregistrer`,duplicateError:`Une adresse de rencontre avec ce nom ou ce lieu existe déjà .`,deleteTitle:`Supprimer le lieu de rendez-vous ?`,deleteWillRemove:`Cela retirera {name} de vos lieux enregistrés.`,deleteWarning:`Les annonces ou conversations utilisant cette adresse pour l'IA pourront nécessiter un nouveau lieu.`,deleting:`Suppressionâ¦`,deleteLocation:`Supprimer le lieu`},settingsMeetupTimes:{infoBlurb:`Quand les acheteurs demandent les horaires, votre agent IA utilise ces plages hebdomadaires. Marquez-en une par défaut pour préremplir les réglages IA.`,schedulesSavedOne:`{count} horaire enregistré`,schedulesSavedOther:`{count} horaires enregistrés`,noProfilesYet:`Aucun profil de disponibilité`,addSchedule:`Ajouter un horaire`,loadingAria:`Chargement des profils de disponibilité`,emptyTitle:`Aucun profil de disponibilité`,emptyBody:`Ajoutez au moins un horaire hebdomadaire pour que l'IA puisse suggérer des disponibilités.`,defaultBadge:`Par défaut`,setAsDefault:`Définir par défaut`,edit:`Modifier`,delete:`Supprimer`,showTimeSlots:`Afficher les créneaux`,hideTimeSlots:`Masquer les créneaux`,actionsFor:`Actions pour {name}`,noTimeSlotsDefined:`Aucun créneau défini.`,noTimeSlots:`Aucun créneau`,slotsOneDayOne:`{count} créneau · {day}`,slotsOneDayOther:`{count} créneaux · {day}`,slotsMultiDayOne:`{count} créneau · {days} jours`,slotsMultiDayOther:`{count} créneaux · {days} jours`,dayMon:`Lun`,dayTue:`Mar`,dayWed:`Mer`,dayThu:`Jeu`,dayFri:`Ven`,daySat:`Sam`,daySun:`Dim`,newSchedule:`Nouvel horaire`,editSchedule:`Modifier l'horaire`,addAvailabilityProfile:`Ajouter un profil de disponibilité`,editAvailabilityProfile:`Modifier le profil de disponibilité`,scheduleName:`Nom de l'horaire`,scheduleNameHint:`ex. Soirs de semaine, Matins de week-end`,scheduleNamePlaceholder:`ex. Heures de bureau`,nameRequired:`Veuillez entrer un nom d'horaire.`,setAsDefaultScheduleAria:`Définir comme horaire par défaut`,defaultSchedule:`Horaire par défaut`,defaultScheduleHint:`Utiliser cet horaire par défaut pour les nouvelles négociations IA.`,addTimeSlots:`Ajouter des créneaux`,addTimeSlotsHint:`Sélectionnez des jours et une plage horaire, puis ajoutez-les.`,days:`Jours`,startTime:`Heure de début`,endTime:`Heure de fin`,selectAtLeastOneDay:`Sélectionnez au moins un jour.`,endAfterStart:`L'heure de fin doit être après l'heure de début.`,addTimeSlot:`Ajouter un créneau`,savedSlots:`Créneaux enregistrés`,slotCountOne:`{count} créneau`,slotCountOther:`{count} créneaux`,noTimeSlotsYet:`Aucun créneau`,addSlotBeforeSaving:`Ajoutez au moins un créneau avant d'enregistrer.`,slotsRequired:`Ajoutez au moins un créneau horaire.`,removeDaySlot:`Retirer le créneau {day}`,saving:`Enregistrementâ¦`,saveChanges:`Enregistrer`,deleteTitle:`Supprimer le profil de disponibilité ?`,deleteWillRemove:`Cela retirera {name} et tous ses créneaux.`,deleteWarning:`Les annonces ou conversations utilisant cet horaire pour l'IA pourront nécessiter un nouveau profil.`,deleting:`Suppressionâ¦`,deleteSchedule:`Supprimer l'horaire`},settingsSub:{productScraper:`Scraper`,productRepost:`Repost`,productAi:`Négociateur IA`,opening:`Ouvertureâ¦`,manageBilling:`Gérer la facturation`,confirming:`Confirmationâ¦`,openingCheckout:`Ouverture du paiementâ¦`,dismiss:`Fermer`,portalError:`Impossible d'ouvrir la gestion de facturation. Réessayez sous peu.`,loading:`Chargement de votre abonnementâ¦`,loadError:`Impossible de charger votre abonnement. Réessayez sous peu.`,storeManageHint:`Chaque abonnement se gère là où il a été acheté â seul ce magasin peut agir dessus.`,plans:`Forfaits`,addNewPlan:`Ajouter un forfait`,subscribedToEverything:`Vous êtes abonné à tout ce qu'offre InstaSnag.`,changesToOn:`Passe à {name} le {date}.`,changesToPeriodEnd:`Passe à {name} à la fin de cette période de facturation.`,statusCancelling:`Annulation`,statusExpired:`Expiré`,statusPaymentFailed:`Paiement échoué`,statusFreeTrial:`Essai gratuit`,statusActive:`Actif`,
21statusUnknown:`Inconnu`,accessUntil:`Accès jusqu'au {date}`,ended:`Terminé le {date}`,priceMonthly:`{price}/mois`,updatePaymentMethod:`Mettez à jour votre mode de paiement pour conserver l'accès.`,freeUntilThen:`Gratuit jusqu'au {date} · puis {price}`,freeUntil:`Gratuit jusqu'au {date}`,renewsWithPrice:`{price} · Renouvellement le {date}`,renews:`Renouvellement le {date}`,percentOff:`{percent} % de réduction`,percentOffUntil:`{percent} % de réduction jusqu'au {date}`,uiTrial:`Essai`,uiCancelsAtPeriodEnd:`Annule en fin de période`,uiPaymentIssue:`Problème de paiement`,uiPlanChangeScheduled:`Changement de forfait planifié`,uiPlanChangePending:`Changement de forfait en attente`,manageOnGooglePlay:`Gérer sur Google Play`,manageInAppStore:`Gérer dans l'App Store`,manageOnAmazon:`Gérer sur Amazon`,billedThroughGooglePlay:`Facturé via Google Play`,billedThroughAppStore:`Facturé via l'App Store`,billedThroughAmazon:`Facturé via Amazon`,billedOnWeb:`Facturé sur le web`,grantedByInstaSnag:`Accordé par InstaSnag`,billedElsewhere:`Facturé ailleurs`,addPlanTitle:`Ajouter un forfait`,addPlanSubtitleMulti:`Choisissez un produit, puis un forfait`,addPlanSubtitleSingle:`Choisissez un forfait`},feedFilters:{filters:`Filtres`,reset:`Réinitialiser`,searchTitlePlaceholder:`Rechercher un titreâ¦`,sortResults:`Trier les résultats`,sortRecentlyFound:`Trouvés récemment`,sortRecentlyListed:`Publiés récemment`,sortPriceLowToHigh:`Prix : croissant`,sortPriceHighToLow:`Prix : décroissant`,selectPlaceholder:`Sélectionnerâ¦`,activeSearches:`Recherches actives`,instaSnagPicks:`Sélections InstaSnag`,priceRange:`Fourchette de prix`,minPrice:`Prix min.`,maxPrice:`Prix max.`,yearRange:`Fourchette d'années`,minYear:`Année min.`,maxYear:`Année max.`,mileageRange:`Fourchette de kilométrage`,minMileage:`Km min.`,maxMileage:`Km max.`,color:`Couleur`,interior:`Intérieur`,exterior:`Extérieur`,radius:`Rayon`,distanceInMiles:`Distance en miles`,distanceInKm:`Distance en km`,hasPhone:`Avec téléphone`,listingsWithPhoneNumbers:`Annonces avec numéro de téléphone`,marketplace:`Place de marché`,transmissionType:`Type de transmission`,fuelType:`Type de carburant`,condition:`Ãtat`,applying:`Applicationâ¦`,applyFilterOne:`Appliquer {count} filtre`,applyFilterOther:`Appliquer {count} filtres`,applyChanges:`Appliquer les changements`,clearAllFilters:`Effacer tous les filtres`,distanceUnit:`Unité de distance`,distanceUnitHint:`Cartes, kilométrage et filtre de rayon`,distanceUnitAria:`Unité de distance`,kilometers:`Kilomètres`,miles:`Miles`,invalidAmount:`Montant invalide`,maxPriceIs:`Prix max. : {max}`,minExceedsMaxPrice:`Le min. dépasse le prix max.`,minExceedsMaxYear:`Le min. dépasse l'année max.`,yearMustBe4Digits:`L'année doit avoir 4 chiffres`,minExceedsMaxMileage:`Le min. dépasse le kilométrage max.`,maxMileageIs:`Kilométrage max. : {max}`,invalidRadius:`Rayon invalide`,maxRadiusIs:`Rayon max. : {max}`,labelSemiAutomatic:`Semi-automatique`,labelEbay:`eBay`,labelFacebook:`Facebook`},searchWizard:{back:`Retour`,backToSearches:`Retour aux recherches`,backToCategories:`Retour aux catégories`,hideStepNav:`Masquer la navigation des étapes`,showStepNav:`Afficher la navigation des étapes`,selectPlaceholder:`Sélectionnerâ¦`,searchPlaceholder:`Rechercherâ¦`,loadingEllipsis:`Chargementâ¦`,menuEmptyHint:`Rien à afficher pour le moment. Réessayez dans un instant.`,noSearchMatches:`Aucun résultat pour votre recherche.`,optional:`(facultatif)`,minPrice:`Prix min.`,maxPrice:`Prix max.`,minIntervalLabel:`{mins} min`,kmAway:`{distance} km`,kmUnit:`{km} km`,choice:{titleCreate:`Créer une recherche`,titleDuplicate:`Dupliquer une recherche`,subtitleChoice:`Commencez avec une configuration vide ou copiez les paramètres d'une recherche enregistrée.`,subtitlePick:`Choisissez la recherche à utiliser comme modèle. Vous saisirez un nouveau nom et une nouvelle localisation avant de sauvegarder.`,startFreshTitle:`Nouvelle recherche`,startFreshBody:`Choisissez une catégorie ou une recherche par mot-clé et configurez tout depuis le début.`,duplicateTitle:`Dupliquer une recherche`,duplicateBody:`Copiez les filtres, mots-clés et paramètres de scan d'une recherche enregistrée. Le nom et la localisation sont saisis à nouveau.`,searchFilterPlaceholder:`Rechercher par nom, requête ou villeâ¦`,loadError:`Impossible de charger vos recherches. Réessayez.`,loadingSearches:`Chargement de vos recherchesâ¦`,noFilterMatch:`Aucune recherche correspond à votre filtre.`,savedSearchesAria:`Recherches enregistrées`,continueWithDuplicate:`Continuer avec la duplication`,typeVehicle:`Véhicule`,typeQuery:`Requête`,locationsCount:`{count} localisations`,multipleLocations:`Plusieurs localisations`},categoryPicker:{title:`Créer une recherche`,subtitle:`Choisissez Tout pour une alerte large, ou une catégorie pour affiner les résultats.`,loadingCategories:`Chargement des catégoriesâ¦`,anythingTitle:`Tout`,anythingBody:`Surveillez toutes les catégories avec des critères flexibles.`,categoriesHeading:`Catégories`,noCategories:`Aucune catégorie disponible pour le moment.`,loadCategoriesError:`Impossible de charger les catégories.`,subcategoriesTitle:`Sous-catégories`,subcategoriesSubtitle:`Choisissez une sous-catégorie. Les détails seront configurés à l'étape suivante.`,loadingSubcategories:`Chargement des sous-catégoriesâ¦`,noSubcategories:`Aucune sous-catégorie pour cette catégorie.`,categoryNotFound:`Catégorie introuvable.`,loadSubcategoriesError:`Impossible de charger les sous-catégories.`,missingCategory:`Catégorie manquante.`,signInAgain:`Veuillez vous reconnecter pour continuer.`},shell:{editTitle:`Modifier la recherche`,duplicateTitle:`Dupliquer la recherche`,anythingTitle:`Recherche Tout`,categoryTitle:`Recherche par catégorie`,editDescription:`Mettez à jour la place de marché, la zone, les filtres et la fréquence de scan.`,duplicateDescription:`Copiez les filtres et paramètres d'une recherche enregistrée. Saisissez un nouveau nom et une nouvelle localisation avant de sauvegarder.`,anythingCreateDescription:`Définissez les mots-clés, la place de marché, la zone et la fréquence de scan.`,anythingEditDescription:`Mettez à jour les mots-clés, la place de marché, la zone et la fréquence de scan.`,categoryDescription:`Configurez cette recherche catalogue : nom, zone et fréquence de scan.`,notVehicleSearch:`Cette recherche n'est pas une recherche véhicule ou ne peut pas être modifiée ici.`,notVehicleDuplicate:`Cette recherche n'est pas une recherche véhicule ou ne peut pas être dupliquée ici.`,loadSearchError:`Impossible de charger cette recherche.`,loadingSearch:`Chargement de la rechercheâ¦`,preparingDuplicate:`Préparation de la duplicationâ¦`,missingSearchId:`ID de recherche manquant.`,missingCategorySubcategory:`Catégorie ou sous-catégorie manquante.`,duplicateTypeUnavailable:`La duplication de ce type de recherche depuis le web n'est pas encore disponible.`},steps:{details:`Détails`,detailsDescription:`Nommez votre recherche et définissez les mots-clés.`,location:`Localisation`,locationDescription:`Choisissez le pays, la ville et les zones proches optionnelles.`,preferences:`Préférences`,preferencesDescription:`Fréquence de scan, fourchette de prix et filtres.`,defaultMessage:`Me
21ssage par défaut`,defaultMessageDescription:`Configurez le premier message optionnel pour Facebook.`},fields:{searchName:`Nom de la recherche`,searchTerm:`Terme de recherche`,marketplace:`Place de marché`,category:`Catégorie`,subcategory:`Sous-catégorie`,primaryLocation:`Localisation principale`,includeKeywords:`Mots-clés à inclure`,includeKeywordsHint:`Mots ou expressions qui doivent apparaître dans les annonces (facultatif).`,excludeKeywords:`Mots-clés à exclure`,excludeKeywordsHint:`Mots ou expressions à filtrer des résultats (facultatif).`,advancedKeywordFilters:`Filtres de mots-clés avancés`,optionalFiltersHint:`Filtres optionnels pour affiner les résultats au-delà du terme principal.`,searchNamePlaceholder:`ex. Chasse appareil vintage`,searchTermPlaceholder:`ex. Leica M6`,categoryNamePlaceholder:`ex. Civic sous 15k`,keywordChipPlaceholder:`Tapez un mot ou expression, puis Entrée`,characterLimitReached:`Limite de caractères atteinte`,maxKeywordsReached:`Nombre maximal de mots-clés atteint`,optionalKeywordsHint:`Facultatif. Les titres doivent correspondre à un terme inclus (le cas échéant) et ne pas contenir de termes exclus.`,howKeywordsWorkTitle:`Comment ça marche`,howKeywordsWorkBody:`La surveillance s'exécute sur votre terme de recherche ci-dessus. Les mots-clés à inclure et à exclure s'appliquent uniquement aux titres des annonces : ils aident à afficher des correspondances plus pertinentes et à filtrer les résultats non pertinents (par exemple les annonces de pièces génériques ou les expressions hors sujet) sans modifier la requête principale exécutée par le système.`,excludeKeywordPlaceholder:`ex. pièces, cassé â puis Entrée`},stepLabel:`Ãtape {step}`,categorySearchTitle:`Recherche {category}`,catalogPrefsHint:`Définissez votre zone de recherche, la fréquence de scan et les filtres optionnels pour cette catégorie.`,vehicle:{chooseMakes:`Choisir des marques`,chooseModels:`Choisir des modèles`,selectAny:`Sélectionner Tout`,selectAll:`Tout sélectionner`,clearAll:`Tout effacer`,anyModelHelp:`Tout modèle inclut chaque modèle de cette marque dans les résultats.`},location:{country:`Pays`,city:`Ville`,loadingCountries:`Chargement des paysâ¦`,loadingCities:`Chargement des villesâ¦`,noCountries:`Aucun pays disponible pour cette place de marché.`,noCities:`Aucune ville disponible pour cette zone.`,selectCity:`Sélectionner une ville`,selectCountryFirst:`Sélectionnez d'abord un pays`,selectCountry:`Veuillez sélectionner un pays.`,selectCityError:`Veuillez sélectionner une ville.`,radiusKm:`Rayon (KM)`,clearRadius:`Effacer le rayon`,radiusError:`Choisissez un rayon dans la liste ou effacez votre sélection.`,nearbyTitle:`Localisations proches (max. {max})`,nearbyBody:`Un très grand rayon peut diluer les résultats. Ajouter des localisations proches divise la couverture en plusieurs petites zones autour de votre ville, ce qui améliore généralement les résultats. Chaque localisation activée utilise une recherche active supplémentaire de votre forfait. Vous pouvez définir la fréquence de scan de chaque localisation à l'étape suivante.`,nearbyBodyAreas:`plusieurs petites zones`,nearbyBodyAdditional:`recherche active supplémentaire`,nearbyBodyScanFrequency:`fréquence de scan de chaque localisation`},preferences:{scanFrequency:`Fréquence de scan`,clearAll:`Tout effacer`,scanFrequencyHint:`Choisissez une vitesse de scan pour chaque zone activée. Dans chaque menu, les nombres à droite indiquent combien d'exécutions il vous reste à cette vitesse après vos choix actuels, sur la limite de votre forfait pour ce niveau.`,scanFrequencyHintBold:`combien d'exécutions il vous reste à cette vitesse après vos choix actuels`,selectScanFrequency:`Sélectionner la fréquence de scan`,selectScanFrequencyError:`Veuillez sélectionner une fréquence de scan pour cette localisation.`,priceRangeOptional:`Fourchette de prix (facultatif)`,includeUnpriced:`Inclure sans prix`,includeUnpricedDescription:`Inclure les annonces sans prix indiqué.`},defaultMessage:{title:`Message par défaut`,description:`Configurez le premier message optionnel pour Facebook.`,enableAutoReply:`Activer la réponse automatique`,enableAutoReplyDescription:`Envoyer un message immédiat au vendeur lors d'une correspondance.`,placeholder:`Bonjour, est-ce encore disponible ?`},extensionBanner:{title:`Extension de navigateur hors ligne`,body:`Les premiers messages automatiques ne seront pas envoyés tant que votre extension est déconnectée. Réactivez l'extension avant de compter sur ce paramètre.`,settingsLink:`Ouvrir les paramètres de l'extension pour l'aide à la configuration`},marketplace:{selectMarketplace:`Sélectionner une place de marché`,comingSoon:`Bientôt disponible`,vehicleSearch:`Recherche véhicule`,autotraderVehicleOnly:`AutoTrader est pour les inventaires de véhicules.`,useCategoryOrVehicle:`Utiliser une recherche par catégorie ou véhicule`,selectMarketplaceError:`Sélectionnez une place de marché`},actions:{saveChanges:`Enregistrer les modifications`,saveDuplicated:`Enregistrer la recherche dupliquée`,saveSearch:`Enregistrer la recherche`,saveSearchDeployed:`Agent de recherche déployé.`,searchDuplicated:`Recherche dupliquée.`,searchUpdated:`Recherche mise à jour.`,updateFailed:`Ãchec de la mise à jour.`,deploymentFailed:`Ãchec du déploiement.`,onlyAnythingEditable:`Seules les recherches Tout (mot-clé) peuvent être modifiées ici pour le moment.`,marketplaceNotSupported:`Cette place de marché n'est pas prise en charge dans l'éditeur web pour le moment.`,locationResolveError:`Impossible de résoudre la localisation de cette recherche.`,searchStillLoading:`La recherche est encore en chargement. Réessayez dans un instant.`,catalogSaveUnavailable:`L'enregistrement des recherches catalogue non-véhicule depuis le web n'est pas encore disponible.`,chooseMarketplaceAndFrequency:`Choisissez une place de marché et une fréquence de scan avant de sauvegarder.`},validation:{searchNameRequired:`Le nom de la recherche est requis`,searchNameMax:`Le nom de la recherche doit contenir {max} caractères ou moins`,searchTermRequired:`Le terme de recherche est requis`,searchTermMin:`Le terme de recherche doit contenir au moins {min} caractères`,searchTermMax:`Le terme de recherche doit contenir {max} caractères ou moins`,keywordsMaxTotal:`Les mots-clés ne peuvent pas dépasser {max} caractères au total.`,keywordsMaxTotalTyping:`Les mots-clés ne peuvent pas dépasser {max} caractères au total (y compris ce que vous tapez).`,keywordPressEnter:`Appuyez sur Entrée pour ajouter ce mot-clé, ou effacez le champ.`,validNumber:`Veuillez saisir un nombre val
21ide`,priceNegative:`Le prix ne peut pas être négatif`,priceRangeInvalid:`Le prix max. doit être supérieur ou égal au prix min.`,defaultMessageRequired:`Saisissez un message par défaut ou désactivez cette option`,defaultMessageMaxLines:`Le message doit contenir {max} lignes ou moins`,defaultMessageMaxChars:`Le message doit contenir {max} caractères ou moins`,quotaNeedSlots:`Quota pour {interval} min : vous avez besoin de {count} emplacements mais seulement {remaining} restent pour cet intervalle. Réduisez les localisations supplémentaires, changez leurs fréquences de scan ou mettez à niveau.`,quotaLimitReached:`Limite de quota atteinte pour l'intervalle de {interval} min. Choisissez une autre fréquence ou mettez à niveau votre forfait.`,selectMarketplace:`Sélectionnez une place de marché.`,selectMake:`Sélectionnez au moins une marque.`,selectModelPerMake:`Pour chaque marque, choisissez des modèles ou Tout modèle pour cette marque.`,required:`Requis`,invalidChoice:`Choix invalide`,selectMakeError:`Sélectionner des marques`,selectMakesFirst:`Sélectionnez d'abord des marques`,model:`Modèle`,selectModel:`Sélectionner un modèle`,loadMakesError:`Impossible de charger les marques.`,loadModelsError:`Impossible de charger certains modèles.`,makes:`Marques`,models:`Modèles`,anyMake:`Toute marque`,anyModel:`Tout modèle`,searchMakes:`Rechercher des marquesâ¦`,searchModels:`Rechercher des modèles ou marquesâ¦`,minYear:`Année min.`,maxYear:`Année max.`,minMileage:`Kilométrage min.`,maxMileage:`Kilométrage max.`,transmission:`Transmission`,fuelType:`Type de carburant`,automatic:`Automatique`,manual:`Manuelle`,semiAutomatic:`Semi-automatique`,diesel:`Diesel`,electric:`Ãlectrique`,flexFuel:`Bi-carburant`,gasoline:`Essence`,hybrid:`Hybride`,hydrogen:`Hydrogène`,plugInHybrid:`Hybride rechargeable`,defaultCategory:`Par défaut`,passengerVehicles:`Véhicules de tourisme`},locationLoad:{timeout:`Cette requête a pris trop de temps. Vérifiez votre connexion et réessayez.`,network:`Impossible de joindre le serveur. Vérifiez votre connexion internet et réessayez.`,sessionExpired:`Votre session a peut-être expiré. Reconnectez-vous, puis rouvrez cette liste.`,forbidden:`Vous n'avez pas la permission de charger cette liste. Réessayez ou contactez le support si le problème persiste.`,notAvailable:`Cette liste n'est pas disponible pour le moment. Réessayez dans un instant.`,rateLimited:`Trop de requêtes envoyées. Veuillez patienter un moment et réessayez.`,badRequest:`La requête n'a pas pu être complétée. Vérifiez vos choix et réessayez.`,serverError:`Le service est temporairement indisponible. Veuillez réessayer dans quelques minutes.`,generic:`Une erreur s'est produite lors du chargement de cette liste. Veuillez réessayer.`}},permissionToast:{subscriptionHint:`Ouvrez Abonnement dans les Paramètres pour consulter vos options.`,searchCreateSubscription:`Impossible de créer des recherches pour le moment`,searchCreateSubscriptionDesc:`Votre abonnement est inactif ou a expiré. Souscrivez ou renouvelez pour ajouter de nouvelles recherches.`,searchCreateQuota:`Limite de recherches atteinte`,searchCreateQuotaDesc:`Vous avez utilisé tous les emplacements de recherche de votre forfait actuel. Supprimez une recherche, mettez une en pause ou mettez à niveau pour ajouter plus.`,searchEditSubscription:`Impossible de modifier les recherches pour le moment`,searchEditSubscriptionDesc:`La modification des recherches enregistrées nécessite un abonnement actif. Renouvelez votre forfait pour mettre à jour les paramètres.`,searchActivateSubscription:`Impossible d'activer la recherche`,searchActivateSubscriptionDesc:`Un abonnement actif est requis pour reprendre la surveillance. Renouvelez votre forfait pour activer cette recherche.`,searchActivateQuota:`Impossible d'activer la recherche`,searchActivateQuotaDesc:`Vous avez atteint la limite de recherches de votre forfait. Mettez une autre recherche en pause ou mettez à niveau pour activer celle-ci.`,chatSubscription:`Discussions non disponibles`,chatSubscriptionDesc:`Un abonnement actif est requis pour les discussions et Mes annonces.`,chatPlan:`Discussions non incluses dans votre forfait`,chatPlanDesc:`Votre forfait actuel n'inclut pas la messagerie intégrée. Mettez à niveau vers un forfait avec discussions activées.`,aiAddonRequired:`Extension négociation IA requise`,aiAddonRequiredDesc:`Activez l'extension Négociation IA pour utiliser les paramètres et fonctionnalités de négociation IA.`,aiSubscription:`Fonctionnalités IA non disponibles`,aiSubscriptionDesc:`Un abonnement actif est requis pour la négociation IA. Renouvelez votre forfait pour continuer.`,repostAddonRequired:`Extension republication requise`,repostAddonRequiredDesc:`Activez l'extension Republication pour configurer la republication automatique de vos annonces.`,repostSubscription:`Republication non disponible`,repostSubscriptionDesc:`Un abonnement actif est requis pour les fonctionnalités de republication. Renouvelez votre forfait pour continuer.`,generic:`Cette action n'est pas disponible pour le moment`,genericDesc:`Vérifiez votre abonnement et les limites de votre forfait.`},searchActionToast:{activateTitle:`Impossible d'activer la recherche`,deactivateTitle:`Impossible de mettre la recherche en pause`,deleteTitle:`Impossible de supprimer la recherche`,timeoutDesc:`Cela a pris plus de temps que prévu. Vérifiez votre connexion et réessayez.`,networkDesc:`Impossible de joindre nos serveurs. Vérifiez votre connexion internet et réessayez.`,genericError:`Une erreur s'est produite. Veuillez réessayer.`,sessionExpired:`Votre session a expiré ou vous êtes déconnecté. Reconnectez-vous, puis réessayez.`,usageLimitDefault:`Vous avez atteint le nombre maximal de recherches actives pour cette fréquence de scan sur votre forfait. Mettez une autre recherche en pause ou mettez à niveau pour continuer.`,frequencyNotInPlan:`Cette fréquence de scan n'est pas incluse dans votre forfait actuel. Choisissez une autre fréquence ou mettez à niveau votre abonnement.`,noActiveSubscription:`Un abonnement actif est requis pour activer les recherches.`,usageLimitReached:`Vous avez atteint le nombre maximal de recherches actives pour cette fréquence de scan. Mettez une autre recherche en pause ou mettez à niveau votre forfait pour continuer.`,cannotActivatePlan:`Cette recherche ne peut pas être activée avec votre forfait actuel. Mettez une autre recherche en pause ou consultez votre abonnement.`,emailNotVerified:`Vérifiez votre adresse e-mail avec le lien que nous vous avons envoyé, puis réessayez.`,subscriptionRequired:`Un abonnement actif est requis. Consultez votre forfait sur la page Tarifs.`,notAllowed:`Vous n'êtes pas autorisé à effectuer cette action avec votre compte actuel. Contactez le support si vous avez besoin d'aide.`,searchNotFound:`Cette recherche n'est plus disponible. Actualisez la page pour voir vos re
21cherches actuelles.`,waitTitle:`Veuillez patienter un moment`,rateLimited:`Vous avez envoyé plusieurs mises à jour en peu de temps. Attendez une minute, puis réessayez.`,serverError:`Nous rencontrons un problème temporaire. Veuillez réessayer sous peu.`,inactiveAccount:`Ce compte est inactif. Contactez le support si vous avez besoin de restaurer votre compte.`,processFailed:`Nous n'avons pas pu traiter cette requête. Actualisez la page et réessayez.`,tryAgainSoon:`Une erreur s'est produite. Veuillez réessayer dans quelques secondes.`},listingOverlay:{back:`Retour`,phone:`Téléphone`,primaryPhone:`Téléphone principal`,textSms:`Texte / SMS`,fromDescription:`Depuis la description ({count})`,viewListing:`Voir l'annonce`,viewOnProvider:`Voir sur {provider}`,provider:`Fournisseur`,invalidListing:`Annonce invalide`,brokenLink:`Le lien que vous avez suivi semble être incorrect.`,loadError:`Une erreur s'est produite lors du chargement de cette annonce.`,notFound:`Annonce introuvable.`,mightBeRemoved:`Cette annonce a peut-être été supprimée.`,goBack:`Retour`,specifications:`Caractéristiques`,year:`Année`,mileage:`Kilométrage`,transmission:`Transmission`,fuel:`Carburant`,exterior:`Extérieur`,interior:`Intérieur`,condition:`Ãtat`,aiMarketAnalysis:`Analyse de marché IA`,estimatedMarketValue:`Valeur marchande estimée`,comparables:`Comparables`,foundCount:`{count} trouvés`,marketRange:`Fourchette du marché`,description:`Description`,showLess:`Afficher moins`,showMore:`Afficher plus`,saved:`Enregistrée`,saveListing:`Enregistrer l'annonce`,chatWithSeller:`Discuter avec le vendeur`,openingChat:`Ouverture de la discussionâ¦`,linkUnavailable:`Lien indisponible`,resync:`Resynchroniser`,seller:`Vendeur`,contactNumbers:`Numéros de contact`,listed:`Publiée`,found:`Trouvée`,similarListings:`Annonces similaires`,similarSubtitle:`D'autres véhicules correspondant à ce profil.`,noSimilar:`Aucune annonce similaire trouvée.`,share:`Partager`,linkCopied:`Lien copié`,shareCopied:`Lien de partage copié dans le presse-papiers.`,shareCopiedExpires:`Lien de partage copié. Expire le {date}.`,invalidListingId:`Annonce invalide`,subscriptionRequired:`Abonnement requis pour voir les annonces.`,couldNotLoad:`Impossible de charger cette annonce.`,listingNotFoundChat:`Cette annonce est introuvable.`,signInAgainChat:`Veuillez vous reconnecter pour démarrer une discussion.`,chatUnavailable:`Impossible de démarrer une discussion pour le moment. Veuillez réessayer.`,chatStartFailed:`Une erreur s'est produite lors du démarrage de la discussion.`,shareListingAria:`Partager l'annonce`,resyncListingAria:`Resynchroniser l'annonce depuis la place de marché`,sold:`Vendu`,pending:`En attente`,unavailable:`Indisponible`},chatsExtra:{couldntLoadConversation:`Impossible de charger la conversation`,inboxReadyTitle:`Votre boîte de réception est prête`,inboxReadyBody:`Choisissez une conversation dans la liste pour lire les messages et répondre aux acheteurs.`,backToChatList:`Retour à la liste des discussions`,viewListingDetails:`Voir les détails de l'annonce`,listingUnavailable:`Annonce indisponible`,aiOn:`IA activée`,openAiNegotiationSettings:`Ouvrir les réglages de négociation IA`,aiNegotiationSettings:`Réglages de négociation IA`,noMessagesYet:`Aucun message`,sendFirstMessage:`Envoyez le premier message à {name} pour démarrer la conversation.`,extensionTooltip:`L'extension de navigateur InstaSnag lie votre compte à Facebook Marketplace pour la messagerie. Gardez-la active pour la synchronisation et les réponses automatiques.`,readMore:`En savoir plus`,aiNegotiationEnabled:`Négociation IA activée`,needsAttention:`Nécessite une attention`,unreadOne:`{count} message non lu`,unreadOther:`{count} messages non lus`},legalDoc:{effective:`En vigueur le {date}`,lastUpdated:`Dernière mise à jour le {date}`,seeAlso:`Voir aussi :`,contact:`Contact :`,email:`Courriel :`,privacy:`Confidentialité :`,privacyContact:`Contact confidentialité`,legalContact:`Contact juridique InstaSnag`}}};function uy(e,t){let n=e;for(let e of t.split(`.`)){if(typeof n!=`object`||!n||!(e in n))return;n=n[e]}return n}function dy(e,t){return t?e.replace(/\{(\w+)\}/g,(e,n)=>{let r=t[n];return r===void 0?`{${n}}`:String(r)}):e}function fy(e,t,n){let r=uy(ly[e],t),i=uy(ly.en,t);return dy(typeof r==`string`?r:typeof i==`string`?i:t,n)}function py(){let e=(0,b.useContext)(ny);if(!e)throw Error(`useLocaleContext must be used within LocaleProvider`);return e}function my(){let{locale:e}=py();return(0,b.useCallback)((t,n)=>
21fy(e,t,n),[e])}function hy(e,t,n=`en`){return fy(n,e,t)}var gy=(0,b.createContext)(null);function _y(e){if(!Array.isArray(e))return;let t=[];for(let n of e){if(!n||typeof n!=`object`||Array.isArray(n))continue;let e=n;t.push({notification_interval_minutes:typeof e.notification_interval_minutes==`number`?e.notification_interval_minutes:60,max_searches:typeof e.max_searches==`number`?e.max_searches:0,searches_used:typeof e.searches_used==`number`?e.searches_used:0,searches_remaining:typeof e.searches_remaining==`number`?e.searches_remaining:0,utilization_percent:typeof e.utilization_percent==`number`?e.utilization_percent:0})}return t}function vy(e,t){let n=_y(t.tiers);return{...e,can_create_search:typeof t.can_create_search==`boolean`?t.can_create_search:e.can_create_search,can_edit_search:typeof t.can_edit_search==`boolean`?t.can_edit_search:e.can_edit_search,can_view_listings:typeof t.can_view_listings==`boolean`?t.can_view_listings:e.can_view_listings,can_receive_notifications:typeof t.can_receive_notifications==`boolean`?t.can_receive_notifications:e.can_receive_notifications,can_chat:typeof t.can_chat==`boolean`?t.can_chat:e.can_chat,can_use_extension_first_message:typeof t.can_use_extension_first_message==`boolean`?t.can_use_extension_first_message:e.can_use_extension_first_message,has_ai_negotiation_addon:typeof t.has_ai_negotiation_addon==`boolean`?t.has_ai_negotiation_addon:e.has_ai_negotiation_addon,has_repost_addon:typeof t.has_repost_addon==`boolean`?t.has_repost_addon:e.has_repost_addon,plan_name:typeof t.plan_name==`string`?t.plan_name:e.plan_name,status:typeof t.status==`string`?t.status:e.status,tiers:n??e.tiers}}function yy(e,t){let n=e.plan?{...e.plan,...typeof t.plan_name==`string`?{name:t.plan_name}:{},...typeof t.plan_description==`string`?{description:t.plan_description}:{},...typeof t.price_monthly==`number`?{price_monthly:t.price_monthly}:{}}:null;return{...e,status:typeof t.status==`string`?t.status:e.status,current_period_end:typeof t.current_period_end==`string`?t.current_period_end:t.current_period_end===null?null:e.current_period_end,has_ai_negotiation_addon:typeof t.has_ai_negotiation_addon==`boolean`?t.has_ai_negotiation_addon:e.has_ai_negotiation_addon,has_repost_addon:typeof t.has_repost_addon==`boolean`?t.has_repost_addon:e.has_repost_addon,plan:n}}function by({children:e}){let{isAuthenticated:t,status:n}=Jv(),[r,i]=(0,b.useState)(null),[a,o]=(0,b.useState)(`idle`),[s,c]=(0,b.useState)(null),l=t?r:null,u=t?a:`idle`,d=t?s:null,f=(0,b.useCallback)(async()=>{if(!t){i(null),o(`idle`),c(null);return}o(`loading`),c(null);try{i((await Lo.get(`/api/subscriptions/my-subscription`)).data),o(`ready`)}catch(e){if(e instanceof ho){if(e.status===404){i(null),o(`ready`);return}if(e.status===403){i(null),o(`ready`);return}}i(null),o(`error`),c(e instanceof Error?e.message:`Failed to load subscription`)}},[t]);(0,b.useEffect)(()=>{if(n===`loading`||!t)return;let e=window.setTimeout(()=>{f()},0);return()=>window.clearTimeout(e)},[n,t,f]);let p=(0,b.useCallback)(async()=>{await f()},[f]),m=(0,b.useCallback)(e=>{i(t=>t&&yy(t,e))},[]),h=(0,b.useMemo)(()=>({subscription:l,status:u,error:d,hasSubscription:!!l,refreshSubscription:p,patchSubscription:m}),[l,u,d,p,m]);return(0,V.jsx)(gy.Provider,{value:h,children:e})}var xy=(0,b.createContext)(null);function Sy(){let e=(0,b.useContext)(gy);if(!e)throw Error(`useSubscription must be used within SubscriptionProvider`);return e}async function Cy(){return(await Lo.get(`/api/subscriptions/access-status`)).data}async function wy(e,t){return(await Lo.post(`/api/subscriptions/billing-portal`,{product_type:e,return_path:t??`/settings/subscription`})).data.url}async function Ty(){return(await Lo.get(`/api/subscriptions/plans`,{skipAuth:!0})).data.plans.filter(e=>e.is_active)}function Ey(e){let t={scraper:[],repost:[],ai:[]};for(let n of e)n.product_type in t&&t[n.product_type].push(n);return t.scraper.sort((e,t)=>(e.price_monthly??0)-(t.price_monthly??0)),t}var Dy=365.2425,Oy=6048e5,ky=864e5,Ay=6e4,jy=36e5,My=3600*24;My*7,My*Dy/12*3;var Ny=Symbol.for(`constructDateFrom`);function Py(e,t){return typeof e==`function`?e(t):e&&typeof e==`object`&&Ny in e?e[Ny](t):e instanceof Date?new e.constructor(t):new Date(t)}function Fy(e,t){return Py(t||e,e)}var Iy={};function Ly(){return Iy}function Ry(e,t){let n=Ly(),r=t?.weekStartsOn??t?.locale?.options?.weekStartsOn??n.weekStartsOn??n.locale?.options?.weekStartsOn??0,i=Fy(e,t?.in),a=i.getDay(),o=(a<r?7:0)+a-r;return i.setDate(i.getDate()-o),i.setHours(0,0,0,0),i}function zy(e,t){return Ry(e,{...t,weekStartsOn:1}
vendor: 5,616 bytes, line 21
21)}function By(e,t){let n=Fy(e,t?.in),r=n.getFullYear(),i=Py(n,0);i.setFullYear(r+1,0,4),i.setHours(0,0,0,0);let a=zy(i),o=Py(n,0);o.setFullYear(r,0,4),o.setHours(0,0,0,0);let s=zy(o);return n.getTime()>=a.getTime()?r+1:n.getTime()>=s.getTime()?r:r-1}function Vy(e){let t=Fy(e),n=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()));return n.setUTCFullYear(t.getFullYear()),e-+n}function Hy(e,...t){let n=Py.bind(null,e||t.find(e=>typeof e==`object`));return t.map(n)}function Uy(e,t){let n=Fy(e,t?.in);return n.setHours(0,0,0,0),n}function Wy(e,t,n){let[r,i]=Hy(n?.in,e,t),a=Uy(r),o=Uy(i),s=+a-Vy(a),c=+o-Vy(o);return Math.round((s-c)/ky)}function Gy(e,t){let n=By(e,t),r=Py(t?.in||e,0);return r.setFullYear(n,0,4),r.setHours(0,0,0,0),zy(r)}function Ky(e){return e instanceof Date||typeof e==`object`&&Object.prototype.toString.call(e)===`[object Date]`}function qy(e){return!(!Ky(e)&&typeof e!=`number`||isNaN(+Fy(e)))}function Jy(e,t){let n=Fy(e,t?.in);return n.setFullYear(n.getFullYear(),0,1),n.setHours(0,0,0,0),n}var Yy={lessThanXSeconds:{one:`less than a second`,other:`less than {{count}} seconds`},xSeconds:{one:`1 second`,other:`{{count}} seconds`},halfAMinute:`half a minute`,lessThanXMinutes:{one:`less than a minute`,other:`less than {{count}} minutes`},xMinutes:{one:`1 minute`,other:`{{count}} minutes`},aboutXHours:{one:`about 1 hour`,other:`about {{count}} hours`},xHours:{one:`1 hour`,other:`{{count}} hours`},xDays:{one:`1 day`,other:`{{count}} days`},aboutXWeeks:{one:`about 1 week`,other:`about {{count}} weeks`},xWeeks:{one:`1 week`,other:`{{count}} weeks`},aboutXMonths:{one:`about 1 month`,other:`about {{count}} months`},xMonths:{one:`1 month`,other:`{{count}} months`},aboutXYears:{one:`about 1 year`,other:`about {{count}} years`},xYears:{one:`1 year`,other:`{{count}} years`},overXYears:{one:`over 1 year`,other:`over {{count}} years`},almostXYears:{one:`almost 1 year`,other:`almost {{count}} years`}},Xy=(e,t,n)=>{let r,i=Yy[e];return r=typeof i==`string`?i:t===1?i.one:i.other.replace(`{{count}}`,t.toString()),n?.addSuffix?n.comparison&&n.comparison>0?`in `+r:r+` ago`:r};function Zy(e){return(t={})=>{let n=t.width?String(t.width):e.defaultWidth;return e.formats[n]||e.formats[e.defaultWidth]}}var Qy={date:Zy({formats:{full:`EEEE, MMMM do, y`,long:`MMMM do, y`,medium:`MMM d, y`,short:`MM/dd/yyyy`},defaultWidth:`full`}),time:Zy({formats:{full:`h:mm:ss a zzzz`,long:`h:mm:ss a z`,medium:`h:mm:ss a`,short:`h:mm a`},defaultWidth:`full`}),dateTime:Zy({formats:{full:`{{date}} 'at' {{time}}`,long:`{{date}} 'at' {{time}}`,medium:`{{date}}, {{time}}`,short:`{{date}}, {{time}}`},defaultWidth:`full`})},$y={lastWeek:`'last' eeee 'at' p`,yesterday:`'yesterday at' p`,today:`'today at' p`,tomorrow:`'tomorrow at' p`,nextWeek:`eeee 'at' p`,other:`P`},eb=(e,t,n,r)=>$y[e];function tb(e){return(t,n)=>{let r=n?.context?String(n.context):`standalone`,i;if(r===`formatting`&&e.formattingValues){let t=e.defaultFormattingWidth||e.defaultWidth,r=n?.width?String(n.width):t;i=e.formattingValues[r]||e.formattingValues[t]}else{let t=e.defaultWidth,r=n?.width?String(n.width):e.defaultWidth;i=e.values[r]||e.values[t]}let a=e.argumentCallback?e.argumentCallback(t):t;return i[a]}}var nb={ordinalNumber:(e,t)=>{let n=Number(e),r=n%100;if(r>20||r<10)switch(r%10){case 1:return n+`st`;case 2:return n+`nd`;case 3:return n+`rd`}return n+`th`},era:tb({values:{narrow:[`B`,`A`],abbreviated:[`BC`,`AD`],wide:[`Before Christ`,`Anno Domini`]},defaultWidth:`wide`}),quarter:tb({values:{narrow:[`1`,`2`,`3`,`4`],abbreviated:[`Q1`,`Q2`,`Q3`,`Q4`],wide:[`1st quarter`,`2nd quarter`,`3rd quarter`,`4th quarter`]},defaultWidth:`wide`,argumentCallback:e=>e-1}),month:tb({values:{narrow:[`J`,`F`,`M`,`A`,`M`,`J`,`J`,`A`,`S`,`O`,`N`,`D`],abbreviated:[`Jan`,`Feb`,`Mar`,`Apr`,`May`,`Jun`,`Jul`,`Aug`,`Sep`,`Oct`,`Nov`,`Dec`],wide:[`January`,`February`,`March`,`April`,`May`,`June`,`July`,`August`,`September`,`October`,`November`,`December`]},defaultWidth:`wide`}),day:tb({values:{narrow:[`S`,`M`,`T`,`W`,`T`,`F`,`S`],short:[`Su`,`Mo`,`Tu`,`We`,`Th`,`Fr`,`Sa`],abbreviated:[`Sun`,`Mon`,`Tue`,`Wed`,`Thu`,`Fri`,`Sat`],wide:[`Sunday`,`Monday`,`Tuesday`,`Wednesday`,`Thursday`,`Friday`,`Saturday`]},defaultWidth:`wide`}),dayPeriod:tb({values:{narrow:{am:`a`,pm:`p`,midnight:`mi`,noon:`n`,morning:`morning`,afternoon:`afternoon`,evening:`evening`,night:`night`},abbreviated:{am:`AM`,pm:`PM`,midnight:`midnight`,noon:`noon`,morning:`morning`,afternoon:`afternoon`,evening:`evening`,night:`night`},wide:{am:`a.m.`,pm:`p.m.`,midnight:`midnight`,noon:`noon`,morning:`morning`,afternoon:`afternoon`,evening:`evening`,night:`night`}},defaultWidth:`wide`,formattingValues:{narrow:{am:`a`,pm:`p`,midnight:`mi`,noon:`n`,morning:`in the morning`,afternoon:`in the afternoon`,evening:`in the evening`,night:`at night`},abbreviated:{am:`AM`,pm:`PM`,midnight:`midnight`,noon:`noon`,morning:`in the morning`,afternoon:`in the afternoon`,evening:`in the evening`,night:`at night`},wide:{am:`a.m.`,pm:`p.m.`,midnight:`midnight`,noon:`noon`,morning:`in the morning`,afternoon:`in the afternoon`,evening:`in the evening`,night:`at night`}},defaultFormattingWidth:`wide`})};function rb(e){return(t,n={})=>{let r=n.width,i=r&&e.matchPatterns[r]||e.matchPatterns[e.defaultMatchWidth],a=t.match(i);if(!a)return null;let o=a[0],s=r&&e.parsePatterns[r]||e.parsePatterns[e.defaultParseWidth],c=Array.isArray(s)?ab(s,e=>e.test(o)):ib(s,e=>e.test(o)),l;l=e.valueCallback?e.valueCallback(c):c,l=n.valueCallback?n.valueCallback(l):l;let u=t.slice(o.length);return{value:l,rest:u}}
vendor: 6,444 bytes, line 21
21}function ib(e,t){for(let n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&t(e[n]))return n}function ab(e,t){for(let n=0;n<e.length;n++)if(t(e[n]))return n}function ob(e){return(t,n={})=>{let r=t.match(e.matchPattern);if(!r)return null;let i=r[0],a=t.match(e.parsePattern);if(!a)return null;let o=e.valueCallback?e.valueCallback(a[0]):a[0];o=n.valueCallback?n.valueCallback(o):o;let s=t.slice(i.length);return{value:o,rest:s}}}var sb={code:`en-US`,formatDistance:Xy,formatLong:Qy,formatRelative:eb,localize:nb,match:{ordinalNumber:ob({matchPattern:/^(\d+)(th|st|nd|rd)?/i,parsePattern:/\d+/i,valueCallback:e=>parseInt(e,10)}),era:rb({matchPatterns:{narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},defaultMatchWidth:`wide`,parsePatterns:{any:[/^b/i,/^(a|c)/i]},defaultParseWidth:`any`}),quarter:rb({matchPatterns:{narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},defaultMatchWidth:`wide`,parsePatterns:{any:[/1/i,/2/i,/3/i,/4/i]},defaultParseWidth:`any`,valueCallback:e=>e+1}),month:rb({matchPatterns:{narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},defaultMatchWidth:`wide`,parsePatterns:{narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},defaultParseWidth:`any`}),day:rb({matchPatterns:{narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},defaultMatchWidth:`wide`,parsePatterns:{narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},defaultParseWidth:`any`}),dayPeriod:rb({matchPatterns:{narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},defaultMatchWidth:`any`,parsePatterns:{any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},defaultParseWidth:`any`})},options:{weekStartsOn:0,firstWeekContainsDate:1}};function cb(e,t){let n=Fy(e,t?.in);return Wy(n,Jy(n))+1}function lb(e,t){let n=Fy(e,t?.in),r=zy(n)-+Gy(n);return Math.round(r/Oy)+1}function ub(e,t){let n=Fy(e,t?.in),r=n.getFullYear(),i=Ly(),a=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??i.firstWeekContainsDate??i.locale?.options?.firstWeekContainsDate??1,o=Py(t?.in||e,0);o.setFullYear(r+1,0,a),o.setHours(0,0,0,0);let s=Ry(o,t),c=Py(t?.in||e,0);c.setFullYear(r,0,a),c.setHours(0,0,0,0);let l=Ry(c,t);return+n>=+s?r+1:+n>=+l?r:r-1}function db(e,t){let n=Ly(),r=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??n.firstWeekContainsDate??n.locale?.options?.firstWeekContainsDate??1,i=ub(e,t),a=Py(t?.in||e,0);return a.setFullYear(i,0,r),a.setHours(0,0,0,0),Ry(a,t)}function fb(e,t){let n=Fy(e,t?.in),r=Ry(n,t)-+db(n,t);return Math.round(r/Oy)+1}function pb(e,t){return(e<0?`-`:``)+Math.abs(e).toString().padStart(t,`0`)}var mb={y(e,t){let n=e.getFullYear(),r=n>0?n:1-n;return pb(t===`yy`?r%100:r,t.length)},M(e,t){let n=e.getMonth();return t===`M`?String(n+1):pb(n+1,2)},d(e,t){return pb(e.getDate(),t.length)},a(e,t){let n=e.getHours()/12>=1?`pm`:`am`;switch(t){case`a`:case`aa`:return n.toUpperCase();case`aaa`:return n;case`aaaaa`:return n[0];default:return n===`am`?`a.m.`:`p.m.`}},h(e,t){return pb(e.getHours()%12||12,t.length)},H(e,t){return pb(e.getHours(),t.length)},m(e,t){return pb(e.getMinutes(),t.length)},s(e,t){return pb(e.getSeconds(),t.length)},S(e,t){let n=t.length,r=e.getMilliseconds();return pb(Math.trunc(r*10**(n-3)),t.length)}},hb={am:`am`,pm:`pm`,midnight:`midnight`,noon:`noon`,morning:`morning`,afternoon:`afternoon`,evening:`evening`,night:`night`},gb={G:function(e,t,n){let r=+(e.getFullYear()>0);switch(t){case`G`:case`GG`:case`GGG`:return n.era(r,{width:`abbreviated`});case`GGGGG`:return n.era(r,{width:`narrow`});default:return n.era(r,{width:`wide`})}},y:function(e,t,n){if(t===`yo`){let t=e.getFullYear(),r=t>0?t:1-t;return n.ordinalNumber(r,{unit:`year`})}return mb.y(e,t)},Y:function(e,t,n,r){let i=ub(e,r),a=i>0?i:1-i;return t===`YY`?pb(a%100,2):t===`Yo`?n.ordinalNumber(a,{unit:`year`}):pb(a,t.length)},R:function(e,t){return pb(By(e),t.length)},u:function(e,t){return pb(e.getFullYear(),t.length)},Q:function(e,t,n){let r=Math.ceil((e.getMonth()+1)/3);switch(t){case`Q`:return String(r);case`QQ`:return pb(r,2);case`Qo`:return n.ordinalNumber(r,{unit:`quarter`});case`QQQ`:return n.quarter(r,{width:`abbreviated`,context:`formatting`});case`QQQQQ`:return n.quarter(r,{width:`narrow`,context:`formatting`});default:return n.quarter(r,{width:`wide`,context:`formatting`})}},q:function(e,t,n){let r=Math.ceil((e.getMonth()+1)/3);switch(t){case`q`:return String(r);case`qq`:return pb(r,2);case`qo`:return n.ordinalNumber(r,{unit:`quarter`});case`qqq`:return n.quarter(r,{width:`abbreviated`,context:`standalone`});case`qqqqq`:return n.quarter(r,{width:`narrow`,context:`standalone`});default:return n.quarter(r,{width:`wide`,context:`standalone`})}},M:function(e,t,n){let r=e.getMonth();switch(t){case`M`:case`MM`:return mb.M(e,t);case`Mo`:return n.ordinalNumber(r+1,{unit:`month`});case`MMM`:return n.month(r,{width:`abbreviated`,context:`formatting`});case`MMMMM`:return n.month(r,{width:`narrow`,context:`formatting`});default:return n.month(r,{width:`wide`,context:`formatting`})}},L:function(e,t,n){let r=e.getMonth();switch(t){case`L`:return String(r+1);case`LL`:return pb(r+1,2);case`Lo`:return n.ordinalNumber(r+1,{unit:`month`});case`LLL`:return n.month(r,{width:`abbreviated`,context:`standalone`});case`LLLLL`:return n.month(r,{width:`narrow`,context:`standalone`});default:return n.month(r,{width:`wide`,context:`standalone`})}},w:function(e,t,n,r){let i=fb(e,r);return t===`wo`?n.ordinalNumber(i,{unit:`week`}):pb(i,t.length)},I:function(e,t,n){let r=lb(e);return t===`Io`?n.ordinalNumber(r,{unit:`week`}):pb(r,t.length)},d:function(e,t,n){return t===`do`?n.ordinalNumber(e.getDate(),{unit:`date`}):mb.d(e,t)},D:function(e,t,n){let r=cb(e);return t===`Do`?n.ordinalNumber(r,{unit:`dayOfYear`}):pb(r,t.length)},E:function(e,t,n){let r=e.getDay();
vendor: 4,204 bytes, line 21
21switch(t){case`E`:case`EE`:case`EEE`:return n.day(r,{width:`abbreviated`,context:`formatting`});case`EEEEE`:return n.day(r,{width:`narrow`,context:`formatting`});case`EEEEEE`:return n.day(r,{width:`short`,context:`formatting`});default:return n.day(r,{width:`wide`,context:`formatting`})}},e:function(e,t,n,r){let i=e.getDay(),a=(i-r.weekStartsOn+8)%7||7;switch(t){case`e`:return String(a);case`ee`:return pb(a,2);case`eo`:return n.ordinalNumber(a,{unit:`day`});case`eee`:return n.day(i,{width:`abbreviated`,context:`formatting`});case`eeeee`:return n.day(i,{width:`narrow`,context:`formatting`});case`eeeeee`:return n.day(i,{width:`short`,context:`formatting`});default:return n.day(i,{width:`wide`,context:`formatting`})}},c:function(e,t,n,r){let i=e.getDay(),a=(i-r.weekStartsOn+8)%7||7;switch(t){case`c`:return String(a);case`cc`:return pb(a,t.length);case`co`:return n.ordinalNumber(a,{unit:`day`});case`ccc`:return n.day(i,{width:`abbreviated`,context:`standalone`});case`ccccc`:return n.day(i,{width:`narrow`,context:`standalone`});case`cccccc`:return n.day(i,{width:`short`,context:`standalone`});default:return n.day(i,{width:`wide`,context:`standalone`})}},i:function(e,t,n){let r=e.getDay(),i=r===0?7:r;switch(t){case`i`:return String(i);case`ii`:return pb(i,t.length);case`io`:return n.ordinalNumber(i,{unit:`day`});case`iii`:return n.day(r,{width:`abbreviated`,context:`formatting`});case`iiiii`:return n.day(r,{width:`narrow`,context:`formatting`});case`iiiiii`:return n.day(r,{width:`short`,context:`formatting`});default:return n.day(r,{width:`wide`,context:`formatting`})}},a:function(e,t,n){let r=e.getHours()/12>=1?`pm`:`am`;switch(t){case`a`:case`aa`:return n.dayPeriod(r,{width:`abbreviated`,context:`formatting`});case`aaa`:return n.dayPeriod(r,{width:`abbreviated`,context:`formatting`}).toLowerCase();case`aaaaa`:return n.dayPeriod(r,{width:`narrow`,context:`formatting`});default:return n.dayPeriod(r,{width:`wide`,context:`formatting`})}},b:function(e,t,n){let r=e.getHours(),i;switch(i=r===12?hb.noon:r===0?hb.midnight:r/12>=1?`pm`:`am`,t){case`b`:case`bb`:return n.dayPeriod(i,{width:`abbreviated`,context:`formatting`});case`bbb`:return n.dayPeriod(i,{width:`abbreviated`,context:`formatting`}).toLowerCase();case`bbbbb`:return n.dayPeriod(i,{width:`narrow`,context:`formatting`});default:return n.dayPeriod(i,{width:`wide`,context:`formatting`})}},B:function(e,t,n){let r=e.getHours(),i;switch(i=r>=17?hb.evening:r>=12?hb.afternoon:r>=4?hb.morning:hb.night,t){case`B`:case`BB`:case`BBB`:return n.dayPeriod(i,{width:`abbreviated`,context:`formatting`});case`BBBBB`:return n.dayPeriod(i,{width:`narrow`,context:`formatting`});default:return n.dayPeriod(i,{width:`wide`,context:`formatting`})}},h:function(e,t,n){if(t===`ho`){let t=e.getHours()%12;return t===0&&(t=12),n.ordinalNumber(t,{unit:`hour`})}return mb.h(e,t)},H:function(e,t,n){return t===`Ho`?n.ordinalNumber(e.getHours(),{unit:`hour`}):mb.H(e,t)},K:function(e,t,n){let r=e.getHours()%12;return t===`Ko`?n.ordinalNumber(r,{unit:`hour`}):pb(r,t.length)},k:function(e,t,n){let r=e.getHours();return r===0&&(r=24),t===`ko`?n.ordinalNumber(r,{unit:`hour`}):pb(r,t.length)},m:function(e,t,n){return t===`mo`?n.ordinalNumber(e.getMinutes(),{unit:`minute`}):mb.m(e,t)},s:function(e,t,n){return t===`so`?n.ordinalNumber(e.getSeconds(),{unit:`second`}):mb.s(e,t)},S:function(e,t){return mb.S(e,t)},X:function(e,t,n){let r=e.getTimezoneOffset();if(r===0)return`Z`;switch(t){case`X`:return vb(r);case`XXXX`:case`XX`:return yb(r);default:return yb(r,`:`)}},x:function(e,t,n){let r=e.getTimezoneOffset();switch(t){case`x`:return vb(r);case`xxxx`:case`xx`:return yb(r);default:return yb(r,`:`)}},O:function(e,t,n){let r=e.getTimezoneOffset();switch(t){case`O`:case`OO`:case`OOO`:return`GMT`+_b(r,`:`);default:return`GMT`+yb(r,`:`)}},z:function(e,t,n){let r=e.getTimezoneOffset();switch(t){case`z`:case`zz`:case`zzz`:return`GMT`+_b(r,`:`);default:return`GMT`+yb(r,`:`)}},t:function(e,t,n){return pb(Math.trunc(e/1e3),t.length)},T:function(e,t,n){return pb(+e,t.length)}};function _b(e,t=``){let n=e>0?`-`:`+`,r=Math.abs(e),i=Math.trunc(r/60),a=r%60;return a===0?n+String(i):n+String(i)+t+pb(a,2)}function vb(e,t){return e%60==0?(e>
210?`-`:`+`)+pb(Math.abs(e)/60,2):yb(e,t)}function yb(e,t=``){let n=e>0?`-`:`+`,r=Math.abs(e),i=pb(Math.trunc(r/60),2),a=pb(r%60,2);return n+i+t+a}var bb=(e,t)=>{switch(e){case`P`:return t.date({width:`short`});case`PP`:return t.date({width:`medium`});case`PPP`:return t.date({width:`long`});default:return t.date({width:`full`})}},xb=(e,t)=>{switch(e){case`p`:return t.time({width:`short`});case`pp`:return t.time({width:`medium`});case`ppp`:return t.time({width:`long`});default:return t.time({width:`full`})}},Sb={p:xb,P:(e,t)=>{let n=e.match(/(P+)(p+)?/)||[],r=n[1],i=n[2];if(!i)return bb(e,t);let a;switch(r){case`P`:a=t.dateTime({width:`short`});break;case`PP`:a=t.dateTime({width:`medium`});break;case`PPP`:a=t.dateTime({width:`long`});break;default:a=t.dateTime({width:`full`});break}return a.replace(`{{date}}`,bb(r,t)).replace(`{{time}}`,xb(i,t))}},Cb=/^D+$/,wb=/^Y+$/,Tb=[`D`,`DD`,`YY`,`YYYY`];function Eb(e){return Cb.test(e)}function Db(e){return wb.test(e)}function Ob(e,t,n){let r=kb(e,t,n);if(console.warn(r),Tb.includes(e))throw RangeError(r)}function kb(e,t,n){let r=e[0]===`Y`?`years`:`days of the month`;return`Use \`${e.toLowerCase()}\` instead of \`${e}\` (in \`${t}\`) for formatting ${r} to the input \`${n}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}var Ab=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,jb=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,Mb=/^'([^]*?)'?$/,Nb=/''/g,Pb=/[a-zA-Z]/;function Fb(e,t,n){let r=Ly(),i=n?.locale??r.locale??sb,a=n?.firstWeekContainsDate??n?.locale?.options?.firstWeekContainsDate??r.firstWeekContainsDate??r.locale?.options?.firstWeekContainsDate??1,o=n?.weekStartsOn??n?.locale?.options?.weekStartsOn??r.weekStartsOn??r.locale?.options?.weekStartsOn??0,s=Fy(e,n?.in);if(!qy(s))throw RangeError(`Invalid time value`);let c=t.match(jb).map(e=>{let t=e[0];if(t===`p`||t===`P`){let n=Sb[t];return n(e,i.formatLong)}return e}).join(``).match(Ab).map(e=>{if(e===`''`)return{isToken:!1,value:`'`};let t=e[0];if(t===`'`)return{isToken:!1,value:Ib(e)};if(gb[t])return{isToken:!0,value:e};if(t.match(Pb))throw RangeError("Format string contains an unescaped latin alphabet character `"+t+"`");return{isToken:!1,value:e}});i.localize.preprocessor&&(c=i.localize.preprocessor(s,c));let l={firstWeekContainsDate:a,weekStartsOn:o,locale:i};return c.map(r=>{if(!r.isToken)return r.value;let a=r.value;(!n?.useAdditionalWeekYearTokens&&Db(a)||!n?.useAdditionalDayOfYearTokens&&Eb(a))&&Ob(a,t,String(e));let o=gb[a[0]];return o(s,a,i.localize,l)}).join(``)}function Ib(e){let t=e.match(Mb);return t?t[1].replace(Nb,`'`):e}function Lb(e,t){let n=()=>Py(t?.in,NaN),r=t?.additionalDigits??2,i=Hb(e),a;if(i.date){let e=Ub(i.date,r);a=Wb(e.restDateString,e.year)}if(!a||isNaN(+a))return n();let o=+a,s=0,c;if(i.time&&(s=Kb(i.time),isNaN(s)))return n();if(i.timezone){if(c=Jb(i.timezone),isNaN(c))return n()}else{let e=new Date(o+s),n=Fy(0,t?.in);return n.setFullYear(e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate()),n.setHours(e.getUTCHours(),e.getUTCMinutes(),e.getUTCSeconds(),e.getUTCMilliseconds()),n}return Fy(o+s+c,t?.in)}var Rb={dateTimeDelimiter:/[T ]/,timeZoneDelimiter:/[Z ]/i,timezone:/([Z+-].*)$/},zb=/^-?(?:(\d{3})|(\d{2})(?:-?(\d{2}))?|W(\d{2})(?:-?(\d{1}))?|)$/,Bb=/^(\d{2}(?:[.,]\d*)?)(?::?(\d{2}(?:[.,]\d*)?))?(?::?(\d{2}(?:[.,]\d*)?))?$/,Vb=/^([+-])(\d{2})(?::?(\d{2}))?$/;function Hb(e){let t={},n=e.split(Rb.dateTimeDelimiter),r;if(n.length>2)return t;if(/:/.test(n[0])?r=n[0]:(t.date=n[0],r=n[1],Rb.timeZoneDelimiter.test(t.date)&&(t.date=e.split(Rb.timeZoneDelimiter)[0],r=e.substr(t.date.length,e.length))),r){let e=Rb.timezone.exec(r);e?(t.time=r.replace(e[1],``),t.timezone=e[1]):t.time=r}return t}function Ub(e,t){let n=RegExp(`^(?:(\\d{4}|[+-]\\d{`+(4+t)+`})|(\\d{2}|[+-]\\d{`+(2+t)+`})$)`),r=e.match(n);if(!r)return{year:NaN,restDateString:``};let i=r[1]?parseInt(r[1]):null,a=r[2]?parseInt(r[2]):null;return{year:a===null?i:a*100,restDateString:e.slice((r[1]||r[2]).length)}}function Wb(e,t){if(t===null)return new Date(NaN);let n=e.match(zb);if(!n)return new Date(NaN);let r=!!n[4],i=Gb(n[1]),a=Gb(n[2])-1,o=Gb(n[3]),s=Gb(n[4]),c=Gb(n[5])-1;if(r)return ex(t,s,c)?Yb(t,s,c):new Date(NaN);{let e=new Date(0);return!Qb(t,a,o)||!$b(t,i)?new Date(NaN):(e.setUTCFullYear(t,a,Math.max(i,o)),e)}}function Gb(e){return e?parseInt(e):1}function Kb(e){let t=e.match(Bb);if(!t)return NaN;let n=qb(t[1]),r=qb(t[2]),i=qb(t[3]);return tx(n,r,i)?n*jy+r*Ay+i*1e3:NaN}function qb(e){return e&&parseFloat(e.replace(`,`,`.`))||0}function Jb(e){if(e===`Z`)return 0;let t=e.match(Vb);if(!t)return 0;let n=t[1]===`+`?-1:1,r=parseInt(t[2]),i=t[3]&&parseInt(t[3])||0;return nx(r,i)?n*(r*jy+i*Ay):NaN}function Yb(e,t,n){let r=new Date(0);r.setUTCFullYear(e,0,4);let i=r.getUTCDay()||7,a=(t-1)*7+n+1-i;return r.setUTCDate(r.getUTCDate()+a),r}var Xb=[31,null,31,30,31,30,31,31,30,31,30,31];function Zb(e){return e%400==0||e%4==0&&e%100!=0}function Qb(e,t,n){return t>=0&&t<=11&&n>=1&&n<=(Xb[t]||(Zb(e)?29:28))}function $b(e,t){return t>=1&&t<=(Zb(e)?366:365)}function ex(e,t,n){return t>=1&&t<=53&&n>=0&&n<=6}function tx(e,t,n){return e===24?t===0&&n===0:n>=0&&n<60&&t>=0&&t<60&&e>=0&&e<25}function nx(e,t){return t>=0&&t<=59}function rx(e){return{scraper:e(`plans.tabScraper`),repost:e(`plans.tabRepost`),ai:e(`plans.tabAi`)}}var ix=[`scraper`,`repost`,`ai`],ax={plans:[],isLoading:!0,error:null};function ox(){let[{plans:e,isLoading:t,error:n},r]=(0,b.useState)(ax),[i,a]=(0,b.useState)(0),o=(0,b.useCallback)(()=>{r(ax),a(e=>e+1)},[]);(0,b.useEffect)(()=>{let e=!1;return Ty().then(t=>{e||r({plans:t,isLoading:!1,error:null})}).catch(()=>{e||r({plans:[],isLoading:!1,error:`We couldn't load plans. Please try again shortly.`})}),()=>{e=!0}},[i]);let s=(0,b.useMemo)(()=>Ey(e),[e]);return{grouped:s,scraperIntervals:(0,b.useMemo)(()=>{let e=new Set;for(let t of s.scraper)for(let n of t.tiers)e.add(n.notification_interval_minutes);return[...e].sort((e,t)=>
21e-t)},[s.scraper]),isLoading:t,error:n,reload:o}}function sx(e,t){return e.tiers.find(e=>e.notification_interval_minutes===t)?.max_searches??0}function cx(e){return e==null?`â`:e.toLocaleString(`en-US`,{style:`currency`,currency:`USD`,minimumFractionDigits:2,maximumFractionDigits:2})}function lx(e,t){if(e<60)return t(`plans.featIntervalMin`,{minutes:e});let n=Math.floor(e/60),r=e%60;return r===0?n===1?t(`plans.featIntervalOneHour`):t(`plans.featIntervalHours`,{hours:n}):t(`plans.featIntervalHoursMinutes`,{hours:n,minutes:r})}function ux(e,t){switch(e.product_type){case`scraper`:{let n=[t(`plans.featCloudMonitoring`),t(`plans.featPriorityPush`)],r=[...e.tiers].sort((e,t)=>e.notification_interval_minutes-t.notification_interval_minutes);for(let e of r)n.push(t(`plans.featActiveSearches`,{count:e.max_searches,interval:lx(e.notification_interval_minutes,t)}));return e.first_message_extension_enabled&&n.push(t(`plans.featFbFirstMessage`)),n}case`ai`:return[t(`plans.featAiChat`),t(`plans.featAutoNegotiate`),t(`plans.featBuyerSellerMessaging`),t(`plans.featExtension`)];case`repost`:return[t(`plans.featAutoRepost`),t(`plans.featTopOfSearch`),t(`plans.featSetAndForget`),t(`plans.featExtension`)]}}function dx(e,t){return e===null||!t?null:Math.floor(e*(1-t/100)*100)/100}function fx(e){let t=e.discount_percent_off;if(!t)return null;let n=hx(e.discount_ends_at);return n!==null&&n.getTime()<=Date.now()?null:t}function px(e,t=hy){let n=fx(e);if(n===null)return null;let r=Number.isInteger(n)?n:Number(n.toFixed(2));return e.discount_ends_at?t(`settingsSub.percentOffUntil`,{percent:r,date:gx(e.discount_ends_at)}):t(`settingsSub.percentOff`,{percent:r})}function mx(e,t=hy){let n=(e.status||``).toLowerCase(),r=hx(e.current_period_end),i=r!==null&&r.getTime()>Date.now(),a=e.plan?.price_monthly??null,o=dx(a,fx(e))??a,s=o===null?null:t(`settingsSub.priceMonthly`,{price:cx(o)}),c=px(e,t);if(e.cancelled_at&&i)return{label:t(`settingsSub.statusCancelling`),tone:`warning`,detail:t(`settingsSub.accessUntil`,{date:gx(e.current_period_end)}),warning:null,discountNote:c};if(n===`expired`||!i&&r!==null)return{label:t(`settingsSub.statusExpired`),tone:`muted`,detail:t(`settingsSub.ended`,{date:gx(e.current_period_end)}),warning:null,discountNote:c};if(n===`billing_issue`||n===`past_due`)return{label:t(`settingsSub.statusPaymentFailed`),tone:`error`,detail:s,warning:t(`settingsSub.updatePaymentMethod`),discountNote:c};if(e.is_trial||n===`trialing`){let n=gx(e.current_period_end);return{label:t(`settingsSub.statusFreeTrial`),tone:`success`,detail:s?t(`settingsSub.freeUntilThen`,{date:n,price:s}):t(`settingsSub.freeUntil`,{date:n}),warning:null,discountNote:c}}if(n===`active`){let n=gx(e.current_period_end);return{label:t(`settingsSub.statusActive`),tone:`success`,detail:s?t(`settingsSub.renewsWithPrice`,{price:s,date:n}):t(`settingsSub.renews`,{date:n}),warning:null,discountNote:c}}return{label:n||t(`settingsSub.statusUnknown`),tone:`muted`,detail:s,warning:null,discountNote:c}}function hx(e){if(!e)return null;let t=new Date(e);return Number.isNaN(t.getTime())?null:t}function gx(e){let t=hx(e);return t?Fb(t,`MMMM d, yyyy`):`â`}function _x(e){if(e.status!==`cancelled`)return!1;let t=hx(e.current_period_end);return t?t.getTime()>Date.now():!1}function vx(e,t=hy){if(!e)return{kind:`none`};let n=hx(e.current_period_end),r=new Date;if(e.status===`cancelled`&&n!==null&&n.getTime()<=r.getTime())return{kind:`none`};let i=_x(e),a=e.status===`trialing`,o=e.status===`past_due`||e.status===`unpaid`,s=!!e.scheduled_plan_change,c,l;return a?(c=t(`settingsSub.uiTrial`),l=`success`):i?(c=t(`settingsSub.uiCancelsAtPeriodEnd`),l=`warning`):o?(c=t(`settingsSub.uiPaymentIssue`),l=`error`):s?(c=t(`settingsSub.uiPlanChangeScheduled`),l=`warning`):e.status===`pending_plan_change`?(c=t(`settingsSub.uiPlanChangePending`),l=`warning`):e.status===`active`?(c=t(`settingsSub.statusActive`),l=`success`):(c=e.status.replace(/_/g,` `),l=`muted`),{kind:`active`,subscription:e,statusLabel:c,statusTone:l,isTrialing:a,isCancelling:i,isPastDue:o,hasScheduledChange:s}}function yx(e){return e.scheduled_plan_change?.plan.name??null}function bx(e){return e.scheduled_plan_change?.effective_at??null}
21function xx(e){return e===`full_access`||e===`grace_period`}var Sx={canCreateSearch:!1,canEditSearch:!1,canViewListings:!1,canReceiveNotifications:!1,canChat:!1,canUseExtensionFirstMessage:!1,hasAiNegotiationAddon:!1,hasRepostAddon:!1,canAccessSellerProfile:!1,canUseAiNegotiationFeatures:!1,canUseRepostFeatures:!1};function Cx(e){if(!e)return{...Sx};let t=e.has_ai_negotiation_addon&&xx(e.access_level),n=e.has_repost_addon&&xx(e.access_level);return{canCreateSearch:e.can_create_search,canEditSearch:e.can_edit_search,canViewListings:e.can_view_listings,canReceiveNotifications:e.can_receive_notifications,canChat:e.can_chat,canUseExtensionFirstMessage:e.can_use_extension_first_message,hasAiNegotiationAddon:e.has_ai_negotiation_addon,hasRepostAddon:e.has_repost_addon,canAccessSellerProfile:e.can_access_seller_profile,canUseAiNegotiationFeatures:t,canUseRepostFeatures:n}}function wx(e){return!e||vx(e).kind!==`active`?{canChat:!1}:{canChat:e.has_ai_negotiation_addon}}function Tx(e){return!e||vx(e).kind!==`active`?{canUseExtensionFirstMessage:!1}:{canUseExtensionFirstMessage:!!e.plan?.first_message_extension_enabled}}function Ex(e){if(!e||vx(e).kind!==`active`)return{hasAiNegotiationAddon:!1,canUseAiNegotiationFeatures:!1};let t=e.has_ai_negotiation_addon;return{hasAiNegotiationAddon:t,canUseAiNegotiationFeatures:t}}function Dx(e){if(!e||vx(e).kind!==`active`)return{hasRepostAddon:!1,canUseRepostFeatures:!1};let t=e.has_repost_addon;return{hasRepostAddon:t,canUseRepostFeatures:t}}function Ox(e){let t=kx(e);return t===`rc_billing`||t===`stripe`}function kx(e){return e?e.trim().toLowerCase():null}var Ax=new Set([`full_access`,`grace_period`]);function jx(e,t){let n=e?Ax.has(e.access_level):!!t?.plan,r=e?e.has_ai_negotiation_addon:!!t?.has_ai_negotiation_addon,i=e?e.has_repost_addon:!!t?.has_repost_addon;return{ownsScraper:n,ownsRepost:i,ownsAi:r,ownsSellerProducts:i||r,ownsNothing:!n&&!i&&!r,stores:{scraper:kx(t?.scraper_store),repost:kx(t?.repost_store),ai:kx(t?.ai_store)},scraperPlanId:n?t?.plan?.id??null:null,scraperPlanPrice:n?t?.plan?.price_monthly??null:null,scheduledScraperPlanId:t?.scheduled_plan_change?.plan.id??null}}function Mx(e,t){return(t===`scraper`?e.ownsScraper:t===`repost`?e.ownsRepost:e.ownsAi)?Ox(e.stores[t]):!0}function Nx({children:e}){let{isAuthenticated:t,status:n}=Jv(),{subscription:r,status:i}=Sy(),[a,o]=(0,b.useState)(null),[s,c]=(0,b.useState)(`idle`),[l,u]=(0,b.useState)(null),d=t?a:null,f=t?s:`idle`,p=t?l:null,m=(0,b.useCallback)(async()=>{if(!t){o(null),c(`idle`),u(null);return}c(`loading`),u(null),o(null);try{o(await Cy()),c(`ready`)}catch(e){o(null),c(`error`),u(e instanceof ho||e instanceof Error?e.message:`Failed to load subscription access status`)}},[t]);(0,b.useEffect)(()=>{if(n===`loading`||!t)return;let e=window.setTimeout(()=>{m()},0);return()=>window.clearTimeout(e)},[n,t,m]);let h=(0,b.useCallback)(async()=>{await m()},[m]),g=(0,b.useCallback)(e=>{o(t=>t&&vy(t,e))},[]),_=(0,b.useMemo)(()=>{let e=Cx(d);if(d)return e;if(s===`error`&&i===`ready`){let t=Ex(r),n=Dx(r),i=wx(r),a=Tx(r);return{...e,...t,...n,...i,...a}}return e},[d,s,r,i]),v=(0,b.useMemo)(()=>jx(d,r),[d,r]),y=(0,b.useMemo)(()=>({accessStatus:d,status:f,error:p,refreshAccessStatus:h,patchAccessStatus:g,..._,ownership:v}),[d,f,p,h,g,_,v]);return(0,V.jsx)(xy.Provider,{value:y,children:e})}function Px(e){let t=fo.baseUrl;if(!t)return null;try{let n=new URL(t.startsWith(`http://`)||t.startsWith(`https://`)?t:`https://${t}`);return`${n.protocol===`https:`?`wss:`:`ws:`}//${n.host}/api/ws?token=${encodeURIComponent(e)}`}catch{return null}}var Fx=(0,b.createContext)(null),Ix=1e3,Lx=3e4,Rx=25e3,zx=.25;function Bx(e){let t=Math.min(Lx,Ix*2**Math.max(0,e)),n=t*zx*Math.random();return Math.round(t+n)}function Vx(e){try{let t=JSON.parse(e);return typeof t==`object`&&t&&!Array.isArray(t)?t:null}catch{return null}}function Hx({children:e}){let{isAuthenticated:t,status:n}=Jv(),[r,i]=(0,b.useState)(`idle`),[a,o]=(0,b.useState)(null),s=(0,b.useRef)(null),c=(0,b.useRef)(null),l=(0,b.useRef)(null),u=(0,b.useRef)(0),d=(0,b.useRef)(!0),f=(0,b.useRef)(new Set),p=(0,b.useRef)(t);(0,b.useEffect)(()=>{p.current=t},[t]);let m=(0,b.useCallback)(()=>{c.current!==null&&(clearTimeout(c.current),c.current=null)},[]),h=(0,b.useCallback)(()=>{l.current!==null&&(clearInterval(l.current),l.current=null)},[]),g=(0,b.useCallback)(e=>{f.current.forEach(t=>{try{t(e)}catch{}})},[]),_=(0,b.useCallback)(()=>{m(),h();let e=s.current;if(s.current=null,e)try{e.onopen=null,e.onmessage=null,e.onerror=null,e.onclose=null,(e.readyState===WebSocket.OPEN||e.readyState===WebSocket.CONNECTING)&&e.close(1e3,`client teardown`)}catch{}},[h,m]),v=(0,b.useRef)(()=>{}),y=(0,b.useCallback)(()=>
21{if(d.current||!p.current)return;m();let e=u.current,t=Bx(e);u.current+=1,i(`reconnecting`),c.current=setTimeout(()=>{c.current=null,v.current()},t)},[m]);(0,b.useEffect)(()=>{v.current=()=>{if(d.current||!p.current)return;let e=Eo.getAccessToken();if(!e){i(`idle`),o(Error(`No access token`));return}let t=Px(e);if(!t){i(`error`),o(Error(`API base URL is not configured`));return}_(),i(`connecting`),o(null);let n;try{n=new WebSocket(t)}catch(e){o(e instanceof Error?e:Error(`WebSocket construct failed`)),i(`error`),y();return}s.current=n,n.onopen=()=>{!p.current||d.current||(u.current=0,i(`open`),h(),l.current=setInterval(()=>{let e=s.current;if(e&&e.readyState===WebSocket.OPEN&&!d.current)try{e.send(JSON.stringify({type:`ping`,data:{},timestamp:new Date().toISOString()}))}catch{}},Rx))},n.onmessage=e=>{let t=typeof e.data==`string`?Vx(e.data):null;t&&g(t)},n.onerror=()=>{o(Error(`WebSocket connection error`))},n.onclose=()=>{if(h(),s.current=null,d.current){i(`idle`);return}i(`reconnecting`),y()}}},[_,y,g,h]),(0,b.useEffect)(()=>{if(n!==`loading`){if(!t){d.current=!0,_(),u.current=0,queueMicrotask(()=>{i(`idle`),o(null)});return}return d.current=!1,u.current=0,v.current(),()=>{d.current=!0,_(),m(),u.current=0,queueMicrotask(()=>{i(`idle`)})}}},[t,n,_,m]),(0,b.useEffect)(()=>{let e=()=>{if(!p.current||d.current||n===`loading`)return;let e=s.current;(!e||e.readyState!==WebSocket.OPEN)&&(u.current=0,m(),v.current())};return window.addEventListener(`online`,e),()=>window.removeEventListener(`online`,e)},[n,m]),(0,b.useEffect)(()=>{let e=()=>{if(document.visibilityState!==`visible`||!p.current||d.current||n===`loading`)return;let e=s.current;(!e||e.readyState===WebSocket.CLOSED)&&(u.current=0,m(),v.current())};return document.addEventListener(`visibilitychange`,e),()=>document.removeEventListener(`visibilitychange`,e)},[n,m]);let x=(0,b.useCallback)(e=>(f.current.add(e),()=>{f.current.delete(e)}),[]),S=(0,b.useMemo)(()=>({status:r,lastError:a,isConnected:r===`open`,subscribe:x}),[r,a,x]);return(0,V.jsx)(Fx.Provider,{value:S,children:e})}function Ux(){let e=(0,b.useContext)(Fx);if(!e)throw Error(`useWebSocket must be used within WebSocketProvider`);return e}var Wx=(0,b.createContext)(void 0),Gx=()=>{let e=(0,b.useContext)(Wx);if(!e)throw Error(`useToast must be used within a ToastProvider`);return e},Kx=({children:e})=>{let[t,n]=(0,b.useState)([]),r=(0,b.useCallback)(({type:e,message:t,description:r,actionLabel:i,onAction:a,duration:o=5e3})=>{let s=Math.random().toString(36).substring(2,9);n(n=>n.some(n=>n.type===e&&n.message===t&&n.description===r&&n.actionLabel===i)?n:[...n,{id:s,type:e,message:t,description:r,actionLabel:i,onAction:a,duration:o}])},[]),i=(0,b.useCallback)(e=>{n(t=>t.filter(t=>t.id!==e))},[]);return(0,V.jsx)(Wx.Provider,{value:{toasts:t,showToast:r,removeToast:i},children:e})},qx=(0,b.createContext)({});function Jx(e){let t=(0,b.useRef)(null);return t.current===null&&(t.current=e()),t.current}var Yx=typeof window<`u`?b.useLayoutEffect:b.useEffect,Xx=(0,b.createContext)(null);function Zx(e,t){e.indexOf(t)===-1&&e.push(t)}function Qx(e,t){let n=e.indexOf(t);n>-1&&e.splice(n,1)}var $x=(e,t,n)=>n>t?t:n<e?e:n,eS={},tS=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e);function nS(e){return typeof e==`object`&&!!e}var rS=e=>/^0[^.\s]+$/u.test(e);function iS(e){let t;return()=>(t===void 0&&(t=e()),t)}var aS=e=>e,oS=(e,t)=>n=>t(e(n)),sS=(...e)=>e.reduce(oS),cS=(e,t,n)=>{let r=t-e;return r===0?1:(n-e)/r},lS=class{constructor(){this.subscriptions=[]}add(e){return Zx(this.subscriptions,e),()=>Qx(this.subscriptions,e)}notify(e,t,n){let r=this.subscriptions.length;if(r)if(r===1)this.subscriptions[0](e,t,n);else for(let i=0;i<r;i++){let r=this.subscriptions[i];r&&r(e,t,n)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}},uS=e=>e*1e3,dS=e=>e/1e3;function fS(e,t){return t?1e3/t*e:0}var pS=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,mS=1e-7,hS=12;function gS(e,t,n,r,i){let a,o,s=0;do o=t+(n-t)/2,a=pS(o,r,i)-e,a>0?n=o:t=o;while(Math.abs(a)>mS&&++s<hS);return o}function _S(e,t,n,r){if(e===t&&n===r)return aS;let i=t=>gS(t,0,1,e,n);return e=>e===0||e===1?e:pS(i(e),t,r)}var vS=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,yS=e=>t=>1-e(1-t),bS=_S(.33,1.53,.69,.99),xS=yS(bS),SS=vS(xS),CS=e=>e>=1?1:(e*=2)<1?.5*xS(e):.5*(2-2**(-10*(e-1))),wS=e=>1-Math.sin(Math.acos(e)),TS=yS(wS),ES=vS(wS),DS=_S(.42,0,1,1),OS=_S(0,0,.58,1),kS=_S(.42,0,.58,1),AS=e=>Array.isArray(e)&&typeof e[0]!=`number`,jS=e=>
21Array.isArray(e)&&typeof e[0]==`number`,MS={linear:aS,easeIn:DS,easeInOut:kS,easeOut:OS,circIn:wS,circInOut:ES,circOut:TS,backIn:xS,backInOut:SS,backOut:bS,anticipate:CS},NS=e=>typeof e==`string`,PS=e=>{if(jS(e)){e.length;let[t,n,r,i]=e;return _S(t,n,r,i)}else if(NS(e))return MS[e],`${e}`,MS[e];return e},FS=[`setup`,`read`,`resolveKeyframes`,`preUpdate`,`update`,`preRender`,`render`,`postRender`],IS={value:null,addProjectionMetrics:null};function jte(e,t){let n=new Set,r=new Set,i=!1,a=!1,o=new WeakSet,s={delta:0,timestamp:0,isProcessing:!1},c=0;function l(t){o.has(t)&&(u.schedule(t),e()),c++,t(s)}let u={schedule:(e,t=!1,a=!1)=>{let s=a&&i?n:r;return t&&o.add(e),s.add(e),e},cancel:e=>{r.delete(e),o.delete(e)},process:e=>{if(s=e,i){a=!0;return}i=!0;let o=n;n=r,r=o,n.forEach(l),t&&IS.value&&IS.value.frameloop[t].push(c),c=0,n.clear(),i=!1,a&&(a=!1,u.process(e))}};return u}var Mte=40;function LS(e,t){let n=!1,r=!0,i={delta:0,timestamp:0,isProcessing:!1},a=()=>n=!0,o=FS.reduce((e,n)=>(e[n]=jte(a,t?n:void 0),e),{}),{setup:s,read:c,resolveKeyframes:l,preUpdate:u,update:d,preRender:f,render:p,postRender:m}=o,h=()=>{let a=eS.useManualTiming,o=a?i.timestamp:performance.now();n=!1,a||(i.delta=r?1e3/60:Math.max(Math.min(o-i.timestamp,Mte),1)),i.timestamp=o,i.isProcessing=!0,s.process(i),c.process(i),l.process(i),u.process(i),d.process(i),f.process(i),p.process(i),m.process(i),i.isProcessing=!1,n&&t&&(r=!1,e(h))},g=()=>{n=!0,r=!0,i.isProcessing||e(h)};return{schedule:FS.reduce((e,t)=>{let r=o[t];return e[t]=(e,t=!1,i=!1)=>(n||g(),r.schedule(e,t,i)),e},{}),cancel:e=>{for(let t=0;t<FS.length;t++)o[FS[t]].cancel(e)},state:i,steps:o}}var{schedule:RS,cancel:zS,state:BS,steps:VS}=LS(typeof requestAnimationFrame<`u`?requestAnimationFrame:aS,!0),HS;function Nte(){HS=void 0}var US={now:()=>(HS===void 0&&US.set(BS.isProcessing||eS.useManualTiming?BS.timestamp:performance.now()),HS),set:e=>{HS=e,queueMicrotask(Nte)}},WS={layout:0,mainThread:0,waapi:0},GS=e=>t=>typeof t==`string`&&t.startsWith(e),KS=GS(`--`),Pte=GS(`var(--`),qS=e=>Pte(e)?Fte.test(e.split(`/*`)[0].trim()):!1,Fte=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;function JS(e){return typeof e==`string`?e.split(`/*`)[0].includes(`var(--`):!1}var YS={test:e=>typeof e==`number`,parse:parseFloat,transform:e=>e},XS={...YS,transform:e=>$x(0,1,e)},ZS={...YS,default:1},QS=e=>Math.round(e*1e5)/1e5,$S=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function Ite(e){return e==null}var Lte=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,eC=(e,t)=>n=>!!(typeof n==`string`&&Lte.test(n)&&n.startsWith(e)||t&&!Ite(n)&&Object.prototype.hasOwnProperty.call(n,t)),tC=(e,t,n)=>r=>{if(typeof r!=`string`)return r;let[i,a,o,s]=r.match($S);return{[e]:parseFloat(i),[t]:parseFloat(a),[n]:parseFloat(o),alpha:s===void 0?1:parseFloat(s)}},Rte=e=>$x(0,255,e),nC={...YS,transform:e=>Math.round(Rte(e))},rC={test:eC(`rgb`,`red`),parse:tC(`red`,`green`,`blue`),transform:({red:e,green:t,blue:n,alpha:r=1})=>`rgba(`+nC.transform(e)+`, `+nC.transform(t)+`, `+nC.transform(n)+`, `+QS(XS.transform(r))+`)`};function zte(e){let t=``,n=``,r=``,i=``;return e.length>5?(t=e.substring(1,3),n=e.substring(3,5),r=e.substring(5,7),i=e.substring(7,9)):(t=e.substring(1,2),n=e.substring(2,3),r=e.substring(3,4),i=e.substring(4,5),t+=t,n+=n,r+=r,i+=i),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(r,16),alpha:i?parseInt(i,16)/255:1}}var iC={test:eC(`#`),parse:zte,transform:rC.transform},aC=e=>({test:t=>typeof t==`string`&&t.endsWith(e)&&t.split(` `).length===1,parse:parseFloat,transform:t=>`${t}${e}`}),oC=aC(`deg`),sC=aC(`%`),cC=aC(`px`),Bte=aC(`vh`),Vte=aC(`vw`),lC={...sC,parse:e=>sC.parse(e)/100,transform:e=>sC.transform(e*100)},uC={test:eC(`hsl`,`hue`),parse:tC(`hue`,`saturation`,`lightness`),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>`hsla(`+Math.round(e)+`, `+sC.transform(QS(t))+`, `+sC.transform(QS(n))+`, `+QS(XS.transform(r))+`)`},dC={test:e=>rC.test(e)||iC.test(e)||uC.test(e),parse:e=>rC.test(e)?rC.parse(e):uC.test(e)?uC.parse(e):iC.parse(e),transform:e=>typeof e==`string`?e:e.hasOwnProperty(`red`)?rC.transform(e):uC.transform(e),getAnimatableNone:e=>{let t=dC.parse(e);return t.alpha=0,dC.transform(t)}},Hte=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function Ute(e){return isNaN(e)&&typeof e==`string`&&(e.match($S)?.length||0)+(e.match(Hte)?.length||0)>0}var fC=`number`,pC=`color`,Wte=`var`,Gte=`var(`,mC="${}",Kte=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;function hC(e){let t=e.toString(),n=[],r={color:[],number:[],var:[]},i=[],a=0;return{values:n,split:t.replace(Kte,e=>(dC.test(e)?(r.color.push(a),i.push(pC),n.push(dC.parse(e))):e.startsWith(Gte)?(r.var.push(a),i.push(Wte),n.push(e)):(r.number.push(a),i.push(fC),n.push(parseFloat(e))),++a,mC)).split(mC),indexes:r,types:i}}function qte(e){return hC(e).values}function gC({split:e,types:t}){let n=e.length;return r=>{let i=``;for(let a=0;a<n;a++)if(i+=e[a],r[a]!==void 0){let e=t[a];e===fC?i+=QS(r[a]):e===pC?i+=dC.transform(r[a]):i+=r[a]}return i}}function Jte(e){return gC(hC(e))}var Yte=e=>typeof e==`number`?0:dC.test(e)?dC.getAnimatableNone(e):e,Xte=(e,t)=>
21typeof e==`number`?t?.trim().endsWith(`/`)?e:0:Yte(e);function Zte(e){let t=hC(e);return gC(t)(t.values.map((e,n)=>Xte(e,t.split[n])))}var _C={test:Ute,parse:qte,createTransformer:Jte,getAnimatableNone:Zte};function vC(e,t,n){return n<0&&(n+=1),n>1&&--n,n<1/6?e+(t-e)*6*n:n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function Qte({hue:e,saturation:t,lightness:n,alpha:r}){e/=360,t/=100,n/=100;let i=0,a=0,o=0;if(!t)i=a=o=n;else{let r=n<.5?n*(1+t):n+t-n*t,s=2*n-r;i=vC(s,r,e+1/3),a=vC(s,r,e),o=vC(s,r,e-1/3)}return{red:Math.round(i*255),green:Math.round(a*255),blue:Math.round(o*255),alpha:r}}function yC(e,t){return n=>n>0?t:e}var bC=(e,t,n)=>e+(t-e)*n,xC=(e,t,n)=>{let r=e*e,i=n*(t*t-r)+r;return i<0?0:Math.sqrt(i)},$te=[iC,rC,uC],ene=e=>$te.find(t=>t.test(e));function SC(e){let t=ene(e);if(`${e}`,!t)return!1;let n=t.parse(e);return t===uC&&(n=Qte(n)),n}var CC=(e,t)=>{let n=SC(e),r=SC(t);if(!n||!r)return yC(e,t);let i={...n};return e=>(i.red=xC(n.red,r.red,e),i.green=xC(n.green,r.green,e),i.blue=xC(n.blue,r.blue,e),i.alpha=bC(n.alpha,r.alpha,e),rC.transform(i))},wC=new Set([`none`,`hidden`]);function tne(e,t){return wC.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}function nne(e,t){return n=>bC(e,t,n)}function TC(e){return typeof e==`number`?nne:typeof e==`string`?qS(e)?yC:dC.test(e)?CC:ane:Array.isArray(e)?EC:typeof e==`object`?dC.test(e)?CC:rne:yC}function EC(e,t){let n=[...e],r=n.length,i=e.map((e,n)=>TC(e)(e,t[n]));return e=>{for(let t=0;t<r;t++)n[t]=i[t](e);return n}}function rne(e,t){let n={...e,...t},r={};for(let i in n)e[i]!==void 0&&t[i]!==void 0&&(r[i]=TC(e[i])(e[i],t[i]));return e=>{for(let t in r)n[t]=r[t](e);return n}}function ine(e,t){let n=[],r={color:0,var:0,number:0};for(let i=0;i<t.values.length;i++){let a=t.types[i],o=e.indexes[a][r[a]];n[i]=e.values[o]??0,r[a]++}return n}var ane=(e,t)=>{let n=_C.createTransformer(t),r=hC(e),i=hC(t);return r.indexes.var.length===i.indexes.var.length&&r.indexes.color.length===i.indexes.color.length&&r.indexes.number.length>=i.indexes.number.length?wC.has(e)&&!i.values.length||wC.has(t)&&!r.values.length?tne(e,t):sS(EC(ine(r,i),i.values),n):(`${e}${t}`,yC(e,t))};function DC(e,t,n){return typeof e==`number`&&typeof t==`number`&&typeof n==`number`?bC(e,t,n):TC(e)(e,t)}var one=e=>{let t=({timestamp:t})=>e(t);return{start:(e=!0)=>RS.update(t,e),stop:()=>zS(t),now:()=>BS.isProcessing?BS.timestamp:US.now()}},OC=(e,t,n=10)=>{let r=``,i=Math.max(Math.round(t/n),2);for(let t=0;t<i;t++)r+=Math.round(e(t/(i-1))*1e4)/1e4+`, `;return`linear(${r.substring(0,r.length-2)})`},kC=2e4;function AC(e){let t=0,n=e.next(t);for(;!n.done&&t<2e4;)t+=50,n=e.next(t);return t>=2e4?1/0:t}function sne(e,t=100,n){let r=n({...e,keyframes:[0,t]}),i=Math.min(AC(r),kC);return{type:`keyframes`,ease:e=>r.next(i*e).value/t,duration:dS(i)}}var jC={stiffness:100,damping:10,mass:1,velocity:0,duration:800,bounce:.3,visualDuration:.3,restSpeed:{granular:.01,default:2},restDelta:{granular:.005,default:.5},minDuration:.01,maxDuration:10,minDamping:.05,maxDamping:1};function MC(e,t){return e*Math.sqrt(1-t*t)}var cne=12;function lne(e,t,n){let r=n;for(let n=1;n<cne;n++)r-=e(r)/t(r);return r}var NC=.001;function une({duration:e=jC.duration,bounce:t=jC.bounce,velocity:n=jC.velocity,mass:r=jC.mass}){let i,a;jC.maxDuration;let o=1-t;o=$x(jC.minDamping,jC.maxDamping,o),e=$x(jC.minDuration,jC.maxDuration,dS(e)),o<1?(i=t=>{let r=t*o,i=r*e,a=r-n,s=MC(t,o),c=Math.exp(-i);return NC-a/s*c},a=t=>{let r=t*o*e,a=r*n+n,s=o**2*t**2*e,c=Math.exp(-r),l=MC(t**2,o);return(-i(t)+NC>0?-1:1)*((a-s)*c)/l}):(i=t=>{let r=Math.exp(-t*e),i=(t-n)*e+1;return-NC+r*i},a=t=>Math.exp(-t*e)*((n-t)*(e*e)));let s=5/e,c=lne(i,a,s);if(e=uS(e),isNaN(c))return{stiffness:jC.stiffness,damping:jC.damping,duration:e};{let t=c**2*r;return{stiffness:t,damping:o*2*Math.sqrt(r*t),duration:e}}}var dne=[`duration`,`bounce`],fne=[`stiffness`,`damping`,`mass`];function PC(e,t){return t.some(t=>e[t]!==void 0)}function pne(e){let t={velocity:jC.velocity,stiffness:jC.stiffness,damping:jC.damping,mass:jC.mass,isResolvedFromDuration:!1,...e};if(!PC(e,fne)&&PC(e,dne))if(t.velocity=0,e.visualDuration){let n=e.visualDuration,r=2*Math.PI/(n*1.2),i=r*r,a=2*$x(.05,1,1-(e.bounce||0))*Math.sqrt(i);t={...t,mass:jC.mass,stiffness:i,damping:a}}else{let n=une({...e,velocity:0});t={...t,...n,mass:jC.mass},t.isResolvedFromDuration=!0}return t}function FC(e=jC.visualDuration,t=jC.bounce){let n=typeof e==`object`?e:{visualDuration:e,keyframes:[0,1],bounce:t},{restSpeed:r,restDelta:i}=n,a=n.keyframes[0],o=n.keyframes[n.keyframes.length-1],s={done:!1,value:a},{stiffness:c,damping:l,mass:u,duration:d,velocity:f,isResolvedFromDuration:p}=pne({...n,velocity:-dS(n.velocity||0)}),m=f||0,h=l/(2*Math.sqrt(c*u)),g=o-a,_=dS(Math.sqrt(c/u)),v=Math.abs(g)<5;r||=v?jC.restSpeed.granular:jC.restSpeed.default,i||=v?jC.restDelta.granular:jC.restDelta.default;let y,b,x,S,C,w;if(h<1)x=MC(_,h),S=(m+h*_*g)/x,y=e=>o-Math.exp(-h*_*e)*(S*Math.sin(x*e)+g*Math.cos(x*e)),C=h*_*S+g*x,w=h*_*g-S*x,b=e=>Math.exp(-h*_*e)*(C*Math.sin(x*e)+w*Math.cos(x*e));else if(h===1){y=e=>o-Math.exp(-_*e)*(g+(m+_*g)*e);let e=m+_*g;b=t=>Math.exp(-_*t)*(_*e*t-m)}else{let e=_*Math.sqrt(h*h-1);y=t=>{let n=Math.exp(-h*_*t),r=Math.min(e*t,300);return o-n*((m+h*_*g)*Math.sinh(r)+e*g*Math.cosh(r))/e};let t=(m+h*_*g)/e,n=h*_*t-g*e,r=h*_*g-t*e;b=t=>{let i=Math.exp(-h*_*t),a=Math.min(e*t,300);return i*(n*Math.sinh(a)+r*Math.cosh(a))}}let T={calculatedDuration:p&&d||null,velocity:e=>uS(b(e)),next:e=>{if(!p&&h<1){let t=Math.exp(-h*_*e),n=Math.sin(x*e),a=Math.cos(x*e),c=o-t*(S*n+g*a),l=uS(t*(C*n+w*a));return s.done=Math.abs(l)<=r&&Math.abs(o-c)<=i,s.value=s.done?o:c,s}let t=y(e);if(p)s.done=e>=d;else{let n=uS(b(e));s.done=Math.abs(n)<=r&&Math.abs(o-t)<=i}return s.value=s.done?o:t,s},toString:()=>{let e=Math.min(AC(T),kC),t=OC(t=>T.next(e*t).value,e,30);return e+`ms `+t},toTransition:()=>{}};return T}FC.applyToOptions=e=>{let t=sne(e,100,FC);return e.ease=t.ease,e.duration=uS(t.duration),e.type=`keyframes`,e};var mne=5;function IC(e,t,n){let r=Math.max(t-mne,0);return fS(n-e(r),t-r)}function LC({keyframes:e,velocity:t=0,power:n=.8,timeConstant:r=325,bounceDamping:i=10,bounceStiffness:a=
21500,modifyTarget:o,min:s,max:c,restDelta:l=.5,restSpeed:u}){let d=e[0],f={done:!1,value:d},p=e=>s!==void 0&&e<s||c!==void 0&&e>c,m=e=>s===void 0?c:c===void 0||Math.abs(s-e)<Math.abs(c-e)?s:c,h=n*t,g=d+h,_=o===void 0?g:o(g);_!==g&&(h=_-d);let v=e=>-h*Math.exp(-e/r),y=e=>_+v(e),b=e=>{let t=v(e),n=y(e);f.done=Math.abs(t)<=l,f.value=f.done?_:n},x,S,C=e=>{p(f.value)&&(x=e,S=FC({keyframes:[f.value,m(f.value)],velocity:IC(y,e,f.value),damping:i,stiffness:a,restDelta:l,restSpeed:u}))};return C(0),{calculatedDuration:null,next:e=>{let t=!1;return!S&&x===void 0&&(t=!0,b(e),C(e)),x!==void 0&&e>=x?S.next(e-x):(!t&&b(e),f)}}}function hne(e,t,n){let r=[],i=n||eS.mix||DC,a=e.length-1;for(let n=0;n<a;n++){let a=i(e[n],e[n+1]);t&&(a=sS(Array.isArray(t)?t[n]||aS:t,a)),r.push(a)}return r}function gne(e,t,{clamp:n=!0,ease:r,mixer:i}={}){let a=e.length;if(t.length,a===1)return()=>t[0];if(a===2&&t[0]===t[1])return()=>t[1];let o=e[0]===e[1];e[0]>e[a-1]&&(e=[...e].reverse(),t=[...t].reverse());let s=hne(t,r,i),c=s.length,l=n=>{if(o&&n<e[0])return t[0];let r=0;if(c>1)for(;r<e.length-2&&!(n<e[r+1]);r++);let i=cS(e[r],e[r+1],n);return s[r](i)};return n?t=>l($x(e[0],e[a-1],t)):l}function _ne(e,t){let n=e[e.length-1];for(let r=1;r<=t;r++){let i=cS(0,t,r);e.push(bC(n,1,i))}}function vne(e){let t=[0];return _ne(t,e.length-1),t}function yne(e,t){return e.map(e=>e*t)}function bne(e,t){return e.map(()=>t||kS).splice(0,e.length-1)}function RC({duration:e=300,keyframes:t,times:n,ease:r=`easeInOut`}){let i=AS(r)?r.map(PS):PS(r),a={done:!1,value:t[0]},o=gne(yne(n&&n.length===t.length?n:vne(t),e),t,{ease:Array.isArray(i)?i:bne(t,i)});return{calculatedDuration:e,next:t=>(a.value=o(t),a.done=t>=e,a)}}var xne=e=>e!==null;function zC(e,{repeat:t,repeatType:n=`loop`},r,i=1){let a=e.filter(xne),o=i<0||t&&n!==`loop`&&t%2==1?0:a.length-1;return!o||r===void 0?a[o]:r}var Sne={decay:LC,inertia:LC,tween:RC,keyframes:RC,spring:FC};function BC(e){typeof e.type==`string`&&(e.type=Sne[e.type])}var VC=class{constructor(){this.updateFinished()}get finished(){return this._finished}updateFinished(){this._finished=new Promise(e=>{this.resolve=e})}notifyFinished(){this.resolve()}then(e,t){return this.finished.then(e,t)}},Cne=e=>e/100,HC=class extends VC{constructor(e){super(),this.state=`idle`,this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.delayState={done:!1,value:void 0},this.stop=()=>{let{motionValue:e}=this.options;e&&e.updatedAt!==US.now()&&this.tick(US.now()),this.isStopped=!0,this.state!==`idle`&&(this.teardown(),this.options.onStop?.())},WS.mainThread++,this.options=e,this.initAnimation(),this.play(),e.autoplay===!1&&this.pause()}initAnimation(){let{options:e}=this;BC(e);let{type:t=RC,repeat:n=0,repeatDelay:r=0,repeatType:i,velocity:a=0}=e,{keyframes:o}=e,s=t||RC;s!==RC&&typeof o[0]!=`number`&&(this.mixKeyframes=sS(Cne,DC(o[0],o[1])),o=[0,100]);let c=s({...e,keyframes:o});i===`mirror`&&(this.mirroredGenerator=s({...e,keyframes:[...o].reverse(),velocity:-a})),c.calculatedDuration===null&&(c.calculatedDuration=AC(c));let{calculatedDuration:l}=c;this.calculatedDuration=l,this.resolvedDuration=l+r,this.totalDuration=this.resolvedDuration*(n+1)-r,this.generator=c}updateTime(e){let t=Math.round(e-this.startTime)*this.playbackSpeed;this.holdTime===null?this.currentTime=t:this.currentTime=this.holdTime}tick(e,t=!1){let{generator:n,totalDuration:r,mixKeyframes:i,mirroredGenerator:a,resolvedDuration:o,calculatedDuration:s}=this;if(this.startTime===null)return n.next(0);let{delay:c=0,keyframes:l,repeat:u,repeatType:d,repeatDelay:f,type:p,onUpdate:m,finalKeyframe:h}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,e):this.speed<0&&(this.startTime=Math.min(e-r/this.speed,this.startTime)),t?this.currentTime=e:this.updateTime(e);let g=this.currentTime-c*(this.playbackSpeed>=0?1:-1),_=this.playbackSpeed>=0?g<0:g>r;this.currentTime=Math.max(g,0),this.state===`finished`&&this.holdTime===null&&(this.currentTime=r);let v=this.currentTime,y=n;if(u){let e=Math.min(this.currentTime,r)/o,t=Math.floor(e),n=e%1;!n&&e>=1&&(n=1),n===1&&t--,t=Math.min(t,u+1),t%2&&(d===`reverse`?(n=1-n,f&&(n-=f/o)):d===`mirror`&&(y=a)),v=$x(0,1,n)*o}let b;_?(this.delayState.value=l[0],b=this.delayState):b=y.next(v),i&&!_&&(b.value=i(b.value));let{done:x}=b;!_&&s!==null&&(x=this.playbackSpeed>=0?this.currentTime>=r:this.currentTime<=0);let S=this.holdTime===null&&(this.state===`finished`||this.state===`running`&&x);return S&&p!==LC&&(b.value=zC(l,this.options,h,this.speed)),m&&m(b.value),S&&this.finish(),b}then(e,t){return this.finished.then(e,t)}get duration(){return dS(this.calculatedDuration)}get iterationDuration(){let{delay:e=0}=this.options||{};return this.duration+dS(e)}get time(){return dS(this.currentTime)}set time(e){e=uS(e),this.currentTime=e,this.startTime===null||this.holdTime!==null||this.playbackSpeed===0?this.holdTime=e:this.driver&&(this.startTime=this.driver.now()-e/this.playbackSpeed),this.driver?this.driver.start(!1):(this.startTime=0,this.state=`paused`,this.holdTime=e,this.tick(e))}getGeneratorVelocity(){let e=this.currentTime;if(e<=0)return this.options.velocity||0;if(this.generator.velocity)return this.generator.velocity(e);let t=this.generator.next(e).value;return IC(e=>this.generator.next(e).value,e,t)}get speed(){return this.playbackSpeed}set speed(e){let t=this.playbackSpeed!==e;t&&this.driver&&this.updateTime(US.now()),this.playbackSpeed=e,t&&this.driver&&(this.time=dS(this.currentTime))}play(){if(this.isStopped)return;let{driver:e=one,startTime:t}=this.options;this.driver||=e(e=>this.tick(e)),this.options.onPlay?.();let n=this.driver.now();this.state===`finished`?(this.updateFinished(),this.startTime=n):this.holdTime===null?this.startTime||=t??n:this.startTime=n-this.holdTime,this.state===`finished`&&this.speed<0&&(this.startTime+=this.calculatedDuration),this.holdTime=null,this.state=`running`,this.driver.start()}pause(){this.state=`paused`,this.updateTime(US.now()),this.holdTime=this.currentTime}complete(){this.state!==`running`&&this.play(),this.state=`finished`,this.holdTime=null}finish(){this.notifyFinished(),this.teardown(),this.state=`finished`,this.options.onComplete?.()}cancel(){this.holdTime=null,this.startTime=0,this.tick(0),this.teardown(),this.options.onCancel?.()}teardown(){this.state=`idle`,this.stopDriver(),this.startTime=this.holdTime=null,WS.mainThread--}stopDriver(){this.driver&&=(this.driver.stop(),void 0)}sample(e){return this.startTime=0,this.tick(e,!0)}attachTimeline(e){return this.options.allowFlatten&&(this.options.type=`keyframes`,this.options.ease=`linear`,this.initAnimation()),this.driver?.stop(),e.observe(this)}};function wne(e){for(let t=1;t<e.length;t++)e[t]??(e[t]=e[t-1])}var UC=e=>e*180/Math.PI,WC=e=>GC(UC(Math.atan2(e[1],e[0]))),Tne={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:e=>(Math.abs(e[0])+Math.abs(e[3]))/2,rotate:WC,rotateZ:WC,skewX:e=>UC(Math.atan(e[1])),skewY:e=>UC(Math.atan(e[2])),skew:e=>(Math.abs(e[1])+Math.abs(e[2]))/2},GC=e=>(e%=360,e<0&&(e+=360),e),KC=WC,qC=e=>Math.sqrt(e[0]*e[0]+e[1]*e[1]),JC=e=>Math.sqrt(e[4]*e[4]+e[5]*e[5]),Ene={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:qC,scaleY:JC,scale:e=>(qC(e)+JC(e))/2,rotateX:e=>GC(UC(Math.atan2(e[6],e[5]))),rotateY:e=>GC(UC(Math.atan2(-e[2],e[0]))),rotateZ:KC,rotate:KC,skewX:e=>UC(Math.atan(e[4])),skewY:e=>UC(Math.atan(e[1])),skew:e=>(Math.abs(e[1])+Math.abs(e[4]))/2};function YC(e){return+!!e.includes(`scale`)}
21function XC(e,t){if(!e||e===`none`)return YC(t);let n=e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u),r,i;if(n)r=Ene,i=n;else{let t=e.match(/^matrix\(([-\d.e\s,]+)\)$/u);r=Tne,i=t}if(!i)return YC(t);let a=r[t],o=i[1].split(`,`).map(One);return typeof a==`function`?a(o):o[a]}var Dne=(e,t)=>{let{transform:n=`none`}=getComputedStyle(e);return XC(n,t)};function One(e){return parseFloat(e.trim())}var ZC=[`transformPerspective`,`x`,`y`,`z`,`translateX`,`translateY`,`translateZ`,`scale`,`scaleX`,`scaleY`,`rotate`,`rotateX`,`rotateY`,`rotateZ`,`skew`,`skewX`,`skewY`],QC=new Set(ZC),$C=e=>e===YS||e===cC,kne=new Set([`x`,`y`,`z`]),Ane=ZC.filter(e=>!kne.has(e));function jne(e){let t=[];return Ane.forEach(n=>{let r=e.getValue(n);r!==void 0&&(t.push([n,r.get()]),r.set(+!!n.startsWith(`scale`)))}),t}var ew={width:({x:e},{paddingLeft:t=`0`,paddingRight:n=`0`,boxSizing:r})=>{let i=e.max-e.min;return r===`border-box`?i:i-parseFloat(t)-parseFloat(n)},height:({y:e},{paddingTop:t=`0`,paddingBottom:n=`0`,boxSizing:r})=>{let i=e.max-e.min;return r===`border-box`?i:i-parseFloat(t)-parseFloat(n)},top:(e,{top:t})=>parseFloat(t),left:(e,{left:t})=>parseFloat(t),bottom:({y:e},{top:t})=>parseFloat(t)+(e.max-e.min),right:({x:e},{left:t})=>parseFloat(t)+(e.max-e.min),x:(e,{transform:t})=>XC(t,`x`),y:(e,{transform:t})=>XC(t,`y`)};ew.translateX=ew.x,ew.translateY=ew.y;var tw=new Set,nw=!1,rw=!1,iw=!1;function aw(){if(rw){let e=Array.from(tw).filter(e=>e.needsMeasurement),t=new Set(e.map(e=>e.element)),n=new Map;t.forEach(e=>{let t=jne(e);t.length&&(n.set(e,t),e.render())}),e.forEach(e=>e.measureInitialState()),t.forEach(e=>{e.render();let t=n.get(e);t&&t.forEach(([t,n])=>{e.getValue(t)?.set(n)})}),e.forEach(e=>e.measureEndState()),e.forEach(e=>{e.suspendedScrollY!==void 0&&window.scrollTo(0,e.suspendedScrollY)})}rw=!1,nw=!1,tw.forEach(e=>e.complete(iw)),tw.clear()}function ow(){tw.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(rw=!0)})}function Mne(){iw=!0,ow(),aw(),iw=!1}var sw=class{constructor(e,t,n,r,i,a=!1){this.state=`pending`,this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...e],this.onComplete=t,this.name=n,this.motionValue=r,this.element=i,this.isAsync=a}scheduleResolve(){this.state=`scheduled`,this.isAsync?(tw.add(this),nw||(nw=!0,RS.read(ow),RS.resolveKeyframes(aw))):(this.readKeyframes(),this.complete())}readKeyframes(){let{unresolvedKeyframes:e,name:t,element:n,motionValue:r}=this;if(e[0]===null){let i=r?.get(),a=e[e.length-1];if(i!==void 0)e[0]=i;else if(n&&t){let r=n.readValue(t,a);r!=null&&(e[0]=r)}e[0]===void 0&&(e[0]=a),r&&i===void 0&&r.set(e[0])}wne(e)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(e=!1){this.state=`complete`,this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,e),tw.delete(this)}cancel(){this.state===`scheduled`&&(tw.delete(this),this.state=`pending`)}resume(){this.state===`pending`&&this.scheduleResolve()}},Nne=e=>e.startsWith(`--`);function cw(e,t,n){Nne(t)?e.style.setProperty(t,n):e.style[t]=n}var Pne={};function lw(e,t){let n=iS(e);return()=>Pne[t]??n()}var Fne=lw(()=>window.ScrollTimeline!==void 0,`scrollTimeline`),uw=lw(()=>{try{document.createElement(`div`).animate({opacity:0}
21,{easing:`linear(0, 1)`})}catch{return!1}return!0},`linearEasing`),dw=([e,t,n,r])=>`cubic-bezier(${e}, ${t}, ${n}, ${r})`,fw={linear:`linear`,ease:`ease`,easeIn:`ease-in`,easeOut:`ease-out`,easeInOut:`ease-in-out`,circIn:dw([0,.65,.55,1]),circOut:dw([.55,0,1,.45]),backIn:dw([.31,.01,.66,-.59]),backOut:dw([.33,1.53,.69,.99])};function pw(e,t){if(e)return typeof e==`function`?uw()?OC(e,t):`ease-out`:jS(e)?dw(e):Array.isArray(e)?e.map(e=>pw(e,t)||fw.easeOut):fw[e]}function Ine(e,t,n,{delay:r=0,duration:i=300,repeat:a=0,repeatType:o=`loop`,ease:s=`easeOut`,times:c}={},l=void 0){let u={[t]:n};c&&(u.offset=c);let d=pw(s,i);Array.isArray(d)&&(u.easing=d),IS.value&&WS.waapi++;let f={delay:r,duration:i,easing:Array.isArray(d)?`linear`:d,fill:`both`,iterations:a+1,direction:o===`reverse`?`alternate`:`normal`};l&&(f.pseudoElement=l);let p=e.animate(u,f);return IS.value&&p.finished.finally(()=>{WS.waapi--}),p}function mw(e){return typeof e==`function`&&`applyToOptions`in e}function Lne({type:e,...t}){return mw(e)&&uw()?e.applyToOptions(t):(t.duration??=300,t.ease??=`easeOut`,t)}var hw=class extends VC{constructor(e){if(super(),this.finishedTime=null,this.isStopped=!1,this.manualStartTime=null,!e)return;let{element:t,name:n,keyframes:r,pseudoElement:i,allowFlatten:a=!1,finalKeyframe:o,onComplete:s}=e;this.isPseudoElement=!!i,this.allowFlatten=a,this.options=e,e.type;let c=Lne(e);this.animation=Ine(t,n,r,c,i),c.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!i){let e=zC(r,this.options,o,this.speed);this.updateMotionValue&&this.updateMotionValue(e),cw(t,n,e),this.animation.cancel()}s?.(),this.notifyFinished()}}play(){this.isStopped||(this.manualStartTime=null,this.animation.play(),this.state===`finished`&&this.updateFinished())}pause(){this.animation.pause()}complete(){this.animation.finish?.()}cancel(){try{this.animation.cancel()}catch{}}stop(){if(this.isStopped)return;this.isStopped=!0;let{state:e}=this;e===`idle`||e===`finished`||(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){let e=this.options?.element;!this.isPseudoElement&&e?.isConnected&&this.animation.commitStyles?.()}get duration(){let e=this.animation.effect?.getComputedTiming?.().duration||0;return dS(Number(e))}get iterationDuration(){let{delay:e=0}=this.options||{};return this.duration+dS(e)}get time(){return dS(Number(this.animation.currentTime)||0)}set time(e){let t=this.finishedTime!==null;this.manualStartTime=null,this.finishedTime=null,this.animation.currentTime=uS(e),t&&this.animation.pause()}get speed(){return this.animation.playbackRate}set speed(e){e<0&&(this.finishedTime=null),this.animation.playbackRate=e}get state(){return this.finishedTime===null?this.animation.playState:`f
21inished`}get startTime(){return this.manualStartTime??Number(this.animation.startTime)}set startTime(e){this.manualStartTime=this.animation.startTime=e}attachTimeline({timeline:e,rangeStart:t,rangeEnd:n,observe:r}){return this.allowFlatten&&this.animation.effect?.updateTiming({easing:`linear`}),this.animation.onfinish=null,e&&Fne()?(this.animation.timeline=e,t&&(this.animation.rangeStart=t),n&&(this.animation.rangeEnd=n),aS):r(this)}},gw={anticipate:CS,backInOut:SS,circInOut:ES};function Rne(e){return e in gw}function zne(e){typeof e.ease==`string`&&Rne(e.ease)&&(e.ease=gw[e.ease])}var _w=10,Bne=class extends hw{constructor(e){zne(e),BC(e),super(e),e.startTime!==void 0&&e.autoplay!==!1&&(this.startTime=e.startTime),this.options=e}updateMotionValue(e){let{motionValue:t,onUpdate:n,onComplete:r,element:i,...a}=this.options;if(!t)return;if(e!==void 0){t.set(e);return}let o=new HC({...a,autoplay:!1}),s=Math.max(_w,US.now()-this.startTime),c=$x(0,_w,s-_w),l=o.sample(s).value,{name:u}=this.options;i&&u&&cw(i,u,l),t.setWithVelocity(o.sample(Math.max(0,s-c)).value,l,c),o.stop()}},vw=(e,t)=>t===`zIndex`?!1:!!(typeof e==`number`||Array.isArray(e)||typeof e==`string`&&(_C.test(e)||e===`0`)&&!e.startsWith(`url(`));function Vne(e){let t=e[0];if(e.length===1)return!0;for(let n=0;n<e.length;n++)if(e[n]!==t)return!0}function Hne(e,t,n,r){let i=e[0];if(i===null)return!1;if(t===`display`||t===`visibility`)return!0;let a=e[e.length-1],o=vw(i,t),s=vw(a,t);return`${t}${i}${a}${o?a:i}`,!o||!s?!1:Vne(e)||(n===`spring`||mw(n))&&r}function yw(e){e.duration=0,e.type=`keyframes`}var bw=new Set([`opacity`,`clipPath`,`filter`,`transform`]),Une=/^(?:oklch|oklab|lab|lch|color|color-mix|light-dark)\(/;function Wne(e){for(let t=0;t<e.length;t++)if(typeof e[t]==`string`&&Une.test(e[t]))return!0;return!1}var Gne=new Set([`color`,`backgroundColor`,`outlineColor`,`fill`,`stroke`,`borderColor`,`borderTopColor`,`borderRightColor`,`borderBottomColor`,`borderLeftColor`]),Kne=iS(()=>Object.hasOwnProperty.call(Element.prototype,`animate`));function qne(e){let{motionValue:t,name:n,repeatDelay:r,repeatType:i,damping:a,type:o,keyframes:s}=e;if(!(t?.owner?.current instanceof HTMLElement))return!1;let{onUpdate:c,transformTemplate:l}=t.owner.getProps();return Kne()&&n&&(bw.has(n)||Gne.has(n)&&Wne(s))&&(n!==`transform`||!l)&&!c&&!r&&i!==`mirror`&&a!==0&&o!==`inertia`}var Jne=40,Yne=class extends VC{constructor({autoplay:e=!0,delay:t=0,type:n=`keyframes`,repeat:r=0,repeatDelay:i=0,repeatType:a=`loop`,keyframes:o,name:s,motionValue:c,element:l,...u}){super(),this.stop=()=>{this._animation&&(this._animation.stop(),this.stopTimeline?.()),this.keyframeResolver?.cancel()},this.createdAt=US.now();let d={autoplay:e,delay:t,type:n,repeat:r,repeatDelay:i,repeatType:a,name:s,motionValue:c,element:l,...u},f=l?.KeyframeResolver||sw;this.keyframeResolver=new f(o,(e,t,n)=>this.onKeyframesResolved(e,t,d,!n),s,c,l),this.keyframeResolver?.scheduleResolve()}onKeyframesResolved(e,t,n,r){this.keyframeResolver=void 0;let{name:i,type:a,velocity:o,delay:s,isHandoff:c,onUpdate:l}=n;this.resolvedAt=US.now();let u=!0;Hne(e,i,a,o)||(u=!1,(eS.instantAnimations||!s)&&l?.(zC(e,n,t)),e[0]=e[e.length-1],yw(n),n.repeat=0);let d={startTime:r?this.resolvedAt&&this.resolvedAt-this.createdAt>Jne?this.resolvedAt:this.createdAt:void 0,finalKeyframe:t,...n,keyframes:e},f=u&&!c&&qne(d),p=d.motionValue?.owner?.current,m;if(f)try{m=new Bne({...d,element:p})}catch{m=new HC(d)}else m=new HC(d);m.finished.then(()=>{this.notifyFinished()}).catch(aS),this.pendingTimeline&&=(this.stopTimeline=m.attachTimeline(this.pendingTimeline),void 0),this._animation=m}get finished(){return this._animation?this.animation.finished:this._finished}then(e,t){return this.finished.finally(e).then(()=>{})}get animation(){return this._animation||(this.keyframeResolver?.resume(),Mne()),this._animation}get duration(){return this.animation.duration}get iterationDuration(){return this.animation.iterationDuration}get time(){return this.animation.time}set time(e){this.animation.time=e}get speed(){return this.animation.speed}get state(){return this.animation.state}set speed(e){this.animation.speed=e}get startTime(){return this.animation.startTime}attachTimeline(e){return this._animation?this.stopTimeline=this.animation.attachTimeline(e):this.pendingTimeline=e,()=>this.stop()}play(){this.animation.play()}pause(){this.animation.pause()}complete(){this.animation.complete()}cancel(){this._animation&&this.animation.cancel(),this.keyframeResolver?.cancel()}};function xw(e,t,n,r=0,i=1){let a=Array.from(e).sort((e,t)=>
21e.sortNodePosition(t)).indexOf(t),o=e.size,s=(o-1)*r;return typeof n==`function`?n(a,o):i===1?a*r:s-a*r}var Xne=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function Zne(e){let t=Xne.exec(e);if(!t)return[,];let[,n,r,i]=t;return[`--${n??r}`,i]}function Sw(e,t,n=1){`${e}`;let[r,i]=Zne(e);if(!r)return;let a=window.getComputedStyle(t).getPropertyValue(r);if(a){let e=a.trim();return tS(e)?parseFloat(e):e}return qS(i)?Sw(i,t,n+1):i}var Qne={type:`spring`,stiffness:500,damping:25,restSpeed:10},$ne=e=>({type:`spring`,stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),ere={type:`keyframes`,duration:.8},tre={type:`keyframes`,ease:[.25,.1,.35,1],duration:.3},nre=(e,{keyframes:t})=>t.length>2?ere:QC.has(e)?e.startsWith(`scale`)?$ne(t[1]):Qne:tre;function Cw(e,t){if(e?.inherit&&t){let{inherit:n,...r}=e;return{...t,...r}}return e}function ww(e,t){let n=e?.[t]??e?.default??e;return n===e?n:Cw(n,e)}var rre=new Set([`when`,`delay`,`delayChildren`,`staggerChildren`,`staggerDirection`,`repeat`,`repeatType`,`repeatDelay`,`from`,`elapsed`]);function ire(e){for(let t in e)if(!rre.has(t))return!0;return!1}var Tw=(e,t,n,r={},i,a)=>o=>{let s=ww(r,e)||{},c=s.delay||r.delay||0,{elapsed:l=0}=r;l-=uS(c);let u={keyframes:Array.isArray(n)?n:[null,n],ease:`easeOut`,velocity:t.getVelocity(),...s,delay:-l,onUpdate:e=>{t.set(e),s.onUpdate&&s.onUpdate(e)},onComplete:()=>{o(),s.onComplete&&s.onComplete()},name:e,motionValue:t,element:a?void 0:i};ire(s)||Object.assign(u,nre(e,u)),u.duration&&=uS(u.duration),u.repeatDelay&&=uS(u.repeatDelay),u.from!==void 0&&(u.keyframes[0]=u.from);let d=!1;if((u.type===!1||u.duration===0&&!u.repeatDelay)&&(yw(u),u.delay===0&&(d=!0)),(eS.instantAnimations||eS.skipAnimations||i?.shouldSkipAnimations)&&(d=!0,yw(u),u.delay=0),u.allowFlatten=!s.type&&!s.ease,d&&!a&&t.get()!==void 0){let e=zC(u.keyframes,s);if(e!==void 0){RS.update(()=>{u.onUpdate(e),u.onComplete()});return}}return s.isSync?new HC(u):new Yne(u)};function Ew(e){let t=[{},{}];return e?.values.forEach((e,n)=>{t[0][n]=e.get(),t[1][n]=e.getVelocity()}),t}function Dw(e,t,n,r){if(typeof t==`function`){let[i,a]=Ew(r);t=t(n===void 0?e.custom:n,i,a)}if(typeof t==`string`&&(t=e.variants&&e.variants[t]),typeof t==`function`){let[i,a]=Ew(r);t=t(n===void 0?e.custom:n,i,a)}return t}function Ow(e,t,n){let r=e.getProps();return Dw(r,t,n===void 0?r.custom:n,e)}var kw=new Set([`width`,`height`,`top`,`left`,`right`,`bottom`,...ZC]),Aw=30,are=e=>!isNaN(parseFloat(e)),jw={current:void 0},ore=class{constructor(e,t={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=e=>{let t=US.now();if(this.updatedAt!==t&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(e),this.current!==this.prev&&(this.events.change?.notify(this.current),this.dependents))for(let e of this.dependents)e.dirty()},this.hasAnimated=!1,this.setCurrent(e),this.owner=t.owner}setCurrent(e){this.current=e,this.updatedAt=US.now(),this.canTrackVelocity===null&&e!==void 0&&(this.canTrackVelocity=are(this.current))}setPrevFrameValue(e=this.current){this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt}onChange(e){return this.on(`change`,e)}on(e,t){this.events[e]||(this.events[e]=new lS);let n=this.events[e].add(t);return e===`change`?()=>{n(),RS.read(()=>{this.events.change.getSize()||this.stop()})}:n}clearListeners(){for(let e in this.events)this.events[e].clear()}attach(e,t){this.passiveEffect=e,this.stopPassiveEffect=t}set(e){this.passiveEffect?this.passiveEffect(e,this.updateAndNotify):this.updateAndNotify(e)}setWithVelocity(e,t,n){this.set(t),this.prev=void 0,this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt-n}jump(e,t=!0){this.updateAndNotify(e),this.prev=e,this.prevUpdatedAt=this.prevFrameValue=void 0,t&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}dirty(){this.events.change?.notify(this.current)}addDependent(e){this.dependents||=new Set,this.dependents.add(e)}removeDependent(e){this.dependents&&this.dependents.delete(e)}get(){return jw.current&&jw.current.push(this),this.current}getPrevious(){return this.prev}getVelocity(){let e=US.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||e-this.updatedAt>Aw)return 0;let t=Math.min(this.updatedAt-this.prevUpdatedAt,Aw);return fS(parseFloat(this.current)-parseFloat(this.prevFrameValue),t)}start(e){return this.stop(),new Promise(t=>{this.hasAnimated=!0,this.animation=e(t),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.dependents?.clear(),this.events.destroy?.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}};function Mw(e,t){return new ore(e,t)}var Nw=e=>Array.isArray(e);function sre(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,Mw(n))}function cre(e){return Nw(e)?e[e.length-1]||0:e}function lre(e,t){let{transitionEnd:n={},transition:r={},...i}=Ow(e,t)||{};i={...i,...n};for(let t in i)sre(e,t,cre(i[t]))}var Pw=e=>!!(e&&e.getVelocity);function ure(e){return!!(Pw(e)&&e.add)}function Fw(e,t){let n=e.getValue(`willChange`);if(ure(n))return n.add(t);if(!n&&eS.WillChange){let n=new eS.WillChange(`auto`);e.addValue(`willChange`,n),n.add(t)}}function Iw(e){return e.replace(/([A-Z])/g,e=>`-${e.toLowerCase()}`)}var Lw=`data-`+Iw(`framerAppearId`);function Rw(e){return e.props[Lw]}function dre({protectedKeys:e,needsAnimating:t},n){let r=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,r}function zw(e,t,{delay:n=0,transitionOverride:r,type:i}={}){let{transition:a,transitionEnd:o,...s}=t,c=e.getDefaultTransition();a=a?Cw(a,c):c;let l=a?.reduceMotion;r&&(a=r);let u=[],d=i&&e.animationState&&e.animationState.getState()[i];for(let t in s){let r=e.getValue(t,e.latestValues[t]??null),i=s[t];if(i===void 0||d&&dre(d,t))continue;let o={delay:n,...ww(a||{},t)},c=r.get();if(c!==void 0&&!r.isAnimating()&&!Array.isArray(i)&&i===c&&!o.velocity){RS.update(()=>r.set(i));continue}let f=!1;if(window.MotionHandoffAnimation){let n=Rw(e);if(n){let e=window.MotionHandoffAnimation(n,t,RS);e!==null&&(o.startTime=e,f=!0)}}Fw(e,t);let p=l??e.shouldReduceMotion;r.start(Tw(t,r,i,p&&kw.has(t)?{type:!1}:o,e,f));let m=r.animation;m&&u.push(m)}if(o){let t=()=>RS.update(()=>{o&&lre(e,o)});u.length?Promise.all(u).then(t):t()}return u}function Bw(e,t,n={}){let r=Ow(e,t,n.type===`exit`?e.presenceContext?.custom:void 0),{transition:i=e.getDefaultTransition()||{}}=r||{};n.transitionOverride&&(i=n.transitionOverride);let a=r?()=>Promise.all(zw(e,r,n)):()=>Promise.resolve(),o=e.variantChildren&&e.variantChildren.size?(r=0)=>{let{delayChildren:a=0,staggerChildren:o,staggerDirection:s}=i;return fre(e,t,r,a,o,s,n)}:()=>Promise.resolve(),{when:s}=i;
21if(s){let[e,t]=s===`beforeChildren`?[a,o]:[o,a];return e().then(()=>t())}else return Promise.all([a(),o(n.delay)])}function fre(e,t,n=0,r=0,i=0,a=1,o){let s=[];for(let c of e.variantChildren)c.notify(`AnimationStart`,t),s.push(Bw(c,t,{...o,delay:n+(typeof r==`function`?0:r)+xw(e.variantChildren,c,r,i,a)}).then(()=>c.notify(`AnimationComplete`,t)));return Promise.all(s)}function pre(e,t,n={}){e.notify(`AnimationStart`,t);let r;if(Array.isArray(t)){let i=t.map(t=>Bw(e,t,n));r=Promise.all(i)}else if(typeof t==`string`)r=Bw(e,t,n);else{let i=typeof t==`function`?Ow(e,t,n.custom):t;r=Promise.all(zw(e,i,n))}return r.then(()=>{e.notify(`AnimationComplete`,t)})}var mre={test:e=>e===`auto`,parse:e=>e},Vw=e=>t=>t.test(e),Hw=[YS,cC,sC,oC,Vte,Bte,mre],Uw=e=>Hw.find(Vw(e));function hre(e){return typeof e==`number`?e===0:e===null?!0:e===`none`||e===`0`||rS(e)}var gre=new Set([`brightness`,`contrast`,`saturate`,`opacity`]);function _re(e){let[t,n]=e.slice(0,-1).split(`(`);if(t===`drop-shadow`)return e;let[r]=n.match($S)||[];if(!r)return e;let i=n.replace(r,``),a=+!!gre.has(t);return r!==n&&(a*=100),t+`(`+a+i+`)`}var vre=/\b([a-z-]*)\(.*?\)/gu,Ww={..._C,getAnimatableNone:e=>{let t=e.match(vre);return t?t.map(_re).join(` `):e}},Gw={..._C,getAnimatableNone:e=>{let t=_C.parse(e);return _C.createTransformer(e)(t.map(e=>typeof e==`number`?0:typeof e==`object`?{...e,alpha:1}:e))}},Kw={...YS,transform:Math.round},qw={borderWidth:cC,borderTopWidth:cC,borderRightWidth:cC,borderBottomWidth:cC,borderLeftWidth:cC,borderRadius:cC,borderTopLeftRadius:cC,borderTopRightRadius:cC,borderBottomRightRadius:cC,borderBottomLeftRadius:cC,width:cC,maxWidth:cC,height:cC,maxHeight:cC,top:cC,right:cC,bottom:cC,left:cC,inset:cC,insetBlock:cC,insetBlockStart:cC,insetBlockEnd:cC,insetInline:cC,insetInlineStart:cC,insetInlineEnd:cC,padding:cC,paddingTop:cC,paddingRight:cC,paddingBottom:cC,paddingLeft:cC,paddingBlock:cC,paddingBlockStart:cC,paddingBlockEnd:cC,paddingInline:cC,paddingInlineStart:cC,paddingInlineEnd:cC,margin:cC,marginTop:cC,marginRight:cC,marginBottom:cC,marginLeft:cC,marginBlock:cC,marginBlockStart:cC,marginBlockEnd:cC,marginInline:cC,marginInlineStart:cC,marginInlineEnd:cC,fontSize:cC,backgroundPositionX:cC,backgroundPositionY:cC,rotate:oC,rotateX:oC,rotateY:oC,rotateZ:oC,scale:ZS,scaleX:ZS,scaleY:ZS,scaleZ:ZS,skew:oC,skewX:oC,skewY:oC,distance:cC,translateX:cC,translateY:cC,translateZ:cC,x:cC,y:cC,z:cC,perspective:cC,transformPerspective:cC,opacity:XS,originX:lC,originY:lC,originZ:cC,zIndex:Kw,fillOpacity:XS,strokeOpacity:XS,numOctaves:Kw},yre={...qw,color:dC,backgroundColor:dC,outlineColor:dC,fill:dC,stroke:dC,borderColor:dC,borderTopColor:dC,borderRightColor:dC,borderBottomColor:dC,borderLeftColor:dC,filter:Ww,WebkitFilter:Ww,mask:Gw,WebkitMask:Gw},Jw=e=>yre[e],bre=new Set([Ww,Gw]);function Yw(e,t){let n=Jw(e);return bre.has(n)||(n=_C),n.getAnimatableNone?n.getAnimatableNone(t):void 0}var xre=new Set([`auto`,`none`,`0`]);function Sre(e,t,n){let r=0,i;for(;r<e.length&&!i;){let t=e[r];typeof t==`string`&&!xre.has(t)&&hC(t).values.length&&(i=e[r]),r++}if(i&&n)for(let r of t)e[r]=Yw(n,i)}var Cre=class extends sw{constructor(e,t,n,r,i){super(e,t,n,r,i,!0)}readKeyframes(){let{unresolvedKeyframes:e,element:t,name:n}=this;if(!t||!t.current)return;super.readKeyframes();for(let n=0;n<e.length;n++){let r=e[n];if(typeof r==`string`&&(r=r.trim(),qS(r))){let i=Sw(r,t.current);i!==void 0&&(e[n]=i),n===e.length-1&&(this.finalKeyframe=r)}}if(this.resolveNoneKeyframes(),!kw.has(n)||e.length!==2)return;let[r,i]=e,a=Uw(r),o=Uw(i);if(JS(r)!==JS(i)&&ew[n]){this.needsMeasurement=!0;return}if(a!==o)if($C(a)&&$C(o))for(let t=0;t<e.length;t++){let n=e[t];typeof n==`string`&&(e[t]=parseFloat(n))}else ew[n]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){let{unresolvedKeyframes:e,name:t}=this,n=[];for(let t=0;t<e.length;t++)(e[t]===null||hre(e[t]))&&n.push(t);n.length&&Sre(e,n,t)}measureInitialState(){let{element:e,unresolvedKeyframes:t,name:n}=this;if(!e||!e.current)return;n===`height`&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=ew[n](e.measureViewportBox(),window.getComputedStyle(e.current)),t[0]=this.measuredOrigin;let r=t[t.length-1];r!==void 0&&e.getValue(n,r).jump(r,!1)}measureEndState(){let{element:e,name:t,unresolvedKeyframes:n}=this;if(!e||!e.current)return;let r=e.getValue(t);r&&r.jump(this.measuredOrigin,!1);let i=n.length-1,a=n[i];n[i]=ew[t](e.measureViewportBox(),window.getComputedStyle(e.current)),a!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=a),this.removedTransforms?.length&&this.removedTransforms.forEac
21h(([t,n])=>{e.getValue(t).set(n)}),this.resolveNoneKeyframes()}};function Xw(e,t,n){if(e==null)return[];if(e instanceof EventTarget)return[e];if(typeof e==`string`){let r=document;t&&(r=t.current);let i=n?.[e]??r.querySelectorAll(e);return i?Array.from(i):[]}return Array.from(e).filter(e=>e!=null)}var Zw=(e,t)=>t&&typeof e==`number`?t.transform(e):e;function Qw(e){return nS(e)&&`offsetHeight`in e&&!(`ownerSVGElement`in e)}var{schedule:$w,cancel:wre}=LS(queueMicrotask,!1),eT={x:!1,y:!1};function tT(){return eT.x||eT.y}function Tre(e){return e===`x`||e===`y`?eT[e]?null:(eT[e]=!0,()=>{eT[e]=!1}):eT.x||eT.y?null:(eT.x=eT.y=!0,()=>{eT.x=eT.y=!1})}function nT(e,t){let n=Xw(e),r=new AbortController;return[n,{passive:!0,...t,signal:r.signal},()=>r.abort()]}function Ere(e){return!(e.pointerType===`touch`||tT())}function Dre(e,t,n={}){let[r,i,a]=nT(e,n);return r.forEach(e=>{let n=!1,r=!1,a,o=()=>{e.removeEventListener(`pointerleave`,u)},s=e=>{a&&=(a(e),void 0),o()},c=e=>{n=!1,window.removeEventListener(`pointerup`,c),window.removeEventListener(`pointercancel`,c),r&&(r=!1,s(e))},l=()=>{n=!0,window.addEventListener(`pointerup`,c,i),window.addEventListener(`pointercancel`,c,i)},u=e=>{if(e.pointerType!==`touch`){if(n){r=!0;return}s(e)}};e.addEventListener(`pointerenter`,n=>{if(!Ere(n))return;r=!1;let o=t(e,n);typeof o==`function`&&(a=o,e.addEventListener(`pointerleave`,u,i))},i),e.addEventListener(`pointerdown`,l,i)}),a}var rT=(e,t)=>t?e===t?!0:rT(e,t.parentElement):!1,iT=e=>e.pointerType===`mouse`?typeof e.button!=`number`||e.button<=0:e.isPrimary!==!1,Ore=new Set([`BUTTON`,`INPUT`,`SELECT`,`TEXTAREA`,`A`]);function kre(e){return Ore.has(e.tagName)||e.isContentEditable===!0}var Are=new Set([`INPUT`,`SELECT`,`TEXTAREA`]);function jre(e){return Are.has(e.tagName)||e.isContentEditable===!0}var aT=new WeakSet;function oT(e){return t=>{t.key===`Enter`&&e(t)}}function sT(e,t){e.dispatchEvent(new PointerEvent(`pointer`+t,{isPrimary:!0,bubbles:!0}))}var Mre=(e,t)=>{let n=e.currentTarget;if(!n)return;let r=oT(()=>{if(aT.has(n))return;sT(n,`down`);let e=oT(()=>{sT(n,`up`)});n.addEventListener(`keyup`,e,t),n.addEventListener(`blur`,()=>sT(n,`cancel`),t)});n.addEventListener(`keydown`,r,t),n.addEventListener(`blur`,()=>n.removeEventListener(`keydown`,r),t)};function cT(e){return iT(e)&&!tT()}var lT=new WeakSet;function Nre(e,t,n={}){let[r,i,a]=nT(e,n),o=e=>{let r=e.currentTarget;if(!cT(e)||lT.has(e))return;aT.add(r),n.stopPropagation&&lT.add(e);let a=t(r,e),o=(e,t)=>{window.removeEventListener(`pointerup`,s),window.removeEventListener(`pointercancel`,c),aT.has(r)&&aT.delete(r),cT(e)&&typeof a==`function`&&a(e,{success:t})},s=e=>{o(e,r===window||r===document||n.useGlobalTarget||rT(r,e.target))},c=e=>{o(e,!1)};window.addEventListener(`pointerup`,s,i),window.addEventListener(`pointercancel`,c,i)};return r.forEach(e=>{(n.useGlobalTarget?window:e).addEventListener(`pointerdown`,o,i),Qw(e)&&(e.addEventListener(`focus`,e=>Mre(e,i)),!kre(e)&&!e.hasAttribute(`tabindex`)&&(e.tabIndex=0))}),a}function uT(e){return nS(e)&&`ownerSVGElement`in e}var dT=new WeakMap,fT,pT=(e,t,n)=>(r,i)=>i&&i[0]?i[0][e+`Size`]:uT(r)&&`getBBox`in r?r.getBBox()[t]:r[n],Pre=pT(`inline`,`width`,`offsetWidth`),Fre=pT(`block`,`height`,`offsetHeight`);function mT({target:e,borderBoxSize:t}){dT.get(e)?.forEach(n=>{n(e,{get width(){return Pre(e,t)},get height(){return Fre(e,t)}})})}function hT(e){e.forEach(mT)}function Ire(){typeof ResizeObserver>`u`||(fT=new ResizeObserver(hT))}function Lre(e,t){fT||Ire();let n=Xw(e);return n.forEach(e=>{let n=dT.get(e);n||(n=new Set,dT.set(e,n)),n.add(t),fT?.observe(e)}),()=>{n.forEach(e=>{let n=dT.get(e);n?.delete(t),n?.size||fT?.unobserve(e)})}}var gT=new Set,_T;function Rre(){_T=()=>{let e={get width(){return window.innerWidth},get height(){return window.innerHeight}};gT.forEach(t=>t(e))},window.addEventListener(`resize`,_T)}function zre(e){return gT.add(e),_T||Rre(),()=>{gT.delete(e),!gT.size&&typeof _T==`function`&&(window.removeEventListener(`resize`,_T),_T=void 0)}}function vT(e,t){return typeof e==`function`?zre(e):Lre(e,t)}function Bre(e){return uT(e)&&e.tagName===`svg`}var Vre=[...Hw,dC,_C],Hre=e=>Vre.find(Vw(e)),yT=()=>({translate:0,scale:1,origin:0,originPoint:0}),bT=()=>({x:yT(),y:yT()}),xT=()=>({min:0,max:0}),ST=()=>({x:xT(),y:xT()}),CT=new WeakMap;function wT(e){return typeof e==`object`&&!!e&&typeof e.start==`function`}function TT(e){return typeof e==`string`||Array.isArray(e)}var ET=[`animate`,`whileInView`,`whileFocus`,`whileHover`,`whileTap`,`whileDrag`,`exit`],DT=[`initial`,...ET];
21function OT(e){return wT(e.animate)||DT.some(t=>TT(e[t]))}function kT(e){return!!(OT(e)||e.variants)}function AT(e,t,n){for(let r in t){let i=t[r],a=n[r];if(Pw(i))e.addValue(r,i);else if(Pw(a))e.addValue(r,Mw(i,{owner:e}));else if(a!==i)if(e.hasValue(r)){let t=e.getValue(r);t.liveStyle===!0?t.jump(i):t.hasAnimated||t.set(i)}else{let t=e.getStaticValue(r);e.addValue(r,Mw(t===void 0?i:t,{owner:e}))}}for(let r in n)t[r]===void 0&&e.removeValue(r);return t}var jT={current:null},MT={current:!1},NT=typeof window<`u`;function PT(){if(MT.current=!0,NT)if(window.matchMedia){let e=window.matchMedia(`(prefers-reduced-motion)`),t=()=>jT.current=e.matches;e.addEventListener(`change`,t),t()}else jT.current=!1}var FT=[`AnimationStart`,`AnimationComplete`,`Update`,`BeforeLayoutMeasure`,`LayoutMeasure`,`LayoutAnimationStart`,`LayoutAnimationComplete`],IT={};function LT(e){IT=e}function RT(){return IT}var zT=class{scrapeMotionValuesFromProps(e,t,n){return{}}constructor({parent:e,props:t,presenceContext:n,reducedMotionConfig:r,skipAnimations:i,blockInitialAnimation:a,visualState:o},s={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.shouldSkipAnimations=!1,this.values=new Map,this.KeyframeResolver=sw,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.hasBeenMounted=!1,this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify(`Update`,this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{let e=US.now();this.renderScheduledAt<e&&(this.renderScheduledAt=e,RS.render(this.render,!1,!0))};let{latestValues:c,renderState:l}=o;this.latestValues=c,this.baseTarget={...c},this.initialValues=t.initial?{...c}:{},this.renderState=l,this.parent=e,this.props=t,this.presenceContext=n,this.depth=e?e.depth+1:0,this.reducedMotionConfig=r,this.skipAnimationsConfig=i,this.options=s,this.blockInitialAnimation=!!a,this.isControllingVariants=OT(t),this.isVariantNode=kT(t),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(e&&e.current);let{willChange:u,...d}=this.scrapeMotionValuesFromProps(t,{},this);for(let e in d){let t=d[e];c[e]!==void 0&&Pw(t)&&t.set(c[e])}}mount(e){if(this.hasBeenMounted)for(let e in this.initialValues)this.values.get(e)?.jump(this.initialValues[e]),this.latestValues[e]=this.initialValues[e];this.current=e,CT.set(e,this),this.projection&&!this.projection.instance&&this.projection.mount(e),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((e,t)=>this.bindToMotionValue(t,e)),this.reducedMotionConfig===`never`?this.shouldReduceMotion=!1:this.reducedMotionConfig===`always`?this.shouldReduceMotion=!0:(MT.current||PT(),this.shouldReduceMotion=jT.current),this.shouldSkipAnimations=this.skipAnimationsConfig??!1,this.parent?.addChild(this),this.update(this.props,this.presenceContext),this.hasBeenMounted=!0}unmount(){this.projection&&this.projection.unmount(),zS(this.notifyUpdate),zS(this.render),this.valueSubscriptions.forEach(e=>e()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent?.removeChild(this);for(let e in this.events)this.events[e].clear();for(let e in this.features){let t=this.features[e];t&&(t.unmount(),t.isMounted=!1)}this.current=null}addChild(e){this.children.add(e),this.enteringChildren??=new Set,this.enteringChildren.add(e)}removeChild(e){this.children.delete(e),this.enteringChildren&&this.enteringChildren.delete(e)}bindToMotionValue(e,t){if(this.valueSubscriptions.has(e)&&this.valueSubscriptions.get(e)(),t.accelerate&&bw.has(e)&&this.current instanceof HTMLElement){let{factory:n,keyframes:r,times:i,ease:a,duration:o}=t.accelerate,s=new hw({element:this.current,name:e,keyframes:r,times:i,ease:a,duration:uS(o)}),c=n(s);this.valueSubscriptions.set(e,()=>{c(),s.cancel()});return}let n=QC.has(e);n&&this.onBindTransform&&this.onBindTransform();let r=t.on(`change`,t=>{this.latestValues[e]=t,this.props.onUpdate&&RS.preRender(this.notifyUpdate),n&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()}),i;typeof window<`u`&&window.MotionCheckAppearSync&&(i=window.MotionCheckAppearSync(this,e,t)),this.valueSubscriptions.set(e,()=>{r(),i&&i(),t.owner&&t.stop()})}sortNodePosition(e){return!this.current||!this.sortInstanceNodePosition||this.type!==e.type?0:this.sortInstanceNodePosition(this.current,e.current)}updateFeatures(){let e=`animation`;for(e in IT){let t=IT[e];if(!t)continue;let{isEnabled:n,Feature:r}=t;if(!this.features[e]&&r&&n(this.props)&&(this.features[e]=new r(this)),this.features[e]){let t=this.features[e];
21t.isMounted?t.update():(t.mount(),t.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):ST()}getStaticValue(e){return this.latestValues[e]}setStaticValue(e,t){this.latestValues[e]=t}update(e,t){(e.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=e,this.prevPresenceContext=this.presenceContext,this.presenceContext=t;for(let t=0;t<FT.length;t++){let n=FT[t];this.propEventSubscriptions[n]&&(this.propEventSubscriptions[n](),delete this.propEventSubscriptions[n]);let r=e[`on`+n];r&&(this.propEventSubscriptions[n]=this.on(n,r))}this.prevMotionValues=AT(this,this.scrapeMotionValuesFromProps(e,this.prevProps||{},this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(e){return this.props.variants?this.props.variants[e]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}addVariantChild(e){let t=this.getClosestVariantNode();if(t)return t.variantChildren&&t.variantChildren.add(e),()=>t.variantChildren.delete(e)}addValue(e,t){let n=this.values.get(e);t!==n&&(n&&this.removeValue(e),this.bindToMotionValue(e,t),this.values.set(e,t),this.latestValues[e]=t.get())}removeValue(e){this.values.delete(e);let t=this.valueSubscriptions.get(e);t&&(t(),this.valueSubscriptions.delete(e)),delete this.latestValues[e],this.removeValueFromRenderState(e,this.renderState)}hasValue(e){return this.values.has(e)}getValue(e,t){if(this.props.values&&this.props.values[e])return this.props.values[e];let n=this.values.get(e);return n===void 0&&t!==void 0&&(n=Mw(t===null?void 0:t,{owner:this}),this.addValue(e,n)),n}readValue(e,t){let n=this.latestValues[e]!==void 0||!this.current?this.latestValues[e]:this.getBaseTargetFromProps(this.props,e)??this.readValueFromInstance(this.current,e,this.options);return n!=null&&(typeof n==`string`&&(tS(n)||rS(n))?n=parseFloat(n):!Hre(n)&&_C.test(t)&&(n=Yw(e,t)),this.setBaseTarget(e,Pw(n)?n.get():n)),Pw(n)?n.get():n}setBaseTarget(e,t){this.baseTarget[e]=t}getBaseTarget(e){let{initial:t}=this.props,n;if(typeof t==`string`||typeof t==`object`){let r=Dw(this.props,t,this.presenceContext?.custom);r&&(n=r[e])}if(t&&n!==void 0)return n;let r=this.getBaseTargetFromProps(this.props,e);return r!==void 0&&!Pw(r)?r:this.initialValues[e]!==void 0&&n===void 0?void 0:this.baseTarget[e]}on(e,t){return this.events[e]||(this.events[e]=new lS),this.events[e].add(t)}notify(e,...t){this.events[e]&&this.events[e].notify(...t)}scheduleRenderMicrotask(){$w.render(this.render)}},BT=class extends zT{constructor(){super(...arguments),this.KeyframeResolver=Cre}sortInstanceNodePosition(e,t){return e.compareDocumentPosition(t)&2?1:-1}getBaseTargetFromProps(e,t){let n=e.style;return n?n[t]:void 0}removeValueFromRenderState(e,{vars:t,style:n}){delete t[e],delete n[e]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);let{children:e}=this.props;Pw(e)&&(this.childSubscription=e.on(`change`,e=>{this.current&&(this.current.textContent=`${e}`)}))}},VT=class{constructor(e){this.isMounted=!1,this.node=e}update(){}};function HT({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function Ure({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function Wre(e,t){if(!t)return e;let n=t({x:e.left,y:e.top}),r=t({x:e.right,y:e.bottom});return{top:n.y,left:n.x,bottom:r.y,right:r.x}}function UT(e){return e===void 0||e===1}function WT({scale:e,scaleX:t,scaleY:n}){return!UT(e)||!UT(t)||!UT(n)}function GT(e){return WT(e)||KT(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function KT(e){return qT(e.x)||qT(e.y)}function qT(e){return e&&e!==`0%`}function JT(e,t,n){return n+t*(e-n)}function YT(e,t,n,r,i){return i!==void 0&&(e=JT(e,i,r)),JT(e,n,r)+t}function XT(e,t=0,n=1,r,i){e.min=YT(e.min,t,n,r,i),e.max=YT(e.max,t,n,r,i)}function ZT(e,{x:t,y:n}){XT(e.x,t.translate,t.scale,t.originPoint),XT(e.y,n.translate,n.scale,n.originPoint)}var QT=.999999999999,$T=1.0000000000001;function Gre(e,t,n,r=!1){let i=n.length;if(!i)return;t.x=t.y=1;let a,o;for(let s=0;s<i;s++){a=n[s],o=a.projectionDelta;let{visualElement:i}=a.options;i&&i.props.style&&i.props.style.display===`contents`||(r&&a.options.layoutScroll&&a.scroll&&a!==a.root&&(eE(e.x,-a.scroll.offset.x),eE(e.y,-a.scroll.offset.y)),o&&(t.x*=o.x.scale,t.y*=o.y.scale,ZT(e,o)),r&>(a.latestValues)&&rE(e,a.latestValues,a.layout?.layoutBox))}t.x<$T&&t.x>QT&&(t.x=1),t.y<$T&&t.y>QT&&(t.y=1)}function eE(e,t){e.min+=t,e.max+=t}function tE(e,t,n,r,i=.5){XT(e,t,n,bC(e.min,e.max,i),r)}function nE(e,t){return typeof e==`string`?parseFloat(e)/100*(t.max-t.min):e}function rE(e,t,n){let r=n??e;tE(e.x,nE(t.x,r.x),t.scaleX,t.scale,t.originX),tE(e.y,nE(t.y,r.y),t.scaleY,t.scale,t.originY)}function iE(e,t){return HT(Wre(e.getBoundingClientRect(),t))}function Kre(e,t,n){let r=iE(e,n),{scroll:i}=t;return i&&(eE(r.x,i.offset.x),eE(r.y,i.offset.y)),r}var qre={x:`translateX`,y:`translateY`,z:`translateZ`,transformPerspective:`perspective`},Jre=ZC.length;function Yre(e,t,n){let r=``,i=!0;for(let a=0;a<Jre;a++){let o=ZC[a],s=e[o];if(s===void 0)continue;let c=!0;
21if(typeof s==`number`)c=s===+!!o.startsWith(`scale`);else{let e=parseFloat(s);c=o.startsWith(`scale`)?e===1:e===0}if(!c||n){let e=Zw(s,qw[o]);if(!c){i=!1;let t=qre[o]||o;r+=`${t}(${e}) `}n&&(t[o]=e)}}return r=r.trim(),n?r=n(t,i?``:r):i&&(r=`none`),r}function aE(e,t,n){let{style:r,vars:i,transformOrigin:a}=e,o=!1,s=!1;for(let e in t){let n=t[e];if(QC.has(e)){o=!0;continue}else if(KS(e)){i[e]=n;continue}else{let t=Zw(n,qw[e]);e.startsWith(`origin`)?(s=!0,a[e]=t):r[e]=t}}if(t.transform||(o||n?r.transform=Yre(t,e.transform,n):r.transform&&=`none`),s){let{originX:e=`50%`,originY:t=`50%`,originZ:n=0}=a;r.transformOrigin=`${e} ${t} ${n}`}}function oE(e,{style:t,vars:n},r,i){let a=e.style,o;for(o in t)a[o]=t[o];for(o in i?.applyProjectionStyles(a,r),n)a.setProperty(o,n[o])}function sE(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}var cE={correct:(e,t)=>{if(!t.target)return e;if(typeof e==`string`)if(cC.test(e))e=parseFloat(e);else return e;return`${sE(e,t.target.x)}% ${sE(e,t.target.y)}%`}},Xre={correct:(e,{treeScale:t,projectionDelta:n})=>{let r=e,i=_C.parse(e);if(i.length>5)return r;let a=_C.createTransformer(e),o=typeof i[0]==`number`?0:1,s=n.x.scale*t.x,c=n.y.scale*t.y;i[0+o]/=s,i[1+o]/=c;let l=bC(s,c,.5);return typeof i[2+o]==`number`&&(i[2+o]/=l),typeof i[3+o]==`number`&&(i[3+o]/=l),a(i)}},lE={borderRadius:{...cE,applyTo:[`borderTopLeftRadius`,`borderTopRightRadius`,`borderBottomLeftRadius`,`borderBottomRightRadius`]},borderTopLeftRadius:cE,borderTopRightRadius:cE,borderBottomLeftRadius:cE,borderBottomRightRadius:cE,boxShadow:Xre};function uE(e,{layout:t,layoutId:n}){return QC.has(e)||e.startsWith(`origin`)||(t||n!==void 0)&&(!!lE[e]||e===`opacity`)}function dE(e,t,n){let r=e.style,i=t?.style,a={};if(!r)return a;for(let t in r)(Pw(r[t])||i&&Pw(i[t])||uE(t,e)||n?.getValue(t)?.liveStyle!==void 0)&&(a[t]=r[t]);return a}function Zre(e){return window.getComputedStyle(e)}var Qre=class extends BT{constructor(){super(...arguments),this.type=`html`,this.renderInstance=oE}readValueFromInstance(e,t){if(QC.has(t))return this.projection?.isProjecting?YC(t):Dne(e,t);{let n=Zre(e),r=(KS(t)?n.getPropertyValue(t):n[t])||0;return typeof r==`string`?r.trim():r}}measureInstanceViewportBox(e,{transformPagePoint:t}){return iE(e,t)}build(e,t,n){aE(e,t,n.transformTemplate)}scrapeMotionValuesFromProps(e,t,n){return dE(e,t,n)}},fE={offset:`stroke-dashoffset`,array:`stroke-dasharray`},$re={offset:`strokeDashoffset`,array:`strokeDasharray`};function eie(e,t,n=1,r=0,i=!0){e.pathLength=1;let a=i?fE:$re;e[a.offset]=`${-r}`,e[a.array]=`${t} ${n}`}var tie=[`offsetDistance`,`offsetPath`,`offsetRotate`,`offsetAnchor`];function pE(e,{attrX:t,attrY:n,attrScale:r,pathLength:i,pathSpacing:a=1,pathOffset:o=0,...s},c,l,u){if(aE(e,s,l),c){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};let{attrs:d,style:f}=e;d.transform&&(f.transform=d.transform,delete d.transform),(f.transform||d.transformOrigin)&&(f.transformOrigin=d.transformOrigin??`50% 50%`,delete d.transformOrigin),f.transform&&(f.transformBox=u?.transformBox??`fill-box`,delete d.transformBox);for(let e of tie)d[e]!==void 0&&(f[e]=d[e],delete d[e]);t!==void 0&&(d.x=t),n!==void 0&&(d.y=n),r!==void 0&&(d.scale=r),i!==void 0&&eie(d,i,a,o,!1)}var mE=new Set([`baseFrequency`,`diffuseConstant`,`kernelMatrix`,`kernelUnitLength`,`keySplines`,`keyTimes`,`limitingConeAngle`,`markerHeight`,`markerWidth`,`numOctaves`,`targetX`,`targetY`,`surfaceScale`,`specularConstant`,`specularExponent`,`stdDeviation`,`tableValues`,`viewBox`,`gradientTransform`,`pathLength`,`startOffset`,`textLength`,`lengthAdjust`]),hE=e=>typeof e==`string`&&e.toLowerCase()===`svg`;function nie(e,t,n,r){oE(e,t,void 0,r);for(let n in t.attrs)e.setAttribute(mE.has(n)?n:Iw(n),t.attrs[n])}function gE(e,t,n){let r=dE(e,t,n);for(let n in e)if(Pw(e[n])||Pw(t[n])){let t=ZC.indexOf(n)===-1?n:`attr`+n.charAt(0).toUpperCase()+n.substring(1);r[t]=e[n]}return r}var rie=class extends BT{constructor(){super(...arguments),this.type=`svg`,this.isSVGTag=!1,this.measureInstanceViewportBox=ST}getBaseTargetFromProps(e,t){return e[t]}readValueFromInstance(e,t){if(QC.has(t)){let e=Jw(t);return e&&e.default||0}return t=mE.has(t)?t:Iw(t),e.getAttribute(t)}scrapeMotionValuesFromProps(e,t,n){return gE(e,t,n)}
21build(e,t,n){pE(e,t,this.isSVGTag,n.transformTemplate,n.style)}renderInstance(e,t,n,r){nie(e,t,n,r)}mount(e){this.isSVGTag=hE(e.tagName),super.mount(e)}},_E=DT.length;function vE(e){if(!e)return;if(!e.isControllingVariants){let t=e.parent&&vE(e.parent)||{};return e.props.initial!==void 0&&(t.initial=e.props.initial),t}let t={};for(let n=0;n<_E;n++){let r=DT[n],i=e.props[r];(TT(i)||i===!1)&&(t[r]=i)}return t}function yE(e,t){if(!Array.isArray(t))return!1;let n=t.length;if(n!==e.length)return!1;for(let r=0;r<n;r++)if(t[r]!==e[r])return!1;return!0}var bE=[...ET].reverse(),xE=ET.length;function iie(e){return t=>Promise.all(t.map(({animation:t,options:n})=>pre(e,t,n)))}function aie(e){let t=iie(e),n=CE(),r=!0,i=!1,a=t=>(n,r)=>{let i=Ow(e,r,t===`exit`?e.presenceContext?.custom:void 0);if(i){let{transition:e,transitionEnd:t,...r}=i;n={...n,...r,...t}}return n};function o(n){t=n(e)}function s(o){let{props:s}=e,c=vE(e.parent)||{},l=[],u=new Set,d={},f=1/0;for(let t=0;t<xE;t++){let p=bE[t],m=n[p],h=s[p]===void 0?c[p]:s[p],g=TT(h),_=p===o?m.isActive:null;_===!1&&(f=t);let v=h===c[p]&&h!==s[p]&&g;if(v&&(r||i)&&e.manuallyAnimateOnMount&&(v=!1),m.protectedKeys={...d},!m.isActive&&_===null||!h&&!m.prevProp||wT(h)||typeof h==`boolean`)continue;if(p===`exit`&&m.isActive&&_!==!0){m.prevResolvedValues&&(d={...d,...m.prevResolvedValues});continue}let y=oie(m.prevProp,h),b=y||p===o&&m.isActive&&!v&&g||t>f&&g,x=!1,S=Array.isArray(h)?h:[h],C=S.reduce(a(p),{});_===!1&&(C={});let{prevResolvedValues:w={}}=m,T={...w,...C},E=t=>{b=!0,u.has(t)&&(x=!0,u.delete(t)),m.needsAnimating[t]=!0;let n=e.getValue(t);n&&(n.liveStyle=!1)};for(let e in T){let t=C[e],n=w[e];if(d.hasOwnProperty(e))continue;let r=!1;r=Nw(t)&&Nw(n)?!yE(t,n):t!==n,r?t==null?u.add(e):E(e):t!==void 0&&u.has(e)?E(e):m.protectedKeys[e]=!0}m.prevProp=h,m.prevResolvedValues=C,m.isActive&&(d={...d,...C}),(r||i)&&e.blockInitialAnimation&&(b=!1);let D=v&&y;b&&(!D||x)&&l.push(...S.map(t=>{let n={type:p};if(typeof t==`string`&&(r||i)&&!D&&e.manuallyAnimateOnMount&&e.parent){let{parent:r}=e,i=Ow(r,t);if(r.enteringChildren&&i){let{delayChildren:t}=i.transition||{};n.delay=xw(r.enteringChildren,e,t)}}return{animation:t,options:n}}))}if(u.size){let t={};if(typeof s.initial!=`boolean`){let n=Ow(e,Array.isArray(s.initial)?s.initial[0]:s.initial);n&&n.transition&&(t.transition=n.transition)}u.forEach(n=>{let r=e.getBaseTarget(n),i=e.getValue(n);i&&(i.liveStyle=!0),t[n]=r??null}),l.push({animation:t})}let p=!!l.length;return r&&(s.initial===!1||s.initial===s.animate)&&!e.manuallyAnimateOnMount&&(p=!1),r=!1,i=!1,p?t(l):Promise.resolve()}function c(t,r){if(n[t].isActive===r)return Promise.resolve();e.variantChildren?.forEach(e=>e.animationState?.setActive(t,r)),n[t].isActive=r;let i=s(t);for(let e in n)n[e].protectedKeys={};return i}return{animateChanges:s,setActive:c,setAnimateFunction:o,getState:()=>n,reset:()=>{n=CE(),i=!0}}}function oie(e,t){return typeof t==`string`?t!==e:Array.isArray(t)?!yE(t,e):!1}function SE(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function CE(){return{animate:SE(!0),whileInView:SE(),whileHover:SE(),whileTap:SE(),whileDrag:SE(),whileFocus:SE(),exit:SE()}}function wE(e,t){e.min=t.min,e.max=t.max}function TE(e,t){wE(e.x,t.x),wE(e.y,t.y)}function EE(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}var DE=1e-4,OE=1-DE,kE=1+DE,AE=.01,jE=0-AE,ME=0+AE;function NE(e){return e.max-e.min}function PE(e,t,n){return Math.abs(e-t)<=n}function FE(e,t,n,r=.5){e.origin=r,e.originPoint=bC(t.min,t.max,e.origin),e.scale=NE(n)/NE(t),e.translate=bC(n.min,n.max,e.origin)-e.originPoint,(e.scale>=OE&&e.scale<=kE||isNaN(e.scale))&&(e.scale=1),(e.translate>=jE&&e.translate<=ME||isNaN(e.translate))&&(e.translate=0)}function IE(e,t,n,r){FE(e.x,t.x,n.x,r?r.originX:void 0),FE(e.y,t.y,n.y,r?r.originY:void 0)}function LE(e,t,n,r=0){e.min=(r?bC(n.min,n.max,r):n.min)+t.min,e.max=e.min+NE(t)}function RE(e,t,n,r){LE(e.x,t.x,n.x,r?.x),LE(e.y,t.y,n.y,r?.y)}function zE(e,t,n,r=0){let i=r?bC(n.min,n.max,r):n.min;e.min=t.min-i,e.max=e.min+NE(t)}function BE(e,t,n,r){zE(e.x,t.x,n.x,r?.x),zE(e.y,t.y,n.y,r?.y)}function VE(e,t,n,r,i){return e-=t,e=JT(e,1/n,r),i!==void 0&&(e=JT(e,1/i,r)),e}function sie(e,t=0,n=1,r=.5,i,a=e,o=e){if(sC.test(t)&&(t=parseFloat(t),t=bC(o.min,o.max,t/100)-o.min),typeof t!=`number`)return;let s=bC(a.min,a.max,r);e===a&&(s-=t),e.min=VE(e.min,t,n,s,i),e.max=VE(e.max,t,n,s,i)}function HE(e,t,[n,r,i],a,o){sie(e,t[n],t[r],t[i],t.scale,a,o)}var cie=[`x`,`scaleX`,`originX`],lie=[`y`,`scaleY`,`originY`];function UE(e,t,n,r){HE(e.x,t,cie,n?n.x:void 0,r?r.x:void 0),HE(e.y,t,lie,n?n.y:void 0,r?r.y:void 0)}function WE(e){return e.translate===0&&e.scale===1}function GE(e){return WE(e.x)&&WE(e.y)}function KE(e,t){return e.min===t.min&&e.max===t.max}function uie(e,t){return KE(e.x,t.x)&&KE(e.y,t.y)}function qE(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function JE(e,t){return qE(e.x,t.x)&&qE(e.y,t.y)}function YE(e){return NE(e.x)/NE(e.y)}function XE(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}function ZE(e){return[e(`x`),e(`y`)]}function die(e,t,n){let r=``,i=e.x.translate/t.x,a=e.y.translate/t.y,o=n?.z||0;if((i||a||o)&&(r=`translate3d(${i}px, ${a}px, ${o}px) `),(t.x!==1||t.y!==1)&&(r+=`scale(${1/t.x}, ${1/t.y}) `),n){let{transformPerspective:e,rotate:t,rotateX:i,rotateY:a,skewX:o,skewY:s}=n;e&&(r=`perspective(${e}px) ${r}`),t&&(r+=`rotate(${t}deg) `),i&&(r+=`rotateX(${i}deg) `),a&&(r+=`rotateY(${a}deg) `),o&&(r+=`skewX(${o}deg) `),s&&(r+=`skewY(${s}deg) `)}let s=e.x.scale*t.x,c=e.y.scale*t.y;return(s!==1||c!==1)&&(r+=`scale(${s}, ${c})`),r||`none`}var QE=[`borderTopLeftRadius`,`borderTopRightRadius`,`borderBottomLeftRadius`,`borderBottomRightRadius`],fie=QE.length,$E=e=>typeof e==`string`?parseFloat(e):e,eD=e=>typeof e==`number`||cC.test(e);function pie(e,t,n,r,i,a){i?(e.opacity=bC(0,n.opacity??1,mie(r)),e.o
21pacityExit=bC(t.opacity??1,0,hie(r))):a&&(e.opacity=bC(t.opacity??1,n.opacity??1,r));for(let i=0;i<fie;i++){let a=QE[i],o=tD(t,a),s=tD(n,a);o===void 0&&s===void 0||(o||=0,s||=0,o===0||s===0||eD(o)===eD(s)?(e[a]=Math.max(bC($E(o),$E(s),r),0),(sC.test(s)||sC.test(o))&&(e[a]+=`%`)):e[a]=s)}(t.rotate||n.rotate)&&(e.rotate=bC(t.rotate||0,n.rotate||0,r))}function tD(e,t){return e[t]===void 0?e.borderRadius:e[t]}var mie=nD(0,.5,TS),hie=nD(.5,.95,aS);function nD(e,t,n){return r=>r<e?0:r>t?1:n(cS(e,t,r))}function rD(e,t,n){let r=Pw(e)?e:Mw(e);return r.start(Tw(``,r,t,n)),r.animation}function iD(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}var aD=(e,t)=>e.depth-t.depth,oD=class{constructor(){this.children=[],this.isDirty=!1}add(e){Zx(this.children,e),this.isDirty=!0}remove(e){Qx(this.children,e),this.isDirty=!0}forEach(e){this.isDirty&&this.children.sort(aD),this.isDirty=!1,this.children.forEach(e)}};function sD(e,t){let n=US.now(),r=({timestamp:i})=>{let a=i-n;a>=t&&(zS(r),e(a-t))};return RS.setup(r,!0),()=>zS(r)}function cD(e){return Pw(e)?e.get():e}var lD=class{constructor(){this.members=[]}add(e){Zx(this.members,e);for(let t=this.members.length-1;t>=0;t--){let n=this.members[t];if(n===e||n===this.lead||n===this.prevLead)continue;let r=n.instance;(!r||r.isConnected===!1)&&!n.snapshot&&(Qx(this.members,n),n.unmount())}e.scheduleRender()}remove(e){if(Qx(this.members,e),e===this.prevLead&&(this.prevLead=void 0),e===this.lead){let e=this.members[this.members.length-1];e&&this.promote(e)}}relegate(e){for(let t=this.members.indexOf(e)-1;t>=0;t--){let e=this.members[t];if(e.isPresent!==!1&&e.instance?.isConnected!==!1)return this.promote(e),!0}return!1}promote(e,t){let n=this.lead;if(e!==n&&(this.prevLead=n,this.lead=e,e.show(),n)){n.updateSnapshot(),e.scheduleRender();let{layoutDependency:r}=n.options,{layoutDependency:i}=e.options;(r===void 0||r!==i)&&(e.resumeFrom=n,t&&(n.preserveOpacity=!0),n.snapshot&&(e.snapshot=n.snapshot,e.snapshot.latestValues=n.animationValues||n.latestValues),e.root?.isUpdating&&(e.isLayoutDirty=!0)),e.options.crossfade===!1&&n.hide()}}exitAnimationComplete(){this.members.forEach(e=>{e.options.onExitComplete?.(),e.resumingFrom?.options.onExitComplete?.()})}scheduleRender(){this.members.forEach(e=>e.instance&&e.scheduleRender(!1))}removeLeadSnapshot(){this.lead?.snapshot&&(this.lead.snapshot=void 0)}},uD={hasAnimatedSinceResize:!0,hasEverUpdated:!1},dD={nodes:0,calculatedTargetDeltas:0,calculatedProjections:0},fD=[``,`X`,`Y`,`Z`],pD=1e3,mD=0;function hD(e,t,n,r){let{latestValues:i}=t;i[e]&&(n[e]=i[e],t.setStaticValue(e,0),r&&(r[e]=0))}function gD(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;let{visualElement:t}=e.options;if(!t)return;let n=Rw(t);if(window.MotionHasOptimisedAnimation(n,`transform`)){let{layout:t,layoutId:r}=e.options;window.MotionCancelOptimisedAnimation(n,`transform`,RS,!(t||r))}let{parent:r}=e;r&&!r.hasCheckedOptimisedAppear&&gD(r)}function _D({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:i}){return class{constructor(e={},n=t?.()){this.id=mD++,this.animationId=0,this.animationCommitId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.layoutVersion=0,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,IS.value&&(dD.nodes=dD.calculatedTargetDeltas=dD.calculatedProjections=0),this.nodes.forEach(bD),this.nodes.forEach(yie),this.nodes.forEach(bie),this.nodes.forEach(xD),IS.addProjectionMetrics&&IS.addProjectionMetrics(dD)},this.resolvedRelativeTargetAt=0,this.linkedParentVersion=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=e,this.root=n?n.root||n:this,this.path=n?[...n.path,n]:[],this.parent=n,this.depth=n?n.depth+1:0;for(let e=0;e<this.path.length;e++)this.path[e].shouldResetTransform=!0;this.root===this&&(this.nodes=new oD)}addEventListener(e,t){return this.eventHandlers.has(e)||this.eventHandlers.set(e,new lS),this.eventHandlers.get(e).add(t)}notifyListeners(e,...t){let n=this.eventHandlers.get(e);n&&n.notify(...t)}hasListeners(e){return this.eventHandlers.has(e)}mount(t){if(this.instance)return;this.isSVG=uT(t)&&!Bre(t),this.instance=t;let{layoutId:n,layout:r,visualElement:i}=this.options;if(i&&!i.current&&i.mount(t),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),this.root.hasTreeAnimated&&(r||n)&&(this.isLayoutDirty=!0),e){let n,r=0,i=()=>this.root.updateBlockedByResize=!1;RS.read(()=>{r=window.innerWidth}),e(t,()=>{let e=window.innerWidth;e!==r&&(r=e,this.root.updateBlockedByResize=!0,n&&n(),n=sD(i,250),uD.hasAnimatedSinceResize&&(uD.hasAnimatedSinceResize=!1,this.nodes.forEac
21h(TD)))})}n&&this.root.registerSharedNode(n,this),this.options.animate!==!1&&i&&(n||r)&&this.addEventListener(`didUpdate`,({delta:e,hasLayoutChanged:t,hasRelativeLayoutChanged:n,layout:r})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}let a=this.options.transition||i.getDefaultTransition()||Tie,{onLayoutAnimationStart:o,onLayoutAnimationComplete:s}=i.getProps(),c=!this.targetLayout||!JE(this.targetLayout,r),l=!t&&n;if(this.options.layoutRoot||this.resumeFrom||l||t&&(c||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);let t={...ww(a,`layout`),onPlay:o,onComplete:s};(i.shouldReduceMotion||this.options.layoutRoot)&&(t.delay=0,t.type=!1),this.startAnimation(t),this.setAnimationOrigin(e,l)}else t||TD(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=r})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);let e=this.getStack();e&&e.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,this.eventHandlers.clear(),zS(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes&&this.nodes.forEach(xie),this.animationId++)}getTransformTemplate(){let{visualElement:e}=this.options;return e&&e.getProps().transformTemplate}willUpdate(e=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&gD(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let e=0;e<this.path.length;e++){let t=this.path[e];t.shouldResetTransform=!0,(typeof t.latestValues.x==`string`||typeof t.latestValues.y==`string`)&&(t.isLayoutDirty=!0),t.updateScroll(`snapshot`),t.options.layoutRoot&&t.willUpdate(!1)}let{layoutId:t,layout:n}=this.options;if(t===void 0&&!n)return;let r=this.getTransformTemplate();this.prevTransformTemplateValue=r?r(this.latestValues,``):void 0,this.updateSnapshot(),e&&this.notifyListeners(`willUpdate`)}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){let e=this.updateBlockedByResize;this.unblockUpdate(),this.updateBlockedByResize=!1,this.clearAllSnapshots(),e&&this.nodes.forEach(gie),this.nodes.forEach(CD);return}if(this.animationId<=this.animationCommitId){this.nodes.forEach(wD);return}this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(_ie),this.nodes.forEach(vie),this.nodes.forEach(vD),this.nodes.forEach(yD)):this.nodes.forEach(wD),this.clearAllSnapshots();let e=US.now();BS.delta=$x(0,1e3/60,e-BS.timestamp),BS.timestamp=e,BS.isProcessing=!0,VS.update.process(BS),VS.preRender.process(BS),VS.render.process(BS),BS.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,$w.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(SD),this.sharedNodes.forEach(Sie)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,RS.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){RS.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!NE(this.snapshot.measuredBox.x)&&!NE(this.snapshot.measuredBox.y)&&(this.snapshot=void 0))}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let e=0;e<this.path.length;e++)this.path[e].updateScroll();let e=this.layout;this.layout=this.measure(!1),this.layoutVersion++,this.layoutCorrected||=ST(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners(`measure`,this.layout.layoutBox);let{visualElement:t}=this.options;t&&t.notify(`LayoutMeasure`,this.layout.layoutBox,e?e.layoutBox:void 0)}updateScroll(e=`measure`){let t=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===e&&(t=!1),t&&this.instance){let t=r(this.instance);this.scroll={animationId:this.root.animationId,phase:e,isRoot:t,offset:n(this.instance),wasRoot:this.scroll?this.scroll.isRoot:t}}}resetTransform(){if(!i)return;let e=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,t=this.projectionDelta&&!GE(this.projectionDelta),n=this.getTransformTemplate(),r=n?n(this.latestValues,``):void 0,a=r!==this.prevTransformTemplateValue;e&&this.instance&&(t||GT(this.latestValues)||a)&&(i(this.instance,r),this.shouldResetTransform=!1,this.scheduleRender())}measure(e=!0){let t=this.measurePageBox(),n=this.removeElementScroll(t);return e&&(n=this.removeTransform(n)),Eie(n),{animationId:this.root.animationId,measuredBox:t,layoutBox:n,latestValues:{},source:this.id}}measurePageBox(){let{visualElement:e}=this.options;if(!e)return ST();let t=e.measureViewportBox();if(!(this.scroll?.wasRoot||this.path.some(Die))){let{scroll:e}=this.root;e&&(eE(t.x,e.offset.x),eE(t.y,e.offset.y))}return t}removeElementScroll(e){let t=ST();if(TE(t,e),this.scroll?.wasRoot)return t;for(let n=0;n<this.path.length;n++){let r=this.path[n],{scroll:i,options:a}=r;r!==this.root&&i&&a.layoutScroll&&(i.wasRoot&&TE(t,e),eE(t.x,i.offset.x),eE(t.y,i.offset.y))}return t}applyTransform(e,t=!1,n){let r=n||ST();TE(r,e);for(let e=0;e<this.path.length;e++){let n=this.path[e];!t&&n.options.layoutScroll&&n.scroll&&n!==n.root&&(eE(r.x,-n.scroll.offset.x),eE(r.y,-n.scroll.offset.y)),GT(n.latestValues)&&rE(r,n.latestValues,n.layout?.layoutBox)}return GT(this.latestValues)&&rE(r,this.latestValues,this.layout?.layoutBox),r}removeTransform(e){let t=ST();TE(t,e);for(let e=0;e<this.path.length;e++){let n=this.path[e];if(!GT(n.latestValues))continue;let r;n.instance&&(WT(n.latestValues)&&n.updateSnapshot(),r=ST(),TE(r,n.measurePageBox())),UE(t,n.latestValues,n.snapshot?.layoutBox,r)}return GT(this.latestValues)&&UE(t,this.latestValues),t}setTargetDelta(e){this.targetDelta=e,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(e){this.options={...this.options,...e,crossfade:e.crossfade===void 0?!0:e.crossfade}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==BS.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(e=!1){let t=this.getLead();this.isProjectionDirty||=t.isProjectionDirty,this.isTransformDirty||=t.isTransformDirty,this.isSharedProjectionDirty||=t.isSharedProjectionDirty;let n=!!this.resumingFrom||this!==t;if(!(e||n&&this.isSharedProjectionDirty||this.isProjectionDirty||this.parent?.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;let{layout:r,layoutId:i}=this.options;
21if(!this.layout||!(r||i))return;this.resolvedRelativeTargetAt=BS.timestamp;let a=this.getClosestProjectingParent();a&&this.linkedParentVersion!==a.layoutVersion&&!a.options.layoutRoot&&this.removeRelativeTarget(),!this.targetDelta&&!this.relativeTarget&&(this.options.layoutAnchor!==!1&&a&&a.layout?this.createRelativeTarget(a,this.layout.layoutBox,a.layout.layoutBox):this.removeRelativeTarget()),!(!this.relativeTarget&&!this.targetDelta)&&(this.target||(this.target=ST(),this.targetWithTransforms=ST()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),RE(this.target,this.relativeTarget,this.relativeParent.target,this.options.layoutAnchor||void 0)):this.targetDelta?(this.resumingFrom?this.applyTransform(this.layout.layoutBox,!1,this.target):TE(this.target,this.layout.layoutBox),ZT(this.target,this.targetDelta)):TE(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget&&(this.attemptToResolveRelativeTarget=!1,this.options.layoutAnchor!==!1&&a&&!!a.resumingFrom==!!this.resumingFrom&&!a.options.layoutScroll&&a.target&&this.animationProgress!==1?this.createRelativeTarget(a,this.target,a.target):this.relativeParent=this.relativeTarget=void 0),IS.value&&dD.calculatedTargetDeltas++)}getClosestProjectingParent(){if(!(!this.parent||WT(this.parent.latestValues)||KT(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}createRelativeTarget(e,t,n){this.relativeParent=e,this.linkedParentVersion=e.layoutVersion,this.forceRelativeParentToResolveTarget(),this.relativeTarget=ST(),this.relativeTargetOrigin=ST(),BE(this.relativeTargetOrigin,t,n,this.options.layoutAnchor||void 0),TE(this.relativeTarget,this.relativeTargetOrigin)}removeRelativeTarget(){this.relativeParent=this.relativeTarget=void 0}calcProjection(){let e=this.getLead(),t=!!this.resumingFrom||this!==e,n=!0;if((this.isProjectionDirty||this.parent?.isProjectionDirty)&&(n=!1),t&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(n=!1),this.resolvedRelativeTargetAt===BS.timestamp&&(n=!1),n)return;let{layout:r,layoutId:i}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(r||i))return;TE(this.layoutCorrected,this.layout.layoutBox);let a=this.treeScale.x,o=this.treeScale.y;Gre(this.layoutCorrected,this.treeScale,this.path,t),e.layout&&!e.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(e.target=e.layout.layoutBox,e.targetWithTransforms=ST());let{target:s}=e;if(!s){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(EE(this.prevProjectionDelta.x,this.projectionDelta.x),EE(this.prevProjectionDelta.y,this.projectionDelta.y)),IE(this.projectionDelta,this.layoutCorrected,s,this.latestValues),(this.treeScale.x!==a||this.treeScale.y!==o||!XE(this.projectionDelta.x,this.prevProjectionDelta.x)||!XE(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners(`projectionUpdate`,s)),IS.value&&dD.calculatedProjections++}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(e=!0){if(this.options.visualElement?.scheduleRender(),e){let e=this.getStack();e&&e.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=bT(),this.projectionDelta=bT(),this.projectionDeltaWithTransform=bT()}setAnimationOrigin(e,t=!1){let n=this.snapshot,r=n?n.latestValues:{},i={...this.latestValues},a=bT();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!t;let o=ST(),s=(n?n.source:void 0)!==(this.layout?this.layout.source:void 0),c=this.getStack(),l=!c||c.members.length<=1,u=!!(s&&!l&&this.options.crossfade===!0&&!this.path.some(wie));this.animationProgress=0;let d;this.mixTargetDelta=t=>{let n=t/1e3;ED(a.x,e.x,n),ED(a.y,e.y,n),this.setTargetDelta(a),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(BE(o,this.layout.layoutBox,this.relativeParent.layout.layoutBox,this.options.layoutAnchor||void 0),Cie(this.relativeTarget,this.relativeTargetOrigin,o,n),d&&uie(this.relativeTarget,d)&&(this.isProjectionDirty=!1),d||=ST(),TE(d,this.relativeTarget)),s&&(this.animationValues=i,pie(i,r,this.latestValues,n,u,l)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=n},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(e){this.notifyListeners(`animationStart`),this.currentAnimation?.stop(),this.resumingFrom?.currentAnimation?.stop(),this.pendingAnimation&&=(zS(this.pendingAnimation),void 0),this.pendingAnimation=RS.update(()=>{uD.hasAnimatedSinceResize=!0,WS.layout++,this.motionValue||=Mw(0),this.motionValue.jump(0,!1),this.currentAnimation=rD(this.motionValue,[0,1e3],{...e,velocity:0,isSync:!0,onUpdate:t=>{this.mixTargetDelta(t),e.onUpdate&&e.onUpdate(t)},onStop:()=>{WS.layout--},onComplete:()=>{WS.layout--,e.onComplete&&e.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);let e=this.getStack();e&&e.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners(`animationComplete`)}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(pD),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){let e=this.getLead(),{targetWithTransforms:t,target:n,layout:r,latestValues:i}=e;if(!(!t||!n||!r)){if(this!==e&&this.layout&&r&&jD(this.options.animationType,this.layout.layoutBox,r.layoutBox)){n=this.target||ST();let t=NE(this.layout.layoutBox.x);n.x.min=e.target.x.min,n.x.max=n.x.min+t;let r=NE(this.layout.layoutBox.y);n.y.min=e.target.y.min,n.y.max=n.y.min+r}TE(t,n),rE(t,i),IE(this.projectionDeltaWithTransform,this.layoutCorrected,t,i
21)}}registerSharedNode(e,t){this.sharedNodes.has(e)||this.sharedNodes.set(e,new lD),this.sharedNodes.get(e).add(t);let n=t.options.initialPromotionConfig;t.promote({transition:n?n.transition:void 0,preserveFollowOpacity:n&&n.shouldPreserveFollowOpacity?n.shouldPreserveFollowOpacity(t):void 0})}isLead(){let e=this.getStack();return e?e.lead===this:!0}getLead(){let{layoutId:e}=this.options;return e&&this.getStack()?.lead||this}getPrevLead(){let{layoutId:e}=this.options;return e?this.getStack()?.prevLead:void 0}getStack(){let{layoutId:e}=this.options;if(e)return this.root.sharedNodes.get(e)}promote({needsReset:e,transition:t,preserveFollowOpacity:n}={}){let r=this.getStack();r&&r.promote(this,n),e&&(this.projectionDelta=void 0,this.needsReset=!0),t&&this.setOptions({transition:t})}relegate(){let e=this.getStack();return e?e.relegate(this):!1}resetSkewAndRotation(){let{visualElement:e}=this.options;if(!e)return;let t=!1,{latestValues:n}=e;if((n.z||n.rotate||n.rotateX||n.rotateY||n.rotateZ||n.skewX||n.skewY)&&(t=!0),!t)return;let r={};n.z&&hD(`z`,e,r,this.animationValues);for(let t=0;t<fD.length;t++)hD(`rotate${fD[t]}`,e,r,this.animationValues),hD(`skew${fD[t]}`,e,r,this.animationValues);e.render();for(let t in r)e.setStaticValue(t,r[t]),this.animationValues&&(this.animationValues[t]=r[t]);e.scheduleRender()}applyProjectionStyles(e,t){if(!this.instance||this.isSVG)return;if(!this.isVisible){e.visibility=`hidden`;return}let n=this.getTransformTemplate();if(this.needsReset){this.needsReset=!1,e.visibility=``,e.opacity=``,e.pointerEvents=cD(t?.pointerEvents)||``,e.transform=n?n(this.latestValues,``):`none`;return}let r=this.getLead();if(!this.projectionDelta||!this.layout||!r.target){this.options.layoutId&&(e.opacity=this.latestValues.opacity===void 0?1:this.latestValues.opacity,e.pointerEvents=cD(t?.pointerEvents)||``),this.hasProjected&&!GT(this.latestValues)&&(e.transform=n?n({},``):`none`,this.hasProjected=!1);return}e.visibility=``;let i=r.animationValues||r.latestValues;this.applyTransformsToTarget();let a=die(this.projectionDeltaWithTransform,this.treeScale,i);n&&(a=n(i,a)),e.transform=a;let{x:o,y:s}=this.projectionDelta;e.transformOrigin=`${o.origin*100}% ${s.origin*100}% 0`,r.animationValues?e.opacity=r===this?i.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:i.opacityExit:e.opacity=r===this?i.opacity===void 0?``:i.opacity:i.opacityExit===void 0?0:i.opacityExit;for(let t in lE){if(i[t]===void 0)continue;let{correct:n,applyTo:o,isCSSVariable:s}=lE[t],c=a===`none`?i[t]:n(i[t],r);if(o){let t=o.length;for(let n=0;n<t;n++)e[o[n]]=c}else s?this.options.visualElement.renderState.vars[t]=c:e[t]=c}this.options.layoutId&&(e.pointerEvents=r===this?cD(t?.pointerEvents)||``:`none`)}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(e=>e.currentAnimation?.stop()),this.root.nodes.forEach(CD),this.root.sharedNodes.clear()}}}function vD(e){e.updateLayout()}function yD(e){let t=e.resumeFrom?.snapshot||e.snapshot;if(e.isLead()&&e.layout&&t&&e.hasListeners(`didUpdate`)){let{layoutBox:n,measuredBox:r}=e.layout,{animationType:i}=e.options,a=t.source!==e.layout.source;if(i===`size`)ZE(e=>{let r=a?t.measuredBox[e]:t.layoutBox[e],i=NE(r);r.min=n[e].min,r.max=r.min+i});else if(i===`x`||i===`y`){let e=i===`x`?`y`:`x`;wE(a?t.measuredBox[e]:t.layoutBox[e],n[e])}else jD(i,t.layoutBox,n)&&ZE(r=>{let i=a?t.measuredBox[r]:t.layoutBox[r],o=NE(n[r]);i.max=i.min+o,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[r].max=e.relativeTarget[r].min+o)});let o=bT();IE(o,n,t.layoutBox);let s=bT();a?IE(s,e.applyTransform(r,!0),t.measuredBox):IE(s,n,t.layoutBox);let c=!GE(o),l=!1;if(!e.resumeFrom){let r=e.getClosestProjectingParent();if(r&&!r.resumeFrom){let{snapshot:i,layout:a}=r;if(i&&a){let o=e.options.layoutAnchor||void 0,s=ST();BE(s,t.layoutBox,i.layoutBox,o);let c=ST();BE(c,n,a.layoutBox,o),JE(s,c)||(l=!0),r.options.layoutRoot&&(e.relativeTarget=c,e.relativeTargetOrigin=s,e.relativeParent=r)}}}e.notifyListeners(`didUpdate`,{layout:n,snapshot:t,delta:s,layoutDelta:o,hasLayoutChanged:c,hasRelativeLayoutChanged:l})}else if(e.isLead()){let{onExitComplete:t}=e.options;t&&t()}e.options.transition=void 0}function bD(e){IS.value&&dD.nodes++,e.parent&&(e.isProjecting()||(e.isProjectionDirty=e.parent.isProjectionDirty),e.isSharedProjectionDirty||=!!(e.isProjectionDirty||e.parent.isProjectionDirty||e.parent.isSharedProjectionDirty),e.isTransformDirty||=e.parent.isTransformDirty)}function xD(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function SD(e){e.clearSnapshot()}function CD(e){e.clearMeasurements()}function gie(e){e.isLayoutDirty=!0,e.updateLayout()}function wD(e){e.isLayoutDirty=!1}function _ie(e){e.isAnimationBlocked&&e.layout&&!e.isLayoutDirty&&(e.snapshot=e.layout,e.isLayoutDirty=!0)}function vie(e){let{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify(`BeforeLayoutMeasure`),e.resetTransform()}function TD(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function yie(e){e.resolveTargetDelta()}function bie(e){e.calcProjection()}
21function xie(e){e.resetSkewAndRotation()}function Sie(e){e.removeLeadSnapshot()}function ED(e,t,n){e.translate=bC(t.translate,0,n),e.scale=bC(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function DD(e,t,n,r){e.min=bC(t.min,n.min,r),e.max=bC(t.max,n.max,r)}function Cie(e,t,n,r){DD(e.x,t.x,n.x,r),DD(e.y,t.y,n.y,r)}function wie(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}var Tie={duration:.45,ease:[.4,0,.1,1]},OD=e=>typeof navigator<`u`&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),kD=OD(`applewebkit/`)&&!OD(`chrome/`)?Math.round:aS;function AD(e){e.min=kD(e.min),e.max=kD(e.max)}function Eie(e){AD(e.x),AD(e.y)}function jD(e,t,n){return e===`position`||e===`preserve-aspect`&&!PE(YE(t),YE(n),.2)}function Die(e){return e!==e.root&&e.scroll?.wasRoot}var Oie=_D({attachResizeListener:(e,t)=>iD(e,`resize`,t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body?.scrollLeft||0,y:document.documentElement.scrollTop||document.body?.scrollTop||0}),checkIsScrollRoot:()=>!0}),MD={current:void 0},ND=_D({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!MD.current){let e=new Oie({});e.mount(window),e.setOptions({layoutScroll:!0}),MD.current=e}return MD.current},resetTransform:(e,t)=>{e.style.transform=t===void 0?`none`:t},checkIsScrollRoot:e=>window.getComputedStyle(e).position===`fixed`}),PD=(0,b.createContext)({transformPagePoint:e=>e,isStatic:!1,reducedMotion:`never`});function FD(e,t){if(typeof e==`function`)return e(t);e!=null&&(e.current=t)}function kie(...e){return t=>{let n=!1,r=e.map(e=>{let r=FD(e,t);return!n&&typeof r==`function`&&(n=!0),r});if(n)return()=>{for(let t=0;t<r.length;t++){let n=r[t];typeof n==`function`?n():FD(e[t],null)}}}}function Aie(...e){return b.useCallback(kie(...e),e)}var jie=class extends b.Component{getSnapshotBeforeUpdate(e){let t=this.props.childRef.current;if(Qw(t)&&e.isPresent&&!this.props.isPresent&&this.props.pop!==!1){let e=t.offsetParent,n=Qw(e)&&e.offsetWidth||0,r=Qw(e)&&e.offsetHeight||0,i=getComputedStyle(t),a=this.props.sizeRef.current;a.height=parseFloat(i.height),a.width=parseFloat(i.width),a.top=t.offsetTop,a.left=t.offsetLeft,a.right=n-a.width-a.left,a.bottom=r-a.height-a.top}return null}componentDidUpdate(){}render(){return this.props.children}};function Mie({children:e,isPresent:t,anchorX:n,anchorY:r,root:i,pop:a}){let o=(0,b.useId)(),s=(0,b.useRef)(null),c=(0,b.useRef)({width:0,height:0,top:0,left:0,right:0,bottom:0}),{nonce:l}=(0,b.useContext)(PD),u=Aie(s,e.props?.ref??e?.ref);return(0,b.useInsertionEffect)(()=>{let{width:e,height:u,top:d,left:f,right:p,bottom:m}=c.current;if(t||a===!1||!s.current||!e||!u)return;let h=n===`left`?`left: ${f}`:`right: ${p}`,g=r===`bottom`?`bottom: ${m}`:`top: ${d}`;s.current.dataset.motionPopId=o;let _=document.createElement(`style`);l&&(_.nonce=l);let v=i??document.head;return v.appendChild(_),_.sheet&&_.sheet.insertRule(` 22 [data-motion-pop-id="${o}"] { 23 position: absolute !important; 24 width: ${e}px !important; 25 height: ${u}px !important; 26 ${h}px !important; 27 ${g}px !important; 28 } 29 `),()=>{s.current?.removeAttribute(`data-motion-pop-id`),v.contains(_)&&v.removeChild(_)}},[t]),(0,V.jsx)(jie,{isPresent:t,childRef:s,sizeRef:c,pop:a,children:a===!1?e:b.cloneElement(e,{ref:u})})}var Nie=({children:e,initial:t,isPresent:n,onExitComplete:r,custom:i,presenceAffectsLayout:a,mode:o,anchorX:s,anchorY:c,root:l})=>{let u=Jx(Pie),d=(0,b.useId)(),f=!0,p=(0,b.useMemo)(()=>(f=!1,{id:d,initial:t,isPresent:n,custom:i,onExitComplete:e=>{u.set(e,!0);for(let e of u.values())if(!e)return;r&&r()},register:e=>(u.set(e,!1),()=>u.delete(e))}),[n,u,r]);return a&&f&&(p={...p}),(0,b.useMemo)(()=>{u.forEach((e,t)=>u.set(t,!1))},[n]),b.useEffect(()=>{!n&&!u.size&&r&&r()},[n]),e=(0,V.jsx)(Mie,{pop:o===`popLayout`,isPresent:n,anchorX:s,anchorY:c,root:l,children:e}),(0,V.jsx)(Xx.Provider,{value:p,children:e})};function Pie(){return new Map}function ID(e=!0){let t=(0,b.useContext)(Xx);if(t===null)return[!0,null];let{isPresent:n,onExitComplete:r,register:i}=t,a=(0,b.useId)();(0,b.useEffect)(()=>
29{if(e)return i(a)},[e]);let o=(0,b.useCallback)(()=>e&&r&&r(a),[a,r,e]);return!n&&r?[!1,o]:[!0]}var LD=e=>e.key||``;function RD(e){let t=[];return b.Children.forEach(e,e=>{(0,b.isValidElement)(e)&&t.push(e)}),t}var zD=({children:e,custom:t,initial:n=!0,onExitComplete:r,presenceAffectsLayout:i=!0,mode:a=`sync`,propagate:o=!1,anchorX:s=`left`,anchorY:c=`top`,root:l})=>{let[u,d]=ID(o),f=(0,b.useMemo)(()=>RD(e),[e]),p=o&&!u?[]:f.map(LD),m=(0,b.useRef)(!0),h=(0,b.useRef)(f),g=Jx(()=>new Map),_=(0,b.useRef)(new Set),[v,y]=(0,b.useState)(f),[x,S]=(0,b.useState)(f);Yx(()=>{m.current=!1,h.current=f;for(let e=0;e<x.length;e++){let t=LD(x[e]);p.includes(t)?(g.delete(t),_.current.delete(t)):g.get(t)!==!0&&g.set(t,!1)}},[x,p.length,p.join(`-`)]);let C=[];if(f!==v){let e=[...f];for(let t=0;t<x.length;t++){let n=x[t],r=LD(n);p.includes(r)||(e.splice(t,0,n),C.push(n))}return a===`wait`&&C.length&&(e=C),S(RD(e)),y(f),null}let{forceRender:w}=(0,b.useContext)(qx);return(0,V.jsx)(V.Fragment,{children:x.map(e=>{let v=LD(e),y=o&&!u?!1:f===x||p.includes(v);return(0,V.jsx)(Nie,{isPresent:y,initial:!m.current||n?void 0:!1,custom:t,presenceAffectsLayout:i,mode:a,root:l,onExitComplete:y?void 0:()=>{if(_.current.has(v))return;if(g.has(v))_.current.add(v),g.set(v,!0);else return;let e=!0;g.forEach(t=>{t||(e=!1)}),e&&(w?.(),S(h.current),o&&d?.(),r&&r())},anchorX:s,anchorY:c,children:e},v)})})},BD=(0,b.createContext)({strict:!1}),VD={animation:[`animate`,`variants`,`whileHover`,`whileTap`,`exit`,`whileInView`,`whileFocus`,`whileDrag`],exit:[`exit`],drag:[`drag`,`dragControls`],focus:[`whileFocus`],hover:[`whileHover`,`onHoverStart`,`onHoverEnd`],tap:[`whileTap`,`onTap`,`onTapStart`,`onTapCancel`],pan:[`onPan`,`onPanStart`,`onPanSessionStart`,`onPanEnd`],inView:[`whileInView`,`onViewportEnter`,`onViewportLeave`],layout:[`layout`,`layoutId`]},HD=!1;function Fie(){if(HD)return;let e={};for(let t in VD)e[t]={isEnabled:e=>VD[t].some(t=>!!e[t])};LT(e),HD=!0}function UD(){return Fie(),RT()}function Iie(e){let t=UD();for(let n in e)t[n]={...t[n],...e[n]};LT(t)}var Lie=new Set(`animate.exit.variants.initial.style.values.variants.transition.transformTemplate.custom.inherit.onBeforeLayoutMeasure.onAnimationStart.onAnimationComplete.onUpdate.onDragStart.onDrag.onDragEnd.onMeasureDragConstraints.onDirectionLock.onDragTransitionEnd._dragX._dragY.onHoverStart.onHoverEnd.onViewportEnter.onViewportLeave.globalTapTarget.propagate.ignoreStrict.viewport`.split(`.`));function WD(e){return e.startsWith(`while`)||e.startsWith(`drag`)&&e!==`draggable`||e.startsWith(`layout`)||e.startsWith(`onTap`)||e.startsWith(`onPan`)||e.startsWith(`onLayout`)||Lie.has(e)}var Rie=c({default:()=>GD}),GD,zie=o((()=>{throw GD={},Error(`Could not resolve "@emotion/is-prop-valid" imported by "framer-motion". Is it installed?`)})),KD=e=>!WD(e);function Bie(e){typeof e==`function`&&(KD=t=>t.startsWith(`on`)?!WD(t):e(t))}try{Bie((zie(),d(Rie)).default)}catch{}function Vie(e,t,n){let r={};for(let i in e)i===`values`&&typeof e.values==`object`||Pw(e[i])||(KD(i)||n===!0&&WD(i)||!t&&!WD(i)||e.draggable&&i.startsWith(`onDrag`))&&(r[i]=e[i]);return r}var qD=(0,b.createContext)({});function Hie(e,t){if(OT(e)){let{initial:t,animate:n}=e;return{initial:t===!1||TT(t)?t:void 0,animate:TT(n)?n:void 0}}return e.inherit===!1?{}:t}function Uie(e){let{initial:t,animate:n}=Hie(e,(0,b.useContext)(qD));return(0,b.useMemo)(()=>({initial:t,animate:n}),[JD(t),JD(n)])}function JD(e){return Array.isArray(e)?e.join(` `):e}var YD=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function XD(e,t,n){for(let r in t)!Pw(t[r])&&!uE(r,n)&&(e[r]=t[r])}function Wie({transformTemplate:e},t){return(0,b.useMemo)(()=>{let n=YD();return aE(n,t,e),Object.assign({},n.vars,n.style)},[t])}function Gie(e,t){let n=e.style||{},r={};return XD(r,n,e),Object.assign(r,Wie(e,t)),r}function Kie(e,t){let n={},r=Gie(e,t);return e.drag&&e.dragListener!==!1&&(n.draggable=!1,r.userSelect=r.WebkitUserSelect=r.WebkitTouchCallout=`none`,r.touchAction=e.drag===!0?`none`:`pan-${e.drag===`x`?`y`:`x`}`),e.tabIndex===void 0&&(e.onTap||e.onTapStart||e.whileTap)&&(n.tabIndex=0),n.style=r,n}var ZD=()=>({...YD(),attrs:{}});function qie(e,t,n,r){let i=(0,b.useMemo)(()=>{let n=ZD();return pE(n,t,hE(r),e.transformTemplate,e.style),{...n.attrs,style:{...n.style}}},[t]);if(e.style){let t={};XD(t,e.style,e),i.style={...t,...i.style}}return i}var Jie=[`animate`,`circle`,`defs`,`desc`,`ellipse`,`g`,`image`,`line`,`filter`,`marker`,`mask`,`metadata`,`path`,`pattern`,`polygon`,`polyline`,`rect`,`stop`,`switch`,`symbol`,`svg`,`text`,`tspan`,`use`,`view`];function QD(e){return typeof e!=`string`||e.includes(`-`)?!1:!!(Jie.indexOf(e)>-1||/[A-Z]/u.test(e))}function Yie(e,t,n,{latestValues:r},i,a=!1,o){let s=(o??QD(e)?qie:Kie)(t,r,i,e),c=Vie(t,typeof e==`string`,a),l=e===b.Fragment?{}:{...c,...s,ref:n},{children:u}=t,d=(0,b.useMemo)(()=>Pw(u)?u.get():u,[u]);return(0,b.createElement)(e,{...l,children:d})}function Xie({scrapeMotionValuesFromProps:e,createRenderState:t},n,r,i){return{latestValues:Zie(n,r,i,e),renderState:t()}}function Zie(e,t,n,r){let i={}
29,a=r(e,{});for(let e in a)i[e]=cD(a[e]);let{initial:o,animate:s}=e,c=OT(e),l=kT(e);t&&l&&!c&&e.inherit!==!1&&(o===void 0&&(o=t.initial),s===void 0&&(s=t.animate));let u=n?n.initial===!1:!1;u||=o===!1;let d=u?s:o;if(d&&typeof d!=`boolean`&&!wT(d)){let t=Array.isArray(d)?d:[d];for(let n=0;n<t.length;n++){let r=Dw(e,t[n]);if(r){let{transitionEnd:e,transition:t,...n}=r;for(let e in n){let t=n[e];if(Array.isArray(t)){let e=u?t.length-1:0;t=t[e]}t!==null&&(i[e]=t)}for(let t in e)i[t]=e[t]}}}return i}var $D=e=>(t,n)=>{let r=(0,b.useContext)(qD),i=(0,b.useContext)(Xx),a=()=>Xie(e,t,r,i);return n?a():Jx(a)},Qie=$D({scrapeMotionValuesFromProps:dE,createRenderState:YD}),$ie=$D({scrapeMotionValuesFromProps:gE,createRenderState:ZD}),eae=Symbol.for(`motionComponentSymbol`);function tae(e,t,n){let r=(0,b.useRef)(n);(0,b.useInsertionEffect)(()=>{r.current=n});let i=(0,b.useRef)(null);return(0,b.useCallback)(n=>{n&&e.onMount?.(n);let a=r.current;if(typeof a==`function`)if(n){let e=a(n);typeof e==`function`&&(i.current=e)}else i.current?(i.current(),i.current=null):a(n);else a&&(a.current=n);t&&(n?t.mount(n):t.unmount())},[t])}var eO=(0,b.createContext)({});function tO(e){return e&&typeof e==`object`&&Object.prototype.hasOwnProperty.call(e,`current`)}function nae(e,t,n,r,i,a){let{visualElement:o}=(0,b.useContext)(qD),s=(0,b.useContext)(BD),c=(0,b.useContext)(Xx),l=(0,b.useContext)(PD),u=l.reducedMotion,d=l.skipAnimations,f=(0,b.useRef)(null),p=(0,b.useRef)(!1);r||=s.renderer,!f.current&&r&&(f.current=r(e,{visualState:t,parent:o,props:n,presenceContext:c,blockInitialAnimation:c?c.initial===!1:!1,reducedMotionConfig:u,skipAnimations:d,isSVG:a}),p.current&&f.current&&(f.current.manuallyAnimateOnMount=!0));let m=f.current,h=(0,b.useContext)(eO);m&&!m.projection&&i&&(m.type===`html`||m.type===`svg`)&&rae(f.current,n,i,h);let g=(0,b.useRef)(!1);(0,b.useInsertionEffect)(()=>{m&&g.current&&m.update(n,c)});let _=n[Lw],v=(0,b.useRef)(!!_&&typeof window<`u`&&!window.MotionHandoffIsComplete?.(_)&&window.MotionHasOptimisedAnimation?.(_));return Yx(()=>{p.current=!0,m&&(g.current=!0,window.MotionIsMounted=!0,m.updateFeatures(),m.scheduleRenderMicrotask(),v.current&&m.animationState&&m.animationState.animateChanges())}),(0,b.useEffect)(()=>{m&&(!v.current&&m.animationState&&m.animationState.animateChanges(),v.current&&=(queueMicrotask(()=>{window.MotionHandoffMarkAsComplete?.(_)}),!1),m.enteringChildren=void 0)}),m}function rae(e,t,n,r){let{layoutId:i,layout:a,drag:o,dragConstraints:s,layoutScroll:c,layoutRoot:l,layoutAnchor:u,layoutCrossfade:d}=t;e.projection=new n(e.latestValues,t[`data-framer-portal-id`]?void 0:nO(e.parent)),e.projection.setOptions({layoutId:i,layout:a,alwaysMeasureLayout:!!o||s&&tO(s),visualElement:e,animationType:typeof a==`string`?a:`both`,initialPromotionConfig:r,crossfade:d,layoutScroll:c,layoutRoot:l,layoutAnchor:u})}function nO(e){if(e)return e.options.allowProjection===!1?nO(e.parent):e.projection}function rO(e,{forwardMotionProps:t=!1,type:n}={},r,i){r&&Iie(r);let a=n?n===`svg`:QD(e),o=a?$ie:Qie;function s(n,s){let c,l={...(0,b.useContext)(PD),...n,layoutId:iae(n)},{isStatic:u}=l,d=Uie(n),f=o(n,u);if(!u&&typeof window<`u`){aae(l,r);let t=oae(l);c=t.MeasureLayout,d.visualElement=nae(e,f,l,i,t.ProjectionNode,a)}return(0,V.jsxs)(qD.Provider,{value:d,children:[c&&d.visualElement?(0,V.jsx)(c,{visualElement:d.visualElement,...l}):null,Yie(e,n,tae(f,d.visualElement,s),f,u,t,a)]})}s.displayName=`motion.${typeof e==`string`?e:`create(${e.displayName??e.name??``})`}`;let c=(0,b.forwardRef)(s);return c[eae]=e,c}function iae({layoutId:e}){let t=(0,b.useContext)(qx).id;return t&&e!==void 0?t+`-`+e:e}function aae(e,t){(0,b.useContext)(BD).strict}function oae(e){let{drag:t,layout:n}=UD();if(!t&&!n)return{};let r={...t,...n};return{MeasureLayout:t?.isEnabled(e)||n?.isEnabled(e)?r.MeasureLayout:void 0,ProjectionNode:r.ProjectionNode}}function sae(e,t){if(typeof Proxy>`u`)return rO;let n=new Map,r=(n,r)=>rO(n,r,e,t);return new Proxy((e,t)=>r(e,t),{get:(i,a)=>a===`create`?r:(n.has(a)||n.set(a,rO(a,void 0,e,t)),n.get(a))})}var cae=(e,t)=>
29t.isSVG??QD(e)?new rie(t):new Qre(t,{allowProjection:e!==b.Fragment}),lae=class extends VT{constructor(e){super(e),e.animationState||=aie(e)}updateAnimationControlsSubscription(){let{animate:e}=this.node.getProps();wT(e)&&(this.unmountControls=e.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){let{animate:e}=this.node.getProps(),{animate:t}=this.node.prevProps||{};e!==t&&this.updateAnimationControlsSubscription()}unmount(){this.node.animationState.reset(),this.unmountControls?.()}},uae=0,dae={animation:{Feature:lae},exit:{Feature:class extends VT{constructor(){super(...arguments),this.id=uae++,this.isExitComplete=!1}update(){if(!this.node.presenceContext)return;let{isPresent:e,onExitComplete:t}=this.node.presenceContext,{isPresent:n}=this.node.prevPresenceContext||{};if(!this.node.animationState||e===n)return;if(e&&n===!1){if(this.isExitComplete){let{initial:e,custom:t}=this.node.getProps();if(typeof e==`string`){let n=Ow(this.node,e,t);if(n){let{transition:e,transitionEnd:t,...r}=n;for(let e in r)this.node.getValue(e)?.jump(r[e])}}this.node.animationState.reset(),this.node.animationState.animateChanges()}else this.node.animationState.setActive(`exit`,!1);this.isExitComplete=!1;return}let r=this.node.animationState.setActive(`exit`,!e);t&&!e&&r.then(()=>{this.isExitComplete=!0,t(this.id)})}mount(){let{register:e,onExitComplete:t}=this.node.presenceContext||{};t&&t(this.id),e&&(this.unmount=e(this.id))}unmount(){}}}};function iO(e){return{point:{x:e.pageX,y:e.pageY}}}var aO=e=>t=>iT(t)&&e(t,iO(t));function oO(e,t,n,r){return iD(e,t,aO(n),r)}var sO=({current:e})=>e?e.ownerDocument.defaultView:null,cO=(e,t)=>Math.abs(e-t);function lO(e,t){let n=cO(e.x,t.x),r=cO(e.y,t.y);return Math.sqrt(n**2+r**2)}var uO=new Set([`auto`,`scroll`]),dO=class{constructor(e,t,{transformPagePoint:n,contextWindow:r=window,dragSnapToOrigin:i=!1,distanceThreshold:a=3,element:o}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.lastRawMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.scrollPositions=new Map,this.removeScrollListeners=null,this.onElementScroll=e=>{this.handleScroll(e.target)},this.onWindowScroll=()=>{this.handleScroll(window)},this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;this.lastRawMoveEventInfo&&(this.lastMoveEventInfo=fO(this.lastRawMoveEventInfo,this.transformPagePoint));let e=mO(this.lastMoveEventInfo,this.history),t=this.startEvent!==null,n=lO(e.offset,{x:0,y:0})>=this.distanceThreshold;if(!t&&!n)return;let{point:r}=e,{timestamp:i}=BS;this.history.push({...r,timestamp:i});let{onStart:a,onMove:o}=this.handlers;t||(a&&a(this.lastMoveEvent,e),this.startEvent=this.lastMoveEvent),o&&o(this.lastMoveEvent,e)},this.handlePointerMove=(e,t)=>{this.lastMoveEvent=e,this.lastRawMoveEventInfo=t,this.lastMoveEventInfo=fO(t,this.transformPagePoint),RS.update(this.updatePoint,!0)},this.handlePointerUp=(e,t)=>{this.end();let{onEnd:n,onSessionEnd:r,resumeAnimation:i}=this.handlers;if((this.dragSnapToOrigin||!this.startEvent)&&i&&i(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;let a=mO(e.type===`pointercancel`?this.lastMoveEventInfo:fO(t,this.transformPagePoint),this.history);this.startEvent&&n&&n(e,a),r&&r(e,a)},!iT(e))return;this.dragSnapToOrigin=i,this.handlers=t,this.transformPagePoint=n,this.distanceThreshold=a,this.contextWindow=r||window;let s=fO(iO(e),this.transformPagePoint),{point:c}=s,{timestamp:l}=BS;this.history=[{...c,timestamp:l}];let{onSessionStart:u}=t;u&&u(e,mO(s,this.history)),this.removeListeners=sS(oO(this.contextWindow,`pointermove`,this.handlePointerMove),oO(this.contextWindow,`pointerup`,this.handlePointerUp),oO(this.contextWindow,`pointercancel`,this.handlePointerUp)),o&&this.startScrollTracking(o)}startScrollTracking(e){let t=e.parentElement;for(;t;){let e=getComputedStyle(t);(uO.has(e.overflowX)||uO.has(e.overflowY))&&this.scrollPositions.set(t,{x:t.scrollLeft,y:t.scrollTop}),t=t.parentElement}this.scrollPositions.set(window,{x:window.scrollX,y:window.scrollY}),window.addEventListener(`scroll`,this.onElementScroll,{capture:!0}),window.addEventListener(`scroll`,this.onWindowScroll),this.removeScrollListeners=()=>{window.removeEventListener(`scroll`,this.onElementScroll,{capture:!0}),window.removeEventListener(`scroll`,this.onWindowScroll)}}handleScroll(e){let t=this.scrollPositions.get(e);if(!t)return;let n=e===window,r=n?{x:window.scrollX,y:window.scrollY}:{x:e.scrollLeft,y:e.scrollTop},i={x:r.x-t.x,y:r.y-t.y};i.x===0&&i.y===0||(n?this.lastMoveEventInfo&&(this.lastMoveEventInfo.point.x+=i.x,this.lastMoveEventInfo.point.y+=i.y):this.history.length>0&&(this.history[0].x-=i.x,this.history[0].y-=i.y),this.scrollPositions.set(e,r),RS.update(this.updatePoint,!0))}updateHandlers(e){this.handlers=e}end(){this.removeListeners&&this.removeListeners(),this.removeScrollListeners&&this.removeScrollListeners(),this.scrollPositions.clear(),zS(this.updatePoint)}};function fO(e,t){return t?{point:t(e.point)}:e}function pO(e,t){return{x:e.x-t.x,y:e.y-t.y}}function mO({point:e},t){return{point:e,delta:pO(e,gO(t)),offset:pO(e,hO(t)),velocity:_O(t,.1)}}function hO(e){return e[0]}function gO(e){return e[e.length-1]}function _O(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null,i=gO(e);for(;n>=0&&(r=e[n],!(i.timestamp-r.timestamp>uS(t)));)n--;if(!r)return{x:0,y:0};r===e[0]&&e.length>2&&i.timestamp-r.timestamp>uS(t)*2&&(r=e[1]);let a=dS(i.timestamp-r.timestamp);if(a===0)return{x:0,y:0};let o={x:(i.x-r.x)/a,y:(i.y-r.y)/a};return o.x===1/0&&(o.x=0),o.y===1/0&&(o.y=0),o}function vO(e,{min:t,max:n},r){return t!==void 0&&e<t?e=r?bC(t,e,r.min):Math.max(e,t):n!==void 0&&e>n&&(e=r?bC(n,e,r.max):Math.min(e,n)),e}function yO(e,t,n){return{min:t===void 0?void 0:e.min+t,max:n===void 0?void 0:e.max+n-(e.max-e.min)}}function bO(e,{top:t,left:n,bottom:r,right:i}){return{x:yO(e.x,n,i),y:yO(e.y,t,r)}}function xO(e,t){let n=t.min-e.min,r=t.max-e.max;return t.max-t.min<e.max-e.min&&([n,r]=[r,n]),{min:n,max:r}}function SO(e,t){return{x:xO(e.x,t.x),y:xO(e.y,t.y)}}function CO(e,t){let n=.5,r=NE(e),i=NE(t);return i>r?n=cS(t.min,t.max-r,e.min):r>i&&(n=cS(e.min,e.max-i,t.min)),$x(0,1,n)}function wO(e,t){let n={};return t.min!==void 0&&(n.min=t.min-e.min),t.max!==void 0&&(n.max=t.max-e.min),n}var TO=.35;function EO(e=TO){return e===!1?e=0:e===!0&&(e=TO),{x:DO(e,`left`,`right`),y:DO(e,`top`,`bottom`)}}function DO(e,t,n){return{min:OO(e,t),max:OO(e,n)}}function OO(e,t){return typeof e==`number`?e:e[t]||0}var kO=new WeakMap,AO=class{constructor(e){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=ST(),this.latestPointerEvent=null,this.latestPanInfo=null,this.visualElement=e}start(e,{snapToCursor:t=!1,distanceThreshold:n}={}){let{presenceContext:r}=this.visualElement;if(r&&r.isPresent===!1)return;let i=e=>{t&&this.snapToCursor(iO(e).point),this.stopAnimation()},a=(e,t)=>{let{drag:n,dragPropagation:r,onDragStart:i}=this.getProps();if(n&&!r&&(this.openDragLock&&this.openDragLock(),this.openDragLock=Tre(n),!this.openDragLock))return;this.latestPointerEvent=e,this.latestPanInfo=t,this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),ZE(e=>{let t=this.getAxisMotionValue(e).get()||0;if(sC.test(t)){let{projection:n}=this.visualElement;if(n&&n.layout){let r=n.layout.layoutBox[e];r&&(t=NE(r)*(parseFloat(t)/100))}}this.originPoint[e]=t}),i&&RS.update(()=>i(e,t),!1,!0),Fw(this.visualElement,`transform`);let{animationState:a}=this.visualElement;a&&a.setActive(`whileDrag`,!0)},o=(e,t)=>{this.latestPointerEvent=e,this.latestPanInfo=t;let{dragPropagation:n,dragDirectionLock:r,onDirectionLock:i,onDrag:a}=this.getProps();if(!n&&!this.openDragLock)return;let{offset:o}=t;if(r&&this.currentDirection===null){this.currentDirection=PO(o),this.currentDirection!==null&&i&&i(this.currentDirection);return}this.updateAxis(`x`,t.point,o),this.updateAxis(`y`,t.point,o),this.visualElement.render(),a&&RS.update(()=>a(e,t),!1,!0)},s=(e,t)=>{this.latestPointerEvent=e,this.latestPanInfo=t,this.stop(e,t),this.latestPointerEvent=null,this.latestPanInfo=null},c=()=>{let{dragSnapToOrigin:e}=this.getProps();(e||this.constraints)&&this.startAnimation({x:0,y:0})},{dragSnapToOrigin:l}=this.getProps();this.panSession=new dO(e,{onSessionStart:i,onStart:a,onMove:o,onSessionEnd:s,resumeAnimation:c},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:l,distanceThreshold:n,contextWindow:sO(this.visualElement),element:this.visualElement.current})}stop(e,t){let n=e||this.latestPointerEvent,r=t||this.latestPanInfo,i=this.isDragging;if(this.cancel(),!i||!r||!n)return;let{velocity:a}=r;this.startAnimation(a);let{onDragEnd:o}=this.getProps();o&&RS.postRender(()=>o(n,r))}cancel(){this.isDragging=!1;let{projection:e,animationState:t}=this.visualElement;e&&(e.isAnimationBlocked=!1),this.endPanSession();let{dragPropagation:n}=this.getProps();!n&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),t&&t.setActive(`whileDrag`,!1)}endPanSession(){this.panSession&&this.panSession.end(),this.panSession=void 0}updateAxis(e,t,n){let{drag:r}=this.getProps();if(!n||!NO(e,r,this.currentDirection))return;let i=this.getAxisMotionValue(e),a=this.originPoint[e]+n[e];this.constraints&&this.constraints[e]&&(a=vO(a,this.constraints[e],this.elastic[e])),i.set(a)}resolveConstraints(){let{dragConstraints:e,dragElastic:t}=this.getProps(),n=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):this.visualElement.projection?.layout,r=this.constraints;e&&tO(e)?this.constraints||=this.resolveRefConstraints():e&&n?this.constraints=bO(n.layoutBox,e):this.constraints=!1,this.elastic=EO(t),r!==this.constraints&&!tO(e)&&n&&this.constraints&&!this.hasMutatedConstraints&&ZE(e=>{this.constraints!==!1&&this.getAxisMotionValue(e)&&(this.constraints[e]=wO(n.layoutBox[e],this.constraints[e]))})}resolveRefConstraints(){let{dragConstraints:e,onMeasureDragConstraints:t}=this.getProps();if(!e||!tO(e))return!1;let n=e.current,{projection:r}=this.visualElement;if(!r||!r.layout)return!1;let i=Kre(n,r.root,this.visualElement.getTransformPagePoint()),a=SO(r.layout.layoutBox,i);
29if(t){let e=t(Ure(a));this.hasMutatedConstraints=!!e,e&&(a=HT(e))}return a}startAnimation(e){let{drag:t,dragMomentum:n,dragElastic:r,dragTransition:i,dragSnapToOrigin:a,onDragTransitionEnd:o}=this.getProps(),s=this.constraints||{},c=ZE(o=>{if(!NO(o,t,this.currentDirection))return;let c=s&&s[o]||{};(a===!0||a===o)&&(c={min:0,max:0});let l=r?200:1e6,u=r?40:1e7,d={type:`inertia`,velocity:n?e[o]:0,bounceStiffness:l,bounceDamping:u,timeConstant:750,restDelta:1,restSpeed:10,...i,...c};return this.startAxisValueAnimation(o,d)});return Promise.all(c).then(o)}startAxisValueAnimation(e,t){let n=this.getAxisMotionValue(e);return Fw(this.visualElement,e),n.start(Tw(e,n,0,t,this.visualElement,!1))}stopAnimation(){ZE(e=>this.getAxisMotionValue(e).stop())}getAxisMotionValue(e){let t=`_drag${e.toUpperCase()}`,n=this.visualElement.getProps();return n[t]||this.visualElement.getValue(e,(n.initial?n.initial[e]:void 0)||0)}snapToCursor(e){ZE(t=>{let{drag:n}=this.getProps();if(!NO(t,n,this.currentDirection))return;let{projection:r}=this.visualElement,i=this.getAxisMotionValue(t);if(r&&r.layout){let{min:n,max:a}=r.layout.layoutBox[t],o=i.get()||0;i.set(e[t]-bC(n,a,.5)+o)}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;let{drag:e,dragConstraints:t}=this.getProps(),{projection:n}=this.visualElement;if(!tO(t)||!n||!this.constraints)return;this.stopAnimation();let r={x:0,y:0};ZE(e=>{let t=this.getAxisMotionValue(e);if(t&&this.constraints!==!1){let n=t.get();r[e]=CO({min:n,max:n},this.constraints[e])}});let{transformTemplate:i}=this.visualElement.getProps();this.visualElement.current.style.transform=i?i({},``):`none`,n.root&&n.root.updateScroll(),n.updateLayout(),this.constraints=!1,this.resolveConstraints(),ZE(t=>{if(!NO(t,e,null))return;let n=this.getAxisMotionValue(t),{min:i,max:a}=this.constraints[t];n.set(bC(i,a,r[t]))}),this.visualElement.render()}addListeners(){if(!this.visualElement.current)return;kO.set(this.visualElement,this);let e=this.visualElement.current,t=oO(e,`pointerdown`,t=>{let{drag:n,dragListener:r=!0}=this.getProps(),i=t.target,a=i!==e&&jre(i);n&&r&&!a&&this.start(t)}),n,r=()=>{let{dragConstraints:t}=this.getProps();tO(t)&&t.current&&(this.constraints=this.resolveRefConstraints(),n||=MO(e,t.current,()=>this.scalePositionWithinConstraints()))},{projection:i}=this.visualElement,a=i.addEventListener(`measure`,r);i&&!i.layout&&(i.root&&i.root.updateScroll(),i.updateLayout()),RS.read(r);let o=iD(window,`resize`,()=>this.scalePositionWithinConstraints()),s=i.addEventListener(`didUpdate`,(({delta:e,hasLayoutChanged:t})=>{this.isDragging&&t&&(ZE(t=>{let n=this.getAxisMotionValue(t);n&&(this.originPoint[t]+=e[t].translate,n.set(n.get()+e[t].translate))}),this.visualElement.render())}));return()=>{o(),t(),a(),s&&s(),n&&n()}}getProps(){let e=this.visualElement.getProps(),{drag:t=!1,dragDirectionLock:n=!1,dragPropagation:r=!1,dragConstraints:i=!1,dragElastic:a=TO,dragMomentum:o=!0}=e;return{...e,drag:t,dragDirectionLock:n,dragPropagation:r,dragConstraints:i,dragElastic:a,dragMomentum:o}}};function jO(e){let t=!0;return()=>{if(t){t=!1;return}e()}}function MO(e,t,n){let r=vT(e,jO(n)),i=vT(t,jO(n));return()=>{r(),i()}}function NO(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function PO(e,t=10){let n=null;return Math.abs(e.y)>t?n=`y`:Math.abs(e.x)>t&&(n=`x`),n}var FO=class extends VT{constructor(e){super(e),this.removeGroupControls=aS,this.removeListeners=aS,this.controls=new AO(e)}mount(){let{dragControls:e}=this.node.getProps();e&&(this.removeGroupControls=e.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||aS}update(){let{dragControls:e}=this.node.getProps(),{dragControls:t}=this.node.prevProps||{};e!==t&&(this.removeGroupControls(),e&&(this.removeGroupControls=e.subscribe(this.controls)))}unmount(){this.removeGroupControls(),this.removeListeners(),this.controls.isDragging||this.controls.endPanSession()}},IO=e=>(t,n)=>{e&&RS.update(()=>e(t,n),!1,!0)},LO=class extends VT{constructor(){super(...arguments),this.removePointerDownListener=aS}onPointerDown(e){this.session=new dO(e,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:sO(this.node)})}createPanHandlers(){let{onPanSessionStart:e,onPanStart:t,onPan:n,onPanEnd:r}=this.node.getProps();return{onSessionStart:IO(e),onStart:IO(t),onMove:IO(n),onEnd:(e,t)=>{delete this.session,r&&RS.postRender(()=>r(e,t))}}}mount(){this.removePointerDownListener=oO(this.node.current,`pointerdown`,e=>this.onPointerDown(e))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}},RO=!1,zO=class extends b.Component{componentDidMount(){let{visualElement:e,layoutGroup:t,switchLayoutGroup:n,layoutId:r}=this.props,{projection:i}=e;i&&(t.group&&t.group.add(i),n&&n.register&&r&&n.register(i),RO&&i.root.didUpdate(),i.addEventListener(`animationComplete`,()=>{this.safeToRemove()}),i.setOptions({...i.options,layoutDependency:this.props.layoutDependency,onExitComplete:()=>this.safeToRemove()})),uD.hasEverUpdated=!0}getSnapshotBeforeUpdate(e){let{layoutDependency:t,visualElement:n,drag:r,isPresent:i}=this.props,{projection:a}=n;return a?(a.isPresent=i,e.layoutDependency!==t&&a.setOptions({...a.options,layoutDependency:t}),RO=!0,r||e.layoutDependency!==t||t===void 0||e.isPresent!==i?a.willUpdate():this.safeToRemove(),e.isPresent!==i&&(i?a.promote():a.relegate()||RS.postRender(()=>{let e=a.getStack();(!e||!e.members.length)&&this.safeToRemove()})),null):null}componentDidUpdate(){let{visualElement:e,layoutAnchor:t}=this.props,{projection:n}=e;n&&(n.options.layoutAnchor=t,n.root.didUpdate(),$w.postRender(()=>{!n.currentAnimation&&n.isLead()&&this.safeToRemove()}))}componentWillUnmount(){let{visualElement:e,layoutGroup:t,switchLayoutGroup:n}=this.props,{projection:r}=e;RO=!0,r&&(r.scheduleCheckAfterUnmount(),t&&t.group&&t.group.remove(r),n&&n.deregister&&n.deregister(r))}safeToRemove(){let{safeToRemove:e}=this.props;e&&e()}render(){return null}};function BO(e){let[t,n]=ID(),r=(0,b.useContext)(qx);return(0,V.jsx)(zO,{...e,layoutGroup:r,switchLayoutGroup:(0,b.useContext)(eO),isPresent:t,safeToRemove:n})}var VO={pan:{Feature:LO},drag:{Feature:FO,ProjectionNode:ND,MeasureLayout:BO}};function HO(e,t,n){let{props:r}=e;e.animationState&&r.whileHover&&e.animationState.setActive(`whileHover`,n===`Start`);let i=r[`onHover`+n];i&&RS.postRender(()=>i(t,iO(t)))}
29var UO=class extends VT{mount(){let{current:e}=this.node;e&&(this.unmount=Dre(e,(e,t)=>(HO(this.node,t,`Start`),e=>HO(this.node,e,`End`))))}unmount(){}},WO=class extends VT{constructor(){super(...arguments),this.isActive=!1}onFocus(){let e=!1;try{e=this.node.current.matches(`:focus-visible`)}catch{e=!0}!e||!this.node.animationState||(this.node.animationState.setActive(`whileFocus`,!0),this.isActive=!0)}onBlur(){!this.isActive||!this.node.animationState||(this.node.animationState.setActive(`whileFocus`,!1),this.isActive=!1)}mount(){this.unmount=sS(iD(this.node.current,`focus`,()=>this.onFocus()),iD(this.node.current,`blur`,()=>this.onBlur()))}unmount(){}};function GO(e,t,n){let{props:r}=e;if(e.current instanceof HTMLButtonElement&&e.current.disabled)return;e.animationState&&r.whileTap&&e.animationState.setActive(`whileTap`,n===`Start`);let i=r[`onTap`+(n===`End`?``:n)];i&&RS.postRender(()=>i(t,iO(t)))}var KO=class extends VT{mount(){let{current:e}=this.node;if(!e)return;let{globalTapTarget:t,propagate:n}=this.node.props;this.unmount=Nre(e,(e,t)=>(GO(this.node,t,`Start`),(e,{success:t})=>GO(this.node,e,t?`End`:`Cancel`)),{useGlobalTarget:t,stopPropagation:n?.tap===!1})}unmount(){}},qO=new WeakMap,JO=new WeakMap,YO=e=>{let t=qO.get(e.target);t&&t(e)},XO=e=>{e.forEach(YO)};function ZO({root:e,...t}){let n=e||document;JO.has(n)||JO.set(n,{});let r=JO.get(n),i=JSON.stringify(t);return r[i]||(r[i]=new IntersectionObserver(XO,{root:e,...t})),r[i]}function QO(e,t,n){let r=ZO(t);return qO.set(e,n),r.observe(e),()=>{qO.delete(e),r.unobserve(e)}}var $O={some:0,all:1},ek=class extends VT{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.stopObserver?.();let{viewport:e={}}=this.node.getProps(),{root:t,margin:n,amount:r=`some`,once:i}=e,a={root:t?t.current:void 0,rootMargin:n,threshold:typeof r==`number`?r:$O[r]},o=e=>{let{isIntersecting:t}=e;if(this.isInView===t||(this.isInView=t,i&&!t&&this.hasEnteredView))return;t&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive(`whileInView`,t);let{onViewportEnter:n,onViewportLeave:r}=this.node.getProps(),a=t?n:r;a&&a(e)};this.stopObserver=QO(this.node.current,a,o)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>`u`)return;let{props:e,prevProps:t}=this.node;[`amount`,`margin`,`root`].some(tk(e,t))&&this.startObserver()}unmount(){this.stopObserver?.(),this.hasEnteredView=!1,this.isInView=!1}};function tk({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}var nk={inView:{Feature:ek},tap:{Feature:KO},focus:{Feature:WO},hover:{Feature:UO}},rk={layout:{ProjectionNode:ND,MeasureLayout:BO}},ik=sae({...dae,...nk,...VO,...rk},cae);function ak(){!MT.current&&PT();let[e]=(0,b.useState)(jT.current);return e}var ok=(...e)=>e.filter((e,t,n)=>!!e&&e.trim()!==``&&n.indexOf(e)===t).join(` `).trim(),sk=e=>e.replace(/([a-z0-9])([A-Z])/g,`$1-$2`).toLowerCase(),ck=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(e,t,n)=>n?n.toUpperCase():t.toLowerCase()),lk=e=>{let t=ck(e);return t.charAt(0).toUpperCase()+t.slice(1)},uk={xmlns:`http://www.w3.org/2000/svg`,width:24,height:24,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:2,strokeLinecap:`round`,strokeLinejoin:`round`},dk=e=>{for(let t in e)if(t.startsWith(`aria-`)||t===`role`||t===`title`)return!0;return!1},fk=(0,b.createContext)({}),pk=()=>(0,b.useContext)(fk),mk=(0,b.forwardRef)(({color:e,size:t,strokeWidth:n,absoluteStrokeWidth:r,className:i=``,children:a,iconNode:o,...s},c)=>{let{size:l=24,strokeWidth:u=2,absoluteStrokeWidth:d=!1,color:f=`currentColor`,className:p=``}=pk()??{},m=r??d?Number(n??u)*24/Number(t??l):n??u;return(0,b.createElement)(`svg`,{ref:c,...uk,width:t??l??uk.width,height:t??l??uk.height,stroke:e??f,strokeWidth:m,className:ok(`lucide`,p,i),...!a&&!dk(s)&&{"aria-hidden":`true`},...s},[...o.map(([e,t])=>(0,b.createElement)(e,t)),...Array.isArray(a)?a:[a]])}),H=(e,t)=>{let n=(0,b.forwardRef)(({className:n,...r},i)=>(0,b.createElement)(mk,{ref:i,iconNode:t,className:ok(`lucide-${sk(lk(e))}`,`lucide-${e}`,n),...r}));return n.displayName=lk(e),n},hk=H(`activity`,[[`path`,{d:`M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.25.25 0 0 1-.48 0L9.24 2.18a.25.25 0 0 0-.48 0l
29-2.35 8.36A2 2 0 0 1 4.49 12H2`,key:`169zse`}]]),gk=H(`anchor`,[[`path`,{d:`M12 6v16`,key:`nqf5sj`}],[`path`,{d:`m19 13 2-1a9 9 0 0 1-18 0l2 1`,key:`y7qv08`}],[`path`,{d:`M9 11h6`,key:`1fldmi`}],[`circle`,{cx:`12`,cy:`4`,r:`2`,key:`muu5ef`}]]),_k=H(`armchair`,[[`path`,{d:`M19 9V6a2 2 0 0 0-2-2H7a2 2 0 0 0-2 2v3`,key:`irtipd`}],[`path`,{d:`M3 16a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-5a2 2 0 0 0-4 0v1.5a.5.5 0 0 1-.5.5h-9a.5.5 0 0 1-.5-.5V11a2 2 0 0 0-4 0z`,key:`1qyhux`}],[`path`,{d:`M5 18v2`,key:`ppbyun`}],[`path`,{d:`M19 18v2`,key:`gy7782`}]]),vk=H(`arrow-down-right`,[[`path`,{d:`m7 7 10 10`,key:`1fmybs`}],[`path`,{d:`M17 7v10H7`,key:`6fjiku`}]]),yk=H(`arrow-down`,[[`path`,{d:`M12 5v14`,key:`s699le`}],[`path`,{d:`m19 12-7 7-7-7`,key:`1idqje`}]]),bk=H(`arrow-left`,[[`path`,{d:`m12 19-7-7 7-7`,key:`1l729n`}],[`path`,{d:`M19 12H5`,key:`x3x0zl`}]]),xk=H(`arrow-right`,[[`path`,{d:`M5 12h14`,key:`1ays0h`}],[`path`,{d:`m12 5 7 7-7 7`,key:`xquz4c`}]]),Sk=H(`arrow-up-down`,[[`path`,{d:`m21 16-4 4-4-4`,key:`f6ql7i`}],[`path`,{d:`M17 20V4`,key:`1ejh1v`}],[`path`,{d:`m3 8 4-4 4 4`,key:`11wl7u`}],[`path`,{d:`M7 4v16`,key:`1glfcx`}]]),Ck=H(`arrow-up-right`,[[`path`,{d:`M7 7h10v10`,key:`1tivn9`}],[`path`,{d:`M7 17 17 7`,key:`1vkiza`}]]),wk=H(`arrow-up`,[[`path`,{d:`m5 12 7-7 7 7`,key:`hav0vg`}],[`path`,{d:`M12 19V5`,key:`x0mq9r`}]]),Tk=H(`baby`,[[`path`,{d:`M10 16c.5.3 1.2.5 2 .5s1.5-.2 2-.5`,key:`1u7htd`}],[`path`,{d:`M15 12h.01`,key:`1k8ypt`}],[`path`,{d:`M19.38 6.813A9 9 0 0 1 20.8 10.2a2 2 0 0 1 0 3.6 9 9 0 0 1-17.6 0 2 2 0 0 1 0-3.6A9 9 0 0 1 12 3c2 0 3.5 1.1 3.5 2.5s-.9 2.5-2 2.5c-.8 0-1.5-.4-1.5-1`,key:`11xh7x`}],[`path`,{d:`M9 12h.01`,key:`157uk2`}]]),Ek=H(`bell`,[[`path`,{d:`M10.268 21a2 2 0 0 0 3.464 0`,key:`vwvbt9`}],[`path`,{d:`M3.262 15.326A1 1 0 0 0 4 17h16a1 1 0 0 0 .74-1.673C19.41 13.956 18 12.499 18 8A6 6 0 0 0 6 8c0 4.499-1.411 5.956-2.738 7.326`,key:`11g9vi`}]]),Dk=H(`bike`,[[`circle`,{cx:`18.5`,cy:`17.5`,r:`3.5`,key:`15x4ox`}],[`circle`,{cx:`5.5`,cy:`17.5`,r:`3.5`,key:`1noe27`}],[`circle`,{cx:`15`,cy:`5`,r:`1`,key:`19l28e`}],[`path`,{d:`M12 17.5V14l-3-3 4-3 2 3h2`,key:`1npguv`}]]),Ok=H(`bot`,[[`path`,{d:`M12 8V4H8`,key:`hb8ula`}],[`rect`,{width:`16`,height:`12`,x:`4`,y:`8`,rx:`2`,key:`enze0r`}],[`path`,{d:`M2 14h2`,key:`vft8re`}],[`path`,{d:`M20 14h2`,key:`4cs60a`}],[`path`,{d:`M15 13v2`,key:`1xurst`}],[`path`,{d:`M9 13v2`,key:`rq6x2g`}]]),kk=H(`briefcase`,[[`path`,{d:`M16 20V4a2 2 0 0 0-2-2h-4a2 2 0 0 0-2 2v16`,key:`jecpp`}],[`rect`,{width:`20`,height:`14`,x:`2`,y:`6`,rx:`2`,key:`i6l2r4`}]]),Ak=H(`building-2`,[[`path`,{d:`M10 12h4`,key:`a56b0p`}],[`path`,{d:`M10 8h4`,key:`1sr2af`}],[`path`,{d:`M14 21v-3a2 2 0 0 0-4 0v3`,key:`1rgiei`}],[`path`,{d:`M6 10H4a2 2 0 0 0-2 2v7a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2V9a2 2 0 0 0-2-2h-2`,key:`secmi2`}],[`path`,{d:`M6 21V5a2 2 0 0 1 2-2h8a2 2 0 0 1 2 2v16`,key:`16ra0t`}]]),jk=H(`building`,[[`path`,{d:`M12 10h.01`,key:`1nrarc`}],[`path`,{d:`M12 14h.01`,key:`1etili`}],[`path`,{d:`M12 6h.01`,key:`1vi96p`}],[`path`,{d:`M16 10h.01`,key:`1m94wz`}],[`path`,{d:`M16 14h.01`,key:`1gbofw`}],[`path`,{d:`M16 6h.01`,key:`1x0f13`}],[`path`,{d:`M8 10h.01`,key:`19clt8`}],[`path`,{d:`M8 14h.01`,key:`6423bh`}],[`path`,{d:`M8 6h.01`,key:`1dz90k`}],[`path`,{d:`M9 22v-3a1 1 0 0 1 1-1h4a1 1 0 0 1 1 1v3`,key:`cabbwy`}],[`rect`,{x:`4`,y:`2`,width:`16`,height:`20`,rx:`2`,key:`1uxh74`}]]),fae=H(`calendar-clock`,[[`path`,{d:`M16 14v2.2l1.6 1`,key:`fo4ql5`}],[`path`,{d:`M16 2v4`,key:`4m81vk`}],[`path`,{d:`M21 7.5V6a2 2 0 0 0-2-2H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h3.5`,key:`1osxxc`}],[`path`,{d:`M3 10h5`,key:`r794hk`}],[`path`,{d:`M8 2v4`,key:`1cmpym`}],[`circle`,{cx:`16`,cy:`16`,r:`6`,key:`qoo3c4`}]]),Mk=H(`calendar`,[[`path`,{d:`M8 2v4`,key:`1cmpym`}],[`path`,{d:`M16 2v4`,key:`4m81vk`}],[`rect`,{width:`18`,height:`18`,x:`3`,y:`4`,rx:`2`,key:`1hopcy`}],[`path`,{d:`M3 10h18`,key:`8toen8`}]]),pae=H(`camera`,[[`path`,{d:`M13.997 4a2 2 0 0 1 1.76 1.05l.486.9A2 2 0 0 0 18.003 7H20a2 2 0 0 1 2 2v9a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V9a2 2 0 0 1 2-2h1.997a2 2 0 0 0 1.759-1.048l.489-.904A2 2 0 0 1 10.004 4z`,key:`18u6gg`}],[`circle`,{cx:`12`,cy:`13`,r:`3`,key:`1vg3eu`}]]),Nk=H(`car-front`,[[`path`,{d:`m21 8-2 2-1.5-3.7A2 2 0 0 0 15.646 5H8.4a2 2 0 0 0-1.903 1.257L5 10 3 8`,key:`1imjwt`}],[`path`,{d:`M7 14h.01`,key:`1qa3f1`}],[`path`,{d:`M17 14h.01`,key:`7oqj8z`}],[`rect`,{width:`18`,height:`8`,x:`3`,y:`10`,rx:`2`,key:`a7itu8`}],[`path`,{d:`M5 18v2`,key:`ppbyun`}],[`path`,{d:`M19 18v2`,key:`gy7782`}]]),Pk=H(`car`,[[`path`,{d:`M19 17h2c.6 0 1-.4 1-1v-3c0-.9-.7-1.7-1.5-1.9C18.7 10.6 16 10 16 10s-1.3-1.4-2.2-2.3c-.5-.4-1.1-.7-1.8-.7H5c-.6 0-1.1.4-1.4.9l-1.4 2.9A3.7 3.7 0 0 0 2 12v4c0 .6.4 1 1 1h2`,key:`5owen`}],[`circle`,{cx:`7`,cy:`17`,r:`2`,key:`u2ysq9`}],[`path`,{d:`M9 17h6`,key:`r8uit2`}],[`circle`,{cx:`17`,cy:`17`,r:`2`,key:`axvx0g`}]]),mae=H(`cat`,[[`path`,{d:`M12 5c.67 0 1.35.09 2 .26 1.78-2 5.03-2.84 6.42-2.26 1.4.58-.42 7-.42 7 .57 1.07 1 2.24 1 3.44C21 17.9 16.97 21 12 21s-9-3-9-7.56c0-1.25.5-2.4 1-3.44 0 0-1.89-6.42-.5-7 1.39-.58 4.72.23 6.5 2.23A9.04 9.04 0 0 1 12 5Z`,ke
29y:`x6xyqk`}],[`path`,{d:`M8 14v.5`,key:`1nzgdb`}],[`path`,{d:`M16 14v.5`,key:`1lajdz`}],[`path`,{d:`M11.25 16.25h1.5L12 17l-.75-.75Z`,key:`12kq1m`}]]),hae=H(`chart-column`,[[`path`,{d:`M3 3v16a2 2 0 0 0 2 2h16`,key:`c24i48`}],[`path`,{d:`M18 17V9`,key:`2bz60n`}],[`path`,{d:`M13 17V5`,key:`1frdt8`}],[`path`,{d:`M8 17v-3`,key:`17ska0`}]]),gae=H(`check-check`,[[`path`,{d:`M18 6 7 17l-5-5`,key:`116fxf`}],[`path`,{d:`m22 10-7.5 7.5L13 16`,key:`ke71qq`}]]),Fk=H(`check`,[[`path`,{d:`M20 6 9 17l-5-5`,key:`1gmf2c`}]]),Ik=H(`chevron-down`,[[`path`,{d:`m6 9 6 6 6-6`,key:`qrunsl`}]]),Lk=H(`chevron-left`,[[`path`,{d:`m15 18-6-6 6-6`,key:`1wnfg3`}]]),Rk=H(`chevron-right`,[[`path`,{d:`m9 18 6-6-6-6`,key:`mthhwq`}]]),zk=H(`chevron-up`,[[`path`,{d:`m18 15-6-6-6 6`,key:`153udz`}]]),Bk=H(`circle-alert`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`line`,{x1:`12`,x2:`12`,y1:`8`,y2:`12`,key:`1pkeuh`}],[`line`,{x1:`12`,x2:`12.01`,y1:`16`,y2:`16`,key:`4dfq90`}]]),Vk=H(`circle-check`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`m9 12 2 2 4-4`,key:`dzmm74`}]]),_ae=H(`circle-off`,[[`path`,{d:`m2 2 20 20`,key:`1ooewy`}],[`path`,{d:`M8.35 2.69A10 10 0 0 1 21.3 15.65`,key:`1pfsoa`}],[`path`,{d:`M19.08 19.08A10 10 0 1 1 4.92 4.92`,key:`1ablyi`}]]),vae=H(`circle-pause`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`line`,{x1:`10`,x2:`10`,y1:`15`,y2:`9`,key:`c1nkhi`}],[`line`,{x1:`14`,x2:`14`,y1:`15`,y2:`9`,key:`h65svq`}]]),Hk=H(`circle-question-mark`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3`,key:`1u773s`}],[`path`,{d:`M12 17h.01`,key:`p32p05`}]]),yae=H(`circle-slash`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`line`,{x1:`9`,x2:`15`,y1:`15`,y2:`9`,key:`1dfufj`}]]),bae=H(`circle-user`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`circle`,{cx:`12`,cy:`10`,r:`3`,key:`ilqhr7`}],[`path`,{d:`M7 20.662V19a2 2 0 0 1 2-2h6a2 2 0 0 1 2 2v1.662`,key:`154egf`}]]),xae=H(`circle-x`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`m15 9-6 6`,key:`1uzhvr`}],[`path`,{d:`m9 9 6 6`,key:`z0biqf`}]]),Sae=H(`clipboard-copy`,[[`rect`,{width:`8`,height:`4`,x:`8`,y:`2`,rx:`1`,ry:`1`,key:`tgr4d6`}],[`path`,{d:`M8 4H6a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-2`,key:`4jdomd`}],[`path`,{d:`M16 4h2a2 2 0 0 1 2 2v4`,key:`3hqy98`}],[`path`,{d:`M21 14H11`,key:`1bme5i`}],[`path`,{d:`m15 10-4 4 4 4`,key:`5dvupr`}]]),Cae=H(`clock-3`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`M12 6v6h4`,key:`135r8i`}]]),Uk=H(`clock`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`M12 6v6l4 2`,key:`mmk7yg`}]]),Wk=H(`cog`,[[`path`,{d:`M11 10.27 7 3.34`,key:`16pf9h`}],[`path`,{d:`m11 13.73-4 6.93`,key:`794ttg`}],[`path`,{d:`M12 22v-2`,key:`1osdcq`}],[`path`,{d:`M12 2v2`,key:`tus03m`}],[`path`,{d:`M14 12h8`,key:`4f43i9`}],[`path`,{d:`m17 20.66-1-1.73`,key:`eq3orb`}],[`path`,{d:`m17 3.34-1 1.73`,key:`2wel8s`}],[`path`,{d:`M2 12h2`,key:`1t8f8n`}],[`path`,{d:`m20.66 17-1.73-1`,key:`sg0v6f`}],[`path`,{d:`m20.66 7-1.73 1`,key:`1ow05n`}],[`path`,{d:`m3.34 17 1.73-1`,key:`nuk764`}],[`path`,{d:`m3.34 7 1.73 1`,key:`1ulond`}],[`circle`,{cx:`12`,cy:`12`,r:`2`,key:`1c9p78`}],[`circle`,{cx:`12`,cy:`12`,r:`8`,key:`46899m`}]]),wae=H(`construction`,[[`rect`,{x:`2`,y:`6`,width:`20`,height:`8`,rx:`1`,key:`1estib`}],[`path`,{d:`M17 14v7`,key:`7m2elx`}],[`path`,{d:`M7 14v7`,key:`1cm7wv`}],[`path`,{d:`M17 3v3`,key:`1v4jwn`}],[`path`,{d:`M7 3v3`,key:`7o6guu`}],[`path`,{d:`M10 14 2.3 6.3`,key:`1023jk`}],[`path`,{d:`m14 6 7.7 7.7`,key:`1s8pl2`}],[`path`,{d:`m8 6 8 8`,key:`hl96qh`}]]),Gk=H(`copy`,[[`rect`,{width:`14`,height:`14`,x:`8`,y:`8`,rx:`2`,ry:`2`,key:`17jyea`}],[`path`,{d:`M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2`,key:`zix9uf`}]]),Kk=H(`cpu`,[[`path`,{d:`M12 20v2`,key:`1lh1kg`}],[`path`,{d:`M12 2v2`,key:`tus03m`}],[`path`,{d:`M17 20v2`,key:`1rnc9c`}],[`path`,{d:`M17 2v2`,key:`11trls`}],[`path`,{d:`M2 12h2`,key:`1t8f8n`}],[`path`,{d:`M2 17h2`,key:`7oei6x`}],[`path`,{d:`M2 7h2`,key:`asdhe0`}],[`path`,{d:`M20 12h2`,key:`1q8mjw`}],[`path`,{d:`M20 17h2`,key:`1fpfkl`}],[`path`,{d:`M20 7h2`,key:`1o8tra`}],[`path`,{d:`M7 20v2`,key:`4gnj0m`}],[`path`,{d:`M7 2v2`,key:`1i4yhu`}],[`rect`,{x:`4`,y:`4`,width:`16`,height:`16`,rx:`2`,key:`1vbyd7`}],[`rect`,{x:`8`,y:`8`,width:`8`,height:`8`,rx:`1`,key:`z9xiuo`}
29]]),qk=H(`credit-card`,[[`rect`,{width:`20`,height:`14`,x:`2`,y:`5`,rx:`2`,key:`ynyp8z`}],[`line`,{x1:`2`,x2:`22`,y1:`10`,y2:`10`,key:`1b3vmo`}]]),Jk=H(`crown`,[[`path`,{d:`M11.562 3.266a.5.5 0 0 1 .876 0L15.39 8.87a1 1 0 0 0 1.516.294L21.183 5.5a.5.5 0 0 1 .798.519l-2.834 10.246a1 1 0 0 1-.956.734H5.81a1 1 0 0 1-.957-.734L2.02 6.02a.5.5 0 0 1 .798-.519l4.276 3.664a1 1 0 0 0 1.516-.294z`,key:`1vdc57`}],[`path`,{d:`M5 21h14`,key:`11awu3`}]]),Tae=H(`dog`,[[`path`,{d:`M11.25 16.25h1.5L12 17z`,key:`w7jh35`}],[`path`,{d:`M16 14v.5`,key:`1lajdz`}],[`path`,{d:`M4.42 11.247A13.152 13.152 0 0 0 4 14.556C4 18.728 7.582 21 12 21s8-2.272 8-6.444a11.702 11.702 0 0 0-.493-3.309`,key:`u7s9ue`}],[`path`,{d:`M8 14v.5`,key:`1nzgdb`}],[`path`,{d:`M8.5 8.5c-.384 1.05-1.083 2.028-2.344 2.5-1.931.722-3.576-.297-3.656-1-.113-.994 1.177-6.53 4-7 1.923-.321 3.651.845 3.651 2.235A7.497 7.497 0 0 1 14 5.277c0-1.39 1.844-2.598 3.767-2.277 2.823.47 4.113 6.006 4 7-.08.703-1.725 1.722-3.656 1-1.261-.472-1.855-1.45-2.239-2.5`,key:`v8hric`}]]),Eae=H(`download`,[[`path`,{d:`M12 15V3`,key:`m9g1x1`}],[`path`,{d:`M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4`,key:`ih7n3h`}],[`path`,{d:`m7 10 5 5 5-5`,key:`brsn70`}]]),Yk=H(`dumbbell`,[[`path`,{d:`M17.596 12.768a2 2 0 1 0 2.829-2.829l-1.768-1.767a2 2 0 0 0 2.828-2.829l-2.828-2.828a2 2 0 0 0-2.829 2.828l-1.767-1.768a2 2 0 1 0-2.829 2.829z`,key:`9m4mmf`}],[`path`,{d:`m2.5 21.5 1.4-1.4`,key:`17g3f0`}],[`path`,{d:`m20.1 3.9 1.4-1.4`,key:`1qn309`}],[`path`,{d:`M5.343 21.485a2 2 0 1 0 2.829-2.828l1.767 1.768a2 2 0 1 0 2.829-2.829l-6.364-6.364a2 2 0 1 0-2.829 2.829l1.768 1.767a2 2 0 0 0-2.828 2.829z`,key:`1t2c92`}],[`path`,{d:`m9.6 14.4 4.8-4.8`,key:`6umqxw`}]]),Xk=H(`ellipsis`,[[`circle`,{cx:`12`,cy:`12`,r:`1`,key:`41hilf`}],[`circle`,{cx:`19`,cy:`12`,r:`1`,key:`1wjl8i`}],[`circle`,{cx:`5`,cy:`12`,r:`1`,key:`1pcz8c`}]]),Dae=H(`eraser`,[[`path`,{d:`M21 21H8a2 2 0 0 1-1.42-.587l-3.994-3.999a2 2 0 0 1 0-2.828l10-10a2 2 0 0 1 2.829 0l5.999 6a2 2 0 0 1 0 2.828L12.834 21`,key:`g5wo59`}],[`path`,{d:`m5.082 11.09 8.828 8.828`,key:`1wx5vj`}]]),Zk=H(`external-link`,[[`path`,{d:`M15 3h6v6`,key:`1q9fwt`}],[`path`,{d:`M10 14 21 3`,key:`gplh6r`}],[`path`,{d:`M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6`,key:`a6xqqp`}]]),Oae=H(`eye-off`,[[`path`,{d:`M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49`,key:`ct8e1f`}],[`path`,{d:`M14.084 14.158a3 3 0 0 1-4.242-4.242`,key:`151rxh`}],[`path`,{d:`M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143`,key:`13bj9a`}],[`path`,{d:`m2 2 20 20`,key:`1ooewy`}]]),kae=H(`eye`,[[`path`,{d:`M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0`,key:`1nclc0`}],[`circle`,{cx:`12`,cy:`12`,r:`3`,key:`1v7zrd`}]]),Aae=H(`file-pen`,[[`path`,{d:`M12.659 22H18a2 2 0 0 0 2-2V8a2.4 2.4 0 0 0-.706-1.706l-3.588-3.588A2.4 2.4 0 0 0 14 2H6a2 2 0 0 0-2 2v9.34`,key:`o6klzx`}],[`path`,{d:`M14 2v5a1 1 0 0 0 1 1h5`,key:`wfsgrz`}],[`path`,{d:`M10.378 12.622a1 1 0 0 1 3 3.003L8.36 20.637a2 2 0 0 1-.854.506l-2.867.837a.5.5 0 0 1-.62-.62l.836-2.869a2 2 0 0 1 .506-.853z`,key:`zhnas1`}]]),Qk=H(`file-text`,[[`path`,{d:`M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z`,key:`1oefj6`}],[`path`,{d:`M14 2v5a1 1 0 0 0 1 1h5`,key:`wfsgrz`}],[`path`,{d:`M10 9H8`,key:`b1mrlr`}],[`path`,{d:`M16 13H8`,key:`t4e002`}],[`path`,{d:`M16 17H8`,key:`z1uh3a`}]]),$k=H(`fuel`,[[`path`,{d:`M14 13h2a2 2 0 0 1 2 2v2a2 2 0 0 0 4 0v-6.998a2 2 0 0 0-.59-1.42L18 5`,key:`1wtuz0`}],[`path`,{d:`M14 21V5a2 2 0 0 0-2-2H5a2 2 0 0 0-2 2v16`,key:`e09ifn`}],[`path`,{d:`M2 21h13`,key:`1x0fut`}],[`path`,{d:`M3 9h11`,key:`1p7c0w`}]]),eA=H(`funnel`,[[`path`,{d:`M10 20a1 1 0 0 0 .553.895l2 1A1 1 0 0 0 14 21v-7a2 2 0 0 1 .517-1.341L21.74 4.67A1 1 0 0 0 21 3H3a1 1 0 0 0-.742 1.67l7.225 7.989A2 2 0 0 1 10 14z`,key:`sc7q7i`}]]),tA=H(`gamepad-2`,[[`line`,{x1:`6`,x2:`10`,y1:`11`,y2:`11`,key:`1gktln`}],[`line`,{x1:`8`,x2:`8`,y1:`9`,y2:`13`,key:`qnk9ow`}],[`line`,{x1:`15`,x2:`15.01`,y1:`12`,y2:`12`,key:`krot7o`}],[`line`,{x1:`18`,x2:`18.01`,y1:`10`,y2:`10`,key:`1lcuu1`}],[`path`,{d:`M17.32 5H6.68a4 4 0 0 0-3.978 3.59c-.006.052-.01.101-.017.152C2.604 9.416 2 14.456 2 16a3 3 0 0 0 3 3c1 0 1.5-.5 2-1l1.414-1.414A2 2 0 0 1 9.828 16h4.344a2 2 0 0 1 1.414.586L17 18c.5.5 1 1 2 1a3 3 0 0 0 3-3c0-1.545-.604-6.584-.685-7.258-.007-.05-.011-.1-.017-.151A4 4 0 0 0 17.32 5z`,key:`mfqc10`}]]),nA=H(`gauge`,[[`path`,{d:`m12 14 4-4`,key:`9kzdfg`}],[`path`,{d:`M3.34 19a10 10 0 1 1 17.32 0`,key:`19p75a`}]]),rA=H(`gem`,[[`path`,{d:`M10.5 3 8 9l4 13 4-13-2.5-6`,key:`b3dvk1`}],[`path`,{d:`M17 3a2 2 0 0 1 1.6.8l3 4a2 2 0 0 1 .013 2.382l-7.99 10.986a2 2 0 0 1-3.247 0l-7.99-10.986A2 2 0 0 1 2.4 7.8l2.998-3.997A2 2 0 0 1 7 3z`,key:`7w4byz`}],[`path`,{d:`M2 9h20`,key:`16fsjt`}]]),iA=H(`gift`,[[`path`,{d:`M12 7v14`,key:`1akyts`}],[`path`,{d:`M20 11v8a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2v-8`,key:`1sqzm4`}],[`path`,{d:`M7.5 7a1 1 0 0 1 0-5A4.8 8 0 0 1 12 7a4.8 8 0 0 1 4.5-5 1 1 0 0 1 0 5`,key:`kc0143`}],[`rect`,{x:`3`,y:`7`,width:`18`,height:`4`,rx:`1`,key:`1hberx`}]]),aA=H(`globe`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20`,key:`13o1zl`}],[`path`,{d:`M2 12h20`,key:`9i4pu4`}]]),jae=H(`grid-3x3`,[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,key:`afitv7`}],[`path`,{d:`M3 9h18`,key:`1pudct`}],[`path`,{d:`M3 15h18`,key:`5xshup`}],[`path`,{d:`M9 3v18`,key:`fh3hqa`}],[`path`,{d:`M15 3v18`,key:`14nvp0`}]]),Mae=H(`hammer`,[[`path`,{d:`m15 12-9.373 9.373a1 1 0 0 1-3.001-3L12 9`,key:`1hayfq`}],[`path`,{d:`m18 15 4-4`,key:`16gjal`}],[`path`,{d:`m21.5 11.5-1.914-1.914A2 2 0 0 1 19 8.172v-.344a2 2 0 0 0-.586-1.414l-1.657-1.657A6 6 0 0 0 12.516 3H9l1.243 1.243A6 6 0 0 1 12 8.485V10l2 2h1.172a2 2 0 0 1 1.414.586L18.5 14.5`,key:`15ts47`}]]),oA=H(`hard-hat`,[[`path`,{d:`M10 10V5a1 1 0 0 1 1-1h2a1 1 0 0 1 1 1v5`,key:`1p9q5i`}
29],[`path`,{d:`M14 6a6 6 0 0 1 6 6v3`,key:`1hnv84`}],[`path`,{d:`M4 15v-3a6 6 0 0 1 6-6`,key:`9ciidu`}],[`rect`,{x:`2`,y:`15`,width:`20`,height:`4`,rx:`1`,key:`g3x8cw`}]]),Nae=H(`headphones`,[[`path`,{d:`M3 14h3a2 2 0 0 1 2 2v3a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-7a9 9 0 0 1 18 0v7a2 2 0 0 1-2 2h-1a2 2 0 0 1-2-2v-3a2 2 0 0 1 2-2h3`,key:`1xhozi`}]]),sA=H(`heart`,[[`path`,{d:`M2 9.5a5.5 5.5 0 0 1 9.591-3.676.56.56 0 0 0 .818 0A5.49 5.49 0 0 1 22 9.5c0 2.29-1.5 4-3 5.5l-5.492 5.313a2 2 0 0 1-3 .019L5 15c-1.5-1.5-3-3.2-3-5.5`,key:`mvr1a0`}]]),cA=H(`house`,[[`path`,{d:`M15 21v-8a1 1 0 0 0-1-1h-4a1 1 0 0 0-1 1v8`,key:`5wwlr5`}],[`path`,{d:`M3 10a2 2 0 0 1 .709-1.528l7-6a2 2 0 0 1 2.582 0l7 6A2 2 0 0 1 21 10v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z`,key:`r6nss1`}]]),lA=H(`image-off`,[[`line`,{x1:`2`,x2:`22`,y1:`2`,y2:`22`,key:`a6p6uj`}],[`path`,{d:`M10.41 10.41a2 2 0 1 1-2.83-2.83`,key:`1bzlo9`}],[`line`,{x1:`13.5`,x2:`6`,y1:`13.5`,y2:`21`,key:`1q0aeu`}],[`line`,{x1:`18`,x2:`21`,y1:`12`,y2:`15`,key:`5mozeu`}],[`path`,{d:`M3.59 3.59A1.99 1.99 0 0 0 3 5v14a2 2 0 0 0 2 2h14c.55 0 1.052-.22 1.41-.59`,key:`mmje98`}],[`path`,{d:`M21 15V5a2 2 0 0 0-2-2H9`,key:`43el77`}]]),Pae=H(`image-plus`,[[`path`,{d:`M16 5h6`,key:`1vod17`}],[`path`,{d:`M19 2v6`,key:`4bpg5p`}],[`path`,{d:`M21 11.5V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h7.5`,key:`1ue2ih`}],[`path`,{d:`m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21`,key:`1xmnt7`}],[`circle`,{cx:`9`,cy:`9`,r:`2`,key:`af1f0g`}]]),uA=H(`info`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`M12 16v-4`,key:`1dtifu`}],[`path`,{d:`M12 8h.01`,key:`e9boi3`}]]),Fae=H(`key-round`,[[`path`,{d:`M2.586 17.414A2 2 0 0 0 2 18.828V21a1 1 0 0 0 1 1h3a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h1a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h.172a2 2 0 0 0 1.414-.586l.814-.814a6.5 6.5 0 1 0-4-4z`,key:`1s6t7t`}],[`circle`,{cx:`16.5`,cy:`7.5`,r:`.5`,fill:`currentColor`,key:`w0ekpg`}]]),dA=H(`lamp`,[[`path`,{d:`M12 12v6`,key:`3ahymv`}],[`path`,{d:`M4.077 10.615A1 1 0 0 0 5 12h14a1 1 0 0 0 .923-1.385l-3.077-7.384A2 2 0 0 0 15 2H9a2 2 0 0 0-1.846 1.23Z`,key:`1l7kg2`}],[`path`,{d:`M8 20a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v1a1 1 0 0 1-1 1H9a1 1 0 0 1-1-1z`,key:`1mmzpi`}]]),fA=H(`laptop`,[[`path`,{d:`M18 5a2 2 0 0 1 2 2v8.526a2 2 0 0 0 .212.897l1.068 2.127a1 1 0 0 1-.9 1.45H3.62a1 1 0 0 1-.9-1.45l1.068-2.127A2 2 0 0 0 4 15.526V7a2 2 0 0 1 2-2z`,key:`1pdavp`}],[`path`,{d:`M20.054 15.987H3.946`,key:`14rxg9`}]]),pA=H(`layers`,[[`path`,{d:`M12.83 2.18a2 2 0 0 0-1.66 0L2.6 6.08a1 1 0 0 0 0 1.83l8.58 3.91a2 2 0 0 0 1.66 0l8.58-3.9a1 1 0 0 0 0-1.83z`,key:`zw3jo`}],[`path`,{d:`M2 12a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 12`,key:`1wduqc`}],[`path`,{d:`M2 17a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 17`,key:`kqbvx6`}]]),mA=H(`layout-dashboard`,[[`rect`,{width:`7`,height:`9`,x:`3`,y:`3`,rx:`1`,key:`10lvy0`}],[`rect`,{width:`7`,height:`5`,x:`14`,y:`3`,rx:`1`,key:`16une8`}],[`rect`,{width:`7`,height:`9`,x:`14`,y:`12`,rx:`1`,key:`1hutg5`}],[`rect`,{width:`7`,height:`5`,x:`3`,y:`16`,rx:`1`,key:`ldoo1y`}]]),hA=H(`layout-grid`,[[`rect`,{width:`7`,height:`7`,x:`3`,y:`3`,rx:`1`,key:`1g98yp`}],[`rect`,{width:`7`,height:`7`,x:`14`,y:`3`,rx:`1`,key:`6d4xhi`}],[`rect`,{width:`7`,height:`7`,x:`14`,y:`14`,rx:`1`,key:`nxv5o0`}],[`rect`,{width:`7`,height:`7`,x:`3`,y:`14`,rx:`1`,key:`1bb6yr`}]]),Iae=H(`library`,[[`path`,{d:`m16 6 4 14`,key:`ji33uf`}],[`path`,{d:`M12 6v14`,key:`1n7gus`}],[`path`,{d:`M8 8v12`,key:`1gg7y9`}],[`path`,{d:`M4 4v16`,key:`6qkkli`}]]),gA=H(`link-2`,[[`path`,{d:`M9 17H7A5 5 0 0 1 7 7h2`,key:`8i5ue5`}],[`path`,{d:`M15 7h2a5 5 0 1 1 0 10h-2`,key:`1b9ql8`}],[`line`,{x1:`8`,x2:`16`,y1:`12`,y2:`12`,key:`1jonct`}]]),Lae=H(`list`,[[`path`,{d:`M3 5h.01`,key:`18ugdj`}],[`path`,{d:`M3 12h.01`,key:`nlz23k`}],[`path`,{d:`M3 19h.01`,key:`noohij`}],[`path`,{d:`M8 5h13`,key:`1pao27`}],[`path`,{d:`M8 12h13`,key:`1za7za`}],[`path`,{d:`M8 19h13`,key:`m83p4d`}]]),_A=H(`loader-circle`,[[`path`,{d:`M21 12a9 9 0 1 1-6.219-8.56`,key:`13zald`}]]),Rae=H(`locate-fixed`,[[`line`,{x1:`2`,x2:`5`,y1:`12`,y2:`12`,key:`bvdh0s`}],[`line`,{x1:`19`,x2:`22`,y1:`12`,y2:`12`,key:`1tbv5k`}],[`line`,{x1:`12`,x2:`12`,y1:`2`,y2:`5`,key:`11lu5j`}],[`line`,{x1:`12`,x2:`12`,y1:`19`,y2:`22`,key:`x3vr5v`}],[`circle`,{cx:`12`,cy:`12`,r:`7`,key:`fim9np`}],[`circle`,{cx:`12`,cy:`12`,r:`3`,key:`1v7zrd`}]]),vA=H(`lock`,[[`rect`,{width:`18`,height:`11`,x:`3`,y:`11`,rx:`2`,ry:`2`,key:`1w4ew1`}],[`path`,{d:`M7 11V7a5 5 0 0 1 10 0v4`,key:`fwvmzm`}]]),yA=H(`log-out`,[[`path`,{d:`m16 17 5-5-5-5`,key:`1bji2h`}],[`path`,{d:`M21 12H9`,key:`dn1m92`}],[`path`,{d:`M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4`,key:`1uf3rs`}]]),bA=H(`mail`,[[`path`,{d:`m22 7-8.991 5.727a2 2 0 0 1-2.009 0L2 7`,key:`132q7q`}
29],[`rect`,{x:`2`,y:`4`,width:`20`,height:`16`,rx:`2`,key:`izxlao`}]]),xA=H(`map-pin`,[[`path`,{d:`M20 10c0 4.993-5.539 10.193-7.399 11.799a1 1 0 0 1-1.202 0C9.539 20.193 4 14.993 4 10a8 8 0 0 1 16 0`,key:`1r0f0z`}],[`circle`,{cx:`12`,cy:`10`,r:`3`,key:`ilqhr7`}]]),SA=H(`maximize-2`,[[`path`,{d:`M15 3h6v6`,key:`1q9fwt`}],[`path`,{d:`m21 3-7 7`,key:`1l2asr`}],[`path`,{d:`m3 21 7-7`,key:`tjx5ai`}],[`path`,{d:`M9 21H3v-6`,key:`wtvkvv`}]]),CA=H(`menu`,[[`path`,{d:`M4 5h16`,key:`1tepv9`}],[`path`,{d:`M4 12h16`,key:`1lakjw`}],[`path`,{d:`M4 19h16`,key:`1djgab`}]]),wA=H(`message-circle-more`,[[`path`,{d:`M2.992 16.342a2 2 0 0 1 .094 1.167l-1.065 3.29a1 1 0 0 0 1.236 1.168l3.413-.998a2 2 0 0 1 1.099.092 10 10 0 1 0-4.777-4.719`,key:`1sd12s`}],[`path`,{d:`M8 12h.01`,key:`czm47f`}],[`path`,{d:`M12 12h.01`,key:`1mp3jc`}],[`path`,{d:`M16 12h.01`,key:`1l6xoz`}]]),zae=H(`message-circle`,[[`path`,{d:`M2.992 16.342a2 2 0 0 1 .094 1.167l-1.065 3.29a1 1 0 0 0 1.236 1.168l3.413-.998a2 2 0 0 1 1.099.092 10 10 0 1 0-4.777-4.719`,key:`1sd12s`}]]),TA=H(`message-square`,[[`path`,{d:`M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z`,key:`18887p`}]]),EA=H(`mic-vocal`,[[`path`,{d:`m11 7.601-5.994 8.19a1 1 0 0 0 .1 1.298l.817.818a1 1 0 0 0 1.314.087L15.09 12`,key:`80a601`}],[`path`,{d:`M16.5 21.174C15.5 20.5 14.372 20 13 20c-2.058 0-3.928 2.356-6 2-2.072-.356-2.775-3.369-1.5-4.5`,key:`j0ngtp`}],[`circle`,{cx:`16`,cy:`7`,r:`5`,key:`d08jfb`}]]),DA=H(`minus`,[[`path`,{d:`M5 12h14`,key:`1ays0h`}]]),OA=H(`monitor`,[[`rect`,{width:`20`,height:`14`,x:`2`,y:`3`,rx:`2`,key:`48i651`}],[`line`,{x1:`8`,x2:`16`,y1:`21`,y2:`21`,key:`1svkeh`}],[`line`,{x1:`12`,x2:`12`,y1:`17`,y2:`21`,key:`vw1qmm`}]]),kA=H(`moon`,[[`path`,{d:`M20.985 12.486a9 9 0 1 1-9.473-9.472c.405-.022.617.46.402.803a6 6 0 0 0 8.268 8.268c.344-.215.825-.004.803.401`,key:`kfwtm`}]]),Bae=H(`music`,[[`path`,{d:`M9 18V5l12-2v13`,key:`1jmyc2`}],[`circle`,{cx:`6`,cy:`18`,r:`3`,key:`fqmcym`}],[`circle`,{cx:`18`,cy:`16`,r:`3`,key:`1hluhg`}]]),Vae=H(`navigation`,[[`polygon`,{points:`3 11 22 2 13 21 11 13 3 11`,key:`1ltx0t`}]]),AA=H(`package`,[[`path`,{d:`M11 21.73a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73z`,key:`1a0edw`}],[`path`,{d:`M12 22V12`,key:`d0xqtd`}],[`polyline`,{points:`3.29 7 12 12 20.71 7`,key:`ousv84`}],[`path`,{d:`m7.5 4.27 9 5.15`,key:`1c824w`}]]),jA=H(`palette`,[[`path`,{d:`M12 22a1 1 0 0 1 0-20 10 9 0 0 1 10 9 5 5 0 0 1-5 5h-2.25a1.75 1.75 0 0 0-1.4 2.8l.3.4a1.75 1.75 0 0 1-1.4 2.8z`,key:`e79jfc`}],[`circle`,{cx:`13.5`,cy:`6.5`,r:`.5`,fill:`currentColor`,key:`1okk4w`}],[`circle`,{cx:`17.5`,cy:`10.5`,r:`.5`,fill:`currentColor`,key:`f64h9f`}],[`circle`,{cx:`6.5`,cy:`12.5`,r:`.5`,fill:`currentColor`,key:`qy21gx`}],[`circle`,{cx:`8.5`,cy:`7.5`,r:`.5`,fill:`currentColor`,key:`fotxhn`}]]),Hae=H(`pause`,[[`rect`,{x:`14`,y:`3`,width:`5`,height:`18`,rx:`1`,key:`kaeet6`}],[`rect`,{x:`5`,y:`3`,width:`5`,height:`18`,rx:`1`,key:`1wsw3u`}]]),MA=H(`paw-print`,[[`circle`,{cx:`11`,cy:`4`,r:`2`,key:`vol9p0`}],[`circle`,{cx:`18`,cy:`8`,r:`2`,key:`17gozi`}],[`circle`,{cx:`20`,cy:`16`,r:`2`,key:`1v9bxh`}],[`path`,{d:`M9 10a5 5 0 0 1 5 5v3.5a3.5 3.5 0 0 1-6.84 1.045Q6.52 17.48 4.46 16.84A3.5 3.5 0 0 1 5.5 10Z`,key:`1ydw1z`}]]),NA=H(`pencil`,[[`path`,{d:`M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z`,key:`1a8usu`}],[`path`,{d:`m15 5 4 4`,key:`1mk7zo`}]]),PA=H(`phone`,[[`path`,{d:`M13.832 16.568a1 1 0 0 0 1.213-.303l.355-.465A2 2 0 0 1 17 15h3a2 2 0 0 1 2 2v3a2 2 0 0 1-2 2A18 18 0 0 1 2 4a2 2 0 0 1 2-2h3a2 2 0 0 1 2 2v3a2 2 0 0 1-.8 1.6l-.468.351a1 1 0 0 0-.292 1.233 14 14 0 0 0 6.392 6.384`,key:`9njp5v`}]]),Uae=H(`pill`,[[`path`,{d:`m10.5 20.5 10-10a4.95 4.95 0 1 0-7-7l-10 10a4.95 4.95 0 1 0 7 7Z`,key:`wa1lgi`}],[`path`,{d:`m8.5 8.5 7 7`,key:`rvfmvr`}]]),FA=H(`play`,[[`path`,{d:`M5 5a2 2 0 0 1 3.008-1.728l11.997 6.998a2 2 0 0 1 .003 3.458l-12 7A2 2 0 0 1 5 19z`,key:`10ikf1`}]]),IA=H(`plus`,[[`path`,{d:`M5 12h14`,key:`1ays0h`}],[`path`,{d:`M12 5v14`,key:`s699le`}]]),Wae=H(`plug`,[[`path`,{d:`M12 22v-5`,key:`1ega77`}],[`path`,{d:`M15 8V2`,key:`18g5xt`}],[`path`,{d:`M17 8a1 1 0 0 1 1 1v4a4 4 0 0 1-4 4h-4a4 4 0 0 1-4-4V9a1 1 0 0 1 1-1z`,key:`1xoxul`}],[`path`,{d:`M9 8V2`,key:`14iosj`}]]),Gae=H(`power`,[[`path`,{d:`M12 2v10`,key:`mnfbl`}],[`path`,{d:`M18.4 6.6a9 9 0 1 1-12.77.04`,key:`obofu9`}]]),LA=H(`printer`,[[`path`,{d:`M6 18H4a2 2 0 0 1-2-2v-5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2v5a2 2 0 0 1-2 2h-2`,key:`143wyd`}],[`path`,{d:`M6 9V3a1 1 0 0 1 1-1h10a1 1 0 0 1 1 1v6`,key:`1itne7`}],[`rect`,{x:`6`,y:`14`,width:`12`,height:`8`,rx:`1`,key:`1ue0tg`}
29]]),RA=H(`puzzle`,[[`path`,{d:`M15.39 4.39a1 1 0 0 0 1.68-.474 2.5 2.5 0 1 1 3.014 3.015 1 1 0 0 0-.474 1.68l1.683 1.682a2.414 2.414 0 0 1 0 3.414L19.61 15.39a1 1 0 0 1-1.68-.474 2.5 2.5 0 1 0-3.014 3.015 1 1 0 0 1 .474 1.68l-1.683 1.682a2.414 2.414 0 0 1-3.414 0L8.61 19.61a1 1 0 0 0-1.68.474 2.5 2.5 0 1 1-3.014-3.015 1 1 0 0 0 .474-1.68l-1.683-1.682a2.414 2.414 0 0 1 0-3.414L4.39 8.61a1 1 0 0 1 1.68.474 2.5 2.5 0 1 0 3.014-3.015 1 1 0 0 1-.474-1.68l1.683-1.682a2.414 2.414 0 0 1 3.414 0z`,key:`w46dr5`}]]),zA=H(`refresh-cw`,[[`path`,{d:`M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8`,key:`v9h5vc`}],[`path`,{d:`M21 3v5h-5`,key:`1q7to0`}],[`path`,{d:`M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16`,key:`3uifl3`}],[`path`,{d:`M8 16H3v5`,key:`1cv678`}]]),BA=H(`repeat-2`,[[`path`,{d:`m2 9 3-3 3 3`,key:`1ltn5i`}],[`path`,{d:`M13 18H7a2 2 0 0 1-2-2V6`,key:`1r6tfw`}],[`path`,{d:`m22 15-3 3-3-3`,key:`4rnwn2`}],[`path`,{d:`M11 6h6a2 2 0 0 1 2 2v10`,key:`2f72bc`}]]),Kae=H(`rotate-ccw`,[[`path`,{d:`M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8`,key:`1357e3`}],[`path`,{d:`M3 3v5h5`,key:`1xhq8a`}]]),qae=H(`rotate-cw`,[[`path`,{d:`M21 12a9 9 0 1 1-9-9c2.52 0 4.93 1 6.74 2.74L21 8`,key:`1p45f6`}],[`path`,{d:`M21 3v5h-5`,key:`1q7to0`}]]),Jae=H(`ruler`,[[`path`,{d:`M21.3 15.3a2.4 2.4 0 0 1 0 3.4l-2.6 2.6a2.4 2.4 0 0 1-3.4 0L2.7 8.7a2.41 2.41 0 0 1 0-3.4l2.6-2.6a2.41 2.41 0 0 1 3.4 0Z`,key:`icamh8`}],[`path`,{d:`m14.5 12.5 2-2`,key:`inckbg`}],[`path`,{d:`m11.5 9.5 2-2`,key:`fmmyf7`}],[`path`,{d:`m8.5 6.5 2-2`,key:`vc6u1g`}],[`path`,{d:`m17.5 15.5 2-2`,key:`wo5hmg`}]]),VA=H(`scale`,[[`path`,{d:`M12 3v18`,key:`108xh3`}],[`path`,{d:`m19 8 3 8a5 5 0 0 1-6 0zV7`,key:`zcdpyk`}],[`path`,{d:`M3 7h1a17 17 0 0 0 8-2 17 17 0 0 0 8 2h1`,key:`1yorad`}],[`path`,{d:`m5 8 3 8a5 5 0 0 1-6 0zV7`,key:`eua70x`}],[`path`,{d:`M7 21h10`,key:`1b0cd5`}]]),HA=H(`scan-search`,[[`path`,{d:`M3 7V5a2 2 0 0 1 2-2h2`,key:`aa7l1z`}],[`path`,{d:`M17 3h2a2 2 0 0 1 2 2v2`,key:`4qcy5o`}],[`path`,{d:`M21 17v2a2 2 0 0 1-2 2h-2`,key:`6vwrx8`}],[`path`,{d:`M7 21H5a2 2 0 0 1-2-2v-2`,key:`ioqczr`}],[`circle`,{cx:`12`,cy:`12`,r:`3`,key:`1v7zrd`}],[`path`,{d:`m16 16-1.9-1.9`,key:`1dq9hf`}]]),UA=H(`search`,[[`path`,{d:`m21 21-4.34-4.34`,key:`14j7rj`}],[`circle`,{cx:`11`,cy:`11`,r:`8`,key:`4ej97u`}]]),WA=H(`send`,[[`path`,{d:`M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z`,key:`1ffxy3`}],[`path`,{d:`m21.854 2.147-10.94 10.939`,key:`12cjpa`}]]),GA=H(`settings-2`,[[`path`,{d:`M14 17H5`,key:`gfn3mx`}],[`path`,{d:`M19 7h-9`,key:`6i9tg`}],[`circle`,{cx:`17`,cy:`17`,r:`3`,key:`18b49y`}],[`circle`,{cx:`7`,cy:`7`,r:`3`,key:`dfmy0x`}]]),KA=H(`settings`,[[`path`,{d:`M9.671 4.136a2.34 2.34 0 0 1 4.659 0 2.34 2.34 0 0 0 3.319 1.915 2.34 2.34 0 0 1 2.33 4.033 2.34 2.34 0 0 0 0 3.831 2.34 2.34 0 0 1-2.33 4.033 2.34 2.34 0 0 0-3.319 1.915 2.34 2.34 0 0 1-4.659 0 2.34 2.34 0 0 0-3.32-1.915 2.34 2.34 0 0 1-2.33-4.033 2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915`,key:`1i5ecw`}],[`circle`,{cx:`12`,cy:`12`,r:`3`,key:`1v7zrd`}]]),Yae=H(`share-2`,[[`circle`,{cx:`18`,cy:`5`,r:`3`,key:`gq8acd`}],[`circle`,{cx:`6`,cy:`12`,r:`3`,key:`w7nqdw`}],[`circle`,{cx:`18`,cy:`19`,r:`3`,key:`1xt0gg`}],[`line`,{x1:`8.59`,x2:`15.42`,y1:`13.51`,y2:`17.49`,key:`47mynk`}],[`line`,{x1:`15.41`,x2:`8.59`,y1:`6.51`,y2:`10.49`,key:`1n3mei`}]]),qA=H(`shield-check`,[[`path`,{d:`M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z`,key:`oel41y`}],[`path`,{d:`m9 12 2 2 4-4`,key:`dzmm74`}]]),JA=H(`shield`,[[`path`,{d:`M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z`,key:`oel41y`}]]),YA=H(`ship`,[[`path`,{d:`M12 10.189V14`,key:`1p8cqu`}],[`path`,{d:`M12 2v3`,key:`qbqxhf`}
29],[`path`,{d:`M19 13V7a2 2 0 0 0-2-2H7a2 2 0 0 0-2 2v6`,key:`qpkstq`}],[`path`,{d:`M19.38 20A11.6 11.6 0 0 0 21 14l-8.188-3.639a2 2 0 0 0-1.624 0L3 14a11.6 11.6 0 0 0 2.81 7.76`,key:`7tigtc`}],[`path`,{d:`M2 21c.6.5 1.2 1 2.5 1 2.5 0 2.5-2 5-2 1.3 0 1.9.5 2.5 1s1.2 1 2.5 1c2.5 0 2.5-2 5-2 1.3 0 1.9.5 2.5 1`,key:`1924j5`}]]),XA=H(`shirt`,[[`path`,{d:`M20.38 3.46 16 2a4 4 0 0 1-8 0L3.62 3.46a2 2 0 0 0-1.34 2.23l.58 3.47a1 1 0 0 0 .99.84H6v10c0 1.1.9 2 2 2h8a2 2 0 0 0 2-2V10h2.15a1 1 0 0 0 .99-.84l.58-3.47a2 2 0 0 0-1.34-2.23z`,key:`1wgbhj`}]]),ZA=H(`shopping-bag`,[[`path`,{d:`M16 10a4 4 0 0 1-8 0`,key:`1ltviw`}],[`path`,{d:`M3.103 6.034h17.794`,key:`awc11p`}],[`path`,{d:`M3.4 5.467a2 2 0 0 0-.4 1.2V20a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2V6.667a2 2 0 0 0-.4-1.2l-2-2.667A2 2 0 0 0 17 2H7a2 2 0 0 0-1.6.8z`,key:`o988cm`}]]),QA=H(`sliders-horizontal`,[[`path`,{d:`M10 5H3`,key:`1qgfaw`}],[`path`,{d:`M12 19H3`,key:`yhmn1j`}],[`path`,{d:`M14 3v4`,key:`1sua03`}],[`path`,{d:`M16 17v4`,key:`1q0r14`}],[`path`,{d:`M21 12h-9`,key:`1o4lsq`}],[`path`,{d:`M21 19h-5`,key:`1rlt1p`}],[`path`,{d:`M21 5h-7`,key:`1oszz2`}],[`path`,{d:`M8 10v4`,key:`tgpxqk`}],[`path`,{d:`M8 12H3`,key:`a7s4jb`}]]),$A=H(`smartphone`,[[`rect`,{width:`14`,height:`20`,x:`5`,y:`2`,rx:`2`,ry:`2`,key:`1yt0o3`}],[`path`,{d:`M12 18h.01`,key:`mhygvu`}]]),Xae=H(`sofa`,[[`path`,{d:`M20 9V6a2 2 0 0 0-2-2H6a2 2 0 0 0-2 2v3`,key:`1dgpiv`}],[`path`,{d:`M2 16a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-5a2 2 0 0 0-4 0v1.5a.5.5 0 0 1-.5.5h-11a.5.5 0 0 1-.5-.5V11a2 2 0 0 0-4 0z`,key:`xacw8m`}],[`path`,{d:`M4 18v2`,key:`jwo5n2`}],[`path`,{d:`M20 18v2`,key:`1ar1qi`}],[`path`,{d:`M12 4v9`,key:`oqhhn3`}]]),ej=H(`sparkles`,[[`path`,{d:`M11.017 2.814a1 1 0 0 1 1.966 0l1.051 5.558a2 2 0 0 0 1.594 1.594l5.558 1.051a1 1 0 0 1 0 1.966l-5.558 1.051a2 2 0 0 0-1.594 1.594l-1.051 5.558a1 1 0 0 1-1.966 0l-1.051-5.558a2 2 0 0 0-1.594-1.594l-5.558-1.051a1 1 0 0 1 0-1.966l5.558-1.051a2 2 0 0 0 1.594-1.594z`,key:`1s2grr`}],[`path`,{d:`M20 2v4`,key:`1rf3ol`}],[`path`,{d:`M22 4h-4`,key:`gwowj6`}],[`circle`,{cx:`4`,cy:`20`,r:`2`,key:`6kqj1y`}]]),tj=H(`sprout`,[[`path`,{d:`M14 9.536V7a4 4 0 0 1 4-4h1.5a.5.5 0 0 1 .5.5V5a4 4 0 0 1-4 4 4 4 0 0 0-4 4c0 2 1 3 1 5a5 5 0 0 1-1 3`,key:`139s4v`}],[`path`,{d:`M4 9a5 5 0 0 1 8 4 5 5 0 0 1-8-4`,key:`1dlkgp`}],[`path`,{d:`M5 21h14`,key:`11awu3`}]]),Zae=H(`square-pen`,[[`path`,{d:`M12 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7`,key:`1m0v6g`}],[`path`,{d:`M18.375 2.625a1 1 0 0 1 3 3l-9.013 9.014a2 2 0 0 1-.853.505l-2.873.84a.5.5 0 0 1-.62-.62l.84-2.873a2 2 0 0 1 .506-.852z`,key:`ohrbg2`}]]),nj=H(`star`,[[`path`,{d:`M11.525 2.295a.53.53 0 0 1 .95 0l2.31 4.679a2.123 2.123 0 0 0 1.595 1.16l5.166.756a.53.53 0 0 1 .294.904l-3.736 3.638a2.123 2.123 0 0 0-.611 1.878l.882 5.14a.53.53 0 0 1-.771.56l-4.618-2.428a2.122 2.122 0 0 0-1.973 0L6.396 21.01a.53.53 0 0 1-.77-.56l.881-5.139a2.122 2.122 0 0 0-.611-1.879L2.16 9.795a.53.53 0 0 1 .294-.906l5.165-.755a2.122 2.122 0 0 0 1.597-1.16z`,key:`r04s7s`}]]),Qae=H(`stethoscope`,[[`path`,{d:`M11 2v2`,key:`1539x4`}],[`path`,{d:`M5 2v2`,key:`1yf1q8`}],[`path`,{d:`M5 3H4a2 2 0 0 0-2 2v4a6 6 0 0 0 12 0V5a2 2 0 0 0-2-2h-1`,key:`rb5t3r`}],[`path`,{d:`M8 15a6 6 0 0 0 12 0v-3`,key:`x18d4x`}],[`circle`,{cx:`20`,cy:`10`,r:`2`,key:`ts1r5v`}]]),rj=H(`sun`,[[`circle`,{cx:`12`,cy:`12`,r:`4`,key:`4exip2`}],[`path`,{d:`M12 2v2`,key:`tus03m`}],[`path`,{d:`M12 20v2`,key:`1lh1kg`}],[`path`,{d:`m4.93 4.93 1.41 1.41`,key:`149t6j`}],[`path`,{d:`m17.66 17.66 1.41 1.41`,key:`ptbguv`}],[`path`,{d:`M2 12h2`,key:`1t8f8n`}],[`path`,{d:`M20 12h2`,key:`1q8mjw`}],[`path`,{d:`m6.34 17.66-1.41 1.41`,key:`1m8zz5`}],[`path`,{d:`m19.07 4.93-1.41 1.41`,key:`1shlcs`}]]),ij=H(`tag`,[[`path`,{d:`M12.586 2.586A2 2 0 0 0 11.172 2H4a2 2 0 0 0-2 2v7.172a2 2 0 0 0 .586 1.414l8.704 8.704a2.426 2.426 0 0 0 3.42 0l6.58-6.58a2.426 2.426 0 0 0 0-3.42z`,key:`vktsd0`}],[`circle`,{cx:`7.5`,cy:`7.5`,r:`.5`,fill:`currentColor`,key:`kqv944`}]]),$ae=H(`target`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`circle`,{cx:`12`,cy:`12`,r:`6`,key:`1vlfrh`}],[`circle`,{cx:`12`,cy:`12`,r:`2`,key:`1c9p78`}]]),aj=H(`ticket`,[[`path`,{d:`M2 9a3 3 0 0 1 0 6v2a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-2a3 3 0 0 1 0-6V7a2 2 0 0 0-2-2H4a2 2 0 0 0-2 2Z`,key:`qn84l0`}],[`path`,{d:`M13 5v2`,key:`dyzc3o`}],[`path`,{d:`M13 17v2`,key:`1ont0d`}],[`path`,{d:`M13 11v2`,key:`1wjjxi`}]]),eoe=H(`timer`,[[`line`,{x1:`10`,x2:`14`,y1:`2`,y2:`2`,key:`14vaq8`}],[`line`,{x1:`12`,x2:`15`,y1:`14`,y2:`11`,key:`17fdiu`}],[`circle`,{cx:`12`,cy:`14`,r:`8`,key:`1e1u0o`}]]),oj=H(`trash-2`,[[`path`,{d:`M10 11v6`,key:`nco0om`}],[`path`,{d:`M14 11v6`,key:`outv1u`}],[`path`,{d:`M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6`,key:`miytrc`}],[`path`,{d:`M3 6h18`,key:`d0wm0j`}],[`path`,{d:`M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2`,key:`e791ji`}]]),toe=H(`trending-down`,[[`path`,{d:`M16 17h6v-6`,key:`t6n2it`}],[`path`,{d:`m22 17-8.5-8.5-5 5L2 7`,key:`x473p`}]]),sj=H(`trending-up`,[[`path`,{d:`M16 7h6v6`,key:`box55l`}],[`path`,{d:`m22 7-8.5 8.5-5-5L2 17`,key:`1t1m79`}]]),cj=H(`triangle-alert`,[[`path`,{d:`m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3`,key:`wmoenq`}],[`path`,{d:`M12 9v4`,key:`juzpu7`}],[`path`,{d:`M12 17h.01`,key:`p32p05`}]]),lj=H(`trophy`,[[`path`,{d:`M10 14.66v1.626a2 2 0 0 1-.976 1.696A5 5 0 0 0 7 21.978`,key:`1n3hpd`}],[`path`,{d:`M14 14.66v1.626a2 2 0 0 0 .976 1.696A5 5 0 0 1 17 21.978`,key:`rfe1zi`}],[`path`,{d:`M18 9h1.5a1 1 0 0 0 0-5H18`,key:`7xy6bh`}],[`path`,{d:`M4 22h16`,key:`57wxv0`}],[`path`,{d:`M6 9a6 6 0 0 0 12 0V3a1 1 0 0 0-1-1H7a1 1 0 0 0-1 1z`,key:`1mhfuq`}],[`path`,{d:`M6 9H4.5a1 1 0 0 1 0-5H6`,key:`tex48p`}]]),uj=H(`truck`,[[`path`,{d:`M14 18V6a2 2 0 0 0-2-2H4a2 2 0 0 0-2 2v11a1 1 0 0 0 1 1h2`,key:`wrbu53`}],[`path`,{d:`M15 18H9`,key:`1lyqi6`}],[`path`,{d:`M19 18h2a1 1 0 0 0 1-1v-3.65a1 1 0 0 0-.22-.624l-3.48-4.35A1 1 0 0 0 17.52 8H14`,key:`lysw3i`}],[`circle`,{cx:`17`,cy:`18`,r:`2`,key:`332jqn`}],[`circle`,{cx:`7`,cy:`18`,r:`2`,key:`19iecd`}]]),noe=H(`unlink`,[[`path`,{d:`m18.84 12.25 1.72-1.71h-.02a5.004 5.004 0 0 0-.12-7.07 5.006 5.006 0 0 0-6.95 0l-1.72 1.71`,key:`yqzxt4`}],[`path`,{d:`m5.17 11.75-1.71 1.71a5.004 5.004 0 0 0 .12 7.07 5.006 5.006 0 0 0 6.95 0l1.71-1.71`,key:`4qinb0`}],[`line`,{x1:`8`,x2:`8`,y1:`2`,y2:`5`,key:`1041cp`}],[`line`,{x1:`2`,x2:`5`,y1:`8`,y2:`8`,key:`14m1p5`}],[`line`,{x1:`16`,x2:`16`,y1:`19`,y2:`22`,key:`rzdirn`}],[`line`,{x1:`19`,x2:`22`,y1:`16`,y2:`16`,key:`ox905f`}]]),roe=H(`upload`,[[`path`,{d:`M12 3v12`,key:`1x0j5s`}],[`path`,{d:`m17 8-5-5-5 5`,key:`7q97r8`}],[`path`,{d:`M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4`,key:`ih7n3h`}]]),dj=H(`user`,[[`path`,{d:`M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2`,key:`975kel`}],[`circle`,{cx:`12`,cy:`7`,r:`4`,key:`17ys0d`}]]),fj=H(`watch`,[[`path`,{d:`M12 10v2.2l1.6 1`,key:`n3r21l`}],[`path`,{d:`m16.13 7.66-.81-4.05a2 2 0 0 0-2-1.61h-2.68a2 2 0 0 0-2 1.61l-.78 4.05`,key:`18k57s`}],[`path`,{d:`m7.88 16.36.8 4a2 2 0 0 0 2 1.61h2.72a2 2 0 0 0 2-1.61l.81-4.05`,key:`16ny36`}],[`circle`,{cx:`12`,cy:`12`,r:`6`,key:`1vlfrh`}]]),pj=H(`wrench`,[[`path`,{d:`M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.106-3.105c.32-.322.863-.22.983.218a6 6 0 0 1-8.259 7.057l-7.91 7.91a1 1 0 0 1-2.999-3l7.91-7.91a6 6 0 0 1 7.057-8.259c.438.12.54.662.219.984z`,key:`1ngwbx`}]]),mj=H(`x`,[[`path`,{d:`M18 6 6 18`,key:`1bl5f8`}],[`path`,{d:`m6 6 12 12`,key:`d8bk6v`}]]),hj=H(`zap`,[[`path`,{d:`M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z`,key:`1xq2db`}]]),ioe=H(`zap-off`,[[`path`,{d:`M10.513 4.856 13.12 2.17a.5.5 0 0 1 .86.46l-1.377 4.317`,key:`193nxd`}
29],[`path`,{d:`M15.656 10H20a1 1 0 0 1 .78 1.63l-1.72 1.773`,key:`27a7lr`}],[`path`,{d:`M16.273 16.273 10.88 21.83a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14H4a1 1 0 0 1-.78-1.63l4.507-4.643`,key:`1e0qe9`}],[`path`,{d:`m2 2 20 20`,key:`1ooewy`}]]),aoe={success:(0,V.jsx)(Vk,{className:`h-5 w-5 text-emerald-500`}),error:(0,V.jsx)(Bk,{className:`h-5 w-5 text-rose-500`}),info:(0,V.jsx)(uA,{className:`h-5 w-5 text-blue-500`}),warning:(0,V.jsx)(cj,{className:`h-5 w-5 text-amber-500`})},ooe={success:`border-emerald-300 bg-emerald-50 dark:border-emerald-800 dark:bg-emerald-950`,error:`border-rose-300 bg-rose-50 dark:border-rose-800 dark:bg-rose-950`,info:`border-blue-300 bg-blue-50 dark:border-blue-800 dark:bg-blue-950`,warning:`border-amber-300 bg-amber-50 dark:border-amber-800 dark:bg-amber-950`},soe=({id:e,type:t,message:n,description:r,actionLabel:i,onAction:a,duration:o=5e3,onRemove:s,isPaused:c})=>{let[l,u]=(0,b.useState)(100),[d,f]=(0,b.useState)(()=>window.matchMedia(`(max-width: 639px)`).matches),p=(0,b.useRef)(null),m=(0,b.useRef)(0),h=(0,b.useRef)(o);return(0,b.useEffect)(()=>{let e=window.matchMedia(`(max-width: 639px)`),t=e=>{f(e.matches)};return e.addEventListener(`change`,t),()=>e.removeEventListener(`change`,t)},[]),(0,b.useEffect)(()=>(c?p.current&&=(window.clearInterval(p.current),null):(p.current&&window.clearInterval(p.current),m.current=Date.now(),p.current=window.setInterval(()=>{let t=Date.now(),n=t-m.current;m.current=t;let r=Math.max(0,h.current-n);h.current=r,r<=0?(u(0),s(e),p.current&&=(window.clearInterval(p.current),null)):u(r/o*100)},16)),()=>{p.current&&=(window.clearInterval(p.current),null)}),[c,o,e,s]),(0,V.jsxs)(ik.div,{initial:d?{opacity:0,y:36,scale:.98}:{opacity:0,x:`110%`,scale:1},animate:d?{opacity:1,y:0,scale:1}:{opacity:1,x:0,scale:1},exit:d?{opacity:0,y:20,scale:.98,transition:{duration:.2}}:{opacity:0,x:`110%`,scale:1,transition:{duration:.22}},transition:{duration:.28,ease:`easeOut`},className:`group relative mb-1.5 flex w-full max-w-full overflow-hidden rounded-lg border p-2.5 shadow-md transition-all duration-300 sm:mb-2.5 sm:rounded-xl sm:p-3 ${ooe[t]}`,children:[(0,V.jsxs)(`div`,{className:`flex w-full items-start gap-2 sm:gap-3`,children:[(0,V.jsx)(`div`,{className:`flex h-8 w-8 shrink-0 items-center justify-center rounded-md bg-white/10 dark:bg-black/10 sm:h-9 sm:w-9 sm:rounded-lg`,children:aoe[t]}),(0,V.jsxs)(`div`,{className:`flex min-w-0 flex-1 flex-col pt-0.5`,children:[(0,V.jsx)(`h3`,{className:`break-words text-[0.8rem] font-bold tracking-tight text-foreground sm:text-[0.85rem]`,children:n}),r&&(0,V.jsxs)(`p`,{className:`mt-0.5 break-words text-[0.7rem] leading-relaxed text-muted-foreground/80 sm:mt-1 sm:text-[0.78rem]`,children:[r,i&&a?(0,V.jsxs)(V.Fragment,{children:[` `,(0,V.jsx)(`button`,{type:`button`,onClick:a,className:`inline w-fit cursor-pointer text-left font-bold text-foreground underline underline-offset-2 transition-colors hover:opacity-80`,children:i})]}):null]})]}),(0,V.jsx)(`button`,{onClick:()=>s(e),className:`ml-0.5 rounded-md p-0.5 text-muted-foreground/40 transition-colors hover:bg-black/5 hover:text-foreground dark:hover:bg-white/5 sm:ml-2 sm:rounded-lg sm:p-1`,children:(0,V.jsx)(mj,{className:`h-3.5 w-3.5 sm:h-4 sm:w-4`})})]}),(0,V.jsx)(`div`,{className:`absolute bottom-0 left-0 h-[3px] w-full bg-black/5 dark:bg-white/5`,children:(0,V.jsx)(ik.div,{className:`h-full ${t===`success`?`bg-emerald-500`:t===`error`?`bg-rose-500`:t===`info`?`bg-blue-500`:`bg-amber-500`}`,style:{width:`${l}%`},transition:{type:`tween`,ease:`linear`}})})]})},coe=()=>{let{toasts:e,removeToast:t}=Gx(),[n,r]=(0,b.useState)(!1);return(0,x.createPortal)((0,V.jsx)(`div`,{className:`fixed z-[9999] pointer-events-none 30 left-2 right-2 bottom-2 31 sm:left-auto sm:right-4 sm:top-4 sm:bottom-auto sm:w-[min(92vw,420px)] 32 md:right-6 md:top-6 33 lg:w-[420px]`,children:(0,V.jsx)(`div`,{onMouseEnter:()=>r(!0),onMouseLeave:()=>r(!1),className:`pointer-events-auto flex w-full flex-col gap-1.5 overflow-hidden sm:gap-2 md:gap-3`,children:(0,V.jsx)(zD,{mode:`sync`,children:e.map(e=>
33(0,V.jsx)(soe,{...e,onRemove:t,isPaused:n},e.id))})})}),document.body)};function gj(e){let t=e.data;if(!t||typeof t!=`object`||Array.isArray(t))return null;let n=t,r=n.data;return r&&typeof r==`object`&&!Array.isArray(r)?r:n}function loe(e){let t=e.type;return typeof t==`string`?t:null}function uoe(e){return{new_message:`CONVERSATION_NEW_MESSAGE`,message_status_updated:`MESSAGE_STATUS_UPDATED`,conversation_updated:`CONVERSATION_UPDATED`,messages_marked_read:`MESSAGES_MARKED_READ`}[e]??e}function doe(e){if(typeof e!=`string`)return null;let t=e.toLowerCase().trim();return t===`pending`||t===`sent`||t===`delivered`||t===`failed`?t:null}function foe(e){let t=e.type;if(t!==`MESSAGE_STATUS_UPDATED`&&t!==`message_status_updated`)return null;let n=gj(e);if(!n)return null;let r=n.message_id,i=n.conversation_id,a=doe(n.new_status);return typeof r!=`string`||typeof i!=`string`||!a?null:{messageId:r,conversationId:i,newStatus:a}}function _j(e){let t=typeof e.listings_found==`number`?e.listings_found:typeof e.total_listings_found==`number`?e.total_listings_found:0,n=e.last_checked_at,r=n==null?null:typeof n==`string`?n:String(n),i=e.created_at,a=typeof i==`string`?i:new Date().toISOString(),o=typeof e.hubs_count==`number`?e.hubs_count:null,s=e.notification_interval_minutes,c=typeof s==`number`&&Number.isFinite(s)?s:void 0,l=e.frequency,u=l==null?void 0:String(l);return{id:String(e.id??``),name:String(e.name??``),search_key:e.search_key===null||e.search_key===void 0?null:String(e.search_key),search_type:e.search_type===void 0||e.search_type===null?void 0:String(e.search_type),is_active:!!e.is_active,listings_found:t,last_execution:r,created_at:a,provider:String(e.provider??``),city_name:e.city_name===null||e.city_name===void 0?null:String(e.city_name),country_code:e.country_code===null||e.country_code===void 0?null:String(e.country_code),country_name:e.country_name===null||e.country_name===void 0?null:String(e.country_name),subcategory_name:e.subcategory_name===null||e.subcategory_name===void 0?null:String(e.subcategory_name),notification_interval_minutes:c,frequency:u,hubs_count:o??null}}function vj(e,t){return typeof e==`number`&&Number.isFinite(e)?e:t}function poe(e){if(e!==void 0)return e===null?null:typeof e==`string`?e:void 0}function yj(e,t){let n={...e.metrics};if(`total_searches`in t&&(n.total_searches=vj(t.total_searches,n.total_searches)),`active_searches`in t&&(n.active_searches=vj(t.active_searches,n.active_searches)),`total_listings_found`in t&&(n.total_listings_found=vj(t.total_listings_found,n.total_listings_found)),`new_listings_today`in t&&(n.new_listings_today=vj(t.new_listings_today,n.new_listings_today)),`searches_remaining`in t&&(n.searches_remaining=vj(t.searches_remaining,n.searches_remaining)),`listings_this_week`in t&&(n.listings_this_week=vj(t.listings_this_week,n.listings_this_week??n.total_listings_found)),`listings_same_period_last_week`in t&&(n.listings_same_period_last_week=vj(t.listings_same_period_last_week,n.listings_same_period_last_week??0)),`total_listings_last_week`in t&&(n.total_listings_last_week=vj(t.total_listings_last_week,n.total_listings_last_week??0)),`new_listings_yesterday`
33in t&&(n.new_listings_yesterday=vj(t.new_listings_yesterday,n.new_listings_yesterday??0)),`new_listings_same_day_last_week`in t&&(n.new_listings_same_day_last_week=vj(t.new_listings_same_day_last_week,n.new_listings_same_day_last_week??0)),`last_search_execution`in t){let e=poe(t.last_search_execution);e!==void 0&&(n.last_search_execution=e)}let r=e.subscription,i=t.subscription;if(i&&typeof i==`object`&&!Array.isArray(i)){let e=i;r={plan_name:typeof e.plan_name==`string`?e.plan_name:r?.plan_name??`Plan`,status:typeof e.status==`string`?e.status:r?.status??`active`,price_monthly:typeof e.price_monthly==`number`?e.price_monthly:r?.price_monthly??0,current_period_end:typeof e.current_period_end==`string`?e.current_period_end:e.current_period_end===null?null:r?.current_period_end??null,tiers:Array.isArray(e.tiers)?e.tiers:r?.tiers??[]}}let a=e.recent_searches;if(Array.isArray(t.recent_searches))try{a=t.recent_searches.map(e=>_j(e))}catch{}let o=e.recent_listings;Array.isArray(t.recent_listings)&&(o=t.recent_listings);let s=e.quick_actions,c=t.quick_actions;if(c&&typeof c==`object`&&!Array.isArray(c)){let e=c;s={can_create_search:typeof e.can_create_search==`boolean`?e.can_create_search:s.can_create_search,can_upgrade_subscription:typeof e.can_upgrade_subscription==`boolean`?e.can_upgrade_subscription:s.can_upgrade_subscription,can_view_analytics:typeof e.can_view_analytics==`boolean`?e.can_view_analytics:s.can_view_analytics,max_searches_reached:typeof e.max_searches_reached==`boolean`?e.max_searches_reached:s.max_searches_reached}}else typeof t.max_searches_reached==`boolean`&&(s={...s,max_searches_reached:t.max_searches_reached,can_create_search:!t.max_searches_reached});return{...e,metrics:n,subscription:r,recent_searches:a,recent_listings:o,quick_actions:s}}function moe(e,t){return yj(e,{total_searches:e.metrics.total_searches+t,active_searches:e.metrics.active_searches+t})}function hoe(e){return yj(e,{total_searches:Math.max(0,e.metrics.total_searches-1),active_searches:Math.max(0,e.metrics.active_searches-1)})}function bj(){let e=(0,b.useContext)(xy);if(!e)throw Error(`useSubscriptionAccess must be used within SubscriptionAccessProvider`);return e}var goe=new Set([`SUBSCRIPTION_CREATED`,`SUBSCRIPTION_UPDATED`,`SUBSCRIPTION_CANCELLED`,`SUBSCRIPTION_EXPIRED`,`SUBSCRIPTION_TIER_CHANGED`,`TRIAL_ENDING`]);function _oe(e){return typeof e==`string`&&goe.has(e)}function voe(e){return e instanceof _o?`The dashboard is taking too long to load.`:e instanceof go?`Unable to reach the server. Check your connection.`:e instanceof ho&&e.status>=500?`The dashboard is temporarily unavailable.`:`Something went wrong while loading your dashboard.`}var xj=(0,b.createContext)(null);function yoe({children:e}){let[t,n]=(0,b.useState)(null),[r,i]=(0,b.useState)(!1),[a,o]=(0,b.useState)(null),s=(0,b.useCallback)(async()=>{i(!0),o(null);try{n((await Lo.get(`/api/dashboard/overview`)).data)}catch(e){o(voe(e)),n(null)}finally{i(!1)}},[]),c=(0,b.useCallback)(e=>{n(t=>t&&yj(t,e))},[]),l=(0,b.useCallback)(e=>{n(t=>t&&e(t))},[]),u=(0,b.useMemo)(()=>({overview:t,isLoading:r,error:a,loadOverview:s,patchOverview:c,updateOverview:l,setOverview:n}),[t,r,a,s,c,l]);return(0,V.jsx)(xj.Provider,{value:u,children:e})}function Sj(){let e=(0,b.useContext)(xj);if(!e)throw Error(`useDashboardOverviewState must be used within DashboardOverviewProvider`);return e}var Cj=(0,b.createContext)(null);function boe({children:e}){let{isAuthenticated:t}=Jv(),[n,r]=(0,b.useState)(!1),i=(0,b.useRef)(!1),a=(0,b.useRef)(!1);(0,b.useEffect)(()=>{t||(i.current=!1,a.current=!1)},[t]);let o=(0,b.useCallback)(e=>{if(t){if(i.current=e,e){a.current=!1,r(!1);return}r(a.current)}},[t]),s=(0,b.useCallback)(()=>{!t||i.current||(a.current=!0,r(!0))},[t]),c=(0,b.useMemo)(()=>({showDot:t&&n,notifyChatsActivity:s,setChatsTabActive:o}),[t,n,s,o]);return(0,V.jsx)(Cj.Provider,{value:c,children:e})}function wj(){let e=(0,b.useContext)(Cj);if(!e)throw Error(`useChatsActivityBadge must be used within ChatsActivityBadgeProvider`);return e}var Tj=(0,b.createContext)(null);function xoe({children:e}){let t=(0,b.useRef)(new Set),n=(0,b.useCallback)(e=>(t.current.add(e),()=>{t.current.delete(e)}),[]),r=(0,b.useCallback)(e=>{for(let n of t.current)e(n)},[]),i=(0,b.useMemo)(()=>({register:n,dispatch:r}),[n,r]);return(0,V.jsx)(Tj.Provider,{value:i,children:e})}function Soe(){let e=(0,b.useContext)(Tj);if(!e)throw Error(`useChatsRealtimeDispatch must be used within ChatsRealtimeProvider`);return e.dispatch}function Coe(e){let t=(0,b.useContext)(Tj);if(!t)throw Error(`useChatsRealtime must be used within ChatsRealtimeProvider`);let n=(0,b.useRef)(e);(0,b.useEffect)(()=>{n.current=e}),(0,b.useEffect)(()=>t.register({onNewMessage:e=>n.current.onNewMessage?.(e),onMessageStatusUpdated:e=>n.current.onMessageStatusUpdated?.(e),onConversationUpdated:e=>n.current.onConversationUpdated?.(e),onMessagesMarkedRead:e=>n.current.onMessagesMarkedRead?.(e),onConversationAttentionNeeded:e=>n.current.onConversationAttentionNeeded?.(e),onConversationEnded:e=>n.current.onConversationEnded?.(e)}),[t])}var Ej=(0,b.createContext)(null);function Dj({children:e}){let t=(0,b.useRef)(new Set),n=(0,b.useCallback)(e=>(t.current.add(e),()=>{t.current.delete(e)}),[]),r=(0,b.useCallback)(e=>{for(let n of t.current)e(n)},[]),i=(0,b.useMemo)(()=>({register:n,dispatch:r}),[n,r]);return(0,V.jsx)(Ej.Provider,{value:i,children:e})}function woe(){let e=(0,b.useContext)(Ej);if(!e)throw Error(`useListingsRealtimeDispatch must be used within ListingsRealtimeProvider`);return e.dispatch}function Oj(e){let t=(0,b.useContext)(Ej);if(!t)throw Error(`useListingsRealtime must be used within ListingsRealtimeProvider`);let n=(0,b.useRef)(e);(0,b.useEffect)(()=>{n.current=e}),(0,b.useEffect)(()=>t.register({onListingUpdated:e=>n.current.onListingUpdated?.(e),onListingRemoved:e=>n.current.onListingRemoved?.(e)}),[t])}function Toe(e){if(!e)return null;let t=e.listing;if(!t||typeof t!=`object`||Array.isArray(t))return null;let n=t,r=typeof e.listing_id==`string`?e.listing_id:typeof n.id==`string`?n.id:n.id==null?``:String(n.id);return r?{listingId:r,isPersonalListing:e.is_personal_listing===!0,listing:n}:null}function kj(e){return qo(e)}function Aj(e){return e}function Eoe(e,t){return{...e,...t}}var jj=(0,b.createContext)(null);function Doe({children:e}){let{isAuthenticated:t,status:n}=Jv(),[r,i]=(0,b.useState)(0),a=(0,b.useRef)(new Set),o=(0,b.useCallback)(async()=>
33{if(t)try{let e=await Lo.get(`/api/listings/new-count`);i(Math.max(0,Number(e.data.new_count||0)))}catch{i(0)}},[t]);(0,b.useEffect)(()=>{if(n===`loading`||!t)return;let e=!1;return(async()=>{try{let t=await Lo.get(`/api/listings/new-count`);e||i(Math.max(0,Number(t.data.new_count||0)))}catch{e||i(0)}})(),()=>{e=!0}},[t,n]);let s=t&&n!==`loading`?r:0,c=(0,b.useCallback)(e=>{if(!(e<=0)){i(t=>t+e);for(let t of a.current)t(e)}},[]),l=(0,b.useCallback)(e=>(a.current.add(e),()=>{a.current.delete(e)}),[]),u=(0,b.useMemo)(()=>({count:s,setCount:i,incrementCount:c,refreshCount:o,subscribeNewListing:l}),[s,c,o,l]);return(0,V.jsx)(jj.Provider,{value:u,children:e})}function Mj(){let e=(0,b.useContext)(jj);if(!e)throw Error(`useNewListingsBadge must be used within NewListingsBadgeProvider`);return e}function Ooe(e){let t=gj(e);if(!t)return 1;let n=t.count;if(typeof n==`number`&&n>=1)return n;let r=t.listings;return Array.isArray(r)?Math.max(1,r.length):1}function koe(e){let t=gj(e);if(!t)return null;let n={};for(let e of[`total_listings_found`,`new_listings_today`,`total_searches`,`active_searches`,`searches_remaining`,`listings_this_week`,`listings_same_period_last_week`,`total_listings_last_week`,`new_listings_yesterday`,`new_listings_same_day_last_week`,`last_search_execution`,`recent_listings`,`recent_searches`,`subscription`,`quick_actions`,`max_searches_reached`])e in t&&(n[e]=t[e]);return Object.keys(n).length>0?n:null}function Aoe(e){let t=[],n=e=>{if(Array.isArray(e))for(let n of e)n&&typeof n==`object`&&!Array.isArray(n)&&t.push(n)};n(e.search_updates),n(e.recent_searches);let r=new Set;return t.filter(e=>{let t=String(e.id??``);return!t||r.has(t)?!1:(r.add(t),!0)})}function Nj(e){return e?Aoe(e):[]}function joe(e){return Nj(gj(e))}var Pj=(0,b.createContext)(null);function Moe(e,t){let n=String(t.id??``);if(!n)return null;let r={...e.get(n)??{},...t};return e.set(n,r),r}function Noe({children:e}){let t=(0,b.useRef)(new Set),n=(0,b.useRef)(new Map),r=(0,b.useCallback)(e=>(t.current.add(e),()=>{t.current.delete(e)}),[]),i=(0,b.useCallback)(e=>{for(let n of t.current)e(n)},[]),a=(0,b.useCallback)(e=>{for(let t of e){let e=Moe(n.current,t);e&&i(t=>t.onSearchUpdated?.(e))}},[i]),o=(0,b.useCallback)(()=>Array.from(n.current.values()),[]),s=(0,b.useMemo)(()=>({register:r,dispatch:i,dispatchSearchRows:a,consumePendingSearchRows:o}),[r,i,a,o]);return(0,V.jsx)(Pj.Provider,{value:s,children:e})}function Poe(){let e=(0,b.useContext)(Pj);if(!e)throw Error(`useSearchesRealtimeDispatch must be used within SearchesRealtimeProvider`);return e.dispatch}function Foe(){let e=(0,b.useContext)(Pj);if(!e)throw Error(`useSearchesRealtimeSearchRowsDispatch must be used within SearchesRealtimeProvider`);return e.dispatchSearchRows}function Fj(e){let t=(0,b.useContext)(Pj);if(!t)throw Error(`useSearchesRealtime must be used within SearchesRealtimeProvider`);let n=(0,b.useRef)(e);(0,b.useEffect)(()=>{n.current=e}),(0,b.useEffect)(()=>{let e=t.register({onSearchCreated:e=>n.current.onSearchCreated?.(e),onSearchUpdated:e=>n.current.onSearchUpdated?.(e),onSearchDeleted:e=>n.current.onSearchDeleted?.(e),onSearchStatusChanged:(e,t)=>n.current.onSearchStatusChanged?.(e,t),onRefreshFallback:()=>n.current.onRefreshFallback?.()});for(let e of t.consumePendingSearchRows())n.current.onSearchUpdated?.(e);return e},[t])}function Ij(){let{subscribe:e}=Ux(),{showToast:t}=Gx(),{patchOverview:n,updateOverview:r}=Sj(),{incrementCount:i,refreshCount:a}=Mj(),o=Poe(),s=Foe(),c=Soe(),l=woe(),{notifyChatsActivity:u}=wj(),{refreshSubscription:d}=Sy(),{accessStatus:f,refreshAccessStatus:p,patchAccessStatus:m}=bj();return(0,b.useEffect)(()=>e(e=>{let h=loe(e);if(!h)return;let g=uoe(h),_=gj(e);switch(g){case`SUBSCRIPTION_CREATED`:case`SUBSCRIPTION_UPDATED`:case`SUBSCRIPTION_CANCELLED`:case`SUBSCRIPTION_EXPIRED`:case`SUBSCRIPTION_TIER_CHANGED`:case`TRIAL_ENDING`:_&&n(_),d(),p();break;case`USAGE_UPDATE`:case`USAGE_LIMIT_WARNING`:case`SEARCH_LIMIT_REACHED`:_?(f&&m(_),n(_)):p(),(g===`USAGE_LIMIT_WARNING`||g===`SEARCH_LIMIT_REACHED`)&&t({type:`warning`,message:g===`SEARCH_LIMIT_REACHED`?`Search limit reached`:`Usage limit warning`,description:typeof e.data==`object`&&e.data!==null&&!Array.isArray(e.data)&&typeof e.data.body==`string`?String(e.data.body):void 0});break;case`DASHBOARD_METRICS_UPDATE`:_&&(n(_),s(Nj(_)));break;case`SEARCH_CREATED`:_?(o(e=>e.onSearchCreated?.(_)),r(e=>moe(e,1))):o(e=>e.onRefreshFallback?.());break;case`SEARCH_UPDATED`:_?.id||_?.search_id?s([_]):o(e=>e.onRefreshFallback?.());break;case`SEARCH_DELETED`:{let e=typeof _?.search_id==`string`?_.search_id:typeof _?.id==`
33string`?_.id:null;e?(o(t=>t.onSearchDeleted?.(e)),r(hoe)):o(e=>e.onRefreshFallback?.());break}case`SEARCH_STATUS_CHANGED`:{let e=typeof _?.search_id==`string`?_.search_id:null,t=typeof _?.new_status==`string`?_.new_status:null;o(e&&t?n=>n.onSearchStatusChanged?.(e,t.toLowerCase()===`active`):e=>e.onRefreshFallback?.());break}case`NEW_LISTING`:{i(Ooe(e));let t=koe(e);t&&n(t),s(joe(e));break}case`LISTING_UPDATED`:{_&&n(_);let e=Toe(_);e&&l(t=>t.onListingUpdated?.(e)),a();break}case`LISTING_REMOVED`:{_&&n(_);let e=typeof _?.listing_id==`string`?_.listing_id:null;e&&l(t=>t.onListingRemoved?.(e)),a();break}case`NOTIFICATION_CREATED`:_&&(_.notification_type===`new_listings`||_.type===`new_listings`)&&a();break;case`CONVERSATION_NEW_MESSAGE`:_&&(u(),c(e=>e.onNewMessage?.(_)));break;case`MESSAGE_STATUS_UPDATED`:{let t=foe(e);t&&c(e=>e.onMessageStatusUpdated?.(t));break}case`CONVERSATION_UPDATED`:_&&(u(),c(e=>e.onConversationUpdated?.(_)));break;case`MESSAGES_MARKED_READ`:{let e=typeof _?.conversation_id==`string`?_.conversation_id:null;e&&c(t=>t.onMessagesMarkedRead?.(e));break}case`CONVERSATION_ATTENTION_NEEDED`:if(_){u(),c(e=>e.onConversationAttentionNeeded?.(_));let e=typeof _.listing_title==`string`?_.listing_title:`Conversation`,n=typeof _.reason==`string`?_.reason:typeof _.attention_reason==`string`?_.attention_reason:`AI needs your attention`;t({type:`warning`,message:`${e} needs attention`,description:n,actionLabel:`Open chat`,onAction:()=>{typeof _.conversation_id==`string`&&window.location.assign(`/dashboard/chats/${_.conversation_id}`)}})}break;case`CONVERSATION_ENDED`:if(_){c(e=>e.onConversationEnded?.(_));let e=typeof _.listing_title==`string`?_.listing_title:`Conversation`,n=typeof _.reason==`string`?_.reason:typeof _.end_reason==`string`?_.end_reason:`Negotiation ended`;t({type:`info`,message:`${e} ended`,description:n})}break;case`EXTENSION_LIVELINESS_UPDATED`:break;default:_oe(g)&&(d(),p());break}}),[e,n,r,i,a,o,s,c,l,u,f,m,d,p,t]),null}function Lj(e,t){return e===`ready`||e===`error`&&t===`ready`}function Rj(){let{canChat:e,status:t}=bj(),{status:n}=Sy(),r=Lj(t,n);return{gateReady:r,canAccessChatFeatures:r&&e,shouldHideChatFeatures:r&&!e,accessStatus:t,subscriptionStatus:n}}function zj(e){return e?.length?e.reduce((e,t)=>e+(t.searches_remaining>0?t.searches_remaining:0),0):0}function Bj(e){return zj(e)>0}function Vj(){let{canCreateSearch:e,accessStatus:t,status:n}=bj(),{status:r}=Sy(),i=Lj(n,r),a=Bj(t?.tiers),o=i&&e&&a;return{gateReady:i,canCreateSearch:e,hasSearchQuota:a,canAccessCreateSearchRoutes:o,canActivateSearch:o,accessStatus:n,subscriptionStatus:r}}function Ioe(){let{canEditSearch:e,status:t}=bj(),{status:n}=Sy(),r=Lj(t,n);return{gateReady:r,canEditSearch:e,canAccessEditSearchRoutes:r&&e,accessStatus:t,subscriptionStatus:n}}function Hj(e,t){return`${e}-${t}`}function Uj(e,t){let n=t??[];if(!e?.length&&n.length>0)return n.map(e=>{let t=e.max_searches??e.limit??0,n=e.searches_used??e.usage??0;return{label:e.name??``,intervalMinutes:e.notification_interval_minutes,limit:t,usage:n}});let r=new Map;for(let e of n){let t=e.notification_interval_minutes??0,n=e.max_searches??e.limit??0;r.set(Hj(t,n),e)}return[...e??[]].sort((e,t)=>e.tier_order-t.tier_order).map((e,t)=>{let i=r.get(Hj(e.notification_interval_minutes,e.max_searches))??n[t],a=e.max_searches,o=i?.searches_used??i?.usage??0;return{label:i?.name??``,intervalMinutes:e.notification_interval_minutes,limit:a,usage:o}})}var Wj=`instasnag-theme`,Gj=(0,b.createContext)(null);function Kj(){return window.matchMedia(`(prefers-color-scheme: dark)`).matches?`dark`:`light`}function Loe(e){return e===`system`?Kj():e}function Roe({children:e}){let[t,n]=(0,b.useState)(()=>{try{let e=localStorage.getItem(Wj);if(e===`light`||e===`dark`||e===`system`)return e}catch{}return`system`}),[r,i]=(0,b.useState)(()=>typeof window<`u`?Kj():`light`),a=Loe(t===`system`?r:t);(0,b.useEffect)(()=>{document.documentElement.classList.toggle(`dark`,a===`dark`)},[a]),(0,b.useEffect)(()=>{if(t!==`system`)return;let e=window.matchMedia(`(prefers-color-scheme: dark)`),n=e=>{i(e.matches?`dark`:`light`)};return e.addEventListener(`change`,n),()=>e.removeEventListener(`change`,n)},[t]),(0,b.useEffect)(()=>{let e=e=>{e.key===`instasnag-theme`&&e.newValue&&n(e.newValue)};return window.addEventListener(`storage`,e),()=>window.removeEventListener(`storage`,e)},[]);let o=(0,b.useCallback)(e=>{n(e);try{localStorage.setItem(Wj,e)}catch{}},[]),s=(0,b.useMemo)(()=>({theme:t,resolvedTheme:a,setTheme:o}),[t,a,o]);return(0,V.jsx)(Gj.Provider,{value:s,children:e})}function qj(){let e=(0,b.useContext)(Gj);if(!e)throw Error(`useTheme must be used within ThemeProvider`);return e}function zoe({children:e}){return(0,V.jsx)(qa,{children:(0,V.jsx)(cy,{children:(0,V.jsx)(Ote,{children:(0,V.jsx)(by,{children:(0,V.jsx)(Nx,{children:(0,V.jsx)(Hx,{children:(0,V.jsx)(yoe,{children:(0,V.jsx)(Doe,{children:(0,V.jsx)(Noe,{children:(0,V.jsx)(boe,{children:(0,V.jsx)(xoe,{children:(0,V.jsx)(Dj,{children:(0,V.jsx)(Roe,{children:(0,V.jsxs)(Kx,{children:[(0,V.jsx)(Ij,{}),e,(0,V.jsx)(coe,{})]})})})})})})})})})})})})})})}var Jj=`instasnag_distance_unit`,Yj=1.609344,Xj=1e3,Zj=1e6;function Qj(){try{let e=localStorage.getItem(Jj);if(e===`km`||e===`mi`)return e}catch{}return`km`}function Boe(e){try{localStorage.setItem(Jj,e)}catch{}}function $j(e){return e/Yj}function Voe(e){return e*Yj}function eM(e,t){return t===`mi`?$j(e):e}function tM(e,t){return t===`mi`?Voe(e):e}function nM(e,t){if(e==null||!Number.isFinite(Number(e)))return null;let n=Math.round(t===`mi`?$j(Number(e)):Number(e)),r=t===`mi`?`mi`:`km`;
33return`${n.toLocaleString()} ${r}`}function rM(e,t){return nM(e,t)}function iM(e,t){return nM(e,t)}function Hoe(e){return e===`mi`?`${Math.round($j(Xj)).toLocaleString()} mi`:`${Xj.toLocaleString()} km`}function Uoe(e){return e===`mi`?`${Math.round($j(Zj)).toLocaleString()} mi`:`${Zj.toLocaleString()} km`}var aM=(0,b.createContext)(null);function Woe({children:e}){let[t,n]=(0,b.useState)(Qj),r=(0,b.useCallback)(e=>{n(e),Boe(e)},[]),i=(0,b.useMemo)(()=>({unit:t,setUnit:r}),[t,r]);return(0,V.jsx)(aM.Provider,{value:i,children:e})}function oM(){let e=(0,b.useContext)(aM);if(!e)throw Error(`useDistanceUnit must be used within DistanceUnitProvider`);return e}var sM=(0,b.createContext)(null);function Goe({children:e}){let t=(0,b.useRef)(null),n=(0,b.useMemo)(()=>({getSnapshot(e){let n=t.current;return!n||n.queryKey!==e||n.listings.length===0?null:n},commitSnapshot(e){t.current=e}}),[]);return(0,V.jsx)(sM.Provider,{value:n,children:e})}function Koe(){let e=(0,b.useContext)(sM);if(!e)throw Error(`useFeedSessionCache must be used under FeedSessionCacheProvider`);return e}function qoe({children:e}){let t=or(),{status:n,isAuthenticated:r}=Jv();return(0,b.useEffect)(()=>{n!==`loading`&&(r||t(`/auth/login`,{replace:!0}))},[r,t,n]),n===`loading`||!r?null:e}var cM=`instasnag-settings-return-to`;function lM(e){return e.startsWith(`/dashboard/settings`)}function uM(e,t=``,n=``){return`${e}${t}${n}`}function dM(){if(typeof sessionStorage>`u`)return`/dashboard`;try{let e=sessionStorage.getItem(cM);return!e||lM(e.split(`?`)[0]?.split(`#`)[0]??e)?`/dashboard`:e}catch{return`/dashboard`}}function fM(e){if(!(typeof sessionStorage>`u`)&&!lM(e.split(`?`)[0]?.split(`#`)[0]??e))try{sessionStorage.setItem(cM,e)}catch{}}function pM(e){let t=e?.settingsReturnTo?.trim();return t&&!lM(t.split(`?`)[0]?.split(`#`)[0]??t)?t:dM()}function mM(e){return{settingsReturnTo:e}}function hM(){let e=nr();return(0,b.useEffect)(()=>{lM(e.pathname)||fM(uM(e.pathname,e.search,e.hash))},[e.hash,e.pathname,e.search]),null}function gM(){return(0,V.jsx)(qoe,{children:(0,V.jsx)(Goe,{children:(0,V.jsxs)(Woe,{children:[(0,V.jsx)(hM,{}),(0,V.jsx)(Gr,{})]})})})}var _M=(0,b.createContext)(null);function vM(e){return(e??``).toLowerCase().trim()===`active`}function yM(e,t){let n=(e??``).toLowerCase().trim();return t(n===`paused`?`settingsExtension.composerPaused`:n===`inactive`?`settingsExtension.composerOffline`:`settingsExtension.composerRequired`)}function bM(e,t){switch((e??``).toLowerCase().trim()){case`active`:return{label:t(`settingsExtension.statusActive`),icon:Vk,className:`border-success/20 bg-success/5 text-success hover:bg-success/10`};case`inactive`:return{label:t(`settingsExtension.statusOffline`),icon:yae,className:`border-error/20 bg-error/5 text-error hover:bg-error/10`};case`paused`:return{label:t(`settingsExtension.statusPaused`),icon:vae,className:`border-warning/20 bg-warning/5 text-warning hover:bg-warning/10`};default:return{label:t(`settingsExtension.statusUnknown`),icon:Hk,className:`border-border/60 bg-surface-elevated/80 text-muted-foreground hover:bg-surface-hover`}}}function xM(e){if(e.type!==`EXTENSION_LIVELINESS_UPDATED`)return;let t=e.data;if(!t||typeof t!=`object`||Array.isArray(t))return null;let n=t.data;if(n&&typeof n==`object`&&!Array.isArray(n)){let e=n.extension_status;if(typeof e==`string`)return e;if(e===null)return null}let r=t.extension_status;return typeof r==`string`?r:null}function SM(e){if(e.type!==`EXTENSION_LIVELINESS_UPDATED`)return;let t=e.data;if(!t||typeof t!=`object`||Array.isArray(t))return null;let n=t.data;if(n&&typeof n==`object`&&!Array.isArray(n)){let e=n.extension_last_heartbeat_at;if(typeof e==`string`)return e;if(e===null)return null}let r=t.extension_last_heartbeat_at;return typeof r==`string`?r:null}function CM(){let e=my(),{user:t,isAuthenticated:n,status:r}=Jv(),{subscribe:i}=Ux(),a=t?.id??null,o=(0,b.useRef)(a),[s,c]=(0,b.useState)(null),[l,u]=(0,b.useState)(null),[d,f]=(0,b.useState)(!1),p=s??t?.extension_status??null,m=l??t?.extension_last_heartbeat_at??null,h=(0,b.useCallback)(async()=>{if(n){f(!0);try{let e=await Gv.getCurrentUser();c(e.extension_status??null),u(e.extension_last_heartbeat_at??null)}catch{}finally{f(!1)}}},[n]);(0,b.useEffect)(()=>
33{if(o.current===a)return;o.current=a;let e=!1;return queueMicrotask(()=>{e||(c(null),u(null))}),()=>{e=!0}},[a]),(0,b.useEffect)(()=>{if(r===`loading`||!n)return;let e=!1;return queueMicrotask(()=>{e||h()}),()=>{e=!0}},[r,n,h]),(0,b.useEffect)(()=>i(e=>{let t=xM(e);t!==void 0&&c(t);let n=SM(e);n!==void 0&&u(n)}),[i]);let g=vM(p);return{status:p,lastHeartbeatAt:m,isRefreshing:d,refresh:h,presentation:bM(p,e),isActive:g,isOffline:!g}}function wM({children:e}){let t=CM();return(0,V.jsx)(_M.Provider,{value:t,children:e})}var TM=`/assets/instasnag-logo-light-Djp2y8CQ.webp`,EM=`/assets/instasnag-logo-dark-CywEVzOT.webp`;function DM({to:e=`/`,linkClassName:t=`flex cursor-pointer items-center`,imgClassName:n=`h-8 w-auto`,fetchPriority:r=`auto`}){return(0,V.jsxs)(Bi,{to:e,className:t,children:[(0,V.jsx)(`img`,{src:TM,alt:`InstaSnag`,className:`${n} dark:hidden`,decoding:`async`,fetchPriority:r}),(0,V.jsx)(`img`,{src:EM,alt:`InstaSnag`,className:`${n} hidden dark:block`,decoding:`async`,fetchPriority:r})]})}function OM(){let e=(0,b.useContext)(_M);if(!e)throw Error(`useExtensionStatus must be used within ExtensionStatusProvider`);return e}function kM(){let{isOffline:e}=OM(),{canChat:t,status:n}=bj(),{status:r}=Sy();return Lj(n,r)&&t&&e}function AM({className:e=``}){return(0,V.jsx)(`span`,{className:`inline-flex h-1.5 w-1.5 shrink-0 rounded-full bg-error/90 shadow-sm ${e}`,"aria-hidden":!0})}function jM(e){if(typeof e==`number`)return Number.isFinite(e)?e:0;let t=e.replace(/[^\d.-]/g,``),n=Number.parseFloat(t);return Number.isFinite(n)?n:0}function MM(e){return Math.min(1,Math.max(.3,e*.018))}function NM(e){return 1-(1-e)**3}function PM({value:e,className:t=``,duration:n}){let r=ak(),i=jM(e),[a,o]=(0,b.useState)(0),s=(0,b.useRef)(0),c=(0,b.useRef)(null);if((0,b.useEffect)(()=>{if(r!==!1)return;c.current!==null&&(cancelAnimationFrame(c.current),c.current=null);let e=s.current;if(e===i)return;let t=(n??MM(Math.abs(i-e)))*1e3,a=performance.now(),l=n=>{let r=Math.min(1,(n-a)/t),u=Math.round(e+(i-e)*NM(r));s.current=u,o(u),r<1?c.current=requestAnimationFrame(l):(s.current=i,o(i),c.current=null)};return c.current=requestAnimationFrame(l),()=>{c.current!==null&&(cancelAnimationFrame(c.current),c.current=null)}},[i,r,n]),r){let e=i.toLocaleString();return(0,V.jsx)(`span`,{className:t,"aria-label":e,children:e})}let l=a.toLocaleString();return(0,V.jsx)(`span`,{className:t,"aria-label":l,children:l})}var FM=280;function Joe(e){if(!(e instanceof Element))return!1;try{return e.matches(`:focus-visible`)}catch{return!1}}function IM({label:e,children:t,align:n=`center`}){let r=(0,b.useId)(),[i,a]=(0,b.useState)(!1),[o,s]=(0,b.useState)(!1),c=(0,b.useRef)(null);(0,b.useEffect)(()=>{let e=window.matchMedia(`(hover: hover) and (pointer: fine)`),t=()=>s(e.matches);return t(),e.addEventListener(`change`,t),()=>e.removeEventListener(`change`,t)},[]);let l=()=>{c.current&&=(clearTimeout(c.current),null)},u=()=>{l(),c.current=window.setTimeout(()=>a(!0),FM)},d=()=>{l(),a(!1)};if(!(0,b.isValidElement)(t))return t;let f=(0,V.jsx)(`span`,{className:`inline-flex`,"aria-describedby":i?r:void 0,onMouseEnter:()=>{o&&u()},onMouseLeave:()=>{o&&d()},onFocusCapture:e=>{Joe(e.target)&&u()},onBlurCapture:e=>{let t=e.relatedTarget;t instanceof Node&&e.currentTarget.contains(t)||d()},children:t}),p=n===`end`?`right-0 left-auto translate-x-0`:`left-1/2 -translate-x-1/2`;return(0,V.jsxs)(`span`,{className:`relative inline-flex items-center`,children:[f,(0,V.jsx)(zD,{children:i&&(0,V.jsx)(ik.span,{id:r,role:`tooltip`,"aria-live":`polite`,initial:{opacity:0,y:6,scale:.97},animate:{opacity:1,y:0,scale:1},exit:{opacity:0,y:4,scale:.98},transition:{type:`spring`,stiffness:420,damping:28},className:`pointer-events-none absolute top-full z-[70] mt-1.5 w-max max-w-[min(18rem,calc(100vw-1.25rem))] rounded-lg border border-border bg-surface-elevated px-2.5 py-1.5 text-left text-[11px] font-medium leading-snug text-foreground shadow-lg shadow-black/10 sm:mt-2 sm:px-3 sm:py-2 sm:text-xs dark:shadow-black/40 ${p}`,children:e})})]})}var Yoe=[{value:`en`,labelKey:`language.english`,short:`EN`},{value:`fr`,labelKey:`language.french`,short:`FR`},{value:`system`,labelKey:`language.system`}];function LM({menuAlign:e=`end`,menuPlacement:t=`bottom`,tooltipAlign:n=`end`}){let r=my(),{preference:i,locale:a,setPreference:o}=py(),[s,c]=(0,b.useState)(!1),l=(0,b.useRef)(null),u=(0,b.useId)(),d=(0,b.useId)(),f=a===`fr`?`FR`:`EN`,p=r(`language.switch`),m=(0,b.useCallback)(()=>c(!1),[]);(0,b.useEffect)(()=>
33{if(!s)return;let e=e=>{let t=e.target;l.current&&!l.current.contains(t)&&m()},t=e=>{e.key===`Escape`&&m()};return document.addEventListener(`mousedown`,e),document.addEventListener(`keydown`,t),()=>{document.removeEventListener(`mousedown`,e),document.removeEventListener(`keydown`,t)}},[s,m]);let h=e=>{o(e),m()};return(0,V.jsxs)(`div`,{ref:l,className:`relative shrink-0`,children:[(0,V.jsx)(IM,{label:p,align:n,children:(0,V.jsxs)(`button`,{id:d,type:`button`,"aria-haspopup":`menu`,"aria-expanded":s,"aria-controls":u,"aria-label":p,onClick:()=>c(e=>!e),className:`group relative flex h-10 shrink-0 cursor-pointer touch-manipulation items-center justify-center gap-1 overflow-hidden rounded-full border border-border/50 bg-surface/50 px-2.5 shadow-sm backdrop-blur-md transition-all duration-300 ease-[cubic-bezier(0.16,1,0.3,1)] hover:bg-surface-elevated hover:shadow-primary/20 focus:outline-none focus-visible:ring-2 focus-visible:ring-primary focus-visible:ring-offset-2 active:scale-95 sm:gap-1.5 sm:px-3`,children:[(0,V.jsx)(aA,{size:16,strokeWidth:2,className:`text-muted-foreground transition-colors group-hover:text-foreground`,"aria-hidden":!0}),(0,V.jsx)(`span`,{className:`text-xs font-bold tracking-wide text-foreground`,children:f}),(0,V.jsx)(Ik,{size:14,strokeWidth:2.5,className:`text-muted-foreground transition-transform duration-200 ${s?`rotate-180`:``}`,"aria-hidden":!0})]})}),s?(0,V.jsxs)(`div`,{id:u,role:`menu`,"aria-labelledby":d,className:`absolute z-[80] min-w-[11.5rem] overflow-hidden rounded-xl border border-border/70 bg-surface p-1.5 shadow-xl shadow-black/10 dark:shadow-black/40 ${t===`top`?`bottom-[calc(100%+0.5rem)]`:`top-[calc(100%+0.5rem)]`} ${e===`end`?`right-0`:`left-0`}`,children:[(0,V.jsx)(`p`,{className:`px-2.5 pb-1.5 pt-1 text-[10px] font-black uppercase tracking-wider text-muted-foreground`,children:r(`language.title`)}),Yoe.map(e=>{let t=i===e.value;return(0,V.jsxs)(`button`,{type:`button`,role:`menuitemradio`,"aria-checked":t,onClick:()=>h(e.value),className:`flex w-full items-center justify-between gap-3 rounded-lg px-2.5 py-2 text-left text-sm font-semibold transition-colors ${t?`bg-primary/10 text-primary`:`text-foreground hover:bg-surface-elevated`}`,children:[(0,V.jsxs)(`span`,{className:`flex min-w-0 items-center gap-2`,children:[e.short?(0,V.jsx)(`span`,{className:`w-6 shrink-0 text-[10px] font-black tracking-wide text-muted-foreground`,children:e.short}):(0,V.jsx)(`span`,{className:`w-6 shrink-0`,"aria-hidden":!0}),(0,V.jsx)(`span`,{className:`truncate`,children:r(e.labelKey)})]}),t?(0,V.jsx)(Fk,{size:14,strokeWidth:3,className:`shrink-0 text-primary`,"aria-hidden":!0}):null]},e.value)})]}):null]})}function RM({onAfterChange:e,variant:t=`menu`}){let n=my(),{resolvedTheme:r,setTheme:i}=qj(),a=r===`dark`,o=a?`light`:`dark`,s=n(a?`theme.lightMode`:`theme.darkMode`),c=()=>{i(o),e?.()},l=t===`drawer`?`flex w-full items-center gap-3 rounded-xl px-3 py-3 text-[13px] font-bold text-foreground transition-all hover:bg-surface-elevated hover:translate-x-1`:`flex w-full items-center gap-3 rounded-lg px-3 py-2 text-sm font-medium text-foreground transition-colors hover:bg-primary/10 hover:text-primary`,u=t===`drawer`?18:16;return(0,V.jsxs)(`button`,{type:`button`,onClick:c,className:l,"aria-label":n(a?`theme.switchToLight`:`theme.switchToDark`),children:[a?(0,V.jsx)(rj,{size:u,className:t===`drawer`?`text-muted-foreground`:void 0}):(0,V.jsx)(kA,{size:u,className:t===`drawer`?`text-muted-foreground`:void 0}),s]})}function Xoe({tooltipAlign:e=`center`}){let t=my(),{resolvedTheme:n,setTheme:r}=qj(),i=n===`dark`,a=()=>r(i?`light`:`dark`),o=t(i?`theme.switchToLight`:`theme.switchToDark`);return(0,V.jsx)(IM,{label:o,align:e,children:(0,V.jsxs)(`button`,{type:`button`,role:`switch`,"aria-checked":i,onClick:a,"aria-label":o,className:`group relative flex h-10 w-10 shrink-0 cursor-pointer touch-manipulation items-center justify-center overflow-hidden rounded-full border border-border/50 bg-surface/50 p-0 shadow-sm backdrop-blur-md transition-all duration-500 ease-[cubic-bezier(0.16,1,0.3,1)] hover:bg-surface-elevated hover:shadow-
33primary/20 focus:outline-none focus-visible:ring-2 focus-visible:ring-primary focus-visible:ring-offset-2 active:scale-95`,children:[(0,V.jsx)(`div`,{className:`absolute inset-0 rounded-full opacity-0 transition-opacity duration-500 group-hover:opacity-100 ${i?`bg-blue-500/10`:`bg-amber-500/10`}`}),(0,V.jsx)(rj,{size:18,strokeWidth:2,className:`absolute text-amber-500 transition-all duration-500 ease-[cubic-bezier(0.16,1,0.3,1)] md:h-5 md:w-5 ${i?`-rotate-90 scale-50 opacity-0`:`rotate-0 scale-100 opacity-100 drop-shadow-[0_0_8px_rgba(245,158,11,0.6)]`}`}),(0,V.jsx)(kA,{size:18,strokeWidth:2,className:`absolute text-blue-400 transition-all duration-500 ease-[cubic-bezier(0.16,1,0.3,1)] md:h-5 md:w-5 ${i?`rotate-0 scale-100 opacity-100 drop-shadow-[0_0_8px_rgba(96,165,250,0.8)]`:`rotate-90 scale-50 opacity-0`}`})]})})}function zM({label:e,value:t,onChange:n,onBlur:r,error:i,invalid:a,placeholder:o,required:s,maxLength:c,showCount:l,variant:u=`default`,corners:d=`default`,suppressFocusRing:f=!1,prefix:p,inputMode:m,pattern:h}){let g=d===`subtle`?u===`compact`?`rounded-lg`:`rounded-xl`:`rounded-2xl`,_=f?`outline-none focus:outline-none focus-visible:outline-none focus-visible:ring-0 focus-visible:ring-offset-0`:``,v=!!i||!!a;return(0,V.jsxs)(`div`,{className:`space-y-2`,children:[e&&(0,V.jsxs)(`label`,{className:`ml-1 text-[11px] font-black uppercase tracking-widest text-muted-foreground/60`,children:[e,` `,s&&(0,V.jsx)(`span`,{className:`text-error`,children:`*`})]}),(0,V.jsxs)(`div`,{className:`relative`,children:[p?(0,V.jsx)(`span`,{className:`pointer-events-none absolute left-4 top-1/2 z-[1] -translate-y-1/2 text-xs font-bold text-muted-foreground sm:left-5`,children:p}):null,(0,V.jsx)(`input`,{value:t,onChange:e=>n(e.target.value),onBlur:r,placeholder:o,maxLength:c,inputMode:m,pattern:h,"aria-invalid":v?!0:void 0,className:`w-full border-2 bg-surface-elevated transition-colors ${g} ${u===`compact`?p?`py-2 pl-7 pr-3 text-xs sm:py-2.5 sm:pl-8 sm:pr-4 sm:text-sm`:`py-2 px-3 text-xs sm:py-2.5 sm:px-4 sm:text-sm`:p?`py-3 pl-9 pr-4 text-sm sm:py-4 sm:pl-10 sm:pr-6 sm:text-base font-medium`:`py-3 px-4 text-sm sm:py-4 sm:px-6 sm:text-base font-medium`} ${v?`border-error/40 bg-error/5 focus:border-error`:`border-border/60 hover:border-primary/40 focus:border-primary`} ${_}`}),l&&c?(0,V.jsxs)(`span`,{className:`pointer-events-none absolute right-4 top-1/2 -translate-y-1/2 text-[9px] font-black uppercase tracking-widest text-muted-foreground/50 dark:text-muted-foreground/75 sm:right-6 sm:text-[10px]`,children:[t.length,`/`,c]}):null]}),i?(0,V.jsxs)(`p`,{className:`ml-1 mt-1 flex items-center gap-1.5 text-[11px] font-bold text-error`,children:[(0,V.jsx)(Bk,{size:12}),i]}):null]})}var BM=[{labelKey:`nav.home`,to:`/dashboard`,icon:mA,product:`scraper`},{labelKey:`nav.searches`,to:`/dashboard/searches`,icon:HA,product:`scraper`},{labelKey:`nav.feed`,to:`/dashboard/feed`,icon:Iae,product:`scraper`},{labelKey:`nav.myListings`,to:`/dashboard/personal`,icon:ZA,product:`seller`},{labelKey:`nav.chats`,to:`/dashboard/chats`,icon:wA,product:`ai`}];function VM(e,t){switch(t){case`scraper`:return e.ownsScraper;case`seller`:return e.ownsSellerProducts;case`ai`:return e.ownsAi}}function HM(e){return BM.find(t=>VM(e,t.product))?.to??null}function Zoe(e,t=!0){return t?BM.filter(t=>VM(e,t.product)):BM}function UM({variant:e=`header`,count:t=5}){return e===`drawer`?(0,V.jsx)(V.Fragment,{children:Array.from({length:t}).map((e,t)=>(0,V.jsxs)(`div`,{className:`flex items-center gap-3 rounded-xl px-3 py-3`,"aria-hidden":!0,children:[(0,V.jsx)(`div`,{className:`h-[18px] w-[18px] shrink-0 animate-pulse rounded-md bg-border/80 dark:bg-surface-elevated`}),(0,V.jsx)(`div`,{className:`h-4 w-24 animate-pulse rounded-full bg-border/80 dark:bg-surface-elevated`})]},`drawer-nav-skeleton-${t}`))}):(0,V.jsx)(V.Fragment,{children:Array.from({length:t}).map((e,t)=>(0,V.jsxs)(`div`,{className:`flex min-w-14 items-center justify-center rounded-lg px-4 py-2.5 lg:min-w-0 lg:justify-start lg:gap-2 lg:px-3 lg:py-2`,"aria-hidden":!0,children:[(0,V.jsx)(`div`,{className:`h-5 w-5 animate-pulse rounded-md bg-border/80 dark:bg-surface-elevated lg:h-[18px] lg:w-[18px]`}),(0,V.jsx)(`div`,{className:`hidden h-4 w-16 animate-pulse rounded-full bg-border/80 dark:bg-surface-elevated lg:block`})]},`header-nav-skeleton-${t}`))})}function Qoe(){let e=my(),[t,n]=(0,b.useState)(!1),[r,i]=(0,b.useState)(!1),{count:a,setCount:o,refreshCount:s}=Mj(),{showDot:c,setChatsTabActive:l}=wj(),u=(0,b.useRef)(null),d=nr(),{status:f,isAuthenticated:p,user:m,logout:h}=Jv(),g=kM(),{gateReady:_}=Rj(),{ownership:v}=bj(),y=f===`loading`||p&&!_,x=Zoe(v,_),S=uM(d.pathname,d.search,d.hash),C=(0,b.useCallback)(()=>n(!1),[]);return(0,b.useEffect)(()=>{let e=e=>{u.current&&!u.current.contains(e.target)&&i(!1)};return r&&document.addEventListener(`mousedown`,e),()=>document.removeEventListener(`mousedown`,e)},[r]),(0,b.useEffect)(()=>{let e=window.setTimeout(()=>{C()},0);return()=>window.clearTimeout(e)},[d.pathname,C]),(0,b.useEffect)(()=>
33{f===`loading`||!p||s()},[p,f,d.pathname,s]),(0,b.useEffect)(()=>{if(f===`loading`||!p||!d.pathname.startsWith(`/dashboard/feed`))return;let e=!1;return(async()=>{try{await Lo.post(`/api/listings/mark-screen-seen`),e||o(0)}catch{}})(),()=>{e=!0}},[p,f,d.pathname,o]),(0,b.useEffect)(()=>{f===`loading`||!p||l(d.pathname.startsWith(`/dashboard/chats`))},[p,f,d.pathname,l]),(0,V.jsxs)(V.Fragment,{children:[(0,V.jsx)(`header`,{className:`sticky top-0 z-[70] w-full border-b border-border/50 bg-surface/80 backdrop-blur-xl transition-all duration-300`,children:(0,V.jsxs)(`div`,{className:`mx-auto flex h-16 max-w-7xl items-center justify-between px-4 sm:px-6 lg:px-8`,children:[(0,V.jsx)(`div`,{className:`flex items-center`,children:(0,V.jsx)(DM,{to:`/dashboard`,linkClassName:`flex shrink-0 cursor-pointer items-center group`,imgClassName:`h-8 w-auto sm:h-9 transition-transform duration-300`,fetchPriority:`high`})}),(0,V.jsxs)(`div`,{className:`hidden items-center gap-4 sm:flex`,children:[(0,V.jsx)(`nav`,{className:`flex items-center gap-1`,"aria-label":e(`nav.dashboardAria`),"aria-busy":y,children:y?(0,V.jsx)(UM,{count:BM.length}):x.map(t=>(0,V.jsx)(Bi,{to:t.to,end:t.to===`/dashboard`,className:({isActive:e})=>`relative flex min-w-14 items-center justify-center gap-0 rounded-lg px-4 py-2.5 text-sm font-medium transition-all duration-200 group lg:min-w-0 lg:justify-start lg:gap-2 lg:px-3 lg:py-2 ${e?`text-primary bg-primary/5`:`text-muted-foreground hover:text-foreground hover:bg-surface-elevated`}`,children:({isActive:n})=>(0,V.jsxs)(V.Fragment,{children:[(0,V.jsx)(t.icon,{className:`transition-colors duration-200 ${n?`text-primary`:`text-muted-foreground group-hover:text-foreground`} h-5 w-5 lg:h-[18px] lg:w-[18px]`}),(t.to===`/dashboard/feed`&&a>0||t.to===`/dashboard/chats`&&c)&&(0,V.jsx)(`span`,{className:`absolute right-0.5 top-1 inline-flex h-1.5 w-1.5 rounded-full bg-error/90 shadow-sm lg:right-0 lg:top-1.5`}),(0,V.jsx)(`span`,{className:`hidden lg:inline`,children:e(t.labelKey)}),n&&(0,V.jsx)(ik.div,{layoutId:`nav-active`,className:`absolute bottom-0 left-0 right-0 h-0.5 bg-primary`,transition:{type:`spring`,stiffness:380,damping:30}})]})},t.to))}),(0,V.jsx)(`div`,{className:`h-6 w-px bg-border/60`}),f===`loading`||p&&!_?(0,V.jsx)(`div`,{className:`h-10 w-10 animate-pulse rounded-full bg-border/80 dark:bg-surface-elevated lg:h-10 lg:w-32 lg:rounded-full`}):null,p&&_&&(0,V.jsxs)(`div`,{className:`relative`,ref:u,children:[(0,V.jsxs)(`button`,{type:`button`,onClick:()=>i(!r),className:`relative flex items-center gap-0 rounded-full border border-border/50 bg-surface/50 p-1 transition-all hover:bg-surface-elevated hover:shadow-md group lg:gap-2 lg:pr-3`,children:[(0,V.jsx)(`div`,{className:`flex h-8 w-8 items-center justify-center rounded-full bg-primary/10 text-primary transition-colors group-hover:bg-primary/20`,children:(0,V.jsx)(dj,{size:18})}),(0,V.jsx)(`span`,{className:`hidden text-sm font-semibold text-foreground lg:inline`,children:m?.username||e(`common.account`)}),(0,V.jsx)(Ik,{size:14,className:`hidden text-muted-foreground transition-transform duration-200 lg:block ${r?`rotate-180`:``}`}),g?(0,V.jsx)(AM,{className:`absolute right-0 top-0 ring-2 ring-surface`}):null]}),(0,V.jsx)(zD,{children:r&&(0,V.jsxs)(ik.div,{initial:{opacity:0,y:10,scale:.95},animate:{opacity:1,y:0,scale:1},exit:{opacity:0,y:10,scale:.95},transition:{duration:.15,ease:`easeOut`},className:`absolute right-0 mt-2 w-56 origin-top-right overflow-hidden rounded-xl border border-border/50 bg-surface shadow-xl`,children:[(0,V.jsxs)(`div`,{className:`border-b border-border/50 p-4`,children:[(0,V.jsx)(`p`,{className:`text-sm font-bold text-foreground`,children:m?.username}),(0,V.jsx)(`p`,{className:`truncate text-xs text-muted-foreground`,children:m?.email})]}),(0,V.jsxs)(`div`,{className:`p-1.5`,children:[(0,V.jsx)(RM,{}),(0,V.jsxs)(zi,{to:`/dashboard/settings`,state:mM(S),onClick:()=>i(!1),className:`relative flex items-center gap-3 rounded-lg px-3 py-2 text-sm font-medium text-foreground transition-colors hover:bg-primary/10 hover:text-primary`,children:[(0,V.jsxs)(`span`,{className:`relative shrink-0`,children:[(0,V.jsx)(KA,{size:16}),g?(0,V.jsx)(AM,{className:`absolute -right-0.5 -top-0.5`}):null]}),(0,V.jsx)(`span`,{className:`min-w-0 flex-1`,children:e(`common.settings`)})]})]}),(0,V.jsx)(`div`,{className:`border-t border-border/50 p-1.5`,children:(0,V.jsxs)(`button`,{type:`button`,onClick:()=>{h(),i(!1)},className:`flex w-full items-center gap-3 rounded-lg px-3 py-2 text-sm font-medium text-foreground transition-colors hover:bg-error/10 hover:text-error`,children:[(0,V.jsx)(yA,{size:16}),e(`common.logout`)]})})]})})]})]}),(0,V.jsx)(`button`,{type:`button`,className:`inline-flex h-10 w-10 items-center justify-center rounded-xl bg-surface-elevated/50 text-foreground transition-all duration-200 hover:bg-surface-elevated hover:text-primary sm:hidden`,onClick:()=>n(!0),children:(0,V.jsx)(CA,{size:22})})]})}),(0,V.jsx)(zD,{children:t&&(0,V.jsxs)(V.Fragment,{children:[(0,V.jsx)(ik.div,{initial:{opacity:0}
33,animate:{opacity:1},exit:{opacity:0},onClick:C,className:`fixed inset-0 z-[190] bg-black/55 backdrop-blur-[2px] sm:hidden`}),(0,V.jsxs)(ik.aside,{initial:{x:`-100%`},animate:{x:0},exit:{x:`-100%`},transition:{type:`spring`,damping:28,stiffness:200},className:`fixed inset-y-0 left-0 z-[200] flex w-[86%] max-w-[320px] flex-col border-r border-border/50 bg-surface shadow-[20px_0_50px_rgba(0,0,0,0.4)] sm:hidden`,children:[(0,V.jsxs)(`div`,{className:`flex h-16 items-center justify-between border-b border-border/50 bg-surface-elevated/50 px-4`,children:[(0,V.jsx)(DM,{linkClassName:`flex shrink-0 items-center`,imgClassName:`h-7 w-auto`}),(0,V.jsx)(`button`,{type:`button`,onClick:C,className:`flex h-9 w-9 items-center justify-center rounded-xl bg-surface-elevated text-foreground transition-all hover:bg-primary/10 hover:text-primary`,children:(0,V.jsx)(mj,{size:18})})]}),(0,V.jsxs)(`div`,{className:`custom-scrollbar flex-1 space-y-6 overflow-y-auto px-4 py-6`,children:[p&&(0,V.jsx)(`div`,{className:`px-1`,children:(0,V.jsxs)(`div`,{className:`relative flex items-center gap-3`,children:[(0,V.jsx)(`div`,{className:`flex h-12 w-12 shrink-0 items-center justify-center rounded-full border-2 border-primary/20 bg-primary/10 text-primary shadow-inner`,children:(0,V.jsx)(bae,{size:26})}),(0,V.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(0,V.jsx)(`p`,{className:`truncate text-lg font-black tracking-tight text-foreground`,children:m?.username||e(`common.account`)}),(0,V.jsx)(`p`,{className:`truncate text-[11px] font-medium text-muted-foreground`,children:m?.email}),(0,V.jsxs)(`div`,{className:`mt-1.5 flex w-fit items-center gap-2 rounded-full border border-success/20 bg-success/10 px-2 py-0.5`,children:[(0,V.jsx)(`span`,{className:`h-1.5 w-1.5 rounded-full bg-success animate-pulse`}),(0,V.jsx)(`span`,{className:`text-[9px] font-black uppercase tracking-wider text-success`,children:e(`common.verified`)})]})]}),g?(0,V.jsx)(AM,{className:`absolute right-0 top-0`}):null]})}),(0,V.jsxs)(`div`,{className:`space-y-2`,children:[(0,V.jsx)(`p`,{className:`px-4 text-[10px] font-bold uppercase tracking-[0.2em] text-muted-foreground/65 dark:text-muted-foreground/80`,children:e(`nav.mainMenu`)}),(0,V.jsx)(`nav`,{className:`space-y-1`,"aria-busy":y,children:y?(0,V.jsx)(UM,{variant:`drawer`,count:BM.length}):x.map(t=>(0,V.jsxs)(Bi,{to:t.to,end:t.to===`/dashboard`,className:({isActive:e})=>`flex items-center gap-3 rounded-xl px-3 py-3 text-[13px] font-bold transition-all duration-200 ${e?`bg-primary text-primary-foreground shadow-md shadow-primary/20`:`text-foreground hover:bg-surface-elevated hover:translate-x-1`}`,onClick:C,children:[(0,V.jsx)(t.icon,{size:18,className:`shrink-0`}),(0,V.jsx)(`span`,{children:e(t.labelKey)}),(t.to===`/dashboard/feed`&&a>0||t.to===`/dashboard/chats`&&c)&&(0,V.jsx)(`span`,{className:`ml-auto inline-flex h-1.5 w-1.5 rounded-full bg-error/90`})]},t.to))})]}),(0,V.jsxs)(`div`,{className:`space-y-2 pt-4`,children:[(0,V.jsx)(`p`,{className:`px-4 text-[10px] font-bold uppercase tracking-[0.2em] text-muted-foreground/65 dark:text-muted-foreground/80`,children:e(`common.account`)}),(0,V.jsx)(RM,{variant:`drawer`,onAfterChange:C}),(0,V.jsxs)(zi,{to:`/dashboard/settings`,state:mM(S),onClick:C,className:`flex items-center gap-3 rounded-xl px-3 py-3 text-[13px] font-bold text-foreground transition-all hover:bg-surface-elevated hover:translate-x-1`,children:[(0,V.jsxs)(`span`,{className:`relative shrink-0`,children:[(0,V.jsx)(KA,{size:18,className:`text-muted-foreground`}),g?(0,V.jsx)(AM,{className:`absolute -right-0.5 -top-0.5`}):null]}),(0,V.jsx)(`span`,{className:`min-w-0 flex-1`,children:e(`common.settings`)})]}),(0,V.jsxs)(`button`,{type:`button`,onClick:()=>{h(),C()},className:`flex w-full items-center gap-3 rounded-xl px-3 py-3 text-[13px] font-bold text-error transition-all hover:bg-error/10 hover:translate-x-1`,children:[(0,V.jsx)(yA,{size:18}),e(`common.logout`)]})]})]})]})]})})]})}var $oe=()=>{let e=(0,b.useRef)(null);return(0,b.useEffect)(()=>{let t=e.current;if(!t)return;let n=t.getContext(`2d`);if(!n)return;
33let r,i=0,a=document.documentElement.classList.contains(`dark`),o=new MutationObserver(()=>{a=document.documentElement.classList.contains(`dark`)});o.observe(document.documentElement,{attributes:!0,attributeFilter:[`class`]});let s=()=>{t.width=window.innerWidth,t.height=window.innerHeight};s(),window.addEventListener(`resize`,s);let c=()=>({bg:a?`13,17,33`:`248,250,252`,hex:a?`0.06`:`0.035`,b1:a?`99,179,237`:`29,78,216`,b2:a?`167,139,250`:`109,40,217`,b3:a?`52,211,153`:`4,120,87`,ba1:a?.09:.08,ba2:a?.08:.07,ba3:a?.06:.05,sa1:a?.07:.06,sa2:a?.06:.055,sa3:a?.05:.04}),l=(e,t,r,i,a,o,s)=>{n.beginPath();for(let o=0;o<=8;o++){let s=o/8*Math.PI*2,c=(o+1)/8*Math.PI*2,l=Math.sin(s*3+a)*i+Math.cos(s*5+a*.7)*i*.4,u=Math.sin(c*3+a)*i+Math.cos(c*5+a*.7)*i*.4,d=e+Math.cos(s)*(r+l),f=t+Math.sin(s)*(r+l),p=e+Math.cos(c)*(r+u),m=t+Math.sin(c)*(r+u),h=(d+p)/2,g=(f+m)/2;o===0?n.moveTo(h,g):n.quadraticCurveTo(d,f,h,g)}n.closePath();let c=n.createRadialGradient(e,t,0,e,t,r+i);c.addColorStop(0,`rgba(${o}, ${s})`),c.addColorStop(.5,`rgba(${o}, ${s*.5})`),c.addColorStop(1,`rgba(${o}, 0)`),n.fillStyle=c,n.fill()},u=e=>{let r=Math.sqrt(3)*44;n.strokeStyle=a?`rgba(148,163,184,${e})`:`rgba(51,65,85,${e})`,n.lineWidth=.7;for(let e=-1;e<t.height/r+2;e++)for(let i=-1;i<t.width/66+2;i++){let t=i*66,a=e*r+(i%2==0?0:r/2);n.beginPath();for(let e=0;e<6;e++){let r=Math.PI/180*(60*e-30),i=t+44*Math.cos(r),o=a+44*Math.sin(r);e===0?n.moveTo(i,o):n.lineTo(i,o)}n.closePath(),n.stroke()}},d=(e,r,i)=>{n.save();let o=new Path2D;o.moveTo(e[0][0],e[0][1]);for(let t=1;t<e.length;t++)o.lineTo(e[t][0],e[t][1]);o.closePath(),n.clip(o);let s=Math.floor(e.length/2),c=n.createLinearGradient(e[0][0],e[0][1],e[s][0],e[s][1]);c.addColorStop(0,`rgba(${r}, ${i})`),c.addColorStop(1,`rgba(${r}, 0)`),n.fillStyle=c,n.fillRect(0,0,t.width,t.height),n.strokeStyle=`rgba(${r}, ${a?i*.5:i*.7})`,n.lineWidth=a?.8:1.2,n.stroke(o),n.restore()},f=()=>
33{n.clearRect(0,0,t.width,t.height),i+=.004;let e=t.width,a=t.height,o=c();n.fillStyle=`rgb(${o.bg})`,n.fillRect(0,0,e,a),u(o.hex),l(e*.12,a*.18,e*.32,e*.055,i,o.b1,o.ba1),l(e*.88,a*.78,e*.38,e*.065,i*.75+1.5,o.b2,o.ba2),l(e*.6,a*.3,e*.22,e*.04,i*1.2+3,o.b3,o.ba3),d([[e*.55,0],[e,0],[e,a*.65],[e*.72,a*.18]],o.b1,o.sa1),d([[0,a*.5],[e*.35,a],[0,a]],o.b2,o.sa2),d([[e*.3,0],[e*.6,0],[e*.45,a*.12]],o.b3,o.sa3),r=requestAnimationFrame(f)};return f(),()=>{cancelAnimationFrame(r),window.removeEventListener(`resize`,s),o.disconnect()}},[]),(0,V.jsx)(`canvas`,{ref:e,className:`fixed inset-0 z-0 pointer-events-none select-none`,"aria-hidden":`true`})},ese=[{labelKey:`nav.home`,to:`/`},{labelKey:`nav.features`,to:`/features`},{labelKey:`nav.download`,to:`/download`},{labelKey:`nav.pricing`,to:`/pricing`},{labelKey:`nav.contact`,to:`/contact`}];function tse(){let e=my(),[t,n]=(0,b.useState)(!1),r=(0,b.useRef)(null),i=(0,b.useRef)(null),a=(0,b.useRef)(null),o=(0,b.useRef)(!1),s=(0,b.useId)(),c=nr(),l=c.pathname.startsWith(`/auth`),u=c.pathname.startsWith(`/onboarding`),d=c.pathname.startsWith(`/checkout`),f=c.pathname.startsWith(`/l/`),p=l||u||d||f,{isAuthenticated:m,logout:h}=Jv(),g=(0,b.useCallback)(()=>n(!1),[]);return(0,b.useEffect)(()=>{if(!t)return;let e=e=>{let t=e.target;i.current&&!i.current.contains(t)&&a.current&&!a.current.contains(t)&&g()};return document.addEventListener(`mousedown`,e),()=>document.removeEventListener(`mousedown`,e)},[t,g]),(0,b.useEffect)(()=>{let e=window.setTimeout(()=>{g()},0);return()=>window.clearTimeout(e)},[c.pathname,c.hash,g]),(0,b.useEffect)(()=>{let e=window.matchMedia(`(min-width: 768px)`),t=()=>{e.matches&&g()};return e.addEventListener(`change`,t),()=>e.removeEventListener(`change`,t)},[g]),(0,b.useEffect)(()=>{if(!t)return;let e=e=>{e.key===`Escape`&&g()};document.addEventListener(`keydown`,e);let n=document.body.style.overflow;return document.body.style.overflow=`hidden`,()=>{document.removeEventListener(`keydown`,e),document.body.style.overflow=n}},[t,g]),(0,b.useEffect)(()=>{o.current&&!t&&r.current?.focus(),o.current=t},[t]),(0,V.jsxs)(`header`,{ref:a,className:`sticky top-0 z-[60] w-full overflow-visible border-b border-border transition-all duration-300 ${t?`bg-surface shadow-md`:`bg-surface/80 backdrop-blur-md shadow-sm shadow-black/5`}`,children:[(0,V.jsxs)(`div`,{className:`mx-auto flex h-16 max-w-7xl items-center justify-between overflow-visible px-4 sm:px-6 lg:px-8`,children:[(0,V.jsxs)(`div`,{className:`flex min-w-0 flex-1 items-center gap-8 lg:gap-10`,children:[(0,V.jsx)(DM,{linkClassName:`flex min-w-0 shrink-0 cursor-pointer items-center`,imgClassName:`h-9 w-auto sm:h-10`,fetchPriority:`high`}),!p&&(0,V.jsxs)(`nav`,{className:`hidden items-center gap-1 lg:gap-2 md:flex`,"aria-label":e(`common.mainNav`),children:[(0,V.jsx)(Bi,{to:`/`,className:({isActive:e})=>`group relative rounded-lg px-3 py-2 text-sm font-semibold transition-colors ${e?`text-foreground`:`text-muted-foreground hover:text-foreground`}`,end:!0,children:({isActive:t})=>(0,V.jsxs)(V.Fragment,{children:[e(`nav.home`),(0,V.jsx)(`span`,{className:`absolute -bottom-1 left-1/2 h-[2.5px] -translate-x-1/2 rounded-full bg-gradient-to-r from-transparent via-primary to-transparent transition-all duration-300 ease-out ${t?`w-full opacity-100`:`w-0 opacity-0 group-hover:w-full group-hover:opacity-100`}`})]})}),(0,V.jsx)(Bi,{to:`/features`,className:({isActive:e})=>`group relative rounded-lg px-3 py-2 text-sm font-semibold transition-colors ${e?`text-foreground`:`text-muted-foreground hover:text-foreground`}`,children:({isActive:t})=>(0,V.jsxs)(V.Fragment,{children:[e(`nav.features`),(0,V.jsx)(`span`,{className:`absolute -bottom-1 left-1/2 h-[2.5px] -translate-x-1/2 rounded-full bg-gradient-to-r from-transparent via-primary to-transparent transition-all duration-300 ease-out ${t?`w-full opacity-100`:`w-0 opacity-0 group-hover:w-full group-hover:opacity-100`}`})]})}),(0,V.jsx)(Bi,{to:`/download`,className:({isActive:e})=>`group relative rounded-lg px-3 py-2 text-sm font-semibold transition-colors ${e?`text-foreground`:`text-muted-foreground hover:text-foreground`}`,children:({isActive:t})=>(0,V.jsxs)(V.Fragment,{children:[e(`nav.download`),(0,V.jsx)(`span`,{className:`absolute -bottom-1 left-1/2 h-[2.5px] -translate-x-1/2 roun
33ded-full bg-gradient-to-r from-transparent via-primary to-transparent transition-all duration-300 ease-out ${t?`w-full opacity-100`:`w-0 opacity-0 group-hover:w-full group-hover:opacity-100`}`})]})}),(0,V.jsx)(Bi,{to:`/pricing`,className:({isActive:e})=>`group relative rounded-lg px-3 py-2 text-sm font-semibold transition-colors ${e?`text-foreground`:`text-muted-foreground hover:text-foreground`}`,children:({isActive:t})=>(0,V.jsxs)(V.Fragment,{children:[e(`nav.pricing`),(0,V.jsx)(`span`,{className:`absolute -bottom-1 left-1/2 h-[2.5px] -translate-x-1/2 rounded-full bg-gradient-to-r from-transparent via-primary to-transparent transition-all duration-300 ease-out ${t?`w-full opacity-100`:`w-0 opacity-0 group-hover:w-full group-hover:opacity-100`}`})]})}),(0,V.jsx)(Bi,{to:`/contact`,className:({isActive:e})=>`group relative rounded-lg px-3 py-2 text-sm font-semibold transition-colors ${e?`text-foreground`:`text-muted-foreground hover:text-foreground`}`,children:({isActive:t})=>(0,V.jsxs)(V.Fragment,{children:[e(`nav.contact`),(0,V.jsx)(`span`,{className:`absolute -bottom-1 left-1/2 h-[2.5px] -translate-x-1/2 rounded-full bg-gradient-to-r from-transparent via-primary to-transparent transition-all duration-300 ease-out ${t?`w-full opacity-100`:`w-0 opacity-0 group-hover:w-full group-hover:opacity-100`}`})]})})]})]}),(0,V.jsxs)(`div`,{className:`flex shrink-0 items-center gap-2 sm:gap-3`,children:[!p&&(0,V.jsxs)(V.Fragment,{children:[m?(0,V.jsxs)(zi,{to:`/dashboard`,className:`hidden items-center justify-center gap-2 rounded-lg bg-primary px-5 py-2.5 text-sm font-bold text-primary-foreground shadow-sm shadow-primary/20 transition-all hover:scale-105 hover:bg-primary-hover md:inline-flex`,children:[(0,V.jsx)(mA,{size:18,strokeWidth:2.25,"aria-hidden":!0}),e(`common.dashboard`)]}):(0,V.jsx)(zi,{to:`/auth/signup`,className:`hidden items-center justify-center rounded-lg bg-primary px-5 py-2.5 text-sm font-bold text-primary-foreground shadow-sm shadow-primary/20 transition-all hover:scale-105 hover:bg-primary-hover md:inline-flex`,children:e(`auth.createAccount`)}),(0,V.jsx)(`div`,{className:`hidden h-6 w-px bg-border md:block`})]}),(0,V.jsx)(LM,{menuAlign:`end`,tooltipAlign:`end`}),(0,V.jsx)(Xoe,{tooltipAlign:`end`}),!p&&(0,V.jsx)(`button`,{ref:r,type:`button`,className:`relative inline-flex h-10 w-10 items-center justify-center rounded-md text-foreground transition-colors hover:text-primary md:hidden focus:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background`,"aria-expanded":t,"aria-controls":s,"aria-label":e(t?`common.closeMenu`:`common.openMenu`),onClick:()=>n(e=>!e),children:(0,V.jsxs)(`div`,{className:`relative h-5 w-5`,children:[(0,V.jsx)(`div`,{className:`absolute inset-0 transition-all duration-300 ${t?`rotate-90 opacity-0`:`rotate-0 opacity-100`}`,children:(0,V.jsx)(CA,{size:20,strokeWidth:2,"aria-hidden":!0})}),(0,V.jsx)(`div`,{className:`absolute inset-0 transition-all duration-300 ${t?`rotate-0 opacity-100`:`-rotate-90 opacity-0`}`,children:(0,V.jsx)(mj,{size:20,strokeWidth:2,"aria-hidden":!0})})]})})]})]}),!p&&(0,V.jsx)(`div`,{className:`fixed inset-0 top-16 z-40 bg-background/40 backdrop-blur-xl transition-opacity duration-300 ease-in-out md:hidden ${t?`opacity-100 pointer-events-auto`:`opacity-0 pointer-events-none`}`,"aria-hidden":`true`,onClick:g}),!p&&(0,V.jsx)(`div`,{ref:i,id:s,className:`fixed inset-x-0 top-16 z-50 h-[calc(100dvh-4rem)] border-b border-border bg-surface shadow-2xl transition-all duration-300 ease-in-out md:hidden ${t?`translate-y-0 opacity-100 pointer-events-auto`:`-translate-y-4 opacity-0 pointer-events-none`}`,role:`dialog`,"aria-modal":`true`,"aria-label":e(`common.mobileNavigation`),children:(0,V.jsxs)(`div`,{className:`flex h-full flex-col`,children:[(0,V.jsx)(`nav`,{className:`flex-1 overflow-y-auto px-4 py-6 sm:px-6`,"aria-label":`Mobile Navigation`,children:(0,V.jsx)(`div`,{className:`flex flex-col gap-2`,children:ese.map(t=>(0,V.jsx)(Bi,{to:t.to,className:({isActive:e})=>`group relative flex w-full items-center rounded-xl px-4 py-3.5 text-base font-semibold transition-all duration-300 ${e?`bg-primary/10 text-primary`:`text-foreground hover:bg-surface-elevated`}`,end:t.to===`/`,onClick:g,children:({isActive:n})=>(0,V.jsxs)(V.Fragment,{children:[(0,V.jsx)(`span`,{className:`absolute left-0 h-5 w-1 rounded-r-full bg-primary transition-all duration-300 ${n?`opacity-100 scale-y-100`:`opacity-0 scale-y-0 group-hover:opacity-100 group-hover:scale-y-100`}`}),(0,V.jsx)(`span`,{className:`relative z-10 transition-transform duration-300 group-hover:translate-x-3 ${n?`translate-x-3`:``}`,children:e(t.labelKey)})]})},t.to))})}),(0,V.jsx)(`div`,{className:`shrink-0 border-t border-border bg-surface-elevated/50 p-3 pb-6 sm:p-4 sm:pb-8`,children:(0,V.jsx)(`div`,{className:`flex flex-col gap-2`,children:m?(0,V.jsxs)(V.Fragment,{children:[(0,V.jsxs)(zi,{to:`/dashboard`,className:`flex w-full items-center justify-center gap-1.5 rounded-lg bg-primary py-2.5 text-sm font-bold text-primary-foreground shadow-md shadow-primary/15 transition-all hover:bg-primary-hover active:scale-[0.98]`,onClick:g,children:[(0,V.jsx)(mA,{size:18,strokeWidth:2.25}),e(`common.dashboard`)]}),(0,V.jsxs)(`button`,{type:`button`,onClick:()=>{h(),g()},className:`flex w-full items-center justify-center gap-1.5 rounded-lg border border-border px-3 py-2.5 text-sm font-semibold text-error transition-colors hover:bg-error/10`,children:[(0,V.jsx)(yA,{size:18,strokeWidth:2.25}),e(`common.logout`)]})]}):(0,V.jsx)(zi,{to:`/auth/signup`,className:`flex w-full items-center justify-center rounded-lg bg-primary py-2.5 text-sm font-bold text-primary-foreground shadow-md shadow-primary/15 transition-all hover:bg-primary-hover active:scale-[0.98]`,onClick:g,children:e(`auth.createAccount`)})})})]})})]})}function nse(){let e=my(),t=new Date().getFullYear();return(0,V.jsxs)(`footer`,{className:`relative overflow-hidden rounded-t-[3rem] bg-surface-elevated/50 pt-20 pb-16 sm:rounded-t-[4rem] sm:pt-24 dark:bg-surface/20`,children:[(0,V.jsx)(`div`,{className:`pointer-events-none absolute top-0 left-1/2 h-24 w-[45%] max-w-2xl -translate-x-1/2 roun
33ded-full bg-primary/10 blur-[56px] dark:bg-primary/18`,"aria-hidden":`true`}),(0,V.jsx)(`div`,{className:`pointer-events-none absolute top-0 left-1/2 h-px w-[72%] max-w-5xl -translate-x-1/2 bg-gradient-to-r from-transparent via-primary/35 to-transparent dark:via-primary/55`,"aria-hidden":`true`}),(0,V.jsxs)(`div`,{className:`mx-auto max-w-7xl px-4 sm:px-6 lg:px-8`,children:[(0,V.jsxs)(`div`,{className:`grid grid-cols-2 gap-12 md:grid-cols-4 lg:grid-cols-5`,children:[(0,V.jsxs)(`div`,{className:`col-span-2 lg:col-span-2`,children:[(0,V.jsx)(DM,{linkClassName:`flex cursor-pointer items-center text-foreground`,imgClassName:`h-10 w-auto sm:h-11`}),(0,V.jsx)(`p`,{className:`mt-6 max-w-none text-sm leading-relaxed text-muted-foreground md:max-w-xs`,children:e(`footer.description`)}),(0,V.jsxs)(`div`,{className:`mt-8 flex gap-4`,children:[(0,V.jsx)(`a`,{href:`https://x.com/InstaSnagai`,target:`_blank`,rel:`noopener noreferrer`,"aria-label":e(`footer.ariaX`),className:`text-muted-foreground transition-all hover:scale-110 hover:text-foreground`,children:(0,V.jsx)(`svg`,{viewBox:`0 0 24 24`,width:`20`,height:`20`,fill:`currentColor`,children:(0,V.jsx)(`path`,{d:`M18.244 2.25h3.308l-7.227 8.26 8.502 11.24H16.17l-5.214-6.817L4.99 21.75H1.68l7.73-8.835L1.254 2.25H8.08l4.713 6.231zm-1.161 17.52h1.833L7.084 4.126H5.117z`})})}),(0,V.jsx)(`a`,{href:`https://www.facebook.com/profile.php?id=61588700440311#`,target:`_blank`,rel:`noopener noreferrer`,"aria-label":e(`footer.ariaFacebook`),className:`text-muted-foreground transition-all hover:scale-110 hover:text-foreground`,children:(0,V.jsx)(`svg`,{viewBox:`0 0 24 24`,width:`20`,height:`20`,fill:`currentColor`,children:(0,V.jsx)(`path`,{d:`M24 12.073c0-6.627-5.373-12-12-12s-12 5.373-12 12c0 5.99 4.388 10.954 10.125 11.854v-8.385H7.078v-3.47h3.047V9.43c0-3.007 1.792-4.669 4.533-4.669 1.312 0 2.686.235 2.686.235v2.953H15.83c-1.491 0-1.956.925-1.956 1.874v2.25h3.328l-.532 3.47h-2.796v8.385C19.612 23.027 24 18.062 24 12.073z`})})}),(0,V.jsx)(`a`,{href:`https://www.linkedin.com/in/insta-snag-813117408/`,target:`_blank`,rel:`noopener noreferrer`,"aria-label":e(`footer.ariaLinkedIn`),className:`text-muted-foreground transition-all hover:scale-110 hover:text-foreground`,children:(0,V.jsx)(`svg`,{viewBox:`0 0 24 24`,width:`20`,height:`20`,fill:`currentColor`,children:(0,V.jsx)(`path`,{d:`M19 0h-14c-2.761 0-5 2.239-5 5v14c0 2.761 2.239 5 5 5h14c2.761 0 5-2.239 5-5v-14c0-2.761-2.239-5-5-5zm-11 19h-3v-11h3v11zm-1.5-12.268c-.966 0-1.75-.79-1.75-1.764s.784-1.764 1.75-1.764 1.75.79 1.75 1.764-.783 1.764-1.75 1.764zm13.5 12.268h-3v-5.604c0-3.368-4-3.113-4 0v5.604h-3v-11h3v1.765c1.396-2.586 7-2.777 7 2.476v6.759z`})})})]})]}),(0,V.jsxs)(`div`,{children:[(0,V.jsx)(`h3`,{className:`text-sm font-bold uppercase tracking-widest text-foreground`,children:e(`footer.product`)}),(0,V.jsxs)(`ul`,{className:`mt-6 space-y-4 text-sm`,children:[(0,V.jsx)(`li`,{children:(0,V.jsx)(zi,{to:`/features`,className:`text-muted-foreground hover:text-foreground transition-colors`,children:e(`nav.features`)})}),(0,V.jsx)(`li`,{children:(0,V.jsx)(zi,{to:`/download`,className:`text-muted-foreground hover:text-foreground transition-colors`,children:e(`nav.download`)})}),(0,V.jsx)(`li`,{children:(0,V.jsx)(zi,{to:`/pricing`,className:`text-muted-foreground hover:text-foreground transition-colors`,children:e(`nav.pricing`)})}),(0,V.jsx)(`li`,{children:(0,V.jsx)(zi,{to:`/contact`,className:`text-muted-foreground hover:text-foreground transition-colors`,children:e(`nav.contact`)})})]})]}),(0,V.jsxs)(`div`,{children:[(0,V.jsx)(`h3`,{className:`text-sm font-bold uppercase tracking-widest text-foreground`,children:e(`footer.resources`)}),(0,V.jsxs)(`ul`,{className:`mt-6 space-y-4 text-sm`,children:[(0,V.jsx)(`li`,{children:(0,V.jsx)(`a`,{href:`#`,className:`text-muted-foreground hover:text-foreground transition-colors`,children:e(`footer.helpCenter`)})}),(0,V.jsx)(`li`,{children:(0,V.jsx)(`a`,{href:`#`,className:`text-muted-foreground hover:text-foreground transition-colors`,children:e(`footer.community`)})})]})]}),(0,V.jsxs)(`div`,{children:[(0,V.jsx)(`h3`,{className:`text-sm font-bold uppercase tracking-widest text-foreground`,children:e(`footer.legal`)}),(0,V.jsxs)(`ul`,{className:`mt-6 space-y-4 text-sm`,children:[(0,V.jsx)(`li`,{children:(0,V.jsx)(zi,{to:`/privacy`,className:`text-muted-foreground hover:text-foreground transition-colors`,children:e(`footer.privacyPolicy`)})}),(0,V.jsx)(`li`,{children:(0,V.jsx)(zi,{to:`/terms`,className:`text-muted-foreground hover:text-foreground transition-colors`,children:e(`footer.termsOfService`)})})]})]})]}),(0,V.jsxs)(`div`,{className:`mt-16 flex flex-col items-center justify-between gap-4 border-t border-border pt-8 sm:flex-row`,children:[(0,V.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:e(`footer.copyright`,{year:t})}),(0,V.jsxs)(`div`,{className:`flex flex-wrap items-center justify-center gap-3 sm:justify-end`,children:[(0,V.jsx)(LM,{menuAlign:`end`,menuPlacement:`top`,tooltipAlign:`end`}),(0,V.jsxs)(`div`,{className:`flex items-center gap-2 text-xs text-muted-foreground`,children:[(0,V.jsx)(bA,{size:14}),(0,V.jsx)(`span`,{children:`[email protected]`})]})]})]})]}),(0,V.jsx)(`div`,{className:`pointer-events-none absolute bottom-0 left-0 right-0 flex justify-center select-none z-0`,"aria-hidden":`true`,children:(0,V.jsx)(`span`,{className:`bg-gradient-to-b from-primary to-transparent bg-clip-text text-[16vw] font-black tracking-tighter text-transparent opacity-20`,children:`InstaSnag`})})]})}var WM=`InstaSnag`,GM=`InstaSnag alerts you when new listings match your saved searches, so you can find deals faster and miss fewer opportunities.`,rse=`/og/instasnag-og.webp`,KM={robots:`noindex,nofollow`},qM={siteName:WM,legalName:`9564-5602 Québec Inc.`,defaultTitle:WM,defaultDescription:GM,defaultRobots:`index,follow`,defaultType:`website`,defaultImage:rse,defaultImageAlt:`InstaSnag dashboard with listing alerts and saved searches.`,defaultImageWidth:`1200`,defaultImageHeight:`748`,defaultImageType:`image/webp`,squareIcon:`/square/instasnag-square.webp`,xProfileUrl:`https://x.com/InstaSnagai`,facebookProfileUrl:`https://www.facebook.com/profile.php?id=61588700440311`,xHandle:`@InstaSnagai`,supportEmail:`[email protected]`,phoneNumber:`+15149673342`,address:{streetAddress:`9580 Blvd de l'Aca
33die, Suite 207`,addressLocality:`Montréal`,postalCode:`H4N 1L8`,addressCountry:`CA`}};function JM(e){if(!e)return`/`;let t=e.replace(/\/+$/,``);return t===``?`/`:t}var ise={title:`Page Not Found | InstaSnag`,description:`The page you requested could not be found.`,...KM},ase=[{match:e=>e===`/`,config:{title:`InstaSnag | Multi-Marketplace Listing Alerts`,description:`Get alerts when new listings match your saved searches, across the marketplaces you choose.`,keywords:`marketplace alerts, listing alerts, deal alerts, real-time listing alerts, saved search notifications, InstaSnag`}},{match:e=>e.startsWith(`/features`),config:{title:`Features | InstaSnag`,description:`Explore InstaSnag features for fast listing alerts, searches, and listing workflow automation.`,keywords:`InstaSnag features, listing alerts, listing automation, instant deal alerts`}},{match:e=>e.startsWith(`/pricing`),config:{title:`Pricing | InstaSnag`,description:`Compare InstaSnag Alerts plans and choose the alert speed and listing coverage that fit your buying workflow.`,keywords:`InstaSnag pricing, listing alert plans, deal alert subscription`}},{match:e=>e.startsWith(`/download`),config:{title:`Download InstaSnag | Mobile Apps & Browser Extension`,description:`Download the InstaSnag mobile app for iOS and Android, and install our browser extension for Facebook Marketplace messaging.`,keywords:`download InstaSnag, InstaSnag app, iOS app, Android app, browser extension, Facebook Marketplace`}},{match:e=>e.startsWith(`/contact`),config:{title:`Contact | InstaSnag`,description:`Contact InstaSnag for support and product questions about listing alerts.`,keywords:`contact InstaSnag, marketplace alerts support, listing alerts help`}},{match:e=>e.startsWith(`/privacy`),config:{title:`Privacy Policy | InstaSnag`,description:`Learn how InstaSnag collects, uses, stores, and protects your personal information when you use our listing alerts and dashboard.`,keywords:`InstaSnag privacy policy, data protection, PIPEDA, marketplace alerts privacy`}},{match:e=>e.startsWith(`/terms`),config:{title:`Terms of Service | InstaSnag`,description:`Read the InstaSnag End User License Agreement covering account use, subscriptions, marketplace integrations, and acceptable use.`,keywords:`InstaSnag terms of service, EULA, user agreement, marketplace alerts terms`}},{match:e=>e.startsWith(`/l/`),config:{title:`Shared listing | InstaSnag`,description:`View a marketplace listing shared via InstaSnag and discover real-time deal alerts.`,...KM}},{match:e=>e===`/checkout/success`,config:{title:`Checkout complete | InstaSnag`,description:`Your InstaSnag subscription checkout completed successfully.`,...KM}},{match:e=>e===`/checkout/cancel`,config:{title:`Checkout canceled | InstaSnag`,description:`You left the InstaSnag checkout before completing payment. You can return to finish setup when you are ready.`,...KM}},{match:e=>e.startsWith(`/checkout`),config:{title:`Checkout | InstaSnag`,description:`Complete your InstaSnag subscription checkout.`,...KM}},{match:e=>e.startsWith(`/auth/oauth`),config:{title:`Signing in | InstaSnag`,description:`Completing your InstaSnag sign-in.`,...KM}},{match:e=>e.startsWith(`/auth`),config:{title:`Sign In | InstaSnag`,description:`Sign in or create an account to access InstaSnag.`,...KM}},{match:e=>e.startsWith(`/onboarding`),config:{title:`Onboarding | InstaSnag`,description:`Complete your InstaSnag onboarding and plan setup.`,...KM}},{match:e=>e.startsWith(`/dashboard/searches`),config:{title:`Searches | InstaSnag`,description:`Create and manage your marketplace saved searches.`,...KM}},{match:e=>e.startsWith(`/dashboard/feed`),config:{title:`Feed | InstaSnag`,description:`Browse marketplace listings that match your saved searches.`,...KM}},{match:e=>e.startsWith(`/dashboard/chats`),config:{title:`Chats | InstaSnag`,description:`Manage marketplace conversations in InstaSnag.`,...KM}},{match:e=>e.startsWith(`/dashboard/personal`),config:{title:`My Listings | InstaSnag`,description:`View and manage your personal marketplace listings.`,...KM}},{match:e=>e.startsWith(`/dashboard/settings`),config:{title:`Settings | InstaSnag`,description:`Manage your InstaSnag account, subscription, and preferences.`,...KM}},{match:e=>e.startsWith(`/dashboard`),config:{title:`Dashboard | InstaSnag`,description:`Manage your InstaSnag account and saved searches.`,...KM}}],ose=[`/`,`/features`,`/pricing`,`/download`,`/contact`,`/privacy`,`/terms`,`/auth`,`/dashboard`,`/onboarding`,`/checkout`];function sse(e){return ose.some(t=>t===`/`?e===`/`:e===t||e.startsWith(`${t}/`))}function cse(e){let t=JM(e),n=ase.find(e=>e.match(t));return n?n.config:sse(t)?{title:`${WM}`,description:GM,...KM}:ise}function YM(){let e=`https://instasnag.ai`;return typeof e==`string`?e.replace(/\/+$/,``):typeof window<`u`?window.location.origin:``}function XM(e){let t=YM(),n=JM(e);return t?`${t}${n}`:n}function ZM(e=qM.defaultImage){let t=YM();return!t||e.startsWith(`http://`)||e.startsWith(`https://`)?e:`${t}${e.startsWith(`/`)?e:`/${e}`}`}function lse(e){return e===`/`?{"@context":`https://schema.org`,"@type":`FAQPage`,mainEntity:[{"@type":`Question`,name:`Which platforms and devices are supported?`,acceptedA
33nswer:{"@type":`Answer`,text:`Use InstaSnag on the web, in our mobile app, and with supported browser tooling. Connected marketplaces depend on your plan and region.`}},{"@type":`Question`,name:`How do notifications work?`,acceptedAnswer:{"@type":`Answer`,text:`You choose how InstaSnag reaches you with in-product feeds, email, or mobile push notifications.`}},{"@type":`Question`,name:`Is my activity only visible to me?`,acceptedAnswer:{"@type":`Answer`,text:`Your saved searches, match history, and account settings stay under your login.`}}]}:e.startsWith(`/features`)?{"@context":`https://schema.org`,"@type":`FAQPage`,mainEntity:[{"@type":`Question`,name:`How do the different alert intervals work?`,acceptedAnswer:{"@type":`Answer`,text:`Alert intervals define how often a search can surface new matches. Higher-tier plans include faster intervals down to one minute.`}},{"@type":`Question`,name:`What kind of automation is included?`,acceptedAnswer:{"@type":`Answer`,text:`Automation can include first-message workflows on supported marketplaces and AI-assisted listing analysis depending on plan.`}},{"@type":`Question`,name:`Can I use InstaSnag on multiple devices?`,acceptedA
33nswer:{"@type":`Answer`,text:`Yes. Your account works across web, mobile, and supported browser extension workflows.`}}]}:null}function use({pathname:e}){let t=JM(e),n=cse(t),r=XM(t),i=ZM(),a=ZM(qM.squareIcon),o=n.robots??qM.defaultRobots,s=n.type??qM.defaultType,c=lse(t),l={"@context":`https://schema.org`,"@type":`WebSite`,name:qM.siteName,url:XM(`/`),image:i,sameAs:[qM.xProfileUrl,qM.facebookProfileUrl]},u={"@context":`https://schema.org`,"@type":`SoftwareApplication`,name:qM.siteName,applicationCategory:`BusinessApplication`,operatingSystem:`Web, iOS, Android`,url:XM(`/`),description:n.description||qM.defaultDescription,image:[i,a],sameAs:[qM.xProfileUrl,qM.facebookProfileUrl]},d={"@context":`https://schema.org`,"@type":`Organization`,name:qM.siteName,legalName:qM.legalName,url:XM(`/`),email:qM.supportEmail,telephone:qM.phoneNumber,sameAs:[qM.xProfileUrl,qM.facebookProfileUrl],address:{"@type":`PostalAddress`,streetAddress:qM.address.streetAddress,addressLocality:qM.address.addressLocality,postalCode:qM.address.postalCode,addressCountry:qM.address.addressCountry},contactPoint:[{"@type":`ContactPoint`,contactType:`customer support`,email:qM.supportEmail,telephone:qM.phoneNumber,areaServed:`CA`}]};return(0,V.jsxs)(so,{prioritizeSeoTags:!0,children:[(0,V.jsx)(`title`,{children:n.title||qM.defaultTitle}),(0,V.jsx)(`meta`,{name:`description`,content:n.description||qM.defaultDescription}),n.keywords?(0,V.jsx)(`meta`,{name:`keywords`,content:n.keywords}):null,(0,V.jsx)(`meta`,{name:`robots`,content:o}),(0,V.jsx)(`link`,{rel:`canonical`,href:r}),(0,V.jsx)(`meta`,{property:`og:type`,content:s}),(0,V.jsx)(`meta`,{property:`og:site_name`,content:qM.siteName}),(0,V.jsx)(`meta`,{property:`og:title`,content:n.title||qM.defaultTitle}),(0,V.jsx)(`meta`,{property:`og:description`,content:n.description||qM.defaultDescription}),(0,V.jsx)(`meta`,{property:`og:url`,content:r}),(0,V.jsx)(`meta`,{property:`og:image`,content:i}),(0,V.jsx)(`meta`,{property:`og:image:alt`,content:qM.defaultImageAlt}),(0,V.jsx)(`meta`,{property:`og:image:width`,content:qM.defaultImageWidth}),(0,V.jsx)(`meta`,{property:`og:image:height`,content:qM.defaultImageHeight}),(0,V.jsx)(`meta`,{property:`og:image:type`,content:qM.defaultImageType}),(0,V.jsx)(`meta`,{name:`twitter:card`,content:`summary_large_image`}),(0,V.jsx)(`meta`,{name:`twitter:site`,content:qM.xHandle}),(0,V.jsx)(`meta`,{name:`twitter:creator`,content:qM.xHandle}),(0,V.jsx)(`meta`,{name:`twitter:title`,content:n.title||qM.defaultTitle}),(0,V.jsx)(`meta`,{name:`twitter:description`,content:n.description||qM.defaultDescription}),(0,V.jsx)(`meta`,{name:`twitter:image`,content:i}),(0,V.jsx)(`meta`,{name:`twitter:image:alt`,content:qM.defaultImageAlt}),(0,V.jsx)(`script`,{type:`application/ld+json`,children:JSON.stringify(l)}),(0,V.jsx)(`script`,{type:`application/ld+json`,children:JSON.stringify(u)}),(0,V.jsx)(`script`,{type:`application/ld+json`,children:JSON.stringify(d)}),c?(0,V.jsx)(`script`,{type:`application/ld+json`,children:JSON.stringify(c)}):null]})}function dse(){let e=nr(),{pathname:t}=e,n=t.startsWith(`/dashboard`),r=t===`/`,i=t.startsWith(`/dashboard/searches/new`)||/^\/dashboard\/searches\/[^/]+\/edit-(anything|vehicle)\/?$/.test(t)||/^\/dashboard\/searches\/[^/]+\/duplicate-(anything|vehicle)\/?$/.test(t),a=t.startsWith(`/dashboard/settings`),o=t.startsWith(`/dashboard/chats`),s=r||i||a,c=r||t.startsWith(`/auth`)||t.startsWith(`/onboarding`)||t.startsWith(`/checkout`)||n,l=(0,b.useRef)(t);return(0,b.useEffect)(()=>{let n=l.current,r=n.startsWith(`/auth`)&&t.startsWith(`/auth`),i=e.state?.restoreFeedSession,a=e.state?.scrollToContactForm,o=n!==t,s=n.startsWith(`/dashboard/feed`)&&t.startsWith(`/dashboard/feed`);o&&!r&&!i&&!s&&!a&&window.scrollTo({top:0,behavior:`instant`}),l.current=t},[t,e.state]),(0,V.jsxs)(`div`,{className:`flex flex-col text-foreground ${o?`h-dvh max-h-dvh overflow-hidden`:`min-h-screen scroll-smooth`}`,children:[(0,V.jsx)(use,{pathname:t}),n&&(0,V.jsx)($oe,{}),n?(0,V.jsxs)(wM,{children:[s?null:(0,V.jsx)(Qoe,{}),(0,V.jsx)(`main`,{className:`relative z-10 ${o?`flex min-h-0 flex-1 flex-col overflow-hidden`:`flex-1`}`,children:(0,V.jsx)(Gr,{})})]}):(0,V.jsxs)(V.Fragment,{children:[s?null:(0,V.jsx)(tse,{}),(0,V.jsx)(`main`,{className:`relative z-10 flex-1`,children:(0,V.jsx)(Gr,{})})]}),!c&&(0,V.jsx)(nse,{})]})}function fse(e,t){return e===`ios-early-access`?!0:!!t?.scrollToContactForm}
33function pse(e){return{subject:e(`contact.iosSubject`),message:e(`contact.iosMessage`)}}var QM={fullName:``,email:``,company:``,subject:``,message:``};function mse(){let e=my(),{showToast:t}=Gx(),n=nr(),[r,i]=qi(),[a,o]=(0,b.useState)(()=>{if(r.get(`intent`)!==`ios-early-access`)return QM;let t=pse(e);return{...QM,subject:t.subject,message:t.message}}),[s,c]=(0,b.useState)({}),[l,u]=(0,b.useState)(!1),[d,f]=(0,b.useState)(null),p=(0,b.useRef)(null),m=(0,b.useRef)(fse(r.get(`intent`),n.state)),h=(0,b.useRef)(!1);(0,b.useEffect)(()=>{if(r.get(`intent`)!==`ios-early-access`)return;let e=new URLSearchParams(r);e.delete(`intent`),i(e,{replace:!0})},[r,i]),(0,b.useLayoutEffect)(()=>{if(!m.current||h.current)return;let e=()=>{let e=p.current;!e||h.current||(h.current=!0,e.scrollIntoView({behavior:`smooth`,block:`start`}))},t=window.requestAnimationFrame(()=>{window.requestAnimationFrame(e)});return()=>window.cancelAnimationFrame(t)},[]);let g=()=>{let t={};return a.fullName.trim().length<2&&(t.fullName=e(`contact.validationFullName`)),/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(a.email)||(t.email=e(`contact.validationEmail`)),a.subject.trim().length<5&&(t.subject=e(`contact.validationSubject`)),a.message.trim().length<10&&(t.message=e(`contact.validationMessage`)),c(t),Object.keys(t).length===0},_=async n=>{if(n.preventDefault(),g()){u(!0),f(null);try{let n=await Ro({full_name:a.fullName.trim(),email:a.email.trim(),company:a.company.trim()||void 0,subject:a.subject.trim(),message:a.message.trim()});o(QM),c({}),t({type:`success`,message:n.message||e(`contact.successFallback`)})}catch(t){f(zo(t,e))}finally{u(!1)}}},v=(e,t)=>{o(n=>({...n,[e]:t})),s[e]&&c(t=>({...t,[e]:void 0}))};return(0,V.jsxs)(`div`,{className:`relative flex flex-col overflow-hidden`,children:[(0,V.jsxs)(`div`,{className:`pointer-events-none absolute inset-0 -z-10 overflow-hidden`,"aria-hidden":`true`,children:[(0,V.jsx)(`div`,{className:`absolute -top-[5%] -left-[5%] h-[600px] w-[600px] rounded-full bg-primary/5 blur-[120px] dark:bg-primary/10`}),(0,V.jsx)(`div`,{className:`absolute top-[20%] -right-[10%] h-[700px] w-[500px] bg-primary/14 opacity-75 dark:bg-primary/5 dark:opacity-60`,style:{clipPath:`polygon(100% 0%, 0% 15%, 15% 100%, 100% 85%)`}}),(0,V.jsx)(`div`,{className:`absolute bottom-[10%] left-[5%] h-80 w-80 rounded-full bg-accent/5 blur-[110px] dark:bg-accent/10`})]}),(0,V.jsx)(`section`,{className:`relative overflow-x-clip pt-14 pb-10 sm:pt-20 sm:pb-16 md:pt-24 md:pb-20 lg:pt-32`,children:(0,V.jsxs)(`div`,{className:`container mx-auto max-w-7xl px-4 sm:px-5 lg:px-6 text-center lg:text-left`,children:[(0,V.jsxs)(`div`,{className:`mx-auto inline-flex max-w-full flex-wrap items-center justify-center gap-2 rounded-full border border-border bg-surface-elevated px-3 py-1.5 text-xs font-bold uppercase tracking-widest text-primary transition-all hover:border-primary/30 sm:px-4 sm:text-sm lg:mx-0 lg:justify-start`,children:[(0,V.jsx)(TA,{size:14,className:`shrink-0`}),(0,V.jsx)(`span`,{className:`min-w-0 text-pretty leading-snug`,children:e(`contact.heroBadge`)})]}),(0,V.jsxs)(`h1`,{className:`mx-auto mt-6 max-w-[22rem] text-balance text-3xl font-black leading-[1.05] tracking-tighter text-foreground min-[400px]:max-w-none sm:mt-8 sm:text-5xl md:text-6xl lg:mx-0 lg:max-w-none lg:text-7xl xl:text-8xl`,children:[e(`contact.heroTitle`),` `,(0,V.jsx)(`br`,{className:`hidden lg:block`}),(0,V.jsx)(`span`,{className:`bg-[image:var(--grad-primary)] bg-clip-text pb-1 text-transparent`,children:e(`contact.heroTitleAccent`)})]}),(0,V.jsx)(`p`,{className:`mx-auto lg:mx-0 mt-6 max-w-2xl text-base leading-relaxed text-muted-foreground sm:mt-8 sm:text-xl md:text-2xl`,children:e(`contact.heroSubtitle`)})]})}),(0,V.jsx)(`section`,{className:`pb-16 sm:pb-24 lg:pb-40`,children:(0,V.jsx)(`div`,{className:`container mx-auto max-w-7xl px-4 sm:px-5 lg:px-6`,children:(0,V.jsxs)(`div`,{className:`grid grid-cols-1 gap-10 sm:gap-12 lg:grid-cols-12 lg:gap-10`,children:[(0,V.jsxs)(`div`,{className:`space-y-6 sm:space-y-8 lg:col-span-4`,children:[(0,V.jsx)(`div`,{className:`grid grid-cols-1 gap-4`,children:(0,V.jsxs)(`div`,{className:`group relative overflow-hidden rounded-[1.5rem] border border-border bg-surface p-6 transition-all hover:border-primary/40 hover:shadow-2xl hover:shadow-
33primary/5 sm:rounded-[2rem] sm:p-8`,children:[(0,V.jsx)(`div`,{className:`flex h-11 w-11 items-center justify-center rounded-2xl bg-primary/10 text-primary transition-transform group-hover:scale-110 sm:h-12 sm:w-12`,children:(0,V.jsx)(bA,{size:24})}),(0,V.jsx)(`h3`,{className:`mt-6 text-lg font-black tracking-tight text-foreground sm:text-xl`,children:e(`contact.supportTitle`)}),(0,V.jsx)(`p`,{className:`mt-2 break-all text-base font-bold text-primary sm:text-lg`,children:`[email protected]`}),(0,V.jsxs)(`div`,{className:`mt-4 flex items-center gap-2 text-sm text-muted-foreground`,children:[(0,V.jsx)(Uk,{size:14}),(0,V.jsx)(`span`,{children:e(`contact.avgResponse`)})]})]})}),(0,V.jsxs)(`div`,{className:`group relative overflow-hidden rounded-[1.5rem] border border-border bg-surface p-6 transition-all hover:border-primary/40 hover:shadow-2xl hover:shadow-primary/5 sm:rounded-[2rem] sm:p-8`,children:[(0,V.jsx)(`div`,{className:`flex h-11 w-11 items-center justify-center rounded-2xl bg-primary/10 text-primary transition-transform group-hover:scale-110 sm:h-12 sm:w-12`,children:(0,V.jsx)(xA,{size:24})}),(0,V.jsx)(`h3`,{className:`mt-6 text-lg font-black tracking-tight text-foreground sm:text-xl`,children:e(`contact.officeTitle`)}),(0,V.jsxs)(`div`,{className:`mt-2`,children:[(0,V.jsx)(`p`,{className:`text-base font-bold text-foreground sm:text-lg`,children:e(`contact.company`)}),(0,V.jsx)(`p`,{className:`text-base font-medium text-muted-foreground`,children:e(`contact.addressLine1`)}),(0,V.jsx)(`p`,{className:`text-base font-medium text-muted-foreground`,children:e(`contact.addressLine2`)}),(0,V.jsx)(`p`,{className:`text-base font-medium text-muted-foreground`,children:e(`contact.city`)}),(0,V.jsx)(`p`,{className:`text-base font-medium text-muted-foreground`,children:e(`contact.postalCode`)}),(0,V.jsx)(`p`,{className:`text-base font-medium text-muted-foreground`,children:e(`contact.country`)}),(0,V.jsx)(`p`,{className:`mt-2 text-base font-bold text-primary sm:text-lg`,children:`+15149673342`})]})]}
33),(0,V.jsxs)(`div`,{className:`flex items-start gap-4 rounded-2xl border border-border bg-surface-elevated/50 p-5 sm:items-center sm:p-6`,children:[(0,V.jsx)(Vk,{className:`text-success h-8 w-8 shrink-0`}),(0,V.jsx)(`p`,{className:`text-sm font-medium text-muted-foreground`,children:e(`contact.socialProof`,{count:e(`contact.socialProofCount`)})})]})]}),(0,V.jsx)(`div`,{ref:p,className:`scroll-mt-24 lg:col-span-8`,children:(0,V.jsxs)(`div`,{className:`relative overflow-hidden rounded-[1.75rem] border border-border bg-surface p-5 shadow-2xl sm:rounded-[2.5rem] sm:p-10 md:p-12 lg:p-16`,children:[(0,V.jsx)(`div`,{className:`absolute inset-0 -z-10 opacity-[0.03]`,style:{backgroundImage:`radial-gradient(circle at 2px 2px, currentColor 1px, transparent 0)`,backgroundSize:`32px 32px`}}),(0,V.jsxs)(`div`,{className:`mb-8 sm:mb-10`,children:[(0,V.jsx)(`h2`,{className:`text-2xl font-black tracking-tight text-foreground sm:text-3xl md:text-4xl`,children:e(`contact.formTitle`)}),(0,V.jsx)(`p`,{className:`mt-3 text-base text-muted-foreground sm:text-lg`,children:e(`contact.formSubtitle`)})]}),(0,V.jsxs)(`form`,{className:`space-y-6 sm:space-y-8`,onSubmit:_,noValidate:!0,children:[d&&(0,V.jsxs)(`div`,{role:`alert`,className:`flex items-start gap-3 rounded-2xl border border-error/30 bg-error/5 px-4 py-3 text-sm font-medium text-error`,children:[(0,V.jsx)(Bk,{size:18,className:`mt-0.5 shrink-0`}),(0,V.jsx)(`span`,{children:d})]}),(0,V.jsxs)(`div`,{className:`grid grid-cols-1 gap-6 sm:grid-cols-2 sm:gap-8`,children:[(0,V.jsx)($M,{label:e(`contact.fullName`),id:`fullName`,placeholder:e(`contact.fullNamePlaceholder`),value:a.fullName,error:s.fullName,onChange:e=>v(`fullName`,e),required:!0}),(0,V.jsx)($M,{label:e(`common.email`),id:`email`,type:`email`,placeholder:e(`contact.emailPlaceholder`),value:a.email,error:s.email,onChange:e=>v(`email`,e),required:!0})]}),(0,V.jsxs)(`div`,{className:`grid grid-cols-1 gap-6 sm:grid-cols-2 sm:gap-8`,children:[(0,V.jsx)($M,{label:e(`contact.companyOptional`),id:`company`,placeholder:e(`contact.companyPlaceholder`),value:a.company,onChange:e=>v(`company`,e)}),(0,V.jsx)($M,{label:e(`contact.subject`),id:`subject`,placeholder:e(`contact.subjectPlaceholder`),value:a.subject,error:s.subject,onChange:e=>v(`subject`,e),required:!0})]}),(0,V.jsxs)(`div`,{className:`space-y-3`,children:[(0,V.jsxs)(`label`,{htmlFor:`message`,className:`flex flex-col gap-1 text-xs font-black uppercase tracking-widest text-muted-foreground sm:flex-row sm:items-center sm:justify-between`,children:[e(`contact.message`),(0,V.jsx)(`span`,{className:`text-[10px] opacity-50`,children:e(`contact.messageMinHint`)})]}),(0,V.jsxs)(`div`,{className:`relative`,children:[(0,V.jsx)(`textarea`,{id:`message`,value:a.message,onChange:e=>v(`message`,e.target.value),rows:5,required:!0,className:`w-full resize-none overflow-y-auto scrollbar-none rounded-2xl border bg-surface-elevated/50 px-4 py-4 text-base text-foreground outline-none transition-all placeholder:text-muted-foreground/30 focus:bg-surface focus:ring-0 focus:ring-offset-0 focus-visible:ring-0 focus-visible:ring-offset-0 sm:px-6 sm:py-5 ${s.message?`border-error/50 focus:border-error`:`border-border focus:border-primary`}`,placeholder:e(`contact.messagePlaceholder`)}),s.message&&(0,V.jsx)(`div`,{className:`absolute right-4 top-4 text-error`,children:(0,V.jsx)(Bk,{size:20})})]}),s.message&&(0,V.jsx)(`p`,{className:`text-xs font-bold text-error`,children:s.message})]}),(0,V.jsxs)(`button`,{type:`submit`,disabled:l,className:`group relative flex min-h-[3.5rem] w-full items-center justify-center overflow-hidden rounded-[1.25rem] bg-primary px-4 text-base font-black text-primary-foreground shadow-2xl shadow-primary/20 transition-all hover:bg-primary-hover hover:shadow-primary/40 active:scale-[0.98] disabled:opacity-70 sm:min-h-[4.25rem] sm:text-lg lg:min-h-[4.5rem] lg:text-xl`,children:[l?(0,V.jsxs)(`div`,{className:`flex items-center gap-3`,children:[(0,V.jsx)(`div`,{className:`h-5 w-5 animate-spin rounded-full border-2 border-primary-foreground border-t-transparent`}),(0,V.jsx)(`span`,{children:e(`contact.submitting`)})]}):(0,V.jsxs)(`span`,{className:`flex items-center gap-3`,children:[e(`contact.submit`),(0,V.jsx)(WA,{size:22,className:`transition-transform group-hover:translate-x-1 group-hover:-translate-y-1`})]}),(0,V.jsx)(`div`,{className:`absolute inset-0 -z-10 translate-y-full bg-white/10 transition-transform group-hover:translate-y-0`})]})]})]})})]})})})]})}function $M({label:e,id:t,value:n,onChange:r,placeholder:i,error:a,required:o=!1,t
33ype:s=`text`}){return(0,V.jsxs)(`div`,{className:`space-y-3`,children:[(0,V.jsxs)(`label`,{htmlFor:t,className:`block text-xs font-black uppercase tracking-widest text-muted-foreground`,children:[e,` `,o&&(0,V.jsx)(`span`,{className:`text-primary`,children:`*`})]}),(0,V.jsxs)(`div`,{className:`relative`,children:[(0,V.jsx)(`input`,{id:t,type:s,value:n,onChange:e=>r(e.target.value),required:o,placeholder:i,className:`w-full rounded-2xl border bg-surface-elevated/50 px-4 py-4 text-base text-foreground outline-none transition-all placeholder:text-muted-foreground/30 focus:bg-surface focus:ring-0 focus:ring-offset-0 focus-visible:ring-0 focus-visible:ring-offset-0 sm:px-6 sm:py-4.5 ${a?`border-error/50 focus:border-error`:`border-border focus:border-primary`}`}),a&&(0,V.jsx)(`div`,{className:`absolute right-5 top-1/2 -translate-y-1/2 text-error`,children:(0,V.jsx)(Bk,{size:20})})]}),a&&(0,V.jsx)(`p`,{className:`text-xs font-bold text-error`,children:a})]})}var eN=!!((void 0)?.trim()&&(void 0)?.trim()),tN={info(e,t={}){eN&&kv.logger.info(e,t)}},nN=kv,rN=8,iN=8,hse=250,aN=96;function oN(e,t){let n=t?.maxAbsPx??hse,r=e.getBoundingClientRect(),i=window.innerWidth,a=window.innerHeight,o=a-r.bottom-rN-iN,s=r.top-rN-iN,c=o>=200||o>=s&&o>=aN?`bottom`:`top`,l=Math.min(n,Math.max(aN,Math.floor(c===`bottom`?o:Math.max(0,s)))),u=Math.max(0,i-2*iN),d=i<640,f=d?u:Math.min(Math.max(r.width,200),u),p=d?iN:Math.max(iN,Math.min(r.left,i-f-iN));return c===`bottom`?{placement:c,left:p,width:f,maxHeight:l,top:r.bottom+rN,bottom:null}:{placement:c,left:p,width:f,maxHeight:l,top:null,bottom:a-r.top+rN}}function sN({label:e,value:t,onChange:n,items:r,error:i,errorMessage:a,onOpen:o,vehicleCategorySearchHref:s=`/dashboard/searches/new`}){let c=my(),[l,u]=(0,b.useState)(!1),d=(0,b.useRef)(null),f=(0,b.useRef)(null),[p,m]=(0,b.useState)(null),h=(0,b.useMemo)(()=>r.find(e=>e.value!=null&&t===e.value),[r,t]),g=(0,b.useCallback)(()=>{d.current&&m(oN(d.current))},[]);(0,b.useLayoutEffect)(()=>{if(l)return g(),window.addEventListener(`scroll`,g,!0),window.addEventListener(`resize`,g),()=>{window.removeEventListener(`scroll`,g,!0),window.removeEventListener(`resize`,g)}},[l,g]);let _=l?p:null;return(0,b.useEffect)(()=>{if(!l)return;let e=e=>{let t=e.target;d.current?.contains(t)||f.current?.contains(t)||u(!1)};return document.addEventListener(`click`,e,!0),()=>document.removeEventListener(`click`,e,!0)},[l]),(0,V.jsxs)(`div`,{className:`space-y-2`,children:[e&&(0,V.jsxs)(`label`,{className:`ml-1 text-[11px] font-black uppercase tracking-widest text-muted-foreground/60`,children:[e,` `,(0,V.jsx)(`span`,{className:`text-error`,children:`*`})]}),(0,V.jsxs)(`div`,{className:`relative`,children:[(0,V.jsxs)(`button`,{ref:d,type:`button`,onClick:()=>u(e=>{let t=!e;return t&&o?.(),t}),className:`flex min-h-12 w-full items-center justify-between gap-2 rounded-xl border-2 px-4 text-left text-sm transition-all sm:h-14 sm:px-6 sm:text-base ${i?`border-error/40 bg-error/5`:l?`border-primary bg-primary/5 shadow-lg`:`border-border/60 bg-surface-elevated hover:border-primary/40`}`,children:[(0,V.jsx)(`span`,{className:`flex min-w-0 flex-1 items-center gap-2.5`,children:h?(0,V.jsxs)(V.Fragment,{children:[(0,V.jsx)(`img`,{src:h.image,alt:``,className:`h-5 w-5 shrink-0 rounded-full object-cover ring-1 ring-border/40 sm:h-6 sm:w-6`}),(0,V.jsx)(`span`,{className:`truncate font-medium text-foreground`,children:h.label})]}):(0,V.jsx)(`span`,{className:`font-medium text-muted-foreground`,children:c(`searchWizard.marketplace.selectMarketplace`)})}),(0,V.jsx)(Ik,{size:18,className:`shrink-0 transition-transform duration-300 ${l?`rotate-180 text-primary`:`text-muted-foreground`}`})]}),l&&_&&(0,x.createPortal)((0,V.jsxs)(V.Fragment,{children:[(0,V.jsx)(`div`,{className:`pointer-events-none fixed inset-0 z-[850]`,"aria-hidden":!0}),(0,V.jsx)(ik.div,{ref:f,initial:{opacity:0,y:_.placement===`bottom`?8:-8},animate:{opacity:1,y:0},style:{position:`fixed`,left:_.left,width:_.width,maxHeight:_.maxHeight,..._.placement===`bottom`?{top:_.top,bottom:`auto`}:{top:`auto`,bottom:_.bottom}},className:`pointer-events-auto z-[900] max-w-[calc(100vw-16px)] overflow-hidden rounded-lg border border-border bg-surface shadow-2xl sm:max-w-none ${_.placement===`bottom`?`border-b-2 border-b-primary`:`border-t-2 border-t-primary`}`,children:(0,V.jsx)(`div`,{className:`touch-pan-y overflow-y-auto overscroll-y-contain p-1 custom-scrollbar sm:p-1.5`,style:{maxHeight:_.maxHeight},children:r.map(e=>{let r=e.value!=null&&t===e.value;return e.disabled||e.value==null?(0,V.jsx)(`div`,{role:`presentation`,"aria-disabled":!0,className:`mb-0.5 cursor-not-allowed rounded-lg border border-dashed border-border/70 bg-muted/5 px-2 py-2 text-left last:mb-0 dark:bg-muted/10 sm:px-3`,children:(0,V.jsxs)(`div`,{className:`flex gap-2 sm:gap-2.5`,children:[(0,V.jsx)(`img`,{src:e.image,alt:``,className:`h-6 w-6 shrink-0 rounded-full object-cover opacity-50 ring-1 ring-border/40 grayscale sm:h-7 sm:w-7`}),(0,V.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(0,V.jsxs)(`div`,{className:`flex flex-row items-start justify-between gap-2 sm:items-center`,children:[(0,V.jsx)(`span`,{className:`min-w-0 flex-1 break-words pr-1 text-xs font-medium text-muted-foreground sm:truncate sm:text-sm`,children:e.label}),(0,V.jsxs)(`div`,{className:`flex shrink-0 flex-nowrap items-center gap-1 self-start sm:self-auto`,children:[e.comingSoon&&(0,V.jsx)(`span`,{className:`shrink-0 rounded-full border border-amber-600/35 bg-amber-100 px-1.5 py-px text-[8px] font-bold uppercase tracking-wide text-amber-950 dar
33k:border-amber-400/40 dark:bg-amber-400/15 dark:text-amber-50 sm:px-2 sm:py-0.5 sm:text-[9px]`,children:c(`searchWizard.marketplace.comingSoon`)}),e.vehicleCategoryOnly&&(0,V.jsx)(`span`,{className:`shrink-0 rounded-full border border-border-strong bg-background px-1.5 py-px text-[8px] font-bold uppercase tracking-wide text-foreground shadow-sm dark:bg-surface-elevated sm:px-2 sm:py-0.5 sm:text-[9px]`,children:c(`searchWizard.marketplace.vehicleSearch`)})]})]}),e.vehicleCategoryOnly&&(0,V.jsxs)(`p`,{className:`mt-1.5 text-[10px] leading-snug text-muted-foreground sm:mt-0.5 sm:text-[11px]`,children:[c(`searchWizard.marketplace.autotraderVehicleOnly`),` `,(0,V.jsx)(zi,{to:s,className:`font-semibold text-primary underline-offset-2 hover:underline`,onClick:()=>u(!1),children:c(`searchWizard.marketplace.useCategoryOrVehicle`)}),`.`]})]})]})},e.id):(0,V.jsxs)(`button`,{type:`button`,onClick:()=>{n(e.value),u(!1)},className:`mb-0.5 flex w-full items-center gap-2 rounded-lg border border-transparent px-2 py-2 text-left text-xs transition-all last:mb-0 sm:gap-2.5 sm:px-2 sm:py-1.5 sm:text-sm ${r?`border-transparent bg-primary text-primary-foreground shadow-md`:`text-foreground hover:border-border/80 hover:bg-muted/25 dark:hover:bg-muted/15`}`,children:[(0,V.jsx)(`img`,{src:e.image,alt:``,className:`h-6 w-6 shrink-0 rounded-full object-cover ring-1 ring-border/30 sm:h-7 sm:w-7`}),(0,V.jsx)(`span`,{className:`min-w-0 flex-1 break-words font-semibold sm:truncate ${r?`text-primary-foreground`:`text-foreground`}`,children:e.label}),r&&(0,V.jsx)(Fk,{size:14,strokeWidth:3,className:`shrink-0`})]},e.id)})})})]}),document.body)]}),i&&(0,V.jsxs)(`p`,{className:`ml-1 flex items-center gap-1 text-[11px] font-bold text-error`,children:[(0,V.jsx)(Bk,{size:12}),` `,a?.trim()||c(`searchWizard.marketplace.selectMarketplaceError`)]})]})}function cN(e){let t=e.map(e=>e==null?``:String(e)).join(`�`),n=5381;for(let e=0;e<t.length;e++)n=(n<<5)+n^t.charCodeAt(e);return(n>>>0).toString(36)}function gse(e){return e.trim().toLowerCase().replace(/\s+/g,` `)}function lN(e){return cN([`query`,gse(e.searchKey),e.provider.trim().toLowerCase(),e.cityId])}function _se(e){if(String(e.search_type??``).toLowerCase()!==`query`)return null;let t=String(e.city_id??``),n=String(e.search_key??``),r=String(e.provider??``).trim().toLowerCase();return!t||!n||!r?null:{id:String(e.id??``),name:String(e.name??``),isActive:!!e.is_active,identityHash:lN({searchKey:n,provider:r,cityId:t})}}function uN(e,t){let n=lN(e);for(let e of t)if(e.identityHash===n)return e.isActive?`You already have an active search named â${e.name}â with this query, marketplace, and city.`:`A paused search named â${e.name}â already uses this query, marketplace, and city. Change the query or city to create a new search.`;return null}function vse(e){return e.makeModelAny?`any`:[...e.pairs].sort((e,t)=>e.makeId.localeCompare(t.makeId)).map(e=>{let t=[...e.modelIds].sort((e,t)=>e.localeCompare(t));return t.length===0?`${e.makeId}:any`:`${e.makeId}:${t.join(`,`)}`}).join(`|`)}function dN(e){return cN([`vehicle`,e.provider.trim().toLowerCase(),e.cityId,e.categoryId,e.subcategoryId,vse({makeModelAny:e.makeModelAny,pairs:e.makeModelPairs})])}function yse(e){if(!Array.isArray(e))return[];let t=new Map;for(let n of e){if(!n||typeof n!=`object`)continue;let e=n;if(e.make_id==null)continue;let r=String(e.make_id);t.has(r)||t.set(r,new Set),e.model_id!=null&&t.get(r).add(String(e.model_id))}return[...t.entries()].sort(([e],[t])=>e.localeCompare(t)).map(([e,t])=>({makeId:e,modelIds:[...t].sort((e,t)=>e.localeCompare(t))}))}function bse(e){if(String(e.search_type??``).toLowerCase()!==`vehicle`)return null;let t=String(e.city_id??``),n=String(e.category_id??``),r=String(e.subcategory_id??``),i=String(e.provider??``).trim().toLowerCase();if(!t||!n||!r||!i)return null;let a=!!e.make_model_any,o={provider:i,cityId:t,categoryId:n,subcategoryId:r,makeModelAny:a,makeModelPairs:a?[]:yse(e.make_model_configs)};return{id:String(e.id??``),name:String(e.name??``),isActive:!!e.is_active,identityHash:dN(o)}}function fN(e,t){let n=dN(e);for(let e of t)if(e.identityHash===n)return e.isActive?`You already have an active search named â${e.name}â with this vehicle setup, marketplace, and city.`:`A paused search named â${e.name}â already uses this vehicle setup, marketplace, and city. Change the city or vehicle filters to create a new search.`;return null}var pN=100;async function xse(){let e=[],t=1;for(;;){let n=await Lo.get(`/api/searches/`,{query:{page:t,per_page:pN}}),r=(n.data.searches??[]).map(e=>_j(e));if(e.push(...r),!n.data.has_next||t>50)break;t+=1}return e}async function mN(){let e=[],t=1;for(;;){let n=await Lo.get(`/api/searches/`,{query:{page:t,per_page:pN}});if(e.push(...n.data.searches??[]),!n.data.has_next||t>50)break;t+=1}return e}var hN=[1,2,5,10,20,40,60,80,100,250,500],Sse=2e3,gN=`/assets/autotrader-B7qxAsPl.png`,_N=`/assets/facebook-FvZpqlEW.png`,vN=`data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAALQAAAC0CAMAAAAKE/YAAAAAwFBMVEX///83M3M1MXI2MnL5qhfyRU+bRK03qGT+/v4mgduYl7g9OXhNSYP8/Py4t846N3ZEQH3z8/j5+PrKydrt7PJtapnZ2OW2tMyBfqd4dqFiX
335Lm5+/R0N9cWY6vrsjg3+ojgNuMiq+job/+57pUUIj+9e5Ns3XBwNTm8/T+5uRxrenK6db7tzeg17Z0w5RQmuSwar/0WGHv1uf5nKGkU7WaxfD7u77RqNr2a3PCjM38x2L91Ibgw+X4hIrB2/U3jN/WKbbfAAAG10lEQVR42u2baXeqMBBAEbpEIbK7K4K7bbXLs63Vtv//X73YRSYIAmoVz5n7sTbkGiaTSUBBQBAEQRAEQRAEQRAEQRAEQRAEQRAEQRAEQQ4JHY1GvTQNiDEcDukplXvP768PD69Po8TKN3eTfr8/uTmd9uj98pvXZ5Lsvtz1r7+5G+7cKyEHcb68fHhO5ny9ZmKktzV0p1H03EJ9j3B+uvR5TRIhN31fun+Xrjfd9NxqravJOVEu7i79+ACkL5/ib5oxuQZM0gVIS8tJoihJuZwkl3cPrWfofPkam0PIsA+lr29S9VZguj/sI/3EST+MUkXHai6mk87tIE0pf/8JDUg/bjSgwXR3vVWaGPSg0r3O4u1t0eltGWl+JlJnNh6PZ3WaeKSt5Xw+f1nqh5ImnbeLL946cLT5mH43YPTOPvPtdj4/nUGJITcR+zCmjeX91Yp/88cDSXduL364hdajVygNE/VwnGfGjHZ+rIenaT5R05d/Vz/cPx5E2ndeWcOhBjnvHYSOMc77zPwIoXCouYFerp2Zdf0A0vTtAvAGotR4egiN6I/P9tq5/VmHU7Hvry3gnun3V4AXsrc06d1C6VtoZzx/R8gDVzGRcTsPh5pL1ZNv7ckNiRhoNtT6/iPdueDo8OXH89P7+9MjlyT0KZRujymX1liZN7m7GQpQ+gU6X/173FuabpVe5etgdh1C6XZ7vFEZUSGQ8gPSyz8e6TCGW0Y6nIOPNJc8Aukj4t6MuZGexeenJSd9b+0v3eOzR4K91QwO9OdHfAOLyx5zeog8nS46AjNxHF/sEy6oQ6MjtTRd+M6LRHu7j7V1e5pol6HPfefQNJ1+GaeLn7C+XSTceH9MWTCvio9xsp0R0ec/qfp+SVMu4/qg5VN2QMW0uGUsOqFrlWE5DTMweYaz8XQ6HX8E1on6wCzVLZ2SzYss5/eMF0cg6aSpp6mACozGHmPjcrpjFr93bpoX/HB1vBEMZ8OVNaVbq1Zcr1wKNqC6ZekkdT1d1PwtTU5SC/yN2rxevaposioyJLFCE+z0dZtt8r7+X1Vr9c0GJP0moNEVc4CqFReJpib+fssQ6bD5Zq97EJVSus1duHTdhs5SzRHipdd3JrW0dAhpolfgMIvdhpB9aaOgwoBWBkL2pUmZm4Rai5yBtAknoSQXQtdelpSMVNIshevppFkX7EIs+RnEIDHSTg2Mc06t6MFL1UuDVqFiN7lvs0WaLTjfKdx2kkn/dFG1a+wmN9yW1/CM7dJWFU5CyeZTKB1U7K6iqTmWYGtWEmnHtZssha8O37jDwkhpo8VWKOWrgVg1BL3VYAuQvlU6MAmbgRtn1cTvkz/mlkzak34b5JJJlxS/CyZtDJyWV9wqTVpwEoqKGVz4mv6SkEwadpBIuqH4V2LSAmWbOLo1pgcKnIRamZxeOjZ7lJpc4vA20kD2pIuWzSUOd/PQIXvSnqvGVUmZk84pshRXJWVPGsaGFF4lZU8aOivhT42yLC1pHj0/6W5E2Z/p8FBd4/yk2WJ4ftKbpVJWpbmlJVfVz0FadeEqzioPcgbSctFUuA2teQ7SZeJxC7ldPwdptteCS3luM+9lUVoocTtxrXgW0kILBoi4kfeyKa27XN4LHiBkU1pwauKWvJdRaWHAHYp1zbOQNgpq9GlNVqWFOr+95U6/Mist8AujNjgLaerBABGbzjlIBxdGkPcyLM0/J4J5L8vSAn8O6R8nZFqaf1Qk2dY5SPMLo5/3MiIt+aHL7WWLmhhyUL2DdEQHW6TFGGkWvOvn3/xOxSjI4Nn4b7K2qv7fuE1kpHRUB5HSTnPdQHbDj4z0QfEX04j6BHzm+H9zIp5uSZx0VAeR0rSxbjCIfbq9FwSUWZKb4MEj0f1JE3me9deUZX8GFJI0sHxpsVk/jbQHUo2XpIHT9VeCmnUSZ+qK4Zkt0XPpqnEKZwJSoaSZKZ9vi+5Jfp5DPBks+kmmlQOeoyWLp0NjlEEFLtp6AucqLMiKx9V1ygPTLFe4beXWjGcMimZj4DWTnOD/2fxTZU1TxcidzgYNRdVWvwSC0keeh6tlTeI2DIGSJCSfSxLfYp8fBe2E1RSDh/Fya/uM3Ti+F+0jZ+mSIqVTgPk88sDwjzG1gLSobE/SenVD2j32ylJWA85xb2lZNV5aylWPXncUguPconEVByctqcd3phW4aRdV2yRp4kmUlMLxSyUmvXrd6OtFV0mrteINTNlvoSqVximKjkal1lSUr1eKC6YlxBf/VmH17pimKU270iqdpLj7eoXOKZVKjpW0f/LToK6f9PfiO1WFREAQBEEQBEEQBEEQBEEQBEEQBEEQBEGQv+U/UJrdu+MALEQAAAAASUVORK5CYII=`,Cse=[{id:`facebook`,label:`Facebook Marketplace`,image:_N,apiProvider:`facebook`,disabled:!1},{id:`kijiji`,label:`Kijiji`,image:vN,apiProvider:`kijiji`,disabled:!1},{id:`autotrader`,label:`AutoTrader`,image:gN,apiProvider:null,disabled:!0,vehicleCategoryOnly:!0}].map(e=>({id:e.id,label:e.label,image:e.image,value:e.apiProvider,disabled:e.disabled,comingSoon:e.comingSoon,vehicleCategoryOnly:e.vehicleCategoryOnly}));function yN(e,t){return e?.length?[...e].sort((e,t)=>e.tier_order-t.tier_order).map((e,n)=>{let r=t[n],i=e.max_searches,a=r?.usage??0;return{intervalMinutes:e.notification_interval_minutes,used:a,limit:i,remaining:Math.max(0,i-a)}}):[]}function bN(e){return e.reduce((e,t)=>e+t.remaining,0)}function xN(e,t){if(!t?.wasActive)return e;let n=[];return t.mainInterval!=null&&n.push(t.mainInterval),n.push(...Object.values(t.hubIntervals)),n.length===0?e:e.map(e=>{let t=n.filter(t=>t===e.intervalMinutes).length;return t<=0?e:{...e,remaining:e.remaining+t}})}function SN(e){return e.reduce((e,t)=>e+t.length,0)}function CN(e,t,n){let r=SN(n);return r>150?e(`searchWizard.validation.keywordsMaxTotal`,{max:150}):r+t.length>150?e(`searchWizard.validation.keywordsMaxTotalTyping`,{max:150}):t.trim()?e(`searchWizard.validation.keywordPressEnter`):null}function wN(e,t){let n=t.trim();return n?n.length>30?e(`searchWizard.validation.searchNameMax`,{max:30}):null:e(`searchWizard.validation.searchNameRequired`)}function TN(e,t){let n=t.trim();return n?n.length<3?e(`searchWizard.validation.searchTermMin`,{min:3}):n.length>100?e(`searchWizard.validation.searchTermMax`,{max:100}):null:e(`searchWizard.validation.searchTermRequired`)}function EN(e,t,n){let r=t.trim(),i=n.trim();if(!r&&!i)return{};let a,o;if(r){let t=Number(r);
33if(!Number.isFinite(t))return{min:e(`searchWizard.validation.validNumber`)};if(t<0)return{min:e(`searchWizard.validation.priceNegative`)};a=t}if(i){let t=Number(i);if(!Number.isFinite(t))return{max:e(`searchWizard.validation.validNumber`)};if(t<0)return{max:e(`searchWizard.validation.priceNegative`)};o=t}return a!=null&&o!=null&&a>o?{range:e(`searchWizard.validation.priceRangeInvalid`)}:{}}function DN(e,t,n){if(!t)return null;let r=n.trim();return r?r.split(/\r\n|\r|\n/).length>30?e(`searchWizard.validation.defaultMessageMaxLines`,{max:30}):r.length>2e3?e(`searchWizard.validation.defaultMessageMaxChars`,{max:Sse}):null:e(`searchWizard.validation.defaultMessageRequired`)}function ON(e){let{mainInterval:t,hubIds:n,hubIntervals:r,hubUnsetInterval:i}=e,a=new Map;t!=null&&a.set(t,(a.get(t)??0)+1);for(let e of n){let n;n=r[e]===void 0?i===void 0?t:i:r[e],n!=null&&a.set(n,(a.get(n)??0)+1)}return a}function kN(e,t){let{availability:n,mainInterval:r,hubIds:i,hubIntervals:a,hubUnsetInterval:o}=t,s=ON({mainInterval:r,hubIds:i,hubIntervals:a,hubUnsetInterval:o});for(let[t,r]of s){let i=n.find(e=>e.intervalMinutes===t)?.remaining??0;if(i<r)return r>1?e(`searchWizard.validation.quotaNeedSlots`,{interval:t,count:r,remaining:i}):e(`searchWizard.validation.quotaLimitReached`,{interval:t})}return null}function AN(e){return e.normalize(`NFD`).replace(/\p{M}/gu,``).toLowerCase()}function jN(e){let t=e.trim();if(!t)return null;let n=Number(t);return Number.isFinite(n)?n:null}function MN(e){return{name:e.name.trim(),search_key:e.searchTerm.trim(),search_type:`query`,provider:e.provider,city_id:e.cityId,notification_interval_minutes:e.notificationInterval,include_listings_without_price:e.includeNoPrice,include_keywords:e.includeKeywords,exclude_keywords:e.excludeKeywords,send_default_message:e.showDefaultMessageStep?e.sendDefaultMessage:!1,default_message:e.showDefaultMessageStep&&e.sendDefaultMessage?e.defaultMessage.trim():null,search_radius_km:e.radiusKm??null,price_min:jN(e.priceMinStr),price_max:jN(e.priceMaxStr),hubs:e.hubPairs.map(e=>({city_id:e.cityId,notification_interval_minutes:e.notificationIntervalMinutes}))}}function NN(e,t){return{...MN(e),is_active:t.is_active,category_id:t.category_id,subcategory_id:t.subcategory_id,make_id:t.make_id,model_id:t.model_id,year_min:t.year_min,year_max:t.year_max,mileage_min:t.mileage_min,mileage_max:t.mileage_max,transmission_type:t.transmission_type,fuel_type:t.fuel_type}}async function PN(e){let t=[],n=1;for(;;){let r=await Lo.get(`/api/locations/countries/${e}/cities`,{query:{page:n,per_page:500}}),i=r.data.cities??[];if(t.push(...i),!r.data.has_next||n>10)break;n+=1}return t}async function FN(e,t){let n=(await Lo.get(`/api/locations/countries`,{query:{provider:e}})).data.countries??[];for(let e of n)if((await PN(e.id)).some(e=>e.id===t))return e.id;return null}function IN(e){return e==null||e===``?null:String(e)}function LN(e){if(e==null)return null;if(typeof e==`number`&&Number.isFinite(e))return e;if(typeof e==`string`&&e.trim()){let t=Number(e);return Number.isFinite(t)?t:null}return null}function RN(e){return{is_active:!!e.is_active,category_id:IN(e.category_id),subcategory_id:IN(e.subcategory_id),make_id:IN(e.make_id),model_id:IN(e.model_id),year_min:LN(e.year_min),year_max:LN(e.year_max),mileage_min:LN(e.mileage_min),mileage_max:LN(e.mileage_max),transmission_type:IN(e.transmission_type),fuel_type:IN(e.fuel_type)}}function zN(e){let{hubsSortedByDistance:t,selectedHubIds:n,mainCityLabel:r}=e,i=t.filter(e=>n.includes(e.id)),a=[{kind:`main`,name:r},...i.map(e=>({kind:`hub`,hub:e,name:e.name}))];return a.sort((e,t)=>e.name.localeCompare(t.name,void 0,{sensitivity:`base`})),a}function BN({label:e,value:t,onChange:n,options:r,placeholder:i,loading:a,menuLoading:o,menuLoadingHint:s,disabled:c,searchable:l,isolateMenuScroll:u=!1,required:d,error:f,onMenuOpen:p,menuError:m,menuEmptyHint:h,onRetryFromMenu:g}){let _=my(),v=i??_(`searchWizard.selectPlaceholder`),y=s??_(`common.loading`),[S,C]=(0,b.useState)(!1),[w,T]=(0,b.useState)(``),E=(0,b.useRef)(null),D=(0,b.useRef)(null),O=(0,b.useRef)(null),[k,A]=(0,b.useState)(null),j=r.find(e=>e.value===t),M=(0,b.useCallback)(()=>{E.current&&A(oN(E.current))},[]);(0,b.useLayoutEffect)(()=>
33{if(S)return M(),window.addEventListener(`scroll`,M,!0),window.addEventListener(`resize`,M),()=>{window.removeEventListener(`scroll`,M,!0),window.removeEventListener(`resize`,M)}},[S,M,o,m,r.length]);let N=S?k:null,P=!!N&&!o&&!(m&&r.length===0)&&r.length>0,F=u&&P,ee=(0,b.useMemo)(()=>{if(!l||!w.trim())return r;let e=AN(w.trim());return r.filter(t=>AN(t.label+(t.menuTrailing?` ${t.menuTrailing}`:``)).includes(e))},[r,l,w]);(0,b.useLayoutEffect)(()=>{if(!u||!S||!k||o||r.length===0)return;let e=D.current;if(!e)return;let t=t=>{if(t.ctrlKey)return;let{scrollTop:n,scrollHeight:r,clientHeight:i}=e,a=n<=1,o=n+i>=r-1;t.deltaY>0&&!o||t.deltaY<0&&!a||(t.preventDefault(),t.stopPropagation())};return e.addEventListener(`wheel`,t,{passive:!1}),()=>e.removeEventListener(`wheel`,t)},[u,S,k,o,r.length,w,l]),(0,b.useEffect)(()=>{if(!S||!u)return;let e=e=>{let t=e.target;E.current?.contains(t)||O.current?.contains(t)||C(!1)};return document.addEventListener(`click`,e,!0),()=>document.removeEventListener(`click`,e,!0)},[S,u]);let I=c||a;return(0,V.jsxs)(`div`,{className:`space-y-2`,children:[e&&(0,V.jsxs)(`label`,{className:`ml-1 text-[11px] font-black uppercase tracking-widest text-muted-foreground/60`,children:[e,` `,d&&(0,V.jsx)(`span`,{className:`text-error`,children:`*`})]}),(0,V.jsxs)(`div`,{className:`relative`,children:[(0,V.jsxs)(`button`,{ref:E,type:`button`,disabled:I,onClick:()=>{c||a||C(e=>{let t=!e;return t&&p?.(),t})},className:`flex min-h-12 w-full items-center justify-between gap-2 rounded-xl border-2 px-4 text-left text-sm transition-all sm:h-14 sm:px-6 sm:text-base ${I?`cursor-not-allowed border-border/60 bg-surface-elevated text-muted-foreground opacity-95`:f?`border-error/40 bg-error/5`:S?`border-primary bg-primary/5 shadow-lg`:`border-border/60 bg-surface-elevated hover:border-primary/40`}`,children:[(0,V.jsx)(`span`,{className:`flex min-w-0 flex-1 items-center gap-2.5`,children:(0,V.jsx)(`span`,{className:`min-w-0 flex-1 truncate ${a||j||t?.trim()?`font-medium text-foreground`:`font-medium text-muted-foreground`}`,children:a?_(`searchWizard.loadingEllipsis`):j?j.label:t&&/^\d+$/.test(t)?_(`searchWizard.minIntervalLabel`,{mins:t}):t||v})}),(0,V.jsx)(Ik,{size:18,className:`shrink-0 transition-transform duration-300 ${S?`rotate-180 text-primary`:I?`text-muted-foreground/50`:`text-muted-foreground`}`})]}),S&&N&&(0,x.createPortal)((0,V.jsxs)(V.Fragment,{children:[(0,V.jsx)(`div`,{className:u?`pointer-events-none fixed inset-0 z-[850]`:`fixed inset-0 z-[850]`,onClick:u?void 0:()=>C(!1),"aria-hidden":!0}),(0,V.jsx)(ik.div,{ref:O,initial:{opacity:0,y:N.placement===`bottom`?8:-8},animate:{opacity:1,y:0},transition:{duration:.15},style:{position:`fixed`,left:N.left,width:N.width,maxHeight:N.maxHeight,...N.placement===`bottom`?{top:N.top,bottom:`auto`}:{top:`auto`,bottom:N.bottom}},className:`pointer-events-auto z-[900] max-w-[calc(100vw-16px)] overflow-hidden rounded-lg border border-border bg-surface shadow-2xl sm:max-w-none ${F?`overscroll-contain ${l?`grid grid-rows-[auto_minmax(0,1fr)]`:`grid grid-rows-[minmax(0,1fr)]`}`:`flex flex-col`}`,children:o?(0,V.jsxs)(`div`,{className:`flex flex-col items-center justify-center gap-3 px-4 py-14`,role:`status`,"aria-live":`polite`,children:[(0,V.jsx)(_A,{size:28,className:`animate-spin text-primary`,"aria-hidden":!0}),(0,V.jsx)(`p`,{className:`text-center text-sm font-medium text-muted-foreground`,children:y})]}):m&&r.length===0?(0,V.jsxs)(`div`,{className:`flex min-h-[8rem] flex-col items-center justify-center gap-4 px-4 py-8 text-center`,children:[(0,V.jsx)(Bk,{className:`h-9 w-9 shrink-0 text-error`,"aria-hidden":!0}),(0,V.jsx)(`p`,{className:`max-w-sm text-sm font-medium leading-snug text-foreground`,children:m}),g?(0,V.jsx)(`button`,{type:`button`,className:`rounded-lg border-2 border-border/60 bg-surface-elevated px-4 py-2 text-sm font-semibold text-foreground transition-colors hover:border-primary/40 hover:bg-muted/20`,onClick:e=>{e.stopPropagation(),g()},children:_(`common.tryAgain`)}):null]}):r.length===0?(0,V.jsx)(`div`,{className:`flex min-h-[6rem] flex-col items-center justify-center px-4 py-8 text-center`,children:(0,V.jsx)(`p`,{className:`max-w-sm text-sm font-medium leading-snug text-muted-foreground`,children:h??_(`searchWizard.menuEmptyHint`)})}):(0,V.jsxs)(V.Fragment,{children:[l&&(0,V.jsx)(`div`,{className:`shrink-0 border-b border-border/40 p-2`,children:(0,V.jsx)(`input`,{value:w,onChange:e=>T(e.target.value),placeholder:_(`searchWizard.searchPlaceholder`),className:`w-full rounded-lg border border-border/60 bg-muted/15 px-3 py-2 text-sm font-medium outline-none ring-0 transition-colors focus:border-border/60 focus:outline-none focus:ring-0 focus-visible:outline-none focus-visible:ring-0 focus-visible:ring-offset-0`})}),(0,V.jsx)(`div`,{ref:D,className:F?`min-h-0 touch-pan-y overflow-y-auto overscroll-y-contain p-1.5 custom-scrollbar`:`min-h-0 flex-1 overflow-y-auto p-1.5 custom-scrollbar`,children:l&&w.trim()&&ee.length===0?(0,V.jsx)(`div`,{className:`flex min-h-[5rem] items-center justify-center px-3 py-6 text-center text-sm font-medium text-muted-foreground`,children:_(`searchWizard.noSearchMatches`)}):ee.map(e=>{let r=t===e.value,i=!!e.disabled;return(0,V.jsxs)(`button`,{type:`button`,disabled:i,onClick:()=>{i||(n(e.value),C(!1),T(``))},className:`mb-0.5 flex w-full items-center justify-between gap-2 rounded-lg border border-transparent px-2 py-1.5 text-left transition-all last:mb-0 ${i?`cursor-not-allowed opacity-45`:r?`border-transparent bg-primary text-primary-foreground shadow-md`:`text-foreground hover:border-border/80 hover:bg-muted/25 dark:hover:bg-muted/15`}`,children:[(0,V.jsx)(`span`,{className:`min-w-0 flex-1 truncate text-sm font-semibold ${i?`text-muted-foreground`:r?`text-primary-foreground`:`text-foreground`}`,children:e.label}),e.menuTrailing?(0,V.jsx)(`span`,{className:`shrink-0 tabular-nums text-xs font-semibold ${i?`text-muted-foreground`:r?`text-primary-foreground
33/80`:`text-muted-foreground`}`,children:e.menuTrailing}):null]},e.value)})})]})})]}),document.body)]}),f?(0,V.jsxs)(`p`,{className:`ml-1 flex items-center gap-1 text-[11px] font-bold text-error`,children:[(0,V.jsx)(Bk,{size:12}),f]}):null]})}function VN({loc:e,maxSelectableHubs:t,provider:n}){let r=my(),{countryId:i,setCountryId:a,cityId:o,setCityId:s,radiusKm:c,setRadiusKm:l,selectedHubIds:u,setSelectedHubIds:d,countries:f,countriesLoading:p,countriesError:m,cities:h,citiesLoading:g,citiesError:_,hubsSortedByDistance:v,showHubPicker:y,loadCountries:b,loadCitiesForCountry:x,touched:S,setTouchedCountry:C,setTouchedCity:w,setTouchedRadius:T}=e;return(0,V.jsxs)(V.Fragment,{children:[(0,V.jsxs)(`div`,{className:`grid grid-cols-1 gap-6 sm:gap-8 md:grid-cols-2`,children:[(0,V.jsx)(BN,{label:r(`searchWizard.location.country`),required:!0,isolateMenuScroll:!0,value:i,menuLoading:p,menuLoadingHint:r(`searchWizard.location.loadingCountries`),menuError:m,menuEmptyHint:r(`searchWizard.location.noCountries`),searchable:!0,onRetryFromMenu:()=>{n&&b(n)},onMenuOpen:()=>{C(),n&&!p&&m&&b(n)},options:f.map(e=>({label:e.name,value:e.id})),error:S.country&&!i?r(`searchWizard.location.selectCountry`):null,onChange:e=>{a(e),C()}}),(0,V.jsx)(BN,{label:r(`searchWizard.location.city`),required:!0,isolateMenuScroll:!0,value:o,disabled:!i,menuLoading:!!(i&&g),menuLoadingHint:r(`searchWizard.location.loadingCities`),menuError:_,menuEmptyHint:r(`searchWizard.location.noCities`),onRetryFromMenu:()=>{i&&x(i)},onMenuOpen:()=>{w(),i&&!g&&_&&x(i)},placeholder:r(i?`searchWizard.location.selectCity`:`searchWizard.location.selectCountryFirst`),searchable:!0,options:h.map(e=>({label:e.name,value:e.id})),error:S.city&&i&&!o?r(`searchWizard.location.selectCityError`):null,onChange:e=>{s(e),w()}})]}),(0,V.jsxs)(`div`,{className:`space-y-4`,children:[(0,V.jsxs)(`div`,{className:`flex flex-wrap items-end justify-between gap-2`,children:[(0,V.jsxs)(`label`,{className:`text-[11px] font-black uppercase tracking-widest text-muted-foreground/60`,children:[r(`searchWizard.location.radiusKm`),` `,(0,V.jsx)(`span`,{className:`font-semibold normal-case text-muted-foreground/80`,children:r(`searchWizard.optional`)})]}),c==null?null:(0,V.jsx)(`button`,{type:`button`,onClick:()=>{l(null),T()},className:`text-[11px] font-bold uppercase tracking-wide text-primary hover:underline`,children:r(`searchWizard.location.clearRadius`)})]}),(0,V.jsx)(`div`,{className:`grid grid-cols-2 gap-2 sm:grid-cols-4 sm:gap-2`,children:hN.map(e=>(0,V.jsx)(`button`,{type:`button`,onClick:()=>{l(t=>t===e?null:e),T()},className:`rounded-lg border-2 py-2.5 text-xs font-bold transition-all sm:rounded-xl sm:py-3 sm:text-sm md:py-4 md:text-base ${c===e?`border-primary bg-primary/5 text-primary font-black shadow-lg`:`border-border/60 bg-surface-elevated hover:border-primary/40`}`,children:r(`searchWizard.kmUnit`,{km:e})},e))}),S.radius&&!e.radiusKmAllowed&&(0,V.jsxs)(`p`,{className:`ml-1 flex items-center gap-1.5 text-[11px] font-bold text-error`,children:[(0,V.jsx)(Bk,{size:12}),r(`searchWizard.location.radiusError`)]})]}),(0,V.jsx)(zD,{children:y&&v.length>0&&(0,V.jsxs)(ik.div,{initial:{opacity:0,scale:.98},animate:{opacity:1,scale:1},className:`rounded-2xl border border-border/40 bg-muted/10 p-4 sm:rounded-3xl sm:p-6`,children:[(0,V.jsxs)(`div`,{className:`mb-3 flex items-start gap-2.5 sm:mb-4 sm:gap-3`,children:[(0,V.jsx)(hj,{size:17,className:`mt-0.5 shrink-0 text-primary`,"aria-hidden":!0}),(0,V.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(0,V.jsx)(`p`,{className:`text-xs font-black text-foreground sm:text-sm`,children:r(`searchWizard.location.nearbyTitle`,{max:t})}),(0,V.jsx)(`p`,{className:`mt-2 text-xs font-medium leading-relaxed text-muted-foreground sm:text-sm`,children:r(`searchWizard.location.nearbyBody`)})]})]}),(0,V.jsx)(`div`,{className:`grid grid-cols-1 gap-2 sm:grid-cols-2`,children:v.map(e=>{let n=u.includes(e.id),i=u.length>=t,a=!n&&i,o=Number.isFinite(e.distance_km)?e.distance_km>=100?r(`searchWizard.kmAway`,{distance:Math.round(e.distance_km)}):r(`searchWizard.kmAway`,{distance:Math.round(e.distance_km*10)/10}):null;return(0,V.jsxs)(`button`,{type:`button`,disabled:a,onClick:()=>{n?d(t=>t.filter(t=>t!==e.id)):u.length<t&&d(t=>[...t,e.id])},className:`flex items-start justify-between gap-2 rounded-lg border p-2.5 text-left transition-all sm:rounded-xl sm:p-3 ${n?`border-primary bg-primary/10 font-bold`:a?`cursor-not-allowed border-border/30 bg-muted/5 opacity-45`:`border-border/40 hover:bg-muted/30`}`,children:[(0,V.jsxs)(`span`,{className:`min-w-0 flex-1`,children:[(0,V.jsx)(`span`,{className:`block truncate text-xs font-bold text-foreground`,children:e.name}),o?(0,V.jsx)(`span`,{className:`mt-1 block text-[10px] font-semibold uppercase tracking-wide text-muted-foreground`,children:o}):null]}),n?(0,V.jsx)(Fk,{size:12,strokeWidth:4,className:`mt-0.5 shrink-0 text-primary`}):null]},e.id)})})]})})]})}var HN=`/dashboard/settings`,UN=`profile`,WN=new Set([`extension`]);
33function GN({shouldHideAiSettings:e,shouldHideExtensionSettings:t}){return qN.map(n=>{let r=n.items;return e&&n.id===`ai`&&(r=[]),t&&n.id===`connectivity`&&(r=r.filter(e=>!WN.has(e.id))),{...n,items:r}}).filter(e=>e.items.length>0)}function KN({shouldHideAiSettings:e,shouldHideExtensionSettings:t}){return GN({shouldHideAiSettings:e,shouldHideExtensionSettings:t}).flatMap(e=>e.items)}var qN=[{id:`account`,labelKey:`settings.nav.account`,items:[{id:`profile`,labelKey:`settings.nav.profile`,descriptionKey:`settings.nav.profileDescription`,path:`profile`,icon:dj},{id:`linked-accounts`,labelKey:`settings.nav.linkedAccounts`,descriptionKey:`settings.nav.linkedAccountsDescription`,path:`linked-accounts`,icon:gA}]},{id:`plan`,labelKey:`settings.nav.plan`,items:[{id:`subscription`,labelKey:`settings.nav.subscription`,descriptionKey:`settings.nav.subscriptionDescription`,path:`subscription`,icon:qk}]},{id:`activity`,labelKey:`settings.nav.activity`,items:[{id:`favorites`,labelKey:`settings.nav.favorites`,descriptionKey:`settings.nav.favoritesDescription`,path:`favorites`,icon:sA}]},{id:`preferences`,labelKey:`settings.nav.preferences`,items:[{id:`appearance`,labelKey:`settings.nav.appearance`,descriptionKey:`settings.nav.appearanceDescription`,path:`appearance`,icon:jA}]},{id:`connectivity`,labelKey:`settings.nav.connectivity`,items:[{id:`extension`,labelKey:`settings.nav.extension`,descriptionKey:`settings.nav.extensionDescription`,path:`extension`,icon:RA}]},{id:`ai`,labelKey:`settings.nav.ai`,items:[{id:`ai-reply-delay`,labelKey:`settings.nav.aiReplyDelay`,descriptionKey:`settings.nav.aiReplyDelayDescription`,path:`ai-reply-delay`,icon:eoe},{id:`meetup-locations`,labelKey:`settings.nav.meetupLocations`,descriptionKey:`settings.nav.meetupLocationsDescription`,path:`meetup-locations`,icon:xA},{id:`availability-times`,labelKey:`settings.nav.availabilityTimes`,descriptionKey:`settings.nav.availabilityTimesDescription`,path:`availability-times`,icon:Uk}]},{id:`information`,labelKey:`settings.nav.information`,items:[{id:`legal`,labelKey:`settings.nav.legal`,descriptionKey:`settings.nav.legalDescription`,path:`legal`,icon:VA}]}],JN=qN.flatMap(e=>e.items);function YN(e){return`${HN}/${e}`}function XN(){let e=my(),{isOffline:t}=OM();return t?(0,V.jsx)(`div`,{className:`rounded-2xl border border-warning/30 bg-warning/5 p-4 sm:p-5`,role:`status`,children:(0,V.jsxs)(`div`,{className:`flex gap-3`,children:[(0,V.jsx)(cj,{size:20,className:`mt-0.5 shrink-0 text-warning`,"aria-hidden":!0}),(0,V.jsxs)(`div`,{className:`min-w-0 space-y-2`,children:[(0,V.jsx)(`p`,{className:`text-sm font-bold text-foreground`,children:e(`searchWizard.extensionBanner.title`)}),(0,V.jsx)(`p`,{className:`text-sm leading-relaxed text-muted-foreground`,children:e(`searchWizard.extensionBanner.body`)}),(0,V.jsx)(`a`,{href:YN(`extension`),target:`_blank`,rel:`noopener noreferrer`,className:`inline-flex text-sm font-bold text-primary transition hover:text-primary-hover`,children:e(`searchWizard.extensionBanner.settingsLink`)})]})]})}):null}function ZN({label:e,description:t,checked:n,onChange:r}){return(0,V.jsxs)(`button`,{type:`button`,onClick:()=>r(!n),className:`group flex w-full items-center justify-between gap-4 rounded-2xl border-2 border-border/40 bg-surface-elevated p-4 text-left transition-all hover:border-primary/40 hover:bg-surface sm:gap-6 sm:rounded-3xl sm:p-6`,children:[(0,V.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(0,V.jsx)(`p`,{className:`text-sm font-black text-foreground transition-colors group-hover:text-primary sm:text-base`,children:e}),t&&(0,V.jsx)(`p`,{className:`mt-1 text-[11px] font-medium leading-snug text-muted-foreground/70 sm:text-xs`,children:t})]}),(0,V.jsx)(`div`,{className:`relative h-6 w-12 shrink-0 rounded-full transition-colors ${n?`bg-primary shadow-lg shadow-primary/20`:`bg-muted`}`,children:(0,V.jsx)(ik.div,{animate:{x:n?26:4},transition:{type:`spring`,stiffness:500,damping:30},className:`absolute top-1 h-4 w-4 rounded-full bg-white shadow-sm dark:bg-background dark:shadow-black/40`})})]})}function QN({title:e,description:t}){return(0,V.jsxs)(`div`,{className:`w-full`,children:[(0,V.jsx)(`h2`,{className:`text-2xl font-black tracking-tight text-foreground sm:text-4xl md:text-5xl`,children:e}),(0,V.jsx)(`p`,{className:`mt-3 text-sm font-medium leading-relaxed text-muted-foreground sm:mt-4 sm:text-base md:text-lg`,children:t})]})}function $N({sendDefaultMessage:e,onSendDefaultMessageChange:t,defaultMessage:n,onDefaultMessageChange:r,defaultMessageTouched:i,onDefaultMessageBlur:a,title:o,description:s,autoReplyLabel:c,autoReplyDescription:l,placeholder:u}){let d=my(),f=o??d(`searchWizard.defaultMessage.title`),p=s??d(`searchWizard.defaultMessage.description`),m=c??d(`searchWizard.defaultMessage.enableAutoReply`),h=l??d(`searchWizard.defaultMessage.enableAutoReplyDescription`),g=u??d(`searchWizard.defaultMessage.placeholder`),_=DN(d,e,n),v=!!i&&!!_;return(0,V.jsxs)(`div`,{className:`space-y-8 sm:space-y-10`,children:[(0,V.jsx)(QN,{title:f,description:p}),(0,V.jsx)(XN,{}),(0,V.jsxs)(`div`,{className:`w-full space-y-6 sm:space-y-8`,children:[(0,V.jsx)(ZN,{label:m,description:h,checked:e,onChange:t}),(0,V.jsx)(zD,{children:e&&(0,V.jsxs)(ik.div,{initial:{height:0,opacity:0}
33,animate:{height:`auto`,opacity:1},exit:{height:0,opacity:0},className:`overflow-hidden pt-4`,children:[(0,V.jsxs)(`div`,{className:`relative`,children:[(0,V.jsx)(`textarea`,{rows:8,maxLength:2e3,style:{maxHeight:`${30*1.5}rem`},value:n,onChange:e=>{r(e.target.value)},onBlur:a,className:`w-full resize-none overflow-y-auto rounded-lg border-2 bg-surface-elevated p-4 pb-10 pr-20 text-sm font-medium leading-6 outline-none transition-colors focus:border-primary focus:outline-none focus-visible:outline-none focus-visible:ring-0 focus-visible:ring-offset-0 sm:rounded-xl sm:p-6 sm:pb-12 sm:pr-24 sm:text-base ${v?`border-error/40 bg-error/5 focus:border-error`:`border-border/60 hover:border-primary/40`}`,placeholder:g}),(0,V.jsxs)(`span`,{className:`pointer-events-none absolute bottom-3 right-4 text-[9px] font-black uppercase tracking-widest text-muted-foreground/50 dark:text-muted-foreground/75 sm:bottom-4 sm:right-6 sm:text-[10px]`,children:[n.length,`/`,2e3]})]}),v&&(0,V.jsxs)(`p`,{className:`mt-2 flex items-center gap-2 text-xs font-bold text-error`,children:[(0,V.jsx)(Bk,{size:14}),_]})]})})]})]})}var eP=`__main__`;function tP({scanFrequencyRows:e,cityId:t,notificationInterval:n,onNotificationIntervalChange:r,hubIntervals:i,onHubIntervalChange:a,mainScanIntervalDropdownOptions:o,hubScanIntervalDropdownOptions:s,scanFrequencyTouched:c,onMarkIntervalTouched:l,intervalQuotaError:u,intervalTouched:d,scanFrequencyHasSelections:f,onClearAllScanFrequencies:p,priceMin:m,priceMax:h,onPriceMinChange:g,onPriceMaxChange:_,onPriceMinBlur:v,onPriceMaxBlur:y,priceErrors:b,priceFieldsTouched:x,priceRangeInvalid:S,touchedPriceMin:C,touchedPriceMax:w,includeNoPrice:T,onIncludeNoPriceChange:E,betweenPriceAndInclude:D,children:O}){let k=my(),A=k(`searchWizard.preferences.selectScanFrequencyError`);return(0,V.jsxs)(`div`,{className:`space-y-8 sm:space-y-10`,children:[(0,V.jsxs)(`div`,{className:`space-y-4`,children:[(0,V.jsxs)(`div`,{children:[(0,V.jsxs)(`div`,{className:`flex flex-wrap items-end justify-between gap-2`,children:[(0,V.jsxs)(`label`,{className:`text-[11px] font-black uppercase tracking-widest text-muted-foreground/60`,children:[k(`searchWizard.preferences.scanFrequency`),` `,(0,V.jsx)(`span`,{className:`text-error`,children:`*`})]}),f?(0,V.jsx)(`button`,{type:`button`,onClick:p,className:`text-[11px] font-bold uppercase tracking-wide text-primary hover:underline`,children:k(`searchWizard.preferences.clearAll`)}):null]}),(0,V.jsx)(`p`,{className:`mt-1.5 text-xs font-medium leading-relaxed text-muted-foreground sm:text-sm`,children:k(`searchWizard.preferences.scanFrequencyHint`)})]}),(0,V.jsx)(`div`,{className:`rounded-2xl border border-border/40 bg-muted/5 p-4 sm:rounded-2xl sm:p-5 md:p-6`,children:(0,V.jsx)(`div`,{className:`grid grid-cols-1 gap-x-4 gap-y-4 sm:grid-cols-2 sm:gap-x-6 sm:gap-y-5`,children:e.map(e=>e.kind===`hub`?(0,V.jsxs)(`div`,{className:`space-y-2`,children:[(0,V.jsx)(`p`,{className:`text-[11px] font-black uppercase tracking-widest text-muted-foreground/80`,children:e.hub.name}),(0,V.jsx)(BN,{value:i[e.hub.id]==null?``:String(i[e.hub.id]),onChange:t=>{a(e.hub.id,Number(t)),l()},options:s(e.hub.id),placeholder:k(`searchWizard.preferences.selectScanFrequency`),onMenuOpen:()=>l(),error:c[e.hub.id]&&i[e.hub.id]==null?A:null})]},e.hub.id):(0,V.jsxs)(`div`,{className:`space-y-2`,children:[(0,V.jsx)(`p`,{className:`text-[11px] font-black uppercase tracking-widest text-muted-foreground/80`,children:e.name}),(0,V.jsx)(BN,{value:n==null?``:String(n),onChange:e=>{r(Number(e)),l()},options:o,placeholder:k(`searchWizard.preferences.selectScanFrequency`),onMenuOpen:()=>l(),error:c.__main__&&n==null?A:null})]},`main-${t}`))})}),d&&u&&(0,V.jsxs)(`p`,{className:`ml-1 flex items-center gap-1.5 text-[11px] font-bold text-error`,children:[(0,V.jsx)(Bk,{size:12}),u]})]}),(0,V.jsxs)(`div`,{className:`space-y-6 sm:space-y-8`,children:[(0,V.jsx)(`div`,{className:`mb-2`,children:(0,V.jsx)(`label`,{className:`text-[11px] font-black uppercase tracking-widest text-muted-foreground/60`,children:k(`searchWizard.preferences.priceRangeOptional`)})}),(0,V.jsxs)(`div`,{className:`mb-2 grid grid-cols-1 gap-6 sm:gap-8 lg:grid-cols-2`,children:[(0,V.jsx)(zM,{value:m,onChange:e=>{g(e)},onBlur:v,placeholder:k(`searchWizard.minPrice`),corners:`subtle`,suppressFocusRing:!0,prefix:`$`,inputMode:`numeric`,pattern:`[0-9]*`,invalid:S,error:C&&b.min?b.min:null}),(0,V.jsx)(zM,{value:h,onChange:e=>{_(e)},onBlur:y,placeholder:k(`searchWizard.maxPrice`),corners:`subtle`,suppressFocusRing:!0,prefix:`$`,inputMode:`numeric`,pattern:`[0-9]*`,invalid:S,error:w&&b.max?b.max:null})]}),x&&b.range?(0,V.jsxs)(`p`,{className:`flex animate-in items-center gap-1.5 text-[11px] font-bold text-error fade-in slide-in-from-top-1`,children:[(0,V.jsx)(Bk,{size:12}),b.range]}):null]}),D,(0,V.jsx)(ZN,{label:k(`searchWizard.preferences.includeUnpriced`),description:k(`searchWizard.preferences.includeUnpricedDescription`),checked:T,onChange:E}),O]})}function nP(e,t){if(t instanceof _o)return e(`searchWizard.locationLoad.timeout`);if(t instanceof go)return e(`searchWizard.locationLoad.network`);if(t instanceof ho){let n=t.details?.message?.trim();switch(t.status){case 401:return n||e(`searchWizard.locationLoad.sessionExpired`);case 403:return n||e(`searchWizard.locationLoad.forbidden`);case 404:return n||e(`searchWizard.locationLoad.notAvailable`);case 429:return n||e(`searchWizard.locationLoad.rateLimited`);case 400:case 422:return n||e(`searchWizard.locationLoad.badRequest`);default:return t.status>=500?n||e(`searchWizard.locationLoad.serverError`):n||e(`searchWizard.locationLoad.generic`)}}return e(`searchWizard.locationLoad.generic`)}function rP({provider:e,resetKey:t}){let n=my(),[r,i]=(0,b.useState)(``),[a,o]=(0,b.useState)([]),[s,c]=(0,b.useState)(!1),[l,u]=(0,b.useState)(null),d=(0,b.useRef)(0),[f,p]=(0,b.useState)([]),[m,h]=(0,b.useState)(!1),[g,_]=(0,b.useState)(null),v=(0,b.useRef)(0),y=(0,b.useRef)(void 0),[x,S]=(0,b.useState)(``),[C,w]=(0,b.useState)(null),[T,E]=(0,b.useState)([]),[D,O]=(0,b.useState)([]),[k,A]=(0,b.useState)({country:!1,city:!1,radius:!1}),j=(0,b.useRef)(void 0);(0,b.useEffect)(()=>{t!==void 0&&j.current!==t&&(j.current=t,d.current+=1,v.current+=1,i(``),S(``),w(null),O([]),E([]),o([]),p([]),u(null),_(null),c(!1),h(!1),A({country:!1,city:!1,radius:!1}),y.current=void 0)},[t]);let M=(0,b.useCallback)(async e=>{let t=++d.current;c(!0),u(null);try{let n=await Lo.get(`/api/locations/countries`,{query:{provider:e}}
33);if(t!==d.current)return;o(n.data.countries??[])}catch(e){if(t!==d.current)return;o([]),u(nP(n,e))}finally{t===d.current&&c(!1)}},[n]);(0,b.useEffect)(()=>{queueMicrotask(()=>{e&&M(e)})},[e,M]);let N=(0,b.useCallback)(async e=>{let t=++v.current;h(!0),_(null);try{let n=[],r=1;for(;;){let t=await Lo.get(`/api/locations/countries/${e}/cities`,{query:{page:r,per_page:500}});if(n.push(...t.data.cities??[]),!t.data.has_next||r>10)break;r++}if(t!==v.current)return;p(n)}catch(e){if(t!==v.current)return;p([]),_(nP(n,e))}finally{t===v.current&&h(!1)}},[n]);(0,b.useEffect)(()=>{let e=!1;if(!r)return v.current+=1,queueMicrotask(()=>{e||(p([]),S(``),h(!1),_(null))}),y.current=void 0,()=>{e=!0};let t=y.current!==r;return y.current=r,queueMicrotask(()=>{e||(t&&(S(``),p([])),N(r))}),()=>{e=!0}},[r,N]);let P=e===`facebook`&&!!x&&C!=null&&C>60,F=(0,b.useRef)(null);(0,b.useEffect)(()=>{let e=F.current;F.current=P,e===!0&&P===!1&&queueMicrotask(()=>{O([])})},[P]),(0,b.useEffect)(()=>{if(!P||!x||C==null){queueMicrotask(()=>{E([])});return}(async()=>{try{E((await Lo.get(`/api/locations/cities/${x}/hubs`,{query:{radius_km:C,limit:50}})).data.hubs??[])}catch{E([])}})()},[P,x,C]);let ee=(0,b.useMemo)(()=>[...T].sort((e,t)=>{let n=Number.isFinite(e.distance_km)?e.distance_km:1/0,r=Number.isFinite(t.distance_km)?t.distance_km:1/0;return n===r?e.name.localeCompare(t.name,void 0,{sensitivity:`base`}):n-r}),[T]),I=(0,b.useMemo)(()=>C==null||hN.includes(C),[C]);return{countryId:r,setCountryId:i,cityId:x,setCityId:S,radiusKm:C,setRadiusKm:w,selectedHubIds:D,setSelectedHubIds:O,countries:a,countriesLoading:s,countriesError:l,cities:f,citiesLoading:m,citiesError:g,hubsSortedByDistance:ee,showHubPicker:P,loadCountries:M,loadCitiesForCountry:N,isStepValid:!!(r&&x)&&I,radiusKmAllowed:I,touched:k,touchAllFields:(0,b.useCallback)(()=>{A(e=>({...e,country:!0,city:!0,...I?{}:{radius:!0}}))},[I]),setTouchedCountry:()=>A(e=>({...e,country:!0})),setTouchedCity:()=>A(e=>({...e,city:!0})),setTouchedRadius:()=>A(e=>({...e,radius:!0}))}}function iP(e){let t=my(),{intervalOptions:n,intervalAvailability:r,notificationInterval:i,selectedHubIds:a,hubIntervals:o}=e;return{mainScanIntervalDropdownOptions:(0,b.useMemo)(()=>{if(!n.length)return[];let e=ON({mainInterval:i,hubIds:a,hubIntervals:o,hubUnsetInterval:null});return n.map(n=>{let i=n.notification_interval_minutes,s=r.find(e=>e.intervalMinutes===i),c=s?.limit??0,l=s?.remaining??0,u=e.get(i)??0,d=Math.max(0,l-u),f=kN(t,{availability:r,mainInterval:i,hubIds:a,hubIntervals:o,hubUnsetInterval:null})!==null;return{value:String(i),label:t(`searchWizard.minIntervalLabel`,{mins:i}),menuTrailing:`${d}/${c}`,disabled:f}})},[n,r,i,a,o,t]),hubScanIntervalDropdownOptions:(0,b.useCallback)(e=>{if(!n.length)return[];let s=ON({mainInterval:i,hubIds:a,hubIntervals:o,hubUnsetInterval:null});return n.map(n=>{let c=n.notification_interval_minutes,l=r.find(e=>e.intervalMinutes===c),u=l?.limit??0,d=l?.remaining??0,f=s.get(c)??0,p=Math.max(0,d-f),m=kN(t,{availability:r,mainInterval:i,hubIds:a,hubIntervals:{...o,[e]:c},hubUnsetInterval:null})!==null;return{value:String(c),label:t(`searchWizard.minIntervalLabel`,{mins:c}),menuTrailing:`${p}/${u}`,disabled:m}})},[n,r,i,a,o,t])}}function aP({editSearchId:e,duplicateFromSearchId:t}){let n=!!e,r=!!(t&&!e),i=e??t,a=or(),o=my(),{showToast:s}=Gx(),{subscription:c,refreshSubscription:l,status:u}=Sy(),{canUseExtensionFirstMessage:d,status:f}=bj(),[p,m]=(0,b.useState)(1),[h,g]=(0,b.useState)(!1),[_,v]=(0,b.useState)(!1),[y,S]=(0,b.useState)(``),[C,w]=(0,b.useState)(``),[T,E]=(0,b.useState)([]),[D,O]=(0,b.useState)([]),[k,A]=(0,b.useState)(``),[j,M]=(0,b.useState)(``),[N,P]=(0,b.useState)(``),[F,ee]=(0,b.useState)(null),[I,te]=(0,b.useState)({}),[ne,re]=(0,b.useState)(``),[ie,ae]=(0,b.useState)(``),[oe,se]=(0,b.useState)(!1),[ce,le]=(0,b.useState)(!1),[ue,de]=(0,b.useState)(``),[fe,L]=(0,b.useState)(null),[pe,me]=(0,b.useState)(!0),[he,ge]=(0,b.useState)(!1),[_e,ve]=(0,b.useState)({}),[ye,be]=(0,b.useState)({}),[xe,Se]=(0,b.useState)(()=>i?`loading`:`ready`),[Ce,we]=(0,b.useState)([]),[Te,Ee]=(0,b.useState)(null),[De,Oe]=(0,b.useState)(null),[ke,Ae]=(0,b.useState)(null);(0,b.useEffect)(()=>{queueMicrotask(()=>{v(!0)})},[]);let je=(0,b.useMemo)(()=>Uj(c?.plan?.tiers,fe?.subscription?.tiers),[c?.plan?.tiers,fe?.subscription?.tiers]),Me=(0,b.useMemo)(()=>yN(c?.plan?.tiers,je),[c?.plan?.tiers,je]),Ne=(0,b.useMemo)(()=>xN(Me,ke),[Me,ke]),Pe=(0,b.useMemo)(()=>{let e=c?.plan?.tiers;return e?.length?[...e].sort((e,t)=>
33e.tier_order-t.tier_order):[]},[c?.plan?.tiers]),Fe=!!(Lj(f,u)&&d&&N===`facebook`),Ie=Fe?4:3,Le=Math.max(0,Math.min(999,bN(Ne)-1)),Re=rP({provider:N}),{setCountryId:ze,cityId:Be,setCityId:Ve,radiusKm:He,setRadiusKm:Ue,selectedHubIds:We,setSelectedHubIds:Ge,cities:Ke,hubsSortedByDistance:qe,isStepValid:Je,touchAllFields:Ye}=Re;(0,b.useEffect)(()=>{if(n)return;let e=!1;return(async()=>{try{let t=await mN();if(e)return;we(t.map(e=>_se(e)).filter(e=>e!=null))}catch{e||we([])}})(),()=>{e=!0}},[n]),(0,b.useEffect)(()=>{let e=!1;return queueMicrotask(()=>{if(!e){if(!i){Se(`ready`),Ee(null),Oe(null),Ae(null);return}Se(`loading`),Ee(null),Oe(null),(async()=>{try{let t=await Lo.get(`/api/searches/${i}`);if(e)return;let n=t.data;if(String(n.search_type??``).toLowerCase()!==`query`){s({type:`info`,message:o(`searchWizard.actions.onlyAnythingEditable`)}),a(`/dashboard/searches`,{replace:!0});return}let c=String(n.provider??``).toLowerCase();if(c!==`facebook`&&c!==`kijiji`){s({type:`info`,message:o(`searchWizard.actions.marketplaceNotSupported`)}),a(`/dashboard/searches`,{replace:!0});return}r||S(String(n.name??``)),w(String(n.search_key??``)),E(Array.isArray(n.include_keywords)?n.include_keywords.map(e=>String(e)):[]),O(Array.isArray(n.exclude_keywords)?n.exclude_keywords.map(e=>String(e)):[]),P(c),ee(typeof n.notification_interval_minutes==`number`?n.notification_interval_minutes:null),se(!!n.include_listings_without_price),le(!!n.send_default_message),de(n.default_message==null?``:String(n.default_message));let l=n.price_min,u=n.price_max;if(re(l!=null&&l!==``&&Number.isFinite(Number(l))?String(l):``),ae(u!=null&&u!==``&&Number.isFinite(Number(u))?String(u):``),!r){let t=n.search_radius_km;Ue(t!=null&&t!==``&&Number.isFinite(Number(t))?Number(t):null);let r=String(n.city_id??``),i=n.child_hubs,l={},u=[];if(Array.isArray(i))for(let e of i){if(!e||typeof e!=`object`)continue;let t=e,n=t.city_id,r=t.notification_interval_minutes;if(n==null||typeof r!=`number`)continue;let i=String(n);u.push(i),l[i]=r}Ge(u),te(l);let d=typeof n.notification_interval_minutes==`number`?n.notification_interval_minutes:null;Ae({wasActive:!!n.is_active,mainInterval:d,hubIntervals:{...l}}),Ee(RN(n));let f=await FN(c,r);if(e)return;if(!f||!r){s({type:`error`,message:o(`searchWizard.actions.locationResolveError`)}),Se(`error`),a(`/dashboard/searches`,{replace:!0});return}ze(f),Oe(r)}Se(`ready`)}catch(t){if(e)return;s({type:`error`,message:t instanceof ho&&t.details?.message?t.details.message:o(`searchWizard.shell.loadSearchError`)}),Se(`error`),a(`/dashboard/searches`,{replace:!0})}})()}}),()=>{e=!0}},[i,r,a,s,ze,te,Ge,Ue]);let Xe=(0,b.useMemo)(()=>n||!Be||!N||!C.trim()?null:uN({searchKey:C,provider:N,cityId:Be},Ce),[n,Be,N,C,Ce]);(0,b.useEffect)(()=>{De&&Ke.some(e=>e.id===De)&&queueMicrotask(()=>{Ve(De),Oe(null)})},[De,Ke,Ve]),(0,b.useEffect)(()=>{(async()=>
33{try{L((await Lo.get(`/api/dashboard/overview`)).data)}catch{L(null)}finally{me(!1)}})()},[]),(0,b.useEffect)(()=>{queueMicrotask(()=>{te(e=>{let t={...e};for(let e of Object.keys(t))We.includes(e)||delete t[e];return t})})},[We]);let Ze=Ke.find(e=>e.id===Be)?.name??o(`searchWizard.fields.primaryLocation`),Qe=(0,b.useMemo)(()=>zN({hubsSortedByDistance:qe,selectedHubIds:We,mainCityLabel:Ze}),[qe,We,Ze]),{mainScanIntervalDropdownOptions:$e,hubScanIntervalDropdownOptions:et}=iP({intervalOptions:Pe,intervalAvailability:Ne,notificationInterval:F,selectedHubIds:We,hubIntervals:I}),tt=(0,b.useMemo)(()=>EN(o,ne,ie),[ne,ie]),nt=_e.priceMin||_e.priceMax,rt=!!nt&&!!tt.range,it=kN(o,{availability:Ne,mainInterval:F,hubIds:We,hubIntervals:I,hubUnsetInterval:null}),at=!wN(o,y)&&!TN(o,C)&&N&&!CN(o,k,T)&&!CN(o,j,D),ot=Je&&(!Xe||n),st=We.length===0||We.every(e=>I[e]!=null),ct=F!=null&&st&&!tt.range&&!it,lt=!DN(o,ce,ue),ut=p===1?at:p===2?ot:p===3?ct:lt,dt=()=>{if(!ut){p===1&&ve(e=>({...e,name:!0,searchTerm:!0,provider:!0,includeKeywords:!0,excludeKeywords:!0})),p===2&&Ye(),p===3&&(be(e=>{let t={...e,[eP]:!0};for(let e of We)t[e]=!0;return t}),ve({interval:!0,priceMin:!0,priceMax:!0})),p===4&&ve({defaultMessage:!0});return}p<Ie?m(p+1):ft()},ft=async()=>{if(!N||F==null)return;if(e&&!Te){s({type:`error`,message:o(`searchWizard.actions.searchStillLoading`)});return}let t={name:y,searchTerm:C,includeKeywords:T,excludeKeywords:D,provider:N,cityId:Be,notificationInterval:F,hubPairs:We.map(e=>({cityId:e,notificationIntervalMinutes:I[e]})),includeNoPrice:oe,sendDefaultMessage:ce,defaultMessage:ue,showDefaultMessageStep:Fe,radiusKm:He,priceMinStr:ne,priceMaxStr:ie},i=async()=>{let e=MN(t);await Lo.post(`/api/searches/`,e),await l(),eN&&nN.capture(`search_created`,{search_type:`query`,provider:N,is_duplicate:r,uses_default_message:Fe&&ce}),tN.info(`query search created`,{provider:N,is_duplicate:r,uses_default_message:Fe&&ce}),s({type:`success`,message:o(r?`searchWizard.actions.searchDuplicated`:`searchWizard.actions.saveSearchDeployed`)}),a(`/dashboard/searches`)};if(!n){let e=uN({searchKey:C,provider:N,cityId:Be},Ce);if(e){s({type:`error`,message:e});return}}ge(!0);try{if(e&&Te){let n=NN(t,Te);await Lo.patch(`/api/searches/${e}`,n),await l(),eN&&nN.capture(`search_updated`,{search_type:`query`,provider:N,uses_default_message:Fe&&ce}),s({type:`success`,message:o(`searchWizard.actions.searchUpdated`)}),a(`/dashboard/searches`)}else await i()}catch(t){s({type:`error`,message:t instanceof ho&&t.details?.message?t.details.message:o(e?`searchWizard.actions.updateFailed`:`searchWizard.actions.deploymentFailed`)})}finally{ge(!1)}},pt=typeof document<`u`?document.getElementById(`wizard-steps-target`):null,mt=typeof document<`u`?document.getElementById(`wizard-steps-mobile-target`):null;if((0,b.useEffect)(()=>{let e=()=>{let e={top:0,left:0,behavior:`smooth`};document.getElementById(`create-search-anything-main`)?.scrollTo(e),document.getElementById(`wizard-steps-target`)?.scrollTo(e),document.getElementById(`wizard-steps-mobile-target`)?.scrollTo(e),window.scrollTo(e),document.documentElement.scrollTo(e),document.body.scrollTo(e)};e();let t=window.setTimeout(e,450);return()=>{clearTimeout(t)}},[p]),u===`loading`||pe)return null;if(i&&xe!==`ready`)return(0,V.jsxs)(`div`,{className:`flex min-h-[50vh] flex-col items-center justify-center gap-4 py-16`,children:[(0,V.jsx)(_A,{size:32,className:`animate-spin text-primary`}),(0,V.jsx)(`p`,{className:`text-sm font-medium text-muted-foreground`,children:o(r?`searchWizard.shell.preparingDuplicate`:`searchWizard.shell.loadingSearch`)})]});let ht=[{id:1,title:o(`searchWizard.steps.details`),desc:o(`searchWizard.steps.detailsDescription`),icon:(0,V.jsx)(Qk,{size:18})},{id:2,title:o(`searchWizard.steps.location`),desc:o(`searchWizard.steps.locationDescription`),icon:(0,V.jsx)(xA,{size:18})},{id:3,title:o(`searchWizard.steps.preferences`),desc:o(`searchWizard.steps.preferencesDescription`),icon:(0,V.jsx)(GA,{size:18})},...Fe?[{id:4,title:o(`searchWizard.steps.defaultMessage`),desc:o(`searchWizard.steps.defaultMessageDescription`),icon:(0,V.jsx)(wA,{size:18})}]:[]],gt=(0,V.jsx)(`div`,{className:`flex flex-col gap-1 lg:gap-2`,children:ht.map((e,t)=>{let n=p>e.id,r=p===e.id,i=t===ht.length-1;return(0,V.jsxs)(`div`,{className:`relative flex items-start gap-4`,children:[(0,V.jsxs)(`div`,{className:`flex flex-col items-center`,children:[(0,V.jsx)(`button`,{onClick:()=>{(e.id<p||n)&&m(e.id)},disabled:e.id>p&&!n,className:`flex h-10 w-10 shrink-0 items-center justify-center rounded-xl border-2 transition-all duration-300 ${r?`bg-primary border-primary text-primary-foreground shadow-lg shadow-primary/20`:n?`bg-primary/10 border-primary/40 text-primary`:`bg-surface-elevated border-border/60 text-muted-foreground
33/40`}`,children:n?(0,V.jsx)(Fk,{size:16,strokeWidth:4}):e.icon}),!i&&(0,V.jsx)(`div`,{className:`h-10 w-0.5 shrink-0 transition-colors duration-500 lg:h-12 ${n?`bg-primary`:r?`bg-primary/40 dark:bg-primary/45`:`bg-border`}`})]}),(0,V.jsxs)(`div`,{className:`flex flex-col pt-1`,children:[(0,V.jsx)(`span`,{className:`text-[10px] font-black uppercase tracking-[0.2em] transition-colors ${r?`text-primary`:`text-muted-foreground/40`}`,children:o(`searchWizard.stepLabel`,{step:`0${e.id}`})}),(0,V.jsx)(`span`,{className:`text-xs font-black transition-colors lg:text-sm ${r?`text-foreground`:`text-muted-foreground/60`}`,children:e.title})]})]},e.id)})}),_t=(0,V.jsx)(`div`,{className:`flex w-full flex-row flex-nowrap items-start justify-center gap-0 sm:gap-1 md:gap-2`,children:ht.map((e,t)=>{let n=p>e.id,r=p===e.id,i=t===ht.length-1,a=n?`bg-primary`:r?`bg-primary/40 dark:bg-primary/45`:`bg-border`;return(0,V.jsxs)(b.Fragment,{children:[(0,V.jsxs)(`div`,{className:`flex min-w-0 flex-1 basis-0 flex-col items-center gap-1 sm:gap-2`,children:[(0,V.jsx)(`button`,{type:`button`,onClick:()=>{(e.id<p||n)&&m(e.id)},disabled:e.id>p&&!n,className:`flex h-8 w-8 shrink-0 items-center justify-center rounded-lg border-2 transition-all duration-300 sm:h-10 sm:w-10 sm:rounded-xl ${r?`bg-primary border-primary text-primary-foreground shadow-lg shadow-primary/20`:n?`bg-primary/10 border-primary/40 text-primary`:`bg-surface-elevated border-border/60 text-muted-foreground/40`}`,children:(0,V.jsx)(`span`,{className:`flex scale-[0.82] items-center justify-center sm:scale-100`,children:n?(0,V.jsx)(Fk,{size:16,strokeWidth:4}):e.icon})}),(0,V.jsx)(`span`,{className:`line-clamp-2 w-full text-center text-[10px] font-black leading-tight sm:text-xs ${r?`text-foreground`:`text-muted-foreground/60`}`,children:e.title===o(`searchWizard.steps.defaultMessage`)?(0,V.jsxs)(V.Fragment,{children:[(0,V.jsx)(`span`,{className:`sm:hidden`,children:o(`searchWizard.defaultMessage.title`)}),(0,V.jsx)(`span`,{className:`hidden sm:inline`,children:e.title})]}):e.title})]}),i?null:(0,V.jsx)(`div`,{className:`flex h-8 w-3 shrink-0 items-center justify-center self-start sm:h-10 sm:w-5 md:w-6`,"aria-hidden":!0,children:(0,V.jsx)(`div`,{className:`h-0.5 w-full rounded-full transition-colors duration-500 ${a}`})})]},e.id)})}),vt=F!=null||We.some(e=>I[e]!=null);return(0,V.jsxs)(V.Fragment,{children:[_&&pt&&(0,x.createPortal)(gt,pt),_&&mt&&(0,x.createPortal)(_t,mt),(0,V.jsx)(zD,{mode:`wait`,children:(0,V.jsxs)(ik.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},exit:{opacity:0,y:-10},transition:{duration:.4,ease:`easeOut`},className:`flex flex-col space-y-8 sm:space-y-10 md:space-y-12`,children:[p===1&&(0,V.jsxs)(`div`,{className:`space-y-8 sm:space-y-10`,children:[(0,V.jsx)(sP,{title:o(`searchWizard.steps.details`),description:o(`searchWizard.steps.detailsDescription`)}),(0,V.jsxs)(`div`,{className:`space-y-6 sm:space-y-8`,children:[(0,V.jsxs)(`div`,{className:`grid grid-cols-1 gap-6 sm:gap-8 lg:grid-cols-2`,children:[(0,V.jsx)(zM,{label:o(`searchWizard.fields.searchName`),required:!0,value:y,onChange:e=>{S(e),ve(e=>({...e,name:!0}))},placeholder:o(`searchWizard.fields.searchNamePlaceholder`),maxLength:30,showCount:!0,corners:`subtle`,suppressFocusRing:!0,onBlur:()=>ve(e=>({...e,name:!0})),error:_e.name?wN(o,y):null}),(0,V.jsx)(zM,{label:o(`searchWizard.fields.searchTerm`),required:!0,value:C,onChange:e=>{w(e),ve(e=>({...e,searchTerm:!0}))},placeholder:o(`searchWizard.fields.searchTermPlaceholder`),maxLength:100,showCount:!0,corners:`subtle`,suppressFocusRing:!0,onBlur:()=>ve(e=>({...e,searchTerm:!0})),error:_e.searchTerm?TN(o,C):null})]}),(0,V.jsxs)(`div`,{className:`border-t border-border/40 pt-2`,children:[(0,V.jsxs)(`button`,{type:`button`,onClick:()=>g(!h),className:`flex w-full items-center justify-between gap-3 rounded-xl px-4 py-3 text-left transition-colors hover:bg-muted/20 sm:px-5`,children:[(0,V.jsxs)(`div`,{className:`min-w-0`,children:[(0,V.jsx)(`p`,{className:`text-sm font-semibold text-foreground`,children:o(`searchWizard.fields.advancedKeywordFilters`)}),(0,V.jsx)(`p`,{className:`mt-0.5 text-xs text-muted-foreground`,children:o(`searchWizard.fields.optionalKeywordsHint`)})]}),(0,V.jsx)(Ik,{size:22,className:`shrink-0 text-muted-foreground transition-transform duration-300 ${h?`rotate-180`:``}`,strokeWidth:2})]}),(0,V.jsx)(zD,{initial:!1,children:h&&(0,V.jsx)(ik.div,{initial:{height:0,opacity:0}
33,animate:{height:`auto`,opacity:1},exit:{height:0,opacity:0},transition:{duration:.25,ease:`easeOut`},className:`overflow-hidden`,children:(0,V.jsxs)(`div`,{className:`flex flex-col gap-6 px-4 pb-2 pt-4 sm:px-5`,children:[(0,V.jsxs)(`div`,{className:`rounded-xl border border-border/50 bg-muted/10 px-4 py-3 sm:px-5`,children:[(0,V.jsx)(`p`,{className:`text-xs font-semibold uppercase tracking-wide text-muted-foreground`,children:o(`searchWizard.fields.howKeywordsWorkTitle`)}),(0,V.jsx)(`p`,{className:`mt-2 text-sm leading-relaxed text-muted-foreground`,children:o(`searchWizard.fields.howKeywordsWorkBody`)})]}),(0,V.jsx)(oP,{label:o(`searchWizard.fields.includeKeywords`),description:o(`searchWizard.fields.includeKeywordsHint`),chips:T,onChipsChange:e=>{E(e),ve(e=>({...e,includeKeywords:!0}))},draft:k,onDraftChange:e=>{A(e),ve(e=>({...e,includeKeywords:!0}))},placeholder:o(`searchWizard.fields.keywordChipPlaceholder`),error:_e.includeKeywords?CN(o,k,T):null,onBlur:()=>ve(e=>({...e,includeKeywords:!0}))}),(0,V.jsx)(oP,{label:o(`searchWizard.fields.excludeKeywords`),description:o(`searchWizard.fields.excludeKeywordsHint`),chips:D,onChipsChange:e=>{O(e),ve(e=>({...e,excludeKeywords:!0}))},draft:j,onDraftChange:e=>{M(e),ve(e=>({...e,excludeKeywords:!0}))},placeholder:o(`searchWizard.fields.excludeKeywordPlaceholder`),error:_e.excludeKeywords?CN(o,j,D):null,onBlur:()=>ve(e=>({...e,excludeKeywords:!0}))})]})})})]}),(0,V.jsx)(`div`,{className:`border-t border-border/40 pt-4 sm:pt-6`,children:(0,V.jsx)(sN,{label:o(`searchWizard.fields.marketplace`),value:N,items:Cse,onOpen:()=>ve(e=>({...e,provider:!0})),onChange:e=>{P(e),ve(e=>({...e,provider:!0}))},error:_e.provider&&!N})})]})]}),p===2&&(0,V.jsxs)(`div`,{className:`space-y-8 sm:space-y-10`,children:[(0,V.jsx)(sP,{title:o(`searchWizard.steps.location`),description:o(`searchWizard.steps.locationDescription`)}),(0,V.jsx)(VN,{loc:Re,maxSelectableHubs:Le,provider:N}),Xe&&!n?(0,V.jsxs)(`div`,{className:`flex items-start gap-3 rounded-2xl border border-error/30 bg-error/5 px-4 py-3 text-sm text-error`,role:`alert`,children:[(0,V.jsx)(Bk,{size:18,className:`mt-0.5 shrink-0`}),(0,V.jsx)(`p`,{children:Xe})]}):null]}),p===3&&(0,V.jsxs)(`div`,{className:`space-y-8 sm:space-y-10`,children:[(0,V.jsx)(sP,{title:o(`searchWizard.steps.preferences`),description:o(`searchWizard.steps.preferencesDescription`)}),(0,V.jsx)(tP,{scanFrequencyRows:Qe,cityId:Be,notificationInterval:F,onNotificationIntervalChange:e=>{ee(e)},hubIntervals:I,onHubIntervalChange:(e,t)=>
33{te(n=>({...n,[e]:t}))},mainScanIntervalDropdownOptions:$e,hubScanIntervalDropdownOptions:et,scanFrequencyTouched:ye,onMarkIntervalTouched:()=>ve(e=>({...e,interval:!0})),intervalQuotaError:it,intervalTouched:!!_e.interval,scanFrequencyHasSelections:vt,onClearAllScanFrequencies:()=>{ee(null),te({}),be({}),ve(e=>({...e,interval:!0}))},priceMin:ne,priceMax:ie,onPriceMinChange:e=>{re(e),ve(e=>({...e,priceMin:!0}))},onPriceMaxChange:e=>{ae(e),ve(e=>({...e,priceMax:!0}))},onPriceMinBlur:()=>ve(e=>({...e,priceMin:!0})),onPriceMaxBlur:()=>ve(e=>({...e,priceMax:!0})),priceErrors:tt,priceFieldsTouched:nt,priceRangeInvalid:rt,touchedPriceMin:!!_e.priceMin,touchedPriceMax:!!_e.priceMax,includeNoPrice:oe,onIncludeNoPriceChange:se})]}),p===4&&Fe?(0,V.jsx)($N,{sendDefaultMessage:ce,onSendDefaultMessageChange:le,defaultMessage:ue,onDefaultMessageChange:e=>{de(e),ve(e=>({...e,defaultMessage:!0}))},defaultMessageTouched:!!_e.defaultMessage,onDefaultMessageBlur:()=>ve(e=>({...e,defaultMessage:!0}))}):null,(0,V.jsxs)(`footer`,{className:`flex flex-col gap-4 pt-8 sm:flex-row sm:items-center sm:justify-between sm:gap-0 sm:pt-10 md:pt-12`,children:[p>1?(0,V.jsx)(`button`,{type:`button`,onClick:()=>m(p-1),className:`min-h-[44px] self-center text-xs font-black uppercase tracking-widest text-muted-foreground transition-all hover:text-foreground sm:min-h-0 sm:self-auto`,children:o(`searchWizard.back`)}):null,(0,V.jsx)(`button`,{type:`button`,onClick:dt,disabled:he,className:`flex min-h-[48px] w-full items-center justify-center gap-2 rounded-2xl px-6 text-sm font-black transition-all shadow-xl sm:h-14 sm:min-w-[200px] sm:w-auto sm:gap-3 sm:px-8 ${p===1?`sm:ml-auto`:``} ${ut?`bg-primary text-primary-foreground shadow-lg shadow-primary/20 hover:scale-[1.02] active:scale-[0.99]`:`border border-border/60 bg-surface-elevated text-muted-foreground opacity-60`}`,children:he?(0,V.jsx)(_A,{size:20,className:`animate-spin`}):o(p===Ie?e?`searchWizard.actions.saveChanges`:r?`searchWizard.actions.saveDuplicated`:`searchWizard.actions.saveSearch`:`common.continue`)})]})]},p)})]})}function oP({label:e,description:t,chips:n,onChipsChange:r,draft:i,onDraftChange:a,placeholder:o,error:s,onBlur:c}){let l=my(),u=(0,b.useRef)(null),d=SN(n),f=Math.max(0,150-d),p=n.length>=30,m=d>=150,h=p||m,g=e=>{let t=e.slice(0,f),n=t.split(` 34`);return n.length>2&&(t=n.slice(0,2).join(` 35`)),t},_=()=>{let e=i.replace(/\r\n/g,` 36`).trim();if(!e)return;if(h){a(``);return}let t=e.replace(/\n/g,` `).replace(/\s+/g,` `).trim();if(!t){a(``);return}let o=Math.max(0,150-d);if(o<=0){a(``);return}let s=t.slice(0,o);if(!s.trim()){a(``);return}let c=s.toLowerCase();if(n.some(e=>e.toLowerCase()===c)){a(``);return}r([...n,s]),a(``)},v=s?`border-error/40 bg-error/5 focus-within:border-error`:`border-border/60 hover:border-primary/30 focus-within:border-primary/50`,y=d+i.length;return(0,V.jsxs)(`div`,{className:`space-y-2`,children:[e&&(0,V.jsx)(`label`,{className:`ml-1 text-[11px] font-black uppercase tracking-widest text-muted-foreground/60`,children:e}),t&&(0,V.jsx)(`p`,{className:`ml-1 text-xs leading-relaxed text-muted-foreground`,children:t}),(0,V.jsxs)(`div`,{className:`flex cursor-text flex-col gap-2.5 rounded-xl border-2 bg-surface-elevated p-2.5 transition-colors sm:gap-3 sm:rounded-2xl sm:p-3 ${v}`,onMouseDown:e=>{(e.target===e.currentTarget||e.target.tagName!==`BUTTON`&&e.target.tagName!==`TEXTAREA`)&&u.current?.focus()},children:[n.length>0&&(0,V.jsx)(`div`,{className:`flex flex-wrap gap-2`,children:n.map((e,t)=>(0,V.jsxs)(`span`,{className:`inline-flex max-w-full items-center gap-1.5 rounded-full border border-border/50 bg-muted/50 px-3 py-1 text-sm font-medium text-foreground`,children:[(0,V.jsx)(`span`,{className:`truncate`,children:e}),(0,V.jsx)(`button`,{type:`button`,className:`shrink-0 rounded-full p-0.5 text-muted-foreground transition-colors hover:bg-foreground
36/10 hover:text-foreground`,"aria-label":`Remove ${e}`,onMouseDown:e=>e.preventDefault(),onClick:e=>{e.stopPropagation(),r(n.filter((e,n)=>n!==t))},children:(0,V.jsx)(mj,{size:14,strokeWidth:2.5})})]},`${t}-${e}`))}),(0,V.jsxs)(`div`,{className:`relative`,children:[(0,V.jsx)(`textarea`,{ref:u,rows:2,spellCheck:!1,maxLength:f>0?f:void 0,value:i,onChange:e=>a(g(e.target.value)),onBlur:()=>c?.(),onKeyDown:e=>{e.key===`Enter`&&!e.shiftKey?(e.preventDefault(),_()):e.key===`Backspace`&&!i.trim()&&n.length>0&&r(n.slice(0,-1))},className:`min-h-[3.5rem] max-h-[3.5rem] w-full resize-none overflow-y-auto bg-transparent py-1 pl-1 pr-2 pb-6 text-sm leading-5 text-foreground outline-none placeholder:text-muted-foreground/50 focus:outline-none focus-visible:ring-0 focus-visible:ring-offset-0 disabled:opacity-50`,placeholder:m?l(`searchWizard.fields.characterLimitReached`):p?l(`searchWizard.fields.maxKeywordsReached`):o,disabled:h,"aria-invalid":s?!0:void 0}),!h&&(0,V.jsxs)(`span`,{className:`pointer-events-none absolute bottom-1.5 right-2 text-[10px] font-black uppercase tracking-widest text-muted-foreground/50 dark:text-muted-foreground/75`,children:[y,`/`,150]})]})]}),s&&(0,V.jsxs)(`p`,{className:`ml-1 flex items-center gap-1.5 text-[11px] font-bold text-error`,children:[(0,V.jsx)(Bk,{size:12}),s]}),p&&(0,V.jsxs)(`p`,{className:`ml-1 text-xs text-muted-foreground`,children:[`Maximum `,30,` keywords in this list.`]}),m&&(0,V.jsxs)(`p`,{className:`ml-1 text-xs text-muted-foreground`,children:[`Maximum `,150,` characters total for this list (all keywords combined).`]})]})}function sP({title:e,description:t}){return(0,V.jsxs)(`div`,{className:`w-full`,children:[(0,V.jsx)(`h2`,{className:`text-2xl font-black tracking-tight text-foreground sm:text-4xl md:text-5xl`,children:e}),(0,V.jsx)(`p`,{className:`mt-3 text-sm font-medium leading-relaxed text-muted-foreground sm:mt-4 sm:text-base md:text-lg`,children:t})]})}function cP({mode:e=`create`}){let t=my(),n=or(),{searchId:r}=ur(),i=e===`edit`?r:void 0,a=e===`duplicate`?r:void 0,{status:o,isAuthenticated:s}=Jv(),[c,l]=(0,b.useState)(!0),u=(0,b.useMemo)(()=>t(e===`edit`?`searchWizard.shell.editTitle`:e===`duplicate`?`searchWizard.shell.duplicateTitle`:`searchWizard.shell.anythingTitle`),[e,t]),d=(0,b.useMemo)(()=>t(e===`edit`?`searchWizard.shell.anythingEditDescription`:e===`duplicate`?`searchWizard.shell.duplicateDescription`:`searchWizard.shell.anythingCreateDescription`),[e,t]),f=e===`duplicate`?Gk:UA;return(0,b.useEffect)(()=>{o!==`loading`&&(s||n(`/auth/login`,{replace:!0}))},[s,n,o]),o===`loading`?(0,V.jsx)(`div`,{className:`flex h-screen w-full items-center justify-center bg-background`,children:(0,V.jsxs)(`div`,{className:`flex flex-col items-center gap-4`,children:[(0,V.jsxs)(`div`,{className:`relative h-12 w-12`,children:[(0,V.jsx)(`div`,{className:`absolute inset-0 rounded-full border-2 border-primary/20`}),(0,V.jsx)(`div`,{className:`absolute inset-0 rounded-full border-2 border-primary border-t-transparent animate-spin`})]}),(0,V.jsx)(`p`,{className:`text-sm text-muted-foreground animate-pulse`,children:t(`common.loading`)})]})}):s?(0,V.jsxs)(`div`,{className:`flex h-screen min-h-0 flex-col overflow-hidden lg:flex-row`,children:[(0,V.jsxs)(`header`,{className:`relative z-30 shrink-0 border-b border-border/40 bg-surface lg:hidden`,children:[(0,V.jsxs)(`div`,{className:`flex items-center justify-between gap-2 px-3 py-2.5 sm:gap-3 sm:px-4 sm:py-3`,children:[(0,V.jsxs)(zi,{to:`/dashboard/searches`,className:`flex min-w-0 flex-1 items-center gap-2.5 text-foreground transition-colors hover:text-primary`,children:[(0,V.jsx)(bk,{size:22,strokeWidth:2,className:`shrink-0`}),(0,V.jsx)(`span`,{className:`truncate text-sm font-semibold tracking-tight sm:text-base`,children:u})]}),(0,V.jsx)(`button`,{type:`button`,onClick:()=>l(e=>!e),className:`shrink-0 p-1 text-muted-foreground transition-colors hover:text-foreground`,"aria-expanded":c,"aria-controls":`wizard-steps-mobile-target`,"aria-label":t(c?`searchWizard.hideStepNav`:`searchWizard.showStepNav`),children:c?(0,V.jsx)(zk,{size:22,strokeWidth:2}):(0,V.jsx)(Ik,{size:22,strokeWidth:2})})]}),(0,V.jsx)(`div`,{className:`grid overflow-hidden border-t border-border/30 transition-[grid-template-rows] duration-[380ms] ease-in-out motion-reduce:transition-none ${c?`grid-rows-[1fr]`:`grid-rows-[0fr]`}`,children:(0,V.jsx)(`div`,{className:`min-h-0 overflow-hidden`,children:(0,V.jsx)(`div`,{id:`wizard-steps-mobile-target`,className:`px-3 py-2.5 sm:px-4 sm:py-3`})})})]}),(0,V.jsx)(`aside`,{className:`relative z-20 hidden h-full w-full shrink-0 flex-col border-r border-border/40 bg-surface px-5 py-5 shadow-sm md:px-6 md:py-6 lg:flex lg:w-[320px] lg:px-7 lg:py-7 xl:w-[360
36px]`,children:(0,V.jsxs)(`div`,{className:`flex h-full flex-col`,children:[(0,V.jsxs)(zi,{to:`/dashboard/searches`,className:`group mb-5 inline-flex items-center gap-2.5 text-[10px] font-black uppercase tracking-[0.2em] text-muted-foreground transition-all hover:text-primary sm:mb-6 sm:text-xs lg:mb-7`,children:[(0,V.jsx)(`div`,{className:`flex h-8 w-8 items-center justify-center rounded-xl bg-surface-elevated transition-all group-hover:bg-primary/10 group-hover:text-primary`,children:(0,V.jsx)(mj,{size:14,strokeWidth:2.5})}),t(`common.cancel`)]}),(0,V.jsxs)(`div`,{className:`mb-6 flex items-start gap-3 sm:mb-8 sm:gap-3.5`,children:[(0,V.jsxs)(`div`,{className:`flex h-10 w-10 shrink-0 items-center justify-center rounded-xl border border-border/60 bg-surface-elevated text-primary sm:h-11 sm:w-11 lg:h-12 lg:w-12`,children:[(0,V.jsx)(f,{size:18,strokeWidth:2,className:`lg:hidden`}),(0,V.jsx)(f,{size:20,strokeWidth:2,className:`hidden lg:block`})]}),(0,V.jsxs)(`div`,{className:`min-w-0 pt-0.5`,children:[(0,V.jsx)(`h1`,{className:`text-lg font-semibold tracking-tight text-foreground sm:text-xl lg:text-2xl`,children:u}),(0,V.jsx)(`p`,{className:`mt-1 text-xs leading-snug text-muted-foreground sm:text-sm`,children:d})]})]}),(0,V.jsx)(`div`,{id:`wizard-steps-target`,className:`min-h-0 flex-1 overflow-y-auto`})]})}),(0,V.jsxs)(`main`,{id:`create-search-anything-main`,className:`relative min-h-0 flex-1 overflow-y-auto overflow-x-hidden`,children:[(0,V.jsxs)(`div`,{className:`pointer-events-none fixed inset-0 z-0 overflow-hidden`,children:[(0,V.jsx)(`div`,{className:`absolute -left-20 top-0 h-[600px] w-[600px] rounded-full bg-primary/5 blur-[150px]`}),(0,V.jsx)(`div`,{className:`absolute -right-20 bottom-0 h-[600px] w-[600px] rounded-full bg-primary/5 blur-[150px]`})]}),(0,V.jsx)(`div`,{className:`relative z-10 mx-auto w-full max-w-5xl px-3 py-6 sm:px-4 sm:py-8 md:px-6 lg:px-10 lg:py-12`,children:(0,V.jsx)(aP,{editSearchId:i,duplicateFromSearchId:a})})]})]}):null}function lP(e){return e==null?``:String(e).trim().toLowerCase()}var uP={vehicles:Nk,cars:Nk,car:Nk,trucks:uj,truck:uj,motorcycles:Dk,motorcycle:Dk,powersports:hj,scooters:Dk,boats:YA,boat:YA,marine:gk,trailers:uj,trailer:uj,commercial:Ak,rvs:uj,rv:uj,property:jk,propertyforsale:jk,rentals:cA,rental:cA,apartments:Ak,apartment:Ak,rooms:cA,room:cA,apparel:XA,clothing:XA,shoes:ZA,electronics:Kk,computers:fA,mobile:$A,household:dA,home:cA,furniture:Xae,garden:tj,gardening:tj,tools:pj,hardware:Mae,hobbies:jA,beauty:ej,family:sA,baby:Tk,kids:Tk,pets:MA,dogs:Tae,cats:mae,sports:lj,fitness:Yk,bicycles:Dk,bikes:Dk,entertainment:tA,games:tA,toys:tA,music:Bae,instruments:EA,tickets:aj,jobs:kk,free:iA,classifieds:
36hA,misc:AA,miscellaneous:AA,jewelry:rA,jewellery:rA,watches:fj,health:Uae,medical:Qae,office:LA,industrial:oA};function dP(e){return e.split(/[/\s_-]+/g).map(e=>e.trim().toLowerCase()).filter(Boolean)}var fP=[{re:/\bcommercial vehicles?\b/i,icon:uj},{re:/\bvideo games?\b/i,icon:tA},{re:/\bcell phones?\b/i,icon:$A},{re:/\b(property|properties) for sale\b/i,icon:jk},{re:/\bhome\s*&\s*garden\b/i,icon:tj},{re:/\bmotorcycles?\b|\bscooters?\b|\bpower\s*sports?\b|\bbicycles?\b/i,icon:Dk},{re:/\bhousehold\b/i,icon:dA},{re:/\binstruments?\b/i,icon:EA},{re:/\bjewel(le)?ry\b/i,icon:rA},{re:/\bapartments?\b/i,icon:Ak},{re:/\bfurniture\b/i,icon:_k},{re:/\belectronics?\b/i,icon:Kk},{re:/\bcomputers?\b|\blaptops?\b/i,icon:fA},{re:/\bgarden(s|ing)?\b/i,icon:tj},{re:/\bbeauty\b/i,icon:ej},{re:/\bbabies\b|\bbaby\b/i,icon:Tk},{re:/\btickets?\b/i,icon:aj},{re:/\bsports?\b|\bathletic\b/i,icon:lj},{re:/\bfitness\b|\bgym\b/i,icon:Yk},{re:/\bboats?\b|\bmarine\b/i,icon:YA},{re:/\btrucks?\b/i,icon:uj},{re:/\bsuvs?\b|\bsedans?\b/i,icon:Nk},{re:/\bvehicles?\b|\bautos?\b/i,icon:Nk},{re:/\brent(als?|ing)?\b/i,icon:cA},{re:/\bhouses?\b|\bhomes?\b/i,icon:cA},{re:/\bpets?\b|\bdogs?\b|\bcats?\b|\bpupp(y|ies)\b|\bkittens?\b/i,icon:MA},{re:/\bjobs?\b|\bemployment\b/i,icon:kk},{re:/\bgames?\b|\btoys?\b/i,icon:tA},{re:/\btools?\b|\bhardware\b/i,icon:pj},{re:/\bclothing\b|\bapparel\b|\bfashion\b/i,icon:XA},{re:/\bphones?\b|\bsmartphones?\b/i,icon:PA},{re:/\bfree\b/i,icon:iA},{re:/\bcars?\b/i,icon:Nk},{re:/\bwatches?\b/i,icon:fj},{re:/\bshoes?\b/i,icon:ZA},{re:/\baudio\b|\bheadphones?\b|\bspeakers?\b/i,icon:Nae},{re:/\bcameras?\b|\bphotography\b/i,icon:pae},{re:/\bmonitor(s)?\b|\bscreen(s)?\b/i,icon:OA},{re:/\belectric(al)?\b|\bpower\b/i,icon:Wae},{re:/\boffice\b/i,icon:LA},{re:/\bindustrial\b|\bconstruction\b/i,icon:oA}];function pP(e){let t=lP(e.facebookCode),n=`${e.name.trim().toLowerCase()} ${t}`;if(t&&!/^\d+$/.test(t)){let e=uP[t];if(e)return e;for(let e of dP(t)){let t=uP[e];if(t)return t}}for(let{re:e,icon:t}of fP)if(e.test(n))return t;return hA}function mP(){let e=my(),t=or(),{status:n,isAuthenticated:r}=Jv(),[i,a]=(0,b.useState)([]),[o,s]=(0,b.useState)(``),[c,l]=(0,b.useState)(!0),u=(0,b.useCallback)(async()=>{s(``),l(!0);try{a((await Lo.get(`/api/catalog/categories`)).data.categories??[])}catch(t){s($v(e,t)),a([])}finally{l(!1)}},[e]);return(0,b.useEffect)(()=>{if(n!==`loading`){if(!r){t(`/auth/login`,{replace:!0});return}queueMicrotask(()=>{u()})}},[r,t,n,u]),n===`loading`||c&&!o?(0,V.jsxs)(`div`,{className:`mx-auto flex min-h-[50vh] w-full min-w-0 max-w-4xl flex-col items-center justify-center overflow-x-hidden px-3 py-16 sm:px-6 lg:px-8`,children:[(0,V.jsx)(`div`,{className:`h-10 w-10 animate-spin rounded-full border-2 border-primary border-t-transparent`}),(0,V.jsx)(`p`,{className:`mt-4 text-center text-sm font-medium text-muted-foreground`,children:e(`searchWizard.categoryPicker.loadingCategories`)})]}):r?(0,V.jsxs)(ik.main,{initial:{opacity:0,y:8},animate:{opacity:1,y:0},className:`mx-auto min-h-[60vh] w-full min-w-0 max-w-4xl overflow-x-hidden px-3 py-6 sm:px-6 sm:py-10 lg:px-8 pb-[max(1.5rem,env(safe-area-inset-bottom))]`,children:[(0,V.jsxs)(`div`,{className:`mb-6 sm:mb-8`,children:[(0,V.jsxs)(zi,{to:`/dashboard/searches`,className:`inline-flex max-w-full min-w-0 items-center gap-2 text-xs font-bold text-muted-foreground transition hover:text-primary sm:text-sm`,children:[(0,V.jsx)(bk,{size:18,className:`shrink-0`,strokeWidth:2}),(0,V.jsx)(`span`,{className:`truncate sm:whitespace-normal`,children:e(`searchWizard.backToSearches`)})]}),(0,V.jsx)(`h1`,{className:`mt-4 break-words text-2xl font-black tracking-tight text-foreground sm:mt-6 sm:text-3xl md:text-4xl`,children:e(`searchWizard.categoryPicker.title`)}),(0,V.jsx)(`p`,{className:`mt-2 text-xs leading-relaxed text-muted-foreground sm:text-sm sm:leading-normal md:text-base`,children:e(`searchWizard.categoryPicker.subtitle`)})]}),o?(0,V.jsxs)(`div`,{className:`mb-6 flex flex-col items-center gap-4 roun
36ded-2xl border border-error/30 bg-error/5 px-3 py-7 text-center sm:mb-8 sm:px-4 sm:py-8`,role:`alert`,children:[(0,V.jsx)(Bk,{className:`h-10 w-10 text-error`}),(0,V.jsx)(`p`,{className:`text-sm font-medium text-error`,children:o}),(0,V.jsxs)(`button`,{type:`button`,onClick:()=>void u(),className:`inline-flex items-center gap-2 rounded-xl bg-surface-elevated px-4 py-2 text-sm font-bold text-foreground transition hover:bg-border`,children:[(0,V.jsx)(zA,{size:16}),e(`common.tryAgain`)]})]}):null,!o&&(0,V.jsxs)(`div`,{className:`space-y-5 sm:space-y-6`,children:[(0,V.jsxs)(`button`,{type:`button`,onClick:()=>t(`/dashboard/searches/new/anything`),className:`group flex w-full flex-col gap-3 rounded-2xl border-2 border-dashed border-primary/40 bg-primary/5 p-4 text-left transition hover:border-primary hover:bg-primary/10 active:scale-[0.99] sm:flex-row sm:items-center sm:gap-4 sm:p-6`,children:[(0,V.jsxs)(`div`,{className:`flex min-w-0 flex-1 items-start gap-3 sm:items-center`,children:[(0,V.jsx)(`div`,{className:`flex h-12 w-12 shrink-0 items-center justify-center rounded-xl bg-primary text-primary-foreground shadow-inner sm:h-14 sm:w-14`,children:(0,V.jsx)(ej,{className:`h-6 w-6 sm:h-7 sm:w-7`,strokeWidth:2})}),(0,V.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(0,V.jsx)(`p`,{className:`text-base font-black text-foreground sm:text-lg md:text-xl`,children:e(`searchWizard.categoryPicker.anythingTitle`)}),(0,V.jsx)(`p`,{className:`mt-1 text-xs text-muted-foreground sm:text-sm`,children:e(`searchWizard.categoryPicker.anythingBody`)})]})]}),(0,V.jsx)(Rk,{className:`h-5 w-5 shrink-0 self-end text-primary opacity-70 transition group-hover:translate-x-0.5 group-hover:opacity-100 sm:h-6 sm:w-6 sm:self-auto`})]}),(0,V.jsxs)(`div`,{children:[(0,V.jsxs)(`h2`,{className:`mb-3 flex flex-wrap items-center gap-2 text-[11px] font-black uppercase tracking-widest text-muted-foreground sm:mb-4 sm:text-sm sm:tracking-widest`,children:[(0,V.jsx)(jae,{size:16,className:`shrink-0`,"aria-hidden":!0}),e(`searchWizard.categoryPicker.categoriesHeading`)]}),i.length===0?(0,V.jsx)(`p`,{className:`rounded-2xl border border-border/60 bg-surface/60 px-3 py-7 text-center text-xs text-muted-foreground sm:px-4 sm:py-8 sm:text-sm`,children:e(`searchWizard.categoryPicker.noCategories`)}):(0,V.jsx)(`ul`,{className:`grid grid-cols-1 gap-2.5 sm:grid-cols-2 sm:gap-3`,children:i.map((e,n)=>{let r=pP({facebookCode:e.facebook_code,name:e.name});return(0,V.jsx)(`li`,{children:(0,V.jsxs)(ik.button,{type:`button`,initial:{opacity:0,y:10},animate:{opacity:1,y:0},transition:{delay:Math.min(n*.04,.4)},onClick:()=>t(`/dashboard/searches/new/category/${e.id}`),className:`group flex min-h-[3.25rem] w-full items-center gap-3 rounded-2xl border border-border/60 bg-surface p-3.5 text-left shadow-sm transition hover:border-primary/40 hover:shadow-md active:scale-[0.99] sm:min-h-0 sm:p-4 md:p-5`,children:[(0,V.jsx)(`div`,{className:`flex h-10 w-10 shrink-0 items-center justify-center rounded-xl bg-surface-elevated text-primary sm:h-11 sm:w-11`,children:(0,V.jsx)(r,{size:18,strokeWidth:2,"aria-hidden":!0,className:`sm:h-5 sm:w-5`})}),(0,V.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(0,V.jsx)(`p`,{className:`break-words font-black leading-snug text-foreground sm:text-[15px] md:text-base`,children:e.name}),e.description?(0,V.jsx)(`p`,{className:`mt-0.5 line-clamp-2 text-[11px] text-muted-foreground sm:text-xs`,children:e.description}):null]}),(0,V.jsx)(Rk,{className:`h-5 w-5 shrink-0 text-muted-foreground transition group-hover:translate-x-0.5 group-hover:text-primary`})]})},e.id)})})]})]})]}):null}function hP(e){if(e==null)return null;let t=String(e).trim().toLowerCase();return t.length>0?t:null}function gP(e){if(e==null)return null;let t=String(e).trim().toLowerCase();return t.length>0?t:null}var _P=`default`,vP=`vehicle_passenger`,yP={},bP={},xP={cars:vP},SP={[_P]:{id:_P,label:`Default`,fields:[]},[vP]:{id:vP,label:`Passenger vehicles`,fields:[],step1Kind:`vehicle_passenger`}};function CP(e){let t=hP(e.subcategoryFacebookCode),n=hP(e.categoryFacebookCode),r=gP(e.subcategoryDisplayName);if(t){let e=yP[t];
36if(e&&SP[e])return{fieldSetId:e,fieldSet:SP[e],resolution:`subcategory_facebook_code`}}if(n){let e=bP[n];if(e&&SP[e])return{fieldSetId:e,fieldSet:SP[e],resolution:`category_facebook_code`}}if(r){let e=xP[r];if(e&&SP[e])return{fieldSetId:e,fieldSet:SP[e],resolution:`subcategory_display_name`}}return{fieldSetId:_P,fieldSet:SP[_P],resolution:`default`}}function wP(e){if(e.defaultValue!==void 0)return e.defaultValue;switch(e.kind){case`boolean`:return!1;case`number`:return``;case`select`:return e.options?.length&&!e.allowEmpty?e.options[0].value:``;default:return``}}function TP(e){let t={};for(let n of e.fields)t[n.id]=wP(n);return t}function EP(e,t){return e.fields.filter(e=>e.step===t).slice().sort((e,t)=>e.id.localeCompare(t.id))}function wse(e,t,n){return{...e,[t]:n}}function Tse(e,t,n){let r=t.required===!0;if(t.kind===`boolean`)return null;if(t.kind===`number`){if(n===``||n==null)return r?e(`searchWizard.validation.required`):null;let i=typeof n==`number`?n:Number(n);return Number.isNaN(i)||t.min!=null&&i<t.min||t.max!=null&&i>t.max?e(`searchWizard.validation.validNumber`):null}if(t.kind===`select`){let i=n==null?``:String(n);return i.trim()?!t.options?.some(e=>e.value===i)&&t.options?.length?e(`searchWizard.validation.invalidChoice`):null:r?e(`searchWizard.validation.required`):null}let i=n==null?``:String(n).trim();return i?t.maxLength!=null&&i.length>t.maxLength?e(`searchWizard.validation.searchNameMax`,{max:t.maxLength}):null:r?e(`searchWizard.validation.required`):null}function DP(e,t,n,r){let i={};for(let a of t.fields){if(a.step!==n)continue;let t=Tse(e,a,r[a.id]);t&&(i[a.id]=t)}return i}function OP(e){return Object.keys(e).length>0}function kP({fields:e,values:t,errors:n,onChange:r}){return e.length===0?null:(0,V.jsx)(`div`,{className:`space-y-6 sm:space-y-7`,children:e.map(e=>{let i=n[e.id],a=(0,V.jsxs)(`label`,{htmlFor:`cat-field-${e.id}`,className:`ml-1 text-[11px] font-black uppercase tracking-widest text-muted-foreground/60`,children:[e.label,e.required?(0,V.jsx)(`span`,{className:`text-error`,children:` *`}):null]}),o=`min-h-12 w-full rounded-xl border-2 bg-surface-elevated px-4 text-sm font-medium outline-none transition-colors focus:outline-none sm:min-h-[52px] sm:px-6 sm:text-base `+(i?`border-error focus:border-error`:`border-border/60 focus:border-primary`),s=t[e.id];switch(e.kind){case`boolean`:return(0,V.jsxs)(`div`,{className:`space-y-2`,children:[a,(0,V.jsxs)(`div`,{className:`flex items-center gap-3 px-1`,children:[(0,V.jsx)(`input`,{id:`cat-field-${e.id}`,type:`checkbox`,checked:!!s,disabled:e.disabled,onChange:t=>r(e.id,t.target.checked),className:`h-5 w-5 rounded border-2 border-border text-primary focus:ring-primary`}),e.description?(0,V.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:e.description}):null]}),i?(0,V.jsx)(`p`,{className:`text-xs font-medium text-error`,role:`alert`,children:i}):null]},e.id);case`textarea`:return(0,V.jsxs)(`div`,{className:`space-y-2`,children:[a,(0,V.jsx)(`textarea`,{id:`cat-field-${e.id}`,value:s==null?``:String(s),onChange:t=>r(e.id,t.target.value),placeholder:e.placeholder,maxLength:e.maxLength,disabled:e.disabled,rows:4,className:`${o} min-h-[120px] resize-y py-3`}),e.description?(0,V.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:e.description}):null,i?(0,V.jsx)(`p`,{className:`text-xs font-medium text-error`,role:`alert`,children:i}):null]},e.id);case`number`:return(0,V.jsxs)(`div`,{className:`space-y-2`,children:[a,(0,V.jsx)(`input`,{id:`cat-field-${e.id}`,type:`number`,value:s===``||s==null?``:String(s),onChange:t=>{let n=t.target.value;r(e.id,n===``?``:Number(n))},placeholder:e.placeholder,min:e.min,max:e.max,step:e.stepAttr??`any`,disabled:e.disabled,className:o}),e.description?(0,V.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:e.description}):null,i?(0,V.jsx)(`p`,{className:`text-xs font-medium text-error`,role:`alert`,children:i}):null]},e.id);case`select`:return(0,V.jsxs)(`div`,{className:`space-y-2`,children:[a,(0,V.jsxs)(`select`,{id:`cat-field-${e.id}`,value:s==null?``:String(s),onChange:t=>r(e.id,t.target.value),disabled:e.disabled,className:o,children:[e.allowEmpty===!0?(0,V.jsx)(`option`,{value:``,children:`Selectâ¦`}):null,(e.options??[]).map(e=>(0,V.jsx)(`option`,{value:e.value,children:e.label},e.value))]}),e.description?(0,V.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:e.description}):null,i?(0,V.jsx)(`p`,{className:`text-xs font-medium text-error`,role:`alert`,children:i}):null]},e.id);default:return(0,V.jsxs)(`div`,{className:`space-y-2`,children:[a,(0,V.jsx)(`input`,{id:`cat-field-${e.id}`,type:`text`,value:s==null?``:String(s),onChange:t=>r(e.id,t.target.value),placeholder:e.placeholder,maxLength:e.maxLength,disabled:e.disabled,className:o}),e.description?(0,V.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:e.description}):null,i?(0,V.jsx)(`p`,{className:`text-xs font-medium text-error`,role:`alert`,children:i}):null]},e.id)}})})}async function Ese(){return(await Lo.get(`/api/catalog/vehicles/makes`)).data.makes??[]}async function Dse(e){return e.length===0?[]:(await Lo.post(`/api/catalog/vehicles/models`,{make_ids:e})).data.models??[]}var Ose=[{id:`facebook`,label:`Facebook Marketplace`,image:_N,api:`facebook`},{id:`kijiji`,label:`Kijiji`,image:vN,api:`kijiji`},{id:`autotrader`,label:`AutoTrader`,image:gN,api:`autotrader`}].map(e=>({id:e.id,label:e.label,image:e.image,value:e.api,disabled:!1})),AP=()=>({provider:``,anyMake:!1,selectedMakeIds:[],modelAnyByMakeId:{},selectedModelById:{}});function jP(e){let t=[];for(let n of e.selectedMakeIds)if(e.modelAnyByMakeId[n])t.push({makeId:n,modelIds:[]});else{let r=Object.values(e.selectedModelById).filter(e=>e.makeId===n).map(e=>e.modelId);t.push({makeId:n,modelIds:r})}return t}var MP=[],NP=[],PP=new Set;function kse(e,t,n){if(e==null||!e.provider&&!e.makes&&!e.models)return null;if(t)return e;let r={};return e.provider&&n.provider&&(r.provider=e.provider),e.makes&&n.makes&&(r.makes=e.makes),e.models&&n.models&&(r.models=e.models),Object.keys(r).length?r:null}function Ase(e,t,n,r){if(t.anyMake)return e(`searchWizard.validation.anyMake`);if(t.selectedMakeIds.length===0)return e(`searchWizard.validation.selectMakeError`);let i=[...t.selectedMakeIds].map(e=>
36n.get(e)?.name).filter(Boolean);return i.length===0&&t.selectedMakeIds.length>0?r.trim()?r:e(`searchWizard.loadingEllipsis`):(i.sort((e,t)=>e.localeCompare(t)),i.length<=2?i.join(`, `):`${i.slice(0,2).join(`, `)} +${i.length-2}`)}function jse(e,t,n,r,i){if(t.anyMake)return e(`searchWizard.validation.anyModel`);if(t.selectedMakeIds.length===0)return e(`searchWizard.validation.selectMakesFirst`);if(Object.keys(t.selectedModelById).length>0&&r.size===0)return i.trim()?i:e(`searchWizard.loadingEllipsis`);let a=[...t.selectedMakeIds].sort((e,t)=>{let r=n.get(e)?.name??e,i=n.get(t)?.name??t;return r.localeCompare(i)}),o=[];for(let n of a){if(t.modelAnyByMakeId[n])continue;let i=Object.values(t.selectedModelById).filter(e=>e.makeId===n);for(let t of i)o.push(r.get(t.modelId)?.name??e(`searchWizard.validation.model`))}let s=a.some(e=>t.modelAnyByMakeId[e]);if(!(o.length>0||s))return e(`searchWizard.validation.selectModel`);if(a.length>0&&a.every(e=>t.modelAnyByMakeId[e])&&o.length===0)return e(`searchWizard.validation.anyModel`);o.sort((e,t)=>e.localeCompare(t));let c=e(`searchWizard.validation.anyModel`).replace(/ model$/i,``),l=s?[...o,c]:o;return l.length===0?e(`searchWizard.validation.selectModel`):l.length<=2?l.join(`, `):`${l.slice(0,2).join(`, `)} +${l.length-2}`}var Mse=b.memo(({makeId:e,makeName:t,list:n,anyModel:r,expanded:i,onToggleExpand:a,onToggleModelAny:o,onToggleModel:s,selectedModelById:c})=>(0,V.jsxs)(`div`,{className:`border-b border-border/40 last:border-b-0`,children:[(0,V.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,V.jsxs)(`button`,{type:`button`,onClick:()=>a(e),"aria-expanded":i,className:`flex min-w-0 flex-1 items-center gap-2 rounded-xl py-2.5 pl-1 pr-2 text-left transition-colors hover:bg-muted/20`,children:[(0,V.jsx)(Rk,{size:18,strokeWidth:2,"aria-hidden":!0,className:`shrink-0 text-muted-foreground transition-transform duration-300 ease-in-out motion-reduce:transition-none ${i?`rotate-90`:``}`}),(0,V.jsx)(`span`,{className:`min-w-0 truncate text-sm font-bold text-foreground`,children:t})]}),(0,V.jsx)(`button`,{type:`button`,onClick:t=>{t.stopPropagation(),o(e)},"aria-pressed":r,className:`shrink-0 rounded-lg px-2.5 py-1.5 text-xs font-semibold transition-colors ${r?`text-primary`:`text-muted-foreground hover:bg-muted/30 hover:text-foreground`}`,children:(0,V.jsxs)(`span`,{className:`flex items-center gap-2`,children:[`Any model`,r?(0,V.jsx)(Fk,{size:14,strokeWidth:2.5,className:`shrink-0 text-primary`,"aria-hidden":!0}):null]})})]}),(0,V.jsx)(zD,{initial:!1,children:i&&(0,V.jsx)(ik.div,{initial:{height:0,opacity:0},animate:{height:`auto`,opacity:1},exit:{height:0,opacity:0},transition:{duration:.3,ease:[.4,0,.2,1]},className:`overflow-hidden`,children:(0,V.jsx)(`div`,{className:`pl-1 pt-2 pb-2`,children:r?(0,V.jsx)(`p`,{className:`px-2 text-xs text-muted-foreground`,children:`All models for this make will match.`}):n.length===0?(0,V.jsx)(`p`,{className:`px-2 text-xs text-muted-foreground`,children:`No models returned for this make.`}):(0,V.jsx)(`ul`,{className:`flex flex-col gap-1 px-2 py-1`,children:n.map(e=>{let t=!!c[e.id];return(0,V.jsx)(`li`,{children:(0,V.jsxs)(`button`,{type:`button`,onClick:()=>s(e),"aria-pressed":t,className:`flex w-full items-center justify-between gap-3 rounded-xl px-3 py-2.5 text-left text-sm transition-colors ${t?`text-primary`:`text-foreground hover:bg-muted/30`}`,children:[(0,V.jsx)(`span`,{className:`min-w-0 flex-1 font-medium ${t?`text-primary`:`text-foreground`}`,children:e.name}),t?(0,V.jsx)(Fk,{size:16,strokeWidth:2.5,className:`shrink-0 text-primary`,"aria-hidden":!0}):null]})},e.id)})})})})})]}));function Nse({value:e,onSnapshotChange:t,fieldErrors:n=null,showAllFieldErrors:r=!1}){let i=my(),[a,o]=(0,b.useState)(!1),[s,c]=(0,b.useState)(!1),[l,u]=(0,b.useState)(!1),[d,f]=(0,b.useState)(MP),[p,m]=(0,b.useState)(!1),[h,g]=(0,b.useState)(``),_=(0,b.useRef)(MP.length>0),v=(0,b.useRef)(!1),[y,S]=(0,b.useState)(``),[C,w]=(0,b.useState)(``),[T,E]=(0,b.useState)(NP),[D,O]=(0,b.useState)(!1),[k,A]=(0,b.useState)(``),j=(0,b.useRef)(``),M=(0,b.useRef)(!1),[N,P]=(0,b.useState)(null),[F,ee]=(0,b.useState)(()=>new Set),I=(0,b.useCallback)(e=>{ee(t=>{let n=new Set(t);return n.has(e)?n.delete(e):n.add(e),n})},[]);(0,b.useEffect)(()=>{N===`models`&&queueMicrotask(()=>{ee(new Set)})},[N]);let te=(0,b.useCallback)(async()=>
36{if(!(_.current||v.current)){v.current=!0,m(!0),g(``);try{let e=await Ese();f(e),MP=e,_.current=!0}catch{d.length===0&&f([]),g(i(`searchWizard.validation.loadMakesError`))}finally{m(!1),v.current=!1}}},[d.length]);(0,b.useEffect)(()=>{queueMicrotask(()=>{te()})},[te]);let ne=(0,b.useMemo)(()=>[...e.selectedMakeIds].sort().join(`,`),[e.selectedMakeIds]),re=(0,b.useCallback)(async()=>{let t=[...e.selectedMakeIds];if(t.length===0)return;let n=t.filter(e=>!PP.has(e));if(n.length===0)return;let r=[...t].sort().join(`,`);if(j.current=r,!M.current){t.some(e=>PP.has(e))||O(!0),A(``),M.current=!0;try{let e=await Dse(n);if(j.current!==r)return;E(t=>{let n=new Set(t.map(e=>e.id)),r=e.filter(e=>!n.has(e.id)),i=[...t,...r];return NP=i,i}),n.forEach(e=>PP.add(e))}catch{j.current===r&&A(i(`searchWizard.validation.loadModelsError`))}finally{j.current===r&&O(!1),M.current=!1}}},[e.selectedMakeIds]);(0,b.useEffect)(()=>{ne.length!==0&&e.selectedMakeIds.some(e=>!PP.has(e))&&queueMicrotask(()=>{re()})},[ne,re,e.selectedMakeIds]),(0,b.useEffect)(()=>{queueMicrotask(()=>{ee(t=>{let n=new Set;for(let r of t)e.selectedMakeIds.includes(r)&&n.add(r);return n})})},[ne,e.selectedMakeIds]),(0,b.useEffect)(()=>{if(!N)return;let e=e=>{e.key===`Escape`&&P(null)};return window.addEventListener(`keydown`,e),()=>window.removeEventListener(`keydown`,e)},[N]),(0,b.useEffect)(()=>{if(!N)return;let e=document.body.style.overflow;return document.body.style.overflow=`hidden`,()=>{document.body.style.overflow=e}},[N]),(0,b.useEffect)(()=>{N||queueMicrotask(()=>{S(``),w(``)})},[N]);let ie=(0,b.useMemo)(()=>{let e=y.trim().toLowerCase();return e?d.filter(t=>t.name.toLowerCase().includes(e)):d},[d,y]),ae=(0,b.useMemo)(()=>{let e=new Map;for(let t of d)e.set(t.id,t);return e},[d]),oe=(0,b.useMemo)(()=>{let e=new Map;for(let t of T){let n=e.get(t.make_id)??[];n.push(t),e.set(t.make_id,n)}for(let[,t]of e)t.sort((e,t)=>e.name.localeCompare(t.name));return e},[T]),se=(0,b.useMemo)(()=>{let e=new Map;for(let t of T)e.set(t.id,t);return e},[T]),ce=(0,b.useMemo)(()=>{let t=C.trim().toLowerCase(),n=[],r=[...e.selectedMakeIds].sort((e,t)=>(ae.get(e)?.name??e).localeCompare(ae.get(t)?.name??t));for(let e of r){let r=ae.get(e)?.name??`Make`,i=oe.get(e)??[];if(!t){n.push({makeId:e,makeName:r,filteredModels:i,forceExpand:!1});continue}let a=r.toLowerCase().includes(t),o=i.filter(e=>e.name.toLowerCase().includes(t));(a||o.length>0)&&n.push({makeId:e,makeName:r,filteredModels:o.length>0?o:i,forceExpand:o.length>0})}return n},[C,e.selectedMakeIds,ae,oe]),le=(0,b.useMemo)(()=>Ase(i,e,ae,h),[i,e,ae,h]),ue=(0,b.useMemo)(()=>jse(i,e,ae,se,k),[i,e,ae,se,k]),de=(0,b.useMemo)(()=>kse(n,r,{provider:a,makes:s,models:l}),[n,r,a,s,l]),fe=(0,b.useCallback)(e=>{t(e)},[t]),L=e=>{c(!0),fe(t=>{let n=t.selectedMakeIds.includes(e),r=n?t.selectedMakeIds.filter(t=>t!==e):[...t.selectedMakeIds,e],i={...t.modelAnyByMakeId};n?delete i[e]:i[e]=!1;let a={...t.selectedModelById};for(let[t,n]of Object.entries(a))n.makeId===e&&delete a[t];return{...t,anyMake:!1,selectedMakeIds:r,modelAnyByMakeId:i,selectedModelById:a}})},pe=()=>{c(!0),fe(e=>({...e,anyMake:!e.anyMake,selectedMakeIds:[],modelAnyByMakeId:{},selectedModelById:{}}))},me=()=>{c(!0),fe(e=>{let t=ie.map(e=>e.id),n=Array.from(new Set([...e.selectedMakeIds,...t]));return{...e,anyMake:!1,selectedMakeIds:n}})},he=()=>{c(!0),fe(e=>({...e,anyMake:!1,selectedMakeIds:[],modelAnyByMakeId:{},selectedModelById:{}}))},ge=()=>{u(!0),fe(e=>{let t={...e.modelAnyByMakeId},n={...e.selectedModelById};for(let r of e.selectedMakeIds){t[r]=!0;for(let[e,t]of Object.entries(n))t.makeId===r&&delete n[e]}return{...e,modelAnyByMakeId:t,selectedModelById:n}})},_e=()=>{u(!0),fe(e=>{let t={...e.modelAnyByMakeId},n={...e.selectedModelById};for(let r of e.selectedMakeIds){t[r]=!1;for(let[e,t]of Object.entries(n))t.makeId===r&&delete n[e]}return{...e,modelAnyByMakeId:t,selectedModelById:n}})},ve=e=>{o(!0),fe(t=>({...t,provider:e}))},ye=e=>{u(!0),fe(t=>{let n=!t.modelAnyByMakeId[e],r={...t.modelAnyByMakeId,[e]:n},i={...t.selectedModelById};if(n)for(let[t,n]of Object.entries(i))n.makeId===e&&delete i[t];return{...t,modelAnyByMakeId:r,selectedModelById:i}})},be=e=>{u(!0),fe(t=>{let n={...t.selectedModelById};return n[e.id]?delete n[e.id]:n[e.id]={modelId:e.id,makeId:e.make_id},{...t,selectedModelById:n,modelAnyByMakeId:{...t.modelAnyByMakeId,[e.make_id]:!1}}})},xe=e=>{e===`makes`&&c(!0),e===`models`&&u(!0),P(e),e===`makes`&&!_.current&&te()},Se=(0,b.useCallback)(()=>P(null),[]),Ce=`flex min-h-12 w-full items-center justify-between gap-2 rounded-xl border-2 bg-surface-elevated px-4 py-3 text-left text-sm font-medium transition-colors sm:min-h-14 sm:px-6 sm:text-base disabled:cursor-not-allowed disabled:opacity-50`,we=`${Ce} ${de?.makes?`border-error/40 bg-error/5 hover:border-error/50 focus:border-error focus:outline-none`:`border-border/60 hover:border-primary/40 focu
36s:border-primary focus:outline-none`}`,Te=`${Ce} ${de?.models?`border-error/40 bg-error/5 hover:border-error/50 focus:border-error focus:outline-none`:`border-border/60 hover:border-primary/40 focus:border-primary focus:outline-none`}`,Ee=typeof document<`u`&&(0,x.createPortal)((0,V.jsx)(zD,{children:N?(0,V.jsxs)(V.Fragment,{children:[(0,V.jsx)(ik.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:{duration:.25},onClick:Se,className:`fixed inset-0 z-[280] bg-black/55 backdrop-blur-[2px]`,"aria-hidden":!0},`vehicle-mm-backdrop`),(0,V.jsxs)(ik.aside,{role:`dialog`,"aria-modal":`true`,"aria-labelledby":N===`makes`?`vehicle-make-drawer-title`:`vehicle-model-drawer-title`,initial:{x:`100%`},animate:{x:0},exit:{x:`100%`},transition:{type:`spring`,damping:28,stiffness:200},className:`fixed inset-y-0 right-0 z-[290] flex h-[100dvh] min-h-0 w-[90%] max-w-[380px] flex-col border-l border-border/50 bg-surface shadow-[-20px_0_50px_rgba(0,0,0,0.35)]`,children:[(0,V.jsxs)(`header`,{className:`flex h-16 shrink-0 items-center justify-between border-b border-border/50 bg-surface-elevated/50 px-4`,children:[(0,V.jsx)(`h2`,{id:N===`makes`?`vehicle-make-drawer-title`:`vehicle-model-drawer-title`,className:`text-xl font-black tracking-tight text-foreground`,children:i(N===`makes`?`searchWizard.validation.makes`:`searchWizard.validation.models`)}),(0,V.jsx)(`button`,{type:`button`,onClick:Se,className:`flex h-9 w-9 shrink-0 items-center justify-center rounded-xl bg-surface-elevated text-foreground transition-all hover:bg-primary/10 hover:text-primary`,"aria-label":i(`common.close`),children:(0,V.jsx)(mj,{size:18,strokeWidth:2})})]}),(0,V.jsx)(`div`,{className:`custom-scrollbar min-h-0 flex-1 overflow-y-auto overscroll-contain px-4 py-4`,children:N===`makes`?(0,V.jsxs)(`div`,{role:`region`,"aria-label":i(`searchWizard.validation.makes`),className:`flex flex-col gap-5`,children:[(0,V.jsx)(`div`,{className:`flex items-center justify-between`,children:(0,V.jsxs)(`p`,{className:`text-[11px] font-black uppercase tracking-widest text-muted-foreground/70`,children:[i(`searchWizard.vehicle.chooseMakes`),` `,(0,V.jsx)(`span`,{className:`text-error`,children:`*`})]})}),(0,V.jsxs)(`div`,{className:`space-y-5`,children:[(0,V.jsxs)(`div`,{className:`flex flex-col gap-2.5`,children:[(0,V.jsxs)(`button`,{type:`button`,onClick:pe,className:`flex w-full items-center justify-center gap-2.5 rounded-2xl border-2 py-3.5 text-sm font-black uppercase tracking-wider transition-all ${e.anyMake?`border-primary bg-primary text-primary-foreground shadow-lg shadow-primary/20`:`border-border/60 bg-surface-elevated text-muted-foreground hover:border-primary/40 hover:text-primary`}`,children:[e.anyMake&&(0,V.jsx)(Fk,{size:16,strokeWidth:3}),i(`searchWizard.vehicle.selectAny`)]}),(0,V.jsxs)(`p`,{className:`px-1 text-[11px] font-medium leading-relaxed text-muted-foreground/80 sm:text-xs`,children:[`When on, this search does not filter by`,` `,(0,V.jsx)(`strong`,{className:`text-foreground/90`,children:`make or model`}),`âlistings can match any vehicle on your selected marketplace.`]})]}),(0,V.jsx)(`div`,{className:`border-t border-border/40 pt-5`,children:(0,V.jsxs)(`div`,{className:`group relative`,children:[(0,V.jsx)(UA,{className:`pointer-events-none absolute left-3.5 top-1/2 -translate-y-1/2 transition-colors ${e.anyMake?`text-muted-foreground/35`:`text-muted-foreground group-focus-within:text-primary`}`,size:18,strokeWidth:2.5}),(0,V.jsx)(`input`,{type:`search`,value:y,onChange:e=>S(e.target.value),placeholder:i(`searchWizard.validation.searchMakes`),disabled:e.anyMake,className:`w-full rounded-2xl border border-border bg-surface-elevated py-3.5 pl-11 pr-4 text-sm font-medium outline-none transition-all disabled:cursor-not-allowed disabled:opacity-50 ${e.anyMake?``:`hover:border-border-strong focus:border-primary focus:ring-4 focus:ring-primary/5`}`})]})}),(0,V.jsxs)(`div`,{className:`flex items-center justify-end gap-5 pt-1`,children:[(0,V.jsxs)(`button`,{type:`button`,onClick:me,disabled:e.anyMake,className:`group flex items-center gap-1.5 text-[10px] font-black uppercase tracking-wider text-muted-foreground transition-colors enabled:hover:text-primary disabled:cursor-not-allowed disabled:opacity-30`,children:[(0,V.jsx)(IA,{size:13,className:`transition-transform ${e.anyMake?``:`group-hover:rotate-90`}`}),i(`searchWizard.vehicle.selectAll`)]}),(0,V.jsxs)(`button`,{type:`button`,onClick:he,disabled:e.anyMake,className:`group flex items-center gap-1.5 text-[10px] font-black uppercase tracking-wider text-muted-foreground transition-colors enabled:hover:text-error disabled:cursor-not-allowed disabled:opacity-30`,children:[(0,V.jsx)(oj,{size:13,className:`transition-transform ${e.anyMake?``:`group-hover:scale-110`}`}),i(`searchWizard.vehicle.clearAll`)]})]})]}),(0,V.jsxs)(`div`,{className:`relative min-h-[12rem] flex-1 overflow-y-auto transition-all duration-300 sm:min-h-[14rem] ${e.anyMake?`cursor-not-allowed opacity-40 grayscale-[0.4]`:`opacity-100`}`,children:[e.anyMake?(0,V.jsx)(`div`,{className:`pointer-events-auto absolute inset-0 z-[1] cursor-not-allowed bg-transparent`,"aria-hidden":!0}):null,(0,V.jsx)(`div`,{className:`relative z-0`,children:p?(0,V.jsxs)(`div`,{className:`flex items-center justify-center gap-2 py-12 text-sm font-medium text-muted-foreground`,children:[(0,V.jsx)(_A,{className:`h-5 w-5 animate-spin text-primary`}),`Loading makesâ¦`]}
36):h?(0,V.jsxs)(`div`,{className:`flex flex-col items-center gap-2 px-4 py-8 text-center`,children:[(0,V.jsx)(`p`,{className:`text-sm font-bold text-error`,children:h}),(0,V.jsx)(`button`,{type:`button`,onClick:()=>void te(),className:`text-xs font-black uppercase tracking-widest text-primary hover:underline`,children:`Retry`})]}):ie.length===0?(0,V.jsxs)(`div`,{className:`flex flex-col items-center gap-2 px-4 py-12 text-center`,children:[(0,V.jsx)(UA,{size:24,className:`text-muted-foreground/30`}),(0,V.jsx)(`p`,{className:`text-sm font-medium text-muted-foreground`,children:`No makes match your search.`})]}):(0,V.jsx)(`ul`,{className:`flex flex-col gap-1 px-2.5 py-1`,children:ie.map(t=>{let n=e.selectedMakeIds.includes(t.id);return(0,V.jsx)(`li`,{children:(0,V.jsxs)(`button`,{type:`button`,onClick:()=>L(t.id),disabled:e.anyMake,"aria-pressed":n,className:`flex w-full items-center justify-between gap-3 rounded-xl px-3 py-3 text-left transition-colors disabled:cursor-not-allowed ${n?`text-primary`:`text-foreground enabled:hover:bg-muted/30`}`,children:[(0,V.jsx)(`span`,{className:`min-w-0 flex-1 text-sm font-bold tracking-tight ${n?`text-primary`:`text-foreground`}`,children:t.name}),n?(0,V.jsx)(Fk,{size:18,strokeWidth:2.5,className:`shrink-0 text-primary`,"aria-hidden":!0}):null]})},t.id)})})})]})]}):(0,V.jsxs)(`div`,{role:`region`,"aria-label":`Models`,className:`flex flex-col gap-5`,children:[(0,V.jsxs)(`div`,{className:`flex flex-col gap-4`,children:[(0,V.jsxs)(`p`,{className:`text-[11px] font-black uppercase tracking-widest text-muted-foreground/70`,children:[`Per make: pick models or Any model`,` `,(0,V.jsx)(`span`,{className:`text-error`,children:`*`})]}),e.selectedMakeIds.length>0&&(0,V.jsxs)(`div`,{className:`group relative`,children:[(0,V.jsx)(UA,{className:`pointer-events-none absolute left-3.5 top-1/2 -translate-y-1/2 text-muted-foreground transition-colors group-focus-within:text-primary`,size:18,strokeWidth:2.5}),(0,V.jsx)(`input`,{type:`search`,value:C,onChange:e=>w(e.target.value),placeholder:i(`searchWizard.validation.searchModels`),className:`w-full rounded-2xl border border-border bg-surface-elevated py-3.5 pl-11 pr-4 text-sm font-medium outline-none transition-all hover:border-border-strong focus:border-primary focus:ring-4 focus:ring-primary/5`})]}),e.selectedMakeIds.length>0&&(0,V.jsxs)(`div`,{className:`flex items-center justify-end gap-5 pt-1`,children:[(0,V.jsxs)(`button`,{type:`button`,onClick:ge,className:`group flex items-center gap-1.5 text-[10px] font-black uppercase tracking-wider text-muted-foreground transition-colors hover:text-primary`,children:[(0,V.jsx)(IA,{size:13,className:`transition-transform group-hover:rotate-90`}),i(`searchWizard.vehicle.selectAll`)]}),(0,V.jsxs)(`button`,{type:`button`,onClick:_e,className:`group flex items-center gap-1.5 text-[10px] font-black uppercase tracking-wider text-muted-foreground transition-colors hover:text-error`,children:[(0,V.jsx)(oj,{size:13,className:`transition-transform group-hover:scale-110`}),i(`searchWizard.vehicle.clearAll`)]})]})]}),e.selectedMakeIds.length===0?(0,V.jsx)(`p`,{className:`text-sm leading-relaxed text-muted-foreground`,children:`Select one or more makes first (use the Make field), then return here to choose models.`}):D?(0,V.jsxs)(`div`,{className:`flex flex-col items-center justify-center gap-2 py-14 text-sm font-medium text-muted-foreground`,children:[(0,V.jsx)(_A,{className:`h-8 w-8 animate-spin text-primary`}),`Loading modelsâ¦`]}):k?(0,V.jsxs)(`div`,{className:`flex flex-col items-center gap-2 px-4 py-8 text-center`,children:[(0,V.jsx)(`p`,{className:`text-sm font-bold text-error`,children:k}),(0,V.jsx)(`button`,{type:`button`,onClick:()=>void re(),className:`text-xs font-black uppercase tracking-widest text-primary hover:underline`,children:`Retry`})]}):ce.length===0?(0,V.jsxs)(`div`,{className:`flex flex-col items-center gap-2 px-4 py-12 text-center`,children:[(0,V.jsx)(UA,{size:24,className:`text-muted-foreground/30`}),(0,V.jsxs)(`p`,{className:`text-sm font-medium text-muted-foreground`,children:[`No selected makes or models match "`,C,`".`]})]}):(0,V.jsx)(`div`,{className:`flex flex-col`,children:ce.map(t=>(0,V.jsx)(Mse,{makeId:t.makeId,makeName:t.makeName,list:t.filteredModels,anyModel:!!e.modelAnyByMakeId[t.makeId],expanded:t.forceExpand||F.has(t.makeId),onToggleExpand:I,onToggleModelAny:ye,onToggleModel:be,selectedModelById:e.selectedModelById},t.makeId))})]})}),(0,V.jsx)(`footer`,{className:`shrink-0 border-t border-border/50 bg-surface p-4`,children:(0,V.jsx)(`button`,{type:`button`,onClick:Se,className:`flex h-12 w-full items-center justify-center rounded-xl bg-primary text-sm font-black text-primary-foreground shadow-lg shadow-primary/20 transition-transform hover:scale-[1.01] active:scale-[0.99]`,children:`Done`})})]},N)]}):null}),document.body);return(0,V.jsxs)(`div`,{className:`space-y-8 sm:space-y-9`,children:[(0,V.jsxs)(`div`,{className:`grid grid-cols-1 gap-4 sm:grid-cols-2 sm:gap-6`,children:[(0,V.jsxs)(`div`,{className:`space-y-2`,children:[(0,V.jsxs)(`span`,{className:`ml-1 text-[11px] font-black uppercase tracking-widest text-muted-foreground
36/60`,children:[`Make `,(0,V.jsx)(`span`,{className:`text-error`,children:`*`})]}),(0,V.jsxs)(`button`,{type:`button`,onClick:()=>xe(`makes`),className:we,children:[(0,V.jsx)(`span`,{className:`min-w-0 flex-1 truncate ${le.startsWith(`Select`)?`text-muted-foreground`:`text-foreground`}`,children:le}),(0,V.jsx)(Rk,{className:`h-5 w-5 shrink-0 text-muted-foreground`,strokeWidth:2,"aria-hidden":!0})]}),de?.makes?(0,V.jsxs)(`p`,{className:`ml-1 flex items-center gap-1 text-[11px] font-bold text-error`,children:[(0,V.jsx)(Bk,{size:12,"aria-hidden":!0}),de.makes]}):null]}),(0,V.jsxs)(`div`,{className:`space-y-2`,children:[(0,V.jsxs)(`span`,{className:`ml-1 text-[11px] font-black uppercase tracking-widest text-muted-foreground/60`,children:[`Model `,(0,V.jsx)(`span`,{className:`text-error`,children:`*`})]}),(0,V.jsxs)(`button`,{type:`button`,disabled:e.selectedMakeIds.length===0,onClick:()=>xe(`models`),className:Te,children:[(0,V.jsx)(`span`,{className:`min-w-0 flex-1 truncate ${e.selectedMakeIds.length===0||ue===`Select model`||ue===`Select makes first`?`text-muted-foreground`:`text-foreground`}`,children:ue}),(0,V.jsx)(Rk,{className:`h-5 w-5 shrink-0 text-muted-foreground`,strokeWidth:2,"aria-hidden":!0})]}),de?.models?(0,V.jsxs)(`p`,{className:`ml-1 flex items-center gap-1 text-[11px] font-bold text-error`,children:[(0,V.jsx)(Bk,{size:12,"aria-hidden":!0}),de.models]}):null]})]}),(0,V.jsx)(`div`,{className:`space-y-1`,children:(0,V.jsx)(sN,{label:i(`searchWizard.fields.marketplace`),value:e.provider,items:Ose,onCh
36ange:e=>ve(e),error:!!de?.provider,errorMessage:de?.provider??null})}),Ee]})}function FP(){return new Date().getFullYear()}var IP=1e6;function LP(e){let t=e.trim();if(!t)return null;let n=Number(t);return Number.isFinite(n)?n:null}function RP(e){let t=e.trim();if(!t||!/^\d{4}$/.test(t))return null;let n=Number(t);if(!Number.isInteger(n))return null;let r=FP();return n<1900||n>r?null:n}function zP(e){let t=e.replace(/,/g,``).trim();if(!t)return null;let n=Number(t);return!Number.isFinite(n)||!Number.isInteger(n)?null:n}function BP(e){let t=LP(e.priceMinStr),n=LP(e.priceMaxStr),r=RP(e.yearMinStr),i=RP(e.yearMaxStr),a=zP(e.mileageMinStr),o=zP(e.mileageMaxStr),s=e.transmissionType.trim(),c=e.fuelType.trim(),l=e.defaultMessage.trim(),u=e.vehicleSnap.anyMake,d=u?[]:jP(e.vehicleSnap).map(e=>({make_id:e.makeId,model_ids:e.modelIds})),f={name:e.name.trim(),search_type:`vehicle`,provider:e.provider,city_id:e.cityId,category_id:e.categoryId,subcategory_id:e.subcategoryId,notification_interval_minutes:e.notificationIntervalMinutes,make_model_any:u,make_model_pairs:d,include_listings_without_price:e.includeListingsWithoutPrice,send_default_message:e.sendDefaultMessage,hubs:e.selectedHubIds.map(t=>({city_id:t,notification_interval_minutes:e.hubIntervals[t]}))};return e.searchRadiusKm!=null&&(f.search_radius_km=e.searchRadiusKm),t!=null&&(f.price_min=t),n!=null&&(f.price_max=n),r!=null&&(f.year_min=r),i!=null&&(f.year_max=i),a!=null&&(f.mileage_min=a),o!=null&&(f.mileage_max=o),s&&(f.transmission_type=s),c&&(f.fuel_type=c),f.default_message=e.sendDefaultMessage&&l?l:null,f}function Pse(e){let t={...BP(e)};return delete t.search_type,{...t,is_active:e.is_active}}function Fse(e){return e===`facebook`||e===`kijiji`||e===`autotrader`}function Ise(e){if(e.make_model_any)return{...AP(),anyMake:!0,provider:e.provider};let t=Array.isArray(e.make_model_configs)?e.make_model_configs:[],n=new Map;for(let e of t){if(!e||e.make_id==null)continue;let t=String(e.make_id);n.has(t)||n.set(t,[]);let r=e.model_id==null?null:String(e.model_id);n.get(t).push(r)}let r=[...n.keys()].sort((e,t)=>e.localeCompare(t,void 0,{sensitivity:`base`})),i={},a={};for(let e of r){let t=n.get(e),r=[...new Set(t.filter(e=>e!=null))];if(t.some(e=>e===null)&&r.length===0)i[e]=!0;else for(let t of r)a[t]={modelId:t,makeId:e}}return{provider:e.provider,anyMake:!1,selectedMakeIds:r,modelAnyByMakeId:i,selectedModelById:a}}function VP(e){if(e==null||e===``)return``;if(typeof e==`number`&&Number.isFinite(e))return String(Math.trunc(e));if(typeof e==`string`&&e.trim()){let t=Number(e);return Number.isFinite(t)?String(Math.trunc(t)):``}return``}function HP(e){if(e==null||e===``)return``;if(typeof e==`number`&&Number.isFinite(e))return String(e);if(typeof e==`string`&&e.trim()){let t=Number(e);return Number.isFinite(t)?String(t):``}return``}function UP(e){if(String(e.search_type??``).toLowerCase()!==`vehicle`)return null;let t=String(e.provider??``).toLowerCase();if(!Fse(t))return null;let n=Ise({make_model_any:!!e.make_model_any,make_model_configs:e.make_model_configs,provider:t}),r=[],i={},a=e.child_hubs;if(Array.isArray(a))for(let e of a){if(!e||typeof e!=`object`)continue;let t=e,n=t.city_id,a=t.notification_interval_minutes,o=typeof a==`number`&&Number.isFinite(a)?a:typeof a==`string`&&a.trim()?Number(a):NaN;if(n==null||!Number.isFinite(o))continue;let s=String(n);r.push(s),i[s]=Math.trunc(o)}let o=e.notification_interval_minutes;if(typeof o!=`number`||!Number.isFinite(o))return null;let s=String(e.city_id??``);if(!s)return null;let c=String(e.category_id??``),l=String(e.subcategory_id??``);if(!c||!l)return null;let u=e.search_radius_km,d=u!=null&&u!==``&&Number.isFinite(Number(u))?Number(u):null;return{categoryId:c,subcategoryId:l,searchName:String(e.name??``),vehicleSnap:n,notificationIntervalMinutes:o,includeNoPrice:!!e.include_listings_without_price,priceMinStr:HP(e.price_min),priceMaxStr:HP(e.price_max),vehicleYearMinStr:VP(e.year_min),vehicleYearMaxStr:VP(e.year_max),vehicleMileageMinStr:VP(e.mileage_min),vehicleMileageMaxStr:VP(e.mileage_max),vehicleTransmission:e.transmission_type==null?``:String(e.transmission_type),vehicleFuelType:e.fuel_type==null?``:String(e.fuel_type),sendDefaultMessage:!!e.send_default_message,defaultMessage:e.default_message==null?``:String(e.default_message),searchRadiusKm:d,cityId:s,provider:t,hubIds:r,hubIntervals:i,isActive:!!e.is_active}}function Lse(e,t){let n={};if(t.provider||(n.provider=e(`searchWizard.validation.selectMarketplace`)),t.anyMake)return{ok:!n.provider,errors:n};if(t.selectedMakeIds.length===0)return n.makes=e(`searchWizard.validation.selectMake`),{ok:!1,errors:n};for(let r of t.selectedMakeIds)if(!t.modelAnyByMakeId[r]&&Object.values(t.selectedModelById).filter(e=>e.makeId===r).length===0)return n.models=e(`searchWizard.validation.selectModelPerMake`),{ok:!1,errors:n};return{ok:Object.keys(n).length===0,errors:n}}var WP=/^\d{4}$/;function GP(e){let t=e.replace(/,/g,``).trim();if(!t)return`invalid`;let n=Number(t);return!Number.isFinite(n)||!Number.isInteger(n)||n<0?`invalid`:n}function Rse(e,t,n){let r=t.trim(),i=n.trim();if(!r&&!i)return{};let a,o,s=FP();
36if(r){if(!WP.test(r))return{min:e(`feedFilters.yearMustBe4Digits`)};let t=Number(r);if(t<1900||t>s)return{min:e(`searchWizard.validation.validNumber`)};a=t}if(i){if(!WP.test(i))return{max:e(`feedFilters.yearMustBe4Digits`)};let t=Number(i);if(t<1900||t>s)return{max:e(`searchWizard.validation.validNumber`)};o=t}return a!=null&&o!=null&&a>o?{range:e(`feedFilters.minExceedsMaxYear`)}:{}}function zse(e,t,n){let r=t.trim(),i=n.trim();if(!r&&!i)return{};let a,o;if(r){let n=GP(t);if(n===`invalid`)return{min:e(`searchWizard.validation.validNumber`)};if(n>1e6)return{min:e(`feedFilters.maxMileageIs`,{max:IP.toLocaleString()})};a=n}if(i){let t=GP(n);if(t===`invalid`)return{max:e(`searchWizard.validation.validNumber`)};if(t>1e6)return{max:e(`feedFilters.maxMileageIs`,{max:IP.toLocaleString()})};o=t}return a!=null&&o!=null&&a>o?{range:e(`feedFilters.minExceedsMaxMileage`)}:{}}function KP(e){return[...e].sort((e,t)=>e.label.localeCompare(t.label,void 0,{sensitivity:`base`}))}var Bse={automatic:`searchWizard.validation.automatic`,manual:`searchWizard.validation.manual`,semi_automatic:`searchWizard.validation.semiAutomatic`},Vse={diesel:`searchWizard.validation.diesel`,electric:`searchWizard.validation.electric`,flex_fuel:`searchWizard.validation.flexFuel`,gasoline:`searchWizard.validation.gasoline`,hybrid:`searchWizard.validation.hybrid`,hydrogen:`searchWizard.validation.hydrogen`,plugin_hybrid:`searchWizard.validation.plugInHybrid`},Hse=[`automatic`,`cvt`,`manual`,`semi_automatic`],Use=[`cng`,`diesel`,`electric`,`flex_fuel`,`gasoline`,`hybrid`,`hydrogen`,`lpg`,`plugin_hybrid`],Wse={cvt:`CVT`},Gse={cng:`CNG`,lpg:`LPG`};function qP(e,t,n,r){let i=n[t];return i?e(i):r[t]??t}function Kse(e){let t=Hse.map(t=>({label:qP(e,t,Bse,Wse),value:t}));return[{label:e(`searchWizard.validation.anyModel`).replace(/ model$/i,``),value:``},...KP(t)]}function qse(e){let t=Use.map(t=>({label:qP(e,t,Vse,Gse),value:t}));return[{label:e(`searchWizard.validation.anyModel`).replace(/ model$/i,``),value:``},...KP(t)]}function JP(e){return e.replace(/\D/g,``).slice(0,4)}function YP(e){return e.replace(/\D/g,``)}function Jse({yearMin:e,yearMax:t,onYearMinChange:n,onYearMaxChange:r,onYearMinBlur:i,onYearMaxBlur:a,yearErrors:o,touchedYearMin:s,touchedYearMax:c,yearFieldsTouched:l,yearRangeInvalid:u,mileageMin:d,mileageMax:f,onMileageMinChange:p,onMileageMaxChange:m,onMileageMinBlur:h,onMileageMaxBlur:g,mileageErrors:_,touchedMileageMin:v,touchedMileageMax:y,mileageFieldsTouched:x,mileageRangeInvalid:S,transmissionValue:C,fuelValue:w,onTransmissionChange:T,onFuelChange:E}){let D=my(),O=(0,b.useMemo)(()=>Kse(D),[D]),k=(0,b.useMemo)(()=>qse(D),[D]),A=D(`searchWizard.validation.anyModel`).replace(/ model$/i,``);return(0,V.jsxs)(`div`,{className:`space-y-6 sm:space-y-8`,children:[(0,V.jsxs)(`div`,{className:`space-y-6 sm:space-y-8`,children:[(0,V.jsx)(`div`,{className:`mb-2`,children:(0,V.jsxs)(`label`,{className:`text-[11px] font-black uppercase tracking-widest text-muted-foreground/60`,children:[D(`feedFilters.yearRange`),` `,D(`searchWizard.optional`)]})}),(0,V.jsxs)(`div`,{className:`mb-2 grid grid-cols-1 gap-6 sm:gap-8 lg:grid-cols-2`,children:[(0,V.jsx)(zM,{value:e,onChange:e=>n(JP(e)),onBlur:i,placeholder:D(`searchWizard.validation.minYear`),corners:`subtle`,suppressFocusRing:!0,inputMode:`numeric`,pattern:`[0-9]*`,maxLength:4,invalid:u,error:s&&o.min?o.min:null}),(0,V.jsx)(zM,{value:t,onChange:e=>r(JP(e)),onBlur:a,placeholder:D(`searchWizard.validation.maxYear`),corners:`subtle`,suppressFocusRing:!0,inputMode:`numeric`,pattern:`[0-9]*`,maxLength:4,invalid:u,error:c&&o.max?o.max:null})]}),l&&o.range?(0,V.jsxs)(`p`,{className:`flex animate-in items-center gap-1.5 text-[11px] font-bold text-error fade-in slide-in-from-top-1`,children:[(0,V.jsx)(Bk,{size:12}),o.range]}):null]}),(0,V.jsxs)(`div`,{className:`space-y-6 sm:space-y-8`,children:[(0,V.jsx)(`div`,{className:`mb-2`,children:(0,V.jsxs)(`label`,{className:`text-[11px] font-black uppercase tracking-widest text-muted-foreground/60`,children:[D(`feedFilters.mileageRange`),` `,D(`searchWizard.optional`)]})}),(0,V.jsxs)(`div`,{className:`mb-2 grid grid-cols-1 gap-6 sm:gap-8 lg:grid-cols-2`,children:[(0,V.jsx)(zM,{value:d,onChange:e=>p(YP(e)),onBlur:h,placeholder:D(`searchWizard.validation.minMileage`),corners:`subtle`,suppressFocusRing:!0,inputMode:`numeric`,pattern:`[0-9]*`,invalid:S,error:v&&_.min?_.min:null}),(0,V.jsx)(zM,{value:f,onChange:e=>m(YP(e)),onBlur:g,placeholder:D(`searchWizard.validation.maxMileage`),corners:`subtle`,suppressFocusRing:!0,inputMode:`numeric`,pattern:`[0-9]*`,invalid:S,error:y&&_.max?_.max:null})]}),x&&_.range?(0,V.jsxs)(`p`,{className:`flex animate-in items-center gap-1.5 text-[11px] font-bold text-error fade-in slide-in-from-top-1`,children:[(0,V.jsx)(Bk,{size:12}),_.range]}):null]}),(0,V.jsx)(`div`,{className:`space-y-6 sm:space-y-8`,children:(0,V.jsxs)(`div`,{className:`mb-2 grid grid-cols-1 gap-6 sm:gap-8 md:grid-cols-2`,children:[(0,V.jsx)(BN,{label:D(`searchWizard.validation.transmission`),isolateMenuScroll:!0,value:C,onChange:T,options:O,placeholder:A}),(0,V.jsx)(BN,{label:D(`searchWizard.validation.fuelType`),isolateMenuScroll:!0,value:w,onChange:E,options:k,placeholder:A})]})})]})}function Yse(e){if(e.step1Kind===`vehicle_passenger`)return`vehicle`;let t=hP(e.categoryFacebookCode);if(t){if(t===`vehicle`||t===`vehicles`||t===`automotive`||t===`auto`||t.includes(`vehicle`))return`vehicle`;if(t.includes(`property`)||t.includes(`housing`)||t===`home`||t===`realestate`||t===`real_estate`)return`home`;if(t.includes(`job`)||t===`employment`||t===`work`)return`briefcase`;if(t.includes(`commerce`)||t.includes(`buy`)||t===`marketplace`||t.includes(`shop`))return`shopping`}let n=gP(e.categoryLabel)??``;return n.includes(`vehicle`)?`vehicle`:n.includes(`property`)||n.includes(`estate`)||n.includes(`housing`)||n.includes(`rental`)?`home`:n.includes(`job`)||n.includes(`career`)?`briefcase`:`grid`}function XP({title:e,description:t}){return(0,V.jsxs)(`div`,{className:`w-full`,children:[(0,V.jsx)(`h2`,{className:`text-2xl font-black tracking-tight text-foreground sm:text-4xl md:text-5xl`,children:e}),(0,V.jsx)(`p`,{className:`mt-3 text-sm font-medium leading-relaxed text-muted-foreground sm:mt-4 sm:text-base md:text-lg`,children:t})]})}function ZP({categoryId:e,subcategoryId:t,onShellCopy:n,editSearchId:r,editVehiclePayload:i,duplicateVehiclePayload:a}
36){let o=!!(a&&!r),s=i??a??null,c=or(),l=my(),{showToast:u}=Gx(),{status:d,subscription:f,refreshSubscription:p}=Sy(),{canUseExtensionFirstMessage:m,status:h}=bj(),[g,_]=(0,b.useState)(!1),[v,y]=(0,b.useState)(1),[S,C]=(0,b.useState)(``),[w,T]=(0,b.useState)(!1),[E,D]=(0,b.useState)(!1),[O,k]=(0,b.useState)(!1),[A,j]=(0,b.useState)(``),[M,N]=(0,b.useState)(!1),[P,F]=(0,b.useState)(!0),[ee,I]=(0,b.useState)(``),[te,ne]=(0,b.useState)(``),[re,ie]=(0,b.useState)(null),[ae,oe]=(0,b.useState)(null),[se,ce]=(0,b.useState)({}),[le,ue]=(0,b.useState)(null),[de,fe]=(0,b.useState)(!1),[L,pe]=(0,b.useState)(AP),[me,he]=(0,b.useState)(null),[ge,_e]=(0,b.useState)(null),[ve,ye]=(0,b.useState)(null),[be,xe]=(0,b.useState)({}),[Se,Ce]=(0,b.useState)(``),[we,Te]=(0,b.useState)(``),[Ee,De]=(0,b.useState)(!1),[Oe,ke]=(0,b.useState)({}),[Ae,je]=(0,b.useState)({}),[Me,Ne]=(0,b.useState)(``),[Pe,Fe]=(0,b.useState)(``),[Ie,Le]=(0,b.useState)(``),[Re,ze]=(0,b.useState)(``),[Be,Ve]=(0,b.useState)(``),[He,Ue]=(0,b.useState)(``),[We,Ge]=(0,b.useState)(()=>!r&&!a),[Ke,qe]=(0,b.useState)([]),[Je,Ye]=(0,b.useState)(!0),[Xe,Ze]=(0,b.useState)(null),[Qe,$e]=(0,b.useState)(null),et=(0,b.useRef)(0);(0,b.useEffect)(()=>{queueMicrotask(()=>{r||a?Ge(!1):(Ge(!0),Ze(null))})},[r,a]),(0,b.useEffect)(()=>{queueMicrotask(()=>_(!0))},[]);let tt=(0,b.useCallback)(async()=>{F(!0);try{let[n,r]=await Promise.all([Lo.get(`/api/catalog/categories`),Lo.get(`/api/catalog/categories/${e}/subcategories`)]),i=(n.data.categories??[]).find(t=>t.id===e);I(i?.name?.trim()||l(`searchWizard.fields.category`)),ie(i?.facebook_code??null);let a=r.data.subcategories??[],o=a.find(e=>e.id===t);ne(o?.name?.trim()||l(`searchWizard.fields.subcategory`)),oe(o?.facebook_code??null),!o&&a.length===0&&ne(l(`searchWizard.fields.subcategory`))}catch{I(l(`searchWizard.fields.category`)),ne(l(`searchWizard.fields.subcategory`)),ie(null),oe(null)}finally{F(!1)}},[e,t]);(0,b.useEffect)(()=>{queueMicrotask(()=>{tt()})},[tt]),(0,b.useEffect)(()=>{(async()=>{try{_e((await Lo.get(`/api/dashboard/overview`)).data)}catch{_e(null)}})()},[]);let{fieldSet:nt,fieldSetId:rt}=(0,b.useMemo)(()=>CP({categoryFacebookCode:re,subcategoryFacebookCode:ae,subcategoryDisplayName:te}),[re,ae,te]),it=`${rt}:${t}`,at=(0,b.useMemo)(()=>Uj(f?.plan?.tiers,ge?.subscription?.tiers),[f?.plan?.tiers,ge?.subscription?.tiers]),ot=(0,b.useMemo)(()=>yN(f?.plan?.tiers,at),[f?.plan?.tiers,at]),st=(0,b.useMemo)(()=>xN(ot,Xe),[ot,Xe]),ct=(0,b.useMemo)(()=>Math.max(0,Math.min(999,bN(st)-1)),[st]),lt=r?`vehicle-edit-${r}`:a?`vehicle-duplicate-${e}-${t}`:it,ut=rP({provider:L.provider,resetKey:lt}),{setCountryId:dt,setCityId:ft,setRadiusKm:pt,setSelectedHubIds:mt,cities:ht}=ut,gt=rP({provider:`facebook`,resetKey:`cat-prefs-${e}-${t}-${rt}`}),_t=nt.step1Kind===`vehicle_passenger`,vt=_t?ut:gt;(0,b.useEffect)(()=>{if(r||!_t)return;let e=!1;return(async()=>{try{let t=await mN();if(e)return;qe(t.map(e=>bse(e)).filter(e=>e!=null))}catch{e||qe([])}})(),()=>{e=!0}},[r,_t]),(0,b.useEffect)(()=>{r||a||queueMicrotask(()=>{ye(null),xe({}),Ce(``),Te(``),De(!1),ke({}),je({}),Ne(``),Fe(``),Le(``),ze(``),Ve(``),Ue(``)})},[e,t,rt,r,a]),(0,b.useEffect)(()=>{queueMicrotask(()=>{xe(e=>{let t={...e};for(let e of Object.keys(t))vt.selectedHubIds.includes(e)||delete t[e];return t})})},[vt.selectedHubIds]),(0,b.useEffect)(()=>{let e=!1;return queueMicrotask(()=>{if(e)return;if(!r&&!a){Ge(!0);return}if(!s){Ge(!0);return}if(d===`loading`||P)return;if(nt.step1Kind!==`vehicle_passenger`){Ge(!0);return}let t=++et.current,n=s;(async()=>{try{if(o||C(n.searchName),pe(n.vehicleSnap),ye(n.notificationIntervalMinutes),De(n.includeNoPrice),Ce(n.priceMinStr),Te(n.priceMaxStr),Ne(n.vehicleYearMinStr),Fe(n.vehicleYearMaxStr),Le(n.vehicleMileageMinStr),ze(n.vehicleMileageMaxStr),Ve(n.vehicleTransmission),Ue(n.vehicleFuelType),k(n.sendDefaultMessage),j(n.defaultMessage),o)xe({}),mt([]);else{Ye(n.isActive),Ze({wasActive:n.isActive,mainInterval:n.notificationIntervalMinutes,hubIntervals:{...n.hubIntervals}}),pt(n.searchRadiusKm),xe(n.hubIntervals),mt(n.hubIds);let r=await FN(n.provider,n.cityId);if(e||t!==et.current)return;if(!r){u({type:`error`,message:l(`searchWizard.actions.locationResolveError`)}),c(`/dashboard/searches`);return}dt(r),$e(n.cityId),xe(n.hubIntervals),mt(n.hubIds)}}catch{!e&&t===et.current&&(u({type:`error`,message:l(`searchWizard.actions.locationResolveError`)}),c(`/dashboard/searches`))}finally{!e&&t===et.current&&Ge(!0)}})()}),()=>{e=!0}},[r,a,s,o,P,d,nt.step1Kind,u,c,pt,mt,dt]),(0,b.useEffect)(()=>{Qe&&ht.some(e=>e.id===Qe)&&queueMicrotask(()=>{ft(Qe),$e(null)})},[Qe,ht,ft]),(0,b.useEffect)(()=>
36{if(P||!n)return;let e=ee.trim();n({title:r?l(`searchWizard.shell.editTitle`):o?l(`searchWizard.shell.duplicateTitle`):e?l(`searchWizard.categorySearchTitle`,{category:e}):l(`searchWizard.shell.categoryTitle`),description:nt.step1Kind===`vehicle_passenger`?l(o?`searchWizard.shell.duplicateDescription`:`searchWizard.shell.anythingCreateDescription`):l(`searchWizard.shell.categoryDescription`),sidebarIcon:Yse({step1Kind:nt.step1Kind,categoryFacebookCode:re,categoryLabel:ee})})},[P,re,ee,r,o,nt.step1Kind,n,l]);let yt=Lj(h,d),bt=(0,b.useMemo)(()=>yt&&nt.step1Kind===`vehicle_passenger`&&L.provider===`facebook`&&m,[yt,m,nt.step1Kind,L.provider]),xt=bt?4:3;me!==it&&(he(it),r||(pe(AP()),k(!1),j(``),N(!1),T(!1),D(!1))),le!==rt&&(ue(rt),ce(TP(nt)));let St=(0,b.useMemo)(()=>DP(l,nt,1,se),[nt,se]),Ct=(0,b.useMemo)(()=>DP(l,nt,2,se),[nt,se]),wt=(0,b.useMemo)(()=>DP(l,nt,3,se),[nt,se]),Tt=(0,b.useMemo)(()=>EP(nt,1),[nt]),Et=(0,b.useMemo)(()=>EP(nt,2),[nt]),Dt=(0,b.useMemo)(()=>EP(nt,3),[nt]),Ot=(0,b.useMemo)(()=>{let e=f?.plan?.tiers;return e?.length?[...e].sort((e,t)=>e.tier_order-t.tier_order):[]},[f?.plan?.tiers]),kt=vt.cities.find(e=>e.id===vt.cityId)?.name??l(`searchWizard.fields.primaryLocation`),At=(0,b.useMemo)(()=>zN({hubsSortedByDistance:vt.hubsSortedByDistance,selectedHubIds:vt.selectedHubIds,mainCityLabel:kt}),[vt.hubsSortedByDistance,vt.selectedHubIds,kt]),{mainScanIntervalDropdownOptions:jt,hubScanIntervalDropdownOptions:Mt}=iP({intervalOptions:Ot,intervalAvailability:st,notificationInterval:ve,selectedHubIds:vt.selectedHubIds,hubIntervals:be}),Nt=(0,b.useMemo)(()=>EN(l,Se,we),[Se,we]),Pt=!!Ae.priceMin||!!Ae.priceMax,Ft=!!Pt&&!!Nt.range,It=kN(l,{availability:st,mainInterval:ve,hubIds:vt.selectedHubIds,hubIntervals:be,hubUnsetInterval:null}),Lt=(0,b.useMemo)(()=>nt.step1Kind===`vehicle_passenger`?Rse(l,Me,Pe):{},[nt.step1Kind,Me,Pe]),Rt=(0,b.useMemo)(()=>nt.step1Kind===`vehicle_passenger`?zse(l,Ie,Re):{},[nt.step1Kind,Ie,Re]),zt=!!Ae.yearMin||!!Ae.yearMax,Bt=!!zt&&!!Lt.range,Vt=!!Ae.mileageMin||!!Ae.mileageMax,Ht=!!Vt&&!!Rt.range,Ut=nt.step1Kind!==`vehicle_passenger`||!Lt.min&&!Lt.max&&!Lt.range&&!Rt.min&&!Rt.max&&!Rt.range,Wt=vt.selectedHubIds.length===0||vt.selectedHubIds.every(e=>be[e]!=null),Gt=ve!=null&&Wt&&!Nt.range&&!It&&vt.isStepValid&&Ut,Kt=ve!=null||vt.selectedHubIds.some(e=>be[e]!=null),qt=(0,b.useCallback)(()=>{ye(null),xe({}),ke({}),je(e=>({...e,interval:!0}))},[]),Jt=(0,b.useMemo)(()=>Lse(l,L),[L]),Yt=nt.step1Kind!==`vehicle_passenger`||Jt.ok,Xt=(0,b.useMemo)(()=>!wN(l,S),[S]),Zt=(0,b.useMemo)(()=>!S.trim()&&!w?null:wN(l,S),[S,w]),Qt=!DN(l,O,A);(0,b.useEffect)(()=>{v<=xt||queueMicrotask(()=>{y(xt)})},[v,xt]),(0,b.useEffect)(()=>{let e=()=>{let e={top:0,left:0,behavior:`smooth`};document.getElementById(`category-search-wizard-main`)?.scrollTo(e),document.getElementById(`wizard-steps-target`)?.scrollTo(e),document.getElementById(`wizard-steps-mobile-target`)?.scrollTo(e)};e();let t=window.setTimeout(e,450);return()=>window.clearTimeout(t)},[v]);let $t=typeof document<`u`?document.getElementById(`wizard-steps-target`):null,en=typeof document<`u`?document.getElementById(`wizard-steps-mobile-target`):null,tn=(0,b.useMemo)(()=>[{id:1,title:l(`searchWizard.steps.details`),desc:l(`searchWizard.steps.detailsDescription`),icon:(0,V.jsx)(Qk,{size:18})},{id:2,title:l(`searchWizard.steps.location`),desc:l(`searchWizard.steps.locationDescription`),icon:(0,V.jsx)(xA,{size:18})},{id:3,title:l(`searchWizard.steps.preferences`),desc:l(`searchWizard.steps.preferencesDescription`),icon:(0,V.jsx)(GA,{size:18})},...bt?[{id:4,title:l(`searchWizard.steps.defaultMessage`),desc:l(`searchWizard.steps.defaultMessageDescription`),icon:(0,V.jsx)(wA,{size:18})}]:[]],[bt,l]),nn=(0,V.jsx)(`div`,{className:`flex flex-col gap-1 lg:gap-2`,children:tn.map((e,t)=>{let n=v>e.id,r=v===e.id,i=t===tn.length-1;return(0,V.jsxs)(`div`,{className:`relative flex items-start gap-4`,children:[(0,V.jsxs)(`div`,{className:`flex flex-col items-center`,children:[(0,V.jsx)(`button`,{type:`button`,onClick:()=>{(e.id<v||n)&&y(e.id)},disabled:e.id>v&&!n,className:`flex h-10 w-10 shrink-0 items-center justify-center rounded-xl border-2 transition-all duration-300 ${r?`border-primary bg-primary text-primary-foreground shadow-lg shadow-primary/20`:n?`border-primary/40 bg-primary/10 text-primary`:`border-border/60 bg-surface-elevated text-muted-foreground
36/40`}`,children:n?(0,V.jsx)(Fk,{size:16,strokeWidth:4}):e.icon}),!i&&(0,V.jsx)(`div`,{className:`h-10 w-0.5 shrink-0 transition-colors duration-500 lg:h-12 ${n?`bg-primary`:r?`bg-primary/40 dark:bg-primary/45`:`bg-border`}`})]}),(0,V.jsxs)(`div`,{className:`flex flex-col pt-1`,children:[(0,V.jsx)(`span`,{className:`text-[10px] font-black uppercase tracking-[0.2em] transition-colors ${r?`text-primary`:`text-muted-foreground/40`}`,children:l(`searchWizard.stepLabel`,{step:`0${e.id}`})}),(0,V.jsx)(`span`,{className:`text-xs font-black transition-colors lg:text-sm ${r?`text-foreground`:`text-muted-foreground/60`}`,children:e.title})]})]},e.id)})}),rn=(0,V.jsx)(`div`,{className:`flex w-full flex-row flex-nowrap items-start justify-center gap-0 sm:gap-1 md:gap-2`,children:tn.map((e,t)=>{let n=v>e.id,r=v===e.id,i=t===tn.length-1,a=n?`bg-primary`:r?`bg-primary/40 dark:bg-primary/45`:`bg-border`;return(0,V.jsxs)(b.Fragment,{children:[(0,V.jsxs)(`div`,{className:`flex min-w-0 flex-1 basis-0 flex-col items-center gap-1 sm:gap-2`,children:[(0,V.jsx)(`button`,{type:`button`,onClick:()=>{(e.id<v||n)&&y(e.id)},disabled:e.id>v&&!n,className:`flex h-8 w-8 shrink-0 items-center justify-center rounded-lg border-2 transition-all duration-300 sm:h-10 sm:w-10 sm:rounded-xl ${r?`border-primary bg-primary text-primary-foreground shadow-lg shadow-primary/20`:n?`border-primary/40 bg-primary/10 text-primary`:`border-border/60 bg-surface-elevated text-muted-foreground/40`}`,children:(0,V.jsx)(`span`,{className:`flex scale-[0.82] items-center justify-center sm:scale-100`,children:n?(0,V.jsx)(Fk,{size:16,strokeWidth:4}):e.icon})}),(0,V.jsx)(`span`,{className:`line-clamp-2 w-full text-center text-[10px] font-black leading-tight sm:text-xs ${r?`text-foreground`:`text-muted-foreground/60`}`,children:e.title})]}),i?null:(0,V.jsx)(`div`,{className:`flex h-8 w-3 shrink-0 items-center justify-center self-start sm:h-10 sm:w-5 md:w-6`,"aria-hidden":!0,children:(0,V.jsx)(`div`,{className:`h-0.5 w-full rounded-full transition-colors duration-500 ${a}`})})]},e.id)})}),an=nt.step1Kind===`vehicle_passenger`?ut.isStepValid:Et.length>0?!0:gt.isStepValid,on=(0,b.useMemo)(()=>{if(r||!_t)return null;let n=L.provider,i=ut.cityId;return!n||!i?null:fN({provider:n,cityId:i,categoryId:e,subcategoryId:t,makeModelAny:L.anyMake,makeModelPairs:L.anyMake?[]:jP(L)},Ke)},[r,_t,L,ut.cityId,e,t,Ke]),sn=v===1?Xt&&Yt&&!OP(St):v===2?an&&!on&&(nt.step1Kind===`vehicle_passenger`||!OP(Ct)):v===3?Gt&&!OP(wt):v===4?Qt:!1,cn=(e,t)=>{ce(n=>wse(n,e,t))};return d===`loading`||P||r&&!We||a&&!We?(0,V.jsxs)(`div`,{className:`flex min-h-[40vh] flex-col items-center justify-center gap-4 py-16`,children:[(0,V.jsx)(_A,{size:32,className:`animate-spin text-primary`}),(0,V.jsx)(`p`,{className:`text-sm font-medium text-muted-foreground`,children:`Loadingâ¦`})]}):(0,V.jsxs)(V.Fragment,{children:[g&&$t&&(0,x.createPortal)(nn,$t),g&&en&&(0,x.createPortal)(rn,en),(0,V.jsx)(zD,{mode:`wait`,children:(0,V.jsxs)(ik.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},exit:{opacity:0,y:-10},transition:{duration:.4,ease:`easeOut`},className:`flex flex-col space-y-8 sm:space-y-10 md:space-y-12`,children:[v===1&&(0,V.jsxs)(`div`,{className:`space-y-8 sm:space-y-10`,children:[(0,V.jsx)(XP,{title:l(`searchWizard.steps.details`),description:nt.step1Kind===`vehicle_passenger`?l(`searchWizard.steps.detailsDescription`):l(`searchWizard.shell.categoryDescription`)}),(0,V.jsx)(`div`,{className:`space-y-6 sm:space-y-8`,children:(0,V.jsx)(`div`,{className:`grid grid-cols-1 gap-6 sm:gap-8 lg:grid-cols-2`,children:(0,V.jsx)(zM,{label:l(`searchWizard.fields.searchName`),required:!0,value:S,onChange:e=>{C(e),T(!0)},placeholder:l(`searchWizard.fields.categoryNamePlaceholder`),maxLength:30,showCount:!0,corners:`subtle`,suppressFocusRing:!0,onBlur:()=>T(!0),error:Zt})})}),nt.step1Kind===`vehicle_passenger`?(0,V.jsx)(Nse,{value:L,onSnapshotChange:pe,fieldErrors:Jt.errors,showAllFieldErrors:E},it):null,nt.step1Kind!==`vehicle_passenger`&&Tt.length>0?(0,V.jsx)(kP,{fields:Tt,values:se,errors:St,onChange:cn}):null]}),v===2&&(0,V.jsxs)(`div`,{className:`space-y-8 sm:space-y-10`,children:[(0,V.jsx)(XP,{title:l(`searchWizard.steps.location`),description:l(`searchWizard.steps.locationDescription`)}),nt.step1Kind===`vehicle_passenger`?(0,V.jsxs)(V.Fragment,{children:[(0,V.jsx)(VN,{loc:ut,maxSelectableHubs:ct,provider:L.provider}),on?(0,V.jsxs)(`div`,{className:`flex items-start gap-3 rounded-2xl border border-error/30 bg-error/5 px-4 py-3 text-sm text-error`,role:`alert`,children:[(0,V.jsx)(Bk,{size:18,className:`mt-0.5 shrink-0`}),(0,V.jsx)(`p`,{children:on})]}):null]}):(0,V.jsxs)(V.Fragment,{children:[(0,V.jsx)(kP,{fields:Et,values:se,errors:Ct,onChange:cn}),Et.length===0?(0,V.jsx)(VN,{loc:gt,maxSelectableHubs:ct,provider:`facebook`}):null]})]}),v===3&&(0,V.jsxs)(`div`,{className:`space-y-8 sm:space-y-10`,children:[(0,V.jsx)(XP,{title:l(`searchWizard.steps.preferences`),description:l(`searchWizard.steps.preferencesDescription`)}),!_t&&Et.length>0?(0,V.jsxs)(`div`,{className:`space-y-4`,children:[(0,V.jsx)(`p`,{className:`text-xs font-medium text-muted-foreground sm:text-sm`,children:l(`searchWizard.catalogPrefsHint`)}),(0,V.jsx)(VN,{loc:gt,maxSelectableHubs:ct,provider:`facebook`})]}):null,(0,V.jsx)(tP,{scanFrequencyRows:At,cityId:vt.cityId,notificationInterval:ve,onNotificationIntervalChange:ye,hubIntervals:be,onHubIntervalChange:(e,t)=>
36{xe(n=>({...n,[e]:t}))},mainScanIntervalDropdownOptions:jt,hubScanIntervalDropdownOptions:Mt,scanFrequencyTouched:Oe,onMarkIntervalTouched:()=>je(e=>({...e,interval:!0})),intervalQuotaError:It,intervalTouched:!!Ae.interval,scanFrequencyHasSelections:Kt,onClearAllScanFrequencies:qt,priceMin:Se,priceMax:we,onPriceMinChange:e=>{Ce(e),je(e=>({...e,priceMin:!0}))},onPriceMaxChange:e=>{Te(e),je(e=>({...e,priceMax:!0}))},onPriceMinBlur:()=>je(e=>({...e,priceMin:!0})),onPriceMaxBlur:()=>je(e=>({...e,priceMax:!0})),priceErrors:Nt,priceFieldsTouched:Pt,priceRangeInvalid:Ft,touchedPriceMin:!!Ae.priceMin,touchedPriceMax:!!Ae.priceMax,betweenPriceAndInclude:_t?(0,V.jsx)(Jse,{yearMin:Me,yearMax:Pe,onYearMinChange:e=>{Ne(e),je(e=>({...e,yearMin:!0}))},onYearMaxChange:e=>{Fe(e),je(e=>({...e,yearMax:!0}))},onYearMinBlur:()=>je(e=>({...e,yearMin:!0})),onYearMaxBlur:()=>je(e=>({...e,yearMax:!0})),yearErrors:Lt,touchedYearMin:!!Ae.yearMin,touchedYearMax:!!Ae.yearMax,yearFieldsTouched:zt,yearRangeInvalid:Bt,mileageMin:Ie,mileageMax:Re,onMileageMinChange:e=>{Le(e),je(e=>({...e,mileageMin:!0}))},onMileageMaxChange:e=>{ze(e),je(e=>({...e,mileageMax:!0}))},onMileageMinBlur:()=>je(e=>({...e,mileageMin:!0})),onMileageMaxBlur:()=>je(e=>({...e,mileageMax:!0})),mileageErrors:Rt,touchedMileageMin:!!Ae.mileageMin,touchedMileageMax:!!Ae.mileageMax,mileageFieldsTouched:Vt,mileageRangeInvalid:Ht,transmissionValue:Be,fuelValue:He,onTransmissionChange:Ve,onFuelChange:Ue}):void 0,includeNoPrice:Ee,onIncludeNoPriceChange:De,children:Dt.length>0?(0,V.jsxs)(`div`,{className:`space-y-6 border-t border-border/40 pt-8 sm:space-y-8 sm:pt-10`,children:[(0,V.jsx)(`p`,{className:`text-[11px] font-black uppercase tracking-widest text-muted-foreground/60`,children:`Catalog options`}),(0,V.jsx)(kP,{fields:Dt,values:se,errors:wt,onChange:cn})]}):null})]}),v===4&&bt?(0,V.jsx)($N,{sendDefaultMessage:O,onSendDefaultMessageChange:k,defaultMessage:A,onDefaultMessageChange:e=>{j(e),N(!0)},defaultMessageTouched:M,onDefaultMessageBlur:()=>N(!0)}):null,(0,V.jsxs)(`footer`,{className:`flex flex-col gap-4 pt-8 sm:flex-row sm:items-center sm:justify-between sm:gap-0 sm:pt-10 md:pt-12`,children:[v>1?(0,V.jsx)(`button`,{type:`button`,onClick:()=>y(v-1),className:`min-h-[44px] self-center text-xs font-black uppercase tracking-widest text-muted-foreground transition-all hover:text-foreground sm:min-h-0 sm:self-auto`,children:l(`searchWizard.back`)}):null,(0,V.jsx)(`button`,{type:`button`,onClick:()=>{if(!sn){v===1&&(T(!0),D(!0)),v===2&&nt.step1Kind===`vehicle_passenger`&&ut.touchAllFields(),v===2&&nt.step1Kind!==`vehicle_passenger`&&Et.length===0&>.touchAllFields(),v===3&&(ke(e=>{let t={...e,[eP]:!0};for(let e of vt.selectedHubIds)t[e]=!0;return t}),je(e=>({...e,interval:!0,priceMin:!0,priceMax:!0,yearMin:!0,yearMax:!0,mileageMin:!0,mileageMax:!0})),vt.isStepValid||vt.touchAllFields()),v===4&&N(!0);return}v<xt?y(v+1):(async()=>{fe(!0);try{if(nt.step1Kind!==`vehicle_passenger`){u({type:`info`,message:l(`searchWizard.actions.catalogSaveUnavailable`)});return}let n=L.provider;if(!n||ve==null){u({type:`error`,message:l(`searchWizard.actions.chooseMarketplaceAndFrequency`)});return}let i=bt&&O,a={name:S,vehicleSnap:L,categoryId:e,subcategoryId:t,cityId:vt.cityId,provider:n,notificationIntervalMinutes:ve,includeListingsWithoutPrice:Ee,searchRadiusKm:vt.radiusKm,priceMinStr:Se,priceMaxStr:we,yearMinStr:Me,yearMaxStr:Pe,mileageMinStr:Ie,mileageMaxStr:Re,transmissionType:Be,fuelType:He,sendDefaultMessage:i,defaultMessage:A,selectedHubIds:vt.selectedHubIds,hubIntervals:be};if(r){let e=Pse({...a,is_active:Je});await Lo.patch(`/api/searches/${r}`,e)}else{let r=fN({provider:n,cityId:vt.cityId,categoryId:e,subcategoryId:t,makeModelAny:L.anyMake,makeModelPairs:L.anyMake?[]:jP(L)},Ke);if(r){u({type:`error`,message:r});return}let i=BP(a);await Lo.post(`/api/searches/vehicle`,i)}await p(),eN&&(r?nN.capture(`search_updated`,{search_type:`vehicle`,provider:n,uses_default_message:i}):nN.capture(`search_created`,{search_type:`vehicle`,provider:n,is_duplicate:o,uses_default_message:i})),u({type:`success`,message:l(r?`searchWizard.actions.searchUpdated`:o?`searchWizard.actions.searchDuplicated`:`searchWizard.actions.saveSearchDeployed`)}),c(`/dashboard/searches`)}catch(e){u({type:`error`,message:e instanceof ho&&e.details?.message?e.details.message:l(r?`searchWizard.actions.updateFailed`:`searchWizard.actions.deploymentFailed`)})}finally{fe(!1)}})()},disabled:de,className:`flex min-h-[48px] w-full items-center justify-center gap-2 rounded-2xl px-6 text-sm font-black shadow-xl transition-all sm:h-14 sm:min-w-[200px] sm:w-auto
36sm:gap-3 sm:px-8 ${v===1?`sm:ml-auto`:``} ${sn?`bg-primary text-primary-foreground shadow-lg shadow-primary/20 hover:scale-[1.02] active:scale-[0.99]`:`border border-border/60 bg-surface-elevated text-muted-foreground opacity-60`}`,children:de?(0,V.jsx)(_A,{size:20,className:`animate-spin`}):l(v===xt?r?`searchWizard.actions.saveChanges`:o?`searchWizard.actions.saveDuplicated`:`searchWizard.actions.saveSearch`:`common.continue`)})]})]},v)})]})}var Xse={grid:hA,vehicle:Pk,home:cA,briefcase:kk,shopping:ZA};function Zse(){let e=my(),{categoryId:t,subcategoryId:n}=ur(),r=or(),{status:i,isAuthenticated:a}=Jv(),[o,s]=(0,b.useState)(!0),c=(0,b.useMemo)(()=>({title:e(`searchWizard.shell.categoryTitle`),description:e(`searchWizard.shell.categoryDescription`),sidebarIcon:`grid`}),[e]),[l,u]=(0,b.useState)(c),d=(0,b.useCallback)(e=>{u(e)},[]);if((0,b.useEffect)(()=>{queueMicrotask(()=>{u(c)})},[t,n,c]),(0,b.useEffect)(()=>{i!==`loading`&&(a||r(`/auth/login`,{replace:!0}))},[a,r,i]),i===`loading`)return(0,V.jsx)(`div`,{className:`flex h-screen w-full items-center justify-center bg-background`,children:(0,V.jsxs)(`div`,{className:`flex flex-col items-center gap-4`,children:[(0,V.jsxs)(`div`,{className:`relative h-12 w-12`,children:[(0,V.jsx)(`div`,{className:`absolute inset-0 rounded-full border-2 border-primary/20`}),(0,V.jsx)(`div`,{className:`absolute inset-0 animate-spin rounded-full border-2 border-primary border-t-transparent`})]}),(0,V.jsx)(`p`,{className:`animate-pulse text-sm text-muted-foreground`,children:e(`common.loading`)})]})});if(!a)return null;if(!t||!n)return(0,V.jsx)(`div`,{className:`flex h-screen w-full items-center justify-center bg-background px-4`,children:(0,V.jsx)(`p`,{className:`text-center text-sm text-muted-foreground`,children:e(`searchWizard.shell.missingCategorySubcategory`)})});let f=Xse[l.sidebarIcon];return(0,V.jsxs)(`div`,{className:`flex h-screen min-h-0 flex-col overflow-hidden lg:flex-row`,children:[(0,V.jsxs)(`header`,{className:`relative z-30 shrink-0 border-b border-border/40 bg-surface lg:hidden`,children:[(0,V.jsxs)(`div`,{className:`flex items-center justify-between gap-2 px-3 py-2.5 sm:gap-3 sm:px-4 sm:py-3`,children:[(0,V.jsxs)(zi,{to:`/dashboard/searches/new/category/${t}`,className:`flex min-w-0 flex-1 items-center gap-2.5 text-foreground transition-colors hover:text-primary`,children:[(0,V.jsx)(bk,{size:22,strokeWidth:2,className:`shrink-0`}),(0,V.jsx)(`span`,{className:`truncate text-sm font-semibold tracking-tight sm:text-base`,children:l.title})]}),(0,V.jsx)(`button`,{type:`button`,onClick:()=>s(e=>!e),className:`shrink-0 p-1 text-muted-foreground transition-colors hover:text-foreground`,"aria-expanded":o,"aria-controls":`wizard-steps-mobile-target`,"aria-label":e(o?`searchWizard.hideStepNav`:`searchWizard.showStepNav`),children:o?(0,V.jsx)(zk,{size:22,strokeWidth:2}):(0,V.jsx)(Ik,{size:22,strokeWidth:2})})]}),(0,V.jsx)(`div`,{className:`grid overflow-hidden border-t border-border/30 transition-[grid-template-rows] duration-[380ms] ease-in-out motion-reduce:transition-none ${o?`grid-rows-[1fr]`:`grid-rows-[0fr]`}`,children:(0,V.jsx)(`div`,{className:`min-h-0 overflow-hidden`,children:(0,V.jsx)(`div`,{id:`wizard-steps-mobile-target`,className:`px-3 py-2.5 sm:px-4 sm:py-3`})})})]}),(0,V.jsx)(`aside`,{className:`relative z-20 hidden h-full w-full shrink-0 flex-col border-r border-border/40 bg-surface px-5 py-5 shadow-sm md:px-6 md:py-6 lg:flex lg:w-[320px] lg:px-7 lg:py-7 xl:w-[360px]`,children:(0,V.jsxs)(`div`,{className:`flex h-full flex-col`,children:[(0,V.jsxs)(zi,{to:`/dashboard/searches`,className:`group mb-5 inline-flex items-center gap-2.5 text-[10px] font-black uppercase tracking-[0.2em] text-muted-foreground transition-all hover:text-primary sm:mb-6 sm:text-xs lg:mb-7`,children:[(0,V.jsx)(`div`,{className:`flex h-8 w-8 items-center justify-center rounded-xl bg-surface-elevated transition-all group-hover:bg-primary/10 group-hover:text-primary`,children:(0,V.jsx)(mj,{size:14,strokeWidth:2.5})}),e(`common.cancel`)]}),(0,V.jsxs)(`div`,{className:`mb-6 flex items-start gap-3 sm:mb-8 sm:gap-3.5`,children:[(0,V.jsxs)(`div`,{className:`flex h-10 w-10 shrink-0 items-center justify-center rounded-xl border border-border/60 bg-surface-elevated text-primary sm:h-11 sm:w-11 lg:h-12 lg:w-12`,children:[(0,V.jsx)(f,{size:18,strokeWidth:2,className:`lg:hidden`,"aria-hidden":!0}),(0,V.jsx)(f,{size:20,strokeWidth:2,className:`hidden lg:block`,"aria-hidden":!0})]}),(0,V.jsxs)(`div`,{className:`min-w-0 pt-0.5`,children:[(0,V.jsx)(`h1`,{className:`text-lg font-semibold tracking-tight text-foreground sm:text-xl lg:text-2xl`,children:l.title}),(0,V.jsx)(`p`,{className:`mt-1 text-xs leading-snug text-muted-foreground sm:text-sm`,children:l.description})]})]}),(0,V.jsx)(`div`,{id:`wizard-steps-target`,className:`min-h-0 flex-1 overflow-y-auto`})]})}),(0,V.jsxs)(`main`,{id:`category-search-wizard-main`,className:`relative min-h-0 flex-1 overflow-y-auto overflow-x-hidden`,children:[(0,V.jsxs)(`div`,{className:`pointer-events-none fixed inset-0 z-0 overflow-hidden`,children:[(0,V.jsx)(`div`,{className:`absolute -left-20 top-0 h-[600px] w-[600px] rounded-full bg-primary/5 blur-[150px]`}),(0,V.jsx)(`div`,{className:`absolute -right-20 bottom-0 h-[600px] w-[600px] rounded-full bg-primary/5 blur-[150px]`})]}),(0,V.jsx)(`div`,{className:`relative z-10 mx-auto w-full max-w-5xl px-3 py-6 sm:px-4 sm:py-8 md:px-6 lg:px-10 lg:py-12`,children:(0,V.jsx)(ZP,{categoryId:t,subcategoryId:n,onShellCopy:d})})]})]})}function Qse(){let e=my(),{categoryId:t}=ur(),n=or(),{status:r,isAuthenticated:i}=Jv(),[a,o]=(0,b.useState)([]),[s,c]=(0,b.useState)(``),[l,u]=(0,b.useState)(!0),d=(0,b.useCallback)(async()=>
36{if(!t){c(e(`searchWizard.categoryPicker.missingCategory`)),o([]),u(!1);return}c(``),u(!0);try{o((await Lo.get(`/api/catalog/categories/${t}/subcategories`)).data.subcategories??[])}catch(t){c(ey(e,t)),o([])}finally{u(!1)}},[t,e]);if((0,b.useEffect)(()=>{if(r!==`loading`){if(!i){n(`/auth/login`,{replace:!0});return}queueMicrotask(()=>{d()})}},[i,n,r,d]),r===`loading`||l&&!s)return(0,V.jsxs)(`div`,{className:`mx-auto flex min-h-[50vh] w-full min-w-0 max-w-4xl flex-col items-center justify-center overflow-x-hidden px-3 py-16 sm:px-6 lg:px-8`,children:[(0,V.jsx)(`div`,{className:`h-10 w-10 animate-spin rounded-full border-2 border-primary border-t-transparent`}),(0,V.jsx)(`p`,{className:`mt-4 text-center text-sm font-medium text-muted-foreground`,children:e(`searchWizard.categoryPicker.loadingSubcategories`)})]});if(!i)return null;let f=a[0]?.category_name?.trim()||e(`searchWizard.categoryPicker.subcategoriesTitle`);return(0,V.jsxs)(ik.main,{initial:{opacity:0,y:8},animate:{opacity:1,y:0},className:`mx-auto min-h-[60vh] w-full min-w-0 max-w-4xl overflow-x-hidden px-3 py-6 sm:px-6 sm:py-10 lg:px-8 pb-[max(1.5rem,env(safe-area-inset-bottom))]`,children:[(0,V.jsxs)(`div`,{className:`mb-6 sm:mb-8`,children:[(0,V.jsxs)(zi,{to:`/dashboard/searches/new`,className:`inline-flex max-w-full min-w-0 items-center gap-2 text-xs font-bold text-muted-foreground transition hover:text-primary sm:text-sm`,children:[(0,V.jsx)(bk,{size:18,className:`shrink-0`,strokeWidth:2}),(0,V.jsx)(`span`,{className:`truncate sm:whitespace-normal`,children:e(`searchWizard.backToCategories`)})]}),(0,V.jsx)(`h1`,{className:`mt-4 break-words text-2xl font-black tracking-tight text-foreground sm:mt-6 sm:text-3xl md:text-4xl`,children:f}),(0,V.jsx)(`p`,{className:`mt-2 text-xs leading-relaxed text-muted-foreground sm:text-sm sm:leading-normal md:text-base`,children:e(`searchWizard.categoryPicker.subcategoriesSubtitle`)})]}),s?(0,V.jsxs)(`div`,{className:`mb-6 flex flex-col items-center gap-4 roun
36ded-2xl border border-error/30 bg-error/5 px-3 py-7 text-center sm:mb-8 sm:px-4 sm:py-8`,role:`alert`,children:[(0,V.jsx)(Bk,{className:`h-10 w-10 shrink-0 text-error`,"aria-hidden":!0}),(0,V.jsx)(`p`,{className:`max-w-prose break-words px-1 text-xs font-medium text-error sm:text-sm`,children:s}),(0,V.jsxs)(`button`,{type:`button`,onClick:()=>void d(),className:`inline-flex w-full max-w-xs items-center justify-center gap-2 rounded-xl bg-surface-elevated px-4 py-2.5 text-xs font-bold text-foreground transition hover:bg-border sm:w-auto sm:py-2 sm:text-sm`,children:[(0,V.jsx)(zA,{size:16,className:`shrink-0`,"aria-hidden":!0}),e(`common.tryAgain`)]})]}):null,!s&&(0,V.jsxs)(`div`,{children:[(0,V.jsxs)(`h2`,{className:`mb-3 flex flex-wrap items-center gap-2 text-[11px] font-black uppercase tracking-widest text-muted-foreground sm:mb-4 sm:text-sm sm:tracking-widest`,children:[(0,V.jsx)(pA,{size:16,className:`shrink-0`,"aria-hidden":!0}),e(`searchWizard.categoryPicker.subcategoriesTitle`)]}),(0,V.jsx)(`ul`,{className:`grid grid-cols-1 gap-2.5 sm:grid-cols-2 sm:gap-3`,children:a.length===0?(0,V.jsx)(`li`,{className:`col-span-full rounded-2xl border border-border/60 bg-surface/60 px-3 py-7 text-center text-xs text-muted-foreground sm:px-4 sm:py-8 sm:text-sm`,children:e(`searchWizard.categoryPicker.noSubcategories`)}):a.map((e,r)=>{let i=pP({facebookCode:e.facebook_code,name:e.name});return(0,V.jsx)(`li`,{children:(0,V.jsxs)(ik.button,{type:`button`,initial:{opacity:0,y:10},animate:{opacity:1,y:0},transition:{delay:Math.min(r*.04,.4)},onClick:()=>n(`/dashboard/searches/new/category/${t}/subcategory/${e.id}`),className:`group flex min-h-[3.25rem] w-full items-center gap-3 rounded-2xl border border-border/60 bg-surface p-3.5 text-left shadow-sm transition hover:border-primary/40 hover:shadow-md active:scale-[0.99] sm:min-h-0 sm:p-4 md:p-5`,children:[(0,V.jsx)(`div`,{className:`flex h-10 w-10 shrink-0 items-center justify-center rounded-xl bg-surface-elevated text-primary sm:h-11 sm:w-11`,children:(0,V.jsx)(i,{size:18,strokeWidth:2,"aria-hidden":!0,className:`sm:h-5 sm:w-5`})}),(0,V.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(0,V.jsx)(`p`,{className:`break-words font-black leading-snug text-foreground sm:text-[15px] md:text-base`,children:e.name}),e.description?(0,V.jsx)(`p`,{className:`mt-0.5 line-clamp-2 text-[11px] text-muted-foreground sm:text-xs`,children:e.description}):null]}),(0,V.jsx)(Rk,{className:`h-5 w-5 shrink-0 text-muted-foreground transition group-hover:translate-x-0.5 group-hover:text-primary`})]})},e.id)})})]})]})}function $se(){let e=my(),{searchId:t}=ur(),n=or(),{status:r,isAuthenticated:i}=Jv(),[a,o]=(0,b.useState)(!0),s=(0,b.useMemo)(()=>({title:e(`searchWizard.shell.duplicateTitle`),description:e(`searchWizard.shell.duplicateDescription`),sidebarIcon:`vehicle`}),[e]),[c,l]=(0,b.useState)(s),[u,d]=(0,b.useState)(null),[f,p]=(0,b.useState)(``),m=(0,b.useCallback)(e=>{l(e)},[]);return(0,b.useEffect)(()=>{queueMicrotask(()=>{l(s)})},[t,s]),(0,b.useEffect)(()=>{r!==`loading`&&(i||n(`/auth/login`,{replace:!0}))},[i,n,r]),(0,b.useEffect)(()=>{if(!t||!i)return;let n=!1;return queueMicrotask(()=>{n||(p(``),d(null),(async()=>{try{let r=await Lo.get(`/api/searches/${t}`);if(n)return;let i=UP(r.data);if(!i){p(e(`searchWizard.shell.notVehicleDuplicate`));return}d(i)}catch(t){if(n)return;p(t instanceof ho&&t.details?.message?t.details.message:e(`searchWizard.shell.loadSearchError`))}})())}),()=>{n=!0}},[t,i,e]),r===`loading`?(0,V.jsx)(`div`,{className:`flex h-screen w-full items-center justify-center bg-background`,children:(0,V.jsxs)(`div`,{className:`flex flex-col items-center gap-4`,children:[(0,V.jsxs)(`div`,{className:`relative h-12 w-12`,children:[(0,V.jsx)(`div`,{className:`absolute inset-0 rounded-full border-2 border-primary/20`}),(0,V.jsx)(`div`,{className:`absolute inset-0 animate-spin rounded-full border-2 border-primary border-t-transparent`})]}),(0,V.jsx)(`p`,{className:`animate-pulse text-sm text-muted-foreground`,children:e(`common.loading`)})]})}):i?t?f?(0,V.jsxs)(`div`,{className:`flex h-screen w-full flex-col items-center justify-center gap-4 bg-background px-4`,children:[(0,V.jsx)(`p`,{className:`max-w-md text-center text-sm text-muted-foreground`,children:f}),(0,V.jsx)(zi,{to:`/dashboard/searches`,className:`text-sm font-semibold text-primary hover:underline`,children:e(`searchWizard.backToSearches`)})]}):u?(0,V.jsxs)(`div`,{className:`flex h-screen min-h-0 flex-col overflow-hidden lg:flex-row`,children:[(0,V.jsxs)(`header`,{className:`relative z-30 shrink-0 border-b border-border/40 bg-surface lg:hidden`,children:[(0,V.jsxs)(`div`,{className:`flex items-center justify-between gap-2 px-3 py-2.5 sm:gap-3 sm:px-4 sm:py-3`,children:[(0,V.jsxs)(zi,{to:`/dashboard/searches`,className:`flex min-w-0 flex-1 items-center gap-2.5 text-foreground transition-colors hover:text-primary`,children:[(0,V.jsx)(bk,{size:22,strokeWidth:2,className:`shrink-0`}),(0,V.jsx)(`span`,{className:`truncate text-sm font-semibold tracking-tight sm:text-base`,children:c.title})]}),(0,V.jsx)(`button`,{type:`button`,onClick:()=>o(e=>!e),className:`shrink-0 p-1 text-muted-foreground transition-colors hover:text-foreground`,"aria-expanded":a,"aria-controls":`wizard-steps-mobile-target`,"aria-label":e(a?`searchWizard.hideStepNav`:`searchWizard.showStepNav`),children:a?(0,V.jsx)(zk,{size:22,strokeWidth:2}):(0,V.jsx)(Ik,{size:22,strokeWidth:2})})]}),(0,V.jsx)(`div`,{className:`grid overflow-hidden border-t border-border/30 transition-[grid-template-rows] duration-[380ms] ease-in-out motion-reduce:transition-none ${a?`grid-rows-[1fr]`:`grid-rows-[0fr]`}`,children:(0,V.jsx)(`div`,{className:`min-h-0 overflow-hidden`,children:(0,V.jsx)(`div`,{id:`wizard-steps-mobile-target`,className:`px-3 py-2.5 sm:px-4 sm:py-3`})})})]}),(0,V.jsx)(`aside`,{className:`relative z-20 hidden h-full w-full shrink-0 flex-col border-r border-border/40 bg-surface px-5 py-5 shadow-sm md:px-6 md:py-6 lg:flex lg:w-[320px] lg:px-7 lg:py-7 xl:w-[360
36px]`,children:(0,V.jsxs)(`div`,{className:`flex h-full flex-col`,children:[(0,V.jsxs)(zi,{to:`/dashboard/searches`,className:`group mb-5 inline-flex items-center gap-2.5 text-[10px] font-black uppercase tracking-[0.2em] text-muted-foreground transition-all hover:text-primary sm:mb-6 sm:text-xs lg:mb-7`,children:[(0,V.jsx)(`div`,{className:`flex h-8 w-8 items-center justify-center rounded-xl bg-surface-elevated transition-all group-hover:bg-primary/10 group-hover:text-primary`,children:(0,V.jsx)(mj,{size:14,strokeWidth:2.5})}),e(`common.cancel`)]}),(0,V.jsxs)(`div`,{className:`mb-6 flex items-start gap-3 sm:mb-8 sm:gap-3.5`,children:[(0,V.jsxs)(`div`,{className:`flex h-10 w-10 shrink-0 items-center justify-center rounded-xl border border-border/60 bg-surface-elevated text-primary sm:h-11 sm:w-11 lg:h-12 lg:w-12`,children:[(0,V.jsx)(Gk,{size:18,strokeWidth:2,className:`lg:hidden`,"aria-hidden":!0}),(0,V.jsx)(Gk,{size:20,strokeWidth:2,className:`hidden lg:block`,"aria-hidden":!0})]}),(0,V.jsxs)(`div`,{className:`min-w-0 pt-0.5`,children:[(0,V.jsx)(`h1`,{className:`text-lg font-semibold tracking-tight text-foreground sm:text-xl lg:text-2xl`,children:c.title}),(0,V.jsx)(`p`,{className:`mt-1 text-xs leading-snug text-muted-foreground sm:text-sm`,children:c.description})]})]}),(0,V.jsx)(`div`,{id:`wizard-steps-target`,className:`min-h-0 flex-1 overflow-y-auto`})]})}),(0,V.jsxs)(`main`,{id:`category-search-wizard-main`,className:`relative min-h-0 flex-1 overflow-y-auto overflow-x-hidden`,children:[(0,V.jsxs)(`div`,{className:`pointer-events-none fixed inset-0 z-0 overflow-hidden`,children:[(0,V.jsx)(`div`,{className:`absolute -left-20 top-0 h-[600px] w-[600px] rounded-full bg-primary/5 blur-[150px]`}),(0,V.jsx)(`div`,{className:`absolute -right-20 bottom-0 h-[600px] w-[600px] rounded-full bg-primary/5 blur-[150px]`})]}),(0,V.jsx)(`div`,{className:`relative z-10 mx-auto w-full max-w-5xl px-3 py-6 sm:px-4 sm:py-8 md:px-6 lg:px-10 lg:py-12`,children:(0,V.jsx)(ZP,{categoryId:u.categoryId,subcategoryId:u.subcategoryId,duplicateVehiclePayload:u,onShellCopy:m})})]})]}):(0,V.jsx)(`div`,{className:`flex h-screen w-full items-center justify-center bg-background`,children:(0,V.jsxs)(`div`,{className:`flex flex-col items-center gap-4`,children:[(0,V.jsxs)(`div`,{className:`relative h-12 w-12`,children:[(0,V.jsx)(`div`,{className:`absolute inset-0 rounded-full border-2 border-primary/20`}),(0,V.jsx)(`div`,{className:`absolute inset-0 animate-spin rounded-full border-2 border-primary border-t-transparent`})]}),(0,V.jsx)(`p`,{className:`animate-pulse text-sm text-muted-foreground`,children:e(`searchWizard.shell.preparingDuplicate`)})]})}):(0,V.jsx)(`div`,{className:`flex h-screen w-full items-center justify-center bg-background px-4`,children:(0,V.jsx)(`p`,{className:`text-center text-sm text-muted-foreground`,children:e(`searchWizard.shell.missingSearchId`)})}):null}var ece={grid:hA,vehicle:Pk,home:cA,briefcase:kk,shopping:ZA};function tce(){let e=my(),{searchId:t}=ur(),n=or(),{status:r,isAuthenticated:i}=Jv(),[a,o]=(0,b.useState)(!0),s=(0,b.useMemo)(()=>({title:e(`searchWizard.shell.editTitle`),description:e(`searchWizard.shell.editDescription`),sidebarIcon:`vehicle`}),[e]),[c,l]=(0,b.useState)(s),[u,d]=(0,b.useState)(null),[f,p]=(0,b.useState)(``),m=(0,b.useCallback)(e=>{l(e)},[]);if((0,b.useEffect)(()=>{queueMicrotask(()=>{l(s)})},[t,s]),(0,b.useEffect)(()=>{r!==`loading`&&(i||n(`/auth/login`,{replace:!0}))},[i,n,r]),(0,b.useEffect)(()=>{if(!t||!i)return;let n=!1;return queueMicrotask(()=>{n||(p(``),d(null),(async()=>{try{let r=await Lo.get(`/api/searches/${t}`);if(n)return;let i=UP(r.data);if(!i){p(e(`searchWizard.shell.notVehicleSearch`));return}d(i)}catch(t){if(n)return;p(t instanceof ho&&t.details?.message?t.details.message:e(`searchWizard.shell.loadSearchError`))}})())}),()=>{n=!0}},[t,i,e]),r===`loading`)return(0,V.jsx)(`div`,{className:`flex h-screen w-full items-center justify-center bg-background`,children:(0,V.jsxs)(`div`,{className:`flex flex-col items-center gap-4`,children:[(0,V.jsxs)(`div`,{className:`relative h-12 w-12`,children:[(0,V.jsx)(`div`,{className:`absolute inset-0 rounded-full border-2 border-primary/20`}),(0,V.jsx)(`div`,{className:`absolute inset-0 animate-spin rounded-full border-2 border-primary border-t-transparent`})]}),(0,V.jsx)(`p`,{className:`animate-pulse text-sm text-muted-foreground`,children:e(`common.loading`)})]})});if(!i)return null;if(!t)return(0,V.jsx)(`div`,{className:`flex h-screen w-full items-center justify-center bg-background px-4`,children:(0,V.jsx)(`p`,{className:`text-center text-sm text-muted-foreground`,children:e(`searchWizard.shell.missingSearchId`)})});if(f)return(0,V.jsxs)(`div`,{className:`flex h-screen w-full flex-col items-center justify-center gap-4 bg-background px-4`,children:[(0,V.jsx)(`p`,{className:`max-w-md text-center text-sm text-muted-foreground`,children:f}),(0,V.jsx)(zi,{to:`/dashboard/searches`,className:`text-sm font-semibold text-primary hover:underline`,children:e(`searchWizard.backToSearches`)})]});if(!u)return(0,V.jsx)(`div`,{className:`flex h-screen w-full items-center justify-center bg-background`,children:(0,V.jsxs)(`div`,{className:`flex flex-col items-center gap-4`,children:[(0,V.jsxs)(`div`,{className:`relative h-12 w-12`,children:[(0,V.jsx)(`div`,{className:`absolute inset-0 rounded-full border-2 border-primary/20`}),(0,V.jsx)(`div`,{className:`absolute inset-0 animate-spin rounded-full border-2 border-primary border-t-transparent`})]}),(0,V.jsx)(`p`,{className:`animate-pulse text-sm text-muted-foreground`,children:e(`searchWizard.shell.loadingSearch`)})]})});let h=ece[c.sidebarIcon];return(0,V.jsxs)(`div`,{className:`flex h-screen min-h-0 flex-col overflow-hidden lg:flex-row`,children:[(0,V.jsxs)(`header`,{className:`relative z-30 shrink-0 border-b border-border/40 bg-surface lg:hidden`,children:[(0,V.jsxs)(`div`,{className:`flex items-center justify-between gap-2 px-3 py-2.5 sm:gap-3 sm:px-4 sm:py-3`,children:[(0,V.jsxs)(zi,{to:`/dashboard/searches`,className:`flex min-w-0 flex-1 items-center gap-2.5 text-foreground transition-colors hover:text-primary`,children:[(0,V.jsx)(bk,{size:22,strokeWidth:2,className:`shrink-0`}),(0,V.jsx)(`span`,{className:`truncate text-sm font-semibold tracking-tight sm:text-base`,children:c.title})]}),(0,V.jsx)(`button`,{type:`button`,onClick:()=>o(e=>!e),className:`shrink-0 p-1 text-muted-foreground transition-colors hover:text-foreground`,"aria-expanded":a,"aria-controls":`wizard-steps-mobile-target`,"aria-label":e(a?`searchWizard.hideStepNav`:`searchWizard.showStepNav`),children:a?(0,V.jsx)(zk,{size:22,strokeWidth:2}):(0,V.jsx)(Ik,{size:22,strokeWidth:2})})]}),(0,V.jsx)(`div`,{className:`grid overflow-hidden border-t border-border/30 transition-[grid-template-rows] duration-[380ms] ease-in-out motion-reduce:transition-none ${a?`grid-rows-[1fr]`:`grid-rows-[0fr]`}`,children:(0,V.jsx)(`div`,{className:`min-h-0 overflow-hidden`,children:(0,V.jsx)(`div`,{id:`wizard-steps-mobile-target`,className:`px-3 py-2.5 sm:px-4 sm:py-3`})})})]}),(0,V.jsx)(`aside`,{className:`relative z-20 hidden h-full w-full shrink-0 flex-col border-r border-border/40 bg-surface px-5 py-5 shadow-sm md:px-6 md:py-6 lg:flex lg:w-[320px] lg:px-7 lg:py-7 xl:w-[360
36px]`,children:(0,V.jsxs)(`div`,{className:`flex h-full flex-col`,children:[(0,V.jsxs)(zi,{to:`/dashboard/searches`,className:`group mb-5 inline-flex items-center gap-2.5 text-[10px] font-black uppercase tracking-[0.2em] text-muted-foreground transition-all hover:text-primary sm:mb-6 sm:text-xs lg:mb-7`,children:[(0,V.jsx)(`div`,{className:`flex h-8 w-8 items-center justify-center rounded-xl bg-surface-elevated transition-all group-hover:bg-primary/10 group-hover:text-primary`,children:(0,V.jsx)(mj,{size:14,strokeWidth:2.5})}),e(`common.cancel`)]}),(0,V.jsxs)(`div`,{className:`mb-6 flex items-start gap-3 sm:mb-8 sm:gap-3.5`,children:[(0,V.jsxs)(`div`,{className:`flex h-10 w-10 shrink-0 items-center justify-center rounded-xl border border-border/60 bg-surface-elevated text-primary sm:h-11 sm:w-11 lg:h-12 lg:w-12`,children:[(0,V.jsx)(h,{size:18,strokeWidth:2,className:`lg:hidden`,"aria-hidden":!0}),(0,V.jsx)(h,{size:20,strokeWidth:2,className:`hidden lg:block`,"aria-hidden":!0})]}),(0,V.jsxs)(`div`,{className:`min-w-0 pt-0.5`,children:[(0,V.jsx)(`h1`,{className:`text-lg font-semibold tracking-tight text-foreground sm:text-xl lg:text-2xl`,children:c.title}),(0,V.jsx)(`p`,{className:`mt-1 text-xs leading-snug text-muted-foreground sm:text-sm`,children:c.description})]})]}),(0,V.jsx)(`div`,{id:`wizard-steps-target`,className:`min-h-0 flex-1 overflow-y-auto`})]})}),(0,V.jsxs)(`main`,{id:`category-search-wizard-main`,className:`relative min-h-0 flex-1 overflow-y-auto overflow-x-hidden`,children:[(0,V.jsxs)(`div`,{className:`pointer-events-none fixed inset-0 z-0 overflow-hidden`,children:[(0,V.jsx)(`div`,{className:`absolute -left-20 top-0 h-[600px] w-[600px] rounded-full bg-primary/5 blur-[150px]`}),(0,V.jsx)(`div`,{className:`absolute -right-20 bottom-0 h-[600px] w-[600px] rounded-full bg-primary/5 blur-[150px]`})]}),(0,V.jsx)(`div`,{className:`relative z-10 mx-auto w-full max-w-5xl px-3 py-6 sm:px-4 sm:py-8 md:px-6 lg:px-10 lg:py-12`,children:(0,V.jsx)(ZP,{categoryId:u.categoryId,subcategoryId:u.subcategoryId,editSearchId:t,editVehiclePayload:u,onShellCopy:m})})]})]})}function QP(e){return{id:e.id,listingId:e.listing_id,providerUsername:e.provider_username,listingTitle:e.listing_title,listingImageUrl:e.listing_image_url,listingPrice:e.listing_price,isPersonalListing:e.is_personal_listing,unreadCount:e.unread_count,aiNegotiationEnabled:e.ai_negotiation_enabled,aiNegotiationConfig:`ai_negotiation_config`in e&&e.ai_negotiation_config!==null&&typeof e.ai_negotiation_config==`object`?e.ai_negotiation_config:null,needsHumanAttention:e.needs_human_attention,lastMessageAt:e.last_message_at??e.updated_at,lastMessagePreview:e.last_message?.content??``,lastMessageStatus:e.last_message?.status,canMessageListing:e.can_message_listing!==!1}}function $P(e){return QP(e)}function eF(e){return{id:e.id,conversationId:e.conversation_id,direction:e.direction,content:e.content,sentAt:e.sent_at,status:e.status}}function nce(e,t,n){return{id:n,conversationId:e,direction:`outgoing`,content:t,sentAt:new Date().toISOString(),status:`pending`}}function rce(e){return[...e].reverse().map(eF)}function tF(e,t){return new Date(t.lastMessageAt).getTime()-new Date(e.lastMessageAt).getTime()}function nF(e,t){return e!=null&&e!==``?e:t}function rF(e,t){return{...e,...t,listingId:nF(t.listingId,e.listingId),providerUsername:nF(t.providerUsername,e.providerUsername),listingTitle:nF(t.listingTitle,e.listingTitle),listingImageUrl:nF(t.listingImageUrl,e.listingImageUrl),listingPrice:nF(t.listingPrice,e.listingPrice),isPersonalListing:t.isPersonalListing||e.isPersonalListing,aiNegotiationEnabled:t.aiNegotiationEnabled||e.aiNegotiationEnabled,aiNegotiationConfig:t.aiNegotiationConfig??e.aiNegotiationConfig,needsHumanAttention:t.needsHumanAttention||e.needsHumanAttention,lastMessagePreview:t.lastMessagePreview||e.lastMessagePreview,lastMessageStatus:t.lastMessageStatus??e.lastMessageStatus}}function iF(e,t){let n=e.findIndex(e=>e.id===t.id);if(n===-1)return[t,...e].sort(tF);let r=[...e];return r[n]=rF(r[n],t),r.sort(tF)}function ice(e,t){return e.map(e=>e.id===t?{...e,unreadCount:0}:e)}function aF(e,t,n){return e.map(e=>e.id===t?{...e,needsHumanAttention:n}:e)}function ace(e,t){return e.map(e=>e.id===t.messageId?{...e,status:t.newStatus}:e)}function oce(e,t){return e.map(e=>e.id===t.conversationId?{...e,lastMessageStatus:t.newStatus}:e)}function sce(e,t){return e.some(e=>e.id===t.id)?e.map(e=>e.id===t.id?{...e,...t}:e):[...e,t]}function oF(e){return typeof e==`string`?e:null}function sF(e){let t=oF(e.conversation_id);if(!t)return null;let n=e.last_message,r=null,i=``,a,o=oF(e.last_message_at)??new Date().toISOString();if(n&&typeof n==`object`&&!Array.isArray(n)){let e=n,s=oF(e.id),c=oF(e.content)??``;i=c;let l=oF(e.sent_at)??o,u=e.direction===`incoming`||e.direction===`outgoing`?e.direction:`incoming`,d=e.status===`pen
36ding`||e.status===`sent`||e.status===`delivered`||e.status===`failed`?e.status:void 0;a=d,s&&(r={id:s,conversationId:t,direction:u,content:c,sentAt:l,status:d},o=l)}let s=typeof e.unread_count==`number`?e.unread_count:0;return{conversation:{id:t,listingId:oF(e.listing_id),providerUsername:oF(e.provider_username),listingTitle:oF(e.listing_title),listingImageUrl:oF(e.listing_image_url),listingPrice:oF(e.listing_price),isPersonalListing:e.is_personal_listing===!0,unreadCount:s,aiNegotiationEnabled:e.ai_negotiation_enabled===!0,aiNegotiationConfig:null,needsHumanAttention:e.needs_human_attention===!0,lastMessageAt:o,lastMessagePreview:i,lastMessageStatus:a,canMessageListing:e.can_message_listing!==!1},message:r}}function cce(e){let t=e.conversation;return t&&typeof t==`object`&&!Array.isArray(t)?sF(t)?.conversation??null:sF(e)?.conversation??null}var cF=`/assets/ebay-Oexv_Rul.png`;function lF(e){let{showToast:t}=Gx(),n=e?.onRefreshed,[r,i]=(0,b.useState)(null);return{refresh:(0,b.useCallback)(async e=>{if(!r){i(e);try{let{summary:r,refreshSkipped:i}=await Qo(e);if(n?.(r),i){t({type:`info`,message:`Listing is up to date.`});return}let a=r.marketplace_status===`sold`?`This listing is marked as sold on Facebook.`:r.marketplace_status===`pending`?`This listing is pending on Facebook.`:r.marketplace_status===`unavailable`?`This listing is no longer available on Facebook.`:`Listing updated from Facebook.`;t({type:r.marketplace_status===`available`?`success`:`info`,message:a})}catch(e){t({type:`error`,message:$o(e)})}finally{i(null)}}},[r,n,t]),isRefreshing:(0,b.useCallback)(e=>r===e,[r]),refreshingListingId:r}}function uF(e){return e!==`available`}var lce={sold:{labelKey:`listingOverlay.sold`,className:`border border-amber-200/90 bg-amber-500 text-black shadow-md ring-1 ring-black/10`,icon:ij},pending:{labelKey:`listingOverlay.pending`,className:`border border-sky-200/90 bg-sky-600 text-white shadow-md ring-1 ring-black/10`,icon:Uk},unavailable:{labelKey:`listingOverlay.unavailable`,className:`border border-red-200/90 bg-red-50 text-red-900 shadow-sm dark:border-red-900/60 dark:bg-red-950/50 dark:text-red-200`,icon:_ae}},uce=`border border-red-200/25 bg-red-900/95 text-white shadow-md ring-1 ring-black/25`;function dF({status:e,onMedia:t=!1,className:n=``}){let r=my();if(!uF(e))return null;let i=lce[e],a=i.icon;return(0,V.jsxs)(`span`,{className:`inline-flex shrink-0 items-center gap-1 rounded-full px-2.5 py-1 text-[10px] font-black uppercase tracking-wider ${t&&e===`unavailable`?uce:i.className} ${n}`,children:[(0,V.jsx)(a,{size:10,"aria-hidden":!0}),r(i.labelKey)]})}function fF(e){return typeof e==`string`&&e.trim()||null}function pF(e){return fF(e)}function mF(e){let t=new Set,n=[];for(let r of e??[]){let e=fF(r);!e||t.has(e)||(t.add(e),n.push(e))}return n}function hF(e){return e!=null&&Number.isFinite(Number(e))}function gF(e,t){let n=e.location_label?.trim(),r=hF(e.city_distance)?Number(e.city_distance):null,i=r==null?null:rM(r,t);return n&&i?`${n} ⢠${i}`:hF(e.radius)?rM(Number(e.radius),t):null}function _F(e){return e==null||!String(e).trim()?null:String(e).trim().toLowerCase().replace(/-/g,`_`).replace(/\s+/g,`_`)}function vF(e){return e.replace(/_/g,` `).split(` `).filter(Boolean).map(e=>e.charAt(0).toUpperCase()+e.slice(1).toLowerCase()).join(` `)}var dce={private:`Private seller`,dealer:`Dealer`,unknown:`Unknown seller`},fce={gasoline:`Gasoline`,petrol:`Gasoline`,gas:`Gasoline`,diesel:`Diesel`,electric:`Electric`,hybrid:`Hybrid`,plugin_hybrid:`Plug-in hybrid`,plug_in_hybrid:`Plug-in hybrid`,flex_fuel:`Flex fuel`,hydrogen:`Hydrogen`,cng:`Natural gas (CNG)`,lpg:`Propane (LPG)`,other:`Other`},pce={manual:`Manual`,automatic:`Automatic`,cvt:`CVT`,semi_automatic:`Semi-automatic`,other:`Other`},mce={steal:`Steal`,good:`Good`,fair:`Fair`,overpriced:`Overpriced`},hce={new:`New`,used:`Used`,certified:`Certified pre-owned`,excellent:`Excellent`,good:`Good`,fair:`Fair`,poor:`Poor`,like_new:`Like new`,salvage:`Salvage`,for_parts:`For parts`,other:`Other`};function gce(e){let t=_F(e);return t?dce[t]??vF(t):null}function yF(e){let t=_F(e);return t?fce[t]??vF(t):null}function bF(e){let t=_F(e);return t?pce[t]??vF(t):null}function xF(e){let t=_F(e);return t?hce[t]??vF(t):null}function _ce(e){let t=_F(e);return t?mce[t]??vF(t):null}function SF(e){return e==null||!String(e).trim()?null:String(e).trim().replace(/[_-]+/g,` `).replace(/\s+/g,` `).split(` `).map(e=>e?e.charAt(0).toUpperCase()+e.slice(1).toLowerCase():``).join(` `)}
36var CF=(0,b.memo)(function({listing:e,viewMode:t,animateLayout:n=!1,detailPath:r,detailState:i,onToggleFavorite:a,isFavoritePending:o=!1,onListingOpen:s,onListingRefreshed:c}){let l=or(),{unit:u}=oM(),{refresh:d,isRefreshing:f}=lF({onRefreshed:c}),p=(0,b.useCallback)(()=>{s?.(e.id),r&&l(r,{state:i})},[r,i,e.id,l,s]),m=!!(r||s),h=(0,b.useCallback)(e=>{m&&(e.target.closest(`a, button`)||p())},[m,p]),g=(0,b.useCallback)(e=>{m&&(e.key!==`Enter`&&e.key!==` `||(e.preventDefault(),p()))},[m,p]),_=(0,b.useMemo)(()=>pF(e.primary_image_url),[e.primary_image_url]),v=`${e.id}:${_??``}`,y=(0,b.useRef)(v),[x,S]=(0,b.useState)(_?`loading`:`error`),C=(0,b.useRef)(null);(0,b.useEffect)(()=>{y.current!==v&&(S(_?`loading`:`error`),y.current=v)},[v,_]),(0,b.useLayoutEffect)(()=>{C.current?.complete&&C.current.naturalHeight>0&&S(`loaded`)},[_]);let w=e=>{if(!e)return null;let t=new Date(e);if(Number.isNaN(t.getTime()))return null;let n=new Date().getTime()-t.getTime(),r=Math.floor(n/(1e3*60));if(r<1)return`Just now`;if(r<60)return`${r}m ago`;let i=Math.floor(r/60);return i<24?`${i}h ago`:`${Math.floor(i/24)}d ago`},T=t===`grid`,E=e.provider?.toLowerCase()??``,D={facebook:`Facebook`,ebay:`eBay`,kijiji:`Kijiji`,autotrader:`AutoTrader`},O={facebook:_N,ebay:cF,kijiji:vN,autotrader:gN},k=D[E]??`Provider`,A=O[E]??null,j=E===`kijiji`?`K`:E===`autotrader`?`AT`:`P`,M=`Open in ${k}`,N=`Resync`,P=E===`facebook`&&e.can_refresh_from_facebook,F=f(e.id),ee=`flex h-9 w-9 cursor-default items-center justify-center rounded-full bg-black/20 text-white backdrop-blur-md transition-all hover:bg-primary hover:text-primary-foreground`,I=`flex h-9 w-9 cursor-default items-center justify-center rounded-full border border-border bg-surface-elevated/70 text-muted-foreground transition-all hover:bg-primary hover:text-primary-foreground`,te=`pointer-events-none absolute right-11 top-1/2 -translate-y-1/2 whitespace-nowrap rounded-md bg-foreground px-2.5 py-1 text-xs font-semibold text-background opacity-0 shadow-lg transition-opacity duration-150`,ne=e.is_favorite?`Remove favorite`:`Favorite listing`,re=iM(e.mileage,u),ie=[re?{key:`mileage`,label:re,icon:(0,V.jsx)(nA,{size:12})}:null,e.transmission_type?{key:`transmission`,label:bF(e.transmission_type)??e.transmission_type,icon:(0,V.jsx)(Wk,{size:12})}:null,e.fuel_type?{key:`fuel`,label:yF(e.fuel_type)??e.fuel_type,icon:(0,V.jsx)($k,{size:12})}:null].filter(Boolean),ae=w(e.listed_at),oe=w(e.found_at),se=gF(e,u),ce=e.valuation?.valuation,le=ce===`
36steal`||ce===`good`||ce===`fair`||ce===`overpriced`;return(0,V.jsxs)(ik.div,{layout:n,transition:n?{type:`spring`,stiffness:150,damping:25,mass:.8}:void 0,initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},style:{willChange:`transform, opacity`},role:m?`button`:void 0,tabIndex:m?0:void 0,onClick:m?h:void 0,onKeyDown:m?g:void 0,className:`group relative flex cursor-pointer overflow-hidden rounded-3xl border border-border bg-surface transition-shadow duration-300 hover:shadow-2xl hover:shadow-primary/5 ${T?`flex-col`:`flex-row items-stretch min-h-48`}`,children:[(0,V.jsxs)(`div`,{className:`relative overflow-hidden rounded-xl ${T?`h-56 w-full`:`w-64 shrink-0 self-stretch min-h-0`}`,children:[!_||x===`error`?(0,V.jsx)(`div`,{className:`absolute inset-0 flex items-center justify-center rounded-xl border border-border/10 bg-surface-elevated/60 text-muted-foreground/40`,children:(0,V.jsx)(lA,{size:24,strokeWidth:1.5})}):(0,V.jsxs)(V.Fragment,{children:[x===`loading`&&(0,V.jsxs)(`div`,{className:`absolute inset-0 overflow-hidden rounded-xl bg-surface-hover`,children:[(0,V.jsx)(`div`,{className:`absolute inset-0 bg-gradient-to-br from-surface-hover via-border/30 to-surface-hover`}),(0,V.jsx)(`div`,{className:`absolute -inset-y-full left-[-50%] w-[100%] animate-[pulse_2s_ease-in-out_infinite] bg-gradient-to-r from-transparent via-white/50 dark:via-white/10 to-transparent rotate-12`})]}),(0,V.jsx)(`img`,{ref:C,src:_,alt:``,loading:`lazy`,referrerPolicy:`no-referrer`,onLoad:()=>S(`loaded`),onError:()=>S(`error`),className:`rounded-xl object-cover transition-all duration-700 ${T?`h-full w-full ${x===`loaded`?`opacity-100 scale-100`:`opacity-0 scale-95`}`:`absolute inset-0 h-full w-full ${x===`loaded`?`opacity-100 scale-100`:`opacity-0 scale-95`}`}`},_)]}),!T&&(0,V.jsx)(`div`,{className:`absolute bottom-3 left-3`,children:A?(0,V.jsx)(`img`,{src:A,className:`h-7 w-7 rounded-full border border-white/25 object-cover`,alt:k}):(0,V.jsx)(`span`,{className:`flex h-7 w-7 items-center justify-center rounded-full border border-white/25 bg-black/30 text-[9px] font-black uppercase tracking-wide text-white`,children:j})}),(0,V.jsx)(`div`,{className:`absolute inset-0 rounded-xl bg-gradient-to-t from-black/60 via-trans
36parent to-transparent opacity-0 transition-opacity duration-300 group-hover:opacity-100`}),(0,V.jsxs)(`div`,{className:`absolute left-3 top-3 flex flex-col items-start gap-2`,children:[uF(e.marketplace_status)?(0,V.jsx)(dF,{status:e.marketplace_status,onMedia:!0}):e.is_new?(0,V.jsxs)(`span`,{className:`inline-flex shrink-0 items-center gap-1 rounded-full bg-success px-2.5 py-1 text-[10px] font-black uppercase tracking-wider text-black`,children:[(0,V.jsx)(hj,{size:10}),`New`]}):null,le&&(0,V.jsx)(`span`,{className:`inline-flex shrink-0 rounded-full px-2.5 py-1 text-[10px] font-black tracking-wide ${{steal:`border border-emerald-300/90 bg-emerald-600 text-white shadow-md ring-1 ring-black/25`,good:`border border-sky-200/90 bg-sky-600 text-white shadow-md ring-1 ring-black/25`,fair:`border border-amber-200/90 bg-amber-500 text-black shadow-md ring-1 ring-black/25`,overpriced:`border border-red-300/90 bg-red-600 text-white shadow-md ring-1 ring-black/25`}[ce]}`,children:{steal:`Steal`,good:`Good`,fair:`Fair`,overpriced:`Overpriced`}[ce]})]}),T&&(0,V.jsxs)(V.Fragment,{children:[(0,V.jsxs)(`div`,{className:`group/heart absolute right-3 top-3`,children:[(0,V.jsx)(`button`,{type:`button`,disabled:o,onClick:t=>{t.stopPropagation(),a?.(e.id,e.is_favorite)},className:`flex h-9 w-9 cursor-default items-center justify-center rounded-full bg-black/20 backdrop-blur-md transition-colors hover:bg-black/35 ${e.is_favorite?`text-red-500`:`text-white`} ${o?`opacity-60`:``}`,children:(0,V.jsx)(sA,{size:18,className:`transition-colors ${e.is_favorite?`fill-current`:`fill-transparent`}`})}),(0,V.jsx)(`span`,{className:`pointer-events-none absolute right-11 top-1/2 -translate-y-1/2 whitespace-nowrap rounded-md bg-foreground px-2.5 py-1 text-xs font-semibold text-background opacity-0 shadow-lg transition-opacity duration-150 group-hover/heart:opacity-100`,children:ne})]}),(0,V.jsxs)(`div`,{className:`absolute right-3 top-14 flex flex-col items-center gap-2`,children:[e.url&&(0,V.jsxs)(`div`,{className:`group/provider relative`,children:[(0,V.jsx)(`a`,{href:e.url,target:`_blank`,rel:`noopener noreferrer`,"aria-label":M,onClick:e=>e.stopPropagation(),className:ee,children:(0,V.jsx)(Zk,{size:16})}),(0,V.jsx)(`span`,{className:`${te} group-hover/provider:opacity-100`,children:M})]}),P?(0,V.jsxs)(`div`,{className:`group/resync relative`,children:[(0,V.jsx)(`button`,{type:`button`,"aria-label":N,disabled:F,onClick:t=>{t.stopPropagation(),d(e.id)},className:`${ee} disabled:cursor-not-allowed disabled:opacity-60`,children:F?(0,V.jsx)(_A,{size:16,className:`animate-spin`}):(0,V.jsx)(zA,{size:16})}),(0,V.jsx)(`span`,{className:`${te} group-hover/resync:opacity-100`,children:N})]}):null]}),(0,V.jsx)(`div`,{className:`absolute bottom-3 left-3`,children:A?(0,V.jsx)(`img`,{src:A,className:`h-7 w-7 rounded-full border border-white/25 object-cover`,alt:k}):(0,V.jsx)(`span`,{className:`flex h-7 w-7 items-center justify-center rounded-full border border-white/25 bg-black/30 text-[9px] font-black uppercase tracking-wide text-white`,children:j})})]})]}),(0,V.jsx)(`div`,{className:`flex flex-1 flex-col p-5`,children:T?(0,V.jsxs)(V.Fragment,{children:[se&&(0,V.jsx)(`p`,{className:`line-clamp-1 text-[11px] font-medium tracking-wide text-muted-foreground`,children:se}),(0,V.jsx)(`h3`,{className:`mb-1 line-clamp-1 text-lg font-bold text-foreground transition-colors group-hover:text-primary`,children:e.title||`Untitled Listing`}),(0,V.jsxs)(`div`,{className:`mb-4 flex items-start justify-between gap-3`,children:[(0,V.jsxs)(`span`,{className:`text-2xl font-black text-foreground`,children:[e.currency_symbol||`$`,e.price?.toLocaleString()||`N/A`]}),(0,V.jsxs)(`div`,{className:`flex flex-col items-end text-[11px] font-semibold text-muted-foreground`,children:[ae&&(0,V.jsxs)(`span`,{className:`whitespace-nowrap`,children:[`Listed `,ae]}),oe&&(0,V.jsxs)(`span`,{className:`whitespace-nowrap`,children:[`Found `,oe]}),!ae&&!oe&&(0,V.jsx)(`span`,{children:`Recently`})]})]}),ie.length>0&&(0,V.jsx)(`div`,{className:`flex flex-wrap gap-2`,children:ie.slice(0,3).map(e=>(0,V.jsxs)(`span`,{className:`inline-flex items-center gap-1.5 rounded-full border border-border bg-surface-elevated/60 px-2.5 py-1 text-xs font-semibold text-foreground
36/85`,children:[(0,V.jsx)(`span`,{className:`text-muted-foreground`,children:e.icon}),e.label]},e.key))})]}):(0,V.jsxs)(`div`,{className:`flex w-full items-stretch`,children:[(0,V.jsxs)(`div`,{className:`min-w-0 flex-1 pr-4`,children:[(0,V.jsx)(`div`,{className:`mb-2 flex items-start`,children:(0,V.jsxs)(`div`,{className:`flex min-w-0 flex-col`,children:[se&&(0,V.jsx)(`p`,{className:`mb-1 line-clamp-1 text-[10px] font-medium tracking-wide text-muted-foreground`,children:se}),(0,V.jsx)(`h3`,{className:`mb-1 line-clamp-1 text-lg font-bold text-foreground transition-colors group-hover:text-primary`,children:e.title||`Untitled Listing`}),(0,V.jsx)(`p`,{className:`line-clamp-1 text-[11px] font-semibold text-muted-foreground`,children:[ae?`Listed ${ae}`:null,oe?`Found ${oe}`:null].filter(Boolean).join(` · `)||`Recently`})]})}),(0,V.jsx)(`div`,{className:`mb-4 flex items-baseline gap-1`,children:(0,V.jsxs)(`span`,{className:`text-2xl font-black text-foreground`,children:[e.currency_symbol||`$`,e.price?.toLocaleString()||`N/A`]})}),ie.length>0&&(0,V.jsx)(`div`,{className:`flex flex-wrap gap-2`,children:ie.slice(0,3).map(e=>(0,V.jsxs)(`span`,{className:`inline-flex items-center gap-1.5 rounded-full border border-border bg-surface-elevated/60 px-2.5 py-1 text-xs font-semibold text-foreground/85`,children:[(0,V.jsx)(`span`,{className:`text-muted-foreground`,children:e.icon}),e.label]},e.key))})]}),(0,V.jsx)(`div`,{className:`ml-1 flex w-11 shrink-0 flex-col items-center justify-between self-stretch`,children:(0,V.jsxs)(`div`,{className:`flex flex-col items-center gap-2`,children:[(0,V.jsxs)(`div`,{className:`group/heart relative`,children:[(0,V.jsx)(`button`,{type:`button`,disabled:o,onClick:t=>{t.stopPropagation(),a?.(e.id,e.is_favorite)},className:`flex h-9 w-9 cursor-default items-center justify-center rounded-full border border-border bg-surface-elevated/70 transition-colors hover:bg-surface-elevated ${e.is_favorite?`text-red-500`:`text-muted-foreground`} ${o?`opacity-60`:``}`,"aria-label":ne,children:(0,V.jsx)(sA,{size:18,className:`transition-colors ${e.is_favorite?`fill-current`:`fill-transparent`}`})}),(0,V.jsx)(`span`,{className:`pointer-events-none absolute right-11 top-1/2 -translate-y-1/2 whitespace-nowrap rounded-md bg-foreground px-2.5 py-1 text-xs font-semibold text-background opacity-0 shadow-lg transition-opacity duration-150 group-hover/heart:opacity-100`,children:ne})]}),e.url&&(0,V.jsxs)(`div`,{className:`group/provider relative`,children:[(0,V.jsx)(`a`,{href:e.url,target:`_blank`,rel:`noopener noreferrer`,"aria-label":M,onClick:e=>e.stopPropagation(),className:I,children:(0,V.jsx)(Zk,{size:16})}),(0,V.jsx)(`span`,{className:`${te} group-hover/provider:opacity-100`,children:M})]}),P?(0,V.jsxs)(`div`,{className:`group/resync relative`,children:[(0,V.jsx)(`button`,{type:`button`,"aria-label":N,disabled:F,onClick:t=>{t.stopPropagation(),d(e.id)},className:`${I} disabled:cursor-not-allowed disabled:opacity-60`,children:F?(0,V.jsx)(_A,{size:16,className:`animate-spin`}):(0,V.jsx)(zA,{size:16})}),(0,V.jsx)(`span`,{className:`${te} group-hover/resync:opacity-100`,children:N})]}):null]})})]})})]})},(e,t)=>e.listing.id===t.listing.id&&e.listing.is_new===t.listing.is_new&&e.listing.is_available===t.listing.is_available&&e.listing.marketplace_status===t.listing.marketplace_status&&e.listing.is_favorite===t.listing.is_favorite&&e.listing.can_refresh_from_facebook===t.listing.can_refresh_from_facebook&&e.listing.price===t.listing.price&&e.listing.title===t.listing.title&&e.viewMode===t.viewMode&&e.animateLayout===t.animateLayout&&e.detailPath===t.detailPath&&e.isFavoritePending===t.isFavoritePending&&(e.detailState===t.detailState||JSON.stringify(e.detailState)===JSON.stringify(t.detailState)));function wF({imageUrls:e,imageIndex:t,onIndexChange:n,providerIconSrc:r=null,providerBadgeText:i=`P`,showProviderBadge:a=!1,variant:o=`default`,className:s=``}){let[c,l]=(0,b.useState)(!1),u=(0,b.useRef)(null),d=(0,b.useRef)(null),f=(0,b.useRef)(null),p=e[t]??null,m=e.length>1,h=()=>{n(t<=0?e.length-1:t-1)},g=()=>{n(t>=e.length-1?0:t+1)};return(0,b.useEffect)(()=>
36{if(e.length<=1)return;let r=e=>{if(!(e instanceof HTMLElement))return!1;let t=e.tagName;return t===`INPUT`||t===`TEXTAREA`||t===`SELECT`||e.isContentEditable},i=i=>{r(i.target)||(i.key===`ArrowLeft`?(i.preventDefault(),n(t<=0?e.length-1:t-1)):i.key===`ArrowRight`&&(i.preventDefault(),n(t>=e.length-1?0:t+1)))};return window.addEventListener(`keydown`,i),()=>window.removeEventListener(`keydown`,i)},[e.length,t,n]),(0,b.useEffect)(()=>{d.current&&c&&d.current.scrollIntoView({behavior:`smooth`,block:`nearest`,inline:`center`}),u.current&&!c&&u.current.scrollIntoView({behavior:`smooth`,block:`nearest`,inline:`center`})},[t,c]),(0,b.useEffect)(()=>{if(!c)return;let e=e=>{e.key===`Escape`&&(e.stopPropagation(),l(!1))};return window.addEventListener(`keydown`,e,!0),()=>window.removeEventListener(`keydown`,e,!0)},[c]),(0,b.useEffect)(()=>{c&&f.current?.focus()},[c]),(0,V.jsxs)(V.Fragment,{children:[(0,V.jsxs)(`div`,{className:`${o===`fullBleed`?`relative overflow-hidden -mx-4 -mt-6 sm:-mx-6 md:mx-0 md:mt-0 rounded-none md:rounded-2xl border-b border-border/40 md:border bg-surface-elevated`:`relative overflow-hidden rounded-2xl border border-border/40 bg-surface-elevated`} ${s}`.trim(),children:[(0,V.jsxs)(`div`,{className:`relative aspect-[16/10]`,children:[p?(0,V.jsx)(zD,{mode:`wait`,children:(0,V.jsx)(ik.img,{initial:{opacity:0}
36,animate:{opacity:1},exit:{opacity:0},transition:{duration:.25},src:p,alt:``,className:`h-full w-full object-contain`,referrerPolicy:`no-referrer`},p)}):(0,V.jsx)(`div`,{className:`flex h-full items-center justify-center text-muted-foreground/30`,children:(0,V.jsx)(lA,{size:48,strokeWidth:1})}),m?(0,V.jsxs)(`span`,{className:`absolute right-2 top-2 z-20 inline-flex items-baseline gap-0.5 rounded-full border border-white/20 bg-black/35 px-2 py-0.5 text-[10px] font-medium tabular-nums text-white/95 shadow-sm backdrop-blur-sm sm:right-3 sm:top-3 sm:gap-1 sm:px-2.5 sm:py-1 sm:text-[11px]`,children:[(0,V.jsx)(`span`,{children:t+1}),(0,V.jsx)(`span`,{className:`font-normal text-white/45`,children:`/`}),(0,V.jsx)(`span`,{className:`text-white/85`,children:e.length})]}):null,a?(0,V.jsx)(`div`,{className:`absolute left-2 top-2 z-20 sm:left-3 sm:top-3`,children:r?(0,V.jsx)(`img`,{src:r,className:`h-6 w-6 rounded-full border border-white/20 shadow sm:h-7 sm:w-7`,alt:``}):(0,V.jsx)(`span`,{className:`flex h-6 w-6 items-center justify-center rounded-full bg-black/40 text-[8px] font-bold text-white backdrop-blur sm:h-7 sm:w-7 sm:text-[9px]`,children:i})}):null,m?(0,V.jsxs)(V.Fragment,{children:[(0,V.jsx)(`button`,{type:`button`,"aria-label":`Previous image`,onClick:h,className:`absolute left-1.5 top-1/2 z-10 flex h-8 w-8 -translate-y-1/2 items-center justify-center rounded-full bg-black/40 text-white backdrop-blur-sm transition hover:bg-black/60 active:scale-95 sm:left-2 sm:h-9 sm:w-9`,children:(0,V.jsx)(Lk,{className:`h-[18px] w-[18px] sm:h-5 sm:w-5`,strokeWidth:2.25})}),(0,V.jsx)(`button`,{type:`button`,"aria-label":`Next image`,onClick:g,className:`absolute right-1.5 top-1/2 z-10 flex h-8 w-8 -translate-y-1/2 items-center justify-center rounded-full bg-black/40 text-white backdrop-blur-sm transition hover:bg-black/60 active:scale-95 sm:right-2 sm:h-9 sm:w-9`,children:(0,V.jsx)(Rk,{className:`h-[18px] w-[18px] sm:h-5 sm:w-5`,strokeWidth:2.25})})]}):null,p?(0,V.jsx)(`button`,{type:`button`,onClick:()=>l(!0),"aria-label":`View image full screen`,className:`absolute bottom-2 right-2 z-10 flex h-7 w-7 items-center justify-center rounded-lg bg-black/40 text-white backdrop-blur-sm transition hover:bg-black/60 active:scale-95 sm:bottom-3 sm:right-3 sm:h-8 sm:w-8`,children:(0,V.jsx)(SA,{className:`h-[14px] w-[14px] sm:h-[15px] sm:w-[15px]`,strokeWidth:2.25})}):null]}),m?(0,V.jsx)(`div`,{className:`border-t border-border/30 bg-surface/60 px-2 py-2 sm:px-3 sm:py-2.5`,children:(0,V.jsx)(`div`,{className:`flex gap-1.5 overflow-x-auto pb-0.5 [scrollbar-width:none] [-ms-overflow-style:none] [&::-webkit-scrollbar]:hidden sm:gap-2 sm:pb-0`,children:e.map((e,r)=>(0,V.jsx)(`button`,{ref:r===t?u:null,type:`button`,onClick:()=>n(r),"aria-current":r===t?`true`:void 0,"aria-label":`View image ${r+1}`,className:`relative h-10 w-14 shrink-0 overflow-hidden rounded-md border-2 transition-all sm:h-12 sm:w-16 sm:rounded-lg ${r===t?`border-primary ring-1 ring-primary/30`:`border-transparent opacity-60 hover:opacity-100`}`,children:(0,V.jsx)(`img`,{src:e,alt:``,className:`h-full w-full object-cover`,referrerPolicy:`no-referrer`})},`${e}-${r}`))})}):null]}),c&&p?(0,x.createPortal)((0,V.jsxs)(`div`,{ref:f,role:`dialog`,"aria-modal":`true`,"aria-label":`Full screen image gallery`,tabIndex:-1,className:`fixed inset-0 z-[1100] flex h-[100dvh] max-h-[100dvh] flex-col bg-black/95 backdrop-blur-xl outline-none`,onClick:()=>l(!1),children:[(0,V.jsxs)(`div`,{className:`pointer-events-none absolute left-0 right-0 top-0 z-20 flex items-start justify-between gap-2 px-3 pt-[max(0.75rem,env(safe-area-inset-top))] pr-[max(0.75rem,env(safe-area-inset-right))] pl-[max(0.75rem,env(safe-area-inset-left))] sm:left-4 sm:right-4 sm:top-4 sm:px-0 sm:pt-0 sm:pr-0 sm:pl-0 md:top-3 lg:top-3`,children:[(0,V.jsxs)(`span`,{className:`pointer-events-auto inline-flex items-baseline gap-0.5 rounded-full border border-white/25 bg-black/40 px-2 py-0.5 text-[11px] font-semibold tabular-nums text-white/95 shadow-md backdrop-blur-md sm:gap-1 sm:px-3 sm:py-1 sm:text-xs md:px-3 md:py-1 md:text-sm lg:px-2.5 lg:py-0.5 lg:text-[11px]`,children:[(0,V.jsx)(`span`,{children:t+1}),(0,V.jsx)(`span`,{className:`font-normal text-white/40`,children:`/`}),(0,V.jsx)(`span`,{className:`text-white/85`,children:e.length})]}),(0,V.jsx)(`button`,{type:`button`,onClick:e=>{e.stopPropagation(),l(!1)},className:`pointer-events-auto flex h-11 w-11 shrink-0 items-center justify-center rounded-full border border-white/20 bg-black/50 text-white shadow-md ring-1 ring-white/10 backdrop-blur-md transition-all hover:bg-white/15 active:scale-95 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-white/40 sm:h-11 sm:w-11 sm:rounded-xl md:h-10 md:w-10 md:rounded-full lg:h-9 lg:w-9`,"aria-label":`Close full screen image`,children:(0,V.jsx)(mj,{className:`h-[18px] w-[18px] sm:h-5 sm:w-5 md:h-[18px] md:w-[18px] lg:h-4 lg:w-4`,strokeWidth:2.25})})]}),m?(0,V.jsxs)(V.Fragment,{children:[(0,V.jsx)(`button`,{type:`button`,onClick:e=>{e.stopPropagation(),h()},className:`absolute left-2 top-1/2 z-20 flex h-11 w-11 -translate-y-1/2 items-center justify-center rounded-full border border-white/15 bg-black/45 text-white shadow-lg backdrop-blur-md transition-all hover:bg-white/15 active:scale-95 sm:left-4 sm:h-12 sm:w-12 md:left-6 md:h-12 md:w-12 lg:left-8 lg:h-10 lg:w-10`,"aria-label":`Previous image`,children:(0,V.jsx)(Lk,{className:`h-5 w-5 sm:h-6 sm:w-6 md:h-6 md:w-6 lg:h-5 lg:w-5`,strokeWidth:2.25})}),(0,V.jsx)(`button`,{type:`button`,onClick:e=>{e.stopPropagation(),g()},className:`absolute right-2 top-1/2 z-20 flex h-11 w-11 -translate-y-1/2 items-center justify-center rounded-full border border-white/15 bg-black/45 text-white shadow-lg backdrop-blur-md transition-all hover:bg-white/15 active:scale-95 sm:right-4 sm:h-12 sm:w-12 md:right-6 md:h-12 md:w-12 lg:right-8 lg:h-10 lg:w-10`,"aria-label":`Next image`,children:(0,V.jsx)(Rk,{className:`h-5 w-5 sm:h-6 sm:w-6 md:h-6 md:w-6 lg:h-5 lg:w-5`,strokeWidth:2.25})})]}):null,(0,V.jsx)(`div`,{className:`flex min-h-0 flex-1 items-center justify-center overflow-hidden px-2 pb-[calc(5.25rem+env(safe-area-inset-bottom,0px))] pt-[calc(3.5rem+env(safe-area-inset-top,0px))] sm:px-4 sm:pb-[calc(6.75rem+env(safe-area-inset-bottom,0px))] sm:pt-[calc(4.25rem+env(safe-area-inset-top,0px))] md:px-6 md:pb-[calc(7.25rem+env(safe-area-inset-bottom,0px))] md:pt-[4.75rem] lg:pb-[calc(7.75rem+env(safe-area-inset-bottom,0px))] lg:pt-16`,onClick:e=>e.stopPropagation(),children:(0,V.jsx)(zD,{mode:`wait`,children:(0,V.jsx)(ik.img,{initial:{opacity:0,scale:.97,filter:`blur(4px)`}
36,animate:{opacity:1,scale:1,filter:`blur(0px)`},exit:{opacity:0,scale:.97,filter:`blur(4px)`},transition:{duration:.25,ease:`easeOut`},src:p,alt:``,className:`max-h-full max-w-full touch-pan-y object-contain drop-shadow-[0_20px_50px_rgba(0,0,0,0.5)] cursor-grab active:cursor-grabbing`,referrerPolicy:`no-referrer`,onClick:e=>e.stopPropagation(),drag:`x`,dragConstraints:{left:0,right:0},dragElastic:.7,onDragEnd:(e,t)=>{t.offset.x>50||t.velocity.x>500?h():(t.offset.x<-50||t.velocity.x<-500)&&g()}},p)})}),m?(0,V.jsx)(`div`,{className:`absolute bottom-0 left-0 right-0 z-20 bg-gradient-to-t from-black via-black/80 to-transparent pb-[max(0.5rem,env(safe-area-inset-bottom))] pt-2 sm:pt-2.5 md:pt-2 lg:pt-1.5`,onClick:e=>e.stopPropagation(),children:(0,V.jsx)(`div`,{className:`mx-auto flex w-full max-w-3xl snap-x snap-mandatory gap-2 overflow-x-auto px-2 py-1 [scrollbar-width:none] [-ms-overflow-style:none] [&::-webkit-scrollbar]:hidden sm:max-w-4xl sm:gap-2 sm:px-3 sm:py-1.5 md:max-w-5xl md:gap-2.5 md:px-4 md:py-1 lg:max-w-5xl lg:gap-3 lg:py-1`,children:e.map((e,r)=>(0,V.jsx)(`button`,{ref:r===t?d:null,type:`button`,onClick:()=>n(r),"aria-current":r===t?`true`:void 0,"aria-label":`View image ${r+1}`,className:`relative h-12 w-[4.25rem] shrink-0 snap-center overflow-hidden rounded-md border-2 transition-all duration-200 sm:h-12 sm:w-20 sm:rounded-lg md:h-14 md:w-24 md:rounded-lg lg:h-16 lg:w-28 ${r===t?`z-10 scale-[1.02] border-primary opacity-100 shadow-lg shadow-primary/30 ring-2 ring-primary/50 sm:scale-[1.03] md:ring-[3px]`:`border-transparent opacity-45 hover:opacity-90 active:opacity-100`}`,children:(0,V.jsx)(`img`,{src:e,alt:``,className:`h-full w-full object-cover`,referrerPolicy:`no-referrer`})},`fs-${e}-${r}`))})}):null]}),document.body):null]})}function TF(e){return!!(e?.fromListingOverlay??e?.fromFeedOverlay)}function vce(e){return`/dashboard/personal/${e}`}var EF=`/dashboard/chats`,DF=`search`;function yce(e){return e.get(`search`)?.trim()||null}function OF(e,t){let n=e?`${EF}/${e}`:EF,r=t?.searchFilterId?.trim();return r?`${n}?${new URLSearchParams({[DF]:r}).toString()}`:n}function bce(e,t){return`${EF}/${e}?${new URLSearchParams({listing:t}).toString()}`}function xce(e){return e?Ko(e)===`available`:!1}function kF(e){if(!e)return`Never`;let t=new Date(e);return Number.isNaN(t.getTime())?`N/A`:t.toLocaleString(void 0,{month:`short`,day:`numeric`,year:`numeric`,hour:`numeric`,minute:`2-digit`})}function Sce(e){return qo(e)}var Cce=/^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i;function AF(e){if(!e)return``;let t=document.createElement(`textarea`);return t.innerHTML=e,t.value}function wce(e,t){if(!t)return e(`listingOverlay.phone`);let n=t.toLowerCase();if(n===`phonenumber`||n===`dealerphone`||n===`dealer_phone`)return e(`listingOverlay.primaryPhone`);if(n===`textconnectphone`||n===`dealer_text_connect_phone`)return e(`listingOverlay.textSms`);let r=n.match(/^description_phone_(\d+)$/);return r?e(`listingOverlay.fromDescription`,{count:r[1]}):t.replace(/([a-z])([A-Z])/g,`$1 $2`).replace(/_/g,` `).split(` `).map(e=>e.charAt(0).toUpperCase()+e.slice(1).toLowerCase()).join(` `)}var jF={facebook:`Facebook`,ebay:`eBay`,kijiji:`Kijiji`,autotrader:`AutoTrader`};function Tce(e,t){return t?.trim()?e(`listingOverlay.viewOnProvider`,{provider:jF[t.toLowerCase()]??t.replace(/_/g,` `).replace(/\b\w/g,e=>e.toUpperCase())}):e(`listingOverlay.viewListing`)}function Ece(e,t){if(t instanceof ho){if(t.status===403&&t.details?.error===`chatting_not_available`)return typeof t.details.message==`string`&&t.details.message||e(`errors.chattingNotAvailable`);if(t.details?.error===`listing_not_available_for_chat`)return typeof t.details.message==`string`&&t.details.message||e(`errors.messagingNotAvailableListing`);if(t.status===404)return e(`listingOverlay.listingNotFoundChat`);if(t.status===401)return e(`errors.signInAgain`);if(t.status>=500)return e(`listingOverlay.chatUnavailable`);if(typeof t.details?.message==`string`)return t.details.message}return e(`listingOverlay.chatStartFailed`)}var Dce={facebook:_N,ebay:cF,kijiji:vN,autotrader:gN};function Oce(e,t){if(!t)return{label:e(`listingOverlay.provider`),iconSrc:null,badgeText:`P`};let n=t.toLowerCase();return{label:jF[n]??e(`listingOverlay.provider`),iconSrc:Dce[n]??null,badgeText:n===`kijiji`?`K`:n===`autotrader`?`AT`:`P`}}function kce({listingId:e,onRequestClose:t,backLabel:n,buildDetailPath:r,onListingOpen:i,onListingRefreshed:a,similarListingDetailState:o}){let s=my(),c=n??s(`listingOverlay.back`),{unit:l}=oM(),u=or(),{showToast:d}=Gx(),{canAccessChatFeatures:f}=Rj(),[p,m]=(0,b.useState)(null),[h,g]=(0,b.useState)(``),[_,v]=(0,b.useState)(!0),[y,S]=(0,b.useState)([]),[C,w]=(0,b.useState)(`idle`),[T,E]=(0,b.useState)(!1),[D,O]=(0,b.useState)(0),[k,A]=(0,b.useState)(!1),[j,M]=(0,b.useState)(!1),[N,P]=(0,b.useState)(!1),{refresh:F,isRefreshing:ee}=lF({onRefreshed:e=>{a?.(e),m(t=>
36t&&{...t,...qo({...t,...e,id:t.id}),is_new:t.is_new,valuation:e.valuation??t.valuation??null}),S(t=>t.map(t=>t.id===e.id?{...t,...e}:t))}}),I=(0,b.useRef)(null),te=(0,b.useRef)(!1),ne=(0,b.useRef)(new Set),re=Cce.test(e),{iconSrc:ie,badgeText:ae}=(0,b.useMemo)(()=>Oce(s,p?.provider),[p?.provider,s]),oe=(0,b.useMemo)(()=>p?gF({location_label:p.location_label??null,city_distance:p.city_distance??null,radius:p.radius??null},l):null,[p,l]),se=(0,b.useMemo)(()=>p?Ko(p):`available`,[p]),ce=(0,b.useMemo)(()=>p?(p.provider??``).trim().toLowerCase()===`facebook`&&!!p.can_refresh_from_facebook:!1,[p]),le=ee(e),ue=(0,b.useMemo)(()=>p?(p.provider??``).trim().toLowerCase()===`facebook`&&f&&xce(p):!1,[f,p]),de=(0,b.useCallback)(async()=>{if(!(!p||j)){M(!0);try{u(OF((await Wo(p.id)).id))}catch(e){d({type:`error`,message:Ece(s,e)})}finally{M(!1)}}},[j,p,u,d,s]),fe=(0,b.useCallback)(async()=>{if(!(!p||N)){P(!0);try{let{url:e,expires_at:t}=await Yo(p.id);await navigator.clipboard.writeText(e);let n=new Date(t),r=Number.isNaN(n.getTime())?s(`listingOverlay.shareCopied`):s(`listingOverlay.shareCopiedExpires`,{date:n.toLocaleDateString(void 0,{month:`short`,day:`numeric`,year:`numeric`})});d({type:`success`,message:s(`listingOverlay.linkCopied`),description:r})}catch(e){d({type:`error`,message:Xo(e)})}finally{P(!1)}}},[p,N,d,s]);(0,b.useEffect)(()=>{let e=document.body.style.overflow;return document.body.style.overflow=`hidden`,()=>{document.body.style.overflow=e}},[]),(0,b.useEffect)(()=>{let e=e=>{e.key===`Escape`&&t()};return window.addEventListener(`keydown`,e),()=>window.removeEventListener(`keydown`,e)},[t]),(0,b.useEffect)(()=>{te.current=!1;let t=!1;return queueMicrotask(()=>{t||(re&&i?.(e),S([]),w(`idle`),O(0),A(!1))}),()=>{t=!0}},[e,re,i]),(0,b.useEffect)(()=>{if(!re){let e=!1;return queueMicrotask(()=>{e||(v(!1),g(s(`listingOverlay.invalidListingId`)),m(null))}),()=>{e=!0}}let t=!1;return queueMicrotask(()=>{t||(v(!0),g(``),m(null),(async()=>{try{let n=await Lo.get(`/api/listings/${e}`);if(t)return;m(n.data)}catch(e){if(t)return;e instanceof ho&&e.status===404?g(s(`listingOverlay.notFound`)):e instanceof ho&&e.status===403?g(s(`feed.subscriptionRequired`)):g(s(`listingOverlay.couldNotLoad`))}finally{t||v(!1)}})())}),()=>{t=!0}},[e,s,re]);let L=(0,b.useCallback)(async()=>{if(re){w(`loading`);try{S(((await Lo.get(`/api/listings/${e}/similar`,{query:{limit:12}})).data??[]).map(Sce)),w(`loaded`)}catch{w(`error`)}}},[e,re]);(0,b.useEffect)(()=>{if(!p)return;let e=I.current;if(!e||te.current)return;let t=new IntersectionObserver(e=>{!e[0]?.isIntersecting||te.current||(te.current=!0,L())},{root:null,rootMargin:`160px 0px`,threshold:0});return t.observe(e),()=>t.disconnect()},[L,p]);let pe=(0,b.useCallback)(async(e,t)=>{if(ne.current.has(e))return;let n=!t;ne.current.add(e),E(!0),m(e=>e&&{...e,is_favorite:n});try{let t=await Lo.put(`/api/favorites/${e}`,{is_favorite:n});m(e=>e&&{...e,is_favorite:t.data.is_favorite})}catch{m(e=>e&&{...e,is_favorite:t})}finally{ne.current.delete(e),E(!1)}},[]),me=(0,b.useCallback)(async(e,t)=>{if(ne.current.has(e))return;let n=!t;ne.current.add(e),S(t=>t.map(t=>t.id===e?{...t,is_favorite:n}:t));try{let t=await Lo.put(`/api/favorites/${e}`,{is_favorite:n});S(n=>n.map(n=>n.id===e?{...n,is_favorite:t.data.is_favorite}:n))}catch{S(n=>n.map(n=>n.id===e?{...n,is_favorite:t}:n))}finally{ne.current.delete(e)}},[]),he=(0,b.useMemo)(()=>p?mF(p.images):[],[p]);return(0,x.createPortal)((0,V.jsx)(V.Fragment,{children:(0,V.jsxs)(`div`,{className:`fixed inset-0 z-[1000] flex flex-col bg-background selection:bg-primary/30`,children:[(0,V.jsx)(`header`,{className:`sticky top-0 z-50 border-b border-border/30 bg-background/80 backdrop-blur-xl`,children:(0,V.jsxs)(`div`,{className:`mx-auto flex h-14 max-w-[1400px] items-center justify-between gap-3 px-4 sm:px-6 lg:px-8`,children:[(0,V.jsxs)(`button`,{type:`button`,onClick:t,className:`group flex items-center gap-2 text-sm font-semibold text-muted-foreground transition-colors hover:text-foreground`,children:[(0,V.jsx)(bk,{size:16,className:`transition-transform group-hover:-translate-x-0.5`}),(0,V.jsx)(`span`,{className:`hidden sm:inline`,children:c})]}),!_&&p?(0,V.jsxs)(`button`,{type:`button`,onClick:()=>void fe(),disabled:N,"aria-label":s(`listingOverlay.shareListingAria`),className:`inline-flex items-center gap-2 rounded-lg px-2.5 py-1.5 text-sm font-semibold text-muted-foreground transition-colors hover:bg-surface-elevated hover:text-foreground disabled:pointer-events-none disabled:opacity-60 sm:px-3`,children:[N?(0,V.jsx)(_A,{size:16,className:`animate-spin`,"aria-hidden":!0}):(0,V.jsx)(Yae,{size:16,"aria-hidden":!0}),(0,V.jsx)(`span`,{className:`hidden sm:inline`,children:s(`listingOverlay.share`)})]}):(0,V.jsx)(`span`,{className:`w-9 shrink-0 sm:w-[72px]`,"aria-hidden":!0})]})}),(0,V.jsx)(`div`,{className:`flex-1 overflow-y-auto custom-scrollbar`,children:(0,V.jsxs)(`div`,{className:`mx-auto max-w-[1400px] px-4 py-6 sm:px-6 lg:px-8 lg:py-8`,children:[re?_?(0,V.jsxs)(`div`,{className:`grid gap-8 lg:grid-cols-[1fr_380px] xl:gap-10`,children:[(0,V.jsxs)(`div`,{className:`space-y-6 min-w-0`,children:[(0,V.jsx)(`div`,{className:`relative aspect-[16/10] overflow-hidden rounded-2xl bg-surface-elevated`,children:(0,V.jsx)(`div`,{className:`absolute inset-0 bg-gradient-to-r from-transparent via-foreground
36/[0.03] dark:via-white/[0.05] to-transparent animate-shimmer`,style:{backgroundSize:`200% 100%`}})}),(0,V.jsx)(`div`,{className:`grid grid-cols-2 gap-3 sm:grid-cols-4`,children:[1,2,3,4].map(e=>(0,V.jsx)(`div`,{className:`relative h-14 overflow-hidden rounded-xl bg-surface-elevated`,children:(0,V.jsx)(`div`,{className:`absolute inset-0 bg-gradient-to-r from-transparent via-foreground/[0.03] dark:via-white/[0.05] to-transparent animate-shimmer`,style:{backgroundSize:`200% 100%`}})},e))}),(0,V.jsxs)(`div`,{className:`space-y-3 rounded-2xl border border-border/40 bg-surface/30 p-5`,children:[(0,V.jsx)(`div`,{className:`relative h-4 w-24 overflow-hidden rounded bg-surface-elevated`,children:(0,V.jsx)(`div`,{className:`absolute inset-0 bg-gradient-to-r from-transparent via-foreground/[0.03] dark:via-white/[0.05] to-transparent animate-shimmer`})}),(0,V.jsx)(`div`,{className:`relative h-3 w-full overflow-hidden rounded bg-surface-elevated`,children:(0,V.jsx)(`div`,{className:`absolute inset-0 bg-gradient-to-r from-transparent via-foreground/[0.03] dark:via-white/[0.05] to-transparent animate-shimmer`})}),(0,V.jsx)(`div`,{className:`relative h-3 w-4/5 overflow-hidden rounded bg-surface-elevated`,children:(0,V.jsx)(`div`,{className:`absolute inset-0 bg-gradient-to-r from-transparent via-foreground/[0.03] dark:via-white/[0.05] to-transparent animate-shimmer`})})]})]}),(0,V.jsx)(`div`,{className:`space-y-5`,children:(0,V.jsxs)(`div`,{className:`space-y-4 rounded-2xl border border-border/50 bg-surface/50 p-5`,children:[(0,V.jsx)(`div`,{className:`relative h-5 w-3/4 overflow-hidden rounded bg-surface-elevated`,children:(0,V.jsx)(`div`,{className:`absolute inset-0 bg-gradient-to-r from-transparent via-foreground/[0.03] dark:via-white/[0.05] to-transparent animate-shimmer`})}),(0,V.jsx)(`div`,{className:`relative h-4 w-1/2 overflow-hidden rounded bg-surface-elevated`,children:(0,V.jsx)(`div`,{className:`absolute inset-0 bg-gradient-to-r from-transparent via-foreground/[0.03] dark:via-white/[0.05] to-transparent animate-shimmer`})}),(0,V.jsx)(`div`,{className:`relative h-9 w-2/3 overflow-hidden rounded-lg bg-surface-elevated`,children:(0,V.jsx)(`div`,{className:`absolute inset-0 bg-gradient-to-r from-transparent via-foreground/[0.03] dark:via-white/[0.05] to-transparent animate-shimmer`})}),(0,V.jsx)(`div`,{className:`relative h-11 w-full overflow-hidden rounded-xl bg-surface-elevated`,children:(0,V.jsx)(`div`,{className:`absolute inset-0 bg-gradient-to-r from-transparent via-foreground/[0.03] dark:via-white/[0.05] to-transparent animate-shimmer`})}),(0,V.jsx)(`div`,{className:`relative h-11 w-full overflow-hidden rounded-xl bg-surface-elevated`,children:(0,V.jsx)(`div`,{className:`absolute inset-0 bg-gradient-to-r from-transparent via-foreground/[0.03] dark:via-white/[0.05] to-transparent animate-shimmer`})})]})})]}):h||!p?(0,V.jsxs)(`div`,{className:`flex min-h-[50vh] flex-col items-center justify-center text-center`,children:[(0,V.jsx)(`div`,{className:`mb-4 rounded-2xl bg-surface-elevated p-4 text-muted-foreground/50`,children:(0,V.jsx)(lA,{size:32})}),(0,V.jsx)(`h2`,{className:`text-xl font-black text-foreground sm:text-2xl`,children:h||s(`listingOverlay.notFound`)}),(0,V.jsx)(`p`,{className:`mt-2 text-sm text-muted-foreground sm:text-base`,children:s(`listingOverlay.mightBeRemoved`)}),(0,V.jsx)(`button`,{onClick:t,className:`mt-6 rounded-xl bg-surface-elevated px-6 py-2.5 text-sm font-bold text-foreground transition-all hover:bg-border sm:px-8`,children:s(`listingOverlay.goBack`)})]}):(0,V.jsx)(ik.div,{initial:{opacity:0,y:12},animate:{opacity:1,y:0},transition:{duration:.2,ease:`easeOut`},style:{willChange:`transform, opacity`},children:(0,V.jsxs)(`div`,{className:`flex flex-col gap-6 lg:grid lg:grid-cols-[1fr_380px] lg:gap-x-8 lg:gap-y-6 xl:gap-x-10`,children:[(0,V.jsx)(wF,{className:`order-1 lg:col-start-1 min-w-0`,imageUrls:he,imageIndex:D,onIndexChange:O,providerIconSrc:ie,providerBadgeText:ae,showProviderBadge:!!p.provider,variant:`fullBleed`}),(0,V.jsxs)(`div`,{className:`order-2 lg:col-start-1 min-w-0 lg:hidden`,children:[uF(se)?(0,V.jsx)(`div`,{className:`mb-2 flex justify-start`,children:(0,V.jsx)(dF,{status:se})}):null,(0,V.jsx)(`h1`,{className:`text-2xl font-bold leading-tight text-foreground sm:text-3xl`,children:AF(p.title??null)||s(`common.untitledListing`)}),oe&&(0,V.jsxs)(`div`,{className:`mt-1.5 flex items-center gap-1.5 text-sm text-muted-foreground`,children:[(0,V.jsx)(xA,{size:14,className:`shrink-0 text-primary`}),oe]}),(0,V.jsxs)(`div`,{className:`mt-3 text-3xl font-extrabold tracking-tight text-foreground`,children:[p.currency_symbol||`$`,p.price?.toLocaleStr
36ing()??`â`]})]}),(0,V.jsxs)(`div`,{className:`order-4 lg:col-start-1 min-w-0 rounded-2xl border border-border/40 bg-surface/30 p-5 sm:p-6`,children:[(0,V.jsx)(`h2`,{className:`mb-4 text-xs font-bold uppercase tracking-wider text-muted-foreground`,children:s(`listingOverlay.specifications`)}),(0,V.jsx)(`div`,{className:`grid grid-cols-2 gap-3 sm:grid-cols-4`,children:[{icon:Mk,label:s(`listingOverlay.year`),value:p.year?.toString()},{icon:nA,label:s(`listingOverlay.mileage`),value:iM(p.mileage,l)},{icon:Wk,label:s(`listingOverlay.transmission`),value:bF(p.transmission_type)},{icon:$k,label:s(`listingOverlay.fuel`),value:yF(p.fuel_type)},{icon:jA,label:s(`listingOverlay.exterior`),value:SF(p.exterior_color)},{icon:jA,label:s(`listingOverlay.interior`),value:SF(p.interior_color)},{icon:JA,label:s(`listingOverlay.condition`),value:xF(p.condition)}].filter(e=>e.value).map(e=>(0,V.jsxs)(`div`,{className:`flex items-center gap-2.5 rounded-xl border border-border/40 bg-surface/50 px-3 py-2.5`,children:[(0,V.jsx)(e.icon,{size:16,className:`shrink-0 text-primary/70`}),(0,V.jsxs)(`div`,{className:`min-w-0`,children:[(0,V.jsx)(`div`,{className:`text-[10px] font-semibold uppercase tracking-wider text-muted-foreground/60`,children:e.label}),(0,V.jsx)(`div`,{className:`truncate text-sm font-semibold text-foreground`,children:e.value})]})]},e.label))})]}),p.valuation?.valuation&&(0,V.jsxs)(`div`,{className:`order-5 lg:col-start-1 min-w-0 relative overflow-hidden rounded-2xl border border-primary/20 bg-primary/5 p-5 sm:p-7`,children:[(0,V.jsx)(`div`,{className:`absolute top-0 right-0 p-32 bg-primary/10 blur-[80px] rounded-full -z-10 pointer-events-none`}),(0,V.jsxs)(`div`,{className:`flex items-center justify-between mb-5`,children:[(0,V.jsxs)(`div`,{className:`flex items-center gap-2 text-xs font-bold uppercase tracking-wider text-primary`,children:[(0,V.jsx)(Jk,{size:16}),s(`listingOverlay.aiMarketAnalysis`)]}),(0,V.jsx)(`span`,{className:`rounded-lg px-2.5 py-1 text-xs font-bold ${p.valuation.valuation===`steal`?`bg-emerald-500/15 text-emerald-500`:p.valuation.valuation===`good`?`bg-sky-500/15 text-sky-500`:p.valuation.valuation===`fair`?`bg-amber-500/15 text-amber-500`:p.valuation.valuation===`overpriced`?`bg-red-500/15 text-red-500`:`bg-surface-elevated text-muted-foreground`}`,children:_ce(p.valuation.valuation)})]}),(0,V.jsxs)(`div`,{className:`grid gap-6 sm:grid-cols-[1fr_auto]`,children:[(0,V.jsxs)(`div`,{children:[(0,V.jsx)(`div`,{className:`text-[10px] font-semibold uppercase tracking-wider text-muted-foreground/60 mb-1`,children:s(`listingOverlay.estimatedMarketValue`)}),(0,V.jsxs)(`div`,{className:`text-4xl font-black text-foreground tracking-tight`,children:[p.currency_symbol||`$`,p.valuation.median_price?.toLocaleString()||`â`]}),p.valuation.reason&&(0,V.jsx)(`p`,{className:`mt-3 text-sm leading-relaxed text-muted-foreground/80`,children:p.valuation.reason})]}),(0,V.jsxs)(`div`,{className:`flex flex-col gap-4 justify-center border-t sm:border-t-0 sm:border-l border-border/30 pt-4 sm:pt-0 sm:pl-6 min-w-[150px]`,children:[(0,V.jsxs)(`div`,{children:[(0,V.jsx)(`div`,{className:`text-[10px] font-semibold uppercase tracking-wider text-muted-foreground/60`,children:s(`listingOverlay.comparables`)}),(0,V.jsxs)(`div`,{className:`text-lg font-bold text-foreground flex items-center gap-1.5`,children:[(0,V.jsx)(hk,{size:16,className:`text-primary/70`}),s(`listingOverlay.foundCount`,{count:p.valuation.comparables_count||`0`})]})]}),(p.valuation.price_25th_percentile||p.valuation.price_75th_percentile)&&(0,V.jsxs)(`div`,{children:[(0,V.jsx)(`div`,{className:`text-[10px] font-semibold uppercase tracking-wider text-muted-foreground/60`,children:s(`listingOverlay.marketRange`)}),(0,V.jsxs)(`div`,{className:`text-sm font-medium text-foreground flex items-center gap-1.5`,children:[(0,V.jsx)(sj,{size:14,className:`text-muted-foreground/60`}),p.valuation.price_25th_percentile?`${p.currency_symbol||`$`}${p.valuation.price_25th_percentile.toLocaleString()}`:`â`,` `,`-`,` `,p.valuation.price_75th_percentile?`${p.currency_symbol||`$`}
36${p.valuation.price_75th_percentile.toLocaleString()}`:`â`]})]})]})]})]}),p.description&&(0,V.jsxs)(`div`,{className:`order-6 lg:col-start-1 min-w-0 rounded-2xl border border-border/40 bg-surface/30 p-5 sm:p-6`,children:[(0,V.jsx)(`h2`,{className:`mb-3 text-xs font-bold uppercase tracking-wider text-muted-foreground`,children:s(`listingOverlay.description`)}),(0,V.jsx)(`p`,{className:`whitespace-pre-wrap text-sm leading-relaxed text-muted-foreground/90 transition-all duration-300 ${k?``:`line-clamp-5`}`,children:AF(p.description)}),p.description.length>300&&(0,V.jsx)(`button`,{onClick:()=>A(!k),className:`mt-3 flex items-center gap-1.5 text-xs font-semibold text-primary transition-colors hover:text-primary-hover`,children:k?(0,V.jsxs)(V.Fragment,{children:[(0,V.jsx)(zk,{size:14}),s(`listingOverlay.showLess`)]}):(0,V.jsxs)(V.Fragment,{children:[(0,V.jsx)(Ik,{size:14}),s(`listingOverlay.showMore`)]})})]}),(0,V.jsxs)(`div`,{className:`order-3 lg:col-start-2 lg:row-start-1 lg:row-span-6 space-y-5 lg:sticky lg:top-6 lg:self-start w-full min-w-0`,children:[(0,V.jsxs)(`div`,{className:`rounded-2xl border border-border/50 bg-surface/50 p-5 backdrop-blur-sm`,children:[(0,V.jsxs)(`div`,{className:`hidden lg:block`,children:[uF(se)?(0,V.jsx)(`div`,{className:`mb-2 flex justify-start`,children:(0,V.jsx)(dF,{status:se})}):null,(0,V.jsx)(`h1`,{className:`text-xl font-bold leading-snug text-foreground sm:text-2xl`,children:AF(p.title??null)||s(`common.untitledListing`)}),oe&&(0,V.jsxs)(`div`,{className:`mt-1.5 flex items-center gap-1.5 text-sm text-muted-foreground`,children:[(0,V.jsx)(xA,{size:14,className:`shrink-0 text-primary`}),oe]})]}),(0,V.jsx)(`div`,{className:`mt-4 hidden lg:block`,children:(0,V.jsxs)(`span`,{className:`text-3xl font-extrabold tracking-tight text-foreground`,children:[p.currency_symbol||`$`,p.price?.toLocaleString()??`â`]})}),(0,V.jsxs)(`div`,{className:`mt-5 space-y-2.5`,children:[(0,V.jsxs)(`button`,{type:`button`,disabled:T,onClick:()=>void pe(p.id,p.is_favorite),className:`flex w-full h-11 items-center justify-center gap-2 rounded-xl text-sm font-semibold transition-all active:scale-[0.98] ${p.is_favorite?`bg-red-500/10 text-red-500 hover:bg-red-500/15`:`border border-border/50 bg-surface-elevated/50 text-foreground hover:bg-surface-hover`}`,children:[(0,V.jsx)(sA,{size:16,className:p.is_favorite?`fill-current`:``}),p.is_favorite?s(`listingOverlay.saved`):s(`listingOverlay.saveListing`)]}),ue?(0,V.jsx)(`button`,{type:`button`,disabled:j,onClick:()=>void de(),className:`flex h-11 w-full items-center justify-center gap-2 rounded-xl border border-primary/30 bg-primary/10 px-4 text-sm font-semibold text-primary transition-all hover:bg-primary/15 active:scale-[0.98] disabled:cursor-not-allowed disabled:opacity-60`,children:j?(0,V.jsxs)(V.Fragment,{children:[(0,V.jsx)(_A,{size:16,className:`animate-spin`}),s(`listingOverlay.openingChat`)]}):(0,V.jsxs)(V.Fragment,{children:[(0,V.jsx)(zae,{size:16}),s(`listingOverlay.chatWithSeller`)]})}):null,p.url?(0,V.jsxs)(`a`,{href:p.url,target:`_blank`,rel:`noopener noreferrer`,className:`flex h-11 w-full items-center justify-center gap-2 rounded-xl bg-primary px-4 text-sm font-semibold text-primary-foreground transition-all hover:bg-primary-hover active:scale-[0.98]`,children:[(0,V.jsx)(Zk,{size:16}),Tce(s,p.provider)]}):(0,V.jsx)(`div`,{className:`flex h-11 w-full items-center justify-center rounded-xl bg-surface-elevated text-sm text-muted-foreground`,children:s(`listingOverlay.linkUnavailable`)}),ce?(0,V.jsxs)(`button`,{type:`button`,disabled:le,onClick:()=>void F(e),"aria-label":s(`listingOverlay.resyncListingAria`),className:`flex h-11 w-full items-center justify-center gap-2 rounded-xl border border-border/50 bg-surface-elevated/50 text-sm font-semibold text-foreground transition-all hover:bg-surface-hover active:scale-[0.98] disabled:cursor-not-allowed disabled:opacity-60`,children:[le?(0,V.jsx)(_A,{size:16,className:`animate-spin`}):(0,V.jsx)(zA,{size:16}),s(`listingOverlay.resync`)]}):null]})]}),(0,V.jsxs)(`div`,{className:`rounded-2xl border border-border/40 bg-surface/30 p-5`,children:[p.seller_type&&(0,V.jsxs)(`div`,{className:`flex items-center gap-3`,children:[(0,V.jsx)(`div`,{className:`flex h-9 w-9 items-center justify-center rounded-full bg-surface-elevated text-primary`,children:(0,V.jsx)(dj,{size:18})}),(0,V.jsxs)(`div`,{children:[(0,V.jsx)(`div`,{className:`text-[10px] font-semibold uppercase tracking-wider text-muted-foreground
36/60`,children:s(`listingOverlay.seller`)}),(0,V.jsx)(`div`,{className:`text-sm font-semibold text-foreground`,children:gce(p.seller_type)})]})]}),p.seller_phones&&Object.keys(p.seller_phones).length>0&&(0,V.jsxs)(`div`,{className:`${p.seller_type?`mt-4 border-t border-border/20 pt-4`:``} space-y-2`,children:[(0,V.jsx)(`div`,{className:`mb-2 text-[10px] font-semibold uppercase tracking-wider text-muted-foreground/60`,children:s(`listingOverlay.contactNumbers`)}),Object.entries(p.seller_phones).map(([e,t])=>(0,V.jsxs)(`div`,{className:`flex items-center justify-between rounded-xl bg-surface-elevated/40 px-3 py-2.5 text-sm ring-1 ring-inset ring-border/30 transition-all hover:bg-surface-elevated`,children:[(0,V.jsxs)(`span`,{className:`flex items-center gap-2 font-medium text-muted-foreground/80`,children:[(0,V.jsx)(PA,{size:14,className:`text-primary/70`}),wce(s,e)]}),(0,V.jsx)(`span`,{className:`font-bold tracking-wide text-foreground`,children:t})]},e))]}),(0,V.jsxs)(`div`,{className:`grid grid-cols-2 gap-3 ${p.seller_type||p.seller_phones&&Object.keys(p.seller_phones).length>0?`mt-4 border-t border-border/20 pt-4`:``}`,children:[(0,V.jsxs)(`div`,{children:[(0,V.jsx)(`div`,{className:`text-[10px] font-semibold uppercase tracking-wider text-muted-foreground/50`,children:s(`listingOverlay.listed`)}),(0,V.jsx)(`div`,{className:`mt-0.5 text-sm font-medium text-foreground`,children:kF(p.listed_at??null)})]}),(0,V.jsxs)(`div`,{children:[(0,V.jsx)(`div`,{className:`text-[10px] font-semibold uppercase tracking-wider text-muted-foreground/50`,children:s(`listingOverlay.found`)}),(0,V.jsx)(`div`,{className:`mt-0.5 text-sm font-medium text-foreground`,children:kF(p.found_at??null)})]})]})]})]})]})}):(0,V.jsxs)(`div`,{className:`flex min-h-[50vh] flex-col items-center justify-center text-center`,children:[(0,V.jsx)(`div`,{className:`mb-4 rounded-2xl bg-error/10 p-4 text-error`,children:(0,V.jsx)(mj,{size:32})}),(0,V.jsx)(`h2`,{className:`text-xl font-bold text-foreground`,children:s(`listingOverlay.invalidListing`)}),(0,V.jsx)(`p`,{className:`mt-2 text-sm text-muted-foreground`,children:s(`listingOverlay.brokenLink`)})]}),(0,V.jsxs)(`div`,{ref:I,className:`mt-10 border-t border-border/20 pt-10`,children:[(0,V.jsxs)(`div`,{className:`mb-6`,children:[(0,V.jsx)(`h2`,{className:`text-lg font-bold text-foreground`,children:s(`listingOverlay.similarListings`)}),(0,V.jsx)(`p`,{className:`mt-1 text-sm text-muted-foreground`,children:s(`listingOverlay.similarSubtitle`)})]}),C===`loading`?(0,V.jsx)(`div`,{className:`grid gap-5 sm:grid-cols-2 lg:grid-cols-3`,children:[1,2,3].map(e=>(0,V.jsx)(`div`,{className:`h-56 animate-pulse rounded-2xl bg-surface-elevated/50`},e))}):C===`loaded`&&y.length>0?(0,V.jsx)(`div`,{className:`grid gap-5 sm:grid-cols-2 lg:grid-cols-3`,children:y.map(e=>(0,V.jsx)(CF,{listing:e,viewMode:`grid`,detailPath:r?.(e.id),detailState:o??{fromListingOverlay:!0},onToggleFavorite:me,onListingRefreshed:a,onListingOpen:i},e.id))}):(0,V.jsx)(`div`,{className:`rounded-2xl border border-dashed border-border/50 p-8 text-center text-sm text-muted-foreground`,children:s(`listingOverlay.noSimilar`)})]})]})})]})}),document.body)}function MF({listingId:e,onRequestClose:t,backLabel:n,buildDetailPath:r,onListingOpen:i,onListingRefreshed:a,similarListingDetailState:o,className:s=`z-[500]`}){return(0,V.jsx)(`div`,{className:`fixed inset-0 ${s} transition-all duration-200 ease-[cubic-bezier(0.22,1,0.36,1)] ${e?`pointer-events-auto translate-y-0 opacity-100`:`pointer-events-none translate-y-4 opacity-0`}`,style:{willChange:`transform, opacity`},children:e?(0,V.jsx)(kce,{listingId:e,onRequestClose:t,backLabel:n,buildDetailPath:r,onListingOpen:i,onListingRefreshed:a,similarListingDetailState:o}):null})}function NF({open:e,title:t,description:n,confirmLabel:r=`Confirm`,cancelLabel:i=`Cancel`,variant:a=`neutral`,isBusy:o=!1,stackClassName:s=`z-[100]`,onConfirm:c,onCancel:l}){(0,b.useEffect)(()=>{if(!e||o)return;let t=e=>{e.key===`Escape`&&l()};return window.addEventListener(`keydown`,t),()=>window.removeEventListener(`keydown`,t)},[e,o,l]),(0,b.useEffect)(()=>
36{if(!e)return;let t=document.body.style.overflow;return document.body.style.overflow=`hidden`,()=>{document.body.style.overflow=t}},[e]);let u=a===`danger`;return(0,x.createPortal)((0,V.jsx)(zD,{children:e?(0,V.jsxs)(ik.div,{role:`presentation`,className:`fixed inset-0 flex items-center justify-center p-4 ${s}`,initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:{duration:.18},children:[(0,V.jsx)(`div`,{role:`presentation`,className:`absolute inset-0 cursor-default bg-black/65 backdrop-blur-[2px]`,onClick:()=>!o&&l()}),(0,V.jsxs)(ik.div,{role:`dialog`,"aria-modal":`true`,"aria-labelledby":`confirm-dialog-title`,"aria-describedby":n?`confirm-dialog-desc`:void 0,className:`relative z-[101] w-full max-w-md overflow-hidden rounded-[1.5rem] border border-border/60 bg-surface p-6 shadow-[0_24px_64px_-12px_rgba(0,0,0,0.45)] dark:bg-surface dark:backdrop-blur-xl`,initial:{opacity:0,scale:.96,y:8},animate:{opacity:1,scale:1,y:0},exit:{opacity:0,scale:.96,y:8},transition:{type:`spring`,stiffness:420,damping:32},children:[(0,V.jsx)(`h2`,{id:`confirm-dialog-title`,className:`text-lg font-black tracking-tight text-foreground`,children:t}),n?(0,V.jsx)(`p`,{id:`confirm-dialog-desc`,className:`mt-2 text-sm leading-relaxed text-muted-foreground`,children:n}):null,(0,V.jsxs)(`div`,{className:`mt-6 flex flex-col-reverse gap-2 sm:flex-row sm:justify-end sm:gap-3`,children:[(0,V.jsx)(`button`,{type:`button`,disabled:o,onClick:l,className:`rounded-xl border border-border/70 bg-transparent px-4 py-2.5 text-sm font-bold text-foreground transition-colors hover:bg-muted/30 disabled:opacity-50`,children:i}),(0,V.jsx)(`button`,{type:`button`,disabled:o,onClick:c,className:`rounded-xl px-4 py-2.5 text-sm font-bold transition-opacity disabled:opacity-60 ${u?`bg-error text-white hover:bg-error/90`:`bg-primary text-primary-foreground hover:bg-primary/90`}`,children:r})]})]})]}):null}),document.body)}var PF={max_price:`maxPrice`,starting_price:`startingPrice`,min_price:`minPrice`,message_tone:`messageTone`,custom_instructions:`customInstructions`,availability_id:`availabilityId`,meeting_address_id:`meetingAddressId`,ai_negotiation_enabled:`enabled`};function Ace(e){if(e instanceof ho){let t=e.details?.field,n=typeof e.details?.message==`string`&&e.details.message||e.message;return t&&t in PF?{[PF[t]]:n}:(e.details?.error,{form:n})}return{form:`Failed to save AI settings. Please try again.`}}function jce(e){return e instanceof ho?typeof e.details?.message==`string`&&e.details.message||e.message:`Failed to save AI settings. Please try again.`}function FF(e){let t=e.replace(/[^\d.]/g,``),n=t.indexOf(`.`);return n===-1?t:`${t.slice(0,n)}.${t.slice(n+1).replace(/\./g,``).slice(0,2)}`}function IF(e){let t=e.trim();if(!t)return null;let n=Number.parseFloat(t);return Number.isFinite(n)?n:null}function LF(e){return new Intl.NumberFormat(`en-US`,{style:`currency`,currency:`USD`,maximumFractionDigits:2}).format(e)}function RF({id:e,label:t,value:n,options:r,onChange:i,error:a,disabled:o=!1,required:s=!1,isLoading:c=!1,emptyMessage:l=`No options available.`,settingsHref:u,settingsLinkLabel:d=`Manage in Settings`}){let f=r.find(e=>e.id===n);return(0,V.jsxs)(`div`,{className:`space-y-1.5`,children:[(0,V.jsxs)(`div`,{className:`flex items-center justify-between gap-2`,children:[(0,V.jsxs)(`label`,{htmlFor:e,className:`block text-xs font-bold uppercase tracking-wide ${o?`text-muted-foreground/60`:`text-muted-foreground`}`,children:[t,s?(0,V.jsx)(`span`,{className:`text-primary`,children:` *`}):null]}),u&&!o?(0,V.jsxs)(zi,{to:u,className:`inline-flex items-center gap-1 text-[11px] font-bold text-primary hover:underline`,children:[d,(0,V.jsx)(Zk,{size:11,"aria-hidden":!0})]}):null]}),(0,V.jsxs)(`div`,{className:`relative`,children:[(0,V.jsxs)(`select`,{id:e,disabled:o||c||r.length===0,value:n??``,onChange:e=>i(e.target.value),className:`w-full appearance-none rounded-xl border bg-surface py-2.5 pl-3 pr-10 text-sm font-semibold text-foreground outline-none transition focus-visible:ring-2 disabled:cursor-not-allowed disabled:opacity-50 ${a?`border-error/60 focus-visible:ring-error/30`:`border-border/60 focus-visible:ring-primary/30`} ${f?``:`text-muted-foreground`}`,children:[(0,V.jsx)(`option`,{value:``,disabled:!0,children:c?`Loadingâ¦`:`Select an option`}),r.map(e=>(0,V.jsxs)(`option`,{value:e.id,children:[e.label,e.description?` â ${e.description}`:``]},e.id))]}),(0,V.jsx)(Ik,{size:16,className:`pointer-events-none absolute right-3 top-1/2 -translate-y-1/2 text-muted-foreground`,"aria-hidden":!0}),c?(0,V.jsx)(_A,{size:16,className:`absolute right-9 top-1/2 -translate-y-1/2 animate-spin text-muted-foreground`,"aria-hidden":!0}):null]}),r.length===0&&!c&&!o?(0,V.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:l}):null,a?(0,V.jsx)(`p`,{className:`text-xs font-medium text-error`,role:`alert`,children:a}):null]})}function zF({id:e,label:t,hint:n,value:r,onChange:i,error:a,disabled:o=!1,required:s=!1,placeholder:c=`0`}){return(0,V.jsxs)(`div`,{className:`space-y-1.5`,children:[(0,V.jsxs)(`label`,{htmlFor:e,className:`block text-xs font-bold uppercase tracking-wide ${o?`text-muted-foreground
36/60`:`text-muted-foreground`}`,children:[t,s?(0,V.jsx)(`span`,{className:`text-primary`,children:` *`}):null]}),(0,V.jsxs)(`div`,{className:`relative`,children:[(0,V.jsx)(`span`,{className:`pointer-events-none absolute left-3 top-1/2 -translate-y-1/2 text-sm font-bold ${o?`text-muted-foreground/40`:`text-muted-foreground`}`,"aria-hidden":!0,children:`$`}),(0,V.jsx)(`input`,{id:e,type:`text`,inputMode:`decimal`,autoComplete:`off`,disabled:o,value:r,placeholder:c,onChange:e=>i(FF(e.target.value)),className:`w-full rounded-xl border bg-surface py-2.5 pl-8 pr-3 text-sm font-semibold text-foreground outline-none transition placeholder:font-medium placeholder:text-muted-foreground/50 focus-visible:ring-2 disabled:cursor-not-allowed disabled:opacity-50 ${a?`border-error/60 focus-visible:ring-error/30`:`border-border/60 focus-visible:ring-primary/30`}`})]}),n&&!a?(0,V.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:n}):null,a?(0,V.jsx)(`p`,{className:`text-xs font-medium text-error`,role:`alert`,children:a}):null]})}function BF({id:e,label:t,value:n,onChange:r,disabled:i=!1,placeholder:a=`Add any preferences for tone, timing, or negotiation styleâ¦`,maxLength:o=500}){return(0,V.jsxs)(`div`,{className:`space-y-1.5`,children:[(0,V.jsxs)(`label`,{htmlFor:e,className:`block text-xs font-bold uppercase tracking-wide ${i?`text-muted-foreground/60`:`text-muted-foreground`}`,children:[t,(0,V.jsxs)(`span`,{className:`font-semibold normal-case text-muted-foreground/80`,children:[` `,`(optional)`]})]}),(0,V.jsx)(`textarea`,{id:e,rows:3,maxLength:o,disabled:i,value:n,placeholder:a,onChange:e=>r(e.target.value),className:`w-full resize-none rounded-xl border border-border/60 bg-surface px-3 py-2.5 text-sm text-foreground outline-none transition placeholder:text-muted-foreground/50 focus-visible:ring-2 focus-visible:ring-primary/30 disabled:cursor-not-allowed disabled:opacity-50`}),(0,V.jsxs)(`p`,{className:`text-right text-[10px] font-medium text-muted-foreground`,children:[n.length,`/`,o]})]})}function VF({enabled:e,onChange:t,label:n=`Enable AI negotiation`,description:r=`Let Instasnag negotiate on your behalf in this conversation.`}){return(0,V.jsxs)(`div`,{className:`flex items-center justify-between gap-4 rounded-2xl border border-border/50 bg-surface-elevated/50 px-4 py-4`,children:[(0,V.jsxs)(`div`,{className:`min-w-0`,children:[(0,V.jsx)(`p`,{className:`text-sm font-bold text-foreground`,children:n}),(0,V.jsx)(`p`,{className:`mt-1 text-xs leading-relaxed text-muted-foreground`,children:r})]}),(0,V.jsx)(`button`,{type:`button`,role:`switch`,"aria-checked":e,"aria-label":n,onClick:()=>t(!e),className:`relative inline-flex h-8 w-14 shrink-0 items-center rounded-full transition focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary focus-visible:ring-offset-2 ${e?`bg-primary`:`bg-border`}`,children:(0,V.jsx)(`span`,{className:`inline-block h-6 w-6 transform rounded-full bg-white shadow transition dark:bg-background dark:shadow-black/40 ${e?`translate-x-7`:`translate-x-1`}`})})]})}var Mce=[{value:`professional`,label:`Professional`},{value:`friendly`,label:`Friendly`},{value:`casual`,label:`Casual`},{value:`formal`,label:`Formal`}];function HF({value:e,onChange:t,disabled:n=!1}){return(0,V.jsxs)(`div`,{className:`space-y-2`,children:[(0,V.jsxs)(`p`,{className:`text-xs font-bold uppercase tracking-wide ${n?`text-muted-foreground/60`:`text-muted-foreground`}`,children:[`Message tone`,(0,V.jsxs)(`span`,{className:`font-semibold normal-case text-muted-foreground/80`,children:[` `,`(optional)`]})]}),(0,V.jsx)(`div`,{className:`flex flex-wrap gap-2`,children:Mce.map(r=>{let i=e===r.value;return(0,V.jsx)(`button`,{type:`button`,disabled:n,onClick:()=>t(i?null:r.value),className:`rounded-full border px-3 py-1.5 text-xs font-bold transition focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary/40 disabled:cursor-not-allowed disabled:opacity-50 ${i?`border-primary/50 bg-primary/15 text-primary`:`border-border/60 bg-surface-elevated/40 text-foreground hover:border-primary/25 hover:bg-surface-elevated`}`,children:r.label},r.value)})})]})}function Nce({values:e,errors:t,onChange:n,listingPrice:r,availabilities:i,availabilitiesLoading:a}){let o=!e.enabled,s=r===null?void 0:`Listing price: ${LF(r)}`,c=t=>{n({...e,...t})};return(0,V.jsxs)(`fieldset`,{disabled:!1,className:`flex flex-col gap-5`,children:[(0,V.jsx)(VF,{enabled:e.enabled,onChange:e=>c({enabled:e}),description:`Automatically negotiate price and coordinate meetups with the seller.`}),(0,V.jsxs)(`div`,{className:`flex flex-col gap-5 transition-opacity ${o?`pointer-events-none opacity-45`:``}`,"aria-disabled":o,children:[(0,V.jsxs)(`div`,{className:`grid gap-4 sm:grid-cols-2`,children:[(0,V.jsx)(zF,{id:`ai-buyer-max-price`,label:`Maximum budget`,required:!0,disabled:o,value:e.maxPrice,onChange:e=>c({maxPrice:e}),error:t.maxPrice,hint:s,placeholder:`2500`}),(0,V.jsx)(zF,{id:`ai-buyer-starting-price`,label:`Starting offer`,required:!0,disabled:o,value:e.startingPrice,onChange:e=>c({startingPrice:e}),error:t.startingPrice,placeholder:`2000`})]}),(0,V.jsx)(RF,{id:`ai-buyer-availability`,label:`Availability`,required:!0,disabled:o,isLoading:a,value:e.availabilityId,onChange:e=>c({availabilityId:e}),error:t.availabilityId,options:i.map(e=>({id:e.id,label:e.name,description:e.is_default?`Default`:void 0})),emptyMessage:`Create a weekly availability schedule in Settings to enable AI meetup coordination.`,settingsHref:YN(`availability-times`)}),(0,V.jsx)(HF,{value:e.messageTone,onChange:e=>c({messageTone:e}),disabled:o}),(0,V.jsx)(BF,{id:`ai-buyer-instructions`,label:`Custom instructions`,disabled:o,value:e.customInstru
36ctions,onChange:e=>c({customInstructions:e})})]})]})}function Pce({values:e,errors:t,onChange:n,listingPrice:r,availabilities:i,availabilitiesLoading:a,meetupLocations:o,meetupLocationsLoading:s,toggleDescription:c=`Automatically reply to buyers, negotiate within your floor, and propose meetups.`}){let l=!e.enabled,u=r===null?void 0:`Listing price: ${LF(r)}`,d=t=>{n({...e,...t})};return(0,V.jsxs)(`fieldset`,{disabled:!1,className:`flex flex-col gap-5`,children:[(0,V.jsx)(VF,{enabled:e.enabled,onChange:e=>d({enabled:e}),description:c}),(0,V.jsxs)(`div`,{className:`flex flex-col gap-5 transition-opacity ${l?`pointer-events-none opacity-45`:``}`,"aria-disabled":l,children:[(0,V.jsx)(zF,{id:`ai-seller-min-price`,label:`Minimum price`,required:!0,disabled:l,value:e.minPrice,onChange:e=>d({minPrice:e}),error:t.minPrice,hint:u,placeholder:`3000`}),(0,V.jsx)(RF,{id:`ai-seller-meetup`,label:`Meetup location`,required:!0,disabled:l,isLoading:s,value:e.meetingAddressId,onChange:e=>d({meetingAddressId:e}),error:t.meetingAddressId,options:o.map(e=>({id:e.id,label:e.name,description:e.is_default?`Default`:e.address.length>48?`${e.address.slice(0,48)}â¦`:e.address})),emptyMessage:`Add at least one meetup location in Settings before enabling AI.`,settingsHref:YN(`meetup-locations`)}),(0,V.jsx)(RF,{id:`ai-seller-availability`,label:`Availability`,required:!0,disabled:l,isLoading:a,value:e.availabilityId,onChange:e=>d({availabilityId:e}),error:t.availabilityId,options:i.map(e=>({id:e.id,label:e.name,description:e.is_default?`Default`:void 0})),emptyMessage:`Create a weekly availability schedule in Settings to enable AI meetup coordination.`,settingsHref:YN(`availability-times`)}),(0,V.jsx)(HF,{value:e.messageTone,onChange:e=>d({messageTone:e}),disabled:l}),(0,V.jsx)(BF,{id:`ai-seller-instructions`,label:`Custom instructions`,disabled:l,value:e.customInstructions,onChange:e=>d({customInstructions:e})})]})]})}function UF(e,t){if(t&&e.some(e=>e.id===t))return t;let n=e.find(e=>e.is_default);return n?n.id:e[0]?.id??null}function WF(e,t,n,r){let i=UF(t,e.availabilityId),a=r===`seller`?UF(n,e.meetingAddressId):e.meetingAddressId;return{...e,availabilityId:i,meetingAddressId:a}}var GF={enabled:!1,maxPrice:``,startingPrice:``,minPrice:``,messageTone:null,customInstructions:``,availabilityId:null,meetingAddressId:null},Fce=new Set([`professional`,`friendly`,`casual`,`formal`]);function KF(e){return e==null?``:String(e)}function qF(e){if(e==null)return null;let t=String(e).trim();return t.length>0?t:null}function Ice(e){return typeof e==`string`&&Fce.has(e)?e:null}function Lce(e){let t=e.config??{};return{...GF,enabled:e.enabled??!1,maxPrice:KF(t.max_price),startingPrice:KF(t.starting_price),minPrice:KF(t.min_price),messageTone:Ice(t.message_tone),customInstructions:KF(t.custom_instructions),availabilityId:qF(t.availability_id),meetingAddressId:qF(t.meeting_address_id)}}function JF(e,t,n){if(t===0){n.availabilityId=`Add an availability schedule in Settings before enabling AI.`;return}e.availabilityId?.trim()||(n.availabilityId=`Select an availability schedule.`)}function Rce(e,t,n){if(t===0){n.meetingAddressId=`Add a meetup location in Settings before enabling AI.`;return}e.meetingAddressId?.trim()||(n.meetingAddressId=`Select a meetup location.`)}function zce(e,t){let n={};if(!e.enabled)return n;let r=IF(e.maxPrice),i=IF(e.startingPrice);r===null?n.maxPrice=`Maximum budget is required.`:r<=0&&(n.maxPrice=`Maximum budget must be greater than zero.`),i===null?n.startingPrice=`Starting offer is required.`:i<=0&&(n.startingPrice=`Starting offer must be greater than zero.`),r!==null&&i!==null&&r<=i&&(n.maxPrice=`Maximum budget must be greater than the starting offer.`);let{listingPrice:a}=t;return a!==null&&r!==null&&r>a&&(n.maxPrice=`Maximum budget cannot exceed the listing price.`),a!==null&&i!==null&&i>=a&&(n.startingPrice=`Starting offer must be lower than the listing price.`),JF(e,t.availabilityCount,n),n}function Bce(e,t){let n={};if(!e.enabled)return n;let r=IF(e.minPrice);return r===null?n.minPrice=`Minimum price is required.`:r<=0?n.minPrice=`Minimum price must be greater than zero.`:t.listingPrice!==null&&r>t.listingPrice&&(n.minPrice=`Minimum price cannot exceed the listing price.`),JF(e,t.availabilityCount,n),Rce(e,t.meetupLocationCount,n),n}function YF(e,t,n){return e===`buyer`?zce(t,n):Bce(t,n)}function XF(e){return Object.keys(e).length>0}var ZF={buyer:{title:`AI negotiation`,subtitle:`Buyer settings`},seller:{title:`AI negotiation`,subtitle:`Seller settings`}};function QF({open:e,mode:t,onClose:n,listingPrice:r=null,initialEnabled:i=!1,initialConfig:a,title:o,subtitle:s,sellerToggleDescription:c,onSave:l}){let u=(0,b.useId)(),[d,f]=(0,b.useState)(GF),[p,m]=(0,b.useState)({}),[h,g]=(0,b.useState)(!1),[_,v]=(0,b.useState)(!1),[y,S]=(0,b.useState)(null),[C,w]=(0,b.useState)(null),[T,E]=(0,b.useState)(!1),[D,O]=(0,b.useState)(!1),[k,A]=(0,b.useState)([]),[j,M]=(0,b.useState)([]),N={title:o??ZF[t].title,subtitle:s??ZF[t].subtitle},P=(0,b.useCallback)(async()=>{w(null),E(!0),t===`seller`&&O(!0);try{let e=Is(),n=t===`seller`?Ds():Promise.resolve([]),[r,i]=await Promise.all([e,n]);A(r),M(i),f(e=>WF(e,r,i,t))}catch(e){let n=Hs(e);w((t===`seller`?Ns(e):null)??n),A([]),M([])}finally{E(!1),O(!1)}},[t]);(0,b.useEffect)(()=>
36{if(!e)return;let t=!1;return queueMicrotask(()=>{t||(f(Lce({enabled:i,config:a})),m({}),g(!1),v(!1),S(null),w(null),P())}),()=>{t=!0}},[e,i,a,P]);let F=(0,b.useCallback)(e=>{if(!e.enabled){f(e),m({});return}let n=WF(e,k,j,t);f(n),h&&m(YF(t,n,{listingPrice:r,availabilityCount:k.length,meetupLocationCount:j.length}))},[k,j,t,r,h]),ee=(0,b.useCallback)(()=>{_||n()},[_,n]);(0,b.useEffect)(()=>{if(!e)return;let t=e=>{e.key===`Escape`&&!_&&ee()};return window.addEventListener(`keydown`,t),()=>window.removeEventListener(`keydown`,t)},[e,_,ee]);let I=async()=>{if(_||!l)return;g(!0),S(null);let e=YF(t,d,{listingPrice:r,availabilityCount:k.length,meetupLocationCount:j.length});if(m(e),!XF(e)){v(!0);try{await l(d),ee()}catch(e){let t=Ace(e);XF(t)?(m(t),t.form&&S(t.form)):S(jce(e))}finally{v(!1)}}},te=e=>{if(e.enabled!==d.enabled){F(e);return}f(e),h&&m(YF(t,e,{listingPrice:r,availabilityCount:k.length,meetupLocationCount:j.length}))};return(0,x.createPortal)((0,V.jsx)(zD,{children:e?(0,V.jsxs)(ik.div,{role:`presentation`,className:`fixed inset-0 z-[1200] flex items-end justify-center sm:items-center sm:p-4`,initial:{opacity:0}
36,animate:{opacity:1},exit:{opacity:0},transition:{duration:.18},children:[(0,V.jsx)(`div`,{role:`presentation`,className:`absolute inset-0 cursor-default bg-black/65 backdrop-blur-[2px]`,onClick:()=>!_&&ee()}),(0,V.jsxs)(ik.div,{role:`dialog`,"aria-modal":`true`,"aria-labelledby":u,className:`relative z-[1201] flex max-h-[min(92vh,820px)] w-full max-w-lg flex-col overflow-hidden rounded-t-[1.75rem] border border-border/60 bg-surface shadow-[0_24px_64px_-12px_rgba(0,0,0,0.45)] sm:rounded-[1.5rem]`,initial:{opacity:0,y:24},animate:{opacity:1,y:0},exit:{opacity:0,y:16},transition:{type:`spring`,stiffness:420,damping:34},children:[(0,V.jsxs)(`div`,{className:`flex shrink-0 items-center justify-between gap-3 border-b border-border/40 px-4 py-4 sm:px-6`,children:[(0,V.jsxs)(`div`,{className:`flex min-w-0 items-center gap-3`,children:[(0,V.jsx)(`span`,{className:`flex h-10 w-10 shrink-0 items-center justify-center rounded-xl border border-primary/30 bg-primary/10 text-primary`,children:(0,V.jsx)(ej,{size:18,strokeWidth:2})}),(0,V.jsxs)(`div`,{className:`min-w-0`,children:[(0,V.jsx)(`h2`,{id:u,className:`truncate text-lg font-black tracking-tight text-foreground`,children:N.title}),(0,V.jsx)(`p`,{className:`text-xs font-semibold text-muted-foreground`,children:N.subtitle})]})]}),(0,V.jsx)(`button`,{type:`button`,onClick:ee,disabled:_,className:`flex h-10 w-10 shrink-0 items-center justify-center rounded-full border border-border/60 text-muted-foreground transition-colors hover:bg-surface-elevated hover:text-foreground disabled:opacity-50`,"aria-label":`Close`,children:(0,V.jsx)(mj,{size:18})})]}),(0,V.jsxs)(`div`,{className:`custom-scrollbar min-h-0 flex-1 overflow-y-auto px-4 py-5 sm:px-6`,children:[C?(0,V.jsxs)(`div`,{className:`mb-4 flex items-start gap-2 rounded-xl border border-error/30 bg-error/5 px-3 py-2.5 text-sm text-error`,role:`alert`,children:[(0,V.jsx)(Bk,{size:16,className:`mt-0.5 shrink-0`}),(0,V.jsx)(`span`,{children:C})]}):null,t===`buyer`?(0,V.jsx)(Nce,{values:d,errors:p,onChange:te,listingPrice:r,availabilities:k,availabilitiesLoading:T}):(0,V.jsx)(Pce,{values:d,errors:p,onChange:te,listingPrice:r,availabilities:k,availabilitiesLoading:T,meetupLocations:j,meetupLocationsLoading:D,toggleDescription:c}),p.form&&!y?(0,V.jsx)(`p`,{className:`mt-4 text-sm font-medium text-error`,role:`alert`,children:p.form}):null]}),(0,V.jsxs)(`div`,{className:`flex shrink-0 flex-col gap-2 border-t border-border/40 px-4 py-4 sm:px-6`,children:[y?(0,V.jsx)(`p`,{className:`text-sm font-medium text-error`,role:`alert`,children:y}):null,(0,V.jsxs)(`div`,{className:`flex flex-col-reverse gap-2 sm:flex-row sm:justify-end sm:gap-3`,children:[(0,V.jsx)(`button`,{type:`button`,onClick:ee,disabled:_,className:`rounded-xl border border-border/70 px-4 py-2.5 text-sm font-bold text-foreground transition-colors hover:bg-surface-elevated disabled:opacity-50`,children:`Cancel`}),(0,V.jsx)(`button`,{type:`button`,onClick:()=>void I(),disabled:_||!l||T||t===`seller`&&D,className:`inline-flex items-center justify-center gap-2 rounded-xl bg-primary px-5 py-2.5 text-sm font-bold text-primary-foreground transition-opacity hover:bg-primary-hover disabled:cursor-not-allowed disabled:opacity-60`,children:_?(0,V.jsxs)(V.Fragment,{children:[(0,V.jsx)(_A,{size:16,className:`animate-spin`}),`Savingâ¦`]}):`Save settings`})]})]})]})]}):null}),document.body)}function $F(e,t){let n={enabled:e.enabled};if(!e.enabled)return n;e.messageTone&&(n.message_tone=e.messageTone);let r=e.customInstructions.trim();if(r&&(n.custom_instructions=r),e.availabilityId&&(n.availability_id=e.availabilityId),t===`buyer`){let t=IF(e.maxPrice),r=IF(e.startingPrice);t!==null&&(n.max_price=t),r!==null&&(n.starting_price=r)}else{let t=IF(e.minPrice);t!==null&&(n.min_price=t),e.meetingAddressId&&(n.meeting_address_id=e.meetingAddressId)}return n}function Vce(e){let{enabled:t,min_price:n,message_tone:r,custom_instructions:i,meeting_address_id:a,availability_id:o}=$F(e,`seller`);return{enabled:t,...n===void 0?{}:{min_price:n},...r===void 0?{}:{message_tone:r},...i===void 0?{}:{custom_instructions:i},...a===void 0?{}:{meeting_address_id:a},...o===void 0?{}:{availability_id:o}}}function Hce(e){if(!e?.trim())return null;let t=e.replace(/[^\d.]/g,``);if(!t)return null;let n=Number.parseFloat(t);return Number.isFinite(n)&&n>0?n:null}function Uce({open:e,listing:t,onClose:n,onSaved:r}){let{showToast:i}=Gx(),a=t.price>0?t.price:null,o=(0,b.useCallback)(async e=>{let n=Vce(e);
36r(await Cs(t.id,n)),i({type:`success`,message:e.enabled?`Listing AI defaults saved. New buyer chats will use these settings.`:`AI negotiation turned off for this listing.`})},[t.id,r,i]);return(0,V.jsx)(QF,{open:e,mode:`seller`,onClose:n,listingPrice:a,initialEnabled:t.ai_negotiation_enabled,initialConfig:t.ai_negotiation_config,title:`AI negotiation`,subtitle:`Listing defaults`,sellerToggleDescription:`Apply these defaults to new buyer conversations on this listing. Existing chats keep their own settings unless updated.`,onSave:o})}var Wce=[`available`,`sold`,`unavailable`],Gce={available:`border border-emerald-300/90 bg-emerald-600 text-white shadow-md ring-1 ring-black/25`,sold:`border border-indigo-300/90 bg-indigo-600 text-white shadow-md ring-1 ring-black/25`,unavailable:`border border-amber-200/90 bg-amber-500 text-black shadow-md ring-1 ring-black/25`};function eI(e){return e.charAt(0).toUpperCase()+e.slice(1)}function tI(e){return Gce[e]??`border border-border/50 bg-surface-elevated text-foreground`}function Kce(e){return{primary:`This only updates the listing status in InstaSnag.`,repostWarning:e?`Automated repost is still on. Your listing will keep being posted to Facebook until you turn repost off manually.`:null}}function qce({open:e,listing:t,onClose:n,onSuccess:r}){let i=(0,b.useId)(),[a,o]=(0,b.useState)(`available`),[s,c]=(0,b.useState)(null),[l,u]=(0,b.useState)(!1);(0,b.useEffect)(()=>{if(!e||!t)return;let n=!1;return queueMicrotask(()=>{n||(o(t.status),c(null),u(!1))}),()=>{n=!0}},[e,t]);let d=(0,b.useCallback)(()=>{l||(c(null),n())},[l,n]);(0,b.useEffect)(()=>{if(!e)return;let t=e=>{e.key===`Escape`&&!l&&d()};return window.addEventListener(`keydown`,t),()=>window.removeEventListener(`keydown`,t)},[e,l,d]);let f=async()=>{if(!(!t||l)){if(a===t.status){d();return}u(!0),c(null);try{r(await Ss(t.id,a)),d()}catch(e){c(Ts(e))}finally{u(!1)}}};if(!t)return null;let p=Kce(!!t.repost_summary?.repost?.enabled);return(0,x.createPortal)((0,V.jsx)(zD,{children:e?(0,V.jsxs)(ik.div,{role:`presentation`,className:`fixed inset-0 z-[1200] flex items-end justify-center sm:items-center sm:p-4`,initial:{opacity:0}
36,animate:{opacity:1},exit:{opacity:0},transition:{duration:.18},children:[(0,V.jsx)(`div`,{role:`presentation`,className:`absolute inset-0 cursor-default bg-black/65 backdrop-blur-[2px]`,onClick:()=>!l&&d()}),(0,V.jsxs)(ik.div,{role:`dialog`,"aria-modal":`true`,"aria-labelledby":i,className:`relative z-[1201] w-full max-w-md overflow-hidden rounded-t-[1.75rem] border border-border/60 bg-surface shadow-[0_24px_64px_-12px_rgba(0,0,0,0.45)] sm:rounded-[1.5rem]`,initial:{opacity:0,y:24},animate:{opacity:1,y:0},exit:{opacity:0,y:16},transition:{type:`spring`,stiffness:420,damping:34},children:[(0,V.jsxs)(`div`,{className:`flex items-center justify-between gap-3 border-b border-border/40 px-4 py-4 sm:px-6`,children:[(0,V.jsx)(`h2`,{id:i,className:`text-lg font-black tracking-tight text-foreground`,children:`Edit listing status`}),(0,V.jsx)(`button`,{type:`button`,onClick:d,disabled:l,className:`flex h-10 w-10 shrink-0 items-center justify-center rounded-full border border-border/60 text-muted-foreground transition-colors hover:bg-surface-elevated hover:text-foreground disabled:opacity-50`,"aria-label":`Close`,children:(0,V.jsx)(mj,{size:18})})]}),(0,V.jsxs)(`div`,{className:`px-4 py-5 sm:px-6`,children:[(0,V.jsxs)(`div`,{className:`rounded-xl border border-border/50 bg-surface-elevated/40 px-3.5 py-3 text-sm text-muted-foreground`,children:[(0,V.jsx)(`p`,{children:p.primary}),p.repostWarning?(0,V.jsx)(`p`,{className:`mt-2 font-semibold text-warning`,children:p.repostWarning}):null]}),(0,V.jsx)(`div`,{className:`mt-4 flex flex-wrap gap-2`,children:Wce.map(e=>(0,V.jsx)(`button`,{type:`button`,disabled:l,onClick:()=>o(e),className:`inline-flex rounded-full px-3 py-2 text-xs font-black tracking-wide transition-all ${a===e?tI(e):`border border-border/50 bg-surface-elevated/50 text-foreground hover:bg-surface-hover`} disabled:opacity-50`,children:eI(e)},e))}),s?(0,V.jsx)(`p`,{className:`mt-4 text-sm font-medium text-error`,role:`alert`,children:s}):null]}),(0,V.jsxs)(`div`,{className:`flex flex-col-reverse gap-2 border-t border-border/40 px-4 py-4 sm:flex-row sm:justify-end sm:gap-3 sm:px-6`,children:[(0,V.jsx)(`button`,{type:`button`,disabled:l,onClick:d,className:`rounded-xl border border-border/70 px-4 py-2.5 text-sm font-bold text-foreground transition-colors hover:bg-surface-elevated disabled:opacity-50`,children:`Cancel`}),(0,V.jsx)(`button`,{type:`button`,disabled:l,onClick:()=>void f(),className:`inline-flex items-center justify-center gap-2 rounded-xl bg-primary px-4 py-2.5 text-sm font-bold text-primary-foreground transition-opacity hover:bg-primary-hover disabled:opacity-60`,children:l?(0,V.jsxs)(V.Fragment,{children:[(0,V.jsx)(_A,{size:16,className:`animate-spin`}),`Saving...`]}):`Save status`})]})]})]}):null}),document.body)}var nI=[{title:`Home & Garden`,categories:[`Tools`,`Furniture`,`Household`,`Garden`,`Appliances`]},{title:`Entertainment`,categories:[`Video Games`,`Books, Movies & Music`]},{title:`Clothing & Accessories`,categories:[`Bags & Luggage`,`Women's clothing & shoes`,`Men's clothing & shoes`,`Jewelry & Accessories`]},{title:`Family`,categories:[`Health & beauty`,`Pet Supplies`,`Baby & kids`,`Toys & Games`]},{title:`Electronics`,categories:[`Electronics & computers`,`Mobile phones`]},{title:`Hobbies`,categories:[`Bicycles`,`Arts & Crafts`,`Sports & Outdoors`,`Auto parts`,`Musical Instruments`,`Antiques & Collectibles`]},{title:`Classifieds`,categories:[`Garage Sale`,`Miscellaneous`]}];nI.flatMap(e=>e.categories);var rI=[`New`,`Used - Like New`,`Used - Good`,`Used - Fair`],Jce=[`Car/Truck`,`Motorcycle`,`Powersport`,`RV/Camper`,`Trailer`,`Boat`,`Commercial/Industrial`,`Other`],Yce=[`Coupe`,`Truck`,`Sedan`,`Hatchback`,`SUV`,`Convertible`,`Wagon`,`Minivan`,`Small Car`,`Other`],iI=[`Automatic transmission`,`Manual transmission`],aI=[`Diesel`,`Electric`,`Gasoline`,`Flex`,`Hybrid`,`Petrol`,`Plug-in hybrid`,`Other`],oI=new Date().getFullYear(),sI=1900;function cI(){return Array.from({length:oI-sI+1},(e,t)=>String(oI-t))}var lI={maxTitleLength:90,maxDescriptionLength:5e3,maxModelLength:50,maxMakeLength:50,maxItemPhotos:10,maxVehiclePhotos:20};function uI(e){return e===`item`?lI.maxItemPhotos:lI.maxVehiclePhotos}function dI(e){return(e.provider??``).trim().toLowerCase()===`facebook`&&!!e.provider_item_id?.trim()}function fI(e){if(!dI(e))return!1;if(e.can_refresh_from_facebook===!0)return!0;let t=e.refresh_available_at;return!!(t&&Date.now()>=new Date(t).getTime())}function pI(e){if(fI(e))return null;let t=e.minutes_remaining;return t!=null&&t>0?`Available in ${t} ${t===1?`minute`:`minutes`}`:`Refresh available soon`}function mI(e){let t=e.repost_summary?.repost?.listing_type;return t===`item`||t===`vehicle`?t:e.year!=null||e.mileage!=null||e.transmission_type||e.fuel_type?`vehicle`:`item`}function hI(e){let t=e.repost_summary?.repost?.missing_fields;return!!(t&&t.length>0)}function gI(e){return e.repost_summary?.repost?.category_label?.trim()??``}function _I(e){let t=e.repost_summary?.repost;return e.latitude!=null&&e.longitude!=null&&t?.location_label&&t.city&&t.country?{latitude:e.latitude,longitude:e.longitude,location_label:t.location_label,city:t.city,country:t.country,formatted_address:t.location_label}:e.latitude!=null&&e.longitude!=null?{latitude:e.latitude,longitude:e.longitude,location_label:t?.location_label??`Selected location`,city:t?.city??``,country:t?.country??``}:null}function vI(){return nI.map(e=>({title:e.title,options:e.categories.map(e=>({label:e,value:e}))}))}function yI(e){let{showToast:t}=Gx(),n=e?.onRefreshed,[r,i]=(0,b.useState)(null);return{refresh:(0,b.useCallback)(async e=>{if(r||!dI(e))return;if(!fI(e)){t({type:`warning`,message:pI(e)??`Please wait before refreshing again.`});return}let a=e.repost_summary?.repost?.listing_type??mI(e);i(e.id);try{let r=await bs({provider_item_id:e.provider_item_id,url:e.url??void 0,provider:e.provider,listing_type:a});n?.(r),t({type:r.status===`unavailable`?`warning`:`success`,message:r.status===`unavailable`?`This listing is no longer available on Facebook.`:`Listing updated from Facebook.`})}catch(e){t({type:`error`,message:xs(e)})}finally{i(null)}},[r,n,t]),isRefreshing:(0,b.useCallback)(e=>r===e,[r]),refreshingListingId:r}}async function bI(e,t){let n=e.repost_summary;if(!n?.has_repost_addon){t.onRequireAddon();return}
36if(!n.can_repost){t.onRequireEligibleListing();return}let r=e;try{r=await ds(e.id)}catch{}if(hI(r)){let n=await t.onRequireCompleteListing(r);if(!n)return;r=n,t.onListingUpdated(r);try{r=await ds(e.id)}catch{r=n}if(hI(r)){t.onStillIncomplete();return}}let i=await t.onOpenRepostConfig(r);i&&t.onListingUpdated(i)}function xI(){let{canUseRepostFeatures:e,hasRepostAddon:t,status:n}=bj(),{status:r}=Sy(),i=Lj(n,r);return{gateReady:i,canUseRepostFeatures:i&&e,hasRepostAddon:i&&t,accessStatus:n,subscriptionStatus:r}}var SI={search_create_subscription:{messageKey:`permissionToast.searchCreateSubscription`,descriptionKey:`permissionToast.searchCreateSubscriptionDesc`},search_create_quota:{messageKey:`permissionToast.searchCreateQuota`,descriptionKey:`permissionToast.searchCreateQuotaDesc`},search_edit_subscription:{messageKey:`permissionToast.searchEditSubscription`,descriptionKey:`permissionToast.searchEditSubscriptionDesc`},search_activate_subscription:{messageKey:`permissionToast.searchActivateSubscription`,descriptionKey:`permissionToast.searchActivateSubscriptionDesc`},search_activate_quota:{messageKey:`permissionToast.searchActivateQuota`,descriptionKey:`permissionToast.searchActivateQuotaDesc`},chat_subscription:{messageKey:`permissionToast.chatSubscription`,descriptionKey:`permissionToast.chatSubscriptionDesc`},chat_plan:{messageKey:`permissionToast.chatPlan`,descriptionKey:`permissionToast.chatPlanDesc`},ai_addon_required:{messageKey:`permissionToast.aiAddonRequired`,descriptionKey:`permissionToast.aiAddonRequiredDesc`},ai_subscription:{messageKey:`permissionToast.aiSubscription`,descriptionKey:`permissionToast.aiSubscriptionDesc`},repost_addon_required:{messageKey:`permissionToast.repostAddonRequired`,descriptionKey:`permissionToast.repostAddonRequiredDesc`},repost_subscription:{messageKey:`permissionToast.repostSubscription`,descriptionKey:`permissionToast.repostSubscriptionDesc`},generic:{messageKey:`permissionToast.generic`,descriptionKey:`permissionToast.genericDesc`}};function CI(e,t=`generic`){let n=SI[t],r=e(`permissionToast.subscriptionHint`);return{type:`warning`,message:e(n.messageKey),description:`${e(n.descriptionKey)} ${r}`,duration:6e3}}function wI(e,t){return e?t?`search_create_subscription`:`search_create_quota`:`search_create_subscription`}function TI(e,t){return e?t?`search_activate_subscription`:`search_activate_quota`:`search_activate_subscription`}function EI(e){if(!e)return`generic`;let t=e.access_level;return t===`restricted`||t===`view_only`?`chat_subscription`:e.can_chat?`generic`:`chat_plan`}function DI(e,t){return e?xx(e.access_level)?t?`generic`:`ai_addon_required`:`ai_subscription`:`generic`}function OI(e,t){return e?xx(e.access_level)?t?`generic`:`repost_addon_required`:`repost_subscription`:`generic`}function kI({open:e,onClose:t,onUpdateStatus:n,onEditDetails:r}){let i=(0,b.useId)(),a=(0,b.useCallback)(()=>{t()},[t]);return(0,b.useEffect)(()=>{if(!e)return;let t=e=>{e.key===`Escape`&&a()};return window.addEventListener(`keydown`,t),()=>window.removeEventListener(`keydown`,t)},[e,a]),(0,x.createPortal)((0,V.jsx)(zD,{children:e?(0,V.jsxs)(ik.div,{role:`presentation`,className:`fixed inset-0 z-[1200] flex items-end justify-center sm:items-center sm:p-4`,initial:{opacity:0}
36,animate:{opacity:1},exit:{opacity:0},transition:{duration:.18},children:[(0,V.jsx)(`div`,{role:`presentation`,className:`absolute inset-0 cursor-default bg-black/65 backdrop-blur-[2px]`,onClick:a}),(0,V.jsxs)(ik.div,{role:`dialog`,"aria-modal":`true`,"aria-labelledby":i,className:`relative z-[1201] w-full max-w-lg overflow-hidden rounded-t-[1.75rem] border border-border/60 bg-surface shadow-[0_24px_64px_-12px_rgba(0,0,0,0.45)] sm:rounded-[1.5rem]`,initial:{opacity:0,y:24},animate:{opacity:1,y:0},exit:{opacity:0,y:16},transition:{type:`spring`,stiffness:420,damping:34},children:[(0,V.jsxs)(`div`,{className:`flex items-center justify-between gap-3 border-b border-border/40 px-5 py-4`,children:[(0,V.jsx)(`h2`,{id:i,className:`text-xl font-black tracking-tight text-foreground`,children:`Edit listing`}),(0,V.jsx)(`button`,{type:`button`,onClick:a,className:`flex h-10 w-10 shrink-0 items-center justify-center rounded-full border border-border/60 text-muted-foreground transition-colors hover:bg-surface-elevated hover:text-foreground`,"aria-label":`Close`,children:(0,V.jsx)(mj,{size:18})})]}),(0,V.jsxs)(`div`,{className:`grid gap-3 px-5 py-5`,children:[(0,V.jsxs)(`button`,{type:`button`,onClick:()=>{a(),n()}
36,className:`flex items-start gap-4 rounded-2xl border border-border/60 bg-surface-elevated/40 p-4 text-left transition-colors hover:border-primary/40 hover:bg-primary/5`,children:[(0,V.jsx)(`div`,{className:`flex h-11 w-11 shrink-0 items-center justify-center rounded-xl bg-primary/10 text-primary`,children:(0,V.jsx)(ij,{size:20})}),(0,V.jsxs)(`div`,{children:[(0,V.jsx)(`p`,{className:`font-bold text-foreground`,children:`Update status`}),(0,V.jsx)(`p`,{className:`mt-1 text-sm text-muted-foreground`,children:`InstaSnag only â mark as available, unavailable, or sold`})]})]}),(0,V.jsxs)(`button`,{type:`button`,onClick:()=>{a(),r()},className:`flex items-start gap-4 rounded-2xl border border-border/60 bg-surface-elevated/40 p-4 text-left transition-colors hover:border-primary/40 hover:bg-primary/5`,children:[(0,V.jsx)(`div`,{className:`flex h-11 w-11 shrink-0 items-center justify-center rounded-xl bg-primary/10 text-primary`,children:(0,V.jsx)(NA,{size:20})}),(0,V.jsxs)(`div`,{children:[(0,V.jsx)(`p`,{className:`font-bold text-foreground`,children:`Edit listing details`}),(0,V.jsx)(`p`,{className:`mt-1 text-sm text-muted-foreground`,children:`Update photos, price, description, and more`})]})]})]})]})]}):null}),document.body)}var AI=`Acura.Alfa Romeo.Aston Martin.Audi.BMW.Bentley.Buick.CODA.Cadillac.Chevrolet.Chrysler.Daewoo.Daihatsu.Dodge.Eagle.Ferrari.Fiat.Fisker.Ford.Freightliner.GMC.Genesis.Geo.Honda.Hummer.Hyundai.Infiniti.Isuzu.Jaguar.Jeep.Kia.Lamborghini.Land Rover.Lexus.Lincoln.Lotus.Lucid.MINI.Maserati.Maybach.Mazda.Mclaren.Mercedes-Benz.Mercury.Mitsubishi.Nissan.Oldsmobile.Panoz.Plymouth.Polestar.Pontiac.Porsche.Ram.Rivian.Rolls-Royce.SRT.Saab.Saturn.Scion.Smart.Subaru.Suzuki.Tesla.Toyota.Volkswagen.Volvo`.split(`.`),jI=`A.P.C Motor Company,AJP,AJS,ARC,Arch,ASPT,Adly,Aermacchi,Alcyon,Alta,Ambassador,American IronHorse,American Lifan,Apollo,Aprilia,Arctic Cat,Ariane,Ariel,Arlen Ness,Armor,Armstrong,Artisan,BMC,BMS,BMW,BSA,BTS,Bajaj,Baotian,Barossa,Bashan,Battistinis,Beeline,Benelli,Beta,Better,Bianchi,Big Bear Choppers,Big Dog Motorcycles,Bimota,Bintelli,Blata,Boom,Borile,Boss Hoss,Bourget,Bown,Boxer,Brammo,Branson,Bridgestone,Brixton,Brough Superior,Buell,Bullit,Bultaco,Butler,CCM,CFMOTO,CH Racing,CPI,CZ,Cagiva,California Motorcycle Company,California Scooter Company,Campagna,Can-Am,Cannondale,Casal,Cazador,Champ,Chang Jiang,Chicago Scooter Co,Chunlan,Cimatti,Citycoco,Club Car,Cobra,Coleman,Condor,Confederate,Conquest Trikes,Coolster,Cotton,Cougar,Coventry Eagle,Cushman,DKW,Dot,Daelim,Daix,Dayang,Demon X,Derbi,Di Blasi,Diamo,Dichao,Direct Bikes,Dnepr,Dong Fang,Douglas,Dresda,Ducati,E-TON,E-Z-Go,EBR,Easy-Rider,Eclipse,Electric Motion,Electricycle,Energica,Eped,Erider,Erik Buell Racing,Excelsior Henderson,Fantic,Feiying,Fenian,Fosti,Francis-Barnett,Garelli,Gas Gas,Geely,Genata,Generic,Genuine Scooter Company,Ghezzi-Brian,Giantco,Gilera,Greeves,Grinnall,Hanway,Hao Nuo,Haotian,Harley-Davidson,Harris,Hartford,Hellbound Steel,Herald,Hesketh,Himo,Hisun,Honchin,Honda,Hongdu,Honley,Horex,Huvo,Huatian,Huoniao,Husaberg,Husqvarna,Hyosung,Isomoto,IZH,Ice Bear,Indian,Iron Eagle Motorcycle,Italika,Italjet,Itom,Jbwco,JCM,James,Jawa,Jialing,Jianshe,Jincheng,Jinfeng,Jinlun,John Deere,Johnny Pag,Jonway,Jotagas,Juicy Bike,Kalex,KTM,Kangchao,Kawasaki,Kayo,Keeway,Kinroad-Rock,Kymco,Lem,Lambretta,Lance,Lanying,Laverda,Lehman,Lehman Trikes,Leike,Levis,Lexmoto,Lifan,Linhai,Lintex,LML,Loncin,Longjia,Lotus,Lyric,MBK,MV Agusta,MZ,Magni,Maico,Malaguti,Martin,Masai,Mash,Matchless,Mavizen,Maxus,Megelli,Mig,Mikilon,Mini Moto,Mobylette,Modenas,Mondial,Montesa,Morini,Moto Guzzi,Moto-Martin,Moto Morini,Moto-Parilla,Motobi,Motobecane,Motor Trike,Moto-Hispania,Motorini,Motus,Mutt,Metisse,Munch,NSU,NVT,Neco,New Hudson,New Imperial,New Map,Nippi,Nipponia,NIU,Norton,Oset,Omega,Ossa,PGO,Por,Pannonia,Panther,Paramount Custom Cycles,Paton,Peace Sports,Peirspeed,Pembleton,Peripoli,Petronas,Peugeot,Piaggio,Pioneer,Pitster Pro,Polaris,Polestar,Polini,Precision Cycle Works,Puch,Pulse,Qingqi,Quadro,Quantya,Raleigh,Red Horse,Regent,Revtech,Rewaco,Rhino,Rickman,Ridley,Rieju,Roadsmith,Roehr,Rokon,Moto-Roma,Romarsh,Romeo,Rovigo,Roxon,Royal Alloy,Royal Enfield,Rudge,Rumi,SFM,SSR Motorsports,Stacyc,SWM,SYM,Sachs,Sanglas,Sanya,Saxon,Schwinn,Scomadi,Scorpa,Scott,Secma,Seeley,Segway,Senke,Sherco,Shineray,Siamoto,Silk,Simson,Sinnis,Skygo,Skyjet,Skyteam,Slam,Slingshot,Smc,Spirit,Spondon,Star Motorcycles,Starway,Stomp,Sucker Punch Sallys,Sukida,Sumo,Sunbeam,Super Soco,Superbyke,Suzuki,Swift,TGB,Taizhou Zhongneng,Tamoretti,Tao Motor,Tao Tao,Terrot,Thoroughbred Motorsports,Thumpstar,Thunder Mountain,Titan,Tmec,Tomos,TOR,Track,Trailmaster,Triton,Triumph,UBCO,UM,Ural,
36Urban,Vor,Vanderhall,Vectrix,Velocette,Vento,Venture,Vertemati,Vertigo,Vespa,Victoria,Victory,Vincent,Vitacci,Voxan,Vulcan,Vyrus,Velosolex,WK Bikes,Wangye,Wild West,Wolf Brand Scooters,Wuyang,Xgjao,Xispa,Xtreme Motor Co.,YCF,Yamaha,Yamasaki,Yamoto,Yiben,Yuan,Zenardi,Zennco,Zero,Zero Engineering,Zhejiang,Znen,Zodiac,Zongshen,Zontes,TM`.split(`,`),MI=[`Black`,`Blue`,`Brown`,`Gold`,`Green`,`Gray`,`Pink`,`Purple`,`Red`,`Silver`,`Orange`,`White`,`Yellow`,`Charcoal`,`Off white`,`Tan`,`Beige`,`Burgundy`,`Turquoise`,`Other`],NI=[`Black`,`Blue`,`Brown`,`Gold`,`Green`,`Gray`,`Pink`,`Purple`,`Red`,`Silver`,`Orange`,`White`,`Yellow`,`Charcoal`,`Off white`,`Tan`,`Beige`,`Burgundy`,`Turquoise`,`Other`],PI=[`Excellent`,`Very good`,`Good`,`Fair`,`Poor`],FI=`Car/Truck`,II=`Motorcycle`;function LI(e){return e===FI}function RI(e){return e===II}function zI(e){return LI(e)||RI(e)}function BI(e){return LI(e)}function VI(e){return LI(e)||RI(e)}function HI(e){return VI(e)}function UI(e){return!!e&&e!==`Other`}function WI(e){return!!e&&e!==`Motorcycle`&&e!==`Other`}function GI(e){return!!e&&e!==`Trailer`&&e!==`Other`}function KI(e){return LI(e)}function qI(e){return LI(e)?AI:RI(e)?jI:[]}function JI(e,t){if(e.length===0)return e;let n=t&&e.some(e=>e.id===t)?t:e[0].id;if(n===e[0].id)return e;let r=e.findIndex(e=>e.id===n);return r<=0?e:[e[r],...e.filter((e,t)=>t!==r)]}function YI(e){let t=[],n=[],r=0;for(let i of e){let e=i.existingUrl?.trim();if(e){t.push({type:`existing`,url:e});continue}i.file&&(t.push({type:`new`,file_index:r}),n.push(i.file),r+=1)}return{imageOrder:t,newFiles:n}}function XI(e){return e[0]?.id??null}function ZI(e){let t=(e.images?.length?e.images:e.primary_image_url?[e.primary_image_url]:[]).map((e,t)=>({id:`existing-${t}-${e}`,previewUrl:e,existingUrl:e}));return{photos:t,primaryPhotoId:XI(t)}}function QI(e){return e.trim().split(`?`,1)[0]}function $I(e,t,n){if(t.length!==n.length||t.length===0)return e;let r=new Map;return t.forEach((e,t)=>{r.set(QI(e),t)}),e.map(e=>{let t=e.existingUrl?.trim();if(!t)return e;let i=r.get(QI(t));if(i===void 0)return e;let a=n[i]?.trim();return!a||a===t?e:{...e,existingUrl:a,previewUrl:a}})}function eL(e,t){return e.length===t.length?e.every((e,n)=>QI(e)===QI(t[n]??``)):!1}function tL(e){if(e==null||e===``)return``;let t=String(e).trim(),n=Number(t);return Number.isFinite(n)?String(n):t}function nL(e){return e?JSON.stringify({lat:e.latitude,lng:e.longitude,label:e.location_label.trim(),city:e.city.trim(),country:e.country.trim(),formatted:(e.formatted_address??``).trim()}):``}function rL(e,t){return JSON.stringify({primary:t??``,slots:e.map(e=>({e:e.existingUrl?.trim()??``,n:e.file?`${e.file.name}:${e.file.size}:${e.file.lastModified}`:``}))})}function iL(e){let t=e.listingType===`item`;return JSON.stringify({listingType:e.listingType,title:e.title.trim(),price:tL(e.price),description:e.description.trim(),condition:t?e.condition.trim():e.vehicleCondition.trim(),category:t?e.category.trim():``,vehicleType:t?``:e.vehicleType.trim(),make:t?``:e.make.trim(),model:t?``:e.model.trim(),bodyStyle:t?``:e.bodyStyle.trim(),year:t?``:e.year.trim(),mileage:t?``:e.mileage.trim(),transmission:t?``:e.transmission.trim(),fuelType:t?``:e.fuelType.trim(),exteriorColor:t?``:e.exteriorColor.trim(),interiorColor:t?``:e.interiorColor.trim(),location:nL(e.location),photos:rL(e.photos,e.primaryPhotoId)})}function aL(e){let t=mI(e),n=ZI(e);return iL({listingType:t,title:e.title??``,price:String(e.price??``),description:e.description??``,condition:t===`item`?e.condition??``:``,category:gI(e),vehicleType:e.repost_summary?.repost?.vehicle_type??`Car/Truck`,make:e.repost_summary?.repost?.make??``,model:e.repost_summary?.repost?.model??``,bodyStyle:e.repost_summary?.repost?.body_style??``,year:e.year==null?``:String(e.year),mileage:e.mileage==null?``:String(e.mileage),transmission:e.transmission_type??``,fuelType:e.fuel_type??``,exteriorColor:e.exterior_color??``,interiorColor:e.interior_color??``,vehicleCondition:t===`vehicle`?e.condition??``:``,location:_I(e),photos:n.photos,primaryPhotoId:n.primaryPhotoId})}function oL(e){return iL(e)}function sL(e,t){return e?e!==t:!1}function cL(e){let t=Number(e.trim());return Number.isFinite(t)&&t>0}function lL(e){let t=Number.parseInt(e.trim(),10);return Number.isFinite(t)&&t>=0}function uL(e){return rI.includes(e)}function dL(e){return PI.includes(e)}function fL(e){return iI.includes(e)}function pL(e){let t=(e??``).trim();if(!t)return``;if(fL(t))return t;let n=t.toLowerCase().replace(/[\s_-]+/g,` `);return n.includes(`manual`)?`Manual transmission`:n.includes(`automatic`)||n===`auto`?`Automatic transmission`:``}function mL(e){let t=(e??``).trim();return t&&uL(t)?t:``}function hL(e){let t=(e??``).trim();return t&&dL(t)?t:``}function gL(e){let t={};e.photos.length===0&&(t.photos=`Add at least one photo.`);let n=e.title.trim();e.listingType===`item`&&(n?n.length>lI.maxTitleLength&&(t.title=`Title must be ${lI.maxTitleLength} characters or fewer`):t.title=`Title is required`),cL(e.price)||(t.price=`Enter a valid price greater than 0`),e.description.trim().length>lI.maxDescriptionLength&&(t.description=`Description must be ${lI.maxDescriptionLength} characters or fewer`);let r=e.condition.trim();if(e.listingType===`item`&&(r?uL(r)||(t.condition=`Invalid condition. Choose New, Used - Like New, Used - Good, or Used - Fair.`):t.condition=`Condition is required`),e.location||(t.location=`Location is required`),e.listingType===`item`)e.category.trim()||(t.category=`Category is required`);else{e.vehicleType.trim()||(t.vehicleType=`Vehicle type is required`);let n=e.make.trim();n?n.length>lI.maxMakeLength&&(t.make=`Make must be ${lI.maxMakeLength} characters or fewer`):t.make=`Make is required`;let i=e.model.trim();i?i.length>
36lI.maxModelLength&&(t.model=`Model must be ${lI.maxModelLength} characters or fewer`):t.model=`Model is required`,BI(e.vehicleType)&&!e.bodyStyle.trim()&&(t.bodyStyle=`Body style is required`),e.year.trim()||(t.year=`Year is required`),VI(e.vehicleType)&&(e.mileage.trim()?lL(e.mileage)||(t.mileage=`Enter a valid mileage`):t.mileage=`Mileage is required`),HI(e.vehicleType)&&(e.transmission.trim()?fL(e.transmission.trim())||(t.transmission=`Invalid transmission. Choose Automatic transmission or Manual transmission.`):t.transmission=`Transmission is required`),KI(e.vehicleType)&&r&&!dL(r)&&(t.condition=`Invalid vehicle condition. Choose Excellent, Very good, Good, Fair, or Poor.`)}return t}function _L(e){return!(!e||!Number.isFinite(e.latitude)||!Number.isFinite(e.longitude)||!e.location_label?.trim()||!e.city?.trim()||!e.country?.trim())}function vL(e){let t=new Set;return e.photos.length===0&&t.add(`photos`),e.listingType===`item`&&!e.title.trim()&&t.add(`title`),cL(e.price)||t.add(`price`),_L(e.location)||t.add(`location`),e.listingType===`item`?(e.category.trim()||t.add(`category`),e.condition.trim()||t.add(`condition`)):(e.vehicleType.trim()||t.add(`vehicleType`),e.make.trim()||t.add(`make`),e.model.trim()||t.add(`model`),BI(e.vehicleType)&&!e.bodyStyle.trim()&&t.add(`bodyStyle`),e.year.trim()||t.add(`year`),VI(e.vehicleType)&&!e.mileage.trim()&&t.add(`mileage`),HI(e.vehicleType)&&!e.transmission.trim()&&t.add(`transmission`)),t}function yL(e){return Object.keys(e).length>0}var bL=[`photos`,`title`,`price`,`category`,`condition`,`location`,`description`],xL=[`photos`,`vehicleType`,`make`,`model`,`bodyStyle`,`year`,`price`,`location`,`mileage`,`transmission`,`condition`,`description`];function SL(e,t){return(t===`item`?bL:xL).find(t=>e[t])??null}function CL(e){return`manual-listing-field-${e}`}function wL(e){e&&requestAnimationFrame(()=>{requestAnimationFrame(()=>{document.getElementById(CL(e))?.scrollIntoView({behavior:`smooth`,block:`start`})})})}var TL={title:`title`,price:`price`,category_label:`category`,condition:`condition`,description:`description`,vehicle_type:`vehicleType`,make:`make`,model:`model`,body_style:`bodyStyle`,year:`year`,mileage:`mileage`,transmission_type:`transmission`,images:`photos`,image_order:`photos`,location:`location`};function EL(e){return e?e.startsWith(`location`)?`location`:TL[e]??null:null}var DL=`text-[10px] font-black uppercase tracking-[0.2em] text-muted-foreground/70`;function OL({children:e,required:t=!1,htmlFor:n,className:r=`mb-2 block ${DL}`}){return(0,V.jsxs)(`label`,{htmlFor:n,className:r,children:[e,t?(0,V.jsx)(`span`,{className:`text-error`,children:` *`}):null]})}function kL(e,t,n){return[`manual-listing-field w-full rounded-lg border-2 bg-surface px-3.5 py-3 text-sm font-medium`,`flex items-center justify-between gap-2 text-left`,`outline-none transition-[color,border-color]`,`focus:outline-none focus-visible:outline-none`,`focus:!ring-0 focus-visible:!ring-0 focus:!ring-offset-0 focus-visible:!ring-offset-0`,n?`cursor-not-allowed opacity-60`:`cursor-pointer hover:border-primary/40`,t||e?`border-error/50`:`border-border/60`].join(` `)}function AL(e){return e.location_label?.trim()||e.formatted_address?.trim()||[e.city,e.country].filter(Boolean).join(`, `)||`Selected location`}function jL(e){let t=[e.city,e.country].filter(Boolean).join(`, `),n=AL(e);return!t||t===n?null:t}function ML({value:e,disabled:t=!1,error:n,highlight:r=!1,required:i=!1,placeholder:a=`Select location`,onOpen:o,fieldId:s}){let c=e?jL(e):null;return(0,V.jsxs)(`div`,{id:s,className:`space-y-2`,children:[(0,V.jsx)(OL,{required:i,className:DL,children:`Location`}),(0,V.jsxs)(`button`,{type:`button`,disabled:t,onClick:()=>o?.(),className:kL(r,!!n,t),"aria-invalid":!!n,"aria-label":e?AL(e):a,children:[(0,V.jsx)(`span`,{className:`min-w-0 flex-1`,children:e?(0,V.jsxs)(V.Fragment,{children:[(0,V.jsx)(`span`,{className:`block truncate text-foreground`,children:AL(e)}),c?(0,V.jsx)(`span`,{className:`mt-0.5 block truncate text-xs font-medium text-muted-foreground`,children:c}):null]}):(0,V.jsx)(`span`,{className:`block truncate font-medium text-muted-foreground
36/55`,children:a})}),(0,V.jsx)(Rk,{size:16,className:`shrink-0 text-muted-foreground`,"aria-hidden":!0})]}),n?(0,V.jsx)(`p`,{className:`text-xs font-semibold text-error`,role:`alert`,children:n}):null]})}var NL=class extends Error{constructor(e=`Location could not be determined with sufficient accuracy.`){super(e),this.name=`GeolocationAccuracyError`}},PL={timeoutMs:2e4,targetAccuracyMeters:150,acceptCoarseTimeoutMs:4e3,rejectCoarseAboveMeters:500,maxAcceptableAccuracyMeters:500,progressMaxAccuracyMeters:500};function FL(e){return{latitude:e.coords.latitude,longitude:e.coords.longitude,accuracyMeters:e.coords.accuracy}}function IL(e,t){return e.accuracyMeters<=t}function LL(e={}){let{timeoutMs:t,targetAccuracyMeters:n,acceptCoarseTimeoutMs:r,rejectCoarseAboveMeters:i,maxAcceptableAccuracyMeters:a,progressMaxAccuracyMeters:o,onProgress:s}={...PL,...e};return new Promise((e,c)=>{if(!navigator.geolocation){c(Error(`Geolocation is not supported by this browser.`));return}let l=!1,u=1/0,d=null,f=null,p=null,m=null,h=()=>{f!=null&&(navigator.geolocation.clearWatch(f),f=null),p!=null&&(window.clearTimeout(p),p=null),m!=null&&(window.clearTimeout(m),m=null)},g=t=>{l||IL(t,a)&&(l=!0,h(),e(t))},_=e=>{if(l)return;let{accuracyMeters:t}=e;if(!(t>=u)){if(u=t,d=e,t<=o)try{s?.(e)}catch{}if(t<=n){g(e);return}t<=i&&(p!=null&&window.clearTimeout(p),p=window.setTimeout(()=>{!l&&d&&g(d)},r))}};f=navigator.geolocation.watchPosition(e=>_(FL(e)),e=>{!l&&d===null&&(l=!0,h(),c(e))},{enableHighAccuracy:!0,maximumAge:0,timeout:t}),m=window.setTimeout(()=>{if(!l){if(l=!0,h(),d&&IL(d,a)){e(d);return}if(d){c(new NL);return}c(Error(`Timed out waiting for your location.`))}},t)})}function RL(e){let t=e.find(e=>e.types.includes(`locality`));if(t)return t.long_name;let n=e.find(e=>e.types.includes(`postal_town`));if(n)return n.long_name;let r=e.find(e=>e.types.includes(`administrative_area_level_2`));if(r)return r.long_name;let i=e.find(e=>e.types.includes(`sublocality`));return i?i.long_name:``}function zL(e){return e.find(e=>e.types.includes(`country`))?.long_name??``}function BL(e){return e.find(e=>e.types.includes(`neighborhood`))?.long_name||e.find(e=>e.types.includes(`sublocality`)||e.types.includes(`sublocality_level_1`))?.long_name||RL(e)||``}function VL(e){return e?.trim()?e.split(`,`)[0]?.trim()??``:``}function HL(e){return BL(e.components)||(e.name?.trim()?e.name.trim():VL(e.formattedAddress))}function UL(e){return e.location_label?.trim()||e.formatted_address?.trim()||[e.city,e.country].filter(Boolean).join(`, `)||``}var WL=`instasnag-google-maps-places`,GL=null;function KL(){return`AIzaSyCQV2noEFP4bmLG7ngMLA91aqk9R6bjXWE`?.trim()||null}function qL(){return!!KL()}function JL(){let e=KL();return e?window.google?.maps?.Map?Promise.resolve():GL||(GL=new Promise((t,n)=>{let r=document.getElementById(WL);if(r){r.addEventListener(`load`,()=>t(),{once:!0}),r.addEventListener(`error`,()=>n(Error(`Failed to load Google Maps`)),{once:!0});return}let i=document.createElement(`script`);i.id=WL,i.async=!0,i.defer=!0,i.src=`https://maps.googleapis.com/maps/api/js?key=${encodeURIComponent(e)}&libraries=places`,i.onload=()=>t(),i.onerror=()=>n(Error(`Failed to load Google Maps`)),document.head.appendChild(i)}),GL):Promise.reject(Error(`Google Maps API key is not configured.`))}var YL={lat:43.6532,lng:-79.3832},XL=[{id:`roadmap`,label:`Default`},{id:`satellite`,label:`Satellite`},{id:`hybrid`,label:`Hybrid`},{id:`terrain`,label:`Terrain`}];function ZL(){if(!window.google?.maps)throw Error(`Google Maps is not loaded.`);return window.google}var QL=[{elementType:`geometry`,stylers:[{color:`#212121`}]},{elementType:`labels.icon`,stylers:[{visibility:`off`}]},{elementType:`labels.text.fill`,stylers:[{color:`#757575`}]},{elementType:`labels.text.stroke`,stylers:[{color:`#212121`}]},{featureType:`road`,elementType:`geometry.fill`,stylers:[{color:`#2c2c2c`}]},{featureType:`water`,elementType:`geometry`,stylers:[{color:`#000000`}]}];function $L(){return document.documentElement.classList.contains(`dark`)||window.matchMedia(`(prefers-color-scheme: dark)`).matches}var eR=[`street_address`,`premise`,`subpremise`,`route`,`intersection`,`neighborhood`,`sublocality`,`locality`],tR=[`ROOFTOP`,`RANGE_INTERPOLATED`,`GEOMETRIC_CENTER`,`APPROXIMATE`];function nR(e){for(let t of eR){let n=e.find(e=>e.types?.includes(t));if(n)return n}for(let t of tR){let n=e.find(e=>e.geometry?.location_type===t);if(n)return n}return e[0]}function rR(e,t){let n=e.address_components??[],r=e.formatted_address?.trim()??``,i=RL(n),a=zL(n);return!r&&!i&&!a?null:{latitude:t.lat,longitude:t.lng,location_label:r||[i,a].filter(
36Boolean).join(`, `),city:i,country:a,formatted_address:r||null}}async function iR(e){await JL();let t=ZL(),n=new t.maps.Geocoder;return new Promise(r=>{n.geocode({location:e},(n,i)=>{if(i!==t.maps.GeocoderStatus.OK||!n?.length){r(null);return}r(rR(nR(n),e))})})}function aR(e){ZL().maps.event.trigger(e,`resize`)}function oR(e,t,n){e.setCenter(t),n!=null&&e.setZoom(n),aR(e)}async function sR(e){try{await JL()}catch{return null}let t=ZL();return new Promise(n=>{let r=document.createElement(`div`);new t.maps.places.PlacesService(r).getDetails({placeId:e,fields:[`geometry`,`formatted_address`,`address_components`,`name`]},(e,r)=>{if(r!==t.maps.places.PlacesServiceStatus.OK||!e){n(null);return}let i=e,a=i.geometry?.location?.lat(),o=i.geometry?.location?.lng();if(a==null||o==null){n(null);return}let s=i.address_components??[],c=i.formatted_address??``;n({latitude:a,longitude:o,location_label:HL({name:i.name,formattedAddress:c,components:s})||c,city:RL(s),country:zL(s),formatted_address:c})})})}var cR=1,lR=5e4;function uR(e,t,n={}){let[r,i]=(0,b.useState)([]),[a,o]=(0,b.useState)(!1),s=(0,b.useRef)(null),c=KL(),l=t&&!!c,u=(0,b.useCallback)(()=>{i([])},[]),d=e.trim(),f=l&&d.length>=cR,p=n.locationBias,m=n.radiusMeters??lR;return(0,b.useEffect)(()=>{if(f)return s.current!==null&&window.clearTimeout(s.current),s.current=window.setTimeout(()=>{(async()=>{o(!0);try{await JL();let e=window.google,t=new e.maps.places.AutocompleteService,n={input:d};p&&(n.location=p,n.radius=m),t.getPlacePredictions(n,(t,n)=>{let r=n===e.maps.places.PlacesServiceStatus.OK;e.maps.places.PlacesServiceStatus.ZERO_RESULTS,i(r&&t?t.map(e=>({description:e.description,placeId:e.place_id,mainText:e.structured_formatting?.main_text??e.description,secondaryText:e.structured_formatting?.secondary_text})):[]),o(!1)})}catch{i([]),o(!1)}})()},400),()=>{s.current!==null&&window.clearTimeout(s.current)}},[f,d,p,m]),{predictions:f?r:[],isLoading:f&&a,autocompleteEnabled:l,clearPredictions:u}}function dR(e){return e?{latitude:e.latitude,longitude:e.longitude,location_label:e.location_label,city:e.city,country:e.country,formatted_address:e.formatted_address}:null}function fR({open:e,initialLocation:t,onClose:n,onConfirm:r}){let i=(0,b.useId)(),a=`${i}-listbox`,o=(0,b.useRef)(null),s=(0,b.useRef)(null),c=(0,b.useRef)(null),l=(0,b.useRef)(null),u=(0,b.useRef)(null),d=(0,b.useRef)(null),f=(0,b.useRef)(!1),p=(0,b.useRef)(15),m=(0,b.useRef)(null),h=(0,b.useRef)(!1),[g,_]=(0,b.useState)(null),[v,y]=(0,b.useState)(null),[S,C]=(0,b.useState)(`hybrid`),[w,T]=(0,b.useState)(!1),[E,D]=(0,b.useState)(``),[O,k]=(0,b.useState)(null),[A,j]=(0,b.useState)(null),[M,N]=(0,b.useState)(!1),[P,F]=(0,b.useState)(!1),[ee,I]=(0,b.useState)(!1),[te,ne]=(0,b.useState)(!1),[re,ie]=(0,b.useState)(null),[ae,oe]=(0,b.useState)(null),[se,ce]=(0,b.useState)(!1),le=qL(),{predictions:ue,isLoading:de,clearPredictions:fe}=uR(E,e&&le,{locationBias:g}),L=(0,b.useRef)(0),pe=(0,b.useCallback)(()=>(L.current+=1,L.current),[]);(0,b.useEffect)(()=>{m.current=g},[g]);let me=(0,b.useCallback)((e,t)=>{m.current=e,_(e),t?.moveCamera&&(f.current=!0,p.current=t.zoom??15);let n=l.current,r=u.current;!n||!r||(r.setPosition(e),t?.moveCamera?(oR(n,e,t.zoom??15),f.current=!1):aR(n))},[]),he=(0,b.useCallback)(async(e,t,n)=>{let r=n??pe();me(e,t),ie(null),F(!0);try{let t=await iR(e);if(r!==L.current)return;if(!t){ie(`Could not resolve address for this location.`),y(null);return}y(t)}catch{if(r!==L.current)return;ie(`Could not resolve address for this location.`),y(null)}finally{r===L.current&&F(!1)}},[me,pe]);(0,b.useEffect)(()=>{d.current=he},[he]);let ge=(0,b.useCallback)(async e=>{await he(YL,{moveCamera:!0},e)},[he]),_e=(0,b.useCallback)(async e=>{let t=pe();I(!0),ie(null),y(null);try{let n=await LL({onProgress:n=>{t===L.current&&me({lat:n.latitude,lng:n.longitude},{moveCamera:e?.moveCamera??!0,zoom:n.accuracyMeters<=150?17:16})}});if(t!==L.current)return;ne(!0),I(!1);let r=n.accuracyMeters<=50?18:n.accuracyMeters<=150?17:16;if(await he({lat:n.latitude,lng:n.longitude},{moveCamera:e?.moveCamera??!0,zoom:r},t),t!==L.current)return}catch(e){if(t!==L.current)return;if(I(!1),e instanceof NL){ie(`Your location could not be pinpointed accurately. Search for your address or drag the pin on the map.`);return}ie(`Could not detect your current location. Check browser permissions.`)}},[me,he,pe]),ve=(0,b.useCallback)(async()=>
36{if(D(``),fe(),j(null),C(`hybrid`),T(!1),ne(!1),I(!1),!le){oe(`Google Maps API key is not configured.`);return}oe(null),N(!0),ie(null);let e=pe();try{if(t){let e={lat:t.latitude,lng:t.longitude};m.current=e,_(e),y(t),f.current=!0,p.current=16,N(!1);return}m.current=YL,_(YL),f.current=!0,p.current=12,N(!1)}catch{await ge(e)}finally{e===L.current&&N(!1)}},[fe,t,le,ge,pe]);(0,b.useEffect)(()=>{e||(h.current=!1)},[e]),(0,b.useEffect)(()=>{e&&!h.current&&(h.current=!0,ve())},[ve,e]),(0,b.useEffect)(()=>{if(!e||M||!m.current)return;let t=!1;if(c.current)return(async()=>{try{if(await JL(),t||!c.current)return;let e=ZL(),n=m.current??YL,r=new e.maps.Map(c.current,{center:n,zoom:14,mapTypeId:S,disableDefaultUI:!0,zoomControl:!1,fullscreenControl:!1,streetViewControl:!1,mapTypeControl:!1,gestureHandling:`greedy`,styles:void 0}),i=new e.maps.Marker({position:n,map:r,draggable:!0});l.current=r,u.current=i,ce(!0),window.requestAnimationFrame(()=>{window.requestAnimationFrame(()=>{if(t||l.current!==r||!m.current)return;let e=f.current?p.current:14;oR(r,m.current,e),f.current=!1})}),r.addListener(`click`,e=>{let t=e.latLng;t&&d.current?.({lat:t.lat(),lng:t.lng()})}),i.addListener(`dragend`,e=>{let t=e.latLng;t&&d.current?.({lat:t.lat(),lng:t.lng()})})}catch{t||oe(`Google Maps API key is not configured.`)}})(),()=>{t=!0,u.current?.setMap(null),u.current=null,l.current=null,ce(!1)}},[M,S,e]),(0,b.useEffect)(()=>{if(!e||!se||!c.current||!l.current)return;let t=l.current,n=c.current,r=null;aR(t);let i=new ResizeObserver(()=>{r!=null&&window.cancelAnimationFrame(r),r=window.requestAnimationFrame(()=>{l.current&&aR(l.current)})});return i.observe(n),()=>{i.disconnect(),r!=null&&window.cancelAnimationFrame(r)}},[se,e]),(0,b.useEffect)(()=>{if(!se||!l.current||!m.current||!f.current)return;let e=l.current,t=m.current;u.current?.setPosition(t),oR(e,t,p.current),f.current=!1},[se,g]),(0,b.useEffect)(()=>{let t=l.current;if(!(!t||!e))try{t.setMapTypeId(S),t.setOptions({styles:S===`roadmap`&&$L()?QL:void 0}),aR(t)}catch{}},[S,e,se]),(0,b.useEffect)(()=>{if(!e)return;let t=e=>{e.key===`Escape`&&(e.stopPropagation(),n())};return window.addEventListener(`keydown`,t),()=>window.removeEventListener(`keydown`,t)},[n,e]);let ye=E.trim(),be=ye.length>=1&&(de||ue.length>0),xe=ye.length>=1&&!de&&ue.length===0,Se=e&&A!==E&&(be||xe),Ce=(0,b.useCallback)(()=>{o.current&&k(oN(o.current,{maxAbsPx:280}))},[]);(0,b.useLayoutEffect)(()=>{if(Se)return Ce(),window.addEventListener(`resize`,Ce),window.addEventListener(`scroll`,Ce,!0),()=>{window.removeEventListener(`resize`,Ce),window.removeEventListener(`scroll`,Ce,!0)}},[de,ue.length,Se,Ce]),(0,b.useEffect)(()=>{if(!Se)return;let e=e=>{let t=e.target;o.current?.contains(t)||s.current?.contains(t)||j(E)};return document.addEventListener(`mousedown`,e),()=>document.removeEventListener(`mousedown`,e)},[E,Se]);let we=(0,b.useCallback)(async()=>{if(!navigator.geolocation){ie(`Location is not supported in this browser.`);return}await _e({moveCamera:!0})},[_e]),Te=(0,b.useCallback)(async e=>{D(``),fe(),ie(null),F(!0);let t=pe();try{let n=dR(await sR(e));if(t!==L.current)return;if(!n){ie(`Could not resolve that address. Try another search.`);return}me({lat:n.latitude,lng:n.longitude},{moveCamera:!0,zoom:16}),y(n)}catch{if(t!==L.current)return;ie(`Could not resolve that address. Try another search.`)}finally{t===L.current&&F(!1)}},[me,fe,pe]),Ee=()=>{let e=v?UL(v):``;if(!v||!e.trim()){ie(`Select a location before continuing.`);return}r(v)},De=v?UL(v):``,Oe=M||P,ke=ee?`Getting your locationâ¦`:Oe?`Updating locationâ¦`:null,Ae=XL.find(e=>e.id===S)??XL[0],je=Se&&O?(0,x.createPortal)((0,V.jsx)(`div`,{ref:s,id:a,role:`listbox`,"aria-label":`Place suggestions`,style:{position:`fixed`,left:O.left,width:O.width,maxHeight:O.maxHeight,...O.placement===`bottom`?{top:O.top??0,bottom:`auto`}:{top:`auto`,bottom:O.bottom??0}},className:`z-[1200] flex max-w-[calc(100vw-16px)] flex-col overflow-hidden rounded-xl border border-border/60 bg-surface shadow-2xl`,children:de?(0,V.jsxs)(`div`,{className:`flex items-center gap-2 px-3 py-3 text-xs font-medium text-muted-foreground`,children:[(0,V.jsx)(_A,{size:14,className:`animate-spin`}),`Searching placesâ¦`]}):xe?(0,V.jsx)(`p`,{className:`px-3 py-3 text-xs font-medium text-muted-foreground`,children:`No places found. Try a business name, street, or neighbourhood.`}):(0,V.jsx)(`ul`,{className:`custom-scrollbar min-h-0 overflow-y-auto`,children:ue.map(e=>(0,V.jsx)(`li`,{children:(0,V.jsxs)(`button`,{type:`button`,role:`option`,className:`flex w-full items-start gap-2.5 border-b border-border/40 px-3 py-2.5 text-left last:border-b-0 hover:bg-surface-elevated`,onClick:()=>void Te(e.placeId),children:[(0,V.jsx)(`span`,{className:`mt-0.5 flex h-7 w-7 shrink-0 items-center justify-center rounded-full bg-primary/10 text-primary`,children:(0,V.jsx)(xA,{size:13})}),(0,V.jsxs)(`span`,{className:`min-w-0`,children:[(0,V.jsx)(`span`,{className:`block truncate text-sm font-semibold text-foreground`,children:e.mainText}),e.secondaryText?(0,V.jsx)(`span`,{className:`mt-0.5 block truncate text-xs text-muted-foreground`,children:e.secondaryText}):null]})]})},e.placeId))})}),document.body):null;return e?(0,V.jsxs)(`aside`,{role:`dialog`,"aria-modal":`true`,"aria-labelledby":`manual-listing-location-sidebar-title`,className:`pointer-events-auto absolute inset-y-0 right-0 z-[1121] flex h-full w-full max-w-full flex-col overflow-hidden border-l border-border/60 bg-surface shadow-[-24px_0_60px_rgba(0,0,0,0.45)] sm:w-[28rem] sm:max-w-[28rem]`,children:[(0,V.jsxs)(`div`,{className:`flex shrink-0 items-center justify-between border-b border-border/40 px-4 py-3.5`,children:[(0,V.jsxs)(`div`,{className:`flex min-w-0 items-center gap-2`,children:[(0,V.jsx)(`button`,{type:`button`,onClick:e=>{e.stopPropagation(),n()},className:`flex h-9 w-9 shrink-0 items-center justify-center rounded-full border border-border/60 text-muted-foreground hover:bg-surface-elevated`,"aria-label":`Close location picker`,children:(0,V.jsx)(mj,{size:16})}),(0,V.jsx)(`div`,{className:`min-w-0`,children:(0,V.jsx)(`h2`,{id:`manual-listing-location-sidebar-title`,className:`truncate text-base font-black tracking-tight text-foreground`,children:`Listing location`})})]}),(0,V.jsxs)(`button`,{type:`button`,disabled:Oe,onClick:Ee,className:`inline-flex items-center gap-1.5 rounded-full bg-primary px-3.5 py-2 text-xs font-black text-primary-foreground disabled:opacity-60`,children:[(0,V.jsx)(Fk,{size:14,strokeWidth:2.5}),`Done`]})]}),(0,V.jsxs)(`div`,{className:`shrink-0 border-b border-border/40 px-4 py-3`,children:[(0,V.jsxs)(`div`,{className:`flex items-start gap-2.5`,children:[(0,V.jsx)(`div`,{className:`mt-0.5 flex h-8 w-8 shrink-0 items-center justify-center rounded-full bg-primary/10 text-primary`,children:(0,V.jsx)(xA,{size:15})}),(0,V.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(0,V.jsx)(`p`,{className:`text-sm leading-snug ${De?`font-semibold text-foreground`:`font-medium text-muted-foreground`}`,children:De||`Search or tap the map to choose a listing location`}),v?.city||v?.country?(0,V.jsx)(`p`,{className:`mt-1 text-xs font-medium text-muted-foreground`,children:[v.city,v.country].filter(
36Boolean).join(`, `)}):null]})]}),re?(0,V.jsx)(`p`,{className:`mt-2 text-xs font-semibold text-error`,role:`alert`,children:re}):null]}),(0,V.jsxs)(`div`,{className:`shrink-0 space-y-2 border-b border-border/40 px-4 py-3`,children:[(0,V.jsx)(`label`,{htmlFor:i,className:`sr-only`,children:`Search location`}),(0,V.jsxs)(`div`,{ref:o,className:`relative`,children:[(0,V.jsx)(UA,{size:16,className:`pointer-events-none absolute left-3 top-1/2 -translate-y-1/2 text-muted-foreground`,"aria-hidden":!0}),(0,V.jsx)(`input`,{id:i,type:`text`,value:E,disabled:!le||Oe,role:`combobox`,"aria-expanded":Se,"aria-controls":Se?a:void 0,"aria-autocomplete":`list`,onChange:e=>D(e.target.value),placeholder:`Business, street, city, neighbourhoodâ¦`,className:`manual-listing-field w-full rounded-lg border-2 border-border/60 bg-surface py-2.5 pl-9 pr-9 text-sm font-medium text-foreground outline-none placeholder:text-muted-foreground/55 focus:border-primary focus-visible:border-primary focus:!ring-0`}),E?(0,V.jsx)(`button`,{type:`button`,onClick:()=>{D(``),fe()},className:`absolute right-2 top-1/2 flex h-7 w-7 -translate-y-1/2 items-center justify-center rounded-full text-muted-foreground hover:bg-surface-elevated`,"aria-label":`Clear search`,children:(0,V.jsx)(mj,{size:14})}):null]}),(0,V.jsxs)(`button`,{type:`button`,disabled:!le||Oe,onClick:()=>void we(),className:`flex w-full items-center justify-center gap-2 rounded-xl border border-primary/25 bg-primary/5 px-3 py-2.5 text-xs font-bold text-primary transition-colors hover:bg-primary/10 disabled:cursor-not-allowed disabled:opacity-60`,children:[(0,V.jsx)(Vae,{size:14}),`Use my current location`]}),le?null:(0,V.jsxs)(`p`,{className:`rounded-xl border border-warning/30 bg-warning/10 px-3 py-2.5 text-xs font-semibold text-warning`,children:[`Set `,(0,V.jsx)(`code`,{className:`font-mono`,children:`VITE_GOOGLE_MAPS_API_KEY`}),` in your environment to enable maps.`]})]}),je,(0,V.jsxs)(`div`,{className:`relative min-h-0 flex-1 bg-surface-elevated/40`,children:[(0,V.jsx)(`div`,{ref:c,className:`absolute inset-0`}),ae?(0,V.jsx)(`div`,{className:`absolute inset-0 flex items-center justify-center bg-surface/95 px-6 text-center`,children:(0,V.jsx)(`p`,{className:`text-sm font-medium text-muted-foreground`,children:ae})}):null,ke?(0,V.jsx)(`div`,{className:`pointer-events-none absolute left-0 right-0 top-3 flex justify-center`,children:(0,V.jsxs)(`div`,{className:`inline-flex items-center gap-2 rounded-full border border-border/60 bg-surface/95 px-3 py-1.5 text-xs font-semibold text-foreground shadow-md`,children:[(0,V.jsx)(_A,{size:13,className:`animate-spin text-primary`}),ke]})}):null,(0,V.jsx)(`div`,{className:`absolute bottom-3 left-3`,children:(0,V.jsxs)(`div`,{className:`relative`,children:[(0,V.jsxs)(`button`,{type:`button`,disabled:!le,onClick:()=>T(e=>!e),className:`inline-flex items-center gap-2 rounded-xl border border-border/60 bg-surface px-3 py-2 text-xs font-bold text-foreground shadow-md transition-colors hover:bg-surface-elevated disabled:opacity-60`,children:[(0,V.jsx)(pA,{size:14}),Ae.label]}),w?(0,V.jsx)(`div`,{className:`absolute bottom-full left-0 mb-2 min-w-[9rem] overflow-hidden rounded-xl border border-border/60 bg-surface shadow-xl`,children:XL.map(e=>{let t=e.id===S;return(0,V.jsxs)(`button`,{type:`button`,onClick:()=>{C(e.id),T(!1)},className:`flex w-full items-center justify-between px-3 py-2.5 text-left text-xs font-semibold transition-colors hover:bg-surface-elevated ${t?`text-primary`:`text-foreground`}`,children:[e.label,t?(0,V.jsx)(Fk,{size:14}):null]},e.id)})}):null]})}),(0,V.jsx)(`button`,{type:`button`,disabled:!le||Oe,onClick:()=>void we(),className:`absolute bottom-3 right-3 flex h-10 w-10 items-center justify-center rounded-full border border-border/60 bg-surface text-primary shadow-md transition-colors hover:bg-surface-elevated disabled:opacity-60`,"aria-label":te?`Recenter on my location`:`Use my current location`,title:te?`Recenter on my location`:`Use my current location`,children:(0,V.jsx)(Rae,{size:18})})]})]}):null}var pR=`relative w-[9.25rem] shrink-0 aspect-[4/3] overflow-hidden rounded-xl`,mR=`flex flex-nowrap gap-3 overflow-x-auto [scrollbar-width:none] [-ms-overflow-style:none] [&::-webkit-scrollbar]:hidden`,hR=`flex h-7 w-7 cursor-pointer items-center justify-center rounded-full bg-white/95 text-foreground shadow-md ring-1 ring-black/10 backdrop-blur-sm transition-colors disabled:cursor-not-allowed disabled:opacity-50`,gR=`application/x-manual-listing-photo`;function _R(e,t,n){if(t===n)return e;let r=e.findIndex(e=>e.id===t),i=e.findIndex(e=>e.id===n);if(r<0||i<0)return e;let a=[...e],[o]=a.splice(r,1);return a.splice(i,0,o),a}function vR({photos:e,primaryPhotoId:t,maxPhotos:n,onChange:r,disabled:i=!1,error:a,highlight:o=!1,required:s=!1,fieldId:c}){let l=(0,b.useRef)(null),u=(0,b.useRef)(null),[d,f]=(0,b.useState)(!1),[p,m]=(0,b.useState)(null),[h,g]=(0,b.useState)(null),_=e.length<n,v=(0,b.useCallback)(i=>{if(!i?.length)return;let a=[...e];for(let e of Array.from(i)){if(a.length>=n)break;a.push({id:`${Date.now()}-${Math.random().toString(36).slice(2)}`,file:e,previewUrl:URL.createObjectURL(e)})}r(a,t&&a.some(e=>
36e.id===t)?t:a[0]?.id??null)},[n,r,e,t]),y=n=>{let i=e.filter(e=>e.id!==n);r(i,t===n?i[0]?.id??null:t)},x=(e,t)=>{i||(e.dataTransfer.effectAllowed=`move`,e.dataTransfer.setData(gR,t),u.current=t,m(t))},S=()=>{u.current=null,m(null),g(null)},C=(e,t)=>{i||!u.current||(e.preventDefault(),e.dataTransfer.dropEffect=`move`,t!==u.current&&g(t))},w=(n,a)=>{n.preventDefault(),n.stopPropagation();let o=n.dataTransfer.getData(gR);if(!o||i){S();return}r(_R(e,o,a),t),S()},T=()=>{i||!_||l.current?.click()},E=e=>{e.preventDefault(),e.stopPropagation(),!(i||!_)&&f(!0)},D=e=>{e.preventDefault(),e.stopPropagation(),!e.currentTarget.contains(e.relatedTarget)&&f(!1)},O=e=>{e.preventDefault(),e.stopPropagation()},k=e=>{e.preventDefault(),e.stopPropagation(),f(!1),!(i||!_)&&v(e.dataTransfer.files)},A=o&&e.length===0?`border-error/50 ring-2 ring-error/30`:`border-border/70`,j=(0,V.jsxs)(`button`,{type:`button`,disabled:i||!_,onClick:T,className:`${pR} flex flex-col items-center justify-center gap-2 border border-dashed border-border/70 bg-surface-elevated/40 text-muted-foreground transition-colors hover:border-primary/40 hover:bg-primary/5 hover:text-primary disabled:cursor-not-allowed disabled:opacity-60`,"aria-label":`Add photos`,children:[(0,V.jsx)(Pae,{size:22,strokeWidth:2}),(0,V.jsx)(`span`,{className:`text-[11px] font-bold`,children:`Add photos`})]});return(0,V.jsxs)(`div`,{id:c,className:`space-y-3`,children:[(0,V.jsxs)(`div`,{className:`flex items-center justify-between gap-3`,children:[(0,V.jsx)(OL,{required:s,className:DL,children:`Photos`}),(0,V.jsxs)(`p`,{className:`text-xs font-semibold text-muted-foreground`,children:[e.length,`/`,n]})]}),e.length===0?(0,V.jsxs)(`button`,{type:`button`,disabled:i,onClick:T,onDragEnter:E,onDragLeave:D,onDragOver:O,onDrop:k,className:`flex w-full flex-col items-center justify-center gap-3 rounded-2xl border-2 border-dashed px-6 py-10 text-center transition-colors disabled:cursor-not-allowed disabled:opacity-60 ${d?`border-primary bg-primary/10 text-primary`:`${A} bg-surface-elevated/30 text-muted-foreground hover:border-primary/40 hover:bg-primary/5 hover:text-primary`}`,children:[(0,V.jsx)(`div`,{className:`flex h-12 w-12 items-center justify-center rounded-2xl ${d?`bg-primary/15`:`bg-surface-elevated`}`,children:(0,V.jsx)(roe,{size:22,strokeWidth:2})}),(0,V.jsxs)(`div`,{children:[(0,V.jsx)(`p`,{className:`text-sm font-bold text-foreground`,children:d?`Drop photos here`:`Upload photos`}),(0,V.jsx)(`p`,{className:`mt-1 text-xs font-medium text-muted-foreground`,children:`Drag and drop or click to browse`})]}),(0,V.jsxs)(`span`,{className:`text-[10px] font-semibold uppercase tracking-wider text-muted-foreground/80`,children:[`JPG, PNG, WEBP · up to `,n,` photos`]})]}):(0,V.jsxs)(`div`,{className:`${mR} pb-0.5 ${o?`rounded-xl ring-2 ring-error/40`:``}`,children:[_?j:null,e.map(n=>{let a=n.id===t,o=p===n.id,s=h===n.id;return(0,V.jsxs)(`div`,{draggable:!i,onDragStart:e=>x(e,n.id),onDragEnd:S,onDragOver:e=>C(e,n.id),onDragLeave:e=>{e.currentTarget.contains(e.relatedTarget)||h===n.id&&g(null)},onDrop:e=>w(e,n.id),className:`${pR} group border select-none ${i?`cursor-not-allowed`:o?`cursor-grabbing`:`cursor-grab`} ${a?`border-primary ring-2 ring-primary/25`:`border-border/60`} ${s?`ring-2 ring-primary/50 ring-offset-2 ring-offset-surface`:``} ${o?`opacity-60`:``}`,children:[(0,V.jsx)(`img`,{src:n.previewUrl,alt:``,draggable:!1,className:`pointer-events-none absolute inset-0 h-full w-full object-cover`}),(0,V.jsxs)(`div`,{className:`absolute inset-x-0 top-0 flex items-start justify-between gap-2 p-2`,children:[a?(0,V.jsxs)(`span`,{className:`inline-flex items-center gap-1 rounded-full bg-primary px-2.5 py-1 text-[10px] font-black uppercase tracking-wide text-primary-foreground shadow-md`,children:[(0,V.jsx)(nj,{size:11,fill:`currentColor`}),`Cover`]}):(0,V.jsx)(`button`,{type:`button`,disabled:i,onClick:()=>r(e,n.id),onMouseDown:e=>e.stopPropagation(),className:`${hR} hover:text-primary`,"aria-label":`Set as cover photo`,title:`Set as cover photo`,children:(0,V.jsx)(nj,{size:14})}),(0,V.jsx)(`button`,{type:`button`,disabled:i,onClick:()=>y(n.id),onMouseDown:e=>e.stopPropagation(),className:`${hR} hover:bg-error hover:text-white hover:ring-error/30`,"aria-label":`Remove photo`,children:(0,V.jsx)(mj,{size:14,strokeWidth:2.5})})]})]},n.id)})]}),(0,V.jsx)(`input`,{ref:l,type:`file`,accept:`image/*`,multiple:!0,className:`hidden`,disabled:i,onChange:e=>{v(e.target.files),e.target.value=``}}),a?(0,V.jsx)(`p`,{className:`text-xs font-semibold text-error`,role:`alert`,children:a}):null]})}function yR(e,t,n,r){return[`manual-listing-field w-full rounded-lg border-2 bg-surface px-3.5 py-3 text-sm font-medium`,`flex items-center justify-between gap-2 text-left`,`outline-none transition-[color,border-color]`,`focus:outline-none focus-visible:outline-none`,`focus:!ring-0 focus-visible:!ring-0 focus:!ring-offset-0 focus-visible:!ring-offset-0`,r?`cursor-not-allowed opacity-60`:`cursor-pointer`,t||e?`border-error/50`:n?`border-primary`:`border-border/60`].join(` `)}function bR(e,t){return e?.length?e:t?.flatMap(e=>e.options)??[]}function xR({label:e,value:t,onChange:n,options:r,groups:i,placeholder:a=`Selectâ¦`,disabled:o=!1,highlight:s=!1,error:c=null,searchable:l=!1,searchPlaceholder:u=`Searchâ¦`,required:d=!1,fieldId:f}){let[p,m]=(0,b.useState)(!1),[h,g]=(0,b.useState)(``),_=(0,b.useRef)(null),v=(0,b.useRef)(null),[y,S]=(0,b.useState)(null),C=(0,b.useMemo)(()=>bR(r,i),[r,i]),w=(0,b.useMemo)(()=>C.find(e=>e.value===t)??null,[C,t]),T=(0,b.useMemo)(()=>
36{if(!i?.length)return null;let e=h.trim().toLowerCase();return e?i.map(t=>({...t,options:t.options.filter(n=>`${t.title} ${n.label}`.toLowerCase().includes(e))})).filter(e=>e.options.length>0):i},[i,h]),E=(0,b.useMemo)(()=>{if(i?.length)return null;let e=h.trim().toLowerCase();return e?(r??[]).filter(t=>t.label.toLowerCase().includes(e)):r??[]},[i,r,h]),D=(0,b.useCallback)(()=>{_.current&&S(oN(_.current))},[]),O=(0,b.useCallback)(()=>{m(!1),g(``)},[]),k=(0,b.useCallback)(()=>{o||m(!0)},[o]);(0,b.useLayoutEffect)(()=>{if(p)return D(),window.addEventListener(`resize`,D),window.addEventListener(`scroll`,D,!0),()=>{window.removeEventListener(`resize`,D),window.removeEventListener(`scroll`,D,!0)}},[p,D,T,E,h]),(0,b.useEffect)(()=>{if(!p)return;let e=e=>{e.key===`Escape`&&O()};return document.addEventListener(`keydown`,e),()=>document.removeEventListener(`keydown`,e)},[O,p]),(0,b.useEffect)(()=>{if(!p)return;let e=e=>{let t=e.target;_.current?.contains(t)||v.current?.contains(t)||O()};return document.addEventListener(`mousedown`,e),()=>document.removeEventListener(`mousedown`,e)},[O,p]);let A=e=>{n(e),O()},j=i?.length?!!T?.length:!!E?.length,M=p&&y?(0,x.createPortal)((0,V.jsxs)(V.Fragment,{children:[(0,V.jsx)(`div`,{className:`fixed inset-0 z-[1190]`,"aria-hidden":!0}),(0,V.jsxs)(ik.div,{ref:v,role:`listbox`,"aria-label":e,initial:{opacity:0,y:y.placement===`bottom`?6:-6},animate:{opacity:1,y:0},transition:{duration:.15},style:{position:`fixed`,left:y.left,width:y.width,maxHeight:y.maxHeight,...y.placement===`bottom`?{top:y.top??0,bottom:`auto`}:{top:`auto`,bottom:y.bottom??0}},className:`z-[1200] flex max-w-[calc(100vw-16px)] flex-col overflow-hidden rounded-lg border border-border/60 bg-surface shadow-2xl`,children:[l?(0,V.jsx)(`div`,{className:`shrink-0 border-b border-border/40 p-2`,children:(0,V.jsxs)(`div`,{className:`relative`,children:[(0,V.jsx)(UA,{size:15,className:`pointer-events-none absolute left-3 top-1/2 -translate-y-1/2 text-muted-foreground`,"aria-hidden":!0}),(0,V.jsx)(`input`,{type:`text`,value:h,onChange:e=>g(e.target.value),placeholder:u,className:`manual-listing-field w-full rounded-lg border-2 border-border/60 bg-surface py-2 pl-9 pr-3 text-sm font-medium text-foreground outline-none placeholder:text-muted-foreground/55 focus:border-primary focus:outline-none focus:!ring-0`})]})}):null,(0,V.jsx)(`div`,{className:`custom-scrollbar min-h-0 flex-1 overflow-y-auto p-1.5`,children:j?T?T.map(e=>(0,V.jsxs)(`div`,{className:`mb-2 last:mb-0`,children:[(0,V.jsx)(`p`,{className:`px-2.5 py-2 text-[10px] font-black uppercase tracking-[0.18em] text-muted-foreground/75`,children:e.title}),(0,V.jsx)(`div`,{className:`space-y-0.5`,children:e.options.map(e=>{let n=t===e.value;return(0,V.jsxs)(`button`,{type:`button`,role:`option`,"aria-selected":n,onClick:()=>A(e.value),className:`flex w-full items-center justify-between gap-2 rounded-lg px-2.5 py-2.5 text-left transition-colors ${n?`bg-primary text-primary-foreground`:`text-foreground hover:bg-surface-elevated`}`,children:[(0,V.jsx)(`span`,{className:`block min-w-0 flex-1 truncate text-sm font-semibold`,children:e.label}),n?(0,V.jsx)(Fk,{size:15,strokeWidth:2.5,className:`shrink-0`}):null]},e.value)})})]},e.title)):E?.map(e=>{let n=t===e.value;return(0,V.jsxs)(`button`,{type:`button`,role:`option`,"aria-selected":n,onClick:()=>A(e.value),className:`mb-0.5 flex w-full items-center justify-between gap-2 rounded-lg px-2.5 py-2.5 text-left transition-colors last:mb-0 ${n?`bg-primary text-primary-foreground`:`text-foreground hover:bg-surface-elevated`}`,children:[(0,V.jsx)(`span`,{className:`truncate text-sm font-semibold`,children:e.label}),n?(0,V.jsx)(Fk,{size:15,strokeWidth:2.5,className:`shrink-0`}):null]},e.value)}):(0,V.jsx)(`p`,{className:`px-3 py-6 text-center text-sm font-medium text-muted-foreground`,children:`No matches found.`})})]})]}),document.body):null;return(0,V.jsxs)(`div`,{id:f,children:[(0,V.jsx)(OL,{required:d,children:e}),(0,V.jsxs)(`button`,{ref:_,type:`button`,disabled:o,"aria-haspopup":`listbox`,"aria-expanded":p,"aria-invalid":!!c,onClick:()=>p?O():k(),className:yR(s,!!c,p,o),children:[(0,V.jsx)(`span`,{className:`min-w-0 flex-1`,children:w?(0,V.jsxs)(V.Fragment,{children:[(0,V.jsx)(`span`,{className:`block truncate text-foreground`,children:w.label}),w.description?(0,V.jsx)(`span`,{className:`mt-0.5 block truncate text-xs font-medium text-muted-foreground`,children:w.description}):null]}):(0,V.jsx)(`span`,{className:`block truncate font-medium text-muted-foreground
36/55`,children:a})}),(0,V.jsx)(Ik,{size:16,className:`shrink-0 text-muted-foreground transition-transform duration-200 ${p?`rotate-180 text-primary`:``}`})]}),c?(0,V.jsx)(`p`,{className:`mt-1.5 text-xs font-semibold text-error`,role:`alert`,children:c}):null,M]})}function SR({current:e,max:t}){return(0,V.jsxs)(`p`,{className:`mt-1 text-right text-xs font-semibold text-muted-foreground`,children:[e,`/`,t]})}function CR(e,t){return[`manual-listing-field w-full rounded-lg border-2 bg-surface px-3.5 py-3 text-sm font-medium text-foreground`,`outline-none placeholder:text-muted-foreground/55`,`transition-[color,border-color]`,`focus:outline-none focus-visible:outline-none`,`focus:!ring-0 focus-visible:!ring-0 focus:!ring-offset-0 focus-visible:!ring-offset-0`,`disabled:opacity-60`,e||t?`border-error/50 focus:border-error focus-visible:border-error`:`border-border/60 focus:border-primary focus-visible:border-primary`].join(` `)}function wR(e){return e.replace(/\D/g,``)}function TR({message:e}){return e?(0,V.jsx)(`p`,{className:`mt-1.5 text-xs font-semibold text-error`,role:`alert`,children:e}):null}function ER(e){return e.map(e=>({label:e,value:e}))}function DR({open:e,mode:t,listingType:n,listing:r,onClose:i,onSaved:a}){let o=n??(r?mI(r):`item`),s=t===`complete-repost`,[c,l]=(0,b.useState)(``),[u,d]=(0,b.useState)(``),[f,p]=(0,b.useState)(``),[m,h]=(0,b.useState)(``),[g,_]=(0,b.useState)(``),[v,y]=(0,b.useState)(`Car/Truck`),[S,C]=(0,b.useState)(``),[w,T]=(0,b.useState)(``),[E,D]=(0,b.useState)(``),[O,k]=(0,b.useState)(``),[A,j]=(0,b.useState)(``),[M,N]=(0,b.useState)(``),[P,F]=(0,b.useState)(``),[ee,I]=(0,b.useState)(``),[te,ne]=(0,b.useState)(``),[re,ie]=(0,b.useState)(``),[ae,oe]=(0,b.useState)(null),[se,ce]=(0,b.useState)([]),[le,ue]=(0,b.useState)(null),[de,fe]=(0,b.useState)(null),[L,pe]=(0,b.useState)({}),[me,he]=(0,b.useState)(!1),[ge,_e]=(0,b.useState)(!1),[ve,ye]=(0,b.useState)(!1),[be,xe]=(0,b.useState)(e),[Se,Ce]=(0,b.useState)(null),we=(0,b.useRef)(null),Te=(0,b.useRef)(0),[Ee,De]=(0,b.useState)(!1),Oe=(0,b.useCallback)(()=>{Te.current=Date.now()+800,De(!0),ye(!1),window.setTimeout(()=>De(!1),800)},[]),ke=(0,b.useCallback)(()=>{Date.now()<Te.current||i()},[i]);e!==be&&(xe(e),e||ye(!1));let Ae=(0,b.useMemo)(()=>cI(),[]),je=(0,b.useMemo)(()=>vI(),[]),Me=(0,b.useMemo)(()=>ER(rI),[]),Ne=(0,b.useMemo)(()=>ER(Jce),[]),Pe=(0,b.useMemo)(()=>ER(Yce),[]),Fe=(0,b.useMemo)(()=>ER(Ae),[Ae]),Ie=(0,b.useMemo)(()=>ER(iI),[]),Le=(0,b.useMemo)(()=>ER(aI),[]),Re=(0,b.useMemo)(()=>ER(MI),[]),ze=(0,b.useMemo)(()=>ER(NI),[]),Be=(0,b.useMemo)(()=>ER(PI),[]),Ve=(0,b.useMemo)(()=>ER(qI(v)),[v]),He=(0,b.useCallback)(()=>({listingType:o,photos:se,title:c,price:u,category:g,condition:o===`item`?m:re,location:ae,description:f,vehicleType:v,make:S,model:w,bodyStyle:E,year:O,mileage:A,transmission:M}),[o,se,c,u,g,m,re,ae,f,v,S,w,E,O,A,M]),Ue=(0,b.useCallback)(()=>{let e=gL(He());return pe(e),he(!0),e},[He]),We=sL(Se,(0,b.useMemo)(()=>oL({listingType:o,title:c,price:u,description:f,condition:m,category:g,vehicleType:v,make:S,model:w,bodyStyle:E,year:O,mileage:A,transmission:M,fuelType:P,exterior
36Color:ee,interiorColor:te,vehicleCondition:re,location:ae,photos:se,primaryPhotoId:le}),[o,c,u,f,m,g,v,S,w,E,O,A,M,P,ee,te,re,ae,se,le])),Ge=t===`create`||We,Ke=(0,b.useCallback)(e=>{pe(t=>{if(!t[e])return t;let n={...t};return delete n[e],n})},[]),qe=(0,b.useCallback)(e=>me?L[e]:void 0,[L,me]),Je=(0,b.useMemo)(()=>s?vL(He()):new Set,[s,He]),Ye=(0,b.useCallback)(e=>Je.has(e)||!!qe(e),[Je,qe]),Xe=(0,b.useCallback)(e=>{y(e),C(``),BI(e)||D(``),VI(e)||j(``),HI(e)||N(``),UI(e)||I(``),WI(e)||ne(``),GI(e)||F(``),KI(e)||ie(``),Ke(`vehicleType`),Ke(`bodyStyle`),Ke(`mileage`),Ke(`transmission`),Ke(`condition`)},[Ke]),Ze=(0,b.useCallback)(e=>{l(e.title??``),d(String(e.price??``)),p(e.description??``);let t=mI(e);h(t===`item`?mL(e.condition):``),_(gI(e)),y(e.repost_summary?.repost?.vehicle_type??`Car/Truck`),C(e.repost_summary?.repost?.make??``),T(e.repost_summary?.repost?.model??``),D(e.repost_summary?.repost?.body_style??``),k(e.year==null?``:String(e.year)),j(e.mileage==null?``:String(e.mileage)),N(pL(e.transmission_type)),F(e.fuel_type??``),I(e.exterior_color??``),ne(e.interior_color??``),ie(t===`vehicle`?hL(e.condition):``),oe(_I(e));let n=ZI(e);ce(n.photos),ue(n.primaryPhotoId),we.current=e.images?.length?[...e.images]:e.primary_image_url?[e.primary_image_url]:[],Ce(aL(e)),fe(null),pe({}),he(!1)},[]);(0,b.useEffect)(()=>{if(!e){we.current=null;return}r?Ze(r):(l(``),d(``),p(``),h(``),_(``),y(`Car/Truck`),C(``),T(``),D(``),k(``),j(``),N(``),F(``),I(``),ne(``),ie(``),oe(null),ce([]),ue(null),we.current=null,Ce(null),fe(null),pe({}),he(!1))},[r?.id,e,Ze]),(0,b.useEffect)(()=>{if(!e||!r)return;let t=r.images?.length?r.images:r.primary_image_url?[r.primary_image_url]:[],n=we.current;if(!(!n||eL(n,t))){if(n.length===t.length&&t.length>0){ce(e=>$I(e,n,t)),we.current=[...t],Ce(aL(r));return}Ze(r)}},[e,r,Ze]),(0,b.useEffect)(()=>{if(!e)return;document.body.style.overflow=`hidden`;let t=e=>{if(e.key===`Escape`&&!ge){if(ve){e.stopPropagation(),Oe();return}ke()}};return window.addEventListener(`keydown`,t),()=>{document.body.style.overflow=``,window.removeEventListener(`keydown`,t)}},[e,ge,ve,Oe,ke]);let Qe=async e=>{if(e.preventDefault(),fe(null),t!==`create`&&!We)return;let n=Ue();if(yL(n)){wL(SL(n,o));return}_e(!0);try{let e=JI(se,le),n={listing_type:o,price:Number(u),description:f.trim()||null,location:ae,currency_symbol:r?.currency_symbol??`$`,primary_image_index:0,...o===`item`?{title:c.trim()}:{},category_label:o===`item`?g.trim():null,condition:o===`item`?m.trim():re.trim()||null,make:o===`vehicle`?S.trim():null,model:o===`vehicle`?w.trim():null,vehicle_type:o===`vehicle`?v.trim():null,body_style:o===`vehicle`&&BI(v)?E.trim():null,year:o===`vehicle`?Number(O):null,mileage:o===`vehicle`&&VI(v)?Number(A):null,transmission_type:o===`vehicle`&&HI(v)?M.trim():null,fuel_type:o===`vehicle`&&GI(v)&&P.trim()||null,exterior_color:o===`vehicle`&&UI(v)&&ee.trim()||null,interior_color:o===`vehicle`&&WI(v)&&te.trim()||null};if(t===`create`){let t=e.map(e=>e.file).filter(e=>!!e),r=await ps(n,t);eN&&nN.capture(`personal_listing_created`,{listing_type:o,photo_count:t.length}),a(r),i();return}if(!r)return;let{imageOrder:s,newFiles:l}=YI(e);a(await ms(r.id,{...n,image_order:s},l)),i()}catch(e){if(e instanceof ho&&e.details?.error===`validation_error`&&typeof e.details.message==`string`){let t=EL(typeof e.details.field==`string`?e.details.field:void 0);if(t){pe({[t]:e.details.message}),he(!0),wL(t);return}}fe(vs(e))}finally{_e(!1)}},$e=t===`complete-repost`?`Complete listing for repost`:t===`create`?`Create ${o} listing`:`Edit listing`;return(0,x.createPortal)((0,V.jsx)(zD,{children:e?(0,V.jsxs)(ik.div,{className:`fixed inset-0 z-[1100]`,initial:{opacity:0}
36,animate:{opacity:1},exit:{opacity:0},children:[(0,V.jsx)(`div`,{className:`absolute inset-0 bg-black/55 backdrop-blur-[2px] ${Ee?`pointer-events-none`:``}`,onClick:()=>{if(!(ge||Ee)){if(ve){Oe();return}ke()}},"aria-hidden":`true`}),(0,V.jsxs)(`div`,{className:`relative ml-auto h-full w-full max-w-full sm:w-[28rem] sm:max-w-[28rem]`,children:[(0,V.jsx)(fR,{open:ve,initialLocation:ae,onClose:Oe,onConfirm:e=>{oe(e),Ke(`location`),Oe()}}),(0,V.jsxs)(ik.aside,{role:`dialog`,"aria-modal":`true`,"aria-labelledby":`manual-listing-sidebar-title`,className:`relative z-[1101] flex h-full w-full flex-col overflow-hidden border-l border-border/60 bg-surface shadow-[-24px_0_60px_rgba(0,0,0,0.35)]`,initial:{x:`100%`},animate:{x:0},exit:{x:`100%`},transition:{type:`spring`,damping:32,stiffness:320},children:[(0,V.jsxs)(`div`,{className:`flex shrink-0 items-center justify-between border-b border-border/40 px-5 py-4`,children:[(0,V.jsxs)(`div`,{className:`min-w-0 pr-3`,children:[(0,V.jsx)(`h2`,{id:`manual-listing-sidebar-title`,className:`text-xl font-black tracking-tight text-foreground`,children:$e}),(0,V.jsx)(`p`,{className:`mt-1 text-xs font-medium text-muted-foreground`,children:o===`item`?`General item`:`Vehicle`})]}),(0,V.jsx)(`button`,{type:`button`,onClick:ke,disabled:ge,className:`flex h-10 w-10 items-center justify-center rounded-full border border-border/60 text-muted-foreground hover:bg-surface-elevated`,"aria-label":`Close`,children:(0,V.jsx)(mj,{size:18})})]}),(0,V.jsxs)(`form`,{onSubmit:e=>void Qe(e),className:`flex min-h-0 flex-1 flex-col`,children:[(0,V.jsxs)(`div`,{className:`custom-scrollbar min-h-0 flex-1 space-y-5 overflow-y-auto px-5 py-5`,children:[(0,V.jsx)(vR,{fieldId:CL(`photos`),photos:se,primaryPhotoId:le,maxPhotos:uI(o),onChange:(e,t)=>
36{ce(e),ue(t),Ke(`photos`)},disabled:ge,required:!0,error:qe(`photos`),highlight:Ye(`photos`)}),(0,V.jsx)(`div`,{className:`flex flex-col gap-4`,children:o===`item`?(0,V.jsxs)(V.Fragment,{children:[(0,V.jsxs)(`div`,{id:CL(`title`),children:[(0,V.jsx)(OL,{required:!0,children:`Title`}),(0,V.jsx)(`input`,{value:c,onChange:e=>{l(e.target.value),Ke(`title`)},disabled:ge,maxLength:lI.maxTitleLength,placeholder:`e.g. Vintage leather jacket`,"aria-invalid":!!qe(`title`),className:CR(Ye(`title`),!!qe(`title`))}),(0,V.jsx)(SR,{current:c.length,max:lI.maxTitleLength}),(0,V.jsx)(TR,{message:qe(`title`)})]}),(0,V.jsxs)(`div`,{id:CL(`price`),children:[(0,V.jsx)(OL,{required:!0,children:`Price`}),(0,V.jsx)(`input`,{type:`text`,inputMode:`decimal`,autoComplete:`off`,value:u,onChange:e=>{d(FF(e.target.value)),Ke(`price`)},disabled:ge,placeholder:`0.00`,"aria-invalid":!!qe(`price`),className:CR(Ye(`price`),!!qe(`price`))}),(0,V.jsx)(TR,{message:qe(`price`)})]}),(0,V.jsx)(xR,{fieldId:CL(`category`),label:`Category`,value:g,onChange:e=>{_(e),Ke(`category`)},groups:je,placeholder:`Select category`,disabled:ge,required:!0,error:qe(`category`),highlight:Ye(`category`),searchable:!0,searchPlaceholder:`Search categoriesâ¦`}),(0,V.jsx)(xR,{fieldId:CL(`condition`),label:`Condition`,value:m,onChange:e=>{h(e),Ke(`condition`)},options:Me,placeholder:`Select condition`,disabled:ge,required:!0,error:qe(`condition`),highlight:Ye(`condition`)})]}):(0,V.jsxs)(V.Fragment,{children:[(0,V.jsx)(xR,{fieldId:CL(`vehicleType`),label:`Vehicle type`,value:v,onChange:Xe,options:Ne,placeholder:`Select vehicle type`,disabled:ge,required:!0,error:qe(`vehicleType`),highlight:Ye(`vehicleType`)}),zI(v)?(0,V.jsx)(xR,{fieldId:CL(`make`),label:`Make`,value:S,onChange:e=>{C(e),Ke(`make`)},options:Ve,placeholder:`Select make`,disabled:ge,required:!0,searchable:!0,searchPlaceholder:`Search makesâ¦`,error:qe(`make`),highlight:Ye(`make`)}):(0,V.jsxs)(`div`,{id:CL(`make`),children:[(0,V.jsx)(OL,{required:!0,children:`Make`}),(0,V.jsx)(`input`,{value:S,onChange:e=>{C(e.target.value),Ke(`make`)},disabled:ge,placeholder:`Enter make`,maxLength:lI.maxMakeLength,"aria-invalid":!!qe(`make`),className:CR(Ye(`make`),!!qe(`make`))}),(0,V.jsx)(SR,{current:S.length,max:lI.maxMakeLength}),(0,V.jsx)(TR,{message:qe(`make`)})]}),(0,V.jsxs)(`div`,{id:CL(`model`),children:[(0,V.jsx)(OL,{required:!0,children:`Model`}),(0,V.jsx)(`input`,{value:w,onChange:e=>{T(e.target.value),Ke(`model`)},disabled:ge,placeholder:`Enter model`,maxLength:lI.maxModelLength,"aria-invalid":!!qe(`model`),className:CR(Ye(`model`),!!qe(`model`))}),(0,V.jsx)(SR,{current:w.length,max:lI.maxModelLength}),(0,V.jsx)(TR,{message:qe(`model`)})]}),BI(v)?(0,V.jsx)(xR,{fieldId:CL(`bodyStyle`),label:`Body style`,value:E,onChange:e=>{D(e),Ke(`bodyStyle`)},options:Pe,placeholder:`Select body style`,disabled:ge,required:!0,error:qe(`bodyStyle`),highlight:Ye(`bodyStyle`)}):null,(0,V.jsx)(xR,{fieldId:CL(`year`),label:`Year`,value:O,onChange:e=>{k(e),Ke(`year`)},options:Fe,placeholder:`Select year`,disabled:ge,required:!0,error:qe(`year`),highlight:Ye(`year`),searchable:!0,searchPlaceholder:`Search yearâ¦`}),(0,V.jsxs)(`div`,{id:CL(`price`),children:[(0,V.jsx)(OL,{required:!0,children:`Price`}),(0,V.jsx)(`input`,{type:`text`,inputMode:`decimal`,autoComplete:`off`,value:u,onChange:e=>{d(FF(e.target.value)),Ke(`price`)},disabled:ge,placeholder:`0.00`,"aria-invalid":!!qe(`price`),className:CR(Ye(`price`),!!qe(`price`))}),(0,V.jsx)(TR,{message:qe(`price`)})]})]})}),(0,V.jsx)(ML,{fieldId:CL(`location`),value:ae,onChange:e=>{oe(e),Ke(`location`)},disabled:ge,onOpen:()=>ye(!0),required:!0,error:qe(`location`),highlight:Ye(`location`)},r?.id??`create`),o===`vehicle`?(0,V.jsxs)(`div`,{className:`flex flex-col gap-4`,children:[VI(v)?(0,V.jsxs)(`div`,{id:CL(`mileage`),children:[(0,V.jsx)(OL,{required:!0,children:`Mileage (km)`}),(0,V.jsx)(`input`,{type:`text`,inputMode:`numeric`,autoComplete:`off`,value:A,onChange:e=>{j(wR(e.target.value)),Ke(`mileage`)},disabled:ge,placeholder:`e.g. 45000`,"aria-invalid":!!qe(`mileage`),className:CR(Ye(`mileage`),!!qe(`mileage`))}),(0,V.jsx)(TR,{message:qe(`mileage`)})]}):null,UI(v)?(0,V.jsx)(xR,{label:`Exterior color`,value:ee,onChange:I,options:Re,placeholder:`Optional`,disabled:ge}):null,WI(v)?(0,V.jsx)(xR,{label:`Interior color`,value:te,onChange:ne,options:ze,placeholder:`Optional`,disabled:ge}):null,GI(v)?(0,V.jsx)(xR,{label:`Fuel type`,value:P,onChange:F,options:Le,placeholder:`Optional`,disabled:ge}):null,HI(v)?(0,V.jsx)(xR,{fieldId:CL(`transmission`),label:`Transmission`,value:M,onChange:e=>{N(e),Ke(`transmission`)},options:Ie,placeholder:`Select transmission`,disabled:ge,required:!0,error:qe(`transmission`),highlight:Ye(`transmission`)}):null,KI(v)?(0,V.jsx)(xR,{fieldId:CL(`condition`),label:`Vehicle condition`,value:re,onChange:e=>{ie(e),Ke(`condition`)},options:Be,placeholder:`Optional`,disabled:ge,error:qe(`condition`),highlight:Ye(`condition`)}):null]}):null,(0,V.jsxs)(`div`,{id:CL(`description`),children:[(0,V.jsx)(OL,{children:`Description`}),(0,V.jsx)(`textarea`,{value:f,onChange:e=>{p(e.target.value),Ke(`description`)},disabled:ge,rows:4,maxLength:lI.maxDescriptionLength,placeholder:`Describe condition, features, and pickup detailsâ¦`,"aria-invalid":!!qe(`description`),className:`${CR(Ye(`description`),!!qe(`description`))} min-h-[120px] resize-none`}),(0,V.jsx)(SR,{current:f.length,max:lI.maxDescriptionLength}),(0,V.jsx)(TR,{message:qe(`description`)})]}),de?(0,V.jsxs)(`div`,{role:`alert`,className:`flex gap-2 rounded-xl border border-error/25 bg-error/10 px-3 py-2.5 text-sm font-semibold text-error`,children:[(0,V.jsx)(Bk,{size:18,className:`shrink-0`}),de]}):null]}),(0,V.jsx)(`div`,{className:`shrink-0 border-t border-border/40 px-5 py-4`,children:(0,V.jsx)(`button`,{type:`submit`,disabled:ge||!Ge,className:`flex h-12 w-full items-center justify-center gap-2 rounded-2xl bg-primary text-sm font-black text-primary-foreground shadow-lg shadow-primary/20 disabled:opacity-60`,children:ge?(0,V.jsxs)(V.Fragment,{children:[(0,V.jsx)(_A,{size:18,className:`animate-spin`}),`Savingâ¦`]}):t===`create`?`Create listing`:`Save listing`})})]})]})]})]}):null}),document.body)}var OR=10080,kR=1440,AR=[720,1440,2880,4320,7200,10080];function jR(e){return Math.min(OR,Math.max(720,e))}function MR(e){let t=jR(e),n=Math.round((t-720)/720),r=(OR-720)/720;return 720+Math.min(Math.max(n,0),r)*720}function NR(e){return jR(MR(e)+720)}function PR(e){return jR(MR(e)-720)}function FR(e){return MR(e)<OR}function IR(e){return MR(e)>720}function LR(e){let t=MR(e);if(t===720)return`Every 12 hours`;if(t===1440)return`Every 24 hours`;let n=Math.floor(t/60),r=Math.floor(n/24),i=n%24;return r>0&&i===0?r===1?`Every 1 day`:`Every ${r} days`:r>0&&i>0?`Every ${r===1?`1 day`:`${r} days`} ${i===1?`1 hour`:`${i} hours`}`:`Every ${n===1?`1 hour`:`${n} hours`}`}function RR(e){switch(MR(e)){case 720:return`12 hours`;case 1440:return`1 day`;case 2880:return`2 days`;case 4320:return`3 days`;case 7200:return`5 days`;case 10080:return`7 days`;default:return LR(e).replace(/^Every /,``)}}function zR(e){switch(e){case`active`:return`Active`;case`pending`:return`Pending`;case`posted`:return`Posted`;case`failed`:return`Failed`;case`paused`:return`Paused`;default:return`Off`}}function BR(e){switch(e){case`active`:case`posted`:return`success`;case`pending`:return`warning`;
36case`failed`:return`error`;default:return`muted`}}function VR(e){return MR(e??1440)}function HR({open:e,listing:t,onClose:n,onListingUpdated:r}){let i=t?.repost_summary?.repost,a=t?.repost_summary?.can_repost??!1,o=t?.repost_summary?.has_repost_addon??!1,[s,c]=(0,b.useState)(kR),[l,u]=(0,b.useState)(kR),[d,f]=(0,b.useState)(!1),[p,m]=(0,b.useState)(null),[h,g]=(0,b.useState)(!1),[_,v]=(0,b.useState)(null),[y,S]=(0,b.useState)(!1),C=(0,b.useCallback)(()=>{let e=VR(i?.interval_minutes);c(e),u(e),f(!1),m(null),v(null)},[i?.interval_minutes]);(0,b.useEffect)(()=>{e&&C()},[e,C]);let w=s!==(p??l),T=()=>{m(s),f(!0),v(null)},E=()=>{c(p??l),f(!1),m(null),v(null)},D=e=>{c(MR(e))},O=(0,b.useCallback)(()=>{if(!h){if(d){c(p??l),f(!1),m(null),v(null);return}n()}},[h,d,p,l,n]);if((0,b.useEffect)(()=>{if(!e)return;document.body.style.overflow=`hidden`;let t=e=>{e.key===`Escape`&&!h&&!y&&O()};return window.addEventListener(`keydown`,t),()=>{document.body.style.overflow=``,window.removeEventListener(`keydown`,t)}},[e,h,y,O]),!t)return null;let k=i?.enabled??!1,A=zR(i?.status??`inactive`),j=BR(i?.status??`inactive`),M=e=>{let t=VR(e.repost_summary?.repost?.interval_minutes);c(t),u(t),f(!1),m(null),r(e)},N=async()=>{g(!0),v(null);try{M(await hs(t.id,{interval_minutes:s}))}catch(e){v(ys(e))}finally{g(!1)}},P=async()=>{g(!0),v(null);try{M(await gs(t.id,{interval_minutes:s}))}catch(e){v(ys(e))}finally{g(!1)}},F=async()=>{g(!0),v(null);try{M(await _s(t.id)),S(!1)}catch(e){v(ys(e))}finally{g(!1)}},ee=j===`success`?`border-success/30 bg-success/10 text-success`:j===`warning`?`border-warning/35 bg-warning/10 text-warning`:j===`error`?`border-error/30 bg-error/10 text-error`:`border-border bg-surface-elevated text-muted-foreground`,I=k?`Manage repost`:`Set up repost`;return(0,x.createPortal)((0,V.jsxs)(V.Fragment,{children:[(0,V.jsx)(zD,{children:e?(0,V.jsxs)(ik.div,{className:`fixed inset-0 z-[1100]`,initial:{opacity:0}
36,animate:{opacity:1},exit:{opacity:0},children:[(0,V.jsx)(`div`,{className:`absolute inset-0 bg-black/55 backdrop-blur-[2px]`,onClick:O,"aria-hidden":`true`}),(0,V.jsx)(`div`,{className:`relative ml-auto h-full w-full max-w-full sm:w-[28rem] sm:max-w-[28rem]`,children:(0,V.jsxs)(ik.aside,{role:`dialog`,"aria-modal":`true`,"aria-labelledby":`repost-config-sidebar-title`,className:`relative z-[1101] flex h-full w-full flex-col overflow-hidden border-l border-border/60 bg-surface shadow-[-24px_0_60px_rgba(0,0,0,0.35)]`,initial:{x:`100%`},animate:{x:0},exit:{x:`100%`},transition:{type:`spring`,damping:32,stiffness:320},children:[(0,V.jsxs)(`div`,{className:`flex shrink-0 items-center justify-between border-b border-border/40 px-5 py-4`,children:[(0,V.jsxs)(`div`,{className:`flex min-w-0 items-center gap-3 pr-3`,children:[(0,V.jsx)(`div`,{className:`flex h-11 w-11 shrink-0 items-center justify-center rounded-xl bg-primary/10 text-primary`,children:(0,V.jsx)(BA,{size:22})}),(0,V.jsxs)(`div`,{className:`min-w-0`,children:[(0,V.jsx)(`h2`,{id:`repost-config-sidebar-title`,className:`text-xl font-black tracking-tight text-foreground`,children:I}),(0,V.jsx)(`p`,{className:`text-xs font-medium text-muted-foreground`,children:`Automated Facebook Marketplace relisting`})]})]}),(0,V.jsx)(`button`,{type:`button`,onClick:O,disabled:h,className:`flex h-10 w-10 shrink-0 items-center justify-center rounded-full border border-border/60 text-muted-foreground hover:bg-surface-elevated`,"aria-label":`Close`,children:(0,V.jsx)(mj,{size:18})})]}),(0,V.jsxs)(`div`,{className:`custom-scrollbar min-h-0 flex-1 space-y-5 overflow-y-auto px-5 py-5`,children:[o?null:(0,V.jsxs)(`div`,{className:`rounded-2xl border border-warning/35 bg-warning/10 px-4 py-4 text-sm`,children:[(0,V.jsx)(`p`,{className:`font-bold text-warning`,children:`Repost add-on required`}),(0,V.jsx)(`p`,{className:`mt-1 text-muted-foreground`,children:`Enable the Repost add-on in Subscription settings to automate relisting.`})]}),o&&!a?(0,V.jsx)(`div`,{className:`rounded-2xl border border-border bg-surface-elevated/50 px-4 py-4 text-sm text-muted-foreground`,children:`Repost is only available for available Facebook listings.`}):null,o&&a?(0,V.jsxs)(V.Fragment,{children:[(0,V.jsx)(`div`,{className:`rounded-2xl border border-border/60 bg-surface-elevated/30 p-4`,children:(0,V.jsxs)(`div`,{className:`flex items-center justify-between gap-3`,children:[(0,V.jsxs)(`div`,{children:[(0,V.jsx)(`p`,{className:`text-sm font-bold text-foreground`,children:k?`Automated repost is on`:`Automated repost is off`}),(0,V.jsx)(`p`,{className:`mt-1 text-xs text-muted-foreground`,children:k?`Your listing will be reposted on the schedule below.`:`Choose how often to repost, then turn it on.`})]}),(0,V.jsx)(`span`,{className:`inline-flex rounded-full border px-2.5 py-1 text-[10px] font-black uppercase tracking-wide ${ee}`,children:A})]})}),(0,V.jsxs)(`div`,{className:`rounded-2xl border border-border/60 bg-surface p-4`,children:[(0,V.jsxs)(`div`,{className:`flex items-start justify-between gap-3`,children:[(0,V.jsxs)(`div`,{children:[(0,V.jsx)(`p`,{className:`text-[10px] font-black uppercase tracking-[0.2em] text-muted-foreground/70`,children:`Schedule`}),(0,V.jsx)(`p`,{className:`mt-2 text-lg font-black text-foreground`,children:LR(s)})]}),d?null:(0,V.jsx)(`button`,{type:`button`,disabled:h,onClick:T,className:`shrink-0 text-sm font-bold text-primary hover:underline disabled:opacity-50`,children:`Edit`})]}),d?(0,V.jsxs)(`div`,{className:`mt-5 space-y-4`,children:[(0,V.jsxs)(`div`,{className:`flex items-center justify-between gap-3 rounded-xl border border-border/60 bg-surface-elevated/40 px-2 py-1`,children:[(0,V.jsx)(`button`,{type:`button`,disabled:h||!IR(s),onClick:()=>D(PR(s)),className:`flex h-11 w-11 items-center justify-center rounded-xl text-primary disabled:opacity-40`,children:(0,V.jsx)(DA,{size:18})}),(0,V.jsxs)(`div`,{className:`text-center`,children:[(0,V.jsx)(`p`,{className:`text-base font-black text-foreground`,children:LR(s)}),(0,V.jsx)(`p`,{className:`text-xs font-medium text-muted-foreground`,children:`Adjust in 12-hour steps`})]}),(0,V.jsx)(`button`,{type:`button`,disabled:h||!FR(s),onClick:()=>D(NR(s)),className:`flex h-11 w-11 items-center justify-center rounded-xl text-primary disabled:opacity-40`,children:(0,V.jsx)(IA,{size:18})})]}),(0,V.jsxs)(`div`,{children:[(0,V.jsx)(`p`,{className:`text-xs font-bold text-muted-foreground`,children:`Quick picks`}),(0,V.jsx)(`div`,{className:`mt-2 flex flex-wrap gap-2`,children:AR.map(e=>(0,V.jsx)(`button`,{type:`button`,disabled:h,onClick:()=>D(e),className:`rounded-full border px-3 py-1.5 text-xs font-bold transition-colors ${s===e?`border-primary bg-primary/10 text-primary`:`border-border bg-surface-elevated text-muted-foreground hover:border-primary/30`}`,children:RR(e)},e))})]}),(0,V.jsxs)(`div`,{className:`flex gap-3`,children:[(0,V.jsx)(`button`,{type:`button`,disabled:h,onClick:E,className:`flex h-11 flex-1 items-center justify-center rounded-xl border border-border/60 text-sm font-bold text-muted-foreground hover:bg-surface-elevated disabled:opacity-50`,children:`Cancel`}),(0,V.jsxs)(`button`,{type:`button`,disabled:h||!w,onClick:()=>void N(),className:`flex h-11 flex-1 items-center justify-center gap-2 rounded-xl bg-primary text-sm font-bold text-primary-foreground disabled:opacity-50`,children:[h?(0,V.jsx)(_A,{size:16,className:`animate-spin`}):null,`Save`]})]})]}):(0,V.jsx)(`p`,{className:`mt-2 text-xs text-muted-foreground`,children:`How often your listing is reposted to Marketplace.`})]}),k?(0,V.jsxs)(`div`,{className:`rounded-2xl border border-border/60 bg-surface-elevated/30 p-4`,children:[(0,V.jsxs)(`div`,{className:`flex items-center gap-2 text-sm font-bold text-foreground`,children:[(0,V.jsx)(fae,{size:16,className:`text-primary`}),`Activity`]}),(0,V.jsxs)(`dl`,{className:`mt-3 grid gap-3 sm:grid-cols-2`,children:[(0,V.jsxs)(`div`,{children:[(0,V.jsx)(`dt`,{className:`text-[10px] font-semibold uppercase tracking-wider text-muted-foreground`,children:`Last repost`}),(0,V.jsx)(`dd`,{className:`mt-0.5 text-sm font-semibold text-foreground`,children:kF(i?.last_reposted_at??null)||`â`})]}),(0,V.jsxs)(`div`,{children:[(0,V.jsx)(`dt`,{className:`text-[10px] font-semibold uppercase tracking-wider text-muted-foreground`,children:`Next repost`}),(0,V.jsx)(`dd`,{className:`mt-0.5 text-sm font-semibold text-foreground`,children:kF(i?.next_repost_at??null)||`â`})]})]}),i?.last_error?(0,V.jsx)(`p`,{className:`mt-3 rounded-xl border border-error/25 bg-error/10 px-3 py-2 text-xs font-semibold text-error`,children:i.last_error}):null]}):null]}):null,_?(0,V.jsxs)(`div`,{role:`alert`,className:`flex gap-2 rounded-xl border border-error/25 bg-error/10 px-3 py-2.5 text-sm font-semibold text-error`,children:[(0,V.jsx)(Bk,{size:18,className:`shrink-0`}),_]}):null]}),o&&a&&!d?(0,V.jsx)(`div`,{className:`shrink-0 border-t border-border/40 px-5 py-4`,children:k?(0,V.jsx)(`button`,{type:`button`,disabled:h,onClick:()=>S(!0),className:`flex h-12 w-full items-center justify-center rounded-2xl border border-error/35 bg-error/10 text-sm font-black text-error disabled:opacity-60`,children:`Turn off repost`}):(0,V.jsxs)(`button`,{type:`button`,disabled:h,onClick:()=>void P(),className:`flex h-12 w-full items-center justify-center gap-2 rounded-2xl bg-primary text-sm font-black text-primary-foreground shadow-lg shadow-primary/20 disabled:opacity-60`,children:[h?(0,V.jsx)(_A,{size:18,className:`animate-spin`}):(0,V.jsx)(BA,{size:18}),`Turn on repost`]})}):null]})})]}):null}),(0,V.jsx)(NF,{stackClassName:`z-[1200]`,open:y,title:`Turn off repost?`,de
36scription:`Your listing will no longer be reposted automatically. Your schedule will be saved if you turn it back on.`,confirmLabel:`Turn off repost`,variant:`danger`,isBusy:h,onCancel:()=>S(!1),onConfirm:()=>void F()})]}),document.body)}var UR=/^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i,WR={facebook:`Facebook`,ebay:`eBay`,kijiji:`Kijiji`,autotrader:`AutoTrader`},GR={facebook:_N,ebay:cF,kijiji:vN,autotrader:gN};function KR(e){if(!e)return``;let t=document.createElement(`textarea`);return t.innerHTML=e,t.value}function qR(e){return e?.trim()?`View on ${WR[e.toLowerCase()]??e.replace(/_/g,` `).replace(/\b\w/g,e=>e.toUpperCase())}`:`View listing`}function JR(e){if(!e)return{label:`Provider`,iconSrc:null,badgeText:`P`};let t=e.toLowerCase();return{label:WR[t]??`Provider`,iconSrc:GR[t]??null,badgeText:t===`kijiji`?`K`:t===`autotrader`?`AT`:`P`}}function YR({listingId:e,onRequestClose:t,backLabel:n=`Back to My Listings`,onListingUpdated:r,onListingDeleted:i}){let{unit:a}=oM(),{canUseAiNegotiationFeatures:o,accessStatus:s,status:c,hasRepostAddon:l}=bj(),{status:u}=Sy(),{gateReady:d,canUseRepostFeatures:f}=xI(),{showToast:p}=Gx(),m=my(),h=UR.test(e),[g,_]=(0,b.useState)(null),[v,y]=(0,b.useState)(``),[S,C]=(0,b.useState)(h),[w,T]=(0,b.useState)(0),[E,D]=(0,b.useState)(!1),[O,k]=(0,b.useState)(!1),[A,j]=(0,b.useState)(!1),[M,N]=(0,b.useState)(!1),[P,F]=(0,b.useState)(!1),[ee,I]=(0,b.useState)(!1),[te,ne]=(0,b.useState)(!1),[re,ie]=(0,b.useState)(`edit`),[ae,oe]=(0,b.useState)(!1),[se,ce]=(0,b.useState)(!1),[le,ue]=(0,b.useState)(null),de=(0,b.useRef)(null),fe=(0,b.useRef)(null),L=(0,b.useRef)(null),pe=(0,b.useRef)(null),me=(0,b.useRef)(null),{label:he,iconSrc:ge,badgeText:_e}=(0,b.useMemo)(()=>JR(g?.provider),[g?.provider]);(0,b.useEffect)(()=>{let e=document.body.style.overflow;return document.body.style.overflow=`hidden`,()=>{document.body.style.overflow=e}},[]),(0,b.useEffect)(()=>{let e=e=>{if(e.key===`Escape`){if(O){k(!1);return}if(P){F(!1);return}if(A){j(!1);return}if(M){N(!1);return}if(te){ne(!1),pe.current?.(null),pe.current=null;return}if(ae){oe(!1),me.current?.(null),me.current=null;return}if(ee&&!se){I(!1),ue(null);return}t()}};return window.addEventListener(`keydown`,e),()=>window.removeEventListener(`keydown`,e)},[ee,O,se,t,P,A,M,te,ae]);let ve=(0,b.useCallback)(e=>{_(e),r?.(e)},[r]),{refresh:ye,isRefreshing:be}=yI({onRefreshed:ve});Oj({onListingUpdated:t=>{if(!t.isPersonalListing||t.listingId!==e)return;let n=Aj(t.listing);_(e=>e?Eoe(e,n):n),r?.(n)}});let xe=Lj(c,u)&&o,Se=d&&!!(g?.repost_summary?.can_repost||f&&g?.provider?.toLowerCase()===`facebook`),Ce=!!g?.repost_summary?.repost?.enabled,we=(0,b.useCallback)(async()=>{if(g){if(d&&!f){p(CI(m,OI(s,l)));return}await bI(g,{onRequireAddon:()=>{p(CI(m,`repost_addon_required`))},onRequireEligibleListing:()=>{p({type:`warning`,message:`Repost unavailable`,description:`Repost is only available for available Facebook listings.`,duration:6e3})},onRequireCompleteListing:async e=>(p({type:`warning`,message:`Complete listing details`,description:`Fill in the missing fields below to enable automated reposting.`,duration:6e3}),ie(`complete-repost`),_(e),ne(!0),new Promise(e=>{pe.current=e})),onOpenRepostConfig:async e=>(_(e),oe(!0),new Promise(e=>{me.current=e})),onListingUpdated:ve,onStillIncomplete:()=>{p({type:`warning`,message:`Still incomplete`,description:`Some required fields are still missing. Please complete your listing.`,duration:6e3})}})}},[g,d,f,s,l,p,ve]),Te=(0,b.useCallback)(async(e=`edit`)=>{if(g)try{_(await ds(g.id))}catch{}ie(e),ne(!0)},[g]),Ee=()=>{ne(!1),pe.current?.(null),pe.current=null},De=e=>{ve(e),ne(!1),pe.current?.(e),pe.current=null,p({type:`success`,message:re===`complete-repost`?`Listing details saved.`:`Listing updated successfully.`})},Oe=(0,b.useCallback)(()=>{oe(!1),me.current?.(g??null),me.current=null},[g]),ke=e=>{ve(e)},Ae=`inline-flex h-11 w-full items-center justify-center gap-2 rounded-xl border border-primary/35 bg-primary/10 px-4 text-sm font-semibold text-primary transition-colors hover:bg-primary/15 active:scale-[0.98] disabled:cursor-not-allowed disabled:opacity-60`,je=(0,b.useMemo)(()=>g?dI(g):!1,[g]),Me=(0,b.useMemo)(()=>g?fI(g):!1,[g]),Ne=(0,b.useMemo)(()=>g?pI(g):null,[g]),Pe=be(e),Fe=(0,b.useCallback)(async()=>
36{if(!(!g||se)){ce(!0),ue(null);try{await ws(g.id),i?.(g),I(!1),t()}catch(e){ue(Es(e))}finally{ce(!1)}}},[se,g,i,t]);(0,b.useEffect)(()=>{if(!h)return;let t=!1;return queueMicrotask(()=>{t||(C(!0),y(``),_(null),T(0),D(!1),k(!1))}),ds(e).then(e=>{t||_(e)}).catch(e=>{t||(e instanceof ho&&e.status===404?y(`Listing not found.`):y(`Could not load listing details.`))}).finally(()=>{t||C(!1)}),()=>{t=!0}},[e,h]);let Ie=(0,b.useMemo)(()=>g?mF(g.images):[],[g]),Le=Ie[w]??null;(0,b.useEffect)(()=>{if(Ie.length<=1)return;let e=e=>{if(!(e instanceof HTMLElement))return!1;let t=e.tagName;return t===`INPUT`||t===`TEXTAREA`||t===`SELECT`||e.isContentEditable},t=t=>{e(t.target)||(t.key===`ArrowLeft`?(t.preventDefault(),T(e=>e<=0?Ie.length-1:e-1)):t.key===`ArrowRight`&&(t.preventDefault(),T(e=>e>=Ie.length-1?0:e+1)))};return window.addEventListener(`keydown`,t),()=>window.removeEventListener(`keydown`,t)},[Ie.length]),(0,b.useEffect)(()=>{O&&L.current?.focus()},[O]),(0,b.useEffect)(()=>{fe.current&&O&&fe.current.scrollIntoView({behavior:`smooth`,block:`nearest`,inline:`center`}),de.current&&!O&&de.current.scrollIntoView({behavior:`smooth`,block:`nearest`,inline:`center`})},[w,O]);let Re=g?[{icon:Mk,label:`Year`,value:g.year?.toString()},{icon:nA,label:`Mileage`,value:iM(g.mileage,a)},{icon:Wk,label:`Transmission`,value:bF(g.transmission_type)},{icon:$k,label:`Fuel`,value:yF(g.fuel_type)},{icon:jA,label:`Exterior`,value:SF(g.exterior_color)},{icon:jA,label:`Interior`,value:SF(g.interior_color)},{icon:JA,label:`Condition`,value:xF(g.condition)}].filter(e=>e.value):[];return(0,x.createPortal)((0,V.jsxs)(V.Fragment,{children:[(0,V.jsxs)(`div`,{className:`fixed inset-0 z-[1000] flex flex-col bg-background selection:bg-primary/30`,children:[(0,V.jsx)(`header`,{className:`sticky top-0 z-50 border-b border-border/30 bg-background/80 backdrop-blur-xl`,children:(0,V.jsxs)(`div`,{className:`mx-auto flex h-14 max-w-[1400px] items-center justify-between gap-3 px-4 sm:px-6 lg:px-8`,children:[(0,V.jsxs)(`button`,{type:`button`,onClick:t,"aria-label":n,className:`group inline-flex h-10 min-w-0 shrink-0 items-center gap-2 text-sm font-semibold text-muted-foreground transition-colors hover:text-foreground`,children:[(0,V.jsx)(Lk,{className:`h-5 w-5 shrink-0 transition-transform group-hover:-translate-x-0.5`,strokeWidth:2.25}),(0,V.jsx)(`span`,{className:`hidden sm:inline`,children:n})]}),h&&!S&&!v&&g?(0,V.jsxs)(`div`,{className:`flex shrink-0 items-center gap-1 min-[641px]:gap-2`,children:[(0,V.jsxs)(`button`,{type:`button`,onClick:()=>N(!0),"aria-label":`Edit listing`,className:`inline-flex h-10 w-10 shrink-0 items-center justify-center text-muted-foreground transition-colors hover:text-foreground max-[640px]:border-0 max-[640px]:bg-transparent max-[640px]:p-0 min-[641px]:w-auto min-[641px]:gap-2 min-[641px]:whitespace-nowrap min-[641px]:rounded-xl min-[641px]:border min-[641px]:border-border/60 min-[641px]:bg-surface-elevated/60 min-[641px]:px-4 min-[641px]:text-sm min-[641px]:font-bold min-[641px]:text-foreground min-[641px]:hover:bg-surface-elevated`,children:[(0,V.jsx)(NA,{className:`h-[18px] w-[18px] shrink-0 min-[641px]:h-[15px] min-[641px]:w-[15p
36x]`}),(0,V.jsx)(`span`,{className:`hidden min-[641px]:inline`,children:`Edit`})]}),(0,V.jsxs)(`button`,{type:`button`,onClick:()=>{ue(null),I(!0)},"aria-label":`Delete listing`,className:`inline-flex h-10 w-10 shrink-0 items-center justify-center text-error transition-colors hover:text-error max-[640px]:border-0 max-[640px]:bg-transparent max-[640px]:p-0 min-[641px]:w-auto min-[641px]:gap-2 min-[641px]:whitespace-nowrap min-[641px]:rounded-xl min-[641px]:border min-[641px]:border-error/40 min-[641px]:bg-error/10 min-[641px]:px-4 min-[641px]:text-sm min-[641px]:font-bold min-[641px]:hover:bg-error/15`,children:[(0,V.jsx)(oj,{className:`h-[18px] w-[18px] shrink-0 min-[641px]:h-[15px] min-[641px]:w-[15px]`}),(0,V.jsx)(`span`,{className:`hidden min-[641px]:inline`,children:`Delete`})]})]}):null]})}),(0,V.jsx)(`div`,{className:`flex-1 overflow-y-auto custom-scrollbar`,children:(0,V.jsx)(`div`,{className:`mx-auto max-w-[1400px] px-4 py-6 sm:px-6 lg:px-8 lg:py-8`,children:h?h&&S?(0,V.jsxs)(`div`,{className:`grid gap-8 lg:grid-cols-[1fr_380px] xl:gap-10`,children:[(0,V.jsxs)(`div`,{className:`min-w-0 space-y-6`,children:[(0,V.jsx)(`div`,{className:`relative aspect-[16/10] overflow-hidden rounded-2xl bg-surface-elevated`,children:(0,V.jsx)(`div`,{className:`absolute inset-0 animate-shimmer bg-gradient-to-r from-transparent via-foreground/[0.03] to-transparent dark:via-white/[0.05]`,style:{backgroundSize:`200% 100%`}})}),(0,V.jsx)(`div`,{className:`grid grid-cols-2 gap-3 sm:grid-cols-4`,children:[1,2,3,4].map(e=>(0,V.jsx)(`div`,{className:`relative h-14 overflow-hidden rounded-xl bg-surface-elevated`,children:(0,V.jsx)(`div`,{className:`absolute inset-0 animate-shimmer bg-gradient-to-r from-transparent via-foreground/[0.03] to-transparent dark:via-white/[0.05]`,style:{backgroundSize:`200% 100%`}})},e))}),(0,V.jsxs)(`div`,{className:`space-y-3 rounded-2xl border border-border/40 bg-surface/30 p-5`,children:[(0,V.jsx)(`div`,{className:`relative h-4 w-24 overflow-hidden rounded bg-surface-elevated`,children:(0,V.jsx)(`div`,{className:`absolute inset-0 animate-shimmer bg-gradient-to-r from-transparent via-foreground/[0.03] to-transparent dark:via-white/[0.05]`})}),(0,V.jsx)(`div`,{className:`relative h-3 w-full overflow-hidden rounded bg-surface-elevated`,children:(0,V.jsx)(`div`,{className:`absolute inset-0 animate-shimmer bg-gradient-to-r from-transparent via-foreground/[0.03] to-transparent dark:via-white/[0.05]`})})]})]}),(0,V.jsx)(`div`,{className:`space-y-5`,children:(0,V.jsxs)(`div`,{className:`space-y-4 rounded-2xl border border-border/50 bg-surface/50 p-5`,children:[(0,V.jsx)(`div`,{className:`relative h-5 w-3/4 overflow-hidden rounded bg-surface-elevated`,children:(0,V.jsx)(`div`,{className:`absolute inset-0 animate-shimmer bg-gradient-to-r from-transparent via-foreground/[0.03] to-transparent dark:via-white/[0.05]`})}),(0,V.jsx)(`div`,{className:`relative h-9 w-2/3 overflow-hidden rounded-lg bg-surface-elevated`,children:(0,V.jsx)(`div`,{className:`absolute inset-0 animate-shimmer bg-gradient-to-r from-transparent via-foreground/[0.03] to-transparent dark:via-white/[0.05]`})}),(0,V.jsx)(`div`,{className:`relative h-11 w-full overflow-hidden rounded-xl bg-surface-elevated`,children:(0,V.jsx)(`div`,{className:`absolute inset-0 animate-shimmer bg-gradient-to-r from-transparent via-foreground/[0.03] to-transparent dark:via-white/[0.05]`})})]})})]}):v||!g?(0,V.jsxs)(`div`,{className:`flex min-h-[50vh] flex-col items-center justify-center text-center`,children:[(0,V.jsx)(`div`,{className:`mb-4 rounded-2xl bg-surface-elevated p-4 text-muted-foreground/50`,children:(0,V.jsx)(lA,{size:32})}),(0,V.jsx)(`h2`,{className:`text-xl font-black text-foreground sm:text-2xl`,children:v||`Listing not found.`}),(0,V.jsx)(`p`,{className:`mt-2 text-sm text-muted-foreground sm:text-base`,children:`This listing might have been removed.`}),(0,V.jsx)(`button`,{type:`button`,onClick:t,className:`mt-6 rounded-xl bg-surface-elevated px-6 py-2.5 text-sm font-bold text-foreground transition-all hover:bg-border sm:px-8`,children:`Go Back`})]}):(0,V.jsx)(ik.div,{initial:{opacity:0,y:12}
36,animate:{opacity:1,y:0},transition:{duration:.2,ease:`easeOut`},style:{willChange:`transform, opacity`},children:(0,V.jsxs)(`div`,{className:`flex flex-col gap-6 lg:grid lg:grid-cols-[1fr_380px] lg:gap-x-8 lg:gap-y-6 xl:gap-x-10`,children:[(0,V.jsxs)(`div`,{className:`relative order-1 -mx-4 -mt-6 min-w-0 overflow-hidden rounded-none border-b border-border/40 bg-surface-elevated sm:-mx-6 md:mx-0 md:mt-0 md:rounded-2xl md:border lg:col-start-1 lg:row-start-1`,children:[(0,V.jsxs)(`div`,{className:`relative aspect-[16/10]`,children:[Le?(0,V.jsx)(zD,{mode:`wait`,children:(0,V.jsx)(ik.img,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:{duration:.25},src:Le,alt:``,className:`h-full w-full object-contain`,referrerPolicy:`no-referrer`},Le)}):(0,V.jsx)(`div`,{className:`flex h-full items-center justify-center text-muted-foreground/30`,children:(0,V.jsx)(lA,{size:48,strokeWidth:1})}),Ie.length>1&&(0,V.jsxs)(`span`,{className:`absolute right-2 top-2 z-20 inline-flex items-baseline gap-0.5 rounded-full border border-white/20 bg-black/35 px-2 py-0.5 text-[10px] font-medium tabular-nums text-white/95 shadow-sm backdrop-blur-sm sm:right-3 sm:top-3 sm:gap-1 sm:px-2.5 sm:py-1 sm:text-[11px]`,children:[(0,V.jsx)(`span`,{children:w+1}),(0,V.jsx)(`span`,{className:`font-normal text-white/45`,children:`/`}),(0,V.jsx)(`span`,{className:`text-white/85`,children:Ie.length})]}),g.provider&&(0,V.jsx)(`div`,{className:`absolute left-2 top-2 z-20 sm:left-3 sm:top-3`,children:ge?(0,V.jsx)(`img`,{src:ge,className:`h-6 w-6 rounded-full border border-white/20 shadow sm:h-7 sm:w-7`,alt:he}):(0,V.jsx)(`span`,{className:`flex h-6 w-6 items-center justify-center rounded-full bg-black/40 text-[8px] font-bold text-white backdrop-blur sm:h-7 sm:w-7 sm:text-[9px]`,children:_e})}),Ie.length>1&&(0,V.jsxs)(V.Fragment,{children:[(0,V.jsx)(`button`,{type:`button`,"aria-label":`Previous image`,onClick:()=>T(e=>e<=0?Ie.length-1:e-1),className:`absolute left-1.5 top-1/2 z-10 flex h-8 w-8 -translate-y-1/2 items-center justify-center rounded-full bg-black/40 text-white backdrop-blur-sm transition hover:bg-black/60 active:scale-95 sm:left-2 sm:h-9 sm:w-9`,children:(0,V.jsx)(Lk,{className:`h-[18px] w-[18px] sm:h-5 sm:w-5`,strokeWidth:2.25})}),(0,V.jsx)(`button`,{type:`button`,"aria-label":`Next image`,onClick:()=>T(e=>e>=Ie.length-1?0:e+1),className:`absolute right-1.5 top-1/2 z-10 flex h-8 w-8 -translate-y-1/2 items-center justify-center rounded-full bg-black/40 text-white backdrop-blur-sm transition hover:bg-black/60 active:scale-95 sm:right-2 sm:h-9 sm:w-9`,children:(0,V.jsx)(Rk,{className:`h-[18px] w-[18px] sm:h-5 sm:w-5`,strokeWidth:2.25})})]}),Le&&(0,V.jsx)(`button`,{type:`button`,onClick:()=>k(!0),"aria-label":`View image full screen`,className:`absolute bottom-2 right-2 z-10 flex h-7 w-7 items-center justify-center rounded-lg bg-black/40 text-white backdrop-blur-sm transition hover:bg-black/60 active:scale-95 sm:bottom-3 sm:right-3 sm:h-8 sm:w-8`,children:(0,V.jsx)(SA,{className:`h-[14px] w-[14px] sm:h-[15px] sm:w-[15px]`,strokeWidth:2.25})})]}),Ie.length>1&&(0,V.jsx)(`div`,{className:`border-t border-border/30 bg-surface/60 px-2 py-2 sm:px-3 sm:py-2.5`,children:(0,V.jsx)(`div`,{className:`flex gap-1.5 overflow-x-auto pb-0.5 [scrollbar-width:none] [-ms-overflow-style:none] [&::-webkit-scrollbar]:hidden sm:gap-2 sm:pb-0`,children:Ie.map((e,t)=>(0,V.jsx)(`button`,{ref:t===w?de:null,type:`button`,onClick:()=>T(t),"aria-current":t===w?`true`:void 0,className:`relative h-10 w-14 shrink-0 overflow-hidden rounded-md border-2 transition-all sm:h-12 sm:w-16 sm:rounded-lg ${t===w?`border-primary ring-1 ring-primary/30`:`border-transparent opacity-60 hover:opacity-100`}`,children:(0,V.jsx)(`img`,{src:e,alt:``,className:`h-full w-full object-cover`,referrerPolicy:`no-referrer`})},`${e}-${t}`))})})]}),(0,V.jsxs)(`div`,{className:`order-2 min-w-0 lg:col-start-1 lg:hidden`,children:[(0,V.jsx)(`span`,{className:`mb-2 inline-flex rounded-full px-2.5 py-1 text-[10px] font-black tracking-wide ${tI(g.status)}`,children:eI(g.status)}),(0,V.jsx)(`button`,{type:`button`,onClick:()=>j(!0),className:`mb-2 ml-2 inline-flex rounded-full border border-border/50 bg-surface-elevated/80 px-2.5 py-1 text-[10px] font-bold uppercase tracking-wide text-muted-foreground transition-colors hover:text-foreground lg:hidden`,children:`Change status`}),(0,V.jsx)(`h1`,{className:`text-xl font-bold leading-tight text-foreground sm:text-2xl`,children:KR(g.title)||`Untitled listing`}),(0,V.jsxs)(`div`,{className:`mt-3 text-3xl font-extrabold tracking-tight text-foreground`,children:[g.currency_symbol||`$`,g.price?.toLocaleStr
36ing()??`â`]}),(0,V.jsxs)(`div`,{className:`mt-5 flex flex-col gap-2`,children:[g.url?(0,V.jsxs)(`a`,{href:g.url,target:`_blank`,rel:`noopener noreferrer`,className:`flex h-11 w-full items-center justify-center gap-2 rounded-xl bg-primary px-4 text-sm font-semibold text-primary-foreground transition-all hover:bg-primary-hover active:scale-[0.98]`,children:[(0,V.jsx)(Zk,{size:16}),qR(g.provider)]}):(0,V.jsx)(`div`,{className:`flex h-11 w-full items-center justify-center rounded-xl bg-surface-elevated text-sm text-muted-foreground`,children:`Link unavailable`}),je&&g?(0,V.jsxs)(`button`,{type:`button`,disabled:Pe||!Me,onClick:()=>void ye(g),title:Ne??void 0,className:`flex h-11 w-full items-center justify-center gap-2 rounded-xl border border-border/50 bg-surface-elevated/50 text-sm font-semibold text-foreground transition-all hover:bg-surface-hover active:scale-[0.98] disabled:cursor-not-allowed disabled:opacity-60`,children:[Pe?(0,V.jsx)(_A,{size:16,className:`animate-spin`}):(0,V.jsx)(zA,{size:16}),Me?`Resync`:Ne??`Resync unavailable`]}):null,xe?(0,V.jsxs)(`button`,{type:`button`,onClick:()=>F(!0),"aria-label":`Manage AI negotiation defaults for this listing`,className:`inline-flex h-11 w-full items-center justify-center gap-2 rounded-xl border border-primary/35 bg-primary/10 px-4 text-sm font-semibold text-primary transition-colors hover:bg-primary/15 active:scale-[0.98]`,children:[(0,V.jsx)(ej,{size:16,strokeWidth:2}),`AI negotiation settings`]}):null,Se?(0,V.jsxs)(`button`,{type:`button`,onClick:()=>void we(),className:Ae,children:[(0,V.jsx)(BA,{size:16}),Ce?`Manage repost`:`Set up repost`]}):null]})]}),Ce?(0,V.jsxs)(`div`,{className:`order-3 min-w-0 rounded-2xl border border-primary/30 bg-primary/5 p-5 sm:p-6 lg:col-start-1 lg:row-start-2`,children:[(0,V.jsxs)(`div`,{className:`mb-3 flex items-center gap-2 text-sm font-bold text-primary`,children:[(0,V.jsx)(BA,{size:16}),`Automated repost active`]}),(0,V.jsxs)(`div`,{className:`grid grid-cols-2 gap-3 text-sm`,children:[(0,V.jsxs)(`div`,{children:[(0,V.jsx)(`div`,{className:`text-[10px] font-semibold uppercase tracking-wider text-muted-foreground/50`,children:`Next repost`}),(0,V.jsx)(`div`,{className:`mt-0.5 font-medium text-foreground`,children:kF(g.repost_summary?.repost?.next_repost_at??null)||`Scheduled`})]}),(0,V.jsxs)(`div`,{children:[(0,V.jsx)(`div`,{className:`text-[10px] font-semibold uppercase tracking-wider text-muted-foreground/50`,children:`Interval`}),(0,V.jsx)(`div`,{className:`mt-0.5 font-medium text-foreground`,children:g.repost_summary?.repost?.interval_minutes?`${Math.round(g.repost_summary.repost.interval_minutes/60)}h`:`â`})]})]})]}):null,Re.length>0&&(0,V.jsxs)(`div`,{className:`order-4 min-w-0 rounded-2xl border border-border/40 bg-surface/30 p-5 sm:p-6 lg:col-start-1`,children:[(0,V.jsx)(`h2`,{className:`mb-4 text-xs font-bold uppercase tracking-wider text-muted-foreground`,children:`Specifications`}),(0,V.jsx)(`div`,{className:`grid grid-cols-2 gap-3 sm:grid-cols-4`,children:Re.map(e=>(0,V.jsxs)(`div`,{className:`flex items-center gap-2.5 rounded-xl border border-border/40 bg-surface/50 px-3 py-2.5`,children:[(0,V.jsx)(e.icon,{size:16,className:`shrink-0 text-primary/70`}),(0,V.jsxs)(`div`,{className:`min-w-0`,children:[(0,V.jsx)(`div`,{className:`text-[10px] font-semibold uppercase tracking-wider text-muted-foreground/60`,children:e.label}),(0,V.jsx)(`div`,{className:`truncate text-sm font-semibold text-foreground`,children:e.value})]})]},e.label))})]}),g.description&&(0,V.jsxs)(`div`,{className:`order-6 min-w-0 rounded-2xl border border-border/40 bg-surface/30 p-5 sm:p-6 lg:col-start-1`,children:[(0,V.jsx)(`h2`,{className:`mb-3 text-xs font-bold uppercase tracking-wider text-muted-foreground`,children:`Description`}),(0,V.jsx)(`p`,{className:`whitespace-pre-wrap text-sm leading-relaxed text-muted-foreground/90 transition-all duration-300 ${E?``:`line-clamp-5`}`,children:KR(g.description)}),g.description.length>300&&(0,V.jsx)(`button`,{type:`button`,onClick:()=>D(!E),className:`mt-3 flex items-center gap-1.5 text-xs font-semibold text-primary transition-colors hover:text-primary-hover`,children:E?(0,V.jsxs)(V.Fragment,{children:[(0,V.jsx)(zk,{size:14}),`Show less`]}):(0,V.jsxs)(V.Fragment,{children:[(0,V.jsx)(Ik,{size:14}),`Show more`]})})]}),(0,V.jsxs)(`div`,{className:`order-3 w-full min-w-0 space-y-5 lg:sticky lg:top-6 lg:col-start-2 lg:row-start-1 lg:row-span-6 lg:self-start`,children:[(0,V.jsxs)(`div`,{className:`hidden rounded-2xl border border-border/50 bg-surface/50 p-5 backdrop-blur-sm lg:block`,children:[(0,V.jsxs)(`div`,{className:`hidden lg:block`,children:[(0,V.jsx)(`span`,{className:`mb-2 inline-flex rounded-full px-2.5 py-1 text-[10px] font-black tracking-wide ${tI(g.status)}`,children:eI(g.status)}),(0,V.jsx)(`h1`,{className:`text-lg font-bold leading-snug text-foreground`,children:KR(g.title)||`Untitled listing`})]}),(0,V.jsx)(`div`,{className:`mt-4 hidden lg:block`,children:(0,V.jsxs)(`span`,{className:`text-3xl font-extrabold tracking-tight text-foreground`,children:[g.currency_symbol||`$`,g.price?.toLocaleStr
36ing()??`â`]})}),(0,V.jsxs)(`div`,{className:`mt-5 flex flex-col gap-2`,children:[g.url?(0,V.jsxs)(`a`,{href:g.url,target:`_blank`,rel:`noopener noreferrer`,className:`flex h-11 w-full items-center justify-center gap-2 rounded-xl bg-primary px-4 text-sm font-semibold text-primary-foreground transition-all hover:bg-primary-hover active:scale-[0.98]`,children:[(0,V.jsx)(Zk,{size:16}),qR(g.provider)]}):(0,V.jsx)(`div`,{className:`flex h-11 w-full items-center justify-center rounded-xl bg-surface-elevated text-sm text-muted-foreground`,children:`Link unavailable`}),je&&g?(0,V.jsxs)(`button`,{type:`button`,disabled:Pe||!Me,onClick:()=>void ye(g),title:Ne??void 0,className:`flex h-11 w-full items-center justify-center gap-2 rounded-xl border border-border/50 bg-surface-elevated/50 text-sm font-semibold text-foreground transition-all hover:bg-surface-hover active:scale-[0.98] disabled:cursor-not-allowed disabled:opacity-60`,children:[Pe?(0,V.jsx)(_A,{size:16,className:`animate-spin`}):(0,V.jsx)(zA,{size:16}),Me?`Resync`:Ne??`Resync unavailable`]}):null,xe?(0,V.jsxs)(`button`,{type:`button`,onClick:()=>F(!0),"aria-label":`Manage AI negotiation defaults for this listing`,className:`inline-flex h-11 w-full items-center justify-center gap-2 rounded-xl border border-primary/35 bg-primary/10 px-4 text-sm font-semibold text-primary transition-colors hover:bg-primary/15 active:scale-[0.98]`,children:[(0,V.jsx)(ej,{size:16,strokeWidth:2}),`AI negotiation settings`]}):null,Se?(0,V.jsxs)(`button`,{type:`button`,onClick:()=>void we(),className:Ae,children:[(0,V.jsx)(BA,{size:16}),Ce?`Manage repost`:`Set up repost`]}):null]})]}),(0,V.jsxs)(`div`,{className:`rounded-2xl border border-border/40 bg-surface/30 p-5`,children:[(0,V.jsx)(`div`,{className:`mb-2 text-[10px] font-semibold uppercase tracking-wider text-muted-foreground/60`,children:`Listing details`}),(0,V.jsxs)(`div`,{className:`grid grid-cols-2 gap-3`,children:[(0,V.jsxs)(`div`,{children:[(0,V.jsx)(`div`,{className:`text-[10px] font-semibold uppercase tracking-wider text-muted-foreground/50`,children:`Provider`}),(0,V.jsxs)(`div`,{className:`mt-0.5 flex items-center gap-1.5 text-sm font-medium text-foreground`,children:[ge?(0,V.jsx)(`img`,{src:ge,alt:``,className:`h-4 w-4 rounded-full object-cover`}):null,he]})]}),(0,V.jsxs)(`div`,{children:[(0,V.jsx)(`div`,{className:`text-[10px] font-semibold uppercase tracking-wider text-muted-foreground/50`,children:`Listed`}),(0,V.jsx)(`div`,{className:`mt-0.5 text-sm font-medium text-foreground`,children:kF(g.listed_at)})]}),(0,V.jsxs)(`div`,{children:[(0,V.jsx)(`div`,{className:`text-[10px] font-semibold uppercase tracking-wider text-muted-foreground/50`,children:`Last synced`}),(0,V.jsx)(`div`,{className:`mt-0.5 text-sm font-medium text-foreground`,children:kF(g.scraped_at??g.updated_at)})]}),(0,V.jsxs)(`div`,{className:`col-span-2`,children:[(0,V.jsx)(`div`,{className:`text-[10px] font-semibold uppercase tracking-wider text-muted-foreground/50`,children:`Marketplace ID`}),(0,V.jsx)(`div`,{className:`mt-0.5 truncate font-mono text-xs font-medium text-foreground`,children:g.provider_item_id})]})]})]})]})]})}):(0,V.jsxs)(`div`,{className:`flex min-h-[50vh] flex-col items-center justify-center text-center`,children:[(0,V.jsx)(`div`,{className:`mb-4 rounded-2xl bg-error/10 p-4 text-error`,children:(0,V.jsx)(mj,{size:32})}),(0,V.jsx)(`h2`,{className:`text-xl font-bold text-foreground`,children:`Invalid Listing`}),(0,V.jsx)(`p`,{className:`mt-2 text-sm text-muted-foreground`,children:`The link you followed seems to be broken.`})]})})})]}),g?(0,V.jsx)(DR,{open:te,mode:re,listing:g,onClose:Ee,onSaved:De}):null,g?(0,V.jsx)(HR,{open:ae,listing:g,onClose:Oe,onListingUpdated:ke}):null,(0,V.jsx)(kI,{open:M,onClose:()=>N(!1),onUpdateStatus:()=>j(!0),onEditDetails:()=>void Te(`edit`)}),(0,V.jsx)(qce,{open:A,listing:g,onClose:()=>j(!1),onSuccess:e=>{ve(e),p({type:`success`,message:`Status updated`,description:`Listing is now ${eI(e.status).toLowerCase()}.`})}}),g&&xe?(0,V.jsx)(Uce,{open:P,listing:g,onClose:()=>F(!1),onSaved:e=>{ve(e),F(!1)}}):null,(0,V.jsx)(NF,{stackClassName:`z-[1200]`,open:ee,title:`Delete listing?`,description:le||(g?`"${g.title||`This listing`}" will be removed from My Listings. Linked conversations you own will also be deleted. This cannot be undone.`:`This listing will be permanently removed.`),
36confirmLabel:`Delete listing`,cancelLabel:`Cancel`,variant:`danger`,isBusy:se,onCancel:()=>{se||(I(!1),ue(null))},onConfirm:()=>void Fe()}),O&&Le?(0,V.jsxs)(`div`,{ref:L,role:`dialog`,"aria-modal":`true`,"aria-label":`Full screen image gallery`,tabIndex:-1,className:`fixed inset-0 z-[1100] flex h-[100dvh] max-h-[100dvh] flex-col bg-black/95 backdrop-blur-xl outline-none`,onClick:()=>k(!1),children:[(0,V.jsxs)(`div`,{className:`pointer-events-none absolute left-0 right-0 top-0 z-20 flex items-start justify-between gap-2 px-3 pt-[max(0.75rem,env(safe-area-inset-top))] pr-[max(0.75rem,env(safe-area-inset-right))] pl-[max(0.75rem,env(safe-area-inset-left))] sm:left-4 sm:right-4 sm:top-4 sm:px-0 sm:pt-0 sm:pr-0 sm:pl-0 md:top-3 lg:top-3`,children:[(0,V.jsxs)(`span`,{className:`pointer-events-auto inline-flex items-baseline gap-0.5 rounded-full border border-white/25 bg-black/40 px-2 py-0.5 text-[11px] font-semibold tabular-nums text-white/95 shadow-md backdrop-blur-md sm:gap-1 sm:px-3 sm:py-1 sm:text-xs`,children:[(0,V.jsx)(`span`,{children:w+1}),(0,V.jsx)(`span`,{className:`font-normal text-white/40`,children:`/`}),(0,V.jsx)(`span`,{className:`text-white/85`,children:Ie.length})]}),(0,V.jsx)(`button`,{type:`button`,onClick:e=>{e.stopPropagation(),k(!1)},className:`pointer-events-auto flex h-11 w-11 shrink-0 items-center justify-center rounded-full border border-white/20 bg-black/50 text-white shadow-md ring-1 ring-white/10 backdrop-blur-md transition-all hover:bg-white/15 active:scale-95`,"aria-label":`Close full screen image`,children:(0,V.jsx)(mj,{className:`h-5 w-5`,strokeWidth:2.25})})]}),Ie.length>1&&(0,V.jsxs)(V.Fragment,{children:[(0,V.jsx)(`button`,{type:`button`,onClick:e=>{e.stopPropagation(),T(e=>e<=0?Ie.length-1:e-1)},className:`absolute left-2 top-1/2 z-20 flex h-11 w-11 -translate-y-1/2 items-center justify-center rounded-full border border-white/15 bg-black/45 text-white shadow-lg backdrop-blur-md transition-all hover:bg-white/15 active:scale-95 sm:left-4`,"aria-label":`Previous image`,children:(0,V.jsx)(Lk,{className:`h-5 w-5`,strokeWidth:2.25})}),(0,V.jsx)(`button`,{type:`button`,onClick:e=>{e.stopPropagation(),T(e=>e>=Ie.length-1?0:e+1)},className:`absolute right-2 top-1/2 z-20 flex h-11 w-11 -translate-y-1/2 items-center justify-center rounded-full border border-white/15 bg-black/45 text-white shadow-lg backdrop-blur-md transition-all hover:bg-white/15 active:scale-95 sm:right-4`,"aria-label":`Next image`,children:(0,V.jsx)(Rk,{className:`h-5 w-5`,strokeWidth:2.25})})]}),(0,V.jsx)(`div`,{className:`flex min-h-0 flex-1 items-center justify-center overflow-hidden px-2 pb-[calc(5.25rem+env(safe-area-inset-bottom,0px))] pt-[calc(3.5rem+env(safe-area-inset-top,0px))] sm:px-4 sm:pb-[calc(6.75rem+env(safe-area-inset-bottom,0px))] sm:pt-[calc(4.25rem+env(safe-area-inset-top,0px))]`,onClick:e=>e.stopPropagation(),children:(0,V.jsx)(zD,{mode:`wait`,children:(0,V.jsx)(ik.img,{initial:{opacity:0,scale:.97,filter:`blur(4px)`},animate:{opacity:1,scale:1,filter:`blur(0px)`},exit:{opacity:0,scale:.97,filter:`blur(4px)`},transition:{duration:.25,ease:`easeOut`},src:Le,alt:``,className:`max-h-full max-w-full cursor-grab object-contain drop-shadow-[0_20px_50px_rgba(0,0,0,0.5)] active:cursor-grabbing`,referrerPolicy:`no-referrer`,onClick:e=>e.stopPropagation(),drag:`x`,dragConstraints:{left:0,right:0},dragElastic:.7,onDragEnd:(e,t)=>{t.offset.x>50||t.velocity.x>500?T(e=>e<=0?Ie.length-1:e-1):(t.offset.x<-50||t.velocity.x<-500)&&T(e=>e>=Ie.length-1?0:e+1)}},Le)})}),Ie.length>1&&(0,V.jsx)(`div`,{className:`absolute bottom-0 left-0 right-0 z-20 bg-gradient-to-t from-black via-black/80 to-transparent pb-[max(0.5rem,env(safe-area-inset-bottom))] pt-2`,onClick:e=>e.stopPropagation(),children:(0,V.jsx)(`div`,{className:`mx-auto flex w-full max-w-3xl snap-x snap-mandatory gap-2 overflow-x-auto px-2 py-1 [scrollbar-width:none] [-ms-overflow-style:none] [&::-webkit-scrollbar]:hidden sm:max-w-4xl sm:gap-2 sm:px-3`,children:Ie.map((e,t)=>(0,V.jsx)(`button`,{ref:t===w?fe:null,type:`button`,onClick:()=>T(t),"aria-current":t===w?`true`:void 0,className:`relative h-12 w-[4.25rem] shrink-0 snap-center overflow-hidden rounded-md border-2 transition-all duration-200 sm:h-12 sm:w-20 sm:rou
36nded-lg ${t===w?`z-10 border-primary opacity-100 shadow-lg shadow-primary/30 ring-2 ring-primary/50`:`border-transparent opacity-45 hover:opacity-90`}`,children:(0,V.jsx)(`img`,{src:e,alt:``,className:`h-full w-full object-cover`,referrerPolicy:`no-referrer`})},`fs-${e}-${t}`))})})]}):null]}),document.body)}function XR({listingId:e,onRequestClose:t,backLabel:n,onListingUpdated:r,onListingDeleted:i,className:a=`z-[500]`}){return(0,V.jsx)(`div`,{className:`fixed inset-0 ${a} transition-all duration-200 ease-[cubic-bezier(0.22,1,0.36,1)] ${e?`pointer-events-auto translate-y-0 opacity-100`:`pointer-events-none translate-y-4 opacity-0`}`,style:{willChange:`transform, opacity`},children:e?(0,V.jsx)(YR,{listingId:e,onRequestClose:t,backLabel:n,onListingUpdated:r,onListingDeleted:i}):null})}function ZR({icon:e,title:t,description:n,className:r=``,compact:i=!1}){return(0,V.jsxs)(`div`,{className:`flex flex-col items-center justify-center text-center ${i?`px-4 py-10`:`min-h-0 w-full flex-1 self-stretch px-6`} ${r}`,children:[(0,V.jsx)(`div`,{className:`flex items-center justify-center rounded-2xl bg-primary/10 text-primary shadow-inner ${i?`h-12 w-12`:`h-16 w-16`}`,children:e}),(0,V.jsx)(`h2`,{className:`font-black tracking-tight text-foreground ${i?`mt-4 text-base`:`mt-6 text-lg sm:text-xl`}`,children:t}),(0,V.jsx)(`p`,{className:`max-w-sm text-muted-foreground ${i?`mt-1.5 text-xs leading-relaxed`:`mt-2 text-sm leading-relaxed`}`,children:n})]})}var QR={full:`rounded-full`,xl:`rounded-xl`,lg:`rounded-lg`,md:`rounded-md`,none:`rounded-none`};function $R({className:e=``,rounded:t=`xl`}){return(0,V.jsx)(`div`,{"aria-hidden":!0,className:`relative overflow-hidden bg-border/70 dark:bg-surface-elevated/75 ${QR[t]} ${e}`,children:(0,V.jsx)(`div`,{className:`absolute inset-0 animate-shimmer bg-gradient-to-r from-transparent via-foreground/[0.07] to-transparent dark:via-white/[0.09]`})})}var ez=8;function tz(){return(0,V.jsxs)(`div`,{className:`flex gap-3 border-b border-border/30 px-3 py-3 sm:px-4`,children:[(0,V.jsx)($R,{className:`h-12 w-12 shrink-0`,rounded:`full`}),(0,V.jsxs)(`div`,{className:`min-w-0 flex-1 space-y-2 pt-0.5`,children:[(0,V.jsxs)(`div`,{className:`flex items-center justify-between gap-2`,children:[(0,V.jsx)($R,{className:`h-3.5 w-28`,rounded:`md`}),(0,V.jsx)($R,{className:`h-3 w-10 shrink-0`,rounded:`md`})]}),(0,V.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,V.jsx)($R,{className:`h-3 flex-1`,rounded:`md`}),(0,V.jsx)($R,{className:`h-5 w-5 shrink-0`,rounded:`full`})]})]})]})}function nz({rows:e=3}){return(0,V.jsx)(V.Fragment,{children:Array.from({length:e},(e,t)=>(0,V.jsx)(tz,{},`load-more-${t}`))})}function rz(){return(0,V.jsx)(`div`,{className:`min-h-0 flex-1 overflow-hidden`,children:Array.from({length:ez},(e,t)=>(0,V.jsx)(tz,{},t))})}function iz(e){return e?.trim()||null}function az(e,t){return e.length<=t?e:t<=1?`â¦`:`${e.slice(0,t-1).trimEnd()}â¦`}function oz(e){let t=iz(e.providerUsername),n=iz(e.listingTitle);return t&&n?`${t} · ${n}`:n||t||`Unknown`}function sz(e){return iz(e.listingPrice)}function cz(e,t={}){return az(oz(e),t.maxLength??48)}function lz(e,t={}){let n=sz(e);return n?az(n,t.maxLength??56):null}function uz(e){return iz(e.providerUsername)}function dz(e){return uz(e)??`the seller`}function fz(e){return oz(e)}function pz(e){return sz(e)}function mz(e){let t=new Date(e);if(Number.isNaN(t.getTime()))return``;let n=new Date,r=t.toDateString()===n.toDateString(),i=new Date(n);i.setDate(n.getDate()-1);let a=t.toDateString()===i.toDateString();return r?t.toLocaleTimeString(void 0,{hour:`numeric`,minute:`2-digit`}):a?`Yesterday`:t.toLocaleDateString(void 0,{month:`short`,day:`numeric`})}function hz(e){let t=new Date(e);return Number.isNaN(t.getTime())?``:t.toLocaleTimeString(void 0,{hour:`numeric`,minute:`2-digit`})}function gz(e){let t=new Date(e);if(Number.isNaN(t.getTime()))return``;let n=new Date;if(t.toDateString()===n.toDateString())return`Today`;let r=new Date(n);return r.setDate(n.getDate()-1),t.toDateString()===r.toDateString()?`Yesterday`:t.toLocaleDateString(void 0,{weekday:`long`,month:`short`,day:`numeric`})}function _z({conversation:e,isActive:t,onSelect:n}){let r=my(),i=fz(e),a=cz(e,{maxLength:36}),o=i!==a,s=mz(e.lastMessageAt);return(0,V.jsxs)(`button`,{type:`button`,onClick:n,className:`flex w-full gap-3 border-b border-border/30 px-3 py-3 text-left transition-colors sm:px-4 ${t?`bg-primary/10`:`hover:bg-surface-hover`}`,children:[(0,V.jsxs)(`div`,{className:`relative h-12 w-12 shrink-0`,children:[(0,V.jsx)(`div`,{className:`h-full w-full overflow-hidden rounded-full bg-surface-elevated`,children:e.listingImageUrl?(0,V.jsx)(`img`,{src:e.listingImageUrl,alt:``,className:`h-full w-full object-cover`,referrerPolicy:`no-referrer`}):(0,V.jsx)(`div`,{className:`flex h-full w-full items-center justify-center text-muted-foreground
36/40`,children:(0,V.jsx)(lA,{size:18})})}),e.aiNegotiationEnabled?(0,V.jsx)(`span`,{className:`absolute -bottom-0.5 -right-0.5 flex h-5 w-5 shrink-0 items-center justify-center rounded-full border-2 border-surface bg-primary text-primary-foreground`,"aria-label":r(`chatsExtra.aiNegotiationEnabled`),children:(0,V.jsx)(Ok,{size:10,strokeWidth:2.5,className:`shrink-0`,"aria-hidden":!0})}):null]}),(0,V.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(0,V.jsxs)(`div`,{className:`flex items-start justify-between gap-2`,children:[(0,V.jsx)(`p`,{className:`truncate text-sm font-bold ${e.unreadCount>0?`text-foreground`:`text-foreground/90`}`,title:o?i:void 0,children:a}),s?(0,V.jsx)(`span`,{className:`shrink-0 text-[11px] font-semibold text-muted-foreground`,children:s}):null]}),(0,V.jsxs)(`div`,{className:`mt-0.5 flex items-center gap-2`,children:[(0,V.jsx)(`p`,{className:`min-w-0 flex-1 truncate text-xs leading-relaxed ${e.unreadCount>0?`font-semibold text-foreground`:`text-muted-foreground`}`,children:e.lastMessagePreview}),e.unreadCount>0||e.needsHumanAttention?(0,V.jsxs)(`div`,{className:`flex shrink-0 items-center gap-1`,children:[e.unreadCount>0?(0,V.jsx)(`span`,{className:`flex h-5 min-w-5 items-center justify-center rounded-full bg-primary px-1.5 text-[10px] font-black leading-none text-primary-foreground`,"aria-label":e.unreadCount===1?r(`chatsExtra.unreadOne`,{count:e.unreadCount}):r(`chatsExtra.unreadOther`,{count:e.unreadCount}),children:e.unreadCount>9?`9+`:e.unreadCount}):null,e.needsHumanAttention?(0,V.jsx)(`span`,{className:`flex h-5 min-w-5 items-center justify-center rounded-full bg-amber-500 text-[10px] font-black leading-none text-white`,"aria-label":r(`chatsExtra.needsAttention`),children:`!`}):null]}):null]})]})]})}var vz=120,yz=220,bz=YN(`extension`);function xz(e){if(!(e instanceof Element))return!1;try{return e.matches(`:focus-visible`)}catch{return!1}}function Sz(){let e=my(),t=or(),{presentation:n}=OM(),r=(0,b.useId)(),[i,a]=(0,b.useState)(!1),[o,s]=(0,b.useState)(!1),c=(0,b.useRef)(null),l=(0,b.useRef)(null),u=n.icon;(0,b.useEffect)(()=>{let e=window.matchMedia(`(hover: hover) and (pointer: fine)`),t=()=>s(e.matches);return t(),e.addEventListener(`change`,t),()=>e.removeEventListener(`change`,t)},[]);let d=()=>{l.current&&=(clearTimeout(l.current),null)},f=()=>{c.current&&=(clearTimeout(c.current),null)},p=()=>{d(),f(),c.current=window.setTimeout(()=>a(!0),vz)},m=()=>{f(),d(),l.current=window.setTimeout(()=>a(!1),yz)},h=()=>{f(),d(),a(!1)};return(0,b.useEffect)(()=>()=>{f(),d()},[]),(0,V.jsxs)(ik.div,{className:`relative shrink-0`,onMouseEnter:()=>{o&&p()},onMouseLeave:()=>{o&&m()},onFocusCapture:e=>{xz(e.target)&&p()},onBlurCapture:e=>{let t=e.relatedTarget;t instanceof Node&&e.currentTarget.contains(t)||h()},children:[(0,V.jsxs)(`button`,{type:`button`,onClick:()=>{t(bz)},"aria-describedby":i?r:void 0,className:`inline-flex h-6 items-center gap-1 rounded-lg border px-2 text-[9px] font-black uppercase tracking-wide transition-colors ${n.className}`,children:[(0,V.jsx)(u,{size:11,strokeWidth:2.25,"aria-hidden":!0}),n.label]}),(0,V.jsx)(zD,{children:i?(0,V.jsx)(ik.div,{className:`pointer-events-auto absolute right-0 top-full z-[70] w-[min(18rem,calc(100vw-1.25rem))] pt-2`,initial:{opacity:0,y:6,scale:.97},animate:{opacity:1,y:0,scale:1},exit:{opacity:0,y:4,scale:.98},transition:{type:`spring`,stiffness:420,damping:28},children:(0,V.jsxs)(`div`,{id:r,role:`tooltip`,"aria-live":`polite`,className:`rounded-lg border border-border bg-surface-elevated p-3 text-left shadow-lg shadow-black/10 dark:shadow-black/40`,children:[(0,V.jsx)(`p`,{className:`text-[11px] font-medium leading-snug text-foreground sm:text-xs`,children:e(`chatsExtra.extensionTooltip`)}),(0,V.jsx)(zi,{to:bz,className:`mt-2 inline-flex text-[11px] font-bold text-primary underline-offset-2 transition-colors hover:text-primary/80 hover:underline sm:text-xs`,onClick:e=>e.stopPropagation(),children:e(`chatsExtra.readMore`)})]})}):null})]})}function Cz({conversations:e,activeConversationId:t,onSelectConversation:n,searchQuery:r,onSearchQueryChange:i,searchFilterLabel:a,onClearSearchFilter:o,isSearchFilterActive:s=!1,isLoading:c=!1,isLoadingMore:l=!1,hasMore:u=!1,loadMoreError:d=``,onLoadMore:f,error:p=``,onRetry:m,className:h=``}){let g=my(),_=(0,b.useRef)(null),v=(0,b.useRef)(null),y=(0,b.useRef)(f);(0,b.useEffect)(()=>{y.current=f},[f]),(0,b.useEffect)(()=>{let e=_.current,t=v.current;if(!e||!t||!u||c||l)return;let n=new IntersectionObserver(e=>{e[0]?.isIntersecting&&y.current?.()},{root:e,rootMargin:`0px 0px 480px 0px`,threshold:0});return n.observe(t),()=>n.disconnect()},[e.length,u,c,l,r]);let x=r.trim().length>0,S=!c&&!p&&e.length===0&&x&&!l,C=!c&&!p&&e.length===0&&s&&!x&&!l;return(0,V.jsxs)(`aside`,{className:`flex h-full max-h-full min-h-0 w-full flex-col overflow-hidden border-border/40 bg-surface lg:w-[22rem] lg:shrink-0 lg:border-r ${h}`,children:[(0,V.jsxs)(`div`,{className:`shrink-0 border-b border-border/40 px-4 py-4`,children:[(0,V.jsxs)(`div`,{className:`flex items-center justify-between gap-3`,children:[(0,V.jsx)(`h1`,{className:`text-xl font-black tracking-tight text-foreground sm:text-2xl`,children:g(`chats.title`)}),(0,V.jsx)(Sz,{})]}),(0,V.jsxs)(`div`,{className:`relative mt-3`,children:[(0,V.jsx)(UA,{size:16,strokeWidth:2,className:`pointer-events-none absolute left-3 top-1/2 -translate-y-1/2 text-muted-foreground
36/70`,"aria-hidden":!0}),(0,V.jsx)(`input`,{type:`text`,role:`searchbox`,value:r,onChange:e=>i(e.target.value),placeholder:g(`chats.searchPlaceholder`),"aria-label":g(`chats.searchAria`),autoComplete:`off`,className:`chat-composer-input w-full rounded-xl border-0 bg-chat-composer-input py-2.5 pl-9 pr-9 text-sm text-foreground shadow-none placeholder:text-muted-foreground/55 outline-none ring-0 focus:border-0 focus:outline-none focus:ring-0`}),r?(0,V.jsx)(`button`,{type:`button`,onClick:()=>i(``),className:`absolute right-2 top-1/2 flex h-7 w-7 -translate-y-1/2 items-center justify-center rounded-full text-muted-foreground/70 transition-colors hover:text-foreground`,"aria-label":g(`chats.clearSearch`),children:(0,V.jsx)(mj,{size:16,strokeWidth:2})}):null]}),a&&o?(0,V.jsx)(`div`,{className:`mt-2.5`,children:(0,V.jsxs)(`span`,{className:`inline-flex max-w-full items-center gap-1 rounded-full border border-primary/30 bg-primary/10 py-1 pl-3 pr-1.5 text-xs font-semibold text-primary`,children:[(0,V.jsx)(`span`,{className:`truncate`,children:a}),(0,V.jsx)(`button`,{type:`button`,onClick:o,className:`flex h-5 w-5 shrink-0 items-center justify-center rounded-full text-primary/80 transition-colors hover:bg-primary/15 hover:text-primary`,"aria-label":g(`chats.clearSearchFilter`),children:(0,V.jsx)(mj,{size:12,strokeWidth:2.5})})]})}):null]}),(0,V.jsx)(`div`,{ref:_,className:`custom-scrollbar min-h-0 flex-1 overflow-y-auto overscroll-contain`,children:c?(0,V.jsx)(rz,{}):p?(0,V.jsx)(ZR,{compact:!0,icon:(0,V.jsx)(Bk,{size:22,strokeWidth:2}),title:g(`chats.loadFailed`),description:p}):S?(0,V.jsx)(ZR,{compact:!0,icon:(0,V.jsx)(UA,{size:22,strokeWidth:2}),title:g(`chats.noMatchingChats`),description:g(`chats.noMatchingDescription`),className:`p-4`}):C?(0,V.jsx)(ZR,{compact:!0,icon:(0,V.jsx)(wA,{size:22,strokeWidth:2}),title:g(`chats.noChatsForSearch`),description:g(`chats.noChatsForSearchDescription`),className:`p-4`}):e.length===0?(0,V.jsx)(ZR,{compact:!0,icon:(0,V.jsx)(wA,{size:22,strokeWidth:2}),title:g(`chats.noConversationsYet`),description:g(`chats.noConversationsDescription`),className:`p-4`}):(0,V.jsxs)(V.Fragment,{children:[e.map(e=>(0,V.jsx)(_z,{conversation:e,isActive:e.id===t,onSelect:()=>n(e.id)},e.id)),l?(0,V.jsx)(nz,{rows:3}):null,u?(0,V.jsx)(`div`,{ref:v,className:`pointer-events-none h-6 w-full shrink-0`,"aria-hidden":!0}):null,d&&!l?(0,V.jsxs)(`div`,{className:`flex flex-col items-center gap-2 px-4 py-4 text-center`,children:[(0,V.jsx)(`p`,{className:`text-xs font-medium text-muted-foreground`,children:d}),(0,V.jsx)(`button`,{type:`button`,onClick:()=>y.current?.(),className:`rounded-lg border border-border/60 bg-surface-elevated px-3 py-1.5 text-xs font-bold text-foreground transition-colors hover:bg-surface-hover`,children:g(`common.tryAgain`)})]}):null]})}),p&&m?(0,V.jsx)(`div`,{className:`shrink-0 border-t border-border/40 px-4 py-3`,children:(0,V.jsx)(`button`,{type:`button`,onClick:m,className:`w-full rounded-xl border border-border/60 bg-surface-elevated px-4 py-2.5 text-sm font-bold text-foreground transition-colors hover:bg-surface-hover`,children:g(`common.tryAgain`)})}):null]})}function wz({open:e,conversation:t,onClose:n,onSaved:r}){let{showToast:i}=Gx(),a=t.isPersonalListing?`seller`:`buyer`,o=Hce(t.listingPrice),s=(0,b.useCallback)(async e=>{let n=$F(e,a);r({...$P(await Go(t.id,n)),unreadCount:t.unreadCount,lastMessagePreview:t.lastMessagePreview,lastMessageAt:t.lastMessageAt}),i({type:`success`,message:e.enabled?`AI negotiation settings saved.`:`AI negotiation turned off.`})},[t,a,r,i]);return(0,V.jsx)(QF,{open:e,mode:a,onClose:n,listingPrice:o,initialEnabled:t.aiNegotiationEnabled,initialConfig:t.aiNegotiationConfig,onSave:s})}var Tz=6;function Ez({recipientName:e,canSend:t=!0,disabledPlaceholder:n=`Extension required to send`,onSend:r}){let[i,a]=(0,b.useState)(``),[o,s]=(0,b.useState)(!1),[c,l]=(0,b.useState)(!1),u=(0,b.useRef)(null),d=t&&!c,f=d&&i.trim().length>0,p=t?e?`Message ${e}â¦`:`Write a messageâ¦`:n,m=(0,b.useCallback)(()=>{let e=u.current;if(!e)return;e.style.height=`0px`;let t=e.scrollHeight,n=getComputedStyle(e),r=parseFloat(n.lineHeight)||20,i=parseFloat(n.paddingTop)+parseFloat(n.paddingBottom),a=r+i,o=r*Tz+i,
36c=Math.min(Math.max(t,a),o);s(t>a+1),e.style.height=`${c}px`,e.style.overflowY=t>o?`auto`:`hidden`,t>o?e.scrollTop=e.scrollHeight:e.scrollTop=0},[]);(0,b.useLayoutEffect)(()=>{m()},[i,m]);let h=async e=>{if(e.preventDefault(),!f)return;let t=i.trim();if(t){a(``),l(!0);try{r&&(await r(t),eN&&nN.capture(`message_sent`),tN.info(`chat message sent`,{channel:`chat`}))}catch{a(t)}finally{l(!1)}}};return(0,V.jsx)(`form`,{onSubmit:e=>void h(e),className:`z-10 shrink-0 border-t border-border/40 bg-surface-elevated/30 px-3 py-3 backdrop-blur-md sm:px-4 sm:py-3.5`,children:(0,V.jsxs)(`div`,{className:`flex w-full gap-1 rounded-2xl bg-chat-composer-input p-1 sm:gap-1.5 sm:p-1.5 ${o?`items-end`:`items-center`} ${d?``:`opacity-70`}`,children:[(0,V.jsx)(`textarea`,{ref:u,value:i,onChange:e=>a(e.target.value),onKeyDown:e=>{d&&e.key===`Enter`&&!e.shiftKey&&(e.preventDefault(),h(e))},rows:1,disabled:!d,placeholder:p,className:`chat-composer-input max-h-none min-w-0 flex-1 resize-none border-0 bg-transparent px-2.5 py-1.5 text-sm leading-5 text-foreground shadow-none placeholder:text-muted-foreground/55 outline-none ring-0 focus:border-0 focus:outline-none focus:ring-0 focus-visible:border-0 focus-visible:outline-none focus-visible:ring-0 focus-visible:ring-offset-0 disabled:cursor-not-allowed disabled:text-muted-foreground sm:px-3`}),(0,V.jsx)(`button`,{type:`submit`,disabled:!f,className:`flex h-8 w-8 shrink-0 items-center justify-center rounded-full p-0 transition-all ${f?`bg-primary text-primary-foreground shadow-sm hover:bg-primary-hover active:scale-[0.98]`:`cursor-not-allowed bg-transparent text-muted-foreground/35`}`,"aria-label":`Send message`,children:(0,V.jsx)(WA,{size:15,strokeWidth:2,className:`pointer-events-none shrink-0`,"aria-hidden":!0})})]})})}function Dz(e){switch(e){case`pending`:return`Sending`;case`sent`:return`Sent`;case`delivered`:return`Delivered`;case`failed`:return`Failed to send`}}function Oz({status:e,isOutgoing:t}){let n=Dz(e),r={size:12,strokeWidth:2.25,className:t?e===`failed`?`text-red-200`:`text-primary-foreground/70`:e===`failed`?`text-error`:`text-muted-foreground`,"aria-hidden":!0},i;switch(e){case`pending`:i=(0,V.jsx)(Uk,{...r});break;case`sent`:i=(0,V.jsx)(Fk,{...r});break;case`delivered`:i=(0,V.jsx)(gae,{...r});break;case`failed`:i=(0,V.jsx)(Bk,{...r});break}return(0,V.jsx)(`span`,{className:`inline-flex shrink-0`,title:n,"aria-label":n,children:i})}function kz({message:e}){let t=e.direction===`outgoing`,n=hz(e.sentAt);return(0,V.jsx)(`div`,{className:`flex w-full ${t?`justify-end`:`justify-start`}`,children:(0,V.jsxs)(`div`,{className:`min-w-[85%] sm:min-w-[28rem] max-w-[65%] rounded-2xl px-3.5 py-2.5 shadow-sm ${t?`rounded-br-md bg-primary text-primary-foreground`:`rounded-bl-md border border-border/40 bg-surface-elevated text-foreground`}`,children:[(0,V.jsx)(`p`,{className:`whitespace-pre-wrap text-sm leading-relaxed`,children:e.content}),(0,V.jsxs)(`div`,{className:`mt-1 flex items-center justify-end gap-1.5 text-[10px] font-semibold ${t?`text-primary-foreground/70`:`text-muted-foreground`}`,children:[(0,V.jsx)(`span`,{children:n}),t&&e.status?(0,V.jsx)(Oz,{status:e.status,isOutgoing:t}):null]})]})})}function Az({align:e}){return(0,V.jsx)(`div`,{className:`flex w-full ${e===`right`?`justify-end`:`justify-start`}`,children:(0,V.jsx)($R,{className:`h-14 ${e===`right`?`w-[58%]`:`w-[62%]`}`,rounded:`xl`})})}function jz(){return(0,V.jsxs)(`section`,{className:`flex h-full min-h-0 flex-1 flex-col overflow-hidden rounded-2xl border border-border/50 bg-surface-elevated/40 shadow-sm backdrop-blur-md`,children:[(0,V.jsxs)(`header`,{className:`flex shrink-0 items-center gap-3 border-b border-border/40 px-3 py-3 sm:px-4`,children:[(0,V.jsx)($R,{className:`h-10 w-10 shrink-0`,rounded:`full`}),(0,V.jsxs)(`div`,{className:`min-w-0 flex-1 space-y-2`,children:[(0,V.jsx)($R,{className:`h-3.5 w-32`,rounded:`md`}),(0,V.jsx)($R,{className:`h-3 w-48 max-w-full`,rounded:`md`})]})]}),(0,V.jsxs)(`div`,{className:`min-h-0 flex-1 space-y-4 overflow-hidden px-3 py-4 sm:px-4`,children:[(0,V.jsx)(`div`,{className:`flex justify-center py-1`,children:(0,V.jsx)($R,{className:`h-6 w-20`,rounded:`full`})}),(0,V.jsx)(Az,{align:`left`}),(0,V.jsx)(Az,{align:`right`}),(0,V.jsx)(Az,{align:`left`}),(0,V.jsx)(Az,{align:`right`}),(0,V.jsx)(Az,{align:`left`})]}),(0,V.jsx)(`footer`,{className:`shrink-0 border-t border-border/40 px-3 py-3 sm:px-4 sm:py-3.5`,children:(0,V.jsx)($R,{className:`h-11 w-full`,rounded:`xl`})})]})}function Mz(e){let t=[];for(let n of e){let e=gz(n.sentAt),r=t[t.length-1];r?.dayLabel===e?r.messages.push(n):t.push({dayLabel:e,messages:[n]})}return t}function Nz({children:e}){return(0,V.jsx)(`section`,{className:`flex h-full min-h-0 flex-1 flex-col overflow-hidden rounded-2xl border border-border/50 bg-surface-elevated/40 shadow-sm backdrop-blur-md`,children:e})}function Pz({conversation:e,messages:t,isLoading:n=!1,error:r=``,onBack:i,showBackButton:a=!1,onOpenListing:o,canSendMessages:s=!0,extensionComposerPlaceholder:c,sendError:l=``,onSend:u,onAiConfigSaved:d}){let f=my(),p=(0,b.useRef)(null),[m,h]=(0,b.useState)(null),{canUseAiNegotiationFeatures:g,status:_}=bj(),{status:v}=Sy(),y=(0,b.useMemo)(()=>Mz(t),[t]),x=Lj(_,v)&&g,S=e!==null&&m===e.id;if((0,b.useEffect)(()=>{let e=p.current;e&&(e.scrollTop=e.scrollHeight)},[e?.id,t.length]),n)return(0,V.jsx)(jz,{});if(r)return(0,V.jsx)(Nz,{children:(0,V.jsx)(ZR,{icon:(0,V.jsx)(Bk,{size:28,strokeWidth:2}),title:f(`chatsExtra.couldntLoadConversation`),description:r})});if(!e)return(0,V.jsx)(Nz,{children:(0,V.jsx)(ZR,{icon:(0,V.jsx)(wA,{size:30,strokeWidth:2}),title:f(`chatsExtra.inboxReadyTitle`),description:f(`chatsExtra.inboxReadyBody`)})});let C=fz(e),w=cz(e),T=pz(e),E=lz(e),D=uz(e),O=dz(e),k=C!==w,A=!!T&&!!E&&T!==E,j=!!(e.listingId&&o);return(0,V.jsxs)(Nz,{children:[(0,V.jsxs)(`header`,{className:`z-10 flex shrink-0 items-center gap-2 rounded-t-2xl border-b border-border/40 bg-surface-elevated/30 px-3 py-3 backdrop-blur-md sm:gap-3 sm:px-4`,children:[a?(0,V.jsx)(`button`,{type:`button`,onClick:i,className:`flex h-9 w-9 shrink-0 items-center justify-center rounded-lg border border-border/50 text-foreground transition-colors hover:bg-surface-elevated lg:hidden`,"aria-label":f(`chatsExtra.backToChatList`),children:(0,V.jsx)(bk,{size:18})}):null,(0,V.jsx)(`div`,{className:`min-w-0 flex-1 overflow-hidden`,children:(0,V.jsxs)(`button`,{type:`button`,onClick:()=>{e.listingId&&o&&o(e)},disabled:!j,"aria-label":f(j?`chatsExtra.viewListingDetails`:`chatsExtra.listingUnavailable`),className:`flex w-max max-w-full min-w-0 items-center gap-3 text-left outline-none ${j?`cursor-pointer`:`curs
36or-default`}`,children:[(0,V.jsx)(`div`,{className:`h-10 w-10 shrink-0 overflow-hidden rounded-full bg-surface-elevated`,children:e.listingImageUrl?(0,V.jsx)(`img`,{src:e.listingImageUrl,alt:``,className:`h-full w-full object-cover`,referrerPolicy:`no-referrer`}):(0,V.jsx)(`div`,{className:`flex h-full w-full items-center justify-center text-muted-foreground/40`,children:(0,V.jsx)(lA,{size:16})})}),(0,V.jsxs)(`div`,{className:`min-w-0 max-w-full`,children:[(0,V.jsx)(`p`,{className:`truncate text-sm font-black text-foreground`,title:k?C:void 0,children:w}),E?(0,V.jsx)(`p`,{className:`truncate text-xs font-semibold text-muted-foreground`,title:A?T??void 0:void 0,children:E}):null]})]})}),(0,V.jsxs)(`div`,{className:`flex shrink-0 items-center gap-2`,children:[e.aiNegotiationEnabled?(0,V.jsxs)(`span`,{className:`hidden items-center gap-1 rounded-lg bg-primary/15 px-2 py-1 text-[10px] font-bold uppercase tracking-wide text-primary sm:inline-flex`,children:[(0,V.jsx)(Ok,{size:12}),f(`chatsExtra.aiOn`)]}):null,x?(0,V.jsx)(`button`,{type:`button`,onClick:()=>h(e.id),className:`flex h-9 w-9 shrink-0 items-center justify-center rounded-xl border border-primary/35 bg-primary/10 text-primary shadow-sm transition-colors hover:border-primary/50 hover:bg-primary/15 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary/40`,"aria-label":f(`chatsExtra.openAiNegotiationSettings`),title:f(`chatsExtra.aiNegotiationSettings`),children:(0,V.jsx)(ej,{size:17,strokeWidth:2})}):null]})]}),d?(0,V.jsx)(wz,{open:S,conversation:e,onClose:()=>h(null),onSaved:e=>{d(e),h(null)}}):null,(0,V.jsx)(`div`,{ref:p,className:`custom-scrollbar min-h-0 flex-1 overflow-y-auto overscroll-contain px-3 py-4 sm:px-4`,children:(0,V.jsx)(`div`,{className:`flex w-full flex-col gap-4`,children:t.length===0?(0,V.jsx)(ZR,{compact:!0,icon:(0,V.jsx)(wA,{size:22,strokeWidth:2}),title:f(`chatsExtra.noMessagesYet`),description:f(`chatsExtra.sendFirstMessage`,{name:O}),className:`py-16`}):y.map(e=>(0,V.jsxs)(`div`,{className:`flex flex-col gap-3`,children:[(0,V.jsx)(`div`,{className:`flex justify-center py-1`,children:(0,V.jsx)(`span`,{className:`rounded-full border border-border/40 bg-surface-elevated/80 px-3 py-1 text-[10px] font-bold uppercase tracking-wide text-muted-foreground`,children:e.dayLabel})}),e.messages.map(e=>(0,V.jsx)(kz,{message:e},e.id))]},e.dayLabel))})}),l?(0,V.jsx)(`p`,{className:`shrink-0 border-t border-error/20 bg-error/5 px-4 py-2 text-xs font-medium text-error`,children:l}):null,(0,V.jsx)(Ez,{recipientName:D??void 0,canSend:s,disabledPlaceholder:c,onSend:u})]})}function Fz(e,t){return Ate(t,e)}function Iz(e,t){return Xv(t,e)}var Lz=20,Rz=500;function zz(){return typeof crypto<`u`&&`randomUUID`in crypto?`temp-${crypto.randomUUID()}`:`temp-${Date.now()}`}function Xce(e,t){return Zv(t,e)}function Zce(){let e=my(),t=or(),n=nr(),{conversationId:r}=ur(),[i]=qi(),a=i.get(`listing`),o=yce(i),s=n.state,c=r??null,{isActive:l,status:u}=OM(),[d,f]=(0,b.useState)([]),[p,m]=(0,b.useState)(!0),[h,g]=(0,b.useState)(!1),[_,v]=(0,b.useState)(``),[y,x]=(0,b.useState)(``),[S,C]=(0,b.useState)(1),[w,T]=(0,b.useState)(!1),[E,D]=(0,b.useState)(``),[O,k]=(0,b.useState)(``),[A,j]=(0,b.useState)(null),[M,N]=(0,b.useState)([]),[P,F]=(0,b.useState)(null),[ee,I]=(0,b.useState)(!1),[te,ne]=(0,b.useState)(``),[re,ie]=(0,b.useState)({}),ae=(0,b.useRef)(!1),oe=(0,b.useRef)(0),se=(0,b.useRef)(c);(0,b.useEffect)(()=>{se.current=c},[c]),(0,b.useEffect)(()=>{let e=window.setTimeout(()=>{k(E.trim())},Rz);return()=>window.clearTimeout(e)},[E]);let ce=O||void 0,le=!o&&E.trim()!==O&&E.trim().length>0,ue=(0,b.useMemo)(()=>o?{searchFilterId:o}:void 0,[o]),de=(0,b.useMemo)(()=>o?s?.chatsSearchFilterName?.trim()||(A?.id===o?A.name:``):``,[s?.chatsSearchFilterName,A,o]);(0,b.useEffect)(()=>{if(!o||s?.chatsSearchFilterName?.trim())return;let e=!1;return Lo.get(`/api/searches/${o}`).then(t=>{if(e)return;let n=t.data.name?.trim();j({id:o,name:n||`Filtered search`})}).catch(()=>{e||j({id:o,name:`Filtered search`})}),()=>{e=!0}},[s?.chatsSearchFilterName,o]);let fe=(0,b.useCallback)(async()=>{let t=++oe.current;m(!0),v(``),x(``);try{let e=o?await Bo(o,{page:1,page_size:Lz}):await Vo({page:1,per_page:Lz,q:ce});if(t!==oe.current)return;f(e.conversations.map(QP)),C(e.page),T(e.page<e.pages)}catch(n){if(t!==oe.current)return;f([]),T(!1),v(Fz(n,e))}finally{t===oe.current&&m(!1)}},[ce,o]),L=(0,b.useCallback)(async()=>
36{if(!(p||ae.current||!w)){ae.current=!0,g(!0),x(``);try{let e=S+1,t=o?await Bo(o,{page:e,page_size:Lz}):await Vo({page:e,per_page:Lz,q:ce}),n=t.conversations.map(QP);f(e=>{let t=new Set(e.map(e=>e.id)),r=n.filter(e=>!t.has(e.id));return r.length>0?[...e,...r]:e}),C(t.page),T(t.page<t.pages)}catch(t){x(Fz(t,e))}finally{ae.current=!1,g(!1)}}},[ce,w,p,S,o]);(0,b.useEffect)(()=>{let e=!1;return queueMicrotask(()=>{e||fe()}),()=>{e=!0}},[fe]);let pe=(0,b.useMemo)(()=>{if(!o||!ce)return d;let e=ce.toLowerCase();return d.filter(t=>[t.providerUsername,t.listingTitle,t.listingPrice,t.lastMessagePreview].filter(Boolean).join(` `).toLowerCase().includes(e))},[ce,d,o]);(0,b.useEffect)(()=>{if(!c)return;let t=!1;return queueMicrotask(()=>{t||(I(!0),ne(``),N([]),F(null))}),Ho(c,{page:1,per_page:50}).then(e=>{if(t)return;let n=$P(e);F({...n,unreadCount:0}),N(rce(e.messages)),f(e=>{if(!e.some(e=>e.id===n.id))return e;let t={...n,unreadCount:0};return e.map(e=>e.id===n.id?t:e)})}).catch(n=>{t||(F(null),N([]),ne(Iz(n,e)))}).finally(()=>{t||I(!1)}),()=>{t=!0}},[c]),Coe({onNewMessage:e=>{let t=sF(e);t&&(f(e=>iF(e,t.conversation)),t.conversation.id===se.current&&(F(e=>e?.id===t.conversation.id?rF(e,t.conversation):t.conversation),t.message&&N(e=>sce(e,t.message))))},onMessageStatusUpdated:e=>{f(t=>oce(t,e)),e.conversationId===se.current&&N(t=>ace(t,e))},onMessagesMarkedRead:e=>{f(t=>ice(t,e)),e===se.current&&F(e=>e&&{...e,unreadCount:0})},onConversationAttentionNeeded:e=>{let t=typeof e.conversation_id==`string`?e.conversation_id:null;t&&(f(e=>aF(e,t,!0)),t===se.current&&F(e=>e&&{...e,needsHumanAttention:!0}))},onConversationEnded:e=>{let t=typeof e.conversation_id==`string`?e.conversation_id:null;t&&f(e=>aF(e,t,!1))},onConversationUpdated:e=>{let t=cce(e);t&&(f(e=>iF(e,t)),t.id===se.current&&F(e=>e?.id===t.id?rF(e,t):e))}});let me=(0,b.useMemo)(()=>c&&d.some(e=>e.id===c)?c:null,[c,d]),he=(0,b.useMemo)(()=>c?d.find(e=>e.id===c)||(P?.id===c?P:null):null,[c,d,P]),ge=(0,b.useMemo)(()=>he??d.find(e=>e.id===c)??P,[c,d,P,he]),_e=(0,b.useMemo)(()=>{if(!a)return!1;let e=n.state;return typeof e?.isPersonalListing==`boolean`?e.isPersonalListing:(ge??d.find(e=>e.listingId===a))?.isPersonalListing??!1},[d,n.state,ge,a]),ve=(0,b.useCallback)(e=>{t(OF(e,ue))},[ue,t]),ye=(0,b.useCallback)(()=>{t(OF(void 0,ue))},[ue,t]),be=(0,b.useCallback)(()=>{let e=new URLSearchParams(i);e.delete(DF);let n=e.toString(),r=OF(c??void 0);t(n?`${r}?${n}`:r,{replace:!0}),j(null)},[c,t,i]),xe=(0,b.useCallback)(e=>{if(!e.listingId)return;let n=new URLSearchParams({listing:e.listingId});o&&n.set(DF,o),t(`${EF}/${e.id}?${n.toString()}`,{state:{fromListingOverlay:!0,overlayReturnPath:OF(e.id,ue),overlaySource:e.isPersonalListing?`my-listings`:`feed`,isPersonalListing:e.isPersonalListing}})},[ue,t,o]),Se=(0,b.useCallback)(()=>{let e=n.state,r=e?.overlayReturnPath??OF(c??void 0,ue);if(TF(e)){t(r,{replace:!0});return}t(OF(c??void 0,ue),{replace:!0})},[c,ue,n.state,t]),Ce=(0,b.useCallback)(e=>c?bce(c,e):OF(void 0,ue),[c,ue]),we=(0,b.useCallback)(e=>{Zo(e).catch(()=>{})},[]),Te=(0,b.useCallback)(e=>{F(t=>t?.id===e.id?{...t,...e}:t),f(t=>t.map(t=>t.id===e.id?{...t,...e}:t))},[]),Ee=(0,b.useCallback)(e=>{c&&(f(t=>t.map(t=>t.id===c?{...t,lastMessagePreview:e.content,lastMessageAt:e.sentAt,lastMessageStatus:e.status??t.lastMessageStatus}:t)),F(t=>t?.id===c?{...t,lastMessagePreview:e.content,lastMessageAt:e.sentAt,lastMessageStatus:e.status??t.lastMessageStatus}:t))},[c]),De=(0,b.useCallback)(async t=>{if(!c||!l)return;ie(e=>{if(!e[c])return e;let t={...e};return delete t[c],t});let n=zz(),r=nce(c,t,n);N(e=>[...e,r]),Ee(r);try{let e=eF(await Uo(c,t));N(t=>t.map(t=>t.id===n?e:t)),Ee(e)}catch(t){throw N(e=>e.map(e=>e.id===n?{...e,status:`failed`}:e)),ie(n=>({...n,[c]:Xce(t,e)})),t}},[c,l,Ee]),Oe=c!==null,ke=!!c&&ee,Ae=c?M:[],je=c?te:``,Me=c?re[c]??``:``,Ne=l&&he?.canMessageListing!==!1,Pe=he?.canMessageListing===!1?`Messaging is not available for this listing.`:yM(u,e);return(0,V.jsxs)(V.Fragment,{children:[(0,V.jsxs)(`div`,{className:`flex h-full min-h-0 w-full overflow-hidden`,children:[(0,V.jsx)(Cz,{conversations:pe,activeConversationId:me,onSelectConversation:ve,searchQuery:E,onSearchQueryChange:D,searchFilterLabel:o?de||`Filtered search`:void 0,onClearSearchFilter:o?be:void 0,isSearchFilterActive:!!o,isLoading:p||le,isLoadingMore:h,hasMore:w,loadMoreError:y,onLoadMore:L,error:_,onRetry:fe,className:Oe?`hidden lg:flex`:`flex`}),(0,V.jsx)(`div`,{className:`flex h-full min-h-0 min-w-0 flex-1 flex-col overflow-hidden p-2 sm:p-3 lg:p-4 ${Oe?`flex`:`hidden lg:flex`}`,children:(0,V.jsx)(Pz,{conversation:he,messages:Ae,isLoading:ke,error:je,showBackButton:Oe,onBack:ye,onOpenListing:xe,canSendMessages:Ne,extensionComposerPlaceholder:Pe,sendError:Me,onSend:De,onAiConfigSaved:Te})})]}),_e?(0,V.jsx)(XR,{listingId:a,onRequestClose:Se,backLabel:`Back to Chats`}):(0,V.jsx)(MF,{listingId:a,onRequestClose:Se,backLabel:`Back to Chats`,buildDetailPath:Ce,onListingOpen:we,similarListingDetailState:{fromListingOverlay:!0,overlaySource:`feed`,overlayReturnPath:OF(c??void 0,ue)}})]})}function Qce(){let e=or(),{status:t,isAuthenticated:n}=Jv();return(0,b.useEffect)(()=>{t!==`loading`&&(n||e(`/auth/login`,{replace:!0}))},[n,e,t]),t===`loading`?(0,V.jsx)(`div`,{className:`flex min-h-0 flex-1 items-center justify-center overflow-hidden px-4`,children:(0,V.jsx)(`p`,{className:`text-sm font-medium text-muted-foreground`,children:`Loading chats...`})}):n?(0,V.jsx)(`div`,{className:`flex min-h-0 flex-1 flex-col overflow-hidden`,children:(0,V.jsx)(Zce,{})}):null}var $ce=[{icon:HA,nameKey:`subscription.scraperName`,descriptionKey:`subscription.scraperDescription`},{icon:BA,nameKey:`subscription.repostName`,descriptionKey:`subscription.repostDescription`},{icon:Ok,nameKey:`subscription.aiName`,descriptionKey:`subscription.aiDescription`}];function Bz(){let e=my();return(0,V.jsx)(`div`,{className:`mx-auto w-full max-w-3xl px-4 py-16 sm:py-24`,children:(0,V.jsxs)(`div`,{className:`rounded-[2rem] border border-border bg-surface p-8 text-center shadow-xl sm:p-12`,children:[(0,V.jsx)(`div`,{className:`mx-auto flex h-14 w-14 items-center justify-center rounded-2xl bg-primary/10`,children:(0,V.jsx)(ej,{className:`h-7 w-7 text-primary`})}),(0,V.jsx)(`h1`,{className:`mt-6 text-2xl font-extrabold text-foreground sm:text-3xl`,children:e(`subscription.choosePlanTitle`)}),(0,V.jsx)(`p`,{className:`mx-auto mt-3 max-w-xl text-sm text-muted-foreground sm:text-base`,children:e(`subscription.choosePlanDescription`)}),(0,V.jsx)(`div`,{className:`mt-10 grid gap-4 text-left sm:grid-cols-3`,children:$ce.map(({icon:t,nameKey:n,descriptionKey:r})=>(0,V.jsxs)(`div`,{className:`rounded-2xl border border-border bg-surface-elevated/50 p-5`,children:[(0,V.jsx)(t,{className:`h-5 w-5 text-primary`}),(0,V.jsx)(`h2`,{className:`mt-3 text-sm font-bold text-foreground`,children:e(n)}),(0,V.jsx)(`p`,{className:`mt-1.5 text-xs leading-relaxed text-muted-foreground`,children:e(r)})]},n))}),(0,V.jsx)(zi,{to:YN(`subscription`),className:`mt-10 inline-flex w-full items-center justify-center rounded-2xl bg-primary px-8 py-4 text-base font-extrabold text-primary-foreground shadow-xl shadow-primary/20 transition-all hover:bg-primary-hover hover:shadow-
36primary/40 active:scale-[0.98] sm:w-auto`,children:e(`common.seePlans`)})]})})}function Vz(e,t){switch(t){case`activate`:return e(`searchActionToast.activateTitle`);case`deactivate`:return e(`searchActionToast.deactivateTitle`);case`delete`:return e(`searchActionToast.deleteTitle`)}}function ele(e){let t=e.details?.error;return typeof t==`string`?t:void 0}function tle(e){return e.replace(/^cannot activate search:\s*/i,``).trim()}function nle(e,t){let n=tle(t);if(!n)return e(`searchActionToast.usageLimitDefault`);let r=n.toLowerCase();return r.includes(`not available in your plan`)?e(`searchActionToast.frequencyNotInPlan`):r.includes(`no active subscription`)?e(`searchActionToast.noActiveSubscription`):r.includes(`limit reached`)?e(`searchActionToast.usageLimitReached`):e(`searchActionToast.cannotActivatePlan`)}function Hz(e,t,n){return t instanceof _o?{type:`error`,message:Vz(e,n),description:e(`searchActionToast.timeoutDesc`),duration:6e3}:t instanceof go?{type:`error`,message:Vz(e,n),description:e(`searchActionToast.networkDesc`),duration:6e3}:t instanceof ho?rle(e,t,n):{type:`error`,message:Vz(e,n),description:e(`searchActionToast.genericError`),duration:5e3}}function rle(e,t,n){let r=ele(t),i=t.message.toLowerCase();return t.status===401?{type:`error`,message:Vz(e,n),description:e(`searchActionToast.sessionExpired`),duration:7e3}:t.status===403?n===`activate`&&r===`usage_limit_exceeded`?{type:`warning`,message:Vz(e,n),description:nle(e,t.message),duration:8e3}:i.includes(`email not verified`)?{type:`warning`,message:Vz(e,n),description:e(`searchActionToast.emailNotVerified`),duration:8e3}:i.includes(`no active subscription`)?{type:`warning`,message:Vz(e,n),description:e(`searchActionToast.subscriptionRequired`),duration:8e3}:{type:`error`,message:Vz(e,n),description:e(`searchActionToast.notAllowed`),duration:6e3}:t.status===404?{type:`error`,message:Vz(e,n),description:e(`searchActionToast.searchNotFound`),duration:7e3}:t.status===429?{type:`warning`,message:e(`searchActionToast.waitTitle`),description:e(`searchActionToast.rateLimited`),duration:7e3}:t.status>=500?{type:`error`,message:Vz(e,n),description:e(`searchActionToast.serverError`),duration:6e3}:t.status===400?i.includes(`inactive`)?{type:`error`,message:Vz(e,n),description:e(`searchActionToast.inactiveAccount`),duration:7e3}:{type:`error`,message:Vz(e,n),description:e(`searchActionToast.processFailed`),duration:7e3}:t.status===422?{type:`error`,message:Vz(e,n),description:e(`searchActionToast.processFailed`),duration:7e3}:{type:`error`,message:Vz(e,n),description:e(`searchActionToast.tryAgainSoon`),duration:5e3}}var ile=`/assets/google-DfgxdfRu.png`;function Uz(e){return e?{amazon:`data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAALQAAAC0CAMAAAAKE/YAAAAAdVBMVEX///8AAAD/mQIRERH19fUdHR0ICAhOTk62trY0NDQoKCja2tpDQ0Pw8PD+/fvp6en6+vr/piVZWVnj4+P/s0WPj4//+O7FxcWfn5//8dx3d3eEhIT/0I1nZ2f/5sK+vr6qqqr/2qbR0dH/wmrW1tbNzc3JyckeCxyEAAAHA0lEQVR42u2a6ZajOAyFSZl9D1sIhCVA8v6POF7BBlJNuruqZubo+1Uska9lWZLp1jQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAIAfIoyefV7Xef+MpLuxjonJX9HDti+puO11djfpKxPcQnmJwpUFBemhPl2wVU82FM7vkEHsIXgtOX5UDjJPGBP5tSdup5WFaR5aUPqGaSInJzMKL42LTOQmdiwNNtT4FWbBqafZcG6t6WfrpYXtEEP97Ki4JK8kZagNFXloWL3+QnNUGyc6IMPpuRob0dt5UPGnZpJiuwZ/D9WzH4LcPUm4JbcQOac1CXsU2v48pGlduP8D/0SGtPSL+CGq9p0dNaZq1+hn0YS8Xp5Xem/MF2YuxqpWFlAZfi56mTqbZR/OojHW4G8HUdCrjWHHk0SbjeRFo/TlsVgcxLW5tuA+Xog2mejeWL3fKaIlSabr7Yjm/sRPHVcMnstPkLIKir6Svncxthbq8IWnGyJ64vdNQ9jzU0m0K0/JLHcc3YhI9qKp5gITXZ4O2V2Kt0xFQcz94pRe5OV8PD9gG9HniNVCtvQLI388xG6gswyWdUTzkFW8Ee2xH7lPTR4/UtYg6e16nrxR9WViSpNLmdsMusIht8AXNQ4YnjVvCnx3cHnk00hBS0jOoo2qs8VWs7YJ5MEMVCHb00gaUohuiNdybgKRPRNZkj3PWbyuaR23MChlIFeigF9ZgRQSNAqEaDOPl0H8aBseXVk3SfLU5PBURKNOWhEeOaW5iI4vxILVcScwC4YiuuPrxFYj4Gpq9rBaDAvRTCcfxEn3M7UuVmBPtCPvEXWPLis3Wxh2RKe+kr74/BHPrJI2MQibzgV9KpqMmj7sMufBqohme0pP2Lj9vmhuoc8btBEtdsopCeQIQhdtfSlCpZfn/0p0aleWaywpQhHNlAnR9r7oyK6JhTmvyKL5VhPJO+xN5ZWnMSvlollAatNnoqPcQatc/1I02hWNm5OVBUk036g8WZB9qJQmsQtI0heiL78UPSXbgvaeaG9rYREtCsGpEctSq6Ind94tXLTBRHuvRXtzbvSbKkG/IToVSRj5SbWJ6RIpvcFr0fVa9GtPC0eg5hLEu9njV6LFPjObLoo32YPXgZNhz0Pm6mIM73ua712z1l+lvF+JFhuJFru16CjhM6qXYsxznPFQYtosD3talF1edrrfCA++2tz2UxE9l0Ir2viJ5wiRjsnlQU+LdF4p2ekd0bp12inj3I2iFKL68vCCWAli0b7xDEhC/JinQ97t8EInvMaGPCZatJ+8KHPXsqyV+kvTZrh+U3qxVMZZvyPGJJ3IQU+LloJ5WkyBOeGYaPEb5ulortjSDKSOvpoWmSwkI6k/OBjTYkjafunzsYmG4EFP+1JKWw4xxKCIH
36BlyX9p6c0qkCfBoTFsiXw3RUC1dP+kND8Z0IjqLYTlFsGQS+FvRZL/FjTi8eV7pSq3+0Tw9H8dcRz7kkH74YPbIhUzDkc/kxvOl6Dl5m644n7HSczRPP9UjpstdZaWHRQ+uWsC5Bd+bmzZkYHgzxRJduW5VbE17w9PqUdq/0EuzSd8o47mswOno7jMTj2lATlPaj2kaur6yDCFar9Xjchlq73haC5ZIRs1ES5jJvpAcbU0lBWYyaEFDZh3RFsFobOkrWfCsHd6f6uWyPqZvh0rVONDlxX3iIoyb9ERrmrg568cmyyHkMatt9MKato+02FYsRI3LPz55j/VJOh3EnYF9ijORn6fLslOzScq/ItGrF9+Y9KmTvgQGnrAbRAR+FdOLYO8RtkA+F3ZbC6yCFVdMEW8KW1fm5IOlrEQZhF3pb39NfX0VHrNQtLcxO2OybGzDd4cM3xLbXv/KJ+TrLftYOLdf+r36ej7f/oLsuywZc/vaj+y380d2K/7QSjGes3G8Ecbz14vGTsKjZPc/9HZRFKGIN6L6/tX/otGSpc1u1/AvrV325TFN43qkm2ds/yxKwut9xGILIvr65aK14kYD8Yyj5LfdXbQkmrMQb+2PjzHUvoGW7/7z+Fu6cY6mBs63UGu/I6QVZzPdb8VJeMWK2Y+zO57w7Xuig1WkdlxqQ4YdXoTHBI/LbIlWEtK3UPsuCqVCYOG39lq88jluM9r7Ipi4mdVunPG+y9F7sqlyLP3etqQN4uA/2/udthnym9m94MXq6yvLxn9r2Uw7bYMo5M/tC0IyTp/Zx1ho36wae3vcUfUZSoK/f2RX7QcIryIbHFG8KqW3n9FM3d0e0o0VYyeHahPyk//Homjv42fCaVoMtX8dOK2xNHFWd2XGsuGbx41vDBSy4NeWJDnKneS/4t8pdv8s9x/QCgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAPzf+Qe/+ISZmwWvNAAAAABJRU5ErkJggg==`,apple:`data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAFgAAABYCAYAAABxlTA0AAAAAXNSR0IArs4c6QAAAERlWElmTU0AKgAAAAgAAYdpAAQAAAABAAAAGgAAAAAAA6ABAAMAAAABAAEAAKACAAQAAAABAAAAWKADAAQAAAABAAAAWAAAAADngEgQAAAHlElEQVR4Ae1dXWgUVxidJGpQE20UKhh/mlgINX3SF6VCqIgQEE1fSoihDwq+1QcJFBoDCz4EoeBPQ/SpqEgx+lBQRNRgMRKQhLyERCkmBU0LEjQJiUJMSW7PGZ1ldndmNrs7892Z3T3wObN3Zu53vjM3d+7fjCVGeFAKKnVJ9iV+fwartBl2jTmbzWB/DPZXki3ht3aUaGZQD//7P1kDtlU+8ZlGPo9hjz7ZqE/5RiKbHWAZg43DlJDRVwxG33mJMkTVCuuHSYnq5occyIWcIo9ViOAETLK0ugmbnE5O5EaOkcQPYP0PLDmwsP0mR3KNDL4G0z5Y2IRMx4ecyT20WAlmZ2H/wdIFE9bj5M4YGEuoUAM2A7CwCpcpL8byBSwU+A4s2O7MNIiwn8+YGJtWnIb3sAuVKz/GKA52a3+F5Uo+KtczVsYsArYbe2BREccvnow58DYz72IhimvdJMYeaEkupGrBEjV5Sw0CQSE80JLFdPvt+4OPzRU3Z4Wa7lsTjp2IfGzn5lowqAm1yQnsMuZTDy1XUZOvpzae3ep0Y6KdyOD7nG5Rfl9cjfDKYb3ZhMmRpSgP3CSXtqB+U6OsRuH6cGFQpPItX2qVETgAnW8iBB3Psgft2R2MwkxEgmA1NTXq0KFDCWnChYSaLasrfUKYWE6inDx5Uj1//lwRT548ySkvH+Kmdp5gqyKME5QpwlVWVqpbt26Zwlr/dHV1pZyHeCTTqJ1ny6xVmFBWwa9fv149e/bM0jW+PX78eFb5+RwzNXRFP46EgaQnh8uXL8dFtXbev3+vqqurPa8Tio0aOmIHUsNA0JPD3r171dLSkqVrfNve3u55nXBs1DIFMaSEiaQjlwsXLsRFtXZGRkZUeXm54/maYqKWKYjEw21gYMDS1dzevXtXsU5GNGEyapkAdvXCRNCRy4oVK9TCwoIp7KtXr1RHR4cqLS11PDcE8SR0n38MAaG4UBs3blQ0J05sKdTX16ccY7ONnY2KioqUY075CKRR0zj+wJ42YiUlJaqxsVHdu3dPTU9Px6uAiYkJdfPmTXXgwAHFc+wcWec2Nzer27dvK5ZmC3wAjo6OqvPnz6utW7cmXGO/XmCfmprgJN4UTAsZlrqhoSFLH9ftixcvVHd3tzp16pTq6elRU1NTrudaBz58+KDOnTunysrKdMRGTc0J0q90idvQ0KDevHlj6RHY9vr167rqamprNOkQePv27WpmZiYwUZMzPnPmjI5STG2Nn6QF5p8sB2ak0Nvbq/gQlI7zk7bGb9KOW1papLRVDx8+1NkJobbyi6UfPHggIvC7d+90tyTMmY5hyRK8ZcsWtbi4KCJwW1ubjmrB7nOYzQi+5CcGDNYY6H2J+MN4sYgfDyeV4gJv3rzZg49/h9BCMV6+fOlfhtnlJC8wxmyzo5rhVcPDrPm0wxRYlEVVVZWIP9TzIn7SOWEVMZfuJD+Pv3792s/sXPPavXu3gfEL1+NCB+bEBcbAjEhs69atM+rq+PK+VuSvwJR13759WtWFc7N26MOOve0W6P7OnTtF2sB0gupIbdq0KdB40mjXxypiDCaGsbExY3Z2VsQfxDWuXbumsy4eo8D8UogYMOVjYJBczN/BgweNGzduGKyTNcDUVny48vDhw2LVhOWIA/YQW7q6MIcrxQfcOd2DasKKXWx76dIlaYHNAXdWE+JTRleuXBET1nK0a9cuSYHjU0asmsQnPWtraxXnzKTQ398vKS59mZOe1krAz5HQSKWlgNljA1Pzxp49e0Rctra2Sg/+dCMwviRjQsvCE659sE/TB1WaOfWPKKWNnyxLgJalU8eOHQtKVzNf3kAN6yNSlk5R6RhM+i6b/i5evBiYyEeOHNERE7VMgbblq1xzxplfv9HZ2alDXPp0XL5KxbUtwN6wYYO55MlNZK6hePr0qbp69aq5smdwcNBzbk/TOgiK67oAmwJrfYVg7dq15vKot2/fmjpPTk6qO3fuqKamJsflT9u2bVOxWEyNj4+bi7Ln5+fV/fv31dGjR3WVXPr1fIWAzTYtDzv4TRCFJTo5zev36tWr1Zo1azK6xiu/LI9RO6vpi11nROo1LoSgW1S7/5TXuJzmVFaB9N8wmdlJ55scxdR/QboWtmAnz3GIZPCEn5MTi7/TKkDNEsRNd0UfTrAX/+K+ux7UKmOw+1z8nIG7qFaB8/ycgdcTbxICV8C+yfjWFNYFvyDc37MNeSUuLH5Sxr0Up/2kzHKE54d/pmHWn0Rx+1ELakJtfEHxs16pBcy3z3pZd+g0doql96MG1CIQdCHXQhc5sE8r8o6xY9JTwCIzdqfOGZL9A7vShSgyY2bsIuBd5J9KoVQXjDXwkut05wrhwRfYA81JUKc0NlfysZ3MmHxvijkJuJw0NrjzqcfHWHzrRCxHwOWcwwfAWViUB4jInTFwiCC04ChcHyxqD0ByJvfIgN9yjMInGsmRXCMJVhsnYKGYSAUP+18VOZEbOUYeHHduhXHNgD1IHfvkQC5eY+E4HF3sAPUYTLJU0xd90rcoSkS9pTrjQ+Vb2H5YA6wK5gfYhn0MewT7EzYC0wLdAtuDZlc07/7b3/8Bz9UDFSuy/PUAAAAASUVORK5CYII=`,autotrader:`/assets/autotrader-B7qxAsPl.png`,craigslist:`/assets/craigslist-D3y1HLmp.png`,ebay:`/assets/ebay-Oexv_Rul.png`,facebook:`/assets/facebook-FvZpqlEW.png`,google:`/assets/google-DfgxdfRu.png`,kijiji:`data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAALQAAAC0CAMAAAAKE/YAAAAAwFBMVEX///83M3M1MXI2MnL5qhfyRU+bRK03qGT+/v4mgduYl7g9OXhNSYP8/Py4t846N3ZEQH3z8/j5+PrKydrt7PJtapnZ2OW2tMyBfqd4dqFiX
365Lm5+/R0N9cWY6vrsjg3+ojgNuMiq+job/+57pUUIj+9e5Ns3XBwNTm8/T+5uRxrenK6db7tzeg17Z0w5RQmuSwar/0WGHv1uf5nKGkU7WaxfD7u77RqNr2a3PCjM38x2L91Ibgw+X4hIrB2/U3jN/WKbbfAAAG10lEQVR42u2baXeqMBBAEbpEIbK7K4K7bbXLs63Vtv//X73YRSYIAmoVz5n7sTbkGiaTSUBBQBAEQRAEQRAEQRAEQRAEQRAEQRAEQRAEQQ4JHY1GvTQNiDEcDukplXvP768PD69Po8TKN3eTfr8/uTmd9uj98pvXZ5Lsvtz1r7+5G+7cKyEHcb68fHhO5ny9ZmKktzV0p1H03EJ9j3B+uvR5TRIhN31fun+Xrjfd9NxqravJOVEu7i79+ACkL5/ib5oxuQZM0gVIS8tJoihJuZwkl3cPrWfofPkam0PIsA+lr29S9VZguj/sI/3EST+MUkXHai6mk87tIE0pf/8JDUg/bjSgwXR3vVWaGPSg0r3O4u1t0eltGWl+JlJnNh6PZ3WaeKSt5Xw+f1nqh5ImnbeLL946cLT5mH43YPTOPvPtdj4/nUGJITcR+zCmjeX91Yp/88cDSXduL364hdajVygNE/VwnGfGjHZ+rIenaT5R05d/Vz/cPx5E2ndeWcOhBjnvHYSOMc77zPwIoXCouYFerp2Zdf0A0vTtAvAGotR4egiN6I/P9tq5/VmHU7Hvry3gnun3V4AXsrc06d1C6VtoZzx/R8gDVzGRcTsPh5pL1ZNv7ckNiRhoNtT6/iPdueDo8OXH89P7+9MjlyT0KZRujymX1liZN7m7GQpQ+gU6X/173FuabpVe5etgdh1C6XZ7vFEZUSGQ8gPSyz8e6TCGW0Y6nIOPNJc8Aukj4t6MuZGexeenJSd9b+0v3eOzR4K91QwO9OdHfAOLyx5zeog8nS46AjNxHF/sEy6oQ6MjtTRd+M6LRHu7j7V1e5pol6HPfefQNJ1+GaeLn7C+XSTceH9MWTCvio9xsp0R0ec/qfp+SVMu4/qg5VN2QMW0uGUsOqFrlWE5DTMweYaz8XQ6HX8E1on6wCzVLZ2SzYss5/eMF0cg6aSpp6mACozGHmPjcrpjFr93bpoX/HB1vBEMZ8OVNaVbq1Zcr1wKNqC6ZekkdT1d1PwtTU5SC/yN2rxevaposioyJLFCE+z0dZtt8r7+X1Vr9c0GJP0moNEVc4CqFReJpib+fssQ6bD5Zq97EJVSus1duHTdhs5SzRHipdd3JrW0dAhpolfgMIvdhpB9aaOgwoBWBkL2pUmZm4Rai5yBtAknoSQXQtdelpSMVNIshevppFkX7EIs+RnEIDHSTg2Mc06t6MFL1UuDVqFiN7lvs0WaLTjfKdx2kkn/dFG1a+wmN9yW1/CM7dJWFU5CyeZTKB1U7K6iqTmWYGtWEmnHtZssha8O37jDwkhpo8VWKOWrgVg1BL3VYAuQvlU6MAmbgRtn1cTvkz/mlkzak34b5JJJlxS/CyZtDJyWV9wqTVpwEoqKGVz4mv6SkEwadpBIuqH4V2LSAmWbOLo1pgcKnIRamZxeOjZ7lJpc4vA20kD2pIuWzSUOd/PQIXvSnqvGVUmZk84pshRXJWVPGsaGFF4lZU8aOivhT42yLC1pHj0/6W5E2Z/p8FBd4/yk2WJ4ftKbpVJWpbmlJVfVz0FadeEqzioPcgbSctFUuA2teQ7SZeJxC7ldPwdptteCS3luM+9lUVoocTtxrXgW0kILBoi4kfeyKa27XN4LHiBkU1pwauKWvJdRaWHAHYp1zbOQNgpq9GlNVqWFOr+95U6/Mist8AujNjgLaerBABGbzjlIBxdGkPcyLM0/J4J5L8vSAn8O6R8nZFqaf1Qk2dY5SPMLo5/3MiIt+aHL7WWLmhhyUL2DdEQHW6TFGGkWvOvn3/xOxSjI4Nn4b7K2qv7fuE1kpHRUB5HSTnPdQHbDj4z0QfEX04j6BHzm+H9zIp5uSZx0VAeR0rSxbjCIfbq9FwSUWZKb4MEj0f1JE3me9deUZX8GFJI0sHxpsVk/jbQHUo2XpIHT9VeCmnUSZ+qK4Zkt0XPpqnEKZwJSoaSZKZ9vi+5Jfp5DPBks+kmmlQOeoyWLp0NjlEEFLtp6AucqLMiKx9V1ygPTLFe4beXWjGcMimZj4DWTnOD/2fxTZU1TxcidzgYNRdVWvwSC0keeh6tlTeI2DIGSJCSfSxLfYp8fBe2E1RSDh/Fya/uM3Ti+F+0jZ+mSIqVTgPk88sDwjzG1gLSobE/SenVD2j32ylJWA85xb2lZNV5aylWPXncUguPconEVByctqcd3phW4aRdV2yRp4kmUlMLxSyUmvXrd6OtFV0mrteINTNlvoSqVximKjkal1lSUr1eKC6YlxBf/VmH17pimKU270iqdpLj7eoXOKZVKjpW0f/LToK6f9PfiO1WFREAQBEEQBEEQBEEQBEEQBEEQBEEQBEGQv+U/UJrdu+MALEQAAAAASUVORK5CYII=`,offerup:`data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAALQAAAC0CAMAAAAKE/YAAAAAVFBMVEUAln3////+/f78//4ClX4Bl33//v8DkHQBlnoGk3n3//4Ci3D9+/0DmIECmn02ppHK7uvs//9SsqF6yLuQ08ip4Nhmvq+35+Hb+PYcl4Ann4gBhmgq8ufUAAANI0lEQVR42uxY2ZbjuA6zLGv3vi///58XoFw1p3uq5uS+i9XpJI4tQxQIQq6qEiVKlChRokSJEiVKlChRokSJEiVKlChRokSJEiVKlChRokSJEiVKlChRokSJEiVKlChRosQbzdcLgTdjTCUfeLB5Dzb443Fj8M6j/MJz+Gb+rzuZjvF9k/yDwQHGe9IHQzVf+DBY45wLuLoJAccJOYQK34yvTG+Cw5/3FV59j/ONDy45fObBD+6EcZsOQwTcxTW8hjfGGw8E53HQhI9QYyTTV0AcUgrXfd/XRSTmzaAn+OCN9zh6D8N98Qv+DL7z9Pty3n8OOmAMif4FDQTN17E7dJ9lmiNVBrMc9m08z2k6x20ZXCLOpupNTjeyM6yH/HrcSG7Vu2vf8B0Hdmc+Ai0ZcNvEiNPgTAZturTEKUYc3VP3MT0a48J8TMpapbRiTON+ud6HxnNFG4+P66RUXePnaUhYQzePWll812pNn4LGmqZNRa1j/SdoFWsc0xn0B7hB2D4NRwSCGDVg4dXWSiGB3oTKgzkGad1Ui5/543mB72mPKsYWZ7dqSf1noFHAvTsUb9PGIXyDdgCNaNWeqvDZ7PuQlkmu0jZjri2+qLgh2ahAciStum35k9XqvHzv5sni1piEjmp3H4PuCLoG5rr9M9MtRibo/rMlq7DyQATIyLUFCsuoY9uq4wq98AMYWxzAnOoI0MGEA4nPMyTozwoR1dN1iVciAfEbdPcFGvR4jP9jks2/qGJ8I0u/6baWpFmiwOeaH0GSeFwgM5iYSI58Fnhz+TTzvi04jiKIcwrUvCzz+V4gfQDtTBZ6vHnRYc5fMl3rzGmJDBp31sw0zhVJzWIoOkF1pIhL+QVKc1qARgEm6GmlCi0AKea8RY1Bg6twjaqOXI5jRwSfVt5F1+pc532/AzUPAoMUvB1HhN979iJfdT01Phi8d53bFNayZiHm5fENQTPRpEfXs8/0bA3GcFA2BHyXGWfQVV+lGWpjrQYmpc9jXSFsUYG/EdjbuEMZjBsmizS3+rielNgZkHlkq57mB18xsKGU95BuCdNLZ/JvG0GgpEU2A+nxM2gu8J7QLDBiSg3qKFW8KiXfsZNwvag/mHwgO9+COpc7ENQ9H0qEAiw+b0oFJgbGIRMPs9CFDpmn/B0JuSNegga0AXnf55ttCosbkK6vroEJ3MM839WvmRbQz7XnuCHC64g41vlKjWQ60wPrCOlqJWmt3m62ZK5JCsuEAzXHWZKBJkNDUd1xDn2HBWxIF0iM2lzP3o88NiHdy4i5KT1N43InEqb31yGtZFqeGZ0pxjGA06z4H0Bbgh4mpgu94N6mt2fEk+ILllWCG/nBxCPOBotXQA4+l45/9okFCYEbr8
36c9qDvgB+gnPQ9eaZQOobYHK4k1x6KF5URRYnF4ERYtQAd770bqAqQcosoaGUNAprlM/wJtVQ1OD5ZJbKcFF2ZJQLFTfLuQ6wUUCcOELCOJ+kiO1KQNoUdIa0SqgSKu+7KvkROQz8vC16nYINS4MEAXd29sGJwn1h63U9slPMaSaKjp2FqoXFRvpn8CDRwEzVXQsc1NQHEymuguR7tD0LjZrkgDlpSjAgY2bLDYuPu0otwtLwXEt1tyybSltlhZCGjNeAXKC5tPFkzkFN3tgF30BM3ZQs6RQWb6d04T9DPo72Ekz8QOPVCro3M1rEYRYDl4hC/HW4miG1E13JBSJHiEiVRv+R+4odE40qot9VQTZJLdX4tDwWTZ3YNjpilNUjatHT1OrX8GbVnog6W2ijJwtJpdT1rGjO4M9QU9PKWeacAduj8aD5pgFO2mXufatipDV/xPgnyr1eLcLi01qmlD4W8TvA8mSlhCD8xA8oUJSabr+j9Ay/lWZj3Bc3KJ69Yyq+wGAG3CdbI/IROz+xM0fsK9BaUmray0eJvRkwLCPUrMNKf7VOJ3joEa+8woU9QTOlMGTTMIqkUI2PY7aPuCtkJDzHmb72uYD9IKg8chQaVwtgm4Hf1EhBP4C7S/zgwa+HKKv2yrNE2BLAfPGyatJTXOAW2m7zvIOilMkwLQWgZp4zZfbHDk9C+gM6fFlSEXO2QJKaC95MohBRVsfAZdSwnEf5zAG1yEaElQJOjE+tJEjV8hZinqCR/XnDwkfX1yQ0yPVEoNHgZqBYqjjQsWAdLNKpIGEP8LtBUD0XML6K6R64xlpCPB2b1jpqGQ5Ln5ix6YD7JsLXQlQbWpZGDCxXCXiAKIlvqrcZwey3zblxw7nRw9/TdoVCvEqecmLRum9tdMk3+tPiWL0Io+7VKY9GlCDwFNTWv1j6AJBevoud5cYoD2YiHYxhWbC753cCasZWiVyKqVHgPMEdkF6KjIPyRdzFpFndb/kWklpQJXzM1eJcNH8oM0zB0R+qq58K1eHH2VPCzg0wIAA1CpiBO+QUhqsR7cDhlehgQSNMah2Y5SK628RUHMOWKJRafBvxEWBmkKArqlBGLnAlh0sRV3Ltk0siOS0dTRgFYHvehy9qQIBF0jRpHqoEbHVNDLigH2WadxPbhkcqYhjnPiZCsvoJGZLQjoKM2DMvdP4NsLmizbILF0I5VhAbAyJdNyKy9+mhPJHZEuh2sovbnvyAaKNkBnw5RPl+LGljqELncWeF83nNJSpGrFMGkyP4MO36BBKohFrKW21N+xpkx+nkgeYAPIQhTNBGFyKwsAvSra4xjJ6QwaZQc7F5qe7IPqkh7yKAY8T/Qegm3sgZpzE9xUhFaaIAbvXtD1D6D7quc2hgo+rcv6/pNY1tmD01YS5/K+I4MWrdlRD3Q5WKyQi1NcnqYitmRwEE8uN69pnC8v9MAlYue1OFNsYytukTA9bE1ibbMnwj4R19lfQKOi3T2xO2IDBc/3bgOevFnIzeXN9AsatENTRS49HRWfXL25ROkOaeC6o8iQdJgA1I+n08gtMe8CuHvnbk8KXo2D40MvPuq6N+l9dKz708jeW/0KWlSsztLaNXwi4fZtH67EBycCWhO0bJbEHrSW3UIvD90ZdvZXFpTI9A7ZI7FTYb+IDD4w/NR8ji6mCIUgXsfKKGpasenw7hrgPNlNWEEwC6FnIYKiP4LGuqQVyUE6pv1B+WDTdaOPn+M6i5+Wat6c7PCgFNKEZRHjenFdHLp+y6lRQcMgrgH6ac+dDwqvJYpl0qJc78a2T8OJ/Z8WpeWtjvGcsLUV3WrZdFgoAG1/Aw0cXF7xt4CBzjuPlo6abfx1eRk0s4Qb5k1xpPRu67odEzCLa+a2fhAxYw6hk/j15GrXdOKX/3qYC4PqkH/xm2ASfRBCmgrbFm2sf2uhZlGm6pV39EAl6oGRZENPzbLqPLZtnJAn2j56U3oPOfHrEYb0opZOnN4Wg6qYH2CIYqCTsDvxojarEeYMcoi6Nea7ARrxOzo/6ngfMOWHIMAMjpN1sKmAJJInT2sDQb+S1+TMZ9ub3VFNElp5qPNNj+/n0TLFKI8otGwt2v+1Z227rQJBjHIJyy6XQIAQzv//57Fnl4SqfahUqVIkW1UfCCGTyazH47lEl2UcQoVMX/h1mG2z5y4+kht4Kna/ZDAhavaxPGr8CCqNHDH3CNp6HkknL5BpRNnZ+cqfQZcZWJ2qyIR+a4OyR8+PB7Gg0LafJEVtBkDKJ2UYqIFRe3AgguZVXotzy4dpnLYgh6F3vjINVllZOjHFdBlzjnl+vNWNUTw7YrQaj0w/jsE2Bl3yZFAj2adTtmIeWDFzMuiWP9kp01lJumBYNlWY70l1caPDwkwzPW0aXzjueSM2+jWZO5nGGP/NyGV14c/GpnGho0tvvaKhE7WFBZ11cSRs22fQYLl98WDfqEFQJRvHI7DHvYg3BratlCWQ3Oz5gDxpbdywIc9Z45qBni/CnheG3tqBBs24nubKy+hDBlC1YZg3b/Ke/4ptmUCzFT11NvsptmWUBwiAJHCNF66pPJD9EKZlTO3bX2+PQL3D4rc33sPrt8UDIMfuvDlP3X+b92BLkHowreWhQtb7iOrw4zZPZlDR5K/OrrGjo/WY5jsIj6bOuvM+Z6qPM/qQOrPJSdR0nVr1moKGKkD5h329Lcsy36ZHwBlk+TdJYq/Na5eCasIL9TAv17hJWNY92DKhZ9CFjZMYPJthWqfJmhT3NJSe/bOmM34JfDQYtm4g8cnpNZ2usoqrLTrY5uBRCNJOQ5DWr+vgjuEdt/e9XTPrjqRjQiZe+Vf3p20WC4U314/d9iwhWIpc1ZekPJ/bKN/ZFgqgcWpl2jRfF2lVR5HHofdcPcdLx8rsmNbjau3LE/jwrvp0yVZw37jVHXdoTER6A5UqyyO5AziWaXn3E+fbuR9uq36N6pwJ/hIdO6I3Hy1UfxLCb5ewVMVuMM5lTb9L0CUzfTEB/iaZznjuob24sRr9+5RHibP53N2+SdAOPEI6MXLN3FuUh5m2YBOj1zITBEEQBEEQBEEQBEEQBEEQBEEQBEEQBEEQBEEQBEEQBEEQhD/Af3D+0HMcGty+AAAAAElFTkSuQmCC`}[e.trim().toLowerCase()]??null:null}function Wz({search:e,idx:t,onSearchStatusChanged:n}){let r=my(),i=or(),{showToast:a}=Gx(),{canAccessChatFeatures:o}=Rj(),{canEditSearch:s}=bj(),{canActivateSearch:c,canCreateSearch:l,hasSearchQuota:u,gateReady:d}=Vj(),[f,p]=(0,b.useState)(e.is_active),[m,h]=(0,b.useState)(!1),[g,_]=(0,b.useState)(!1),[v,y]=(0,b.useState)(!1),x=e.provider||`facebook`,S=o&&x.trim().toLowerCase()===`facebook`,C=e.city_name?.trim(),w=e.country_code?.trim(),T=e.country_name?.trim()||(w?w.toUpperCase():``),E=C?T?`${C}, ${T}`:C:r(`searchCard.multipleLocations`),D=Uz(x),O=e.notification_interval_minutes,k=O!=null&&Number.isFinite(O)?r(`searchCard.minScan`,{minutes:O}):e.frequency??`â`,A=e.hubs_count??0,j=async t=>{if(t.stopPropagation(),m)return;let i=!f;if(i&&d&&!c){a(CI(r,TI(l,u)));return}h(!0),p(i);try{i?await Lo.post(`/api/searches/${e.id}/activate`):await Lo.post(`/api/searches/${e.id}/deactivate`),n?.()}catch(e){p(!i),a(Hz(r,e,i?`activate`:`deactivate`))}finally{h(!1)}},M=t=>{let n=t.target;n.closest(`button`)||n.closest(`a`)||n.closest(`.toggle-switch`)||i(`/dashboard/feed?search_config_ids=${e.id}`)},N=e=>{e.stopPropagation(),!g&&y(!0)},P=()=>{g||y(!1)},F=async()=>
36{if(!g){_(!0);try{await Lo.delete(`/api/searches/${e.id}`),y(!1),n?.()}catch(e){a(Hz(r,e,`delete`))}finally{_(!1)}}};return(0,V.jsxs)(V.Fragment,{children:[(0,V.jsxs)(ik.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{delay:.1+t*.05},onClick:M,className:`group relative flex h-full flex-col overflow-hidden rounded-[2rem] border border-border/50 bg-surface p-0 transition-all duration-300 hover:border-primary/40 hover:shadow-[0_30px_60px_-12px_rgba(0,0,0,0.12)] card-premium cursor-pointer dark:bg-surface/40 dark:backdrop-blur-md`,children:[(0,V.jsxs)(`div`,{className:`flex flex-1 flex-col px-6 pb-3 pt-6`,children:[(0,V.jsxs)(`div`,{className:`flex min-w-0 items-start gap-4`,children:[D?(0,V.jsx)(`img`,{src:D,alt:x,className:`h-8 w-8 shrink-0 rounded-full object-contain transition-transform group-hover:scale-105`}):(0,V.jsx)(`span`,{className:`flex h-8 w-8 shrink-0 items-center justify-center rounded-full bg-muted/25 text-muted-foreground`,children:(0,V.jsx)(aA,{size:18,strokeWidth:2})}),(0,V.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(0,V.jsx)(`h3`,{className:`truncate text-xl font-black leading-tight tracking-tight text-foreground transition-colors group-hover:text-primary`,children:e.name}),(0,V.jsx)(`p`,{className:`mt-0.5 text-[11px] font-black uppercase tracking-widest text-muted-foreground opacity-70`,children:e.search_type||r(`searchCard.standard`)})]}),(0,V.jsx)(`div`,{className:`shrink-0 cursor-default rounded-full border px-2 py-0.5 text-[9px] font-black uppercase tracking-[0.12em] transition-colors duration-300 ${f?`border-success/20 bg-success/10 text-success`:`border-border bg-muted/10 text-muted-foreground`}`,onClick:e=>e.stopPropagation(),onPointerDown:e=>e.stopPropagation(),children:r(f?`searchCard.active`:`searchCard.inactive`)})]}),(0,V.jsx)(`div`,{className:`mt-auto pt-4`,children:(0,V.jsxs)(`div`,{className:`rounded-2xl bg-black/[0.02] p-4 dark:bg-white/[0.02]`,children:[(0,V.jsxs)(`div`,{className:`flex min-w-0 items-center gap-2`,children:[(0,V.jsx)(xA,{size:14,className:`shrink-0 text-foreground/50`,strokeWidth:2,"aria-hidden":!0}),(0,V.jsx)(`span`,{className:`min-w-0 flex-1 truncate text-xs font-semibold leading-normal text-foreground/70`,children:E}),A>0?(0,V.jsx)(`span`,{className:`shrink-0 whitespace-nowrap text-xs font-semibold text-primary`,children:r(`searchCard.locationsCount`,{count:A})}):null]}),(0,V.jsxs)(`div`,{className:`mt-3 flex min-w-0 items-center justify-between gap-3`,children:[(0,V.jsxs)(`div`,{className:`flex min-w-0 items-center gap-1.5`,children:[(0,V.jsx)(Uk,{size:14,className:`shrink-0 text-foreground/40`,strokeWidth:2,"aria-hidden":!0}),(0,V.jsx)(`span`,{className:`text-xs font-semibold leading-normal text-foreground/70`,children:k})]}),(0,V.jsxs)(`div`,{className:`flex shrink-0 items-center gap-1.5`,children:[(0,V.jsx)(ij,{size:14,className:`text-primary`,strokeWidth:2,"aria-hidden":!0}),(0,V.jsx)(`span`,{className:`whitespace-nowrap text-xs font-semibold text-primary`,children:r(`searchCard.foundCount`,{count:e.listings_found.toLocaleString()})})]})]})]})})]}),(0,V.jsxs)(`div`,{className:`mt-auto flex items-center justify-between border-t border-border/20 bg-surface-elevated/40 px-5 py-3 dark:bg-white/5`,children:[(0,V.jsxs)(`div`,{className:`inline-flex cursor-default items-center gap-2 rounded-2xl border border-border/50 bg-surface p-1 shadow-sm dark:bg-white/[0.04]`,onClick:e=>e.stopPropagation(),onPointerDown:e=>e.stopPropagation(),role:`group`,"aria-label":r(`searchCard.searchActions`),children:[S?(0,V.jsx)(`button`,{type:`button`,onClick:t=>{t.stopPropagation(),i(OF(void 0,{searchFilterId:e.id}),{state:{chatsSearchFilterName:e.name}})},className:`flex h-10 w-10 shrink-0 cursor-default items-center justify-center rounded-full text-muted-foreground transition-colors hover:bg-primary/10 hover:text-primary active:scale-95`,"aria-label":r(`searchCard.chat`),children:(0,V.jsx)(wA,{size:18})}):null,(0,V.jsx)(`button`,{type:`button`,onClick:t=>{if(t.stopPropagation(),!s){a(CI(r,`search_edit_subscription`));return}let n=(e.search_type??`query`).toLowerCase();if(n===`vehicle`){i(`/dashboard/searches/${e.id}/edit-vehicle`);return}if(n!==`query`){a({type:`info`,message:r(`searchCard.editNotAvailable`)});return}i(`/dashboard/searches/${e.id}/edit-anything`)},className:`flex h-10 w-10 shrink-0 cursor-default items-center justify-center rounded-full text-muted-foreground transition-colors hover:bg-primary/10 hover:text-primary active:scale-95`,"aria-label":r(`searchCard.editSearch`),children:(0,V.jsx)(Zae,{size:18,strokeWidth:2})}),(0,V.jsx)(`button`,{type:`button`,disabled:g,onClick:N,className:`flex h-10 w-10 shrink-0 cursor-default items-center justify-center rounded-full text-muted-foreground transition-colors hover:bg-error/10 hover:text-error enabled:active:scale-95 disabled:opacity-50`,"aria-label":r(`searchCard.deleteSearch`),children:(0,V.jsx)(oj,{size:18})})]}),(0,V.jsx)(`div`,{className:`flex items-center justify-end`,children:(0,V.jsx)(`div`,{onClick:j,className:`toggle-switch relative h-7 w-12 shrink-0 cursor-default rounded-full p-1 transition-all duration-300 ${f?`bg-primary shadow-[0_0_15px_rgba(37,99,235,0.35)] dark:shadow-[0_0_15px_rgba(214,255,0,0.3)]`:d&&!c?`bg-border-strong/20 opacity-50`:`bg-border-strong/30`}`,"aria-label":r(f?`searchCard.pauseSearch`:d&&!c?`searchCard.cannotActivate`:`searchCard.activateSearch`),children:(0,V.jsx)(ik.div,{initial:!1,animate:{x:f?20:0},className:`flex h-5 w-5 items-center justify-center rounded-full bg-white shadow-lg dark:bg-[#152238]`,children:m?(0,V.jsx)(zA,{size:10,
36className:`animate-spin text-primary`}):(0,V.jsx)(Gae,{size:10,className:f?`text-primary`:`text-muted-foreground`})})})})]}),(0,V.jsx)(`div`,{className:`pointer-events-none absolute -right-20 -top-20 h-64 w-64 rounded-full bg-primary/5 blur-[80px] transition-colors duration-1000 group-hover:bg-primary/10`})]}),(0,V.jsx)(NF,{open:v,title:r(`searchCard.deleteTitle`),description:r(`searchCard.deleteDescription`,{name:e.name}),variant:`danger`,confirmLabel:r(`searchCard.deleteConfirm`),cancelLabel:r(`common.cancel`),isBusy:g,onCancel:P,onConfirm:()=>{F()}})]})}function Gz(e){let t=(e.search_type??`query`).toLowerCase();return t===`query`?`/dashboard/searches/${e.id}/duplicate-anything`:t===`vehicle`?`/dashboard/searches/${e.id}/duplicate-vehicle`:null}function Kz(e){return Gz(e)!=null}function ale({open:e,onClose:t,onStartFresh:n,onDuplicate:r,initialSearches:i=[]}){let a=my(),[o,s]=(0,b.useState)(`choice`),[c,l]=(0,b.useState)(i),[u,d]=(0,b.useState)(!1),[f,p]=(0,b.useState)(``),[m,h]=(0,b.useState)(``),[g,_]=(0,b.useState)(null),v=(0,b.useCallback)(e=>{let t=(e.search_type??`query`).toLowerCase();return t===`vehicle`?a(`searchWizard.choice.typeVehicle`):t===`query`?a(`searchWizard.choice.typeQuery`):t.charAt(0).toUpperCase()+t.slice(1)},[a]),y=(0,b.useCallback)(e=>{let t=e.city_name?.trim(),n=e.country_name?.trim()||(e.country_code?.trim()?e.country_code.toUpperCase():``);return t&&n?`${t}, ${n}`:t||(e.hubs_count&&e.hubs_count>0?a(`searchWizard.choice.locationsCount`,{count:e.hubs_count+1}):a(`searchWizard.choice.multipleLocations`))},[a]),S=(0,b.useCallback)(()=>{s(`choice`),h(``),_(null),p(``),t()},[t]);(0,b.useEffect)(()=>{if(!e)return;let t=!1;return queueMicrotask(()=>{t||(d(!0),p(``))}),(async()=>{try{let e=await xse();if(t)return;l(e)}catch{if(t)return;p(a(`searchWizard.choice.loadError`)),i.length>0&&l(i)}finally{t||d(!1)}})(),()=>{t=!0}},[e,i,a]),(0,b.useEffect)(()=>{if(!e||u)return;let t=e=>{e.key===`Escape`&&S()};return window.addEventListener(`keydown`,t),()=>window.removeEventListener(`keydown`,t)},[e,u,S]),(0,b.useEffect)(()=>{if(!e)return;let t=document.body.style.overflow;return document.body.style.overflow=`hidden`,()=>{document.body.style.overflow=t}},[e]);let C=(0,b.useMemo)(()=>{let e=m.trim().toLowerCase(),t=[...c].sort((e,t)=>e.is_active===t.is_active?e.name.localeCompare(t.name,void 0,{sensitivity:`base`}):e.is_active?-1:1);return e?t.filter(t=>[t.name,t.search_key??``,t.city_name??``,t.subcategory_name??``,t.provider].join(` `).toLowerCase().includes(e)):t},[m,c]),w=g?c.find(e=>e.id===g):null,T=(0,b.useCallback)(()=>{w&&Kz(w)&&r(w)},[r,w]);return typeof document>`u`?null:(0,x.createPortal)((0,V.jsx)(zD,{children:e?(0,V.jsxs)(ik.div,{role:`presentation`,className:`fixed inset-0 z-[120] flex items-end justify-center sm:items-center sm:p-4 md:p-6`,initial:{opacity:0}
36,animate:{opacity:1},exit:{opacity:0},transition:{duration:.18},children:[(0,V.jsx)(`div`,{role:`presentation`,className:`absolute inset-0 cursor-default bg-black/65 backdrop-blur-[3px]`,onClick:()=>!u&&S()}),(0,V.jsxs)(ik.div,{role:`dialog`,"aria-modal":`true`,"aria-labelledby":`create-search-choice-title`,className:`relative z-[121] flex max-h-[min(92dvh,720px)] w-full flex-col overflow-hidden rounded-t-[1.75rem] border border-border/60 bg-surface shadow-[0_32px_80px_-16px_rgba(0,0,0,0.5)] sm:max-h-[min(88dvh,720px)] sm:max-w-lg sm:rounded-[1.75rem] md:max-w-2xl lg:max-w-3xl dark:backdrop-blur-xl`,initial:{opacity:0,y:28,scale:.98},animate:{opacity:1,y:0,scale:1},exit:{opacity:0,y:28,scale:.98},transition:{type:`spring`,stiffness:420,damping:34},children:[(0,V.jsx)(`div`,{className:`flex shrink-0 justify-center pt-3 sm:hidden`,"aria-hidden":!0,children:(0,V.jsx)(`div`,{className:`h-1 w-10 rounded-full bg-border/80`})}),(0,V.jsx)(`div`,{className:`shrink-0 border-b border-border/40 px-4 py-4 sm:px-6 sm:py-5 md:px-7 md:py-6`,children:(0,V.jsxs)(`div`,{className:`flex items-start gap-3 sm:gap-4`,children:[o===`pick`?(0,V.jsx)(`button`,{type:`button`,disabled:u,onClick:()=>{s(`choice`),_(null),h(``)},className:`mt-0.5 flex h-9 w-9 shrink-0 items-center justify-center rounded-xl border border-border/60 bg-surface-elevated text-muted-foreground transition-colors hover:text-foreground disabled:opacity-50 sm:h-10 sm:w-10`,"aria-label":a(`searchWizard.back`),children:(0,V.jsx)(bk,{size:18,strokeWidth:2.5})}):(0,V.jsxs)(`div`,{className:`flex h-10 w-10 shrink-0 items-center justify-center rounded-2xl border border-primary/20 bg-primary/10 text-primary sm:h-11 sm:w-11`,children:[(0,V.jsx)(ej,{size:18,strokeWidth:2.5,className:`sm:hidden`}),(0,V.jsx)(ej,{size:20,strokeWidth:2.5,className:`hidden sm:block`})]}),(0,V.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(0,V.jsx)(`h2`,{id:`create-search-choice-title`,className:`text-lg font-black tracking-tight text-foreground sm:text-xl md:text-2xl`,children:a(o===`choice`?`searchWizard.choice.titleCreate`:`searchWizard.choice.titleDuplicate`)}),(0,V.jsx)(`p`,{className:`mt-1 text-xs leading-relaxed text-muted-foreground sm:mt-1.5 sm:text-sm`,children:a(o===`choice`?`searchWizard.choice.subtitleChoice`:`searchWizard.choice.subtitlePick`)})]}),(0,V.jsx)(`button`,{type:`button`,disabled:u,onClick:S,className:`flex h-9 w-9 shrink-0 items-center justify-center rounded-full border border-border/60 text-muted-foreground transition-colors hover:bg-surface-elevated hover:text-foreground disabled:opacity-50 sm:h-10 sm:w-10`,"aria-label":a(`common.close`),children:(0,V.jsx)(mj,{size:18})})]})}),(0,V.jsx)(`div`,{className:`custom-scrollbar min-h-0 flex-1 overflow-y-auto overscroll-contain [scrollbar-gutter:stable] px-4 py-4 sm:px-6 sm:py-5 md:px-7 md:py-6`,children:o===`choice`?(0,V.jsxs)(`div`,{className:`grid grid-cols-1 gap-3 sm:gap-4 md:grid-cols-2`,children:[(0,V.jsxs)(`button`,{type:`button`,disabled:u,onClick:n,className:`group flex flex-col items-start rounded-2xl border border-border/60 bg-surface-elevated/40 p-4 text-left transition-all hover:border-primary/40 hover:bg-primary/[0.04] hover:shadow-lg hover:shadow-primary/5 disabled:opacity-60 sm:p-5`,children:[(0,V.jsxs)(`div`,{className:`flex h-10 w-10 items-center justify-center rounded-xl bg-primary/10 text-primary transition-colors group-hover:bg-primary group-hover:text-primary-foreground sm:h-11 sm:w-11`,children:[(0,V.jsx)(IA,{size:20,strokeWidth:2.5,className:`sm:hidden`}),(0,V.jsx)(IA,{size:22,strokeWidth:2.5,className:`hidden sm:block`})]}),(0,V.jsx)(`h3`,{className:`mt-3 text-sm font-black text-foreground sm:mt-4 sm:text-base`,children:a(`searchWizard.choice.startFreshTitle`)}),(0,V.jsx)(`p`,{className:`mt-1.5 text-xs leading-relaxed text-muted-foreground sm:mt-2 sm:text-sm`,children:a(`searchWizard.choice.startFreshBody`)})]}),(0,V.jsxs)(`button`,{type:`button`,disabled:u||c.length===0,onClick:()=>s(`pick`),className:`group flex flex-col items-start rounded-2xl border border-border/60 bg-surface-elevated/40 p-4 text-left transition-all hover:border-primary/40 hover:bg-primary/[0.04] hover:shadow-lg hover:shadow-
36primary/5 disabled:opacity-60 sm:p-5`,children:[(0,V.jsxs)(`div`,{className:`flex h-10 w-10 items-center justify-center rounded-xl bg-primary/10 text-primary transition-colors group-hover:bg-primary group-hover:text-primary-foreground sm:h-11 sm:w-11`,children:[(0,V.jsx)(Gk,{size:18,strokeWidth:2.5,className:`sm:hidden`}),(0,V.jsx)(Gk,{size:20,strokeWidth:2.5,className:`hidden sm:block`})]}),(0,V.jsx)(`h3`,{className:`mt-3 text-sm font-black text-foreground sm:mt-4 sm:text-base`,children:a(`searchWizard.choice.duplicateTitle`)}),(0,V.jsx)(`p`,{className:`mt-1.5 text-xs leading-relaxed text-muted-foreground sm:mt-2 sm:text-sm`,children:a(`searchWizard.choice.duplicateBody`)})]})]}):(0,V.jsxs)(`div`,{className:`space-y-3 sm:space-y-4`,children:[(0,V.jsxs)(`div`,{className:`relative`,children:[(0,V.jsx)(UA,{size:18,className:`pointer-events-none absolute left-3 top-1/2 -translate-y-1/2 text-muted-foreground sm:left-3.5`,"aria-hidden":!0}),(0,V.jsx)(`input`,{type:`search`,value:m,onChange:e=>h(e.target.value),placeholder:a(`searchWizard.choice.searchFilterPlaceholder`),className:`h-10 w-full rounded-xl border border-border/60 bg-surface-elevated/50 pl-9 pr-3 text-sm text-foreground outline-none transition-colors placeholder:text-muted-foreground/70 focus:border-primary/50 focus:ring-2 focus:ring-primary/15 sm:h-11 sm:pl-10 sm:pr-4`})]}),f?(0,V.jsx)(`p`,{className:`rounded-xl border border-error/30 bg-error/5 px-4 py-3 text-sm text-error`,role:`alert`,children:f}):null,u?(0,V.jsxs)(`div`,{className:`flex flex-col items-center justify-center gap-3 py-12 sm:py-16`,children:[(0,V.jsx)(_A,{size:28,className:`animate-spin text-primary`}),(0,V.jsx)(`p`,{className:`text-sm font-medium text-muted-foreground`,children:a(`searchWizard.choice.loadingSearches`)})]}):C.length===0?(0,V.jsx)(`div`,{className:`rounded-2xl border border-dashed border-border/70 px-4 py-10 text-center sm:px-6 sm:py-12`,children:(0,V.jsx)(`p`,{className:`text-sm font-medium text-muted-foreground`,children:a(`searchWizard.choice.noFilterMatch`)})}):(0,V.jsx)(`ul`,{className:`space-y-2`,role:`listbox`,"aria-label":a(`searchWizard.choice.savedSearchesAria`),children:C.map(e=>{let t=Kz(e),n=g===e.id,r=Uz(e.provider);return(0,V.jsx)(`li`,{children:(0,V.jsxs)(`button`,{type:`button`,role:`option`,"aria-selected":n,disabled:!t,onClick:()=>t&&_(e.id),className:`flex w-full items-start gap-2.5 rounded-2xl border px-3 py-3 text-left transition-all disabled:cursor-not-allowed disabled:opacity-50 sm:gap-3 sm:px-4 sm:py-3.5 ${n?`border-primary/50 bg-primary/[0.06] shadow-sm shadow-primary/10`:`border-border/50 bg-surface-elevated/30 hover:border-primary/30 hover:bg-surface-elevated/60`}`,children:[r?(0,V.jsx)(`img`,{src:r,alt:``,className:`mt-0.5 h-7 w-7 shrink-0 rounded-lg object-contain sm:h-8 sm:w-8`}):(0,V.jsx)(`div`,{className:`mt-0.5 flex h-7 w-7 shrink-0 items-center justify-center rounded-lg bg-muted/30 text-[10px] font-bold uppercase text-muted-foreground sm:h-8 sm:w-8 sm:text-xs`,children:(e.provider||`?`).slice(0,2)}),(0,V.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(0,V.jsx)(`p`,{className:`truncate text-sm font-black text-foreground`,children:e.name}),(0,V.jsxs)(`p`,{className:`mt-1 flex min-w-0 items-center gap-1.5 text-xs text-muted-foreground sm:mt-1.5`,children:[(0,V.jsx)(`span`,{className:`shrink-0`,children:v(e)}),(0,V.jsx)(`span`,{className:`size-1 shrink-0 rounded-full bg-muted-foreground/55`,"aria-hidden":!0}),(0,V.jsx)(`span`,{className:`min-w-0 truncate`,children:y(e)})]})]})]})},e.id)})})]})}),(0,V.jsx)(`div`,{className:`shrink-0 border-t border-border/40 px-4 py-3 pb-[max(0.75rem,env(safe-area-inset-bottom))] sm:px-6 sm:py-4 md:px-7`,children:(0,V.jsxs)(`div`,{className:`flex flex-col-reverse gap-2 sm:flex-row sm:justify-end sm:gap-3`,children:[(0,V.jsx)(`button`,{type:`button`,disabled:u,onClick:S,className:`min-h-[44px] w-full rounded-xl border border-border/70 bg-transparent px-4 py-2.5 text-sm font-bold text-foreground transition-colors hover:bg-muted/30 disabled:opacity-50 sm:min-h-0 sm:w-auto`,children:a(`common.cancel`)}),o===`pick`?(0,V.jsxs)(`button`,{type:`button`,disabled:!w||!Kz(w),onClick:T,className:`min-h-[44px] w-full rounded-xl bg-primary px-5 py-2.5 text-sm font-bold text-primary-foreground transition-opacity hover:bg-primary/90 disabled:opacity-50 sm:min-h-0 sm:w-auto`,children:[(0,V.jsx)(`span`,{className:`sm:hidden`,children:a(`common.continue`)}),(0,V.jsx)(`span`,{className:`hidden sm:inline`,children:a(`searchWizard.choice.continueWithDuplicate`)})]}):null]})})]})]}):null}),document.body)}function qz(e={}){let t=my(),n=or(),{showToast:r}=Gx(),[i,a]=(0,b.useState)(!1);return{beginCreateSearch:(0,b.useCallback)(()=>
36{if(e.existingSearchCount===0){n(`/dashboard/searches/new`);return}a(!0)},[n,e.existingSearchCount]),createSearchModal:(0,V.jsx)(ale,{open:i,onClose:(0,b.useCallback)(()=>{a(!1)},[]),onStartFresh:(0,b.useCallback)(()=>{a(!1),n(`/dashboard/searches/new`)},[n]),onDuplicate:(0,b.useCallback)(e=>{if(!Kz(e)){r({type:`info`,message:t(`searchWizard.shell.duplicateTypeUnavailable`)});return}let i=Gz(e);i&&(a(!1),n(i))},[n,r,t]),initialSearches:e.initialSearches}),createSearchModalOpen:i}}var Jz=({className:e})=>(0,V.jsx)(`div`,{className:`animate-pulse rounded-xl bg-border/80 dark:bg-surface-elevated/80 ${e}`}),ole=({value:e,isUp:t})=>(0,V.jsxs)(`div`,{className:`flex items-center gap-1 rounded-full px-2 py-0.5 text-[10px] font-black uppercase tracking-wider ${t?`bg-success/10 text-success`:`bg-error/10 text-error`}`,children:[t?(0,V.jsx)(sj,{size:10}):(0,V.jsx)(toe,{size:10}),e]}),Yz=({title:e,value:t,subValue:n,icon:r,colorClass:i,delay:a,progress:o,trend:s,progressColorClass:c})=>{let l=(o?.total??0)>0,u=l?Math.min(Math.max((o?.value??0)/(o?.total??1)*100,0),100):0;return(0,V.jsxs)(ik.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{delay:a},className:`group relative overflow-hidden rounded-[2rem] border border-border/40 bg-surface p-6 shadow-sm transition-all duration-300 hover:-translate-y-1 hover:border-primary/30 hover:shadow-xl hover:shadow-primary/5 dark:bg-surface/40 dark:backdrop-blur-md`,children:[(0,V.jsxs)(`div`,{className:`flex items-start justify-between`,children:[(0,V.jsxs)(`div`,{className:`space-y-1`,children:[(0,V.jsx)(`p`,{className:`text-[10px] font-black uppercase tracking-[0.2em] text-muted-foreground/50`,children:e}),(0,V.jsx)(`h3`,{className:`text-3xl font-black tracking-tight text-foreground transition-colors group-hover:text-primary`,children:(0,V.jsx)(PM,{value:t})})]}),(0,V.jsx)(`div`,{className:`flex h-12 w-12 items-center justify-center rounded-2xl ${i} shadow-inner transition-all duration-500 group-hover:scale-110 group-hover:rotate-3`,children:(0,V.jsx)(r,{size:24})})]}),l?(0,V.jsxs)(`div`,{className:`mt-6`,children:[(0,V.jsxs)(`div`,{className:`flex items-center justify-between mb-2`,children:[(0,V.jsx)(`span`,{className:`text-[10px] font-black uppercase tracking-wider text-muted-foreground/70`,children:n}),(0,V.jsxs)(`span`,{className:`text-[10px] font-black text-foreground/80 bg-surface-elevated px-2 py-0.5 rounded-full`,children:[Math.round(u),`%`]})]}),(0,V.jsx)(`div`,{className:`h-2 w-full rounded-full bg-border/40 dark:bg-surface-elevated/40 overflow-hidden p-0.5`,children:(0,V.jsx)(ik.div,{initial:{width:0},animate:{width:`${u}%`},transition:{duration:1,ease:`easeOut`},className:`h-full rounded-full ${c||`bg-primary shadow-[0_0_10px_rgba(var(--primary-rgb),0.5)]`}`})})]}):(0,V.jsxs)(`div`,{className:`mt-6 flex items-center justify-between gap-2`,children:[(0,V.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,V.jsx)(`div`,{className:`h-1.5 w-1.5 rounded-full bg-primary/40 animate-pulse`}),(0,V.jsx)(`p`,{className:`text-[10px] font-black uppercase tracking-widest text-muted-foreground/70`,children:n})]}),s&&(0,V.jsx)(ole,{value:s.value,isUp:s.isUp})]}),(0,V.jsx)(`div`,{className:`absolute -right-6 -bottom-6 h-24 w-24 rounded-full bg-primary/5 blur-3xl transition-opacity duration-500 group-hover:opacity-100`})]})},Xz=({icon:e,title:t,description:n,actionText:r,onAction:i,variant:a=`default`})=>{let o=a===`premium`,s=a===`warning`;return(0,V.jsxs)(ik.div,{initial:{opacity:0,scale:.98},animate:{opacity:1,scale:1},className:`flex flex-col items-center justify-center rounded-3xl border border-dashed p-8 text-center sm:p-12 ${o?`border-primary/30 bg-primary/5`:s?`border-orange-500/30 bg-
36orange-500/5`:`border-border/60 bg-surface/30`}`,children:[(0,V.jsx)(`div`,{className:`mb-6 flex h-16 w-16 items-center justify-center rounded-2xl shadow-inner ${o?`bg-primary/20 text-primary`:s?`bg-orange-500/20 text-orange-500`:`bg-surface-elevated text-muted-foreground/40`}`,children:(0,V.jsx)(e,{size:32})}),(0,V.jsx)(`h3`,{className:`text-xl font-black tracking-tight text-foreground sm:text-2xl`,children:t}),(0,V.jsx)(`p`,{className:`mt-3 max-w-sm text-sm font-medium leading-relaxed text-muted-foreground/80 sm:text-base`,children:n}),r&&(0,V.jsxs)(`button`,{onClick:i,className:`mt-8 flex items-center gap-2 rounded-2xl px-8 py-3.5 text-sm font-black transition-all hover:scale-105 active:scale-95 shadow-lg ${o||s?`bg-primary text-primary-foreground shadow-primary/25`:`bg-surface-elevated text-foreground hover:bg-border shadow-black/5`}`,children:[o?(0,V.jsx)(hj,{size:18}):(0,V.jsx)(IA,{size:18}),r]})]})},sle=({listing:e})=>{let t=(0,b.useMemo)(()=>pF(e.primary_image_url),[e.primary_image_url]),n=`${e.id}:${t??``}`,r=(0,b.useRef)(n),[i,a]=(0,b.useState)(t?`loading`:`error`),o=(0,b.useRef)(null);return(0,b.useEffect)(()=>{r.current!==n&&(a(t?`loading`:`error`),r.current=n)},[n,t]),(0,b.useLayoutEffect)(()=>{o.current?.complete&&o.current.naturalHeight>0&&a(`loaded`)},[t]),!t||i===`error`?(0,V.jsx)(`div`,{className:`absolute inset-0 flex items-center justify-center bg-surface-elevated/60 text-muted-foreground/40 border border-border/10 rounded-xl`,children:(0,V.jsx)(lA,{size:24,strokeWidth:1.5})}):(0,V.jsxs)(`div`,{className:`relative h-full min-h-0 w-full overflow-hidden rounded-xl bg-surface-elevated/30 border border-border/5`,children:[i===`loading`&&(0,V.jsxs)(`div`,{className:`absolute inset-0 z-10 overflow-hidden rounded-xl bg-surface-hover`,children:[(0,V.jsx)(`div`,{className:`absolute inset-0 bg-gradient-to-br from-surface-hover via-border/30 to-surface-hover`}),(0,V.jsx)(`div`,{className:`absolute -inset-y-full left-[-50%] w-[100%] animate-[pulse_2s_ease-in-out_infinite] bg-gradient-to-r from-transparent via-white/50 dark:via-white/10 to-transparent rotate-12`})]}),(0,V.jsx)(`img`,{ref:o,src:t,alt:``,loading:`lazy`,referrerPolicy:`no-referrer`,onLoad:()=>a(`loaded`),onError:()=>a(`error`),className:`absolute inset-0 h-full w-full rounded-xl object-cover object-center transition-all duration-700 ${i===`loaded`?`opacity-100 scale-100`:`opacity-0 scale-95`}`},t),(0,V.jsx)(`div`,{className:`pointer-events-none absolute inset-0 rounded-xl ring-1 ring-inset ring-white/5`})]})};function cle(e,t){if(!e)return t(`common.never`);let n=new Date(e);if(Number.isNaN(n.getTime()))return t(`common.notAvailable`);let r=Math.floor((new Date().getTime()-n.getTime())/6e4);return r<1?t(`time.justNow`):r<60?t(`time.minutesAgo`,{count:r}):r<1440?t(`time.hoursAgo`,{count:Math.floor(r/60)}):n.toLocaleDateString(void 0,{month:`short`,day:`numeric`})}function lle(e){return e>=85?`bg-error`:e>=60?`bg-orange-500`:e>=35?`bg-amber-500`:`bg-success`}function ule(e,t,n){return t.intervalMinutes!=null&&t.intervalMinutes>0?e(`dashboard.everyMinutes`,{count:t.intervalMinutes}):t.label?t.label:e(`dashboard.tierFallback`,{n:n+1})}var dle=[{label:``,intervalMinutes:1,limit:0,usage:0},{label:``,intervalMinutes:3,limit:0,usage:0},{label:``,intervalMinutes:5,limit:0,usage:0},{label:``,intervalMinutes:9,limit:0,usage:0}];function fle(){let e=my(),t=or(),n=nr(),{listingId:r}=ur(),i=r,{status:a,isAuthenticated:o}=Jv(),{subscription:s}=Sy(),{ownership:c,status:l}=bj(),{gateReady:u,canAccessCreateSearchRoutes:d}=Vj(),{overview:f,isLoading:p,error:m,loadOverview:h}=Sj(),g=m??``,_=(0,b.useCallback)(e=>`/dashboard/${e}`,[]),v=(0,b.useCallback)(()=>{let e=n.state;if(TF(e)){t(-1);return}t(`/dashboard`,{replace:!0})},[n.state,t]),y=(0,b.useCallback)(e=>{Zo(e).catch(()=>{})},[]),x=(0,b.useCallback)(async()=>{await h()},[h]),{beginCreateSearch:S,createSearchModal:C}=qz({existingSearchCount:f?.metrics.total_searches??0,initialSearches:f?.recent_searches??[]});if((0,b.useEffect)(()=>{if(a===`loading`)return;if(!o){t(`/auth/login`,{replace:!0});return}let e=window.setTimeout(()=>{h()},0);return()=>window.clearTimeout(e)},[a,o,t,h]),a===`loading`||p&&!f)return(0,V.jsxs)(`div`,{className:`mx-auto w-full max-w-7xl px-4 py-12 sm:px-6 lg:px-8 space-y-8`,children:[(0,V.jsxs)(`div`,{className:`space-y-2`,children:[(0,V.jsx)(Jz,{className:`h-10 w-48`}),(0,V.jsx)(Jz,{className:`h-4 w-72`})]}),(0,V.jsx)(`div`,{className:`grid gap-6 sm:grid-cols-2 lg:grid-cols-4`,children:[1,2,3,4].map(e=>(0,V.jsx)(Jz,{className:`h-32 w-full`},e))}),(0,V.jsxs)(`div`,{className:`grid gap-8 lg:grid-cols-3`,children:[(0,V.jsx)(Jz,{className:`h-[400px] lg:col-span-2`}),(0,V.jsx)(Jz,{className:`h-[400px]`})]})]});if(g)return(0,V.jsxs)(`div`,{className:`flex min-h-[60vh] flex-col items-center justify-center px-4 text-center`,children:[(0,V.jsx)(`div`,{className:`flex h-16 w-16 items-center justify-center rounded-2xl bg-error/10 text-error mb-4`,children:(0,V.jsx)(Bk,{size:32})}),(0,V.jsx)(`h2`,{className:`text-xl font-bold text-foreground`,children:e(`errors.loadDashboard`)}),(0,V.jsx)(`p`,{className:`mt-2 text-sm text-muted-foreground`,children:g}),(0,V.jsxs)(`button`,{onClick:()=>void h(),className:`mt-6 flex items-center gap-2 rounded-xl bg-surface-elevated px-6 py-3 text-sm font-bold transition-all hover:bg-border`,children:[(0,V.jsx)(zA,{size:18}),e(`common.tryAgain`)]})]});if(!f)return null;if(l===`ready`&&!c.ownsScraper){let e=HM(c);return e?(0,V.jsx)(Wr,{to:e,replace:!0}):(0,V.jsx)(Bz,{})}let w=s?.plan?.tiers?.reduce((e,t)=>
36e+t.max_searches,0)??f.subscription?.tiers.reduce((e,t)=>e+(t.limit??t.max_searches??0),0)??0,T=f.subscription==null,E=T?dle:Uj(s?.plan?.tiers,f.subscription?.tiers),D=T?e(`dashboard.noActiveSubscription`):s?.plan?.name??f.subscription?.plan_name??e(`dashboard.currentPlan`),O=T?e(`dashboard.noSubscription`):s?.status??f.subscription?.status??e(`searchCard.active`),k=s?.current_period_end??f.subscription?.current_period_end??null,A=T?`â`:k?new Date(k).toLocaleDateString(void 0,{month:`short`,day:`numeric`,year:`numeric`}):e(`common.never`),j=Math.max(w-f.metrics.searches_remaining,0),M=w>0?j/w*100:0,N=f.metrics.listings_this_week??f.metrics.total_listings_found,P=f.metrics.listings_same_period_last_week??f.metrics.total_listings_last_week??0,F=f.metrics.new_listings_yesterday??f.metrics.new_listings_same_day_last_week??0,ee=(e,t)=>{if(t===0)return{value:`+${e}`,isUp:e>=0};let n=e-t,r=Math.round(n/t*100);return{value:`${r>0?`+`:``}${r}%`,isUp:r>=0}},I=ee(N,P),te=ee(f.metrics.new_listings_today,F);return(0,V.jsxs)(V.Fragment,{children:[C,(0,V.jsxs)(ik.main,{initial:{opacity:0}
36,animate:{opacity:1},className:`mx-auto w-full min-w-0 max-w-7xl overflow-x-hidden px-3 py-6 sm:px-6 sm:py-10 lg:px-8`,children:[(0,V.jsxs)(`div`,{className:`mb-8 flex flex-col gap-4 sm:mb-12 sm:gap-6 sm:flex-row sm:items-center sm:justify-between`,children:[(0,V.jsxs)(`div`,{children:[(0,V.jsx)(`h1`,{className:`text-[34px] font-black leading-tight tracking-tight text-foreground sm:text-[40px]`,children:e(`dashboard.title`)}),(0,V.jsx)(`div`,{className:`mt-3 flex items-center gap-4`,children:(0,V.jsx)(`p`,{className:`text-sm font-medium text-muted-foreground/80 sm:text-lg`,children:e(`dashboard.welcomeBack`,{username:f.user.username})})})]}),u&&d&&!f.quick_actions.max_searches_reached?(0,V.jsxs)(`button`,{type:`button`,onClick:S,className:`flex h-12 w-full items-center justify-center gap-2 rounded-2xl bg-primary px-6 text-sm font-black text-primary-foreground shadow-lg shadow-primary/20 transition-all hover:scale-105 hover:bg-primary/90 active:scale-95 sm:w-auto`,children:[(0,V.jsx)(IA,{size:20}),e(`common.createNewSearch`)]}):u?(0,V.jsxs)(zi,{to:`/dashboard/settings/subscription`,className:`flex h-12 w-full items-center justify-center gap-2 rounded-2xl bg-orange-500 px-6 text-sm font-black text-white shadow-lg shadow-orange-500/20 transition-all hover:scale-105 hover:bg-orange-600 active:scale-95 sm:w-auto`,children:[(0,V.jsx)(hj,{size:20}),e(`common.upgradeToAddSearch`)]}):null]}),(0,V.jsxs)(`div`,{className:`mb-8 grid min-w-0 gap-4 sm:mb-10 sm:grid-cols-2 sm:gap-6 lg:grid-cols-4`,children:[(0,V.jsx)(Yz,{title:e(`dashboard.activeSearches`),value:f.metrics.active_searches,subValue:e(`dashboard.activeVsTotal`),icon:UA,colorClass:`bg-blue-500/10 text-blue-500`,delay:.1,progress:{value:f.metrics.active_searches,total:f.metrics.total_searches}}),(0,V.jsx)(Yz,{title:e(`dashboard.searchesRemaining`),value:`${f.metrics.searches_remaining}`,subValue:e(`dashboard.capacityUsed`),icon:hae,colorClass:`bg-purple-500/10 text-purple-500`,delay:.2,progress:{value:j,total:w},progressColorClass:lle(M)}),(0,V.jsx)(Yz,{title:e(`dashboard.listingsThisWeek`),value:N.toLocaleString(),subValue:e(`dashboard.vsLastWeek`),icon:sj,colorClass:`bg-success/10 text-success`,delay:.3,trend:I}),(0,V.jsx)(Yz,{title:e(`dashboard.listingsToday`),value:f.metrics.new_listings_today.toLocaleString(),subValue:e(`dashboard.vsYesterday`),icon:hj,colorClass:`bg-orange-500/10 text-orange-500`,delay:.4,trend:te})]}),(0,V.jsxs)(`div`,{className:`grid w-full min-w-0 gap-6 lg:grid-cols-3 lg:gap-8`,children:[(0,V.jsx)(`div`,{className:`min-w-0 space-y-6 lg:col-span-2 lg:space-y-8`,children:(0,V.jsxs)(`section`,{children:[(0,V.jsxs)(`div`,{className:`mb-5 flex items-center justify-between sm:mb-6`,children:[(0,V.jsxs)(`h2`,{className:`flex items-center gap-2 text-xl font-black tracking-tight text-foreground sm:text-2xl`,children:[(0,V.jsx)(hj,{size:24,className:`text-primary`}),e(`dashboard.recentListings`)]}),(0,V.jsxs)(zi,{to:`/dashboard/feed`,className:`flex items-center gap-1 text-xs font-bold text-primary hover:underline sm:text-sm`,children:[e(`dashboard.viewAllFeed`),` `,(0,V.jsx)(Rk,{size:16})]})]}),f.recent_listings.length===0?(0,V.jsx)(Xz,{icon:AA,title:f.metrics.total_searches===0?e(`dashboard.noListingsYet`):e(`dashboard.noRecentListings`),description:f.metrics.total_searches===0?e(`dashboard.noListingsNoSearchesDescription`):e(`dashboard.noListingsWithSearchesDescription`),actionText:f.metrics.total_searches===0?e(`dashboard.goToSearches`):e(`dashboard.viewFeed`),onAction:()=>t(f.metrics.total_searches===0?`/dashboard/searches`:`/dashboard/feed`),variant:f.metrics.total_searches===0?`premium`:`default`}):(0,V.jsx)(`div`,{className:`grid w-full min-w-0 gap-4 xl:grid-cols-2`,children:f.recent_listings.map((t,n)=>(0,V.jsxs)(ik.div,{initial:{opacity:0,scale:.95},animate:{opacity:1,scale:1},transition:{delay:.05*n},className:`group relative flex w-full min-w-0 gap-3 overflow-hidden rounded-2xl border border-border/50 bg-surface p-3 transition-all hover:border-primary/20 hover:shadow-md sm:gap-4 sm:p-4`,children:[(0,V.jsxs)(`div`,{className:`relative z-0 flex w-full min-w-0 gap-3 sm:gap-4`,children:[(0,V.jsx)(`div`,{className:`relative aspect-square h-16 w-16 shrink-0 overflow-hidden rounded-xl bg-surface-elevated sm:h-20 sm:w-20`,children:(0,V.jsx)(sle,{listing:t})}),(0,V.jsxs)(`div`,{className:`flex min-w-0 flex-1 flex-col justify-between py-0.5 pr-8 sm:pr-9`,children:[(0,V.jsxs)(`div`,{className:`min-w-0`,children:[(0,V.jsx)(`h4`,{className:`truncate text-sm font-bold leading-tight text-foreground transition-colors group-hover:text-primary`,children:t.title||e(`common.untitledListing`)}),(0,V.jsx)(`div`,{className:`mt-1 flex min-w-0 items-center gap-2`,children:(0,V.jsxs)(`span`,{className:`truncate text-base font-black text-primary sm:text-lg`,children:[t.currency_symbol||`$`,t.price?.toLocaleStr
36ing()??e(`common.notAvailable`)]})})]}),(0,V.jsxs)(`p`,{className:`mt-1 flex min-w-0 items-center gap-1 text-[10px] font-medium text-muted-foreground`,children:[(0,V.jsx)(Uk,{size:12,className:`shrink-0`}),(0,V.jsx)(`span`,{className:`truncate`,children:cle(t.found_at,e)})]})]})]}),Uz(t.provider)?(0,V.jsx)(`img`,{src:Uz(t.provider),alt:``,className:`pointer-events-none absolute bottom-2 right-2 z-[5] h-6 w-6 rounded-full object-cover ring-1 ring-border/30 sm:bottom-3 sm:right-3 sm:h-7 sm:w-7`}):null,(0,V.jsx)(zi,{to:_(t.id),className:`absolute inset-0 z-10 rounded-2xl outline-none ring-primary/40 focus-visible:ring-2`,"aria-label":e(`dashboard.viewListingDetails`)}),t.url?(0,V.jsx)(`a`,{href:t.url,target:`_blank`,rel:`noopener noreferrer`,className:`absolute right-2 top-2 z-20 flex h-8 w-8 items-center justify-center rounded-full border border-border/60 bg-surface/95 text-foreground shadow-md backdrop-blur-sm transition-colors hover:border-primary/40 hover:bg-surface-elevated`,"aria-label":e(`dashboard.openOnMarketplace`),onClick:e=>e.stopPropagation(),children:(0,V.jsx)(Zk,{size:15})}):null]},t.id))})]})}),(0,V.jsx)(`aside`,{className:`w-full min-w-0 space-y-6 lg:space-y-8`,children:(0,V.jsxs)(`section`,{className:`relative w-full min-w-0 overflow-hidden rounded-2xl border border-border/50 bg-surface-elevated/40 p-4 sm:rounded-3xl sm:p-6`,children:[(0,V.jsxs)(`div`,{className:`relative z-10`,children:[(0,V.jsxs)(`div`,{className:`flex items-center gap-3 mb-6`,children:[(0,V.jsx)(`div`,{className:`flex h-10 w-10 items-center justify-center rounded-xl bg-primary text-primary-foreground`,children:(0,V.jsx)(qk,{size:20})}),(0,V.jsxs)(`div`,{children:[(0,V.jsx)(`h3`,{className:`text-lg font-bold text-foreground`,children:e(`dashboard.subscriptionTitle`)}),(0,V.jsxs)(`div`,{className:`flex items-center gap-1.5 mt-0.5`,children:[(0,V.jsx)(`span`,{className:`inline-flex h-1.5 w-1.5 rounded-full ${T?`bg-muted-foreground/60`:`bg-success`}`}),(0,V.jsx)(`span`,{className:`text-[10px] font-black uppercase tracking-wider ${T?`text-muted-foreground`:`text-success`}`,children:O})]})]})]}),(0,V.jsxs)(`div`,{className:`space-y-4`,children:[(0,V.jsxs)(`div`,{className:`rounded-2xl p-4 border ${T||D.toLowerCase().includes(`free`)?`bg-surface border-border/50`:`bg-primary/5 border-primary/20 shadow-inner`}`,children:[(0,V.jsx)(`p`,{className:`text-[10px] font-black text-muted-foreground/60 uppercase tracking-widest`,children:e(`dashboard.activePlan`)}),(0,V.jsx)(`p`,{className:`text-2xl font-black mt-1 ${T||D.toLowerCase().includes(`free`)?`text-foreground`:`text-primary`}`,children:D}),(0,V.jsxs)(`p`,{className:`text-[11px] font-bold text-muted-foreground/80 mt-2 flex items-center gap-1.5`,children:[(0,V.jsx)(Mk,{size:12,className:`text-primary/60`}),e(`dashboard.nextBilling`),` `,(0,V.jsx)(`span`,{className:`text-foreground/90`,children:A})]})]}),T?(0,V.jsxs)(zi,{to:`/dashboard/settings/subscription`,className:`flex w-full items-center justify-center gap-2 rounded-2xl bg-primary py-3.5 text-sm font-black text-primary-foreground shadow-lg shadow-primary/25 transition-all hover:scale-[1.02] active:scale-[0.98]`,children:[(0,V.jsx)(hj,{size:18}),e(`dashboard.upgradeSubscription`)]}):f.quick_actions.can_upgrade_subscription?(0,V.jsx)(zi,{to:`/dashboard/settings/subscription`,className:`flex w-full items-center justify-center gap-2 rounded-2xl py-3.5 text-sm font-black shadow-lg transition-all hover:scale-[1.02] active:scale-[0.98] ${D.toLowerCase().includes(`free`)?`bg-primary text-primary-foreground shadow-primary/25`:`bg-surface-elevated text-foreground border border-border/50 hover:bg-border`}`,children:D.toLowerCase().includes(`free`)?(0,V.jsxs)(V.Fragment,{children:[(0,V.jsx)(hj,{size:18}),e(`dashboard.upgradeToPro`)]}):e(`dashboard.manageSubscription`)}):null,(0,V.jsxs)(`div`,{className:`pt-2`,children:[(0,V.jsx)(`p`,{className:`text-[10px] font-black uppercase tracking-widest text-muted-foreground/60 mb-3`,children:e(`dashboard.serviceLimits`)}),(0,V.jsx)(`div`,{className:`space-y-4`,children:E.map((t,n)=>{let r=t.limit>0?Math.min(t.usage/t.limit*100,100):0;return(0,V.jsxs)(`div`,{children:[(0,V.jsxs)(`div`,{className:`flex justify-between text-[11px] font-bold text-foreground mb-1.5`,children:[(0,V.jsx)(`span`,{children:ule(e,t,n)}),(0,V.jsxs)(`span`,{children:[t.usage,` / `,t.limit]})]}),(0,V.jsx)(`div`,{className:`h-1.5 w-full rounded-full bg-border/50 overflow-hidden`,children:(0,V.jsx)(ik.div,{initial:{width:0},animate:{width:`${r}%`},className:`h-full ${t.usage>=t.limit&&t.limit>0?`bg-error`:`bg-primary`}`})})]},`${t.intervalMinutes??t.label}-${n}`)})})]})]})]}),(0,V.jsx)(`div`,{className:`absolute top-0 right-0 p-8 opacity-5`,children:(0,V.jsx)(hj,{size:160})})]})})]}),(0,V.jsxs)(`section`,{className:`mt-8 pb-8 sm:mt-12 sm:pb-10`,children:[(0,V.jsxs)(`div`,{className:`mb-6 flex items-center justify-between sm:mb-8`,children:[(0,V.jsx)(`h2`,{className:`text-xl font-black tracking-tight text-foreground sm:text-2xl`,children:e(`dashboard.recentSearches`)}),(0,V.jsxs)(zi,{to:`/dashboard/searches`,className:`flex items-center gap-1 text-xs font-bold text-primary hover:underline sm:text-sm`,children:[e(`dashboard.manageAll`),` `,(0,V.jsx)(Rk,{size:16})]})]}),f.recent_searches.length===0?(0,V.jsx)(Xz,{icon:UA,title:e(`dashboard.noSearchesYet`),description:e(`dashboard.noSearchesDescription`),actionText:e(`dashboard.goToSearches`),onAction:()=>t(`/dashboard/searches`),variant:`premium`}):(0,V.jsx)(`div`,{className:`grid gap-4 md:grid-cols-2 lg:grid-cols-3`,children:f.recent_searches.map((e,t)=>(0,V.jsx)(Wz,{search:e,idx:t,onSearchStatusChanged:()=>{x()}},`${e.id}-${e.is_active}`))})]}),(0,V.jsx)(MF,{listingId:i,onRequestClose:v,backLabel:e(`dashboard.backToDashboard`),buildDetailPath:_,onListingOpen:y,similarListingDetailState:{fromListingOverlay:!0,overlaySource:`dashboard`,overlayReturnPath:`/dashboard`}})]})]})}var Zz=1e7,Qz=(0,b.memo)(function({filters:e,onFilterChange:t,onClear:n,facets:r,searches:i,isMobile:a,isLoading:o,onApplySuccess:s}){let c=my(),{unit:l,setUnit:u}=oM(),d=(0,b.useMemo)(()=>[{label:c(`feedFilters.sortRecentlyFound`),value:`found_at`},{label:c(`feedFilters.sortRecentlyListed`),value:`listed_at`},{label:c(`feedFilters.sortPriceLowToHigh`),value:`price_asc`},{label:c(`feedFilters.sortPriceHighToLow`),value:`price_desc`}],[c]),[f,p]=(0,b.useState)({searches:!1,price:!1,year:!1,mileage:!1,colors:!1,radius:!1,phone:!1,provider:!1,valuation:!1,condition:!1,sort:!1}),[m,h]=(0,b.useState)(e),[g,_]=(0,b.useState)({}),[v,y]=(0,b.useState)(!1);(0,b.useEffect)(()=>
36{if(o||v)return;let e=!1;return queueMicrotask(()=>{e||y(!0)}),()=>{e=!0}},[o,v]),(0,b.useEffect)(()=>{if(!r)return;let e=!1;return queueMicrotask(()=>{e||_(e=>{let t={...e};return Object.entries(r).forEach(([e,n])=>{if(!Array.isArray(n))return;let r=t[e]||[],i=new Map(r.map(e=>[e.value,e]));n.forEach(e=>{i.set(e.value,{...e})});let a=new Set(n.map(e=>e.value));i.forEach((e,t)=>{a.has(t)||(e.count=0)}),t[e]=Array.from(i.values())}),t})}),()=>{e=!0}},[r]),(0,b.useEffect)(()=>{let t=!1;return queueMicrotask(()=>{t||h(e)}),()=>{t=!0}},[e]);let x=e=>{p(t=>({...t,[e]:!t[e]}))},[S,C]=(0,b.useState)(!1),w=e=>{h(t=>({...t,...e}))},T=e=>e.replace(/\D/g,``),E=(e,t)=>{let n=T(t),r=n?Number(n):void 0;w({[`price_${e}`]:r})},D=(e,t)=>{let n=T(t).slice(0,4),r=n?Number(n):void 0;w({[`year_${e}`]:r})},O=(e,t)=>{let n=T(t);if(!n){w({[`mileage_${e}`]:void 0});return}let r=Number(n);w({[`mileage_${e}`]:tM(r,l)})},k=e=>{if(!e)return``;let t={semi_automatic:c(`feedFilters.labelSemiAutomatic`),ebay:c(`feedFilters.labelEbay`),facebook:c(`feedFilters.labelFacebook`)};return t[e.toLowerCase()]?t[e.toLowerCase()]:e.replace(/_/g,` `).split(` `).map(e=>e.charAt(0).toUpperCase()+e.slice(1).toLowerCase()).join(` `)},A=e=>{switch(e){case`provider`:return c(`feedFilters.marketplace`);case`transmission_type`:return c(`feedFilters.transmissionType`);case`fuel_type`:return c(`feedFilters.fuelType`);case`condition`:return c(`feedFilters.condition`);default:return e.split(`_`).map(e=>e.charAt(0).toUpperCase()+e.slice(1)).join(` `)}},j={provider:(0,V.jsx)(ZA,{size:16}),valuation:(0,V.jsx)(Jk,{size:16}),transmission_type:(0,V.jsx)(Wk,{size:16}),fuel_type:(0,V.jsx)($k,{size:16}),condition:(0,V.jsx)(ej,{size:16})},M=[`black`,`white`,`gray`,`silver`,`blue`,`red`,`green`,`yellow`,`orange`,`brown`,`beige`,`gold`,`purple`,`other`],N=(0,b.useMemo)(()=>m.search_config_ids?m.search_config_ids.split(`,`).map(e=>e.trim()).filter(Boolean):[],[m.search_config_ids]),P=(0,b.useMemo)(()=>{let e=[`sort_by`];return Object.entries(m).filter(([t,n])=>e.includes(t)?!1:n!==void 0&&n!==``).length},[m]),F=(0,b.useMemo)(()=>JSON.stringify(m)!==JSON.stringify(e),[m,e]),ee=async()=>{if(!(!ie||S)){C(!0);try{await Promise.resolve(t(m))===!1?h(e):s?.()}catch{h(e)}finally{C(!1)}}},I=(0,b.useMemo)(()=>{let e={},{price_min:t,price_max:n,year_min:r,year_max:i,mileage_min:a,mileage_max:o,radius:s}=m;return t!==void 0&&t<0&&(e.price_min=c(`feedFilters.invalidAmount`)),n!==void 0&&n<0&&(e.price_max=c(`feedFilters.invalidAmount`)),(t!==void 0&&t>Zz||n!==void 0&&n>Zz)&&(e.price=c(`feedFilters.maxPriceIs`,{max:Zz.toLocaleString()})),t!==void 0&&n!==void 0&&t>n&&(e.price=c(`feedFilters.minExceedsMaxPrice`)),r!==void 0&&i!==void 0&&r>i&&(e.year=c(`feedFilters.minExceedsMaxYear`)),(r!==void 0&&(r<1e3||r>9999)||i!==void 0&&(i<1e3||i>9999))&&(e.year=c(`feedFilters.yearMustBe4Digits`)),a!==void 0&&o!==void 0&&a>o&&(e.mileage=c(`feedFilters.minExceedsMaxMileage`)),(a!==void 0&&a>1e6||o!==void 0&&o>1e6)&&(e.mileage=c(`feedFilters.maxMileageIs`,{max:Uoe(l)})),s!==void 0&&s<0&&(e.radius=c(`feedFilters.invalidRadius`)),s!==void 0&&s>
361e3&&(e.radius=c(`feedFilters.maxRadiusIs`,{max:Hoe(l)})),e},[m,l,c]),te=(0,b.useMemo)(()=>{if(m.radius===void 0)return``;let e=eM(m.radius,l);return Number.isFinite(e)?String(Math.round(e)):``},[m.radius,l]),ne=(0,b.useMemo)(()=>{if(m.mileage_min===void 0)return``;let e=eM(m.mileage_min,l);return Number.isFinite(e)?String(Math.round(e)):``},[m.mileage_min,l]),re=(0,b.useMemo)(()=>{if(m.mileage_max===void 0)return``;let e=eM(m.mileage_max,l);return Number.isFinite(e)?String(Math.round(e)):``},[m.mileage_max,l]),ie=Object.keys(I).length===0,ae=F&&ie&&!S,oe=e=>{e.key===`Enter`&&(e.defaultPrevented||e.nativeEvent.isComposing||e.shiftKey||e.altKey||e.ctrlKey||e.metaKey||e.target?.closest(`button, a[href], select, textarea, [role="option"], [role="listbox"], [contenteditable="true"]`)||ae&&(e.preventDefault(),ee()))},se=!!o&&!v,ce=(0,b.useMemo)(()=>{let t=e=>e!==void 0&&e!==``;return{sort:!!(e.sort_by&&e.sort_by!==`found_at`),searches:!!e.search_config_ids?.trim(),valuation:t(e.valuation),price:e.price_min!==void 0||e.price_max!==void 0,year:e.year_min!==void 0||e.year_max!==void 0,mileage:e.mileage_min!==void 0||e.mileage_max!==void 0,colors:t(e.interior_color)||t(e.exterior_color),radius:e.radius!==void 0,phone:e.has_phone_number===!0,provider:t(e.provider),transmission_type:t(e.transmission_type),fuel_type:t(e.fuel_type),condition:t(e.condition)}},[e]);return(0,V.jsxs)(`div`,{className:`relative flex min-h-full flex-col`,onKeyDown:oe,children:[(0,V.jsxs)(`div`,{className:`flex flex-col pb-8`,children:[!a&&(0,V.jsxs)(`div`,{className:`flex items-center justify-between px-4 pb-5`,children:[(0,V.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,V.jsx)(`div`,{className:`flex h-8 w-8 items-center justify-center rounded-lg bg-primary/10 text-primary`,children:(0,V.jsx)(QA,{size:16})}),(0,V.jsx)(`h2`,{className:`text-sm font-black uppercase tracking-widest text-foreground`,children:c(`feedFilters.filters`)})]}),(0,V.jsxs)(`button`,{onClick:n,className:`group flex items-center gap-1.5 text-xs font-bold text-muted-foreground hover:text-primary transition-all`,children:[(0,V.jsx)(Dae,{size:14,className:`transition-transform group-hover:-rotate-12`}),c(`feedFilters.reset`)]})]}),se?(0,V.jsxs)(`div`,{className:`flex flex-col gap-8 px-4 pb-8 animate-in fade-in duration-500`,children:[(0,V.jsx)(`div`,{className:`h-12 w-full animate-pulse rounded-2xl bg-slate-200 dark:bg-slate-700/55`}),[1,2,3,4,5].map(e=>(0,V.jsxs)(`div`,{className:`flex flex-col gap-4`,children:[(0,V.jsxs)(`div`,{className:`flex items-center justify-between`,children:[(0,V.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,V.jsx)(`div`,{className:`h-5 w-5 animate-pulse rounded-lg bg-slate-300 dark:bg-slate-600/65`}),(0,V.jsx)(`div`,{className:`h-4 w-24 animate-pulse rounded bg-slate-300 dark:bg-slate-600/65`})]}),(0,V.jsx)(`div`,{className:`h-4 w-4 animate-pulse rounded bg-slate-200 dark:bg-slate-700/60`})]}),(0,V.jsx)(`div`,{className:`space-y-3 pl-7`,children:[1,2].map(e=>(0,V.jsxs)(`div`,{className:`flex items-center justify-between`,children:[(0,V.jsx)(`div`,{className:`h-3 w-32 animate-pulse rounded bg-slate-200 dark:bg-slate-700/60`}),(0,V.jsx)(`div`,{className:`h-3 w-6 animate-pulse rounded bg-slate-100 dark:bg-slate-800/65`})]},e))})]},e))]}):(0,V.jsxs)(V.Fragment,{children:[(0,V.jsx)(`div`,{className:`mb-2 px-4`,children:(0,V.jsxs)(`div`,{className:`group relative`,children:[(0,V.jsx)(UA,{className:`absolute left-3.5 top-1/2 -translate-y-1/2 text-muted-foreground transition-colors group-focus-within:text-primary`,size:18}),(0,V.jsx)(`input`,{type:`text`,placeholder:c(`feedFilters.searchTitlePlaceholder`),className:`w-full rounded-2xl border border-border bg-surface px-11 py-3.5 text-sm transition-all hover:border-border-strong focus:border-primary focus:outline-none focus:ring-4 focus:ring-primary/5`,value:m.q||``,onChange:e=>w({q:e.target.value})})]})}),(0,V.jsx)(ple,{unit:l,onUnitChange:u}),(0,V.jsx)($z,{title:c(`feedFilters.sortResults`),icon:(0,V.jsx)(Sk,{size:16}),isOpen:f.sort,isActive:ce.sort,onToggle:()=>x(`sort`),className:`relative z-[20]`,children:(0,V.jsx)(mle,{value:m.sort_by,onChange:e=>w({sort_by:e}),options:d,selectPlaceholder:c(`feedFilters.selectPlaceholder`)})}),i.length>0&&(0,V.jsx)($z,{title:c(`feedFilters.activeSearches`),icon:(0,V.jsx)(hk,{size:16}),isOpen:f.searches,isActive:ce.searches,onToggle:()=>x(`searches`),children:(0,V.jsx)(`div`,{className:`flex flex-col gap-3 max-h-56 overflow-y-auto pr-2 custom-scrollbar`,children:i.map(e=>(0,V.jsx)(eB,{label:e.name,checked:N.includes(e.id),onChange:t=>{let n=new Set(N);t?n.add(e.id):n.delete(e.id),w({search_config_ids:Array.from(n).join(`,`)||void 0})}},e.id))})}),(()=>{let e=g.valuation;if(!Array.isArray(e)||e.length===0)return null;let t=m.valuation,n=e.filter(e=>e.count>0||t===e.value);return n.length===0?null:(0,V.jsx)($z,{title:c(`feedFilters.instaSnagPicks`),icon:j.valuation,isOpen:f.valuation,isActive:ce.valuation,onToggle:()=>x(`valuation`),children:(0,V.jsx)(`div`,{className:`flex flex-col gap-3`,children:n.map(e=>(0,V.jsx)(eB,{label:k(e.value),count:e.count,checked:m.valuation===e.value,onChange:()=>w({valuation:m.valuation===e.value?void 0:e.value})},e.value))})})})(),(0,V.jsx)($z,{title:c(`feedFilters.priceRange`),icon:(0,V.jsx)(ij,{size:16}),isOpen:f.price,isActive:ce.price,onToggle:()=>x(`price`),children:(0,V.jsxs)(`div`,{className:`space-y-3`,children:[(0,V.jsxs)(`div`,{className:`flex items-center gap-3`,children:[(0,V.jsxs)(`div`,{className:`relative flex-1`,children:[(0,V.jsx)(`span`,{className:`absolute left-3 top-1/2 -translate-y-1/2 text-xs font-bold text-muted-foreground`,children:`$`}),(0,V.jsx)(`input`,{type:`text`,inputMode:`numeric`,pattern:`[0-9]*`,placeholder:c(`feedFilters.minPrice`),className:`w-full rounded-xl border bg-surface pl-7 pr-3 py-2.5 text-sm leading-6 transition-all focus:outline-none focus:ring-4 ${I.price_min||I.price?`border-error focus:border-error focus:ring-error/5`:`border-border hover:border-border-strong focus:border-primary focus:ring-primary/5`}`,value:m.price_min||``,onChange:e=>E(`min`,e.target.value)})]}),(0,V.jsx)(`div`,{className:`h-px w-3 bg-border`}),(0,V.jsxs)(`div`,{className:`relative flex-1`,children:[(0,V.jsx)(`span`,{className:`absolute left-3 top-1/2 -translate-y-1/2 text-xs font-bold text-muted-foreground`,children:`$`}),(0,V.jsx)(`input`,{type:`text`,inputMode:`numeric`,pattern:`[0-9]*`,placeholder:c(`feedFilters.maxPrice`),className:`w-full rounded-xl border bg-surface pl-7 pr-3 py-2.5 text-sm leading-6 transition-all focus:outline-none focus:ring-4 ${I.price_max||I.price?`border-error focus:border-error focus:ring-error/5`:`border-border hover:border-border-strong focus:border-primary focus:ring-primary/5`}`,value:m.price_max||``,onChange:e=>E(`max`,e.target.value)})]})]}),I.price&&(0,V.jsxs)(`p`,{className:`flex items-center gap-1.5 text-[11px] font-bold text-error animate-in fade-in slide-in-from-top-1`,children:[(0,V.jsx)(Bk,{size:12}),I.price]}),!I.price&&(I.price_min||I.price_max)&&(0,V.jsxs)(`p`,{className:`flex items-center gap-1.5 text-[11px] font-bold text-error animate-in fade-in slide-in-from-top-1`,children:[(0,V.jsx)(Bk,{size:12}),I.price_min||I.price_max]})]})}),(0,V.jsx)($z,{title:c(`feedFilters.yearRange`),icon:(0,V.jsx)(Mk,{size:16}),isOpen:f.year,isActive:ce.year,onToggle:()=>
36x(`year`),children:(0,V.jsxs)(`div`,{className:`space-y-3`,children:[(0,V.jsxs)(`div`,{className:`flex items-center gap-3`,children:[(0,V.jsx)(`input`,{type:`text`,inputMode:`numeric`,pattern:`[0-9]*`,maxLength:4,placeholder:c(`feedFilters.minYear`),className:`w-full rounded-xl border bg-surface px-3 py-2.5 text-sm leading-6 transition-all focus:outline-none focus:ring-4 ${I.year?`border-error focus:border-error focus:ring-error/5`:`border-border hover:border-border-strong focus:border-primary focus:ring-primary/5`}`,value:m.year_min||``,onChange:e=>D(`min`,e.target.value)}),(0,V.jsx)(`div`,{className:`h-px w-3 bg-border`}),(0,V.jsx)(`input`,{type:`text`,inputMode:`numeric`,pattern:`[0-9]*`,maxLength:4,placeholder:c(`feedFilters.maxYear`),className:`w-full rounded-xl border bg-surface px-3 py-2.5 text-sm leading-6 transition-all focus:outline-none focus:ring-4 ${I.year?`border-error focus:border-error focus:ring-error/5`:`border-border hover:border-border-strong focus:border-primary focus:ring-primary/5`}`,value:m.year_max||``,onChange:e=>D(`max`,e.target.value)})]}),I.year&&(0,V.jsxs)(`p`,{className:`flex items-center gap-1.5 text-[11px] font-bold text-error`,children:[(0,V.jsx)(Bk,{size:12}),I.year]})]})}),(0,V.jsx)($z,{title:c(`feedFilters.mileageRange`),icon:(0,V.jsx)(nA,{size:16}),isOpen:f.mileage,isActive:ce.mileage,onToggle:()=>x(`mileage`),children:(0,V.jsxs)(`div`,{className:`space-y-3`,children:[(0,V.jsxs)(`div`,{className:`flex items-center gap-3`,children:[(0,V.jsx)(`input`,{type:`text`,inputMode:`numeric`,pattern:`[0-9]*`,placeholder:c(`feedFilters.minMileage`),className:`w-full rounded-xl border bg-surface px-3 py-2.5 text-sm leading-6 transition-all focus:outline-none focus:ring-4 ${I.mileage?`border-error focus:border-error focus:ring-error/5`:`border-border hover:border-border-strong focus:border-primary focus:ring-primary/5`}`,value:ne,onChange:e=>O(`min`,e.target.value)}),(0,V.jsx)(`div`,{className:`h-px w-3 bg-border`}),(0,V.jsx)(`input`,{type:`text`,inputMode:`numeric`,pattern:`[0-9]*`,placeholder:c(`feedFilters.maxMileage`),className:`w-full rounded-xl border bg-surface px-3 py-2.5 text-sm leading-6 transition-all focus:outline-none focus:ring-4 ${I.mileage?`border-error focus:border-error focus:ring-error/5`:`border-border hover:border-border-strong focus:border-primary focus:ring-primary/5`}`,value:re,onChange:e=>O(`max`,e.target.value)})]}),I.mileage&&(0,V.jsxs)(`p`,{className:`flex items-center gap-1.5 text-[11px] font-bold text-error`,children:[(0,V.jsx)(Bk,{size:12}),I.mileage]})]})}),(0,V.jsx)($z,{title:c(`feedFilters.color`),icon:(0,V.jsx)(jA,{size:16}),isOpen:f.colors,isActive:ce.colors,onToggle:()=>x(`colors`),children:(0,V.jsxs)(`div`,{className:`space-y-4`,children:[(0,V.jsxs)(`div`,{className:`space-y-2`,children:[(0,V.jsx)(`p`,{className:`text-xs font-bold uppercase tracking-wider text-muted-foreground`,children:c(`feedFilters.interior`)}),(0,V.jsx)(`div`,{className:`flex flex-wrap gap-2`,children:M.map(e=>(0,V.jsx)(`button`,{type:`button`,onClick:()=>w({interior_color:m.interior_color===e?void 0:e}),className:`rounded-full border px-3 py-1.5 text-xs font-bold transition-all ${m.interior_color===e?`border-primary bg-primary text-primary-foreground`:`border-border bg-surface text-foreground hover:border-primary/50`}`,children:k(e)},`interior-${e}`))})]}),(0,V.jsxs)(`div`,{className:`space-y-2`,children:[(0,V.jsx)(`p`,{className:`text-xs font-bold uppercase tracking-wider text-muted-foreground`,children:c(`feedFilters.exterior`)}),(0,V.jsx)(`div`,{className:`flex flex-wrap gap-2`,children:M.map(e=>(0,V.jsx)(`button`,{type:`button`,onClick:()=>w({exterior_color:m.exterior_color===e?void 0:e}),className:`rounded-full border px-3 py-1.5 text-xs font-bold transition-all ${m.exterior_color===e?`border-primary bg-primary text-primary-foreground`:`border-border bg-surface text-foreground hover:border-primary/50`}`,children:k(e)},`exterior-${e}`))})]})]})}),(0,V.jsx)($z,{title:c(`feedFilters.radius`),icon:(0,V.jsx)(xA,{size:16}),isOpen:f.radius,isActive:ce.radius,onToggle:()=>x(`radius`),children:(0,V.jsxs)(`div`,{className:`space-y-2`,children:[(0,V.jsx)(`input`,{type:`text`,inputMode:`numeric`,pattern:`[0-9]*`,placeholder:c(l===`mi`?`feedFilters.distanceInMiles`:`feedFilters.distanceInKm`),className:`w-full rounded-xl border bg-surface px-3 py-2.5 text-sm leading-6 transition-all focus:outline-none focus:ring-4 ${I.radius?`border-error focus:border-error focus:ring-error/5`:`border-border hover:border-border-strong focus:border-primary focus:ring-primary/5`}`,value:te,onChange:e=>{let t=T(e.target.value);if(!t){w({radius:void 0});return}let n=Number(t);Number.isFinite(n)&&w({radius:tM(n,l)})}}),I.radius&&(0,V.jsxs)(`p`,{className:`flex items-center gap-1.5 text-[11px] font-bold text-error`,children:[(0,V.jsx)(Bk,{size:12}),I.radius]})]})}),(0,V.jsx)($z,{title:c(`feedFilters.hasPhone`),icon:(0,V.jsx)(PA,{size:16}
36),isOpen:f.phone,isActive:ce.phone,onToggle:()=>x(`phone`),children:(0,V.jsxs)(`div`,{className:`flex items-center justify-between rounded-xl border border-border bg-surface px-3 py-2.5`,children:[(0,V.jsx)(`span`,{className:`text-sm font-semibold text-foreground`,children:c(`feedFilters.listingsWithPhoneNumbers`)}),(0,V.jsx)(`button`,{type:`button`,onClick:()=>w({has_phone_number:m.has_phone_number?void 0:!0}),className:`relative h-6 w-11 shrink-0 rounded-full transition-colors ${m.has_phone_number?`bg-primary`:`bg-border-strong`}`,children:(0,V.jsx)(`span`,{className:`absolute left-0.5 top-0.5 h-5 w-5 rounded-full bg-white shadow transition-transform ${m.has_phone_number?`translate-x-5`:`translate-x-0`}`})})]})}),se?[1,2,3,4].map(e=>(0,V.jsxs)(`div`,{className:`flex flex-col gap-4 py-2`,children:[(0,V.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,V.jsx)(`div`,{className:`h-4 w-4 animate-pulse rounded bg-slate-300 dark:bg-slate-600/65`}),(0,V.jsx)(`div`,{className:`h-4 w-32 animate-pulse rounded bg-slate-300 dark:bg-slate-600/65`})]}),(0,V.jsx)(`div`,{className:`space-y-3 pl-6`,children:[1,2,3].map(e=>(0,V.jsxs)(`div`,{className:`flex items-center justify-between`,children:[(0,V.jsx)(`div`,{className:`h-3 w-24 animate-pulse rounded bg-slate-200 dark:bg-slate-700/60`}),(0,V.jsx)(`div`,{className:`h-3 w-8 animate-pulse rounded bg-slate-200 dark:bg-slate-700/60`})]},e))})]},e)):[`provider`,`transmission_type`,`fuel_type`,`condition`].map(e=>{let t=g[e];if(!Array.isArray(t)||t.length===0)return null;let n=m[e],r=t.filter(e=>e.count>0||n===e.value);return r.length===0?null:(0,V.jsx)($z,{title:A(e),icon:j[e],isOpen:f[e],isActive:ce[e],onToggle:()=>x(e),children:(0,V.jsx)(`div`,{className:`flex flex-col gap-3`,children:r.map(t=>(0,V.jsx)(eB,{label:k(t.value),count:t.count,checked:m[e]===t.value,onChange:()=>w({[e]:m[e]===t.value?void 0:t.value})},t.value))})},e)})]})]}),(0,V.jsx)(zD,{children:F&&(0,V.jsx)(ik.div,{initial:{y:20,opacity:0},animate:{y:0,opacity:1},exit:{y:20,opacity:0},className:`sticky bottom-0 mt-auto bg-gradient-to-t from-surface via-surface/95 to-transparent px-4 pb-6 pt-4 z-[80] backdrop-blur-[2px]`,children:(0,V.jsxs)(`button`,{type:`button`,onClick:()=>void ee(),disabled:!ie||S,"aria-busy":S,className:`flex w-full items-center justify-center gap-2 rounded-2xl py-4 text-sm font-black transition-all shadow-xl ${F&&ie&&!S?`bg-primary text-primary-foreground shadow-primary/25 hover:scale-[1.02] active:scale-95`:`bg-surface-hover text-muted-foreground opacity-60 cursor-not-allowed`}`,children:[S?c(`feedFilters.applying`):P>0?c(P===1?`feedFilters.applyFilterOne`:`feedFilters.applyFilterOther`,{count:P}):c(F?`feedFilters.applyChanges`:`feedFilters.clearAllFilters`),!S&&!F&&(0,V.jsx)(Fk,{size:16,className:`ml-1`})]})})})]})});function ple({unit:e,onUnitChange:t}){let n=my(),r=(0,b.useMemo)(()=>[{value:`km`,label:n(`feedFilters.kilometers`)},{value:`mi`,label:n(`feedFilters.miles`)}],[n]);return(0,V.jsxs)(ik.div,{className:`mb-2 border-b border-border/40 px-4 py-3`,children:[(0,V.jsx)(`div`,{className:`mb-2 flex items-center gap-1.5`,children:(0,V.jsxs)(`div`,{className:`flex min-w-0 items-center gap-1.5`,children:[(0,V.jsx)(`div`,{className:`flex h-6 w-6 shrink-0 items-center justify-center rounded-md bg-primary/10 text-primary`,children:(0,V.jsx)(Jae,{size:13})}),(0,V.jsxs)(`div`,{className:`min-w-0`,children:[(0,V.jsx)(`p`,{className:`text-xs font-bold text-foreground`,children:n(`feedFilters.distanceUnit`)}),(0,V.jsx)(`p`,{className:`text-[10px] leading-tight text-muted-foreground`,children:n(`feedFilters.distanceUnitHint`)})]})]})}),(0,V.jsxs)(ik.div,{className:`relative flex w-full rounded-lg border border-border bg-surface-elevated/80 p-0.5`,role:`group`,"aria-label":n(`feedFilters.distanceUnitAria`),children:[(0,V.jsx)(ik.div,{className:`pointer-events-none absolute bottom-0.5 top-0.5 rounded-md bg-primary shadow-sm shadow-primary/20`,initial:!1,animate:{left:e===`km`?`2px`:`50%`,width:`calc(50% - 2px)`},transition:{type:`spring`,stiffness:380,damping:32,mass:.8}}),r.map(n=>{let r=e===n.value;return(0,V.jsx)(`button`,{type:`button`,"aria-pressed":r,onClick:()=>
36t(n.value),className:`relative z-10 flex flex-1 items-center justify-center rounded-md py-1.5 text-xs font-bold transition-colors duration-300 ${r?`text-primary-foreground`:`text-muted-foreground hover:text-foreground`}`,children:n.label},n.value)})]})]})}function $z({title:e,icon:t,children:n,isOpen:r,isActive:i=!1,onToggle:a,className:o=``}){return(0,V.jsxs)(`div`,{className:`px-4 ${o}`,children:[(0,V.jsxs)(`button`,{onClick:a,className:`group flex w-full cursor-pointer items-center justify-between rounded-lg px-2 py-3 text-left transition-colors hover:bg-slate-100 dark:hover:bg-slate-800/60`,children:[(0,V.jsxs)(ik.div,{className:`flex items-center gap-3 text-sm font-bold transition-colors ${i?`text-primary`:`text-foreground group-hover:text-primary`}`,children:[(0,V.jsx)(`span`,{className:`transition-colors ${i?`text-primary`:`text-muted-foreground group-hover:text-primary`}`,children:t}),e]}),(0,V.jsx)(ik.div,{animate:{rotate:r?180:0},transition:{type:`spring`,stiffness:300,damping:25},className:`transition-colors ${i?`text-primary`:`text-muted-foreground/60 group-hover:text-primary`}`,children:(0,V.jsx)(Ik,{size:16})})]}),(0,V.jsx)(zD,{initial:!1,children:r&&(0,V.jsx)(ik.div,{initial:{height:0,opacity:0},animate:{height:`auto`,opacity:1},exit:{height:0,opacity:0},transition:{height:{duration:.3,ease:[.04,.62,.23,.98]},opacity:{duration:.2}},className:`overflow-hidden`,children:(0,V.jsx)(`div`,{className:`pl-3 pb-2 pt-4`,children:n})})})]})}function eB({label:e,checked:t,onChange:n,count:r}){return(0,V.jsxs)(`button`,{onClick:()=>n(!t),className:`group flex w-full items-center justify-between text-left`,children:[(0,V.jsxs)(`div`,{className:`flex items-center gap-3`,children:[(0,V.jsx)(`div`,{className:`flex h-5 w-5 shrink-0 items-center justify-center rounded-md border transition-all duration-200 ${t?`border-primary bg-primary text-primary-foreground shadow-md shadow-primary/20`:`border-border bg-surface group-hover:border-primary group-hover:bg-primary/5`}`,children:(0,V.jsx)(zD,{children:t&&(0,V.jsx)(ik.div,{initial:{scale:0,opacity:0},animate:{scale:1,opacity:1},exit:{scale:0,opacity:0},children:(0,V.jsx)(Fk,{size:12,strokeWidth:4})})})}),(0,V.jsx)(`span`,{className:`text-sm font-medium transition-colors ${t?`text-foreground`:`text-muted-foreground group-hover:text-foreground`}`,children:e})]}),r!==void 0&&(0,V.jsx)(`span`,{className:`rounded-full bg-surface-elevated px-2 py-0.5 text-[10px] font-black text-muted-foreground transition-colors group-hover:bg-primary/10 group-hover:text-primary`,children:r})]})}function mle({value:e,onChange:t,options:n,selectPlaceholder:r}){let[i,a]=(0,b.useState)(!1),o=(0,b.useRef)(null),[s,c]=(0,b.useState)(null),l=n.find(t=>t.value===e),u=(0,b.useCallback)(()=>{let e=o.current;if(!e)return;let t=e.getBoundingClientRect();c({top:t.bottom+8,left:t.left,width:t.width})},[]),d=(0,b.useCallback)(()=>{let e=o.current;if(e){let t=e.getBoundingClientRect();c({top:t.bottom+8,left:t.left,width:t.width})}a(!0)},[]),f=(0,b.useCallback)(()=>{a(!1),c(null)},[]);(0,b.useLayoutEffect)(()=>{if(i)return u(),window.addEventListener(`resize`,u),document.addEventListener(`scroll`,u,!0),()=>{window.removeEventListener(`resize`,u),document.removeEventListener(`scroll`,u,!0)}},[i,u]);let p=i&&s&&(0,x.createPortal)((0,V.jsxs)(V.Fragment,{children:[(0,V.jsx)(`div`,{className:`fixed inset-0 z-[850]`,"aria-hidden":!0,onClick:f}),(0,V.jsx)(ik.div,{role:`listbox`,initial:{opacity:0,y:6},animate:{opacity:1,y:0},transition:{duration:.15},style:{position:`fixed`,top:s.top,left:s.left,width:s.width},className:`z-[900] overflow-hidden rounded-2xl border border-border bg-surface shadow-2xl shadow-black/20`,children:(0,V.jsx)(`div`,{className:`max-h-[min(320px,calc(100vh-24px))] overflow-y-auto p-1.5`,children:n.map(n=>(0,V.jsxs)(`button`,{type:`button`,role:`option`,"aria-selected":e===n.value,onClick:()=>{t(n.value),f()},className:`flex w-full items-center justify-between rounded-xl px-3 py-2.5 text-left text-sm font-bold transition-all ${e===n.value?`bg-primary text-primary-foreground`:`hover:bg-surface-elevated text-foreground`}`,children:[n.label,e===n.value&&(0,V.jsx)(Fk,{size:14,strokeWidth:3})]},n.value))})})]}),document.body);return(0,V.jsxs)(`div`,{className:`relative`,children:[(0,V.jsxs)(`button`,{ref:o,type:`button`,"aria-expanded":i,"aria-haspopup":`listbox`,onClick:()=>i?f():d(),className:`flex w-full items-center justify-between rounded-xl border border-border bg-surface px-4 py-3 text-sm font-bold transition-all hover:border-border-strong focus:outline-none ${i?`border-primary ring-4 ring-primary/5`:``}`,children:[(0,V.jsx)(`span`,{className:l?`text-foreground`:`text-muted-foreground`,children:l?l.label:r}),(0,V.jsx)(ik.div,{animate:{rotate:i?180:0},className:`text-muted-foreground`,children:(0,V.jsx)(Ik,{size:16})})]}),p]})}function hle(e){return e.some(e=>e.is_active&&e.provider.trim().toLowerCase()===`facebook`)}function gle(e){let t=new Set;for(let n of e){if(!n.is_active||n.provider.trim().toLowerCase()!==`facebook`)continue;let e=n.notification_interval_minutes;typeof e==`number`&&Number.isFinite(e)&&t.add(e)}return[...t].sort((e,t)=>
36e-t)}function _le({searches:e,onDismiss:t}){let n=gle(e),r=n.includes(1),i=n.some(e=>e===3||e===5||e===9);return(0,V.jsx)(ik.div,{initial:{opacity:0,y:-8},animate:{opacity:1,y:0},exit:{opacity:0,y:-8},transition:{duration:.22},className:`mb-6 rounded-2xl border border-info/30 bg-primary-muted p-4 shadow-sm sm:p-5`,role:`status`,"aria-live":`polite`,children:(0,V.jsxs)(`div`,{className:`flex gap-3`,children:[(0,V.jsx)(`div`,{className:`flex h-9 w-9 shrink-0 items-center justify-center rounded-xl bg-info/15 text-info`,children:(0,V.jsx)(uA,{size:18,strokeWidth:2.25,"aria-hidden":!0})}),(0,V.jsxs)(`div`,{className:`min-w-0 flex-1 space-y-2.5`,children:[(0,V.jsxs)(`div`,{className:`flex items-start justify-between gap-3`,children:[(0,V.jsx)(`p`,{className:`text-sm font-bold text-foreground sm:text-base`,children:`How listing timing works on your feed`}),(0,V.jsx)(`button`,{type:`button`,onClick:t,className:`flex h-8 w-8 shrink-0 items-center justify-center rounded-lg text-muted-foreground transition-colors hover:bg-surface-elevated hover:text-foreground`,"aria-label":`Dismiss timing notice`,children:(0,V.jsx)(mj,{size:16,strokeWidth:2.25})})]}),(0,V.jsx)(`p`,{className:`text-sm leading-relaxed text-muted-foreground`,children:`Facebook Marketplace often takes several minutes before a new listing appears on the public feed. Cards here can still appear later than when the seller posted.`}),(0,V.jsxs)(`ul`,{className:`list-disc space-y-1.5 pl-5 text-sm leading-relaxed text-muted-foreground`,children:[(0,V.jsxs)(`li`,{children:[(0,V.jsx)(`span`,{className:`font-semibold text-foreground`,children:`Listed`}),` is when Facebook recorded the post.`]}),(0,V.jsxs)(`li`,{children:[(0,V.jsx)(`span`,{className:`font-semibold text-foreground`,children:`Found`}),` is when the listing reached your InstaSnag feed.`]}),r?(0,V.jsxs)(`li`,{children:[(0,V.jsx)(`span`,{className:`font-semibold text-foreground`,children:`1-minute scans`}),` `,`alert you as soon as we detect a match â Found usually shows Just now.`]}):null,i?(0,V.jsxs)(`li`,{children:[(0,V.jsx)(`span`,{className:`font-semibold text-foreground`,children:`3-, 5-, or 9-minute scans`}),` `,`follow your plan interval plus Facebook visibility. Found may show a few minutes ago even for new listings.`]}):null,!r&&!i&&n.length>0?(0,V.jsx)(`li`,{children:`Alerts follow your scan interval plus typical Facebook visibility delay.`}):null]})]})]})})}var vle=10080*60*1e3;function tB(e){return`instasnag_feed_delay_banner_v1_${e}`}function nB(){return{dismissCount:0,lastDismissedAt:null}}function rB(e){if(!e)return nB();try{let t=localStorage.getItem(tB(e));if(!t)return nB();let n=JSON.parse(t);return{dismissCount:typeof n.dismissCount==`number`&&Number.isFinite(n.dismissCount)?Math.max(0,Math.min(2,Math.floor(n.dismissCount))):0,lastDismissedAt:typeof n.lastDismissedAt==`string`?n.lastDismissedAt:null}}catch{return nB()}}function yle(e,t){try{localStorage.setItem(tB(e),JSON.stringify(t))}catch{}}function ble(e,t=Date.now()){if(e.dismissCount>=2)return!1;if(e.dismissCount===0||!e.lastDismissedAt)return!0;let n=Date.parse(e.lastDismissedAt);return Number.isFinite(n)?t-n>=vle:!0}function xle(e,t){let[n,r]=(0,b.useState)(()=>rB(e)),[i,a]=(0,b.useState)(e),o=hle(t);return i!==e&&(a(e),r(rB(e))),{visible:(0,b.useMemo)(()=>!!e&&o&&ble(n),[o,n,e]),dismiss:(0,b.useCallback)(()=>{e&&r(t=>{let n={dismissCount:Math.min(t.dismissCount+1,2),lastDismissedAt:new Date().toISOString()};return yle(e,n),n})},[e])}}var Sle=40;function Cle(){let e=my(),t=nr(),n=or(),r=rr(),[i,a]=qi(),{status:o,isAuthenticated:s,user:c}=Jv(),{subscription:l,status:u}=Sy(),{subscribeNewListing:d,setCount:f}=Mj(),{getSnapshot:p,commitSnapshot:m}=Koe(),{listingId:h}=ur(),g=h,_=t.state?.feedFilters,v=(0,b.useMemo)(()=>g&&_?new URLSearchParams(_):null,[g,_]),y=(0,b.useMemo)(()=>v??i,[i,v]),S=y.get(`q`),C=y.get(`provider`),w=y.get(`price_min`),T=y.get(`price_max`),E=y.get(`year_min`),D=y.get(`year_max`),O=y.get(`mileage_min`),k=y.get(`mileage_max`),A=y.get(`interior_color`),j=y.get(`exterior_color`),M=y.get(`radius`),N=y.get(`has_phone_number`),P=y.get(`valuation`),F=y.get(`condition`),ee=y.get(`transmission_type`),I=y.get(`fuel_type`),te=y.get(`search_config_ids`),ne=y.get(`sort_by`),re=(0,b.useMemo)(()=>({q:S||void 0,provider:C||void 0,price_min:w?Number(w):void 0,price_max:T?Number(T):void 0,year_min:E?Number(E):void 0,year_max:D?Number(D):void 0,mileage_min:O?Number(O):void 0,mileage_max:k?Number(k):void 0,interior_color:A||void 0,exterior_color:j||void 0,radius:M?Number(M):void 0,has_phone_number:N===`true`?!0:void 0,valuation:P||void 0,condition:F||void 0,transmission_type:ee||void 0,fuel_type:I||void 0,search_config_ids:te||void 0,sort_by:(()=>{let e=ne||`found_at`;return e===`distance_asc`||e===`distance_desc`?`found_at`:e})()}),[F,j,I,N,A,k,O,T,w,C,S,M,te,ne,ee,P,D,E]),ie=(0,b.useMemo)(()=>({per_page:Sle,title:re.q,provider:re.provider,price_min:re.price_min,price_max:re.price_max,year_min:re.year_min,year_max:re.year_max,mileage_min:re.mileage_min,mileage_max:re.mileage_max,interior_color:re.interior_color,exterior_color:re.exterior_color,radius:re.radius,has_phone_number:re.has_phone_number,valuation:re.valuation,condition:re.condition,transmission_type:re.transmission_type,fuel_type:re.fuel_type,search_config_ids:re.search_config_ids,sort_by:re.sort_by}),[re]),ae=(0,b.useMemo)(()=>JSON.stringify({uid:c?.id??``,q:ie}),[ie,c?.id]),oe=(0,b.useMemo)(()=>vx(l),[l]).kind===`active`,se=u===`ready`||u===`error`,ce=i.toString(),le=(0,b.useMemo)(()=>({fromListingOverlay:!1,feedFilters:ce}),[ce]),ue=r===`POP`||t.state?.restoreFeedSession===!0,de=(0,b.useMemo)(()=>ue?p(ae):null,[ae,p,ue]),[fe,L]=(0,b.useState)(()=>de?.listings??[]),[pe,me]=(0,b.useState)(()=>de?.searches??[]),[he,ge]=(0,b.useState)(()=>de?.facets??null),[_e,ve]=(0,b.useState)(()=>de===null),[ye,be]=(0,b.useState)(!1),[xe,Se]=(0,b.useState)(``),[Ce,we]=(0,b.useState)(``),[Te,Ee]=(0,b.useState)(()=>de?.totalCount??0),[De,Oe]=(0,b.useState)(()=>de?.hasNext??!1),[ke,Ae]=(0,b.useState)(()=>de?.page??1),[je,Me]=(0,b.useState)(()=>de?.viewMode??`grid`),[Ne,Pe]=(0,b.useState)(!1),[Fe,Ie]=(0,b.useState)(!1),[Le,Re]=(0,b.useState)(!1),[ze,Be]=(0,b.useState)(()=>new Set),[Ve,He]=(0,b.useState)(()=>de?.newListingsCount??0),[Ue,We]=(0,b.useState)(()=>typeof window<`u`?window.matchMedia(`(min-width: 640px)`).matches:!1),Ge=(0,b.useRef)(!1),Ke=(0,b.useRef)(()=>{}),qe=(0,b.useRef)(null),Je=(0,b.useRef)(null),Ye=(0,b.useRef)(new Set),Xe=(0,b.useRef)(new Set),Ze=(0,b.useRef)(null),Qe=(0,b.useRef)(0),$e=(0,b.useRef)(de?ae:null),et=(0,b.useRef)(!!de),tt=(0,b.useRef)({feedQueryKey:ae,listings:fe,page:ke,hasNext:De,totalCount:Te,facets:he,searches:pe,newListingsCount:Ve,viewMode:je});(0,b.useLayoutEffect)(()=>{!de||!et.current||window.scrollTo(0,de.scrollY)},[de]),(0,b.useLayoutEffect)(()=>{de||(!$e.current||$e.current!==ae)&&window.scrollTo(0,0)},[ae,de]),(0,b.useLayoutEffect)(()=>{let e=window.matchMedia(`(min-width: 640px)`),t=()=>We(e.matches);return t(),e.addEventListener(`change`,t),()=>e.removeEventListener(`change`,t)},[]),(0,b.useLayoutEffect)(()=>{tt.current={feedQueryKey:ae,listings:fe,page:ke,hasNext:De,totalCount:Te,facets:he,searches:pe,newListingsCount:Ve,viewMode:je}},[ae,fe,ke,De,Te,he,pe,Ve,je]),(0,b.useEffect)(()=>()=>{let e=tt.current;e.listings.length!==0&&m({queryKey:e.feedQueryKey,listings:e.listings,page:e.page,hasNext:e.hasNext,totalCount:e.totalCount,facets:e.facets,searches:e.searches,newListingsCount:e.newListingsCount,viewMode:e.viewMode,scrollY:window.scrollY})},[m]),(0,b.useEffect)(()=>{Qe.current+=1,Ze.current!==null&&(window.clearTimeout(Ze.current),Ze.current=null)},[ie]);let nt=(0,b.useCallback)(async()=>{ve(!0),Se(``),we(``),L([]),Ae(1),Oe(!1),Ge.current=!1,$e.current=ae,window.scrollTo(0,0);try{let[e,t]=await Promise.all([Lo.get(`/api/listings/`,{query:{...ie,page:1,include_facets:!0}}),Lo.get(`/api/searches/`,{query:{page:1,per_page:50}})]);L(Jo(e.data.listings)),Ee(e.data.total_count),ge(e.data.facets??null),Oe(e.data.has_next),Ae(1),me(t.data.searches)}catch(t){Se(Qv(e,t))}finally{ve(!1)}},[ie,ae,e]),rt=(0,b.useCallback)(async()=>{try{let e=await Lo.get(`/api/listings/`,{query:{...ie,page:1,include_facets:!0}});L(Jo(e.data.listings)),Oe(e.data.has_next),Ae(1),Ee(e.data.total_count),e.data.facets&&ge(e.data.facets)}catch(e){console.error(`Real-time feed sync failed:`,e)}},[ie]),it=(0,b.useCallback)(async()=>
36{if(!De||_e||Ge.current)return;Ge.current=!0,be(!0),we(``);let t=ke+1;try{let e=await Lo.get(`/api/listings/`,{query:{...ie,page:t,include_facets:!1}});L(t=>{let n=new Set(t.map(e=>e.id)),r=[...t];for(let t of Jo(e.data.listings))n.has(t.id)||(n.add(t.id),r.push(t));return r}),Oe(e.data.has_next),Ae(t)}catch(t){t instanceof ho&&t.status===403?Se(e(`feed.subscriptionRequired`)):we(ty(e,t))}finally{Ge.current=!1,be(!1)}},[De,_e,ie,ke,e]);(0,b.useEffect)(()=>{Ke.current=it},[it]),(0,b.useEffect)(()=>{if(o===`loading`)return;if(!s){n(`/auth/login`,{replace:!0});return}if(!se||!oe)return;if(et.current){et.current=!1;return}if($e.current===ae&&fe.length>0)return;let e=window.setTimeout(()=>{nt()},0);return()=>window.clearTimeout(e)},[s,nt,n,o,ae,fe.length,se,oe]),(0,b.useEffect)(()=>{let e=d(e=>{if(window.scrollY<500){Ze.current!==null&&window.clearTimeout(Ze.current);let e=Qe.current;Ze.current=window.setTimeout(()=>{Qe.current===e&&rt()},500)}else He(t=>t+e)});return()=>{e(),Ze.current!==null&&window.clearTimeout(Ze.current)}},[d,rt]),(0,b.useEffect)(()=>{if(!s||!t.pathname.startsWith(`/dashboard/feed`))return;let e=!1;return(async()=>{try{await Lo.post(`/api/listings/mark-screen-seen`),e||(He(0),f(0))}catch{}})(),()=>{e=!0}},[s,t.pathname,f]),(0,b.useEffect)(()=>{let e=()=>{Re(window.scrollY>480)};return e(),window.addEventListener(`scroll`,e,{passive:!0}),()=>window.removeEventListener(`scroll`,e)},[]),(0,b.useEffect)(()=>{let e=qe.current;if(!e||!s)return;let t=new IntersectionObserver(e=>{e[0]?.isIntersecting&&Ke.current()},{root:null,rootMargin:`0px 0px 1800px 0px`,threshold:0});return t.observe(e),()=>t.disconnect()},[s,fe.length>0]),(0,b.useEffect)(()=>{let e=i.get(`sort_by`);if(!(e!==`distance_asc`&&e!==`distance_desc`)){try{sessionStorage.removeItem(`instasnag_feed_sort_geo`)}catch{}a(e=>{let t=new URLSearchParams(e);return t.set(`sort_by`,`found_at`),t},{replace:!0})}},[i,a]);let at=(0,b.useCallback)(e=>{let t=new URLSearchParams(i);return Object.entries(e).forEach(([e,n])=>{n===void 0||n===``?t.delete(e):t.set(e,String(n))}),a(t),!0},[i,a]),ot=(0,b.useCallback)(()=>{a({})},[a]),st=(0,b.useCallback)(e=>`/dashboard/feed/${e}`,[]),ct=(0,b.useCallback)(()=>{let e=t.state;if(TF(e)){n(-1);return}let r=e?.feedFilters;n(`/dashboard/feed${r?`?${r}`:``}`,{replace:!0})},[t.state,n]),lt=(0,b.useCallback)(e=>{L(t=>t.map(t=>t.id===e.id?{...t,...e}:t))},[]);Oj({onListingUpdated:e=>{e.isPersonalListing||lt(kj(e.listing))},onListingRemoved:(0,b.useCallback)(e=>{L(t=>t.map(t=>t.id===e?{...t,is_available:!1,marketplace_status:`unavailable`,can_refresh_from_facebook:!1}:t))},[])});let ut=(0,b.useCallback)(e=>{L(t=>t.map(t=>t.id===e&&t.is_new?{...t,is_new:!1}:t)),!Xe.current.has(e)&&(Xe.current.add(e),Zo(e).catch(()=>{}).finally(()=>{Xe.current.delete(e)}))},[]),dt=(0,b.useCallback)(async(e,t)=>{if(Ye.current.has(e))return;let n=!t;Ye.current.add(e),Be(t=>{let n=new Set(t);return n.add(e),n}),L(t=>t.map(t=>t.id===e?{...t,is_favorite:n}:t));try{let t=await Lo.put(`/api/favorites/${e}`,{is_favorite:n});L(n=>n.map(n=>n.id===e?{...n,is_favorite:t.data.is_favorite}:n))}catch{L(n=>n.map(n=>n.id===e?{...n,is_favorite:t}:n))}finally{Ye.current.delete(e),Be(t=>{let n=new Set(t);return n.delete(e),n})}},[]),ft=e=>{e!==je&&(Ie(!0),Me(e))};(0,b.useEffect)(()=>{if(Fe)return Je.current!==null&&window.clearTimeout(Je.current),Je.current=window.setTimeout(()=>{Ie(!1),Je.current=null},450),()=>{Je.current!==null&&(window.clearTimeout(Je.current),Je.current=null)}},[Fe]);let pt=Ue?je:`grid`;return o===`loading`||u===`loading`?null:se&&!oe?(0,V.jsx)(ik.main,{initial:{opacity:0}
36,animate:{opacity:1},className:`w-full min-w-0 px-4 pt-8 pb-12 sm:px-6 lg:px-8 2xl:px-10`,children:(0,V.jsxs)(`div`,{className:`flex w-full flex-col items-center rounded-3xl border border-dashed border-primary/30 bg-primary/5 px-4 py-10 text-center sm:px-8 sm:py-14`,children:[(0,V.jsx)(`div`,{className:`flex h-14 w-14 items-center justify-center rounded-2xl bg-primary/15 text-primary sm:h-16 sm:w-16`,children:(0,V.jsx)(qk,{className:`h-7 w-7 sm:h-8 sm:w-8`,strokeWidth:1.75,"aria-hidden":!0})}),(0,V.jsx)(`h1`,{className:`mt-5 max-w-xl text-xl font-black tracking-tight text-foreground sm:mt-6 sm:text-2xl`,children:e(`feed.subscribeTitle`)}),(0,V.jsx)(`p`,{className:`mt-3 max-w-lg text-sm leading-relaxed text-muted-foreground sm:text-base`,children:e(`feed.subscribeDescription`)}),(0,V.jsx)(zi,{to:YN(`subscription`),state:mM(uM(t.pathname,t.search,t.hash)),className:`mt-6 inline-flex w-full max-w-xs items-center justify-center gap-2 rounded-2xl bg-primary px-6 py-3 text-sm font-black text-primary-foreground shadow-lg shadow-primary/25 transition hover:bg-primary-hover sm:mt-8 sm:w-auto sm:max-w-none`,children:e(`feed.viewSubscriptionPlans`)})]})}):(0,V.jsxs)(`div`,{className:`relative w-full`,children:[(0,V.jsxs)(`div`,{className:`flex flex-col lg:flex-row`,children:[(0,V.jsx)(`aside`,{className:`sticky top-16 hidden h-[calc(100vh-64px)] w-[320px] shrink-0 overflow-y-auto border-r border-border bg-surface custom-scrollbar [scrollbar-gutter:stable] lg:block`,children:(0,V.jsx)(`div`,{className:`pt-6`,children:(0,V.jsx)(Qz,{filters:re,onFilterChange:at,onClear:ot,facets:he,searches:pe,isLoading:_e})})}),(0,V.jsx)(`main`,{className:`flex-1 min-w-0 px-4 py-8 sm:px-6 lg:px-8 2xl:px-10`,children:(0,V.jsx)(wle,{userId:c?.id,searches:pe,listings:fe,totalCount:Te,isLoadingInitial:_e,viewMode:je,displayViewMode:pt,isViewTransitioning:Fe,error:xe,handleViewModeChange:ft,setIsFilterOpen:Pe,isFilterOpen:Ne,loadInitial:nt,clearFilters:ot,cardDetailState:le,handleFavoriteToggle:dt,onListingRefreshed:lt,onListingOpen:ut,favoritePendingIds:ze,isLoadingMore:ye,loadMoreError:Ce,loadMoreRef:Ke,sentinelRef:qe,newListingsCount:Ve,setNewListingsCount:He,buildFeedDetailPath:st})})]}),typeof document<`u`&&(0,x.createPortal)((0,V.jsxs)(`div`,{className:`fixed inset-0 z-[190] lg:hidden ${Ne?`pointer-events-auto`:`pointer-events-none`}`,"aria-hidden":!Ne,children:[(0,V.jsx)(`div`,{className:`fixed inset-0 bg-black/55 backdrop-blur-[2px] transition-opacity duration-300 ${Ne?`opacity-100`:`opacity-0`}`,onClick:()=>Pe(!1)}),(0,V.jsxs)(`aside`,{className:`fixed inset-y-0 left-0 z-[200] flex h-[100dvh] min-h-0 w-[86%] max-w-[320px] flex-col border-r border-border/50 bg-surface p-0 transition-transform duration-500 ease-[cubic-bezier(0.32,0.72,0,1)] ${Ne?`translate-x-0`:`-translate-x-full`}`,children:[(0,V.jsxs)(`div`,{className:`flex h-16 shrink-0 items-center justify-between border-b border-border/50 bg-surface-elevated/50 px-4`,children:[(0,V.jsx)(`h2`,{className:`text-xl font-black`,children:e(`feed.filters`)}),(0,V.jsx)(`button`,{type:`button`,onClick:()=>Pe(!1),className:`flex h-9 w-9 items-center justify-center rounded-xl bg-surface-elevated text-foreground transition-all hover:bg-primary/10 hover:text-primary`,children:(0,V.jsx)(mj,{size:18})})]}),(0,V.jsx)(`div`,{className:`custom-scrollbar min-h-0 flex-1 overflow-y-auto pt-2`,children:(0,V.jsx)(Qz,{filters:re,onFilterChange:at,onClear:ot,facets:he,searches:pe,isMobile:!0,isLoading:_e,onApplySuccess:()=>Pe(!1)})})]})]}),document.body),(0,V.jsx)(zD,{children:Le&&(0,V.jsx)(ik.button,{type:`button`,initial:{opacity:0,y:12},animate:{opacity:1,y:0},exit:{opacity:0,y:12},transition:{duration:.18},onClick:()=>window.scrollTo({top:0,behavior:`smooth`}),className:`fixed bottom-6 right-6 z-[120] flex h-11 w-11 items-center justify-center rounded-full border border-primary/25 bg-primary text-primary-foreground shadow-lg shadow-primary/35 transition-colors hover:bg-primary-hover`,"aria-label":e(`feed.scrollToTop`),children:(0,V.jsx)(wk,{size:18})})}),(0,V.jsx)(MF,{listingId:g,onRequestClose:ct,backLabel:e(`feed.backToFeed`),buildDetailPath:st,onListingOpen:ut,onListingRefreshed:lt,similarListingDetailState:{fromListingOverlay:!0,overlaySource:`feed`,feedFilters:ce}})]})}var wle=(0,b.memo)(function({userId:e,searches:t,listings:n,totalCount:r,isLoadingInitial:i,viewMode:a,displayViewMode:o,isViewTransitioning:s,error:c,handleViewModeChange:l,setIsFilterOpen:u,isFilterOpen:d,loadInitial:f,clearFilters:p,cardDetailState:m,handleFavoriteToggle:h,onListingRefreshed:g,onListingOpen:_,favoritePendingIds:v,isLoadingMore:y,loadMoreError:b,loadMoreRef:x,sentinelRef:S,newListingsCount:C,setNewListingsCount:w,buildFeedDetailPath:T}){let E=my(),{visible:D,dismiss:O}=xle(e,t);return(0,V.jsxs)(`div`,{className:`mx-auto w-full max-w-[1600px]`,children:[(0,V.jsx)(zD,{children:D?(0,V.jsx)(_le,{searches:t,onDismiss:O},`feed-timing-notice`):null}),(0,V.jsxs)(`div`,{className:`mb-6 flex min-w-0 flex-wrap items-center justify-between gap-x-3 gap-y-2`,children:[(0,V.jsx)(`p`,{className:`min-w-0 flex-1 text-sm font-medium text-muted-foreground`,children:i?E(`feed.loading`):E(`feed.listingsFound`,{count:r.toLocaleStr
36ing()})}),(0,V.jsxs)(`div`,{className:`flex min-w-0 shrink-0 items-center gap-2 sm:gap-3`,children:[(0,V.jsxs)(`div`,{className:`hidden items-stretch rounded-lg border border-border bg-surface-elevated/50 px-0.5 py-0 sm:flex lg:px-0.5 lg:py-0`,children:[(0,V.jsxs)(`button`,{type:`button`,onClick:()=>l(`grid`),className:`relative flex h-10 items-center gap-2 rounded-md px-3 text-sm font-bold transition-colors duration-200 lg:h-9 lg:gap-1.5 lg:px-2.5 lg:text-xs ${a===`grid`?`text-primary`:`text-muted-foreground hover:text-foreground`}`,children:[(0,V.jsx)(hA,{className:`relative z-10 h-4 w-4 shrink-0`,strokeWidth:2.25}),(0,V.jsx)(`span`,{className:`relative z-10 whitespace-nowrap`,children:E(`feed.grid`)}),a===`grid`&&(0,V.jsx)(ik.div,{layoutId:`viewModeHighlight`,className:`absolute inset-0 rounded-md bg-surface shadow-sm`,transition:{type:`spring`,bounce:.2,duration:.6}})]}),(0,V.jsxs)(`button`,{type:`button`,onClick:()=>l(`list`),className:`relative flex h-10 items-center gap-2 rounded-md px-3 text-sm font-bold transition-colors duration-200 lg:h-9 lg:gap-1.5 lg:px-2.5 lg:text-xs ${a===`list`?`text-primary`:`text-muted-foreground hover:text-foreground`}`,children:[(0,V.jsx)(Lae,{className:`relative z-10 h-4 w-4 shrink-0`,strokeWidth:2.25}),(0,V.jsx)(`span`,{className:`relative z-10 whitespace-nowrap`,children:E(`feed.list`)}),a===`list`&&(0,V.jsx)(ik.div,{layoutId:`viewModeHighlight`,className:`absolute inset-0 rounded-md bg-surface shadow-sm`,transition:{type:`spring`,bounce:.2,duration:.6}})]})]}),(0,V.jsxs)(`button`,{type:`button`,onClick:()=>u(!d),className:`flex h-9 shrink-0 items-center gap-1.5 rounded-md border border-border bg-surface px-2.5 text-xs font-bold transition-all hover:bg-surface-elevated sm:h-10 sm:gap-2 sm:rounded-lg sm:px-3 sm:text-sm lg:hidden`,children:[(0,V.jsx)(eA,{className:`h-3.5 w-3.5 shrink-0 sm:h-4 sm:w-4`,strokeWidth:2.25}),E(`feed.filters`)]})]})]}),c?(0,V.jsxs)(`div`,{className:`flex min-h-[400px] flex-col items-center justify-center rounded-3xl border border-dashed border-error/30 bg-error/5 p-12 text-center`,children:[(0,V.jsx)(Bk,{className:`mb-4 text-error`,size:48}),(0,V.jsx)(`h3`,{className:`text-xl font-bold text-foreground`,children:E(`feed.somethingWrong`)}),(0,V.jsx)(`p`,{className:`mt-2 text-muted-foreground`,children:c}),(0,V.jsx)(`button`,{onClick:f,className:`mt-6 rounded-xl bg-primary px-6 py-2.5 font-bold text-primary-foreground hover:bg-primary/90`,children:E(`common.tryAgain`)})]}):n.length===0&&!i?(0,V.jsxs)(`div`,{className:`flex min-h-[400px] flex-col items-center justify-center rounded-3xl border border-dashed border-border bg-surface-elevated/20 p-12 text-center`,children:[(0,V.jsx)(UA,{className:`mb-4 text-muted-foreground`,size:48}),(0,V.jsx)(`h3`,{className:`text-xl font-bold text-foreground`,children:E(`feed.noListingsFound`)}),(0,V.jsx)(`p`,{className:`mt-2 text-muted-foreground`,children:E(`feed.noListingsHint`)}),(0,V.jsx)(`button`,{onClick:p,className:`mt-6 rounded-xl border border-border bg-surface px-6 py-2.5 font-bold text-foreground hover:bg-surface-elevated`,children:E(`feed.clearAllFilters`)})]}):(0,V.jsxs)(V.Fragment,{children:[(0,V.jsx)(zD,{children:C>0&&(0,V.jsx)(ik.div,{initial:{opacity:0,y:-20},animate:{opacity:1,y:0},exit:{opacity:0,y:-20},className:`sticky top-[88px] z-50 flex justify-center w-full mb-6 pointer-events-none`,children:(0,V.jsxs)(`button`,{onClick:()=>{window.scrollTo({top:0,behavior:`smooth`}),w(0),f()},className:`flex items-center gap-2 rounded-full bg-primary px-6 py-2.5 text-sm font-bold text-primary-foreground shadow-xl shadow-primary/20 transition-transform hover:scale-105 pointer-events-auto`,children:[(0,V.jsx)(wk,{size:16}),E(`feed.newListingsPill`,{count:C,label:E(C===1?`feed.newListing`:`feed.newListings`)})]})})}),(0,V.jsx)(ik.div,{layout:s,transition:s?{type:`spring`,stiffness:150,damping:25,mass:.8}:void 0,children:(0,V.jsxs)(`div`,{className:`grid gap-6 ${o===`grid`?`grid-cols-1 min-[640px]:grid-cols-2 min-[1280px]:grid-cols-3 min-[1750px]:grid-cols-4`:`grid-cols-1 min-[1800px]:grid-cols-2`}`,children:[i&&n.length===0?Array.from({length:9}).map((e,t)=>(0,V.jsx)(iB,{viewMode:o},`skeleton-${t}`)):n.map(e=>
36(0,V.jsx)(CF,{listing:e,viewMode:o,animateLayout:s,detailPath:T(e.id),detailState:m,onToggleFavorite:h,onListingRefreshed:g,onListingOpen:_,isFavoritePending:v.has(e.id)},e.id)),y&&Array.from({length:o===`grid`?6:3}).map((e,t)=>(0,V.jsx)(iB,{viewMode:o},`more-skeleton-${t}`))]})}),n.length>0&&(0,V.jsxs)(V.Fragment,{children:[(0,V.jsx)(`div`,{ref:S,className:`pointer-events-none h-8 w-full shrink-0`,"aria-hidden":!0}),b&&!y&&(0,V.jsxs)(`div`,{className:`flex flex-col items-center gap-3 py-8 text-center`,children:[(0,V.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:b}),(0,V.jsx)(`button`,{type:`button`,onClick:()=>x.current(),className:`rounded-lg border border-border bg-surface px-4 py-2 text-sm font-bold text-foreground hover:bg-surface-elevated`,children:E(`feed.retry`)})]})]})]})]})});function iB({viewMode:e}){return(0,V.jsxs)(ik.div,{layout:!0,transition:{type:`spring`,stiffness:150,damping:25,mass:.8},className:`rounded-3xl border border-border bg-surface-elevated/20 ${e===`grid`?`flex flex-col h-[400px]`:`flex min-h-48 items-stretch gap-6 p-4`}`,children:[(0,V.jsxs)(`div`,{className:`relative overflow-hidden rounded-xl bg-surface-elevated ${e===`grid`?`h-56 w-full`:`w-64 shrink-0 self-stretch min-h-0`}`,children:[(0,V.jsx)(`div`,{className:`absolute inset-0 bg-gradient-to-br from-surface-elevated via-surface-hover to-surface-elevated`}),(0,V.jsx)(`div`,{className:`absolute -inset-y-full left-[-50%] w-[100%] animate-[pulse_2s_ease-in-out_infinite] bg-gradient-to-r from-transparent via-white/40 dark:via-white/5 to-transparent rotate-12`})]}),(0,V.jsxs)(`div`,{className:`flex-1 space-y-4 p-5`,children:[(0,V.jsx)(`div`,{className:`h-4 w-1/3 rounded bg-surface-elevated/80 animate-[pulse_2s_ease-in-out_infinite]`}),(0,V.jsx)(`div`,{className:`h-6 w-3/4 rounded bg-surface-elevated/80 animate-[pulse_2s_ease-in-out_infinite]`}),(0,V.jsx)(`div`,{className:`h-8 w-1/4 rounded bg-surface-elevated/80 animate-[pulse_2s_ease-in-out_infinite] mt-2`}),(0,V.jsxs)(`div`,{className:`flex gap-2 mt-4`,children:[(0,V.jsx)(`div`,{className:`h-6 w-20 rounded-full bg-surface-elevated/80 animate-[pulse_2s_ease-in-out_infinite]`}),(0,V.jsx)(`div`,{className:`h-6 w-20 rounded-full bg-surface-elevated/80 animate-[pulse_2s_ease-in-out_infinite]`}),(0,V.jsx)(`div`,{className:`h-6 w-20 rounded-full bg-surface-elevated/80 animate-[pulse_2s_ease-in-out_infinite]`})]})]})]})}function Tle(e){return[{id:`monitoring`,badge:e(`features.monitoringBadge`),title:e(`features.monitoringTitle`),description:e(`features.monitoringDescription`),icon:Cae,color:`text-primary`,bgColor:`bg-primary/10`,details:[e(`features.monitoringDetail1`),e(`features.monitoringDetail2`),e(`features.monitoringDetail3`),e(`features.monitoringDetail4`)]},{id:`automation`,badge:e(`features.automationBadge`),title:e(`features.automationTitle`),description:e(`features.automationDescription`),icon:hj,color:`text-warning`,bgColor:`bg-warning/10`,details:[e(`features.automationDetail1`),e(`features.automationDetail2`),e(`features.automationDetail3`),e(`features.automationDetail4`),e(`features.automationDetail5`)]},{id:`operations`,badge:e(`features.operationsBadge`),title:e(`features.operationsTitle`),description:e(`features.operationsDescription`),icon:mA,color:`text-success`,bgColor:`bg-success/10`,details:[e(`features.operationsDetail1`),e(`features.operationsDetail2`),e(`features.operationsDetail3`),e(`features.operationsDetail4`)]}]}function Ele(e){return[{title:e(`features.crossPlatformTitle`),description:e(`features.crossPlatformBody`),icon:$A},{title:e(`features.browserExtensionTitle`),description:e(`features.browserExtensionBody`),icon:aA},{title:e(`features.secureTitle`),description:e(`features.secureBody`),icon:JA},{title:e(`features.inAppChatTitle`),description:e(`features.inAppChatBody`),icon:TA},{title:e(`features.customAlertsTitle`),description:e(`features.customAlertsBody`),icon:Ek},{title:e(`features.intelligentFilterTitle`),description:e(`features.intelligentFilterBody`),icon:eA}]}function Dle(e){return[{id:`intervals`,question:e(`features.faqIntervalsQ`),answer:e(`features.faqIntervalsA`)}
36,{id:`automation-details`,question:e(`features.faqAutomationQ`),answer:e(`features.faqAutomationA`)},{id:`device-support`,question:e(`features.faqDevicesQ`),answer:e(`features.faqDevicesA`)}]}function aB({position:e,className:t}){return(0,V.jsx)(`div`,{className:`pointer-events-none absolute left-0 right-0 z-10 overflow-hidden ${e===`top`?`-top-px`:`-bottom-px`}`,"aria-hidden":`true`,children:(0,V.jsx)(`div`,{className:`relative mx-auto h-12 w-[120%] -ml-[10%] sm:h-20 lg:h-28 ${t} ${e===`top`?`rounded-b-[50%]`:`rounded-t-[50%]`}`})})}function Ole(){let e=(0,b.useRef)(null);return(0,b.useEffect)(()=>{let t=e.current;if(!t)return;let n=new IntersectionObserver(e=>{e.forEach(e=>{e.isIntersecting&&e.target.classList.add(`visible`)})},{threshold:.1,rootMargin:`0px 0px -40px 0px`});return t.querySelectorAll(`.reveal, .reveal-left, .reveal-right`).forEach(e=>n.observe(e)),()=>n.disconnect()},[]),e}function kle(){let e=my(),t=Ole(),[n,r]=(0,b.useState)({}),i=Tle(e),a=Ele(e),o=Dle(e),s=e=>{r(t=>({...t,[e]:!t[e]}))};return(0,V.jsxs)(`div`,{ref:t,className:`relative flex flex-col overflow-hidden`,children:[(0,V.jsxs)(`section`,{className:`relative flex flex-col items-center justify-center overflow-hidden bg-gradient-to-br from-[#f0f4ff] via-background to-[#eef6ff] pb-28 pt-16 sm:pb-36 sm:pt-20 md:pb-44 md:pt-24 lg:pt-32 xl:pt-40 dark:from-[#040418] dark:via-[#060620] dark:to-[#0d1a3a]`,children:[(0,V.jsx)(`div`,{className:`pointer-events-none absolute -top-24 -left-24 h-[420px] w-[420px] rounded-full bg-primary/8 blur-[100px] animate-float-slow dark:bg-primary/15`}),(0,V.jsx)(`div`,{className:`pointer-events-none absolute top-1/3 -right-20 h-[360px] w-[360px] rounded-full bg-accent/6 blur-[90px] animate-float-slower dark:bg-accent/12`}),(0,V.jsxs)(`div`,{className:`container relative z-10 mx-auto max-w-6xl px-4 sm:px-6 lg:px-8 text-center`,children:[(0,V.jsxs)(`div`,{className:`reveal mx-auto inline-flex items-center gap-2 rounded-full border border-border bg-surface-elevated px-4 py-1.5 text-xs font-bold uppercase tracking-widest text-primary shadow-sm transition-all hover:border-primary/30 sm:text-sm`,children:[(0,V.jsx)(ej,{size:14,className:`shrink-0`,fill:`currentColor`}),e(`features.heroBadge`)]}),(0,V.jsxs)(`h1`,{className:`reveal reveal-delay-1 mx-auto mt-6 max-w-4xl text-balance text-4xl font-black leading-[1.1] tracking-tighter text-foreground sm:mt-8 sm:text-5xl md:text-6xl lg:text-7xl`,children:[e(`features.heroTitle`),` `,(0,V.jsx)(`br`,{}),(0,V.jsx)(`span`,{className:`bg-[image:var(--grad-primary)] bg-clip-text pl-0.5 pr-2 pb-1 box-decoration-clone text-transparent`,children:e(`features.heroTitleAccent`)})]}),(0,V.jsx)(`p`,{className:`reveal reveal-delay-2 mx-auto mt-6 max-w-2xl text-base leading-relaxed text-muted-foreground sm:mt-8 sm:text-lg md:text-xl lg:text-2xl`,children:e(`features.heroSubtitle`)})]}),(0,V.jsx)(aB,{position:`bottom`,className:`bg-[#edf2ff] dark:bg-[#0b0b26]`})]}),(0,V.jsx)(`section`,{className:`relative bg-gradient-to-b from-[#edf2ff] via-[#f5f7ff] to-background pb-14 pt-14 sm:pb-16 sm:pt-16 md:pb-20 md:pt-20 lg:pb-24 lg:pt-24 dark:from-[#0b0b26] dark:via-[#0f0f30]/60 dark:to-[#040418]`,children:(0,V.jsx)(`div`,{className:`container mx-auto max-w-7xl px-4 sm:px-6 lg:px-8`,children:(0,V.jsx)(`div`,{className:`grid grid-cols-1 gap-6 sm:gap-8 lg:grid-cols-3`,children:i.map((e,t)=>(0,V.jsxs)(`div`,{className:`reveal card-premium group flex flex-col rounded-3xl border border-border bg-surface p-6 shadow-sm sm:p-8 dark:bg-surface/35 reveal-delay-${t+1}`,children:[(0,V.jsxs)(`div`,{className:`mb-5 flex items-center justify-between sm:mb-6`,children:[(0,V.jsx)(`div`,{className:`flex h-12 w-12 items-center justify-center rounded-2xl sm:h-14 sm:w-14 ${e.bgColor} ${e.color}`,children:(0,V.jsx)(e.icon,{size:24,strokeWidth:2})}),(0,V.jsx)(`span`,{className:`rounded-full px-3 py-1 text-[10px] font-black uppercase tracking-wider ${e.bgColor} ${e.color}`,children:e.badge})]}),(0,V.jsx)(`h3`,{className:`text-xl font-black tracking-tight text-foreground sm:text-2xl`,children:e.title}),(0,V.jsx)(`p`,{className:`mt-3 text-sm leading-relaxed text-muted-foreground sm:mt-4 sm:text-base`,children:e.description}),(0,V.jsx)(`ul`,{className:`mt-auto pt-6 space-y-3 sm:mt-8 sm:pt-8 relative before:absolute before:left-0 before:top-0 before:h-px before:w-full before:bg-gradient-to-r before:from-border before:via-border before:to-transparent`,children:e.details.map(e=>(0,V.jsxs)(`li`,{className:`flex items-start gap-3 text-sm font-semibold text-foreground
36/80 sm:items-center`,children:[(0,V.jsx)(Vk,{size:16,className:`text-primary/70 shrink-0`}),(0,V.jsx)(`span`,{className:`min-w-0`,children:e})]},e))})]},e.id))})})}),(0,V.jsxs)(`section`,{className:`relative overflow-hidden bg-gradient-to-br from-[#e8efff] via-[#f0f4ff] to-[#edf5ff] py-28 pt-32 sm:py-36 sm:pt-40 dark:from-[#0a0a28] dark:via-[#0d0d30] dark:to-[#0f172a]`,children:[(0,V.jsx)(`div`,{className:`absolute top-1/2 left-1/2 -z-10 h-[600px] w-[800px] -translate-x-1/2 -translate-y-1/2 opacity-10 blur-[120px] bg-primary/20 dark:opacity-5`}),(0,V.jsxs)(`div`,{className:`container mx-auto max-w-7xl px-4 sm:px-6 lg:px-8`,children:[(0,V.jsx)(`div`,{className:`reveal mx-auto mb-10 max-w-3xl text-center sm:mb-16`,children:(0,V.jsxs)(`h2`,{className:`text-2xl font-black tracking-tight text-foreground sm:text-4xl md:text-5xl`,children:[e(`features.extendedTitle`),` `,(0,V.jsx)(`br`,{}),(0,V.jsx)(`span`,{className:`text-primary`,children:e(`features.extendedTitleAccent`)}),` `,e(`features.extendedTitleAfter`)]})}),(0,V.jsx)(`div`,{className:`grid grid-cols-1 gap-6 sm:grid-cols-2 lg:grid-cols-3`,children:a.map((e,t)=>(0,V.jsxs)(`div`,{className:`reveal card-premium flex flex-col rounded-3xl border border-border bg-surface p-6 shadow-sm sm:p-8 dark:bg-surface/35`,style:{transitionDelay:`${t*50}ms`},children:[(0,V.jsx)(`div`,{className:`mb-4 flex h-12 w-12 items-center justify-center rounded-xl bg-primary/10 text-primary dark:bg-primary/5`,children:(0,V.jsx)(e.icon,{size:24,strokeWidth:1.5})}),(0,V.jsx)(`h4`,{className:`text-lg font-bold tracking-tight text-foreground sm:text-xl`,children:e.title}),(0,V.jsx)(`p`,{className:`mt-2 text-sm leading-relaxed text-muted-foreground sm:text-base`,children:e.description})]},e.title))})]}),(0,V.jsx)(aB,{position:`bottom`,className:`bg-white dark:bg-[#040418]`})]}),(0,V.jsx)(`section`,{className:`relative bg-gradient-to-b from-white via-white to-white py-20 pt-24 sm:py-24 sm:pt-32 md:py-28 md:pt-36 dark:from-[#040418] dark:via-[#0b0b26]/50 dark:to-[#040418]`,children:(0,V.jsx)(`div`,{className:`container mx-auto px-4 sm:px-6 lg:px-8`,children:(0,V.jsx)(`div`,{className:`reveal mx-auto max-w-5xl overflow-hidden rounded-[1.5rem] border border-border bg-surface shadow-2xl sm:rounded-[2.5rem]`,children:(0,V.jsxs)(`div`,{className:`grid grid-cols-1 md:grid-cols-2`,children:[(0,V.jsxs)(`div`,{className:`p-5 sm:p-8 lg:p-12 relative overflow-hidden`,children:[(0,V.jsx)(`div`,{className:`absolute top-0 right-0 h-32 w-32 -translate-y-1/2 translate-x-1/2 rounded-full bg-error/5 blur-2xl`}),(0,V.jsx)(`h3`,{className:`text-xs font-black uppercase tracking-widest text-muted-foreground relative z-10`,children:e(`features.traditionalLabel`)}),(0,V.jsx)(`h4`,{className:`mt-3 text-2xl font-black tracking-tight text-foreground sm:mt-4 sm:text-3xl relative z-10`,children:e(`features.traditionalTitle`)}),(0,V.jsx)(`ul`,{className:`mt-6 space-y-4 sm:mt-8 sm:space-y-5 relative z-10`,children:[e(`features.traditional1`),e(`features.traditional2`),e(`features.traditional3`),e(`features.traditional4`),e(`features.traditional5`)].map(e=>(0,V.jsxs)(`li`,{className:`flex items-start gap-3 text-sm text-muted-foreground sm:text-base`,children:[(0,V.jsx)(`div`,{className:`mt-1.5 h-1.5 w-1.5 shrink-0 rounded-full bg-border-strong`}),e]},e))})]}),(0,V.jsxs)(`div`,{className:`relative overflow-hidden bg-primary/5 p-5 sm:p-8 lg:p-12 dark:bg-primary/10`,children:[(0,V.jsx)(`div`,{className:`absolute top-0 right-0 h-40 w-40 -translate-y-1/2 translate-x-1/3 rounded-full bg-primary/10 blur-3xl dark:bg-primary/20`}),(0,V.jsx)(`h3`,{className:`text-xs font-black uppercase tracking-widest text-primary relative z-10`,children:e(`features.advantageLabel`)}),(0,V.jsx)(`h4`,{className:`mt-3 text-2xl font-black tracking-tight text-foreground sm:mt-4 sm:text-3xl relative z-10`,children:e(`features.advantageTitle`)}),(0,V.jsx)(`ul`,{className:`mt-6 space-y-4 sm:mt-8 sm:space-y-5 relative z-10`,children:[e(`features.advantage1`),e(`features.advantage2`),e(`features.advantage3`),e(`features.advantage4`),e(`features.advantage5`)].map(e=>(0,V.jsxs)(`li`,{className:`flex items-start gap-3 text-sm font-bold text-foreground sm:text-base`,children:[(0,V.jsx)(Fk,{size:20,className:`mt-0.5 shrink-0 text-primary`,strokeWidth:3}),e]},e))})]})]})})})}),(0,V.jsx)(`section`,{className:`bg-background py-16 sm:py-24`,children:(0,V.jsxs)(`div`,{className:`container mx-auto max-w-3xl px-4 sm:px-6 lg:px-8`,children:[(0,V.jsx)(`div`,{className:`mx-auto mb-10 text-center sm:mb-12`,children:(0,V.jsx)(`h2`,{className:`text-2xl font-black tracking-tight text-foreground sm:text-4xl`,children:e(`features.faqTitle`)})}),(0,V.jsx)(`div`,{className:`flex flex-col gap-4`,children:o.map(e=>{let t=!!n[e.id];return(0,V.jsxs)(`div`,{className:`rounded-2xl border transition-all duration-300 ${t?`border-primary/30 bg-primary/5 shadow-lg shadow-primary/5 dark:bg-primary/10`:`border-border bg-surface-elevated/50 hover:border-border-strong`}`,children:[(0,V.jsxs)(`button`,{type:`button`,className:`flex w-full items-start justify-between gap-4 p-5 text-left sm:items-center sm:p-6`,onClick:()=>s(e.id),children:[(0,V.jsx)(`span`,{className:`text-base font-bold text-foreground sm:text-lg`,children:e.question}),(0,V.jsx)(Ik,{className:`h-5 w-5 transition-transform ${t?`rotate-180 text-primary`:`text-muted`}`})]}),(0,V.jsx)(`div`,{className:`grid min-h-0 transition-all duration-500 ease-in-out ${t?`grid-rows-[1fr] opacity-100`:`grid-rows-[0fr] opacity-0`}`,children:(0,V.jsx)(`div`,{className:`min-h-0 overflow-hidden text-sm leading-relaxed text-muted-foreground transition-all duration-500 ease-in-out sm:text-base ${t?`border-t border-border/50 px-5 pb-5 pt-4 sm:px-6 sm:pb-6`:`border-t border-transparent px-5 pb-0 pt-0 sm:px-6`}`,children:e.answer})})]},e.id)})})]})}),(0,V.jsxs)(`section`,{className:`relative w-full overflow-hidden bg-gradient-to-tl from-[#e8efff] via-background to-[#edf5ff] py-28 pt-32 sm:py-40 sm:pt-44 dark:from-[#0d1a3a] dark:via-[#040418] dark:to-[#0a0a28]`,children:[(0,V.jsx)(aB,{position:`top`,className:`bg-background dark:bg-[#040418]`}),(0,V.jsxs)(`div`,{className:`absolute inset-0 -z-10 overflow-hidden`,children:[(0,V.jsx)(`div`,{className:`absolute top-1/2 left-1/2 h-[500px] w-[500px] -translate-x-1/2 -translate-y-1/2 roun
36ded-full bg-primary/20 blur-[120px] animate-pulse-glow dark:bg-primary/10`}),(0,V.jsx)(`div`,{className:`absolute top-0 right-0 h-[300px] w-[300px] rounded-full bg-accent/20 blur-[100px] animate-float-slow dark:bg-accent/10`}),(0,V.jsx)(`div`,{className:`absolute bottom-0 left-0 h-[400px] w-[400px] rounded-full bg-primary/15 blur-[120px] animate-float-slower dark:bg-primary/10`})]}),(0,V.jsx)(`div`,{className:`container relative z-10 mx-auto px-4 sm:px-6 lg:px-8`,children:(0,V.jsx)(`div`,{className:`reveal mx-auto max-w-5xl rounded-[2rem] border border-white/20 bg-surface/40 p-8 shadow-2xl backdrop-blur-xl sm:rounded-[3rem] sm:p-14 lg:p-20 dark:border-white/10 dark:bg-surface/30`,children:(0,V.jsxs)(`div`,{className:`mx-auto flex max-w-3xl flex-col items-center text-center`,children:[(0,V.jsxs)(`h2`,{className:`text-balance text-4xl font-black leading-[1.05] tracking-tighter text-foreground sm:text-5xl md:text-6xl lg:text-7xl`,children:[e(`features.ctaTitle`),` `,(0,V.jsx)(`br`,{}),(0,V.jsx)(`span`,{className:`bg-[image:var(--grad-primary)] bg-clip-text text-transparent`,children:e(`features.ctaTitleAccent`)})]}),(0,V.jsx)(`p`,{className:`mt-6 max-w-xl text-balance text-base leading-relaxed text-muted-foreground sm:mt-8 sm:text-lg md:text-xl`,children:e(`features.ctaBody`)}),(0,V.jsxs)(`div`,{className:`mt-10 flex w-full flex-col items-center gap-4 sm:mt-12 sm:flex-row sm:justify-center`,children:[(0,V.jsxs)(zi,{to:`/auth/signup`,className:`group relative flex w-full items-center justify-center gap-2 overflow-hidden rounded-full bg-primary px-8 py-4 text-sm font-bold tracking-wide text-primary-foreground transition-all hover:scale-105 hover:bg-primary-hover hover:shadow-[0_0_40px_rgba(37,99,235,0.4)] sm:w-auto sm:px-10 sm:py-5 sm:text-base`,children:[(0,V.jsxs)(`span`,{className:`relative z-10 flex items-center gap-2`,children:[e(`features.ctaStartTrial`),(0,V.jsx)(xk,{size:20,className:`transition-transform duration-300 group-hover:translate-x-1`})]}),(0,V.jsx)(`div`,{className:`absolute inset-0 -translate-x-full bg-gradient-to-r from-transparent via-white/20 to-transparent transition-transform duration-1000 group-hover:translate-x-full`})]}),(0,V.jsx)(zi,{to:`/pricing`,className:`flex w-full items-center justify-center rounded-full border-2 border-border bg-surface px-8 py-4 text-sm font-bold tracking-wide text-foreground transition-all hover:border-primary/30 hover:bg-surface-hover sm:w-auto sm:px-10 sm:py-5 sm:text-base`,children:e(`features.ctaViewPlans`)})]})]})})})]})]})}function oB(e){if(e===void 0)throw ReferenceError(`this hasn't been initialised - super() hasn't been called`);return e}function sB(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}var cB={autoSleep:120,force3D:`auto`,nullTargetWarn:1,units:{lineHeight:``}},lB={duration:.5,overwrite:!1,delay:0},uB,dB,fB,pB=1e8,mB=1/pB,hB=Math.PI*2,Ale=hB/4,jle=0,gB=Math.sqrt,Mle=Math.cos,Nle=Math.sin,_B=function(e){return typeof e==`string`},vB=function(e){return typeof e==`function`},yB=function(e){return typeof e==`number`},bB=function(e){return e===void 0},xB=function(e){return typeof e==`object`},SB=function(e){return e!==!1},CB=function(){return typeof window<`u`},wB=function(e){return vB(e)||_B(e)},TB=typeof ArrayBuffer==`function`&&ArrayBuffer.isView||function(){},EB=Array.isArray,Ple=/random\([^)]+\)/g,Fle=/,\s*/g,DB=/(?:-?\.?\d|\.)+/gi,OB=/[-+=.]*\d+[.e\-+]*\d*[e\-+]*\d*/g,kB=/[-+=.]*\d+[.e-]*\d*[a-z%]*/g,AB=/[-+=.]*\d+\.?\d*(?:e-|e\+)?\d*/gi,jB=/[+-]=-?[.\d]+/,Ile=/[^,'"\[\]\s]+/gi,Lle=/^[+\-=e\s\d]*\d+[.\d]*([a-z]*|%)\s*$/i,MB,NB,PB,FB,IB={},LB={},RB,zB=function(e){return(LB=pV(e,IB))&&JH},BB=function(e,t){return console.warn(`Invalid property`,e,`set to`,t,`Missing plugin? gsap.registerPlugin()`)},VB=function(e,t){return!t&&console.warn(e)},HB=function(e,t){return e&&(IB[e]=t)&&LB&&(LB[e]=t)||IB},UB=function(){return 0},Rle={suppressEvents:!0,isStart:!0,kill:!1},WB={suppressEvents:!0,kill:!1},zle={suppressEvents:!0},GB={},KB=[],qB={},JB,YB={},XB={},ZB=30,QB=[],$B=``,eV=function(e){var t=e[0],n,r;if(xB(t)||vB(t)||(e=[e]),!(n=(t._gsap||{}).harness)){for(r=QB.length;r--&&!QB[r].targetTest(t););n=QB[r]}for(r=e.length;r--;)e[r]&&(e[r]._gsap||(e[r]._gsap=new bH(e[r],n)))||e.splice(r,1);return e},tV=function(e){return e._gsap||eV(VV(e))[0]._gsap},nV=function(e,t,n){return(n=e[t])&&vB(n)?e[t]():bB(n)&&e.getAttribute&&e.getAttribute(t)||n}
vendor: 4,194 bytes, line 36
36,rV=function(e,t){return(e=e.split(`,`)).forEach(t)||e},iV=function(e){return Math.round(e*1e5)/1e5||0},aV=function(e){return Math.round(e*1e7)/1e7||0},oV=function(e,t){var n=t.charAt(0),r=parseFloat(t.substr(2));return e=parseFloat(e),n===`+`?e+r:n===`-`?e-r:n===`*`?e*r:e/r},Ble=function(e,t){for(var n=t.length,r=0;e.indexOf(t[r])<0&&++r<n;);return r<n},sV=function(){var e=KB.length,t=KB.slice(0),n,r;for(qB={},KB.length=0,n=0;n<e;n++)r=t[n],r&&r._lazy&&(r.render(r._lazy[0],r._lazy[1],!0)._lazy=0)},cV=function(e){return!!(e._initted||e._startAt||e.add)},lV=function(e,t,n,r){KB.length&&!dB&&sV(),e.render(t,n,r||!!(dB&&t<0&&cV(e))),KB.length&&!dB&&sV()},uV=function(e){var t=parseFloat(e);return(t||t===0)&&(e+``).match(Ile).length<2?t:_B(e)?e.trim():e},dV=function(e){return e},fV=function(e,t){for(var n in t)n in e||(e[n]=t[n]);return e},Vle=function(e){return function(t,n){for(var r in n)r in t||r===`duration`&&e||r===`ease`||(t[r]=n[r])}},pV=function(e,t){for(var n in t)e[n]=t[n];return e},mV=function e(t,n){for(var r in n)r!==`__proto__`&&r!==`constructor`&&r!==`prototype`&&(t[r]=xB(n[r])?e(t[r]||(t[r]={}),n[r]):n[r]);return t},hV=function(e,t){var n={},r;for(r in e)r in t||(n[r]=e[r]);return n},gV=function(e){var t=e.parent||MB,n=e.keyframes?Vle(EB(e.keyframes)):fV;if(SB(e.inherit))for(;t;)n(e,t.vars.defaults),t=t.parent||t._dp;return e},Hle=function(e,t){for(var n=e.length,r=n===t.length;r&&n--&&e[n]===t[n];);return n<0},_V=function(e,t,n,r,i){n===void 0&&(n=`_first`),r===void 0&&(r=`_last`);var a=e[r],o;if(i)for(o=t[i];a&&a[i]>o;)a=a._prev;return a?(t._next=a._next,a._next=t):(t._next=e[n],e[n]=t),t._next?t._next._prev=t:e[r]=t,t._prev=a,t.parent=t._dp=e,t},vV=function(e,t,n,r){n===void 0&&(n=`_first`),r===void 0&&(r=`_last`);var i=t._prev,a=t._next;i?i._next=a:e[n]===t&&(e[n]=a),a?a._prev=i:e[r]===t&&(e[r]=i),t._next=t._prev=t.parent=null},yV=function(e,t){e.parent&&(!t||e.parent.autoRemoveChildren)&&e.parent.remove&&e.parent.remove(e),e._act=0},bV=function(e,t){if(e&&(!t||t._end>e._dur||t._start<0))for(var n=e;n;)n._dirty=1,n=n.parent;return e},Ule=function(e){for(var t=e.parent;t&&t.parent;)t._dirty=1,t.totalDuration(),t=t.parent;return e},xV=function(e,t,n,r){return e._startAt&&(dB?e._startAt.revert(WB):e.vars.immediateRender&&!e.vars.autoRevert||e._startAt.render(t,!0,r))},Wle=function e(t){return!t||t._ts&&e(t.parent)},SV=function(e){return e._repeat?CV(e._tTime,e=e.duration()+e._rDelay)*e:0},CV=function(e,t){var n=Math.floor(e=aV(e/t));return e&&n===e?n-1:n},wV=function(e,t){return(e-t._start)*t._ts+(t._ts>=0?0:t._dirty?t.totalDuration():t._tDur)},TV=function(e){return e._end=aV(e._start+(e._tDur/Math.abs(e._ts||e._rts||mB)||0))},EV=function(e,t){var n=e._dp;return n&&n.smoothChildTiming&&e._ts&&(e._start=aV(n._time-(e._ts>0?t/e._ts:((e._dirty?e.totalDuration():e._tDur)-t)/-e._ts)),TV(e),n._dirty||bV(n,e)),e},DV=function(e,t){var n;if((t._time||!t._dur&&t._initted||t._start<e._time&&(t._dur||!t.add))&&(n=wV(e.rawTime(),t),(!t._dur||LV(0,t.totalDuration(),n)-t._tTime>mB)&&t.render(n,!0)),bV(e,t)._dp&&e._initted&&e._time>=e._dur&&e._ts){if(e._dur<e.duration())for(n=e;n._dp;)n.rawTime()>=0&&n.totalTime(n._tTime),n=n._dp;e._zTime=-mB}},OV=function(e,t,n,r){return t.parent&&yV(t),t._start=aV((yB(n)?n:n||e!==MB?PV(e,n,t):e._time)+t._delay),t._end=aV(t._start+(t.totalDuration()/Math.abs(t.timeScale())||0)),_V(e,t,`_first`,`_last`,e._sort?`_start`:0),jV(t)||(e._recent=t),r||DV(e,t),e._ts<0&&EV(e,e._tTime),e},kV=function(e,t){return(IB.ScrollTrigger||BB(`scrollTrigger`,t))&&IB.ScrollTrigger.create(t,e)},AV=function(e,t,n,r,i){if(DH(e,t,i),!e._initted)return 1;if(!n&&e._pt&&!dB&&(e._dur&&e.vars.lazy!==!1||!e._dur&&e.vars.lazy)&&JB!==fH.frame)return KB.push(e),e._lazy=[i,r],1},Gle=function e(t){var n=t.parent;return n&&n._ts&&n._initted&&!n._lock&&(n.rawTime()<0||e(n))},jV=function(e){var t=e.data;return t===`isFromStart`||t===`isStart`},Kle=function(e,t,n,r){var i=e.ratio,a=t<0||!t&&(!e._start&&Gle(e)&&!(!e._initted&&jV(e))||(e._ts<0||e._dp._ts<0)&&!jV(e))?0:1,o=e._rDelay,s=0,c,l,u;if(o&&e._repeat&&(s=LV(0,e._tDur,t),l=CV(s,o),e._yoyo&&l&1&&(a=1-a),l!==CV(e._tTime,o)&&(i=1-a,e.vars.repeatRefresh&&e._initted&&e.invali
vendor: 34,840 bytes, line 36
36date())),a!==i||dB||r||e._zTime===mB||!t&&e._zTime){if(!e._initted&&AV(e,t,r,n,s))return;for(u=e._zTime,e._zTime=t||(n?mB:0),n||=t&&!u,e.ratio=a,e._from&&(a=1-a),e._time=0,e._tTime=s,c=e._pt;c;)c.r(a,c.d),c=c._next;t<0&&xV(e,t,n,!0),e._onUpdate&&!n&&QV(e,`onUpdate`),s&&e._repeat&&!n&&e.parent&&QV(e,`onRepeat`),(t>=e._tDur||t<0)&&e.ratio===a&&(a&&yV(e,1),!n&&!dB&&(QV(e,a?`onComplete`:`onReverseComplete`,!0),e._prom&&e._prom()))}else e._zTime||=t},qle=function(e,t,n){var r;if(n>t)for(r=e._first;r&&r._start<=n;){if(r.data===`isPause`&&r._start>t)return r;r=r._next}else for(r=e._last;r&&r._start>=n;){if(r.data===`isPause`&&r._start<t)return r;r=r._prev}},MV=function(e,t,n,r){var i=e._repeat,a=aV(t)||0,o=e._tTime/e._tDur;return o&&!r&&(e._time*=a/e._dur),e._dur=a,e._tDur=i?i<0?1e10:aV(a*(i+1)+e._rDelay*i):a,o>0&&!r&&EV(e,e._tTime=e._tDur*o),e.parent&&TV(e),n||bV(e.parent,e),e},NV=function(e){return e instanceof SH?bV(e):MV(e,e._dur)},Jle={_start:0,endTime:UB,totalDuration:UB},PV=function e(t,n,r){var i=t.labels,a=t._recent||Jle,o=t.duration()>=pB?a.endTime(!1):t._dur,s,c,l;return _B(n)&&(isNaN(n)||n in i)?(c=n.charAt(0),l=n.substr(-1)===`%`,s=n.indexOf(`=`),c===`<`||c===`>`?(s>=0&&(n=n.replace(/=/,``)),(c===`<`?a._start:a.endTime(a._repeat>=0))+(parseFloat(n.substr(1))||0)*(l?(s<0?a:r).totalDuration()/100:1)):s<0?(n in i||(i[n]=o),i[n]):(c=parseFloat(n.charAt(s-1)+n.substr(s+1)),l&&r&&(c=c/100*(EB(r)?r[0]:r).totalDuration()),s>1?e(t,n.substr(0,s-1),r)+c:o+c)):n==null?o:+n},FV=function(e,t,n){var r=yB(t[1]),i=(r?2:1)+(e<2?0:1),a=t[i],o,s;if(r&&(a.duration=t[1]),a.parent=n,e){for(o=a,s=n;s&&!(`immediateRender`in o);)o=s.vars.defaults||{},s=SB(s.vars.inherit)&&s.parent;a.immediateRender=SB(o.immediateRender),e<2?a.runBackwards=1:a.startAt=t[i-1]}return new jH(t[0],a,t[i+1])},IV=function(e,t){return e||e===0?t(e):t},LV=function(e,t,n){return n<e?e:n>t?t:n},RV=function(e,t){return!_B(e)||!(t=Lle.exec(e))?``:t[1]},Yle=function(e,t,n){return IV(n,function(n){return LV(e,t,n)})},zV=[].slice,BV=function(e,t){return e&&xB(e)&&`length`in e&&(!t&&!e.length||e.length-1 in e&&xB(e[0]))&&!e.nodeType&&e!==NB},Xle=function(e,t,n){return n===void 0&&(n=[]),e.forEach(function(e){var r;return _B(e)&&!t||BV(e,1)?(r=n).push.apply(r,VV(e)):n.push(e)})||n},VV=function(e,t,n){return fB&&!t&&fB.selector?fB.selector(e):_B(e)&&!n&&(PB||!pH())?zV.call((t||FB).querySelectorAll(e),0):EB(e)?Xle(e,n):BV(e)?zV.call(e,0):e?[e]:[]},HV=function(e){return e=VV(e)[0]||VB(`Invalid scope`)||{},function(t){var n=e.current||e.nativeElement||e;return VV(t,n.querySelectorAll?n:n===e?VB(`Invalid scope`)||FB.createElement(`div`):e)}},UV=function(e){return e.sort(function(){return .5-Math.random()})},WV=function(e){if(vB(e))return e;var t=xB(e)?e:{each:e},n=hH(t.ease),r=t.from||0,i=parseFloat(t.base)||0,a={},o=r>0&&r<1,s=isNaN(r)||o,c=t.axis,l=r,u=r;return _B(r)?l=u={center:.5,edges:.5,end:1}[r]||0:!o&&s&&(l=r[0],u=r[1]),function(e,o,d){var f=(d||t).length,p=a[f],m,h,g,_,v,y,b,x,S;if(!p){if(S=t.grid===`auto`?0:(t.grid||[1,pB])[1],!S){for(b=-pB;b<(b=d[S++].getBoundingClientRect().left)&&S<f;);S<f&&S--}for(p=a[f]=[],m=s?Math.min(S,f)*l-.5:r%S,h=S===pB?0:s?f*u/S-.5:r/S|0,b=0,x=pB,y=0;y<f;y++)g=y%S-m,_=h-(y/S|0),p[y]=v=c?Math.abs(c===`y`?_:g):gB(g*g+_*_),v>b&&(b=v),v<x&&(x=v);r===`random`&&UV(p),p.max=b-x,p.min=x,p.v=f=(parseFloat(t.amount)||parseFloat(t.each)*(S>f?f-1:c?c===`y`?f/S:S:Math.max(S,f/S))||0)*(r===`edges`?-1:1),p.b=f<0?i-f:i,p.u=RV(t.amount||t.each)||0,n=n&&f<0?lue(n):n}return f=(p[e]-p.min)/p.max||0,aV(p.b+(n?n(f):f)*p.v)+p.u}},GV=function(e){var t=10**((e+``).split(`.`)[1]||``).length;return function(n){var r=aV(Math.round(parseFloat(n)/e)*e*t);return(r-r%1)/t+(yB(n)?0:RV(n))}},KV=function(e,t){var n=EB(e),r,i;return!n&&xB(e)&&(r=n=e.radius||pB,e.values?(e=VV(e.values),(i=!yB(e[0]))&&(r*=r)):e=GV(e.increment)),IV(t,n?vB(e)?function(t){return i=e(t),Math.abs(i-t)<=r?i:t}:function(t){for(var n=parseFloat(i?t.x:t),a=parseFloat(i?t.y:0),o=pB,s=0,c=e.length,l,u;c--;)i?(l=e[c].x-n,u=e[c].y-a,l=l*l+u*u):l=Math.abs(e[c]-n),l<o&&(o=l,s=c);return s=!r||o<=r?e[s]:t,i||s===t||yB(t)?s:s+RV(t)}:GV(e))},qV=function(e,t,n,r){return IV(EB(e)?!t:n===!0?!!(n=0):!r,function(){return EB(e)?e[~~(Math.random()*e.length)]:(n||=1e-5)&&(r=n<1?10**((n+``).length-2):1)&&Math.floor(Math.round((e-n/2+Math.random()*(t-e+n*.99))/n)*n*r)/r})},Zle=function(){var e=[...arguments];return function(t){return e.reduce(function(e,t){return t(e)},t)}},Qle=function(e,t){return function(n){return e(parseFloat(n))+(t||RV(n))}},$le=function(e,t,n){return XV(e,t,0,1,n)},JV=function(e,t,n){return IV(n,function(n){return e[~~t(n)]})},eue=function e(t,n,r){var i=n-t;return EB(t)?JV(t,e(0,t.length),n):IV(r,function(e){return(i+(e-t)%i)%i+t})},tue=function e(t,n,r){var i=n-t,a=i*2;return EB(t)?JV(t,e(0,t.length-1),n):IV(r,function(e){return e=(a+(e-t)%a)%a||0,t+(e>i?a-e:e)})},YV=function(e){return e.replace(Ple,function(e){var t=e.indexOf(`[`)+1,n=e.substring(t||7,t?e.indexOf(`]`):e.length-1).split(Fle);return qV(t?n:+n[0],t?0:+n[1],+n[2]||1e-5)})},XV=function(e,t,n,r,i){var a=t-e,o=r-n;return IV(i,function(t){return n+((t-e)/a*o||0)})},nue=function e(t,n,r,i){var a=isNaN(t+n)?0:function(e){return(1-e)*t+e*n};if(!a){var o=_B(t),s={},c,l,u,d,f;if(r===!0&&(i=1)&&(r=null),o)t={p:t},n={p:n};else if(EB(t)&&!EB(n)){for(u=[],d=t.length,f=d-2,l=1;l<d;l++)u.push(e(t[l-1],t[l]));d--,a=function(e){e*=d;var t=Math.min(f,~~e);return u[t](e-t)},r=n}else i||(t=pV(EB(t)?[]:{},t));if(!u){for(c in n)CH.call(s,t,c,`get`,n[c]);a=function(e){return LH(e,s)||(o?t.p:t)}}}return IV(r,a)},ZV=function(e,t,n){var r=e.labels,i=pB,a,o,s;for(a in r)o=r[a]-t,o<0==!!n&&o&&i>(o=Math.abs(o))&&(s=a,i=o);return s},QV=function(e,t,n){var r=e.vars,i=r[t],a=fB,o=e._ctx,s,c,l;if(i)return s=r[t+`Params`],c=r.callbackScope||e,n&&KB.length&&sV(),o&&(fB=o),l=s?i.apply(c,s):i.call(c),fB=a,l},$V=function(e){return yV(e),e.scrollTrigger&&e.scrollTrigger.kill(!!dB),e.progress()<1&&QV(e,`onInterrupt`),e},eH,tH=[],nH=function(e){if(e)if(e=!e.name&&e.default||e,CB()||e.headless){var t=e.name,n=vB(e),r=t&&!n&&e.init?function(){this._props=[]}:e,i={init:UB,render:LH,add:CH,kill:yue,modifier:vue,rawVars:0},a={targetTest:0,get:0,getSetter:PH,aliases:{},register:0};if(pH(),e!==r){if(YB[t])return;fV(r,fV(hV(e,i),a)),pV(r.prototype,pV(i,hV(e,a))),YB[r.prop=t]=r,e.targetTest&&(QB.push(r),GB[t]=1),t=(t===`css`?`CSS`:t.charAt(0).toUpperCase()+t.substr(1))+`Plugin`}HB(t,r),e.register&&e.register(JH,r,zH)}else tH.push(e)},rH=255,iH={aqua:[0,rH,rH],lime:[0,rH,0],silver:[192,192,192],black:[0,0,0],maroon:[128,0,0],teal:[0,128,128],blue:[0,0,rH],navy:[0,0,128],white:[rH,rH,rH],olive:[128,128,0],yellow:[rH,rH,0],orange:[rH,165,0],gray:[128,128,128],purple:[128,0,128],green:[0,128,0],red:[rH,0,0],pink:[rH,192,203],cyan:[0,rH,rH],transparent:[rH,rH,rH,0]},aH=function(e,t,n){return e+=e<0?1:e>1?-1:0,(e*6<1?t+(n-t)*e*6:e<.5?n:e*3<2?t+(n-t)*(2/3-e)*6:t)*rH+.5|0},oH=function(e,t,n){var r=e?yB(e)?[e>>16,e>>8&rH,e&rH]:0:iH.black,i,a,o,s,c,l,u,d,f,p;if(!r){if(e.substr(-1)===`,`&&(e=e.substr(0,e.length-1)),iH[e])r=iH[e];else if(e.charAt(0)===`#`){if(e.length<6&&(i=e.charAt(1),a=e.charAt(2),o=e.charAt(3),e=`#`+i+i+a+a+o+o+(e.length===5?e.charAt(4)+e.charAt(4):``)),e.length===9)return r=parseInt(e.substr(1,6),16),[r>>16,r>>8&rH,r&rH,parseInt(e.substr(7),16)/255];e=parseInt(e.substr(1),16),r=[e>>16,e>>8&rH,e&rH]}else if(e.substr(0,3)===`hsl`){if(r=p=e.match(DB),!t)s=r[0]%360/360,c=r[1]/100,l=r[2]/100,a=l<=.5?l*(c+1):l+c-l*c,i=l*2-a,r.length>3&&(r[3]*=1),r[0]=aH(s+1/3,i,a),r[1]=aH(s,i,a),r[2]=aH(s-1/3,i,a);else if(~e.indexOf(`=`))return r=e.match(OB),n&&r.length<4&&(r[3]=1),r}else r=e.match(DB)||iH.transparent;r=r.map(Number)}return t&&!p&&(i=r[0]/rH,a=r[1]/rH,o=r[2]/rH,u=Math.max(i,a,o),d=Math.min(i,a,o),l=(u+d)/2,u===d?s=c=0:(f=u-d,c=l>.5?f/(2-u-d):f/(u+d),s=u===i?(a-o)/f+(a<o?6:0):u===a?(o-i)/f+2:(i-a)/f+4,s*=60),r[0]=~~(s+.5),r[1]=~~(c*100+.5),r[2]=~~(l*100+.5)),n&&r.length<4&&(r[3]=1),r},sH=function(e){var t=[],n=[],r=-1;return e.split(lH).forEach(function(e){var i=e.match(kB)||[];t.push.apply(t,i),n.push(r+=i.length+1)}),t.c=n,t},cH=function(e,t,n){var r=``,i=(e+r).match(lH),a=t?`hsla(`:`rgba(`,o=0,s,c,l,u;if(!i)return e;if(i=i.map(function(e){return(e=oH(e,t,1))&&a+(t?e[0]+`,`+e[1]+`%,`+e[2]+`%,`+e[3]:e.join(`,`))+`)`}),n&&(l=sH(e),s=n.c,s.join(r)!==l.c.join(r)))for(c=e.replace(lH,`1`).split(kB),u=c.length-1;o<u;o++)r+=c[o]+(~s.indexOf(o)?i.shift()||a+`0,0,0,0)`:(l.length?l:i.length?i:n).shift());if(!c)for(c=e.split(lH),u=c.length-1;o<u;o++)r+=c[o]+i[o];return r+c[u]},lH=function(){var e=`(?:\\b(?:(?:rgb|rgba|hsl|hsla)\\(.+?\\))|\\B#(?:[0-9a-f]{3,4}){1,2}\\b`,t;for(t in iH)e+=`|`+t+`\\b`;return RegExp(e+`)`,`gi`)}(),rue=/hsl[a]?\(/,uH=function(e){var t=e.join(` `),n;if(lH.lastIndex=0,lH.test(t))return n=rue.test(t),e[1]=cH(e[1],n),e[0]=cH(e[0],n,sH(e[1])),!0},dH,fH=function(){var e=Date.now,t=500,n=33,r=e(),i=r,a=1e3/240,o=a,s=[],c,l,u,d,f,p,m=function u(m){var h=e()-i,g=m===!0,_,v,y,b;if((h>t||h<0)&&(r+=h-n),i+=h,y=i-r,_=y-o,(_>0||g)&&(b=++d.frame,f=y-d.time*1e3,d.time=y/=1e3,o+=_+(_>=a?4:a-_),v=1),g||(c=l(u)),v)for(p=0;p<s.length;p++)s[p](y,f,b,m)};return d={time:0,frame:0,tick:function(){m(!0)},deltaRatio:function(e){return f/(1e3/(e||60))},wake:function(){RB&&(!PB&&CB()&&(NB=PB=window,FB=NB.document||{},IB.gsap=JH,(NB.gsapVersions||=[]).push(JH.version),zB(LB||NB.GreenSockGlobals||!NB.gsap&&NB||{}),tH.forEach(nH)),u=typeof requestAnimationFrame<`u`&&requestAnimationFrame,c&&d.sleep(),l=u||function(e){return setTimeout(e,o-d.time*1e3+1|0)},dH=1,m(2))},sleep:function(){(u?cancelAnimationFrame:clearTimeout)(c),dH=0,l=UB},lagSmoothing:function(e,r){t=e||1/0,n=Math.min(r||33,t)},fps:function(e){a=1e3/(e||240),o=d.time*1e3+a},add:function(e,t,n){var r=t?function(t,n,i,a){e(t,n,i,a),d.remove(r)}:e;return d.remove(e),s[n?`unshift`:`push`](r),pH(),r},remove:function(e,t){~(t=s.indexOf(e))&&s.splice(t,1)&&p>=t&&p--},_listeners:s},d}(),pH=function(){return!dH&&fH.wake()},mH={},iue=/^[\d.\-M][\d.\-,\s]/,aue=/["']/g,oue=function(e){for(var t={},n=e.substr(1,e.length-3).split(`:`),r=n[0],i=1,a=n.length,o,s,c;i<a;i++)s=n[i],o=i===a-1?s.length:s.lastIndexOf(`,`),c=s.substr(0,o),t[r]=isNaN(c)?c.replace(aue,``).trim():+c,r=s.substr(o+1).trim();return t},sue=function(e){var t=e.indexOf(`(`)+1,n=e.indexOf(`)`),r=e.indexOf(`(`,t);return e.substring(t,~r&&r<n?e.indexOf(`)`,n+1):n)},cue=function(e){var t=(e+``).split(`(`),n=mH[t[0]];return n&&t.length>1&&n.config?n.config.apply(null,~e.indexOf(`{`)?[oue(t[1])]:sue(e).split(`,`).map(uV)):mH._CE&&iue.test(e)?mH._CE(``,e):n},lue=function(e){return function(t){return 1-e(1-t)}},hH=function(e,t){return e&&(vB(e)?e:mH[e]||cue(e))||t},gH=function(e,t,n,r){n===void 0&&(n=function(e){return 1-t(1-e)}),r===void 0&&(r=function(e){return e<.5?t(e*2)/2:1-t((1-e)*2)/2});var i={easeIn:t,easeOut:n,easeInOut:r},a;return rV(e,function(e){for(var t in mH[e]=IB[e]=i,mH[a=e.toLowerCase()]=n,i)mH[a+(t===`easeIn`?`.in`:t===`easeOut`?`.out`:`.inOut`)]=mH[e+`.`+t]=i[t]}),i},_H=function(e){return function(t){return t<.5?(1-e(1-t*2))/2:.5+e((t-.5)*2)/2}},vH=function e(t,n,r){var i=n>=1?n:1,a=(r||(t?.3:.45))/(n<1?n:1),o=a/hB*(Math.asin(1/i)||0),s=function(e){return e===1?1:i*2**(-10*e)*Nle((e-o)*a)+1},c=t===`out`?s:t===`in`?function(e){return 1-s(1-e)}:_H(s);return a=hB/a,c.config=function(n,r){return e(t,n,r)},c},yH=function e(t,n){n===void 0&&(n=1.70158);var r=function(e){return e?--e*e*((n+1)*e+n)+1:0},i=t===`out`?r:t===`in`?function(e){return 1-r(1-e)}:_H(r);return i.config=function(n){return e(t,n)},i};rV(`Linear,Quad,Cubic,Quart,Quint,Strong`,function(e,t){var n=t<5?t+1:t;gH(e+`,Power`+(n-1),t?function(e){return e**+n}:function(e){return e},function(e){return 1-(1-e)**n},function(e){return e<.5?(e*2)**n/2:1-((1-e)*2)**n/2})}),mH.Linear.easeNone=mH.none=mH.Linear.easeIn,gH(`Elastic`,vH(`in`),vH(`out`),vH()),(function(e,t){var n=1/t,r=2*n,i=2.5*n,a=function(a){return a<n?e*a*a:a<r?e*(a-1.5/t)**2+.75:a<i?e*(a-=2.25/t)*a+.9375:e*(a-2.625/t)**2+.984375};gH(`Bounce`,function(e){return 1-a(1-e)},a)})(7.5625,2.75),gH(`Expo`,function(e){return 2**(10*(e-1))*e+e*e*e*e*e*e*(1-e)}),gH(`Circ`,function(e){return-(gB(1-e*e)-1)}),gH(`Sine`,function(e){return e===1?1:-Mle(e*Ale)+1}),gH(`Back`,yH(`in`),yH(`out`),yH()),mH.SteppedEase=mH.steps=IB.SteppedEase={config:function(e,t){e===void 0&&(e=1);var n=1/e,r=e+ +!t,i=+!!t,a=1-mB;return function(e){return((r*LV(0,a,e)|0)+i)*n}}},lB.ease=mH[`quad.out`],rV(`onComplete,onUpdate,onStart,onRepeat,onReverseComplete,onInterrupt`,function(e){return $B+=e+`,`+e+`Params,`});var bH=function(e,t){this.id=jle++,e._gsap=this,this.target=e,this.harness=t,this.get=t?t.get:nV,this.set=t?t.getSetter:PH},xH=function(){function e(e){this.vars=e,this._delay=+e.delay||0,(this._repeat=e.repeat===1/0?-2:e.repeat||0)&&(this._rDelay=e.repeatDelay||0,this._yoyo=!!e.yoyo||!!e.yoyoEase),this._ts=1,MV(this,+e.duration,1,1),this.data=e.data,fB&&(this._ctx=fB,fB.data.push(this)),dH||fH.wake()}var t=e.prototype;return t.delay=function(e){return e||e===0?(this.parent&&this.parent.smoothChildTiming&&this.startTime(this._start+e-this._delay),this._delay=e,this):this._delay},t.duration=function(e){return arguments.length?this.totalDuration(this._repeat>0?e+(e+this._rDelay)*this._repeat:e):this.totalDuration()&&this._dur},t.totalDuration=function(e){return arguments.length?(this._dirty=0,MV(this,this._repeat<0?e:(e-this._repeat*this._rDelay)/(this._repeat+1))):this._tDur},t.totalTime=function(e,t){if(pH(),!arguments.length)return this._tTime;var n=this._dp;if(n&&n.smoothChildTiming&&this._ts){for(EV(this,e),!n._dp||n.parent||DV(n,this);n&&n.parent;)n.parent._time!==n._start+(n._ts>=0?n._tTime/n._ts:(n.totalDuration()-n._tTime)/-n._ts)&&n.totalTime(n._tTime,!0),n=n.parent;!this.parent&&this._dp.autoRemoveChildren&&(this._ts>0&&e<this._tDur||this._ts<0&&e>0||!this._tDur&&!e)&&OV(this._dp,this,this._start-this._delay)}return(this._tTime!==e||!this._dur&&!t||this._initted&&Math.abs(this._zTime)===mB||!this._initted&&this._dur&&e||!e&&!this._initted&&(this.add||this._ptLookup))&&(this._ts||(this._pTime=e),lV(this,e,t)),this},t.time=function(e,t){return arguments.length?this.totalTime(Math.min(this.totalDuration(),e+SV(this))%(this._dur+this._rDelay)||(e?this._dur:0),t):this._time},t.totalProgress=function(e,t){return arguments.length?this.totalTime(this.totalDuration()*e,t):this.totalDuration()?Math.min(1,this._tTime/this._tDur):this.rawTime()>=0&&this._initted?1:0},t.progress=function(e,t){return arguments.length?this.totalTime(this.duration()*(this._yoyo&&!(this.iteration()&1)?1-e:e)+SV(this),t):this.duration()?Math.min(1,this._time/this._dur):+(this.rawTime()>0)},t.iteration=function(e,t){var n=this.duration()+this._rDelay;return arguments.length?this.totalTime(this._time+(e-1)*n,t):this._repeat?CV(this._tTime,n)+1:1},t.timeScale=function(e,t){if(!arguments.length)return this._rts===-mB?0:this._rts;if(this._rts===e)return this;var n=this.parent&&this._ts?wV(this.parent._time,this):this._tTime;return this._rts=+e||0,this._ts=this._ps||e===-mB?0:this._rts,this.totalTime(LV(-Math.abs(this._delay),this.totalDuration(),n),t!==!1),TV(this),Ule(this)},t.paused=function(e){return arguments.length?(this._ps!==e&&(this._ps=e,e?(this._pTime=this._tTime||Math.max(-this._delay,this.rawTime()),this._ts=this._act=0):(pH(),this._ts=this._rts,this.totalTime(this.parent&&!this.parent.smoothChildTiming?this.rawTime():this._tTime||this._pTime,this.progress()===1&&Math.abs(this._zTime)!==mB&&(this._tTime-=mB)))),this):this._ps},t.startTime=function(e){if(arguments.length){this._start=aV(e);var t=this.parent||this._dp;return t&&(t._sort||!this.parent)&&OV(t,this,this._start-this._delay),this}return this._start},t.endTime=function(e){return this._start+(SB(e)?this.totalDuration():this.duration())/Math.abs(this._ts||1)},t.rawTime=function(e){var t=this.parent||this._dp;return t?e&&(!this._ts||this._repeat&&this._time&&this.totalProgress()<1)?this._tTime%(this._dur+this._rDelay):this._ts?wV(t.rawTime(e),this):this._tTime:this._tTime},t.revert=function(e){e===void 0&&(e=zle);var t=dB;return dB=e,cV(this)&&(this.timeline&&this.timeline.revert(e),this.totalTime(-.01,e.suppressEvents)),this.data!==`nested`&&e.kill!==!1&&this.kill(),dB=t,this},t.globalTime=function(e){for(var t=this,n=arguments.length?e:t.rawTime();t;)n=t._start+n/(Math.abs(t._ts)||1),t=t._dp;return!this.parent&&this._sat?this._sat.globalTime(e):n},t.repeat=function(e){return arguments.length?(this._repeat=e===1/0?-2:e,NV(this)):this._repeat===-2?1/0:this._repeat},t.repeatDelay=function(e){if(arguments.length){var t=this._time;return this._rDelay=e,NV(this),t?this.time(t):this}return this._rDelay},t.yoyo=function(e){return arguments.length?(this._yoyo=e,this):this._yoyo},t.seek=function(e,t){return this.totalTime(PV(this,e),SB(t))},t.restart=function(e,t){return this.play().totalTime(e?-this._delay:0,SB(t)),this._dur||(this._zTime=-mB),this},t.play=function(e,t){return e!=null&&this.seek(e,t),this.reversed(!1).paused(!1)},t.reverse=function(e,t){return e!=null&&this.seek(e||this.totalDuration(),t),this.reversed(!0).paused(!1)},t.pause=function(e,t){return e!=null&&this.seek(e,t),this.paused(!0)},t.resume=function(){return this.paused(!1)},t.reversed=function(e){return arguments.length?(!!e!==this.reversed()&&this.timeScale(-this._rts||(e?-mB:0)),this):this._rts<0},t.invalidate=function(){return this._initted=this._act=0,this._zTime=-mB,this},t.isActive=function(){var e=this.parent||this._dp,t=this._start,n;return!!(!e||this._ts&&this._initted&&e.isActive()&&(n=e.rawTime(!0))>=t&&n<this.endTime(!0)-mB)},t.eventCallback=function(e,t,n){var r=this.vars;return arguments.length>1?(t?(r[e]=t,n&&(r[e+`Params`]=n),e===`onUpdate`&&(this._onUpdate=t)):delete r[e],this):r[e]},t.then=function(e){var t=this,n=t._prom;return new Promise(function(r){var i=vB(e)?e:dV,a=function(){var e=t.then;t.then=null,n&&n(),vB(i)&&(i=i(t))&&(i.then||i===t)&&(t.then=e),r(i),t.then=e};t._initted&&t.totalProgress()===1&&t._ts>=0||!t._tTime&&t._ts<0?a():t._prom=a})},t.kill=function(){$V(this)},e}();fV(xH.prototype,{_time:0,_start:0,_end:0,_tTime:0,_tDur:0,_dirty:0,_repeat:0,_yoyo:!1,parent:null,_initted:!1,_rDelay:0,_ts:1,_dp:0,ratio:0,_zTime:-mB,_prom:0,_ps:!1,_rts:1});var SH=function(e){sB(t,e);function t(t,n){var r;return t===void 0&&(t={}),r=e.call(this,t)||this,r.labels={},r.smoothChildTiming=!!t.smoothChildTiming,r.autoRemoveChildren=!!t.autoRemoveChildren,r._sort=SB(t.sortChildren),MB&&OV(t.parent||MB,oB(r),n),t.reversed&&r.reverse(),t.paused&&r.paused(!0),t.scrollTrigger&&kV(oB(r),t.scrollTrigger),r}var n=t.prototype;return n.to=function(e,t,n){return FV(0,arguments,this),this},n.from=function(e,t,n){return FV(1,arguments,this),this},n.fromTo=function(e,t,n,r){return FV(2,arguments,this),this},n.set=function(e,t,n){return t.duration=0,t.parent=this,gV(t).repeatDelay||(t.repeat=0),t.immediateRender=!!t.immediateRender,new jH(e,t,PV(this,n),1),this},n.call=function(e,t,n){return OV(this,jH.delayedCall(0,e,t),n)},n.staggerTo=function(e,t,n,r,i,a,o){return n.duration=t,n.stagger=n.stagger||r,n.onComplete=a,n.onCompleteParams=o,n.parent=this,new jH(e,n,PV(this,i)),this},n.staggerFrom=function(e,t,n,r,i,a,o){return n.runBackwards=1,gV(n).immediateRender=SB(n.immediateRender),this.staggerTo(e,t,n,r,i,a,o)},n.staggerFromTo=function(e,t,n,r,i,a,o,s){return r.startAt=n,gV(r).immediateRender=SB(r.immediateRender),this.staggerTo(e,t,r,i,a,o,s)},n.render=function(e,t,n){var r=this._time,i=this._dirty?this.totalDuration():this._tDur,a=this._dur,o=e<=0?0:aV(e),s=this._zTime<0!=e<0&&(this._initted||!a),c,l,u,d,f,p,m,h,g,_,v,y;if(this!==MB&&o>i&&e>=0&&(o=i),o!==this._tTime||n||s){if(r!==this._time&&a&&(o+=this._time-r,e+=this._time-r),c=o,g=this._start,h=this._ts,p=!h,s&&(a||(r=this._zTime),(e||!t)&&(this._zTime=e)),this._repeat){if(v=this._yoyo,f=a+this._rDelay,this._repeat<-1&&e<0)return this.totalTime(f*100+e,t,n);if(c=aV(o%f),o===i?(d=this._repeat,c=a):(_=aV(o/f),d=~~_,d&&d===_&&(c=a,d--),c>a&&(c=a)),_=CV(this._tTime,f),!r&&this._tTime&&_!==d&&this._tTime-_*f-this._dur<=0&&(_=d),v&&d&1&&(c=a-c,y=1),d!==_&&!this._lock){var b=v&&_&1,x=b===(v&&d&1);if(d<_&&(b=!b),r=b?0:o%a?a:o,this._lock=1,this.render(r||(y?0:aV(d*f)),t,!a)._lock=0,this._tTime=o,!t&&this.parent&&QV(this,`onRepeat`),this.vars.repeatRefresh&&!y&&(this.invalidate()._lock=1,_=d),r&&r!==this._time||p!==!this._ts||this.vars.onRepeat&&!this.parent&&!this._act||(a=this._dur,i=this._tDur,x&&(this._lock=2,r=b?a:-1e-4,this.render(r,!0),this.vars.repeatRefresh&&!y&&this.invalidate()),this._lock=0,!this._ts&&!p))return this}}if(this._hasPause&&!this._forcing&&this._lock<2&&(m=qle(this,aV(r),aV(c)),m&&(o-=c-(c=m._start))),this._tTime=o,this._time=c,this._act=!!h,this._initted||(this._onUpdate=this.vars.onUpdate,this._initted=1,this._zTime=e,r=0),!r&&o&&a&&!t&&!_&&(QV(this,`onStart`),this._tTime!==o))return this;if(c>=r&&e>=0)for(l=this._first;l;){if(u=l._next,(l._act||c>=l._start)&&l._ts&&m!==l){if(l.parent!==this)return this.render(e,t,n);if(l.render(l._ts>0?(c-l._start)*l._ts:(l._dirty?l.totalDuration():l._tDur)+(c-l._start)*l._ts,t,n),c!==this._time||!this._ts&&!p){m=0,u&&(o+=this._zTime=-mB);break}}l=u}else{l=this._last;for(var S=e<0?e:c;l;){if(u=l._prev,(l._act||S<=l._end)&&l._ts&&m!==l){if(l.parent!==this)return this.render(e,t,n);if(l.render(l._ts>0?(S-l._start)*l._ts:(l._dirty?l.totalDuration():l._tDur)+(S-l._start)*l._ts,t,n||dB&&cV(l)),c!==this._time||!this._ts&&!p){m=0,u&&(o+=this._zTime=S?-mB:mB);break}}l=u}}if(m&&!t&&(this.pause(),m.render(c>=r?0:-mB)._zTime=c>=r?1:-1,this._ts))return this._start=g,TV(this),this.render(e,t,n);this._onUpdate&&!t&&QV(this,`onUpdate`,!0),(o===i&&this._tTime>=this.totalDuration()||!o&&r)&&(g===this._start||Math.abs(h)!==Math.abs(this._ts))&&(this._lock||((e||!a)&&(o===i&&this._ts>0||!o&&this._ts<0)&&yV(this,1),!t&&!(e<0&&!r)&&(o||r||!i)&&(QV(this,o===i&&e>=0?`onComplete`:`onReverseComplete`,!0),this._prom&&!(o<i&&this.timeScale()>0)&&this._prom())))}return this},n.add=function(e,t){var n=this;if(yB(t)||(t=PV(this,t,e)),!(e instanceof xH)){if(EB(e))return e.forEach(function(e){return n.add(e,t)}),this;if(_B(e))return this.addLabel(e,t);if(vB(e))e=jH.delayedCall(0,e);else return this}return this===e?this:OV(this,e,t)},n.getChildren=function(e,t,n,r){e===void 0&&(e=!0),t===void 0&&(t=!0),n===void 0&&(n=!0),r===void 0&&(r=-pB);for(var i=[],a=this._first;a;)a._start>=r&&(a instanceof jH?t&&i.push(a):(n&&i.push(a),e&&i.push.apply(i,a.getChildren(!0,t,n)))),a=a._next;return i},n.getById=function(e){for(var t=this.getChildren(1,1,1),n=t.length;n--;)if(t[n].vars.id===e)return t[n]},n.remove=function(e){return _B(e)?this.removeLabel(e):vB(e)?this.killTweensOf(e):(e.parent===this&&vV(this,e),e===this._recent&&(this._recent=this._last),bV(this))},n.totalTime=function(t,n){return arguments.length?(this._forcing=1,!this._dp&&this._ts&&(this._start=aV(fH.time-(this._ts>0?t/this._ts:(this.totalDuration()-t)/-this._ts))),e.prototype.totalTime.call(this,t,n),this._forcing=0,this):this._tTime},n.addLabel=function(e,t){return this.labels[e]=PV(this,t),this},n.removeLabel=function(e){return delete this.labels[e],this},n.addPause=function(e,t,n){var r=jH.delayedCall(0,t||UB,n);return r.data=`isPause`,this._hasPause=1,OV(this,r,PV(this,e))},n.removePause=function(e){var t=this._first;for(e=PV(this,e);t;)t._start===e&&t.data===`isPause`&&yV(t),t=t._next},n.killTweensOf=function(e,t,n){for(var r=this.getTweensOf(e,n),i=r.length;i--;)TH!==r[i]&&r[i].kill(e,t);return this},n.getTweensOf=function(e,t){for(var n=[],r=VV(e),i=this._first,a=yB(t),o;i;)i instanceof jH?Ble(i._targets,r)&&(a?(!TH||i._initted&&i._ts)&&i.globalTime(0)<=t&&i.globalTime(i.totalDuration())>t:!t||i.isActive())&&n.push(i):(o=i.getTweensOf(r,t)).length&&n.push.apply(n,o),i=i._next;return n},n.tweenTo=function(e,t){t||={};var n=this,r=PV(n,e),i=t,a=i.startAt,o=i.onStart,s=i.onStartParams,c=i.immediateRender,l,u=jH.to(n,fV({ease:t.ease||`none`,lazy:!1,immediateRender:!1,time:r,overwrite:`auto`,duration:t.duration||Math.abs((r-(a&&`time`in a?a.time:n._time))/n.timeScale())||mB,onStart:function(){if(n.pause(),!l){var e=t.duration||Math.abs((r-(a&&`time`in a?a.time:n._time))/n.timeScale());u._dur!==e&&MV(u,e,0,1).render(u._time,!0,!0),l=1}o&&o.apply(u,s||[])}},t));return c?u.render(0):u},n.tweenFromTo=function(e,t,n){return this.tweenTo(t,fV({startAt:{time:PV(this,e)}},n))},n.recent=function(){return this._recent},n.nextLabel=function(e){return e===void 0&&(e=this._time),ZV(this,PV(this,e))},n.previousLabel=function(e){return e===void 0&&(e=this._time),ZV(this,PV(this,e),1)},n.currentLabel=function(e){return arguments.length?this.seek(e,!0):this.previousLabel(this._time+mB)},n.shiftChildren=function(e,t,n){n===void 0&&(n=0);var r=this._first,i=this.labels,a;for(e=aV(e);r;)r._start>=n&&(r._start+=e,r._end+=e),r=r._next;if(t)for(a in i)i[a]>=n&&(i[a]+=e);return bV(this)},n.invalidate=function(t){var n=this._first;for(this._lock=0;n;)n.invalidate(t),n=n._next;return e.prototype.invalidate.call(this,t)},n.clear=function(e){e===void 0&&(e=!0);for(var t=this._first,n;t;)n=t._next,this.remove(t),t=n;return this._dp&&(this._time=this._tTime=this._pTime=0),e&&(this.labels={}),bV(this)},n.totalDuration=function(e){var t=0,n=this,r=n._last,i=pB,a,o,s;if(arguments.length)return n.timeScale((n._repeat<0?n.duration():n.totalDuration())/(n.reversed()?-e:e));if(n._dirty){for(s=n.parent;r;)a=r._prev,r._dirty&&r.totalDuration(),o=r._start,o>i&&n._sort&&r._ts&&!n._lock?(n._lock=1,OV(n,r,o-r._delay,1)._lock=0):i=o,o<0&&r._ts&&(t-=o,(!s&&!n._dp||s&&s.smoothChildTiming)&&(n._start+=aV(o/n._ts),n._time-=o,n._tTime-=o),n.shiftChildren(-o,!1,-1/0),i=0),r._end>t&&r._ts&&(t=r._end),r=a;MV(n,n===MB&&n._time>t?n._time:t,1,1),n._dirty=0}return n._tDur},t.updateRoot=function(e){if(MB._ts&&(lV(MB,wV(e,MB)),JB=fH.frame),fH.frame>=ZB){ZB+=cB.autoSleep||120;var t=MB._first;if((!t||!t._ts)&&cB.autoSleep&&fH._listeners.length<2){for(;t&&!t._ts;)t=t._next;t||fH.sleep()}}},t}(xH);fV(SH.prototype,{_lock:0,_hasPause:0,_forcing:0});var uue=function(e,t,n,r,i,a,o){var s=new zH(this._pt,e,t,0,1,IH,null,i),c=0,l=0,u,d,f,p,m,h,g,_;for(s.b=n,s.e=r,n+=``,r+=``,(g=~r.indexOf(`random(`))&&(r=YV(r)),a&&(_=[n,r],a(_,e,t),n=_[0],r=_[1]),d=n.match(AB)||[];u=AB.exec(r);)p=u[0],m=r.substring(c,u.index),f?f=(f+1)%5:m.substr(-5)===`rgba(`&&(f=1),p!==d[l++]&&(h=parseFloat(d[l-1])||0,s._pt={_next:s._pt,p:m||l===1?m:`,`,s:h,c:p.charAt(1)===`=`?oV(h,p)-h:parseFloat(p)-h,m:f&&f<4?Math.round:0},c=AB.lastIndex);return s.c=c<r.length?r.substring(c,r.length):``,s.fp=o,(jB.test(r)||g)&&(s.e=0),this._pt=s,s},CH=function(e,t,n,r,i,a,o,s,c,l){vB(r)&&(r=r(i||0,e,a));var u=e[t],d=n===`get`?vB(u)?c?e[t.indexOf(`set`)||!vB(e[`get`+t.substr(3)])?t:`get`+t.substr(3)](c):e[t]():u:n,f=vB(u)?c?hue:NH:MH,p;if(_B(r)&&(~r.indexOf(`random(`)&&(r=YV(r)),r.charAt(1)===`=`&&(p=oV(d,r)+(RV(d)||0),(p||p===0)&&(r=p))),!l||d!==r||EH)return!isNaN(d*r)&&r!==``?(p=new zH(this._pt,e,t,+d||0,r-(d||0),typeof u==`boolean`?_ue:FH,0,f),c&&(p.fp=c),o&&p.modifier(o,this,e),this._pt=p):(!u&&!(t in e)&&BB(t,r),uue.call(this,e,t,d,r,f,s||cB.stringFilter,c))},due=function(e,t,n,r,i){if(vB(e)&&(e=OH(e,i,t,n,r)),!xB(e)||e.style&&e.nodeType||EB(e)||TB(e))return _B(e)?OH(e,i,t,n,r):e;var a={},o;for(o in e)a[o]=OH(e[o],i,t,n,r);return a},wH=function(e,t,n,r,i,a){var o,s,c,l;if(YB[e]&&(o=new YB[e]).init(i,o.rawVars?t[e]:due(t[e],r,i,a,n),n,r,a)!==!1&&(n._pt=s=new zH(n._pt,i,e,0,1,o.render,o,0,o.priority),n!==eH))for(c=n._ptLookup[n._targets.indexOf(i)],l=o._props.length;l--;)c[o._props[l]]=s;return o},TH,EH,DH=function e(t,n,r){var i=t.vars,a=i.ease,o=i.startAt,s=i.immediateRender,c=i.lazy,l=i.onUpdate,u=i.runBackwards,d=i.yoyoEase,f=i.keyframes,p=i.autoRevert,m=t._dur,h=t._startAt,g=t._targets,_=t.parent,v=_&&_.data===`nested`?_.vars.targets:g,y=t._overwrite===`auto`&&!uB,b=t.timeline,x=i.easeReverse||d,S,C,w,T,E,D,O,k,A,j,M,N,P;if(b&&(!f||!a)&&(a=`none`),t._ease=hH(a,lB.ease),t._rEase=x&&(hH(x)||t._ease),t._from=!b&&!!i.runBackwards,t._from&&(t.ratio=1),!b||f&&!i.stagger){if(k=g[0]?tV(g[0]).harness:0,N=k&&i[k.prop],S=hV(i,GB),h&&(h._zTime<0&&h.progress(1),n<0&&u&&s&&!p?h.render(-1,!0):h.revert(u&&m?WB:Rle),h._lazy=0),o){if(yV(t._startAt=jH.set(g,fV({data:`isStart`,overwrite:!1,parent:_,immediateRender:!0,lazy:!h&&SB(c),startAt:null,delay:0,onUpdate:l&&function(){return QV(t,`onUpdate`)},stagger:0},o))),t._startAt._dp=0,t._startAt._sat=t,n<0&&(dB||!s&&!p)&&t._startAt.revert(WB),s&&m&&n<=0&&r<=0){n&&(t._zTime=n);return}}else if(u&&m&&!h){if(n&&(s=!1),w=fV({overwrite:!1,data:`isFromStart`,lazy:s&&!h&&SB(c),immediateRender:s,stagger:0,parent:_},S),N&&(w[k.prop]=N),yV(t._startAt=jH.set(g,w)),t._startAt._dp=0,t._startAt._sat=t,n<0&&(dB?t._startAt.revert(WB):t._startAt.render(-1,!0)),t._zTime=n,!s)e(t._startAt,mB,mB);else if(!n)return}for(t._pt=t._ptCache=0,c=m&&SB(c)||c&&!m,C=0;C<g.length;C++){if(E=g[C],O=E._gsap||eV(g)[C]._gsap,t._ptLookup[C]=j={},qB[O.id]&&KB.length&&sV(),M=v===g?C:v.indexOf(E),k&&(A=new k).init(E,N||S,t,M,v)!==!1&&(t._pt=T=new zH(t._pt,E,A.name,0,1,A.render,A,0,A.priority),A._props.forEach(function(e){j[e]=T}),A.priority&&(D=1)),!k||N)for(w in S)YB[w]&&(A=wH(w,S,t,M,E,v))?A.priority&&(D=1):j[w]=T=CH.call(t,E,w,`get`,S[w],M,v,0,i.stringFilter);t._op&&t._op[C]&&t.kill(E,t._op[C]),y&&t._pt&&(TH=t,MB.killTweensOf(E,j,t.globalTime(n)),P=!t.parent,TH=0),t._pt&&c&&(qB[O.id]=1)}D&&RH(t),t._onInit&&t._onInit(t)}t._onUpdate=l,t._initted=(!t._op||t._pt)&&!P,f&&n<=0&&b.render(pB,!0,!0)},fue=function(e,t,n,r,i,a,o,s){var c=(e._pt&&e._ptCache||(e._ptCache={}))[t],l,u,d,f;if(!c)for(c=e._ptCache[t]=[],d=e._ptLookup,f=e._targets.length;f--;){if(l=d[f][t],l&&l.d&&l.d._pt)for(l=l.d._pt;l&&l.p!==t&&l.fp!==t;)l=l._next;if(!l)return EH=1,e.vars[t]=`+=0`,DH(e,o),EH=0,s?VB(t+` not eligible for reset. Try splitting into individual properties`):1;c.push(l)}for(f=c.length;f--;)u=c[f],l=u._pt||u,l.s=(r||r===0)&&!i?r:l.s+(r||0)+a*l.c,l.c=n-l.s,u.e&&=iV(n)+RV(u.e),u.b&&=l.s+RV(u.b)},pue=function(e,t){var n=e[0]?tV(e[0]).harness:0,r=n&&n.aliases,i,a,o,s;if(!r)return t;for(a in i=pV({},t),r)if(a in i)for(s=r[a].split(`,`),o=s.length;o--;)i[s[o]]=i[a];return i},mue=function(e,t,n,r){var i=t.ease||r||`power1.inOut`,a,o;if(EB(t))o=n[e]||(n[e]=[]),t.forEach(function(e,n){return o.push({t:n/(t.length-1)*100,v:e,e:i})});else for(a in t)o=n[a]||(n[a]=[]),a===`ease`||o.push({t:parseFloat(e),v:t[a],e:i})},OH=function(e,t,n,r,i){return vB(e)?e.call(t,n,r,i):_B(e)&&~e.indexOf(`random(`)?YV(e):e},kH=$B+`repeat,repeatDelay,yoyo,repeatRefresh,yoyoEase,easeReverse,autoRevert`,AH={};rV(kH+`,id,stagger,delay,duration,paused,scrollTrigger`,function(e){return AH[e]=1});var jH=function(e){sB(t,e);function t(t,n,r,i){var a;typeof n==`number`&&(r.duration=n,n=r,r=null),a=e.call(this,i?n:gV(n))||this;var o=a.vars,s=o.duration,c=o.delay,l=o.immediateRender,u=o.stagger,d=o.overwrite,f=o.keyframes,p=o.defaults,m=o.scrollTrigger,h=n.parent||MB,g=(EB(t)||TB(t)?yB(t[0]):`length`in n)?[t]:VV(t),_,v,y,b,x,S,C,w;if(a._targets=g.length?eV(g):VB(`GSAP target `+t+` not found. https://gsap.com`,!cB.nullTargetWarn)||[],a._ptLookup=[],a._overwrite=d,f||u||wB(s)||wB(c)){n=a.vars;var T=n.easeReverse||n.yoyoEase;if(_=a.timeline=new SH({data:`nested`,defaults:p||{},targets:h&&h.data===`nested`?h.vars.targets:g}),_.kill(),_.parent=_._dp=oB(a),_._start=0,u||wB(s)||wB(c)){if(b=g.length,C=u&&WV(u),xB(u))for(x in u)~kH.indexOf(x)&&(w||={},w[x]=u[x]);for(v=0;v<b;v++)y=hV(n,AH),y.stagger=0,T&&(y.easeReverse=T),w&&pV(y,w),S=g[v],y.duration=+OH(s,oB(a),v,S,g),y.delay=(+OH(c,oB(a),v,S,g)||0)-a._delay,!u&&b===1&&y.delay&&(a._delay=c=y.delay,a._start+=c,y.delay=0),_.to(S,y,C?C(v,S,g):0),_._ease=mH.none;_.duration()?s=c=0:a.timeline=0}else if(f){gV(fV(_.vars.defaults,{ease:`none`})),_._ease=hH(f.ease||n.ease||`none`);var E=0,D,O,k;if(EB(f))f.forEach(function(e){return _.to(g,e,`>`)}),_.duration();else{for(x in y={},f)x===`ease`||x===`easeEach`||mue(x,f[x],y,f.easeEach);for(x in y)for(D=y[x].sort(function(e,t){return e.t-t.t}),E=0,v=0;v<D.length;v++)O=D[v],k={ease:O.e,duration:(O.t-(v?D[v-1].t:0))/100*s},k[x]=O.v,_.to(g,k,E),E+=k.duration;_.duration()<s&&_.to({},{duration:s-_.duration()})}}s||a.duration(s=_.duration())}else a.timeline=0;return d===!0&&!uB&&(TH=oB(a),MB.killTweensOf(g),TH=0),OV(h,oB(a),r),n.reversed&&a.reverse(),n.paused&&a.paused(!0),(l||!s&&!f&&a._start===aV(h._time)&&SB(l)&&Wle(oB(a))&&h.data!==`nested`)&&(a._tTime=-mB,a.render(Math.max(0,-c)||0)),m&&kV(oB(a),m),a}var n=t.prototype;return n.render=function(e,t,n){var r=this._time,i=this._tDur,a=this._dur,o=e<0,s=e>i-mB&&!o?i:e<mB?0:e,c,l,u,d,f,p,m,h;if(!a)Kle(this,e,t,n);else if(s!==this._tTime||!e||n||!this._initted&&this._tTime||this._startAt&&this._zTime<0!==o||this._lazy){if(c=s,h=this.timeline,this._repeat){if(d=a+this._rDelay,this._repeat<-1&&o)return this.totalTime(d*100+e,t,n);if(c=aV(s%d),s===i?(u=this._repeat,c=a):(f=aV(s/d),u=~~f,u&&u===f?(c=a,u--):c>a&&(c=a)),p=this._yoyo&&u&1,p&&(c=a-c),f=CV(this._tTime,d),c===r&&!n&&this._initted&&u===f)return this._tTime=s,this;u!==f&&this.vars.repeatRefresh&&!p&&!this._lock&&c!==d&&this._initted&&(this._lock=n=1,this.render(aV(d*u),!0).invalidate()._lock=0)}if(!this._initted){if(AV(this,o?e:c,n,t,s))return this._tTime=0,this;if(r!==this._time&&!(n&&this.vars.repeatRefresh&&u!==f))return this;if(a!==this._dur)return this.render(e,t,n)}if(this._rEase){var g=c<r;if(g!==this._inv){var _=g?r:a-r;this._inv=g,this._from&&(this.ratio=1-this.ratio),this._invRatio=this.ratio,this._invTime=r,this._invRecip=_?(g?-1:1)/_:0,this._invScale=g?-this.ratio:1-this.ratio,this._invEase=g?this._rEase:this._ease}this.ratio=m=this._invRatio+this._invScale*this._invEase((c-this._invTime)*this._invRecip)}else this.ratio=m=this._ease(c/a);if(this._from&&(this.ratio=m=1-m),this._tTime=s,this._time=c,!this._act&&this._ts&&(this._act=1,this._lazy=0),!r&&s&&!t&&!f&&(QV(this,`onStart`),this._tTime!==s))return this;for(l=this._pt;l;)l.r(m,l.d),l=l._next;h&&h.render(e<0?e:h._dur*h._ease(c/this._dur),t,n)||this._startAt&&(this._zTime=e),this._onUpdate&&!t&&(o&&xV(this,e,t,n),QV(this,`onUpdate`)),this._repeat&&u!==f&&this.vars.onRepeat&&!t&&this.parent&&QV(this,`onRepeat`),(s===this._tDur||!s)&&this._tTime===s&&(o&&!this._onUpdate&&xV(this,e,!0,!0),(e||!a)&&(s===this._tDur&&this._ts>0||!s&&this._ts<0)&&yV(this,1),!t&&!(o&&!r)&&(s||r||p)&&(QV(this,s===i?`onComplete`:`onReverseComplete`,!0),this._prom&&!(s<i&&this.timeScale()>0)&&this._prom()))}return this},n.targets=function(){return this._targets},n.invalidate=function(t){return(!t||!this.vars.runBackwards)&&(this._startAt=0),this._pt=this._op=this._onUpdate=this._lazy=this.ratio=0,this._ptLookup=[],this.timeline&&this.timeline.invalidate(t),e.prototype.invalidate.call(this,t)},n.resetTo=function(e,t,n,r,i){dH||fH.wake(),this._ts||this.play();
vendor: 5,084 bytes, line 36
36var a=Math.min(this._dur,(this._dp._time-this._start)*this._ts),o;return this._initted||DH(this,a),o=this._ease(a/this._dur),fue(this,e,t,n,r,o,a,i)?this.resetTo(e,t,n,r,1):(EV(this,0),this.parent||_V(this._dp,this,`_first`,`_last`,this._dp._sort?`_start`:0),this.render(0))},n.kill=function(e,t){if(t===void 0&&(t=`all`),!e&&(!t||t===`all`))return this._lazy=this._pt=0,this.parent?$V(this):this.scrollTrigger&&this.scrollTrigger.kill(!!dB),this;if(this.timeline){var n=this.timeline.totalDuration();return this.timeline.killTweensOf(e,t,TH&&TH.vars.overwrite!==!0)._first||$V(this),this.parent&&n!==this.timeline.totalDuration()&&MV(this,this._dur*this.timeline._tDur/n,0,1),this}var r=this._targets,i=e?VV(e):r,a=this._ptLookup,o=this._pt,s,c,l,u,d,f,p;if((!t||t===`all`)&&Hle(r,i))return t===`all`&&(this._pt=0),$V(this);for(s=this._op=this._op||[],t!==`all`&&(_B(t)&&(d={},rV(t,function(e){return d[e]=1}),t=d),t=pue(r,t)),p=r.length;p--;)if(~i.indexOf(r[p]))for(d in c=a[p],t===`all`?(s[p]=t,u=c,l={}):(l=s[p]=s[p]||{},u=t),u)f=c&&c[d],f&&((!(`kill`in f.d)||f.d.kill(d)===!0)&&vV(this,f,`_pt`),delete c[d]),l!==`all`&&(l[d]=1);return this._initted&&!this._pt&&o&&$V(this),this},t.to=function(e,n){return new t(e,n,arguments[2])},t.from=function(e,t){return FV(1,arguments)},t.delayedCall=function(e,n,r,i){return new t(n,0,{immediateRender:!1,lazy:!1,overwrite:!1,delay:e,onComplete:n,onReverseComplete:n,onCompleteParams:r,onReverseCompleteParams:r,callbackScope:i})},t.fromTo=function(e,t,n){return FV(2,arguments)},t.set=function(e,n){return n.duration=0,n.repeatDelay||(n.repeat=0),new t(e,n)},t.killTweensOf=function(e,t,n){return MB.killTweensOf(e,t,n)},t}(xH);fV(jH.prototype,{_targets:[],_lazy:0,_startAt:0,_op:0,_onInit:0}),rV(`staggerTo,staggerFrom,staggerFromTo`,function(e){jH[e]=function(){var t=new SH,n=zV.call(arguments,0);return n.splice(e===`staggerFromTo`?5:4,0,0),t[e].apply(t,n)}});var MH=function(e,t,n){return e[t]=n},NH=function(e,t,n){return e[t](n)},hue=function(e,t,n,r){return e[t](r.fp,n)},gue=function(e,t,n){return e.setAttribute(t,n)},PH=function(e,t){return vB(e[t])?NH:bB(e[t])&&e.setAttribute?gue:MH},FH=function(e,t){return t.set(t.t,t.p,Math.round((t.s+t.c*e)*1e6)/1e6,t)},_ue=function(e,t){return t.set(t.t,t.p,!!(t.s+t.c*e),t)},IH=function(e,t){var n=t._pt,r=``;if(!e&&t.b)r=t.b;else if(e===1&&t.e)r=t.e;else{for(;n;)r=n.p+(n.m?n.m(n.s+n.c*e):Math.round((n.s+n.c*e)*1e4)/1e4)+r,n=n._next;r+=t.c}t.set(t.t,t.p,r,t)},LH=function(e,t){for(var n=t._pt;n;)n.r(e,n.d),n=n._next},vue=function(e,t,n,r){for(var i=this._pt,a;i;)a=i._next,i.p===r&&i.modifier(e,t,n),i=a},yue=function(e){for(var t=this._pt,n,r;t;)r=t._next,t.p===e&&!t.op||t.op===e?vV(this,t,`_pt`):t.dep||(n=1),t=r;return!n},bue=function(e,t,n,r){r.mSet(e,t,r.m.call(r.tween,n,r.mt),r)},RH=function(e){for(var t=e._pt,n,r,i,a;t;){for(n=t._next,r=i;r&&r.pr>t.pr;)r=r._next;(t._prev=r?r._prev:a)?t._prev._next=t:i=t,(t._next=r)?r._prev=t:a=t,t=n}e._pt=i},zH=function(){function e(e,t,n,r,i,a,o,s,c){this.t=t,this.s=r,this.c=i,this.p=n,this.r=a||FH,this.d=o||this,this.set=s||MH,this.pr=c||0,this._next=e,e&&(e._prev=this)}var t=e.prototype;return t.modifier=function(e,t,n){this.mSet=this.mSet||this.set,this.set=bue,this.m=e,this.mt=n,this.tween=t},e}();rV($B+`parent,duration,ease,delay,overwrite,runBackwards,startAt,yoyo,immediateRender,repeat,repeatDelay,data,paused,reversed,lazy,callbackScope,stringFilter,id,yoyoEase,stagger,inherit,repeatRefresh,keyframes,autoRevert,scrollTrigger,easeReverse`,function(e){return GB[e]=1}),IB.TweenMax=IB.TweenLite=jH,IB.TimelineLite=IB.TimelineMax=SH,MB=new SH({sortChildren:!1,defaults:lB,autoRemoveChildren:!0,id:`root`,smoothChildTiming:!0}),cB.stringFilter=uH;var BH=[],VH={},xue=[],HH=0,Sue=0,UH=function(e){return(VH[e]||xue).map(function(e){return e()})},WH=function(){var e=Date.now(),t=[];e-HH>2&&(UH(`matchMediaInit`),BH.forEach(function(e){var n=e.queries,r=e.conditions,i,a,o,s;for(a in n)i=NB.matchMedia(n[a]).matches,i&&(o=1),i!==r[a]&&(r[a]=i,s=1);s&&(e.revert(),o&&t.push(e))}),UH(`matchMediaRevert`),t.forEach(function(e){return e.onMatch(e,function(t){return e.add(null,t)})}),HH=e,UH(`matchMedia`))},GH=function(){function e(e,t){this.selector=t&&HV(t),this.data=[],this._r=[],this.isReverted=!1,this.id=Sue++,e&&this.add(e)}var t=e.prototype;return t.add=function(e,t,n){vB(e)&&(n=t,t=e,e=vB);var r=this,i=function(){var e=fB,i=r.selector,a;return e&&e!==r&&e.data.push(r),n&&(r.selector=HV(n)),fB=r,a=t.apply(r,arguments),vB(a)&&r._r.push(a),fB=e,r.selector=i,r.isReverted=!1,a};return r.last=i,e===vB?i(r,function(e){return r.add(null,e)}):e?r[e]=i:i},t.ignore=function(e){var t=fB;fB=null,e(this),fB=t},t.getTweens=function(){var t=[];return this.data.forEach(function(n){return n instanceof e?t.push.apply(t,n.getTweens()):n instanceof jH&&!(n.parent&&n.parent.data===`nested`)&&t.push(n)}),t},t.clear=function(){this._r.length=this.data.length=0},t.kill=function(e,t){var n=this;if(e?(function(){for(var t=n.getTweens(),r=n.data.length,i;r--;)i=n.data[r],i.data===`isFlip`&&(i.revert(),i.getChildren(!0,!0,!1).forEac
36h(function(e){return t.splice(t.indexOf(e),1)}));for(t.map(function(e){return{g:e._dur||e._delay||e._sat&&!e._sat.vars.immediateRender?e.globalTime(0):-1/0,t:e}}).sort(function(e,t){return t.g-e.g||-1/0}).forEach(function(t){return t.t.revert(e)}),r=n.data.length;r--;)i=n.data[r],i instanceof SH?i.data!==`nested`&&(i.scrollTrigger&&i.scrollTrigger.revert(),i.kill()):!(i instanceof jH)&&i.revert&&i.revert(e);n._r.forEach(function(t){return t(e,n)}),n.isReverted=!0})():this.data.forEach(function(e){return e.kill&&e.kill()}),this.clear(),t)for(var r=BH.length;r--;)BH[r].id===this.id&&BH.splice(r,1)},t.revert=function(e){this.kill(e||{})},e}(),Cue=function(){function e(e){this.contexts=[],this.scope=e,fB&&fB.data.push(this)}var t=e.prototype;return t.add=function(e,t,n){xB(e)||(e={matches:e});var r=new GH(0,n||this.scope),i=r.conditions={},a,o,s;for(o in fB&&!r.selector&&(r.selector=fB.selector),this.contexts.push(r),t=r.add(`onMatch`,t),r.queries=e,e)o===`all`?s=1:(a=NB.matchMedia(e[o]),a&&(BH.indexOf(r)<0&&BH.push(r),(i[o]=a.matches)&&(s=1),a.addListener?a.addListener(WH):a.addEventListener(`change`,WH)));return s&&t(r,function(e){return r.add(null,e)}),this},t.revert=function(e){this.kill(e||{})}
vendor: 8,184 bytes, line 36
36,t.kill=function(e){this.contexts.forEach(function(t){return t.kill(e,!0)})},e}(),KH={registerPlugin:function(){[...arguments].forEach(function(e){return nH(e)})},timeline:function(e){return new SH(e)},getTweensOf:function(e,t){return MB.getTweensOf(e,t)},getProperty:function(e,t,n,r){_B(e)&&(e=VV(e)[0]);var i=tV(e||{}).get,a=n?dV:uV;return n===`native`&&(n=``),e&&(t?a((YB[t]&&YB[t].get||i)(e,t,n,r)):function(t,n,r){return a((YB[t]&&YB[t].get||i)(e,t,n,r))})},quickSetter:function(e,t,n){if(e=VV(e),e.length>1){var r=e.map(function(e){return JH.quickSetter(e,t,n)}),i=r.length;return function(e){for(var t=i;t--;)r[t](e)}}e=e[0]||{};var a=YB[t],o=tV(e),s=o.harness&&(o.harness.aliases||{})[t]||t,c=a?function(t){var r=new a;eH._pt=0,r.init(e,n?t+n:t,eH,0,[e]),r.render(1,r),eH._pt&&LH(1,eH)}:o.set(e,s);return a?c:function(t){return c(e,s,n?t+n:t,o,1)}},quickTo:function(e,t,n){var r,i=JH.to(e,fV((r={},r[t]=`+=0.1`,r.paused=!0,r.stagger=0,r),n||{})),a=function(e,n,r){return i.resetTo(t,e,n,r)};return a.tween=i,a},isTweening:function(e){return MB.getTweensOf(e,!0).length>0},defaults:function(e){return e&&e.ease&&(e.ease=hH(e.ease,lB.ease)),mV(lB,e||{})},config:function(e){return mV(cB,e||{})},registerEffect:function(e){var t=e.name,n=e.effect,r=e.plugins,i=e.defaults,a=e.extendTimeline;(r||``).split(`,`).forEach(function(e){return e&&!YB[e]&&!IB[e]&&VB(t+` effect requires `+e+` plugin.`)}),XB[t]=function(e,t,r){return n(VV(e),fV(t||{},i),r)},a&&(SH.prototype[t]=function(e,n,r){return this.add(XB[t](e,xB(n)?n:(r=n)&&{},this),r)})},registerEase:function(e,t){mH[e]=hH(t)},parseEase:function(e,t){return arguments.length?hH(e,t):mH},getById:function(e){return MB.getById(e)},exportRoot:function(e,t){e===void 0&&(e={});var n=new SH(e),r,i;for(n.smoothChildTiming=SB(e.smoothChildTiming),MB.remove(n),n._dp=0,n._time=n._tTime=MB._time,r=MB._first;r;)i=r._next,(t||!(!r._dur&&r instanceof jH&&r.vars.onComplete===r._targets[0]))&&OV(n,r,r._start-r._delay),r=i;return OV(MB,n,0),n},context:function(e,t){return e?new GH(e,t):fB},matchMedia:function(e){return new Cue(e)},matchMediaRefresh:function(){return BH.forEach(function(e){var t=e.conditions,n,r;for(r in t)t[r]&&(t[r]=!1,n=1);n&&e.revert()})||WH()},addEventListener:function(e,t){var n=VH[e]||(VH[e]=[]);~n.indexOf(t)||n.push(t)},removeEventListener:function(e,t){var n=VH[e],r=n&&n.indexOf(t);r>=0&&n.splice(r,1)},utils:{wrap:eue,wrapYoyo:tue,distribute:WV,random:qV,snap:KV,normalize:$le,getUnit:RV,clamp:Yle,splitColor:oH,toArray:VV,selector:HV,mapRange:XV,pipe:Zle,unitize:Qle,interpolate:nue,shuffle:UV},install:zB,effects:XB,ticker:fH,updateRoot:SH.updateRoot,plugins:YB,globalTimeline:MB,core:{PropTween:zH,globals:HB,Tween:jH,Timeline:SH,Animation:xH,getCache:tV,_removeLinkedListItem:vV,reverting:function(){return dB},context:function(e){return e&&fB&&(fB.data.push(e),e._ctx=fB),fB},suppressOverwrites:function(e){return uB=e}}};rV(`to,from,fromTo,delayedCall,set,killTweensOf`,function(e){return KH[e]=jH[e]}),fH.add(SH.updateRoot),eH=KH.to({},{duration:0});var wue=function(e,t){for(var n=e._pt;n&&n.p!==t&&n.op!==t&&n.fp!==t;)n=n._next;return n},Tue=function(e,t){var n=e._targets,r,i,a;for(r in t)for(i=n.length;i--;)a=e._ptLookup[i][r],(a&&=a.d)&&(a._pt&&(a=wue(a,r)),a&&a.modifier&&a.modifier(t[r],e,n[i],r))},qH=function(e,t){return{name:e,headless:1,rawVars:1,init:function(e,n,r){r._onInit=function(e){var r,i;if(_B(n)&&(r={},rV(n,function(e){return r[e]=1}),n=r),t){for(i in r={},n)r[i]=t(n[i]);n=r}Tue(e,n)}}}},JH=KH.registerPlugin({name:`attr`,init:function(e,t,n,r,i){var a,o,s;for(a in this.tween=n,t)s=e.getAttribute(a)||``,o=this.add(e,`setAttribute`,(s||0)+``,t[a],r,i,0,0,a),o.op=a,o.b=s,this._props.push(a)},render:function(e,t){for(var n=t._pt;n;)dB?n.set(n.t,n.p,n.b,n):n.r(e,n.d),n=n._next}},{name:`endArray`,headless:1,init:function(e,t){for(var n=t.length;n--;)this.add(e,n,e[n]||0,t[n],0,0,0,0,0,1)}},qH(`roundProps`,GV),qH(`modifiers`),qH(`snap`,KV))||KH;jH.version=SH.version=JH.version=`3.15.0`,RB=1,CB()&&pH(),mH.Power0,mH.Power1,mH.Power2,mH.Power3,mH.Power4,mH.Linear,mH.Quad,mH.Cubic,mH.Quart,mH.Quint,mH.Strong,mH.Elastic,mH.Back,mH.SteppedEase,mH.Bounce,mH.Sine,mH.Expo,mH.Circ;var YH,XH,ZH,QH,$H,eU,tU,Eue=function(){return typeof window<`u`},nU={},rU=180/Math.PI,iU=Math.PI/180,aU=Math.atan2,oU=1e8,sU=/([A-Z])/g,Due=/(left|right|width|margin|padding|x)/i,Oue=/[\s,\(]\S/,cU={autoAlpha:`opacity,visibility`,scale:`scaleX,scaleY`,alpha:`opacity`},lU=function(e,t){return t.set(t.t,t.p,Math.round((t.s+t.c*e)*1e4)/1e4+t.u,t)},kue=function(e,t){return t.set(t.t,t.p,e===1?t.e:Math.round((t.s+t.c*e)*1e4)/1e4+t.u,t)},Aue=function(e,t){return t.set(t.t,t.p,e?Math.round((t.s+t.c*e)*1e4)/1e4+t.u:t.b,t)},jue=function(e,t){return t.set(t.t,t.p,e===1?t.e:e?Math.round((t.s+t.c*e)*1e4)/1e4+t.u:t.b,t)},Mue=function(e,t){var n=t.s+t.c*e;t.set(t.t,t.p,~~(n+(n<0?-.5:.5))+t.u,t)},uU=function(e,t){return t.set(t.t,t.p,e?t.e:t.b,t)},dU=function(e,t){return t.set(t.t,t.p,e===1?t.e:t.b,t)},Nue=function(e,t,n){return e.style[t]=n},Pue=function(e,t,n){return e.style.setProperty(t,n)},Fue=function(e,t,n){return e._gsap[t]=n},Iue=function(e,t,n){return e._gsap.scaleX=e._gsap.scaleY=n},Lue=function(e,t,n,r,i){var a=e._gsap;a.scaleX=a.scaleY=n,a.renderTransform(i,a)},Rue=function(e,t,n,r,i){var a=e._gsap;a[t]=n,a.renderTransform(i,a)},fU=`transform`,pU=fU+`Origin`,zue=function e(t,n){var r=this,i=this.target,a=i.style,o=i._gsap;if(t in nU&&a){if(this.tfm=this.tfm||{},t!==`transform`)t=cU[t]||t,~t.indexOf(`,`)?t.split(`,`).forEach(function(e){return r.tfm[e]=AU(i,e)}):this.tfm[t]=o.x?o[t]:AU(i,t),t===pU&&(this.tfm.zOrigin=o.zOrigin);else return cU.transform.split(`,`).forEach(function(t){return e.call(r,t,n)});if(this.props.indexOf(fU)>=0)return;o.svg&&(this.svgo=i.getAttribute(`data-svg-origin`),this.props.push(pU,n,``)),t=fU}(a||n)&&this.props.push(t,n,a[t])},mU=function(e){e.translate&&(e.removeProperty(`translate`),e.removeProperty(`scale`),e.removeProperty(`rotate`))},Bue=function(){var e=this.props,t=this.target,n=t.style,r=t._gsap,i,a;for(i=0;i<e.length;i+=3)e[i+1]?e[i+1]===2?t[e[i]](e[i+2]):t[e[i]]=e[i+2]:e[i+2]?n[e[i]]=e[i+2]:n.removeProperty(e[i].substr(0,2)===`--`?e[i]:e[i].replace(sU,`-$1`).toLowerCase());if(this.tfm){for(a in this.tfm)r[a]=this.tfm[a];r.svg&&(r.renderTransform(),t.setAttribute(`data-svg-origin`,this.svgo||``)),i=tU(),(!i||!i.isStart)&&!n[fU]&&(mU(n),r.zOrigin&&n[pU]&&(n[pU]+=` `+r.zOrigin+`px`,r.zOrigin=0,r.renderTransform()),r.uncache=1)}},hU=function(e,t){var n={target:e,props:[],revert:Bue,save:zue};return e._gsap||JH.core.getCache(e),t&&e.style&&e.nodeType&&t.split(`,`).forEach(function(e){return n.save(e)}),n},gU,_U=function(e,t){var n=XH.createElementNS?XH.createElementNS((t||`http://www.w3.org/1999/xhtml`).replace(/^https/,`http`),e):XH.createElement(e);return n&&n.style?n:XH.createElement(e)},vU=function e(t,n,r){var i=getComputedStyle(t);return i[n]||i.getPropertyValue(n.replace(sU,`-$1`).toLowerCase())||i.getPropertyValue(n)||!r&&e(t,bU(n)||n,1)||``},yU=`O,Moz,ms,Ms,Webkit`.split(`,`),bU=function(e,t,n){var r=(t||$H).style,i=5;if(e in r&&!n)return e;for(e=e.charAt(0).toUpperCase()+e.substr(1);i--&&!(yU[i]+e in r););return i<0?null:(i===3?`ms`:i>=0?yU[i]:``)+e},xU=function(){Eue()&&window.document&&(YH=window,XH=YH.document,ZH=XH.documentElement,$H=_U(`div`)||{style:{}},_U(`div`),fU=bU(fU),pU=fU+`Origin`,$H.style.cssText=`border-width:0;line-height:0;position:absolute;padding:0`,gU=!!bU(`perspective`),tU=JH.core.reverting,QH=1)},SU=function(e){var t=e.ownerSVGElement,n=_U(`svg`,t&&t.getAttribute(`xmlns`)||`http://www.w3.org/2000/svg`),r=e.cloneNode(!0),i;r.style.display=`block`,n.appendChild(r),ZH.appendChild(n);try{i=r.getBBox()}catch{}return n.removeChild(r),ZH.removeChild(n),i},CU=function(e,t){for(var n=t.length;n--;)if(e.hasAttribute(t[n]))return e.getAttribute(t[n])},wU=function(e){var t,n;try{t=e.getBBox()}catch{t=SU(e),n=1}return t&&(t.width||t.height)||n||(t=SU(e)),t&&!t.width&&!t.x&&!t.y?{x:+CU(e,[`x`,`cx`,`x1`])||0,y:+CU(e,[`y`,`cy`,`y1`])||0,width:0,height:0}:t},TU=function(e){return!!(e.getCTM&&(!e.parentNode||e.ownerSVGElement)&&wU(e))},EU=function(e,t){if(t){var n=e.style,r;
vendor: 5,536 bytes, line 36
36t in nU&&t!==pU&&(t=fU),n.removeProperty?(r=t.substr(0,2),(r===`ms`||t.substr(0,6)===`webkit`)&&(t=`-`+t),n.removeProperty(r===`--`?t:t.replace(sU,`-$1`).toLowerCase())):n.removeAttribute(t)}},DU=function(e,t,n,r,i,a){var o=new zH(e._pt,t,n,0,1,a?dU:uU);return e._pt=o,o.b=r,o.e=i,e._props.push(n),o},OU={deg:1,rad:1,turn:1},Vue={grid:1,flex:1},kU=function e(t,n,r,i){var a=parseFloat(r)||0,o=(r+``).trim().substr((a+``).length)||`px`,s=$H.style,c=Due.test(n),l=t.tagName.toLowerCase()===`svg`,u=(l?`client`:`offset`)+(c?`Width`:`Height`),d=100,f=i===`px`,p=i===`%`,m,h,g,_;if(i===o||!a||OU[i]||OU[o])return a;if(o!==`px`&&!f&&(a=e(t,n,r,`px`)),_=t.getCTM&&TU(t),(p||o===`%`)&&(nU[n]||~n.indexOf(`adius`)))return m=_?t.getBBox()[c?`width`:`height`]:t[u],iV(p?a/m*d:a/100*m);if(s[c?`width`:`height`]=d+(f?o:i),h=i!==`rem`&&~n.indexOf(`adius`)||i===`em`&&t.appendChild&&!l?t:t.parentNode,_&&(h=(t.ownerSVGElement||{}).parentNode),(!h||h===XH||!h.appendChild)&&(h=XH.body),g=h._gsap,g&&p&&g.width&&c&&g.time===fH.time&&!g.uncache)return iV(a/g.width*d);if(p&&(n===`height`||n===`width`)){var v=t.style[n];t.style[n]=d+i,m=t[u],v?t.style[n]=v:EU(t,n)}else (p||o===`%`)&&!Vue[vU(h,`display`)]&&(s.position=vU(t,`position`)),h===t&&(s.position=`static`),h.appendChild($H),m=$H[u],h.removeChild($H),s.position=`absolute`;return c&&p&&(g=tV(h),g.time=fH.time,g.width=h[u]),iV(f?m*a/d:m&&a?d/m*a:0)},AU=function(e,t,n,r){var i;return QH||xU(),t in cU&&t!==`transform`&&(t=cU[t],~t.indexOf(`,`)&&(t=t.split(`,`)[0])),nU[t]&&t!==`transform`?(i=zU(e,r),i=t===`transformOrigin`?i.svg?i.origin:BU(vU(e,pU))+` `+i.zOrigin+`px`:i[t]):(i=e.style[t],(!i||i===`auto`||r||~(i+``).indexOf(`calc(`))&&(i=MU[t]&&MU[t](e,t,n)||vU(e,t)||nV(e,t)||+(t===`opacity`))),n&&!~(i+``).trim().indexOf(` `)?kU(e,t,i,n)+n:i},Hue=function(e,t,n,r){if(!n||n===`none`){var i=bU(t,e,1),a=i&&vU(e,i,1);a&&a!==n?(t=i,n=a):t===`borderColor`&&(n=vU(e,`borderTopColor`))}var o=new zH(this._pt,e.style,t,0,1,IH),s=0,c=0,l,u,d,f,p,m,h,g,_,v,y,b;if(o.b=n,o.e=r,n+=``,r+=``,r.substring(0,6)===`var(--`&&(r=vU(e,r.substring(4,r.indexOf(`)`)))),r===`auto`&&(m=e.style[t],e.style[t]=r,r=vU(e,t)||r,m?e.style[t]=m:EU(e,t)),l=[n,r],uH(l),n=l[0],r=l[1],d=n.match(kB)||[],b=r.match(kB)||[],b.length){for(;u=kB.exec(r);)h=u[0],_=r.substring(s,u.index),p?p=(p+1)%5:(_.substr(-5)===`rgba(`||_.substr(-5)===`hsla(`)&&(p=1),h!==(m=d[c++]||``)&&(f=parseFloat(m)||0,y=m.substr((f+``).length),h.charAt(1)===`=`&&(h=oV(f,h)+y),g=parseFloat(h),v=h.substr((g+``).length),s=kB.lastIndex-v.length,v||(v=v||cB.units[t]||y,s===r.length&&(r+=v,o.e+=v)),y!==v&&(f=kU(e,t,m,v)||0),o._pt={_next:o._pt,p:_||c===1?_:`,`,s:f,c:g-f,m:p&&p<4||t===`zIndex`?Math.round:0});o.c=s<r.length?r.substring(s,r.length):``}else o.r=t===`display`&&r===`none`?dU:uU;return jB.test(r)&&(o.e=0),this._pt=o,o},jU={top:`0%`,bottom:`100%`,left:`0%`,right:`100%`,center:`50%`},Uue=function(e){var t=e.split(` `),n=t[0],r=t[1]||`50%`;return(n===`top`||n===`bottom`||r===`left`||r===`right`)&&(e=n,n=r,r=e),t[0]=jU[n]||n,t[1]=jU[r]||r,t.join(` `)},Wue=function(e,t){if(t.tween&&t.tween._time===t.tween._dur){var n=t.t,r=n.style,i=t.u,a=n._gsap,o,s,c;if(i===`all`||i===!0)r.cssText=``,s=1;else for(i=i.split(`,`),c=i.length;--c>-1;)o=i[c],nU[o]&&(s=1,o=o===`transformOrigin`?pU:fU),EU(n,o);s&&(EU(n,fU),a&&(a.svg&&n.removeAttribute(`transform`),r.scale=r.rotate=r.translate=`none`,zU(n,1),a.uncache=1,mU(r)))}},MU={clearProps:function(e,t,n,r,i){if(i.data!==`isFromStart`){var a=e._pt=new zH(e._pt,t,n,0,0,Wue);return a.u=r,a.pr=-10,a.tween=i,e._props.push(n),1}}},NU=[1,0,0,1,0,0],PU={},FU=function(e){return e===`matrix(1, 0, 0, 1, 0, 0)`||e===`none`||!e},IU=function(e){var t=vU(e,fU);return FU(t)?NU:t.substr(7).match(OB).map(iV)},LU=function(e,t){var n=e._gsap||tV(e),r=e.style,i=IU(e),a,o,s,c;return n.svg&&e.getAttribute(`transform`)?(s=e.transform.baseVal.consolidate().matrix,i=[s.a,s.b,s.c,s.d,s.e,s.f],i.join(`,`)===`1,0,0,1,0,0`?NU:i):(i===NU&&!e.offsetParent&&e!==ZH&&!n.svg&&(s=r.display,r.display=`block`,a=e.parentNode,(!a||!e.offsetParent&&!e.getBoundingClientRect().width)&&(c=1,o=e.nextElementSibling,ZH.appendChild(e)),i=IU(e),s?r.display=s:EU(e,`display`),c&&(o?a.insertBefore(e,o):a?a.appendChild(e):ZH.removeChild(e))),t&&i.length>6?[i[0],i[1],i[4],i[5],i[12],i[13]]:i)},RU=function(e,t,n,r,i,a){var o=e._gsap,s=i||LU(e,!0),c=o.xOrigin||0,l=o.yOrigin||0,u=o.xOffset||0,d=o.yOffset||0,f=s[0],p=s[1],m=s[2],h=s[3],g=s[4],_=s[5],v=t.split(` `),y=parseFloat(v[0])||0,b=parseFloat(v[1])||0,x,S,C,w;n?s!==NU&&(S=f*h-p*m)&&(C=h/S*y+b*(-m/S)+(m*_-h*g)/S,w=y*(-p/S)+f/S*b-(f*_-p*g)/S,y=C,b=w):(x=wU(e),y=x.x+(~v[0].indexOf(`%`)?y/100*x.width:y),b=x.y+(~(v[1]||v[0]).indexOf(`%`)?b/100*x.height:b)),r||r!==!1&&o.smooth?(g=y-c,_=b-l,o.xOffset=u+(g*f+_*m)-g,o.yOffset=d+(g*p+_*h)-_):o.xOffset=o.yOffset=0,o.xOrigin=y,o.yOrigin=b,o.smooth=!!r,o.origin=t,o.originIsAbsolute=!!n,e.style[pU]=`0px 0px`,a&&(DU(a,o,`xOrigin`,c,y),DU(a,o,`yOrigin`,l,b),DU(a,o,`xOffset`,u,o.xOffset),DU(a,o,`yOffset`,d,o.yOffset)),e.setAttribute(`data-svg-origin`,y+` `+b)},zU=function(e,t){var n=e._gsap||new bH(e);if(`x`in n&&!t&&!n.uncache)return n;var r=e.style,i=n.scaleX<0,a=`px`,o=`deg`,s=getComputedStyle(e),c=vU(e,pU)||`0`,l=u=d=m=h=g=_=v=y=0,u,d,f=p=1,p,m,h,g,_,v,y,b,x,S,C,w,T,E,D,O,k,A,j,M,N,P,F,ee,I,te,ne,re;return n.svg=!!(e.getCTM&&TU(e)),s.translate&&((s.translate!==`none`||s.scale!==`none`||s.rotate!==`none`)&&(r[fU]=(s.translate===`none`?``:`translate3d(`+(s.translate+` 0 0`).split(` `).slice(0,3).join(`, `)+`) `)+(s.rotate===`
36none`?``:`rotate(`+s.rotate+`) `)+(s.scale===`none`?``:`scale(`+s.scale.split(` `).join(`,`)+`) `)+(s[fU]===`none`?``:s[fU])),r.scale=r.rotate=r.translate=`none`),S=LU(e,n.svg),n.svg&&(n.uncache?(N=e.getBBox(),c=n.xOrigin-N.x+`px `+(n.yOrigin-N.y)+`px`,M=``):M=!t&&e.getAttribute(`data-svg-origin`),RU(e,M||c,!!M||n.originIsAbsolute,n.smooth!==!1,S)),b=n.xOrigin||0,x=n.yOrigin||0,S!==NU&&(E=S[0],D=S[1],O=S[2],k=S[3],l=A=S[4],u=j=S[5],S.length===6?(f=Math.sqrt(E*E+D*D),p=Math.sqrt(k*k+O*O),m=E||D?aU(D,E)*rU:0,_=O||k?aU(O,k)*rU+m:0,_&&(p*=Math.abs(Math.cos(_*iU))),n.svg&&(l-=b-(b*E+x*O),u-=x-(b*D+x*k))):(re=S[6],te=S[7],F=S[8],ee=S[9],I=S[10],ne=S[11],l=S[12],u=S[13],d=S[14],C=aU(re,I),h=C*rU,C&&(w=Math.cos(-C),T=Math.sin(-C),M=A*w+F*T,N=j*w+ee*T,P=re*w+I*T,F=A*-T+F*w,ee=j*-T+ee*w,I=re*-T+I*w,ne=te*-T+ne*w,A=M,j=N,re=P),C=aU(-O,I),g=C*rU,C&&(w=Math.cos(-C),T=Math.sin(-C),M=E*w-F*T,N=D*w-ee*T,P=O*w-I*T,ne=k*T+ne*w,E=M,D=N,O=P),C=aU(D,E),m=C*rU,C&&(w=Math.cos(C),T=Math.sin(C),M=E*w+D*T,N=A*w+j*T,D=D*w-E*T,j=j*w-A*T,E=M,A=N),h&&Math.abs(h)+Math.abs(m)>359.9&&(h=m=0,g=180-g),f=iV(Math.sqrt(E*E+D*D+O*O)),p=iV(Math.sqrt(j*j+re*re)),C=aU(A,j),_=Math.abs(C)>2e-4?C*rU:0,y=ne?1/(ne<0?-ne:ne):0),n.svg&&(M=e.getAttribute(`transform`),n.forceCSS=e.setAttribute(`transform`,``)||!FU(vU(e,fU)),M&&e.setAttribute(`transform`,M))),Math.abs(_)>90&&Math.abs(_)<270&&(i?(f*=-1,_+=m<=0?180:-180,m+=m<=0?180:-180):(p*=-1,_+=_<=0?180:-180)),t||=n.uncache,n.x=l-((n.xPercent=l&&(!t&&n.xPercent||(Math.round(e.offsetWidth/2)===Math.round(-l)?-50:0)))?e.offsetWidth*n.xPercent/100:0)+a,n.y=u-((n.yPercent=u&&(!t&&n.yPercent||(Math.round(e.offsetHeight/2)===Math.round(-u)?-50:0)))?e.offsetHeight*n.yPercent/100:0)+a,n.z=d+a,n.scaleX=iV(f),n.scaleY=iV(p),n.rotation=iV(m)+o,n.rotationX=iV(h)+o,n.rotationY=iV(g)+o,n.skewX=_+o,n.skewY=v+o,n.transformPerspective=y+a,(n.zOrigin=parseFloat(c.split(` `)[2])||!t&&n.zOrigin||0)&&(r[pU]=BU(c)),n.xOffset=n.yOffset=0,n.force3D=cB.force3D,n.renderTransform=n.svg?Kue:gU?GU:Gue,n.uncache=0,n},BU=function(e){return(e=e.split(` `))[0]+` `+e[1]},VU=function(e,t,n){var r=RV(t);return iV(parseFloat(t)+parseFloat(kU(e,`x`,n+`px`,r)))+r},Gue=function(e,t){t.z=`0px`,t.rotationY=t.rotationX=`0deg`,t.force3D=0,GU(e,t)},HU=`0deg`,UU=`0px`,WU=`) `,GU=function(e,t){var n=t||this,r=n.xPercent,i=n.yPercent,a=n.x,o=n.y,s=n.z,c=n.rotation,l=n.rotationY,u=n.rotationX,d=n.skewX,f=n.skewY,p=n.scaleX,m=n.scaleY,h=n.transformPerspective,g=n.force3D,_=n.target,v=n.zOrigin,y=``,b=g===`auto`&&e&&e!==1||g===!0;if(v&&(u!==HU||l!==HU)){var x=parseFloat(l)*iU,S=Math.sin(x),C=Math.cos(x),w;x=parseFloat(u)*iU,w=Math.cos(x),a=VU(_,a,S*w*-v),o=VU(_,o,-Math.sin(x)*-v),s=VU(_,s,C*w*-v+v)}h!==UU&&(y+=`perspective(`+h+WU),(r||i)&&(y+=`translate(`+r+`%, `+i+`%) `),(b||a!==UU||o!==UU||s!==UU)&&(y+=s!==UU||b?`translate3d(`+a+`, `+o+`, `+s+`) `:`translate(`+a+`, `+o+WU),c!==HU&&(y+=`rotate(`+c+WU),l!==HU&&(y+=`rotateY(`+l+WU),u!==HU&&(y+=`rotateX(`+u+WU),(d!==HU||f!==HU)&&(y+=`skew(`+d+`, `+f+WU),(p!==1||m!==1)&&(y+=`scale(`+p+`, `+m+WU),_.style[fU]=y||`translate(0, 0)`},Kue=function(e,t){var n=t||this,r=n.xPercent,i=n.yPercent,a=n.x,o=n.y,s=n.rotation,c=n.skewX,l=n.skewY,u=n.scaleX,d=n.scaleY,f=n.target,p=n.xOrigin,m=n.yOrigin,h=n.xOffset,g=n.yOffset,_=n.forceCSS,v=parseFloat(a),y=parseFloat(o),b,x,S,C,w;
vendor: 4,333 bytes, line 36
36s=parseFloat(s),c=parseFloat(c),l=parseFloat(l),l&&(l=parseFloat(l),c+=l,s+=l),s||c?(s*=iU,c*=iU,b=Math.cos(s)*u,x=Math.sin(s)*u,S=Math.sin(s-c)*-d,C=Math.cos(s-c)*d,c&&(l*=iU,w=Math.tan(c-l),w=Math.sqrt(1+w*w),S*=w,C*=w,l&&(w=Math.tan(l),w=Math.sqrt(1+w*w),b*=w,x*=w)),b=iV(b),x=iV(x),S=iV(S),C=iV(C)):(b=u,C=d,x=S=0),(v&&!~(a+``).indexOf(`px`)||y&&!~(o+``).indexOf(`px`))&&(v=kU(f,`x`,a,`px`),y=kU(f,`y`,o,`px`)),(p||m||h||g)&&(v=iV(v+p-(p*b+m*S)+h),y=iV(y+m-(p*x+m*C)+g)),(r||i)&&(w=f.getBBox(),v=iV(v+r/100*w.width),y=iV(y+i/100*w.height)),w=`matrix(`+b+`,`+x+`,`+S+`,`+C+`,`+v+`,`+y+`)`,f.setAttribute(`transform`,w),_&&(f.style[fU]=w)},que=function(e,t,n,r,i){var a=360,o=_B(i),s=parseFloat(i)*(o&&~i.indexOf(`rad`)?rU:1)-r,c=r+s+`deg`,l,u;return o&&(l=i.split(`_`)[1],l===`short`&&(s%=a,s!==s%(a/2)&&(s+=s<0?a:-a)),l===`cw`&&s<0?s=(s+a*oU)%a-~~(s/a)*a:l===`ccw`&&s>0&&(s=(s-a*oU)%a-~~(s/a)*a)),e._pt=u=new zH(e._pt,t,n,r,s,kue),u.e=c,u.u=`deg`,e._props.push(n),u},KU=function(e,t){for(var n in t)e[n]=t[n];return e},Jue=function(e,t,n){var r=KU({},n._gsap),i=`perspective,force3D,transformOrigin,svgOrigin`,a=n.style,o,s,c,l,u,d,f,p;for(s in r.svg?(c=n.getAttribute(`transform`),n.setAttribute(`transform`,``),a[fU]=t,o=zU(n,1),EU(n,fU),n.setAttribute(`transform`,c)):(c=getComputedStyle(n)[fU],a[fU]=t,o=zU(n,1),a[fU]=c),nU)c=r[s],l=o[s],c!==l&&i.indexOf(s)<0&&(f=RV(c),p=RV(l),u=f===p?parseFloat(c):kU(n,s,c,p),d=parseFloat(l),e._pt=new zH(e._pt,o,s,u,d-u,lU),e._pt.u=p||0,e._props.push(s));KU(o,r)};rV(`padding,margin,Width,Radius`,function(e,t){var n=`Top`,r=`Right`,i=`Bottom`,a=`Left`,o=(t<3?[n,r,i,a]:[n+a,n+r,i+r,i+a]).map(function(n){return t<2?e+n:`border`+n+e});MU[t>1?`border`+e:e]=function(e,t,n,r,i){var a,s;if(arguments.length<4)return a=o.map(function(t){return AU(e,t,n)}),s=a.join(` `),s.split(a[0]).length===5?a[0]:s;a=(r+``).split(` `),s={},o.forEach(function(e,t){return s[e]=a[t]=a[t]||a[(t-1)/2|0]}),e.init(t,s,i)}});var qU={name:`css`,register:xU,targetTest:function(e){return e.style&&e.nodeType},init:function(e,t,n,r,i){var a=this._props,o=e.style,s=n.vars.startAt,c,l,u,d,f,p,m,h,g,_,v,y,b,x,S,C,w;for(m in QH||xU(),this.styles=this.styles||hU(e),C=this.styles.props,this.tween=n,t)if(m!==`autoRound`&&(l=t[m],!(YB[m]&&wH(m,t,n,r,e,i)))){if(f=typeof l,p=MU[m],f===`function`&&(l=l.call(n,r,e,i),f=typeof l),f===`string`&&~l.indexOf(`random(`)&&(l=YV(l)),p)p(this,e,m,l,n)&&(S=1);else if(m.substr(0,2)===`--`)c=(getComputedStyle(e).getPropertyValue(m)+``).trim(),l+=``,lH.lastIndex=0,lH.test(c)||(h=RV(c),g=RV(l),g?h!==g&&(c=kU(e,m,c,g)+g):h&&(l+=h)),this.add(o,`setProperty`,c,l,r,i,0,0,m),a.push(m),C.push(m,0,o[m]);else if(f!==`undefined`){if(s&&m in s?(c=typeof s[m]==`function`?s[m].call(n,r,e,i):s[m],_B(c)&&~c.indexOf(`random(`)&&(c=YV(c)),RV(c+``)||c===`auto`||(c+=cB.units[m]||RV(AU(e,m))||``),(c+``).charAt(1)===`=`&&(c=AU(e,m))):c=AU(e,m),d=parseFloat(c),_=f===`string`&&l.charAt(1)===`=`&&l.substr(0,2),_&&(l=l.substr(2)),u=parseFloat(l),m in cU&&(m===`autoAlpha`&&(d===1&&AU(e,`visibility`)===`hidden`&&u&&(d=0),C.push(`visibility`,0,o.visibility),DU(this,o,`visibility`,d?`inherit`:`hidden`,u?`inherit`:`hidden`,!u)),m!==`scale`&&m!==`transform`&&(m=cU[m],~m.indexOf(`,`)&&(m=m.split(`,`)[0]))),v=m in nU,v){if(this.styles.save(m),w=l,f===`string`&&l.substring(0,6)===`var(--`){if(l=vU(e,l.substring(4,l.indexOf(`)`))),l.substring(0,5)===`calc(`){var T=e.style.perspective;e.style.perspective=l,l=vU(e,`perspective`),T?e.style.perspective=T:EU(e,`perspective`)}u=parseFloat(l)}if(y||(b=e._gsap,b.renderTransform&&!t.parseTransform||zU(e,t.parseTransform),x=t.smoothOrigin!==!1&&b.smooth,y=this._pt=new zH(this._pt,o,fU,0,1,b.renderTransform,b,0,-1),y.dep=1),m===`scale`)this._pt=new zH(this._pt,b,`scaleY`,b.scaleY,(_?oV(b.scaleY,_+u):u)-b.scaleY||0,lU),this._pt.u=0,a.push(`scaleY`,m),m+=`X`;else if(m===`transformOrigin`){C.push(pU,0,o[pU]),l=Uue(l),b.svg?RU(e,l,0,x,0,this):(g=parseFloat(l.split(` `)[2])||0,g!==b.zOrigin&&DU(this,b,`zOrigin`,b.zOrigin,g),DU(this,o,m,BU(c),BU(l)));continue}else if(m===`svgOrigin`){RU(e,l,1,x,0,this);continue}else if(m in PU){que(this,b,m,d,_?oV(d,_+l):l);continue}else if(m===`smoothOrigin`){DU(this,b,`smooth`,b.smooth,l);continue}else if(m===`force3D`){b[m]=l;continue}else if(m===`transform`){Jue(this,l,e);continue}}else m in o||(m=bU(m)||m);
vendor: 4,680 bytes, line 36
36if(v||(u||u===0)&&(d||d===0)&&!Oue.test(l)&&m in o)h=(c+``).substr((d+``).length),u||=0,g=RV(l)||(m in cB.units?cB.units[m]:h),h!==g&&(d=kU(e,m,c,g)),this._pt=new zH(this._pt,v?b:o,m,d,(_?oV(d,_+u):u)-d,!v&&(g===`px`||m===`zIndex`)&&t.autoRound!==!1?Mue:lU),this._pt.u=g||0,v&&w!==l?(this._pt.b=c,this._pt.e=w,this._pt.r=jue):h!==g&&g!==`%`&&(this._pt.b=c,this._pt.r=Aue);else if(m in o)Hue.call(this,e,m,c,_?_+l:l);else if(m in e)this.add(e,m,c||e[m],_?_+l:l,r,i);else if(m!==`parseTransform`){BB(m,l);continue}v||(m in o?C.push(m,0,o[m]):typeof e[m]==`function`?C.push(m,2,e[m]()):C.push(m,1,c||e[m])),a.push(m)}}S&&RH(this)},render:function(e,t){if(t.tween._time||!tU())for(var n=t._pt;n;)n.r(e,n.d),n=n._next;else t.styles.revert()},get:AU,aliases:cU,getSetter:function(e,t,n){var r=cU[t];return r&&r.indexOf(`,`)<0&&(t=r),t in nU&&t!==pU&&(e._gsap.x||AU(e,`x`))?n&&eU===n?t===`scale`?Iue:Fue:(eU=n||{})&&(t===`scale`?Lue:Rue):e.style&&!bB(e.style[t])?Nue:~t.indexOf(`-`)?Pue:PH(e,t)},core:{_removeProperty:EU,_getMatrix:LU}};JH.utils.checkPrefix=bU,JH.core.getStyleSaver=hU,(function(e,t,n,r){var i=rV(e+`,`+t+`,`+n,function(e){nU[e]=1});rV(t,function(e){cB.units[e]=`deg`,PU[e]=1}),cU[i[13]]=e+`,`+t,rV(r,function(e){var t=e.split(`:`);cU[t[1]]=i[t[0]]})})(`x,y,z,scale,scaleX,scaleY,xPercent,yPercent`,`rotation,rotationX,rotationY,skewX,skewY`,`transform,transformOrigin,svgOrigin,force3D,smoothOrigin,transformPerspective`,`0:translateX,1:translateY,2:translateZ,8:rotate,8:rotationZ,8:rotateZ,9:rotateX,10:rotateY`),rV(`x,y,z,top,right,bottom,left,width,height,fontSize,padding,margin,perspective`,function(e){cB.units[e]=`px`}),JH.registerPlugin(qU);var JU=JH.registerPlugin(qU)||JH;JU.core.Tween;function YU(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,`value`in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Yue(e,t,n){return t&&YU(e.prototype,t),n&&YU(e,n),e}var XU,ZU,QU,$U,eW,tW,nW,rW,iW,aW,oW,sW,cW,lW=function(){return XU||typeof window<`u`&&(XU=window.gsap)&&XU.registerPlugin&&XU},uW=1,dW=[],fW=[],pW=[],mW=Date.now,hW=function(e,t){return t},Xue=function(){var e=iW.core,t=e.bridge||{},n=e._scrollers,r=e._proxies;n.push.apply(n,fW),r.push.apply(r,pW),fW=n,pW=r,hW=function(e,n){return t[e](n)}},gW=function(e,t){return~pW.indexOf(e)&&pW[pW.indexOf(e)+1][t]},_W=function(e){return!!~aW.indexOf(e)},vW=function(e,t,n,r,i){return e.addEventListener(t,n,{passive:r!==!1,capture:!!i})},yW=function(e,t,n,r){return e.removeEventListener(t,n,!!r)},bW=`scrollLeft`,xW=`scrollTop`,SW=function(){return oW&&oW.isPressed||fW.cache++},CW=function(e,t){var n=function n(r){if(r||r===0){uW&&(QU.history.scrollRestoration=`manual`);var i=oW&&oW.isPressed;r=n.v=Math.round(r)||(oW&&oW.iOS?1:0),e(r),n.cacheID=fW.cache,i&&hW(`ss`,r)}else (t||fW.cache!==n.cacheID||hW(`ref`))&&(n.cacheID=fW.cache,n.v=e());return n.v+n.offset};return n.offset=0,e&&n},wW={s:bW,p:`left`,p2:`Left`,os:`right`,os2:`Right`,d:`width`,d2:`Width`,a:`x`,sc:CW(function(e){return arguments.length?QU.scrollTo(e,TW.sc()):QU.pageXOffset||$U[bW]||eW[bW]||tW[bW]||0})},TW={s:xW,p:`top`,p2:`Top`,os:`bottom`,os2:`Bottom`,d:`height`,d2:`Height`,a:`y`,op:wW,sc:CW(function(e){return arguments.length?QU.scrollTo(wW.sc(),e):QU.pageYOffset||$U[xW]||eW[xW]||tW[xW]||0})},EW=function(e,t){return(t&&t._ctx&&t._ctx.selector||XU.utils.toArray)(e)[0]||(typeof e==`string`&&XU.config().nullTargetWarn!==!1?console.warn(`Element not found:`,e):null)},Zue=function(e,t){for(var n=t.length;n--;)if(t[n]===e||t[n].contains(e))return!0;return!1},DW=function(e,t){var n=t.s,r=t.sc;_W(e)&&(e=$U.scrollingElement||eW);var i=fW.indexOf(e),a=r===TW.sc?1:2;!~i&&(i=fW.push(e)-1),fW[i+a]||vW(e,`scroll`,SW);var o=fW[i+a],s=o||(fW[i+a]=CW(gW(e,n),!0)||(_W(e)?r:CW(function(t){return arguments.length?e[n]=t:e[n]})));return s.target=e,o||(s.smooth=XU.getProperty(e,`scrollBehavior`)===`smooth`),s},OW=function(e,t,n){var r=e,i=e,a=mW(),o=a,s=t||50,c=Math.max(500,s*3),l=function(e,t){var c=mW();t||c-a>s?(i=r,r=e,o=a,a=c):n?r+=e:r=i+(e-i)/(c-o)*(a-o)};return{update:l,reset:function(){i=r=n?0:r,o=a=0},getVelocity:function(e){var t=o,s=i,u=mW();return(e||e===0)&&e!==r&&l(e),a===o||u-o>c?0:(r+(n?s:-s))/((n?u:a)-t)*1e3}}},kW=function(e,t){return t&&!e._gsapAllow&&e.cancelable!==!1&&e.preventDefault(),e.changedTouches?e.changedTouches[0]:e},AW=function(e){var t=Math.max.apply(Math,e),n=Math.min.apply(Math,e);return Math.abs(t)>=Math.abs(n)?t:n},jW=function(){iW=XU.core.globals().ScrollTrigger,iW&&iW.core&&Xue()},MW=function(e){return XU=e||lW(),!ZU&&XU&&typeof document<`u`&&document.body&&(QU=window,$U=document,eW=$U.documentElement,tW=$U.body,aW=[QU,$U,eW,tW],
vendor: 6,633 bytes, line 36
36XU.utils.clamp,cW=XU.core.context||function(){},rW=`onpointerenter`in tW?`pointer`:`mouse`,nW=NW.isTouch=QU.matchMedia&&QU.matchMedia(`(hover: none), (pointer: coarse)`).matches?1:`ontouchstart`in QU||navigator.maxTouchPoints>0||navigator.msMaxTouchPoints>0?2:0,sW=NW.eventTypes=(`ontouchstart`in eW?`touchstart,touchmove,touchcancel,touchend`:`onpointerdown`in eW?`pointerdown,pointermove,pointercancel,pointerup`:`mousedown,mousemove,mouseup,mouseup`).split(`,`),setTimeout(function(){return uW=0},500),ZU=1),iW||jW(),ZU};wW.op=TW,fW.cache=0;var NW=function(){function e(e){this.init(e)}var t=e.prototype;return t.init=function(e){ZU||MW(XU)||console.warn(`Please gsap.registerPlugin(Observer)`),iW||jW();var t=e.tolerance,n=e.dragMinimum,r=e.type,i=e.target,a=e.lineHeight,o=e.debounce,s=e.preventDefault,c=e.onStop,l=e.onStopDelay,u=e.ignore,d=e.wheelSpeed,f=e.event,p=e.onDragStart,m=e.onDragEnd,h=e.onDrag,g=e.onPress,_=e.onRelease,v=e.onRight,y=e.onLeft,b=e.onUp,x=e.onDown,S=e.onChangeX,C=e.onChangeY,w=e.onChange,T=e.onToggleX,E=e.onToggleY,D=e.onHover,O=e.onHoverEnd,k=e.onMove,A=e.ignoreCheck,j=e.isNormalizer,M=e.onGestureStart,N=e.onGestureEnd,P=e.onWheel,F=e.onEnable,ee=e.onDisable,I=e.onClick,te=e.scrollSpeed,ne=e.capture,re=e.allowClicks,ie=e.lockAxis,ae=e.onLockAxis;this.target=i=EW(i)||eW,this.vars=e,u&&=XU.utils.toArray(u),t||=1e-9,n||=0,d||=1,te||=1,r||=`wheel,touch,pointer`,o=o!==!1,a||=parseFloat(QU.getComputedStyle(tW).lineHeight)||22;var oe,se,ce,le,ue,de,fe,L=this,pe=0,me=0,he=e.passive||!s&&e.passive!==!1,ge=DW(i,wW),_e=DW(i,TW),ve=ge(),ye=_e(),be=~r.indexOf(`touch`)&&!~r.indexOf(`pointer`)&&sW[0]===`pointerdown`,xe=_W(i),Se=i.ownerDocument||$U,Ce=[0,0,0],we=[0,0,0],Te=0,Ee=function(){return Te=mW()},De=function(e,t){return(L.event=e)&&u&&Zue(e.target,u)||t&&be&&e.pointerType!==`touch`||A&&A(e,t)},Oe=function(){L._vx.reset(),L._vy.reset(),se.pause(),c&&c(L)},ke=function(){var e=L.deltaX=AW(Ce),n=L.deltaY=AW(we),r=Math.abs(e)>=t,i=Math.abs(n)>=t;w&&(r||i)&&w(L,e,n,Ce,we),r&&(v&&L.deltaX>0&&v(L),y&&L.deltaX<0&&y(L),S&&S(L),T&&L.deltaX<0!=pe<0&&T(L),pe=L.deltaX,Ce[0]=Ce[1]=Ce[2]=0),i&&(x&&L.deltaY>0&&x(L),b&&L.deltaY<0&&b(L),C&&C(L),E&&L.deltaY<0!=me<0&&E(L),me=L.deltaY,we[0]=we[1]=we[2]=0),(le||ce)&&(k&&k(L),ce&&=(p&&ce===1&&p(L),h&&h(L),0),le=!1),de&&!(de=!1)&&ae&&ae(L),ue&&=(P(L),!1),oe=0},Ae=function(e,t,n){Ce[n]+=e,we[n]+=t,L._vx.update(e),L._vy.update(t),o?oe||=requestAnimationFrame(ke):ke()},je=function(e,t){ie&&!fe&&(L.axis=fe=Math.abs(e)>Math.abs(t)?`x`:`y`,de=!0),fe!==`y`&&(Ce[2]+=e,L._vx.update(e,!0)),fe!==`x`&&(we[2]+=t,L._vy.update(t,!0)),o?oe||=requestAnimationFrame(ke):ke()},Me=function(e){if(!De(e,1)){e=kW(e,s);var t=e.clientX,r=e.clientY,i=t-L.x,a=r-L.y,o=L.isDragging;L.x=t,L.y=r,(o||(i||a)&&(Math.abs(L.startX-t)>=n||Math.abs(L.startY-r)>=n))&&(ce||=o?2:1,o||(L.isDragging=!0),je(i,a))}},Ne=L.onPress=function(e){De(e,1)||e&&e.button||(L.axis=fe=null,se.pause(),L.isPressed=!0,e=kW(e),pe=me=0,L.startX=L.x=e.clientX,L.startY=L.y=e.clientY,L._vx.reset(),L._vy.reset(),vW(j?i:Se,sW[1],Me,he,!0),L.deltaX=L.deltaY=0,g&&g(L))},Pe=L.onRelease=function(e){if(!De(e,1)){yW(j?i:Se,sW[1],Me,!0);var t=!isNaN(L.y-L.startY),n=L.isDragging,r=n&&(Math.abs(L.x-L.startX)>3||Math.abs(L.y-L.startY)>3),a=kW(e);!r&&t&&(L._vx.reset(),L._vy.reset(),s&&re&&XU.delayedCall(.08,function(){if(mW()-Te>300&&!e.defaultPrevented){if(e.target.click)e.target.click();else if(Se.createEvent){var t=Se.createEvent(`MouseEvents`);t.initMouseEvent(`click`,!0,!0,QU,1,a.screenX,a.screenY,a.clientX,a.clientY,!1,!1,!1,!1,0,null),e.target.dispatchEvent(t)}}})),L.isDragging=L.isGesturing=L.isPressed=!1,c&&n&&!j&&se.restart(!0),ce&&ke(),m&&n&&m(L),_&&_(L,r)}},Fe=function(e){return e.touches&&e.touches.length>1&&(L.isGesturing=!0)&&M(e,L.isDragging)},Ie=function(){return(L.isGesturing=!1)||N(L)},Le=function(e){if(!De(e)){var t=ge(),n=_e();Ae((t-ve)*te,(n-ye)*te,1),ve=t,ye=n,c&&se.restart(!0)}},Re=function(e){if(!De(e)){e=kW(e,s),P&&(ue=!0);var t=(e.deltaMode===1?a:e.deltaMode===2?QU.innerHeight:1)*d;Ae(e.deltaX*t,e.deltaY*t,0),c&&!j&&se.restart(!0)}},ze=function(e){if(!De(e)){var t=e.clientX,n=e.clientY,r=t-L.x,i=n-L.y;L.x=t,L.y=n,le=!0,c&&se.restart(!0),(r||i)&&je(r,i)}},Be=function(e){L.event=e,D(L)},Ve=function(e){L.event=e,O(L)},He=function(e){return De(e)||kW(e,s)&&I(L)};se=L._dc=XU.delayedCall(l||.25,Oe).pause(),L.deltaX=L.deltaY=0,L._vx=OW(0,50,!0),L._vy=OW(0,50,!0),L.scrollX=ge,L.scrollY=_e,L.isDragging=L.isGesturing=L.isPressed=!1,cW(this),L.enable=function(e){return L.isEnabled||(vW(xe?Se:i,`scroll`,SW),r.indexOf(`scroll`)>=0&&vW(xe?Se:i,`scroll`,Le,he,ne),r.indexOf(`wheel`)>=0&&vW(i,`wheel`,Re,he,ne),(r.indexOf(`touch`)>=0&&nW||r.indexOf(`pointer`)>=0)&&(vW(i,sW[0],Ne,he,ne),vW(Se,sW[2],Pe),vW(Se,sW[3],Pe),re&&vW(i,`click`,Ee,!0,!0),I&&vW(i,`click`,He),M&&vW(Se,`gesturestart`,Fe),N&&vW(Se,`gestureend`,Ie),D&&vW(i,rW+`enter`,Be),O&&vW(i,rW+`leave`,Ve),k&&vW(i,rW+`move`,ze)),L.isEnabled=!0,L.isDragging=L.isGesturing=L.isPressed=le=ce=!1,L._vx.reset(),L._vy.reset(),ve=ge(),ye=_e(),e&&e.type&&Ne(e),F&&F(L)),L},L.disable=function(){L.isEnabled&&(dW.filter(function(e){return e!==L&&_W(e.target)}).length||yW(xe?Se:i,`scroll`,SW),L.isPressed&&(L._vx.reset(),L._vy.reset(),yW(j?i:Se,sW[1],Me,!0)),yW(xe?Se:i,`scroll`,Le,ne),yW(i,`wheel`,Re,ne),yW(i,sW[0],Ne,ne),yW(Se,sW[2],Pe),yW(Se,sW[3],Pe),yW(i,`click`,Ee,!0),yW(i,`click`,He),yW(Se,`gesturestart`,Fe),yW(Se,`gestureend`,Ie),yW(i,rW+`enter`,Be),yW(i,rW+`leave`,Ve),yW(i,rW+`move`,ze),L.isEnabled=L.isPressed=L.isDragging=!1,ee&&ee(L))},L.kill=L.revert=function(){L.disable();var e=dW.indexOf(L);e>=0&&dW.splice(e,1),oW===L&&(oW=0)},dW.push(L),j&&_W(i)&&(oW=L),L.enable(f)},Yue(e,[{key:`velocityX`,get:function(){return this._vx.getVelocity()}},{key:`velocityY`,get:function(){return this._vy.getVelocity()}}]),e}();NW.version=`3.15.0`,NW.create=function(e){return new NW(e)},NW.register=MW,NW.getAll=function(){return dW.slice()},NW.getById=function(e){return dW.filter(function(t){return t.vars.id===e})[0]},lW()&&XU.registerPlugin(NW);var PW,FW,IW,LW,RW,zW,BW,VW,HW,UW,WW,GW,KW,qW,JW,YW,XW,ZW,QW,$W,eG,tG,nG,rG,iG,aG,oG,sG,cG,lG,uG,dG,fG,pG,mG=1,hG=Date.now,gG=hG(),_G=0,vG=0,yG=function(e,t,n){var r=FG(e)&&(e.substr(0,6)===`clamp(`||e.indexOf(`max`)>-1);return n[`_`+t+`Clamp`]=r,r?e.substr(6,e.length-7):e},bG=function(e,t){return t&&(!FG(e)||e.substr(0,6)!==`clamp(`)?`clamp(`+e+`)`:e},xG=function e(){return vG&&requestAnimationFrame(e)},SG=function(){return qW=1},CG=function(){return qW=0},wG=function(e){return e},TG=function(e){return Math.round(e*1e5)/1e5||0},EG=function(){return typeof window<`u`}
vendor: 4,403 bytes, line 36
36,DG=function(){return PW||EG()&&(PW=window.gsap)&&PW.registerPlugin&&PW},OG=function(e){return!!~BW.indexOf(e)},kG=function(e){return(e===`Height`?uG:IW[`inner`+e])||RW[`client`+e]||zW[`client`+e]},AG=function(e){return gW(e,`getBoundingClientRect`)||(OG(e)?function(){return rq.width=IW.innerWidth,rq.height=uG,rq}:function(){return oK(e)})},jG=function(e,t,n){var r=n.d,i=n.d2,a=n.a;return(a=gW(e,`getBoundingClientRect`))?function(){return a()[r]}:function(){return(t?kG(i):e[`client`+i])||0}},MG=function(e,t){return!t||~pW.indexOf(e)?AG(e):function(){return rq}},NG=function(e,t){var n=t.s,r=t.d2,i=t.d,a=t.a;return Math.max(0,(n=`scroll`+r)&&(a=gW(e,n))?a()-AG(e)()[i]:OG(e)?(RW[n]||zW[n])-kG(r):e[n]-e[`offset`+r])},PG=function(e,t){for(var n=0;n<QW.length;n+=3)(!t||~t.indexOf(QW[n+1]))&&e(QW[n],QW[n+1],QW[n+2])},FG=function(e){return typeof e==`string`},IG=function(e){return typeof e==`function`},LG=function(e){return typeof e==`number`},RG=function(e){return typeof e==`object`},zG=function(e,t,n){return e&&e.progress(+!t)&&n&&e.pause()},BG=function(e,t,n){if(e.enabled){var r=e._ctx?e._ctx.add(function(){return t(e,n)}):t(e,n);r&&r.totalTime&&(e.callbackAnimation=r)}},VG=Math.abs,HG=`left`,UG=`top`,WG=`right`,GG=`bottom`,KG=`width`,qG=`height`,JG=`Right`,YG=`Left`,XG=`Top`,ZG=`Bottom`,QG=`padding`,$G=`margin`,eK=`Width`,tK=`Height`,nK=`px`,rK=function(e){return IW.getComputedStyle(e.nodeType===Node.DOCUMENT_NODE?e.scrollingElement:e)},iK=function(e){var t=rK(e).position;e.style.position=t===`absolute`||t===`fixed`?t:`relative`},aK=function(e,t){for(var n in t)n in e||(e[n]=t[n]);return e},oK=function(e,t){var n=t&&rK(e)[JW]!==`matrix(1, 0, 0, 1, 0, 0)`&&PW.to(e,{x:0,y:0,xPercent:0,yPercent:0,rotation:0,rotationX:0,rotationY:0,scale:1,skewX:0,skewY:0}).progress(1),r=e.getBoundingClientRect?e.getBoundingClientRect():e.scrollingElement.getBoundingClientRect();return n&&n.progress(0).kill(),r},sK=function(e,t){var n=t.d2;return e[`offset`+n]||e[`client`+n]||0},cK=function(e){var t=[],n=e.labels,r=e.duration(),i;for(i in n)t.push(n[i]/r);return t},lK=function(e){return function(t){return PW.utils.snap(cK(e),t)}},uK=function(e){var t=PW.utils.snap(e),n=Array.isArray(e)&&e.slice(0).sort(function(e,t){return e-t});return n?function(e,r,i){i===void 0&&(i=.001);var a;if(!r)return t(e);if(r>0){for(e-=i,a=0;a<n.length;a++)if(n[a]>=e)return n[a];return n[a-1]}else for(a=n.length,e+=i;a--;)if(n[a]<=e)return n[a];return n[0]}:function(n,r,i){i===void 0&&(i=.001);var a=t(n);return!r||Math.abs(a-n)<i||a-n<0==r<0?a:t(r<0?n-e:n+e)}},dK=function(e){return function(t,n){return uK(cK(e))(t,n.direction)}},fK=function(e,t,n,r){return n.split(`,`).forEach(function(n){return e(t,n,r)})},pK=function(e,t,n,r,i){return e.addEventListener(t,n,{passive:!r,capture:!!i})},mK=function(e,t,n,r){return e.removeEventListener(t,n,!!r)},hK=function(e,t,n){n&&=n.wheelHandler,n&&(e(t,`wheel`,n),e(t,`touchmove`,n))},gK={startColor:`green`,endColor:`red`,indent:0,fontSize:`16px`,fontWeight:`normal`},_K={toggleActions:`play`,anticipatePin:0},vK={top:0,left:0,center:.5,bottom:1,right:1},yK=function(e,t){if(FG(e)){var n=e.indexOf(`=`),r=~n?+(e.charAt(n-1)+1)*parseFloat(e.substr(n+1)):0;~n&&(e.indexOf(`%`)>n&&(r*=t/100),e=e.substr(0,n-1)),e=r+(e in vK?vK[e]*t:~e.indexOf(`%`)?parseFloat(e)*t/100:parseFloat(e)||0)}return e},bK=function(e,t,n,r,i,a,o,s){var c=i.startColor,l=i.endColor,u=i.fontSize,d=i.indent,f=i.fontWeight,p=LW.createElement(`div`),m=OG(n)||gW(n,`pinType`)===`fixed`,h=e.indexOf(`scroller`)!==-1,g=m?zW:n.tagName===`IFRAME`?n.contentDocument.body:n,_=e.indexOf(`start`)!==-1,v=_?c:l,y=`border-color:`+v+`;font-size:`+u+`;color:`+v+`;font-weight:`+f+`;pointer-events:none;white-space:nowrap;font-family:sans-serif,Arial;z-index:1000;padding:4px 8px;border-width:0;border-style:solid;`;return y+=`position:`+((h||s)&&m?`fixed;`:`absolute;`),(h||s||!m)&&(y+=(r===TW?WG:GG)+`:`+(a+parseFloat(d))+`px;`),o&&(y+=`box-sizing:border-box;text-align:left;width:`+o.offsetWidth+`px;`),p._isStart=_,p.setAttribute(`class`,`gsap-marker-`+e+(t?` marker-`+t:``)),p.style.cssText=y,p.innerText=t||t===0?e+`-`+t:e,g.children[0]?g.insertBefore(p,g.children[0]):g.appendChild(p),p._offset=p[`offset`+r.op.d2],xK(p,0,r,_),p},xK=function(e,t,n,r){var i={display:`block`},a=n[r?`os2`:`p2`],o=n[r?`p2`:`os2`];e._isFlipped=r,i[n.a+`Percent`]=r?-100:0,i[n.a]=r?`1px`:0,i[`border`+a+eK]=1,i[`border`+
vendor: 5,271 bytes, line 36
36o+eK]=0,i[n.p]=t+`px`,PW.set(e,i)},SK=[],CK={},wK,TK=function(){return hG()-_G>34&&(wK||=requestAnimationFrame(JK))},EK=function(){(!nG||!nG.isPressed||nG.startX>zW.clientWidth)&&(fW.cache++,nG?wK||=requestAnimationFrame(JK):JK(),_G||MK(`scrollStart`),_G=hG())},DK=function(){aG=IW.innerWidth,iG=IW.innerHeight},OK=function(e){fW.cache++,(e===!0||!KW&&!tG&&!LW.fullscreenElement&&!LW.webkitFullscreenElement&&(!rG||aG!==IW.innerWidth||Math.abs(IW.innerHeight-iG)>IW.innerHeight*.25))&&VW.restart(!0)},kK={},AK=[],jK=function e(){return mK(uq,`scrollEnd`,e)||WK(!0)},MK=function(e){return kK[e]&&kK[e].map(function(e){return e()})||AK},NK=[],PK=function(e){for(var t=0;t<NK.length;t+=5)(!e||NK[t+4]&&NK[t+4].query===e)&&(NK[t].style.cssText=NK[t+1],NK[t].getBBox&&NK[t].setAttribute(`transform`,NK[t+2]||``),NK[t+3].uncache=1)},FK=function(){return fW.forEach(function(e){return IG(e)&&++e.cacheID&&(e.rec=e())})},IK=function(e,t){var n;for(YW=0;YW<SK.length;YW++)n=SK[YW],n&&(!t||n._ctx===t)&&(e?n.kill(1):n.revert(!0,!0));dG=!0,t&&PK(t),t||MK(`revert`)},LK=function(e,t){fW.cache++,(t||!RK)&&fW.forEach(function(e){return IG(e)&&e.cacheID++&&(e.rec=0)}),FG(e)&&(IW.history.scrollRestoration=cG=e)},RK,zK=0,BK,VK=function(){if(BK!==zK){var e=BK=zK;requestAnimationFrame(function(){return e===zK&&WK(!0)})}},HK=function(){zW.appendChild(lG),uG=!nG&&lG.offsetHeight||IW.innerHeight,zW.removeChild(lG)},UK=function(e){return HW(`.gsap-marker-start, .gsap-marker-end, .gsap-marker-scroller-start, .gsap-marker-scroller-end`).forEach(function(t){return t.style.display=e?`none`:`block`})},WK=function(e,t){if(RW=LW.documentElement,zW=LW.body,BW=[IW,LW,RW,zW],_G&&!e&&!dG){pK(uq,`scrollEnd`,jK);return}HK(),RK=uq.isRefreshing=!0,dG||FK();var n=MK(`refreshInit`);$W&&uq.sort(),t||IK(),fW.forEach(function(e){IG(e)&&(e.smooth&&(e.target.style.scrollBehavior=`auto`),e(0))}),SK.slice(0).forEach(function(e){return e.refresh()}),dG=!1,SK.forEach(function(e){if(e._subPinOffset&&e.pin){var t=e.vars.horizontal?`offsetWidth`:`offsetHeight`,n=e.pin[t];e.revert(!0,1),e.adjustPinSpacing(e.pin[t]-n),e.refresh()}}),fG=1,UK(!0),SK.forEach(function(e){var t=NG(e.scroller,e._dir),n=e.vars.end===`max`||e._endClamp&&e.end>t,r=e._startClamp&&e.start>=t;(n||r)&&e.setPositions(r?t-1:e.start,n?Math.max(r?t:e.start+1,t):e.end,!0)}),UK(!1),fG=0,n.forEach(function(e){return e&&e.render&&e.render(-1)}),fW.forEach(function(e){IG(e)&&(e.smooth&&requestAnimationFrame(function(){return e.target.style.scrollBehavior=`smooth`}),e.rec&&e(e.rec))}),LK(cG,1),VW.pause(),zK++,RK=2,JK(2),SK.forEach(function(e){return IG(e.vars.onRefresh)&&e.vars.onRefresh(e)}),RK=uq.isRefreshing=!1,MK(`refresh`)},GK=0,KK=1,qK,JK=function(e){if(e===2||!RK&&!dG){uq.isUpdating=!0,qK&&qK.update(0);var t=SK.length,n=hG(),r=n-gG>=50,i=t&&SK[0].scroll();if(KK=GK>i?-1:1,RK||(GK=i),r&&(_G&&!qW&&n-_G>200&&(_G=0,MK(`scrollEnd`)),WW=gG,gG=n),KK<0){for(YW=t;YW-- >0;)SK[YW]&&SK[YW].update(0,r);KK=1}else for(YW=0;YW<t;YW++)SK[YW]&&SK[YW].update(0,r);uq.isUpdating=!1}wK=0},YK=[HG,UG,GG,WG,$G+ZG,$G+JG,$G+XG,$G+YG,`display`,`flexShrink`,`float`,`zIndex`,`gridColumnStart`,`gridColumnEnd`,`gridRowStart`,`gridRowEnd`,`gridArea`,`justifySelf`,`alignSelf`,`placeSelf`,`order`],XK=YK.concat([KG,qG,`boxSizing`,`max`+eK,`max`+tK,`position`,$G,QG,QG+XG,QG+JG,QG+ZG,QG+YG]),ZK=function(e,t,n){eq(n);var r=e._gsap;if(r.spacerIsNative)eq(r.spacerState);else if(e._gsap.swappedIn){var i=t.parentNode;i&&(i.insertBefore(e,t),i.removeChild(t))}e._gsap.swappedIn=!1},QK=function(e,t,n,r){if(!e._gsap.swappedIn){for(var i=YK.length,a=t.style,o=e.style,s;i--;)s=YK[i],a[s]=n[s];a.position=n.position===`absolute`?`absolute`:`relative`,n.display===`inline`&&(a.display=`inline-block`),o[GG]=o[WG]=`auto`,a.flexBasis=n.flexBasis||`auto`,a.overflow=`visible`,a.boxSizing=`border-box`,a[KG]=sK(e,wW)+nK,a[qG]=sK(e,TW)+nK,a[QG]=o[$G]=o[UG]=o[HG]=`0`,eq(r),o[KG]=o[`max`+eK]=n[KG],o[qG]=o[`max`+tK]=n[qG],o[QG]=n[QG],e.parentNode!==t&&(e.parentNode.insertBefore(t,e),t.appendChild(e)),e._gsap.swappedIn=!0}},$K=/([A-Z])/g,eq=function(e){if(e){var t=e.t.style,n=e.length,r=0,i,a;for((e.t._gsap||PW.core.getCache(e.t)).uncache=1;r<n;r+=2)a=e[r+1],i=e[r],a?t[i]=a:t[i]&&t.removeProperty(i.replace($K,`-$1`).toLowerCase())}},tq=function(e){for(var t=XK.length,n=e.style,r=[],i=0;i<t;i++)r.push(XK[i],n[XK[i]]);return r.t=e,r},nq=function(e,t,n){for(var r=[],i=e.length,a=n?8:0,o;a<i;a+=2)o=e[a],r.push(o,o in t?t[o]:e[a+1]);return r.t=e.t,r},rq={left:0,top:0},iq=function(e,t,n,r,i,a,o,s,c,l,u,d,f,p){IG(e)&&(e=e(s)),FG(e)&&e.substr(0,3)===`max`&&(e=d+(e.charAt(4)===`=`?yK(`0`+e.substr(3),n):0));var m=f?f.time():0,h,g,_;if(f&&f.seek(0),isNaN(e)||(e=+e),LG(e))f&&(e=PW.utils.mapRange(f.scrollTrigger.start,f.scrollTrigger.end,0,d,e)),o&&xK(o,n,r,!0);else{IG(t)&&(t=t(s));var v=(e||`0`).split(` `),y,b,x,S;_=EW(t,s)||zW,y=oK(_)||{},(!y||!y.left&&!y.top)&&rK(_).display===`none`&&(S=_.style.display,_.style.display=`block`,y=oK(_),S?_.style.display=S:_.style.removeProperty(`display`)),b=yK(v[0],y[r.d]),x=yK(v[1]||`0`,n),e=y[r.p]-c[r.p]-l+b+i-x,o&&xK(o,x,r,n-x<20||o._isStart&&x>20),n-=n-x}if(p&&(s[p]=e||-.001,e<0&&(e=0)),a){var C=e+n,w=a._isStart;h=`scroll`+r.d2,xK(a,C,r,w&&C>20||!w&&(u?Math.max(zW[h],RW[h]):a.parentNode[h])<=C+1),u&&(c=oK(o),u&&(
vendor: 8,589 bytes, line 36
36a.style[r.op.p]=c[r.op.p]-r.op.m-a._offset+nK))}return f&&_&&(h=oK(_),f.seek(d),g=oK(_),f._caScrollDist=h[r.p]-g[r.p],e=e/f._caScrollDist*d),f&&f.seek(m),f?e:Math.round(e)},aq=/(webkit|moz|length|cssText|inset)/i,oq=function(e,t,n,r){if(e.parentNode!==t){var i=e.style,a,o;if(t===zW){for(a in e._stOrig=i.cssText,o=rK(e),o)!+a&&!aq.test(a)&&o[a]&&typeof i[a]==`string`&&a!==`0`&&(i[a]=o[a]);i.top=n,i.left=r}else i.cssText=e._stOrig;PW.core.getCache(e).uncache=1,t.appendChild(e)}},sq=function(e,t,n){var r=t,i=r;return function(t){var a=Math.round(e());return a!==r&&a!==i&&Math.abs(a-r)>3&&Math.abs(a-i)>3&&(t=a,n&&n()),i=r,r=Math.round(t),r}},cq=function(e,t,n){var r={};r[t.p]=`+=`+n,PW.set(e,r)},lq=function(e,t){var n=DW(e,t),r=`_scroll`+t.p2,i=function t(i,a,o,s,c){var l=t.tween,u=a.onComplete,d={};o||=n();var f=sq(n,o,function(){l.kill(),t.tween=0});return c=s&&c||0,s||=i-o,l&&l.kill(),a[r]=i,a.inherit=!1,a.modifiers=d,d[r]=function(){return f(o+s*l.ratio+c*l.ratio*l.ratio)},a.onUpdate=function(){fW.cache++,t.tween&&JK()},a.onComplete=function(){t.tween=0,u&&u.call(l)},l=t.tween=PW.to(e,a),l};return e[r]=n,n.wheelHandler=function(){return i.tween&&i.tween.kill()&&(i.tween=0)},pK(e,`wheel`,n.wheelHandler),uq.isTouch&&pK(e,`touchmove`,n.wheelHandler),i},uq=function(){function e(t,n){FW||e.register(PW)||console.warn(`Please gsap.registerPlugin(ScrollTrigger)`),sG(this),this.init(t,n)}var t=e.prototype;return t.init=function(t,n){if(this.progress=this.start=0,this.vars&&this.kill(!0,!0),!vG){this.update=this.refresh=this.kill=wG;return}t=aK(FG(t)||LG(t)||t.nodeType?{trigger:t}:t,_K);var r=t,i=r.onUpdate,a=r.toggleClass,o=r.id,s=r.onToggle,c=r.onRefresh,l=r.scrub,u=r.trigger,d=r.pin,f=r.pinSpacing,p=r.invalidateOnRefresh,m=r.anticipatePin,h=r.onScrubComplete,g=r.onSnapComplete,_=r.once,v=r.snap,y=r.pinReparent,b=r.pinSpacer,x=r.containerAnimation,S=r.fastScrollEnd,C=r.preventOverlaps,w=t.horizontal||t.containerAnimation&&t.horizontal!==!1?wW:TW,T=!l&&l!==0,E=EW(t.scroller||IW),D=PW.core.getCache(E),O=OG(E),k=(`pinType`in t?t.pinType:gW(E,`pinType`)||O&&`fixed`)===`fixed`,A=[t.onEnter,t.onLeave,t.onEnterBack,t.onLeaveBack],j=T&&t.toggleActions.split(` `),M=`markers`in t?t.markers:_K.markers,N=O?0:parseFloat(rK(E)[`border`+w.p2+eK])||0,P=this,F=t.onRefreshInit&&function(){return t.onRefreshInit(P)},ee=jG(E,O,w),I=MG(E,O),te=0,ne=0,re=0,ie=DW(E,w),ae,oe,se,ce,le,ue,de,fe,L,pe,me,he,ge,_e,ve,ye,be,xe,Se,Ce,we,Te,Ee,De,Oe,ke,Ae,je,Me,Ne,Pe,Fe,Ie,Le,Re,ze,Be,Ve,He;if(P._startClamp=P._endClamp=!1,P._dir=w,m*=45,P.scroller=E,P.scroll=x?x.time.bind(x):ie,ce=ie(),P.vars=t,n||=t.animation,`refreshPriority`in t&&($W=1,t.refreshPriority===-9999&&(qK=P)),D.tweenScroll=D.tweenScroll||{top:lq(E,TW),left:lq(E,wW)},P.tweenTo=ae=D.tweenScroll[w.p],P.scrubDuration=function(e){Ie=LG(e)&&e,Ie?Fe?Fe.duration(e):Fe=PW.to(n,{ease:`expo`,totalProgress:`+=0`,inherit:!1,duration:Ie,paused:!0,onComplete:function(){return h&&h(P)}}):(Fe&&Fe.progress(1).kill(),Fe=0)},n&&(n.vars.lazy=!1,n._initted&&!P.isReverted||n.vars.immediateRender!==!1&&t.immediateRender!==!1&&n.duration()&&n.render(0,!0,!0),P.animation=n.pause(),n.scrollTrigger=P,P.scrubDuration(l),Ne=0,o||=n.vars.id),v&&((!RG(v)||v.push)&&(v={snapTo:v}),`scrollBehavior`in zW.style&&PW.set(O?[zW,RW]:E,{scrollBehavior:`auto`}),fW.forEach(function(e){return IG(e)&&e.target===(O?LW.scrollingElement||RW:E)&&(e.smooth=!1)}),se=IG(v.snapTo)?v.snapTo:v.snapTo===`labels`?lK(n):v.snapTo===`labelsDirectional`?dK(n):v.directional===!1?PW.utils.snap(v.snapTo):function(e,t){return uK(v.snapTo)(e,hG()-ne<500?0:t.direction)},Le=v.duration||{min:.1,max:2},Le=RG(Le)?UW(Le.min,Le.max):UW(Le,Le),Re=PW.delayedCall(v.delay||Ie/2||.1,function(){var e=ie(),t=hG()-ne<500,r=ae.tween;if((t||Math.abs(P.getVelocity())<10)&&!r&&!qW&&te!==e){var i=(e-ue)/_e,a=n&&!T?n.totalProgress():i,o=t?0:(a-Pe)/(hG()-WW)*1e3||0,s=PW.utils.clamp(-i,1-i,VG(o/2)*o/.185),c=i+(v.inertia===!1?0:s),l,u,d=v,f=d.onStart,p=d.onInterrupt,m=d.onComplete;if(l=se(c,P),LG(l)||(l=c),u=Math.max(0,Math.round(ue+l*_e)),e<=de&&e>=ue&&u!==e){if(r&&!r._initted&&r.data<=VG(u-e))return;v.inertia===!1&&(s=l-i),ae(u,{duration:Le(VG(Math.max(VG(c-a),VG(l-a))*.185/o/.05||0)),ease:v.ease||`power3`,data:VG(u-e),onInterrupt:function(){return Re.restart(!0)&&p&&BG(P,p)},onComplete:function(){P.update(),te=ie(),n&&!T&&(Fe?Fe.resetTo(`totalProgress`,l,n._tTime/n._tDur):n.progress(l)),Ne=Pe=n&&!T?n.totalProgress():P.progress,g&&g(P),m&&BG(P,m)}},e,s*_e,u-e-s*_e),f&&BG(P,f,ae.tween)}}else P.isActive&&te!==e&&Re.restart(!0)}).pause()),o&&(CK[o]=P),u=P.trigger=EW(u||d!==!0&&d),He=u&&u._gsap&&u._gsap.stRevert,He&&=He(P),d=d===!0?u:EW(d),FG(a)&&(a={targets:u,className:a}),d&&(f===!1||f===$G||(f=!f&&d.parentNode&&d.parentNode.style&&rK(d.parentNode).display===`flex`?!1:QG),P.pin=d,oe=PW.core.getCache(d),oe.spacer?ve=oe.pinState:(b&&(b=EW(b),b&&!b.nodeType&&(b=b.current||b.nativeElement),oe.spacerIsNative=!!b,b&&(oe.spacerState=tq(b))),oe.spacer=xe=b||LW.createElement(`div`),xe.classList.add(`pin-spacer`),o&&xe.classList.add(`pin-spacer-`+o),oe.pinState=ve=tq(d)),t.force3D!==!1&&PW.set(d,{force3D:!0}),P.spacer=xe=oe.spacer,Me=rK(d),De=Me[f+w.os2],Ce=PW.getProperty(d),we=PW.quickSetter(d,w.a,nK),QK(d,xe,Me),be=tq(d)),M){he=RG(M)?aK(M,gK):gK,pe=bK(`scroller-start`,o,E,w,he,0),me=bK(`scroller-end`,o,E,w,he,0,pe),Se=pe[`offset`+w.op.d2];var Ue=EW(gW(E,`content`)||E);fe=this.markerStart=bK(`start`,o,Ue,w,he,Se,0,x),L=this.markerEnd=bK(`end`,o,Ue,w,he,Se,0,x),x&&(Ve=PW.quickSetter([fe,L],w.a,nK)),!k&&!(pW.length&&gW(E,`fixedMarkers`)===!0)&&(iK(O?zW:E),PW.set([pe,me],{force3D:!0}),ke=PW.quickSetter(pe,w.a,nK),je=PW.quickSetter(me,w.a,nK))}if(x){var We=x.vars.onUpdate,Ge=x.vars.onUpdateParams;x.eventCallback(`onUpdate`,function(){P.update(0,0,1),We&&We.apply(x,Ge||[])})}if(P.previous=function(){return SK[SK.indexOf(P)-1]},P.next=function(){return SK[SK.indexOf(P)+1]},P.revert=function(e,t){if(!t)return P.kill(!0);var r=e!==!1||!P.enabled,i=KW;r!==P.isReverted&&(r&&(ze=Math.max(ie(),P.scroll.rec||0),re=P.progress,Be=n&&n.progress()),fe&&[fe,L,pe,me].forEach(function(e){return e.style.display=r?`none`:`block`}),r&&(KW=P,P.update(r)),d&&(!y||!P.isActive)&&(r?ZK(d,xe,ve):QK(d,xe,rK(d),Oe)),r||P.update(r),KW=i,P.isReverted=r)},P.refresh=function(r,i,a,o){if(!((KW||!P.enabled)&&!i)){if(d&&r&&_G){pK(e,`scrollEnd`,jK);return}!RK&&F&&F(P),KW=P,ae.tween&&!a&&(ae.tween.kill(),ae.tween=0),Fe&&Fe.pause(),p&&n&&(n.revert({kill:!1}).invalidate(),n.getChildren?n.getChildren(!0,!0,!1).forEach(function(e){return e.vars.immediateRender&&e.render(0,!0,!0)}):n.vars.immediateRender&&n.render(0,!0,!0)),P.isReverted||P.revert(!0,!0),P._subPinOffset=!1;var s=ee(),l=I(),m=x?x.duration():NG(E,w),h=_e<=.01||!_e,g=0,_=o||0,v=RG(a)?a.end:t.end,b=t.endTrigger||u,S=RG(a)?a.start:t.start||(t.start===0||!u?0:d?`0 0`:`0 100%`),C=P.pinnedContainer=t.pinnedContainer&&EW(t.pinnedContainer,P),D=u&&Math.max(0,SK.indexOf(P))||0,A=D,j,oe,se,he,Se,we,De,ke,je,Me,Ne,Pe,Ie;for(M&&RG(a)&&(Pe=PW.getProperty(pe,w.p),Ie=PW.getProperty(me,w.p));A-- >0;)we=SK[A],we.end||we.refresh(0,1)||(KW=P),De=we.pin,De&&(De===u||De===d||De===C)&&!we.isReverted&&(Me||=[],Me.unshift(we),we.revert(!0,!0)),we!==SK[A]&&(D--,A--);for(IG(S)&&(S=S(P)),S=yG(S,`start`,P),ue=iq(S,u,s,w,ie(),fe,pe,P,l,N,k,m,x,P._startClamp&&`_startClamp`)||(d?-.001:0),IG(v)&&(v=v(P)),FG(v)&&!v.indexOf(`+=`)&&(~v.indexOf(` `)?v=(FG(S)?S.split(` `)[0]:``)+v:(g=yK(v.substr(2),s),v=FG(S)?S:(x?PW.utils.mapRange(0,x.duration(),x.scrollTrigger.start,x.scrollTrigger.end,ue):ue)+g,b=u)),v=yG(v,`end`,P),de=Math.max(ue,iq(v||(b?`100% 0`:m),b,s,w,ie()+g,L,me,P,l,N,k,m,x,P._endClamp&&`_endClamp`))||-.001,g=0,A=D;A--;)we=SK[A]||{},De=we.pin,De&&we.start-we._pinPush<=ue&&!x&&we.end>0&&(j=we.end-(P._startClamp?Math.max(0,we.start):we.start),(De===u&&we.start-we._pinPush<ue||De===C)&&isNaN(S)&&(g+=j*(1-we.progress)),De===d&&(_+=j));if(ue+=g,de+=g,P._startClamp&&(P._startClamp+=g),P._endClamp&&!RK&&(P._endClamp=de||-.001,de=Math.min(de,NG(E,w))),_e=de-ue||(ue-=.01)&&.001,h&&(re=PW.utils.clamp(0,1,PW.utils.normalize(ue,de,ze))),P._pinPush=_,fe&&g&&(j={},j[w.a]=`+=`+g,C&&(j[w.p]=`-=`+ie()),PW.set([fe,L],j)),d&&!(fG&&P.end>=NG(E,w)))j=rK(d),he=w===TW,se=ie(),Te=parseFloat(Ce(w.a))+_,!m&&de>1&&(Ne=(O?LW.scrollingElement||RW:E).style,Ne={style:Ne,value:Ne[`overflow`+w.a.toUpperCase()]},O&&rK(zW)[`overflow`+w.a.toUpperCase()]!==`scroll`&&(Ne.style[`overflow`+w.a.toUpperCase()]=`scroll`)),QK(d,xe,j),be=tq(d),oe=oK(d,!0),ke=k&&DW(E,he?wW:TW)(),f?(Oe=[f+w.os2,_e+_+nK],Oe.t=xe,A=f===QG?sK(d,w)+_e+_:0,A&&(Oe.push(w.d,A
vendor: 4,521 bytes, line 36
36+nK),xe.style.flexBasis!==`auto`&&(xe.style.flexBasis=A+nK)),eq(Oe),C&&SK.forEach(function(e){e.pin===C&&e.vars.pinSpacing!==!1&&(e._subPinOffset=!0)}),k&&ie(ze)):(A=sK(d,w),A&&xe.style.flexBasis!==`auto`&&(xe.style.flexBasis=A+nK)),k&&(Se={top:oe.top+(he?se-ue:ke)+nK,left:oe.left+(he?ke:se-ue)+nK,boxSizing:`border-box`,position:`fixed`},Se[KG]=Se[`max`+eK]=Math.ceil(oe.width)+nK,Se[qG]=Se[`max`+tK]=Math.ceil(oe.height)+nK,Se[$G]=Se[$G+XG]=Se[$G+JG]=Se[$G+ZG]=Se[$G+YG]=`0`,Se[QG]=j[QG],Se[QG+XG]=j[QG+XG],Se[QG+JG]=j[QG+JG],Se[QG+ZG]=j[QG+ZG],Se[QG+YG]=j[QG+YG],ye=nq(ve,Se,y),RK&&ie(0)),n?(je=n._initted,eG(1),n.render(n.duration(),!0,!0),Ee=Ce(w.a)-Te+_e+_,Ae=Math.abs(_e-Ee)>1,k&&Ae&&ye.splice(ye.length-2,2),n.render(0,!0,!0),je||n.invalidate(!0),n.parent||n.totalTime(n.totalTime()),eG(0)):Ee=_e,Ne&&(Ne.value?Ne.style[`overflow`+w.a.toUpperCase()]=Ne.value:Ne.style.removeProperty(`overflow-`+w.a));else if(u&&ie()&&!x)for(oe=u.parentNode;oe&&oe!==zW;)oe._pinOffset&&(ue-=oe._pinOffset,de-=oe._pinOffset),oe=oe.parentNode;Me&&Me.forEach(function(e){return e.revert(!1,!0)}),P.start=ue,P.end=de,ce=le=RK?ze:ie(),!x&&!RK&&(ce<ze&&ie(ze),P.scroll.rec=0),P.revert(!1,!0),ne=hG(),Re&&(te=-1,Re.restart(!0)),KW=0,n&&T&&(n._initted||Be)&&n.progress()!==Be&&n.progress(Be||0,!0).render(n.time(),!0,!0),(h||re!==P.progress||x||p||n&&!n._initted)&&(n&&!T&&(n._initted||re||n.vars.immediateRender!==!1)&&n.totalProgress(x&&ue<-.001&&!re?PW.utils.normalize(ue,de,0):re,!0),P.progress=h||(ce-ue)/_e===re?0:re),d&&f&&(xe._pinOffset=Math.round(P.progress*Ee)),Fe&&Fe.invalidate(),isNaN(Pe)||(Pe-=PW.getProperty(pe,w.p),Ie-=PW.getProperty(me,w.p),cq(pe,w,Pe),cq(fe,w,Pe-(o||0)),cq(me,w,Ie),cq(L,w,Ie-(o||0))),h&&!RK&&P.update(),c&&!RK&&!ge&&(ge=!0,c(P),ge=!1)}},P.getVelocity=function(){return(ie()-le)/(hG()-WW)*1e3||0},P.endAnimation=function(){zG(P.callbackAnimation),n&&(Fe?Fe.progress(1):n.paused()?T||zG(n,P.direction<0,1):zG(n,n.reversed()))},P.labelToScroll=function(e){return n&&n.labels&&(ue||P.refresh()||ue)+n.labels[e]/n.duration()*_e||0},P.getTrailing=function(e){var t=SK.indexOf(P),n=P.direction>0?SK.slice(0,t).reverse():SK.slice(t+1);return(FG(e)?n.filter(function(t){return t.vars.preventOverlaps===e}):n).filter(function(e){return P.direction>0?e.end<=ue:e.start>=de})},P.update=function(e,t,r){if(!(x&&!r&&!e)){var o=RK===!0?ze:P.scroll(),c=e?0:(o-ue)/_e,u=c<0?0:c>1?1:c||0,p=P.progress,h,g,b,D,O,M,N,F;if(t&&(le=ce,ce=x?ie():o,v&&(Pe=Ne,Ne=n&&!T?n.totalProgress():u)),m&&d&&!KW&&!mG&&_G&&(!u&&ue<o+(o-le)/(hG()-WW)*m?u=1e-4:u===1&&de>o+(o-le)/(hG()-WW)*m&&(u=.9999)),u!==p&&P.enabled){if(h=P.isActive=!!u&&u<1,g=!!p&&p<1,M=h!==g,O=M||!!u!=!!p,P.direction=u>p?1:-1,P.progress=u,O&&!KW&&(b=u&&!p?0:u===1?1:p===1?2:3,T&&(D=!M&&j[b+1]!==`none`&&j[b+1]||j[b],F=n&&(D===`complete`||D===`reset`||D in n))),C&&(M||F)&&(F||l||!n)&&(IG(C)?C(P):P.getTrailing(C).forEach(function(e){return e.endAnimation()})),T||(Fe&&!KW&&!mG?(Fe._dp._time-Fe._start!==Fe._time&&Fe.render(Fe._dp._time-Fe._start),Fe.resetTo?Fe.resetTo(`totalProgress`,u,n._tTime/n._tDur):(Fe.vars.totalProgress=u,Fe.invalidate().restart())):n&&n.totalProgress(u,!!(KW&&(ne||e)))),d){if(e&&f&&(xe.style[f+w.os2]=De),!k)we(TG(Te+Ee*u));else if(O){if(N=!e&&u>p&&de+1>o&&o+1>=NG(E,w),y)if(!e&&(h||N)){var ee=oK(d,!0),I=o-ue;oq(d,zW,ee.top+(w===TW?I:0)+nK,ee.left+(w===TW?0:I)+nK)}else oq(d,xe);eq(h||N?ye:be),Ae&&u<1&&h||we(Te+(u===1&&!N?Ee:0))}}v&&!ae.tween&&!KW&&!mG&&Re.restart(!0),a&&(M||_&&u&&(u<1||!pG))&&HW(a.targets).forEach(function(e){return e.classList[h||_?`add`:`remove`](a.className)}),i&&!T&&!e&&i(P),O&&!KW?(T&&(F&&(D===`complete`?n.pause().totalProgress(1):D===`reset`?n.restart(!0).pause():D===`restart`?n.restart(!0):n[D]()),i&&i(P)),(M||!pG)&&(s&&M&&BG(P,s),A[b]&&BG(P,A[b]),_&&(u===1?P.kill(!1,1):A[b]=0),M||(b=u===1?1:3,A[b]&&BG(P,A[b]))),S&&!h&&Math.abs(P.getVelocity())>(LG(S)?S:2500)&&(zG(P.callbackAnimation),Fe?Fe.progress(1):zG(n,D===`reverse`?1:!u,1))):T&&i&&!KW&&i(P)}if(je){var te=x?o/x.duration()*(x._caScrollDist||0):o;ke(te+ +!!pe._isFlipped),je(te)}Ve&&Ve(-o/x.duration()*(x._caScrollDist||0))}},P.enable=function(t,n){P.enabled||(P.enabled=!0,pK(E,`resize`,OK),O||pK(E,`scroll`,EK),F&&pK(e,`refreshInit`,F),t!==!1&&(P.progress=re=0,ce=le=te=ie()),n!==!1&&P.refresh())},P.getTween=function(e){return e&&ae?ae.tween:Fe},P.setPositions=function(e,t,n,r){if(x){var i=x.scrollTrigger,a=x.duration(),o=i.end-i.start;e=i.start+o*e/a,t=i.start+o*t/a}P.refresh(!1,!1,{start:bG(e,n&&!!P._startClamp),end:bG(t,n&&!!P._endClamp)}
vendor: 4,247 bytes, line 36
36,r),P.update()},P.adjustPinSpacing=function(e){if(Oe&&e){var t=Oe.indexOf(w.d)+1;Oe[t]=parseFloat(Oe[t])+e+nK,Oe[1]=parseFloat(Oe[1])+e+nK,eq(Oe)}},P.disable=function(t,n){if(t!==!1&&P.revert(!0,!0),P.enabled&&(P.enabled=P.isActive=!1,n||Fe&&Fe.pause(),ze=0,oe&&(oe.uncache=1),F&&mK(e,`refreshInit`,F),Re&&(Re.pause(),ae.tween&&ae.tween.kill()&&(ae.tween=0)),!O)){for(var r=SK.length;r--;)if(SK[r].scroller===E&&SK[r]!==P)return;mK(E,`resize`,OK),O||mK(E,`scroll`,EK)}},P.kill=function(e,r){P.disable(e,r),Fe&&!r&&Fe.kill(),o&&delete CK[o];var i=SK.indexOf(P);i>=0&&SK.splice(i,1),i===YW&&KK>0&&YW--,i=0,SK.forEach(function(e){return e.scroller===P.scroller&&(i=1)}),i||RK||(P.scroll.rec=0),n&&(n.scrollTrigger=null,e&&n.revert({kill:!1}),r||n.kill()),fe&&[fe,L,pe,me].forEach(function(e){return e.parentNode&&e.parentNode.removeChild(e)}),qK===P&&(qK=0),d&&(oe&&(oe.uncache=1),i=0,SK.forEach(function(e){return e.pin===d&&i++}),i||(oe.spacer=0)),t.onKill&&t.onKill(P)},SK.push(P),P.enable(!1,!1),He&&He(P),n&&n.add&&!_e){var Ke=P.update;P.update=function(){P.update=Ke,fW.cache++,ue||de||P.refresh()},PW.delayedCall(.01,P.update),_e=.01,ue=de=0}else P.refresh();d&&VK()},e.register=function(t){return FW||=(PW=t||DG(),EG()&&window.document&&e.enable(),vG),FW},e.defaults=function(e){if(e)for(var t in e)_K[t]=e[t];return _K},e.disable=function(e,t){vG=0,SK.forEach(function(n){return n[t?`kill`:`disable`](e)}),mK(IW,`wheel`,EK),mK(LW,`scroll`,EK),clearInterval(GW),mK(LW,`touchcancel`,wG),mK(zW,`touchstart`,wG),fK(mK,LW,`pointerdown,touchstart,mousedown`,SG),fK(mK,LW,`pointerup,touchend,mouseup`,CG),VW.kill(),PG(mK);for(var n=0;n<fW.length;n+=3)hK(mK,fW[n],fW[n+1]),hK(mK,fW[n],fW[n+2])},e.enable=function(){if(IW=window,LW=document,RW=LW.documentElement,zW=LW.body,PW)if(HW=PW.utils.toArray,UW=PW.utils.clamp,sG=PW.core.context||wG,eG=PW.core.suppressOverwrites||wG,cG=IW.history.scrollRestoration||`auto`,GK=IW.pageYOffset||0,PW.core.globals(`ScrollTrigger`,e),zW){vG=1,lG=document.createElement(`div`),lG.style.height=`100vh`,lG.style.position=`absolute`,HK(),xG(),NW.register(PW),e.isTouch=NW.isTouch,oG=NW.isTouch&&/(iPad|iPhone|iPod|Mac)/g.test(navigator.userAgent),rG=NW.isTouch===1,pK(IW,`wheel`,EK),BW=[IW,LW,RW,zW],PW.matchMedia?(e.matchMedia=function(e){var t=PW.matchMedia(),n;for(n in e)t.add(n,e[n]);return t},PW.addEventListener(`matchMediaInit`,function(){FK(),IK()}),PW.addEventListener(`matchMediaRevert`,function(){return PK()}),PW.addEventListener(`matchMedia`,function(){WK(0,1),MK(`matchMedia`)}),PW.matchMedia().add(`(orientation: portrait)`,function(){return DK(),DK})):console.warn(`Requires GSAP 3.11.0 or later`),DK(),pK(LW,`scroll`,EK);var t=zW.hasAttribute(`style`),n=zW.style,r=n.borderTopStyle,i=PW.core.Animation.prototype,a,o;for(i.revert||Object.defineProperty(i,`revert`,{value:function(){return this.time(-.01,!0)}}),n.borderTopStyle=`solid`,a=oK(zW),TW.m=Math.round(a.top+TW.sc())||0,wW.m=Math.round(a.left+wW.sc())||0,r?n.borderTopStyle=r:n.removeProperty(`border-top-style`),t||(zW.setAttribute(`style`,``),zW.removeAttribute(`style`)),GW=setInterval(TK,250),PW.delayedCall(.5,function(){return mG=0}),pK(LW,`touchcancel`,wG),pK(zW,`touchstart`,wG),fK(pK,LW,`pointerdown,touchstart,mousedown`,SG),fK(pK,LW,`pointerup,touchend,mouseup`,CG),JW=PW.utils.checkPrefix(`transform`),XK.push(JW),FW=hG(),VW=PW.delayedCall(.2,WK).pause(),QW=[LW,`visibilitychange`,function(){var e=IW.innerWidth,t=IW.innerHeight;LW.hidden?(XW=e,ZW=t):(XW!==e||ZW!==t)&&OK()},LW,`DOMContentLoaded`,WK,IW,`load`,WK,IW,`resize`,OK],PG(pK),SK.forEach(function(e){return e.enable(0,1)}),o=0;o<fW.length;o+=3)hK(mK,fW[o],fW[o+1]),hK(mK,fW[o],fW[o+2])}else LW&&LW.addEventListener(`DOMContentLoaded`,function t(){e.enable(),LW.removeEventListener(`DOMContentLoaded`,t)})},e.config=function(t){`limitCallbacks`in t&&(pG=!!t.limitCallbacks);var n=t.syncInterval;n&&clearInterval(GW)||(GW=n)&&setInterval(TK,n),`ignoreMobileResize`in t&&(rG=e.isTouch===1&&t.ignoreMobileResize),`autoRefreshEvents`in t&&(PG(mK)||PG(pK,t.autoRefreshEvents||`none`),tG=(t.autoRefreshEvents+``).indexOf(`resize`)===-1)},e.scrollerProxy=function(e,t){var n=EW(e),r=fW.indexOf(n),i=OG(n);~r&&fW.splice(r,i?6:2),t&&(i?pW.unshift(IW,t,zW,t,RW,t):pW.unshift(n,t))}
vendor: 4,787 bytes, line 36
36,e.clearMatchMedia=function(e){SK.forEach(function(t){return t._ctx&&t._ctx.query===e&&t._ctx.kill(!0,!0)})},e.isInViewport=function(e,t,n){var r=(FG(e)?EW(e):e).getBoundingClientRect(),i=r[n?KG:qG]*t||0;return n?r.right-i>0&&r.left+i<IW.innerWidth:r.bottom-i>0&&r.top+i<IW.innerHeight},e.positionInViewport=function(e,t,n){FG(e)&&(e=EW(e));var r=e.getBoundingClientRect(),i=r[n?KG:qG],a=t==null?i/2:t in vK?vK[t]*i:~t.indexOf(`%`)?parseFloat(t)*i/100:parseFloat(t)||0;return n?(r.left+a)/IW.innerWidth:(r.top+a)/IW.innerHeight},e.killAll=function(e){if(SK.slice(0).forEach(function(e){return e.vars.id!==`ScrollSmoother`&&e.kill()}),e!==!0){var t=kK.killAll||[];kK={},t.forEach(function(e){return e()})}},e}();uq.version=`3.15.0`,uq.saveStyles=function(e){return e?HW(e).forEach(function(e){if(e&&e.style){var t=NK.indexOf(e);t>=0&&NK.splice(t,5),NK.push(e,e.style.cssText,e.getBBox&&e.getAttribute(`transform`),PW.core.getCache(e),sG())}}):NK},uq.revert=function(e,t){return IK(!e,t)},uq.create=function(e,t){return new uq(e,t)},uq.refresh=function(e){return e?OK(!0):(FW||uq.register())&&WK(!0)},uq.update=function(e){return++fW.cache&&JK(e===!0?2:0)},uq.clearScrollMemory=LK,uq.maxScroll=function(e,t){return NG(e,t?wW:TW)},uq.getScrollFunc=function(e,t){return DW(EW(e),t?wW:TW)},uq.getById=function(e){return CK[e]},uq.getAll=function(){return SK.filter(function(e){return e.vars.id!==`ScrollSmoother`})},uq.isScrolling=function(){return!!_G},uq.snapDirectional=uK,uq.addEventListener=function(e,t){var n=kK[e]||(kK[e]=[]);~n.indexOf(t)||n.push(t)},uq.removeEventListener=function(e,t){var n=kK[e],r=n&&n.indexOf(t);r>=0&&n.splice(r,1)},uq.batch=function(e,t){var n=[],r={},i=t.interval||.016,a=t.batchMax||1e9,o=function(e,t){var n=[],r=[],o=PW.delayedCall(i,function(){t(n,r),n=[],r=[]}).pause();return function(e){n.length||o.restart(!0),n.push(e.trigger),r.push(e),a<=n.length&&o.progress(1)}},s;for(s in t)r[s]=s.substr(0,2)===`on`&&IG(t[s])&&s!==`onRefreshInit`?o(s,t[s]):t[s];return IG(a)&&(a=a(),pK(uq,`refresh`,function(){return a=t.batchMax()})),HW(e).forEach(function(e){var t={};for(s in r)t[s]=r[s];t.trigger=e,n.push(uq.create(t))}),n};var dq=function(e,t,n,r){return t>r?e(r):t<0&&e(0),n>r?(r-t)/(n-t):n<0?t/(t-n):1},fq=function e(t,n){n===!0?t.style.removeProperty(`touch-action`):t.style.touchAction=n===!0?`auto`:n?`pan-`+n+(NW.isTouch?` pinch-zoom`:``):`none`,t===RW&&e(zW,n)},pq={auto:1,scroll:1},mq=function(e){var t=e.event,n=e.target,r=e.axis,i=(t.changedTouches?t.changedTouches[0]:t).target,a=i._gsap||PW.core.getCache(i),o=hG(),s;if(!a._isScrollT||o-a._isScrollT>2e3){for(;i&&i!==zW&&(i.scrollHeight<=i.clientHeight&&i.scrollWidth<=i.clientWidth||!(pq[(s=rK(i)).overflowY]||pq[s.overflowX]));)i=i.parentNode;a._isScroll=i&&i!==n&&!OG(i)&&(pq[(s=rK(i)).overflowY]||pq[s.overflowX]),a._isScrollT=o}(a._isScroll||r===`x`)&&(t.stopPropagation(),t._gsapAllow=!0)},hq=function(e,t,n,r){return NW.create({target:e,capture:!0,debounce:!1,lockAxis:!0,type:t,onWheel:r&&=mq,onPress:r,onDrag:r,onScroll:r,onEnable:function(){return n&&pK(LW,NW.eventTypes[0],vq,!1,!0)},onDisable:function(){return mK(LW,NW.eventTypes[0],vq,!0)}})},gq=/(input|label|select|textarea)/i,_q,vq=function(e){var t=gq.test(e.target.tagName);(t||_q)&&(e._gsapAllow=!0,_q=t)},yq=function(e){RG(e)||(e={}),e.preventDefault=e.isNormalizer=e.allowClicks=!0,e.type||=`wheel,touch`,e.debounce=!!e.debounce,e.id=e.id||`normalizer`;var t=e,n=t.normalizeScrollX,r=t.momentum,i=t.allowNestedScroll,a=t.onRelease,o,s,c=EW(e.target)||RW,l=PW.core.globals().ScrollSmoother,u=l&&l.get(),d=oG&&(e.content&&EW(e.content)||u&&e.content!==!1&&!u.smooth()&&u.content()),f=DW(c,TW),p=DW(c,wW),m=1,h=(NW.isTouch&&IW.visualViewport?IW.visualViewport.scale*IW.visualViewport.width:IW.outerWidth)/IW.innerWidth,g=0,_=IG(r)?function(){return r(o)}:function(){return r||2.8},v,y,b=hq(c,e.type,!0,i),x=function(){return y=!1},S=wG,C=wG,w=function(){s=NG(c,TW),C=UW(+!!oG,s),n&&(S=UW(0,NG(c,wW))),v=zK},T=function(){d._gsap.y=TG(parseFloat(d._gsap.y)+f.offset)+`px`,d.style.transform=`matrix3d(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, `+parseFloat(d._gsap.y)+`, 0, 1)`,f.offset=f.cacheID=0},E=function(){if(y){requestAnimationFrame(x);var e=TG(o.deltaY/2),t=C(f.v-e);if(d&&t!==f.v+f.offset){f.offset=t-f.v;var n=TG((parseFloat(d&&d._gsap.y)||0)-f.offset);d.style.transform=`matrix3d(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, `+n+`, 0, 1)`,d._gsap.y=n+`px`,f.cacheID=fW.cache,JK()}return!0}f.offset&&T(),y=!0},D,O,k,A,j=function(){w(),D.isActive()&&D.vars.scrollY>s&&(f()>s?D.progress(1)&&f(s):D.resetTo(`scrollY`,s))};return d&&PW.set(d,{y:`+=0`}),e.ignoreCheck=function(e){return oG&&e.type===`touchmove`&&E(e)||m>1.05&&e.type!==`touchstart`||o.isGesturing||e.touches&&e.touches.length>1},e.onPress=function(){y=!1;var e=m;
36m=TG((IW.visualViewport&&IW.visualViewport.scale||1)/h),D.pause(),e!==m&&fq(c,m>1.01?!0:n?!1:`x`),O=p(),k=f(),w(),v=zK},e.onRelease=e.onGestureStart=function(e,t){if(f.offset&&T(),!t)A.restart(!0);else{fW.cache++;var r=_(),i,o;n&&(i=p(),o=i+r*.05*-e.velocityX/.227,r*=dq(p,i,o,NG(c,wW)),D.vars.scrollX=S(o)),i=f(),o=i+r*.05*-e.velocityY/.227,r*=dq(f,i,o,NG(c,TW)),D.vars.scrollY=C(o),D.invalidate().duration(r).play(.01),(oG&&D.vars.scrollY>=s||i>=s-1)&&PW.to({},{onUpdate:j,duration:r})}a&&a(e)},e.onWheel=function(){D._ts&&D.pause(),hG()-g>1e3&&(v=0,g=hG())},e.onChange=function(e,t,r,i,a){if(zK!==v&&w(),t&&n&&p(S(i[2]===t?O+(e.startX-e.x):p()+t-i[1])),r){f.offset&&T();var o=a[2]===r,s=o?k+e.startY-e.y:f()+r-a[1],c=C(s);o&&s!==c&&(k+=c-s),f(c)}(r||t)&&JK()},e.onEnable=function(){fq(c,n?!1:`x`),uq.addEventListener(`refresh`,j),pK(IW,`resize`,j),f.smooth&&=(f.target.style.scrollBehavior=`auto`,p.smooth=!1),b.enable()},e.onDisable=function(){fq(c,!0),mK(IW,`resize`,j),uq.removeEventListener(`refresh`,j),b.kill()},e.lockAxis=e.lockAxis!==!1,o=new NW(e),o.iOS=oG,oG&&!f()&&f(1),oG&&PW.ticker.add(wG),A=o._dc,D=PW.to(o,{ease:`power4`,paused:!0,inherit:!1,scrollX:n?`+=0.1`:`+=0`,scrollY:`+=0.1`,modifiers:{scrollY:sq(f,f(),function(){return D.pause()})},onUpdate:JK,onComplete:A.vars.onComplete}),o};uq.sort=function(e){if(IG(e))return SK.sort(e);var t=IW.pageYOffset||0;return uq.getAll().forEach(function(e){return e._sortY=e.trigger?t+e.trigger.getBoundingClientRect().top:e.start+IW.innerHeight}),SK.sort(e||function(e,t){return(e.vars.refreshPriority||0)*-1e6+(e.vars.containerAnimation?1e6:e._sortY)-((t.vars.containerAnimation?1e6:t._sortY)+(t.vars.refreshPriority||0)*-1e6)})},uq.observe=function(e){return new NW(e)},uq.normalizeScroll=function(e){if(e===void 0)return nG;if(e===!0&&nG)return nG.enable();if(e===!1){nG&&nG.kill(),nG=e;return}var t=e instanceof NW?e:yq(e);return nG&&nG.target===t.target&&nG.kill(),OG(t.target)&&(nG=t),t},uq.core={_getVelocityProp:OW,_inputObserver:hq,_scrollers:fW,_proxies:pW,bridge:{ss:function(){_G||MK(`scrollStart`),_G=hG()},ref:function(){return KW}}},DG()&&PW.registerPlugin(uq);var bq=typeof document<`u`?b.useLayoutEffect:b.useEffect,xq=e=>e&&!Array.isArray(e)&&typeof e==`object`,Sq=[],Cq={},wq=JU,Tq=(e,t=Sq)=>{let n=Cq;xq(e)?(n=e,e=null,t=`dependencies`in n?n.dependencies:Sq):xq(t)&&(n=t,t=`dependencies`in n?n.dependencies:Sq),e&&typeof e!=`function`&&console.warn(`First parameter must be a function or config object`);let{scope:r,revertOnUpdate:i}=n,a=(0,b.useRef)(!1),o=(0,b.useRef)(wq.context(()=>{},r)),s=(0,b.useRef)(e=>o.current.add(null,e)),c=t&&t.length&&!i;return c&&bq(()=>(a.current=!0,()=>o.current.revert()),Sq),bq(()=>{if(e&&o.current.add(e,r),!c||!a.current)return()=>o.current.revert()},t),{context:o.current,contextSafe:s.current}};Tq.register=e=>{wq=e},Tq.headless=!0;var Eq={en:{nav:[`The experience`,`How it works`,`Questions`],getApp:`Create account`,eyebrow:`YOUR NEXT FLIP STARTS WITH A FIND.`,title:[`See it first.`,`Snag it first.`],intro:`Your next car flip. Your next great find. Set your budget and catch fresh listings on Facebook Marketplace and beyond. All in one app.`,availability:`Your next find. On iPhone & Android.`,scroll:`SCROLL TO SEE THE SNAG`,demo:`Illustrative app preview · example listings`,pause:`Pause animations`,play:`Play animations`,platforms:`YOUR MARKETPLACES. ONE STEP AHEAD.`,platformNote:`Availability varies by marketplace and region.`,storyEyebrow:`LESS SEARCHING. MORE FINDING.`,storyTitle:[`Set your budget.`,`Find your next move.`],storyIntro:`Give your refresh button a break. InstaSnag keeps an eye out, so you donât have to.`,steps:[{title:`Your next flip. Your price.`,text:`A weekend roadster. A project car. A camera worth the upgrade. Choose what you want, set your budget and pick your radius.`,tag:`YOUR SEARCH. YOUR RULES.`},{title:`Let the good stuff come to you.`,text:`We watch for new listings that match. You get the heads-up, wherever your day takes you.`,tag:`ALWAYS ON THE LOOKOUT.`},{title:`See the price. Make your move.`,text:`Find a listing that fits your budget, review the details and reach out through the original marketplace. The next move is yours.`,tag:`YOUR NEXT MOVE STARTS HERE.`}],categoryLabel:`WHATâS YOUR NEXT FIND?`,categoryTitle:[`Big possibilities.`,`Very specific obsessions.`],categories:[`For your next flip.`,`For your creative side.`,`For your everyday.`],categorySub
36s:[`Cars & project vehicles`,`Cameras & electronics`,`Home, gear & everything else`],categoryNote:`Example finds. Actual listings come from your saved searches.`,benefitTitle:`The thrill of the find. 37Without the endless scroll.`,benefits:[[`One place. More possibilities.`,`Bring matching listings together instead of bouncing between tabs.`],[`Your search, fine-tuned.`,`Focus on the things you want with filters that fit your search.`],[`A heads-up that travels.`,`Get notified on your phone and review finds when it suits you.`]],faqLabel:`A FEW GOOD QUESTIONS`,faqTitle:`Before you snag.`,faqs:[[`What does InstaSnag do?`,`InstaSnag monitors supported marketplaces for new listings that match your saved searches and brings your matches and notifications together in one app.`],[`Which marketplaces can I search?`,`Supported marketplaces include Facebook Marketplace, Kijiji and AutoTrader. Availability and features depend on your region and subscription. Check the app for your current options.`],[`How quickly will I receive alerts?`,`Check frequency depends on your plan and marketplace. InstaSnag alerts you when it discovers a match; delivery can also depend on your device and notification settings.`],[`Can I use it on iPhone and Android?`,`Yes. Download InstaSnag from the App Store or Google Play and sign in to manage your searches and review matching listings.`]],finalLabel:`YOUR NEXT FIND IS OUT THERE.`,finalTitle:[`Be the one`,`who finds it.`],finalText:`Meet your new unfair advantage. Download InstaSnag and start looking for something good.`,footer:`Good finds donât wait. Neither should you.`,privacy:`Privacy`,terms:`Terms`,contact:`Contact`,signIn:`Create account`,notification:`Youâve got a match.`,notificationSub:`2006 Mazda MX-5 · $7,800`,now:`just now`,screenTitle:`Your next great flip.`,screenSearch:`Mazda MX-5 · under $10,000`,screenLive:`WATCHING FOR YOU`,screenMatch:`A little ahead of everyone.`,items:[`2006 Mazda MX-5`,`Mirrorless camera`,`Wireless headphones`],price:`$7,800`,budget:`$10,000`,headroom:`$2,200`,distance:`12 km away · Just listed`,radiu
37s:`Within 50 km`,newMatch:`NEW MATCH`,showcase:{steps:[`Set budget`,`Find a match`,`Snag the deal`],budgetLabel:`YOUR BUDGET. YOUR RULES.`,maxPrice:`Maximum price`,search:`Mazda MX-5`,scanning:`On the lookout.`,scanningSub:`Watching your marketplaces`,matchLabel:`A MATCH WORTH A LOOK`,priceLabel:`LISTED PRICE`,headroom:`under your budget`,action:`Find my next deal`,replay:`Replay the snag`,otherFinds:`NOT JUST CARS.`,caption:`Example search & listing · not a live offer`,final:`Good find. Your move.`},opening:{skip:`Skip intro`,replay:`Watch the intro`,eyebrow:`A GOOD FIND CHANGES EVERYTHING.`,experience:`THE EXPERIENCE`,titles:[[`Your next flip.`,`Your rules.`],[`Less scrolling.`,`More finding.`],[`There it is.`,`Make your move.`]],descriptions:[`The car you want. The price youâre happy with.`,`Your marketplaces. One very good lookout.`,`A fresh match. And room left in your budget.`]}},fr:{nav:[`Lâexpérience`,`Comment ça marche`,`Questions`],getApp:`Créer un compte`,eyebrow:`VOTRE PROCHAINE REVENTE COMMENCE ICI.`,title:[`Repérez-le.`,`Saisissez-le.`],intro:`Une voiture à revendre. Une belle trouvaille. Fixez votre budget et repérez les nouvelles annonces sur Facebook Marketplace et ailleurs. Dans une seule appli.`,availability:`Votre prochaine trouvaille. Sur iPhone et Android.`,scroll:`DÃFILEZ POUR DÃCOUVRIR`,demo:`Aperçu illustratif · exemples dâannonces`,pause:`Mettre les animations en pause`,play:`Activer les animations`,platforms:`VOS PLATEFORMES. UNE LONGUEUR DâAVANCE.`,platformNote:`La disponibilité varie selon la plateforme et la région.`,storyEyebrow:`CHERCHEZ MOINS. TROUVEZ PLUS.`,storyTitle:[`Fixez votre budget.`,`Trouvez la bonne occasion.`],storyIntro:`Laissez votre bouton dâactualisation tranquille. InstaSnag surveille les annonces pour vous.`,steps:[{title:`Votre prochaine revente. Votre prix.`,text:`Un roadster. Une voiture à retaper. Un nouvel appareil photo. Choisissez votre recherche, fixez votre budget et votre rayon.`,tag:`VOTRE RECHERCHE. VOS CRITÃRES.`},{title:`Laissez venir les belles occasions.`,text:`Nous surveillons les nouvelles annonces qui correspondent. Vous recevez une alerte, où que vous soyez.`,tag:`TOUJOURS à LâAFFÃT.`},{title:`Le bon prix. à vous de jouer.`,text:`Repérez une annonce dans votre budget, consultez les détails et contactez le vendeur sur la plateforme dâorigine.`,tag:`à VOUS DE JOUER.`}],categoryLabel:`VOTRE PROCHAINE TROUVAILLE ?`,categoryTitle:[`De grandes possibilités.`,`Vos petites obsessions.`],categories:[`Pour votre prochaine revente.`,`Pour votre créativité.`,`Pour votre quotidien.`],categorySubs:[`Voitures et projets auto`,`Photo et électronique`,`Maison, équipement et plus`],categoryNote:`Exemples illustratifs. Les annonces réelles dépendent de vos recherches.`,benefitTitle:`Le plaisir de trouver. 38Sans défiler à lâinfini.`,benefits:[[`Un seul endroit. Plus de possibilités.`,`Retrouvez vos annonces sans passer dâun onglet à lâautre.`],[`Une recherche à votre image.`,`Concentrez-vous sur vos envies grâce aux filtres adaptés.`],[`Une alerte qui vous suit.`,`Recevez une notification et consultez vos trouvailles à votre rythme.`]],faqLabel:`QUELQUES BONNES QUESTIONS`,faqTitle:`Avant de vous lancer.`,faqs:[[`Que fait InstaSnag ?`,`InstaSnag surveille les plateformes prises en charge et rassemble les nouvelles annonces correspondant à vos recherches et vos notifications dans une seule appli.`],[`Quelles plateformes puis-je consulter ?`,`Les plateformes prises en charge comprennent Facebook Marketplace, Kijiji et AutoTrader. La disponibilité dépend de votre région et de votre abonnement. Consultez lâappli pour les options actuelles.`],[`à quelle vitesse arrivent les alertes ?`,`La fréquence des vérifications dépend de votre forfait et de la plateforme. InstaSnag vous avertit lorsquâune annonce correspondante est découverte. La réception dépend aussi de vos réglages.`],[`Est-ce disponible sur iPhone et Android ?`,`Oui. Téléchargez InstaSnag depuis lâApp Store ou Google Play et connectez-vous pour gérer vos recherches et consulter vos annonces.`]],finalLabel:`VOTRE PROCHAINE TROUVAILLE VOUS ATTEND.`,finalTitle:[`Soyez la personne`,`qui la trouve.`],finalText:`Prenez une longueur dâavance. Téléchargez InstaSnag et partez à la recherche de votre prochaine trouvaille.`,footer
38:`Les bonnes occasions nâattendent pas. Vous non plus.`,privacy:`Confidentialité`,terms:`Conditions`,contact:`Contact`,signIn:`Créer un compte`,notification:`Une annonce pour vous.`,notificationSub:`Mazda MX-5 2006 · 7 800 $`,now:`à lâinstant`,screenTitle:`Votre prochaine revente.`,screenSearch:`Mazda MX-5 · moins de 10 000 $`,screenLive:`à LâAFFÃT POUR VOUS`,screenMatch:`Une petite longueur dâavance.`,items:[`Mazda MX-5 2006`,`Appareil photo hybride`,`Casque sans fil`],price:`7 800 $`,budget:`10 000 $`,headroom:`2 200 $`,distance:`à 12 km · Nouvelle annonce`,radius:`Dans un rayon de 50 km`,newMatch:`NOUVELLE ANNONCE`,showcase:{steps:[`Le budget`,`La recherche`,`Lâoccasion`],budgetLabel:`VOTRE BUDGET. VOS CRITÃRES.`,maxPrice:`Prix maximum`,search:`Mazda MX-5`,scanning:`à lâaffût.`,scanningSub:`Vos plateformes sous surveillance`,matchLabel:`UNE OCCASION à DÃCOUVRIR`,priceLabel:`PRIX AFFICHÃ`,headroom:`sous votre budget`,action:`Trouver ma prochaine occasion`,replay:`Revoir la démo`,otherFinds:`PAS QUE DES VOITURES.`,caption:`Recherche et annonce fictives · offre illustrative`,final:`Belle trouvaille. à vous de jouer.`},opening:{skip:`Passer lâintro`,replay:`Revoir lâintro`,eyebrow:`UNE BELLE TROUVAILLE CHANGE TOUT.`,experience:`LâEXPÃRIENCE`,titles:[[`Votre projet.`,`Vos critères.`],[`Cherchez moins.`,`Trouvez plus.`],[`La voilà .`,`à vous de jouer.`]],descriptions:[`La voiture qui vous plaît. Le prix qui vous convient.`,`Vos plateformes. Une longueur dâavance.`,`Une nouvelle annonce. Un prix sous votre budget.`]}}};function Dq({copy:e,phase:t=2}){return(0,V.jsxs)(`div`,{className:`snag-phone-preview`,"aria-hidden":`true`,children:[(0,V.jsx)(`div`,{className:`snag-phone-camera`}),(0,V.jsxs)(`div`,{className:`snag-screen-bar`,children:[(0,V.jsx)(`span`,{children:`9:41`}),(0,V.jsx)(`span`,{children:`â®â®â® â°`})]}),(0,V.jsxs)(`div`,{className:`snag-screen-brand`,children:[(0,V.jsx)(hj,{size:17,fill:`currentColor`}),` InstaSnag `,(0,V.jsx)(Ek,{size:17})]}),(0,V.jsx)(`div`,{className:`snag-screen-heading`,children:e.screenTitle}),(0,V.jsxs)(`div`,{className:`snag-screen-search`,children:[(0,V.jsx)(UA,{size:13}),e.screenSearch,(0,V.jsx)(QA,{size:13})]}),(0,V.jsxs)(`div`,{className:`snag-screen-watching`,children:[(0,V.jsx)(`span`,{}),e.screenLive]}),t<2?(0,V.jsxs)(`div`,{className:`snag-screen-setup`,children:[(0,V.jsx)(`span`,{children:t===0?e.showcase.maxPrice:e.showcase.scanning}),(0,V.jsx)(`strong`,{children:e.budget}),(0,V.jsx)(`div`,{className:`snag-screen-setup-line`}),(0,V.jsx)(`span`,{children:e.radius}),(0,V.jsx)(`div`,{className:`snag-screen-setup-radar`,children:(0,V.jsx)(UA,{size:28})}),(0,V.jsx)(`b`,{children:t===0?e.showcase.search:e.showcase.scanningSub}),(0,V.jsx)(`small`,{children:`Facebook Marketplace · Kijiji · AutoTrader`})]}):(0,V.jsxs)(V.Fragment,{children:[(0,V.jsxs)(`div`,{className:`snag-screen-photo snag-product snag-product-0`,children:[(0,V.jsxs)(`span`,{children:[(0,V.jsx)(hj,{size:10}),` `,e.newMatch]}),(0,V.jsx)(sA,{size:16})]}),(0,V.jsxs)(`div`,{className:`snag-screen-item`,children:[(0,V.jsx)(`b`,{children:e.items[0]}),(0,V.jsxs)(`strong`,{children:[e.price,` `,(0,V.jsx)(Ck,{size:13})]}),(0,V.jsx)(`span`,{children:e.distance})]}),(0,V.jsxs)(`div`,{className:`snag-screen-mini`,children:[(0,V.jsx)(`div`,{className:`snag-product snag-product-1`}),(0,V.jsxs)(`div`,{children:[(0,V.jsx)(`b`,{children:e.items[1]}),(0,V.jsx)(`span`,{children:`$340`})]}),(0,V.jsx)(sA,{size:15})]})]}),(0,V.jsxs)(`div`,{className:`snag-screen-bottom`,children:[(0,V.jsx)(hj,{size:17}),(0,V.jsx)(UA,{size:17}),(0,V.jsx)(sA,{size:17}),(0,V.jsx)(Ek,{size:17})]})]})}var Oq=(0,b.lazy)(()=>E(()=>import(`./PhoneScene-HW70yVZ4.js`),[])),kq=class extends b.Component{state={failed:!1};static getDerivedStateFromError(){return{failed:!0}}componentDidCatch(){this.props.onFail()}render(){return this.state.failed?null:this.props.children}};function Aq({copy:e,locale:t,reduced:n,paused:r,onPause:i,progress:a,mode:o=`hero`,enabled:s=!0,onComplete:c,onPhaseChange:l,onReplay:u}){let d=(0,b.useRef)(null),f=(0,b.useRef)(null),[p,m]=(0,b.useState)(0),[h,g]=(0,b.useState)(!1),[_,v]=(0,b.useState)(!0),[y,x]=(0,b.useState)(!1),[S,C]=(0,b.useState)(!1),[w,T]=(0,b.useState)(!1),E=(0,b.useCallback)(()=>T(!0),[]),D=(0,b.useCallback)(()=>C(!0),[]),O=n||o===`hero`?2:p,k=s&&!n&&!r&&h&&_;return(0,b.useEffect)(()=>
38{if(!s)return;let e=window.setTimeout(()=>x(!0),250),t=new IntersectionObserver(([e])=>g(e.isIntersecting),{threshold:.25});d.current&&t.observe(d.current);let n=()=>v(!document.hidden);return document.addEventListener(`visibilitychange`,n),()=>{window.clearTimeout(e),t.disconnect(),document.removeEventListener(`visibilitychange`,n)}},[s]),Tq(()=>{if(n||o!==`intro`)return;let e=JU.utils.selector(d)(`.snag-budget-number`)[0],r=new Intl.NumberFormat(t===`fr`?`fr-CA`:`en-CA`,{style:`currency`,currency:`CAD`,maximumFractionDigits:0}),i={value:0},a=JU.timeline({paused:!0,defaults:{ease:`power3.out`},onComplete:c});return f.current=a,a.set(e,{textContent:r.format(0)}).set(`.snag-budget-card, .snag-scan-status, .snag-deal-card, .snag-secondary-find`,{autoAlpha:0}).set(`.snag-budget-fill, .snag-sequence-progress`,{scaleX:0,transformOrigin:`left center`}).set(`.snag-scan-ring`,{opacity:0}).call(()=>{m(0),l?.(0)},[],0).fromTo(`.snag-phone-assembly`,{y:65,rotation:9,scale:.87,opacity:0},{y:0,rotation:0,scale:1,opacity:1,duration:1.5},0).fromTo(`.snag-budget-card`,{y:28,rotation:-9,scale:.88},{y:0,rotation:-5,scale:1,autoAlpha:1,duration:.9},.5).to(i,{value:1e4,duration:1.5,onUpdate:()=>{e.textContent=r.format(Math.round(i.value/100)*100)}},.85).to(`.snag-budget-fill`,{scaleX:.78,duration:1.5},.85).to(`.snag-budget-thumb`,{left:`78%`,duration:1.5},.85).call(()=>{m(1),l?.(1)},[],3.1).fromTo(`.snag-scan-status`,{y:15},{y:0,autoAlpha:1,duration:.5},3.1).fromTo(`.snag-scan-ring`,{scale:.55,opacity:.6},{scale:1.35,opacity:0,duration:1.4,stagger:.4,repeat:1,ease:`power1.out`,immediateRender:!1},3.1).to(`.snag-scan-status`,{autoAlpha:0,y:-12,duration:.35},5.9).call(()=>{m(2),l?.(2)},[],6.2).fromTo(`.snag-deal-card`,{y:55,rotation:-8,scale:.9},{y:0,rotation:-3,scale:1,autoAlpha:1,duration:1,ease:`back.out(1.3)`},6.2).fromTo(`.snag-deal-price`,{y:14,opacity:0},{y:0,opacity:1,duration:.6},6.55).fromTo(`.snag-budget-room`,{scale:.85,opacity:0},{scale:1,opacity:1,duration:.6,ease:`back.out(2)`},7).fromTo(`.snag-secondary-find`,{y:30,rotation:12},{y:0,rotation:7,autoAlpha:1,duration:.8},7.35).fromTo(`.snag-deal-action`,{opacity:0,y:8},{opacity:1,y:0,duration:.5},7.65).fromTo(`.snag-success-halo`,{scale:.8,opacity:.5},{scale:1.6,opacity:0,duration:1.4,immediateRender:!1},6.2).to(`.snag-sequence-progress`,{scaleX:1,duration:9.1,ease:`none`},0),()=>{f.current=null}},{scope:d,dependencies:[n,t,o,c,l],revertOnUpdate:!0}),(0,b.useEffect)(()=>{f.current?.paused(!k)},[k,t,n]),(0,V.jsxs)(`div`,{ref:d,className:`snag-visual snag-showcase snag-showcase-${o} snag-showcase-phase-${O} ${k?`is-playing`:``}`,"aria-label":e.demo,children:[(0,V.jsx)(`div`,{className:`snag-orbit snag-orbit-1`,"aria-hidden":`true`}),(0,V.jsx)(`div`,{className:`snag-orbit snag-orbit-2`,"aria-hidden":`true`}),(0,V.jsx)(`div`,{className:`snag-orbit-center`,"aria-hidden":`true`}),(0,V.jsxs)(`div`,{className:`snag-scan-rings`,"aria-hidden":`true`,children:[(0,V.jsx)(`i`,{className:`snag-scan-ring`}),(0,V.jsx)(`i`,{className:`snag-scan-ring`}),(0,V.jsx)(`i`,{className:`snag-scan-ring`}),(0,V.jsx)(`i`,{className:`snag-success-halo`})]}),(0,V.jsxs)(`div`,{className:`snag-phone-assembly`,"aria-hidden":`true`,children:[(0,V.jsx)(`div`,{className:`snag-phone-fallback ${S&&!w&&!n?`is-hidden`:``}`,children:(0,V.jsx)(Dq,{copy:e,phase:O})}),s&&y&&!n&&!w&&(0,V.jsx)(`div`,{className:`snag-canvas`,children:(0,V.jsx)(kq,{onFail:E,children:(0,V.jsx)(b.Suspense,{fallback:null,children:(0,V.jsx)(Oq,{copy:e,phase:O,progress:a,active:k,onFail:E,onReady:D})})})})]}),(0,V.jsxs)(`div`,{className:`snag-budget-card`,children:[(0,V.jsxs)(`div`,{className:`snag-showcase-kicker`,children:[(0,V.jsx)(QA,{size:12}),e.showcase.budgetLabel,(0,V.jsx)(`span`,{children:`01`})]}),(0,V.jsxs)(`div`,{className:`snag-budget-query`,children:[(0,V.jsx)(UA,{size:13}),e.showcase.search]}),(0,V.jsx)(`span`,{className:`snag-budget-label`,children:e.showcase.maxPrice}),(0,V.jsx)(`strong`,{className:`snag-budget-number`,"aria-label":e.budget,children:e.budget}),(0,V.jsxs)(`div`,{className:`snag-budget-track`,"aria-hidden":`true`,children:[(0,V.jsx)(`div`,{className:`snag-budget-fill`}),(0,V.jsx)(`i`,{className:`snag-budget-thumb`})]}),(0,V.jsxs)(`div`,{className:`snag-budget-location`,children:[(0,V.jsx)(xA,{size:10}),e.radius,(0,V.jsx)(Fk,{size:12})]})]}),(0,V.jsxs)(`div`,{className:`snag-scan-status`,"aria-hidden":`true`,children:[(0,V.jsx)(`span`,{className:`snag-scanning-icon`,children:(0,V.jsx)(UA,{size:17})}),(0,V.jsxs)(`div`,{children:[(0,V.jsx)(`strong`,{children:e.showcase.scanning}),(0,V.jsx)(`span`,{children:e.showcase.scanningSub})]}),(0,V.jsxs)(`span`,{className:`snag-scanning-dots`,children:[(0,V.jsx)(`i`,{}),(0,V.jsx)(`i`,{}),(0,V.jsx)(`i`,{})]})]}),(0,V.jsxs)(`div`,{className:`snag-deal-card`,children:[(0,V.jsxs)(`div`,{className:`snag-showcase-kicker`,children:[(0,V.jsx)(`span`,{className:`snag-deal-zap`,children:(0,V.jsx)(hj,{size:12,fill:`currentColor`})}),e.showcase.matchLabel,(0,V.jsx)(Fk,{size:12})]}),(0,V.jsxs)(`div`,{className:`snag-deal-name`,children:[e.items[0],(0,V.jsx)(Ck,{size:15})]}),(0,V.jsxs)(`div`,{className:`snag-deal-price-row`,children:[(0,V.jsx)(`strong`,{className:`snag-deal-price`,children:e.price}),(0,V.jsxs)(`span`,{children:[e.showcase.priceLabel,(0,V.jsx)(`b`,{children:`Facebook Marketplace`})]})]}),(0,V.jsxs)(`div`,{className:`snag-budget-room`,children:[(0,V.jsx)(Fk,{size:12}),(0,V.jsx)(`strong`,{children:e.headroom}),` `,e.showcase.headroom]}),o===`intro`?(0,V.jsxs)(`div`,{className:`snag-deal-action`,children:[(0,V.jsx)(`span`,{children:e.showcase.final}),(0,V.jsx)(Ck,{size:15})]}):(0,V.jsxs)(zi,{to:`/auth/signup`,className:`snag-deal-action`,children:[e.showcase.action,(0,V.jsx)(Ck,{size:15})]})]}),(0,V.jsxs)(`div`,{className:`snag-floating-card snag-secondary-find`,children:[(0,V.jsx)(`div`,{className:`snag-product snag-product-1`}),(0,V.jsxs)(`div`,{children:[(0,V.jsx)(`small`,{children:e.showcase.otherFinds}),(0,V.jsx)(`strong`,{children:e.items[1]}),(0,V.jsxs)(`span`,{children:[t===`fr`?`340 $`:`$340`,(0,V.jsx)(Ck,{size:12})]})]})]}
38),(0,V.jsxs)(`div`,{className:`snag-showcase-controls`,children:[o===`intro`&&(0,V.jsxs)(`div`,{className:`snag-chapters`,"aria-label":t===`fr`?`Ãtapes de la démo`:`Demo chapters`,children:[e.showcase.steps.map((e,t)=>(0,V.jsxs)(`div`,{className:`snag-chapter-label`,"aria-current":O===t?`step`:void 0,children:[(0,V.jsx)(`span`,{children:t<O?(0,V.jsx)(Fk,{size:10}):`0${t+1}`}),e]},e)),(0,V.jsx)(`div`,{className:`snag-sequence-track`,"aria-hidden":`true`,children:(0,V.jsx)(`div`,{className:`snag-sequence-progress`})})]}),(0,V.jsxs)(`div`,{className:`snag-showcase-footnote`,children:[(0,V.jsx)(`span`,{children:e.showcase.caption}),!n&&(0,V.jsxs)(`div`,{children:[o===`hero`&&(0,V.jsx)(`button`,{type:`button`,onClick:u,"aria-label":e.showcase.replay,title:e.showcase.replay,children:(0,V.jsx)(Kae,{size:14})}),(0,V.jsx)(`button`,{type:`button`,onClick:()=>i(!r),"aria-label":r?e.play:e.pause,"aria-pressed":r,children:r?(0,V.jsx)(FA,{size:14}):(0,V.jsx)(Hae,{size:14})})]})]})]})]})}function jq({copy:e,locale:t,onFinish:n}){let r=(0,b.useRef)(null),i=(0,b.useRef)(null),a=(0,b.useRef)(0),[o,s]=(0,b.useState)(0),[c,l]=(0,b.useState)(!1),[u,d]=(0,b.useState)(!1),f=(0,b.useCallback)(()=>d(!0),[]);return(0,b.useEffect)(()=>{let e=document.body.style.overflow;return document.body.style.overflow=`hidden`,i.current?.focus({preventScroll:!0}),()=>{document.body.style.overflow=e}},[]),(0,b.useEffect)(()=>{if(!u)return;let e=JU.to(r.current,{opacity:0,yPercent:-3,duration:.65,ease:`power2.inOut`,onComplete:n});return()=>{e.kill()}},[u,n]),(0,V.jsxs)(`div`,{ref:r,className:`snag-intro ${u?`is-leaving`:``}`,role:`dialog`,"aria-modal":`true`,"aria-labelledby":`snag-intro-title`,onKeyDown:e=>{if(e.key===`Escape`&&(e.preventDefault(),f()),e.key===`Tab`){let t=r.current?.querySelectorAll(`button:not(:disabled)`);if(!t?.length)return;let n=t[0],i=t[t.length-1];e.shiftKey&&document.activeElement===n?(e.preventDefault(),i.focus()):!e.shiftKey&&document.activeElement===i&&(e.preventDefault(),n.focus())}},children:[(0,V.jsx)(`div`,{className:`snag-intro-grid`,"aria-hidden":`true`}),(0,V.jsxs)(`header`,{className:`snag-intro-header`,children:[(0,V.jsxs)(`div`,{className:`snag-wordmark`,children:[(0,V.jsx)(`span`,{className:`snag-brand-icon`,children:(0,V.jsx)(hj,{size:23,fill:`currentColor`})}),`Insta`,(0,V.jsx)(`span`,{children:`Snag`})]}),(0,V.jsxs)(`button`,{ref:i,type:`button`,className:`snag-intro-skip`,onClick:f,children:[e.opening.skip,(0,V.jsx)(Ck,{size:16})]})]}),(0,V.jsxs)(`div`,{className:`snag-intro-content`,children:[(0,V.jsxs)(`div`,{className:`snag-intro-heading`,children:[(0,V.jsxs)(`span`,{className:`snag-eyebrow`,children:[(0,V.jsx)(`span`,{className:`snag-live-dot`}),e.opening.eyebrow]}),(0,V.jsxs)(`h1`,{id:`snag-intro-title`,children:[e.opening.titles[o][0],(0,V.jsx)(`br`,{}),(0,V.jsx)(`em`,{children:e.opening.titles[o][1]})]},o),(0,V.jsx)(`p`,{children:e.opening.descriptions[o]})]}),(0,V.jsx)(Aq,{mode:`intro`,copy:e,locale:t,reduced:!1,paused:c||u,onPause:l,progress:a,onComplete:f,onPhaseChange:s})]}),(0,V.jsxs)(`footer`,{className:`snag-intro-footer`,children:[(0,V.jsxs)(`span`,{children:[`INSTASNAG / `,e.opening.experience]}),(0,V.jsxs)(`span`,{children:[`0`,o+1,(0,V.jsx)(`i`,{}),`03`]})]})]})}var Mq=`instasnag:landing-intro:v1`;function Nq(){if(typeof window>`u`||window.matchMedia(`(prefers-reduced-motion: reduce)`).matches||window.location.hash)return!1;try{return window.sessionStorage.getItem(Mq)!==`seen`}catch{return!0}}function Pq(){try{window.sessionStorage.setItem(Mq,`seen`)}catch{}}JU.registerPlugin(uq,Tq);function Fq({placement:e,locale:t}){let n=`/auth/signup`;return(0,V.jsxs)(`div`,{className:`snag-store-links`,children:[(0,V.jsx)(zi,{to:n,"aria-label":t===`fr`?`Télécharger sur lâApp Store`:`Download on the App Store`,onClick:()=>Hv(`apple`,e,t),children:(0,V.jsx)(`img`,{src:`/landing/app-store${t===`fr`?`-fr`:``}.svg`,alt:`Download on the App Store`,width:`148`,height:`49`})}),(0,V.jsx)(zi,{to:n,"aria-label":t===`fr`?`Télécharger sur Google Play`:`Get it on Google Play`,onClick:()=>Hv(`google`,e,t),children:(0,V.jsx)(`img`,{src:`/landing/google-play${t===`fr`?`-fr`:``}.png`,alt:`Get it on Google Play`,width:`180`,height:`70`})})]})}function Iq(){let{locale:e,setPreference:t}=py(),n=Eq[e],r=(0,b.useRef)(null),i=(0,b.useRef)(0),a=ak(),[o,s]=(0,b.useState)(!1),[c,l]=(0,b.useState)(0),u=!!a||o,[d,f]=(0,b.useState)(Nq),p=d&&!a,m=(0,b.useCallback)(()=>{Pq(),f(!1),window.requestAnimationFrame(()=>{document.getElementById(`snag-main`)?.focus({preventScroll:!0}),uq.refresh()})},[]),h=(0,b.useCallback)(()=>f(!0),[]);return(0,b.useEffect)(()=>{Nv(),Pv(`ViewContent`,{customData:{content_name:`InstaSnag landing page`,content_category:`landing_page`}})},[]),Tq(()=>{if(a||p)return;JU.from(`.snag-hero-copy > *`,{y:26,opacity:0,duration:.8,stagger:.095,ease:`power3.out`,clearProps:`transform,opacity`}),JU.from(`.snag-main-page .snag-visual`,{y:35,opacity:0,duration:1.2,delay:.15,ease:`power3.out`,clearProps:`transform,opacity`}),JU.to(i,{current:1,ease:`none`,scrollTrigger:{trigger:`.snag-hero`,start:`top top`,end:`bottom top`,scrub:!0}}
38),JU.utils.toArray(`.snag-reveal`).forEach(e=>JU.from(e,{y:35,opacity:0,duration:.8,ease:`power2.out`,scrollTrigger:{trigger:e,start:`top 92%`,once:!0},clearProps:`transform,opacity`}));let e=JU.matchMedia();return e.add(`(min-width: 801px)`,()=>{JU.utils.toArray(`.snag-step`).forEach((e,t)=>uq.create({trigger:e,start:`top 60%`,end:`bottom 60%`,onEnter:()=>l(t),onEnterBack:()=>l(t)}))}),()=>{e.revert(),i.current=0}},{scope:r,dependencies:[a,e,p],revertOnUpdate:!0}),(0,V.jsxs)(`div`,{ref:r,className:`snag-landing ${u?`snag-motion-off`:``}`,lang:e,children:[p&&(0,V.jsx)(jq,{copy:n,locale:e,onFinish:m}),(0,V.jsxs)(`div`,{className:`snag-main-page`,inert:p,"aria-hidden":p||void 0,children:[(0,V.jsx)(`a`,{className:`snag-skip`,href:`#snag-main`,children:e===`fr`?`Aller au contenu`:`Skip to content`}),(0,V.jsxs)(`header`,{className:`snag-header`,children:[(0,V.jsxs)(zi,{to:`/`,className:`snag-wordmark`,"aria-label":`InstaSnag home`,children:[(0,V.jsx)(`span`,{className:`snag-brand-icon`,children:(0,V.jsx)(hj,{size:23,fill:`currentColor`})}),`Insta`,(0,V.jsx)(`span`,{children:`Snag`})]}),(0,V.jsxs)(`nav`,{"aria-label":e===`fr`?`Navigation principale`:`Main navigation`,children:[(0,V.jsx)(`a`,{href:`#experience`,children:n.nav[0]}),(0,V.jsx)(`a`,{href:`#how-it-works`,children:n.nav[1]}),(0,V.jsx)(`a`,{href:`#questions`,children:n.nav[2]})]}),(0,V.jsxs)(`div`,{className:`snag-header-actions`,children:[(0,V.jsxs)(`button`,{className:`snag-language`,onClick:()=>t(e===`en`?`fr`:`en`),"aria-label":e===`en`?`Switch to French`:`Passer en anglais`,children:[e.toUpperCase(),(0,V.jsx)(Ik,{size:12})]}),(0,V.jsxs)(zi,{className:`snag-pill`,to:`/auth/signup`,children:[n.getApp,(0,V.jsx)(Ck,{size:16})]})]})]}),(0,V.jsxs)(`section`,{id:`snag-main`,className:`snag-hero`,tabIndex:-1,children:[(0,V.jsx)(`div`,{className:`snag-hero-grid`,"aria-hidden":`true`}),(0,V.jsxs)(`div`,{className:`snag-hero-copy`,children:[(0,V.jsxs)(`span`,{className:`snag-eyebrow`,children:[(0,V.jsx)(`span`,{className:`snag-live-dot`}),n.eyebrow]}),(0,V.jsxs)(`h1`,{children:[n.title[0],(0,V.jsx)(`br`,{}),(0,V.jsx)(`em`,{children:n.title[1]}),(0,V.jsx)(`span`,{className:`snag-title-star`,"aria-hidden":`true`,children:`â³`})]}),(0,V.jsx)(`p`,{children:n.intro}),(0,V.jsx)(Fq,{placement:`hero`,locale:e}),(0,V.jsxs)(`div`,{className:`snag-availability`,children:[(0,V.jsx)(`span`,{children:(0,V.jsx)(Fk,{size:12})}),n.availability]}),!a&&(0,V.jsxs)(`button`,{className:`snag-watch-intro`,type:`button`,onClick:h,children:[(0,V.jsx)(FA,{size:12,fill:`currentColor`}),n.opening.replay]}),(0,V.jsxs)(`a`,{className:`snag-scroll-cue`,href:`#experience`,children:[(0,V.jsx)(yk,{size:15}),n.scroll]})]}),(0,V.jsx)(Aq,{copy:n,locale:e,reduced:!!a,paused:o,onPause:s,progress:i,enabled:!p,onReplay:h})]}),(0,V.jsxs)(`section`,{className:`snag-platforms`,"aria-label":n.platforms,children:[(0,V.jsx)(`span`,{children:n.platforms}),(0,V.jsxs)(`div`,{className:`snag-platform-names`,children:[(0,V.jsxs)(`span`,{children:[(0,V.jsx)(`b`,{className:`snag-facebook`,children:`f`}),`Marketplace`]}),(0,V.jsxs)(`span`,{className:`snag-kijiji`,children:[`kijiji`,(0,
38V.jsx)(`span`,{children:`â`})]}),(0,V.jsxs)(`span`,{className:`snag-autotrader`,children:[`auto`,(0,V.jsx)(`b`,{children:`TRADER`})]})]}),(0,V.jsx)(`small`,{children:n.platformNote})]}),(0,V.jsxs)(`section`,{id:`experience`,className:`snag-story snag-section`,children:[(0,V.jsxs)(`div`,{className:`snag-section-heading snag-reveal`,children:[(0,V.jsxs)(`span`,{className:`snag-eyebrow`,children:[(0,V.jsx)(`span`,{className:`snag-section-index`,children:`01 /`}),n.storyEyebrow]}),(0,V.jsxs)(`h2`,{children:[n.storyTitle[0],(0,V.jsx)(`br`,{}),(0,V.jsx)(`span`,{children:n.storyTitle[1]})]}),(0,V.jsx)(`p`,{children:n.storyIntro})]}),(0,V.jsxs)(`div`,{id:`how-it-works`,className:`snag-story-grid`,children:[(0,V.jsx)(`div`,{className:`snag-steps`,children:n.steps.map((e,t)=>(0,V.jsxs)(`article`,{className:`snag-step ${c===t?`is-active`:``}`,children:[(0,V.jsxs)(`button`,{type:`button`,onClick:()=>l(t),"aria-pressed":c===t,"aria-label":e.title,children:[(0,V.jsxs)(`span`,{children:[`0`,t+1]}),t===0?(0,V.jsx)(UA,{size:20}):t===1?(0,V.jsx)(Ek,{size:20}):(0,V.jsx)(Ck,{size:20})]}),(0,V.jsxs)(`div`,{children:[(0,V.jsx)(`h3`,{children:e.title}),(0,V.jsx)(`p`,{children:e.text}),(0,V.jsx)(`small`,{children:e.tag})]})]},e.title))}),(0,V.jsxs)(`div`,{className:`snag-demo-board snag-stage-${c}`,"aria-label":n.demo,children:[(0,V.jsxs)(`div`,{className:`snag-board-top`,children:[(0,V.jsxs)(`span`,{children:[(0,V.jsx)(`span`,{className:`snag-live-dot`}),` INSTASNAG /`,` `,e===`fr`?`EN ACTION`:`IN ACTION`]}),(0,V.jsxs)(`span`,{children:[`0`,c+1,` â 03`]})]}),(0,V.jsxs)(`div`,{className:`snag-radar`,children:[(0,V.jsx)(`div`,{}),(0,V.jsx)(`div`,{}),(0,V.jsx)(`div`,{}),(0,V.jsx)(`span`,{children:(0,V.jsx)(hj,{size:34,fill:`currentColor`})})]}),(0,V.jsxs)(`div`,{className:`snag-demo-search`,children:[(0,V.jsx)(UA,{size:18}),(0,V.jsx)(`span`,{children:n.items[0]}),(0,V.jsx)(QA,{size:16}),(0,V.jsxs)(`div`,{children:[(0,V.jsxs)(`span`,{children:[e===`fr`?`Max.`:`Up to`,` `,n.budget]}),(0,V.jsx)(`span`,{children:n.radius})]})]}),(0,V.jsxs)(`div`,{className:`snag-demo-listing`,children:[(0,V.jsx)(`div`,{className:`snag-product snag-product-0`}),(0,V.jsxs)(`div`,{children:[(0,V.jsxs)(`span`,{className:`snag-small-label`,children:[(0,V.jsx)(`span`,{}),e===`fr`?`UNE CORRESPONDANCE`:`ITâS A MATCH`]}),(0,V.jsx)(`h4`,{children:n.items[0]}),(0,V.jsxs)(`span`,{className:`snag-demo-price`,children:[n.price,` `,(0,V.jsx)(sA,{size:17})]}),(0,V.jsx)(`p`,{children:n.distance})]})]}),(0,V.jsxs)(`div`,{className:`snag-demo-toast`,children:[(0,V.jsx)(Fk,{size:16}),c===2?e===`fr`?`${n.headroom} sous votre budget. à vous de jouer.`:`${n.headroom} under budget. Your move.`:e===`fr`?`Vos critères. La bonne annonce.`:`Your search. The right match.`,(0,V.jsx)(Ck,{size:18})]}),(0,V.jsxs)(`div`,{className:`snag-demo-caption`,children:[(0,V.jsx)(`span`,{children:n.demo}),(0,V.jsx)(`div`,{children:n.steps.map((e,t)=>(0,V.jsx)(`button`,{onClick:()=>l(t),"aria-label":e.title,"aria-pressed":c===t},e.title))})]})]})]})]}),(0,V.jsxs)(`section`,{className:`snag-categories snag-section`,children:[(0,V.jsxs)(`div`,{className:`snag-category-heading snag-reveal`,children:[(0,V.jsxs)(`div`,{children:[(0,V.jsxs)(`span`,{className:`snag-eyebrow`,children:[(0,V.jsx)(`span`,{className:`snag-section-index`,children:`02 /`}),n.categoryLabel]}),(0,V.jsxs)(`h2`,{children:[n.categoryTitle[0],(0,V.jsx)(`br`,{}),(0,V.jsx)(`span`,{children:n.categoryTitle[1]})]})]}),(0,V.jsx)(vk,{size:64,strokeWidth:1})]}),(0,V.jsx)(`div`,{className:`snag-category-grid`,children:n.categories.map((e,t)=>(0,V.jsxs)(`article`,{className:`snag-category-card snag-reveal`,children:[(0,V.jsxs)(`div`,{className:`snag-category-photo snag-product snag-product-${t}`,children:[(0,V.jsxs)(`span`,{children:[`0`,t+1]}),(0,V.jsx)(`span`,{className:`snag-category-symbol`,children:t===0?(0,V.jsx)(Pk,{size:21}):t===1?(0,V.jsx)(ej,{size:21}):(0,V.jsx)(sA,{size:21})})]}),(0,V.jsxs)(`div`,{className:`snag-category-text`,children:[(0,V.jsx)(`h3`,{children:e}),(0,V.jsx)(`p`,{children:n.categorySubs[t]})]})]},e))}),(0,V.jsx)(`p`,{className:`snag-category-note`,children:n.categoryNote})]}),(0,V.jsxs)(`section`,{className:`snag-benefits snag-section`,children:[(0,V.jsxs)(`div`,{className:`snag-benefit-title snag-reveal`,children:[(0,V.jsx)(hj,{size:34,fill:`currentColor`}),(0,V.jsx)(`h2`,{children:n.benefitTitle.split(` 39`).map(e=>(0,V.jsxs)(`span`,{children:[e,(0,V.jsx)(`br`,{})]},e))})]}),(0,V.jsx)(`div`,{className:`snag-benefit-grid`,children:n.benefits.map(([e,t],n)=>(0,V.jsxs)(`article`,{className:`snag-reveal`,children:[n===0?(0,V.jsx)(pA,{size:24}):n===1?(0,V.jsx)($ae,{size:24}):(0,V.jsx)(Ek,{size:24}),(0,V.jsx)(`h3`,{children:e}),(0,V.jsx)(`p`,{children:t})]},e))})]}),(0,V.jsxs)(`section`,{id:`questions`,className:`snag-faq snag-section`,children:[(0,V.jsxs)(`div`,{className:`snag-reveal`,children:[(0,V.jsxs)(`span`,{className:`snag-eyebrow`,children:[(0,V.jsx)(`span`,{className:`snag-section-index`,children:`03 /`}),n.faqLabel]}),(0,V.jsx)(`h2`,{children:n.faqTitle})]}),(0,V.jsx)(`div`,{className:`snag-faq-list`,children:n.faqs.map(([e,t])=>(0,V.jsxs)(`details`,{children:[(0,V.jsxs)(`summary`,{children:[e,(0,V.jsx)(`span`,{children:`+`})]}),(0,V.jsx)(`p`,{children:t})]},e))})]}),(0,V.jsxs)(`section`,{id:`download`,className:`snag-download`,children:[(0,V.jsx)(`div`,{className:`snag-download-orbit`,"aria-hidden":`true`}),(0,V.jsx)(`span`,{className:`snag-eyebrow`,children:n.finalLabel}),(0,V.jsxs)(`h2`,{children:[n.finalTitle[0],(0,V.jsx)(`br`,{}),(0,V.jsx)(`span`,{children:n.finalTitle[1]}),(0,V.jsx)(`span`,{className:`snag-download-star`,"aria-hidden":`true`,children:`â³`})]}),(0,V.jsx)(`p`,{children:n.finalText}),(0,V.jsx)(Fq,{placement:`final`,locale:e}),(0,V.jsxs)(`span`,{className:`snag-download-note`,children:[`iPhone & Android `,(0,V.jsx)(`span`,{children:`â`}),` InstaSnag`]})]}),(0,V.jsxs)(`footer`,{className:`snag-footer`,children:[(0,V.jsxs)(`div`,{children:[(0,V.jsxs)(zi,{to:`/`,className:`snag-wordmark`,children:[(0,V.jsx)(`span`,{className:`snag-brand-icon`,children:(0,V.jsx)(hj,{size:20,fill:`currentColor`})}),`Insta`,(0,V.jsx)(`span`,{children:`Snag`})]}),(0,V.jsx)(`p`,{children:n.footer})]}),(0,V.jsxs)(`nav`,{"aria-label":`Footer`,children:[(0,V.jsx)(zi,{to:`/privacy`,children:n.privacy}),(0,V.jsx)(zi,{to:`/terms`,children:n.terms}),(0,V.jsx)(zi,{to:`/contact`,children:n.contact}),(0,V.jsxs)(zi,{to:`/auth/signup`,children:[n.signIn,(0,V.jsx)(Ck,{size:13})]})]}),(0,V.jsxs)(`div`,{className:`snag-footer-bottom`,children:[(0,V.jsxs)(`span`,{children:[`© `,new Date().getFullYear(),` InstaSnag`]}),(0,V.jsx)(`a`,{href:`mailto:[email protected]`,children:`[email protected]`}),(0,V.jsxs)(`a`,{href:`#snag-main`,children:[e===`fr`?`Retour en haut`:`Back to top`,` â`]})]})]})]})]})}function Lq({open:e,onClose:t,onSuccess:n}){let r=(0,b.useId)(),[i,a]=(0,b.useState)(`method`),[o,s]=(0,b.useState)(`item`),[c,l]=(0,b.useState)(``),[u,d]=(0,b.useState)(null),[f,p]=(0,b.useState)(null),[m,h]=(0,b.useState)(!1),[g,_]=(0,b.useState)(`item`),v=e&&i!==`manual-form`,y=(0,b.useCallback)(()=>{a(`method`),s(`item`),l(``),d(null),p(null),h(!1)},[]),S=(0,b.useCallback)(()=>{y(),t()},[t,y]),C=(0,b.useCallback)(()=>{m||S()},[S,m]);(0,b.useEffect)(()=>
39{if(!e)return;document.body.style.overflow=`hidden`;let t=e=>{e.key===`Escape`&&!m&&i!==`manual-form`&&C()};return window.addEventListener(`keydown`,t),()=>{document.body.style.overflow=``,window.removeEventListener(`keydown`,t)}},[e,m,i,C]);let w=async e=>{e.preventDefault(),p(null);let t=c.trim();if(!t){d(`URL or listing ID is required.`);return}let r=os(t,o);if(!r){/^\d+$/.test(t)&&!is(t)?d(`Listing ID must be ${cs.idLengthRange}.`):d(`Enter a valid Facebook Marketplace URL or numeric listing ID.`);return}d(null),h(!0);try{let e=await bs({...r,listingType:o});eN&&nN.capture(`personal_listing_imported`,{listing_type:o}),n(e),S()}catch(e){p(xs(e))}finally{h(!1)}};return(0,V.jsxs)(V.Fragment,{children:[(0,x.createPortal)((0,V.jsx)(zD,{children:v?(0,V.jsxs)(ik.div,{className:`fixed inset-0 z-[200] flex items-end justify-center sm:items-center sm:p-4`,initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},children:[(0,V.jsx)(`div`,{className:`absolute inset-0 bg-black/65 backdrop-blur-[2px]`,onClick:()=>!m&&C()}),(0,V.jsxs)(ik.div,{role:`dialog`,"aria-modal":`true`,"aria-labelledby":r,className:`relative z-[201] flex max-h-[min(92dvh,720px)] w-full max-w-lg flex-col overflow-hidden rounded-t-[1.75rem] border border-border/60 bg-surface shadow-2xl sm:rounded-[1.5rem]`,initial:{opacity:0,y:24},animate:{opacity:1,y:0},exit:{opacity:0,y:16},children:[(0,V.jsxs)(`div`,{className:`flex items-center justify-between border-b border-border/40 px-5 py-4`,children:[(0,V.jsx)(`h2`,{id:r,className:`text-xl font-black tracking-tight text-foreground`,children:`Add listing`}),(0,V.jsx)(`button`,{type:`button`,onClick:C,disabled:m,className:`flex h-10 w-10 items-center justify-center rounded-full border border-border/60 text-muted-foreground hover:bg-surface-elevated`,"aria-label":`Close`,children:(0,V.jsx)(mj,{size:18})})]}),(0,V.jsxs)(`div`,{className:`custom-scrollbar min-h-0 flex-1 overflow-y-auto px-5 py-5`,children:[i===`method`?(0,V.jsxs)(`div`,{className:`grid gap-3`,children:[(0,V.jsxs)(`button`,{type:`button`,onClick:()=>
39a(`facebook`),className:`flex items-start gap-4 rounded-2xl border border-border/60 bg-surface-elevated/40 p-4 text-left transition-colors hover:border-primary/40 hover:bg-primary/5`,children:[(0,V.jsx)(`div`,{className:`flex h-11 w-11 items-center justify-center rounded-xl bg-primary/10 text-primary`,children:(0,V.jsx)(gA,{size:20})}),(0,V.jsxs)(`div`,{children:[(0,V.jsx)(`p`,{className:`font-bold text-foreground`,children:`Already on Facebook`}),(0,V.jsx)(`p`,{className:`mt-1 text-sm text-muted-foreground`,children:`Paste a Marketplace URL or listing ID to import details.`})]})]}),(0,V.jsxs)(`button`,{type:`button`,onClick:()=>a(`manual-type`),className:`flex items-start gap-4 rounded-2xl border border-border/60 bg-surface-elevated/40 p-4 text-left transition-colors hover:border-primary/40 hover:bg-primary/5`,children:[(0,V.jsx)(`div`,{className:`flex h-11 w-11 items-center justify-center rounded-xl bg-primary/10 text-primary`,children:(0,V.jsx)(Aae,{size:20})}),(0,V.jsxs)(`div`,{children:[(0,V.jsx)(`p`,{className:`font-bold text-foreground`,children:`Create manually`}),(0,V.jsx)(`p`,{className:`mt-1 text-sm text-muted-foreground`,children:`Upload photos and enter listing details yourself.`})]})]})]}):null,i===`manual-type`?(0,V.jsxs)(`div`,{className:`space-y-4`,children:[(0,V.jsx)(`button`,{type:`button`,onClick:()=>a(`method`),className:`text-sm font-bold text-primary`,children:`â Back`}),(0,V.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:`Choose the listing type for your manual listing.`}),(0,V.jsx)(`div`,{className:`grid gap-3 sm:grid-cols-2`,children:[{type:`item`,label:`Item`,icon:AA},{type:`vehicle`,label:`Vehicle`,icon:Pk}].map(e=>(0,V.jsxs)(`button`,{type:`button`,onClick:()=>{_(e.type),a(`manual-form`)},className:`rounded-2xl border border-border/60 bg-surface-elevated/40 p-5 text-left transition-colors hover:border-primary/40 hover:bg-primary/5`,children:[(0,V.jsx)(e.icon,{size:22,className:`text-primary`,"aria-hidden":!0}),(0,V.jsx)(`p`,{className:`mt-3 font-bold text-foreground`,children:e.label})]},e.type))})]}):null,i===`facebook`?(0,V.jsxs)(`form`,{onSubmit:e=>void w(e),className:`space-y-5`,children:[(0,V.jsx)(`button`,{type:`button`,onClick:()=>a(`method`),className:`text-sm font-bold text-primary`,children:`â Back`}),(0,V.jsx)(`div`,{className:`grid grid-cols-2 gap-2`,children:[{type:`item`,label:`Item`},{type:`vehicle`,label:`Vehicle`}].map(e=>(0,V.jsx)(`button`,{type:`button`,onClick:()=>s(e.type),className:`rounded-xl border px-3 py-2.5 text-sm font-bold transition-colors ${o===e.type?`border-primary bg-primary/10 text-primary`:`border-border bg-surface-elevated text-muted-foreground`}`,children:e.label},e.type))}),(0,V.jsxs)(`div`,{className:`rounded-2xl border border-border/50 bg-surface-elevated/30 p-4 text-sm text-muted-foreground`,children:[(0,V.jsxs)(`div`,{className:`flex items-center gap-2 font-bold text-foreground`,children:[(0,V.jsx)(Sae,{size:16}),`Quick guide`]}),(0,V.jsxs)(`ol`,{className:`mt-3 list-decimal space-y-2 pl-5`,children:[(0,V.jsx)(`li`,{children:`Open the Facebook Marketplace listing.`}),(0,V.jsx)(`li`,{children:`Copy the URL or numeric listing ID.`}),(0,V.jsx)(`li`,{children:`Paste it below and add the listing.`})]})]}),(0,V.jsxs)(`div`,{children:[(0,V.jsx)(`label`,{className:`text-[10px] font-black uppercase tracking-[0.2em] text-muted-foreground/70`,children:`Listing URL or ID`}),(0,V.jsx)(`input`,{value:c,onChange:e=>{l(e.target.value),d(null),p(null)},disabled:m,placeholder:cs.placeholder,className:`mt-2 w-full rounded-2xl border bg-surface px-4 py-3.5 text-sm font-medium outline-none focus:ring-2 focus:ring-primary/30 disabled:opacity-60 ${u?`border-error/50`:`border-border/60 focus:border-primary`}`})]}),(u||f)&&(0,V.jsxs)(`div`,{role:`alert`,className:`flex gap-2 rounded-xl border border-error/25 bg-error/10 px-3 py-2.5 text-sm font-semibold text-error`,children:[(0,V.jsx)(Bk,{size:18,className:`shrink-0`}),u??f]}),(0,V.jsx)(`button`,{type:`submit`,disabled:m,className:`flex h-12 w-full items-center justify-center gap-2 rounded-2xl bg-primary text-sm font-black text-primary-foreground disabled:opacity-60`,children:m?(0,V.jsxs)(V.Fragment,{children:[(0,V.jsx)(_A,{size:18,className:`animate-spin`}),`Adding listingâ¦`]}):`Add listing`})]}):null]})]})]}):null}),document.body),(0,V.jsx)(DR,{open:e&&i===`manual-form`,mode:`create`,listingType:g,onClose:C,onSaved:e=>{n(e),S()}})]})}var Rq={facebook:`Facebook`,ebay:`eBay`,kijiji:`Kijiji`,autotrader:`AutoTrader`},zq={facebook:_N,ebay:cF,kijiji:vN,autotrader:gN};function Bq(e){if(!e)return null;let t=new Date(e);if(Number.isNaN(t.getTime()))return null;let n=Math.floor((Date.now()-t.getTime())/6e4);if(n<1)return`Just now`;if(n<60)return`${n}m ago`;let r=Math.floor(n/60);return r<24?`${r}h ago`:`${Math.floor(r/24)}d ago`}var Vq=(0,b.memo)(function({listing:e,animateLayout:t=!1,onOpen:n,onListingRefreshed:r}){let{unit:i}=oM(),{refresh:a,isRefreshing:o}=yI({onRefreshed:r}),s=(0,b.useMemo)(()=>pF(e.primary_image_url),[e.primary_image_url]),c=`${e.id}:${s??``}`,l=(0,b.useRef)(c),[u,d]=(0,b.useState)(s?`loading`:`error`),f=(0,b.useRef)(null);(0,b.useEffect)(()=>{l.current!==c&&(d(s?`loading`:`error`),l.current=c)},[c,s]),(0,b.useLayoutEffect)(()=>{f.current?.complete&&f.current.naturalHeight>0&&d(`loaded`)},[s]);let p=e.provider?.toLowerCase()??``,m=Rq[p]??`Provider`,h=zq[p]??null,g=p===`kijiji`?`K`:p===`autotrader`?`AT`:`P`,_=`Open in ${m}`,v=fI(e)?`Resync`:pI(e)??`Resync unavailable`,y=dI(e),x=fI(e),S=o(e.id),
39C=`flex h-9 w-9 cursor-default items-center justify-center rounded-full bg-black/20 text-white backdrop-blur-md transition-all hover:bg-primary hover:text-primary-foreground`,w=`pointer-events-none absolute right-11 top-1/2 -translate-y-1/2 whitespace-nowrap rounded-md bg-foreground px-2.5 py-1 text-xs font-semibold text-background opacity-0 shadow-lg transition-opacity duration-150`,T=Bq(e.listed_at),E=Bq(e.scraped_at??e.updated_at),D=iM(e.mileage,i),O=[D?{key:`mileage`,label:D,icon:(0,V.jsx)(nA,{size:12})}:null,e.transmission_type?{key:`transmission`,label:bF(e.transmission_type)??e.transmission_type,icon:(0,V.jsx)(Wk,{size:12})}:null,e.fuel_type?{key:`fuel`,label:yF(e.fuel_type)??e.fuel_type,icon:(0,V.jsx)($k,{size:12})}:null].filter(Boolean),k=!!n,A=(0,b.useCallback)(()=>{n?.(e.id)},[e.id,n]),j=(0,b.useCallback)(e=>{k&&(e.target.closest(`a, button`)||A())},[k,A]),M=(0,b.useCallback)(e=>{k&&(e.key!==`Enter`&&e.key!==` `||(e.preventDefault(),A()))},[k,A]);return(0,V.jsxs)(ik.div,{layout:t,transition:t?{type:`spring`,stiffness:150,damping:25,mass:.8}:void 0,initial:{opacity:0}
39,animate:{opacity:1},exit:{opacity:0},style:{willChange:`transform, opacity`},role:k?`button`:void 0,tabIndex:k?0:void 0,onClick:k?j:void 0,onKeyDown:k?M:void 0,className:`group relative flex cursor-pointer flex-col overflow-hidden rounded-3xl border border-border bg-surface transition-shadow duration-300 hover:shadow-2xl hover:shadow-primary/5`,children:[(0,V.jsxs)(`div`,{className:`relative h-56 w-full overflow-hidden rounded-xl`,children:[!s||u===`error`?(0,V.jsx)(`div`,{className:`absolute inset-0 flex items-center justify-center rounded-xl border border-border/10 bg-surface-elevated/60 text-muted-foreground/40`,children:(0,V.jsx)(lA,{size:24,strokeWidth:1.5})}):(0,V.jsxs)(V.Fragment,{children:[u===`loading`&&(0,V.jsxs)(`div`,{className:`absolute inset-0 overflow-hidden rounded-xl bg-surface-hover`,children:[(0,V.jsx)(`div`,{className:`absolute inset-0 bg-gradient-to-br from-surface-hover via-border/30 to-surface-hover`}),(0,V.jsx)(`div`,{className:`absolute -inset-y-full left-[-50%] w-[100%] rotate-12 animate-[pulse_2s_ease-in-out_infinite] bg-gradient-to-r from-transparent via-white/50 to-transparent dark:via-white/10`})]}),(0,V.jsx)(`img`,{ref:f,src:s,alt:``,loading:`lazy`,referrerPolicy:`no-referrer`,onLoad:()=>d(`loaded`),onError:()=>d(`error`),className:`h-full w-full rounded-xl object-cover transition-all duration-700 ${u===`loaded`?`scale-100 opacity-100`:`scale-95 opacity-0`}`},s)]}),(0,V.jsx)(`div`,{className:`absolute inset-0 rounded-xl bg-gradient-to-t from-black/60 via-trans
39parent to-transparent opacity-0 transition-opacity duration-300 group-hover:opacity-100`}),(0,V.jsxs)(`div`,{className:`absolute left-3 top-3 flex flex-col items-start gap-2`,children:[(0,V.jsx)(`span`,{className:`inline-flex shrink-0 rounded-full px-2.5 py-1 text-[10px] font-black tracking-wide ${tI(e.status)}`,children:eI(e.status)}),e.ai_negotiation_enabled?(0,V.jsxs)(`span`,{className:`inline-flex shrink-0 items-center gap-1 rounded-full border border-primary/40 bg-primary px-2.5 py-1 text-[10px] font-black tracking-wide text-primary-foreground shadow-md ring-1 ring-black/25`,children:[(0,V.jsx)(Ok,{size:10}),`AI on`]}):null,e.repost_summary?.repost?.enabled?(0,V.jsxs)(`span`,{className:`inline-flex shrink-0 items-center gap-1 rounded-full border border-emerald-500/40 bg-emerald-500/90 px-2.5 py-1 text-[10px] font-black tracking-wide text-white shadow-md ring-1 ring-black/25`,children:[(0,V.jsx)(BA,{size:10}),`Repost on`]}):null]}),e.url||y?(0,V.jsxs)(`div`,{className:`absolute right-3 top-3 flex flex-col items-center gap-2`,children:[e.url?(0,V.jsxs)(`div`,{className:`group/provider relative`,children:[(0,V.jsx)(`a`,{href:e.url,target:`_blank`,rel:`noopener noreferrer`,"aria-label":_,onClick:e=>e.stopPropagation(),className:C,children:(0,V.jsx)(Zk,{size:16})}),(0,V.jsx)(`span`,{className:`${w} group-hover/provider:opacity-100`,children:_})]}):null,y?(0,V.jsxs)(`div`,{className:`group/resync relative`,children:[(0,V.jsx)(`button`,{type:`button`,"aria-label":v,disabled:S||!x,onClick:t=>{t.stopPropagation(),a(e)},className:`${C} disabled:cursor-not-allowed disabled:opacity-60`,children:S?(0,V.jsx)(_A,{size:16,className:`animate-spin`}):(0,V.jsx)(zA,{size:16})}),(0,V.jsx)(`span`,{className:`${w} group-hover/resync:opacity-100`,children:v})]}):null]}):null,(0,V.jsx)(`div`,{className:`absolute bottom-3 left-3`,children:h?(0,V.jsx)(`img`,{src:h,className:`h-7 w-7 rounded-full border border-white/25 object-cover`,alt:m}):(0,V.jsx)(`span`,{className:`flex h-7 w-7 items-center justify-center rounded-full border border-white/25 bg-black/30 text-[9px] font-black uppercase tracking-wide text-white`,children:g})})]}),(0,V.jsxs)(`div`,{className:`flex flex-1 flex-col p-5`,children:[(0,V.jsx)(`h3`,{className:`mb-1 line-clamp-1 text-lg font-bold text-foreground transition-colors group-hover:text-primary`,children:e.title||`Untitled Listing`}),(0,V.jsxs)(`div`,{className:`mb-4 flex items-start justify-between gap-3`,children:[(0,V.jsxs)(`span`,{className:`text-2xl font-black text-foreground`,children:[e.currency_symbol||`$`,e.price?.toLocaleString()??`N/A`]}),(0,V.jsxs)(`div`,{className:`flex flex-col items-end text-[11px] font-semibold text-muted-foreground`,children:[T?(0,V.jsxs)(`span`,{className:`whitespace-nowrap`,children:[`Listed `,T]}):null,E?(0,V.jsxs)(`span`,{className:`whitespace-nowrap`,children:[`Synced `,E]}):null,!T&&!E?(0,V.jsx)(`span`,{children:`Recently`}):null]})]}),O.length>0?(0,V.jsx)(`div`,{className:`flex flex-wrap gap-2`,children:O.slice(0,3).map(e=>(0,V.jsxs)(`span`,{className:`inline-flex items-center gap-1.5 rounded-full border border-border bg-surface-elevated/60 px-2.5 py-1 text-xs font-semibold text-foreground/85`,children:[(0,V.jsx)(`span`,{className:`text-muted-foreground`,children:e.icon}),e.label]},e.key))}):null]})]})}),Hq=20;function Uq(){let e=my(),t=or(),n=nr(),{listingId:r}=ur(),i=r,{status:a,isAuthenticated:o,user:s}=Jv(),{gateReady:c}=Rj(),{ownership:l}=bj(),{showToast:u}=Gx(),[d,f]=(0,b.useState)([]),[p,m]=(0,b.useState)(!0),[h,g]=(0,b.useState)(!1),[_,v]=(0,b.useState)(``),[y,x]=(0,b.useState)(1),[S,C]=(0,b.useState)(!1),[w,T]=(0,b.useState)(!1),E=(0,b.useCallback)(async(t,n)=>{n?g(!0):(m(!0),v(``));try{let e=await us({page:t,page_size:Hq});f(t=>n?[...t,...e]:e),x(t),C(e.length>=Hq)}catch(t){n||f([]),v(kte(e,t))}finally{m(!1),g(!1)}},[]);(0,b.useEffect)(()=>{if(a===`loading`)return;if(!o){t(`/auth/login`,{replace:!0});return}let e=!1;return queueMicrotask(()=>{e||E(1,!1)}),()=>{e=!0}},[o,E,t,a]);let D=(0,b.useCallback)(()=>{h||!S||E(y+1,!0)},[S,h,E,y]),O=!p&&c,k=c&&l.ownsSellerProducts,A=(0,b.useCallback)(e=>{t(vce(e),{state:{fromListingOverlay:!0,overlaySource:`my-listings`,overlayReturnPath:`/dashboard/personal`}})},[t]),j=(0,b.useCallback)(()=>{let e=n.state,r=e?.overlayReturnPath??`/dashboard/personal`;if(TF(e)){t(r,{replace:!0});return}t(`/dashboard/personal`,{replace:!0})},[n.state,t]),M=(0,b.useCallback)(e=>{f(t=>t.map(t=>
39t.id===e.id?e:t))},[]);Oj({onListingUpdated:e=>{e.isPersonalListing&&M(Aj(e.listing))}});let N=(0,b.useCallback)(t=>{u({type:`success`,message:e(`listings.deletedToast`,{title:t.title||e(`common.listing`)})}),f(e=>e.filter(e=>e.id!==t.id))},[u]),P=(0,b.useCallback)(t=>{u({type:`success`,message:e(`listings.addedToast`,{title:t.title||e(`common.listing`)})}),f(e=>[t,...e.filter(e=>e.id!==t.id)]),x(1),v(``),E(1,!1)},[E,u]);if(a===`loading`)return(0,V.jsx)(`div`,{className:`flex min-h-[60vh] items-center justify-center px-4`,children:(0,V.jsx)(`p`,{className:`text-sm font-medium text-muted-foreground`,children:e(`listings.loading`)})});if(!o)return null;let F=d.length;return(0,V.jsxs)(ik.main,{initial:{opacity:0},animate:{opacity:1},className:`mx-auto min-h-[60vh] w-full min-w-0 max-w-7xl overflow-x-hidden px-3 py-6 sm:px-6 sm:py-10 lg:px-8`,children:[(0,V.jsxs)(`div`,{className:`mb-8 flex flex-col gap-4 sm:mb-12 sm:gap-6 sm:flex-row sm:items-center sm:justify-between`,children:[(0,V.jsxs)(`div`,{children:[(0,V.jsx)(`h1`,{className:`text-[34px] font-black leading-tight tracking-tight text-foreground sm:text-[40px]`,children:e(`listings.title`)}),p?null:(0,V.jsx)(`div`,{className:`mt-3 flex items-center gap-4`,children:(0,V.jsx)(`p`,{className:`text-sm font-medium text-muted-foreground/80 sm:text-lg`,children:F>0?e(F===1?`listings.listingSynced`:`listings.listingsSynced`,{count:`${F}${S?`+`:``}`}):e(`listings.greetingAddFirst`,{name:s?.username??s?.email??``})})})]}),O?k?(0,V.jsxs)(`button`,{type:`button`,onClick:()=>T(!0),className:`flex h-12 w-full items-center justify-center gap-2 rounded-2xl bg-primary px-6 text-sm font-black text-primary-foreground shadow-lg shadow-primary/20 transition-all hover:scale-105 hover:bg-primary/90 active:scale-95 sm:w-auto`,children:[(0,V.jsx)(IA,{size:20}),e(`common.addNew`)]}):(0,V.jsxs)(zi,{to:YN(`subscription`),className:`flex h-12 w-full items-center justify-center gap-2 rounded-2xl bg-orange-500 px-6 text-sm font-black text-white shadow-lg shadow-orange-500/20 transition-all hover:scale-105 hover:bg-orange-600 active:scale-95 sm:w-auto`,children:[(0,V.jsx)(hj,{size:20}),e(`common.upgradeToAddListing`)]}):null]}),_?(0,V.jsxs)(`div`,{className:`mb-8 rounded-2xl border border-error/30 bg-error/5 px-4 py-3 text-sm font-medium text-error`,role:`alert`,children:[_,(0,V.jsx)(`button`,{type:`button`,onClick:()=>void E(1,!1),className:`mt-3 block text-sm font-bold underline underline-offset-2 hover:no-underline`,children:e(`common.tryAgain`)})]}):null,(0,V.jsx)(`section`,{children:p?(0,V.jsx)(`div`,{className:`grid grid-cols-1 gap-4 min-[640px]:grid-cols-2 min-[1280px]:grid-cols-3`,children:Array.from({length:6}).map((e,t)=>(0,V.jsx)(`div`,{className:`h-[22.5rem] animate-pulse rounded-3xl border border-border/40 bg-surface-elevated/40`},`sk-${t}`))}):!_&&d.length===0?(0,V.jsxs)(`div`,{className:`flex flex-col items-center justify-center rounded-2xl border border-dashed border-border/60 bg-surface/30 px-6 py-16 text-center`,children:[(0,V.jsx)(`div`,{className:`mb-4 flex h-14 w-14 items-center justify-center rounded-2xl bg-surface-elevated text-muted-foreground/50`,children:(0,V.jsx)(AA,{size:28})}),(0,V.jsx)(`h2`,{className:`text-xl font-bold text-foreground`,children:e(`listings.noListingsYet`)}),(0,V.jsx)(`p`,{className:`mt-2 max-w-md text-sm text-muted-foreground`,children:e(k?`listings.emptyCanAdd`:`listings.emptyUpgrade`)}),k?(0,V.jsxs)(`button`,{type:`button`,onClick:()=>T(!0),className:`mt-6 flex items-center gap-2 rounded-xl bg-primary px-6 py-3 text-sm font-black text-primary-foreground shadow-lg shadow-primary/20 transition-all hover:bg-primary/90`,children:[(0,V.jsx)(IA,{size:18}),e(`common.addNew`)]}):(0,V.jsxs)(zi,{to:YN(`subscription`),className:`mt-6 flex items-center gap-2 rounded-xl bg-orange-500 px-6 py-3 text-sm font-black text-white shadow-lg shadow-orange-500/20 transition-all hover:bg-orange-600`,children:[(0,V.jsx)(hj,{size:18}),e(`common.viewPlans`)]})]}):_?null:(0,V.jsxs)(V.Fragment,{children:[(0,V.jsx)(`div`,{className:`grid w-full min-w-0 grid-cols-1 gap-4 min-[640px]:grid-cols-2 min-[1280px]:grid-cols-3`,children:d.map(e=>(0,V.jsx)(Vq,{listing:e,onOpen:A,onListingRefreshed:M},e.id))}),S?(0,V.jsx)(`div`,{className:`mt-8 flex justify-center`,children:(0,V.jsx)(`button`,{type:`button`,onClick:D,disabled:h,className:`rounded-2xl border border-border/60 bg-surface px-6 py-2.5 text-sm font-bold text-foreground transition-colors hover:bg-surface-elevated disabled:opacity-50`,children:e(h?`common.loading`:`common.loadMore`)})}):null]})}),k?(0,V.jsx)(Lq,{open:w,onClose:()=>T(!1),onSuccess:P}):null,(0,V.jsx)(XR,{listingId:i,onRequestClose:j,backLabel:e(`listings.backToMyListings`),onListingUpdated:M,onListingDeleted:N})]})}function Wq(){let e=my();return(0,V.jsxs)(`div`,{className:`relative flex w-full flex-col items-center justify-center overflow-x-hidden px-4 py-12 sm:px-5 sm:py-20 md:py-24 lg:py-32 min-h-[calc(100dvh-9rem)] sm:min-h-[calc(100dvh-10.5rem)] md:min-
39h-[calc(100dvh-11rem)]`,children:[(0,V.jsxs)(`div`,{className:`pointer-events-none absolute inset-0 -z-10 overflow-x-hidden`,"aria-hidden":`true`,children:[(0,V.jsx)(`div`,{className:`absolute top-1/2 left-1/2 h-[min(100vw,600px)] w-[min(100vw,600px)] -translate-x-1/2 -translate-y-1/2 rounded-full bg-primary/10 blur-[120px] sm:h-[600px] sm:w-[600px]`}),(0,V.jsx)(`div`,{className:`absolute top-[15%] right-[5%] h-[min(70vw,300px)] w-[min(70vw,300px)] rounded-full bg-accent/10 blur-[100px] sm:top-[20%] sm:right-[10%] sm:h-[300px] sm:w-[300px]`})]}),(0,V.jsxs)(`div`,{className:`container relative mx-auto w-full max-w-2xl px-0 text-center sm:px-4`,children:[(0,V.jsxs)(`div`,{className:`relative mx-auto inline-block max-w-full px-2 pt-2 sm:px-4 sm:pt-4`,children:[(0,V.jsx)(`span`,{className:`absolute inset-[-0.5rem] rounded-full bg-primary/5 blur-2xl sm:-inset-4 dark:bg-primary/20`}),(0,V.jsx)(`h1`,{className:`relative bg-[image:var(--grad-primary)] bg-clip-text pb-1 text-[clamp(4.25rem,min(20vw,18vh),12rem)] font-black leading-none tracking-tighter text-transparent sm:pb-2 md:pb-3`,children:`404`})]}),(0,V.jsx)(`h2`,{className:`mx-auto mt-6 max-w-xl text-balance text-center text-2xl font-black tracking-tight text-foreground sm:mt-8 sm:max-w-2xl sm:text-3xl md:text-4xl`,children:e(`notFound.title`)}),(0,V.jsx)(`p`,{className:`mx-auto mt-4 max-w-md px-1 text-center text-base leading-relaxed text-muted-foreground sm:mt-6 sm:text-lg`,children:e(`notFound.description`)}),(0,V.jsxs)(`div`,{className:`mx-auto mt-10 flex w-full max-w-md flex-col items-stretch justify-center gap-3 sm:mt-12 sm:max-w-lg sm:flex-row sm:items-center sm:justify-center sm:gap-4`,children:[(0,V.jsxs)(zi,{to:`/`,className:`flex min-h-12 w-full items-center justify-center gap-2 rounded-xl bg-primary px-6 py-3 text-sm font-black text-primary-foreground transition-all hover:bg-primary-hover active:scale-[0.98] sm:w-auto sm:px-8`,children:[(0,V.jsx)(cA,{className:`h-[1.125rem] w-[1.125rem] shrink-0`,strokeWidth:2.5}),e(`common.backToHome`)]}),(0,V.jsx)(zi,{to:`/features`,className:`flex min-h-12 w-full items-center justify-center gap-2 rounded-xl border border-border bg-surface px-6 py-3 text-sm font-black text-foreground transition-all hover:border-primary/50 active:scale-[0.98] sm:w-auto sm:px-8`,children:e(`common.exploreFeatures`)})]}),(0,V.jsxs)(`div`,{className:`mt-10 flex flex-wrap items-center justify-center gap-x-3 gap-y-2 pb-4 text-xs font-bold uppercase tracking-widest text-muted-foreground sm:mt-14 sm:gap-4 sm:pb-6 sm:text-sm`,children:[(0,V.jsx)(`div`,{className:`hidden h-px w-6 bg-border sm:block sm:w-8`}),(0,V.jsx)(`span`,{className:`max-w-[min(100%,16rem)] text-pretty sm:max-w-none`,children:e(`notFound.tagline`)}),(0,V.jsx)(`div`,{className:`hidden h-px w-6 bg-border sm:block sm:w-8`})]})]})]})}var Gq=Object.create,Kq=Object.defineProperty,qq=Object.getOwnPropertyDescriptor,Jq=(e,t)=>(t=Symbol[e])?t:Symbol.for(`Symbol.`+e),Yq=e=>{throw TypeError(e)},Xq=(e,t,n)=>t in e?Kq(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Zq=(e,t)=>Kq(e,`name`,{value:t,configurable:!0}),Qq=e=>[,,,Gq(e?.[Jq(`metadata`)]??null)],$q=[`class`,`method`,`getter`,`setter`,`accessor`,`field`,`value`,`get`,`set`],eJ=e=>e!==void 0&&typeof e!=`function`?Yq(`Function expected`):e,tJ=(e,t,n,r,i)=>({kind:$q[e],name:t,metadata:r,addInitializer:e=>n._?Yq(`Already initialized`):i.push(eJ(e||null))}),nJ=(e,t)=>Xq(t,Jq(`metadata`),e[3]),rJ=(e,t,n,r)=>{for(var i=0,a=e[t>>1],o=a&&a.length;i<o;i++)t&1?a[i].call(n):r=a[i].call(n,r);return r},iJ=(e,t,n,r,i,a)=>{var o,s,c,l,u,d=t&7,f=!!(t&8),p=!!(t&16),m=d>3?e.length+1:d?f?1:2:0,h=$q[d+5],g=d>3&&(e[m-1]=[]),_=e[m]||(e[m]=[]),v=d&&(!p&&!f&&(i=i.prototype),d<5&&(d>3||!p)&&qq(d<4?i:{get[n](){return U(this,a)},set[n](e){return lJ(this,a,e)}},n));d?p&&d<4&&Zq(a,(d>2?`set `:d>1?`get `:``)+n):Zq(i,n);for(var y=r.length-1;y>=0;y--)l=tJ(d,n,c={},e[3],_),d&&(l.static=f,l.private=p,u=l.access={has:p?e=>sJ(i,e):e=>n in e},d^3&&(u.get=p?e=>(d^1?U:uJ)(e,i,d^4?a:v.get):e=>e[n]),d>2&&(u.set=p?(e,t)=>lJ(e,i,t,d^4?a:v.set):(e,t)=>e[n]=t)),s=(0,r[y])(d?d<4?p?a:v[h]:d>4?void 0:{get:v.get,set:v.set}:i,l),c._=1,d^4||s===void 0?eJ(s)&&(d>4?g.unshift(s):d?p?a=s:v[h]=s:i=s):typeof s!=`object`||!s?Yq(`Object expected`):(eJ(o=s.get)&&(v.get=o),eJ(o=s.set)&&(v.set=o),eJ(o=s.init)&&g.unshift(o));return d||nJ(e,i),v&&Kq(i,n,v),p?d^4?a:v:i},aJ=(e,t,n)=>Xq(e,typeof t==`symbol`?t:t+``,n),oJ=(e,t,n)=>t.has(e)||Yq(`Cannot `+n),sJ=(e,t)=>Object(t)===t?e.has(t):Yq(`Cannot use the "in" operator on this value`),U=(e,t,n)=>(oJ(e,t,`read from private field`),n?n.call(e):t.get(e)),cJ=(e,t,n)=>t.has(e)?Yq(`Cannot add the same private member more than once`):t instanceof WeakSet?t.add(e):t.set(e,n),lJ=(e,t,n,r)=>(oJ(e,t,`write to private field`),r?r.call(e,n):t.set(e,n),n),uJ=(e,t,n
39)=>(oJ(e,t,`access private method`),n),dJ=`5`,fJ;typeof window<`u`&&((fJ=window.__svelte??(window.__svelte={})).v??(fJ.v=new Set)).add(dJ);var pJ=1,mJ=2,hJ=4,gJ=8,_J=16,vJ=1,yJ=2,bJ=4,xJ=8,SJ=16,CJ=1,wJ=2,TJ=4,EJ=1,DJ=2,OJ=Symbol(),kJ=`http://www.w3.org/1999/xhtml`,AJ=`http://www.w3.org/2000/svg`,jJ=`@attach`,MJ=Array.isArray,NJ=Array.prototype.indexOf,PJ=Array.from,FJ=Object.defineProperty,IJ=Object.getOwnPropertyDescriptor,LJ=Object.getOwnPropertyDescriptors,RJ=Object.prototype,zJ=Array.prototype,BJ=Object.getPrototypeOf,VJ=Object.isExtensible;function HJ(e){return typeof e==`function`}var UJ=()=>{};function WJ(e){return e()}function GJ(e){for(var t=0;t<e.length;t++)e[t]()}function KJ(){var e,t;return{promise:new Promise((n,r)=>{e=n,t=r}),resolve:e,reject:t}}function qJ(e,t){if(Array.isArray(e))return e;if(t===void 0||!(Symbol.iterator in e))return Array.from(e);let n=[];for(let r of e)if(n.push(r),n.length===t)break;return n}var JJ=2,YJ=4,XJ=8,ZJ=1<<24,QJ=16,$J=32,eY=64,tY=128,nY=512,rY=1024,iY=2048,aY=4096,oY=8192,sY=16384,cY=32768,lY=65536,uY=1<<17,dY=1<<18,fY=1<<19,pY=1<<20,mY=1<<25,hY=32768,gY=1<<21,_Y=1<<22,vY=1<<23,yY=Symbol(`$state`),bY=Symbol(`legacy props`),xY=Symbol(``),SY=new class extends Error{constructor(){super(...arguments),aJ(this,`name`,`StaleReactionError`),aJ(this,`message`,"The reaction that called `getAbortSignal()` was re-run or destroyed")}};function CY(e){throw Error(`https://svelte.dev/e/lifecycle_outside_component`)}function wY(){throw Error(`https://svelte.dev/e/async_derived_orphan`)}function TY(e){throw Error(`https://svelte.dev/e/effect_in_teardown`)}function EY(){throw Error(`https://svelte.dev/e/effect_in_unowned_derived`)}function DY(e){throw Error(`https://svelte.dev/e/effect_orphan`)}function OY(){throw Error(`https://svelte.dev/e/effect_update_depth_exceeded`)}function kY(e){throw Error(`https://svelte.dev/e/props_invalid_value`)}function AY(){throw Error(`https://svelte.dev/e/state_descriptors_fixed`)}function jY(){throw Error(`https://svelte.dev/e/state_prototype_fixed`)}function MY(){throw Error(`https://svelte.dev/e/state_unsafe_mutation`)}function NY(){throw Error(`https://svelte.dev/e/svelte_boundary_reset_onerror`)}function PY(){console.warn(`https://svelte.dev/e/select_multiple_invalid_value`)}function FY(){console.warn(`https://svelte.dev/e/svelte_boundary_reset_noop`)}function IY(e){return e===this.v}function LY(e,t){return e==e?e!==t||typeof e==`object`&&!!e||typeof e==`function`:t==t}function RY(e){return!LY(e,this.v)}var zY=!1;function BY(){zY=!0}var VY=null;function HY(e){VY=e}function UY(e){return JY().get(e)}function WY(e,t){return JY().set(e,t),t}function GY(e,t=!1,n){VY={p:VY,i:!1,c:null,e:null,s:e,x:null,l:zY&&!t?{s:null,u:null,$:[]}:null}}function KY(e){var t=VY,n=t.e;if(n!==null){t.e=null;for(var r of n)eQ(r)}return e!==void 0&&(t.x=e),t.i=!0,VY=t.p,e??{}}function qY(){return!zY||VY!==null&&VY.l===null}function JY(e){return VY===null&&CY(),VY.c??=new Map(YY(VY)||void 0)}function YY(e){let t=e.p;for(;t!==null;){let e=t.c;if(e!==null)return e;t=t.p}return null}var XY=[];function ZY(){var e=XY;XY=[],GJ(e)}function QY(e){if(XY.length===0&&!mX){var t=XY;queueMicrotask(()=>{t===XY&&ZY()})}XY.push(e)}function $Y(){for(;XY.length>0;)ZY()}function eX(e){var t=AQ;if(t===null)return DQ.f|=vY,e;if((t.f&cY)===0){if((t.f&tY)===0)throw e;t.b.error(e)}else tX(e,t)}function tX(e,t){for(;t!==null;){if((t.f&tY)!==0)try{t.b.error(e);return}catch(t){e=t}t=t.parent}throw e}var nX=-7169;function rX(e,t){e.f=e.f&nX|t}function iX(e){(e.f&nY)!==0||e.deps===null?rX(e,rY):rX(e,aY)}function aX(e){if(e!==null)for(let t of e)(t.f&JJ)===0||(t.f&hY)===0||(t.f^=hY,aX(t.deps))}function oX(e,t,n){(e.f&iY)===0?(e.f&aY)!==0&&n.add(e):t.add(e),aX(e.deps),rX(e,rY)}var sX=new Set,cX=null,lX=null,uX=null,dX=[],fX=null,pX=!1,mX=!1,hX,gX,_X,vX,yX,bX,xX,SX,CX,wX,TX,EX,DX=class e{constructor(){cJ(this,SX),aJ(this,`committed`,!1),aJ(this,`current`,new Map),aJ(this,`previous`,new Map),cJ(this,hX,new Set),cJ(this,gX,new Set),cJ(this,_X,0),cJ(this,vX,0),cJ(this,yX,null),cJ(this,bX,new Set),cJ(this,xX,new Set),aJ(this,`skipped_effects`,new Set),aJ(this,`is_fork`,!1)}is_deferred(){return this.is_fork||U(this,vX)>0}process(e){var t;dX=[],lX=null,this.apply();var n=[],r=[];for(let t of e)uJ(this,SX,CX).call(this,t,n,r);this.is_fork||uJ(this,SX,TX).call(this),this.is_deferred()?(uJ(this,SX,wX).call(this,r),uJ(this,SX,wX).call(this,n)):(lX=this,cX=null,NX(r),NX(n),lX=null,(t=U(this,yX))==null||t.resolve()),uX=null}capture(e,t){t!==OJ&&!this.previous.has(e)&&this.previous.set(e,t),(e.f&vY)===0&&(this.current.set(e,e.v),uX?.set(e,e.v))}activate(){cX=this,this.apply()}deactivate(){cX===this&&(cX=null,uX=null)}flush(){if(this.activate(),dX.length>0){if(AX(),cX!==null&&cX!==this)return}else U(this,_X)===0&&this.process([]);this.deactivate()}discard(){for(let e of U(this,gX))e(this);U(this,gX).clear()}increment(e){lJ(this,_X,U(this,_X)+1),e&&lJ(this,vX,U(this,vX)+1)}
39decrement(e){lJ(this,_X,U(this,_X)-1),e&&lJ(this,vX,U(this,vX)-1),this.revive()}revive(){for(let e of U(this,bX))U(this,xX).delete(e),rX(e,iY),IX(e);for(let e of U(this,xX))rX(e,aY),IX(e);this.flush()}oncommit(e){U(this,hX).add(e)}ondiscard(e){U(this,gX).add(e)}settled(){return(U(this,yX)??lJ(this,yX,KJ())).promise}static ensure(){if(cX===null){let t=cX=new e;sX.add(cX),mX||e.enqueue(()=>{cX===t&&t.flush()})}return cX}static enqueue(e){QY(e)}apply(){}};hX=new WeakMap,gX=new WeakMap,_X=new WeakMap,vX=new WeakMap,yX=new WeakMap,bX=new WeakMap,xX=new WeakMap,SX=new WeakSet,CX=function(e,t,n){e.f^=rY;for(var r=e.first,i=null;r!==null;){var a=r.f,o=(a&($J|eY))!==0;if(!(o&&(a&rY)!==0||(a&oY)!==0||this.skipped_effects.has(r))&&r.fn!==null){o?r.f^=rY:i!==null&&a&(XJ|16777220)?i.b.defer_effect(r):(a&YJ)===0?UQ(r)&&((a&QJ)!==0&&U(this,bX).add(r),JQ(r)):t.push(r);var s=r.first;if(s!==null){r=s;continue}}var c=r.parent;for(r=r.next;r===null&&c!==null;)c===i&&(i=null),r=c.next,c=c.parent}},wX=function(e){for(var t=0;t<e.length;t+=1)oX(e[t],U(this,bX),U(this,xX))},TX=function(){if(U(this,vX)===0){for(let e of U(this,hX))e();U(this,hX).clear()}U(this,_X)===0&&uJ(this,SX,EX).call(this)},EX=function(){var e;if(sX.size>1){this.previous.clear();var t=uX,n=!0;for(let t of sX){if(t===this){n=!1;continue}let i=[];for(let[e,r]of this.current){if(t.current.has(e))if(n&&r!==t.current.get(e))t.current.set(e,r);else continue;i.push(e)}if(i.length===0)continue;let a=[...t.current.keys()].filter(e=>!this.current.has(e));if(a.length>0){var r=dX;dX=[];let n=new Set,o=new Map;for(let e of i)PX(e,a,n,o);if(dX.length>0){cX=t,t.apply();for(let n of dX)uJ(e=t,SX,CX).call(e,n,[],[]);t.deactivate()}dX=r}}cX=null,uX=t}this.committed=!0,sX.delete(this)};var OX=DX;function kX(e){var t=mX;mX=!0;try{for(var n;;){if($Y(),dX.length===0&&(cX?.flush(),dX.length===0))return fX=null,n;AX()}}finally{mX=t}}function AX(){var e=CQ;pX=!0;try{var t=0;for(wQ(!0);dX.length>0;){var n=OX.ensure();t++>1e3&&jX(),n.process(dX),bZ.clear()}}finally{pX=!1,wQ(e),fX=null}}function jX(){try{OY()}catch(e){tX(e,fX)}}var MX=null;function NX(e){var t=e.length;if(t!==0){for(var n=0;n<t;){var r=e[n++];if((r.f&(sY|oY))===0&&UQ(r)&&(MX=new Set,JQ(r),r.deps===null&&r.first===null&&r.nodes===null&&(r.teardown===null&&r.ac===null?_Q(r):r.fn=null),MX?.size>0)){bZ.clear();for(let e of MX){if((e.f&(sY|oY))!==0)continue;let t=[e],n=e.parent;for(;n!==null;)MX.has(n)&&(MX.delete(n),t.push(n)),n=n.parent;for(let e=t.length-1;e>=0;e--){let n=t[e];(n.f&(sY|oY))===0&&JQ(n)}}MX.clear()}}MX=null}}function PX(e,t,n,r){if(!n.has(e)&&(n.add(e),e.reactions!==null))for(let i of e.reactions){let e=i.f;(e&JJ)===0?(e&(_Y|QJ))!==0&&(e&iY)===0&&FX(i,t,r)&&(rX(i,iY),IX(i)):PX(i,t,n,r)}}function FX(e,t,n){let r=n.get(e);if(r!==void 0)return r;if(e.deps!==null)for(let r of e.deps){if(t.includes(r))return!0;if((r.f&JJ)!==0&&FX(r,t,n))return n.set(r,!0),!0}return n.set(e,!1),!1}function IX(e){for(var t=fX=e;t.parent!==null;){t=t.parent;var n=t.f;if(pX&&t===AQ&&(n&QJ)!==0&&(n&dY)===0)return;if((n&(eY|$J))!==0){if((n&rY)===0)return;t.f^=rY}}dX.push(t)}function LX(e){let t=0,n=SZ(0),r;return()=>{ZZ()&&(Y(n),cQ(()=>(t===0&&(r=QQ(()=>e(()=>DZ(n)))),t+=1,()=>{QY(()=>{--t,t===0&&(r?.(),r=void 0,DZ(n))})})))}}var RX=fY|65664;function zX(e,t,n){new cZ(e,t,n)}var BX,VX,HX,UX,WX,GX,KX,qX,JX,YX,XX,ZX,QX,$X,eZ,tZ,nZ,rZ,iZ,aZ,oZ,sZ,cZ=class{constructor(e,t,n){cJ(this,rZ),aJ(this,`parent`),aJ(this,`is_pending`,!1),cJ(this,BX),cJ(this,VX,null),cJ(this,HX),cJ(this,UX),cJ(this,WX),cJ(this,GX,null),cJ(this,KX,null),cJ(this,qX,null),cJ(this,JX,null),cJ(this,YX,null),cJ(this,XX,0),cJ(this,ZX,0),cJ(this,QX,!1),cJ(this,$X,new Set),cJ(this,eZ,new Set),cJ(this,tZ,null),cJ(this,nZ,LX(()=>(lJ(this,tZ,SZ(U(this,XX))),()=>{lJ(this,tZ,null)}))),lJ(this,BX,e),lJ(this,HX,t),lJ(this,UX,n),this.parent=AQ.b,this.is_pending=!!U(this,HX).pending,lJ(this,WX,lQ(()=>{AQ.b=this;var e=uJ(this,rZ,iZ).call(this);try{lJ(this,GX,dQ(()=>n(e)))}catch(e){this.error(e)}return U(this,ZX)>0?uJ(this,rZ,oZ).call(this):this.is_pending=!1,()=>{var e;(e=U(this,YX))==null||e.remove()}},RX))}defer_effect(e){oX(e,U(this,$X),U(this,eZ))}is_rendered(){return!this.is_pending&&(!this.parent||this.parent.is_rendered())}has_pending_snippet(){return!!U(this,HX).pending}update_pending_count(e){uJ(this,rZ,sZ).call(this,e),lJ(this,XX,U(this,XX)+e),U(this,tZ)&&TZ(U(this,tZ),U(this,XX))}get_effect_pending(){return U(this,nZ).call(this),Y(U(this,tZ))}error(e){var t=U(this,HX).onerror;let n=U(this,HX).failed;if(U(this,QX)||!t&&!n)throw e;U(this,GX)&&(hQ(U(this,GX)),lJ(this,GX,null)),U(this,KX)&&(hQ(U(this,KX)),lJ(this,KX,null)),U(this,qX)&&(hQ(U(this,qX)),lJ(this,qX,null));var r=!1,i=!1;let a=()=>
39{if(r){FY();return}r=!0,i&&NY(),OX.ensure(),lJ(this,XX,0),U(this,qX)!==null&&vQ(U(this,qX),()=>{lJ(this,qX,null)}),this.is_pending=this.has_pending_snippet(),lJ(this,GX,uJ(this,rZ,aZ).call(this,()=>(lJ(this,QX,!1),dQ(()=>U(this,UX).call(this,U(this,BX)))))),U(this,ZX)>0?uJ(this,rZ,oZ).call(this):this.is_pending=!1};var o=DQ;try{kQ(null),i=!0,t?.(e,a),i=!1}catch(e){tX(e,U(this,WX)&&U(this,WX).parent)}finally{kQ(o)}n&&QY(()=>{lJ(this,qX,uJ(this,rZ,aZ).call(this,()=>{OX.ensure(),lJ(this,QX,!0);try{return dQ(()=>{n(U(this,BX),()=>e,()=>a)})}catch(e){return tX(e,U(this,WX).parent),null}finally{lJ(this,QX,!1)}}))})}};BX=new WeakMap,VX=new WeakMap,HX=new WeakMap,UX=new WeakMap,WX=new WeakMap,GX=new WeakMap,KX=new WeakMap,qX=new WeakMap,JX=new WeakMap,YX=new WeakMap,XX=new WeakMap,ZX=new WeakMap,QX=new WeakMap,$X=new WeakMap,eZ=new WeakMap,tZ=new WeakMap,nZ=new WeakMap,rZ=new WeakSet,iZ=function(){var e=U(this,BX);return this.is_pending&&(lJ(this,YX,LZ()),U(this,BX).before(U(this,YX)),e=U(this,YX)),e},aZ=function(e){var t=AQ,n=DQ,r=VY;jQ(U(this,WX)),kQ(U(this,WX)),HY(U(this,WX).ctx);try{return e()}catch(e){return eX(e),null}finally{jQ(t),kQ(n),HY(r)}},oZ=function(){let e=U(this,HX).pending;U(this,GX)!==null&&(lJ(this,JX,document.createDocumentFragment()),U(this,JX).append(U(this,YX)),SQ(U(this,GX),U(this,JX))),U(this,KX)===null&&lJ(this,KX,dQ(()=>e(U(this,BX))))},sZ=function(e){var t;if(!this.has_pending_snippet()){this.parent&&uJ(t=this.parent,rZ,sZ).call(t,e);return}if(lJ(this,ZX,U(this,ZX)+e),U(this,ZX)===0){this.is_pending=!1;for(let e of U(this,$X))rX(e,iY),IX(e);for(let e of U(this,eZ))rX(e,aY),IX(e);U(this,$X).clear(),U(this,eZ).clear(),U(this,KX)&&vQ(U(this,KX),()=>{lJ(this,KX,null)}),U(this,JX)&&(U(this,BX).before(U(this,JX)),lJ(this,JX,null))}};function lZ(e,t,n,r){let i=qY()?fZ:mZ;if(n.length===0&&e.length===0){r(t.map(i));return}var a=cX,o=AQ,s=uZ();function c(){Promise.all(n.map(e=>pZ(e))).then(e=>{s();try{r([...t.map(i),...e])}catch(e){(o.f&sY)===0&&tX(e,o)}a?.deactivate(),dZ()}).catch(e=>{tX(e,o)})}e.length>0?Promise.all(e).then(()=>{s();try{return c()}finally{a?.deactivate(),dZ()}}):c()}function uZ(){var e=AQ,t=DQ,n=VY,r=cX;return function(i=!0){jQ(e),kQ(t),HY(n),i&&r?.activate()}}function dZ(){jQ(null),kQ(null),HY(null)}function fZ(e){var t=JJ|iY,n=DQ!==null&&(DQ.f&JJ)!==0?DQ:null;return AQ!==null&&(AQ.f|=fY),{ctx:VY,deps:null,effects:null,equals:IY,f:t,fn:e,reactions:null,rv:0,v:OJ,wv:0,parent:n??AQ,ac:null}}function pZ(e,t,n){let r=AQ;r===null&&wY();var i=r.b,a=void 0,o=SZ(OJ),s=!DQ,c=new Map;return sQ(()=>{var t,n=KJ();a=n.promise;try{Promise.resolve(e()).then(n.resolve,n.reject).then(()=>{r===cX&&r.committed&&r.deactivate(),dZ()})}catch(e){n.reject(e),dZ()}var r=cX;if(s){var l=i.is_rendered();i.update_pending_count(1),r.increment(l),(t=c.get(r))==null||t.reject(SY),c.delete(r),c.set(r,n)}let u=(e,t=void 0)=>{if(r.activate(),t)t!==SY&&(o.f|=vY,TZ(o,t));else{(o.f&vY)!==0&&(o.f^=vY),TZ(o,e);for(let[e,t]of c){if(c.delete(e),e===r)break;t.reject(SY)}}s&&(i.update_pending_count(-1),r.decrement(l))};n.promise.then(u,e=>u(null,e||`unknown`))}),QZ(()=>{for(let e of c.values())e.reject(SY)}),new Promise(e=>{function t(n){function r(){n===a?e(o):t(a)}n.then(r,r)}t(a)})}function W(e){let t=fZ(e);return NQ(t),t}function mZ(e){let t=fZ(e);return t.equals=RY,t}function hZ(e){var t=e.effects;if(t!==null){e.effects=null;for(var n=0;n<t.length;n+=1)hQ(t[n])}}function gZ(e){for(var t=e.parent;t!==null;){if((t.f&JJ)===0)return(t.f&sY)===0?t:null;t=t.parent}return null}function _Z(e){var t,n=AQ;jQ(gZ(e));try{e.f&=~hY,hZ(e),t=GQ(e)}finally{jQ(n)}return t}function vZ(e){var t=_Z(e);if(!e.equals(t)&&(e.wv=HQ(),(!(cX!=null&&cX.is_fork)||e.deps===null)&&(e.v=t,e.deps===null))){rX(e,rY);return}TQ||(uX===null?iX(e):(ZZ()||cX!=null&&cX.is_fork)&&uX.set(e,t))}var yZ=new Set,bZ=new Map,xZ=!1;function SZ(e,t){return{f:0,v:e,reactions:null,equals:IY,rv:0,wv:0}}function CZ(e,t){let n=SZ(e);return NQ(n),n}function wZ(e,t=!1,n=!0){var r;let i=SZ(e);return t||(i.equals=RY),zY&&n&&VY!==null&&VY.l!==null&&((r=VY.l).s??(r.s=[])).push(i),i}function G(e,t,n=!1){return DQ!==null&&(!OQ||(DQ.f&uY)!==0)&&qY()&&DQ.f&4325394&&!(MQ!=null&&MQ.includes(e))&&MY(),TZ(e,n?kZ(t):t)}function TZ(e,t){if(!e.equals(t)){var n=e.v;TQ?bZ.set(e,t):bZ.set(e,n),e.v=t;var r=OX.ensure();if(r.capture(e,n),(e.f&JJ)!==0){let t=e;(e.f&iY)!==0&&_Z(t),iX(t)}e.wv=HQ(),OZ(e,iY),qY()&&AQ!==null&&(AQ.f&rY)!==0&&(AQ.f&($J|eY))===0&&(IQ===null?LQ([e]):IQ.push(e)),!r.is_fork&&yZ.size>0&&!xZ&&EZ()}return t}function EZ(){xZ=!1;var e=CQ;wQ(!0);let t=Array.from(yZ);try{for(let e of t)(e.f&rY)!==0&&rX(e,aY),UQ(e)&&JQ(e)}finally{wQ(e)}yZ.clear()}function DZ(e){G(e,e.v+1)}function OZ(e,t){var n=e.reactions;if(n!==null)for(var r=qY(),i=n.length,a=0;a<i;a++){var o=n[a],s=o.f;
39if(!(!r&&o===AQ)){var c=(s&iY)===0;if(c&&rX(o,t),(s&JJ)!==0){var l=o;uX?.delete(l),(s&hY)===0&&(s&nY&&(o.f|=hY),OZ(l,aY))}else c&&((s&QJ)!==0&&MX!==null&&MX.add(o),IX(o))}}}function kZ(e){if(typeof e!=`object`||!e||yY in e)return e;let t=BJ(e);if(t!==RJ&&t!==zJ)return e;var n=new Map,r=MJ(e),i=CZ(0),a=BQ,o=e=>{if(BQ===a)return e();var t=DQ,n=BQ;kQ(null),VQ(a);var r=e();return kQ(t),VQ(n),r};return r&&n.set(`length`,CZ(e.length)),new Proxy(e,{defineProperty(e,t,r){(!(`value`in r)||r.configurable===!1||r.enumerable===!1||r.writable===!1)&&AY();var i=n.get(t);return i===void 0?i=o(()=>{var e=CZ(r.value);return n.set(t,e),e}):G(i,r.value,!0),!0},deleteProperty(e,t){var r=n.get(t);if(r===void 0){if(t in e){let e=o(()=>CZ(OJ));n.set(t,e),DZ(i)}}else G(r,OJ),DZ(i);return!0},get(t,r,i){var a;if(r===yY)return e;var s=n.get(r),c=r in t;if(s===void 0&&(!c||(a=IJ(t,r))!=null&&a.writable)&&(s=o(()=>CZ(kZ(c?t[r]:OJ))),n.set(r,s)),s!==void 0){var l=Y(s);return l===OJ?void 0:l}return Reflect.get(t,r,i)},getOwnPropertyDescriptor(e,t){var r=Reflect.getOwnPropertyDescriptor(e,t);if(r&&`value`in r){var i=n.get(t);i&&(r.value=Y(i))}else if(r===void 0){var a=n.get(t),o=a?.v;if(a!==void 0&&o!==OJ)return{enumerable:!0,configurable:!0,value:o,writable:!0}}return r},has(e,t){var r;if(t===yY)return!0;var i=n.get(t),a=i!==void 0&&i.v!==OJ||Reflect.has(e,t);return(i!==void 0||AQ!==null&&(!a||(r=IJ(e,t))!=null&&r.writable))&&(i===void 0&&(i=o(()=>CZ(a?kZ(e[t]):OJ)),n.set(t,i)),Y(i)===OJ)?!1:a},set(e,t,a,s){var c,l=n.get(t),u=t in e;if(r&&t===`length`)for(var d=a;d<l.v;d+=1){var f=n.get(d+``);f===void 0?d in e&&(f=o(()=>CZ(OJ)),n.set(d+``,f)):G(f,OJ)}if(l===void 0)(!u||(c=IJ(e,t))!=null&&c.writable)&&(l=o(()=>CZ(void 0)),G(l,kZ(a)),n.set(t,l));else{u=l.v!==OJ;var p=o(()=>kZ(a));G(l,p)}var m=Reflect.getOwnPropertyDescriptor(e,t);if(m!=null&&m.set&&m.set.call(s,a),!u){if(r&&typeof t==`string`){var h=n.get(`length`),g=Number(t);Number.isInteger(g)&&g>=h.v&&G(h,g+1)}DZ(i)}return!0},ownKeys(e){Y(i);var t=Reflect.ownKeys(e).filter(e=>{var t=n.get(e);return t===void 0||t.v!==OJ});for(var[r,a]of n)a.v!==OJ&&!(r in e)&&t.push(r);return t},setPrototypeOf(){jY()}})}function AZ(e){try{if(typeof e==`object`&&e&&yY in e)return e[yY]}catch{}return e}function jZ(e,t){return Object.is(AZ(e),AZ(t))}var MZ,NZ,PZ,FZ;function IZ(){if(MZ===void 0){MZ=window,NZ=/Firefox/.test(navigator.userAgent);var e=Element.prototype,t=Node.prototype,n=Text.prototype;PZ=IJ(t,`firstChild`).get,FZ=IJ(t,`nextSibling`).get,VJ(e)&&(e.__click=void 0,e.__className=void 0,e.__attributes=null,e.__style=void 0,e.__e=void 0),VJ(n)&&(n.__t=void 0)}}function LZ(e=``){return document.createTextNode(e)}function RZ(e){return PZ.call(e)}function zZ(e){return FZ.call(e)}function K(e,t){return RZ(e)}function BZ(e,t=!1){var n=RZ(e);return n instanceof Comment&&n.data===``?zZ(n):n}function q(e,t=1,n=!1){let r=e;for(;t--;)r=zZ(r);return r}function VZ(e){e.textContent=``}function HZ(){return!1}function UZ(e,t){if(t){let t=document.body;e.autofocus=!0,QY(()=>{document.activeElement===t&&e.focus()})}}var WZ=!1;function GZ(){WZ||(WZ=!0,document.addEventListener(`reset`,e=>{Promise.resolve().then(()=>{var t;if(!e.defaultPrevented)for(let n of e.target.elements)(t=n.__on_r)==null||t.call(n)})},{capture:!0}))}function KZ(e){var t=DQ,n=AQ;kQ(null),jQ(null);try{return e()}finally{kQ(t),jQ(n)}}function qZ(e,t,n,r=n){e.addEventListener(t,()=>KZ(n));let i=e.__on_r;i?e.__on_r=()=>{i(),r(!0)}:e.__on_r=()=>r(!0),GZ()}function JZ(e){AQ===null&&(DQ===null&&DY(),EY()),TQ&&TY()}function YZ(e,t){var n=t.last;n===null?t.last=t.first=e:(n.next=e,e.prev=n,t.last=e)}function XZ(e,t,n){var r=AQ;r!==null&&(r.f&oY)!==0&&(e|=oY);var i={ctx:VY,deps:null,nodes:null,f:e|2560,first:null,fn:t,last:null,next:null,parent:r,b:r&&r.b,prev:null,teardown:null,wv:0,ac:null};if(n)try{JQ(i),i.f|=cY}catch(e){throw hQ(i),e}else t!==null&&IX(i);var a=i;if(n&&a.deps===null&&a.teardown===null&&a.nodes===null&&a.first===a.last&&(a.f&fY)===0&&(a=a.first,(e&QJ)!==0&&(e&lY)!==0&&a!==null&&(a.f|=lY)),a!==null&&(a.parent=r,r!==null&&YZ(a,r),DQ!==null&&(DQ.f&JJ)!==0&&(e&eY)===0)){var o=DQ;(o.effects??=[]).push(a)}return i}function ZZ(){return DQ!==null&&!OQ}function QZ(e){let t=XZ(XJ,null,!1);return rX(t,rY),t.teardown=e,t}function $Z(e){JZ();var t=AQ.f;if(!DQ&&(t&$J)!==0&&(t&cY)===0){var n=VY;(n.e??=[]).push(e)}else return eQ(e)}function eQ(e){return XZ(YJ|pY,e,!1)}function tQ(e){return JZ(),XZ(XJ|pY,e,!0)}function nQ(e){OX.ensure();let t=XZ(eY|fY,e,!0);return()=>{hQ(t)}}function rQ(e){OX.ensure();let t=XZ(eY|fY,e,!0);return(e={})=>new Promise(n=>{e.outro?vQ(t,()=>{hQ(t),n(void 0)}):(hQ(t),n(void 0))})}function iQ(e){return XZ(YJ,e,!1)}function aQ(e,t){var n=VY,r={effect:null,ran:!1,deps:e};n.l.$.push(r),r.effect=cQ(()=>{e(),!r.ran&&(r.ran=!0,QQ(t))})}function oQ(){var e=VY;cQ(()=>{for(var t of e.l.$){t.deps();var n=t.effect;(n.f&rY)!==0&&n.deps!==null&&rX(n,aY),UQ(n)&&JQ(n),t.ran=!1}})}function sQ(e){return XZ(_Y|fY,e,!0)}function cQ(e,t=0){return XZ(XJ|t,e,!0)}function J(e,t=[],n=[],r=[]){lZ(r,t,n,t=>{XZ(XJ,()=>e(...t.map(Y)),!0)})}function lQ(e,t=0){return XZ(QJ|t,e,!0)}function uQ(e,t=0){return XZ(ZJ|t,e,!0)}function dQ(e){return XZ($J|fY,e,!0)}function fQ(e){var t=e.teardown;
39if(t!==null){let e=TQ,n=DQ;EQ(!0),kQ(null);try{t.call(null)}finally{EQ(e),kQ(n)}}}function pQ(e,t=!1){var n=e.first;for(e.first=e.last=null;n!==null;){let e=n.ac;e!==null&&KZ(()=>{e.abort(SY)});var r=n.next;(n.f&eY)===0?hQ(n,t):n.parent=null,n=r}}function mQ(e){for(var t=e.first;t!==null;){var n=t.next;(t.f&$J)===0&&hQ(t),t=n}}function hQ(e,t=!0){var n=!1;(t||(e.f&dY)!==0)&&e.nodes!==null&&e.nodes.end!==null&&(gQ(e.nodes.start,e.nodes.end),n=!0),pQ(e,t&&!n),qQ(e,0),rX(e,sY);var r=e.nodes&&e.nodes.t;if(r!==null)for(let e of r)e.stop();fQ(e);var i=e.parent;i!==null&&i.first!==null&&_Q(e),e.next=e.prev=e.teardown=e.ctx=e.deps=e.fn=e.nodes=e.ac=null}function gQ(e,t){for(;e!==null;){var n=e===t?null:zZ(e);e.remove(),e=n}}function _Q(e){var t=e.parent,n=e.prev,r=e.next;n!==null&&(n.next=r),r!==null&&(r.prev=n),t!==null&&(t.first===e&&(t.first=r),t.last===e&&(t.last=n))}function vQ(e,t,n=!0){var r=[];yQ(e,r,!0);var i=()=>{n&&hQ(e),t&&t()},a=r.length;if(a>0){var o=()=>--a||i();for(var s of r)s.out(o)}else i()}function yQ(e,t,n){if((e.f&oY)===0){e.f^=oY;var r=e.nodes&&e.nodes.t;if(r!==null)for(let e of r)(e.is_global||n)&&t.push(e);for(var i=e.first;i!==null;){var a=i.next,o=(i.f&lY)!==0||(i.f&$J)!==0&&(e.f&QJ)!==0;yQ(i,t,o?n:!1),i=a}}}function bQ(e){xQ(e,!0)}function xQ(e,t){if((e.f&oY)!==0){e.f^=oY,(e.f&rY)===0&&(rX(e,iY),IX(e));for(var n=e.first;n!==null;){var r=n.next,i=(n.f&lY)!==0||(n.f&$J)!==0;xQ(n,i?t:!1),n=r}var a=e.nodes&&e.nodes.t;if(a!==null)for(let e of a)(e.is_global||t)&&e.in()}}function SQ(e,t){if(e.nodes)for(var n=e.nodes.start,r=e.nodes.end;n!==null;){var i=n===r?null:zZ(n);t.append(n),n=i}}var CQ=!1;function wQ(e){CQ=e}var TQ=!1;function EQ(e){TQ=e}var DQ=null,OQ=!1;function kQ(e){DQ=e}var AQ=null;function jQ(e){AQ=e}var MQ=null;function NQ(e){DQ!==null&&(MQ===null?MQ=[e]:MQ.push(e))}var PQ=null,FQ=0,IQ=null;function LQ(e){IQ=e}var RQ=1,zQ=0,BQ=zQ;function VQ(e){BQ=e}function HQ(){return++RQ}function UQ(e){var t=e.f;if((t&iY)!==0)return!0;if(t&JJ&&(e.f&=-32769),(t&aY)!==0){for(var n=e.deps,r=n.length,i=0;i<r;i++){var a=n[i];if(UQ(a)&&vZ(a),a.wv>e.wv)return!0}(t&nY)!==0&&uX===null&&rX(e,rY)}return!1}function WQ(e,t,n=!0){var r=e.reactions;if(r!==null&&!(MQ!=null&&MQ.includes(e)))for(var i=0;i<r.length;i++){var a=r[i];(a.f&JJ)===0?t===a&&(n?rX(a,iY):(a.f&rY)!==0&&rX(a,aY),IX(a)):WQ(a,t,!1)}}function GQ(e){var t,n=PQ,r=FQ,i=IQ,a=DQ,o=MQ,s=VY,c=OQ,l=BQ,u=e.f;PQ=null,FQ=0,IQ=null,DQ=(u&($J|eY))===0?e:null,MQ=null,HY(e.ctx),OQ=!1,BQ=++zQ,e.ac!==null&&(KZ(()=>{e.ac.abort(SY)}),e.ac=null);try{e.f|=gY;var d=e.fn,f=d(),p=e.deps;if(PQ!==null){var m;if(qQ(e,FQ),p!==null&&FQ>0)for(p.length=FQ+PQ.length,m=0;m<PQ.length;m++)p[FQ+m]=PQ[m];else e.deps=p=PQ;if(ZZ()&&(e.f&nY)!==0)for(m=FQ;m<p.length;m++)((t=p[m]).reactions??(t.reactions=[])).push(e)}else p!==null&&FQ<p.length&&(qQ(e,FQ),p.length=FQ);if(qY()&&IQ!==null&&!OQ&&p!==null&&!(e.f&(aY|2050)))for(m=0;m<IQ.length;m++)WQ(IQ[m],e);return a!==null&&a!==e&&(zQ++,IQ!==null&&(i===null?i=IQ:i.push(...IQ))),(e.f&vY)!==0&&(e.f^=vY),f}catch(e){return eX(e)}finally{e.f^=gY,PQ=n,FQ=r,IQ=i,DQ=a,MQ=o,HY(s),OQ=c,BQ=l}}function KQ(e,t){let n=t.reactions;if(n!==null){var r=NJ.call(n,e);if(r!==-1){var i=n.length-1;i===0?n=t.reactions=null:(n[r]=n[i],n.pop())}}if(n===null&&(t.f&JJ)!==0&&(PQ===null||!PQ.includes(t))){var a=t;(a.f&nY)!==0&&(a.f^=nY,a.f&=-32769),iX(a),hZ(a),qQ(a,0)}}function qQ(e,t){var n=e.deps;if(n!==null)for(var r=t;r<n.length;r++)KQ(e,n[r])}function JQ(e){var t=e.f;if((t&sY)===0){rX(e,rY);var n=AQ,r=CQ;AQ=e,CQ=!0;try{(t&(QJ|ZJ))===0?pQ(e):mQ(e),fQ(e);var i=GQ(e);e.teardown=typeof i==`function`?i:null,e.wv=RQ}finally{CQ=r,AQ=n}}}async function YQ(){await Promise.resolve(),kX()}function Y(e){var t=(e.f&JJ)!==0;if(DQ!==null&&!OQ&&!(AQ!==null&&(AQ.f&sY)!==0)&&!(MQ!=null&&MQ.includes(e))){var n=DQ.deps;if((DQ.f&gY)!==0)e.rv<zQ&&(e.rv=zQ,PQ===null&&n!==null&&n[FQ]===e?FQ++:PQ===null?PQ=[e]:PQ.includes(e)||PQ.push(e));else{(DQ.deps??=[]).push(e);var r=e.reactions;r===null?e.reactions=[DQ]:r.includes(DQ)||r.push(DQ)}}if(TQ&&bZ.has(e))return bZ.get(e);if(t){var i=e;if(TQ){var a=i.v;return((i.f&rY)===0&&i.reactions!==null||ZQ(i))&&(a=_Z(i)),bZ.set(i,a),a}var o=(i.f&nY)===0&&!OQ&&DQ!==null&&(CQ||(DQ.f&nY)!==0),s=i.deps===null;UQ(i)&&(o&&(i.f|=nY),vZ(i)),o&&!s&&XQ(i)}if(uX!=null&&uX.has(e))return uX.get(e);if((e.f&vY)!==0)throw e.v;return e.v}function XQ(e){if(e.deps!==null){e.f|=nY;for(let t of e.deps)(t.reactions??=[]).push(e),(t.f&JJ)!==0&&(t.f&nY)===0&&XQ(t)}}function ZQ(e){if(e.v===OJ)return!0;
39if(e.deps===null)return!1;for(let t of e.deps)if(bZ.has(t)||(t.f&JJ)!==0&&ZQ(t))return!0;return!1}function QQ(e){var t=OQ;try{return OQ=!0,e()}finally{OQ=t}}function $Q(e,t){var n={};for(var r in e)t.includes(r)||(n[r]=e[r]);for(var i of Object.getOwnPropertySymbols(e))Object.propertyIsEnumerable.call(e,i)&&!t.includes(i)&&(n[i]=e[i]);return n}function e$(e){if(!(typeof e!=`object`||!e||e instanceof EventTarget)){if(yY in e)t$(e);else if(!Array.isArray(e))for(let t in e){let n=e[t];typeof n==`object`&&n&&yY in n&&t$(n)}}}function t$(e,t=new Set){if(typeof e==`object`&&e&&!(e instanceof EventTarget)&&!t.has(e)){t.add(e),e instanceof Date&&e.getTime();for(let n in e)try{t$(e[n],t)}catch{}let n=BJ(e);if(n!==Object.prototype&&n!==Array.prototype&&n!==Map.prototype&&n!==Set.prototype&&n!==Date.prototype){let t=LJ(n);for(let n in t){let r=t[n].get;if(r)try{r.call(e)}catch{}}}}}var n$=new Set,r$=new Set;function i$(e,t,n,r={}){function i(e){if(r.capture||l$.call(t,e),!e.cancelBubble)return KZ(()=>n?.call(this,e))}return e.startsWith(`pointer`)||e.startsWith(`touch`)||e===`wheel`?QY(()=>{t.addEventListener(e,i,r)}):t.addEventListener(e,i,r),i}function a$(e,t,n,r={}){var i=i$(t,e,n,r);return()=>{e.removeEventListener(t,i,r)}}function o$(e,t,n,r,i){var a={capture:r,passive:i},o=i$(e,t,n,a);(t===document.body||t===window||t===document||t instanceof HTMLMediaElement)&&QZ(()=>{t.removeEventListener(e,o,a)})}function s$(e){for(var t=0;t<e.length;t++)n$.add(e[t]);for(var n of r$)n(e)}var c$=null;function l$(e){var t=this,n=t.ownerDocument,r=e.type,i=e.composedPath?.call(e)||[],a=i[0]||e.target;c$=e;var o=0,s=c$===e&&e.__root;if(s){var c=i.indexOf(s);if(c!==-1&&(t===document||t===window)){e.__root=t;return}var l=i.indexOf(t);if(l===-1)return;c<=l&&(o=c)}if(a=i[o]||e.target,a!==t){FJ(e,`currentTarget`,{configurable:!0,get(){return a||n}});var u=DQ,d=AQ;kQ(null),jQ(null);try{for(var f,p=[];a!==null;){var m=a.assignedSlot||a.parentNode||a.host||null;try{var h=a[`__`+r];h!=null&&(!a.disabled||e.target===a)&&h.call(a,e)}catch(e){f?p.push(e):f=e}if(e.cancelBubble||m===t||m===null)break;a=m}if(f){for(let e of p)queueMicrotask(()=>{throw e});throw f}}finally{e.__root=t,delete e.currentTarget,kQ(u),jQ(d)}}}function u$(e){var t=document.createElement(`template`);return t.innerHTML=e.replaceAll(`<!>`,`<!---->`),t.content}function d$(e,t){var n=AQ;n.nodes===null&&(n.nodes={start:e,end:t,a:null,t:null})}function X(e,t){var n=(t&EJ)!==0,r=(t&DJ)!==0,i,a=!e.startsWith(`<!>`);return()=>{i===void 0&&(i=u$(a?e:`<!>`+e),n||(i=RZ(i)));var t=r||NZ?document.importNode(i,!0):i.cloneNode(!0);if(n){var o=RZ(t),s=t.lastChild;d$(o,s)}else d$(t,t);return t}}function Que(e,t,n=`svg`){var r=!e.startsWith(`<!>`),i=(t&EJ)!==0,a=`<${n}>${r?e:`<!>`+e}</${n}>`,o;return()=>{if(!o){var e=RZ(u$(a));if(i)for(o=document.createDocumentFragment();RZ(e);)o.appendChild(RZ(e));else o=RZ(e)}var t=o.cloneNode(!0);if(i){var n=RZ(t),r=t.lastChild;d$(n,r)}else d$(t,t);return t}}function f$(e,t){return Que(e,t,`svg`)}function p$(e=``){var t=LZ(e+``);return d$(t,t),t}function m$(){var e=document.createDocumentFragment(),t=document.createComment(``),n=LZ();return e.append(t,n),d$(t,n),e}function Z(e,t){e!==null&&e.before(t)}function $ue(e){return e.endsWith(`capture`)&&e!==`gotpointercapture`&&e!==`lostpointercapture`}var ede=[`beforeinput`,`click`,`change`,`dblclick`,`contextmenu`,`focusin`,`focusout`,`input`,`keydown`,`keyup`,`mousedown`,`mousemove`,`mouseout`,`mouseover`,`mouseup`,`pointerdown`,`pointermove`,`pointerout`,`pointerover`,`pointerup`,`touchend`,`touchmove`,`touchstart`];function tde(e){return ede.includes(e)}var nde={formnovalidate:`formNoValidate`,ismap:`isMap`,nomodule:`noModule`,playsinline:`playsInline`,readonly:`readOnly`,defaultvalue:`defaultValue`,defaultchecked:`defaultChecked`,srcobject:`srcObject`,novalidate:`noValidate`,allowfullscreen:`allowFullscreen`,disablepictureinpicture:`disablePictureInPicture`,disableremoteplayback:`disableRemotePlayback`};function rde(e){return e=e.toLowerCase(),nde[e]??e}var ide=[`touchstart`,`touchmove`];function ade(e){return ide.includes(e)}var h$=!0;function g$(e){h$=e}function _$(e,t){var n=t==null?``:typeof t==`object`?t+``:t;n!==(e.__t??=e.nodeValue)&&(e.__t=n,e.nodeValue=n+``)}function v$(e,t){return ode(e,t)}
39var y$=new Map;function ode(e,{target:t,anchor:n,props:r={},events:i,context:a,intro:o=!0}){IZ();var s=new Set,c=e=>{for(var n=0;n<e.length;n++){var r=e[n];if(!s.has(r)){s.add(r);var i=ade(r);t.addEventListener(r,l$,{passive:i});var a=y$.get(r);a===void 0?(document.addEventListener(r,l$,{passive:i}),y$.set(r,1)):y$.set(r,a+1)}}};c(PJ(n$)),r$.add(c);var l=void 0,u=rQ(()=>{var u=n??t.appendChild(LZ());return zX(u,{pending:()=>{}},t=>{if(a){GY({});var n=VY;n.c=a}i&&(r.$$events=i),h$=o,l=e(t,r)||{},h$=!0,a&&KY()}),()=>{var e;for(var r of s){t.removeEventListener(r,l$);var i=y$.get(r);--i===0?(document.removeEventListener(r,l$),y$.delete(r)):y$.set(r,i)}r$.delete(c),u!==n&&((e=u.parentNode)==null||e.removeChild(u))}});return b$.set(l,u),l}var b$=new WeakMap;function x$(e,t){let n=b$.get(e);return n?(b$.delete(e),n(t)):Promise.resolve()}var S$,C$,w$,T$,E$,D$,O$,k$=class{constructor(e,t=!0){aJ(this,`anchor`),cJ(this,S$,new Map),cJ(this,C$,new Map),cJ(this,w$,new Map),cJ(this,T$,new Set),cJ(this,E$,!0),cJ(this,D$,()=>{var e=cX;if(U(this,S$).has(e)){var t=U(this,S$).get(e),n=U(this,C$).get(t);if(n)bQ(n),U(this,T$).delete(t);else{var r=U(this,w$).get(t);r&&(U(this,C$).set(t,r.effect),U(this,w$).delete(t),r.fragment.lastChild.remove(),this.anchor.before(r.fragment),n=r.effect)}for(let[t,n]of U(this,S$)){if(U(this,S$).delete(t),t===e)break;let r=U(this,w$).get(n);r&&(hQ(r.effect),U(this,w$).delete(n))}for(let[e,r]of U(this,C$)){if(e===t||U(this,T$).has(e))continue;let i=()=>{if(Array.from(U(this,S$).values()).includes(e)){var t=document.createDocumentFragment();SQ(r,t),t.append(LZ()),U(this,w$).set(e,{effect:r,fragment:t})}else hQ(r);U(this,T$).delete(e),U(this,C$).delete(e)};U(this,E$)||!n?(U(this,T$).add(e),vQ(r,i,!1)):i()}}}),cJ(this,O$,e=>{U(this,S$).delete(e);let t=Array.from(U(this,S$).values());for(let[e,n]of U(this,w$))t.includes(e)||(hQ(n.effect),U(this,w$).delete(e))}),this.anchor=e,lJ(this,E$,t)}ensure(e,t){var n=cX,r=HZ();if(t&&!U(this,C$).has(e)&&!U(this,w$).has(e))if(r){var i=document.createDocumentFragment(),a=LZ();i.append(a),U(this,w$).set(e,{effect:dQ(()=>t(a)),fragment:i})}else U(this,C$).set(e,dQ(()=>t(this.anchor)));if(U(this,S$).set(n,e),r){for(let[t,r]of U(this,C$))t===e?n.skipped_effects.delete(r):n.skipped_effects.add(r);for(let[t,r]of U(this,w$))t===e?n.skipped_effects.delete(r.effect):n.skipped_effects.add(r.effect);n.oncommit(U(this,D$)),n.ondiscard(U(this,O$))}else U(this,D$).call(this)}};S$=new WeakMap,C$=new WeakMap,w$=new WeakMap,T$=new WeakMap,E$=new WeakMap,D$=new WeakMap,O$=new WeakMap;function A$(e,t,...n){var r=new k$(e);lQ(()=>{let e=t()??null;r.ensure(e,e&&(t=>e(t,...n)))},lY)}function j$(e){VY===null&&CY(),zY&&VY.l!==null?sde(VY).m.push(e):$Z(()=>{let t=QQ(e);if(typeof t==`function`)return t})}function M$(e){VY===null&&CY(),j$(()=>()=>QQ(e))}function sde(e){var t=e.l;return t.u??={a:[],b:[],m:[]}}function Q(e,t,n=!1){var r=new k$(e),i=n?lY:0;function a(e,t){r.ensure(e,t)}lQ(()=>{var e=!1;t((t,n=!0)=>{e=!0,a(n,t)}),e||a(!1,null)},i)}function N$(e,t,n){var r=new k$(e),i=!qY();lQ(()=>{var e=t();i&&typeof e==`object`&&e&&(e={}),r.ensure(e,n)})}function P$(e,t){return t}function cde(e,t,n){for(var r=[],i=t.length,a,o=t.length,s=0;s<i;s++){let n=t[s];vQ(n,()=>{if(a){if(a.pending.delete(n),a.done.add(n),a.pending.size===0){var t=e.outrogroups;F$(PJ(a.done)),t.delete(a),t.size===0&&(e.outrogroups=null)}}else --o},!1)}if(o===0){var c=r.length===0&&n!==null;if(c){var l=n,u=l.parentNode;VZ(u),u.append(l),e.items.clear()}F$(t,!c)}else a={pending:new Set(t),done:new Set},(e.outrogroups??=new Set).add(a)}function F$(e,t=!0){for(var n=0;n<e.length;n++)hQ(e[n],t)}var I$;function L$(e,t,n,r,i,a=null){var o=e,s=new Map;(t&hJ)!==0&&(o=e.appendChild(LZ()));var c=null,l=mZ(()=>{var e=n();return MJ(e)?e:e==null?[]:PJ(e)}),u,d=!0;function f(){p.fallback=c,lde(p,u,o,t,r),c!==null&&(u.length===0?(c.f&mY)===0?bQ(c):(c.f^=mY,R$(c,null,o)):vQ(c,()=>{c=null}))}var p={effect:lQ(()=>{u=Y(l);for(var e=u.length,p=new Set,m=cX,h=HZ(),g=0;g<e;g+=1){var _=u[g],v=r(_,g),y=d?null:s.get(v);y?(y.v&&TZ(y.v,_),y.i&&TZ(y.i,g),h&&m.skipped_effects.delete(y.e)):(y=ude(s,d?o:I$??=LZ(),_,v,g,i,t,n),d||(y.e.f|=mY),s.set(v,y)),p.add(v)}if(e===0&&a&&!c&&(d?c=dQ(()=>a(o)):(c=dQ(()=>a(I$??=LZ())),c.f|=mY)),!d)if(h){for(let[e,t]of s)p.has(e)||m.skipped_effects.add(t.e);m.oncommit(f),m.ondiscard(()=>{})}else f();Y(l)}),items:s,outrogroups:null,fallback:c};d=!1}function lde(e,t,n,r,i){var a,o,s,c,l,u=(r&gJ)!==0,d=t.length,f=e.items,p=e.effect.first,m,h=null,g,_=[],v=[],y,b,x,S;if(u)for(S=0;S<d;S+=1)y=t[S],b=i(y,S),x=f.get(b).e,(x.f&mY)===0&&((a=x.nodes?.a)==null||a.measure(),(g??=new Set).add(x));for(S=0;S<d;S+=1){if(y=t[S],b=i(y,S),x=f.get(b).e,e.outrogroups!==null)for(let t of e.outrogroups)t.pending.delete(x),t.done.delete(x);if((x.f&mY)!==0)if(x.f^=mY,x===p)R$(x,null,n);else{var C=h?h.next:p;x===e.effect.last&&(e.effect.last=x.prev),x.prev&&(x.prev.next=x.next),x.next&&(x.next.prev=x.prev),z$(e,h,x),z$(e,x,C),R$(x,C,n),h=x,_=[],v=[],p=h.next;continue}if((x.f&oY)!==0&&(bQ(x),u&&((o=x.nodes?.a)==null||o.unfix(),(g??=new Set).delete(x))),x!==p){if(m!==void 0&&m.has(x)){if(_.length<v.length){var w=v[0],T;h=w.prev;var E=_[0],D=_[_.length-1];for(T=0;T<_.length;T+=1)R$(_[T],w,n);for(T=0;T<v.length;T+=1)m.delete(v[T]);z$(e,E.prev,D.next),z$(e,h,E),z$(e,D,w),p=w,h=D,--S,_=[],v=[]}else m.delete(x),R$(x,p,n),z$(e,x.prev,x.next),z$(e,x,h===null?e.effect.first:h.next),z$(e,h,x),h=x;continue}for(_=[],v=[];p!==null&&p!==x;)(m??=new Set).add(p),v.push(p),p=p.next;if(p===null)continue}(x.f&mY)===0&&_.push(x),h=x,p=x.next}if(e.outrogroups!==null){for(let t of e.outrogroups)t.pending.size===0&&(F$
39(PJ(t.done)),(s=e.outrogroups)==null||s.delete(t));e.outrogroups.size===0&&(e.outrogroups=null)}if(p!==null||m!==void 0){var O=[];if(m!==void 0)for(x of m)(x.f&oY)===0&&O.push(x);for(;p!==null;)(p.f&oY)===0&&p!==e.fallback&&O.push(p),p=p.next;var k=O.length;if(k>0){var A=(r&hJ)!==0&&d===0?n:null;if(u){for(S=0;S<k;S+=1)(c=O[S].nodes?.a)==null||c.measure();for(S=0;S<k;S+=1)(l=O[S].nodes?.a)==null||l.fix()}cde(e,O,A)}}u&&QY(()=>{var e;if(g!==void 0)for(x of g)(e=x.nodes?.a)==null||e.apply()})}function ude(e,t,n,r,i,a,o,s){var c=(o&pJ)===0?null:(o&_J)===0?wZ(n,!1,!1):SZ(n),l=(o&mJ)===0?null:SZ(i);return{v:c,i:l,e:dQ(()=>(a(t,c??n,l??i,s),()=>{e.delete(r)}))}}function R$(e,t,n){if(e.nodes)for(var r=e.nodes.start,i=e.nodes.end,a=t&&(t.f&mY)===0?t.nodes.start:n;r!==null;){var o=zZ(r);if(a.before(r),r===i)return;r=o}}function z$(e,t,n){t===null?e.effect.first=n:t.next=n,n===null?e.effect.last=t:n.prev=t}function B$(e,t,n=!1,r=!1,i=!1){var a=e,o=``;J(()=>{var e=AQ;if(o!==(o=t()??``)&&(e.nodes!==null&&(gQ(e.nodes.start,e.nodes.end),e.nodes=null),o!==``)){var i=o+``;n?i=`<svg>${i}</svg>`:r&&(i=`<math>${i}</math>`);var s=u$(i);if((n||r)&&(s=RZ(s)),d$(RZ(s),s.lastChild),n||r)for(;RZ(s);)a.before(RZ(s));else a.before(s)}})}function dde(e,t,n){var r=new k$(e);lQ(()=>{var e=t()??null;r.ensure(e,e&&(t=>n(t,e)))},lY)}var fde=()=>performance.now(),V$={tick:(e=>requestAnimationFrame(e)),now:()=>fde(),tasks:new Set};function H$(){let e=V$.now();V$.tasks.forEach(t=>{t.c(e)||(V$.tasks.delete(t),t.f())}),V$.tasks.size!==0&&V$.tick(H$)}function pde(e){let t;return V$.tasks.size===0&&V$.tick(H$),{promise:new Promise(n=>{V$.tasks.add(t={c:e,f:n})}),abort(){V$.tasks.delete(t)}}}function U$(e,t){KZ(()=>{e.dispatchEvent(new CustomEvent(t))})}function mde(e){if(e===`float`)return`cssFloat`;if(e===`offset`)return`cssOffset`;if(e.startsWith(`--`))return e;let t=e.split(`-`);return t.length===1?t[0]:t[0]+t.slice(1).map(e=>e[0].toUpperCase()+e.slice(1)).join(``)}function W$(e){let t={},n=e.split(`;`);for(let e of n){let[n,r]=e.split(`:`);if(!n||r===void 0)break;let i=mde(n.trim());t[i]=r.trim()}return t}var hde=e=>e;function G$(e,t,n,r){var i,a=(e&CJ)!==0,o=(e&wJ)!==0,s=a&&o,c=(e&TJ)!==0,l=s?`both`:a?`in`:`out`,u,d=t.inert,f=t.style.overflow,p,m;function h(){return KZ(()=>u??=n()(t,r?.()??{},{direction:l}))}var g={is_global:c,in(){var e;if(t.inert=d,!a){m?.abort(),(e=m?.reset)==null||e.call(m);return}o||p==null||p.abort(),U$(t,`introstart`),p=K$(t,h(),m,1,()=>{U$(t,`introend`),p?.abort(),p=u=void 0,t.style.overflow=f})},out(e){if(!o){e?.(),u=void 0;return}t.inert=!0,U$(t,`outrostart`),m=K$(t,h(),p,0,()=>{U$(t,`outroend`),e?.()})},stop:()=>{p?.abort(),m?.abort()}},_=AQ;if(((i=_.nodes).t??(i.t=[])).push(g),a&&h$){var v=c;if(!v){for(var y=_.parent;y&&(y.f&lY)!==0;)for(;(y=y.parent)&&(y.f&QJ)===0;);v=!y||(y.f&cY)!==0}v&&iQ(()=>{QQ(()=>g.in())})}}function K$(e,t,n,r,i){var a=r===1;if(HJ(t)){var o,s=!1;return QY(()=>{s||(o=K$(e,t({direction:a?`in`:`out`}),n,r,i))}),{abort:()=>{s=!0,o?.abort()},deactivate:()=>o.deactivate(),reset:()=>o.reset(),t:()=>o.t()}}if(n?.deactivate(),!(t!=null&&t.duration))return i(),{abort:UJ,deactivate:UJ,reset:UJ,t:()=>r};let{delay:c=0,css:l,tick:u,easing:d=hde}=t;var f=[];if(a&&n===void 0&&(u&&u(0,1),l)){var p=W$(l(0,1));f.push(p,p)}var m=()=>1-r,h=e.animate(f,{duration:c,fill:`forwards`});return h.onfinish=()=>{h.cancel();var a=n?.t()??1-r;n?.abort();var o=r-a,s=t.duration*Math.abs(o),c=[];if(s>0){var f=!1;if(l)for(var p=Math.ceil(s/16.666666666666668),g=0;g<=p;g+=1){var _=a+o*d(g/p),v=W$(l(_,1-_));c.push(v),f||=v.overflow===`hidden`}f&&(e.style.overflow=`hidden`),m=()=>{var e=h.currentTime;return a+o*d(e/s)},u&&pde(()=>{if(h.playState!==`running`)return!1;var e=m();return u(e,1-e),!0})}h=e.animate(c,{duration:s,fill:`forwards`}),h.onfinish=()=>{m=()=>r,u?.(r,1-r),i()}},{abort:()=>{h&&(h.cancel(),h.effect=null,h.onfinish=UJ)},deactivate:()=>{i=UJ},reset:()=>{r===0&&u?.(1,0)},t:()=>m()}}function q$(e,t,n,r,i,a){var o=null,s=new k$(e,!1);lQ(()=>{let e=t()||null;var n=e===`svg`?AJ:null;if(e===null){s.ensure(null,null),g$(!0);return}return s.ensure(e,t=>{if(e){if(o=n?document.createElementNS(n,e):document.createElement(e),d$(o,o),r){var i=o.appendChild(LZ());r(o,i)}AQ.nodes.end=o,t.before(o)}}),g$(!0),()=>{e&&g$(!1)}},lY),QZ(()=>{g$(!0)})}function J$(e,t){iQ(()=>{var n=e.getRootNode(),r=n.host?n:n.head??n.ownerDocument.head;if(!r.querySelector(`#`+t.hash)){let e=document.createElement(`style`);e.id=t.hash,e.textContent=t.code,r.appendChild(e)}})}function gde(e,t,n){iQ(()=>{var r=QQ(()=>t(e,n?.())||{});if(n&&r!=null&&r.update){var i=!1,a={};cQ(()=>{var e=n();e$(e),i&&LY(a,e)&&(a=e,r.update(e))}),i=!0}if(r!=null&&r.destroy)return()=>r.destroy()})}function _de(e,t){var n=void 0,r;uQ(()=>
39{n!==(n=t())&&(r&&=(hQ(r),null),n&&(r=dQ(()=>{iQ(()=>n(e))})))})}function Y$(e){var t,n,r=``;if(typeof e==`string`||typeof e==`number`)r+=e;else if(typeof e==`object`)if(Array.isArray(e)){var i=e.length;for(t=0;t<i;t++)e[t]&&(n=Y$(e[t]))&&(r&&(r+=` `),r+=n)}else for(n in e)e[n]&&(r&&(r+=` `),r+=n);return r}function vde(){for(var e,t,n=0,r=``,i=arguments.length;n<i;n++)(e=arguments[n])&&(t=Y$(e))&&(r&&(r+=` `),r+=t);return r}function X$(e){return typeof e==`object`?vde(e):e??``}var Z$=[...` 40\r\f\xA0\v`];function yde(e,t,n){var r=e==null?``:``+e;if(t&&(r=r?r+` `+t:t),n){for(var i in n)if(n[i])r=r?r+` `+i:i;else if(r.length)for(var a=i.length,o=0;(o=r.indexOf(i,o))>=0;){var s=o+a;(o===0||Z$.includes(r[o-1]))&&(s===r.length||Z$.includes(r[s]))?r=(o===0?``:r.substring(0,o))+r.substring(s+1):o=s}}return r===``?null:r}function Q$(e,t=!1){var n=t?` !important;`:`;`,r=``;for(var i in e){var a=e[i];a!=null&&a!==``&&(r+=` `+i+`: `+a+n)}return r}function $$(e){return e[0]!==`-`||e[1]!==`-`?e.toLowerCase():e}function bde(e,t){if(t){var n=``,r,i;if(Array.isArray(t)?(r=t[0],i=t[1]):r=t,e){e=String(e).replaceAll(/\s*\/\*.*?\*\/\s*/g,``).trim();var a=!1,o=0,s=!1,c=[];r&&c.push(...Object.keys(r).map($$)),i&&c.push(...Object.keys(i).map($$));var l=0,u=-1;let t=e.length;for(var d=0;d<t;d++){var f=e[d];if(s?f===`/`&&e[d-1]===`*`&&(s=!1):a?a===f&&(a=!1):f===`/`&&e[d+1]===`*`?s=!0:f===`"`||f===`'`?a=f:f===`(`?o++:f===`)`&&o--,!s&&a===!1&&o===0){if(f===`:`&&u===-1)u=d;else if(f===`;`||d===t-1){if(u!==-1){var p=$$(e.substring(l,u).trim());if(!c.includes(p)){f!==`;`&&d++;var m=e.substring(l,d).trim();n+=` `+m+`;`}}l=d+1,u=-1}}}}return r&&(n+=Q$(r)),i&&(n+=Q$(i,!0)),n=n.trim(),n===``?null:n}return e==null?null:String(e)}function e1(e,t,n,r,i,a){var o=e.__className;if(o!==n||o===void 0){var s=yde(n,r,a);s==null?e.removeAttribute(`class`):t?e.className=s:e.setAttribute(`class`,s),e.__className=n}else if(a&&i!==a)for(var c in a){var l=!!a[c];(i==null||l!==!!i[c])&&e.classList.toggle(c,l)}return a}function t1(e,t={},n,r){for(var i in n){var a=n[i];t[i]!==a&&(n[i]==null?e.style.removeProperty(i):e.style.setProperty(i,a,r))}}function n1(e,t,n,r){if(e.__style!==t){var i=bde(t,r);i==null?e.removeAttribute(`style`):e.style.cssText=i,e.__style=t}else r&&(Array.isArray(r)?(t1(e,n?.[0],r[0]),t1(e,n?.[1],r[1],`important`)):t1(e,n,r));return r}function r1(e,t,n=!1){if(e.multiple){if(t==null)return;if(!MJ(t))return PY();for(var r of e.options)r.selected=t.includes(i1(r));return}for(r of e.options)if(jZ(i1(r),t)){r.selected=!0;return}(!n||t!==void 0)&&(e.selectedIndex=-1)}function xde(e){var t=new MutationObserver(()=>{r1(e,e.__value)});t.observe(e,{childList:!0,subtree:!0,attributes:!0,attributeFilter:[`value`]}),QZ(()=>{t.disconnect()})}function i1(e){return`__value`in e?e.__value:e.value}var a1=Symbol(`class`),o1=Symbol(`style`),s1=Symbol(`is custom element`),c1=Symbol(`is html`);function Sde(e,t){var n=d1(e);n.checked!==(n.checked=t??void 0)&&(e.checked=t)}function Cde(e,t){t?e.hasAttribute(`selected`)||e.setAttribute(`selected`,``):e.removeAttribute(`selected`)}function l1(e,t,n,r){var i=d1(e);i[t]!==(i[t]=n)&&(t===`loading`&&(e[xY]=n),n==null?e.removeAttribute(t):typeof n!=`string`&&p1(e).includes(t)?e[t]=n:e.setAttribute(t,n))}function wde(e,t,n,r,i=!1,a=!1){var o=d1(e),s=o[s1],c=!o[c1],l=t||{},u=e.tagName===`OPTION`;for(var d in t)d in n||(n[d]=null);n.class?n.class=X$(n.class):(r||n[a1])&&(n.class=null),n[o1]&&(n.style??=null);var f=p1(e);for(let i in n){let a=n[i];if(u&&i===`value`&&a==null){e.value=e.__value=``,l[i]=a;continue}if(i===`class`){e1(e,e.namespaceURI===`http://www.w3.org/1999/xhtml`,a,r,t?.[a1],n[a1]),l[i]=a,l[a1]=n[a1];continue}if(i===`style`){n1(e,a,t?.[o1],n[o1]),l[i]=a,l[o1]=n[o1];continue}var p=l[i];if(!(a===p&&!(a===void 0&&e.hasAttribute(i)))){l[i]=a;var m=i[0]+i[1];if(m!==`$$`)if(m===`on`){let t={},n=`$$`+i,r=i.slice(2);var h=tde(r);if($ue(r)&&(r=r.slice(0,-7),t.capture=!0),!h&&p){if(a!=null)continue;e.removeEventListener(r,l[n],t),l[n]=null}a==null?h&&(e[`__${r}`]=void 0):h?(e[`__${r}`]=a,s$([r])):l[n]=i$(r,e,function(e){l[i].call(this,e)},t)}else if(i===`style`)l1(e,i,a);else if(i===`autofocus`)UZ(e,!!a);else if(!s&&(i===`__value`||i===`value`&&a!=null))e.value=e.__value=a;else if(i===`selected`&&u)Cde(e,a);else{var g=i;c||(g=rde(g));var _=g===`defaultValue`||g===`defaultChecked`;
40if(a==null&&!s&&!_)if(o[i]=null,g===`value`||g===`checked`){let n=e,r=t===void 0;if(g===`value`){let e=n.defaultValue;n.removeAttribute(g),n.defaultValue=e,n.value=n.__value=r?e:null}else{let e=n.defaultChecked;n.removeAttribute(g),n.defaultChecked=e,n.checked=r?e:!1}}else e.removeAttribute(i);else _||f.includes(g)&&(s||typeof a!=`string`)?(e[g]=a,g in o&&(o[g]=OJ)):typeof a!=`function`&&l1(e,g,a)}}}return l}function u1(e,t,n=[],r=[],i=[],a,o=!1,s=!1){lZ(i,n,r,n=>{var r=void 0,i={},c=e.nodeName===`SELECT`,l=!1;if(uQ(()=>{var u=t(...n.map(Y)),d=wde(e,r,u,a,o,s);l&&c&&`value`in u&&r1(e,u.value);for(let e of Object.getOwnPropertySymbols(i))u[e]||hQ(i[e]);for(let t of Object.getOwnPropertySymbols(u)){var f=u[t];t.description===jJ&&(!r||f!==r[t])&&(i[t]&&hQ(i[t]),i[t]=dQ(()=>_de(e,()=>f))),d[t]=f}r=d}),c){var u=e;iQ(()=>{r1(u,r.value,!0),xde(u)})}l=!0})}function d1(e){return e.__attributes??={[s1]:e.nodeName.includes(`-`),[c1]:e.namespaceURI===kJ}}var f1=new Map;function p1(e){var t=e.getAttribute(`is`)||e.nodeName,n=f1.get(t);if(n)return n;f1.set(t,n=[]);for(var r,i=e,a=Element.prototype;a!==i;){for(var o in r=LJ(i),r)r[o].set&&n.push(o);i=BJ(i)}return n}function Tde(e,t,n=t){var r=new WeakSet;qZ(e,`input`,async i=>{var a=i?e.defaultValue:e.value;if(a=m1(e)?h1(a):a,n(a),cX!==null&&r.add(cX),await YQ(),a!==(a=t())){var o=e.selectionStart,s=e.selectionEnd,c=e.value.length;if(e.value=a??``,s!==null){var l=e.value.length;o===s&&s===c&&l>c?(e.selectionStart=l,e.selectionEnd=l):(e.selectionStart=o,e.selectionEnd=Math.min(s,l))}}}),QQ(t)==null&&e.value&&(n(m1(e)?h1(e.value):e.value),cX!==null&&r.add(cX)),cQ(()=>{var n=t();if(e===document.activeElement){var i=lX??cX;if(r.has(i))return}m1(e)&&n===h1(e.value)||e.type===`date`&&!n&&!e.value||n!==e.value&&(e.value=n??``)})}function m1(e){var t=e.type;return t===`number`||t===`range`}function h1(e){return e===``?null:+e}var g1,_1,v1,y1,b1,x1=class{constructor(e){cJ(this,y1),cJ(this,g1,new WeakMap),cJ(this,_1),cJ(this,v1),lJ(this,v1,e)}observe(e,t){var n=U(this,g1).get(e)||new Set;return n.add(t),U(this,g1).set(e,n),uJ(this,y1,b1).call(this).observe(e,U(this,v1)),()=>{var n=U(this,g1).get(e);n.delete(t),n.size===0&&(U(this,g1).delete(e),U(this,_1).unobserve(e))}}};g1=new WeakMap,_1=new WeakMap,v1=new WeakMap,y1=new WeakSet,b1=function(){return U(this,_1)??lJ(this,_1,new ResizeObserver(e=>{for(var t of e){x1.entries.set(t.target,t);for(var n of U(this,g1).get(t.target)||[])n(t)}}))},aJ(x1,`entries`,new WeakMap);var S1=x1,Ede=new S1({box:`content-box`}),Dde=new S1({box:`border-box`});function C1(e,t,n){QZ(Ede.observe(e,e=>n(e[t])))}function w1(e,t,n){var r=Dde.observe(e,()=>n(e[t]));iQ(()=>(QQ(()=>n(e[t])),r))}function T1(e,t){return e===t||e?.[yY]===t}function E1(e={},t,n,r){return iQ(()=>{var r,i;return cQ(()=>{r=i,i=[],QQ(()=>{e!==n(...i)&&(t(e,...i),r&&T1(n(...r),e)&&t(null,...r))})}),()=>{QY(()=>{i&&T1(n(...i),e)&&t(null,...i)})}}),e}function D1(e=!1){let t=VY,n=t.l.u;if(!n)return;let r=()=>e$(t.s);if(e){let e=0,n={},i=fZ(()=>{let r=!1,i=t.s;for(let e in i)i[e]!==n[e]&&(n[e]=i[e],r=!0);return r&&e++,e});r=()=>Y(i)}n.b.length&&tQ(()=>{O1(t,r),GJ(n.b)}),$Z(()=>{let e=QQ(()=>n.m.map(WJ));return()=>{for(let t of e)typeof t==`function`&&t()}}),n.a.length&&$Z(()=>{O1(t,r),GJ(n.a)})}function O1(e,t){if(e.l.s)for(let t of e.l.s)Y(t);t()}function k1(e,t){var n=e.$$events?.[t.type];for(var r of MJ(n)?n.slice():n==null?[]:[n])r.call(this,t)}function A1(e,t,n){if(e==null)return t(void 0),n&&n(void 0),UJ;let r=QQ(()=>e.subscribe(t,n));return r.unsubscribe?()=>r.unsubscribe():r}var j1=[];function M1(e,t){return{subscribe:N1(e,t).subscribe}}function N1(e,t=UJ){let n=null,r=new Set;function i(t){if(LY(e,t)&&(e=t,n)){let t=!j1.length;for(let t of r)t[1](),j1.push(t,e);if(t){for(let e=0;e<j1.length;e+=2)j1[e][0](j1[e+1]);j1.length=0}}}function a(t){i(t(e))}function o(o,s=UJ){let c=[o,s];return r.add(c),r.size===1&&(n=t(i,a)||UJ),o(e),()=>{r.delete(c),r.size===0&&n&&(n(),n=null)}}return{set:i,update:a,subscribe:o}}function P1(e,t,n){let r=!Array.isArray(e),i=r?[e]:e;if(!i.every(Boolean))throw Error(`derived() expects stores as input, got a falsy value`);let a=t.length<2;return M1(n,(e,n)=>{let o=!1,s=[],c=0,l=UJ,u=()=>{if(c)return;l();let i=t(r?s[0]:s,e,n);a?e(i):l=typeof i==`function`?i:UJ},d=i.map((e,t)=>A1(e,e=>{s[t]=e,c&=~(1<<t),o&&u()},()=>{c|=1<<t}));return o=!0,u(),function(){GJ(d),l(),o=!1}})}function F1(e){let t;return A1(e,e=>t=e)(),t}var I1=!1,L1=Symbol();function R1(e,t,n){let r=n[t]??(n[t]={store:null,source:wZ(void 0),unsubscribe:UJ});if(r.store!==e&&!(L1 in n))if(r.unsubscribe(),r.store=e??null,e==null)r.source.v=void 0,r.unsubscribe=UJ;else{var i=!0;r.unsubscribe=A1(e,e=>{i?r.source.v=e:G(r.source,e)}),i=!1}return e&&L1 in n?F1(e):Y(r.source)}function z1(e,t){return e.set(t),t}function B1(){let e={};function t(){QZ(()=>{for(var t in e)e[t].unsubscribe();FJ(e,L1,{enumerable:!1,value:!0})})}return[e,t]}function Ode(e){var t=I1;try{return I1=!1,[e(),I1]}finally{I1=t}}var kde={get(e,t){if(!e.exclude.includes(t))return e.props[t]},set(e,t){return!1},getOwnPropertyDescriptor(e,t){if(!e.exclude.includes(t)&&t in e.props)return{enumerable:!0,configurable:!0,value:e.props[t]}},has(e,t){return e.exclude.includes(t)?!1:t in e.props},ownKeys(e){return Reflect.ownKeys(e.props).filter(t=>!e.exclude.includes(t))}};function V1(e,t,n){return new Proxy({props:e,exclude:t},kde)}var Ade={get(e,t){let n=e.props.length;for(;n--;){let r=e.props[n];if(HJ(r)&&(r=r()),typeof r==`object`&&r&&t in r)return r[t]}},set(e,t,n){let r=e.props.length;for(;r--;){let i=e.props[r];HJ(i)&&(i=i());let a=IJ(i,t);if(a&&a.set)return a.set(n),!0}return!1},getOwnPropertyDescriptor(e,t){let n=e.props.length;for(;n--;){let r=e.props[n];if(HJ(r)&&(r=r()),typeof r==`object`&&r&&t in r){let e=IJ(r,t);return e&&!e.configurable&&(e.configurable=!0),e}}},has(e,t){if(t===yY||t===bY)return!1;for(let n of e.props)if(HJ(n)&&(n=n()),n!=null&&t in n)return!0;return!1},ownKeys(e){let t=[];for(let n of e.props)if(HJ(n)&&(n=n()),n){for(let e in n)t.includes(e)||t.push(e);for(let e of Object.getOwnPropertySymbols(n))t.includes(e)||t.push(e)}return t}};function H1(...e){return new Proxy({props:e},Ade)}function $(e,t,n,r){var i=!zY||(n&yJ)!==0,a=(n&xJ)!==0,o=(n&SJ)!==0,s=r,c=!0,l=()=>(c&&(c=!1,s=o?QQ(r):r),s),u;if(a){var d=yY in e||bY in e;u=IJ(e,t)?.set??(d&&t in e?n=>e[t]=n:void 0)}var f,p=!1;a?[f,p]=Ode(()=>e[t]):f=e[t],f===void 0&&r!==void 0&&(f=l(),u&&(i&&kY(),u(f)));var m;if(m=i?()=>{var n=e[t];return n===void 0?l():(c=!0,n)}:()=>{var n=e[t];return n!==void 0&&(s=void 0),n===void 0?s:n},i&&(n&bJ)===0)return m;if(u){var h=e.$$legacy;return(function(e,t){return arguments.length>0?((!i||!t||h||p)&&u(t?m():e),e):m()})}var g=!1,_=((n&vJ)===0?mZ:fZ)(()=>(g=!1,m()));a&&Y(_);var v=AQ;return(function(e,t){if(arguments.length>0){let n=t?Y(_):i&&a?kZ(e):e;return G(_,n),g=!0,s!==void 0&&(s=n),e}return TQ&&g||(v.f&sY)!==0?_.v:Y(_)})}var U1=(e=>
40(e[e.UnknownError=0]=`UnknownError`,e[e.UserCancelledError=1]=`UserCancelledError`,e[e.StoreProblemError=2]=`StoreProblemError`,e[e.PurchaseNotAllowedError=3]=`PurchaseNotAllowedError`,e[e.PurchaseInvalidError=4]=`PurchaseInvalidError`,e[e.ProductNotAvailableForPurchaseError=5]=`ProductNotAvailableForPurchaseError`,e[e.ProductAlreadyPurchasedError=6]=`ProductAlreadyPurchasedError`,e[e.ReceiptAlreadyInUseError=7]=`ReceiptAlreadyInUseError`,e[e.InvalidReceiptError=8]=`InvalidReceiptError`,e[e.MissingReceiptFileError=9]=`MissingReceiptFileError`,e[e.NetworkError=10]=`NetworkError`,e[e.InvalidCredentialsError=11]=`InvalidCredentialsError`,e[e.UnexpectedBackendResponseError=12]=`UnexpectedBackendResponseError`,e[e.InvalidAppUserIdError=14]=`InvalidAppUserIdError`,e[e.OperationAlreadyInProgressError=15]=`OperationAlreadyInProgressError`,e[e.UnknownBackendError=16]=`UnknownBackendError`,e[e.InvalidAppleSubscriptionKeyError=17]=`InvalidAppleSubscriptionKeyError`,e[e.IneligibleError=18]=`IneligibleError`,e[e.InsufficientPermissionsError=19]=`InsufficientPermissionsError`,e[e.PaymentPendingError=20]=`PaymentPendingError`,e[e.InvalidSubscriberAttributesError=21]=`InvalidSubscriberAttributesError`,e[e.LogOutWithAnonymousUserError=22]=`LogOutWithAnonymousUserError`,e[e.ConfigurationError=23]=`ConfigurationError`,e[e.UnsupportedError=24]=`UnsupportedError`,e[e.EmptySubscriberAttributesError=25]=`EmptySubscriberAttributesError`,e[e.CustomerInfoError=28]=`CustomerInfoError`,e[e.SignatureVerificationError=36]=`SignatureVerificationError`,e[e.InvalidEmailError=38]=`InvalidEmailError`,e[e.TestStoreSimulatedPurchaseError=42]=`TestStoreSimulatedPurchaseError`,e))(U1||{});
40function jde(e){switch(e){case 0:return`Unknown error.`;case 1:return`Purchase was cancelled.`;case 2:return`There was a problem with the store.`;case 3:return`The device or user is not allowed to make the purchase.`;case 4:return`One or more of the arguments provided are invalid.`;case 5:return`The product is not available for purchase.`;case 6:return`This product is already active for the user.`;case 7:return`There is already another active subscriber using the same receipt.`;case 8:return`The receipt is not valid.`;case 9:return`The receipt is missing.`;case 10:return`Error performing request. Please check your network connection and try again.`;case 11:return`There was a credentials issue. Check the underlying error for more details.`;case 12:return`Received unexpected response from the backend.`;case 14:return`The app user ID is not valid.`;case 15:return`The operation is already in progress.`;case 16:return`There was an unknown backend error.`;case 17:return`Apple Subscription Key is invalid or not present. In order to provide subscription offers, you must first generate a subscription key. Please see https://docs.revenuecat.com/docs/ios-subscription-offers for more info.`;case 18:return`The User is ineligible for that action.`;case 19:return`App does not have sufficient permissions to make purchases.`;case 20:return`The payment is pending.`;case 21:return`One or more of the attributes sent could not be saved.`;case 22:return`Called logOut but the current user is anonymous.`;case 23:return`There is an issue with your configuration. Check the underlying error for more details.`;case 24:return`There was a problem with the operation. Looks like we don't support that yet. Check the underlying error for more details.`;case 25:return`A request for subscriber attributes returned none.`;case 28:return`There was a problem related to the customer info.`;case 36:return`Request failed signature verification. Please see https://rev.cat/trusted-entitlements for more info.`;case 38:return`Email is not valid. Please provide a valid email address.`;case 42:return`Purchase failure simulated successfully in Test Store.`}}var W1=class{static getPublicMessage(e){return jde(e)}static getErrorCodeForBackendErrorCode(e){switch(e){case 7101:case 7773:case 7898:case 7899:case 7900:case 7901:return U1.StoreProblemError;case 7102:return U1.ReceiptAlreadyInUseError;case 7103:return U1.InvalidReceiptError;case 7107:case 7224:case 7225:case 7967:return U1.InvalidCredentialsError;case 7105:case 7106:case 7814:case 7877:case 7878:return U1.PurchaseInvalidError;case 7772:return U1.ProductAlreadyPurchasedError;case 7220:return U1.InvalidAppUserIdError;case 7259:return U1.CustomerInfoError;case 7229:return U1.StoreProblemError;case 7230:case 7e3:return U1.ConfigurationError;case 7231:return U1.StoreProblemError;case 7232:return U1.IneligibleError;case 7263:case 7264:return U1.InvalidSubscriberAttributesError;case 7104:case 7234:case 7226:case 7110:return U1.UnexpectedBackendResponseError;case 7662:return U1.UnsupportedError;case 7012:case 7834:case 7879:return U1.InvalidEmailError}}static convertCodeToBackendErrorCode(e){return e in G1?e:null}static convertPurchaseFlowErrorCodeToErrorCode(e){switch(e){case t0.ErrorSettingUpPurchase:return U1.StoreProblemError;case t0.ErrorChargingPayment:return U1.PaymentPendingError;case t0.NetworkError:return U1.NetworkError;case t0.MissingEmailError:return U1.PurchaseInvalidError;case t0.AlreadyPurchasedError:return U1.ProductAlreadyPurchasedError;case t0.InvalidPaddleAPIKeyError:return U1.InvalidCredentialsError;default:return U1.UnknownError}}},G1=(e=>(e[e.BackendInvalidPlatform=7e3]=`BackendInvalidPlatform`,e[e.BackendInvalidEmail=7012]=`BackendInvalidEmail`,e[e.BackendStoreProblem=7101]=`BackendStoreProblem`,e[e.BackendCannotTransferPurchase=7102]=`BackendCannotTransferPurchase`,e[e.BackendInvalidReceiptToken=7103]=`BackendInvalidReceiptToken`,e[e.BackendInvalidAppStoreSharedSecret=7104]=`BackendInvalidAppStoreSharedSecret`,e[e.BackendInvalidPaymentModeOrIntroPriceNotProvided=7105]=`BackendInvalidPaymentModeOrIntroPriceNotProvided`,e[e.BackendProductIdForGoogleReceiptNotProvided=7106]=`BackendProductIdForGoogleReceiptNotProvided`,e[e.BackendInvalidPlayStoreCredentials=7107]=`BackendInvalidPlayStoreCredentials`,e[e.BackendInternalServerError=7110]=`BackendInternalServerError`,e[e.BackendEmptyAppUserId=7220]=`BackendEmptyAppUserId`,e[e.BackendInvalidAuthToken=7224]=`BackendInvalidAuthToken`,e[e.BackendInvalidAPIKey=7225]=`BackendInvalidAPIKey`,e[e.BackendB
40adRequest=7226]=`BackendBadRequest`,e[e.BackendPlayStoreQuotaExceeded=7229]=`BackendPlayStoreQuotaExceeded`,e[e.BackendPlayStoreInvalidPackageName=7230]=`BackendPlayStoreInvalidPackageName`,e[e.BackendPlayStoreGenericError=7231]=`BackendPlayStoreGenericError`,e[e.BackendUserIneligibleForPromoOffer=7232]=`BackendUserIneligibleForPromoOffer`,e[e.BackendInvalidAppleSubscriptionKey=7234]=`BackendInvalidAppleSubscriptionKey`,e[e.BackendSubscriberNotFound=7259]=`BackendSubscriberNotFound`,e[e.BackendInvalidSubscriberAttributes=7263]=`BackendInvalidSubscriberAttributes`,e[e.BackendInvalidSubscriberAttributesBody=7264]=`BackendInvalidSubscriberAttributesBody`,e[e.BackendProductIDsMalformed=7662]=`BackendProductIDsMalformed`,e[e.BackendAlreadySubscribedError=7772]=`BackendAlreadySubscribedError`,e[e.BackendPaymentGatewayGenericError=7773]=`BackendPaymentGatewayGenericError`,e[e.BackendOfferNotFound=7814]=`BackendOfferNotFound`,e[e.BackendNoMXRecordsFound=7834]=`BackendNoMXRecordsFound`,e[e.BackendInvalidOperationSession=7877]=`BackendInvalidOperationSession`,e[e.BackendPurchaseCannotBeCompleted=7878]=`BackendPurchaseCannotBeCompleted`,e[e.BackendEmailIsRequired=7879]=`BackendEmailIsRequired`,e[e.BackendGatewaySetupErrorStripeTaxNotActive=7898]=`BackendGatewaySetupErrorStripeTaxNotActive`,e[e.BackendGatewaySetupErrorInvalidTaxOriginAddress=7899]=`BackendGatewaySetupErrorInvalidTaxOriginAddress`,e[e.BackendGatewaySetupErrorMissingRequiredPermission=7900]=`BackendGatewaySetupErrorMissingRequiredPermission`,e[e.BackendGatewaySetupErrorSandboxModeOnly=7901]=`BackendGatewaySetupErrorSandboxModeOnly`,e[e.BackendInvalidPaddleAPIKey=7967]=`BackendInvalidPaddleAPIKey`,e))(G1||{}),K1=class e extends Error{constructor(e,t,n,r){super(t),aJ(this,`toString`,()=>`PurchasesError(code: ${U1[this.errorCode]}, message: ${this.message})`),this.errorCode=e,this.underlyingErrorMessage=n,this.extra=r}static getForBackendError(t,n){let r=W1.getErrorCodeForBackendErrorCode(t);return new e(r,W1.getPublicMessage(r),n,{backendErrorCode:t})}static getForPurchasesFlowError(t){return new e(W1.convertPurchaseFlowErrorCodeToErrorCode(t.errorCode),t.message,t.underlyingErrorMessage)}},Mde=class extends Error{constructor(){super(`Purchases must be configured before calling getInstance`)}},q1=(e=>(e.Started=`started`,e.InProgress=`in_progress`,e.Succeeded=`succeeded`,e.Failed=`failed`,e))(q1||{}),J1=(e=>(e[e.SetupIntentCreationFailed=1]=`SetupIntentCreationFailed`,e[e.PaymentMethodCreationFailed=2]=`PaymentMethodCreationFailed`,e[e.PaymentChargeFailed=3]=`PaymentChargeFailed`,e[e.SetupIntentCompletionFailed=4]=`SetupIntentCompletionFailed`,e[e.AlreadyPurchased=5]=`AlreadyPurchased`,e))(J1||{}),Y1=(e=>(e[e.Silent=0]=`Silent`,e[e.Error=1]=`Error`,e[e.Warn=2]=`Warn`,e[e.Info=3]=`Info`,e[e.Debug=4]=`Debug`,e[e.Verbose=5]=`Verbose`,e))(Y1||{}),X1=class{static setLogLevel(e){this.logLevel=e}static setLogHandler(e){this.logHandler=e}static log(e,t=this.logLevel){let n=`[Purchases] ${e}`;if(!(this.logLevel<t||t===Y1.Silent)){if(this.logHandler!==null){this.logHandler(t,n);return}switch(t){case Y1.Error:console.error(n);break;case Y1.Warn:console.warn(n);break;case Y1.Info:console.info(n);break;case Y1.Debug:console.debug(n);break;case Y1.Verbose:console.debug(n);break}}}static errorLog(e){this.log(e,Y1.Error)}static warnLog(e){this.log(e,Y1.Warn)}static infoLog(e){this.log(e,Y1.Info)}static debugLog(e){this.log(e,Y1.Debug)}static verboseLog(e){this.log(e,Y1.Verbose)}};aJ(X1,`logLevel`,Y1.Silent),aJ(X1,`logHandler`,null);function Z1(e){return e.operation.redemption_info?{redeemUrl:e.operation.redemption_info?.redeem_url??null}:null}var Q1=(e=>(e.tax_collection_disabled=`tax_collection_disabled`,e.invalid_tax_location=`invalid_tax_location`,e.rate_limit_exceeded=`rate_limit_exceeded`,e.missing_required_permission=`missing_required_permission`,e.invalid_origin_address=`invalid_origin_address`,e.invalid_head_office_address=`invalid_head_office_address`,e.taxes_not_active=`taxes_not_active`,e.stripe_tax_unsupported_country=`stripe_tax_unsupported_country`,e.unexpected_gateway_error=`unexpected_gateway_error`,e))(Q1||{});function $1(e,t){let n=e.original_amount_in_micros??e.total_excluding_tax_in_micros,r=e.applied_discounts??[];return{currency:e.currency,originalAmountInMicros:n,totalAmountInMicros:e.total_amount_in_micros,totalExcludingTaxInMicros:e.total_excluding_tax_in_micros,taxCalculationStatus:t,taxAmountInMicros:e.tax_amount_in_micros,taxBreakdown:e.tax_breakdown,appliedDiscounts:r.map(e=>({identifier:e.identifier,displayName:e.display_name,discountedAmountInMicros:e.discounted_amount_in_micros,percentage:e.percentage,discountCode:e.discount_code,durationMode:e.duration_mode,timeWindow:e.time_window}))}}function e0(e,t){if(e==null){t(new n0(t0.UnknownError,`Got an error status but error field is empty.`));return}switch(e.code){case J1.SetupIntentCreationFailed:t(new n0(t0.ErrorSettingUpPurchase,`Setup intent creation failed`));return;case J1.PaymentMethodCreationFailed:t(new n0(t0.ErrorSettingUpPurchase,`Payment method creation failed`));return;case J1.PaymentChargeFailed:t(new n0(t0.ErrorChargingPayment,`Payment charge failed`));return;case J1.SetupIntentCompletionFailed:t(new n0(t0.ErrorSettingUpPurchase,`Setup intent completion failed`));return;case J1.AlreadyPurchased:t(new n0(t0.AlreadyPurchasedError,`Purchased was already completed`));return;default:t(new n0(t0.UnknownError,`Unknown error code received`));return}}var t0=(e=>(e[e.ErrorSettingUpPurchase=0]=`ErrorSettingUpPurchase`,e[e.ErrorChargingPayment=1]=`ErrorChargingPayment`,e[e.UnknownError=2]=`UnknownError`,e[e.NetworkError=3]=`NetworkError`,e[e.MissingEmailError=4]=`MissingEmailError`,e[e.AlreadyPurchasedError=5]=`AlreadyPurchasedError`,e[e.StripeTaxNotActive=6]=`StripeTaxNotActive`,e[e.StripeInvalidTaxOriginAddress=7]=`StripeInvalidTaxOriginAddress`,e[e.StripeMissingRequiredPermission=8]=`StripeMissingRequiredPermission`,e[e.InvalidPaddleAPIKeyError=9]=`InvalidPaddleAPIKeyError`,e))(t0||{}
40),n0=class e extends Error{constructor(e,t,n,r,i,a){super(t),this.errorCode=e,this.underlyingErrorMessage=n,this.purchasesErrorCode=r,this.extra=i,this.displayPurchaseFlowErrorCode=a}getErrorCode(){let e=this.extra?.backendErrorCode??this.purchasesErrorCode;return this.displayPurchaseFlowErrorCode?this.errorCode??e:e??this.errorCode}static fromPurchasesError(t,n,r=!1){let i;return i=t.errorCode===U1.ProductAlreadyPurchasedError?5:t.errorCode===U1.InvalidEmailError?4:t.errorCode===U1.NetworkError?3:e.fromBackendErrorCode(t.extra?.backendErrorCode)??n,new e(i,t.message,t.underlyingErrorMessage,t.errorCode,t.extra,r)}static fromBackendErrorCode(e){switch(e){case G1.BackendGatewaySetupErrorStripeTaxNotActive:return 6;case G1.BackendGatewaySetupErrorInvalidTaxOriginAddress:return 7;case G1.BackendGatewaySetupErrorMissingRequiredPermission:return 8;case G1.BackendInvalidPaddleAPIKey:return 9;default:return null}}},Nde=class e{constructor(e,t,n=10){aJ(this,`operationSessionId`,null),aJ(this,`backend`),aJ(this,`eventsTracker`),aJ(this,`maxNumberAttempts`),aJ(this,`waitMSBetweenAttempts`,1e3),this.backend=e,this.eventsTracker=t,this.maxNumberAttempts=n}static getBackendErrorCodeForInterruptedCheckout(e){switch(e){case Q1.taxes_not_active:case Q1.stripe_tax_unsupported_country:return G1.BackendGatewaySetupErrorStripeTaxNotActive;case Q1.invalid_origin_address:case Q1.invalid_head_office_address:return G1.BackendGatewaySetupErrorInvalidTaxOriginAddress;case Q1.missing_required_permission:return G1.BackendGatewaySetupErrorMissingRequiredPermission;default:return null}}static throwIfCheckoutShouldBeInterrupted(t){if(!t.interrupt_checkout)return;let n=e.getBackendErrorCodeForInterruptedCheckout(t.failed_reason);throw n==null?new n0(0,`There was a problem with the store.`,t.failed_reason??`Checkout interrupted.`):n0.fromPurchasesError(K1.getForBackendError(n,t.failed_reason??null),0)}async prepareCheckout(e,t){try{return await this.backend.postCheckoutPrepare(e,t)}catch(e){if(e instanceof K1)throw n0.fromPurchasesError(e,0);{let t=`Unknown error preparing purchase: `+String(e);throw X1.errorLog(t),new n0(2,t)}}}async checkoutStart({appUserId:e,productId:t,purchaseOption:n,presentedOfferingContext:r,workflowPurchaseContext:i,paywallId:a,paywallSessionId:o,customerEmail:s,metadata:c,locale:l,attributionMetadata:u}){try{let d=this.eventsTracker.getTraceId(),f=i?.stepId,p=i?.urlParameters,m=await this.backend.postCheckoutStart({appUserId:e,productId:t,purchaseOption:n,presentedOfferingContext:r,traceId:d,presentedStepId:f,urlParameters:p,paywallId:a,paywallSessionId:o,customerEmail:s,metadata:c,locale:l,attributionMetadata:u});return this.operationSessionId=m.operation_session_id,m}catch(e){if(e instanceof K1)throw n0.fromPurchasesError(e,0);{let t=`Unknown error starting purchase: `+String(e);throw X1.errorLog(t),new n0(2,t)}}}async checkoutRefreshPricing({countryCode:t,postalCode:n,state:r,city:i,addressLine1:a,addressLine2:o,discountCode:s,signal:c}={}){let l=this.operationSessionId;if(!l)throw new n0(0,`No purchase started`);try{let u=await this.backend.patchCheckoutRefreshPricing(l,{countryCode:t,postalCode:n,state:r,city:i,addressLine1:a,addressLine2:o,discountCode:s,signal:c});return e.throwIfCheckoutShouldBeInterrupted(u),u}catch(e){if(e instanceof n0)throw e;if(e instanceof K1)throw n0.fromPurchasesError(e,0);{let t=`Unknown error refreshing checkout pricing: `+String(e);throw X1.errorLog(t),new n0(2,t)}}}async checkoutComplete(e,t){let n=this.operationSessionId;if(!n)throw new n0(0,`No purchase started`);try{return await this.backend.postCheckoutComplete(n,e,t)}catch(e){if(e instanceof K1)throw n0.fromPurchasesError(e,0);{let t=`Unknown error starting purchase: `+String(e);throw X1.errorLog(t),new n0(2,t)}}}async pollCurrentPurchaseForCompletion(){let e=this.operationSessionId;if(!e)throw new n0(0,`No purchase in progress`);return new Promise((t,n)=>{let r=(i=1)=>{if(i>this.maxNumberAttempts){this.clearPurchaseInProgress(),n(new n0(2,`Max attempts reached trying to get successful purchase status`));return}this.backend.getCheckoutStatus(e).then(a=>{let o=a.operation.store_transaction_identifier,s=a.operation.product_identifier,c=a.operation.purchase_date?isNaN(Date.parse(a.operation.purchase_date))?null:new Date(a.operation.purchase_date):null;switch(a.operation.status){case q1.Started:case q1.InProgress:setTimeout(()=>r(i+1),this.waitMSBetweenAttempts);break;case q1.Succeeded:if(this.clearPurchaseInProgress(),!o||!s||!c){n(new n0(2,`Missing required fields in operation response.`));return}t({redemptionInfo:Z1(a),operationSessionId:e,storeTransactionIdentifier:o,productIdentifier:s,purchaseDate:c,attributionMetadata:a.attribution_metadata??void 0});return;case q1.Failed:this.clearPurchaseInProgress(),e0(a.operation.error,n)}}).catch(e=>{n(n0.fromPurchasesError(e,3))})};r()})}clearPurchaseInProgress(){this.operationSessionId=null}},r0=`rcb-ui-translator`,i0=`en`,Pde={"periods.week":`{{amount}} week`,"periods.month":`{{amount}} month`,"periods.year":`{{amount}} year`,"periods.day":`{{amount}}
40 day`,"periods.weekShort":`{{amount}}wk`,"periods.monthShort":`{{amount}}mo`,"periods.yearShort":`{{amount}}yr`,"periods.dayShort":`{{amount}}d`,"periods.lifetime":`lifetime`,"periods.weekPlural":`{{amount}} weeks`,"periods.monthPlural":`{{amount}} months`,"periods.yearPlural":`{{amount}} years`,"periods.dayPlural":`{{amount}} days`,"periods.weekFrequency":`weekly`,"periods.monthFrequency":`monthly`,"periods.yearFrequency":`yearly`,"periods.dayFrequency":`daily`,"periods.perWeekFrequency":`per week`,"periods.perMonthFrequency":`per month`,"periods.perYearFrequency":`per year`,"periods.perDayFrequency":`per day`,"periods.unknownFrequency":`unknown`,"periods.weekFrequencyPlural":`every {{amount}} weeks`,"periods.monthFrequencyPlural":`every {{amount}} months`,"periods.yearFrequencyPlural":`every {{amount}} years`,"periods.dayFrequencyPlural":`every {{amount}} days`,"product_info.subscribe_to":`Subscribe to`,"product_info.product_title":`{{productTitle}}`,"product_info.product_description":`{{productDescription}}`,"product_info.product_price":`{{productPrice}}`,"product_info.free_trial_duration":`Try free for {{trialDuration}}`,"product_info.price_after_free_trial":`After trial ends, on {{renewalDate}}`,"product_info.intro_price_phase_after_trial":`Then {{introPriceDuration}} for {{introPrice}}`,"product_info.intro_price_phase":`First {{introPriceDuration}} for {{introPrice}}`,"product_info.intro_price_phase_paid_once":`paid once`,"product_info.price_after_intro_price":`After {{introPriceDuration}}, on {{renewalDate}}`,"product_info.after_trial":`after trial`,"product_info.after":`after`,"product_info.total_due_today":`Total due today`,"product_info.renewal_frequency":`Renews {{frequency}}`,"product_info.continues_until_cancelled":`Continues until cancelled`,"product_info.cancel_anytime":`Cancel anytime`,"payment_entry_page.payment_step_title":`Secure checkout by RevenueCat`,"payment_entry_page.trial_subscription_terms_info":`After your trial ends, you will be charged {{price}} {{perFrequency}} starting {{renewalDate}}. You can cancel any time before this date.`,"payment_entry_page.subscription_terms_info":`By subscribing, you agree to allow {{appName}} to charge you according to their terms until you cancel.`,"payment_entry_page.otp_terms_info":`By purchasing, you agree to allow {{appName}} to charge you according to their terms.`,"payment_entry_page.terms_link_label":`Terms`,"payment_entry_page.checkout_consent_agreement":`I agree to the {{appName}} {{termsOfService}}.`,"payment_entry_page.checkout_consent_terms_of_service":`terms of service`,"payment_entry_page.subscription_info":`Subscription renews automatically. Cancel anytime.`,"payment_entry_page.button_pay":`Pay now`,"payment_entry_page.button_start_trial":`Start trial`,"payment_entry_page.button_with_price":`Pay {{formattedPrice}}`,"payment_entry_page.button_payment_method":`Pay {{formattedPrice}} with {{paymentMethod}}`,"payment_entry_page.express_checkout_divider":`OR PAY BY CARD`,"loading_page.processing_payment":`Processing payment`,"loading_page.keep_page_open":`The process is almost done. Keep this page open.`,"success_page.purchase_successful":`Payment complete`,"success_page.button_close":`Continue`,"error_page.close_button_title":`Go to {{appName}}`,"error_page.if_error_persists":`If it persists, please contact `,"error_page.trouble_accessing":`If you're having trouble accessing your purchase, reach out to support on `,"error_page.error_title_already_subscribed":`You already subscribed to {{productTitle}}`,"error_page.error_title_already_purchased":`You already purchased {{productTitle}}`,"error_page.error_title_other_errors":`Something went wrong`,"error_page.error_message_already_subscribed":`You can't subscribe to this product again.`,"error_page.error_message_already_purchased":`You can't purchase this product again.`,"error_page.error_title_stripe_tax_not_active":`Stripe Tax not active`,"error_page.error_title_stripe_invalid_tax_origin_address":`Invalid tax origin address`,"error_page.error_title_stripe_missing_required_permission":`Missing Stripe permission`,"error_page.error_message_missing_email_error":`Email is required to complete the purchase.`,"error_page.error_message_invalid_email_error":`The email address {{email}} couldn't be verified. Please provide a valid email address.`,"error_page.error_message_network_error":`Network error. Please check your internet connection.`,"error_page.error_message_error_charging_payment":`Payment failed.`,"error_page.error_message_error_setting_up_purchase":`Purchase not started due to an error (error code: {{errorCode}}).`,"error_page.error_message_invalid_tax_location":`We couldn't verify your billing address. Please double-check that the postal code and country are correct.`,"error_page.error_message_unknown_error":`An unknown error occurred (error code: {{errorCode}}).`,"error_page.error_message_stripe_tax_not_active":`The purchase failed because Stripe Tax isnât enabled. In production, purchases will work without taxes applied.`,"error_page.error_message_stripe_invalid_tax_origin_address":`The purchase failed because the tax origin address is invali
40d. In production, purchases will work without taxes applied.`,"error_page.error_message_stripe_missing_required_permission":`The purchase failed because the Stripe app lacks a required permission. In production, purchases will work without taxes applied.`,"error_page.error_only_in_sandbox":`This message appears only in sandbox.`,"error_page.button_try_again":`Try again`,"error_page.button_close":`Close`,"paywall_variables.price_per_period":`{{formattedPrice}}/{{period}}`,"paywall_variables.sub_relative_discount":`{{discount}}%`,"paywall_variables.total_price_and_per_month":`{{formattedPrice}}/{{period}}({{formattedPricePerMonth}}/{{monthPeriod}})`,"pricing_dropdown.show_details":`Show details`,"pricing_dropdown.hide_details":`Hide details`,"pricing_dropdown.add_promo_code":`Add promo code`,"discount_input.label":`Promo code`,"pricing_table.trial_ends":`After trial ends, on {{formattedTrialEndDate}}`,"pricing_table.total_excluding_tax":`Total excluding tax`,"pricing_table.total_due_today":`Total due today`,"pricing_table.subtotal":`Subtotal`,"pricing_table.discount":`Discount`,"pricing_table.tax":`Tax`,"pricing_table.enter_billing_address_to_calculate":`Enter billing address to calculate`,"pricing_table.enter_postal_code_to_calculate":`Enter zip code to calculate`,"pricing_table.enter_state_or_postal_code_to_calculate":`Enter state or postal code to calculate`,"navbar_header.details":`Details`,"navbar_header.back_button":`Back`,"price_update.title":`Price update`,"price_update.base_message":`The total price was updated with tax based on your billing address. Please review and try again. Your card will only be charged once.`,"price_update.trial_message":`The subscription price was updated to include tax based on your billing address. Free trial still applies. Review and try again.`,"apple_pay.free_trial":`Free Trial`},Fde={"periods.week":`{{amount}} semana`,"periods.month":`{{amount}} mes`,"periods.year":`{{amount}} año`,"periods.day":`{{amount}} dÃa`,"periods.weekShort":`{{amount}} sem`,"periods.monthShort":`{{amount}}mes`,"periods.yearShort":`{{amount}}año`,"periods.dayShort":`{{amount}}d`,"periods.lifetime":`de por vida`,"periods.weekPlural":`{{amount}} semanas`,"periods.monthPlural":`{{amount}} meses`,"periods.yearPlural":`{{amount}} años`,"periods.dayPlural":`{{amount}} dÃas`,"periods.weekFrequency":`semanal`,"periods.monthFrequency":`mensual`,"periods.yearFrequency":`anual`,"periods.dayFrequency":`diaria`,"periods.perWeekFrequency":`por semana`,"periods.perMonthFrequency":`por mes`,"periods.perYearFrequency":`por año`,"periods.perDayFrequency":`por dÃa`,"periods.unknownFrequency":`desconocida`,"periods.weekFrequencyPlural":`cada {{amount}} semanas`,"periods.monthFrequencyPlural":`cada {{amount}} meses`,"periods.yearFrequencyPlural":`cada {{amount}} años`,"periods.dayFrequencyPlural":`cada {{amount}} dÃas`,"product_info.product_title":`{{productTitle}}`,"product_info.product_description":`{{productDescription}}`,"product_info.product_price":`{{productPrice}}`,"product_info.free_trial_duration":`{{trialDuration}} prueba gratuita`,"product_info.price_after_free_trial":`Después de que termine el periodo de prueba, el {{renewalDate}}`,"product_info.renewal_frequency":`Se renueva {{frequency}}`,"product_info.continues_until_cancelled":`Continua hasta que se cancele`,"product_info.cancel_anytime":`Cancelar en cualquier momento`,"payment_entry_page.payment_step_title":`Pago seguro mediante RevenueCat`,"payment_entry_page.button_pay":`Pagar ahora`,"payment_entry_page.button_start_trial":`Comenzar prueba`,"success_page.purchase_successful":`Pago completado`,"success_page.button_close":`Continuar`,"error_page.if_error_persists":`Si el error persiste, contacta con `,"error_page.error_title_already_subscribed":`Ya te has suscrito a {{productTitle}}`,"error_page.error_title_already_purchased":`Ya has comprado {{productTitle}}`,"error_page.error_title_other_errors":`Algo salió mal`,"error_page.error_message_already_subscribed":`No puedes suscribirte a este producto de nuevo.`,"error_page.error_message_already_purchased":`No puedes comprar este producto de nuevo.`,"error_page.error_message_missing_email_error":`Se requiere un correo electrónico para completar la compra.`,"error_page.error_message_network_error":`Error de red. Por favor, comprueba tu conexión a internet.`,"error_page.error_message_error_charging_payment":`Pago fallido.`,"error_page.error_message_error_setting_up_purchase":`No se pudo iniciar la compra debido a un error (código de error: {{errorCode}}).`,"error_page.error_message_invalid_tax_location":`No pudimos verificar tu dirección de facturación. Por favor, verifica que el código postal y el paÃs sean correctos.`,"error_page.error_message_unknown_error":`Ocurrió un error desconocido (código de error: {{errorCode}}).`,"error_page.button_try_again":`Intentar de nuevo`,"paywall_variables.price_per_period":`{{formattedPrice}}/{{period}}`,"paywall_variables.sub_relative_discount":`{{discount}}%`,"paywall_variables.total_price_and_per_month":`{{formattedPrice}}/{{period}}({{formattedPricePerMonth}}/{{monthPeriod}})`,"product_info.total_due_today":`Total a pagar hoy`,"product_info.subscribe_to":`Suscribirse a`,"navbar_header.details":`Detalles`,"navbar_header.back_button":`Atrás`,"pricing_dropdown.show_details":`Mostrar detalles`,"pricing_dropdown.hide_details":`Ocultar detalles`,"pricing_table.tax":`Impuestos`,"pricing_table.trial_ends":`Después de que finalice la prueba, el {{formattedTrialEndDate}}`,"pricing_table.total_due_today":`Total a pagar hoy`,"pricing_table.total_excluding_tax":`Total sin impuestos`,"pricing_table.enter_billing_address_to_calculate":`Introduce la dirección de facturación para calcular`,"pricing_table.enter_state_or_postal_code_to_calculate":`Introduce el estado o el código postal para calcular`,"pricing_table.enter_postal_code_to_calculate":`Introduce el código postal para calcular`,"error_page.error_message_invalid_email_error":`La dirección de correo electrónico {{email}} no se pudo verificar. Por favor, proporciona una dirección de correo electrónico válida.`,"payment_entry_page.button_payment_method":`Pagar {{formattedPrice}} con {{paymentMethod}}`,"payment_entry_page.button_with_price":`Pagar {{formattedPrice}}`,"price_update.title":`Actualización de precio`,"price_update.base_message":`El precio total se actualizó con impuestos según su dirección de facturación. Revise e intente nuevamente. Solo se efectuará un cobro en su tarjeta.`,"price_update.trial_message":`El precio de la suscripción se actualizó para incluir impuestos según su dirección de facturación. La prueba gratuita sigue aplicándose. Revise e intente nuevamente.`,"payment_entry_page.express_checkout_divider":`O PAGA CON TARJETA`,"error_page.trouble_accessing":`Si tiene problemas para acceder a su compra, póngase en contacto con el servicio de asistencia en `,"error_page.close_button_title":`Ir a {{appName}}
40`,"error_page.error_title_stripe_missing_required_permission":`Falta permiso de Stripe`,"error_page.button_close":`Cerrar`,"error_page.error_message_stripe_invalid_tax_origin_address":`La compra falló porque la dirección de origen fiscal no es válida. En producción, las compras funcionarán sin impuestos aplicados.`,"error_page.error_message_stripe_tax_not_active":`La compra falló porque Stripe Tax no está habilitado. En producción, las compras funcionarán sin impuestos aplicados.`,"error_page.error_only_in_sandbox":`Este mensaje aparece solo en el entorno de pruebas.`,"error_page.error_message_stripe_missing_required_permission":`La compra falló porque la aplicación Stripe carece de un permiso necesario. En producción, las compras funcionarán sin impuestos aplicados.`,"error_page.error_title_stripe_tax_not_active":`Stripe Tax no está activo`,"error_page.error_title_stripe_invalid_tax_origin_address":`Dirección de origen fiscal no válida`,"apple_pay.free_trial":`Prueba gratuita`,"product_info.price_after_intro_price":`Después de {{introPriceDuration}}, el {{renewalDate}}`,"product_info.after_trial":`después del perÃodo de prueba`,"product_info.after":`después de`,"product_info.intro_price_phase_after_trial":`Luego, {{introPriceDuration}} por {{introPrice}}`,"product_info.intro_price_phase":`Primero, {{introPriceDuration}} por {{introPrice}}`,"product_info.intro_price_phase_paid_once":`pago único`,"payment_entry_page.trial_subscription_terms_info":`Una vez finalizado el perÃodo de prueba, se te cobrarán {{price}} {{perFrequency}} a partir del {{renewalDate}}. Puedes cancelar en cualquier momento antes de esta fecha.`,"payment_entry_page.subscription_info":`La suscripción se renueva automáticamente. Cancela en cualquier momento.`,"payment_entry_page.otp_terms_info":`Al comprar, aceptas que {{appName}} te cobre de acuerdo con sus términos.`,"payment_entry_page.terms_link_label":`Términos`,"payment_entry_page.subscription_terms_info":`Al suscribirte, aceptas que {{appName}} te cobre de acuerdo con sus términos hasta que canceles.`,"loading_page.keep_page_open":`El proceso está casi terminado. Mantén esta página abierta.`,"loading_page.processing_payment":`Procesando el pago`,"pricing_table.discount":`Descuento`,"pricing_table.subtotal":`Subtotal`,"pricing_dropdown.add_promo_code":`Añadir código promocional`,"discount_input.label":`Código promocional`,"payment_entry_page.checkout_consent_terms_of_service":`términos de servicio`,"payment_entry_page.checkout_consent_agreement":`Acepto los {{termsOfService}} de {{appName}}.`},Ide={"periods.week":`{{amount}} settimana`,"periods.month":`{{amount}} mese`,"periods.year":`{{amount}} anno`,"periods.day":`{{amount}} giorno`,"periods.weekShort":`{{amount}}sett`,"periods.monthShort":`{{amount}}mese`,"periods.yearShort":`{{amount}}anno`,"periods.dayShort":`{{amount}}g`,"periods.lifetime":`a vita`,"periods.weekPlural":`{{amount}} settimane`,"periods.monthPlural":`{{amount}} mesi`,"periods.yearPlural":`{{amount}} anni`,"periods.dayPlural":`{{amount}} giorni`,"periods.weekFrequency":`settimanale`,"periods.monthFrequency":`mensile`,"periods.yearFrequency":`annuale`,"periods.dayFrequency":`giornaliero`,"periods.perWeekFrequency":`a settimana`,"periods.perMonthFrequency":`al mese`,"periods.perYearFrequency":`all'anno`,"periods.perDayFrequency":`al giorno`,"periods.unknownFrequency":`sconosciuto`,"periods.weekFrequencyPlural":`ogni {{amount}} settimane`,"periods.monthFrequencyPlural":`ogni {{amount}} mesi`,"periods.yearFrequencyPlural":`ogni {{amount}} anni`,"periods.dayFrequencyPlural":`ogni {{amount}} giorni`,"product_info.product_title":`{{productTitle}}`,"product_info.product_description":`{{productDescription}}`,"product_info.product_price":`{{productPrice}}`,"product_info.free_trial_duration":`{{trialDuration}} prova gratuita`,"product_info.price_after_free_trial":`Dopo la fine della prova, il {{renewalDate}}`,"product_info.renewal_frequency":`Si rinnova {{frequency}}`,"product_info.continues_until_cancelled":`Continua fino a disdetta`,"product_info.cancel_anytime":`Disdici in qualsiasi momento`,"payment_entry_page.payment_step_title":`Pagamento sicuro tramite RevenueCat`,"payment_entry_page.button_pay":`Paga ora`,"payment_entry_page.button_start_trial":`Inizia la prova`,"success_page.purchase_successful":`Pagamento completato`,"success_page.button_close"
40:`Continua`,"error_page.if_error_persists":`Se l'errore persiste, contatta `,"error_page.error_title_already_subscribed":`Hai già un abbonamento a {{productTitle}}`,"error_page.error_title_already_purchased":`Hai già acquistato {{productTitle}}`,"error_page.error_title_other_errors":`Qualcosa è andato storto`,"error_page.error_message_already_subscribed":`Non puoi abbonarti di nuovo a questo prodotto.`,"error_page.error_message_already_purchased":`Non puoi acquistare di nuovo questo prodotto.`,"error_page.error_message_missing_email_error":`L'email è necessaria per completare l'acquisto.`,"error_page.error_message_network_error":`Errore di rete. Verifica la connessione internet.`,"error_page.error_message_error_charging_payment":`Pagamento fallito.`,"error_page.error_message_error_setting_up_purchase":`Acquisto non avviato a causa di un errore (codice errore: {{errorCode}}).`,"error_page.error_message_invalid_tax_location":`Non siamo riusciti a verificare il tuo indirizzo di fatturazione. Per favore, controlla che il codice postale e il paese siano corretti.`,"error_page.error_message_unknown_error":`Si è verificato un errore sconosciuto (codice errore: {{errorCode}}).`,"error_page.button_try_again":`Riprova`,"paywall_variables.price_per_period":`{{formattedPrice}}/{{period}}`,"paywall_variables.sub_relative_discount":`{{discount}}%`,"paywall_variables.total_price_and_per_month":`{{formattedPrice}}/{{period}}({{formattedPricePerMonth}}/{{monthPeriod}})`,"product_info.total_due_today":`Totale dovuto oggi`,"product_info.subscribe_to":`Abbonati a`,"navbar_header.details":`Dettagli`,"navbar_header.back_button":`Indietro`,"pricing_dropdown.show_details":`Mostra dettagli`,"pricing_dropdown.hide_details":`Nascondi dettagli`,"pricing_table.tax":`Tasse`,"pricing_table.trial_ends":`Al termine del periodo di prova, il {{formattedTrialEndDate}}`,"pricing_table.total_due_today":`Totale dovuto oggi`,"pricing_table.total_excluding_tax":`Totale tasse escluse`,"pricing_table.enter_billing_address_to_calculate":`Inserisci l'indirizzo di fatturazione per calcolare`,"pricing_table.enter_state_or_postal_code_to_calculate":`Inserisci la regione o il codice postale per calcolare`,"pricing_table.enter_postal_code_to_calculate":`Inserisci il codice postale per calcolare`,"error_page.error_message_invalid_email_error":`L'indirizzo email {{email}} non può essere verificato. Si prega di fornire un indirizzo email valido.`,"payment_entry_page.button_payment_method":`Paga {{formattedPrice}} con {{paymentMethod}}`,"payment_entry_page.button_with_price":`Paga {{formattedPrice}}`,"price_update.title":`Aggiornamento prezzo`,"price_update.base_message":`Il prezzo totale è stato aggiornato con le tasse in base al tuo indirizzo di fatturazione. Rivedi e riprova. L'addebito sulla tua carta avverrà solo una volta.`,"price_update.trial_message":`Il prezzo dell'abbonamento è stato aggiornato per includere le tasse in base al tuo indirizzo di fatturazione. La prova gratuita è ancora valida. Controlla e riprova.`,"payment_entry_page.express_checkout_divider":`OPPURE PAGA CON CARTA`,"error_page.trouble_accessing":`Se hai problemi ad accedere al tuo acquisto, contatta l'assistenza all'indirizzo `,"error_page.close_button_title":`Vai a {{appName}}`,"error_page.error_title_stripe_missing_required_permission":`Autorizzazione Stripe mancante`,"error_page.button_close":`Chiudi`,"error_page.error_message_stripe_invalid_tax_origin_address":`L'acquisto non è andato a buon fine perché l'indirizzo di origine fiscale non è valido. In produzione, gli acquisti verranno effettuati senza l'applicazione delle imposte e questo errore non sarà visibile.`,"error_page.error_message_stripe_tax_not_active":`L'acquisto non è andato a buon fine perché Stripe Tax non è abilitato. In produzione, gli acquisti verranno effettuati senza l'applicazione delle imposte e questo errore non sarà visibile.`,"error_page.error_only_in_sandbox":`Questo messaggio viene visualizzato solo in sandbox.`,"error_page.error_message_stripe_missing_required_permission":`L'acquisto non è andato a buon fine perché l'app Stripe non dispone dell'autorizzazione necessaria. In produzione, gli acquisti verranno effettuati senza l'applicazione delle imposte e questo errore non sarà visibile.`,"error_page.error_title_str
40ipe_tax_not_active":`Stripe Tax non attivo`,"error_page.error_title_stripe_invalid_tax_origin_address":`Indirizzo di origine fiscale non valido`,"apple_pay.free_trial":`Prova gratuita`,"product_info.price_after_intro_price":`Dopo {{introPriceDuration}}, il {{renewalDate}}`,"product_info.after_trial":`dopo il periodo di prova`,"product_info.after":`dopo`,"product_info.intro_price_phase_after_trial":`Poi {{introPriceDuration}} a {{introPrice}}`,"product_info.intro_price_phase":`Prima {{introPriceDuration}} a {{introPrice}}`,"product_info.intro_price_phase_paid_once":`pagato una volta`,"payment_entry_page.trial_subscription_terms_info":`Al termine del periodo di prova, ti verranno addebitati {{price}} {{perFrequency}} a partire dal {{renewalDate}}. Puoi annullare in qualsiasi momento prima di questa data.`,"payment_entry_page.subscription_info":`L'abbonamento si rinnova automaticamente. Annulla in qualsiasi momento.`,"payment_entry_page.otp_terms_info":`Acquistando, accetti che {{appName}} ti addebiti l'importo in base ai suoi termini.`,"payment_entry_page.terms_link_label":`Termini`,"payment_entry_page.subscription_terms_info":`Abbonandoti, accetti che {{appName}} ti addebiti l'importo secondo i suoi termini fino all'annullamento.`,"loading_page.keep_page_open":`Il processo è quasi terminato. Mantieni questa pagina aperta.`,"loading_page.processing_payment":`Elaborazione del pagamento`,"pricing_table.discount":`Sconto`,"pricing_table.subtotal":`Subtotale`,"pricing_dropdown.add_promo_code":`Aggiungi codice promozionale`,"discount_input.label":`Codice promozionale`,"payment_entry_page.checkout_consent_terms_of_service":`termini di servizio`,"payment_entry_page.checkout_consent_agreement":`Accetto i {{termsOfService}} di {{appName}}.`},Lde={"periods.week":`{{amount}} Ø£Ø³Ø¨ÙØ¹`,"periods.month":`{{amount}} Ø´ÙØ±`,"periods.year":`{{amount}} Ø³ÙØ©`,"periods.day":`{{amount}} ÙÙÙ
`,"periods.weekShort":`{{amount}}Ø£Ø³Ø¨ÙØ¹`,"periods.monthShort":`{{amount}}Ø´ÙØ±`,"periods.yearShort":`{{amount}}Ø³ÙØ©`,"periods.dayShort":`{{amount}}ÙÙÙ
`,"periods.lifetime":`Ù
Ø¯Ù Ø§ÙØÙØ§Ø©`,"periods.weekPlural":`{{amount}} Ø£Ø³Ø§Ø¨ÙØ¹`,"periods.monthPlural":`{{amount}} Ø£Ø´ÙØ±`,"periods.yearPlural":`{{amount}} سÙÙØ§Øª`,"periods.dayPlural":`{{amount}} Ø£ÙØ§Ù
`,"periods.weekFrequency":`Ø£Ø³Ø¨ÙØ¹ÙÙØ§`,"periods.monthFrequency":`Ø´ÙØ±ÙÙØ§`,"periods.yearFrequency":`سÙÙÙÙØ§`,"periods.dayFrequency":`ÙÙÙ
ÙÙØ§`,"periods.perWeekFrequency":`ÙÙ Ø§ÙØ£Ø³Ø¨Ùع`,"periods.perMonthFrequency":`ÙÙ Ø§ÙØ´Ùر`,"periods.perYearFrequency":`ÙÙ Ø§ÙØ³ÙØ©`,"periods.perDayFrequency":`Ù٠اÙÙÙÙ
`,"periods.unknownFrequency":`ØºÙØ± Ù
عرÙÙ`,"periods.weekFrequencyPlural":`ÙÙ {{amount}} Ø£Ø³Ø§Ø¨ÙØ¹`,"periods.monthFrequencyPlural":`ÙÙ {{amount}} Ø£Ø´ÙØ±`,"periods.yearFrequencyPlural":`ÙÙ {{amount}} سÙÙØ§Øª`,"periods.dayFrequencyPlural":`ÙÙ {{amount}} Ø£ÙØ§Ù
`,"product_info.product_title":`{{productTitle}}`,"product_info.product_description":`{{productDescription}}`,"product_info.product_price":`{{productPrice}}`,"product_info.free_trial_duration":`{{trialDuration}} تجربة Ù
جاÙÙØ©`,"product_info.price_after_free_trial":`بعد Ø§ÙØªÙاء Ø§ÙØªØ¬Ø±Ø¨Ø©Ø ÙÙ {{renewalDate}}`,"product_info.renewal_frequency":`ÙØªÙ
Ø§ÙØªØ¬Ø¯Ùد {{frequency}}`,"product_info.continues_until_cancelled":`ÙØ³ØªÙ
ر ØØªÙ ÙØªÙ
Ø¥ÙØºØ§Ø¤Ù`,"product_info.cancel_anytime":`ÙÙ
ÙÙ Ø§ÙØ¥Ùغاء Ù٠أ٠ÙÙØª`,"payment_entry_page.payment_step_title":`Ø§ÙØ¯Ùع Ø§ÙØ¢Ù
٠عبر RevenueCat`,"payment_entry_page.button_pay":`Ø§Ø¯ÙØ¹ Ø§ÙØ¢Ù`,"payment_entry_page.button_start_trial":`ابدأ Ø§ÙØªØ¬Ø±Ø¨Ø©`,"success_page.purchase_successful":`تÙ
Ø§ÙØ¯Ùع Ø¨ÙØ¬Ø§Ø`,"success_page.button_close":`Ù
تابعة`,"error_page.if_error_persists":`إذا استÙ
رت اÙÙ
Ø´ÙÙØ©Ø ÙØ±Ø¬Ù Ø§ÙØ§ØªØµØ§Ù ب٠`,"error_page.error_title_already_subscribed":`Ø£ÙØª Ù
شتر٠باÙÙØ¹Ù ÙÙ {{productTitle}}`,"error_page.error_title_already_purchased":`ÙÙØ¯ Ø§Ø´ØªØ±ÙØª {{productTitle}} باÙÙØ¹Ù`,"error_page.error_title_other_errors":`ØØ¯Ø« خطأ Ù
ا`,"error_page.error_message_already_subscribed":`ÙØ§ ÙÙ
ÙÙÙ Ø§ÙØ§Ø´ØªØ±Ø§Ù ÙÙ ÙØ°Ø§ اÙÙ
ÙØªØ¬ Ù
رة أخرÙ.`,"error_page.error_message_already_purchased":`ÙØ§ ÙÙ
ÙÙ٠شراء ÙØ°Ø§ اÙÙ
ÙØªØ¬ Ù
رة أخرÙ.`,"error_page.error_message_missing_email_error":`ÙÙØ·Ùب Ø§ÙØ¨Ø±Ùد Ø§ÙØ¥ÙÙØªØ±ÙÙÙ ÙØ¥ØªÙ
اÙ
عÙ
ÙÙØ© Ø§ÙØ´Ø±Ø§Ø¡.`,"error_page.error_message_network_error":`خطأ ÙÙ Ø§ÙØ´Ø¨ÙØ©. ÙØ±Ø¬Ù Ø§ÙØªØÙÙ Ù
Ù Ø§ØªØµØ§Ù Ø§ÙØ¥ÙØªØ±ÙØª.`,"error_page.error_message_error_charging_payment":`ÙØ´Ù Ø§ÙØ¯Ùع.`,"error_page.error_message_error_setting_up_purchase":`ÙÙ
تبدأ عÙ
ÙÙØ© Ø§ÙØ´Ø±Ø§Ø¡ بسبب خطأ (رÙ
ز Ø§ÙØ®Ø·Ø£: {{errorCode}}).`,"error_page.error_message_invalid_tax_location":`ÙÙ
ÙØªÙ
ÙÙ Ù
Ù Ø§ÙØªØÙÙ Ù
٠عÙÙØ§Ù اÙÙÙØªØ±Ø© Ø§ÙØ®Ø§Øµ بÙ. ÙØ±Ø¬Ù Ø§ÙØªØÙÙ Ù
رة أخر٠Ù
Ù Ø§ÙØ±Ù
ز Ø§ÙØ¨Ø±ÙØ¯Ù ÙØ§ÙØ¨ÙØ¯ ÙÙØªØ£Ùد Ù
Ù ØµØØªÙÙ
ا.`,"error_page.error_message_unknown_error":`ØØ¯Ø« خطأ ØºÙØ± Ù
عرÙÙ (رÙ
ز Ø§ÙØ®Ø·Ø£: {{errorCode}}).`,"error_page.button_try_again":`ØØ§ÙÙ Ù
رة أخرÙ`,"paywall_variables.price_per_period":`{{formattedPrice}}/{{period}}`,"paywall_variables.sub_relative_discount":`{{discount}}%`,"paywall_variables.total_price_and_per_month":`{{formattedPrice}}/{{period}}({{formattedPricePerMonth}}/{{monthPeriod}})`,"product_info.total_due_today":`إجÙ
اÙ٠اÙÙ
Ø¨ÙØº اÙÙ
ستØÙ اÙÙÙÙ
`,"product_info.subscribe_to":`اشتر٠ÙÙ`,"navbar_header.details":`ØªÙØ§ØµÙÙ`,"navbar_header.back_button":`Ø¹ÙØ¯Ø©`,"pricing_dropdown.show_details":`Ø¥Ø¸ÙØ§Ø± Ø§ÙØªÙاصÙÙ`,"pricing_dropdown.hide_details":`Ø¥Ø®ÙØ§Ø¡ Ø§ÙØªÙاصÙÙ`,"pricing_table.tax":`Ø§ÙØ¶Ø±Ùبة`,"pricing_table.trial_ends":`بعد Ø§ÙØªÙاء اÙÙØªØ±Ø© Ø§ÙØªØ¬Ø±ÙØ¨ÙØ©Ø ÙÙ {{formattedTrialEndDate}}`,"pricing_table.total_due_today":`Ø§ÙØ¥Ø¬Ù
اÙ٠اÙÙ
ستØÙ اÙÙÙÙ
`,"pricing_table.total_excluding_tax":`Ø§ÙØ¥Ø¬Ù
اÙÙ Ø¨Ø§Ø³ØªØ«ÙØ§Ø¡ Ø§ÙØ¶Ø±Ùبة`,"pricing_table.enter_billing_address_to_calculate":`أدخ٠عÙÙØ§Ù إرسا٠اÙÙÙØ§ØªÙر ÙØØ³Ø§Ø¨ÙØ§`,"pricing_table.enter_state_or_postal_code_to_calculate":`أدخ٠اÙÙÙØ§ÙØ© Ø£Ù Ø§ÙØ±Ù
ز Ø§ÙØ¨Ø±Ùد٠ÙÙØØ³Ø§Ø¨`,"pricing_table.enter_postal_code_to_calculate":`Ø£Ø¯Ø®Ù Ø§ÙØ±Ù
ز Ø§ÙØ¨Ø±Ùد٠ÙÙØØ³Ø§Ø¨`,"error_page.error_message_invalid_email_error":`تعذر Ø§ÙØªØÙÙ Ù
٠عÙÙØ§Ù Ø§ÙØ¨Ø±Ùد Ø§ÙØ¥ÙÙØªØ±ÙÙÙ {{email}}. ÙØ±Ø¬Ù ØªÙØ¯ÙÙ
عÙÙØ§Ù Ø¨Ø±ÙØ¯ Ø¥ÙÙØªØ±ÙÙÙ ØµØ§ÙØ.`,"payment_entry_page.button_payment_method":`Ø§Ø¯ÙØ¹ {{formattedPrice}} باستخداÙ
{{paymentMethod}}`,"payment_entry_page.button_with_price":`Ø§Ø¯ÙØ¹ {{formattedPrice}}`,"price_update.title":`ØªØØ¯ÙØ« Ø§ÙØ³Ø¹Ø±`,"price_update.base_message":`تÙ
ØªØØ¯ÙØ« Ø§ÙØ³Ø¹Ø± Ø§ÙØ¥Ø¬Ù
اÙÙ Ù
ع Ø§ÙØ¶Ø±Ùبة Ø¨ÙØ§Ø¡Ù عÙ٠عÙÙØ§Ù إرسا٠اÙÙÙØ§ØªÙر Ø§ÙØ®Ø§Øµ بÙ. ÙØ±Ø¬Ù اÙÙ
راجعة ÙØ§ÙÙ
ØØ§ÙÙØ© Ù
رة أخرÙ. ÙÙ ÙØªÙ
ØªØØµÙ٠رسÙÙ
Ù
Ù Ø¨Ø·Ø§ÙØªÙ Ø¥ÙØ§ Ù
رة ÙØ§ØØ¯Ø©.`,"price_update.trial_message":`تÙ
ØªØØ¯ÙØ« سعر Ø§ÙØ§Ø´ØªØ±Ø§Ù ÙÙØ´Ù
Ù Ø§ÙØ¶Ø±Ø§Ø¦Ø¨ Ø¨ÙØ§Ø¡Ù عÙ٠عÙÙØ§Ù اÙÙÙØªØ±Ø© Ø§ÙØ®Ø§Øµ بÙ. ÙØªØ±Ø© Ø§ÙØªØ¬Ø±Ø¨Ø© اÙÙ
جاÙÙØ© ÙØ§ ØªØ²Ø§Ù Ø³Ø§Ø±ÙØ©. ÙØ±Ø¬Ù Ø§ÙØªØÙÙ ÙØ§ÙÙ
ØØ§ÙÙØ© Ù
رة أخرÙ.`,"payment_entry_page.express_checkout_divider":`Ø£Ù Ø§Ø¯ÙØ¹ Ø¨ÙØ§Ø³Ø·Ø© Ø§ÙØ¨Ø·Ø§ÙØ©`,"error_page.trouble_accessing":`إذا ÙÙØª ØªÙØ§Ø¬Ù Ù
Ø´ÙÙØ© Ù٠اÙÙØµÙ٠إÙ٠عÙ
ÙÙØ© Ø§ÙØ´Ø±Ø§Ø¡Ø ÙØªÙاص٠Ù
ع Ø§ÙØ¯Ø¹Ù
عÙÙ `,"error_page.close_button_title":`Ø§Ø°ÙØ¨ Ø¥ÙÙ {{appName}}
40`,"error_page.error_title_stripe_missing_required_permission":`إذ٠Stripe Ù
ÙÙÙØ¯`,"error_page.button_close":`Ø¥ØºÙØ§Ù`,"error_page.error_message_stripe_invalid_tax_origin_address":`ÙØ´Ùت عÙ
ÙÙØ© Ø§ÙØ´Ø±Ø§Ø¡ ÙØ£Ù عÙÙØ§Ù اÙÙ
ÙØ´Ø£ Ø§ÙØ¶Ø±ÙØ¨Ù ØºÙØ± ØµØ§ÙØ. ÙÙ Ù
رØÙØ© Ø§ÙØ¥ÙØªØ§Ø¬Ø Ø³ØªØ¹Ù
٠عÙ
ÙÙØ§Øª Ø§ÙØ´Ø±Ø§Ø¡ بدÙ٠تطبÙÙ Ø§ÙØ¶Ø±Ø§Ø¦Ø¨.`,"error_page.error_message_stripe_tax_not_active":`ÙØ´Ùت عÙ
ÙÙØ© Ø§ÙØ´Ø±Ø§Ø¡ ÙØ£Ù Ø¶Ø±ÙØ¨Ø© Stripe ØºÙØ± Ù
ÙØ¹ÙØ©. ÙÙ Ù
رØÙØ© Ø§ÙØ¥ÙØªØ§Ø¬Ø Ø³ØªØ¹Ù
٠عÙ
ÙÙØ§Øª Ø§ÙØ´Ø±Ø§Ø¡ بدÙ٠تطبÙÙ Ø§ÙØ¶Ø±Ø§Ø¦Ø¨.`,"error_page.error_only_in_sandbox":`ØªØ¸ÙØ± ÙØ°Ù Ø§ÙØ±Ø³Ø§ÙØ© ÙÙØ· ÙÙ Ø§ÙØ¨Ùئة Ø§ÙØªØ¬Ø±ÙØ¨ÙØ©.`,"error_page.error_message_stripe_missing_required_permission":`ÙØ´Ùت عÙ
ÙÙØ© Ø§ÙØ´Ø±Ø§Ø¡ ÙØ£Ù تطبÙÙ Stripe ÙÙØªÙر Ø¥Ù٠إذ٠Ù
Ø·ÙÙØ¨. ÙÙ Ù
رØÙØ© Ø§ÙØ¥ÙØªØ§Ø¬Ø Ø³ØªØ¹Ù
٠عÙ
ÙÙØ§Øª Ø§ÙØ´Ø±Ø§Ø¡ بدÙ٠تطبÙÙ Ø§ÙØ¶Ø±Ø§Ø¦Ø¨.`,"error_page.error_title_stripe_tax_not_active":`Ø¶Ø±ÙØ¨Ø© Stripe ØºÙØ± ÙØ´Ø·Ø©`,"error_page.error_title_stripe_invalid_tax_origin_address":`عÙÙØ§Ù Ù
ÙØ´Ø£ Ø¶Ø±ÙØ¨Ù ØºÙØ± ØµØ§ÙØ`,"apple_pay.free_trial":`تجربة Ù
جاÙÙØ©`,"product_info.price_after_intro_price":`بعد {{introPriceDuration}}Ø ÙÙ {{renewalDate}}`,"product_info.after_trial":`بعد اÙÙØªØ±Ø© Ø§ÙØªØ¬Ø±ÙØ¨ÙØ©`,"product_info.after":`بعد`,"product_info.intro_price_phase_after_trial":`Ø«Ù
{{introPriceDuration}} Ù
ÙØ§Ø¨Ù {{introPrice}}`,"product_info.intro_price_phase":`Ø£ÙÙØ§Ù {{introPriceDuration}} Ù
ÙØ§Ø¨Ù {{introPrice}}`,"product_info.intro_price_phase_paid_once":`ØªØ¯ÙØ¹ Ù
رة ÙØ§ØØ¯Ø©`,"payment_entry_page.trial_subscription_terms_info":`بعد Ø§ÙØªÙاء اÙÙØªØ±Ø© Ø§ÙØªØ¬Ø±ÙØ¨ÙØ©Ø Ø³ÙØªÙ
Ù
ØØ§Ø³Ø¨ØªÙ بÙ
Ø¨ÙØº {{price}} {{perFrequency}} Ø¨Ø¯Ø¡ÙØ§ Ù
Ù {{renewalDate}}. ÙÙ
ÙÙÙ Ø§ÙØ¥Ùغاء Ù٠أ٠ÙÙØª ÙØ¨Ù ÙØ°Ø§ Ø§ÙØªØ§Ø±ÙØ®.`,"payment_entry_page.subscription_info":`ÙØªÙ
ØªØ¬Ø¯ÙØ¯ Ø§ÙØ§Ø´ØªØ±Ø§Ù تÙÙØ§Ø¦ÙÙØ§. ÙÙ
ÙÙÙ Ø§ÙØ¥Ùغاء Ù٠أ٠ÙÙØª.`,"payment_entry_page.otp_terms_info":`Ø¨Ø§ÙØ´Ø±Ø§Ø¡Ø Ø£ÙØª ØªÙØ§Ù٠عÙÙ Ø§ÙØ³Ù
Ø§Ø ÙØªØ·Ø¨ÙÙ {{appName}} Ø¨ØªØØµÙÙ Ø§ÙØ±Ø³ÙÙ
Ù
ÙÙ ÙÙÙÙØ§ ÙØ´Ø±ÙØ·Ù.`,"payment_entry_page.terms_link_label":`Ø§ÙØ´Ø±ÙØ·`,"payment_entry_page.subscription_terms_info":`Ø¨Ø§ÙØ§Ø´ØªØ±Ø§ÙØ ÙØ¥ÙÙ ØªÙØ§Ù٠عÙÙ Ø§ÙØ³Ù
Ø§Ø ÙÙ {{appName}} Ø¨ØªØØµÙ٠رسÙÙ
Ù
ÙÙ ÙÙÙÙØ§ ÙØ´Ø±ÙØ·ÙØ§ ØØªÙ تÙÙÙ
Ø¨Ø§ÙØ¥Ùغاء.`,"loading_page.keep_page_open":`Ø§ÙØ¹Ù
ÙÙØ© Ø´Ø§Ø±ÙØª عÙÙ Ø§ÙØ§ÙØªÙØ§Ø¡. أبÙÙ ÙØ°Ù Ø§ÙØµÙØØ© Ù
ÙØªÙØØ©.`,"loading_page.processing_payment":`جار٠Ù
Ø¹Ø§ÙØ¬Ø© Ø§ÙØ¯Ùع`,"pricing_table.discount":`خصÙ
`,"pricing_table.subtotal":`اÙÙ
جÙ
ÙØ¹ اÙÙØ±Ø¹Ù`,"pricing_dropdown.add_promo_code":`أض٠رÙ
Ø²ÙØ§ ترÙÙØ¬ÙÙØ§`,"discount_input.label":`رÙ
ز ترÙÙØ¬Ù`,"payment_entry_page.checkout_consent_terms_of_service":`Ø´Ø±ÙØ· Ø§ÙØ®Ø¯Ù
Ø©`,"payment_entry_page.checkout_consent_agreement":`Ø£ÙØ§Ù٠عÙÙ {{termsOfService}} ÙÙ {{appName}}.`},Rde={"periods.week":`{{amount}} setmana`,"periods.month":`{{amount}} mes`,"periods.year":`{{amount}} any`,"periods.day":`{{amount}} dia`,"periods.weekShort":`{{amount}}set`,"periods.monthShort":`{{amount}}mes`,"periods.yearShort":`{{amount}}any`,"periods.dayShort":`{{amount}}d`,"periods.lifetime":`de per vida`,"periods.weekPlural":`{{amount}} setmanes`,"periods.monthPlural":`{{amount}} mesos`,"periods.yearPlural":`{{amount}} anys`,"periods.dayPlural":`{{amount}} dies`,"periods.weekFrequency":`setmanal`,"periods.monthFrequency":`mensual`,"periods.yearFrequency":`anual`,"periods.dayFrequency":`diari`,"periods.perWeekFrequency":`per setmana`,"periods.perMonthFrequency":`per mes`,"periods.perYearFrequency":`per any`,"periods.perDayFrequency":`per dia`,"periods.unknownFrequency":`desconeguda`,"periods.weekFrequencyPlural":`cada {{amount}} setmanes`,"periods.monthFrequencyPlural":`cada {{amount}} mesos`,"periods.yearFrequencyPlural":`cada {{amount}} anys`,"periods.dayFrequencyPlural":`cada {{amount}} dies`,"product_info.product_title":`{{productTitle}}`,"product_info.product_description":`{{productDescription}}`,"product_info.product_price":`{{productPrice}}`,"product_info.free_trial_duration":`{{trialDuration}} de prova gratuïta`,"product_info.price_after_free_trial":`Després del perÃode de prova, el {{renewalDate}}`,"product_info.renewal_frequency":`Es renova {{frequency}}`,"product_info.continues_until_cancelled":`Continua fins que es cancel·li`,"product_info.cancel_anytime":`Cancel·la en qualsevol moment`,"payment_entry_page.payment_step_title":`Pagament segur amb RevenueCat`,"payment_entry_page.button_pay":`Paga ara`,"payment_entry_page.button_start_trial":`Comença la prova`,"success_page.purchase_successful":`Pagament complet`,"success_page.button_close"
40:`Continua`,"error_page.if_error_persists":`Si l'error persisteix, contacta amb `,"error_page.error_title_already_subscribed":`Ja us heu subscrit a {{productTitle}}`,"error_page.error_title_already_purchased":`Ja heu comprat {{productTitle}}`,"error_page.error_title_other_errors":`Alguna cosa ha anat malament`,"error_page.error_message_already_subscribed":`No us podeu subscriure a aquest producte de nou.`,"error_page.error_message_already_purchased":`No podeu comprar aquest producte de nou.`,"error_page.error_message_missing_email_error":`Es necessita un correu electrònic per completar la compra.`,"error_page.error_message_network_error":`Error de xarxa. Comprova la teva connexió a internet.`,"error_page.error_message_error_charging_payment":`El pagament ha fallat.`,"error_page.error_message_error_setting_up_purchase":`No s'ha iniciat la compra a causa d'un error (codi d'error: {{errorCode}}).`,"error_page.error_message_invalid_tax_location":`No hem pogut verificar la vostra adreça de facturació. Si us plau, verifiqueu de nou el codi postal i el paÃs per assegurar-vos que són correctes.`,"error_page.error_message_unknown_error":`S'ha produït un error desconegut (codi d'error: {{errorCode}}).`,"error_page.button_try_again":`Torna a intentar-ho`,"paywall_variables.price_per_period":`{{formattedPrice}}/{{period}}`,"paywall_variables.sub_relative_discount":`{{discount}}%`,"paywall_variables.total_price_and_per_month":`{{formattedPrice}}/{{period}}({{formattedPricePerMonth}}/{{monthPeriod}})`,"product_info.total_due_today":`Total a pagar avui`,"product_info.subscribe_to":`Subscriu-te a`,"navbar_header.details":`Detalls`,"navbar_header.back_button":`Enrere`,"pricing_dropdown.show_details":`Mostra detalls`,"pricing_dropdown.hide_details":`Amaga detalls`,"pricing_table.tax":`Impostos`,"pricing_table.trial_ends":`Després que finalitzi la prova, el {{formattedTrialEndDate}}`,"pricing_table.total_due_today":`Total a pagar avui`,"pricing_table.total_excluding_tax":`Total sense impostos`,"pricing_table.enter_billing_address_to_calculate":`Introduïu l'adreça de facturació per calcular`,"pricing_table.enter_state_or_postal_code_to_calculate":`Introduïu la provÃncia o el codi postal per calcular`,"pricing_table.enter_postal_code_to_calculate":`Introduïu el codi postal per calcular`,"error_page.error_message_invalid_email_error":`No s'ha pogut verificar l'adreça de correu electrònic {{email}}. Si us plau, proporcioneu una adreça de correu electrònic và lida.`,"payment_entry_page.button_payment_method":`Paga {{formattedPrice}} amb {{paymentMethod}}`,"payment_entry_page.button_with_price":`Paga {{formattedPrice}}`,"price_update.title":`Actualització de preu`,"price_update.base_message":`El preu total s'ha actualitzat amb els impostos segons la vostra adreça de facturació. Reviseu-ho i torneu-ho a provar. Només es carregarà la vostra targeta una vegada.`,"price_update.trial_message":`El preu de la subscripció s'ha actualitzat per incloure els impostos segons la seva adreça de facturació. El perÃode de prova gratuït segueix vigent. Si us plau, comprovi-ho i torni-ho a provar.`,"payment_entry_page.express_checkout_divider":`O PAGUEU AMB TARGETA`,"error_page.trouble_accessing":`Si teniu problemes per accedir a la vostra compra, poseu-vos en contacte amb el servei d'assistència a `,"error_page.close_button_title":`Vés a {{appName}}`,"error_page.error_title_stripe_missing_required_permission":`Falta el permÃs de Stripe`,"error_page.button_close":`Tanca`,"error_page.error_message_stripe_invalid_tax_origin_address":`La compra ha fallat perquè l'adreça d'origen fiscal no és và lida. En producció, les compres funcionaran sense impostos aplicats.`,"error_page.error_message_stripe_tax_not_active":`La compra ha fallat perquè Str
40ipe Tax no està activat. En producció, les compres funcionaran sense impostos aplicats.`,"error_page.error_only_in_sandbox":`Aquest missatge apareix només a l'entorn de proves.`,"error_page.error_message_stripe_missing_required_permission":`La compra ha fallat perquè l'aplicació Stripe no té un permÃs necessari. En producció, les compres funcionaran sense impostos aplicats.`,"error_page.error_title_stripe_tax_not_active":`Stripe Tax no està actiu`,"error_page.error_title_stripe_invalid_tax_origin_address":`Adreça d'origen fiscal no và lida`,"apple_pay.free_trial":`Prova gratuïta`,"product_info.price_after_intro_price":`Després de {{introPriceDuration}}, el {{renewalDate}}`,"product_info.after_trial":`després del perÃode de prova`,"product_info.after":`després de`,"product_info.intro_price_phase_after_trial":`Després {{introPriceDuration}} per {{introPrice}}`,"product_info.intro_price_phase":`Primer {{introPriceDuration}} per {{introPrice}}`,"product_info.intro_price_phase_paid_once":`pagat un cop`,"payment_entry_page.trial_subscription_terms_info":`Un cop finalitzat el perÃode de prova, se us cobrarà {{price}} {{perFrequency}} a partir del {{renewalDate}}. Podeu cancel·lar-ho en qualsevol moment abans d'aquesta data.`,"payment_entry_page.subscription_info":`La subscripció es renova automà ticament. Cancel·leu-la quan vulgueu.`,"payment_entry_page.otp_terms_info":`En comprar, accepteu que {{appName}} us cobri d'acord amb les seves condicions.`,"payment_entry_page.terms_link_label":`Condicions`,"payment_entry_page.subscription_terms_info":`En subscriure-us, accepteu que {{appName}} us cobri d'acord amb les seves condicions fins que ho cancel·leu.`,"loading_page.keep_page_open":`El procés està gairebé acabat. Mantingueu aquesta pà gina oberta.`,"loading_page.processing_payment":`S'està processant el pagament`,"pricing_table.discount":`Descompte`,"pricing_table.subtotal":`Subtotal`,"pricing_dropdown.add_promo_code":`Afegir codi promocional`,"discount_input.label":`Codi promocional`,"payment_entry_page.checkout_consent_terms_of_service":`termes del servei`,"payment_entry_page.checkout_consent_agreement":`Accepto els {{termsOfService}} de {{appName}}.`},zde={"periods.week":`{{amount}} å¨`,"periods.month":`{{amount}} æ`,"periods.year":`{{amount}} å¹´`,"periods.day":`{{amount}} 天`,"periods.weekShort":`{{amount}}å¨`,"periods.monthShort":`{{amount}}æ`,"periods.yearShort":`{{amount}}å¹´`,"periods.dayShort":`{{amount}}天`,"periods.lifetime":`ç»èº«`,"periods.weekPlural":`{{amount}} å¨`,"periods.monthPlural":`{{amount}} 个æ`,"periods.yearPlural":`{{amount}} å¹´`,"periods.dayPlural":`{{amount}} 天`,"periods.weekFrequency":`æ¯å¨`,"periods.monthFrequency":`æ¯æ`,"periods.yearFrequency":`æ¯å¹´`,"periods.dayFrequency":`æ¯å¤©`,"periods.perWeekFrequency":`æ¯å¨`,"periods.perMonthFrequency":`æ¯æ`,"periods.perYearFrequency":`æ¯å¹´`,"periods.perDayFrequency":`æ¯å¤©`,"periods.unknownFrequency":`æªç¥`,"periods.weekFrequencyPlural":`æ¯ {{amount}} å¨`,"periods.monthFrequencyPlural":`æ¯ {{amount}} 个æ`,"periods.yearFrequencyPlural":`æ¯ {{amount}} å¹´`,"periods.dayFrequencyPlural":`æ¯ {{amount}} 天`,"product_info.product_title":`{{productTitle}}`,"product_info.product_description":`{{productDescription}}`,"product_info.product_price":`{{productPrice}}`,"product_info.free_trial_duration":`{{trialDuration}} 天å
è´¹è¯ç¨`,"product_info.price_after_free_trial":`è¯ç¨æç»æåï¼äº {{renewalDate}}`,"product_info.renewal_frequency":`ç»è®¢ {{frequency}}`,"product_info.continues_until_cancelled":`æç»å°åæ¶`,"product_info.cancel_anytime":`éæ¶åæ¶`,"payment_entry_page.payment_step_title":`RevenueCat å®å
¨ç»è´¦`,"payment_entry_page.button_pay":`ç«å³æ¯ä»`,"payment_entry_page.button_start_trial":`å¼å§è¯ç¨`,"success_page.purchase_successful":`æ¯ä»å®æ`,"success_page.button_close":`ç»§ç»`,"error_page.if_error_persists":`妿é误ä»ç¶åå¨ï¼è¯·èç³» `,"error_page.error_title_already_subscribed":`æ¨å·²è®¢é
{{productTitle}}`,"error_page.error_title_already_purchased":`æ¨å·²è´ä¹° {{productTitle}}`,"error_page.error_title_other_errors":`åºç°é误`,"error_page.error_message_already_subscribed":`æ¨ä¸è½å次订é
æ¤äº§åã`,"error_page.error_message_already_purchased":`æ¨ä¸è½å次è´ä¹°æ¤äº§åã`,"error_page.error_message_missing_email_error":`宿è´ä¹°éè¦é®ç®±å°åã`,"error_page.error_message_network_error":`ç½ç»é误ãè¯·æ£æ¥æ¨çäºèç½è¿æ¥ã`,"error_page.error_message_error_charging_payment":`æ¯ä»å¤±è´¥ã`,"error_page.error_message_error_setting_up_purchase":`ç±äºé误ï¼
40è´ä¹°æªå¯å¨ï¼é误代ç ï¼{{errorCode}}ï¼ã`,"error_page.error_message_invalid_tax_location":`æä»¬æ æ³éªè¯æ¨çè´¦åå°åã请ä»ç»æ£æ¥é®æ¿ç¼ç åå½å®¶æ¯å¦æ£ç¡®ã`,"error_page.error_message_unknown_error":`åçæªç¥é误ï¼é误代ç ï¼{{errorCode}}ï¼ã`,"error_page.button_try_again":`éè¯`,"paywall_variables.price_per_period":`{{formattedPrice}}/{{period}}`,"paywall_variables.sub_relative_discount":`{{discount}}%`,"paywall_variables.total_price_and_per_month":`{{formattedPrice}}/{{period}}({{formattedPricePerMonth}}/{{monthPeriod}})`,"product_info.total_due_today":`ä»å¤©åºä»æ»é¢`,"product_info.subscribe_to":`订é
`,"navbar_header.details":`详æ
`,"navbar_header.back_button":`è¿å`,"pricing_dropdown.show_details":`æ¾ç¤ºè¯¦æ
`,"pricing_dropdown.hide_details":`éè详æ
`,"pricing_table.tax":`ç¨`,"pricing_table.trial_ends":`è¯ç¨æç»æåï¼äº{{formattedTrialEndDate}}`,"pricing_table.total_due_today":`仿¥åºä»æ»é¢`,"pricing_table.total_excluding_tax":`æ»è®¡ï¼ä¸å«ç¨ï¼`,"pricing_table.enter_billing_address_to_calculate":`è¾å
¥è´¦åå°å以计ç®`,"pricing_table.enter_state_or_postal_code_to_calculate":`è¾å
¥å·æé®æ¿ç¼ç 以计ç®`,"pricing_table.enter_postal_code_to_calculate":`è¾å
¥é®æ¿ç¼ç 以计ç®`,"error_page.error_message_invalid_email_error":`æ æ³éªè¯çµåé®ä»¶å°å{{email}}ã请æä¾ææççµåé®ä»¶å°åã`,"payment_entry_page.button_payment_method":`使ç¨{{paymentMethod}}æ¯ä»{{formattedPrice}}`,"payment_entry_page.button_with_price":`æ¯ä»{{formattedPrice}}`,"price_update.title":`ä»·æ ¼æ´æ°`,"price_update.base_message":`æ»ä»·å·²æ ¹æ®æ¨çè´¦åå°åæ´æ°äºç¨è´¹ã请æ¥çå¹¶éè¯ãæ¨çé¶è¡å¡åªä¼æ£æ¬¾ä¸æ¬¡ã`,"price_update.trial_message":`æ ¹æ®æ¨çè´¦åå°åï¼è®¢é
ä»·æ ¼å·²æ´æ°ä¸ºå«ç¨ä»·æ ¼ãå
è´¹è¯ç¨ä»ç¶ææã请æ¥çå¹¶éè¯ã`,"payment_entry_page.express_checkout_divider":`æä½¿ç¨é¶è¡å¡æ¯ä»`,"error_page.trouble_accessing":`妿æ¨å¨è®¿é®è´ä¹°é¡¹ç®æ¶éå°é®é¢ï¼è¯·éè¿ä»¥ä¸æ¹å¼èç³»æ¯æï¼`,"error_page.close_button_title":`åå¾{{appName}}`,"error_page.error_title_stripe_missing_required_permission":`缺å°Stripeæé`,"error_page.button_close":`å
³é`,"error_page.error_message_stripe_invalid_tax_origin_address":`è´ä¹°å¤±è´¥ï¼å 为ç¨å¡èµ·å§å°åæ æãå¨ç产ç¯å¢ä¸ï¼è´ä¹°å°å¨ä¸åºç¨ç¨æ¬¾çæ
åµä¸è¿è¡ã`,"error_page.error_message_stripe_tax_not_active":`è´ä¹°å¤±è´¥ï¼å 为Stripe Taxæªå¯ç¨ãå¨ç产ç¯å¢ä¸ï¼è´ä¹°å°å¨ä¸åºç¨ç¨æ¬¾çæ
åµä¸è¿è¡ã`,"error_page.error_only_in_sandbox":`æ¤æ¶æ¯ä»
卿²ç䏿¾ç¤ºã`,"error_page.error_message_stripe_missing_required_permission":`è´ä¹°å¤±è´¥ï¼å 为Stripeåºç¨ç¨åºç¼ºå°å¿
éçæéãå¨ç产ç¯å¢ä¸ï¼è´ä¹°å°å¨ä¸åºç¨ç¨æ¬¾çæ
åµä¸è¿è¡ã`,"error_page.error_title_stripe_tax_not_active":`Stripe Taxæªæ¿æ´»`,"error_page.error_title_stripe_invalid_tax_origin_address":`ç¨å¡èµ·å§å°åæ æ`,"apple_pay.free_trial":`å
è´¹è¯ç¨`,"product_info.price_after_intro_price":`å¨{{introPriceDuration}}ä¹åï¼äº{{renewalDate}}å¼å§`,"product_info.after_trial":`è¯ç¨å`,"product_info.after":`ä¹å`,"product_info.intro_price_phase_after_trial":`ç¶å{{introPriceDuration}}ï¼ä»·æ ¼ä¸º{{introPrice}}`,"product_info.intro_price_phase":`é¦å
{{introPriceDuration}}ï¼ä»·æ ¼ä¸º{{introPrice}}`,"product_info.intro_price_phase_paid_once":`䏿¬¡æ§æ¯ä»`,"payment_entry_page.trial_subscription_terms_info":`è¯ç¨æç»æåï¼æ¨å°è¢«æ¶å {{price}} {{perFrequency}}ï¼ä» {{renewalDate}} å¼å§ãæ¨å¯ä»¥å¨æ¤æ¥æä¹åç任使¶é´åæ¶ã`,"payment_entry_page.subscription_info":`订é
èªå¨ç»è®¢ãéæ¶åæ¶ã`,"payment_entry_page.otp_terms_info":`è´ä¹°å³è¡¨ç¤ºæ¨åæå
许{{appName}}æ ¹æ®å
¶æ¡æ¬¾åæ¨æ¶è´¹ã`,"payment_entry_page.terms_link_label":`æ¡æ¬¾`,"payment_entry_page.subscription_terms_info":`订é
å³è¡¨ç¤ºæ¨åæå
许 {{appName}} æç
§å
¶æ¡æ¬¾åæ¨æ¶è´¹ï¼ç´å°æ¨åæ¶è®¢é
ã`,"loading_page.keep_page_open":`æµç¨å³å°å®æãè¯·ä¿ææ¤é¡µé¢æå¼ã`,"loading_page.processing_payment":`æ£å¨å¤ç仿¬¾`,"pricing_table.discount":`ææ£`,"pricing_table.subtotal":`å°è®¡`,"pricing_dropdown.add_promo_code":`æ·»å 伿 ç `,"discount_input.label":`伿 ç `,"payment_entry_page.checkout_consent_terms_of_service":`æå¡æ¡æ¬¾`,"payment_entry_page.checkout_consent_agreement":`æåæ{{appName}}ç{{termsOfService}}ã`},Bde={"periods.week":`{{amount}} é±`,"periods.month":`{{amount}} åæ`,"periods.year":`{{amount}} å¹´`,"periods.day":`{{amount}}
40 天`,"periods.weekShort":`{{amount}}é±`,"periods.monthShort":`{{amount}}æ`,"periods.yearShort":`{{amount}}å¹´`,"periods.dayShort":`{{amount}}天`,"periods.lifetime":`çµèº«`,"periods.weekPlural":`{{amount}} é±`,"periods.monthPlural":`{{amount}} åæ`,"periods.yearPlural":`{{amount}} å¹´`,"periods.dayPlural":`{{amount}} 天`,"periods.weekFrequency":`æ¯é±`,"periods.monthFrequency":`æ¯æ`,"periods.yearFrequency":`æ¯å¹´`,"periods.dayFrequency":`æ¯å¤©`,"periods.perWeekFrequency":`æ¯é±`,"periods.perMonthFrequency":`æ¯æ`,"periods.perYearFrequency":`æ¯å¹´`,"periods.perDayFrequency":`æ¯å¤©`,"periods.unknownFrequency":`æªç¥`,"periods.weekFrequencyPlural":`æ¯ {{amount}} é±`,"periods.monthFrequencyPlural":`æ¯ {{amount}} åæ`,"periods.yearFrequencyPlural":`æ¯ {{amount}} å¹´`,"periods.dayFrequencyPlural":`æ¯ {{amount}} 天`,"product_info.product_title":`{{productTitle}}`,"product_info.product_description":`{{productDescription}}`,"product_info.product_price":`{{productPrice}}`,"product_info.free_trial_duration":`{{trialDuration}} 天å
費試ç¨`,"product_info.price_after_free_trial":`è©¦ç¨æçµæå¾ï¼æ¼ {{renewalDate}}`,"product_info.renewal_frequency":`æ¯ {{frequency}} çºç´`,"product_info.continues_until_cancelled":`æçºå°åæ¶`,"product_info.cancel_anytime":`鍿忶`,"payment_entry_page.payment_step_title":`RevenueCat å®å
¨çµå¸³`,"payment_entry_page.button_pay":`ç«å³ä»æ¬¾`,"payment_entry_page.button_start_trial":`éå§è©¦ç¨`,"success_page.purchase_successful":`仿¬¾å®æ`,"success_page.button_close":`ç¹¼çº`,"error_page.if_error_persists":`妿é¯èª¤æçºåå¨ï¼è«è¯çµ¡ `,"error_page.error_title_already_subscribed":`æ¨å·²ç¶è¨é± {{productTitle}}`,"error_page.error_title_already_purchased":`æ¨å·²ç¶è³¼è²· {{productTitle}}`,"error_page.error_title_other_errors":`ç¼çé¯èª¤`,"error_page.error_message_already_subscribed":`æ¨ç¡æ³å次è¨é±æ¤ç¢åã`,"error_page.error_message_already_purchased":`æ¨ç¡æ³å次購買æ¤ç¢åã`,"error_page.error_message_missing_email_error":`å®æè³¼è²·éè¦é»åéµä»¶å°åã`,"error_page.error_message_network_error":`網路é¯èª¤ãè«æª¢æ¥æ¨ç網路é£ç·ã`,"error_page.error_message_error_charging_payment":`仿¬¾å¤±æã`,"error_page.error_message_error_setting_up_purchase":`ç±æ¼ç¼çé¯èª¤ï¼è³¼è²·æªååï¼é¯èª¤ä»£ç¢¼ï¼{{errorCode}}ï¼ã`,"error_page.error_message_invalid_tax_location":`æåç¡æ³é©èæ¨ç帳å®å°åãè«ä»ç´°æª¢æ¥éµéåèååå®¶æ¯å¦æ£ç¢ºã`,"error_page.error_message_unknown_error":`ç¼ç䏿é¯èª¤ï¼é¯èª¤ä»£ç¢¼ï¼{{errorCode}}ï¼ã`,"error_page.button_try_again":`åè©¦ä¸æ¬¡`,"paywall_variables.price_per_period":`{{formattedPrice}}/{{period}}`,"paywall_variables.sub_relative_discount":`{{discount}}%`,"paywall_variables.total_price_and_per_month":`{{formattedPrice}}/{{period}} ({{formattedPricePerMonth}}/{{monthPeriod}})`,"product_info.total_due_today":`仿¥æä»ç¸½é¡`,"product_info.subscribe_to":`è¨é±`,"navbar_header.details":`詳細è³è¨`,"navbar_header.back_button":`è¿å`,"pricing_dropdown.show_details":`顯示詳細è³è¨`,"pricing_dropdown.hide_details":`é±è詳細è³è¨`,"pricing_table.tax":`ç¨
é`,"pricing_table.trial_ends":`è©¦ç¨æçµæå¾ï¼æ¼ {{formattedTrialEndDate}}`,"pricing_table.total_due_today":`仿¥æä»ç¸½é¡`,"pricing_table.total_excluding_tax":`總è¨ï¼ä¸å«ç¨
ï¼`,"pricing_table.enter_billing_address_to_calculate":`輸å
¥å¸³å®å°å以è¨ç®`,"pricing_table.enter_state_or_postal_code_to_calculate":`輸å
¥å·æéµæ¿ç·¨ç¢¼ä»¥è¨ç®`,"pricing_table.enter_postal_code_to_calculate":`輸å
¥éµæ¿ç·¨ç¢¼ä»¥è¨ç®`,"error_page.error_message_invalid_email_error":`ç¡æ³é©èé»åéµä»¶å°å {{email}}ãè«æä¾ææçé»åéµä»¶å°åã`,"payment_entry_page.button_payment_method":`ä½¿ç¨ {{paymentMethod}} æ¯ä» {{formattedPrice}}`,"payment_entry_page.button_with_price":`æ¯ä» {{formattedPrice}}`,"price_update.title":`广 ¼æ´æ°`,"price_update.base_message":`總å¹å·²æ ¹ææ¨ç帳å®å°åæ´æ°ç¨
éãè«æª¢æ¥å¾éè©¦ãæ¨çä¿¡ç¨å¡åªæè¢«æ¶å䏿¬¡è²»ç¨ã`,"price_update.trial_message":`æ ¹ææ¨ç帳å®å°åï¼è¨é±å¹æ ¼å·²æ´æ°çºå«ç¨
广 ¼ãå
費試ç¨ä»ç¶ææãè«æ¥ç並é試ã`,"payment_entry_page.express_checkout_divider":`æä»¥ä¿¡ç¨å¡ä»æ¬¾`,"error_page.trouble_accessing":`妿æ¨å¨åå購買é
ç®æéå°åé¡ï¼è«éé以䏿¹å¼è¯çµ¡æ¯æ´äººå¡ï¼`,"error_page.close_button_title":`åå¾{{appName}}
40`,"error_page.error_title_stripe_missing_required_permission":`ç¼ºå° Stripe æ¬é`,"error_page.button_close":`éé`,"error_page.error_message_stripe_invalid_tax_origin_address":`購買失æï¼å çºç¨
åèµ·å§å°åç¡æã卿£å¼ç°å¢ä¸ï¼è³¼è²·å°å¨ä¸å¥ç¨ç¨
éçæ
æ³ä¸éä½ã`,"error_page.error_message_stripe_tax_not_active":`購買失æï¼å çº Stripe Tax æªåç¨ã卿£å¼ç°å¢ä¸ï¼è³¼è²·å°å¨ä¸å¥ç¨ç¨
éçæ
æ³ä¸éä½ã`,"error_page.error_only_in_sandbox":`æ¤è¨æ¯å
卿²çä¸é¡¯ç¤ºã`,"error_page.error_message_stripe_missing_required_permission":`購買失æï¼å çº Stripe æç¨ç¨å¼ç¼ºå°å¿
è¦çæ¬éã卿£å¼ç°å¢ä¸ï¼è³¼è²·å°å¨ä¸å¥ç¨ç¨
éçæ
æ³ä¸éä½ã`,"error_page.error_title_stripe_tax_not_active":`Stripe Tax æªåç¨`,"error_page.error_title_stripe_invalid_tax_origin_address":`ç¡æçç¨
åèµ·å§å°å`,"apple_pay.free_trial":`å
費試ç¨`,"product_info.price_after_intro_price":`å¨ {{introPriceDuration}} ä¹å¾ï¼æ¼ {{renewalDate}}`,"product_info.after_trial":`è©¦ç¨æå¾`,"product_info.after":`ä¹å¾`,"product_info.intro_price_phase_after_trial":`ç¶å¾ {{introPriceDuration}}ï¼å¹æ ¼çº {{introPrice}}`,"product_info.intro_price_phase":`é¦å
{{introPriceDuration}}ï¼å¹æ ¼çº {{introPrice}}`,"product_info.intro_price_phase_paid_once":`䏿¬¡æ§æ¯ä»`,"payment_entry_page.trial_subscription_terms_info":`卿¨çè©¦ç¨æçµæå¾ï¼æ¨å°è¢«æ¶å {{price}} {{perFrequency}}ï¼å¾ {{renewalDate}} éå§ãæ¨å¯ä»¥é¨æå¨æ¤æ¥æä¹ååæ¶ã`,"payment_entry_page.subscription_info":`è¨é±æèªåçºè¨ã鍿忶ã`,"payment_entry_page.otp_terms_info":`購買å³è¡¨ç¤ºæ¨åæææ¬ {{appName}} æ ¹æå
¶æ¢æ¬¾åæ¨æ¶è²»ã`,"payment_entry_page.terms_link_label":`æ¢æ¬¾`,"payment_entry_page.subscription_terms_info":`è¨é±å³è¡¨ç¤ºæ¨åæå
許 {{appName}} æ ¹æå
¶æ¢æ¬¾åæ¨æ¶è²»ï¼ç´å°æ¨åæ¶çºæ¢ã`,"loading_page.keep_page_open":`ç¨åºå³å°å®æãè«ä¿ææ¤é é¢éåã`,"loading_page.processing_payment":`æ£å¨èç仿¬¾`,"pricing_table.discount":`ææ£`,"pricing_table.subtotal":`å°è¨`,"pricing_dropdown.add_promo_code":`æ°å¢åªæ 碼`,"discount_input.label":`ä¿é·ä»£ç¢¼`,"payment_entry_page.checkout_consent_terms_of_service":`æåæ¢æ¬¾`,"payment_entry_page.checkout_consent_agreement":`æåæ{{appName}}ç{{termsOfService}}ã`},Vde={"periods.week":`{{amount}} tjedan`,"periods.month":`{{amount}} mjesec`,"periods.year":`{{amount}} godina`,"periods.day":`{{amount}} dan`,"periods.weekShort":`{{amount}}tj`,"periods.monthShort":`{{amount}}mj`,"periods.yearShort":`{{amount}}g`,"periods.dayShort":`{{amount}}d`,"periods.lifetime":`doživotno`,"periods.weekPlural":`{{amount}} tjedana`,"periods.monthPlural":`{{amount}} mjeseci`,"periods.yearPlural":`{{amount}} godina`,"periods.dayPlural":`{{amount}} dana`,"periods.weekFrequency":`tjedno`,"periods.monthFrequency":`mjeseÄno`,"periods.yearFrequency":`godiÅ¡nje`,"periods.dayFrequency":`dnevno`,"periods.perWeekFrequency":`tjedno`,"periods.perMonthFrequency":`mjeseÄno`,"periods.perYearFrequency":`godiÅ¡nje`,"periods.perDayFrequency":`dnevno`,"periods.unknownFrequency":`nepoznato`,"periods.weekFrequencyPlural":`svakih {{amount}} tjedana`,"periods.monthFrequencyPlural":`svakih {{amount}} mjeseci`,"periods.yearFrequencyPlural":`svakih {{amount}} godina`,"periods.dayFrequencyPlural":`svakih {{amount}} dana`,"product_info.product_title":`{{productTitle}}`,"product_info.product_description":`{{productDescription}}`,"product_info.product_price":`{{productPrice}}`,"product_info.free_trial_duration":`{{trialDuration}} besplatno probno razdoblje`,"product_info.price_after_free_trial":`Nakon isteka probnog razdoblja, {{renewalDate}}`,"product_info.renewal_frequency":`Obnavlja se {{frequency}}`,"product_info.continues_until_cancelled":`Nastavlja se dok se ne otkaže`,"product_info.cancel_anytime":`Otkažite u bilo kojem trenutku`,"payment_entry_page.payment_step_title":`Sigurna naplata putem RevenueCat`,"payment_entry_page.button_pay":`Plati sada`,"payment_entry_page.button_start_trial":`PoÄni probno razdoblje`,"success_page.purchase_successful":`
40Uplata je uspjeÅ¡na`,"success_page.button_close":`Nastavi`,"error_page.if_error_persists":`Ako se pogreÅ¡ka nastavi, obratite se `,"error_page.error_title_already_subscribed":`VeÄ ste pretplaÄeni na {{productTitle}}`,"error_page.error_title_already_purchased":`VeÄ ste kupili {{productTitle}}`,"error_page.error_title_other_errors":`NeÅ¡to je poÅ¡lo po zlu`,"error_page.error_message_already_subscribed":`Ne možete se ponovno pretplatiti na ovaj proizvod.`,"error_page.error_message_already_purchased":`Ne možete ponovno kupiti ovaj proizvod.`,"error_page.error_message_missing_email_error":`E-poÅ¡ta je potrebna za dovrÅ¡etak kupnje.`,"error_page.error_message_network_error":`Mrežna pogreÅ¡ka. Provjerite internetsku vezu.`,"error_page.error_message_error_charging_payment":`PlaÄanje nije uspjelo.`,"error_page.error_message_error_setting_up_purchase":`Kupnja nije zapoÄela zbog pogreÅ¡ke (kod pogreÅ¡ke: {{errorCode}}).`,"error_page.error_message_invalid_tax_location":`Nismo mogli potvrditi vaÅ¡u adresu za naplatu. Molimo provjerite poÅ¡tanski broj i državu kako biste bili sigurni da su toÄni.`,"error_page.error_message_unknown_error":`DoÅ¡lo je do nepoznate pogreÅ¡ke (kod pogreÅ¡ke: {{errorCode}}).`,"error_page.button_try_again":`PokuÅ¡aj ponovno`,"paywall_variables.price_per_period":`{{formattedPrice}}/{{period}}`,"paywall_variables.sub_relative_discount":`{{discount}}%`,"paywall_variables.total_price_and_per_month":`{{formattedPrice}}/{{period}}({{formattedPricePerMonth}}/{{monthPeriod}})`,"product_info.total_due_today":`Ukupno dospijeÄe danas`,"product_info.subscribe_to":`Pretplatite se`,"navbar_header.details":`Detalji`,"navbar_header.back_button":`Natrag`,"pricing_dropdown.show_details":`Prikaži detalje`,"pricing_dropdown.hide_details":`Sakrij detalje`,"pricing_table.tax":`Porez`,"pricing_table.trial_ends":`Nakon isteka probnog razdoblja, {{formattedTrialEndDate}}`,"pricing_table.total_due_today":`Ukupan iznos dospijeÄa danas`,"pricing_table.total_excluding_tax":`Ukupno bez poreza`,"pricing_table.enter_billing_address_to_calculate":`Unesite adresu za naplatu za izraÄun`,"pricing_table.enter_state_or_postal_code_to_calculate":`Unesite državu ili poÅ¡tanski broj za izraÄun`,"pricing_table.enter_postal_code_to_calculate":`Unesite poÅ¡tanski broj za izraÄun`,"error_page.error_message_invalid_email_error":`Adresa e-poÅ¡te {{email}} nije se mogla potvrditi. Molimo unesite valjanu adresu e-poÅ¡te.`,"payment_entry_page.button_payment_method":`Plati {{formattedPrice}} putem {{paymentMethod}}`,"payment_entry_page.button_with_price":`Plati {{formattedPrice}}`,"price_update.title":`Ažuriranje cijene`,"price_update.base_message":`Ukupna cijena je ažurirana s porezom na temelju vaÅ¡e adrese za naplatu. Pregledajte i pokuÅ¡ajte ponovo. VaÅ¡a kartica bit Äe naplaÄena samo jednom.`,"price_update.trial_message":`Cijena pretplate je ažurirana da ukljuÄi poreze na temelju vaÅ¡e adrese za naplatu. Besplatno probno razdoblje i dalje vrijedi. Molimo provjerite i pokuÅ¡ajte ponovno.`,"payment_entry_page.express_checkout_divider":`ILI PLATITE KARTICOM`,"error_page.trouble_accessing":`Ako imate problema s pristupom kupnji, obratite se podrÅ¡ci na `,"error_page.close_button_title":`Idi na {{appName}}`,"error_page.error_title_stripe_missing_required_permission":`Nedostaje Stripe dopuÅ¡tenje`,"error_page.button_close":`Zatvori`,"error_page.error_message_stripe_invalid_tax_origin_address":`Kupnja nije uspjela jer je adresa poreznog podrijetla nevažeÄa. U produkciji Äe kupnje funkcionirati bez primijenjenih poreza.`,"error_page.error_message_stripe_tax_not_active":`Kupnja nije uspjela jer Stripe Tax nije omoguÄen. U produkciji Äe kupnje funkcionirati bez primijenjenih poreza.`,"error_page.error_only_in_sandbox":`Ova se poruka pojavljuje samo u sandboxu.`,"error_page.error_message_stripe_missing_required_permission":`Kupnja nije uspjela jer Stripe aplikaciji nedostaje potrebno dopuÅ¡tenje. U produkciji Äe kupnje funkcionirati bez primijenjenih poreza.`,"error_page.error_title_stripe_tax_not_active":`Stripe Tax nije aktivan`,"error_page.error_title_str
40ipe_invalid_tax_origin_address":`NevažeÄa adresa poreznog podrijetla`,"apple_pay.free_trial":`Besplatna proba`,"product_info.price_after_intro_price":`Nakon {{introPriceDuration}}, na {{renewalDate}}`,"product_info.after_trial":`nakon probnog perioda`,"product_info.after":`nakon`,"product_info.intro_price_phase_after_trial":`Zatim {{introPriceDuration}} za {{introPrice}}`,"product_info.intro_price_phase":`Prvo {{introPriceDuration}} za {{introPrice}}`,"product_info.intro_price_phase_paid_once":`plaÄa se jednokratno`,"payment_entry_page.trial_subscription_terms_info":`Nakon isteka probnog razdoblja, bit Äe vam naplaÄeno {{price}} {{perFrequency}} poÄevÅ¡i od {{renewalDate}}. Možete otkazati bilo kada prije tog datuma.`,"payment_entry_page.subscription_info":`Pretplata se automatski obnavlja. Otkažite bilo kada.`,"payment_entry_page.otp_terms_info":`Kupnjom pristajete dopustiti aplikaciji {{appName}} da vam naplati u skladu s njihovim uvjetima.`,"payment_entry_page.terms_link_label":`Uvjeti`,"payment_entry_page.subscription_terms_info":`Pretplatom se slažete da Äete dopustiti {{appName}} da vam naplaÄuje u skladu s njihovim uvjetima dok ne otkažete.`,"loading_page.keep_page_open":`Proces je skoro gotov. Ostavite ovu stranicu otvorenom.`,"loading_page.processing_payment":`Obrada uplate`,"pricing_table.discount":`Popust`,"pricing_table.subtotal":`MeÄuzbroj`,"pricing_dropdown.add_promo_code":`Dodaj promotivni kod`,"discount_input.label":`Promo kod`,"payment_entry_page.checkout_consent_terms_of_service":`uvjetima koriÅ¡tenja`,"payment_entry_page.checkout_consent_agreement":`Slažem se s {{appName}} {{termsOfService}}.`},Hde={"periods.week":`{{amount}} týden`,"periods.month":`{{amount}} mÄsÃc`,"periods.year":`{{amount}} rok`,"periods.day":`{{amount}} den`,"periods.weekShort":`{{amount}}týd`,"periods.monthShort":`{{amount}}mÄs`,"periods.yearShort":`{{amount}}rok`,"periods.dayShort":`{{amount}}d`,"periods.lifetime":`doživotnÄ`,"periods.weekPlural":`{{amount}} týdnů`,"periods.monthPlural":`{{amount}} mÄsÃců`,"periods.yearPlural":`{{amount}} let`,"periods.dayPlural":`{{amount}} dnů`,"periods.weekFrequency":`týdnÄ`,"periods.monthFrequency":`mÄsÃÄnÄ`,"periods.yearFrequency":`roÄnÄ`,"periods.dayFrequency":`dennÄ`,"periods.perWeekFrequency":`týdnÄ`,"periods.perMonthFrequency":`mÄsÃÄnÄ`,"periods.perYearFrequency":`roÄnÄ`,"periods.perDayFrequency":`dennÄ`,"periods.unknownFrequency":`neznámé`,"periods.weekFrequencyPlural":`každých {{amount}} týdnů`,"periods.monthFrequencyPlural":`každých {{amount}} mÄsÃců`,"periods.yearFrequencyPlural":`každých {{amount}} let`,"periods.dayFrequencyPlural":`každých {{amount}} dnů`,"product_info.product_title":`{{productTitle}}`,"product_info.product_description":`{{productDescription}}`,"product_info.product_price":`{{productPrice}}`,"product_info.free_trial_duration":`{{trialDuration}} zkuÅ¡ebnà verze zdarma`,"product_info.price_after_free_trial":`Po skonÄenà zkuÅ¡ebnà verze, {{renewalDate}}`,"product_info.renewal_frequency":`Obnovuje se {{frequency}}`,"product_info.continues_until_cancelled":`PokraÄuje, dokud nenà zruÅ¡eno`,"product_info.cancel_anytime":`ZruÅ¡it kdykoli`,"payment_entry_page.payment_step_title":`BezpeÄné placenà pÅes RevenueCat`,"payment_entry_page.button_pay":`Platit nynÃ`,"payment_entry_page.button_start_trial":`Spustit zkuÅ¡ebnà verzi`,"success_page.purchase_successful":`Platba dokonÄena`,"success_page.button_close":`PokraÄovat`,"error_page.if_error_persists":`Pokud chyba pÅetrvává, kontaktujte `,"error_page.error_title_already_subscribed":`Již máte pÅedplatné pro {{productTitle}}`,"error_page.error_title_already_purchased":`Již jste zakoupili {{productTitle}}`,"error_page.error_title_other_errors":`NÄco se pokazilo`,"error_page.error_message_already_subscribed":`Nemůžete si znovu pÅedplatit tento produkt.`,"error_page.error_message_already_purchased":`Tento produkt si nemůžete znovu zakoupit.`,"error_page.error_message_missing_email_error":`Pro dokonÄenà nákupu je vyžadován e-mail.`,"error_page.error_message_network_error":`SÃÅ¥ová chyba. Zkontrolujte prosÃm své internetové pÅipojenÃ.`,"error_page.error_message_error_charging_payment":`Platba selhala.`,"error_page.error_message_error_setting_up_purchase":`Nákup nebyl zahájen z důvodu chyby (kód chyby: {{errorCode}}).`,"error_page.error_message_invalid_tax_location":`Nemohli jsme ovÄÅit vaÅ¡i fakturaÄnà adresu. Zkontrolujte prosÃm, zda je poÅ¡tovnà smÄrovacà ÄÃslo a zemÄ správné.`,"error_page.error_message_unknown_error":`DoÅ¡lo k neznÃ
40¡mé chybÄ (kód chyby: {{errorCode}}).`,"error_page.button_try_again":`Zkusit znovu`,"paywall_variables.price_per_period":`{{formattedPrice}}/{{period}}`,"paywall_variables.sub_relative_discount":`{{discount}}%`,"paywall_variables.total_price_and_per_month":`{{formattedPrice}}/{{period}}({{formattedPricePerMonth}}/{{monthPeriod}})`,"product_info.total_due_today":`Celkem dnes k zaplacenÃ`,"product_info.subscribe_to":`PÅedplatit`,"navbar_header.details":`Podrobnosti`,"navbar_header.back_button":`ZpÄt`,"pricing_dropdown.show_details":`Zobrazit podrobnosti`,"pricing_dropdown.hide_details":`Skrýt podrobnosti`,"pricing_table.tax":`DaÅ`,"pricing_table.trial_ends":`Po skonÄenà zkuÅ¡ebnà doby, dne {{formattedTrialEndDate}}`,"pricing_table.total_due_today":`Celkem splatné dnes`,"pricing_table.total_excluding_tax":`Celkem bez danÄ`,"pricing_table.enter_billing_address_to_calculate":`Zadejte fakturaÄnà adresu pro výpoÄet`,"pricing_table.enter_state_or_postal_code_to_calculate":`Zadejte stát nebo PSÄ pro výpoÄet`,"pricing_table.enter_postal_code_to_calculate":`Zadejte PSÄ pro výpoÄet`,"error_page.error_message_invalid_email_error":`E-mailová adresa {{email}} nemohla být ovÄÅena. Zadejte prosÃm platnou e-mailovou adresu.`,"payment_entry_page.button_payment_method":`Zaplatit {{formattedPrice}} pomocà {{paymentMethod}}`,"payment_entry_page.button_with_price":`Zaplatit {{formattedPrice}}`,"price_update.title":`Aktualizace ceny`,"price_update.base_message":`Celková cena byla aktualizována o daÅ na základÄ vašà fakturaÄnà adresy. Zkontrolujte ji a zkuste to znovu. VaÅ¡e karta bude stržena pouze jednou.`,"price_update.trial_message":`Cena pÅedplatného byla aktualizována vÄetnÄ danà na základÄ vašà fakturaÄnà adresy. Bezplatná zkuÅ¡ebnà doba stále platÃ. ProsÃm, zkontrolujte a zkuste to znovu.`,"payment_entry_page.express_checkout_divider":`NEBO ZAPLATIT KARTOU`,"error_page.trouble_accessing":`Pokud máte potÞe s pÅÃstupem k zakoupenému obsahu, kontaktujte podporu na `,"error_page.close_button_title":`PÅejÃt na {{appName}}`,"error_page.error_title_stripe_missing_required_permission":`Chybà oprávnÄnà Stripe`,"error_page.button_close":`ZavÅÃt`,"error_page.error_message_stripe_invalid_tax_origin_address":`Nákup se nezdaÅil, protože adresa původu danÄ je neplatná. V produkÄnÃm prostÅedà budou nákupy fungovat bez uplatnÄnà danÃ.`,"error_page.error_message_stripe_tax_not_active":`Nákup se nezdaÅil, protože Stripe Tax nenà aktivnÃ. V produkÄnÃm prostÅedà budou nákupy fungovat bez uplatnÄnà danÃ.`,"error_page.error_only_in_sandbox":`Tato zpráva se zobrazuje pouze v sandboxu.`,"error_page.error_message_stripe_missing_required_permission":`Nákup se nezdaÅil, protože aplikaci Stripe chybà požadované oprávnÄnÃ. V produkÄnÃm prostÅedà budou nákupy fungovat bez uplatnÄnà danÃ.`,"error_page.error_title_stripe_tax_not_active":`Stripe Tax nenà aktivnÃ`,"error_page.error_title_stripe_invalid_tax_origin_address":`Neplatná adresa původu danÄ`,"apple_pay.free_trial":`ZkuÅ¡ebnà verze zdarma`,"product_info.price_after_intro_price":`Po {{introPriceDuration}}, dne {{renewalDate}}`,"product_info.after_trial":`po zkuÅ¡ebnà dobÄ`,"product_info.after":`po`,"product_info.intro_price_phase_after_trial":`Poté {{introPriceDuration}} za {{introPrice}}`,"product_info.intro_price_phase":`Nejprve {{introPriceDuration}} za {{introPrice}}`,"product_info.intro_price_phase_paid_once":`placeno jednorázovÄ`,"payment_entry_page.trial_subscription_terms_info":`Po skonÄenà zkuÅ¡ebnÃho obdobà vám bude úÄtováno {{price}} {{perFrequency}} poÄÃnaje {{renewalDate}}. PÅed tÃmto datem můžete kdykoli zruÅ¡it.`,"payment_entry_page.subscription_info":`PÅedplatné se automaticky obnovuje. ZruÅ¡it můžete kdykoli.`,"payment_entry_page.otp_terms_info":`ZakoupenÃm souhlasÃte s tÃm, že umožnÃte aplikaci {{appName}} úÄtovat vám poplatky v souladu s jejÃmi podmÃnkami.`,"payment_entry_page.terms_link_label":`PodmÃnky`,"payment_entry_page.subscription_terms_info":`PÅihlášenÃm k odbÄru souhlasÃte s tÃm, že spoleÄnost {{appName}} vám bude úÄtovat poplatky v souladu s jejÃmi podmÃnkami, dokud odbÄr nezruÅ¡Ãte.`,"loading_page.keep_page_open":`ProbÃhá dokonÄovánà procesu. Nechte tuto stránku otevÅenou.`,"loading_page.processing_payment":`ProbÃhá zpracovánà platby`,"pricing_table.discount":`Sleva`,"pricing_table.subtotal":`MezisouÄet`,"pricing_dropdown.add_promo_code":`PÅidat promo kód`,"discount_input.label":`Promo kód`,"payment_entry_page.checkout_consent_terms_of_service":`podmÃnkami služby`,"payment_entry_page.checkout_consent_agreement":`SouhlasÃm s {{appName}} {{termsOfService}}.`},Ude={"periods.week":`{{amount}} uge`,"periods.month":`{{amount}} mÃ¥ned`,"periods.year":`{{amount}} Ã¥r`,"periods.day":`{{amount}}
40 dag`,"periods.weekShort":`{{amount}}ug`,"periods.monthShort":`{{amount}}md`,"periods.yearShort":`{{amount}}år`,"periods.dayShort":`{{amount}}d`,"periods.lifetime":`livstid`,"periods.weekPlural":`{{amount}} uger`,"periods.monthPlural":`{{amount}} måneder`,"periods.yearPlural":`{{amount}} år`,"periods.dayPlural":`{{amount}} dage`,"periods.weekFrequency":`ugentligt`,"periods.monthFrequency":`månedligt`,"periods.yearFrequency":`årligt`,"periods.dayFrequency":`dagligt`,"periods.perWeekFrequency":`pr. uge`,"periods.perMonthFrequency":`pr. måned`,"periods.perYearFrequency":`pr. år`,"periods.perDayFrequency":`pr. dag`,"periods.unknownFrequency":`ukendt`,"periods.weekFrequencyPlural":`hver {{amount}} uger`,"periods.monthFrequencyPlural":`hver {{amount}} måneder`,"periods.yearFrequencyPlural":`hver {{amount}} år`,"periods.dayFrequencyPlural":`hver {{amount}} dage`,"product_info.product_title":`{{productTitle}}`,"product_info.product_description":`{{productDescription}}`,"product_info.product_price":`{{productPrice}}`,"product_info.free_trial_duration":`{{trialDuration}} gratis prøveperiode`,"product_info.price_after_free_trial":`Efter prøveperioden slutter, den {{renewalDate}}`,"product_info.renewal_frequency":`Fornyes {{frequency}}`,"product_info.continues_until_cancelled":`Fortsætter indtil annulleret`,"product_info.cancel_anytime":`Annuller når som helst`,"payment_entry_page.payment_step_title":`Sikker betaling via RevenueCat`,"payment_entry_page.button_pay":`Betal nu`,"payment_entry_page.button_start_trial":`Start prøveperiode`,"success_page.purchase_successful":`Betaling gennemført`,"success_page.button_close":`Fortsæt`,"error_page.if_error_persists":`Hvis fejlen fortsætter, kontakt venligst `,"error_page.error_title_already_subscribed":`Du abonnerer allerede på {{productTitle}}`,"error_page.error_title_already_purchased":`Du har allerede købt {{productTitle}}`,"error_page.error_title_other_errors":`Noget gik galt`,"error_page.error_message_already_subscribed":`Du kan ikke abonnere på dette produkt igen.`,"error_page.error_message_already_purchased":`Du kan ikke købe dette produkt igen.`,"error_page.error_message_missing_email_error":`Email er påkrævet for at gennemføre købet.`,"error_page.error_message_network_error":`Netværksfejl. Kontroller din internetforbindelse.`,"error_page.error_message_error_charging_payment":`Betalingen mislykkedes.`,"error_page.error_message_error_setting_up_purchase":`Køb ikke startet på grund af en fejl (fejlkode: {{errorCode}}).`,"error_page.error_message_invalid_tax_location":`Vi kunne ikke bekræfte din fakturer
40ingsadresse. Kontroller venligst, at postnummeret og landet er korrekte.`,"error_page.error_message_unknown_error":`Der opstod en ukendt fejl (fejlkode: {{errorCode}}).`,"error_page.button_try_again":`Prøv igen`,"paywall_variables.price_per_period":`{{formattedPrice}}/{{period}}`,"paywall_variables.sub_relative_discount":`{{discount}}%`,"paywall_variables.total_price_and_per_month":`{{formattedPrice}}/{{period}}({{formattedPricePerMonth}}/{{monthPeriod}})`,"product_info.total_due_today":`Samlet beløb for i dag`,"product_info.subscribe_to":`Abonner på`,"navbar_header.details":`Detaljer`,"navbar_header.back_button":`Tilbage`,"pricing_dropdown.show_details":`Vis detaljer`,"pricing_dropdown.hide_details":`Skjul detaljer`,"pricing_table.tax":`Moms`,"pricing_table.trial_ends":`Efter prøveperioden slutter, den {{formattedTrialEndDate}}`,"pricing_table.total_due_today":`Samlet beløb forfalden i dag`,"pricing_table.total_excluding_tax":`Samlet beløb eksklusive moms`,"pricing_table.enter_billing_address_to_calculate":`Indtast faktureringsadresse for at beregne`,"pricing_table.enter_state_or_postal_code_to_calculate":`Indtast stat eller postnummer for at beregne`,"pricing_table.enter_postal_code_to_calculate":`Indtast postnummer for at beregne`,"error_page.error_message_invalid_email_error":`E-mailadressen {{email}} kunne ikke bekræftes. Angiv en gyldig e-mailadresse.`,"payment_entry_page.button_payment_method":`Betal {{formattedPrice}} med {{paymentMethod}}`,"payment_entry_page.button_with_price":`Betal {{formattedPrice}}`,"price_update.title":`Prisopdatering`,"price_update.base_message":`Den samlede pris er blevet opdateret med moms baseret på din fakturer
40ingsadresse. Gennemgå og prøv igen. Dit kort vil kun blive debiteret én gang.`,"price_update.trial_message":`Abonnementsprisen er opdateret for at inkludere skatter baseret på din faktureringsadresse. Den gratis prøveperiode gælder stadig. Kontroller venligst og prøv igen.`,"payment_entry_page.express_checkout_divider":`ELLER BETAL MED KORT`,"error_page.trouble_accessing":`Hvis du har problemer med at få adgang til dit køb, kan du kontakte support på `,"error_page.close_button_title":`Gå til {{appName}}`,"error_page.error_title_stripe_missing_required_permission":`Manglende Stripe-tilladelse`,"error_page.button_close":`Luk`,"error_page.error_message_stripe_invalid_tax_origin_address":`Købet mislykkedes, fordi skatteoprindelsesadressen er ugyldig. I produktion vil køb fungere uden påførte skatter.`,"error_page.error_message_stripe_tax_not_active":`Købet mislykkedes, fordi Stripe Tax ikke er aktiveret. I produktion vil køb fungere uden påførte skatter.`,"error_page.error_only_in_sandbox":`Denne meddelelse vises kun i sandkassen.`,"error_page.error_message_stripe_missing_required_permission":`Købet mislykkedes, fordi Stripe-appen mangler en påkrævet tilladelse. I produktion vil køb fungere uden påførte skatter.`,"error_page.error_title_stripe_tax_not_active":`Stripe Tax er ikke aktiv`,"error_page.error_title_stripe_invalid_tax_origin_address":`Ugyldig skatteoprindelsesadresse`,"apple_pay.free_trial":`Gratis prøveperiode`,"product_info.price_after_intro_price":`Efter {{introPriceDuration}}, den {{renewalDate}}`,"product_info.after_trial":`efter prøveperiode`,"product_info.after":`efter`,"product_info.intro_price_phase_after_trial":`Derefter {{introPriceDuration}} for {{introPrice}}`,"product_info.intro_price_phase":`Først {{introPriceDuration}} for {{introPrice}}`,"product_info.intro_price_phase_paid_once":`betales én gang`,"payment_entry_page.trial_subscription_terms_info":`Efter din prøveperiode slutter, vil du blive opkrævet {{price}} {{perFrequency}} fra og med {{renewalDate}}. Du kan opsige når som helst før denne dato.`,"payment_entry_page.subscription_info":`Abonnementet fornys automatisk. Opsig når som helst.`,"payment_entry_page.otp_terms_info":`Ved at købe accepterer du, at {{appName}} kan debitere dig i overensstemmelse med deres vilkår.`,"payment_entry_page.terms_link_label":`Vilkår`,"payment_entry_page.subscription_terms_info":`Ved at abonnere accepterer du, at {{appName}} kan opkræve dig i henhold til deres vilkår, indtil du opsiger.`,"loading_page.keep_page_open":`Processen er næsten færdig. Hold denne side åben.`,"loading_page.processing_payment":`Behandler betaling`,"pricing_table.discount":`Rabat`,"pricing_table.subtotal":`Subtotal`,"pricing_dropdown.add_promo_code":`Tilføj rabatkode`,"discount_input.label":`Kampagnekode`,"payment_entry_page.checkout_consent_terms_of_service":`servicevilkår`,"payment_entry_page.checkout_consent_agreement":`Jeg accepterer {{appName}}'s {{termsOfService}}.`},Wde={"periods.week":`{{amount}} week`,"periods.month":`{{amount}} maand`,"periods.year":`{{amount}} jaar`,"periods.day":`{{amount}} dag`,"periods.weekShort":`{{amount}}wk`,"periods.monthShort":`{{amount}}maand`,"periods.yearShort":`{{amount}}jr`,"periods.dayShort":`{{amount}}d`,"periods.lifetime":`levenslang`,"periods.weekPlural":`{{amount}} weken`,"periods.monthPlural":`{{amount}} maanden`,"periods.yearPlural":`{{amount}} jaren`,"periods.dayPlural":`{{amount}} dagen`,"periods.weekFrequency":`wekelijks`,"periods.monthFrequency":`maandelijks`,"periods.yearFrequency":`jaarlijks`,"periods.dayFrequency":`dagelijks`,"periods.perWeekFrequency":`per week`,"periods.perMonthFrequency":`per maand`,"periods.perYearFrequency":`per jaar`,"periods.perDayFrequency":`per dag`,"periods.unknownFrequency":`onbekend`,"periods.weekFrequencyPlural":`elke {{amount}} weken`,"periods.monthFrequencyPlural":`elke {{amount}} maanden`,"periods.yearFrequencyPlural":`elke {{amount}} jaren`,"periods.dayFrequencyPlural":`elke {{amount}} dagen`,"product_info.product_title":`{{productTitle}}`,"product_info.product_description":`{{productDescription}}`,"product_info.product_price":`{{productPrice}}`,"product_info.free_trial_duration":`{{trialDuration}} gratis proefperiode`,"product_info.price_after_free_trial":`Na afloop van de proefperiode, op {{renewalDate}}`,"product_info.renewal_frequency":`Wordt verlengd {{frequency}}`,"product_info.continues_until_cancelled":`Wordt voortgezet tot annulering`,"product_info.cancel_anytime":`Annuleer op elk gewenst moment`,"payment_entry_page.payment_step_title":`Veilige afrekening via RevenueCat`,"payment_entry_page.button_pay":`Nu betalen`,"payment_entry_page.button_start_trial":`Start proefperiode`,"success_page.purchase_successful":`Betaling voltooid`,"success_page.button_close"
40:`Doorgaan`,"error_page.if_error_persists":`Neem contact op met als de fout aanhoudt`,"error_page.error_title_already_subscribed":`Je bent al geabonneerd op {{productTitle}}`,"error_page.error_title_already_purchased":`Je hebt {{productTitle}} al gekocht`,"error_page.error_title_other_errors":`Er is iets misgegaan`,"error_page.error_message_already_subscribed":`Je kunt je niet opnieuw abonneren op dit product.`,"error_page.error_message_already_purchased":`Je kunt dit product niet opnieuw kopen.`,"error_page.error_message_missing_email_error":`Een e-mailadres is vereist om de aankoop te voltooien.`,"error_page.error_message_network_error":`Netwerkfout. Controleer uw internetverbinding.`,"error_page.error_message_error_charging_payment":`Betaling mislukt.`,"error_page.error_message_error_setting_up_purchase":`Aankoop niet gestart vanwege een fout (foutcode: {{errorCode}}).`,"error_page.error_message_invalid_tax_location":`We konden uw factuuradres niet verifiëren. Controleer of de postcode en het land correct zijn.`,"error_page.error_message_unknown_error":`Er is een onbekende fout opgetreden (foutcode: {{errorCode}}).`,"error_page.button_try_again":`Opnieuw proberen`,"paywall_variables.price_per_period":`{{formattedPrice}}/{{period}}`,"paywall_variables.sub_relative_discount":`{{discount}}%`,"paywall_variables.total_price_and_per_month":`{{formattedPrice}}/{{period}}({{formattedPricePerMonth}}/{{monthPeriod}})`,"product_info.total_due_today":`Totaal te betalen vandaag`,"product_info.subscribe_to":`Abonneren op`,"navbar_header.details":`Details`,"navbar_header.back_button":`Terug`,"pricing_dropdown.show_details":`Toon details`,"pricing_dropdown.hide_details":`Verberg details`,"pricing_table.tax":`Btw`,"pricing_table.trial_ends":`Na afloop van de proefperiode, op {{formattedTrialEndDate}}`,"pricing_table.total_due_today":`Totaal vandaag te betalen`,"pricing_table.total_excluding_tax":`Totaal exclusief btw`,"pricing_table.enter_billing_address_to_calculate":`Voer het factuuradres in om te berekenen`,"pricing_table.enter_state_or_postal_code_to_calculate":`Voer provincie of postcode in om te berekenen`,"pricing_table.enter_postal_code_to_calculate":`Voer postcode in om te berekenen`,"error_page.error_message_invalid_email_error":`Het e-mailadres {{email}} kon niet worden geverifieerd. Geef een geldig e-mailadres op.`,"payment_entry_page.button_payment_method":`Betaal {{formattedPrice}} met {{paymentMethod}}`,"payment_entry_page.button_with_price":`Betaal {{formattedPrice}}`,"price_update.title":`Prijsupdate`,"price_update.base_message":`De totale prijs is bijgewerkt met belasting op basis van uw factuuradres. Controleer en probeer het opnieuw. Uw kaart wordt slechts één keer belast.`,"price_update.trial_message":`De abonnementsprijs is bijgewerkt om belastingen op te nemen op basis van uw factuuradres. De gratis proefperiode blijft van toepassing. Controleer en probeer het opnieuw.`,"payment_entry_page.express_checkout_divider":`OF BETAAL MET EEN KAART`,"error_page.trouble_accessing":`Als je problemen hebt met het verkrijgen van toegang tot je aankoop, neem dan contact op met de ondersteuning via `,"error_page.close_button_title":`Ga naar {{appName}}`,"error_page.error_title_stripe_missing_required_permission":`Ontbrekende Stripe-toestemming`,"error_page.button_close":`Sluiten`,"error_page.error_message_stripe_invalid_tax_origin_address":`De aankoop is mislukt omdat het belastingoorsprongadres ongeldig is. In productie werken aankopen zonder toegepaste belastingen.`,"error_page.error_message_stripe_tax_not_active":`De aankoop is mislukt omdat Stripe Tax niet is ingeschakeld. In productie werken aankopen zonder toegepaste belastingen.`,"error_page.error_only_in_sandbox":`Dit bericht verschijnt alleen in de sandbox.`,"error_page.error_message_stripe_missing_required_permission":`De aankoop is mislukt omdat de Stripe-app een vereiste toestemming mist. In productie werken aankopen zonder toegepaste belastingen.`,"error_page.error_title_stripe_tax_not_active":`Stripe Tax niet actief`,"error_page.error_title_stripe_invalid_tax_origin_address":`Ongeldig belastingoorsprongadres`,"apple_pay.free_trial":`Gratis proefperiode`,"product_info.price_after_intro_price":`Na {{introPriceDuration}}, op {{renewalDate}}`,"product_info.after_trial":`na proefperiode`,"product_info.after":`na`,"product_info.intro_price_phase_after_trial":`Daarna {{introPriceDuration}} voor {{introPrice}}`,"product_info.intro_price_phase":`Eerst {{introPriceDuration}} voor {{introPrice}}`,"product_info.intro_price_phase_paid_once":`eenmalig betaald`,"payment_entry_page.trial_subscription_terms_info":`Na afloop van uw proefperiode wordt {{price}} {{perFrequency}} in rekening gebracht, beginnend op {{renewalDate}}. U kunt op elk moment vóór deze datum annuleren.`,"payment_entry_page.subscription_info":`Abonnement wordt automatisch verlengd. Annuleer op elk moment.`,"payment_entry_page.otp_terms_info":`Door de aankoop ga je ermee akkoord dat {{appName}} kosten in rekening brengt volgens hun voorwaarden.`,"payment_entry_page.terms_link_label":`Voorwa
40arden`,"payment_entry_page.subscription_terms_info":`Door u te abonneren, stemt u ermee in dat {{appName}} u kosten in rekening brengt volgens hun voorwaarden totdat u annuleert.`,"loading_page.keep_page_open":`Het proces is bijna voltooid. Houd deze pagina open.`,"loading_page.processing_payment":`Betaling verwerken`,"pricing_table.discount":`Korting`,"pricing_table.subtotal":`Subtotaal`,"pricing_dropdown.add_promo_code":`Promotiecode toevoegen`,"discount_input.label":`Promotiecode`,"payment_entry_page.checkout_consent_terms_of_service":`servicevoorwaarden`,"payment_entry_page.checkout_consent_agreement":`Ik ga akkoord met de {{appName}} {{termsOfService}}.`},Gde={"periods.week":`{{amount}} viikko`,"periods.month":`{{amount}} kuukausi`,"periods.year":`{{amount}} vuosi`,"periods.day":`{{amount}} päivä`,"periods.weekShort":`{{amount}}vk`,"periods.monthShort":`{{amount}}kk`,"periods.yearShort":`{{amount}}v`,"periods.dayShort":`{{amount}}p`,"periods.lifetime":`elämäaika`,"periods.weekPlural":`{{amount}} viikkoa`,"periods.monthPlural":`{{amount}} kuukautta`,"periods.yearPlural":`{{amount}} vuotta`,"periods.dayPlural":`{{amount}} päivää`,"periods.weekFrequency":`viikoittain`,"periods.monthFrequency":`kuukausittain`,"periods.yearFrequency":`vuosittain`,"periods.dayFrequency":`päivittäin`,"periods.perWeekFrequency":`viikossa`,"periods.perMonthFrequency":`kuukaudessa`,"periods.perYearFrequency":`vuodessa`,"periods.perDayFrequency":`päivässä`,"periods.unknownFrequency":`tuntematon`,"periods.weekFrequencyPlural":`joka {{amount}} viikko`,"periods.monthFrequencyPlural":`joka {{amount}} kuukausi`,"periods.yearFrequencyPlural":`joka {{amount}} vuosi`,"periods.dayFrequencyPlural":`joka {{amount}} päivä`,"product_info.product_title":`{{productTitle}}`,"product_info.product_description":`{{productDescription}}`,"product_info.product_price":`{{productPrice}}`,"product_info.free_trial_duration":`{{trialDuration}} ilmainen kokeilujakso`,"product_info.price_after_free_trial":`Kokeilujakson päätyttyä, {{renewalDate}}`,"product_info.renewal_frequency":`Uusiutuu {{frequency}}`,"product_info.continues_until_cancelled":`Jatkuu, kunnes peruutetaan`,"product_info.cancel_anytime":`Peruuta milloin tahansa`,"payment_entry_page.payment_step_title":`Suojautunut kassatoiminto RevenueCatin kautta`,"payment_entry_page.button_pay":`Maksa nyt`,"payment_entry_page.button_start_trial":`Aloita kokeilujakso`,"success_page.purchase_successful":`Maksaminen onnistui`,"success_page.button_close":`Jatka`,"error_page.if_error_persists":`Jos virhe jatkuu, ota yhteyttä `,"error_page.error_title_already_subscribed":`Olet jo tilannut tuotteen {{productTitle}}`,"error_page.error_title_already_purchased":`Olet jo ostanut tuotteen {{productTitle}}`,"error_page.error_title_other_errors":`Jokin meni pieleen`,"error_page.error_message_already_subscribed":`Et voi tilata tätä tuotetta uudelleen.`,"error_page.error_message_already_purchased":`Et voi ostaa tätä tuotetta uudelleen.`,"error_page.error_message_missing_email_error":`Sähköpostiosoite tarvitaan ostoksen loppuun saattamiseksi.`,"error_page.error_message_network_error":`Verkkovirhe. Tarkista internet-yhteytesi.`,"error_page.error_message_error_charging_payment":`Maksaminen epäonnistui.`,"error_page.error_message_error_setting_up_purchase":`Ostoa ei aloitettu virheen vuoksi (virhekoodi: {{errorCode}}).`,"error_page.error_message_invalid_tax_location":`Emme voineet vahvistaa laskutusosoitettasi. Tarkista, että postinumero ja maa ovat oikein.`,"error_page.error_message_unknown_error":`Tapahtui tuntematon virhe (virhekoodi: {{errorCode}}).`,"error_page.button_try_again":`Yritä uudelleen`,"paywall_variables.price_per_period":`{{formattedPrice}}/{{period}}`,"paywall_variables.sub_relative_discount":`{{discount}}%`,"paywall_variables.total_price_and_per_month":`{{formattedPrice}}/{{period}} ({{formattedPricePerMonth}}/{{monthPeriod}})`,"product_info.total_due_today":`Maksettava summa tänään`,"product_info.subscribe_to":`Tilaa`,"navbar_header.details":`Yksityiskohdat`,"navbar_header.back_button":`Takaisin`,"pricing_dropdown.show_details":`Näytä tiedot`,"pricing_dropdown.hide_details":`Piilota tiedot`,"pricing_table.tax":`Vero`,"pricing_table.trial_ends":`Kokeilujakson päätyttyÃ
40¤, {{formattedTrialEndDate}}`,"pricing_table.total_due_today":`Maksettava summa tänään`,"pricing_table.total_excluding_tax":`Veroton kokonaissumma`,"pricing_table.enter_billing_address_to_calculate":`Syötä laskutusosoite laskeaksesi`,"pricing_table.enter_state_or_postal_code_to_calculate":`Syötä osavaltio tai postinumero laskeaksesi`,"pricing_table.enter_postal_code_to_calculate":`Syötä postinumero laskeaksesi`,"error_page.error_message_invalid_email_error":`Sähköpostiosoitetta {{email}} ei voitu vahvistaa. Anna kelvollinen sähköpostiosoite.`,"payment_entry_page.button_payment_method":`Maksa {{formattedPrice}} käyttämällä {{paymentMethod}}`,"payment_entry_page.button_with_price":`Maksa {{formattedPrice}}`,"price_update.title":`Hinnan päivitys`,"price_update.base_message":`Kokonaishinta on päivitetty verolla laskutusosoitteesi perusteella. Tarkista ja yritä uudelleen. Korttiasi veloitetaan vain kerran.`,"price_update.trial_message":`Tilauksen hinta on päivitetty sisältämään verot laskutusosoitteesi perusteella. Ilmainen kokeilujakso on edelleen voimassa. Tarkista ja yritä uudelleen.`,"payment_entry_page.express_checkout_divider":`TAI MAKSA KORTILLA`,"error_page.trouble_accessing":`Jos sinulla on ongelmia ostoksesi käyttämisessä, ota yhteyttä tukeen osoitteessa `,"error_page.close_button_title":`Siirry sovellukseen {{appName}}`,"error_page.error_title_stripe_missing_required_permission":`Puuttuva Stripe-käyttöoikeus`,"error_page.button_close":`Sulje`,"error_page.error_message_stripe_invalid_tax_origin_address":`Osto epäonnistui, koska veron alkuperäosoite on virheellinen. Tuotantoympäristössä ostot toimivat ilman veroja.`,"error_page.error_message_stripe_tax_not_active":`Osto epäonnistui, koska Stripe Tax ei ole käytössä. Tuotantoympäristössä ostot toimivat ilman veroja.`,"error_page.error_only_in_sandbox":`Tämä viesti näkyy vain hiekkalaatikossa.`,"error_page.error_message_stripe_missing_required_permission":`Osto epäonnistui, koska Stripe-sovellukselta puuttuu vaadittu käyttöoikeus. Tuotantoympäristössä ostot toimivat ilman veroja.`,"error_page.error_title_stripe_tax_not_active":`Stripe Tax ei ole aktiivinen`,"error_page.error_title_stripe_invalid_tax_origin_address":`Virheellinen veron alkuperäosoite`,"apple_pay.free_trial":`Ilmainen kokeilu`,"product_info.price_after_intro_price":`{{introPriceDuration}} jälkeen, {{renewalDate}}`,"product_info.after_trial":`kokeilujakson jälkeen`,"product_info.after":`jälkeen`,"product_info.intro_price_phase_after_trial":`Sitten {{introPriceDuration}} hintaan {{introPrice}}`,"product_info.intro_price_phase":`Ensimmäiset {{introPriceDuration}} hintaan {{introPrice}}`,"product_info.intro_price_phase_paid_once":`maksetaan kerran`,"payment_entry_page.trial_subscription_terms_info":`Kokeilujakson päätyttyä sinulta veloitetaan {{price}} {{perFrequency}} alkaen {{renewalDate}}. Voit peruuttaa milloin tahansa ennen tätä päivämäärää.`,"payment_entry_page.subscription_info":`Tilaus uusiutuu automaattisesti. Peruuta milloin tahansa.`,"payment_entry_page.otp_terms_info":`Ostamalla hyväksyt, että {{appName}} veloittaa sinua heidän ehtojensa mukaisesti.`,"payment_entry_page.terms_link_label":`Ehdot`,"payment_entry_page.subscription_terms_info":`Tilaamalla hyväksyt, että {{appName}} veloittaa sinulta ehtojensa mukaisesti, kunnes peruutat tilauksen.`,"loading_page.keep_page_open":`Prosessi on melkein valmis. Pidä tämä sivu auki.`,"loading_page.processing_payment":`Maksua käsitellään`,"pricing_table.discount":`Alennus`,"pricing_table.subtotal":`Välisumma`,"pricing_dropdown.add_promo_code":`Lisää kampanjakoodi`,"discount_input.label":`Kampanjakoodi`,"payment_entry_page.checkout_consent_terms_of_service":`käyttöehdot`,"payment_entry_page.checkout_consent_agreement":`Hyväksyn {{appName}}-palvelun {{termsOfService}}.`},Kde={"periods.week":`{{amount}} semaine`,"periods.month":`{{amount}} mois`,"periods.year":`{{amount}} an`,"periods.day":`{{amount}} jour`,"periods.weekShort":`{{amount}}sem`,"periods.monthShort":`{{amount}}mois`,"periods.yearShort":`{{amount}}an`,"periods.dayShort":`{{amount}}j`,"periods.lifetime":`à vie`,"periods.weekPlural":`{{amount}} semaines`,"periods.monthPlural":`{{amount}} mois`,"periods.yearPlural":`{{amount}} ans`,"periods.dayPlural":`{{amount}} jours`,"periods.weekFrequency":`hebdomadaire`,"periods.monthFrequency":`mensuel`,"periods.yearFrequency":`annuel`,"periods.dayFrequency":`quotidien`,"periods.perWeekFrequency":`par semaine`,"periods.perMonthFrequency":`par mois`,"periods.perYearFrequency":`par an`,"periods.perDayFrequency":`par jour`,"periods.unknownFrequency":`inconnu`,"periods.weekFrequencyPlural":`toutes les {{amount}} semaines`,"periods.monthFrequencyPlural":`tous les {{amount}} mois`,"periods.yearFrequencyPlural":`tous les {{amount}} ans`,"periods.dayFrequencyPlural":`tous les {{amount}} jours`,"product_info.product_title":`{{productTitle}}`,"product_info.product_description":`{{productDescription}}`,"product_info.product_price":`{{productPrice}}`,"product_info.free_trial_duration":`{{trialDuration}} essai gratuit`,"product_info.price_after_free_trial":`Après la fin de l'essai, le {{renewalDate}}`,"product_info.renewal_frequency":`Renouvellement {{frequency}}`,"product_info.continues_until_cancelled":`Continue jusqu'à annulation`,"product_info.cancel_anytime":`Annulez à tout moment`,"payment_entry_page.payment_step_title":`Paiement sécurisé par RevenueCat`,"payment_entry_page.button_pay":`Payer maintenant`,"payment_entry_page.button_start_trial":`Commencer l'essai`,"success_page.purchase_successful":`Paiement effectué`,"success_page.button_close"
40:`Continuer`,"error_page.if_error_persists":`Si l'erreur persiste, veuillez contacter `,"error_page.error_title_already_subscribed":`Vous êtes déjà abonné à {{productTitle}}`,"error_page.error_title_already_purchased":`Vous avez déjà acheté {{productTitle}}`,"error_page.error_title_other_errors":`Une erreur s'est produite`,"error_page.error_message_already_subscribed":`Vous ne pouvez pas vous abonner à nouveau à ce produit.`,"error_page.error_message_already_purchased":`Vous ne pouvez pas acheter ce produit à nouveau.`,"error_page.error_message_missing_email_error":`L'adresse e-mail est requise pour effectuer l'achat.`,"error_page.error_message_network_error":`Erreur réseau. Veuillez vérifier votre connexion Internet.`,"error_page.error_message_error_charging_payment":`Ãchec du paiement.`,"error_page.error_message_error_setting_up_purchase":`L'achat n'a pas pu démarrer en raison d'une erreur (code d'erreur : {{errorCode}}).`,"error_page.error_message_invalid_tax_location":`Nous n'avons pas pu vérifier votre adresse de facturation. Veuillez vérifier que le code postal et le pays sont corrects.`,"error_page.error_message_unknown_error":`Une erreur inconnue s'est produite (code d'erreur : {{errorCode}}).`,"error_page.button_try_again":`Réessayer`,"paywall_variables.price_per_period":`{{formattedPrice}}/{{period}}`,"paywall_variables.sub_relative_discount":`{{discount}}%`,"paywall_variables.total_price_and_per_month":`{{formattedPrice}}/{{period}} ({{formattedPricePerMonth}}/{{monthPeriod}})`,"product_info.total_due_today":`Total dû aujourd'hui`,"product_info.subscribe_to":`S'abonner à `,"navbar_header.details":`Détails`,"navbar_header.back_button":`Retour`,"pricing_dropdown.show_details":`Afficher les détails`,"pricing_dropdown.hide_details":`Masquer les détails`,"pricing_table.tax":`Taxe`,"pricing_table.trial_ends":`Après la fin de l'essai, le {{formattedTrialEndDate}}`,"pricing_table.total_due_today":`Total dû aujourd'hui`,"pricing_table.total_excluding_tax":`Total hors taxes`,"pricing_table.enter_billing_address_to_calculate":`Saisir l'adresse de facturation pour calculer`,"pricing_table.enter_state_or_postal_code_to_calculate":`Entrez l'état ou le code postal pour calculer`,"pricing_table.enter_postal_code_to_calculate":`Entrez le code postal pour calculer`,"error_page.error_message_invalid_email_error":`L'adresse e-mail {{email}} n'a pas pu être vérifiée. Veuillez fournir une adresse e-mail valide.`,"payment_entry_page.button_payment_method":`Payer {{formattedPrice}} avec {{paymentMethod}}`,"payment_entry_page.button_with_price":`Payer {{formattedPrice}}`,"price_update.title":`Mise à jour du prix`,"price_update.base_message":`Le prix total a été mis à jour avec la taxe en fonction de votre adresse de facturation. Veuillez vérifier et réessayer. Votre carte ne sera débitée qu'une seule fois.`,"price_update.trial_message":`Le prix de l'abonnement a été mis à jour pour inclure les taxes en fonction de votre adresse de facturation. La période d'essai gratuit reste applicable. Veuillez vérifier et réessayer.`,"payment_entry_page.express_checkout_divider":`OU PAYER PAR CARTE`,"error_page.trouble_accessing":`Si vous avez des difficultés à accéder à votre achat, contactez le support à l'adresse suivante : `,"error_page.close_button_title":`Aller sur {{appName}}`,"error_page.error_title_stripe_missing_required_permission":`Autorisation Stripe manquante`,"error_page.button_close":`Fermer`,"error_page.error_message_stripe_invalid_tax_origin_address":`L'achat a échoué car l'adresse d'origine de la taxe n'est pas valide. En production, les achats fonctionneront sans taxes appliquées.`,"error_page.error_message_stripe_tax_not_active":`L'achat a échoué car Stripe Tax n'est pas activé. En production, les achats fonctionneront sans taxes appliquées.`,"error_page.error_only_in_sandbox":`Ce message apparaît uniquement dans l'environnement de test.`,"error_page.error_message_stripe_missing_required_permission":`L'achat a échoué car l'application Stripe ne dispose pas d'une autorisation requise. En production, les achats fonctionneront sans taxes appliquées.`,"error_page.error_title_str
40ipe_tax_not_active":`Stripe Tax non actif`,"error_page.error_title_stripe_invalid_tax_origin_address":`Adresse d'origine de la taxe non valide`,"apple_pay.free_trial":`Essai gratuit`,"product_info.price_after_intro_price":`Après {{introPriceDuration}}, le {{renewalDate}}`,"product_info.after_trial":`après l'essai`,"product_info.after":`après`,"product_info.intro_price_phase_after_trial":`Puis {{introPriceDuration}} pour {{introPrice}}`,"product_info.intro_price_phase":`{{introPriceDuration}} pour {{introPrice}} au départ`,"product_info.intro_price_phase_paid_once":`payé une fois`,"payment_entry_page.trial_subscription_terms_info":`Après la fin de votre essai, vous serez facturé {{price}} {{perFrequency}} à partir du {{renewalDate}}. Vous pouvez annuler à tout moment avant cette date.`,"payment_entry_page.subscription_info":`L'abonnement est renouvelé automatiquement. Annulez à tout moment.`,"payment_entry_page.otp_terms_info":`En achetant, vous acceptez d'autoriser {{appName}} à vous facturer conformément à ses conditions.`,"payment_entry_page.terms_link_label":`Conditions`,"payment_entry_page.subscription_terms_info":`En vous abonnant, vous acceptez d'autoriser {{appName}} à vous facturer conformément à ses conditions jusqu'à ce que vous annuliez.`,"loading_page.keep_page_open":`Le processus est presque terminé. Veuillez garder cette page ouverte.`,"loading_page.processing_payment":`Paiement en cours`,"pricing_table.discount":`Remise`,"pricing_table.subtotal":`Sous-total`,"pricing_dropdown.add_promo_code":`Ajouter un code promotionnel`,"discount_input.label":`Code promo`,"payment_entry_page.checkout_consent_terms_of_service":`conditions d'utilisation`,"payment_entry_page.checkout_consent_agreement":`J'accepte les {{termsOfService}} de {{appName}}.`},qde={"periods.week":`{{amount}} Woche`,"periods.month":`{{amount}} Monat`,"periods.year":`{{amount}} Jahr`,"periods.day":`{{amount}} Tag`,"periods.weekShort":`{{amount}}Wo`,"periods.monthShort":`{{amount}}Mo`,"periods.yearShort":`{{amount}}J`,"periods.dayShort":`{{amount}}T`,"periods.lifetime":`lebenslang`,"periods.weekPlural":`{{amount}} Wochen`,"periods.monthPlural":`{{amount}} Monate`,"periods.yearPlural":`{{amount}} Jahre`,"periods.dayPlural":`{{amount}} Tage`,"periods.weekFrequency":`wöchentlich`,"periods.monthFrequency":`monatlich`,"periods.yearFrequency":`jährlich`,"periods.dayFrequency":`täglich`,"periods.perWeekFrequency":`pro Woche`,"periods.perMonthFrequency":`pro Monat`,"periods.perYearFrequency":`pro Jahr`,"periods.perDayFrequency":`pro Tag`,"periods.unknownFrequency":`unbekannt`,"periods.weekFrequencyPlural":`alle {{amount}} Wochen`,"periods.monthFrequencyPlural":`alle {{amount}} Monate`,"periods.yearFrequencyPlural":`alle {{amount}} Jahre`,"periods.dayFrequencyPlural":`alle {{amount}} Tage`,"product_info.product_title":`{{productTitle}}`,"product_info.product_description":`{{productDescription}}`,"product_info.product_price":`{{productPrice}}`,"product_info.free_trial_duration":`{{trialDuration}} kostenlose Testversion`,"product_info.price_after_free_trial":`Nach Ablauf der Testversion, am {{renewalDate}}`,"product_info.renewal_frequency":`Verlängert sich {{frequency}}`,"product_info.continues_until_cancelled":`Läuft bis zur Kündigung`,"product_info.cancel_anytime":`Jederzeit kündbar`,"payment_entry_page.payment_step_title":`Sicherer Checkout über RevenueCat`,"payment_entry_page.button_pay":`Jetzt bezahlen`,"payment_entry_page.button_start_trial":`Testversion starten`,"success_page.purchase_successful":`Zahlung abgeschlossen`,"success_page.button_close":`Weiter`,"error_page.if_error_persists":`Wenn der Fehler weiterhin besteht, wenden Sie sich bitte an `,"error_page.error_title_already_subscribed":`Du hast {{productTitle}} bereits abonniert`,"error_page.error_title_already_purchased":`Du hast {{productTitle}} bereits gekauft`,"error_page.error_title_other_errors":`Etwas ist schief gelaufen`,"error_page.error_message_already_subscribed":`Du kannst dieses Produkt nicht erneut abonnieren.`,"error_page.error_message_already_purchased":`Du kannst dieses Produkt nicht erneut kaufen.`,"error_page.error_message_missing_email_error":`Für den Kauf ist eine E-Mail-Adresse erforderlich.`,"error_page.error_message_network_error":`Netzwerkfehler. Bitte überprüfen Sie Ihre Internetverbindung.`,"error_page.error_message_error_charging_payment":`Zahlung fehlgeschlagen.`,"error_page.error_message_error_setting_up_purchase":`Der Kauf wurde aufgrund eines Fehlers nicht gestartet (Fehlercode: {{errorCode}}
40).`,"error_page.error_message_invalid_tax_location":`Wir konnten Ihre Rechnungsadresse nicht überprüfen. Bitte überprüfen Sie, ob die Postleitzahl und das Land korrekt sind.`,"error_page.error_message_unknown_error":`Ein unbekannter Fehler ist aufgetreten (Fehlercode: {{errorCode}}).`,"error_page.button_try_again":`Erneut versuchen`,"paywall_variables.price_per_period":`{{formattedPrice}}/{{period}}`,"paywall_variables.sub_relative_discount":`{{discount}}%`,"paywall_variables.total_price_and_per_month":`{{formattedPrice}}/{{period}} ({{formattedPricePerMonth}}/{{monthPeriod}})`,"product_info.total_due_today":`Heute fälliger Gesamtbetrag`,"product_info.subscribe_to":`Abonnieren`,"navbar_header.details":`Details`,"navbar_header.back_button":`Zurück`,"pricing_dropdown.show_details":`Details anzeigen`,"pricing_dropdown.hide_details":`Details ausblenden`,"pricing_table.tax":`Steuer`,"pricing_table.trial_ends":`Nach Ablauf der Testphase, am {{formattedTrialEndDate}}`,"pricing_table.total_due_today":`Heute fälliger Gesamtbetrag`,"pricing_table.total_excluding_tax":`Gesamtbetrag ohne Steuer`,"pricing_table.enter_billing_address_to_calculate":`Rechnungsadresse eingeben, um zu berechnen`,"pricing_table.enter_state_or_postal_code_to_calculate":`Bundesland oder Postleitzahl zur Berechnung eingeben`,"pricing_table.enter_postal_code_to_calculate":`Postleitzahl zur Berechnung eingeben`,"error_page.error_message_invalid_email_error":`Die E-Mail-Adresse {{email}} konnte nicht verifiziert werden. Bitte gib eine gültige E-Mail-Adresse an.`,"payment_entry_page.button_payment_method":`Mit {{paymentMethod}} für {{formattedPrice}} bezahlen`,"payment_entry_page.button_with_price":`{{formattedPrice}} bezahlen`,"price_update.title":`Preisaktualisierung`,"price_update.base_message":`Der Gesamtpreis wurde basierend auf Ihrer Rechnungsadresse mit Steuern aktualisiert. Bitte überprüfen Sie ihn und versuchen Sie es erneut. Ihre Karte wird erst belastet, wenn alles korrekt ist.`,"price_update.trial_message":`Der Abonnementpreis wurde aktualisiert, um Steuern basierend auf Ihrer Rechnungsadresse einzuschlieÃen. Die kostenlose Testphase gilt weiterhin. Bitte überprüfen Sie und versuchen Sie es erneut.`,"payment_entry_page.express_checkout_divider":`ODER MIT KARTE ZAHLEN`,"error_page.trouble_accessing":`Wenn Sie Probleme beim Zugriff auf Ihren Kauf haben, wenden Sie sich an den Support unter `,"error_page.close_button_title":`Zu {{appName}} gehen`,"error_page.error_title_stripe_missing_required_permission":`Fehlende Stripe-Berechtigung`,"error_page.button_close":`SchlieÃen`,"error_page.error_message_stripe_invalid_tax_origin_address":`Der Kauf ist fehlgeschlagen, da die Steuerursprungsadresse ungültig ist. In der Produktion funktionieren Käufe ohne angewendete Steuern.`,"error_page.error_message_stripe_tax_not_active":`Der Kauf ist fehlgeschlagen, da Stripe Tax nicht aktiviert ist. In der Produktion funktionieren Käufe ohne angewendete Steuern.`,"error_page.error_only_in_sandbox":`Diese Meldung wird nur in der Sandbox angezeigt.`,"error_page.error_message_stripe_missing_required_permission":`Der Kauf ist fehlgeschlagen, da der Stripe-App eine erforderliche Berechtigung fehlt. In der Produktion funktionieren Käufe ohne angewendete Steuern.`,"error_page.error_title_stripe_tax_not_active":`Stripe Tax ist nicht aktiv`,"error_page.error_title_stripe_invalid_tax_origin_address":`Ungültige Steuerursprungsadresse`,"apple_pay.free_trial":`Kostenlose Testversion`,"product_info.price_after_intro_price":`Nach {{introPriceDuration}}, am {{renewalDate}}`,"product_info.after_trial":`nach Testphase`,"product_info.after":`nach`,"product_info.intro_price_phase_after_trial":`Danach {{introPriceDuration}} für {{introPrice}}`,"product_info.intro_price_phase":`Zuerst {{introPriceDuration}} für {{introPrice}}`,"product_info.intro_price_phase_paid_once":`einmalig bezahlt`,"payment_entry_page.trial_subscription_terms_info":`Nach Ablauf Ihres Testzeitraums werden Ihnen {{price}} {{perFrequency}} ab dem {{renewalDate}} berechnet. Sie können jederzeit vor diesem Datum kündigen.`,"payment_entry_page.subscription_info":`Das Abonnement verlängert sich automatisch. Jederzeit kündbar.`,"payment_entry_page.otp_terms_info":`Mit dem Kauf erklären Sie sich einverstanden, dass {{appName}} Ihnen Gebühren gemäà ihren Bedingungen berechnet.`,"payment_entry_page.terms_link_label":`Bedingungen`,"payment_entry_page.subscription_terms_info":`Mit dem Abonnieren erklären Sie sich damit einverstanden, dass {{appName}} Ihnen gemäà ihren Bedingungen Gebühren berechnet, bis Sie kündigen.`,"loading_page.keep_page_open":`Der Vorgang ist fast abgeschlossen. Bitte lassen Sie diese Seite geöffnet.`,"loading_page.processing_payment":`Zahlung wird verarbeitet`,"pricing_table.discount":`Rabatt`,"pricing_table.subtotal":`Zwischensumme`,"pricing_dropdown.add_promo_code":`Promo-Code hinzufügen`,"discount_input.label":`Gutscheincode`,"payment_entry_page.checkout_consent_terms_of_service":`Nutzungsbedingungen`,"payment_entry_page.checkout_consent_agreement":`Ich stimme den {{appName}} {{termsOfService}} zu.`},Jde={"periods.week":`{{amount}} εβδομάδα`,"periods.month":`{{amount}} μήναÏ`,"periods.year":`{{amount}} ÏÏÏνοÏ`,"periods.day":`{{amount}}
40 ημÎÏα`,"periods.weekShort":`{{amount}} εβδ.`,"periods.monthShort":`{{amount}} μήν.`,"periods.yearShort":`{{amount}} ÎÏ.`,"periods.dayShort":`{{amount}} ημ.`,"periods.lifetime":`διάÏκεια ζÏήÏ`,"periods.weekPlural":`{{amount}} εβδομάδεÏ`,"periods.monthPlural":`{{amount}} μήνεÏ`,"periods.yearPlural":`{{amount}} ÏÏÏνια`,"periods.dayPlural":`{{amount}} ημÎÏεÏ`,"periods.weekFrequency":`εβδομαδιαία`,"periods.monthFrequency":`μηνιαία`,"periods.yearFrequency":`εÏήÏια`,"periods.dayFrequency":`καθημεÏινά`,"periods.perWeekFrequency":`ανά εβδομάδα`,"periods.perMonthFrequency":`ανά μήνα`,"periods.perYearFrequency":`ανά ÎÏοÏ`,"periods.perDayFrequency":`ανά ημÎÏα`,"periods.unknownFrequency":`άγνÏÏÏο`,"periods.weekFrequencyPlural":`κάθε {{amount}} εβδομάδεÏ`,"periods.monthFrequencyPlural":`κάθε {{amount}} μήνεÏ`,"periods.yearFrequencyPlural":`κάθε {{amount}} ÏÏÏνια`,"periods.dayFrequencyPlural":`κάθε {{amount}} ημÎÏεÏ`,"product_info.subscribe_to":`ÎγγÏαÏείÏε ÏÏο`,"product_info.product_title":`{{productTitle}}`,"product_info.product_description":`{{productDescription}}`,"product_info.product_price":`{{productPrice}}`,"product_info.free_trial_duration":`ÎÏÏεάν για {{trialDuration}}`,"product_info.price_after_free_trial":`ÎεÏά Ïη λήξη ÏÎ·Ï Î´Î¿ÎºÎ¹Î¼Î®Ï, ÏÏÎ¹Ï {{renewalDate}}`,"product_info.total_due_today":`ΣÏνολο ÏληÏÏÏÎο ÏήμεÏα`,"product_info.renewal_frequency":`ÎνανεÏνεÏαι {{frequency}}`,"product_info.continues_until_cancelled":`ΣÏ
νεÏίζεÏαι μÎÏÏι Ïην ακÏÏÏÏη`,"product_info.cancel_anytime":`ÎκÏÏÏÏη ανά ÏάÏα ÏÏιγμή`,"payment_entry_page.payment_step_title":`ÎÏÏÎ±Î»Î®Ï Î¿Î»Î¿ÎºÎ»Î®ÏÏÏη αγοÏÎ¬Ï Î±ÏÏ Ïην RevenueCat`,"payment_entry_page.button_pay":`ΠληÏÏμή ÏÏÏα`,"payment_entry_page.button_start_trial":`ÎναÏξη δοκιμήÏ`,"success_page.purchase_successful":`Î ÏληÏÏμή ολοκληÏÏθηκε`,"success_page.button_close":`ΣÏ
νÎÏεια`,"error_page.if_error_persists":`Îάν Ïο ÏÏάλμα ÏαÏαμÎνει, εÏικοινÏνήÏÏε με `,"error_page.error_title_already_subscribed":`ÎÏεÏε ήδη εγγÏαÏεί ÏÏο {{productTitle}}`,"error_page.error_title_already_purchased":`ÎÏεÏε ήδη αγοÏάÏει Ïο {{productTitle}}`,"error_page.error_title_other_errors":`ÎάÏι Ïήγε ÏÏÏαβά`,"error_page.error_message_already_subscribed":`Îεν μÏοÏείÏε να εγγÏαÏείÏε ξανά Ïε αÏ
ÏÏ Ïο ÏÏοÏÏν.`,"error_page.error_message_already_purchased":`Îεν μÏοÏείÏε να αγοÏάÏεÏε ξανά αÏ
ÏÏ Ïο ÏÏοÏÏν.`,"error_page.error_message_missing_email_error":`ÎÏαιÏείÏαι email για Ïην ολοκλήÏÏÏη ÏÎ·Ï Î±Î³Î¿ÏάÏ.`,"error_page.error_message_network_error":`ΣÏάλμα δικÏÏοÏ
. ÎλÎγξÏε Ïη ÏÏνδεÏή ÏÎ±Ï ÏÏο διαδίκÏÏ
ο.`,"error_page.error_message_error_charging_payment":`Î ÏληÏÏμή αÏÎÏÏ
Ïε.`,"error_page.error_message_error_setting_up_purchase":`ΠαγοÏά δεν ξεκίνηÏε λÏÎ³Ï ÏÏάλμαÏÎ¿Ï (κÏδικÏÏ ÏÏάλμαÏοÏ: {{errorCode}}).`,"error_page.error_message_invalid_tax_location":`Îεν μÏοÏÎÏαμε να εÏαληθεÏÏοÏ
με Ïη διεÏθÏ
νÏη ÏÏÎÏÏÎ®Ï ÏαÏ. ΠαÏακαλοÏμε ελÎγξÏε ξανά Ïον ÏαÏÏ
δÏÎ¿Î¼Î¹ÎºÏ ÎºÏδικα και Ïη ÏÏÏα για να βεβαιÏθείÏε ÏÏι είναι ÏÏÏÏά.`,"error_page.error_message_unknown_error":`ΠαÏοÏ
ÏιάÏÏηκε Îνα άγνÏÏÏο ÏÏάλμα (κÏδικÏÏ ÏÏάλμαÏοÏ: {{errorCode}}).`,"error_page.button_try_again":`Î ÏοÏÏαθήÏÏε ξανά`,"paywall_variables.price_per_period":`{{formattedPrice}}/{{period}}`,"paywall_variables.sub_relative_discount":`{{discount}}%`,"paywall_variables.total_price_and_per_month":`{{formattedPrice}}/{{period}}({{formattedPricePerMonth}}/{{monthPeriod}})`,"navbar_header.details":`ÎεÏÏομÎÏειεÏ`,"navbar_header.back_button":`ΠίÏÏ`,"pricing_dropdown.show_details":`ÎμÏάνιÏη λεÏÏομεÏειÏν`,"pricing_dropdown.hide_details":`ÎÏÏκÏÏ
Ïη λεÏÏομεÏειÏν`,"pricing_table.tax":`ΦÏÏοÏ`,"pricing_table.trial_ends":`ÎεÏά Ïη λήξη ÏÎ·Ï Î´Î¿ÎºÎ¹Î¼Î±ÏÏÎ¹ÎºÎ®Ï ÏεÏιÏδοÏ
, ÏÏÎ¹Ï {{formattedTrialEndDate}}`,"pricing_table.total_due_today":`ΣÏνολο ÏληÏÏÏÎο ÏήμεÏα`,"pricing_table.total_excluding_tax":`ΣÏνολο ÏÏÏÎ¯Ï ÏÏÏο`,"pricing_table.enter_billing_address_to_calculate":`ÎιÏαγάγεÏε Ïη διεÏθÏ
νÏη ÏÏÎÏÏÎ·Ï Î³Î¹Î± να Ï
ÏολογιÏÏεί`,"pricing_table.enter_state_or_postal_code_to_calculate":`ÎιÏαγάγεÏε Ïην ÏολιÏεία ή Ïον ÏαÏÏ
δÏÎ¿Î¼Î¹ÎºÏ ÎºÏδικα για να Ï
ÏολογιÏÏεί`,"pricing_table.enter_postal_code_to_calculate":`ÎιÏαγάγεÏε Ïον ÏαÏÏ
δÏÎ¿Î¼Î¹ÎºÏ ÎºÏδικα για να Ï
ÏολογιÏÏεί`,"error_page.error_message_invalid_email_error":`ΠδιεÏθÏ
νÏη email {{email}} δεν μÏÏÏεÏε να εÏαληθεÏ
Ïεί. ΠαÏÎ±ÎºÎ±Î»Ï Î´ÏÏÏε μια ÎγκÏ
Ïη διεÏθÏ
νÏη email.`,"payment_entry_page.button_payment_method":`ΠληÏÏμή {{formattedPrice}} με {{paymentMethod}}`,"payment_entry_page.button_with_price":`ΠληÏÏμή {{formattedPrice}}`,"price_update.title":`ÎνημÎÏÏÏη ÏιμήÏ`,"price_update.base_message":`Î ÏÏ
νολική Ïιμή ενημεÏÏθηκε με Ïον ÏÏÏο βάÏει ÏÎ·Ï Î´Î¹ÎµÏθÏ
νÏÎ·Ï ÏÏÎÏÏÎ®Ï ÏαÏ. ÎλÎγξÏε και δοκιμάÏÏε ξανά. ΠκάÏÏα ÏÎ±Ï Î¸Î± ÏÏεÏθεί μÏνο μία ÏοÏά.`,"price_update.trial_message":`Î Ïιμή ÏÎ·Ï ÏÏ
νδÏÎ¿Î¼Î®Ï ÎµÎ½Î·Î¼ÎµÏÏθηκε για να ÏÏ
μÏεÏιλάβει ÏοÏ
Ï ÏÏÏοÏ
Ï Î²Î¬Ïει ÏÎ·Ï Î´Î¹ÎµÏθÏ
νÏÎ·Ï ÏÏÎÏÏÎ®Ï ÏαÏ. ΠδÏÏεάν δοκιμαÏÏική ÏεÏÎ¯Î¿Î´Î¿Ï ÎµÎ¾Î±ÎºÎ¿Î»Î¿Ï
θεί να ιÏÏÏει. ΠαÏÎ±ÎºÎ±Î»Ï ÎµÎ»ÎγξÏε και δοκιμάÏÏε ξανά.`,"payment_entry_page.express_checkout_divider":`Î Î ÎÎΡΩΣΤΠÎÎ ÎÎΡΤÎ`,"error_page.trouble_accessing":`Îάν ανÏιμεÏÏÏίζεÏε ÏÏοβλήμαÏα ÏÏÏÏβαÏÎ·Ï ÏÏην αγοÏά ÏαÏ, εÏικοινÏνήÏÏε με Ïην Ï
ÏοÏÏήÏιξη ÏÏο `,"error_page.close_button_title":`ÎεÏάβαÏη ÏÏο {{appName}}
40`,"error_page.error_title_stripe_missing_required_permission":`ÎείÏει άδεια Stripe`,"error_page.button_close":`ÎλείÏιμο`,"error_page.error_message_stripe_invalid_tax_origin_address":`ΠαγοÏά αÏÎÏÏ
Ïε εÏειδή η διεÏθÏ
νÏη ÏÏοÎλεÏ
ÏÎ·Ï ÏÏÏοÏ
δεν είναι ÎγκÏ
Ïη. ΣÏην ÏαÏαγÏγή, οι αγοÏÎÏ Î¸Î± λειÏοÏ
ÏγοÏν ÏÏÏÎ¯Ï Î½Î± εÏαÏμÏζονÏαι ÏÏÏοι.`,"error_page.error_message_stripe_tax_not_active":`ΠαγοÏά αÏÎÏÏ
Ïε εÏειδή Ïο Stripe Tax δεν είναι ενεÏγοÏοιημÎνο. ΣÏην ÏαÏαγÏγή, οι αγοÏÎÏ Î¸Î± λειÏοÏ
ÏγοÏν ÏÏÏÎ¯Ï Î½Î± εÏαÏμÏζονÏαι ÏÏÏοι.`,"error_page.error_only_in_sandbox":`ÎÏ
ÏÏ Ïο μήνÏ
μα εμÏανίζεÏαι μÏνο ÏÏο sandbox.`,"error_page.error_message_stripe_missing_required_permission":`ΠαγοÏά αÏÎÏÏ
Ïε εÏειδή η εÏαÏμογή Stripe δεν διαθÎÏει Ïην αÏαιÏοÏμενη άδεια. ΣÏην ÏαÏαγÏγή, οι αγοÏÎÏ Î¸Î± λειÏοÏ
ÏγοÏν ÏÏÏÎ¯Ï Î½Î± εÏαÏμÏζονÏαι ÏÏÏοι.`,"error_page.error_title_stripe_tax_not_active":`Το Stripe Tax δεν είναι ενεÏγÏ`,"error_page.error_title_stripe_invalid_tax_origin_address":`Îη ÎγκÏ
Ïη διεÏθÏ
νÏη ÏÏοÎλεÏ
ÏÎ·Ï ÏÏÏοÏ
`,"apple_pay.free_trial":`ÎÏÏεάν δοκιμή`,"product_info.price_after_intro_price":`ÎεÏά αÏÏ {{introPriceDuration}}, ÏÏÎ¹Ï {{renewalDate}}`,"product_info.after_trial":`μεÏά Ïη δοκιμή`,"product_info.after":`μεÏά`,"product_info.intro_price_phase_after_trial":`ÎÏειÏα {{introPriceDuration}} για {{introPrice}}`,"product_info.intro_price_phase":`ÎÏÏικά {{introPriceDuration}} για {{introPrice}}`,"product_info.intro_price_phase_paid_once":`ÏληÏÏμÎνο εÏάÏαξ`,"payment_entry_page.trial_subscription_terms_info":`ÎεÏά Ïη λήξη ÏÎ·Ï Î´Î¿ÎºÎ¹Î¼Î±ÏÏÎ¹ÎºÎ®Ï ÏεÏιÏδοÏ
, θα ÏÏεÏθείÏε {{price}} {{perFrequency}} ξεκινÏνÏÎ±Ï Î±ÏÏ {{renewalDate}}. ÎÏοÏείÏε να ακÏ
ÏÏÏεÏε ανά ÏάÏα ÏÏιγμή ÏÏιν αÏÏ Î±Ï
Ïήν Ïην ημεÏομηνία.`,"payment_entry_page.subscription_info":`Î ÏÏ
νδÏομή ανανεÏνεÏαι αÏ
ÏÏμαÏα. ÎκÏ
ÏÏÏÏε ανά ÏάÏα ÏÏιγμή.`,"payment_entry_page.otp_terms_info":`Îε Ïην αγοÏά, ÏÏ
μÏÏνείÏε να εÏιÏÏÎÏεÏε ÏÏην {{appName}} να ÏÎ±Ï ÏÏεÏÏει ÏÏμÏÏνα με ÏοÏ
Ï ÏÏοÏ
Ï ÏηÏ.`,"payment_entry_page.terms_link_label":`ÎÏοι`,"payment_entry_page.subscription_terms_info":`Îε Ïην εγγÏαÏή ÏαÏ, ÏÏ
μÏÏνείÏε να εÏιÏÏÎÏεÏε ÏÏην εÏαÏμογή {{appName}} να ÏÎ±Ï ÏÏεÏνει ÏÏμÏÏνα με ÏοÏ
Ï ÏÏοÏ
Ï ÏÎ·Ï ÎÏÏ ÏÏοÏ
ακÏ
ÏÏÏεÏε.`,"loading_page.keep_page_open":`ΠδιαδικαÏία ÏÏεδÏν ολοκληÏÏθηκε. ÎÏαÏήÏÏε αÏ
Ïή Ïη Ïελίδα ανοιÏÏή.`,"loading_page.processing_payment":`ÎÏεξεÏγαÏία ÏληÏÏμήÏ`,"pricing_table.discount":`ÎκÏÏÏÏη`,"pricing_table.subtotal":`Î¥ÏοÏÏνολο`,"pricing_dropdown.add_promo_code":`Î ÏοÏθήκη κÏÎ´Î¹ÎºÎ¿Ï ÏÏοÏÏοÏάÏ`,"discount_input.label":`ÎÏδικÏÏ ÏÏοÏÏοÏάÏ`,"payment_entry_page.checkout_consent_terms_of_service":`ÏÏοÏ
Ï ÏÏήÏηÏ`,"payment_entry_page.checkout_consent_agreement":`ΣÏ
μÏÏÎ½Ï Î¼Îµ ÏοÏ
Ï {{appName}} {{termsOfService}}.`},Yde={"periods.week":`{{amount}} ש×××¢`,"periods.month":`{{amount}} ×××ש`,"periods.year":`{{amount}} ×©× ×`,"periods.day":`{{amount}} ×××`,"periods.weekShort":`{{amount}}wk`,"periods.monthShort":`{{amount}}mo`,"periods.yearShort":`{{amount}}yr`,"periods.dayShort":`{{amount}}d`,"periods.lifetime":`×××©× ×× ×××××`,"periods.weekPlural":`{{amount}} ש×××¢×ת`,"periods.monthPlural":`{{amount}} ×××ש××`,"periods.yearPlural":`{{amount}} ×©× ××`,"periods.dayPlural":`{{amount}} ××××`,"periods.weekFrequency":`ש×××¢×`,"periods.monthFrequency":`×××ש×`,"periods.yearFrequency":`×©× ×ª×`,"periods.dayFrequency":`××××`,"periods.perWeekFrequency":`×ש×××¢`,"periods.perMonthFrequency":`××××ש`,"periods.perYearFrequency":`××©× ×`,"periods.perDayFrequency":`××××`,"periods.unknownFrequency":`×× ××××¢`,"periods.weekFrequencyPlural":`×× {{amount}} ש×××¢×ת`,"periods.monthFrequencyPlural":`×× {{amount}} ×××ש××`,"periods.yearFrequencyPlural":`×× {{amount}} ×©× ××`,"periods.dayFrequencyPlural":`×× {{amount}} ××××`,"product_info.product_title":`{{productTitle}}`,"product_info.product_description":`{{productDescription}}`,"product_info.product_price":`{{productPrice}}`,"product_info.free_trial_duration":`{{trialDuration}} × ×ס××× ××× ×`,"product_info.price_after_free_trial":`×××ר ס××× ×× ×ס×××, ×-{{renewalDate}}`,"product_info.renewal_frequency":`×ת××ש {{frequency}}`,"product_info.continues_until_cancelled":`× ××©× ×¢× ×××××`,"product_info.cancel_anytime":`× ××ª× ×××× ××× ×¢×ª`,"payment_entry_page.payment_step_title":`×§××¤× ××××××ת ×××צע×ת RevenueCat`,"payment_entry_page.button_pay":`ש×× ×¢×ש××`,"payment_entry_page.button_start_trial":`×ת×× × ×ס×××`,"success_page.purchase_successful":`×תש××× ××ש××`,"success_page.button_close"
40:`××ש×`,"error_page.if_error_persists":`×× ×ש×××× × ×ש×ת, ×× × ×¤× × ×× `,"error_page.error_title_already_subscribed":`××ר × ×¨×©×ת ××× ×× ×-{{productTitle}}`,"error_page.error_title_already_purchased":`××ר ר×שת ×ת {{productTitle}}`,"error_page.error_title_other_errors":`×ש×× ×שת×ש`,"error_page.error_message_already_subscribed":`××× × ×××× ××××¨×©× ××× ×× ×××צר ×× ×©××.`,"error_page.error_message_already_purchased":`××× × ×××× ×ר××ש ××צר ×× ×©××.`,"error_page.error_message_missing_email_error":`×××"× × ×רש ××× ××ש××× ×ת ×ר××ש×.`,"error_page.error_message_network_error":`ש×××ת רשת. ×× × ××××§ ×ת ××××ר ×××× ××¨× × ×©××.`,"error_page.error_message_error_charging_payment":`×תש××× × ×ש×.`,"error_page.error_message_error_setting_up_purchase":`×ר×××©× ×× ××פע×× ×¢×§× ×©×××× (×§×× ×©××××: {{errorCode}}).`,"error_page.error_message_invalid_tax_location":`×× ×צ××× × ×××ת ×ת ×ת××ת ××××× ×©××. ×× × ××××§ ש×× ×ת ××××§×× ×××××× × ××× ××××× ×©×× × ××× ××.`,"error_page.error_message_unknown_error":`×××¨×¢× ×©×××× ×× ××××¢× (×§×× ×©××××: {{errorCode}}).`,"error_page.button_try_again":`× ×¡× ×©××`,"paywall_variables.price_per_period":`{{formattedPrice}}/{{period}}`,"paywall_variables.sub_relative_discount":`{{discount}}%`,"paywall_variables.total_price_and_per_month":`{{formattedPrice}}/{{period}}({{formattedPricePerMonth}}/{{monthPeriod}})`,"product_info.total_due_today":`ס×"× ×תש××× ××××`,"product_info.subscribe_to":`×××¨×©× ××× ×× ×-`,"navbar_header.details":`פר×××`,"navbar_header.back_button":`××ר×`,"pricing_dropdown.show_details":`××¦× ×¤×¨×××`,"pricing_dropdown.hide_details":`×סתר פר×××`,"pricing_table.tax":`×ס`,"pricing_table.trial_ends":`×××ר ס××× ×ª×§×פת ×× ×ס×××, ×ת×ר×× {{formattedTrialEndDate}}`,"pricing_table.total_due_today":`×¡× ××× ×תש××× ××××`,"pricing_table.total_excluding_tax":`×¡× ××× ×× ×××× ×ס`,"pricing_table.enter_billing_address_to_calculate":`××× ×ת××ת ××××× ××× ××ש×`,"pricing_table.enter_state_or_postal_code_to_calculate":`××× ×××× × ×× ×××§×× ×××ש××`,"pricing_table.enter_postal_code_to_calculate":`××× ×××§×× ×××ש××`,"error_page.error_message_invalid_email_error":`×× × ××ª× ×××ת ×ת ×ת××ת ××××××× {{email}}. ×× × ×¡×¤×§ ×ת××ת ×××××× ×××§×ת.`,"payment_entry_page.button_payment_method":`ש×× {{formattedPrice}} ×××צע×ת {{paymentMethod}}`,"payment_entry_page.button_with_price":`ש×× {{formattedPrice}}`,"price_update.title":`×¢×××× ×××ר`,"price_update.base_message":`××××ר ××××× ×¢×××× ×¢× ×ס ××ת×סס ×¢× ×ת××ת ××××× ×©××. ×× × ××××§ ש×× ×× ×¡× ×©××. ××××× ×ת×צע רק ×¤×¢× ××ת.`,"price_update.trial_message":`×××ר ××× ×× ×¢×××× ××× ××××× ××ס×× ××ת×סס ×¢× ×ת××ת ××××× ×©××. תק×פת ×× ×ס××× ×××× ××ת ×¢×××× ×ª×§×¤×. ×× × ××××§ ×× ×¡× ×©××.`,"payment_entry_page.express_checkout_divider":`×× ×©×× ×××צע×ת ×ר××ס`,"error_page.trouble_accessing":`×× ××ª× ××ª×§×©× ××שת ×ר×××©× ×©××, ×¤× × ×ת×××× ××ת××ת `,"error_page.close_button_title":`×¢××ר ×× {{appName}}`,"error_page.error_title_stripe_missing_required_permission":`××¡×¨× ×רש×× ×©× Stripe`,"error_page.button_close":`ס××ר`,"error_page.error_message_stripe_invalid_tax_origin_address":`×ר×××©× × ×ש×× ×××××× ×©×ת××ת ××§×ר ××ס ××× × ×××§×ת. ×××צ×ר, ר××ש×ת ××¢××× ××× ×ס××.`,"error_page.error_message_stripe_tax_not_active":`×ר×××©× × ×ש×× ×××××× ×©×ס Stripe ××× × ××פע×. ×××צ×ר, ר××ש×ת ××¢××× ××× ×ס××.`,"error_page.error_only_in_sandbox":`××××¢× ×× ××פ××¢× ×¨×§ ××ר×× ×××.`,"error_page.error_message_stripe_missing_required_permission":`×ר×××©× × ×ש×× ×××××× ×©××פ××קצ××ת Stripe ××¡×¨× ×רש×× × ×רשת. ×××צ×ר, ר××ש×ת ××¢××× ××× ×ס××.`,"error_page.error_title_str
40ipe_tax_not_active":`×ס Stripe ×× ×¤×¢××`,"error_page.error_title_stripe_invalid_tax_origin_address":`×ת××ת ××§×ר ×ס ×× ×××§×ת`,"apple_pay.free_trial":`תק×פת × ×ס××× ×××× ×`,"product_info.price_after_intro_price":`×××ר {{introPriceDuration}}, ×ת×ר×× {{renewalDate}}`,"product_info.after_trial":`×××¨× ×ª×§×פת × ×ס×××`,"product_info.after":`××ר×`,"product_info.intro_price_phase_after_trial":`××ר ×× {{introPriceDuration}} ×¢××ר {{introPrice}}`,"product_info.intro_price_phase":`ת×××× {{introPriceDuration}} ×¢××ר {{introPrice}}`,"product_info.intro_price_phase_paid_once":`×ש××× ×¤×¢× ××ת`,"payment_entry_page.trial_subscription_terms_info":`×××ר ס××× ×ª×§×פת ×× ×ס××× ×©××, ת×××× ××¡× {{price}} {{perFrequency}} ××× ×-{{renewalDate}}. ××פשר××ª× ×××× ××× ×¢×ª ××¤× × ×ª×ר×× ××.`,"payment_entry_page.subscription_info":`××× ×× ×ת××ש ×××××××ת. × ××ª× ×××× ××× ×¢×ª.`,"payment_entry_page.otp_terms_info":`×ר××ש×, ××ª× ×ס××× ××פשר ×-{{appName}} ××××× ×××ª× ××ת×× ××ª× ××× ×©×××.`,"payment_entry_page.terms_link_label":`×ª× ×××`,"payment_entry_page.subscription_terms_info":`×¢× ××× ×רש×× ××× ××, ××ª× ×ס××× ××פשר ×-{{appName}} ××××× ×××ª× ××ת×× ××ª× ××× ×©××× ×¢× ×©×ª×××.`,"loading_page.keep_page_open":`×ת×××× ×××¢× ×סת×××. ×ש×ר ××£ ×× ×¤×ª××.`,"loading_page.processing_payment":`××¢×× ×ª×©××× ×ª××¢×`,"pricing_table.discount":`×× ××`,"pricing_table.subtotal":`ס××× ××× ×××`,"pricing_dropdown.add_promo_code":`××סף ×§×× ×§×××× ×××ר×ת`,"discount_input.label":`×§×× ×¤×¨×××`,"payment_entry_page.checkout_consent_terms_of_service":`×ª× ×× ×ש×ר×ת`,"payment_entry_page.checkout_consent_agreement":`×× × ×ס×××/× ×{{termsOfService}} ×©× {{appName}}.`},Xde={"periods.week":`{{amount}} सपà¥à¤¤à¤¾à¤¹`,"periods.month":`{{amount}} महà¥à¤¨à¤¾`,"periods.year":`{{amount}} वरà¥à¤·`,"periods.day":`{{amount}} दिन`,"periods.weekShort":`{{amount}}सपà¥à¤¤à¤¾à¤¹`,"periods.monthShort":`{{amount}}महà¥à¤¨à¤¾`,"periods.yearShort":`{{amount}}वरà¥à¤·`,"periods.dayShort":`{{amount}}दिन`,"periods.lifetime":`लाà¤à¥à¤à¤¾à¤à¤®`,"periods.weekPlural":`{{amount}} सपà¥à¤¤à¤¾à¤¹`,"periods.monthPlural":`{{amount}} महà¥à¤¨à¥`,"periods.yearPlural":`{{amount}} वरà¥à¤·`,"periods.dayPlural":`{{amount}} दिन`,"periods.weekFrequency":`सापà¥à¤¤à¤¾à¤¹à¤¿à¤`,"periods.monthFrequency":`मासिà¤`,"periods.yearFrequency":`वारà¥à¤·à¤¿à¤`,"periods.dayFrequency":`दà¥à¤¨à¤¿à¤`,"periods.perWeekFrequency":`पà¥à¤°à¤¤à¤¿ सपà¥à¤¤à¤¾à¤¹`,"periods.perMonthFrequency":`पà¥à¤°à¤¤à¤¿ माह`,"periods.perYearFrequency":`पà¥à¤°à¤¤à¤¿ वरà¥à¤·`,"periods.perDayFrequency":`पà¥à¤°à¤¤à¤¿ दिन`,"periods.unknownFrequency":`à¤
à¤à¥à¤à¤¾à¤¤`,"periods.weekFrequencyPlural":`पà¥à¤°à¤¤à¥à¤¯à¥à¤ {{amount}} सपà¥à¤¤à¤¾à¤¹`,"periods.monthFrequencyPlural":`पà¥à¤°à¤¤à¥à¤¯à¥à¤ {{amount}} महà¥à¤¨à¥`,"periods.yearFrequencyPlural":`पà¥à¤°à¤¤à¥à¤¯à¥à¤ {{amount}} वरà¥à¤·`,"periods.dayFrequencyPlural":`पà¥à¤°à¤¤à¥à¤¯à¥à¤ {{amount}} दिन`,"product_info.product_title":`{{productTitle}}`,"product_info.product_description":`{{productDescription}}`,"product_info.product_price":`{{productPrice}}`,"product_info.free_trial_duration":`{{trialDuration}} निà¤à¤¶à¥à¤²à¥à¤ परà¥à¤à¥à¤·à¤£`,"product_info.price_after_free_trial":`परà¥à¤à¥à¤·à¤£ समापà¥à¤¤ हà¥à¤¨à¥ à¤à¥ बाद, {{renewalDate}} à¤à¥`,"product_info.renewal_frequency":`{{frequency}} पर नवà¥à¤¨à¥à¤à¥à¤¤ हà¥à¤¤à¤¾ हà¥`,"product_info.continues_until_cancelled":`रदà¥à¤¦ हà¥à¤¨à¥ तठà¤à¤¾à¤°à¥ रहता हà¥`,"product_info.cancel_anytime":`à¤à¤¿à¤¸à¥ à¤à¥ समय रदà¥à¤¦ à¤à¤°à¥à¤`,"payment_entry_page.payment_step_title":`RevenueCat दà¥à¤µà¤¾à¤°à¤¾ सà¥à¤°à¤à¥à¤·à¤¿à¤¤ à¤à¥à¤à¤à¤à¤`,"payment_entry_page.button_pay":`à¤
à¤à¥ à¤à¥à¤à¤¤à¤¾à¤¨ à¤à¤°à¥à¤`,"payment_entry_page.button_start_trial":`परà¥à¤à¥à¤·à¤£ पà¥à¤°à¤¾à
40¤°à¤à¤ à¤à¤°à¥à¤`,"success_page.purchase_successful":`à¤à¥à¤à¤¤à¤¾à¤¨ पà¥à¤°à¥à¤£`,"success_page.button_close":`à¤à¤¾à¤°à¥ रà¤à¥à¤`,"error_page.if_error_persists":`यदि तà¥à¤°à¥à¤à¤¿ बनॠरहतॠहà¥, तॠà¤à¥à¤ªà¤¯à¤¾ सà¤à¤ªà¤°à¥à¤ à¤à¤°à¥à¤ `,"error_page.error_title_already_subscribed":`à¤à¤ªà¤¨à¥ पहलॠहॠ{{productTitle}} à¤à¥ सदसà¥à¤¯à¤¤à¤¾ लॠलॠहà¥`,"error_page.error_title_already_purchased":`à¤à¤ªà¤¨à¥ पहलॠहॠ{{productTitle}} à¤à¤°à¥à¤¦ लिया हà¥`,"error_page.error_title_other_errors":`à¤à¥à¤ à¤à¤²à¤¤ हॠà¤à¤¯à¤¾`,"error_page.error_message_already_subscribed":`à¤à¤ª à¤à¤¸ à¤à¤¤à¥à¤ªà¤¾à¤¦ à¤à¥ सदसà¥à¤¯à¤¤à¤¾ फिर सॠनहà¥à¤ लॠसà¤à¤¤à¥.`,"error_page.error_message_already_purchased":`à¤à¤ª à¤à¤¸ à¤à¤¤à¥à¤ªà¤¾à¤¦ à¤à¥ फिर सॠनहà¥à¤ à¤à¤°à¥à¤¦ सà¤à¤¤à¥.`,"error_page.error_message_missing_email_error":`à¤à¤°à¥à¤¦ à¤à¥ पà¥à¤°à¤¾ à¤à¤°à¤¨à¥ à¤à¥ लिठà¤à¤®à¥à¤² à¤à¤µà¤¶à¥à¤¯à¤ हà¥à¥¤`,"error_page.error_message_network_error":`नà¥à¤à¤µà¤°à¥à¤ तà¥à¤°à¥à¤à¤¿à¥¤ à¤à¥à¤ªà¤¯à¤¾ à¤
पना à¤à¤à¤à¤°à¤¨à¥à¤ à¤à¤¨à¥à¤à¥à¤¶à¤¨ à¤à¤¾à¤à¤à¥à¤à¥¤`,"error_page.error_message_error_charging_payment":`à¤à¥à¤à¤¤à¤¾à¤¨ विफल।`,"error_page.error_message_error_setting_up_purchase":`à¤à¤¿à¤¸à¥ तà¥à¤°à¥à¤à¤¿ à¤à¥ à¤à¤¾à¤°à¤£ à¤à¤°à¥à¤¦à¤¾à¤°à¥ शà¥à¤°à¥ नहà¥à¤ हà¥à¤ (तà¥à¤°à¥à¤à¤¿ à¤à¥à¤¡: {{errorCode}})।`,"error_page.error_message_invalid_tax_location":`हम à¤à¤ªà¤à¥ बिलिà¤à¤ पतॠà¤à¥ सतà¥à¤¯à¤¾à¤ªà¤¿à¤¤ नहà¥à¤ à¤à¤° सà¤à¥à¥¤ à¤à¥à¤ªà¤¯à¤¾ सà¥à¤¨à¤¿à¤¶à¥à¤à¤¿à¤¤ à¤à¤°à¥à¤ à¤à¤¿ पिन à¤à¥à¤¡ à¤à¤° दà¥à¤¶ सहॠहà¥à¤à¥¤`,"error_page.error_message_unknown_error":`à¤à¤ à¤
à¤à¥à¤à¤¾à¤¤ तà¥à¤°à¥à¤à¤¿ हà¥à¤ (तà¥à¤°à¥à¤à¤¿ à¤à¥à¤¡: {{errorCode}})।`,"error_page.button_try_again":`फिर सॠà¤à¥à¤¶à¤¿à¤¶ à¤à¤°à¥à¤`,"paywall_variables.price_per_period":`{{formattedPrice}}/{{period}}`,"paywall_variables.sub_relative_discount":`{{discount}}%`,"paywall_variables.total_price_and_per_month":`{{formattedPrice}}/{{period}}({{formattedPricePerMonth}}/{{monthPeriod}})`,"product_info.total_due_today":`à¤à¤ दà¥à¤¯ à¤à¥à¤² राशि`,"product_info.subscribe_to":`सदसà¥à¤¯à¤¤à¤¾ लà¥à¤`,"navbar_header.details":`विवरण`,"navbar_header.back_button":`वापस`,"pricing_dropdown.show_details":`विवरण दिà¤à¤¾à¤à¤`,"pricing_dropdown.hide_details":`विवरण à¤à¤¿à¤ªà¤¾à¤à¤`,"pricing_table.tax":`à¤à¤°`,"pricing_table.trial_ends":`{{formattedTrialEndDate}} पर परà¥à¤à¥à¤·à¤£ समापà¥à¤¤ हà¥à¤¨à¥ à¤à¥ बाद`,"pricing_table.total_due_today":`à¤à¤ दà¥à¤¯ à¤à¥à¤²`,"pricing_table.total_excluding_tax":`à¤à¤° à¤à¥ à¤à¥à¤¡à¤¼à¤à¤° à¤à¥à¤²`,"pricing_table.enter_billing_address_to_calculate":`à¤à¤£à¤¨à¤¾ à¤à¤°à¤¨à¥ à¤à¥ लिठबिलिà¤à¤ पता दरà¥à¤ à¤à¤°à¥à¤`,"pricing_table.enter_state_or_postal_code_to_calculate":`à¤à¤£à¤¨à¤¾ à¤à¤°à¤¨à¥ à¤à¥ लिठराà¤à¥à¤¯ या à¤à¤¼à¤¿à¤ª à¤à¥à¤¡ दरà¥à¤ à¤à¤°à¥à¤`,"pricing_table.enter_postal_code_to_calculate":`à¤à¤£à¤¨à¤¾ à¤à¤°à¤¨à¥ à¤à¥ लिठà¤à¤¼à¤¿à¤ª à¤à¥à¤¡ दरà¥à¤ à¤à¤°à¥à¤`,"error_page.error_message_invalid_email_error":`à¤à¤®à¥à¤² पता {{email}} सतà¥à¤¯à¤¾à¤ªà¤¿à¤¤ नहà¥à¤ à¤à¤¿à¤¯à¤¾ à¤à¤¾ सà¤à¤¾. à¤à¥à¤ªà¤¯à¤¾ à¤à¤ मानà¥à¤¯ à¤à¤®à¥à¤² पता पà¥à¤°à¤¦à¤¾à¤¨ à¤à¤°à¥à¤.`,"payment_entry_page.button_payment_method":`{{paymentMethod}} à¤à¥ साथ {{formattedPrice}} à¤à¤¾ à¤à¥à¤à¤¤à¤¾à¤¨ à¤à¤°à¥à¤`,"payment_entry_page.button_with_price":`{{formattedPrice}} à¤à¤¾ à¤à¥à¤à¤¤à¤¾à¤¨ à¤à¤°à¥à¤`,"price_update.title":`मà¥à¤²à¥à¤¯ à¤
पडà¥à¤`,"price_update.base_message":`à¤à¤ª à¤à¥ बिलिà¤à¤ पतॠà¤à¥ à¤à¤§à¤¾à¤° पर à¤à¥à¤² à¤à¥à¤®à¤¤ à¤à¤° à¤à¥ साथ à¤
पडà¥à¤ à¤à¥ à¤à¤ थà¥à¥¤ à¤à¥à¤ªà¤¯à¤¾ समà¥à¤à¥à¤·à¤¾ à¤à¤°à¥à¤ à¤à¤° फिर सॠपà¥à¤°à¤¯à¤¾à¤¸ à¤à¤°à¥à¤à¥¤ à¤à¤ªà¤à¥ à¤à¤¾à¤°à¥à¤¡ सॠà¤à¥à¤µà¤² à¤à¤ बार शà¥à¤²à¥à¤ लिया à¤à¤¾à¤à¤à¤¾à¥¤`,"price_update.trial_message":`सदसà¥à¤¯à¤¤à¤¾ मà¥à¤²à¥à¤¯ à¤à¤ªà¤à¥ बिलिà¤à¤ पतॠà¤à¥ à¤à¤§à¤¾à¤° पर à¤à¤°à¥à¤ à¤à¥ शामिल à¤à¤°à¤¨à¥ à¤à¥ लिठà¤
पडà¥à¤ à¤à¤¿à¤¯à¤¾ à¤à¤¯à¤¾ हà¥à¥¤ निà¤à¤¶à¥à¤²à¥à¤ परà¥à¤à¥à¤·à¤£ à¤
वधि à¤
à¤à¥ à¤à¥ लाà¤à¥ हà¥à¥¤ à¤à¥à¤ªà¤¯à¤¾ à¤à¤¾à¤à¤à¥à¤ à¤à¤° पà¥à¤¨à¤ पà¥à¤°à¤¯à¤¾à¤¸ à¤à¤°à¥à¤à¥¤`,"payment_entry_page.express_checkout_divider":`या à¤à¤¾à¤°à¥à¤¡ सॠà¤à¥à¤à¤¤à¤¾à¤¨ à¤à¤°à¥à¤`,"error_page.trouble_accessing":`यदि à¤à¤ªà¤à¥ à¤
पनॠà¤à¤°à¥à¤¦à¤¾à¤°à¥ तठपहà¥à¤à¤à¤¨à¥ मà¥à¤ परà¥à¤¶à¤¾à¤¨à¥ हॠरहॠहà¥, तॠपर समरà¥à¤¥à¤¨ à¤à¥ लिठसà¤à¤ªà¤°à¥à¤ à¤à¤°à¥à¤`,"error_page.close_button_title":`{{appName}}
40 पर à¤à¤¾à¤à¤`,"error_page.error_title_stripe_missing_required_permission":`सà¥à¤à¥à¤°à¤¾à¤à¤ª à¤
नà¥à¤®à¤¤à¤¿ à¤à¥à¤® हà¥`,"error_page.button_close":`बà¤à¤¦ à¤à¤°à¥à¤`,"error_page.error_message_stripe_invalid_tax_origin_address":`à¤à¤°à¥à¤¦à¤¾à¤°à¥ विफल रहॠà¤à¥à¤¯à¥à¤à¤à¤¿ à¤à¤° à¤à¤¤à¥à¤ªà¤¤à¥à¤¤à¤¿ पता à¤
मानà¥à¤¯ हà¥. à¤à¤¤à¥à¤ªà¤¾à¤¦à¤¨ मà¥à¤, à¤à¤°à¥à¤¦à¤¾à¤°à¥ बिना à¤à¤°à¥à¤ à¤à¥ लाà¤à¥ à¤à¤¿à¤ à¤à¤¾à¤® à¤à¤°à¥à¤à¥.`,"error_page.error_message_stripe_tax_not_active":`à¤à¤°à¥à¤¦à¤¾à¤°à¥ विफल रहॠà¤à¥à¤¯à¥à¤à¤à¤¿ सà¥à¤à¥à¤°à¤¾à¤à¤ª à¤à¥à¤à¥à¤¸ सà¤à¥à¤·à¤® नहà¥à¤ हà¥. à¤à¤¤à¥à¤ªà¤¾à¤¦à¤¨ मà¥à¤, à¤à¤°à¥à¤¦à¤¾à¤°à¥ बिना à¤à¤°à¥à¤ à¤à¥ लाà¤à¥ à¤à¤¿à¤ à¤à¤¾à¤® à¤à¤°à¥à¤à¥.`,"error_page.error_only_in_sandbox":`यह सà¤à¤¦à¥à¤¶ à¤à¥à¤µà¤² सà¥à¤à¤¡à¤¬à¥à¤à¥à¤¸ मà¥à¤ दिà¤à¤¾à¤ दà¥à¤¤à¤¾ हà¥.`,"error_page.error_message_stripe_missing_required_permission":`à¤à¤°à¥à¤¦à¤¾à¤°à¥ विफल रहॠà¤à¥à¤¯à¥à¤à¤à¤¿ सà¥à¤à¥à¤°à¤¾à¤à¤ª à¤à¤ª मà¥à¤ à¤à¤µà¤¶à¥à¤¯à¤ à¤
नà¥à¤®à¤¤à¤¿ नहà¥à¤ हà¥. à¤à¤¤à¥à¤ªà¤¾à¤¦à¤¨ मà¥à¤, à¤à¤°à¥à¤¦à¤¾à¤°à¥ बिना à¤à¤°à¥à¤ à¤à¥ लाà¤à¥ à¤à¤¿à¤ à¤à¤¾à¤® à¤à¤°à¥à¤à¥.`,"error_page.error_title_stripe_tax_not_active":`सà¥à¤à¥à¤°à¤¾à¤à¤ª à¤à¥à¤à¥à¤¸ सà¤à¥à¤°à¤¿à¤¯ नहà¥à¤ हà¥`,"error_page.error_title_stripe_invalid_tax_origin_address":`à¤
मानà¥à¤¯ à¤à¤° à¤à¤¤à¥à¤ªà¤¤à¥à¤¤à¤¿ पता`,"apple_pay.free_trial":`मà¥à¤«à¤¼à¥à¤¤ à¤à¥à¤°à¤¾à¤¯à¤²`,"product_info.price_after_intro_price":`{{introPriceDuration}} à¤à¥ बाद, {{renewalDate}} पर`,"product_info.after_trial":`à¤à¥à¤°à¤¾à¤¯à¤² à¤à¥ बाद`,"product_info.after":`à¤à¥ बाद`,"product_info.intro_price_phase_after_trial":`फिर {{introPriceDuration}} à¤à¥ लिठ{{introPrice}}`,"product_info.intro_price_phase":`पहलॠ{{introPriceDuration}} à¤à¥ लिठ{{introPrice}}`,"product_info.intro_price_phase_paid_once":`à¤à¤ बार à¤à¥à¤à¤¤à¤¾à¤¨ à¤à¤¿à¤¯à¤¾ à¤à¤¯à¤¾`,"payment_entry_page.trial_subscription_terms_info":`à¤à¤ªà¤à¥ परà¥à¤à¥à¤·à¤£ à¤
वधि समापà¥à¤¤ हà¥à¤¨à¥ à¤à¥ बाद, à¤à¤ªà¤¸à¥ {{renewalDate}} सॠशà¥à¤°à¥ हà¥à¤à¤° {{price}} {{perFrequency}} शà¥à¤²à¥à¤ लिया à¤à¤¾à¤à¤à¤¾. à¤à¤ª à¤à¤¸ तिथि सॠपहलॠà¤à¤à¥ à¤à¥ रदà¥à¤¦ à¤à¤° सà¤à¤¤à¥ हà¥à¤.`,"payment_entry_page.subscription_info":`सदसà¥à¤¯à¤¤à¤¾ सà¥à¤µà¤¤à¤ नवà¥à¤¨à¥à¤à¥à¤¤ हॠà¤à¤¾à¤¤à¥ हà¥. à¤à¤à¥ à¤à¥ रदà¥à¤¦ à¤à¤°à¥à¤.`,"payment_entry_page.otp_terms_info":`à¤à¤°à¥à¤¦à¤à¤°, à¤à¤ª {{appName}} à¤à¥ à¤à¤¨à¤à¥ शरà¥à¤¤à¥à¤ à¤à¥ à¤
नà¥à¤¸à¤¾à¤° à¤à¤ªà¤¸à¥ शà¥à¤²à¥à¤ लà¥à¤¨à¥ à¤à¥ à¤
नà¥à¤®à¤¤à¤¿ दà¥à¤¨à¥ à¤à¥ लिठसहमत हà¥à¤.`,"payment_entry_page.terms_link_label":`नियम`,"payment_entry_page.subscription_terms_info":`सदसà¥à¤¯à¤¤à¤¾ लà¥à¤à¤°, à¤à¤ª {{appName}} à¤à¥ रदà¥à¤¦ à¤à¤°à¤¨à¥ तठà¤à¤¨à¤à¥ शरà¥à¤¤à¥à¤ à¤à¥ à¤
नà¥à¤¸à¤¾à¤° à¤à¤ªà¤¸à¥ शà¥à¤²à¥à¤ लà¥à¤¨à¥ à¤à¥ à¤
नà¥à¤®à¤¤à¤¿ दà¥à¤¨à¥ à¤à¥ लिठसहमत हà¥à¤.`,"loading_page.keep_page_open":`पà¥à¤°à¤à¥à¤°à¤¿à¤¯à¤¾ लà¤à¤à¤ पà¥à¤°à¥ हॠà¤à¥à¤à¥ हà¥. à¤à¤¸ पà¥à¤·à¥à¤ à¤à¥ à¤à¥à¤²à¤¾ रà¤à¥à¤.`,"loading_page.processing_payment":`à¤à¥à¤à¤¤à¤¾à¤¨ सà¤à¤¸à¤¾à¤§à¤¿à¤¤ à¤à¤¿à¤¯à¤¾ à¤à¤¾ रहा हà¥`,"pricing_table.discount":`à¤à¥à¤`,"pricing_table.subtotal":`à¤à¤ªà¤à¥à¤² यà¥à¤`,"pricing_dropdown.add_promo_code":`पà¥à¤°à¥à¤®à¥_à¤à¥à¤¡_à¤à¥à¤¡à¤¼à¥à¤`,"discount_input.label":`पà¥à¤°à¥à¤®à¥ à¤à¥à¤¡`,"payment_entry_page.checkout_consent_terms_of_service":`सà¥à¤µà¤¾ à¤à¥ शरà¥à¤¤à¥à¤`,"payment_entry_page.checkout_consent_agreement":`मà¥à¤ {{appName}}
40 à¤à¥ {{termsOfService}} सॠसहमत हà¥à¤à¥¤`},Zde={"periods.week":`{{amount}} hét`,"periods.month":`{{amount}} hónap`,"periods.year":`{{amount}} év`,"periods.day":`{{amount}} nap`,"periods.weekShort":`{{amount}}hét`,"periods.monthShort":`{{amount}}hó`,"periods.yearShort":`{{amount}}év`,"periods.dayShort":`{{amount}}n`,"periods.lifetime":`életre szóló`,"periods.weekPlural":`{{amount}} hét`,"periods.monthPlural":`{{amount}} hónap`,"periods.yearPlural":`{{amount}} év`,"periods.dayPlural":`{{amount}} nap`,"periods.weekFrequency":`heti`,"periods.monthFrequency":`havi`,"periods.yearFrequency":`éves`,"periods.dayFrequency":`napi`,"periods.perWeekFrequency":`hetente`,"periods.perMonthFrequency":`havonta`,"periods.perYearFrequency":`évente`,"periods.perDayFrequency":`naponta`,"periods.unknownFrequency":`ismeretlen`,"periods.weekFrequencyPlural":`minden {{amount}} hétben`,"periods.monthFrequencyPlural":`minden {{amount}} hónapban`,"periods.yearFrequencyPlural":`minden {{amount}} évben`,"periods.dayFrequencyPlural":`minden {{amount}} napban`,"product_info.product_title":`{{productTitle}}`,"product_info.product_description":`{{productDescription}}`,"product_info.product_price":`{{productPrice}}`,"product_info.free_trial_duration":`{{trialDuration}} próbaidÅszak`,"product_info.price_after_free_trial":`A próbaidÅszak vége után, {{renewalDate}}-kor`,"product_info.renewal_frequency":`{{frequency}} gyakorisággal megújul`,"product_info.continues_until_cancelled":`Folytatódik, amÃg le nem mondják`,"product_info.cancel_anytime":`Bármikor lemondható`,"payment_entry_page.payment_step_title":`Biztonságos fizetés a RevenueCat-en keresztül`,"payment_entry_page.button_pay":`Fizetés most`,"payment_entry_page.button_start_trial":`PróbaidÅszak indÃtása`,"success_page.purchase_successful":`Fizetés sikeres`,"success_page.button_close":`Tovább`,"error_page.if_error_persists":`Ha a hiba továbbra is fennáll, kérjük, vedd fel a kapcsolatot `,"error_page.error_title_already_subscribed":`Már elÅfizettél a(z) {{productTitle}} termékre`,"error_page.error_title_already_purchased":`Már megvásároltad a(z) {{productTitle}} terméket`,"error_page.error_title_other_errors":`Valami hiba történt`,"error_page.error_message_already_subscribed":`Nem fizethetsz elŠújra erre a termékre.`,"error_page.error_message_already_purchased":`Nem vásárolhatod meg újra ezt a terméket.`,"error_page.error_message_missing_email_error":`Az email cÃm szükséges a vásárlás befejezéséhez.`,"error_page.error_message_network_error":`Hálózati hiba. Kérjük, ellenÅrizd az internetkapcsolatodat.`,"error_page.error_message_error_charging_payment":`A fizetés sikertelen volt.`,"error_page.error_message_error_setting_up_purchase":`Hiba miatt nem indult el a vásárlás (hibakód: {{errorCode}}).`,"error_page.error_message_invalid_tax_location":`Nem tudtuk ellenÅrizni a számlázási cÃmét. Kérjük, ellenÅrizze, hogy az irányÃtószám és az ország helyes-e.`,"error_page.error_message_unknown_error":`Ismeretlen hiba történt (hibakód: {{errorCode}}).`,"error_page.button_try_again":`Ãjrapróbálkozás`,"paywall_variables.price_per_period":`{{formattedPrice}}/{{period}}`,"paywall_variables.sub_relative_discount":`{{discount}}%`,"paywall_variables.total_price_and_per_month":`{{formattedPrice}}/{{period}}({{formattedPricePerMonth}}/{{monthPeriod}})`,"product_info.total_due_today":`Ma fizetendŠösszesen`,"product_info.subscribe_to":`Feliratkozás erre:`,"navbar_header.details":`Részletek`,"navbar_header.back_button":`Vissza`,"pricing_dropdown.show_details":`Részletek mutatása`,"pricing_dropdown.hide_details":`Részletek elrejtése`,"pricing_table.tax":`Adó`,"pricing_table.trial_ends":`A próbaidÅszak vége: {{formattedTrialEndDate}}`,"pricing_table.total_due_today":`Ma fizetendŠösszeg`,"pricing_table.total_excluding_tax":`Ãsszesen adó nélkül`,"pricing_table.enter_billing_address_to_calculate":`Adja meg a számlázási cÃmet a számÃtáshoz`,"pricing_table.enter_state_or_postal_code_to_calculate":`Adja meg az államot vagy az irányÃtószámot a számÃtáshoz`,"pricing_table.enter_postal_code_to_calculate":`Adja meg az irányÃtószámot a számÃtáshoz`,"error_page.error_message_invalid_email_error":`A(z) {{email}} e-mail cÃmet nem sikerült ellenÅrizni. Kérjük, adj meg egy érvényes e-mail cÃmet.`,"payment_entry_page.button_payment_method":`Fizetés {{formattedPrice}} összeggel a következÅvel: {{paymentMethod}}`,"payment_entry_page.button_with_price":`Fizetés {{formattedPrice}}`,"price_update.title":`Ãr frissÃtése`,"price_update.base_message":`A teljes ár frissÃtve lett az adóval a számlázási cÃmed alapján. Kérjük, tekintsd át és próbáld újra. A kártyádat csak egyszer terheljük meg.`,"price_update.trial_message":`Az elÅfizetés ára adókkal együtt frissÃtésre került a számlázási cÃmének megfelelÅen. Az ingyenes próbaidÅszak továbbra is érvényes. Kérjük, ellenÅrizze és próbálja újra.`,"payment_entry_page.express_checkout_divider":`VAGY FIZESSEN KÃRTYÃVAL`,"error_page.trouble_accessing":`Ha problémái vannak a vásárláshoz való hozzáféréssel, forduljon az ügyfélszolgálathoz a következÅ cÃmen: `,"error_page.close_button_title":`Ugrás a(z) {{appName}}
40 alkalmazáshoz`,"error_page.error_title_stripe_missing_required_permission":`Hiányzó Stripe engedély`,"error_page.button_close":`Bezárás`,"error_page.error_message_stripe_invalid_tax_origin_address":`A vásárlás sikertelen volt, mert az adókiindulási cÃm érvénytelen. Ãles környezetben a vásárlások adók alkalmazása nélkül fognak működni.`,"error_page.error_message_stripe_tax_not_active":`A vásárlás sikertelen volt, mert a Stripe adó nincs engedélyezve. Ãles környezetben a vásárlások adók alkalmazása nélkül fognak működni.`,"error_page.error_only_in_sandbox":`Ez az üzenet csak a tesztkörnyezetben jelenik meg.`,"error_page.error_message_stripe_missing_required_permission":`A vásárlás sikertelen volt, mert a Stripe alkalmazásból hiányzik egy szükséges engedély. Ãles környezetben a vásárlások adók alkalmazása nélkül fognak működni.`,"error_page.error_title_stripe_tax_not_active":`A Stripe adó nincs aktiválva`,"error_page.error_title_stripe_invalid_tax_origin_address":`Ãrvénytelen adókiindulási cÃm`,"apple_pay.free_trial":`Ingyenes próbaidÅszak`,"product_info.price_after_intro_price":`{{introPriceDuration}} után, {{renewalDate}} napján`,"product_info.after_trial":`próbaidÅszak után`,"product_info.after":`utána`,"product_info.intro_price_phase_after_trial":`Ezután {{introPriceDuration}} ideig {{introPrice}} áron`,"product_info.intro_price_phase":`ElÅször {{introPriceDuration}} ideig {{introPrice}} áron`,"product_info.intro_price_phase_paid_once":`egyszeri fizetéssel`,"payment_entry_page.trial_subscription_terms_info":`A próbaidÅszak vége után {{price}} összeget számÃtunk fel {{perFrequency}} gyakorisággal, kezdve {{renewalDate}} dátummal. Ezt a dátumot megelÅzÅen bármikor lemondhatod.`,"payment_entry_page.subscription_info":`Az elÅfizetés automatikusan megújul. Bármikor lemondhatod.`,"payment_entry_page.otp_terms_info":`A vásárlással elfogadod, hogy a {{appName}} az általa meghatározott feltételek szerint terheljen.`,"payment_entry_page.terms_link_label":`Feltételek`,"payment_entry_page.subscription_terms_info":`A feliratkozással elfogadod, hogy a {{appName}} az általa meghatározott feltételek szerint terheljen, amÃg le nem mondod.`,"loading_page.keep_page_open":`A folyamat majdnem befejezÅdött. Tartsa nyitva ezt az oldalt.`,"loading_page.processing_payment":`Fizetés feldolgozása`,"pricing_table.discount":`Kedvezmény`,"pricing_table.subtotal":`Részösszeg`,"pricing_dropdown.add_promo_code":`Promóciós kód hozzáadása`,"discount_input.label":`Promóciós kód`,"payment_entry_page.checkout_consent_terms_of_service":`szolgáltatási feltételek`,"payment_entry_page.checkout_consent_agreement":`Elfogadom a {{appName}} {{termsOfService}}.`},Qde={"periods.week":`{{amount}} minggu`,"periods.month":`{{amount}} bulan`,"periods.year":`{{amount}} tahun`,"periods.day":`{{amount}} hari`,"periods.weekShort":`{{amount}}mg`,"periods.monthShort":`{{amount}}bl`,"periods.yearShort":`{{amount}}th`,"periods.dayShort":`{{amount}}h`,"periods.lifetime":`seumur hidup`,"periods.weekPlural":`{{amount}} minggu`,"periods.monthPlural":`{{amount}} bulan`,"periods.yearPlural":`{{amount}} tahun`,"periods.dayPlural":`{{amount}} hari`,"periods.weekFrequency":`mingguan`,"periods.monthFrequency":`bulanan`,"periods.yearFrequency":`tahunan`,"periods.dayFrequency":`harian`,"periods.perWeekFrequency":`per minggu`,"periods.perMonthFrequency":`per bulan`,"periods.perYearFrequency":`per tahun`,"periods.perDayFrequency":`per hari`,"periods.unknownFrequency":`tidak diketahui`,"periods.weekFrequencyPlural":`setiap {{amount}} minggu`,"periods.monthFrequencyPlural":`setiap {{amount}} bulan`,"periods.yearFrequencyPlural":`setiap {{amount}} tahun`,"periods.dayFrequencyPlural":`setiap {{amount}} hari`,"product_info.product_title":`{{productTitle}}`,"product_info.product_description":`{{productDescription}}`,"product_info.product_price":`{{productPrice}}`,"product_info.free_trial_duration":`{{trialDuration}} uji coba gratis`,"product_info.price_after_free_trial":`Setelah uji coba berakhir, pada {{renewalDate}}`,"product_info.renewal_frequency":`Diperbarui {{frequency}}`,"product_info.continues_until_cancelled":`Berlanjut hingga dibatalkan`,"product_info.cancel_anytime":`Batalkan kapan saja`,"payment_entry_page.payment_step_title":`Pembayaran aman oleh RevenueCat`,"payment_entry_page.button_pay":`Bayar sekarang`,"payment_entry_page.button_start_trial":`Mulai Uji Coba`,"success_page.purchase_successful":`Pembayaran selesai`,"success_page.button_close"
40:`Lanjutkan`,"error_page.if_error_persists":`Jika kesalahan berlanjut, silakan hubungi `,"error_page.error_title_already_subscribed":`Anda sudah berlangganan ke {{productTitle}}`,"error_page.error_title_already_purchased":`Anda sudah membeli {{productTitle}}`,"error_page.error_title_other_errors":`Terjadi kesalahan`,"error_page.error_message_already_subscribed":`Anda tidak dapat berlangganan produk ini lagi.`,"error_page.error_message_already_purchased":`Anda tidak dapat membeli produk ini lagi.`,"error_page.error_message_missing_email_error":`Email diperlukan untuk menyelesaikan pembelian.`,"error_page.error_message_network_error":`Kesalahan jaringan. Periksa koneksi internet Anda.`,"error_page.error_message_error_charging_payment":`Pembayaran gagal.`,"error_page.error_message_error_setting_up_purchase":`Pembelian tidak dimulai karena kesalahan (kode kesalahan: {{errorCode}}).`,"error_page.error_message_invalid_tax_location":`Kami tidak dapat memverifikasi alamat penagihan Anda. Harap periksa kembali kode pos dan negara untuk memastikan keduanya benar.`,"error_page.error_message_unknown_error":`Terjadi kesalahan yang tidak diketahui (kode kesalahan: {{errorCode}}).`,"error_page.button_try_again":`Coba lagi`,"paywall_variables.price_per_period":`{{formattedPrice}}/{{period}}`,"paywall_variables.sub_relative_discount":`{{discount}}%`,"paywall_variables.total_price_and_per_month":`{{formattedPrice}}/{{period}}({{formattedPricePerMonth}}/{{monthPeriod}})`,"product_info.total_due_today":`Total yang harus dibayar hari ini`,"product_info.subscribe_to":`Berlangganan ke`,"navbar_header.details":`Detail`,"navbar_header.back_button":`Kembali`,"pricing_dropdown.show_details":`Tampilkan detail`,"pricing_dropdown.hide_details":`Sembunyikan detail`,"pricing_table.tax":`Pajak`,"pricing_table.trial_ends":`Setelah masa percobaan berakhir, pada {{formattedTrialEndDate}}`,"pricing_table.total_due_today":`Total yang harus dibayar hari ini`,"pricing_table.total_excluding_tax":`Total belum termasuk pajak`,"pricing_table.enter_billing_address_to_calculate":`Masukkan alamat penagihan untuk menghitung`,"pricing_table.enter_state_or_postal_code_to_calculate":`Masukkan negara bagian atau kode pos untuk menghitung`,"pricing_table.enter_postal_code_to_calculate":`Masukkan kode pos untuk menghitung`,"error_page.error_message_invalid_email_error":`Alamat email {{email}} tidak dapat diverifikasi. Harap berikan alamat email yang valid.`,"payment_entry_page.button_payment_method":`Bayar {{formattedPrice}} dengan {{paymentMethod}}`,"payment_entry_page.button_with_price":`Bayar {{formattedPrice}}`,"price_update.title":`Pembaruan harga`,"price_update.base_message":`Total harga telah diperbarui dengan pajak berdasarkan alamat penagihan Anda. Harap tinjau dan coba lagi. Kartu Anda hanya akan dikenakan biaya sekali.`,"price_update.trial_message":`Harga langganan telah diperbarui untuk menyertakan pajak berdasarkan alamat penagihan Anda. Masa percobaan gratis masih berlaku. Silakan periksa dan coba lagi.`,"payment_entry_page.express_checkout_divider":`ATAU BAYAR DENGAN KARTU`,"error_page.trouble_accessing":`Jika Anda mengalami masalah dalam mengakses pembelian, hubungi dukungan di `,"error_page.close_button_title":`Pergi ke {{appName}}`,"error_page.error_title_stripe_missing_required_permission":`Izin Stripe tidak ada`,"error_page.button_close":`Tutup`,"error_page.error_message_stripe_invalid_tax_origin_address":`Pembelian gagal karena alamat asal pajak tidak valid. Dalam produksi, pembelian akan berfungsi tanpa pajak yang diterapkan.`,"error_page.error_message_stripe_tax_not_active":`Pembelian gagal karena Stripe Tax tidak diaktifkan. Dalam produksi, pembelian akan berfungsi tanpa pajak yang diterapkan.`,"error_page.error_only_in_sandbox":`Pesan ini hanya muncul di sandbox.`,"error_page.error_message_stripe_missing_required_permission":`Pembelian gagal karena aplikasi Stripe tidak memiliki izin yang diperlukan. Dalam produksi, pembelian akan berfungsi tanpa pajak yang diterapkan.`,"error_page.error_title_stripe_tax_not_active":`Stripe Tax tidak aktif`,"error_page.error_title_str
40ipe_invalid_tax_origin_address":`Alamat asal pajak tidak valid`,"apple_pay.free_trial":`Uji Coba Gratis`,"product_info.price_after_intro_price":`Setelah {{introPriceDuration}}, pada {{renewalDate}}`,"product_info.after_trial":`setelah uji coba`,"product_info.after":`setelah`,"product_info.intro_price_phase_after_trial":`Kemudian {{introPriceDuration}} dengan harga {{introPrice}}`,"product_info.intro_price_phase":`Pertama {{introPriceDuration}} dengan harga {{introPrice}}`,"product_info.intro_price_phase_paid_once":`dibayar sekali`,"payment_entry_page.trial_subscription_terms_info":`Setelah masa percobaan Anda berakhir, Anda akan dikenakan biaya sebesar {{price}} {{perFrequency}} mulai {{renewalDate}}. Anda dapat membatalkan kapan saja sebelum tanggal ini.`,"payment_entry_page.subscription_info":`Langganan diperpanjang secara otomatis. Batalkan kapan saja.`,"payment_entry_page.otp_terms_info":`Dengan membeli, Anda setuju untuk mengizinkan {{appName}} menagih Anda sesuai dengan ketentuan mereka.`,"payment_entry_page.terms_link_label":`Ketentuan`,"payment_entry_page.subscription_terms_info":`Dengan berlangganan, Anda setuju untuk mengizinkan {{appName}} mengenakan biaya sesuai dengan ketentuan mereka hingga Anda membatalkan.`,"loading_page.keep_page_open":`Prosesnya hampir selesai. Jangan tutup halaman ini.`,"loading_page.processing_payment":`Pembayaran sedang diproses`,"pricing_table.discount":`Diskon`,"pricing_table.subtotal":`Subtotal`,"pricing_dropdown.add_promo_code":`Tambahkan kode promo`,"discount_input.label":`Kode promo`,"payment_entry_page.checkout_consent_terms_of_service":`ketentuan layanan`,"payment_entry_page.checkout_consent_agreement":`Saya menyetujui {{termsOfService}} {{appName}}.`},$de={"periods.week":`{{amount}}é±é`,"periods.month":`{{amount}}ã¶æ`,"periods.year":`{{amount}}å¹´`,"periods.day":`{{amount}}æ¥`,"periods.weekShort":`{{amount}}é±`,"periods.monthShort":`{{amount}}ã¶æ`,"periods.yearShort":`{{amount}}å¹´`,"periods.dayShort":`{{amount}}æ¥`,"periods.lifetime":`çæ¶¯`,"periods.weekPlural":`{{amount}}é±é`,"periods.monthPlural":`{{amount}}ã¶æ`,"periods.yearPlural":`{{amount}}å¹´`,"periods.dayPlural":`{{amount}}æ¥`,"periods.weekFrequency":`æ¯é±`,"periods.monthFrequency":`æ¯æ`,"periods.yearFrequency":`æ¯å¹´`,"periods.dayFrequency":`æ¯æ¥`,"periods.perWeekFrequency":`é±ãã¨`,"periods.perMonthFrequency":`æãã¨`,"periods.perYearFrequency":`å¹´ãã¨`,"periods.perDayFrequency":`æ¥ãã¨`,"periods.unknownFrequency":`䏿`,"periods.weekFrequencyPlural":`{{amount}}é±éãã¨`,"periods.monthFrequencyPlural":`{{amount}}ã¶æãã¨`,"periods.yearFrequencyPlural":`{{amount}}å¹´ãã¨`,"periods.dayFrequencyPlural":`{{amount}}æ¥ãã¨`,"product_info.product_title":`{{productTitle}}`,"product_info.product_description":`{{productDescription}}`,"product_info.product_price":`{{productPrice}}`,"product_info.free_trial_duration":`{{trialDuration}}æ¥éç¡æãã©ã¤ã¢ã«`,"product_info.price_after_free_trial":`ãã©ã¤ã¢ã«çµäºå¾ã{{renewalDate}}ã«`,"product_info.renewal_frequency":`{{frequency}}ã§æ´æ°`,"product_info.continues_until_cancelled":`ãã£ã³ã»ã«ãããã¾ã§ç¶ç¶ããã¾ã`,"product_info.cancel_anytime":`ãã¤ã§ããã£ã³ã»ã«ã§ãã¾ã`,"payment_entry_page.payment_step_title":`RevenueCatã«ããå®å
¨ãªãã§ãã¯ã¢ã¦ã`,"payment_entry_page.button_pay":`ä»ããæ¯æã`,"payment_entry_page.button_start_trial":`ãã©ã¤ã¢ã«ãéå§`,"success_page.purchase_successful":`æ¯æããå®äºãã¾ãã`,"success_page.button_close":`ç¶è¡`,"error_page.if_error_persists":`ã¨ã©ã¼ãç¶ãå ´åã¯ããé£çµ¡ãã ããã`,"error_page.error_title_already_subscribed":`ãã§ã«{{productTitle}}ãè³¼èªãã¦ãã¾ã`,"error_page.error_title_already_purchased":`ãã§ã«{{productTitle}}ãè³¼å
¥ãã¦ãã¾ã`,"error_page.error_title_other_errors":`ã¨ã©ã¼ãçºçãã¾ãã`,"error_page.error_message_already_subscribed":`ãã®ååãå度購èªãããã¨ã¯ã§ãã¾ããã`,"error_page.error_message_already_purchased":`ãã®ååãå度購å
¥ãããã¨ã¯ã§ãã¾ããã`,"error_page.error_message_missing_email_error":`è³¼å
¥ãå®äºããã«ã¯ã¡ã¼ã«ã¢ãã¬ã¹ãå¿
è¦ã§ãã`,"error_page.error_message_network_error":`ãããã¯ã¼ã¯ã¨ã©ã¼ã§ããã¤ã³ã¿ã¼ãããæ¥ç¶ã確èªãã¦ãã ããã`,"error_page.error_message_error_charging_payment":`æ¯æãã«å¤±æãã¾ããã`,"error_page.error_message_error_setting_up_purchase":`ã¨ã©ã¼ãçºçãããããè³¼å
¥ãéå§ã§ãã¾ããã§ããï¼ã¨ã©ã¼ã³ã¼ãï¼{{errorCode}}ï¼ã`,"error_page.error_message_invalid_tax_location":`è«æ±å
使ã確èªã§ãã¾ããã§ãããéµä¾¿çªå·ã¨å½ãæ£ãããã確èªãã ããã`,"error_page.error_message_unknown_error":`䏿ãªã¨ã©ã¼ãçºçãã¾ããï¼ã¨ã©ã¼ã³ã¼ãï¼{{errorCode}}ï¼ã`,"error_page.button_try_again":`å試è¡`,"paywall_variables.price_per_period":`{{formattedPrice}}/{{period}}`,"paywall_variables.sub_relative_discount":`{{discount}}%`,"paywall_variables.total_price_and_per_month":`{{formattedPrice}}/{{period}}({{formattedPricePerMonth}}/{{monthPeriod}})`,"product_info.total_due_today":`æ¬æ¥ã®ãæ¯æãåè¨`,"product_info.subscribe_to":`è³¼èªãã`,"navbar_header.details":`詳細`,"navbar_header.back_button":`æ»ã`,"pricing_dropdown.show_details":`詳細ã表示`,"pricing_dropdown.hide_details":`詳細ãé ã`,"pricing_table.tax":`ç¨é`,"pricing_table.trial_ends":`ãã©ã¤ã¢ã«çµäºå¾ã{{formattedTrialEndDate}}`,"pricing_table.total_due_today":`æ¬æ¥ãæ¯æãããã ãåè¨éé¡`,"pricing_table.total_excluding_tax":`ç¨æãåè¨`,"pricing_table.enter_billing_address_to_calculate":`è«æ±å
使ãå
¥åãã¦è¨ç®`,"pricing_table.enter_state_or_postal_code_to_calculate":`è¨ç®ã
40ãã«ã¯å·ã¾ãã¯éµä¾¿çªå·ãå
¥åãã¦ãã ãã`,"pricing_table.enter_postal_code_to_calculate":`è¨ç®ããã«ã¯éµä¾¿çªå·ãå
¥åãã¦ãã ãã`,"error_page.error_message_invalid_email_error":`ã¡ã¼ã«ã¢ãã¬ã¹{{email}}ã確èªã§ãã¾ããã§ãããæå¹ãªã¡ã¼ã«ã¢ãã¬ã¹ãå
¥åãã¦ãã ããã`,"payment_entry_page.button_payment_method":`{{paymentMethod}}ã§{{formattedPrice}}ãæ¯æã`,"payment_entry_page.button_with_price":`{{formattedPrice}}ãæ¯æã`,"price_update.title":`ä¾¡æ ¼ã®æ´æ°`,"price_update.base_message":`åè¨éé¡ããã客æ§ã®è«æ±å
使ã«åºã¥ãã¦ç¨éã¨ã¨ãã«æ´æ°ããã¾ãããå度ã確èªãã ãããã«ã¼ãã¸ã®è«æ±ã¯1åã®ã¿ã§ãã`,"price_update.trial_message":`è«æ±å
使ã«åºã¥ãã¦ç¨éãå«ããµãã¹ã¯ãªãã·ã§ã³æéãæ´æ°ããã¾ãããç¡æãã©ã¤ã¢ã«ã¯å¼ãç¶ãé©ç¨ããã¾ãã確èªãã¦å度ã試ããã ããã`,"payment_entry_page.express_checkout_divider":`ã«ã¼ãã§æ¯æã`,"error_page.trouble_accessing":`è³¼å
¥ã¸ã®ã¢ã¯ã»ã¹ã«åé¡ãããå ´åã¯ããµãã¼ãã«ãåãåãããã ãã: `,"error_page.close_button_title":`{{appName}} ã«ç§»å`,"error_page.error_title_stripe_missing_required_permission":`å¿
è¦ãªStripeã®æ¨©éãããã¾ãã`,"error_page.button_close":`éãã`,"error_page.error_message_stripe_invalid_tax_origin_address":`ç¨ã®åç£å°ä½æãç¡å¹ãªãããè³¼å
¥ã«å¤±æãã¾ããã æ¬çªç°å¢ã§ã¯ãç¨éãé©ç¨ãããªãã¦ãè³¼å
¥ã¯å¯è½ã§ãã`,"error_page.error_message_stripe_tax_not_active":`Stripe Taxãæå¹ã«ãªã£ã¦ããªããããè³¼å
¥ã«å¤±æãã¾ããã æ¬çªç°å¢ã§ã¯ãç¨éãé©ç¨ãããªãã¦ãè³¼å
¥ã¯å¯è½ã§ãã`,"error_page.error_only_in_sandbox":`ãã®ã¡ãã»ã¼ã¸ã¯ãµã³ãããã¯ã¹ã§ã®ã¿è¡¨ç¤ºããã¾ãã`,"error_page.error_message_stripe_missing_required_permission":`Stripeã¢ããªã«å¿
è¦ãªæ¨©éããªããããè³¼å
¥ã«å¤±æãã¾ããã æ¬çªç°å¢ã§ã¯ãç¨éãé©ç¨ãããªãã¦ãè³¼å
¥ã¯å¯è½ã§ãã`,"error_page.error_title_stripe_tax_not_active":`Stripe Taxãæå¹ã§ã¯ããã¾ãã`,"error_page.error_title_stripe_invalid_tax_origin_address":`ç¨ã®åç£å°ä½æãç¡å¹ã§ã`,"apple_pay.free_trial":`ç¡æãã©ã¤ã¢ã«`,"product_info.price_after_intro_price":`{{introPriceDuration}}ã®å¾ã{{renewalDate}}ã«`,"product_info.after_trial":`ãã©ã¤ã¢ã«å¾`,"product_info.after":`å¾`,"product_info.intro_price_phase_after_trial":`ãã®å¾ã{{introPriceDuration}}éã¯{{introPrice}}`,"product_info.intro_price_phase":`æåã®{{introPriceDuration}}éã¯{{introPrice}}`,"product_info.intro_price_phase_paid_once":`ä¸åæã`,"payment_entry_page.trial_subscription_terms_info":`ãã©ã¤ã¢ã«æéãçµäºããã¨ã{{renewalDate}}ãã{{price}} {{perFrequency}}ã課éããã¾ãããã®æ¥ããåã«ãã¤ã§ããã£ã³ã»ã«ã§ãã¾ãã`,"payment_entry_page.subscription_info":`ãµãã¹ã¯ãªãã·ã§ã³ã¯èªåçã«æ´æ°ããã¾ãããã¤ã§ããã£ã³ã»ã«ã§ãã¾ãã`,"payment_entry_page.otp_terms_info":`è³¼å
¥ãããã¨ã«ããã{{appName}}ãå©ç¨è¦ç´ã«åºã¥ãã¦æéãè«æ±ãããã¨ã«åæãããã¨ã«ãªãã¾ãã`,"payment_entry_page.terms_link_label":`å©ç¨è¦ç´`,"payment_entry_page.subscription_terms_info":`ãµãã¹ã¯ãªãã·ã§ã³ã«ç»é²ããã¨ããã£ã³ã»ã«ããã¾ã§{{appName}}ãå©ç¨è¦ç´ã«å¾ã£ã¦èª²éãããã¨ã許å¯ãããã¨ã«åæãããã¨ã«ãªãã¾ãã`,"loading_page.keep_page_open":`ããã»ã¹ã¯ã»ã¼å®äºã§ãããã®ãã¼ã¸ãéããã¾ã¾ã«ãã¦ãã ããã`,"loading_page.processing_payment":`ãæ¯æãæç¶ãä¸`,"pricing_table.discount":`å²å¼`,"pricing_table.subtotal":`å°è¨`,"pricing_dropdown.add_promo_code":`ããã¢ã¼ã·ã§ã³ã³ã¼ãã追å `,"discount_input.label":`ããã¢ã¼ã·ã§ã³ã³ã¼ã`,"payment_entry_page.checkout_consent_terms_of_service":`å©ç¨è¦ç´`,"payment_entry_page.checkout_consent_agreement":`{{appName}}ã®{{termsOfService}}ã«åæãã¾ãã`},efe={"periods.week":`{{amount}}주`,"periods.month":`{{amount}}ê°ì`,"periods.year":`{{amount}}ë
`,"periods.day":`{{amount}}
40ì¼`,"periods.weekShort":`{{amount}}주`,"periods.monthShort":`{{amount}}ê°ì`,"periods.yearShort":`{{amount}}ë
`,"periods.dayShort":`{{amount}}ì¼`,"periods.lifetime":`íì`,"periods.weekPlural":`{{amount}}주`,"periods.monthPlural":`{{amount}}ê°ì`,"periods.yearPlural":`{{amount}}ë
`,"periods.dayPlural":`{{amount}}ì¼`,"periods.weekFrequency":`매주`,"periods.monthFrequency":`매ë¬`,"periods.yearFrequency":`매ë
`,"periods.dayFrequency":`매ì¼`,"periods.perWeekFrequency":`주ë¹`,"periods.perMonthFrequency":`ìë³`,"periods.perYearFrequency":`ì°ê°`,"periods.perDayFrequency":`매ì¼`,"periods.unknownFrequency":`ì ì ìì`,"periods.weekFrequencyPlural":`{{amount}}주ë§ë¤`,"periods.monthFrequencyPlural":`{{amount}}ê°ìë§ë¤`,"periods.yearFrequencyPlural":`{{amount}}ë
ë§ë¤`,"periods.dayFrequencyPlural":`{{amount}}ì¼ë§ë¤`,"product_info.product_title":`{{productTitle}}`,"product_info.product_description":`{{productDescription}}`,"product_info.product_price":`{{productPrice}}`,"product_info.free_trial_duration":`{{trialDuration}}ì¼ ë¬´ë£ ì²´í`,"product_info.price_after_free_trial":`ì²´í ì¢
ë£ í, {{renewalDate}}ì`,"product_info.renewal_frequency":`{{frequency}}ë§ë¤ ê°±ì `,"product_info.continues_until_cancelled":`ì·¨ìë ëê¹ì§ ê³ìë©ëë¤.`,"product_info.cancel_anytime":`ì¸ì ë ì§ ì·¨ì ê°ë¥`,"payment_entry_page.payment_step_title":`RevenueCatì íµí ìì í ê²°ì `,"payment_entry_page.button_pay":`ì§ê¸ ê²°ì `,"payment_entry_page.button_start_trial":`ì²´í ìì`,"success_page.purchase_successful":`ê²°ì ê° ìë£ëììµëë¤.`,"success_page.button_close":`ê³ì`,"error_page.if_error_persists":`ì¤ë¥ê° ì§ìëë©´ ë¤ìì¼ë¡ 문ìíììì¤.`,"error_page.error_title_already_subscribed":`ì´ë¯¸ {{productTitle}}ì 구ë
íì
¨ìµëë¤`,"error_page.error_title_already_purchased":`ì´ë¯¸ {{productTitle}}ì 구매íì
¨ìµëë¤`,"error_page.error_title_other_errors":`문ì ê° ë°ìíìµëë¤.`,"error_page.error_message_already_subscribed":`ì´ ì íì ë¤ì 구ë
í ì ììµëë¤.`,"error_page.error_message_already_purchased":`ì´ ì íì ë¤ì 구매í ì ììµëë¤.`,"error_page.error_message_missing_email_error":`구매를 ìë£íë ¤ë©´ ì´ë©ì¼ì´ íìí©ëë¤.`,"error_page.error_message_network_error":`ë¤í¸ìí¬ ì¤ë¥ì
ëë¤. ì¸í°ë· ì°ê²°ì íì¸íììì¤.`,"error_page.error_message_error_charging_payment":`ê²°ì ì ì¤í¨íìµëë¤.`,"error_page.error_message_error_setting_up_purchase":`ì¤ë¥ë¡ ì¸í´ êµ¬ë§¤ê° ììëì§ ìììµëë¤(ì¤ë¥ ì½ë: {{errorCode}}).`,"error_page.error_message_invalid_tax_location":`ì²êµ¬ 주ì를 íì¸í ì ììµëë¤. ì°í¸ë²í¸ì êµê°ê° ì ííì§ ë¤ì íë² íì¸í´ 주ì¸ì.`,"error_page.error_message_unknown_error":`ì ì ìë ì¤ë¥ê° ë°ìíìµëë¤(ì¤ë¥ ì½ë: {{errorCode}}).`,"error_page.button_try_again":`ë¤ì ìë`,"paywall_variables.price_per_period":`{{formattedPrice}}/{{period}}`,"paywall_variables.sub_relative_discount":`{{discount}}%`,"paywall_variables.total_price_and_per_month":`{{formattedPrice}}/{{period}}({{formattedPricePerMonth}}/{{monthPeriod}})`,"product_info.total_due_today":`ì¤ë ì´ ê²°ì ê¸ì¡`,"product_info.subscribe_to":`구ë
í기`,"navbar_header.details":`ì¸ë¶ ì ë³´`,"navbar_header.back_button":`ë¤ë¡`,"pricing_dropdown.show_details":`ì¸ë¶ ì ë³´ íì`,"pricing_dropdown.hide_details":`ì¸ë¶ ì ë³´ ì¨ê¸°ê¸°`,"pricing_table.tax":`ì¸ê¸`,"pricing_table.trial_ends":`ì²´íí ì¢
ë£ í, {{formattedTrialEndDate}}`,"pricing_table.total_due_today":`ì¤ë ì§ë¶í´ì¼ í ì´ì¡`,"pricing_table.total_excluding_tax":`ì¸ê¸ ì ì¸ ì´ì¡`,"pricing_table.enter_billing_address_to_calculate":`ê³ì°ì ìí´ ì²êµ¬ì§ 주ì를 ì
ë ¥íì¸ì`,"pricing_table.enter_state_or_postal_code_to_calculate":`주 ëë ì°í¸ ë²í¸ë¥¼ ì
ë ¥íì¬ ê³ì°`,"pricing_table.enter_postal_code_to_calculate":`ì°í¸ ë²í¸ë¥¼ ì
ë ¥íì¬ ê³ì°`,"error_page.error_message_invalid_email_error":`ì´ë©ì¼ 주ì {{email}}ì(를) íì¸í ì ììµëë¤. ì í¨í ì´ë©ì¼ 주ì를 ì ê³µí´ ì£¼ì¸ì.`,"payment_entry_page.button_payment_method":`{{paymentMethod}}ì¼ë¡ {{formattedPrice}} ê²°ì `,"payment_entry_page.button_with_price":`{{formattedPrice}} ê²°ì `,"price_update.title":`ê°ê²© ì
ë°ì´í¸`,"price_update.base_message":`ì²êµ¬ì§ 주ì를 기ì¤ì¼ë¡ ì¸ê¸ì´ í¬í¨ë ì´ ê°ê²©ì´ ì
ë°ì´í¸ëììµëë¤. ë¤ì íì¸íê³ ìëí´ ì£¼ì¸ì. ì¹´ëë í ë²ë§ ì²êµ¬ë©ëë¤.`,"price_update.trial_message":`ì²êµ¬ 주ìì ë°ë¼ ì¸ê¸ì´ í¬í¨ë 구ë
ê°ê²©ì´ ì
ë°ì´í¸ëììµëë¤. ë¬´ë£ ì²´íì ê³ì ì ì©ë©ëë¤. íì¸íê³ ë¤ì ìëí´ ì£¼ì¸ì.`,"payment_entry_page.express_checkout_divider":`ëë ì¹´ë ê²°ì `,"error_page.trouble_accessing":`구매ì 문ì ê° ìë ê²½ì° ë¤ì 주ìë¡ ì§ìíì 문ìíì¸ì. `,"error_page.close_button_title":`{{appName}}
40ì¼ë¡ ì´ë`,"error_page.error_title_stripe_missing_required_permission":`íì Stripe ê¶í ëë½`,"error_page.button_close":`ë«ê¸°`,"error_page.error_message_stripe_invalid_tax_origin_address":`ì¸ê¸ ìì°ì§ 주ìê° ì못ëì´ êµ¬ë§¤ì ì¤í¨íìµëë¤. íë¡ëì
íê²½ììë ì¸ê¸ì´ ì ì©ëì§ ìì ìíë¡ êµ¬ë§¤ê° ì§íë©ëë¤.`,"error_page.error_message_stripe_tax_not_active":`Stripe Taxê° íì±íëì§ ìì 구매ì ì¤í¨íìµëë¤. íë¡ëì
íê²½ììë ì¸ê¸ì´ ì ì©ëì§ ìì ìíë¡ êµ¬ë§¤ê° ì§íë©ëë¤.`,"error_page.error_only_in_sandbox":`ì´ ë©ìì§ë ìëë°ì¤ììë§ íìë©ëë¤.`,"error_page.error_message_stripe_missing_required_permission":`Stripe ì±ì íìí ê¶íì´ ìì´ êµ¬ë§¤ì ì¤í¨íìµëë¤. íë¡ëì
íê²½ììë ì¸ê¸ì´ ì ì©ëì§ ìì ìíë¡ êµ¬ë§¤ê° ì§íë©ëë¤.`,"error_page.error_title_stripe_tax_not_active":`Stripe Taxê° íì±íëì§ ìì`,"error_page.error_title_stripe_invalid_tax_origin_address":`ì못ë ì¸ê¸ ìì°ì§ 주ì`,"apple_pay.free_trial":`ë¬´ë£ ì²´í`,"product_info.price_after_intro_price":`{{introPriceDuration}} í {{renewalDate}}ì`,"product_info.after_trial":`ì²´í í`,"product_info.after":`í`,"product_info.intro_price_phase_after_trial":`ë¤ì {{introPriceDuration}} ëì {{introPrice}}`,"product_info.intro_price_phase":`ì²ì {{introPriceDuration}} ëì {{introPrice}}`,"product_info.intro_price_phase_paid_once":`1í ê²°ì `,"payment_entry_page.trial_subscription_terms_info":`ì²´í 기ê°ì´ ì¢
ë£ëë©´ {{renewalDate}}ë¶í° {{price}} {{perFrequency}}ê° ì²êµ¬ë©ëë¤. ì´ ë ì§ ì ìë ì¸ì ë ì§ ì·¨ìí ì ììµëë¤.`,"payment_entry_page.subscription_info":`구ë
ì ìëì¼ë¡ ê°±ì ë©ëë¤. ì¸ì ë ì§ ì·¨ìí ì ììµëë¤.`,"payment_entry_page.otp_terms_info":`구매íìë©´ {{appName}}ì ì½ê´ì ë°ë¼ ìê¸ì´ ì²êµ¬ëë ê²ì ëìíë ê²ì
ëë¤.`,"payment_entry_page.terms_link_label":`ì½ê´`,"payment_entry_page.subscription_terms_info":`구ë
íë©´ ì·¨ìí ëê¹ì§ {{appName}}ì´ ì½ê´ì ë°ë¼ ìê¸ì ì²êµ¬íë ë° ëìíë ê²ì
ëë¤.`,"loading_page.keep_page_open":`ê±°ì ìë£ëììµëë¤. ì´ íì´ì§ë¥¼ ê³ì ì´ì´ ëì¸ì.`,"loading_page.processing_payment":`ê²°ì ì²ë¦¬ ì¤`,"pricing_table.discount":`í ì¸`,"pricing_table.subtotal":`ìê³`,"pricing_dropdown.add_promo_code":`íë¡ëª¨ì
ì½ë ì¶ê°`,"discount_input.label":`íë¡ëª¨ì
ì½ë`,"payment_entry_page.checkout_consent_terms_of_service":`ì´ì© ì½ê´`,"payment_entry_page.checkout_consent_agreement":`{{appName}} {{termsOfService}}ì ëìí©ëë¤.`},tfe={"periods.week":`{{amount}} minggu`,"periods.month":`{{amount}} bulan`,"periods.year":`{{amount}} tahun`,"periods.day":`{{amount}} hari`,"periods.weekShort":`{{amount}}mg`,"periods.monthShort":`{{amount}}bl`,"periods.yearShort":`{{amount}}th`,"periods.dayShort":`{{amount}}h`,"periods.lifetime":`seumur hidup`,"periods.weekPlural":`{{amount}} minggu`,"periods.monthPlural":`{{amount}} bulan`,"periods.yearPlural":`{{amount}} tahun`,"periods.dayPlural":`{{amount}} hari`,"periods.weekFrequency":`mingguan`,"periods.monthFrequency":`bulanan`,"periods.yearFrequency":`tahunan`,"periods.dayFrequency":`harian`,"periods.perWeekFrequency":`setiap minggu`,"periods.perMonthFrequency":`setiap bulan`,"periods.perYearFrequency":`setiap tahun`,"periods.perDayFrequency":`setiap hari`,"periods.unknownFrequency":`tidak diketahui`,"periods.weekFrequencyPlural":`setiap {{amount}} minggu`,"periods.monthFrequencyPlural":`setiap {{amount}} bulan`,"periods.yearFrequencyPlural":`setiap {{amount}} tahun`,"periods.dayFrequencyPlural":`setiap {{amount}} hari`,"product_info.product_title":`{{productTitle}}`,"product_info.product_description":`{{productDescription}}`,"product_info.product_price":`{{productPrice}}`,"product_info.free_trial_duration":`{{trialDuration}} percubaan percuma`,"product_info.price_after_free_trial":`Selepas tamat percubaan, pada {{renewalDate}}`,"product_info.renewal_frequency":`Diperbaharui {{frequency}}`,"product_info.continues_until_cancelled":`Berterusan sehingga dibatalkan`,"product_info.cancel_anytime":`Batal bila-bila masa`,"payment_entry_page.payment_step_title":`Pembayaran selamat oleh RevenueCat`,"payment_entry_page.button_pay":`Bayar sekarang`,"payment_entry_page.button_start_trial":`Mula Percubaan`,"success_page.purchase_successful":`Pembayaran selesai`,"success_page.button_close"
40:`Teruskan`,"error_page.if_error_persists":`Jika ralat berterusan, sila hubungi `,"error_page.error_title_already_subscribed":`Anda sudah melanggan {{productTitle}}`,"error_page.error_title_already_purchased":`Anda sudah membeli {{productTitle}}`,"error_page.error_title_other_errors":`Ada sesuatu yang tidak kena`,"error_page.error_message_already_subscribed":`Anda tidak boleh melanggan produk ini lagi.`,"error_page.error_message_already_purchased":`Anda tidak boleh membeli produk ini lagi.`,"error_page.error_message_missing_email_error":`Emel diperlukan untuk menyelesaikan pembelian.`,"error_page.error_message_network_error":`Ralat rangkaian. Sila semak sambungan internet anda.`,"error_page.error_message_error_charging_payment":`Pembayaran gagal.`,"error_page.error_message_error_setting_up_purchase":`Pembelian tidak dimulakan disebabkan ralat (kod ralat: {{errorCode}}).`,"error_page.error_message_invalid_tax_location":`Kami tidak dapat mengesahkan alamat bil anda. Sila semak sama ada poskod dan negara adalah betul.`,"error_page.error_message_unknown_error":`Ralat yang tidak diketahui telah berlaku (kod ralat: {{errorCode}}).`,"error_page.button_try_again":`Cuba lagi`,"paywall_variables.price_per_period":`{{formattedPrice}}/{{period}}`,"paywall_variables.sub_relative_discount":`{{discount}}%`,"paywall_variables.total_price_and_per_month":`{{formattedPrice}}/{{period}}({{formattedPricePerMonth}}/{{monthPeriod}})`,"product_info.total_due_today":`Jumlah yang perlu dibayar hari ini`,"product_info.subscribe_to":`Langgan`,"navbar_header.details":`Butiran`,"navbar_header.back_button":`Kembali`,"pricing_dropdown.show_details":`Tunjukkan butiran`,"pricing_dropdown.hide_details":`Sembunyikan butiran`,"pricing_table.tax":`Cukai`,"pricing_table.trial_ends":`Selepas tempoh percubaan tamat, pada {{formattedTrialEndDate}}`,"pricing_table.total_due_today":`Jumlah yang perlu dibayar hari ini`,"pricing_table.total_excluding_tax":`Jumlah tidak termasuk cukai`,"pricing_table.enter_billing_address_to_calculate":`Masukkan alamat pengebilan untuk mengira`,"pricing_table.enter_state_or_postal_code_to_calculate":`Masukkan negeri atau poskod untuk mengira`,"pricing_table.enter_postal_code_to_calculate":`Masukkan poskod untuk mengira`,"error_page.error_message_invalid_email_error":`Alamat e-mel {{email}} tidak dapat disahkan. Sila berikan alamat e-mel yang sah.`,"payment_entry_page.button_payment_method":`Bayar {{formattedPrice}} dengan {{paymentMethod}}`,"payment_entry_page.button_with_price":`Bayar {{formattedPrice}}`,"price_update.title":`Kemaskini harga`,"price_update.base_message":`Jumlah harga telah dikemas kini dengan cukai berdasarkan alamat pengebilan anda. Sila semak dan cuba lagi. Kad anda hanya akan dicaj sekali.`,"price_update.trial_message":`Harga langganan telah dikemas kini untuk memasukkan cukai berdasarkan alamat bil anda. Tempoh percubaan percuma masih terpakai. Sila semak dan cuba lagi.`,"payment_entry_page.express_checkout_divider":`ATAU BAYAR DENGAN KAD`,"error_page.trouble_accessing":`Jika anda menghadapi masalah untuk mengakses pembelian anda, hubungi sokongan di `,"error_page.close_button_title":`Pergi ke {{appName}}`,"error_page.error_title_stripe_missing_required_permission":`Kebenaran Stripe hilang`,"error_page.button_close":`Tutup`,"error_page.error_message_stripe_invalid_tax_origin_address":`Pembelian gagal kerana alamat asal cukai tidak sah. Dalam pengeluaran, pembelian akan berfungsi tanpa cukai dikenakan.`,"error_page.error_message_stripe_tax_not_active":`Pembelian gagal kerana Cukai Stripe tidak didayakan. Dalam pengeluaran, pembelian akan berfungsi tanpa cukai dikenakan.`,"error_page.error_only_in_sandbox":`Mesej ini hanya muncul dalam kotak pasir.`,"error_page.error_message_stripe_missing_required_permission":`Pembelian gagal kerana aplikasi Stripe kekurangan kebenaran yang diperlukan. Dalam pengeluaran, pembelian akan berfungsi tanpa cukai dikenakan.`,"error_page.error_title_stripe_tax_not_active":`Cukai Stripe tidak aktif`,"error_page.error_title_stripe_invalid_tax_origin_address":`Alamat asal cukai Stripe tidak sah`,"apple_pay.free_trial":`Percubaan Percuma`,"product_info.price_after_intro_price":`Selepas {{introPriceDuration}}, pada {{renewalDate}}`,"product_info.after_trial":`selepas percubaan`,"product_info.after":`selepas`,"product_info.intro_price_phase_after_trial":`Kemudian {{introPriceDuration}} untuk {{introPrice}}`,"product_info.intro_price_phase":`Pertama {{introPriceDuration}} untuk {{introPrice}}`,"product_info.intro_price_phase_paid_once":`dibayar sekali`,"payment_entry_page.trial_subscription_terms_info":`Selepas tempoh percubaan anda tamat, anda akan dikenakan bayaran sebanyak {{price}} {{perFrequency}} bermula {{renewalDate}}. Anda boleh membatalkan pada bila-bila masa sebelum tarikh ini.`,"payment_entry_page.subscription_info":`Langganan diperbaharui secara automatik. Batalkan bila-bila masa.`,"payment_entry_page.otp_terms_info":`Dengan membuat pembelian, anda bersetuju untuk membenarkan {{appName}}
40 mengenakan bayaran kepada anda mengikut terma mereka.`,"payment_entry_page.terms_link_label":`Terma`,"payment_entry_page.subscription_terms_info":`Dengan melanggan, anda bersetuju untuk membenarkan {{appName}} mengenakan bayaran kepada anda mengikut terma mereka sehingga anda membatalkan.`,"loading_page.keep_page_open":`Proses hampir selesai. Pastikan halaman ini dibuka.`,"loading_page.processing_payment":`Memproses pembayaran`,"pricing_table.discount":`Diskaun`,"pricing_table.subtotal":`Subtotal`,"pricing_dropdown.add_promo_code":`Tambah kod promo`,"discount_input.label":`Kod promo`,"payment_entry_page.checkout_consent_terms_of_service":`syarat perkhidmatan`,"payment_entry_page.checkout_consent_agreement":`Saya bersetuju dengan {{appName}} {{termsOfService}}.`},nfe={"periods.week":`{{amount}} uke`,"periods.month":`{{amount}} måned`,"periods.year":`{{amount}} år`,"periods.day":`{{amount}} dag`,"periods.weekShort":`{{amount}}uk`,"periods.monthShort":`{{amount}}md`,"periods.yearShort":`{{amount}}år`,"periods.dayShort":`{{amount}}d`,"periods.lifetime":`livstid`,"periods.weekPlural":`{{amount}} uker`,"periods.monthPlural":`{{amount}} måneder`,"periods.yearPlural":`{{amount}} år`,"periods.dayPlural":`{{amount}} dager`,"periods.weekFrequency":`ukentlig`,"periods.monthFrequency":`månedlig`,"periods.yearFrequency":`årlig`,"periods.dayFrequency":`daglig`,"periods.perWeekFrequency":`per uke`,"periods.perMonthFrequency":`per måned`,"periods.perYearFrequency":`per år`,"periods.perDayFrequency":`per dag`,"periods.unknownFrequency":`ukjent`,"periods.weekFrequencyPlural":`hver {{amount}} uker`,"periods.monthFrequencyPlural":`hver {{amount}} måneder`,"periods.yearFrequencyPlural":`hver {{amount}} år`,"periods.dayFrequencyPlural":`hver {{amount}} dager`,"product_info.product_title":`{{productTitle}}`,"product_info.product_description":`{{productDescription}}`,"product_info.product_price":`{{productPrice}}`,"product_info.free_trial_duration":`{{trialDuration}} gratis prøveperiode`,"product_info.price_after_free_trial":`Etter prøveperioden slutter, den {{renewalDate}}`,"product_info.renewal_frequency":`Fornyes {{frequency}}`,"product_info.continues_until_cancelled":`Varer til den avbestilles`,"product_info.cancel_anytime":`Avbestille når som helst`,"payment_entry_page.payment_step_title":`Sikker betaling via RevenueCat`,"payment_entry_page.button_pay":`Betal nå`,"payment_entry_page.button_start_trial":`Start prøveperiode`,"success_page.purchase_successful":`Betalingen er fullført`,"success_page.button_close":`Fortsett`,"error_page.if_error_persists":`Hvis feilen vedvarer, vennligst kontakt `,"error_page.error_title_already_subscribed":`Du abonnerer allerede på {{productTitle}}`,"error_page.error_title_already_purchased":`Du har allerede kjøpt {{productTitle}}`,"error_page.error_title_other_errors":`Noe gikk galt`,"error_page.error_message_already_subscribed":`Du kan ikke abonnere på dette produktet igjen.`,"error_page.error_message_already_purchased":`Du kan ikke kjøpe dette produktet igjen.`,"error_page.error_message_missing_email_error":`E-post er nødvendig for å fullføre kjøpet.`,"error_page.error_message_network_error":`Nettverksfeil. Vennligst sjekk internettforbindelsen din.`,"error_page.error_message_error_charging_payment":`Betalingen mislyktes.`,"error_page.error_message_error_setting_up_purchase":`Kjøpet ble ikke startet på grunn av en feil (feilkode: {{errorCode}}).`,"error_page.error_message_invalid_tax_location":`Vi kunne ikke bekrefte faktureringsadressen din. Vennligst sjekk at postnummeret og landet er korrekte.`,"error_page.error_message_unknown_error":`En ukjent feil oppstod (feilkode: {{errorCode}}).`,"error_page.button_try_again":`Prøv igjen`,"paywall_variables.price_per_period":`{{formattedPrice}}/{{period}}`,"paywall_variables.sub_relative_discount":`{{discount}}%`,"paywall_variables.total_price_and_per_month":`{{formattedPrice}}/{{period}} ({{formattedPricePerMonth}}/{{monthPeriod}})`,"product_info.total_due_today":`Totalt forfaller i dag`,"product_info.subscribe_to":`Abonner på`,"navbar_header.details":`Detaljer`,"navbar_header.back_button":`Tilbake`,"pricing_dropdown.show_details":`Vis detaljer`,"pricing_dropdown.hide_details":`Skjul detaljer`,"pricing_table.tax":`Skatt`,"pricing_table.trial_ends":`Etter prøveperioden slutter, den {{formattedTrialEndDate}}`,"pricing_table.total_due_today":`Totalt forfaller i dag`,"pricing_table.total_excluding_tax":`Total eksklusive skatt`,"pricing_table.enter_billing_address_to_calculate":`Oppgi fakturer
40ingsadresse for Ã¥ beregne`,"pricing_table.enter_state_or_postal_code_to_calculate":`Skriv inn stat eller postnummer for Ã¥ beregne`,"pricing_table.enter_postal_code_to_calculate":`Skriv inn postnummer for Ã¥ beregne`,"error_page.error_message_invalid_email_error":`E-postadressen {{email}} kunne ikke bekreftes. Vennligst oppgi en gyldig e-postadresse.`,"payment_entry_page.button_payment_method":`Betal {{formattedPrice}} med {{paymentMethod}}`,"payment_entry_page.button_with_price":`Betal {{formattedPrice}}`,"price_update.title":`Prisoppdatering`,"price_update.base_message":`Totalprisen er oppdatert med skatt basert pÃ¥ fakturaadressen din. Vennligst se gjennom og prøv igjen. Kortet ditt vil kun bli belastet én gang.`,"price_update.trial_message":`Abonnementsprisen er oppdatert for Ã¥ inkludere skatter basert pÃ¥ din fakturaadresse. Den gratis prøveperioden gjelder fortsatt. Vennligst sjekk og prøv igjen.`,"payment_entry_page.express_checkout_divider":`ELLER BETAL MED KORT`,"error_page.trouble_accessing":`Hvis du har problemer med Ã¥ fÃ¥ tilgang til kjøpet ditt, kan du kontakte support pÃ¥ `,"error_page.close_button_title":`GÃ¥ til {{appName}}`,"error_page.error_title_stripe_missing_required_permission":`Mangler Stripe-tillatelse`,"error_page.button_close":`Lukk`,"error_page.error_message_stripe_invalid_tax_origin_address":`Kjøpet mislyktes fordi skatteopprinnelsesadressen er ugyldig. I produksjon vil kjøp fungere uten at skatter brukes.`,"error_page.error_message_stripe_tax_not_active":`Kjøpet mislyktes fordi Stripe Tax ikke er aktivert. I produksjon vil kjøp fungere uten at skatter brukes.`,"error_page.error_only_in_sandbox":`Denne meldingen vises bare i sandkassen.`,"error_page.error_message_stripe_missing_required_permission":`Kjøpet mislyktes fordi Stripe-appen mangler en nødvendig tillatelse. I produksjon vil kjøp fungere uten at skatter brukes.`,"error_page.error_title_stripe_tax_not_active":`Stripe Tax er ikke aktivt`,"error_page.error_title_stripe_invalid_tax_origin_address":`Ugyldig skatteopprinnelsesadresse`,"apple_pay.free_trial":`Gratis prøveperiode`,"product_info.price_after_intro_price":`Etter {{introPriceDuration}}, den {{renewalDate}}`,"product_info.after_trial":`etter prøveperiode`,"product_info.after":`etter`,"product_info.intro_price_phase_after_trial":`Deretter {{introPriceDuration}} for {{introPrice}}`,"product_info.intro_price_phase":`Først {{introPriceDuration}} for {{introPrice}}`,"product_info.intro_price_phase_paid_once":`betales én gang`,"payment_entry_page.trial_subscription_terms_info":`Etter at prøveperioden din er over, blir du belastet {{price}} {{perFrequency}} fra og med {{renewalDate}}. Du kan kansellere nÃ¥r som helst før denne datoen.`,"payment_entry_page.subscription_info":`Abonnementet fornyes automatisk. Avbryt nÃ¥r som helst.`,"payment_entry_page.otp_terms_info":`Ved Ã¥ kjøpe godtar du at {{appName}} belaster deg i henhold til deres vilkÃ¥r.`,"payment_entry_page.terms_link_label":`VilkÃ¥r`,"payment_entry_page.subscription_terms_info":`Ved Ã¥ abonnere godtar du at {{appName}} belaster deg i henhold til deres vilkÃ¥r til du kansellerer.`,"loading_page.keep_page_open":`Prosessen er nesten ferdig. Hold denne siden Ã¥pen.`,"loading_page.processing_payment":`Behandler betaling`,"pricing_table.discount":`Rabatt`,"pricing_table.subtotal":`Subtotal`,"pricing_dropdown.add_promo_code":`Legg til kampanjekode`,"discount_input.label":`Kampanjekode`,"payment_entry_page.checkout_consent_terms_of_service":`vilkÃ¥r for bruk`,"payment_entry_page.checkout_consent_agreement":`Jeg godtar {{appName}} {{termsOfService}}.`},rfe={"periods.week":`{{amount}} tydzieÅ`,"periods.month":`{{amount}} miesiÄ
c`,"periods.year":`{{amount}} rok`,"periods.day":`{{amount}} dzieÅ`,"periods.weekShort":`{{amount}}tydz`,"periods.monthShort":`{{amount}}mies`,"periods.yearShort":`{{amount}}rok`,"periods.dayShort":`{{amount}}d`,"periods.lifetime":`dożywotnio`,"periods.weekPlural":`{{amount}} tygodni`,"periods.monthPlural":`{{amount}} miesiÄcy`,"periods.yearPlural":`{{amount}} lat`,"periods.dayPlural":`{{amount}} dni`,"periods.weekFrequency":`tygodniowo`,"periods.monthFrequency":`miesiÄcznie`,"periods.yearFrequency":`rocznie`,"periods.dayFrequency":`dziennie`,"periods.perWeekFrequency":`na tydzieÅ`,"periods.perMonthFrequency":`na miesiÄ
c`,"periods.perYearFrequency":`na rok`,"periods.perDayFrequency":`na dzieÅ`,"periods.unknownFrequency":`nieznany`,"periods.weekFrequencyPlural":`co {{amount}} tygodni`,"periods.monthFrequencyPlural":`co {{amount}} miesiÄcy`,"periods.yearFrequencyPlural":`co {{amount}} lat`,"periods.dayFrequencyPlural":`co {{amount}} dni`,"product_info.product_title":`{{productTitle}}`,"product_info.product_description":`{{productDescription}}`,"product_info.product_price":`{{productPrice}}`,"product_info.free_trial_duration":`{{trialDuration}} dni próbnych`,"product_info.price_after_free_trial":`Po zakoÅczeniu okresu próbnego, dnia {{renewalDate}}`,"product_info.renewal_frequency":`Odnawialny co {{frequency}}`,"product_info.continues_until_cancelled":`Kontynuowane do momentu anulowania`,"product_info.cancel_anytime":`Możesz anulowaÄ w dowolnym momencie`,"payment_entry_page.payment_step_title":`Bezpieczna pÅatnoÅÄ przez RevenueCat`,"payment_entry_page.button_pay":`ZapÅaÄ teraz`,"payment_entry_page.button_start_trial":`Rozpocznij okres próbny`,"success_page.purchase_successful":`PÅatnoÅÄ zakoÅczona`,"success_page.button_close"
40:`Kontynuuj`,"error_page.if_error_persists":`JeÅli bÅÄ
d bÄdzie siÄ powtarzaÅ, skontaktuj siÄ z `,"error_page.error_title_already_subscribed":`Już subskrybujesz {{productTitle}}`,"error_page.error_title_already_purchased":`Już zakupiÅeÅ/aÅ {{productTitle}}`,"error_page.error_title_other_errors":`CoÅ poszÅo nie tak`,"error_page.error_message_already_subscribed":`Nie możesz ponownie subskrybowaÄ tego produktu.`,"error_page.error_message_already_purchased":`Nie możesz ponownie zakupiÄ tego produktu.`,"error_page.error_message_missing_email_error":`Adres e-mail jest wymagany do dokonania zakupu.`,"error_page.error_message_network_error":`BÅÄ
d sieci. Sprawdź poÅÄ
czenie internetowe.`,"error_page.error_message_error_charging_payment":`PÅatnoÅÄ nieudana.`,"error_page.error_message_error_setting_up_purchase":`Zakup nie zostaÅ rozpoczÄty z powodu bÅÄdu (kod bÅÄdu: {{errorCode}}).`,"error_page.error_message_invalid_tax_location":`Nie mogliÅmy zweryfikowaÄ Twojego adresu rozliczeniowego. Sprawdź, czy kod pocztowy i kraj sÄ
poprawne.`,"error_page.error_message_unknown_error":`WystÄ
piÅ nieznany bÅÄ
d (kod bÅÄdu: {{errorCode}}).`,"error_page.button_try_again":`Spróbuj ponownie`,"paywall_variables.price_per_period":`{{formattedPrice}}/{{period}}`,"paywall_variables.sub_relative_discount":`{{discount}}%`,"paywall_variables.total_price_and_per_month":`{{formattedPrice}}/{{period}}({{formattedPricePerMonth}}/{{monthPeriod}})`,"product_info.total_due_today":`Do zapÅaty dzisiaj`,"product_info.subscribe_to":`Subskrybuj`,"navbar_header.details":`SzczegóÅy`,"navbar_header.back_button":`Wstecz`,"pricing_dropdown.show_details":`Pokaż szczegóÅy`,"pricing_dropdown.hide_details":`Ukryj szczegóÅy`,"pricing_table.tax":`Podatek`,"pricing_table.trial_ends":`Po zakoÅczeniu okresu próbnego, {{formattedTrialEndDate}}`,"pricing_table.total_due_today":`Suma należna dzisiaj`,"pricing_table.total_excluding_tax":`Suma bez podatku`,"pricing_table.enter_billing_address_to_calculate":`Wprowadź adres rozliczeniowy, aby obliczyÄ`,"pricing_table.enter_state_or_postal_code_to_calculate":`Wprowadź stan lub kod pocztowy, aby obliczyÄ`,"pricing_table.enter_postal_code_to_calculate":`Wprowadź kod pocztowy, aby obliczyÄ`,"error_page.error_message_invalid_email_error":`Nie można zweryfikowaÄ adresu e-mail {{email}}. ProszÄ podaÄ prawidÅowy adres e-mail.`,"payment_entry_page.button_payment_method":`ZapÅaÄ {{formattedPrice}} przez {{paymentMethod}}`,"payment_entry_page.button_with_price":`ZapÅaÄ {{formattedPrice}}`,"price_update.title":`Aktualizacja ceny`,"price_update.base_message":`Cena caÅkowita zostaÅa zaktualizowana o podatek na podstawie Twojego adresu rozliczeniowego. Sprawdź i spróbuj ponownie. Twoja karta zostanie obciÄ
żona tylko raz.`,"price_update.trial_message":`Cena subskrypcji zostaÅa zaktualizowana o podatki na podstawie Twojego adresu rozliczeniowego. Okres próbny nadal obowiÄ
zuje. Sprawdź i spróbuj ponownie.`,"payment_entry_page.express_checkout_divider":`LUB ZAPÅAÄ KARTÄ`,"error_page.trouble_accessing":`JeÅli masz problemy z dostÄpem do zakupu, skontaktuj siÄ z dziaÅem pomocy pod adresem `,"error_page.close_button_title":`Przejdź do {{appName}}`,"error_page.error_title_stripe_missing_required_permission":`BrakujÄ
ce uprawnienie Stripe`,"error_page.button_close":`Zamknij`,"error_page.error_message_stripe_invalid_tax_origin_address":`Zakup nie powiódÅ siÄ, ponieważ adres pochodzenia podatku jest nieprawidÅowy. W Årodowisku produkcyjnym zakupy bÄdÄ
dziaÅaÄ bez naliczania podatków.`,"error_page.error_message_stripe_tax_not_active":`Zakup nie powiódÅ siÄ, ponieważ Stripe Tax nie jest wÅÄ
czony. W Årodowisku produkcyjnym zakupy bÄdÄ
dziaÅaÄ bez naliczania podatków.`,"error_page.error_only_in_sandbox":`Ta wiadomoÅÄ pojawia siÄ tylko w Årodowisku testowym.`,"error_page.error_message_stripe_missing_required_permission":`Zakup nie powiódÅ siÄ, ponieważ aplikacja Stripe nie ma wymaganego uprawnienia. W Årodowisku produkcyjnym zakupy bÄdÄ
dziaÅaÄ bez naliczania podatków.`,"error_page.error_title_str
40ipe_tax_not_active":`Stripe Tax nieaktywny`,"error_page.error_title_stripe_invalid_tax_origin_address":`NieprawidÅowy adres pochodzenia podatku`,"apple_pay.free_trial":`Okres próbny`,"product_info.price_after_intro_price":`Po {{introPriceDuration}}, od {{renewalDate}}`,"product_info.after_trial":`po okresie próbnym`,"product_info.after":`po`,"product_info.intro_price_phase_after_trial":`NastÄpnie {{introPriceDuration}} za {{introPrice}}`,"product_info.intro_price_phase":`Najpierw {{introPriceDuration}} za {{introPrice}}`,"product_info.intro_price_phase_paid_once":`pÅatne jednorazowo`,"payment_entry_page.trial_subscription_terms_info":`Po zakoÅczeniu okresu próbnego zostanie pobrana opÅata w wysokoÅci {{price}} {{perFrequency}} poczÄ
wszy od {{renewalDate}}. Możesz anulowaÄ subskrypcjÄ w dowolnym momencie przed tÄ
datÄ
.`,"payment_entry_page.subscription_info":`Subskrypcja odnawia siÄ automatycznie. Anuluj w dowolnym momencie.`,"payment_entry_page.otp_terms_info":`DokonujÄ
c zakupu, zgadzasz siÄ na obciÄ
żenie przez {{appName}} zgodnie z ich warunkami.`,"payment_entry_page.terms_link_label":`Warunki`,"payment_entry_page.subscription_terms_info":`SubskrybujÄ
c, zgadzasz siÄ na obciÄ
żanie przez {{appName}} zgodnie z ich warunkami do momentu anulowania.`,"loading_page.keep_page_open":`Proces jest prawie zakoÅczony. Pozostaw tÄ stronÄ otwartÄ
.`,"loading_page.processing_payment":`Przetwarzanie pÅatnoÅci`,"pricing_table.discount":`Rabat`,"pricing_table.subtotal":`Suma czÄÅciowa`,"pricing_dropdown.add_promo_code":`Dodaj kod promocyjny`,"discount_input.label":`Kod promocyjny`,"payment_entry_page.checkout_consent_terms_of_service":`regulamin`,"payment_entry_page.checkout_consent_agreement":`AkceptujÄ {{appName}} {{termsOfService}}.`},ife={"periods.week":`{{amount}} semana`,"periods.month":`{{amount}} mês`,"periods.year":`{{amount}} ano`,"periods.day":`{{amount}} dia`,"periods.weekShort":`{{amount}}sem`,"periods.monthShort":`{{amount}}mês`,"periods.yearShort":`{{amount}}ano`,"periods.dayShort":`{{amount}}d`,"periods.lifetime":`vitalÃcio`,"periods.weekPlural":`{{amount}} semanas`,"periods.monthPlural":`{{amount}} meses`,"periods.yearPlural":`{{amount}} anos`,"periods.dayPlural":`{{amount}} dias`,"periods.weekFrequency":`semanal`,"periods.monthFrequency":`mensal`,"periods.yearFrequency":`anual`,"periods.dayFrequency":`diário`,"periods.perWeekFrequency":`por semana`,"periods.perMonthFrequency":`por mês`,"periods.perYearFrequency":`por ano`,"periods.perDayFrequency":`por dia`,"periods.unknownFrequency":`desconhecido`,"periods.weekFrequencyPlural":`a cada {{amount}} semanas`,"periods.monthFrequencyPlural":`a cada {{amount}} meses`,"periods.yearFrequencyPlural":`a cada {{amount}} anos`,"periods.dayFrequencyPlural":`a cada {{amount}} dias`,"product_info.product_title":`{{productTitle}}`,"product_info.product_description":`{{productDescription}}`,"product_info.product_price":`{{productPrice}}`,"product_info.free_trial_duration":`{{trialDuration}} teste grátis`,"product_info.price_after_free_trial":`Após o término do teste, em {{renewalDate}}`,"product_info.renewal_frequency":`Renova {{frequency}}`,"product_info.continues_until_cancelled":`Continua até ser cancelado`,"product_info.cancel_anytime":`Cancelar a qualquer momento`,"payment_entry_page.payment_step_title":`Pagamento seguro pela RevenueCat`,"payment_entry_page.button_pay":`Pagar agora`,"payment_entry_page.button_start_trial":`Iniciar Teste`,"success_page.purchase_successful":`Pagamento concluÃdo`,"success_page.button_close":`Continuar`,"error_page.if_error_persists":`Se o erro persistir, entre em contato com `,"error_page.error_title_already_subscribed":`Você já se inscreveu em {{productTitle}}`,"error_page.error_title_already_purchased":`Você já comprou {{productTitle}}`,"error_page.error_title_other_errors":`Algo deu errado`,"error_page.error_message_already_subscribed":`Você não pode se inscrever neste produto novamente.`,"error_page.error_message_already_purchased":`Você não pode comprar este produto novamente.`,"error_page.error_message_missing_email_error":`Email é necessário para concluir a compra.`,"error_page.error_message_network_error":`Erro de rede. Verifique sua conexão com a internet.`,"error_page.error_message_error_charging_payment":`Pagamento falhou.`,"error_page.error_message_error_setting_up_purchase":`Compra não iniciada devido a um erro (código de erro: {{errorCode}}).`,"error_page.error_message_invalid_tax_location":`Não conseguimos verificar seu endereço de cobrança. Por favor, verifique se o código postal e o paÃs estão corretos.`,"error_page.error_message_unknown_error":`Ocorreu um erro desconhecido (código de erro: {{errorCode}}).`,"error_page.button_try_again":`Tentar novamente`,"paywall_variables.price_per_period":`{{formattedPrice}}/{{period}}`,"paywall_variables.sub_relative_discount":`{{discount}}%`,"paywall_variables.total_price_and_per_month":`{{formattedPrice}}/{{period}}({{formattedPricePerMonth}}/{{monthPeriod}})`,"product_info.total_due_today":`Total a pagar hoje`,"product_info.subscribe_to":`Subscrever`,"navbar_header.details":`Detalhes`,"navbar_header.back_button":`Voltar`,"pricing_dropdown.show_details":`Mostrar detalhes`,"pricing_dropdown.hide_details":`Ocultar detalhes`,"pricing_table.tax":`Imposto`,"pricing_table.trial_ends":`Após o término do perÃodo de avaliação, em {{formattedTrialEndDate}}`,"pricing_table.total_due_today":`Total a pagar hoje`,"pricing_table.total_excluding_tax":`Total sem impostos`,"pricing_table.enter_billing_address_to_calculate":`Insira o endereço de cobrança para calcular`,"pricing_table.enter_state_or_postal_code_to_calculate":`Insira o estado ou o CEP para calcular`,"pricing_table.enter_postal_code_to_calculate":`Insira o CEP para calcular`,"error_page.error_message_invalid_email_error":`O endereço de e-mail {{email}} não pôde ser verificado. Por favor, forneça um endereço de e-mail válido.`,"payment_entry_page.button_payment_method":`Pagar {{formattedPrice}} com {{paymentMethod}}`,"payment_entry_page.button_with_price":`Pagar {{formattedPrice}}`,"price_update.title":`Atualização de preço`,"price_update.base_message":`O preço total foi atualizado com impostos com base no seu endereço de cobrança. Por favor, revise e tente novamente. Seu cartão só será cobrado uma vez.`,"price_update.trial_message":`O preço da assinatura foi atualizado para incluir impostos com base no seu endereço de faturação. O perÃodo de teste gratuito continua válido. Por favor, verifique e tente novamente.`,"payment_entry_page.express_checkout_divider":`OU PAGUE COM CARTÃO`,"error_page.trouble_accessing":`Se estiver com problemas para acessar sua compra, entre em contato com o suporte em `,"error_page.close_button_title":`Ir para {{appName}}
40`,"error_page.error_title_stripe_missing_required_permission":`Permissão do Stripe em falta`,"error_page.button_close":`Fechar`,"error_page.error_message_stripe_invalid_tax_origin_address":`A compra falhou porque o endereço de origem fiscal é inválido. Em produção, as compras funcionarão sem impostos aplicados.`,"error_page.error_message_stripe_tax_not_active":`A compra falhou porque o Stripe Tax não está ativado. Em produção, as compras funcionarão sem impostos aplicados.`,"error_page.error_only_in_sandbox":`Esta mensagem aparece apenas na sandbox.`,"error_page.error_message_stripe_missing_required_permission":`A compra falhou porque o aplicativo Stripe não tem uma permissão necessária. Em produção, as compras funcionarão sem impostos aplicados.`,"error_page.error_title_stripe_tax_not_active":`Stripe Tax não está ativo`,"error_page.error_title_stripe_invalid_tax_origin_address":`Endereço de origem fiscal inválido`,"apple_pay.free_trial":`Teste Gratuito`,"product_info.price_after_intro_price":`Após {{introPriceDuration}}, em {{renewalDate}}`,"product_info.after_trial":`após o perÃodo de teste`,"product_info.after":`após`,"product_info.intro_price_phase_after_trial":`Depois, {{introPriceDuration}} por {{introPrice}}`,"product_info.intro_price_phase":`Primeiro, {{introPriceDuration}} por {{introPrice}}`,"product_info.intro_price_phase_paid_once":`pago uma vez`,"payment_entry_page.trial_subscription_terms_info":`Após o término do perÃodo de avaliação, será cobrado o valor de {{price}} {{perFrequency}} a partir de {{renewalDate}}. Pode cancelar a qualquer momento antes desta data.`,"payment_entry_page.subscription_info":`A subscrição é renovada automaticamente. Cancele a qualquer momento.`,"payment_entry_page.otp_terms_info":`Ao comprar, você concorda em permitir que o {{appName}} cobre de acordo com os termos deles.`,"payment_entry_page.terms_link_label":`Termos`,"payment_entry_page.subscription_terms_info":`Ao subscrever, concorda em permitir que a {{appName}} lhe cobre de acordo com os seus termos até cancelar.`,"loading_page.keep_page_open":`O processo está quase concluÃdo. Mantenha esta página aberta.`,"loading_page.processing_payment":`Processando o pagamento`,"pricing_table.discount":`Desconto`,"pricing_table.subtotal":`Subtotal`,"pricing_dropdown.add_promo_code":`Adicionar código promocional`,"discount_input.label":`Código promocional`,"payment_entry_page.checkout_consent_terms_of_service":`termos de serviço`,"payment_entry_page.checkout_consent_agreement":`Concordo com os {{termsOfService}} do {{appName}}.`},afe={"periods.week":`{{amount}} sÄptÄmânÄ`,"periods.month":`{{amount}} lunÄ`,"periods.year":`{{amount}} an`,"periods.day":`{{amount}} zi`,"periods.weekShort":`{{amount}}sÄpt`,"periods.monthShort":`{{amount}}lun`,"periods.yearShort":`{{amount}}an`,"periods.dayShort":`{{amount}}z`,"periods.lifetime":`pe viaÈÄ`,"periods.weekPlural":`{{amount}} sÄptÄmâni`,"periods.monthPlural":`{{amount}} luni`,"periods.yearPlural":`{{amount}} ani`,"periods.dayPlural":`{{amount}} zile`,"periods.weekFrequency":`sÄptÄmânal`,"periods.monthFrequency":`lunar`,"periods.yearFrequency":`anual`,"periods.dayFrequency":`zilnic`,"periods.perWeekFrequency":`pe sÄptÄmânÄ`,"periods.perMonthFrequency":`pe lunÄ`,"periods.perYearFrequency":`pe an`,"periods.perDayFrequency":`pe zi`,"periods.unknownFrequency":`necunoscut`,"periods.weekFrequencyPlural":`la fiecare {{amount}} sÄptÄmâni`,"periods.monthFrequencyPlural":`la fiecare {{amount}} luni`,"periods.yearFrequencyPlural":`la fiecare {{amount}} ani`,"periods.dayFrequencyPlural":`la fiecare {{amount}} zile`,"product_info.product_title":`{{productTitle}}`,"product_info.product_description":`{{productDescription}}`,"product_info.product_price":`{{productPrice}}`,"product_info.free_trial_duration":`{{trialDuration}} perioadÄ de probÄ gratuitÄ`,"product_info.price_after_free_trial":`DupÄ terminarea perioadei de probÄ, pe {{renewalDate}}`,"product_info.renewal_frequency":`Se reînnoieÈte {{frequency}}`,"product_info.continues_until_cancelled":`ContinuÄ pânÄ la anulare`,"product_info.cancel_anytime":`Anulare oricând`,"payment_entry_page.payment_step_title":`Plata securizatÄ prin RevenueCat`,"payment_entry_page.button_pay":`PlÄteÈte acum`,"payment_entry_page.button_start_trial":`Ãncepe peri
40oada de probÄ`,"success_page.purchase_successful":`Plata efectuatÄ`,"success_page.button_close":`ContinuÄ`,"error_page.if_error_persists":`DacÄ eroarea persistÄ, vÄ rugÄm sÄ contactaÈi `,"error_page.error_title_already_subscribed":`SunteÈi deja abonat la {{productTitle}}`,"error_page.error_title_already_purchased":`AÈi achiziÈionat deja {{productTitle}}`,"error_page.error_title_other_errors":`A apÄrut o eroare`,"error_page.error_message_already_subscribed":`Nu vÄ puteÈi abona din nou la acest produs.`,"error_page.error_message_already_purchased":`Nu puteÈi achiziÈiona din nou acest produs.`,"error_page.error_message_missing_email_error":`Adresa de e-mail este necesarÄ pentru a finaliza achiziÈia.`,"error_page.error_message_network_error":`Eroare de reÈea. VerificaÈi conexiunea la internet.`,"error_page.error_message_error_charging_payment":`Plata a eÈuat.`,"error_page.error_message_error_setting_up_purchase":`AchiziÈia nu a putut fi iniÈiatÄ din cauza unei erori (cod de eroare: {{errorCode}}).`,"error_page.error_message_invalid_tax_location":`Nu am putut verifica adresa de facturare. VÄ rugÄm sÄ verificaÈi dacÄ codul poÈtal Èi Èara sunt corecte.`,"error_page.error_message_unknown_error":`A apÄrut o eroare necunoscutÄ (cod de eroare: {{errorCode}}).`,"error_page.button_try_again":`ÃncearcÄ din nou`,"paywall_variables.price_per_period":`{{formattedPrice}}/{{period}}`,"paywall_variables.sub_relative_discount":`{{discount}}%`,"paywall_variables.total_price_and_per_month":`{{formattedPrice}}/{{period}}({{formattedPricePerMonth}}/{{monthPeriod}})`,"product_info.total_due_today":`Total de platÄ astÄzi`,"product_info.subscribe_to":`Abonare la`,"navbar_header.details":`Detalii`,"navbar_header.back_button":`Ãnapoi`,"pricing_dropdown.show_details":`AratÄ detalii`,"pricing_dropdown.hide_details":`Ascunde detalii`,"pricing_table.tax":`TaxÄ`,"pricing_table.trial_ends":`DupÄ ce perioada de probÄ se terminÄ, pe {{formattedTrialEndDate}}`,"pricing_table.total_due_today":`Total de plÄtit astÄzi`,"pricing_table.total_excluding_tax":`Total fÄrÄ taxe`,"pricing_table.enter_billing_address_to_calculate":`IntroduceÈi adresa de facturare pentru a calcula`,"pricing_table.enter_state_or_postal_code_to_calculate":`IntroduceÈi statul sau codul poÈtal pentru a calcula`,"pricing_table.enter_postal_code_to_calculate":`IntroduceÈi codul poÈtal pentru a calcula`,"error_page.error_message_invalid_email_error":`Adresa de e-mail {{email}} nu a putut fi verificatÄ. VÄ rugÄm sÄ furnizaÈi o adresÄ de e-mail validÄ.`,"payment_entry_page.button_payment_method":`PlÄteÈte {{formattedPrice}} cu {{paymentMethod}}`,"payment_entry_page.button_with_price":`PlÄteÈte {{formattedPrice}}`,"price_update.title":`Actualizare preÈ`,"price_update.base_message":`PreÈul total a fost actualizat cu taxe, în funcÈie de adresa dumneavoastrÄ de facturare. VÄ rugÄm sÄ revizuiÈi Èi sÄ Ã®ncercaÈi din nou. Cardul dumneavoastrÄ va fi debitat o singurÄ datÄ.`,"price_update.trial_message":`PreÈul abonamentului a fost actualizat pentru a include taxele bazate pe adresa dvs. de facturare. Perioada de probÄ gratuitÄ rÄmâne valabilÄ. VÄ rugÄm sÄ verificaÈi Èi sÄ Ã®ncercaÈi din nou.`,"payment_entry_page.express_checkout_divider":`SAU PLÄTEÈTE CU CARDUL`,"error_page.trouble_accessing":`DacÄ Ã®ntâmpini probleme în accesarea achiziÈiei tale, contacteazÄ serviciul de asistenÈÄ la `,"error_page.close_button_title":`Mergi la {{appName}}`,"error_page.error_title_stripe_missing_required_permission":`Permisiune Stripe lipsÄ`,"error_page.button_close":`Ãnchide`,"error_page.error_message_stripe_invalid_tax_origin_address":`AchiziÈia a eÈuat deoarece adresa de origine fiscalÄ este nevalidÄ. Ãn producÈie, achiziÈiile vor funcÈiona fÄrÄ taxe aplicate.`,"error_page.error_message_stripe_tax_not_active":`AchiziÈia a eÈuat deoarece Stripe Tax nu este activat. Ãn producÈie, achiziÈiile vor funcÈiona fÄrÄ taxe aplicate.`,"error_page.error_only_in_sandbox":`Acest mesaj apare doar în sandbox.`,"error_page.error_message_stripe_missing_required_permission":`AchiziÈia a eÈuat deoarece aplicaÈiei Stripe Ã
40®i lipseÈte o permisiune necesarÄ. Ãn producÈie, achiziÈiile vor funcÈiona fÄrÄ taxe aplicate.`,"error_page.error_title_stripe_tax_not_active":`Stripe Tax nu este activ`,"error_page.error_title_stripe_invalid_tax_origin_address":`AdresÄ de origine fiscalÄ Stripe nevalidÄ`,"apple_pay.free_trial":`PerioadÄ de probÄ gratuitÄ`,"product_info.price_after_intro_price":`DupÄ {{introPriceDuration}}, pe {{renewalDate}}`,"product_info.after_trial":`dupÄ perioada de probÄ`,"product_info.after":`dupÄ`,"product_info.intro_price_phase_after_trial":`Apoi {{introPriceDuration}} pentru {{introPrice}}`,"product_info.intro_price_phase":`Mai întâi {{introPriceDuration}} pentru {{introPrice}}`,"product_info.intro_price_phase_paid_once":`plÄtit o singurÄ datÄ`,"payment_entry_page.trial_subscription_terms_info":`DupÄ ce perioada de probÄ se terminÄ, veÈi fi taxat cu {{price}} {{perFrequency}} începând cu {{renewalDate}}. PuteÈi anula oricând înainte de aceastÄ datÄ.`,"payment_entry_page.subscription_info":`Abonamentul se reînnoieÈte automat. AnulaÈi oricând.`,"payment_entry_page.otp_terms_info":`Prin achiziÈionarea, sunteÈi de acord sÄ permiteÈi {{appName}} sÄ vÄ taxeze conform termenilor sÄi.`,"payment_entry_page.terms_link_label":`Termeni`,"payment_entry_page.subscription_terms_info":`Prin abonare, sunteÈi de acord sÄ permiteÈi {{appName}} sÄ vÄ taxeze conform termenilor sÄi pânÄ la anulare.`,"loading_page.keep_page_open":`Procesul este aproape finalizat. PÄstraÈi aceastÄ paginÄ deschisÄ.`,"loading_page.processing_payment":`Se proceseazÄ plata`,"pricing_table.discount":`Reducere`,"pricing_table.subtotal":`Subtotal`,"pricing_dropdown.add_promo_code":`AdaugÄ cod promoÈional`,"discount_input.label":`Cod promoÈional`,"payment_entry_page.checkout_consent_terms_of_service":`condiÈiile de utilizare`,"payment_entry_page.checkout_consent_agreement":`Sunt de acord cu {{termsOfService}} ale {{appName}}.`},ofe={"periods.week":`{{amount}} неделÑ`,"periods.month":`{{amount}} меÑÑÑ`,"periods.year":`{{amount}} год`,"periods.day":`{{amount}} денÑ`,"periods.weekShort":`{{amount}}нед`,"periods.monthShort":`{{amount}}меÑ`,"periods.yearShort":`{{amount}}г`,"periods.dayShort":`{{amount}}д`,"periods.lifetime":`пожизненно`,"periods.weekPlural":`{{amount}} неделÑ`,"periods.monthPlural":`{{amount}} меÑÑÑев`,"periods.yearPlural":`{{amount}} леÑ`,"periods.dayPlural":`{{amount}} дней`,"periods.weekFrequency":`еженеделÑно`,"periods.monthFrequency":`ежемеÑÑÑно`,"periods.yearFrequency":`ежегодно`,"periods.dayFrequency":`ежедневно`,"periods.perWeekFrequency":`в неделÑ`,"periods.perMonthFrequency":`в меÑÑÑ`,"periods.perYearFrequency":`в год`,"periods.perDayFrequency":`в денÑ`,"periods.unknownFrequency":`неизвеÑÑно`,"periods.weekFrequencyPlural":`каждÑе {{amount}} неделÑ`,"periods.monthFrequencyPlural":`каждÑе {{amount}} меÑÑÑев`,"periods.yearFrequencyPlural":`каждÑе {{amount}} леÑ`,"periods.dayFrequencyPlural":`каждÑе {{amount}} дней`,"product_info.product_title":`{{productTitle}}`,"product_info.product_description":`{{productDescription}}`,"product_info.product_price":`{{productPrice}}`,"product_info.free_trial_duration":`{{trialDuration}} беÑплаÑÐ½Ð°Ñ Ð¿ÑÐ¾Ð±Ð½Ð°Ñ Ð²ÐµÑÑиÑ`,"product_info.price_after_free_trial":`ÐоÑле оконÑÐ°Ð½Ð¸Ñ Ð¿Ñобного пеÑиода, {{renewalDate}}`,"product_info.renewal_frequency":`ÐÑодлеваеÑÑÑ {{frequency}}`,"product_info.continues_until_cancelled":`ÐÑодолжаеÑÑÑ Ð´Ð¾ оÑменÑ`,"product_info.cancel_anytime":`ÐÑмениÑÑ Ð² лÑбое вÑемÑ`,"payment_entry_page.payment_step_title":`ÐезопаÑÐ½Ð°Ñ Ð¾Ð¿Ð»Ð°Ñа ÑеÑез RevenueCat`,"payment_entry_page.button_pay":`ÐплаÑиÑÑ ÑейÑаÑ`,"payment_entry_page.button_start_trial":`ÐаÑаÑÑ Ð¿ÑобнÑй пеÑиод`,"success_page.purchase_successful":`ÐплаÑа завеÑÑена`,"success_page.button_close"
40:`ÐÑодолжиÑÑ`,"error_page.if_error_persists":`ÐÑли оÑибка ÑоÑ
ÑанÑеÑÑÑ, пожалÑйÑÑа, ÑвÑжиÑеÑÑ Ñ `,"error_page.error_title_already_subscribed":`ÐÑ Ñже подпиÑÐ°Ð½Ñ Ð½Ð° {{productTitle}}`,"error_page.error_title_already_purchased":`ÐÑ Ñже пÑиобÑели {{productTitle}}`,"error_page.error_title_other_errors":`ЧÑо-Ñо поÑло не Ñак`,"error_page.error_message_already_subscribed":`ÐÑ Ð½Ðµ можеÑе подпиÑаÑÑÑÑ Ð½Ð° ÑÑÐ¾Ñ Ð¿ÑодÑÐºÑ Ð¿Ð¾Ð²ÑоÑно.`,"error_page.error_message_already_purchased":`ÐÑ Ð½Ðµ можеÑе пÑиобÑеÑÑи ÑÑÐ¾Ñ Ð¿ÑодÑÐºÑ Ð¿Ð¾Ð²ÑоÑно.`,"error_page.error_message_missing_email_error":`ÐÐ»Ñ Ð·Ð°Ð²ÐµÑÑÐµÐ½Ð¸Ñ Ð¿Ð¾ÐºÑпки необÑ
одим адÑÐµÑ ÑлекÑÑонной поÑÑÑ.`,"error_page.error_message_network_error":`ÐÑибка ÑеÑи. ÐÑовеÑÑÑе ваÑе инÑеÑнеÑ-Ñоединение.`,"error_page.error_message_error_charging_payment":`ÐплаÑа не пÑоÑла.`,"error_page.error_message_error_setting_up_purchase":`ÐокÑпка не бÑла наÑаÑа из-за оÑибки (код оÑибки: {{errorCode}}).`,"error_page.error_message_invalid_tax_location":`ÐÑ Ð½Ðµ Ñмогли пÑовеÑиÑÑ Ð²Ð°Ñ Ð¿Ð»Ð°ÑежнÑй адÑеÑ. ÐожалÑйÑÑа, пÑовеÑÑÑе, ÑÑо поÑÑовÑй Ð¸Ð½Ð´ÐµÐºÑ Ð¸ ÑÑÑана ÑÐºÐ°Ð·Ð°Ð½Ñ Ð¿ÑавилÑно.`,"error_page.error_message_unknown_error":`ÐÑоизоÑла неизвеÑÑÐ½Ð°Ñ Ð¾Ñибка (код оÑибки: {{errorCode}}).`,"error_page.button_try_again":`ÐовÑоÑиÑÑ Ð¿Ð¾Ð¿ÑÑкÑ`,"paywall_variables.price_per_period":`{{formattedPrice}}/{{period}}`,"paywall_variables.sub_relative_discount":`{{discount}}%`,"paywall_variables.total_price_and_per_month":`{{formattedPrice}}/{{period}}({{formattedPricePerMonth}}/{{monthPeriod}})`,"product_info.total_due_today":`ÐÑего к оплаÑе ÑегоднÑ`,"product_info.subscribe_to":`ÐодпиÑаÑÑÑÑ`,"navbar_header.details":`ÐеÑали`,"navbar_header.back_button":`Ðазад`,"pricing_dropdown.show_details":`ÐоказаÑÑ Ð´ÐµÑали`,"pricing_dropdown.hide_details":`СкÑÑÑÑ Ð´ÐµÑали`,"pricing_table.tax":`Ðалог`,"pricing_table.trial_ends":`ÐоÑле оконÑÐ°Ð½Ð¸Ñ Ð¿Ñобного пеÑиода, {{formattedTrialEndDate}}`,"pricing_table.total_due_today":`ÐÑого к оплаÑе ÑегоднÑ`,"pricing_table.total_excluding_tax":`ÐÑого без ÑÑеÑа налога`,"pricing_table.enter_billing_address_to_calculate":`ÐведиÑе плаÑежнÑй адÑÐµÑ Ð´Ð»Ñ ÑаÑÑеÑа`,"pricing_table.enter_state_or_postal_code_to_calculate":`ÐведиÑе ÑÑÐ°Ñ Ð¸Ð»Ð¸ поÑÑовÑй Ð¸Ð½Ð´ÐµÐºÑ Ð´Ð»Ñ ÑаÑÑеÑа`,"pricing_table.enter_postal_code_to_calculate":`ÐведиÑе поÑÑовÑй Ð¸Ð½Ð´ÐµÐºÑ Ð´Ð»Ñ ÑаÑÑеÑа`,"error_page.error_message_invalid_email_error":`Ðе ÑдалоÑÑ Ð¿ÑовеÑиÑÑ Ð°Ð´ÑÐµÑ ÑлекÑÑонной поÑÑÑ {{email}}. ÐожалÑйÑÑа, ÑкажиÑе дейÑÑвиÑелÑнÑй адÑÐµÑ ÑлекÑÑонной поÑÑÑ.`,"payment_entry_page.button_payment_method":`ÐплаÑиÑÑ {{formattedPrice}} ÑеÑез {{paymentMethod}}`,"payment_entry_page.button_with_price":`ÐплаÑиÑÑ {{formattedPrice}}`,"price_update.title":`Ðбновление ÑенÑ`,"price_update.base_message":`ÐбÑÐ°Ñ Ñена бÑла обновлена Ñ ÑÑеÑом налога на оÑнове ваÑего плаÑежного адÑеÑа. ÐожалÑйÑÑа, пÑовеÑÑÑе и повÑоÑиÑе попÑÑкÑ. С ваÑей каÑÑÑ Ð±ÑÐ´ÐµÑ ÑпиÑано ÑолÑко один Ñаз.`,"price_update.trial_message":`Цена подпиÑки бÑла обновлена Ñ ÑÑеÑом налогов на оÑнове ваÑего плаÑежного адÑеÑа. ÐÑобнÑй пеÑиод оÑÑаеÑÑÑ Ð±ÐµÑплаÑнÑм. ÐожалÑйÑÑа, пÑовеÑÑÑе и попÑобÑйÑе Ñнова.`,"payment_entry_page.express_checkout_divider":`ÐÐÐ ÐÐÐÐТÐТРÐÐРТÐÐ`,"error_page.trouble_accessing":`ÐÑли Ñ Ð²Ð°Ñ Ð²Ð¾Ð·Ð½Ð¸ÐºÐ»Ð¸ пÑÐ¾Ð±Ð»ÐµÐ¼Ñ Ñ Ð´Ð¾ÑÑÑпом к ваÑей покÑпке, обÑаÑиÑеÑÑ Ð² ÑлÑÐ¶Ð±Ñ Ð¿Ð¾Ð´Ð´ÐµÑжки по адÑеÑÑ `,"error_page.close_button_title":`ÐеÑейÑи в {{appName}}
40`,"error_page.error_title_stripe_missing_required_permission":`ÐÑÑÑÑÑÑвÑÐµÑ ÑазÑеÑение Stripe`,"error_page.button_close":`ÐакÑÑÑÑ`,"error_page.error_message_stripe_invalid_tax_origin_address":`ÐокÑпка не ÑдалаÑÑ, Ñак как адÑÐµÑ Ð¾ÑпÑÐ°Ð²Ð»ÐµÐ½Ð¸Ñ Ð½Ð°Ð»Ð¾Ð³Ð° недейÑÑвиÑелен. Ð ÑабоÑей ÑÑеде покÑпки бÑдÑÑ ÑабоÑаÑÑ Ð±ÐµÐ· пÑÐ¸Ð¼ÐµÐ½ÐµÐ½Ð¸Ñ Ð½Ð°Ð»Ð¾Ð³Ð¾Ð².`,"error_page.error_message_stripe_tax_not_active":`ÐокÑпка не ÑдалаÑÑ, Ñак как Stripe Tax не вклÑÑен. Ð ÑабоÑей ÑÑеде покÑпки бÑдÑÑ ÑабоÑаÑÑ Ð±ÐµÐ· пÑÐ¸Ð¼ÐµÐ½ÐµÐ½Ð¸Ñ Ð½Ð°Ð»Ð¾Ð³Ð¾Ð².`,"error_page.error_only_in_sandbox":`ÐÑо ÑообÑение поÑвлÑеÑÑÑ ÑолÑко в пеÑоÑниÑе.`,"error_page.error_message_stripe_missing_required_permission":`ÐокÑпка не ÑдалаÑÑ, Ñак как Ñ Ð¿ÑÐ¸Ð»Ð¾Ð¶ÐµÐ½Ð¸Ñ Stripe оÑÑÑÑÑÑвÑÐµÑ Ð½ÐµÐ¾Ð±Ñ
одимое ÑазÑеÑение. Ð ÑабоÑей ÑÑеде покÑпки бÑдÑÑ ÑабоÑаÑÑ Ð±ÐµÐ· пÑÐ¸Ð¼ÐµÐ½ÐµÐ½Ð¸Ñ Ð½Ð°Ð»Ð¾Ð³Ð¾Ð².`,"error_page.error_title_stripe_tax_not_active":`Stripe Tax не акÑивен`,"error_page.error_title_stripe_invalid_tax_origin_address":`ÐедейÑÑвиÑелÑнÑй адÑÐµÑ Ð¾ÑпÑÐ°Ð²Ð»ÐµÐ½Ð¸Ñ Ð½Ð°Ð»Ð¾Ð³Ð°`,"apple_pay.free_trial":`ÐеÑплаÑÐ½Ð°Ñ Ð¿ÑÐ¾Ð±Ð½Ð°Ñ Ð²ÐµÑÑиÑ`,"product_info.price_after_intro_price":`ÐоÑле {{introPriceDuration}}, {{renewalDate}}`,"product_info.after_trial":`поÑле пÑобного пеÑиода`,"product_info.after":`поÑле`,"product_info.intro_price_phase_after_trial":`ÐаÑем {{introPriceDuration}} за {{introPrice}}`,"product_info.intro_price_phase":`СнаÑала {{introPriceDuration}} за {{introPrice}}`,"product_info.intro_price_phase_paid_once":`единоÑазовÑй плаÑеж`,"payment_entry_page.trial_subscription_terms_info":`Ðо оконÑании пÑобного пеÑиода Ñ Ð²Ð°Ñ Ð±ÑÐ´ÐµÑ Ð²Ð·Ð¸Ð¼Ð°ÑÑÑÑ Ð¿Ð»Ð°Ñа в ÑазмеÑе {{price}} {{perFrequency}}, наÑÐ¸Ð½Ð°Ñ Ñ {{renewalDate}}. ÐÑ Ð¼Ð¾Ð¶ÐµÑе оÑмениÑÑ Ð¿Ð¾Ð´Ð¿Ð¸ÑÐºÑ Ð² лÑбое вÑÐµÐ¼Ñ Ð´Ð¾ ÑÑой даÑÑ.`,"payment_entry_page.subscription_info":`ÐодпиÑка пÑодлеваеÑÑÑ Ð°Ð²ÑомаÑиÑеÑки. ÐÑмениÑÑ Ð¼Ð¾Ð¶Ð½Ð¾ в лÑбое вÑемÑ.`,"payment_entry_page.otp_terms_info":`СовеÑÑÐ°Ñ Ð¿Ð¾ÐºÑпкÑ, Ð²Ñ ÑоглаÑаеÑеÑÑ Ñ Ñем, ÑÑо {{appName}} бÑÐ´ÐµÑ Ð²Ð·Ð¸Ð¼Ð°ÑÑ Ñ Ð²Ð°Ñ Ð¿Ð»Ð°ÑÑ Ð² ÑооÑвеÑÑÑвии Ñо Ñвоими ÑÑловиÑми.`,"payment_entry_page.terms_link_label":`УÑловиÑ`,"payment_entry_page.subscription_terms_info":`ÐодпиÑÑваÑÑÑ, Ð²Ñ ÑоглаÑаеÑеÑÑ Ñ Ñем, ÑÑо {{appName}} бÑÐ´ÐµÑ Ð²Ð·Ð¸Ð¼Ð°ÑÑ Ñ Ð²Ð°Ñ Ð¿Ð»Ð°ÑÑ Ð² ÑооÑвеÑÑÑвии Ñ Ð¸Ñ
ÑÑловиÑми до ÑеÑ
поÑ, пока Ð²Ñ Ð½Ðµ оÑмениÑе подпиÑкÑ.`,"loading_page.keep_page_open":`ÐÑоÑеÑÑ Ð¿Ð¾ÑÑи завеÑÑен. Ðе закÑÑвайÑе ÑÑÑ ÑÑÑаниÑÑ.`,"loading_page.processing_payment":`ÐбÑабоÑка плаÑежа`,"pricing_table.discount":`Скидка`,"pricing_table.subtotal":`ÐÑого`,"pricing_dropdown.add_promo_code":`ÐобавиÑÑ Ð¿Ñомокод`,"discount_input.label":`ÐÑомокод`,"payment_entry_page.checkout_consent_terms_of_service":`ÑÑловиÑми обÑлÑживаниÑ`,"payment_entry_page.checkout_consent_agreement":`Я ÑоглаÑен Ñ {{appName}} {{termsOfService}}.`},sfe={"periods.week":`{{amount}} týždeÅ`,"periods.month":`{{amount}} mesiac`,"periods.year":`{{amount}} rok`,"periods.day":`{{amount}} deÅ`,"periods.weekShort":`{{amount}}týž`,"periods.monthShort":`{{amount}}mes`,"periods.yearShort":`{{amount}}rok`,"periods.dayShort":`{{amount}}d`,"periods.lifetime":`doživotne`,"periods.weekPlural":`{{amount}} týždÅov`,"periods.monthPlural":`{{amount}} mesiacov`,"periods.yearPlural":`{{amount}} rokov`,"periods.dayPlural":`{{amount}} dnÃ`,"periods.weekFrequency":`týždenne`,"periods.monthFrequency":`mesaÄne`,"periods.yearFrequency":`roÄne`,"periods.dayFrequency":`denne`,"periods.perWeekFrequency":`týždenne`,"periods.perMonthFrequency":`mesaÄne`,"periods.perYearFrequency":`roÄne`,"periods.perDayFrequency":`denne`,"periods.unknownFrequency":`neznÃ
40¡me`,"periods.weekFrequencyPlural":`každých {{amount}} týždÅov`,"periods.monthFrequencyPlural":`každých {{amount}} mesiacov`,"periods.yearFrequencyPlural":`každých {{amount}} rokov`,"periods.dayFrequencyPlural":`každých {{amount}} dnÃ`,"product_info.product_title":`{{productTitle}}`,"product_info.product_description":`{{productDescription}}`,"product_info.product_price":`{{productPrice}}`,"product_info.free_trial_duration":`{{trialDuration}} bezplatné skúšobné obdobie`,"product_info.price_after_free_trial":`Po skonÄenà skúšobného obdobia, dÅa {{renewalDate}}`,"product_info.renewal_frequency":`Obnovuje sa {{frequency}}`,"product_info.continues_until_cancelled":`PokraÄuje, kým sa nezruÅ¡Ã`,"product_info.cancel_anytime":`Kedykoľvek zruÅ¡iÅ¥`,"payment_entry_page.payment_step_title":`BezpeÄný nákup prostrednÃctvom RevenueCat`,"payment_entry_page.button_pay":`ZaplatiÅ¥ teraz`,"payment_entry_page.button_start_trial":`SpustiÅ¥ skúšobné obdobie`,"success_page.purchase_successful":`Platba dokonÄená`,"success_page.button_close":`PokraÄovaÅ¥`,"error_page.if_error_persists":`Ak chyba pretrváva, kontaktujte `,"error_page.error_title_already_subscribed":`Už ste si predplatili {{productTitle}}`,"error_page.error_title_already_purchased":`Už ste si zakúpili {{productTitle}}`,"error_page.error_title_other_errors":`NieÄo sa pokazilo`,"error_page.error_message_already_subscribed":`Na tento produkt sa nemôžete znova prihlásiÅ¥ na odber.`,"error_page.error_message_already_purchased":`Tento produkt si nemôžete znova zakúpiÅ¥.`,"error_page.error_message_missing_email_error":`Na dokonÄenie nákupu je potrebný e-mail.`,"error_page.error_message_network_error":`Chyba siete. Skontrolujte svoje internetové pripojenie.`,"error_page.error_message_error_charging_payment":`Platba zlyhala.`,"error_page.error_message_error_setting_up_purchase":`Nákup sa nespustil kvôli chybe (kód chyby: {{errorCode}}).`,"error_page.error_message_invalid_tax_location":`Nepodarilo sa nám overiÅ¥ vaÅ¡u fakturaÄnú adresu. Skontrolujte, prosÃm, Äi je PSÄ a krajina správne.`,"error_page.error_message_unknown_error":`Vyskytla sa neznáma chyba (kód chyby: {{errorCode}}).`,"error_page.button_try_again":`SkúsiÅ¥ znova`,"paywall_variables.price_per_period":`{{formattedPrice}}/{{period}}`,"paywall_variables.sub_relative_discount":`{{discount}}%`,"paywall_variables.total_price_and_per_month":`{{formattedPrice}}/{{period}}({{formattedPricePerMonth}}/{{monthPeriod}})`,"product_info.total_due_today":`Celková suma splatná dnes`,"product_info.subscribe_to":`PrihlásiÅ¥ sa na odber`,"navbar_header.details":`Podrobnosti`,"navbar_header.back_button":`Späť`,"pricing_dropdown.show_details":`ZobraziÅ¥ podrobnosti`,"pricing_dropdown.hide_details":`SkryÅ¥ podrobnosti`,"pricing_table.tax":`DaÅ`,"pricing_table.trial_ends":`Po skonÄenà skúšobnej verzie, dÅa {{formattedTrialEndDate}}`,"pricing_table.total_due_today":`Celková suma splatná dnes`,"pricing_table.total_excluding_tax":`Celkom bez dane`,"pricing_table.enter_billing_address_to_calculate":`Zadajte fakturaÄnú adresu pre výpoÄet`,"pricing_table.enter_state_or_postal_code_to_calculate":`Zadajte Å¡tát alebo PSÄ pre výpoÄet`,"pricing_table.enter_postal_code_to_calculate":`Zadajte PSÄ pre výpoÄet`,"error_page.error_message_invalid_email_error":`E-mailová adresa {{email}} sa nedala overiÅ¥. Zadajte platnú e-mailovú adresu.`,"payment_entry_page.button_payment_method":`ZaplatiÅ¥ sumu {{formattedPrice}} pomocou {{paymentMethod}}`,"payment_entry_page.button_with_price":`ZaplatiÅ¥ {{formattedPrice}}`,"price_update.title":`Aktualizácia ceny`,"price_update.base_message":`Celková cena bola aktualizovaná o daÅ na základe vaÅ¡ej fakturaÄnej adresy. Skontrolujte to a skúste znova. VaÅ¡a karta bude zaÅ¥ažená iba raz.`,"price_update.trial_message":`Cena predplatného bola aktualizovaná o daÅe na základe vaÅ¡ej fakturaÄnej adresy. Bezplatná skúšobná doba stále platÃ. ProsÃm, skontrolujte a skúste znova.`,"payment_entry_page.express_checkout_divider":`ALEBO ZAPLATIŤ KARTOU`,"error_page.trouble_accessing":`Ak máte problémy s prÃstupom k svojmu nákupu, kontaktujte podporu na `,"error_page.close_button_title":`PrejsÅ¥ na {{appName}}
40`,"error_page.error_title_stripe_missing_required_permission":`Chýbajúce povolenie Stripe`,"error_page.button_close":`ZavrieÅ¥`,"error_page.error_message_stripe_invalid_tax_origin_address":`Nákup sa nepodaril, pretože adresa pôvodu dane je neplatná. V produkÄnom prostredà budú nákupy fungovaÅ¥ bez uplatnenia danÃ.`,"error_page.error_message_stripe_tax_not_active":`Nákup sa nepodaril, pretože Stripe Tax nie je povolený. V produkÄnom prostredà budú nákupy fungovaÅ¥ bez uplatnenia danÃ.`,"error_page.error_only_in_sandbox":`Táto správa sa zobrazuje iba v testovacom prostredà (sandbox).`,"error_page.error_message_stripe_missing_required_permission":`Nákup sa nepodaril, pretože aplikácii Stripe chýba požadované povolenie. V produkÄnom prostredà budú nákupy fungovaÅ¥ bez uplatnenia danÃ.`,"error_page.error_title_stripe_tax_not_active":`Stripe Tax nie je aktÃvny`,"error_page.error_title_stripe_invalid_tax_origin_address":`Neplatná adresa pôvodu dane`,"apple_pay.free_trial":`Skúšobná verzia zdarma`,"product_info.price_after_intro_price":`Po {{introPriceDuration}}, dÅa {{renewalDate}}`,"product_info.after_trial":`po skúšobnej dobe`,"product_info.after":`po`,"product_info.intro_price_phase_after_trial":`Potom {{introPriceDuration}} za {{introPrice}}`,"product_info.intro_price_phase":`Najprv {{introPriceDuration}} za {{introPrice}}`,"product_info.intro_price_phase_paid_once":`zaplatené jednorazovo`,"payment_entry_page.trial_subscription_terms_info":`Po skonÄenà skúšobného obdobia vám bude úÄtovaná suma {{price}} {{perFrequency}} poÄnúc dÅom {{renewalDate}}. Pred týmto dátumom môžete kedykoľvek zruÅ¡iÅ¥.`,"payment_entry_page.subscription_info":`Predplatné sa automaticky obnovuje. ZruÅ¡iÅ¥ môžete kedykoľvek.`,"payment_entry_page.otp_terms_info":`ZakúpenÃm súhlasÃte s tým, že spoloÄnosti {{appName}} umožnÃte úÄtovaÅ¥ vám poplatky v súlade s jej podmienkami.`,"payment_entry_page.terms_link_label":`Podmienky`,"payment_entry_page.subscription_terms_info":`PrihlásenÃm na odber súhlasÃte s tým, že spoloÄnosÅ¥ {{appName}} vám bude úÄtovaÅ¥ poplatky podľa svojich podmienok, až kým odber nezruÅ¡Ãte.`,"loading_page.keep_page_open":`Proces sa takmer dokonÄil. Nechajte túto stránku otvorenú.`,"loading_page.processing_payment":`Spracováva sa platba`,"pricing_table.discount":`Zľava`,"pricing_table.subtotal":`MedzisúÄet`,"pricing_dropdown.add_promo_code":`PridaÅ¥ promo kód`,"discount_input.label":`PropagaÄný kód`,"payment_entry_page.checkout_consent_terms_of_service":`podmienkami použÃvania`,"payment_entry_page.checkout_consent_agreement":`SúhlasÃm s {{appName}} {{termsOfService}}.`},cfe={"periods.week":`{{amount}} teden`,"periods.month":`{{amount}} mesec`,"periods.year":`{{amount}} leto`,"periods.day":`{{amount}} dan`,"periods.weekShort":`{{amount}}ted`,"periods.monthShort":`{{amount}}mes`,"periods.yearShort":`{{amount}}l`,"periods.dayShort":`{{amount}}d`,"periods.lifetime":`doživljenjsko`,"periods.weekPlural":`{{amount}} tednov`,"periods.monthPlural":`{{amount}} mesecev`,"periods.yearPlural":`{{amount}} let`,"periods.dayPlural":`{{amount}} dni`,"periods.weekFrequency":`tedensko`,"periods.monthFrequency":`meseÄno`,"periods.yearFrequency":`letno`,"periods.dayFrequency":`dnevno`,"periods.perWeekFrequency":`na teden`,"periods.perMonthFrequency":`na mesec`,"periods.perYearFrequency":`na leto`,"periods.perDayFrequency":`na dan`,"periods.unknownFrequency":`neznano`,"periods.weekFrequencyPlural":`vsakih {{amount}} tednov`,"periods.monthFrequencyPlural":`vsakih {{amount}} mesecev`,"periods.yearFrequencyPlural":`vsakih {{amount}} let`,"periods.dayFrequencyPlural":`vsakih {{amount}} dni`,"product_info.subscribe_to":`NaroÄite se na`,"product_info.product_title":`{{productTitle}}`,"product_info.product_description":`{{productDescription}}`,"product_info.product_price":`{{productPrice}}`,"product_info.free_trial_duration":`BrezplaÄno preizkusite za {{trialDuration}}`,"product_info.price_after_free_trial":`Po koncu preizkusa, dne {{renewalDate}}`,"product_info.intro_price_phase_after_trial":`Nato {{introPriceDuration}} za {{introPrice}}`,"product_info.intro_price_phase":`Prvih {{introPriceDuration}} za {{introPrice}}`,"product_info.intro_price_phase_paid_once":`plaÄano enkrat`,"product_info.price_after_intro_price":`Po {{introPriceDuration}}, dne {{renewalDate}}`,"product_info.after_trial":`po preizkusu`,"product_info.after":`po`,"product_info.total_due_today":`Skupaj za plaÄilo danes`,"product_info.renewal_frequency":`Se obnovi {{frequency}}`,"product_info.continues_until_cancelled":`Traja do preklica`,"product_info.cancel_anytime":`PrekliÄete lahko kadar koli`,"payment_entry_page.payment_step_title":`Varno plaÄilo prek RevenueCat`,"payment_entry_page.trial_subscription_terms_info":`Po koncu preizkusnega obdobja vam bo zaraÄunano {{price}} {{perFrequency}} z zaÄetkom {{renewalDate}}. PrekliÄete lahko kadar koli pred tem datumom.`,"payment_entry_page.subscription_terms_info":`Z naroÄnino se strinjate, da vam {{appName}} zaraÄunava v skladu s svojimi pogoji, dokler ne prekliÄete.`,"payment_entry_page.otp_terms_info":`Z nakupom se strinjate, da vam {{appName}} zaraÄuna v skladu s svojimi pogoji.`,"payment_entry_page.terms_link_label":`Pogoji`,"payment_entry_page.subscription_info":`NaroÄnina se samodejno obnavlja. PrekliÄete lahko kadar koli.`,"payment_entry_page.button_pay":`PlaÄaj zdaj`,"payment_entry_page.button_start_trial":`ZaÄni preizkus`,"payment_entry_page.button_with_price":`PlaÄaj {{formattedPrice}}`,"payment_entry_page.button_payment_method":`PlaÄaj {{formattedPrice}} z {{paymentMethod}}`,"payment_entry_page.express_checkout_divider":`ALI PLAÄAJTE S KARTICO`,"loading_page.processing_payment":`Obdelava plaÄila`,"loading_page.keep_page_open":`Postopek je skoraj konÄan. Pustite to stran odprto.`,"success_page.purchase_successful":`PlaÄ
40ilo zakljuÄeno`,"success_page.button_close":`Nadaljuj`,"error_page.close_button_title":`Pojdi na {{appName}}`,"error_page.if_error_persists":`Äe težava ne izgine, se obrnite na `,"error_page.trouble_accessing":`Äe imate težave z dostopom do svojega nakupa, se obrnite na podporo na `,"error_page.error_title_already_subscribed":`Na {{productTitle}} ste že naroÄeni`,"error_page.error_title_already_purchased":`{{productTitle}} ste že kupili`,"error_page.error_title_other_errors":`Nekaj je Å¡lo narobe`,"error_page.error_message_already_subscribed":`Na ta izdelek se ne morete ponovno naroÄiti.`,"error_page.error_message_already_purchased":`Tega izdelka ne morete ponovno kupiti.`,"error_page.error_title_stripe_tax_not_active":`Stripe Tax ni aktiven`,"error_page.error_title_stripe_invalid_tax_origin_address":`Neveljaven izvorni naslov za davek`,"error_page.error_title_stripe_missing_required_permission":`Manjka dovoljenje Stripe`,"error_page.error_message_missing_email_error":`Za dokonÄanje nakupa je potrebna e-poÅ¡ta.`,"error_page.error_message_invalid_email_error":`E-poÅ¡tnega naslova {{email}} ni bilo mogoÄe preveriti. Vnesite veljaven e-poÅ¡tni naslov.`,"error_page.error_message_network_error":`Napaka omrežja. Preverite svojo internetno povezavo.`,"error_page.error_message_error_charging_payment":`PlaÄilo ni uspelo.`,"error_page.error_message_error_setting_up_purchase":`Nakup se ni zaÄel zaradi napake (koda napake: {{errorCode}}).`,"error_page.error_message_invalid_tax_location":`VaÅ¡ega naslova za obraÄun nismo mogli preveriti. Preverite, ali sta poÅ¡tna Å¡tevilka in država pravilni.`,"error_page.error_message_unknown_error":`PriÅ¡lo je do neznane napake (koda napake: {{errorCode}}).`,"error_page.error_message_stripe_tax_not_active":`Nakup ni uspel, ker Stripe Tax ni omogoÄen. V produkciji bodo nakupi delovali brez obraÄunanih davkov.`,"error_page.error_message_stripe_invalid_tax_origin_address":`Nakup ni uspel, ker je izvorni naslov za davek neveljaven. V produkciji bodo nakupi delovali brez obraÄunanih davkov.`,"error_page.error_message_stripe_missing_required_permission":`Nakup ni uspel, ker aplikaciji Stripe manjka zahtevano dovoljenje. V produkciji bodo nakupi delovali brez obraÄunanih davkov.`,"error_page.error_only_in_sandbox":`To sporoÄilo se prikaže samo v peskovniku (sandbox).`,"error_page.button_try_again":`Poskusi znova`,"error_page.button_close":`Zapri`,"paywall_variables.price_per_period":`{{formattedPrice}}/{{period}}`,"paywall_variables.sub_relative_discount":`{{discount}}%`,"paywall_variables.total_price_and_per_month":`{{formattedPrice}}/{{period}}({{formattedPricePerMonth}}/{{monthPeriod}})`,"pricing_dropdown.show_details":`Prikaži podrobnosti`,"pricing_dropdown.hide_details":`Skrij podrobnosti`,"pricing_dropdown.add_promo_code":`Dodaj promocijsko kodo`,"discount_input.label":`Promocijska koda`,"pricing_table.trial_ends":`Po koncu preizkusa, dne {{formattedTrialEndDate}}`,"pricing_table.total_excluding_tax":`Skupaj brez davka`,"pricing_table.total_due_today":`Skupaj za plaÄilo danes`,"pricing_table.subtotal":`Vmesni seÅ¡tevek`,"pricing_table.discount":`Popust`,"pricing_table.tax":`Davek`,"pricing_table.enter_billing_address_to_calculate":`Vnesite naslov za obraÄun za izraÄun`,"pricing_table.enter_postal_code_to_calculate":`Vnesite poÅ¡tno Å¡tevilko za izraÄun`,"pricing_table.enter_state_or_postal_code_to_calculate":`Vnesite regijo ali poÅ¡tno Å¡tevilko za izraÄun`,"navbar_header.details":`Podrobnosti`,"navbar_header.back_button":`Nazaj`,"price_update.title":`Posodobitev cene`,"price_update.base_message":`Skupna cena je bila posodobljena z davkom glede na vaÅ¡ naslov za obraÄun. Preglejte in poskusite znova. VaÅ¡a kartica bo bremenjena samo enkrat.`,"price_update.trial_message":`Cena naroÄnine je bila posodobljena, da vkljuÄuje davek glede na vaÅ¡ naslov za obraÄun. BrezplaÄni preizkus Å¡e vedno velja. Preglejte in poskusite znova.`,"apple_pay.free_trial":`BrezplaÄni preizkus`,"payment_entry_page.checkout_consent_terms_of_service":`pogoji storitve`,"payment_entry_page.checkout_consent_agreement":`Strinjam se s/z {{appName}} {{termsOfService}}.`},lfe={"periods.week":`{{amount}} vecka`,"periods.month":`{{amount}} mÃ¥nad`,"periods.year":`{{amount}} Ã¥r`,"periods.day":`{{amount}}
40 dag`,"periods.weekShort":`{{amount}}v`,"periods.monthShort":`{{amount}}mån`,"periods.yearShort":`{{amount}}år`,"periods.dayShort":`{{amount}}d`,"periods.lifetime":`livstid`,"periods.weekPlural":`{{amount}} veckor`,"periods.monthPlural":`{{amount}} månader`,"periods.yearPlural":`{{amount}} år`,"periods.dayPlural":`{{amount}} dagar`,"periods.weekFrequency":`veckovis`,"periods.monthFrequency":`månadsvis`,"periods.yearFrequency":`årligen`,"periods.dayFrequency":`dagligen`,"periods.perWeekFrequency":`per vecka`,"periods.perMonthFrequency":`per månad`,"periods.perYearFrequency":`per år`,"periods.perDayFrequency":`per dag`,"periods.unknownFrequency":`okänd`,"periods.weekFrequencyPlural":`varje {{amount}} veckor`,"periods.monthFrequencyPlural":`varje {{amount}} månader`,"periods.yearFrequencyPlural":`varje {{amount}} år`,"periods.dayFrequencyPlural":`varje {{amount}} dagar`,"product_info.product_title":`{{productTitle}}`,"product_info.product_description":`{{productDescription}}`,"product_info.product_price":`{{productPrice}}`,"product_info.free_trial_duration":`{{trialDuration}} gratis provperiod`,"product_info.price_after_free_trial":`Efter provperioden slutar, den {{renewalDate}}`,"product_info.renewal_frequency":`Förnyas {{frequency}}`,"product_info.continues_until_cancelled":`Gäller tills avbokad`,"product_info.cancel_anytime":`Avboka när som helst`,"payment_entry_page.payment_step_title":`Säker betalning via RevenueCat`,"payment_entry_page.button_pay":`Betala nu`,"payment_entry_page.button_start_trial":`Starta provperiod`,"success_page.purchase_successful":`Betalningen är klar`,"success_page.button_close":`Fortsätt`,"error_page.if_error_persists":`Om felet kvarstår, vänligen kontakta `,"error_page.error_title_already_subscribed":`Du prenumererar redan på {{productTitle}}`,"error_page.error_title_already_purchased":`Du har redan köpt {{productTitle}}`,"error_page.error_title_other_errors":`Något gick fel`,"error_page.error_message_already_subscribed":`Du kan inte prenumerera på den här produkten igen.`,"error_page.error_message_already_purchased":`Du kan inte köpa den här produkten igen.`,"error_page.error_message_missing_email_error":`E-post krävs för att slutföra köpet.`,"error_page.error_message_network_error":`Nätverksfel. Kontrollera din internetanslutning.`,"error_page.error_message_error_charging_payment":`Betalningen misslyckades.`,"error_page.error_message_error_setting_up_purchase":`Köp kunde inte startas på grund av ett fel (felkod: {{errorCode}}).`,"error_page.error_message_invalid_tax_location":`Vi kunde inte verifiera din fakturer
40ingsadress. Kontrollera att postnummer och land är korrekta.`,"error_page.error_message_unknown_error":`Ett okänt fel inträffade (felkod: {{errorCode}}).`,"error_page.button_try_again":`Försök igen`,"paywall_variables.price_per_period":`{{formattedPrice}}/{{period}}`,"paywall_variables.sub_relative_discount":`{{discount}}%`,"paywall_variables.total_price_and_per_month":`{{formattedPrice}}/{{period}} ({{formattedPricePerMonth}}/{{monthPeriod}})`,"product_info.total_due_today":`Totalt att betala idag`,"product_info.subscribe_to":`Prenumerera på`,"navbar_header.details":`Detaljer`,"navbar_header.back_button":`Tillbaka`,"pricing_dropdown.show_details":`Visa detaljer`,"pricing_dropdown.hide_details":`Dölj detaljer`,"pricing_table.tax":`Moms`,"pricing_table.trial_ends":`Efter provperiodens slut, den {{formattedTrialEndDate}}`,"pricing_table.total_due_today":`Total summa att betala idag`,"pricing_table.total_excluding_tax":`Totalt exklusive moms`,"pricing_table.enter_billing_address_to_calculate":`Ange faktureringsadress för att beräkna`,"pricing_table.enter_state_or_postal_code_to_calculate":`Ange delstat eller postnummer för att beräkna`,"pricing_table.enter_postal_code_to_calculate":`Ange postnummer för att beräkna`,"error_page.error_message_invalid_email_error":`E-postadressen {{email}} kunde inte verifieras. Ange en giltig e-postadress.`,"payment_entry_page.button_payment_method":`Betala {{formattedPrice}} med {{paymentMethod}}`,"payment_entry_page.button_with_price":`Betala {{formattedPrice}}`,"price_update.title":`Prisuppdatering`,"price_update.base_message":`Det totala priset har uppdaterats med moms baserat på din fakturer
40ingsadress. Granska och försök igen. Ditt kort kommer endast att debiteras en gÃ¥ng.`,"price_update.trial_message":`Prenumerationspriset har uppdaterats för att inkludera skatter baserat pÃ¥ din fakturaadress. Den kostnadsfria provperioden gäller fortfarande. Kontrollera och försök igen.`,"payment_entry_page.express_checkout_divider":`ELLER BETALA MED KORT`,"error_page.trouble_accessing":`Om du har problem med att komma Ã¥t ditt köp, kontakta support pÃ¥ `,"error_page.close_button_title":`GÃ¥ till {{appName}}`,"error_page.error_title_stripe_missing_required_permission":`Saknar Stripe-behörighet`,"error_page.button_close":`Stäng`,"error_page.error_message_stripe_invalid_tax_origin_address":`Köpet misslyckades eftersom skatteursprungsadressen är ogiltig. I produktion kommer köp att fungera utan att skatter tillämpas.`,"error_page.error_message_stripe_tax_not_active":`Köpet misslyckades eftersom Stripe Tax inte är aktiverat. I produktion kommer köp att fungera utan att skatter tillämpas.`,"error_page.error_only_in_sandbox":`Det här meddelandet visas bara i sandlÃ¥dan.`,"error_page.error_message_stripe_missing_required_permission":`Köpet misslyckades eftersom Stripe-appen saknar en nödvändig behörighet. I produktion kommer köp att fungera utan att skatter tillämpas.`,"error_page.error_title_stripe_tax_not_active":`Stripe Tax är inte aktivt`,"error_page.error_title_stripe_invalid_tax_origin_address":`Ogiltig skatteursprungsadress`,"apple_pay.free_trial":`Gratis provperiod`,"product_info.price_after_intro_price":`Efter {{introPriceDuration}}, den {{renewalDate}}`,"product_info.after_trial":`efter provperioden`,"product_info.after":`efter`,"product_info.intro_price_phase_after_trial":`Sedan {{introPriceDuration}} för {{introPrice}}`,"product_info.intro_price_phase":`Först {{introPriceDuration}} för {{introPrice}}`,"product_info.intro_price_phase_paid_once":`betalas en gÃ¥ng`,"payment_entry_page.trial_subscription_terms_info":`Efter att din provperiod slutar debiteras du {{price}} {{perFrequency}} frÃ¥n och med {{renewalDate}}. Du kan avbryta när som helst före detta datum.`,"payment_entry_page.subscription_info":`Prenumerationen förnyas automatiskt. Avbryt när som helst.`,"payment_entry_page.otp_terms_info":`Genom att köpa godkänner du att {{appName}} debiterar dig i enlighet med deras villkor.`,"payment_entry_page.terms_link_label":`Villkor`,"payment_entry_page.subscription_terms_info":`Genom att prenumerera godkänner du att {{appName}} debiterar dig i enlighet med deras villkor tills du avbryter.`,"loading_page.keep_page_open":`Processen är nästan klar. HÃ¥ll den här sidan öppen.`,"loading_page.processing_payment":`Behandlar betalning`,"pricing_table.discount":`Rabatt`,"pricing_table.subtotal":`Delsumma`,"pricing_dropdown.add_promo_code":`Lägg till kampanjkod`,"discount_input.label":`Kampanjkod`,"payment_entry_page.checkout_consent_terms_of_service":`användarvillkor`,"payment_entry_page.checkout_consent_agreement":`Jag godkänner {{appName}} {{termsOfService}}.`},ufe={"periods.week":`{{amount}} สัà¸à¸à¸²à¸«à¹`,"periods.month":`{{amount}} à¹à¸à¸·à¸à¸`,"periods.year":`{{amount}} à¸à¸µ`,"periods.day":`{{amount}} วัà¸`,"periods.weekShort":`{{amount}} สัà¸à¸à¸²à¸«à¹`,"periods.monthShort":`{{amount}} à¹à¸à¸·à¸à¸`,"periods.yearShort":`{{amount}} à¸à¸µ`,"periods.dayShort":`{{amount}} วัà¸`,"periods.lifetime":`à¸à¸¥à¸à¸à¸à¸µà¸`,"periods.weekPlural":`{{amount}} สัà¸à¸à¸²à¸«à¹`,"periods.monthPlural":`{{amount}} à¹à¸à¸·à¸à¸`,"periods.yearPlural":`{{amount}} à¸à¸µ`,"periods.dayPlural":`{{amount}} วัà¸`,"periods.weekFrequency":`รายสัà¸à¸à¸²à¸«à¹`,"periods.monthFrequency":`รายà¹à¸à¸·à¸à¸`,"periods.yearFrequency":`รายà¸à¸µ`,"periods.dayFrequency":`รายวัà¸`,"periods.perWeekFrequency":`à¸à¹à¸à¸ªà¸±à¸à¸à¸²à¸«à¹`,"periods.perMonthFrequency":`à¸à¹à¸à¹à¸à¸·à¸à¸`,"periods.perYearFrequency":`à¸à¹à¸à¸à¸µ`,"periods.perDayFrequency":`à¸à¹à¸à¸§à¸±à¸`,"periods.unknownFrequency":`à¹à¸¡à¹à¸£à¸¹à¹à¸à¸±à¸`,"periods.weekFrequencyPlural":`à¸à¸¸à¸à¹ {{amount}} สัà¸à¸à¸²à¸«à¹`,"periods.monthFrequencyPlural":`à¸à¸¸à¸à¹ {{amount}} à¹à¸à¸·à¸à¸`,"periods.yearFrequencyPlural":`à¸à¸¸à¸à¹ {{amount}} à¸à¸µ`,"periods.dayFrequencyPlural":`à¸à¸¸à¸à¹ {{amount}} วัà¸`,"product_info.product_title":`{{productTitle}}`,"product_info.product_description":`{{productDescription}}`,"product_info.product_price":`{{productPrice}}`,"product_info.free_trial_duration":`{{trialDuration}} à¸à¸à¸¥à¸à¸à¹à¸à¹à¸à¸£à¸µ`,"product_info.price_after_free_trial":`หลัà¸à¸à¸²à¸à¸ªà¸´à¹à¸à¸ªà¸¸à¸à¸à¸²à¸£à¸à¸à¸¥à¸à¸à¹à¸à¹ à¹à¸à¸§à¸±à¸à¸à¸µà¹ {{renewalDate}}`,"product_info.renewal_frequency":`à¸à¹à¸à¸à¸²à¸¢à¸¸ {{frequency}}`,"product_info.continues_until_cancelled":`à¸à¹à¸à¹à¸à¸·à¹à¸à¸à¸à¸à¸à¸§à¹à¸²à¸à¸°à¸¢à¸à¹à¸¥à¸´à¸`,"product_info.cancel_anytime":`ยà¸à¹à¸¥à¸´à¸à¹à¸à¹à¸à¸¥à¸à¸à¹à¸§à¸¥à¸²`,"payment_entry_page.payment_step_title":`à¸à¸²à¸£à¸à¸³à¸£à¸°à¹à¸à¸´à¸à¸à¸¢à¹à¸²à¸à¸à¸¥à¸à¸à¸ ัยà¹à¸à¸¢ RevenueCat`,"payment_entry_page.button_pay":`à¸à¸³à¸£à¸°à¹à¸à¸´à¸à¸à¸à¸à¸à¸µà¹`,"payment_entry_page.button_start_trial":`à¹à¸£à¸´à¹à¸¡à¸à¸à¸¥à¸à¸à¹à¸à¹`,"success_page.purchase_successful":`à¸à¸²à¸£à¸à¸³à¸£à¸°à¹à¸à¸´à¸à¹à¸ªà¸£à¹à¸à¸ªà¸¡à¸à¸¹à¸£à¸à¹`,"success_page.button_close"
40:`à¸à¸³à¹à¸à¸´à¸à¸à¸²à¸£à¸à¹à¸`,"error_page.if_error_persists":`หาà¸à¸à¹à¸à¸à¸´à¸à¸à¸¥à¸²à¸à¸¢à¸±à¸à¸à¸à¸à¸¢à¸¹à¹ à¹à¸à¸£à¸à¸à¸´à¸à¸à¹à¸ `,"error_page.error_title_already_subscribed":`à¸à¸¸à¸à¹à¸à¹à¸ªà¸¡à¸±à¸à¸£à¸ªà¸¡à¸²à¸à¸´à¸ {{productTitle}} à¹à¸¥à¹à¸§`,"error_page.error_title_already_purchased":`à¸à¸¸à¸à¹à¸à¹à¸à¸·à¹à¸ {{productTitle}} à¹à¸¥à¹à¸§`,"error_page.error_title_other_errors":`มีà¸à¸²à¸à¸à¸¢à¹à¸²à¸à¸à¸´à¸à¸à¸¥à¸²à¸`,"error_page.error_message_already_subscribed":`à¸à¸¸à¸à¹à¸¡à¹à¸ªà¸²à¸¡à¸²à¸£à¸à¸ªà¸¡à¸±à¸à¸£à¸ªà¸¡à¸²à¸à¸´à¸à¸à¸¥à¸´à¸à¸ ัà¸à¸à¹à¸à¸µà¹à¹à¸à¹à¸à¸µà¸`,"error_page.error_message_already_purchased":`à¸à¸¸à¸à¹à¸¡à¹à¸ªà¸²à¸¡à¸²à¸£à¸à¸à¸·à¹à¸à¸à¸¥à¸´à¸à¸ ัà¸à¸à¹à¸à¸µà¹à¹à¸à¹à¸à¸µà¸`,"error_page.error_message_missing_email_error":`à¸à¹à¸à¸à¹à¸à¹à¸à¸µà¹à¸¡à¸¥à¹à¸à¸·à¹à¸à¸à¸³à¸à¸²à¸£à¸à¸·à¹à¸à¹à¸«à¹à¹à¸ªà¸£à¹à¸à¸ªà¸¡à¸à¸¹à¸£à¸à¹`,"error_page.error_message_network_error":`à¸à¹à¸à¸à¸´à¸à¸à¸¥à¸²à¸à¸à¸à¸à¹à¸à¸£à¸·à¸à¸à¹à¸²à¸¢ à¹à¸à¸£à¸à¸à¸£à¸§à¸à¸ªà¸à¸à¸à¸²à¸£à¹à¸à¸·à¹à¸à¸¡à¸à¹à¸à¸à¸´à¸à¹à¸à¸à¸£à¹à¹à¸à¹à¸à¸à¸à¸à¸à¸¸à¸`,"error_page.error_message_error_charging_payment":`à¸à¸²à¸£à¸à¸³à¸£à¸°à¹à¸à¸´à¸à¸¥à¹à¸¡à¹à¸«à¸¥à¸§`,"error_page.error_message_error_setting_up_purchase":`à¹à¸¡à¹à¸ªà¸²à¸¡à¸²à¸£à¸à¹à¸£à¸´à¹à¸¡à¸à¸²à¸£à¸à¸·à¹à¸à¹à¸à¹à¹à¸à¸·à¹à¸à¸à¸à¸²à¸à¸à¹à¸à¸à¸´à¸à¸à¸¥à¸²à¸ (รหัสà¸à¹à¸à¸à¸´à¸à¸à¸¥à¸²à¸: {{errorCode}})`,"error_page.error_message_invalid_tax_location":`à¹à¸£à¸²à¹à¸¡à¹à¸ªà¸²à¸¡à¸²à¸£à¸à¸¢à¸·à¸à¸¢à¸±à¸à¸à¸µà¹à¸à¸¢à¸¹à¹à¸ªà¸³à¸«à¸£à¸±à¸à¸à¸à¸à¹à¸à¹à¸à¹à¸à¸«à¸à¸µà¹à¸à¸à¸à¸à¸¸à¸à¹à¸à¹ à¸à¸£à¸¸à¸à¸²à¸à¸£à¸§à¸à¸ªà¸à¸à¸£à¸«à¸±à¸ªà¹à¸à¸£à¸©à¸à¸µà¸¢à¹à¹à¸¥à¸°à¸à¸£à¸°à¹à¸à¸¨à¹à¸«à¹à¸à¸¹à¸à¸à¹à¸à¸`,"error_page.error_message_unknown_error":`à¹à¸à¸´à¸à¸à¹à¸à¸à¸´à¸à¸à¸¥à¸²à¸à¸à¸µà¹à¹à¸¡à¹à¸£à¸¹à¹à¸à¸±à¸ (รหัสà¸à¹à¸à¸à¸´à¸à¸à¸¥à¸²à¸: {{errorCode}})`,"error_page.button_try_again":`ลà¸à¸à¸à¸µà¸à¸à¸£à¸±à¹à¸`,"paywall_variables.price_per_period":`{{formattedPrice}}/{{period}}`,"paywall_variables.sub_relative_discount":`{{discount}}%`,"paywall_variables.total_price_and_per_month":`{{formattedPrice}}/{{period}}({{formattedPricePerMonth}}/{{monthPeriod}})`,"product_info.total_due_today":`ยà¸à¸à¸£à¸§à¸¡à¸à¸µà¹à¸à¹à¸à¸à¸à¸³à¸£à¸°à¸§à¸±à¸à¸à¸µà¹`,"product_info.subscribe_to":`สมัà¸à¸£à¸ªà¸¡à¸²à¸à¸´à¸`,"navbar_header.details":`รายละà¹à¸à¸µà¸¢à¸`,"navbar_header.back_button":`ยà¹à¸à¸à¸à¸¥à¸±à¸`,"pricing_dropdown.show_details":`à¹à¸ªà¸à¸à¸£à¸²à¸¢à¸¥à¸°à¹à¸à¸µà¸¢à¸`,"pricing_dropdown.hide_details":`à¸à¹à¸à¸à¸£à¸²à¸¢à¸¥à¸°à¹à¸à¸µà¸¢à¸`,"pricing_table.tax":`ภาษี`,"pricing_table.trial_ends":`หลัà¸à¸à¸²à¸à¸à¹à¸§à¸à¸à¸à¸¥à¸à¸à¹à¸à¹à¸ªà¸´à¹à¸à¸ªà¸¸à¸ à¹à¸à¸§à¸±à¸à¸à¸µà¹ {{formattedTrialEndDate}}`,"pricing_table.total_due_today":`ยà¸à¸à¸£à¸§à¸¡à¸à¸µà¹à¸à¹à¸à¸à¸à¸³à¸£à¸°à¸§à¸±à¸à¸à¸µà¹`,"pricing_table.total_excluding_tax":`ราà¸à¸²à¸£à¸§à¸¡à¸à¹à¸à¸à¸ าษี`,"pricing_table.enter_billing_address_to_calculate":`à¸à¸£à¸¸à¸à¸²à¸à¸£à¸à¸à¸à¸µà¹à¸à¸¢à¸¹à¹à¸ªà¸³à¸«à¸£à¸±à¸à¹à¸£à¸µà¸¢à¸à¹à¸à¹à¸à¹à¸à¸´à¸à¹à¸à¸·à¹à¸à¸à¸³à¸à¸§à¸`,"pricing_table.enter_state_or_postal_code_to_calculate":`à¹à¸ªà¹à¸£à¸±à¸à¸«à¸£à¸·à¸à¸£à¸«à¸±à¸ªà¹à¸à¸£à¸©à¸à¸µà¸¢à¹à¹à¸à¸·à¹à¸à¸à¸³à¸à¸§à¸`,"pricing_table.enter_postal_code_to_calculate":`à¹à¸ªà¹à¸£à¸«à¸±à¸ªà¹à¸à¸£à¸©à¸à¸µà¸¢à¹à¹à¸à¸·à¹à¸à¸à¸³à¸à¸§à¸`,"error_page.error_message_invalid_email_error":`à¹à¸¡à¹à¸ªà¸²à¸¡à¸²à¸£à¸à¸¢à¸·à¸à¸¢à¸±à¸à¸à¸µà¹à¸à¸¢à¸¹à¹à¸à¸µà¹à¸¡à¸¥ {{email}} à¹à¸à¹ à¹à¸à¸£à¸à¸£à¸°à¸à¸¸à¸à¸µà¹à¸à¸¢à¸¹à¹à¸à¸µà¹à¸¡à¸¥à¸à¸µà¹à¸à¸¹à¸à¸à¹à¸à¸`,"payment_entry_page.button_payment_method":`à¸à¸³à¸£à¸°à¹à¸à¸´à¸ {{formattedPrice}} à¸à¹à¸§à¸¢ {{paymentMethod}}`,"payment_entry_page.button_with_price":`à¸à¸³à¸£à¸°à¹à¸à¸´à¸ {{formattedPrice}}`,"price_update.title":`à¸à¸±à¸à¹à¸à¸à¸£à¸²à¸à¸²`,"price_update.base_message":`ราà¸à¸²à¸£à¸§à¸¡à¹à¸à¹à¸£à¸±à¸à¸à¸²à¸£à¸à¸±à¸à¹à¸à¸à¸à¸£à¹à¸à¸¡à¸ าษีà¸à¸²à¸¡à¸à¸µà¹à¸à¸¢à¸¹à¹à¸ªà¸³à¸«à¸£à¸±à¸à¸à¸²à¸£à¹à¸£à¸µà¸¢à¸à¹à¸à¹à¸à¹à¸à¸´à¸à¸à¸à¸à¸à¸¸à¸ à¹à¸à¸£à¸à¸à¸£à¸§à¸à¸ªà¸à¸à¹à¸¥à¸°à¸¥à¸à¸à¸à¸µà¸à¸à¸£à¸±à¹à¸ à¸à¸±à¸à¸£à¸à¸à¸à¸à¸¸à¸à¸à¸°à¸à¸¹à¸à¹à¸£à¸µà¸¢à¸à¹à¸à¹à¸à¹à¸à¸´à¸à¹à¸à¸µà¸¢à¸à¸à¸£à¸±à¹à¸à¹à¸à¸µà¸¢à¸§à¹à¸à¹à¸²à¸à¸±à¹à¸`,"price_update.trial_message":`ราà¸à¸²à¸à¸²à¸£à¸ªà¸¡à¸±à¸à¸£à¸ªà¸¡à¸²à¸à¸´à¸à¹à¸à¹à¸£à¸±à¸à¸à¸²à¸£à¸à¸±à¸à¹à¸à¸à¹à¸à¸·à¹à¸à¸£à¸§à¸¡à¸ าษีà¸à¸²à¸¡à¸à¸µà¹à¸à¸¢à¸¹à¹à¸ªà¸³à¸«à¸£à¸±à¸à¸à¸²à¸£à¹à¸£à¸µà¸¢à¸à¹à¸à¹à¸à¹à¸à¸´à¸à¸à¸à¸à¸à¸¸à¸ ระยะà¹à¸§à¸¥à¸²à¸à¸à¸¥à¸à¸à¹à¸à¹à¸à¸£à¸µà¸¢à¸±à¸à¸à¸à¸¡à¸µà¸à¸¥ à¹à¸à¸£à¸à¸à¸£à¸§à¸à¸ªà¸à¸à¹à¸¥à¸°à¸¥à¸à¸à¸à¸µà¸à¸à¸£à¸±à¹à¸`,"payment_entry_page.express_checkout_divider":`หรืà¸à¸à¸³à¸£à¸°à¸à¹à¸§à¸¢à¸à¸±à¸à¸£`,"error_page.trouble_accessing":`หาà¸à¸à¸¸à¸à¸¡à¸µà¸à¸±à¸à¸«à¸²à¹à¸à¸à¸²à¸£à¹à¸à¹à¸²à¸à¸¶à¸à¸à¸²à¸£à¸à¸·à¹à¸ à¹à¸à¸£à¸à¸à¸´à¸à¸à¹à¸à¸à¹à¸²à¸¢à¸ªà¸à¸±à¸à¸ªà¸à¸¸à¸à¸à¸µà¹ `,"error_page.close_button_title":`à¹à¸à¸à¸µà¹ {{appName}}
40`,"error_page.error_title_stripe_missing_required_permission":`à¸à¸²à¸à¸ªà¸´à¸à¸à¸´à¹ Stripe à¸à¸µà¹à¸à¸³à¹à¸à¹à¸`,"error_page.button_close":`à¸à¸´à¸`,"error_page.error_message_stripe_invalid_tax_origin_address":`à¸à¸²à¸£à¸à¸·à¹à¸à¸¥à¹à¸¡à¹à¸«à¸¥à¸§à¹à¸à¸·à¹à¸à¸à¸à¸²à¸à¸à¸µà¹à¸à¸¢à¸¹à¹à¸à¹à¸à¸à¸²à¸à¸ าษีà¹à¸¡à¹à¸à¸¹à¸à¸à¹à¸à¸ à¹à¸à¸ªà¸ าà¸à¹à¸§à¸à¸¥à¹à¸à¸¡à¸à¸£à¸´à¸ à¸à¸²à¸£à¸à¸·à¹à¸à¸à¸°à¸à¸³à¸à¸²à¸à¹à¸à¹à¹à¸à¸¢à¹à¸¡à¹à¸¡à¸µà¸à¸²à¸£à¹à¸£à¸µà¸¢à¸à¹à¸à¹à¸à¸ าษี`,"error_page.error_message_stripe_tax_not_active":`à¸à¸²à¸£à¸à¸·à¹à¸à¸¥à¹à¸¡à¹à¸«à¸¥à¸§à¹à¸à¸·à¹à¸à¸à¸à¸²à¸à¹à¸¡à¹à¹à¸à¹à¹à¸à¸´à¸à¹à¸à¹à¸à¸²à¸ Stripe Tax à¹à¸à¸ªà¸ าà¸à¹à¸§à¸à¸¥à¹à¸à¸¡à¸à¸£à¸´à¸ à¸à¸²à¸£à¸à¸·à¹à¸à¸à¸°à¸à¸³à¸à¸²à¸à¹à¸à¹à¹à¸à¸¢à¹à¸¡à¹à¸¡à¸µà¸à¸²à¸£à¹à¸£à¸µà¸¢à¸à¹à¸à¹à¸à¸ าษี`,"error_page.error_only_in_sandbox":`à¸à¹à¸à¸à¸§à¸²à¸¡à¸à¸µà¹à¸à¸°à¸à¸£à¸²à¸à¸à¹à¸à¸à¸²à¸°à¹à¸ sandbox à¹à¸à¹à¸²à¸à¸±à¹à¸`,"error_page.error_message_stripe_missing_required_permission":`à¸à¸²à¸£à¸à¸·à¹à¸à¸¥à¹à¸¡à¹à¸«à¸¥à¸§à¹à¸à¸·à¹à¸à¸à¸à¸²à¸à¹à¸à¸ Stripe à¸à¸²à¸à¸ªà¸´à¸à¸à¸´à¹à¸à¸µà¹à¸à¸³à¹à¸à¹à¸ à¹à¸à¸ªà¸ าà¸à¹à¸§à¸à¸¥à¹à¸à¸¡à¸à¸£à¸´à¸ à¸à¸²à¸£à¸à¸·à¹à¸à¸à¸°à¸à¸³à¸à¸²à¸à¹à¸à¹à¹à¸à¸¢à¹à¸¡à¹à¸¡à¸µà¸à¸²à¸£à¹à¸£à¸µà¸¢à¸à¹à¸à¹à¸à¸ าษี`,"error_page.error_title_stripe_tax_not_active":`Stripe Tax à¹à¸¡à¹à¹à¸à¸´à¸à¹à¸à¹à¸à¸²à¸`,"error_page.error_title_stripe_invalid_tax_origin_address":`à¸à¸µà¹à¸à¸¢à¸¹à¹à¸à¹à¸à¸à¸²à¸à¸ าษีà¹à¸¡à¹à¸à¸¹à¸à¸à¹à¸à¸`,"apple_pay.free_trial":`à¸à¸à¸¥à¸à¸à¹à¸à¹à¸à¸£à¸µ`,"product_info.price_after_intro_price":`หลัà¸à¸à¸²à¸ {{introPriceDuration}} à¹à¸à¸§à¸±à¸à¸à¸µà¹ {{renewalDate}}`,"product_info.after_trial":`หลัà¸à¸à¹à¸§à¸à¸à¸à¸¥à¸à¸à¹à¸à¹`,"product_info.after":`หลัà¸à¸à¸²à¸`,"product_info.intro_price_phase_after_trial":`à¸à¸²à¸à¸à¸±à¹à¸ {{introPriceDuration}} à¹à¸à¸£à¸²à¸à¸² {{introPrice}}`,"product_info.intro_price_phase":`à¸à¹à¸§à¸à¹à¸£à¸ {{introPriceDuration}} à¹à¸à¸£à¸²à¸à¸² {{introPrice}}`,"product_info.intro_price_phase_paid_once":`à¸à¸³à¸£à¸°à¸à¸£à¸±à¹à¸à¹à¸à¸µà¸¢à¸§`,"payment_entry_page.trial_subscription_terms_info":`หลัà¸à¸à¸²à¸à¸à¹à¸§à¸à¸à¸à¸¥à¸à¸à¹à¸à¹à¸à¸à¸à¸à¸¸à¸à¸ªà¸´à¹à¸à¸ªà¸¸à¸à¸¥à¸ à¸à¸¸à¸à¸à¸°à¸à¸¹à¸à¹à¸£à¸µà¸¢à¸à¹à¸à¹à¸à¹à¸à¸´à¸ {{price}} {{perFrequency}} à¹à¸£à¸´à¹à¸¡à¸à¸±à¹à¸à¹à¸à¹à¸§à¸±à¸à¸à¸µà¹ {{renewalDate}} à¸à¸¸à¸à¸ªà¸²à¸¡à¸²à¸£à¸à¸¢à¸à¹à¸¥à¸´à¸à¹à¸à¹à¸à¸¥à¸à¸à¹à¸§à¸¥à¸²à¸à¹à¸à¸à¸§à¸±à¸à¸à¸±à¸à¸à¸¥à¹à¸²à¸§`,"payment_entry_page.subscription_info":`à¸à¸²à¸£à¸ªà¸¡à¸±à¸à¸£à¸£à¸±à¸à¸à¹à¸à¸¡à¸¹à¸¥à¸à¸°à¸à¹à¸à¸à¸²à¸¢à¸¸à¹à¸à¸¢à¸à¸±à¸à¹à¸à¸¡à¸±à¸à¸´ ยà¸à¹à¸¥à¸´à¸à¹à¸à¹à¸à¸¥à¸à¸à¹à¸§à¸¥à¸²`,"payment_entry_page.otp_terms_info":`à¹à¸¡à¸·à¹à¸à¸à¸³à¸à¸²à¸£à¸à¸·à¹à¸ à¸à¸¸à¸à¸à¸à¸¥à¸à¸à¸µà¹à¸à¸°à¸à¸à¸¸à¸à¸²à¸à¹à¸«à¹ {{appName}} à¹à¸£à¸µà¸¢à¸à¹à¸à¹à¸à¹à¸à¸´à¸à¸à¸²à¸à¸à¸¸à¸à¸à¸²à¸¡à¸à¹à¸à¸à¸³à¸«à¸à¸à¸à¸à¸à¸à¸§à¸à¹à¸à¸²`,"payment_entry_page.terms_link_label":`à¸à¹à¸à¸à¸³à¸«à¸à¸`,"payment_entry_page.subscription_terms_info":`à¹à¸¡à¸·à¹à¸à¸ªà¸¡à¸±à¸à¸£à¸£à¸±à¸à¸à¹à¸à¸¡à¸¹à¸¥ à¹à¸ªà¸à¸à¸§à¹à¸²à¸à¸¸à¸à¸¢à¸´à¸à¸¢à¸à¸¡à¹à¸«à¹ {{appName}} à¹à¸£à¸µà¸¢à¸à¹à¸à¹à¸à¹à¸à¸´à¸à¸à¸²à¸à¸à¸¸à¸à¸à¸²à¸¡à¸à¹à¸à¸à¸³à¸«à¸à¸à¸à¸à¸à¸§à¹à¸²à¸à¸¸à¸à¸à¸°à¸¢à¸à¹à¸¥à¸´à¸`,"loading_page.keep_page_open":`à¸à¸£à¸°à¸à¸§à¸à¸à¸²à¸£à¹à¸à¸·à¸à¸à¹à¸ªà¸£à¹à¸à¸ªà¸¡à¸à¸¹à¸£à¸à¹à¹à¸¥à¹à¸§ à¹à¸à¸£à¸à¹à¸à¸´à¸à¸«à¸à¹à¸²à¸à¸µà¹à¹à¸§à¹`,"loading_page.processing_payment":`à¸à¸³à¸¥à¸±à¸à¸à¸³à¹à¸à¸´à¸à¸à¸²à¸£à¸à¸³à¸£à¸°à¹à¸à¸´à¸`,"pricing_table.discount":`สà¹à¸§à¸à¸¥à¸`,"pricing_table.subtotal":`ราà¸à¸²à¸£à¸§à¸¡à¸¢à¹à¸à¸¢`,"pricing_dropdown.add_promo_code":`à¹à¸à¸´à¹à¸¡à¸£à¸«à¸±à¸ªà¹à¸à¸£à¹à¸¡à¸à¸±à¹à¸`,"discount_input.label":`รหัสà¹à¸à¸£à¹à¸¡à¸à¸±à¹à¸`,"payment_entry_page.checkout_consent_terms_of_service":`à¸à¹à¸à¸à¸³à¸«à¸à¸à¹à¸à¸à¸²à¸£à¹à¸«à¹à¸à¸£à¸´à¸à¸²à¸£`,"payment_entry_page.checkout_consent_agreement":`à¸à¸±à¸à¸¢à¸à¸¡à¸£à¸±à¸{{termsOfService}}à¸à¸à¸{{appName}}`},dfe={"periods.week":`{{amount}} hafta`,"periods.month":`{{amount}} ay`,"periods.year":`{{amount}} yıl`,"periods.day":`{{amount}}
40 gün`,"periods.weekShort":`{{amount}}hf`,"periods.monthShort":`{{amount}}ay`,"periods.yearShort":`{{amount}}yl`,"periods.dayShort":`{{amount}}g`,"periods.lifetime":`ömür boyu`,"periods.weekPlural":`{{amount}} hafta`,"periods.monthPlural":`{{amount}} ay`,"periods.yearPlural":`{{amount}} yıl`,"periods.dayPlural":`{{amount}} gün`,"periods.weekFrequency":`haftalık`,"periods.monthFrequency":`aylık`,"periods.yearFrequency":`yıllık`,"periods.dayFrequency":`günlük`,"periods.perWeekFrequency":`haftada`,"periods.perMonthFrequency":`ayda`,"periods.perYearFrequency":`yılda`,"periods.perDayFrequency":`günde`,"periods.unknownFrequency":`bilinmiyor`,"periods.weekFrequencyPlural":`her {{amount}} haftada`,"periods.monthFrequencyPlural":`her {{amount}} ayda`,"periods.yearFrequencyPlural":`her {{amount}} yılda`,"periods.dayFrequencyPlural":`her {{amount}} günde`,"product_info.product_title":`{{productTitle}}`,"product_info.product_description":`{{productDescription}}`,"product_info.product_price":`{{productPrice}}`,"product_info.free_trial_duration":`{{trialDuration}} ücretsiz deneme`,"product_info.price_after_free_trial":`Deneme süresi sona erdiÄinde, {{renewalDate}} tarihinde`,"product_info.renewal_frequency":`{{frequency}} sıklıÄında yenilenir`,"product_info.continues_until_cancelled":`İptal edilene kadar devam eder`,"product_info.cancel_anytime":`İstediÄiniz zaman iptal edebilirsiniz`,"payment_entry_page.payment_step_title":`RevenueCat ile güvenli ödeme`,"payment_entry_page.button_pay":`Åimdi öde`,"payment_entry_page.button_start_trial":`Denemeyi baÅlat`,"success_page.purchase_successful":`Ãdeme tamamlandı`,"success_page.button_close":`Devam et`,"error_page.if_error_persists":`Hata devam ederse lütfen iletiÅime geçin `,"error_page.error_title_already_subscribed":`{{productTitle}} ürününe zaten abone oldunuz`,"error_page.error_title_already_purchased":`{{productTitle}} ürününü zaten satın aldınız`,"error_page.error_title_other_errors":`Bir Åeyler ters gitti`,"error_page.error_message_already_subscribed":`Bu ürüne tekrar abone olamazsınız.`,"error_page.error_message_already_purchased":`Bu ürünü tekrar satın alamazsınız.`,"error_page.error_message_missing_email_error":`Satın almayı tamamlamak için e-posta gereklidir.`,"error_page.error_message_network_error":`AÄ hatası. Lütfen internet baÄlantınızı kontrol edin.`,"error_page.error_message_error_charging_payment":`Ãdeme baÅarısız oldu.`,"error_page.error_message_error_setting_up_purchase":`Bir hata nedeniyle satın alma baÅlatılamadı (hata kodu: {{errorCode}}).`,"error_page.error_message_invalid_tax_location":`Fatura adresinizi doÄrulayamadık. Lütfen posta kodu ve ülkenin doÄru olduÄunu kontrol edin.`,"error_page.error_message_unknown_error":`Bilinmeyen bir hata oluÅtu (hata kodu: {{errorCode}}).`,"error_page.button_try_again":`Tekrar dene`,"paywall_variables.price_per_period":`{{formattedPrice}}/{{period}}`,"paywall_variables.sub_relative_discount":`{{discount}}%`,"paywall_variables.total_price_and_per_month":`{{formattedPrice}}/{{period}}({{formattedPricePerMonth}}/{{monthPeriod}})`,"product_info.total_due_today":`Bugün ödenecek toplam tutar`,"product_info.subscribe_to":`Abone Ol`,"navbar_header.details":`Detaylar`,"navbar_header.back_button":`Geri`,"pricing_dropdown.show_details":`Detayları göster`,"pricing_dropdown.hide_details":`Detayları gizle`,"pricing_table.tax":`Vergi`,"pricing_table.trial_ends":`Deneme süresi sona erdikten sonra, {{formattedTrialEndDate}} tarihinde`,"pricing_table.total_due_today":`Bugün ödenecek toplam`,"pricing_table.total_excluding_tax":`Vergi hariç toplam`,"pricing_table.enter_billing_address_to_calculate":`Hesaplamak için fatura adresini girin`,"pricing_table.enter_state_or_postal_code_to_calculate":`Hesaplamak için eyalet veya posta kodunu girin`,"pricing_table.enter_postal_code_to_calculate":`Hesaplamak için posta kodunu girin`,"error_page.error_message_invalid_email_error":`{{email}} e-posta adresi doÄrulanamadı. Lütfen geçerli bir e-posta adresi girin.`,"payment_entry_page.button_payment_method":`{{paymentMethod}} ile {{formattedPrice}} öde`,"payment_entry_page.button_with_price":`{{formattedPrice}} öde`,"price_update.title":`Fiyat güncellemesi`,"price_update.base_message":`Toplam fiyat, fatura adresinize göre vergi dahil olacak Åekilde güncellendi. Lütfen inceleyip tekrar deneyin. Kartınızdan yalnızca bir kez ücret alınacaktır.`,"price_update.trial_message":`Abonelik fiyatı, fatura adresinize göre vergileri içerecek Åekilde güncellendi. Ãcretsiz deneme süresi hala geçerli. Lütfen kontrol edin ve tekrar deneyin.`,"payment_entry_page.express_checkout_divider":`VEYA KARTLA ÃDEYİN`,"error_page.trouble_accessing":`Satın alımınıza eriÅmekte sorun yaÅıyorsanız, Åu adresten destek ekibine ulaÅın: `,"error_page.close_button_title":`{{appName}}
40'e Git`,"error_page.error_title_stripe_missing_required_permission":`Eksik Stripe izni`,"error_page.button_close":`Kapat`,"error_page.error_message_stripe_invalid_tax_origin_address":`Vergi baÅlangıç adresi geçersiz olduÄu için satın alma baÅarısız oldu. Ãretimde, satın alımlar vergi uygulanmadan çalıÅacaktır.`,"error_page.error_message_stripe_tax_not_active":`Stripe Vergi etkinleÅtirilmediÄi için satın alma baÅarısız oldu. Ãretimde, satın alımlar vergi uygulanmadan çalıÅacaktır.`,"error_page.error_only_in_sandbox":`Bu mesaj yalnızca sanal ortamda görünür.`,"error_page.error_message_stripe_missing_required_permission":`Stripe uygulamasında gerekli bir izin eksik olduÄu için satın alma baÅarısız oldu. Ãretimde, satın alımlar vergi uygulanmadan çalıÅacaktır.`,"error_page.error_title_stripe_tax_not_active":`Stripe Vergi aktif deÄil`,"error_page.error_title_stripe_invalid_tax_origin_address":`Geçersiz vergi baÅlangıç adresi`,"apple_pay.free_trial":`Ãcretsiz Deneme`,"product_info.price_after_intro_price":`{{introPriceDuration}} sonra, {{renewalDate}} tarihinde`,"product_info.after_trial":`deneme süresinden sonra`,"product_info.after":`sonra`,"product_info.intro_price_phase_after_trial":`Sonra {{introPriceDuration}} boyunca {{introPrice}}`,"product_info.intro_price_phase":`İlk {{introPriceDuration}} boyunca {{introPrice}}`,"product_info.intro_price_phase_paid_once":`bir defaya mahsus ödenir`,"payment_entry_page.trial_subscription_terms_info":`Deneme süreniz sona erdikten sonra, {{renewalDate}} tarihinden itibaren {{price}} {{perFrequency}} ücretlendirileceksiniz. Bu tarihten önce istediÄiniz zaman iptal edebilirsiniz.`,"payment_entry_page.subscription_info":`Abonelik otomatik olarak yenilenir. İstediÄiniz zaman iptal edin.`,"payment_entry_page.otp_terms_info":`Satın alarak, {{appName}}'in sizi Åartlarına göre ücretlendirmesine izin vermeyi kabul edersiniz.`,"payment_entry_page.terms_link_label":`KoÅullar`,"payment_entry_page.subscription_terms_info":`Abone olarak, iptal edene kadar {{appName}}'in sizi Åartlarına göre ücretlendirmesine izin vermeyi kabul edersiniz.`,"loading_page.keep_page_open":`İÅlem neredeyse tamamlandı. Bu sayfayı açık tutun.`,"loading_page.processing_payment":`Ãdeme iÅleniyor`,"pricing_table.discount":`İndirim`,"pricing_table.subtotal":`Ara Toplam`,"pricing_dropdown.add_promo_code":`kupon kodu ekle`,"discount_input.label":`Promosyon kodu`,"payment_entry_page.checkout_consent_terms_of_service":`hizmet Åartları`,"payment_entry_page.checkout_consent_agreement":`{{appName}} {{termsOfService}}'ni kabul ediyorum.`},ffe={"periods.week":`{{amount}} ÑижденÑ`,"periods.month":`{{amount}} мÑÑÑÑÑ`,"periods.year":`{{amount}} ÑÑк`,"periods.day":`{{amount}} денÑ`,"periods.weekShort":`{{amount}}Ñиж`,"periods.monthShort":`{{amount}}мÑÑ`,"periods.yearShort":`{{amount}}ÑÑк`,"periods.dayShort":`{{amount}}дн`,"periods.lifetime":`пожиÑÑÑво`,"periods.weekPlural":`{{amount}} ÑижнÑв`,"periods.monthPlural":`{{amount}} мÑÑÑÑÑв`,"periods.yearPlural":`{{amount}} ÑокÑв`,"periods.dayPlural":`{{amount}} днÑв`,"periods.weekFrequency":`ÑоÑижнÑ`,"periods.monthFrequency":`ÑомÑÑÑÑÑ`,"periods.yearFrequency":`ÑоÑокÑ`,"periods.dayFrequency":`ÑоднÑ`,"periods.perWeekFrequency":`на ÑижденÑ`,"periods.perMonthFrequency":`на мÑÑÑÑÑ`,"periods.perYearFrequency":`на ÑÑк`,"periods.perDayFrequency":`на денÑ`,"periods.unknownFrequency":`невÑдомо`,"periods.weekFrequencyPlural":`ÐºÐ¾Ð¶Ð½Ñ {{amount}} ÑижнÑв`,"periods.monthFrequencyPlural":`ÐºÐ¾Ð¶Ð½Ñ {{amount}} мÑÑÑÑÑв`,"periods.yearFrequencyPlural":`ÐºÐ¾Ð¶Ð½Ñ {{amount}} ÑокÑв`,"periods.dayFrequencyPlural":`ÐºÐ¾Ð¶Ð½Ñ {{amount}} днÑв`,"product_info.product_title":`{{productTitle}}`,"product_info.product_description":`{{productDescription}}`,"product_info.product_price":`{{productPrice}}`,"product_info.free_trial_duration":`{{trialDuration}} безкоÑÑовний пÑобний пеÑÑод`,"product_info.price_after_free_trial":`ÐÑÑÐ»Ñ Ð·Ð°ÐºÑнÑÐµÐ½Ð½Ñ Ð¿Ñобного пеÑÑодÑ, {{renewalDate}}`,"product_info.renewal_frequency":`ÐÑодовжÑÑÑÑÑÑ {{frequency}}`,"product_info.continues_until_cancelled":`ТÑÐ¸Ð²Ð°Ñ Ð´Ð¾ ÑкаÑÑваннÑ`,"product_info.cancel_anytime":`Ðожна ÑкаÑÑваÑи в бÑдÑ-Ñкий ÑаÑ`,"payment_entry_page.payment_step_title":`ÐезпеÑна оплаÑа ÑеÑез RevenueCat`,"payment_entry_page.button_pay":`ÐплаÑиÑи заÑаз`,"payment_entry_page.button_start_trial":`РозпоÑаÑи пÑобний пеÑÑод`,"success_page.purchase_successful":`ÐплаÑа завеÑÑена`,"success_page.button_close"
40:`ÐÑодовжиÑи`,"error_page.if_error_persists":`ЯкÑо помилка повÑоÑÑÑÑÑÑÑ, звеÑнÑÑÑÑÑ Ð´Ð¾ `,"error_page.error_title_already_subscribed":`Ðи вже пÑдпиÑалиÑÑ Ð½Ð° {{productTitle}}`,"error_page.error_title_already_purchased":`Ðи вже пÑидбали {{productTitle}}`,"error_page.error_title_other_errors":`ЩоÑÑ Ð¿ÑÑло не Ñак`,"error_page.error_message_already_subscribed":`Ðи не можеÑе пÑдпиÑаÑиÑÑ Ð½Ð° Ñей пÑодÑÐºÑ Ð·Ð½Ð¾Ð²Ñ.`,"error_page.error_message_already_purchased":`Ðи не можеÑе пÑидбаÑи Ñей пÑодÑÐºÑ Ð·Ð½Ð¾Ð²Ñ.`,"error_page.error_message_missing_email_error":`ÐÐ»Ñ Ð·Ð°Ð²ÐµÑÑÐµÐ½Ð½Ñ Ð¿Ð¾ÐºÑпки поÑÑÑбна елекÑÑонна поÑÑа.`,"error_page.error_message_network_error":`Ðомилка меÑежÑ. ÐеÑевÑÑÑе пÑдклÑÑÐµÐ½Ð½Ñ Ð´Ð¾ ÑнÑеÑнеÑÑ.`,"error_page.error_message_error_charging_payment":`ÐплаÑа не пÑойÑла.`,"error_page.error_message_error_setting_up_purchase":`Ðомилка пÑи ÑнÑÑÑалÑзаÑÑÑ Ð¿Ð¾ÐºÑпки (код помилки: {{errorCode}}).`,"error_page.error_message_invalid_tax_location":`Ðи не змогли пеÑевÑÑиÑи ваÑÑ Ð¿Ð»Ð°ÑÑÐ¶Ð½Ñ Ð°Ð´ÑеÑÑ. ÐÑÐ´Ñ Ð»Ð°Ñка, пеÑевÑÑÑе, Ñи пÑавилÑÐ½Ñ Ð¿Ð¾ÑÑовий ÑÐ½Ð´ÐµÐºÑ Ñа кÑаÑна.`,"error_page.error_message_unknown_error":`СÑалаÑÑ Ð½ÐµÐ²Ñдома помилка (код помилки: {{errorCode}}).`,"error_page.button_try_again":`СпÑобÑваÑи Ñе Ñаз`,"paywall_variables.price_per_period":`{{formattedPrice}}/{{period}}`,"paywall_variables.sub_relative_discount":`{{discount}}%`,"paywall_variables.total_price_and_per_month":`{{formattedPrice}}/{{period}}({{formattedPricePerMonth}}/{{monthPeriod}})`,"product_info.total_due_today":`ÐÑÑого до ÑплаÑи ÑÑогоднÑ`,"product_info.subscribe_to":`ÐÑдпиÑаÑиÑÑ Ð½Ð°`,"navbar_header.details":`ÐеÑалÑ`,"navbar_header.back_button":`Ðазад`,"pricing_dropdown.show_details":`ÐоказаÑи деÑалÑ`,"pricing_dropdown.hide_details":`ÐÑиÑ
оваÑи деÑалÑ`,"pricing_table.tax":`ÐодаÑок`,"pricing_table.trial_ends":`ÐÑÑÐ»Ñ Ð·Ð°ÐºÑнÑÐµÐ½Ð½Ñ Ð¿Ñобного пеÑÑодÑ, {{formattedTrialEndDate}}`,"pricing_table.total_due_today":`ÐагалÑна ÑÑма до ÑплаÑи ÑÑогоднÑ`,"pricing_table.total_excluding_tax":`ÐагалÑна ÑÑма без ÑÑаÑ
ÑÐ²Ð°Ð½Ð½Ñ Ð¿Ð¾Ð´Ð°ÑкÑ`,"pricing_table.enter_billing_address_to_calculate":`ÐведÑÑÑ Ð°Ð´ÑеÑÑ Ð²Ð¸ÑÑÐ°Ð²Ð»ÐµÐ½Ð½Ñ ÑаÑ
ÑÐ½ÐºÑ Ð´Ð»Ñ ÑозÑаÑ
ÑнкÑ`,"pricing_table.enter_state_or_postal_code_to_calculate":`ÐведÑÑÑ ÑÑÐ°Ñ Ð°Ð±Ð¾ поÑÑовий ÑÐ½Ð´ÐµÐºÑ Ð´Ð»Ñ ÑозÑаÑ
ÑнкÑ`,"pricing_table.enter_postal_code_to_calculate":`ÐведÑÑÑ Ð¿Ð¾ÑÑовий ÑÐ½Ð´ÐµÐºÑ Ð´Ð»Ñ ÑозÑаÑ
ÑнкÑ`,"error_page.error_message_invalid_email_error":`ÐлекÑÑÐ¾Ð½Ð½Ñ Ð°Ð´ÑеÑÑ {{email}} не вдалоÑÑ Ð¿ÑдÑвеÑдиÑи. ÐÑÐ´Ñ Ð»Ð°Ñка, вкажÑÑÑ Ð´ÑйÑÐ½Ñ ÐµÐ»ÐµÐºÑÑÐ¾Ð½Ð½Ñ Ð°Ð´ÑеÑÑ.`,"payment_entry_page.button_payment_method":`СплаÑиÑи {{formattedPrice}} за Ð´Ð¾Ð¿Ð¾Ð¼Ð¾Ð³Ð¾Ñ {{paymentMethod}}`,"payment_entry_page.button_with_price":`СплаÑиÑи {{formattedPrice}}`,"price_update.title":`ÐÐ½Ð¾Ð²Ð»ÐµÐ½Ð½Ñ ÑÑни`,"price_update.base_message":`ÐагалÑÐ½Ñ ÑÑÐ½Ñ Ð±Ñло оновлено з ÑÑаÑ
ÑваннÑм подаÑÐºÑ Ð½Ð° оÑÐ½Ð¾Ð²Ñ Ð²Ð°ÑÐ¾Ñ Ð¿Ð»Ð°ÑÑÐ¶Ð½Ð¾Ñ Ð°Ð´ÑеÑи. ÐеÑеглÑнÑÑе Ñа ÑпÑобÑйÑе Ñе Ñаз. РваÑÐ¾Ñ ÐºÐ°ÑÑки бÑде ÑпиÑано коÑÑи лиÑе один Ñаз.`,"price_update.trial_message":`ЦÑна пÑдпиÑки бÑла оновлена Ð´Ð»Ñ Ð²ÐºÐ»ÑÑÐµÐ½Ð½Ñ Ð¿Ð¾Ð´Ð°ÑкÑв на оÑÐ½Ð¾Ð²Ñ Ð²Ð°ÑÐ¾Ñ Ð¿Ð»Ð°ÑÑÐ¶Ð½Ð¾Ñ Ð°Ð´ÑеÑи. ÐезкоÑÑовний пÑобний пеÑÑод вÑе Ñе дÑÑ. ÐÑÐ´Ñ Ð»Ð°Ñка, пеÑевÑÑÑе Ñа ÑпÑобÑйÑе Ñе Ñаз.`,"payment_entry_page.express_checkout_divider":`ÐÐРСÐÐÐТÐТЬ ÐÐРТÐÐЮ`,"error_page.trouble_accessing":`ЯкÑо Ñ Ð²Ð°Ñ Ð²Ð¸Ð½Ð¸ÐºÐ»Ð¸ пÑоблеми з доÑÑÑпом до ваÑÐ¾Ñ Ð¿Ð¾ÐºÑпки, звеÑнÑÑÑÑÑ Ð´Ð¾ ÑлÑжби пÑдÑÑимки за адÑеÑÐ¾Ñ `,"error_page.close_button_title":`ÐеÑейÑи до {{appName}}
40`,"error_page.error_title_stripe_missing_required_permission":`ÐÑдÑÑÑнÑй дозвÑл Stripe`,"error_page.button_close":`ÐакÑиÑи`,"error_page.error_message_stripe_invalid_tax_origin_address":`ÐокÑпка не вдалаÑÑ, оÑкÑлÑки адÑеÑа поÑ
Ð¾Ð´Ð¶ÐµÐ½Ð½Ñ Ð¿Ð¾Ð´Ð°ÑÐºÑ Ð½ÐµÐ´ÑйÑна. У виÑобниÑÑÐ²Ñ Ð¿Ð¾ÐºÑпки пÑаÑÑваÑимÑÑÑ Ð±ÐµÐ· заÑÑоÑÑÐ²Ð°Ð½Ð½Ñ Ð¿Ð¾Ð´Ð°ÑкÑв.`,"error_page.error_message_stripe_tax_not_active":`ÐокÑпка не вдалаÑÑ, оÑкÑлÑки Stripe Tax не ввÑмкнено. У виÑобниÑÑÐ²Ñ Ð¿Ð¾ÐºÑпки пÑаÑÑваÑимÑÑÑ Ð±ÐµÐ· заÑÑоÑÑÐ²Ð°Ð½Ð½Ñ Ð¿Ð¾Ð´Ð°ÑкÑв.`,"error_page.error_only_in_sandbox":`Це повÑÐ´Ð¾Ð¼Ð»ÐµÐ½Ð½Ñ Ð·âÑвлÑÑÑÑÑÑ Ð»Ð¸Ñе в пÑÑоÑниÑÑ.`,"error_page.error_message_stripe_missing_required_permission":`ÐокÑпка не вдалаÑÑ, оÑкÑлÑки пÑогÑÐ°Ð¼Ñ Stripe не виÑÑаÑÐ°Ñ Ð½ÐµÐ¾Ð±Ñ
Ñдного дозволÑ. У виÑобниÑÑÐ²Ñ Ð¿Ð¾ÐºÑпки пÑаÑÑваÑимÑÑÑ Ð±ÐµÐ· заÑÑоÑÑÐ²Ð°Ð½Ð½Ñ Ð¿Ð¾Ð´Ð°ÑкÑв.`,"error_page.error_title_stripe_tax_not_active":`Stripe Tax не акÑивовано`,"error_page.error_title_stripe_invalid_tax_origin_address":`ÐедÑйÑна адÑеÑа поÑ
Ð¾Ð´Ð¶ÐµÐ½Ð½Ñ Ð¿Ð¾Ð´Ð°ÑкÑ`,"apple_pay.free_trial":`ÐезкоÑÑовна пÑобна веÑÑÑÑ`,"product_info.price_after_intro_price":`ÐÑÑÐ»Ñ {{introPriceDuration}}, {{renewalDate}}`,"product_info.after_trial":`пÑÑÐ»Ñ Ð¿Ñобного пеÑÑодÑ`,"product_info.after":`пÑÑлÑ`,"product_info.intro_price_phase_after_trial":`ÐоÑÑм {{introPriceDuration}} за {{introPrice}}`,"product_info.intro_price_phase":`СпоÑаÑÐºÑ {{introPriceDuration}} за {{introPrice}}`,"product_info.intro_price_phase_paid_once":`ÑплаÑено один Ñаз`,"payment_entry_page.trial_subscription_terms_info":`ÐÑÑÐ»Ñ Ð·Ð°ÐºÑнÑÐµÐ½Ð½Ñ Ð¿Ñобного пеÑÑÐ¾Ð´Ñ Ð· Ð²Ð°Ñ Ð±Ñде ÑÑÑгÑваÑиÑÑ Ð¿Ð»Ð°Ñа в ÑозмÑÑÑ {{price}} {{perFrequency}} поÑинаÑÑи з {{renewalDate}}. Ðи можеÑе ÑкаÑÑваÑи пÑдпиÑÐºÑ Ð² бÑдÑ-Ñкий ÑÐ°Ñ Ð´Ð¾ ÑÑÑÑ Ð´Ð°Ñи.`,"payment_entry_page.subscription_info":`ÐÑдпиÑка поновлÑÑÑÑÑÑ Ð°Ð²ÑомаÑиÑно. СкаÑÑваÑи можна в бÑдÑ-Ñкий ÑаÑ.`,"payment_entry_page.otp_terms_info":`ÐÑпÑÑÑи, ви погоджÑÑÑеÑÑ Ð´Ð¾Ð·Ð²Ð¾Ð»Ð¸Ñи {{appName}} ÑÑÑгÑваÑи з Ð²Ð°Ñ Ð¿Ð»Ð°ÑÑ Ð²ÑдповÑдно до ÑÑ
нÑÑ
Ñмов.`,"payment_entry_page.terms_link_label":`Умови`,"payment_entry_page.subscription_terms_info":`ÐÑдпиÑÑÑÑиÑÑ, ви погоджÑÑÑеÑÑ Ð´Ð¾Ð·Ð²Ð¾Ð»Ð¸Ñи {{appName}} ÑÑÑгÑваÑи з Ð²Ð°Ñ Ð¿Ð»Ð°ÑÑ Ð²ÑдповÑдно до ÑÑ
нÑÑ
Ñмов, поки ви не ÑкаÑÑÑÑе пÑдпиÑкÑ.`,"loading_page.keep_page_open":`ÐÑоÑÐµÑ Ð¼Ð°Ð¹Ð¶Ðµ завеÑÑено. ÐалиÑÑе ÑÑ ÑÑоÑÑÐ½ÐºÑ Ð²ÑдкÑиÑоÑ.`,"loading_page.processing_payment":`ÐбÑобка плаÑежÑ`,"pricing_table.discount":`Ðнижка`,"pricing_table.subtotal":`СÑма до ÑплаÑи`,"pricing_dropdown.add_promo_code":`ÐодаÑи пÑомокод`,"discount_input.label":`ÐÑомокод`,"payment_entry_page.checkout_consent_terms_of_service":`Ñмовами Ð½Ð°Ð´Ð°Ð½Ð½Ñ Ð¿Ð¾ÑлÑг`,"payment_entry_page.checkout_consent_agreement":`Я погоджÑÑÑÑ Ð· {{appName}} {{termsOfService}}.`},pfe={"periods.week":`{{amount}} tuần`,"periods.month":`{{amount}} tháng`,"periods.year":`{{amount}} nÄm`,"periods.day":`{{amount}} ngà y`,"periods.weekShort":`{{amount}}tuần`,"periods.monthShort":`{{amount}}tháng`,"periods.yearShort":`{{amount}}nÄm`,"periods.dayShort":`{{amount}}ngà y`,"periods.lifetime":`trá»n Äá»i`,"periods.weekPlural":`{{amount}} tuần`,"periods.monthPlural":`{{amount}} tháng`,"periods.yearPlural":`{{amount}} nÄm`,"periods.dayPlural":`{{amount}} ngà y`,"periods.weekFrequency":`hà ng tuần`,"periods.monthFrequency":`hà ng tháng`,"periods.yearFrequency":`hà ng nÄm`,"periods.dayFrequency":`hà ng ngà y`,"periods.perWeekFrequency":`má»i tuần`,"periods.perMonthFrequency":`má»i tháng`,"periods.perYearFrequency":`má»i nÄm`,"periods.perDayFrequency":`má»i ngà y`,"periods.unknownFrequency":`không xác Äá»nh`,"periods.weekFrequencyPlural":`cứ {{amount}} tuần`,"periods.monthFrequencyPlural":`cứ {{amount}} tháng`,"periods.yearFrequencyPlural":`cứ {{amount}} nÄm`,"periods.dayFrequencyPlural":`cứ {{amount}} ngà y`,"product_info.product_title":`{{productTitle}}`,"product_info.product_description":`{{productDescription}}`,"product_info.product_price":`{{productPrice}}`,"product_info.free_trial_duration":`{{trialDuration}} dùng thá» miá»
n phÃ`,"product_info.price_after_free_trial":`Sau khi dùng thá» kết thúc, và o {{renewalDate}}`,"product_info.renewal_frequency":`Gia hạn {{frequency}}`,"product_info.continues_until_cancelled":`Tiếp tục cho Äến khi há»§y`,"product_info.cancel_anytime":`Há»§y bất cứ lúc nà o`,"payment_entry_page.payment_step_title":`Thanh toán an toà n bá»i RevenueCat`,"payment_entry_page.button_pay":`Thanh toán ngay`,"payment_entry_page.button_start_trial":`Bắt Äầu dùng thá»`,"success_page.purchase_successful":`Thanh toán hoà n tất`,"success_page.button_close"
40:`Tiếp tục`,"error_page.if_error_persists":`Nếu lá»i vẫn tiếp diá»
n, vui lòng liên há» `,"error_page.error_title_already_subscribed":`Bạn Äã ÄÄng ký {{productTitle}} rá»i`,"error_page.error_title_already_purchased":`Bạn Äã mua {{productTitle}} rá»i`,"error_page.error_title_other_errors":`Có lá»i xảy ra`,"error_page.error_message_already_subscribed":`Bạn không thá» ÄÄng ký sản phẩm nà y lần nữa.`,"error_page.error_message_already_purchased":`Bạn không thá» mua sản phẩm nà y lần nữa.`,"error_page.error_message_missing_email_error":`Email bắt buá»c Äá» hoà n tất viá»c mua hà ng.`,"error_page.error_message_network_error":`Lá»i mạng. Vui lòng kiá»m tra kết ná»i internet cá»§a bạn.`,"error_page.error_message_error_charging_payment":`Thanh toán thất bại.`,"error_page.error_message_error_setting_up_purchase":`Không thá» bắt Äầu mua do lá»i (mã lá»i: {{errorCode}}).`,"error_page.error_message_invalid_tax_location":`Chúng tôi không thá» xác minh Äá»a chá» thanh toán cá»§a bạn. Vui lòng kiá»m tra lại mã bưu Äiá»n và quá»c gia.`,"error_page.error_message_unknown_error":`Äã xảy ra lá»i không xác Äá»nh (mã lá»i: {{errorCode}}).`,"error_page.button_try_again":`Thá» lại`,"paywall_variables.price_per_period":`{{formattedPrice}}/{{period}}`,"paywall_variables.sub_relative_discount":`{{discount}}%`,"paywall_variables.total_price_and_per_month":`{{formattedPrice}}/{{period}}({{formattedPricePerMonth}}/{{monthPeriod}})`,"product_info.total_due_today":`Tá»ng sá» tiá»n phải trả hôm nay`,"product_info.subscribe_to":`ÄÄng ký`,"navbar_header.details":`Chi tiết`,"navbar_header.back_button":`Quay lại`,"pricing_dropdown.show_details":`Xem chi tiết`,"pricing_dropdown.hide_details":`Ẩn chi tiết`,"pricing_table.tax":`Thuế`,"pricing_table.trial_ends":`Sau khi thá»i gian dùng thá» kết thúc, và o {{formattedTrialEndDate}}`,"pricing_table.total_due_today":`Tá»ng sá» tiá»n phải trả hôm nay`,"pricing_table.total_excluding_tax":`Tá»ng cá»ng chưa bao gá»m thuế`,"pricing_table.enter_billing_address_to_calculate":`Nháºp Äá»a chá» thanh toán Äá» tÃnh toán`,"pricing_table.enter_state_or_postal_code_to_calculate":`Nháºp tiá»u bang hoặc mã bưu Äiá»n Äá» tÃnh toán`,"pricing_table.enter_postal_code_to_calculate":`Nháºp mã bưu Äiá»n Äá» tÃnh toán`,"error_page.error_message_invalid_email_error":`Không thá» xác minh Äá»a chá» email {{email}}. Vui lòng cung cấp má»t Äá»a chá» email hợp lá».`,"payment_entry_page.button_payment_method":`Thanh toán {{formattedPrice}} bằng {{paymentMethod}}`,"payment_entry_page.button_with_price":`Thanh toán {{formattedPrice}}`,"price_update.title":`Cáºp nháºt giá`,"price_update.base_message":`Tá»ng giá Äã ÄÆ°á»£c cáºp nháºt vá»i thuế dá»±a trên Äá»a chá» thanh toán cá»§a bạn. Vui lòng xem lại và thá» lại. Thẻ cá»§a bạn sẽ chá» bá» tÃnh phà má»t lần.`,"price_update.trial_message":`Giá ÄÄng ký Äã ÄÆ°á»£c cáºp nháºt Äá» bao gá»m thuế dá»±a trên Äá»a chá» thanh toán cá»§a bạn. Thá»i gian dùng thá» miá»
n phà vẫn ÄÆ°á»£c áp dụng. Vui lòng kiá»m tra và thá» lại.`,"payment_entry_page.express_checkout_divider":`HOẶC THANH TOÃN BẰNG THẺ`,"error_page.trouble_accessing":`Nếu bạn gặp sá»± cá» khi truy cáºp giao dá»ch mua cá»§a mình, hãy liên há» vá»i bá» pháºn há» trợ theo Äá»a chá» `,"error_page.close_button_title":`Äi Äến {{appName}}`,"error_page.error_title_stripe_missing_required_permission":`Thiếu quyá»n Stripe`,"error_page.button_close":`Äóng`,"error_page.error_message_stripe_invalid_tax_origin_address":`Giao dá»ch mua không thà nh công vì Äá»a chá» gá»c thuế không hợp lá». Trong môi trưá»ng thá»±c tế, giao dá»ch mua sẽ hoạt Äá»ng mà không áp dụng thuế.`,"error_page.error_message_stripe_tax_not_active":`Giao dá»ch mua không thà nh công vì Thuế Stripe chưa ÄÆ°á»£c báºt. Trong môi trưá»ng thá»±c tế, giao dá»ch mua sẽ hoạt Äá»ng mà không áp dụng thuế.`,"error_page.error_only_in_sandbox":`Thông báo nà y chá» xuất hiá»n trong môi trưá»ng thá» nghiá»m.`,"error_page.error_message_stripe_missing_required_permission":`Giao dá»ch mua không thà nh công vì ứng dụng Stripe thiếu má»t quyá»n cần thiết. Trong môi trưá»ng thá»±c tế, giao dá»ch mua sẽ hoạt Äá»ng mà không áp dụng thuế.`,"error_page.error_title_str
40ipe_tax_not_active":`Thuế Stripe chưa hoạt Äá»ng`,"error_page.error_title_stripe_invalid_tax_origin_address":`Äá»a chá» gá»c thuế không hợp lá»`,"apple_pay.free_trial":`Dùng thá» miá»
n phÃ`,"product_info.price_after_intro_price":`Sau {{introPriceDuration}}, và o {{renewalDate}}`,"product_info.after_trial":`sau khi dùng thá»`,"product_info.after":`sau`,"product_info.intro_price_phase_after_trial":`Sau Äó {{introPriceDuration}} vá»i giá {{introPrice}}`,"product_info.intro_price_phase":`{{introPriceDuration}} Äầu tiên vá»i giá {{introPrice}}`,"product_info.intro_price_phase_paid_once":`trả má»t lần`,"payment_entry_page.trial_subscription_terms_info":`Sau khi thá»i gian dùng thá» cá»§a bạn kết thúc, bạn sẽ bá» tÃnh phà {{price}} {{perFrequency}} bắt Äầu từ {{renewalDate}}. Bạn có thá» há»§y bất cứ lúc nà o trưá»c ngà y nà y.`,"payment_entry_page.subscription_info":`Gói ÄÄng ký tá»± Äá»ng gia hạn. Há»§y bất cứ lúc nà o.`,"payment_entry_page.otp_terms_info":`Bằng cách mua, bạn Äá»ng ý cho phép {{appName}} tÃnh phà bạn theo các Äiá»u khoản cá»§a há».`,"payment_entry_page.terms_link_label":`Äiá»u khoản`,"payment_entry_page.subscription_terms_info":`Bằng cách ÄÄng ký, bạn Äá»ng ý cho phép {{appName}} tÃnh phà bạn theo các Äiá»u khoản cá»§a há» cho Äến khi bạn há»§y.`,"loading_page.keep_page_open":`Quá trình gần hoà n tất. Vui lòng giữ trang nà y má».`,"loading_page.processing_payment":`Äang xá» lý thanh toán`,"pricing_table.discount":`Giảm giá`,"pricing_table.subtotal":`Tá»ng cá»ng`,"pricing_dropdown.add_promo_code":`Thêm mã khuyến mãi`,"discount_input.label":`Mã khuyến mãi`,"payment_entry_page.checkout_consent_terms_of_service":`Äiá»u khoản dá»ch vụ`,"payment_entry_page.checkout_consent_agreement":`Tôi Äá»ng ý vá»i {{termsOfService}} cá»§a {{appName}}.`},a0=(e=>(e.PeriodsWeek=`periods.week`,e.PeriodsMonth=`periods.month`,e.PeriodsYear=`periods.year`,e.PeriodsDay=`periods.day`,e.PeriodsWeekShort=`periods.weekShort`,e.PeriodsMonthShort=`periods.monthShort`,e.PeriodsYearShort=`periods.yearShort`,e.PeriodsDayShort=`periods.dayShort`,e.PeriodsLifetime=`periods.lifetime`,e.PeriodsWeekPlural=`periods.weekPlural`,e.PeriodsMonthPlural=`periods.monthPlural`,e.PeriodsYearPlural=`periods.yearPlural`,e.PeriodsDayPlural=`periods.dayPlural`,e.PeriodsWeekFrequency=`periods.weekFrequency`,e.PeriodsMonthFrequency=`periods.monthFrequency`,e.PeriodsYearFrequency=`periods.yearFrequency`,e.PeriodsDayFrequency=`periods.dayFrequency`,e.PeriodsPerWeekFrequency=`periods.perWeekFrequency`,e.PeriodsPerMonthFrequency=`periods.perMonthFrequency`,e.PeriodsPerYearFrequency=`periods.perYearFrequency`,e.PeriodsPerDayFrequency=`periods.perDayFrequency`,e.PeriodsUnknownFrequency=`periods.unknownFrequency`,e.PeriodsWeekFrequencyPlural=`periods.weekFrequencyPlural`,e.PeriodsMonthFrequencyPlural=`periods.monthFrequencyPlural`,e.PeriodsYearFrequencyPlural=`periods.yearFrequencyPlural`,e.PeriodsDayFrequencyPlural=`periods.dayFrequencyPlural`,e.ProductInfoProductTitle=`product_info.product_title`,e.ProductInfoProductDescription=`product_info.product_description`,e.ProductInfoProductPrice=`product_info.product_price`,e.ProductInfoFreeTrialDuration=`product_info.free_trial_duration`,e.ProductInfoPriceAfterFreeTrial=`product_info.price_after_free_trial`,e.ProductInfoIntroPricePhaseAfterTrial=`product_info.intro_price_phase_after_trial`,e.ProductInfoIntroPricePhasePaidOnce=`product_info.intro_price_phase_paid_once`,e.ProductInfoIntroPricePhase=`product_info.intro_price_phase`,e.ProductInfoPriceAfterIntroPrice=`product_info.price_after_intro_price`,e.ProductInfoAfterTrial=`product_info.after_trial`,e.ProductInfoAfter=`product_info.after`,e.ProductInfoPriceTotalDueToday=`product_info.total_due_today`,e.ProductInfoSubscribeTo=`product_info.subscribe_to`,e.ProductInfoRenewalFrequency=`product_info.renewal_frequency`,e.ProductInfoContinuesUntilCancelled=`product_info.continues_until_cancelled`,e.ProductInfoCancelAnytime=`product_info.cancel_anytime`,e.PaymentEntryPagePaymentStepTitle=`payment_entry_page.payment_step_title`,e.PaymentEntryPageTrialSubscriptionTermsInfo=`payment_entry_page.trial_subscription_terms_info`,e.PaymentEntryPageSubscriptionTermsInfo=`payment_entry_page.subscription_terms_info`,e.PaymentEntryPageOtpTermsInfo=`payment_entry_page.otp_terms_info`,e.PaymentEntryPageTermsLinkLabel=`payment_entry_page.terms_link_label`,e.PaymentEntryPageCheckoutConsentAgreement=`payment_entry_page.checkout_consent_agreement`,e.PaymentEntryPageCheckoutConsentTermsOfService=`payment_entry_page.checkout_consent_terms_of_service`,e.PaymentEntryPageSubscriptionInfo=`payment_entry_page.subscription_info`,e.PaymentEntryPageButtonPay=`payment_entry_page.button_pay`,e.PaymentEntryPageButtonStartTrial=`payment_entry_page.button_start_trial`,e.PaymentEntryPageButtonWithPrice=`payment_entry_page.button_with_price`,e.PaymentEntryPageButtonPaymentMethod=`payment_entry_page.button_payment_method`,e.PaymentEntryPageExpressCheckoutDivider=`payment_entry_page.express_checkout_divider`,e.SuccessPagePurchaseSuccessful=`success_page.purchase_successful`,e.SuccessPageButtonClose=`success_page.button_close`,e.Loa
40dingPageProcessingPayment=`loading_page.processing_payment`,e.LoadingPageKeepPageOpen=`loading_page.keep_page_open`,e.ErrorPageCloseButtonTitle=`error_page.close_button_title`,e.ErrorPageIfErrorPersists=`error_page.if_error_persists`,e.ErrorPageTroubleAccessing=`error_page.trouble_accessing`,e.ErrorPageErrorTitleAlreadySubscribed=`error_page.error_title_already_subscribed`,e.ErrorPageErrorTitleAlreadyPurchased=`error_page.error_title_already_purchased`,e.ErrorPageErrorTitleOtherErrors=`error_page.error_title_other_errors`,e.ErrorPageErrorTitleStripeTaxNotActive=`error_page.error_title_stripe_tax_not_active`,e.ErrorPageErrorTitleStripeInvalidTaxOriginAddress=`error_page.error_title_stripe_invalid_tax_origin_address`,e.ErrorPageErrorTitleStripeMissingRequiredPermission=`error_page.error_title_stripe_missing_required_permission`,e.ErrorPageErrorMessageAlreadySubscribed=`error_page.error_message_already_subscribed`,e.ErrorPageErrorMessageAlreadyPurchased=`error_page.error_message_already_purchased`,e.ErrorPageErrorMessageMissingEmailError=`error_page.error_message_missing_email_error`,e.ErrorPageErrorMessageInvalidEmailError=`error_page.error_message_invalid_email_error`,e.ErrorPageErrorMessageNetworkError=`error_page.error_message_network_error`,e.ErrorPageErrorMessageErrorChargingPayment=`error_page.error_message_error_charging_payment`,e.ErrorPageErrorMessageErrorSettingUpPurchase=`error_page.error_message_error_setting_up_purchase`,e.ErrorPageErrorMessageUnknownError=`error_page.error_message_unknown_error`,e.ErrorPageErrorMessageInvalidTaxLocation=`error_page.error_message_invalid_tax_location`,e.ErrorPageErrorMessageStripeTaxNotActive=`error_page.error_message_stripe_tax_not_active`,e.ErrorPageErrorMessageStripeInvalidTaxOriginAddress=`error_page.error_message_stripe_invalid_tax_origin_address`,e.ErrorPageErrorMessageStripeMissingRequiredPermission=`error_page.error_message_stripe_missing_required_permission`,e.ErrorPageErrorMessageOnlyInSandbox=`error_page.error_only_in_sandbox`,e.ErrorButtonTryAgain=`error_page.button_try_again`,e.ErrorButtonClose=`error_page.button_close`,e.PaywallVariablesPricePerPeriod=`paywall_variables.price_per_period`,e.PaywallVariablesSubRelativeDiscount=`paywall_variables.sub_relative_discount`,e.PaywallVariablesTotalPriceAndPerMonth=`paywall_variables.total_price_and_per_month`,e.PricingDropdownShowDetails=`pricing_dropdown.show_details`,e.PricingDropdownHideDetails=`pricing_dropdown.hide_details`,e.PricingDropdownAddPromoCode=`pricing_dropdown.add_promo_code`,e.DiscountInputLabel=`discount_input.label`,e.PricingTotalExcludingTax=`pricing_table.total_excluding_tax`,e.PricingTableTrialEnds=`pricing_table.trial_ends`,e.PricingTableTotalDueToday=`pricing_table.total_due_today`,e.PricingTableSubtotal=`pricing_table.subtotal`,e.PricingTableDiscount=`pricing_table.discount`,e.PricingTableTax=`pricing_table.tax`,e.PricingTableEnterBillingAddressToCalculate=`pricing_table.enter_billing_address_to_calculate`,e.PricingTableEnterStateOrPostalCodeToCalculate=`pricing_table.enter_state_or_postal_code_to_calculate`,e.PricingTableEnterPostalCodeToCalculate=`pricing_table.enter_postal_code_to_calculate`,e.NavbarHeaderDetails=`navbar_header.details`,e.NavbarBackButton=`navbar_header.back_button`,e.PriceUpdateTitle=`price_update.title`,e.PriceUpdateBaseMessage=`price_update.base_message`,e.PriceUpdateTrialMessage=`price_update.trial_message`,e.ApplePayFreeTrial=`apple_pay.free_trial`,e))(a0||{}),mfe={en:Pde,es:Fde,it:Ide,ar:Lde,ca:Rde,zh_Hans:zde,zh_Hant:Bde,hr:Vde,cs:Hde,da:Ude,nl:Wde,fi:Gde,fr:Kde,de:qde,el:Jde,he:Yde,hi:Xde,hu:Zde,id:Qde,ja:$de,ko:efe,ms:tfe,no:nfe,pl:rfe,pt:ife,ro:afe,ru:ofe,sk:sfe,sl:cfe,sv:lfe,th:ufe,tr:dfe,uk:ffe,vi:pfe},o0=(e=>(e.Year=`year`,e.Month=`month`,e.Week=`week`,e.Day=`day`,e))(o0||{});function s0(e){let t=e.match(/^PT?([0-9]+)([MDYW])$/);if(!t||t.length<3)return X1.errorLog(`Invalid ISO 8601 duration format: ${e}`),null;let n=parseInt(t[1]);switch(t[2]){case`Y`:return{number:n,unit:`year`};case`M`:return{number:n,unit:`month`};case`W`:return{number:n,unit:`week`};case`D`:return{number:n,unit:`day`};default:return X1.errorLog(`Invalid ISO 8601 unit duration format: ${e}`),null}}function c0(e,t,n){if(!n)return null;let r=new Date(e);switch(t.unit){case`year`:r.getDate()===29&&r.getMonth()===1&&t.number!==4?r.setFullYear(r.getFullYear()+t.number,r.getMonth(),28):r.setFullYear(r.getFullYear()+t.number,r.getMonth(),r.getDate());break;case`month`:r.setMonth(r.getMonth()+t.number,r.getDate()),r.getDate()!==e.getDate()&&(r=new Date(e),r.setMonth(r.getMonth()+t.number+1,0));break;case`week`:r.setDate(r.getDate()+t.number*7);break;case`day`:r.setDate(r.getDate()+t.number);break}return r}var l0=e=>{if(!e)return e;let t=e.replace(/_/g,`-`);try{let[e]=Intl.getCanonicalLocales(t);if(e)return e}catch{}let n=t.split(`-`)[0];try{let[e]=Intl.getCanonicalLocales(n);if(e)return e}catch{}return n},hfe=e=>e/1e6,u0=new Map;function gfe(e){let t=u0.get(e);if(t!==void 0)return t;let n;try{n=new Intl.NumberFormat(`en`,{style:`currency`,currency:e}).resolvedOptions().maximumFractionDigits??2}catch{n=2}return u0.set(e,n),n}function d0(e,t){let n=10**(6-gfe(t)),r=Math.round(e/n*1e9)/1e9;return Math.floor(r)*n}var f0=(e,t,n,r={})=>{let i=hfe(e),a={style:`currency`,currency:t,currencyDisplay:`symbol`,...r,minimumFractionDigits:r.maximumFractionDigits};return new Intl.NumberFormat(l0(n),a).format(i).replace(`US$`,`$`)},_fe=(e,t)=>
40{let n=s0(e);return n?t.translatePeriod(n.number,n.unit)||`${n.number} ${n.unit}s`:e},vfe=e=>{try{return e.charAt(0).toUpperCase()+e.slice(1)}catch{return e}},p0={noWhitespace:!1,short:!1},m0={useMultipleWords:!1},h0=class e{constructor(e={},t=i0,n=i0){aJ(this,`locales`,{}),this.selectedLocale=t,this.defaultLocale=n;let r={};Object.entries(mfe).forEach(([e,t])=>{r[e]=new g0(t,e)}),this.locales=r,e&&this.override(e)}static fallback(){return new e}override(e){Object.entries(e).forEach(([e,t])=>{this.locales[e]=new g0({...this.locales[e].labels||{},...t},this.getLanguageCodeString(e))})}formatPrice(e,t){let n={currencyDisplay:`narrowSymbol`};e===0&&(n.maximumFractionDigits=0);try{return f0(e,t,this.bcp47Locale,n)}catch{X1.errorLog(`Failed to create a price formatter for locale: ${this.bcp47Locale}`)}try{return f0(e,t,this.fallbackBcp47Locale,n)}catch{X1.errorLog(`Failed to create a price formatter for locale: ${this.fallbackBcp47Locale}`)}return f0(e,t,i0,n)}get bcp47Locale(){return l0(this.getLocaleInstance(this.selectedLocale)?.localeKey)||l0(this.getLanguageCodeString(this.selectedLocale))||i0}get fallbackBcp47Locale(){return l0(this.getLocaleInstance(this.defaultLocale)?.localeKey)||l0(this.getLanguageCodeString(this.defaultLocale))||i0}getLanguageCodeString(e){return e.split(`_`)[0].split(`-`)[0]}getLocaleInstance(e){let t=this.getLanguageCodeString(e);return this.locales[e]||this.locales[t]}translate(e,t){let n=this.getLocaleInstance(this.selectedLocale),r=this.getLocaleInstance(this.defaultLocale);return n?.translate(e,t)||r?.translate(e,t)||``}formatCountry(e){return new Intl.DisplayNames([this.bcp47Locale],{type:`region`}).of(e)||e}translatePeriod(e,t,n=p0){let r=this.getLocaleInstance(this.selectedLocale),i=this.getLocaleInstance(this.defaultLocale);return r?.translatePeriod(e,t,n)||i?.translatePeriod(e,t,n)}translatePeriodUnit(e,t=p0){let n=this.getLocaleInstance(this.selectedLocale),r=this.getLocaleInstance(this.defaultLocale);return n?.translatePeriodUnit(e,t)||r?.translatePeriodUnit(e,t)}translatePeriodFrequency(e,t,n=m0){let r=this.getLocaleInstance(this.selectedLocale),i=this.getLocaleInstance(this.defaultLocale);return r?.translatePeriodFrequency(e,t,n)||i?.translatePeriodFrequency(e,t,n)}translateDate(e,t={}){let n=this.getLocaleInstance(this.selectedLocale),r=this.getLocaleInstance(this.defaultLocale);return n?.translateDate(e,t)||r?.translateDate(e,t)}},g0=class{constructor(e={},t){this.labels=e,this.localeKey=t}replaceVariables(e,t){return Object.entries(t).reduce((e,[t,n])=>e.replace(`{{${t}}}`,`${n??``}`),e)}translate(e,t){let n=this.labels[e];if(n)return this.replaceVariables(n,t||{})}translatePeriod(e,t,n=p0){let{noWhitespace:r,short:i}={...p0,...n},a=i?`periods.${t}Short`:Math.abs(e)===1?`periods.${t}`:`periods.${t}Plural`;return this.translate(a,{amount:e.toString()})?.replace(` `,r?``:` `)}translatePeriodUnit(e,t=p0){let{noWhitespace:n,short:r}={...p0,...t},i=`periods.${e}${r?`Short`:``}`;return this.translate(i,{amount:``})?.replace(` `,n?``:` `)}translatePeriodFrequency(e,t,n=m0){let r=n?.useMultipleWords,i=Math.abs(e)===1?`periods.${r===!0?`per`:``}${r?vfe(t.toString()):t}Frequency`:`periods.${t}FrequencyPlural`;return this.translate(i,{amount:e.toString()})}translateDate(e,t={}){return e.toLocaleDateString(l0(this.localeKey),t)}};function yfe(e){return e!=null}var bfe=(e=>(e.Unknown=`unknown`,e.Custom=`custom`,e.Lifetime=`$rc_lifetime`,e.Annual=`$rc_annual`,e.SixMonth=`$rc_six_month`,e.ThreeMonth=`$rc_three_month`,e.TwoMonth=`$rc_two_month`,e.Monthly=`$rc_monthly`,e.Weekly=`$rc_weekly`,e))(bfe||{}),_0=(e=>(e.Subscription=`subscription`,e.Consumable=`consumable`,e.NonConsumable=`non_consumable`,e))(_0||{}),v0=(e,t)=>({amount:e/1e4,amountMicros:e,currency:t,formattedPrice:f0(e,t)}),y0=e=>v0(e.amount_micros,e.currency),b0=e=>{let t=e.period_duration,n=e.price?y0(e.price):null,r=t?s0(t):null,i=null,a=null,o=null;if(n!==null&&r!==null){let e=xfe(r),t=1e4,s=d0(n.amountMicros*e.toWeek,n.currency);i={amount:s/t,amountMicros:s,currency:n.currency,formattedPrice:f0(s,n.currency)};let c=d0(n.amountMicros*e.toMonth,n.currency);a={amount:c/t,amountMicros:c,currency:n.currency,formattedPrice:f0(c,n.currency)};let l=d0(n.amountMicros*e.toYear,n.currency);o={amount:l/t,amountMicros:l,currency:n.currency,formattedPrice:f0(l,n.currency)}}return{periodDuration:t,period:r,cycleCount:e.cycle_count,price:n,pricePerWeek:i,pricePerMonth:a,pricePerYear:o}},x0=(e,t)=>{let n=e.duration_mode??`one_time`,r=e.time_window??null;(n===`one_time`||n===`forever`)&&r===null&&t!==null&&(r=t);let i=null,a=null,o=r?s0(r):null;return o&&(i={number:1,unit:o.unit},a=n===`forever`?0:o.number),{timeWindow:e.time_window,durationMode:n,price:v0(e.amount_micros,e.currency),name:e.name,period:i,cycleCount:a??0,periodDuration:r,discountType:e.discount_type,percentage:e.percentage??null,fixedAmount:e.fixed_amount_micros==null?null:v0(e.fixed_amount_micros,e.currency)}};function xfe(e){let{number:t,unit:n}=e,r;switch(n){case o0.Day:r=t;break;case o0.Week:r=t*7;break;case o0.Month:r=t*30;break;case o0.Year:r=t*365;break;default:r=0,X1.errorLog(`Unknown period unit: ${n}`)}return{toWeek:r>0?7/r:0,toMonth:r>0?30/r:0,toYear:r>0?365/r:0}}var S0=e=>
40e.base==null?(X1.debugLog(`Missing base phase for subscription option. Ignoring.`),null):{id:e.id,priceId:e.price_id,base:b0(e.base),trial:e.trial?b0(e.trial):null,introPrice:e.intro_price?b0(e.intro_price):null,discount:e.discount?x0(e.discount,e.base?.period_duration):null},C0=e=>e.base_price==null?(X1.debugLog(`Missing base price for non-subscription option. Ignoring.`),null):{id:e.id,priceId:e.price_id,basePrice:y0(e.base_price),discount:e.discount?x0(e.discount,null):null},Sfe=(e,t)=>{let n=e.product_type;return n===`subscription`?Tfe(e,t,n):wfe(e,t,n)},Cfe=(e,t)=>e===`subscription`?`base`in t?S0(t):null:`base_price`in t?C0(t):null,wfe=(e,t,n)=>{let r={};if(Object.entries(e.purchase_options).forEach(([e,t])=>{let n=C0(t);n!=null&&(r[e]=n)}),Object.keys(r).length===0)return X1.debugLog(`Product ${e.identifier} has no purchase options. Ignoring.`),null;let i=e.default_purchase_option_id,a=i&&i in e.purchase_options?r[i]:null;return a==null?(X1.debugLog(`Product ${e.identifier} has no default purchase option. Ignoring.`),null):{identifier:e.identifier,displayName:e.title,title:e.title,description:e.description,productType:n,currentPrice:a.basePrice,normalPeriodDuration:null,presentedOfferingIdentifier:t.offeringIdentifier,presentedOfferingContext:t,defaultPurchaseOption:a,defaultSubscriptionOption:null,subscriptionOptions:{},defaultNonSubscriptionOption:a,price:a.basePrice,period:null,freeTrialPhase:null,introPricePhase:null,discountPhase:a.discount}},Tfe=(e,t,n)=>{let r={};if(Object.entries(e.purchase_options).forEach(([e,t])=>{let n=S0(t);n!=null&&(r[e]=n)}),Object.keys(r).length===0)return X1.debugLog(`Product ${e.identifier} has no subscription options. Ignoring.`),null;let i=e.default_purchase_option_id,a=i&&i in r?r[i]:null;if(a==null)return X1.debugLog(`Product ${e.identifier} has no default subscription option. Ignoring.`),null;let o=a.base.price;return o==null?(X1.debugLog(`Product ${e.identifier} default option has no base price. Ignoring.`),null):{identifier:e.identifier,displayName:e.title,title:e.title,description:e.description,productType:n,currentPrice:o,normalPeriodDuration:a.base.periodDuration,presentedOfferingIdentifier:t.offeringIdentifier,presentedOfferingContext:t,defaultPurchaseOption:a,defaultSubscriptionOption:a,subscriptionOptions:r,defaultNonSubscriptionOption:null,price:o,period:a.base.period,freeTrialPhase:a.trial,introPricePhase:a.introPrice,discountPhase:a.discount}},Efe=(e,t,n)=>{let r=n[t.platform_product_identifier];if(r===void 0)return null;let i=Sfe(r,e);return i===null?null:{identifier:t.identifier,rcBillingProduct:i,webBillingProduct:i,...t.web_checkout_url?{webCheckoutURL:t.web_checkout_url}:{},packageType:Ofe(t.identifier)}},Dfe=(e,t,n,r,i)=>{let a={offeringIdentifier:t.identifier,targetingContext:e&&r?{ruleId:r.rule_id,revision:r.revision}:null,placementIdentifier:null},o=t.packages.map(e=>Efe(a,e,n)).filter(yfe),s={};for(let e of o)e!=null&&(s[e.identifier]=e);return o.length==0?null:{identifier:t.identifier,serverDescription:t.description,metadata:t.metadata,...t.web_checkout_url?{webCheckoutURL:t.web_checkout_url}:{},packagesById:s,availablePackages:o,lifetime:s.$rc_lifetime??null,annual:s.$rc_annual??null,sixMonth:s.$rc_six_month??null,threeMonth:s.$rc_three_month??null,twoMonth:s.$rc_two_month??null,monthly:s.$rc_monthly??null,weekly:s.$rc_weekly??null,hasPaywall:t.paywall_components!=null,paywallComponents:t.paywall_components,...i===void 0?{}:{uiConfig:i}}};function Ofe(e){switch(e){case`$rc_lifetime`:return`$rc_lifetime`;case`$rc_annual`:return`$rc_annual`;case`$rc_six_month`:return`$rc_six_month`;case`$rc_three_month`:return`$rc_three_month`;case`$rc_two_month`:return`$rc_two_month`;case`$rc_monthly`:return`$rc_monthly`;case`$rc_weekly`:return`$rc_weekly`;default:return e.startsWith(`$rc_`)?`unknown`:`custom`}}function w0(e,t=!1){return e?.full_address_collection_mode===`always`?!0:!!(e!=null&&e.gateway_tax_collection_enabled)&&t}BY();var kfe=`<svg viewBox="0 0 124 124" fill="var(--rc-color-grey-text-dark)" xmlns="http://www.w3.org/2000/svg"> 41 <circle cx="62" cy="62" r="62" fill="var(--rc-color-grey-text-dark)" opacity="0.2"/> 42 <path d="M87.6668 41.504L82.4968 36.334L62.0002 56.8307L41.5035 36.334L36.3335 41.504L56.8302 62.0006L36.3335 82.4973L41.5035 87.6673L62.0002 67.1706L82.4968 87.6673L87.6668 82.4973L67.1702 62.0006L87.6668 41.504Z" 43 /> 44</svg> 45`,Afe=X(`<div style="color:var(--rc-color-primary);"><!></div>`);function T0(e){var t=Afe();B$(K(t),()=>kfe),Z(e,t)}function jfe(e,t){var n=AQ,r=DQ,i=e();return{subscribe:N1(i,t=>{var a=i!==e(),o,s=DQ,c=AQ;kQ(r),jQ(n);try{o=nQ(()=>{cQ(()=>{let n=e();a&&t(n)})})}finally{kQ(s),jQ(c)}return a=!0,o}).subscribe}}function E0(e){let t,n=LX(n=>{let r=!1,i=e.subscribe(e=>{t=e,r&&n()});return r=!0,i});function r(){return ZZ()?(n(),t):F1(e)}return`set`in e?{get current(){return r()},set current(t){e.set(t)}}:{get current(){return r()}}}var D0=Symbol(`hover`);function Mfe(e){WY(D0,e)}function Nfe(){return UY(D0)??M1(!1)}var O0=Symbol(`packageInfo`);function k0(e){WY(O0,e)}function Pfe(){let e=UY(O0);if(e===void 0)throw Error(`PackageInfo context not found`);return e}var Ffe=M1(void 0);function Ife(){return UY(O0)??Ffe}var A0=Symbol(`paywall`);function j0(e){WY(A0,e)}function M0(){let e=UY(A0);if(e===void 0)throw Error(`Paywall context not found`);return e}var N0=Symbol(`selected`);function P0(e){WY(N0,e)}function Lfe(){return UY(N0)??M1(!1)}var F0={Boolean:`boolean`,Integer:`integer`,Double:`double`,String:`string`},Rfe=`$value`,zfe=1e-10,I0,L0,R0,z0,B0,V0,H0,U0,W0,G0,K0,q0=class{constructor(e={}){cJ(this,H0),cJ(this,I0,N1(0)),cJ(this,L0,{}),cJ(this,R0,{}),cJ(this,z0,{}
45),cJ(this,B0,null),cJ(this,V0,null),aJ(this,`subscribe`),this.subscribe=U(this,I0).subscribe,uJ(this,H0,U0).call(this,e)}registerDeclarations(e){let t=!1;for(let[n,r]of Object.entries(e)){if(Object.hasOwn(U(this,L0),n))continue;let e=uJ(this,H0,G0).call(this,r.default,r.type);e!==void 0&&(U(this,L0)[n]=e,U(this,z0)[n]=r.type,Object.hasOwn(U(this,R0),n)||(U(this,R0)[n]=e,t=!0))}t&&uJ(this,H0,K0).call(this)}reset(e){lJ(this,L0,{}),lJ(this,R0,{}),lJ(this,z0,{}),lJ(this,B0,null),lJ(this,V0,null),uJ(this,H0,U0).call(this,e),uJ(this,H0,K0).call(this)}applyUpdates(e,t){let n=!1;for(let r of e){let e=r.to===Rfe?t:r.to;if(e===void 0)continue;let i=uJ(this,H0,W0).call(this,e,r.set);i!==void 0&&U(this,R0)[r.set]!==i&&(U(this,R0)[r.set]=i,n=!0)}n&&uJ(this,H0,K0).call(this)}get values(){return U(this,B0)??lJ(this,B0,{...U(this,R0)})}get defaults(){return U(this,V0)??lJ(this,V0,{...U(this,L0)})}matchesDeclaredType(e,t){return uJ(this,H0,W0).call(this,e,t)!==void 0}};I0=new WeakMap,L0=new WeakMap,R0=new WeakMap,z0=new WeakMap,B0=new WeakMap,V0=new WeakMap,H0=new WeakSet,U0=function(e){for(let[t,n]of Object.entries(e)){let e=uJ(this,H0,G0).call(this,n.default,n.type);e!==void 0&&(U(this,L0)[t]=e,U(this,R0)[t]=e,U(this,z0)[t]=n.type)}},W0=function(e,t){return uJ(this,H0,G0).call(this,e,U(this,z0)[t])},G0=function(e,t){if(t!==void 0&&(t===F0.String&&typeof e==`string`||t===F0.Boolean&&typeof e==`boolean`||t===F0.Double&&typeof e==`number`||t===F0.Integer&&typeof e==`number`&&Number.isInteger(e)))return e},K0=function(){lJ(this,B0,null),lJ(this,V0,null),U(this,I0).update(e=>e+1)};var J0=Symbol(`paywall-state`);function Y0(e){WY(J0,e)}function X0(){return UY(J0)}function Bfe(){return X0()??M1(0)}var Z0=Symbol(`variables`);function Q0(e){WY(Z0,e)}function $0(){let e=UY(Z0);if(e===void 0)throw Error(`Variables context not found`);return e}var Vfe=M1(void 0);function e2(){return UY(Z0)??Vfe}function t2(e={}){let t=E0(Lfe()),n=e.hover?E0(Nfe()):null,r=E0(Ife()),i=E0(M0().selectedPackageId),a=E0(e2()),o=e.state?X0():void 0,s=e.state?E0(Bfe()):null;return c=>{s?.current;let l={selectedPackageId:i.current,packageInfo:r.current,variables:a.current??{},selected:t.current,...c};return n&&(l.hover=n.current),e.state&&(l.stateValues=o?.values??{},l.stateDefaults=o?.defaults??{}),l}}var n2=Symbol(`inputValidation`),r2=Symbol(`initialInputSelections`);function Hfe(e=!0){let t=N1(e);return{isSatisfied:t,updateSatisfaction:e=>{t.set(e)}}}function Ufe(e){WY(n2,e)}function i2(){return UY(n2)}function Wfe(e){WY(r2,e)}function a2(){return UY(r2)??{}}var o2=Symbol(`localization`);function Gfe(e){let t={getLocalizedString:t=>{if(!t)return``;let{selectedLocale:n,defaultLocale:r,localizations:i}=e(),a=i[n??r]?.[t],o=i[r]?.[t];return a??o}};return WY(o2,t),t}function s2(){let e=UY(o2);if(e===void 0)throw Error(`Localization context not found`);return e}var c2={StateCondition:`state_condition`};function Kfe(e){switch(e.type){case`stack`:{let t=[...e.components];return e.badge&&t.push(e.badge.stack),t}case`button`:case`purchase_button`:case`redemption_button`:return[e.stack];case`carousel`:return e.pages;case`countdown`:{let t=[e.countdown_stack];return e.end_stack&&t.push(e.end_stack),t}case`footer`:return[e.stack];case`input_multiple_choice`:case`input_single_choice`:case`input_option`:return[e.stack];case`tabs`:return[e.control.stack,...e.tabs];case`tab`:return[e.stack];case`tab_control_button`:return[e.stack];case`timeline`:return e.items.flatMap(e=>{let t=[e.icon,e.title];return e.description&&t.push(e.description),t});case`express_purchase_button`:return[e.wallet_unknown_stack,e.wallet_available_stack,e.wallet_unavailable_stack];default:return[]}}function l2(e,t){let n=[e];for(;n.length>0;){let e=n.pop();if(e.type===`package`&&t(e))return e;let r=Kfe(e);for(let e=r.length-1;e>=0;e--)n.push(r[e])}}function qfe({stack:e,sticky_footer:t}){let n=l2(e,e=>e.is_selected_by_default);if(n!==void 0)return n.package_id;let r=l2(e,()=>!0);if(r!==void 0)return r.package_id;if(t!=null){let e=l2(t,e=>e.is_selected_by_default);if(e!==void 0)return e.package_id;let n=l2(t,()=>!0);if(n!==void 0)return n.package_id}}var u2=(e,t)=>{if(!t)return{};let n={};for(let r of t)if(r.conditions.every(t=>Jfe(t,e))){let e={...r.properties},t=r.conditions.some(e=>e.type===c2.StateCondition);(e.visible===null||e.visible===!0&&!t)&&delete e.visible,n={...n,...e}}return n},Jfe=(e,t)=>
45{var n,r,i;if(e.type===`selected`)return!!t.selected;if(e.type===`hover`)return!!t.hover;if(e.type===`focus`)return!!t.focus;if(e.type===`error`)return!!t.error;if(e.type===`multiple_intro_offers`)return!1;if(e.type===`intro_offer`||e.type===`intro_offer_condition`){let i=!!((n=t.packageInfo)!=null&&n.hasIntroOffer)||!!((r=t.packageInfo)!=null&&r.hasTrial);if(e.type===`intro_offer`)return i;if(e.operator===`=`)return i===e.value;if(e.operator===`!=`)return i!==e.value}if(e.type===`promo_offer`||e.type===`promo_offer_condition`){let n=!!((i=t.packageInfo)!=null&&i.hasPromoOffer);if(e.type===`promo_offer`)return n;if(e.operator===`=`)return n===e.value;if(e.operator===`!=`)return n!==e.value}if(e.type===`selected_package_condition`){let n=t.selectedPackageId??``;if(e.operator===`in`)return e.packages.includes(n);if(e.operator===`not in`)return!e.packages.includes(n)}if(e.type===`variable_condition`){let n=e.variable.replace(/^\$?custom\./,``),r=t.variables[n],i=e.value,a=String(typeof i==`object`&&i&&`value`in i?i.value:i);if(e.operator===`=`)return r===a;if(e.operator===`!=`)return r!==a}if(e.type===c2.StateCondition){let n=t.stateValues??{},r=t.stateDefaults??{},i=Object.hasOwn(n,e.name),a=Object.hasOwn(r,e.name);if(!i&&!a)return!1;let o=i?n[e.name]:r[e.name];if(typeof o!=typeof e.value)return!1;let s=Yfe(o,e.value);if(e.operator===`=`)return s;if(e.operator===`!=`)return!s}return!1};function Yfe(e,t){return typeof e==`string`&&typeof t==`string`||typeof e==`boolean`&&typeof t==`boolean`?e===t:typeof e==`number`&&typeof t==`number`?Math.abs(e-t)<zfe:!1}function d2(e,t,n){return t!==!1&&(e===`workflow`||e===`complete_workflow`)&&!n}function Xfe(e,t){GY(t,!0);let n=()=>R1(l,`$selectedPackageId`,r),[r,i]=B1(),a=V1(t,[`$$slots`,`$$events`,`$$legacy`]),{emitComponentInteraction:o,onButtonAction:s,hideBackButtons:c,selectedPackageId:l}=M0(),u=t2(),d=W(()=>({...a,...u2(u(),t.overrides)})),f=W(()=>Y(d).action),p=W(()=>Y(d).stack),m=i2(),{getLocalizedString:h}=s2(),g=E0(m?.isSatisfied??M1(!0)),_=()=>{switch(Y(f).type){case`workflow`:return{componentType:`button`,componentName:t.name,componentValue:`workflow`};case`complete_workflow`:{let e=h(Y(f).url.url_lid);return{componentType:`button`,componentName:t.name,componentValue:`navigate_to_url`,...e?{componentURL:e}:{}}}case`navigate_back`:return{componentType:`button`,componentName:t.name,componentValue:`navigate_back`};case`close_workflow`:return{componentType:`button`,componentName:t.name,componentValue:`close_workflow`};case`restore_purchases`:return{componentType:`button`,componentName:t.name,componentValue:`restore_purchases`}}switch(Y(f).destination){case`customer_center`:return{componentType:`button`,componentName:t.name,componentValue:`navigate_to_customer_center`};case`screen_redirect`:return{componentType:`button`,componentName:t.name,componentValue:`screen_redirect`};case`privacy_policy`:case`terms`:case`url`:{let e=h(Y(f).url.url_lid);return{componentType:`button`,componentName:t.name,componentValue:Y(f).destination===`privacy_policy`?`navigate_to_privacy_policy`:Y(f).destination===`terms`?`navigate_to_terms`:`navigate_to_url`,...e?{componentURL:e}:{}}}case`sheet`:throw Error(`Sheet actions must be handled by the sheet branches in onclick`);case`offer_code`:return{componentType:`button`,componentName:t.name,componentValue:`navigate_to_offer_code`};case`web_paywall_link`:return{componentType:`button`,componentName:t.name,componentValue:`navigate_to_web_paywall_link`}}},v=e=>({componentType:`package_selection_sheet`,componentName:e.sheet?.name??t.name,componentValue:`open`,currentPackageId:n()}),y=()=>{if(d2(Y(f).type,t.require_valid_inputs,g.current))return;let e=Y(f).type===`workflow`?t.id:void 0;if(Y(f).type===`navigate_to`&&Y(f).destination===`sheet`){Y(f).sheet!=null&&o(v(Y(f))),s(Y(f),e);return}o(_()),s(Y(f),e)},b=W(()=>{switch(Y(f).type){case`workflow`:return!0;case`complete_workflow`:return!0;case`restore_purchases`:return!1;case`navigate_back`:return!c;case`close_workflow`:return!0;case`navigate_to`:return Y(f).destination!==`web_paywall_link`;default:return!0}});var x=m$(),S=BZ(x),C=e=>{let n=W(()=>
45d2(Y(f).type,t.require_valid_inputs,g.current));{let t=W(()=>Y(n)?{opacity:`0.4`,"pointer-events":`none`,cursor:`not-allowed`}:void 0),r=W(()=>`button-${Y(f).type}`);h3(e,H1(()=>Y(p),{onclick:y,get style(){return Y(t)},get testId(){return Y(r)}}))}};Q(S,e=>{Y(b)&&e(C)}),Z(e,x),KY(),i()}var f2=1e3,p2=`light`,Zfe=`#000000`,m2={top:0,bottom:0,leading:0,trailing:0},h2,g2,Qfe=class{constructor(e,t){cJ(this,h2),cJ(this,g2),lJ(this,h2,e),lJ(this,g2,LX(t))}get current(){return U(this,g2).call(this),U(this,h2).call(this)}};h2=new WeakMap,g2=new WeakMap;var $fe=/\(.+\)/,epe=new Set([`all`,`print`,`screen`,`and`,`or`,`not`,`only`]),tpe=class extends Qfe{constructor(e,t){let n=$fe.test(e)||e.split(/[\s,]+/).some(e=>epe.has(e.trim()))?e:`(${e})`,r=window.matchMedia(n);super(()=>r.matches,e=>a$(r,`change`,e))}},_2=Symbol(`color-mode`);function npe(e){let t=new tpe(`prefers-color-scheme: dark`,(e?.()??p2)===`dark`),n=()=>e?.()??(t.current?`dark`:p2);return WY(_2,n),n}function v2(){return UY(_2)??(()=>p2)}var rpe;(function(e){e.body_s=`p`,e.body_m=`p`,e.body_l=`p`,e.body_xl=`p`,e.heading_xs=`h6`,e.heading_s=`h5`,e.heading_m=`h4`,e.heading_l=`h3`,e.heading_xl=`h2`,e.heading_xxl=`h1`})(rpe||={});var y2;(function(e){e[e.extra_light=100]=`extra_light`,e[e.thin=200]=`thin`,e[e.light=300]=`light`,e[e.regular=400]=`regular`,e[e.medium=500]=`medium`,e[e.semibold=600]=`semibold`,e[e.bold=700]=`bold`,e[e.extra_bold=800]=`extra_bold`,e[e.black=900]=`black`})(y2||={});var b2;(function(e){e.body_s=`13px`,e.body_m=`14px`,e.body_l=`15px`,e.body_xl=`16px`,e.heading_xs=`14px`,e.heading_s=`16px`,e.heading_m=`18px`,e.heading_l=`20px`,e.heading_xl=`26px`,e.heading_xxl=`32px`})(b2||={});var x2;(function(e){e.leading=`start`,e.center=`center`,e.trailing=`end`})(x2||={});var ipe;(function(e){e.vertical=`column`,e.horizontal=`row`,e.zlayer=`zstack`})(ipe||={});var ape;(function(e){e.top=`flex-start`,e.leading=`flex-start`,e.center=`center`,e.bottom=`flex-end`,e.trailing=`flex-end`})(ape||={});var ope;(function(e){e.space_between=`space-between`,e.space_around=`space-around`,e.space_evenly=`space-evenly`,e.start=`flex-start`,e.center=`center`,e.end=`flex-end`})(ope||={});function S2(e){return Object.entries(e).map(([e,t])=>`${e}:${t}`).join(`;`)}function C2(e){return`${e}px`}function w2(...e){return e.map(C2).join(` `)}function T2(e,t){return t[e]??t.light}function E2(e){switch(e.type){case`fill`:return navigator.userAgent.includes(`Firefox`)?`-moz-available`:`-webkit-fill-available`;case`fit`:return`fit-content`;case`fixed`:return C2(e.value);case`relative`:return`${e.value*100}%`}}function D2(e){let{top:t,bottom:n,leading:r,trailing:i}=e??m2;return w2(t,i,n,r)}function O2(e){if(e.type===`alias`||e.type===`hex`)return e.value;let t=e.points.map(e=>`${e.color} ${e.percent}%`).join(`, `);switch(e.type){case`linear`:return`linear-gradient(${e.degrees}deg, ${t})`;case`radial`:return`radial-gradient(circle, ${t})`}}function k2(e,t){return t==null?`transparent`:O2(T2(e,t))}function A2(e,t){return t==null?`transparent`:k2(e,t)}function j2(e,t){let n={"--rc-border-display":`none`,"--rc-border-bg":`transparent`,"--rc-border-width":`0px`};if(t==null)return{border:`none`,...n};let{width:r}=t,i=T2(e,t.color),a=O2(i);return i.type===`alias`||i.type===`hex`?{border:`${r}px solid ${a}`,...n}:{border:`${r}px solid transparent`,"--rc-border-display":`block`,"--rc-border-bg":a,"--rc-border-width":`${r}px`}}function spe(e){if(e==null)return`0`;let{top_leading:t,top_trailing:n,bottom_trailing:r,bottom_leading:i}=e;return w2(t,n,r,i)}function M2(e){switch(e?.type){case void 0:case`concave`:case`convex`:return`0`;case`rectangle`:return`${spe(e.corners)}`;case`circle`:case`pill`:return`9999px`}}function N2(e,t){if(t==null)return`none`;let{x:n,y:r,radius:i}=t;return`${n}px ${r}px ${i}px ${k2(e,t.color)}`}function P2(e){switch(e){case`fill`:return`cover`;case`fit`:return`contain`}}function cpe(e,t){let n=T2(e,t),r=String(n.url_low_res??``).trim();return{url:n.url,url_low_res:r.length>0?r:null}}function F2(e,t){let n=upe(t),r=cpe(e,t.value);return{url:r.url,url_low_res:r.url_low_res,fit:P2(n.fit_mode),position:n.fit_mode===`fill`?`center`:`top center`,overlay:A2(e,t.color_overlay),mute:n.mute_audio,loop:n.loop,posterWebp:n.fallback_image?T2(e,n.fallback_image).webp:null}}function lpe(e,t){return`url(${T2(e,t).webp})`}function upe(e){return{fit_mode:e.fit_mode??`fill`,mute_audio:e.mute_audio??!0,loop:e.loop??!0,fallback_image:e.fallback_image??null}}
45function dpe(e,t,n){return n==null?t==null?`none`:k2(e,t):n.type===`color`?k2(e,t??n.value):n.type===`image`?lpe(e,n.value):`transparent`}function fpe(e,t){let n=e?.components_config?.base?.background;if(n==null)return{kind:`none`};if(n.type===`video`){let e=F2(t,n);return{kind:`video`,url:e.url,url_low_res:e.url_low_res,fit:e.fit,position:e.position,overlay:e.overlay,mute:e.mute,loop:e.loop,posterWebp:e.posterWebp}}if(n.type!==`image`){let e=I2(t,null,n),r=e[`--overlay`]??`none`,i={...e};return delete i[`--overlay`],{kind:`style`,style:i,overlay:r}}return{kind:`image`,src:T2(t,n.value).webp,fit:P2(n.fit_mode),position:n.fit_mode===`fill`?`center`:`top center`,overlay:A2(t,n.color_overlay)}}function I2(e,t,n){if(n?.type===`video`)return{background:`transparent`,"--overlay":A2(e,n.color_overlay)};let r=dpe(e,t,n);if(n?.type!==`image`)return{background:r,"--overlay":`none`};let{fit_mode:i,color_overlay:a}=n;return{background:r,"background-size":P2(i),"background-position":i===`fill`?`center`:`top center`,"background-repeat":`no-repeat`,"--overlay":A2(e,a)}}function L2(e){return e.startsWith(`RCFM:`)}function R2(e){return`RevCatPaywall-${e}`}async function ppe(e){if(!e.app.fonts||typeof document>`u`)return;let t=[];for(let[n,r]of Object.entries(e.app.fonts)){let e=r.web;if(!e||!e.url||!e.family){console.warn(`[Font Registration] Skipping font ${n}: missing web config or required fields`);continue}try{let n=`${R2(e.family)}-${e.style}-${e.weight}`,r=new FontFace(n,`url(${e.url})`,{weight:e.weight?.toString()||`400`,style:e.style||`normal`});r.family=R2(e.family);let i=r.load().then(()=>{document.fonts.add(r),console.debug(`[Font Registration] Successfully registered font: ${n} (${e.family}, ${e.weight}, ${e.style})`)}).catch(t=>{console.warn(`[Font Registration] Failed to load font ${e.family}:`,t)});t.push(i)}catch(e){console.warn(`[Font Registration] Failed to create FontFace for ${n}:`,e)}}try{await Promise.allSettled(t),console.debug(`[Font Registration] Font registration complete. Processed ${t.length} fonts.`)}catch(e){console.warn(`[Font Registration] Unexpected error during font registration:`,e)}}function mpe(e){return e.charAt(0).toUpperCase()+e.slice(1).toLowerCase()}var hpe={uppercase:e=>String(e??``).toUpperCase(),lowercase:e=>String(e??``).toLowerCase(),capitalize:e=>String(e??``).replaceAll(RegExp(`(\\p{Letter}+)`,`giu`),mpe)},gpe=/^\$?custom\./;function _pe(e,t){return e.replace(/\{\{\s*([$a-z0-9._-]+)(?:\s*\|\s*([^}]*))?\s*\}\}/gi,(e,n,r)=>{let i=(n?.trim())?.replace(gpe,``),a=i&&t[i];if(a===void 0)return``;let o=r?.trim();if(o===void 0)return a;let s=hpe[o];return s?s(a):a})}function z2(e=``,t){return _pe(e,t??{})}var vpe={light:{type:`hex`,value:Zfe}};function B2(e,t){let n=T2(e,t),r=O2(n);switch(n.type){case`alias`:case`hex`:return{color:r};case`linear`:case`radial`:return{color:`transparent`,background:r,"-webkit-background-clip":`text`,"background-clip":`text`}}}var ype=(e,t,n)=>{let{font_name:r,font_size:i,font_weight:a,font_weight_int:o,horizontal_alignment:s,color:c=vpe,padding:l,margin:u,size:d}=t,f=n[r??``]?.web?.family;return S2({display:`block`,width:E2(d.width),height:E2(d.height),margin:D2(u),padding:D2(l),...B2(e,c),"text-align":x2[s]||x2.leading,"font-weight":o??y2[a]??y2.regular,"font-size":Number.isInteger(Number(i))?`${i}px`:b2[i]||b2.body_m,"font-family":L2(r??``)?R2(f??``):`sans-serif`})};function bpe(e,t,n,r){return S2({display:`block`,position:`relative`,width:E2(n.width),height:E2(n.height),...I2(e,r,null)})}var xpe={"&":`&`,"<":`<`,">":`>`,'"':`"`,"'":`'`};function Spe(e){return e.replace(/[&<>"']/g,e=>xpe[e])}var Cpe=[`http`,`https`,`mailto`,`tel`];function wpe(e){let t=Array.from(e).filter(e=>e.charCodeAt(0)>32).join(``).toLowerCase().match(/^([a-z][a-z0-9+.-]*):/);return t&&!Cpe.includes(t[1])?null:e}function Tpe(e){if(!e)return``;let t=Spe(e),n=[],r=t.replaceAll(/\\([\\`*_[\]{}()#+\-.!~])/g,(e,t)=>(n.push(t),`\0RC_ESCAPED_MARKDOWN_${n.length-1}\0`)),i=Object.values({newLine:{regexp:/\\\n/g,output:`<br/>`},bold:{regexp:/\*\*(.*?)\*\*/g,output:`<b>$1</b>`},italic:{regexp:/\*(.*?)\*/g,output:`<i>$1</i>`},strikethrough:{regexp:/~(.*?)~/g,output:`<s>$1</s>`}
45,code:{regexp:/`(.*?)`/g,output:`<span style='font-family: monospace'>$1</span>`},link:{regexp:/\[(.*?)\]\((.*?)\)/g,output:(e,t,n)=>{let r=wpe(n);return r===null?t:`<a href="${r}" target='_blank' rel='noopener noreferrer'>${t}</a>`}}}).reduce((e,{regexp:t,output:n})=>e.replaceAll(t,n),r);return n.reduce((e,t,n)=>e.replaceAll(`\0RC_ESCAPED_MARKDOWN_${n}\0`,t),i)}var Epe=X(`<div class="rc-gradient-border"><input class="svelte-ft2y3d"/></div>`),Dpe={hash:`svelte-ft2y3d`,code:`input.svelte-ft2y3d {width:100%;height:100%;border:none;background:transparent;border-radius:inherit;}input.svelte-ft2y3d:focus-visible {outline:none;}input.svelte-ft2y3d::placeholder {color:var(--placeholder-color);background:var(--placeholder-background);background-clip:var(--placeholder-background-clip);-webkit-background-clip:var(--placeholder-webkit-background-clip);text-align:var(--placeholder-text-align);font-weight:var(--placeholder-font-weight);font-size:var(--placeholder-font-size);font-family:var(--placeholder-font-family);}`};function Ope(e,t){GY(t,!0),J$(e,Dpe);let n=()=>R1(fe,`$variables`,r),[r,i]=B1(),a=V1(t,[`$$slots`,`$$events`,`$$legacy`]),o=CZ(!1),s=CZ(!1),c=CZ(!t.required),l=t2({state:!0}),u=W(()=>({...a,...u2(l({focus:Y(o),error:Y(s)}),t.overrides)})),d=W(()=>Y(u).placeholder_lid),f=W(()=>Y(u).keyboard_type),p=W(()=>Y(u).capitalize),m=W(()=>Y(u).field_id),h=W(()=>Y(u).reserved_attribute),g=W(()=>Y(u).required),_=W(()=>Y(u).size),v=W(()=>Y(u).padding),y=W(()=>Y(u).margin),b=W(()=>Y(u).vertical_alignment),x=W(()=>Y(u).border),S=W(()=>Y(u).shape),C=W(()=>Y(u).shadow),w=W(()=>Y(u).font_name),T=W(()=>Y(u).font_weight_int),E=W(()=>Y(u).font_size),D=W(()=>Y(u).horizontal_alignment),O=W(()=>Y(u).color),k=W(()=>Y(u).placeholder_font_name),A=W(()=>Y(u).placeholder_font_weight_int),j=W(()=>Y(u).placeholder_font_size),M=W(()=>Y(u).placeholder_horizontal_alignment),N=W(()=>Y(u).placeholder_color),P=W(()=>Y(u).background_color),F=W(()=>Y(u).visible);function ee(e){let t=e.value.trim();if(Y(f)===`password`){se?.(Y(m),t);return}Y(h)?ce?ce(Y(h),t):console.error(`onReservedAttributeChanged is not set`):oe?.(Y(m),t)}function I(e){G(s,!e.validity.valid),!Y(s)&&ee(e)}let te=e=>{let t=e.currentTarget;G(c,t.validity.valid,!0),Y(c)&&ee(t),Y(s)&&I(t)},ne=e=>{G(o,!1),G(c,e.currentTarget.validity.valid,!0),I(e.currentTarget)},re=i2(),ie=W(v2()),{uiConfig:ae,onInputChanged:oe,onSensitiveInputChanged:se,onReservedAttributeChanged:ce}=M0(),le=W(()=>Y(b)===`top`?`flex-start`:Y(b)===`bottom`?`flex-end`:null),ue=W(()=>S2({display:`flex`,...Y(le)?{"align-items":Y(le)}:{},width:E2(Y(_).width),height:E2(Y(_).height),margin:D2(Y(y)),...I2(Y(ie),Y(P),null),...j2(Y(ie),Y(x)),"border-radius":M2(Y(S)),"box-shadow":N2(Y(ie),Y(C))})),de=W(()=>{let e=ae.app.fonts[Y(w)??``]?.web?.family,t=ae.app.fonts[Y(k)??``]?.web?.family,n=B2(Y(ie),Y(N));return S2({...Y(le)?{height:`auto`}:{},padding:D2(Y(v)),...B2(Y(ie),Y(O)),"text-align":x2[Y(D)]||x2.leading,"font-weight":Y(T)??y2.regular,"font-size":`${Y(E)}px`,"font-family":L2(Y(w)??``)?R2(e??``):`sans-serif`,"--placeholder-color":n.color,"--placeholder-background":n.background,"--placeholder-background-clip":n[`background-clip`],"--placeholder-webkit-background-clip":n[`-webkit-background-clip`],"--placeholder-text-align":x2[Y(M)]||x2.leading,"--placeholder-font-weight":Y(A)??y2.regular,"--placeholder-font-size":`${Y(j)}px`,"--placeholder-font-family":L2(Y(k)??``)?R2(t??``):`sans-serif`})}),fe=e2(),{getLocalizedString:L}=s2(),pe=W(()=>z2(L(Y(d)),n())),me=W(()=>{switch(t.keyboard_type){case`decimal`:case`numeric`:return`number`;case`email`:return`email`;case`password`:return`password`;case`tel`:return`tel`;case`text`:return`text`;case`url`:return`url`}}),he=W(()=>Y(f)===`password`?`text`:Y(f)),ge=W(()=>Y(F)!==!1);re&&$Z(()=>{re.updateSatisfaction(!Y(ge)||Y(c))});var _e=m$(),ve=BZ(_e),ye=e=>{var t=Epe(),n=K(t);n.__input=te,J(()=>{n1(t,Y(ue)),l1(n,`type`,Y(me)),l1(n,`placeholder`,Y(pe)),n.required=Y(g),l1(n,`inputmode`,Y(he)),l1(n,`autocapitalize`,Y(p)),n1(n,Y(de))}),o$(`focus`,n,()=>G(o,!0)),o$(`blur`,n,ne),Z(e,t)};Q(ve,e=>{Y(ge)&&e(ye)}),Z(e,_e),KY(),i()}s$([`input`]);var V2=Symbol(`inputChoice`);function H2(e,t,n=!1,r=null,i=[]){let a=N1(new Set(i)),o=P1(a,e=>r?.max==null?!1:e.size>=r.max),s=P1(a,e=>{let t=e.size;return!n&&r==null?!0:n&&r==null?t>=1:n&&r!=null?r.min===r.max?t===r.min:t>=r.min&&t<=r.max:!0}),c=!1;return o.subscribe(e=>c=e),{fieldId:e,mode:t,required:n,selectionRange:r,selectedOptionIds:a,selectOption:e=>{a.update(n=>{if(t===`single`)return new Set([e]);let r=new Set(n);return r.has(e)?r.delete(e):c||r.add(e),r})},isAtMax:o,isSatisfied:s}}function U2(e){WY(V2,e)}function kpe(){return UY(V2)}function Ape(e,t){GY(t,!0);let{stack:n,field_id:r,required:i=!1,selection_range:a=null}=V1(t,[`$$slots`,`$$events`,`$$legacy`]),o=H2(r,`multiple`,i,a,a2()[r]??[]);U2(o);let s=i2();
45s&&M$(o.isSatisfied.subscribe(e=>{s.updateSatisfaction(e)})),m3(e,{get nodeData(){return n}}),KY()}var jpe=X(`<div class="option-wrapper svelte-7dwsc9"><!></div>`),Mpe={hash:`svelte-7dwsc9`,code:`.option-wrapper.svelte-7dwsc9 {display:contents;}`};function Npe(e,t){GY(t,!0),J$(e,Mpe);let n=()=>R1(d,`$isDisabled`,r),[r,i]=B1(),{stack:a,option_id:o}=V1(t,[`$$slots`,`$$events`,`$$legacy`]),{onButtonAction:s,onInputChanged:c}=M0(),l=kpe(),u=l?P1(l.selectedOptionIds,e=>e.has(o)):M1(!1);P0(u);let d=l?P1([u,l.isAtMax],([e,t])=>!e&&t):M1(!1),f=N1(!1);Mfe(f);let p=()=>f.set(!0),m=()=>f.set(!1),h=()=>{if(n())return;let e=t.triggers?.on_press;l?.selectOption(o);let r=l?.fieldId;r&&c?.(r,o,e),s({type:`workflow`},e)},g=W(()=>n()?{"pointer-events":`none`,opacity:`0.4`}:void 0);var _=jpe();h3(K(_),H1(()=>a,{onclick:h,get style(){return Y(g)}})),o$(`mouseenter`,_,p),o$(`mouseleave`,_,m),Z(e,_),KY(),i()}function Ppe(e,t){GY(t,!0);let{stack:n,field_id:r,required:i=!1,selection_range:a=null}=V1(t,[`$$slots`,`$$events`,`$$legacy`]),o=H2(r,`single`,i,a,a2()[r]??[]);U2(o);let s=i2();s&&M$(o.isSatisfied.subscribe(e=>{s.updateSatisfaction(e)})),m3(e,{get nodeData(){return n}}),KY()}function Fpe(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,`default`)?e.default:e}var W2={},G2,K2;function Ipe(){return K2||(K2=1,G2=function(){return typeof Promise==`function`&&Promise.prototype&&Promise.prototype.then}),G2}var q2={},J2={},Y2;function X2(){if(Y2)return J2;Y2=1;let e,t=[0,26,44,70,100,134,172,196,242,292,346,404,466,532,581,655,733,815,901,991,1085,1156,1258,1364,1474,1588,1706,1828,1921,2051,2185,2323,2465,2611,2761,2876,3034,3196,3362,3532,3706];return J2.getSymbolSize=function(e){if(!e)throw Error(`"version" cannot be null or undefined`);if(e<1||e>40)throw Error(`"version" should be in range from 1 to 40`);return e*4+17},J2.getSymbolTotalCodewords=function(e){return t[e]},J2.getBCHDigit=function(e){let t=0;for(;e!==0;)t++,e>>>=1;return t},J2.setToSJISFunction=function(t){if(typeof t!=`function`)throw Error(`"toSJISFunc" is not a valid function.`);e=t},J2.isKanjiModeEnabled=function(){return typeof e<`u`},J2.toSJIS=function(t){return e(t)},J2}var Z2={},Q2;function $2(){return Q2||(Q2=1,function(e){e.L={bit:1},e.M={bit:0},e.Q={bit:3},e.H={bit:2};function t(t){if(typeof t!=`string`)throw Error(`Param is not a string`);switch(t.toLowerCase()){case`l`:case`low`:return e.L;case`m`:case`medium`:return e.M;case`q`:case`quartile`:return e.Q;case`h`:case`high`:return e.H;default:throw Error(`Unknown EC Level: `+t)}}e.isValid=function(e){return e&&typeof e.bit<`u`&&e.bit>=0&&e.bit<4},e.from=function(n,r){if(e.isValid(n))return n;try{return t(n)}catch{return r}}}(Z2)),Z2}var e4,t4;function Lpe(){if(t4)return e4;t4=1;function e(){this.buffer=[],this.length=0}return e.prototype={get:function(e){let t=Math.floor(e/8);return(this.buffer[t]>>>7-e%8&1)==1},put:function(e,t){for(let n=0;n<t;n++)this.putBit((e>>>t-n-1&1)==1)},getLengthInBits:function(){return this.length},putBit:function(e){let t=Math.floor(this.length/8);this.buffer.length<=t&&this.buffer.push(0),e&&(this.buffer[t]|=128>>>this.length%8),this.length++}},e4=e,e4}var n4,r4;function Rpe(){if(r4)return n4;r4=1;function e(e){if(!e||e<1)throw Error(`BitMatrix size must be defined and greater than 0`);this.size=e,this.data=new Uint8Array(e*e),this.reservedBit=new Uint8Array(e*e)}return e.prototype.set=function(e,t,n,r){let i=e*this.size+t;this.data[i]=n,r&&(this.reservedBit[i]=!0)},e.prototype.get=function(e,t){return this.data[e*this.size+t]},e.prototype.xor=function(e,t,n){this.data[e*this.size+t]^=n},e.prototype.isReserved=function(e,t){return this.reservedBit[e*this.size+t]},n4=e,n4}var i4={},a4;function zpe(){return a4||(a4=1,function(e){let t=X2().getSymbolSize;e.getRowColCoords=function(e){if(e===1)return[];let n=Math.floor(e/7)+2,r=t(e),i=r===145?26:Math.ceil((r-13)/(2*n-2))*2,a=[r-7];for(let e=1;e<n-1;e++)a[e]=a[e-1]-i;return a.push(6),a.reverse()},e.getPositions=function(t){let n=[],r=e.getRowColCoords(t),i=r.length;for(let e=0;e<i;e++)for(let t=0;t<i;t++)e===0&&t===0||e===0&&t===i-1||e===i-1&&t===0||n.push([r[e],r[t]]);return n}}(i4)),i4}var o4={},s4;function Bpe(){if(s4)return o4;s4=1;let e=X2().getSymbolSize;return o4.getPositions=function(t){let n=e(t);return[[0,0],[n-7,0],[0,n-7]]},o4}var c4={},l4;function Vpe(){return l4||(l4=1,function(e){e.Patterns={PATTERN000:0,PATTERN001:1,PATTERN010:2,PATTERN011:3,PATTERN100:4,PATTERN101:5,PATTERN110:6,PATTERN111:7};let t={N1:3,N2:3,N3:40,N4:10};e.isValid=function(e){return e!=null&&e!==``&&!isNaN(e)&&e>=0&&e<=7},e.from=function(t){return e.isValid(t)?parseInt(t,10):void 0},e.getPenaltyN1=function(e){let n=e.size,r=0,i=0,a=0,o=null,s=null;for(let c=0;c<n;c++){i=a=0,o=s=null;for(let l=0;l<n;l++){let n=e.get(c,l);n===o?i++:(i>=5&&(r+=t.N1+(i-5)),o=n,i=1),n=e.get(l,c),n===s?a++:(a>=5&&(r+=t.N1+(a-5)),s=n,a=1)}i>=5&&(r+=t.N1+(i-5)),a>=5&&(r+=t.N1+(a-5))}return r},e.getPenaltyN2=function(e){let n=e.size,r=0;for(let t=0;t<n-1;t++)for(let i=0;i<n-1;i++){let n=e.get(t,i)+e.get(t,i+1)+e.get(t+1,i)+e.get(t+1,i+1);(n===4||n===0)&&r++}return r*t.N2},e.getPenaltyN3=function(e){let n=e.size,r=0,i=0,a=0;for(let t=0;t<n;t++){i=a=0;for(let o=0;o<n;o++)i=i<<1&2047|e.get(t,o),o>=10&&(i===1488||i===93)&&r++,a=a<<1&2047|e.get(o,t),o>=10&&(a===1488||a===93)&&r++}return r*t.N3},e.getPenaltyN4=function(e){let n=0,r=e.data.length;for(let t=0;t<r;t++)n+=e.data[t];
45return Math.abs(Math.ceil(n*100/r/5)-10)*t.N4};function n(t,n,r){switch(t){case e.Patterns.PATTERN000:return(n+r)%2==0;case e.Patterns.PATTERN001:return n%2==0;case e.Patterns.PATTERN010:return r%3==0;case e.Patterns.PATTERN011:return(n+r)%3==0;case e.Patterns.PATTERN100:return(Math.floor(n/2)+Math.floor(r/3))%2==0;case e.Patterns.PATTERN101:return n*r%2+n*r%3==0;case e.Patterns.PATTERN110:return(n*r%2+n*r%3)%2==0;case e.Patterns.PATTERN111:return(n*r%3+(n+r)%2)%2==0;default:throw Error(`bad maskPattern:`+t)}}e.applyMask=function(e,t){let r=t.size;for(let i=0;i<r;i++)for(let a=0;a<r;a++)t.isReserved(a,i)||t.xor(a,i,n(e,a,i))},e.getBestMask=function(t,n){let r=Object.keys(e.Patterns).length,i=0,a=1/0;for(let o=0;o<r;o++){n(o),e.applyMask(o,t);let r=e.getPenaltyN1(t)+e.getPenaltyN2(t)+e.getPenaltyN3(t)+e.getPenaltyN4(t);e.applyMask(o,t),r<a&&(a=r,i=o)}return i}}(c4)),c4}var u4={},d4;function f4(){if(d4)return u4;d4=1;let e=$2(),t=[1,1,1,1,1,1,1,1,1,1,2,2,1,2,2,4,1,2,4,4,2,4,4,4,2,4,6,5,2,4,6,6,2,5,8,8,4,5,8,8,4,5,8,11,4,8,10,11,4,9,12,16,4,9,16,16,6,10,12,18,6,10,17,16,6,11,16,19,6,13,18,21,7,14,21,25,8,16,20,25,8,17,23,25,9,17,23,34,9,18,25,30,10,20,27,32,12,21,29,35,12,23,34,37,12,25,34,40,13,26,35,42,14,28,38,45,15,29,40,48,16,31,43,51,17,33,45,54,18,35,48,57,19,37,51,60,19,38,53,63,20,40,56,66,21,43,59,70,22,45,62,74,24,47,65,77,25,49,68,81],n=[7,10,13,17,10,16,22,28,15,26,36,44,20,36,52,64,26,48,72,88,36,64,96,112,40,72,108,130,48,88,132,156,60,110,160,192,72,130,192,224,80,150,224,264,96,176,260,308,104,198,288,352,120,216,320,384,132,240,360,432,144,280,408,480,168,308,448,532,180,338,504,588,196,364,546,650,224,416,600,700,224,442,644,750,252,476,690,816,270,504,750,900,300,560,810,960,312,588,870,1050,336,644,952,1110,360,700,1020,1200,390,728,1050,1260,420,784,1140,1350,450,812,1200,1440,480,868,1290,1530,510,924,1350,1620,540,980,1440,1710,570,1036,1530,1800,570,1064,1590,1890,600,1120,1680,1980,630,1204,1770,2100,660,1260,1860,2220,720,1316,1950,2310,750,1372,2040,2430];return u4.getBlocksCount=function(n,r){switch(r){case e.L:return t[(n-1)*4+0];case e.M:return t[(n-1)*4+1];case e.Q:return t[(n-1)*4+2];case e.H:return t[(n-1)*4+3];default:return}},u4.getTotalCodewordsCount=function(t,r){switch(r){case e.L:return n[(t-1)*4+0];case e.M:return n[(t-1)*4+1];case e.Q:return n[(t-1)*4+2];case e.H:return n[(t-1)*4+3];default:return}},u4}var p4={},m4={},h4;function Hpe(){if(h4)return m4;h4=1;let e=new Uint8Array(512),t=new Uint8Array(256);return function(){let n=1;for(let r=0;r<255;r++)e[r]=n,t[n]=r,n<<=1,n&256&&(n^=285);for(let t=255;t<512;t++)e[t]=e[t-255]}(),m4.log=function(e){if(e<1)throw Error(`log(`+e+`)`);return t[e]},m4.exp=function(t){return e[t]},m4.mul=function(n,r){return n===0||r===0?0:e[t[n]+t[r]]},m4}var g4;function Upe(){return g4||(g4=1,function(e){let t=Hpe();e.mul=function(e,n){let r=new Uint8Array(e.length+n.length-1);for(let i=0;i<e.length;i++)for(let a=0;a<n.length;a++)r[i+a]^=t.mul(e[i],n[a]);return r},e.mod=function(e,n){let r=new Uint8Array(e);for(;r.length-n.length>=0;){let e=r[0];for(let i=0;i<n.length;i++)r[i]^=t.mul(n[i],e);let i=0;for(;i<r.length&&r[i]===0;)i++;r=r.slice(i)}return r},e.generateECPolynomial=function(n){let r=new Uint8Array([1]);for(let i=0;i<n;i++)r=e.mul(r,new Uint8Array([1,t.exp(i)]));return r}}(p4)),p4}var _4,v4;function Wpe(){if(v4)return _4;v4=1;let e=Upe();function t(e){this.genPoly=void 0,this.degree=e,this.degree&&this.initialize(this.degree)}return t.prototype.initialize=function(t){this.degree=t,this.genPoly=e.generateECPolynomial(this.degree)},t.prototype.encode=function(t){if(!this.genPoly)throw Error(`Encoder not initialized`);let n=new Uint8Array(t.length+this.degree);n.set(t);let r=e.mod(n,this.genPoly),i=this.degree-r.length;if(i>0){let e=new Uint8Array(this.degree);return e.set(r,i),e}return r},_4=t,_4}var y4={},b4={},x4={},S4;function C4(){return S4||(S4=1,x4.isValid=function(e){return!isNaN(e)&&e>=1&&e<=40}),x4}var w4={},T4;function E4(){if(T4)return w4;T4=1;let e=`[0-9]+`,t=`(?:[u3000-u303F]|[u3040-u309F]|[u30A0-u30FF]|[uFF00-uFFEF]|[u4E00-u9FAF]|[u2605-u2606]|[u2190-u2195]|u203B|[u2010u2015u2018u2019u2025u2026u201Cu201Du2225u2260]|[u0391-u0451]|[u00A7u00A8u00B1u00B4u00D7u00F7])+`;t=t.replace(/u/g,`\\u`);let n=`(?:(?![A-Z0-9 $%*+\\-./:]|`+t+`)(?:.|[\r 46]))+`;w4.KANJI=new RegExp(t,`g`),w4.BYTE_KANJI=RegExp(`[^A-Z0-9 $%*+\\-./:]+`,`g`),w4.BYTE=new RegExp(n,`g`),w4.NUMERIC=new RegExp(e,`g`),w4.ALPHANUMERIC=RegExp(`[A-Z $%*+\\-./:]+`,`g`);let r=RegExp(`^`+t+`$`),i=RegExp(`^`+e+`$`),a=RegExp(`^[A-Z0-9 $%*+\\-./:]+$`);return w4.testKanji=function(e){return r.test(e)},w4.testNumeric=function(e){return i.test(e)},w4.testAlphanumeric=function(e){return a.test(e)},w4}var D4;function O4(){return D4||(D4=1,function(e){let t=C4(),n=E4();e.NUMERIC={id:`Numeric`,bit:1,ccBits:[10,12,14]},e.ALPHANUMERIC={id:`Alphanumeric`,bit:2,ccBits:[9,11,13]},e.BYTE={id:`Byte`,bit:4,ccBits:[8,16,16]},e.KANJI={id:`Kanji`,bit:8,ccBits:[8,10,12]},e.MIXED={bit:-1},e.getCharCountIndicator=function(e,n){if(!e.ccBits)throw Error(`Invalid mode: `+e);if(!t.isValid(n))throw Error(`Invalid version: `+n);return n>=1&&n<10?e.ccBits[0]:n<27?e.ccBits[1]:e.ccBits[2]},e.getBestModeForData=function(t){return n.testNumeric(t)?e.NUMERIC:n.testAlphanumeric(t)?e.ALPHANUMERIC:n.testKanji(t)?e.KANJI:e.BYTE},e.toString=function(e){if(e&&e.id)return e.id;throw Error(`Invalid mode`)},e.isValid=function(e){return e&&e.bit&&e.ccBits};function r(t){if(typeof t!=`string`)throw Error(`Param is not a string`);switch(t.toLowerCase()){case`numeric`:return e.NUMERIC;case`alphanumeric`:return e.ALPHANUMERIC;case`kanji`:return e.KANJI;case`byte`:return e.BYTE;default:throw Error(`Unknown mode: `+t)}}e.from=function(t,n){if(e.isValid(t))return t;try{return r(t)}catch{return n}}}(b4)),b4}var k4;function Gpe(){return k4||(k4=1,function(e){let t=X2(),n=f4(),r=$2(),i=O4(),a=C4(),o=7973,s=t.getBCHDigit
46(o);function c(t,n,r){for(let i=1;i<=40;i++)if(n<=e.getCapacity(i,r,t))return i}function l(e,t){return i.getCharCountIndicator(e,t)+4}function u(e,t){let n=0;return e.forEach(function(e){let r=l(e.mode,t);n+=r+e.getBitsLength()}),n}function d(t,n){for(let r=1;r<=40;r++)if(u(t,r)<=e.getCapacity(r,n,i.MIXED))return r}e.from=function(e,t){return a.isValid(e)?parseInt(e,10):t},e.getCapacity=function(e,r,o){if(!a.isValid(e))throw Error(`Invalid QR Code version`);typeof o>`u`&&(o=i.BYTE);let s=(t.getSymbolTotalCodewords(e)-n.getTotalCodewordsCount(e,r))*8;if(o===i.MIXED)return s;let c=s-l(o,e);switch(o){case i.NUMERIC:return Math.floor(c/10*3);case i.ALPHANUMERIC:return Math.floor(c/11*2);case i.KANJI:return Math.floor(c/13);case i.BYTE:default:return Math.floor(c/8)}},e.getBestVersionForData=function(e,t){let n,i=r.from(t,r.M);if(Array.isArray(e)){if(e.length>1)return d(e,i);if(e.length===0)return 1;n=e[0]}else n=e;return c(n.mode,n.getLength(),i)},e.getEncodedBits=function(e){if(!a.isValid(e)||e<7)throw Error(`Invalid QR Code version`);let n=e<<12;for(;t.getBCHDigit(n)-s>=0;)n^=o<<t.getBCHDigit(n)-s;return e<<12|n}}(y4)),y4}var A4={},j4;function Kpe(){if(j4)return A4;j4=1;let e=X2(),t=1335,n=e.getBCHDigit(t);return A4.getEncodedBits=function(r,i){let a=r.bit<<3|i,o=a<<10;for(;e.getBCHDigit(o)-n>=0;)o^=t<<e.getBCHDigit(o)-n;return(a<<10|o)^21522},A4}var M4={},N4,P4;function qpe(){if(P4)return N4;P4=1;let e=O4();function t(t){this.mode=e.NUMERIC,this.data=t.toString()}return t.getBitsLength=function(e){return 10*Math.floor(e/3)+(e%3?e%3*3+1:0)},t.prototype.getLength=function(){return this.data.length},t.prototype.getBitsLength=function(){return t.getBitsLength(this.data.length)},t.prototype.write=function(e){let t,n,r;for(t=0;t+3<=this.data.length;t+=3)n=this.data.substr(t,3),r=parseInt(n,10),e.put(r,10);let i=this.data.length-t;i>0&&(n=this.data.substr(t),r=parseInt(n,10),e.put(r,i*3+1))},N4=t,N4}var F4,I4;function Jpe(){if(I4)return F4;I4=1;let e=O4(),t=`0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ $%*+-./:`.split(``);function n(t){this.mode=e.ALPHANUMERIC,this.data=t}return n.getBitsLength=function(e){return 11*Math.floor(e/2)+e%2*6},n.prototype.getLength=function(){return this.data.length},n.prototype.getBitsLength=function(){return n.getBitsLength(this.data.length)},n.prototype.write=function(e){let n;for(n=0;n+2<=this.data.length;n+=2){let r=t.indexOf(this.data[n])*45;r+=t.indexOf(this.data[n+1]),e.put(r,11)}this.data.length%2&&e.put(t.indexOf(this.data[n]),6)},F4=n,F4}var L4,R4;function Ype(){if(R4)return L4;R4=1;let e=O4();function t(t){this.mode=e.BYTE,typeof t==`string`?this.data=new TextEncoder().encode(t):this.data=new Uint8Array(t)}return t.getBitsLength=function(e){return e*8},t.prototype.getLength=function(){return this.data.length},t.prototype.getBitsLength=function(){return t.getBitsLength(this.data.length)},t.prototype.write=function(e){for(let t=0,n=this.data.length;t<n;t++)e.put(this.data[t],8)},L4=t,L4}var z4,B4;function Xpe(){if(B4)return z4;B4=1;let e=O4(),t=X2();function n(t){this.mode=e.KANJI,this.data=t}return n.getBitsLength=function(e){return e*13},n.prototype.getLength=function(){return this.data.length},n.prototype.getBitsLength=function(){return n.getBitsLength(this.data.length)},n.prototype.write=function(e){let n;for(n=0;n<this.data.length;n++){let r=t.toSJIS(this.data[n]);if(r>=33088&&r<=40956)r-=33088;else if(r>=57408&&r<=60351)r-=49472;else throw Error(`Invalid SJIS character: `+this.data[n]+` 47Make sure your charset is UTF-8`);r=(r>>>8&255)*192+(r&255),e.put(r,13)}},z4=n,z4}var V4={exports:{}},H4;function Zpe(){return H4||(H4=1,function(e){var t={single_source_shortest_paths:function(e,n,r){var i={},a={};a[n]=0;var o=t.PriorityQueue.make();o.push(n,0);for(var s,c,l,u,d,f,p,m,h;!o.empty();)for(l in s=o.pop(),c=s.value,u=s.cost,d=e[c]||{},d)d.hasOwnProperty(l)&&(f=d[l],p=u+f,m=a[l],h=typeof a[l]>`u`,(h||m>p)&&(a[l]=p,o.push(l,p),i[l]=c));if(typeof r<`u`&&typeof a[r]>`u`){var g=[`Could not find a path from `,n,` to `,r,`.`].join(``);throw Error(g)}return i},extract_shortest_path_from_predecessor_list:function(e,t){for(var n=[],r=t;r;)n.push(r),e[r],r=e[r];return n.reverse(),n},find_path:function(e,n,r){var i=t.single_source_shortest_paths(e,n,r);return t.extract_shortest_path_from_predecessor_list(i,r)},PriorityQueue:{make:function(e){var n=t.PriorityQueue,r={},i;for(i in e||={},n)n.hasOwnProperty(i)&&(r[i]=n[i]);return r.queue=[],r.sorter=e.sorter||n.default_sorter,r},default_sorter:function(e,t){return e.cost-t.cost},push:function(e,t){var n={value:e,cost:t};this.queue.push(n),this.queue.sort(this.sorter)},pop:function(){return this.queue.shift()},empty:function(){return this.queue.length===0}}};e.exports=t}(V4)),V4.exports}var U4;function Qpe(){return U4||(U4=1,function(e){let t=O4(),n=qpe(),r=Jpe(),i=Ype(),a=Xpe(),o=E4(),s=X2(),c=Zpe();function l(e){return unescape(encodeURIComponent(e)).length}function u(e,t,n){let r=[],i;for(;(i=e.exec(n))!==null;)r.push({data:i[0],index:i.index,mode:t,length:i[0].length});return r}function d(e){let n=u(o.NUMERIC,t.NUMERIC,e),r=u(o.ALPHANUMERIC,t.ALPHANUMERIC,e),i,a;return s.isKanjiModeEnabled()?(i=u(o.BYTE,t.BYTE,e),a=u(o.KANJI,t.KANJI,e)):(i=u(o.BYTE_KANJI,t.BYTE,e),a=[]),n.concat(r,i,a).sort(function(e,t){return e.index-t.index}).map(function(e){return{data:e.data,mode:e.mode,length:e.length}})}function f(e,o){switch(o){case t.NUMERIC:return n.getBitsLength(e);case t.ALPHANUMERIC:return r.getBitsLength(e);case t.KANJI:return a.getBitsLength(e);case t.BYTE:return i.getBitsLength(e)}}function p(e){return e.reduce(function(e,t){let n=e.length-1>=0?e[e.length-1]:null;return n&&n.mode===t.mode?(e[e.length-1].data+=t.data,e):(e.push(t),e)},[])}function m(e){let n=[];for(let r=0;r<e.length;r++){let i=e[r];switch(i.mode){case t.NUMERIC:n.push([i,{data:i.data,mode:t.ALPHANUMERIC,length:i.length},{data:i.data,mode:t.BYTE,length:i.length}]);break;case t.ALPHANUMERIC:n.push([i,{data:i.data,mode:t.BYTE,length:i.length}]);break;case t.KANJI:n.push([i,{data:i.data,mode:t.BYTE,length:l(i.data)}]);break;case t.BYTE:n.push([{data:i.data,mode:t.BYTE,length:l(i.data)}])}}return n}function h(e,n){let r={},i={start:{}},a=[`start`];for(let o=0;o<e.length;o++){let s=e[o],c=[];for(let e=0;e<s.length;e++){let l=s[e],u=``+o+e;
vendor: 5,141 bytes, lines 47-51
47c.push(u),r[u]={node:l,lastCount:0},i[u]={};for(let e=0;e<a.length;e++){let o=a[e];r[o]&&r[o].node.mode===l.mode?(i[o][u]=f(r[o].lastCount+l.length,l.mode)-f(r[o].lastCount,l.mode),r[o].lastCount+=l.length):(r[o]&&(r[o].lastCount=l.length),i[o][u]=f(l.length,l.mode)+4+t.getCharCountIndicator(l.mode,n))}}a=c}for(let e=0;e<a.length;e++)i[a[e]].end=0;return{map:i,table:r}}function g(e,o){let c,l=t.getBestModeForData(e);if(c=t.from(o,l),c!==t.BYTE&&c.bit<l.bit)throw Error(`"`+e+`" cannot be encoded with mode `+t.toString(c)+`. 48 Suggested mode is: `+t.toString(l));switch(c===t.KANJI&&!s.isKanjiModeEnabled()&&(c=t.BYTE),c){case t.NUMERIC:return new n(e);case t.ALPHANUMERIC:return new r(e);case t.KANJI:return new a(e);case t.BYTE:return new i(e)}}e.fromArray=function(e){return e.reduce(function(e,t){return typeof t==`string`?e.push(g(t,null)):t.data&&e.push(g(t.data,t.mode)),e},[])},e.fromString=function(t,n){let r=h(m(d(t,s.isKanjiModeEnabled())),n),i=c.find_path(r.map,`start`,`end`),a=[];for(let e=1;e<i.length-1;e++)a.push(r.table[i[e]].node);return e.fromArray(p(a))},e.rawSplit=function(t){return e.fromArray(d(t,s.isKanjiModeEnabled()))}}(M4)),M4}var W4;function $pe(){if(W4)return q2;W4=1;let e=X2(),t=$2(),n=Lpe(),r=Rpe(),i=zpe(),a=Bpe(),o=Vpe(),s=f4(),c=Wpe(),l=Gpe(),u=Kpe(),d=O4(),f=Qpe();function p(e,t){let n=e.size,r=a.getPositions(t);for(let t=0;t<r.length;t++){let i=r[t][0],a=r[t][1];for(let t=-1;t<=7;t++)if(!(i+t<=-1||n<=i+t))for(let r=-1;r<=7;r++)a+r<=-1||n<=a+r||(t>=0&&t<=6&&(r===0||r===6)||r>=0&&r<=6&&(t===0||t===6)||t>=2&&t<=4&&r>=2&&r<=4?e.set(i+t,a+r,!0,!0):e.set(i+t,a+r,!1,!0))}}function m(e){let t=e.size;for(let n=8;n<t-8;n++){let t=n%2==0;e.set(n,6,t,!0),e.set(6,n,t,!0)}}function h(e,t){let n=i.getPositions(t);for(let t=0;t<n.length;t++){let r=n[t][0],i=n[t][1];for(let t=-2;t<=2;t++)for(let n=-2;n<=2;n++)t===-2||t===2||n===-2||n===2||t===0&&n===0?e.set(r+t,i+n,!0,!0):e.set(r+t,i+n,!1,!0)}}function g(e,t){let n=e.size,r=l.getEncodedBits(t),i,a,o;for(let t=0;t<18;t++)i=Math.floor(t/3),a=t%3+n-8-3,o=(r>>t&1)==1,e.set(i,a,o,!0),e.set(a,i,o,!0)}function _(e,t,n){let r=e.size,i=u.getEncodedBits(t,n),a,o;for(a=0;a<15;a++)o=(i>>a&1)==1,a<6?e.set(a,8,o,!0):a<8?e.set(a+1,8,o,!0):e.set(r-15+a,8,o,!0),a<8?e.set(8,r-a-1,o,!0):a<9?e.set(8,15-a-1+1,o,!0):e.set(8,15-a-1,o,!0);e.set(r-8,8,1,!0)}function v(e,t){let n=e.size,r=-1,i=n-1,a=7,o=0;for(let s=n-1;s>0;s-=2)for(s===6&&s--;;){for(let n=0;n<2;n++)if(!e.isReserved(i,s-n)){let r=!1;o<t.length&&(r=(t[o]>>>a&1)==1),e.set(i,s-n,r),a--,a===-1&&(o++,a=7)}if(i+=r,i<0||n<=i){i-=r,r=-r;break}}}function y(t,r,i){let a=new n;i.forEach(function(e){a.put(e.mode.bit,4),a.put(e.getLength(),d.getCharCountIndicator(e.mode,t)),e.write(a)});let o=(e.getSymbolTotalCodewords(t)-s.getTotalCodewordsCount(t,r))*8;for(a.getLengthInBits()+4<=o&&a.put(0,4);a.getLengthInBits()%8!=0;)a.putBit(0);let c=(o-a.getLengthInBits())/8;for(let e=0;e<c;e++)a.put(e%2?17:236,8);return b(a,t,r)}function b(t,n,r){let i=e.getSymbolTotalCodewords(n),a=i-s.getTotalCodewordsCount(n,r),o=s.getBlocksCount(n,r),l=o-i%o,u=Math.floor(i/o),d=Math.floor(a/o),f=d+1,p=u-d,m=new c(p),h=0,g=Array(o),_=Array(o),v=0,y=new Uint8Array(t.buffer);for(let e=0;e<o;e++){let t=e<l?d:f;g[e]=y.slice(h,h+t),_[e]=m.encode(g[e]),h+=t,v=Math.max(v,t)}let b=new Uint8Array(i),x=0,S,C;for(S=0;S<v;S++)for(C=0;C<o;C++)S<g[C].length&&(b[x++]=g[C][S]);for(S=0;S<p;S++)for(C=0;C<o;C++)b[x++]=_[C][S];return b}function x(t,n,i,a){let s;if(Array.isArray(t))s=f.fromArray(t);else if(typeof t==`string`){let e=n;if(!e){let n=f.rawSplit(t);e=l.getBestVersionForData(n,i)}s=f.fromString(t,e||40)}else throw Error(`Invalid data`);let c=l.getBestVersionForData(s,i);if(!c)throw Error(`The amount of data is too big to be stored in a QR Code`);if(!n)n=c;else if(n<c)throw Error(` 49The chosen QR Code version cannot contain this amount of data. 50Minimum version required to store current data is: `+c+`. 51`);let u=y(n,i,s),d=new r(e.getSymbolSize(n));return p(d,n),m(d),h(d,n),_(d,i,0),n>=7&&g(d,n),v(d,u),isNaN(a)&&(a=o.getBestMask(d,_.bind(null,d,i))),o.applyMask(a,d),_(d,i,a),{modules:d,version:n,errorCorrectionLevel:i,maskPattern:a,segments:s}}return q2.create=function(n,r){if(typeof n>`u`||n===``)throw Error(`No input text`);let i=t.M,a,s;return typeof r<`u`&&(i=t.from(r.errorCorrectionLevel,t.M),a=l.from(r.version),s=o.from(r.maskPattern),r.toSJISFunc&&e.setToSJISFunction(r.toSJISFunc)),x(n,a,i,s)},q2}var G4={},K4={},q4;function J4(){return q4||(q4=1,function(e){function t(e){if(typeof e==`number`&&(e=e.toString()),typeof e!=`string`)throw Error(`Color should be defined as hex string`);let t=e.slice().replace(`#`,``).split(``);if(t.length<3||t.length===5||t.length>8)throw Error(`Invalid hex color: `+e);(t.length===3||t.length===4)&&(t=Array.prototype.concat.apply([],t.map(function(e){return[e,e]}))),t.length===6&&t.push(`F`,`F`);let n=parseInt(t.join(``),16);return{r:n>>24&255,g:n>>16&255,b:n>>8&255,a:n&255,hex:`#`+t.slice(0,6).join(``)}}e.getOptions=function(e){e||={},e.color||={};let n=typeof e.margin>`u`||e.margin===null||e.margin<0?4:e.margin,r=e.width&&e.width>=21?e.width:void 0,i=e.scale||4;
51return{width:r,scale:r?4:i,margin:n,color:{dark:t(e.color.dark||`#000000ff`),light:t(e.color.light||`#ffffffff`)},type:e.type,rendererOpts:e.rendererOpts||{}}},e.getScale=function(e,t){return t.width&&t.width>=e+t.margin*2?t.width/(e+t.margin*2):t.scale},e.getImageWidth=function(t,n){let r=e.getScale(t,n);return Math.floor((t+n.margin*2)*r)},e.qrToImageData=function(t,n,r){let i=n.modules.size,a=n.modules.data,o=e.getScale(i,r),s=Math.floor((i+r.margin*2)*o),c=r.margin*o,l=[r.color.light,r.color.dark];for(let e=0;e<s;e++)for(let n=0;n<s;n++){let u=(e*s+n)*4,d=r.color.light;if(e>=c&&n>=c&&e<s-c&&n<s-c){let t=Math.floor((e-c)/o),r=Math.floor((n-c)/o);d=l[+!!a[t*i+r]]}t[u++]=d.r,t[u++]=d.g,t[u++]=d.b,t[u]=d.a}}}(K4)),K4}var Y4;function eme(){return Y4||(Y4=1,function(e){let t=J4();function n(e,t,n){e.clearRect(0,0,t.width,t.height),t.style||={},t.height=n,t.width=n,t.style.height=n+`px`,t.style.width=n+`px`}function r(){try{return document.createElement(`canvas`)}catch{throw Error(`You need to specify a canvas element`)}}e.render=function(e,i,a){let o=a,s=i;typeof o>`u`&&(!i||!i.getContext)&&(o=i,i=void 0),i||(s=r()),o=t.getOptions(o);let c=t.getImageWidth(e.modules.size,o),l=s.getContext(`2d`),u=l.createImageData(c,c);return t.qrToImageData(u.data,e,o),n(l,s,c),l.putImageData(u,0,0),s},e.renderToDataURL=function(t,n,r){let i=r;typeof i>`u`&&(!n||!n.getContext)&&(i=n,n=void 0),i||={};let a=e.render(t,n,i),o=i.type||`image/png`,s=i.rendererOpts||{};return a.toDataURL(o,s.quality)}}(G4)),G4}var X4={},Z4;function tme(){if(Z4)return X4;Z4=1;let e=J4();function t(e,t){let n=e.a/255,r=t+`="`+e.hex+`"`;return n<1?r+` `+t+`-opacity="`+n.toFixed(2).slice(1)+`"`:r}function n(e,t,n){let r=e+t;return typeof n<`u`&&(r+=` `+n),r}function r(e,t,r){let i=``,a=0,o=!1,s=0;for(let c=0;c<e.length;c++){let l=Math.floor(c%t),u=Math.floor(c/t);!l&&!o&&(o=!0),e[c]?(s++,c>0&&l>0&&e[c-1]||(i+=o?n(`M`,l+r,.5+u+r):n(`m`,a,0),a=0,o=!1),l+1<t&&e[c+1]||(i+=n(`h`,s),s=0)):a++}return i}return X4.render=function(n,i,a){let o=e.getOptions(i),s=n.modules.size,c=n.modules.data,l=s+o.margin*2,u=o.color.light.a?`<path `+t(o.color.light,`fill`)+` d="M0 0h`+l+`v`+l+`H0z"/>`:``,d=`<path `+t(o.color.dark,`stroke`)+` d="`+r(c,s,o.margin)+`"/>`,f=`viewBox="0 0 `+l+` `+l+`"`,p=`<svg xmlns="http://www.w3.org/2000/svg" `+(o.width?`width="`+o.width+`" height="`+o.width+`" `:``)+f+` shape-rendering="crispEdges">`+u+d+`</svg> 52`;return typeof a==`function`&&a(null,p),p},X4}var Q4;function nme(){if(Q4)return W2;Q4=1;let e=Ipe(),t=$pe(),n=eme(),r=tme();function i(n,r,i,a,o){let s=[].slice.call(arguments,1),c=s.length,l=typeof s[c-1]==`function`;if(!l&&!e())throw Error(`Callback required as last argument`);if(l){if(c<2)throw Error(`Too few arguments provided`);c===2?(o=i,i=r,r=a=void 0):c===3&&(r.getContext&&typeof o>`u`?(o=a,a=void 0):(o=a,a=i,i=r,r=void 0))}else{if(c<1)throw Error(`Too few arguments provided`);return c===1?(i=r,r=a=void 0):c===2&&!r.getContext&&(a=i,i=r,r=void 0),new Promise(function(e,o){try{e(n(t.create(i,a),r,a))}catch(e){o(e)}})}try{let e=t.create(i,a);o(null,n(e,r,a))}catch(e){o(e)}}return W2.create=t.create,W2.toCanvas=i.bind(null,n.render),W2.toDataURL=i.bind(null,n.renderToDataURL),W2.toString=i.bind(null,function(e,t,n){return r.render(e,n)}),W2}var rme=Fpe(nme()),ime=X(`<div class="qr-wrapper svelte-db8lgx"><img alt="Redemption QR Code" class="qr-code svelte-db8lgx"/></div>`),ame={hash:`svelte-db8lgx`,code:`.qr-wrapper.svelte-db8lgx {display:flex;justify-content:center;align-items:center;align-self:center;width:fit-content;margin:0 auto;background-color:#ffffff;border-radius:8px;padding:16px;}.qr-code.svelte-db8lgx {display:block;width:128px;height:128px;image-rendering:-webkit-optimize-contrast;image-rendering:crisp-edges;}`};function ome(e,t){GY(t,!0),J$(e,ame);let n=()=>R1(a,`$variables`,r),[r,i]=B1(),a=$0(),o=W(()=>n()?.[`success.redemption_url`]),s=CZ(!0),c=CZ(``),l=CZ(!1);j$(()=>{let e=window.matchMedia(`(max-width: 767px)`);G(s,e.matches,!0);let t=e=>{G(s,e.matches,!0)};return e.addEventListener(`change`,t),()=>{e.removeEventListener(`change`,t)}}),$Z(()=>{!Y(s)&&Y(o)&&(G(l,!1),rme.toDataURL(Y(o),{width:512,margin:2,errorCorrectionLevel:`M`,color:{dar
52k:`#000000`,light:`#ffffff`}}).then(e=>{G(c,e,!0)}).catch(e=>{console.warn(`Failed to generate QR code:`,e),G(l,!0)}))});var u=m$(),d=BZ(u),f=e=>{h3(e,H1(()=>t.stack,{onclick:()=>{window.location.href=Y(o)}}))},p=e=>{var t=m$(),n=BZ(t),r=e=>{var t=ime(),n=K(t);J(()=>l1(n,`src`,Y(c))),Z(e,t)};Q(n,e=>{Y(c)&&e(r)},!0),Z(e,t)};Q(d,e=>{(Y(s)||Y(l))&&Y(o)?e(f):e(p,!1)}),Z(e,u),KY(),i()}function sme(e,t){let n=$(t,`style`,3,``),r=$(t,`component`,3,`p`);var i=m$();q$(BZ(i),r,!1,(e,r)=>{u1(e,()=>({style:n()}));var i=m$();A$(BZ(i),()=>t.children??UJ),Z(r,i)}),Z(e,i)}var cme=X(`<span><!></span>`);function $4(e,t){GY(t,!0);let n=()=>R1(l,`$variables`,r),[r,i]=B1(),a=V1(t,[`$$slots`,`$$events`,`$$legacy`]),{uiConfig:o,emitComponentInteraction:s,onNavigateToUrl:c}=M0(),l=e2(),u=t2({state:!0}),d=W(()=>({...a,...u2(u(),t.overrides)})),f=W(v2()),p=W(()=>ype(Y(f),Y(d),o.app.fonts)),m=W(()=>bpe(Y(f),Y(d),Y(d).size,Y(d).background_color)),{getLocalizedString:h}=s2(),g=W(()=>z2(h(Y(d).text_lid),n())),_=W(()=>Y(d).visible!==!1),v=W(()=>Tpe(Y(g))),y=e=>{if(e.defaultPrevented||e.button!==0||e.metaKey||e.ctrlKey||e.shiftKey||e.altKey)return;let n=e.target;if(!(n instanceof Element))return;let r=n.closest(`a[href]`);if(!(r instanceof HTMLAnchorElement))return;let i=r.getAttribute(`href`)??r.href;i&&(s({componentType:`text`,componentName:t.name,componentValue:`navigate_to_url`,componentURL:i}),c?.(i))};var b=m$(),x=BZ(b),S=e=>{var t=cme();t.__click=y,sme(K(t),{get style(){return Y(p)},component:`span`,children:(e,t)=>{var n=m$();B$(BZ(n),()=>Y(v)),Z(e,n)},$$slots:{default:!0}}),J(()=>n1(t,Y(m))),Z(e,t)};Q(x,e=>{Y(_)&&e(S)}),Z(e,b),KY(),i()}s$([`click`]);function lme(e,t){return typeof e.addEventListener==`function`?(e.addEventListener(`change`,t),()=>e.removeEventListener(`change`,t)):(e.addListener(t),()=>e.removeListener(t))}function e3(e,t){e.muted=t.preferMuted||t.mutedPlaybackOverride,e.playsInline=!0}function ume(e,t){let{cancelled:n,preferMuted:r,getMutedOverride:i,setMutedOverride:a}=t;if(n()||!e.paused||(e3(e,{preferMuted:r,mutedPlaybackOverride:i()}),e.readyState<HTMLMediaElement.HAVE_CURRENT_DATA))return;let o=e.play();o!==void 0&&o.catch(()=>{n()||!e.isConnected||!r&&!i()&&(a(!0),e3(e,{preferMuted:r,mutedPlaybackOverride:!0}),e.play().catch(()=>{}))})}function t3(e,t,n){let r=()=>{n()||t()},i=()=>r();e.readyState<HTMLMediaElement.HAVE_CURRENT_DATA?(e.addEventListener(`loadeddata`,i),e.addEventListener(`canplay`,i)):queueMicrotask(r),queueMicrotask(r),requestAnimationFrame(()=>{r()});let a=()=>r();return typeof document<`u`&&typeof window<`u`&&(document.readyState===`complete`?queueMicrotask(r):window.addEventListener(`load`,a)),()=>{e.removeEventListener(`loadeddata`,i),e.removeEventListener(`canplay`,i),typeof window<`u`&&window.removeEventListener(`load`,a)}}var dme=X(`<div class="rc-bg-video svelte-8v4ynu" aria-hidden="true"><img alt="" class="fill svelte-8v4ynu"/></div>`),fme=X(`<source media="(max-width: 600px)"/>`),pme=X(`<div class="rc-bg-video svelte-8v4ynu" aria-hidden="true"><video class="fill svelte-8v4ynu" playsinline="" autoplay preload="auto"><!> <source/></video></div>`,2),mme={hash:`svelte-8v4ynu`,code:`.rc-bg-video.svelte-8v4ynu {position:absolute;inset:0;overflow:hidden;z-index:1;pointer-events:none;} 53 54 /** 55 * Fill the layer with absolute edges (percent heights are unreliable under nested 56 * flex/absolute hosts). Beat Paywall's global \`.paywall video { max-width: 100% }\` 57 * so \`object-fit: cover|contain\` applies to the full backdrop box (e.g. carousel). 58 */.rc-bg-video.svelte-8v4ynu :is(video:where(.svelte-8v4ynu), img:where(.svelte-8v4ynu)).fill:where(.svelte-8v4ynu) {position:absolute;inset:0;width:100%;height:100%;max-width:none;max-height:none;display:block;}.rc-bg-video.svelte-8v4ynu video.fill:where(.svelte-8v4ynu) {transform:translateZ(0);-webkit-transform:translateZ(0);}`};function n3(e,t){GY(t,!0),J$(e,mme);let n=$(t,`urlLowRes`,3,null),r=$(t,`poster`,3,null),i=CZ(null),a=CZ(!1),o=CZ(!1),s=CZ(!1);j$(()=>{if(typeof window>`u`)return;let e=window.matchMedia(`(prefers-reduced-motion: reduce)`);return G(o,e.matches,!0),lme(e,()=>{G(o,e.matches,!0)})}),$Z(()=>{t.url,n(),QQ(()=>{G(a,!1),G(s,!1)}),queueMicrotask(()=>{var e;(e=Y(i))==null||e.load()})});let c=W(()=>Y(o)||Y(a)),l=W(()=>`object-fit:${t.objectFit};object-position:${t.objectPosition}`);$Z(()=>
58{if(Y(c)||!Y(i)){QQ(()=>{G(s,!1)});return}let e=Y(i),n=!1,r=()=>n,a=t3(e,()=>{ume(e,{cancelled:r,preferMuted:t.mute,getMutedOverride:()=>Y(s),setMutedOverride:e=>QQ(()=>{G(s,e,!0)})})},r);return()=>{n=!0,a()}});function u(){G(a,!0)}var d=m$(),f=BZ(d),p=e=>{var t=dme(),n=K(t);J(()=>{l1(n,`src`,r()),n1(n,Y(l))}),Z(e,t)},m=e=>{var a=m$(),o=BZ(a),d=e=>{},f=e=>{var a=pme(),o=K(a),c=K(o),d=e=>{var t=fme();J(()=>l1(t,`src`,n())),Z(e,t)};Q(c,e=>{n()&&e(d)});var f=q(c,2);E1(o,e=>G(i,e),()=>Y(i)),J(()=>{n1(o,Y(l)),o.loop=t.loop,o.muted=t.mute||Y(s),l1(o,`poster`,r()??void 0),l1(f,`src`,t.url)}),o$(`error`,o,u),Z(e,a)};Q(o,e=>{Y(c)?e(d):e(f,!1)},!0),Z(e,a)};Q(f,e=>{Y(c)&&r()?e(p):e(m,!1)}),Z(e,d),KY()}function r3(e){return`rc-${e}-video-bg`}function i3(e){if(!e.hasVideoBg)return{};let t={isolation:`isolate`};return e.positionRelative&&(t.position=`relative`),e.clipOverflow&&(t.overflow=`hidden`),t}function hme(e){switch(e){case`top`:return`flex-start`;case`center`:return`center`;case`bottom`:return`flex-end`}}function a3(e,t,n){return Math.max(t,Math.min(e,n))}var gme=.2;function _me({startPage:e,dragDistance:t,pageWidth:n,pageCount:r,loop:i,advanceThreshold:a=gme}){let o=n*a,s=e;return t<-o?s+=1:t>o&&--s,i?s:a3(s,0,r-1)}function o3(e){if(e===null)return 0;let t=window.getComputedStyle(e);return new WebKitCSSMatrix(t.transform).m41}var vme=X(`<div class="page svelte-1t372qb" role="group" aria-roledescription="slide"><!></div>`),yme={hash:`svelte-1t372qb`,code:`div.svelte-1t372qb {flex:0 0 100%;scroll-snap-align:center;scroll-snap-stop:always;}`};function s3(e,t){J$(e,yme);let n=$(t,`hidden`,3,!1);var r=vme();h3(K(r),H1(()=>t.page)),J(()=>{l1(r,`aria-label`,`Slide ${t.index+1} of ${t.pages}`),l1(r,`aria-current`,t.selected),l1(r,`aria-hidden`,n())}),Z(e,r)}var bme=X(`<div></div>`),xme=X(`<div class="control rc-gradient-border svelte-17szyrm"></div>`),Sme={hash:`svelte-17szyrm`,code:`.control.svelte-17szyrm {align-self:center;display:flex;flex-direction:row;align-items:center;justify-content:center;}`};function Cme(e,t){GY(t,!0),J$(e,Sme);let n=$(t,`background_color`,3,null),r=$(t,`border`,3,null),i=$(t,`shape`,3,null),a=$(t,`shadow`,3,null),o=W(v2());function s(e){return j2(Y(o),e.stroke_width==null||e.stroke_color==null?null:{width:e.stroke_width,color:e.stroke_color})}function c(e){return S2({width:C2(e.width),height:C2(e.height),background:k2(Y(o),e.color),...s(e),"border-radius":`9999px`})}let l=W(()=>c(t.default)),u=W(()=>c(t.active)),d=W(()=>S2({order:t.position===`top`?-1:1,gap:C2(t.spacing),margin:D2(t.margin),padding:D2(t.padding),...I2(Y(o),n(),null),...j2(Y(o),r()),"border-radius":M2(i()),"box-shadow":N2(Y(o),a())}));var f=xme();L$(f,21,()=>({length:t.length}),P$,(e,n,r)=>{var i=bme();J(()=>n1(i,r===t.selected?Y(u):Y(l))),Z(e,i)}),J(()=>n1(f,Y(d))),Z(e,f),KY()}var wme=X(`<div class="carousel-bg-video-mount svelte-qtlkrg"><!></div>`),Tme=X(`<div><!> <div class="carousel-clip svelte-qtlkrg"><div class="slider svelte-qtlkrg" role="region" aria-label="Feature carousel" aria-roledescription="carousel" aria-live="polite"><!> <!> <!></div> <!></div></div>`),Eme={hash:`svelte-qtlkrg`,code:`.carousel.svelte-qtlkrg {max-width:100%;display:flex;flex-direction:column;flex-shrink:0;align-self:stretch;}.carousel-clip.svelte-qtlkrg {display:flex;flex-direction:column;flex:1;min-width:0;min-height:0;overflow:hidden;border-radius:inherit;}.carousel-bg-video-mount.svelte-qtlkrg {position:absolute;inset:0;z-index:1;border-radius:inherit;overflow:hidden;pointer-events:none;}.carousel.rc-carousel-video-bg.svelte-qtlkrg::before {content:"";position:absolute;inset:0;background:var(--overlay);pointer-events:none;z-index:2;}.carousel.rc-carousel-video-bg.svelte-qtlkrg .carousel-clip:where(.svelte-qtlkrg) {position:relative;z-index:3;}.slider.svelte-qtlkrg {display:flex;flex-direction:row;flex-wrap:nowrap;transition-property:transform;transition-duration:500ms;transition-timing-function:ease-in-out;transition-delay:2500ms;transform:translateX(0);touch-action:pan-y;cursor:grab;&:active {cursor:grabbing;user-select:none;}}`};function Dme(e,t){GY(t,!0),J$(e,Eme);let n=V1(t,[`$$slots`,`$$events`,`$$legacy`]),{emitComponentInteraction:r}=M0(),i=t2(),a=W(()=>({...n,...u2(i(),t.overrides)})),o=W(()=>Y(a).pages),s=W(()=>Y(a).padding),c=W(()=>Y(a).margin),l=W(()=>Y(a).background),u=W(()=>Y(a).shape),d=W(()=>Y(a).border),f=W(()=>Y(a).shadow),p=W(()=>Y(a).page_alignment),m=W(()=>Y(a).page_spacing),h=W(()=>Y(a).page_peek),g=W(()=>Y(a).page_control),_=W(()=>Y(a).initial_page_index),v=W(()=>Y(a).loop),y=W(()=>Y(a).auto_advance),b=W(v2()),x=W(()=>Y(l)?.type===`video`),S=W(()=>{if(!Y(x))return null;let e=Y(l);return!e||e.type!==`video`?null:F2(Y(b),e)}
58),C=W(()=>M2(Y(u))),w=W(()=>S2({margin:D2(Y(c)),padding:D2(Y(s)),...i3({hasVideoBg:Y(x),positionRelative:!0}),...I2(Y(b),null,Y(l)),...j2(Y(b),Y(d)),"border-radius":Y(C),"box-shadow":N2(Y(b),Y(f)),"transition-duration":`${Y(y)?.ms_transition_time??0}ms`})),T=W(()=>S2({gap:C2(Y(m)),padding:`0 ${Y(h)+Y(m)}px`,"align-items":hme(Y(p))})),E=W(()=>{if(!Y(v))return[];let e=Y(o).length-1;switch(Y(o).length){case 0:return[];case 1:return[0,0];case 2:return[0,e];default:return[e-1,e]}}),D=W(()=>{if(!Y(v))return[];switch(Y(o).length){case 0:return[];case 1:return[0,0];default:return[0,1]}}),O=null,k=CZ(0),A=CZ(0),j=W(()=>2*Y(h)+Y(m)),M=W(()=>Y(A)-Y(j)),N=CZ(null);function P(){return Y(o).at(Y(_))===void 0?0:Y(_)}function F(e){return Y(o).length===0?0:(e%Y(o).length+Y(o).length)%Y(o).length}function ee(e){return Y(o)[e]?.name}function I(e=!0,t){if(O===null)return;let n=e?Y(y)?.ms_time_per_page??0:0;t??=Y(y)?.ms_transition_time??0,O.style.transition=`transform ${t}ms ease-in-out ${n}ms`}function te(){O!==null&&(O.style.transition=`none`)}let ne=W(()=>Y(v)?2:0);function re(e){O!==null&&(O.style.transform=`translateX(${e}px)`)}function ie(e){O!==null&&(e+=Y(ne),re(e*-Y(M)))}function ae(e){e%=Y(o).length+Y(ne),I(!0),ie(e)}function oe(){Y(y)!=null&&requestAnimationFrame(()=>{ae(Y(k)+1)})}j$(()=>{G(k,P(),!0),te(),ie(Y(k)),oe()});function se(e){return Math.round(e/-Y(M))-Y(ne)}function ce(){G(k,(se(o3(O))+Y(o).length)%Y(o).length),te(),ie(Y(k)),requestAnimationFrame(()=>{oe()})}let le=CZ(0),ue=0;function de(e){e.currentTarget.setPointerCapture(e.pointerId),G(le,o3(O),!0),G(N,Y(k),!0),ue=e.clientX}function fe(e){let n=e.currentTarget;n.hasPointerCapture(e.pointerId)&&n.releasePointerCapture(e.pointerId);let i=o3(O),a=_me({startPage:Y(N)??se(i),dragDistance:i-Y(le),pageWidth:Y(M),pageCount:Y(o).length,loop:Y(v)}),s=F(a);Y(N)!==null&&Y(N)!==s&&r({componentType:`carousel`,componentName:t.name,componentValue:s.toString(),originIndex:Y(N),destinationIndex:s,originContextName:ee(Y(N)),destinationContextName:ee(s),defaultIndex:P()}),G(N,null),G(k,s,!0),I(!1,500),ie(a)}function L(e){if(!e.currentTarget.hasPointerCapture(e.pointerId))return;let t=e.clientX-ue;ue=e.clientX;let[n,r]=Y(v)?[Y(le)-Y(A),Y(le)+Y(A)]:[-(Y(o).length-1)*Y(M),0],i=a3(o3(O)+t,n,r);G(k,(se(i)+Y(o).length)%Y(o).length),re(i),te()}var pe=Tme(),me=K(pe),he=e=>{var t=wme();n3(K(t),{get url(){return Y(S).url},get urlLowRes(){return Y(S).url_low_res},get objectFit(){return Y(S).fit},get objectPosition(){return Y(S).position},get poster(){return Y(S).posterWebp},get mute(){return Y(S).mute},get loop(){return Y(S).loop}}),Z(e,t)};Q(me,e=>{Y(S)&&e(he)});var ge=K(q(me,2));ge.__pointerdown=de,ge.__pointerup=fe,ge.__pointermove=L;var _e=K(ge);L$(_e,17,()=>Y(E),P$,(e,t)=>{{let n=W(()=>Y(k)===Y(t));s3(e,{get page(){return Y(o)[Y(t)]},get index(){return Y(t)},get pages(){return Y(o).length},get selected(){return Y(n)},hidden:!0})}});var ve=q(_e,2);L$(ve,17,()=>Y(o),P$,(e,t,n)=>{{let r=W(()=>Y(k)===n);s3(e,{get page(){return Y(t)},index:n,get pages(){return Y(o).length},get selected(){return Y(r)}})}}),L$(q(ve,2),17,()=>Y(D),P$,(e,t)=>{{let n=W(()=>Y(k)===Y(t));s3(e,{get page(){return Y(o)[Y(t)]},get index(){return Y(t)},get pages(){return Y(o).length},get selected(){return Y(n)},hidden:!0})}}),E1(ge,e=>O=e,()=>O);var ye=q(ge,2),be=e=>{Cme(e,H1(()=>Y(g),{get length(){return Y(o).length},get selected(){return Y(k)}}))};Q(ye,e=>{Y(g)!=null&&e(be)}),J(e=>{e1(pe,1,e,`svelte-qtlkrg`),n1(pe,Y(w)),n1(ge,Y(T))},[()=>X$([`carousel`,`rc-gradient-border`,Y(x)?r3(`carousel`):``].filter(
58Boolean).join(` `))]),o$(`transitionend`,ge,ce),w1(ge,`clientWidth`,e=>G(A,e)),Z(e,pe),KY()}s$([`pointerdown`,`pointerup`,`pointermove`]);var Ome=X(`<div class="rc-gradient-border"><div></div></div>`);function c3(e,t){GY(t,!0);let n=V1(t,[`$$slots`,`$$events`,`$$legacy`]),r=t2({state:!0}),i=W(()=>({...n,...u2(r(),t.overrides)})),a=W(()=>Y(i).base_url),o=W(()=>Y(i).formats),s=W(()=>Y(i).size),c=W(()=>Y(i).margin),l=W(()=>Y(i).padding),u=W(()=>Y(i).color),d=W(()=>Y(i).icon_background),f=W(()=>Y(i).visible),p=W(v2()),m=W(()=>S2({width:E2(Y(s).width),height:E2(Y(s).height),margin:D2(Y(c)),padding:D2(Y(l)),"background-color":k2(Y(p),Y(d)?.color),...j2(Y(p),Y(d)?.border),"border-radius":M2(Y(d)?.shape),"box-shadow":N2(Y(p),Y(d)?.shadow),flex:`0 0 auto`})),h=W(()=>Y(f)!==!1),g=W(()=>`${Y(a)}/${Y(o).webp}`),_=W(()=>S2({width:`100%`,height:`100%`,position:`relative`,"z-index":1,overflow:`hidden`,"background-color":k2(Y(p),Y(u)),"mask-image":`url(${Y(g)})`,"-webkit-mask-image":`url(${Y(g)})`,"mask-size":`contain`,"-webkit-mask-size":`contain`,"mask-position":`center`,"-webkit-mask-position":`center`,"mask-repeat":`no-repeat`,"-webkit-mask-repeat":`no-repeat`}));var v=m$(),y=BZ(v),b=e=>{var t=Ome(),n=K(t);J(()=>{n1(t,Y(m)),n1(n,Y(_))}),Z(e,t)};Q(y,e=>{Y(h)&&e(b)}),Z(e,v),KY()}var l3=Symbol(`selected`);function kme(e){WY(l3,e)}function u3(){let e=UY(l3);if(e===void 0)throw Error(`Tabs context not found`);return e}function Ame(e,t){GY(t,!0);let n=()=>R1(a,`$control`,r),[r,i]=B1(),{control:a}=u3();h3(e,H1(()=>n().stack)),KY(),i()}function jme(e,t){GY(t,!0);let{selectedTabId:n,selectTab:r}=u3();P0(P1(n,e=>e===t.tab_id)),h3(e,H1(()=>t.stack,{onclick:()=>{r(t.tab_id,t.tab_index,`tab`)}})),KY()}var Mme=X(`<div role="button" tabindex="0" aria-label="Toggle" class="toggle svelte-ykicus"><div class="thumb svelte-ykicus"></div></div>`),Nme={hash:`svelte-ykicus`,code:`.toggle.svelte-ykicus {appearance:none;--height: 31px;position:relative;width:51px;height:var(--height);border-radius:calc(var(--height) / 2);cursor:pointer;user-select:none;transition:background-color 300ms ease;}.thumb.svelte-ykicus {--size: 27px;position:absolute;top:2px;width:var(--size);height:var(--size);border-radius:50%;box-shadow:0 1px 3px rgba(0, 0, 0, 0.2), 59 0 1px 2px rgba(0, 0, 0, 0.12);transition:left 300ms cubic-bezier(0.25, 0.46, 0.45, 0.94), 60 background-color 300ms ease;}`};function Pme(e,t){GY(t,!0),J$(e,Nme);let n=()=>R1(f,`$isActive`,r),[r,i]=B1(),a=V1(t,[`$$slots`,`$$events`,`$$legacy`]),o=t2({state:!0}),s=W(()=>({...a,...u2(o(),t.overrides)})),c=W(()=>Y(s).thumb_color_on),l=W(()=>Y(s).thumb_color_off),u=W(()=>Y(s).track_color_on),d=W(()=>Y(s).track_color_off),{isActive:f,selectTab:p}=u3();P0(f);let m=W(v2()),h=W(()=>S2({background:n()?k2(Y(m),Y(u)):k2(Y(m),Y(d))})),g=W(()=>S2({left:n()?`22px`:`2px`,background:n()?k2(Y(m),Y(c)):k2(Y(m),Y(l))})),_=()=>{p(``,+!n(),`switch`)},v=e=>{(e.code===`Enter`||e.code===`Space`)&&_()};var y=Mme();y.__click=_,y.__keydown=v;var b=K(y);J(()=>{n1(y,Y(h)),n1(b,Y(g))}),Z(e,y),KY(),i()}s$([`click`,`keydown`]);var Fme=X(`<div><!> <!></div>`),Ime={hash:`svelte-m8wp5c`,code:`.rc-tabs-video-bg.svelte-m8wp5c::before {content:"";position:absolute;inset:0;background:var(--overlay);pointer-events:none;z-index:2;}.rc-tabs-video-bg.svelte-m8wp5c > .rc-bg-video {z-index:1;}.rc-tabs-video-bg.svelte-m8wp5c > .rc-tabs-stack-front {position:relative;z-index:3;}`};function Lme(e,t){GY(t,!0),J$(e,Ime);let n=()=>R1(j,`$selectedTabIndex`,i),r=()=>R1(M,`$tab`,i),[i,a]=B1(),o=V1(t,[`$$slots`,`$$events`,`$$legacy`]),{name:s,control:c,tabs:l,default_tab_id:u,state_updates:d}=o,f=t2(),p=X0(),m=W(()=>({...o,...u2(f(),t.overrides)})),h=W(()=>Y(m).size),g=W(()=>Y(m).padding),_=W(()=>Y(m).margin),v=W(()=>Y(m).background),y=W(()=>Y(m).shape),b=W(()=>Y(m).border),x=W(()=>Y(m).shadow),S=W(()=>Y(m).visible),C=W(()=>Y(S)!==!1),w=W(v2()),T=W(()=>Y(v)?.type===`video`),E=W(()=>{if(!Y(T))return null;let e=Y(v);return!e||e.type!==`video`?null:F2(Y(w),e)}),D=W(()=>M2(Y(y))),O=W(()=>S2({position:`relative`,width:E2(Y(h).width),height:E2(Y(h).height),margin:D2(Y(_)),padding:D2(Y(g)),...i3({hasVideoBg:Y(T),clipOverflow:Y(D)!==`0`}),...I2(Y(w),null,Y(v)),...j2(Y(w),Y(b)),"border-radius":Y(D),"box-shadow":N2(Y(w),Y(x))})),{emitComponentInteraction:k}
60=M0(),A=Math.max(0,l.findIndex(e=>e.id===u)),j=N1(A),M=P1(j,e=>l[e]),N=e=>l[e]?.name,P=(e,t,n)=>{let r=l.findIndex(t=>t.id===e),i=r===-1?t:r;if(i>=0&&i<l.length){let t=F1(j);if(t===i)return;n===`tab`?k({componentType:`tab`,componentName:s,componentValue:l[i]?.id??e,originIndex:t,destinationIndex:i,originContextName:N(t),destinationContextName:N(i),defaultIndex:A}):n===`switch`&&k({componentType:`switch`,componentName:s,componentValue:i===1?`on`:`off`}),j.set(i)}},F;$Z(()=>{if(!Y(C)||!(d!=null&&d.length))return;let e=l[n()]?.id;e==null||e===F||(F=e,p?.applyUpdates(d,e))}),kme({control:M1(c),selectedTabId:P1(M,e=>e?.id??``),selectTab:P,isActive:P1(j,e=>e===1)});var ee=m$(),I=BZ(ee),te=e=>{var t=Fme(),n=K(t),i=e=>{n3(e,{get url(){return Y(E).url},get urlLowRes(){return Y(E).url_low_res},get objectFit(){return Y(E).fit},get objectPosition(){return Y(E).position},get poster(){return Y(E).posterWebp},get mute(){return Y(E).mute},get loop(){return Y(E).loop}})};Q(n,e=>{Y(E)&&e(i)});var a=q(n,2),o=e=>{{let t=W(()=>Y(T)?`rc-tabs-stack-front`:void 0);h3(e,H1(()=>r().stack,{get class(){return Y(t)}}))}};Q(a,e=>{r()!==void 0&&e(o)}),J(e=>{e1(t,1,e,`svelte-m8wp5c`),n1(t,Y(O))},[()=>
60X$([`rc-gradient-border`,Y(T)?r3(`tabs`):``].filter(Boolean).join(` `))]),Z(e,t)};Q(I,e=>{Y(C)&&e(te)}),Z(e,ee),KY(),a()}var Rme=Object.freeze({leading:`flex-start`,top:`flex-start`,center:`center`,trailing:`flex-end`,bottom:`flex-end`}),zme=Object.freeze({space_between:`space-between`,space_around:`space-around`,space_evenly:`space-evenly`,start:`flex-start`,center:`center`,end:`flex-end`});function Bme(e){if(e.type!==`fixed`)return{};let t=C2(e.value);return{"min-width":t,"max-width":t}}function Vme(e){if(e.type!==`fixed`)return{};let t=C2(e.value);return{"min-height":t,"max-height":t}}function d3(e){return e.type===`zlayer`?{}:{"flex-direction":e.type===`vertical`?`column`:`row`,"justify-content":zme[e.distribution]||`center`,"align-items":Rme[e.alignment]||`center`}}var Hme=Object.freeze({top_leading:{justifyContent:`flex-start`,alignItems:`flex-start`},top:{justifyContent:`center`,alignItems:`flex-start`},top_trailing:{justifyContent:`flex-end`,alignItems:`flex-start`},leading:{justifyContent:`flex-start`,alignItems:`center`},center:{justifyContent:`center`,alignItems:`center`},trailing:{justifyContent:`flex-end`,alignItems:`center`},bottom_leading:{justifyContent:`flex-start`,alignItems:`flex-end`},bottom:{justifyContent:`center`,alignItems:`flex-end`},bottom_trailing:{justifyContent:`flex-end`,alignItems:`flex-end`}});function Ume(e){return Hme[e]}function Wme(e,t){if(e==null)return{};let{style:n,alignment:r}=e,i=r.startsWith(`top`),a=r.endsWith(`leading`),o=r.endsWith(`trailing`),s=!a&&!o,c=t??0;if(n===`overlay`){let e=s?`translateX(-50%)`:``,t=i?`translateY(-50%)`:`translateY(50%)`;return{"z-index":10,position:`absolute`,width:`max-content`,top:i?C2(-c/2):`initial`,bottom:i?`initial`:C2(-c/2),left:a?C2(-c):s?`50%`:`initial`,right:o?C2(-c):`initial`,transform:`${e} ${t}`}}return n===`nested`?{"z-index":10,position:`absolute`,inset:0,display:`flex`,top:i?C2(c):`initial`,bottom:i?`initial`:C2(c),left:a?C2(c):s?`50%`:`initial`,right:o?C2(c):`initial`,transform:s?`translateX(-50%)`:`initial`}:{}}var Gme=X(`<div style="flex-grow: 1; width:100%;"></div>`),Kme=X(`<div><!></div>`);function qme(e,t){GY(t,!0);let n=()=>R1(s,`$selectedPackageId`,r),[r,i]=B1(),{walletButtonRender:a,onWalletButtonReady:o,selectedPackageId:s}=M0(),c=W(v2()),l=V1(t,[`$$slots`,`$$events`,`$$legacy`]),u=W(()=>{let{style:e}=l;if(e!=null)return Y(c)===`dark`&&e.dark!=null?e.dark:e.light}),d={width:{type:`fill`},height:{type:`fit`}},f={type:`vertical`,alignment:`center`,distribution:`center`},p=W(()=>({size:t.size??d,dimension:t.dimension??f,spacing:t.spacing??0,margin:t.margin??m2,border:t.border??null,shape:t.shape??null,shadow:t.shadow??null})),m=W(()=>Y(p).size),h=W(()=>Y(p).dimension),g=W(()=>Y(p).spacing),_=W(()=>Y(p).margin),v=W(()=>({display:`flex`,position:`relative`,width:E2(Y(m).width),height:E2(Y(m).height),...d3(Y(h)),gap:C2(Y(g)),margin:D2({...Y(_)?{...Y(_)}:{...m2}})})),y=W(()=>S2(Y(v)));var b=m$(),x=BZ(b),S=e=>{var r=Kme();N$(K(r),()=>Y(u),e=>{var r=Gme();gde(r,(e,t)=>a?.(e,t),()=>({selectedPackageId:n(),onReady:t.onWalletButtonReady??o,walletButtonTheme:Y(u)})),Z(e,r)}),J(()=>n1(r,Y(y))),Z(e,r)};Q(x,e=>{a&&n()&&e(S)}),Z(e,b),KY(),i()}var Jme=X(`<div class="wallet-skeleton rc-gradient-border svelte-16fkfdj"> <div class="wallet-skeleton-shimmer svelte-16fkfdj"></div></div>`),Yme={hash:`svelte-16fkfdj`,code:`.wallet-skeleton.svelte-16fkfdj {position:relative;border-radius:9999px;background-color:rgba(128, 128, 128, 0.16);backdrop-filter:blur(18px);min-height:48px;flex-grow:1;width:100%;}.wallet-skeleton-shimmer.svelte-16fkfdj {position:absolute;inset:0;overflow:hidden;border-radius:inherit;}.wallet-skeleton-shimmer.svelte-16fkfdj::before {content:"";position:absolute;inset:0;background:linear-gradient( 61 135deg, 62 rgba(255, 255, 255, 0.2), 63 rgba(255, 255, 255, 0.01) 64 );opacity:0.9;mix-blend-mode:screen;}.wallet-skeleton-shimmer.svelte-16fkfdj::after {content:"";position:absolute;inset:0;transform:translateX(-100%);background:linear-gradient( 65 120deg, 66 transparent 0%, 67 rgba(255, 255, 255, 0.6) 20%, 68 transparent 40% 69 );opacity:0.8; 70 animation: svelte-16fkfdj-wallet-skeleton-shimmer 1.4s ease-in-out infinite;} 71 72 @keyframes svelte-16fkfdj-wallet-skeleton-shimmer { 73 100% { 74 transform: translateX(100%); 75 } 76 }`};function Xme(e,t){GY(t,!0),J$(e,Yme);let n={width:{type:`fill`},height:{type:`fit`}},r={type:`vertical`,alignment:`center`,distribution:`center`},i=W(()=>({size:t.size??n,dimension:t.dimension??r,spacing:t.spacing??0,margin:t.margin??m2,border:t.border??null,shape:t.shape??null,shadow:t.shadow??null,style:t.style})),a=W(()=>Y(i).size),o=W(()=>Y(i).dimension),s=W(()=>Y(i).spacing),c=W(()=>Y(i).margin),l=W(()=>Y(i).border),u=W(()=>Y(i).shape),d=W(()=>Y(i).shadow),f=W(()=>Y(i).style),p=W(v2()),m=W(()=>({...Y(f),display:`flex`,position:`relative`,width:E2(Y(a).width),height:E2(Y(a).height),...d3(Y(o)),gap:C2(Y(s)),margin:D2({...Y(c)?{...Y(c),bottom:Math.max(Y(c).bottom,10)}:{...m2,bottom:10}})})),h=W(()=>
76S2({...Y(m),...j2(Y(p),Y(l)),"border-radius":M2(Y(u)),"box-shadow":N2(Y(p),Y(d))}));var g=Jme();l1(g,`aria-hidden`,!0),J(()=>n1(g,Y(h))),Z(e,g),KY()}var f3=(e,t)=>{var n;return e.components.some(e=>p3(e,t))||((n=e.badge)!=null&&n.stack?f3(e.badge.stack,t):!1)},p3=(e,t)=>{if(e.type===t||e.fallback&&p3(e.fallback,t))return!0;switch(e.type){case`carousel`:return e.pages.some(e=>f3(e,t));case`package`:case`purchase_button`:case`tab`:case`tab_control_button`:return f3(e.stack,t);case`stack`:return f3(e,t);case`tabs`:return f3(e.control.stack,t)||e.tabs.some(e=>f3(e.stack,t));default:return!1}},Zme=X(`<div><!></div> <!>`,1),Qme={hash:`svelte-rmil0y`,code:`.wallet-slot.svelte-rmil0y {display:contents;}.wallet-slot-hidden.svelte-rmil0y {display:none;}`};function $me(e,t){GY(t,!0),J$(e,Qme);let{wallet_unknown_stack:n,wallet_available_stack:r,wallet_unavailable_stack:i,type:a,...o}=V1(t,[`$$slots`,`$$events`,`$$legacy`]),{walletButtonRender:s,...c}=M0(),l=f3(r,`wallet_button`),u=CZ(kZ(l?void 0:!1)),d=CZ(kZ(!!s&&l));j0({walletButtonRender:s,...c,onWalletButtonReady:e=>{G(u,e,!0),G(d,!1)}});let f=W(()=>!Y(u)||!r),p=W(()=>!!(r&&Y(u)&&!Y(d))),m={components:[],type:`stack`,visible:null,dimension:{type:`vertical`,distribution:`start`,alignment:`center`},background_color:null,spacing:0,...o};h3(e,H1(()=>m,{children:(e,t)=>{var a=Zme(),o=BZ(a);h3(K(o),H1(()=>r));var s=q(o,2),c=e=>{h3(e,H1(()=>n))},l=e=>{var t=m$(),n=BZ(t),r=e=>{h3(e,H1(()=>i))};Q(n,e=>{Y(f)&&e(r)},!0),Z(e,t)};Q(s,e=>{Y(d)?e(c):e(l,!1)}),J(()=>e1(o,1,X$(Y(p)?`wallet-slot`:`wallet-slot-hidden`),`svelte-rmil0y`)),Z(e,a)},$$slots:{default:!0}})),KY()}function m3(e,t){GY(t,!0);let n={button:Xfe,carousel:Dme,countdown:che,express_purchase_button:$me,footer:v3,header:y3,icon:c3,image:khe,input_multiple_choice:Ape,input_option:Npe,input_single_choice:Ppe,input_text:Ope,package:Mhe,purchase_button:$he,redemption_button:ome,skeleton_loader:Xme,stack:h3,tab_control_button:jme,tab_control_toggle:Pme,tab_control:Ame,tabs:Lme,text:$4,timeline:oge,video:vge,wallet_button:qme,web_view:Gge},r=e=>e.type in n,i=e=>{if(r(e))return[n[e.type],e];if(e.type===`fallback_header`)return;let{fallback:t}=e;if(t&&r(t))return[n[t.type],t]},a=V1(t,[`$$slots`,`$$events`,`$$legacy`,`nodeData`]),o=W(()=>i(t.nodeData)??[]),s=W(()=>qJ(Y(o),2)),c=W(()=>Y(s)[0]),l=W(()=>Y(s)[1]);var u={getComponentClass:i},d=m$(),f=BZ(d),p=e=>{var t=m$();dde(BZ(t),()=>Y(c),(e,t)=>{t(e,H1(()=>Y(l)||{},()=>a))}),Z(e,t)};return Q(f,e=>{Y(c)&&e(p)}),Z(e,d),KY(u)}var ehe=X(`<div><!></div>`),the=X(`<div class="rc-zlayer-layer svelte-19iog96"><!></div>`),nhe=X(`<div style="position: relative; width: 100%; height: 100%; isolation: isolate;"></div>`),rhe=X(`<!> <!> <!> <!>`,1),ihe={hash:`svelte-19iog96`,code:`.stack.svelte-19iog96 {appearance:none;position:relative;&[role="button"] {cursor:pointer;}&::before {content:"";position:absolute;top:0;left:0;width:100%;height:100%;background:var(--overlay);}}.stack.rc-stack-video-bg.svelte-19iog96::before {z-index:2;pointer-events:none;}.stack.rc-stack-video-bg.svelte-19iog96 > .rc-bg-video {z-index:1;} 77 78 /* Keep flex children interactive and above tinted overlay (::before z-index). */.stack.rc-stack-video-bg.svelte-19iog96 > :not(.rc-bg-video) {position:relative;z-index:3;} 79 80 /* 81 * Each overlay layer is a full-size (inset:0) box, so by default it swallows 82 * clicks anywhere over the stack â including where it has no content â 83 * blocking interactive elements on the layers beneath. Only its own content 84 * should be hit-testable. 85 */.rc-zlayer-layer.svelte-19iog96 {pointer-events:none;}.rc-zlayer-layer.svelte-19iog96 > * {pointer-events:auto;}`};function h3(e,t){GY(t,!0),J$(e,ihe);let n=V1(t,[`$$slots`,`$$events`,`$$legacy`]),{onclick:r,children:i,class:a,testId:o}=n,s=t2({state:!0,hover:!0}),c=W(()=>({...n,...u2(s(),t.overrides)})),l=W(()=>Y(c).components),u=W(()=>Y(c).size),d=W(()=>Y(c).dimension),f=W(()=>Y(c).spacing),p=W(()=>Y(c).margin),m=W(()=>Y(c).padding),h=W(()=>Y(c).background_color),g=W(()=>Y(c).background),_=W(()=>Y(c).border),v=W(()=>Y(c).shape),y=W(()=>Y(c).shadow),b=W(()=>Y(c).badge),x=W(()=>Y(c).visible),S=W(v2()),C=W(()=>Y(g)?.type===`video`),w=W(()=>{if(!Y(C))return null;let e=Y(g);return!e||e.type!==`video`?null:F2(Y(S),e)}),T=W(()=>M2(Y(v))),E=W(()=>S2({display:`flex`,position:`relative`,width:E2(Y(u).width),height:E2(Y(u).height),...Bme(Y(u).width),...Vme(Y(u).height),...d3(Y(d)),gap:C2(Y(f)),margin:D2(Y(p)),padding:D2(Y(m)),...I2(Y(S),Y(h),Y(g)),...j2(Y(S),Y(_)),"border-radius":Y(T),"box-shadow":N2(Y(S),Y(y)),...i3({hasVideoBg:Y(C),clipOverflow:Y(T)!==`0`}),...t.style})),D=e=>{if(e===0||Y(d).type!==`zlayer`)return``;let{justifyContent:t,alignItems:n}=Ume(Y(d).alignment);return S2({position:`absolute`,inset:0,display:`flex`,"justify-content":t,"align-items":n,"z-index":e+1})},O=W(()=>S2(Wme(Y(b),Y(_)?.width))),k=W(()=>Y(x)!==!1);var A=m$(),j=BZ(A),M=e=>{var t=m$();q$(BZ(t),()=>r===void 0?`div`:`button`,!1,(e,t)=>{u1(e,e=>({role:r===void 0?void 0:`button`,onclick:r,style:Y(E),class:e,"data-testid":o}),[()=>
85[`stack`,`rc-gradient-border`,a,Y(C)?r3(`stack`):``].filter(Boolean).join(` `)],void 0,void 0,`svelte-19iog96`);var n=rhe(),s=BZ(n),c=e=>{n3(e,{get url(){return Y(w).url},get urlLowRes(){return Y(w).url_low_res},get objectFit(){return Y(w).fit},get objectPosition(){return Y(w).position},get poster(){return Y(w).posterWebp},get mute(){return Y(w).mute},get loop(){return Y(w).loop}})};Q(s,e=>{Y(w)&&e(c)});var u=q(s,2),f=e=>{var t=ehe();m3(K(t),{get nodeData(){return Y(b).stack}}),J(()=>n1(t,Y(O))),Z(e,t)};Q(u,e=>{Y(b)&&e(f)});var p=q(u,2),m=e=>{var t=nhe();L$(t,21,()=>Y(l),P$,(e,t,n)=>{var r=the();m3(K(r),{get nodeData(){return Y(t)}}),J(e=>n1(r,e),[()=>D(n)]),Z(e,r)}),Z(e,t)},h=e=>{var t=m$();L$(BZ(t),17,()=>Y(l),P$,(e,t)=>{m3(e,{get nodeData(){return Y(t)}})}),Z(e,t)};Q(p,e=>{Y(d).type===`zlayer`?e(m):e(h,!1)});var g=q(p,2);i?.(g),Z(t,n)}),Z(e,t)};Q(j,e=>{Y(k)&&e(M)}),Z(e,A),KY()}function g3(e){return e<10?`0${e}`:`${e}`}function _3(e){return`${e}`}function ahe(e,t=Date.now()){let n=new Date(e).getTime()-t;if(n<=0)return{count_days_with_zero:`00`,count_days_without_zero:`0`,count_hours_with_zero:`00`,count_hours_without_zero:`0`,count_minutes_with_zero:`00`,count_minutes_without_zero:`0`,count_seconds_with_zero:`00`,count_seconds_without_zero:`0`};let r=Math.floor(n/1e3),i=Math.floor(r/60),a=Math.floor(i/60),o=Math.floor(a/24),s=a%24,c=i%60,l=r%60;return{count_days_with_zero:g3(o),count_days_without_zero:_3(o),count_hours_with_zero:g3(s),count_hours_without_zero:_3(s),count_minutes_with_zero:g3(c),count_minutes_without_zero:_3(c),count_seconds_with_zero:g3(l),count_seconds_without_zero:_3(l)}}function ohe(e,t=Date.now()){return new Date(e).getTime()<=t}var she=M1(Date.now(),e=>{e(Date.now());let t,n=setTimeout(()=>{e(Date.now()),t=setInterval(()=>e(Date.now()),1e3)},1e3-Date.now()%1e3);return()=>{clearTimeout(n),t!==void 0&&clearInterval(t)}});function che(e,t){GY(t,!0);let n=()=>R1(she,`$sharedNow`,r),[r,i]=B1(),{countdown_stack:a,end_stack:o}=V1(t,[`$$slots`,`$$events`,`$$legacy`]),s=W(()=>ahe(t.style.date,n())),c=W(()=>ohe(t.style.date,n()));Q0(P1([$0(),jfe(()=>Y(s))],([e,t])=>({...e,...t})));let l=W(()=>Y(c)&&o?o:a),u=W(()=>t.visible!==!1);var d=m$(),f=BZ(d),p=e=>{h3(e,H1(()=>Y(l)))};Q(f,e=>{Y(u)&&e(p)}),Z(e,d),KY(),i()}var lhe=X(`<div class="svelte-nyb2ku"><!></div>`),uhe={hash:`svelte-nyb2ku`,code:`div.svelte-nyb2ku {width:100%;display:flex;flex-direction:row;justify-content:center;}`};function v3(e,t){J$(e,uhe);var n=lhe();h3(K(n),H1(()=>t.stack)),Z(e,n)}var dhe=X(`<div class="svelte-nwqu5u"><!></div>`),fhe={hash:`svelte-nwqu5u`,code:`div.svelte-nwqu5u {display:flex;flex-direction:row;justify-content:center;}`};function y3(e,t){J$(e,fhe);var n=dhe();h3(K(n),H1(()=>t.stack)),Z(e,n)}var phe=f$(`<circle></circle>`),mhe=f$(`<path></path>`),hhe=f$(`<path></path>`),ghe=f$(`<path></path>`),_he=f$(`<!><!><!><!>`,1);function b3(e,t){GY(t,!0);let n=W(()=>{if(t.shape?.type!==`rectangle`)return[0,0,0,0];let{corners:e}=t.shape;return[e?.top_leading??0,e?.top_trailing??0,e?.bottom_trailing??0,e?.bottom_leading??0]}),r=W(()=>qJ(Y(n),4)),i=W(()=>Y(r)[0]),a=W(()=>Y(r)[1]),o=W(()=>Y(r)[2]),s=W(()=>Y(r)[3]);var c=_he(),l=BZ(c),u=e=>{var n=phe();J(e=>{l1(n,`cx`,t.width/2),l1(n,`cy`,t.height/2),l1(n,`r`,e)},[()=>Math.min(t.width,t.height)/2]),Z(e,n)};Q(l,e=>{t.shape?.type===`circle`&&e(u)});var d=q(l),f=e=>{var n=mhe();J(()=>l1(n,`d`,`M 0 0 L ${t.width} 0 L ${t.width} ${t.height} Q ${t.width/2} ${t.height-54} 0 ${t.height} Z`)),Z(e,n)};Q(d,e=>{t.shape?.type===`concave`&&e(f)});var p=q(d),m=e=>{var n=hhe();J(()=>l1(n,`d`,`M 0 0 L ${t.width} 0 L ${t.width} ${t.height-27} Q ${t.width/2} ${t.height+27} 0 ${t.height-27} Z`)),Z(e,n)};Q(p,e=>{t.shape?.type===`convex`&&e(m)});var h=q(p),g=e=>{var n=ghe();J(()=>l1(n,`d`,`M ${Y(i)} 0 H ${t.width-Y(a)} A ${Y(a)} ${Y(a)} 0 0 1 ${t.width} ${Y(a)} 86 V ${t.height-Y(o)} A ${Y(o)} ${Y(o)} 0 0 1 ${t.width-Y(o)} ${t.height} 87 H ${Y(s)} A ${Y(s)} ${Y(s)} 0 0 1 0 ${t.height-Y(s)} 88 V ${Y(i)} A ${Y(i)} ${Y(i)} 0 0 1 ${Y(i)} 0 Z`)),Z(e,n)};Q(h,e=>{(t.shape?.type===`rectangle`||t.shape?.type===void 0)&&e(g)}),Z(e,c),KY()}var vhe=f$(`<linearGradient x1="0" y1="0" x2="100%" y2="100%"><stop offset="0%"></stop><stop offset="100%"></stop></linearGradient>`),yhe=f$(`<stop></stop>`),bhe=f$(`<linearGradient></linearGradient>`),xhe=f$(`<stop></stop>`),She=f$(`<radialGradient></radialGradient>`),Che=f$(`<!><!><!>`,1);function x3(e,t){GY(t,!0);var n=Che(),r=BZ(n),i=e=>{var n=vhe(),r=K(n),i=q(r);J(()=>{l1(n,`id`,t.id),l1(r,`stop-color`,t.overlay.value),l1(i,`stop-color`,t.overlay.value)}),Z(e,n)};Q(r,e=>{t.overlay?.type===`hex`&&e(i)});var a=q(r),o=e=>{var n=bhe();L$(n,21,()=>t.overlay.points,P$,(e,t)=>{var n=yhe();
88J(()=>{l1(n,`offset`,`${Y(t).percent}%`),l1(n,`stop-color`,Y(t).color)}),Z(e,n)}),J(()=>{l1(n,`id`,t.id),l1(n,`gradientTransform`,`rotate(${t.overlay.degrees-90}, 0.5, 0.5)`)}),Z(e,n)};Q(a,e=>{t.overlay?.type===`linear`&&e(o)});var s=q(a),c=e=>{var n=She();L$(n,21,()=>t.overlay.points,P$,(e,t)=>{var n=xhe();J(()=>{l1(n,`offset`,`${Y(t).percent}%`),l1(n,`stop-color`,Y(t).color)}),Z(e,n)}),J(()=>l1(n,`id`,t.id)),Z(e,n)};Q(s,e=>{t.overlay?.type===`radial`&&e(c)}),Z(e,n),KY()}var whe=f$(`<use fill="transparent"></use>`),The=f$(`<rect x="0" y="0" height="100%" width="100%"></rect>`),Ehe=f$(`<use fill="none"></use>`),Dhe=X(`<div><svg width="100%" height="100%"><defs><clipPath><!></clipPath><g><!></g><!><!></defs><!><g><foreignObject x="0" y="0" width="100%" height="100%"><img alt="" class="svelte-qlhja6"/></foreignObject><!><!></g></svg></div>`),Ohe={hash:`svelte-qlhja6`,code:`img.svelte-qlhja6 {width:100%;height:100%;object-fit:contain;object-position:center;}`};function khe(e,t){GY(t,!0),J$(e,Ohe);let n=V1(t,[`$$slots`,`$$events`,`$$legacy`]),r=t2({state:!0}),i=W(()=>({...n,...u2(r(),t.overrides)})),a=W(()=>Y(i).id),o=W(()=>Y(i).source),s=W(()=>Y(i).size),c=W(()=>Y(i).mask_shape),l=W(()=>Y(i).fit_mode),u=W(()=>Y(i).padding),d=W(()=>Y(i).margin),f=W(()=>Y(i).color_overlay),p=W(()=>Y(i).border),m=W(()=>Y(i).shadow),h=W(()=>Y(i).visible),g=W(v2()),_=W(()=>T2(Y(g),Y(o))),v=CZ(0),y=CZ(kZ({height:0,width:0}));$Z(()=>{if(Y(_).width||Y(_).height){G(y,{height:Y(_).height,width:Y(_).width},!0);return}let e=new window.Image;e.src=Y(_).original;let t=()=>{G(y,{height:e.height,width:e.width},!0)};return e.addEventListener(`load`,t),()=>{e.removeEventListener(`load`,t)}});let b=W(()=>Y(s).height.type===`fixed`?Y(s).height.value:Math.round(Y(v)*(Y(y).height/Y(y).width))),x=W(()=>S2({width:E2(Y(s).width),height:`${Y(b)}px`,margin:D2(Y(d)),padding:D2(Y(u)),"line-height":0,"flex-shrink":Y(s).width.type===`fixed`?0:1})),S=CZ(null),C=W(()=>[Y(S)?.width??0,Y(S)?.height??0]),w=W(()=>qJ(Y(C),2)),T=W(()=>Y(w)[0]),E=W(()=>Y(w)[1]),D=W(()=>`0 0 ${Y(T)} ${Y(E)}`),O=W(()=>{var e;if(!((e=Y(m))!=null&&e.color))return``;let{x:t,y:n,radius:r,color:i}=Y(m);return`filter: drop-shadow(${t}px ${n}px ${r}px ${k2(Y(g),i)})`}),k=W(()=>Y(f)&&T2(Y(g),Y(f))),A=W(()=>Y(h)!==!1);var j=m$(),M=BZ(j),N=e=>{var t=Dhe(),n=K(t),r=K(n),i=K(r);b3(K(i),{get shape(){return Y(c)},get width(){return Y(T)},get height(){return Y(E)}});var o=q(i);b3(K(o),{get shape(){return Y(c)},get width(){return Y(T)},get height(){return Y(E)}});var s=q(o);{let e=W(()=>`${Y(a)}-overlay`);x3(s,{get id(){return Y(e)},get overlay(){return Y(k)}})}var u=q(s),d=e=>{{let t=W(()=>`${Y(a)}-border-color`),n=W(()=>T2(Y(g),Y(p).color));x3(e,{get id(){return Y(t)},get overlay(){return Y(n)}})}};Q(u,e=>{Y(p)&&Y(p).width>0&&e(d)});var f=q(r),m=e=>{var t=whe();J(()=>l1(t,`href`,`#${Y(a)}-border`)),Z(e,t)};Q(f,e=>{Y(p)&&Y(p).width>0&&e(m)});var h=q(f),y=K(h),b=K(y),C=q(y),w=e=>{var t=The();J(()=>l1(t,`fill`,`url(#${Y(a)}-overlay)`)),Z(e,t)};Q(C,e=>{Y(k)&&e(w)});var A=q(C),j=e=>{var t=Ehe();J(()=>{l1(t,`href`,`#${Y(a)}
88-border`),l1(t,`stroke`,`url(#${Y(a)}-border-color)`),l1(t,`stroke-width`,Y(p).width*2)}),Z(e,t)};Q(A,e=>{Y(p)&&Y(p).width>0&&e(j)}),J(e=>{n1(t,Y(x)),l1(n,`viewBox`,Y(D)),n1(n,Y(O)),l1(i,`id`,`${Y(a)}-path`),l1(o,`id`,`${Y(a)}-border`),l1(h,`clip-path`,`url(#${Y(a)}-path)`),l1(b,`src`,Y(_).original),n1(b,`object-fit:${e??``}`)},[()=>P2(Y(l))]),C1(n,`contentRect`,e=>G(S,e)),w1(t,`clientWidth`,e=>G(v,e)),Z(e,t)};Q(M,e=>{Y(A)&&e(N)}),Z(e,j),KY()}var S3=Symbol(`packageId`);function Ahe(e){WY(S3,e)}function jhe(){return UY(S3)}function Mhe(e,t){GY(t,!0);let n=()=>R1(p,`$selectedPackageId`,c),r=()=>R1(m,`$variablesPerPackage`,c),i=()=>R1(b,`$fallbackVariables`,c),a=()=>R1(h,`$baseVariables`,c),o=()=>R1(g,`$infoPerPackage`,c),s=()=>R1(C,`$fallbackPackageInfo`,c),[c,l]=B1(),u=N1(t.package_id);$Z(()=>{u.set(t.package_id)}),Ahe(u);let{defaultPackageId:d,emitComponentInteraction:f,selectedPackageId:p,variablesPerPackage:m,baseVariables:h,infoPerPackage:g}=M0();$Z(()=>{if(t.is_selected_by_default){let e=t.package_id;QQ(()=>{z1(p,e)})}});let _=W(()=>n()===t.package_id),v=N1(Y(_));$Z(()=>{v.set(Y(_))}),P0(v);let y=()=>{let e=n();e!==t.package_id&&(z1(p,t.package_id),f({componentType:`package`,componentName:t.name,componentValue:t.package_id,originPackageId:e,destinationPackageId:t.package_id,defaultPackageId:d}))},b=$0(),x=W(()=>{let e=r()?.[t.package_id];return e===void 0?i():{...a(),...e}}),S=N1(Y(x));$Z(()=>{S.set(Y(x))}),Q0(S);let C=Pfe(),w=W(()=>o()?.[t.package_id]??s()),T=N1(Y(w));$Z(()=>{T.set(Y(w))}),k0(T),h3(e,H1(()=>t.stack,{onclick:y})),KY(),l()}var Nhe;(function(e){e.weekly=`$rc_weekly`,e.monthly=`$rc_monthly`,e.two_month=`$rc_two_month`,e.three_month=`$rc_three_month`,e.six_month=`$rc_six_month`,e.annual=`$rc_annual`,e.lifetime=`$rc_lifetime`})(Nhe||={});function C3(e,t){let n=Object.fromEntries(Object.entries(e).map(([e,{value:t}])=>[e,String(t)]));return t?{...Object.fromEntries(Object.entries(t.custom_variables??{}).map(([e,{default_value:t}])=>[e,String(t)])),...n}:n}var w3=`--rc-purchases-ui-bg-color`;function Phe(e,t,n){let r=e=>n===`dark`?e?.dark:e?.light;return r(e)??r(t)??null}var T3=/^#[0-9a-fA-F]{6}([0-9a-fA-F]{2})?$/;function Fhe(e){return T3.test(e)}function Ihe(e){let t=T3.exec(e);return t!=null&&(t[1]==null||t[1].toLowerCase()===`ff`)}function E3(e){return e.length===7?`${e.toLowerCase()}ff`:e.toLowerCase()}function D3(e,t,n){let r=Phe(e,t,n);return r?O2(r):null}function O3(e,t){let n=e[0],r=e.at(-1);if(n==null||r==null)return null;if(t<=n.percent)return E3(n.color);if(t>=r.percent)return E3(r.color);let i=e.findIndex(e=>e.percent>=t),a=e[i-1],o=e[i];return a==null||o==null?null:a.color.toLowerCase()===o.color.toLowerCase()?E3(a.color):a.percent===o.percent?E3(o.color):null}function Lhe(e){return e.filter(e=>Number.isFinite(e.percent)&&Fhe(e.color)).slice().sort((e,t)=>e.percent-t.percent)}function k3(e,[t,n]){let r=O3(e,t);if(r==null||!Ihe(r))return null;let i=[t,...e.map(e=>e.percent).filter(e=>e>t&&e<n),n];return i.every((t,n)=>{if(O3(e,t)!==r)return!1;let a=i[n+1];return a==null||a===t?!0:O3(e,(t+a)/2)===r})?r:null}function A3(e){return Math.abs(e)<1e-10?0:e}function j3(e,t,n,r){let i=e*Math.PI/180,a=A3(Math.sin(i)),o=A3(-Math.cos(i)),s=Math.abs(a)*r.width+Math.abs(o)*r.height;return((t-r.width/2)*a+(n-r.height/2)*o+s/2)/s*100}function Rhe(e,t,n){let r=t===`top`?0:n.height,i=j3(e,0,r,n),a=j3(e,n.width,r,n);return[Math.min(i,a),Math.max(i,a)]}function M3(e,t,n){let r=Math.hypot(n.width/2,n.height/2);return Math.hypot(e-n.width/2,t-n.height/2)/r*100}function zhe(e,t){let n=e===`top`?0:t.height,r=M3(t.width/2,n,t),i=M3(0,n,t);return[Math.min(r,i),Math.max(r,i)]}function N3(e,t,n,r){switch(e.type){case`hex`:case`alias`:return O2(e);case`linear`:return k3(r??[],Rhe(e.degrees,t,n));case`radial`:return k3(r??[],zhe(t,n))}}function Bhe(e,t,n,r){let i=null,a=null;if(e?.type===`color`){let r=T2(t,e.value),o=r.type===`linear`||r.type===`radial`?Lhe(r.points):null;i=N3(r,`top`,n,o),a=N3(r,`bottom`,n,o)}if(r!=null&&r.stickyComponents){let e=r.stickyComponents.hasHeader===!0,t=r.stickyComponents.hasFooter===!0;i=t&&!e?i:null,a=e&&!t?a:null}if(r?.paywallFallbackColor!=null||r?.hostFallbackColor!=null){let e=D3(r.paywallFallbackColor,r.hostFallbackColor,t);i??=e,a??=e}return{top:i,bottom:a}}var P3=null;function Vhe(e,t,n){if(typeof document>`u`)return()=>{};let{paywallData:r,colorMode:i,hostFallbackColor:a}=n,o=document.documentElement,s=r?.components_config?.base,c=null;if(t.kind===`style`&&t.style.background){let e=t.style.background;if(!e.includes(`gradient`))c=e;else{let e=Bhe(s?.background,i,{width:window.innerWidth,height:window.innerHeight},{stickyComponents:{hasHeader:s?.header!=null,hasFooter:s?.sticky_footer!=null}});c=e.top??e.bottom}}return c===null&&(c=D3(s?.safe_area_fallback_color,a,i)),c!==null&&(P3=e,o.style.setProperty(w3,c)),(
88)=>{P3===e&&(P3=null,o.style.removeProperty(w3))}}var Hhe=X(`<div class="backdrop svelte-1ozp8sb" role="presentation" tabindex="-1" aria-hidden="true"><div role="dialog" aria-modal="true"><!> <!></div></div>`),Uhe={hash:`svelte-1ozp8sb`,code:`.backdrop.svelte-1ozp8sb {position:absolute;inset:0 0 0 0;width:100%;height:100%;background-color:#0000003f;display:flex;flex-direction:column;}.sheet.svelte-1ozp8sb {position:absolute;inset:auto 0 0 0;transition-property:transform;transition-duration:225ms;transition-timing-function:cubic-bezier(0, 0, 0.2, 1);transform:translateY(100%);&::before {content:"";position:absolute;inset:0;background:var(--overlay);pointer-events:none;}&.visible {transform:translateY(0);}}.sheet.rc-sheet-video-bg.svelte-1ozp8sb::before {z-index:2;} 89 90 /* Match stack video stacking: tint above video (::before z-index). */.sheet.rc-sheet-video-bg.svelte-1ozp8sb > .rc-bg-video {z-index:1;}.sheet.rc-sheet-video-bg.svelte-1ozp8sb > .rc-sheet-stack-above-video {position:relative;z-index:3;}`};function Whe(e,t){GY(t,!0),J$(e,Uhe);let n=V1(t,[`$$slots`,`$$events`,`$$legacy`]),{stack:r}=n,i=t2({state:!0}),a=W(()=>({...n,...u2(i(),t.overrides)})),o=W(()=>Y(a).size),s=W(()=>Y(a).background),c=W(()=>Y(a).background_blur),l=W(v2()),u=W(()=>Y(s)?.type===`video`),d=W(()=>{if(!Y(u))return null;let e=Y(s);return!e||e.type!==`video`?null:F2(Y(l),e)}),f=W(()=>S2({background:Y(c)?`#0000003f`:``})),p=W(()=>S2({height:E2(Y(o).height),...i3({hasVideoBg:Y(u),clipOverflow:!0}),...I2(Y(l),null,Y(s))})),{onButtonAction:m}=M0(),h,g=CZ(!1);j$(()=>{requestAnimationFrame(()=>{G(g,!0)})});let _=()=>{G(g,!1)},v=()=>{Y(g)||m({type:`navigate_to`,destination:`sheet`,sheet:null})},y=e=>{e.target===e.currentTarget&&_()},b=e=>{e.key===`Escape`&&_()},x=W(()=>[`sheet ${Y(g)?`visible`:``}
90`,Y(u)?r3(`sheet`):``].filter(Boolean).join(` `));var S=Hhe();S.__click=y,S.__keydown=b;var C=K(S),w=K(C),T=e=>{n3(e,{get url(){return Y(d).url},get urlLowRes(){return Y(d).url_low_res},get objectFit(){return Y(d).fit},get objectPosition(){return Y(d).position},get poster(){return Y(d).posterWebp},get mute(){return Y(d).mute},get loop(){return Y(d).loop}})};Q(w,e=>{Y(d)&&e(T)});var E=q(w,2);{let e=W(()=>Y(u)?`rc-sheet-stack-above-video`:void 0);h3(E,H1(()=>r,{get class(){return Y(e)}}))}E1(C,e=>h=e,()=>h),J(()=>{n1(S,Y(f)),e1(C,1,X$(Y(x)),`svelte-1ozp8sb`),n1(C,Y(p))}),o$(`transitionend`,C,v),Z(e,S),KY()}s$([`click`,`keydown`]);var Ghe=X(`<div></div>`),Khe=X(`<div class="viewport-backdrop svelte-1h1llo0"><!> <!></div>`),qhe={hash:`svelte-1h1llo0`,code:`.viewport-backdrop.svelte-1h1llo0 {position:fixed;inset:0;z-index:0;pointer-events:none;overflow:hidden;isolation:isolate;}.viewport-backdrop-overlay.svelte-1h1llo0 {position:absolute;inset:0;pointer-events:none;z-index:1;}.viewport-backdrop-overlay.z-over-video-bg.svelte-1h1llo0 {z-index:2;}`};function Jhe(e,t){GY(t,!0),J$(e,qhe);let n=W(()=>{var e;return t.model.kind===`style`&&(e=t.model.style.background)!=null&&e.includes(`gradient`)?Object.entries(t.model.style).map(([e,t])=>`${e}:${t}`).join(`;`):t.model.kind===`image`?[`background-image:url("${t.model.src}")`,`background-size:${t.model.fit}`,`background-position:${t.model.position}`,`background-repeat:no-repeat`].join(`;`):``}),r=W(()=>t.model.kind!==`image`&&t.model.kind!==`video`||!t.model.overlay||t.model.overlay===`none`?null:`background:${t.model.overlay}`),i=W(()=>Y(n)!==``||t.model.kind===`video`);var a=m$(),o=BZ(a),s=e=>{var i=Khe(),a=K(i),o=e=>{n3(e,{get url(){return t.model.url},get urlLowRes(){return t.model.url_low_res},get objectFit(){return t.model.fit},get objectPosition(){return t.model.position},get poster(){return t.model.posterWebp},get mute(){return t.model.mute},get loop(){return t.model.loop}})};Q(a,e=>{t.model.kind===`video`&&e(o)});var s=q(a,2),c=e=>{var n=Ghe();let i;J(()=>{i=e1(n,1,`viewport-backdrop-overlay svelte-1h1llo0`,null,i,{"z-over-video-bg":t.model.kind===`video`}),n1(n,Y(r))}),Z(e,n)};Q(s,e=>{Y(r)&&e(c)}),J(()=>n1(i,Y(n)===``?void 0:Y(n))),Z(e,i)};Q(o,e=>{Y(i)&&e(s)}),Z(e,a),KY()}var Yhe=X(`<div class="header-wrapper svelte-178te1m"><!></div>`),Xhe=X(`<div class="footer-wrapper svelte-178te1m"><!></div>`),Zhe=X(`<div><!> <!> <div class="paywall-content svelte-178te1m"><!></div> <!></div> <!>`,1),Qhe={hash:`svelte-178te1m`,code:`.paywall.svelte-178te1m {position:relative;display:flex;flex-direction:column;align-items:stretch;height:100%;transition-property:filter, transform;transition-duration:0.1s;transition-timing-function:ease-in-out;transform-origin:center;&.blur {filter:blur(10px) brightness(0.8);transform:scale(1.045);}}.header-wrapper.svelte-178te1m {position:sticky;top:0;width:100%;}.footer-wrapper.svelte-178te1m {position:sticky;bottom:0;width:100%;flex-shrink:0;}.paywall-content.svelte-178te1m {z-index:2;width:100%;flex:1 1 auto;display:flex;flex-direction:column;min-height:0;& > .paywall-content-scroll {flex:1 1 auto;min-height:0;overflow-y:auto;}} 91 /* Scoped reset - same as original but only affects .paywall descendants */.paywall *, 92 .paywall *::before, 93 .paywall *::after {box-sizing:border-box;margin:0;padding:0;font-family:inherit;}.paywall {font-family:sans-serif;line-height:1.5;-webkit-font-smoothing:antialiased;}.paywall img, 94 .paywall picture, 95 .paywall video, 96 .paywall canvas, 97 .paywall svg {display:block;max-width:100%;}.paywall input, 98 .paywall button, 99 .paywall textarea, 100 .paywall select {font:inherit;}.paywall p, 101 .paywall h1, 102 .paywall h2, 103 .paywall h3, 104 .paywall h4, 105 .paywall h5, 106 .paywall h6 {overflow-wrap:break-word;}.paywall p {text-wrap:pretty;}.paywall h1, 107 .paywall h2, 108 .paywall h3, 109 .paywall h4, 110 .paywall h5, 111 .paywall h6 {text-wrap:balance;}.paywall .rc-gradient-border {position:relative;}.paywall .rc-gradient-border::after {content:"";display:var(--rc-border-display, none);position:absolute;inset:calc(-1 * var(--rc-border-width, 0px));border-radius:inherit;padding:var(--rc-border-width, 0px);background:var(--rc-border-bg, transparent);mask:linear-gradient(#fff 0 0) content-box, 112 linear-gradient(#fff 0 0);-webkit-mask:linear-gradient(#fff 0 0) content-box, 113 linear-gradient(#fff 0 0);mask-composite:exclude;-webkit-mask-composite:xor;pointer-events:none;}`};function F3(e,t){GY(t,!0),J$(e,Qhe);let n=()=>R1(x,`$selectedPackageId`,r),[r,i]=B1(),a=$(t,`variablesPerPackage`,19,()=>({})),o=$(t,`globalVariables`,19,()=>({})),s=$(t,`infoPerPackage`,19,()=>({})),c=$(t,`hideBackButtons`,3,!1),l=$(t,`initialInputSelections`,19,()=>({})),u=$(t,`customVariables`,19,()=>({})),d=npe(()=>t.preferredColorMode),f=W(()=>fpe(t.paywallData,d())),p=Symbol();$Z(()=>Vhe(p,Y(f),{paywallData:t.paywallData,colorMode:d(),hostFallbackColor:t.safeAreaFallbackColor}));let{default_locale:m,components_config:h,components_localizations:g}=t.paywallData,{base:_}=h,v=qfe(_),y=W(()=>{let e=Y(f);return e.kind===`style`&&e.style.background&&!e.style.background.includes(`gradient`)?S2(e.style):``}),{getLocalizedString:b}=Gfe(()=>({defaultLocale:m,selectedLocale:t.selectedLocale,localizations:g})),x=N1(v),S=e=>{if(e!==void 0)return e.trim().length>0?e:void 0},C=e=>{var n;(n=t.onComponentInteraction)==null||n.call(t,{...e,componentName:S(e.componentName)})},w=e=>{var r;let i=n();i!==void 0&&((r=t.onPurchaseClicked)==null||r.call(t,i,e??``))},T=CZ(void 0),E=(e,r)=>{var i,a,o,s,c,l,u,d;switch(e.type){case`workflow`:r&&((i=t.onActionTriggered)==null||i.call(t,r));return;case`complete_workflow`:{let n=b(e.url.url_lid);if(!n)return;(a=t.onCompleteWorkflowNavigate)==null||a.call(t,{url:n,method:e.url.method,url_query_params:e.url_query_params});return}case`navigate_back`:(o=t.onBackClicked)==null||o.call(t);return;case`close_workflow`:(s=t.onClose)==null||s.call(t);return;case`restore_purchases`:(c=t.onRestorePurchasesClicked)==null||c.call(t);return}switch(e.destination){case`customer_center`:(l=t.onVisitCustomerCenterClicked)==null||l.call(t);return;case`screen_redirect`:(u=t.onActionTriggered)==null||u.call(t,`screen_redirect`);return;case`privacy_policy`:case`terms`:case`url`:let r=b(e.url.url_lid);r&&((d=t.onNavigateToUrlClicked)==null||d.call(t,r));return;case`sheet`:if(e.sheet)G(T,{props:e.sheet,rootSelectedPackageId:n()},!0);else{if(Y(T)){let e=Y(T).rootSelectedPackageId;C({componentType:`package_selection_sheet`,componentName:Y(T).props.name,componentValue:`close`,currentPackageId:n(),resultingPackageId:e}),x.set(e)}G(T,void 0)}return;case`offer_code`:case`web_paywall_link`:return}},D=C3(u(),t.uiConfig);j0({defaultPackageId:v,selectedPackageId:x,variablesPerPackage:M1(a()),baseVariables:M1({...o(),...D}),infoPerPackage:M1(s()),onPurchase:w,emitComponentInteraction:C,onNavigateToUrl:t.onNavigateToUrlClicked,onButtonAction:E,onInputChanged:t.onInputChanged,onSensitiveInputChanged:t.onSensitiveInputChanged,onReservedAttributeChanged:t.onReservedAttributeChanged,walletButtonRender:t.walletButtonRender,uiConfig:t.uiConfig,hideBackButtons:c()});let O=X0(),k=O??new q0;k.registerDeclarations(t.paywallData.state_declarations??{}),O||Y0(k),Ufe(Hfe()),Wfe(l()),Q0(P1(x,e=>{let t=a()[e||``];return{...o(),...D,...t}})),k0(P1(x,e=>s()[e||``])),j$(()=>{ppe(t.uiConfig)}
113);let A=W(()=>Y(T)?`paywall blur`:`paywall`),{stack:j,sticky_footer:M,header:N}=_,P=j.components[0],F=P?.type===`image`&&P.size.width.type===`fill`,ee=!!N&&F,I=CZ(0),te=CZ(0),ne=W(()=>t.maxContentWidth?`max-width: ${t.maxContentWidth}; margin-inline: auto;`:``);var re=m$();zX(BZ(re),{get onerror(){return t.onError}},e=>{var t=Zhe(),n=BZ(t),r=K(n);Jhe(r,{get model(){return Y(f)}});var i=q(r,2),a=e=>{var t=Yhe();y3(K(t),H1(()=>N)),J(()=>n1(t,`z-index: ${f2};`)),w1(t,`clientHeight`,e=>G(I,e)),Z(e,t)};Q(i,e=>{N&&e(a)});var o=q(i,2),s=K(o);{let e=W(()=>M?{...j.padding,bottom:(j.padding?.bottom??0)+Y(te)}:j.padding),t=W(()=>({height:`auto`,...ee?{"margin-top":`-${Y(I)}px`}:{}}));h3(s,H1(()=>j,{class:`paywall-content-scroll`,get padding(){return Y(e)},get style(){return Y(t)}}))}var c=q(o,2),l=e=>{var t=Xhe();v3(K(t),H1(()=>M)),J(()=>n1(t,`z-index: ${f2}; margin-top: -${Y(te)??``}px; ${Y(ne)??``}`)),w1(t,`clientHeight`,e=>G(te,e)),Z(e,t)};Q(c,e=>{M&&e(l)});var u=q(n,2),d=e=>{Whe(e,H1(()=>Y(T).props))};Q(u,e=>{Y(T)&&e(d)}),J(()=>{e1(n,1,X$(Y(A)),`svelte-178te1m`),n1(n,Y(y)),n1(o,Y(ne))}),Z(e,t)}),Z(e,re),KY(),i()}function $he(e,t){GY(t,!0);let n=()=>R1(u,`$infoPerPackage`,i),r=()=>R1(l,`$selectedPackageId`,i),[i,a]=B1(),{stack:o}=V1(t,[`$$slots`,`$$events`,`$$legacy`]),{emitComponentInteraction:s,onPurchase:c,selectedPackageId:l,infoPerPackage:u}=M0(),{getLocalizedString:d}=s2(),f=jhe(),p=(e,t,n)=>{let r=e.indexOf(`#`),i=r===-1?``:e.slice(r),a=r===-1?e:e.slice(0,r);return`${a}${a.includes(`?`)?`&`:`?`}${encodeURIComponent(t)}=${encodeURIComponent(n)}${i}`},m=e=>{var r;let i,a=t.method?.type===`unknown`||(r=t.method)==null?void 0:r.type,o=n()?.[e]?.webCheckoutURL;if(t.method?.type===`custom_web_checkout`){let n=d(t.method.custom_url.url_lid);if(n){let r=t.method.custom_url.package_param;i=r?p(n,r,e):n}}if(i===void 0){let e=a??t.action;(e===`web_checkout`||e===`web_product_selection`||e===`custom_web_checkout`)&&(i=o)}return{componentType:`purchase_button`,componentName:t.name,componentValue:a??t.action??`web_checkout`,...i?{componentURL:i}:{},currentPackageId:e}};h3(e,H1(()=>o,{onclick:()=>{let e=(f?F1(f):void 0)??r();e!==void 0&&(z1(l,e),s(m(e))),c(t.triggers?.on_purchase_press)}})),KY(),a()}function ege(e){return{display:`grid`,"grid-template-columns":`auto 1fr`,"column-gap":`${e.column_gutter}px`,"align-items":`stretch`,position:`relative`,flex:`0 1 auto`,width:E2(e.size.width),height:E2(e.size.height),padding:D2(e.padding),margin:D2(e.margin)}}function tge(e,t){return{display:`flex`,"flex-direction":`column`,"justify-content":`flex-start`,"align-items":`flex-start`,gap:`${t.text_spacing}px`,height:`fit-content`,"margin-bottom":`${t.item_spacing}px`}}var nge=X(`<div><div></div></div>`),rge=X(`<div><!> <div><!></div></div> <div><!> <!></div>`,1);function ige(e,t){GY(t,!0);let n=V1(t,[`$$slots`,`$$events`,`$$legacy`]),r=t2(),i=W(()=>({...n,...u2(r(),t.overrides)})),a=W(()=>Y(i).icon),o=W(()=>Y(i).title),s=W(()=>Y(i).description),c=W(()=>Y(i).connector),l=W(()=>Y(i).text_spacing),u=W(()=>Y(i).item_spacing),d=W(v2()),f=S2({position:`relative`}),p=S2({position:`relative`,"z-index":`2`}),m=W(()=>S2(tge(Y(d),{text_spacing:Y(l),item_spacing:Y(u)}))),h=W(()=>Y(c)?S2({position:`absolute`,left:`50%`,top:`${(Y(a)?.size.width.value??24)/2}px`,transform:`translateX(-50%)`,"z-index":`1`,width:`${Y(c).width}px`,height:`100%`,"padding-top":`${Y(c).margin.top}px`,"padding-bottom":`${Y(c).margin.bottom}px`}):``),g=W(()=>Y(c)?S2({width:`100%`,height:`100%`,background:k2(Y(d),Y(c).color)}):``);var _=rge(),v=BZ(_),y=K(v),b=e=>{var t=nge(),n=K(t);J(()=>{n1(t,Y(h)),n1(n,Y(g))}),Z(e,t)};Q(y,e=>{Y(c)&&e(b)});var x=q(y,2);c3(K(x),H1(()=>Y(a)));var S=q(v,2),C=K(S);$4(C,H1(()=>Y(o)));var w=q(C,2),T=e=>{$4(e,H1(()=>Y(s)))};Q(w,e=>{Y(s)&&e(T)}),J(()=>{n1(v,f),n1(x,p),n1(S,Y(m))}),Z(e,_),KY()}var age=X(`<div></div>`);function oge(e,t){GY(t,!0);let n=V1(t,[`$$slots`,`$$events`,`$$legacy`]),r=t2(),i=W(()=>({...n,...u2(r(),t.overrides)})),a=W(()=>Y(i).items),o=W(()=>Y(i).text_spacing),s=W(()=>Y(i).item_spacing),c=W(()=>Y(i).column_gutter),l=W(()=>Y(i).icon_alignment),u=W(()=>Y(i).size),d=W(()=>Y(i).padding),f=W(()=>Y(i).margin),p=W(()=>Y(i).visible),m=W(()=>$Q(Y(i),[`items`,`text_spacing`,`item_spacing`,`column_gutter`,`icon_alignment`,`size`,`padding`,`margin`,`visible`])),h=W(()=>Y(p)!==!1),g=W(()=>S2(ege({items:Y(a),text_spacing:Y(o),item_spacing:Y(s),column_gutter:Y(c),icon_alignment:Y(l),size:Y(u),padding:Y(d),margin:Y(f),...Y(m)})));var _=m$(),v=BZ(_),y=e=>{var t=age();L$(t,21,()=>Y(a),e=>e.id,(e,t)=>{ige(e,H1(()=>Y(t),{get text_spacing(){return Y(o)},get item_spacing(){return Y(s)}}))}),J(()=>n1(t,Y(g))),Z(e,t)};Q(v,e=>{Y(h)&&Y(a).length&&e(y)}),Z(e,_),KY()}var sge=X(`<div><p>No paywall data provided</p></div>`),cge=X(`<div class="paywall-container"><!></div>`);function lge(e,t){GY(t,!0);let n=$(t,`selectedLocale`,3,`en_US`),r=$(t,`globalVariables`,19,()=>({})),i=$(t,`containerId`,3,`screen-container`),a=$(t,`initialInputSelections`,19,()=>({}));var o=cge(),s=K(o),c=e=>{F3(e,{get paywallData(){return t.paywallComponents},get selectedLocale(){return n()},get uiConfig(){return t.uiConfig},get variablesPerPackage(){return t.variablesPerPackage},get infoPerPackage(){return t.infoPerPackage},get globalVariables(){return r()},get maxContentWidth(){return t.maxContentWidth},get initialInputSelections(){return a()},onNavigateToUrlClicked:e=>{t.onNavigateToUrlClicked?t.onNavigateToUrlClicked(e):window.open(e,`_blank`)},get onCompleteWorkflowNavigate(){return t.onCompleteWorkflowNavigate},onVisitCustomerCenterClicked:()=>t.onVisitCustomerCenterClicked?.call(t),get onBackClicked(){return t.onBackClicked},get onClose(){return t.onClose},onRestorePurchasesClicked:()=>t.onRestorePurchasesClicked?.call(t),onActionTriggered:e=>{var n;(n=t.onActionTriggered)==null||n.call(t,e)},get onComponentInteraction(){return t.onComponentInteraction},get onPurchaseClicked(){return t.onPurchaseClicked},get onInputChanged(){return t.onInputChanged},get onSensitiveInputChanged(){return t.onSensitiveInputChanged},get onReservedAttributeChanged(){return t.onReservedAttributeChanged},get walletButtonRender(){return t.walletButtonRender},get safeAreaFallbackColor(){return t.safeAreaFallbackColor},onError:e=>{console.error(`Paywall error:`,e)}})},l=e=>{Z(e,sge())};Q(s,e=>{t.paywallComponents?e(c):e(l,!1)}),J(()=>l1(o,`id`,i())),Z(e,o),KY()}function uge(e,t){GY(t,!0);
113function n(e){return e.type===`step`&&typeof e.step_id==`string`}let r=new q0;Y0(r);function i(e){let t={};for(let n of Object.values(e))for(let[e,r]of Object.entries(n.state_declarations??{}))Object.hasOwn(t,e)||(t[e]=r);return t}let a=CZ(void 0);tQ(()=>{Y(a)!==t.workflow.workflowId&&(G(a,t.workflow.workflowId,!0),r.reset(i(t.workflow.pages)))});let o=CZ(kZ([])),s=CZ(void 0),c=W(()=>Y(o)[Y(o).length-1]??{pageId:t.workflow.initial_page_id,stepId:t.workflow.initial_step_id}),l=W(()=>t.workflow.pages[Y(c).pageId]);tQ(()=>{let e=`${t.workflow.workflowId}:${t.workflow.initial_page_id}`;Y(s)!==e&&(G(s,e),G(o,[{pageId:t.workflow.initial_page_id,stepId:t.workflow.initial_step_id}],!0),d({workflowId:t.workflow.workflowId,stepId:t.workflow.initial_step_id,fromStepId:void 0,toStepId:void 0,reason:`start`,...u(t.workflow.initial_step_id)}))});function u(e){let r=t.workflow.steps[e];return{isFirstStep:e===t.workflow.initial_step_id,isLastStep:r!==void 0&&!Object.values(r.trigger_actions).some(e=>n(e))}}function d(e){var n;(n=t.onStepChanged)==null||n.call(t,e)}function f(e){var r,i,a;let s=t.workflow.steps[Y(c).stepId];if(!s){console.warn(`[Workflow] onActionTriggered: no current step found for step_id "${Y(c).stepId}"`);return}let l=s.triggers.find(t=>t.component_id===e)?.action_id;if(!l){console.warn(`[Workflow] onActionTriggered: no trigger entry found for component "${e}" on step "${Y(c).stepId}"`),(r=t.onActionTriggered)==null||r.call(t,e);return}let f=s.trigger_actions[l];if(!f){console.warn(`[Workflow] onActionTriggered: no trigger_action found for action_id "${l}" on step "${Y(c).stepId}"`),(i=t.onActionTriggered)==null||i.call(t,e);return}if(!n(f)){console.warn(`[Workflow] onActionTriggered: trigger_action is not a simple step action, falling back to onActionTriggered`),(a=t.onActionTriggered)==null||a.call(t,e);return}let p=t.workflow.steps[f.step_id];
113if(!p){console.warn(`[Workflow] onActionTriggered: step_id "${f.step_id}" not found in workflow steps`);return}let m=p.screen_id;if(!m){console.warn(`[Workflow] onActionTriggered: step "${f.step_id}" has no screen_id (logic/experiment step?)`);return}if(!t.workflow.pages[m]){console.warn(`[Workflow] onActionTriggered: screen_id "${m}" not found in workflow pages`);return}let h=Y(c).stepId,g=f.step_id;d({workflowId:t.workflow.workflowId,stepId:h,fromStepId:void 0,toStepId:g,reason:`completed`,...u(h)}),G(o,[...Y(o),{pageId:m,stepId:g}],!0),d({workflowId:t.workflow.workflowId,stepId:g,fromStepId:h,toStepId:void 0,reason:`forward`,...u(g)})}function p(){var e;if(Y(o).length>1){let e=Y(c).stepId,n=Y(o)[Y(o).length-2].stepId;d({workflowId:t.workflow.workflowId,stepId:e,fromStepId:void 0,toStepId:n,reason:`completed`,...u(e)}),G(o,Y(o).slice(0,-1),!0),d({workflowId:t.workflow.workflowId,stepId:n,fromStepId:e,toStepId:void 0,reason:`back`,...u(n)})}else d({workflowId:t.workflow.workflowId,stepId:Y(c).stepId,fromStepId:void 0,toStepId:void 0,reason:`completed`,...u(Y(c).stepId)}),(e=t.onExitBack)==null||e.call(t)}var m=m$();N$(BZ(m),()=>Y(c).pageId,e=>{lge(e,{get paywallComponents(){return Y(l)},get uiConfig(){return t.uiConfig},get selectedLocale(){return t.selectedLocale},get globalVariables(){return t.globalVariables},get variablesPerPackage(){return t.variablesPerPackage},get maxContentWidth(){return t.maxContentWidth},get initialInputSelections(){return t.initialInputSelections},get containerId(){return t.containerId},get walletButtonRender(){return t.walletButtonRender},get safeAreaFallbackColor(){return t.safeAreaFallbackColor},get onPurchaseClicked(){return t.onPurchaseClicked},onActionTriggered:f,get onInputChanged(){return t.onInputChanged},get onSensitiveInputChanged(){return t.onSensitiveInputChanged},get onReservedAttributeChanged(){return t.onReservedAttributeChanged},get onCompleteWorkflowNavigate(){return t.onCompleteWorkflowNavigate},get onNavigateToUrlClicked(){return t.onNavigateToUrlClicked},get onRestorePurchasesClicked(){return t.onRestorePurchasesClicked},get onVisitCustomerCenterClicked(){return t.onVisitCustomerCenterClicked},get onComponentInteraction(){return t.onComponentInteraction},onBackClicked:p,onClose:()=>{var e;d({workflowId:t.workflow.workflowId,stepId:Y(c).stepId,fromStepId:void 0,toStepId:void 0,reason:`completed`,...u(Y(c).stepId)}),(e=t.onClose)==null||e.call(t)}})}),Z(e,m),KY()}var dge=X(`<img alt="" class="svelte-duamz6"/>`),fge=X(`<video playsinline="" class="svelte-duamz6"><track kind="captions"/></video>`,2),pge=f$(`<use fill="transparent"></use>`),mge=f$(`<rect x="0" y="0" height="100%" width="100%"></rect>`),hge=f$(`<use fill="none"></use>`),gge=X(`<div class="video-outer svelte-duamz6"><div class="video-media svelte-duamz6"><div class="video-clip"><!></div> <svg class="video-deco svelte-duamz6" width="100%" height="100%"><defs><clipPath><!></clipPath><g><!></g><!><!></defs><!><g><!><!></g></svg></div></div>`),_ge={hash:`svelte-duamz6`,code:`.video-outer.svelte-duamz6 {position:relative;}.video-media.svelte-duamz6 {position:relative;width:100%;height:100%;min-height:0;}.video-deco.svelte-duamz6 {position:absolute;inset:0;width:100%;height:100%;pointer-events:none;}video.svelte-duamz6, 114 img.svelte-duamz6 {width:100%;height:100%;object-fit:contain;object-position:center;} 115 116 /* Own compositing layer â mitigates WebKit freezing video frames under animated/transform ancestors */video.svelte-duamz6 {transform:translateZ(0);-webkit-transform:translateZ(0);}`};function vge(e,t){GY(t,!0),J$(e,_ge);let n=V1(t,[`$$slots`,`$$events`,`$$legacy`]),r=t2(),i=W(()=>({...n,...u2(r(),t.overrides)})),a=W(()=>Y(i).id),o=W(()=>Y(i).source),s=W(()=>Y(i).fallback_source),c=W(()=>Y(i).size),l=W(()=>Y(i).mask_shape),u=W(()=>Y(i).fit_mode),d=W(()=>Y(i).padding),f=W(()=>Y(i).margin),p=W(()=>Y(i).color_overlay),m=W(()=>Y(i).border),h=W(()=>Y(i).shadow),g=W(()=>Y(i).auto_play),_=W(()=>Y(i).loop),v=W(()=>Y(i).mute_audio),y=W(()=>Y(i).show_controls),b=W(()=>Y(i).visible),x=W(v2()),S=W(()=>Y(o)?T2(Y(x),Y(o)):null),C=W(()=>Y(s)?T2(Y(x),Y(s)):null),w=CZ(0),T=CZ(kZ({height:0,width:0})),E=CZ(null),D=CZ(!1),O=CZ(!1),k=CZ(null);$Z(()=>
116{if(Y(S)){if(Y(S).width&&Y(S).height){G(T,{height:Y(S).height,width:Y(S).width},!0);return}if(Y(E)){let e=()=>{G(T,{height:Y(E)?.videoHeight??0,width:Y(E)?.videoWidth??0},!0)},t=()=>{G(D,!0)};return Y(E).addEventListener(`loadedmetadata`,e),Y(E).addEventListener(`error`,t),()=>{var n,r;(n=Y(E))==null||n.removeEventListener(`loadedmetadata`,e),(r=Y(E))==null||r.removeEventListener(`error`,t)}}}else if(Y(C)){if(Y(C).width&&Y(C).height){G(T,{height:Y(C).height,width:Y(C).width},!0);return}let e=new window.Image;e.src=Y(C).original;let t=()=>{G(T,{height:e.height,width:e.width},!0)};return e.addEventListener(`load`,t),()=>{e.removeEventListener(`load`,t)}}});let A=W(()=>{if(Y(c).height.type===`fixed`)return Y(c).height.value;let e=Y(T).width,t=Y(T).height;return!Number.isFinite(e)||!Number.isFinite(t)||e<=0||t<=0?Y(w)>0?Math.round(Y(w)*(9/16)):200:Math.round(Y(w)*(t/e))}),j=W(()=>S2({width:E2(Y(c).width),height:`${Y(A)}px`,margin:D2(Y(f)),padding:D2(Y(d)),"line-height":0,"flex-shrink":Y(c).width.type===`fixed`?0:1})),M=CZ(null),N=W(()=>[Y(M)?.width??0,Y(M)?.height??0]),P=W(()=>qJ(Y(N),2)),F=W(()=>Y(P)[0]),ee=W(()=>Y(P)[1]),I=W(()=>`0 0 ${Y(F)} ${Y(ee)}`),te=W(()=>{var e;if(!((e=Y(h))!=null&&e.color))return``;let{x:t,y:n,radius:r,color:i}=Y(h);return`filter:drop-shadow(${t}px ${n}px ${r}px ${k2(Y(x),i)})`}),ne=W(()=>Y(te)?`${Y(j)};${Y(te)}`:Y(j)),re=W(()=>S2({width:`100%`,height:`100%`,overflow:`hidden`,"border-radius":M2(Y(l)),"clip-path":Y(l)?.type===`concave`||Y(l)?.type===`convex`?`url(#${Y(a)}-path)`:`none`})),ie=W(()=>Y(p)&&T2(Y(x),Y(p))),ae=W(()=>Y(D)||!Y(S));$Z(()=>{if(!Y(g)){QQ(()=>{G(O,!1)});return}if(Y(ae)||!Y(S)){QQ(()=>{G(O,!1)});return}let e=Y(E);if(!e)return;let t=Y(S).url,n=Y(k)!==t;n&&(G(k,t,!0),QQ(()=>{G(O,!1)}));let r=!1,i=()=>{e3(e,{preferMuted:Y(v),mutedPlaybackOverride:Y(O)})},a=null,o=()=>{a!==null&&(e.removeEventListener(`playing`,a),a=null)},s=()=>{if(r||!e.paused||(i(),e.readyState<HTMLMediaElement.HAVE_CURRENT_DATA))return;let t=e.play();t!==void 0&&t.catch(()=>{if(!(r||!e.isConnected)&&!Y(v)&&!Y(O)){QQ(()=>{G(O,!0)}),e3(e,{preferMuted:Y(v),mutedPlaybackOverride:!0});let t=!1,n=()=>{t||Y(v)||r||!e.isConnected||(t=!0,queueMicrotask(()=>{if(r)return;QQ(()=>{G(O,!1)}),i(),e.volume=1;let t=e.play();t!==void 0&&t.catch(()=>{r||!e.isConnected||(QQ(()=>{G(O,!0)}),i())})}))},s=()=>{r||!e.isConnected||(a=null,n())},c=e.play();c===void 0?(a=s,e.addEventListener(`playing`,s,{once:!0})):c.then(()=>{r||Y(v)||t||(a=s,e.addEventListener(`playing`,s,{once:!0}),queueMicrotask(()=>{if(!(r||Y(v)||t||e.paused)){if(!e.muted){o();return}n()}}))})}})};n&&e.readyState<HTMLMediaElement.HAVE_CURRENT_DATA&&(()=>{if(i(),Y(v))e.play().catch(()=>{});else try{e.load()}catch{}})();let c=t3(e,s,()=>r);return()=>{r=!0,o(),c()}});let oe=W(()=>Y(b)!==!1);var se=m$(),ce=BZ(se),le=e=>{var t=gge(),n=K(K(t)),r=K(n),i=e=>{var t=dge();J(e=>{l1(t,`src`,Y(C).original),n1(t,`object-fit:${e??``}`)},[()=>P2(Y(u))]),Z(e,t)},o=e=>{var t=m$(),n=BZ(t),r=e=>{var t=fge();E1(t,e=>G(E,e),()=>Y(E)),J(e=>{l1(t,`src`,Y(S).url),n1(t,`object-fit:${e??``}`),t.loop=Y(_),t.muted=Y(v)||Y(O),t.controls=Y(y),t.autoplay=Y(g),l1(t,`preload`,Y(g)?`auto`:`metadata`)},[()=>P2(Y(u))]),Z(e,t)};Q(n,e=>{Y(S)&&e(r)},!0),Z(e,t)};Q(r,e=>{Y(ae)&&Y(C)?e(i):e(o,!1)});var s=q(n,2),c=K(s),d=K(c);b3(K(d),{get shape(){return Y(l)},get width(){return Y(F)},get height(){return Y(ee)}});var f=q(d);b3(K(f),{get shape(){return Y(l)},get width(){return Y(F)},get height(){return Y(ee)}});var p=q(f);{let e=W(()=>`${Y(a)}-overlay`);x3(p,{get id(){return Y(e)},get overlay(){return Y(ie)}})}var h=q(p),b=e=>{{let t=W(()=>`${Y(a)}-border-color`),n=W(()=>T2(Y(x),Y(m).color));x3(e,{get id(){return Y(t)},get overlay(){return Y(n)}})}};Q(h,e=>{Y(m)&&Y(m).width>0&&e(b)});var T=q(c),D=e=>{var t=pge();J(()=>l1(t,`href`,`#${Y(a)}-border`)),Z(e,t)};Q(T,e=>{Y(m)&&Y(m).width>0&&e(D)});var k=q(T),A=K(k),j=e=>{var t=mge();J(()=>l1(t,`fill`,`url(#${Y(a)}-overlay)`)),Z(e,t)};Q(A,e=>{Y(ie)&&e(j)});var N=q(A),P=e=>{var t=hge();J(()=>{l1(t,`href`,`#${Y(a)}
116-border`),l1(t,`stroke`,`url(#${Y(a)}-border-color)`),l1(t,`stroke-width`,Y(m).width*2)}),Z(e,t)};Q(N,e=>{Y(m)&&Y(m).width>0&&e(P)}),J(()=>{n1(t,Y(ne)),n1(n,Y(re)),l1(s,`viewBox`,Y(I)),l1(d,`id`,`${Y(a)}-path`),l1(f,`id`,`${Y(a)}-border`),l1(k,`clip-path`,`url(#${Y(a)}-path)`)}),C1(s,`contentRect`,e=>G(M,e)),w1(t,`clientWidth`,e=>G(w,e)),Z(e,t)};Q(ce,e=>{Y(oe)&&e(le)}),Z(e,se),KY()}var yge=`https:`;function bge(e){let t=Array.from(e).filter(e=>e.charCodeAt(0)>32).join(``),n;try{n=new URL(t)}catch{return null}return n.protocol.toLowerCase()!==yge||n.username!==``||n.password!==``?null:n.href}function xge(e,t){try{return new URL(e).origin===t}catch{return!0}}var Sge=Object.defineProperty,Cge=(e,t,n)=>t in e?Sge(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,I3=(e,t,n)=>Cge(e,typeof t==`symbol`?t:t+``,n),L3=`rc-web-components`,wge=1,Tge=3e4,Ege=`resize`,Dge=`fit`,Oge=new Set([`connect`,`init`,`reject`,`message`,`request`,`response`,`error`]);function kge(e){return typeof e==`string`&&Oge.has(e)}function Age(e){if(typeof e!=`object`||!e)return!1;let t=e;return!(t.channel!==L3||typeof t.protocol_version!=`number`||!Number.isFinite(t.protocol_version)||!kge(t.kind)||typeof t.component_id!=`string`||t.type!==void 0&&typeof t.type!=`string`||t.id!==void 0&&typeof t.id!=`string`||t.error!==void 0&&typeof t.error!=`string`)}function jge(e){return Age(e)?e:null}function Mge(e,t){let n={channel:L3,protocol_version:e.protocol_version??t.protocolVersion,kind:e.kind,component_id:e.component_id??t.componentId};return e.type!==void 0&&(n.type=e.type),e.id!==void 0&&(n.id=e.id),e.payload!==void 0&&(n.payload=e.payload),e.error!==void 0&&(n.error=e.error),n}function Nge(e){if(e instanceof Error)return e.message;if(typeof e==`string`)return e;try{return JSON.stringify(e)}catch{return String(e)}}function Pge(e){return typeof e==`object`&&!!e&&typeof e.then==`function`}function Fge(e){let t=e;typeof t.unref==`function`&&t.unref()}var Ige=class{constructor(e){I3(this,`transport`),I3(this,`protocolVersion`),I3(this,`componentId`),I3(this,`peerWindow`,null),I3(this,`peerOrigin`,null),I3(this,`open`,!1),I3(this,`destroyed`,!1),I3(this,`handshakeError`,null),I3(this,`handlers`,new Map),I3(this,`pending`,new Map),I3(this,`readyListeners`,new Set),I3(this,`readyResolvers`,[]),I3(this,`outbox`,[]),I3(this,`idPrefix`),I3(this,`idCounter`,0),I3(this,`onFrame`,e=>{if(this.destroyed)return;let t=jge(e.data);t&&this.receive(t,e)}),this.transport=e.transport,this.protocolVersion=e.protocolVersion,this.componentId=e.componentId,this.idPrefix=`${e.rolePrefix}-${Math.random().toString(36).slice(2,8)}`,this.transport.subscribe(this.onFrame)}on(e,t){let n=this.handlers.get(e);return n||(n=new Set,this.handlers.set(e,n)),n.add(t),()=>this.off(e,t)}off(e,t){let n=this.handlers.get(e);n&&(n.delete(t),n.size===0&&this.handlers.delete(e))}send(e,t){this.postEnvelope({kind:`message`,type:e,payload:t})}request(e,t,n){let r=n?.timeoutMs??Tge;return new Promise((n,i)=>{if(this.destroyed){i(Error(`Bridge has been destroyed`));return}if(this.handshakeError){i(this.handshakeError);return}let a=this.nextId(),o=setTimeout(()=>{this.pending.delete(a),i(Error(`Request "${e}" timed out after ${r}ms`))},r);Fge(o),this.pending.set(a,{resolve:n,reject:i,timer:o,type:e}),this.postEnvelope({kind:`request`,type:e,id:a,payload:t})})}ready(){return this.open}onReady(e){return this.open?(queueMicrotask(()=>{this.destroyed||e()}),()=>{}):(this.readyListeners.add(e),()=>this.readyListeners.delete(e))}whenReady(){return this.open?Promise.resolve():this.handshakeError?Promise.reject(this.handshakeError):this.destroyed?Promise.reject(Error(`Bridge has been destroyed`)):new Promise((e,t)=>{this.readyResolvers.push({resolve:e,reject:t})})}destroy(){if(this.destroyed)return;this.destroyed=!0,this.open=!1,this.transport.destroy();let e=Error(`Bridge has been destroyed`);this.rejectAllPending(e),this.rejectAllReadyResolvers(e),this.handlers.clear(),this.readyListeners.clear(),this.outbox=[],this.peerWindow=null}buildEnvelope(e){return Mge(e,{protocolVersion:this.protocolVersion,componentId:this.componentId??``})}rawPost(e){this.transport.post(e,{window:this.peerWindow,targetOrigin:this.peerOrigin??``})}acceptOpenFrame(e,t){this.open&&(!this.transport.trustedPeer&&(!this.isExpectedSource(t.source)||!this.isAllowedOrigin(t.origin))||e.component_id===this.componentId&&this.dispatchEnvelope(e))}emitReady(){if(this.open||this.destroyed)return;this.open=!0,this.flushOutbox();let e=this.readyResolvers;this.readyResolvers=[];for(let t of e)t.resolve();let t=[...this.readyListeners];this.readyListeners.clear();for(let e of t)try{e()}catch{}}failHandshake(e){this.open||this.handshakeError||this.destroyed||(this.handshakeError=e,this.rejectAllReadyResolvers(e),this.readyListeners.clear(),this.rejectAllPending(e),this.outbox=[])}
116postEnvelope(e){if(!this.destroyed){if(!this.open){this.outbox.push(e);return}this.rawPost(this.buildEnvelope(e))}}flushOutbox(){let e=this.outbox;this.outbox=[];for(let t of e)this.rawPost(this.buildEnvelope(t))}dispatchEnvelope(e){switch(e.kind){case`message`:this.invokeMessageHandlers(e);break;case`request`:this.invokeRequestHandlers(e);break;case`response`:this.resolvePending(e);break;case`error`:this.rejectPending(e);break}}invokeMessageHandlers(e){let t=e.type;if(typeof t!=`string`)return;let n=this.handlers.get(t);if(!n||n.size===0)return;let r={type:t,kind:`message`};for(let t of[...n])try{let n=t(e.payload,r);Pge(n)&&n.catch(()=>{})}catch{}}async invokeRequestHandlers(e){let t=e.type,n=e.id;if(typeof t!=`string`||typeof n!=`string`)return;let r=this.handlers.get(t);if(!r||r.size===0){this.postEnvelope({kind:`error`,type:t,id:n,error:`No handler registered for request type "${t}"`});return}let i={type:t,kind:`request`,id:n};try{let a=(await Promise.all([...r].map(t=>t(e.payload,i)))).find(e=>e!==void 0);this.postEnvelope({kind:`response`,type:t,id:n,payload:a})}catch(e){this.postEnvelope({kind:`error`,type:t,id:n,error:Nge(e)})}}resolvePending(e){let t=e.id;if(typeof t!=`string`)return;let n=this.pending.get(t);n&&(this.pending.delete(t),clearTimeout(n.timer),n.resolve(e.payload))}rejectPending(e){let t=e.id;if(typeof t!=`string`)return;let n=this.pending.get(t);n&&(this.pending.delete(t),clearTimeout(n.timer),n.reject(Error(e.error??`Request "${n.type}" failed`)))}rejectAllPending(e){let t=[...this.pending.values()];this.pending.clear();for(let n of t)clearTimeout(n.timer),n.reject(e)}rejectAllReadyResolvers(e){let t=this.readyResolvers;this.readyResolvers=[];for(let n of t)n.reject(e)}nextId(){return this.idCounter+=1,`${this.idPrefix}-${this.idCounter}`}},Lge=class{constructor(e){I3(this,`trustedPeer`,!1),I3(this,`self`),I3(this,`listener`,null),this.self=e}subscribe(e){this.listener||(this.listener=t=>{e({data:t.data,source:t.source,origin:t.origin})},this.self.addEventListener(`message`,this.listener))}post(e,t){t.window&&t.window.postMessage(e,t.targetOrigin)}destroy(){this.listener&&=(this.self.removeEventListener(`message`,this.listener),null)}},R3=`null`;function Rge(e){let t=e?.window??globalThis.window;if(!t)throw Error("createHostBridge: no window available. Pass `{ window }` when running outside a browser.");return t}var zge=class extends Ige{constructor(e,t){super({protocolVersion:e.protocolVersion??wge,componentId:e.componentId,transport:t?.transport??new Lge(Rge(t)),rolePrefix:`host`}),I3(this,`iframe`),I3(this,`allowedOrigin`),I3(this,`allowInsecureOpaqueOrigin`),this.iframe=e.iframe,this.allowedOrigin=e.allowedOrigin,this.allowInsecureOpaqueOrigin=e.allowInsecureOpaqueOrigin??!1}receive(e,t){switch(e.kind){case`connect`:this.handleConnect(e,t);break;case`message`:case`request`:case`response`:case`error`:this.acceptOpenFrame(e,t);break}}isExpectedSource(e){let t=this.iframe.contentWindow;return t!==null&&e===t}isAllowedOrigin(e){return!!(e===this.allowedOrigin||e===R3&&this.allowInsecureOpaqueOrigin)}handleConnect(e,t){if(this.open||!this.isExpectedSource(t.source)||!this.isAllowedOrigin(t.origin))return;let n=this.replyTargetOrigin(t.origin),r=t.source;if(e.protocol_version!==this.protocolVersion){let t=this.buildEnvelope({kind:`reject`,error:`Unsupported protocol_version ${e.protocol_version}; host supports ${this.protocolVersion}`});this.transport.post(t,{window:r,targetOrigin:n});return}this.peerWindow=this.iframe.contentWindow??r,this.peerOrigin=n;let i=this.buildEnvelope({kind:`init`});this.rawPost(i),this.emitReady()}replyTargetOrigin(e){return e===R3?`*`:this.allowedOrigin}};function Bge(e,t){return new zge(e,t)}function Vge(e){if(!Number.isInteger(e)||e<1)throw Error(`invalid web_view protocol_version: ${e}`)}async function Hge(e){return Vge(e),Bge}var Uge=X(`<div class="web-view svelte-1x91uxt"><iframe sandbox="allow-scripts allow-same-origin" referrerpolicy="no-referrer" allow="" class="svelte-1x91uxt"></iframe></div>`),Wge={hash:`svelte-1x91uxt`,code:`.web-view.svelte-1x91uxt {position:relative;overflow:hidden;}iframe.svelte-1x91uxt {display:block;width:100%;height:100%;border:0;}`};function Gge(e,t){GY(t,!0),J$(e,Wge);let n=e=>Math.max(1,Math.min(1e4,Math.round(e))),r=e=>typeof e==`number`&&Number.isFinite(e)&&e>0,i=CZ(!1);j$(()=>{G(i,!0)});let a=W(()=>bge(t.url)),o=W(()=>Y(i)&&Y(a)!==null&&!xge(Y(a),window.location.origin)),s=CZ(void 0),c=CZ(void 0),l=e=>e.type===`fit`&&typeof e.default==`number`?e.default:300,u=W(()=>{let{width:e,height:r}=t.size,i=e.type===`fit`,a=r.type===`fit`,o=i?n(Y(s)??l(e)):null,u=a?n(Y(c)??l(r)):null;return S2({width:o==null?E2(e):C2(o),height:u==null?E2(r):C2(u),...o==null?{}:{"max-width":`100%`},...u==null?{}:{"max-height":`100%`},"flex-shrink":e.type===`fixed`||i||a?0:1,"line-height":0})}),d=W(()=>t.visible!==!1),f=CZ(void 0),p;$Z(()=>{let e=Y(a);e!==p&&(G(s,void 0),G(c,void 0),p=e);let n=Y(f),i=t.id,o=t.protocol_version,l=t.size.width.type===`fit`,u=t.
116size.height.type===`fit`;if(!n||!e)return;let d=!1,m;return Hge(o).then(t=>{if(!d)try{m=t({iframe:n,allowedOrigin:new URL(e).origin,componentId:i,protocolVersion:o}),(l||u)&&m.onReady(()=>m?.send(Dge,{width:l,height:u})),m.on(Ege,e=>{let{width:t,height:n}=e??{};l&&r(t)&&G(s,t,!0),u&&r(n)&&G(c,n,!0)})}catch(e){console.warn(`web_view: failed to wire host bridge`,e)}}).catch(()=>{}),()=>{d=!0,m?.destroy()}});var m=m$(),h=BZ(m),g=e=>{var n=Uge(),r=K(n);E1(r,e=>G(f,e),()=>Y(f)),J(()=>{n1(n,Y(u)),l1(r,`title`,t.name??`Web view`),l1(r,`src`,Y(a))}),Z(e,n)};Q(h,e=>{Y(d)&&Y(a)&&Y(o)&&e(g)}),Z(e,m),KY()}function Kge(e){let t=e.steps[e.initial_step_id];if(!t)return console.warn(`[workflowDataToNavData] initial_step_id "${e.initial_step_id}" not found in steps`),null;let n=t.screen_id;return n?e.screens[n]?{workflowId:e.id,initial_page_id:n,initial_step_id:e.initial_step_id,pages:e.screens,steps:e.steps}:(console.warn(`[workflowDataToNavData] screen_id "${n}" not found in screens`),null):(console.warn(`[workflowDataToNavData] initial step "${e.initial_step_id}" has no screen_id (logic/experiment step?)`),null)}var qge=X(`<span><!></span>`),Jge={hash:`svelte-1d00vmd`,code:` 117 /* svelte-ignore css-unused-selector */.rcb-typography-heading-2xl.svelte-1d00vmd {font:var(--rc-text-heading2xl-mobile);} 118 119 /* svelte-ignore css-unused-selector */.rcb-typography-heading-xl.svelte-1d00vmd {font:var(--rc-text-headingXl-mobile);} 120 121 /* svelte-ignore css-unused-selector */.rcb-typography-heading-lg.svelte-1d00vmd {font:var(--rc-text-headingLg-mobile);} 122 123 /* svelte-ignore css-unused-selector */.rcb-typography-heading-md.svelte-1d00vmd {font:var(--rc-text-headingMd-mobile);} 124 125 /* svelte-ignore css-unused-selector */.rcb-typography-body-base.svelte-1d00vmd {font:var(--rc-text-bodyBase-mobile);} 126 127 /* svelte-ignore css-unused-selector */.rcb-typography-body-small.svelte-1d00vmd {font:var(--rc-text-bodySmall-mobile);} 128 129 /* svelte-ignore css-unused-selector */.rcb-typography-label-button.svelte-1d00vmd {font:var(--rc-text-labelButton-mobile);} 130 131 /* svelte-ignore css-unused-selector */.rcb-typography-label-default.svelte-1d00vmd {font:var(--rc-text-labelDefault-mobile);} 132 133 /* svelte-ignore css-unused-selector */.rcb-typography-caption-default.svelte-1d00vmd {font:var(--rc-text-captionDefault-mobile);} 134 135 /* svelte-ignore css-unused-selector */.rcb-typography-caption-link.svelte-1d00vmd {font:var(--rc-text-captionLink-mobile);} 136 137 @container layout-query-container (width >= 768px) { 138 /* svelte-ignore css-unused-selector */.rcb-typography-heading-2xl.svelte-1d00vmd {font:var(--rc-text-heading2xl-desktop);} 139 140 /* svelte-ignore css-unused-selector */.rcb-typography-heading-xl.svelte-1d00vmd {font:var(--rc-text-headingXl-desktop);} 141 142 /* svelte-ignore css-unused-selector */.rcb-typography-heading-lg.svelte-1d00vmd {font:var(--rc-text-headingLg-desktop);} 143 144 /* svelte-ignore css-unused-selector */.rcb-typography-heading-md.svelte-1d00vmd {font:var(--rc-text-headingMd-desktop);} 145 146 /* svelte-ignore css-unused-selector */.rcb-typography-body-base.svelte-1d00vmd {font:var(--rc-text-bodyBase-desktop);} 147 148 /* svelte-ignore css-unused-selector */.rcb-typography-body-small.svelte-1d00vmd {font:var(--rc-text-bodySmall-desktop);} 149 150 /* svelte-ignore css-unused-selector */.rcb-typography-label-button.svelte-1d00vmd {font:var(--rc-text-labelButton-desktop);} 151 152 /* svelte-ignore css-unused-selector */.rcb-typography-label-default.svelte-1d00vmd {font:var(--rc-text-labelDefault-desktop);} 153 154 /* svelte-ignore css-unused-selector */.rcb-typography-caption-default.svelte-1d00vmd {font:var(--rc-text-captionDefault-desktop);} 155 156 /* svelte-ignore css-unused-selector */.rcb-typography-caption-link.svelte-1d00vmd {font:var(--rc-text-captionLink-desktop);} 157 }`};function Yge(e,t){J$(e,Jge);let n=$(t,`size`,3,`body-base`);var r=qge();A$(K(r),()=>t.children??UJ),J(()=>e1(r,1,`rcb-typography rcb-typography-${n()??``}`,`svelte-1d00vmd`)),Z(e,r)}var Xge={outerPadding:{mobile:`clamp(1.3125rem, 5.6vw, 1.5rem)`,desktop:`clamp(1.5rem, 9.44vw, 5rem)`},outerPaddingSmall:{mobile:`clamp(0.75rem, 4.2vw, 1rem)`,desktop:`clamp(1.5rem, 9.44vw, 5rem)`},gapSmall:{mobile:`0.25rem`,desktop:`0.375rem`},gapMedium:{mobile:`0.5rem`,desktop:`0.75rem`},gapLarge:{mobile:`0.75rem`,desktop:`0.75rem`},gapXLarge:{mobile:`1rem`,desktop:`1.5rem`},gapXXLarge:{mobile:`1.25rem`,desktop:`2.25rem`},gapXXXLarge:{mobile:`2.25rem`,desktop:`4.5rem`}
157,inputHeight:{mobile:`3rem`,desktop:`3rem`},gapStripeElement:{mobile:`0.70rem`,desktop:`1rem`}},z3=`-apple-system, BlinkMacSystemFont, avenir next, avenir, segoe ui, helvetica neue, helvetica, Cantarell, Ubuntu, roboto, noto, arial, sans-serif`,B3={regular:`400`,medium:`500`,semibold:`600`},V3={12:`12px`,14:`14px`,16:`16px`,18:`18px`,24:`24px`,28:`28px`,32:`32px`,36:`36px`},H3={120:`120%`,130:`130%`,140:`140%`},U3={tight:`0.20%`,regular:`0`},W3={heading2xl:{fontSize:V3[28],lineHeight:H3[120],fontWeight:B3.semibold,letterSpacing:U3.tight},headingXl:{fontSize:V3[24],lineHeight:H3[130],fontWeight:B3.semibold,letterSpacing:U3.regular},headingLg:{fontSize:`20px`,lineHeight:H3[130],fontWeight:B3.semibold,letterSpacing:U3.regular},headingMd:{fontSize:`16px`,lineHeight:H3[140],fontWeight:B3.medium,letterSpacing:U3.regular},bodyBase:{fontSize:V3[16],lineHeight:H3[140],fontWeight:B3.regular,letterSpacing:U3.regular},bodySmall:{fontSize:V3[14],lineHeight:H3[140],fontWeight:B3.regular,letterSpacing:U3.regular},labelButton:{fontSize:V3[16],lineHeight:H3[140],fontWeight:B3.regular,letterSpacing:U3.tight},labelDefault:{fontSize:V3[14],lineHeight:H3[140],fontWeight:B3.regular,letterSpacing:U3.tight},captionDefault:{fontSize:V3[12],lineHeight:H3[140],fontWeight:B3.regular,letterSpacing:U3.regular},captionLink:{fontSize:V3[12],lineHeight:H3[140],fontWeight:B3.regular,letterSpacing:U3.regular}},G3={heading2xl:{...W3.heading2xl,fontSize:V3[36]},headingXl:{...W3.headingXl,fontSize:V3[32]},headingLg:{...W3.headingLg,fontSize:V3[24]},headingMd:{...W3.headingMd,fontSize:V3[18]},bodyBase:{...W3.bodyBase},bodySmall:{...W3.bodySmall},labelButton:{...W3.labelButton},labelDefault:{...W3.labelDefault},captionDefault:{...W3.captionDefault},captionLink:{...W3.captionLink}},Zge={heading2xl:{mobile:W3.heading2xl,desktop:G3.heading2xl},headingXl:{desktop:G3.headingXl,mobile:W3.headingXl},headingLg:{desktop:G3.headingLg,mobile:W3.headingLg},headingMd:{desktop:G3.headingMd,mobile:W3.headingMd},bodyBase:{desktop:G3.bodyBase,mobile:W3.bodyBase},bodySmall:{desktop:G3.bodySmall,mobile:W3.bodySmall},labelButton:{desktop:G3.labelButton,mobile:W3.labelButton},labelDefault:{desktop:G3.labelDefault,mobile:W3.labelDefault},captionDefault:{desktop:G3.captionDefault,mobile:W3.captionDefault},captionLink:{desktop:G3.captionLink,mobile:W3.captionLink}},Qge={error:`#B0171F`,warning:`#f4e971`,focus:`#1148B8`,accent:`#767676`,primary:`#576CDB`,"primary-hover":`rgba(87, 108, 219, .8)`,"primary-pressed":`rgba(87, 108, 219, .9)`,"primary-text":`#ffffff`,white:`#ffffff`,"grey-text-dark":`rgba(0,0,0,1)`,"grey-text-light":`rgba(0,0,0,0.7)`,"grey-ui-dark":`rgba(0,0,0,0.3)`,"grey-ui-light":`rgba(0,0,0,0.1)`,"input-background":`white`,background:`white`},$ge={error:`#B0171F`,warning:`#f4e971`,focus:`#1148B8`,accent:`#767676`,primary:`#576CDB`,"primary-hover":`rgba(87, 108, 219, .8)`,"primary-pressed":`rgba(87, 108, 219, .9)`,"primary-text":`#ffffff`,white:`#ffffff`,"grey-text-dark":`rgba(0,0,0,1)`,"grey-text-light":`rgba(0,0,0,0.7)`,"grey-ui-dark":`rgba(0,0,0,0.3)`,"grey-ui-light":`rgba(0,0,0,0.1)`,"input-background":`white`,background:`#EFF3FA`},K3={error:`color_error`,focus:`color_accent`,accent:`color_accent`,primary:`color_buttons_primary`},e_e={...K3,"input-background":`color_form_bg`,background:`color_form_bg`},t_e={...K3,"input-background":`color_product_info_bg`,background:`color_product_info_bg`},q3={"input-border-radius":`4px`,"input-button-border-radius":`8px`},n_e={"input-border-radius":`0px`,"input-button-border-radius":`0px`},r_e={"input-border-radius":`12px`,"input-button-border-radius":`9999px`},J3=q3,Y3=e=>e.length==7?{r:parseInt(e.slice(1,3),16),g:parseInt(e.slice(3,5),16),b:parseInt(e.slice(5,7),16)}:e.length==4?{r:parseInt(e[1],16),g:parseInt(e[2],16),b:parseInt(e[3],16)}:null,X3=({r:e,g:t,b:n,luminanceThreshold:r})=>{let i=e=>(e/=255,e<=.03928?e/12.92:((e+.055)/1.055)**2.4);return .2126*i(e)+.7152*i(t)+.0722*i(n)>r},Z3=.37,i_e=(e,t=Z3)=>{let n=X3({...e,luminanceThreshold:t})?`0,0,0`:`255,255,255`;return{"grey-text-dark":`rgb(${n})`,"grey-text-light":`rgba(${n},0.70)`,"grey-ui-dark":`rgba(${n},0.3)`,"grey-ui-light":`rgba(${n},0.1)`}};function a_e(e,t,n){let r=Y3(e)||{r:0,g:0,b:0},i=Y3(t)||{r:255,g:255,b:255},a=Math.round(i.r*n+r.r*(1-n)),o=Math.round(i.g*n+r.g*(1-n)),s=Math.round(i.b*n+r.b*(1-n));return`#${$3(a)}${$3(o)}${$3(s)}`}function Q3(e,t){let n={r:255,g:255,b:255},r=Math.max(0,Math.min(1,t)),i=e,a=Y3(e)||n;(isNaN(a.r)||isNaN(a.g)||isNaN(a.b))&&(a=n,i=`#FFFFFF`);let o=X3({...a,luminanceThreshold:Z3})?`#000000`:`#FFFFFF`;return a_e(i,o,r)}function $3(e){return e.toString(16).padStart(2,`0`).toUpperCase()}var o_e=(e,t,n,r,i=Z3)=>{let a={"grey-text-dark":r[`grey-text-dark`],"grey-text-light":r[`grey-text-light`],"grey-ui-dark":r[`grey-ui-dark`],"grey-ui-light":r[`grey-ui-light`],"primary-text":r[`primary-text`]};if(e!=null&&e.startsWith(`#`)){let t=Y3(e);t!==null&&Object.assign(a,i_e(t))}if(n)a[`primary-text`]=n;else if(t!=null&&t.startsWith(`#`)){let e=Y3(t);e!==null&&(a[`primary-text`]=X3({...e,luminanceThreshold:i})?`black`:`white`)}return a},s_e=e=>({"primary-hover":Q3(e,.1),"primary-pressed":Q3(e,.15)}),c_e=(e,t)=>
157e||t,l_e=(e,t,n)=>{let r=Object.entries(e).map(([e,r])=>[e,c_e(n?n[r]:null,t[e])]);return Object.fromEntries(r)},e6=(e,t,n)=>{let r=l_e(e,t,n);return n?{...t,...r,...o_e(r.background,r.primary,n.color_buttons_primary_text,t),...s_e(r.primary)}:{...t}},u_e=e=>e6(t_e,$ge,e),t6=e=>e6(e_e,Qge,e),n6=e=>{if(!e)return J3;switch(e.shapes){case`rounded`:return q3;case`rectangle`:return n_e;case`pill`:return r_e;default:return J3}},r6=(e=``,t)=>t.map(([t,n])=>`--rc-${e}-${t}: ${n}`).join(`; `),d_e=e=>[r6(`color`,Object.entries(u_e(e))),r6(`shape`,Object.entries(n6(e)))].join(`; `),f_e=e=>[r6(`color`,Object.entries(t6(e))),r6(`shape`,Object.entries(n6(e)))].join(`; `),p_e=(e=``,t)=>Object.entries(t).flatMap(([t,{desktop:n,mobile:r}])=>[`--rc-${e}-${t}-desktop: normal normal ${n.fontWeight} ${n.fontSize}/${n.lineHeight} ${z3}`,`--rc-${e}-${t}-mobile: normal normal ${r.fontWeight} ${r.fontSize}/${r.lineHeight} ${z3}`,`--rc-${e}-${t}-desktop-font-size: ${n.fontSize}`,`--rc-${e}-${t}-mobile-font-size: ${r.fontSize}`]).join(`; `),m_e=(e=``,t)=>Object.entries(t).map(([t,{mobile:n,desktop:r}])=>`--rc-${e}-${t}-mobile: ${n}; --rc-${e}-${t}-desktop: ${r};`).join(` `),h_e=class{constructor(e){aJ(this,`brandingAppearance`),e?this.brandingAppearance=e:this.brandingAppearance=void 0}get shape(){return n6(this.brandingAppearance)}get formColors(){return t6(this.brandingAppearance)}get formStyleVars(){return f_e(this.brandingAppearance)}get productInfoStyleVars(){return d_e(this.brandingAppearance)}get spacing(){return Xge}get textStyles(){return Zge}get textStyleVars(){return p_e(`text`,this.textStyles)}get spacingStyleVars(){return m_e(`spacing`,this.spacing)}},g_e=X(`<div class="rcb-processing svelte-1opqqrp"></div>`),__e={hash:`svelte-1opqqrp`,code:`.rcb-processing.svelte-1opqqrp {width:var(--width, 12px);aspect-ratio:1;border-radius:50%; 158 animation: svelte-1opqqrp-l5 1.5s infinite linear;} 159 160 @keyframes svelte-1opqqrp-l5 { 161 0% { 162 box-shadow: 163 var(--shadow-offset) 0 #fff2, 164 calc(-1 * var(--shadow-offset)) 0 #fff2; 165 background: #fff2; 166 } 167 25% { 168 box-shadow: 169 var(--shadow-offset) 0 #fff2, 170 calc(-1 * var(--shadow-offset)) 0 #ffff; 171 background: #fff2; 172 } 173 50% { 174 box-shadow: 175 var(--shadow-offset) 0 #fff2, 176 calc(-1 * var(--shadow-offset)) 0 #fff2; 177 background: #ffff; 178 } 179 75% { 180 box-shadow: 181 var(--shadow-offset) 0 #ffff, 182 calc(-1 * var(--shadow-offset)) 0 #fff2; 183 background: #fff2; 184 } 185 100% { 186 box-shadow: 187 var(--shadow-offset) 0 #fff2, 188 calc(-1 * var(--shadow-offset)) 0 #fff2; 189 background: #fff2; 190 } 191 }`};function v_e(e,t){J$(e,__e);let n=$(t,`size`,8,`medium`),r={small:{width:`8px`,offset:`10px`},medium:{width:`12px`,offset:`20px`},large:{width:`16px`,offset:`30px`}};var i=g_e();J(()=>n1(i,`--shadow-offset: ${e$(n()),QQ(()=>r[n()].offset)??``}; --width: ${e$(n()),QQ(()=>r[n()].width)??``};`)),Z(e,i)}var y_e=X(`<button><!></button>`),b_e={hash:`svelte-16hedkl`,code:`button.svelte-16hedkl {border:none;border-radius:var(--rc-shape-input-button-border-radius);cursor:pointer;height:var(--rc-spacing-inputHeight-mobile);color:var(--rc-color-grey-text-dark);background-color:var(--rc-color-grey-ui-dark);display:flex;align-items:center;justify-content:center;-webkit-tap-highlight-color:rgba(0, 0, 0, 0);-webkit-tap-highlight-color:transparent;transition:background-color 0.15s ease-in-out;user-select:none;} 192 193 @container layout-query-container (width >= 768px) {button.svelte-16hedkl {height:var(--rc-spacing-inputHeight-desktop);} 194 } 195 196 /* focus-visible is triggered only when focused with keyboard/reader */button.svelte-16hedkl:focus-visible {outline:2px solid var(--rc-color-focus);}button.intent-primary.svelte-16hedkl {background-color:var(--rc-color-primary);color:var(--rc-color-primary-text);}button.svelte-16hedkl:disabled {color:var(--rc-color-grey-text-light);background-color:var(--rc-color-grey-ui-light);outline:none;}button.intent-primary.svelte-16hedkl:not(:disabled):hover {background-color:var(--rc-color-primary-hover);}button.intent-primary.svelte-16hedkl:not(:disabled):active, 197 button.svelte-16hedkl:active {background-color:var(--rc-color-primary-pressed);outline:none;}button.intent-primary.svelte-16hedkl:disabled {color:var(--rc-color-grey-text-light);background-color:var(--rc-color-grey-ui-light);}`};function i6(e,t){GY(t,!0),J$(e,b_e);let n=$(t,`intent`,3,`primary`),r=$(t,`disabled`,3,!1),i=$(t,`loading`,3,!1),a=W(()=>new h_e(t.brandingAppearance)),o=W(()=>Y(a).textStyleVars),s=W(()=>Y(a).spacingStyleVars),c=W(()=>Y(a).productInfoStyleVars),l=W(()=>Y(a).formStyleVars),u=W(()=>[t.styleOverrides,Y(o),Y(s),Y(c),Y(l)].join(`; `));var d=y_e();d.__click=function(...e){var n;(n=t.onclick)==null||n.apply(this,e)};var f=K(d),p=e=>{v_e(e,{size:`small`})},m=e=>{Yge(e,{size:`body-base`,children:(e,n)=>{var r=m$();A$(BZ(r),()=>t.children??UJ),Z(e,r)},$$slots:{default:!0}})};Q(f,e=>{i()?e(p):e(m,!1)}),J(()=>{e1(d,1,`intent-${n()}`,`svelte-16hedkl`),d.disabled=r(),l1(d,`data-testid`,t.testId),l1(d,`type`,t.type),n1(d,Y(u))}),Z(e,d),KY()}s$([`click`]);var x_e=X(`<footer class="rcb-modal-footer svelte-gz2zuy"><!></footer>`),S_e={hash:`svelte-gz2zuy`,code:`footer.svelte-gz2zuy {display:flex;flex-direction:column;}`};function C_e(e,t){J$(e,S_e);let n=$(t,`children`,8);var r=x_e();A$(K(r),()=>n()??UJ),Z(e,r)}var w_e={hash:`svelte-1lkpm18`,code:`.rcb-modal-section.svelte-1lkpm18 {padding:8px 0px;display:flex;}section.rcb-modal-section.svelte-1lkpm18 {flex-grow:1;}.rcb-modal-section.svelte-1lkpm18:last-of-type {padding:0;}`};function T_e(e,t){J$(e,w_e);let n=$(t,`as`,8,`section`),r=$(t,`children`,8);var i=m$();q$(BZ(i),n,!1,(e,t)=>{u1(e,()=>({class:`rcb-modal-section`}),void 0,void 0,void 0,`svelte-1lkpm18`);var n=m$();A$(BZ(n),()=>r()??UJ),Z(t,n)}),Z(e,i)}var E_e=X(`<div><!></div>`),D_e={hash:`svelte-7lmlfa`,code:`.rcb-column.svelte-7lmlfa {display:flex;flex-direction:column;justify-content:flex-start;flex-grow:1;min-width:100%;}.rcb-column.justify-center.svelte-7lmlfa {justify-content:center;}.rcb-column.justify-end.svelte-7lmlfa {justify-content:flex-end;}.rcb-column.align-center.svelte-7lmlfa {align-items:center;}.rcb-column.align-end.svelte-7lmlfa {align-items:flex-end;}.rcb-column.gap-small.svelte-7lmlfa {gap:var(--rc-spacing-gapSmall-mobile);}.rcb-column.gap-medium.svelte-7lmlfa {gap:var(--rc-spacing-gapXLarge-mobile);}.rcb-column.gap-large.svelte-7lmlfa {gap:var(--rc-spacing-gapXXLarge-mobile);} 198 199 @container layout-query-container (width >= 768px) {.rcb-column.gap-small.svelte-7lmlfa {gap:var(--rc-spacing-gapSmall-desktop);}.rcb-column.gap-medium.svelte-7lmlfa {gap:var(--rc-spacing-gapLarge-desktop);}.rcb-column.gap-large.svelte-7lmlfa {gap:var(--rc-spacing-gapXXLarge-desktop);} 200 }`};function a6(e,t){J$(e,D_e);let n=$(t,`gap`,8,`small`),r=$(t,`justify`,8,`start`),i=$(t,`align`,8,`start`),a=$(t,`children`,8);var o=E_e();A$(K(o),()=>a()??UJ),J(()=>e1(o,1,`rcb-column gap-${n()??``} justify-${r()??``} align-${i()??``}`,`svelte-7lmlfa`)),Z(e,o)}var O_e=X(`<div class="rcb-row svelte-130pyos"><!></div>`),k_e={hash:`svelte-130pyos`,code:`.rcb-row.svelte-130pyos {display:flex;flex-direction:row;justify-content:flex-start;}`};function A_e(e,t){J$(e,k_e);let n=$(t,`children`,8);var r=O_e();A$(K(r),()=>n()??UJ),Z(e,r)}var j_e=X(`<span><!></span>`),M_e={hash:`svelte-y2q9vo`,code:`.rcb-typography.svelte-y2q9vo {display:inline-block;line-height:normal;} 201 202 /* svelte-ignore css-unused-selector */.rcb-typography-heading-2xl.svelte-y2q9vo {font:var(--rc-text-heading2xl-mobile);}.rcb-typography-heading-2xl.rcb-typography-branded.svelte-y2q9vo {font:var(--rc-text-heading2xl-branded-mobile);} 203 204 /* svelte-ignore css-unused-selector */.rcb-typography-heading-xl.svelte-y2q9vo {font:var(--rc-text-headingXl-mobile);}.rcb-typography-heading-xl.rcb-typography-branded.svelte-y2q9vo {font:var(--rc-text-headingXl-branded-mobile);} 205 206 /* svelte-ignore css-unused-selector */.rcb-typography-heading-lg.svelte-y2q9vo {font:var(--rc-text-headingLg-mobile);}.rcb-typography-heading-lg.rcb-typography-branded.svelte-y2q9vo {font:var(--rc-text-headingLg-branded-mobile);} 207 208 /* svelte-ignore css-unused-selector */.rcb-typography-heading-md.svelte-y2q9vo {font:var(--rc-text-headingMd-mobile);}.rcb-typography-heading-md.rcb-typography-branded.svelte-y2q9vo {font:var(--rc-text-headingMd-branded-mobile);} 209 210 /* svelte-ignore css-unused-selector */.rcb-typography-body-base.svelte-y2q9vo {font:var(--rc-text-bodyBase-mobile);}.rcb-typography-body-base.rcb-typography-branded.svelte-y2q9vo {font:var(--rc-text-bodyBase-branded-mobile);} 211 212 /* svelte-ignore css-unused-selector */.rcb-typography-body-small.svelte-y2q9vo {font:var(--rc-text-bodySmall-mobile);}.rcb-typography-body-small.rcb-typography-branded.svelte-y2q9vo {font:var(--rc-text-bodySmall-branded-mobile);} 213 214 /* svelte-ignore css-unused-selector */.rcb-typography-label-button.svelte-y2q9vo {font:var(--rc-text-labelButton-mobile);}.rcb-typography-label-button.rcb-typography-branded.svelte-y2q9vo {font:var(--rc-text-labelButton-branded-mobile);} 215 216 /* svelte-ignore css-unused-selector */.rcb-typography-label-default.svelte-y2q9vo {font:var(--rc-text-labelDefault-mobile);}.rcb-typography-label-default.rcb-typography-branded.svelte-y2q9vo {font:var(--rc-text-labelDefault-branded-mobile);} 217 218 /* svelte-ignore css-unused-selector */.rcb-typography-caption-default.svelte-y2q9vo {font:var(--rc-text-captionDefault-mobile);}.rcb-typography-caption-default.rcb-typography-branded.svelte-y2q9vo {font:var(--rc-text-captionDefault-branded-mobile);} 219 220 /* svelte-ignore css-unused-selector */.rcb-typography-caption-link.svelte-y2q9vo {font:var(--rc-text-captionLink-mobile);}.rcb-typography-caption-link.rcb-typography-branded.svelte-y2q9vo {font:var(--rc-text-captionLink-branded-mobile);} 221 222 @container layout-query-container (width >= 768px) {span.rcb-typography-branded.svelte-y2q9vo {font:var(--rc-text-brandedText-font-style-desktop);} 223 224 /* svelte-ignore css-unused-selector */.rcb-typography-heading-2xl.svelte-y2q9vo {font:var(--rc-text-heading2xl-desktop);}.rcb-typography-heading-2xl.rcb-typography-branded.svelte-y2q9vo {font:var(--rc-text-heading2xl-branded-desktop);} 225 226 /* svelte-ignore css-unused-selector */.rcb-typography-heading-xl.svelte-y2q9vo {font:var(--rc-text-headingXl-desktop);}.rcb-typography-heading-xl.rcb-typography-branded.svelte-y2q9vo {font:var(--rc-text-headingXl-branded-desktop);} 227 228 /* svelte-ignore css-unused-selector */.rcb-typography-heading-lg.svelte-y2q9vo {font:var(--rc-text-headingLg-desktop);}.rcb-typography-heading-lg.rcb-typography-branded.svelte-y2q9vo {font:var(--rc-text-headingLg-branded-desktop);} 229 230 /* svelte-ignore css-unused-selector */.rcb-typography-heading-md.svelte-y2q9vo {font:var(--rc-text-headingMd-desktop);}.rcb-typography-heading-md.rcb-typography-branded.svelte-y2q9vo {font:var(--rc-text-headingMd-branded-desktop);} 231 232 /* svelte-ignore css-unused-selector */.rcb-typography-body-base.svelte-y2q9vo {font:var(--rc-text-bodyBase-desktop);}.rcb-typography-body-base.rcb-typography-branded.svelte-y2q9vo {font:var(--rc-text-bodyBase-branded-desktop);} 233 234 /* svelte-ignore css-unused-selector */.rcb-typography-body-small.svelte-y2q9vo {font:var(--rc-text-bodySmall-desktop);}.rcb-typography-body-small.rcb-typography-branded.svelte-y2q9vo {font:var(--rc-text-bodySmall-branded-desktop);} 235 236 /* svelte-ignore css-unused-selector */.rcb-typography-label-button.svelte-y2q9vo {font:var(--rc-text-labelButton-desktop);}.rcb-typography-label-button.rcb-typography-branded.svelte-y2q9vo {font:var(--rc-text-labelButton-branded-desktop);} 237 238 /* svelte-ignore css-unused-selector */.rcb-typography-label-default.svelte-y2q9vo {font:var(--rc-text-labelDefault-desktop);}.rcb-typography-label-default.rcb-typography-branded.svelte-y2q9vo {font:var(--rc-text-labelDefault-branded-desktop);} 239 240 /* svelte-ignore css-unused-selector */.rcb-typography-caption-default.svelte-y2q9vo {font:var(--rc-text-captionDefault-desktop);}.rcb-typography-caption-default.rcb-typography-branded.svelte-y2q9vo {font:var(--rc-text-captionDefault-branded-desktop);} 241 242 /* svelte-ignore css-unused-selector */.rcb-typography-caption-link.svelte-y2q9vo {font:var(--rc-text-captionLink-desktop);}.rcb-typography-caption-link.rcb-typography-branded.svelte-y2q9vo {font:var(--rc-text-captionLink-branded-desktop);} 243 }`};function o6(e,t){J$(e,M_e);let n=$(t,`size`,3,`body-base`),r=$(t,`branded`,3,!1);var i=j_e();A$(K(i),()=>t.children??UJ),J(()=>e1(i,1,`rcb-typography rcb-typography-${n()??``} ${r()?`rcb-typography-branded`:``}`,`svelte-y2q9vo`)),Z(e,i)}var N_e=X(`<div><!></div>`),P_e=X(`<span style="display: block;"><!></span>`),F_e=X(`<!> <!>`,1),I_e=X(`<!> <!>`,1),L_e=X(`<div class="rcb-modal-message svelte-1ldqsgm" data-type="error"><!></div>`),R_e={hash:`svelte-1ldqsgm`,code:`.rcb-modal-message-icon.svelte-1ldqsgm {flex-shrink:0;align-self:center;margin-right:16px;}.rcb-modal-message.svelte-1ldqsgm {width:100%;min-height:160px;display:flex;justify-content:center;align-items:center;flex-direction:column;text-align:left;margin-top:4px;}.rcb-modal-message[data-has-title="false"].svelte-1ldqsgm {margin-top:var(--rc-spacing-gapXXLarge-mobile);}.rcb-modal-message-icon.small.svelte-1ldqsgm {height:var(--rc-text-headingLg-mobile-font-size);width:var(--rc-text-headingLg-mobile-font-size);}.rcb-modal-message-icon.large.svelte-1ldqsgm {height:calc(2 * var(--rc-text-headingMd-mobile-font-size));width:calc(2 * var(--rc-text-headingMd-mobile-font-size));} 244 245 @container layout-query-container (width >= 768px) {.rcb-modal-message-icon.small.svelte-1ldqsgm {height:var(--rc-text-headingLg-desktop-font-size);width:var(--rc-text-headingLg-desktop-font-size);}.rcb-modal-message-icon.large.svelte-1ldqsgm {height:calc(2 * var(--rc-text-headingMd-desktop-font-size));width:calc(2 * var(--rc-text-headingMd-desktop-font-size));}.rcb-modal-message[data-has-title="false"].svelte-1ldqsgm {margin-top:var(--rc-spacing-gapXXLarge-desktop);} 246 }`};function z_e(e,t){GY(t,!0),J$(e,R_e);let n=$(t,`title`,3,null),r=$(t,`icon`,3,null),i=CZ(null),a=CZ(!1),o;j$(()=>(Y(i)&&(o=new ResizeObserver(()=>{G(a,(Y(i)?.offsetHeight??0)>32)}),o.observe(Y(i))),()=>{o?.disconnect()}));var s=L_e();a6(K(s),{gap:`medium`,justify:`start`,children:(e,o)=>{var s=I_e(),c=BZ(s);A_e(c,{children:(e,t)=>{var o=F_e(),s=BZ(o),c=e=>{var t=N_e();A$(K(t),r),J(()=>e1(t,1,`rcb-modal-message-icon ${Y(a)?`large`:`small`}`,`svelte-1ldqsgm`)),Z(e,t)};Q(s,e=>{r()&&e(c)});var l=q(s,2),u=e=>{var t=P_e();o6(K(t),{size:`heading-md`,children:(e,t)=>{var r=p$();J(()=>_$(r,n())),Z(e,r)},$$slots:{default:!0}}),E1(t,e=>G(i,e),()=>Y(i)),Z(e,t)};Q(l,e=>{n()&&e(u)}),Z(e,o)},$$slots:{default:!0}});var l=q(c,2),u=e=>{o6(e,{size:`body-small`,children:(e,n)=>{var r=m$();A$(BZ(r),()=>t.message??UJ),Z(e,r)},$$slots:{default:!0}})};Q(l,e=>{t.message&&e(u)}),Z(e,s)},$$slots:{default:!0}}),J(()=>l1(s,`data-has-title`,!!n())),Z(e,s),KY()}var B_e=X(`<div class="rcb-modal-message-icon svelte-1h8pwwr"><!></div>`),V_e=X(`<!> <!>`,1),H_e=X(`<div class="rcb-modal-message svelte-1h8pwwr" data-type="success"><!></div>`),U_e={hash:`svelte-1h8pwwr`,code:`.rcb-modal-message-icon.svelte-1h8pwwr {height:54px;width:54px;margin:0 auto;}.rcb-modal-message[data-has-title="false"].svelte-1h8pwwr {margin-top:var(--rc-spacing-gapXXLarge-mobile);}.rcb-modal-message.svelte-1h8pwwr {width:100%;min-height:160px;display:flex;justify-content:center;align-items:center;flex-direction:column;text-align:center;} 247 248 @container layout-query-container (width >= 768px) {.rcb-modal-message[data-has-title="false"].svelte-1h8pwwr {margin-top:var(--rc-spacing-gapXXLarge-desktop);} 249 }`};function W_e(e,t){J$(e,U_e);let n=$(t,`title`,3,null),r=$(t,`icon`,3,null);var i=H_e();a6(K(i),{gap:`large`,justify:`center`,children:(e,t)=>{var i=V_e(),a=BZ(i),o=e=>{var t=B_e();A$(K(t),r),Z(e,t)};Q(a,e=>{r()&&e(o)});var s=q(a,2),c=e=>{o6(e,{size:`heading-md`,children:(e,t)=>{var r=p$();J(()=>_$(r,n())),Z(e,r)},$$slots:{default:!0}})};Q(s,e=>{n()&&e(c)}),Z(e,i)},$$slots:{default:!0}}),J(()=>l1(i,`data-has-title`,!!n())),Z(e,i)}var s6=`rcb-ui-events-tracker`,c6=`branding`,G_e=X(`<div><div><!></div> <div><!></div></div>`),K_e={hash:`svelte-clabfx`,code:`.message-layout.svelte-clabfx {display:flex;flex-direc
249tion:column;}.message-layout-content.svelte-clabfx {flex-grow:1;display:flex;flex-direction:column;justify-content:center;}.message-layout-content-full-width.svelte-clabfx {padding-left:var(--rc-spacing-outerPadding-mobile);padding-right:var(--rc-spacing-outerPadding-mobile);}.message-layout-footer-full-width.svelte-clabfx {padding-left:var(--rc-spacing-outerPadding-mobile);padding-right:var(--rc-spacing-outerPadding-mobile);} 250 251 @container layout-query-container (width < 768px) {.message-layout.svelte-clabfx {flex-grow:1;gap:var(--rc-spacing-gapXXLarge-mobile);} 252 } 253 254 @container layout-query-container (width >= 768px) {.message-layout.svelte-clabfx {min-height:354px;gap:var(--rc-spacing-gapXXLarge-desktop);}.message-layout-content.svelte-clabfx {justify-content:flex-start;flex-grow:1;} 255 }.message-layout-full-width.svelte-clabfx {width:100%;} 256 257 @media (min-width: 768px) {.message-layout-full-width.svelte-clabfx {width:544px;} 258 }`};function l6(e,t){GY(t,!0),J$(e,K_e);let n=()=>R1(u,`$brandingAppearanceStore`,r),[r,i]=B1(),a=$(t,`title`,3,null),o=$(t,`closeButtonTitle`,3,`Go back to app`),s=$(t,`icon`,3,null),c=$(t,`message`,3,null),l=$(t,`fullWidth`,3,!1),u=UY(c6),d=W(()=>n()??void 0);function f(){t.onDismiss()}var p=G_e();let m;var h=K(p);let g;T_e(K(h),{children:(e,n)=>{var r=m$(),i=BZ(r),o=e=>{W_e(e,{get title(){return a()},get icon(){return s()}})},l=e=>{z_e(e,{get title(){return a()},get icon(){return s()},get message(){return c()}})};Q(i,e=>{t.type===`success`?e(o):e(l,!1)}),Z(e,r)},$$slots:{default:!0}});var _=q(h,2);let v;C_e(K(_),{children:(e,t)=>{i6(e,{onclick:f,type:`submit`,get brandingAppearance(){return Y(d)},children:(e,t)=>{var n=p$();J(()=>_$(n,o())),Z(e,n)},$$slots:{default:!0}})},$$slots:{default:!0}}),J(()=>{m=e1(p,1,`message-layout svelte-clabfx`,null,m,{"message-layout-full-width":l()}),g=e1(h,1,`message-layout-content svelte-clabfx`,null,g,{"message-layout-content-full-width":l()}),v=e1(_,1,`message-layout-footer svelte-clabfx`,null,v,{"message-layout-footer-full-width":l()})}),Z(e,p),KY(),i()}function u6(e,t){GY(t,!0);let n=()=>R1(o,`$translator`,r),[r,i]=B1(),a=$(t,`key`,3,``),o=UY(r0),s=W(()=>a()?n().translate(a()||``,t.variables):void 0);var c=m$(),l=BZ(c),u=e=>{var t=p$();J(()=>_$(t,Y(s))),Z(e,t)},d=e=>{var n=m$();A$(BZ(n),()=>t.children??UJ),Z(e,n)};Q(l,e=>{Y(s)?e(u):e(d,!1)}),Z(e,c),KY(),i()}var d6=7,f6=30,p6=365,m6=4.33,h6=52,g6=12;function _6(e){switch(e.unit){case o0.Year:return e.number*p6;case o0.Month:return e.number*f6;case o0.Week:return e.number*d6;case o0.Day:return e.number}}function q_e(e){switch(e.unit){case o0.Year:return e.number*h6;case o0.Month:return Math.floor(e.number*m6);case o0.Week:return e.number;case o0.Day:return 0}}function J_e(e){switch(e.unit){case o0.Year:return e.number*g6;case o0.Month:return e.number;case o0.Week:case o0.Day:return 0}}function Y_e(e){switch(e.unit){case o0.Year:return e.number;case o0.Month:case o0.Week:case o0.Day:return 0}}function v6(e,t){let{unit:n,number:r}=e;return{period:t.translatePeriodUnit(n,{noWhitespace:!0})??``,periodAbbreviated:t.translatePeriodUnit(n,{noWhitespace:!0,short:!0})??``,periodWithUnit:t.translatePeriod(r,n)??``,periodInDays:_6(e).toString(),periodInWeeks:q_e(e).toString(),periodInMonths:J_e(e).toString(),periodInYears:Y_e(e).toString()}}var X_e=X(`<p class="footer-caption svelte-1fu2zos"><!></p>`),Z_e=X(`<p class="footer-caption svelte-1fu2zos"><!></p>`),Q_e=X(`<a class="terms-link svelte-1fu2zos" rel="noopener noreferrer" target="_blank"><!></a> <span class="terms-divider svelte-1fu2zos"></span>`,1),$_e=X(`<!> <!>`,1),eve=X(`<div class="footer-caption-container svelte-1fu2zos"><!> <!> <p class="footer-caption svelte-1fu2zos"><!></p></div>`),tve={hash:`svelte-1fu2zos`,code:`.footer-caption-container.svelte-1fu2zos {display:flex;flex-direction:column;gap:var(--rc-spacing-gapLarge-mobile);}.footer-caption.svelte-1fu2zos {color:var(--rc-color-grey-text-light);text-align:center;margin:0;}.terms-link.svelte-1fu2zos {color:inherit;}.terms-divider.svelte-1fu2zos {margin:0 4px;} 259 260 @container layout-query-container (width >= 768px) {.footer-caption-container.svelte-1fu2zos {gap:var(--rc-spacing-gapLarge-desktop);} 261 }`};function nve(e,t){GY(t,!1),J$(e,tve);let n=()=>R1(b,`$translator`,r),[r,i]=B1(),a=wZ(),o=wZ(),s=wZ(),c=wZ(),l=wZ(),u=wZ(),d=wZ(),f=wZ(),p=wZ(),m=wZ(),h=wZ(),g=wZ(),_=$(t,`brandingInfo`,8,null),v=$(t,`purchaseOption`,8,null),y=$(t,`termsAndConditionsUrl`,8,null),b=UY(r0);function x(e){return e!=null&&`base`in e}function S(e){return e!=null&&`basePrice`in e}function C(e){return e?e.trial?a0.PaymentEntryPageTrialSubscriptionTermsInfo:a0.PaymentEntryPageSubscriptionTermsInfo:a0.PaymentEntryPageOtpTermsInfo}function w(e,t){if(t.durationMode!==`time_window`)return!1;let n=e.base.period,r=t.period;if(!n||!r||t.cycleCount<=0)return!1;let i=_6(n),a=_6({number:r.number*t.cycleCount,unit:r.unit});return i>0&&a<=i}function T(e){let t=e?.discount;if(!e||!t)return null;switch(t.durationMode){case`forever`:return`Discount applied to your subscription. Auto-renews at the discounted rate. Cancel anytime.`;case`one_time`:return`One-time discount applied. Auto-renews at the standard rate. Cancel anytime.`;case`time_window`:return w(e,t)?`Discount applies to your first payment only. Subscription auto-renews at the standard rate. Cancel anytime.`:`Limited-time discount. Auto-renews at the standard rate. Cancel anytime.`;default:return null}}aQ(()=>
261e$(v()),()=>{G(a,x(v())?v():null)}),aQ(()=>e$(v()),()=>{G(o,S(v())?v():null)}),aQ(()=>Y(a),()=>{G(s,C(Y(a)))}),aQ(()=>Y(a),()=>{G(c,Y(a)?.discount??Y(a)?.introPrice??Y(a)?.base??null)}),aQ(()=>(Y(o),Y(c)),()=>{G(l,Y(o)?.discount?.price||Y(o)?.basePrice||Y(c)?.price)}),aQ(()=>(Y(l),n()),()=>{G(u,Y(l)?f0(Y(l).amountMicros,Y(l).currency,n().bcp47Locale||n().fallbackBcp47Locale):null)}),aQ(()=>(Y(c),n()),()=>{var e;G(d,(e=Y(c))!=null&&e.period?n().translatePeriodFrequency(Y(c)?.period?.number||1,Y(c)?.period?.unit,{useMultipleWords:!0}):null)}),aQ(()=>(Y(a),n(),c0),()=>{var e;G(f,(e=Y(a)?.trial)!=null&&e.period?n().translateDate(c0(new Date,Y(a).trial.period,!0),{year:`numeric`,month:`long`,day:`numeric`}):null)}),aQ(()=>(e$(_()),Y(l),n(),Y(s),Y(u),Y(d),Y(f)),()=>{G(p,_()&&Y(l)?n().translate(Y(s),{appName:_()?.app_name,price:Y(u),perFrequency:Y(d),renewalDate:Y(f)}):null)}),aQ(()=>Y(a),()=>{G(m,T(Y(a)))}),aQ(()=>(Y(m),Y(p)),()=>{G(h,Y(m)??Y(p))}),aQ(()=>(Y(a),n(),a0),()=>{G(g,Y(a)?n().translate(a0.PaymentEntryPageSubscriptionInfo):null)}),oQ(),D1();var E=eve(),D=K(E),O=e=>{var t=X_e();o6(K(t),{size:`caption-default`,children:(e,t)=>{var n=p$();J(()=>_$(n,Y(h))),Z(e,n)},$$slots:{default:!0}}),Z(e,t)};Q(D,e=>{Y(h)&&e(O)});var k=q(D,2),A=e=>{var t=Z_e();o6(K(t),{size:`caption-default`,children:(e,t)=>{var n=p$();J(()=>_$(n,Y(g))),Z(e,n)},$$slots:{default:!0}}),Z(e,t)};Q(k,e=>{Y(g)&&!Y(m)&&e(A)}),o6(K(q(k,2)),{size:`caption-default`,children:(e,t)=>{var n=$_e(),r=BZ(n),i=e=>{var t=Q_e(),n=BZ(t);u6(K(n),{get key(){return e$(a0),QQ(()=>a0.PaymentEntryPageTermsLinkLabel)}});var r=q(n,2);r.textContent=`|`,J(()=>l1(n,`href`,y())),Z(e,t)};Q(r,e=>{y()&&e(i)}),u6(q(r,2),{get key(){return e$(a0),QQ(()=>a0.PaymentEntryPagePaymentStepTitle)}}),Z(e,n)},$$slots:{default:!0}}),Z(e,E),KY(),i()}var rve=X(` <a target="_blank" rel="noopener noreferrer" data-testid="CheckoutConsentTermsLink"> </a> `,1),ive=X(`<label class="rcb-checkout-consent svelte-1v4vd7h" data-testid="CheckoutConsent"><input type="checkbox" class="rcb-checkout-consent-checkbox svelte-1v4vd7h" data-testid="CheckoutConsentCheckbox"/> <!></label>`),ave={hash:`svelte-1v4vd7h`,code:`.rcb-checkout-consent.svelte-1v4vd7h {display:flex;align-items:flex-start;gap:8px;margin-bottom:12px;cursor:pointer;}.rcb-checkout-consent-checkbox.svelte-1v4vd7h {margin-top:2px;flex-shrink:0;}.rcb-checkout-consent.svelte-1v4vd7h a {color:inherit;text-decoration:underline;}`};function ove(e,t){GY(t,!0),J$(e,ave);let n=()=>R1(s,`$translator`,r),[r,i]=B1(),a=`__TERMS_OF_SERVICE__`,o=$(t,`checked`,15,!1),s=UY(r0),c=W(()=>n().translate(a0.PaymentEntryPageCheckoutConsentTermsOfService)),l=W(()=>{let[e=``,r=``]=n().translate(a0.PaymentEntryPageCheckoutConsentAgreement,{appName:t.appName??``,termsOfService:a}).split(a);return{before:e,after:r}}),u=e=>{let n=e.currentTarget;o(n.checked),t.onChange(n.checked)};var d=ive(),f=K(d);f.__change=u,o6(q(f,2),{size:`caption-default`,children:(e,n)=>{var r=rve(),i=BZ(r,!0),a=q(i);a.__click=e=>e.stopPropagation();var o=K(a),s=q(a,1,!0);J(()=>{_$(i,Y(l).before),l1(a,`href`,t.termsAndConditionsUrl),_$(o,Y(c)),_$(s,Y(l).after)}),Z(e,r)},$$slots:{default:!0}}),J(()=>Sde(f,o())),Z(e,d),KY(),i()}s$([`change`,`click`]);function sve({brandingInfo:e,termsAndConditionsUrl:t,productDetails:n}){return!!(e!=null&&e.require_checkout_consent)&&!!t&&n.productType===_0.Subscription}var y6=(e=>(e.SDKInitialized=`sdk_initialized`,e.CheckoutSessionStart=`checkout_session_start`,e.CheckoutSessionEnd=`checkout_session_end`,e.CheckoutFlowError=`checkout_flow_error`,e.CheckoutPaymentTaxCalculation=`checkout_payment_tax_calculation`,e.CheckoutPaymentFormImpression=`checkout_payment_form_impression`,e.CheckoutPaymentFormError=`checkout_payment_form_error`,e.CheckoutPaymentFormDismiss=`checkout_payment_form_dismiss`,e.CheckoutPaymentFormSubmit=`checkout_payment_form_submit`,e.CheckoutPaymentFormGatewayError=`checkout_payment_form_gateway_error`,e.CheckoutPurchaseSuccessfulImpression=`checkout_purchase_successful_impression`,e.CheckoutPurchaseSuccessfulDismiss=`checkout_purchase_successful_dismiss`,e.WorkflowStepStarted=`workflow_step_started`,e.WorkflowStepCompleted=`workflow_step_completed`,e))(y6||{});function b6(e){let t={};for(let n in e)if(Object.prototype.hasOwnProperty.call(e,n)){let r=n.replace(/([A-Z])/g,`_$1`).toLowerCase(),i=e[n];i&&typeof i==`object`&&!Array.isArray(i)?t[r]=b6(i):t[r]=i}return t}function x6(e){for(let t=0;t<e.length;t++)e[t]=Math.floor(Math.random()*256)}function S6(){let e=typeof crypto<`u`?crypto:globalThis.crypto;if(e&&e.randomUUID)return e.randomUUID();let t=new Uint8Array(16);try{e&&e.getRandomValues?e.getRandomValues(t):x6(t)}catch(e){console.log(`Error using crypto.getRandomValues(), falling back to Math.random. + ${e}`),x6(t)}t[6]=t[6]&15|64,t[8]=t[8]&63|128;let n=Array.from(t).map(e=>e.toString(16).padStart(2,`0`));return[n.slice(0,4).join(``),n.slice(4,6).join(``),n.slice(6,8).join(``),n.slice(8,10).join(``),n.slice(10,16).join(``)].join(`-`)}var C6=`sdk_checkout`,cve=class{constructor(e){aJ(this,`EVENT_TYPE`,`web_billing`),aJ(this,`id`),aJ(this,`timestampMs`),aJ(this,`data`),this.id=S6(),this.timestampMs=Date.now(),this.data=e}toJSON(){return b6({id:this.id,timestampMs:this.timestampMs,type:this.EVENT_TYPE,eventName:this.data.eventName,appUserId:this.data.appUserId,context:{...this.data.context},properties:{...this.data.properties,traceId:this.data.traceId,...this.data.workflowIdentifier===void 0?{}:{workflowIdentifier:this.data.workflowIdentifier}}})}};function w6({errorCode:e,errorMessage:t,mode:n=C6}){return{eventName:y6.CheckoutFlowError,properties:{mode:n,errorCode:e,errorMessage:t}}}function lve({errorCode:e,errorMessage:t,mode:n=C6}){return{eventName:y6.CheckoutPaymentFormError,properties:{mode:n,errorCode:e,errorMessage:t}}}function T6({appearance:e,rcPackage:t,purchaseOptionToUse:n,customerEmail:r,mode:i=C6}){return{eventName:y6.CheckoutSessionStart,properties:{mode:i,customizationColorButtonsPrimary:e?.color_buttons_primary??null,customizationColorAccent:e?.color_accent??null,customizationColorError:e?.color_error??null,customizationColorProductInfoBg:e?.color_product_info_bg??null,customizationColorFormBg:e?.color_form_bg??null,customizationColorPageBg:e?.color_page_bg??null,customizationFont:e?.font??null,customizationShapes:e?.shapes??null,customizationShowProductDescription:e?.show_product_description??null,productInterval:t.webBillingProduct.normalPeriodDuration,productPrice:t.webBillingProduct.price.amountMicros,productCurrency:t.webBillingProduct.price.currency,selectedProductId:t.webBillingProduct.identifier,selectedPackageId:t.identifier,selectedPurchaseOption:n.id,customerEmailProvidedByDeveloper:!!r}}}function E6({redemptionInfo:e,mode:t=C6}){return{eventName:y6.CheckoutSessionEnd,properties:{mode:t,outcome:`finished`,withRedemptionInfo:!!e}}}function D6(e){return{eventName:y6.CheckoutSessionEnd,properties:{mode:e?.mode??C6,outcome:`closed`}}}function O6({errorCode:e,errorMessage:t,mode:n=C6}){return{eventName:y6.CheckoutSessionEnd,properties:{mode:n,outcome:`errored`,errorCode:e,errorMessage:t}}}function k6({taxCalculation:e,taxCustomerDetails:t,mode:n=C6}){let r=e.failed_reason===Q1.tax_collection_disabled?`disabled`:e.failed_reason?`failed`:e.tax_amount_in_micros===0?`not-taxed`:`taxed`,i=t===null?`auto`:`form`;return{eventName:y6.CheckoutPaymentTaxCalculation,properties:{mode:n,outcome:r,ui_element:i,tax_inclusive:e.tax_inclusive,error_code:e.failed_reason??null}}}function A6({selectedPaymentMethod:e,mode:t=C6}){return{eventName:y6.CheckoutPaymentFormSubmit,properties:{mode:t,selectedPaymentMethod:e??null}}}function j6({errorCode:e,errorMessage:t,mode:n=C6}){return{eventName:y6.CheckoutPaymentFormGatewayError,properties:{mode:n,errorCode:e,errorMessage:t}}}function uve(e,t=C6){return{eventName:y6.CheckoutPurchaseSuccessfulDismiss,properties:{mode:t,ui_element:e}}}function dve(e=C6){return{eventName:y6.CheckoutPurchaseSuccessfulImpression,properties:{mode:e}}}var fve=`<svg width="80" height="80" viewBox="0 0 24 24" fill="currentColor" xmlns="http://www.w3.org/2000/svg"> 262 <g transform="scale(0.5)" transform-origin="center"> 263 <path d="M12 3.5C7.30558 3.5 3.5 7.30558 3.5 12C3.5 16.6944 7.30558 20.5 12 20.5C16.6944 20.5 20.5 16.6944 20.5 12C20.5 11.5858 20.8358 11.25 21.25 11.25C21.6642 11.25 22 11.5858 22 12C22 17.5228 17.5228 22 12 22C6.47715 22 2 17.5228 2 12C2 6.47715 6.47715 2 12 2C12.4142 2 12.75 2.33579 12.75 2.75C12.75 3.16421 12.4142 3.5 12 3.5Z" fill="currentColor"/> 264 </g> 265</svg>`,pve=X(`<div class="rcb-ui-asset-icon svelte-6k29hu"><!></div>`),mve={hash:`svelte-6k29hu`,code:` 266 @-webkit-keyframes svelte-6k29hu-rotating /* Safari and Chrome */ { 267 from { 268 -webkit-transform: rotate(0deg); 269 -o-transform: rotate(0deg); 270 transform: rotate(0deg); 271 } 272 to { 273 -webkit-transform: rotate(360deg); 274 -o-transform: rotate(360deg); 275 transform: rotate(360deg); 276 } 277 } 278 @keyframes svelte-6k29hu-rotating { 279 from { 280 -ms-transform: rotate(0deg); 281 -moz-transform: rotate(0deg); 282 -webkit-transform: rotate(0deg); 283 -o-transform: rotate(0deg); 284 transform: rotate(0deg); 285 } 286 to { 287 -ms-transform: rotate(360deg); 288 -moz-transform: rotate(360deg); 289 -webkit-transform: rotate(360deg); 290 -o-transform: rotate(360deg); 291 transform: rotate(360deg); 292 } 293 }div.svelte-6k29hu {width:80px;height:80px; 294 -webkit-animation: svelte-6k29hu-rotating 2s ease-in-out infinite; 295 -moz-animation: svelte-6k29hu-rotating 2s ease-in-out infinite; 296 -ms-animation: svelte-6k29hu-rotating 2s ease-in-out infinite; 297 -o-animation: svelte-6k29hu-rotating 2s ease-in-out infinite; 298 animation: svelte-6k29hu-rotating 2s ease-in-out infinite;}`};function M6(e,t){J$(e,mve);let n=$(t,`color`,3,`var(--rc-color-accent)`);var r=pve();B$(K(r),()=>fve),J(()=>n1(r,`color:${n()??``};`)),Z(e,r)}var hve=X(`<div class="rcb-modal-loader svelte-rhstd0"><!></div>`),gve={hash:`svelte-rhstd0`,code:`.rcb-modal-loader.svelte-rhstd0 {width:100%;flex-grow:1;display:flex;justify-content:center;align-items:center;} 299 300 @container layout-query-container (width >= 768px) {.rcb-modal-loader.svelte-rhstd0 {align-items:flex-start;margin-top:calc(var(--rc-spacing-gapXXLarge-desktop) * 6);} 301 }`};function N6(e){J$(e,gve);var t=hve();M6(K(t),{}),Z(e,t)}function _ve(e,t){GY(t,!0);let n=()=>R1(s,`$brandingAppearanceStore`,i),r=()=>R1(o,`$translator`,i),[i,a]=B1(),o=UY(r0),s=UY(c6),c=W(()=>n()??void 0),l=W(()=>t.priceBreakdown?r().formatPrice(t.priceBreakdown.totalAmountInMicros,t.priceBreakdown.currency):null),u=t.subscriptionOption?.trial?.period,d=W(()=>
301u?r().translatePeriod(u.number,u.unit):null);i6(e,{get disabled(){return t.disabled},testId:`PayButton`,get brandingAppearance(){return Y(c)},children:(e,n)=>{var r=m$(),i=BZ(r),a=e=>{{let t=W(()=>({trialPeriodLabel:Y(d)}));u6(e,{get key(){return a0.PaymentEntryPageButtonStartTrial},get variables(){return Y(t)}})}},o=e=>{var t=m$(),n=BZ(t),r=e=>{{let t=W(()=>({formattedPrice:Y(l)}));u6(e,{get key(){return a0.PaymentEntryPageButtonWithPrice},get variables(){return Y(t)}})}},i=e=>{u6(e,{get key(){return a0.PaymentEntryPageButtonPay}})};Q(n,e=>{Y(l)?e(r):e(i,!1)},!0),Z(e,t)};Q(i,e=>{var n;(n=t.subscriptionOption)!=null&&n.trial?e(a):e(o,!1)}),Z(e,r)},$$slots:{default:!0}}),KY(),a()}function P6(e){"@babel/helpers - typeof";return P6=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},P6(e)}var F6=`dahlia`,vve=function(e){return e===3?`v3`:e},I6=`https://js.stripe.com`,yve=`${I6}/${F6}/stripe.js`,bve=/^https:\/\/js\.stripe\.com\/v3\/?(\?.*)?$/,xve=/^https:\/\/js\.stripe\.com\/(v3|[a-z]+)\/stripe\.js(\?.*)?$/,L6=`loadStripe.setLoadParameters was called but an existing Stripe.js script already exists in the document; existing script parameters will be used`,Sve=function(e){return bve.test(e)||xve.test(e)},Cve=function(){for(var e=document.querySelectorAll(`script[src^="${I6}"]`),t=0;t<e.length;t++){var n=e[t];if(Sve(n.src))return n}return null},R6=function(e){var t=e&&!e.advancedFraudSignals?`?advancedFraudSignals=false`:``,n=document.createElement(`script`);n.src=`${yve}${t}`;var r=document.head||document.body;if(!r)throw Error(`Expected document.body not to be null. Stripe.js requires a <body> element.`);return r.appendChild(n),n},wve=function(e,t){!e||!e._registerWrapper||e._registerWrapper({name:`stripe-js`,version:`9.7.0`,startTime:t})},z6=null,B6=null,V6=null,Tve=function(e){return function(t){e(Error(`Failed to load Stripe.js`,{cause:t}))}},Eve=function(e,t){return function(){window.Stripe?e(window.Stripe):t(Error(`Stripe.js not available`))}},Dve=function(e){return z6===null?(z6=new Promise(function(t,n){if(typeof window>`u`||typeof document>`u`){t(null);return}if(window.Stripe&&e&&console.warn(L6),window.Stripe){t(window.Stripe);return}try{var r=Cve();if(r&&e)console.warn(L6);else if(!r)r=R6(e);else if(r&&V6!==null&&B6!==null){var i;r.removeEventListener(`load`,V6),r.removeEventListener(`error`,B6),(i=r.parentNode)==null||i.removeChild(r),r=R6(e)}V6=Eve(t,n),B6=Tve(n),r.addEventListener(`load`,V6),r.addEventListener(`error`,B6)}catch(e){n(e);return}}),z6.catch(function(e){return z6=null,Promise.reject(e)})):z6},Ove=function(e,t,n){if(e===null)return null;var r=t[0];if(typeof r!=`string`)throw Error(`Expected publishable key to be of type string, got type ${P6(r)} instead.`);var i=r.match(/^pk_test/),a=vve(e.version),o=F6;i&&a!==o&&console.warn(`Stripe.js@${a} was loaded on the page, but @stripe/[email protected] expected Stripe.js@${o}. This may result in unexpected behavior. For more information, see https://docs.stripe.com/sdks/stripejs-versioning`);var s=e.apply(void 0,t);return wve(s,n),s},H6=function(e){var t=`invalid load parameters; expected object of shape 302 303 {advancedFraudSignals: boolean} 304 305but received 306 307 ${JSON.stringify(e)} 308`;if(e===null||P6(e)!==`object`)throw Error(t);if(Object.keys(e).length===1&&typeof e.advancedFraudSignals==`boolean`)return e;throw Error(t)},U6,W6=!1,G6=function(){var e=[...arguments];W6=!0;var t=Date.now();return Dve(U6).then(function(n){return Ove(n,e,t)})};G6.setLoadParameters=function(e){if(W6&&U6){var t=H6(e);if(Object.keys(t).reduce(function(t,n){return t&&e[n]===U6?.[n]},!0))return}if(W6)throw Error(`You cannot change load parameters after calling loadStripe`);U6=H6(e)};var kve={error:`#B0171F`,warning:`#f4e971`,focus:`#1148B8`,accent:`#767676`,primary:`#576CDB`,"primary-hover":`rgba(87, 108, 219, .8)`,"primary-pressed":`rgba(87, 108, 219, .9)`,"primary-text":`#ffffff`,white:`#ffffff`,"grey-text-dark":`rgba(0,0,0,1)`,"grey-text-light":`rgba(0,0,0,0.7)`,"grey-ui-dark":`rgba(0,0,0,0.3)`,"grey-ui-light":`rgba(0,0,0,0.1)`,"input-background":`white`,background:`white`},Ave={error:`#B0171F`,warning:`#f4e971`,focus:`#1148B8`,accent:`#767676`,primary:`#576CDB`,"primary-hover":`rgba(87, 108, 219, .8)`,"primary-pressed":`rgba(87, 108, 219, .9)`,"primary-text":`#ffffff`,white:`#ffffff`,"grey-text-dark":`rgba(0,0,0,1)`,"grey-text-light":`rgba(0,0,0,0.7)`,"grey-ui-dark":`rgba(0,0,0,0.3)`,"grey-ui-light":`rgba(0,0,0,0.1)`,"input-background":`white`,background:`#EFF3FA`},jve={error:`#B0171F`,warning:`#f4e971`,focus:`#1148B8`,accent:`#767676`,primary:`#576CDB`,"primary-hover":`rgba(87, 108, 219, .8)`,"primary-pressed":`rgba(87, 108, 219, .9)`,"primary-text":`#ffffff`,white:`#ffffff`,"grey-text-dark":`rgba(0,0,0,1)`,"grey-text-light":`rgba(0,0,0,0.7)`,"grey-ui-dark":`rgba(0,0,0,0.3)`,"grey-ui-light":`rgba(0,0,0,0.1)`,"input-background":`white`,background:`#ffffff`},K6={error:`color_error`,focus:`color_accent`,accent:`color_accent`,primary:`color_buttons_primary`},Mve={...K6,"input-background":`color_form_bg`,background:`color_form_bg`},Nve={...K6,"input-background":`color_product_info_bg`,background:`color_product_info_bg`},Pve={...K6,"input-background":`color_page_bg`,background:`color_page_bg`},q6={"input-border-radius":`4px`,"input-button-border-radius":`8px`}
308,Fve={"input-border-radius":`0px`,"input-button-border-radius":`0px`},Ive={"input-border-radius":`12px`,"input-button-border-radius":`9999px`},J6=q6,Y6=`-apple-system, BlinkMacSystemFont, avenir next, avenir, segoe ui, helvetica neue, helvetica, Cantarell, Ubuntu, roboto, noto, arial, sans-serif`,X6=`BrandCustomFont`,Z6=`${X6}, ${Y6}`,Q6={regular:`400`,medium:`500`,semibold:`600`},$6={12:`12px`,14:`14px`,16:`16px`,18:`18px`,24:`24px`,28:`28px`,32:`32px`,36:`36px`},e8={130:`130%`,140:`140%`},t8={tight:`0.20%`,regular:`0`,loose:`0.20%`},n8={heading2xl:{fontSize:$6[28],lineHeight:e8[130],fontWeight:Q6.semibold,letterSpacing:t8.loose},headingXl:{fontSize:$6[24],lineHeight:e8[130],fontWeight:Q6.semibold,letterSpacing:t8.loose},headingLg:{fontSize:`20px`,lineHeight:e8[130],fontWeight:Q6.semibold,letterSpacing:t8.loose},headingMd:{fontSize:`16px`,lineHeight:e8[140],fontWeight:Q6.medium,letterSpacing:t8.regular},bodyBase:{fontSize:$6[16],lineHeight:e8[140],fontWeight:Q6.regular,letterSpacing:t8.regular},bodySmall:{fontSize:$6[14],lineHeight:e8[140],fontWeight:Q6.regular,letterSpacing:t8.regular},labelButton:{fontSize:$6[16],lineHeight:e8[140],fontWeight:Q6.semibold,letterSpacing:t8.tight},labelDefault:{fontSize:$6[14],lineHeight:e8[140],fontWeight:Q6.regular,letterSpacing:t8.tight},captionDefault:{fontSize:$6[12],lineHeight:e8[140],fontWeight:Q6.regular,letterSpacing:t8.regular},captionLink:{fontSize:$6[12],lineHeight:e8[140],fontWeight:Q6.regular,letterSpacing:t8.regular}},r8={heading2xl:{...n8.heading2xl,fontSize:$6[36]},headingXl:{...n8.headingXl,fontSize:$6[32]},headingLg:{...n8.headingLg,fontSize:$6[24]},headingMd:{...n8.headingMd,fontSize:$6[18]},bodyBase:{...n8.bodyBase},bodySmall:{...n8.bodySmall},labelButton:{...n8.labelButton},labelDefault:{...n8.labelDefault},captionDefault:{...n8.captionDefault},captionLink:{...n8.captionLink}},i8={heading2xl:{mobile:n8.heading2xl,desktop:r8.heading2xl},headingXl:{desktop:r8.headingXl,mobile:n8.headingXl},headingLg:{desktop:r8.headingLg,mobile:n8.headingLg},headingMd:{desktop:r8.headingMd,mobile:n8.headingMd},bodyBase:{desktop:r8.bodyBase,mobile:n8.bodyBase},bodySmall:{desktop:r8.bodySmall,mobile:n8.bodySmall},labelButton:{desktop:r8.labelButton,mobile:n8.labelButton},labelDefault:{desktop:r8.labelDefault,mobile:n8.labelDefault},captionDefault:{desktop:r8.captionDefault,mobile:n8.captionDefault},captionLink:{desktop:r8.captionLink,mobile:n8.captionLink}},a8=e=>e.length==7?{r:parseInt(e.slice(1,3),16),g:parseInt(e.slice(3,5),16),b:parseInt(e.slice(5,7),16)}:e.length==4?{r:parseInt(e[1],16),g:parseInt(e[2],16),b:parseInt(e[3],16)}:null,o8=({r:e,g:t,b:n,luminanceThreshold:r})=>{let i=e=>(e/=255,e<=.03928?e/12.92:((e+.055)/1.055)**2.4);return .2126*i(e)+.7152*i(t)+.0722*i(n)>r},s8=.37,Lve=(e,t=s8)=>{let n=a8(e);return n?o8({...n,luminanceThreshold:t}):!0},Rve=(e,t=s8)=>{let n=o8({...e,luminanceThreshold:t})?`0,0,0`:`255,255,255`;return{"grey-text-dark":`rgb(${n})`,"grey-text-light":`rgba(${n},0.70)`,"grey-ui-dark":`rgba(${n},0.3)`,"grey-ui-light":`rgba(${n},0.1)`}};function zve(e,t,n){let r=a8(e)||{r:0,g:0,b:0},i=a8(t)||{r:255,g:255,b:255},a=Math.round(i.r*n+r.r*(1-n)),o=Math.round(i.g*n+r.g*(1-n)),s=Math.round(i.b*n+r.b*(1-n));return`#${l8(a)}${l8(o)}${l8(s)}`}function c8(e,t){let n={r:255,g:255,b:255},r=Math.max(0,Math.min(1,t)),i=e,a=a8(e)||n;(isNaN(a.r)||isNaN(a.g)||isNaN(a.b))&&(a=n,i=`#FFFFFF`);let o=o8({...a,luminanceThreshold:s8})?`#000000`:`#FFFFFF`;return zve(i,o,r)}function l8(e){return e.toString(16).padStart(2,`0`).toUpperCase()}var Bve=(e,t,n,r,i=s8)=>{let a={"grey-text-dark":r[`grey-text-dark`],"grey-text-light":r[`grey-text-light`],"grey-ui-dark":r[`grey-ui-dark`],"grey-ui-light":r[`grey-ui-light`],"primary-text":r[`primary-text`]};if(e!=null&&e.startsWith(`#`)){let t=a8(e);t!==null&&Object.assign(a,Rve(t))}if(n)a[`primary-text`]=n;else if(t!=null&&t.startsWith(`#`)){let e=a8(t);e!==null&&(a[`primary-text`]=o8({...e,luminanceThreshold:i})?`black`:`white`)}return a},Vve=e=>({"primary-hover":c8(e,.1),"primary-pressed":c8(e,.15)}),Hve=(e,t)=>e||t,Uve=(e,t,n)=>{let r=Object.entries(e).map(([e,r])=>[e,Hve(n?n[r]:null,t[e])]);return Object.fromEntries(r)}
308,u8=(e,t,n)=>{let r=Uve(e,t,n);return n?{...t,...r,...Bve(r.background,r.primary,n.color_buttons_primary_text,t),...Vve(r.primary)}:{...t}},d8=e=>u8(Nve,Ave,e),f8=e=>u8(Mve,kve,e),Wve=e=>u8(Pve,jve,e),p8=e=>{if(!e)return J6;switch(e.shapes){case`rounded`:return q6;case`rectangle`:return Fve;case`pill`:return Ive;default:return J6}},m8=(e=``,t)=>t.map(([t,n])=>`--rc-${e}-${t}: ${n}`).join(`; `),h8=e=>[m8(`color`,Object.entries(d8(e))),m8(`shape`,Object.entries(p8(e)))].join(`; `),Gve=e=>[m8(`color`,Object.entries(f8(e))),m8(`shape`,Object.entries(p8(e)))].join(`; `),Kve=e=>[m8(`color`,Object.entries(Wve(e))),m8(`shape`,Object.entries(p8(e)))].join(`; `),qve=(e=``,t,n)=>Object.entries(t).flatMap(([t,{desktop:r,mobile:i}])=>{let a=`normal normal ${r.fontWeight} ${r.fontSize}/${r.lineHeight} ${Y6}`,o=`normal normal ${i.fontWeight} ${i.fontSize}/${i.lineHeight} ${Y6}`,s=`normal normal ${n?.desktop.font_weight} ${n?.desktop.font_size} ${Z6}`,c=`normal normal ${n?.mobile.font_weight} ${n?.mobile.font_size} ${Z6}`;return[`--rc-${e}-${t}-desktop: ${a}`,`--rc-${e}-${t}-mobile: ${o}`,`--rc-${e}-${t}-branded-desktop: ${n?s:a}`,`--rc-${e}-${t}-branded-mobile: ${n?c:o}`,`--rc-${e}-${t}-desktop-font-size: ${r.fontSize}`,`--rc-${e}-${t}-mobile-font-size: ${i.fontSize}`]}).join(`; `),Jve=(e=``,t)=>Object.entries(t).map(([t,{mobile:n,desktop:r}])=>`--rc-${e}-${t}-mobile: ${n}; --rc-${e}-${t}-desktop: ${r};`).join(` `),Yve={outerPaddingTop:{mobile:`0.25rem`,desktop:`clamp(1rem, 8.44vw, 7.5rem)`},outerPadding:{mobile:`clamp(1.3125rem, 5.6vw, 1.5rem)`,desktop:`clamp(3rem, 6.44vw, 4.5rem)`},gapSmall:{mobile:`0.25rem`,desktop:`0.5rem`},gapMedium:{mobile:`0.5rem`,desktop:`0.75rem`},gapLarge:{mobile:`0.75rem`,desktop:`1rem`},gapXLarge:{mobile:`1rem`,desktop:`2rem`},gapXXLarge:{mobile:`1.25rem`,desktop:`2.25rem`},gapXXXLarge:{mobile:`2.25rem`,desktop:`5rem`},inputHeight:{mobile:`3rem`,desktop:`3rem`}},g8=class{constructor(e){aJ(this,`brandingAppearance`),e?this.brandingAppearance=e:this.brandingAppearance=void 0}get shape(){return p8(this.brandingAppearance)}get formColors(){return f8(this.brandingAppearance)}get formStyleVars(){return Gve(this.brandingAppearance)}get productInfoStyleVars(){return h8(this.brandingAppearance)}get pageStyleVars(){return Kve(this.brandingAppearance)}get spacing(){return Yve}get textStyles(){return i8}getTextStyleVars(e){return qve(`text`,this.textStyles,e)}get spacingStyleVars(){return Jve(`spacing`,this.spacing)}},_8=(e=>(e[e.ErrorLoadingStripe=0]=`ErrorLoadingStripe`,e[e.HandledFormError=1]=`HandledFormError`,e[e.UnhandledFormError=2]=`UnhandledFormError`,e))(_8||{}),v8=class{constructor(e,t,n){this.code=e,this.gatewayErrorCode=t,this.message=n}},y8=class e{static getStripeLocale(e){if([`ca`,`hi`,`uk`].includes(e))return`auto`;let t={zh_Hans:`zh`,"zh-Hans":`zh`,zh_Hant:`zh-TW`,"zh-Hant":`zh-TW`};return Object.keys(t).includes(e)?t[e]:e}static async getStripeClient(e,t){let n=await G6(t,{stripeAccount:e}).catch(e=>{throw this.mapInitializationError(e)});if(!n)throw{code:0,gatewayErrorCode:void 0,message:`Stripe client not found`};return{stripe:n}}static async initializeStripe(e,t,n,r,i,a,o){if(!t||!e||!n)throw{code:0,gatewayErrorCode:void 0,message:`Stripe configuration is missing`};let{stripe:s}
308=await this.getStripeClient(e,t),c=new g8(r?.appearance),l=c.shape,u=c.formColors,d=c.textStyles,f=i8.bodyBase[o].fontSize||i8.bodyBase.mobile.fontSize,p;try{p=s.elements({mode:n.mode,paymentMethodTypes:n.payment_method_types,setupFutureUsage:n.setup_future_usage,amount:n.amount,currency:n.currency,loader:`always`,locale:i,appearance:{theme:`stripe`,labels:`floating`,variables:{borderRadius:l[`input-border-radius`],focusBoxShadow:`none`,colorDanger:u.error,colorTextPlaceholder:u[`grey-text-light`],colorText:u[`grey-text-dark`],colorTextSecondary:u[`grey-text-light`],fontSizeBase:f,...a},rules:{".Input":{boxShadow:`none`,paddingTop:`6px`,paddingBottom:`6px`,fontSize:f,border:`1px solid ${u[`grey-ui-dark`]}`,backgroundColor:u[`input-background`],color:u[`grey-text-dark`]},".Input:focus":{border:`1px solid ${u.focus}`,outline:`none`},".Label":{fontWeight:d.labelDefault[o].fontWeight,lineHeight:`22px`,color:u[`grey-text-dark`]},".Label--floating":{opacity:`1`},".Input--invalid":{boxShadow:`none`}}}})}catch(e){throw this.mapInitializationError(e)}return{stripe:s,elements:p}}static async initializeStripeCheckout(e,t,n,r){if(!e||!t||!n)throw{code:0,gatewayErrorCode:void 0,message:`Stripe configuration is missing`};let{stripe:i}
308=await this.getStripeClient(e,t),a;try{a=await i.createEmbeddedCheckoutPage({fetchClientSecret:()=>Promise.resolve(n.client_secret),onComplete:r})}catch(e){throw this.mapInitializationError(e)}return{stripe:i,embeddedCheckout:a}}static updateElementsConfiguration(e,t){e.update({mode:t.mode,paymentMethodTypes:t.payment_method_types,setupFutureUsage:t.setup_future_usage,amount:t.amount,currency:t.currency})}static isStripeHandledFormError(e){let t=e.type===`validation_error`,n=e.type===`card_error`&&e.code&&this.FORM_VALIDATED_CARD_ERROR_CODES.includes(e.code);return t||n}static createPaymentElement(e,t){return e.create(`payment`,{business:t?{name:t}:void 0,layout:{type:`tabs`},terms:{applePay:`never`,auBecsDebit:`never`,bancontact:`never`,card:`never`,cashapp:`never`,googlePay:`never`,ideal:`never`,paypal:`never`,sepaDebit:`never`,sofort:`never`,usBankAccount:`never`}})}static countryRequiresFullAddressForTaxes(t){return!!t&&e.FULL_ADDRESS_REQUIRED_TAX_COUNTRY_CODES.includes(t)}static createAddressElement(e,t){return e.create(`address`,{mode:`billing`,display:{name:`full`},...t?{defaultValues:{address:{country:t}}}:{}})}static createExpressCheckoutElement(e,t,n){let r={billingAddressRequired:!0,emailRequired:!0,...t?{paymentMethods:{applePay:`always`,googlePay:`always`}}:{},...n||{}};return e.create(`expressCheckout`,r)}static createLinkAuthenticationElement(e,t){return e.create(`linkAuthentication`,{defaultValues:{email:t??``}})}static async submitElements(e){let{error:t}=await e.submit();if(t)throw this.mapError(t)}static mapInitializationError(e){return new v8(0,e.code,e.message)}static mapError(e){return this.isStripeHandledFormError(e)?new v8(1,e.code,e.message):new v8(2,e.code,e.message)}static async confirmElements(e,t,n,r){let i={clientSecret:n,redirect:`if_required`},a=r?{...i,confirmParams:{confirmation_token:r}}:{...i,elements:t},o=n.startsWith(`seti_`),s;if(s=o?await e.confirmSetup(a):await e.confirmPayment(a),s!=null&&s.error)throw this.mapError(s.error)}static async extractTaxCustomerDetails(e,t){let{error:n,confirmationToken:r}=await t.createConfirmationToken({elements:e});if(n)throw this.mapError(n);let i=r.payment_method_preview?.billing_details?.address;return{customerDetails:{countryCode:i?.country??void 0,postalCode:i?.postal_code??void 0,state:i?.state??void 0,city:i?.city??void 0,addressLine1:i?.line1??void 0,addressLine2:i?.line2??void 0},confirmationTokenId:r.id}}
308static nextDateForPeriod(e,t){return e.unit===o0.Year?(t.setFullYear(t.getFullYear()+e.number),t):e.unit===o0.Month?(t.setMonth(t.getMonth()+e.number),t):e.unit===o0.Week?(t.setDate(t.getDate()+e.number*7),t):(e.unit===o0.Day&&t.setDate(t.getDate()+e.number),t)}static applePayPeriod(e){return e.unit===o0.Week?{recurringPaymentIntervalUnit:`day`,recurringPaymentIntervalCount:e.number*7}:{recurringPaymentIntervalUnit:e.unit,recurringPaymentIntervalCount:e.number}}static microsToMinimumAmountPrice(e,t){return[`BIF`,`CLP`,`DJF`,`GNF`,`JPY`,`KMF`,`KRW`,`MGA`,`PYG`,`RWF`,`UGX`,`VND`,`VUV`,`XAF`,`XOF`,`XPF`].includes(t)?Math.floor(e/1e6):Math.floor(e/1e4)}static toExpressCheckoutLineItems(t,n,r){let{currency:i}=n,a=e.microsToMinimumAmountPrice(n.totalAmountInMicros,i),o=e.microsToMinimumAmountPrice(r.discountAmountInMicros,i);return[{name:t,amount:a+o},{name:r.label,amount:-o}]}static buildStripeExpressCheckoutOptionsForSubscription(t,n,r,i,a,o,s,c,l){let u={maxRows:s,maxColumns:c,overflow:l},d=o&&o.discountAmountInMicros>0?e.toExpressCheckoutLineItems(t.title,n,o):void 0,f=e.microsToMinimumAmountPrice(n.totalAmountInMicros,n.currency),p=r.trial,m=r.trial?.period,h=r.base.period,g=p&&m?e.nextDateForPerio
308d(m,new Date):void 0,_=h?e.applePayPeriod(h):{};return{layout:u,...d?{lineItems:d}:{},applePay:{recurringPaymentRequest:{paymentDescription:t.title,managementURL:a,...p?{trialBilling:{label:i.translate(a0.ApplePayFreeTrial),amount:0}}:{},regularBilling:{label:t.title,amount:f,recurringPaymentStartDate:g,..._}}}}}static buildStripeExpressCheckoutOptionsForNonSubscription(t,n,r,i,a,o){let s={maxRows:i,maxColumns:a,overflow:o},c=r&&r.discountAmountInMicros>0?e.toExpressCheckoutLineItems(t.title,n,r):void 0;return{layout:s,...c?{lineItems:c}:{}}}};aJ(y8,`FORM_VALIDATED_CARD_ERROR_CODES`,[`card_declined`,`expired_card`,`incorrect_cvc`,`incorrect_number`]),aJ(y8,`FULL_ADDRESS_REQUIRED_TAX_COUNTRY_CODES`,[`CA`,`PR`,`IN`]);var b8=y8,Xve=X(`<div></div>`);function Zve(e,t){GY(t,!0);let n=null,r=`payment-element`,i=async e=>{await t.onError(b8.mapInitializationError(e.error))};j$(()=>{try{n=b8.createPaymentElement(t.elements,t.brandingInfo?.app_name),n.mount(`#${r}`),n.on(`ready`,t.onReady),n.on(`change`,t.onChange),n.on(`loaderror`,i)}catch(e){t.onError(b8.mapInitializationError(e))}}),M$(()=>{n?.destroy(),n=null});var a=Xve();l1(a,`id`,r),Z(e,a),KY()}var Qve=X(`<div></div>`);function $ve(e,t){GY(t,!0);let n=null,r=`link-authentication-element`,i=async e=>{await t.onError(b8.mapInitializationError(e.error))};j$(()=>{try{n=b8.createLinkAuthenticationElement(t.elements,t.email),n.mount(`#${r}`),n.on(`ready`,t.onReady),n.on(`change`,t.onChange),n.on(`loaderror`,i)}catch(e){t.onError(b8.mapInitializationError(e))}}),M$(()=>{n?.destroy(),n=null});var a=Qve();l1(a,`id`,r),Z(e,a),KY()}var eye=X(`<div class="text-separator svelte-3efq78"><hr class="line svelte-3efq78"/> <span class="text svelte-3efq78"><!></span> <hr class="line svelte-3efq78"/></div>`),tye={hash:`svelte-3efq78`,code:`.text-separator.svelte-3efq78 {display:flex;align-items:center;justify-content:center;gap:var(--rc-spacing-gapSmall-mobile);} 309 310 @container layout-query-container (width >= 768px) {.text-separator.svelte-3efq78 {gap:var(--rc-spacing-gapSmall-desktop);} 311 }.line.svelte-3efq78 {flex:1;height:1px;background-color:var(--rc-color-grey-ui-dark);border:none;}.text.svelte-3efq78 {color:var(--rc-color-grey-text-light);text-transform:uppercase;white-space:nowrap;}`};function nye(e,t){J$(e,tye);let n=$(t,`text`,8);var r=eye();o6(K(q(K(r),2)),{size:`caption-default`,children:(e,t)=>{var r=p$();J(()=>_$(r,n())),Z(e,r)},$$slots:{default:!0}}),Z(e,r)}var rye=X(`<div></div> <!>`,1),iye={hash:`svelte-jy91ia`,code:`.rcb-express-checkout-hidden.svelte-jy91ia {display:none;}`};function x8(e,t){GY(t,!0),J$(e,iye);let n=()=>R1(s,`$translator`,r),[r,i]=B1(),a=$(t,`hideCheckoutSeparator`,3,!1),o=$(t,`allowExpressCheckout`,3,!0),s=UY(r0),c=null,l=CZ(!1),u=`express-checkout-element-${S6()}`,d=async()=>{t.onCancel&&t.onCancel()},f=async e=>{if(!o())return;let{business:n,...r}=t.expressCheckoutOptions??{};t.onClick&&t.onClick(e),e.resolve(r)},p=async e=>{await t.onError(b8.mapInitializationError(e.error))},m=async e=>t.onSubmit(e.expressPaymentType,e.billingDetails?.email??``,e),h=async e=>{G(l,!e.availablePaymentMethods),t.onReady&&t.onReady(e)};j$(()=>{try{c=b8.createExpressCheckoutElement(t.elements,t.forceEnableWalletMethods,t.expressCheckoutOptions),c.mount(`#${u}`),c.on(`ready`,h),c.on(`confirm`,m),c.on(`loaderror`,p),c.on(`click`,f),c.on(`cancel`,d)}catch(e){t.onError(b8.mapInitializationError(e))}}),M$(()=>{c?.destroy(),c=null});var g=rye(),_=BZ(g);let v;var y=q(_,2),b=e=>{{let t=W(()=>n().translate(a0.PaymentEntryPageExpressCheckoutDivider));nye(e,{get text(){return Y(t)}})}};Q(y,e=>{!a()&&o()&&!Y(l)&&e(b)}),J(()=>{l1(_,`id`,u),l1(_,`aria-hidden`,!o()||Y(l)),v=e1(_,1,`svelte-jy91ia`,null,v,{"rcb-express-checkout-hidden":!o()||Y(l)})}),Z(e,g),KY(),i()}var aye=X(`<div></div>`);function oye(e,t){GY(t,!0);let n=null,r=`address-element`,i=null,a=null,o=async e=>{await t.onError(b8.mapInitializationError(e.error))},s=async e=>{let{complete:n}=e,r=e.value.address,o=n!==i,s=!c(a,r);!o&&!s||(i=n,a=r,await t.onChange(n,r))},c=(e,t)=>e?.country===t.country&&e?.postal_code===t.postal_code&&e?.state===t.state&&e?.city===t.city&&e?.line1===t.line1&&e?.line2===t.line2;j$(()=>{try{n=b8.createAddressElement(t.elements,t.defaultCountryCode),n.mou
311nt(`#${r}`),n.on(`ready`,t.onReady),n.on(`change`,s),n.on(`loaderror`,o)}catch(e){t.onError(b8.mapInitializationError(e))}}),M$(()=>{n?.destroy(),n=null});var l=aye();l1(l,`id`,r),Z(e,l),KY()}var sye=X(`<div class="rc-elements svelte-kvz7kd"><!> <!> <!> <!></div>`),cye={hash:`svelte-kvz7kd`,code:`.rc-elements.svelte-kvz7kd {display:flex;flex-direction:column;gap:var(--rc-spacing-gapXLarge-mobile);} 312 313 @container layout-query-container (width >= 768px) {.rc-elements.svelte-kvz7kd {gap:var(--rc-spacing-gapLarge-desktop);} 314 }`};function lye(e,t){GY(t,!0),J$(e,cye);let n=()=>R1(c,`$translator`,r),[r,i]=B1(),a=$(t,`stripe`,15,null),o=$(t,`elements`,15,null),s=$(t,`allowExpressCheckout`,3,!0),c=UY(r0),l=b8.getStripeLocale(n().bcp47Locale||n().fallbackBcp47Locale),u=CZ(void 0),d=CZ(kZ(w0(t.brandingInfo)));$Z(()=>{w0(t.brandingInfo,b8.countryRequiresFullAddressForTaxes(Y(u)))&&G(d,!0)});let f=CZ(!1),p=CZ(kZ(t.skipEmail)),m=CZ(!1),h=CZ(!w0(t.brandingInfo)),g=CZ(void 0),_=CZ(`mobile`),v=CZ(void 0);function y(){window.matchMedia&&window.matchMedia(`(max-width: 767px)`).matches?G(_,`mobile`):G(_,`desktop`),G(g,{fontSizeBase:`14px`,fontFamily:Y6,spacingGridRow:`16px`},!0)}function b(){clearTimeout(Y(v)),G(v,setTimeout(()=>{y()},150),!0)}let x=e=>{t.onError(e),t.onLoadingComplete()},S=()=>{Y(p)&&Y(f)&&Y(m)&&Y(h)&&t.onLoadingComplete()},C=async()=>{Y(p)||(G(p,!0),S())},w=async()=>{Y(m)||(G(m,!0),S())},T=async()=>{Y(f)||(G(f,!0),S())},E=async()=>{Y(h)||(G(h,!0),S())},D=async(e,n)=>{t.onAddressInfoChange(e,n)},O=async e=>{let n=e.value.billingDetails?.address?.country;n&&G(u,n,!0),t.onPaymentInfoChange({complete:e.complete,paymentMethod:e.complete?e.value.type:void 0,countryCode:Y(u)})},k=async e=>{t.onEmailChange(e.complete,e.value.email)};j$(()=>(window.addEventListener(`resize`,b),()=>{window.removeEventListener(`resize`,b)})),j$(async()=>{y(),!a()&&(o()||!t.stripeAccountId||!t.publishableApiKey||!t.elementsConfiguration||await b8.initializeStripe(t.stripeAccountId,t.publishableApiKey,t.elementsConfiguration,t.brandingInfo,l,Y(g),Y(_)).then(({stripe:e,elements:t})=>{a(e),o(t)}).catch(e=>{t.onError(e)}))}),$Z(()=>{t.elementsConfiguration&&o()&&b8.updateElementsConfiguration(o(),t.elementsConfiguration)});var A=m$(),j=BZ(A),M=e=>{var n=sye(),r=K(n);x8(r,{get elements(){return o()},onError:x,onReady:w,get onSubmit(){return t.onExpressCheckoutElementSubmit},get expressCheckoutOptions(){return t.expressCheckoutOptions},get forceEnableWalletMethods(){return t.forceEnableWalletMethods},get allowExpressCheckout(){return s()}});var i=q(r,2),a=e=>{$ve(e,{get elements(){return o()},onReady:C,onChange:k,onError:x})};Q(i,e=>{t.skipEmail||e(a)});var c=q(i,2);Zve(c,{get elements(){return o()},get brandingInfo(){return t.brandingInfo},onReady:T,onChange:O,onError:x});var l=q(c,2),f=e=>{oye(e,{get elements(){return o()},get defaultCountryCode(){return Y(u)},onReady:E,onChange:D,onError:x})};Q(l,e=>{Y(d)&&e(f)}),Z(e,n)};Q(j,e=>{o()&&e(M)}),Z(e,A),KY(),i()}var uye=`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor"> 315 <path fill-rule="evenodd" d="M12 2C6.477 2 2 6.477 2 12s4.477 10 10 10 10-4.477 10-10S17.523 2 12 2zm0 6.5a1.25 1.25 0 100-2.5 1.25 1.25 0 000 2.5zm1.25 4.5a1.25 1.25 0 10-2.5 0v4.5a1.25 1.25 0 102.5 0v-4.5z" clip-rule="evenodd" /> 316</svg> `,dye=X(`<div class="rcb-ui-asset-icon svelte-a15aei"><!></div>`),fye={hash:`svelte-a15aei`,code:`.rcb-ui-asset-icon.svelte-a15aei {display:inline-block;width:1em;height:1em;}`};function S8(e){J$(e,fye);var t=dye();B$(K(t),()=>uye),Z(e,t)}var pye=X(`<div class="rcb-info svelte-jea5iu"><div class="rcb-info-icon-wrapper svelte-jea5iu"><!></div> <div class="rcb-info-content svelte-jea5iu"><div class="rcb-info-title svelte-jea5iu"><!></div> <div class="rcb-info-message svelte-jea5iu"><!></div></div></div>`),mye={hash:`svelte-jea5iu`,code:`.rcb-info.svelte-jea5iu {display:flex;align-items:flex-start;background-color:var(--rc-color-grey-ui-light);border-radius:var(--rc-shape-input-border-radius);gap:var(--rc-spacing-gapLarge-mobile);padding:var(--rc-spacing-gapLarge-mobile);}.rcb-info-content.svelte-jea5iu {flex:1;}.rcb-info-icon-wrapper.svelte-jea5iu {flex-shrink:0;color:var(--rc-color-accent-primary);}.rcb-info-title.svelte-jea5iu {color:var(--rc-color-grey-text-dark);margin-bottom:var(--rc-spacing-gapSmall-mobile);display:flex;}.rcb-info-message.svelte-jea5iu {color:var(--rc-color-grey-text-light);} 317 318 @container layout-query-container (width >= 768px) {.rcb-info.svelte-jea5iu {gap:var(--rc-spacing-gapLarge-desktop);padding:var(--rc-spacing-gapLarge-desktop);}.rcb-info-title.svelte-jea5iu {margin-bottom:var(--rc-spacing-gapSmall-desktop);} 319 }`};function hye(e,t){J$(e,mye);var n=pye(),r=K(n);S8(K(r));var i=K(q(r,2));o6(K(i),{size:`body-small`,children:(e,n)=>{var r=p$();J(()=>_$(r,t.title)),Z(e,r)},$$slots:{default:!0}}),o6(K(q(i,2)),{size:`body-small`,children:(e,n)=>{var r=p$();J(()=>_$(r,t.message)),Z(e,r)},$$slots:{default:!0}}),Z(e,n)}function gye(e,t){GY(t,!0);let n=()=>R1(a,`$translator`,r),[r,i]=B1(),a=UY(r0);{let r=W(()=>n().translate(a0.PriceUpdateTitle)),i=W(()=>{var e;return n().translate((e=t.subscriptionOption)!=null&&e.trial?a0.PriceUpdateTrialMessage:a0.PriceUpdateBaseMessage)});hye(e,{get title(){return Y(r)},get message(){return Y(i)}})}KY(),i()}function C8(e,t){if(e.productType===`subscription`){let e=t,n=e.discount?.price??e.introPrice?.price??e.base.price;if(n)return n}else{let e=t;return e.discount?.price??e.basePrice}return e.price}function _ye(e,t){if(!e||!t)return!1;let n=_6(e),r=_6(t);return n>0&&r>n}function w8(e){return`${e}% off`}function T8(e,t,n,r){return _ye(n,t)?`${e}
319% off for ${r.translatePeriod(t.number,t.unit)}`:w8(e)}function vye(e){return e.durationMode===`time_window`&&e.timeWindow?s0(e.timeWindow):e.durationMode===`time_window`&&e.period&&e.cycleCount>0?{number:e.period.number*e.cycleCount,unit:e.period.unit}:null}function E8(e,t,n){return e.percentage==null?null:e.durationMode===`time_window`?T8(e.percentage,vye(e),t,n):w8(e.percentage)}function yye({appliedDiscount:e,purchaseOptionDiscount:t,basePeriod:n,translator:r}){let i=e.percentage;if(i==null)return null;if(e.durationMode===`time_window`&&e.timeWindow)return T8(i,s0(e.timeWindow),n,r);if(!t||t.durationMode!==`time_window`)return w8(i);let a=t.period;return!a||t.cycleCount<=0?w8(i):T8(i,{number:a.number*t.cycleCount,unit:a.unit},n,r)}function D8(e,t,n){let r=e?.trim()||n;return t?`${r} (${t})`:r}function bye(e,t,n,r,i){return D8(e,E8(t,n,r),i)}function xye({priceBreakdown:e,purchaseOptionDiscount:t,fullPriceMicros:n,basePeriod:r,translator:i,fallbackDiscountName:a}){let o=e.appliedDiscounts?.[0];if(o&&o.discountedAmountInMicros>0){let e=yye({appliedDiscount:o,purchaseOptionDiscount:t,basePeriod:r,translator:i}),n=o.displayName;return{discountAmountInMicros:o.discountedAmountInMicros,displayName:n?.trim()||a,suffix:e,label:D8(n,e,a)}}if(!t)return null;let s=t.price?.amountMicros;if(s==null)return null;let c=n-s;if(c<=0)return null;let l=E8(t,r,i),u=t.name;return{discountAmountInMicros:c,displayName:u?.trim()||a,suffix:l,label:bye(u,t,r,i,a)}}function O8({priceBreakdown:e,productDetails:t,purchaseOption:n,translator:r}){let i=t.productType===_0.Subscription,a=i?n:null,o=i?null:n;return xye({priceBreakdown:e,purchaseOptionDiscount:a?.discount??o?.discount??null,fullPriceMicros:i?a?.base.price?.amountMicros??t.price.amountMicros:o?.basePrice.amountMicros??t.price.amountMicros,basePeriod:i?a?.base.period:null,translator:r,fallbackDiscountName:r.translate(a0.PricingTableDiscount)})}var k8=class extends Error{},Sye=500,Cye=X(`<div class="rc-loading svelte-zfhfge"><!></div>`),wye=X(`<div class="rc-checkout-container svelte-zfhfge"><!> <!> <form data-testid="payment-form" class="rc-checkout-form svelte-zfhfge"><div><div class="rc-elements-container svelte-zfhfge"><!></div> <div><!></div> <div><!> <!> <div class="rc-checkout-secure-container svelte-zfhfge"><!></div></div></div></form></div>`),Tye={hash:`svelte-zfhfge`,code:`.rc-checkout-secure-container.svelte-zfhfge {margin-top:var(--rc-spacing-gapXLarge-mobile);}.rc-checkout-container.svelte-zfhfge {display:flex;flex-direction:column;gap:var(--rc-spacing-gapXLarge-mobile);user-select:none;position:relative;}.rc-checkout-price-update-info-container.svelte-zfhfge {margin-top:var(--rc-spacing-gapXLarge-mobile);}.fully-hidden.svelte-zfhfge {display:none;height:0;}.rc-checkout-pay-container.svelte-zfhfge {display:flex;flex-direction:column;margin-top:var(--rc-spacing-gapXLarge-mobile);}.rc-checkout-pay-container.fully-hidden.svelte-zfhfge {display:none;}.rc-checkout-form-container.svelte-zfhfge {width:100%;}.rc-elements-container.svelte-zfhfge { 320 /* The standard height of the payment form from Stripe */ 321 /* Added to avoid the card getting smaller while loading */min-height:210px;}.rc-checkout-form-container.invisible.svelte-zfhfge {visibility:hidden;}.rc-loading.svelte-zfhfge {width:100%;height:100%;display:flex;justify-content:center;align-items:center;} 322 323 @container layout-query-container (width <= 767px) {.rc-checkout-pay-container.svelte-zfhfge {flex-grow:1;justify-content:flex-end;}.rc-checkout-form.svelte-zfhfge {flex-grow:1;}.rc-checkout-form-container.svelte-zfhfge {height:100%;display:flex;flex-direction:column;}.rc-checkout-container.svelte-zfhfge {flex-grow:1;}.rc-loading.svelte-zfhfge {position:absolute;top:0;left:0;} 324 } 325 326 @container layout-query-container (width >= 768px) {.rc-checkout-secure-container.svelte-zfhfge {margin-top:var(--rc-spacing-gapXLarge-desktop);}.rc-checkout-container.svelte-zfhfge {gap:var(--rc-spacing-gapXLarge-desktop);}.rc-checkout-pay-container.svelte-zfhfge {margin-top:var(--rc-spacing-gapXLarge-desktop);}.rc-checkout-price-update-info-container.svelte-zfhfge {margin-top:var(--rc-spacing-gapXLarge-desktop);} 327 }form.svelte-zfhfge {display:flex;flex-direction:column;flex-grow:1;}`};function Eye(e,t){var n;GY(t,!0),J$(e,Tye);let r=()=>R1(u,`$translator`,i),[i,a]=B1(),o=$(t,`onSessionPricingUpdated`,3,void 0),s=$(t,`onProcessingStateChange`,3,void 0),c=$(t,`lastTaxCustomerDetailsStore`,19,()=>N1(null)),l=UY(s6),u=UY(r0),d=W(()=>`base`in t.purchaseOption?t.purchaseOption:null),f=W(()=>C8(t.productDetails,t.purchaseOption)),p=CZ(kZ(t.defaultPriceBreakdown?.taxCalculationStatus??((n=t.brandingInfo)!=null&&n.gateway_tax_collection_enabled?`unavailable`:`disabled`))),m=CZ(kZ(t.defaultPriceBreakdown?.originalAmountInMicros??Y(f).amountMicros)),h=CZ(kZ(t.defaultPriceBreakdown?.taxAmountInMicros??null)),g=CZ(kZ(t.defaultPriceBreakdown?.taxBreakdown??null)),_=CZ(kZ(t.defaultPriceBreakdown?.totalExcludingTaxInMicros??Y(f).amountMicros)),v=CZ(kZ(t.defaultPriceBreakdown?.totalAmountInMicros??Y(f).amountMicros)),y=CZ(kZ(t.defaultPriceBreakdown?.appliedDiscounts??[])),b=W(()=>({currency:Y(f).currency,originalAmountInMicros:Y(m),totalAmountInMicros:Y(v),totalExcludingTaxInMicros:Y(_),taxCalculationStatus:Y(p),taxAmountInMicros:Y(h),taxBreakdown:Y(g),appliedDiscounts:Y(y)})),x=CZ(kZ(t.gatewayParams.elements_configuration)),S=CZ(null),C=CZ(null),w=CZ(kZ(t.customerEmail??void 0)),T=CZ(kZ(!!t.customerEmail)),E=CZ(!0),D=CZ(!1),O=CZ(void 0),k=CZ(!1),A=CZ(kZ(w0(t.brandingInfo)));$Z(()=>{w0(t.brandingInfo,b8.countryRequiresFullAddressForTaxes(Y(O)))&&G(A,!0)});let j=W(()=>!Y(A)||Y(k)),M=CZ(void 0),N=CZ(void 0),P=CZ(void 0),F=CZ(!1),ee=CZ(null),I=null,te=W(()=>Y(E)||Y(F)?`loading`:Y(N)?`error`:`form`),ne=CZ(`unavailable`),re=null,ie=W(()=>sve({brandingInfo:t.brandingInfo,termsAndConditionsUrl:t.termsAndConditionsUrl,productDetails:t.productDetails})),ae=CZ(!1),oe=W(()=>!Y(F)&&Y(D)&&Y(T)&&Y(j)&&(!Y(ie)||Y(ae))&&(Y(p)===`disabled`||Y(p)===`calculated`||Y(p)===`miss-match`)),se=W(()=>O8({priceBreakdown:Y(b),productDetails:t.productDetails,purchaseOption:t.purchaseOption,translator:r()})),ce=W(()=>Y(b)&&(t.productDetails.productType===_0.Subscription?Y(d)&&t.managementUrl?b8.buildStripeExpressCheckoutOptionsForSubscription(t.productDetails,Y(b),Y(d),r(),t.managementUrl,Y(se)):void 0:t.productDetails.defaultNonSubscriptionOption?b8.buildStripeExpressCheckoutOptionsForNonSubscription(t.productDetails,Y(b),Y(se)):void 0));$Z(()=>{t.onPriceBreakdownUpdated(Y(b))});function le(e){G(p,e.taxCalculationStatus,!0),G(m,e.originalAmountInMicros??Y(f).amountMicros,!0),G(h,e.taxAmountInMicros,!0),G(g,e.taxBreakdown,!0),G(_,e.totalExcludingTaxInMicros,!0),G(v,e.totalAmountInMicros,!0),G(y,e.appliedDiscounts??[],!0)}$Z(()=>{t.defaultPriceBreakdown||(G(m,Y(f).amountMicros,!0),G(h,null),G(g,null),G(_,Y(f).amountMicros,!0),G(v,Y(f).amountMicros,!0),G(y,[],!0))}),$Z(()=>{t.defaultPriceBreakdown&&le(t.defaultPriceBreakdown)}),$Z(()=>{G(x,t.gatewayParams.elements_configuration,!0)}),$Z(()=>{var e;(e=s())==null||e(Y(F))}),j$(async()=>
327{Y(p)===`unavailable`&&await ue(null).catch(Oe)}),M$(()=>{I&&=(clearTimeout(I),null),Y(ee)&&(Y(ee).abort(),G(ee,null))});async function ue(e,n){await t.purchaseOperationHelper.checkoutRefreshPricing({countryCode:e?.countryCode,postalCode:e?.postalCode,state:e?.state,city:e?.city,addressLine1:e?.addressLine1,addressLine2:e?.addressLine2,signal:n}).then(t=>{let r=k6({taxCalculation:t,taxCustomerDetails:e});l.trackSDKEvent(r),n?.throwIfAborted();let i;i=t.failed_reason?!e&&t.failed_reason===Q1.invalid_tax_location?`pending`:`disabled`:`calculated`,de(t,i,e)})}function de(e,t,n){let r=$1(e,t);le(r),o()?o()(e,r):G(x,e.gateway_params.elements_configuration,!0),re=n,fe(n)}function fe(e){e!=null&&e.countryCode&&z1(c(),e)}function L(){l.trackSDKEvent({eventName:y6.CheckoutPaymentFormImpression,properties:{mode:C6}}),G(E,!1)}function pe(e,t){G(w,t,!0),G(T,e,!0),ge()}function me({complete:e,paymentMethod:t,countryCode:n}){G(M,t,!0),G(D,e,!0),G(O,n,!0),ge()}function he(e,t){G(k,e,!0),fe({countryCode:t.country??void 0,postalCode:t.postal_code??void 0,state:t.state??void 0,city:t.city??void 0,addressLine1:t.line1??void 0,addressLine2:t.line2??void 0}),ge()}function ge(){ye()&&Y(p)!==`loading`&&(G(ne,Y(p),!0),G(p,`loading`)),I&&clearTimeout(I),I=setTimeout(()=>{I=null,be()},Sye)}async function _e(e){if(e?.preventDefault(),Y(F)||Y(ie)&&!Y(ae))return;let n=A6({selectedPaymentMethod:Y(M)??null});l.trackSDKEvent(n),G(F,!0),await xe()?t.onContinue():G(F,!1)}async function ve(e,n){G(M,e,!0),G(w,t.customerEmail??n,!0),await _e()}function ye(){return Y(M)===`card`&&Y(T)&&Y(D)&&Y(j)&&!Y(F)&&Y(p)!==`disabled`}async function be(){if(!ye()){Y(p)===`loading`&&G(p,Y(ne),!0);return}Y(p)!==`loading`&&(G(ne,Y(p),!0),G(p,`loading`)),await Se(async e=>{await Ce().then(()=>e.throwIfAborted()).then(()=>we(e)).then(()=>e.throwIfAborted()).catch(t=>{e.aborted||Oe(t)}).finally(()=>{Y(p)===`loading`&&!e.aborted&&G(p,Y(ne),!0)})})}async function xe(){return await Se(async e=>{let t=Y(v),n;return await Ce().then(()=>e.throwIfAborted()).then(()=>we(e)).then(e=>{n=e}).then(()=>e.throwIfAborted()).then(Te(t)).then(()=>e.throwIfAborted()).then(Ee).then(()=>e.throwIfAborted()).then(()=>De(n)).then(()=>e.throwIfAborted()).then(()=>!0).catch(t=>(e.aborted||Oe(t),!1))})}async function Se(e){Y(ee)&&Y(ee).abort(),G(ee,new AbortController,!0);let t=Y(ee).signal;try{return await e(t)}catch(e){if(e instanceof DOMException&&e.name===`AbortError`)return Promise.resolve(void 0);throw e}}async function Ce(){Y(C)&&await b8.submitElements(Y(C))}async function we(e){if(Y(p)===`unavailable`||Y(p)===`disabled`||!Y(C)||!Y(S))return;let{customerDetails:t,confirmationTokenId:n}=await b8.extractTaxCustomerDetails(Y(C),Y(S));e?.throwIfAborted();let r=re;return t.postalCode===r?.postalCode&&t.countryCode===r?.countryCode&&t.state===r?.state&&t.city===r?.city&&t.addressLine1===r?.addressLine1&&t.addressLine2===r?.addressLine2||await ue(t,e),n&&Y(M)!==`card`?n:void 0}function Te(e){return()=>{if(Y(v)!==e)throw new k8}}async function Ee(){let e=(await t.purchaseOperationHelper.checkoutComplete(Y(w),r().selectedLocale))?.gateway_params?.client_secret;e&&G(P,e,!0)}async function De(e){!Y(S)||!Y(C)||!Y(P)||await b8.confirmElements(Y(S),Y(C),Y(P),e)}async function Oe(e){if(e instanceof k8)G(p,`miss-match`);else if(e instanceof n0){let n=lve({errorCode:e.errorCode.toString(),errorMessage:e.message});l.trackSDKEvent(n),e.errorCode===t0.MissingEmailError?G(N,r().translate(a0.ErrorPageErrorMessageInvalidEmailError,{email:Y(w)}),!0):t.onError(e)}else if(e instanceof v8)await ke(e);else throw e}async function ke(e){let n=j6({errorCode:e.gatewayErrorCode??``,errorMessage:e.message??``});l.trackSDKEvent(n),e.code===_8.HandledFormError||(e.code===_8.UnhandledFormError?G(N,e.message,!0):t.onError(new n0(t0.ErrorSettingUpPurchase,`Failed to initialize payment form`,e.message)))}let Ae=()=>{G(N,void 0)};var je=wye(),Me=K(je),Ne=e=>{var t=Cye();N6(K(t)),Z(e,t)};Q(Me,e=>{Y(te)===`loading`&&e(Ne)});var Pe=q(Me,2),Fe=e=>{{let t=e=>{T0(e)},n=e=>{var t=p$();J(()=>_$(t,Y(N))),Z(e,t)},i=W(()=>r().translate(a0.ErrorButtonTryAgain));l6(e,{title:null,type:`error`,get closeButtonTitle(){return Y(i)},onDismiss:Ae,icon:t,message:n,$$slots:{icon:!0,message:!0}})}};Q(Pe,e=>{Y(te)===`error`&&e(Fe)});var Ie=q(Pe,2),Le=K(Ie);let Re;var ze=K(Le),Be=K(ze);{let e=W(()=>!!t.customerEmail),n=W(()=>!Y(ie)||Y(ae));
327lye(Be,{get stripeAccountId(){return t.gatewayParams.stripe_account_id},get publishableApiKey(){return t.gatewayParams.publishable_api_key},get elementsConfiguration(){return Y(x)},get brandingInfo(){return t.brandingInfo},get forceEnableWalletMethods(){return t.forceEnableWalletMethods},get skipEmail(){return Y(e)},onLoadingComplete:L,onError:ke,onEmailChange:pe,onPaymentInfoChange:me,onAddressInfoChange:he,onExpressCheckoutElementSubmit:ve,get expressCheckoutOptions(){return Y(ce)},get allowExpressCheckout(){return Y(n)},get stripe(){return Y(S)},set stripe(e){G(S,e,!0)},get elements(){return Y(C)},set elements(e){G(C,e,!0)}})}var Ve=q(ze,2);let He;gye(K(Ve),{get subscriptionOption(){return Y(d)}});var Ue=q(Ve,2);let We;var Ge=K(Ue),Ke=e=>{{let n=W(()=>t.brandingInfo?.app_name);ove(e,{get appName(){return Y(n)},get termsAndConditionsUrl(){return t.termsAndConditionsUrl},onChange:e=>G(ae,e,!0),get checked(){return Y(ae)},set checked(e){G(ae,e,!0)}})}};Q(Ge,e=>{Y(ie)&&t.termsAndConditionsUrl&&e(Ke)});var qe=q(Ge,2);{let e=W(()=>!Y(oe)),n=W(()=>{var e;return(e=t.brandingInfo)!=null&&e.gateway_tax_collection_enabled?Y(b):void 0});_ve(qe,{get disabled(){return Y(e)},get subscriptionOption(){return Y(d)},get priceBreakdown(){return Y(n)}})}nve(K(q(qe,2)),{get brandingInfo(){return t.brandingInfo},get purchaseOption(){return t.purchaseOption},get termsAndConditionsUrl(){return t.termsAndConditionsUrl}}),J(()=>{Re=e1(Le,1,`rc-checkout-form-container svelte-zfhfge`,null,Re,{invisible:Y(te)!==`form`}),He=e1(Ve,1,`rc-checkout-price-update-info-container svelte-zfhfge`,null,He,{"fully-hidden":Y(p)!==`miss-match`||Y(te)!==`form`}),We=e1(Ue,1,`rc-checkout-pay-container svelte-zfhfge`,null,We,{"fully-hidden":Y(te)!==`form`})}),o$(`submit`,Ie,_e),Z(e,je),KY(),a()}var Dye=f$(`<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M4.94 5.72656L8 8.7799L11.06 5.72656L12 6.66656L8 10.6666L4 6.66656L4.94 5.72656Z" class="arrow-fill svelte-1eerlbf" fill-opacity="0.7"></path></svg>`),Oye={hash:`svelte-1eerlbf`,code:`.arrow.svelte-1eerlbf {transition:transform 0.3s ease;}.arrow-fill.svelte-1eerlbf {fill:var(--rc-color-grey-text-dark);}.arrow.left.svelte-1eerlbf {transform:rotate(90deg);}.arrow.up.svelte-1eerlbf {transform:rotate(180deg);}.arrow.right.svelte-1eerlbf {transform:rotate(-90deg);}.arrow.down.svelte-1eerlbf {transform:rotate(0deg);}`};function A8(e,t){J$(e,Oye);let n=$(t,`direction`,8);var r=Dye();J(()=>e1(r,0,`arrow ${n()??``}`,`svelte-1eerlbf`)),Z(e,r)}var kye=f$(`<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" class="arrow"><path d="M15.41 7.41L14 6L8 12L14 18L15.41 16.59L10.83 12L15.41 7.41Z" class="arrow-fill svelte-159d2rl" fill-opacity="0.7"></path></svg>`),Aye={hash:`svelte-159d2rl`,code:`.arrow-fill.svelte-159d2rl {fill:var(--rc-color-grey-text-dark);}`};function jye(e){J$(e,Aye),Z(e,kye())}var Mye=`<svg width="24" height="24" viewBox="0 0 24 24" fill="currentColor" 328 xmlns="http://www.w3.org/2000/svg"> 329 <g opacity="0.5" clip-path="url(#clip0_344_3390)"> 330 <path d="M7 18C5.9 18 5.01 18.9 5.01 20C5.01 21.1 5.9 22 7 22C8.1 22 9 21.1 9 20C9 18.9 8.1 18 7 18ZM1 2V4H3L6.6 11.59L5.25 14.04C5.09 14.32 5 14.65 5 15C5 16.1 5.9 17 7 17H19V15H7.42C7.28 15 7.17 14.89 7.17 14.75L7.2 14.63L8.1 13H15.55C16.3 13 16.96 12.59 17.3 11.97L20.88 5.48C20.96 5.34 21 5.17 21 5C21 4.45 20.55 4 20 4H5.21L4.27 2H1ZM17 18C15.9 18 15.01 18.9 15.01 20C15.01 21.1 15.9 22 17 22C18.1 22 19 21.1 19 20C19 18.9 18.1 18 17 18Z" 331 fill="currentColor"/> 332 </g> 333 <defs> 334 <clipPath id="clip0_344_3390"> 335 <rect width="24" height="24" fill="currentColor"/> 336 </clipPath> 337 </defs> 338</svg> 339`,Nye=X(`<div style="color:var(--rc-color-gray-text-dark);"><!></div>`);function Pye(e){var t=Nye();B$(K(t),()=>Mye),Z(e,t)}var Fye=`<svg width="24" height="24" viewBox="0 0 24 24" fill="currentColor" 340 xmlns="http://www.w3.org/2000/svg"> 341 <path d="M18 8H17V6C17 3.24 14.76 1 12 1C9.24 1 7 3.24 7 6V8H6C4.9 8 4 8.9 4 10V20C4 21.1 4.9 22 6 22H18C19.1 22 20 21.1 20 20V10C20 8.9 19.1 8 18 8ZM12 17C10.9 17 10 16.
3411 10 15C10 13.9 10.9 13 12 13C13.1 13 14 13.9 14 15C14 16.1 13.1 17 12 17ZM15.1 8H8.9V6C8.9 4.29 10.29 2.9 12 2.9C13.71 2.9 15.1 4.29 15.1 6V8Z" 342 fill="currentColor"/> 343</svg> 344`,Iye=X(`<div style="color:var(--rc-color-accent);" class="rcb-ui-asset-icon svelte-1dhcigx"><!></div>`),Lye={hash:`svelte-1dhcigx`,code:`div.svelte-1dhcigx {height:24px;width:24px;}`};function Rye(e){J$(e,Lye);var t=Iye();B$(K(t),()=>Fye),Z(e,t)}var zye=`<svg viewBox="0 0 124 124" fill="var(--rc-color-grey-text-dark)" xmlns="http://www.w3.org/2000/svg"> 345 <circle cx="62" cy="62" r="62" fill="var(--rc-color-grey-text-dark)" opacity="0.2"/> 346 <rect x="44.1116" y="56" width="27.5" height="11" transform="rotate(45 44.1116 56)" fill="var(--rc-color-grey-text-dark)"/> 347 <rect x="79.1133" y="44.334" width="11" height="44" transform="rotate(45 79.1133 44.334)" fill="var(--rc-color-grey-text-dark)"/> 348</svg> 349`,Bye=X(`<div style="color:var(--rc-color-primary)"><!></div>`);function j8(e){var t=Bye();B$(K(t),()=>zye),Z(e,t)}var Vye=f$(`<svg width="20" height="20" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M19 6.41L17.59 5L12 10.59L6.41 5L5 6.41L10.59 12L5 17.59L6.41 19L12 13.41L17.59 19L19 17.59L13.41 12L19 6.41Z" class="arrow-fill svelte-1prqhxu" fill-opacity="0.7"></path></svg>`),Hye={hash:`svelte-1prqhxu`,code:`.arrow-fill.svelte-1prqhxu {fill:var(--arrow-fill-color, var(--rc-color-grey-text-dark));}`};function Uye(e){J$(e,Hye),Z(e,Vye())}var Wye=`<svg xmlns="http://www.w3.org/2000/svg" width="16" height="15" viewBox="0 0 16 15" fill="none"> 350<path d="M7.99697 9.21971C8.54919 9.21978 8.99697 9.66747 8.99697 10.2197C8.99696 10.772 8.54919 11.2196 7.99697 11.2197C7.44469 11.2197 6.996 10.772 6.99599 10.2197C6.99599 9.66743 7.44468 9.21971 7.99697 9.21971Z" fill="var(--rc-color-grey-text-dark)" fill-opacity="0.9"/> 351<path d="M7.99599 4.21971C8.54822 4.21978 8.99599 4.66747 8.99599 5.21971V7.21971C8.99598 7.77195 8.54821 8.21965 7.99599 8.21971C7.44371 8.21971 6.996 7.77199 6.99599 7.21971V5.21971C6.99599 4.66743 7.44371 4.21971 7.99599 4.21971Z" fill="var(--rc-color-grey-text-dark)" fill-opacity="0.9"/> 352<path fill-rule="evenodd" clip-rule="evenodd" d="M5.15615 1.63964C6.4187 -0.546529 9.57428 -0.546561 10.8368 1.63964L15.5477 9.79979C16.8097 11.9862 15.2322 14.7192 12.7079 14.7197H3.28505C0.76025 14.7196 -0.818142 11.9864 0.444233 9.79979L5.15615 1.63964ZM9.10537 2.63964C8.61269 1.78643 7.3803 1.78645 6.88759 2.63964L2.17665 10.7998C1.68403 11.6531 2.29983 12.7196 3.28505 12.7197H12.7079C13.6926 12.7192 14.3084 11.6528 13.8163 10.7998L9.10537 2.63964Z" fill="var(--rc-color-grey-text-dark)" fill-opacity="0.9"/> 353</svg>`,Gye=X(`<div class="rcb-ui-asset-icon svelte-18og1ci"><!></div>`),Kye={hash:`svelte-18og1ci`,code:`.rcb-ui-asset-icon.svelte-18og1ci {display:inline-block;width:1em;height:1em;}`};function qye(e){J$(e,Kye);var t=Gye();B$(K(t),()=>Wye),Z(e,t)}var Jye={cart:Pye,error:T0,lock:Rye,success:j8,back:jye,info:S8,close:Uye,warning:qye,"chevron-left":A8,"chevron-right":A8,"chevron-up":A8,"chevron-down":A8};function M8(e,t){GY(t,!0);let n=Jye[t.name],r=CZ(kZ({}));if(t.name.startsWith(`chevron`)){let e=t.name.split(`-`)[1];G(r,{direction:e},!0)}n(e,H1(()=>Y(r))),KY()}var Yye=X(`<span class="rc-sandbox-only-error svelte-1dod9xz"><!></span> <br/> <br/>`,1),Xye=X(`<!> <a class="svelte-1dod9xz"> </a>.`,1),Zye=X(`<!> <!>`,1),Qye={hash:`svelte-1dod9xz`,code:`a.svelte-1dod9xz {color:var(--rc-color-grey-text-dark);}.rc-sandbox-only-error.svelte-1dod9xz {font-weight:bold;}`};function N8(e,t){GY(t,!0),J$(e,Qye);let n=()=>R1(s,`$translator`,r),[r,i]=B1(),a=$(t,`fullWidth`,3,!1),o=W(()=>t.lastError??new n0(t0.UnknownError,`Unknown error without state set.`)),s=UY(r0),c=W(()=>Y(o).errorCode===t0.StripeTaxNotActive||Y(o).errorCode===t0.StripeInvalidTaxOriginAddress||Y(o).errorCode===t0.StripeMissingRequiredPermission);j$(()=>{X1.errorLog(`Displayed error: ${t0[Y(o).errorCode]}. Message: ${Y(o).message??`None`}. Underlying error: ${Y(o).underlyingErrorMessage??`None`}`)});function l(){return Y(o).errorCode===t0.AlreadyPurchasedError?n().translate(a0.ErrorPageCloseButtonTitle,{appName:t.appName??`App`}):Y(c)?n().translate(a0.ErrorButtonClose):n().translate(a0.ErrorButtonTryAgain)}function u(){switch(Y(o).errorCode){case t0.AlreadyPurchasedError:return t.productDetails.productType===_0.Subscription?n().translate(a0.ErrorPageErrorTitleAlreadySubscribed,{productTitle:t.productDetails.title}):n().translate(a0.ErrorPageErrorTitleAlreadyPurchased,{productTitle:t.productDetails.title});case t0.StripeTaxNotActive:return n().translate(a0.ErrorPageErrorTitleStripeTaxNotActive);case t0.StripeInvalidTaxOriginAddress:return n().translate(a0.ErrorPageErrorTitleStripeInvalidTaxOriginAddress);case t0.StripeMissingRequiredPermission:return n().translate(a0.ErrorPageErrorTitleStripeMissingRequiredPermission);default:return n().translate(a0.ErrorPageErrorTitleOtherErrors)}}function d(){let e=Y(o).getErrorCode();switch(Y(o).errorCode){case t0.ErrorSettingUpPurchase:case t0.InvalidPaddleAPIKeyError:return n().translate(a0.ErrorPageErrorMessageErrorSettingUpPurchase,{errorCode:e});case t0.ErrorChargingPayment:return n().translate(a0.ErrorPageErrorMessageErrorChargingPayment,{errorCode:e});case t0.AlreadyPurchasedError:return t.productDetails.productType===_0.Subscription?n().translate(a0.ErrorPageErrorMessageAlreadySubscribed,{errorCode:e}):n().translate(a0.ErrorPageErrorMessageAlreadyPurchased,{errorCode:e});case t0.StripeTaxNotActive:return n().translate(a0.ErrorPageErrorMessageStripeTaxNotActive,{errorCode:e});case t0.StripeInvalidTaxOriginAddress:return n().translate(a0.ErrorPageErrorMessageStripeInvalidTaxOriginAddress,{errorCode:e});case t0.StripeMissingRequiredPermission:return n().translate(a0.ErrorPageErrorMessageStripeMissingRequiredPermission,{errorCode:e});case t0.NetworkError:return n().translate(a0.ErrorPageErrorMessageNetworkError,{errorCode:e});default:return n().translate(a0.ErrorPageErrorMessageUnknownError,{errorCode:e})}}function f(){return Y(o).errorCode===t0.AlreadyPurchasedError?a0.ErrorPageTroubleAccessing:a0.ErrorPageIfErrorPersists}function p(){return Y(o).errorCode===t0.AlreadyPurchasedError?`success`:`error`}{let n=e=>{{let t=W(p);M8(e,{get name(){return Y(t)}})}},r=e=>{var n=Zye(),r=BZ(n),i=e=>{var t=Yye();u6(K(BZ(t)),{get key(){return a0.ErrorPageErrorMessageOnlyInSandbox}}),Z(e,t)};Q(r,e=>{Y(c)&&e(i)});var a=q(r),o=q(a),s=e=>{var n=Xye(),r=BZ(n);{let e=W(f);u6(r,{get key(){return Y(e)}})}var i=q(r,2),a=K(i);J(()=>{l1(i,`href`,`mailto:${t.supportEmail??``}`),_$(a,t.supportEmail)}),Z(e,n)};Q(o,e=>{!Y(c)&&t.supportEmail&&e(s)}),J(e=>_$(a,` ${e??``} `),[d]),Z(e,n)},i=W(u),o=W(l);l6(e,{get title(){return Y(i)},get onDismiss(){return t.onDismiss},type:`error`,get closeButtonTitle(){return Y(o)},get fullWidth(){return a()},icon:n,message:r,$$slots:{icon:!0,message:!0}})}KY(),i()}function P8(e,t){GY(t,!1);let n=()=>R1(l,`$translator`,r),[r,i]=B1(),a=$(t,`onContinue`,8),o=$(t,`title`,8,void 0),s=$(t,`closeButtonTitle`,8,void 0),c=$(t,`fullWidth`,8,!1),l=UY(r0),u=UY(s6);function d(){u.trackSDKEvent(uve(`go_back_to_app`,C6)),a()()}j$(()=>{u.trackSDKEvent(dve(C6))}),D1();{let t=e=>{j8(e)},r=mZ(()=>(e$(o()),n(),e$(a0),QQ(()=>o()??n().translate(a0.SuccessPagePurchaseSuccessful)))),i=mZ(()=>(e$(s()),n(),e$(a0),QQ(()=>s()??n().translate(a0.SuccessPageButtonClose))));l6(e,{type:`success`,get title(){return Y(r)},onDismiss:d,get closeButtonTitle(){return Y(i)},get fullWidth(){return c()},icon:t,$$slots:{icon:!0}})}KY(),i()}function $ye(e){N6(e)}var ebe=X(`<button class="rcb-applied-discount-chip svelte-56pxsq" type="button"><span class="rcb-applied-discount-code svelte-56pxsq"> </span> <span class="rcb-applied-discount-icon svelte-56pxsq" aria-hidden="true"><!></span></button>`),tbe=X(`<div class="rcb-applied-discount-chip rcb-applied-discount-chip--static svelte-56pxsq"><span class="rcb-applied-discount-code svelte-56pxsq"> </span></div>`),nbe=X(`<div class="rcb-applied-discount-label svelte-56pxsq"> </div>`),rbe=X(`<div class="rcb-applied-discount svelte-56pxsq"><!> <!></div>`),ibe=X(`<div class="rcb-discount-error svelte-56pxsq" role="alert"><span class="rcb-discount-error-icon svelte-56pxsq" aria-hidden="true"><!></span> <span> </span></div>`),abe=X(`<div class="rcb-discount-input svelte-56pxsq"><div class="rcb-discount-input-row svelte-56pxsq"><div><label class="rcb-discount-field-label svelte-56pxsq" for="rc-discount-code"> </label> <input class="rcb-discount-field-input svelte-56pxsq" id="rc-discount-code" type="text" autocomplete="off" placeholder=" "/></div> <button type="button"> </button></div> <!></div>`),obe=X(`<div class="rcb-product-price-container svelte-56pxsq"><!></div>`),sbe={hash:`svelte-56pxsq`,code:`.rcb-product-price-container.svelte-56pxsq {display:flex;flex-direction:column;justify-content:space-between;gap:var(--rc-spacing-gapMedium-mobile);color:var(--rc-color-grey-text-dark);}.rcb-discount-input.svelte-56pxsq {display:flex;flex-direction:column;gap:4px;}.rcb-discount-input-row.svelte-56pxsq {display:flex;gap:8px;width:100%;}.rcb-discount-field.svelte-56pxsq {position:relative;display:flex;align-items:flex-end;flex:1 1 auto;min-width:0;min-height:48px;padding:4px 12px;border:1px solid var(--rc-color-grey-ui-dark);border-radius:var(--rc-shape-input-border-radius);background:var(--rc-color-background);transition:border-color 150ms ease;}.rcb-discount-field--focused.svelte-56pxsq {border-color:var(--rc-color-grey-text-light);}.rcb-discount-field-label.svelte-56pxsq {position:absolute;top:50%;left:12px;max-width:calc(100% - 24px);overflow:hidden;color:var(--rc-color-grey-text-light);font:var(--rc-text-bodySmall-mobile);text-overflow:ellipsis;pointer-events:none;transform:translateY(-50%);transform-origin:left top;transition:top 150ms ease, 354 transform 150ms ease, 355 font-size 150ms ease, 356 color 150ms ease;white-space:nowrap;}.rcb-discount-field--floating.svelte-56pxsq .rcb-discount-field-label:where(.svelte-56pxsq) {top:8px;font-size:12px;transform:translateY(0);}.rcb-discount-field-input.svelte-56pxsq {width:100%;min-width:0;padding:14px 0 0;border:none;outline:none;background:transparent;color:var(--rc-color-grey-text-dark);font:var(--rc-text-bodySmall-mobile);}.rcb-discount-field-input.svelte-56pxsq::placeholder {color:transparent;}.rcb-discount-field-input.svelte-56pxsq:disabled {cursor:not-allowed;}.rcb-discount-action-button.svelte-56pxsq {flex:0 0 auto;min-width:82px;min-height:48px;padding:0 16px;border-radius:var(--rc-shape-input-button-border-radius);color:var(--rc-color-grey-text-light);font:var(--rc-text-bodyBase-desktop);transition:background-color 150ms ease, 357 color 150ms ease, 358 opacity 150ms ease;}.rcb-discount-action-button--enabled.svelte-56pxsq {border:1px solid var(--rc-color-grey-ui-dark);background-color:var(--rc-color-grey-ui-light);color:var(--rc-color-grey-text-light);cursor:pointer;}.rcb-discount-action-button.svelte-56pxsq:disabled {background-color:var(--rc-color-grey-ui-light);cursor:not-allowed;opacity:0.7;}.rcb-discount-error.svelte-56pxsq {display:flex;align-items:center;gap:8px;color:var(--rc-color-grey-text-dark);font:var(--rc-text-bodySmall-mobile);}.rcb-discount-error-icon.svelte-56pxsq {display:inline-flex;align-items:center;justify-content:center;flex:0 0 auto;width:16px;height:16px;}.rcb-discount-error-icon.svelte-56pxsq {display:block;width:16px;height:16px;}.rcb-applied-discount.svelte-56pxsq {display:flex;flex-direction:column;align-items:flex-start;gap:4px;max-width:100%;}.rcb-applied-discount-chip.svelte-56pxsq {--arrow-fill-color: var(--rc-color-grey-text-dark);
vendor: 1,867 bytes, lines 358-360
358display:inline-flex;align-items:center;gap:8px;width:fit-content;max-width:100%;padding:0 12px;border:1px solid var(--rc-color-grey-ui-light);border-radius:var(--rc-shape-input-button-border-radius);background-color:var(--rc-color-grey-ui-light);color:var(--rc-color-grey-text-dark);font:var(--rc-text-bodySmall-mobile);font-weight:500;transition:background-color 150ms ease, 359 border-color 150ms ease, 360 opacity 150ms ease;}button.rcb-applied-discount-chip.svelte-56pxsq {cursor:pointer;}.rcb-applied-discount-chip--static.svelte-56pxsq {cursor:default;}button.rcb-applied-discount-chip.svelte-56pxsq:disabled {cursor:not-allowed;opacity:0.7;}.rcb-applied-discount-code.svelte-56pxsq {overflow:hidden;text-overflow:ellipsis;white-space:nowrap;padding:4px 0;}.rcb-applied-discount-icon.svelte-56pxsq {display:inline-flex;align-items:center;justify-content:center;flex:0 0 auto;color:var(--rc-color-grey-text-light);}.rcb-applied-discount-icon.svelte-56pxsq {width:16px;height:16px;}.rcb-applied-discount-label.svelte-56pxsq {color:var(--rc-color-grey-text-light);font:var(--rc-text-bodySmall-mobile);}`};function F8(e,t){GY(t,!1),J$(e,sbe);let n=()=>R1(x,`$translator`,r),[r,i]=B1(),a=wZ(),o=wZ(),s=wZ(),c=wZ(),l=wZ(),u=$(t,`showDiscountCodeField`,8,!1),d=$(t,`discountCode`,12,``),f=$(t,`appliedDiscountCode`,8,null),p=$(t,`discountSuffix`,8,null),m=$(t,`discountCodeError`,8,null),h=$(t,`isUpdatingDiscountCode`,8,!1),g=$(t,`isDiscountCodeControlsEnabled`,8,!1),_=$(t,`onDiscountCodeChange`,8,void 0),v=$(t,`onApplyDiscountCode`,8,void 0),y=$(t,`onRemoveDiscountCode`,8,void 0),b=wZ(!1),x=UY(r0),S=e=>e.toUpperCase(),C=()=>{var e;d(S(d())),(e=_())==null||e(d())},w=e=>{var t;e.key===`Enter`&&(e.preventDefault(),e.stopPropagation(),Y(s)&&((t=v())==null||t()))};aQ(()=>e$(d()),()=>{G(a,d().trim().length>0)}),aQ(()=>(Y(b),Y(a)),()=>{G(o,Y(b)||Y(a))}),aQ(()=>
360(e$(g()),e$(h()),Y(a)),()=>{G(s,g()&&!h()&&Y(a))}),aQ(()=>e$(m()),()=>{G(c,m()===`Enter a discount code.`?m():`Code can't be applied.`)}),aQ(()=>e$(f()),()=>{G(l,f()?S(f()):null)}),oQ(),D1();var T=obe(),E=K(T),D=e=>{var t=rbe(),n=K(t),r=e=>{var t=ebe();t.__click=()=>y()?.();var n=K(t),r=K(n);M8(K(q(n,2)),{name:`close`}),J(()=>{t.disabled=h(),l1(t,`aria-label`,`Remove promo code ${Y(l)}`),_$(r,Y(l))}),Z(e,t)},i=e=>{var t=tbe(),n=K(K(t));J(()=>_$(n,Y(l))),Z(e,t)};Q(n,e=>{g()?e(r):e(i,!1)});var a=q(n,2),o=e=>{var t=nbe(),n=K(t);J(()=>_$(n,` 361 ${p()??``}`)),Z(e,t)};Q(a,e=>{p()&&e(o)}),Z(e,t)},O=e=>{var t=m$(),r=BZ(t),i=e=>{var t=abe(),r=K(t),i=K(r);let a;var l=K(i),u=K(l),f=q(l,2);f.__input=C,f.__keydown=w;var p=q(i,2);let _;p.__click=()=>v()?.();var y=K(p),x=q(r,2),S=e=>{var t=ibe(),n=K(t);M8(K(n),{name:`warning`});var r=K(q(n,2));J(()=>_$(r,Y(c))),Z(e,t)};Q(x,e=>{m()&&e(S)}),J((e,t)=>{a=e1(i,1,`rcb-discount-field svelte-56pxsq`,null,a,{"rcb-discount-field--focused":Y(b),"rcb-discount-field--floating":Y(o)}),_$(u,e),l1(f,`aria-invalid`,!!m()),f.disabled=h()||!g(),_=e1(p,1,`rcb-discount-action-button svelte-56pxsq`,null,_,{"rcb-discount-action-button--enabled":Y(s)}),p.disabled=t,_$(y,h()?`Applying...`:`Apply`)},[()=>(n(),e$(a0),QQ(()=>n().translate(a0.DiscountInputLabel))),()=>(e$(h()),e$(g()),e$(d()),QQ(()=>h()||!g()||!d().trim()))]),o$(`focus`,f,()=>G(b,!0)),o$(`blur`,f,()=>G(b,!1)),Tde(f,d),Z(e,t)};Q(r,e=>{u()&&e(i)},!0),Z(e,t)};Q(E,e=>{f()?e(D):e(O,!1)}),Z(e,T),KY(),i()}s$([`click`,`input`,`keydown`]);var cbe=X(`<div class="rcb-pricing-dropdown svelte-v5skdw"><div class="rcb-pricing-dropdown-header svelte-v5skdw" tabindex="0" role="button"><!> <span class="rcb-pricing-dropdown-toggle svelte-v5skdw"><!></span></div> <div><div class="rcb-pricing-dropdown-content-inner svelte-v5skdw"><!></div></div></div>`),lbe={hash:`svelte-v5skdw`,code:`.rcb-pricing-dropdown.svelte-v5skdw {width:100%;overflow:hidden;display:flex;flex-direction:column;}.rcb-pricing-dropdown-header.svelte-v5skdw {padding-top:var(--rc-spacing-gapSmall-mobile);padding-bottom:var(--rc-spacing-gapSmall-mobile);padding-left:var(--rc-spacing-gapLarge-mobile);padding-right:var(--rc-spacing-gapMedium-mobile);color:var(--rc-color-grey-text-light);border-radius:var(--rc-shape-input-button-border-radius);cursor:pointer;display:inline-flex;align-items:center;background-color:var(--rc-color-grey-ui-light);width:fit-content;user-select:none;}.rcb-pricing-dropdown-toggle.svelte-v5skdw {display:flex;align-items:center;margin-left:var(--rc-spacing-gapSmall-mobile);}.rcb-pricing-dropdown-content.svelte-v5skdw {display:flex;flex-direction:column;overflow:hidden;} 362 363 @container layout-query-container (width < 768px) {.rcb-pricing-dropdown-content.svelte-v5skdw {max-height:1000px; /* Set a large max-height for animation */transition:max-height 0.2s ease-in-out;}.rcb-pricing-dropdown-content.collapsed.svelte-v5skdw {max-height:0;}.rcb-pricing-dropdown-content-inner.svelte-v5skdw {padding-top:var(--rc-spacing-gapMedium-mobile);} 364 } 365 366 @container layout-query-container (width >= 768px) {.rcb-pricing-dropdown-header.svelte-v5skdw {display:none;} 367 }`};function ube(e,t){GY(t,!1),J$(e,lbe);let n=()=>R1(c,`$translator`,r),[r,i]=B1(),a=$(t,`isExpanded`,12,!0),o=$(t,`showDiscountCodeField`,8,!1),s=$(t,`children`,8),c=UY(r0);function l(){a(!a())}D1();var u=cbe(),d=K(u),f=K(d);o6(f,{size:`label-default`,children:(e,t)=>{var r=m$(),i=BZ(r),s=e=>{var t=p$();J(e=>_$(t,e),[()=>(n(),e$(a0),QQ(()=>n().translate(a0.PricingDropdownHideDetails)))]),Z(e,t)},c=e=>{var t=m$(),r=BZ(t),i=e=>{var t=p$();J(e=>_$(t,e),[()=>(n(),e$(a0),QQ(()=>n().translate(a0.PricingDropdownAddPromoCode)))]),Z(e,t)},a=e=>{var t=p$();J(e=>_$(t,e),[()=>(n(),e$(a0),QQ(()=>n().translate(a0.PricingDropdownShowDetails)))]),Z(e,t)};Q(r,e=>{o()?e(i):e(a,!1)},!0),Z(e,t)};Q(i,e=>{a()?e(s):e(c,!1)}),Z(e,r)},$$slots:{default:!0}});var p=K(q(f,2)),m=e=>{M8(e,{name:`chevron-up`})},h=e=>{M8(e,{name:`chevron-down`})};Q(p,e=>{a()?e(m):e(h,!1)});var g=q(d,2);let _;A$(K(K(g)),()=>s()??UJ),J(()=>{l1(d,`aria-expanded`,a()),_=e1(g,1,`rcb-pricing-dropdown-content svelte-v5skdw`,null,_,{collapsed:!a()})}),o$(`click`,d,l),o$(`keydown`,d,e=>e.key===`Enter`||e.key===` `?l():null),Z(e,u),KY(),i()}var dbe=X(`<div class="rcb-pricing-table-value-loading svelte-w1kcbi"><!></div>`),fbe={hash:`svelte-w1kcbi`,code:`.rcb-pricing-table-value-loading.svelte-w1kcbi {color:transparent; 368 animation: svelte-w1kcbi-rcb-pricing-table-value-loading 1.5s ease-in-out 0s infinite 369 normal none running;cursor:progress;background-color:var(--rc-color-grey-text-dark);user-select:none;border-radius:var(--rc-shape-input-border-radius);} 370 371 @keyframes svelte-w1kcbi-rcb-pricing-table-value-loading { 372 0%, 373 100% { 374 opacity: 0.5; 375 } 376 50% { 377 opacity: 0.3; 378 } 379 }`};function I8(e,t){J$(e,fbe);let n=$(t,`children`,8);var r=dbe();A$(K(r),()=>n()??UJ),Z(e,r)}var pbe=X(`<div class="rcb-pricing-table-row svelte-1cr4unj"><div class="rcb-pricing-table-header svelte-1cr4unj"><div class="rcb-pricing-table-value"><!></div></div> <div class="rcb-pricing-table-value svelte-1cr4unj"><!></div></div> <div class="rcb-pricing-table-row svelte-1cr4unj"><div class="rcb-pricing-table-header svelte-1cr4unj"><div class="rcb-pricing-table-value"><!></div></div> <div class="rcb-pricing-table-value svelte-1cr4unj"><!></div></div> <div class="rcb-pricing-table-separator svelte-1cr4unj"></div>`,1),mbe=X(`<div class="rcb-pricing-table-row svelte-1cr4unj"><div class="rcb-pricing-table-header svelte-1cr4unj"><div class="rcb-pricing-table-value"><!></div></div> <div class="rcb-pricing-table-value svelte-1cr4unj"><!></div></div> <div class="rcb-pricing-table-row rcb-pricing-table-row-applied-discount svelte-1cr4unj"><!> <div class="rcb-pricing-table-value svelte-1cr4unj"><!></div></div>`,1),hbe=X(`<div class="rcb-pricing-table-row svelte-1cr4unj" data-testid="tax-loading-skeleton"><div class="rcb-pricing-table-header svelte-1cr4unj"><!></div> <div class="rcb-pricing-table-value svelte-1cr4unj"><!></div></div>`),gbe=X(`<div class="rcb-pricing-table-row svelte-1cr4unj"><div class="rcb-pricing-table-header svelte-1cr4unj"> </div> <div class="rcb-pricing-table-value svelte-1cr4unj"><!></div></div>`),_be=X(`<div class="rcb-pricing-table-row svelte-1cr4unj"><div class="rcb-pricing-table-header svelte-1cr4unj"><!></div> <div class="rcb-pricing-table-value svelte-1cr4unj"><!></div></div>`),vbe=X(`<div class="rcb-pricing-table-row svelte-1cr4unj"><div class="rcb-pricing-table-header svelte-1cr4unj"><!></div> <div class="rcb-pricing-table-value svelte-1cr4unj"><!></div></div> <!>`,1),ybe=X(`<div class="rcb-pricing-table-separator svelte-1cr4unj"></div>`),bbe=X(`<div class="rcb-pricing-table-row svelte-1cr4unj"><div class="rcb-pricing-table-header svelte-1cr4unj"><!></div> <div class="rcb-pricing-table-value svelte-1cr4unj"><!></div></div>`),xbe=X(`<div class="rcb-pricing-table svelte-1cr4unj"><!> <!> <!> <!> <!> <div class="rcb-pricing-table-row rcb-header svelte-1cr4unj"><div class="rcb-pricing-table-header svelte-1cr4unj"><!></div> <div class="rcb-pricing-table-value svelte-1cr4unj"><!></div></div></div>`),Sbe={hash:`svelte-1cr4unj`,code:`.rcb-pricing-table.svelte-1cr4unj {display:flex;flex-direction:column;gap:var(--rc-spacing-gapSmall-mobile);}.rcb-pricing-table-row.svelte-1cr4unj {display:flex;flex-direction:row;align-items:center;justify-content:space-between;}.rcb-pricing-table-row-applied-discount.svelte-1cr4unj {align-items:flex-end;}.rcb-pricing-table-separator.svelte-1cr4unj {height:1px;background-color:var(--rc-color-grey-ui-dark);}.rcb-pricing-table-row.svelte-1cr4unj > .rcb-pricing-table-header:where(.svelte-1cr4unj) {color:var(--rc-color-grey-text-light);}.rcb-pricing-table-row.svelte-1cr4unj > .rcb-pricing-table-value:where(.svelte-1cr4unj) {color:var(--rc-color-grey-text-dark);}.rcb-pricing-table-row.svelte-1cr4unj:last-child > .rcb-pricing-table-header:where(.svelte-1cr4unj), 380 .rcb-pricing-table-row.svelte-1cr4unj:last-child > .rcb-pricing-table-value:where(.svelte-1cr4unj) {color:var(--rc-color-grey-text-dark);} 381 382 @container layout-query-container (width >= 768px) {.rcb-pricing-table-separator.svelte-1cr4unj {display:none;}.rcb-pricing-table.svelte-1cr4unj {gap:var(--rc-spacing-gapSmall-desktop);}.rcb-pricing-table-row.svelte-1cr4unj > .rcb-pricing-table-header:where(.svelte-1cr4unj), 383 .rcb-pricing-table-row.svelte-1cr4unj > .rcb-pricing-table-value:where(.svelte-1cr4unj) {color:var(--rc-color-grey-text-light);} 384 }`};function Cbe(e,t){GY(t,!0),J$(e,Sbe);let n=()=>R1(s,`$translator`,r),[r,i]=B1(),a=e=>{var r=xbe(),i=K(r),a=e=>{var r=pbe(),i=BZ(r),a=K(i);o6(K(K(a)),{size:`body-small`,children:(e,t)=>{var r=p$();J(e=>_$(r,e),[()=>n().translate(a0.PricingTableSubtotal)]),Z(e,r)},$$slots:{default:!0}}),o6(K(q(a,2)),{size:`body-small`,children:(e,r)=>{var i=p$();J(e=>_$(i,e),[()=>n().formatPrice(Y(d),t.priceBreakdown.currency)]),Z(e,i)},$$slots:{default:!0}});var o=K(q(i,2));o6(K(K(o)),{size:`body-small`,children:(e,r)=>{var i=p$();J(e=>_$(i,`${e??``}${t.resolvedDiscount.displayName?`: ${t.resolvedDiscount.displayName}`:``}${Y(p)?` (${Y(p)})`:``}`),[()=>n().translate(a0.PricingTableDiscount)]),Z(e,i)},$$slots:{default:!0}}),o6(K(q(o,2)),{size:`body-small`,children:(e,r)=>{var i=p$();J(e=>_$(i,`-${e??``}`),[()=>n().formatPrice(Y(f),t.priceBreakdown.currency)]),Z(e,i)},$$slots:{default:!0}}),Z(e,r)};Q(i,e=>{t.resolvedDiscount&&!t.showDiscountCodeField&&e(a)});var s=q(i,2),c=e=>{var r=m$(),i=BZ(r),a=e=>{F8(e,{get showDiscountCodeField(){return t.showDiscountCodeField},get discountCode(){return t.discountCode},get appliedDiscountCode(){return t.appliedDiscountCode},get discountSuffix(){return Y(p)},get discountCodeError(){return t.discountCodeError},get isUpdatingDiscountCode(){return t.isUpdatingDiscountCode},get isDiscountCodeControlsEnabled(){return t.isDiscountCodeControlsEnabled},get onDiscountCodeChange(){return t.onDiscountCodeChange},get onApplyDiscountCode(){return t.onApplyDiscountCode},get onRemoveDiscountCode(){return t.onRemoveDiscountCode}})},o=e=>{var r=mbe(),i=BZ(r),a=K(i);o6(K(K(a)),{size:`body-small`,children:(e,t)=>{var r=p$();J(e=>_$(r,e),[()=>n().translate(a0.PricingTableSubtotal)]),Z(e,r)},$$slots:{default:!0}}),o6(K(q(a,2)),{size:`body-small`,children:(e,r)=>{var i=p$();J(e=>_$(i,e),[()=>n().formatPrice(Y(d),t.priceBreakdown.currency)]),Z(e,i)},$$slots:{default:!0}});var o=K(q(i,2));F8(o,{get showDiscountCodeField(){return t.showDiscountCodeField},get discountCode(){return t.discountCode},get appliedDiscountCode(){return t.appliedDiscountCode},get discountSuffix(){return Y(p)},get discountCodeError(){return t.discountCodeError},get isUpdatingDiscountCode(){return t.isUpdatingDiscountCode},get isDiscountCodeControlsEnabled(){return t.isDiscountCodeControlsEnabled},get onDiscountCodeChange(){return t.onDiscountCodeChange},get onApplyDiscountCode(){return t.onApplyDiscountCode},get onRemoveDiscountCode(){return t.onRemoveDiscountCode}}),o6(K(q(o,2)),{size:`body-small`,children:(e,r)=>{var i=p$();J(e=>_$(i,`-${e??``}`),[()=>n().formatPrice(Y(f),t.priceBreakdown.currency)]),Z(e,i)},$$slots:{default:!0}}),Z(e,r)};Q(i,e=>{t.appliedDiscountCode?e(o,!1):e(a)}),Z(e,r)};Q(s,e=>{t.showDiscountCodeField&&e(c)});var u=q(s,2),h=e=>{var r=vbe(),i=BZ(r),a=K(i);o6(K(a),{size:`body-small`,children:(e,t)=>{var r=p$();J(e=>_$(r,e),[()=>n().translate(a0.PricingTotalExcludingTax)]),Z(e,r)},$$slots:{default:!0}}),o6(K(q(a,2)),{size:`body-small`,children:(e,r)=>{var i=m$(),a=BZ(i),o=e=>{I8(e,{children:(e,r)=>{var i=p$();J(e=>_$(i,e),[()=>n().formatPrice(t.priceBreakdown.totalExcludingTaxInMicros,t.priceBreakdown.currency)]),Z(e,i)},$$slots:{default:!0}})},s=e=>{var r=p$();J(e=>_$(r,e),[()=>n().formatPrice(t.priceBreakdown.totalExcludingTaxInMicros,t.priceBreakdown.currency)]),Z(e,r)};Q(a,e=>{t.priceBreakdown.taxCalculationStatus===`loading`?e(o):e(s,!1)}),Z(e,i)},$$slots:{default:!0}});var o=q(i,2),s=e=>{var r=hbe(),i=K(r);o6(K(i),{size:`body-small`,children:(e,t)=>{var r=p$();J(e=>_$(r,e),[()=>n().translate(a0.PricingTableTax)]),Z(e,r)},$$slots:{default:!0}}),o6(K(q(i,2)),{size:`body-small`,children:(e,r)=>{I8(e,{children:(e,r)=>{var i=p$();J(e=>_$(i,e),[()=>n().formatPrice(1234e4,t.priceBreakdown.currency)]),Z(e,i)},$$slots:{default:!0}})},$$slots:{default:!0}}),Z(e,r)},c=e=>{var r=m$(),i=BZ(r),a=e=>{var t=gbe(),r=K(t),i=K(r);o6(K(q(r,2)),{size:`body-small`,children:(e,t)=>{var r=p$();J(e=>_$(r,e),[()=>n().translate(a0.PricingTableEnterBillingAddressToCalculate)]),Z(e,r)},$$slots:{default:!0}}),J(e=>_$(i,e),[()=>n().translate(a0.PricingTableTax)]),Z(e,t)},o=e=>{var r=m$(),i=BZ(r),a=e=>{var r=m$();L$(BZ(r),17,()=>t.priceBreakdown.taxBreakdown,P$,(e,r)=>{var i=_be(),a=K(i);o6(K(a),{size:`body-small`,children:(e,t)=>{var n=p$();J(()=>_$(n,Y(r).display_name)),Z(e,n)},$$slots:{default:!0}}),o6(K(q(a,2)),{size:`body-small`,children:(e,i)=>{var a=p$();J(e=>_$(a,e),[()=>n().formatPrice(Y(r).tax_amount_in_micros,t.priceBreakdown.currency)]),Z(e,a)},$$slots:{default:!0}}),Z(e,i)}),Z(e,r)};Q(i,e=>{t.priceBreakdown.taxBreakdown!==null&&e(a)},!0),Z(e,r)};Q(i,e=>
384{t.priceBreakdown.taxCalculationStatus===`pending`?e(a):e(o,!1)},!0),Z(e,r)};Q(o,e=>{t.priceBreakdown.taxCalculationStatus===`loading`?e(s):e(c,!1)}),Z(e,r)};Q(u,e=>{Y(l)&&e(h)});var g=q(u,2),_=e=>{Z(e,ybe())};Q(g,e=>{(Y(l)||t.appliedDiscountCode)&&e(_)});var v=q(g,2),y=e=>{var r=bbe(),i=K(r);o6(K(i),{size:`body-small`,children:(e,t)=>{var r=p$();J(e=>_$(r,e),[()=>n().translate(a0.PricingTableTrialEnds,{formattedTrialEndDate:n().translateDate(Y(o),{dateStyle:`medium`})})]),Z(e,r)},$$slots:{default:!0}}),o6(K(q(i,2)),{size:`body-small`,children:(e,r)=>{var i=p$();J(e=>_$(i,e),[()=>n().formatPrice(t.priceBreakdown.totalAmountInMicros,t.priceBreakdown.currency)]),Z(e,i)},$$slots:{default:!0}}),Z(e,r)};Q(v,e=>{Y(o)&&e(y)});var b=K(q(v,2));o6(K(b),{size:`body-small`,children:(e,t)=>{var r=p$();J(e=>_$(r,e),[()=>n().translate(a0.PricingTableTotalDueToday)]),Z(e,r)},$$slots:{default:!0}}),o6(K(q(b,2)),{size:`body-small`,children:(e,r)=>{var i=p$();J(e=>_$(i,e),[()=>n().formatPrice(Y(m),t.priceBreakdown.currency)]),Z(e,i)},$$slots:{default:!0}}),Z(e,r)},o=W(()=>{var e;return(e=t.trialPhase)!=null&&e.period?c0(new Date,t.trialPhase.period,!0):null}),s=UY(r0),c=W(()=>t.priceBreakdown.taxCalculationStatus===`loading`||t.priceBreakdown.taxCalculationStatus===`pending`),l=W(()=>t.priceBreakdown.taxCalculationStatus!==`unavailable`&&t.priceBreakdown.taxCalculationStatus!==`disabled`&&(Y(c)||(t.priceBreakdown.taxBreakdown?.length??0)>0)),u=W(()=>t.showDiscountCodeField||Y(l)),d=W(()=>t.priceBreakdown.originalAmountInMicros??t.basePhase?.price?.amountMicros??t.priceBreakdown.totalAmountInMicros),f=W(()=>t.resolvedDiscount?.discountAmountInMicros??0),p=W(()=>t.resolvedDiscount?.suffix??null),m=W(()=>Y(o)?0:t.priceBreakdown.totalAmountInMicros);var h=m$(),g=BZ(h),_=e=>{ube(e,{get showDiscountCodeField(){return t.showDiscountCodeField},children:(e,t)=>{a(e)},$$slots:{default:!0}})},v=e=>{a(e)};Q(g,e=>{Y(u)?e(_):e(v,!1)}),Z(e,h),KY(),i()}var wbe=X(`<div class="rcb-subscribe-to svelte-sdtx9l"><!></div>`),Tbe=X(`<span class="rcb-product-description svelte-sdtx9l"><!></span>`),Ebe=X(`<div class="rcb-pricing-info-header svelte-sdtx9l"><!> <div class="rcb-product-title svelte-sdtx9l"><!></div> <!></div>`),Dbe={hash:`svelte-sdtx9l`,code:`.rcb-pricing-info-header.svelte-sdtx9l {display:flex;flex-direction:column;gap:var(--rc-spacing-gapMedium-mobile);}.rcb-product-title.svelte-sdtx9l {color:var(--rc-color-grey-text-dark);}.rcb-product-description.svelte-sdtx9l {color:var(--rc-color-grey-text-light);}.rcb-subscribe-to.svelte-sdtx9l {display:none;} 385 386 @container layout-query-container (width >= 768px) {.rcb-subscribe-to.svelte-sdtx9l {display:block;}.rcb-pricing-info-header.svelte-sdtx9l {display:flex;flex-direction:column;gap:var(--rc-spacing-gapMedium-desktop);} 387 }`};function Obe(e,t){GY(t,!1),J$(e,Dbe);let n=$(t,`productDetails`,8),r=$(t,`showProductDescription`,8),i=n().productType===_0.Subscription;D1();var a=Ebe(),o=K(a),s=e=>{var t=wbe();o6(K(t),{size:`body-base`,children:(e,t)=>{{let t=mZ(()=>(e$(n()),QQ(()=>({productTitle:n().title}))));u6(e,{get key(){return e$(a0),QQ(()=>a0.ProductInfoSubscribeTo)},get variables(){return Y(t)}})}},$$slots:{default:!0}}),Z(e,t)};Q(o,e=>{i&&e(s)});var c=q(o,2);o6(K(c),{size:`heading-lg`,branded:!0,children:(e,t)=>{{let t=mZ(()=>(e$(n()),QQ(()=>({productTitle:n().title}))));u6(e,{get key(){return e$(a0),QQ(()=>a0.ProductInfoProductTitle)},get variables(){return Y(t)}})}},$$slots:{default:!0}});var l=q(c,2),u=e=>{var t=Tbe();o6(K(t),{size:`body-small`,children:(e,t)=>{{let t=mZ(()=>(e$(n()),QQ(()=>({productDescription:n().description}))));u6(e,{get key(){return e$(a0),QQ(()=>a0.ProductInfoProductDescription)},get variables(){return Y(t)}})}},$$slots:{default:!0}}),Z(e,t)};Q(l,e=>{e$(r()),e$(n()),QQ(()=>r()&&n().description)&&e(u)}),Z(e,a),KY()}var kbe=X(`<div><!></div>`),Abe=X(`<div><!> <!></div>`),jbe=X(`<div class="rcb-product-price-container svelte-17etw2v"><!> <!> <div><!> <!> <!></div></div>`),Mbe={hash:`svelte-17etw2v`,code:`.rcb-product-price-container.svelte-17etw2v {display:flex;flex-direction:column;justify-content:space-between;gap:var(--rc-spacing-gapMedium-mobile);color:var(--rc-color-grey-text-dark);}`};function Nbe(e,t){GY(t,!0),J$(e,Mbe);let n=()=>R1(a,`$translator`,r),[r,i]=B1(),a=UY(r0),o=W(()=>{var e;return!!((e=t.trialPhase)!=null&&e.periodDuration)}),s=W(()=>t.introPricePhase?.cycleCount===1),c=W(()=>!!t.introPricePhase),l=W(()=>!!t.discountPhase||(t.priceBreakdown.appliedDiscounts?.length??0)>0),u=W(()=>{var e;if(!Y(c)||!((e=t.introPricePhase)!=null&&e.period))return``;let r=t.introPricePhase.period.number*t.introPricePhase?.cycleCount,i=t.
387introPricePhase.period.unit;return r==null||i==null?``:r===1&&!Y(o)&&n().selectedLocale===i0?n().translatePeriodUnit(i)||``:n().translatePeriod(r,i)||``}),d=W(()=>{var e,r;return(e=t.introPricePhase)!=null&&e.period?Y(s)?n().translate(a0.ProductInfoIntroPricePhasePaidOnce):t.introPricePhase&&(r=t.introPricePhase)!=null&&r.period&&n().translatePeriodFrequency(t.introPricePhase.period.number,t.introPricePhase.period.unit,{useMultipleWords:!0})||``:``}),f=W(()=>Y(o)?a0.ProductInfoIntroPricePhaseAfterTrial:a0.ProductInfoIntroPricePhase),p=W(()=>n().formatPrice(t.priceBreakdown.totalAmountInMicros,t.priceBreakdown.currency)),m=W(()=>{let e=t.introPricePhase||Y(l)?t.basePhase?.price?.amountMicros??0:t.priceBreakdown.totalAmountInMicros;return n().formatPrice(e,t.priceBreakdown.currency)}),h=W(()=>Y(c)?a0.ProductInfoAfter:Y(o)?a0.ProductInfoAfterTrial:null),g=W(()=>Y(o)?`heading-md`:`heading-lg`),_=W(()=>Y(o)||Y(c)?`heading-md`:`heading-lg`);var v=jbe(),y=K(v),b=e=>{var r=kbe();o6(K(r),{size:`heading-lg`,children:(e,r)=>{{let r=W(()=>({trialDuration:_fe(t.trialPhase.periodDuration,n())}));u6(e,{get key(){return a0.ProductInfoFreeTrialDuration},get variables(){return Y(r)}})}},$$slots:{default:!0}}),Z(e,r)};Q(y,e=>{Y(o)&&e(b)});var x=q(y,2),S=e=>{var t=Abe(),n=K(t);o6(n,{get size(){return Y(g)},children:(e,t)=>{{let t=W(()=>({introPriceDuration:Y(u),introPrice:Y(p)}));u6(e,{get key(){return Y(f)},get variables(){return Y(t)}})}},$$slots:{default:!0}});var r=q(n,2),i=e=>{o6(e,{size:`body-small`,children:(e,t)=>{var n=p$();J(()=>_$(n,Y(d))),Z(e,n)},$$slots:{default:!0}})};Q(r,e=>{Y(d)&&e(i)}),Z(e,t)};Q(x,e=>{Y(c)&&e(S)});var C=K(q(x,2));o6(C,{get size(){return Y(_)},children:(e,t)=>{var n=p$();J(()=>_$(n,Y(m))),Z(e,n)},$$slots:{default:!0}});var w=q(C,2),T=e=>{o6(e,{size:`body-small`,children:(e,r)=>{var i=p$();J(e=>_$(i,e),[()=>n().translatePeriodFrequency(t.basePhase.period.number,t.basePhase.period.unit,{useMultipleWords:!0})]),Z(e,i)},$$slots:{default:!0}})};Q(w,e=>{var n;(n=t.basePhase)!=null&&n.period&&e(T)});var E=q(w,2),D=e=>{o6(e,{size:`body-small`,children:(e,t)=>{u6(e,{get key(){return Y(h)}})},$$slots:{default:!0}})};Q(E,e=>{Y(h)&&e(D)}),Z(e,v),KY(),i()}var Pbe=X(`<div><!></div>`);function Fbe(e,t){GY(t,!0);let n=()=>R1(a,`$translator`,r),[r,i]=B1(),a=UY(r0),o=W(()=>n().formatPrice(t.basePhase?.price?.amountMicros??0,t.priceBreakdown.currency));var s=Pbe();o6(K(s),{size:`heading-lg`,children:(e,t)=>{var n=p$();J(()=>_$(n,Y(o))),Z(e,n)},$$slots:{default:!0}}),Z(e,s),KY(),i()}var Ibe=X(`<div class="rcb-pricing-info svelte-1jzyaxi"><div class="rcb-pricing-info-header svelte-1jzyaxi"><!> <!></div> <!></div>`),Lbe={hash:`svelte-1jzyaxi`,code:`.rcb-pricing-info.svelte-1jzyaxi {display:flex;flex-direction:column;user-select:none;gap:var(--rc-spacing-gapXXLarge-mobile);}.rcb-pricing-info-header.svelte-1jzyaxi {display:flex;flex-direction:column;gap:var(--rc-spacing-gapLarge-mobile);} 388 389 @container layout-query-container (width >= 768px) {.rcb-pricing-info.svelte-1jzyaxi {gap:var(--rc-spacing-gapXXXLarge-desktop);}.rcb-pricing-info-header.svelte-1jzyaxi {gap:var(--rc-spacing-gapLarge-desktop);} 390 }`};function Rbe(e,t){GY(t,!1),J$(e,Lbe);let n=()=>R1(E,`$translator`,r),[r,i]=B1(),a=wZ(),o=$(t,`productDetails`,8),s=$(t,`purchaseOption`,8),c=$(t,`showProductDescription`,8),l=$(t,`priceBreakdown`,8),u=$(t,`showDiscountCodeField`,8,!1),d=$(t,`discountCode`,8,``),f=$(t,`appliedDiscountCode`,8,null),p=$(t,`discountCodeError`,8,null),m=$(t,`isUpdatingDiscountCode`,8,!1),h=$(t,`isDiscountCodeControlsEnabled`,8,!1),g=$(t,`onDiscountCodeChange`,8,void 0),_=$(t,`onApplyDiscountCode`,8,void 0),v=$(t,`onRemoveDiscountCode`,8,void 0),y=wZ(),b=wZ(),x=wZ(),S=wZ(),C=wZ(),w=wZ(),T=wZ(),E=UY(r0);aQ(()=>e$(o()),()=>{G(y,o().productType===`subscription`)}),aQ(()=>(Y(y),e$(s())),()=>{G(b,Y(y)?s():null)}),aQ(()=>(Y(y),e$(s())),()=>{G(x,Y(y)?null:s())}),aQ(()=>(Y(y),Y(b),Y(x)),()=>{var e;G(S,Y(y)?Y(b)?.base??null:(e=Y(x))!=null&&e.basePrice?{periodDuration:null,period:null,cycleCount:1,price:Y(x).basePrice,pricePerWeek:null,pricePerMonth:null,pricePerYear:null}:null)}),aQ(()=>Y(b),()=>{G(C,Y(b)?.trial??null)}),aQ(()=>(Y(b),Y(x)),()=>{G(w,Y(b)?.discount??Y(x)?.discount??null)}),aQ(()=>Y(b),()=>{G(T,Y(b)?.introPrice??null)}),aQ(()=>(e$(l()),e$(o()),e$(s()),n()),()=>{G(a,O8({priceBreakdown:l(),productDetails:o(),purchaseOption:s(),translator:n()}))}),oQ(),D1();var D=Ibe(),O=K(D),k=K(O);Obe(k,{get productDetails(){return o()},get showProductDescription(){return c()}});var A=q(k,2),j=e=>{Nbe(e,{get priceBreakdown(){return l()},get basePhase(){return Y(S)},get trialPhase(){return Y(C)},get discountPhase(){return Y(w)},get introPricePhase(){return Y(T)}})},M=e=>{Fbe(e,{get priceBreakdown(){return l()},get basePhase(){return Y(S)}})};Q(A,e=>{Y(y)?e(j):e(M,!1)}),Cbe(q(O,2),{get priceBreakdown(){return l()},get trialPhase(){return Y(C)},get basePhase(){return Y(S)},get resolvedDiscount(){return Y(a)},get showDiscountCodeField(){return u()},get discountCode(){return d()},get appliedDiscountCode(){return f()},get discountCodeError(){return p()},get isUpdatingDiscountCode(){return m()},get isDiscountCodeControlsEnabled(){return h()},get onDiscountCodeChange(){return g()},get onApplyDiscountCode(){return _()},get onRemoveDiscountCode(){return v()}}),Z(e,D),KY(),i()}var L8=e=>`https://da08ctfrofx1b.cloudfront.net/${e}`,zbe=X(`<div><!></div>`),Bbe={hash:`svelte-18ddpt0`,code:`.rcb-ui-container.svelte-18ddpt0 {display:flex;flex-direction:column;inset:0;color-scheme:none;line-height:1.5em;font-family:-apple-system, 391 BlinkMacSystemFont, 392 avenir next, 393 avenir, 394 segoe ui, 395 helvetica neue, 396 helvetica, 397 Cantarell, 398 Ubuntu, 399 roboto, 400 noto, 401 arial, 402 sans-serif;overflow-x:hidden;overflow-y:auto;}.rcb-ui-container.fullscreen.svelte-18ddpt0 {position:fixed;top:0;left:0;right:0;bottom:0;overscroll-behavior:none;z-index:1000001;}.rcb-ui-container.inside.svelte-18ddpt0 {position:relative;width:100%;z-index:unset;height:100%;top:0;left:0;}`};function R8(e,t){GY(t,!0),J$(e,Bbe);let n=$(t,`brandingAppearance`,3,void 0),r=$(t,`brandFontConfig`,3,void 0),i=$(t,`isInElement`,3,!1),a=W(()=>new g8(n()).getTextStyleVars(r())),o=W(()=>new g8(n()).spacingStyleVars),s=W(()=>[Y(a),Y(o)].join(`; `)),c=W(()=>{var e;return(e=r())!=null&&e.font_url?L8(r().font_url):null}),l=async e=>{try{let t=new FontFace(X6,`url(${e})`);await t.load(),document.fonts.add(t)}catch(e){console.error(`Failed to set brand font:`,e)}};$Z(()=>{Y(c)&&l(Y(c))});var u=zbe();let d;A$(K(u),()=>t.children??UJ),J(()=>{d=e1(u,1,`rcb-ui-container svelte-18ddpt0`,null,d,{fullscreen:!i(),inside:i()}),n1(u,Y(s))}),Z(e,u),KY()}var Vbe=X(`<div id="layout-query-container" class="svelte-1ewgunr"><div class="rcb-ui-layout svelte-1ewgunr"><!></div></div>`),Hbe={hash:`svelte-1ewgunr`,code:`#layout-query-container.svelte-1ewgunr {width:100%;height:100%;container-type:size;container-name:layout-query-container;overflow-y:auto;overscroll-behavior:none;}.rcb-ui-layout.svelte-1ewgunr {width:100%;min-height:100%;display:flex;box-sizing:border-box;flex-direction:column;overscroll-behavior:none;} 403 404 @container layout-query-container (width < 768px) {.rcb-ui-layout.svelte-1ewgunr {flex-grow:1;} 405 } 406 407 @container layout-query-container (width >= 768px) {.rcb-ui-layout.svelte-1ewgunr {flex-direction:row;} 408 }`};function Ube(e,t){J$(e,Hbe);let n=$(t,`style`,8,``),r=$(t,`children`,8);var i=Vbe(),a=K(i);A$(K(a),()=>r()??UJ),J(()=>n1(a,n())),Z(e,i)}var Wbe=e=>e;function Gbe(e){let t=e-1;return t*t*t+1}function z8(e){let t=typeof e==`string`&&e.match(/^\s*(-?[\d.]+)([^\s]*)\s*$/);return t?[parseFloat(t[1]),t[2]||`px`]:[e,`px`]}function Kbe(e,{delay:t=0,duration:n=400,easing:r=Wbe}={}){let i=+getComputedStyle(e).opacity;return{delay:t,duration:n,easing:r,css:e=>`opacity: ${e*i}`}}function qbe(e,{delay:t=0,duration:n=400,easing:r=Gbe,x:i=0,y:a=0,opacity:o=0}={}){let s=getComputedStyle(e),c=+s.opacity,l=s.transform===`none`?``:s.transform,u=c*(1-o),[d,f]=z8(i),[p,m]=z8(a);return{delay:t,duration:n,easing:r,css:(e,t)=>` 409 transform: ${l} translate(${(1-e)*d}${f}, ${(1-e)*p}${m}); 410 opacity: ${c-u*t}`}}var Jbe=X(`<div><div class="layout-wrapper svelte-13h5jq9"><div><!></div></div></div>`),Ybe={hash:`svelte-13h5jq9`,code:`.layout-wrapper-outer.svelte-13h5jq9 {flex:1;display:flex;background-color:var(--rc-color-background);}.layout-wrapper-outer.rcb-navbar.svelte-13h5jq9 {justify-content:flex-end;}.layout-wrapper.svelte-13h5jq9 {width:100%;}.layout-content.svelte-13h5jq9 {box-sizing:border-box;background-color:var(--rc-color-background);color:var(--rc-color-grey-text-dark);
410display:flex;flex-direction:column;}.layout-content.rcb-navbar.svelte-13h5jq9 {display:flex;flex-direction:column;gap:var(--rc-spacing-gapXLarge-mobile);} 411 412 @container layout-query-container (width < 768px) {.layout-wrapper.svelte-13h5jq9 {width:100%;min-width:300px;display:flex;flex-grow:1;}.layout-content.svelte-13h5jq9 {flex-grow:1;height:100%;}.layout-content.rcb-navbar.svelte-13h5jq9 {padding-bottom:var(--rc-spacing-outerPadding-mobile);}.layout-content.rcb-main-block.svelte-13h5jq9 {padding:var(--rc-spacing-outerPadding-mobile);} 413 } 414 415 @container layout-query-container (width >= 768px) {.layout-wrapper.svelte-13h5jq9 {flex-basis:544px;}.layout-content.rcb-main-block.svelte-13h5jq9 {padding-left:var(--rc-spacing-outerPadding-desktop);padding-right:var(--rc-spacing-outerPadding-desktop);}.layout-content.rcb-navbar.svelte-13h5jq9 {gap:var(--rc-spacing-gapXXLarge-desktop);}.layout-wrapper-outer.svelte-13h5jq9 {padding-top:var(--rc-spacing-outerPaddingTop-desktop);padding-bottom:var(--rc-spacing-outerPadding-desktop);} 416 }`};function B8(e,t){J$(e,Ybe);let n=`rcb-${t.location}`;var r=Jbe(),i=K(K(r));A$(K(i),()=>t.children??UJ),J(()=>{e1(r,1,`layout-wrapper-outer ${n}`,`svelte-13h5jq9`),e1(i,1,`layout-content ${n}`,`svelte-13h5jq9`)}),G$(3,i,()=>Kbe,()=>({duration:500,delay:50})),Z(e,r)}var Xbe=X(`<div class="navbar-body svelte-191m2u3"><!></div>`),Zbe=X(`<div class="navbar-header svelte-191m2u3"><!></div> <!>`,1),Qbe=X(`<div class="rcb-ui-navbar svelte-191m2u3"><!></div>`),$be={hash:`svelte-191m2u3`,code:`.rcb-ui-navbar.svelte-191m2u3 {width:100%;max-width:none;flex-shrink:0;background-color:var(--rc-color-background);} 417 418 @container layout-query-container (width < 768px) {.navbar-body.svelte-191m2u3 {padding-left:var(--rc-spacing-outerPadding-mobile);padding-right:var(--rc-spacing-outerPadding-mobile);} 419 } 420 421 @container layout-query-container (width >= 768px) {.rcb-ui-navbar.svelte-191m2u3 {width:50vw;display:flex;justify-content:flex-end;}.navbar-header.svelte-191m2u3 {padding-left:var(--rc-spacing-outerPadding-desktop);padding-right:var(--rc-spacing-outerPadding-desktop);}.navbar-body.svelte-191m2u3 {padding-left:var(--rc-spacing-outerPadding-desktop);padding-right:var(--rc-spacing-outerPadding-desktop);} 422 }`};function exe(e,t){GY(t,!0),J$(e,$be);let n=$(t,`brandingAppearance`,3,void 0),r=W(()=>new g8(n()).productInfoStyleVars);var i=Qbe();B8(K(i),{location:`navbar`,children:(e,n)=>{var r=Zbe(),i=BZ(r);A$(K(i),()=>t.headerContent??UJ);var a=q(i,2),o=e=>{var n=Xbe();A$(K(n),()=>t.bodyContent??UJ),Z(e,n)};Q(a,e=>{t.bodyContent&&e(o)}),Z(e,r)}}),J(()=>n1(i,Y(r))),Z(e,i),KY()}var txe=X(`<button class="rcb-close-button svelte-8qlvu1" data-testid="close-button"><!></button>`),nxe={hash:`svelte-8qlvu1`,code:`.rcb-close-button.svelte-8qlvu1 {padding:10px;border:none;cursor:pointer;background-color:transparent;border-radius:50%;color:var(--rc-color-grey-text-dark);display:inline-flex;align-items:center;justify-content:center;width:fit-content;height:fit-content;}.rcb-close-button.svelte-8qlvu1:active {transition:outline 0.1s ease-in-out;outline:2px solid var(--rc-color-focus);}.rcb-close-button.svelte-8qlvu1:hover {color:var(--rc-color-grey-text-dark);}`};function V8(e,t){J$(e,nxe);var n=txe();M8(K(n),{name:`close`}),o$(`click`,n,function(e){k1.call(this,t,e)}),Z(e,n)}var rxe=`<svg xmlns="http://www.w3.org/2000/svg" width="12" height="12" viewBox="0 0 12 12" fill="none"> 423 <g clip-path="url(#clip0_6333_13826)"> 424 <rect opacity="0.2" width="12" height="12" rx="2.25" fill="black"/> 425 <path fill-rule="evenodd" clip-rule="evenodd" d="M8.53206 2.06972C9.28201 2.17252 9.88339 2.78615 9.96146 3.52824L10.2298 6.07852C10.2893 6.64453 9.87503 7.12287 9.30441 7.14692C8.73379 7.17097 8.22294 6.73163 8.16339 6.16562L8.08036 5.37641L6.00414 7.35193C5.6039 7.73275 4.94623 7.70146 4.53518 7.28205C4.12413 6.86263 4.11537 6.2139 4.51561 5.83307L6.59182 3.85756L5.79425 3.74823C5.22225 3.66982 4.79448 3.15142 4.83881 2.59036C4.88313 2.02929 5.38276 1.63802 5.95476 1.71643L8.53206 2.06972Z" fill="black"/> 426 </g> 427 <defs> 428 <clipPath id="clip0_6333_13826"> 429 <rect width="12" height="12" fill="white"/> 430 </clipPath> 431 </defs> 432 </svg> 433`,ixe=X(`<div style="color:var(--rc-color-accent);" class="rcb-ui-asset-icon svelte-w5b346"><!></div>`),axe={hash:`svelte-w5b346`,code:`div.svelte-w5b346 {height:12px;width:12px;}`};function oxe(e){J$(e,axe);var t=ixe();B$(K(t),()=>rxe),Z(e,t)}var sxe=X(`<span class="rcb-sandbox-text svelte-bwwvt4">SANDBOX</span>`),cxe=X(`<span class="rcb-sandbox-text svelte-bwwvt4">Share feedback</span>`),lxe=X(`<a class="rcb-ui-sandbox-banner-link svelte-bwwvt4" target="_blank"><!> <!></a>`),uxe=X(`<div><div class="rcb-sandbox-banner-spacer svelte-bwwvt4"></div> <div class="rcb-sandbox-banner-title-wrapper svelte-bwwvt4"><!></div> <div class="rcb-sandbox-banner-actions-wrapper svelte-bwwvt4" style="--arrow-fill-color: black"><!> <!></div></div>`),dxe={hash:`svelte-bwwvt4`,code:`.rcb-ui-sandbox-banner.svelte-bwwvt4 {position:static;background-color:var(--rc-color-warning);color:black;padding:var(--rc-spacing-gapMedium-mobile) 0;display:flex;justify-content:space-between;align-items:center;height:24px;}.rcb-sandbox-text.svelte-bwwvt4 {font-weight:bold;color:black;line-height:2;}.rcb-sandbox-banner-spacer.svelte-bwwvt4 {flex:1;}.rcb-sandbox-banner-title-wrapper.svelte-bwwvt4 {flex:0;text-align:center;} 434 435 @media (max-width: 768px) {.rcb-sandbox-banner-spacer.svelte-bwwvt4 {flex:0;}.rcb-sandbox-banner-title-wrapper.svelte-bwwvt4 {padding-left:var(--rc-spacing-gapXXLarge-mobile);} 436 }.rcb-sandbox-banner-actions-wrapper.svelte-bwwvt4 {flex:1;display:flex;justify-content:flex-end;align-items:center;}.rcb-ui-sandbox-banner-link.svelte-bwwvt4 {display:flex;align-items:center;gap:var(--rc-spacing-gapSmall-mobile);line-height:12px;}`};function H8(e,t){GY(t,!1),J$(e,dxe);let n=$(t,`style`,8,``),r=$(t,`isInElement`,8,!1),i=$(t,`brandingInfo`,8,null),a=wZ(!0);function o(){X1.debugLog(`closeBanner`),G(a,!1)}D1();var s=m$(),c=BZ(s),l=e=>{var t=uxe();let a;var s=q(K(t),2);o6(K(s),{size:`caption-default`,children:(e,t)=>{Z(e,sxe())},$$slots:{default:!0}});var c=K(q(s,2)),l=e=>{var t=lxe(),n=K(t);oxe(n),o6(q(n,2),{size:`caption-link`,children:(e,t)=>{Z(e,cxe())},$$slots:{default:!0}}),J(()=>l1(t,`href`,(e$(i()),QQ(()=>i().sandbox_configuration.checkout_feedback_form_url)))),Z(e,t)};Q(c,e=>{e$(i()),QQ(()=>i()?.sandbox_configuration)&&e(l)}
436),V8(q(c,2),{$$events:{click:o}}),J(()=>{a=e1(t,1,`rcb-ui-sandbox-banner svelte-bwwvt4`,null,a,{isInElement:r()}),n1(t,n())}),G$(2,t,()=>qbe,()=>({y:-100,duration:300})),Z(e,t)};Q(c,e=>{Y(a)&&e(l)}),Z(e,s),KY()}var fxe=X(`<div class="rcb-ui-main svelte-iuk1gs"><!></div>`),pxe={hash:`svelte-iuk1gs`,code:`.rcb-ui-main.svelte-iuk1gs {flex:1;display:flex;background-color:var(--rc-color-background);}`};function mxe(e,t){GY(t,!0),J$(e,pxe);let n=W(()=>new g8(t.brandingAppearance).formStyleVars);var r=fxe();B8(K(r),{location:`main-block`,children:(e,n)=>{var r=m$();A$(BZ(r),()=>t.children??UJ),Z(e,r)}}),J(()=>n1(r,Y(n))),Z(e,r),KY()}var hxe=X(`<!> <!>`,1),gxe=X(`<!> <!>`,1);function U8(e,t){GY(t,!0);let n=W(()=>h8(t.brandingInfo?.appearance)??``);{let r=W(()=>t.brandingInfo?.appearance),i=W(()=>t.brandingInfo?.brand_font_config);R8(e,{get brandingAppearance(){return Y(r)},get brandFontConfig(){return Y(i)},get isInElement(){return t.isInElement},children:(e,r)=>{var i=gxe(),a=BZ(i),o=e=>{H8(e,{get style(){return Y(n)},get isInElement(){return t.isInElement},get brandingInfo(){return t.brandingInfo}})};Q(a,e=>{t.isSandbox&&e(o)}),Ube(q(a,2),{get style(){return Y(n)},children:(e,n)=>{var r=hxe(),i=BZ(r),a=e=>{{let n=W(()=>t.brandingInfo?.appearance);exe(e,{get brandingAppearance(){return Y(n)},get headerContent(){return t.navbarHeaderContent},get bodyContent(){return t.navbarBodyContent}})}};Q(i,e=>{(t.navbarHeaderContent||t.navbarBodyContent)&&e(a)});var o=q(i,2);{let e=W(()=>t.brandingInfo?.appearance);mxe(o,{get brandingAppearance(){return Y(e)},children:(e,n)=>{var r=m$();A$(BZ(r),()=>t.mainContent??UJ),Z(e,r)},$$slots:{default:!0}})}Z(e,r)},$$slots:{default:!0}}),Z(e,i)},$$slots:{default:!0}})}KY()}var _xe=X(`<source type="image/webp"/>`),vxe=X(`<picture class="rcb-app-icon-picture-container svelte-15hivnw"><!> <img class="rcb-app-icon svelte-15hivnw" alt="App icon"/></picture>`),yxe=X(`<div class="rcb-app-icon loading svelte-15hivnw"></div>`),bxe={hash:`svelte-15hivnw`,code:`.rcb-app-icon.svelte-15hivnw {width:32px;height:32px;border-radius:12px;box-shadow:0px 1px 10px 0px rgba(0, 0, 0, 0.1);}.rcb-app-icon-picture-container.svelte-15hivnw {height:32px;}.rcb-app-icon.loading.svelte-15hivnw {background-color:gray;}`};function xxe(e,t){J$(e,bxe);var n=m$(),r=BZ(n),i=e=>{var n=vxe(),r=K(n),i=e=>{var n=_xe();J(()=>l1(n,`srcset`,t.srcWebp)),Z(e,n)};Q(r,e=>{t.srcWebp&&e(i)});var a=q(r,2);J(()=>l1(a,`src`,t.src)),Z(e,n)},a=e=>{Z(e,yxe())};Q(r,e=>{t.src?e(i):e(a,!1)}),Z(e,n)}var W8=e=>!e||e.trim()===``?null:e,Sxe={icon:null,iconWebp:null,wordmark:null,wordmarkWebp:null,src:null,
436srcWebp:null,wordmarkSrc:null,wordmarkSrcWebp:null},Cxe=e=>{if(!e)return Sxe;let t=W8(e.app_icon),n=W8(e.app_icon_webp),r=W8(e.app_wordmark),i=W8(e.app_wordmark_webp);return{src:t?L8(t):null,srcWebp:n?L8(n):null,wordmarkSrc:r?L8(r):null,wordmarkSrcWebp:i?L8(i):null}},wxe=X(`<button class="rcb-back-button svelte-7773d6" data-testid="close-button"><!></button>`),Txe={hash:`svelte-7773d6`,code:`.rcb-back-button.svelte-7773d6 {padding:8px;border:none;cursor:pointer;background-color:transparent;border-radius:50%;color:var(--rc-color-grey-text-dark);display:inline-flex;align-items:center;justify-content:center;width:fit-content;height:fit-content;}`};function Exe(e,t){J$(e,Txe);let n=$(t,`disabled`,3,!1);var r=wxe();M8(K(r),{name:`back`}),J(()=>r.disabled=n()),o$(`click`,r,function(e){k1.call(this,t,e)}),Z(e,r)}var Dxe=X(`<source type="image/webp" class="rcb-app-icon svelte-7clux6"/>`),Oxe=X(`<picture class="rcb-app-icon svelte-7clux6"><!> <img class="rcb-app-icon svelte-7clux6" alt="App icon"/></picture>`),kxe={hash:`svelte-7clux6`,code:`.rcb-app-icon.svelte-7clux6 {height:32px;}`};function Axe(e,t){J$(e,kxe);var n=Oxe(),r=K(n),i=e=>{var n=Dxe();J(()=>l1(n,`srcset`,t.srcWebp)),Z(e,n)};Q(r,e=>{t.srcWebp&&e(i)});var a=q(r,2);J(()=>l1(a,`src`,t.src)),Z(e,n)}var jxe=X(`<div class="rcb-back-wrapper svelte-11a99mf"><!></div>`),Mxe=X(`<div class="rcb-close-wrapper svelte-11a99mf"><!></div>`),Nxe=X(`<div><!> <div class="rcb-header svelte-11a99mf"><div class="rcb-title svelte-11a99mf"><!> <!></div></div> <!></div>`),Pxe={hash:`svelte-11a99mf`,code:`.rcb-header-wrapper.svelte-11a99mf {display:flex;position:relative;justify-content:space-between;align-items:center;}.rcb-header.svelte-11a99mf {display:flex;flex-direction:row;align-items:center;padding-top:var(--rc-spacing-gapSmall-mobile);padding-bottom:var(--rc-spacing-gapSmall-mobile);height:40px;justify-content:space-between;}.rcb-title.svelte-11a99mf {display:flex;align-items:center;position:relative;gap:var(--rc-spacing-gapMedium-mobile);}.rcb-close-wrapper.svelte-11a99mf, 437 .rcb-back-wrapper.svelte-11a99mf {padding:var(--rc-spacing-gapSmall-mobile);} 438 439 @container layout-query-container (width < 768px) {.rcb-header.svelte-11a99mf {padding-top:var(--rc-spacing-gapMedium-mobile);}.rcb-close-wrapper.svelte-11a99mf {padding-top:var(--rc-spacing-gapMedium-mobile);}.rcb-header-wrapper.svelte-11a99mf {padding-top:var(--rc-spacing-gapSmall-mobile);padding-bottom:var(--rc-spacing-gapSmall-mobile);padding-left:var(--rc-spacing-outerPadding-mobile);padding-right:var(--rc-spacing-outerPadding-mobile);}.rcb-header-wrapper.rcb-with-close-button.svelte-11a99mf {padding-right:var(--rc-spacing-gapSmall-mobile);}.rcb-back-wrapper.svelte-11a99mf {display:none;}.rcb-header-wrapper.svelte-11a99mf {padding-left:var(--rc-spacing-outerPadding-mobile);padding-right:var(--rc-spacing-outerPadding-mobile);} 440 } 441 442 @container layout-query-container (width >= 768px) {.rcb-close-wrapper.svelte-11a99mf {display:none;}.rcb-back-wrapper.svelte-11a99mf {position:absolute;left:-48px;margin-left:0;} 443 }`};function Fxe(e,t){GY(t,!0),J$(e,Pxe);let n=W(()=>Cxe(t.brandingInfo)),r=W(()=>Y(n).wordmarkSrc),i=W(()=>Y(n).wordmarkSrcWebp),a=W(()=>Y(n).src),o=W(()=>Y(n).srcWebp),s=()=>{t.onClose&&t.onClose()};var c=Nxe();let l;var u=K(c),d=e=>{var t=jxe();Exe(K(t),{$$events:{click:s}}),Z(e,t)};Q(u,e=>{t.showCloseButton&&e(d)});var f=q(u,2),p=K(K(f)),m=e=>{Axe(e,{get src(){return Y(r)},get srcWebp(){return Y(i)}})},h=e=>{var t=m$(),n=BZ(t),r=e=>{xxe(e,{get src(){return Y(a)},get srcWebp(){return Y(o)}})};Q(n,e=>{Y(a)!==null&&Y(o)!==null&&e(r)},!0),Z(e,t)};Q(p,e=>{Y(r)===null?e(h,!1):e(m)});var g=q(p,2),_=e=>{o6(e,{size:`body-base`,children:(e,n)=>{var r=p$();J(()=>_$(r,t.brandingInfo?.app_name)),Z(e,r)},$$slots:{default:!0}})};Q(g,e=>{Y(r)===null&&e(_)});var v=q(f,2),y=e=>{var t=Mxe();V8(K(t),{$$events:{click:s}}),Z(e,t)};Q(v,e=>{t.showCloseButton&&e(y)}),J(()=>l=e1(c,1,`rcb-header-wrapper svelte-11a99mf`,null,l,{"rcb-with-close-button":t.showCloseButton})),Z(e,c),KY()}var Ixe=X(`<!> <!> <!> <!>`,1);function Lxe(e,t){GY(t,!0);let n=$(t,`showDiscountCodeField`,3,!1),r=$(t,`draftDiscountCode`,3,``),i=$(t,`appliedDiscountCode`,3,null),a=$(t,`discountCodeError`,3,null),o=$(t,`isUpdatingDiscountCode`,3,!1),s=$(t,`isDiscountCodeControlsEnabled`,3,!1),c=$(t,`onDraftDiscountCodeChange`,3,void 0),l=$(t,`onApplyDiscountCode`,3,void 0),u=$(t,`onRemoveDiscountCode`,3,void 0),d=$(t,`onPaymentProcessingChange`,3,void 0),f=$(t,`onSessionPricingUpdated`,3,void 0),p=$(t,`onClose`,3,void 0),m=$(t,`hideBackButton`,3,!1),h=$(t,`lastTaxCustomerDetailsStore`,19,()=>N1(null)),g=C8(t.productDetails,t.purchaseOptionToUse),_=CZ(kZ(t.defaultPriceBreakdown??{currency:g.currency,totalAmountInMicros:g.amountMicros,totalExcludingTaxInMicros:g.amountMicros,taxCalculationStatus:`unavailable`,taxAmountInMicros:null,taxBreakdown:null}));$Z(()=>{let e=C8(t.productDetails,t.purchaseOptionToUse);G(_,t.defaultPriceBreakdown??{currency:e.currency,totalAmountInMicros:e.amountMicros,totalExcludingTaxInMicros:e.amountMicros,taxCalculationStatus:`unavailable`,taxAmountInMicros:null,taxBreakdown:null},!0)});let v=e=>{G(_,e,!0)};U8(e,{get brandingInfo(){return t.brandingInfo},get isInElement(){return t.isInElement},get isSandbox(){return t.isSandbox},get onClose(){return p()},navbarHeaderContent:e=>{{let n=W(()=>!t.isInElement&&!!p()&&!m());Fxe(e,{get brandingInfo(){return t.brandingInfo},get onClose(){return p()},get showCloseButton(){return Y(n)}})}},navbarBodyContent:e=>{{let d=W(()=>t.brandingInfo?.appearance?.show_product_description??!1);Rbe(e,{get productDetails(){return t.productDetails},get purchaseOption(){return t.purchaseOptionToUse},get showProductDescription(){return Y(d)},get showDiscountCodeField(){return n()},get discountCode(){return r()},get appliedDiscountCode(){return i()},get discountCodeError(){return a()},get isUpdatingDiscountCode(){return o()},get isDiscountCodeControlsEnabled(){return s()},get onDiscountCodeChange(){return c()},get onApplyDiscountCode(){return l()},get onRemoveDiscountCode(){return u()},get priceBreakdown(){return Y(_)}})}},mainContent:e=>{var n=Ixe(),r=BZ(n),i=e=>{$ye(e)};Q(r,e=>{t.currentPage===`payment-entry-loading`&&e(i)});var a=q(r,2),o=e=>{Eye(e,{get productDetails(){return t.productDetails},get purchaseOption(){return t.purchaseOptionToUse},get brandingInfo(){return t.brandingInfo},get purchaseOperationHelper(){return t.purchaseOperationHelper},get gatewayParams(){return t.gatewayParams},get managementUrl(){return t.managementUrl},get customerEmail(){return t.customerEmail},get forceEnableWalletMethods(){return t.forceEnableWalletMethods},get defaultPriceBreakdown(){return t.defaultPriceBreakdown},get termsAndConditionsUrl(){return t.termsAndConditionsUrl},get onContinue(){return t.onContinue},get onError(){return t.onError},onPriceBreakdownUpdated:v,get onSessionPricingUpdated(){return f()},get onProcessingStateChange(){return d()},get lastTaxCustomerDetailsStore(){return h()}})};Q(a,e=>{t.currentPage===`payment-entry`&&e(o)});var s=q(a,2),c=e=>{{let n=W(()=>t.brandingInfo?.support_email??null),r=W(()=>t.brandingInfo?.app_name??null);N8(e,{get lastError(){return t.lastError},get productDetails(){return t.productDetails},get supportEmail(){return Y(n)},get onDismiss(){return t.closeWithError},get appName(){return Y(r)}})}};Q(s,e=>{t.currentPage===`error`&&e(c)});var l=q(s,2),u=e=>{P8(e,{get onContinue(){return t.onContinue}})};Q(l,e=>{t.currentPage===`success`&&e(u)}),Z(e,n)},$$slots:{navbarHeaderContent:!0,navbarBodyContent:!0,mainContent:!0}}),KY()}function G8(e){return e.trim()===``?`You need to provide your email address to continue.`:e.match(/^[^@]+@[^@]+\.[^@]+$/)?null:`Email is not val
443id. Please provide a valid email address.`}function Rxe(e){if(e&&!e.match(/^[A-Z]{3}$/)){let t=`Currency code ${e} is not valid. Please provide a valid ISO 4217 currency code.`;throw X1.errorLog(t),new K1(U1.ConfigurationError,t)}}function zxe(e,t,n){let r=n?.selected_purchase_option;return r?Cfe(e.productType,r)??t:t}function Bxe(e,t){GY(t,!0);let n=$(t,`customTranslations`,19,()=>({})),r=$(t,`skipSuccessPage`,3,!1),i=$(t,`showDiscountCodeField`,3,!1),a=$(t,`discountCode`,3,void 0),o=$(t,`hideBackButton`,3,!1),s=CZ(kZ(t.customerEmail&&G8(t.customerEmail)?void 0:t.customerEmail)),c=kZ(t.rcPackage.webBillingProduct),l=CZ(null),u=N1(null),d=W(()=>zxe(c,t.purchaseOption,Y(l))),f=CZ(null),p=CZ(kZ(a()??``)),m=CZ(null),h=CZ(!1),g=CZ(!1),_=CZ(`payment-entry-loading`),v=CZ(null),y=CZ(kZ({})),b=CZ(null),x=CZ(void 0),S=W(()=>Y(l)?.applied_discounts?.[0]?.discount_code??null),C=W(()=>{var e;return{...Y(y),...(e=Y(l)?.gateway_params)!=null&&e.elements_configuration?{elements_configuration:Y(l).gateway_params.elements_configuration}:{}}}),w=CZ(null),T=CZ(null),E=CZ(null),D=N1(new h0(n(),t.selectedLocale,t.defaultLocale)),O=N1(t.brandingInfo?.appearance??null);WY(r0,D),WY(c6,O),j$(()=>{t.isInElement||(G(w,document.documentElement.style.height,!0),G(T,document.documentElement.style.overflow,!0),G(E,document.body.style.height,!0),document.documentElement.style.height=`100%`,document.body.style.height=`100%`,document.documentElement.style.overflow=`hidden`)}),M$(()=>{if(!t.isInElement){let e=(e,t,n)=>{n===``?e.style.removeProperty(t):e.style.setProperty(t,n)};e(document.documentElement,`height`,Y(w)),e(document.body,`height`,Y(E)),e(document.documentElement,`overflow`,Y(T))}}),WY(s6,t.eventsTracker);let k=kZ(typeof t.purchases._shouldForceEnableWalletMethods==`function`?t.purchases._shouldForceEnableWalletMethods():!1),A=(e,n,r)=>{let i=e.identifier??null;return i===null?Promise.reject(new n0(t0.ErrorSettingUpPurchase,`Product ID was not set before purchase.`)):t.purchaseOperationHelper.checkoutStart({appUserId:t.appUserId,productId:i,purchaseOption:n,presentedOfferingContext:e.presentedOfferingContext,customerEmail:r,metadata:t.metadata,workflowPurchaseContext:t.workflowPurchaseContext,attributionMetadata:t.attributionMetadata,paywallId:t.paywallId,paywallSessionId:t.paywallSessionId,locale:t.selectedLocale}).then(e=>({result:e,emailToUse:r})).catch(r=>{if(r.errorCode!==t0.MissingEmailError)throw r;return t.purchaseOperationHelper.checkoutStart({appUserId:t.appUserId,productId:i,purchaseOption:n,presentedOfferingContext:e.presentedOfferingContext,customerEmail:void 0,metadata:t.metadata,workflowPurchaseContext:t.workflowPurchaseContext,attributionMetadata:t.attributionMetadata,paywallId:t.paywallId,paywallSessionId:t.paywallSessionId,locale:t.selectedLocale}).then(e=>({result:e,emailToUse:void 0}))})},j=e=>e?e===Q1.invalid_tax_location?`pending`:`disabled`:`calculated`,M=e=>e instanceof n0&&[t0.StripeTaxNotActive,t0.StripeInvalidTaxOriginAddress,t0.StripeMissingRequiredPermission].includes(e.errorCode),N=()=>{let e=F1(u);return{countryCode:e?.countryCode,postalCode:e?.postalCode,state:e?.state,city:e?.city,addressLine1:e?.addressLine1,addressLine2:e?.addressLine2}},P=(e,t)=>{G(l,e,!0),G(x,t??$1(e,j(e.failed_reason)),!0)};j$(async()=>{try{let{result:e,emailToUse:n}=await A(c,Y(d),Y(s));if(G(f,null),G(s,n,!0),G(y,e.gateway_params,!0),G(b,e.management_url,!0),a())try{P(await t.purchaseOperationHelper.checkoutRefreshPricing({...N(),discountCode:a()}))}catch(e){if(M(e))throw e;if(i())G(m,e instanceof Error?e.message:`Failed to apply discount code.`,!0);else throw e instanceof n0?e:new n0(t0.ErrorSettingUpPurchase,`Failed to apply discount code.`)}G(_,`payment-entry`)}catch(e){ie(e instanceof n0?e:new n0(t0.UnknownError,e instanceof Error?e.message:String(e)))}});let F=e=>{G(p,e,!0),G(m,null)},ee=e=>{G(g,e,!0)},I=async e=>{var n;let r=e?.trim()||null;if(e!==null&&r===null){G(m,`Enter a discount code.`);return}G(h,!0),G(m,null);try{P(await t.purchaseOperationHelper.checkoutRefreshPricing({...N(),discountCode:r})),G(p,r??``,!0),G(f,null),(n=t.onDiscountCodeChanged)==null||n.call(t,r)}catch(e){if(M(e)){ie(e);return}G(m,e instanceof Error?e.message:`Failed to apply discount code.`,!0)}finally{G(h,!1)}},te=async()=>{await I(Y(p))},ne=async()=>{await I(null)},re=()=>{if(Y(_)===`payment-entry`){t.purchaseOperationHelper.pollCurrentPurchaseForCompletion().then(e=>{G(v,e,!0),r()?t.onFinished(e):G(_,`success`)}).catch(e=>{ie(e)});return}if(Y(_)===`success`||Y(_)===`error`){t.onFinished(Y(v));return}G(_,`success`)},ie=e=>{let n=w6({errorCode:e.getErrorCode().toString(),errorMessage:e.message});t.eventsTracker.trackSDKEvent(n),G(f,e,!0),G(_,`error`)},ae=()=>{t.onError(Y(f)??new n0(t0.UnknownError,`Unknown error without state set.`))};{let n=W(()=>t.purchases.isSandbox()),r=W(()=>Y(_)===`payment-entry`&&!Y(g)),a=W(()=>Y(s)??null);Lxe(e,{get isSandbox(){return Y(n)},get currentPage(){return Y(_)},get brandingInfo(){return t.brandingInfo},get productDetails(){return c},get purchaseOptionToUse(){return Y(d)},get lastError(){return Y(f)},get gatewayParams(){return Y(C)},get managementUrl(){return Y(b)},get purchaseOperationHelper(){return t.purchaseOperationHelper},get isInElement(){return t.isInElement},get termsAndConditionsUrl(){return t.termsAndConditionsUrl},get showDiscountCodeField(){return i()},get draftDiscountCode(){return Y(p)},get appliedDiscountCode(){return Y(S)},get discountCodeError(){return Y(m)},get isUpdatingDiscountCode(){return Y(h)},get isDiscountCodeControlsEnabled(){return Y(r)},get forceEnableWalletMethods(){return k},get customerEmail(){return Y(a)},get defaultPriceBreakdown(){return Y(x)},closeWithError:ae,onDraftDiscountCodeChange:F,onApplyDiscountCode:te,onRemoveDiscountCode:ne,onPaymentProcessingChange:ee,onSessionPricingUpdated:P,onContinue:re,onError:ie,get onClose(){return t.onClose},get hideBackButton(){return o()},get lastTaxCustomerDetailsStore(){return u}})}KY()}function K8(e,t,n,r,i,a,o){try{var s=e[a](o),c=s.value}catch(e){n(e);return}s.done?t(c):Promise.resolve(c).then(r,i)}function Vxe(e){return function(){var t=this,n=arguments;return new Promise(function(r,i){var a=e.apply(t,n);function o(e){K8(a,r,i,o,s,`next`,e)}function s(e){K8(a,r,i,o,s,`throw`,e)}o(void 0)})}}function Hxe(e,t,n){return(t=Gxe(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function q8(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function J8(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];
vendor: 5,144 bytes, line 443
443t%2?q8(Object(n),!0).forEach(function(t){Hxe(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):q8(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function Y8(e,t){if(e==null)return{};var n,r,i=Uxe(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.includes(n)||{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function Uxe(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.includes(r))continue;n[r]=e[r]}return n}function X8(){X8=function(){return t};var e,t={},n=Object.prototype,r=n.hasOwnProperty,i=Object.defineProperty||function(e,t,n){e[t]=n.value},a=typeof Symbol==`function`?Symbol:{},o=a.iterator||`@@iterator`,s=a.asyncIterator||`@@asyncIterator`,c=a.toStringTag||`@@toStringTag`;function l(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},``)}catch{l=function(e,t,n){return e[t]=n}}function u(e,t,n,r){var a=t&&t.prototype instanceof _?t:_,o=Object.create(a.prototype);return i(o,`_invoke`,{value:E(e,n,new A(r||[]))}),o}function d(e,t,n){try{return{type:`normal`,arg:e.call(t,n)}}catch(e){return{type:`throw`,arg:e}}}t.wrap=u;var f=`suspendedStart`,p=`suspendedYield`,m=`executing`,h=`completed`,g={};function _(){}function v(){}function y(){}var b={};l(b,o,function(){return this});var x=Object.getPrototypeOf,S=x&&x(x(j([])));S&&S!==n&&r.call(S,o)&&(b=S);var C=y.prototype=_.prototype=Object.create(b);function w(e){[`next`,`throw`,`return`].forEach(function(t){l(e,t,function(e){return this._invoke(t,e)})})}function T(e,t){function n(i,a,o,s){var c=d(e[i],e,a);if(c.type!==`throw`){var l=c.arg,u=l.value;return u&&typeof u==`object`&&r.call(u,`__await`)?t.resolve(u.__await).then(function(e){n(`next`,e,o,s)},function(e){n(`throw`,e,o,s)}):t.resolve(u).then(function(e){l.value=e,o(l)},function(e){return n(`throw`,e,o,s)})}s(c.arg)}var a;i(this,`_invoke`,{value:function(e,r){function i(){return new t(function(t,i){n(e,r,t,i)})}return a=a?a.then(i,i):i()}})}function E(t,n,r){var i=f;return function(a,o){if(i===m)throw Error(`Generator is already running`);if(i===h){if(a===`throw`)throw o;return{value:e,done:!0}}for(r.method=a,r.arg=o;;){var s=r.delegate;if(s){var c=D(s,r);if(c){if(c===g)continue;return c}}if(r.method===`next`)r.sent=r._sent=r.arg;else if(r.method===`throw`){if(i===f)throw i=h,r.arg;r.dispatchException(r.arg)}else r.method===`return`&&r.abrupt(`return`,r.arg);i=m;var l=d(t,n,r);if(l.type===`normal`){if(i=r.done?h:p,l.arg===g)continue;return{value:l.arg,done:r.done}}l.type===`throw`&&(i=h,r.method=`throw`,r.arg=l.arg)}}}function D(t,n){var r=n.method,i=t.iterator[r];if(i===e)return n.delegate=null,r===`throw`&&t.iterator.return&&(n.method=`return`,n.arg=e,D(t,n),n.method===`throw`)||r!==`return`&&(n.method=`throw`,n.arg=TypeError(`The iterator does not provide a '`+r+`' method`)),g;var a=d(i,t.iterator,n.arg);if(a.type===`throw`)return n.method=`throw`,n.arg=a.arg,n.delegate=null,g;var o=a.arg;return o?o.done?(n[t.resultName]=o.value,n.next=t.nextLoc,n.method!==`return`&&(n.method=`next`,n.arg=e),n.delegate=null,g):o:(n.method=`throw`,n.arg=TypeError(`iterator result is not an object`),n.delegate=null,g)}function O(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function k(e){var t=e.completion||{};t.type=`normal`,delete t.arg,e.completion=t}function A(e){this.tryEntries=[{tryLoc:`root`}],e.forEach(O,this),this.reset(!0)}function j(t){if(t||t===``){var n=t[o];if(n)return n.call(t);if(typeof t.next==`function`)return t;if(!isNaN(t.length)){var i=-1,a=function n(){for(;++i<t.length;)if(r.call(t,i))return n.value=t[i],n.done=!1,n;return n.value=e,n.done=!0,n};return a.next=a}}throw TypeError(typeof t+` is not iterable`)}return v.prototype=y,i(C,`constructor`,{value:y,configurable:!0}),i(y,`constructor`,{value:v,configurable:!0}),v.displayName=l(y,c,`GeneratorFunction`),t.isGeneratorFunction=function(e){var t=typeof e==`function`&&e.constructor;return!!t&&(t===v||(t.displayName||t.name)===`GeneratorFunction`)},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,y):(e.__proto__=y,l(e,c,`GeneratorFunction`)),e.prototype=Object.create(C),e},t.awrap=function(e){return{__await:e}},w(T.prototype),l(T.prototype,s,function(){return this}),t.AsyncIterator=T,t.async=function(e,n,r,i,a){a===void 0&&(a=Promise);var o=new T(u(e,n,r,i),a);return t.isGeneratorFunction(n)?o:o.next().then(function(e){return e.done?e.value:o.next()})},w(C),l(C,c,`Generator`),l(C,o,function(){return this}),l(C,`toString`,function(){return`[object Generator]`}),t.keys=function(e){var t=Object(e),n=[];for(var r in t)n.push(r);return n.reverse(),function e(){for(;n.length;){var r=n.pop();if(r in t)return e.value=r,e.done=!1,e}return e.done=!0,e}},t.values=j,A.prototype={constructor:A,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method=`next`,this.arg=e,this.tryEntries.forEac
443h(k),!t)for(var n in this)n.charAt(0)===`t`&&r.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if(e.type===`throw`)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var n=this;function i(r,i){return s.type=`throw`,s.arg=t,n.next=r,i&&(n.method=`next`,n.arg=e),!!i}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],s=o.completion;if(o.tryLoc===`root`)return i(`end`);if(o.tryLoc<=this.prev){var c=r.call(o,`catchLoc`),l=r.call(o,`finallyLoc`);if(c&&l){if(this.prev<o.catchLoc)return i(o.catchLoc,!0);if(this.prev<o.finallyLoc)return i(o.finallyLoc)}else if(c){if(this.prev<o.catchLoc)return i(o.catchLoc,!0)}else{if(!l)throw Error(`try statement without catch or finally`);if(this.prev<o.finallyLoc)return i(o.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var i=this.tryEntries[n];if(i.tryLoc<=this.prev&&r.call(i,`finallyLoc`)&&this.prev<i.finallyLoc){var a=i;break}}a&&(e===`break`||e===`continue`)&&a.tryLoc<=t&&t<=a.finallyLoc&&(a=null);var o=a?a.completion:{};return o.type=e,o.arg=t,a?(this.method=`next`,this.next=a.finallyLoc,g):this.complete(o)},complete:function(e,t){if(e.type===`throw`)throw e.arg;return e.type===`break`||e.type===`continue`?this.next=e.arg:e.type===`return`?(this.rval=this.arg=e.arg,this.method=`return`,this.next=`end`):e.type===`normal`&&t&&(this.next=t),g},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),k(n),g}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if(r.type===`throw`){var i=r.arg;k(n)}return i}}throw Error(`illegal catch attempt`)},delegateYield:function(t,n,r){return this.delegate={iterator:j(t),resultName:n,nextLoc:r},this.method===`next`&&(this.arg=e),g}},t}function Wxe(e,t){if(typeof e!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function Gxe(e){var t=Wxe(e,`string`);return typeof t==`symbol`?t:t+``}var Z8={CLASSIC:`classic`,V1:`v1`},Kxe=Z8.V1,qxe=`https://cdn.paddle.com/paddle/paddle.js`,Jxe=`https://cdn.paddle.com/paddle/v2/paddle.js`,Yxe={url:qxe},Xxe={url:Jxe};function Zxe(e){return document.querySelector(`script[src="${e}"]`)||void 0}function Qxe(e){var t=document.createElement(`script`);t.src=e;var n=document.head||document.body;if(!n)throw Error(`Cannot inject Paddle.js. It needs a <head> or <body> element.`);return n.appendChild(t),t}var Q8={classic:void 0,v1:void 0},$xe={classic:`PaddleClassic`,v1:`PaddleBillingV1`};function eSe(e){var t=tSe(e)?.url;if(t){var n=Q8[e],r=$xe[e];return n===void 0?(Q8[e]=new Promise(function(n,i){if(typeof window>`u`){n(void 0);return}if(window[r]){n(window[r]);return}try{var a=Zxe(t);a||=Qxe(t),a.addEventListener(`load`,function(){window[r]?n(window[r]):i(Error(`Paddle.js not available`))}),a.addEventListener(`error`,function(){i(Error(`Failed to load Paddle.js - ${e}`))})}catch(e){i(e);return}}),Q8[e]):n}}function tSe(e){if(e===Z8.CLASSIC)return Yxe;if(e===Z8.V1)return Xxe;console.error(`[Paddle] Unknown Paddle Version`)}var nSe=[`environment`,`version`],rSe=[`environment`,`version`];function iSe(e,t){var n=e.environment;e.version;var r=Y8(e,nSe);try{n&&t.Environment.set(n),t.Initialized?t.Update(J8({},r)):t.Initialize(J8({},r))}catch(e){console.warn(`[Paddle] Paddle Initialization failed. Please check the inputs`,e)}}function aSe(e,t){var n=e.environment;e.version;var r=Y8(e,rSe);try{n&&t.Environment.set(n),t.Setup(J8({},r))}catch(e){console.warn(`[Paddle] Paddle Initialization failed. Please check the inputs`,e)}}var $8;(function(e){e.CHECKOUT_LOADED=`checkout.loaded`,e.CHECKOUT_CLOSED=`checkout.closed`,e.CHECKOUT_UPDATED=`checkout.updated`,e.CHECKOUT_COMPLETED=`checkout.completed`,e.CHECKOUT_ERROR=`checkout.error`,e.CHECKOUT_FAILED=`checkout.failed`,e.CHECKOUT_ITEMS_UPDATED=`checkout.items.updated`,e.CHECKOUT_ITEMS_REMOVED=`checkout.items.removed`,e.CHECKOUT_CUSTOMER_CREATED=`checkout.customer.created`,e.CHECKOUT_CUSTOMER_UPDATED=`checkout.customer.updated`,e.CHECKOUT_CUSTOMER_REMOVED=`checkout.customer.removed`,e.CHECKOUT_PAYMENT_SELECTED=`checkout.payment.selected`,e.CHECKOUT_PAYMENT_INITIATED=`checkout.payment.initiated`,e.CHECKOUT_PAYMENT_FAILED=`checkout.payment.failed`,e.CHECKOUT_PAYMENT_ERROR=`checkout.payment.error`,e.CHECKOUT_DISCOUNT_APPLIED=`checkout.discount.applied`,e.CHECKOUT_DISCOUNT_REMOVED=`checkout.discount.removed`,e.CHECKOUT_UPSELL_CANCELED=`checkout.upsell.canceled`})($8||={});var oSe;(function(e){e.DAY=`day`,e.WEEK=`week`,e.MONTH=`month`,e.YEAR=`year`})(oSe||={});var sSe;(function(e){e.ALIPAY=`alipay`,e.APPLE_PAY=`apple-pay`,e.CARD=`card`,e.GOOGLE_PAY=`google-pay`,e.IDEAL=`ideal`,e.PAYPAL=`paypal`,e.WECHAT_PAY=`wechat-pay`,e.WIRE_TRANSFER=`wire-transfer`,e.NONE=`
443none`})(sSe||={});var cSe;(function(e){e.AMERICAN_EXPRESS=`american_express`,e.DINERS_CLUB=`diners_club`,e.DISCOVER=`discover`,e.JCB=`jcb`,e.MADA=`mada`,e.MAESTRO=`maestro`,e.MASTER_CARD=`mastercard`,e.UNION_PAY=`union_pay`,e.VISA=`visa`,e.UNKNOWN=`unknown`})(cSe||={});var lSe;(function(e){e.DRAFT=`draft`,e.READY=`ready`,e.COMPLETED=`completed`,e.BILLED=`billed`,e.canceled=`canceled`,e.PAST_DUE=`past_due`})(lSe||={});function uSe(e){return e5.apply(this,arguments)}function e5(){return e5=Vxe(X8().mark(function e(t){var n,r;return X8().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return n=t?.version||Kxe,e.next=3,eSe(n);case 3:if(r=e.sent,!r){e.next=9;break}return t&&(n===Z8.V1?iSe(t,r):n===Z8.CLASSIC&&aSe(t,r)),e.abrupt(`return`,r);case 9:return console.error(`[Paddle] Error Loading Paddle`),e.abrupt(`return`);case 11:case`end`:return e.stop()}},e)})),e5.apply(this,arguments)}var t5=`paddle-checkout-container`,dSe=450,fSe=`width:100%; min-width:312px; background-color:transparent; border:none;`;function pSe({transactionId:e,locale:t,customerEmail:n,displayMode:r=`overlay`,theme:i=`light`}){let a={theme:i,variant:`one-page`,locale:t,allowLogout:!1,showAddDiscounts:!1,showAddTaxId:!1,allowDiscountRemoval:!1};return{transactionId:e,settings:r===`inline`?{...a,displayMode:`inline`,frameTarget:t5,frameInitialHeight:dSe,frameStyle:fSe}:{...a,displayMode:`overlay`},...n&&{customer:{email:n}}}}var mSe=class{constructor(e,t,n=10){aJ(this,`paddleInstance`),aJ(this,`backend`),aJ(this,`eventsTracker`),aJ(this,`maxNumberAttempts`),aJ(this,`waitMSBetweenAttempts`,1e3),this.backend=e,this.eventsTracker=t,this.maxNumberAttempts=n}async initializePaddle(e,t){var n;if((n=this.paddleInstance)!=null&&n.Initialized)return X1.debugLog(`Paddle already initialized, returning existing instance`),this.paddleInstance;let r=t?`sandbox`:`production`;try{let t=await uSe({token:e,version:`v1`,environment:r});if(!t)throw new n0(t0.UnknownError,`Paddle client not found`);return this.paddleInstance=t,X1.debugLog(`Paddle initialized with environment: ${r}`),t}catch(e){throw e instanceof n0?e:new n0(t0.UnknownError,`Error initializing Paddle: ${e}`)}}getPaddleInstance(){var e;if(!((e=this.paddleInstance)!=null&&e.Initialized))throw new n0(t0.UnknownError,`Paddle not initialized.`);return this.paddleInstance}closeCheckout(){var e;(e=this.paddleInstance)!=null&&e.Initialized&&this.paddleInstance.Checkout.close()}async startCheckout({appUserId:e,productId:t,presentedOfferingContext:n,purchaseOption:r,customerEmail:i,metadata:a,locale:o,attributionMetadata:s,workflowPurchaseContext:c}){try{let l=this.eventsTracker.getTraceId(),u=c?.stepId,d=c?.urlParameters,f=await this.backend.postCheckoutStart({appUserId:e,productId:t,purchaseOption:r,presentedOfferingContext:n,traceId:l,presentedStepId:u,urlParameters:d,customerEmail:i??void 0,metadata:a,locale:o,attributionMetadata:s});return await this.initializePaddle(f.paddle_billing_params.client_side_token,f.paddle_billing_params.is_sandbox),f}catch(e){throw e instanceof K1?n0.fromPurchasesError(e,t0.ErrorSettingUpPurchase,e.errorCode===U1.InvalidCredentialsError):new n0(t0.UnknownError,`Error starting Paddle checkout: ${e}`)}}async purchase({operationSessionId:e,transactionId:t,onCheckoutLoaded:n,onClose:r,params:i,displayMode:a=`overlay`,theme:o=`light`,onCheckoutTotals:s,onCheckoutCompleted:c}){let l=this.getPaddleInstance(),{customerEmail:u,locale:d=`en`}=i,f=e=>{if(s&&e!=null&&e.totals){let t=e.items?.[0];s({currencyCode:e.currency_code,subtotalAmount:e.totals.subtotal,taxAmount:e.totals.tax,totalAmount:e.totals.total,recurringTotalAmount:e.recurring_totals?.total??null,productName:t?.product?.name??null,priceName:t?.price_name??null})}};return new Promise((i,s)=>{l.Update({eventCallback:async t=>{let a=t.name,o=t.data;try{a===$8.CHECKOUT_LOADED?(n(),f(o)):a===$8.CHECKOUT_UPDATED?f(o):a===$8.CHECKOUT_COMPLETED?(c?.(),l.Checkout.close(),i(await this.pollOperationStatus(e))):a===$8.CHECKOUT_CLOSED&&o!=null&&o.status&&r()}catch(e){l.Checkout.close(),e instanceof n0?s(e):e instanceof K1?s(n0.fromPurchasesError(e,t0.UnknownError)):s(new n0(t0.UnknownError,`Paddle event handler error: ${e}`))}}});let p=pSe({transactionId:t,locale:d,customerEmail:u,displayMode:a,theme:o});try{l.Checkout.open(p)}catch(e){s(new n0(t0.UnknownError,`Failed to open Paddle checkout: ${e}`))}})}async pollOperationStatus(e){if(!e)throw new n0(t0.ErrorSettingUpPurchase,`No purchase in progress`);return new Promise((t,n)=>{let r=(i=1)=>
443{if(i>this.maxNumberAttempts){n(new n0(t0.UnknownError,`Max attempts reached trying to get successful purchase status`));return}this.backend.getCheckoutStatus(e).then(a=>{let o=a.operation.store_transaction_identifier,s=a.operation.product_identifier,c=a.operation.purchase_date?isNaN(Date.parse(a.operation.purchase_date))?null:new Date(a.operation.purchase_date):null;switch(a.operation.status){case q1.Started:case q1.InProgress:setTimeout(()=>r(i+1),this.waitMSBetweenAttempts);break;case q1.Succeeded:if(!o||!s||!c){n(new n0(t0.UnknownError,`Missing required fields in operation response.`));return}t({redemptionInfo:Z1(a),operationSessionId:e,storeTransactionIdentifier:o??``,productIdentifier:s,purchaseDate:c??new Date,attributionMetadata:a.attribution_metadata??void 0});return;case q1.Failed:e0(a.operation.error,n)}}).catch(e=>{e instanceof K1?n(n0.fromPurchasesError(e,t0.NetworkError)):n(new n0(t0.NetworkError,`Failed to get checkout status: ${e}`))})};r()})}},n5=(e,t)=>e instanceof n0?e:e instanceof K1?n0.fromPurchasesError(e,t0.UnknownError):new n0(t0.UnknownError,t),hSe=X(`<!> <div class="rcb-fullscreen-wrapper svelte-skuziz"><div class="rcb-fullscreen-content svelte-skuziz"><!></div></div>`,1),gSe={hash:`svelte-skuziz`,code:`.rcb-fullscreen-wrapper.svelte-skuziz {width:100%;min-height:100%;display:flex;flex-direction:column;align-items:center;}.rcb-fullscreen-content.svelte-skuziz {flex:1;width:100%;box-sizing:border-box;display:flex;flex-direction:column;align-items:center;justify-content:center;color:var(--rc-color-grey-text-dark);}`};function r5(e,t){GY(t,!0),J$(e,gSe);let n=()=>R1(a,`$brandingAppearanceStore`,r),[r,i]=B1(),a=UY(c6),o=W(()=>n()??t.brandingInfo?.appearance??null),s=W(()=>new g8(Y(o)).pageStyleVars),c=W(()=>Y(o)?.color_page_bg??`#ffffff`);{let n=W(()=>t.brandingInfo?.brand_font_config);R8(e,{get brandingAppearance(){return Y(o)},get brandFontConfig(){return Y(n)},get isInElement(){return t.isInElement},children:(e,n)=>{var r=hSe(),i=BZ(r),a=e=>{H8(e,{get style(){return Y(s)},get isInElement(){return t.isInElement},get brandingInfo(){return t.brandingInfo}})};Q(i,e=>{t.isSandbox&&e(a)});var o=q(i,2);A$(K(K(o)),()=>t.mainContent??UJ),J(()=>n1(o,`${Y(s)??``}; background-color: ${Y(c)??``}`)),Z(e,r)},$$slots:{default:!0}})}KY(),i()}var _Se=X(`<!> <!> <!>`,1),vSe=X(`<div class="rcb-ui-loading-container svelte-1r889ax"><!></div>`),ySe={hash:`svelte-1r889ax`,code:`.rcb-ui-loading-container.svelte-1r889ax {display:flex;flex-direction:column;align-items:center;}`};function bSe(e,t){GY(t,!0),J$(e,ySe);let n=()=>R1(a,`$translator`,r),[r,i]=B1(),a=UY(r0);r5(e,{get brandingInfo(){return t.brandingInfo},get isInElement(){return t.isInElement},get isSandbox(){return t.isSandbox},mainContent:e=>{var r=m$(),i=BZ(r),a=e=>{var t=vSe();a6(K(t),{gap:`medium`,align:`center`,children:(e,t)=>{var r=_Se(),i=BZ(r);M6(i,{color:`var(--rc-color-grey-text-dark)`});var a=q(i,2);o6(a,{size:`heading-md`,children:(e,t)=>{var r=p$();J(e=>_$(r,e),[()=>n().translate(a0.LoadingPageProcessingPayment)]),Z(e,r)},$$slots:{default:!0}}),o6(q(a,2),{size:`body-small`,children:(e,t)=>{var r=p$();J(e=>_$(r,e),[()=>n().translate(a0.LoadingPageKeepPageOpen)]),Z(e,r)},$$slots:{default:!0}}),Z(e,r)},$$slots:{default:!0}}),Z(e,t)},o=e=>{var n=m$(),r=BZ(n),i=e=>{P8(e,{get onContinue(){return t.onContinue},fullWidth:!0})},a=e=>{var n=m$(),r=BZ(n),i=e=>{{let n=W(()=>t.brandingInfo?.support_email??null),r=W(()=>t.brandingInfo?.app_name??null);N8(e,{get lastError(){return t.lastError},get productDetails(){return t.productDetails},get supportEmail(){return Y(n)},get onDismiss(){return t.closeWithError},get appName(){return Y(r)},fullWidth:!0})}};Q(r,e=>{t.currentPage===`error`&&e(i)},!0),Z(e,n)};Q(r,e=>{t.currentPage===`success`?e(i):e(a,!1)},!0),Z(e,n)};Q(i,e=>{t.currentPage===`loading`?e(a):e(o,!1)}),Z(e,r)},$$slots:{mainContent:!0}}),KY(),i()}var xSe=X(`<span class="rcb-paddle-summary-muted svelte-1k1pux8">inc. tax</span>`),SSe=X(`<span class="rcb-paddle-summary-muted rcb-paddle-summary-price-name svelte-1k1pux8"> </span>`),CSe=X(`<span class="rcb-paddle-summary-muted svelte-1k1pux8"> </span>`),wSe=X(`<div class="rcb-paddle-summary-row svelte-1k1pux8"><span class="rcb-paddle-summary-muted svelte-1k1pux8"> </span> <span> </span></div>`),TSe=X(`<div class="rcb-paddle-summary-row svelte-1k1pux8"><span class="rcb-paddle-summary-muted svelte-1k1pux8"> </span> <span> </span></div>`),ESe=X(`<div class="rcb-paddle-summary-card svelte-1k1pux8"><div class="rcb-paddle-summary-row svelte-1k1pux8"><span class="rcb-paddle-summary-muted svelte-1k1pux8"> </span> <span> </span></div> <!> <hr class="rcb-paddle-summary-divider svelte-1k1pux8"/> <div class="rcb-paddle-summary-row rcb-paddle-summary-row-strong svelte-1k1pux8"><span> </span> <span> </span></div> <!></div>`),DSe=X(`<div class="rcb-paddle-summary svelte-1k1pux8"><div class="rcb-paddle-summary-card svelte-1k1pux8"><div class="rcb-paddle-summary-amount-row svelte-1k1pux8"><span class="rcb-paddle-summary-amount svelte-1k1pux8"> </span> <!></div> <!> <div class="rcb-paddle-summary-product svelte-1k1pux8"><!> <!> <div class="rcb-paddle-summary-product-price svelte-1k1pux8"><span> </span> <!></div></div></div> <!></div>`),OSe={hash:`svelte-1k1pux8`,code:`.rcb-paddle-summary.svelte-1k1pux8 {display:flex;flex-direction:column;gap:var(--rc-spacing-gapLarge-mobile, 16px);width:100%;}.rcb-paddle-summary-card.svelte-1k1pux8 {background:var(--rcb-card-bg);border-radius:16px;padding:28px;display:flex;flex-direction:column;gap:var(--rc-spacing-gapMedium-mobile, 12px);}.rcb-paddle-summary-amount-row.svelte-1k1pux8 {display:flex;align-items:baseline;gap:8px;}.rcb-paddle-summary-amount.svelte-1k1pux8 {color:var(--rc-color-primary);font-weight:700;font-size:2rem;line-height:1.1;}
443.rcb-paddle-summary-product.svelte-1k1pux8 {display:flex;flex-direction:column;gap:2px; 444 /* Extra separation between the amount/billing line and the product block. */margin-top:var(--rc-spacing-gapLarge-mobile, 16px);}.rcb-paddle-summary-price-name.svelte-1k1pux8 {font-size:0.8125rem;}.rcb-paddle-summary-product-price.svelte-1k1pux8 {display:flex;align-items:baseline;gap:6px;font-weight:600;font-size:1.25rem; 445 /* A bit more separation from the price-name line above. */margin-top:var(--rc-spacing-gapSmall-mobile, 8px);}.rcb-paddle-summary-row.svelte-1k1pux8 {display:flex;justify-content:space-between;align-items:center;}.rcb-paddle-summary-row-strong.svelte-1k1pux8 {font-weight:700;}.rcb-paddle-summary-muted.svelte-1k1pux8 {color:var(--rc-color-grey-text-light);}.rcb-paddle-summary-divider.svelte-1k1pux8 {border:none;border-top:1px solid var(--rc-color-grey-ui-light);margin:4px 0;width:100%;}`};function kSe(e,t){GY(t,!0),J$(e,OSe);let n=()=>R1(a,`$translator`,r),[r,i]=B1(),a=UY(r0),o=new g8(t.brandingInfo?.appearance??null).formColors.background,s=(e=>`base`in e)(t.purchaseOption)?t.purchaseOption.base.period??null:null,c=e=>Math.round(e*1e6),l=C8(t.productDetails,t.purchaseOption),u=W(()=>t.totals?.currencyCode??l.currency),d=W(()=>t.totals?c(t.totals.totalAmount):l.amountMicros),f=e=>n().formatPrice(e,Y(u)),p=W(()=>s?n().translatePeriodUnit(s.unit):null),m=W(()=>s?n().translatePeriodFrequency(s.number,s.unit):null),h=W(()=>t.totals?.productName??t.productDetails.title),g=W(()=>t.totals?.priceName??null),_=W(()=>!!t.totals&&t.totals.taxAmount>0),v=W(()=>{if(!t.totals||t.totals.recurringTotalAmount===null||!s)return null;let e=c0(new Date,s,!0);return e?new Intl.DateTimeFormat(l0(n().selectedLocale),{day:`numeric`,month:`long`,year:`numeric`}).format(e):null});var y=DSe(),b=K(y),x=K(b),S=K(x),C=K(S),w=q(S,2),T=e=>{Z(e,xSe())};Q(w,e=>{Y(_)&&e(T)});var E=q(x,2),D=e=>{o6(e,{size:`body-small`,children:(e,t)=>{var n=p$();J(()=>_$(n,`billed ${Y(m)??``}`)),Z(e,n)},$$slots:{default:!0}})};Q(E,e=>{Y(m)&&e(D)});var O=K(q(E,2));o6(O,{size:`body-base`,children:(e,t)=>{var n=p$();J(()=>_$(n,Y(h))),Z(e,n)},$$slots:{default:!0}});var k=q(O,2),A=e=>{var t=SSe(),n=K(t);J(()=>_$(n,Y(g))),Z(e,t)};Q(k,e=>{Y(g)&&e(A)});var j=K(q(k,2)),M=K(j),N=q(j,2),P=e=>{var t=CSe(),n=K(t);J(()=>_$(n,`/ ${Y(p)??``}`)),Z(e,t)};Q(N,e=>{Y(p)&&e(P)});var F=q(b,2),ee=e=>{var r=ESe(),i=K(r),a=K(i),o=K(a),s=K(q(a,2)),l=q(i,2),u=e=>{var r=wSe(),i=K(r),a=K(i),o=K(q(i,2));J((e,t)=>{_$(a,e),_$(o,t)},[()=>n().translate(a0.PricingTableTax),()=>f(c(t.totals.taxAmount))]),Z(e,r)};Q(l,e=>{Y(_)&&e(u)});var d=q(l,4),p=K(d),m=K(p),h=K(q(p,2)),g=q(d,2),y=e=>{var n=TSe(),r=K(n),i=K(r),a=K(q(r,2));J(e=>{_$(i,`Due on ${Y(v)??``}`),_$(a,e)},[()=>f(c(t.totals.recurringTotalAmount))]),Z(e,n)};Q(g,e=>{t.totals.recurringTotalAmount!==null&&Y(v)&&e(y)}),J((e,t,n,r)=>{_$(o,e),_$(s,t),_$(m,n),_$(h,r)},[()=>n().translate(a0.PricingTableSubtotal),()=>f(c(t.totals.subtotalAmount)),()=>n().translate(a0.PricingTableTotalDueToday),()=>f(c(t.totals.totalAmount))]),Z(e,r)};Q(F,e=>{t.totals&&e(ee)}),J((e,t)=>{n1(y,`--rcb-card-bg: ${o??``};`),_$(C,e),_$(M,t)},[()=>f(Y(d)),()=>f(Y(d))]),Z(e,y),KY(),i()}var ASe=X(`<button type="button" class="rcb-paddle-return-button svelte-5dakll" data-testid="paddle-return-button"><!> <span> </span></button>`),jSe=X(`<!> <!> <!>`,1),MSe=X(`<div class="rcb-paddle-processing svelte-5dakll"><!></div>`),NSe=X(`<div data-testid="paddle-inline-checkout-container" style="width: 100%; min-height: 450px;"></div>`),PSe={hash:`svelte-5dakll`,code:`.rcb-paddle-return-button.svelte-5dakll {display:inline-flex;align-items:center;gap:var(--rc-spacing-gapSmall-mobile, 8px);padding:8px 0;border:none;background:transparent;cursor:pointer;color:var(--rc-color-accent);font:inherit;}.rcb-paddle-processing.svelte-5dakll {display:flex;justify-content:center;width:100%;min-height:450px;align-items:center;}`};function FSe(e,t){GY(t,!0),J$(e,PSe);let n=()=>R1(o,`$translator`,r),[r,i]=B1(),a=$(t,`hideBackButton`,3,!1),o=UY(r0),s=t.brandingInfo?.app_name??null;U8(e,{get brandingInfo(){return t.brandingInfo},get isInElement(){return t.isInElement},get isSandbox(){return t.isSandbox},get onClose(){return t.onClose},navbarHeaderContent:e=>{var n=m$(),r=BZ(n),i=e=>{var n=ASe();n.__click=function(...e){var n;(n=t.onClose)==null||n.apply(this,e)};var r=K(n);M8(r,{name:`back`});var i=K(q(r,2));J(()=>_$(i,s?`Return to ${s}`:`Back`)),Z(e,n)};Q(r,e=>{!t.isInElement&&!a()&&e(i)}),Z(e,n)},navbarBodyContent:e=>{kSe(e,{get brandingInfo(){return t.brandingInfo},get productDetails(){return t.productDetails},get purchaseOption(){return t.purchaseOption},get totals(){return t.totals}})},mainContent:e=>{var r=m$(),i=BZ(r),a=e=>{P8(e,{get onContinue(){return t.onContinue}})},o=e=>{var r=m$(),i=BZ(r),a=e=>{{let n=W(()=>t.brandingInfo?.support_email??null),r=W(()=>t.brandingInfo?.app_name??null);N8(e,{get lastError(){return t.lastError},get productDetails(){return t.productDetails},get supportEmail(){return Y(n)},get onDismiss(){return t.closeWithError},get appName(){return Y(r)}})}},o=e=>{var r=m$(),i=BZ(r),a=e=>{var t=MSe();a6(K(t),{gap:`medium`,align:`center`,children:(e,t)=>{var r=jSe(),i=BZ(r);M6(i,{color:`var(--rc-color-grey-text-dark)`});var a=q(i,2);o6(a,{size:`heading-md`,children:(e,t)=>{var r=p$();J(e=>_$(r,e),[()=>n().translate(a0.LoadingPageProcessingPayment)]),Z(e,r)},$$slots:{default:!0}}),o6(q(a,2),{size:`body-small`,children:(e,t)=>{var r=p$();J(e=>_$(r,e),[()=>n().translate(a0.LoadingPageKeepPageOpen)]),Z(e,r)},$$slots:{default:!0}}),Z(e,r)},$$slots:{default:!0}}),Z(e,t)},o=e=>{var t=NSe();J(()=>e1(t,1,X$(t5),`svelte-5dakll`)),Z(e,t)};Q(i,e=>{t.checkoutCompleted?e(a):e(o,!1)},!0),Z(e,r)};Q(i,e=>{t.currentPage===`error`?e(a):e(o,!1)},!0),Z(e,r)};Q(i,e=>{t.currentPage===`success`?e(a):e(o,!1)}),Z(e,r)},$$slots:{navbarHeaderContent:!0,navbarBodyContent:!0,mainContent:!0}}),KY(),i()}s$([`click`]);function ISe(e,t){GY(t,!0);let n=$(t,`customTranslations`,19,()=>({}
445)),r=$(t,`skipSuccessPage`,3,!1),i=$(t,`hideBackButton`,3,!1),a=N1(new h0(n(),t.selectedLocale,t.defaultLocale)),o=N1(t.brandingInfo?.appearance??null);WY(r0,a),WY(c6,o),WY(s6,t.eventsTracker);let s=CZ(!1),c=CZ(null),l=CZ(null),u=CZ(`waiting`),d=CZ(!1),f=CZ(null),p=W(()=>Y(f)?.paddle_billing_params.inline_checkout_enabled??!1),m=CZ(null),h=e=>{G(m,e,!0)},g=Lve(t.brandingInfo?.appearance?.color_page_bg??`#ffffff`)?`light`:`dark`;$Z(()=>{Y(u)===`success`&&Y(c)&&r()&&t.onFinished(Y(c))});let _=()=>{Y(u)===`success`&&Y(c)&&t.onFinished(Y(c))},v=()=>{t.paddleService.closeCheckout(),t.onClose()},y=()=>{t.onError(Y(l)??new n0(t0.UnknownError,`Unknown error without state set.`)),t.unmountPaddlePurchaseUi()},b=null,x=null,S=null;j$(async()=>{t.isInElement||(b=document.documentElement.style.height,x=document.documentElement.style.overflow,S=document.body.style.height,document.documentElement.style.height=`100%`,document.body.style.height=`100%`,document.documentElement.style.overflow=`hidden`);let e=()=>{G(u,`loading`)},n=()=>{G(d,!0),G(u,`loading`)},i={offeringIdentifier:t.productDetails.presentedOfferingContext.offeringIdentifier,targetingContext:null,placementIdentifier:null},a;try{a=await t.paddleService.startCheckout({appUserId:t.appUserId,productId:t.productDetails.identifier,presentedOfferingContext:i,purchaseOption:t.purchaseOption,customerEmail:t.customerEmail,metadata:t.metadata,locale:t.selectedLocale,attributionMetadata:t.attributionMetadata,workflowPurchaseContext:t.workflowPurchaseContext}),G(f,a,!0),G(s,a.paddle_billing_params.is_sandbox,!0),Y(p)&&await YQ()}catch(e){let n=n5(e,`Start Paddle checkout failed: ${e}`);G(l,n,!0),G(u,`error`),t.onError(n);return}try{let i=await t.paddleService.purchase({operationSessionId:a.operation_session_id,transactionId:a.paddle_billing_params?.transaction_id,onCheckoutLoaded:e,onClose:t.onClose,params:{rcPackage:t.rcPackage,purchaseOption:t.purchaseOption,appUserId:t.appUserId,presentedOfferingIdentifier:t.productDetails.presentedOfferingContext.offeringIdentifier,customerEmail:t.customerEmail,locale:t.selectedLocale||t.defaultLocale},...Y(p)&&{displayMode:`inline`,theme:g,onCheckoutTotals:h,onCheckoutCompleted:n}});r()?t.onFinished(i):(G(c,i,!0),G(u,`success`))}catch(e){let n=n5(e,`Paddle purchase failed: ${e}`);G(l,n,!0),G(u,`error`),t.onError(n)}}),M$(()=>{if(!t.isInElement){let e=(e,t,n)=>{n===``?e.style.removeProperty(t):e.style.setProperty(t,n)};e(document.documentElement,`height`,b),e(document.body,`height`,S),e(document.documentElement,`overflow`,x)}});var C=m$(),w=BZ(C),T=e=>{FSe(e,{get brandingInfo(){return t.brandingInfo},get isSandbox(){return Y(s)},get isInElement(){return t.isInElement},onClose:v,get hideBackButton(){return i()},get productDetails(){return t.productDetails},get purchaseOption(){return t.purchaseOption},get totals(){return Y(m)},get currentPage(){return Y(u)},get checkoutCompleted(){return Y(d)},get lastError(){return Y(l)},onContinue:_,closeWithError:y})},E=e=>{var n=m$(),r=BZ(n),i=e=>{bSe(e,{get currentPage(){return Y(u)},get brandingInfo(){return t.brandingInfo},get productDetails(){return t.productDetails},get isSandbox(){return Y(s)},get lastError(){return Y(l)},get isInElement(){return t.isInElement},onContinue:_,closeWithError:y})};Q(r,e=>{Y(u)!==`waiting`&&e(i)},!0),Z(e,n)};Q(w,e=>{Y(p)?e(T):e(E,!1)}),Z(e,C),KY()}var LSe=X(`<div class="stripe-checkout-container svelte-1kxsl49" data-testid="stripe-checkout-container"><div class="stripe-checkout-mount svelte-1kxsl49" data-testid="stripe-checkout-mount"></div></div>`),RSe={hash:`svelte-1kxsl49`,code:`.stripe-checkout-container.svelte-1kxsl49 {width:100%;min-height:400px;display:flex;flex-direction:column;}.stripe-checkout-mount.svelte-1kxsl49 {width:100%;flex:1;}`};function zSe(e,t){GY(t,!0),J$(e,RSe);let n,r=null;async function i(){try{t.onContinue()}catch(e){t.onError(e instanceof n0?e:new n0(t0.ErrorSettingUpPurchase,e instanceof Error?e.message:`Failed to complete checkout`))}}j$(async()=>{try{let e=t.stripeBillingParams.publishable_api_key,a=t.stripeBillingParams.stripe_account_id,{embeddedCheckout:o}=await b8.initializeStripeCheckout(a,e,t.stripeBillingParams,i);
445r=o,n&&o.mount(n)}catch(e){t.onError(e instanceof Error?new n0(t0.ErrorSettingUpPurchase,e.message):new n0(t0.ErrorSettingUpPurchase,`Failed to initialize Stripe Checkout`))}}),M$(()=>{r&&=(r.destroy(),null)});var a=LSe();E1(K(a),e=>n=e,()=>n),Z(e,a),KY()}var BSe=X(`<div class="stripe-checkout-wrapper svelte-zapbpj"><!></div>`),VSe=X(`<!> <!>`,1),HSe=X(`<!> <!>`,1),USe=X(`<div class="rcb-ui-loading-container svelte-zapbpj"><!></div>`),WSe={hash:`svelte-zapbpj`,code:`.rcb-ui-loading-container.svelte-zapbpj {display:flex;flex-direction:column;align-items:center;}.stripe-checkout-wrapper.svelte-zapbpj {width:100%;min-height:100%;display:flex;flex-direction:column;overflow:hidden auto;} 446 447 /* 991px is the breakpoint for the mobile layout in Stripe Checkout */ 448 @media (min-width: 991px) {.stripe-checkout-wrapper.svelte-zapbpj {justify-content:center;align-items:center;} 449 }`};function GSe(e,t){GY(t,!0),J$(e,WSe);let n=()=>R1(o,`$brandingAppearanceStore`,i),r=()=>R1(u,`$translator`,i),[i,a]=B1(),o=UY(c6),s=W(()=>n()??void 0),c=W(()=>new g8(Y(s)).pageStyleVars),l=W(()=>d8(Y(s)).background),u=UY(r0);r5(e,{get brandingInfo(){return t.brandingInfo},get isInElement(){return t.isInElement},get isSandbox(){return t.isSandbox},mainContent:e=>{var n=m$(),i=BZ(n),a=e=>{var n=m$(),r=BZ(n),i=e=>{var n=BSe();zSe(K(n),{get stripeBillingParams(){return t.stripeBillingParams},get onContinue(){return t.onContinue},get onError(){return t.onError}}),J(()=>n1(n,`${Y(c)??``}; background-color: ${Y(l)??``}`)),Z(e,n)};Q(r,e=>{t.stripeBillingParams&&e(i)}),Z(e,n)},o=e=>{var n=m$(),i=BZ(n),a=e=>{var n=USe();a6(K(n),{gap:`medium`,align:`center`,children:(e,n)=>{var i=HSe(),a=BZ(i);M6(a,{color:`var(--rc-color-grey-text-dark)`});var o=q(a,2),s=e=>{var t=VSe(),n=BZ(t);o6(n,{size:`heading-md`,children:(e,t)=>{var n=p$();J(e=>_$(n,e),[()=>r().translate(a0.LoadingPageProcessingPayment)]),Z(e,n)},$$slots:{default:!0}}),o6(q(n,2),{size:`body-small`,children:(e,t)=>{var n=p$();J(e=>_$(n,e),[()=>r().translate(a0.LoadingPageKeepPageOpen)]),Z(e,n)},$$slots:{default:!0}}),Z(e,t)};Q(o,e=>{t.currentPage===`purchasing`&&e(s)}),Z(e,i)},$$slots:{default:!0}}),Z(e,n)},o=e=>{var n=m$(),r=BZ(n),i=e=>{P8(e,{get onContinue(){return t.onContinue},fullWidth:!0})},a=e=>{var n=m$(),r=BZ(n),i=e=>{{let n=W(()=>t.brandingInfo?.support_email??null),r=W(()=>t.brandingInfo?.app_name??null);N8(e,{get lastError(){return t.lastError},get productDetails(){return t.productDetails},get supportEmail(){return Y(n)},get onDismiss(){return t.closeWithError},get appName(){return Y(r)},fullWidth:!0})}};Q(r,e=>{t.currentPage===`error`&&e(i)},!0),Z(e,n)};Q(r,e=>{t.currentPage===`success`?e(i):e(a,!1)},!0),Z(e,n)};Q(i,e=>{t.currentPage===`loading`||t.currentPage===`purchasing`?e(a):e(o,!1)},!0),Z(e,n)};Q(i,e=>{t.currentPage===`stripe-checkout`?e(a):e(o,!1)}),Z(e,n)},$$slots:{mainContent:!0}}),KY(),a()}function KSe(e,t){GY(t,!0);let n=$(t,`customTranslations`,19,()=>({}
449)),r=$(t,`skipSuccessPage`,3,!1),i=t.rcPackage.webBillingProduct;WY(r0,N1(new h0(n(),t.selectedLocale,t.defaultLocale))),WY(s6,t.eventsTracker),WY(c6,N1(t.brandingInfo?.appearance??null));let a=CZ(!1),o=CZ(null),s=CZ(null),c=CZ(`loading`),l=CZ(null),u=()=>{if(Y(c)===`stripe-checkout`){G(c,`purchasing`),t.purchaseOperationHelper.pollCurrentPurchaseForCompletion().then(e=>{G(o,e,!0),r()?t.onFinished(e):G(c,`success`)}).catch(e=>{d(n5(e,`Failed to complete purchase`))});return}Y(c)===`success`&&Y(o)&&t.onFinished(Y(o))},d=e=>{G(s,e,!0),G(c,`error`)},f=()=>{t.onError(Y(s)??new n0(t0.UnknownError,`Unknown error without state set.`))},p=null,m=null,h=null;j$(async()=>{t.isInElement||(p=document.documentElement.style.height,m=document.documentElement.style.overflow,h=document.body.style.height,document.documentElement.style.height=`100%`,document.body.style.height=`100%`,document.documentElement.style.overflow=`hidden`);let e=i.identifier;if(!e){d(new n0(t0.ErrorSettingUpPurchase,`Product ID was not set before purchase.`));return}let n=t.customerEmail;n&&G8(n)&&(n=void 0);try{let r=await t.purchaseOperationHelper.checkoutStart({appUserId:t.appUserId,productId:e,purchaseOption:t.purchaseOption,presentedOfferingContext:t.rcPackage.webBillingProduct.presentedOfferingContext,customerEmail:n,metadata:t.metadata,workflowPurchaseContext:t.workflowPurchaseContext,attributionMetadata:t.attributionMetadata,paywallId:t.paywallId,paywallSessionId:t.paywallSessionId,locale:t.selectedLocale});if(!r.stripe_billing_params){d(new n0(t0.ErrorSettingUpPurchase,`Missing Stripe Checkout parameters`));return}G(a,r.stripe_billing_params.environment.toLowerCase()===`sandbox`),G(l,r.stripe_billing_params,!0),G(c,`stripe-checkout`)}catch(e){d(n5(e,`Failed to start Stripe Checkout`))}}),M$(()=>{if(!t.isInElement){let e=(e,t,n)=>{n===``?e.style.removeProperty(t):e.style.setProperty(t,n)};e(document.documentElement,`height`,p),e(document.body,`height`,h),e(document.documentElement,`overflow`,m)}}),GSe(e,{get currentPage(){return Y(c)},get brandingInfo(){return t.brandingInfo},get productDetails(){return i},get isSandbox(){return Y(a)},get lastError(){return Y(s)},get isInElement(){return t.isInElement},get stripeBillingParams(){return Y(l)},onContinue:u,onError:d,closeWithError:f}),KY()}function i5(e){return e==null?!0:new Date(e)>new Date}function qSe(e,t,n,r){let i=t.product_identifier;if(i in n)return JSe(e,t,n[i]);if(i in r)return YSe(e,t,r[i]);throw new K1(U1.CustomerInfoError,`Could not find entitlement product in subscriptions or non-subscriptions.`)}function JSe(e,t,n){return{identifier:e,isActive:i5(t.expires_date),willRenew:s5(t.expires_date,n),store:n?.store??`unknown`,latestPurchaseDate:new Date(t.purchase_date),originalPurchaseDate:new Date(t.purchase_date),expirationDate:a5(t.expires_date),productIdentifier:t.product_identifier,productPlanIdentifier:t.product_plan_identifier??null,unsubscribeDetectedAt:a5(n?.unsubscribe_detected_at),billingIssueDetectedAt:a5(n?.billing_issues_detected_at),isSandbox:n?.is_sandbox??!1,periodType:n?.period_type??`normal`,ownershipType:n?.ownership_type??`UNKNOWN`}}function YSe(e,t,n){return{identifier:e,isActive:!0,willRenew:!1,store:n.store,latestPurchaseDate:new Date(t.purchase_date),originalPurchaseDate:new Date(n.original_purchase_date),expirationDate:null,productIdentifier:t.product_identifier,productPlanIdentifier:null,unsubscribeDetectedAt:null,billingIssueDetectedAt:null,isSandbox:n.is_sandbox,periodType:`normal`,ownershipType:`UNKNOWN`}}function XSe(e,t,n){let r={},i={};for(let a in e){let o=qSe(a,e[a],t,n);r[a]=o,o.isActive&&(i[a]=o)}return{all:r,active:i}}function a5(e){return e==null?null:new Date(e)}function ZSe(e){if(!e)return null;let t=e.amount*1e6;return{amount:e.amount*100,amountMicros:t,currency:e.currency,formattedPrice:f0(t,e.currency)}}function o5(e){let t=$Se(e),n=e.subscriber,r=tCe(n.non_subscriptions),i=Object.entries(e.subscriber.non_subscriptions).flatMap(([e,t])=>t.map(t=>({transactionIdentifier:t.id,productIdentifier:e,purchaseDate:new Date(t.purchase_date||t.original_purchase_date),storeTransactionId:t.store_transaction_id||null,store:t.store}))),a=new Date(e.request_date),o=Object.fromEntries(Object.entries(e.subscriber.subscriptions).map(([e,t])=>[e,{productIdentifier:e,productPlanIdentifier:t.product_plan_identifier??null,purchaseDate:new Date(t.purchase_date),originalPurchaseDate:a5(t.original_purchase_date),expiresDate:a5(t.expires_date),store:t.store,unsubscribeDetectedAt:a5(t.unsubscribe_detected_at),isSandbox:t.is_sandbox,billingIssuesDetectedAt:a5(t.billing_issues_detected_at),gracePeriodExpiresDate:a5(t.grace_peri
449od_expires_date),ownershipType:t.ownership_type??`UNKNOWN`,periodType:t.period_type,refundedAt:a5(t.refunded_at),storeTransactionId:t.store_transaction_id||null,managementURL:t.management_url??null,isActive:i5(t.expires_date),willRenew:s5(t.expires_date,t),displayName:t.display_name??null,autoResumeDate:a5(t.auto_resume_date),price:ZSe(t.price)}]));return{entitlements:XSe(n.entitlements,n.subscriptions,r),allExpirationDatesByProduct:t,allPurchaseDatesByProduct:QSe(e,r),activeSubscriptions:eCe(t),managementURL:n.management_url,requestDate:a,firstSeenDate:new Date(n.first_seen),originalPurchaseDate:a5(n.original_purchase_date),originalAppUserId:e.subscriber.original_app_user_id,nonSubscriptionTransactions:i,subscriptionsByProductIdentifier:o}}function s5(e,t){if(t==null)return!1;let n=t.store==`promotional`,r=e==null,i=t.unsubscribe_detected_at!=null,a=t.billing_issues_detected_at!=null;return!(n||r||i||a)}function QSe(e,t){let n={};for(let t in e.subscriber.subscriptions){let r=e.subscriber.subscriptions[t];n[t]=new Date(r.purchase_date)}for(let e in t){let r=t[e].purchase_date;r==null?n[e]=null:n[e]=new Date(r)}return n}function $Se(e){let t={};for(let n in e.subscriber.subscriptions){let r=e.subscriber.subscriptions[n];r.expires_date==null?t[n]=null:t[n]=new Date(r.expires_date)}return t}function eCe(e){let t=new Set,n=new Date;for(let r in e){let i=e[r];(i==null||i>n)&&t.add(r)}return t}function tCe(e){let t={};for(let n in e){if(e[n].length===0)continue;let r=e[n].length;t[n]=e[n][r-1]}return t}var c5=`1.48.1`,nCe=`https://api.revenuecat.com`,rCe=`https://e.revenue.cat`,l5;(function(e){e[e.CONTINUE=100]=`CONTINUE`,e[e.SWITCHING_PROTOCOLS=101]=`SWITCHING_PROTOCOLS`,e[e.PROCESSING=102]=`PROCESSING`,e[e.EARLY_HINTS=103]=`EARLY_HINTS`,e[e.OK=200]=`OK`,e[e.CREATED=201]=`CREATED`,e[e.ACCEPTED=202]=`ACCEPTED`,e[e.NON_AUTHORITATIVE_INFORMATION=203]=`NON_AUTHORITATIVE_INFORMATION`,e[e.NO_CONTENT=204]=`NO_CONTENT`,e[e.RESET_CONTENT=205]=`RESET_CONTENT`,e[e.PARTIAL_CONTENT=206]=`PARTIAL_CONTENT`,e[e.MULTI_STATUS=207]=`MULTI_STATUS`,e[e.MULTIPLE_CHOICES=300]=`MULTIPLE_CHOICES`,e[e.MOVED_PERMANENTLY=301]=`MOVED_PERMANENTLY`,e[e.MOVED_TEMPORARILY=302]=`MOVED_TEMPORARILY`,e[e.SEE_OTHER=303]=`SEE_OTHER`,e[e.NOT_MODIFIED=304]=`NOT_MODIFIED`,e[e.USE_PROXY=305]=`USE_PROXY`,e[e.TEMPORARY_REDIRECT=307]=`TEMPORARY_REDIRECT`,e[e.PERMANENT_REDIRECT=308]=`PERMANENT_REDIRECT`,e[e.BAD_REQUEST=400]=`BAD_REQUEST`,e[e.UNAUTHORIZED=401]=`UNAUTHORIZED`,e[e.PAYMENT_REQUIRED=402]=`PAYMENT_REQUIRED`,e[e.FORBIDDEN=403]=`FORBIDDEN`,e[e.NOT_FOUND=404]=`NOT_FOUND`,e[e.METHOD_NOT_ALLOWED=405]=`METHOD_NOT_ALLOWED`,e[e.NOT_ACCEPTABLE=406]=`NOT_ACCEPTABLE`,e[e.PROXY_AUTHENTICATION_REQUIRED=407]=`PROXY_AUTHENTICATION_REQUIRED`,e[e.REQUEST_TIMEOUT=408]=`REQUEST_TIMEOUT`,e[e.CONFLICT=409]=`CONFLICT`,e[e.GONE=410]=`GONE`,e[e.LENGTH_REQUIRED=411]=`LENGTH_REQUIRED`,e[e.PRECONDITION_FAILED=412]=`PRECONDITION_FAILED`,e[e.REQUEST_TOO_LONG=413]=`REQUEST_TOO_LONG`,e[e.REQUEST_URI_TOO_LONG=414]=`REQUEST_URI_TOO_LONG`,e[e.UNSUPPORTED_MEDIA_TYPE=415]=`UNSUPPORTED_MEDIA_TYPE`,e[e.REQUESTED_RANGE_NOT_SATISFIABLE=416]=`REQUESTED_RANGE_NOT_SATISFIABLE`,e[e.EXPECTATION_FAILED=417]=`EXPECTATION_FAILED`,e[e.IM_A_TEAPOT=418]=`IM_A_TEAPOT`,e[e.INSUFFICIENT_SPACE_ON_RESOURCE=419]=`INSUFFICIENT_SPACE_ON_RESOURCE`,e[e.METHOD_FAILURE=420]=`METHOD_FAILURE`,e[e.MISDIRECTED_REQUEST=421]=`MISDIRECTED_REQUEST`,e[e.UNPROCESSABLE_ENTITY=422]=`UNPROCESSABLE_ENTITY`,e[e.LOCKED=423]=`LOCKED`,e[e.FAILED_DEPENDENCY=424]=`FAILED_DEPENDENCY`,e[e.UPGRADE_REQUIRED=426]=`UPGRADE_REQUIRED`,e[e.PRECONDITION_REQUIRED=428]=`PRECONDITION_REQUIRED`,e[e.TOO_MANY_REQUESTS=429]=`TOO_MANY_REQUESTS`,e[e.REQUEST_HEADER_FIELDS_TOO_LARGE=431]=`REQUEST_HEADER_FIELDS_TOO_LARGE`,e[e.UNAVAILABLE_FOR_LEGAL_REASONS=451]=`UNAVAILABLE_FOR_LEGAL_REASONS`,e[e.INTERNAL_SERVER_ERROR=500]=`INTERNAL_SERVER_ERROR`,e[e.NOT_IMPLEMENTED=501]=`NOT_IMPLEMENTED`,e[e.BAD_GATEWAY=502]=`BAD_GATEWAY`,e[e.SERVICE_UNAVAILABLE=503]=`SERVICE_UNAVAILABLE`,e[e.GATEWAY_TIMEOUT=504]=`GATEWAY_TIMEOUT`,e[e.HTTP_VERSION_NOT_SUPPORTED=505]=`HTTP_VERSION_NOT_SUPPORTED`,e[e.INSUFFICIENT_STORAGE=507]=`INSUFFICIENT_STORAGE`,e[e.NETWORK_AUTHENTICATION_REQUIRED=511]=`NETWORK_AUTHENTICATION_REQUIRED`})(l5||={});var iCe=/^rcb_[a-zA-Z0-9_.-]+$/,aCe=/^pdl_[a-zA-Z0-9_.-]+$/,oCe=/^test_[a-zA-Z0-9_.-]+$/,sCe=/^strp_[a-zA-Z0-9_.-]+$/;function u5(e){return e?e.startsWith(`rcb_sb_`):!1}function d5(e){return e?iCe.test(e):!1}function f5(e){return e?aCe.test(e):!1}function p5(e){return e?sCe.test(e):!1}function m5(e){return e?oCe.test(e):!1}async function h5(e,t,n){return(await g5(e,t,n)).data}async function g5(e,t,n){let{apiKey:r,body:i,headers:a,httpConfig:o}=t,s=`${o?.proxyURL??nCe}${e.urlPath()}`;try{let t=await fetch(s,{method:e.method,headers:E5(r,a,o?.additionalHeaders),body:lCe(i),signal:n});await cCe(t,e);let c=t.status;return{data:await t.json(),statusCode:c}}catch(e){throw e instanceof TypeError?new K1(U1.NetworkError,W1.getPublicMessage(U1.NetworkError),e.message):e}}async function cCe(e,t){let n=e.status;if(n>=l5.INTERNAL_SERVER_ERROR)_5(t,n,await e.text());else if(n>=l5.BAD_REQUEST){let r=await e.json(),i=r?JSON.stringify(r):null,a=r?.code,o=r?.message;if(a!=null){let e=W1.convertCodeToBackendErrorCode(a);if(e==null)_5(t,n,i,a);else throw K1.getForBackendError(e,o)}else _5(t,n,i)}}
449function _5(e,t,n,r){throw new K1(U1.UnknownBackendError,`Unknown backend error.`,`Request: ${e.name}. Status code: ${t}. Body: ${n}.`,{backendErrorCode:r})}function lCe(e){return e==null?null:JSON.stringify(e)}var v5=`Authorization`,y5=`Content-Type`,b5=`Accept`,x5=`X-Platform`,S5=`X-Version`,C5=`X-Platform-Flavor`,w5=`X-Platform-Flavor-Version`,T5=`X-Is-Sandbox`,uCe=new Set([v5,y5,b5,x5,S5,T5,C5,w5]);function E5(e,t,n){let r={[v5]:`Bearer ${e}`,[y5]:`application/json`,[b5]:`application/json`,[x5]:`web`,[S5]:c5,[T5]:`${u5(e)}`},i=h7.getPlatformInfo();if(i){let e={[C5]:i.flavor,[w5]:i.version};r={...r,...e}}return t&&(r={...r,...t}),n&&(r={...n,...r}),r}var D5=`/v1/subscribers`,O5=`/rcbilling/v1`,dCe=class{constructor(e){aJ(this,`appUserId`),aJ(this,`method`,`GET`),aJ(this,`name`,`getOfferings`),this.appUserId=e}urlPath(){return`${D5}/${encodeURIComponent(this.appUserId)}/offerings`}},fCe=class{constructor(e,t,n,r){aJ(this,`method`,`GET`),aJ(this,`name`,`getProducts`),aJ(this,`appUserId`),aJ(this,`productIds`),aJ(this,`currency`),aJ(this,`discountCode`),this.appUserId=e,this.productIds=t,this.currency=n,this.discountCode=r}urlPath(){return`${O5}/subscribers/${encodeURIComponent(this.appUserId)}/products?id=${this.productIds.map(encodeURIComponent).join(`&id=`)}${this.currency?`¤cy=${this.currency}`:``}${this.discountCode?`&discount_code=${encodeURIComponent(this.discountCode)}`:``}`}},pCe=class{constructor(e){aJ(this,`method`,`GET`),aJ(this,`name`,`getCustomerInfo`),aJ(this,`appUserId`),this.appUserId=e}urlPath(){return`${D5}/${encodeURIComponent(this.appUserId)}`}},mCe=class{constructor(){aJ(this,`method`,`POST`),aJ(this,`name`,`identify`)}urlPath(){return`${D5}/identify`}},hCe=class{constructor(){aJ(this,`method`,`GET`),aJ(this,`name`,`getBrandingInfo`)}urlPath(){return`${O5}/branding`}},gCe=class{constructor(){aJ(this,`method`,`POST`),aJ(this,`name`,`postCheckoutPrepare`)}urlPath(){return`${O5}/checkout/prepare`}},_Ce=class{constructor(){aJ(this,`method`,`POST`),aJ(this,`name`,`postCheckoutStart`)}urlPath(){return`${O5}/checkout/start`}},vCe=class{constructor(e){aJ(this,`method`,`PATCH`),aJ(this,`name`,`patchCheckoutRefreshPricing`),aJ(this,`operationSessionId`),this.operationSessionId=e}urlPath(){return`${O5}/checkout/${this.operationSessionId}`}},yCe=class{constructor(e){aJ(this,`method`,`POST`),aJ(this,`name`,`postCheckoutComplete`),aJ(this,`operationSessionId`),this.operationSessionId=e}urlPath(){return`${O5}/checkout/${this.operationSessionId}/complete`}},bCe=class{constructor(e){aJ(this,`method`,`GET`),aJ(this,`name`,`getCheckoutStatus`),aJ(this,`operationSessionId`),this.operationSessionId=e}urlPath(){return`${O5}/checkout/${this.operationSessionId}`}},xCe=class{constructor(e){aJ(this,`method`,`POST`),aJ(this,`name`,`setAttributes`),aJ(this,`appUserId`),this.appUserId=e}urlPath(){return`${D5}/${encodeURIComponent(this.appUserId)}/attributes`}},SCe=class{constructor(){aJ(this,`method`,`POST`),aJ(this,`name`,`postReceipt`)}urlPath(){return`/v1/receipts`}},CCe=class{constructor(e){aJ(this,`method`,`GET`),aJ(this,`name`,`getVirtualCurrencies`),aJ(this,`appUserId`),this.appUserId=e}urlPath(){return`${D5}/${encodeURIComponent(this.appUserId)}/virtual_currencies`}},wCe=class{constructor(e){aJ(this,`method`,`GET`),aJ(this,`name`,`getWorkflows`),aJ(this,`appUserId`),this.appUserId=e}urlPath(){return`${D5}/${encodeURIComponent(this.appUserId)}/workflows?type=paywall`}},TCe=class{constructor(e,t){aJ(this,`method`,`GET`),aJ(this,`name`,`getWorkflowData`),aJ(this,`appUserId`),aJ(this,`workflowId`),this.appUserId=e,this.workflowId=t}urlPath(){return`${D5}/${encodeURIComponent(this.appUserId)}/workflows/${encodeURIComponent(this.workflowId)}`}},k5={},ECe=class{constructor(e,t=k5,n){aJ(this,`API_KEY`),aJ(this,`httpConfig`),aJ(this,`isSandbox`),aJ(this,`purchasesContext`),this.API_KEY=e,this.httpConfig=t,this.isSandbox=u5(e),this.purchasesContext=n}getIsSandbox(){return this.isSandbox}async getOfferings(e){return await h5(new dCe(e),{apiKey:this.API_KEY,httpConfig:this.httpConfig})}async getCustomerInfo(e){return await h5(new pCe(e),{apiKey:this.API_KEY,httpConfig:this.httpConfig})}async identify(e,t){let n={app_user_id:e,new_app_user_id:t},r=await g5(new mCe,{apiKey:this.API_KEY,body:n,httpConfig:this.httpConfig}),i=r.statusCode===201;return{...r.data,was_created:i}}async getProducts(e,t,n,r){return await h5(new fCe(e,t,n,r),{apiKey:this.API_KEY,httpConfig:this.httpConfig})}async getBrandingInfo(){return await h5(new hCe,{apiKey:this.API_KEY,httpConfig:this.httpConfig})}async postCheckoutPrepare(e,t){let n={product_id:e,price_id:t.priceId};return t.id!==`base_option`&&(n.offer_id=t.id),await h5(new gCe,{apiKey:this.API_KEY,body:n,httpConfig:this.httpConfig})}async postCheckoutStart({appUserId:e,productId:t,purchaseOption:n,presentedOfferingContext:r,traceId:i,presentedStepId:a,urlParameters:o,paywallId:s,paywallSessionId:c,customerEmail:l,metadata:u,locale:d,attributionMetadata:f}){var p;let m={app_user_id:e,product_id:t,email:l,price_id:n.priceId,presented_offering_identifier:r.offeringIdentifier,trace_id:i};return u&&(m.metadata=u),n.id!==`base_option`&&(m.offer_id=n.id),r.targetingContext&&(m.applied_targeting_rule={rule_id:r.targetingContext.ruleId,revision:r.targetingContext.revision}),r.placementIdentifier&&(m.presented_placement_identifier=r.placementIdentifier),(p=this.purchasesContext?.workflowContext)!=null&&p.workflowIdentifier&&(m.presented_workflow_id=this.purchasesContext.workflowContext.workflowIdentifier),a&&(m.presented_step_i
449d=a),o&&Object.keys(o).length>0&&(m.url_parameters=o),s&&(m.paywall={paywall_id:s,...c?{paywall_session_id:c}:{}}),d&&(m.locale=d),f&&(m.attribution_metadata=f),await h5(new _Ce,{apiKey:this.API_KEY,body:m,httpConfig:this.httpConfig})}async patchCheckoutRefreshPricing(e,{countryCode:t,postalCode:n,state:r,city:i,addressLine1:a,addressLine2:o,discountCode:s,signal:c}={}){let l={country_code:t,postal_code:n,state:r,city:i,address_line1:a,address_line2:o,discount_code:s};return await h5(new vCe(e),{apiKey:this.API_KEY,body:l,httpConfig:this.httpConfig},c)}async postCheckoutComplete(e,t,n){let r={email:t};return n&&(r.locale=n),await h5(new yCe(e),{apiKey:this.API_KEY,body:r,httpConfig:this.httpConfig})}async getCheckoutStatus(e){return await h5(new bCe(e),{apiKey:this.API_KEY,httpConfig:this.httpConfig})}async setAttributes(e,t){let n=Date.now(),r={};for(let[e,i]of Object.entries(t))r[e]={value:i,updated_at_ms:n};let i={attributes:r};return await h5(new xCe(e),{apiKey:this.API_KEY,body:i,httpConfig:this.httpConfig})}async postReceipt(e,t,n,r,i,a,o){let s=null;i.targetingContext&&(s={rule_id:i.targetingContext.ruleId,revision:i.targetingContext.revision});let c={fetch_token:r,product_id:t,currency:n,app_user_id:e,presented_offering_identifier:i.offeringIdentifier,presented_placement_identifier:i.placementIdentifier,presented_workflow_id:this.purchasesContext?.workflowContext?.workflowIdentifier,applied_targeting_rule:s,initiation_source:a};return o&&(c.paywall={paywall_id:o}),await h5(new SCe,{apiKey:this.API_KEY,body:c,httpConfig:this.httpConfig})}async getVirtualCurrencies(e){return await h5(new CCe(e),{apiKey:this.API_KEY,httpConfig:this.httpConfig})}async getWorkflows(e){return await h5(new wCe(e),{apiKey:this.API_KEY,httpConfig:this.httpConfig})}async getWorkflowById(e,t){let n=await h5(new TCe(e,t),{apiKey:this.API_KEY,httpConfig:this.httpConfig});if(!(`action`in n))return n;if(n.action===`inline`)return n.data;if(n.action!==`use_cdn`)throw Error(`Unexpected workflow action: ${n.action}`);let r=await fetch(n.url);if(!r.ok)throw Error(`Failed to fetch workflow from CDN: ${r.statusText}`);return await r.json()}};function DCe(e){if(!(d5(e)||m5(e)||f5(e)||p5(e)))throw new K1(U1.InvalidCredentialsError,`Invalid API key. Use your Web Billing API key.`)}function A5(e){if(!e||new Set([`no_user`,`null`,`none`,`nil`,`(null)`,`NaN`,`\\x00`,``,`unidentified`,`undefined`,`unknown`]).has(e)||e.includes(`/`))throw new K1(U1.InvalidAppUserIdError,`Provided user id: "`+(e??`[Not provided]`)+`" is not valid. See https://www.revenuecat.com/docs/customers/user-ids#tips-for-setting-app-user-ids for more information.`)}function OCe(e){if(e!=null&&e.endsWith(`/`))throw new K1(U1.ConfigurationError,`Invalid proxy URL. The proxy URL should not end with a trailing slash.`)}function kCe(e){if(e){for(let t in e)if(uCe.has(t))throw new K1(U1.ConfigurationError,`Invalid additional headers. Some headers are reserved for internal use.`)}}var j5=(e=>(e.Current=`current`,e))(j5||{});function M5(e,t){async function n(...t){return await this.preload(),await e.call(this,...t)}return n}var N5=(e,t)=>{let n={...e.webBillingProduct,presentedOfferingContext:{...e.webBillingProduct.presentedOfferingContext,placementIdentifier:t}};return{...e,webBillingProduct:n,rcBillingProduct:n}},P5=(e,t)=>e==null?null:N5(e,t),ACe=(e,t,n)=>{let r=e.offering_ids_by_placement??{},i=e.fallback_offering_id,a;if(n in r){let e=r[n]??null;e&&(a=t[e])}if(!a&&i&&i in t&&(a=t[i]),!a)return null;let o=Object.fromEntries(Object.entries(a.packagesById).map(([e,t])=>[e,N5(t,n)]));return{...a,packagesById:o,availablePackages:Object.values(o),weekly:P5(a.weekly,n),monthly:P5(a.monthly,n),twoMonth:P5(a.twoMonth,n),threeMonth:P5(a.threeMonth,n),sixMonth:P5(a.sixMonth,n),annual:P5(a.annual,n),lifetime:P5(a.lifetime,n)}};function jCe(e,t){let n={};t.product_details.forEach(e=>{n[e.identifier]=e});let r={};e.offerings.forEach(t=>{let i=Dfe(t.identifier===e.current_offering_id,t,n,e.targeting,e.ui_config);i!=null&&(r[t.identifier]=i)});let i=e.current_offering_id?r[e.current_offering_id]??null:null;return Object.keys(r).length==0&&X1.debugLog(`Empty offerings. Please make sure you've configured offerings correctly in the RevenueCat dashboard and that the products are properly configured.`),{all:r,current:i}}var MCe=1000001;function F5(e,t,n){return n.formatPrice(d0(e,t),t)}function NCe(e,t,n){let r=n.formatPrice(e.amountMicros,e.currency);return t?t.unit===o0.Year?F5(e.amountMicros/p6/t.number,e.currency,n):t.unit===o0.Month?F5(e.amountMicros/f6/t.number,e.currency,n):t.unit===o0.Week?F5(e.amountMicros/d6/t.number,e.currency,n):t.unit===o0.Day?F5(e.amountMicros/t.
449number,e.currency,n):r:r}function PCe(e,t,n){let r=n.formatPrice(e.amountMicros,e.currency);return t?t.unit===o0.Year?F5(e.amountMicros/h6/t.number,e.currency,n):t.unit===o0.Month?F5(e.amountMicros/m6/t.number,e.currency,n):t.unit===o0.Week?F5(e.amountMicros/t.number,e.currency,n):t.unit===o0.Day?F5(e.amountMicros*d6/t.number,e.currency,n):r:r}function FCe(e,t,n){return t?t.unit===o0.Year?F5(e.amountMicros/g6,e.currency,n):t.unit===o0.Month?F5(e.amountMicros/t.number,e.currency,n):t.unit===o0.Week?F5(e.amountMicros*m6/t.number,e.currency,n):t.unit===o0.Day?F5(e.amountMicros*f6/t.number,e.currency,n):F5(e.amountMicros/(t.number||1),e.currency,n):n.formatPrice(e.amountMicros,e.currency)}function ICe(e,t,n){let r=n.formatPrice(e.amountMicros,e.currency);return t?t.unit===o0.Year?F5(e.amountMicros/t.number,e.currency,n):t.unit===o0.Month?F5(e.amountMicros*g6/t.number,e.currency,n):t.unit===o0.Week?F5(e.amountMicros*h6/t.number,e.currency,n):t.unit===o0.Day?F5(e.amountMicros*p6/t.number,e.currency,n):r:r}function I5(e,t,n){return{pricePerDay:NCe(e,t,n),pricePerWeek:PCe(e,t,n),pricePerMonth:FCe(e,t,n),pricePerYear:ICe(e,t,n)}}function LCe(e){return e.cycleCount>0?e.cycleCount:1}function RCe(e){return`durationMode`in e&&e.durationMode===`forever`}function zCe(e){return`durationMode`in e&&e.durationMode===`time_window`}function BCe(e,t){return zCe(t)?e.base.period:t.period}function VCe(e){return e.period===null||RCe(e)?null:{number:e.period.number*LCe(e),unit:e.period.unit}}function HCe(e,t){let n=c0(new Date,e,!0);return n?t.translateDate(n,{dateStyle:`long`})??``:``}function UCe(e,t,n){let r=e.discount??e.trial??e.introPrice,i=e.trial&&!e.discount?e.introPrice:null;if(r===null)return;let a=VCe(r),o=BCe(e,r),{price:s}=r;if(s!==null){let e=I5(s,o,t);n[`product.offer_price`]=t.formatPrice(s.amountMicros,s.currency),n[`product.offer_price_per_day`]=e.pricePerDay,n[`product.offer_price_per_week`]=e.pricePerWeek,n[`product.offer_price_per_month`]=e.pricePerMonth,n[`product.offer_price_per_year`]=e.pricePerYear}if(a!==null){let e=v6(a,t);n[`product.offer_period`]=e.period,n[`product.offer_period_abbreviated`]=e.periodAbbreviated,n[`product.offer_period_with_unit`]=e.periodWithUnit,n[`product.offer_period_in_days`]=e.periodInDays,n[`product.offer_period_in_weeks`]=e.periodInWeeks,n[`product.offer_period_in_months`]=e.periodInMonths,n[`product.offer_period_in_years`]=e.periodInYears,n[`product.offer_end_date`]=HCe(a,t)}if(i!==null&&(i.price!==null&&(n[`product.secondary_offer_price`]=t.formatPrice(i.price.amountMicros,i.price.currency)),i.period!==null)){let e=v6(i.period,t);n[`product.secondary_offer_period`]=e.period,n[`product.secondary_offer_period_abbreviated`]=e.periodAbbreviated}}function WCe(e,t,n){let r=e.discount?.price??null;r!==null&&(n[`product.offer_price`]=t.formatPrice(r.amountMicros,r.currency))}function L5(e,t={}){if(t.translator)return V5(e,t.translator);let n=e.paywallComponents?.default_locale||i0;return V5(e,new h0(t.customTranslations??{},t.selectedLocale??n,t.fallbackLocale??n))}function R5(e){let t=e.webBillingProduct.price,n=z5(e),r=e.webBillingProduct.period||n?.base?.period;if(!r||!r.number||r.number<=0)return t.amountMicros;switch(r.unit){case o0.Year:return t.amountMicros/g6;case o0.Month:return t.amountMicros/r.number;case o0.Week:return t.amountMicros*m6/r.number;case o0.Day:return t.amountMicros*f6/r.number;default:return t.amountMicros/(r.number||1)}}function z5(e){return e.webBillingProduct.productType===_0.Subscription?e.webBillingProduct.defaultSubscriptionOption:e.webBillingProduct.productType===_0.NonConsumable||e.webBillingProduct.productType===_0.Consumable?e.webBillingProduct.defaultNonSubscriptionOption:e.webBillingProduct.defaultPurchaseOption}function GCe(e,t){return e===_0.Subscription&&t!=null}function KCe(e,t){return e!==_0.Subscription&&t!=null}function B5(e,t,n,r=!1){return n.translate(a0.PaywallVariablesPricePerPeriod,{formattedPrice:e,period:t.base.period?t.base.period.number===1?n.translatePeriodUnit(t.base.period.unit,{noWhitespace:!0,short:!r}):n.translatePeriod(t.base.period.number,t.base.period.unit,{noWhitespace:!0,short:!r}):``})}function V5(e,t){let n=e.availablePackages,r=n.filter(e=>e.webBillingProduct.productType===_0.Subscription),i=r.length>0?r.reduce((e,t)=>
449R5(e)>R5(t)?e:t):null;return n.reduce((e,n)=>(e[n.identifier]=qCe(n,i,t),e),{})}function qCe(e,t,n){let r=e.webBillingProduct,i=r.price,a=n.formatPrice(i.amountMicros,i.currency),o=z5(e),s=r.productType,c={"product.store_product_name":r.title,"product.price":a,"product.price_per_period":``,"product.price_per_period_abbreviated":``,"product.price_per_day":``,"product.price_per_week":``,"product.price_per_month":``,"product.price_per_year":``,"product.period":``,"product.period_abbreviated":``,"product.periodly":``,"product.period_in_days":``,"product.period_in_weeks":``,"product.period_in_months":``,"product.period_in_years":``,"product.period_with_unit":``,"product.currency_code":i.currency,"product.currency_symbol":n.formatPrice(0,i.currency).replace(`0`,``),"product.offer_price":``,"product.offer_price_per_day":``,"product.offer_price_per_week":``,"product.offer_price_per_month":``,"product.offer_price_per_year":``,"product.offer_period":``,"product.offer_period_abbreviated":``,"product.offer_period_in_days":``,"product.offer_period_in_weeks":``,"product.offer_period_in_months":``,"product.offer_period_in_years":``,"product.offer_period_with_unit":``,"product.offer_end_date":``,"product.secondary_offer_price":``,"product.secondary_offer_period":``,"product.secondary_offer_period_abbreviated":``,"product.relative_discount":``};if(GCe(s,o)){c[`product.price_per_period_abbreviated`]=B5(a,o,n),c[`product.price_per_period`]=B5(a,o,n,!0);let s=r.period||o.base.period,l=I5(i,s,n);if(c[`product.price_per_day`]=l.pricePerDay,c[`product.price_per_week`]=l.pricePerWeek,c[`product.price_per_month`]=l.pricePerMonth,c[`product.price_per_year`]=l.pricePerYear,s){let e=v6(s,n);c[`product.period`]=e.period,c[`product.period_abbreviated`]=e.periodAbbreviated,c[`product.period_with_unit`]=e.periodWithUnit,c[`product.period_in_days`]=e.periodInDays,c[`product.period_in_weeks`]=e.periodInWeeks,c[`product.period_in_months`]=e.periodInMonths,c[`product.period_in_years`]=e.periodInYears,c[`product.periodly`]=n.translatePeriodFrequency(s.number,s.unit)||``}if(t){let r=R5(e),i=R5(t),a=(i-r)*100/i;c[`product.relative_discount`]=a<1?``:n.translate(a0.PaywallVariablesSubRelativeDiscount,{discount:a.toFixed(0)})}UCe(o,n,c)}return KCe(s,o)&&(c[`product.price`]=a,c[`product.price_per_period`]=a,c[`product.price_per_period_abbreviated`]=a,c[`product.price_per_month`]=a,c[`product.period_with_unit`]=n.translate(a0.PeriodsLifetime),c[`product.period_in_months`]=n.translate(a0.PeriodsLifetime),c[`product.periodly`]=n.translate(a0.PeriodsLifetime),c[`product.price_per_week`]=``,c[`product.relative_discount`]=``,c[`product.period`]=``,c[`product.period_abbreviated`]=``,WCe(o,n,c)),c}var JCe=/(%?)(%([sdijo]))/g;function YCe(e,t){switch(t){case`s`:return e;case`d`:case`i`:return Number(e);case`j`:return JSON.stringify(e);case`o`:{if(typeof e==`string`)return e;let t=JSON.stringify(e);return t===`{}`||t===`[]`||/^\[object .+?\]$/.test(t)?e:t}}}function H5(e,...t){if(t.length===0)return e;let n=0,r=e.replace(JCe,(e,r,i,a)=>{let o=t[n],s=YCe(o,a);return r?e:(n++,s)});return n<t.length&&(r+=` ${t.slice(n).join(` `)}`),r=r.replace(/%{2,2}/g,`%`),r}var XCe=2;function ZCe(e){if(!e.stack)return;let t=e.stack.split(` 450`);t.splice(1,XCe),e.stack=t.join(` 451`)}var QCe=class extends Error{constructor(e,...t){super(e),this.message=e,this.name=`Invariant Violation`,this.message=H5(e,...t),ZCe(this)}},U5=(e,t,...n)=>{if(!e)throw new QCe(t,...n)};U5.as=(e,t,n,...r)=>{if(!t){let t=r.length===0?n:H5(n,...r),i;try{i=Reflect.construct(e,[t])}catch{i=e(t)}throw i}};var $Ce=`[MSW]`;function W5(e,...t){return`${$Ce} ${H5(e,...t)}`}function ewe(e,...t){console.warn(W5(e,...t))}function twe(e,...t){console.error(W5(e,...t))}var nwe={formatMessage:W5,warn:ewe,error:twe};function rwe(){U5(typeof URL<`u`,nwe.formatMessage(`Global "URL" class is not defined. This likely means that you're running MSW in an environment that doesn't support all Node.js standard API (e.g. React Native). If that's the case, please use an appropriate polyfill for the "URL" class, like "react-native-url-polyfill".`))}var G5=(e=>(e.HEAD=`HEAD`,e.GET=`GET`,e.POST=`POST`,e.PUT=`PUT`,e.PATCH=`PATCH`,e.OPTIONS=`OPTIONS`,e.DELETE=`DELETE`,e))(G5||{});rwe();var iwe=class{constructor(e,t,n,r){aJ(this,`initialDelay`),aJ(this,`maxDelay`),aJ(this,`jitterPercent`),aJ(this,`callback`),aJ(this,`currentDelay`),aJ(this,`timeoutId`),aJ(this,`executingCallback`,!1),aJ(this,`stopped`,!1),aJ(this,`currentFlushPromise`,null),this.initialDelay=e,this.currentDelay=e,this.maxDelay=t,this.jitterPercent=n,this.callback=r}tryFlush(){if(!this.stopped){if(this.backingOff()){X1.debugLog(`Backing off, not flushing`);return}this.clearTimeout(),this.executeCallbackWithRetries().catch(()=>{})}}start(){this.stopped=!1,this.currentDelay=this.initialDelay}stop(){this.stopped=!0,this.clearTimeout()}flushImmediately(e){return this.clearTimeout(),this.executeCallbackWithRetries(e)}async flushUntilDrain(e){let t=this.currentFlushPromise;if(t)try{await t}catch{}this.stop();try{let t=!1;for(;!t;)t=await this.flushImmediately(e)}finally{this.start()}}schedule(e){if(this.stopped||this.timeoutId!==void 0)return;let t=this.addJitter(e||this.currentDelay);this.timeoutId=setTimeout(()=>{this.timeoutId=void 0,this.executeCallbackWithRetries().catch(()=>{})},t)}backoff(){let e=this.currentDelay,t=Math.min(this.currentDelay*2,this.maxDelay);X1.debugLog(`Backing next off to ${e}ms delay`),this.clearTimeout(),this.currentDelay=t,this.schedule(e)}reset(){this.currentDelay!==this.initialDelay&&(this.clearTimeout(),this.currentDelay=this.initialDelay)}async executeCallbackWithRetries(e){if(this.executingCallback)return X1.debugLog(`Callback already running, rescheduling`),this.schedule(),!0;this.executingCallback=!0;let t;try{t=Promise.resolve(this.callback(e))}catch(e){t=Promise.reject(e)}this.currentFlushPromise=t.then(()=>{},()=>{});try{let e=await t;return this.reset(),e}catch{return this.backoff(),!0}finally{this.executingCallback=!1,this.currentFlushPromise=null}}backingOff(){return this.currentDelay>this.initialDelay}clearTimeout(){clearTimeout(this.timeoutId),this.timeoutId=void 0}
451addJitter(e){let t=e*this.jitterPercent,n=e-t,r=e+t;return Math.floor(Math.random()*(r-n+1)+n)}},awe=Object.entries({componentType:`component_type`,componentName:`component_name`,componentValue:`component_value`,componentURL:`component_url`,originIndex:`origin_index`,destinationIndex:`destination_index`,originContextName:`origin_context_name`,destinationContextName:`destination_context_name`,defaultIndex:`default_index`,originPackageId:`origin_package_id`,destinationPackageId:`destination_package_id`,defaultPackageId:`default_package_id`,originProductId:`origin_product_id`,destinationProductId:`destination_product_id`,defaultProductId:`default_product_id`,currentPackageId:`current_package_id`,resultingPackageId:`resulting_package_id`,currentProductId:`current_product_id`,resultingProductId:`resulting_product_id`}),K5=e=>e.displayMode===void 0?{}:{display_mode:e.displayMode,dark_mode:e.darkMode??!1,locale:e.locale??`en_US`},owe=e=>{let t={};for(let[n,r]of awe){let i=e[n];i!==void 0&&Object.assign(t,{[r]:i})}return t};function swe(e){return!e||!e.placementIdentifier&&!e.targetingContext?null:{...e.placementIdentifier?{placement_identifier:e.placementIdentifier}:{},...e.targetingContext?{targeting_revision:e.targetingContext.revision,targeting_rule_id:e.targetingContext.ruleId}:{}}}var cwe=(e,t,n)=>{let r={version:1,id:t,app_user_id:e.appUserId,session_id:e.sessionId,offering_id:e.offeringId,paywall_revision:e.paywallRevision,timestamp:n,paywall_rc_public_id:e.paywallRcPublicId},i=swe(e.presentedOfferingContext);return i&&(r.presented_offering_context=i),r},q5=class{constructor(e){aJ(this,`id`),aJ(this,`timestamp`),aJ(this,`data`),this.id=S6(),this.timestamp=Date.now(),this.data=e}toJSON(){let e=cwe(this.data,this.id,this.timestamp);switch(this.data.type){case`paywall_impression`:return{type:this.data.type,...e,...K5(this.data)};case`paywall_close`:case`paywall_cancel`:return{type:this.data.type,...e};case`paywall_component_interacted`:return{type:this.data.type,...e,...K5(this.data),...owe(this.data)}}}};function J5(){if(typeof window<`u`)return window;throw new K1(U1.UnsupportedError,`window is not available. This SDK requires a browser environment for this operation.`)}function Y5(){if(typeof window<`u`)return window}function X5(){if(typeof document<`u`)return document;throw new K1(U1.UnsupportedError,`document is not available. This SDK requires a browser environment for this operation.`)}function Z5(){if(typeof document<`u`)return document}function lwe(e,t){let n=Y5(),r=n!=null&&n.location?new URLSearchParams(n.location.search):new URLSearchParams,i=null,a=null;typeof screen<`u`&&screen&&(i=screen.width,a=screen.height);let o=Z5(),s=o?.referrer??null,c=o?.title??null;return{libraryName:`purchases-js`,libraryVersion:c5,locale:navigator.language,userAgent:navigator.userAgent,timeZone:Intl.DateTimeFormat().resolvedOptions().timeZone,screenWidth:i,screenHeight:a,utmSource:r.get(`utm_source`)??null,utmMedium:r.get(`utm_medium`)??null,utmCampaign:r.get(`utm_campaign`)??null,utmContent:r.get(`utm_content`)??null,utmTerm:r.get(`utm_term`)??null,pageReferrer:s,pageUrl:n!=null&&n.location?`${n.location.origin}${n.location.pathname}`:``,pageTitle:c,source:e,rcSource:t}}var uwe=2e3,dwe=5*6e4,fwe=.1,Q5=50*1024,pwe=class{constructor(e){aJ(this,`apiKey`),aJ(this,`eventsQueue`,[]),aJ(this,`eventsUrl`),aJ(this,`flushManager`),aJ(this,`traceId`),aJ(this,`appUserId`),aJ(this,`isSilent`),aJ(this,`rcSource`),aJ(this,`workflowContext`),aJ(this,`isDisposed`,!1),this.apiKey=e.apiKey,this.eventsUrl=`${e.httpConfig?.eventsURL??rCe}/v1/events`,this.appUserId=e.appUserId,this.isSilent=e.silent||!1,this.rcSource=e.rcSource,this.workflowContext=e.workflowContext,this.traceId=e.trace_id||S6(),this.flushManager=new iwe(uwe,dwe,fwe,this.doFlush.bind(this))}async updateUser(e){this.appUserId=e}getTraceId(){return this.traceId}trackSDKEvent(e){this.trackEvent({...e,source:`sdk`})}trackExternalEvent(e){this.trackEvent({...e})}trackPaywallEvent(e){if(this.isSilent){X1.verboseLog(`Skipping event tracking, the EventsTracker is silent`);return}try{let t=new q5(e);X1.debugLog(`[PaywallEvent] Queuing ${e.type} (queue size: ${this.eventsQueue.length+1}, url: ${this.eventsUrl})`),X1.debugLog(`[PaywallEvent] Payload: ${JSON.stringify(t.toJSON())}`),this.eventsQueue.push(t),this.flushManager.tryFlush()}catch(t){X1.errorLog(`Error while tracking paywall event ${e.type}: ${t}`)}}trackEvent(e){if(this.isSilent){X1.verboseLog(`Skipping event tracking, the EventsTracker is silent`);return}try{let t=new cve({eventName:e.eventName,traceId:this.traceId,appUserId:this.appUserId,context:lwe(e.source,this.rcSource),workflowIdentifier:this.workflowContext?.workflowIdentifier,properties:e.properties||{mode:C6}});this.eventsQueue.push(t),this.flushManager.tryFlush()}catch(t){X1.errorLog(`Error while tracking event ${e.eventName}: ${t}`)}}dispose(){this.isDisposed||=(this.flushManager.stop(),this.eventsQueue.length>0&&this.flushManager.flushUntilDrain({ignoreDisposed:!0}).catch(e=>{X1.debugLog(`Failed to flush events on dispose: ${e}`)}),!0)}async flushAllEvents(){this.isDisposed||(await this.flushManager.flushUntilDrain(),!this.isDisposed&&this.eventsQueue.length>0&&this.flushManager.schedule())}estimateSingleEventSize(e){try{return JSON.stringify(e).length}catch{return Q5}}batchEventsForKeepalive(){let e=[],t=16;for(let n of this.eventsQueue){let r=this.estimateSingleEventSize(n),i=+(e.length>0),a=t+r+i;if(a<=Q5)e.push(n),t=a;else if(e.length===0){let e=n instanceof q5?n.data.type:n.data.eventName;return X1.warnLog(`Event exceeds keepalive size limit (${r} bytes): ${e}`),this.eventsQueue.shift(),null}else break}return e}doFlush(e){if(!(e!=null&&e.ignoreDisposed)&&this.isDisposed||this.eventsQueue.length===0)return Promise.resolve(!0);let t=this.batchEventsForKeepalive();if(!t)return Promise.resolve(this.eventsQueue.length===0);let n=JSON.stringify({events:t});return X1.debugLog(`[EventsTracker] Flushing ${t.length} event(s) to ${this.eventsUrl}`),X1.debugLog(`[EventsTracker] Body: ${n}`),fetch(this.eventsUrl,{method:G5.POST,headers:E5(this.apiKey),body:n,keepalive:!0}).then(e=>{if(X1.debugLog(`[EventsTracker] Flush response: ${e.status}`),e.status===200||e.status===201)return this.eventsQueue.splice(0,t.length),this.eventsQueue.length>0&&this.flushManager.schedule(),this.eventsQueue.length===0;throw X1.debugLog(`Events failed to flush due to server error`),Error(`Events failed to flush due to server error`)}
451).catch(e=>{throw X1.debugLog(`[EventsTracker] Flush error: ${e}`),e})}},$5=()=>{let e=Y5(),t=e!=null&&e.location?new URLSearchParams(e.location.search):new URLSearchParams,n=[`utm_source`,`utm_medium`,`utm_campaign`,`utm_term`,`utm_content`],r={};return n.forEach(e=>{let n=t.get(e);n!==null&&(r[e]=n)}),r},e7=[`app`,`embedded`],t7={autoCollectUTMAsMetadata:!0,collectAnalyticsEvents:!0,storeLoadTime:`configuration`},mwe=X(`<p class="svelte-17914yi"><strong>Free Trial:</strong> </p>`),hwe=X(`<p class="svelte-17914yi"><strong>Intro Price:</strong> </p>`),gwe=X(`<p class="svelte-17914yi"><strong>Discount Price:</strong> </p>`),_we=X(`<div class="rc-simulated-store-modal-overlay svelte-17914yi"><div class="rc-simulated-store-modal svelte-17914yi"><div class="rc-simulated-store-modal-content svelte-17914yi"><h2 class="rc-simulated-store-modal-title svelte-17914yi">Test Store Purchase</h2> <div class="rc-simulated-store-modal-details svelte-17914yi"><div><p class="svelte-17914yi"><strong>Product:</strong> </p> <p class="svelte-17914yi"><strong>Type:</strong> </p> <p class="svelte-17914yi"><strong>Price:</strong> </p> <!> <!> <!></div></div> <div class="rc-simulated-store-modal-buttons svelte-17914yi"><button type="button" class="rc-simulated-store-modal-button rc-simulated-store-modal-button-primary svelte-17914yi">Test valid purchase</button> <button type="button" class="rc-simulated-store-modal-button rc-simulated-store-modal-button-secondary svelte-17914yi">Test failed purchase</button> <button type="button" class="rc-simulated-store-modal-button rc-simulated-store-modal-button-cancel svelte-17914yi">Cancel</button></div></div></div></div>`),vwe={hash:`svelte-17914yi`,code:`.rc-simulated-store-modal-overlay.svelte-17914yi {position:fixed;top:0;left:0;width:100%;height:100%;background-color:rgba(0, 0, 0, 0.5);display:flex;justify-content:center;align-items:center;font-family:-apple-system, 452 BlinkMacSystemFont, 453 avenir next, 454 avenir, 455 segoe ui, 456 helvetica neue, 457 helvetica, 458 Cantarell, 459 Ubuntu, 460 roboto, 461 noto, 462 arial, 463 sans-serif; 464 /** One more than the paywall */z-index:1000002;}.rc-simulated-store-modal.svelte-17914yi {background:white;border-radius:8px;padding:0;max-width:500px;width:90%;max-height:90%;overflow-y:auto;box-shadow:0 4px 20px rgba(0, 0, 0, 0.15);}.rc-simulated-store-modal-content.svelte-17914yi {padding:24px;}.rc-simulated-store-modal-title.svelte-17914yi {margin:0 0 20px 0;font-size:24px;font-weight:600;color:#333;}.rc-simulated-store-modal-details.svelte-17914yi {margin-bottom:24px;}.rc-simulated-store-modal-details.svelte-17914yi p:where(.svelte-17914yi) {margin:8px 0;color:#666;line-height:1.5;}.rc-simulated-store-modal-buttons.svelte-17914yi {display:flex;flex-direction:column;gap:12px;}.rc-simulated-store-modal-button.svelte-17914yi {padding:12px 24px;border:none;border-radius:6px;font-size:16px;font-weight:500;cursor:pointer;transition:background-color 0.2s ease;}.rc-simulated-store-modal-button-primary.svelte-17914yi {background-color:#007aff;color:white;}.rc-simulated-store-modal-button-primary.svelte-17914yi:hover {background-color:#0056cc;}.rc-simulated-store-modal-button-secondary.svelte-17914yi {background-color:#ff3b30;color:white;}.rc-simulated-store-modal-button-secondary.svelte-17914yi:hover {background-color:#cc2e24;}.rc-simulated-store-modal-button-cancel.svelte-17914yi {background-color:#f2f2f7;color:#333;}.rc-simulated-store-modal-button-cancel.svelte-17914yi:hover {background-color:#e5e5ea;} 465 466 /* Mobile responsive - full screen on small screens */ 467 @media (max-width: 768px) {.rc-simulated-store-modal-overlay.svelte-17914yi {padding:0;}.rc-simulated-store-modal.svelte-17914yi {width:100%;height:100%;border-radius:0;max-width:none;max-height:none;}.rc-simulated-store-modal-content.svelte-17914yi {height:100%;display:flex;flex-direction:column;justify-content:center;} 468 }`};function ywe(e,t){GY(t,!1),J$(e,vwe);let n=$(t,`productIdentifier`,8),r=$(t,`productType`,8),i=$(t,`basePrice`,8),a=$(t,`freeTrialPeriod`,8,void 0),o=$(t,`introPriceFormatted`,8,void 0),s=$(t,`discountFormatted`,8,void 0),c=$(t,`onValidPurchase`,8),l=$(t,`onFailedPurchase`,8),u=$(t,`onCancel`,8);function d(e){e.target===e.currentTarget&&u()()}D1();var f=_we(),p=q(K(K(K(f))),2),m=K(K(p)),h=q(K(m)),g=q(m,2),_=q(K(g)),v=q(g,2),y=q(K(v)),b=q(v,2),x=e=>{var t=mwe(),n=q(K(t));J(()=>_$(n,` ${a()??``}`)),Z(e,t)};Q(b,e=>{a()&&e(x)});var S=q(b,2),C=e=>{var t=hwe(),n=q(K(t));J(()=>_$(n,` ${o()??``}`)),Z(e,t)};Q(S,e=>{o()&&e(C)});var w=q(S,2),T=e=>{var t=gwe(),n=q(K(t));J(()=>_$(n,` ${s()??``}`)),Z(e,t)};Q(w,e=>{s()&&e(T)});var E=K(q(p,2)),D=q(E,2),O=q(D,2);J(()=>{_$(h,` ${n()??``}`),_$(_,` ${r()??``}`),_$(y,` ${i()??``}`)}),o$(`click`,E,function(...e){var t;(t=c())==null||t.apply(this,e)}),o$(`click`,D,function(...e){var t;(t=l())==null||t.apply(this,e)}),o$(`click`,O,function(...e){var t;(t=u())==null||t.apply(this,e)}),o$(`click`,f,d),Z(e,f),KY()}async function n7(e,t,n,r){let i=new Date,a=`test_${i.getTime()}_${S6()}`,o=`test_store_operation_session_${S6()}`,s={storeTransactionId:a,productIdentifier:e.identifier,purchaseDate:i};return{customerInfo:o5(await t.postReceipt(n,e.identifier,e.price.currency,a,e.presentedOfferingContext,`purchase`,r)),redemptionInfo:null,operationSessionId:o,storeTransaction:s}}function bwe(e,t,n){let r=e.rcPackage.webBillingProduct,i=r.productType,a=r.freeTrialPhase,o=r.introPricePhase,s=r.discountPhase,c=r.price,l=e=>e?`${e.number} ${e.unit}${e.number>1?`s`:``}`:`N/A`;return new Promise((u,d)=>{let f=X5(),p=f.createElement(`div`);f.body.appendChild(p);let m=()=>{h&&x$(h),f.body.removeChild(p)},h=null;h=v$(ywe,{target:p,props:{productIdentifier:r.identifier,productType:i,basePrice:c.formattedPrice,freeTrialPeriod:a?l(a.period):void 0,introPriceFormatted:o?.price?.formattedPrice,discountFormatted:s?.price?.formattedPrice,onValidPurchase:async()=>{m(),X1.debugLog(`[Test store] Performing test purchase. This purchase won't appear in production.`);try{u(await n7(r,t,n,e.paywallId))}catch(e){d(e)}},onFailedPurchase:()=>{m(),X1.debugLog(`[Test store] Purchase failure simulated successfully in Test Store.`),d(new K1(U1.TestStoreSimulatedPurchaseError,W1.getPublicMessage(U1.TestStoreSimulatedPurchaseError),`Simulated error successfully.`))},onCancel:()=>{m(),d(new K1(U1.UserCancelledError))}}})})}var xwe=class{constructor(){aJ(this,`virtualCurrenciesCache`,new Map),aJ(this,`CACHE_EXPIRY_MS`,300*1e3)}invalidateAllCaches(){this.virtualCurrenciesCache.clear()}cacheVirtualCurrencies(e,t){this.virtualCurrenciesCache.set(e,{data:t,lastUpdatedAt:Date.now()})}getCachedVirtualCurrencies(e,t=!1){let n=this.virtualCurrenciesCache.get(e);return this.getCachedData(n??null,t)}invalidateVirtualCurrenciesCache(e){this.virtualCurrenciesCache.delete(e)}getCachedData(e,t=!1){return e?t?e.data:Date.now()-e.lastUpdatedAt>=this.CACHE_EXPIRY_MS?null:e.data:null}};function Swe(e){return{balance:e.balance,name:e.name,code:e.code,serverDescription:e.description??null}}function Cwe(e){let t={};for(let[n,r]of Object.entries(e.virtual_currencies))t[n]=Swe(r);return{all:t}}function wwe(e,t){let n=e.webCheckoutURL;if(typeof n==`string`&&n.length>0)return n;if(typeof t==`string`&&t.length>0)return t}function Twe(e,t){let n=e.webBillingProduct,r=wwe(e,t),i=r===void 0?{}:{webCheckoutURL:r},a=n.productType===_0.Subscription,o=n.defaultSubscriptionOption;if(a&&o)return{hasTrial:o.trial!==null,hasIntroOffer:o.introPrice!==null,hasPromoOffer:o.discount!==null,...i};let s=n.defaultNonSubscriptionOption;return!a&&s?{hasTrial:!1,hasIntroOffer:!1,hasPromoOffer:s.discount!==null,...i}:{hasTrial:!1,hasIntroOffer:!1,hasPromoOffer:!1,...i}}function r7(e){let t=Object.entries(e.packagesById).map(([t,n])=>[t,Twe(n,e.webCheckoutURL)]);return Object.fromEntries(t)}var Ewe=(e,t)=>{if(e.productType===_0.Subscription){let n=e.subscriptionOptions?.[t.id]||e.defaultSubscriptionOption;if(!n)throw new n0(t0.ErrorSettingUpPurchase);return n}let n=e.defaultNonSubscriptionOption;if(!n)throw new n0(t0.ErrorSettingUpPurchase);return n},Dwe=(e,t)=>{let n=C8(e,t);return{currency:n.currency,taxCalculationStatus:`unavailable`,totalAmountInMicros:n.amountMicros,totalExcludingTaxInMicros:n.amountMicros,taxAmountInMicros:null,taxBreakdown:null}},i7=(e,t,n,r,i,a)=>{let o=e.webBillingProduct,s=Ewe(o,t),c=Dwe(o,s),l=O8({priceBreakdown:c,productDetails:o,purchaseOption:s,translator:r}),u=o.productType===_0.Subscription?b8.buildStripeExpressCheckoutOptionsForSubscription(o,c,s,r,n,l,2,1):b8.buildStripeExpressCheckoutOptionsForNonSubscription(o,c,l,2,1);return a&&(u.buttonTheme={applePay:a,googlePay:a===`white-outline`?`white`:a}),i&&(u.business={name:i}),u},a7=(e,t,n,r,i,a,o,s)=>{if(!t.elements_configuration)throw new n0(t0.ErrorSettingUpPurchase);return b8.updateElementsConfiguration(e,t.elements_configuration),{expOptions:i7(r,i,n,a,o?.app_name,s)}},Owe=async(e,t,n,r,i,a,o)=>
468{if(!e.elements_configuration)throw new n0(t0.ErrorSettingUpPurchase);let s=e.stripe_account_id,c=e.publishable_api_key,l=b8.getStripeLocale(i.bcp47Locale||i.fallbackBcp47Locale),u={fontSizeBase:`14px`,fontFamily:Y6,spacingGridRow:`16px`},d=Y5()?.matchMedia&&Y5()?.matchMedia(`(max-width: 767px)`).matches,f=`mobile`;if(f=d?`mobile`:`desktop`,!s||!c)throw new n0(t0.ErrorSettingUpPurchase);let p=e.elements_configuration,{stripe:m,elements:h}=await b8.initializeStripe(s,c,p,a,l,u,f);return{stripeInstance:m,elementsInstance:h,expOptions:i7(n,r,t,i,a?.app_name,o)}},kwe=X(`<div><!></div>`);function Awe(e,t){GY(t,!0);let n=`express_purchase_button`,r=N1(t.translator),i=N1(t.brandingInfo?.appearance??null);WY(r0,r),WY(c6,i);let a=CZ(!0),o=CZ(!1),s=CZ(null),c=CZ(null),l=CZ(null),u=e=>{let r=w6({errorCode:e.getErrorCode().toString(),errorMessage:e.message,mode:n});t.eventsTracker.trackSDKEvent(r),t.onError(e)},d=!1,f=async()=>{if(d)return;d=!0;let e;try{e=await t.purchaseOperationHelper.prepareCheckout(t.rcPackage.webBillingProduct.identifier,t.purchaseOption)}catch(e){u(e);return}if(!e.stripe_gateway_params){u(new n0(t0.ErrorSettingUpPurchase,`We couldnât download Stripe params for this purchase. Please try again.`));return}let n=`http://blank`;try{if(!Y(c)||!Y(s)){let{stripeInstance:r,elementsInstance:i,expOptions:a}=await Owe(e.stripe_gateway_params,n,t.rcPackage,t.purchaseOption,t.translator,t.brandingInfo,t.walletButtonTheme);G(c,r,!0),G(s,i,!0),G(l,a,!0)}else{let{expOptions:r}=a7(Y(s),e.stripe_gateway_params,n,t.rcPackage,t.purchaseOption,t.translator,t.brandingInfo,t.walletButtonTheme);G(l,r,!0)}}catch(e){u(e);return}G(a,!1)};$Z(()=>{d=!1,f().then(()=>{})});let p=e=>{let r=j6({errorCode:e.gatewayErrorCode??null,errorMessage:e.message??``,mode:n});t.eventsTracker.trackSDKEvent(r),u(new n0(t0.ErrorSettingUpPurchase,`Failed to initialize payment form`,e.message))},m=async(e,r)=>{var i;let{customerDetails:a,confirmationTokenId:o}=await b8.extractTaxCustomerDetails(e,r);if((i=t.brandingInfo)!=null&&i.gateway_tax_collection_enabled){let e=k6({taxCalculation:await t.purchaseOperationHelper.checkoutRefreshPricing({countryCode:a.countryCode,postalCode:a.postalCode}),taxCustomerDetails:a,mode:n});t.eventsTracker.trackSDKEvent(e)}return o};async function h(e){var n;if(!Y(s)||!Y(c))return!1;await b8.submitElements(Y(s));let r=(await t.purchaseOperationHelper.checkoutComplete(e,t.translator.selectedLocale))?.gateway_params?.client_secret;if(!r)return!1;let i=(n=t.brandingInfo)!=null&&n.gateway_tax_collection_enabled?await m(Y(s),Y(c)):void 0;return await b8.confirmElements(Y(c),Y(s),r,i),!0}let g=async(e,r,i)=>{if(Y(o))return;let a=A6({selectedPaymentMethod:e??null,mode:n});t.eventsTracker.trackSDKEvent(a),G(o,!0);try{let e=await h(r);if(G(o,!1),!e)return;let n=await t.purchaseOperationHelper.pollCurrentPurchaseForCompletion();t.onFinished(n),G(o,!1)}catch(e){if(e instanceof n0)u(e);else if(e instanceof v8){let r=j6({errorCode:e.gatewayErrorCode??null,errorMessage:e.message??``,mode:n});t.eventsTracker.trackSDKEvent(r),u(new n0(t0.ErrorSettingUpPurchase,`Failed to complete payment`,e.message))}i.paymentFailed(),G(o,!1)}},_=async()=>{let e=T6({appearance:t.brandingInfo?.appearance,rcPackage:t.rcPackage,purchaseOptionToUse:t.purchaseOption,customerEmail:t.customerEmail,mode:`express_purchase_button`});t.eventsTracker.trackSDKEvent(e);try{let e=await t.purchaseOperationHelper.checkoutStart({appUserId:t.appUserId,productId:t.rcPackage.webBillingProduct.identifier,purchaseOption:t.purchaseOption,presentedOfferingContext:t.rcPackage.webBillingProduct.presentedOfferingContext,customerEmail:t.customerEmail,metadata:t.metadata,locale:t.translator.selectedLocale}),n=e.management_url;if(!Y(s))throw new n0(t0.ErrorSettingUpPurchase);let{expOptions:r}=a7(Y(s),e.gateway_params,n,t.rcPackage,t.purchaseOption,t.translator,t.brandingInfo,t.walletButtonTheme);return{applePay:r.applePay,lineItems:r.lineItems}}catch(e){throw u(e instanceof n0?e:new n0(t0.ErrorSettingUpPurchase)),e}},v=e=>{var n,r;(r=(n=t.listener)?.onPurchaseStarted)==null||r.call(n,t.rcPackage),_().then(t=>e.resolve(t))},y=()=>{var e,n;t.eventsTracker.trackSDKEvent(D6({mode:`express_purchase_button`})),(n=(e=t.listener)?.onPurchaseCancelled)==null||n.call(e)};function b(e){let n=e.availablePaymentMethods?.applePay||e.availablePaymentMethods?.googlePay;t.onReady&&t.onReady(!!n)}var x=kwe(),S=K(x),C=e=>{x8(e,{get elements(){return Y(s)},onError:p,onSubmit:g,onClick:v,onCancel:y,onReady:b,get expressCheckoutOptions(){return Y(l)},forceEnableWalletMethods:!1,hideCheckoutSeparator:!0})};Q(S,e=>
468{!Y(a)&&Y(s)&&Y(l)&&t.brandingInfo&&e(C)}),Z(e,x),KY()}var o7,jwe=class{constructor(e,t,n){cJ(this,o7),aJ(this,`button`),lJ(this,o7,CZ(kZ({props:n})));let r={updatePurchase:(e,t)=>{this.changePackage(e,t)}};this.state.props.onReady=e=>{t(r,e)},this.button=v$(Awe,{target:e,props:this.state.props})}get state(){return Y(U(this,o7))}set state(e){G(U(this,o7),e,!0)}changePackage(e,t){this.state.props&&(this.state.props.rcPackage=e,this.state.props.purchaseOption=t??e.webBillingProduct.defaultPurchaseOption)}};o7=new WeakMap;var Mwe=new Set([`javascript:`,`data:`,`vbscript:`]);function Nwe(e){return Mwe.has(e.toLowerCase())}function Pwe(e,t){let n=e.trim();if(n.length===0)return!1;let r;try{r=new URL(n)}catch{return!1}return Nwe(r.protocol)?!1:t===`deep_link`?!0:r.protocol===`http:`||r.protocol===`https:`}var s7=`link[rel~="apple-touch-icon"]`,c7=`data-rc-apple-touch-icon`,l7=`true`,u7=`link[${c7}="${l7}"]`,Fwe=e=>!!e.head.querySelector(s7),Iwe=({doc:e,win:t,ignoredLink:n})=>{let r=e.head.querySelector(s7);if(r&&r!==n)return!0;if(!t)return!1;let i=t;for(;i.parent!==i;){let e=i.parent;try{if(Fwe(e.document))return!0}catch{return!1}i=e}return!1},Lwe=e=>{var t;(t=e.head.querySelector(u7))==null||t.remove()},Rwe=({doc:e,win:t,href:n})=>{let r=e.head.querySelector(u7);if(!n){r?.remove();return}if(Iwe({doc:e,win:t,ignoredLink:r})){r?.remove();return}let i=r??e.createElement(`link`);i.rel=`apple-touch-icon`,i.href=n,i.setAttribute(c7,l7),r||e.head.appendChild(i)},d7=`$RCAnonymousID:`,f7,zwe=[M5],p7;f7=[M5];var m7=class e{constructor(e,t,n=k5,r=t7,i,a){rJ(p7,5,this),aJ(this,`_API_KEY`),aJ(this,`_appUserId`),aJ(this,`_brandingInfo`,null),aJ(this,`_loadingResourcesPromise`,null),aJ(this,`_flags`),aJ(this,`_context`),aJ(this,`backend`),aJ(this,`purchaseOperationHelper`),aJ(this,`eventsTracker`),aJ(this,`inMemoryCache`),this._API_KEY=e,this._appUserId=t,this._flags={...t7,...r},this._context=i,u5(e)?X1.debugLog(`Initializing Purchases SDK with Web billing sandbox API Key`):m5(e)&&X1.debugLog(`Initializing Purchases SDK with RC Test store API Key.`),this.eventsTracker=new pwe({apiKey:this._API_KEY,appUserId:this._appUserId,silent:!this._flags.collectAnalyticsEvents,rcSource:this._flags.rcSource??null,workflowContext:this._context?.workflowContext,trace_id:a,httpConfig:n}),this.backend=new ECe(this._API_KEY,n,this._context),this.inMemoryCache=new xwe,this.purchaseOperationHelper=new Nde(this.backend,this.eventsTracker),this.eventsTracker.trackSDKEvent({eventName:y6.SDKInitialized})}static setLogLevel(e){X1.setLogLevel(e)}static setLogHandler(e){X1.setLogHandler(e)}static setPlatformInfo(t){e._platformInfo=t}static buildVariablesPerPackage(e,t={}){return L5(e,t)}static buildInfoPerPackage(e){return r7(e)}static getPlatformInfo(){return e._platformInfo}static getSharedInstance(){if(e.isConfigured())return e.instance;throw new Mde}static isConfigured(){return e.instance!==void 0}static configure(t,n,r,i){e.instance!==void 0&&X1.warnLog(`Purchases is already initialized. You normally should only configure Purchases once. Creating and returning new instance.`);let a;if(typeof t==`object`&&t)a=t;else{if(typeof t!=`string`)throw new K1(U1.ConfigurationError,`API key must be provided as a string`);if(typeof n!=`string`)throw new K1(U1.ConfigurationError,`App user ID must be provided as a string`);a={apiKey:t,appUserId:n,httpConfig:r,flags:i}}return e.configureInternal(a),e.getSharedInstance()}static configureInternal(t){let{apiKey:n,appUserId:r,httpConfig:i,flags:a,context:o,trace_id:s}=t,c=i??k5,l=a??t7;e.validateConfig(t),e.instance=new e(n,r,c,l,o,s)}static validateConfig(e){DCe(e.apiKey),A5(e.appUserId),OCe(e.httpConfig?.proxyURL),kCe(e.httpConfig?.additionalHeaders)}async preload(){if(this.hasLoadedResources()){X1.verboseLog(`Purchases resources are loaded. Skipping.`);return}if(this._loadingResourcesPromise!==null){X1.verboseLog(`Purchases resources are loading. Waiting.`),await this._loadingResourcesPromise;return}return this._loadingResourcesPromise=this.fetchAndCacheBrandingInfo().catch(e=>{let t=`${e}`;e instanceof K1&&(t=`${e.message}. ${e.underlyingErrorMessage?`Underlying error: ${e.underlyingErrorMessage}`:``}`),X1.errorLog(`Error fetching branding info: ${t}`)}).finally(()=>{this._loadingResourcesPromise=null}),this._loadingResourcesPromise}async fetchAndCacheBrandingInfo(){if(m5(this._API_KEY)){X1.warnLog(`Branding info is not available for RC Test Store API keys.`);return}this._brandingInfo=await this.backend.getBrandingInfo(),this.syncApplePayWebsiteIcon()}syncApplePayWebsiteIcon(){if(!this._flags.applePayBrandingLogoEnabled)return;let e=Z5(),t=Y5();if(!e)return;let n=(this._brandingInfo?.app_icon)?.trim();Rwe({doc:e,win:t,href:n?L8(n):null})}hasLoadedResources(){return this._brandingInfo!==null}async presentPaywall(e){var t;let n=e.htmlTarget,r=!1,i=X5(),a=n??i.getElementById(`rcb-ui-pw-root`);if(a===null){r=!0;let e=i.createElement(`div`);e.id=`rcb-ui-pw-root`,e.className=`rcb-ui-pw-root`,e.style.zIndex=`${MCe}`,e.style.position=`fixed`,e.style.top=`0`,e.style.left=`0`,e.style.width=`100%`,e.style.height=`100%`,e.style.overflow=`auto`,e.style.backgroundColor=`var(--rc-purchases-ui-bg-color, Canvas)`,i.body.offsetWidth>
468968&&(e.style.display=`flex`,e.style.justifyContent=`center`,e.style.alignItems=`center`),e.style.transition=`opacity 0.3s`,e.style.opacity=`0`,i.body.appendChild(e),a=e}if(a===null)throw Error(`Could not generate a mount point for the paywall widget`);let o=a,s=e.offering?e.offering:(await this.getOfferings()).current;if(!s)throw Error(`No offering found.`);let c=((this._flags.workflowsEndpointEnabled?await this.backend.getWorkflows(this._appUserId).catch(e=>(X1.warnLog(`Failed to fetch workflows: ${e}`),null)):null)?.workflows)?.find(e=>e.offering_id===s.identifier);if(!c&&!s.paywallComponents)throw Error(`This offering doesn't have a paywall attached.`);if(!c&&!s.uiConfig)throw Error(`No ui_config found for this offering, please contact support!`);let l=(e,t)=>{let n={},r=e=>e.toLowerCase().split(`_`)[0];Object.keys(e.components_localizations).forEach(e=>{n[r(e)]===void 0&&(n[r(e)]=[]),n[r(e)].push(e)});let i=n[r(t)];return i?i.find(e=>e.toLowerCase()===t)||i[0]:e.default_locale},u=e.selectedLocale?e.selectedLocale:navigator.language,d=s.paywallComponents?l(s.paywallComponents,u):u,f=new h0({},d,s.paywallComponents?.default_locale??i0),p=S6(),m={appUserId:this._appUserId,sessionId:p,offeringId:s.identifier,paywallRevision:0,paywallRcPublicId:s.paywallComponents?.id??null,presentedOfferingContext:s.availablePackages[0]?.webBillingProduct?.presentedOfferingContext},h={displayMode:`full_screen`,darkMode:((t=J5())?.matchMedia)?.call(t,`(prefers-color-scheme: dark)`).matches??!1,locale:d},g=new Map(s.availablePackages.map(e=>[e.identifier,e.webBillingProduct.identifier])),_=e=>{if(e!==void 0)return g.get(e)},v=e=>{let t=e;return{type:`paywall_component_interacted`,...m,...h,componentType:e.componentType,componentName:e.componentName,componentValue:e.componentValue,componentURL:t.componentURL,originIndex:t.originIndex,destinationIndex:t.destinationIndex,originContextName:t.originContextName,destinationContextName:t.destinationContextName,defaultIndex:t.defaultIndex,originPackageId:t.originPackageId,destinationPackageId:t.destinationPackageId,defaultPackageId:t.defaultPackageId,originProductId:t.originProductId??_(t.originPackageId),destinationProductId:t.destinationProductId??_(t.destinationPackageId),defaultProductId:t.defaultProductId??_(t.defaultPackageId),currentPackageId:t.currentPackageId,resultingPackageId:t.resultingPackageId,currentProductId:t.currentProductId??_(t.currentPackageId),resultingProductId:t.resultingProductId??_(t.resultingPackageId)}},y=e=>{this.eventsTracker.trackPaywallEvent({type:e,...m,...e===`paywall_impression`?{...h}:{}})},b=async(t,n=d)=>{let r=s.availablePackages.find(e=>e.identifier===t);if(r===void 0)throw Error(`No package found for ${t}`);return{...await this.purchase({rcPackage:r,htmlTarget:e.purchaseHtmlTarget,customerEmail:e.customerEmail,showDiscountCodeField:e.showDiscountCodeField,discountCode:e.discountCode,onDiscountCodeChanged:e.onDiscountCodeChanged,selectedLocale:n,defaultLocale:s.paywallComponents?.default_locale??i0,paywallId:s.paywallComponents?.id,paywallSessionId:p}),selectedPackage:r}},x=null,S=null,C=e=>{let t=e.target;if(!(t instanceof Element))return;let n=t.closest(`a[href]`);if(!(n instanceof HTMLAnchorElement)||!o.contains(n))return;let r=n.getAttribute(`href`)??n.href;r&&(S={url:r,defaultPrevented:e.defaultPrevented})},w=t=>{var n;let r=x?.componentURL===t?x:null;if(x=null,e.onNavigateToUrl){e.onNavigateToUrl(t);return}if(r?.componentType===`text`){queueMicrotask(()=>{var e;let n=S?.url===t?S:null;S=null,n?.defaultPrevented===!0&&((e=J5().open(t,`_blank`))==null||e.focus())});return}(n=J5().open(t,`_blank`))==null||n.focus()},T=async t=>{var n;if(e.onCompleteWorkflowNavigate){await e.onCompleteWorkflowNavigate(t);return}if(!Pwe(t.url,t.method)){X1.warnLog(`Blocked complete-workflow navigation to a disallowed URL.`);return}let r=J5();t.method===`external_browser`?(n=r.open(t.url,`_blank`,`noopener,noreferrer`))==null||n.focus():r.location.assign(t.url)},E=()=>{},D=()=>{if(e.onVisitCustomerCenter){e.onVisitCustomerCenter();return}},O=L5(s,{translator:f}),k=r7(s),A=e.listener,j=e=>{if(A!=null&&A.onPurchaseStarted)try{A.onPurchaseStarted(e)}catch(e){X1.errorLog(`Error in listener.onPurchaseStarted: ${e}`)}},M=t=>{if(t instanceof K1&&t.errorCode===U1.UserCancelledError){if(A!=null&&A.onPurchaseCancelled)try{A.onPurchaseCancelled()}catch(e){X1.errorLog(`Error in listener.onPurchaseCancelled: ${e}`)}}else{if(A!=null&&A.onPurchaseError)try{A.onPurchaseError(t)}catch(e){X1.errorLog(`Error in listener.onPurchaseError: ${e}`)}e.onPurchaseError&&e.onPurchaseError(t)}},N,P;if(c){let e=await this.backend.getWorkflowById(this._appUserId,c.id).catch(e=>(X1.warnLog(`Failed to fetch workflow data, falling back to standard paywall: ${e}`),null)),t=e?Kge(e):null;if(e&&t)P=e,N=t;else{if(e&&!t&&X1.warnLog(`Failed to resolve workflow navigation data, falling back to standard paywall.`),!s.paywallComponents)throw Error(`This offering doesn't have a paywall attached and the workflow could not be loaded.`);if(!s.uiConfig)throw Error(`No ui_config found for this offering, please contact support!`)}}return new Promise((t,n)=>{let i=null,a=!1,c=!1;o.addEventListener(`click`,C);let l=()=>{c||(c=!0,a&&y(`paywall_close`))},f=e=>{!a||c||this.eventsTracker.trackPaywallEvent(v(e))}
468,p=e=>{let t=e;x=t.componentURL===void 0?null:{componentType:e.componentType,componentURL:t.componentURL},f(e)},m=new MutationObserver(()=>{o.childElementCount===0&&(l(),m.disconnect())}),h=()=>{m.disconnect(),o.removeEventListener(`click`,C),l(),i&&=(x$(i),null),o.innerHTML=``,r&&o.parentNode&&o.parentNode.removeChild(o)},g=()=>{X1.debugLog(`Purchase cancelled by user`),h(),n(new K1(U1.UserCancelledError)),this.eventsTracker.flushAllEvents().catch(e=>{X1.debugLog(`Failed to flush paywall events on close: ${e}`)})},_=e=>{h(),t(e),this.eventsTracker.flushAllEvents().catch(e=>{X1.debugLog(`Failed to flush paywall events after purchase: ${e}`)})},S=e=>t=>{t instanceof K1&&t.errorCode===U1.UserCancelledError&&y(`paywall_cancel`),X1.errorLog(`${e}: ${t}`),M(t)},F=this.getWalletButtonRender(s,_,e.customerEmail,S(`Error presenting express purchase button`),A);if(o.innerHTML=``,N&&P)try{i=v$(uge,{target:o,props:{workflow:N,uiConfig:P.ui_config,selectedLocale:u,variablesPerPackage:O,walletButtonRender:F,onPurchaseClicked:e=>{let t=s.packagesById[e];t&&j(t),b(e,u).then(_).catch(S(`Error performing purchase`))},onClose:g,onExitBack:()=>{if(e.onBack){e.onBack(g);return}g()},onCompleteWorkflowNavigate:T,onNavigateToUrlClicked:w,onRestorePurchasesClicked:E,onVisitCustomerCenterClicked:D,onComponentInteraction:p,onStepChanged:e=>{if(e.reason===`completed`)this.eventsTracker.trackSDKEvent({eventName:y6.WorkflowStepCompleted,properties:{workflow_id:e.workflowId,step_id:e.stepId,...e.toStepId===void 0?{}:{to_step_id:e.toStepId},is_first_step:e.isFirstStep,is_last_step:e.isLastStep}});else{let t=e.reason;this.eventsTracker.trackSDKEvent({eventName:y6.WorkflowStepStarted,properties:{workflow_id:e.workflowId,step_id:e.stepId,...e.fromStepId===void 0?{}:{from_step_id:e.fromStepId},entry_reason:t,is_first_step:e.isFirstStep,is_last_step:e.isLastStep}}),e.isLastStep&&!a&&(y(`paywall_impression`),a=!0)}},globalVariables:e.customVariables?C3(e.customVariables,P.ui_config):void 0,maxContentWidth:P.content_max_width?String(P.content_max_width):void 0}})}catch(e){h(),n(e);return}else i=v$(F3,{target:o,props:{paywallData:s.paywallComponents,selectedLocale:d,onNavigateToUrlClicked:w,appUserId:this._appUserId,onCompleteWorkflowNavigate:T,onVisitCustomerCenterClicked:D,uiConfig:s.uiConfig,onBackClicked:()=>{if(e.onBack){e.onBack(g);return}g()},onRestorePurchasesClicked:E,onPurchaseClicked:e=>{let t=s.packagesById[e];t&&j(t),b(e).then(_).catch(S(`Error performing purchase`))},onError:e=>{h(),n(e)},variablesPerPackage:O,infoPerPackage:k,hideBackButtons:e.hideBackButtons,walletButtonRender:F,customVariables:e.customVariables,onComponentInteraction:p}});m.observe(o,{childList:!0}),N||(y(`paywall_impression`),a=!0),o.style.opacity===`0`&&(o.style.opacity=`1`)})}async getOfferings(e){Rxe(e?.currency);let t=this._appUserId,n=await this.backend.getOfferings(t),r=e?.offeringIdentifier===j5.Current?n.current_offering_id:e?.offeringIdentifier;return r&&(n.offerings=n.offerings.filter(e=>e.identifier===r)),await this.getAllOfferings(n,t,e)}async getCurrentOfferingForPlacement(e,t){let n=this._appUserId,r=await this.backend.getOfferings(n),i=await this.getAllOfferings(r,n,t),a=r.placements??null;return a==null?null:ACe(a,i.all,e)}async getAllOfferings(e,t,n){let r=e.offerings.flatMap(e=>e.packages).map(e=>e.platform_product_identifier),i=await this.backend.getProducts(t,r,n?.currency,n?.discountCode);return this.logMissingProductIds(r,i.product_details),jCe(e,i)}async isEntitledTo(e){return e in(await this.getCustomerInfo()).entitlements.active}purchasePackage(e,t,n){return this.purchase({rcPackage:e,customerEmail:t,htmlTarget:n})}async presentExpressPurchaseButton(e){let{rcPackage:t,purchaseOption:n,htmlTarget:r,customerEmail:i,selectedLocale:a=i0,defaultLocale:o=i0,onButtonReady:s=()=>{},walletButtonTheme:c}=e,l=this._appUserId;if(!d5(this._API_KEY))throw Error(`The Express Purchase button is only available with Web Billing API Keys.`);let u=n??t.webBillingProduct.defaultPurchaseOption,d={...this._flags.autoCollectUTMAsMetadata?$5():{},...e.metadata||{}},f=new h0({},a,o);return new Promise((n,a)=>{new jwe(r,s,{appUserId:l,rcPackage:t,purchaseOption:u,customerEmail:i,purchases:this,eventsTracker:this.eventsTracker,brandingInfo:this._brandingInfo,purchaseOperationHelper:this.purchaseOperationHelper,metadata:d,customTranslations:e.labelsOverride,translator:f,onFinished:async e=>{let t=E6({redemptionInfo:e.redemptionInfo,mode:`express_purchase_button`});this.eventsTracker.trackSDKEvent(t),X1.debugLog(`Purchase finished`),n({customerInfo:await this._getCustomerInfoForUserId(l),redemptionInfo:e.redemptionInfo,operationSessionId:e.operationSessionId,attributionMetadata:e.attributionMetadata,storeTransaction:{storeTransactionId:e.storeTransactionIdentifier,productIdentifier:e.productIdentifier,purchaseDate:e.purchaseDate}})},onError:e=>{let t=O6({errorCode:e.errorCode?.toString(),errorMessage:e.message,mode:`express_purchase_button`});this.eventsTracker.trackSDKEvent(t),a(e)},listener:e.listener,walletButtonTheme:c})})}getWalletButtonRender(e,t,n,r,i){if(d5(this._API_KEY))return(a,{selectedPackageId:o,onReady:s,walletButtonTheme:c})=>{let l=e.packagesById[o];if(!l)return{};let u=l,d=null;return this.presentExpressPurchaseButton({rcPackage:l,customerEmail:n,htmlTarget:a,onButtonReady:(e,t)=>{d=e,s?.(t)},listener:i,walletButtonTheme:c}).then(e=>{t({...e,selectedPackage:u})}).catch(r),{destroy(){a.innerHTML=``},update({selectedPackageId:t}){if(d){let n=e.packagesById[t];if(!n)return;let r=n.webBillingProduct.defaultPurchaseOption;u=n,d.updatePurchase(n,r)}}}}}async purchase(e){if(m5(this._API_KEY)){let t=await bwe(e,this.backend,this._appUserId);return this.inMemoryCache.invalidateAllCaches(),t}return f5(this._API_KEY)?await this.performPaddlePurchase(e):p5(this._API_KEY)?await this.performStripePurchase(e):await this.performWebBillingPurchase(e)}async performStripePurchase(e){let{rcPackage:t,purchaseOption:n,htmlTarget:r,customerEmail:i,workflowPurchaseContext:a,attributionMetadata:o,paywallId:s,paywallSessionId:c,selectedLocale:l=i0,defaultLocale:u=i0,skipSuccessPage:d=!1}=e,f=this.resolveHTMLTarget(r),p=this._appUserId;X1.debugLog(`Presenting Stripe checkout for package ${t.identifier}`);let m=l||u,h=n??t.webBillingProduct.defaultPurchaseOption,g=T6({appearance:this._brandingInfo?.appearance,rcPackage:t,purchaseOptionToUse:h,customerEmail:i});this.eventsTracker.trackSDKEvent(g);let _={...this._flags.autoCollectUTMAsMetadata?$5():{},...e.metadata||{}},v=null,y=this._brandingInfo;y&&e.brandingAppearanceOverride&&(y.appearance=e.brandingAppearanceOverride);let b=r!==void 0;return new Promise((n,r)=>{let l=J5();b||l.history.pushState({checkoutOpen:!0},``);let g=()=>{v&&x$(v),f.innerHTML=``},y=this.createCheckoutOnCloseHandler(r,g);!b&&y&&l.addEventListener(`popstate`,y),v=v$(KSe,{target:f,props:{isInElement:b,appUserId:p,rcPackage:t,purchaseOption:h,customerEmail:i,workflowPurchaseContext:a,attributionMetadata:o,paywallId:s,paywallSessionId:c,onFinished:this.createCheckoutOnFinished
468Handler(n,p,t,g),onClose:y,onError:this.createCheckoutOnErrorHandler(r,g),eventsTracker:this.eventsTracker,brandingInfo:this._brandingInfo,purchaseOperationHelper:this.purchaseOperationHelper,selectedLocale:m,metadata:_,defaultLocale:u,customTranslations:e.labelsOverride,skipSuccessPage:d}})})}async performWebBillingPurchase(e){let{rcPackage:t,purchaseOption:n,htmlTarget:r,customerEmail:i,workflowPurchaseContext:a,attributionMetadata:o,selectedLocale:s=i0,defaultLocale:c=i0,skipSuccessPage:l=!1,showDiscountCodeField:u=!1,discountCode:d,onDiscountCodeChanged:f}=e,p=this.resolveHTMLTarget(r),m=this._appUserId;X1.debugLog(`Presenting purchase form for package ${t.identifier}`);let h=s||c,g=n??t.webBillingProduct.defaultPurchaseOption,_=T6({appearance:this._brandingInfo?.appearance,rcPackage:t,purchaseOptionToUse:g,customerEmail:i});this.eventsTracker.trackSDKEvent(_);let v={...this._flags.autoCollectUTMAsMetadata?$5():{},...e.metadata||{}},y=null,b=this._brandingInfo;b&&e.brandingAppearanceOverride&&(b.appearance=e.brandingAppearanceOverride);let x=r!==void 0;return new Promise((n,r)=>{let s=J5();x||s.history.pushState({checkoutOpen:!0},``);let _=()=>{y&&x$(y),p.innerHTML=``},b=this.createCheckoutOnCloseHandler(r,_);!x&&b&&s.addEventListener(`popstate`,b);let S=this.createCheckoutOnFinishedHandler(n,m,t,_),C=this.createCheckoutOnErrorHandler(r,_);y=v$(Bxe,{target:p,props:{isInElement:x,appUserId:m,rcPackage:t,purchaseOption:g,customerEmail:i,workflowPurchaseContext:a,attributionMetadata:o,paywallId:e.paywallId,paywallSessionId:e.paywallSessionId,onFinished:S,onClose:b,onError:C,purchases:this,eventsTracker:this.eventsTracker,brandingInfo:this._brandingInfo,purchaseOperationHelper:this.purchaseOperationHelper,selectedLocale:h,metadata:v,defaultLocale:c,customTranslations:e.labelsOverride,termsAndConditionsUrl:e.termsAndConditionsUrl,showDiscountCodeField:u,discountCode:d,onDiscountCodeChanged:f,skipSuccessPage:l,hideBackButton:this.shouldHideCheckoutBackButton()}})})}async performPaddlePurchase(e){let{rcPackage:t,purchaseOption:n,customerEmail:r,attributionMetadata:i,workflowPurchaseContext:a,selectedLocale:o=i0,defaultLocale:s=i0,skipSuccessPage:c=!1,htmlTarget:l}=e,u=this.resolveHTMLTarget(l),d=this._appUserId;X1.debugLog(`Presenting Paddle checkout for package ${t.identifier}`);let f=n??t.webBillingProduct.defaultPurchaseOption,p={source:`paddle`,...this._flags.autoCollectUTMAsMetadata?$5():{},...e.metadata||{}},m=this._brandingInfo;m&&e.brandingAppearanceOverride&&(m.appearance=e.brandingAppearanceOverride);let h=T6({appearance:this._brandingInfo?.appearance,rcPackage:t,purchaseOptionToUse:f,customerEmail:r});this.eventsTracker.trackSDKEvent(h);let g=new mSe(this.backend,this.eventsTracker),_=null,v=l!==void 0;return new Promise((n,l)=>{let m=J5();v||m.history.pushState({checkoutOpen:!0},``);let h=()=>{_&&x$(_),u.innerHTML=``},y=this.createCheckoutOnCloseHandler(l,h)??(()=>{h()});v||m.addEventListener(`popstate`,y);let b=this.createCheckoutOnFinishedHandler(n,d,t,h),x=this.createCheckoutOnErrorHandler(l);_||=v$(ISe,{target:u,props:{eventsTracker:this.eventsTracker,brandingInfo:this._brandingInfo,selectedLocale:o||s,defaultLocale:s,customTranslations:e.labelsOverride,isInElement:v,onClose:y,onFinished:b,onError:x,skipSuccessPage:c,productDetails:t.webBillingProduct,rcPackage:t,appUserId:d,purchaseOption:f,customerEmail:r,attributionMetadata:i,workflowPurchaseContext:a,metadata:p,unmountPaddlePurchaseUi:h,paddleService:g,hideBackButton:this.shouldHideCheckoutBackButton()}})})}resolveHTMLTarget(e){let t=X5(),n=e??t.getElementById(`rcb-ui-root`);if(n===null){let e=t.createElement(`div`);e.className=`rcb-ui-root`,t.body.appendChild(e),n=e}if(n===null)throw Error(`Could not generate a mount point for the billing widget`);return n}createCheckoutOnCloseHandler(e,t){if(this._flags.rcSource&&e7.includes(this._flags.rcSource))return;let n=()=>{let r=D6();this.eventsTracker.trackSDKEvent(r),J5().removeEventListener(`popstate`,n),t?.(),X1.debugLog(`Purchase cancelled by user`),e(new K1(U1.UserCancelledError))};return n}shouldHideCheckoutBackButton(){return this._flags.hideBackButton===!0||!!this._flags.rcSource&&e7.includes(this._flags.rcSource)}
468createCheckoutOnFinishedHandler(e,t,n,r){return async i=>{let a=E6({redemptionInfo:i.redemptionInfo});this.eventsTracker.trackSDKEvent(a),this.inMemoryCache.invalidateAllCaches(),X1.debugLog(`Purchase finished`),r?.(),e({customerInfo:await this._getCustomerInfoForUserId(t),redemptionInfo:i.redemptionInfo,operationSessionId:i.operationSessionId,attributionMetadata:i.attributionMetadata,storeTransaction:{storeTransactionId:i.storeTransactionIdentifier,productIdentifier:n.webBillingProduct.identifier,purchaseDate:i.purchaseDate}})}}createCheckoutOnErrorHandler(e,t){return n=>{let r=O6({errorCode:n.errorCode?.toString(),errorMessage:n.message});this.eventsTracker.trackSDKEvent(r),t?.(),e(K1.getForPurchasesFlowError(n))}}_isConfiguredWithSimulatedStore(){return m5(this._API_KEY)}_shouldForceEnableWalletMethods(){return!!this._flags.forceEnableWalletMethods}async _postSimulatedStoreReceipt(e){if(!m5(this._API_KEY))throw new K1(U1.ConfigurationError,`Posting a test store receipt is only available for RC Test Store API keys.`);return await n7(e,this.backend,this._appUserId,void 0)}async getCustomerInfo(){return await this._getCustomerInfoForUserId(this._appUserId)}getAppUserId(){return this._appUserId}async setAttributes(e){return await this.getCustomerInfo(),await this.backend.setAttributes(this._appUserId,e)}async changeUser(e){return await this.replaceUserId(e),await this.getCustomerInfo()}async identifyUser(e){if(A5(e),e===this._appUserId)return X1.debugLog(`aliasUser called with the current appUserID: ${e}. Ignoring.`),{customerInfo:await this.getCustomerInfo(),wasCreated:!1};let t=await this.backend.identify(this._appUserId,e);return await this.replaceUserId(e),{customerInfo:o5(t),wasCreated:t.was_created}}async replaceUserId(e){A5(e),this._appUserId=e,await this.eventsTracker.updateUser(e),this.inMemoryCache.invalidateAllCaches()}logMissingProductIds(e,t){let n={};t.forEach(e=>n[e.identifier]=e);let r=[];e.forEach(e=>{n[e]===void 0&&r.push(e)}),r.length>0&&X1.debugLog(`Could not find product data for product ids: 469 ${r.join()}. 470 Please check that your product configuration is correct.`)}isSandbox(){return u5(this._API_KEY)||m5(this._API_KEY)}isAnonymous(){return this._appUserId.startsWith(d7)}async getVirtualCurrencies(){return await this._getVirtualCurrenciesForUserId(this._appUserId)}getCachedVirtualCurrencies(){return this.inMemoryCache.getCachedVirtualCurrencies(this._appUserId,!0)}invalidateVirtualCurrenciesCache(){this.inMemoryCache.invalidateVirtualCurrenciesCache(this._appUserId)}close(){if(e.instance===this){if(this.eventsTracker&&this.eventsTracker.dispose(),this._flags.applePayBrandingLogoEnabled){let e=Z5();e&&Lwe(e)}e.instance=void 0}else X1.warnLog(`Trying to close a Purchases instance that is not the current instance. Ignoring.`)}async _getCustomerInfoForUserId(e){return o5(await this.backend.getCustomerInfo(e))}async _getVirtualCurrenciesForUserId(e){let t=this.inMemoryCache.getCachedVirtualCurrencies(e);if(t)return X1.debugLog(`Vending VirtualCurrencies from cache.`),t;let n=Cwe(await this.backend.getVirtualCurrencies(e));return X1.debugLog(`VirtualCurrencies updated from the network.`),this.inMemoryCache.cacheVirtualCurrencies(e,n),n}static generateRevenueCatAnonymousAppUserId(){return`${d7}${S6().replace(/-/g,``)}`}_trackEvent(e){this.eventsTracker.trackExternalEvent(e)}_flushAllEvents(){return this.eventsTracker.flushAllEvents()}};p7=Qq(null),iJ(p7,1,`presentExpressPurchaseButton`,zwe,m7),iJ(p7,1,`purchase`,f7,m7),nJ(p7,m7),aJ(m7,`_platformInfo`),aJ(m7,`instance`);var h7=m7,g7=`strp_gTdcVBCawkAqVXjzohIMiQcEsRm`?.trim(),Bwe=class extends Error{constructor(){super(`RevenueCat Web Billing is not configured. Set VITE_REVENUECAT_PUBLIC_API_KEY_WEB.`),this.name=`RevenueCatNotConfiguredError`}};function _7(){return!!g7}function v7(e){if(!g7)throw new Bwe;if(!h7.isConfigured())return h7.configure({apiKey:g7,appUserId:e});let t=h7.getSharedInstance();return t.getAppUserId()!==e&&t.changeUser(e),t}async function y7(){return(await h7.getSharedInstance().getOfferings()).current}function b7(e){return e.split(`:`)[0].replace(/\.(monthly|annual|weekly|yearly)$/i,``)}function Vwe(e){let t=[];return e.rc_entitlement_id&&(t.push(e.rc_entitlement_id.toLowerCase()),t.push(e.rc_entitlement_id.toLowerCase().replace(/^scraping_/,``))),e.name&&t.push(e.name.trim().toLowerCase()),t}function Hwe(e,t){let n=e.availablePackages,r=t.rc_product_id;if(r){let e=n.find(e=>e.webBillingProduct.identifier===r);if(e)return e;let t=b7(r),i=n.find(e=>b7(e.webBillingProduct.identifier)===t);if(i)return i}let i=Vwe(t);return n.find(e=>i.includes(e.identifier.trim().toLowerCase()))||(console.warn(`[RevenueCat] No package for plan "${t.name}" (product=${r??`none`}, entitlement=${t.rc_entitlement_id??`none`}). Offering "${e.identifier}" contains: `+n.map(e=>`${e.identifier} â ${e.webBillingProduct.identifier}`).join(`, `)),null)}function Uwe(e){let t=e?.period;if(!t)return null;switch(t.unit){case`day`:return t.number;case`week`:return t.number*7;case`month`:return t.number*30;case`year`:return t.number*365;default:return null}}function Wwe(e){let t=new Map;for(let n of e.availablePackages){let e=n.webBillingProduct,r=e.freeTrialPhase,i={hasTrial:r!=null,days:Uwe(r)};for(let r of[e.identifier,b7(e.identifier),n.identifier])r&&t.set(r.trim().toLowerCase(),i)}return t}function Gwe(e){let t=new Map;for(let n of e.availablePackages){let e=n.webBillingProduct,r=e.currentPrice;if(!r)continue;let i={formatted:r.formattedPrice,amount:r.amountMicros/1e6,currency:r.currency};for(let r of[e.identifier,b7(e.identifier),n.identifier])r&&t.set(r.trim().toLowerCase(),i)}return t}async function Kwe(e,t){try{let{customerInfo:n}=await h7.getSharedInstance().purchase({rcPackage:e,...t?{customerEmail:t}:{}});return{status:`completed`,customerInfo:n}}catch(e){return qwe(e)?{status:`cancelled`}:{status:`error`,message:e instanceof Error?e.message:`Something went wrong completing your purchase.`}}}function qwe(e){if(!e||typeof e!=`object`)return!1;let t=e.errorCode,n=e.message;return t===1||typeof n==`string`&&/cancel/i.test(n)}function Jwe(e,t=`USD`){return new Intl.NumberFormat(`en-US`,{style:`currency`,currency:t,minimumFractionDigits:Number.isInteger(e)?0:2,maximumFractionDigits:2}).format(e)}function Ywe(){let e=_7(),[t,n]=(0,b.useState)({trials:null,prices:null,isLoading:e});return(0,b.useEffect)(()=>
470{if(!e)return;let t=!1;return y7().then(e=>{t||n({trials:e?Wwe(e):null,prices:e?Gwe(e):null,isLoading:!1})}).catch(()=>{t||n({trials:null,prices:null,isLoading:!1})}),()=>{t=!0}},[e]),t}function x7(e){return[e.rc_product_id,e.rc_product_id?.split(`:`)[0],e.rc_entitlement_id,e.rc_entitlement_id?.replace(/^scraping_/,``),e.name]}function Xwe(e,t){if(t)for(let n of x7(e)){if(!n)continue;let e=t.get(n.trim().toLowerCase());if(e)return{amount:e.amount,formatted:e.formatted,currency:e.currency,isStorePrice:!0}}return{amount:e.price_monthly,formatted:null,currency:`USD`,isStorePrice:!1}}function Zwe(e,t){let n=e.trial_days??0;if(!t)return{hasTrial:n>0,days:n};for(let r of x7(e)){if(!r)continue;let e=t.get(r.trim().toLowerCase());if(e)return{hasTrial:e.hasTrial,days:e.days??n}}return{hasTrial:!1,days:n}}function Qwe(e,t){let n=Xwe(e,t);return n.formatted===null?n.amount===null?null:Jwe(n.amount,n.currency):n.formatted}var $we={rc_billing:`plans.storeWeb`,stripe:`plans.storeWeb`,play_store:`plans.storePlay`,app_store:`plans.storeAppStore`,amazon:`plans.storeAmazon`,promotional:`plans.storePromo`};function eTe(e,t,n,r,i){let a=r.hasTrial?i(`plans.startTrial`,{days:r.days}):i(`plans.subscribe`);if(n)return{label:n,disabled:!1,action:`purchase`};if(!t)return{label:a,disabled:!1,action:`purchase`};let o=e.product_type,s=t.stores[o];if(!Mx(t,o)){let e=s?i($we[s]):null;return{label:i(`plans.managedElsewhere`),disabled:!0,action:`none`,note:e?i(`plans.subscribedVia`,{store:e}):i(`plans.managedOutsideWeb`)}}let c=o===`scraper`?t.ownsScraper:o===`repost`?t.ownsRepost:t.ownsAi;if(c&&o!==`scraper`)return{label:i(`plans.currentPlan`),disabled:!0,action:`none`};if(c&&o===`scraper`){if(e.id===t.scraperPlanId)return{label:i(`plans.currentPlan`),disabled:!0,action:`none`};if(e.id===t.scheduledScraperPlanId)return{label:i(`plans.scheduled`),disabled:!0,action:`none`,note:i(`plans.scheduledNote`)};let n=t.scraperPlanPrice,r=e.price_monthly,a=n!=null&&r!=null&&r>n;return{label:i(n==null||r==null?`plans.changePlan`:a?`plans.upgrade`:`plans.downgrade`),disabled:!1,action:`manage`,note:i(a?`plans.upgradeNote`:`plans.downgradeNote`)}}return{label:a,disabled:!1,action:`purchase`}}function tTe({showTabs:e,count:t,loadingLabel:n}){return(0,V.jsxs)(`div`,{"aria-busy":`true`,"aria-live":`polite`,children:[(0,V.jsx)(`span`,{className:`sr-only`,children:n}),e?(0,V.jsx)(`div`,{className:`mx-auto flex w-fit gap-1 rounded-2xl border border-border bg-surface-elevated/60 p-1`,children:Array.from({length:3}).map((e,t)=>(0,V.jsx)(`div`,{className:`h-10 w-24 animate-pulse rounded-xl bg-border/60 sm:w-28`},t))}):null,(0,V.jsx)(`div`,{className:`grid gap-5 ${e?`mt-10`:`mt-2`} ${t>=3?`sm:grid-cols-2 lg:grid-cols-3`:`mx-auto max-w-md`}`,children:Array.from({length:t}).map((e,t)=>(0,V.jsxs)(`div`,{className:`flex flex-col rounded-[1.75rem] border border-border bg-surface p-6`,children:[(0,V.jsx)(`div`,{className:`h-5 w-24 animate-pulse rounded-md bg-border/60`}),(0,V.jsx)(`div`,{className:`mt-3 h-4 w-full animate-pulse rounded-md bg-border/40`}),(0,V.jsx)(`div`,{className:`mt-1.5 h-4 w-2/3 animate-pulse rounded-md bg-border/40`}),(0,V.jsx)(`div`,{className:`mt-5 h-9 w-32 animate-pulse rounded-md bg-border/60`}),(0,V.jsx)(`div`,{className:`mt-3 h-6 w-36 animate-pulse rounded-full bg-border/40`}),(0,V.jsx)(`div`,{className:`mt-6 flex-1 space-y-2.5`,children:Array.from({length:4}).map((e,t)=>(0,V.jsx)(`div`,{className:`h-4 w-full animate-pulse rounded-md bg-border/40`},t))}),(0,V.jsx)(`div`,{className:`mt-6 h-12 w-full animate-pulse rounded-2xl bg-border/60`})]},t))})]})}function nTe({plan:e,ownership:t,onSelectPlan:n,ctaLabelOverride:r,busy:i,busyLabel:a,trial:o,priceLabel:s,onManage:c,manageBusy:l}){let u=my(),d=ux(e,u),f=eTe(e,t,r,o,u),p=e.name.trim().toLowerCase()===`plus`;return(0,V.jsxs)(`div`,{className:`relative flex flex-col rounded-[1.75rem] border bg-surface p-6 transition-all ${p?`border-primary/50 shadow-2xl shadow-primary/10`:`border-border`}`,children:[p?(0,V.jsx)(`span`,{className:`absolute -top-3 left-6 rounded-full bg-primary px-3 py-1 text-xs font-extrabold text-primary-foreground`,children:u(`plans.mostPopular`)}):null,(0,V.jsx)(`h3`,{className:`text-lg font-extrabold text-foreground`,children:e.name}),e.description?(0,V.jsx)(`p`,{className:`mt-1.5 text-sm leading-relaxed text-muted-foreground`,children:e.description}):null,(0,V.jsxs)(`div`,{className:`mt-5 flex items-baseline gap-1`,children:[(0,V.jsx)(`span`,{className:`text-3xl font-black text-foreground`,children:s}),(0,V.jsx)(`span`,{className:`text-sm text-muted-foreground`,children:u(`plans.perMonth`)})]}),o.hasTrial?(0,V.jsxs)(`span`,{className:`mt-3 inline-flex w-fit items-center gap-1.5 rounded-full border border-success/30 bg-success/10 px-3 py-1 text-xs font-bold text-success`,children:[(0,V.jsx)(ej,{className:`h-3.5 w-3.5`}),u(`plans.trialBadge`,{days:o.days})]}):null,(0,V.jsx)(`ul`,{className:`mt-6 flex-1 space-y-2.5`,children:d.map(e=>(0,V.jsxs)(`li`,{className:`flex items-start gap-2.5 text-sm`,children:[(0,V.jsx)(Fk,{className:`mt-0.5 h-4 w-4 shrink-0 text-success`}),(0,V.jsx)(`span`,{className:`text-muted-foreground`,children:e})]},e))}),f.action===`manage`&&c?(0,V.jsxs)(`button`,{type:`button`,onClick:c,disabled:l,className:`mt-6 flex w-full items-center justify-center gap-2 rounded-2xl bg-primary py-3.5 text-sm font-extrabold text-primary-foreground transition-all hover:bg-primary-hover active:scale-[0.98] disabled:opacity-60`,children:[l?u(`plans.opening`):f.label,l?(0,V.jsx)(_A,{className:`h-4 w-4 animate-spin`}):(0,V.jsx)(Zk,{className:`h-4 w-4`})]}):(0,V.jsxs)(`button`,{type:`button`,disabled:f.disabled||i||f.action!==`purchase`,onClick:()=>n?.(e),className:`mt-6 flex w-full items-center justify-center gap-2 rounded-2xl py-3.5 text-sm font-extrabold transition-all ${f.disabled||i||f.action!==`purchase`?`cursor-not-allowed border border-border bg-surface-elevated text-muted-foreground`:`bg-primary text-primary-foreground hover:bg-primary-hover active:scale-[0.98]`}`,children:[i?(0,V.jsx)(_A,{className:`h-4 w-4 animate-spin`}):null,i?a??u(`plans.working`):f.label]}),f.note?(0,V.jsx)(`p`,{className:`mt-2 text-center text-xs text-muted-foreground`,children:f.note}):null]})}function S7({ownership:e,onSelectPlan:t,ctaLabelOverride:n,busyPlanId:r,busyLabel:i,onManage:a,manageBusy:o,products:s}
470){let c=my(),l=rx(c),{grouped:u,isLoading:d,error:f,reload:p}=ox(),{trials:m,prices:h,isLoading:g}=Ywe(),_=s?.length?ix.filter(e=>s.includes(e)):ix,[v,y]=(0,b.useState)(_[0]??`scraper`);if(d||g){let e=_.length===1&&_[0]!==`scraper`?1:3;return(0,V.jsx)(tTe,{showTabs:_.length>1,count:e,loadingLabel:c(`plans.loading`)})}if(f)return(0,V.jsxs)(`div`,{className:`py-16 text-center`,children:[(0,V.jsx)(`p`,{className:`text-sm text-error`,children:c(`plans.loadError`)}),(0,V.jsx)(`button`,{type:`button`,onClick:p,className:`mt-4 rounded-xl bg-surface-elevated px-5 py-2.5 text-sm font-bold text-foreground transition-all hover:bg-border`,children:c(`common.tryAgain`)})]});let x=u[v];return(0,V.jsxs)(`div`,{children:[(0,V.jsx)(`div`,{role:`tablist`,"aria-label":c(`plans.productAria`),hidden:_.length<2,className:`mx-auto flex w-fit gap-1 rounded-2xl border border-border bg-surface-elevated/60 p-1 [&[hidden]]:hidden`,children:_.map(e=>{let t=e===v;return(0,V.jsx)(`button`,{role:`tab`,type:`button`,"aria-selected":t,onClick:()=>y(e),className:`rounded-xl px-4 py-2.5 text-sm font-bold transition-all sm:px-6 ${t?`bg-primary text-primary-foreground shadow-lg shadow-primary/20`:`text-muted-foreground hover:text-foreground`}`,children:l[e]},e)})}),(0,V.jsx)(`div`,{className:`grid gap-5 ${_.length<2?`mt-2`:`mt-10`} ${x.length>=3?`sm:grid-cols-2 lg:grid-cols-3`:`mx-auto max-w-md`}`,children:x.map(s=>(0,V.jsx)(nTe,{plan:s,ownership:e,onSelectPlan:t,ctaLabelOverride:n,busy:r===s.id,busyLabel:i,trial:Zwe(s,m),priceLabel:Qwe(s,h),onManage:a,manageBusy:o},s.id))}),x.length===0?(0,V.jsx)(`p`,{className:`py-10 text-center text-sm text-muted-foreground`,children:c(`plans.empty`)}):null]})}var rTe=[{id:`billing`,questionKey:`pricing.faqBillingQ`,answerKey:`pricing.faqBillingA`},{id:`cancellation`,questionKey:`pricing.faqCancellationQ`,answerKey:`pricing.faqCancellationA`},{id:`upgrade`,questionKey:`pricing.faqUpgradeQ`,answerKey:`pricing.faqUpgradeA`},{id:`products`,questionKey:`pricing.faqProductsQ`,answerKey:`pricing.faqProductsA`},{id:`support`,questionKey:`pricing.faqSupportQ`,answerKey:`pricing.faqSupportA`}];function C7({position:e,className:t}){return(0,V.jsx)(`div`,{className:`pointer-events-none absolute left-0 right-0 z-10 overflow-hidden ${e===`top`?`-top-px`:`-bottom-px`}`,"aria-hidden":`true`,children:(0,V.jsx)(`div`,{className:`relative mx-auto h-12 w-[120%] -ml-[10%] sm:h-20 lg:h-28 ${t} ${e===`top`?`rounded-b-[50%]`:`rounded-t-[50%]`}`})})}function iTe(){let e=(0,b.useRef)(null);return(0,b.useEffect)(()=>{let t=e.current;if(!t)return;let n=new IntersectionObserver(e=>{e.forEach(e=>{e.isIntersecting&&e.target.classList.add(`visible`)})},{threshold:.1,rootMargin:`0px 0px -40px 0px`});return t.querySelectorAll(`.reveal, .reveal-left, .reveal-right`).forEach(e=>n.observe(e)),()=>n.disconnect()},[]),e}function aTe(){let e=my(),t=iTe(),n=or(),[r,i]=(0,b.useState)({}),{grouped:a,scraperIntervals:o}=ox(),s=a.scraper,c=e=>{i(t=>({...t,[e]:!t[e]}))};return(0,V.jsxs)(`div`,{ref:t,className:`relative flex flex-col overflow-hidden`,children:[(0,V.jsxs)(`section`,{className:`relative flex flex-col items-center justify-center overflow-hidden bg-gradient-to-br from-[#f0f4ff] via-background to-[#eef6ff] pb-28 pt-16 sm:pb-36 sm:pt-20 md:pb-44 md:pt-24 lg:pt-32 xl:pt-40 dark:from-[#040418] dark:via-[#060620] dark:to-[#0d1a3a]`,children:[(0,V.jsx)(`div`,{className:`pointer-events-none absolute -top-24 -left-24 h-[420px] w-[420px] rounded-full bg-primary/8 blur-[100px] animate-float-slow dark:bg-primary/15`}),(0,V.jsx)(`div`,{className:`pointer-events-none absolute top-1/3 -right-20 h-[360px] w-[360px] rounded-full bg-accent/6 blur-[90px] animate-float-slower dark:bg-accent/12`}),(0,V.jsxs)(`div`,{className:`container relative z-10 mx-auto max-w-6xl px-4 sm:px-6 lg:px-8 text-center`,children:[(0,V.jsxs)(`div`,{className:`reveal mx-auto inline-flex items-center gap-2 rounded-full border border-border bg-surface-elevated px-4 py-1.5 text-xs font-bold uppercase tracking-widest text-primary shadow-sm transition-all hover:border-primary/30 sm:text-sm`,children:[(0,V.jsx)(hj,{size:14,className:`shrink-0`,fill:`currentColor`}),e(`pricing.heroBadge`)]}),(0,V.jsxs)(`h1`,{className:`reveal reveal-delay-1 mx-auto mt-8 max-w-5xl text-balance text-4xl font-black leading-[1.05] tracking-tighter text-foreground sm:text-5xl md:text-6xl lg:text-7xl xl:text-8xl`,children:[e(`pricing.heroTitle`),` `,(0,V.jsx)(`br`,{}),(0,V.jsx)(`span`,{className:`bg-[image:var(--grad-primary)] bg-clip-text pb-1 box-decoration-clone text-transparent`,children:e(`pricing.heroTitleAccent`)})]}),(0,V.jsx)(`p`,{className:`reveal reveal-delay-2 mx-auto mt-8 max-w-2xl text-base leading-relaxed text-muted-foreground sm:text-lg md:text-xl lg:text-2xl`,children:e(`pricing.heroSubtitle`)})]}),(0,V.jsx)(C7,{position:`bottom`,className:`bg-[#edf2ff] dark:bg-[#0b0b26]`})]}),(0,V.jsxs)(`section`,{className:`relative bg-gradient-to-b from-[#edf2ff] via-[#f5f7ff] to-background py-20 pt-24 sm:py-24 sm:pt-32 md:py-28 md:pt-36 lg:py-32 lg:pt-40 dark:from-[#0b0b26] dark:via-[#0f0f30]/60 dark:to-[#040418]`,children:[(0,V.jsx)(C7,{position:`top`,className:`bg-[#edf2ff] dark:bg-[#0b0b26]`}),(0,V.jsx)(`div`,{className:`container relative z-10 mx-auto max-w-7xl px-4 sm:px-6 lg:px-8`,children:(0,V.jsx)(`div`,{className:`reveal`,children:(0,V.jsx)(S7,{ctaLabelOverride:e(`common.startFreeTrial`),onSelectPlan:()=>n(`/auth/signup`)})})})]}),(0,V.jsxs)(`section`,{className:`relative overflow-hidden bg-gradient-to-br from-[#e8efff] via-[#f0f4ff] to-[#edf5ff] pt-32 pb-40 sm:pt-40 sm:pb-48 md:pb-52 dark:from-[#0a0a28] dark:via-[#0d0d30] dark:to-[#0f172a]`,children:[(0,V.jsx)(`div`,{className:`absolute top-1/2 left-1/2 -z-10 h-[600px] w-[800px] -translate-x-1/2 -translate-y-1/2 opacity-10 blur-[120px] bg-primary/20 dark:opacity-5`}),(0,V.jsxs)(`div`,{className:`container mx-auto max-w-7xl px-4 sm:px-6 lg:px-8`,children:[(0,V.jsxs)(`div`,{className:`reveal mx-auto mb-12 max-w-3xl text-center sm:mb-16 lg:mb-20`,children:[(0,V.jsx)(`div`,{className:`mx-auto mb-4 flex h-12 w-12 items-center justify-center rounded-2xl bg-primary/10 text-primary sm:mb-6 sm:h-14 sm:w-14`,children:(0,V.jsx)(ej,{size:28})}),(0,V.jsx)(`h2`,{className:`text-3xl font-black tracking-tight text-foreground sm:text-4xl md:text-5xl lg:text-6xl`,children:e(`pricing.compareTitle`)}),(0,V.jsx)(`p`,{className:`mt-4 text-base text-muted-foreground sm:mt-6 sm:text-lg`,children:e(`pricing.compareSubtitle`)})]}),(0,V.jsx)(`div`,{className:`reveal card-premium mx-auto overflow-hidden rounded-2xl border border-border bg-surface shadow-sm backdrop-blur-sm sm:rounded-3xl dark:bg-surface/40`,children:(0,V.jsx)(`div`,{className:`overflow-x-auto`,children:(0,V.jsxs)(`table`,{className:`min-w-[740px] w-full border-collapse text-left`,children:[(0,V.jsx)(`thead`,{children:(0,V.jsxs)(`tr`,{className:`border-b border-border/50 bg-surface-elevated/80 backdrop-blur-md dark:bg-surface-elevated/40`,children:[(0,V.jsx)(`th`,{className:`px-4 py-4 text-xs font-black uppercase tracking-widest text-muted-foreground sm:px-6 sm:py-5 lg:px-10 lg:py-8`,children:e(`pricing.capabilities`)}),s.map(e=>(0,V.jsx)(`th`,{className:`px-4 py-4 text-center sm:px-6 sm:py-5 lg:px-10 lg:py-8`,children:(0,V.jsx)(`span`,{className:`text-base font-black tracking-tight sm:text-lg lg:text-xl ${e.name.trim().toLowerCase()===`plus`?`text-primary`:`text-foreground`}`,children:e.name})},e.id))]})}
470),(0,V.jsxs)(`tbody`,{className:`divide-y divide-border/50`,children:[(0,V.jsx)(w7,{label:e(`pricing.monthlyPrice`),values:s.map(e=>cx(e.price_monthly))}),(0,V.jsx)(w7,{label:e(`pricing.trialPeriod`),values:s.map(t=>e(`pricing.trialDays`,{days:t.trial_days}))}),o.map(t=>(0,V.jsx)(w7,{label:e(`pricing.searchesAtInterval`,{interval:t}),values:s.map(e=>{let n=sx(e,t);return n?`${n}`:(0,V.jsx)(E7,{})})},t)),(0,V.jsx)(w7,{label:e(`pricing.automatedFirstMessage`),values:s.map(e=>e.first_message_extension_enabled?(0,V.jsx)(T7,{}):(0,V.jsx)(E7,{}))}),(0,V.jsx)(w7,{label:e(`pricing.prioritySupport`),values:s.map(e=>e.name===`Min`?(0,V.jsx)(E7,{}):(0,V.jsx)(T7,{}))}),(0,V.jsx)(w7,{label:e(`pricing.marketplaceChatting`),values:s.map(()=>(0,V.jsx)(`span`,{className:`text-xs font-bold text-primary`,children:e(`pricing.aiNegotiator`)}))}),(0,V.jsx)(w7,{label:e(`pricing.automatedRelisting`),values:s.map(()=>(0,V.jsx)(`span`,{className:`text-xs font-bold text-primary`,children:e(`pricing.repost`)}))})]})]})})}),(0,V.jsx)(`p`,{className:`reveal mx-auto mt-6 max-w-2xl text-center text-sm text-muted-foreground`,children:e(`pricing.compareFootnote`)})]}),(0,V.jsx)(C7,{position:`bottom`,className:`bg-white dark:bg-[#040418]`})]}),(0,V.jsx)(`section`,{className:`relative bg-white pb-16 pt-10 sm:pb-20 sm:pt-12 md:pb-24 md:pt-14 lg:pb-28 lg:pt-16 dark:bg-[#040418]`,children:(0,V.jsx)(`div`,{className:`container relative z-10 mx-auto max-w-7xl px-4 sm:px-6 lg:px-8`,children:(0,V.jsxs)(`div`,{className:`grid grid-cols-1 gap-10 sm:gap-12 lg:grid-cols-12 lg:gap-20`,children:[(0,V.jsxs)(`div`,{className:`reveal lg:col-span-5`,children:[(0,V.jsxs)(`div`,{className:`inline-flex items-center gap-2 rounded-full border border-border bg-surface-elevated px-4 py-1.5 text-xs font-bold uppercase tracking-widest text-primary sm:text-sm`,children:[(0,V.jsx)(Hk,{size:14,className:`shrink-0`}),e(`pricing.faqSupportBadge`)]}),(0,V.jsxs)(`h2`,{className:`mt-6 text-3xl font-black tracking-tight text-foreground sm:mt-8 sm:text-4xl lg:text-5xl`,children:[e(`pricing.faqHeading`),` `,(0,V.jsx)(`br`,{}),` `,e(`pricing.faqHeadingAccent`)]}),(0,V.jsx)(`p`,{className:`mt-4 text-base leading-relaxed text-muted-foreground sm:mt-6 sm:text-lg`,children:e(`pricing.faqIntro`)}
470),(0,V.jsxs)(zi,{to:`/contact`,className:`mt-8 inline-flex items-center gap-2 text-sm font-bold text-primary transition-all hover:gap-3 sm:mt-10`,children:[e(`common.contactSupport`),` `,(0,V.jsx)(xk,{size:16})]})]}),(0,V.jsx)(`div`,{className:`lg:col-span-7`,children:(0,V.jsx)(`div`,{className:`flex flex-col gap-4`,children:rTe.map(t=>{let n=!!r[t.id];return(0,V.jsxs)(`div`,{className:`rounded-2xl border transition-all duration-300 ${n?`border-primary/30 bg-primary/5 shadow-lg shadow-primary/5 dark:bg-primary/10`:`border-border bg-surface-elevated/50 hover:border-border-strong`}`,children:[(0,V.jsxs)(`button`,{type:`button`,className:`flex w-full items-start justify-between gap-4 p-5 text-left sm:items-center sm:p-8`,"aria-expanded":n,"aria-controls":`pricing-faq-panel-${t.id}`,id:`pricing-faq-heading-${t.id}`,onClick:()=>c(t.id),children:[(0,V.jsx)(`span`,{className:`text-base font-bold text-foreground sm:text-xl`,children:e(t.questionKey)}),(0,V.jsx)(`div`,{className:`flex h-8 w-8 shrink-0 items-center justify-center rounded-full bg-primary/10 text-primary transition-all ${n?`rotate-180 bg-primary text-primary-foreground`:``}`,children:(0,V.jsx)(Ik,{size:18,"aria-hidden":!0})})]}),(0,V.jsx)(`div`,{id:`pricing-faq-panel-${t.id}`,role:`region`,"aria-labelledby":`pricing-faq-heading-${t.id}`,"aria-hidden":!n,className:`grid min-h-0 transition-all duration-500 ease-in-out ${n?`grid-rows-[1fr] opacity-100`:`grid-rows-[0fr] opacity-0`}`,children:(0,V.jsx)(`div`,{className:`min-h-0 overflow-hidden text-sm leading-relaxed text-muted-foreground transition-all duration-500 ease-in-out sm:text-lg ${n?`border-t border-border/50 px-5 pb-5 pt-5 sm:px-8 sm:pb-8 sm:pt-6`:`border-t border-transparent px-5 pb-0 pt-0 sm:px-8`}`,children:e(t.answerKey)})})]},t.id)})})})]})})}),(0,V.jsxs)(`section`,{className:`relative w-full overflow-hidden bg-gradient-to-tl from-[#e8efff] via-background to-[#edf5ff] py-28 pt-32 sm:py-40 sm:pt-44 dark:from-[#0d1a3a] dark:via-[#040418] dark:to-[#0a0a28]`,children:[(0,V.jsxs)(`div`,{className:`absolute inset-0 -z-10 overflow-hidden`,children:[(0,V.jsx)(`div`,{className:`absolute top-1/2 left-1/2 h-[500px] w-[500px] -translate-x-1/2 -translate-y-1/2 rounded-full bg-primary/20 blur-[120px] animate-pulse-glow dark:bg-primary/10`}),(0,V.jsx)(`div`,{className:`absolute top-0 right-0 h-[300px] w-[300px] rounded-full bg-accent/20 blur-[100px] animate-float-slow dark:bg-accent/10`}),(0,V.jsx)(`div`,{className:`absolute bottom-0 left-0 h-[400px] w-[400px] rounded-full bg-primary/15 blur-[120px] animate-float-slower dark:bg-primary/10`})]}),(0,V.jsx)(`div`,{className:`container relative z-10 mx-auto px-4 sm:px-6 lg:px-8`,children:(0,V.jsx)(`div`,{className:`reveal mx-auto max-w-5xl rounded-[2rem] border border-white/20 bg-surface/40 p-8 shadow-2xl backdrop-blur-xl sm:rounded-[3rem] sm:p-14 lg:p-20 dark:border-white/10 dark:bg-surface/30`,children:(0,V.jsxs)(`div`,{className:`mx-auto flex max-w-3xl flex-col items-center text-center`,children:[(0,V.jsx)(`div`,{className:`mb-5 flex h-12 w-12 items-center justify-center rounded-2xl bg-primary/10 text-primary sm:mb-6 sm:h-14 sm:w-14`,children:(0,V.jsx)(qA,{size:32})}),(0,V.jsxs)(`h2`,{className:`max-w-3xl text-balance text-4xl font-black leading-[1.05] tracking-tighter text-foreground sm:text-5xl md:text-6xl lg:text-7xl`,children:[e(`pricing.ctaTitle`),` `,(0,V.jsx)(`br`,{}),(0,V.jsx)(`span`,{className:`bg-[image:var(--grad-primary)] bg-clip-text text-transparent`,children:e(`pricing.ctaTitleAccent`)})]}),(0,V.jsx)(`p`,{className:`mt-5 max-w-xl text-base text-muted-foreground sm:mt-8 sm:text-xl`,children:e(`pricing.ctaBody`)}),(0,V.jsxs)(`div`,{className:`mx-auto mt-8 flex w-full max-w-md flex-col items-stretch justify-center gap-4 sm:mt-12 sm:max-w-none sm:flex-row sm:items-center sm:justify-center`,children:[(0,V.jsxs)(zi,{to:`/auth/signup`,className:`group relative flex overflow-hidden w-full items-center justify-center gap-2 rounded-full bg-primary px-8 py-4 text-sm font-bold tracking-wide text-primary-foreground transition-all hover:scale-105 hover:bg-primary-hover hover:shadow-[0_0_40px_rgba(37,99,235,0.4)] sm:w-auto
470sm:px-10 sm:py-5 sm:text-base`,children:[(0,V.jsxs)(`span`,{className:`relative z-10 flex items-center gap-2`,children:[e(`pricing.ctaStartTrial`),(0,V.jsx)(xk,{size:20,className:`transition-transform duration-300 group-hover:translate-x-1`})]}),(0,V.jsx)(`div`,{className:`absolute inset-0 -translate-x-full bg-gradient-to-r from-transparent via-white/20 to-transparent transition-transform duration-1000 group-hover:translate-x-full`})]}),(0,V.jsx)(zi,{to:`/contact`,className:`flex w-full items-center justify-center rounded-full border-2 border-border bg-surface px-8 py-4 text-sm font-bold tracking-wide text-foreground transition-all hover:border-primary/30 hover:bg-surface-hover sm:w-auto sm:px-10 sm:py-5 sm:text-base`,children:e(`pricing.contactSales`)})]})]})})})]})]})}function w7({label:e,values:t}){return(0,V.jsxs)(`tr`,{className:`transition-colors hover:bg-surface-hover/50`,children:[(0,V.jsx)(`td`,{className:`whitespace-nowrap px-4 py-4 text-xs font-bold text-foreground/80 sm:px-6 sm:py-5 sm:text-sm lg:px-10 lg:py-8 lg:text-base`,children:e}),t.map((e,t)=>(0,V.jsx)(`td`,{className:`whitespace-nowrap px-4 py-4 text-center text-xs font-medium text-muted-foreground sm:px-6 sm:py-5 sm:text-sm lg:px-10 lg:py-8 lg:text-base`,children:(0,V.jsx)(`div`,{className:`flex items-center justify-center`,children:e})},t))]})}function T7(){return(0,V.jsx)(`div`,{className:`flex h-7 w-7 items-center justify-center rounded-full bg-success/10 text-success`,children:(0,V.jsx)(Fk,{size:16,strokeWidth:4})})}function E7(){return(0,V.jsx)(DA,{size:18,className:`text-border-strong opacity-40`})}function oTe(){let e=my(),t=Or();return(0,b.useEffect)(()=>{console.error(`Unhandled route error:`,t)},[t]),(0,V.jsxs)(`div`,{className:`relative flex w-full flex-col items-center justify-center overflow-x-hidden bg-background px-4 py-12 sm:px-5 sm:py-20 min-h-[100dvh]`,children:[(0,V.jsx)(`div`,{className:`pointer-events-none absolute inset-0 -z-10 overflow-x-hidden`,"aria-hidden":`true`,children:(0,V.jsx)(`div`,{className:`absolute top-1/2 left-1/2 h-[min(100vw,600px)] w-[min(100vw,600px)] -translate-x-1/2 -translate-y-1/2 rounded-full bg-primary/10 blur-[120px] sm:h-[600px] sm:w-[600px]`})}),(0,V.jsxs)(`div`,{className:`container relative mx-auto w-full max-w-2xl px-0 text-center sm:px-4`,children:[(0,V.jsx)(`h1`,{className:`mx-auto max-w-xl text-balance text-2xl font-black tracking-tight text-foreground sm:text-3xl md:text-4xl`,children:e(`routeError.title`)}),(0,V.jsx)(`p`,{className:`mx-auto mt-4 max-w-md px-1 text-base leading-relaxed text-muted-foreground sm:mt-6 sm:text-lg`,children:e(`routeError.description`)}),(0,V.jsxs)(`div`,{className:`mx-auto mt-10 flex w-full max-w-md flex-col items-stretch justify-center gap-3 sm:mt-12 sm:max-w-lg sm:flex-row sm:items-center sm:gap-4`,children:[(0,V.jsxs)(`button`,{type:`button`,onClick:()=>window.location.reload(),className:`flex min-h-12 w-full items-center justify-center gap-2 rounded-xl bg-primary px-6 py-3 text-sm font-black text-primary-foreground transition-all hover:bg-primary-hover active:scale-[0.98] sm:w-auto sm:px-8`,children:[(0,V.jsx)(qae,{className:`h-[1.125rem] w-[1.125rem] shrink-0`,strokeWidth:2.5}),e(`common.reload`)]}),(0,V.jsxs)(zi,{to:`/`,className:`flex min-h-12 w-full items-center justify-center gap-2 rounded-xl border border-border bg-surface px-6 py-3 text-sm font-black text-foreground transition-all hover:border-primary/50 active:scale-[0.98] sm:w-auto sm:px-8`,children:[(0,V.jsx)(cA,{className:`h-[1.125rem] w-[1.125rem] shrink-0`,strokeWidth:2.5}),e(`common.backToHome`)]})]}),(0,V.jsxs)(`div`,{className:`mt-10 flex flex-wrap items-center justify-center gap-x-3 gap-y-2 text-xs font-bold uppercase tracking-widest text-muted-foreground sm:mt-14 sm:text-sm`,children:[(0,V.jsx)(`div`,{className:`hidden h-px w-6 bg-border sm:block sm:w-8`}),(0,V.jsx)(zi,{to:`/contact`,className:`hover:text-foreground`,children:e(`common.contactSupport`)}),(0,V.jsx)(`div`,{className:`hidden h-px w-6 bg-border sm:block sm:w-8`})]})]})]})}function sTe(e){if(typeof e==`number`&&Number.isFinite(e))return e;if(typeof e==`string`&&e.trim()!==``){let t=Number(e);if(Number.isFinite(t))return t}}function D7(e){return typeof e==`string`?e:void 0}function cTe(e,t){let n=sTe(t.listings_found??t.total_listings_found),r=t.last_checked_at??t.last_execution;return{...e,...t.name===void 0?{}:{name:String(t.name)},...t.is_active===void 0?{}:{is_active:!!t.is_active},...n===void 0?{}:{listings_found:n},...r==null?{}:{last_execution:typeof r==`string`?r:String(r)},...D7(t.provider)===void 0?{}:{provider:D7(t.provider)},...t.hubs_count===void 0?{}:{hubs_count:typeof t.hubs_count==`number`?t.hubs_count:null}}}var O7=24;function lTe(){let e=my(),t=or(),{status:n,isAuthenticated:r}=Jv(),{gateReady:i,canAccessCreateSearchRoutes:a}=Vj(),[o,s]=(0,b.useState)([]),[c,l]=(0,b.useState)(0),[u,d]=(0,b.useState)(1),[f,p]=(0,b.useState)(!1),[m,h]=(0,b.useState)(``),[g,_]=(0,b.useState)(!0),[v,y]=(0,b.useState)(!1),[x,S]=(0,b.useState)(!0),C=(0,b.useCallback)(async()=>{try{S((await Lo.get(`/api/dashboard/overview`)).data.quick_actions.max_searches_reached)}catch{S(!0)}},[]),w=(0,b.useCallback)((e,t)=>{let n=e.data.searches.map(e=>_j(e));l(e.data.total_count),p(e.data.has_next),d(e.data.page),s(t?e=>[...e,...n]:n)},[]),T=(0,b.useCallback)(async(e,t)=>{w(await Lo.get(`/api/searches/`,{query:{page:e,per_page:O7}}),t)},[w]),E=(0,b.useCallback)(async()=>{h(``),_(!0);try{let[e]=await Promise.all([Lo.get(`/api/searches/`,{query:{page:1,per_page:O7}}),C()]);w(e,!1)}catch(t){console.error(t),h(Yv(e,t)),s([]),l(0),p(!1)}finally{_(!1)}},[w,C]),D=(0,b.useCallback)(async()=>{h(``);try{await Promise.all([T(1,!1),C()])}catch(t){console.error(t),h(Yv(e,t))}},[T,C]),O=(0,b.useCallback)(async()=>
470{if(!(!f||v||g)){y(!0);try{await T(u+1,!0)}catch(t){console.error(t),h(Yv(e,t))}finally{y(!1)}}},[T,f,g,v,u]);Fj({onSearchCreated:e=>{try{let t=_j(e);s(e=>e.some(e=>e.id===t.id)?e:(l(e=>e+1),[t,...e])),C()}catch{D()}},onSearchUpdated:e=>{let t=String(e.id??``);t&&s(n=>{let r=n.findIndex(e=>e.id===t);if(r===-1)return n;let i=[...n];return i[r]=cTe(n[r],e),i})},onSearchDeleted:e=>{s(t=>t.filter(t=>t.id!==e)),l(e=>Math.max(0,e-1)),C()},onSearchStatusChanged:(e,t)=>{s(n=>n.map(n=>n.id===e?{...n,is_active:t}:n))},onRefreshFallback:()=>{D()}}),(0,b.useEffect)(()=>{if(n===`loading`)return;if(!r){t(`/auth/login`,{replace:!0});return}let e=!1;return(async()=>{await Promise.resolve(),!e&&await E()})(),()=>{e=!0}},[r,t,n,E]);let{beginCreateSearch:k,createSearchModal:A}=qz({existingSearchCount:c,initialSearches:o});if(n===`loading`)return(0,V.jsx)(`div`,{className:`flex min-h-[60vh] items-center justify-center px-4`,children:(0,V.jsx)(`p`,{className:`text-sm font-medium text-muted-foreground`,children:e(`searches.loading`)})});if(!r)return null;let j=!g&&i,M=a&&!x;return(0,V.jsxs)(V.Fragment,{children:[A,(0,V.jsxs)(ik.main,{initial:{opacity:0}
470,animate:{opacity:1},className:`mx-auto min-h-[60vh] w-full min-w-0 max-w-7xl overflow-x-hidden px-3 py-6 sm:px-6 sm:py-10 lg:px-8`,children:[(0,V.jsxs)(`div`,{className:`mb-8 flex flex-col gap-4 sm:mb-12 sm:gap-6 sm:flex-row sm:items-center sm:justify-between`,children:[(0,V.jsxs)(`div`,{children:[(0,V.jsx)(`h1`,{className:`text-[34px] font-black leading-tight tracking-tight text-foreground sm:text-[40px]`,children:e(`searches.title`)}),g?null:(0,V.jsx)(`div`,{className:`mt-3 flex items-center gap-4`,children:(0,V.jsx)(`p`,{className:`text-sm font-medium text-muted-foreground/80 sm:text-lg`,children:e(c===1?`searches.savedCountOne`:`searches.savedCountMany`,{count:c})})})]}),j?M?(0,V.jsxs)(`button`,{type:`button`,onClick:k,className:`flex h-12 w-full items-center justify-center gap-2 rounded-2xl bg-primary px-6 text-sm font-black text-primary-foreground shadow-lg shadow-primary/20 transition-all hover:scale-105 hover:bg-primary/90 active:scale-95 sm:w-auto`,children:[(0,V.jsx)(IA,{size:20}),e(`common.createNewSearch`)]}):(0,V.jsxs)(zi,{to:`/dashboard/settings/subscription`,className:`flex h-12 w-full items-center justify-center gap-2 rounded-2xl bg-orange-500 px-6 text-sm font-black text-white shadow-lg shadow-orange-500/20 transition-all hover:scale-105 hover:bg-orange-600 active:scale-95 sm:w-auto`,children:[(0,V.jsx)(hj,{size:20}),e(`common.upgradeToAddSearch`)]}):null]}),m?(0,V.jsx)(`div`,{className:`mb-8 rounded-2xl border border-error/30 bg-error/5 px-4 py-3 text-sm font-medium text-error`,role:`alert`,children:m}):null,(0,V.jsx)(`section`,{children:g?(0,V.jsx)(`div`,{className:`grid gap-4 md:grid-cols-2 xl:grid-cols-3`,children:Array.from({length:6}).map((e,t)=>(0,V.jsx)(`div`,{className:`h-[280px] animate-pulse rounded-[2rem] border border-border/40 bg-surface-elevated/40`},`sk-${t}`))}):o.length>0?(0,V.jsxs)(V.Fragment,{children:[(0,V.jsx)(`div`,{className:`grid gap-4 md:grid-cols-2 xl:grid-cols-3`,children:o.map((e,t)=>(0,V.jsx)(Wz,{search:e,idx:t,onSearchStatusChanged:()=>{D()}},`${e.id}-${e.is_active}`))}),f?(0,V.jsx)(`div`,{className:`mt-10 flex justify-center`,children:(0,V.jsx)(`button`,{type:`button`,disabled:v,onClick:()=>void O(),className:`inline-flex items-center gap-2 rounded-2xl border border-border bg-surface px-6 py-3 text-sm font-bold text-foreground transition hover:border-primary/40 hover:bg-surface-elevated disabled:opacity-50`,children:v?(0,V.jsxs)(V.Fragment,{children:[(0,V.jsx)(zA,{size:16,className:`animate-spin`}),e(`common.loadingMore`)]}):e(`common.loadMore`)})}):null]}):j?o.length===0&&M?(0,V.jsxs)(`div`,{className:`flex flex-col items-center justify-center rounded-3xl border border-dashed border-border/80 bg-surface/60 px-6 py-16 text-center`,children:[(0,V.jsx)(`div`,{className:`flex h-14 w-14 items-center justify-center rounded-2xl bg-primary/10 text-primary`,children:(0,V.jsx)(UA,{size:28,strokeWidth:2})}),(0,V.jsx)(`h2`,{className:`mt-6 text-xl font-black text-foreground`,children:e(`searches.noSearchesYet`)}),(0,V.jsx)(`p`,{className:`mt-2 max-w-md text-sm text-muted-foreground`,children:e(`searches.noSearchesDescription`)}),(0,V.jsxs)(zi,{to:`/dashboard/searches/new`,className:`mt-8 inl
470ine-flex items-center gap-2 rounded-2xl bg-primary px-6 py-3 text-sm font-black text-primary-foreground shadow-md transition hover:bg-primary/90`,children:[(0,V.jsx)(IA,{size:18,strokeWidth:2.5}),e(`common.createNewSearch`)]})]}):(0,V.jsxs)(`div`,{className:`flex flex-col items-center justify-center rounded-3xl border border-dashed border-orange-500/25 bg-orange-500/[0.06] px-6 py-16 text-center`,children:[(0,V.jsx)(`div`,{className:`flex h-14 w-14 items-center justify-center rounded-2xl bg-orange-500/15 text-orange-600 dark:text-orange-400`,children:(0,V.jsx)(hj,{size:28,strokeWidth:2})}),(0,V.jsx)(`h2`,{className:`mt-6 text-xl font-black text-foreground`,children:e(`searches.subscribeToCreate`)}),(0,V.jsx)(`p`,{className:`mt-2 max-w-md text-sm text-muted-foreground`,children:e(`searches.subscribeDescription`)}),(0,V.jsxs)(zi,{to:`/dashboard/settings/subscription`,className:`mt-8 inline-flex items-center gap-2 rounded-2xl bg-orange-500 px-6 py-3 text-sm font-black text-white shadow-md shadow-orange-500/20 transition hover:bg-orange-600`,children:[(0,V.jsx)(hj,{size:18,strokeWidth:2.5}),e(`common.upgradeToAddSearch`)]})]}):null})]})]})}function uTe(){return(0,V.jsxs)(`div`,{className:`pointer-events-none absolute inset-0 z-0 overflow-hidden`,"aria-hidden":!0,children:[(0,V.jsx)(`div`,{className:`absolute -left-20 top-0 h-[min(600px,80vh)] w-[min(600px,80vw)] rounded-full bg-primary/5 blur-[150px]`}),(0,V.jsx)(`div`,{className:`absolute -right-20 bottom-0 h-[min(600px,80vh)] w-[min(600px,80vw)] rounded-full bg-primary/5 blur-[150px]`})]})}var k7=(0,b.createContext)(null);function dTe(){let e=(0,b.useContext)(k7);if(!e)throw Error(`useSettingsReturn must be used within SettingsReturnProvider`);return e}function A7(){let{exitSettings:e}=dTe();return(0,b.useCallback)(()=>{e()},[e])}function j7({onLogout:e,variant:t=`sidebar`}){let n=my();return t===`header`?(0,V.jsxs)(`button`,{type:`button`,onClick:e,className:`inline-flex shrink-0 items-center gap-1.5 rounded-lg px-2.5 py-2 text-xs font-bold text-error transition hover:bg-error/10 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-error/40 sm:gap-2 sm:px-3 sm:text-sm`,"aria-label":n(`common.signOut`),children:[(0,V.jsx)(yA,{size:18,strokeWidth:2.25,"aria-hidden":!0}),n(`common.logout`)]}):(0,V.jsxs)(`button`,{type:`button`,onClick:e,className:`flex w-full items-center justify-center gap-2 rounded-xl border border-error/20 bg-error/5 px-4 py-3 text-sm font-bold text-error transition hover:border-error/35 hover:bg-error/10 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-error/40`,children:[(0,V.jsx)(yA,{size:18,strokeWidth:2,"aria-hidden":!0}),n(`common.logout`)]})}function M7(){let{canUseAiNegotiationFeatures:e,status:t}=bj(),{status:n}=Sy(),r=Lj(t,n);return{gateReady:r,canAccessAiSettings:r&&e,shouldHideAiSettings:r&&!e,accessStatus:t,subscriptionStatus:n}}function N7(){let{gateReady:e,canAccessChatFeatures:t,shouldHideChatFeatures:n,accessStatus:r,subscriptionStatus:i}=Rj();return{gateReady:e,canAccessExtensionSettings:t,shouldHideExtensionSettings:n,accessStatus:r,subscriptionStatus:i}}function fTe(e){return[`inline-flex shrink-0 items-center gap-1.5 whitespace-nowrap rounded-full px-3.5 py-2 text-xs font-bold transition sm:gap-2 sm:px-4 sm:text-sm`,e?`bg-primary text-primary-foreground shadow-sm`:`bg-surface-elevated text-muted-foreground hover:text-foreground`].join(` `)}function pTe(){let e=my(),t=kM(),{shouldHideAiSettings:n}=M7(),{shouldHideExtensionSettings:r}=N7(),i=KN({shouldHideAiSettings:n,shouldHideExtensionSettings:r});return(0,V.jsx)(`nav`,{"aria-label":e(`settings.sectionsAria`),children:(0,V.jsx)(`div`,{className:`-mx-1 flex gap-2 overflow-x-auto overscroll-x-contain px-1 pb-0.5 [scrollbar-width:none] [&::-webkit-scrollbar]:hidden`,children:i.map(n=>{let r=n.icon,i=n.id===`extension`&&t;return(0,V.jsxs)(Bi,{to:YN(n.path),replace:!0,className:({isActive:e})=>fTe(e),end:n.path!==`favorites`,children:[(0,V.jsxs)(`span`,{className:`relative inline-flex shrink-0`,children:[(0,V.jsx)(r,{size:14,strokeWidth:2.25,"aria-hidden":!0}),i?(0,V.jsx)(AM,{className:`absolute -right-1 -top-0.5`}):null]}),e(n.labelKey)]},n.id)})})})}function mTe({onLogout:e}){let t=my();return(0,V.jsxs)(`header`,{className:`relative z-30 shrink-0 border-b border-border/40 bg-surface lg:hidden`,children:[(0,V.jsxs)(`div`,{className:`flex items-center justify-between gap-3 px-4 py-3`,children:[(0,V.jsxs)(`button`,{type:`button`,onClick:A7(),className:`inline-flex min-w-0 flex-1 items-center gap-2 text-left text-foreground transition hover:text-primary`,children:[(0,V.jsx)(bk,{size:20,strokeWidth:2.25,className:`shrink-0`,"aria-hidden":!0}),(0,V.jsx)(`span`,{className:`truncate text-base font-black tracking-tight`,children:t(`settings.title`)})]}),(0,V.jsx)(j7,{variant:`header`,onLogout:()=>void e()})]}),(0,V.jsx)(`div`,{className:`border-t border-border/40 px-4 pb-3 pt-2`,children:(0,V.jsx)(pTe,{})})]})}function hTe(e){return[`flex w-full items-center gap-3 rounded-lg px-3 py-2.5 text-left text-sm font-semibold transition`,e?`bg-primary/10 text-primary`:`text-muted-foreground hover:bg-surface-elevated hover:text-foreground`].join(` `)}function gTe({item:e,showExtensionOfflineDot:t=!1}){let n=e.icon,r=my();return(0,V.jsxs)(Bi,{to:YN(e.path),replace:!0,className:({isActive:e})=>hTe(e),end:e.path!==`favorites`,children:[(0,V.jsxs)(`span`,{className:`relative shrink-0`,children:[(0,V.jsx)(n,{size:18,strokeWidth:2,className:`opacity-80`,"aria-hidden":!0}),t?(0,V.jsx)(AM,{className:`absolute -right-0.5 -top-0.5`}):null]}),(0,V.jsx)(`span`,{className:`min-w-0 flex-1 truncate`,children:r(e.labelKey)})]})}
470function _Te(){let e=my(),t=kM(),{shouldHideAiSettings:n}=M7(),{shouldHideExtensionSettings:r}=N7(),i=GN({shouldHideAiSettings:n,shouldHideExtensionSettings:r});return(0,V.jsx)(`nav`,{"aria-label":e(`settings.sectionsAria`),children:(0,V.jsx)(`div`,{className:`space-y-6`,children:i.map(n=>(0,V.jsxs)(`div`,{children:[(0,V.jsx)(`p`,{className:`mb-1.5 px-3 text-[10px] font-bold uppercase tracking-widest text-muted-foreground/70`,children:e(n.labelKey)}),(0,V.jsx)(`ul`,{className:`space-y-0.5`,children:n.items.map(e=>(0,V.jsx)(`li`,{children:(0,V.jsx)(gTe,{item:e,showExtensionOfflineDot:e.id===`extension`&&t})},e.id))})]},n.id))})})}function vTe({onLogout:e}){let t=my(),n=A7();return(0,V.jsxs)(`aside`,{className:`relative z-20 hidden h-[100dvh] w-[min(100%,280px)] shrink-0 flex-col border-r border-border/40 bg-surface shadow-sm lg:flex`,"aria-label":t(`settings.navAria`),children:[(0,V.jsxs)(`div`,{className:`shrink-0 border-b border-border/60 px-5 pb-4 pt-6`,children:[(0,V.jsx)(`button`,{type:`button`,onClick:n,className:`mb-3 inline-flex h-9 w-9 items-center justify-center rounded-xl border border-border bg-surface-elevated text-foreground transition hover:border-primary/30 hover:bg-primary/5 hover:text-primary`,"aria-label":t(`common.goBack`),children:(0,V.jsx)(bk,{size:18,strokeWidth:2.25,"aria-hidden":!0})}),(0,V.jsx)(`h1`,{className:`text-xl font-black tracking-tight text-foreground`,children:t(`settings.title`)}),(0,V.jsx)(`p`,{className:`mt-1 text-xs text-muted-foreground`,children:t(`settings.subtitle`)})]}),(0,V.jsx)(`div`,{className:`min-h-0 flex-1 overflow-y-auto overscroll-contain px-2 py-4 [scrollbar-width:none] [-ms-overflow-style:none] [&::-webkit-scrollbar]:hidden`,children:(0,V.jsx)(_Te,{})}),(0,V.jsx)(`footer`,{className:`shrink-0 border-t border-border/60 p-4`,children:(0,V.jsx)(j7,{variant:`sidebar`,onLogout:()=>void e()})})]})}function yTe({children:e}){let t=or(),n=nr(),r=(0,b.useMemo)(()=>pM(n.state),[n.key]),i=(0,b.useCallback)(()=>{t(r,{replace:!0})},[t,r]),a=(0,b.useMemo)(()=>({returnTo:r,exitSettings:i}),[i,r]);return(0,V.jsx)(k7.Provider,{value:a,children:e})}function bTe(){let e=my(),t=or(),{status:n,isAuthenticated:r,logout:i}=Jv();(0,b.useEffect)(()=>{n!==`loading`&&(r||t(`/auth/login`,{replace:!0}))},[r,t,n]);let a=async()=>{await i(),t(`/auth/login`,{replace:!0})};return n===`loading`?(0,V.jsx)(`div`,{className:`flex h-[100dvh] items-center justify-center px-4`,children:(0,V.jsxs)(`div`,{className:`flex flex-col items-center gap-3`,children:[(0,V.jsx)(`div`,{className:`h-10 w-10 animate-spin rounded-full border-2 border-primary border-t-transparent`}),(0,V.jsx)(`p`,{className:`text-sm font-medium text-muted-foreground`,children:e(`common.loadingSettings`)})]})}):r?(0,V.jsx)(yTe,{children:(0,V.jsxs)(`div`,{className:`flex h-[100dvh] min-h-0 overflow-hidden`,children:[(0,V.jsx)(vTe,{onLogout:a}),(0,V.jsxs)(`div`,{className:`flex min-h-0 min-w-0 flex-1 flex-col`,children:[(0,V.jsx)(mTe,{onLogout:a}),(0,V.jsxs)(`main`,{className:`relative z-10 min-h-0 flex-1 overflow-y-auto overflow-x-hidden`,children:[(0,V.jsx)(uTe,{}),(0,V.jsx)(`div`,{className:`relative z-10 mx-auto w-full max-w-3xl px-4 py-6 sm:px-6 sm:py-8 md:max-w-4xl lg:max-w-5xl xl:max-w-6xl 2xl:max-w-7xl lg:px-10 lg:py-10 pb-[max(1.5rem,env(safe-area-inset-bottom))]`,children:(0,V.jsx)(Gr,{})})]})]})]})}):null}function xTe(){return(0,V.jsx)(Wr,{to:YN(UN),replace:!0})}function P7({children:e,gateReady:t,canAccess:n,redirectTo:r,deniedReason:i=`generic`}){let a=my(),{showToast:o}=Gx(),s=(0,b.useRef)(!1),c=t&&!n;return(0,b.useEffect)(()=>{!c||s.current||(s.current=!0,o(CI(a,i)))},[i,c,o,a]),t?c?(0,V.jsx)(Wr,{to:r,replace:!0}):e:null}function STe({children:e}){let{gateReady:t,canAccessAiSettings:n}=M7(),{accessStatus:r,hasAiNegotiationAddon:i}=bj();return(0,V.jsx)(P7,{gateReady:t,canAccess:n,deniedReason:DI(r,i),redirectTo:YN(UN),children:e})}function CTe({children:e}){let{gateReady:t,canAccessExtensionSettings:n}=N7(),{accessStatus:r}=bj();return(0,V.jsx)(P7,{gateReady:t,canAccess:n,deniedReason:EI(r),redirectTo:YN(UN),children:e})}function wTe({title:e,description:t,icon:n=wae}){return(0,V.jsx)(ik.div,{initial:{opacity:0,y:4}
470,animate:{opacity:1,y:0},className:`rounded-2xl border border-dashed border-border bg-surface p-6 shadow-sm sm:p-8`,children:(0,V.jsxs)(`div`,{className:`flex flex-col items-center gap-4 text-center sm:flex-row sm:text-left`,children:[(0,V.jsx)(ik.div,{animate:{y:[0,-4,0]},transition:{duration:2.5,repeat:1/0,ease:`easeInOut`},className:`flex h-14 w-14 shrink-0 items-center justify-center rounded-2xl border border-border bg-surface-elevated text-muted-foreground`,children:(0,V.jsx)(n,{size:24,strokeWidth:1.75})}),(0,V.jsxs)(ik.div,{initial:{opacity:0},animate:{opacity:1},transition:{delay:.08},className:`min-w-0 flex-1`,children:[(0,V.jsx)(`p`,{className:`text-sm font-bold text-foreground`,children:e}),(0,V.jsx)(`p`,{className:`mt-1 text-sm leading-relaxed text-muted-foreground`,children:t})]})]})})}function F7({title:e,description:t,children:n,badge:r}){return(0,V.jsxs)(ik.section,{initial:{opacity:0,y:6},animate:{opacity:1,y:0},transition:{duration:.25,ease:[.16,1,.3,1]},className:`min-w-0`,children:[(0,V.jsxs)(`header`,{className:`pb-6 sm:pb-8`,children:[(0,V.jsxs)(ik.div,{initial:{opacity:0,y:4},animate:{opacity:1,y:0},className:`flex flex-wrap items-center gap-2`,children:[(0,V.jsx)(`h1`,{className:`text-2xl font-black tracking-tight text-foreground sm:text-3xl`,children:e}),r?(0,V.jsx)(`span`,{className:`rounded-full border border-primary/25 bg-primary/10 px-2.5 py-0.5 text-[10px] font-bold uppercase tracking-wider text-primary sm:text-xs`,children:r}):null]}),(0,V.jsx)(`p`,{className:`mt-2 text-sm leading-relaxed text-muted-foreground sm:text-base`,children:t})]}),(0,V.jsx)(ik.div,{initial:{opacity:0}
470,animate:{opacity:1},transition:{delay:.05,duration:.2},className:`space-y-4`,children:n})]})}function TTe(e){return function(){let t=my(),n=t(e.labelKey);return(0,V.jsx)(F7,{title:n,description:t(e.descriptionKey),badge:t(`settings.placeholder.badge`),children:(0,V.jsx)(wTe,{title:t(`settings.placeholder.title`),description:t(`settings.placeholder.description`,{section:n.toLowerCase()}),icon:e.icon})})}}async function ETe(e){return(await Lo.patch(`/api/users/me/ai-reply-delay`,{ai_reply_delay_minutes:e})).data}function DTe(e){if(e instanceof ho){if(e.status===422)return`Enter a delay between 1 minute and 24 hours.`;if(e.details?.message)return e.details.message}return`Could not update AI reply delay. Please try again.`}function I7({title:e,description:t,children:n,variant:r=`default`}){let i=r===`danger`;return(0,V.jsxs)(`section`,{className:[`overflow-hidden rounded-2xl border shadow-sm`,i?`border-error/25 bg-surface`:`border-border bg-surface`].join(` `),children:[(0,V.jsxs)(`header`,{className:[`border-b px-4 py-4 sm:px-6 sm:py-5`,i?`border-error/20 bg-error/5`:`border-border/60 bg-surface-elevated/40`].join(` `),children:[(0,V.jsx)(`h2`,{className:[`text-sm font-black tracking-tight sm:text-base`,i?`text-error`:`text-foreground`].join(` `),children:e}),t?(0,V.jsx)(`p`,{className:`mt-1 text-xs leading-relaxed text-muted-foreground sm:text-sm`,children:t}):null]}),(0,V.jsx)(`div`,{className:`px-4 py-5 sm:px-6 sm:py-6`,children:n})]})}var OTe=[5,10,15,30,60,120,240,720];function L7(e,t){if(e>=60&&e%60==0){let n=e/60;return t(n===1?`settingsAiDelay.hourOne`:`settingsAiDelay.hourOther`,{count:n})}if(e>=60){let n=Math.floor(e/60),r=e%60,i=t(n===1?`settingsAiDelay.hourOne`:`settingsAiDelay.hourOther`,{count:n});return r===0?i:`${i} ${t(r===1?`settingsAiDelay.minuteOne`:`settingsAiDelay.minuteOther`,{count:r})}`}return t(e===1?`settingsAiDelay.minuteOne`:`settingsAiDelay.minuteOther`,{count:e})}function R7(e){return e>=60&&e%60==0?`hours`:`minutes`}function z7(e,t){return String(t===`hours`?Math.floor(e/60):e)}function B7(e,t){let n=e.trim();if(!n)return null;let r=Number.parseInt(n,10);return!Number.isFinite(r)||r<=0?null:t===`hours`?r*60:r}function V7(e,t){if(t===`minutes`)return e>=1&&e<=1440;let n=e/60;return n>=1&&n<=24}function kTe(){let e=my(),{user:t,refreshUser:n}=Jv(),r=t?.ai_reply_delay_minutes??5,[i,a]=(0,b.useState)(r),[o,s]=(0,b.useState)(()=>R7(r)),[c,l]=(0,b.useState)(()=>z7(r,R7(r))),[u,d]=(0,b.useState)(null),[f,p]=(0,b.useState)(!1),[m,h]=(0,b.useState)(null),[g,_]=(0,b.useState)(r);if(r!==g){let e=R7(r);_(r),a(r),s(e),l(z7(r,e)),d(null)}let v=(0,b.useMemo)(()=>B7(c,o),[c,o]),y=v!==null&&v!==i&&!f&&v!==null&&V7(v,o),x=(0,b.useCallback)(e=>{let t=R7(e);s(t),l(z7(e,t)),d(null),h(null)},[]),S=(0,b.useCallback)(e=>{if(e===o)return;let t=B7(c,o);s(e),t!==null&&l(z7(t,e)),d(null)},[c,o]),C=(0,b.useCallback)(async()=>{if(v===null||!V7(v,o)){d(e(`settingsAiDelay.rangeError`));return}p(!0),d(null),h(null);try{await ETe(v),await n(),a(v),h(e(`settingsAiDelay.updatedTo`,{delay:L7(v,e)}))}catch(e){d(DTe(e))}finally{p(!1)}},[n,v,e,o]),w=o===`minutes`?1440:24;return(0,V.jsxs)(F7,{title:e(`settings.aiReplyDelay.title`),description:e(`settings.aiReplyDelay.description`),children:[(0,V.jsx)(`div`,{className:`rounded-2xl border border-border/60 bg-surface-elevated/40 p-4 sm:p-5`,children:(0,V.jsxs)(`div`,{className:`flex gap-3`,children:[(0,V.jsx)(uA,{size:18,className:`mt-0.5 shrink-0 text-primary`,"aria-hidden":!0}),(0,V.jsx)(`p`,{className:`text-sm leading-relaxed text-muted-foreground`,children:e(`settingsAiDelay.infoBlurb`,{delay:L7(i,e)})})]})}),(0,V.jsx)(I7,{title:e(`settings.aiReplyDelay.presetDurations`),children:(0,V.jsx)(`div`,{className:`flex flex-wrap gap-2.5`,children:OTe.map(t=>(0,V.jsx)(`button`,{type:`button`,onClick:()=>x(t),className:`rounded-xl border px-4 py-2.5 text-sm font-bold transition ${v===t?`border-primary bg-primary text-primary-foreground shadow-sm`:`border-border bg-surface-elevated text-foreground hover:border-primary/30 hover:bg-primary/5`}`,children:L7(t,e)},t))})}),(0,V.jsx)(I7,{title:e(`settings.aiReplyDelay.customDelay`),description:e(o===`minutes`?`settingsAiDelay.allowedRangeMinutes`:`settingsAiDelay.allowedRangeHours`),children:(0,V.jsxs)(`div`,{className:`space-y-4`,children:[(0,V.jsx)(`div`,{className:`inline-flex rounded-xl border border-border bg-surface-elevated p-1`,role:`group`,"aria-label":e(`settingsAiDelay.delayUnitAria`),children:[`minutes`,`hours`].map(t=>(0,V.jsx)(`button`,{type:`button`,onClick:()=>S(t),className:`rounded-lg px-4 py-2 text-sm font-bold capitalize transition ${o===t?`bg-primary text-primary-foreground shadow-sm`:`text-muted-foreground hover:text-foreground`}`,children:e(t===`minutes`?`settingsAiDelay.unitMinutes`:`settingsAiDelay.unitHours`)},t))}),(0,V.jsxs)(`div`,{className:`max-w-xs`,children:[(0,V.jsx)(`label`,{htmlFor:`ai-reply-delay-value`,className:`sr-only`,children:e(`settingsAiDelay.customValueAria`)}),(0,V.jsxs)(`div`,{className:`relative`,children:[(0,V.jsx)(`input`,{id:`ai-reply-delay-value`,type:`text`,inputMode:`numeric`,autoComplete:`off`,value:c,onChange:e=>{let t=e.target.value;t!==``&&!/^\d+$/.test(t)||t.startsWith(`0`)||t!==``&&Number.parseInt(t,10)>w||(l(t),d(null),h(null))},className:`w-full rounded-xl border border-border bg-surface px-4 py-3 pr-14 text-center text-lg font-bold text-foreground transition focus:border-primary focus:outline-none focus:ring-4 focus:ring-primary/10`}),(0,V.jsx)(`span`,{className:`pointer-events-none absolute right-4 top-1/2 -translate-y-1/2 text-sm font-semibold text-muted-foreground`,children:e(o===`minutes`?`settingsAiDelay.unitSuffixMin`:`settingsAiDelay.unitSuffixHr`)})]}),u?(0,V.jsx)(`p`,{className:`mt-2 text-sm text-error`,children:u}):null]})]})}),(0,V.jsxs)(`div`,{className:`flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between`,children:[(0,V.jsx)(`button`,{type:`button`,onClick:()=>void C(),disabled:!y,className:`inline-flex items-center justify-center gap-2 rounded-2xl bg-primary px-6 py-3 text-sm font-black text-primary-foreground shadow-lg shadow-primary/20 transition hover:bg-primary-hover disabled:cursor-not-allowed disabled:opacity-50`,children:f?(0,V.jsxs)(V.Fragment,{children:[(0,V.jsx)(_A,{size:16,className:`animate-spin`,"aria-hidden":!0}),e(`settingsAiDelay.saving`)]}):e(`settingsAiDelay.saveChanges`)}),m?(0,V.jsx)(`p`,{className:`text-sm font-medium text-success`,children:m}):null]})]})}var ATe=[{value:`en`,labelKey:`language.english`,descriptionKey:`language.englishDescription`},{value:`fr`,labelKey:`language.french`,descriptionKey:`language.frenchDescription`},{value:`system`,labelKey:`language.system`,descriptionKey:`language.systemDescription`}];function jTe(){let{preference:e,setPreference:t}=py(),n=my();return(0,V.jsxs)(`fieldset`,{className:`min-w-0`,children:[(0,V.jsx)(`legend`,{className:`sr-only`,children:n(`language.groupLabel`)}),(0,V.jsx)(`p`,{className:`text-sm font-bold text-foreground sm:text-base`,children:n(`language.title`)}),(0,V.jsx)(`p`,{className:`mt-0.5 text-xs text-muted-foreground sm:text-sm`,children:n(`language.description`)}),(0,V.jsx)(`div`,{className:`mt-4 flex w-full flex-col gap-2 sm:grid sm:grid-cols-3 sm:gap-4`,role:`radiogroup`,"aria-label":n(`language.groupLabel`),children:ATe.map(r=>{let i=e===r.value;return(0,V.jsxs)(`label`,{className:[`group relative flex w-full cursor-pointer items-center justify-between gap-3 rounded-xl border p-3.5 transition`,i?`border-primary bg-primary/5 shadow-sm ring-2 ring-primary ring-offset-2 ring-offset-background`:`border-border bg-surface hover:border-primary/35 hover:bg-surface-elevated/60`].join(` `),children:[(0,V.jsx)(`input`,{type:`radio`,name:`app-language`,value:r.value,checked:i,onChange:()=>t(r.value),className:`sr-only`}),(0,V.jsxs)(`span`,{className:`min-w-0`,children:[(0,V.jsx)(`span`,{className:`block text-sm font-bold text-foreground`,children:n(r.labelKey)}),(0,V.jsx)(`span`,{className:`mt-0.5 block text-xs text-muted-foreground`,children:n(r.descriptionKey)})]}),(0,V.jsx)(`span`,{className:[`flex h-5 w-5 shrink-0 items-center justify-center rounded-full border transition`,i?`border-primary bg-primary text-primary-foreground`:`border-border bg-surface-elevated text-transparent group-hover:border-primary/40`].join(` `),"aria-hidden":!0,
470children:(0,V.jsx)(Fk,{size:12,strokeWidth:3,className:i?`opacity-100`:`opacity-0`})})]},r.value)})})]})}var MTe=[{value:`light`,labelKey:`theme.light`},{value:`dark`,labelKey:`theme.dark`},{value:`system`,labelKey:`theme.system`}];function H7({className:e,lineClassName:t}){return(0,V.jsx)(`div`,{className:`space-y-0.5 sm:space-y-1.5 ${e??``}`,children:[`w-[90%]`,`w-[68%]`,`w-[46%]`,`w-[40%] sm:w-[40%]`].map((e,n)=>(0,V.jsx)(`div`,{className:[`rounded-full`,e,n===3?`hidden sm:block`:``,`h-0.5 sm:h-1.5`,t].join(` `),"aria-hidden":!0},e))})}function NTe({variant:e}){let t=`relative h-12 w-full overflow-hidden rounded-md border shadow-inner sm:aspect-[5/3] sm:h-auto sm:rounded-lg`;return e===`light`?(0,V.jsx)(`div`,{className:`${t} border-black/8 bg-white`,children:(0,V.jsx)(H7,{className:`absolute inset-x-1.5 top-1.5 sm:inset-x-3 sm:top-3`,lineClassName:`bg-slate-300/90`})}):e===`dark`?(0,V.jsx)(`div`,{className:`${t} border-white/10 bg-[#0f172a]`,children:(0,V.jsx)(H7,{className:`absolute inset-x-1.5 top-1.5 sm:inset-x-3 sm:top-3`,lineClassName:`bg-slate-500/80`})}):(0,V.jsxs)(`div`,{className:`${t} border-border/80`,children:[(0,V.jsx)(`div`,{className:`absolute inset-0`,style:{background:`linear-gradient(135deg, #ffffff 50%, #0f172a 50%)`},"aria-hidden":!0}),(0,V.jsx)(H7,{className:`absolute left-1 top-1 right-5 sm:left-2.5 sm:top-2.5 sm:right-10`,lineClassName:`bg-slate-300/90`}),(0,V.jsx)(H7,{className:`absolute bottom-1 left-5 right-1 sm:bottom-2.5 sm:left-10 sm:right-2.5`,lineClassName:`bg-slate-500/80`})]})}function PTe(e,t,n){return e===`system`?n(`theme.systemDescription`,{mode:n(t===`dark`?`theme.darkNow`:`theme.lightNow`)}):n(e===`dark`?`theme.darkDescription`:`theme.lightDescription`)}function FTe(){let{theme:e,resolvedTheme:t,setTheme:n}=qj(),r=my();return(0,V.jsxs)(`fieldset`,{className:`min-w-0`,children:[(0,V.jsx)(`legend`,{className:`sr-only`,children:r(`theme.groupLabel`)}),(0,V.jsx)(`p`,{className:`text-sm font-bold text-foreground sm:text-base`,children:r(`theme.title`)}),(0,V.jsx)(`p`,{className:`mt-0.5 text-xs text-muted-foreground sm:text-sm`,children:PTe(e,t,r)}),(0,V.jsx)(`div`,{className:`mt-4 flex w-full flex-col gap-2 sm:grid sm:grid-cols-3 sm:gap-4`,role:`radiogroup`,"aria-label":r(`theme.groupLabel`),children:MTe.map(t=>{let i=e===t.value;return(0,V.jsxs)(`label`,{className:[`group relative flex w-full cursor-pointer items-center gap-3 rounded-xl border p-2.5 transition`,`sm:flex-col sm:items-stretch sm:rounded-2xl sm:p-3.5`,i?`border-primary bg-primary/5 shadow-sm ring-2 ring-primary ring-offset-2 ring-offset-background`:`border-border bg-surface hover:border-primary/35 hover:bg-surface-elevated/60`].join(` `),children:[(0,V.jsx)(`input`,{type:`radio`,name:`theme-mode`,value:t.value,checked:i,onChange:()=>n(t.value),className:`sr-only`}),(0,V.jsx)(`div`,{className:`h-12 w-[4.75rem] shrink-0 sm:h-auto sm:w-full`,children:(0,V.jsx)(NTe,{variant:t.value})}),(0,V.jsxs)(`span`,{className:`flex min-w-0 flex-1 items-center justify-between gap-2 sm:mt-3`,children:[(0,V.jsx)(`span`,{className:`text-sm font-bold text-foreground`,children:r(t.labelKey)}),(0,V.jsx)(`span`,{className:[`flex h-5 w-5 shrink-0 items-center justify-center rounded-full border transition`,i?`border-primary bg-primary text-primary-foreground`:`border-border bg-surface-elevated text-transparent group-hover:border-primary/40`].join(` `),"aria-hidden":!0,children:(0,V.jsx)(Fk,{size:12,strokeWidth:3,className:i?`opacity-100`:`opacity-0`})})]})]},t.value)})})]})}function ITe(){let e=my();return(0,V.jsxs)(F7,{title:e(`settings.appearanceTitle`),description:e(`settings.appearanceDescription`),children:[(0,V.jsx)(`section`,{className:`rounded-2xl border border-border bg-surface p-4 shadow-sm sm:p-6`,children:(0,V.jsx)(FTe,{})}),(0,V.jsx)(`section`,{className:`rounded-2xl border border-border bg-surface p-4 shadow-sm sm:p-6`,children:(0,V.jsx)(jTe,{})})]})}var U7=`https://chromewebstore.google.com/detail/gepjbjfaonkaeoopgldgmkfhedjbopnp?utm_source=item-share-cb`;function LTe(e){if(!e)return null;let t=new Date(e);
470return Number.isNaN(t.getTime())?null:t.toLocaleString(void 0,{dateStyle:`medium`,timeStyle:`short`})}function RTe(){let e=my(),{lastHeartbeatAt:t,isRefreshing:n,refresh:r,presentation:i,isActive:a}=OM(),o=i.icon,s=LTe(t),c=[{title:e(`settingsExtension.stepInstallTitle`),body:e(`settingsExtension.stepInstallBody`)},{title:e(`settingsExtension.stepSignInTitle`),body:e(`settingsExtension.stepSignInBody`)},{title:e(`settingsExtension.stepConnectTitle`),body:e(`settingsExtension.stepConnectBody`)},{title:e(`settingsExtension.stepKeepRunningTitle`),body:e(`settingsExtension.stepKeepRunningBody`)},{title:e(`settingsExtension.stepVerifyTitle`),body:e(`settingsExtension.stepVerifyBody`)}];return(0,V.jsxs)(F7,{title:e(`settings.extension.title`),description:e(`settings.extension.description`),children:[(0,V.jsx)(`div`,{className:`rounded-2xl border border-error/20 bg-error/5 p-4 sm:p-5`,children:(0,V.jsxs)(`div`,{className:`flex items-start gap-3`,children:[(0,V.jsx)(cj,{size:18,strokeWidth:2.25,className:`mt-0.5 shrink-0 text-error`,"aria-hidden":!0}),(0,V.jsxs)(`div`,{className:`min-w-0 space-y-2`,children:[(0,V.jsx)(`p`,{className:`text-sm font-black tracking-tight text-error`,children:e(`settingsExtension.mustStayRunningTitle`)}),(0,V.jsx)(`p`,{className:`text-sm leading-relaxed text-muted-foreground`,children:e(`settingsExtension.mustStayRunningBody`)})]})]})}),(0,V.jsxs)(`div`,{className:`overflow-hidden rounded-2xl border border-border bg-surface shadow-sm`,children:[(0,V.jsxs)(`div`,{className:`flex flex-col gap-4 border-b border-border/60 bg-surface-elevated/40 p-4 sm:flex-row sm:items-center sm:justify-between sm:p-6`,children:[(0,V.jsxs)(`div`,{className:`min-w-0`,children:[(0,V.jsx)(`p`,{className:`text-[11px] font-bold uppercase tracking-widest text-muted-foreground`,children:e(`settingsExtension.connectionStatus`)}),(0,V.jsxs)(`div`,{className:`mt-2 flex flex-wrap items-center gap-2.5`,children:[(0,V.jsxs)(`span`,{className:`inline-flex h-6 items-center gap-1.5 rounded-lg border px-2.5 text-[10px] font-black uppercase tracking-wide ${i.className}`,children:[(0,V.jsx)(o,{size:12,strokeWidth:2.25,"aria-hidden":!0}),i.label]}),s?(0,V.jsx)(`span`,{className:`text-xs text-muted-foreground`,children:e(`settingsExtension.lastSeen`,{time:s})}):null]}),a?(0,V.jsx)(`p`,{className:`mt-2 text-xs leading-relaxed text-muted-foreground sm:text-sm`,children:e(`settingsExtension.connectedHint`)}):(0,V.jsxs)(`p`,{className:`mt-2 flex items-start gap-2 text-xs leading-relaxed text-muted-foreground sm:text-sm`,children:[(0,V.jsx)(uA,{size:14,className:`mt-0.5 shrink-0`,"aria-hidden":!0}),e(`settingsExtension.setupHint`)]})]}),(0,V.jsxs)(`div`,{className:`flex shrink-0 items-center gap-3`,children:[(0,V.jsx)(`div`,{className:`flex h-12 w-12 items-center justify-center rounded-2xl border ${a?`border-success/20 bg-success/10 text-success`:`border-error/20 bg-error/10 text-error`}`,"aria-hidden":!0,children:a?(0,V.jsx)(hj,{size:22,strokeWidth:2.25}):(0,V.jsx)(ioe,{size:22,strokeWidth:2.25})}),(0,V.jsxs)(`button`,{type:`button`,onClick:()=>void r(),disabled:n,className:`inline-flex items-center gap-2 rounded-xl border border-border bg-surface-elevated px-3 py-2 text-xs font-bold text-foreground transition hover:bg-surface-hover disabled:cursor-not-allowed disabled:opacity-60 sm:text-sm`,children:[(0,V.jsx)(zA,{size:14,className:n?`animate-spin`:void 0,"aria-hidden":!0}),e(`settingsExtension.refresh`)]})]})]}),(0,V.jsxs)(`div`,{className:`space-y-3 p-4 sm:p-6`,children:[(0,V.jsx)(`p`,{className:`text-sm leading-relaxed text-muted-foreground sm:text-base`,children:e(`settingsExtension.bridgeBlurb`)}),(0,V.jsxs)(`a`,{href:U7,target:`_blank`,rel:`noopener noreferrer`,className:`inline-flex w-full items-center justify-center gap-2 rounded-xl border border-primary/30 bg-primary/10 px-4 py-3 text-sm font-black text-primary transition hover:border-primary/50 hover:bg-primary/15 sm:w-auto`,children:[(0,V.jsx)(RA,{size:16,strokeWidth:2.25,"aria-hidden":!0}),e(`settingsExtension.addToChrome`),(0,V.jsx)(Zk,{size:14,strokeWidth:2.25,"aria-hidden":!0})]})]})]}),(0,V.jsxs)(I7,{title:e(`settings.extension.setupGuide`),description:e(`settings.extension.setupGuideDescription`),children:[(0,V.jsx)(`ol`,{className:`space-y-5`,children:c.map((e,t)=>(0,V.jsxs)(`li`,{className:`flex gap-4`,children:[(0,V.jsx)(`span`,{className:`flex h-8 w-8 shrink-0 items-center justify-center rounded-xl border border-primary/20 bg-primary/10 text-sm font-black text-primary`,children:t+1}),(0,V.jsxs)(`div`,{className:`min-w-0 pt-0.5`,children:[(0,V.jsx)(`p`,{className:`text-sm font-black tracking-tight text-foreground sm:text-base`,children:e.title}),(0,V.jsx)(`p`,{className:`mt-1 text-xs leading-relaxed text-muted-foreground sm:text-sm`,children:e.body})]})]},e.title))}),(0,V.jsx)(`div`,{className:`mt-6 border-t border-border/60 pt-5`,children:(0,V.jsxs)(`a`,{href:U7,target:`_blank`,rel:`noopener noreferrer`,className:`inline-flex items-center gap-2 text-sm font-bold text-primary underline-offset-2 transition hover:text-primary/80 hover:underline`,children:[e(`settingsExtension.openChromeWebStore`),(0,V.jsx)(Zk,{size:14,strokeWidth:2.25,"aria-hidden":!0})]})})]})]})}var W7={name:`InstaSnag`,legalEntity:`9564-5602 Quebec Inc`,addressLine1:`12008 Boul Laurentien`,addressLine2:`Montreal, Qc, Canada - H4K 1M7`,supportEmail:`[email protected]`,legalEmail:`[email protected]`};function G7({label:e,description:t,trailing:n,onClick:r,disabled:i=!1}
470){let a=!!r&&!i,o=[`flex w-full items-center gap-4 rounded-2xl border border-border bg-surface px-4 py-4 text-left shadow-sm transition sm:px-5 sm:py-5`,a?`cursor-pointer hover:border-primary/30 hover:bg-surface-elevated focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary focus-visible:ring-offset-2`:``,i?`opacity-60`:``].join(` `),s=(0,V.jsxs)(V.Fragment,{children:[(0,V.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(0,V.jsx)(`p`,{className:`text-sm font-bold text-foreground sm:text-base`,children:e}),t?(0,V.jsx)(`p`,{className:`mt-0.5 text-xs leading-relaxed text-muted-foreground sm:text-sm`,children:t}):null]}),n??(a?(0,V.jsx)(Rk,{size:18,className:`shrink-0 text-muted-foreground`,"aria-hidden":!0}):null)]});return a?(0,V.jsx)(`button`,{type:`button`,onClick:r,className:o,children:s}):(0,V.jsx)(`div`,{className:o,children:s})}function zTe(){let e=my();return(0,V.jsxs)(F7,{title:e(`settings.legal.title`),description:e(`settings.legal.description`),children:[(0,V.jsx)(G7,{label:e(`settings.legal.privacy`),description:e(`settings.legal.privacyDescription`),onClick:()=>{window.open(`/privacy`,`_blank`,`noopener,noreferrer`)},trailing:(0,V.jsx)(Zk,{size:16,className:`text-muted-foreground`})}),(0,V.jsx)(G7,{label:e(`settings.legal.terms`),description:e(`settings.legal.termsDescription`),onClick:()=>{window.open(`/terms`,`_blank`,`noopener,noreferrer`)},trailing:(0,V.jsx)(Zk,{size:16,className:`text-muted-foreground`})}),(0,V.jsx)(G7,{label:e(`settings.legal.contact`),description:e(`settings.legal.contactDescription`),onClick:()=>{window.open(`/contact`,`_blank`,`noopener,noreferrer`)},trailing:(0,V.jsx)(Zk,{size:16,className:`text-muted-foreground`})}),(0,V.jsxs)(`div`,{className:`rounded-2xl border border-border bg-surface-elevated/50 px-4 py-4 sm:px-5 sm:py-5`,children:[(0,V.jsx)(`p`,{className:`text-xs font-bold uppercase tracking-wider text-muted-foreground`,children:e(`common.email`)}),(0,V.jsxs)(`a`,{href:`mailto:${W7.supportEmail}`,className:`mt-2 inline-flex items-center gap-2 text-sm font-semibold text-primary hover:underline`,children:[(0,V.jsx)(bA,{size:16,"aria-hidden":!0}),W7.supportEmail]})]})]})}var K7=`oauth_nonce`,q7=`oauth_nonce_fallback`,BTe=`/auth/oauth/callback`;function J7(){return`${window.location.origin}${BTe}`}function VTe(){try{let e=localStorage.getItem(q7);if(!e)return null;let t=JSON.parse(e),n=typeof t.nonce==`string`?t.nonce:``,r=typeof t.createdAt==`number`?t.createdAt:0;return!n||!r||Date.now()-r>3e5?null:n}catch{return null}}function Y7(){sessionStorage.removeItem(K7),localStorage.removeItem(q7)}function HTe(){try{let e=crypto.getRandomValues(new Uint8Array(16));return Array.from(e).map(e=>e.toString(16).padStart(2,`0`)).join(``)}catch{return String(Date.now())}}function UTe(e){sessionStorage.setItem(K7,e),localStorage.setItem(q7,JSON.stringify({nonce:e,createdAt:Date.now()}))}function WTe(e){if(!e)return null;try{let t=JSON.parse(atob(e));return t?.provider!==`google`&&t?.provider!==`facebook`||typeof t.nonce!=`string`||!t.nonce?null:{provider:t.provider,nonce:t.nonce,intent:t.intent===`link`?`link`:`login`,returnTo:typeof t.returnTo==`string`?t.returnTo:void 0}}catch{return null}}function X7(e,t,n){let r=HTe();return UTe(r),btoa(JSON.stringify({provider:e,nonce:r,intent:t,returnTo:n}))}function GTe(e,t){sessionStorage.setItem(`oauth_loading`,`true`);let n=J7(),r=new URLSearchParams({client_id:`774437974294-bh1lpii8cv0t821e9m7a5h8ltt7sj0ot.apps.googleusercontent.com`,redirect_uri:n,response_type:`code`,scope:`openid email profile`,include_granted_scopes:`true`,access_type:`offline`,prompt:`consent`,state:X7(`google`,e,t)});window.location.href=`https://accounts.google.com/o/oauth2/v2/auth?${r.toString()}`}function KTe(e,t){throw Error(`Facebook sign-in is not configured.`)}function qTe(e,t){if(e===`google`){GTe(`link`,t);return}KTe(`link`,t)}function JTe(){return!0}function YTe(){return!1}function Z7({name:e,description:t,iconSrc:n,account:r,isConfigured:i,isLinking:a,isUnlinking:o,onLink:s,onUnlink:c}){let l=my(),u=a||o;return(0,V.jsx)(`div`,{className:`rounded-2xl border border-border bg-surface shadow-sm`,children:(0,V.jsxs)(`div`,{className:`flex flex-col gap-4 p-4 sm:flex-row sm:items-center sm:justify-between sm:p-5`,children:[(0,V.jsxs)(`div`,{className:`flex min-w-0 items-start gap-4`,children:[(0,V.jsx)(`div`,{className:`flex h-12 w-12 shrink-0 items-center justify-center rounded-xl border border-border bg-surface-elevated`,children:(0,V.jsx)(`img`,{src:n,alt:``,className:`h-6 w-6 object-contain`,"aria-hidden":!0})}),(0,V.jsxs)(`div`,{className:`min-w-0 space-y-1`,children:[(0,V.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2`,children:[(0,V.jsx)(`h3`,{className:`text-base font-bold text-foreground`,children:e}),r.linked?(0,V.jsx)(`span`,{className:`inline-flex items-center rounded-full border border-success/30 bg-success/10 px-2 py-0.5 text-[11px] font-bold uppercase tracking-wide text-success`,children:l(`settingsLinked.connected`)}):(0,V.jsx)(`span`,{className:`inline-flex items-center rounded-full border border-border bg-muted/20 px-2 py-0.5 text-[11px] font-bold uppercase tracking-wide text-muted-foreground`,children:l(`settingsLinked.notConnected`)})]}),(0,V.jsx)(`p`,{className:`text-sm leading-relaxed text-muted-foreground`,children:t}),r.linked&&r.email?(0,V.jsx)(`p`,{className:`truncate text-sm font-medium text-foreground`,children:r.email}):null]})]}),(0,V.jsx)(`div`,{className:`flex shrink-0 sm:justify-end`,children:r.linked?(0,V.jsxs)(`button`,{type:`button`,disabled:u,onClick:c,className:`inline-flex w-full items-center justify-center gap-2 rounded-xl border border-border px-4 py-2.5 text-sm font-bold text-foreground transition-colors enabled:hover:border-error/40 enabled:hover:bg-error/5 enabled:hover:text-error disabled:cursor-not-allowed disabled:opacity-60 sm:w-auto`,children:[o?(0,V.jsx)(_A,{className:`h-4 w-4 animate-spin`,"aria-hidden":!0}):(0,V.jsx)(noe,{className:`h-4 w-4`,"aria-hidden":!0}),l(`settingsLinked.unlink`)]}):(0,V.jsxs)(`button`,{type:`button`,disabled:!i||u,onClick:s,title:i?void 0:l(`settingsLinked.linkingNotConfigured`,{name:e}),className:`inline-flex w-full items-center justify-center gap-2 rounded-xl bg-primary px-4 py-2.5 text-sm font-bold text-primary-foreground transition-opacity enabled:hover:bg-primary/90 disabled:cursor-not-allowed disabled:opacity-60 sm:w-auto`,children:[a?(0,V.jsx)(_A,{className:`h-4 w-4 animate-spin`,"aria-hidden":!0}):null,l(`settingsLinked.connectProvider`,{name:e})]})})]})})}var XTe=YN(`linked-accounts`);function ZTe(){let e=my(),{showToast:t}=Gx(),[n,r]=qi(),[i,a]=(0,b.useState)(null),[o,s]=(0,b.useState)(!0),[c,l]=(0,b.useState)(null),[u,d]=(0,b.useState)(null),[f,p]=(0,b.useState)(null),[m,h]=(0,b.useState)(!1),g=(0,b.useCallback)(async()=>{s(!0),l(null);try{a(await Gs())}catch(e){l(Ys(e))}finally{s(!1)}},[]);(0,b.useEffect)(()=>{let e=!1;return queueMicrotask(()=>{e||g()}),()=>{e=!0}},[g]),(0,b.useEffect)(()=>{let i=n.get(`linked`),a=n.get(`oauth_error`),o=n.get(`email_mismatch`);if(!i&&!a)return;a?t({type:`error`,message:decodeURIComponent(a)}):i&&t({type:`success`,message:e(`settingsLinked.linkedSuccess`,{provider:i===`google`?e(`settingsLinked.google`):i===`facebook`?e(`settingsLinked.facebook`):i}),description:o===`true`?e(`settingsLinked.emailMismatchNote`):void 0});let s=new URLSearchParams(n);s.delete(`linked`),s.delete(`oauth_error`),s.delete(`email_mismatch`),r(s,{replace:!0})},[n,r,t,e]);let _=(0,b.useCallback)(n=>{d(n);try{qTe(n,XTe)}catch(n){d(null),t({type:`error`,message:n instanceof Error?n.message:e(`settingsLinked.unableToStartLinking`)})}},[t,e]),v=(0,b.useCallback)(async()=>
470{if(f){h(!0);try{t({type:`success`,message:(await qs(f)).message}),p(null),await g()}catch(e){t({type:`error`,message:Xs(e)}),p(null)}finally{h(!1)}}},[g,t,f]),y=f===`google`?e(`settingsLinked.google`):f===`facebook`?e(`settingsLinked.facebook`):`account`;return(0,V.jsxs)(F7,{title:e(`settings.linkedAccounts.title`),description:e(`settings.linkedAccounts.description`),children:[(0,V.jsx)(I7,{title:e(`settings.linkedAccounts.primaryEmail`),description:e(`settings.linkedAccounts.primaryEmailDescription`),children:o?(0,V.jsx)(`div`,{className:`h-12 animate-pulse rounded-xl bg-border/60`}):(0,V.jsxs)(`div`,{className:`flex items-center gap-3 rounded-xl border border-border bg-surface-elevated/40 px-4 py-3`,children:[(0,V.jsx)(`div`,{className:`flex h-10 w-10 shrink-0 items-center justify-center rounded-lg border border-border bg-surface text-primary`,children:(0,V.jsx)(bA,{className:`h-5 w-5`,"aria-hidden":!0})}),(0,V.jsxs)(`div`,{className:`min-w-0`,children:[(0,V.jsx)(`p`,{className:`text-xs font-bold uppercase tracking-widest text-muted-foreground`,children:e(`settingsLinked.accountEmail`)}),(0,V.jsx)(`p`,{className:`truncate text-sm font-semibold text-foreground`,children:i?.email??`â`})]})]})}),(0,V.jsx)(I7,{title:e(`settings.linkedAccounts.signInProviders`),description:e(`settings.linkedAccounts.signInProvidersDescription`),children:c?(0,V.jsx)(`div`,{className:`rounded-xl border border-error/30 bg-error/5 px-4 py-3 text-sm text-error`,children:(0,V.jsxs)(`div`,{className:`flex items-start gap-2`,children:[(0,V.jsx)(Bk,{className:`mt-0.5 h-4 w-4 shrink-0`,"aria-hidden":!0}),(0,V.jsxs)(`div`,{children:[(0,V.jsx)(`p`,{className:`font-semibold`,children:e(`settingsLinked.loadErrorTitle`)}),(0,V.jsx)(`p`,{className:`mt-1 text-error/90`,children:c}),(0,V.jsx)(`button`,{type:`button`,onClick:()=>void g(),className:`mt-3 text-sm font-bold underline underline-offset-2`,children:e(`common.tryAgain`)})]})]})}):o?(0,V.jsxs)(`div`,{className:`space-y-3`,children:[(0,V.jsx)(`div`,{className:`h-28 animate-pulse rounded-2xl bg-border/60`}),(0,V.jsx)(`div`,{className:`h-28 animate-pulse rounded-2xl bg-border/60`})]}):i?(0,V.jsxs)(`div`,{className:`space-y-3`,children:[(0,V.jsx)(Z7,{name:e(`settingsLinked.google`),description:e(`settings.linkedAccounts.googleDescription`),iconSrc:ile,account:i.google,isConfigured:JTe(),isLinking:u===`google`,isUnlinking:m&&f===`google`,onLink:()=>_(`google`),onUnlink:()=>p(`google`)}),(0,V.jsx)(Z7,{name:e(`settingsLinked.facebook`),description:e(`settings.linkedAccounts.facebookDescription`),iconSrc:_N,account:i.facebook,isConfigured:YTe(),isLinking:u===`facebook`,isUnlinking:m&&f===`facebook`,onLink:()=>_(`facebook`),onUnlink:()=>p(`facebook`)})]}):null}),(0,V.jsxs)(`div`,{className:`flex items-start gap-2 rounded-xl border border-border/70 bg-surface-elevated/30 px-4 py-3 text-sm text-muted-foreground`,children:[(0,V.jsx)(uA,{className:`mt-0.5 h-4 w-4 shrink-0 text-primary`,"aria-hidden":!0}),(0,V.jsx)(`p`,{children:e(`settingsLinked.unlinkWarning`)})]}),(0,V.jsx)(NF,{open:f!==null,title:e(`settings.linkedAccounts.unlinkTitle`,{provider:y}),description:e(`settings.linkedAccounts.unlinkDescription`,{provider:y}),confirmLabel:e(`settingsLinked.unlinkConfirm`),cancelLabel:e(`settingsLinked.keepConnected`),variant:`danger`,isBusy:m,onConfirm:()=>void v(),onCancel:()=>{m||p(null)}}),m?(0,V.jsxs)(`span`,{className:`sr-only`,"aria-live":`polite`,children:[(0,V.jsx)(_A,{className:`inline h-4 w-4 animate-spin`}),e(`settingsLinked.unlinking`)]}):null]})}function QTe({open:e,address:t,isDeleting:n,error:r,onClose:i,onConfirm:a}){let o=my(),s=(0,b.useId)(),c=(0,b.useCallback)(()=>{n||i()},[n,i]);return(0,b.useEffect)(()=>{if(!e)return;let t=e=>{e.key===`Escape`&&!n&&c()};return window.addEventListener(`keydown`,t),()=>window.removeEventListener(`keydown`,t)},[c,n,e]),(0,b.useEffect)(()=>{if(!e)return;let t=document.body.style.overflow;return document.body.style.overflow=`hidden`,()=>{document.body.style.overflow=t}},[e]),(0,x.createPortal)((0,V.jsx)(zD,{children:e&&t?(0,V.jsxs)(ik.div,{className:`fixed inset-0 z-[130] flex items-center justify-center p-4`,initial:{opacity:0}
470,animate:{opacity:1},exit:{opacity:0},children:[(0,V.jsx)(`button`,{type:`button`,className:`absolute inset-0 bg-black/50 backdrop-blur-[2px]`,"aria-label":o(`common.close`),onClick:c}),(0,V.jsxs)(ik.div,{role:`alertdialog`,"aria-modal":`true`,"aria-labelledby":s,initial:{opacity:0,scale:.96,y:8},animate:{opacity:1,scale:1,y:0},exit:{opacity:0,scale:.96,y:8},transition:{duration:.2,ease:[.16,1,.3,1]},className:`relative z-10 w-full max-w-md overflow-hidden rounded-3xl border border-border bg-surface shadow-2xl`,children:[(0,V.jsx)(`div`,{className:`border-b border-border/60 bg-error/5 px-5 py-5 sm:px-6`,children:(0,V.jsxs)(`div`,{className:`flex items-start justify-between gap-4`,children:[(0,V.jsxs)(`div`,{className:`flex items-start gap-3`,children:[(0,V.jsx)(`div`,{className:`flex h-11 w-11 shrink-0 items-center justify-center rounded-xl bg-error/10 text-error`,children:(0,V.jsx)(cj,{size:20,"aria-hidden":!0})}),(0,V.jsxs)(`div`,{children:[(0,V.jsx)(`h2`,{id:s,className:`text-lg font-black tracking-tight text-foreground`,children:o(`settingsMeetupLoc.deleteTitle`)}),(0,V.jsx)(`p`,{className:`mt-1 text-sm text-muted-foreground`,children:o(`settingsMeetupLoc.deleteWillRemove`,{name:t.name})})]})]}),(0,V.jsxs)(`button`,{type:`button`,onClick:c,disabled:n,className:`inline-flex h-10 w-10 shrink-0 items-center justify-center rounded-xl border border-border bg-surface text-muted-foreground transition hover:text-foreground disabled:opacity-50`,children:[(0,V.jsx)(mj,{size:18,"aria-hidden":!0}),(0,V.jsx)(`span`,{className:`sr-only`,children:o(`common.close`)})]})]})}),(0,V.jsxs)(`div`,{className:`space-y-4 px-5 py-5 sm:px-6`,children:[(0,V.jsx)(`p`,{className:`text-sm leading-relaxed text-muted-foreground`,children:o(`settingsMeetupLoc.deleteWarning`)}),r?(0,V.jsx)(`p`,{className:`text-sm text-error`,children:r}):null]}),(0,V.jsxs)(`div`,{className:`flex flex-col-reverse gap-3 border-t border-border/60 bg-surface-elevated/30 px-5 py-4 sm:flex-row sm:justify-end sm:px-6`,children:[(0,V.jsx)(`button`,{type:`button`,onClick:c,disabled:n,className:`inline-flex items-center justify-center rounded-2xl border border-border bg-surface px-5 py-3 text-sm font-bold text-foreground transition hover:bg-surface-elevated disabled:opacity-50`,children:o(`common.cancel`)}),(0,V.jsx)(`button`,{type:`button`,onClick:a,disabled:n,className:`inline-flex items-center justify-center gap-2 rounded-2xl bg-error px-6 py-3 text-sm font-black text-white transition hover:bg-error/90 disabled:cursor-not-allowed disabled:opacity-50`,children:n?(0,V.jsxs)(V.Fragment,{children:[(0,V.jsx)(_A,{size:16,className:`animate-spin`,"aria-hidden":!0}),o(`settingsMeetupLoc.deleting`)]}):o(`settingsMeetupLoc.deleteLocation`)})]})]})]}):null}),document.body)}var Q7=192,$7=8;function $Te({address:e,onEdit:t,onDelete:n,onSetDefault:r,isSettingDefault:i}){let a=my(),o=(0,b.useId)(),s=(0,b.useRef)(null),c=(0,b.useRef)(null),[l,u]=(0,b.useState)(!1),[d,f]=(0,b.useState)(null),p=(0,b.useCallback)(()=>{let t=c.current;if(!t)return;let n=t.getBoundingClientRect(),r=e.is_default?88:132,i=window.innerHeight-n.bottom-12,a=n.top-12,o=s.current?.offsetHeight??r;f({top:i<o+$7&&a>i?n.top-o-$7:n.bottom+$7,left:Math.min(Math.max(12,n.right-Q7),window.innerWidth-Q7-12)})},[e.is_default]),m=l?d:null;(0,b.useLayoutEffect)(()=>{if(!l)return;p();let e=window.requestAnimationFrame(p);return()=>window.cancelAnimationFrame(e)},[l,p]),(0,b.useEffect)(()=>{if(!l)return;let e=e=>{let t=e.target;s.current?.contains(t)||c.current?.contains(t)||u(!1)},t=e=>{e.key===`Escape`&&u(!1)};return window.addEventListener(`mousedown`,e),window.addEventListener(`keydown`,t),window.addEventListener(`resize`,p),window.addEventListener(`scroll`,p,!0),()=>{window.removeEventListener(`mousedown`,e),window.removeEventListener(`keydown`,t),window.removeEventListener(`resize`,p),window.removeEventListener(`scroll`,p,!0)}},[l,p]);let h=(0,b.useCallback)(()=>u(!1),[]),g=l&&m?(0,x.createPortal)((0,V.jsxs)(`div`,{ref:s,id:o,role:`menu`,style:{top:m.top,left:m.left,width:Q7},className:`fixed z-[120] overflow-hidden rounded-xl border border-border bg-surface py-1 shadow-lg`,children:[e.is_default?null:(0,V.jsxs)(`button`,{type:`button`,role:`menuitem`,onClick:()=>{h(),r(e)},className:`flex w-full items-center gap-2.5 px-3.5 py-2.5 text-left text-sm font-semibold text-foreground transition hover:bg-surface-elevated`,children:[(0,V.jsx)(nj,{size:16,className:`text-primary`,"aria-hidden":!0}),a(`settingsMeetupLoc.setAsDefault`)]}),(0,V.jsxs)(`button`,{type:`button`,role:`menuitem`,onClick:()=>{h(),t(e)},className:`flex w-full items-center gap-2.5 px-3.5 py-2.5 text-left text-sm font-semibold text-foreground transition hover:bg-surface-elevated`,children:[(0,V.jsx)(NA,{size:16,"aria-hidden":!0}),a(`settingsMeetupLoc.edit`)]}),(0,V.jsxs)(`button`,{type:`button`,role:`menuitem`,onClick:()=>{h(),n(e)},className:`flex w-full items-center gap-2.5 px-3.5 py-2.5 text-left text-sm font-semibold text-error transition hover:bg-error/5`,children:[(0,V.jsx)(oj,{size:16,"aria-hidden":!0}),a(`settingsMeetupLoc.delete`)]})]}),document.body):null;return(0,V.jsxs)(V.Fragment,{children:[(0,V.jsx)(`article`,{className:[`relative rounded-2xl border bg-surface shadow-sm transition`,e.is_default?`border-primary/40 ring-1 ring-primary/15`:`border-border hover:border-primary/20`].join(` `),children:(0,V.jsxs)(`div`,{className:`flex items-start gap-3 p-4 sm:p-5`,children:[(0,V.jsx)(`div`,{className:[`mt
470-0.5 flex h-11 w-11 shrink-0 items-center justify-center rounded-xl`,e.is_default?`bg-primary/10 text-primary`:`bg-surface-elevated text-muted-foreground`].join(` `),"aria-hidden":!0,children:(0,V.jsx)(xA,{size:20,strokeWidth:1.75})}),(0,V.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(0,V.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2`,children:[(0,V.jsx)(`h3`,{className:`truncate text-base font-black tracking-tight text-foreground`,children:e.name}),e.is_default?(0,V.jsxs)(`span`,{className:`inline-flex items-center gap-1 rounded-full border border-primary/25 bg-primary/10 px-2.5 py-0.5 text-[10px] font-bold uppercase tracking-wider text-primary`,children:[(0,V.jsx)(nj,{size:10,fill:`currentColor`,"aria-hidden":!0}),a(`settingsMeetupLoc.defaultBadge`)]}):null]}),(0,V.jsx)(`p`,{className:`mt-2 text-sm leading-relaxed text-muted-foreground`,children:e.address})]}),(0,V.jsx)(`div`,{className:`relative shrink-0`,children:(0,V.jsxs)(`button`,{ref:c,type:`button`,"aria-haspopup":`menu`,"aria-expanded":l,"aria-controls":o,onClick:()=>u(e=>!e),className:`inline-flex h-10 w-10 items-center justify-center rounded-xl border border-border bg-surface-elevated text-muted-foreground transition hover:border-primary/25 hover:text-foreground`,children:[i?(0,V.jsx)(_A,{size:16,className:`animate-spin`,"aria-hidden":!0}):(0,V.jsx)(Xk,{size:18,"aria-hidden":!0}),(0,V.jsx)(`span`,{className:`sr-only`,children:a(`settingsMeetupLoc.actionsFor`,{name:e.name})})]})})]})}),g]})}function e9(e){return e.trim().toLowerCase()}function eEe(e,t,n,r){let i=e9(t),a=e9(n);return e.some(e=>r&&e.id===r?!1:e9(e.name)===i||e9(e.address)===a)}function tEe(e){return[...e].sort((e,t)=>e.is_default===t.is_default?e.name.localeCompare(t.name,void 0,{sensitivity:`base`}):e.is_default?-1:1)}var nEe={name:``,address:``,isDefault:!1};function t9({open:e,mode:t,initialValues:n=nEe,existingAddresses:r,editingAddressId:i,isSubmitting:a,submitError:o,onClose:s,onSubmit:c}){let l=my(),u=(0,b.useId)(),d=(0,b.useId)(),[f,p]=(0,b.useState)(n.name),[m,h]=(0,b.useState)(n.address),[g,_]=(0,b.useState)(n.isDefault),[v,y]=(0,b.useState)({}),{predictions:S,isLoading:C,autocompleteEnabled:w,clearPredictions:T}=uR(m,e);(0,b.useEffect)(()=>{if(!e)return;let t=!1;return queueMicrotask(()=>{t||(p(n.name),h(n.address),_(n.isDefault),y({}),T())}),()=>{t=!0}},[T,n,e]);let E=(0,b.useCallback)(()=>{a||s()},[a,s]);(0,b.useEffect)(()=>{if(!e)return;let t=e=>{e.key===`Escape`&&!a&&E()};return window.addEventListener(`keydown`,t),()=>window.removeEventListener(`keydown`,t)},[E,a,e]),(0,b.useEffect)(()=>{if(!e)return;let t=document.body.style.overflow;return document.body.style.overflow=`hidden`,()=>{document.body.style.overflow=t}},[e]);let D=e=>{e.preventDefault();let t=f.trim(),n=m.trim(),a={};if(t||(a.name=l(`settingsMeetupLoc.nameRequired`)),n||(a.address=l(`settingsMeetupLoc.addressRequired`)),t&&n&&eEe(r,t,n,i)&&(a.form=l(`settingsMeetupLoc.duplicateError`)),Object.keys(a).length>0){y(a);return}y({}),c({name:t,address:n,isDefault:g})},O=v.form??o;return(0,x.createPortal)((0,V.jsx)(zD,{children:e?(0,V.jsxs)(ik.div,{className:`fixed inset-0 z-[120] flex items-end justify-center sm:items-center sm:p-4`,initial:{opacity:0}
470,animate:{opacity:1},exit:{opacity:0},"aria-hidden":!e,children:[(0,V.jsx)(`button`,{type:`button`,className:`absolute inset-0 bg-black/50 backdrop-blur-[2px]`,"aria-label":l(`common.close`),onClick:E}),(0,V.jsxs)(ik.div,{role:`dialog`,"aria-modal":`true`,"aria-labelledby":u,"aria-describedby":d,initial:{opacity:0,y:24},animate:{opacity:1,y:0},exit:{opacity:0,y:24},transition:{duration:.22,ease:[.16,1,.3,1]},className:`relative z-10 flex max-h-[92vh] w-full max-w-lg flex-col overflow-hidden rounded-t-3xl border border-border bg-surface shadow-2xl sm:rounded-3xl`,children:[(0,V.jsxs)(`div`,{className:`flex items-start justify-between gap-4 border-b border-border/60 bg-surface-elevated/40 px-5 py-5 sm:px-6`,children:[(0,V.jsxs)(`div`,{className:`min-w-0`,children:[(0,V.jsx)(`p`,{id:d,className:`text-xs font-bold uppercase tracking-widest text-muted-foreground`,children:l(t===`create`?`settingsMeetupLoc.newLocation`:`settingsMeetupLoc.editLocation`)}),(0,V.jsx)(`h2`,{id:u,className:`mt-1 text-xl font-black tracking-tight text-foreground`,children:l(t===`create`?`settingsMeetupLoc.addMeetupLocation`:`settingsMeetupLoc.editMeetupLocation`)})]}),(0,V.jsxs)(`button`,{type:`button`,onClick:E,disabled:a,className:`inline-flex h-10 w-10 shrink-0 items-center justify-center rounded-xl border border-border bg-surface text-muted-foreground transition hover:text-foreground disabled:opacity-50`,children:[(0,V.jsx)(mj,{size:18,"aria-hidden":!0}),(0,V.jsx)(`span`,{className:`sr-only`,children:l(`common.close`)})]})]}),(0,V.jsxs)(`form`,{onSubmit:D,className:`flex min-h-0 flex-1 flex-col overflow-y-auto`,children:[(0,V.jsxs)(`div`,{className:`space-y-5 px-5 py-5 sm:px-6`,children:[(0,V.jsxs)(`div`,{className:`space-y-2`,children:[(0,V.jsxs)(`label`,{htmlFor:`meetup-location-name`,className:`text-sm font-bold text-foreground`,children:[l(`settingsMeetupLoc.placeName`),` `,(0,V.jsx)(`span`,{className:`text-error`,children:`*`})]}),(0,V.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:l(`settingsMeetupLoc.placeNameHint`)}),(0,V.jsx)(`input`,{id:`meetup-location-name`,type:`text`,value:f,required:!0,"aria-required":`true`,onChange:e=>{p(e.target.value),y(e=>({...e,name:void 0,form:void 0}))},placeholder:l(`settingsMeetupLoc.placeNamePlaceholder`),autoComplete:`off`,className:`w-full rounded-xl border border-border bg-surface px-4 py-3 text-sm font-medium text-foreground transition focus:border-primary focus:outline-none focus:ring-4 focus:ring-primary/10`}),v.name?(0,V.jsx)(`p`,{className:`text-sm text-error`,children:v.name}):null]}),(0,V.jsxs)(`div`,{className:`space-y-2`,children:[(0,V.jsxs)(`label`,{htmlFor:`meetup-location-address`,className:`text-sm font-bold text-foreground`,children:[l(`settingsMeetupLoc.meetingLocation`),` `,(0,V.jsx)(`span`,{className:`text-error`,children:`*`})]}),(0,V.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:l(`settingsMeetupLoc.meetingLocationHint`)}),(0,V.jsx)(`textarea`,{id:`meetup-location-address`,value:m,required:!0,"aria-required":`true`,onChange:e=>{h(e.target.value),y(e=>({...e,address:void 0,form:void 0}))},placeholder:l(`settingsMeetupLoc.addressPlaceholder`),rows:3,className:`w-full resize-none rounded-xl border border-border bg-surface px-4 py-3 text-sm font-medium text-foreground transition focus:border-primary focus:outline-none focus:ring-4 focus:ring-primary/10`}),v.address?(0,V.jsx)(`p`,{className:`text-sm text-error`,children:v.address}):null,w&&(S.length>0||C)?(0,V.jsxs)(`div`,{className:`overflow-hidden rounded-xl border border-border bg-surface-elevated`,children:[(0,V.jsxs)(`div`,{className:`flex items-center gap-2 border-b border-border/60 px-4 py-2.5 text-xs font-bold uppercase tracking-wider text-muted-foreground`,children:[C?(0,V.jsx)(_A,{size:14,className:`animate-spin`,"aria-hidden":!0}):(0,V.jsx)(UA,{size:14,"aria-hidden":!0}),l(`settingsMeetupLoc.suggestions`)]}),(0,V.jsx)(`ul`,{className:`max-h-44 overflow-y-auto`,children:S.map(e=>(0,V.jsx)(`li`,{children:(0,V.jsxs)(`button`,{type:`button`,onClick:()=>{h(e.description),T(),y(e=>({...e,address:void 0,form:void 0}))},className:`flex w-full items-start gap-3 px-4 py-3 text-left text-sm text-foreground transition hover:bg-surface`,children:[(0,V.jsx)(xA,{size:16,className:`mt-0.5 shrink-0 text-muted-foreground`,"aria-hidden":!0}),(0,V.jsx)(`span`,{children:e.description})]})},e.placeId))})]}):null]}),(0,V.jsxs)(`button`,{type:`button`,role:`switch`,"aria-checked":g,"aria-label":l(`settingsMeetupLoc.setAsDefaultLocationAria`),onClick:()=>_(e=>!e),className:[`flex w-full cursor-pointer items-center gap-4 roun
470ded-2xl border p-4 text-left transition hover:border-primary/25 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary focus-visible:ring-offset-2`,g?`border-primary/35 bg-primary/5`:`border-border bg-surface-elevated/40 hover:bg-surface-elevated`].join(` `),children:[(0,V.jsx)(`div`,{className:[`flex h-10 w-10 shrink-0 items-center justify-center rounded-xl`,g?`bg-primary/10 text-primary`:`bg-surface text-muted-foreground`].join(` `),"aria-hidden":!0,children:(0,V.jsx)(nj,{size:18,fill:g?`currentColor`:`none`})}),(0,V.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(0,V.jsx)(`p`,{className:`text-sm font-black text-foreground`,children:l(`settingsMeetupLoc.defaultLocation`)}),(0,V.jsx)(`p`,{className:`mt-1 text-sm text-muted-foreground`,children:l(`settingsMeetupLoc.defaultLocationHint`)})]})]}),O?(0,V.jsxs)(`div`,{className:`flex items-start gap-3 rounded-2xl border border-error/20 bg-error/5 px-4 py-3`,children:[(0,V.jsx)(Bk,{size:18,className:`mt-0.5 shrink-0 text-error`,"aria-hidden":!0}),(0,V.jsx)(`p`,{className:`text-sm text-error`,children:O})]}):null]}),(0,V.jsx)(`div`,{className:`mt-auto border-t border-border/60 bg-surface-elevated/30 px-5 py-4 sm:px-6`,children:(0,V.jsxs)(`div`,{className:`flex flex-col-reverse gap-3 sm:flex-row sm:justify-end`,children:[(0,V.jsx)(`button`,{type:`button`,onClick:E,disabled:a,className:`inline-flex items-center justify-center rounded-2xl border border-border bg-surface px-5 py-3 text-sm font-bold text-foreground transition hover:bg-surface-elevated disabled:opacity-50`,children:l(`common.cancel`)}),(0,V.jsx)(`button`,{type:`submit`,disabled:a,className:`inline-flex items-center justify-center gap-2 rounded-2xl bg-primary px-6 py-3 text-sm font-black text-primary-foreground shadow-lg shadow-primary/20 transition hover:bg-primary-hover disabled:cursor-not-allowed disabled:opacity-50`,children:a?(0,V.jsxs)(V.Fragment,{children:[(0,V.jsx)(_A,{size:16,className:`animate-spin`,"aria-hidden":!0}),l(`settingsMeetupLoc.saving`)]}):l(t===`create`?`settingsMeetupLoc.addLocation`:`settingsMeetupLoc.saveChanges`)})]})})]})]})]}):null}),document.body)}function rEe(){let e=my(),[t,n]=(0,b.useState)([]),[r,i]=(0,b.useState)(!0),[a,o]=(0,b.useState)(null),[s,c]=(0,b.useState)({mode:`closed`}),[l,u]=(0,b.useState)(!1),[d,f]=(0,b.useState)(null),[p,m]=(0,b.useState)(null),[h,g]=(0,b.useState)(null),[_,v]=(0,b.useState)(!1),[y,x]=(0,b.useState)(null),S=(0,b.useMemo)(()=>tEe(t),[t]),C=(0,b.useCallback)(async()=>{i(!0),o(null);try{n(await Ds())}catch(e){o(Ns(e))}finally{i(!1)}},[]);(0,b.useEffect)(()=>{let e=!1;return queueMicrotask(()=>{e||C()}),()=>{e=!0}},[C]);let w=(0,b.useCallback)(async e=>{u(!0),f(null);try{let t=await Os({name:e.name,address:e.address,is_default:e.isDefault});n(n=>[...e.isDefault?n.map(e=>({...e,is_default:!1})):n,t]),c({mode:`closed`})}catch(e){f(Ps(e))}finally{u(!1)}},[]),T=(0,b.useCallback)(async e=>{if(s.mode===`edit`){u(!0),f(null);try{let t=await ks(s.address.id,{name:e.name,address:e.address,is_default:e.isDefault});n(n=>n.map(n=>n.id===t.id?t:e.isDefault?{...n,is_default:!1}:n)),c({mode:`closed`})}catch(e){f(Ps(e))}finally{u(!1)}}},[s]),E=(0,b.useCallback)(async e=>{m(e.id);try{let t=await js(e.id);n(e=>e.map(e=>({...e,is_default:e.id===t.id})))}catch(e){o(Ps(e))}finally{m(null)}},[]),D=(0,b.useCallback)(async()=>{if(h){v(!0),x(null);try{await As(h.id),n(e=>e.filter(e=>e.id!==h.id)),g(null)}catch(e){x(Fs(e))}finally{v(!1)}}},[h]),O=(0,b.useCallback)(()=>{f(null),c({mode:`create`})},[]),k=s.mode===`edit`?s.address:null,A=S.length>0;return(0,V.jsxs)(V.Fragment,{children:[(0,V.jsxs)(F7,{title:e(`settings.meetupLocations.title`),description:e(`settings.meetupLocations.description`),children:[(0,V.jsx)(`div`,{className:`rounded-2xl border border-border/60 bg-surface-elevated/40 p-4 sm:p-5`,children:(0,V.jsxs)(`div`,{className:`flex gap-3`,children:[(0,V.jsx)(uA,{size:18,className:`mt-0.5 shrink-0 text-primary`,"aria-hidden":!0}),(0,V.jsx)(`p`,{className:`text-sm leading-relaxed text-muted-foreground`,children:e(`settingsMeetupLoc.infoBlurb`)})]})}),(0,V.jsx)(I7,{title:e(`settings.meetupLocations.savedLocations`),description:S.length>0?S.length===1?e(`settingsMeetupLoc.locationsSavedOne`,{count:S.length}):e(`settingsMeetupLoc.locationsSavedOther`,{count:S.length}):e(`settingsMeetupLoc.noLocationsYet`),children:(0,V.jsxs)(`div`,{className:`space-y-4`,children:[A?(0,V.jsxs)(`button`,{type:`button`,onClick:O,className:`inline-flex items-center justify-center gap-2 rounded-2xl bg-primary px-5 py-3 text-sm font-black text-primary-foreground shadow-lg shadow-primary/20 transition hover:bg-primary-hover`,children:[(0,V.jsx)(IA,{size:16,"aria-hidden":!0}),e(`settingsMeetupLoc.addLocation`)]}):null,r?(0,V.jsxs)(`div`,{className:`flex items-center justify-center py-16`,children:[(0,V.jsx)(_A,{size:28,className:`animate-spin text-muted-foreground`,"aria-hidden":!0}),(0,V.jsx)(`span`,{className:`sr-only`,children:e(`settingsMeetupLoc.loadingAria`)})]}):a?(0,V.jsx)(`div`,{className:`rounded-2xl border border-error/20 bg-error/5 px-4 py-4 text-sm text-error`,children:a}):S.length===0?(0,V.jsxs)(`div`,{className:`rounded-2xl border border-dashed border-border bg-surface/50 px-4 py-12 text-center`,children:[(0,V.jsx)(`div`,{className:`mx-auto flex h-16 w-16 items-center justify-center rounded-full bg-primary/10 text-primary`,children:(0,V.jsx)(xA,{size:32,strokeWidth:1.5,"aria-hidden":!0})}),(0,V.jsx)(`h3`,{className:`mt-4 text-lg font-black text-foreground`,children:e(`settingsMeetupLoc.emptyTitle`)}),(0,V.jsx)(`p`,{className:`mx-auto mt-2 max-w-md text-sm leading-relaxed text-muted-foreground`,children:e(`settingsMeetupLoc.emptyBody`)}),(0,V.jsxs)(`button`,{type:`button`,onClick:O,className:`mt-6 inline-flex items-center justify-center gap-2 rounded-2xl bg-primary px-6 py-3 text-sm font-black text-primary-foreground shadow-lg shadow-primary/20 transition hover:bg-primary-hover`,children:[(0,V.jsx)(IA,{size:16,"aria-hidden":!0}),e(`settingsMeetupLoc.addLocation`)]})]}):(0,V.jsx)(`div`,{className:`space-y-3`,children:S.map(e=>(0,V.jsx)($Te,{address:e,onEdit:e=>{f(null),c({mode:`edit`,address:e})},onDelete:e=>{x(null),g(e)},onSetDefault:e=>void E(e),isSettingDefault:p===e.id},e.id))})]})})]}),(0,V.jsx)(t9,{open:s.mode===`create`,mode:`create`,existingAddresses:t,isSubmitting:l,submitError:d,onClose:()=>{l||(c({mode:`closed`}),f(null))},onSubmit:e=>void w(e)}),(0,V.jsx)(t9,{open:s.mode===`edit`,mode:`edit`,initialValues:k?{name:k.name,address:k.address,isDefault:k.is_default}:void 0,existingAddresses:t,editingAddressId:k?.id,isSubmitting:l,submitError:d,onClose:()=>{l||(c({mode:`closed`}),f(null))},onSubmit:e=>void T(e)}),(0,V.jsx)(QTe,{open:!!h,address:h,isDeleting:_,error:y,onClose:()=>{_||(g(null),x(null))},onConfirm:()=>void D()})]})}function iEe({open:e,schedule:t,isDeleting:n,error:r,onClose:i,onConfirm:a}){let o=my(),s=(0,b.useId)(),c=(0,b.useCallback)(()=>{n||i()},[n,i]);return(0,b.useEffect)(()=>
470{if(!e)return;let t=e=>{e.key===`Escape`&&!n&&c()};return window.addEventListener(`keydown`,t),()=>window.removeEventListener(`keydown`,t)},[c,n,e]),(0,b.useEffect)(()=>{if(!e)return;let t=document.body.style.overflow;return document.body.style.overflow=`hidden`,()=>{document.body.style.overflow=t}},[e]),(0,x.createPortal)((0,V.jsx)(zD,{children:e&&t?(0,V.jsxs)(ik.div,{className:`fixed inset-0 z-[130] flex items-center justify-center p-4`,initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},children:[(0,V.jsx)(`button`,{type:`button`,className:`absolute inset-0 bg-black/50 backdrop-blur-[2px]`,"aria-label":o(`common.close`),onClick:c}),(0,V.jsxs)(ik.div,{role:`alertdialog`,"aria-modal":`true`,"aria-labelledby":s,initial:{opacity:0,scale:.96,y:8},animate:{opacity:1,scale:1,y:0},exit:{opacity:0,scale:.96,y:8},transition:{duration:.2,ease:[.16,1,.3,1]},className:`relative z-10 w-full max-w-md overflow-hidden rounded-3xl border border-border bg-surface shadow-2xl`,children:[(0,V.jsx)(`div`,{className:`border-b border-border/60 bg-error/5 px-5 py-5 sm:px-6`,children:(0,V.jsxs)(`div`,{className:`flex items-start justify-between gap-4`,children:[(0,V.jsxs)(`div`,{className:`flex items-start gap-3`,children:[(0,V.jsx)(`div`,{className:`flex h-11 w-11 shrink-0 items-center justify-center rounded-xl bg-error/10 text-error`,children:(0,V.jsx)(cj,{size:20,"aria-hidden":!0})}),(0,V.jsxs)(`div`,{children:[(0,V.jsx)(`h2`,{id:s,className:`text-lg font-black tracking-tight text-foreground`,children:o(`settingsMeetupTimes.deleteTitle`)}),(0,V.jsx)(`p`,{className:`mt-1 text-sm text-muted-foreground`,children:o(`settingsMeetupTimes.deleteWillRemove`,{name:t.name})})]})]}),(0,V.jsxs)(`button`,{type:`button`,onClick:c,disabled:n,className:`inline-flex h-10 w-10 shrink-0 items-center justify-center rounded-xl border border-border bg-surface text-muted-foreground transition hover:text-foreground disabled:opacity-50`,children:[(0,V.jsx)(mj,{size:18,"aria-hidden":!0}),(0,V.jsx)(`span`,{className:`sr-only`,children:o(`common.close`)})]})]})}),(0,V.jsxs)(`div`,{className:`space-y-4 px-5 py-5 sm:px-6`,children:[(0,V.jsx)(`p`,{className:`text-sm leading-relaxed text-muted-foreground`,children:o(`settingsMeetupTimes.deleteWarning`)}),r?(0,V.jsx)(`p`,{className:`text-sm text-error`,children:r}):null]}),(0,V.jsxs)(`div`,{className:`flex flex-col-reverse gap-3 border-t border-border/60 bg-surface-elevated/30 px-5 py-4 sm:flex-row sm:justify-end sm:px-6`,children:[(0,V.jsx)(`button`,{type:`button`,onClick:c,disabled:n,className:`inline-flex items-center justify-center rounded-2xl border border-border bg-surface px-5 py-3 text-sm font-bold text-foreground transition hover:bg-surface-elevated disabled:opacity-50`,children:o(`common.cancel`)}),(0,V.jsx)(`button`,{type:`button`,onClick:a,disabled:n,className:`inline-flex items-center justify-center gap-2 rounded-2xl bg-error px-6 py-3 text-sm font-black text-white transition hover:bg-error/90 disabled:cursor-not-allowed disabled:opacity-50`,children:n?(0,V.jsxs)(V.Fragment,{children:[(0,V.jsx)(_A,{size:16,className:`animate-spin`,"aria-hidden":!0}),o(`settingsMeetupTimes.deleting`)]}):o(`settingsMeetupTimes.deleteSchedule`)})]})]})]}):null}),document.body)}var n9=[`settingsMeetupTimes.dayMon`,`settingsMeetupTimes.dayTue`,`settingsMeetupTimes.dayWed`,`settingsMeetupTimes.dayThu`,`settingsMeetupTimes.dayFri`,`settingsMeetupTimes.daySat`,`settingsMeetupTimes.daySun`],aEe=n9.map((e,t)=>({value:t+1}));function r9(e){return n9[e-1]??n9[0]}function i9(e){let t=e.trim(),n=/^(\d{1,2}):(\d{2})(?::(\d{2}))?$/.exec(t);return n?`${n[1].padStart(2,`0`)}:${n[2].padStart(2,`0`)}:${(n[3]??`00`).padStart(2,`0`)}`:t}function a9(e){return i9(e.length===5?`${e}:00`:e)}function o9(e){let[t,n]=i9(e).split(`:`),r=Number.parseInt(t,10),i=Number.parseInt(n,10);if(Number.isNaN(r)||Number.isNaN(i))return e;let a=new Date;return a.setHours(r,i,0,0),a.toLocaleTimeString(void 0,{hour:`numeric`,minute:`2-digit`})}function s9(e,t){return i9(e).localeCompare(i9(t))}function oEe(e,t){return s9(e.start_time,t.end_time)<=0&&s9(t.start_time,e.end_time)<=0}function c9(e){if(e.length===0)return[];let t=[...e].sort((e,t)=>
470e.day_of_week===t.day_of_week?s9(e.start_time,t.start_time):e.day_of_week-t.day_of_week),n=[t[0]];for(let e=1;e<t.length;e+=1){let r=t[e],i=n[n.length-1];r.day_of_week===i.day_of_week&&oEe(i,r)?n[n.length-1]={day_of_week:i.day_of_week,start_time:s9(i.start_time,r.start_time)<0?i.start_time:r.start_time,end_time:s9(i.end_time,r.end_time)>0?i.end_time:r.end_time}:n.push(r)}return n}function sEe(e){return[...e].sort((e,t)=>e.is_default===t.is_default?e.name.localeCompare(t.name,void 0,{sensitivity:`base`}):e.is_default?-1:1)}function l9(e){let t=new Map;return e.forEach(e=>{let n=t.get(e.day_of_week)??[];n.push(e),t.set(e.day_of_week,n)}),t.forEach(e=>{e.sort((e,t)=>s9(e.start_time,t.start_time))}),t}function cEe(e,t){let n=e.slots.length;if(n===0)return t(`settingsMeetupTimes.noTimeSlots`);let r=new Set(e.slots.map(e=>e.day_of_week));if(r.size===1){let e=[...r][0],i=t(r9(e));return t(n===1?`settingsMeetupTimes.slotsOneDayOne`:`settingsMeetupTimes.slotsOneDayOther`,{count:n,day:i})}return t(n===1?`settingsMeetupTimes.slotsMultiDayOne`:`settingsMeetupTimes.slotsMultiDayOther`,{count:n,days:r.size})}function lEe(e){return e.map(e=>({day_of_week:e.day_of_week,start_time:a9(e.start_time),end_time:a9(e.end_time)}))}function uEe(e){return{name:e.name,isDefault:e.is_default,slots:lEe(e.slots)}}function dEe(e,t){return s9(t,e)>0}var u9=192,d9=8;function fEe({schedule:e,onEdit:t,onDelete:n,onSetDefault:r,isSettingDefault:i}){let a=my(),o=(0,b.useId)(),s=(0,b.useRef)(null),c=(0,b.useRef)(null),[l,u]=(0,b.useState)(!1),[d,f]=(0,b.useState)(!1),[p,m]=(0,b.useState)(null),h=l9(e.slots),g=[...h.keys()].sort((e,t)=>e-t),_=(0,b.useCallback)(()=>{let t=c.current;if(!t)return;let n=t.getBoundingClientRect(),r=e.is_default?88:132,i=window.innerHeight-n.bottom-12,a=n.top-12,o=s.current?.offsetHeight??r;m({top:i<o+d9&&a>i?n.top-o-d9:n.bottom+d9,left:Math.min(Math.max(12,n.right-u9),window.innerWidth-u9-12)})},[e.is_default]),v=l?p:null;(0,b.useLayoutEffect)(()=>{if(!l)return;_();let e=window.requestAnimationFrame(_);return()=>window.cancelAnimationFrame(e)},[l,_]),(0,b.useEffect)(()=>{if(!l)return;let e=e=>{let t=e.target;s.current?.contains(t)||c.current?.contains(t)||u(!1)},t=e=>{e.key===`Escape`&&u(!1)};return window.addEventListener(`mousedown`,e),window.addEventListener(`keydown`,t),window.addEventListener(`resize`,_),window.addEventListener(`scroll`,_,!0),()=>{window.removeEventListener(`mousedown`,e),window.removeEventListener(`keydown`,t),window.removeEventListener(`resize`,_),window.removeEventListener(`scroll`,_,!0)}},[l,_]);let y=(0,b.useCallback)(()=>u(!1),[]),S=l&&v?(0,x.createPortal)((0,V.jsxs)(`div`,{ref:s,id:o,role:`menu`,style:{top:v.top,left:v.left,width:u9},className:`fixed z-[120] overflow-hidden rounded-xl border border-border bg-surface py-1 shadow-lg`,children:[e.is_default?null:(0,V.jsxs)(`button`,{type:`button`,role:`menuitem`,onClick:()=>{y(),r(e)},className:`flex w-full items-center gap-2.5 px-3.5 py-2.5 text-left text-sm font-semibold text-foreground transition hover:bg-surface-elevated`,children:[(0,V.jsx)(nj,{size:16,className:`text-primary`,"aria-hidden":!0}),a(`settingsMeetupTimes.setAsDefault`)]}),(0,V.jsxs)(`button`,{type:`button`,role:`menuitem`,onClick:()=>{y(),t(e)},className:`flex w-full items-center gap-2.5 px-3.5 py-2.5 text-left text-sm font-semibold text-foreground transition hover:bg-surface-elevated`,children:[(0,V.jsx)(NA,{size:16,"aria-hidden":!0}),a(`settingsMeetupTimes.edit`)]}),(0,V.jsxs)(`button`,{type:`button`,role:`menuitem`,onClick:()=>{y(),n(e)},className:`flex w-full items-center gap-2.5 px-3.5 py-2.5 text-left text-sm font-semibold text-error transition hover:bg-error/5`,children:[(0,V.jsx)(oj,{size:16,"aria-hidden":!0}),a(`settingsMeetupTimes.delete`)]})]}),document.body):null;return(0,V.jsxs)(V.Fragment,{children:[(0,V.jsxs)(`article`,{className:[`relative rounded-2xl border bg-surface shadow-sm transition`,e.is_default?`border-primary/40 ring-1 ring-primary/15`:`border-border hover:border-primary/20`].join(` `),children:[(0,V.jsxs)(`div`,{className:`flex items-start gap-3 p-4 sm:p-5`,children:[(0,V.jsx)(`div`,{className:[`mt
470-0.5 flex h-11 w-11 shrink-0 items-center justify-center rounded-xl`,e.is_default?`bg-primary/10 text-primary`:`bg-surface-elevated text-muted-foreground`].join(` `),"aria-hidden":!0,children:(0,V.jsx)(Uk,{size:20,strokeWidth:1.75})}),(0,V.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(0,V.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2`,children:[(0,V.jsx)(`h3`,{className:`truncate text-base font-black tracking-tight text-foreground`,children:e.name}),e.is_default?(0,V.jsxs)(`span`,{className:`inline-flex items-center gap-1 rounded-full border border-primary/25 bg-primary/10 px-2.5 py-0.5 text-[10px] font-bold uppercase tracking-wider text-primary`,children:[(0,V.jsx)(nj,{size:10,fill:`currentColor`,"aria-hidden":!0}),a(`settingsMeetupTimes.defaultBadge`)]}):null]}),(0,V.jsx)(`p`,{className:`mt-2 text-sm text-muted-foreground`,children:cEe(e,a)})]}),(0,V.jsxs)(`div`,{className:`flex shrink-0 items-center gap-1`,children:[(0,V.jsxs)(`button`,{type:`button`,onClick:()=>f(e=>!e),"aria-expanded":d,className:`inline-flex h-10 w-10 items-center justify-center rounded-xl border border-border bg-surface-elevated text-muted-foreground transition hover:border-primary/25 hover:text-foreground`,children:[d?(0,V.jsx)(zk,{size:18,"aria-hidden":!0}):(0,V.jsx)(Ik,{size:18,"aria-hidden":!0}),(0,V.jsx)(`span`,{className:`sr-only`,children:a(d?`settingsMeetupTimes.hideTimeSlots`:`settingsMeetupTimes.showTimeSlots`)})]}),(0,V.jsx)(`div`,{className:`relative`,children:(0,V.jsxs)(`button`,{ref:c,type:`button`,"aria-haspopup":`menu`,"aria-expanded":l,"aria-controls":o,onClick:()=>u(e=>!e),className:`inline-flex h-10 w-10 items-center justify-center rounded-xl border border-border bg-surface-elevated text-muted-foreground transition hover:border-primary/25 hover:text-foreground`,children:[i?(0,V.jsx)(_A,{size:16,className:`animate-spin`,"aria-hidden":!0}):(0,V.jsx)(Xk,{size:18,"aria-hidden":!0}),(0,V.jsx)(`span`,{className:`sr-only`,children:a(`settingsMeetupTimes.actionsFor`,{name:e.name})})]})})]})]}),d?(0,V.jsx)(`div`,{className:`border-t border-border/60 px-4 pb-4 sm:px-5 sm:pb-5`,children:g.length===0?(0,V.jsx)(`p`,{className:`pt-4 text-sm text-muted-foreground`,children:a(`settingsMeetupTimes.noTimeSlotsDefined`)}):(0,V.jsx)(`div`,{className:`space-y-3 pt-4`,children:g.map(e=>{let t=h.get(e)??[];return(0,V.jsxs)(`div`,{className:`flex items-start gap-3`,children:[(0,V.jsx)(`span`,{className:`mt-0.5 inline-flex w-11 shrink-0 justify-center rounded-lg bg-surface-elevated px-2 py-1 text-[10px] font-bold uppercase tracking-wider text-primary`,children:a(r9(e))}),(0,V.jsx)(`div`,{className:`min-w-0 flex-1 space-y-1.5`,children:t.map((t,n)=>(0,V.jsxs)(`p`,{className:`text-sm font-medium text-foreground`,children:[o9(t.start_time),(0,V.jsx)(`span`,{className:`px-1.5 text-muted-foreground`,children:`â`}),o9(t.end_time)]},`${e}-${t.start_time}-${t.end_time}-${n}`))})]},e)})})}):null]}),S]})}var pEe={name:``,isDefault:!1,slots:[]},f9=`09:00`,p9=`17:00`;function m9({open:e,mode:t,initialValues:n=pEe,isSubmitting:r,submitError:i,onClose:a,onSubmit:o}){let s=my(),c=(0,b.useId)(),l=(0,b.useId)(),[u,d]=(0,b.useState)(n.name),[f,p]=(0,b.useState)(n.isDefault),[m,h]=(0,b.useState)(n.slots),[g,_]=(0,b.useState)([]),[v,y]=(0,b.useState)(f9),[S,C]=(0,b.useState)(p9),[w,T]=(0,b.useState)({});(0,b.useEffect)(()=>{if(!e)return;let t=!1;return queueMicrotask(()=>{t||(d(n.name),p(n.isDefault),h(n.slots),_([]),y(f9),C(p9),T({}))}),()=>{t=!0}},[n,e]);let E=(0,b.useCallback)(()=>{r||a()},[r,a]);(0,b.useEffect)(()=>{if(!e)return;let t=e=>{e.key===`Escape`&&!r&&E()};return window.addEventListener(`keydown`,t),()=>window.removeEventListener(`keydown`,t)},[E,r,e]),(0,b.useEffect)(()=>{if(!e)return;let t=document.body.style.overflow;return document.body.style.overflow=`hidden`,()=>{document.body.style.overflow=t}},[e]);let D=(0,b.useMemo)(()=>c9(m),[m]),O=(0,b.useMemo)(()=>l9(D),[D]),k=(0,b.useMemo)(()=>[...O.keys()].sort((e,t)=>e-t),[O]),A=e=>{_(t=>t.includes(e)?t.filter(t=>t!==e):[...t,e].sort((e,t)=>e-t)),T(e=>({...e,builder:void 0}))},j=()=>
470{if(g.length===0){T(e=>({...e,builder:s(`settingsMeetupTimes.selectAtLeastOneDay`)}));return}if(!dEe(v,S)){T(e=>({...e,builder:s(`settingsMeetupTimes.endAfterStart`)}));return}let e=a9(v),t=a9(S);h(c9([...m,...g.map(n=>({day_of_week:n,start_time:e,end_time:t}))])),_([]),T(e=>({...e,builder:void 0,slots:void 0,form:void 0}))},M=e=>{e.preventDefault();let t=u.trim(),n={};if(t||(n.name=s(`settingsMeetupTimes.nameRequired`)),m.length===0&&(n.slots=s(`settingsMeetupTimes.slotsRequired`)),Object.keys(n).length>0){T(n);return}T({}),o({name:t,isDefault:f,slots:c9(m)})},N=w.form??i,P=m.length===1?s(`settingsMeetupTimes.slotCountOne`,{count:m.length}):s(`settingsMeetupTimes.slotCountOther`,{count:m.length});return(0,x.createPortal)((0,V.jsx)(zD,{children:e?(0,V.jsxs)(ik.div,{className:`fixed inset-0 z-[120] flex items-end justify-center sm:items-center sm:p-4`,initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},"aria-hidden":!e,children:[(0,V.jsx)(`button`,{type:`button`,className:`absolute inset-0 bg-black/50 backdrop-blur-[2px]`,"aria-label":s(`common.close`),onClick:E}),(0,V.jsxs)(ik.div,{role:`dialog`,"aria-modal":`true`,"aria-labelledby":c,"aria-describedby":l,initial:{opacity:0,y:24},animate:{opacity:1,y:0},exit:{opacity:0,y:24},transition:{duration:.22,ease:[.16,1,.3,1]},className:`relative z-10 flex max-h-[92vh] w-full max-w-xl flex-col overflow-hidden rounded-t-3xl border border-border bg-surface shadow-2xl sm:rounded-3xl`,children:[(0,V.jsxs)(`div`,{className:`flex items-start justify-between gap-4 border-b border-border/60 bg-surface-elevated/40 px-5 py-5 sm:px-6`,children:[(0,V.jsxs)(`div`,{className:`min-w-0`,children:[(0,V.jsx)(`p`,{id:l,className:`text-xs font-bold uppercase tracking-widest text-muted-foreground`,children:s(t===`create`?`settingsMeetupTimes.newSchedule`:`settingsMeetupTimes.editSchedule`)}),(0,V.jsx)(`h2`,{id:c,className:`mt-1 text-xl font-black tracking-tight text-foreground`,children:s(t===`create`?`settingsMeetupTimes.addAvailabilityProfile`:`settingsMeetupTimes.editAvailabilityProfile`)})]}),(0,V.jsxs)(`button`,{type:`button`,onClick:E,disabled:r,className:`inline-flex h-10 w-10 shrink-0 items-center justify-center rounded-xl border border-border bg-surface text-muted-foreground transition hover:text-foreground disabled:opacity-50`,children:[(0,V.jsx)(mj,{size:18,"aria-hidden":!0}),(0,V.jsx)(`span`,{className:`sr-only`,children:s(`common.close`)})]})]}),(0,V.jsxs)(`form`,{onSubmit:M,className:`flex min-h-0 flex-1 flex-col overflow-y-auto`,children:[(0,V.jsxs)(`div`,{className:`space-y-5 px-5 py-5 sm:px-6`,children:[(0,V.jsxs)(`div`,{className:`space-y-2`,children:[(0,V.jsxs)(`label`,{htmlFor:`meetup-schedule-name`,className:`text-sm font-bold text-foreground`,children:[s(`settingsMeetupTimes.scheduleName`),` `,(0,V.jsx)(`span`,{className:`text-error`,children:`*`})]}),(0,V.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:s(`settingsMeetupTimes.scheduleNameHint`)}),(0,V.jsx)(`input`,{id:`meetup-schedule-name`,type:`text`,value:u,required:!0,"aria-required":`true`,onChange:e=>{d(e.target.value),T(e=>({...e,name:void 0,form:void 0}))},placeholder:s(`settingsMeetupTimes.scheduleNamePlaceholder`),autoComplete:`off`,className:`w-full rounded-xl border border-border bg-surface px-4 py-3 text-sm font-medium text-foreground transition focus:border-primary focus:outline-none focus:ring-4 focus:ring-primary/10`}),w.name?(0,V.jsx)(`p`,{className:`text-sm text-error`,children:w.name}):null]}),(0,V.jsxs)(`button`,{type:`button`,role:`switch`,"aria-checked":f,"aria-label":s(`settingsMeetupTimes.setAsDefaultScheduleAria`),onClick:()=>p(e=>!e),className:[`flex w-full cursor-pointer items-center gap-4 roun
470ded-2xl border p-4 text-left transition hover:border-primary/25 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary focus-visible:ring-offset-2`,f?`border-primary/35 bg-primary/5`:`border-border bg-surface-elevated/40 hover:bg-surface-elevated`].join(` `),children:[(0,V.jsx)(`div`,{className:[`flex h-10 w-10 shrink-0 items-center justify-center rounded-xl`,f?`bg-primary/10 text-primary`:`bg-surface text-muted-foreground`].join(` `),"aria-hidden":!0,children:(0,V.jsx)(nj,{size:18,fill:f?`currentColor`:`none`})}),(0,V.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(0,V.jsx)(`p`,{className:`text-sm font-black text-foreground`,children:s(`settingsMeetupTimes.defaultSchedule`)}),(0,V.jsx)(`p`,{className:`mt-1 text-sm text-muted-foreground`,children:s(`settingsMeetupTimes.defaultScheduleHint`)})]})]}),(0,V.jsxs)(`div`,{className:`overflow-hidden rounded-2xl border border-border bg-surface shadow-sm`,children:[(0,V.jsxs)(`div`,{className:`border-b border-border/60 bg-surface-elevated/40 px-4 py-4 sm:px-5`,children:[(0,V.jsx)(`h3`,{className:`text-sm font-black text-foreground`,children:s(`settingsMeetupTimes.addTimeSlots`)}),(0,V.jsx)(`p`,{className:`mt-1 text-xs leading-relaxed text-muted-foreground sm:text-sm`,children:s(`settingsMeetupTimes.addTimeSlotsHint`)})]}),(0,V.jsxs)(`div`,{className:`space-y-4 px-4 py-4 sm:px-5 sm:py-5`,children:[(0,V.jsxs)(`div`,{className:`space-y-2`,children:[(0,V.jsx)(`p`,{className:`text-xs font-bold uppercase tracking-wider text-muted-foreground`,children:s(`settingsMeetupTimes.days`)}),(0,V.jsx)(`div`,{className:`flex flex-wrap gap-2`,children:aEe.map(e=>(0,V.jsx)(`button`,{type:`button`,onClick:()=>A(e.value),className:[`min-w-[3rem] rounded-xl border px-3 py-2 text-sm font-bold transition`,g.includes(e.value)?`border-primary bg-primary text-primary-foreground shadow-sm`:`border-border bg-surface-elevated text-foreground hover:border-primary/25 hover:bg-primary/5`].join(` `),children:s(r9(e.value))},e.value))})]}),(0,V.jsxs)(`div`,{className:`grid gap-3 sm:grid-cols-2`,children:[(0,V.jsxs)(`div`,{className:`space-y-2`,children:[(0,V.jsx)(`label`,{htmlFor:`meetup-slot-start`,className:`text-sm font-bold text-foreground`,children:s(`settingsMeetupTimes.startTime`)}),(0,V.jsx)(`input`,{id:`meetup-slot-start`,type:`time`,value:v,onChange:e=>{y(e.target.value),T(e=>({...e,builder:void 0}))},className:`w-full rounded-xl border border-border bg-surface px-4 py-3 text-sm font-medium text-foreground transition focus:border-primary focus:outline-none focus:ring-4 focus:ring-primary/10`})]}),(0,V.jsxs)(`div`,{className:`space-y-2`,children:[(0,V.jsx)(`label`,{htmlFor:`meetup-slot-end`,className:`text-sm font-bold text-foreground`,children:s(`settingsMeetupTimes.endTime`)}),(0,V.jsx)(`input`,{id:`meetup-slot-end`,type:`time`,value:S,onChange:e=>{C(e.target.value),T(e=>({...e,builder:void 0}))},className:`w-full rounded-xl border border-border bg-surface px-4 py-3 text-sm font-medium text-foreground transition focus:border-primary focus:outline-none focus:ring-4 focus:ring-primary/10`})]})]}),w.builder?(0,V.jsx)(`p`,{className:`text-sm text-error`,children:w.builder}):null,(0,V.jsxs)(`button`,{type:`button`,onClick:j,className:`inline-flex items-center justify-center gap-2 rounded-2xl border border-border bg-surface px-4 py-2.5 text-sm font-bold text-foreground transition hover:border-primary/25 hover:bg-primary/5`,children:[(0,V.jsx)(IA,{size:16,"aria-hidden":!0}),s(`settingsMeetupTimes.addTimeSlot`)]})]})]}),(0,V.jsxs)(`div`,{className:`space-y-3`,children:[(0,V.jsxs)(`div`,{className:`flex items-center justify-between gap-3`,children:[(0,V.jsxs)(`h3`,{className:`text-sm font-black text-foreground`,children:[s(`settingsMeetupTimes.savedSlots`),` `,(0,V.jsx)(`span`,{className:`text-error`,children:`*`})]}),(0,V.jsx)(`span`,{className:`text-xs font-semibold text-muted-foreground`,children:P})]}),m.length===0?(0,V.jsxs)(`div`,{className:`rounded-2xl border border-dashed border-border bg-surface/50 px-4 py-8 text-center`,children:[(0,V.jsx)(`div`,{className:`mx-auto flex h-12 w-12 items-center justify-center rounded-full bg-primary/10 text-primary`,children:(0,V.jsx)(Uk,{size:22,strokeWidth:1.75,"aria-hidden":!0})}),(0,V.jsx)(`p`,{className:`mt-3 text-sm font-semibold text-foreground`,children:s(`settingsMeetupTimes.noTimeSlotsYet`)}),(0,V.jsx)(`p`,{className:`mt-1 text-sm text-muted-foreground`,children:s(`settingsMeetupTimes.addSlotBeforeSaving`)})]}):(0,V.jsx)(`div`,{className:`space-y-3`,children:k.map(e=>{let t=O.get(e)??[],n=s(r9(e));return(0,V.jsxs)(`div`,{className:`rounded-2xl border border-border bg-surface-elevated/30 p-4`,children:[(0,V.jsx)(`p`,{className:`text-xs font-bold uppercase tracking-wider text-primary`,children:n}),(0,V.jsx)(`div`,{className:`mt-3 space-y-2`,children:t.map(t=>(0,V.jsxs)(`div`,{className:`flex items-center justify-between gap-3 rounded-xl border border-border/60 bg-surface px-3 py-2.5`,children:[(0,V.jsxs)(`span`,{className:`text-sm font-medium text-foreground`,children:[o9(t.start_time),(0,V.jsx)(`span`,{className:`px-1.5 text-muted-foreground`,children:`â`}),o9(t.end_time)]}),(0,V.jsx)(`button`,{type:`button`,onClick:()=>{h(e=>e.filter(e=>!(e.day_of_week===t.day_of_week&&a9(e.start_time)===a9(t.start_time)&&a9(e.end_time)===a9(t.end_time)))),T(e=>({...e,slots:void 0,form:void 0}))},className:`inline-flex h-8 w-8 shrink-0 items-center justify-center rounded-lg text-muted-foreground transition hover:bg-error/10 hover:text-error`,"aria-label":s(`settingsMeetupTimes.removeDaySlot`,{day:n}),children:(0,V.jsx)(oj,{size:15,"aria-hidden":!0})})]},`${e}-${t.start_time}-${t.end_time}`))})]},e)})}),w.slots?(0,V.jsx)(`p`,{className:`text-sm text-error`,children:w.slots}):null]}),N?(0,V.jsxs)(`div`,{className:`flex items-start gap-3 rounded-2xl border border-error/20 bg-error/5 px-4 py-3`,children:[(0,V.jsx)(Bk,{size:18,className:`mt-0.5 shrink-0 text-error`,"aria-hidden":!0}),(0,V.jsx)(`p`,{className:`text-sm text-error`,children:N})]}):null]}),(0,V.jsx)(`div`,{className:`mt-auto border-t border-border/60 bg-surface-elevated/30 px-5 py-4 sm:px-6`,children:(0,V.jsxs)(`div`,{className:`flex flex-col-reverse gap-3 sm:flex-row sm:justify-end`,children:[(0,V.jsx)(`button`,{type:`button`,onClick:E,disabled:r,className:`inline-flex items-center justify-center rounded-2xl border border-border bg-surface px-5 py-3 text-sm font-bold text-foreground transition hover:bg-surface-elevated disabled:opacity-50`,children:s(`common.cancel`)}),(0,V.jsx)(`button`,{type:`submit`,disabled:r,className:`inline-flex items-center justify-center gap-2 rounded-2xl bg-primary px-6 py-3 text-sm font-black text-primary-foreground shadow-lg shadow-primary/20 transition hover:bg-primary-hover disabled:cursor-not-allowed disabled:opacity-50`,children:r?(0,V.jsxs)(V.Fragment,{children:[(0,V.jsx)(_A,{size:16,className:`animate-spin`,"aria-hidden":!0}),s(`settingsMeetupTimes.saving`)]}):s(t===`create`?`settingsMeetupTimes.addSchedule`:`settingsMeetupTimes.saveChanges`)})]})})]})]})]}):null}),document.body)}function mEe(){let e=my(),[t,n]=(0,b.useState)([]),[r,i]=(0,b.useState)(!0),[a,o]=(0,b.useState)(null),[s,c]=(0,b.useState)({mode:`closed`}),[l,u]=(0,b.useState)(!1),[d,f]=(0,b.useState)(null),[p,m]=(0,b.useState)(null),[h,g]=(0,b.useState)(null),[_,v]=(0,b.useState)(!1),[y,x]=(0,b.useState)(null),S=(0,b.useMemo)(()=>sEe(t),[t]),C=(0,b.useCallback)(async()=>{i(!0),o(null);try{n(await Is())}catch(e){o(Hs(e))}finally{i(!1)}},[]);(0,b.useEffect)(()=>{let e=!1;return queueMicrotask(()=>{e||C()}),()=>{e=!0}},[C]);let w=(0,b.useCallback)(()=>{f(null),c({mode:`create`})},[]),T=(0,b.useCallback)(async e=>{u(!0),f(null);try{let t=await Ls({name:e.name,is_default:e.isDefault,slots:c9(e.slots)});n(n=>[...e.isDefault?n.map(e=>({...e,is_default:!1})):n,t]),c({mode:`closed`})}catch(e){f(Us(e))}finally{u(!1)}},[]),E=(0,b.useCallback)(async e=>{if(s.mode===`edit`){u(!0),f(null);try{let t=await Rs(s.schedule.id,{name:e.name,is_default:e.isDefault,slots:c9(e.slots)});n(n=>n.map(n=>n.id===t.id?t:e.isDefault?{...n,is_default:!1}:n)),c({mode:`closed`})}catch(e){f(Us(e))}finally{u(!1)}}},[s]),D=(0,b.useCallback)(async e=>{m(e.id);try{let t=await Bs(e.id);n(e=>e.map(e=>({...e,is_default:e.id===t.id})))}catch(e){o(Us(e))}finally{m(null)}},[]),O=(0,b.useCallback)(async()=>
470{if(h){v(!0),x(null);try{await zs(h.id),n(e=>e.filter(e=>e.id!==h.id)),g(null)}catch(e){x(Ws(e))}finally{v(!1)}}},[h]),k=s.mode===`edit`?s.schedule:null,A=S.length>0;return(0,V.jsxs)(V.Fragment,{children:[(0,V.jsxs)(F7,{title:e(`settings.meetupTimes.title`),description:e(`settings.meetupTimes.description`),children:[(0,V.jsx)(`div`,{className:`rounded-2xl border border-border/60 bg-surface-elevated/40 p-4 sm:p-5`,children:(0,V.jsxs)(`div`,{className:`flex gap-3`,children:[(0,V.jsx)(uA,{size:18,className:`mt-0.5 shrink-0 text-primary`,"aria-hidden":!0}),(0,V.jsx)(`p`,{className:`text-sm leading-relaxed text-muted-foreground`,children:e(`settingsMeetupTimes.infoBlurb`)})]})}),(0,V.jsx)(I7,{title:e(`settings.meetupTimes.savedSchedules`),description:A?S.length===1?e(`settingsMeetupTimes.schedulesSavedOne`,{count:S.length}):e(`settingsMeetupTimes.schedulesSavedOther`,{count:S.length}):e(`settingsMeetupTimes.noProfilesYet`),children:(0,V.jsxs)(`div`,{className:`space-y-4`,children:[A?(0,V.jsxs)(`button`,{type:`button`,onClick:w,className:`inline-flex items-center justify-center gap-2 rounded-2xl bg-primary px-5 py-3 text-sm font-black text-primary-foreground shadow-lg shadow-primary/20 transition hover:bg-primary-hover`,children:[(0,V.jsx)(IA,{size:16,"aria-hidden":!0}),e(`settingsMeetupTimes.addSchedule`)]}):null,r?(0,V.jsxs)(`div`,{className:`flex items-center justify-center py-16`,children:[(0,V.jsx)(_A,{size:28,className:`animate-spin text-muted-foreground`,"aria-hidden":!0}),(0,V.jsx)(`span`,{className:`sr-only`,children:e(`settingsMeetupTimes.loadingAria`)})]}):a?(0,V.jsx)(`div`,{className:`rounded-2xl border border-error/20 bg-error/5 px-4 py-4 text-sm text-error`,children:a}):A?(0,V.jsx)(`div`,{className:`space-y-3`,children:S.map(e=>(0,V.jsx)(fEe,{schedule:e,onEdit:e=>{f(null),c({mode:`edit`,schedule:e})},onDelete:e=>{x(null),g(e)},onSetDefault:e=>void D(e),isSettingDefault:p===e.id},e.id))}):(0,V.jsxs)(`div`,{className:`rounded-2xl border border-dashed border-border bg-surface/50 px-4 py-12 text-center`,children:[(0,V.jsx)(`div`,{className:`mx-auto flex h-16 w-16 items-center justify-center rounded-full bg-primary/10 text-primary`,children:(0,V.jsx)(Uk,{size:32,strokeWidth:1.5,"aria-hidden":!0})}),(0,V.jsx)(`h3`,{className:`mt-4 text-lg font-black text-foreground`,children:e(`settingsMeetupTimes.emptyTitle`)}),(0,V.jsx)(`p`,{className:`mx-auto mt-2 max-w-md text-sm leading-relaxed text-muted-foreground`,children:e(`settingsMeetupTimes.emptyBody`)}),(0,V.jsxs)(`button`,{type:`button`,onClick:w,className:`mt-6 inline-flex items-center justify-center gap-2 rounded-2xl bg-primary px-6 py-3 text-sm font-black text-primary-foreground shadow-lg shadow-primary/20 transition hover:bg-primary-hover`,children:[(0,V.jsx)(IA,{size:16,"aria-hidden":!0}),e(`settingsMeetupTimes.addSchedule`)]})]})]})})]}),(0,V.jsx)(m9,{open:s.mode===`create`,mode:`create`,isSubmitting:l,submitError:d,onClose:()=>{l||(c({mode:`closed`}),f(null))},onSubmit:e=>void T(e)}),(0,V.jsx)(m9,{open:s.mode===`edit`,mode:`edit`,initialValues:k?uEe(k):void 0,isSubmitting:l,submitError:d,onClose:()=>{l||(c({mode:`closed`}),f(null))},onSubmit:e=>void E(e)}),(0,V.jsx)(iEe,{open:!!h,schedule:h,isDeleting:_,error:y,onClose:()=>{_||(g(null),x(null))},onConfirm:()=>void O()})]})}function h9({label:e,children:t,first:n=!1}){return(0,V.jsxs)(`div`,{className:[`grid gap-1 px-4 py-4 sm:grid-cols-[minmax(0,9rem)_1fr] sm:items-center sm:gap-6 sm:px-6 sm:py-5`,n?``:`border-t border-border/60`].join(` `),role:`group`,"aria-label":e,children:[(0,V.jsx)(`p`,{className:`text-xs font-bold uppercase tracking-wider text-muted-foreground`,children:e}),(0,V.jsx)(`div`,{className:`min-w-0 text-sm font-semibold text-foreground sm:text-base`,children:t})]})}function hEe(e){return e?!!(e.email_verified??e.is_verified):!1}function gEe(e){if(!e)return`â`;try{let t=Lb(e);return Number.isNaN(t.getTime())?`â`:Fb(t,`MMMM d, yyyy`)}catch{return`â`}}function _Ee(){let e=Intl.DateTimeFormat().resolvedOptions().timeZone,t=new Date;return{id:e,offset:new Intl.DateTimeFormat(void 0,{timeZone:e,timeZoneName:`shortOffset`}).formatToParts(t).find(e=>e.type===`timeZoneName`)?.value??``,longName:new Intl.DateTimeFormat(void 0,{timeZone:e,timeZoneName:`long`}).formatToParts(t).find(e=>e.type===`timeZoneName`)?.value??null}}function vEe({verified:e}){let t=my();return e?(0,V.jsxs)(`span`,{className:`inline-flex items-center gap-1.5 rounded-full border border-success/30 bg-success/10 px-2.5 py-1 text-xs font-bold text-success`,children:[(0,V.jsx)(Vk,{size:14,strokeWidth:2.25,"aria-hidden":!0}),t(`common.verified`)]}):(0,V.jsxs)(`span`,{className:`inline-flex items-center gap-1.5 rounded-full border border-warning/35 bg-warning/10 px-2.5 py-1 text-xs font-bold text-warning`,children:[(0,V.jsx)(Bk,{size:14,strokeWidth:2.25,"aria-hidden":!0}),t(`common.notVerified`)]})}function yEe(){let e=my(),{user:t,status:n}=Jv(),r=t?.username?.trim()||`â`,i=t?.email?.trim()||`â`,a=hEe(t),o=gEe(t?.created_at),s=(0,b.useMemo)(()=>_Ee(),[]),c=n===`loading`;return(0,V.jsx)(F7,{title:e(`settings.profile.title`),description:e(`settings.profile.description`),children:(0,V.jsxs)(`div`,{className:`overflow-hidden rounded-2xl border border-border bg-surface shadow-sm`,children:[(0,V.jsx)(`div`,{className:`border-b border-border/60 bg-surface-elevated/40 px-4 py-6 sm:px-6 sm:py-8`,children:(0,V.jsxs)(`div`,{className:`flex flex-col items-center gap-4 text-center sm:flex-row sm:items-center sm:text-left`,children:[(0,V.jsx)(`div`,{className:`flex h-20 w-20 shrink-0 items-center justify-center rounded-2xl border border-border bg-surface text-primary shadow-sm sm:h-24 sm:w-24`,"aria-hidden":!0,
470children:(0,V.jsx)(dj,{className:`h-9 w-9 sm:h-11 sm:w-11`,strokeWidth:1.75})}),(0,V.jsxs)(`div`,{className:`min-w-0 flex-1 space-y-2`,children:[(0,V.jsx)(`p`,{className:`text-xs font-bold uppercase tracking-widest text-muted-foreground`,children:e(`common.username`)}),c?(0,V.jsx)(`div`,{className:`mx-auto h-7 w-40 animate-pulse rounded-lg bg-border/60 sm:mx-0`}):(0,V.jsx)(`p`,{className:`truncate text-xl font-black tracking-tight text-foreground sm:text-2xl`,children:r}),(0,V.jsx)(`div`,{className:`flex flex-wrap items-center justify-center gap-2 sm:justify-start`,children:c?(0,V.jsx)(`div`,{className:`h-7 w-24 animate-pulse rounded-full bg-border/60`}):(0,V.jsx)(vEe,{verified:a})})]})]})}),(0,V.jsxs)(`div`,{children:[(0,V.jsx)(h9,{label:e(`common.username`),first:!0,children:c?(0,V.jsx)(`span`,{className:`block h-5 w-32 animate-pulse rounded bg-border/60`}):(0,V.jsx)(`span`,{className:`break-all`,children:r})}),(0,V.jsx)(h9,{label:e(`common.email`),children:c?(0,V.jsx)(`span`,{className:`block h-5 w-48 animate-pulse rounded bg-border/60`}):(0,V.jsx)(`span`,{className:`break-all`,children:i})}),(0,V.jsx)(h9,{label:e(`settings.profile.memberSince`),children:c?(0,V.jsx)(`span`,{className:`block h-5 w-36 animate-pulse rounded bg-border/60`}):(0,V.jsx)(`span`,{children:o})}),(0,V.jsx)(h9,{label:e(`settings.profile.timeZone`),children:(0,V.jsxs)(`span`,{className:`flex flex-col gap-1`,children:[(0,V.jsx)(`span`,{className:`break-all`,children:s.id}),(0,V.jsx)(`span`,{className:`text-xs font-medium text-muted-foreground sm:text-sm`,children:s.longName?(0,V.jsxs)(V.Fragment,{children:[s.longName,s.offset?(0,V.jsxs)(`span`,{className:`text-muted-foreground/80`,children:[` `,`· `,s.offset]}):null]}):s.offset||e(`settings.profile.localDeviceTime`)})]})})]})]})})}function g9({id:e,label:t,value:n,onChange:r,placeholder:i,autoComplete:a,disabled:o=!1}){let[s,c]=(0,b.useState)(!1);return(0,V.jsxs)(`div`,{className:`space-y-2`,children:[(0,V.jsx)(`label`,{htmlFor:e,className:`ml-1 text-[11px] font-black uppercase tracking-widest text-muted-foreground/70`,children:t}),(0,V.jsxs)(`div`,{className:`relative`,children:[(0,V.jsx)(`input`,{id:e,type:s?`text`:`password`,value:n,onChange:e=>r(e.target.value),placeholder:i,autoComplete:a,disabled:o,className:`w-full rounded-xl border-2 border-border/60 bg-surface-elevated py-3 pl-4 pr-12 text-sm font-medium text-foreground transition-colors placeholder:text-muted-foreground/50 hover:border-primary/40 focus:border-primary focus:outline-none disabled:cursor-not-allowed disabled:opacity-60 sm:py-3.5 sm:text-base`}),(0,V.jsx)(`button`,{type:`button`,onClick:()=>c(e=>!e),disabled:o,className:`absolute right-3 top-1/2 -translate-y-1/2 rounded-lg p-1.5 text-muted-foreground transition hover:bg-surface-hover hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary disabled:pointer-events-none`,"aria-label":s?`Hide password`:`Show password`,children:s?(0,V.jsx)(Oae,{size:18,strokeWidth:2,"aria-hidden":!0}):(0,V.jsx)(kae,{size:18,strokeWidth:2,"aria-hidden":!0})})]})]})}function _9(){return(0,V.jsx)(`p`,{className:`rounded-xl border border-dashed border-border bg-surface-elevated/60 px-3 py-2.5 text-xs leading-relaxed text-muted-foreground`,children:`Form layout is ready. Saving changes will be enabled when connected to the API.`})}function bEe({disabled:e}){let[t,n]=(0,b.useState)(``),[r,i]=(0,b.useState)(``),[a,o]=(0,b.useState)(``);return(0,V.jsxs)(`form`,{className:`space-y-4`,onSubmit:e=>e.preventDefault(),"aria-label":`Change password`,children:[(0,V.jsx)(g9,{id:`security-current-password`,label:`Current password`,value:t,onChange:n,placeholder:`Enter current password`,autoComplete:`current-password`,disabled:e}),(0,V.jsx)(g9,{id:`security-new-password`,label:`New password`,value:r,onChange:i,placeholder:`Enter new password`,autoComplete:`new-password`,disabled:e}),(0,V.jsx)(g9,{id:`security-confirm-password`,label:`Confirm new password`,value:a,onChange:o,placeholder:`Re-enter new password`,autoComplete:`new-password`,disabled:e}),(0,V.jsx)(_9,{}),(0,V.jsx)(`button`,{type:`submit`,disabled:!0,className:`w-full rounded-xl bg-primary px-4 py-3 text-sm font-bold text-primary-foreground opacity-60 sm:w-auto
470sm:min-w-[180px]`,children:`Update password`})]})}function xEe({disabled:e}){let[t,n]=(0,b.useState)(``),[r,i]=(0,b.useState)(``);return(0,V.jsxs)(`form`,{className:`space-y-4`,onSubmit:e=>e.preventDefault(),"aria-label":`Set password`,children:[(0,V.jsx)(`p`,{className:`text-sm leading-relaxed text-muted-foreground`,children:`You signed up with a social account. Add a password to sign in with email and password as well.`}),(0,V.jsx)(g9,{id:`security-set-password`,label:`New password`,value:t,onChange:n,placeholder:`Create a password`,autoComplete:`new-password`,disabled:e}),(0,V.jsx)(g9,{id:`security-set-confirm`,label:`Confirm password`,value:r,onChange:i,placeholder:`Re-enter password`,autoComplete:`new-password`,disabled:e}),(0,V.jsx)(_9,{}),(0,V.jsx)(`button`,{type:`submit`,disabled:!0,className:`w-full rounded-xl bg-primary px-4 py-3 text-sm font-bold text-primary-foreground opacity-60 sm:w-auto sm:min-w-[180px]`,children:`Set password`})]})}function SEe({label:e,value:t}){return(0,V.jsxs)(`div`,{className:`flex flex-col gap-1 border-t border-border/60 py-4 first:border-t-0 first:pt-0 sm:flex-row sm:items-center sm:justify-between sm:gap-4`,children:[(0,V.jsx)(`span`,{className:`text-xs font-bold uppercase tracking-wider text-muted-foreground`,children:e}),(0,V.jsx)(`span`,{className:`text-sm font-semibold text-foreground`,children:t})]})}function CEe({disabled:e,hasPassword:t}){let[n,r]=(0,b.useState)(!1),[i,a]=(0,b.useState)(``),[o,s]=(0,b.useState)(``);return(0,V.jsxs)(`div`,{className:`space-y-4`,children:[(0,V.jsxs)(`p`,{className:`text-sm leading-relaxed text-muted-foreground`,children:[`Deleting your account starts a`,` `,(0,V.jsx)(`span`,{className:`font-semibold text-foreground`,children:`7-day grace period`}),`. After that, your searches, listings, and profile data are permanently removed.`]}),n?(0,V.jsxs)(`form`,{className:`space-y-4 rounded-xl border border-error/20 bg-error/[0.03] p-4 sm:p-5`,onSubmit:e=>e.preventDefault(),"aria-label":`Delete account confirmation`,children:[(0,V.jsx)(`p`,{className:`text-sm font-semibold text-foreground`,children:`Confirm account deletion`}),(0,V.jsxs)(`div`,{className:`space-y-2`,children:[(0,V.jsx)(`label`,{htmlFor:`delete-reason`,className:`ml-1 text-[11px] font-black uppercase tracking-widest text-muted-foreground/70`,children:`Reason (optional)`}),(0,V.jsx)(`textarea`,{id:`delete-reason`,value:o,onChange:e=>s(e.target.value),disabled:e,rows:3,placeholder:`Help us understand why you're leaving`,className:`w-full resize-none rounded-xl border-2 border-border/60 bg-surface-elevated px-4 py-3 text-sm text-foreground transition-colors placeholder:text-muted-foreground/50 hover:border-primary/40 focus:border-primary focus:outline-none disabled:cursor-not-allowed disabled:opacity-60`})]}),t?(0,V.jsx)(g9,{id:`delete-confirm-password`,label:`Password`,value:i,onChange:a,placeholder:`Enter your password to confirm`,autoComplete:`current-password`,disabled:e}):null,(0,V.jsx)(_9,{}),(0,V.jsxs)(`div`,{className:`flex flex-col gap-2 sm:flex-row sm:flex-wrap`,children:[(0,V.jsx)(`button`,{type:`submit`,disabled:!0,className:`rounded-xl border border-error/40 bg-error/10 px-4 py-2.5 text-sm font-bold text-error opacity-60`,children:`Permanently delete account`}),(0,V.jsx)(`button`,{type:`button`,onClick:()=>{r(!1),a(``),s(``)},disabled:e,className:`rounded-xl border border-border bg-surface-elevated px-4 py-2.5 text-sm font-bold text-foreground transition hover:bg-surface-hover`,children:`Cancel`})]})]}):(0,V.jsx)(`button`,{type:`button`,onClick:()=>r(!0),disabled:e,className:`rounded-xl border border-error/35 bg-error/5 px-4 py-2.5 text-sm font-bold text-error transition hover:bg-error/10 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-error/40 disabled:cursor-not-allowed disabled:opacity-60`,children:`Delete my account`})]})}function wEe(){let e=my(),{user:t,status:n}=Jv(),r=n===`loading`,i=t?.has_password??!1;return(0,V.jsx)(F7,{title:e(`settings.security.title`),description:e(`settings.security.description`),children:(0,V.jsxs)(`div`,{className:`space-y-6`,children:[(0,V.jsx)(I7,{title:e(`settings.security.password`),description:i?`Update the password you use to sign in with email.`:`Add a password so you can also sign in with email.`,children:r?(0,V.jsxs)(`div`,{className:`space-y-4`,children:[(0,V.jsx)(`div`,{className:`h-12 animate-pulse rounded-xl bg-border/60`}),(0,V.jsx)(`div`,{className:`h-12 animate-pulse rounded-xl bg-border/60`}),(0,V.jsx)(`div`,{className:`h-10 w-40 animate-pulse rounded-xl bg-border/60`})]}):i?(0,V.jsx)(bEe,{disabled:!1}):(0,V.jsx)(xEe,{disabled:!1})}),(0,V.jsx)(I7,{title:e(`settings.security.signInMethods`),description:e(`settings.security.signInMethodsDescription`),children:r?(0,V.jsxs)(`div`,{className:`space-y-3`,children:[(0,V.jsx)(`div`,{className:`h-10 animate-pulse rounded-lg bg-border/60`}),(0,V.jsx)(`div`,{className:`h-10 animate-pulse rounded-lg bg-border/60`})]}):(0,V.jsxs)(V.Fragment,{children:[(0,V.jsx)(SEe,{label:`Email & password`,value:i?`Enabled`:`Not set`}),(0,V.jsx)(zi,{to:YN(`linked-accounts`),className:`mt-2 inline-flex text-sm font-bold text-primary transition hover:underline`,children:`Manage linked accounts â`})]})}),(0,V.jsx)(I7,{title:e(`settings.security.deleteAccount`),description:e(`settings.security.deleteAccountDescription`),variant:`danger`,children:(0,V.jsx)(CEe,{disabled:r,hasPassword:i})})]})})}var TEe=`w-full rounded-xl border border-border bg-surface py-2.5 pl-11 pr-10 text-sm text-foreground transition hover:border-border-strong focus:border-primary focus:outline-none focus:ring-4 focus:ring-primary/5`;function EEe(e,t,n,r){e!==t&&(r(e),n(e??``))}
470function DEe({value:e,onChange:t}){let n=my(),[r,i]=(0,b.useState)(e??``),[a,o]=(0,b.useState)(e);return EEe(e,a,i,o),(0,b.useEffect)(()=>{let n=r.trim();if(n===(e?.trim()??``))return;let i=window.setTimeout(()=>{t(n||void 0)},400);return()=>window.clearTimeout(i)},[r,t,e]),(0,V.jsxs)(`div`,{className:`relative w-full max-w-xl`,children:[(0,V.jsx)(UA,{className:`pointer-events-none absolute left-3.5 top-1/2 -translate-y-1/2 text-muted-foreground`,size:18,"aria-hidden":!0}),(0,V.jsx)(`input`,{type:`search`,value:r,onChange:e=>i(e.target.value),placeholder:n(`settingsFavorites.searchPlaceholder`),"aria-label":n(`settingsFavorites.searchAriaLabel`),className:TEe}),r?(0,V.jsx)(`button`,{type:`button`,onClick:()=>{i(``),t(void 0)},className:`absolute right-2 top-1/2 flex h-8 w-8 -translate-y-1/2 items-center justify-center rounded-lg text-muted-foreground transition hover:bg-surface-elevated hover:text-foreground`,"aria-label":n(`settingsFavorites.clearSearchAriaLabel`),children:(0,V.jsx)(mj,{size:16,"aria-hidden":!0})}):null]})}function OEe(e){return e.get(`q`)?.trim()||void 0}function kEe(e){let t=new URLSearchParams;return e&&t.set(`q`,e),t}var AEe=20;function v9(){let e=my(),t=or(),n=nr(),[r,i]=qi(),{listingId:a}=ur(),o=a,{subscription:s,status:c}=Sy(),[l,u]=(0,b.useState)([]),[d,f]=(0,b.useState)(0),[p,m]=(0,b.useState)(!0),[h,g]=(0,b.useState)(!1),[_,v]=(0,b.useState)(null),[y,x]=(0,b.useState)(null),[S,C]=(0,b.useState)(!1),[w,T]=(0,b.useState)(1),[E,D]=(0,b.useState)(()=>new Set),O=(0,b.useRef)(new Set),k=(0,b.useRef)(!1),A=(0,b.useRef)(!1),j=(0,b.useMemo)(()=>OEe(r),[r]),M=r.get(`q`)??``,N=(0,b.useMemo)(()=>vx(s),[s]).kind===`active`,P=c===`ready`||c===`error`,F=YN(`favorites`),ee=(0,b.useMemo)(()=>({fromListingOverlay:!1,overlaySource:`settings-favorites`,overlayReturnPath:F}),[F]),I=(0,b.useCallback)(e=>{let t=r.toString();return`${F}/${e}${t?`?${t}`:``}`},[F,r]),te=(0,b.useCallback)(()=>{let e=n.state;if(TF(e)){t(-1);return}let i=r.toString();t({pathname:F,search:i?`?${i}`:``},{replace:!0})},[F,n.state,t,r]),ne=(0,b.useCallback)(e=>{i(kEe(e),{replace:!0})},[i]),re=(0,b.useCallback)(async(t,n)=>{let{reset:r}=n;if(r)A.current||m(!0),v(null);else{if(k.current)return;k.current=!0,g(!0),x(null)}try{let e={page:t,per_page:AEe};j&&(e.q=j);let n=await Lo.get(`/api/favorites/`,{query:e}),{listings:i,has_next:a}=n.data,o=Jo(i);u(e=>{if(r)return o;let t=new Set(e.map(e=>e.id)),n=[...e];for(let e of o)t.has(e.id)||(t.add(e.id),n.push(e));return n}),f(n.data.total_count),C(a),T(t),A.current=!0}catch(t){let n=t instanceof ho&&t.status===403?e(`settingsFavorites.subscriptionRequired`):e(`settingsFavorites.loadError`);r?(v(n),A.current||(u([]),f(0))):x(n)}finally{m(!1),g(!1),k.current=!1}},[j,e]),ie=(0,b.useCallback)(async()=>{!S||p||h||await re(w+1,{reset:!1})},[re,S,p,h,w]);(0,b.useEffect)(()=>{if(!P||!N)return;let e=!1;return queueMicrotask(()=>{e||re(1,{reset:!0})}),()=>{e=!0}},[re,N,P,M]);let ae=(0,b.useCallback)(e=>{u(t=>t.map(t=>t.id===e.id?{...t,...e}:t))},[]);Oj({onListingUpdated:e=>{e.isPersonalListing||ae(kj(e.listing))},onListingRemoved:(0,b.useCallback)(e=>{u(t=>t.map(t=>t.id===e?{...t,is_available:!1,marketplace_status:`unavailable`,can_refresh_from_facebook:!1}:t))},[])});let oe=(0,b.useCallback)(async(e,t)=>{if(O.current.has(e))return;let n=!t;O.current.add(e),D(t=>{let n=new Set(t);return n.add(e),n}),u(t=>t.map(t=>t.id===e?{...t,is_favorite:n}:t));try{let t=await Lo.put(`/api/favorites/${e}`,{is_favorite:n});u(n=>n.map(n=>n.id===e?{...n,is_favorite:t.data.is_favorite}:n))}catch{u(n=>n.map(n=>n.id===e?{...n,is_favorite:t}:n))}finally{O.current.delete(e),D(t=>{let n=new Set(t);return n.delete(e),n})}},[]),se=!p&&l.length===0&&!_&&!!j;return c===`loading`?null:P&&!N?(0,V.jsx)(F7,{title:e(`settings.favorites.title`),description:e(`settings.favorites.description`),children:(0,V.jsxs)(`div`,{className:`flex flex-col items-center rounded-2xl border border-dashed border-primary/30 bg-primary/5 px-4 py-10 text-center sm:px-8 sm:py-12`,children:[(0,V.jsx)(`div`,{className:`flex h-14 w-14 items-center justify-center rounded-2xl bg-primary/15 text-primary`,children:(0,V.jsx)(qk,{className:`h-7 w-7`,strokeWidth:1.75,"aria-hidden":!0})}),(0,V.jsx)(`h2`,{className:`mt-5 text-lg font-black tracking-tight text-foreground sm:text-xl`,children:e(`settingsFavorites.subscribeTitle`)}),(0,V.jsx)(`p`,{className:`mt-3 max-w-md text-sm leading-relaxed text-muted-foreground`,children:e(`settingsFavorites.subscribeBody`)}),(0,V.jsx)(zi,{to:YN(`subscription`),replace:!0,className:`mt-6 inline-flex items-center justify-center rounded-2xl bg-primary px-6 py-3 text-sm font-black text-primary-foreground shadow-lg shadow-primary/25 transition hover:bg-primary-hover`,children:e(`settingsFavorites.viewSubscriptionPlans`)})]})}):(0,V.jsxs)(V.Fragment,{children:[(0,V.jsxs)(F7,{title:e(`settings.favorites.title`),description:e(`settings.favorites.description`),children:[(0,V.jsx)(DEe,{value:j,onChange:ne}),p&&l.length===0?(0,V.jsx)(`div`,{className:`grid grid-cols-1 gap-6 min-[640px]:grid-cols-2 min-[1280px]:grid-cols-3`,children:Array.from({length:6}).map((e,t)=>(0,V.jsx)(y9,{},`skeleton-${t}`))}):_&&l.length===0?(0,V.jsxs)(`div`,{className:`rounded-2xl border border-border bg-surface px-4 py-10 text-center sm:px-8`,children:[(0,V.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:_}),(0,V.jsx)(`button`,{type:`button`,onClick:()=>void re(1,{reset:!0}),className:`mt-4 rounded-xl border border-border bg-surface-elevated px-4 py-2 text-sm font-bold text-foreground hover:bg-surface-hover`,children:e(`common.tryAgain`)})]}):se?(0,V.jsxs)(`div`,{className:`flex flex-col items-center rounded-2xl border border-dashed border-border bg-surface/50 px-4 py-12 text-center sm:px-8`,children:[(0,V.jsx)(`h2`,{className:`text-lg font-black text-foreground`,children:e(`settingsFavorites.noMatchesTitle`)}),(0,V.jsx)(`p`,{className:`mt-2 max-w-sm text-sm text-muted-foreground`,children:e(`settingsFavorites.noMatchesBody`)}),(0,V.jsx)(`button`,{type:`button`,onClick:()=>ne(void 0),className:`mt-6 rounded-2xl border border-border bg-surface px-6 py-3 text-sm font-bold text-foreground hover:bg-surface-elevated`,children:e(`settingsFavorites.clearSearch`)})]}):l.length===0?(0,V.jsxs)(`div`,{className:`flex flex-col items-center rounded-2xl border border-dashed border-border bg-surface/50 px-4 py-12 text-center sm:px-8`,children:[(0,V.jsx)(`div`,{className:`flex h-14 w-14 items-center justify-center rounded-2xl bg-surface-elevated text-muted-foreground`,children:(0,V.jsx)(sA,{size:28,strokeWidth:1.5,"aria-hidden":!0})}),(0,V.jsx)(`h2`,{className:`mt-4 text-lg font-black text-foreground`,children:e(`settingsFavorites.emptyTitle`)}),(0,V.jsx)(`p`,{className:`mt-2 max-w-sm text-sm text-muted-foreground`,children:e(`settingsFavorites.emptyBody`)}),(0,V.jsx)(zi,{to:`/dashboard/feed`,className:`mt-6 inline-flex items-center justify-center rounded-2xl bg-primary px-6 py-3 text-sm font-black text-primary-foreground shadow-lg shadow-primary/20 transition hover:bg-primary-hover`,children:e(`settingsFavorites.goToFeed`)})]}):(0,V.jsxs)(V.Fragment,{children:[j&&d>0?(0,V.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:e(d===1?`settingsFavorites.resultCountOne`:`settingsFavorites.resultCountOther`,{count:d})}):null,(0,V.jsxs)(`div`,{className:`grid grid-cols-1 gap-6 min-[640px]:grid-cols-2 min-[1280px]:grid-cols-3`,children:[l.map(e=>
470(0,V.jsx)(CF,{listing:e,viewMode:`grid`,detailPath:I(e.id),detailState:ee,onToggleFavorite:oe,onListingRefreshed:ae,isFavoritePending:E.has(e.id)},e.id)),h?Array.from({length:3}).map((e,t)=>(0,V.jsx)(y9,{},`more-skeleton-${t}`)):null]}),S?(0,V.jsx)(`div`,{className:`flex justify-center pt-2`,children:(0,V.jsx)(`button`,{type:`button`,onClick:()=>void ie(),disabled:h,className:`rounded-2xl border border-border bg-surface px-6 py-2.5 text-sm font-bold text-foreground transition hover:bg-surface-elevated disabled:opacity-50`,children:e(h?`common.loading`:`common.loadMore`)})}):null,y?(0,V.jsx)(`p`,{className:`text-center text-sm text-muted-foreground`,children:y}):null]})]}),(0,V.jsx)(MF,{listingId:o,onRequestClose:te,backLabel:e(`settingsFavorites.backToFavorites`),buildDetailPath:I,onListingRefreshed:ae,similarListingDetailState:{fromListingOverlay:!0,overlaySource:`settings-favorites`,overlayReturnPath:F}})]})}function y9(){return(0,V.jsxs)(ik.div,{layout:!0,className:`flex h-[400px] flex-col rounded-3xl border border-border bg-surface-elevated/20`,children:[(0,V.jsx)(`div`,{className:`relative h-56 w-full overflow-hidden rounded-xl bg-surface-elevated`,children:(0,V.jsx)(`div`,{className:`absolute inset-0 bg-gradient-to-br from-surface-elevated via-surface-hover to-surface-elevated`})}),(0,V.jsxs)(`div`,{className:`flex-1 space-y-4 p-5`,children:[(0,V.jsx)(`div`,{className:`h-4 w-1/3 rounded bg-surface-elevated/80`}),(0,V.jsx)(`div`,{className:`h-6 w-3/4 rounded bg-surface-elevated/80`}),(0,V.jsx)(`div`,{className:`mt-2 h-8 w-1/4 rounded bg-surface-elevated/80`})]})]})}var jEe=`ai.instasnag.app`;function MEe(e){if(!e)return null;let[t]=e.split(`:`);return t||null}function NEe(e,t=hy){switch(kx(e.store)){case`play_store`:{let n=MEe(e.rc_product_id);return{kind:`external`,url:n?`https://play.google.com/store/account/subscriptions?sku=${encodeURIComponent(n)}&package=${jEe}`:`https://play.google.com/store/account/subscriptions`,label:t(`settingsSub.manageOnGooglePlay`)}}case`app_store`:return{kind:`external`,url:`https://apps.apple.com/account/subscriptions`,label:t(`settingsSub.manageInAppStore`)};case`amazon`:return{kind:`external`,url:`https://www.amazon.com/gp/help/customer/display.html?nodeId=201620590`,label:t(`settingsSub.manageOnAmazon`)};case`stripe`:case`rc_billing`:return{kind:`billing_portal`,label:t(`settingsSub.manageBilling`)};default:return{kind:`none`}}}function PEe(e,t=hy){switch(kx(e)){case`play_store`:return t(`settingsSub.billedThroughGooglePlay`);case`app_store`:return t(`settingsSub.billedThroughAppStore`);case`amazon`:return t(`settingsSub.billedThroughAmazon`);case`stripe`:case`rc_billing`:return t(`settingsSub.billedOnWeb`);case`promotional`:return t(`settingsSub.grantedByInstaSnag`);default:return t(`settingsSub.billedElsewhere`)}}function FEe(e,t=hy){let n=[`scraper`,`repost`,`ai`],r=new Map;for(let t of e){let e=kx(t.store)??`unknown`,n=r.get(e);n?n.push(t):r.set(e,[t])}return[...r.entries()].map(([e,r])=>{let i=[...r].sort((e,t)=>n.indexOf(e.product_type)-n.indexOf(t.product_type)),a=e===`unknown`?null:e,o=NEe(i[0],t);return{store:a,heading:PEe(a,t),products:i,groupLink:o.kind===`external`?{url:o.url,label:o.label}:null,perProductPortal:o.kind===`billing_portal`}})}function IEe(e,t,n){if(!t.rc_entitlement_id)return null;let r=e.entitlements.active[t.rc_entitlement_id];if(!r?.isActive)return null;let i=r.periodType===`trial`;return{event:i?`subscription_trial_started`:`subscription_purchase_completed`,metaEvent:i?`StartTrial`:`Subscribe`,eventId:`subscription:${n}:${r.identifier}:${r.latestPurchaseDate.toISOString()}`,isSandbox:r.isSandbox}}var LEe=6,REe=1500;function b9(e){return e?[e.access_level,e.plan_name??``,e.has_ai_negotiation_addon?`ai`:``,e.has_repost_addon?`repost`:``,e.status].join(`|`):`none`}var zEe=e=>new Promise(t=>setTimeout(t,e));function BEe(){let{user:e,isAuthenticated:t}=Jv(),{refreshSubscription:n}=Sy(),{accessStatus:r,refreshAccessStatus:i,ownership:a}=bj(),[o,s]=(0,b.useState)({kind:`idle`});(0,b.useEffect)(()=>{if(!(!t||!e?.id||!_7()))try{v7(e.id)}catch{}},[t,e?.id]);let c=(0,b.useCallback)(async e=>{for(let t=0;t<LEe;t+=1){await zEe(REe*(t+1));try{if(b9(await Cy())!==e)return!0}catch{}}return!1},[]);return{status:o,purchase:(0,b.useCallback)(async t=>{if(!_7()){s({kind:`error`,message:`Purchases are unavailable right now. Please try again later.`});return}if(!e?.id){s({kind:`error`,message:`Please sign in to subscribe.`});return}if(t.product_type===`scraper`?a.ownsScraper:t.product_type===`repost`?a.ownsRepost:a.ownsAi){s({kind:`error`,message:`You already subscribe to this product. Use Manage to change or cancel it â subscribing again would bill you twice.`});return}s({kind:`purchasing`,planId:t.id});let o=b9(r);try{v7(e.id);let r=await y7();if(!r){s({kind:`error`,message:`No current offering is configured in RevenueCat, so nothing can be purchased on the web.`});return}if(r.availablePackages.length===0){console.warn(`[RevenueCat] Offering "${r.identifier}" exposes no web-purchasable packages. Each package needs a Web Billing product attached; Google Play and App Store products are not purchasable from the browser.`),s({kind:`error`,message:`Web purchases aren't set up yet â no plan in the current RevenueCat offering has a Web Billing product.`});return}let a=Hwe(r,t);if(!a){s({kind:`error`,message:`${t.name} isn't available for purchase on the web yet. Check that a Web Billing product for it exists in the "${r.identifier}" offering.`});return}let l={plan_id:t.id,plan_name:t.name,product_type:t.product_type};Uv(`subscription_checkout_started`,`InitiateCheckout`,l);let u=await Kwe(a,e.email);if(u.status===`cancelled`){s({kind:`idle`});return}if(u.status===`error`){s({kind:`error`,message:u.message});return}let d=IEe(u.customerInfo,t,e.id);d&&Uv(d.event,d.metaEvent,{...l,is_sandbox:d.isSandbox},d.eventId),s({kind:`confirming`,planId:t.id}),await c(o),await Promise.all([i(),n()]),s({kind:`idle`})}catch(e){s({kind:`error`,message:e instanceof Error?e.message:`Something went wrong. Please try again.`})}},[e,r,a,i,n,c]),clearError:(0,b.useCallback)(()=>s({kind:`idle`}),[])}}function VEe({open:e,onClose:t,ownership:n,products:r,onSelectPlan:i,busyPlanId:a,busyLabel:o,errorMessage:s,onDismissError:c,busy:l=!1}){let u=my(),d=(0,b.useId)(),f=(0,b.useCallback)(()=>{l||t()},[l,t]);return(0,b.useEffect)(()=>
470{if(!e)return;let t=e=>{e.key===`Escape`&&f()};return window.addEventListener(`keydown`,t),()=>window.removeEventListener(`keydown`,t)},[e,f]),(0,b.useEffect)(()=>{if(!e)return;let t=document.body.style.overflow;return document.body.style.overflow=`hidden`,()=>{document.body.style.overflow=t}},[e]),(0,x.createPortal)((0,V.jsx)(zD,{children:e?(0,V.jsxs)(ik.div,{role:`presentation`,className:`fixed inset-0 z-[1200] flex items-end justify-center sm:items-center sm:p-4`,initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:{duration:.18},children:[(0,V.jsx)(`div`,{role:`presentation`,className:`absolute inset-0 cursor-default bg-black/65 backdrop-blur-[2px]`,onClick:f}),(0,V.jsxs)(ik.div,{role:`dialog`,"aria-modal":`true`,"aria-labelledby":d,className:`relative z-[1201] flex max-h-[min(92vh,900px)] w-full max-w-5xl flex-col overflow-hidden rounded-t-[1.75rem] border border-border/60 bg-surface shadow-[0_24px_64px_-12px_rgba(0,0,0,0.45)] sm:rounded-[1.5rem]`,initial:{opacity:0,y:24},animate:{opacity:1,y:0},exit:{opacity:0,y:16},transition:{type:`spring`,stiffness:420,damping:34},children:[(0,V.jsxs)(`div`,{className:`flex shrink-0 items-center justify-between gap-3 border-b border-border/40 px-4 py-4 sm:px-6`,children:[(0,V.jsxs)(`div`,{className:`flex min-w-0 items-center gap-3`,children:[(0,V.jsx)(`span`,{className:`flex h-10 w-10 shrink-0 items-center justify-center rounded-xl border border-primary/30 bg-primary/10 text-primary`,children:(0,V.jsx)(ej,{size:18,strokeWidth:2})}),(0,V.jsxs)(`div`,{className:`min-w-0`,children:[(0,V.jsx)(`h2`,{id:d,className:`truncate text-lg font-black tracking-tight text-foreground`,children:u(`settingsSub.addPlanTitle`)}),(0,V.jsx)(`p`,{className:`text-xs font-semibold text-muted-foreground`,children:r.length>1?u(`settingsSub.addPlanSubtitleMulti`):u(`settingsSub.addPlanSubtitleSingle`)})]})]}),(0,V.jsx)(`button`,{type:`button`,onClick:f,disabled:l,className:`flex h-10 w-10 shrink-0 items-center justify-center rounded-full border border-border/60 text-muted-foreground transition-colors hover:bg-surface-elevated hover:text-foreground disabled:opacity-50`,"aria-label":u(`common.close`),children:(0,V.jsx)(mj,{size:18})})]}),(0,V.jsxs)(`div`,{className:`custom-scrollbar min-h-0 flex-1 overflow-y-auto px-4 py-6 sm:px-6`,children:[s?(0,V.jsxs)(`div`,{className:`mb-6 flex items-start justify-between gap-3 rounded-2xl border border-error/30 bg-error/10 p-4`,children:[(0,V.jsx)(`p`,{className:`text-sm text-error`,children:s}),c?(0,V.jsx)(`button`,{type:`button`,onClick:c,className:`shrink-0 text-xs font-bold text-error underline`,children:u(`settingsSub.dismiss`)}):null]}):null,(0,V.jsx)(S7,{ownership:n,products:r,onSelectPlan:i,busyPlanId:a,busyLabel:o})]})]})]}):null}),document.body)}var HEe={scraper:`settingsSub.productScraper`,repost:`settingsSub.productRepost`,ai:`settingsSub.productAi`};function UEe({label:e,tone:t}){return(0,V.jsx)(`span`,{className:`inline-flex items-center rounded-full border px-2.5 py-1 text-xs font-semibold ${t===`success`?`border-success/30 bg-success/10 text-success`:t===`warning`?`border-warning/35 bg-warning/10 text-warning`:t===`error`?`border-error/30 bg-error/10 text-error`:`border-border bg-surface-elevated text-muted-foreground`}`,children:e})}function WEe({product:e,subscription:t,scheduledNote:n,onOpenBillingPortal:r,portalBusy:i,showPortalButton:a}){let o=my(),s=mx(t,o);return(0,V.jsxs)(`div`,{className:`rounded-2xl border border-border bg-surface p-5`,children:[(0,V.jsxs)(`div`,{className:`flex flex-wrap items-center justify-between gap-3`,children:[(0,V.jsxs)(`div`,{className:`min-w-0`,children:[(0,V.jsx)(`h3`,{className:`text-base font-bold text-foreground`,children:o(HEe[e])}),t.plan?.name?(0,V.jsx)(`p`,{className:`mt-0.5 truncate text-sm text-muted-foreground`,children:t.plan.name}):null]}),(0,V.jsx)(UEe,{label:s.label,tone:s.tone})]}),(0,V.jsxs)(`div`,{className:`mt-4 space-y-2`,children:[s.detail?(0,V.jsx)(`p`,{className:`text-sm font-semibold text-foreground`,children:s.detail}):null,s.discountNote?(0,V.jsx)(`p`,{className:`inline-flex items-center rounded-full bg-success/10 px-2.5 py-1 text-xs font-bold text-success`,children:s.discountNote}):null,s.warning?(0,V.jsx)(`p`,{className:`text-sm text-error`,children:s.warning}):null,n?(0,V.jsx)(`p`,{className:`text-sm text-warning`,children:n}):null,a?(0,V.jsxs)(`button`,{type:`button`,onClick:()=>r(e),disabled:i!==null,className:`inline-flex items-center gap-1.5 text-sm font-bold text-primary hover:underline disabled:opacity-60`,children:[o(i===e?`settingsSub.opening`:`settingsSub.manageBilling`),i===e?(0,V.jsx)(_A,{className:`h-3.5 w-3.5 animate-spin`}):(0,V.jsx)(Zk,{className:`h-3.5 w-3.5`})]}):null]})]})}function GEe(){let e=my(),{subscription:t,status:n,error:r}=Sy(),{ownership:i}=bj(),a=BEe(),o=n===`loading`||n===`idle`,s=(0,b.useMemo)(()=>{let e={scraper:i.ownsScraper,repost:i.ownsRepost,ai:i.ownsAi};return[`scraper`,`repost`,`ai`].filter(t=>!e[t])},[i]),c=(0,b.useMemo)(()=>FEe(t?.products??[],e),[t,e]),[l,u]=(0,b.useState)(!1),d=(0,b.useCallback)(e=>void a.purchase(e),[a]),f=a.status.kind===`purchasing`||a.status.kind===`confirming`?a.status.planId:null,p=a.status.kind===`confirming`?e(`settingsSub.confirming`):e(`settingsSub.openingCheckout`),m=s.length,h=(0,b.useRef)(m);(0,b.useEffect)(()=>{m<h.current&&u(!1),h.current=m},[m]);let g=a.status.kind===`error`?(0,V.jsxs)(`div`,{className:`mb-6 flex items-start justify-between gap-3 rounded-2xl border border-error/30 bg-error/10 p-4`,children:[(0,V.jsx)(`p`,{className:`text-sm text-error`,children:a.status.message}),(0,V.jsx)(`button`,{type:`button`,onClick:a.clearError,className:`shrink-0 text-xs font-bold text-error underline`,children:e(`settingsSub.dismiss`)})]}):null,[_,v]=(0,b.useState)(null),[y,x]=(0,b.useState)(null),S=(0,b.useCallback)(t=>{x(null),v(t);let n=window.open(``,`_blank`);wy(t).then(e=>{n?(n.opener=null,n.location.href=e):window.location.href=e,v(null)}
470).catch(()=>{n?.close(),x(e(`settingsSub.portalError`)),v(null)})},[e]),C=(0,b.useMemo)(()=>{if(!t)return null;let n=yx(t);if(!n)return null;let r=bx(t);return r?e(`settingsSub.changesToOn`,{name:n,date:gx(r)}):e(`settingsSub.changesToPeriodEnd`,{name:n})},[t,e]);return o?(0,V.jsx)(F7,{title:e(`settings.subscription.title`),description:e(`settings.subscription.description`),children:(0,V.jsxs)(`div`,{className:`flex items-center gap-2 p-6 text-sm text-muted-foreground`,children:[(0,V.jsx)(_A,{className:`h-4 w-4 animate-spin`}),e(`settingsSub.loading`)]})}):r?(0,V.jsx)(F7,{title:e(`settings.subscription.title`),description:e(`settings.subscription.description`),children:(0,V.jsx)(`p`,{className:`p-6 text-sm text-error`,children:e(`settingsSub.loadError`)})}):(0,V.jsxs)(F7,{title:e(`settings.subscription.title`),description:e(`settings.subscription.description`),children:[(0,V.jsxs)(`div`,{className:`space-y-3 p-1`,children:[y?(0,V.jsx)(`p`,{className:`rounded-2xl border border-error/30 bg-error/10 p-4 text-sm text-error`,children:y}):null,c.length>0?(0,V.jsxs)(`p`,{className:`flex items-start gap-2 rounded-2xl border border-border bg-surface-elevated/60 p-4 text-xs text-muted-foreground`,children:[(0,V.jsx)(Zk,{className:`mt-0.5 h-3.5 w-3.5 shrink-0`}),(0,V.jsx)(`span`,{children:e(`settingsSub.storeManageHint`)})]}):null,c.map(e=>(0,V.jsxs)(`section`,{className:`space-y-3`,children:[(0,V.jsx)(`h3`,{className:`px-1 pt-2 text-xs font-bold uppercase tracking-widest text-muted-foreground`,children:e.heading}),e.products.map(t=>(0,V.jsx)(WEe,{product:t.product_type,subscription:t,scheduledNote:t.product_type===`scraper`?C:null,onOpenBillingPortal:S,portalBusy:_,showPortalButton:e.perProductPortal},t.product_type)),e.groupLink?(0,V.jsxs)(`a`,{href:e.groupLink.url,target:`_blank`,rel:`noopener noreferrer`,className:`inline-flex items-center gap-1.5 px-1 text-sm font-bold text-primary hover:underline`,children:[e.groupLink.label,(0,V.jsx)(Zk,{className:`h-3.5 w-3.5`})]}):null]},e.store??`unknown`)),i.ownsNothing?(0,V.jsxs)(`div`,{className:`pt-8`,children:[(0,V.jsx)(`h3`,{className:`mb-6 text-center text-sm font-bold uppercase tracking-widest text-muted-foreground`,children:e(`settingsSub.plans`)}),g,(0,V.jsx)(S7,{ownership:i,onManage:()=>S(`scraper`),manageBusy:_===`scraper`,onSelectPlan:d,busyPlanId:f,busyLabel:p})]}):s.length>0?(0,V.jsx)(`div`,{className:`pt-4`,children:(0,V.jsxs)(`button`,{type:`button`,onClick:()=>u(!0),className:`flex w-full items-center justify-center gap-2 rounded-2xl border border-dashed border-border py-3.5 text-sm font-extrabold text-foreground transition-all hover:border-primary/50 hover:text-primary`,children:[(0,V.jsx)(IA,{className:`h-4 w-4`}),e(`settingsSub.addNewPlan`)]})}):(0,V.jsx)(`p`,{className:`pt-4 text-center text-sm text-muted-foreground`,children:e(`settingsSub.subscribedToEverything`)})]}),(0,V.jsx)(VEe,{open:l,onClose:()=>u(!1),ownership:i,products:s,onSelectPlan:d,busyPlanId:f,busyLabel:p,busy:f!=null,errorMessage:a.status.kind===`error`?a.status.message:null,onDismissError:a.clearError})]})}function x9(e){return function(){return(0,b.createElement)(STe,null,(0,b.createElement)(e))}}function KEe(e){return function(){return(0,b.createElement)(CTe,null,(0,b.createElement)(e))}}var qEe={profile:yEe,"linked-accounts":ZTe,account:wEe,subscription:GEe,favorites:v9,appearance:ITe,"ai-reply-delay":x9(kTe),"meetup-locations":x9(rEe),"availability-times":x9(mEe),extension:KEe(RTe),legal:zTe},JEe=Object.fromEntries(JN.map(e=>[e.path,qEe[e.id]??TTe(e)])),YEe=`https://apps.apple.com/us/app/instasnag/id6780939118`,XEe=`https://play.google.com/store/apps/details?id=ai.instasnag.app`;function ZEe(e){return(0,V.jsx)(`svg`,{viewBox:`0 0 24 24`,fill:`currentColor`,...e,children:(0,V.jsx)(`path`,{d:`M18.71 19.5c-.83 1.24-1.71 2.45-3.05 2.47-1.34.03-1.77-.79-3.29-.79-1.53 0-2 .77-3.27.82-1.31.05-2.3-1.32-3.14-2.53C4.25 17 2.94 12.45 4.7 9.39c.87-1.52 2.43-2.48 4.12-2.51 1.28-.02 2.5.87 3.29.87.78 0 2.26-1.07 3.8-.91.65.03 2.47.26 3.64 1.98-.09.06-2.17 1.28-2.15 3.81.03 3.02 2.65 4.03 2.68 4.04-.03.07-.42 1.44-1.38 2.83M13 3.5c.73-.83 1.94-1.46 2.94-1.5.13 1.17-.34 2.35-1.04 3.19-.69.85-1.83 1.51-2.95 1.42-.15-1.15.41-2.35 1.05-3.11z`})})}function QEe({position:e,className:t}){return(0,V.jsx)(`div`,{className:`pointer-events-none absolute left-0 right-0 z-10 overflow-hidden ${e===`top`?`-top-px`:`-bottom-px`}`,"aria-hidden":`true`,children:(0,V.jsx)(`div`,{className:`relative mx-auto h-12 w-[120%] -ml-[10%] sm:h-20 lg:h-28 ${t}
470 ${e===`top`?`rounded-b-[50%]`:`rounded-t-[50%]`}`})})}function $Ee(){let e=(0,b.useRef)(null);return(0,b.useEffect)(()=>{let t=e.current;if(!t)return;let n=new IntersectionObserver(e=>{e.forEach(e=>{e.isIntersecting&&e.target.classList.add(`visible`)})},{threshold:.1,rootMargin:`0px 0px -40px 0px`});return t.querySelectorAll(`.reveal, .reveal-left, .reveal-right`).forEach(e=>n.observe(e)),()=>n.disconnect()},[]),e}var S9=`flex min-h-12 w-full items-center justify-center rounded-xl bg-foreground px-5 py-3.5 text-sm font-bold text-background shadow-xl transition-all hover:bg-foreground/90 active:scale-[0.98] sm:min-h-14 sm:rounded-2xl sm:px-8 sm:py-4 sm:text-base`,eDe=`flex min-h-12 w-full items-center justify-center rounded-xl bg-accent px-5 py-3.5 text-sm font-bold text-accent-foreground shadow-xl shadow-accent/25 transition-all hover:bg-accent-hover active:scale-[0.98] sm:min-h-14 sm:rounded-2xl sm:px-8 sm:py-4 sm:text-base`;function tDe(){let e=my();return(0,V.jsxs)(`div`,{ref:$Ee(),className:`relative flex flex-col overflow-hidden`,children:[(0,V.jsxs)(`section`,{className:`relative flex flex-col items-center justify-center overflow-hidden bg-gradient-to-br from-[#f0f4ff] via-background to-[#eef6ff] pb-28 pt-16 sm:pb-36 sm:pt-20 md:pb-44 md:pt-24 lg:pt-24 xl:pt-28 dark:from-[#040418] dark:via-[#060620] dark:to-[#0d1a3a]`,children:[(0,V.jsx)(`div`,{className:`pointer-events-none absolute -top-24 -left-24 h-[min(420px,85vw)] w-[min(420px,85vw)] max-md:max-h-[320px] max-md:max-w-[320px] rounded-full bg-primary/8 blur-[100px] animate-float-slow dark:bg-primary/15`}),(0,V.jsx)(`div`,{className:`pointer-events-none absolute top-1/3 -right-20 h-[min(360px,80vw)] w-[min(360px,80vw)] max-md:max-h-[280px] max-md:max-w-[280px] rounded-full bg-accent/6 blur-[90px] animate-float-slower dark:bg-accent/12`}),(0,V.jsx)(`div`,{className:`pointer-events-none absolute bottom-1/4 left-1/4 h-[min(200px,50vw)] w-[min(200px,50vw)] max-md:max-h-[160px] max-md:max-w-[160px] rounded-full bg-success/5 blur-[80px] animate-float-slow dark:bg-success/8`}),(0,V.jsx)(`div`,{className:`pointer-events-none absolute inset-0 bg-[radial-gradient(ellipse_80%_50%_at_50%_-20%,rgba(37,99,235,0.08),transparent)] dark:bg-[radial-gradient(ellipse_80%_50%_at_50%_-20%,rgba(214,255,0,0.06),transparent)]`}),(0,V.jsx)(`div`,{className:`absolute inset-0 bg-[linear-gradient(to_right,rgba(37,99,235,0.12)_1px,transparent_1px),linear-gradient(to_bottom,rgba(37,99,235,0.12)_1px,transparent_1px)] bg-[size:40px_40px] opacity-45 sm:bg-[size:48px_48px] dark:bg-[linear-gradient(to_right,rgba(148,163,184,0.1)_1px,transparent_1px),linear-gradient(to_bottom,rgba(148,163,184,0.1)_1px,transparent_1px)] dark:opacity-30 [mask-image:radial-gradient(ellipse_60%_60%_at_50%_50%,black_10%,transparent_80%)]`}),(0,V.jsxs)(`div`,{className:`container relative z-10 mx-auto max-w-6xl px-4 text-center sm:px-6 lg:px-8`,children:[(0,V.jsxs)(`div`,{className:`reveal mx-auto inline-flex max-w-full flex-wrap items-center justify-center gap-2 rounded-full border border-primary/20 bg-primary/5 px-3 py-1.5 text-xs font-semibold text-primary shadow-sm backdrop-blur-sm transition-all hover:border-primary/40 hover:bg-primary/8 sm:px-4 sm:text-sm dark:border-primary/30 dark:bg-primary/10`,children:[(0,V.jsx)(Eae,{size:14,className:`shrink-0 sm:h-4 sm:w-4`}),(0,V.jsx)(`span`,{className:`min-w-0 text-pretty leading-snug`,children:e(`download.heroBadge`)})]}),(0,V.jsxs)(`h1`,{className:`reveal reveal-delay-1 mx-auto mt-6 max-w-[22rem] text-balance text-4xl font-black leading-[1.08] tracking-tighter text-foreground min-[400px]:max-w-none sm:mt-8 sm:text-5xl sm:leading-[1.05] md:text-6xl md:leading-[1.02] lg:text-7xl xl:text-8xl`,children:[e(`download.heroTitle`),` `,(0,V.jsx)(`br`,{className:`hidden md:block`}),(0,V.jsx)(`span`,{className:`bg-[image:var(--grad-primary)] bg-clip-text pl-0.5 pr-2 pb-1 box-decoration-clone text-transparent sm:pb-2`,children:e(`download.heroTitleAccent`)})]}),(0,V.jsx)(`p`,{className:`reveal reveal-delay-2 mx-auto mt-6 max-w-2xl text-base leading-relaxed text-muted-foreground sm:mt-8 sm:max-w-3xl sm:text-lg md:text-xl lg:mt-10 lg:text-2xl`,children:e(`download.heroSubtitle`)})]}),(0,V.jsx)(QEe,{position:`bottom`,className:`bg-[#e9eef9] dark:bg-[#0b0b26]`})]}),(0,V.jsx)(`section`,{className:`bg-gradient-to-b from-[#e9eef9] via-[#f5f7ff] to-background py-12 pb-24 sm:py-16 sm:pb-32 md:py-20 md:pb-36 lg:py-24 lg:pb-40 dark:from-[#0b0b26] dark:via-[#0f0f30]/60 dark:to-[#040418]`,children:(0,V.jsx)(`div`,{className:`container mx-auto max-w-7xl px-4 sm:px-6 lg:px-8`,children:(0,V.jsxs)(`div`,{className:`grid grid-cols-1 gap-6 sm:gap-8 md:grid-cols-2 md:gap-8 lg:grid-cols-3 lg:gap-10`,children:[(0,V.jsxs)(`div`,{className:`reveal card-premium group relative flex h-full flex-col items-center overflow-hidden rounded-3xl border border-border bg-surface p-6 text-center shadow-lg transition-all hover:-translate-y-2 hover:shadow-2xl hover:shadow-
470primary/20 sm:rounded-[2rem] sm:p-8 lg:rounded-[2.5rem] lg:p-10 dark:border-white/10 dark:bg-white/[0.02]`,children:[(0,V.jsx)(`div`,{className:`pointer-events-none absolute inset-0 bg-gradient-to-b from-primary/5 to-transparent opacity-0 transition-opacity duration-500 group-hover:opacity-100`}),(0,V.jsx)(`div`,{className:`relative mb-6 flex h-20 w-20 shrink-0 items-center justify-center rounded-2xl border border-border bg-surface-elevated shadow-xl transition-transform duration-500 group-hover:scale-110 sm:mb-8 sm:h-24 sm:w-24 sm:rounded-3xl`,children:(0,V.jsx)(ZEe,{className:`h-9 w-9 text-foreground sm:h-10 sm:w-10`})}),(0,V.jsx)(`h3`,{className:`text-xl font-black tracking-tight text-foreground sm:text-2xl lg:text-3xl`,children:e(`download.iosTitle`)}),(0,V.jsx)(`p`,{className:`mt-3 max-w-prose text-sm leading-relaxed text-muted-foreground sm:mt-4 sm:text-base`,children:e(`download.iosBody`)}),(0,V.jsx)(`div`,{className:`mt-auto w-full pt-8 sm:pt-10`,children:(0,V.jsx)(`a`,{href:YEe,target:`_blank`,rel:`noopener noreferrer`,className:S9,children:e(`download.iosCta`)})})]}),(0,V.jsxs)(`div`,{className:`reveal reveal-delay-1 card-premium group relative flex h-full flex-col items-center overflow-hidden rounded-3xl border border-border bg-surface p-6 text-center shadow-lg transition-all hover:-translate-y-2 hover:shadow-2xl hover:shadow-success/20 sm:rounded-[2rem] sm:p-8 lg:rounded-[2.5rem] lg:p-10 dark:border-white/10 dark:bg-white/[0.02]`,children:[(0,V.jsx)(`div`,{className:`pointer-events-none absolute inset-0 bg-gradient-to-b from-success/5 to-transparent opacity-0 transition-opacity duration-500 group-hover:opacity-100`}),(0,V.jsx)(`div`,{className:`relative mb-6 flex h-20 w-20 shrink-0 items-center justify-center rounded-2xl border border-border bg-surface-elevated shadow-xl transition-transform duration-500 group-hover:scale-110 sm:mb-8 sm:h-24 sm:w-24 sm:rounded-3xl`,children:(0,V.jsx)($A,{className:`h-9 w-9 text-foreground sm:h-10 sm:w-10`})}),(0,V.jsx)(`h3`,{className:`text-xl font-black tracking-tight text-foreground sm:text-2xl lg:text-3xl`,children:e(`download.androidTitle`)}),(0,V.jsx)(`p`,{className:`mt-3 max-w-prose text-sm leading-relaxed text-muted-foreground sm:mt-4 sm:text-base`,children:e(`download.androidBody`)}),(0,V.jsx)(`div`,{className:`mt-auto w-full pt-8 sm:pt-10`,children:(0,V.jsx)(`a`,{href:XEe,target:`_blank`,rel:`noopener noreferrer`,className:S9,children:e(`download.androidCta`)})})]}),(0,V.jsxs)(`div`,{className:`reveal reveal-delay-2 card-premium group relative flex h-full flex-col items-center overflow-hidden rounded-3xl border border-accent/30 bg-surface p-6 pb-6 text-center shadow-lg shadow-accent/5 transition-all hover:-translate-y-2 hover:shadow-2xl hover:shadow-accent/20 sm:rounded-[2rem] sm:p-8 sm:pb-8 md:col-span-2 lg:col-span-1 lg:rounded-[2.5rem] lg:p-10 dark:border-accent/40 dark:bg-accent/[0.03]`,children:[(0,V.jsx)(`div`,{className:`pointer-events-none absolute inset-0 bg-gradient-to-b from-accent/10 to-transparent opacity-0 transition-opacity duration-500 group-hover:opacity-100`}),(0,V.jsx)(`div`,{className:`absolute left-1/2 top-4 z-10 inline-flex -translate-x-1/2 items-center rounded-full border border-accent/20 bg-accent/10 px-2.5 py-1 text-[9px] font-black uppercase tracking-wider text-accent sm:left-auto sm:right-5 sm:top-5 sm:translate-x-0 sm:px-3 sm:text-[10px]`,children:e(`download.extensionBadge`)}),(0,V.jsxs)(`div`,{className:`relative mb-6 mt-10 flex h-20 w-20 shrink-0 items-center justify-center rounded-2xl border border-accent/20 bg-accent/10 shadow-xl shadow-accent/10 transition-transform duration-500 group-hover:scale-110 sm:mb-8 sm:mt-4 sm:h-24 sm:w-24 sm:rounded-3xl`,children:[(0,V.jsx)(OA,{className:`h-9 w-9 text-accent sm:h-10 sm:w-10`}),(0,V.jsx)(`div`,{className:`absolute -bottom-2 -right-2 flex h-7 w-7 items-center justify-center rounded-full bg-accent text-accent-foreground shadow-lg sm:h-8 sm:w-8`,children:(0,V.jsx)(TA,{className:`h-3.5 w-3.5 sm:h-4 sm:w-4`})})]}),(0,V.jsx)(`h3`,{className:`text-xl font-black tracking-tight text-foreground sm:text-2xl lg:text-3xl`,children:e(`download.extensionTitle`)}),(0,V.jsx)(`p`,{className:`mt-3 max-w-prose text-sm leading-relaxed text-muted-foreground sm:mt-4 sm:text-base`,children:e(`download.extensionBody`)}),(0,V.jsx)(`div`,{className:`mt-auto w-full pt-8 sm:pt-10`,children:(0,V.jsx)(`a`,{href:U7,target:`_blank`,rel:`noopener noreferrer`,className:eDe,children:e(`download.extensionCta`)})})]})]})})})]})}function nDe({id:e,title:t,children:n,className:r=``}){return(0,V.jsxs)(`section`,{id:e,className:`scroll-mt-28 border-b border-border/40 pb-14 last:border-b-0 ${r}`,children:[(0,V.jsx)(`h2`,{className:`text-2xl font-black tracking-tight text-foreground sm:text-3xl`,children:t}),(0,V.jsx)(ik.div,{initial:{opacity:0,y:8},whileInView:{opacity:1,y:0},viewport:{once:!0,margin:`-40px`},transition:{duration:.35},className:`mt-6 space-y-4 text-base leading-relaxed text-muted-foreground`,children:n})]})}function rDe({title:e,children:t}){return(0,V.jsxs)(ik.div,{initial:{opacity:0,y:8},whileInView:{opacity:1,y:0},viewport:{once:!0,margin:`-40px`},transition:{duration:.35},className:`space-y-3`,children:[(0,V.jsx)(`h3`,{className:`text-lg font-bold text-foreground`,children:e}),t]})}function C9({children:e,variant:t=`primary`}){return(0,V.jsx)(`div`,{className:`rounded-2xl border p-6 text-sm leading-relaxed sm:p-8 ${{primary:`border-primary/20 bg-primary/5`,neutral:`border-border bg-surface-elevated/50`,warning:`border-amber-500/20 bg-amber-500/5`}[t]}`,children:e})}function iDe({items:e,ordered:t=!1}){return(0,V.jsx)(t?`ol`:`ul`,{className:`space-y-3 ${t?`list-decimal pl-5 marker:font-bold marker:text-primary`:``}`,children:e.map((e,n)=>(0,V.jsxs)(`li`,{className:t?`pl-2`:`flex gap-3`,children:[!t&&(0,V.jsx)(`span`,{className:`mt-2 h-1.5 w-1.5 shrink-0 rounded-full bg-primary`,"aria-hidden":!0}),(0,V.jsx)(`div`,{children:e.title?(0,V.jsxs)(V.Fragment,{children:[(0,V.jsx)(`p`,{className:`font-semibold text-foreground`,children:e.title}),(0,V.jsx)(`p`,{className:`mt-1 text-sm`,children:e.body})]}):(0,V.jsx)(`p`,{children:e.body})})]},n))})}function aDe({columns:e,rows:t}){return(0,V.jsx)(`div`,{className:`overflow-x-auto rounded-2xl border border-border shadow-sm`,children:(0,V.jsxs)(`table`,{className:`w-full min-w-[480px] text-left text-sm`,children:[(0,V.jsx)(`thead`,{className:`bg-surface-elevated/60 text-[11px] font-black uppercase tracking-widest text-foreground`,children:(0,V.jsx)(`tr`,{children:e.map(e=>(0,V.jsx)(`th`,{className:`px-5 py-3.5`,children:e},e))})}
470),(0,V.jsx)(`tbody`,{className:`divide-y divide-border`,children:t.map((e,t)=>(0,V.jsx)(`tr`,{className:`transition-colors hover:bg-primary/5`,children:e.map((e,t)=>(0,V.jsx)(`td`,{className:`px-5 py-4 align-top ${t===0?`font-medium text-foreground`:`text-muted-foreground`}`,children:e},t))},t))})]})})}function w9({email:e}){return(0,V.jsx)(`a`,{href:`mailto:${e}`,className:`font-semibold text-primary underline-offset-4 hover:underline`,children:e})}function oDe({badgeIcon:e,badgeLabel:t,title:n,titleAccent:r,subtitle:i,effectiveDate:a,lastUpdated:o,relatedPage:s,children:c}){let l=my();return(0,V.jsxs)(ik.div,{initial:{opacity:0},animate:{opacity:1},className:`relative min-h-screen bg-background`,children:[(0,V.jsxs)(`section`,{className:`relative overflow-hidden bg-gradient-to-br from-primary/5 via-background to-accent/5 pb-16 pt-28 sm:pb-20 sm:pt-36`,children:[(0,V.jsxs)(ik.div,{initial:{opacity:0,y:16},animate:{opacity:1,y:0},transition:{duration:.45},className:`container relative z-10 mx-auto max-w-4xl px-4 text-center sm:px-6 lg:px-8`,children:[(0,V.jsxs)(ik.div,{initial:{opacity:0,y:12},animate:{opacity:1,y:0},className:`mb-4 inline-flex items-center gap-2 rounded-full bg-primary/10 px-4 py-1.5 text-sm font-bold text-primary`,children:[e,(0,V.jsx)(`span`,{children:t})]}),(0,V.jsxs)(`h1`,{className:`text-3xl font-black tracking-tight text-foreground sm:text-5xl md:text-6xl`,children:[n,` `,(0,V.jsx)(`span`,{className:`text-primary`,children:r})]}),i&&(0,V.jsx)(`p`,{className:`mx-auto mt-4 max-w-2xl text-base text-muted-foreground sm:text-lg`,children:i}),(0,V.jsxs)(`div`,{className:`mt-6 flex flex-wrap items-center justify-center gap-4 text-sm text-muted-foreground`,children:[(0,V.jsx)(`span`,{children:l(`legalDoc.effective`,{date:a})}),(0,V.jsx)(`span`,{className:`hidden sm:inline`,"aria-hidden":!0,children:`·`}),(0,V.jsx)(`span`,{children:l(`legalDoc.lastUpdated`,{date:o})})]}),s&&(0,V.jsxs)(`p`,{className:`mt-4 text-sm text-muted-foreground`,children:[l(`legalDoc.seeAlso`),` `,(0,V.jsx)(zi,{to:s.href,className:`font-semibold text-primary hover:underline`,children:s.label})]})]}),(0,V.jsx)(`div`,{className:`pointer-events-none absolute -right-20 top-1/2 h-80 w-80 -translate-y-1/2 rounded-full bg-primary/10 blur-[100px]`,"aria-hidden":!0})]}),(0,V.jsx)(`section`,{className:`py-10 sm:py-16`,children:(0,V.jsx)(ik.div,{initial:{opacity:0,y:12},animate:{opacity:1,y:0},transition:{delay:.1,duration:.4},className:`container mx-auto max-w-5xl px-4 sm:px-6 lg:px-8`,children:(0,V.jsx)(`article`,{className:`space-y-14`,children:c})})})]})}function sDe(e,t){return typeof e==`string`?(0,V.jsx)(`span`,{children:e},t):`bold`in e?(0,V.jsx)(`strong`,{children:e.bold},t):`email`in e?(0,V.jsx)(w9,{email:e.email},t):`link`in e?(0,V.jsx)(zi,{to:e.link.href,className:`font-semibold text-primary hover:underline`,children:e.link.label},t):`externalLink`in e?(0,V.jsx)(`a`,{href:e.externalLink.href,target:`_blank`,rel:`noopener noreferrer`,className:`font-semibold text-primary hover:underline`,children:e.externalLink.label},t):null}function cDe({content:e}){return(0,V.jsx)(`p`,{children:e.map((e,t)=>sDe(e,t))})}function T9({blocks:e}){return(0,V.jsx)(V.Fragment,{children:e.map((e,t)=>(0,V.jsx)(lDe,{block:e},t))})}function lDe({block:e}){let t=my();switch(e.kind){case`paragraph`:return(0,V.jsx)(cDe,{content:e.content});case`subsection`:return(0,V.jsx)(rDe,{title:e.title,children:(0,V.jsx)(T9,{blocks:e.blocks})});case`list`:return(0,V.jsx)(iDe,{ordered:e.ordered,items:e.items.map(e=>({title:e.title,body:e.content}))});case`table`:return(0,V.jsx)(aDe,{columns:e.columns,rows:e.rows});case`callout`:return(0,V.jsxs)(C9,{variant:e.variant,children:[e.title?(0,V.jsx)(`p`,{className:`mb-3 font-semibold text-foreground`,children:e.title}):null,(0,V.jsx)(T9,{blocks:e.blocks})]});case`featureGrid`:return(0,V.jsx)(`ul`,{className:`grid gap-2 sm:grid-cols-2`,children:e.items.map(e=>(0,V.jsxs)(`li`,{className:`flex items-start gap-2 rounded-xl border border-border bg-surface px-4 py-3 text-sm text-foreground`,children:[(0,V.jsx)(Qk,{size:16,className:`mt-0.5 shrink-0 text-primary`,"aria-hidden":!0}),(0,V.jsx)(`span`,{children:e})]},e))});case`securityFeatures`:return(0,V.jsx)(`div`,{className:`grid gap-3 sm:grid-cols-2`,children:e.items.map(e=>(0,V.jsxs)(`div`,{className:`flex items-center gap-3 rounded-xl border border-border bg-surface-elevated/50 p-4`,children:[(0,V.jsx)(qA,{size:18,className:`shrink-0 text-success`,"aria-hidden":!0}),(0,V.jsx)(`span`,{className:`text-sm font-semibold text-foreground`,children:e})]},e))});case`companyCard`:return(0,V.jsxs)(C9,{variant:`neutral`,children:[(0,V.jsx)(`p`,{className:`font-bold text-foreground`,children:W7.name}),(0,V.jsxs)(`p`,{className:`text-muted-foreground`,children:[`(`,W7.legalEntity,`)`]}),(0,V.jsx)(`p`,{className:`mt-2 text-muted-foreground`,children:W7.addressLine1}),(0,V.jsx)(`p`,{className:`text-muted-foreground`,children:W7.addressLine2}),(0,V.jsxs)(`p`,{className:`mt-4 text-sm`,children:[(0,V.jsxs)(`span`,{className:`font-semibold text-foreground`,children:[t(`legalDoc.contact`),` `]}),(0,V.jsx)(w9,{email:W7.supportEmail})]})]});case`privacyContactCard`:return(0,V.jsxs)(C9,{variant:`neutral`,children:[(0,V.jsx)(`p`,{className:`font-bold text-foreground`,children:t(`legalDoc.privacyContact`)}),(0,V.jsx)(`p`,{className:`mt-1 text-muted-foreground`,children:W7.name}),(0,V.jsx)(`p`,{className:`text-muted-foreground`,children:W7.addressLine1}),(0,V.jsx)(`p`,{className:`text-muted-foreground`,children:W7.addressLine2}),(0,V.jsxs)(`p`,{className:`mt-4`,children:[t(`legalDoc.email`),` `,(0,V.jsx)(w9,{email:W7.supportEmail})]})]});case`legalContactCard`:return(0,V.jsxs)(C9,{variant:`neutral`,children:[(0,V.jsx)(`p`,{className:`font-bold text-foreground`,children:t(`legalDoc.legalContact`)}),(0,V.jsxs)(`p`,{className:`mt-3`,children:[(0,V.jsxs)(`span`,{className:`text-muted-foreground`,children:[t(`legalDoc.email`),` `]}),(0,V.jsx)(w9,{email:W7.legalEmail})]}),(0,V.jsxs)(`p`,{className:`mt-2`,children:[(0,V.jsxs)(`span`,{className:`text-muted-foreground`,children:[t(`legalDoc.privacy`),` `]}),(0,V.jsx)(w9,{email:W7.supportEmail})]}),(0,V.jsxs)(`p`,{className:`mt-4 text-muted-foreground`,children:[W7.addressLine1,(0,V.jsx)(`br`,{}),W7.addressLine2]})]});case`capsuleText`:return(0,V.jsx)(`p`,{className:`text-sm uppercase leading-relaxed tracking-wide text-muted-foreground`,children:e.content});default:return null}}var uDe={default:``,muted:`rounded-2xl border border-border/60 bg-surface-elevated/30 p-6 sm:p-8`,warning:`rounded-2xl border border-red-500/10 bg-red-500/5 p-6 sm:p-8`};function E9({config:e,badgeIcon:t}){return(0,V.jsx)(oDe,{badgeIcon:t,badgeLabel:e.meta.badgeLabel,title:e.meta.title,titleAccent:e.meta.titleAccent,subtitle:e.meta.subtitle,effectiveDate:e.meta.effectiveDate,lastUpdated:e.meta.lastUpdated,relatedPage:e.meta.relatedPage,children:e.sections.map(e=>(0,V.jsx)(nDe,{id:e.id,title:e.title,className:uDe[e.variant??`default`],children:(0,V.jsx)(T9,{blocks:e.blocks})},e.id))})}var dDe={meta:{badgeLabel:`Privacy & Security`,title:`Privacy`,titleAccent:`Policy`,subtitle:`How InstaSnag collects, uses, stores, and protects your personal information.`,effectiveDate:`May 8, 2026`,lastUpdated:`May 8, 2026`,relatedPage:{href:`/terms`,label:`Terms of Service`}},sections:[{id:`overview`,title:`Overview`,tocLabel:`Overview`,blocks:[{kind:`paragraph`,content:[`This Privacy Policy explains how `,{bold:`InstaSnag`},` ("we," "us," or "our") collects, uses, stores, and protects your personal information when you use our website, mobile application, and related services (collectively, the "Services").`]},{kind:`paragraph`,content:[`By accessing or using our Services, you acknowledge that you have read and understood this Privacy Policy. If you do not agree with the practices described
470in this document, please discontinue use of our Services immediately.`]}]},{id:`who-we-are`,title:`Who we are`,tocLabel:`Who we are`,blocks:[{kind:`companyCard`},{kind:`paragraph`,content:[`We operate a deal-monitoring and alerting platform that scans online marketplaces on your behalf and delivers real-time notifications for listings matching your search criteria.`]}]},{id:`information-we-collect`,title:`Information we collect`,tocLabel:`Information we collect`,blocks:[{kind:`paragraph`,content:[`The personal information we collect depends on how you interact with the Services. We collect information through three primary channels:`]},{kind:`subsection`,title:`Information you provide directly`,blocks:[{kind:`list`,items:[{title:`Account registration details`,content:`Your name, email address, username, and password when you create an account.`},{title:`Billing and payment details`,content:`Your name, billing address, and payment confirmation processed through our third-party payment provider. We do not store full payment card numbers on our systems.`},{title:`Search and alert preferences`,content:`The keywords, categories, price ranges, and geographic filters you configure for marketplace monitoring.`},{title:`Support communications`,content:`Any information you voluntarily share when contacting our support team.`}]}]},{kind:`subsection`,title:`Information collected automatically`,blocks:[{kind:`paragraph`,content:[`When you interact with our Services, we automatically collect certain technical and usage data, including:`]},{kind:`list`,items:[{title:`Device and browser information`,content:`Device type, operating system, browser version, screen resolution.`},{title:`Network and connection data`,content:`IP address, approximate geographic location derived from your IP, internet service provider.`},{title:`Usage activity`,content:`Pages visited, features used, alert interactions, session duration, and in-app click behavior.`},{title:`Crash and diagnostic data`,content:`Error logs and performance data to help us diagnose technical issues.`}]},{kind:`paragraph`,content:[`We collect this data using cookies, pixel tags, session logs, and similar tracking technologies described further in the Cookies section.`]}]},{kind:`subsection`,title:`Information from third-party sources`,blocks:[{kind:`list`,items:[{title:`Payment processors (e.g., Stripe)`,content:`Transaction confirmations and billing-related identifiers.`},{title:`Analytics providers`,content:`Aggregated or pseudonymized behavioral data used to improve the Services.`},{title:`Marketplace platforms`,content:`Publicly available listing data accessed on your behalf to fulfill the alerting service.`}]},{kind:`paragraph`,content:[`We do not purchase or receive personal data from data brokers.`]}]}]},{id:`how-we-use`,title:`How we use your information`,tocLabel:`How we use your data`,blocks:[{kind:`table`,columns:[`Purpose`,`Legal basis`],rows:[[`Creating and managing your account`,`Performance of contract`],[`Delivering marketplace alerts and search results`,`Performance of contract`],[`Processing subscription payments`,`Performance of contract`],[`Sending transactional emails (alerts, receipts, security notices)`,`Performance of contract`],[`Improving and developing our Services`,`Legitimate interests`],[`Diagnosing technical issues and monitoring platform stability`,`Legitimate interests`],[`Detecting and preventing fraud, abuse, and unauthorized access`,`Legitimate interests / Legal obligation`],[`Sending promotional communications (with your consent)`,`Consent`],[`Complying with applicable laws and regulations`,`Legal obligation`]]},{kind:`paragraph`,content:[`You may opt out of promotional emails at any time by clicking the unsubscribe link included in those messages. Opting out of promotional communications will not affect transactional or service-related messages.`]}]},{id:`marketplace-access`,title:`Marketplace access and automation`,tocLabel:`Marketplace access`,blocks:[{kind:`paragraph`,content:[`Our core service involves scanning publicly accessible listings on third-party marketplace platforms (e.g., Facebook Marketplace, Kijiji, Craigslist) to surface deals matching your configured alerts.`]},{kind:`callout`,title:`Important disclosures`,blocks:[{kind:`list`,items:[{content:`We act on your behalf. When our systems retrieve marketplace data, they do so to fulfill the alert
470ing service you have requested.`},{content:`We are not affiliated with any marketplace platform. We are not endorsed by, sponsored by, or otherwise associated with Facebook/Meta, Kijiji, Craigslist, or any other third-party platform.`},{content:`We do not store scraped listing content beyond what is necessary to deliver your alert notifications.`},{content:`You are responsible for ensuring your use of our Services complies with the terms and policies of any third-party platform you access through or alongside our Services.`}]}]}]},{id:`cookies`,title:`Cookies and tracking`,tocLabel:`Cookies`,blocks:[{kind:`paragraph`,content:[`We use cookies and similar technologies on our website and application to keep you signed in, remember your preferences, analyze usage (including tools such as Google Analytics), and support security and fraud prevention.`]},{kind:`table`,columns:[`Type`,`Purpose`,`Can you opt out?`],rows:[[`Strictly necessary`,`Authentication, session management, security`,`No (required for functionality)`],[`Functional`,`Remembering preferences and settings`,`Yes`],[`Analytics`,`Measuring usage patterns and performance`,`Yes`],[`Marketing`,`Personalizing promotions (if applicable)`,`Yes`]]},{kind:`paragraph`,content:[`You can control or disable cookies through your browser settings. Disabling strictly necessary cookies may impair or prevent your access to certain features of the Services.`]}]},{id:`data-sharing`,title:`How we share your information`,tocLabel:`How we share data`,blocks:[{kind:`callout`,variant:`primary`,blocks:[{kind:`paragraph`,content:[`We do not sell your personal information to third parties. We do not share your data for third-party advertising or marketing purposes without your explicit consent.`]}]},{kind:`subsection`,title:`Service providers`,blocks:[{kind:`paragraph`,content:[`We engage trusted third-party vendors who process data solely on our behalf and under our instructions. These include payment processing (e.g., Stripe), cloud hosting, email delivery, analytics platforms, and customer support tools.`]},{kind:`paragraph`,content:[`All service providers are contractually required to handle your data securely and in accordance with applicable privacy laws.`]}]},{kind:`subsection`,title:`Legal and safety disclosures`,blocks:[{kind:`paragraph`,content:[`We may disclose your information to government authorities, law enforcement, or other parties when we are legally required to do so, or when we have a good-faith belief that disclosure is necessary to comply with law, investigate suspected fraud or Terms violations, or protect the safety, rights, or property of our users, the public, or our company.`]}]},{kind:`subsection`,title:`Business transfers`,blocks:[{kind:`paragraph`,content:[`In the event of a merger, acquisition, financing, reorganization, or sale of assets, your information may be transferred to a successor entity. We will notify you via email or a prominent notice on our website before your data becomes subject to a materially different privacy policy.`]}]},{kind:`subsection`,title:`With your consent`,blocks:[{kind:`paragraph`,content:[`We may share information with third parties in any other circumstance where you have given us explicit, informed consent.`]}]}]},{id:`retention`,title:`Data retention`,tocLabel:`Data retention`,blocks:[{kind:`paragraph`,content:[`We retain your personal information for as long as your account is active, or as long as needed to provide you with the Services, resolve disputes, enforce agreements, and comply with legal obligations.`]},{kind:`list`,ordered:!0,items:[{content:`Account data is retained for the duration of your account and for a reasonable period thereafter (typically up to 90 days following account deletion), unless a longer retention period is required by law.`},{content:`Payment records are retained as required by applicable tax and financial record-keeping laws.`},{content:`Usage and diagnostic logs are generally retained for no more than 12 months.`},{content:`Upon verified deletion request, we will erase your personal data from active systems within 30 days, subject to legal hold obligations.`}]}]},{id:`security`,title:`Data security`,tocLabel:`Data security`,blocks:[{kind:`paragraph`,content:[`We implement industry-standard technical and organizational measures to protect your personal information from unauthorized access, disclosure, alteration, or destruction.`]},{kind:`securityFeatures`,items:[`Encryption of data in transit using TLS`,`Encryption of sensitive data at rest`,`Role-based access controls`,`Regular security monitoring and vulnerability assessments`]},{kind:`paragraph`,content:[`No method of transmission over the internet or method of electronic storage is completely secure. While we strive to protect your information, we cannot guarantee absolute security. If you believe your account has been compromised, please contact us immediately at `,{email:`[email protected]`},`.`]}]},{id:`childrens-privacy`,title:`Children's privacy`,tocLabel:`Children's privacy`,blocks:[{kind:`paragraph`,content:[`Our Services are not directed to individuals under the age of 16, and we do not knowingly collect personal information from children. If you are a parent or guardian and believe your child has provided us with personal information without your consent, please contact us and we will promptly delete it.`]}]},{id:`your-rights`,title:`Your privacy rights`,tocLabel:`Your privacy rights`,blocks:[{kind:`paragraph`,content:[`Depending on your jurisdiction, you may have the following rights with respect to your personal information:`]},{kind:`table`,columns:[`Right`,`Description`],rows:[[`Access`,`Request a copy of the personal data we hold about you`],[`Correction`,`Request that we correct inaccurate or incomplete information`],[`Deleti
470on`,`Request erasure of your personal data, subject to legal exceptions`],[`Portability`,`Receive your data in a structured, machine-readable format`],[`Restriction`,`Ask us to limit how we process your data in certain circumstances`],[`Objection`,`Object to processing based on legitimate interests or for direct marketing`],[`Withdraw consent`,`Revoke previously granted consent at any time`],[`Appeal`,`Appeal a decision we make in response to a privacy rights request`]]},{kind:`subsection`,title:`Canadian residents (PIPEDA / Quebec Law 25)`,blocks:[{kind:`paragraph`,content:[`If you reside in Canada, you have the right to access, correct, and request deletion of your personal information under PIPEDA and, if you are in Québec, under Law 25. You may file a complaint with the Office of the Privacy Commissioner of Canada at `,{externalLink:{href:`https://www.priv.gc.ca`,label:`priv.gc.ca`}},`.`]}]},{kind:`subsection`,title:`California residents (CCPA / CPRA)`,blocks:[{kind:`paragraph`,content:[`If you are a California resident, you have additional rights under the California Consumer Privacy Act, including the right to know what personal information is collected, sold, or disclosed, and the right to opt out of the sale of your personal information. We do not sell personal information.`]}]},{kind:`subsection`,title:`EEA / UK residents (GDPR)`,blocks:[{kind:`paragraph`,content:[`If you are located in the European Economic Area or the United Kingdom, your personal information is processed in accordance with the GDPR or UK GDPR. You have the right to lodge a complaint with your local data protection authority.`]}]},{kind:`paragraph`,content:[`To exercise any of the above rights, contact us at `,{email:`[email protected]`},`. We may need to verify your identity before fulfilling your request. We will respond within the timeframe required by applicable law (generally 30 days, with possible extension for complex requests).`]}]},{id:`international`,title:`International data transfers`,tocLabel:`International transfers`,blocks:[{kind:`paragraph`,content:[`Our servers and service providers may be located in countries outside your jurisdiction, including Canada and the United States. By using our Services, you acknowledge that your personal information may be transferred to and processed in these countries, which may have different data protection laws than your country of residence.`]},{kind:`paragraph`,content:[`Where required by law (e.g., GDPR transfers from the EEA), we rely on approved transfer mechanisms such as Standard Contractual Clauses to safeguard your data.`]}]},{id:`third-party-links`,title:`Third-party links`,tocLabel:`Third-party links`,blocks:[{kind:`paragraph`,content:[`Our Services may contain links to external websites or third-party services. This Privacy Policy applies only to our Services. We have no control over and are not responsible for the privacy practices of any third-party websites or services you access through links on our platform.`]}]},{id:`contact-us`,title:`Contact us`,tocLabel:`Contact us`,blocks:[{kind:`paragraph`,content:[`For questions, concerns, or privacy rights requests, please reach out to us using the details below. If you are not satisfied with our response, you may escalate to the relevant data protection authority in your jurisdiction.`]},{kind:`privacyContactCard`}]},{id:`changes`,title:`Changes to this policy`,tocLabel:`Policy changes`,blocks:[{kind:`paragraph`,content:[`We may update this Privacy Policy from time to time to reflect changes in our practices, technology, legal requirements, or for other operational reasons. When we make material changes, we will update the last updated date, notify your account email for significant changes, and display a prominent notice on our website or within the app.`]},{kind:`paragraph`,content:[`Your continued use of the Services after any update constitutes your acceptance of the revised Privacy Policy. If you do not agree, you should discontinue use and may request deletion of your account. See our `,{link:{href:`/terms`,label:`Terms of Service`}},` for related contractual terms.`]},{kind:`paragraph`,content:[`This Privacy Policy was last reviewed and updated on May 8, 2026.`]}]}]},fDe={meta:{badgeLabel:`Confidentialité et sécurité`,title:`Politique de`,titleAccent:`confidentialité`,subtitle:`Comment InstaSnag recueille, utilise, conserve et protège vos renseignements personnels.`,effectiveDate:`8 mai 2026`,lastUpdated:`8 mai 2026`,relatedPage:{href:`/terms`,label:`Conditions d'utilisation`}},sections:[{id:`overview`,title:`Aperçu`,tocLabel:`Aperçu`,blocks:[{kind:`paragraph`,content:[`La présente politique de confidentialité explique comment `,{bold:`InstaSnag`},` (« nous ») recueille, utilise, conserve et protège vos renseignements personnels lorsque vous utilisez notre site web, notre application mobile et les services connexes (collectivement, les « Services »).`]},{kind:`paragraph`,content:[`En accédant aux Services ou en les utilisant, vous reconnaissez avoir lu et compris la présente politique. Si vous n'Ã
470ªtes pas d'accord avec les pratiques qui y sont décrites, veuillez cesser d'utiliser les Services immédiatement.`]}]},{id:`who-we-are`,title:`Qui nous sommes`,tocLabel:`Qui nous sommes`,blocks:[{kind:`companyCard`},{kind:`paragraph`,content:[`Nous exploitons une plateforme de surveillance d'aubaines et d'alertes qui parcourt les places de marché en ligne pour votre compte et vous envoie des notifications en temps réel pour les annonces correspondant à vos critères de recherche.`]}]},{id:`information-we-collect`,title:`Renseignements que nous recueillons`,tocLabel:`Renseignements recueillis`,blocks:[{kind:`paragraph`,content:[`Les renseignements personnels que nous recueillons dépendent de la façon dont vous interagissez avec les Services. Nous les obtenons principalement de trois façons :`]},{kind:`subsection`,title:`Renseignements que vous fournissez directement`,blocks:[{kind:`list`,items:[{title:`Inscription au compte`,content:`Votre nom, adresse courriel, nom d'utilisateur et mot de passe lorsque vous créez un compte.`},{title:`Facturation et paiement`,content:`Votre nom, adresse de facturation et confirmation de paiement traités par notre fournisseur de paiement. Nous ne stockons pas les numéros complets de cartes de paiement dans nos systèmes.`},{title:`Préférences de recherche et d'alertes`,content:`Les mots-clés, catégories, fourchettes de prix et filtres géographiques que vous configurez pour la surveillance des places de marché.`},{title:`Communications de soutien`,content:`Tout renseignement que vous communiquez volontairement lorsque vous contactez notre équipe de soutien.`}]}]},{kind:`subsection`,title:`Renseignements recueillis automatiquement`,blocks:[{kind:`paragraph`,content:[`Lorsque vous utilisez les Services, nous recueillons automatiquement certaines données techniques et d'utilisation, notamment :`]},{kind:`list`,items:[{title:`Appareil et navigateur`,content:`Type d'appareil, système d'exploitation, version du navigateur, résolution d'écran.`},{title:`Réseau et connexion`,content:`Adresse IP, emplacement géographique approximatif dérivé de votre IP, fournisseur d'accès Internet.`},{title:`Activité d'utilisation`,content:`Pages visitées, fonctionnalités utilisées, interactions avec les alertes, durée des sessions et clics dans l'application.`},{title:`Données de diagnostic`,content:`Journaux d'erreurs et données de performance pour nous aider à diagnostiquer les problèmes techniques.`}]},{kind:`paragraph`,content:[`Nous recueillons ces données au moyen de témoins, de balises pixel, de journaux de session et de technologies de suivi similaires, décrites plus loin à la section Témoins.`]}]},{kind:`subsection`,title:`Renseignements provenant de tiers`,blocks:[{kind:`list`,items:[{title:`Processeurs de paiement (p. ex. Stripe)`,content:`Confirmations de transaction et identifiants liés à la facturation.`},{title:`Fournisseurs d'analytique`,content:`Données comportementales agrégées ou pseudonymisées utilisées pour améliorer les Services.`},{title:`Places de marché`,content:`Données d'annonces publiquement accessibles consultées pour votre compte afin de fournir le service d'alertes.`}]},{kind:`paragraph`,content:[`Nous n'achetons pas et ne recevons pas de données personnelles auprès de courtiers en données.`]}]}]},{id:`how-we-use`,title:`Comment nous utilisons vos renseignements`,tocLabel:`Utilisation des données`,blocks:[{kind:`table`,columns:[`Finalité`,`Fondement juridique`],rows:[[`Création et gestion de votre compte`,`Exécution du contrat`],[`Livraison des alertes et des résultats de recherche`,`Exécution du contrat`],[`Traitement des paiements d'abonnement`,`Exécution du contrat`],[`Envoi de courriels transactionnels (alertes, reçus, avis de sécurité)`,`Exécution du contrat`],[`Amélioration et développement des Services`,`Intérêts légitimes`],[`Diagnostic des problèmes techniques et surveillance de la stabilité`,`Intérêts légitimes`],[`Détection et prévention de la fraude, des abus et des accès non autorisés`,`Intérêts légitimes / Obligation légale`],[`Envoi de communications promotionnelles (avec votre consentement)`,`Consentement`],[`Respect des lois et règlements applicables`,`Obligation légale`]]},{kind:`paragraph`,content:[`Vous pouvez vous désabonner des courriels promotionnels en tout temps en cliquant sur le lien de désabonnement. Le désabonnement n'affecte pas les messages transactionnels ou liés au service.`]}]},{id:`marketplace-access`,title:`Accès aux places de marché et automatisation`,tocLabel:`Accès aux places de marché`,blocks:[{kind:`paragraph`,content:[`Notre service principal consiste à parcourir des annonces publiquement accessibles sur des places de marché tierces (p. ex. Facebook Marketplace, Kijiji, Craigslist) afin de vous présenter des aubaines correspondant à vos alertes.`]},{kind:`callout`,title:`Divulgations importantes`,blocks:[{kind:`list`,items:[{content:`Nous agissons pour votre compte. Lorsque nos systèmes récupèrent des données de places de marché, c'est pour fournir le service d'alertes que vous avez demandé.`},{content:`Nous ne sommes affiliés à aucune place de marché. Nous ne sommes pas cautionnés, commandités ni autrement associés à Facebook/Meta, Kijiji, Craigslist ou toute autre plateforme tierce.`},{content:`Nous ne conservons pas le contenu d'annonces extrait au-delà de ce qui est nécessaire pour livrer vos notifications.`},{content:`Vous êtes responsable de vous assurer que votre utilisation des Services respecte les conditions et politiques de toute plateforme tierce à laquelle vous accédez par nos Services ou en parallèle.`}]}]}]},{id:`cookies`,title:`Témoins et suivi`,tocLabel:`Témoins`,blocks:[{kind:`paragraph`,content:[`Nous utilisons de
470s témoins et des technologies similaires sur notre site et notre application pour vous maintenir connecté, mémoriser vos préférences, analyser l'utilisation (y compris des outils comme Google Analytics) et appuyer la sécurité et la prévention de la fraude.`]},{kind:`table`,columns:[`Type`,`Finalité`,`Pouvez-vous vous y opposer ?`],rows:[[`Strictement nécessaires`,`Authentification, gestion de session, sécurité`,`Non (requis pour le fonctionnement)`],[`Fonctionnels`,`Mémorisation des préférences et réglages`,`Oui`],[`Analytique`,`Mesure des habitudes d'utilisation et de la performance`,`Oui`],[`Marketing`,`Personnalisation des promotions (le cas échéant)`,`Oui`]]},{kind:`paragraph`,content:[`Vous pouvez contrôler ou désactiver les témoins dans les paramètres de votre navigateur. La désactivation des témoins strictement nécessaires peut limiter ou empêcher l'accès à certaines fonctionnalités.`]}]},{id:`data-sharing`,title:`Comment nous communiquons vos renseignements`,tocLabel:`Communication des données`,blocks:[{kind:`callout`,variant:`primary`,blocks:[{kind:`paragraph`,content:[`Nous ne vendons pas vos renseignements personnels à des tiers. Nous ne communiquons pas vos données à des fins de publicité ou de marketing de tiers sans votre consentement explicite.`]}]},{kind:`subsection`,title:`Fournisseurs de services`,blocks:[{kind:`paragraph`,content:[`Nous faisons appel à des fournisseurs de confiance qui traitent les données uniquement pour notre compte et selon nos instructions. Cela inclut le traitement des paiements (p. ex. Stripe), l'hébergement infonuagique, l'envoi de courriels, les plateformes d'analytique et les outils de soutien.`]},{kind:`paragraph`,content:[`Tous les fournisseurs sont contractuellement tenus de traiter vos données de façon sécuritaire et conformément aux lois applicables sur la protection des renseignements personnels.`]}]},{kind:`subsection`,title:`Divulgations légales et de sécurité`,blocks:[{kind:`paragraph`,content:[`Nous pouvons communiquer vos renseignements aux autorités, aux forces de l'ordre ou à d'autres parties lorsque la loi l'exige, ou lorsque nous croyons de bonne foi que la divulgation est nécessaire pour respecter la loi, enquêter sur une fraude soupçonnée ou une violation des conditions, ou protéger la sécurité, les droits ou les biens de nos utilisateurs, du public ou de notre entreprise.`]}]},{kind:`subsection`,title:`Transferts d'entreprise`,blocks:[{kind:`paragraph`,content:[`En cas de fusion, d'acquisition, de financement, de réorganisation ou de vente d'actifs, vos renseignements peuvent être transférés à une entité successeure. Nous vous en aviserons par courriel ou par un avis bien visible sur notre site avant que vos données ne soient assujetties à une politique de confidentialité substantiellement différente.`]}]},{kind:`subsection`,title:`Avec votre consentement`,blocks:[{kind:`paragraph`,content:[`Nous pouvons communiquer des renseignements à des tiers dans toute autre circonstance où vous nous avez donné un consentement explicite et éclairé.`]}]}]},{id:`retention`,title:`Conservation des données`,tocLabel:`Conservation des données`,blocks:[{kind:`paragraph`,content:[`Nous conservons vos renseignements personnels aussi longtemps que votre compte est actif, ou aussi longtemps que nécessaire pour vous fournir les Services, résoudre des litiges, faire respecter les ententes et nous conformer aux obligations légales.`]},{kind:`list`,ordered:!0,items:[{content:`Les données de compte sont conservées pendant la durée du compte et pendant une période raisonnable par la suite (généralement jusqu'à 90 jours après la suppression du compte), sauf si la loi exige une conservation plus longue.`},{content:`Les dossiers de paiement sont conservés conformément aux lois fiscales et comptables applicables.`},{content:`Les journaux d'utilisation et de diagnostic sont généralement conservés au plus 12 mois.`},{content:`Sur demande de suppression vérifiée, nous effacerons vos données personnelles des systèmes actifs dans un délai de 30 jours, sous réserve des obligations de conservation légale.`}]}]},{id:`security`,title:`Sécurité des données`,tocLabel:`Sécurité des données`,blocks:[{kind:`paragraph`,content:[`Nous mettons en Åuvre des mesures techniques et organisationnelles conformes aux pratiques de l'industrie pour protéger vos renseignements personnels contre l'accès, la divulgation, la modification ou la destruction non autorisés.`]},{kind:`securityFeatures`,items:[`Chiffrement des données en transit au moyen de TLS`,`Chiffrement des données sensibles au repos`,`Contrôles d'accès fondés sur les rôles`,`Surveillance de sécurité et évaluations de vulnérabilités régulières`]},{kind:`paragraph`,content:[`Aucune méthode de transmission sur Internet ni de stockage électronique n'est entièrement sécurisée. Bien que nous nous efforcions de protéger vos renseignements, nous ne pouvons garantir une sécurité absolue. Si vous croyez que votre compte a été compromis, communiquez avec nous immédiatement à `,{email:`[email protected]`},`.`]}]},{id:`childrens-privacy`,title:`Confidentialité des enfants`,tocLabel:`Confidentialité des enfants`,blocks:[{kind:`paragraph`,content:[`Nos Services ne s'adressent pas aux personnes de moins de 16 ans, et nous ne recueillons pas sciemment de renseignements personnels auprès d'enfants. Si vous êtes un parent ou un tuteur et croyez que votre enfant nous a fourni des renseignements sans votre consentement, communiquez avec nous et nous les supprimerons rapidement.`]}]},{id:`your-rights`,title:`Vos droits en matière de confidentialité`,tocLabel:`Vos droits`,blocks:[{kind:`paragraph`,content:[`Selon votre juridiction, vous pouvez avoir les droits suivants à l'égard de vos renseignements personnels :`]},{kind:`table`,columns:[`Droit`,`Description`],rows:[[`Accès`,`Demander une copie des données personnelles que nous détenons à votre sujet`],[`Rectification`,`Demander la correction de renseignements inexacts ou incomplets`],[`Suppression`,`Demander l'effacement de vos données, sous réserve d'exceptions légales`],[`Portabilité`,`Recevoir vos données dans un format structuré et lisible par machine`],[`Limitation`,`Nous demander de limiter le traitement de vos données dans certaines circonstances`],[`Opposition`,`Vous opposer au traitement fondé sur les intérêts légitimes ou au marketing direct`],[`Retrait du consentement`,`Révoquer un consentement précédemment donné en tout temps`],[`Appel`,`Contester une décision prise en réponse à une demande relative à vos droits`]]},{kind:`subsection`,title:`Résidents du Canada (LPRPDE / Loi 25 du Québec)`,blocks:[{kind:`paragraph`,content:[`Si vous résidez au Canada, vous avez le droit d'accéder à vos renseignements personnels, de les faire corriger et d'en demander la suppression en vertu de la LPRPDE et, si vous êtes au Québec, de la Loi 25. Vous pouvez déposer une plainte auprès du Commissariat à la protection de la vie privée du Canada à `,{externalLink:{href:`https://www.priv.gc.ca`,label:`priv.gc.ca`}},`.`]}]},{kind:`subsection`,title:`Résidents de la Californie (CCPA / CPRA)`,blocks:[{kind:`paragraph`,content:[`Si vous êtes résident de la Californie, vous avez des droits supplémentaires en vertu de la California Consumer Privacy Act, notamment le droit de savoir quels renseignements personnels sont recueillis, vendus ou communiqués, et le droit de refuser la vente de vos renseignements. Nous ne vendons pas de renseignements personnels.`]}]},{kind:`subsection`,title:`Résidents de l'EEE / du Royaume-Uni (RGPD)`,blocks:[{kind:`paragraph`,content:[`Si vous êtes situé dans l'Espace économique européen ou au Royaume-Uni, vos renseignements personnels sont traités conformément au RGPD ou au UK GDPR. Vous avez le droit de déposer une plainte auprès de l'autorité de protection des données de votre pays.`]}]},{kind:`paragraph`,content:[`Pour exercer l'un des droits ci-dessus, écrivez-nous à `,{email:`[email protected]`},`. Nous pourrons devoir vérifier votre identité avant de donner suite. Nous répondrons dans le délai prévu par la loi applicable (généralement 30 jours, avec prolongation possible pour les demandes complexes).`]}]},{id:`international`,title:`Transferts internationaux de données`,tocLabel:`Transferts internationaux`,blocks:[{kind:`paragraph`,content:[`Nos serveurs et fournisseurs peuvent se trouver dans de
470s pays autres que votre juridiction, notamment au Canada et aux Ãtats-Unis. En utilisant les Services, vous reconnaissez que vos renseignements personnels peuvent être transférés et traités dans ces pays, dont les lois sur la protection des données peuvent différer de celles de votre pays de résidence.`]},{kind:`paragraph`,content:[`Lorsque la loi l'exige (p. ex. transferts RGPD depuis l'EEE), nous nous appuyons sur des mécanismes approuvés tels que les clauses contractuelles types pour protéger vos données.`]}]},{id:`third-party-links`,title:`Liens vers des tiers`,tocLabel:`Liens vers des tiers`,blocks:[{kind:`paragraph`,content:[`Les Services peuvent contenir des liens vers des sites ou services tiers. La présente politique s'applique uniquement à nos Services. Nous n'avons aucun contrôle sur les pratiques de confidentialité des sites ou services tiers auxquels vous accédez via des liens sur notre plateforme, et n'en sommes pas responsables.`]}]},{id:`contact-us`,title:`Nous joindre`,tocLabel:`Nous joindre`,blocks:[{kind:`paragraph`,content:[`Pour toute question, préoccupation ou demande relative à vos droits, communiquez avec nous aux coordonnées ci-dessous. Si notre réponse ne vous satisfait pas, vous pouvez vous adresser à l'autorité de protection des données compétente dans votre juridiction.`]},{kind:`privacyContactCard`}]},{id:`changes`,title:`Modifications de la présente politique`,tocLabel:`Modifications`,blocks:[{kind:`paragraph`,content:[`Nous pouvons mettre à jour la présente politique de temps à autre pour refléter des changements dans nos pratiques, la technologie, les exigences légales ou d'autres raisons opérationnelles. En cas de modifications importantes, nous mettrons à jour la date de dernière révision, aviserons l'adresse courriel de votre compte pour les changements significatifs, et afficherons un avis bien visible sur notre site ou dans l'application.`]},{kind:`paragraph`,content:[`Votre utilisation continue des Services après une mise à jour vaut acceptation de la politique révisée. Si vous n'êtes pas d'accord, vous devriez cesser d'utiliser les Services et pouvez demander la suppression de votre compte. Consultez nos `,{link:{href:`/terms`,label:`Conditions d'utilisation`}},` pour les modalités contractuelles connexes.`]},{kind:`paragraph`,content:[`La présente politique de confidentialité a été révisée et mise à jour le 8 mai 2026.`]}]}]},pDe={meta:{badgeLabel:`Legal`,title:`Terms of`,titleAccent:`Service`,subtitle:`End User License Agreement (EULA) governing your use of InstaSnag.`,effectiveDate:`May 12, 2026`,lastUpdated:`May 12, 2026`,relatedPage:{href:`/privacy`,label:`Privacy Policy`}},sections:[{id:`introduction`,title:`Introduction`,tocLabel:`Introduction`,blocks:[{kind:`paragraph`,content:[`This End User License Agreement ("Agreement") is a legal agreement between you ("you" or "User") and `,{bold:`InstaSnag`},` ("InstaSnag," "we," "us," or "our") for access to and use of the InstaSnag platform, including our website, web application, mobile application, APIs, Chrome extension, and related services (collectively, the "Service").`]},{kind:`paragraph`,content:[`By creating an account, installing our extension, or using any part of the Service, you agree to this Agreement. If you do not agree, do not use the Service.`]}]},{id:`eligibility`,title:`Eligibility and account registration`,tocLabel:`Eligibility`,blocks:[{kind:`list`,ordered:!0,items:[{content:`You must be at least 18 years old (or the age of majority in your jurisdiction) to use the Service.`},{content:`You must provide accurate and complete registration information and keep it current.`},{content:`You are responsible for all activity under your account and for keeping your login credentials secure.`},{content:`You must notify us promptly if you suspect unauthorized access to your account.`}]}]},{id:`license`,title:`License grant and access rights`,tocLabel:`License grant`,blocks:[{kind:`paragraph`,content:[`Subject to your compliance with this Agreement, InstaSnag grants you a limited, revocable, non-exclusive, non-transferable, non-sublicensable license to access and use the hosted Service and install the InstaSnag Chrome extension and mobile/web clients for your internal personal or business use.`]},{kind:`paragraph`,content:[`This is a license to use the Service, not a sale of software or transfer of ownership. We reserve all rights not expressly granted in this Agreement.`]}]},{id:`service`,title:`Service description`,tocLabel:`Service description`,blocks:[{kind:`paragraph`,content:[`InstaSnag provides tooling to monitor marketplace listings and facilitate communication workflows connected to user-configured searches and conversations.`]},{kind:`paragraph`,content:[`Depending on your subscription tier and enabled features, the Service may include:`]},{kind:`featureGrid`,items:[`Marketplace listing monitoring and alerting`,`Chrome extension integrations with supported marketplace pages`,`Conversation synchronization features`,`AI-assisted negotiation and message suggestion features`,`Push, in-app, and email notifications`,`Subscription and billing management`]},{kind:`paragraph`,content:[`The Service may evolve over time, and features may be added, modified, deprecated, or removed.`]}]},{id:`responsibilities`,title:`Acceptable use`,tocLabel:`Acceptable use`,blocks:[{kind:`paragraph`,content:[`You agree to use the Service only in compliance with applicable laws and this Agreement. You must not:`]},{kind:`list`,ordered:!0,items:[{content:`Reverse engineer, decompile, disassemble, or otherwise attempt to derive source code from any part of the Service, except where such restriction is prohibited by law.`},{content:`Copy, distribute, lease, sell, resell, sublicense, or commercially exploit the Service except as expressly authorized by us.`},{content:`Circumvent security controls, rate limits, access restrictions, or technical safeguards.`},{content:`Use bots, scripts, or automation against InstaSnag systems in ways not expressly permitted by us.`},{content:`Upload, transmit, or submit unlawful, infringing, fraudulent, abusive, or malicious content.`}
470,{content:`Use the Service in a way that disrupts our infrastructure or harms other users.`},{content:`Use data obtained through the Service for unauthorized resale, profiling, surveillance, or other prohibited secondary uses.`}]}]},{id:`third-party`,title:`Third-party platforms`,tocLabel:`Third-party platforms`,blocks:[{kind:`callout`,blocks:[{kind:`list`,ordered:!0,items:[{content:`InstaSnag is not affiliated with, endorsed by, sponsored by, or otherwise officially connected with Meta/Facebook, Kijiji, Craigslist, eBay, AutoTrader, Google, or other third-party platforms unless explicitly stated.`},{content:`You are solely responsible for your compliance with any third-party platform terms, policies, and rules when using InstaSnag with those platforms.`},{content:`We are not liable for third-party platform actions, including access restrictions, suspensions, policy enforcement, interface changes, or account penalties.`},{content:`Third-party content (including listings and messages) remains subject to third-party rights and rules.`}]}]}]},{id:`extension`,title:`Chrome extension`,tocLabel:`Chrome extension`,blocks:[{kind:`list`,ordered:!0,items:[{content:`Our extension may request browser permissions (such as storage, tabs, scripting, notifications, alarms, and identity) needed for Service functionality.`},{content:`When enabled and authorized by you, the extension may process supported marketplace page data and conversation-related data required to provide synchronization and messaging features.`},{content:`You represent and warrant that you have all rights and permissions needed for the data and actions initiated through your use of the extension.`},{content:`You must not use the extension to collect or process data in violation of law, platform terms, or this Agreement.`}]}]},{id:`ai-features`,title:`AI-assisted features`,tocLabel:`AI features`,blocks:[{kind:`list`,ordered:!0,items:[{content:`Certain features may use third-party AI services to generate suggestions, draft replies, classify conversation states, or assist negotiation workflows.`},{content:`AI outputs are probabilistic and may be inaccurate, incomplete, or inappropriate for your context.`},{content:`You are solely responsible for reviewing and approving any AI-generated content before use.`},{content:`InstaSnag does not guarantee outcomes of AI-assisted interactions, transactions, or negotiations.`}]}]},{id:`subscription`,title:`Subscription and billing`,tocLabel:`Billing`,blocks:[{kind:`list`,ordered:!0,items:[{content:`Paid features require an active subscription.`},{content:`By subscribing, you authorize recurring charges through our payment processor (such as Stripe) according to the plan you select.`},{content:`Unless otherwise stated, subscriptions automatically renew at the end of each billing cycle until canceled.`},{content:`You may cancel renewal at any time; cancellation takes effect at the end of the current paid period unless required otherwise by law.`},{content:`Fees are generally non-refundable except where required by law or expressly stated by us in writing.`},{content:`We may change pricing or plan features on a prospective basis with reasonable notice.`}]}]},{id:`privacy`,title:`Privacy and data handling`,tocLabel:`Privacy`,blocks:[{kind:`callout`,variant:`primary`,blocks:[{kind:`paragraph`,content:[`Your use of the Service is also governed by our `,{link:{href:`/privacy`,label:`Privacy Policy`}},`, which explains how we collect, use, share, retain, and protect personal information.`]},{kind:`paragraph`,content:[`In the event of a direct conflict between this Agreement and the Privacy Policy regarding legal rights and obligations, this Agreement controls to the maximum extent permitted by applicable law, except where privacy law requires otherwise.`]}]}]},{id:`intellectual-property`,title:`Intellectual property`,tocLabel:`Intellectual property`,blocks:[{kind:`list`,ordered:!0,items:[{content:`InstaSnag and its licensors retain all right, title, and interest in and to the Service, including all software, content (excluding your content), trademarks, logos, interfaces, and related intellectual property rights.`},{content:`You retain ownership of content you lawfully provide to the Service ("User Content"), but you grant us a worldwide, non-exclusive, royalty-free license to host, store, process, reproduce, and transmit User Content solely as necessary to operate, secure, and improve the Service and comply with legal obligations.`},{content:`Feedback you provide may be used by us without restriction or compensation.`}]}]},{id:`availability`,title:`Service availability`,tocLabel:`Availability`,blocks:[{kind:`list`,ordered:!0,items:[{content:`We aim to provide reliable service but do not guarantee uninterrupted or error-free operation.`},{content:`We may perform maintenance, updates, and emergency changes that affect availability.`},{content:`We may modify features, integrations, or technical requirements when reasonably necessary for security, compliance, product evolution, or third-party depen
470dency changes.`}]}]},{id:`termination`,title:`Suspension and termination`,tocLabel:`Termination`,blocks:[{kind:`paragraph`,content:[`We may suspend or terminate your access immediately, with or without notice, if you violate this Agreement or applicable law, create legal or security risk, fail to meet payment obligations, or if continued service is no longer commercially or technically feasible.`]},{kind:`subsection`,title:`Upon termination`,blocks:[{kind:`list`,items:[{content:`Your license and access rights end immediately.`},{content:`You must stop using the Service and extension.`},{content:`Data handling may continue as required by our Privacy Policy and applicable law.`}]}]}]},{id:`disclaimers`,title:`Disclaimers`,tocLabel:`Disclaimers`,variant:`muted`,blocks:[{kind:`capsuleText`,content:`THE SERVICE IS PROVIDED "AS IS" AND "AS AVAILABLE," WITHOUT WARRANTIES OF ANY KIND, WHETHER EXPRESS, IMPLIED, OR STATUTORY, INCLUDING IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, NON-INFRINGEMENT, AND TITLE.`},{kind:`paragraph`,content:[`Without limiting the above, InstaSnag does not warrant that the Service will meet all your requirements; that the Service will be uninterrupted, timely, secure, or error-free; that marketplace data, alerts, listings, or AI outputs will be complete, accurate, or current; or that defects will always be corrected.`]}]},{id:`liability`,title:`Limitation of liability`,tocLabel:`Liability`,variant:`warning`,blocks:[{kind:`capsuleText`,content:`TO THE MAXIMUM EXTENT PERMITTED BY LAW, INSTASNAG WILL NOT BE LIABLE FOR INDIRECT, INCIDENTAL, SPECIAL, CONSEQUENTIAL, EXEMPLARY, OR PUNITIVE DAMAGES, OR FOR LOST PROFITS, LOST REVENUE, LOST DATA, LOSS OF GOODWILL, OR BUSINESS INTERRUPTION.`},{kind:`paragraph`,content:[`InstaSnag's total aggregate liability arising out of or relating to the Service or this Agreement will not exceed the greater of the amounts you paid to InstaSnag for the Service in the 12 months preceding the claim, or USD $100. These limitations apply regardless of the form of action and even if a remedy fails of its essential purpose, except where prohibited by law.`]}]},{id:`indemnification`,title:`Indemnification`,tocLabel:`Indemnification`,blocks:[{kind:`paragraph`,content:[`You agree to defend, indemnify, and hold harmless InstaSnag and its affiliates, officers, directors, employees, and agents from claims, liabilities, damages, losses, and expenses (including reasonable legal fees) arising out of your misuse of the Service, violation of this Agreement, violation of law or third-party rights, or content or actions you submit through the Service.`]}]},{id:`export`,title:`Export controls`,tocLabel:`Export controls`,blocks:[{kind:`paragraph`,content:[`You represent that you are not located in, under the control of, or a national or resident of any country or territory subject to comprehensive sanctions, and you will not use the Service in violation of export control or sanctions laws.`]}]},{id:`governing-law`,title:`Governing law`,tocLabel:`Governing law`,blocks:[{kind:`paragraph`,content:[`This Agreement is governed by the laws of `,{bold:`Quebec, Canada`},`, without regard to conflict-of-law principles. Disputes arising from or relating to this Agreement will be resolved in the courts located in `,{bold:`Quebec, Canada`},`, unless mandatory law requires otherwise.`]}]},{id:`changes`,title:`Changes to this agreement`,tocLabel:`Changes`,blocks:[{kind:`paragraph`,content:[`We may update this Agreement from time to time. When we make material changes, we will update the "Last Updated" date and provide notice as required by law (for example, by in-app notice or email). Your continued use of the Service after changes take effect constitutes acceptance of the revised Agreement.`]}]},{id:`contact`,title:`Contact`,tocLabel:`Contact`,blocks:[{kind:`legalContactCard`}]},{id:`entire-agreement`,title:`Entire agreement`,tocLabel:`Entire agreement`,blocks:[{kind:`list`,ordered:!0,items:[{content:`This Agreement, together with the Privacy Policy and any plan-specific terms incorporated by reference, forms the entire agreement between you and InstaSnag regarding the Service.`}
470,{content:`If any provision is held invalid or unenforceable, the remaining provisions remain in full force and effect.`},{content:`Failure to enforce any provision is not a waiver of future enforcement rights.`}]}]}]},mDe={meta:{badgeLabel:`Mentions légales`,title:`Conditions`,titleAccent:`d'utilisation`,subtitle:`Contrat de licence utilisateur final (CLUF) régissant votre utilisation d'InstaSnag.`,effectiveDate:`12 mai 2026`,lastUpdated:`12 mai 2026`,relatedPage:{href:`/privacy`,label:`Politique de confidentialité`}},sections:[{id:`introduction`,title:`Introduction`,tocLabel:`Introduction`,blocks:[{kind:`paragraph`,content:[`Le présent contrat de licence utilisateur final (« Contrat ») est une entente juridique entre vous (« vous » ou « Utilisateur ») et `,{bold:`InstaSnag`},` (« InstaSnag », « nous ») pour l'accès et l'utilisation de la plateforme InstaSnag, y compris notre site web, application web, application mobile, API, extension Chrome et services connexes (collectivement, le « Service »).`]},{kind:`paragraph`,content:[`En créant un compte, en installant notre extension ou en utilisant une partie du Service, vous acceptez le présent Contrat. Si vous n'êtes pas d'accord, n'utilisez pas le Service.`]}]},{id:`eligibility`,title:`Admissibilité et inscription`,tocLabel:`Admissibilité`,blocks:[{kind:`list`,ordered:!0,items:[{content:`Vous devez avoir au moins 18 ans (ou l'âge de la majorité dans votre juridiction) pour utiliser le Service.`},{content:`Vous devez fournir des renseignements d'inscription exacts et complets, et les tenir à jour.`},{content:`Vous êtes responsable de toute activité effectuée sous votre compte et de la protection de vos identifiants de connexion.`},{content:`Vous devez nous aviser rapidement si vous soupçonnez un accès non autorisé à votre compte.`}]}]},{id:`license`,title:`Octroi de licence et droits d'accès`,tocLabel:`Octroi de licence`,blocks:[{kind:`paragraph`,content:[`Sous réserve du respect du présent Contrat, InstaSnag vous accorde une licence limitée, révocable, non exclusive, non transférable et non pouvant faire l'objet d'une sous-licence pour accéder au Service hébergé et installer l'extension Chrome InstaSnag ainsi que les clients mobile/web, pour votre usage personnel ou professionnel interne.`]},{kind:`paragraph`,content:[`Il s'agit d'une licence d'utilisation du Service, et non d'une vente de logiciel ni d'un transfert de propriété. Nous nous réservons tous les droits non expressément accordés dans le présent Contrat.`]}]},{id:`service`,title:`Description du Service`,tocLabel:`Description du Service`,blocks:[{kind:`paragraph`,content:[`InstaSnag fournit des outils pour surveiller les annonces de places de marché et faciliter des flux de communication liés aux recherches et conversations que vous configurez.`]},{kind:`paragraph`,content:[`Selon votre forfait d'abonnement et les fonctionnalités activées, le Service peut comprendre :`]},{kind:`featureGrid`,items:[`Surveillance des annonces et alertes`,`Intégrations d'extension Chrome avec les pages de places de marché prises en charge`,`Fonctions de synchronisation des conversations`,`Aide à la négociation et suggestions de messages par IA`,`Notifications push, dans l'application et par courriel`,`Gestion de l'abonnement et de la facturation`]},{kind:`paragraph`,content:[`Le Service peut évoluer : des fonctionnalités peuvent être ajoutées, modifiées, dépréciées ou retirées.`]}]},{id:`acceptable-use`,title:`Utilisation acceptable`,tocLabel:`Utilisation acceptable`,blocks:[{kind:`paragraph`,content:[`Vous acceptez d'utiliser le Service uniquement conformément aux lois applicables et au présent Contrat. Vous ne devez pas :`]},{kind:`list`,ordered:!0,items:[{content:`Procéder à de l'ingénierie inverse, décompiler, désassembler ou autrement tenter d'obtenir le code source d'une partie du Service, sauf lorsque cette restriction est interdite par la loi.`},{content:`Copier, distribuer, louer, vendre, revendre, sous-licencier ou exploiter commercialement le Service, sauf autorisation expresse de notre part.`},{content:`Contourner les contrôles de sécurité, les limites de débit, les restrictions d'accès ou les mesures de protection techniques.`},{content:`Utiliser des robots, scripts ou automatisations contre les systèmes InstaSnag d'une façon non expressément permise.`},{content:`Téléverser, transmettre ou soumettre du contenu illégal, contrefaisant, frauduleux, abusif ou malveillant.`},{content:`Utiliser le Service d'une façon qui perturbe notre infrastru
470cture ou nuit aux autres utilisateurs.`},{content:`Utiliser des données obtenues par le Service pour de la revente non autorisée, du profilage, de la surveillance ou d'autres usages secondaires interdits.`}]}]},{id:`third-party`,title:`Plateformes tierces`,tocLabel:`Plateformes tierces`,blocks:[{kind:`callout`,blocks:[{kind:`list`,ordered:!0,items:[{content:`InstaSnag n'est pas affilié, cautionné, commandité ni autrement officiellement lié à Meta/Facebook, Kijiji, Craigslist, eBay, AutoTrader, Google ou d'autres plateformes tierces, sauf mention explicite.`},{content:`Vous êtes seul responsable du respect des conditions, politiques et règles des plateformes tierces lorsque vous utilisez InstaSnag avec celles-ci.`},{content:`Nous ne sommes pas responsables des actions des plateformes tierces, y compris les restrictions d'accès, suspensions, application de politiques, changements d'interface ou sanctions de compte.`},{content:`Le contenu de tiers (y compris les annonces et les messages) demeure assujetti aux droits et règles de ces tiers.`}]}]}]},{id:`chrome-extension`,title:`Extension Chrome`,tocLabel:`Extension Chrome`,blocks:[{kind:`list`,ordered:!0,items:[{content:`Notre extension peut demander des permissions de navigateur (stockage, onglets, scripts, notifications, alarmes, identité) nécessaires au fonctionnement du Service.`},{content:`Lorsqu'elle est activée et autorisée par vous, l'extension peut traiter les données des pages de places de marché prises en charge et les données liées aux conversations, afin d'offrir la synchronisation et la messagerie.`},{content:`Vous déclarez et garantissez détenir tous les droits et autorisations nécessaires pour les données et actions initiées par votre utilisation de l'extension.`},{content:`Vous ne devez pas utiliser l'extension pour recueillir ou traiter des données en violation de la loi, des conditions des plateformes ou du présent Contrat.`}]}]},{id:`ai-features`,title:`Fonctionnalités assistées par IA`,tocLabel:`Fonctionnalités IA`,blocks:[{kind:`list`,ordered:!0,items:[{content:`Certaines fonctionnalités peuvent recourir à des services d'IA tiers pour générer des suggestions, rédiger des réponses, classer l'état des conversations ou aider à la négociation.`},{content:`Les résultats de l'IA sont probabilistes et peuvent être inexacts, incomplets ou inadaptés à votre contexte.`},{content:`Vous êtes seul responsable de l'examen et de l'approbation de tout contenu généré par l'IA avant utilisation.`},{content:`InstaSnag ne garantit aucun résultat des interactions, transactions ou négociations assistées par l'IA.`}]}]},{id:`billing`,title:`Abonnement et facturation`,tocLabel:`Facturation`,blocks:[{kind:`list`,ordered:!0,items:[{content:`Les fonctionnalités payantes exigent un abonnement actif.`},{content:`En vous abonnant, vous autorisez des frais récurrents par l'intermédiaire de notre processeur de paiement (p. ex. Stripe), selon le forfait choisi.`},{content:`Sauf indication contraire, les abonnements se renouvellent automatiquement à la fin de chaque cycle de facturation jusqu'à annulation.`},{content:`Vous pouvez annuler le renouvellement en tout temps ; l'annulation prend effet à la fin de la période payée en cours, sauf si la loi l'exige autrement.`},{content:`Les frais sont généralement non remboursables, sauf lorsque la loi l'exige ou que nous l'indiquons expressément par écrit.`},{content:`Nous pouvons modifier les prix ou les fonctionnalités des forfaits de façon prospective, moyennant un préavis raisonnable.`}]}]},{id:`privacy`,title:`Confidentialité et traitement des données`,tocLabel:`Confidentialité`,blocks:[{kind:`callout`,variant:`primary`,blocks:[{kind:`paragraph`,content:[`Votre utilisation du Service est également régie par notre `,{link:{href:`/privacy`,label:`Politique de confidentialité`}},`, qui explique comment nous recueillons, utilisons, communiquons, conservons et protégeons les renseignements personnels.`]},{kind:`paragraph`,content:[`En cas de conflit direct entre le présent Contrat et la Politique de confidentialité concernant les droits et obligations juridiques, le présent Contrat prévaut dans la mesure permise par la loi, sauf lorsque le droit de la protection des renseignements personnels l'exige autrement.`]}]}]},{id:`intellectual-property`,title:`Propriété intellectuelle`,tocLabel:`Propriété intellectuelle`,blocks:[{kind:`list`,ordered:!0,items:[{content:`InstaSnag et ses concédants conservent tous les droits, titres et intérêts relatifs au Service, y compris les logiciels, le contenu (à l'exclusion de votre contenu), les marques de commerce, logos, interfaces et droits de propriété intellectuelle connexes.`},{content:`Vous conservez la propriété du contenu que vous fournissez licitement au Service (« Contenu utilisateur »), mais vous nous accordez une licence mondiale, non exclusive et libre de redevances pour héberger, stocker, traiter, reproduire et transmettre le Contenu utilisateur uniquement dans la mesure nécessaire pour exploiter, sécuriser et améliorer le Service et nous conformer aux obligations légales.`},{content:`Les commentaires que vous nous fournissez peuvent être utilisés sans restriction ni compensation.`}]}]},{id:`availability`,title:`Disponibilité du Service`,tocLabel:`Disponibilité`,blocks:[{kind:`list`,ordered:!0,items:[{content:`Nous visons un service fiable, mais ne garantissons pas un fonctionnement ininterrompu ou sans erreur.`},{content:`Nous pouvons effectuer de la maintenance, des mises à jour et des changements d'urgence qui affectent la disponibilité.`},{content:`Nous pouvons modifier les fonctionnalités, intégrations ou exigences techniques lorsque c'est raisonnablement nécessaire pour la sécurité, la conformité, l'évolution du produit ou des changements chez des tiers.`}]}]},{id:`termination`,title:`Suspension et résiliation`,tocLabel:`Résiliation`,blocks:[{kind:`paragraph`,content:[`Nous pouvons suspendre ou résilier votre accès immédiatement, avec ou sans préavis, si vous violez le présent Contrat ou la loi applicable, créez un risque juridique ou de sécurité, ne respectez pas vos obligations de paiement, ou si la poursuite du service n'est plus commercialement ou techniquement réalisable.`]},{kind:`subsection`,title:`En cas de résiliation`,blocks:[{kind:`list`,items:[{content:`Votre licence et vos droits d'accès prennent fin immédiatement.`},{content:`Vous devez cesser d'utiliser le Service et l'extension.`},{content:`Le traitement des données peut se poursuivre conformément à notre Politique de confidentialité et à la loi applicable.`}]}]}]},{id:`disclaimers`,title:`Exclusions de garantie`,tocLabel:`Exclusions de garantie`,variant:`muted`,blocks:[{kind:`capsuleText`,content:`LE SERVICE EST FOURNI « TEL QUEL » ET « SELON LA DISPONIBILITà », SANS GARANTIE D'AUCUNE SORTE, EXPRESSE, IMPLICITE OU LÃGALE, Y COMPRIS LES GARANTIES IMPLICITES DE QUALITà MARCHANDE, D'ADÃQUATION à UN USAGE PARTICULIER, D'ABSENCE DE CONTREFAÃON ET DE TITRE.`},{kind:`paragraph`,content:[`Sans limiter ce qui précède, InstaSnag ne garantit pas que le Service répondra à tous vos besoins ; qu'il sera ininterrompu, opportun, sécurisé ou sans erreur ; que les données de places de marché, alertes, annonces ou résultats d'IA seront complets, exacts ou à jour ; ni que les défauts seront toujours corrigés.`]}]},{id:`liability`,title:`Limitation de responsabilité`,tocLabel:`Responsabilité`,variant:`warning`,blocks:[{kind:`capsuleText`,content:`DANS LA MESURE MAXIMALE PERMISE PAR LA LOI, INSTASNAG NE SERA PAS RESPONSABLE DES DOMMAGES INDIRECTS, ACCESSOIRES, SPÃCIAUX, CONSÃCUTIFS, EXEMPLAIRES OU PUNITIFS, NI DES PERTES DE PROFITS, DE REVENUS, DE DONNÃES, D'ACHALANDAGE OU D'INTERRUPTION D'ACTIVITÃS.`},{kind:`paragraph`,content:[`La responsabilité totale d'InstaSnag découlant du Service ou du présent Contrat ne dépassera pas le plus élevé des montants que vous avez versés à InstaSnag pour le Service au cours des 12 mois précédant la réclamation, ou 100 $ US. Ces limitations s'appliquent quel que soit le fondement de l'action et même si un recours n'atteint pas son objectif essentiel, sauf lorsque la loi l'interdit.`]}]},{id:`indemnification`,title:`Indemnisation`,tocLabel:`Indemnisation`,blocks:[{kind:`paragraph`,content:[`Vous acceptez de défendre, d'indemniser et de tenir à couvert InstaSnag ainsi que ses sociétés affiliées, dirigeants, administrateurs, employés et mandataires contre les réclamations, responsabilités, dommages, pertes et frais (y compris les honoraires d'avocats raisonnables) découlant de votre mauvaise utilisation du Service, de la violation du présent Contrat, de la violation de la loi ou de droits de tiers, ou du contenu ou des actions que vous soumettez par le Service.`]}]}
470,{id:`export`,title:`Contrôles à l'exportation`,tocLabel:`Contrôles à l'exportation`,blocks:[{kind:`paragraph`,content:[`Vous déclarez ne pas être situé dans un pays ou territoire visé par des sanctions globales, ni sous le contrôle d'un tel pays, ni en être un ressortissant ou résident, et vous n'utiliserez pas le Service en violation des lois sur le contrôle des exportations ou les sanctions.`]}]},{id:`governing-law`,title:`Droit applicable`,tocLabel:`Droit applicable`,blocks:[{kind:`paragraph`,content:[`Le présent Contrat est régi par les lois du `,{bold:`Québec, Canada`},`, sans égard aux règles de conflit de lois. Les litiges découlant du présent Contrat ou s'y rapportant seront tranchés par les tribunaux situés au `,{bold:`Québec, Canada`},`, sauf si une loi impérative l'exige autrement.`]}]},{id:`changes`,title:`Modifications du présent Contrat`,tocLabel:`Modifications`,blocks:[{kind:`paragraph`,content:[`Nous pouvons mettre à jour le présent Contrat de temps à autre. En cas de modifications importantes, nous mettrons à jour la date de « Dernière mise à jour » et fournirons un avis tel que requis par la loi (par exemple, un avis dans l'application ou par courriel). Votre utilisation continue du Service après l'entrée en vigueur des modifications constitue l'acceptation du Contrat révisé.`]}]},{id:`contact`,title:`Nous joindre`,tocLabel:`Nous joindre`,blocks:[{kind:`legalContactCard`}]},{id:`entire-agreement`,title:`Intégralité de l'entente`,tocLabel:`Intégralité de l'entente`,blocks:[{kind:`list`,ordered:!0,items:[{content:`Le présent Contrat, conjointement avec la Politique de confidentialité et toute modalité propre à un forfait intégrée par renvoi, constitue l'entente intégrale entre vous et InstaSnag concernant le Service.`},{content:`Si une disposition est déclarée invalide ou inapplicable, les autres dispositions demeurent pleinement en vigueur.`},{content:`Le défaut d'appliquer une disposition ne constitue pas une renonciation aux droits d'application futurs.`}]}]}]};function hDe(e){return e===`fr`?fDe:dDe}function gDe(e){return e===`fr`?mDe:pDe}function _De(){let{locale:e}=py();return(0,V.jsx)(E9,{config:gDe(e),badgeIcon:(0,V.jsx)(VA,{size:16})})}var vDe={facebook:`Facebook Marketplace`,ebay:`eBay`,kijiji:`Kijiji`,autotrader:`AutoTrader`,craigslist:`Craigslist`,offerup:`OfferUp`,amazon:`Amazon`};function D9(e){return e?.trim()?vDe[e.trim().toLowerCase()]??e.replace(/_/g,` `).replace(/\b\w/g,e=>e.toUpperCase()):`Marketplace`}function yDe(e){return e?.trim()?`View on ${D9(e)}`:`View listing`}function bDe(e){return e.price==null?`Price not listed`:`${e.currency_symbol||`$`}${e.price.toLocaleString(void 0,{maximumFractionDigits:0})}`}function O9(){return(0,V.jsxs)(`div`,{className:`pointer-events-none absolute inset-0 overflow-hidden`,"aria-hidden":!0,children:[(0,V.jsx)(`div`,{className:`absolute -left-40 -top-10 h-[500px] w-[500px] animate-float-slow rounded-full bg-primary/8 blur-3xl`}),(0,V.jsx)(`div`,{className:`absolute -right-32 top-1/4 h-[400px] w-[400px] animate-float-slower rounded-full bg-sky-500/8 blur-3xl dark:bg-sky-400/5`}),(0,V.jsx)(`div`,{className:`absolute bottom-0 left-1/2 h-64 w-[70%] -translate-x-1/2 rounded-full bg-primary/5 blur-3xl`})]})}function xDe({isAuthenticated:e}){return(0,V.jsxs)(`div`,{className:`relative overflow-hidden rounded-2xl border border-primary/20 bg-gradient-to-br from-primary/10 via-surface-elevated to-surface p-6 shadow-lg shadow-black/5 sm:p-8`,children:[(0,V.jsx)(`div`,{className:`pointer-events-none absolute -right-8 -top-8 h-40 w-40 animate-pulse-glow rounded-full bg-primary/20 blur-3xl`,"aria-hidden":!0}),(0,V.jsxs)(`div`,{className:`relative flex flex-col gap-6 md:flex-row md:items-center md:justify-between`,children:[(0,V.jsxs)(`div`,{className:`max-w-xl`,children:[(0,V.jsxs)(`div`,{className:`mb-3 inline-flex items-center gap-2 rounded-full border border-primary/30 bg-primary/10 px-3 py-1 text-[11px] font-bold uppercase tracking-wider text-primary`,children:[(0,V.jsx)(ej,{size:13,"aria-hidden":!0}),e?`InstaSnag member`:`Never miss a deal`]}),(0,V.jsx)(`h2`,{className:`text-xl font-black tracking-tight text-foreground sm:text-2xl`,children:e?`Track more deals like this`:`Get alerts when listings like this appear`}),(0,V.jsx)(`p`,{className:`mt-2 text-sm leading-relaxed text-muted-foreground`,children:e?`Your dashboard has live matches, favorites, and marketplace alerts across Facebook, Kijiji, and more.`:`InstaSnag sends alerts the moment a match hits â before everyone else sees it.`}),e?null:(0,V.jsxs)(`ul`,{className:`mt-4 grid gap-2 sm:grid-cols-2`,children:[(0,V.jsxs)(`li`,{className:`flex items-center gap-2 text-sm text-muted-foreground`,children:[(0,V.jsx)(UA,{size:15,className:`shrink-0 text-primary`}),`Custom saved searches`]}),(0,V.jsxs)(`li`,{className:`flex items-center gap-2 text-sm text-muted-foreground`,children:[(0,V.jsx)(Ek,{size:15,className:`shrink-0 text-primary`}),`Instant deal alerts`]})]})]}),(0,V.jsx)(`div`,{className:`flex shrink-0 flex-col gap-3 md:flex-row`,children:e?(0,V.jsxs)(zi,{to:`/dashboard/feed`,className:`inline-flex items-center justify-center gap-2 rounded-xl bg-primary px-6 py-3 text-sm font-bold text-primary-foreground shadow-lg shadow-primary/25 transition-all hover:bg-primary-hover hover:shadow-
470primary/30`,children:[(0,V.jsx)(mA,{size:17,"aria-hidden":!0}),`Go to dashboard`]}):(0,V.jsxs)(V.Fragment,{children:[(0,V.jsxs)(zi,{to:`/auth/signup`,className:`inline-flex items-center justify-center gap-2 rounded-xl bg-primary px-6 py-3 text-sm font-bold text-primary-foreground shadow-lg shadow-primary/25 transition-all hover:bg-primary-hover hover:shadow-primary/30`,children:[`Start free trial`,(0,V.jsx)(xk,{size:17,"aria-hidden":!0})]}),(0,V.jsx)(zi,{to:`/features`,className:`inline-flex items-center justify-center rounded-xl border border-border bg-surface/80 px-6 py-3 text-sm font-semibold text-foreground transition-colors hover:bg-surface-hover`,children:`See how it works`})]})})]})]})}function k9({title:e,description:t,icon:n,isAuthenticated:r,pageTitle:i,onRetry:a}){return(0,V.jsxs)(V.Fragment,{children:[(0,V.jsxs)(so,{children:[(0,V.jsxs)(`title`,{children:[i,` | InstaSnag`]}),(0,V.jsx)(`meta`,{name:`robots`,content:`noindex`})]}),(0,V.jsxs)(`div`,{className:`relative w-full`,children:[(0,V.jsx)(O9,{}),(0,V.jsx)(`div`,{className:`relative mx-auto w-full max-w-[1400px] px-4 py-10 sm:px-6 sm:py-14 lg:px-8 lg:py-16`,children:(0,V.jsxs)(`div`,{className:`mx-auto max-w-lg rounded-2xl border border-border/40 bg-surface/30 p-6 text-center shadow-sm backdrop-blur-sm sm:p-8`,children:[(0,V.jsx)(`div`,{className:`mx-auto mb-5 flex h-14 w-14 items-center justify-center rounded-2xl border border-border/40 bg-surface/50 text-muted-foreground`,children:n}),(0,V.jsx)(`h1`,{className:`text-2xl font-black tracking-tight text-foreground sm:text-3xl`,children:e}),(0,V.jsx)(`p`,{className:`mt-3 text-sm leading-relaxed text-muted-foreground sm:text-base`,children:t}),(0,V.jsxs)(`div`,{className:`mt-6 flex flex-col gap-2.5 md:flex-row md:flex-wrap md:justify-center`,children:[a?(0,V.jsxs)(`button`,{type:`button`,onClick:a,className:`inline-flex h-11 items-center justify-center gap-2 rounded-xl bg-primary px-5 text-sm font-semibold text-primary-foreground transition-all hover:bg-primary-hover active:scale-[0.98]`,children:[(0,V.jsx)(zA,{size:16,"aria-hidden":!0}),`Try again`]}):null,r?(0,V.jsxs)(zi,{to:`/dashboard/feed`,className:`inline-flex h-11 items-center justify-center gap-2 rounded-xl px-5 text-sm font-semibold transition-all active:scale-[0.98] ${a?`border border-border/50 bg-surface-elevated/50 text-foreground hover:bg-surface-hover`:`bg-primary text-primary-foreground hover:bg-primary-hover`}`,children:[(0,V.jsx)(mA,{size:16,"aria-hidden":!0}),`Go to dashboard`]}):(0,V.jsxs)(zi,{to:`/auth/signup`,className:`inline-flex h-11 items-center justify-center gap-2 rounded-xl px-5 text-sm font-semibold transition-all active:scale-[0.98] ${a?`border border-primary/30 bg-primary/10 text-primary hover:bg-primary/15`:`bg-primary text-primary-foreground hover:bg-primary-hover`}`,children:[`Start free trial`,(0,V.jsx)(xk,{size:16,"aria-hidden":!0})]}),(0,V.jsx)(zi,{to:`/`,className:`inline-flex h-11 items-center justify-center rounded-xl border border-border/50 bg-surface-elevated/50 px-5 text-sm font-semibold text-foreground transition-colors hover:bg-surface-hover active:scale-[0.98]`,children:`Back to home`})]})]})})]})]})}function A9(e){if(!e)return``;let t=document.createElement(`textarea`);return t.innerHTML=e,t.value}function SDe(e){if(!e?.trim())return`P`;let t=e.trim().toLowerCase();return t===`kijiji`?`K`:t===`autotrader`?`AT`:`P`}function CDe({listing:e,unit:t}){let n=[{icon:Mk,label:`Year`,value:e.year?.toString()},{icon:nA,label:`Mileage`,value:iM(e.mileage,t)},{icon:Wk,label:`Transmission`,value:bF(e.transmission_type)},{icon:$k,label:`Fuel`,value:yF(e.fuel_type)},{icon:jA,label:`Exterior`,value:SF(e.exterior_color)},{icon:jA,label:`Interior`,value:SF(e.interior_color)},{icon:JA,label:`Condition`,value:xF(e.condition)}].filter(e=>e.value);return n.length===0?null:(0,V.jsxs)(`div`,{className:`order-4 min-w-0 rounded-2xl border border-border/40 bg-surface/30 p-5 sm:p-6 lg:col-start-1`,children:[(0,V.jsx)(`h2`,{className:`mb-4 text-xs font-bold uppercase tracking-wider text-muted-foreground`,children:`Specifications`}),(0,V.jsx)(`div`,{className:`grid grid-cols-2 gap-3 sm:grid-cols-4`,children:n.map(e=>(0,V.jsxs)(`div`,{className:`flex items-center gap-2.5 rounded-xl border border-border/40 bg-surface/50 px-3 py-2.5`,children:[(0,V.jsx)(e.icon,{size:16,className:`shrink-0 text-primary/70`}),(0,V.jsxs)(`div`,{className:`min-w-0`,children:[(0,V.jsx)(`div`,{className:`text-[10px] font-semibold uppercase tracking-wider text-muted-foreground
470/60`,children:e.label}),(0,V.jsx)(`div`,{className:`truncate text-sm font-semibold text-foreground`,children:e.value})]})]},e.label))})]})}function wDe({description:e,isExpanded:t,onToggleExpanded:n}){return(0,V.jsxs)(`div`,{className:`order-6 min-w-0 rounded-2xl border border-border/40 bg-surface/30 p-5 sm:p-6 lg:col-start-1`,children:[(0,V.jsx)(`h2`,{className:`mb-3 text-xs font-bold uppercase tracking-wider text-muted-foreground`,children:`Description`}),(0,V.jsx)(`p`,{className:`whitespace-pre-wrap text-sm leading-relaxed text-muted-foreground/90 transition-all duration-300 ${t?``:`line-clamp-5`}`,children:A9(e)}),e.length>300?(0,V.jsx)(`button`,{type:`button`,onClick:n,className:`mt-3 flex items-center gap-1.5 text-xs font-semibold text-primary transition-colors hover:text-primary-hover`,children:t?(0,V.jsxs)(V.Fragment,{children:[(0,V.jsx)(zk,{size:14}),`Show less`]}):(0,V.jsxs)(V.Fragment,{children:[(0,V.jsx)(Ik,{size:14}),`Show more`]})}):null]})}function TDe({listing:e,isAuthenticated:t,locationLine:n}){return(0,V.jsxs)(`div`,{className:`lg:rounded-2xl lg:border lg:border-border/50 lg:bg-surface/50 lg:p-5 lg:backdrop-blur-sm`,children:[(0,V.jsxs)(`div`,{className:`hidden lg:block`,children:[uF(e.marketplace_status)?(0,V.jsx)(`div`,{className:`mb-2 flex justify-start`,children:(0,V.jsx)(dF,{status:e.marketplace_status})}):null,(0,V.jsx)(`h1`,{className:`text-xl font-bold leading-snug text-foreground sm:text-2xl`,children:A9(e.title)||`Untitled listing`}),n?(0,V.jsxs)(`div`,{className:`mt-1.5 flex items-center gap-1.5 text-sm text-muted-foreground`,children:[(0,V.jsx)(xA,{size:14,className:`shrink-0 text-primary`}),n]}):null,(0,V.jsx)(`div`,{className:`mt-4`,children:(0,V.jsxs)(`span`,{className:`text-3xl font-extrabold tracking-tight text-foreground`,children:[e.currency_symbol||`$`,e.price?.toLocaleString()??`â`]})})]}),(0,V.jsxs)(`div`,{className:`space-y-2.5 lg:mt-5`,children:[e.url?(0,V.jsxs)(`a`,{href:e.url,target:`_blank`,rel:`noopener noreferrer`,className:`flex h-11 w-full items-center justify-center gap-2 rounded-xl bg-primary px-4 text-sm font-semibold text-primary-foreground transition-all hover:bg-primary-hover active:scale-[0.98]`,children:[(0,V.jsx)(Zk,{size:16,"aria-hidden":!0}),yDe(e.provider)]}):(0,V.jsx)(`div`,{className:`flex h-11 w-full items-center justify-center rounded-xl bg-surface-elevated text-sm text-muted-foreground`,children:`Link unavailable`}),t?(0,V.jsxs)(zi,{to:`/dashboard/feed`,className:`flex h-11 w-full items-center justify-center gap-2 rounded-xl border border-border/50 bg-surface-elevated/50 px-4 text-sm font-semibold text-foreground transition-colors hover:bg-surface-hover active:scale-[0.98]`,children:[(0,V.jsx)(mA,{size:16,"aria-hidden":!0}),`Go to dashboard`]}):(0,V.jsxs)(V.Fragment,{children:[(0,V.jsxs)(zi,{to:`/auth/signup`,className:`flex h-11 w-full items-center justify-center gap-2 rounded-xl border border-primary/30 bg-primary/10 px-4 text-sm font-semibold text-primary transition-all hover:bg-primary/15 active:scale-[0.98]`,children:[`Start free â get deal alerts`,(0,V.jsx)(Ck,{size:16,"aria-hidden":!0})]}),(0,V.jsx)(zi,{to:`/features`,className:`flex h-11 w-full items-center justify-center rounded-xl border border-border/50 bg-surface-elevated/50 px-4 text-sm font-semibold text-foreground transition-colors hover:bg-surface-hover active:scale-[0.98]`,children:`See how it works`})]})]})]})}function EDe({listing:e,locationLine:t}){return(0,V.jsxs)(`div`,{className:`order-2 min-w-0 lg:col-start-1 lg:hidden`,children:[uF(e.marketplace_status)?(0,V.jsx)(`div`,{className:`mb-2 flex justify-start`,children:(0,V.jsx)(dF,{status:e.marketplace_status})}):null,(0,V.jsx)(`h1`,{className:`text-2xl font-bold leading-tight text-foreground sm:text-3xl`,children:A9(e.title)||`Untitled listing`}),t?(0,V.jsxs)(`div`,{className:`mt-1.5 flex items-center gap-1.5 text-sm text-muted-foreground`,children:[(0,V.jsx)(xA,{size:14,className:`shrink-0 text-primary`}),t]}):null,(0,V.jsxs)(`div`,{className:`mt-3 text-3xl font-extrabold tracking-tight text-foreground`,children:[e.currency_symbol||`$`,e.price?.toLocaleStr
470ing()??`â`]})]})}function DDe({listing:e,isAuthenticated:t}){let n=Qj(),r=(0,b.useMemo)(()=>mF(e.images),[e.images]),[i,a]=(0,b.useState)(0),[o,s]=(0,b.useState)(!1),c=Uz(e.provider),l=D9(e.provider),u=(0,b.useMemo)(()=>gF(e,n),[e,n]),d=bDe(e),f=e.description?`lg:row-span-3`:`lg:row-span-2`,p=e.title?`${d} · ${e.title} | InstaSnag`:`Shared listing | InstaSnag`,m=[e.location_label,l,e.title].filter(Boolean).join(` · `)||`View this marketplace listing shared via InstaSnag.`,h=e.primary_image_url??void 0,g=XM(window.location.pathname);return(0,V.jsxs)(V.Fragment,{children:[(0,V.jsxs)(so,{children:[(0,V.jsx)(`title`,{children:p}),(0,V.jsx)(`meta`,{name:`description`,content:m}),(0,V.jsx)(`meta`,{property:`og:title`,content:p}),(0,V.jsx)(`meta`,{property:`og:description`,content:m}),(0,V.jsx)(`meta`,{property:`og:type`,content:`website`}),(0,V.jsx)(`meta`,{property:`og:url`,content:g}),h?(0,V.jsx)(`meta`,{property:`og:image`,content:h}):null,(0,V.jsx)(`meta`,{name:`twitter:card`,content:`summary_large_image`}),(0,V.jsx)(`meta`,{name:`twitter:title`,content:p}),(0,V.jsx)(`meta`,{name:`twitter:description`,content:m}),h?(0,V.jsx)(`meta`,{name:`twitter:image`,content:h}):null,(0,V.jsx)(`link`,{rel:`canonical`,href:g})]}),(0,V.jsxs)(`div`,{className:`relative w-full`,children:[(0,V.jsx)(O9,{}),(0,V.jsxs)(`div`,{className:`relative mx-auto w-full max-w-[1400px] px-4 py-6 sm:px-6 lg:px-8 lg:py-8`,children:[(0,V.jsxs)(`div`,{className:`flex flex-col gap-6 lg:grid lg:grid-cols-[1fr_380px] lg:items-start lg:gap-x-8 lg:gap-y-6 xl:gap-x-10`,children:[(0,V.jsx)(wF,{className:`order-1 min-w-0 lg:col-start-1`,imageUrls:r,imageIndex:i,onIndexChange:a,providerIconSrc:c,providerBadgeText:SDe(e.provider),showProviderBadge:!!e.provider,variant:`fullBleed`}),(0,V.jsx)(EDe,{listing:e,locationLine:u}),(0,V.jsx)(`aside`,{className:`order-3 w-full min-w-0 lg:order-3 lg:col-start-2 lg:row-start-1 lg:sticky lg:top-[calc(4rem+1.5rem)] lg:self-start ${f}`,children:(0,V.jsx)(ik.div,{initial:{opacity:0}
470,animate:{opacity:1},transition:{duration:.45,delay:.1},children:(0,V.jsx)(TDe,{listing:e,isAuthenticated:t,locationLine:u})})}),(0,V.jsx)(CDe,{listing:e,unit:n}),e.description?(0,V.jsx)(wDe,{description:e.description,isExpanded:o,onToggleExpanded:()=>s(e=>!e)}):null]}),(0,V.jsx)(`div`,{className:`mt-10 pb-8 lg:mt-12`,children:(0,V.jsx)(xDe,{isAuthenticated:t})})]})]})]})}function j9({className:e}){return(0,V.jsx)(`div`,{className:`animate-pulse rounded-xl bg-surface-elevated ${e??``}`})}function ODe(){return(0,V.jsxs)(`div`,{className:`relative mx-auto w-full max-w-[1400px] px-4 py-6 sm:px-6 lg:px-8 lg:py-8`,children:[(0,V.jsx)(O9,{}),(0,V.jsxs)(`div`,{className:`relative flex flex-col gap-6 lg:grid lg:grid-cols-[1fr_380px] lg:items-start lg:gap-x-8 lg:gap-y-6 xl:gap-x-10`,children:[(0,V.jsx)(j9,{className:`order-1 aspect-[16/10] w-full -mx-4 -mt-6 rounded-none sm:-mx-6 md:mx-0 md:mt-0 md:rounded-2xl lg:col-start-1`}),(0,V.jsxs)(`div`,{className:`order-2 space-y-5 lg:order-3 lg:col-start-2 lg:row-start-1 lg:row-span-2`,children:[(0,V.jsx)(j9,{className:`h-72 rounded-2xl`}),(0,V.jsx)(j9,{className:`hidden h-12 rounded-xl lg:block`}),(0,V.jsx)(j9,{className:`hidden h-12 rounded-xl lg:block`})]}),(0,V.jsxs)(`div`,{className:`order-3 space-y-6 lg:order-4 lg:col-start-1`,children:[(0,V.jsxs)(`div`,{className:`rounded-2xl border border-border/40 bg-surface/30 p-5 sm:p-6`,children:[(0,V.jsx)(j9,{className:`mb-4 h-4 w-28`}),(0,V.jsx)(`div`,{className:`grid grid-cols-2 gap-3 sm:grid-cols-4`,children:Array.from({length:4}).map((e,t)=>(0,V.jsx)(j9,{className:`h-14 rounded-xl`},t))})]}),(0,V.jsx)(j9,{className:`h-40 rounded-2xl`})]})]})]})}function kDe(){let{token:e}=ur(),{isAuthenticated:t}=Jv(),[n,r]=(0,b.useState)(`loading`),[i,a]=(0,b.useState)(null),[o,s]=(0,b.useState)(``),c=(0,b.useCallback)(async()=>{if(!e?.trim()){r(`invalid`);return}r(`loading`),s(``);try{a(await Qs(e)),r(`ready`)}catch(e){if(e instanceof Zs){if(e.kind===`expired`){r(`expired`),s(e.message);return}if(e.kind===`invalid`){r(`invalid`),s(e.message);return}if(e.kind===`not_found`){r(`not_found`),s(e.message);return}}r(`error`),s(e instanceof Error?e.message:`Unable to load this listing.`)}},[e]);return(0,b.useEffect)(()=>{let e=window.setTimeout(()=>{c()},0);return()=>window.clearTimeout(e)},[c]),n===`loading`?(0,V.jsx)(ODe,{}):n===`expired`?(0,V.jsx)(k9,{pageTitle:`Link expired`,title:`Link expired`,description:o||`This share link is no longer valid. Ask the sender for a new link, or start tracking deals on InstaSnag.`,icon:(0,V.jsx)(Uk,{size:28,strokeWidth:1.75}),isAuthenticated:t}):n===`invalid`?(0,V.jsx)(k9,{pageTitle:`Invalid link`,title:`Invalid link`,description:o||`We couldn't read this share link. It may be incomplete or corrupted.`,icon:(0,V.jsx)(gA,{size:28,strokeWidth:1.75}),isAuthenticated:t}):n===`not_found`?(0,V.jsx)(k9,{pageTitle:`Listing unavailable`,title:`Listing unavailable`,description:o||`This listing may have been removed or is no longer available.`,icon:(0,V.jsx)(lA,{size:28,strokeWidth:1.75}),isAuthenticated:t}):n===`error`?(0,V.jsx)(k9,{pageTitle:`Something went wrong`,title:`Something went wrong`,description:o||`Unable to load this listing right now. Please try again.`,icon:(0,V.jsx)(lA,{size:28,strokeWidth:1.75}),isAuthenticated:t,onRetry:()=>void c()}):i?(0,V.jsx)(DDe,{listing:i,isAuthenticated:t},i.id):null}var ADe=new Set([`email_already_verified`,`verification_token_used`]);function jDe(e,t){if(e instanceof ho){let t=e.details?.error;if(typeof t==`string`&&ADe.has(t))return{kind:`success`};if(e.message.trim())return{kind:`error`,message:e.message}}return e instanceof go?{kind:`error`,message:t(`verifyEmail.networkFailure`)}:e instanceof _o?{kind:`error`,message:t(`verifyEmail.timeoutFailure`)}:{kind:`error`,message:t(`verifyEmail.genericFailure`)}}function MDe(){let e=my(),[t]=qi(),n=or(),{isAuthenticated:r,refreshUser:i}=Jv(),a=t.get(`token`)?.trim()??``,o=(0,b.useRef)(r),s=(0,b.useRef)(i),c=(0,b.useRef)(e),[l,u]=(0,b.useState)(()=>a?{kind:`verifying`}:{kind:`error`,message:e(`verifyEmail.missingToken`)});return(0,b.useEffect)(()=>{o.current=r,s.current=i,c.current=e},[r,i,e]),(0,b.useEffect)(()=>
470{if(!a)return;let e=!1;return(async()=>{try{if(await Gv.validateEmailVerificationToken(a),e)return;if(u({kind:`success`}),o.current)try{await s.current()}catch{}}catch(t){if(e)return;let n=jDe(t,c.current);if(u(n),n.kind===`success`&&o.current)try{await s.current()}catch{}}})(),()=>{e=!0}},[a]),(0,V.jsx)(`div`,{className:`flex min-h-[70vh] items-center justify-center px-4 py-16`,children:(0,V.jsxs)(`div`,{className:`w-full max-w-md rounded-[1.75rem] border border-border bg-surface p-8 text-center shadow-xl`,children:[l.kind===`verifying`?(0,V.jsxs)(V.Fragment,{children:[(0,V.jsx)(_A,{className:`mx-auto h-10 w-10 animate-spin text-primary`}),(0,V.jsx)(`h1`,{className:`mt-5 text-xl font-extrabold text-foreground`,children:e(`verifyEmail.verifying`)}),(0,V.jsx)(`p`,{className:`mt-2 text-sm text-muted-foreground`,children:e(`verifyEmail.verifyingHint`)})]}):null,l.kind===`success`?(0,V.jsxs)(V.Fragment,{children:[(0,V.jsx)(Vk,{className:`mx-auto h-10 w-10 text-success`}),(0,V.jsx)(`h1`,{className:`mt-5 text-xl font-extrabold text-foreground`,children:e(`verifyEmail.success`)}),(0,V.jsx)(`p`,{className:`mt-2 text-sm text-muted-foreground`,children:e(r?`verifyEmail.successSignedIn`:`verifyEmail.successSignedOut`)}),(0,V.jsx)(`button`,{type:`button`,onClick:()=>n(r?`/dashboard`:`/auth`),className:`mt-6 w-full rounded-2xl bg-primary py-3.5 text-base font-extrabold text-primary-foreground transition-all hover:bg-primary-hover active:scale-[0.98]`,children:e(r?`common.continue`:`common.signIn`)})]}):null,l.kind===`error`?(0,V.jsxs)(V.Fragment,{children:[(0,V.jsx)(xae,{className:`mx-auto h-10 w-10 text-error`}),(0,V.jsx)(`h1`,{className:`mt-5 text-xl font-extrabold text-foreground`,children:e(`verifyEmail.failed`)}),(0,V.jsx)(`p`,{className:`mt-2 text-sm text-muted-foreground`,children:l.message}),(0,V.jsx)(zi,{to:`/auth`,className:`mt-6 inline-flex w-full items-center justify-center rounded-2xl border border-border py-3.5 text-base font-bold text-foreground transition-all hover:bg-surface-elevated`,children:e(`verifyEmail.goToSignIn`)})]}):null]})})}function NDe(){let{locale:e}=py();return(0,V.jsx)(E9,{config:hDe(e),badgeIcon:(0,V.jsx)(vA,{size:16})})}var PDe=`/assets/instasnag-customer-testimonial-electronics-buyer-CJU5_CzF.webp`,FDe=`/assets/instasnag-customer-testimonial-furniture-flipper-C4LOhJNm.webp`,IDe=`/assets/instasnag-customer-testimonial-private-seller-CYzmQC_4.webp`,M9=`oauth_nonce`,N9=`oauth_nonce_fallback`,P9=()=>(0,V.jsxs)(`svg`,{viewBox:`0 0 24 24`,className:`h-5 w-5 shrink-0`,fill:`none`,stroke:`currentColor`,strokeWidth:`1.8`,children:[(0,V.jsx)(`circle`,{cx:`12`,cy:`8`,r:`4`}),(0,V.jsx)(`path`,{d:`M4 20c0-4 3.6-7 8-7s8 3 8 7`})]}),F9=()=>(0,V.jsxs)(`svg`,{viewBox:`0 0 24 24`,className:`h-5 w-5 shrink-0`,fill:`none`,stroke:`currentColor`,strokeWidth:`1.8`,children:[(0,V.jsx)(`rect`,{x:`5`,y:`11`,width:`14`,height:`10`,rx:`2`}),(0,V.jsx)(`path`,{d:`M8 11V7a4 4 0 0 1 8 0v4`}),(0,V.jsx)(`circle`,{cx:`12`,cy:`16`,r:`1`,fill:`currentColor`})]}),LDe=()=>(0,V.jsxs)(`svg`,{viewBox:`0 0 24 24`,className:`h-5 w-5 shrink-0`,fill:`none`,stroke:`currentColor`,strokeWidth:`1.8`,children:[(0,V.jsx)(`rect`,{x:`2`,y:`4`,width:`20`,height:`16`,rx:`2`}),(0,V.jsx)(`path`,{d:`m2 7 10 7 10-7`})]}),I9=()=>(0,V.jsxs)(`svg`,{viewBox:`0 0 24 24`,className:`h-5 w-5 shrink-0`,fill:`none`,stroke:`currentColor`,strokeWidth:`1.8`,strokeLinecap:`round`,strokeLinejoin:`round`,children:[(0,V.jsx)(`path`,{d:`M2 12s4-7 10-7 10 7 10 7-4 7-10 7-10-7-10-7z`}),(0,V.jsx)(`circle`,{cx:`12`,cy:`12`,r:`3`})]}),L9=()=>(0,V.jsxs)(`svg`,{viewBox:`0 0 24 24`,className:`h-5 w-5 shrink-0`,fill:`none`,stroke:`currentColor`,strokeWidth:`1.8`,strokeLinecap:`round`,strokeLinejoin:`round`,children:[(0,V.jsx)(`path`,{d:`M17.94 17.94A10.07 10.07 0 0112 20c-7 0-11-8-11-8a18.45 18.45 0 015.06-5M9.9 4.24A9.12 9.12 0 0112 4c7 0 11 8 11 8a18.5 18.5 0 01-2.16 3.19m-6.72-1.07a3 3 0 11-4.24-4.24`}),(0,V.jsx)(`path`,{d:`M1 1l22 22`})]}),R9=()=>(0,V.jsxs)(`svg`,{viewBox:`0 0 24 24`,className:`h-5 w-5 shrink-0`,"aria-hidden":!0,children:[(0,V.jsx)(`path`,{fill:`#4285F4`,d:`M22.56 12.25c0-.78-.07-1.53-.2-2.25H12v4.26h5.92c-.26 1.37-1.04 2.53-2.21 3.31v2.77h3.57c2.08-1.92 3.28-4.74 3.28-8.09z`}),(0,V.jsx)(`path`,{fill:`#34A853`,d:`M12 23c2.97 0 5.46-.98 7.28-2.66l-3.57-2.77c-.98.66-2.23 1.06-3.71 1.06-2.86 0-5.29-1.93-6.16-4.53H2.18v2.84C3.99 20.53 7.7 23 12 23z`}),(0,V.jsx)(`path`,{fill:`#FBBC05`,d:`M5.84 14.09c-.22-.66-.35-1.36-.35-2.09s.13-1.43.35-2.09V7.07H2.18C1.43 8.55 1 10.22 1 12s.43 3.45 1.18 4.93l2.85-2.22.81-.62z`}),(0,V.jsx)(`path`,{fill:`#EA4335`,d:`M12 5.38c1.62 0 3.06.56 4.21 1.64l3.15-3.15C17.45 2.09 14.97 1 12 1 7.7 1 3.99 3.47 2.18 7.07l3.66 2.84c.87-2.6 3.3-4.53 6.16-4.53z`})]});function z9({password:e}){let t={minLength:e.length>=8,uppercase:/[A-Z]/.test(e),lowercase:/[a-z]/.test(e),number:/\d/.test(e),special:/[^A-Za-z0-9]/.test(e)}
470,n=Object.values(t).filter(Boolean).length/5,r=n<.4?`text-error`:n<1?`text-warning`:`text-success`,i=n<.4?`bg-error`:n<1?`bg-warning`:`bg-success`,a=n<.4?`Weak`:n<1?`Medium`:`Strong`,o=[{label:`At least 8 characters`,met:t.minLength},{label:`Contains uppercase letter`,met:t.uppercase},{label:`Contains lowercase letter`,met:t.lowercase},{label:`Contains a number`,met:t.number},{label:`Contains special character`,met:t.special}];return(0,V.jsxs)(`div`,{className:`space-y-2 rounded-xl border border-border bg-surface-elevated/40 p-3 sm:p-4 dark:bg-surface/60`,children:[(0,V.jsxs)(`div`,{className:`flex items-center justify-between text-xs font-semibold sm:text-sm`,children:[(0,V.jsx)(`span`,{className:`text-muted-foreground`,children:`Password strength: `}),(0,V.jsxs)(`span`,{className:r,children:[a,` (`,Math.round(n*100),`%)`]})]}),(0,V.jsx)(`div`,{className:`h-1.5 w-full overflow-hidden rounded-full bg-border`,children:(0,V.jsx)(`div`,{className:`h-full rounded-full transition-all duration-300 ${i}`,style:{width:`${Math.round(n*100)}%`}})}),(0,V.jsx)(`ul`,{className:`space-y-1.5 text-[11px] sm:text-xs`,children:o.map(e=>(0,V.jsxs)(`li`,{className:e.met?`text-success`:`text-muted-foreground`,children:[e.met?`â`:`â¢`,` `,e.label]},e.label))})]})}function B9(e){if(!e)return!1;let t=e.length>=8,n=/[A-Z]/.test(e),r=/[a-z]/.test(e),i=/\d/.test(e),a=/[^A-Za-z0-9]/.test(e);return!(t&&n&&r&&i&&a)}function V9(e){return e?e.length<8?`Password must be at least 8 characters long`:e.length>128?`Password must be no more than 128 characters long`:/[A-Z]/.test(e)?/[a-z]/.test(e)?/\d/.test(e)?new Set([`password`,`123456`,`12345678`,`qwerty`,`abc123`,`password123`,`admin`,`letmein`,`welcome`,`monkey`]).has(e.toLowerCase())?`Password is too common. Please choose a stronger password`:/(.)\1\1\1/.test(e)?`Password cannot contain more than 3 consecutive identical characters`:``:`Password must contain at least one digit`:`Password must contain at least one lowercase letter`:`Password must contain at least one uppercase letter`:`Password is required`}function RDe(e){let t=e.trim();return t?t.length<3?`Enter at least 3 characters`:t.includes(`@`)?t.length>254?`Email address is too long`:/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(t)?t.includes(`..`)?`Email address cannot contain consecutive dots`:t.startsWith(`.`)||t.endsWith(`.`)?`Email address cannot start or end with a dot`:``:`Please enter a valid email address`:H9(t):`Username or email is required`}function H9(e){let t=e.trim();return t?t.length<3?`Username must be at least 3 characters long`:t.length>20?`Username must be no more than 20 characters long`:/^[_-]|[_-]$/.test(t)?`Username cannot start or end with underscores or hyphens`:/^[a-zA-Z0-9_-]+$/.test(t)?/__|--|_-|-_/.test(t)?`Username cannot contain consecutive underscores or hyphens`:``:`Username can only contain letters, numbers, underscores, and hyphens`:`Username is required`}function U9({icon:e,type:t=`text`,placeholder:n,rightSlot:r,value:i,onChange:a,onBlur:o,error:s,name:c,autoComplete:l}){return(0,V.jsxs)(`div`,{className:`group relative w-full space-y-1.5`,children:[(0,V.jsxs)(`div`,{className:`flex min-h-[2.75rem] items-center gap-2.5 rounded-xl border bg-surface-elevated px-3.5 py-2.5 transition-all duration-300 focus-within:ring-2 sm:min-h-0 sm:gap-4 sm:rounded-2xl sm:px-5 sm:py-3.5 md:py-4 ${s?`border-error ring-error/20`:`border-border hover:border-border-strong focus-within:border-primary focus-within:ring-primary/20 dark:bg-surface`}`,children:[(0,V.jsx)(`span`,{className:`flex h-5 w-5 shrink-0 items-center justify-center transition-colors duration-300 [&>svg]:scale-110 ${s?`text-error`:`text-muted-foreground group-focus-within:text-primary`}`,children:e}),(0,V.jsx)(`input`,{name:c,type:t,autoComplete:l,placeholder:n,value:i,onChange:a,onBlur:o,className:`min-h-0 min-w-0 flex-1 border-0 bg-transparent p-0 text-sm leading-5 text-foreground shadow-none outline-none ring-0 ring-offset-0 placeholder:text-muted-foreground focus:border-0 focus:outline-none focus:ring-0 focus:ring-offset-0 focus-visible:border-0 focus-visible:!ring-0 focus-visible:!ring-offset-0 focus-visible:outline-none sm:text-base`}),r]}),s&&(0,V.jsx)(`p`,{className:`ml-1 text-[11px] font-medium text-error transition-all duration-300 sm:text-xs`,children:s})]})}var W9=[``,``,``,``,``,``];function zDe({onBackToLogin:e}){let t=my(),n=or(),[r,i]=(0,b.useState)(`request`),[a,o]=(0,b.useState)(``),[s,c]=(0,b.useState)(``),[l,u]=(0,b.useState)(()=>[...W9]),[d,f]=(0,b.useState)(``),[p,m]=(0,b.useState)(``),[h,g]=(0,b.useState)(``),[_,v]=(0,b.useState)(``),[y,x]=(0,b.useState)(``),[S,C]=(0,b.useState)(``),[w,T]=(0,b.useState)(!1),[E,D]=(0,b.useState)(!1),[O,k]=(0,b.useState)(``),[A,j]=(0,b.useState)(!1),[M,N]=(0,b.useState)(!1),[P,F]=(0,b.useState)(!1),ee=(0,b.useRef)([]),[I,te]=(0,b.useState)(null),ne=(0,b.useRef)(0),[re,ie]=(0,b.useState)(0),[ae,oe]=(0,b.useState)(!1),se=a.trim(),ce=l.join(``),le=r===`verify`||r===`password`;(0,b.useEffect)(()=>
470{if(r!==`verify`||I===null){queueMicrotask(()=>ie(0));return}let e=()=>{ie(Math.max(0,Math.ceil((I-Date.now())/1e3)))};e();let t=window.setInterval(e,1e3);return()=>window.clearInterval(t)},[r,I]),(0,b.useEffect)(()=>{if(r!==`verify`)return;let e=window.setTimeout(()=>ee.current[0]?.focus(),50);return()=>window.clearTimeout(e)},[r]);let ue=async e=>{e.preventDefault(),k(``);let t=RDe(a);if(c(t),!t){j(!0);try{await Gv.requestPasswordReset(se),i(`verify`),u([...W9]),f(``),ne.current=0,queueMicrotask(()=>te(Date.now()+3e4))}catch(e){e instanceof ho?e.status===429||e.details?.error===`rate_limit_exceeded`?k(`Too many attempts. Please wait a minute and try again.`):e.status>=500?k(`Something went wrong. Please try again later.`):k(e.message):k(`Unable to send reset code. Please try again.`)}finally{j(!1)}}},de=async e=>{e.preventDefault(),k(``);let t=ce.replace(/\D/g,``);if(t.length!==6){f(`Enter the 6-digit code from your email`);return}f(``),j(!0);try{let{reset_token:e}=await Gv.verifyPasswordResetCode(se,t);m(e),i(`password`),g(``),v(``),x(``),C(``),T(!1),D(!1)}catch(e){if(e instanceof ho){let t=e.details?.error;t===`invalid_reset_code`?f(e.message):t===`user_not_found`?k(`No account matches this username or email. Start over and check what you entered.`):e.status===429||t===`rate_limit_exceeded`?k(`Too many attempts. Please wait briefly and try again.`):e.status>=500?k(`Verification failed. Please try again later.`):k(e.message)}else k(`Unable to verify code. Please try again.`)}finally{j(!1)}},fe=async()=>{if(!(r!==`verify`||re>0||ae)){oe(!0),k(``),f(``);try{await Gv.requestPasswordReset(se),u([...W9]),ee.current[0]?.focus();let e=[6e4,12e4,18e4,24e4],t=ne.current+1;ne.current=t;let n=e[Math.min(t-1,e.length-1)];queueMicrotask(()=>te(Date.now()+n))}catch(e){e instanceof ho?e.status===429||e.details?.error===`rate_limit_exceeded`?(k(`Too many resend attempts. Please wait a few minutes.`),queueMicrotask(()=>te(Date.now()+12e4))):e.status>=500?k(`Could not resend the code. Try again later.`):k(e.message):k(`Could not resend the code. Try again.`)}finally{oe(!1)}}},L=(e,t)=>{let n=t.replace(/\D/g,``).slice(-1),r=[...l];r[e]=n,u(r),d&&f(``),O&&k(``),n&&e<5&&ee.current[e+1]?.focus()},pe=(e,t)=>{if(t.key===`Backspace`){if(l[e]){t.preventDefault();let n=[...l];n[e]=``,u(n),d&&f(``);return}e>0&&(t.preventDefault(),ee.current[e-1]?.focus())}},me=e=>{e.preventDefault();let t=e.clipboardData.getData(`text`).replace(/\D/g,``).slice(0,6);if(!t)return;let n=Array.from(W9);for(let e=0;e<t.length;e++)n[e]=t[e]??``;u(n),d&&f(``),O&&k(``);let r=Math.min(t.length,5);window.setTimeout(()=>ee.current[r]?.focus(),0)},he=async e=>{e.preventDefault(),k(``);let t=V9(h);x(t);let r=``;if(_!==h&&(r=`Passwords do not match`),C(r),!(t||r)){j(!0);try{await Gv.resetPasswordWithToken(se,p,h),n(`/auth/login?pwreset=success`,{replace:!0})}catch(e){if(e instanceof ho){let t=e.details?.error;t===`invalid_reset_token`?k(`This reset link expired or was already used. Go back and request a new code.`):t===`validation_error`?x(e.message):e.status===429||t===`rate_limit_exceeded`?k(`Too many attempts. Please wait briefly and try again.`):e.status>=500?k(`Could not update password. Please try again later.`):k(e.message)}else k(`Could not update password. Please try again.`)}finally{j(!1)}}},ge=()=>{i(`request`),u([...W9]),f(``),m(``),g(``),v(``),x(``),C(``),T(!1),D(!1),k(``),te(null),ne.current=0,ie(0)},_e=V9(h),ve=_&&_!==h?`Passwords do not match`:``,ye=y||(w?_e:``),be=S||(E?ve:``);return(0,V.jsx)(`div`,{className:`flex h-full w-full flex-col justify-start px-4 sm:px-8 md:px-10 ${le?`pt-4 pb-4 sm:pt-6 sm:pb-6 md:pt-7 md:pb-7`:`pt-7 pb-7 sm:pt-9 sm:pb-9 md:pt-12 md:pb-10`}`,children:(0,V.jsxs)(`div`,{className:`w-full`,children:[(0,V.jsxs)(`div`,{className:`w-full ${le?`mb-4 sm:mb-5`:`mb-6`}`,children:[(0,V.jsxs)(`button`,{type:`button`,onClick:r===`request`?e:ge,className:`group flex items-center gap-2 self-start text-sm font-bold text-muted-foreground transition-colors hover:text-primary ${le?`mb-3 sm:mb-4`:`mb-5`}`,children:[(0,V.jsx)(Lk,{size:16,className:`transition-transform group-hover:-translate-x-1`}),r===`request`?`Back to Sign In`:`Start over`]}),(0,V.jsxs)(`div`,{className:`flex flex-col items-center text-center`,children:[(0,V.jsx)(`div`,{className:`flex items-center justify-center rounded-2xl border border-border bg-primary/10 text-primary shadow-sm dark:bg-primary/15 ${le?`mb-3 h-12 w-12 sm:h-12 sm:w-12`:`mb-4 h-14 w-14`}
470`,"aria-hidden":!0,children:(0,V.jsx)(Fae,{className:le?`h-6 w-6`:`h-7 w-7`,strokeWidth:1.75})}),(0,V.jsx)(`h1`,{className:`font-black tracking-tight text-foreground sm:text-3xl lg:text-4xl ${le?`mb-1.5 text-xl sm:text-2xl`:`mb-2 text-2xl`}`,children:r===`request`?`Forgot password`:r===`verify`?`Enter verification code`:`Choose a new password`}),(0,V.jsx)(`p`,{className:`max-w-md leading-relaxed text-muted-foreground ${le?`text-[11px] sm:text-xs`:`text-xs sm:text-sm`}`,children:r===`request`?`Enter your username or email. If an account exists, we will send you an email with a reset code.`:r===`verify`?`Check your inbox and spam folder. Code expires in 15 minutes.`:`Use a strong password you have not used elsewhere.`})]})]}),r===`request`?(0,V.jsxs)(`form`,{onSubmit:ue,className:`space-y-4`,children:[(0,V.jsx)(U9,{name:`identifier`,icon:(0,V.jsx)(P9,{}),placeholder:`Username or email`,value:a,onChange:e=>{o(e.target.value),s&&c(``),O&&k(``)},error:s}),O?(0,V.jsx)(`p`,{className:`text-sm font-medium text-error`,children:O}):null,(0,V.jsx)(`button`,{type:`submit`,disabled:A||!se,className:`w-full min-h-12 rounded-xl bg-primary py-3 text-sm font-black tracking-wide text-primary-foreground shadow-lg transition-all duration-300 enabled:hover:opacity-95 enabled:active:scale-[0.98] disabled:cursor-not-allowed disabled:opacity-60 sm:min-h-0 sm:rounded-2xl sm:py-4 sm:text-base`,children:A?`Sending...`:`Send code`})]}):null,r===`verify`?(0,V.jsxs)(`form`,{onSubmit:de,className:`space-y-4`,children:[(0,V.jsx)(`div`,{className:`flex justify-center gap-2 sm:gap-3`,role:`group`,"aria-label":`Verification code`,children:l.map((e,t)=>(0,V.jsx)(`input`,{ref:e=>{ee.current[t]=e},id:t===0?`reset-otp-0`:void 0,name:`otp-${t}`,type:`text`,inputMode:`numeric`,autoComplete:t===0?`one-time-code`:`off`,maxLength:1,value:e,onChange:e=>L(t,e.target.value),onKeyDown:e=>pe(t,e),onPaste:me,"aria-label":`Digit ${t+1} of 6`,className:`flex h-11 w-10 shrink-0 rounded-xl border border-border bg-surface-elevated text-center font-mono text-lg text-foreground outline-none transition-all focus:border-primary focus:ring-2 focus:ring-primary/20 sm:h-12 sm:w-11 sm:rounded-2xl sm:text-xl dark:bg-surface`},t))}),d?(0,V.jsx)(`p`,{className:`text-center text-[11px] font-medium text-error sm:text-xs`,children:d}):null,O?(0,V.jsx)(`p`,{className:`text-sm font-medium text-error`,children:O}):null,(0,V.jsx)(`button`,{type:`submit`,disabled:A||ce.replace(/\D/g,``).length!==6,className:`w-full min-h-12 rounded-xl bg-primary py-3 text-sm font-black tracking-wide text-primary-foreground shadow-lg transition-all duration-300 enabled:hover:opacity-95 enabled:active:scale-[0.98] disabled:cursor-not-allowed disabled:opacity-60 sm:min-h-0 sm:rounded-2xl sm:py-4 sm:text-base`,children:A?`Verifying...`:`Verify code`}),(0,V.jsx)(`div`,{className:`flex justify-center pt-1`,children:(0,V.jsx)(`button`,{type:`button`,onClick:fe,disabled:re>0||ae||A||!se,className:`text-xs font-semibold text-primary transition-colors enabled:hover:text-primary-hover enabled:hover:underline disabled:cursor-not-allowed disabled:opacity-50 sm:text-sm`,children:ae?`Sending...`:re>0?`Resend code in ${re}s`:`Resend code`})})]}):null,r===`password`?(0,V.jsxs)(`form`,{onSubmit:he,className:`space-y-4`,children:[(0,V.jsx)(U9,{name:`password`,icon:(0,V.jsx)(F9,{}),type:M?`text`:`password`,autoComplete:`new-password`,placeholder:`New password`,value:h,onChange:e=>{g(e.target.value),w||T(!0),y&&x(``),O&&k(``)},onBlur:()=>T(!0),error:ye,rightSlot:(0,V.jsx)(`button`,{type:`button`,onClick:()=>N(e=>!e),"aria-label":t(M?`auth.hidePassword`:`auth.showPassword`),className:`inline-flex size-[1.375rem] shrink-0 items-center justify-center rounded-md p-0 leading-none text-muted-foreground transition-colors hover:text-primary sm:size-5`,children:M?(0,V.jsx)(L9,{}):(0,V.jsx)(I9,{})})}),(0,V.jsx)(U9,{name:`confirmPassword`,icon:(0,V.jsx)(F9,{}),type:P?`text`:`password`,autoComplete:`new-password`,placeholder:`Confirm new password`,value:_,onChange:e=>{v(e.target.value),E||D(!0),S&&C(``),O&&k(``)},onBlur:()=>D(!0),error:be,rightSlot:(0,V.jsx)(`button`,{type:`button`,onClick:()=>F(e=>!e),"aria-label":P?`Hide password`:`Show password`,className:`inline-flex size-[1.375rem] shrink-0 items-center justify-center rounded-md p-0 leading-none text-muted-foreground transition-colors hover:text-primary sm:size-5`,children:P?(0,V.jsx)(L9,{}):(0,V.jsx)(I9,{})})}
470),B9(h)?(0,V.jsx)(z9,{password:h}):null,O?(0,V.jsx)(`p`,{className:`text-sm font-medium text-error`,children:O}):null,(0,V.jsx)(`button`,{type:`submit`,disabled:A||!!_e||_!==h,className:`w-full min-h-12 rounded-xl bg-primary py-3 text-sm font-black tracking-wide text-primary-foreground shadow-lg transition-all duration-300 enabled:hover:opacity-95 enabled:active:scale-[0.98] disabled:cursor-not-allowed disabled:opacity-60 sm:min-h-0 sm:rounded-2xl sm:py-4 sm:text-base`,children:A?`Updating...`:`Update password`})]}):null]})})}function BDe({onToggle:e,onLogin:t,isSubmitting:n,submitError:r,isGoogleLoading:i,onGoogleLoadingChange:a}){let o=my(),s={identifier:``,password:``},c={identifier:``,password:``},[l,u]=(0,b.useState)(!1),[d,f]=(0,b.useState)(s),[p,m]=(0,b.useState)(c),h=e=>{let{name:t,value:n}=e.target;f(e=>({...e,[t]:n})),p[t]&&m(e=>({...e,[t]:``}))},g=()=>{let e={identifier:``,password:``};return d.identifier.trim()||(e.identifier=o(`auth.usernameOrEmailRequired`)),d.password||(e.password=o(`auth.passwordRequired`)),m(e),!e.identifier&&!e.password},_=async e=>{e.preventDefault(),g()&&await t(d.identifier,d.password)},v=d.identifier.trim().length>0&&d.password.length>0,y=n||!v;return(0,V.jsx)(`div`,{className:`flex h-full flex-col justify-start px-4 pt-7 pb-7 sm:px-8 sm:pt-9 sm:pb-9 md:px-10 md:pt-12 md:pb-10 lg:px-14 xl:px-16`,children:(0,V.jsxs)(`div`,{className:`w-full`,children:[(0,V.jsxs)(`div`,{className:`mb-8`,children:[(0,V.jsx)(`h1`,{className:`mb-2 text-2xl font-black tracking-tight text-foreground sm:text-3xl lg:text-4xl`,children:o(`auth.welcomeBack`)}),(0,V.jsx)(`p`,{className:`text-xs leading-relaxed text-muted-foreground sm:text-sm`,children:o(`auth.signInSubtitle`)})]}),(0,V.jsxs)(`form`,{onSubmit:_,className:`space-y-4`,children:[(0,V.jsx)(U9,{name:`identifier`,icon:(0,V.jsx)(P9,{}),autoComplete:`username`,placeholder:o(`auth.usernameOrEmail`),value:d.identifier,onChange:h,error:p.identifier}),(0,V.jsx)(U9,{name:`password`,icon:(0,V.jsx)(F9,{}),type:l?`text`:`password`,autoComplete:`current-password`,placeholder:o(`auth.password`),value:d.password,onChange:h,error:p.password,rightSlot:(0,V.jsx)(`button`,{type:`button`,onClick:()=>u(e=>!e),"aria-label":o(l?`auth.hidePassword`:`auth.showPassword`),className:`inline-flex size-[1.375rem] shrink-0 items-center justify-center rounded-md p-0 leading-none text-muted-foreground transition-colors hover:text-primary sm:size-5`,children:l?(0,V.jsx)(L9,{}):(0,V.jsx)(I9,{})})}),r?(0,V.jsx)(`p`,{className:`text-sm font-medium text-error`,children:r}):null,(0,V.jsx)(`div`,{className:`flex justify-end pt-1`,children:(0,V.jsx)(zi,{to:`/auth/forgot-password`,className:`text-xs font-semibold text-primary transition-colors hover:text-primary-hover hover:underline sm:text-sm`,children:o(`auth.forgotPassword`)})}),(0,V.jsx)(`button`,{type:`submit`,disabled:y,className:`w-full min-h-12 rounded-xl bg-primary py-3 text-sm font-black tracking-wide text-primary-foreground shadow-lg transition-all duration-300 enabled:hover:opacity-95 enabled:active:scale-[0.98] disabled:cursor-not-allowed disabled:opacity-60 sm:min-h-0 sm:rounded-2xl sm:py-4 sm:text-base`,children:o(n?`auth.signingIn`:`auth.signIn`)})]}),(0,V.jsxs)(`div`,{className:`my-8 flex items-center gap-3`,children:[(0,V.jsx)(`div`,{className:`h-px flex-1 bg-border`}),(0,V.jsx)(`span`,{className:`text-[10px] font-bold uppercase tracking-widest text-muted-foreground/60 sm:text-[11px]`,children:`Or continue with`}),(0,V.jsx)(`div`,{className:`h-px flex-1 bg-border`})]}),(0,V.jsx)(`div`,{className:`flex flex-col gap-3 sm:flex-row`,children:(0,V.jsx)(`button`,{type:`button`,disabled:i,onClick:()=>{sessionStorage.setItem(`oauth_loading`,`true`),a(!0);let e=`${window.location.origin}/auth/oauth/callback`,t=new URLSearchParams({client_id:`774437974294-bh1lpii8cv0t821e9m7a5h8ltt7sj0ot.apps.googleusercontent.com`,redirect_uri:e,response_type:`code`,scope:`openid email profile`,include_granted_scopes:`true`,access_type:`offline`,prompt:`consent`});try{let e=crypto.getRandomValues(new Uint8Array(16)),n=Array.from(e).map(e=>e.toString(16).padStart(2,`0`)).join(``);sessionStorage.setItem(M9,n),localStorage.setItem(N9,JSON.stringify({nonce:n,createdAt:Date.now()}));let r=btoa(JSON.stringify({provider:`google`,nonce:n}));t.set(`state`,r)}catch{let e=String(Date.now());sessionStorage.setItem(M9,e),localStorage.setItem(N9,JSON.stringify({nonce:e,createdAt:Date.now()}));let n=btoa(JSON.stringify({provider:`google`,nonce:e}));t.set(`state`,n)}let n=`https://accounts.google.com/o/oauth2/v2/auth?${t.toString()}`;window.location.href=n},className:`flex flex-1 items-center justify-center gap-2.5 rounded-xl border border-border bg-surface-elevated py-3 text-sm font-semibold transition-all duration-300 enabled:hover:border-border-strong enabled:hover:bg-surface-hover disabled:cursor-not-allowed disabled:opacity-60 sm:rounded-2xl dark:bg-surface`,children:i?(0,V.jsx)(`div`,{className:`h-5 w-5 animate-spin rounded-full border-2 border-primary/30 border-t-primary`}):(0,V.jsxs)(V.Fragment,{children:[(0,V.jsx)(R9,{}),(0,V.jsx)(`span`,{children:`Google`})]})})}),(0,V.jsxs)(`p`,{className:`mt-10 text-center text-sm text-muted-foreground`,children:[`Don't have an account?`,` `,(0,V.jsx)(`button`,{type:`button`,onClick:e,className:`font-bold text-primary transition-colors hover:text-primary-hover hover:underline`,children:`Sign Up`})]})]})})}function G9({isSubmitting:e,submitError:t,onSubmit:n,onBackToLogin:r,onClearSubmitError:i}){let[a,o]=(0,b.useState)(``),[s,c]=(0,b.useState)(``),[l,u]=(0,b.useState)(!1),d=H9(a),f=t||s||(l?d:``),p=e||!!d;return(0,V.jsx)(`div`,{className:`flex h-full flex-col justify-center px-6 py-10 sm:px-10 sm:py-12 md:px-12 lg:px-16`,children:(0,V.jsxs)(ik.div,{initial:{opacity:0,y:20}
470,animate:{opacity:1,y:0},transition:{duration:.5},className:`w-full`,children:[(0,V.jsxs)(`div`,{className:`mb-10`,children:[(0,V.jsxs)(`div`,{className:`mb-4 inline-flex items-center gap-2 rounded-full bg-primary/10 px-3 py-1 text-[10px] font-bold uppercase tracking-widest text-primary sm:text-xs`,children:[(0,V.jsx)(ej,{size:14,className:`animate-pulse`}),`Final Step`]}),(0,V.jsx)(`h1`,{className:`mb-3 text-3xl font-black tracking-tight text-foreground sm:text-4xl`,children:`Claim Your Identity`}),(0,V.jsx)(`p`,{className:`text-sm leading-relaxed text-muted-foreground sm:text-base`,children:`Your username is how you'll be known across the platform. Choose something that represents you.`})]}),(0,V.jsxs)(`form`,{onSubmit:async e=>{e.preventDefault();let t=H9(a);if(t){u(!0),c(t);return}c(``),await n(a.trim().toLowerCase())},className:`space-y-6`,children:[(0,V.jsx)(U9,{name:`username`,icon:(0,V.jsx)(P9,{}),placeholder:`Choose your username`,value:a,onChange:e=>{o(e.target.value),l||u(!0),s&&c(``),t&&i()},onBlur:()=>u(!0),error:f}),(0,V.jsx)(`div`,{className:`rounded-2xl border border-border/50 bg-muted/30 p-4 dark:bg-white/5`,children:(0,V.jsxs)(`div`,{className:`flex items-start gap-3`,children:[(0,V.jsx)(`div`,{className:`mt-0.5 rounded-lg bg-primary/10 p-1.5 text-primary`,children:(0,V.jsx)(qA,{size:16})}),(0,V.jsxs)(`div`,{children:[(0,V.jsx)(`h4`,{className:`text-xs font-bold text-foreground`,children:`Secure & Unique`}),(0,V.jsx)(`p`,{className:`mt-1 text-[11px] leading-normal text-muted-foreground`,children:`Usernames must be 3-20 characters and can include letters, numbers, underscores, or hyphens.`})]})]})}),(0,V.jsx)(`div`,{className:`pt-2`,children:(0,V.jsxs)(`button`,{type:`submit`,disabled:p,className:`group relative flex w-full items-center justify-center gap-2 overflow-hidden rounded-2xl bg-primary py-4 text-base font-extrabold tracking-wide text-primary-foreground shadow-xl shadow-primary/20 transition-all duration-300 hover:shadow-primary/40 active:scale-[0.98] disabled:cursor-not-allowed disabled:opacity-50 disabled:shadow-none`,children:[(0,V.jsx)(`span`,{className:`relative z-10 flex items-center gap-2`,children:e?(0,V.jsxs)(V.Fragment,{children:[(0,V.jsxs)(`svg`,{className:`h-5 w-5 animate-spin text-current`,viewBox:`0 0 24 24`,children:[(0,V.jsx)(`circle`,{className:`opacity-25`,cx:`12`,cy:`12`,r:`10`,stroke:`currentColor`,strokeWidth:`4`,fill:`none`}),(0,V.jsx)(`path`,{className:`opacity-75`,fill:`currentColor`,d:`M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z`})]}),`Finalizing...`]}):(0,V.jsxs)(V.Fragment,{children:[`Complete Setup`,(0,V.jsx)(xk,{size:18,className:`transition-transform group-hover:translate-x-1`})]})}),(0,V.jsx)(`div`,{className:`absolute inset-0 -z-0 translate-y-full bg-white/10 transition-transform group-hover:translate-y-0`})]})})]}),(0,V.jsx)(`div`,{className:`mt-10 flex justify-center`,children:(0,V.jsxs)(`button`,{type:`button`,onClick:r,className:`group flex items-center gap-2 text-sm font-bold text-muted-foreground transition-colors hover:text-primary`,children:[(0,V.jsx)(Lk,{size:16,className:`transition-transform group-hover:-translate-x-1`}),`Back to Sign In`]})})]})})}function VDe({onToggle:e,onRegisterSuccess:t,isGoogleLoading:n,onGoogleLoadingChange:r}){let i=my(),a={username:``,email:``,password:``},o={username:``,email:``,password:``},s={username:!1,email:!1,password:!1},[c,l]=(0,b.useState)(!1),[u,d]=(0,b.useState)(a),[f,p]=(0,b.useState)(o),[m,h]=(0,b.useState)(s),[g,_]=(0,b.useState)(``),[v,y]=(0,b.useState)(!1),x=e=>{let{name:t,value:n}=e.target;d(e=>({...e,[t]:n})),m[t]||h(e=>({...e,[t]:!0})),g&&_(``),f[t]&&p(e=>({...e,[t]:``}))},S=e=>{let t=e.trim().toLowerCase();if(!t)return`Email is required`;if(!/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(t))return`Please enter a valid email address`;if(t.length>254)return`Email address is too long`;if(t.includes(`..`))return`Email address cannot contain consecutive dots`;if(t.startsWith(`.`)||t.endsWith(`.`))return`Email address cannot start or end with a dot`;let n=t.split(`@`);if(n.length!==2)return`Email address must contain @ symbol`;let[r,i]=n;return r.length>64?`Email local part is too long`:i.length>253?`Email domain is too long`:``},C=e=>V9(e),w=e=>{let{name:t}=e.target;h(e=>({...e,[t]:!0}))},T=()=>{let e={username:H9(u.username),email:S(u.email),password:C(u.password)};return p(e),!e.username&&!e.email&&!e.password},E=async e=>{if(e.preventDefault(),_(``),T()){y(!0);try{await Gv.register({username:u.username.trim().toLowerCase(),email:u.email.trim().toLowerCase(),password:u.password,signup_platform:`web`}),t(`Account created successfully. We sent a verification email. Please check your inbox and spam/junk folder.`),d({username:``,email:``,password:``}),p({username:``,email:``,password:``}),h(s)}catch(e){if(e instanceof ho){let t=e.details?.error;t===`email_already_exists`?p(e=>({...e,email:`Email already in use. Please sign in instead.`})):t===`username_already_exists`?p(e=>({...e,username:`Username is already taken. Please choose another.`})):t===`rate_limit_exceeded`||e.status===429?_(`We cannot create your account at the moment. Please try again shortly.`):e.status>=500?_(`We are having trouble creating your account right now. Please try again later.`):_(e.message)}else _(`Something went wrong while creating your account. Please try again later.`)}finally{y(!1)}}},D=H9(u.username),O=S(u.email),k=C(u.password),A=v||!(!D&&!O&&!k),j=f.username||(m.username?D:``),M=f.email||(m.email?O:``),N=f.password||(m.password?k:``);return(0,V.jsx)(`div`,{className:`flex h-full flex-col justify-start px-4 pt-7 pb-7 sm:px-8 sm:pt-9 sm:pb-9 md:px-10 md:pt-12 md:pb-10 lg:px-14 xl:px-16`,children:(0,V.jsxs)(`div`,{className:`w-full`,children:[(0,V.jsxs)(`div`,{className:`mb-8`,children:[(0,V.jsx)(`h1`,{className:`mb-2 text-2xl font-black tracking-tight text-foreground sm:text-3xl lg:text-4xl`,children:i(`auth.createAccount`)}),(0,V.jsx)(`p`,{className:`text-xs leading-relaxed text-muted-foreground sm:text-sm`,children:i(`auth.joinToday`)})]}),(0,V.jsxs)(`form`,{onSubmit:E,className:`space-y-4`,children:[(0,V.jsx)(U9,{name:`username`,icon:(0,V.jsx)(P9,{}),autoComplete:`username`,placeholder:i(`auth.usernamePlaceholder`),value:u.username,onChange:x,onBlur:w,error:j}),(0,V.jsx)(U9,{name:`email`,icon:(0,V.jsx)(LDe,{}),type:`email`,autoComplete:`email`,placeholder:i(`auth.emailAddress`),value:u.email,onChange:x,onBlur:w,error:M}),(0,V.jsx)(U9,{name:`password`,icon:(0,V.jsx)(F9,{}),type:c?`text`:`password`,autoComplete:`new-password`,placeholder:i(`auth.password`),value:u.password,onChange:x,onBlur:w,error:N,rightSlot:(0,V.jsx)(`button`,{type:`button`,onClick:()=>l(e=>!e),"aria-label":i(c?`auth.hidePassword`:`auth.showPassword`),className:`inline-flex size-[1.375rem] shrink-0 items-center justify-center rounded-md p-0 leading-none text-muted-foreground transition-colors hover:text-primary sm:size-5`,children:c?(0,V.jsx)(L9,{}):(0,V.jsx)(I9,{})})}),B9(u.password)?(0,V.jsx)(z9,{password:u.password}):null,(0,V.jsx)(`button`,{type:`submit`,disabled:A,className:`mt-4 w-full min-h-12 rounded-xl bg-primary py-3 text-sm font-black tracking-wide text-primary-foreground shadow-lg transition-all duration-300 enabled:hover:opacity-95 enabled:active:scale-[0.98] disabled:cursor-not-allowed disabled:opacity-60 sm:min-h-0 sm:rounded-2xl sm:py-4 sm:text-base`,children:i(v?`auth.creatingAccount`:`auth.getStarted`)}),g?(0,V.jsx)(`p`,{className:`text-sm font-medium text-error`,children:g}):null]}),(0,V.jsxs)(`div`,{className:`my-8 flex items-center gap-3`,children:[(0,V.jsx)(`div`,{className:`h-px flex-1 bg-border`}),(0,V.jsx)(`span`,{className:`text-[10px] font-bold uppercase tracking-widest text-muted-foreground
470/60 sm:text-[11px]`,children:`Or register with`}),(0,V.jsx)(`div`,{className:`h-px flex-1 bg-border`})]}),(0,V.jsx)(`div`,{className:`flex flex-col gap-3 sm:flex-row`,children:(0,V.jsx)(`button`,{type:`button`,disabled:n,onClick:()=>{sessionStorage.setItem(`oauth_loading`,`true`),r(!0);let e=`${window.location.origin}/auth/oauth/callback`,t=new URLSearchParams({client_id:`774437974294-bh1lpii8cv0t821e9m7a5h8ltt7sj0ot.apps.googleusercontent.com`,redirect_uri:e,response_type:`code`,scope:`openid email profile`,include_granted_scopes:`true`,access_type:`offline`,prompt:`consent`});try{let e=crypto.getRandomValues(new Uint8Array(16)),n=Array.from(e).map(e=>e.toString(16).padStart(2,`0`)).join(``);sessionStorage.setItem(M9,n),localStorage.setItem(N9,JSON.stringify({nonce:n,createdAt:Date.now()}));let r=btoa(JSON.stringify({provider:`google`,nonce:n}));t.set(`state`,r)}catch{let e=String(Date.now());sessionStorage.setItem(M9,e),localStorage.setItem(N9,JSON.stringify({nonce:e,createdAt:Date.now()}));let n=btoa(JSON.stringify({provider:`google`,nonce:e}));t.set(`state`,n)}window.location.href=`https://accounts.google.com/o/oauth2/v2/auth?${t.toString()}`},className:`flex flex-1 items-center justify-center gap-2.5 rounded-xl border border-border bg-surface-elevated py-3 text-sm font-semibold transition-all duration-300 enabled:hover:border-border-strong enabled:hover:bg-surface-hover disabled:cursor-not-allowed disabled:opacity-60 sm:rounded-2xl dark:bg-surface`,children:n?(0,V.jsx)(`div`,{className:`h-5 w-5 animate-spin rounded-full border-2 border-primary/30 border-t-primary`}):(0,V.jsxs)(V.Fragment,{children:[(0,V.jsx)(R9,{}),(0,V.jsx)(`span`,{children:`Google`})]})})}),(0,V.jsxs)(`p`,{className:`mt-10 text-center text-sm text-muted-foreground`,children:[`Already have an account?`,` `,(0,V.jsx)(`button`,{type:`button`,onClick:e,className:`font-bold text-primary transition-colors hover:text-primary-hover hover:underline`,children:`Sign In`})]})]})})}function HDe({isLogin:e,onToggle:t}){return(0,V.jsxs)(`div`,{className:`relative h-full w-full overflow-hidden bg-[#030712] shadow-[inset_0_0_120px_rgba(0,0,0,0.8)]`,children:[(0,V.jsxs)(`div`,{className:`absolute inset-0 z-0 overflow-hidden pointer-events-none mix-blend-screen`,children:[(0,V.jsx)(`div`,{className:`absolute left-1/2 top-1/2 w-[800px] h-[400px] rounded-[100%] bg-blue-600/20 blur-[90px] transition-all duration-[2000ms] ease-[cubic-bezier(0.16,1,0.3,1)] ${e?`-translate-x-[40%] -translate-y-[60%] rotate-12 scale-100`:`-translate-x-[60%] -translate-y-[40%] -rotate-12 scale-110`}`}),(0,V.jsx)(`div`,{className:`absolute left-1/2 top-1/2 w-[600px] h-[300px] rounded-[100%] bg-cyan-500/15 blur-[80px] transition-all duration-[2000ms] ease-[cubic-bezier(0.16,1,0.3,1)] ${e?`-translate-x-[70%] -translate-y-[30%] -rotate-45 scale-110`:`-translate-x-[30%] -translate-y-[70%] rotate-45 scale-100`}`}),(0,V.jsx)(`div`,{className:`absolute left-1/2 top-1/2 w-[500px] h-[500px] rounded-full bg-indigo-500/15 blur-[100px] transition-all duration-[2000ms] ease-[cubic-bezier(0.16,1,0.3,1)] ${e?`-translate-x-[20%] translate-y-[10%] scale-[0.8]`:`-translate-x-[80%] -translate-y-[10%] scale-110`}`})]}),(0,V.jsx)(`div`,{className:`absolute inset-0 z-0 opacity-30`,style:{backgroundImage:` 471 linear-gradient(to right, rgba(255,255,255,0.06) 1px, transparent 1px), 472 linear-gradient(to bottom, rgba(255,255,255,0.06) 1px, transparent 1px) 473 `,backgroundSize:`48px 48px`,maskImage:`radial-gradient(ellipse 90% 90% at 50% 50%, black 20%, transparent 80%)`,WebkitMaskImage:`radial-gradient(ellipse 90% 90% at 50% 50%, black 20%, transparent 80%)`}}),(0,V.jsx)(`div`,{className:`absolute left-1/2 top-1/2 z-10 flex -translate-x-1/2 -translate-y-1/2 items-center justify-center pointer-events-none`,style:{perspective:`1200px`},children:(0,V.jsxs)(`div`,{className:`relative flex items-center justify-center transition-all duration-[2000ms] ease-[cubic-bezier(0.16,1,0.3,1)]`,style:{transformStyle:`preserve-3d`,transform:e?`rotateX(15deg) rotateY(-15deg) scale(1)`:`rotateX(-10deg) rotateY(20deg) scale(1.05)`},children:[(0,V.jsx)(`div`,{className:`absolute h-[380px] w-[280px] rounded-[2rem] border border-white/10 bg-gradient-to-br from-white/[0.08] to-white/[0.02] backdrop-blur-3xl shadow-[0_30px_80px_rgba(0,0,0,0.5),inset_0_1px_0_rgba(255,255,255,0.2)]`}),(0,V.jsx)(`div`,{className:`absolute h-[300px] w-[220px] rounded-2xl border border-t-white/30 border-l-white/20 border-r-white/5 border-b-white/5 bg-gradient-to-br from-white/[0.06] to-transparent backdrop-blur-xl shadow-[inset_0_0_30px_rgba(255,255,255,0.03)] transition-all duration-[2000ms] ease-[cubic-bezier(0.16,1,0.3,1)]`,style:{transform:e?`translateZ(40px) translateX(-16px) translateY(-16px)`:`translateZ(60px) translateX(16px) translateY(16px)`}}),(0,V.jsx)(`div`,{className:`absolute h-[220px] w-[140px] rounded-xl border border-t-white/40 border-l-white/30 border-r-transparent border-b-transparent bg-gradient-to-br from-white/[0.12] to-white/[0.02] backdrop-blur-md shadow-[0_20px_40px_rgba(0,0,0,0.6),inset_0_1px_0_rgba(255,255,255,0.4)] transition-all duration-[2000ms] ease-[cubic-bezier(0.16,1,0.3,1)]`,style:{transform:e?`translateZ(90px) translateX(24px) translateY(24px)`:`translateZ(130px) translateX(-24px) translateY(-24px)`},children:(0,V.jsx)(`div`,{className:`absolute left-[15%] top-[10%] h-[80%
473] w-[1px] bg-gradient-to-b from-transparent via-cyan-300/60 to-transparent`})}),(0,V.jsx)(`div`,{className:`absolute h-[1px] w-[400px] bg-gradient-to-r from-transparent via-blue-400/80 to-transparent blur-[1px] transition-all duration-[2000ms] ease-[cubic-bezier(0.16,1,0.3,1)]`,style:{transform:e?`translateZ(110px) rotate(35deg) translateY(48px)`:`translateZ(50px) rotate(-25deg) translateY(-64px)`}}),(0,V.jsx)(`div`,{className:`absolute h-[2px] w-[200px] bg-gradient-to-r from-transparent via-cyan-300/80 to-transparent shadow-[0_0_15px_rgba(103,232,249,0.8)] transition-all duration-[2000ms] ease-[cubic-bezier(0.16,1,0.3,1)]`,style:{transform:e?`translateZ(160px) rotate(-15deg) translateY(-80px) translateX(40px)`:`translateZ(90px) rotate(30deg) translateY(96px) translateX(-48px)`}})]})}),(0,V.jsxs)(`div`,{className:`absolute inset-0 z-20 pointer-events-none mix-blend-overlay`,children:[(0,V.jsx)(`div`,{className:`absolute top-0 left-0 w-full h-full bg-gradient-to-br from-white/10 to-transparent transition-opacity duration-[2000ms] ${e?`opacity-100`:`opacity-0`}`}),(0,V.jsx)(`div`,{className:`absolute top-0 right-0 w-full h-full bg-gradient-to-bl from-white/10 to-transparent transition-opacity duration-[2000ms] ${e?`opacity-0`:`opacity-100`}`})]}),(0,V.jsx)(`div`,{className:`absolute inset-0 z-30 opacity-[0.04] mix-blend-screen pointer-events-none`,style:{backgroundImage:`url("data:image/svg+xml,%3Csvg viewBox=%220 0 200 200%22 xmlns=%22http://www.w3.org/2000/svg%22%3E%3Cfilter id=%22noiseFilter%22%3E%3CfeTurbulence type=%22fractalNoise%22 baseFrequency=%220.8%22 numOctaves=%224%22 stitchTiles=%22stitch%22/%3E%3C/filter%3E%3Crect width=%22100%25%22 height=%22100%25%22 filter=%22url(%23noiseFilter)%22/%3E%3C/svg%3E")`}})]})}function UDe(){return(0,V.jsx)(ik.div,{initial:{opacity:0}
473,animate:{opacity:1},exit:{opacity:0},className:`fixed inset-0 z-[100] flex items-center justify-center bg-background/60 backdrop-blur-xl`,children:(0,V.jsxs)(`div`,{className:`relative flex flex-col items-center`,children:[(0,V.jsx)(`div`,{className:`absolute inset-0 -z-10 h-64 w-64 -translate-x-1/2 -translate-y-1/2 animate-pulse rounded-full bg-primary/20 blur-[100px]`}),(0,V.jsxs)(`div`,{className:`relative mb-8 flex h-24 w-24 items-center justify-center rounded-full border border-white/20 bg-white/10 shadow-2xl backdrop-blur-2xl dark:border-white/5 dark:bg-white/5`,children:[(0,V.jsx)(ik.div,{animate:{rotate:360},transition:{duration:2,repeat:1/0,ease:`linear`},children:(0,V.jsx)(hj,{className:`h-10 w-10 text-primary`,fill:`currentColor`})}),(0,V.jsx)(`div`,{className:`absolute -inset-2 -z-10 animate-[spin_3s_linear_infinite] rounded-full border-t-2 border-primary/40`})]}),(0,V.jsxs)(`div`,{className:`text-center`,children:[(0,V.jsxs)(ik.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},className:`mb-4 inline-flex items-center gap-2 rounded-full border border-primary/20 bg-primary/10 px-4 py-1.5 text-[10px] font-bold uppercase tracking-widest text-primary`,children:[(0,V.jsx)(qA,{size:14,className:`animate-pulse`}),`Secure Authentication`]}),(0,V.jsx)(`h2`,{className:`mb-2 text-2xl font-black tracking-tight text-foreground`,children:`Connecting to Provider`}),(0,V.jsx)(`p`,{className:`max-w-[240px] text-sm font-medium text-muted-foreground/80`,children:`Please wait while we redirect you to the secure login page.`})]})]})})}function K9(){let{mode:e}=ur(),t=or(),[n,r]=qi(),{login:i,setupUsername:a,isAuthenticated:o,status:s}=Jv(),[c,l]=(0,b.useState)(!1),[u,d]=(0,b.useState)(``),[f,p]=(0,b.useState)(!1),[m,h]=(0,b.useState)(0),[g,_]=(0,b.useState)(0),[,v]=(0,b.useState)(!1),[y,x]=(0,b.useState)(``),[S,C]=(0,b.useState)(0),{showToast:w}=Gx(),T=(0,b.useRef)(!1),E=(0,b.useRef)(null),D=(0,b.useRef)(null),[O,k]=(0,b.useState)(null),A=e===`forgot-password`,j=e!==`signup`&&!A,M=()=>{j?(_(e=>e+1),x(``),C(e=>e+1)):h(e=>e+1),d(``),v(!1),l(!1),p(!1),t(`/auth/${j?`signup`:`login`}`,{replace:!0})},N=(0,b.useCallback)(async e=>{let t=e.trim().toLowerCase();if(!(!t||T.current)){T.current=!0;try{await Gv.resendConfirmation(t),w({type:`success`,message:`Verification Email Sent`,description:`A new verification email has been sent. Please check your inbox or spam/junk folder.`})}catch(e){e instanceof ho?e.status===429||e.details?.error===`rate_limit_exceeded`?w({type:`error`,message:`Too Many Requests`,description:`Please wait a moment before requesting another verification email.`}):w({type:`error`,message:`Unable to Resend Email`,description:e.message}):w({type:`error`,message:`Unable to Resend Email`,description:`Something went wrong while resending the verification email. Please try again.`})}finally{T.current=!1}}},[w]);(0,b.useEffect)(()=>{n.get(`oauth_error`)||o&&t(`/dashboard`,{replace:!0})},[o,t,n]),(0,b.useEffect)(()=>{sessionStorage.removeItem(`oauth_loading`);let e=n.get(`oauth_error`);if(e){queueMicrotask(()=>{w({type:`error`,message:`Authentication Failed`,description:e})});let t=new URLSearchParams(n);t.delete(`oauth_error`),r(t,{replace:!0})}let t=e=>{e.persisted&&p(!1)};return window.addEventListener(`pageshow`,t),()=>window.removeEventListener(`pageshow`,t)},[n,r,w]),(0,b.useEffect)(()=>{A||n.get(`pwreset`)===`success`&&queueMicrotask(()=>{w({type:`success`,message:`Password Reset Success`,description:`Your password has been reset. Sign in with your new password.`}),r({},{replace:!0})})},[A,n,r,w]),(0,b.useEffect)(()=>{let e=n.get(`temp_user_id`),t=n.get(`pending_email`);if(e){queueMicrotask(()=>{x(e),C(e=>e+1)});let t=new URLSearchParams(n);t.delete(`temp_user_id`),r(t,{replace:!0});return}if(t){queueMicrotask(()=>w({type:`warning`,message:`Email Verification Required`,description:`Please verify your email address. Check your inbox or spam/junk folder.`,actionLabel:`Resend`,onAction:()=>{N(t)}}));let e=new URLSearchParams(n);e.delete(`pending_email`),r(e,{replace:!0});return}},[n,r,w,N]),(0,b.useEffect)(()=>{if(A){queueMicrotask(()=>k(null));return}let e=()=>{let e=j?E.current:D.current;e&&k(e.offsetHeight)};e();let t=new ResizeObserver(e);return E.current&&t.observe(E.current),D.current&&t.observe(D.current),()=>t.disconnect()},[A,j,y,m,g]);let P=async(e,t)=>{d(``),x(``),l(!0);try{await i({identifier:e,password:t})}catch(t){if(t instanceof ho)if(t.details?.error===`email_not_verified`)d(``),w({type:`warning`,message:`Email Not Verified`,description:`Your email is not verified. Please check your inbox or spam/junk folder.`,actionLabel:`Resend`,onAction:()=>{N(e)}});else if(t.details?.error===`username_required`){let e=t.details?.temp_user_id;typeof e==`string`&&e?(x(e),C(e=>e+1)):d(`Your account setup requires a username, but we could not load setup details. Please try again.`)}else d(t.message);else d(`Unable to sign in. Please try again.`)}finally{l(!1)}},F=async e=>{if(y){d(``),l(!0);try{await a(y,e),x(``)}catch(e){e instanceof ho?e.details?.error===`username_already_taken`||e.details?.error===`username_already_exists`?d(`Username is already taken. Please choose another.`):e.status>=500?d(`We are having trouble saving your username right now. Please try again later.`):d(e.message):d(`Unable to complete username setup right now. Please try again later.`)}finally{l(!1)}}},ee=()=>{x(``),d(``),h(e=>e+1)};return y?(0,V.jsxs)(`div`,{className:`relative min-h-screen overflow-hidden bg-background`,children:[(0,V.jsxs)(`div`,{className:`pointer-events-none absolute inset-0 -z-10 overflow-hidden`,"aria-hidden":`true`,children:[(0,V.jsx)(`div`,{className:`absolute -top-[10%] -left-[10%] h-[600px] w-[600px] rounded-full bg-primary/10 blur-[120px] dark:bg-primary/20`}),(0,V.jsx)(`div`,{className:`absolute top-[40%] -right-[5%] h-[500px] w-[500px] rounded-full bg-accent/5 blur-[100px] dark:bg-accent/10`}),(0,V.jsx)(`div`,{className:`absolute -bottom-[10%] left-1/2 h-[600px] w-[800px] -translate-x-1/2 roun
473ded-full bg-primary/5 blur-[120px] dark:bg-primary/10`}),(0,V.jsxs)(`svg`,{className:`absolute inset-0 h-full w-full opacity-[0.03] dark:opacity-[0.05]`,xmlns:`http://www.w3.org/2000/svg`,children:[(0,V.jsx)(`defs`,{children:(0,V.jsx)(`pattern`,{id:`grid`,width:`40`,height:`40`,patternUnits:`userSpaceOnUse`,children:(0,V.jsx)(`path`,{d:`M 40 0 L 0 0 0 40`,fill:`none`,stroke:`currentColor`,strokeWidth:`1`})})}),(0,V.jsx)(`rect`,{width:`100%`,height:`100%`,fill:`url(#grid)`})]})]}),(0,V.jsx)(`div`,{className:`container relative mx-auto flex min-h-screen flex-col items-center justify-center px-4 py-12 sm:px-6 lg:px-8`,children:(0,V.jsxs)(`div`,{className:`w-full max-w-5xl`,children:[(0,V.jsxs)(`div`,{className:`grid gap-0 overflow-hidden rounded-[2.5rem] border border-border bg-surface/40 shadow-[0_40px_100px_-20px_rgba(0,0,0,0.15)] backdrop-blur-xl lg:grid-cols-2`,children:[(0,V.jsxs)(`div`,{className:`relative isolate hidden flex-col justify-between overflow-hidden p-10 text-white lg:flex`,children:[(0,V.jsx)(`div`,{className:`absolute inset-0 z-0 bg-gradient-to-br from-slate-900 via-indigo-800 to-blue-900 dark:from-slate-950 dark:via-indigo-900 dark:to-slate-900`}),(0,V.jsxs)(`div`,{className:`relative z-10`,children:[(0,V.jsx)(`div`,{className:`mb-8 inline-flex h-12 w-12 items-center justify-center rounded-2xl bg-white/10 backdrop-blur-md`,children:(0,V.jsx)(hj,{size:24,className:`text-white`,fill:`currentColor`})}),(0,V.jsxs)(`h2`,{className:`mb-6 text-4xl font-black tracking-tight`,children:[`Almost there, `,(0,V.jsx)(`br`,{}),`Explorer.`]}),(0,V.jsx)(`p`,{className:`mb-10 text-lg leading-relaxed text-white/80`,children:`You're just seconds away from accessing the most powerful marketplace listing alerts in the industry.`}),(0,V.jsx)(`div`,{className:`space-y-6`,children:[{icon:(0,V.jsx)(aA,{size:20}),title:`Global Reach`,desc:`Access 20+ marketplaces worldwide.`},{icon:(0,V.jsx)(hj,{size:20}),title:`Zero Latency`,desc:`Get notified the instant a deal lands.`},{icon:(0,V.jsx)(qA,{size:20}),title:`Enterprise Security`,desc:`Your data is encrypted and private.`}].map((e,t)=>(0,V.jsxs)(ik.div,{initial:{opacity:0,x:-20},animate:{opacity:1,x:0},transition:{delay:.3+t*.1},className:`flex gap-4`,children:[(0,V.jsx)(`div`,{className:`flex h-10 w-10 shrink-0 items-center justify-center rounded-xl bg-white/10`,children:e.icon}),(0,V.jsxs)(`div`,{children:[(0,V.jsx)(`h4`,{className:`font-bold text-white`,children:e.title}),(0,V.jsx)(`p`,{className:`text-sm text-white/60`,children:e.desc})]})]},t))})]}),(0,V.jsx)(`div`,{className:`relative z-10 mt-12 rounded-2xl bg-white/5 p-6 backdrop-blur-sm`,children:(0,V.jsxs)(`div`,{className:`flex items-center gap-3`,children:[(0,V.jsx)(`div`,{className:`flex -space-x-2`,children:[PDe,FDe,IDe].map((e,t)=>(0,V.jsx)(`img`,{src:e,alt:`Community member ${t+1}`,className:`h-8 w-8 rounded-full border-2 border-primary object-cover`,loading:`lazy`},e))}),(0,V.jsx)(`p`,{className:`text-xs font-medium text-white/70`,children:`Joined by 10k+ professionals globally`})]})})]}),(0,V.jsx)(`div`,{className:`bg-surface/60`,children:(0,V.jsx)(G9,{isSubmitting:c||s===`loading`,submitError:u,onSubmit:F,onBackToLogin:ee,onClearSubmitError:()=>d(``)},`username-setup-form-${S}`)})]}),(0,V.jsxs)(`div`,{className:`mt-6 flex flex-wrap items-center justify-center gap-x-5 gap-y-2 text-xs font-medium text-muted-foreground sm:mt-7 sm:gap-x-6 sm:text-sm md:mt-8 md:gap-x-8`,children:[(0,V.jsx)(`a`,{href:`#`,className:`transition-colors hover:text-primary`,children:`Terms of Service`}),(0,V.jsx)(`a`,{href:`#`,className:`transition-colors hover:text-primary`,children:`Privacy Policy`}),(0,V.jsx)(`a`,{href:`#`,className:`transition-colors hover:text-primary`,children:`Support`})]})]})})]}):A?(0,V.jsx)(`div`,{className:`flex min-h-[calc(100dvh-4.5rem)] items-center justify-center bg-background px-3 py-3 sm:px-5 sm:py-4 md:px-7 md:py-5`,children:(0,V.jsxs)(`div`,{className:`w-full max-w-lg`,children:[(0,V.jsx)(`div`,{className:`relative overflow-hidden rounded-[1.75rem] border border-border bg-surface text-foreground shadow-[0_40px_100px_-20px_rgba(0,0,0,0.2)] dark:shadow-[0_40px_100px_-20px_rgba(0,0,0,0.6)]`,children:(0,V.jsx)(zDe,{onBackToLogin:()=>t(`/auth/login`,{replace:!0})})}),(0,V.jsxs)(`div`,{className:`mt-4 flex flex-wrap items-center justify-center gap-x-5 gap-y-2 text-xs font-medium text-muted-foreground sm:mt-5 sm:gap-x-6 sm:text-sm md:mt-6 md:gap-x-8`,children:[(0,V.jsx)(`a`,{href:`#`,className:`transition-colors hover:text-primary`,children:`Terms of Service`}),(0,V.jsx)(`a`,{href:`#`,className:`transition-colors hover:text-primary`,children:`Privacy Policy`}),(0,V.jsx)(`a`,{href:`#`,className:`transition-colors hover:text-primary`,children:`Support`})]})]})}):(0,V.jsxs)(`div`,{className:`flex min-h-screen items-center justify-center bg-background p-3 sm:p-5 md:p-7`,children:[(0,V.jsxs)(`div`,{className:`w-full max-w-[1100px]`,children:[(0,V.jsx)(`div`,{className:`relative overflow-hidden rounded-[1.75rem] border border-border bg-surface text-foreground shadow-[0_40px_100px_-20px_rgba(0,0,0,0.2)] dark:shadow-[0_40px_100px_-20px_rgba(0,0,0,0.6)] md:[--panel-w:24%] lg:[--panel-w:28%] xl:[--panel-w:32%]`,children:(0,V.jsxs)(`div`,{className:`relative`,children:[(0,V.jsx)(`div`,{className:`hidden overflow-hidden transition-[left] duration-700 ease-in-out md:absolute md:inset-y-0 md:z-30 md:block md:min-
473h-[320px] md:w-[var(--panel-w)] ${j?`md:left-0`:`md:left-[calc(100%-var(--panel-w))]`}`,children:(0,V.jsx)(HDe,{isLogin:j,onToggle:M})}),(0,V.jsx)(`div`,{className:`relative z-20 min-w-0 bg-surface md:h-[var(--auth-forms-h)] md:transition-[height] md:duration-700 md:ease-in-out`,style:O?{"--auth-forms-h":`${O}px`}:void 0,children:(0,V.jsxs)(`div`,{className:`relative`,children:[(0,V.jsx)(`div`,{ref:E,"aria-hidden":!j,className:`transition-all duration-500 ease-out ${j?`relative pointer-events-auto opacity-100 delay-300 md:ml-auto md:w-[calc(100%-var(--panel-w))]`:`pointer-events-none absolute inset-0 opacity-0 md:left-auto md:right-0 md:w-[calc(100%-var(--panel-w))]`}`,children:y?(0,V.jsx)(G9,{isSubmitting:c||s===`loading`,submitError:u,onSubmit:F,onBackToLogin:ee,onClearSubmitError:()=>d(``)},`username-setup-form-${S}`):(0,V.jsx)(BDe,{onToggle:M,onLogin:P,isSubmitting:c||s===`loading`,submitError:u,isGoogleLoading:f,onGoogleLoadingChange:p},`login-form-${m}`)}),(0,V.jsx)(`div`,{ref:D,"aria-hidden":j,className:`transition-all duration-500 ease-out ${j?`pointer-events-none absolute inset-0 opacity-0 md:left-0 md:right-auto md:w-[calc(100%-var(--panel-w))]`:`relative pointer-events-auto opacity-100 delay-300 md:mr-auto md:w-[calc(100%-var(--panel-w))]`}`,children:(0,V.jsx)(VDe,{onToggle:M,onRegisterSuccess:e=>{w({type:`success`,message:`Success`,description:e})},isGoogleLoading:f,onGoogleLoadingChange:p},`signup-form-${g}`)})]})})]})}),(0,V.jsxs)(`div`,{className:`mt-6 flex flex-wrap items-center justify-center gap-x-5 gap-y-2 text-xs font-medium text-muted-foreground sm:mt-7 sm:gap-x-6 sm:text-sm md:mt-8 md:gap-x-8`,children:[(0,V.jsx)(`a`,{href:`#`,className:`transition-colors hover:text-primary`,children:`Terms of Service`}),(0,V.jsx)(`a`,{href:`#`,className:`transition-colors hover:text-primary`,children:`Privacy Policy`}),(0,V.jsx)(`a`,{href:`#`,className:`transition-colors hover:text-primary`,children:`Support`})]})]}),(0,V.jsx)(zD,{children:f&&(0,V.jsx)(UDe,{})})]})}var q9=`oauth_processed_code:`;function WDe(e){try{let t=sessionStorage.getItem(`${q9}${e}`);return t===`processing`||t===`done`}catch{return!1}}function J9(e){try{sessionStorage.setItem(`${q9}${e}`,`done`)}catch{}}function GDe(e){try{let t=`${q9}${e}`,n=sessionStorage.getItem(t);return n===`processing`||n===`done`?!1:(sessionStorage.setItem(t,`processing`),!0)}catch{return!0}}function Y9(e){try{sessionStorage.removeItem(`${q9}${e}`)}catch{}}function KDe(){let[e]=qi(),t=or(),[n,r]=(0,b.useState)(`Verifying your account...`),[i,a]=(0,b.useState)(!0);return(0,b.useEffect)(()=>{(async()=>{let n=e.get(`code`),i=e.get(`error`),o=e.get(`state`),s=WTe(o),c=s?.intent??`login`,l=s?.returnTo??`/dashboard/settings/linked-accounts`,u=s?.provider??`google`,d=e=>{if(sessionStorage.removeItem(`oauth_loading`),c===`link`){t(`${l}?oauth_error=${encodeURIComponent(e)}`,{replace:!0});return}t(`/auth?oauth_error=${encodeURIComponent(e)}`,{replace:!0})};if(i){d(`Authentication cancelled or failed`);return}if(!n){d(`No authorization code received`);return}if(!WDe(n)&&GDe(n)){if(o){let e=s?.nonce,t=sessionStorage.getItem(K7),n=VTe(),r=t||n;if(!e||!r||e!==r){Y7(),d(`Invalid or missing OAuth state. Please try again.`);return}}else if(c===`link`){Y7(),d(`Invalid OAuth state. Please try again.`);return}if(c===`link`){try{r(`Linking your account...`);let e=await Ks({provider:u,code:n,redirect_uri:J7()});J9(n),Y7(),sessionStorage.removeItem(`oauth_loading`);let i=new URLSearchParams({linked:u});e.email_mismatch&&i.set(`email_mismatch`,`true`),t(`${l}?${i.toString()}`,{replace:!0})}catch(e){Y9(n),Y7(),sessionStorage.removeItem(`oauth_loading`);let t=`Failed to link account. Please try again.`;e instanceof ho&&(t=e.message),d(t)}return}try{r(`Securely signing you in...`);let i=J7(),o=await Gv.oauthLogin({provider:u,code:n,redirect_uri:i}),s=o?.token_response;if(o?.requires_username){r(`Setting up your profile...`);let e=o?.temp_user_id;J9(n),Y7(),sessionStorage.removeItem(`oauth_loading`),await new Promise(e=>setTimeout(e,600)),t(`/auth?temp_user_id=${encodeURIComponent(e||``)}`,{replace:!0});return}if(o?.requires_email_verification||o?.pending_email){r(`Finalizing verification...`);let i=o?.pending_email||e.get(`email`)||``;J9(n),Y7(),sessionStorage.removeItem(`oauth_loading`),await new Promise(e=>setTimeout(e,600)),t(`/auth?pending_email=${encodeURIComponent(i)}`,{replace:!0});return}if(s){r(`Authentication successful!`),a(!1);try{Eo.setTokens({accessToken:s.access_token,refreshToken:s.refresh_token})}catch{}J9(n),Y7(),sessionStorage.removeItem(`oauth_loading`),await new Promise(e=>setTimeout(e,800)),window.location.replace(`/dashboard`);return}Y7(),sessionStorage.removeItem(`oauth_loading`),t(`/auth?oauth_error=OAuth%20completed%20but%20login%20failed.%20Please%20try%20again.`,{replace:!0})}catch(e){Y9(n),Y7(),sessionStorage.removeItem(`oauth_loading`);let r=`Authentication failed. Please try again.`;e instanceof ho&&(r=e.message),t(`/auth?oauth_error=${encodeURIComponent(r)}`,{replace:!0})}}})()},[t,e]),(0,V.jsxs)(`div`,{className:`relative flex min-h-screen items-center justify-center overflow-hidden bg-background`,children:[(0,V.jsxs)(`div`,{className:`pointer-events-none absolute inset-0 -z-10 overflow-hidden`,"aria-hidden":`true`,children:[(0,V.jsx)(`div`,{className:`absolute -top-[10%] -left-[10%] h-[600px] w-[600px] rounded-full bg-primary/10 blur-[120px] dark:bg-primary/20`}),(0,V.jsx)(`div`,{className:`absolute top-[40%] -right-[5%] h-[500px] w-[500px] rounded-full bg-accent/5 blur-[100px] dark:bg-accent/10`}),(0,V.jsx)(`div`,{className:`absolute -bottom-[10%] left-1/2 h-[600px] w-[800px] -translate-x-1/2 roun
473ded-full bg-primary/5 blur-[120px] dark:bg-primary/10`}),(0,V.jsxs)(`svg`,{className:`absolute inset-0 h-full w-full opacity-[0.03] dark:opacity-[0.05]`,xmlns:`http://www.w3.org/2000/svg`,children:[(0,V.jsx)(`defs`,{children:(0,V.jsx)(`pattern`,{id:`grid-callback`,width:`40`,height:`40`,patternUnits:`userSpaceOnUse`,children:(0,V.jsx)(`path`,{d:`M 40 0 L 0 0 0 40`,fill:`none`,stroke:`currentColor`,strokeWidth:`1`})})}),(0,V.jsx)(`rect`,{width:`100%`,height:`100%`,fill:`url(#grid-callback)`})]})]}),(0,V.jsxs)(`div`,{className:`relative z-10 w-full max-w-md px-6`,children:[(0,V.jsx)(zD,{mode:`wait`,children:i?(0,V.jsxs)(ik.div,{initial:{opacity:0,scale:.95},animate:{opacity:1,scale:1},exit:{opacity:0,scale:1.05},transition:{duration:.5,ease:`easeOut`},className:`flex flex-col items-center`,children:[(0,V.jsxs)(`div`,{className:`relative mb-12`,children:[(0,V.jsx)(`div`,{className:`absolute inset-0 -z-10 h-full w-full animate-pulse rounded-full bg-primary/20 blur-2xl`}),(0,V.jsx)(`div`,{className:`absolute -inset-4 -z-10 animate-[spin_4s_linear_infinite] rounded-full border border-primary/20 border-t-primary/40`}),(0,V.jsxs)(`div`,{className:`relative flex h-24 w-24 items-center justify-center rounded-full border border-white/20 bg-white/10 shadow-2xl backdrop-blur-xl dark:border-white/5 dark:bg-white/5`,children:[(0,V.jsx)(ik.div,{animate:{rotate:360},transition:{duration:2,repeat:1/0,ease:`linear`},children:(0,V.jsx)(_A,{className:`h-10 w-10 text-primary`})}),(0,V.jsx)(ik.div,{initial:{opacity:0,scale:.5},animate:{opacity:[.4,1,.4],scale:[.9,1.1,.9]},transition:{duration:2,repeat:1/0,ease:`easeInOut`},className:`absolute -right-1 -top-1 rounded-full bg-primary p-1.5 text-white shadow-lg`,children:(0,V.jsx)(vA,{size:12,fill:`currentColor`})})]})]}),(0,V.jsxs)(`div`,{className:`text-center`,children:[(0,V.jsxs)(ik.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},className:`mb-3 inline-flex items-center gap-2 rounded-full border border-primary/20 bg-primary/5 px-4 py-1.5 text-xs font-bold uppercase tracking-widest text-primary`,children:[(0,V.jsx)(ej,{size:14,className:`animate-pulse`}),`Authentication in progress`]}),(0,V.jsx)(`h1`,{className:`mb-4 text-2xl font-black tracking-tight text-foreground sm:text-3xl`,children:n}),(0,V.jsxs)(`div`,{className:`mx-auto flex max-w-[280px] flex-col items-center gap-4`,children:[(0,V.jsx)(`div`,{className:`h-1.5 w-full overflow-hidden rounded-full bg-muted/30 dark:bg-white/5`,children:(0,V.jsx)(ik.div,{initial:{x:`-100%`},animate:{x:`100%`},transition:{duration:1.5,repeat:1/0,ease:`easeInOut`}
473,className:`h-full w-1/2 rounded-full bg-gradient-to-r from-transparent via-primary to-transparent`})}),(0,V.jsx)(`p`,{className:`text-sm font-medium text-muted-foreground/80`,children:`Encrypting your session and establishing a secure connection to the server.`})]})]})]},`verifying`):(0,V.jsxs)(ik.div,{initial:{opacity:0,scale:.95},animate:{opacity:1,scale:1},className:`flex flex-col items-center text-center`,children:[(0,V.jsx)(`div`,{className:`mb-8 flex h-24 w-24 items-center justify-center rounded-full border border-success/20 bg-success/10 text-success shadow-2xl backdrop-blur-xl`,children:(0,V.jsx)(ik.div,{initial:{scale:0},animate:{scale:1},transition:{type:`spring`,damping:12,stiffness:200},children:(0,V.jsx)(qA,{size:48,strokeWidth:1.5})})}),(0,V.jsx)(`h1`,{className:`mb-3 text-3xl font-black tracking-tight text-foreground`,children:`Welcome to InstaSnag`}),(0,V.jsx)(`p`,{className:`text-muted-foreground`,children:`Redirecting you to your dashboard...`})]},`success`)}),(0,V.jsxs)(ik.div,{initial:{opacity:0},animate:{opacity:1},transition:{delay:1},className:`mt-16 flex items-center justify-center gap-6`,children:[(0,V.jsxs)(`div`,{className:`flex items-center gap-2 text-[10px] font-bold uppercase tracking-widest text-muted-foreground/40`,children:[(0,V.jsx)(hj,{size:12}),`Enterprise Grade`]}),(0,V.jsx)(`div`,{className:`h-1 w-1 rounded-full bg-muted-foreground/20`}),(0,V.jsxs)(`div`,{className:`flex items-center gap-2 text-[10px] font-bold uppercase tracking-widest text-muted-foreground/40`,children:[(0,V.jsx)(vA,{size:12}),`SSL Encrypted`]})]})]})]})}var qDe={scraper:`search_create_subscription`,seller:`repost_subscription`,ai:`chat_subscription`};function X9({product:e,children:t}){let{gateReady:n}=Rj(),{ownership:r}=bj(),i=e===`scraper`?r.ownsScraper:e===`seller`?r.ownsSellerProducts:r.ownsAi,a=HM(r);return n&&!i&&!a?(0,V.jsx)(Bz,{}):(0,V.jsx)(P7,{gateReady:n,canAccess:i,deniedReason:qDe[e],redirectTo:a??`/dashboard`,children:t})}function Z9({children:e}){let{gateReady:t,canAccessCreateSearchRoutes:n,canCreateSearch:r,hasSearchQuota:i}=Vj();return(0,V.jsx)(P7,{gateReady:t,canAccess:n,deniedReason:wI(r,i),redirectTo:`/dashboard/searches`,children:e})}function Q9({children:e}){let{gateReady:t,canAccessEditSearchRoutes:n}=Ioe();return(0,V.jsx)(P7,{gateReady:t,canAccess:n,deniedReason:`search_edit_subscription`,redirectTo:`/dashboard/searches`,children:e})}var $9=Pi([{path:`/`,element:(0,V.jsx)(dse,{}),errorElement:(0,V.jsx)(oTe,{}),children:[{index:!0,element:(0,V.jsx)(Iq,{})},{path:`auth`,element:(0,V.jsx)(K9,{})},{path:`auth/:mode`,element:(0,V.jsx)(K9,{})},{path:`auth/oauth/callback`,element:(0,V.jsx)(KDe,{})},{path:`dashboard`,element:(0,V.jsx)(gM,{}),children:[{path:`searches`,element:(0,V.jsx)(X9,{product:`scraper`,children:(0,V.jsx)(lTe,{})})},{path:`searches/:searchId/edit-anything`,element:(0,V.jsx)(X9,{product:`scraper`,children:(0,V.jsx)(Q9,{children:(0,V.jsx)(cP,{mode:`edit`})})})},{path:`searches/:searchId/edit-vehicle`,element:(0,V.jsx)(X9,{product:`scraper`,children:(0,V.jsx)(Q9,{children:(0,V.jsx)(tce,{})})})},{path:`searches/:searchId/duplicate-anything`,element:(0,V.jsx)(X9,{product:`scraper`,children:(0,V.jsx)(Z9,{children:(0,V.jsx)(cP,{mode:`duplicate`})})})},{path:`searches/:searchId/duplicate-vehicle`,element:(0,V.jsx)(X9,{product:`scraper`,children:(0,V.jsx)(Z9,{children:(0,V.jsx)($se,{})})})},{path:`searches/new/anything`,element:(0,V.jsx)(X9,{product:`scraper`,children:(0,V.jsx)(Z9,{children:(0,V.jsx)(cP,{})})})},{path:`searches/new/category/:categoryId/subcategory/:subcategoryId`,element:(0,V.jsx)(X9,{product:`scraper`,children:(0,V.jsx)(Z9,{children:(0,V.jsx)(Zse,{})})})},{path:`searches/new/category/:categoryId`,element:(0,V.jsx)(X9,{product:`scraper`,children:(0,V.jsx)(Z9,{children:(0,V.jsx)(Qse,{})})})},{path:`searches/new`,element:(0,V.jsx)(X9,{product:`scraper`,children:(0,V.jsx)(Z9,{children:(0,V.jsx)(mP,{})})})},{path:`feed/:listingId?`,element:(0,V.jsx)(X9,{product:`scraper`,children:(0,V.jsx)(Cle,{})})},{path:`personal/:listingId?`,element:(0,V.jsx)(X9,{product:`seller`,children:(0,V.jsx)(Uq,{})})},{path:`chats/:conversationId?`,element:(0,V.jsx)(X9,{product:`ai`,children:(0,V.jsx)(Qce,{})})},{path:`settings`,element:(0,V.jsx)(bTe,{}),children:[{index:!0,element:(0,V.jsx)(xTe,{})},{path:`meetup-times`,element:(0,V.jsx)(Wr,{to:YN(`availability-times`),replace:!0})},{path:`meetup-time`,element:(0,V.jsx)(Wr,{to:YN(`availability-times`),replace:!0})},{path:`favorites/:listingId?`,element:(0,V.jsx)(v9,{})},...Object.entries(JEe).filter(([e])=>e!==`favorites`).map(([e,t])=>({path:e,element:(0,V.jsx)(t,{})}))]},{path:`:listingId?`,element:(0,V.jsx)(fle,{})}]},{path:`onboarding/*`,element:(0,V.jsx)(Wr,{to:`/`,replace:!0})},{path:`checkout/*`,element:(0,V.jsx)(Wr,{to:`/`,replace:!0})},{path:`contact`,element:(0,V.jsx)(mse,{})},{path:`features`,element:(0,V.jsx)(kle,{})},{path:`pricing`,element:(0,V.jsx)(aTe,{})},{path:`terms`,element:(0,V.jsx)(_De,{})},{path:`privacy`,element:(0,V.jsx)(NDe,{})},{path:`download`,element:(0,V.jsx)(tDe,{})},{path:`l/:token`,element:(0,V.jsx)(kDe,{})},{path:`verify-email`,element:(0,V.jsx)(MDe,{})},{path:`*`,element:(0,V.jsx)(Wq,{})}]}]),JDe=$9.subscribe(e=>{e.navigation.state===`idle`&&Vv()});
473(void 0)?.dispose(JDe),(0,S.createRoot)(document.getElementById(`root`)).render((0,V.jsx)(b.StrictMode,{children:(0,V.jsx)(zoe,{children:(0,V.jsx)(ia,{router:$9})})}));export{u as a,c as i,p as n,s as r,qv as t};
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.