vendor: 6,122 bytes, lines 1-9
1var K0=t=>{throw TypeError(t)};var np=(t,e,n)=>e.has(t)||K0("Cannot "+n);var D=(t,e,n)=>(np(t,e,"read from private field"),n?n.call(t):e.get(t)),ve=(t,e,n)=>e.has(t)?K0("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(t):e.set(t,n),le=(t,e,n,r)=>(np(t,e,"write to private field"),r?r.call(t,n):e.set(t,n),n),kt=(t,e,n)=>(np(t,e,"access private method"),n);var du=(t,e,n,r)=>({set _(s){le(t,e,s,n)},get _(){return D(t,e,r)}});function GA(t,e){for(var n=0;n<e.length;n++){const r=e[n];if(typeof r!="string"&&!Array.isArray(r)){for(const s in r)if(s!=="default"&&!(s in t)){const i=Object.getOwnPropertyDescriptor(r,s);i&&Object.defineProperty(t,s,i.get?i:{enumerable:!0,get:()=>r[s]})}}}return Object.freeze(Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}))}(function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.supports("modulepreload"))return;for(const s of document.querySelectorAll('link[rel="modulepreload"]'))r(s);new MutationObserver(s=>{for(const i of s)if(i.type==="childList")for(const o of i.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&r(o)}).observe(document,{childList:!0,subtree:!0});function n(s){const i={};return s.integrity&&(i.integrity=s.integrity),s.referrerPolicy&&(i.referrerPolicy=s.referrerPolicy),s.crossOrigin==="use-credentials"?i.credentials="include":s.crossOrigin==="anonymous"?i.credentials="omit":i.credentials="same-origin",i}function r(s){if(s.ep)return;s.ep=!0;const i=n(s);fetch(s.href,i)}})();function Xk(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var Jk={exports:{}},Bh={},Zk={exports:{}},pe={};/** 2 * @license React 3 * react.production.min.js 4 * 5 * Copyright (c) Facebook, Inc. and its affiliates. 6 * 7 * This source code is licensed under the MIT license found in the 8 * LICENSE file in the root directory of this source tree. 9 */var Uc=Symbol.for("react.element"),qA=Symbol.for("react.portal"),YA=Symbol.for("react.fragment"),QA=Symbol.for("react.strict_mode"),XA=Symbol.for("react.profiler"),JA=Symbol.for("react.provider"),ZA=Symbol.for("react.context"),e2=Symbol.for("react.forward_ref"),t2=Symbol.for("react.suspense"),n2=Symbol.for("react.memo"),r2=Symbol.for("react.lazy"),G0=Symbol.iterator;function s2(t){return t===null||typeof t!="object"?null:(t=G0&&t[G0]||t["@@iterator"],typeof t=="function"?t:null)}var eE={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},tE=Object.assign,nE={};function Ra(t,e,n){this.props=t,this.context=e,this.refs=nE,this.updater=n||eE}Ra.prototype.isReactComponent={};Ra.prototype.setState=function(t,e){if(typeof t!="object"&&typeof t!="function"&&t!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,t,e,"setState")};Ra.prototype.forceUpdate=function(t){this.updater.enqueueForceUpdate(this,t,"forceUpdate")};function rE(){}rE.prototype=Ra.prototype;function Oy(t,e,n){this.props=t,this.context=e,this.refs=nE,this.updater=n||eE}var Ly=Oy.prototype=new rE;Ly.constructor=Oy;tE(Ly,Ra.prototype);Ly.isPureReactComponent=!0;var q0=Array.isArray,sE=Object.prototype.hasOwnProperty,Fy={current:null},iE={key:!0,ref:!0,__self:!0,__source:!0};function oE(t,e,n){var r,s={},i=null,o=null;if(e!=null)for(r in e.ref!==void 0&&(o=e.ref),e.key!==void 0&&(i=""+e.key),e)sE.call(e,r)&&!iE.hasOwnProperty(r)&&(s[r]=e[r]);var a=arguments.length-2;if(a===1)s.children=n;else if(1<a){for(var c=Array(a),u=0;u<a;u++)c[u]=arguments[u+2];s.children=c}if(t&&t.defaultProps)for(r in a=t.defaultProps,a)s[r]===void 0&&(s[r]=a[r]);return{$$typeof:Uc,type:t,key:i,ref:o,props:s,_owner:Fy.current}}function i2(t,e){return{$$typeof:Uc,type:t.type,key:e,ref:t.ref,props:t.props,_owner:t._owner}}function Uy(t){return typeof t=="object"&&t!==null&&t.$$typeof===Uc}function o2(t){var e={"=":"=0",":":"=2"};return"$"+t.replace(/[=:]/g,function(n){return e[n]})}var Y0=/\/+/g;function rp(t,e){return typeof t=="object"&&t!==null&&t.key!=null?o2(""+t.key):e.toString(36)}function ed(t,e,n,r,s){var i=typeof t;(i==="undefined"||i==="boolean")&&(t=null);var o=!1;if(t===null)o=!0;else switch(i){case"string":case"number":o=!0;break;case"object":switch(t.$$typeof){case Uc:case qA:o=!0}}if(o)return o=t,s=s(o),t=r===""?"."+rp(o,0):r,q0(s)?(n="",t!=null&&(n=t.replace(Y0,"$&/")+"/"),ed(s,e,n,"",function(u){return u})):s!=null&&(Uy(s)&&(s=i2(s,n+(!s.key||o&&o.key===s.key?"":(""+s.key).replace(Y0,"$&/")+"/")+t)),e.push(s)),1;if(o=0,r=r===""?".":r+":",q0(t))for(var a=0;a<t.length;a++){i=t[a];var c=r+rp(i,a);o+=ed(i,e,n,c,s)}else if(c=s2(t),typeof c=="function")for(t=c.call(t),a=0;!(i=t.next()).done;)i=i.value,c=r+rp(i,a++),o+=ed(i,e,n,c,s);else if(i==="object")throw e=String(t),Error("Objects are not valid as a React child (found: "+(e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e)+"). If you meant to render a collection of children, use an array instead.");return o}function hu(t,e,n){if(t==null)return t;var r=[],s=0;return ed(t,r,"","",function(i){return e.call(n,i,s++)}),r}function a2(t){if(t._status===-1){var e=t._result;e=e(),e.then(function(n){(t._status===0||t._status===-1)&&(t._status=1,t._result=n)},function(n){(t._status===0||t._status===-1)&&(t._status=2,t._result=n)}),t._status===-1&&(t._status=0,t._result=e)}if(t._status===1)return t._result.default;throw t._result}var Ht={current:null},td={transition:null},l2={ReactCurrentDispatcher:Ht,ReactCurrentBatchConfig:td,ReactCurrentOwner:Fy};function aE(){throw Error("act(...) is not supported in production builds of React.")}pe.Children={map:hu,forEach:function(t,e,n){hu(t,function(){e.apply(this,arguments)},n)},count:function(t){var e=0;return hu(t,function(){e++}),e},toArray:function(t){return hu(t,function(e){return e})||[]},only:function(t){if(!Uy(t))throw Error("React.Children.only expected to receive a single React element child.");return t}};pe.Component=Ra;pe.Fragment=YA;pe.Profiler=XA;pe.PureComponent=Oy;pe.StrictMode=QA;pe.Suspense=t2;
vendor: 9,014 bytes, lines 9-33
9pe.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=l2;pe.act=aE;pe.cloneElement=function(t,e,n){if(t==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+t+".");var r=tE({},t.props),s=t.key,i=t.ref,o=t._owner;if(e!=null){if(e.ref!==void 0&&(i=e.ref,o=Fy.current),e.key!==void 0&&(s=""+e.key),t.type&&t.type.defaultProps)var a=t.type.defaultProps;for(c in e)sE.call(e,c)&&!iE.hasOwnProperty(c)&&(r[c]=e[c]===void 0&&a!==void 0?a[c]:e[c])}var c=arguments.length-2;if(c===1)r.children=n;else if(1<c){a=Array(c);for(var u=0;u<c;u++)a[u]=arguments[u+2];r.children=a}return{$$typeof:Uc,type:t.type,key:s,ref:i,props:r,_owner:o}};pe.createContext=function(t){return t={$$typeof:ZA,_currentValue:t,_currentValue2:t,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},t.Provider={$$typeof:JA,_context:t},t.Consumer=t};pe.createElement=oE;pe.createFactory=function(t){var e=oE.bind(null,t);return e.type=t,e};pe.createRef=function(){return{current:null}};pe.forwardRef=function(t){return{$$typeof:e2,render:t}};pe.isValidElement=Uy;pe.lazy=function(t){return{$$typeof:r2,_payload:{_status:-1,_result:t},_init:a2}};pe.memo=function(t,e){return{$$typeof:n2,type:t,compare:e===void 0?null:e}};pe.startTransition=function(t){var e=td.transition;td.transition={};try{t()}finally{td.transition=e}};pe.unstable_act=aE;pe.useCallback=function(t,e){return Ht.current.useCallback(t,e)};pe.useContext=function(t){return Ht.current.useContext(t)};pe.useDebugValue=function(){};pe.useDeferredValue=function(t){return Ht.current.useDeferredValue(t)};pe.useEffect=function(t,e){return Ht.current.useEffect(t,e)};pe.useId=function(){return Ht.current.useId()};pe.useImperativeHandle=function(t,e,n){return Ht.current.useImperativeHandle(t,e,n)};pe.useInsertionEffect=function(t,e){return Ht.current.useInsertionEffect(t,e)};pe.useLayoutEffect=function(t,e){return Ht.current.useLayoutEffect(t,e)};pe.useMemo=function(t,e){return Ht.current.useMemo(t,e)};pe.useReducer=function(t,e,n){return Ht.current.useReducer(t,e,n)};pe.useRef=function(t){return Ht.current.useRef(t)};pe.useState=function(t){return Ht.current.useState(t)};pe.useSyncExternalStore=function(t,e,n){return Ht.current.useSyncExternalStore(t,e,n)};pe.useTransition=function(){return Ht.current.useTransition()};pe.version="18.3.1";Zk.exports=pe;var m=Zk.exports;const V=Xk(m),By=GA({__proto__:null,default:V},[m]);/** 10 * @license React 11 * react-jsx-runtime.production.min.js 12 * 13 * Copyright (c) Facebook, Inc. and its affiliates. 14 * 15 * This source code is licensed under the MIT license found in the 16 * LICENSE file in the root directory of this source tree. 17 */var c2=m,u2=Symbol.for("react.element"),d2=Symbol.for("react.fragment"),h2=Object.prototype.hasOwnProperty,f2=c2.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,p2={key:!0,ref:!0,__self:!0,__source:!0};function lE(t,e,n){var r,s={},i=null,o=null;n!==void 0&&(i=""+n),e.key!==void 0&&(i=""+e.key),e.ref!==void 0&&(o=e.ref);for(r in e)h2.call(e,r)&&!p2.hasOwnProperty(r)&&(s[r]=e[r]);if(t&&t.defaultProps)for(r in e=t.defaultProps,e)s[r]===void 0&&(s[r]=e[r]);return{$$typeof:u2,type:t,key:i,ref:o,props:s,_owner:f2.current}}Bh.Fragment=d2;Bh.jsx=lE;Bh.jsxs=lE;Jk.exports=Bh;var l=Jk.exports,cE={exports:{}},hn={},uE={exports:{}},dE={};/** 18 * @license React 19 * scheduler.production.min.js 20 * 21 * Copyright (c) Facebook, Inc. and its affiliates. 22 * 23 * This source code is licensed under the MIT license found in the 24 * LICENSE file in the root directory of this source tree. 25 */(function(t){function e(E,T){var I=E.length;E.push(T);e:for(;0<I;){var H=I-1>>>1,Q=E[H];if(0<s(Q,T))E[H]=T,E[I]=Q,I=H;else break e}}function n(E){return E.length===0?null:E[0]}function r(E){if(E.length===0)return null;var T=E[0],I=E.pop();if(I!==T){E[0]=I;e:for(var H=0,Q=E.length,ne=Q>>>1;H<ne;){var z=2*(H+1)-1,ue=E[z],Fe=z+1,me=E[Fe];if(0>s(ue,I))Fe<Q&&0>s(me,ue)?(E[H]=me,E[Fe]=I,H=Fe):(E[H]=ue,E[z]=I,H=z);else if(Fe<Q&&0>s(me,I))E[H]=me,E[Fe]=I,H=Fe;else break e}}return T}function s(E,T){var I=E.sortIndex-T.sortIndex;return I!==0?I:E.id-T.id}if(typeof performance=="object"&&typeof performance.now=="function"){var i=performance;t.unstable_now=function(){return i.now()}}else{var o=Date,a=o.now();t.unstable_now=function(){return o.now()-a}}var c=[],u=[],d=1,h=null,f=3,p=!1,x=!1,g=!1,y=typeof setTimeout=="function"?setTimeout:null,w=typeof clearTimeout=="function"?clearTimeout:null,v=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function b(E){for(var T=n(u);T!==null;){if(T.callback===null)r(u);else if(T.startTime<=E)r(u),T.sortIndex=T.expirationTime,e(c,T);else break;T=n(u)}}function _(E){if(g=!1,b(E),!x)if(n(c)!==null)x=!0,M(k);else{var T=n(u);T!==null&&R(_,T.startTime-E)}}function k(E,T){x=!1,g&&(g=!1,w(N),N=-1),p=!0;var I=f;try{for(b(T),h=n(c);h!==null&&(!(h.expirationTime>T)||E&&!O());){var H=h.callback;if(typeof H=="function"){h.callback=null,f=h.priorityLevel;var Q=H(h.expirationTime<=T);T=t.unstable_now(),typeof Q=="function"?h.callback=Q:h===n(c)&&r(c),b(T)}else r(c);h=n(c)}if(h!==null)var ne=!0;else{var z=n(u);z!==null&&R(_,z.startTime-T),ne=!1}return ne}finally{h=null,f=I,p=!1}}var S=!1,C=null,N=-1,P=5,j=-1;function O(){return!(t.unstable_now()-j<P)}function L(){if(C!==null){var E=t.unstable_now();j=E;var T=!0;try{T=C(!0,E)}finally{T?K():(S=!1,C=null)}}else S=!1}var K;if(typeof v=="function")K=function(){v(L)};else if(typeof MessageChannel<"u"){var U=new MessageChannel,A=U.port2;U.port1.onmessage=L,K=function(){A.postMessage(null)}}else K=function(){y(L,0)};function M(E){C=E,S||(S=!0,K())}function R(E,T){N=y(function(){E(t.unstable_now())},T)}t.unstable_IdlePriority=5,t.unstable_ImmediatePriority=1,t.unstable_LowPriority=4,t.unstable_NormalPriority=3,t.unstable_Profiling=null,t.unstable_UserBlockingPriority=2,t.unstable_cancelCallback=function(E){E.callback=null},t.unstable_continueExecution=function(){x||p||(x=!0,M(k))},t.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"):P=0<E?Math.floor(1e3/E):5},t.unstable_getCurrentPriorityLevel=function(){return f},t.unstable_getFirstCallbackNode=function(){return n(c)},t.unstable_next=function(E){switch(f){case 1:case 2:case 3:var T=3;break;default:T=f}var I=f;f=T;try{return E()}finally{f=I}},t.unstable_pauseExecution=function(){},t.unstable_requestPaint=function(){},t.unstable_runWithPriority=function(E,T){switch(E){case 1:case 2:case 3:case 4:case 5:break;default:E=3}var I=f;f=E;try{return T()}finally{f=I}},t.unstable_scheduleCallback=function(E,T,I){var H=t.unstable_now();switch(typeof I=="object"&&I!==null?(I=I.delay,I=typeof I=="number"&&0<I?H+I:H):I=H,E){case 1:var Q=-1;break;case 2:Q=250;break;case 5:Q=1073741823;break;case 4:Q=1e4;break;default:Q=5e3}return Q=I+Q,E={id:d++,callback:T,priorityLevel:E,startTime:I,expirationTime:Q,sortIndex:-1},I>H?(E.sortIndex=I,e(u,E),n(c)===null&&E===n(u)&&(g?(w(N),N=-1):g=!0,R(_,I-H))):(E.sortIndex=Q,e(c,E),x||p||(x=!0,M(k))),E},t.unstable_shouldYield=O,t.unstable_wrapCallback=function(E){var T=f;return function(){var I=f;f=T;try{return E.apply(this,arguments)}finally{f=I}}}})(dE);uE.exports=dE;var m2=uE.exports;/** 26 * @license React 27 * react-dom.production.min.js 28 * 29 * Copyright (c) Facebook, Inc. and its affiliates. 30 * 31 * This source code is licensed under the MIT license found in the 32 * LICENSE file in the root directory of this source tree. 33 */var g2=m,dn=m2;function B(t){for(var e="https://reactjs.org/docs/error-decoder.html?invariant="+t,n=1;n<arguments.length;n++)e+="&args[]="+encodeURIComponent(arguments[n]);return"Minified React error #"+t+"; visit "+e+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var hE=new Set,Jl={};function oo(t,e){ma(t,e),ma(t+"Capture",e)}function ma(t,e){for(Jl[t]=e,t=0;t<e.length;t++)hE.add(e[t])}var Hr=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Im=Object.prototype.hasOwnProperty,y2=/^[: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][: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]*$/,Q0={},X0={};function v2(t){return Im.call(X0,t)?!0:Im.call(Q0,t)?!1:y2.test(t)?X0[t]=!0:(Q0[t]=!0,!1)}function x2(t,e,n,r){if(n!==null&&n.type===0)return!1;switch(typeof e){case"function":case"symbol":return!0;case"boolean":return r?!1:n!==null?!n.acceptsBooleans:(t=t.toLowerCase().slice(0,5),t!=="data-"&&t!=="aria-");default:return!1}}function w2(t,e,n,r){if(e===null||typeof e>"u"||x2(t,e,n,r))return!0;
vendor: 5,200 bytes, lines 33-34
33if(r)return!1;if(n!==null)switch(n.type){case 3:return!e;case 4:return e===!1;case 5:return isNaN(e);case 6:return isNaN(e)||1>e}return!1}function Kt(t,e,n,r,s,i,o){this.acceptsBooleans=e===2||e===3||e===4,this.attributeName=r,this.attributeNamespace=s,this.mustUseProperty=n,this.propertyName=t,this.type=e,this.sanitizeURL=i,this.removeEmptyString=o}var bt={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(t){bt[t]=new Kt(t,0,!1,t,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(t){var e=t[0];bt[e]=new Kt(e,1,!1,t[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(t){bt[t]=new Kt(t,2,!1,t.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(t){bt[t]=new Kt(t,2,!1,t,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(t){bt[t]=new Kt(t,3,!1,t.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(t){bt[t]=new Kt(t,3,!0,t,null,!1,!1)});["capture","download"].forEach(function(t){bt[t]=new Kt(t,4,!1,t,null,!1,!1)});["cols","rows","size","span"].forEach(function(t){bt[t]=new Kt(t,6,!1,t,null,!1,!1)});["rowSpan","start"].forEach(function(t){bt[t]=new Kt(t,5,!1,t.toLowerCase(),null,!1,!1)});var Vy=/[\-:]([a-z])/g;function $y(t){return t[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(t){var e=t.replace(Vy,$y);bt[e]=new Kt(e,1,!1,t,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(t){var e=t.replace(Vy,$y);bt[e]=new Kt(e,1,!1,t,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(t){var e=t.replace(Vy,$y);bt[e]=new Kt(e,1,!1,t,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(t){bt[t]=new Kt(t,1,!1,t.toLowerCase(),null,!1,!1)});bt.xlinkHref=new Kt("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(t){bt[t]=new Kt(t,1,!1,t.toLowerCase(),null,!0,!0)});function zy(t,e,n,r){var s=bt.hasOwnProperty(e)?bt[e]:null;(s!==null?s.type!==0:r||!(2<e.length)||e[0]!=="o"&&e[0]!=="O"||e[1]!=="n"&&e[1]!=="N")&&(w2(e,n,s,r)&&(n=null),r||s===null?v2(e)&&(n===null?t.removeAttribute(e):t.setAttribute(e,""+n)):s.mustUseProperty?t[s.propertyName]=n===null?s.type===3?!1:"":n:(e=s.attributeName,r=s.attributeNamespace,n===null?t.removeAttribute(e):(s=s.type,n=s===3||s===4&&n===!0?"":""+n,r?t.setAttributeNS(r,e,n):t.setAttribute(e,n))))}var ns=g2.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,fu=Symbol.for("react.element"),Co=Symbol.for("react.portal"),So=Symbol.for("react.fragment"),Wy=Symbol.for("react.strict_mode"),Pm=Symbol.for("react.profiler"),fE=Symbol.for("react.provider"),pE=Symbol.for("react.context"),Hy=Symbol.for("react.forward_ref"),jm=Symbol.for("react.suspense"),Rm=Symbol.for("react.suspense_list"),Ky=Symbol.for("react.memo"),xs=Symbol.for("react.lazy"),mE=Symbol.for("react.offscreen"),J0=Symbol.iterator;function nl(t){return t===null||typeof t!="object"?null:(t=J0&&t[J0]||t["@@iterator"],typeof t=="function"?t:null)}var We=Object.assign,sp;function xl(t){if(sp===void 0)try{throw Error()}catch(n){var e=n.stack.trim().match(/\n( *(at )?)/);sp=e&&e[1]||""}return` 34`+sp+t}var ip=!1;function op(t,e){if(!t||ip)return"";ip=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(e)if(e=function(){throw Error()},Object.defineProperty(e.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(e,[])}catch(u){var r=u}Reflect.construct(t,[],e)}else{try{e.call()}catch(u){r=u}t.call(e.prototype)}else{try{throw Error()}catch(u){r=u}t()}}
vendor: 4,643 bytes, lines 34-37
34catch(u){if(u&&r&&typeof u.stack=="string"){for(var s=u.stack.split(` 35`),i=r.stack.split(` 36`),o=s.length-1,a=i.length-1;1<=o&&0<=a&&s[o]!==i[a];)a--;for(;1<=o&&0<=a;o--,a--)if(s[o]!==i[a]){if(o!==1||a!==1)do if(o--,a--,0>a||s[o]!==i[a]){var c=` 37`+s[o].replace(" at new "," at ");return t.displayName&&c.includes("<anonymous>")&&(c=c.replace("<anonymous>",t.displayName)),c}while(1<=o&&0<=a);break}}}finally{ip=!1,Error.prepareStackTrace=n}return(t=t?t.displayName||t.name:"")?xl(t):""}function b2(t){switch(t.tag){case 5:return xl(t.type);case 16:return xl("Lazy");case 13:return xl("Suspense");case 19:return xl("SuspenseList");case 0:case 2:case 15:return t=op(t.type,!1),t;case 11:return t=op(t.type.render,!1),t;case 1:return t=op(t.type,!0),t;default:return""}}function Am(t){if(t==null)return null;if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t;switch(t){case So:return"Fragment";case Co:return"Portal";case Pm:return"Profiler";case Wy:return"StrictMode";case jm:return"Suspense";case Rm:return"SuspenseList"}if(typeof t=="object")switch(t.$$typeof){case pE:return(t.displayName||"Context")+".Consumer";case fE:return(t._context.displayName||"Context")+".Provider";case Hy:var e=t.render;return t=t.displayName,t||(t=e.displayName||e.name||"",t=t!==""?"ForwardRef("+t+")":"ForwardRef"),t;case Ky:return e=t.displayName||null,e!==null?e:Am(t.type)||"Memo";case xs:e=t._payload,t=t._init;try{return Am(t(e))}catch{}}return null}function _2(t){var e=t.type;switch(t.tag){case 24:return"Cache";case 9:return(e.displayName||"Context")+".Consumer";case 10:return(e._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return t=e.render,t=t.displayName||t.name||"",e.displayName||(t!==""?"ForwardRef("+t+")":"ForwardRef");case 7:return"Fragment";case 5:return e;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return Am(e);case 8:return e===Wy?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e}return null}function Zs(t){switch(typeof t){case"boolean":case"number":case"string":case"undefined":return t;case"object":return t;default:return""}}function gE(t){var e=t.type;return(t=t.nodeName)&&t.toLowerCase()==="input"&&(e==="checkbox"||e==="radio")}function k2(t){var e=gE(t)?"checked":"value",n=Object.getOwnPropertyDescriptor(t.constructor.prototype,e),r=""+t[e];if(!t.hasOwnProperty(e)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var s=n.get,i=n.set;return Object.defineProperty(t,e,{configurable:!0,get:function(){return s.call(this)},set:function(o){r=""+o,i.call(this,o)}}),Object.defineProperty(t,e,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(o){r=""+o},stopTracking:function(){t._valueTracker=null,delete t[e]}}}}function pu(t){t._valueTracker||(t._valueTracker=k2(t))}function yE(t){if(!t)return!1;var e=t._valueTracker;if(!e)return!0;var n=e.getValue(),r="";return t&&(r=gE(t)?t.checked?"true":"false":t.value),t=r,t!==n?(e.setValue(t),!0):!1}function Id(t){if(t=t||(typeof document<"u"?document:void 0),typeof t>"u")return null;try{return t.activeElement||t.body}catch{return t.body}}function Dm(t,e){var n=e.checked;return We({},e,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??t._wrapperState.initialChecked})}function Z0(t,e){var n=e.defaultValue==null?"":e.defaultValue,r=e.checked!=null?e.checked:e.defaultChecked;n=Zs(e.value!=null?e.value:n),t._wrapperState={initialChecked:r,initialValue:n,controlled:e.type==="checkbox"||e.type==="radio"?e.checked!=null:e.value!=null}}function vE(t,e){e=e.checked,e!=null&&zy(t,"checked",e,!1)}function Mm(t,e){vE(t,e);var n=Zs(e.value),r=e.type;if(n!=null)r==="number"?(n===0&&t.value===""||t.value!=n)&&(t.value=""+n):t.value!==""+n&&(t.value=""+n);else if(r==="submit"||r==="reset"){t.removeAttribute("value");return}e.hasOwnProperty("value")?Om(t,e.type,n):e.hasOwnProperty("defaultValue")&&Om(t,e.type,Zs(e.defaultValue)),e.checked==null&&e.defaultChecked!=null&&(t.defaultChecked=!!e.defaultChecked)}function ew(t,e,n){if(e.hasOwnProperty("value")||e.hasOwnProperty("defaultValue")){var r=e.type;if(!(r!=="submit"&&r!=="reset"||e.value!==void 0&&e.value!==null))return;e=""+t._wrapperState.initialValue,n||e===t.value||(t.value=e),t.defaultValue=e}n=t.name,n!==""&&(t.name=""),t.defaultChecked=!!t._wrapperState.initialChecked,n!==""&&(t.name=n)}
vendor: 11,615 bytes, line 37
37function Om(t,e,n){(e!=="number"||Id(t.ownerDocument)!==t)&&(n==null?t.defaultValue=""+t._wrapperState.initialValue:t.defaultValue!==""+n&&(t.defaultValue=""+n))}var wl=Array.isArray;function Wo(t,e,n,r){if(t=t.options,e){e={};for(var s=0;s<n.length;s++)e["$"+n[s]]=!0;for(n=0;n<t.length;n++)s=e.hasOwnProperty("$"+t[n].value),t[n].selected!==s&&(t[n].selected=s),s&&r&&(t[n].defaultSelected=!0)}else{for(n=""+Zs(n),e=null,s=0;s<t.length;s++){if(t[s].value===n){t[s].selected=!0,r&&(t[s].defaultSelected=!0);return}e!==null||t[s].disabled||(e=t[s])}e!==null&&(e.selected=!0)}}function Lm(t,e){if(e.dangerouslySetInnerHTML!=null)throw Error(B(91));return We({},e,{value:void 0,defaultValue:void 0,children:""+t._wrapperState.initialValue})}function tw(t,e){var n=e.value;if(n==null){if(n=e.children,e=e.defaultValue,n!=null){if(e!=null)throw Error(B(92));if(wl(n)){if(1<n.length)throw Error(B(93));n=n[0]}e=n}e==null&&(e=""),n=e}t._wrapperState={initialValue:Zs(n)}}function xE(t,e){var n=Zs(e.value),r=Zs(e.defaultValue);n!=null&&(n=""+n,n!==t.value&&(t.value=n),e.defaultValue==null&&t.defaultValue!==n&&(t.defaultValue=n)),r!=null&&(t.defaultValue=""+r)}function nw(t){var e=t.textContent;e===t._wrapperState.initialValue&&e!==""&&e!==null&&(t.value=e)}function wE(t){switch(t){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function Fm(t,e){return t==null||t==="http://www.w3.org/1999/xhtml"?wE(e):t==="http://www.w3.org/2000/svg"&&e==="foreignObject"?"http://www.w3.org/1999/xhtml":t}var mu,bE=function(t){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(e,n,r,s){MSApp.execUnsafeLocalFunction(function(){return t(e,n,r,s)})}:t}(function(t,e){if(t.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in t)t.innerHTML=e;else{for(mu=mu||document.createElement("div"),mu.innerHTML="<svg>"+e.valueOf().toString()+"</svg>",e=mu.firstChild;t.firstChild;)t.removeChild(t.firstChild);for(;e.firstChild;)t.appendChild(e.firstChild)}});function Zl(t,e){if(e){var n=t.firstChild;if(n&&n===t.lastChild&&n.nodeType===3){n.nodeValue=e;return}}t.textContent=e}var Tl={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},E2=["Webkit","ms","Moz","O"];Object.keys(Tl).forEach(function(t){E2.forEach(function(e){e=e+t.charAt(0).toUpperCase()+t.substring(1),Tl[e]=Tl[t]})});function _E(t,e,n){return e==null||typeof e=="boolean"||e===""?"":n||typeof e!="number"||e===0||Tl.hasOwnProperty(t)&&Tl[t]?(""+e).trim():e+"px"}function kE(t,e){t=t.style;for(var n in e)if(e.hasOwnProperty(n)){var r=n.indexOf("--")===0,s=_E(n,e[n],r);n==="float"&&(n="cssFloat"),r?t.setProperty(n,s):t[n]=s}}var C2=We({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function Um(t,e){if(e){if(C2[t]&&(e.children!=null||e.dangerouslySetInnerHTML!=null))throw Error(B(137,t));if(e.dangerouslySetInnerHTML!=null){if(e.children!=null)throw Error(B(60));if(typeof e.dangerouslySetInnerHTML!="object"||!("__html"in e.dangerouslySetInnerHTML))throw Error(B(61))}if(e.style!=null&&typeof e.style!="object")throw Error(B(62))}}function Bm(t,e){if(t.indexOf("-")===-1)return typeof e.is=="string";switch(t){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 Vm=null;function Gy(t){return t=t.target||t.srcElement||window,t.correspondingUseElement&&(t=t.correspondingUseElement),t.nodeType===3?t.parentNode:t}var $m=null,Ho=null,Ko=null;function rw(t){if(t=$c(t)){if(typeof $m!="function")throw Error(B(280));var e=t.stateNode;e&&(e=Hh(e),$m(t.stateNode,t.type,e))}}function EE(t){Ho?Ko?Ko.push(t):Ko=[t]:Ho=t}function CE(){if(Ho){var t=Ho,e=Ko;if(Ko=Ho=null,rw(t),e)for(t=0;t<e.length;t++)rw(e[t])}}function SE(t,e){return t(e)}function NE(){}var ap=!1;function TE(t,e,n){if(ap)return t(e,n);ap=!0;try{return SE(t,e,n)}finally{ap=!1,(Ho!==null||Ko!==null)&&(NE(),CE())}}function ec(t,e){var n=t.stateNode;if(n===null)return null;var r=Hh(n);if(r===null)return null;n=r[e];e:switch(e){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)||(t=t.type,r=!(t==="button"||t==="input"||t==="select"||t==="textarea")),t=!r;break e;default:t=!1}if(t)return null;if(n&&typeof n!="function")throw Error(B(231,e,typeof n));return n}var zm=!1;if(Hr)try{var rl={};Object.defineProperty(rl,"passive",{get:function(){zm=!0}}),window.addEventListener("test",rl,rl),window.removeEventListener("test",rl,rl)}catch{zm=!1}function S2(t,e,n,r,s,i,o,a,c){var u=Array.prototype.slice.call(arguments,3);try{e.apply(n,u)}catch(d){this.onError(d)}}var Il=!1,Pd=null,jd=!1,Wm=null,N2={onError:function(t){Il=!0,Pd=t}};function T2(t,e,n,r,s,i,o,a,c){Il=!1,Pd=null,S2.apply(N2,arguments)}function I2(t,e,n,r,s,i,o,a,c){if(T2.apply(this,arguments),Il){if(Il){var u=Pd;Il=!1,Pd=null}else throw Error(B(198));jd||(jd=!0,Wm=u)}}function ao(t){var e=t,n=t;if(t.alternate)for(;e.return;)e=e.return;else{t=e;do e=t,e.flags&4098&&(n=e.return),t=e.return;while(t)}return e.tag===3?n:null}function IE(t){if(t.tag===13){var e=t.memoizedState;if(e===null&&(t=t.alternate,t!==null&&(e=t.memoizedState)),e!==null)return e.dehydrated}return null}function sw(t){if(ao(t)!==t)throw Error(B(188))}function P2(t){var e=t.alternate;if(!e){if(e=ao(t),e===null)throw Error(B(188));return e!==t?null:t}for(var n=t,r=e;;){var s=n.return;if(s===null)break;var i=s.alternate;if(i===null){if(r=s.return,r!==null){n=r;continue}break}if(s.child===i.child){for(i=s.child;i;){if(i===n)return sw(s),t;if(i===r)return sw(s),e;i=i.sibling}throw Error(B(188))}if(n.return!==r.return)n=s,r=i;else{for(var o=!1,a=s.child;a;){if(a===n){o=!0,n=s,r=i;break}if(a===r){o=!0,r=s,n=i;break}a=a.sibling}if(!o){for(a=i.child;a;){if(a===n){o=!0,n=i,r=s;break}if(a===r){o=!0,r=i,n=s;break}a=a.sibling}if(!o)throw Error(B(189))}}if(n.alternate!==r)throw Error(B(190))}if(n.tag!==3)throw Error(B(188));return n.stateNode.current===n?t:e}function PE(t){return t=P2(t),t!==null?jE(t):null}function jE(t){if(t.tag===5||t.tag===6)return t;for(t=t.child;t!==null;){var e=jE(t);if(e!==null)return e;t=t.sibling}return null}var RE=dn.unstable_scheduleCallback,iw=dn.unstable_cancelCallback,j2=dn.unstable_shouldYield,R2=dn.unstable_requestPaint,Je=dn.unstable_now,A2=dn.unstable_getCurrentPriorityLevel,qy=dn.unstable_ImmediatePriority,AE=dn.unstable_UserBlockingPriority,Rd=dn.unstable_NormalPriority,D2=dn.unstable_LowPriority,DE=dn.unstable_IdlePriority,Vh=null,xr=null;function M2(t){if(xr&&typeof xr.onCommitFiberRoot=="function")try{xr.onCommitFiberRoot(Vh,t,void 0,(t.current.flags&128)===128)}catch{}}var Xn=Math.clz32?Math.clz32:F2,O2=Math.log,L2=Math.LN2;function F2(t){return t>>>=0,t===0?32:31-(O2(t)/L2|0)|0}var gu=64,yu=4194304;function bl(t){switch(t&-t){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: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&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return t&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return t}}function Ad(t,e){var n=t.pendingLanes;if(n===0)return 0;var r=0,s=t.suspendedLanes,i=t.pingedLanes,o=n&268435455;if(o!==0){var a=o&~s;a!==0?r=bl(a):(i&=o,i!==0&&(r=bl(i)))}else o=n&~s,o!==0?r=bl(o):i!==0&&(r=bl(i));if(r===0)return 0;if(e!==0&&e!==r&&!(e&s)&&(s=r&-r,i=e&-e,s>=i||s===16&&(i&4194240)!==0))return e;if(r&4&&(r|=n&16),e=t.entangledLanes,e!==0)for(t=t.entanglements,e&=r;0<e;)n=31-Xn(e),s=1<<n,r|=t[n],e&=~s;return r}function U2(t,e){switch(t){case 1:case 2:case 4:return e+250;case 8:case 16:case 32:case 64: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 e+5e3;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return-1;case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function B2(t,e){for(var n=t.suspendedLanes,r=t.pingedLanes,s=t.expirationTimes,i=t.pendingLanes;0<i;){var o=31-Xn(i),a=1<<o,c=s[o];c===-1?(!(a&n)||a&r)&&(s[o]=U2(a,e)):c<=e&&(t.expiredLanes|=a),i&=~a}}function Hm(t){return t=t.pendingLanes&-1073741825,t!==0?t:t&1073741824?1073741824:0}function ME(){var t=gu;return gu<<=1,!(gu&4194240)&&(gu=64),t}function lp(t){for(var e=[],n=0;31>n;n++)e.push(t);return e}function Bc(t,e,n){t.pendingLanes|=e,e!==536870912&&(t.suspendedLanes=0,t.pingedLanes=0),t=t.eventTimes,e=31-Xn(e),t[e]=n}function V2(t,e){var n=t.pendingLanes&~e;t.pendingLanes=e,t.suspendedLanes=0,t.pingedLanes=0,t.expiredLanes&=e,t.mutableReadLanes&=e,t.entangledLanes&=e,e=t.entanglements;var r=t.eventTimes;for(t=t.expirationTimes;0<n;){var s=31-Xn(n),i=1<<s;e[s]=0,r[s]=-1,t[s]=-1,n&=~i}}function Yy(t,e){var n=t.entangledLanes|=e;for(t=t.entanglements;n;){var r=31-Xn(n),s=1<<r;s&e|t[r]&e&&(t[r]|=e),n&=~s}}var Ee=0;function OE(t){return t&=-t,1<t?4<t?t&268435455?16:536870912:4:1}var LE,Qy,FE,UE,BE,Km=!1,vu=[],Ls=null,Fs=null,Us=null,tc=new Map,nc=new Map,bs=[],$2="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 submit".split(" ");function ow(t,e){switch(t){case"focusin":case"focusout":Ls=null;break;case"dragenter":case"dragleave":Fs=null;break;case"mouseover":case"mouseout":Us=null;break;case"pointerover":case"pointerout":tc.delete(e.pointerId);break;case"gotpointercapture":case"lostpointercapture":nc.delete(e.pointerId)}}function sl(t,e,n,r,s,i){return t===null||t.nativeEvent!==i?(t={blockedOn:e,domEventName:n,eventSystemFlags:r,nativeEvent:i,targetContainers:[s]},e!==null&&(e=$c(e),e!==null&&Qy(e)),t):(t.eventSystemFlags|=r,e=t.targetContainers,s!==null&&e.indexOf(s)===-1&&e.push(s),t)}function z2(t,e,n,r,s){switch(e){case"focusin":return Ls=sl(Ls,t,e,n,r,s),!0;case"dragenter":return Fs=sl(Fs,t,e,n,r,s),!0;case"mouseover":return Us=sl(Us,t,e,n,r,s),!0;case"pointerover":var i=s.pointerId;return tc.set(i,sl(tc.get(i)||null,t,e,n,r,s)),!0;case"gotpointercapture":return i=s.pointerId,nc.set(i,sl(nc.get(i)||null,t,e,n,r,s)),!0}return!1}function VE(t){var e=Ni(t.target);if(e!==null){var n=ao(e);if(n!==null){if(e=n.tag,e===13){if(e=IE(n),e!==null){t.blockedOn=e,BE(t.priority,function(){FE(n)});return}}else if(e===3&&n.stateNode.current.memoizedState.isDehydrated){t.blockedOn=n.tag===3?n.stateNode.containerInfo:null;return}}}t.blockedOn=null}
vendor: 10,473 bytes, line 37
37function nd(t){if(t.blockedOn!==null)return!1;for(var e=t.targetContainers;0<e.length;){var n=Gm(t.domEventName,t.eventSystemFlags,e[0],t.nativeEvent);if(n===null){n=t.nativeEvent;var r=new n.constructor(n.type,n);Vm=r,n.target.dispatchEvent(r),Vm=null}else return e=$c(n),e!==null&&Qy(e),t.blockedOn=n,!1;e.shift()}return!0}function aw(t,e,n){nd(t)&&n.delete(e)}function W2(){Km=!1,Ls!==null&&nd(Ls)&&(Ls=null),Fs!==null&&nd(Fs)&&(Fs=null),Us!==null&&nd(Us)&&(Us=null),tc.forEach(aw),nc.forEach(aw)}function il(t,e){t.blockedOn===e&&(t.blockedOn=null,Km||(Km=!0,dn.unstable_scheduleCallback(dn.unstable_NormalPriority,W2)))}function rc(t){function e(s){return il(s,t)}if(0<vu.length){il(vu[0],t);for(var n=1;n<vu.length;n++){var r=vu[n];r.blockedOn===t&&(r.blockedOn=null)}}for(Ls!==null&&il(Ls,t),Fs!==null&&il(Fs,t),Us!==null&&il(Us,t),tc.forEach(e),nc.forEach(e),n=0;n<bs.length;n++)r=bs[n],r.blockedOn===t&&(r.blockedOn=null);for(;0<bs.length&&(n=bs[0],n.blockedOn===null);)VE(n),n.blockedOn===null&&bs.shift()}var Go=ns.ReactCurrentBatchConfig,Dd=!0;function H2(t,e,n,r){var s=Ee,i=Go.transition;Go.transition=null;try{Ee=1,Xy(t,e,n,r)}finally{Ee=s,Go.transition=i}}function K2(t,e,n,r){var s=Ee,i=Go.transition;Go.transition=null;try{Ee=4,Xy(t,e,n,r)}finally{Ee=s,Go.transition=i}}function Xy(t,e,n,r){if(Dd){var s=Gm(t,e,n,r);if(s===null)vp(t,e,r,Md,n),ow(t,r);else if(z2(s,t,e,n,r))r.stopPropagation();else if(ow(t,r),e&4&&-1<$2.indexOf(t)){for(;s!==null;){var i=$c(s);if(i!==null&&LE(i),i=Gm(t,e,n,r),i===null&&vp(t,e,r,Md,n),i===s)break;s=i}s!==null&&r.stopPropagation()}else vp(t,e,r,null,n)}}var Md=null;function Gm(t,e,n,r){if(Md=null,t=Gy(r),t=Ni(t),t!==null)if(e=ao(t),e===null)t=null;else if(n=e.tag,n===13){if(t=IE(e),t!==null)return t;t=null}else if(n===3){if(e.stateNode.current.memoizedState.isDehydrated)return e.tag===3?e.stateNode.containerInfo:null;t=null}else e!==t&&(t=null);return Md=t,null}function $E(t){switch(t){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"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 1;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"toggle":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 4;case"message":switch(A2()){case qy:return 1;case AE:return 4;case Rd:case D2:return 16;case DE:return 536870912;default:return 16}default:return 16}}var As=null,Jy=null,rd=null;function zE(){if(rd)return rd;var t,e=Jy,n=e.length,r,s="value"in As?As.value:As.textContent,i=s.length;for(t=0;t<n&&e[t]===s[t];t++);var o=n-t;for(r=1;r<=o&&e[n-r]===s[i-r];r++);return rd=s.slice(t,1<r?1-r:void 0)}function sd(t){var e=t.keyCode;return"charCode"in t?(t=t.charCode,t===0&&e===13&&(t=13)):t=e,t===10&&(t=13),32<=t||t===13?t:0}function xu(){return!0}function lw(){return!1}function fn(t){function e(n,r,s,i,o){this._reactName=n,this._targetInst=s,this.type=r,this.nativeEvent=i,this.target=o,this.currentTarget=null;for(var a in t)t.hasOwnProperty(a)&&(n=t[a],this[a]=n?n(i):i[a]);return this.isDefaultPrevented=(i.defaultPrevented!=null?i.defaultPrevented:i.returnValue===!1)?xu:lw,this.isPropagationStopped=lw,this}return We(e.prototype,{preventDefault:function(){this.defaultPrevented=!0;var n=this.nativeEvent;n&&(n.preventDefault?n.preventDefault():typeof n.returnValue!="unknown"&&(n.returnValue=!1),this.isDefaultPrevented=xu)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!="unknown"&&(n.cancelBubble=!0),this.isPropagationStopped=xu)},persist:function(){},isPersistent:xu}),e}var Aa={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(t){return t.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Zy=fn(Aa),Vc=We({},Aa,{view:0,detail:0}),G2=fn(Vc),cp,up,ol,$h=We({},Vc,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:ev,button:0,buttons:0,relatedTarget:function(t){return t.relatedTarget===void 0?t.fromElement===t.srcElement?t.toElement:t.fromElement:t.relatedTarget},movementX:function(t){return"movementX"in t?t.movementX:(t!==ol&&(ol&&t.type==="mousemove"?(cp=t.screenX-ol.screenX,up=t.screenY-ol.screenY):up=cp=0,ol=t),cp)},movementY:function(t){return"movementY"in t?t.movementY:up}}),cw=fn($h),q2=We({},$h,{dataTransfer:0}),Y2=fn(q2),Q2=We({},Vc,{relatedTarget:0}),dp=fn(Q2),X2=We({},Aa,{animationName:0,elapsedTime:0,pseudoElement:0}),J2=fn(X2),Z2=We({},Aa,{clipboardData:function(t){return"clipboardData"in t?t.clipboardData:window.clipboardData}}),eD=fn(Z2),tD=We({},Aa,{data:0}),uw=fn(tD),nD={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},rD={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"},sD={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function iD(t){var e=this.nativeEvent;return e.getModifierState?e.getModifierState(t):(t=sD[t])?!!e[t]:!1}function ev(){return iD}var oD=We({},Vc,{key:function(t){if(t.key){var e=nD[t.key]||t.key;if(e!=="Unidentified")return e}return t.type==="keypress"?(t=sd(t),t===13?"Enter":String.fromCharCode(t)):t.type==="keydown"||t.type==="keyup"?rD[t.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:ev,charCode:function(t){return t.type==="keypress"?sd(t):0},keyCode:function(t){return t.type==="keydown"||t.type==="keyup"?t.keyCode:0},which:function(t){return t.type==="keypress"?sd(t):t.type==="keydown"||t.type==="keyup"?t.keyCode:0}}),aD=fn(oD),lD=We({},$h,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),dw=fn(lD),cD=We({},Vc,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:ev}),uD=fn(cD),dD=We({},Aa,{propertyName:0,elapsedTime:0,pseudoElement:0}),hD=fn(dD),fD=We({},$h,{deltaX:function(t){return"deltaX"in t?t.deltaX:"wheelDeltaX"in t?-t.wheelDeltaX:0},deltaY:function(t){return"deltaY"in t?t.deltaY:"wheelDeltaY"in t?-t.wheelDeltaY:"wheelDelta"in t?-t.wheelDelta:0},deltaZ:0,deltaMode:0}),pD=fn(fD),mD=[9,13,27,32],tv=Hr&&"CompositionEvent"in window,Pl=null;Hr&&"documentMode"in document&&(Pl=document.documentMode);var gD=Hr&&"TextEvent"in window&&!Pl,WE=Hr&&(!tv||Pl&&8<Pl&&11>=Pl),hw=" ",fw=!1;function HE(t,e){switch(t){case"keyup":return mD.indexOf(e.keyCode)!==-1;case"keydown":return e.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function KE(t){return t=t.detail,typeof t=="object"&&"data"in t?t.data:null}var No=!1;function yD(t,e){switch(t){case"compositionend":return KE(e);case"keypress":return e.which!==32?null:(fw=!0,hw);case"textInput":return t=e.data,t===hw&&fw?null:t;default:return null}}function vD(t,e){if(No)return t==="compositionend"||!tv&&HE(t,e)?(t=zE(),rd=Jy=As=null,No=!1,t):null;switch(t){case"paste":return null;case"keypress":if(!(e.ctrlKey||e.altKey||e.metaKey)||e.ctrlKey&&e.altKey){if(e.char&&1<e.char.length)return e.char;if(e.which)return String.fromCharCode(e.which)}return null;case"compositionend":return WE&&e.locale!=="ko"?null:e.data;default:return null}}var xD={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 pw(t){var e=t&&t.nodeName&&t.nodeName.toLowerCase();return e==="input"?!!xD[t.type]:e==="textarea"}function GE(t,e,n,r){EE(r),e=Od(e,"onChange"),0<e.length&&(n=new Zy("onChange","change",null,n,r),t.push({event:n,listeners:e}))}var jl=null,sc=null;function wD(t){sC(t,0)}function zh(t){var e=Po(t);if(yE(e))return t}function bD(t,e){if(t==="change")return e}var qE=!1;if(Hr){var hp;if(Hr){var fp="oninput"in document;if(!fp){var mw=document.createElement("div");mw.setAttribute("oninput","return;"),fp=typeof mw.oninput=="function"}hp=fp}else hp=!1;qE=hp&&(!document.documentMode||9<document.documentMode)}function gw(){jl&&(jl.detachEvent("onpropertychange",YE),sc=jl=null)}function YE(t){if(t.propertyName==="value"&&zh(sc)){var e=[];GE(e,sc,t,Gy(t)),TE(wD,e)}}function _D(t,e,n){t==="focusin"?(gw(),jl=e,sc=n,jl.attachEvent("onpropertychange",YE)):t==="focusout"&&gw()}function kD(t){if(t==="selectionchange"||t==="keyup"||t==="keydown")return zh(sc)}function ED(t,e){if(t==="click")return zh(e)}function CD(t,e){if(t==="input"||t==="change")return zh(e)}function SD(t,e){return t===e&&(t!==0||1/t===1/e)||t!==t&&e!==e}var er=typeof Object.is=="function"?Object.is:SD;function ic(t,e){if(er(t,e))return!0;if(typeof t!="object"||t===null||typeof e!="object"||e===null)return!1;var n=Object.keys(t),r=Object.keys(e);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++){var s=n[r];if(!Im.call(e,s)||!er(t[s],e[s]))return!1}return!0}function yw(t){for(;t&&t.firstChild;)t=t.firstChild;return t}function vw(t,e){var n=yw(t);t=0;for(var r;n;){if(n.nodeType===3){if(r=t+n.textContent.length,t<=e&&r>=e)return{node:n,offset:e-t};t=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=yw(n)}}function QE(t,e){return t&&e?t===e?!0:t&&t.nodeType===3?!1:e&&e.nodeType===3?QE(t,e.parentNode):"contains"in t?t.contains(e):t.compareDocumentPosition?!!(t.compareDocumentPosition(e)&16):!1:!1}
vendor: 4,105 bytes, line 37
37function XE(){for(var t=window,e=Id();e instanceof t.HTMLIFrameElement;){try{var n=typeof e.contentWindow.location.href=="string"}catch{n=!1}if(n)t=e.contentWindow;else break;e=Id(t.document)}return e}function nv(t){var e=t&&t.nodeName&&t.nodeName.toLowerCase();return e&&(e==="input"&&(t.type==="text"||t.type==="search"||t.type==="tel"||t.type==="url"||t.type==="password")||e==="textarea"||t.contentEditable==="true")}function ND(t){var e=XE(),n=t.focusedElem,r=t.selectionRange;if(e!==n&&n&&n.ownerDocument&&QE(n.ownerDocument.documentElement,n)){if(r!==null&&nv(n)){if(e=r.start,t=r.end,t===void 0&&(t=e),"selectionStart"in n)n.selectionStart=e,n.selectionEnd=Math.min(t,n.value.length);else if(t=(e=n.ownerDocument||document)&&e.defaultView||window,t.getSelection){t=t.getSelection();var s=n.textContent.length,i=Math.min(r.start,s);r=r.end===void 0?i:Math.min(r.end,s),!t.extend&&i>r&&(s=r,r=i,i=s),s=vw(n,i);var o=vw(n,r);s&&o&&(t.rangeCount!==1||t.anchorNode!==s.node||t.anchorOffset!==s.offset||t.focusNode!==o.node||t.focusOffset!==o.offset)&&(e=e.createRange(),e.setStart(s.node,s.offset),t.removeAllRanges(),i>r?(t.addRange(e),t.extend(o.node,o.offset)):(e.setEnd(o.node,o.offset),t.addRange(e)))}}for(e=[],t=n;t=t.parentNode;)t.nodeType===1&&e.push({element:t,left:t.scrollLeft,top:t.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n<e.length;n++)t=e[n],t.element.scrollLeft=t.left,t.element.scrollTop=t.top}}var TD=Hr&&"documentMode"in document&&11>=document.documentMode,To=null,qm=null,Rl=null,Ym=!1;function xw(t,e,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Ym||To==null||To!==Id(r)||(r=To,"selectionStart"in r&&nv(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}),Rl&&ic(Rl,r)||(Rl=r,r=Od(qm,"onSelect"),0<r.length&&(e=new Zy("onSelect","select",null,e,n),t.push({event:e,listeners:r}),e.target=To)))}function wu(t,e){var n={};return n[t.toLowerCase()]=e.toLowerCase(),n["Webkit"+t]="webkit"+e,n["Moz"+t]="moz"+e,n}var Io={animationend:wu("Animation","AnimationEnd"),animationiteration:wu("Animation","AnimationIteration"),animationstart:wu("Animation","AnimationStart"),transitionend:wu("Transition","TransitionEnd")},pp={},JE={};Hr&&(JE=document.createElement("div").style,"AnimationEvent"in window||(delete Io.animationend.animation,delete Io.animationiteration.animation,delete Io.animationstart.animation),"TransitionEvent"in window||delete Io.transitionend.transition);function Wh(t){if(pp[t])return pp[t];if(!Io[t])return t;var e=Io[t],n;for(n in e)if(e.hasOwnProperty(n)&&n in JE)return pp[t]=e[n];return t}var ZE=Wh("animationend"),eC=Wh("animationiteration"),tC=Wh("animationstart"),nC=Wh("transitionend"),rC=new Map,ww="abort auxClick 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(" ");function di(t,e){rC.set(t,e),oo(e,[t])}for(var mp=0;mp<ww.length;mp++){var gp=ww[mp],ID=gp.toLowerCase(),PD=gp[0].toUpperCase()+gp.slice(1);di(ID,"on"+PD)}di(ZE,"onAnimationEnd");di(eC,"onAnimationIteration");di(tC,"onAnimationStart");di("dblclick","onDoubleClick");di("focusin","onFocus");di("focusout","onBlur");di(nC,"onTransitionEnd");ma("onMouseEnter",["mouseout","mouseover"]);ma("onMouseLeave",["mouseout","mouseover"]);ma("onPointerEnter",["pointerout","pointerover"]);ma("onPointerLeave",["pointerout","pointerover"]);oo("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));
vendor: 4,442 bytes, line 37
37oo("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));oo("onBeforeInput",["compositionend","keypress","textInput","paste"]);oo("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));oo("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));oo("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var _l="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(" "),jD=new Set("cancel close invalid load scroll toggle".split(" ").concat(_l));function bw(t,e,n){var r=t.type||"unknown-event";t.currentTarget=n,I2(r,e,void 0,t),t.currentTarget=null}function sC(t,e){e=(e&4)!==0;for(var n=0;n<t.length;n++){var r=t[n],s=r.event;r=r.listeners;e:{var i=void 0;if(e)for(var o=r.length-1;0<=o;o--){var a=r[o],c=a.instance,u=a.currentTarget;if(a=a.listener,c!==i&&s.isPropagationStopped())break e;bw(s,a,u),i=c}else for(o=0;o<r.length;o++){if(a=r[o],c=a.instance,u=a.currentTarget,a=a.listener,c!==i&&s.isPropagationStopped())break e;bw(s,a,u),i=c}}}if(jd)throw t=Wm,jd=!1,Wm=null,t}function Re(t,e){var n=e[eg];n===void 0&&(n=e[eg]=new Set);var r=t+"__bubble";n.has(r)||(iC(e,t,2,!1),n.add(r))}function yp(t,e,n){var r=0;e&&(r|=4),iC(n,t,r,e)}var bu="_reactListening"+Math.random().toString(36).slice(2);function oc(t){if(!t[bu]){t[bu]=!0,hE.forEach(function(n){n!=="selectionchange"&&(jD.has(n)||yp(n,!1,t),yp(n,!0,t))});var e=t.nodeType===9?t:t.ownerDocument;e===null||e[bu]||(e[bu]=!0,yp("selectionchange",!1,e))}}function iC(t,e,n,r){switch($E(e)){case 1:var s=H2;break;case 4:s=K2;break;default:s=Xy}n=s.bind(null,e,n,t),s=void 0,!zm||e!=="touchstart"&&e!=="touchmove"&&e!=="wheel"||(s=!0),r?s!==void 0?t.addEventListener(e,n,{capture:!0,passive:s}):t.addEventListener(e,n,!0):s!==void 0?t.addEventListener(e,n,{passive:s}):t.addEventListener(e,n,!1)}function vp(t,e,n,r,s){var i=r;if(!(e&1)&&!(e&2)&&r!==null)e:for(;;){if(r===null)return;var o=r.tag;if(o===3||o===4){var a=r.stateNode.containerInfo;if(a===s||a.nodeType===8&&a.parentNode===s)break;if(o===4)for(o=r.return;o!==null;){var c=o.tag;if((c===3||c===4)&&(c=o.stateNode.containerInfo,c===s||c.nodeType===8&&c.parentNode===s))return;o=o.return}for(;a!==null;){if(o=Ni(a),o===null)return;if(c=o.tag,c===5||c===6){r=i=o;continue e}a=a.parentNode}}r=r.return}TE(function(){var u=i,d=Gy(n),h=[];e:{var f=rC.get(t);if(f!==void 0){var p=Zy,x=t;switch(t){case"keypress":if(sd(n)===0)break e;case"keydown":case"keyup":p=aD;break;case"focusin":x="focus",p=dp;break;case"focusout":x="blur",p=dp;break;case"beforeblur":case"afterblur":p=dp;break;case"click":if(n.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":p=cw;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":p=Y2;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":p=uD;break;case ZE:case eC:case tC:p=J2;break;case nC:p=hD;break;case"scroll":p=G2;break;case"wheel":p=pD;break;case"copy":case"cut":case"paste":p=eD;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":p=dw}var g=(e&4)!==0,y=!g&&t==="scroll",w=g?f!==null?f+"Capture":null:f;g=[];for(var v=u,b;v!==null;){b=v;var _=b.stateNode;if(b.tag===5&&_!==null&&(b=_,w!==null&&(_=ec(v,w),_!=null&&g.push(ac(v,_,b)))),y)break;v=v.return}0<g.length&&(f=new p(f,x,null,n,d),h.push({event:f,listeners:g}))}}if(!(e&7)){e:{if(f=t==="mouseover"||t==="pointerover",p=t==="mouseout"||t==="pointerout",f&&n!==Vm&&(x=n.relatedTarget||n.fromElement)&&(Ni(x)||x[Kr]))break e;if((p||f)&&(f=d.window===d?d:(f=d.ownerDocument)?f.defaultView||f.parentWindow:window,p?(x=n.relatedTarget||n.toElement,p=u,x=x?Ni(x):null,x!==null&&(y=ao(x),x!==y||x.tag!==5&&x.tag!==6)&&(x=null)):(p=null,x=u),p!==x)){if(g=cw,_="onMouseLeave",w="onMouseEnter",v="mouse",(t==="pointerout"||t==="pointerover")&&(g=dw,_="onPointerLeave",w="onPointerEnter",v="pointer"),y=p==null?f:Po(p),b=x==null?f:Po(x),f=new g(_,v+"leave",p,n,d),f.target=y,f.relatedTarget=b,_=null,Ni(d)===u&&(g=ne
vendor: 7,910 bytes, lines 37-38
37w g(w,v+"enter",x,n,d),g.target=b,g.relatedTarget=y,_=g),y=_,p&&x)t:{for(g=p,w=x,v=0,b=g;b;b=yo(b))v++;for(b=0,_=w;_;_=yo(_))b++;for(;0<v-b;)g=yo(g),v--;for(;0<b-v;)w=yo(w),b--;for(;v--;){if(g===w||w!==null&&g===w.alternate)break t;g=yo(g),w=yo(w)}g=null}else g=null;p!==null&&_w(h,f,p,g,!1),x!==null&&y!==null&&_w(h,y,x,g,!0)}}e:{if(f=u?Po(u):window,p=f.nodeName&&f.nodeName.toLowerCase(),p==="select"||p==="input"&&f.type==="file")var k=bD;else if(pw(f))if(qE)k=CD;else{k=kD;var S=_D}else(p=f.nodeName)&&p.toLowerCase()==="input"&&(f.type==="checkbox"||f.type==="radio")&&(k=ED);if(k&&(k=k(t,u))){GE(h,k,n,d);break e}S&&S(t,f,u),t==="focusout"&&(S=f._wrapperState)&&S.controlled&&f.type==="number"&&Om(f,"number",f.value)}switch(S=u?Po(u):window,t){case"focusin":(pw(S)||S.contentEditable==="true")&&(To=S,qm=u,Rl=null);break;case"focusout":Rl=qm=To=null;break;case"mousedown":Ym=!0;break;case"contextmenu":case"mouseup":case"dragend":Ym=!1,xw(h,n,d);break;case"selectionchange":if(TD)break;case"keydown":case"keyup":xw(h,n,d)}var C;if(tv)e:{switch(t){case"compositionstart":var N="onCompositionStart";break e;case"compositionend":N="onCompositionEnd";break e;case"compositionupdate":N="onCompositionUpdate";break e}N=void 0}else No?HE(t,n)&&(N="onCompositionEnd"):t==="keydown"&&n.keyCode===229&&(N="onCompositionStart");N&&(WE&&n.locale!=="ko"&&(No||N!=="onCompositionStart"?N==="onCompositionEnd"&&No&&(C=zE()):(As=d,Jy="value"in As?As.value:As.textContent,No=!0)),S=Od(u,N),0<S.length&&(N=new uw(N,t,null,n,d),h.push({event:N,listeners:S}),C?N.data=C:(C=KE(n),C!==null&&(N.data=C)))),(C=gD?yD(t,n):vD(t,n))&&(u=Od(u,"onBeforeInput"),0<u.length&&(d=new uw("onBeforeInput","beforeinput",null,n,d),h.push({event:d,listeners:u}),d.data=C))}sC(h,e)})}function ac(t,e,n){return{instance:t,listener:e,currentTarget:n}}function Od(t,e){for(var n=e+"Capture",r=[];t!==null;){var s=t,i=s.stateNode;s.tag===5&&i!==null&&(s=i,i=ec(t,n),i!=null&&r.unshift(ac(t,i,s)),i=ec(t,e),i!=null&&r.push(ac(t,i,s))),t=t.return}return r}function yo(t){if(t===null)return null;do t=t.return;while(t&&t.tag!==5);return t||null}function _w(t,e,n,r,s){for(var i=e._reactName,o=[];n!==null&&n!==r;){var a=n,c=a.alternate,u=a.stateNode;if(c!==null&&c===r)break;a.tag===5&&u!==null&&(a=u,s?(c=ec(n,i),c!=null&&o.unshift(ac(n,c,a))):s||(c=ec(n,i),c!=null&&o.push(ac(n,c,a)))),n=n.return}o.length!==0&&t.push({event:e,listeners:o})}var RD=/\r\n?/g,AD=/\u0000|\uFFFD/g;function kw(t){return(typeof t=="string"?t:""+t).replace(RD,` 38`).replace(AD,"")}function _u(t,e,n){if(e=kw(e),kw(t)!==e&&n)throw Error(B(425))}function Ld(){}var Qm=null,Xm=null;function Jm(t,e){return t==="textarea"||t==="noscript"||typeof e.children=="string"||typeof e.children=="number"||typeof e.dangerouslySetInnerHTML=="object"&&e.dangerouslySetInnerHTML!==null&&e.dangerouslySetInnerHTML.__html!=null}var Zm=typeof setTimeout=="function"?setTimeout:void 0,DD=typeof clearTimeout=="function"?clearTimeout:void 0,Ew=typeof Promise=="function"?Promise:void 0,MD=typeof queueMicrotask=="function"?queueMicrotask:typeof Ew<"u"?function(t){return Ew.resolve(null).then(t).catch(OD)}:Zm;function OD(t){setTimeout(function(){throw t})}function xp(t,e){var n=e,r=0;do{var s=n.nextSibling;if(t.removeChild(n),s&&s.nodeType===8)if(n=s.data,n==="/$"){if(r===0){t.removeChild(s),rc(e);return}r--}else n!=="$"&&n!=="$?"&&n!=="$!"||r++;n=s}while(n);rc(e)}function Bs(t){for(;t!=null;t=t.nextSibling){var e=t.nodeType;if(e===1||e===3)break;if(e===8){if(e=t.data,e==="$"||e==="$!"||e==="$?")break;if(e==="/$")return null}}return t}function Cw(t){t=t.previousSibling;for(var e=0;t;){if(t.nodeType===8){var n=t.data;if(n==="$"||n==="$!"||n==="$?"){if(e===0)return t;e--}else n==="/$"&&e++}t=t.previousSibling}return null}var Da=Math.random().toString(36).slice(2),pr="__reactFiber$"+Da,lc="__reactProps$"+Da,Kr="__reactContainer$"+Da,eg="__reactEvents$"+Da,LD="__reactListeners$"+Da,FD="__reactHandles$"+Da;function Ni(t){var e=t[pr];if(e)return e;for(var n=t.parentNode;n;){if(e=n[Kr]||n[pr]){if(n=e.alternate,e.child!==null||n!==null&&n.child!==null)for(t=Cw(t);t!==null;){if(n=t[pr])return n;t=Cw(t)}return e}t=n,n=t.parentNode}return null}function $c(t){return t=t[pr]||t[Kr],!t||t.tag!==5&&t.tag!==6&&t.tag!==13&&t.tag!==3?null:t}function Po(t){if(t.tag===5||t.tag===6)return t.stateNode;throw Error(B(33))}function Hh(t){return t[lc]||null}var tg=[],jo=-1;function hi(t){return{current:t}}function De(t){0>jo||(t.current=tg[jo],tg[jo]=null,jo--)}function Pe(t,e){jo++,tg[jo]=t.current,t.current=e}var ei={},At=hi(ei),Jt=hi(!1),Hi=ei;function ga(t,e){var n=t.type.contextTypes;if(!n)return ei;var r=t.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===e)return r.__reactInternalMemoizedMaskedChildContext;var s={},i;for(i in n)s[i]=e[i];return r&&(t=t.stateNode,t.__reactInternalMemoizedUnmaskedChildContext=e,t.__reactInternalMemoizedMaskedChildContext=s),s}function Zt(t){return t=t.childContextTypes,t!=null}function Fd(){De(Jt),De(At)}function Sw(t,e,n){if(At.current!==ei)throw Error(B(168));Pe(At,e),Pe(Jt,n)}function oC(t,e,n){var r=t.stateNode;if(e=e.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var s in r)if(!(s in e))throw Error(B(108,_2(t)||"Unknown",s));return We({},n,r)}function Ud(t){return t=(t=t.stateNode)&&t.__reactInternalMemoizedMergedChildContext||ei,Hi=At.current,Pe(At,t),Pe(Jt,Jt.current),!0}function Nw(t,e,n){var r=t.stateNode;if(!r)throw Error(B(169));n?(t=oC(t,e,Hi),r.__reactInternalMemoizedMergedChildContext=t,De(Jt),De(At),Pe(At,t)):De(Jt),Pe(Jt,n)}var Or=null,Kh=!1,wp=!1;function aC(t){Or===null?Or=[t]:Or.push(t)}function UD(t){Kh=!0,aC(t)}function fi(){if(!wp&&Or!==null){wp=!0;var t=0,e=Ee;try{var n=Or;for(Ee=1;t<n.length;t++){var r=n[t];do r=r(!0);while(r!==null)}Or=null,Kh=!1}catch(s){throw Or!==null&&(Or=Or.slice(t+1)),RE(qy,fi),s}finally{Ee=e,wp=!1}}return null}var Ro=[],Ao=0,Bd=null,Vd=0,wn=[],bn=0,Ki=null,Fr=1,Ur="";function bi(t,e){Ro[Ao++]=Vd,Ro[Ao++]=Bd,Bd=t,Vd=e}function lC(t,e,n){wn[bn++]=Fr,wn[bn++]=Ur,wn[bn++]=Ki,Ki=t;var r=Fr;t=Ur;var s=32-Xn(r)-1;r&=~(1<<s),n+=1;var i=32-Xn(e)+s;if(30<i){var o=s-s%5;i=(r&(1<<o)-1).toString(32),r>>=o,s-=o,Fr=1<<32-Xn(e)+s|n<<s|r,Ur=i+t}else Fr=1<<i|n<<s|r,Ur=t}function rv(t){t.return!==null&&(bi(t,1),lC(t,1,0))}function sv(t){for(;t===Bd;)Bd=Ro[--Ao],Ro[Ao]=null,Vd=Ro[--Ao],Ro[Ao]=null;for(;t===Ki;)Ki=wn[--bn],wn[bn]=null,Ur=wn[--bn],wn[bn]=null,Fr=wn[--bn],wn[bn]=null}var cn=null,an=null,Le=!1,Hn=null;function cC(t,e){var n=En(5,null,null,0);n.elementType="DELETED",n.stateNode=e,n.return=t,e=t.deletions,e===null?(t.deletions=[n],t.flags|=16):e.push(n)}function Tw(t,e){switch(t.tag){case 5:var n=t.type;return e=e.nodeType!==1||n.toLowerCase()!==e.nodeName.toLowerCase()?null:e,e!==null?(t.stateNode=e,cn=t,an=Bs(e.firstChild),!0):!1;case 6:return e=t.pendingProps===""||e.nodeType!==3?null:e,e!==null?(t.stateNode=e,cn=t,an=null,!0):!1;case 13:return e=e.nodeType!==8?null:e,e!==null?(n=Ki!==null?{id:Fr,overflow:Ur}:null,t.memoizedState={dehydrated:e,treeContext:n,retryLane:1073741824},n=En(18,null,null,0),n.stateNode=e,n.return=t,t.child=n,cn=t,an=null,!0):!1;default:return!1}}function ng(t){return(t.mode&1)!==0&&(t.flags&128)===0}function rg(t){if(Le){var e=an;if(e){var n=e;if(!Tw(t,e)){if(ng(t))throw Error(B(418));e=Bs(n.nextSibling);var r=cn;e&&Tw(t,e)?cC(r,n):(t.flags=t.flags&-4097|2,Le=!1,cn=t)}}else{if(ng(t))throw Error(B(418));t.flags=t.flags&-4097|2,Le=!1,cn=t}}}function Iw(t){for(t=t.return;t!==null&&t.tag!==5&&t.tag!==3&&t.tag!==13;)t=t.return;cn=t}function ku(t){if(t!==cn)return!1;if(!Le)return Iw(t),Le=!0,!1;var e;if((e=t.tag!==3)&&!(e=t.tag!==5)&&(e=t.type,e=e!=="head"&&e!=="body"&&!Jm(t.type,t.memoizedProps)),e&&(e=an)){if(ng(t))throw uC(),Error(B(418));for(;e;)cC(t,e),e=Bs(e.nextSibling)}if(Iw(t),t.tag===13){if(t=t.memoizedState,t=t!==null?t.dehydrated:null,!t)throw Error(B(317)
vendor: 24,464 bytes, lines 38-40
38);e:{for(t=t.nextSibling,e=0;t;){if(t.nodeType===8){var n=t.data;if(n==="/$"){if(e===0){an=Bs(t.nextSibling);break e}e--}else n!=="$"&&n!=="$!"&&n!=="$?"||e++}t=t.nextSibling}an=null}}else an=cn?Bs(t.stateNode.nextSibling):null;return!0}function uC(){for(var t=an;t;)t=Bs(t.nextSibling)}function ya(){an=cn=null,Le=!1}function iv(t){Hn===null?Hn=[t]:Hn.push(t)}var BD=ns.ReactCurrentBatchConfig;function al(t,e,n){if(t=n.ref,t!==null&&typeof t!="function"&&typeof t!="object"){if(n._owner){if(n=n._owner,n){if(n.tag!==1)throw Error(B(309));var r=n.stateNode}if(!r)throw Error(B(147,t));var s=r,i=""+t;return e!==null&&e.ref!==null&&typeof e.ref=="function"&&e.ref._stringRef===i?e.ref:(e=function(o){var a=s.refs;o===null?delete a[i]:a[i]=o},e._stringRef=i,e)}if(typeof t!="string")throw Error(B(284));if(!n._owner)throw Error(B(290,t))}return t}function Eu(t,e){throw t=Object.prototype.toString.call(e),Error(B(31,t==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":t))}function Pw(t){var e=t._init;return e(t._payload)}function dC(t){function e(w,v){if(t){var b=w.deletions;b===null?(w.deletions=[v],w.flags|=16):b.push(v)}}function n(w,v){if(!t)return null;for(;v!==null;)e(w,v),v=v.sibling;return null}function r(w,v){for(w=new Map;v!==null;)v.key!==null?w.set(v.key,v):w.set(v.index,v),v=v.sibling;return w}function s(w,v){return w=Ws(w,v),w.index=0,w.sibling=null,w}function i(w,v,b){return w.index=b,t?(b=w.alternate,b!==null?(b=b.index,b<v?(w.flags|=2,v):b):(w.flags|=2,v)):(w.flags|=1048576,v)}function o(w){return t&&w.alternate===null&&(w.flags|=2),w}function a(w,v,b,_){return v===null||v.tag!==6?(v=Np(b,w.mode,_),v.return=w,v):(v=s(v,b),v.return=w,v)}function c(w,v,b,_){var k=b.type;return k===So?d(w,v,b.props.children,_,b.key):v!==null&&(v.elementType===k||typeof k=="object"&&k!==null&&k.$$typeof===xs&&Pw(k)===v.type)?(_=s(v,b.props),_.ref=al(w,v,b),_.return=w,_):(_=dd(b.type,b.key,b.props,null,w.mode,_),_.ref=al(w,v,b),_.return=w,_)}function u(w,v,b,_){return v===null||v.tag!==4||v.stateNode.containerInfo!==b.containerInfo||v.stateNode.implementation!==b.implementation?(v=Tp(b,w.mode,_),v.return=w,v):(v=s(v,b.children||[]),v.return=w,v)}function d(w,v,b,_,k){return v===null||v.tag!==7?(v=$i(b,w.mode,_,k),v.return=w,v):(v=s(v,b),v.return=w,v)}function h(w,v,b){if(typeof v=="string"&&v!==""||typeof v=="number")return v=Np(""+v,w.mode,b),v.return=w,v;if(typeof v=="object"&&v!==null){switch(v.$$typeof){case fu:return b=dd(v.type,v.key,v.props,null,w.mode,b),b.ref=al(w,null,v),b.return=w,b;case Co:return v=Tp(v,w.mode,b),v.return=w,v;case xs:var _=v._init;return h(w,_(v._payload),b)}if(wl(v)||nl(v))return v=$i(v,w.mode,b,null),v.return=w,v;Eu(w,v)}return null}function f(w,v,b,_){var k=v!==null?v.key:null;if(typeof b=="string"&&b!==""||typeof b=="number")return k!==null?null:a(w,v,""+b,_);if(typeof b=="object"&&b!==null){switch(b.$$typeof){case fu:return b.key===k?c(w,v,b,_):null;case Co:return b.key===k?u(w,v,b,_):null;case xs:return k=b._init,f(w,v,k(b._payload),_)}if(wl(b)||nl(b))return k!==null?null:d(w,v,b,_,null);Eu(w,b)}return null}function p(w,v,b,_,k){if(typeof _=="string"&&_!==""||typeof _=="number")return w=w.get(b)||null,a(v,w,""+_,k);if(typeof _=="object"&&_!==null){switch(_.$$typeof){case fu:return w=w.get(_.key===null?b:_.key)||null,c(v,w,_,k);case Co:return w=w.get(_.key===null?b:_.key)||null,u(v,w,_,k);case xs:var S=_._init;return p(w,v,b,S(_._payload),k)}if(wl(_)||nl(_))return w=w.get(b)||null,d(v,w,_,k,null);Eu(v,_)}return null}function x(w,v,b,_){for(var k=null,S=null,C=v,N=v=0,P=null;C!==null&&N<b.length;N++){C.index>N?(P=C,C=null):P=C.sibling;var j=f(w,C,b[N],_);if(j===null){C===null&&(C=P);break}t&&C&&j.alternate===null&&e(w,C),v=i(j,v,N),S===null?k=j:S.sibling=j,S=j,C=P}if(N===b.length)return n(w,C),Le&&bi(w,N),k;if(C===null){for(;N<b.length;N++)C=h(w,b[N],_),C!==null&&(v=i(C,v,N),S===null?k=C:S.sibling=C,S=C);return Le&&bi(w,N),k}for(C=r(w,C);N<b.length;N++)P=p(C,w,N,b[N],_),P!==null&&(t&&P.alternate!==null&&C.delete(P.key===null?N:P.key),v=i(P,v,N),S===null?k=P:S.sibling=P,S=P);return t&&C.forEach(function(O){return e(w,O)}),Le&&bi(w,N),k}function g(w,v,b,_){var k=nl(b);if(typeof k!="function")throw Error(B(150));if(b=k.call(b),b==null)throw Error(B(151));for(var S=k=null,C=v,N=v=0,P=null,j=b.next();C!==null&&!j.done;N++,j=b.next()){C.index>N?(P=C,C=null):P=C.sibling;var O=f(w,C,j.value,_);if(O===null){C===null&&(C=P);break}t&&C&&O.alternate===null&&e(w,C),v=i(O,v,N),S===null?k=O:S.sibling=O,S=O,C=P}if(j.done)return n(w,C),Le&&bi(w,N),k;if(C===null){for(;!j.done;N++,j=b.next())j=h(w,j.value,_),j!==null&&(v=i(j,v,N),S===null?k=j:S.sibling=j,S=j);return Le&&bi(w,N),k}for(C=r(w,C);!j.done;N++,j=b.next())j=p(C,w,N,j.value,_),j!==null&&(t&&j.alternate!==null&&C.delete(j.key===null?N:j.key),v=i(j,v,N),S===null?k=j:S.sibling=j,S=j);return t&&C.forEach(function(L){return e(w,L)}),Le&&bi(w,N),k}function y(w,v,b,_){if(typeof b=="object"&&b!==null&&b.type===So&&b.key===null&&(b=b.props.children),typeof b=="object"&&b!==null){switch(b.$$typeof){case fu:e:{for(var k=b.key,S=v;S!==null;){if(S.key===k){if(k=b.type,k===So){if(S.tag===7){n(w,S.sibling),v=s(S,b.props.children),v.return=w,w=v;break e}}else if(S.elementType===k||typeof k=="object"&&k!==null&&k.$$typeof===xs&&Pw(k)===S.type){n(w,S.sibling),v=s(S,b.props),v.ref=al(w,S,b),v.return=w,w=v;break e}n(w,S);break}else e(w,S);S=S.sibling}b.type===So?(v=$i(b.props.children,w.mode,_,b.key),v.return=w,w=v):(_=dd(b.type,b.key,b.props,null,w.mode,_),_.ref=al(w,v,b),_.return=w,w=_)}return o(w);case Co:e:{for(S=b.key;v!==null;){if(v.key===S)if(v.tag===4&&v.stateNode.containerInfo===b.containerInfo&&v.stateNode.implementation===b.implementation){n(w,v.sibling),v=s(v,b.children||[]),v.return=w,w=v;break e}else{n(w,v);break}else e(w,v);v=v.sibling}v=Tp(b,w.mode,_),v.return=w,w=v}return o(w);case xs:return S=b._init,y(w,v,S(b._payload),_)}if(wl(b))return x(w,v,b,_);if(nl(b))return g(w,v,b,_);Eu(w,b)}return typeof b=="string"&&b!==""||typeof b=="number"?(b=""+b,v!==null&&v.tag===6?(n(w,v.sibling),v=s(v,b),v.return=w,w=v):(n(w,v),v=Np(b,w.mode,_),v.return=w,w=v),o(w)):n(w,v)}return y}var va=dC(!0),hC=dC(!1),$d=hi(null),zd=null,Do=null,ov=null;function av(){ov=Do=zd=null}function lv(t){var e=$d.current;De($d),t._currentValue=e}function sg(t,e,n){for(;t!==null;){var r=t.alternate;if((t.childLanes&e)!==e?(t.childLanes|=e,r!==null&&(r.childLanes|=e)):r!==null&&(r.childLanes&e)!==e&&(r.childLanes|=e),t===n)break;t=t.return}}function qo(t,e){zd=t,ov=Do=null,t=t.dependencies,t!==null&&t.firstContext!==null&&(t.lanes&e&&(Qt=!0),t.firstContext=null)}function Nn(t){var e=t._currentValue;if(ov!==t)if(t={context:t,memoizedValue:e,next:null},Do===null){if(zd===null)throw Error(B(308));Do=t,zd.dependencies={lanes:0,firstContext:t}}else Do=Do.next=t;return e}var Ti=null;function cv(t){Ti===null?Ti=[t]:Ti.push(t)}function fC(t,e,n,r){var s=e.interleaved;return s===null?(n.next=n,cv(e)):(n.next=s.next,s.next=n),e.interleaved=n,Gr(t,r)}function Gr(t,e){t.lanes|=e;var n=t.alternate;for(n!==null&&(n.lanes|=e),n=t,t=t.return;t!==null;)t.childLanes|=e,n=t.alternate,n!==null&&(n.childLanes|=e),n=t,t=t.return;return n.tag===3?n.stateNode:null}var ws=!1;function uv(t){t.updateQueue={baseState:t.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function pC(t,e){t=t.updateQueue,e.updateQueue===t&&(e.updateQueue={baseState:t.baseState,firstBaseUpdate:t.firstBaseUpdate,lastBaseUpdate:t.lastBaseUpdate,shared:t.shared,effects:t.effects})}function zr(t,e){return{eventTime:t,lane:e,tag:0,payload:null,callback:null,next:null}}function Vs(t,e,n){var r=t.updateQueue;if(r===null)return null;if(r=r.shared,ye&2){var s=r.pending;return s===null?e.next=e:(e.next=s.next,s.next=e),r.pending=e,Gr(t,n)}return s=r.interleaved,s===null?(e.next=e,cv(r)):(e.next=s.next,s.next=e),r.interleaved=e,Gr(t,n)}function id(t,e,n){if(e=e.updateQueue,e!==null&&(e=e.shared,(n&4194240)!==0)){var r=e.lanes;r&=t.pendingLanes,n|=r,e.lanes=n,Yy(t,n)}}function jw(t,e){var n=t.updateQueue,r=t.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var s=null,i=null;if(n=n.firstBaseUpdate,n!==null){do{var o={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};i===null?s=i=o:i=i.next=o,n=n.next}while(n!==null);i===null?s=i=e:i=i.next=e}else s=i=e;n={baseState:r.baseState,firstBaseUpdate:s,lastBaseUpdate:i,shared:r.shared,effects:r.effects},t.updateQueue=n;return}t=n.lastBaseUpdate,t===null?n.firstBaseUpdate=e:t.next=e,n.lastBaseUpdate=e}function Wd(t,e,n,r){var s=t.updateQueue;ws=!1;var i=s.firstBaseUpdate,o=s.lastBaseUpdate,a=s.shared.pending;if(a!==null){s.shared.pending=null;var c=a,u=c.next;c.next=null,o===null?i=u:o.next=u,o=c;var d=t.alternate;d!==null&&(d=d.updateQueue,a=d.lastBaseUpdate,a!==o&&(a===null?d.firstBaseUpdate=u:a.next=u,d.lastBaseUpdate=c))}if(i!==null){var h=s.baseState;o=0,d=u=c=null,a=i;do{var f=a.lane,p=a.eventTime;if((r&f)===f){d!==null&&(d=d.next={eventTime:p,lane:0,tag:a.tag,payload:a.payload,callback:a.callback,next:null});e:{var x=t,g=a;switch(f=e,p=n,g.tag){case 1:if(x=g.payload,typeof x=="function"){h=x.call(p,h,f);break e}h=x;break e;case 3:x.flags=x.flags&-65537|128;case 0:if(x=g.payload,f=typeof x=="function"?x.call(p,h,f):x,f==null)break e;h=We({},h,f);break e;case 2:ws=!0}}a.callback!==null&&a.lane!==0&&(t.flags|=64,f=s.effects,f===null?s.effects=[a]:f.push(a))}else p={eventTime:p,lane:f,tag:a.tag,payload:a.payload,callback:a.callback,next:null},d===null?(u=d=p,c=h):d=d.next=p,o|=f;if(a=a.next,a===null){if(a=s.shared.pending,a===null)break;f=a,a=f.next,f.next=null,s.lastBaseUpdate=f,s.shared.pending=null}}while(!0);if(d===null&&(c=h),s.baseState=c,s.firstBaseUpdate=u,s.lastBaseUpdate=d,e=s.shared.interleaved,e!==null){s=e;do o|=s.lane,s=s.next;while(s!==e)}else i===null&&(s.shared.lanes=0);qi|=o,t.lanes=o,t.memoizedState=h}}function Rw(t,e,n){if(t=e.effects,e.effects=null,t!==null)for(e=0;e<t.length;e++){var r=t[e],s=r.callback;if(s!==null){if(r.callback=null,r=n,typeof s!="function")throw Error(B(191,s));s.call(r)}}}var zc={},wr=hi(zc),cc=hi(zc),uc=hi(zc);function Ii(t){if(t===zc)throw Error(B(174));return t}function dv(t,e){switch(Pe(uc,e),Pe(cc,t),Pe(wr,zc),t=e.nodeType,t){case 9:case 11:e=(e=e.documentElement)?e.namespaceURI:Fm(null,"");break;default:t=t===8?e.parentNode:e,e=t.namespaceURI||null,t=t.tagName,e=Fm(e,t)}De(wr),Pe(wr,e)}function xa(){De(wr),De(cc),De(uc)}function mC(t){Ii(uc.current);var e=Ii(wr.current),n=Fm(e,t.type);e!==n&&(Pe(cc,t),Pe(wr,n))}function hv(t){cc.current===t&&(De(wr),De(cc))}var Ve=hi(0);function Hd(t){for(var e=t;e!==null;){if(e.tag===13){var n=e.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||n.data==="$?"||n.data==="$!"))return e}else if(e.tag===19&&e.memoizedProps.revealOrder!==void 0){if(e.flags&128)return e}else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break;for(;e.sibling===null;){if(e.return===null||e.return===t)return null;e=e.return}e.sibling.return=e.return,e=e.sibling}return null}var bp=[];function fv(){for(var t=0;t<bp.length;t++)bp[t]._workInProgressVersionPrimary=null;bp.length=0}var od=ns.ReactCurrentDispatcher,_p=ns.ReactCurrentBatchConfig,Gi=0,ze=null,ot=null,ft=null,Kd=!1,Al=!1,dc=0,VD=0;function Et(){throw Error(B(321))}function pv(t,e){if(e===null)return!1;for(var n=0;n<e.length&&n<t.length;n++)if(!er(t[n],e[n]))return!1;return!0}function mv(t,e,n,r,s,i){if(Gi=i,ze=e,e.memoizedState=null,e.updateQueue=null,e.lanes=0,od.current=t===null||t.memoizedState===null?HD:KD,t=n(r,s),Al){i=0;do{if(Al=!1,dc=0,25<=i)throw Error(B(301));i+=1,ft=ot=null,e.updateQueue=null,od.current=GD,t=n(r,s)}while(Al)}if(od.current=Gd,e=ot!==null&&ot.next!==null,Gi=0,ft=ot=ze=null,Kd=!1,e)throw Error(B(300));return t}function gv(){var t=dc!==0;return dc=0,t}function cr(){var t={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return ft===null?ze.memoizedState=ft=t:ft=ft.next=t,ft}function Tn(){if(ot===null){var t=ze.alternate;t=t!==null?t.memoizedState:null}else t=ot.next;var e=ft===null?ze.memoizedState:ft.next;if(e!==null)ft=e,ot=t;else{if(t===null)throw Error(B(310));ot=t,t={memoizedState:ot.memoizedState,baseState:ot.baseState,baseQueue:ot.baseQueue,queue:ot.queue,next:null},ft===null?ze.memoizedState=ft=t:ft=ft.next=t}return ft}function hc(t,e){return typeof e=="function"?e(t):e}function kp(t){var e=Tn(),n=e.queue;if(n===null)throw Error(B(311));n.lastRenderedReducer=t;var r=ot,s=r.baseQueue,i=n.pending;if(i!==null){if(s!==null){var o=s.next;s.next=i.next,i.next=o}r.baseQueue=s=i,n.pending=null}if(s!==null){i=s.next,r=r.baseState;var a=o=null,c=null,u=i;do{var d=u.lane;if((Gi&d)===d)c!==null&&(c=c.next={lane:0,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null}),r=u.hasEagerState?u.eagerState:t(r,u.action);else{var h={lane:d,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null};c===null?(a=c=h,o=r):c=c.next=h,ze.lanes|=d,qi|=d}u=u.next}while(u!==null&&u!==i);c===null?o=r:c.next=a,er(r,e.memoizedState)||(Qt=!0),e.memoizedState=r,e.baseState=o,e.baseQueue=c,n.lastRenderedState=r}if(t=n.interleaved,t!==null){s=t;do i=s.lane,ze.lanes|=i,qi|=i,s=s.next;while(s!==t)}else s===null&&(n.lanes=0);return[e.memoizedState,n.dispatch]}function Ep(t){var e=Tn(),n=e.queue;if(n===null)throw Error(B(311));n.lastRenderedReducer=t;var r=n.dispatch,s=n.pending,i=e.memoizedState;if(s!==null){n.pending=null;var o=s=s.next;do i=t(i,o.action),o=o.next;while(o!==s);er(i,e.memoizedState)||(Qt=!0),e.memoizedState=i,e.baseQueue===null&&(e.baseState=i),n.lastRenderedState=i}return[i,r]}function gC(){}function yC(t,e){var n=ze,r=Tn(),s=e(),i=!er(r.memoizedState,s);if(i&&(r.memoizedState=s,Qt=!0),r=r.queue,yv(wC.bind(null,n,r,t),[t]),r.getSnapshot!==e||i||ft!==null&&ft.memoizedState.tag&1){if(n.flags|=2048,fc(9,xC.bind(null,n,r,s,e),void 0,null),yt===null)throw Error(B(349));Gi&30||vC(n,e,s)}return s}function vC(t,e,n){t.flags|=16384,t={getSnapshot:e,value:n},e=ze.updateQueue,e===null?(e={lastEffect:null,stores:null},ze.updateQueue=e,e.stores=[t]):(n=e.stores,n===null?e.stores=[t]:n.push(t))}function xC(t,e,n,r){e.value=n,e.getSnapshot=r,bC(e)&&_C(t)}function wC(t,e,n){return n(function(){bC(e)&&_C(t)})}function bC(t){var e=t.getSnapshot;t=t.value;try{var n=e();return!er(t,n)}catch{return!0}}function _C(t){var e=Gr(t,1);e!==null&&Jn(e,t,1,-1)}function Aw(t){var e=cr();return typeof t=="function"&&(t=t()),e.memoizedState=e.baseState=t,t={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:hc,lastRenderedState:t},e.queue=t,t=t.dispatch=WD.bind(null,ze,t),[e.memoizedState,t]}function fc(t,e,n,r){return t={tag:t,create:e,destroy:n,deps:r,next:null},e=ze.updateQueue,e===null?(e={lastEffect:null,stores:null},ze.updateQueue=e,e.lastEffect=t.next=t):(n=e.lastEffect,n===null?e.lastEffect=t.next=t:(r=n.next,n.next=t,t.next=r,e.lastEffect=t)),t}function kC(){return Tn().memoizedState}function ad(t,e,n,r){var s=cr();ze.flags|=t,s.memoizedState=fc(1|e,n,void 0,r===void 0?null:r)}function Gh(t,e,n,r){var s=Tn();r=r===void 0?null:r;var i=void 0;if(ot!==null){var o=ot.memoizedState;if(i=o.destroy,r!==null&&pv(r,o.deps)){s.memoizedState=fc(e,n,i,r);return}}ze.flags|=t,s.memoizedState=fc(1|e,n,i,r)}function Dw(t,e){return ad(8390656,8,t,e)}function yv(t,e){return Gh(2048,8,t,e)}function EC(t,e){return Gh(4,2,t,e)}function CC(t,e){return Gh(4,4,t,e)}function SC(t,e){if(typeof e=="function")return t=t(),e(t),function(){e(null)};if(e!=null)return t=t(),e.current=t,function(){e.current=null}}function NC(t,e,n){return n=n!=null?n.concat([t]):null,Gh(4,4,SC.bind(null,e,t),n)}function vv(){}function TC(t,e){var n=Tn();e=e===void 0?null:e;var r=n.memoizedState;return r!==null&&e!==null&&pv(e,r[1])?r[0]:(n.memoizedState=[t,e],t)}function IC(t,e){var n=Tn();e=e===void 0?null:e;var r=n.memoizedState;return r!==null&&e!==null&&pv(e,r[1])?r[0]:(t=t(),n.memoizedState=[t,e],t)}function PC(t,e,n){return Gi&21?(er(n,e)||(n=ME(),ze.lanes|=n,qi|=n,t.baseState=!0),e):(t.baseState&&(t.baseState=!1,Qt=!0),t.memoizedState=n)}function $D(t,e){var n=Ee;Ee=n!==0&&4>n?n:4,t(!0);var r=_p.transition;_p.transition={};try{t(!1),e()}finally{Ee=n,_p.transition=r}}function jC(){return Tn().memoizedState}function zD(t,e,n){var r=zs(t);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},RC(t))AC(e,n);else if(n=fC(t,e,n,r),n!==null){var s=zt();Jn(n,t,r,s),DC(n,e,r)}}function WD(t,e,n){var r=zs(t),s={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(RC(t))AC(e,s);else{var i=t.alternate;if(t.lanes===0&&(i===null||i.lanes===0)&&(i=e.lastRenderedReducer,i!==null))try{var o=e.lastRenderedState,a=i(o,n);if(s.hasEagerState=!0,s.eagerState=a,er(a,o)){var c=e.interleaved;c===null?(s.next=s,cv(e)):(s.next=c.next,c.next=s),e.interleaved=s;return}}catch{}finally{}n=fC(t,e,s,r),n!==null&&(s=zt(),Jn(n,t,r,s),DC(n,e,r))}}function RC(t){var e=t.alternate;return t===ze||e!==null&&e===ze}function AC(t,e){Al=Kd=!0;var n=t.pending;n===null?e.next=e:(e.next=n.next,n.next=e),t.pending=e}function DC(t,e,n){if(n&4194240){var r=e.lanes;r&=t.pendingLanes,n|=r,e.lanes=n,Yy(t,n)}}var Gd={readContext:Nn,useCallback:Et,useContext:Et,useEffect:Et,useImperativeHandle:Et,useInsertionEffect:Et,useLayoutEffect:Et,useMemo:Et,useReducer:Et,useRef:Et,useState:Et,useDebugValue:Et,useDeferredValue:Et,useTransition:Et,useMutableSource:Et,useSyncExternalStore:Et,useId:Et,unstable_isNewReconciler:!1},HD={readContext:Nn,useCallback:function(t,e){return cr().memoizedState=[t,e===void 0?null:e],t},useContext:Nn,useEffect:Dw,useImperativeHandle:function(t,e,n){return n=n!=null?n.concat([t]):null,ad(4194308,4,SC.bind(null,e,t),n)},useLayoutEffect:function(t,e){return ad(4194308,4,t,e)},useInsertionEffect:function(t,e){return ad(4,2,t,e)},useMemo:function(t,e){var n=cr();return e=e===void 0?null:e,t=t(),n.memoizedState=[t,e],t},useReducer:function(t,e,n){var r=cr();return e=n!==void 0?n(e):e,r.memoizedState=r.baseState=e,t={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:t,lastRenderedState:e},r.queue=t,t=t.dispatch=zD.bind(null,ze,t),[r.memoizedState,t]},useRef:function(t){var e=cr();return t={current:t},e.memoizedState=t},useState:Aw,useDebugValue:vv,useDeferredValue:function(t){return cr().memoizedState=t},useTransition:function(){var t=Aw(!1),e=t[0];return t=$D.bind(null,t[1]),cr().memoizedState=t,[e,t]},useMutableSource:function(){},useSyncExternalStore:function(t,e,n){var r=ze,s=cr();if(Le){if(n===void 0)throw Error(B(407));n=n()}else{if(n=e(),yt===null)throw Error(B(349));Gi&30||vC(r,e,n)}s.memoizedState=n;var i={value:n,getSnapshot:e};return s.queue=i,Dw(wC.bind(null,r,i,t),[t]),r.flags|=2048,fc(9,xC.bind(null,r,i,n,e),void 0,null),n},useId:function(){var t=cr(),e=yt.identifierPrefix;if(Le){var n=Ur,r=Fr;n=(r&~(1<<32-Xn(r)-1)).toString(32)+n,e=":"+e+"R"+n,n=dc++,0<n&&(e+="H"+n.toString(32)),e+=":"}else n=VD++,e=":"+e+"r"+n.toString(32)+":";return t.memoizedState=e},unstable_isNewReconciler:!1},KD={readContext:Nn,useCallback:TC,useContext:Nn,useEffect:yv,useImperativeHandle:NC,useInsertionEffect:EC,useLayoutEffect:CC,useMemo:IC,useReducer:kp,useRef:kC,useState:function(){return kp(hc)},useDebugValue:vv,useDeferredValue:function(t){var e=Tn();return PC(e,ot.memoizedState,t)},useTransition:function(){var t=kp(hc)[0],e=Tn().memoizedState;return[t,e]},useMutableSource:gC,useSyncExternalStore:yC,useId:jC,unstable_isNewReconciler:!1},GD={readContext:Nn,useCallback:TC,useContext:Nn,useEffect:yv,useImperativeHandle:NC,useInsertionEffect:EC,useLayoutEffect:CC,useMemo:IC,useReducer:Ep,useRef:kC,useState:function(){return Ep(hc)},useDebugValue:vv,useDeferredValue:function(t){var e=Tn();return ot===null?e.memoizedState=t:PC(e,ot.memoizedState,t)},useTransition:function(){var t=Ep(hc)[0],e=Tn().memoizedState;return[t,e]},useMutableSource:gC,useSyncExternalStore:yC,useId:jC,unstable_isNewReconciler:!1};function Bn(t,e){if(t&&t.defaultProps){e=We({},e),t=t.defaultProps;for(var n in t)e[n]===void 0&&(e[n]=t[n]);return e}return e}function ig(t,e,n,r){e=t.memoizedState,n=n(r,e),n=n==null?e:We({},e,n),t.memoizedState=n,t.lanes===0&&(t.updateQueue.baseState=n)}var qh={isMounted:function(t){return(t=t._reactInternals)?ao(t)===t:!1},enqueueSetState:function(t,e,n){t=t._reactInternals;var r=zt(),s=zs(t),i=zr(r,s);i.payload=e,n!=null&&(i.callback=n),e=Vs(t,i,s),e!==null&&(Jn(e,t,s,r),id(e,t,s))},enqueueReplaceState:function(t,e,n){t=t._reactInternals;var r=zt(),s=zs(t),i=zr(r,s);i.tag=1,i.payload=e,n!=null&&(i.callback=n),e=Vs(t,i,s),e!==null&&(Jn(e,t,s,r),id(e,t,s))},enqueueForceUpdate:function(t,e){t=t._reactInternals;var n=zt(),r=zs(t),s=zr(n,r);s.tag=2,e!=null&&(s.callback=e),e=Vs(t,s,r),e!==null&&(Jn(e,t,r,n),id(e,t,r))}};function Mw(t,e,n,r,s,i,o){return t=t.stateNode,typeof t.shouldComponentUpdate=="function"?t.shouldComponentUpdate(r,i,o):e.prototype&&e.prototype.isPureReactComponent?!ic(n,r)||!ic(s,i):!0}function MC(t,e,n){var r=!1,s=ei,i=e.contextType;return typeof i=="object"&&i!==null?i=Nn(i):(s=Zt(e)?Hi:At.current,r=e.contextTypes,i=(r=r!=null)?ga(t,s):ei),e=new e(n,i),t.memoizedState=e.state!==null&&e.state!==void 0?e.state:null,e.updater=qh,t.stateNode=e,e._reactInternals=t,r&&(t=t.stateNode,t.__reactInternalMemoizedUnmaskedChildContext=s,t.__reactInternalMemoizedMaskedChildContext=i),e}function Ow(t,e,n,r){t=e.state,typeof e.componentWillReceiveProps=="function"&&e.componentWillReceiveProps(n,r),typeof e.UNSAFE_componentWillReceiveProps=="function"&&e.UNSAFE_componentWillReceiveProps(n,r),e.state!==t&&qh.enqueueReplaceState(e,e.state,null)}function og(t,e,n,r){var s=t.stateNode;s.props=n,s.state=t.memoizedState,s.refs={},uv(t);var i=e.contextType;typeof i=="object"&&i!==null?s.context=Nn(i):(i=Zt(e)?Hi:At.current,s.context=ga(t,i)),s.state=t.memoizedState,i=e.getDerivedStateFromProps,typeof i=="function"&&(ig(t,e,i,n),s.state=t.memoizedState),typeof e.getDerivedStateFromProps=="function"||typeof s.getSnapshotBeforeUpdate=="function"||typeof s.UNSAFE_componentWillMount!="function"&&typeof s.componentWillMount!="function"||(e=s.state,typeof s.componentWillMount=="function"&&s.componentWillMount(),typeof s.UNSAFE_componentWillMount=="function"&&s.UNSAFE_componentWillMount(),e!==s.state&&qh.enqueueReplaceState(s,s.state,null),Wd(t,n,s,r),s.state=t.memoizedState),typeof s.componentDidMount=="function"&&(t.flags|=4194308)}function wa(t,e){try{var n="",r=e;do n+=b2(r),r=r.return;while(r);var s=n}catch(i){s=` 39Error generating stack: `+i.message+` 40`+i.stack}return{value:t,source:e,stack:s,digest:null}}function Cp(t,e,n){return{value:t,source:null,stack:n??null,digest:e??null}}function ag(t,e){try{console.error(e.value)}catch(n){setTimeout(function(){throw n})}}var qD=typeof WeakMap=="function"?WeakMap:Map;function OC(t,e,n){n=zr(-1,n),n.tag=3,n.payload={element:null};var r=e.value;return n.callback=function(){Yd||(Yd=!0,yg=r),ag(t,e)},n}function LC(t,e,n){n=zr(-1,n),n.tag=3;var r=t.type.getDerivedStateFromError;if(typeof r=="function"){var s=e.value;n.payload=function(){return r(s)},n.callback=function(){ag(t,e)}}var i=t.stateNode;return i!==null&&typeof i.componentDidCatch=="function"&&(n.callback=function(){ag(t,e),typeof r!="function"&&($s===null?$s=new Set([this]):$s.add(this));var o=e.stack;this.componentDidCatch(e.value,{componentStack:o!==null?o:""})}),n}function Lw(t,e,n){var r=t.pingCache;if(r===null){r=t.pingCache=new qD;var s=new Set;r.set(e,s)}else s=r.get(e),s===void 0&&(s=new Set,r.set(e,s));s.has(n)||(s.add(n),t=lM.bind(null,t,e,n),e.then(t,t))}function Fw(t){do{var e;if((e=t.tag===13)&&(e=t.memoizedState,e=e!==null?e.dehydrated!==null:!0),e)return t;t=t.return}while(t!==null);return null}function Uw(t,e,n,r,s){return t.mode&1?(t.flags|=65536,t.lanes=s,t):(t===e?t.flags|=65536:(t.flags|=128,n.flags|=131072,n.flags&=-52805,n.tag===1&&(n.alternate===null?n.tag=17:(e=zr(-1,1),e.tag=2,Vs(n,e,1))),n.lanes|=1),t)}var YD=ns.ReactCurrentOwner,Qt=!1;function Ft(t,e,n,r){e.child=t===null?hC(e,null,n,r):va(e,t.child,n,r)}function Bw(t,e,n,r,s){n=n.render;var i=e.ref;return qo(e,s),r=mv(t,e,n,r,i,s),n=gv(),t!==null&&!Qt?(e.updateQueue=t.updateQueue,e.flags&=-2053,t.lanes&=~s,qr(t,e,s)):(Le&&n&&rv(e),e.flags|=1,Ft(t,e,r,s),e.child)}function Vw(t,e,n,r,s){if(t===null){var i=n.type;return typeof i=="function"&&!Sv(i)&&i.defaultProps===void 0&&n.compare===null&&n.defaultProps===void 0?(e.tag=15,e.type=i,FC(t,e,
vendor: 6,407 bytes, line 40
40i,r,s)):(t=dd(n.type,null,r,e,e.mode,s),t.ref=e.ref,t.return=e,e.child=t)}if(i=t.child,!(t.lanes&s)){var o=i.memoizedProps;if(n=n.compare,n=n!==null?n:ic,n(o,r)&&t.ref===e.ref)return qr(t,e,s)}return e.flags|=1,t=Ws(i,r),t.ref=e.ref,t.return=e,e.child=t}function FC(t,e,n,r,s){if(t!==null){var i=t.memoizedProps;if(ic(i,r)&&t.ref===e.ref)if(Qt=!1,e.pendingProps=r=i,(t.lanes&s)!==0)t.flags&131072&&(Qt=!0);else return e.lanes=t.lanes,qr(t,e,s)}return lg(t,e,n,r,s)}function UC(t,e,n){var r=e.pendingProps,s=r.children,i=t!==null?t.memoizedState:null;if(r.mode==="hidden")if(!(e.mode&1))e.memoizedState={baseLanes:0,cachePool:null,transitions:null},Pe(Oo,sn),sn|=n;else{if(!(n&1073741824))return t=i!==null?i.baseLanes|n:n,e.lanes=e.childLanes=1073741824,e.memoizedState={baseLanes:t,cachePool:null,transitions:null},e.updateQueue=null,Pe(Oo,sn),sn|=t,null;e.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=i!==null?i.baseLanes:n,Pe(Oo,sn),sn|=r}else i!==null?(r=i.baseLanes|n,e.memoizedState=null):r=n,Pe(Oo,sn),sn|=r;return Ft(t,e,s,n),e.child}function BC(t,e){var n=e.ref;(t===null&&n!==null||t!==null&&t.ref!==n)&&(e.flags|=512,e.flags|=2097152)}function lg(t,e,n,r,s){var i=Zt(n)?Hi:At.current;return i=ga(e,i),qo(e,s),n=mv(t,e,n,r,i,s),r=gv(),t!==null&&!Qt?(e.updateQueue=t.updateQueue,e.flags&=-2053,t.lanes&=~s,qr(t,e,s)):(Le&&r&&rv(e),e.flags|=1,Ft(t,e,n,s),e.child)}function $w(t,e,n,r,s){if(Zt(n)){var i=!0;Ud(e)}else i=!1;if(qo(e,s),e.stateNode===null)ld(t,e),MC(e,n,r),og(e,n,r,s),r=!0;else if(t===null){var o=e.stateNode,a=e.memoizedProps;o.props=a;var c=o.context,u=n.contextType;typeof u=="object"&&u!==null?u=Nn(u):(u=Zt(n)?Hi:At.current,u=ga(e,u));var d=n.getDerivedStateFromProps,h=typeof d=="function"||typeof o.getSnapshotBeforeUpdate=="function";h||typeof o.UNSAFE_componentWillReceiveProps!="function"&&typeof o.componentWillReceiveProps!="function"||(a!==r||c!==u)&&Ow(e,o,r,u),ws=!1;var f=e.memoizedState;o.state=f,Wd(e,r,o,s),c=e.memoizedState,a!==r||f!==c||Jt.current||ws?(typeof d=="function"&&(ig(e,n,d,r),c=e.memoizedState),(a=ws||Mw(e,n,a,r,f,c,u))?(h||typeof o.UNSAFE_componentWillMount!="function"&&typeof o.componentWillMount!="function"||(typeof o.componentWillMount=="function"&&o.componentWillMount(),typeof o.UNSAFE_componentWillMount=="function"&&o.UNSAFE_componentWillMount()),typeof o.componentDidMount=="function"&&(e.flags|=4194308)):(typeof o.componentDidMount=="function"&&(e.flags|=4194308),e.memoizedProps=r,e.memoizedState=c),o.props=r,o.state=c,o.context=u,r=a):(typeof o.componentDidMount=="function"&&(e.flags|=4194308),r=!1)}else{o=e.stateNode,pC(t,e),a=e.memoizedProps,u=e.type===e.elementType?a:Bn(e.type,a),o.props=u,h=e.pendingProps,f=o.context,c=n.contextType,typeof c=="object"&&c!==null?c=Nn(c):(c=Zt(n)?Hi:At.current,c=ga(e,c));var p=n.getDerivedStateFromProps;(d=typeof p=="function"||typeof o.getSnapshotBeforeUpdate=="function")||typeof o.UNSAFE_componentWillReceiveProps!="function"&&typeof o.componentWillReceiveProps!="function"||(a!==h||f!==c)&&Ow(e,o,r,c),ws=!1,f=e.memoizedState,o.state=f,Wd(e,r,o,s);var x=e.memoizedState;a!==h||f!==x||Jt.current||ws?(typeof p=="function"&&(ig(e,n,p,r),x=e.memoizedState),(u=ws||Mw(e,n,u,r,f,x,c)||!1)?(d||typeof o.UNSAFE_componentWillUpdate!="function"&&typeof o.componentWillUpdate!="function"||(typeof o.componentWillUpdate=="function"&&o.componentWillUpdate(r,x,c),typeof o.UNSAFE_componentWillUpdate=="function"&&o.UNSAFE_componentWillUpdate(r,x,c)),typeof o.componentDidUpdate=="function"&&(e.flags|=4),typeof o.getSnapshotBeforeUpdate=="function"&&(e.flags|=1024)):(typeof o.componentDidUpdate!="function"||a===t.memoizedProps&&f===t.memoizedState||(e.flags|=4),typeof o.getSnapshotBeforeUpdate!="function"||a===t.memoizedProps&&f===t.memoizedState||(e.flags|=1024),e.memoizedProps=r,e.memoizedState=x),o.props=r,o.state=x,o.context=c,r=u):(typeof o.componentDidUpdate!="function"||a===t.memoizedProps&&f===t.memoizedState||(e.flags|=4),typeof o.getSnapshotBeforeUpdate!="function"||a===t.memoizedProps&&f===t.memoizedState||(e.flags|=1024),r=!1)}return cg(t,e,n,r,i,s)}function cg(t,e,n,r,s,i){BC(t,e);var o=(e.flags&128)!==0;if(!r&&!o)return s&&Nw(e,n,!1),qr(t,e,i);r=e.stateNode,YD.current=e;var a=o&&typeof n.getDerivedStateFromError!="function"?null:r.render();return e.flags|=1,t!==null&&o?(e.child=va(e,t.child,null,i),e.child=va(e,null,a,i)):Ft(t,e,a,i),e.memoizedState=r.state,s&&Nw(e,n,!0),e.child}function VC(t){var e=t.stateNode;e.pendingContext?Sw(t,e.pendingContext,e.pendingContext!==e.context):e.context&&Sw(t,e.context,!1),dv(t,e.containerInfo)}function zw(t,e,n,r,s){return ya(),iv(s),e.flags|=256,Ft(t,e,n,r),e.child}var ug={dehydrated:null,treeContext:null,retryLane:0};function dg(t){return{baseLanes:t,cachePool:null,transitions:null}}function $C(t,e,n){var r=e.pendingProps,s=Ve.current,i=!1,o=(e.flags&128)!==0,a;if((a=o)||(a=t!==null&&t.memoizedState===null?!1:(s&2)!==0),a?(i=!0,e.flags&=-129):(t===null||t.memoizedState!==null)&&(s|=1),Pe(Ve,s&1),t===null)return rg(e),t=e.memoizedState,t!==null&&(t=t.dehydrated,t!==null)?(e.mode&1?t.data==="$!"?e.lanes=8:e.lanes=1073741824:e.lanes=1,null):(o=r.children,t=r.fallback,i?(r=e.mode,i=e.child,o={mode:"hidden",children:o},!(r&1)&&i!==null?(i.childLanes=0,i.pendingProps=o):i=Xh(o,r,0,null),t=$i(t,r,n,null),i.return=e,t.return=e,i.sibling=t,e.child=i,e.child.memoizedState=dg(n),e.memoizedState=ug,t):xv(e,o));if(s=t.memoizedState,s!==null&&(a=s.dehydrated,a!==null))return QD(t,e,o,r,a,s,n);if(i){i=r.fallback,o=e.mode,s=t.child,a=s.sibling;var c={mode:"hidden",children:r.children};return!(o&1)&&e.child!==s?(r=e.child,r.childLanes=0,r.pendingProps=c,e.deletions=null):(r=Ws(s,c),r.subtreeFlags=s.subtreeFlags&14680064),a!==null?i=Ws(a,i):(i=$i(i,o,n,null),i.flags|=2),i.return=e,r.return=e,r.sibling=i,e.child=r,r=i,i=e.child,o=t.child.memoizedState,o=o===null?dg(n):{baseLanes:o.baseLanes|n,cachePool:null,transitions:o.transitions},i.memoizedState=o,i.childLanes=t.childLanes&~n,e.memoizedState=ug,r}return i=t.child,t=i.sibling,r=Ws(i,{mode:"visible",children:r.children}),!(e.mode&1)&&(r.lanes=n),r.return=e,r.sibling=null,t!==null&&(n=e.deletions,n===null?(e.deletions=[t],e.flags|=16):n.push(t)),e.child=r,e.memoizedState=null,r}function xv(t,e){return e=Xh({mode:"visible",children:e},t.mode,0,null),e.return=t,t.child=e}function Cu(t,e,n,r){return r!==null&&iv(r),va(e,t.child,null,n),t=xv(e,e.pen
vendor: 7,680 bytes, line 40
40dingProps.children),t.flags|=2,e.memoizedState=null,t}function QD(t,e,n,r,s,i,o){if(n)return e.flags&256?(e.flags&=-257,r=Cp(Error(B(422))),Cu(t,e,o,r)):e.memoizedState!==null?(e.child=t.child,e.flags|=128,null):(i=r.fallback,s=e.mode,r=Xh({mode:"visible",children:r.children},s,0,null),i=$i(i,s,o,null),i.flags|=2,r.return=e,i.return=e,r.sibling=i,e.child=r,e.mode&1&&va(e,t.child,null,o),e.child.memoizedState=dg(o),e.memoizedState=ug,i);if(!(e.mode&1))return Cu(t,e,o,null);if(s.data==="$!"){if(r=s.nextSibling&&s.nextSibling.dataset,r)var a=r.dgst;return r=a,i=Error(B(419)),r=Cp(i,r,void 0),Cu(t,e,o,r)}if(a=(o&t.childLanes)!==0,Qt||a){if(r=yt,r!==null){switch(o&-o){case 4:s=2;break;case 16:s=8;break;case 64: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:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:s=32;break;case 536870912:s=268435456;break;default:s=0}s=s&(r.suspendedLanes|o)?0:s,s!==0&&s!==i.retryLane&&(i.retryLane=s,Gr(t,s),Jn(r,t,s,-1))}return Cv(),r=Cp(Error(B(421))),Cu(t,e,o,r)}return s.data==="$?"?(e.flags|=128,e.child=t.child,e=cM.bind(null,t),s._reactRetry=e,null):(t=i.treeContext,an=Bs(s.nextSibling),cn=e,Le=!0,Hn=null,t!==null&&(wn[bn++]=Fr,wn[bn++]=Ur,wn[bn++]=Ki,Fr=t.id,Ur=t.overflow,Ki=e),e=xv(e,r.children),e.flags|=4096,e)}function Ww(t,e,n){t.lanes|=e;var r=t.alternate;r!==null&&(r.lanes|=e),sg(t.return,e,n)}function Sp(t,e,n,r,s){var i=t.memoizedState;i===null?t.memoizedState={isBackwards:e,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:s}:(i.isBackwards=e,i.rendering=null,i.renderingStartTime=0,i.last=r,i.tail=n,i.tailMode=s)}function zC(t,e,n){var r=e.pendingProps,s=r.revealOrder,i=r.tail;if(Ft(t,e,r.children,n),r=Ve.current,r&2)r=r&1|2,e.flags|=128;else{if(t!==null&&t.flags&128)e:for(t=e.child;t!==null;){if(t.tag===13)t.memoizedState!==null&&Ww(t,n,e);else if(t.tag===19)Ww(t,n,e);else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break e;for(;t.sibling===null;){if(t.return===null||t.return===e)break e;t=t.return}t.sibling.return=t.return,t=t.sibling}r&=1}if(Pe(Ve,r),!(e.mode&1))e.memoizedState=null;else switch(s){case"forwards":for(n=e.child,s=null;n!==null;)t=n.alternate,t!==null&&Hd(t)===null&&(s=n),n=n.sibling;n=s,n===null?(s=e.child,e.child=null):(s=n.sibling,n.sibling=null),Sp(e,!1,s,n,i);break;case"backwards":for(n=null,s=e.child,e.child=null;s!==null;){if(t=s.alternate,t!==null&&Hd(t)===null){e.child=s;break}t=s.sibling,s.sibling=n,n=s,s=t}Sp(e,!0,n,null,i);break;case"together":Sp(e,!1,null,null,void 0);break;default:e.memoizedState=null}return e.child}function ld(t,e){!(e.mode&1)&&t!==null&&(t.alternate=null,e.alternate=null,e.flags|=2)}function qr(t,e,n){if(t!==null&&(e.dependencies=t.dependencies),qi|=e.lanes,!(n&e.childLanes))return null;if(t!==null&&e.child!==t.child)throw Error(B(153));if(e.child!==null){for(t=e.child,n=Ws(t,t.pendingProps),e.child=n,n.return=e;t.sibling!==null;)t=t.sibling,n=n.sibling=Ws(t,t.pendingProps),n.return=e;n.sibling=null}return e.child}function XD(t,e,n){switch(e.tag){case 3:VC(e),ya();break;case 5:mC(e);break;case 1:Zt(e.type)&&Ud(e);break;case 4:dv(e,e.stateNode.containerInfo);break;case 10:var r=e.type._context,s=e.memoizedProps.value;Pe($d,r._currentValue),r._currentValue=s;break;case 13:if(r=e.memoizedState,r!==null)return r.dehydrated!==null?(Pe(Ve,Ve.current&1),e.flags|=128,null):n&e.child.childLanes?$C(t,e,n):(Pe(Ve,Ve.current&1),t=qr(t,e,n),t!==null?t.sibling:null);Pe(Ve,Ve.current&1);break;case 19:if(r=(n&e.childLanes)!==0,t.flags&128){if(r)return zC(t,e,n);e.flags|=128}if(s=e.memoizedState,s!==null&&(s.rendering=null,s.tail=null,s.lastEffect=null),Pe(Ve,Ve.current),r)break;return null;case 22:case 23:return e.lanes=0,UC(t,e,n)}return qr(t,e,n)}var WC,hg,HC,KC;WC=function(t,e){for(var n=e.child;n!==null;){if(n.tag===5||n.tag===6)t.appendChild(n.stateNode);else if(n.tag!==4&&n.child!==null){n.child.return=n,n=n.child;continue}if(n===e)break;for(;n.sibling===null;){if(n.return===null||n.return===e)return;n=n.return}n.sibling.return=n.return,n=n.sibling}};hg=function(){};HC=function(t,e,n,r){var s=t.memoizedProps;if(s!==r){t=e.stateNode,Ii(wr.current);var i=null;switch(n){case"input":s=Dm(t,s),r=Dm(t,r),i=[];break;case"select":s=We({},s,{value:void 0}),r=We({},r,{value:void 0}),i=[];break;case"textarea":s=Lm(t,s),r=Lm(t,r),i=[];break;default:typeof s.onClick!="function"&&typeof r.onClick=="function"&&(t.onclick=Ld)}Um(n,r);var o;n=null;for(u in s)if(!r.hasOwnProperty(u)&&s.hasOwnProperty(u)&&s[u]!=null)if(u==="style"){var a=s[u];for(o in a)a.hasOwnProperty(o)&&(n||(n={}),n[o]="")}else u!=="dangerouslySetInnerHTML"&&u!=="children"&&u!=="suppressContentEditableWarning"&&u!=="suppressHydrationWarning"&&u!=="autoFocus"&&(Jl.hasOwnProperty(u)?i||(i=[]):(i=i||[]).push(u,null));for(u in r){var c=r[u];if(a=s!=null?s[u]:void 0,r.hasOwnProperty(u)&&c!==a&&(c!=null||a!=null))if(u==="style")if(a){for(o in a)!a.hasOwnProperty(o)||c&&c.hasOwnProperty(o)||(n||(n={}),n[o]="");for(o in c)c.hasOwnProperty(o)&&a[o]!==c[o]&&(n||(n={}),n[o]=c[o])}else n||(i||(i=[]),i.push(u,n)),n=c;else u==="dangerouslySetInnerHTML"?(c=c?c.__html:void 0,a=a?a.__html:void 0,c!=null&&a!==c&&(i=i||[]).push(u,c)):u==="children"?typeof c!="string"&&typeof c!="number"||(i=i||[]).push(u,""+c):u!=="suppressContentEditableWarning"&&u!=="suppressHydrationWarning"&&(Jl.hasOwnProperty(u)?(c!=null&&u==="onScroll"&&Re("scroll",t),i||a===c||(i=[])):(i=i||[]).push(u,c))}n&&(i=i||[]).push("style",n);var u=i;(e.updateQueue=u)&&(e.flags|=4)}};KC=function(t,e,n,r){n!==r&&(e.flags|=4)};function ll(t,e){if(!Le)switch(t.tailMode){case"hidden":e=t.tail;for(var n=null;e!==null;)e.alternate!==null&&(n=e),e=e.sibling;n===null?t.tail=null:n.sibling=null;break;case"collapsed":n=t.tail;for(var r=null;n!==null;)n.alternate!==null&&(r=n),n=n.sibling;r===null?e||t.tail===null?t.tail=null:t.tail.sibling=null:r.sibling=null}}function Ct(t){var e=t.alternate!==null&&t.alternate.child===t.child,n=0,r=0;if(e)for(var s=t.child;s!==null;)n|=s.lanes|s.childLanes,r|=s.subtreeFlags&14680064,r|=s.flags&14680064,s.return=t,s=s.sibling;else for(s=t.child;s!==null;)n|=s.lanes|s.childLanes,r|=s.subtreeFlags,r|=s.flags,s.return=t,s=s.sibling;return t.subtreeFlags|=r,t.childLanes=n,e}function JD(t,e,n){var r=e.pendingProps;switch(sv(e),e.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Ct(e),null;case 1:return Zt(e.type)&&Fd(),Ct(e),null;case 3:return r=e.stateNode,xa(),De(Jt),De(At),fv(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),(t===null||t.child===null)&&(ku(e)?e.flags|=4:t===null||t.memoizedState.isDehydrated&&!(e.flags&256)||(e.flags|=1024,Hn!==null&&(wg(Hn),Hn=null))),hg(t,e),Ct(e),null;case 5:hv(e);var s=Ii(uc.current);if(n=e.type,t!==null&&e.stateNode!=null)HC(t,e,n,r,s),t.ref!==e.ref&&(e.flags|=512,e.flags|=2097152);else{if(!r){if(e.stateNode===null)throw Error(B(166));return Ct(e),null}if(t=Ii(wr.current),ku(e)){r=e.stateNode,n=e.type;var i=e.memoizedProps;switch(r[pr]=e,r[lc]=i,t=(e.mode&1)!==0,n){case"dialog":Re("cancel",r),Re("close",r);break;case"iframe":case"object":case"embed":Re("load",r);break;case"video":case"audio":for(s=0;s<_l.length;s++)Re(_l[s],r);break;case"source":Re("error",r);break;case"img":case"image":case"link":Re("error",r),Re("load",r);break;case"details":Re("toggle",r);break;case"input":Z0(r,i),Re("invalid",r);break;case"select":r._wrapperState={wasMultiple:!!i.multiple},Re("invalid",r);break;case"textarea":tw(r,i),Re("invalid",r)}Um(n,i),s=null;for(var o in i)if(i.hasOwnProperty(o)){var a=i[o];
vendor: 30,121 bytes, line 40
40o==="children"?typeof a=="string"?r.textContent!==a&&(i.suppressHydrationWarning!==!0&&_u(r.textContent,a,t),s=["children",a]):typeof a=="number"&&r.textContent!==""+a&&(i.suppressHydrationWarning!==!0&&_u(r.textContent,a,t),s=["children",""+a]):Jl.hasOwnProperty(o)&&a!=null&&o==="onScroll"&&Re("scroll",r)}switch(n){case"input":pu(r),ew(r,i,!0);break;case"textarea":pu(r),nw(r);break;case"select":case"option":break;default:typeof i.onClick=="function"&&(r.onclick=Ld)}r=s,e.updateQueue=r,r!==null&&(e.flags|=4)}else{o=s.nodeType===9?s:s.ownerDocument,t==="http://www.w3.org/1999/xhtml"&&(t=wE(n)),t==="http://www.w3.org/1999/xhtml"?n==="script"?(t=o.createElement("div"),t.innerHTML="<script><\/script>",t=t.removeChild(t.firstChild)):typeof r.is=="string"?t=o.createElement(n,{is:r.is}):(t=o.createElement(n),n==="select"&&(o=t,r.multiple?o.multiple=!0:r.size&&(o.size=r.size))):t=o.createElementNS(t,n),t[pr]=e,t[lc]=r,WC(t,e,!1,!1),e.stateNode=t;e:{switch(o=Bm(n,r),n){case"dialog":Re("cancel",t),Re("close",t),s=r;break;case"iframe":case"object":case"embed":Re("load",t),s=r;break;case"video":case"audio":for(s=0;s<_l.length;s++)Re(_l[s],t);s=r;break;case"source":Re("error",t),s=r;break;case"img":case"image":case"link":Re("error",t),Re("load",t),s=r;break;case"details":Re("toggle",t),s=r;break;case"input":Z0(t,r),s=Dm(t,r),Re("invalid",t);break;case"option":s=r;break;case"select":t._wrapperState={wasMultiple:!!r.multiple},s=We({},r,{value:void 0}),Re("invalid",t);break;case"textarea":tw(t,r),s=Lm(t,r),Re("invalid",t);break;default:s=r}Um(n,s),a=s;for(i in a)if(a.hasOwnProperty(i)){var c=a[i];i==="style"?kE(t,c):i==="dangerouslySetInnerHTML"?(c=c?c.__html:void 0,c!=null&&bE(t,c)):i==="children"?typeof c=="string"?(n!=="textarea"||c!=="")&&Zl(t,c):typeof c=="number"&&Zl(t,""+c):i!=="suppressContentEditableWarning"&&i!=="suppressHydrationWarning"&&i!=="autoFocus"&&(Jl.hasOwnProperty(i)?c!=null&&i==="onScroll"&&Re("scroll",t):c!=null&&zy(t,i,c,o))}switch(n){case"input":pu(t),ew(t,r,!1);break;case"textarea":pu(t),nw(t);break;case"option":r.value!=null&&t.setAttribute("value",""+Zs(r.value));break;case"select":t.multiple=!!r.multiple,i=r.value,i!=null?Wo(t,!!r.multiple,i,!1):r.defaultValue!=null&&Wo(t,!!r.multiple,r.defaultValue,!0);break;default:typeof s.onClick=="function"&&(t.onclick=Ld)}switch(n){case"button":case"input":case"select":case"textarea":r=!!r.autoFocus;break e;case"img":r=!0;break e;default:r=!1}}r&&(e.flags|=4)}e.ref!==null&&(e.flags|=512,e.flags|=2097152)}return Ct(e),null;case 6:if(t&&e.stateNode!=null)KC(t,e,t.memoizedProps,r);else{if(typeof r!="string"&&e.stateNode===null)throw Error(B(166));if(n=Ii(uc.current),Ii(wr.current),ku(e)){if(r=e.stateNode,n=e.memoizedProps,r[pr]=e,(i=r.nodeValue!==n)&&(t=cn,t!==null))switch(t.tag){case 3:_u(r.nodeValue,n,(t.mode&1)!==0);break;case 5:t.memoizedProps.suppressHydrationWarning!==!0&&_u(r.nodeValue,n,(t.mode&1)!==0)}i&&(e.flags|=4)}else r=(n.nodeType===9?n:n.ownerDocument).createTextNode(r),r[pr]=e,e.stateNode=r}return Ct(e),null;case 13:if(De(Ve),r=e.memoizedState,t===null||t.memoizedState!==null&&t.memoizedState.dehydrated!==null){if(Le&&an!==null&&e.mode&1&&!(e.flags&128))uC(),ya(),e.flags|=98560,i=!1;else if(i=ku(e),r!==null&&r.dehydrated!==null){if(t===null){if(!i)throw Error(B(318));if(i=e.memoizedState,i=i!==null?i.dehydrated:null,!i)throw Error(B(317));i[pr]=e}else ya(),!(e.flags&128)&&(e.memoizedState=null),e.flags|=4;Ct(e),i=!1}else Hn!==null&&(wg(Hn),Hn=null),i=!0;if(!i)return e.flags&65536?e:null}return e.flags&128?(e.lanes=n,e):(r=r!==null,r!==(t!==null&&t.memoizedState!==null)&&r&&(e.child.flags|=8192,e.mode&1&&(t===null||Ve.current&1?ct===0&&(ct=3):Cv())),e.updateQueue!==null&&(e.flags|=4),Ct(e),null);case 4:return xa(),hg(t,e),t===null&&oc(e.stateNode.containerInfo),Ct(e),null;case 10:return lv(e.type._context),Ct(e),null;case 17:return Zt(e.type)&&Fd(),Ct(e),null;case 19:if(De(Ve),i=e.memoizedState,i===null)return Ct(e),null;if(r=(e.flags&128)!==0,o=i.rendering,o===null)if(r)ll(i,!1);else{if(ct!==0||t!==null&&t.flags&128)for(t=e.child;t!==null;){if(o=Hd(t),o!==null){for(e.flags|=128,ll(i,!1),r=o.updateQueue,r!==null&&(e.updateQueue=r,e.flags|=4),e.subtreeFlags=0,r=n,n=e.child;n!==null;)i=n,t=r,i.flags&=14680066,o=i.alternate,o===null?(i.childLanes=0,i.lanes=t,i.child=null,i.subtreeFlags=0,i.memoizedProps=null,i.memoizedState=null,i.updateQueue=null,i.dependencies=null,i.stateNode=null):(i.childLanes=o.childLanes,i.lanes=o.lanes,i.child=o.child,i.subtreeFlags=0,i.deletions=null,i.memoizedProps=o.memoizedProps,i.memoizedState=o.memoizedState,i.updateQueue=o.updateQueue,i.type=o.type,t=o.dependencies,i.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext}),n=n.sibling;return Pe(Ve,Ve.current&1|2),e.child}t=t.sibling}i.tail!==null&&Je()>ba&&(e.flags|=128,r=!0,ll(i,!1),e.lanes=4194304)}else{if(!r)if(t=Hd(o),t!==null){if(e.flags|=128,r=!0,n=t.updateQueue,n!==null&&(e.updateQueue=n,e.flags|=4),ll(i,!0),i.tail===null&&i.tailMode==="hidden"&&!o.alternate&&!Le)return Ct(e),null}else 2*Je()-i.renderingStartTime>ba&&n!==1073741824&&(e.flags|=128,r=!0,ll(i,!1),e.lanes=4194304);i.isBackwards?(o.sibling=e.child,e.child=o):(n=i.last,n!==null?n.sibling=o:e.child=o,i.last=o)}return i.tail!==null?(e=i.tail,i.rendering=e,i.tail=e.sibling,i.renderingStartTime=Je(),e.sibling=null,n=Ve.current,Pe(Ve,r?n&1|2:n&1),e):(Ct(e),null);case 22:case 23:return Ev(),r=e.memoizedState!==null,t!==null&&t.memoizedState!==null!==r&&(e.flags|=8192),r&&e.mode&1?sn&1073741824&&(Ct(e),e.subtreeFlags&6&&(e.flags|=8192)):Ct(e),null;case 24:return null;case 25:return null}throw Error(B(156,e.tag))}function ZD(t,e){switch(sv(e),e.tag){case 1:return Zt(e.type)&&Fd(),t=e.flags,t&65536?(e.flags=t&-65537|128,e):null;case 3:return xa(),De(Jt),De(At),fv(),t=e.flags,t&65536&&!(t&128)?(e.flags=t&-65537|128,e):null;case 5:return hv(e),null;case 13:if(De(Ve),t=e.memoizedState,t!==null&&t.dehydrated!==null){if(e.alternate===null)throw Error(B(340));ya()}return t=e.flags,t&65536?(e.flags=t&-65537|128,e):null;case 19:return De(Ve),null;case 4:return xa(),null;case 10:return lv(e.type._context),null;case 22:case 23:return Ev(),null;case 24:return null;default:return null}}var Su=!1,Tt=!1,eM=typeof WeakSet=="function"?WeakSet:Set,q=null;function Mo(t,e){var n=t.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){Ge(t,e,r)}else n.current=null}function fg(t,e,n){try{n()}catch(r){Ge(t,e,r)}}var Hw=!1;function tM(t,e){if(Qm=Dd,t=XE(),nv(t)){if("selectionStart"in t)var n={start:t.selectionStart,end:t.selectionEnd};else e:{n=(n=t.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var s=r.anchorOffset,i=r.focusNode;r=r.focusOffset;try{n.nodeType,i.nodeType}catch{n=null;break e}var o=0,a=-1,c=-1,u=0,d=0,h=t,f=null;t:for(;;){for(var p;h!==n||s!==0&&h.nodeType!==3||(a=o+s),h!==i||r!==0&&h.nodeType!==3||(c=o+r),h.nodeType===3&&(o+=h.nodeValue.length),(p=h.firstChild)!==null;)f=h,h=p;for(;;){if(h===t)break t;if(f===n&&++u===s&&(a=o),f===i&&++d===r&&(c=o),(p=h.nextSibling)!==null)break;h=f,f=h.parentNode}h=p}n=a===-1||c===-1?null:{start:a,end:c}}else n=null}n=n||{start:0,end:0}}else n=null;for(Xm={focusedElem:t,selectionRange:n},Dd=!1,q=e;q!==null;)if(e=q,t=e.child,(e.subtreeFlags&1028)!==0&&t!==null)t.return=e,q=t;else for(;q!==null;){e=q;try{var x=e.alternate;if(e.flags&1024)switch(e.tag){case 0:case 11:case 15:break;case 1:if(x!==null){var g=x.memoizedProps,y=x.memoizedState,w=e.stateNode,v=w.getSnapshotBeforeUpdate(e.elementType===e.type?g:Bn(e.type,g),y);w.__reactInternalSnapshotBeforeUpdate=v}break;case 3:var b=e.stateNode.containerInfo;b.nodeType===1?b.textContent="":b.nodeType===9&&b.documentElement&&b.removeChild(b.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(B(163))}}catch(_){Ge(e,e.return,_)}if(t=e.sibling,t!==null){t.return=e.return,q=t;break}q=e.return}return x=Hw,Hw=!1,x}function Dl(t,e,n){var r=e.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var s=r=r.next;do{if((s.tag&t)===t){var i=s.destroy;s.destroy=void 0,i!==void 0&&fg(e,n,i)}s=s.next}while(s!==r)}}function Yh(t,e){if(e=e.updateQueue,e=e!==null?e.lastEffect:null,e!==null){var n=e=e.next;do{if((n.tag&t)===t){var r=n.create;n.destroy=r()}n=n.next}while(n!==e)}}function pg(t){var e=t.ref;if(e!==null){var n=t.stateNode;switch(t.tag){case 5:t=n;break;default:t=n}typeof e=="function"?e(t):e.current=t}}function GC(t){var e=t.alternate;e!==null&&(t.alternate=null,GC(e)),t.child=null,t.deletions=null,t.sibling=null,t.tag===5&&(e=t.stateNode,e!==null&&(delete e[pr],delete e[lc],delete e[eg],delete e[LD],delete e[FD])),t.stateNode=null,t.return=null,t.dependencies=null,t.memoizedProps=null,t.memoizedState=null,t.pendingProps=null,t.stateNode=null,t.updateQueue=null}function qC(t){return t.tag===5||t.tag===3||t.tag===4}function Kw(t){e:for(;;){for(;t.sibling===null;){if(t.return===null||qC(t.return))return null;t=t.return}for(t.sibling.return=t.return,t=t.sibling;t.tag!==5&&t.tag!==6&&t.tag!==18;){if(t.flags&2||t.child===null||t.tag===4)continue e;t.child.return=t,t=t.child}if(!(t.flags&2))return t.stateNode}}function mg(t,e,n){var r=t.tag;if(r===5||r===6)t=t.stateNode,e?n.nodeType===8?n.parentNode.insertBefore(t,e):n.insertBefore(t,e):(n.nodeType===8?(e=n.parentNode,e.insertBefore(t,n)):(e=n,e.appendChild(t)),n=n._reactRootContainer,n!=null||e.onclick!==null||(e.onclick=Ld));else if(r!==4&&(t=t.child,t!==null))for(mg(t,e,n),t=t.sibling;t!==null;)mg(t,e,n),t=t.sibling}function gg(t,e,n){var r=t.tag;if(r===5||r===6)t=t.stateNode,e?n.insertBefore(t,e):n.appendChild(t);else if(r!==4&&(t=t.child,t!==null))for(gg(t,e,n),t=t.sibling;t!==null;)gg(t,e,n),t=t.sibling}var xt=null,Wn=!1;function us(t,e,n){for(n=n.child;n!==null;)YC(t,e,n),n=n.sibling}function YC(t,e,n){if(xr&&typeof xr.onCommitFiberUnmount=="function")try{xr.onCommitFiberUnmount(Vh,n)}catch{}switch(n.tag){case 5:Tt||Mo(n,e);case 6:var r=xt,s=Wn;xt=null,us(t,e,n),xt=r,Wn=s,xt!==null&&(Wn?(t=xt,n=n.stateNode,t.nodeType===8?t.parentNode.removeChild(n):t.removeChild(n)):xt.removeChild(n.stateNode));break;case 18:xt!==null&&(Wn?(t=xt,n=n.stateNode,t.nodeType===8?xp(t.parentNode,n):t.nodeType===1&&xp(t,n),rc(t)):xp(xt,n.stateNode));break;case 4:r=xt,s=Wn,xt=n.stateNode.containerInfo,Wn=!0,us(t,e,n),xt=r,Wn=s;break;case 0:case 11:case 14:case 15:if(!Tt&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){s=r=r.next;do{var i=s,o=i.destroy;i=i.tag,o!==void 0&&(i&2||i&4)&&fg(n,e,o),s=s.next}while(s!==r)}us(t,e,n);break;case 1:if(!Tt&&(Mo(n,e),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(a){Ge(n,e,a)}us(t,e,n);break;case 21:us(t,e,n);break;case 22:n.mode&1?(Tt=(r=Tt)||n.memoizedState!==null,us(t,e,n),Tt=r):us(t,e,n);break;default:us(t,e,n)}}function Gw(t){var e=t.updateQueue;if(e!==null){t.updateQueue=null;var n=t.stateNode;n===null&&(n=t.stateNode=new eM),e.forEach(function(r){var s=uM.bind(null,t,r);n.has(r)||(n.add(r),r.then(s,s))})}}function Mn(t,e){var n=e.deletions;if(n!==null)for(var r=0;r<n.length;r++){var s=n[r];try{var i=t,o=e,a=o;e:for(;a!==null;){switch(a.tag){case 5:xt=a.stateNode,Wn=!1;break e;case 3:xt=a.stateNode.containerInfo,Wn=!0;break e;case 4:xt=a.stateNode.containerInfo,Wn=!0;break e}a=a.return}if(xt===null)throw Error(B(160));YC(i,o,s),xt=null,Wn=!1;var c=s.alternate;c!==null&&(c.return=null),s.return=null}catch(u){Ge(s,e,u)}}if(e.subtreeFlags&12854)for(e=e.child;e!==null;)QC(e,t),e=e.sibling}function QC(t,e){var n=t.alternate,r=t.flags;switch(t.tag){case 0:case 11:case 14:case 15:if(Mn(e,t),lr(t),r&4){try{Dl(3,t,t.return),Yh(3,t)}catch(g){Ge(t,t.return,g)}try{Dl(5,t,t.return)}catch(g){Ge(t,t.return,g)}}break;case 1:Mn(e,t),lr(t),r&512&&n!==null&&Mo(n,n.return);break;case 5:if(Mn(e,t),lr(t),r&512&&n!==null&&Mo(n,n.return),t.flags&32){var s=t.stateNode;try{Zl(s,"")}catch(g){Ge(t,t.return,g)}}if(r&4&&(s=t.stateNode,s!=null)){var i=t.memoizedProps,o=n!==null?n.memoizedProps:i,a=t.type,c=t.updateQueue;if(t.updateQueue=null,c!==null)try{a==="input"&&i.type==="radio"&&i.name!=null&&vE(s,i),Bm(a,o);var u=Bm(a,i);for(o=0;o<c.length;o+=2){var d=c[o],h=c[o+1];d==="style"?kE(s,h):d==="dangerouslySetInnerHTML"?bE(s,h):d==="children"?Zl(s,h):zy(s,d,h,u)}switch(a){case"input":Mm(s,i);break;case"textarea":xE(s,i);break;case"select":var f=s._wrapperState.wasMultiple;s._wrapperState.wasMultiple=!!i.multiple;var p=i.value;p!=null?Wo(s,!!i.multiple,p,!1):f!==!!i.multiple&&(i.defaultValue!=null?Wo(s,!!i.multiple,i.defaultValue,!0):Wo(s,!!i.multiple,i.multiple?[]:"",!1))}s[lc]=i}catch(g){Ge(t,t.return,g)}}break;case 6:if(Mn(e,t),lr(t),r&4){if(t.stateNode===null)throw Error(B(162));s=t.stateNode,i=t.memoizedProps;try{s.nodeValue=i}catch(g){Ge(t,t.return,g)}}break;case 3:if(Mn(e,t),lr(t),r&4&&n!==null&&n.memoizedState.isDehydrated)try{rc(e.containerInfo)}catch(g){Ge(t,t.return,g)}break;case 4:Mn(e,t),lr(t);break;case 13:Mn(e,t),lr(t),s=t.child,s.flags&8192&&(i=s.memoizedState!==null,s.stateNode.isHidden=i,!i||s.alternate!==null&&s.alternate.memoizedState!==null||(_v=Je())),r&4&&Gw(t);break;case 22:if(d=n!==null&&n.memoizedState!==null,t.mode&1?(Tt=(u=Tt)||d,Mn(e,t),Tt=u):Mn(e,t),lr(t),r&8192){if(u=t.memoizedState!==null,(t.stateNode.isHidden=u)&&!d&&t.mode&1)for(q=t,d=t.child;d!==null;){for(h=q=d;q!==null;){switch(f=q,p=f.child,f.tag){case 0:case 11:case 14:case 15:Dl(4,f,f.return);break;case 1:Mo(f,f.return);var x=f.stateNode;if(typeof x.componentWillUnmount=="function"){r=f,n=f.return;try{e=r,x.props=e.memoizedProps,x.state=e.memoizedState,x.componentWillUnmount()}catch(g){Ge(r,n,g)}}break;case 5:Mo(f,f.return);break;case 22:if(f.memoizedState!==null){Yw(h);continue}}p!==null?(p.return=f,q=p):Yw(h)}d=d.sibling}e:for(d=null,h=t;;){if(h.tag===5){if(d===null){d=h;try{s=h.stateNode,u?(i=s.style,typeof i.setProperty=="function"?i.setProperty("display","none","important"):i.display="none"):(a=h.stateNode,c=h.memoizedProps.style,o=c!=null&&c.hasOwnProperty("display")?c.display:null,a.style.display=_E("display",o))}catch(g){Ge(t,t.return,g)}}}else if(h.tag===6){if(d===null)try{h.stateNode.nodeValue=u?"":h.memoizedProps}catch(g){Ge(t,t.return,g)}}else if((h.tag!==22&&h.tag!==23||h.memoizedState===null||h===t)&&h.child!==null){h.child.return=h,h=h.child;continue}if(h===t)break e;for(;h.sibling===null;){if(h.return===null||h.return===t)break e;d===h&&(d=null),h=h.return}d===h&&(d=null),h.sibling.return=h.return,h=h.sibling}}break;case 19:Mn(e,t),lr(t),r&4&&Gw(t);break;case 21:break;default:Mn(e,t),lr(t)}}function lr(t){var e=t.flags;if(e&2){try{e:{for(var n=t.return;n!==null;){if(qC(n)){var r=n;break e}n=n.return}throw Error(B(160))}switch(r.tag){case 5:var s=r.stateNode;r.flags&32&&(Zl(s,""),r.flags&=-33);var i=Kw(t);gg(t,i,s);break;case 3:case 4:var o=r.stateNode.containerInfo,a=Kw(t);mg(t,a,o);break;default:throw Error(B(161))}}catch(c){Ge(t,t.return,c)}t.flags&=-3}e&4096&&(t.flags&=-4097)}function nM(t,e,n){q=t,XC(t)}function XC(t,e,n){for(var r=(t.mode&1)!==0;q!==null;){var s=q,i=s.child;if(s.tag===22&&r){var o=s.memoizedState!==null||Su;if(!o){var a=s.alternate,c=a!==null&&a.memoizedState!==null||Tt;a=Su;var u=Tt;if(Su=o,(Tt=c)&&!u)for(q=s;q!==null;)o=q,c=o.child,o.tag===22&&o.memoizedState!==null?Qw(s):c!==null?(c.return=o,q=c):Qw(s);for(;i!==null;)q=i,XC(i),i=i.sibling;q=s,Su=a,Tt=u}qw(t)}else s.subtreeFlags&8772&&i!==null?(i.return=s,q=i):qw(t)}}function qw(t){for(;q!==null;){var e=q;if(e.flags&8772){var n=e.alternate;try{if(e.flags&8772)switch(e.tag){case 0:case 11:case 15:Tt||Yh(5,e);break;case 1:var r=e.stateNode;if(e.flags&4&&!Tt)if(n===null)r.componentDidMount();else{var s=e.elementType===e.type?n.memoizedProps:Bn(e.type,n.memoizedProps);r.componentDidUpdate(s,n.memoizedState,r.__reactInternalSnapshotBeforeUpdate)}var i=e.updateQueue;i!==null&&Rw(e,i,r);break;case 3:var o=e.updateQueue;if(o!==null){if(n=null,e.child!==null)switch(e.child.tag){case 5:n=e.child.stateNode;break;case 1:n=e.child.stateNode}Rw(e,o,n)}break;case 5:var a=e.stateNode;if(n===null&&e.flags&4){n=a;var c=e.memoizedProps;switch(e.type){case"button":case"input":case"select":case"textarea":c.autoFocus&&n.focus();break;case"img":c.src&&(n.src=c.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(e.memoizedState===null){var u=e.alternate;if(u!==null){var d=u.memoizedState;if(d!==null){var h=d.dehydrated;h!==null&&rc(h)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(B(163))}Tt||e.flags&512&&pg(e)}catch(f){Ge(e,e.return,f)}}if(e===t){q=null;break}if(n=e.sibling,n!==null){n.return=e.return,q=n;break}q=e.return}}function Yw(t){for(;q!==null;){var e=q;if(e===t){q=null;break}var n=e.sibling;if(n!==null){n.return=e.return,q=n;break}q=e.return}}function Qw(t){for(;q!==null;){var e=q;try{switch(e.tag){case 0:case 11:case 15:var n=e.return;try{Yh(4,e)}catch(c){Ge(e,n,c)}break;case 1:var r=e.stateNode;if(typeof r.componentDidMount=="function"){var s=e.return;try{r.componentDidMount()}catch(c){Ge(e,s,c)}}var i=e.return;try{pg(e)}catch(c){Ge(e,i,c)}break;case 5:var o=e.return;try{pg(e)}catch(c){Ge(e,o,c)}}}catch(c){Ge(e,e.return,c)}if(e===t){q=null;break}var a=e.sibling;if(a!==null){a.return=e.return,q=a;break}q=e.return}}var rM=Math.ceil,qd=ns.ReactCurrentDispatcher,wv=ns.ReactCurrentOwner,Sn=ns.ReactCurrentBatchConfig,ye=0,yt=null,tt=null,wt=0,sn=0,Oo=hi(0),ct=0,pc=null,qi=0,Qh=0,bv=0,Ml=null,qt=null,_v=0,ba=1/0,Mr=null,Yd=!1,yg=null,$s=null,Nu=!1,Ds=null,Qd=0,Ol=0,vg=null,cd=-1,ud=0;function zt(){return ye&6?Je():cd!==-1?cd:cd=Je()}function zs(t){return t.mode&1?ye&2&&wt!==0?wt&-wt:BD.transition!==null?(ud===0&&(ud=ME()),ud):(t=Ee,t!==0||(t=window.event,t=t===void 0?16:$E(t.type)),t):1}function Jn(t,e,n,r){if(50<Ol)throw Ol=0,vg=null,Error(B(185));Bc(t,n,r),(!(ye&2)||t!==yt)&&(t===yt&&(!(ye&2)&&(Qh|=n),ct===4&&_s(t,wt)),en(t,r),n===1&&ye===0&&!(e.mode&1)&&(ba=Je()+500,Kh&&fi()))}function en(t,e){var n=t.callbackNode;B2(t,e);var r=Ad(t,t===yt?wt:0);if(r===0)n!==null&&iw(n),t.callbackNode=null,t.callbackPriority=0;else if(e=r&-r,t.callbackPriority!==e){if(n!=null&&iw(n),e===1)t.tag===0?UD(Xw.bind(null,t)):aC(Xw.bind(null,t)),MD(function(){!(ye&6)&&fi()}),n=null;else{switch(OE(r)){case 1:n=qy;break;case 4:n=AE;break;case 16:n=Rd;break;case 536870912:n=DE;break;default:n=Rd}n=iS(n,JC.bind(null,t))}t.callbackPriority=e,t.callbackNode=n}}function JC(t,e){if(cd=-1,ud=0,ye&6)throw Error(B(327));var n=t.callbackNode;if(Yo()&&t.callbackNode!==n)return null;var r=Ad(t,t===yt?wt:0);if(r===0)return null;if(r&30||r&t.expiredLanes||e)e=Xd(t,r);else{e=r;var s=ye;ye|=2;var i=eS();(yt!==t||wt!==e)&&(Mr=null,ba=Je()+500,Vi(t,e));do try{oM();break}catch(a){ZC(t,a)}while(!0);av(),qd.current=i,ye=s,tt!==null?e=0:(yt=null,wt=0,e=ct)}if(e!==0){if(e===2&&(s=Hm(t),s!==0&&(r=s,e=xg(t,s))),e===1)throw n=pc,Vi(t,0),_s(t,r),en(t,Je()),n;if(e===6)_s(t,r);else{if(s=t.current.alternate,!(r&30)&&!sM(s)&&(e=Xd(t,r),e===2&&(i=Hm(t),i!==0&&(r=i,e=xg(t,i))),e===1))throw n=pc,Vi(t,0),_s(t,r),en(t,Je()),n;switch(t.finishedWork=s,t.finishedLanes=r,e){case 0:case 1:throw Error(B(345));case 2:_i(t,qt,Mr);break;case 3:if(_s(t,r),(r&130023424)===r&&(e=_v+500-Je(),10<e)){if(Ad(t,0)!==0)break;if(s=t.suspendedLanes,(s&r)!==r){zt(),t.pingedLanes|=t.suspendedLanes&s;break}t.timeoutHandle=Zm(_i.bind(null,t,qt,Mr),e);break}_i(t,qt,Mr);break;case 4:if(_s(t,r),(r&4194240)===r)break;for(e=t.eventTimes,s=-1;0<r;){var o=31-Xn(r);i=1<<o,o=e[o],o>s&&(s=o),r&=~i}if(r=s,r=Je()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*rM(r/1960))-r,10<r){t.timeoutHandle=Zm(_i.bind(null,t,qt,Mr),r);break}_i(t,qt,Mr);break;case 5:_i(t,qt,Mr);break;default:throw Error(B(329))}}}return en(t,Je()),t.callbackNode===n?JC.bind(null,t):null}function xg(t,e){var n=Ml;return t.current.memoizedState.isDehydrated&&(Vi(t,e).flags|=256),t=Xd(t,e),t!==2&&(e=qt,qt=n,e!==null&&wg(e)),t}function wg(t){qt===null?qt=t:qt.push.apply(qt,t)}function sM(t){for(var e=t;;){if(e.flags&16384){var n=e.updateQueue;if(n!==null&&(n=n.stores,n!==null))for(var r=0;r<n.length;r++){var s=n[r],i=s.getSnapshot;s=s.value;try{if(!er(i(),s))return!1}catch{return!1}}}if(n=e.child,e.subtreeFlags&16384&&n!==null)n.return=e,e=n;else{if(e===t)break;for(;e.sibling===null;){if(e.return===null||e.return===t)return!0;e=e.return}e.sibling.return=e.return,e=e.sibling}}return!0}function _s(t,e){for(e&=~bv,e&=~Qh,t.suspendedLanes|=e,t.pingedLanes&=~e,t=t.expirationTimes;0<e;){var n=31-Xn(e),r=1<<n;t[n]=-1,e&=~r}}function Xw(t){if(ye&6)throw Error(B(327));Yo();var e=Ad(t,0);if(!(e&1))return en(t,Je()),null;var n=Xd(t,e);if(t.tag!==0&&n===2){var r=Hm(t);r!==0&&(e=r,n=xg(t,r))}if(n===1)throw n=pc,Vi(t,0),_s(t,e),en(t,Je()),n;if(n===6)throw Error(B(345));return t.finishedWork=t.current.alternate,t.finishedLanes=e,_i(t,qt,Mr),en(t,Je()),null}function kv(t,e){var n=ye;ye|=1;try{return t(e)}finally{ye=n,ye===0&&(ba=Je()+500,Kh&&fi())}}function Yi(t){Ds!==null&&Ds.tag===0&&!(ye&6)&&Yo();var e=ye;ye|=1;var n=Sn.transition,r=Ee;try{if(Sn.transition=null,Ee=1,t)return t()}finally{Ee=r,Sn.transition=n,ye=e,!(ye&6)&&fi()}}function Ev(){sn=Oo.current,De(Oo)}function Vi(t,e){t.finishedWork=null,t.finishedLanes=0;var n=t.timeoutHandle;if(n!==-1&&(t.timeoutHandle=-1,DD(n)),tt!==null)for(n=tt.return;n!==null;){var r=n;switch(sv(r),r.tag){case 1:r=r.type.childContextTypes,r!=null&&Fd();break;case 3:xa(),De(Jt),De(At),fv();break;case 5:hv(r);break;case 4:xa();break;case 13:De(Ve);break;case 19:De(Ve);break;case 10:lv(r.type._context);break;case 22:case 23:Ev()}n=n.return}if(yt=t,tt=t=Ws(t.current,null),wt=sn=e,ct=0,pc=null,bv=Qh=qi=0,qt=Ml=null,Ti!==null){for(e=0;e<Ti.length;e++)if(n=Ti[e],r=n.interleaved,r!==null){n.interleaved=null;var s=r.next,i=n.pending;if(i!==null){var o=i.next;i.next=s,r.next=o}n.pending=r}Ti=null}return t}function ZC(t,e){do{var n=tt;try{if(av(),od.current=Gd,Kd){for(var r=ze.memoizedState;r!==null;){var s=r.queue;s!==null&&(s.pending=null),r=r.next}Kd=!1}if(Gi=0,ft=ot=ze=null,Al=!1,dc=0,wv.current=null,n===null||n.return===null){ct=1,pc=e,tt=null;break}e:{var i=t,o=n.return,a=n,c=e;if(e=wt,a.flags|=32768,c!==null&&typeof c=="object"&&typeof c.then=="function"){var u=c,d=a,h=d.tag;if(!(d.mode&1)&&(h===0||h===11||h===15)){var f=d.alternate;f?(d.updateQueue=f.updateQueue,d.memoizedState=f.memoizedState,d.lanes=f.lanes):(d.updateQueue=null,d.memoizedState=null)}var p=Fw(o);if(p!==null){p.flags&=-257,Uw(p,o,a,i,e),p.mode&1&&Lw(i,u,e),e=p,c=u;var x=e.updateQueue;if(x===null){var g=new Set;g.add(c),e.updateQueue=g}else x.add(c);break e}else{if(!(e&1)){Lw(i,u,e),Cv();break e}c=Error(B(426))}}else if(Le&&a.mode&1){var y=Fw(o);if(y!==null){!(y.flags&65536)&&(y.flags|=256),Uw(y,o,a,i,e),iv(wa(c,a));break e}}i=c=wa(c,a),ct!==4&&(ct=2),Ml===null?Ml=[i]:Ml.push(i),i=o;do{switch(i.tag){case 3:i.flags|=65536,e&=-e,i.lanes|=e;var w=OC(i,c,e);jw(i,w);break e;case 1:a=c;var v=i.type,b=i.stateNode;if(!(i.flags&128)&&(typeof v.getDerivedStateFromError=="function"||b!==null&&typeof b.componentDidCatch=="function"&&($s===null||!$s.has(b)))){i.flags|=65536,e&=-e,i.lanes|=e;var _=LC(i,a,e);jw(i,_);break e}}i=i.return}while(i!==null)}nS(n)}catch(k){e=k,tt===n&&n!==null&&(tt=n=n.return);continue}break}while(!0)}function eS(){var t=qd.current;return qd.current=Gd,t===null?Gd:t}function Cv(){(ct===0||ct===3||ct===2)&&(ct=4),yt===null||!(qi&268435455)&&!(Qh&268435455)||_s(yt,wt)}function Xd(t,e){var n=ye;ye|=2;var r=eS();(yt!==t||wt!==e)&&(Mr=null,Vi(t,e));do try{iM();break}catch(s){ZC(t,s)}while(!0);if(av(),ye=n,qd.current=r,tt!==null)throw Error(B(261));return yt=null,wt=0,ct}function iM(){for(;tt!==null;)tS(tt)}function oM(){for(;tt!==null&&!j2();)tS(tt)}function tS(t){var e=sS(t.alternate,t,sn);t.memoizedProps=t.pendingProps,e===null?nS(t):tt=e,wv.current=null}function nS(t){var e=t;do{var n=e.alternate;if(t=e.return,e.flags&32768){if(n=ZD(n,e),n!==null){n.flags&=32767,tt=n;return}if(t!==null)t.flags|=32768,t.subtreeFlags=0,t.deletions=null;else{ct=6,tt=null;return}}else if(n=JD(n,e,sn),n!==null){tt=n;return}if(e=e.sibling,e!==null){tt=e;return}tt=e=t}while(e!==null);ct===0&&(ct=5)}function _i(t,e,n){var r=Ee,s=Sn.transition;try{Sn.transition=null,Ee=1,aM(t,e,n,r)}finally{Sn.transition=s,Ee=r}return null}function aM(t,e,n,r){do Yo();while(Ds!==null);if(ye&6)throw Error(B(327));n=t.finishedWork;var s=t.finishedLanes;if(n===null)return null;if(t.finishedWork=null,t.finishedLanes=0,n===t.current)throw Error(B(177));t.callbackNode=null,t.callbackPriority=0;var i=n.lanes|n.childLanes;if(V2(t,i),t===yt&&(tt=yt=null,wt=0),!(n.subtreeFlags&2064)&&!(n.flags&2064)||Nu||(Nu=!0,iS(Rd,function(){return Yo(),null})),i=(n.flags&15990)!==0,n.subtreeFlags&15990||i){i=Sn.transition,Sn.transition=null;var o=Ee;Ee=1;var a=ye;ye|=4,wv.current=null,tM(t,n),QC(n,t),ND(Xm),Dd=!!Qm,Xm=Qm=null,t.current=n,nM(n),R2(),ye=a,Ee=o,Sn.transition=i}else t.current=n;if(Nu&&(Nu=!1,Ds=t,Qd=s),i=t.pendingLanes,i===0&&($s=null),M2(n.stateNode),en(t,Je()),e!==null)for(r=t.onRecoverableError,n=0;n<e.length;n++)s=e[n],r(s.value,{componentStack:s.stack,digest:s.digest});if(Yd)throw Yd=!1,t=yg,yg=null,t;return Qd&1&&t.tag!==0&&Yo(),i=t.pendingLanes,i&1?t===vg?Ol++:(Ol=0,vg=t):Ol=0,fi(),null}function Yo(){if(Ds!==null){var t=OE(Qd),e=Sn.transition,n=Ee;try{if(Sn.transition=null,Ee=16>t?16:t,Ds===null)var r=!1;else{if(t=Ds,Ds=null,Qd=0,ye&6)throw Error(B(331));var s=ye;for(ye|=4,q=t.current;q!==null;){var i=q,o=i.child;if(q.flags&16){var a=i.deletions;if(a!==null){for(var c=0;c<a.length;c++){var u=a[c];for(q=u;q!==null;){var d=q;switch(d.tag){case 0:case 11:case 15:Dl(8,d,i)}var h=d.child;if(h!==null)h.return=d,q=h;else for(;q!==null;){d=q;var f=d.sibling,p=d.return;if(GC(d),d===u){q=null;break}if(f!==null){f.return=p,q=f;break}q=p}}}var x=i.alternate;if(x!==null){var g=x.child;if(g!==null){x.child=null;do{var y=g.sibling;g.sibling=null,g=y}while(g!==null)}}q=i}}if(i.subtreeFlags&2064&&o!==null)o.return=i,q=o;else e:for(;q!==null;){if(i=q,i.flags&2048)switch(i.tag){case 0:case 11:case 15:Dl(9,i,i.return)}var w=i.sibling;if(w!==null){w.return=i.return,q=w;break e}q=i.return}}var v=t.current;for(q=v;q!==null;){o=q;var b=o.child;if(o.subtreeFlags&2064&&b!==null)b.return=o,q=b;else e:for(o=v;q!==null;){if(a=q,a.flags&2048)try{switch(a.tag){case 0:case 11:case 15:Yh(9,a)}}catch(k){Ge(a,a.return,k)}if(a===o){q=null;break e}var _=a.sibling;if(_!==null){_.return=a.return,q=_;break e}q=a.return}}if(ye=s,fi(),xr&&typeof xr.onPostCommitFiberRoot=="function")try{xr.onPostCommitFiberRoot(Vh,t)}catch{}r=!0}return r}finally{Ee=n,Sn.transition=e}}return!1}function Jw(t,e,n){e=wa(n,e),e=OC(t,e,1),t=Vs(t,e,1),e=zt(),t!==null&&(Bc(t,1,e),en(t,e))}function Ge(t,e,n){if(t.tag===3)Jw(t,t,n);else for(;e!==null;){if(e.tag===3){Jw(e,t,n);break}else if(e.tag===1){var r=e.stateNode;if(typeof e.type.getDerivedStateFromError=="function"||typeof r.componentDidCatch=="function"&&($s===null||!$s.has(r))){t=wa(n,t),t=LC(e,t,1),e=Vs(e,t,1),t=zt(),e!==null&&(Bc(e,1,t),en(e,t));break}}e=e.return}}function lM(t,e,n){var r=t.pingCache;r!==null&&r.delete(e),e=zt(),t.pingedLanes|=t.suspendedLanes&n,yt===t&&(wt&n)===n&&(ct===4||ct===3&&(wt&130023424)===wt&&500>Je()-_v?Vi(t,0):bv|=n),en(t,e)}function rS(t,e){e===0&&(t.mode&1?(e=yu,yu<<=1,!(yu&130023424)&&(yu=4194304)):e=1);var n=zt();t=Gr(t,e),t!==null&&(Bc(t,e,n),en(t,n))}function cM(t){var e=t.memoizedState,n=0;e!==null&&(n=e.retryLane),rS(t,n)}function uM(t,e){var n=0;switch(t.tag){case 13:var r=t.stateNode,s=t.memoizedState;s!==null&&(n=s.retryLane);break;case 19:r=t.stateNode;break;default:throw Error(B(314))}r!==null&&r.delete(e),rS(t,n)}var sS;sS=function(t,e,n){if(t!==null)if(t.memoizedProps!==e.pendingProps||Jt.current)Qt=!0;else{if(!(t.lanes&n)&&!(e.flags&128))return Qt=!1,XD(t,e,n);Qt=!!(t.flags&131072)}else Qt=!1,Le&&e.flags&1048576&&lC(e,Vd,e.index);switch(e.lanes=0,e.tag){case 2:var r=e.type;ld(t,e),t=e.pendingProps;var s=ga(e,At.current);qo(e,n),s=mv(null,e,r,t,s,n);var i=gv();return e.flags|=1,typeof s=="object"&&s!==null&&typeof s.render=="function"&&s.$$typeof===void 0?(e.tag=1,e.memoizedState=null,e.updateQueue=null,Zt(r)?(i=!0,Ud(e)):i=!1,e.memoizedState=s.state!==null&&s.state!==void 0?s.state:null,uv(e),s.updater=qh,e.stateNode=s,s._reactInternals=e,og(e,r,t,n),e=cg(null,e,r,!0,i,n)):(e.tag=0,Le&&i&&rv(e),Ft(null,e,s,n),e=e.child),e;case 16:r=e.elementType;e:{switch(ld(t,e),t=e.pendingProps,s=r._init,r=s(r._payload),e.type=r,s=e.tag=hM(r),t=Bn(r,t),s){case 0:e=lg(null,e,r,t,n);break e;case 1:e=$w(null,e,r,t,n);break e;case 11:e=Bw(null,e,r,t,n);break e;case 14:e=Vw(null,e,r,Bn(r.type,t),n);break e}throw Error(B(306,r,""))}return e;case 0:return r=e.type,s=e.pendingProps,s=e.elementType===r?s:Bn(r,s),lg(t,e,r,s,n);case 1:return r=e.type,s=e.pendingProps,s=e.elementType===r?s:Bn(r,s),$w(t,e,r,s,n);case 3:e:{if(VC(e),t===null)throw Error(B(387));r=e.pendingProps,i=e.memoizedState,s=i.element,pC(t,e),Wd(e,r,null,n);var o=e.memoizedState;if(r=o.element,i.isDehydrated)if(i={element:r,isDehydrated:!1,cache:o.cache,pendingSuspenseBoundaries:o.pendingSuspenseBoundaries,transitions:o.transitions},e.updateQueue.baseState=i,e.memoizedState=i,e.flags&256){s=wa(Error(B(423)),e),e=zw(t,e,r,n,s);break e}else if(r!==s){s=wa(Error(B(424)),e),e=zw(t,e,r,n,s);break e}else for(an=Bs(e.stateNode.containerInfo.firstChild),cn=e,Le=!0,Hn=null,n=hC(e,null,r,n),e.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(ya(),r===s){e=qr(t,e,n);break e}Ft(t,e,r,n)}e=e.child}return e;case 5:return mC(e),t===null&&rg(e),r=e.type,s=e.pendingProps,i=t!==null?t.memoizedProps:null,o=s.children,Jm(r,s)?o=null:i!==null&&Jm(r,i)&&(e.flags|=32),BC(t,e),Ft(t,e,o,n),e.child;case 6:return t===null&&rg(e),null;case 13:return $C(t,e,n);case 4:return dv(e,e.stateNode.containerInfo),r=e.pendingProps,t===null?e.child=va(e,null,r,n):Ft(t,e,r,n),e.child;case 11:return r=e.type,s=e.pendingProps,s=e.elementType===r?s:Bn(r,s),Bw(t,e,r,s,n);case 7:return Ft(t,e,e.pendingProps,n),e.child;case 8:return Ft(t,e,e.pendingProps.children,n),e.child;case 12:return Ft(t,e,e.pendingProps.children,n),e.child;
vendor: 4,549 bytes, line 40
40case 10:e:{if(r=e.type._context,s=e.pendingProps,i=e.memoizedProps,o=s.value,Pe($d,r._currentValue),r._currentValue=o,i!==null)if(er(i.value,o)){if(i.children===s.children&&!Jt.current){e=qr(t,e,n);break e}}else for(i=e.child,i!==null&&(i.return=e);i!==null;){var a=i.dependencies;if(a!==null){o=i.child;for(var c=a.firstContext;c!==null;){if(c.context===r){if(i.tag===1){c=zr(-1,n&-n),c.tag=2;var u=i.updateQueue;if(u!==null){u=u.shared;var d=u.pending;d===null?c.next=c:(c.next=d.next,d.next=c),u.pending=c}}i.lanes|=n,c=i.alternate,c!==null&&(c.lanes|=n),sg(i.return,n,e),a.lanes|=n;break}c=c.next}}else if(i.tag===10)o=i.type===e.type?null:i.child;else if(i.tag===18){if(o=i.return,o===null)throw Error(B(341));o.lanes|=n,a=o.alternate,a!==null&&(a.lanes|=n),sg(o,n,e),o=i.sibling}else o=i.child;if(o!==null)o.return=i;else for(o=i;o!==null;){if(o===e){o=null;break}if(i=o.sibling,i!==null){i.return=o.return,o=i;break}o=o.return}i=o}Ft(t,e,s.children,n),e=e.child}return e;case 9:return s=e.type,r=e.pendingProps.children,qo(e,n),s=Nn(s),r=r(s),e.flags|=1,Ft(t,e,r,n),e.child;case 14:return r=e.type,s=Bn(r,e.pendingProps),s=Bn(r.type,s),Vw(t,e,r,s,n);case 15:return FC(t,e,e.type,e.pendingProps,n);case 17:return r=e.type,s=e.pendingProps,s=e.elementType===r?s:Bn(r,s),ld(t,e),e.tag=1,Zt(r)?(t=!0,Ud(e)):t=!1,qo(e,n),MC(e,r,s),og(e,r,s,n),cg(null,e,r,!0,t,n);case 19:return zC(t,e,n);case 22:return UC(t,e,n)}throw Error(B(156,e.tag))};function iS(t,e){return RE(t,e)}function dM(t,e,n,r){this.tag=t,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=e,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 En(t,e,n,r){return new dM(t,e,n,r)}function Sv(t){return t=t.prototype,!(!t||!t.isReactComponent)}function hM(t){if(typeof t=="function")return Sv(t)?1:0;if(t!=null){if(t=t.$$typeof,t===Hy)return 11;if(t===Ky)return 14}return 2}function Ws(t,e){var n=t.alternate;return n===null?(n=En(t.tag,e,t.key,t.mode),n.elementType=t.elementType,n.type=t.type,n.stateNode=t.stateNode,n.alternate=t,t.alternate=n):(n.pendingProps=e,n.type=t.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=t.flags&14680064,n.childLanes=t.childLanes,n.lanes=t.lanes,n.child=t.child,n.memoizedProps=t.memoizedProps,n.memoizedState=t.memoizedState,n.updateQueue=t.updateQueue,e=t.dependencies,n.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext},n.sibling=t.sibling,n.index=t.index,n.ref=t.ref,n}function dd(t,e,n,r,s,i){var o=2;if(r=t,typeof t=="function")Sv(t)&&(o=1);else if(typeof t=="string")o=5;else e:switch(t){case So:return $i(n.children,s,i,e);case Wy:o=8,s|=8;break;case Pm:return t=En(12,n,e,s|2),t.elementType=Pm,t.lanes=i,t;case jm:return t=En(13,n,e,s),t.elementType=jm,t.lanes=i,t;case Rm:return t=En(19,n,e,s),t.elementType=Rm,t.lanes=i,t;case mE:return Xh(n,s,i,e);default:if(typeof t=="object"&&t!==null)switch(t.$$typeof){case fE:o=10;break e;case pE:o=9;break e;case Hy:o=11;break e;case Ky:o=14;break e;case xs:o=16,r=null;break e}throw Error(B(130,t==null?t:typeof t,""))}return e=En(o,n,e,s),e.elementType=t,e.type=r,e.lanes=i,e}function $i(t,e,n,r){return t=En(7,t,r,e),t.lanes=n,t}function Xh(t,e,n,r){return t=En(22,t,r,e),t.elementType=mE,t.lanes=n,t.stateNode={isHidden:!1},t}function Np(t,e,n){return t=En(6,t,null,e),t.lanes=n,t}function Tp(t,e,n){return e=En(4,t.children!==null?t.children:[],t.key,e),e.lanes=n,e.stateNode={containerInfo:t.containerInfo,pendingChildren:null,implementation:t.implementation},e}function fM(t,e,n,r,s){this.tag=e,this.containerInfo=t,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=lp(0),this.expirationTimes=lp(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=lp(0),this.identifierPrefix=r,this.onRecoverableError=s,this.mutableSourceEagerHydrationData=null}function Nv(t,e,n,r,s,i,o,a,c){return t=new fM(t,e,n,a,c),e===1?(e=1,i===!0&&(e|=8)):e=0,i=En(3,null,null,e),t.current=i,i.stateNode=t,i.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},uv(i),t}function pM(t,e,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;
vendor: 4,591 bytes, line 40
40return{$$typeof:Co,key:r==null?null:""+r,children:t,containerInfo:e,implementation:n}}function oS(t){if(!t)return ei;t=t._reactInternals;e:{if(ao(t)!==t||t.tag!==1)throw Error(B(170));var e=t;do{switch(e.tag){case 3:e=e.stateNode.context;break e;case 1:if(Zt(e.type)){e=e.stateNode.__reactInternalMemoizedMergedChildContext;break e}}e=e.return}while(e!==null);throw Error(B(171))}if(t.tag===1){var n=t.type;if(Zt(n))return oC(t,n,e)}return e}function aS(t,e,n,r,s,i,o,a,c){return t=Nv(n,r,!0,t,s,i,o,a,c),t.context=oS(null),n=t.current,r=zt(),s=zs(n),i=zr(r,s),i.callback=e??null,Vs(n,i,s),t.current.lanes=s,Bc(t,s,r),en(t,r),t}function Jh(t,e,n,r){var s=e.current,i=zt(),o=zs(s);return n=oS(n),e.context===null?e.context=n:e.pendingContext=n,e=zr(i,o),e.payload={element:t},r=r===void 0?null:r,r!==null&&(e.callback=r),t=Vs(s,e,o),t!==null&&(Jn(t,s,o,i),id(t,s,o)),o}function Jd(t){if(t=t.current,!t.child)return null;switch(t.child.tag){case 5:return t.child.stateNode;default:return t.child.stateNode}}function Zw(t,e){if(t=t.memoizedState,t!==null&&t.dehydrated!==null){var n=t.retryLane;t.retryLane=n!==0&&n<e?n:e}}function Tv(t,e){Zw(t,e),(t=t.alternate)&&Zw(t,e)}function mM(){return null}var lS=typeof reportError=="function"?reportError:function(t){console.error(t)};function Iv(t){this._internalRoot=t}Zh.prototype.render=Iv.prototype.render=function(t){var e=this._internalRoot;if(e===null)throw Error(B(409));Jh(t,e,null,null)};Zh.prototype.unmount=Iv.prototype.unmount=function(){var t=this._internalRoot;if(t!==null){this._internalRoot=null;var e=t.containerInfo;Yi(function(){Jh(null,t,null,null)}),e[Kr]=null}};function Zh(t){this._internalRoot=t}Zh.prototype.unstable_scheduleHydration=function(t){if(t){var e=UE();t={blockedOn:null,target:t,priority:e};for(var n=0;n<bs.length&&e!==0&&e<bs[n].priority;n++);bs.splice(n,0,t),n===0&&VE(t)}};function Pv(t){return!(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11)}function ef(t){return!(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11&&(t.nodeType!==8||t.nodeValue!==" react-mount-point-unstable "))}function eb(){}function gM(t,e,n,r,s){if(s){if(typeof r=="function"){var i=r;r=function(){var u=Jd(o);i.call(u)}}var o=aS(e,r,t,0,null,!1,!1,"",eb);return t._reactRootContainer=o,t[Kr]=o.current,oc(t.nodeType===8?t.parentNode:t),Yi(),o}for(;s=t.lastChild;)t.removeChild(s);if(typeof r=="function"){var a=r;r=function(){var u=Jd(c);a.call(u)}}var c=Nv(t,0,!1,null,null,!1,!1,"",eb);return t._reactRootContainer=c,t[Kr]=c.current,oc(t.nodeType===8?t.parentNode:t),Yi(function(){Jh(e,c,n,r)}),c}function tf(t,e,n,r,s){var i=n._reactRootContainer;if(i){var o=i;if(typeof s=="function"){var a=s;s=function(){var c=Jd(o);a.call(c)}}Jh(e,o,t,s)}else o=gM(n,e,t,s,r);return Jd(o)}LE=function(t){switch(t.tag){case 3:var e=t.stateNode;if(e.current.memoizedState.isDehydrated){var n=bl(e.pendingLanes);n!==0&&(Yy(e,n|1),en(e,Je()),!(ye&6)&&(ba=Je()+500,fi()))}break;case 13:Yi(function(){var r=Gr(t,1);if(r!==null){var s=zt();Jn(r,t,1,s)}}),Tv(t,1)}};Qy=function(t){if(t.tag===13){var e=Gr(t,134217728);if(e!==null){var n=zt();Jn(e,t,134217728,n)}Tv(t,134217728)}};FE=function(t){if(t.tag===13){var e=zs(t),n=Gr(t,e);if(n!==null){var r=zt();Jn(n,t,e,r)}Tv(t,e)}};UE=function(){return Ee};BE=function(t,e){var n=Ee;try{return Ee=t,e()}finally{Ee=n}};$m=function(t,e,n){switch(e){case"input":if(Mm(t,n),e=n.name,n.type==="radio"&&e!=null){for(n=t;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll("input[name="+JSON.stringify(""+e)+'][type="radio"]'),e=0;e<n.length;e++){var r=n[e];if(r!==t&&r.form===t.form){var s=Hh(r);if(!s)throw Error(B(90));yE(r),Mm(r,s)}}}break;case"textarea":xE(t,n);break;case"select":e=n.value,e!=null&&Wo(t,!!n.multiple,e,!1)}};SE=kv;NE=Yi;var yM={usingClientEntryPoint:!1,Events:[$c,Po,Hh,EE,CE,kv]},cl={findFiberByHostInstance:Ni,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},vM={bundleType:cl.bundleType,version:cl.version,rendererPackageName:cl.rendererPackageName,rendererConfig:cl.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:ns.ReactCurrentDispatcher,findHostInstanceByFiber:function(t){return t=PE(t),t===null?null:t.stateNode},findFiberByHostInstance:cl.findFiberByHostInstance||mM,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.3.1-next-f1338f8080-20240426"};
40if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Tu=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Tu.isDisabled&&Tu.supportsFiber)try{Vh=Tu.inject(vM),xr=Tu}catch{}}hn.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=yM;hn.createPortal=function(t,e){var n=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!Pv(e))throw Error(B(200));return pM(t,e,null,n)};hn.createRoot=function(t,e){if(!Pv(t))throw Error(B(299));var n=!1,r="",s=lS;return e!=null&&(e.unstable_strictMode===!0&&(n=!0),e.identifierPrefix!==void 0&&(r=e.identifierPrefix),e.onRecoverableError!==void 0&&(s=e.onRecoverableError)),e=Nv(t,1,!1,null,null,n,!1,r,s),t[Kr]=e.current,oc(t.nodeType===8?t.parentNode:t),new Iv(e)};hn.findDOMNode=function(t){if(t==null)return null;if(t.nodeType===1)return t;var e=t._reactInternals;if(e===void 0)throw typeof t.render=="function"?Error(B(188)):(t=Object.keys(t).join(","),Error(B(268,t)));return t=PE(e),t=t===null?null:t.stateNode,t};hn.flushSync=function(t){return Yi(t)};hn.hydrate=function(t,e,n){if(!ef(e))throw Error(B(200));return tf(null,t,e,!0,n)};hn.hydrateRoot=function(t,e,n){if(!Pv(t))throw Error(B(405));var r=n!=null&&n.hydratedSources||null,s=!1,i="",o=lS;if(n!=null&&(n.unstable_strictMode===!0&&(s=!0),n.identifierPrefix!==void 0&&(i=n.identifierPrefix),n.onRecoverableError!==void 0&&(o=n.onRecoverableError)),e=aS(e,null,t,1,n??null,s,!1,i,o),t[Kr]=e.current,oc(t),r)for(t=0;t<r.length;t++)n=r[t],s=n._getVersion,s=s(n._source),e.mutableSourceEagerHydrationData==null?e.mutableSourceEagerHydrationData=[n,s]:e.mutableSourceEagerHydrationData.push(n,s);return new Zh(e)};hn.render=function(t,e,n){if(!ef(e))throw Error(B(200));return tf(null,t,e,!1,n)};hn.unmountComponentAtNode=function(t){if(!ef(t))throw Error(B(40));return t._reactRootContainer?(Yi(function(){tf(null,null,t,!1,function(){t._reactRootContainer=null,t[Kr]=null})}),!0):!1};hn.unstable_batchedUpdates=kv;hn.unstable_renderSubtreeIntoContainer=function(t,e,n,r){if(!ef(n))throw Error(B(200));if(t==null||t._reactInternals===void 0)throw Error(B(38));return tf(t,e,n,!1,r)};hn.version="18.3.1-next-f1338f8080-20240426";function cS(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(cS)}catch(t){console.error(t)}}cS(),cE.exports=hn;var Wc=cE.exports;const uS=Xk(Wc);var dS,tb=Wc;dS=tb.createRoot,tb.hydrateRoot;const xM=1,wM=1e6;let Ip=0;function bM(){return Ip=(Ip+1)%Number.MAX_SAFE_INTEGER,Ip.toString()}const Pp=new Map,nb=t=>{if(Pp.has(t))return;const e=setTimeout(()=>{Pp.delete(t),Ll({type:"REMOVE_TOAST",toastId:t})},wM);Pp.set(t,e)},_M=(t,e)=>{switch(e.type){case"ADD_TOAST":return{...t,toasts:[e.toast,...t.toasts].slice(0,xM)};case"UPDATE_TOAST":return{...t,toasts:t.toasts.map(n=>n.id===e.toast.id?{...n,...e.toast}:n)};case"DISMISS_TOAST":{const{toastId:n}=e;return n?nb(n):t.toasts.forEach(r=>{nb(r.id)}),{...t,toasts:t.toasts.map(r=>r.id===n||n===void 0?{...r,open:!1}:r)}}case"REMOVE_TOAST":return e.toastId===void 0?{...t,toasts:[]}:{...t,toasts:t.toasts.filter(n=>n.id!==e.toastId)}}},hd=[];let fd={toasts:[]};function Ll(t){fd=_M(fd,t),hd.forEach(e=>{e(fd)})}function kM({...t}){const e=bM(),n=s=>Ll({type:"UPDATE_TOAST",toast:{...s,id:e}}),r=()=>Ll({type:"DISMISS_TOAST",toastId:e});return Ll({type:"ADD_TOAST",toast:{...t,id:e,open:!0,onOpenChange:s=>{s||r()}}}),{id:e,dismiss:r,update:n}}function EM(){const[t,e]=m.useState(fd);return m.useEffect(()=>(hd.push(e),()=>{const n=hd.indexOf(e);n>-1&&hd.splice(n,1)}),[t]),{...t,toast:kM,dismiss:n=>Ll({type:"DISMISS_TOAST",toastId:n})}}function xe(t,e,{checkForDefaultPrevented:n=!0}={}){return function(s){if(t==null||t(s),n===!1||!s.defaultPrevented)return e==null?void 0:e(s)}}function rb(t,e){if(typeof t=="function")return t(e);t!=null&&(t.current=e)}function hS(...t){return e=>{let n=!1;const r=t.map(s=>{const i=rb(s,e);return!n&&typeof i=="function"&&(n=!0),i});if(n)return()=>{for(let s=0;s<r.length;s++){const i=r[s];typeof i=="function"?i():rb(t[s],null)}}}}function He(...t){return m.useCallback(hS(...t),t)}function CM(t,e){const n=m.createContext(e),r=i=>{const{children:o,...a}=i,c=m.useMemo(()=>a,Object.values(a));return l.jsx(n.Provider,{value:c,children:o})};r.displayName=t+"Provider";function s(i){const o=m.useContext(n);if(o)return o;if(e!==void 0)return e;throw new Error(`\`${i}\` must be used within \`${t}\``)}return[r,s]}function lo(t,e=[]){let n=[];function r(i,o){const a=m.createContext(o),c=n.length;n=[...n,o];const u=h=>{var w;const{scope:f,children:p,...x}=h,g=((w=f==null?void 0:f[t])==null?void 0:w[c])||a,y=m.useMemo(()=>x,Object.values(x));return l.jsx(g.Provider,{value:y,children:p})};u.displayName=i+"Provider";function d(h,f){var g;const p=((g=f==null?void 0:f[t])==null?void 0:g[c])||a,x=m.useContext(p);if(x)return x;if(o!==void 0)return o;throw new Error(`\`${h}\` must be used within \`${i}\``)}return[u,d]}const s=()=>{const i=n.map(o=>m.createContext(o));return function(a){const c=(a==null?void 0:a[t])||i;return m.useMemo(()=>({[`__scope${t}`]:{...a,[t]:c}}),[a,c])}};return s.scopeName=t,[r,SM(s,...e)]}function SM(...t){const e=t[0];if(t.length===1)return e;const n=()=>{const r=t.map(s=>({useScope:s(),scopeName:s.scopeName}));return function(i){const o=r.reduce((a,{useScope:c,scopeName:u})=>{const h=c(i)[`__scope${u}`];return{...a,...h}},{});return m.useMemo(()=>({[`__scope${e.scopeName}`]:o}),[o])}};return n.scopeName=e.scopeName,n}function Zd(t){const e=NM(t),n=m.forwardRef((r,s)=>{const{children:i,...o}=r,a=m.Children.toArray(i),c=a.find(IM);if(c){const u=c.props.children,d=a.map(h=>h===c?m.Children.count(u)>1?m.Children.only(null):m.isValidElement(u)?u.props.children:null:h);return l.jsx(e,{...o,ref:s,children:m.isValidElement(u)?m.cloneElement(u,void 0,d):null})}return l.jsx(e,{...o,ref:s,children:i})});return n.displayName=`${t}.Slot`,n}function NM(t){const e=m.forwardRef((n,r)=>{const{children:s,...i}=n;
vendor: 8,636 bytes, line 40
40if(m.isValidElement(s)){const o=jM(s),a=PM(i,s.props);return s.type!==m.Fragment&&(a.ref=r?hS(r,o):o),m.cloneElement(s,a)}return m.Children.count(s)>1?m.Children.only(null):null});return e.displayName=`${t}.SlotClone`,e}var fS=Symbol("radix.slottable");function TM(t){const e=({children:n})=>l.jsx(l.Fragment,{children:n});return e.displayName=`${t}.Slottable`,e.__radixId=fS,e}function IM(t){return m.isValidElement(t)&&typeof t.type=="function"&&"__radixId"in t.type&&t.type.__radixId===fS}function PM(t,e){const n={...e};for(const r in e){const s=t[r],i=e[r];/^on[A-Z]/.test(r)?s&&i?n[r]=(...a)=>{const c=i(...a);return s(...a),c}:s&&(n[r]=s):r==="style"?n[r]={...s,...i}:r==="className"&&(n[r]=[s,i].filter(Boolean).join(" "))}return{...t,...n}}function jM(t){var r,s;let e=(r=Object.getOwnPropertyDescriptor(t.props,"ref"))==null?void 0:r.get,n=e&&"isReactWarning"in e&&e.isReactWarning;return n?t.ref:(e=(s=Object.getOwnPropertyDescriptor(t,"ref"))==null?void 0:s.get,n=e&&"isReactWarning"in e&&e.isReactWarning,n?t.props.ref:t.props.ref||t.ref)}function pS(t){const e=t+"CollectionProvider",[n,r]=lo(e),[s,i]=n(e,{collectionRef:{current:null},itemMap:new Map}),o=g=>{const{scope:y,children:w}=g,v=V.useRef(null),b=V.useRef(new Map).current;return l.jsx(s,{scope:y,itemMap:b,collectionRef:v,children:w})};o.displayName=e;const a=t+"CollectionSlot",c=Zd(a),u=V.forwardRef((g,y)=>{const{scope:w,children:v}=g,b=i(a,w),_=He(y,b.collectionRef);return l.jsx(c,{ref:_,children:v})});u.displayName=a;const d=t+"CollectionItemSlot",h="data-radix-collection-item",f=Zd(d),p=V.forwardRef((g,y)=>{const{scope:w,children:v,...b}=g,_=V.useRef(null),k=He(y,_),S=i(d,w);return V.useEffect(()=>(S.itemMap.set(_,{ref:_,...b}),()=>void S.itemMap.delete(_))),l.jsx(f,{[h]:"",ref:k,children:v})});p.displayName=d;function x(g){const y=i(t+"CollectionConsumer",g);return V.useCallback(()=>{const v=y.collectionRef.current;if(!v)return[];const b=Array.from(v.querySelectorAll(`[${h}]`));return Array.from(y.itemMap.values()).sort((S,C)=>b.indexOf(S.ref.current)-b.indexOf(C.ref.current))},[y.collectionRef,y.itemMap])}return[{Provider:o,Slot:u,ItemSlot:p},x,r]}var RM=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],Ne=RM.reduce((t,e)=>{const n=Zd(`Primitive.${e}`),r=m.forwardRef((s,i)=>{const{asChild:o,...a}=s,c=o?n:e;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),l.jsx(c,{...a,ref:i})});return r.displayName=`Primitive.${e}`,{...t,[e]:r}},{});function mS(t,e){t&&Wc.flushSync(()=>t.dispatchEvent(e))}function Nr(t){const e=m.useRef(t);return m.useEffect(()=>{e.current=t}),m.useMemo(()=>(...n)=>{var r;return(r=e.current)==null?void 0:r.call(e,...n)},[])}function AM(t,e=globalThis==null?void 0:globalThis.document){const n=Nr(t);m.useEffect(()=>{const r=s=>{s.key==="Escape"&&n(s)};return e.addEventListener("keydown",r,{capture:!0}),()=>e.removeEventListener("keydown",r,{capture:!0})},[n,e])}var DM="DismissableLayer",bg="dismissableLayer.update",MM="dismissableLayer.pointerDownOutside",OM="dismissableLayer.focusOutside",sb,gS=m.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),nf=m.forwardRef((t,e)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:s,onFocusOutside:i,onInteractOutside:o,onDismiss:a,...c}=t,u=m.useContext(gS),[d,h]=m.useState(null),f=(d==null?void 0:d.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,p]=m.useState({}),x=He(e,C=>h(C)),g=Array.from(u.layers),[y]=[...u.layersWithOutsidePointerEventsDisabled].slice(-1),w=g.indexOf(y),v=d?g.indexOf(d):-1,b=u.layersWithOutsidePointerEventsDisabled.size>0,_=v>=w,k=FM(C=>{const N=C.target,P=[...u.branches].some(j=>j.contains(N));!_||P||(s==null||s(C),o==null||o(C),C.defaultPrevented||a==null||a())},f),S=UM(C=>{const N=C.target;[...u.branches].some(j=>j.contains(N))||(i==null||i(C),o==null||o(C),C.defaultPrevented||a==null||a())},f);return AM(C=>{v===u.layers.size-1&&(r==null||r(C),!C.defaultPrevented&&a&&(C.preventDefault(),a()))},f),m.useEffect(()=>{if(d)return n&&(u.layersWithOutsidePointerEventsDisabled.size===0&&(sb=f.body.style.pointerEvents,f.body.style.pointerEvents="none"),u.layersWithOutsidePointerEventsDisabled.add(d)),u.layers.add(d),ib(),()=>{n&&u.layersWithOutsidePointerEventsDisabled.size===1&&(f.body.style.pointerEvents=sb)}},[d,f,n,u]),m.useEffect(()=>()=>{d&&(u.layers.delete(d),u.layersWithOutsidePointerEventsDisabled.delete(d),ib())},[d,u]),m.useEffect(()=>{const C=()=>p({});return document.addEventListener(bg,C),()=>document.removeEventListener(bg,C)},[]),l.jsx(Ne.div,{...c,ref:x,style:{pointerEvents:b?_?"auto":"none":void 0,...t.style},onFocusCapture:xe(t.onFocusCapture,S.onFocusCapture),onBlurCapture:xe(t.onBlurCapture,S.onBlurCapture),onPointerDownCapture:xe(t.onPointerDownCapture,k.onPointerDownCapture)})});nf.displayName=DM;var LM="DismissableLayerBranch",yS=m.forwardRef((t,e)=>{const n=m.useContext(gS),r=m.useRef(null),s=He(e,r);return m.useEffect(()=>{const i=r.current;if(i)return n.branches.add(i),()=>{n.branches.delete(i)}},[n.branches]),l.jsx(Ne.div,{...t,ref:s})});yS.displayName=LM;function FM(t,e=globalThis==null?void 0:globalThis.document){const n=Nr(t),r=m.useRef(!1),s=m.useRef(()=>{});return m.useEffect(()=>{const i=a=>{if(a.target&&!r.current){let c=function(){vS(MM,n,u,{discrete:!0})};const u={originalEvent:a};a.pointerType==="touch"?(e.removeEventListener("click",s.current),s.current=c,e.addEventListener("click",s.current,{once:!0})):c()}else e.removeEventListener("click",s.current);r.current=!1},o=window.setTimeout(()=>{e.addEventListener("pointerdown",i)},0);return()=>{window.clearTimeout(o),e.removeEventListener("pointerdown",i),e.removeEventListener("click",s.current)}},[e,n]),{onPointerDownCapture:()=>r.current=!0}}function UM(t,e=globalThis==null?void 0:globalThis.document){const n=Nr(t),r=m.useRef(!1);return m.useEffect(()=>{const s=i=>{i.target&&!r.current&&vS(OM,n,{originalEvent:i},{discrete:!1})};return e.addEventListener("focusin",s),()=>e.removeEventListener("focusin",s)},[e,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function ib(){const t=new CustomEvent(bg);document.dispatchEvent(t)}function vS(t,e,n,{discrete:r}){const s=n.originalEvent.target,i=new CustomEvent(t,{bubbles:!1,cancelable:!0,detail:n});e&&s.addEventListener(t,e,{once:!0}),r?mS(s,i):s.dispatchEvent(i)}var BM=nf,VM=yS,Yr=globalThis!=null&&globalThis.document?m.useLayoutEffect:()=>{},$M="Portal",jv=m.forwardRef((t,e)=>{var a;const{container:n,...r}=t,[s,i]=m.useState(!1);Yr(()=>i(!0),[]);const o=n||s&&((a=globalThis==null?void 0:globalThis.document)==null?void 0:a.body);return o?uS.createPortal(l.jsx(Ne.div,{...r,ref:e}),o):null});jv.displayName=$M;function zM(t,e){return m.useReducer((n,r)=>e[n][r]??n,t)}var co=t=>{const{present:e,children:n}=t,r=WM(e),s=typeof n=="function"?n({present:r.isPresent}):m.Children.only(n),i=He(r.ref,HM(s));return typeof n=="function"||r.isPresent?m.cloneElement(s,{ref:i}):null};co.displayName="Presence";function WM(t){const[e,n]=m.useState(),r=m.useRef(null),s=m.useRef(t),i=m.useRef("none"),o=t?"mounted":"unmounted",[a,c]=zM(o,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return m.useEffect(()=>{const u=Iu(r.current);i.current=a==="mounted"?u:"none"},[a]),Yr(()=>{const u=r.current,d=s.current;if(d!==t){const f=i.current,p=Iu(u);t?c("MOUNT"):p==="none"||(u==null?void 0:u.display)==="none"?c("UNMOUNT"):c(d&&f!==p?"ANIMATION_OUT":"UNMOUNT"),s.current=t}},[t,c]),Yr(()=>{if(e){let u;const d=e.ownerDocument.defaultView??window,h=p=>{const g=Iu(r.current).includes(p.animationName);if(p.target===e&&g&&(c("ANIMATION_END"),!s.current)){const y=e.style.animationFillMode;e.style.animationFillMode="forwards",u=d.setTimeout(()=>{e.style.animationFillMode==="forwards"&&(e.style.animationFillMode=y)})}},f=p=>{p.target===e&&(i.current=Iu(r.current))};return e.addEventListener("animationstart",f),e.addEventListener("animationcancel",h),e.addEventListener("animationend",h),()=>{d.clearTimeout(u),e.removeEventListener("animationstart",f),e.removeEventListener("animationcancel",h),e.removeEventListener("animationend",h)}}else c("ANIMATION_END")},[e,c]),{isPresent:["mounted","unmountSuspended"].includes(a),ref:m.useCallback(u=>{r.current=u?getComputedStyle(u):null,n(u)},[])}}function Iu(t){return(t==null?void 0:t.animationName)||"none"}function HM(t){var r,s;let e=(r=Object.getOwnPropertyDescriptor(t.props,"ref"))==null?void 0:r.get,n=e&&"isReactWarning"in e&&e.
40isReactWarning;return n?t.ref:(e=(s=Object.getOwnPropertyDescriptor(t,"ref"))==null?void 0:s.get,n=e&&"isReactWarning"in e&&e.isReactWarning,n?t.props.ref:t.props.ref||t.ref)}var KM=By[" useInsertionEffect ".trim().toString()]||Yr;function rf({prop:t,defaultProp:e,onChange:n=()=>{},caller:r}){const[s,i,o]=GM({defaultProp:e,onChange:n}),a=t!==void 0,c=a?t:s;{const d=m.useRef(t!==void 0);m.useEffect(()=>{const h=d.current;h!==a&&console.warn(`${r} is changing from ${h?"controlled":"uncontrolled"} to ${a?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),d.current=a},[a,r])}const u=m.useCallback(d=>{var h;if(a){const f=qM(d)?d(t):d;f!==t&&((h=o.current)==null||h.call(o,f))}else i(d)},[a,t,i,o]);return[c,u]}function GM({defaultProp:t,onChange:e}){const[n,r]=m.useState(t),s=m.useRef(n),i=m.useRef(e);return KM(()=>{i.current=e},[e]),m.useEffect(()=>{var o;s.current!==n&&((o=i.current)==null||o.call(i,n),s.current=n)},[n,s]),[n,r,i]}function qM(t){return typeof t=="function"}var YM=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),QM="VisuallyHidden",sf=m.forwardRef((t,e)=>l.jsx(Ne.span,{...t,ref:e,style:{...YM,...t.style}}));sf.displayName=QM;var XM=sf,Rv="ToastProvider",[Av,JM,ZM]=pS("Toast"),[xS,dJ]=lo("Toast",[ZM]),[eO,of]=xS(Rv),wS=t=>{const{__scopeToast:e,label:n="Notification",duration:r=5e3,swipeDirection:s="right",swipeThreshold:i=50,children:o}=t,[a,c]=m.useState(null),[u,d]=m.useState(0),h=m.useRef(!1),f=m.useRef(!1);return n.trim()||console.error(`Invalid prop \`label\` supplied to \`${Rv}\`. Expected non-empty \`string\`.`),l.jsx(Av.Provider,{scope:e,children:l.jsx(eO,{scope:e,label:n,duration:r,swipeDirection:s,swipeThreshold:i,toastCount:u,viewport:a,onViewportChange:c,onToastAdd:m.useCallback(()=>d(p=>p+1),[]),onToastRemove:m.useCallback(()=>d(p=>p-1),[]),isFocusedToastEscapeKeyDownRef:h,isClosePausedRef:f,children:o})})};wS.displayName=Rv;var bS="ToastViewport",tO=["F8"],_g="toast.viewportPause",kg="toast.viewportResume",_S=m.forwardRef((t,e)=>{const{__scopeToast:n,hotkey:r=tO,label:s="Notifications ({hotkey})",...i}=t,o=of(bS,n),a=JM(n),c=m.useRef(null),u=m.useRef(null),d=m.useRef(null),h=m.useRef(null),f=He(e,h,o.onViewportChange),p=r.join("+").replace(/Key/g,"").replace(/Digit/g,""),x=o.toastCount>0;m.useEffect(()=>{const y=w=>{var b;r.length!==0&&r.every(_=>w[_]||w.code===_)&&((b=h.current)==null||b.focus())};return document.addEventListener("keydown",y),()=>document.removeEventListener("keydown",y)},[r]),m.useEffect(()=>{const y=c.current,w=h.current;if(x&&y&&w){const v=()=>{if(!o.isClosePausedRef.current){const S=new CustomEvent(_g);w.dispatchEvent(S),o.isClosePausedRef.current=!0}},b=()=>{if(o.isClosePausedRef.current){const S=new CustomEvent(kg);w.dispatchEvent(S),o.isClosePausedRef.current=!1}},_=S=>{!y.contains(S.relatedTarget)&&b()},k=()=>{y.contains(document.activeElement)||b()};return y.addEventListener("focusin",v),y.addEventListener("focusout",_),y.addEventListener("pointermove",v),y.addEventListener("pointerleave",k),window.addEventListener("blur",v),window.addEventListener("focus",b),()=>{y.removeEventListener("focusin",v),y.removeEventListener("focusout",_),y.removeEventListener("pointermove",v),y.removeEventListener("pointerleave",k),window.removeEventListener("blur",v),window.removeEventListener("focus",b)}}},[x,o.isClosePausedRef]);const g=m.useCallback(({tabbingDirection:y})=>{const v=a().map(b=>{const _=b.ref.current,k=[_,...pO(_)];return y==="forwards"?k:k.reverse()});return(y==="forwards"?v.reverse():v).flat()},[a]);return m.useEffect(()=>{const y=h.current;if(y){const w=v=>{var k,S,C;const b=v.altKey||v.ctrlKey||v.metaKey;if(v.key==="Tab"&&!b){const N=document.activeElement,P=v.shiftKey;if(v.target===y&&P){(k=u.current)==null||k.focus();return}const L=g({tabbingDirection:P?"backwards":"forwards"}),K=L.findIndex(U=>U===N);jp(L.slice(K+1))?v.preventDefault():P?(S=u.current)==null||S.focus():(C=d.current)==null||C.focus()}};return y.addEventListener("keydown",w),()=>y.removeEventListener("keydown",w)}},[a,g]),l.jsxs(VM,{ref:c,role:"region","aria-label":s.replace("{hotkey}",p),tabIndex:-1,style:{pointerEvents:x?void 0:"none"},children:[x&&l.jsx(Eg,{ref:u,onFocusFromOutsideViewport:()=>{const y=g({tabbingDirection:"forwards"});jp(y)}}),l.jsx(Av.Slot,{scope:n,children:l.jsx(Ne.ol,{tabIndex:-1,...i,ref:f})}),x&&l.jsx(Eg,{ref:d,onFocusFromOutsideViewport:()=>{const y=g({tabbingDirection:"backwards"});jp(y)}})]})});_S.displayName=bS;var kS="ToastFocusProxy",Eg=m.forwardRef((t,e)=>{const{__scopeToast:n,onFocusFromOutsideViewport:r,...s}=t,i=of(kS,n);return l.jsx(sf,{"aria-hidden":!0,tabIndex:0,...s,ref:e,style:{position:"fixed"},onFocus:o=>{var u;const a=o.relatedTarget;!((u=i.viewport)!=null&&u.contains(a))&&r()}})});Eg.displayName=kS;var Hc="Toast",nO="toast.swipeStart",rO="toast.swipeMove",sO="toast.swipeCancel",iO="toast.swipeEnd",ES=m.forwardRef((t,e)=>{const{forceMount:n,open:r,defaultOpen:s,onOpenChange:i,...o}=t,[a,c]=rf({prop:r,defaultProp:s??!0,onChange:i,caller:Hc});return l.jsx(co,{present:n||a,children:l.jsx(lO,{open:a,...o,ref:e,onClose:()=>c(!1),onPause:Nr(t.onPause),onResume:Nr(t.onResume),onSwipeStart:xe(t.onSwipeStart,u=>{u.currentTarget.setAttribute("data-swipe","start")}),onSwipeMove:xe(t.onSwipeMove,u=>{const{x:d,y:h}=u.detail.delta;u.currentTarget.setAttribute("data-swipe","move"),u.currentTarget.style.setProperty("--radix-toast-swipe-move-x",`${d}px`),u.currentTarget.style.setProperty("--radix-toast-swipe-move-y",`${h}px`)}),onSwipeCancel:xe(t.onSwipeCancel,u=>{u.currentTarget.setAttribute("data-swipe","cancel"),u.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),u.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),u.currentTarget.style.removeProperty("--radix-toast-swipe-end-x"),u.currentTarget.style.removeProperty("--radix-toast-swipe-end-y")}),onSwipeEnd:xe(t.onSwipeEnd,u=>{const{x:d,y:h}=u.detail.delta;u.currentTarget.setAttribute("data-swipe","end"),u.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),u.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),u.currentTarget.style.setProperty("--radix-toast-swipe-end-x",`${d}px`),u.currentTarget.style.setProperty("--radix-toast-swipe-end-y",`${h}px`),c(!1)})})})});ES.displayName=Hc;var[oO,aO]=xS(Hc,{onClose(){}}),lO=m.forwardRef((t,e)=>{const{__scopeToast:n,type:r="foreground",duration:s,open:i,onClose:o,onEscapeKeyDown:a,onPause:c,onResume:u,onSwipeStart:d,onSwipeMove:h,onSwipeCancel:f,onSwipeEnd:p,...x}=t,g=of(Hc,n),[y,w]=m.useState(null),v=He(e,U=>w(U)),b=m.useRef(null),_=m.useRef(null),k=s||g.duration,S=m.useRef(0),C=m.useRef(k),N=m.useRef(0),{onToastAdd:P,onToastRemove:j}=g,O=Nr(()=>{var A;(y==null?void 0:y.contains(document.activeElement))&&((A=g.viewport)==null||A.focus()),o()}),L=m.useCallback(U=>
40{!U||U===1/0||(window.clearTimeout(N.current),S.current=new Date().getTime(),N.current=window.setTimeout(O,U))},[O]);m.useEffect(()=>{const U=g.viewport;if(U){const A=()=>{L(C.current),u==null||u()},M=()=>{const R=new Date().getTime()-S.current;C.current=C.current-R,window.clearTimeout(N.current),c==null||c()};return U.addEventListener(_g,M),U.addEventListener(kg,A),()=>{U.removeEventListener(_g,M),U.removeEventListener(kg,A)}}},[g.viewport,k,c,u,L]),m.useEffect(()=>{i&&!g.isClosePausedRef.current&&L(k)},[i,k,g.isClosePausedRef,L]),m.useEffect(()=>(P(),()=>j()),[P,j]);const K=m.useMemo(()=>y?jS(y):null,[y]);return g.viewport?l.jsxs(l.Fragment,{children:[K&&l.jsx(cO,{__scopeToast:n,role:"status","aria-live":r==="foreground"?"assertive":"polite","aria-atomic":!0,children:K}),l.jsx(oO,{scope:n,onClose:O,children:Wc.createPortal(l.jsx(Av.ItemSlot,{scope:n,children:l.jsx(BM,{asChild:!0,onEscapeKeyDown:xe(a,()=>{g.isFocusedToastEscapeKeyDownRef.current||O(),g.isFocusedToastEscapeKeyDownRef.current=!1}),children:l.jsx(Ne.li,{role:"status","aria-live":"off","aria-atomic":!0,tabIndex:0,"data-state":i?"open":"closed","data-swipe-direction":g.swipeDirection,...x,ref:v,style:{userSelect:"none",touchAction:"none",...t.style},onKeyDown:xe(t.onKeyDown,U=>{U.key==="Escape"&&(a==null||a(U.nativeEvent),U.nativeEvent.defaultPrevented||(g.isFocusedToastEscapeKeyDownRef.current=!0,O()))}),onPointerDown:xe(t.onPointerDown,U=>{U.button===0&&(b.current={x:U.clientX,y:U.clientY})}),onPointerMove:xe(t.onPointerMove,U=>{if(!b.current)return;const A=U.clientX-b.current.x,M=U.clientY-b.current.y,R=!!_.current,E=["left","right"].includes(g.swipeDirection),T=["left","up"].includes(g.swipeDirection)?Math.min:Math.max,I=E?T(0,A):0,H=E?0:T(0,M),Q=U.pointerType==="touch"?10:2,ne={x:I,y:H},z={originalEvent:U,delta:ne};R?(_.current=ne,Pu(rO,h,z,{discrete:!1})):ob(ne,g.swipeDirection,Q)?(_.current=ne,Pu(nO,d,z,{discrete:!1}),U.target.setPointerCapture(U.pointerId)):(Math.abs(A)>Q||Math.abs(M)>Q)&&(b.current=null)}),onPointerUp:xe(t.onPointerUp,U=>{const A=_.current,M=U.target;if(M.hasPointerCapture(U.pointerId)&&M.releasePointerCapture(U.pointerId),_.current=null,b.current=null,A){const R=U.currentTarget,E={originalEvent:U,delta:A};ob(A,g.swipeDirection,g.swipeThreshold)?Pu(iO,p,E,{discrete:!0}):Pu(sO,f,E,{discrete:!0}),R.addEventListener("click",T=>T.preventDefault(),{once:!0})}})})})}),g.viewport)})]}):null}),cO=t=>{const{__scopeToast:e,children:n,...r}=t,s=of(Hc,e),[i,o]=m.useState(!1),[a,c]=m.useState(!1);return hO(()=>o(!0)),m.useEffect(()=>{const u=window.setTimeout(()=>c(!0),1e3);return()=>window.clearTimeout(u)},[]),a?null:l.jsx(jv,{asChild:!0,children:l.jsx(sf,{...r,children:i&&l.jsxs(l.Fragment,{children:[s.label," ",n]})})})},uO="ToastTitle",CS=m.forwardRef((t,e)=>{const{__scopeToast:n,...r}=t;return l.jsx(Ne.div,{...r,ref:e})});CS.displayName=uO;var dO="ToastDescription",SS=m.forwardRef((t,e)=>{const{__scopeToast:n,...r}=t;return l.jsx(Ne.div,{...r,ref:e})});SS.displayName=dO;var NS="ToastAction",TS=m.forwardRef((t,e)=>{const{altText:n,...r}=t;return n.trim()?l.jsx(PS,{altText:n,asChild:!0,children:l.jsx(Dv,{...r,ref:e})}):(console.error(`Invalid prop \`altText\` supplied to \`${NS}\`. Expected non-empty \`string\`.`),null)});TS.displayName=NS;var IS="ToastClose",Dv=m.forwardRef((t,e)=>{const{__scopeToast:n,...r}=t,s=aO(IS,n);return l.jsx(PS,{asChild:!0,children:l.jsx(Ne.button,{type:"button",...r,ref:e,onClick:xe(t.onClick,s.onClose)})})});Dv.displayName=IS;var PS=m.forwardRef((t,e)=>{const{__scopeToast:n,altText:r,...s}=t;return l.jsx(Ne.div,{"data-radix-toast-announce-exclude":"","data-radix-toast-announce-alt":r||void 0,...s,ref:e})});function jS(t){const e=[];return Array.from(t.childNodes).forEach(r=>{if(r.nodeType===r.TEXT_NODE&&r.textContent&&e.push(r.textContent),fO(r)){const s=r.ariaHidden||r.hidden||r.style.display==="none",i=r.dataset.radixToastAnnounceExclude==="";if(!s)if(i){const o=r.dataset.radixToastAnnounceAlt;o&&e.push(o)}else e.push(...jS(r))}}),e}function Pu(t,e,n,{discrete:r}){const s=n.originalEvent.currentTarget,i=new CustomEvent(t,{bubbles:!0,cancelable:!0,detail:n});e&&s.addEventListener(t,e,{once:!0}),r?mS(s,i):s.dispatchEvent(i)}var ob=(t,e,n=0)=>{const r=Math.abs(t.x),s=Math.abs(t.y),i=r>s;return e==="left"||e==="right"?i&&r>n:!i&&s>n};function hO(t=()=>{}){const e=Nr(t);Yr(()=>{let n=0,r=0;return n=window.requestAnimationFrame(()=>r=window.requestAnimationFrame(e)),()=>{window.cancelAnimationFrame(n),window.cancelAnimationFrame(r)}},[e])}function fO(t){return t.nodeType===t.ELEMENT_NODE}function pO(t){const e=[],n=document.createTreeWalker(t,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const s=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||s?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)e.push(n.currentNode);return e}function jp(t){const e=document.activeElement;return t.some(n=>n===e?!0:(n.focus(),document.activeElement!==e))}var mO=wS,RS=_S,AS=ES,DS=CS,MS=SS,OS=TS,LS=Dv;function FS(t){var e,n,r="";if(typeof t=="string"||typeof t=="number")r+=t;else if(typeof t=="object")if(Array.isArray(t)){var s=t.length;for(e=0;e<s;e++)t[e]&&(n=FS(t[e]))&&(r&&(r+=" "),r+=n)}else for(n in t)t[n]&&(r&&(r+=" "),r+=n);return r}function US(){for(var t,e,n=0,r="",s=arguments.length;n<s;n++)(t=arguments[n])&&(e=FS(t))&&(r&&(r+=" "),r+=e);return r}const ab=t=>typeof t=="boolean"?`${t}`:t===0?"0":t,lb=US,gO=(t,e)=>n=>{var r;if((e==null?void 0:e.variants)==null)return lb(t,n==null?void 0:n.class,n==null?void 0:n.className);const{variants:s,defaultVariants:i}=e,o=Object.keys(s).map(u=>{const d=n==null?void 0:n[u],h=i==null?void 0:i[u];if(d===null)return null;const f=ab(d)||ab(h);return s[u][f]}),a=n&&Object.entries(n).reduce((u,d)=>{let[h,f]=d;return f===void 0||(u[h]=f),u},{}),c=e==null||(r=e.compoundVariants)===null||r===void 0?void 0:r.reduce((u,d)=>{let{class:h,className:f,...p}=d;return Object.entries(p).every(x=>{let[g,y]=x;return Array.isArray(y)?y.includes({...i,...a}[g]):{...i,...a}[g]===y})?[...u,h,f]:u},[]);return lb(t,o,c,n==null?void 0:n.class,n==null?void 0:n.className)};/** 41 * @license lucide-react v0.462.0 - ISC 42 * 43 * This source code is licensed under the ISC license. 44 * See the LICENSE file in the root directory of this source tree. 45 */const yO=t=>t.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),BS=(...t)=>t.filter((e,n,r)=>!!e&&e.trim()!==""&&r.indexOf(e)===n).join(" ").trim();/** 46 * @license lucide-react v0.462.0 - ISC 47 * 48 * This source code is licensed under the ISC license. 49 * See the LICENSE file in the root directory of this source tree. 50 */var vO={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"};/** 51 * @license lucide-react v0.462.0 - ISC 52 * 53 * This source code is licensed under the ISC license. 54 * See the LICENSE file in the root directory of this source tree. 55 */const xO=m.forwardRef(({color:t="currentColor",size:e=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:s="",children:i,iconNode:o,...a},c)=>m.createElement("svg",{ref:c,...vO,width:e,height:e,stroke:t,strokeWidth:r?Number(n)*24/Number(e):n,className:BS("lucide",s),...a},[...o.map(([u,d])=>m.createElement(u,d)),...Array.isArray(i)?i:[i]]));/** 56 * @license lucide-react v0.462.0 - ISC 57 * 58 * This source code is licensed under the ISC license. 59 * See the LICENSE file in the root directory of this source tree. 60 */const be=(t,e)=>{const n=m.forwardRef(({className:r,...s},i)=>m.createElement(xO,{ref:i,iconNode:e,className:BS(`lucide-${yO(t)}`,r),...s}));return n.displayName=`${t}`,n};/** 61 * @license lucide-react v0.462.0 - ISC 62 * 63 * This source code is licensed under the ISC license. 64 * See the LICENSE file in the root directory of this source tree. 65 */const af=be("ArrowLeft",[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]]);/** 66 * @license lucide-react v0.462.0 - ISC 67 * 68 * This source code is licensed under the ISC license. 69 * See the LICENSE file in the root directory of this source tree. 70 */const _n=be("ArrowRight",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]]);/** 71 * @license lucide-react v0.462.0 - ISC 72 * 73 * This source code is licensed under the ISC license. 74 * See the LICENSE file in the root directory of this source tree. 75 */const wO=be("ArrowUp",[["path",{d:"m5 12 7-7 7 7",key:"hav0vg"}],["path",{d:"M12 19V5",key:"x0mq9r"}]]);/** 76 * @license lucide-react v0.462.0 - ISC 77 * 78 * This source code is licensed under the ISC license. 79 * See the LICENSE file in the root directory of this source tree. 80 */const Ma=be("Camera",[["path",{d:"M14.5 4h-5L7 7H4a2 2 0 0 0-2 2v9a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2V9a2 2 0 0 0-2-2h-3l-2.5-3z",key:"1tc9qg"}],["circle",{cx:"12",cy:"13",r:"3",key:"1vg3eu"}]]);/** 81 * @license lucide-react v0.462.0 - ISC 82 * 83 * This source code is licensed under the ISC license. 84 * See the LICENSE file in the root directory of this source tree. 85 */const _a=be("Check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);/** 86 * @license lucide-react v0.462.0 - ISC 87 * 88 * This source code is licensed under the ISC license. 89 * See the LICENSE file in the root directory of this source tree. 90 */const bO=be("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);/** 91 * @license lucide-react v0.462.0 - ISC 92 * 93 * This source code is licensed under the ISC license. 94 * See the LICENSE file in the root directory of this source tree. 95 */const _O=be("ChevronLeft",[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]);/** 96 * @license lucide-react v0.462.0 - ISC 97 * 98 * This source code is licensed under the ISC license. 99 * See the LICENSE file in the root directory of this source tree. 100 */const kO=be("ChevronRight",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);/** 101 * @license lucide-react v0.462.0 - ISC 102 * 103 * This source code is licensed under the ISC license. 104 * See the LICENSE file in the root directory of this source tree. 105 */const EO=be("ChevronUp",[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]]);/** 106 * @license lucide-react v0.462.0 - ISC 107 * 108 * This source code is licensed under the ISC license. 109 * See the LICENSE file in the root directory of this source tree. 110 */const CO=be("Crop",[["path",{d:"M6 2v14a2 2 0 0 0 2 2h14",key:"ron5a4"}],["path",{d:"M18 22V8a2 2 0 0 0-2-2H2",key:"7s9ehn"}]]);/** 111 * @license lucide-react v0.462.0 - ISC 112 * 113 * This source code is licensed under the ISC license. 114 * See the LICENSE file in the root directory of this source tree. 115 */const SO=be("Download",[["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["polyline",{points:"7 10 12 15 17 10",key:"2ggqvy"}],["line",{x1:"12",x2:"12",y1:"15",y2:"3",key:"1vk2je"}]]);/** 116 * @license lucide-react v0.462.0 - ISC 117 * 118 * This source code is licensed under the ISC license. 119 * See the LICENSE file in the root directory of this source tree. 120 */const Kc=be("Facebook",[["path",{d:"M18 2h-3a5 5 0 0 0-5 5v3H7v4h3v8h4v-8h3l1-4h-4V7a1 1 0 0 1 1-1h3z",key:"1jg4f8"}]]);/** 121 * @license lucide-react v0.462.0 - ISC 122 * 123 * This source code is licensed under the ISC license. 124 * See the LICENSE file in the root directory of this source tree. 125 */const NO=be("ImagePlus",[["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"}]]);/** 126 * @license lucide-react v0.462.0 - ISC 127 * 128 * This source code is licensed under the ISC license. 129 * See the LICENSE file in the root directory of this source tree. 130 */const Oa=be("Instagram",[["rect",{width:"20",height:"20",x:"2",y:"2",rx:"5",ry:"5",key:"2e1cvw"}],["path",{d:"M16 11.37A4 4 0 1 1 12.63 8 4 4 0 0 1 16 11.37z",key:"9exkf1"}],["line",{x1:"17.5",x2:"17.51",y1:"6.5",y2:"6.5",key:"r4j83e"}]]);/** 131 * @license lucide-react v0.462.0 - ISC 132 * 133 * This source code is licensed under the ISC license. 134 * See the LICENSE file in the root directory of this source tree. 135 */const Tr=be("LoaderCircle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]]);/** 136 * @license lucide-react v0.462.0 - ISC 137 * 138 * This source code is licensed under the ISC license. 139 * See the LICENSE file in the root directory of this source tree. 140 */const TO=be("LogIn",[["path",{d:"M15 3h4a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2h-4",ke
140y:"u53s6r"}],["polyline",{points:"10 17 15 12 10 7",key:"1ail0h"}],["line",{x1:"15",x2:"3",y1:"12",y2:"12",key:"v6grx8"}]]);/** 141 * @license lucide-react v0.462.0 - ISC 142 * 143 * This source code is licensed under the ISC license. 144 * See the LICENSE file in the root directory of this source tree. 145 */const IO=be("LogOut",[["path",{d:"M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4",key:"1uf3rs"}],["polyline",{points:"16 17 21 12 16 7",key:"1gabdz"}],["line",{x1:"21",x2:"9",y1:"12",y2:"12",key:"1uyos4"}]]);/** 146 * @license lucide-react v0.462.0 - ISC 147 * 148 * This source code is licensed under the ISC license. 149 * See the LICENSE file in the root directory of this source tree. 150 */const Cg=be("Mail",[["rect",{width:"20",height:"16",x:"2",y:"4",rx:"2",key:"18n3k1"}],["path",{d:"m22 7-8.97 5.7a1.94 1.94 0 0 1-2.06 0L2 7",key:"1ocrg3"}]]);/** 151 * @license lucide-react v0.462.0 - ISC 152 * 153 * This source code is licensed under the ISC license. 154 * See the LICENSE file in the root directory of this source tree. 155 */const VS=be("MapPin",[["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"}]]);/** 156 * @license lucide-react v0.462.0 - ISC 157 * 158 * This source code is licensed under the ISC license. 159 * See the LICENSE file in the root directory of this source tree. 160 */const PO=be("Menu",[["line",{x1:"4",x2:"20",y1:"12",y2:"12",key:"1e0a9i"}],["line",{x1:"4",x2:"20",y1:"6",y2:"6",key:"1owob3"}],["line",{x1:"4",x2:"20",y1:"18",y2:"18",key:"yk5zj1"}]]);/** 161 * @license lucide-react v0.462.0 - ISC 162 * 163 * This source code is licensed under the ISC license. 164 * See the LICENSE file in the root directory of this source tree. 165 */const jO=be("Minus",[["path",{d:"M5 12h14",key:"1ays0h"}]]);/** 166 * @license lucide-react v0.462.0 - ISC 167 * 168 * This source code is licensed under the ISC license. 169 * See the LICENSE file in the root directory of this source tree. 170 */const $S=be("Palette",[["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:"8.5",cy:"7.5",r:".5",fill:"currentColor",key:"fotxhn"}],["circle",{cx:"6.5",cy:"12.5",r:".5",fill:"currentColor",key:"qy21gx"}],["path",{d:"M12 2C6.5 2 2 6.5 2 12s4.5 10 10 10c.926 0 1.648-.746 1.648-1.688 0-.437-.18-.835-.437-1.125-.29-.289-.438-.652-.438-1.125a1.64 1.64 0 0 1 1.668-1.668h1.996c3.051 0 5.555-2.503 5.555-5.554C21.965 6.012 17.461 2 12 2z",key:"12rzf8"}]]);/** 171 * @license lucide-react v0.462.0 - ISC 172 * 173 * This source code is licensed under the ISC license. 174 * See the LICENSE file in the root directory of this source tree. 175 */const Gc=be("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"}]]);/** 176 * @license lucide-react v0.462.0 - ISC 177 * 178 * This source code is licensed under the ISC license. 179 * See the LICENSE file in the root directory of this source tree. 180 */const zS=be("Phone",[["path",{d:"M22 16.92v3a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07 19.5 19.5 0 0 1-6-6 19.79 19.79 0 0 1-3.07-8.67A2 2 0 0 1 4.11 2h3a2 2 0 0 1 2 1.72 12.84 12.84 0 0 0 .7 2.81 2 2 0 0 1-.45 2.11L8.09 9.91a16 16 0 0 0 6 6l1.27-1.27a2 2 0 0 1 2.11-.45 12.84 12.84 0 0 0 2.81.7A2 2 0 0 1 22 16.92z",key:"foiqr5"}]]);/** 181 * @license lucide-react v0.462.0 - ISC 182 * 183 * This source code is licensed under the ISC license. 184 * See the LICENSE file in the root directory of this source tree. 185 */const Mv=be("Plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]);/** 186 * @license lucide-react v0.462.0 - ISC 187 * 188 * This source code is licensed under the ISC license. 189 * See the LICENSE file in the root directory of this source tree. 190 */const Qo=be("RotateCcw",[["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"}]]);/** 191 * @license lucide-react v0.462.0 - ISC 192 * 193 * This source code is licensed under the ISC license. 194 * See the LICENSE file in the root directory of this source tree. 195 */const Xo=be("Search",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]]);/** 196 * @license lucide-react v0.462.0 - ISC 197 * 198 * This source code is licensed under the ISC license. 199 * See the LICENSE file in the root directory of this source tree. 200 */const RO=be("Settings",[["path",{d:"M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z",key:"1qme2f"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]);/** 201 * @license lucide-react v0.462.0 - ISC 202 * 203 * This source code is licensed under the ISC license. 204 * See the LICENSE file in the root directory of this source tree. 205 */const cb=be("ShoppingBag",[["path",{d:"M6 2 3 6v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2V6l-3-4Z",key:"hou9p0"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M16 10a4 4 0 0 1-8 0",key:"1ltviw"}]]);/** 206 * @license lucide-react v0.462.0 - ISC 207 * 208 * This source code is licensed under the ISC license. 209 * See the LICENSE file in the root directory of this source tree. 210 */const pi=be("Trash2",[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}
vendor: 13,103 bytes, lines 210-220
210],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}],["line",{x1:"10",x2:"10",y1:"11",y2:"17",key:"1uufr5"}],["line",{x1:"14",x2:"14",y1:"11",y2:"17",key:"xtxkd"}]]);/** 211 * @license lucide-react v0.462.0 - ISC 212 * 213 * This source code is licensed under the ISC license. 214 * See the LICENSE file in the root directory of this source tree. 215 */const In=be("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);/** 216 * @license lucide-react v0.462.0 - ISC 217 * 218 * This source code is licensed under the ISC license. 219 * See the LICENSE file in the root directory of this source tree. 220 */const lf=be("Youtube",[["path",{d:"M2.5 17a24.12 24.12 0 0 1 0-10 2 2 0 0 1 1.4-1.4 49.56 49.56 0 0 1 16.2 0A2 2 0 0 1 21.5 7a24.12 24.12 0 0 1 0 10 2 2 0 0 1-1.4 1.4 49.55 49.55 0 0 1-16.2 0A2 2 0 0 1 2.5 17",key:"1q2vi4"}],["path",{d:"m10 15 5-3-5-3z",key:"1jp15x"}]]),Ov="-",AO=t=>{const e=MO(t),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=t;return{getClassGroupId:o=>{const a=o.split(Ov);return a[0]===""&&a.length!==1&&a.shift(),WS(a,e)||DO(o)},getConflictingClassGroupIds:(o,a)=>{const c=n[o]||[];return a&&r[o]?[...c,...r[o]]:c}}},WS=(t,e)=>{var o;if(t.length===0)return e.classGroupId;const n=t[0],r=e.nextPart.get(n),s=r?WS(t.slice(1),r):void 0;if(s)return s;if(e.validators.length===0)return;const i=t.join(Ov);return(o=e.validators.find(({validator:a})=>a(i)))==null?void 0:o.classGroupId},ub=/^\[(.+)\]$/,DO=t=>{if(ub.test(t)){const e=ub.exec(t)[1],n=e==null?void 0:e.substring(0,e.indexOf(":"));if(n)return"arbitrary.."+n}},MO=t=>{const{theme:e,prefix:n}=t,r={nextPart:new Map,validators:[]};return LO(Object.entries(t.classGroups),n).forEach(([i,o])=>{Sg(o,r,i,e)}),r},Sg=(t,e,n,r)=>{t.forEach(s=>{if(typeof s=="string"){const i=s===""?e:db(e,s);i.classGroupId=n;return}if(typeof s=="function"){if(OO(s)){Sg(s(r),e,n,r);return}e.validators.push({validator:s,classGroupId:n});return}Object.entries(s).forEach(([i,o])=>{Sg(o,db(e,i),n,r)})})},db=(t,e)=>{let n=t;return e.split(Ov).forEach(r=>{n.nextPart.has(r)||n.nextPart.set(r,{nextPart:new Map,validators:[]}),n=n.nextPart.get(r)}),n},OO=t=>t.isThemeGetter,LO=(t,e)=>e?t.map(([n,r])=>{const s=r.map(i=>typeof i=="string"?e+i:typeof i=="object"?Object.fromEntries(Object.entries(i).map(([o,a])=>[e+o,a])):i);return[n,s]}):t,FO=t=>{if(t<1)return{get:()=>{},set:()=>{}};let e=0,n=new Map,r=new Map;const s=(i,o)=>{n.set(i,o),e++,e>t&&(e=0,r=n,n=new Map)};return{get(i){let o=n.get(i);if(o!==void 0)return o;if((o=r.get(i))!==void 0)return s(i,o),o},set(i,o){n.has(i)?n.set(i,o):s(i,o)}}},HS="!",UO=t=>{const{separator:e,experimentalParseClassName:n}=t,r=e.length===1,s=e[0],i=e.length,o=a=>{const c=[];let u=0,d=0,h;for(let y=0;y<a.length;y++){let w=a[y];if(u===0){if(w===s&&(r||a.slice(y,y+i)===e)){c.push(a.slice(d,y)),d=y+i;continue}if(w==="/"){h=y;continue}}w==="["?u++:w==="]"&&u--}const f=c.length===0?a:a.substring(d),p=f.startsWith(HS),x=p?f.substring(1):f,g=h&&h>d?h-d:void 0;return{modifiers:c,hasImportantModifier:p,baseClassName:x,maybePostfixModifierPosition:g}};return n?a=>n({className:a,parseClassName:o}):o},BO=t=>{if(t.length<=1)return t;const e=[];let n=[];return t.forEach(r=>{r[0]==="["?(e.push(...n.sort(),r),n=[]):n.push(r)}),e.push(...n.sort()),e},VO=t=>({cache:FO(t.cacheSize),parseClassName:UO(t),...AO(t)}),$O=/\s+/,zO=(t,e)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:s}=e,i=[],o=t.trim().split($O);let a="";for(let c=o.length-1;c>=0;c-=1){const u=o[c],{modifiers:d,hasImportantModifier:h,baseClassName:f,maybePostfixModifierPosition:p}=n(u);let x=!!p,g=r(x?f.substring(0,p):f);if(!g){if(!x){a=u+(a.length>0?" "+a:a);continue}if(g=r(f),!g){a=u+(a.length>0?" "+a:a);continue}x=!1}const y=BO(d).join(":"),w=h?y+HS:y,v=w+g;if(i.includes(v))continue;i.push(v);const b=s(g,x);for(let _=0;_<b.length;++_){const k=b[_];i.push(w+k)}a=u+(a.length>0?" "+a:a)}return a};function WO(){let t=0,e,n,r="";for(;t<arguments.length;)(e=arguments[t++])&&(n=KS(e))&&(r&&(r+=" "),r+=n);return r}const KS=t=>{if(typeof t=="string")return t;let e,n="";for(let r=0;r<t.length;r++)t[r]&&(e=KS(t[r]))&&(n&&(n+=" "),n+=e);return n};function HO(t,...e){let n,r,s,i=o;function o(c){const u=e.reduce((d,h)=>h(d),t());return n=VO(u),r=n.cache.get,s=n.cache.set,i=a,a(c)}function a(c){const u=r(c);if(u)return u;const d=zO(c,n);return s(c,d),d}return function(){return i(WO.apply(null,arguments))}}const je=t=>{const e=n=>n[t]||[];return e.isThemeGetter=!0,e},GS=/^\[(?:([a-z-]+):)?(.+)\]$/i,KO=/^\d+\/\d+$/,GO=new Set(["px","full","screen"]),qO=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,YO=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,QO=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,XO=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,JO=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Ar=t=>Jo(t)||GO.has(t)||KO.test(t),ds=t=>La(t,"length",oL),Jo=t=>!!t&&!Number.isNaN(Number(t)),Rp=t=>La(t,"number",Jo),ul=t=>!!t&&Number.isInteger(Number(t)),ZO=t=>t.endsWith("%")&&Jo(t.slice(0,-1)),ce=t=>GS.test(t),hs=t=>qO.test(t),eL=new Set(["length","size","percentage"]),tL=t=>La(t,eL,qS),nL=t=>La(t,"position",qS),rL=new Set(["image","url"]),sL=t=>La(t,rL,lL),iL=t=>La(t,"",aL),dl=()=>!0,La=(t,e,n)=>{const r=GS.exec(t);return r?r[1]?typeof e=="string"?r[1]===e:e.has(r[1]):n(r[2]):!1},oL=t=>YO.test(t)&&!QO.test(t),qS=()=>!1,aL=t=>XO.test(t),lL=t=>JO.test(t),cL=()=>{const t=je("colors"),e=je("spacing"),n=je("blur"),r=je("brightness"),s=je("borderColor"),i=je("borderRadius"),o=je("borderSpacing"),a=je("borderWidth"),c=je("contrast"),u=je("grayscale"),d=je("hueRotate"),h=je("invert"),f=je("gap"),p=je("gradientColorStops"),x=je("gradientColorStopPositions"),g=je("inset"),y=je("margin"),w=je("opacity"),v=je("padding"),b=je("saturate"),_=je("scale"),k=je("sepia"),S=je("skew"),C=je("space"),N=je("translate"),P=()=>["auto","contain","none"],j=()=>["auto","hidden","clip","visible","scroll"],O=()=>["auto",ce,e],L=()=>[ce,e],K=()=>["",Ar,ds],U=()=>["auto",Jo,ce],A=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],M=()=>["solid","dashed","dotted","double","none"],R=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],E=()=>["start","end","center","between","around","evenly","stretch"],T=()=>["","0",ce],I=()=>["auto","avoid","all","avoid-page","page","left","right","column"],H=()=>[Jo,ce];return{cacheSize:500,separator:":",theme:{colors:[dl],spacing:[Ar,ds],blur:["none","",hs,ce],brightness:H(),borderColor:[t],borderRadius:["none","","full",hs,ce],borderSpacing:L(),borderWidth:K(),contrast:H(),grayscale:T(),hueRotate:H(),invert:T(),gap:L(),gradientColorStops:[t],gradientColorStopPositions:[ZO,ds],inset:O(),margin:O(),opacity:H(),padding:L(),saturate:H(),scale:H(),sepia:T(),skew:H(),space:L(),translate:L()},classGroups:{aspect:[{aspect:["auto","square","video",ce]}],container:["container"],columns:[{columns:[hs]}],"break-after":[{"break-after":I()}],"break-before":[{"break-before":I()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:[...A(),ce]}],overflow:[{overflow:j()}],"overflow-x":[{"overflow-x":j()}],"overflow-y":[{"overflow-y":j()}],overscroll:[{overscroll:P()}],"overscroll-x":[{"overscroll-x":P()}],"overscroll-y":[{"overscroll-y":P()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[g]}],"inset-x":[{"inset-x":[g]}],"inset-y":[{"inset-y":[g]}],start:[{start:[g]}],end:[{end:[g]}],top:[{top:[g]}],right:[{right:[g]}],bottom:[{bottom:[g]}],left:[{left:[g]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",ul,ce]}],basis:[{basis:O()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",ce]}],grow:[{grow:T()}],shrink:[{shrink:T()}],order:[{order:["first","last","none",ul,ce]}],"grid-cols":[{"grid-cols":[dl]}],"col-start-end":[{col:["auto",{span:["full",ul,ce]},ce]}],"col-start":[{"col-start":U()}],"col-end":[{"col-end":U()}],"grid-rows":[{"grid-rows":[dl]}],"row-start-end":[{row:["auto",{span:[ul,ce]},ce]}],"row-start":[{"row-start":U()}],"row-end":[{"row-end":U()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",ce]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",ce]}],gap:[{gap:[f]}],"gap-x":[{"gap-x":[f]}],"gap-y":[{"gap-y":[f]}],"justify-content":[{justify:["normal",...E()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...E(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...E(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[v]}],px:[{px:[v]}],py:[{py:[v]}],ps:[{ps:[v]}],pe:[{pe:[v]}],pt:[{pt:[v]}],pr:[{pr:[v]}],pb:[{pb:[v]}],pl:[{pl:[v]}],m:[{m:[y]}],mx:[{mx:[y]}],my:[{my:[y]}],ms:[{ms:[y]}],me:[{me:[y]}],mt:[{mt:[y]}],mr:[{mr:[y]}],mb:[{mb:[y]}],ml:[{ml:[y]}],"space-x":[{"space-x":[C]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[C]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",ce,e]}],"min-w":[{"min-w":[ce,e,"min","max","fit"]}],"max-w":[{"max-w":[ce,e,"none","full","min","max","fit","prose",{screen:[hs]},hs]}],h:[{h:[ce,e,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[ce,e,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[ce,e,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[ce,e,"auto","min","max","fit"]}],"font-size":[{text:["base",hs,ds]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",Rp]}],"font-family":[{font:[dl]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",ce]}],"line-clamp":[{"line-clamp":["none",Jo,Rp]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",Ar,ce]}],"list-image":[{"list-image":["none",ce]}],"list-style-type":[{list:["none","disc","decimal",ce]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[t]}],"placeholder-opacity":[{"placeholder-opacity":[w]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[t]}],"text-opacity":[{"text-opacity":[w]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...M(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",Ar,ds]}],"underline-offset":[{"underline-offset":["auto",Ar,ce]}],"text-decoration-color":[{decoration:[t]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:L()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",ce]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",ce]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[w]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...A(),nL]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",tL]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},sL]}],"bg-color":[{bg:[t]}],"gradient-from-pos":[{from:[x]}
vendor: 5,180 bytes, line 220
220],"gradient-via-pos":[{via:[x]}],"gradient-to-pos":[{to:[x]}],"gradient-from":[{from:[p]}],"gradient-via":[{via:[p]}],"gradient-to":[{to:[p]}],rounded:[{rounded:[i]}],"rounded-s":[{"rounded-s":[i]}],"rounded-e":[{"rounded-e":[i]}],"rounded-t":[{"rounded-t":[i]}],"rounded-r":[{"rounded-r":[i]}],"rounded-b":[{"rounded-b":[i]}],"rounded-l":[{"rounded-l":[i]}],"rounded-ss":[{"rounded-ss":[i]}],"rounded-se":[{"rounded-se":[i]}],"rounded-ee":[{"rounded-ee":[i]}],"rounded-es":[{"rounded-es":[i]}],"rounded-tl":[{"rounded-tl":[i]}],"rounded-tr":[{"rounded-tr":[i]}],"rounded-br":[{"rounded-br":[i]}],"rounded-bl":[{"rounded-bl":[i]}],"border-w":[{border:[a]}],"border-w-x":[{"border-x":[a]}],"border-w-y":[{"border-y":[a]}],"border-w-s":[{"border-s":[a]}],"border-w-e":[{"border-e":[a]}],"border-w-t":[{"border-t":[a]}],"border-w-r":[{"border-r":[a]}],"border-w-b":[{"border-b":[a]}],"border-w-l":[{"border-l":[a]}],"border-opacity":[{"border-opacity":[w]}],"border-style":[{border:[...M(),"hidden"]}],"divide-x":[{"divide-x":[a]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[a]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[w]}],"divide-style":[{divide:M()}],"border-color":[{border:[s]}],"border-color-x":[{"border-x":[s]}],"border-color-y":[{"border-y":[s]}],"border-color-s":[{"border-s":[s]}],"border-color-e":[{"border-e":[s]}],"border-color-t":[{"border-t":[s]}],"border-color-r":[{"border-r":[s]}],"border-color-b":[{"border-b":[s]}],"border-color-l":[{"border-l":[s]}],"divide-color":[{divide:[s]}],"outline-style":[{outline:["",...M()]}],"outline-offset":[{"outline-offset":[Ar,ce]}],"outline-w":[{outline:[Ar,ds]}],"outline-color":[{outline:[t]}],"ring-w":[{ring:K()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[t]}],"ring-opacity":[{"ring-opacity":[w]}],"ring-offset-w":[{"ring-offset":[Ar,ds]}],"ring-offset-color":[{"ring-offset":[t]}],shadow:[{shadow:["","inner","none",hs,iL]}],"shadow-color":[{shadow:[dl]}],opacity:[{opacity:[w]}],"mix-blend":[{"mix-blend":[...R(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":R()}],filter:[{filter:["","none"]}],blur:[{blur:[n]}],brightness:[{brightness:[r]}],contrast:[{contrast:[c]}],"drop-shadow":[{"drop-shadow":["","none",hs,ce]}],grayscale:[{grayscale:[u]}],"hue-rotate":[{"hue-rotate":[d]}],invert:[{invert:[h]}],saturate:[{saturate:[b]}],sepia:[{sepia:[k]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[n]}],"backdrop-brightness":[{"backdrop-brightness":[r]}],"backdrop-contrast":[{"backdrop-contrast":[c]}],"backdrop-grayscale":[{"backdrop-grayscale":[u]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[d]}],"backdrop-invert":[{"backdrop-invert":[h]}],"backdrop-opacity":[{"backdrop-opacity":[w]}],"backdrop-saturate":[{"backdrop-saturate":[b]}],"backdrop-sepia":[{"backdrop-sepia":[k]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[o]}],"border-spacing-x":[{"border-spacing-x":[o]}],"border-spacing-y":[{"border-spacing-y":[o]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",ce]}],duration:[{duration:H()}],ease:[{ease:["linear","in","out","in-out",ce]}],delay:[{delay:H()}],animate:[{animate:["none","spin","ping","pulse","bounce",ce]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[_]}],"scale-x":[{"scale-x":[_]}],"scale-y":[{"scale-y":[_]}],rotate:[{rotate:[ul,ce]}],"translate-x":[{"translate-x":[N]}],"translate-y":[{"translate-y":[N]}],"skew-x":[{"skew-x":[S]}],"skew-y":[{"skew-y":[S]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",ce]}],accent:[{accent:["auto",t]}],appearance:[{appearance:["none","auto"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",ce]}],"caret-color":[{caret:[t]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":L()}],"scroll-mx":[{"scroll-mx":L()}],"scroll-my":[{"scroll-my":L()}],"scroll-ms":[{"scroll-ms":L()}],"scroll-me":[{"scroll-me":L()}],"scroll-mt":[{"scroll-mt":L()}],"scroll-mr":[{"scroll-mr":L()}],"scroll-mb":[{"scroll-mb":L()}],"scroll-ml":[{"scroll-ml":L()}],"scroll-p":[{"scroll-p":L()}],"scroll-px":[{"scroll-px":L()}],"scroll-py":[{"scroll-py":L()}],"scroll-ps":[{"scroll-ps":L()}],"scroll-pe":[{"scroll-pe":L()}],"scroll-pt":[{"scroll-pt":L()}],"scroll-pr":[{"scroll-pr":L()}],"scroll-pb":[{"scroll-pb":L()}],"scroll-pl":[{"scroll-pl":L()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}
vendor: 4,647 bytes, line 220
220],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",ce]}],fill:[{fill:[t,"none"]}],"stroke-w":[{stroke:[Ar,ds,Rp]}],stroke:[{stroke:[t,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}},uL=HO(cL);function Dt(...t){return uL(US(t))}const dL=mO,YS=m.forwardRef(({className:t,...e},n)=>l.jsx(RS,{ref:n,className:Dt("fixed top-0 z-[100] flex max-h-screen w-full flex-col-reverse p-4 sm:bottom-0 sm:right-0 sm:top-auto sm:flex-col md:max-w-[420px]",t),...e}));YS.displayName=RS.displayName;const hL=gO("group pointer-events-auto relative flex w-full items-center justify-between space-x-4 overflow-hidden rounded-md border p-6 pr-8 shadow-lg transition-all data-[swipe=cancel]:translate-x-0 data-[swipe=end]:translate-x-[var(--radix-toast-swipe-end-x)] data-[swipe=move]:translate-x-[var(--radix-toast-swipe-move-x)] data-[swipe=move]:transition-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[swipe=end]:animate-out data-[state=closed]:fade-out-80 data-[state=closed]:slide-out-to-right-full data-[state=open]:slide-in-from-top-full data-[state=open]:sm:slide-in-from-bottom-full",{variants:{variant:{default:"border bg-background text-foreground",destructive:"destructive group border-destructive bg-destructive text-destructive-foreground"}},defaultVariants:{variant:"default"}}),QS=m.forwardRef(({className:t,variant:e,...n},r)=>l.jsx(AS,{ref:r,className:Dt(hL({variant:e}),t),...n}));QS.displayName=AS.displayName;const fL=m.forwardRef(({className:t,...e},n)=>l.jsx(OS,{ref:n,className:Dt("inline-flex h-8 shrink-0 items-center justify-center rounded-md border bg-transparent px-3 text-sm font-medium ring-offset-background transition-colors group-[.destructive]:border-muted/40 hover:bg-secondary group-[.destructive]:hover:border-destructive/30 group-[.destructive]:hover:bg-destructive group-[.destructive]:hover:text-destructive-foreground focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 group-[.destructive]:focus:ring-destructive disabled:pointer-events-none disabled:opacity-50",t),...e}));fL.displayName=OS.displayName;const XS=m.forwardRef(({className:t,...e},n)=>l.jsx(LS,{ref:n,className:Dt("absolute right-2 top-2 rounded-md p-1 text-foreground
220/50 opacity-0 transition-opacity group-hover:opacity-100 group-[.destructive]:text-red-300 hover:text-foreground group-[.destructive]:hover:text-red-50 focus:opacity-100 focus:outline-none focus:ring-2 group-[.destructive]:focus:ring-red-400 group-[.destructive]:focus:ring-offset-red-600",t),"toast-close":"",...e,children:l.jsx(In,{className:"h-4 w-4"})}));XS.displayName=LS.displayName;const JS=m.forwardRef(({className:t,...e},n)=>l.jsx(DS,{ref:n,className:Dt("text-sm font-semibold",t),...e}));JS.displayName=DS.displayName;const ZS=m.forwardRef(({className:t,...e},n)=>l.jsx(MS,{ref:n,className:Dt("text-sm opacity-90",t),...e}));ZS.displayName=MS.displayName;function pL(){const{toasts:t}=EM();return l.jsxs(dL,{children:[t.map(function({id:e,title:n,description:r,action:s,...i}){return l.jsxs(QS,{...i,children:[l.jsxs("div",{className:"grid gap-1",children:[n&&l.jsx(JS,{children:n}),r&&l.jsx(ZS,{children:r})]}),s,l.jsx(XS,{})]},e)}),l.jsx(YS,{})]})}var hb=["light","dark"],mL="(prefers-color-scheme: dark)",gL=m.createContext(void 0),yL={setTheme:t=>{},themes:[]},vL=()=>{var t;return(t=m.useContext(gL))!=null?t:yL};m.memo(({forcedTheme:t,storageKey:e,attribute:n,enableSystem:r,enableColorScheme:s,defaultTheme:i,value:o,attrs:a,nonce:c})=>{let u=i==="system",d=n==="class"?`var d=document.documentElement,c=d.classList;${`c.remove(${a.map(x=>`'${x}'`).join(",")})`};`:`var d=document.documentElement,n='${n}',s='setAttribute';`,h=s?hb.includes(i)&&i?`if(e==='light'||e==='dark'||!e)d.style.colorScheme=e||'${i}'`:"if(e==='light'||e==='dark')d.style.colorScheme=e":"",f=(x,g=!1,y=!0)=>{let w=o?o[x]:x,v=g?x+"|| ''":`'${w}'`,b="";return s&&y&&!g&&hb.includes(x)&&(b+=`d.style.colorScheme = '${x}';`),n==="class"?g||w?b+=`c.add(${v})`:b+="null":w&&(b+=`d[s](n,${v})`),b},p=t?`!function(){${d}${f(t)}}()`:r?`!function(){try{${d}var e=localStorage.getItem('${e}');if('system'===e||(!e&&${u})){var t='${mL}',m=window.matchMedia(t);if(m.media!==t||m.matches){${f("dark")}}else{${f("light")}}}else if(e){${o?`var x=${JSON.stringify(o)};`:""}${f(o?"x[e]":"e",!0)}}${u?"":"else{"+f(i,!1,!1)+"}"}${h}}catch(e){}}()`:`!function(){try{${d}var e=localStorage.getItem('${e}');if(e){${o?`var x=${JSON.stringify(o)};`:""}${f(o?"x[e]":"e",!0)}}else{${f(i,!1,!1)};}${h}}catch(t){}}();`;return m.createElement("script",{nonce:c,dangerouslySetInnerHTML:{__html:p}})});var xL=t=>{switch(t){case"success":return _L;case"info":return EL;case"warning":return kL;case"error":return CL;default:return null}},wL=Array(12).fill(0),bL=({visible:t,className:e})=>V.createElement("div",{className:["sonner-loading-wrapper",e].filter(Boolean).join(" "),"data-visible":t},V.createElement("div",{className:"sonner-spinner"},wL.map((n,r)=>V.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${r}`})))),_L=V.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},V.createElement("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z",clipRule:"evenodd"})),kL=V.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20"},V.createElement("path",{fillRule:"evenodd",d:"M9.401 3.003c1.155-2 4.043-2 5.197 0l7.355 12.748c1.154 2-.29 4.5-2.599 4.5H4.645c-2.309 0-3.752-2.5-2.598-4.5L9.4 3.003zM12 8.25a.75.75 0 01.75.75v3.75a.75.75 0 01-1.5 0V9a.75.75 0 01.75-.75zm0 8.25a.75.75 0 100-1.5.75.75 0 000 1.5z",clipRule:"evenodd"})),EL=V.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},V.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a.75.75 0 000 1.5h.253a.25.25 0 01.244.304l-.459 2.066A1.75 1.75 0 0010.747 15H11a.75.75 0 000-1.5h-.253a.25.25 0 01-.244-.304l.459-2.066A1.75 1.75 0 009.253 9H9z",clipRule:"evenodd"})),CL=V.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},V.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z",clipRule:"evenodd"})),SL=V.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"},V.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),V.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"})),NL=()=>{let[t,e]=V.useState(document.hidden);return V.useEffect(()=>{let n=()=>{e(document.hidden)};
220return document.addEventListener("visibilitychange",n),()=>window.removeEventListener("visibilitychange",n)},[]),t},Ng=1,TL=class{constructor(){this.subscribe=t=>(this.subscribers.push(t),()=>{let e=this.subscribers.indexOf(t);this.subscribers.splice(e,1)}),this.publish=t=>{this.subscribers.forEach(e=>e(t))},this.addToast=t=>{this.publish(t),this.toasts=[...this.toasts,t]},this.create=t=>{var e;let{message:n,...r}=t,s=typeof(t==null?void 0:t.id)=="number"||((e=t.id)==null?void 0:e.length)>0?t.id:Ng++,i=this.toasts.find(a=>a.id===s),o=t.dismissible===void 0?!0:t.dismissible;return this.dismissedToasts.has(s)&&this.dismissedToasts.delete(s),i?this.toasts=this.toasts.map(a=>a.id===s?(this.publish({...a,...t,id:s,title:n}),{...a,...t,id:s,dismissible:o,title:n}):a):this.addToast({title:n,...r,dismissible:o,id:s}),s},this.dismiss=t=>(this.dismissedToasts.add(t),t||this.toasts.forEach(e=>{this.subscribers.forEach(n=>n({id:e.id,dismiss:!0}))}),this.subscribers.forEach(e=>e({id:t,dismiss:!0})),t),this.message=(t,e)=>this.create({...e,message:t}),this.error=(t,e)=>this.create({...e,message:t,type:"error"}),this.success=(t,e)=>this.create({...e,type:"success",message:t}),this.info=(t,e)=>this.create({...e,type:"info",message:t}),this.warning=(t,e)=>this.create({...e,type:"warning",message:t}),this.loading=(t,e)=>this.create({...e,type:"loading",message:t}),this.promise=(t,e)=>{if(!e)return;let n;e.loading!==void 0&&(n=this.create({...e,promise:t,type:"loading",message:e.loading,description:typeof e.description!="function"?e.description:void 0}));let r=t instanceof Promise?t:t(),s=n!==void 0,i,o=r.then(async c=>{if(i=["resolve",c],V.isValidElement(c))s=!1,this.create({id:n,type:"default",message:c});else if(PL(c)&&!c.ok){s=!1;let u=typeof e.error=="function"?await e.error(`HTTP error! status: ${c.status}`):e.error,d=typeof e.description=="function"?await e.description(`HTTP error! status: ${c.status}`):e.description;this.create({id:n,type:"error",message:u,description:d})}else if(e.success!==void 0){s=!1;let u=typeof e.success=="function"?await e.success(c):e.success,d=typeof e.description=="function"?await e.description(c):e.description;this.create({id:n,type:"success",message:u,description:d})}}).catch(async c=>{if(i=["reject",c],e.error!==void 0){s=!1;let u=typeof e.error=="function"?await e.error(c):e.error,d=typeof e.description=="function"?await e.description(c):e.description;this.create({id:n,type:"error",message:u,description:d})}}).finally(()=>{var c;s&&(this.dismiss(n),n=void 0),(c=e.finally)==null||c.call(e)}),a=()=>new Promise((c,u)=>o.then(()=>i[0]==="reject"?u(i[1]):c(i[1])).catch(u));return typeof n!="string"&&typeof n!="number"?{unwrap:a}:Object.assign(n,{unwrap:a})},this.custom=(t,e)=>{let n=(e==null?void 0:e.id)||Ng++;return this.create({jsx:t(n),id:n,...e}),n},this.getActiveToasts=()=>this.toasts.filter(t=>!this.dismissedToasts.has(t.id)),this.subscribers=[],this.toasts=[],this.dismissedToasts=new Set}},Gt=new TL,IL=(t,e)=>{let n=(e==null?void 0:e.id)||Ng++;return Gt.addToast({title:t,...e,id:n}),n},PL=t=>t&&typeof t=="object"&&"ok"in t&&typeof t.ok=="boolean"&&"status"in t&&typeof t.status=="number",jL=IL,RL=()=>Gt.toasts,AL=()=>Gt.getActiveToasts();Object.assign(jL,{success:Gt.success,info:Gt.info,warning:Gt.warning,error:Gt.error,custom:Gt.custom,message:Gt.message,promise:Gt.promise,dismiss:Gt.dismiss,loading:Gt.loading},{getHistory:RL,getToasts:AL});function DL(t,{insertAt:e}={}){if(typeof document>"u")return;let n=document.head||document.getElementsByTagName("head")[0],r=document.createElement("style");r.type="text/css",e==="top"&&n.firstChild?n.insertBefore(r,n.firstChild):n.appendChild(r),r.styleSheet?r.styleSheet.cssText=t:r.appendChild(document.createTextNode(t))}DL(`:where(html[dir="ltr"]),:where([data-sonner-toaster][dir="ltr"]){--toast-icon-margin-start: -3px;--toast-icon-margin-end: 4px;--toast-svg-margin-start: -1px;--toast-svg-margin-end: 0px;--toast-button-margin-start: auto;--toast-button-margin-end: 0;--toast-close-button-start: 0;--toast-close-button-end: unset;--toast-close-button-transform: translate(-35%, -35%)}:where(html[dir="rtl"]),:where([data-sonner-toaster][dir="rtl"]){--toast-icon-margin-start: 4px;--toast-icon-margin-end: -3px;--toast-svg-margin-start: 0px;--toast-svg-margin-end: -1px;--toast-button-margin-start: 0;--toast-button-margin-end: auto;--toast-close-button-start: unset;--toast-close-button-end: 0;--toast-close-button-transform: translate(35%, -35%)}:where([data-sonner-toaster]){position:fixed;width:var(--width);font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;--gray1: hsl(0, 0%, 99%);--gray2: hsl(0, 0%, 97.3%);--gray3: hsl(0, 0%, 95.1%);--gray4: hsl(0, 0%, 93%);--gray5: hsl(0, 0%, 90.9%);--gray6: hsl(0, 0%, 88.7%);--gray7: hsl(0, 0%, 85.8%);--gray8: hsl(0, 0%, 78%);--gray9: hsl(0, 0%, 56.1%);--gray10: hsl(0, 0%, 52.3%);--gray11: hsl(0, 0%, 43.5%);--gray12: hsl(0, 0%, 9%);--border-radius: 8px;box-sizing:border-box;padding:0;margin:0;list-style:none;outline:none;z-index:999999999;transition:transform .4s ease}:where([data-sonner-toaster][data-lifted="true"]){transform:translateY(-10px)}@media (hover: none) and (pointer: coarse){:where([data-sonner-toaster][data-lifted="true"]){transform:none}}:where([data-sonner-toaster][data-x-position="right"]){right:var(--offset-right)}:where([data-sonner-toaster][data-x-position="left"]){left:var(--offset-left)}:where([data-sonner-toaster][data-x-position="center"]){left:50%;transform:translate(-50%)}:where([data-sonner-toaster][data-y-position="top"]){top:var(--offset-top)}:where([data-sonner-toaster][data-y-position="bottom"]){bottom:var(--offset-bottom)}:where([data-sonner-toast]){--y: translateY(100%);--lift-amount: calc(var(--lift) * var(--gap));z-index:var(--z-index);position:absolute;opacity:0;transform:var(--y);filter:blur(0);touch-action:none;transition:transform .4s,opacity .4s,height .4s,box-shadow .2s;box-sizing:border-box;outline:none;overflow-wrap:anywhere}:where([data-sonner-toast][data-styled="true"]){padding:16px;background:var(--normal-bg);border:1px solid var(--normal-border);color:var(--normal-text);border-radius:var(--border-radius);box-shadow:0 4px 12px #0000001a;width:var(--width);font-size:13px;display:flex;align-items:center;gap:6px}:where([data-sonner-toast]:focus-visible){box-shadow:0 4px 12px #0000001a,0 0 0 2px #0003}:where([data-sonner-toast][data-y-position="top"]){top:0;--y: translateY(-100%);--lift: 1;--lift-amount: calc(1 * var(--gap))}:where([data-sonner-toast][data-y-position="bottom"]){bottom:0;--y: translateY(100%);--lift: -1;--lift-amount: calc(var(--lift) * var(--gap))}:where([data-sonner-toast]) :where([data-description]){font-weight:400;line-height:1.4;color:inherit}:where([data-sonner-toast]) :where([data-title]){font-weight:500;line-height:1.5;color:inherit}:where([data-sonner-toast]) :where([data-icon]){display:flex;height:16px;width:16px;position:relative;justify-content:flex-start;align-items:center;flex-shrink:0;margin-left:var(--toast-icon-margin-start);margin-right:var(--toast-icon-margin-end)}:where([data-sonner-toast][data-promise="true"]) :where([data-icon])>svg{opacity:0;transform:scale(.8);transform-origin:center;animation:sonner-fade-in .3s ease forwards}:where([data-sonner-toast]) :where([data-icon])>*{flex-shrink:0}:where([data-sonner-toast]) :where([data-icon]) svg{margin-left:var(--toast-svg-margin-start);margin-right:var(--toast-svg-margin-end)}:where([data-sonner-toast]) :where([data-content]){display:flex;flex-direction:column;gap:2px}[data-sonner-toast][data-styled=true] [data-button]{border-radius:4px;padding-left:8px;padding-right:8px;height:24px;font-size:12px;color:var(--normal-bg);background:var(--normal-text);margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end);border:none;cursor:pointer;outline:none;display:flex;align-items:center;flex-shrink:0;transition:opacity .4s,box-shadow .2s}:where([data-sonner-toast]) :where([data-button]):focus-visible{box-shadow:0 0 0 2px #0006}:where([data-sonner-toast]) :where([data-button]):first-of-type{margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end)}:where([data-sonner-toast]) :where([data-cancel]){color:var(--normal-text);background:rgba(0,0,0,.08)}:where([data-sonner-toast][data-theme="dark"]) :where([data-cancel]){background:rgba(255,255,255,.3)}:where([data-sonner-toast]) :where([data-close-button]){position:absolute;
220left:var(--toast-close-button-start);right:var(--toast-close-button-end);top:0;height:20px;width:20px;display:flex;justify-content:center;align-items:center;padding:0;color:var(--gray12);border:1px solid var(--gray4);transform:var(--toast-close-button-transform);border-radius:50%;cursor:pointer;z-index:1;transition:opacity .1s,background .2s,border-color .2s}[data-sonner-toast] [data-close-button]{background:var(--gray1)}:where([data-sonner-toast]) :where([data-close-button]):focus-visible{box-shadow:0 4px 12px #0000001a,0 0 0 2px #0003}:where([data-sonner-toast]) :where([data-disabled="true"]){cursor:not-allowed}:where([data-sonner-toast]):hover :where([data-close-button]):hover{background:var(--gray2);border-color:var(--gray5)}:where([data-sonner-toast][data-swiping="true"]):before{content:"";position:absolute;left:-50%;right:-50%;height:100%;z-index:-1}:where([data-sonner-toast][data-y-position="top"][data-swiping="true"]):before{bottom:50%;transform:scaleY(3) translateY(50%)}:where([data-sonner-toast][data-y-position="bottom"][data-swiping="true"]):before{top:50%;transform:scaleY(3) translateY(-50%)}:where([data-sonner-toast][data-swiping="false"][data-removed="true"]):before{content:"";position:absolute;inset:0;transform:scaleY(2)}:where([data-sonner-toast]):after{content:"";position:absolute;left:0;height:calc(var(--gap) + 1px);bottom:100%;width:100%}:where([data-sonner-toast][data-mounted="true"]){--y: translateY(0);opacity:1}:where([data-sonner-toast][data-expanded="false"][data-front="false"]){--scale: var(--toasts-before) * .05 + 1;--y: translateY(calc(var(--lift-amount) * var(--toasts-before))) scale(calc(-1 * var(--scale)));height:var(--front-toast-height)}:where([data-sonner-toast])>*{transition:opacity .4s}:where([data-sonner-toast][data-expanded="false"][data-front="false"][data-styled="true"])>*{opacity:0}
220:where([data-sonner-toast][data-visible="false"]){opacity:0;pointer-events:none}:where([data-sonner-toast][data-mounted="true"][data-expanded="true"]){--y: translateY(calc(var(--lift) * var(--offset)));height:var(--initial-height)}:where([data-sonner-toast][data-removed="true"][data-front="true"][data-swipe-out="false"]){--y: translateY(calc(var(--lift) * -100%));opacity:0}:where([data-sonner-toast][data-removed="true"][data-front="false"][data-swipe-out="false"][data-expanded="true"]){--y: translateY(calc(var(--lift) * var(--offset) + var(--lift) * -100%));opacity:0}:where([data-sonner-toast][data-removed="true"][data-front="false"][data-swipe-out="false"][data-expanded="false"]){--y: translateY(40%);opacity:0;transition:transform .5s,opacity .2s}:where([data-sonner-toast][data-removed="true"][data-front="false"]):before{height:calc(var(--initial-height) + 20%)}[data-sonner-toast][data-swiping=true]{transform:var(--y) translateY(var(--swipe-amount-y, 0px)) translate(var(--swipe-amount-x, 0px));transition:none}[data-sonner-toast][data-swiped=true]{user-select:none}[data-sonner-toast][data-swipe-out=true][data-y-position=bottom],[data-sonner-toast][data-swipe-out=true][data-y-position=top]{animation-duration:.2s;animation-timing-function:ease-out;animation-fill-mode:forwards}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=left]{animation-name:swipe-out-left}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=right]{animation-name:swipe-out-right}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=up]{animation-name:swipe-out-up}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=down]{animation-name:swipe-out-down}@keyframes swipe-out-left{0%{transform:var(--y) translate(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translate(calc(var(--swipe-amount-x) - 100%));opacity:0}}@keyframes swipe-out-right{0%{transform:var(--y) translate(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translate(calc(var(--swipe-amount-x) + 100%));opacity:0}}@keyframes swipe-out-up{0%{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) - 100%));opacity:0}}@keyframes swipe-out-down{0%{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) + 100%));opacity:0}}@media (max-width: 600px){[data-sonner-toaster]{position:fixed;right:var(--mobile-offset-right);left:var(--mobile-offset-left);width:100%}[data-sonner-toaster][dir=rtl]{left:calc(var(--mobile-offset-left) * -1)}[data-sonner-toaster] [data-sonner-toast]{left:0;right:0;width:calc(100% - var(--mobile-offset-left) * 2)}[data-sonner-toaster][data-x-position=left]{left:var(--mobile-offset-left)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--mobile-offset-bottom)}[data-sonner-toaster][data-y-position=top]{top:var(--mobile-offset-top)}[data-sonner-toaster][data-x-position=center]{left:var(--mobile-offset-left);right:var(--mobile-offset-right);transform:none}}[data-sonner-toaster][data-theme=light]{--normal-bg: #fff;--normal-border: var(--gray4);--normal-text: var(--gray12);--success-bg: hsl(143, 85%, 96%);--success-border: hsl(145, 92%, 91%);--success-text: hsl(140, 100%, 27%);--info-bg: hsl(208, 100%, 97%);--info-border: hsl(221, 91%, 91%);--info-text: hsl(210, 92%, 45%);--warning-bg: hsl(49, 100%, 97%);--warning-border: hsl(49, 91%, 91%);--warning-text: hsl(31, 92%, 45%);--error-bg: hsl(359, 100%, 97%);--error-border: hsl(359, 100%, 94%);--error-text: hsl(360, 100%, 45%)}[data-sonner-toaster][data-theme=light] [data-sonner-toast][data-invert=true]{--normal-bg: #000;--normal-border: hsl(0, 0%, 20%);--normal-text: var(--gray1)}[data-sonner-toaster][data-theme=dark] [data-sonner-toast][data-invert=true]{--normal-bg: #fff;--normal-border: var(--gray3);--normal-text: var(--gray12)}[data-sonner-toaster][data-theme=dark]{--normal-bg: #000;--normal-bg-hover: hsl(0, 0%, 12%);--normal-border: hsl(0, 0%, 20%);--normal-border-hover: hsl(0, 0%, 25%);--normal-text: var(--gray1);--success-bg: hsl(150, 100%, 6%);--success-border: hsl(147, 100%, 12%);--success-text: hsl(150, 86%, 65%);--info-bg: hsl(215, 100%, 6%);--info-border: hsl(223, 100%, 12%);--info-text: hsl(216, 87%, 65%);--warning-bg: hsl(64, 100%, 6%);--warning-border: hsl(60, 100%, 12%);--warning-text: hsl(46, 87%, 65%);--error-bg: hsl(358, 76%, 10%);--error-border: hsl(357, 89%, 16%);
220--error-text: hsl(358, 100%, 81%)}[data-sonner-toaster][data-theme=dark] [data-sonner-toast] [data-close-button]{background:var(--normal-bg);border-color:var(--normal-border);color:var(--normal-text)}[data-sonner-toaster][data-theme=dark] [data-sonner-toast] [data-close-button]:hover{background:var(--normal-bg-hover);border-color:var(--normal-border-hover)}[data-rich-colors=true][data-sonner-toast][data-type=success],[data-rich-colors=true][data-sonner-toast][data-type=success] [data-close-button]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=info],[data-rich-colors=true][data-sonner-toast][data-type=info] [data-close-button]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning],[data-rich-colors=true][data-sonner-toast][data-type=warning] [data-close-button]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=error],[data-rich-colors=true][data-sonner-toast][data-type=error] [data-close-button]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}.sonner-loading-wrapper{--size: 16px;height:var(--size);width:var(--size);position:absolute;inset:0;z-index:10}.sonner-loading-wrapper[data-visible=false]{transform-origin:center;animation:sonner-fade-out .2s ease forwards}.sonner-spinner{position:relative;top:50%;left:50%;height:var(--size);width:var(--size)}.sonner-loading-bar{animation:sonner-spin 1.2s linear infinite;background:var(--gray11);border-radius:6px;height:8%;left:-10%;position:absolute;top:-3.9%;width:24%}.sonner-loading-bar:nth-child(1){animation-delay:-1.2s;transform:rotate(.0001deg) translate(146%)}.sonner-loading-bar:nth-child(2){animation-delay:-1.1s;transform:rotate(30deg) translate(146%)}.sonner-loading-bar:nth-child(3){animation-delay:-1s;transform:rotate(60deg) translate(146%)}.sonner-loading-bar:nth-child(4){animation-delay:-.9s;transform:rotate(90deg) translate(146%)}.sonner-loading-bar:nth-child(5){animation-delay:-.8s;transform:rotate(120deg) translate(146%)}.sonner-loading-bar:nth-child(6){animation-delay:-.7s;transform:rotate(150deg) translate(146%)}.sonner-loading-bar:nth-child(7){animation-delay:-.6s;transform:rotate(180deg) translate(146%)}.sonner-loading-bar:nth-child(8){animation-delay:-.5s;transform:rotate(210deg) translate(146%)}.sonner-loading-bar:nth-child(9){animation-delay:-.4s;transform:rotate(240deg) translate(146%)}.sonner-loading-bar:nth-child(10){animation-delay:-.3s;transform:rotate(270deg) translate(146%)}.sonner-loading-bar:nth-child(11){animation-delay:-.2s;transform:rotate(300deg) translate(146%)}.sonner-loading-bar:nth-child(12){animation-delay:-.1s;transform:rotate(330deg) translate(146%)}@keyframes sonner-fade-in{0%{opacity:0;transform:scale(.8)}to{opacity:1;transform:scale(1)}}@keyframes sonner-fade-out{0%{opacity:1;transform:scale(1)}to{opacity:0;transform:scale(.8)}}@keyframes sonner-spin{0%{opacity:1}to{opacity:.15}}@media (prefers-reduced-motion){[data-sonner-toast],[data-sonner-toast]>*,.sonner-loading-bar{transition:none!important;animation:none!important}}.sonner-loader{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);transform-origin:center;transition:opacity .2s,transform .2s}.sonner-loader[data-visible=false]{opacity:0;transform:scale(.8) translate(-50%,-50%)} 221`);function ju(t){return t.label!==void 0}var ML=3,OL="32px",LL="16px",fb=4e3,FL=356,UL=14,BL=20,VL=200;function On(...t){return t.filter(Boolean).join(" ")}function $L(t){let[e,n]=t.split("-"),r=[];return e&&r.push(e),n&&r.push(n),r}var zL=t=>{var e,n,r,s,i,o,a,c,u,d,h;let{invert:f,toast:p,unstyled:x,interacting:g,setHeights:y,visibleToasts:w,heights:v,index:b,toasts:_,expanded:k,removeToast:S,defaultRichColors:C,closeButton:N,style:P,cancelButtonStyle:j,actionButtonStyle:O,className:L="",descriptionClassName:K="",duration:U,position:A,gap:M,loadingIcon:R,expandByDefault:E,classNames:T,icons:I,closeButtonAriaLabel:H="Close toast",pauseWhenPageIsHidden:
vendor: 2,327 bytes, line 221
221Q}=t,[ne,z]=V.useState(null),[ue,Fe]=V.useState(null),[me,or]=V.useState(!1),[pn,mn]=V.useState(!1),[W,X]=V.useState(!1),[_e,_t]=V.useState(!1),[ar,jn]=V.useState(!1),[F,G]=V.useState(0),[se,ie]=V.useState(0),rt=V.useRef(p.duration||U||fb),Xe=V.useRef(null),ut=V.useRef(null),tl=b===0,Zf=b+1<=w,gn=p.type,po=p.dismissible!==!1,BA=p.className||"",VA=p.descriptionClassName||"",uu=V.useMemo(()=>v.findIndex(ae=>ae.toastId===p.id)||0,[v,p.id]),$A=V.useMemo(()=>{var ae;return(ae=p.closeButton)!=null?ae:N},[p.closeButton,N]),$0=V.useMemo(()=>p.duration||U||fb,[p.duration,U]),ep=V.useRef(0),mo=V.useRef(0),z0=V.useRef(0),go=V.useRef(null),[zA,WA]=A.split("-"),W0=V.useMemo(()=>v.reduce((ae,Ce,Me)=>Me>=uu?ae:ae+Ce.height,0),[v,uu]),H0=NL(),HA=p.invert||f,tp=gn==="loading";mo.current=V.useMemo(()=>uu*M+W0,[uu,W0]),V.useEffect(()=>{rt.current=$0},[$0]),V.useEffect(()=>{or(!0)},[]),V.useEffect(()=>{let ae=ut.current;if(ae){let Ce=ae.getBoundingClientRect().height;return ie(Ce),y(Me=>[{toastId:p.id,height:Ce,position:p.position},...Me]),()=>y(Me=>Me.filter(Rn=>Rn.toastId!==p.id))}},[y,p.id]),V.useLayoutEffect(()=>{if(!me)return;let ae=ut.current,Ce=ae.style.height;ae.style.height="auto";let Me=ae.getBoundingClientRect().height;ae.style.height=Ce,ie(Me),y(Rn=>Rn.find(An=>An.toastId===p.id)?Rn.map(An=>An.toastId===p.id?{...An,height:Me}:An):[{toastId:p.id,height:Me,position:p.position},...Rn])},[me,p.title,p.description,y,p.id]);let as=V.useCallback(()=>{mn(!0),G(mo.current),y(ae=>ae.filter(Ce=>Ce.toastId!==p.id)),setTimeout(()=>{S(p)},VL)},[p,S,y,mo]);V.useEffect(()=>{if(p.promise&&gn==="loading"||p.duration===1/0||p.type==="loading")return;let ae;return k||g||Q&&H0?(()=>{if(z0.current<ep.current){let Ce=new Date().getTime()-ep.current;rt.current=rt.current-Ce}z0.current=new Date().getTime()})():rt.current!==1/0&&(ep.current=new Date().getTime(),ae=setTimeout(()=>{var Ce;(Ce=p.onAutoClose)==null||Ce.call(p,p),as()},rt.current)),()=>clearTimeout(ae)},[k,g,p,gn,Q,H0,as]),V.useEffect(()=>{p.delete&&as()},[as,p.delete]);function KA(){var ae,Ce,Me;return I!=null&&I.loading?V.createElement("div",{className:On(T==null?void 0:T.loader,(ae=p==null?void 0:p.classNames)==null?void 0:ae.loader,"sonner-loader"),"data-visible":gn==="loading"},I.loading):R?V.createElement("div",{className:On(T==null?void 0:T.loader,(Ce
221=p==null?void 0:p.classNames)==null?void 0:Ce.loader,"sonner-loader"),"data-visible":gn==="loading"},R):V.createElement(bL,{className:On(T==null?void 0:T.loader,(Me=p==null?void 0:p.classNames)==null?void 0:Me.loader),visible:gn==="loading"})}return V.createElement("li",{tabIndex:0,ref:ut,className:On(L,BA,T==null?void 0:T.toast,(e=p==null?void 0:p.classNames)==null?void 0:e.toast,T==null?void 0:T.default,T==null?void 0:T[gn],(n=p==null?void 0:p.classNames)==null?void 0:n[gn]),"data-sonner-toast":"","data-rich-colors":(r=p.richColors)!=null?r:C,"data-styled":!(p.jsx||p.unstyled||x),"data-mounted":me,"data-promise":!!p.promise,"data-swiped":ar,"data-removed":pn,"data-visible":Zf,"data-y-position":zA,"data-x-position":WA,"data-index":b,"data-front":tl,"data-swiping":W,"data-dismissible":po,"data-type":gn,"data-invert":HA,"data-swipe-out":_e,"data-swipe-direction":ue,"data-expanded":!!(k||E&&me),style:{"--index":b,"--toasts-before":b,"--z-index":_.length-b,"--offset":`${pn?F:mo.current}px`,"--initial-height":E?"auto":`${se}px`,...P,...p.style},onDragEnd:()=>{X(!1),z(null),go.current=null},onPointerDown:ae=>{tp||!po||(Xe.current=new Date,G(mo.current),ae.target.setPointerCapture(ae.pointerId),ae.target.tagName!=="BUTTON"&&(X(!0),go.current={x:ae.clientX,y:ae.clientY}))},onPointerUp:()=>{var ae,Ce,Me,Rn;if(_e||!po)return;go.current=null;let An=Number(((ae=ut.current)==null?void 0:ae.style.getPropertyValue("--swipe-amount-x").replace("px",""))||0),ls=Number(((Ce=ut.current)==null?void 0:Ce.style.getPropertyValue("--swipe-amount-y").replace("px",""))||0),xi=new Date().getTime()-((Me=Xe.current)==null?void 0:Me.getTime()),Dn=ne==="x"?An:ls,cs=Math.abs(Dn)/xi;if(Math.abs(Dn)>=BL||cs>.11){G(mo.current),(Rn=p.onDismiss)==null||Rn.call(p,p),Fe(ne==="x"?An>0?"right":"left":ls>0?"down":"up"),as(),_t(!0),jn(!1);return}X(!1),z(null)},onPointerMove:ae=>{var Ce,Me,Rn,An;if(!go.current||!po||((Ce=window.getSelection())==null?void 0:Ce.toString().length)>0)return;let ls=ae.clientY-go.current.y,xi=ae.clientX-go.current.x,Dn=(Me=t.swipeDirections)!=null?Me:$L(A);!ne&&(Math.abs(xi)>1||Math.abs(ls)>1)&&z(Math.abs(xi)>Math.abs(ls)?"x":"y");let cs={x:0,y:0};ne==="y"?(Dn.includes("top")||Dn.includes("bottom"))&&(Dn.includes("top")&&ls<0||Dn.includes("bottom")&&ls>0)&&(cs.y=ls):ne==="x"&&(Dn.includes("left")||Dn.includes("right"))&&(Dn.includes("left")&&xi<0||Dn.includes("right")&&xi>0)&&(cs.x=xi),(Math.abs(cs.x)>0||Math.abs(cs.y)>0)&&jn(!0),(Rn=ut.current)==null||Rn.style.setProperty("--swipe-amount-x",`${cs.x}px`),(An=ut.current)==null||An.style.setProperty("--swipe-amount-y",`${cs.y}px`)}},$A&&!p.jsx?V.createElement("button",{"aria-label":H,"data-disabled":tp,"data-close-button":!0,onClick:tp||!po?()=>{}:()=>{var ae;as(),(ae=p.onDismiss)==null||ae.call(p,p)},className:On(T==null?void 0:T.closeButton,(s=p==null?void 0:p.classNames)==null?void 0:s.closeButton)},(i=I==null?void 0:I.close)!=null?i:SL):null,p.jsx||m.isValidElement(p.title)?p.jsx?p.jsx:typeof p.title=="function"?p.title():p.title:V.createElement(V.Fragment,null,gn||p.icon||p.promise?V.createElement("div",{"data-icon":"",className:On(T==null?void 0:T.icon,(o=p==null?void 0:p.classNames)==null?void 0:o.icon)},p.promise||p.type==="loading"&&!p.icon?p.icon||KA():null,p.type!=="loading"?p.icon||(I==null?void 0:I[gn])||xL(gn):null):null,V.createElement("div",{"data-content":"",className:On(T==null?void 0:T.content,(a=p==null?void 0:p.classNames)==null?void 0:a.content)},V.createElement("div",{"data-title":"",className:On(T==null?void 0:T.title,(c=p==null?void 0:p.classNames)==null?void 0:c.title)},typeof p.title=="function"?p.title():p.title),p.description?V.createElement("div",{"data-description":"",className:On(K,VA,T==null?void 0:T.description,(u=p==null?void 0:p.classNames)==null?void 0:u.description)},typeof p.description=="function"?p.description():p.description):null),m.isValidElement(p.cancel)?p.cancel:p.cancel&&ju(p.cancel)?V.createElement("button",{"data-button":!0,"data-cancel":!0,style:p.cancelButtonStyle||j,onClick:ae=>{var Ce,Me;ju(p.cancel)&&po&&((Me=(Ce=p.cancel).onClick)==null||Me.call(Ce,ae),as())},className:On(T==null?void 0:T.cancelButton,(d=p==null?void 0:p.classNames)==null?void 0:d.cancelButton)},p.cancel.label):null,m.isValidElement(p.action)?p.action:p.action&&ju(p.action)?V.createElement("button",{"data-button":!0,"data-action":!0,style:p.actionButtonStyle||O,onClick:ae=>{var Ce,Me;ju(p.action)&&((Me=(Ce=p.action).onClick)==null||Me.call(Ce,ae),!ae.defaultPrevented&&as())},className:On(T==null?void 0:T.actionButton,(h=p==null?void 0:p.classNames)==null?void 0:h.actionButton)},p.action.label):null))};function pb(){if(typeof window>"u"||typeof document>"u")return"ltr";let t=document.documentElement.getAttribute("dir");return t==="auto"||!t?window.getComputedStyle(document.documentElement).direction:t}function WL(t,e){let n={};return[t,e].forEach((r,s)=>{let i=s===1,o=i?"--mobile-offset":"--offset",a=i?LL:OL;function c(u){["top","right","bottom","left"].forEach(d=>{n[`${o}-${d}`]=typeof u=="number"?`${u}px`:u})}typeof r=="number"||typeof r=="string"?c(r):typeof r=="object"?["top","right","bottom","left"].forEach(u=>{r[u]===void 0?n[`${o}-${u}`]=a:n[`${o}-${u}`]=typeof r[u]=="number"?`${r[u]}px`:r[u]}):c(a)}),n}var HL=m.forwardRef(function(t,e){let{invert:n,position:r="bottom-right",hotkey:s=["altKey","KeyT"],expand:i,closeButton:o,className:a,offset:c,mobileOffset:u,theme:d="light",richColors:h,duration:f,style:p,visibleToasts:x=ML,toastOptions:g,dir:y=pb(),gap:w=UL,loadingIcon:v,icons:b,containerAriaLabel:_="Notifications",pauseWhenPageIsHidden:k}=t,[S,C]=V.useState([]),N=V.useMemo(()=>Array.from(new Set([r].concat(S.filter(Q=>Q.position).map(Q=>Q.position)))),[S,r]),[P,j]=V.useState([]),[O,L]=V.useState(!1),[K,U]=V.useState(!1),[A,M]=V.useState(d!=="system"?d:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dar
221k":"light"),R=V.useRef(null),E=s.join("+").replace(/Key/g,"").replace(/Digit/g,""),T=V.useRef(null),I=V.useRef(!1),H=V.useCallback(Q=>{C(ne=>{var z;return(z=ne.find(ue=>ue.id===Q.id))!=null&&z.delete||Gt.dismiss(Q.id),ne.filter(({id:ue})=>ue!==Q.id)})},[]);return V.useEffect(()=>Gt.subscribe(Q=>{if(Q.dismiss){C(ne=>ne.map(z=>z.id===Q.id?{...z,delete:!0}:z));return}setTimeout(()=>{uS.flushSync(()=>{C(ne=>{let z=ne.findIndex(ue=>ue.id===Q.id);return z!==-1?[...ne.slice(0,z),{...ne[z],...Q},...ne.slice(z+1)]:[Q,...ne]})})})}),[]),V.useEffect(()=>{if(d!=="system"){M(d);return}if(d==="system"&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?M("dark"):M("light")),typeof window>"u")return;let Q=window.matchMedia("(prefers-color-scheme: dark)");try{Q.addEventListener("change",({matches:ne})=>{M(ne?"dark":"light")})}catch{Q.addListener(({matches:z})=>{try{M(z?"dark":"light")}catch(ue){console.error(ue)}})}},[d]),V.useEffect(()=>{S.length<=1&&L(!1)},[S]),V.useEffect(()=>{let Q=ne=>{var z,ue;s.every(Fe=>ne[Fe]||ne.code===Fe)&&(L(!0),(z=R.current)==null||z.focus()),ne.code==="Escape"&&(document.activeElement===R.current||(ue=R.current)!=null&&ue.contains(document.activeElement))&&L(!1)};return document.addEventListener("keydown",Q),()=>document.removeEventListener("keydown",Q)},[s]),V.useEffect(()=>{if(R.current)return()=>{T.current&&(T.current.focus({preventScroll:!0}),T.current=null,I.current=!1)}},[R.current]),V.createElement("section",{ref:e,"aria-label":`${_} ${E}`,tabIndex:-1,"aria-live":"polite","aria-relevant":"additions text","aria-atomic":"false",suppressHydrationWarning:!0},N.map((Q,ne)=>{var z;let[ue,Fe]=Q.split("-");return S.length?V.createElement("ol",{key:Q,dir:y==="auto"?pb():y,tabIndex:-1,ref:R,className:a,"data-sonner-toaster":!0,"data-theme":A,"data-y-position":ue,"data-lifted":O&&S.length>1&&!i,"data-x-position":Fe,style:{"--front-toast-height":`${((z=P[0])==null?void 0:z.height)||0}px`,"--width":`${FL}px`,"--gap":`${w}px`,...p,...WL(c,u)},onBlur:me=>{I.current&&!me.currentTarget.contains(me.relatedTarget)&&(I.current=!1,T.current&&(T.current.focus({preventScroll:!0}),T.current=null))},onFocus:me=>{me.target instanceof HTMLElement&&me.target.dataset.dismissible==="false"||I.current||(I.current=!0,T.current=me.relatedTarget)},onMouseEnter:()=>L(!0),onMouseMove:()=>L(!0),onMouseLeave:()=>{K||L(!1)},onDragEnd:()=>L(!1),onPointerDown:me=>{me.target instanceof HTMLElement&&me.target.dataset.dismissible==="false"||U(!0)},onPointerUp:()=>U(!1)},S.filter(me=>!me.position&&ne===0||me.position===Q).map((me,or)=>{var pn,mn;return V.createElement(zL,{key:me.id,icons:b,index:or,toast:me,defaultRichColors:h,duration:(pn=g==null?void 0:g.duration)!=null?pn:f,className:g==null?void 0:g.className,descriptionClassName:g==null?void 0:g.descriptionClassName,invert:n,visibleToasts:x,closeButton:(mn=g==null?void 0:g.closeButton)!=null?mn:o,interacting:K,position:Q,style:g==null?void 0:g.style,unstyled:g==null?void 0:g.unstyled,classNames:g==null?void 0:g.classNames,cancelButtonStyle:g==null?void 0:g.cancelButtonStyle,actionButtonStyle:g==null?void 0:g.actionButtonStyle,removeToast:H,toasts:S.filter(W=>W.position==me.position),heights:P.filter(W=>W.position==me.position),setHeights:j,expandByDefault:i,gap:w,loadingIcon:v,expanded:O,pauseWhenPageIsHidden:k,swipeDirections:t.swipeDirections})})):null}))});const KL=({...t})=>{const{theme:e="system"}=vL();return l.jsx(HL,{theme:e,className:"toaster group",toastOptions:{classNames:{toast:"group toast group-[.toaster]:bg-background group-[.toaster]:text-foreground group-[.toaster]:border-border group-[.toaster]:shadow-lg",description:"group-[.toast]:text-muted-foreground",actionButton:"group-[.toast]:bg-primary group-[.toast]:text-primary-foreground",cancelButton:"group-[.toast]:bg-muted group-[.toast]:text-muted-foreground"}},...t})};var GL=By[" useId ".trim().toString()]||(()=>{}),qL=0;function Ap(t){const[e,n]=m.useState(GL());return Yr(()=>{t||n(r=>r??String(qL++))},[t]),t||(e?`radix-${e}`:"")}const YL=["top","right","bottom","left"],ti=Math.min,on=Math.max,eh=Math.round,Ru=Math.floor,br=t=>({x:t,y:t}
vendor: 12,655 bytes, line 221
221),QL={left:"right",right:"left",bottom:"top",top:"bottom"},XL={start:"end",end:"start"};function Tg(t,e,n){return on(t,ti(e,n))}function Qr(t,e){return typeof t=="function"?t(e):t}function Xr(t){return t.split("-")[0]}function Fa(t){return t.split("-")[1]}function Lv(t){return t==="x"?"y":"x"}function Fv(t){return t==="y"?"height":"width"}const JL=new Set(["top","bottom"]);function gr(t){return JL.has(Xr(t))?"y":"x"}function Uv(t){return Lv(gr(t))}function ZL(t,e,n){n===void 0&&(n=!1);const r=Fa(t),s=Uv(t),i=Fv(s);let o=s==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return e.reference[i]>e.floating[i]&&(o=th(o)),[o,th(o)]}function e4(t){const e=th(t);return[Ig(t),e,Ig(e)]}function Ig(t){return t.replace(/start|end/g,e=>XL[e])}const mb=["left","right"],gb=["right","left"],t4=["top","bottom"],n4=["bottom","top"];function r4(t,e,n){switch(t){case"top":case"bottom":return n?e?gb:mb:e?mb:gb;case"left":case"right":return e?t4:n4;default:return[]}}function s4(t,e,n,r){const s=Fa(t);let i=r4(Xr(t),n==="start",r);return s&&(i=i.map(o=>o+"-"+s),e&&(i=i.concat(i.map(Ig)))),i}function th(t){return t.replace(/left|right|bottom|top/g,e=>QL[e])}function i4(t){return{top:0,right:0,bottom:0,left:0,...t}}function eN(t){return typeof t!="number"?i4(t):{top:t,right:t,bottom:t,left:t}}function nh(t){const{x:e,y:n,width:r,height:s}=t;return{width:r,height:s,top:n,left:e,right:e+r,bottom:n+s,x:e,y:n}}function yb(t,e,n){let{reference:r,floating:s}=t;const i=gr(e),o=Uv(e),a=Fv(o),c=Xr(e),u=i==="y",d=r.x+r.width/2-s.width/2,h=r.y+r.height/2-s.height/2,f=r[a]/2-s[a]/2;let p;switch(c){case"top":p={x:d,y:r.y-s.height};break;case"bottom":p={x:d,y:r.y+r.height};break;case"right":p={x:r.x+r.width,y:h};break;case"left":p={x:r.x-s.width,y:h};break;default:p={x:r.x,y:r.y}}switch(Fa(e)){case"start":p[o]-=f*(n&&u?-1:1);break;case"end":p[o]+=f*(n&&u?-1:1);break}return p}const o4=async(t,e,n)=>{const{placement:r="bottom",strategy:s="absolute",middleware:i=[],platform:o}=n,a=i.filter(Boolean),c=await(o.isRTL==null?void 0:o.isRTL(e));let u=await o.getElementRects({reference:t,floating:e,strategy:s}),{x:d,y:h}=yb(u,r,c),f=r,p={},x=0;for(let g=0;g<a.length;g++){const{name:y,fn:w}=a[g],{x:v,y:b,data:_,reset:k}=await w({x:d,y:h,initialPlacement:r,placement:f,strategy:s,middlewareData:p,rects:u,platform:o,elements:{reference:t,floating:e}});d=v??d,h=b??h,p={...p,[y]:{...p[y],..._}},k&&x<=50&&(x++,typeof k=="object"&&(k.placement&&(f=k.placement),k.rects&&(u=k.rects===!0?await o.getElementRects({reference:t,floating:e,strategy:s}):k.rects),{x:d,y:h}=yb(u,f,c)),g=-1)}return{x:d,y:h,placement:f,strategy:s,middlewareData:p}};async function mc(t,e){var n;e===void 0&&(e={});const{x:r,y:s,platform:i,rects:o,elements:a,strategy:c}=t,{boundary:u="clippingAncestors",rootBoundary:d="viewport",elementContext:h="floating",altBoundary:f=!1,padding:p=0}=Qr(e,t),x=eN(p),y=a[f?h==="floating"?"reference":"floating":h],w=nh(await i.getClippingRect({element:(n=await(i.isElement==null?void 0:i.isElement(y)))==null||n?y:y.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(a.floating)),boundary:u,rootBoundary:d,strategy:c})),v=h==="floating"?{x:r,y:s,width:o.floating.width,height:o.floating.height}:o.reference,b=await(i.getOffsetParent==null?void 0:i.getOffsetParent(a.floating)),_=await(i.isElement==null?void 0:i.isElement(b))?await(i.getScale==null?void 0:i.getScale(b))||{x:1,y:1}:{x:1,y:1},k=nh(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:v,offsetParent:b,strategy:c}):v);return{top:(w.top-k.top+x.top)/_.y,bottom:(k.bottom-w.bottom+x.bottom)/_.y,left:(w.left-k.left+x.left)/_.x,right:(k.right-w.right+x.right)/_.x}}const a4=t=>({name:"arrow",options:t,async fn(e){const{x:n,y:r,placement:s,rects:i,platform:o,elements:a,middlewareData:c}=e,{element:u,padding:d=0}=Qr(t,e)||{};if(u==null)return{};const h=eN(d),f={x:n,y:r},p=Uv(s),x=Fv(p),g=await o.getDimensions(u),y=p==="y",w=y?"top":"left",v=y?"bottom":"right",b=y?"clientHeight":"clientWidth",_=i.reference[x]+i.reference[p]-f[p]-i.floating[x],k=f[p]-i.reference[p],S=await(o.getOffsetParent==null?void 0:o.getOffsetParent(u));let C=S?S[b]:0;(!C||!await(o.isElement==null?void 0:o.isElement(S)))&&(C=a.floating[b]||i.floating[x]);const N=_/2-k/2,P=C/2-g[x]/2-1,j=ti(h[w],P),O=ti(h[v],P),L=j,K=C-g[x]-O,U=C/2-g[x]/2+N,A=Tg(L,U,K),M=!c.arrow&&Fa(s)!=null&&U!==A&&i.reference[x]/2-(U<L?j:O)-g[x]/2<0,R=M?U<L?U-L:U-K:0;return{[p]:f[p]+R,data:{[p]:A,centerOffset:U-A-R,...M&&{alignmentOffset:R}},reset:M}}}),l4=function(t){return t===void 0&&(t={}),{name:"flip",options:t,async fn(e){var n,r;const{placement:s,middlewareData:i,rects:o,initialPlacement:a,platform:c,elements:u}=e,{mainAxis:d=!0,crossAxis:h=!0,fallbackPlacements:f,fallbackStrategy:p="bestFit",fallbackAxisSideDirection:x="none",flipAlignment:g=!0,...y}=Qr(t,e);if((n=i.arrow)!=null&&n.alignmentOffset)return{};const w=Xr(s),v=gr(a),b=Xr(a)===a,_=await(c.isRTL==null?void 0:c.isRTL(u.floating)),k=f||(b||!g?[th(a)]:e4(a)),S=x!=="none";!f&&S&&k.push(...s4(a,g,x,_));const C=[a,...k],N=await mc(e,y),P=[];let j=((r=i.flip)==null?void 0:r.overflows)||[];if(d&&P.push(N[w]),h){const U=ZL(s,o,_);P.push(N[U[0]],N[U[1]])}if(j=[...j,{placement:s,overflows:P}],!P.every(U=>U<=0)){var O,L;const U=(((O=i.flip)==null?void 0:O.index)||0)+1,A=C[U];if(A&&(!(h==="alignment"?v!==gr(A):!1)||j.every(E=>E.overflows[0]>0&&gr(E.placement)===v)))return{data:{index:U,overflows:j},reset:{placement:A}};let M=(L=j.filter(R=>R.overflows[0]<=0).sort((R,E)=>R.overflows[1]-E.overflows[1])[0])==null?void 0:L.placement;if(!M)switch(p){case"bestFit":{var K;const R=(K=j.filter(E=>{if(S){const T=gr(E.placement);return T===v||T==="y"}return!0}).map(E=>[E.placement,E.overflows.filter(T=>T>0).reduce((T,I)=>T+I,0)]).sort((E,T)=>E[1]-T[1])[0])==null?void 0:K[0];R&&(M=R);break}case"initialPlacement":M=a;break}if(s!==M)return{reset:{placement:M}}}return{}}}};function vb(t,e){return{top:t.top-e.height,right:t.right-e.width,bottom:t.bottom-e.height,left:t.left-e.width}}function xb(t){return YL.some(e=>t[e]>=0)}const c4=function(t){return t===void 0&&(t={}),{name:"hide",options:t,async fn(e){const{rects:n}=e,{strategy:r="referenceHidden",...s}=Qr(t,e);switch(r){case"referenceHidden":{const i=await mc(e,{...s,elementContext:"reference"}),o=vb(i,n.reference);return{data:{referenceHiddenOffsets:o,referenceHidden:xb(o)}}}case"escaped":{const i=await mc(e,{...s,altBoundary:!0}),o=vb(i,n.floating);return{data:{escapedOffsets:o,escaped:xb(o)}}}default:return{}}}}},tN=new Set(["left","top"]);async function u4(t,e){const{placement:n,platform:r,elements:s}=t,i=await(r.isRTL==null?void 0:r.isRTL(s.floating)),o=Xr(n),a=Fa(n),c=gr(n)==="y",u=tN.has(o)?-1:1,d=i&&c?-1:1,h=Qr(e,t);let{mainAxis:f,crossAxis:p,alignmentAxis:x}=typeof h=="number"?{mainAxis:h,crossAxis:0,alignmentAxis:null}:{mainAxis:h.mainAxis||0,crossAxis:h.crossAxis||0,alignmentAxis:h.alignmentAxis};return a&&typeof x=="number"&&(p=a==="end"?x*-1:x),c?{x:p*d,y:f*u}:{x:f*u,y:p*d}}const d4=function(t){return t===void 0&&(t=0),{name:"offset",options:t,async fn(e){var n,r;const{x:s,y:i,placement:o,middlewareData:a}=e,c=await u4(e,t);return o===((n=a.offset)==null?void 0:n.placement)&&(r=a.arrow)!=null&&r.alignmentOffset?{}:{x:s+c.x,y:i+c.y,data:{...c,placement:o}}}}},h4=function(t){return t===void 0&&(t={}),{name:"shift",options:t,async fn(e){const{x:n,y:r,placement:s}=e,{mainAxis:i=!0,crossAxis:o=!1,limiter:a={fn:y=>{let{x:w,y:v}=y;return{x:w,y:v}}},...c}=Qr(t,e),u={x:n,y:r},d=await mc(e,c),h=gr(Xr(s)),f=Lv(h);let p=u[f],x=u[h];if(i){const y=f==="y"?"top":"left",w=f==="y"?"bottom":"right",v=p+d[y],b=p-d[w];p=Tg(v,p,b)}if(o){const y=h==="y"?"top":"left",w=h==="y"?"bottom":"right",v=x+d[y],b=x-d[w];x=Tg(v,x,b)}const g=a.fn({...e,[f]:p,[h]:x});return{...g,data:{x:g.x-n,y:g.y-r,enabled:{[f]:i,[h]:o}}}}}},f4=function(t){return t===void 0&&(t={}),{options:t,fn(e){const{x:n,y:r,placement:s,rects:i,middlewareData:o}=e,{offset:a=0,mainAxis:c=!0,crossAxis:u=!0}=Qr(t,e),d={x:n,y:r},h=gr(s),f=Lv(h);let p=d[f],x=d[h];const g=Qr(a,e),y=typeof g=="number"?{mainAxis:g,crossAxis:0}:{mainAxis:0,crossAxis:0,...g};if(c){const b=f==="y"?"height":"width",_=i.reference[f]-i.floating[b]+y.mainAxis,k=i.reference[f]+i.reference[b]-y.mainAxis;p<_?p=_:p>k&&(p=k)}if(u){var w,v;const b=f==="y"?"width":"height",_=tN.has(Xr(s)),k=i.reference[h]-i.floating[b]+(_&&((w=o.offset)==null?void 0:w[h])||0)+(_?0:y.crossAxis),S=i.reference[h]+i.reference[b]+(_?0:((v=o.offset)==null?void 0:v[h])||0)-(_?y.crossAxis:0);x<k?x=k:x>S&&(x=S)}return{[f]:p,[h]:x}}}},p4=function(t){return t===void 0&&(t={}),{name:"size",options:t,async fn(e){var n,r;const{placement:s,rects:i,platform:o,elements:a}=e,{apply:c=()=>{},...u}=Qr(t,e),d=await mc(e,u),h=Xr(s),f=Fa(s),p=gr(s)==="y",{width:x,height:g}=i.floating;let y,w;h==="top"||h==="bottom"?(y=h,w=f===(await(o.isRTL==null?void 0:o.isRTL(a.floating))?"start":"end")?"left":"right"):(w=h,y=f==="end"?"top":"bottom");const v=g-d.top-d.bottom,b=x-d.left-d.right,_=ti(g-d[y],v),k=ti(x-d[w],b),S=!e.middlewareData.shift;let C=_,N=k;if((n=e.middlewareData.shift)!=null&&n.enabled.x&&(N=b),(r=e.middlewareData.shift)!=null&&r.enabled.y&&(C=v),S&&!f){const j=on(d.left,0),O=on(d.right,0),L=on(d.top,0),K=on(d.bottom,0);p?N=x-2*(j!==0||O!==0?j+O:on(d.left,d.right)):C=g-2*(L!==0||K!==0?L+K:on(d.top,d.bottom))}await c({...e,availableWidth:N,availableHeight:C});const P=await o.getDimensions(a.floating);return x!==P.width||g!==P.height?{reset:{rects:!0}}:{}}}};function cf(){return typeof window<"u"}function Ua(t){return nN(t)?(t.nodeName||"").toLowerCase():"#document"}function un(t){var e;return(t==null||(e=t.ownerDocument)==null?void 0:e.defaultView)||window}function jr(t){var e;return(e=(nN(t)?t.ownerDocument:t.document)||window.document)==null?void 0:e.documentElement}function nN(t){return cf()?t instanceof Node||t instanceof un(t).Node:!1}function tr(t){return cf()?t instanceof Element||t instanceof un(t).Element:!1}function Ir(t){return cf()?t instanceof HTMLElement||t instanceof un(t).HTMLElement:!1}function wb(t){return!cf()||typeof ShadowRoot>"u"?!1:t instanceof ShadowRoot||t instanceof un(t).ShadowRoot}const m4=new Set(["inline","contents"]);function qc(t){const{overflow:e,overflowX:n,overflowY:r,display:s}=nr(t);return/auto|scroll|overlay|hidden|clip/.test(e+r+n)&&!m4.has(s)}const g4=new Set(["table","td","th"]);function y4(t){return g4.has(Ua(t))}const v4=[":popover-open",":modal"];function uf(t){return v4.some(e=>{try{return t.matches(e)}catch{return!1}})}const x4=["transform","translate","scale","rotate","perspective"],w4=["transform","translate","scale","rotate","perspective","filter"],b4=["paint","layout","strict","content"];function Bv(t){const e=Vv(),n=tr(t)?nr(t):t;return x4.some(r=>n[r]?n[r]!=="none":!1)||(n.containerType?n.containerType!=="normal":!1)||!e&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!e&&(n.filter?n.filter!=="none":!1)||w4.some(r=>(n.willChange||"").includes(r))||b4.some(r=>(n.contain||"").includes(r))}function _4(t){let e=ni(t);for(;Ir(e)&&!ka(e);){if(Bv(e))return e;if(uf(e))return null;e=ni(e)}return null}function Vv(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const k4=new Set(["html","body","#document"]);function ka(t){return k4.has(Ua(t))}function nr(t){return un(t).getComputedStyle(t)}function df(t){return tr(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.scrollX,scrollTop:t.scrollY}}function ni(t){if(Ua(t)==="html")return t;const e=t.assignedSlot||t.parentNode||wb(t)&&t.host||jr(t);return wb(e)?e.host:e}function rN(t){const e=ni(t);return ka(e)?t.ownerDocument?t.ownerDocument.body:t.body:Ir(e)&&qc(e)?e:rN(e)}function gc(t,e,n){var r;e===void 0&&(e=[]),n===void 0&&(n=!0);const s=rN(t),i=s===((r=t.ownerDocument)==null?void 0:r.body),o=un(s);if(i){const a=Pg(o);return e.concat(o,o.visualViewport||[],qc(s)?s:[],a&&n?gc(a):[])}return e.concat(s,gc(s,[],n))}function Pg(t){return t.parent&&Object.getPrototypeOf(t.parent)?t.frameElement:null}function sN(t){const e=nr(t);let n=parseFloat(e.width)||0,r=parseFloat(e.height)||0;const s=Ir(t),i=s?t.offsetWidth:n,o=s?t.offsetHeight:r,a=eh(n)!==i||eh(r)!==o;return a&&(n=i,r=o),{width:n,height:r,$:a}}function $v(t){return tr(t)?t:t.contextElement}function Zo(t){const e=$v(t);if(!Ir(e))return br(1);const n=e.getBoundingClientRect(),{width:r,height:s,$:i}=sN(e);let o=(i?eh(n.width):n.width)/r,a=(i?eh(n.height):n.height)/s;return(!o||!Number.isFinite(o))&&(o=1),(!a||!Number.isFinite(a))&&(a=1),{x:o,y:a}}const E4=br(0);function iN(t){const e=un(t);
vendor: 6,557 bytes, line 221
221return!Vv()||!e.visualViewport?E4:{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}}function C4(t,e,n){return e===void 0&&(e=!1),!n||e&&n!==un(t)?!1:e}function Qi(t,e,n,r){e===void 0&&(e=!1),n===void 0&&(n=!1);const s=t.getBoundingClientRect(),i=$v(t);let o=br(1);e&&(r?tr(r)&&(o=Zo(r)):o=Zo(t));const a=C4(i,n,r)?iN(i):br(0);let c=(s.left+a.x)/o.x,u=(s.top+a.y)/o.y,d=s.width/o.x,h=s.height/o.y;if(i){const f=un(i),p=r&&tr(r)?un(r):r;let x=f,g=Pg(x);for(;g&&r&&p!==x;){const y=Zo(g),w=g.getBoundingClientRect(),v=nr(g),b=w.left+(g.clientLeft+parseFloat(v.paddingLeft))*y.x,_=w.top+(g.clientTop+parseFloat(v.paddingTop))*y.y;c*=y.x,u*=y.y,d*=y.x,h*=y.y,c+=b,u+=_,x=un(g),g=Pg(x)}}return nh({width:d,height:h,x:c,y:u})}function zv(t,e){const n=df(t).scrollLeft;return e?e.left+n:Qi(jr(t)).left+n}function oN(t,e,n){n===void 0&&(n=!1);const r=t.getBoundingClientRect(),s=r.left+e.scrollLeft-(n?0:zv(t,r)),i=r.top+e.scrollTop;return{x:s,y:i}}function S4(t){let{elements:e,rect:n,offsetParent:r,strategy:s}=t;const i=s==="fixed",o=jr(r),a=e?uf(e.floating):!1;if(r===o||a&&i)return n;let c={scrollLeft:0,scrollTop:0},u=br(1);const d=br(0),h=Ir(r);if((h||!h&&!i)&&((Ua(r)!=="body"||qc(o))&&(c=df(r)),Ir(r))){const p=Qi(r);u=Zo(r),d.x=p.x+r.clientLeft,d.y=p.y+r.clientTop}const f=o&&!h&&!i?oN(o,c,!0):br(0);return{width:n.width*u.x,height:n.height*u.y,x:n.x*u.x-c.scrollLeft*u.x+d.x+f.x,y:n.y*u.y-c.scrollTop*u.y+d.y+f.y}}function N4(t){return Array.from(t.getClientRects())}function T4(t){const e=jr(t),n=df(t),r=t.ownerDocument.body,s=on(e.scrollWidth,e.clientWidth,r.scrollWidth,r.clientWidth),i=on(e.scrollHeight,e.clientHeight,r.scrollHeight,r.clientHeight);let o=-n.scrollLeft+zv(t);const a=-n.scrollTop;return nr(r).direction==="rtl"&&(o+=on(e.clientWidth,r.clientWidth)-s),{width:s,height:i,x:o,y:a}}function I4(t,e){const n=un(t),r=jr(t),s=n.visualViewport;let i=r.clientWidth,o=r.clientHeight,a=0,c=0;if(s){i=s.width,o=s.height;const u=Vv();(!u||u&&e==="fixed")&&(a=s.offsetLeft,c=s.offsetTop)}return{width:i,height:o,x:a,y:c}}const P4=new Set(["absolute","fixed"]);function j4(t,e){const n=Qi(t,!0,e==="fixed"),r=n.top+t.clientTop,s=n.left+t.clientLeft,i=Ir(t)?Zo(t):br(1),o=t.clientWidth*i.x,a=t.clientHeight*i.y,c=s*i.x,u=r*i.y;return{width:o,height:a,x:c,y:u}}function bb(t,e,n){let r;if(e==="viewport")r=I4(t,n);else if(e==="document")r=T4(jr(t));else if(tr(e))r=j4(e,n);else{const s=iN(t);r={x:e.x-s.x,y:e.y-s.y,width:e.width,height:e.height}}return nh(r)}function aN(t,e){const n=ni(t);return n===e||!tr(n)||ka(n)?!1:nr(n).position==="fixed"||aN(n,e)}function R4(t,e){const n=e.get(t);if(n)return n;let r=gc(t,[],!1).filter(a=>tr(a)&&Ua(a)!=="body"),s=null;const i=nr(t).position==="fixed";let o=i?ni(t):t;for(;tr(o)&&!ka(o);){const a=nr(o),c=Bv(o);!c&&a.position==="fixed"&&(s=null),(i?!c&&!s:!c&&a.position==="static"&&!!s&&P4.has(s.position)||qc(o)&&!c&&aN(t,o))?r=r.filter(d=>d!==o):s=a,o=ni(o)}return e.set(t,r),r}function A4(t){let{element:e,boundary:n,rootBoundary:r,strategy:s}=t;const o=[...n==="clippingAncestors"?uf(e)?[]:R4(e,this._c):[].concat(n),r],a=o[0],c=o.reduce((u,d)=>{const h=bb(e,d,s);return u.top=on(h.top,u.top),u.right=ti(h.right,u.right),u.bottom=ti(h.bottom,u.bottom),u.left=on(h.left,u.left),u},bb(e,a,s));return{width:c.right-c.left,height:c.bottom-c.top,x:c.left,y:c.top}}function D4(t){const{width:e,height:n}=sN(t);return{width:e,height:n}}function M4(t,e,n){const r=Ir(e),s=jr(e),i=n==="fixed",o=Qi(t,!0,i,e);let a={scrollLeft:0,scrollTop:0};const c=br(0);function u(){c.x=zv(s)}if(r||!r&&!i)if((Ua(e)!=="body"||qc(s))&&(a=df(e)),r){const p=Qi(e,!0,i,e);c.x=p.x+e.clientLeft,c.y=p.y+e.clientTop}else s&&u();i&&!r&&s&&u();const d=s&&!r&&!i?oN(s,a):br(0),h=o.left+a.scrollLeft-c.x-d.x,f=o.top+a.scrollTop-c.y-d.y;return{x:h,y:f,width:o.width,height:o.height}}function Dp(t){return nr(t).position==="static"}function _b(t,e){if(!Ir(t)||nr(t).position==="fixed")return null;if(e)return e(t);let n=t.offsetParent;return jr(t)===n&&(n=n.ownerDocument.body),n}function lN(t,e){const n=un(t);if(uf(t))return n;if(!Ir(t)){let s=ni(t);for(;s&&!ka(s);){if(tr(s)&&!Dp(s))return s;s=ni(s)}return n}let r=_b(t,e);for(;r&&y4(r)&&Dp(r);)r=_b(r,e);return r&&ka(r)&&Dp(r)&&!Bv(r)?n:r||_4(t)||n}const O4=async function(t){const e=this.getOffsetParent||lN,n=this.getDimensions,r=await n(t.floating);return{reference:M4(t.reference,await e(t.floating),t.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function L4(t){return nr(t).direction==="rtl"}const F4={convertOffsetParentRelativeRectToViewportRelativeRect:S4,getDocumentElement:jr,getClippingRect:A4,getOffsetParent:lN,getElementRects:O4,getClientRects:N4,getDimensions:D4,getScale:Zo,isElement:tr,isRTL:L4};function cN(t,e){return t.x===e.x&&t.y===e.y&&t.width===e.width&&t.height===e.height}function U4(t,e){let n=null,r;const s=jr(t);function i(){var a;clearTimeout(r),(a=n)==null||a.disconnect(),n=null}function o(a,c){a===void 0&&(a=!1),c===void 0&&(c=1),i();const u=t.getBoundingClientRect(),{left:d,top:h,width:f,height:p}=u;if(a||e(),!f||!p)return;const x=Ru(h),g=Ru(s.clientWidth-(d+f)),y=Ru(s.clientHeight-(h+p)),w=Ru(d),b={rootMargin:-x+"px "+-g+"px "+-y+"px "+-w+"px",threshold:on(0,ti(1,c))||1};let _=!0;function k(S){const C=S[0].intersectionRatio;if(C!==c){if(!_)return o();C?o(!1,C):r=setTimeout(()=>{o(!1,1e-7)},1e3)}C===1&&!cN(u,t.getBoundingClientRect())&&o(),_=!1}try{n=new IntersectionObserver(k,{...b,root:s.ownerDocument})}catch{n=new IntersectionObserver(k,b)}n.observe(t)}return o(!0),i}function B4(t,e,n,r){r===void 0&&(r={});const{ancestorScroll:s=!0,ancestorResize:i=!0,elementResize:o=typeof ResizeObserver=="function",layoutShift:a=typeof IntersectionObserver=="function",animationFrame:c=!1}=r,u=$v(t),d=s||i?[...u?gc(u):[],...gc(e)]:[];d.forEach(w=>{s&&w.addEventListener("scroll",n,{passive:!0}),i&&w.addEventListener("resize",n)});const h=u&&a?U4(u,n):null;let f=-1,p=null;o&&(p=new ResizeObserver(w=>{let[v]=w;v&&v.target===u&&p&&(p.unobserve(e),cancelAnimationFrame(f),f=requestAnimationFrame(()=>{var b;(b=p)==null||b.observe(e)})),n()}),u&&!c&&p.observe(u),p.observe(e));let x,g=c?Qi(t):null;c&&y();function y(){const w=Qi(t);g&&!cN(g,w)&&n(),g=w,x=requestAnimationFrame(y)}return n(),()=>{var w;d.forEach(v=>{s&&v.removeEventListener("scroll",n),i&&v.removeEventListener("resize",n)}),h==null||h(),(w=p)==null||w.disconnect(),p=null,c&&cancelAnimationFrame(x)}}const V4=d4,$4=h4,z4=l4,W4=p4,H4=c4,kb=a4,K4=f4,G4=(t,e,n)=>{const r=new Map,s={platform:F4,...n},i={...s.platform,_c:r};return o4(t,e,{...s,platform:i})};
vendor: 4,872 bytes, line 221
221var q4=typeof document<"u",Y4=function(){},pd=q4?m.useLayoutEffect:Y4;function rh(t,e){if(t===e)return!0;if(typeof t!=typeof e)return!1;if(typeof t=="function"&&t.toString()===e.toString())return!0;let n,r,s;if(t&&e&&typeof t=="object"){if(Array.isArray(t)){if(n=t.length,n!==e.length)return!1;for(r=n;r--!==0;)if(!rh(t[r],e[r]))return!1;return!0}if(s=Object.keys(t),n=s.length,n!==Object.keys(e).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(e,s[r]))return!1;for(r=n;r--!==0;){const i=s[r];if(!(i==="_owner"&&t.$$typeof)&&!rh(t[i],e[i]))return!1}return!0}return t!==t&&e!==e}function uN(t){return typeof window>"u"?1:(t.ownerDocument.defaultView||window).devicePixelRatio||1}function Eb(t,e){const n=uN(t);return Math.round(e*n)/n}function Mp(t){const e=m.useRef(t);return pd(()=>{e.current=t}),e}function Q4(t){t===void 0&&(t={});const{placement:e="bottom",strategy:n="absolute",middleware:r=[],platform:s,elements:{reference:i,floating:o}={},transform:a=!0,whileElementsMounted:c,open:u}=t,[d,h]=m.useState({x:0,y:0,strategy:n,placement:e,middlewareData:{},isPositioned:!1}),[f,p]=m.useState(r);rh(f,r)||p(r);const[x,g]=m.useState(null),[y,w]=m.useState(null),v=m.useCallback(E=>{E!==S.current&&(S.current=E,g(E))},[]),b=m.useCallback(E=>{E!==C.current&&(C.current=E,w(E))},[]),_=i||x,k=o||y,S=m.useRef(null),C=m.useRef(null),N=m.useRef(d),P=c!=null,j=Mp(c),O=Mp(s),L=Mp(u),K=m.useCallback(()=>{if(!S.current||!C.current)return;const E={placement:e,strategy:n,middleware:f};O.current&&(E.platform=O.current),G4(S.current,C.current,E).then(T=>{const I={...T,isPositioned:L.current!==!1};U.current&&!rh(N.current,I)&&(N.current=I,Wc.flushSync(()=>{h(I)}))})},[f,e,n,O,L]);pd(()=>{u===!1&&N.current.isPositioned&&(N.current.isPositioned=!1,h(E=>({...E,isPositioned:!1})))},[u]);const U=m.useRef(!1);pd(()=>(U.current=!0,()=>{U.current=!1}),[]),pd(()=>{if(_&&(S.current=_),k&&(C.current=k),_&&k){if(j.current)return j.current(_,k,K);K()}},[_,k,K,j,P]);const A=m.useMemo(()=>({reference:S,floating:C,setReference:v,setFloating:b}),[v,b]),M=m.useMemo(()=>({reference:_,floating:k}),[_,k]),R=m.useMemo(()=>{const E={position:n,left:0,top:0};if(!M.floating)return E;const T=Eb(M.floating,d.x),I=Eb(M.floating,d.y);return a?{...E,transform:"translate("+T+"px, "+I+"px)",...uN(M.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:T,top:I}},[n,a,M.floating,d.x,d.y]);return m.useMemo(()=>({...d,update:K,refs:A,elements:M,floatingStyles:R}),[d,K,A,M,R])}const X4=t=>{function e(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:t,fn(n){const{element:r,padding:s}=typeof t=="function"?t(n):t;return r&&e(r)?r.current!=null?kb({element:r.current,padding:s}).fn(n):{}:r?kb({element:r,padding:s}).fn(n):{}}}},J4=(t,e)=>({...V4(t),options:[t,e]}),Z4=(t,e)=>({...$4(t),options:[t,e]}),e3=(t,e)=>({...K4(t),options:[t,e]}),t3=(t,e)=>({...z4(t),options:[t,e]}),n3=(t,e)=>({...W4(t),options:[t,e]}),r3=(t,e)=>({...H4(t),options:[t,e]}),s3=(t,e)=>({...X4(t),options:[t,e]});var i3="Arrow",dN=m.forwardRef((t,e)=>{const{children:n,width:r=10,height:s=5,...i}=t;return l.jsx(Ne.svg,{...i,ref:e,width:r,height:s,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:t.asChild?n:l.jsx("polygon",{points:"0,0 30,0 15,10"})})});dN.displayName=i3;var o3=dN;function Wv(t){const[e,n]=m.useState(void 0);return Yr(()=>{if(t){n({width:t.offsetWidth,height:t.offsetHeight});const r=new ResizeObserver(s=>{if(!Array.isArray(s)||!s.length)return;const i=s[0];let o,a;if("borderBoxSize"in i){const c=i.borderBoxSize,u=Array.isArray(c)?c[0]:c;o=u.inlineSize,a=u.blockSize}else o=t.offsetWidth,a=t.offsetHeight;n({width:o,height:a})});return r.observe(t,{box:"border-box"}),()=>r.unobserve(t)}else n(void 0)},[t]),e}var hN="Popper",[fN,pN]=lo(hN),[hJ,mN]=fN(hN),gN="PopperAnchor",yN=m.forwardRef((t,e)=>{const{__scopePopper:n,virtualRef:r,...s}=t,i=mN(gN,n),o=m.useRef(null),a=He(e,o);return m.useEffect(()=>{i.onAnchorChange((r==null?void 0:r.current)||o.current)}),r?null:l.jsx(Ne.div,{...s,ref:a})});yN.displayName=gN;var Hv="PopperContent",[a3,l3]=fN(Hv),vN=m.forwardRef((t,e)=>{var me,or,pn,mn,W,X;const{__scopePopper:n,side:r="bottom",sideOffset:s=0,align:i="center",alignOffset:o=0,arrowPadding:a=0,avoidCollisions:c=!0,collisionBoundary:u=[],collisionPadding:d=0,sticky:h="partial",hideWhenDetached:f=!1,updatePositionStrategy:p="optimized",onPlaced:x,...g}=t,y=mN(Hv,n),[w,v]=m.useState(null),b=He(e,_e=>v(_e)),[_,k]=m.useState(null),S=Wv(_),C=(S==null?void 0:S.width)??0,N=(S==null?void 0:S.height)??0,P=r+(i!=="center"?"-"+i:""),j=typeof d=="number"?d:{top:0,right:0,bottom:0,left:0,...d},O=Array.isArray(u)?u:[u],L=O.length>0,K={padding:j,boundary:O.filter(u3),altBoundary:L},{refs:U,floatingStyles:A,placement:M,isPositioned:R,middlewareData:E}=Q4({strategy:"fixed",placement:P,whileElementsMounted:(..._e)=>B4(..._e,{animationFrame:p==="always"}
vendor: 5,102 bytes, line 221
221),elements:{reference:y.anchor},middleware:[J4({mainAxis:s+N,alignmentAxis:o}),c&&Z4({mainAxis:!0,crossAxis:!1,limiter:h==="partial"?e3():void 0,...K}),c&&t3({...K}),n3({...K,apply:({elements:_e,rects:_t,availableWidth:ar,availableHeight:jn})=>{const{width:F,height:G}=_t.reference,se=_e.floating.style;se.setProperty("--radix-popper-available-width",`${ar}px`),se.setProperty("--radix-popper-available-height",`${jn}px`),se.setProperty("--radix-popper-anchor-width",`${F}px`),se.setProperty("--radix-popper-anchor-height",`${G}px`)}}),_&&s3({element:_,padding:a}),d3({arrowWidth:C,arrowHeight:N}),f&&r3({strategy:"referenceHidden",...K})]}),[T,I]=bN(M),H=Nr(x);Yr(()=>{R&&(H==null||H())},[R,H]);const Q=(me=E.arrow)==null?void 0:me.x,ne=(or=E.arrow)==null?void 0:or.y,z=((pn=E.arrow)==null?void 0:pn.centerOffset)!==0,[ue,Fe]=m.useState();return Yr(()=>{w&&Fe(window.getComputedStyle(w).zIndex)},[w]),l.jsx("div",{ref:U.setFloating,"data-radix-popper-content-wrapper":"",style:{...A,transform:R?A.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:ue,"--radix-popper-transform-origin":[(mn=E.transformOrigin)==null?void 0:mn.x,(W=E.transformOrigin)==null?void 0:W.y].join(" "),...((X=E.hide)==null?void 0:X.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:t.dir,children:l.jsx(a3,{scope:n,placedSide:T,onArrowChange:k,arrowX:Q,arrowY:ne,shouldHideArrow:z,children:l.jsx(Ne.div,{"data-side":T,"data-align":I,...g,ref:b,style:{...g.style,animation:R?void 0:"none"}})})})});vN.displayName=Hv;var xN="PopperArrow",c3={top:"bottom",right:"left",bottom:"top",left:"right"},wN=m.forwardRef(function(e,n){const{__scopePopper:r,...s}=e,i=l3(xN,r),o=c3[i.placedSide];return l.jsx("span",{ref:i.onArrowChange,style:{position:"absolute",left:i.arrowX,top:i.arrowY,[o]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[i.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[i.placedSide],visibility:i.shouldHideArrow?"hidden":void 0},children:l.jsx(o3,{...s,ref:n,style:{...s.style,display:"block"}})})});wN.displayName=xN;function u3(t){return t!==null}var d3=t=>({name:"transformOrigin",options:t,fn(e){var y,w,v;const{placement:n,rects:r,middlewareData:s}=e,o=((y=s.arrow)==null?void 0:y.centerOffset)!==0,a=o?0:t.arrowWidth,c=o?0:t.arrowHeight,[u,d]=bN(n),h={start:"0%",center:"50%",end:"100%"}[d],f=(((w=s.arrow)==null?void 0:w.x)??0)+a/2,p=(((v=s.arrow)==null?void 0:v.y)??0)+c/2;let x="",g="";return u==="bottom"?(x=o?h:`${f}px`,g=`${-c}px`):u==="top"?(x=o?h:`${f}px`,g=`${r.floating.height+c}px`):u==="right"?(x=`${-c}px`,g=o?h:`${p}px`):u==="left"&&(x=`${r.floating.width+c}px`,g=o?h:`${p}px`),{data:{x,y:g}}}});function bN(t){const[e,n="center"]=t.split("-");return[e,n]}var h3=yN,f3=vN,p3=wN,[hf,fJ]=lo("Tooltip",[pN]),Kv=pN(),_N="TooltipProvider",m3=700,Cb="tooltip.open",[g3,kN]=hf(_N),EN=t=>{const{__scopeTooltip:e,delayDuration:n=m3,skipDelayDuration:r=300,disableHoverableContent:s=!1,children:i}=t,o=m.useRef(!0),a=m.useRef(!1),c=m.useRef(0);return m.useEffect(()=>{const u=c.current;return()=>window.clearTimeout(u)},[]),l.jsx(g3,{scope:e,isOpenDelayedRef:o,delayDuration:n,onOpen:m.useCallback(()=>{window.clearTimeout(c.current),o.current=!1},[]),onClose:m.useCallback(()=>{window.clearTimeout(c.current),c.current=window.setTimeout(()=>o.current=!0,r)},[r]),isPointerInTransitRef:a,onPointerInTransitChange:m.useCallback(u=>{a.current=u},[]),disableHoverableContent:s,children:i})};EN.displayName=_N;var CN="Tooltip",[pJ,ff]=hf(CN),jg="TooltipTrigger",y3=m.forwardRef((t,e)=>{const{__scopeTooltip:n,...r}=t,s=ff(jg,n),i=kN(jg,n),o=Kv(n),a=m.useRef(null),c=He(e,a,s.onTriggerChange),u=m.useRef(!1),d=m.useRef(!1),h=m.useCallback(()=>u.current=!1,[]);return m.useEffect(()=>()=>document.removeEventListener("pointerup",h),[h]),l.jsx(h3,{asChild:!0,...o,children:l.jsx(Ne.button,{"aria-describedby":s.open?s.contentId:void 0,"data-state":s.stateAttribute,...r,ref:c,onPointerMove:xe(t.onPointerMove,f=>{f.pointerType!=="touch"&&!d.current&&!i.isPointerInTransitRef.current&&(s.onTriggerEnter(),d.current=!0)}),onPointerLeave:xe(t.onPointerLeave,()=>{s.onTriggerLeave(),d.current=!1}),onPointerDown:xe(t.onPointerDown,()=>{s.open&&s.onClose(),u.current=!0,document.addEventListener("pointerup",h,{once:!0})}),onFocus:xe(t.onFocus,()=>{u.current||s.onOpen()}),onBlur:xe(t.onBlur,s.onClose),onClick:xe(t.onClick,s.onClose)})})});y3.displayName=jg;var v3="TooltipPortal",[mJ,x3]=hf(v3,{forceMount:void 0}),Ea="TooltipContent",SN=m.forwardRef((t,e)=>{const n=x3(Ea,t.__scopeTooltip),{forceMount:r=n.forceMount,side:s="top",...i}=t,o=ff(Ea,t.__scopeTooltip);return l.jsx(co,{present:r||o.open,children:o.disableHoverableContent?l.jsx(NN,{side:s,...i,ref:e}):l.jsx(w3,{side:s,...i,ref:e})})}),w3=m.forwardRef((t,e)=>{const n=ff(Ea,t.__scopeTooltip),r=kN(Ea,t.__scopeTooltip),s=m.useRef(null),i=He(e,s),[o,a]=m.useState(null),{trigger:c,onClose:u}=n,d=s.current,{onPointerInTransitChange:h}=r,f=m.useCallback(()=>{a(null),h(!1)}
vendor: 2,223 bytes, line 221
221,[h]),p=m.useCallback((x,g)=>{const y=x.currentTarget,w={x:x.clientX,y:x.clientY},v=C3(w,y.getBoundingClientRect()),b=S3(w,v),_=N3(g.getBoundingClientRect()),k=I3([...b,..._]);a(k),h(!0)},[h]);return m.useEffect(()=>()=>f(),[f]),m.useEffect(()=>{if(c&&d){const x=y=>p(y,d),g=y=>p(y,c);return c.addEventListener("pointerleave",x),d.addEventListener("pointerleave",g),()=>{c.removeEventListener("pointerleave",x),d.removeEventListener("pointerleave",g)}}},[c,d,p,f]),m.useEffect(()=>{if(o){const x=g=>{const y=g.target,w={x:g.clientX,y:g.clientY},v=(c==null?void 0:c.contains(y))||(d==null?void 0:d.contains(y)),b=!T3(w,o);v?f():b&&(f(),u())};return document.addEventListener("pointermove",x),()=>document.removeEventListener("pointermove",x)}},[c,d,o,u,f]),l.jsx(NN,{...t,ref:i})}),[b3,_3]=hf(CN,{isInside:!1}),k3=TM("TooltipContent"),NN=m.forwardRef((t,e)=>{const{__scopeTooltip:n,children:r,"aria-label":s,onEscapeKeyDown:i,onPointerDownOutside:o,...a}=t,c=ff(Ea,n),u=Kv(n),{onClose:d}=c;return m.useEffect(()=>(document.addEventListener(Cb,d),()=>document.removeEventListener(Cb,d)),[d]),m.useEffect(()=>{if(c.trigger){const h=f=>{const p=f.target;p!=null&&p.contains(c.trigger)&&d()};return window.addEventListener("scroll",h,{capture:!0}),()=>window.removeEventListener("scroll",h,{capture:!0})}},[c.trigger,d]),l.jsx(nf,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:i,onPointerDownOutside:o,onFocusOutside:h=>h.preventDefault(),onDismiss:d,children:l.jsxs(f3,{"data-state":c.stateAttribute,...u,...a,ref:e,style:{...a.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[l.jsx(k3,{children:r}),l.jsx(b3,{scope:n,isInside:!0,children:l.jsx(XM,{id:c.contentId,role:"tooltip",children:s||r})})]})})});SN.displayName=Ea;var TN="TooltipArrow",E3=m.forwardRef((t,e)=>{const{__scopeTooltip:n,...r}=t,s=Kv(n);return _3(TN,n).isInside?null:l.jsx(p3,{...s,...r,ref:e})});
221E3.displayName=TN;function C3(t,e){const n=Math.abs(e.top-t.y),r=Math.abs(e.bottom-t.y),s=Math.abs(e.right-t.x),i=Math.abs(e.left-t.x);switch(Math.min(n,r,s,i)){case i:return"left";case s:return"right";case n:return"top";case r:return"bottom";default:throw new Error("unreachable")}}function S3(t,e,n=5){const r=[];switch(e){case"top":r.push({x:t.x-n,y:t.y+n},{x:t.x+n,y:t.y+n});break;case"bottom":r.push({x:t.x-n,y:t.y-n},{x:t.x+n,y:t.y-n});break;case"left":r.push({x:t.x+n,y:t.y-n},{x:t.x+n,y:t.y+n});break;case"right":r.push({x:t.x-n,y:t.y-n},{x:t.x-n,y:t.y+n});break}return r}function N3(t){const{top:e,right:n,bottom:r,left:s}=t;return[{x:s,y:e},{x:n,y:e},{x:n,y:r},{x:s,y:r}]}function T3(t,e){const{x:n,y:r}=t;let s=!1;for(let i=0,o=e.length-1;i<e.length;o=i++){const a=e[i],c=e[o],u=a.x,d=a.y,h=c.x,f=c.y;d>r!=f>r&&n<(h-u)*(r-d)/(f-d)+u&&(s=!s)}return s}function I3(t){const e=t.slice();return e.sort((n,r)=>n.x<r.x?-1:n.x>r.x?1:n.y<r.y?-1:n.y>r.y?1:0),P3(e)}function P3(t){if(t.length<=1)return t.slice();const e=[];for(let r=0;r<t.length;r++){const s=t[r];for(;e.length>=2;){const i=e[e.length-1],o=e[e.length-2];if((i.x-o.x)*(s.y-o.y)>=(i.y-o.y)*(s.x-o.x))e.pop();else break}e.push(s)}e.pop();const n=[];for(let r=t.length-1;r>=0;r--){const s=t[r];for(;n.length>=2;){const i=n[n.length-1],o=n[n.length-2];if((i.x-o.x)*(s.y-o.y)>=(i.y-o.y)*(s.x-o.x))n.pop();else break}n.push(s)}return n.pop(),e.length===1&&n.length===1&&e[0].x===n[0].x&&e[0].y===n[0].y?e:e.concat(n)}var j3=EN,IN=SN;const R3=j3,A3=m.forwardRef(({className:t,sideOffset:e=4,...n},r)=>l.jsx(IN,{ref:r,sideOffset:e,className:Dt("z-50 overflow-hidden rounded-md border bg-popover px-3 py-1.5 text-sm text-popover-foreground shadow-md animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",t),...n}));A3.displayName=IN.displayName;/** 222 * @remix-run/router v1.23.2 223 * 224 * Copyright (c) Remix Software Inc. 225 * 226 * This source code is licensed under the MIT license found in the 227 * LICENSE.md file in the root directory of this source tree. 228 * 229 * @license MIT 230 */function yc(){return yc=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},yc.apply(this,arguments)}var Ms;(function(t){t.Pop="POP",t.Push="PUSH",t.Replace="REPLACE"})(Ms||(Ms={}));const Sb="popstate";function D3(t){t===void 0&&(t={});function e(r,s){let{pathname:i,search:o,hash:a}=r.location;return Rg("",{pathname:i,search:o,hash:a},s.state&&s.state.usr||null,s.state&&s.state.key||"default")}function n(r,s){return typeof s=="string"?s:sh(s)}return O3(e,n,null,t)}function Ze(t,e){if(t===!1||t===null||typeof t>"u")throw new Error(e)}function Gv(t,e){if(!t){typeof console<"u"&&console.warn(e);try{throw new Error(e)}catch{}}}function M3(){return Math.random().toString(36).substr(2,8)}function Nb(t,e){return{usr:t.state,key:t.key,idx:e}}function Rg(t,e,n,r){return n===void 0&&(n=null),yc({pathname:typeof t=="string"?t:t.pathname,search:"",hash:""},typeof e=="string"?Ba(e):e,{state:n,key:e&&e.key||r||M3()})}function sh(t){let{pathname:e="/",search:n="",hash:r=""}=t;return n&&n!=="?"&&(e+=n.charAt(0)==="?"?n:"?"+n),r&&r!=="#"&&(e+=r.charAt(0)==="#"?r:"#"+r),e}function Ba(t){let e={};if(t){let n=t.indexOf("#");n>=0&&(e.hash=t.substr(n),t=t.substr(0,n));let r=t.indexOf("?");r>=0&&(e.search=t.substr(r),t=t.substr(0,r)),t&&(e.pathname=t)}return e}function O3(t,e,n,r){r===void 0&&(r={});let{window:s=document.defaultView,v5Compat:i=!1}=r,o=s.history,a=Ms.Pop,c=null,u=d();u==null&&(u=0,o.replaceState(yc({},o.state,{idx:u}),""));function d(){return(o.state||{idx:null}).idx}function h(){a=Ms.Pop;let y=d(),w=y==null?null:y-u;u=y,c&&c({action:a,location:g.location,delta:w})}function f(y,w){a=Ms.Push;let v=Rg(g.location,y,w);u=d()+1;let b=Nb(v,u),_=g.createHref(v);try{o.pushState(b,"",_)}catch(k){if(k instanceof DOMException&&k.name==="DataCloneError")throw k;s.location.assign(_)}i&&c&&c({action:a,location:g.location,delta:1})}function p(y,w){a=Ms.Replace;let v=Rg(g.location,y,w);u=d();let b=Nb(v,u),_=g.createHref(v);o.replaceState(b,"",_),i&&c&&c({action:a,location:g.location,delta:0})}function x(y){let w=s.location.origin!=="null"?s.location.origin:s.location.href,v=typeof y=="string"?y:sh(y);return v=v.replace(/ $/,"%20"),Ze(w,"No window.location.(origin|href) available to create URL for href: "+v),new URL(v,w)}let g={get action(){return a},get location(){return t(s,o)},listen(y){if(c)throw new Error("A history only accepts one active listener");return s.addEventListener(Sb,h),c=y,()=>{s.removeEventListener(Sb,h),c=null}},createHref(y){return e(s,y)},createURL:x,encodeLocation(y){let w=x(y);return{pathname:w.pathname,search:w.search,hash:w.hash}},push:f,replace:p,go(y){return o.go(y)}};return g}var Tb;(function(t){t.data="data",t.deferred="deferred",t.redirect="redirect",t.error="error"})(Tb||(Tb={}));function L3(t,e,n){return n===void 0&&(n="/"),F3(t,e,n,!1)}function F3(t,e,n,r){let s=typeof e=="string"?Ba(e):e,i=qv(s.pathname||"/",n);if(i==null)return null;let o=PN(t);U3(o);let a=null;for(let c=0;a==null&&c<o.length;++c){let u=Q3(i);a=q3(o[c],u,r)}return a}function PN(t,e,n,r){e===void 0&&(e=[]),n===void 0&&(n=[]),r===void 0&&(r="");let s=(i,o,a)=>{let c={relativePath:a===void 0?i.path||"":a,caseSensitive:i.caseSensitive===!0,childrenIndex:o,route:i};c.relativePath.startsWith("/")&&(Ze(c.relativePath.startsWith(r),'Absolute route path "'+c.relativePath+'" nested under path '+('"'+r+'" is not val
230id. An absolute child route path ')+"must start with the combined path of all its parent routes."),c.relativePath=c.relativePath.slice(r.length));let u=Hs([r,c.relativePath]),d=n.concat(c);i.children&&i.children.length>0&&(Ze(i.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+u+'".')),PN(i.children,e,d,u)),!(i.path==null&&!i.index)&&e.push({path:u,score:K3(u,i.index),routesMeta:d})};return t.forEach((i,o)=>{var a;if(i.path===""||!((a=i.path)!=null&&a.includes("?")))s(i,o);else for(let c of jN(i.path))s(i,o,c)}),e}function jN(t){let e=t.split("/");if(e.length===0)return[];let[n,...r]=e,s=n.endsWith("?"),i=n.replace(/\?$/,"");if(r.length===0)return s?[i,""]:[i];let o=jN(r.join("/")),a=[];return a.push(...o.map(c=>c===""?i:[i,c].join("/"))),s&&a.push(...o),a.map(c=>t.startsWith("/")&&c===""?"/":c)}function U3(t){t.sort((e,n)=>e.score!==n.score?n.score-e.score:G3(e.routesMeta.map(r=>r.childrenIndex),n.routesMeta.map(r=>r.childrenIndex)))}const B3=/^:[\w-]+$/,V3=3,$3=2,z3=1,W3=10,H3=-2,Ib=t=>t==="*";function K3(t,e){let n=t.split("/"),r=n.length;return n.some(Ib)&&(r+=H3),e&&(r+=$3),n.filter(s=>!Ib(s)).reduce((s,i)=>s+(B3.test(i)?V3:i===""?z3:W3),r)}function G3(t,e){return t.length===e.length&&t.slice(0,-1).every((r,s)=>r===e[s])?t[t.length-1]-e[e.length-1]:0}function q3(t,e,n){let{routesMeta:r}=t,s={},i="/",o=[];for(let a=0;a<r.length;++a){let c=r[a],u=a===r.length-1,d=i==="/"?e:e.slice(i.length)||"/",h=Pb({path:c.relativePath,caseSensitive:c.caseSensitive,end:u},d),f=c.route;if(!h&&u&&n&&!r[r.length-1].route.index&&(h=Pb({path:c.relativePath,caseSensitive:c.caseSensitive,end:!1},d)),!h)return null;
vendor: 4,204 bytes, lines 230-238
230Object.assign(s,h.params),o.push({params:s,pathname:Hs([i,h.pathname]),pathnameBase:tF(Hs([i,h.pathnameBase])),route:f}),h.pathnameBase!=="/"&&(i=Hs([i,h.pathnameBase]))}return o}function Pb(t,e){typeof t=="string"&&(t={path:t,caseSensitive:!1,end:!0});let[n,r]=Y3(t.path,t.caseSensitive,t.end),s=e.match(n);if(!s)return null;let i=s[0],o=i.replace(/(.)\/+$/,"$1"),a=s.slice(1);return{params:r.reduce((u,d,h)=>{let{paramName:f,isOptional:p}=d;if(f==="*"){let g=a[h]||"";o=i.slice(0,i.length-g.length).replace(/(.)\/+$/,"$1")}const x=a[h];return p&&!x?u[f]=void 0:u[f]=(x||"").replace(/%2F/g,"/"),u},{}),pathname:i,pathnameBase:o,pattern:t}}function Y3(t,e,n){e===void 0&&(e=!1),n===void 0&&(n=!0),Gv(t==="*"||!t.endsWith("*")||t.endsWith("/*"),'Route path "'+t+'" will be treated as if it were '+('"'+t.replace(/\*$/,"/*")+'" because the `*` character must ')+"always follow a `/` in the pattern. To get rid of this warning, "+('please change the route path to "'+t.replace(/\*$/,"/*")+'".'));let r=[],s="^"+t.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(o,a,c)=>(r.push({paramName:a,isOptional:c!=null}),c?"/?([^\\/]+)?":"/([^\\/]+)"));return t.endsWith("*")?(r.push({paramName:"*"}),s+=t==="*"||t==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?s+="\\/*$":t!==""&&t!=="/"&&(s+="(?:(?=\\/|$))"),[new RegExp(s,e?void 0:"i"),r]}function Q3(t){try{return t.split("/").map(e=>decodeURIComponent(e).replace(/\//g,"%2F")).join("/")}catch(e){return Gv(!1,'The URL path "'+t+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent '+("encoding ("+e+").")),t}}function qv(t,e){if(e==="/")return t;if(!t.toLowerCase().startsWith(e.toLowerCase()))return null;let n=e.endsWith("/")?e.length-1:e.length,r=t.charAt(n);return r&&r!=="/"?null:t.slice(n)||"/"}const X3=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,J3=t=>X3.test(t);function Z3(t,e){e===void 0&&(e="/");let{pathname:n,search:r="",hash:s=""}=typeof t=="string"?Ba(t):t,i;if(n)if(J3(n))i=n;else{if(n.includes("//")){let o=n;n=n.replace(/\/\/+/g,"/"),Gv(!1,"Pathnames cannot have embedded double slashes - normalizing "+(o+" -> "+n))}n.startsWith("/")?i=jb(n.substring(1),"/"):i=jb(n,e)}else i=e;return{pathname:i,search:nF(r),hash:rF(s)}}function jb(t,e){let n=e.replace(/\/+$/,"").split("/");return t.split("/").forEach(s=>{s===".."?n.length>1&&n.pop():s!=="."&&n.push(s)}),n.length>1?n.join("/"):"/"}function Op(t,e,n,r){return"Cannot include a '"+t+"' character in a manually specified "+("`to."+e+"` 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 eF(t){return t.filter((e,n)=>n===0||e.route.path&&e.route.path.length>0)}function Yv(t,e){let n=eF(t);return e?n.map((r,s)=>s===n.length-1?r.pathname:r.pathnameBase):n.map(r=>r.pathnameBase)}function Qv(t,e,n,r){r===void 0&&(r=!1);let s;typeof t=="string"?s=Ba(t):(s=yc({},t),Ze(!s.pathname||!s.pathname.includes("?"),Op("?","pathname","search",s)),Ze(!s.pathname||!s.pathname.includes("#"),Op("#","pathname","hash",s)),Ze(!s.search||!s.search.includes("#"),Op("#","search","hash",s)));let i=t===""||s.pathname==="",o=i?"/":s.pathname,a;if(o==null)a=n;else{let h=e.length-1;if(!r&&o.startsWith("..")){let f=o.split("/");for(;f[0]==="..";)f.shift(),h-=1;s.pathname=f.join("/")}a=h>=0?e[h]:"/"}let c=Z3(s,a),u=o&&o!=="/"&&o.endsWith("/"),d=(i||o===".")&&n.endsWith("/");return!c.pathname.endsWith("/")&&(u||d)&&(c.pathname+="/"),c}const Hs=t=>t.join("/").replace(/\/\/+/g,"/"),tF=t=>t.replace(/\/+$/,"").replace(/^\/*/,"/"),nF=t=>!t||t==="?"?"":t.startsWith("?")?t:"?"+t,rF=t=>!t||t==="#"?"":t.startsWith("#")?t:"#"+t;function sF(t){return t!=null&&typeof t.status=="number"&&typeof t.statusText=="string"&&typeof t.internal=="boolean"&&"data"in t}const RN=["post","put","patch","delete"];new Set(RN);const iF=["get",...RN];new Set(iF);/** 231 * React Router v6.30.3 232 * 233 * Copyright (c) Remix Software Inc. 234 * 235 * This source code is licensed under the MIT license found in the 236 * LICENSE.md file in the root directory of this source tree. 237 * 238 * @license MIT
239 */function vc(){return vc=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},vc.apply(this,arguments)}const Xv=m.createContext(null),oF=m.createContext(null),mi=m.createContext(null),pf=m.createContext(null),rs=m.createContext({outlet:null,matches:[],isDataRoute:!1}),AN=m.createContext(null);function aF(t,e){let{relative:n}=e===void 0?{}:e;Va()||Ze(!1);let{basename:r,navigator:s}=m.useContext(mi),{hash:i,pathname:o,search:a}=MN(t,{relative:n}),c=o;return r!=="/"&&(c=o==="/"?r:Hs([r,o])),s.createHref({pathname:c,search:a,hash:i})}function Va(){return m.useContext(pf)!=null}function Rr(){return Va()||Ze(!1),m.useContext(pf).location}function DN(t){m.useContext(mi).static||m.useLayoutEffect(t)}function $a(){let{isDataRoute:t}=m.useContext(rs);return t?wF():lF()}function lF(){Va()||Ze(!1);let t=m.useContext(Xv),{basename:e,future:n,navigator:r}=m.useContext(mi),{matches:s}=m.useContext(rs),{pathname:i}=Rr(),o=JSON.stringify(Yv(s,n.v7_relativeSplatPath)),a=m.useRef(!1);return DN(()=>{a.current=!0}),m.useCallback(function(u,d){if(d===void 0&&(d={}),!a.current)return;if(typeof u=="number"){r.go(u);return}let h=Qv(u,JSON.parse(o),i,d.relative==="path");t==null&&e!=="/"&&(h.pathname=h.pathname==="/"?e:Hs([e,h.pathname])),(d.replace?r.replace:r.push)(h,d.state,d)},[e,r,o,i,t])}function mf(){let{matches:t}=m.useContext(rs),e=t[t.length-1];return e?e.params:{}}function MN(t,e){let{relative:n}=e===void 0?{}:e,{future:r}=m.useContext(mi),{matches:s}=m.useContext(rs),{pathname:i}=Rr(),o=JSON.stringify(Yv(s,r.v7_relativeSplatPath));return m.useMemo(()=>Qv(t,JSON.parse(o),i,n==="path"),[t,o,i,n])}function cF(t,e){return uF(t,e)}function uF(t,e,n,r){Va()||Ze(!1);let{navigator:s}=m.useContext(mi),{matches:i}=m.useContext(rs),o=i[i.length-1],a=o?o.params:{};o&&o.pathname;let c=o?o.pathnameBase:"/";o&&o.route;let u=Rr(),d;if(e){var h;let y=typeof e=="string"?Ba(e):e;c==="/"||(h=y.pathname)!=null&&h.startsWith(c)||Ze(!1),d=y}else d=u;let f=d.pathname||"/",p=f;if(c!=="/"){let y=c.replace(/^\//,"").split("/");p="/"+f.replace(/^\//,"").split("/").slice(y.length).join("/")}let x=L3(t,{pathname:p}),g=mF(x&&x.map(y=>Object.assign({},y,{params:Object.assign({},a,y.params),pathname:Hs([c,s.encodeLocation?s.encodeLocation(y.pathname).pathname:y.pathname]),pathnameBase:y.pathnameBase==="/"?c:Hs([c,s.encodeLocation?s.encodeLocation(y.pathnameBase).pathname:y.pathnameBase])})),i,n,r);return e&&g?m.createElement(pf.Provider,{value:{location:vc({pathname:"/",search:"",hash:"",state:null,key:"default"},d),navigationType:Ms.Pop}},g):g}function dF(){let t=xF(),e=sF(t)?t.status+" "+t.statusText:t instanceof Error?t.message:JSON.stringify(t),n=t instanceof Error?t.stack:null,s={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"};return m.createElement(m.Fragment,null,m.createElement("h2",null,"Unexpected Application Error!"),m.createElement("h3",{style:{fontStyle:"italic"}},e),n?m.createElement("pre",{style:s},n):null,null)}const hF=m.createElement(dF,null);class fF extends m.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,n){return n.location!==e.location||n.revalidation!=="idle"&&e.revalidation==="idle"?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:e.error!==void 0?e.error:n.error,location:n.location,revalidation:e.revalidation||n.revalidation}}componentDidCatch(e,n){console.error("React Router caught the following error during render",e,n)}render(){return this.state.error!==void 0?m.createElement(rs.Provider,{value:this.props.routeContext},m.createElement(AN.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function pF(t){let{routeContext:e,match:n,children:r}=t,s=m.useContext(Xv);return s&&s.static&&s.staticContext&&(n.route.errorElement||n.route.ErrorBoundary)&&(s.staticContext._deepestRenderedBoundaryId=n.route.id),m.createElement(rs.Provider,{value:e},r)}function mF(t,e,n,r){var s;if(e===void 0&&(e=[]),n===void 0&&(n=null),r===void 0&&(r=null),t==null){var i;if(!n)return null;if(n.errors)t=n.matches;else if((i=r)!=null&&i.v7_partialHydration&&e.length===0&&!n.initialized&&n.matches.length>0)t=n.matches;else return null}let o=t,a=(s=n)==null?void 0:s.errors;if(a!=null){let d=o.findIndex(h=>h.route.id&&(a==null?void 0:a[h.route.id])!==void 0);d>=0||Ze(!1),o=o.slice(0,Math.min(o.length,d+1))}let c=!1,u=-1;if(n&&r&&r.v7_partialHydration)for(let d=0;d<o.length;d++){let h=o[d];if((h.route.HydrateFallback||h.route.hydrateFallbackElement)&&(u=d),h.route.id){let{loaderData:f,errors:p}=n,x=h.route.loader&&f[h.route.id]===void 0&&(!p||p[h.route.id]===void 0);if(h.route.lazy||x){c=!0,u>=0?o=o.slice(0,u+1):o=[o[0]];break}}}return o.reduceRight((d,h,f)=>{let p,x=!1,g=null,y=null;n&&(p=a&&h.route.id?a[h.route.id]:void 0,g=h.route.errorElement||hF,c&&(u<0&&f===0?(x=!0,y=null):u===f&&(x=!0,y=h.route.hydrateFallbackElement||null)));let w=e.concat(o.slice(0,f+1)),v=()=>{let b;return p?b=g:x?b=y:h.route.Component?b=m.createElement(h.route.Component,null):h.route.element?b=h.route.element:b=d,m.createElement(pF,{match:h,routeC
239ontext:{outlet:d,matches:w,isDataRoute:n!=null},children:b})};return n&&(h.route.ErrorBoundary||h.route.errorElement||f===0)?m.createElement(fF,{location:n.location,revalidation:n.revalidation,component:g,error:p,children:v(),routeContext:{outlet:null,matches:w,isDataRoute:!0}}):v()},null)}var ON=function(t){return t.UseBlocker="useBlocker",t.UseRevalidator="useRevalidator",t.UseNavigateStable="useNavigate",t}(ON||{}),ih=function(t){return t.UseBlocker="useBlocker",t.UseLoaderData="useLoaderData",t.UseActionData="useActionData",t.UseRouteError="useRouteError",t.UseNavigation="useNavigation",t.UseRouteLoaderData="useRouteLoaderData",t.UseMatches="useMatches",t.UseRevalidator="useRevalidator",t.UseNavigateStable="useNavigate",t.UseRouteId="useRouteId",t}(ih||{});function gF(t){let e=m.useContext(Xv);return e||Ze(!1),e}function yF(t){let e=m.useContext(oF);return e||Ze(!1),e}function vF(t){let e=m.useContext(rs);return e||Ze(!1),e}function LN(t){let e=vF(),n=e.matches[e.matches.length-1];return n.route.id||Ze(!1),n.route.id}function xF(){var t;let e=m.useContext(AN),n=yF(ih.UseRouteError),r=LN(ih.UseRouteError);return e!==void 0?e:(t=n.errors)==null?void 0:t[r]}function wF(){let{router:t}=gF(ON.UseNavigateStable),e=LN(ih.UseNavigateStable),n=m.useRef(!1);return DN(()=>{n.current=!0}),m.useCallback(function(s,i){i===void 0&&(i={}),n.current&&(typeof s=="number"?t.navigate(s):t.navigate(s,vc({fromRouteId:e},i)))},[t,e])}function bF(t,e){t==null||t.v7_startTransition,t==null||t.v7_relativeSplatPath}function ur(t){let{to:e,replace:n,state:r,relative:s}=t;Va()||Ze(!1);let{future:i,static:o}=m.useContext(mi),{matches:a}=m.useContext(rs),{pathname:c}=Rr(),u=$a(),d=Qv(e,Yv(a,i.v7_relativeSplatPath),c,s==="path"),h=JSON.stringify(d);return m.useEffect(()=>u(JSON.parse(h),{replace:n,state:r,relative:s}),[u,h,s,n,r]),null}function Ue(t){Ze(!1)}function _F(t){let{basename:e="/",children:n=null,location:r,navigationType:s=Ms.Pop,navigator:i,static:o=!1,future:a}=t;Va()&&Ze(!1);let c=e.replace(/^\/*/,"/"),u=m.useMemo(()=>({basename:c,navigator:i,static:o,future:vc({v7_relativeSplatPath:!1},a)}),[c,a,i,o]);typeof r=="string"&&(r=Ba(r));let{pathname:d="/",search:h="",hash:f="",state:p=null,key:x="default"}=r,g=m.useMemo(()=>{let y=qv(d,c);return y==null?null:{location:{pathname:y,search:h,hash:f,state:p,key:x},navigationType:s}},[c,d,h,f,p,x,s]);return g==null?null:m.createElement(mi.Provider,{value:u},m.createElement(pf.Provider,{children:n,value:g}))}function kF(t){let{children:e,location:n}=t;return cF(Ag(e),n)}new Promise(()=>{});function Ag(t,e){e===void 0&&(e=[]);let n=[];return m.Children.forEach(t,(r,s)=>{if(!m.isValidElement(r))return;let i=[...e,s];if(r.type===m.Fragment){n.push.apply(n,Ag(r.props.children,i));return}r.type!==Ue&&Ze(!1),!r.props.index||!r.props.children||Ze(!1);let o={id:r.props.id||i.join("-"),caseSensitive:r.props.caseSensitive,element:r.props.element,Component:r.props.Component,index:r.props.index,path:r.props.path,loader:r.props.loader,action:r.props.action,errorElement:r.props.errorElement,ErrorBoundary:r.props.ErrorBoundary,hasErrorBoundary:r.props.ErrorBoundary!=null||r.props.errorElement!=null,shouldRevalidate:r.props.shouldRevalidate,handle:r.props.handle,lazy:r.props.lazy};r.props.children&&(o.children=Ag(r.props.children,i)),n.push(o)}),n}/** 240 * React Router DOM v6.30.3 241 * 242 * Copyright (c) Remix Software Inc. 243 * 244 * This source code is licensed under the MIT license found in the 245 * LICENSE.md file in the root directory of this source tree. 246 * 247 * @license MIT 248 */function Dg(){return Dg=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},Dg.apply(this,arguments)}function EF(t,e){if(t==null)return{};var n={},r=Object.keys(t),s,i;for(i=0;i<r.length;i++)s=r[i],!(e.indexOf(s)>=0)&&(n[s]=t[s]);return n}function CF(t){return!!(t.metaKey||t.altKey||t.ctrlKey||t.shiftKey)}function SF(t,e){return t.button===0&&(!e||e==="_self")&&!CF(t)}function Mg(t){return t===void 0&&(t=""),new URLSearchParams(typeof t=="string"||Array.isArray(t)||t instanceof URLSearchParams?t:Object.keys(t).reduce((e,n)=>{let r=t[n];return e.concat(Array.isArray(r)?r.map(s=>[n,s]):[[n,r]])},[]))}function NF(t,e){let n=Mg(t);return e&&e.forEach((r,s)=>
248{n.has(s)||e.getAll(s).forEach(i=>{n.append(s,i)})}),n}const TF=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset","viewTransition"],IF="6";try{window.__reactRouterVersion=IF}catch{}const PF="startTransition",Rb=By[PF];function jF(t){let{basename:e,children:n,future:r,window:s}=t,i=m.useRef();i.current==null&&(i.current=D3({window:s,v5Compat:!0}));let o=i.current,[a,c]=m.useState({action:o.action,location:o.location}),{v7_startTransition:u}=r||{},d=m.useCallback(h=>{u&&Rb?Rb(()=>c(h)):c(h)},[c,u]);return m.useLayoutEffect(()=>o.listen(d),[o,d]),m.useEffect(()=>bF(r),[r]),m.createElement(_F,{basename:e,children:n,location:a.location,navigationType:a.action,navigator:o,future:r})}const RF=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",AF=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,ge=m.forwardRef(function(e,n){let{onClick:r,relative:s,reloadDocument:i,replace:o,state:a,target:c,to:u,preventScrollReset:d,viewTransition:h}=e,f=EF(e,TF),{basename:p}=m.useContext(mi),x,g=!1;if(typeof u=="string"&&AF.test(u)&&(x=u,RF))try{let b=new URL(window.location.href),_=u.startsWith("//")?new URL(b.protocol+u):new URL(u),k=qv(_.pathname,p);_.origin===b.origin&&k!=null?u=k+_.search+_.hash:g=!0}catch{}let y=aF(u,{relative:s}),w=DF(u,{replace:o,state:a,target:c,preventScrollReset:d,relative:s,viewTransition:h});function v(b){r&&r(b),b.defaultPrevented||w(b)}return m.createElement("a",Dg({},f,{href:x||y,onClick:g||i?r:v,ref:n,target:c}))});var Ab;(function(t){t.UseScrollRestoration="useScrollRestoration",t.UseSubmit="useSubmit",t.UseSubmitFetcher="useSubmitFetcher",t.UseFetcher="useFetcher",t.useViewTransitionState="useViewTransitionState"})(Ab||(Ab={}));var Db;(function(t){t.UseFetcher="useFetcher",t.UseFetchers="useFetchers",t.UseScrollRestoration="useScrollRestoration"})(Db||(Db={}));function DF(t,e){let{target:n,replace:r,state:s,preventScrollReset:i,relative:o,viewTransition:a}=e===void 0?{}:e,c=$a(),u=Rr(),d=MN(t,{relative:o});return m.useCallback(h=>{if(SF(h,n)){h.preventDefault();let f=r!==void 0?r:sh(u)===sh(d);c(t,{replace:f,state:s,preventScrollReset:i,relative:o,viewTransition:a})}},[u,c,d,r,s,n,t,i,o,a])}function MF(t){let e=m.useRef(Mg(t)),n=m.useRef(!1),r=Rr(),s=m.useMemo(()=>NF(r.search,n.current?null:e.current),[r.search]),i=$a(),o=m.useCallback((a,c)=>{const u=Mg(typeof a=="function"?a(s):a);n.current=!0,i("?"+u,c)},[i,s]);return[s,o]}function OF(){const{pathname:t}=Rr();return m.useEffect(()=>{window.scrollTo(0,0)},[t]),null}const Jv=m.createContext({});function ri(t){const e=m.useRef(null);return e.current===null&&(e.current=t()),e.current}const FN=typeof window<"u",gf=FN?m.useLayoutEffect:m.useEffect,yf=m.createContext(null);function Zv(t,e){t.indexOf(e)===-1&&t.push(e)}function ex(t,e){const n=t.indexOf(e);n>-1&&t.splice(n,1)}const rr=(t,e,n)=>n>e?e:n<t?t:n;let vf=()=>{},si=()=>{};const Jr={},UN=t=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(t);function BN(t){return typeof t=="object"&&t!==null}const VN=t=>/^0[^.\s]+$/u.test(t);function tx(t){let e;return()=>(e===void 0&&(e=t()),e)}const tn=t=>t,LF=(t,e)=>n=>e(t(n)),Yc=(...t)=>t.reduce(LF),Ca=(t,e,n)=>{const r=e-t;return r===0?1:(n-t)/r};class nx{constructor(){this.subscriptions=[]}add(e){return Zv(this.subscriptions,e),()=>ex(this.subscriptions,e)}notify(e,n,r){const s=this.subscriptions.length;if(s)if(s===1)this.subscriptions[0](e,n,r);else for(let i=0;i<s;i++){const o=this.subscriptions[i];o&&o(e,n,r)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const _r=t=>t*1e3,Cn=t=>t/1e3;function rx(t,e){return e?t*(1e3/e):0}const $N=(t,e,n)=>(((1-3*n+3*e)*t+(3*n-6*e))*t+3*e)*t,FF=1e-7,UF=12;function BF(t,e,n,r,s){let i,o,a=0;do o=e+(n-e)/2,i=$N(o,r,s)-t,i>0?n=o:e=o;while(Math.abs(i)>FF&&++a<UF);return o}function Qc(t,e,n,r){if(t===e&&n===r)return tn;const s=i=>BF(i,0,1,t,n);return i=>i===0||i===1?i:$N(s(i),e,r)}const zN=t=>e=>e<=.5?t(2*e)/2:(2-t(2*(1-e)))/2,WN=t=>e=>1-t(1-e),HN=Qc(.33,1.53,.69,.99),sx=WN(HN),KN=zN(sx),GN=t=>(t*=2)<1?.5*sx(t):.5*(2-Math.pow(2,-10*(t-1))),ix=t=>1-Math.sin(Math.acos(t)),qN=WN(ix),YN=zN(ix),VF=Qc(.42,0,1,1),$F=Qc(0,0,.58,1),QN=Qc(.42,0,.58,1),zF=t=>Array.isArray(t)&&typeof t[0]!="number",XN=t=>Array.isArray(t)&&typeof t[0]=="number",Mb={linear:tn,easeIn:VF,easeInOut:QN,easeOut:$F,circIn:ix,circInOut:YN,circOut:qN,backIn:sx,backInOut:KN,backOut:HN,anticipate:GN},WF=t=>typeof t=="string",Ob=t=>{if(XN(t)){si(t.length===4,"Cubic bezier arrays must contain four numerical values.","cubic-bezier-length");const[e,n,r,s]=t;
vendor: 7,475 bytes, line 248
248return Qc(e,n,r,s)}else if(WF(t))return si(Mb[t]!==void 0,`Invalid easing type '${t}'`,"invalid-easing-type"),Mb[t];return t},Au=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"],Lb={value:null,addProjectionMetrics:null};function HF(t,e){let n=new Set,r=new Set,s=!1,i=!1;const o=new WeakSet;let a={delta:0,timestamp:0,isProcessing:!1},c=0;function u(h){o.has(h)&&(d.schedule(h),t()),c++,h(a)}const d={schedule:(h,f=!1,p=!1)=>{const g=p&&s?n:r;return f&&o.add(h),g.has(h)||g.add(h),h},cancel:h=>{r.delete(h),o.delete(h)},process:h=>{if(a=h,s){i=!0;return}s=!0,[n,r]=[r,n],n.forEach(u),e&&Lb.value&&Lb.value.frameloop[e].push(c),c=0,n.clear(),s=!1,i&&(i=!1,d.process(h))}};return d}const KF=40;function JN(t,e){let n=!1,r=!0;const s={delta:0,timestamp:0,isProcessing:!1},i=()=>n=!0,o=Au.reduce((b,_)=>(b[_]=HF(i,e?_:void 0),b),{}),{setup:a,read:c,resolveKeyframes:u,preUpdate:d,update:h,preRender:f,render:p,postRender:x}=o,g=()=>{const b=Jr.useManualTiming?s.timestamp:performance.now();n=!1,Jr.useManualTiming||(s.delta=r?1e3/60:Math.max(Math.min(b-s.timestamp,KF),1)),s.timestamp=b,s.isProcessing=!0,a.process(s),c.process(s),u.process(s),d.process(s),h.process(s),f.process(s),p.process(s),x.process(s),s.isProcessing=!1,n&&e&&(r=!1,t(g))},y=()=>{n=!0,r=!0,s.isProcessing||t(g)};return{schedule:Au.reduce((b,_)=>{const k=o[_];return b[_]=(S,C=!1,N=!1)=>(n||y(),k.schedule(S,C,N)),b},{}),cancel:b=>{for(let _=0;_<Au.length;_++)o[Au[_]].cancel(b)},state:s,steps:o}}const{schedule:ke,cancel:Pn,state:dt,steps:Lp}=JN(typeof requestAnimationFrame<"u"?requestAnimationFrame:tn,!0);let md;function GF(){md=void 0}const Bt={now:()=>(md===void 0&&Bt.set(dt.isProcessing||Jr.useManualTiming?dt.timestamp:performance.now()),md),set:t=>{md=t,queueMicrotask(GF)}},ZN=t=>e=>typeof e=="string"&&e.startsWith(t),eT=ZN("--"),qF=ZN("var(--"),ox=t=>qF(t)?YF.test(t.split("/*")[0].trim()):!1,YF=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;function Fb(t){return typeof t!="string"?!1:t.split("/*")[0].includes("var(--")}const za={test:t=>typeof t=="number",parse:parseFloat,transform:t=>t},xc={...za,transform:t=>rr(0,1,t)},Du={...za,default:1},Fl=t=>Math.round(t*1e5)/1e5,ax=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function QF(t){return t==null}const XF=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,lx=(t,e)=>n=>!!(typeof n=="string"&&XF.test(n)&&n.startsWith(t)||e&&!QF(n)&&Object.prototype.hasOwnProperty.call(n,e)),tT=(t,e,n)=>r=>{if(typeof r!="string")return r;const[s,i,o,a]=r.match(ax);return{[t]:parseFloat(s),[e]:parseFloat(i),[n]:parseFloat(o),alpha:a!==void 0?parseFloat(a):1}},JF=t=>rr(0,255,t),Fp={...za,transform:t=>Math.round(JF(t))},Pi={test:lx("rgb","red"),parse:tT("red","green","blue"),transform:({red:t,green:e,blue:n,alpha:r=1})=>"rgba("+Fp.transform(t)+", "+Fp.transform(e)+", "+Fp.transform(n)+", "+Fl(xc.transform(r))+")"};function ZF(t){let e="",n="",r="",s="";return t.length>5?(e=t.substring(1,3),n=t.substring(3,5),r=t.substring(5,7),s=t.substring(7,9)):(e=t.substring(1,2),n=t.substring(2,3),r=t.substring(3,4),s=t.substring(4,5),e+=e,n+=n,r+=r,s+=s),{red:parseInt(e,16),green:parseInt(n,16),blue:parseInt(r,16),alpha:s?parseInt(s,16)/255:1}}const Og={test:lx("#"),parse:ZF,transform:Pi.transform},Xc=t=>({test:e=>typeof e=="string"&&e.endsWith(t)&&e.split(" ").length===1,parse:parseFloat,transform:e=>`${e}${t}`}),ms=Xc("deg"),kr=Xc("%"),Y=Xc("px"),e5=Xc("vh"),t5=Xc("vw"),Ub={...kr,parse:t=>kr.parse(t)/100,transform:t=>kr.transform(t*100)},Lo={test:lx("hsl","hue"),parse:tT("hue","saturation","lightness"),transform:({hue:t,saturation:e,lightness:n,alpha:r=1})=>"hsla("+Math.round(t)+", "+kr.transform(Fl(e))+", "+kr.transform(Fl(n))+", "+Fl(xc.transform(r))+")"},et={test:t=>Pi.test(t)||Og.test(t)||Lo.test(t),parse:t=>Pi.test(t)?Pi.parse(t):Lo.test(t)?Lo.parse(t):Og.parse(t),transform:t=>typeof t=="string"?t:t.hasOwnProperty("red")?Pi.transform(t):Lo.transform(t),getAnimatableNone:t=>{const e=et.parse(t);return e.alpha=0,et.transform(e)}},n5=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function r5(t){var e,n;return isNaN(t)&&typeof t=="string"&&(((e=t.match(ax))==null?void 0:e.length)||0)+(((n=t.match(n5))==null?void 0:n.length)||0)>0}const nT="number",rT="color",s5="var",i5="var(",Bb="${}",o5=/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 wc(t){const e=t.toString(),n=[],r={color:[],number:[],var:[]},s=[];let i=0;const a=e.replace(o5,c=>(et.test(c)?(r.color.push(i),s.push(rT),n.push(et.parse(c))):c.startsWith(i5)?(r.var.push(i),s.push(s5),n.push(c)):(r.number.push(i),s.push(nT),n.push(parseFloat(c))),++i,Bb)).split(Bb);return{values:n,split:a,indexes:r,types:s}}function sT(t){return wc(t).values}function iT(t){const{split:e,types:n}=wc(t),r=e.length;return s=>{let i="";for(let o=0;o<r;o++)if(i+=e[o],s[o]!==void 0){const a=n[o];a===nT?i+=Fl(s[o]):a===rT?i+=et.transform(s[o]):i+=s[o]}return i}}const a5=t=>typeof t=="number"?0:et.test(t)?et.getAnimatableNone(t):t;function l5(t){const e=sT(t);return iT(t)(e.map(a5))}const ii={test:r5,parse:sT,createTransformer:iT,getAnimatableNone:l5};function Up(t,e,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?t+(e-t)*6*n:n<1/2?e:n<2/3?t+(e-t)*(2/3-n)*6:t}function c5({hue:t,saturation:e,lightness:n,alpha:r}){t/=360,e/=100,n/=100;let s=0,i=0,o=0;if(!e)s=i=o=n;else{const a=n<.5?n*(1+e):n+e-n*e,c=2*n-a;s=Up(c,a,t+1/3),i=Up(c,a,t),o=Up(c,a,t-1/3)}return{red:Math.round(s*255),green:Math.round(i*255),blue:Math.round(o*255),alpha:r}}function oh(t,e){return n=>n>0?e:t}const $e=(t,e,n)=>t+(e-t)*n,Bp=(t,e,n)=>{const r=t*t,s=n*(e*e-r)+r;return s<0?0:Math.sqrt(s)},u5=[Og,Pi,Lo],d5=t=>u5.find(e=>e.test(t));function Vb(t){const e=d5(t);if(vf(!!e,`'${t}' is not an animatable color. Use the equivalent color code instead.`,"color-not-animatable"),!e)return!1;let n=e.parse(t);return e===Lo&&(n=c5(n)),n}const $b=(t,e)=>{const n=Vb(t),r=Vb(e);if(!n||!r)return oh(t,e);const s={...n};return i=>(s.red=Bp(n.red,r.red,i),s.green=Bp(n.green,r.green,i),s.blue=Bp(n.blue,r.blue,i),s.alpha=$e(n.alpha,r.alpha,i),Pi.transform(s))},Lg=new Set(["none","hidden"]);function h5(t,e){return Lg.has(t)?n=>n<=0?t:e:n=>n>=1?e:t}function f5(t,e){return n=>$e(t,e,n)}function cx(t){return typeof t=="number"?f5:typeof t=="string"?ox(t)?oh:et.test(t)?$b:g5:Array.isArray(t)?oT:typeof t=="object"?et.test(t)?$b:p5:oh}function oT(t,e){const n=[...t],r=n.length,s=t.map((i,o)=>cx(i)(i,e[o]));return i=>{for(let o=0;o<r;o++)n[o]=s[o](i);return n}}function p5(t,e){const n={...t,...e},r={};for(const s in n)t[s]!==void 0&&e[s]!==void 0&&(r[s]=cx(t[s])(t[s],e[s]));return s=>{for(const i in r)n[i]=r[i](s);return n}}function m5(t,e){const n=[],r={color:0,var:0,number:0};for(let s=0;s<e.values.length;s++){const i=e.types[s],o=t.indexes[i][r[i]],a=t.values[o]??0;n[s]=a,r[i]++}return n}const g5=(t,e)=>{const n=ii.createTransformer(e),r=wc(t),s=wc(e);return r.indexes.var.length===s.indexes.var.length&&r.indexes.color.length===s.indexes.color.length&&r.indexes.number.length>=s.indexes.number.length?Lg.has(t)&&!s.values.length||Lg.has(e)&&!r.values.length?h5(t,e):Yc(oT(m5(r,s),s.values),n):(vf(!0,`Complex values '${t}' and '${e}
248' too different to mix. Ensure all colors are of the same type, and that each contains the same quantity of number and color values. Falling back to instant transition.`,"complex-values-different"),oh(t,e))};function aT(t,e,n){return typeof t=="number"&&typeof e=="number"&&typeof n=="number"?$e(t,e,n):cx(t)(t,e)}const y5=t=>{const e=({timestamp:n})=>t(n);return{start:(n=!0)=>ke.update(e,n),stop:()=>Pn(e),now:()=>dt.isProcessing?dt.timestamp:Bt.now()}},lT=(t,e,n=10)=>{let r="";const s=Math.max(Math.round(e/n),2);for(let i=0;i<s;i++)r+=Math.round(t(i/(s-1))*1e4)/1e4+", ";return`linear(${r.substring(0,r.length-2)})`},ah=2e4;function ux(t){let e=0;const n=50;let r=t.next(e);for(;!r.done&&e<ah;)e+=n,r=t.next(e);return e>=ah?1/0:e}function v5(t,e=100,n){const r=n({...t,keyframes:[0,e]}),s=Math.min(ux(r),ah);return{type:"keyframes",ease:i=>r.next(s*i).value/e,duration:Cn(s)}}const x5=5;function cT(t,e,n){const r=Math.max(e-x5,0);return rx(n-t(r),e-r)}const Be={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},Vp=.001;function w5({duration:t=Be.duration,bounce:e=Be.bounce,velocity:n=Be.velocity,mass:r=Be.mass}){let s,i;vf(t<=_r(Be.maxDuration),"Spring duration must be 10 seconds or less","spring-duration-limit");let o=1-e;o=rr(Be.minDamping,Be.maxDamping,o),t=rr(Be.minDuration,Be.maxDuration,Cn(t)),o<1?(s=u=>{const d=u*o,h=d*t,f=d-n,p=Fg(u,o),x=Math.exp(-h);return Vp-f/p*x},i=u=>{const h=u*o*t,f=h*n+n,p=Math.pow(o,2)*Math.pow(u,2)*t,x=Math.exp(-h),g=Fg(Math.pow(u,2),o);return(-s(u)+Vp>0?-1:1)*((f-p)*x)/g}):(s=u=>{const d=Math.exp(-u*t),h=(u-n)*t+1;return-Vp+d*h},i=u=>{const d=Math.exp(-u*t),h=(n-u)*(t*t);return d*h});const a=5/t,c=_5(s,i,a);if(t=_r(t),isNaN(c))return{stiffness:Be.stiffness,damping:Be.damping,duration:t};{const u=Math.pow(c,2)*r;return{stiffness:u,damping:o*2*Math.sqrt(r*u),duration:t}}}const b5=12;function _5(t,e,n){let r=n;for(let s=1;s<b5;s++)r=r-t(r)/e(r);return r}function Fg(t,e){return t*Math.sqrt(1-e*e)}const k5=["duration","bounce"],E5=["stiffness","damping","mass"];function zb(t,e){return e.some(n=>t[n]!==void 0)}function C5(t){let e={velocity:Be.velocity,stiffness:Be.stiffness,damping:Be.damping,mass:Be.mass,isResolvedFromDuration:!1,...t};if(!zb(t,E5)&&zb(t,k5))if(t.visualDuration){const n=t.visualDuration,r=2*Math.PI/(n*1.2),s=r*r,i=2*rr(.05,1,1-(t.bounce||0))*Math.sqrt(s);e={...e,mass:Be.mass,stiffness:s,damping:i}}else{const n=w5(t);e={...e,...n,mass:Be.mass},e.isResolvedFromDuration=!0}return e}function lh(t=Be.visualDuration,e=Be.bounce){const n=typeof t!="object"?{visualDuration:t,keyframes:[0,1],bounce:e}:t;let{restSpeed:r,restDelta:s}=n;const i=n.keyframes[0],o=n.keyframes[n.keyframes.length-1],a={done:!1,value:i},{stiffness:c,damping:u,mass:d,duration:h,velocity:f,isResolvedFromDuration:p}=C5({...n,velocity:-Cn(n.velocity||0)}),x=f||0,g=u/(2*Math.sqrt(c*d)),y=o-i,w=Cn(Math.sqrt(c/d)),v=Math.abs(y)<5;r||(r=v?Be.restSpeed.granular:Be.restSpeed.default),s||(s=v?Be.restDelta.granular:Be.restDelta.default);let b;if(g<1){const k=Fg(w,g);b=S=>{const C=Math.exp(-g*w*S);return o-C*((x+g*w*y)/k*Math.sin(k*S)+y*Math.cos(k*S))}}else if(g===1)b=k=>o-Math.exp(-w*k)*(y+(x+w*y)*k);
vendor: 16,296 bytes, line 248
248else{const k=w*Math.sqrt(g*g-1);b=S=>{const C=Math.exp(-g*w*S),N=Math.min(k*S,300);return o-C*((x+g*w*y)*Math.sinh(N)+k*y*Math.cosh(N))/k}}const _={calculatedDuration:p&&h||null,next:k=>{const S=b(k);if(p)a.done=k>=h;else{let C=k===0?x:0;g<1&&(C=k===0?_r(x):cT(b,k,S));const N=Math.abs(C)<=r,P=Math.abs(o-S)<=s;a.done=N&&P}return a.value=a.done?o:S,a},toString:()=>{const k=Math.min(ux(_),ah),S=lT(C=>_.next(k*C).value,k,30);return k+"ms "+S},toTransition:()=>{}};return _}lh.applyToOptions=t=>{const e=v5(t,100,lh);return t.ease=e.ease,t.duration=_r(e.duration),t.type="keyframes",t};function Ug({keyframes:t,velocity:e=0,power:n=.8,timeConstant:r=325,bounceDamping:s=10,bounceStiffness:i=500,modifyTarget:o,min:a,max:c,restDelta:u=.5,restSpeed:d}){const h=t[0],f={done:!1,value:h},p=N=>a!==void 0&&N<a||c!==void 0&&N>c,x=N=>a===void 0?c:c===void 0||Math.abs(a-N)<Math.abs(c-N)?a:c;let g=n*e;const y=h+g,w=o===void 0?y:o(y);w!==y&&(g=w-h);const v=N=>-g*Math.exp(-N/r),b=N=>w+v(N),_=N=>{const P=v(N),j=b(N);f.done=Math.abs(P)<=u,f.value=f.done?w:j};let k,S;const C=N=>{p(f.value)&&(k=N,S=lh({keyframes:[f.value,x(f.value)],velocity:cT(b,N,f.value),damping:s,stiffness:i,restDelta:u,restSpeed:d}))};return C(0),{calculatedDuration:null,next:N=>{let P=!1;return!S&&k===void 0&&(P=!0,_(N),C(N)),k!==void 0&&N>=k?S.next(N-k):(!P&&_(N),f)}}}function S5(t,e,n){const r=[],s=n||Jr.mix||aT,i=t.length-1;for(let o=0;o<i;o++){let a=s(t[o],t[o+1]);if(e){const c=Array.isArray(e)?e[o]||tn:e;a=Yc(c,a)}r.push(a)}return r}function dx(t,e,{clamp:n=!0,ease:r,mixer:s}={}){const i=t.length;if(si(i===e.length,"Both input and output ranges must be the same length","range-length"),i===1)return()=>e[0];if(i===2&&e[0]===e[1])return()=>e[1];const o=t[0]===t[1];t[0]>t[i-1]&&(t=[...t].reverse(),e=[...e].reverse());const a=S5(e,r,s),c=a.length,u=d=>{if(o&&d<t[0])return e[0];let h=0;if(c>1)for(;h<t.length-2&&!(d<t[h+1]);h++);const f=Ca(t[h],t[h+1],d);return a[h](f)};return n?d=>u(rr(t[0],t[i-1],d)):u}function N5(t,e){const n=t[t.length-1];for(let r=1;r<=e;r++){const s=Ca(0,e,r);t.push($e(n,1,s))}}function uT(t){const e=[0];return N5(e,t.length-1),e}function T5(t,e){return t.map(n=>n*e)}function I5(t,e){return t.map(()=>e||QN).splice(0,t.length-1)}function Ul({duration:t=300,keyframes:e,times:n,ease:r="easeInOut"}){const s=zF(r)?r.map(Ob):Ob(r),i={done:!1,value:e[0]},o=T5(n&&n.length===e.length?n:uT(e),t),a=dx(o,e,{ease:Array.isArray(s)?s:I5(e,s)});return{calculatedDuration:t,next:c=>(i.value=a(c),i.done=c>=t,i)}}const P5=t=>t!==null;function hx(t,{repeat:e,repeatType:n="loop"},r,s=1){const i=t.filter(P5),a=s<0||e&&n!=="loop"&&e%2===1?0:i.length-1;return!a||r===void 0?i[a]:r}const j5={decay:Ug,inertia:Ug,tween:Ul,keyframes:Ul,spring:lh};function dT(t){typeof t.type=="string"&&(t.type=j5[t.type])}class fx{constructor(){this.updateFinished()}get finished(){return this._finished}updateFinished(){this._finished=new Promise(e=>{this.resolve=e})}notifyFinished(){this.resolve()}then(e,n){return this.finished.then(e,n)}}const R5=t=>t/100;class px extends fx{constructor(e){super(),this.state="idle",this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.stop=()=>{var r,s;const{motionValue:n}=this.options;n&&n.updatedAt!==Bt.now()&&this.tick(Bt.now()),this.isStopped=!0,this.state!=="idle"&&(this.teardown(),(s=(r=this.options).onStop)==null||s.call(r))},this.options=e,this.initAnimation(),this.play(),e.autoplay===!1&&this.pause()}initAnimation(){const{options:e}=this;dT(e);const{type:n=Ul,repeat:r=0,repeatDelay:s=0,repeatType:i,velocity:o=0}=e;let{keyframes:a}=e;const c=n||Ul;c!==Ul&&typeof a[0]!="number"&&(this.mixKeyframes=Yc(R5,aT(a[0],a[1])),a=[0,100]);const u=c({...e,keyframes:a});i==="mirror"&&(this.mirroredGenerator=c({...e,keyframes:[...a].reverse(),velocity:-o})),u.calculatedDuration===null&&(u.calculatedDuration=ux(u));const{calculatedDuration:d}=u;this.calculatedDuration=d,this.resolvedDuration=d+s,this.totalDuration=this.resolvedDuration*(r+1)-s,this.generator=u}updateTime(e){const n=Math.round(e-this.startTime)*this.playbackSpeed;this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=n}tick(e,n=!1){const{generator:r,totalDuration:s,mixKeyframes:i,mirroredGenerator:o,resolvedDuration:a,calculatedDuration:c}=this;if(this.startTime===null)return r.next(0);const{delay:u=0,keyframes:d,repeat:h,repeatType:f,repeatDelay:p,type:x,onUpdate:g,finalKeyframe:y}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,e):this.speed<0&&(this.startTime=Math.min(e-s/this.speed,this.startTime)),n?this.currentTime=e:this.updateTime(e);const w=this.currentTime-u*(this.playbackSpeed>=0?1:-1),v=this.playbackSpeed>=0?w<0:w>s;this.currentTime=Math.max(w,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=s);let b=this.currentTime,_=r;if(h){const N=Math.min(this.currentTime,s)/a;let P=Math.floor(N),j=N%1;!j&&N>=1&&(j=1),j===1&&P--,P=Math.min(P,h+1),!!(P%2)&&(f==="reverse"?(j=1-j,p&&(j-=p/a)):f==="mirror"&&(_=o)),b=rr(0,1,j)*a}const k=v?{done:!1,value:d[0]}:_.next(b);i&&(k.value=i(k.value));let{done:S}=k;!v&&c!==null&&(S=this.playbackSpeed>=0?this.currentTime>=s:this.currentTime<=0);const C=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&S);return C&&x!==Ug&&(k.value=hx(d,this.options,y,this.speed)),g&&g(k.value),C&&this.finish(),k}then(e,n){return this.finished.then(e,n)}get duration(){return Cn(this.calculatedDuration)}get iterationDuration(){const{delay:e=0}=this.options||{};return this.duration+Cn(e)}get time(){return Cn(this.currentTime)}set time(e){var n;e=_r(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),(n=this.driver)==null||n.start(!1)}get speed(){return this.playbackSpeed}set speed(e){this.updateTime(Bt.now());const n=this.playbackSpeed!==e;this.playbackSpeed=e,n&&(this.time=Cn(this.currentTime))}play(){var s,i;if(this.isStopped)return;const{driver:e=y5,startTime:n}=this.options;this.driver||(this.driver=e(o=>this.tick(o))),(i=(s=this.options).onPlay)==null||i.call(s);const r=this.driver.now();this.state==="finished"?(this.updateFinished(),this.startTime=r):this.holdTime!==null?this.startTime=r-this.holdTime:this.startTime||(this.startTime=n??r),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(Bt.now()),this.holdTime=this.currentTime}complete(){this.state!=="running"&&this.play(),this.state="finished",this.holdTime=null}finish(){var e,n;this.notifyFinished(),this.teardown(),this.state="finished",(n=(e=this.options).onComplete)==null||n.call(e)}cancel(){var e,n;this.holdTime=null,this.startTime=0,this.tick(0),this.teardown(),(n=(e=this.options).onCancel)==null||n.call(e)}teardown(){this.state="idle",this.stopDriver(),this.startTime=this.holdTime=null}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(e){return this.startTime=0,this.tick(e,!0)}attachTimeline(e){var n;return this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear",this.initAnimation()),(n=this.driver)==null||n.stop(),e.observe(this)}}function A5(t){for(let e=1;e<t.length;e++)t[e]??(t[e]=t[e-1])}const ji=t=>t*180/Math.PI,Bg=t=>{const e=ji(Math.atan2(t[1],t[0]));return Vg(e)},D5={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:t=>(Math.abs(t[0])+Math.abs(t[3]))/2,rotate:Bg,rotateZ:Bg,skewX:t=>ji(Math.atan(t[1])),skewY:t=>ji(Math.atan(t[2])),skew:t=>(Math.abs(t[1])+Math.abs(t[2]))/2},Vg=t=>(t=t%360,t<0&&(t+=360),t),Wb=Bg,Hb=t=>Math.sqrt(t[0]*t[0]+t[1]*t[1]),Kb=t=>Math.sqrt(t[4]*t[4]+t[5]*t[5]),M5={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:Hb,scaleY:Kb,scale:t=>(Hb(t)+Kb(t))/2,rotateX:t=>Vg(ji(Math.atan2(t[6],t[5]))),rotateY:t=>Vg(ji(Math.atan2(-t[2],t[0]))),rotateZ:Wb,rotate:Wb,skewX:t=>ji(Math.atan(t[4])),skewY:t=>ji(Math.atan(t[1])),skew:t=>(Math.abs(t[1])+Math.abs(t[4]))/2};function $g(t){return t.includes("scale")?1:0}function zg(t,e){if(!t||t==="none")return $g(e);const n=t.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let r,s;if(n)r=M5,s=n;else{const a=t.match(/^matrix\(([-\d.e\s,]+)\)$/u);r=D5,s=a}if(!s)return $g(e);const i=r[e],o=s[1].split(",").map(L5);return typeof i=="function"?i(o):o[i]}const O5=(t,e)=>{const{transform:n="none"}=getComputedStyle(t);return zg(n,e)};function L5(t){return parseFloat(t.trim())}const Wa=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],Ha=new Set(Wa),Gb=t=>t===za||t===Y,F5=new Set(["x","y","z"]),U5=Wa.filter(t=>!F5.has(t));function B5(t){const e=[];return U5.forEach(n=>{const r=t.getValue(n);r!==void 0&&(e.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))}),e}const Os={width:({x:t},{paddingLeft:e="0",paddingRight:n="0"})=>t.max-t.min-parseFloat(e)-parseFloat(n),height:({y:t},{paddingTop:e="0",paddingBottom:n="0"})=>t.max-t.min-parseFloat(e)-parseFloat(n),top:(t,{top:e})=>parseFloat(e),left:(t,{left:e})=>parseFloat(e),bottom:({y:t},{top:e})=>parseFloat(e)+(t.max-t.min),right:({x:t},{left:e})=>parseFloat(e)+(t.max-t.min),x:(t,{transform:e})=>zg(e,"x"),y:(t,{transform:e})=>zg(e,"y")};Os.translateX=Os.x;Os.translateY=Os.y;const zi=new Set;let Wg=!1,Hg=!1,Kg=!1;function hT(){if(Hg){const t=Array.from(zi).filter(r=>r.needsMeasurement),e=new Set(t.map(r=>r.element)),n=new Map;e.forEach(r=>{const s=B5(r);s.length&&(n.set(r,s),r.render())}),t.forEach(r=>r.measureInitialState()),e.forEach(r=>{r.render();const s=n.get(r);s&&s.forEach(([i,o])=>{var a;(a=r.getValue(i))==null||a.set(o)})}),t.forEach(r=>r.measureEndState()),t.forEach(r=>{r.suspendedScrollY!==void 0&&window.scrollTo(0,r.suspendedScrollY)})}Hg=!1,Wg=!1,zi.forEach(t=>t.complete(Kg)),zi.clear()}function fT(){zi.forEach(t=>{t.readKeyframes(),t.needsMeasurement&&(Hg=!0)})}function V5(){Kg=!0,fT(),hT(),Kg=!1}class mx{constructor(e,n,r,s,i,o=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...e],this.onComplete=n,this.name=r,this.motionValue=s,this.element=i,this.isAsync=o}scheduleResolve(){this.state="scheduled",this.isAsync?(zi.add(this),Wg||(Wg=!0,ke.read(fT),ke.resolveKeyframes(hT))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:e,name:n,element:r,motionValue:s}=this;if(e[0]===null){const i=s==null?void 0:s.get(),o=e[e.length-1];if(i!==void 0)e[0]=i;else if(r&&n){const a=r.readValue(n,o);a!=null&&(e[0]=a)}e[0]===void 0&&(e[0]=o),s&&i===void 0&&s.set(e[0])}A5(e)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(e=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,e),zi.delete(this)}cancel(){this.state==="scheduled"&&(zi.delete(this),this.state="pending")}resume(){this.state==="pending"&&this.scheduleResolve()}}const $5=t=>t.startsWith("--");function z5(t,e,n){$5(e)?t.style.setProperty(e,n):t.style[e]=n}const pT=tx(()=>window.ScrollTimeline!==void 0),W5={};function H5(t,e){const n=tx(t);return()=>W5[e]??n()}const mT=H5(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),kl=([t,e,n,r])=>`cubic-bezier(${t}, ${e}, ${n}, ${r})`,qb={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:kl([0,.65,.55,1]),circOut:kl([.55,0,1,.45]),backIn:kl([.31,.01,.66,-.59]),backOut:kl([.33,1.53,.69,.99])};function gT(t,e){if(t)return typeof t=="function"?mT()?lT(t,e):"ease-out":XN(t)?kl(t):Array.isArray(t)?t.map(n=>gT(n,e)||qb.easeOut):qb[t]}function K5(t,e,n,{delay:r=0,duration:s=300,repeat:i=0,repeatType:o="loop",ease:a="easeOut",times:c}={},u=void 0){const d={[e]:n};c&&(d.offset=c);const h=gT(a,s);Array.isArray(h)&&(d.easing=h);const f={delay:r,duration:s,easing:Array.isArray(h)?"linear":h,fill:"both",iterations:i+1,direction:o==="reverse"?"alternate":"normal"};return u&&(f.pseudoElement=u),t.animate(d,f)}function yT(t){return typeof t=="function"&&"applyToOptions"in t}function G5({type:t,...e}){return yT(t)&&mT()?t.applyToOptions(e):(e.duration??(e.duration=300),e.ease??(e.ease="easeOut"),e)}class q5 extends fx{constructor(e){if(super(),this.finishedTime=null,this.isStopped=!1,this.manualStartTime=null,!e)return;const{element:n,name:r,keyframes:s,pseudoElement:i,allowFlatten:o=!1,finalKeyframe:a,onComplete:c}=e;this.isPseudoElement=!!i,this.allowFlatten=o,this.options=e,si(typeof e.type!="string",`Mini animate() doesn't support "type" as a string.`,"mini-spring");const u=G5(e);this.animation=K5(n,r,s,u,i),u.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!i){const d=hx(s,this.options,a,this.speed);this.updateMotionValue?this.updateMotionValue(d):z5(n,r,d),this.animation.cancel()}c==null||c(),this.notifyFinished()}}play(){this.isStopped||(this.manualStartTime=null,this.animation.play(),this.state==="finished"&&this.updateFinished())}pause(){this.animation.pause()}complete(){var e,n;(n=(e=this.animation).finish)==null||n.call(e)}cancel(){try{this.animation.cancel()}catch{}}stop(){if(this.isStopped)return;this.isStopped=!0;const{state:e}=this;e==="idle"||e==="finished"||(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){var e,n;this.isPseudoElement||(n=(e=this.animation).commitStyles)==null||n.call(e)}get duration(){var n,r;const e=((r=(n=this.animation.effect)==null?void 0:n.getComputedTiming)==null?void 0:r.call(n).duration)||0;return Cn(Number(e))}get iterationDuration(){const{delay:e=0}=this.options||{};return this.duration+Cn(e)}get time(){return Cn(Number(this.animation.currentTime)||0)}set time(e){this.manualStartTime=null,this.finishedTime=null,this.animation.currentTime=_r(e)}get speed(){return this.animation.playbackRate}set speed(e){e<0&&(this.finishedTime=null),this.animation.playbackRate=e}get state(){return this.finishedTime!==null?"finished":this.animation.playState}get startTime(){return this.manualStartTime??Number(this.animation.startTime)}set startTime(e){this.manualStartTime=this.animation.startTime=e}attachTimeline({timeline:e,observe:n}){var r;return this.allowFlatten&&((r=this.animation.effect)==null||r.updateTiming({easing:"linear"})),this.animation.onfinish=null,e&&pT()?(this.animation.timeline=e,tn):n(this)}}const vT={anticipate:GN,backInOut:KN,circInOut:YN};function Y5(t){return t in vT}function Q5(t){typeof t.ease=="string"&&Y5(t.ease)&&(t.ease=vT[t.ease])}const $p=10;class X5 extends q5{constructor(e){Q5(e),dT(e),super(e),e.startTime!==void 0&&(this.startTime=e.startTime),this.options=e}updateMotionValue(e){const{motionValue:n,onUpdate:r,onComplete:s,element:i,...o}=this.options;if(!n)return;if(e!==void 0){n.set(e);return}const a=new px({...o,autoplay:!1}),c=Math.max($p,Bt.now()-this.startTime),u=rr(0,$p,c-$p);n.setWithVelocity(a.sample(Math.max(0,c-u)).value,a.sample(c).value,u),a.stop()}}const Yb=(t,e)=>e==="zIndex"?!1:!!(typeof t=="number"||Array.isArray(t)||typeof t=="string"&&(ii.test(t)||t==="0")&&!t.startsWith("url("));function J5(t){const e=t[0];if(t.length===1)return!0;for(let n=0;n<t.length;n++)if(t[n]!==e)return!0}function Z5(t,e,n,r){const s=t[0];if(s===null)return!1;if(e==="display"||e==="visibility")return!0;const i=t[t.length-1],o=Yb(s,e),a=Yb(i,e);return vf(o===a,`You are trying to animate ${e} from "${s}" to "${i}". "${o?i:s}" is not an animatable value.`,"value-not-animatable"),!o||!a?!1:J5(t)||(n==="spring"||yT(n))&&r}function Gg(t){t.duration=0,t.type="keyframes"}const e6=new Set(["opacity","clipPath","filter","transform"]),t6=tx(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));function n6(t){var d;const{motionValue:e,name:n,repeatDelay:r,repeatType:s,damping:i,type:o}=t;if(!(((d=e==null?void 0:e.owner)==null?void 0:d.current)instanceof HTMLElement))return!1;const{onUpdate:c,transformTemplate:u}=e.owner.getProps();return t6()&&n&&e6.has(n)&&(n!=="transform"||!u)&&!c&&!r&&s!=="mirror"&&i!==0&&o!=="inertia"}const r6=40;class s6 extends fx{constructor({autoplay:e=!0,delay:n=0,type:r="keyframes",repeat:s=0,repeatDelay:i=0,repeatType:
248o="loop",keyframes:a,name:c,motionValue:u,element:d,...h}){var x;super(),this.stop=()=>{var g,y;this._animation&&(this._animation.stop(),(g=this.stopTimeline)==null||g.call(this)),(y=this.keyframeResolver)==null||y.cancel()},this.createdAt=Bt.now();const f={autoplay:e,delay:n,type:r,repeat:s,repeatDelay:i,repeatType:o,name:c,motionValue:u,element:d,...h},p=(d==null?void 0:d.KeyframeResolver)||mx;this.keyframeResolver=new p(a,(g,y,w)=>this.onKeyframesResolved(g,y,f,!w),c,u,d),(x=this.keyframeResolver)==null||x.scheduleResolve()}onKeyframesResolved(e,n,r,s){var y,w;this.keyframeResolver=void 0;const{name:i,type:o,velocity:a,delay:c,isHandoff:u,onUpdate:d}=r;this.resolvedAt=Bt.now(),Z5(e,i,o,a)||((Jr.instantAnimations||!c)&&(d==null||d(hx(e,r,n))),e[0]=e[e.length-1],Gg(r),r.repeat=0);const f={startTime:s?this.resolvedAt?this.resolvedAt-this.createdAt>r6?this.resolvedAt:this.createdAt:this.createdAt:void 0,finalKeyframe:n,...r,keyframes:e},p=!u&&n6(f),x=(w=(y=f.motionValue)==null?void 0:y.owner)==null?void 0:w.current,g=p?new X5({...f,element:x}):new px(f);g.finished.then(()=>{this.notifyFinished()}).catch(tn),this.pendingTimeline&&(this.stopTimeline=g.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=g}get finished(){return this._animation?this.animation.finished:this._finished}then(e,n){return this.finished.finally(e).then(()=>{})}get animation(){var e;return this._animation||((e=this.keyframeResolver)==null||e.resume(),V5()),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(){var e;this._animation&&this.animation.cancel(),(e=this.keyframeResolver)==null||e.cancel()}}function xT(t,e,n,r=0,s=1){const i=Array.from(t).sort((u,d)=>u.sortNodePosition(d)).indexOf(e),o=t.size,a=(o-1)*r;return typeof n=="function"?n(i,o):s===1?i*r:a-i*r}const i6=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function o6(t){const e=i6.exec(t);if(!e)return[,];const[,n,r,s]=e;return[`--${n??r}`,s]}const a6=4;function wT(t,e,n=1){si(n<=a6,`Max CSS variable fallback depth detected in property "${t}". This may indicate a circular fallback dependency.`,"max-css-var-depth");const[r,s]=o6(t);if(!r)return;const i=window.getComputedStyle(e).getPropertyValue(r);if(i){const o=i.trim();return UN(o)?parseFloat(o):o}return ox(s)?wT(s,e,n+1):s}const l6={type:"spring",stiffness:500,damping:25,restSpeed:10},c6=t=>({type:"spring",stiffness:550,damping:t===0?2*Math.sqrt(550):30,restSpeed:10}),u6={type:"keyframes",duration:.8},d6={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},h6=(t,{keyframes:e})=>e.length>2?u6:Ha.has(t)?t.startsWith("scale")?c6(e[1]):l6:d6,f6=t=>t!==null;function p6(t,{repeat:e,repeatType:n="loop"},r){const s=t.filter(f6),i=e&&n!=="loop"&&e%2===1?0:s.length-1;return!i||r===void 0?s[i]:r}function gx(t,e){return(t==null?void 0:t[e])??(t==null?void 0:t.default)??t}function m6({when:t,delay:e,delayChildren:n,staggerChildren:r,staggerDirection:s,repeat:i,repeatType:o,repeatDelay:a,from:c,elapsed:u,...d}){return!!Object.keys(d).length}const yx=(t,e,n,r={},s,i)=>o=>{const a=gx(r,t)||{},c=a.delay||r.delay||0;let{elapsed:u=0}=r;u=u-_r(c);const d={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:e.getVelocity(),...a,delay:-u,onUpdate:f=>{e.set(f),a.onUpdate&&a.onUpdate(f)},onComplete:()=>{o(),a.onComplete&&a.onComplete()},name:t,motionValue:e,element:i?void 0:s};m6(a)||Object.assign(d,h6(t,d)),d.duration&&(d.duration=_r(d.duration)),d.repeatDelay&&(d.repeatDelay=_r(d.repeatDelay)),d.from!==void 0&&(d.keyframes[0]=d.from);let h=!1;if((d.type===!1||d.duration===0&&!d.repeatDelay)&&(Gg(d),d.delay===0&&(h=!0)),(Jr.instantAnimations||Jr.skipAnimations)&&(h=!0,Gg(d),d.delay=0),d.allowFlatten=!a.type&&!a.ease,h&&!i&&e.get()!==void 0){const f=p6(d.keyframes,a);if(f!==void 0){ke.update(()=>{d.onUpdate(f),d.onComplete()});return}}return a.isSync?new px(d):new s6(d)};function Qb(t){const e=[{},{}];
vendor: 9,436 bytes, line 248
248return t==null||t.values.forEach((n,r)=>{e[0][r]=n.get(),e[1][r]=n.getVelocity()}),e}function vx(t,e,n,r){if(typeof e=="function"){const[s,i]=Qb(r);e=e(n!==void 0?n:t.custom,s,i)}if(typeof e=="string"&&(e=t.variants&&t.variants[e]),typeof e=="function"){const[s,i]=Qb(r);e=e(n!==void 0?n:t.custom,s,i)}return e}function ea(t,e,n){const r=t.getProps();return vx(r,e,n!==void 0?n:r.custom,t)}const bT=new Set(["width","height","top","left","right","bottom",...Wa]),Xb=30,g6=t=>!isNaN(parseFloat(t)),Bl={current:void 0};class y6{constructor(e,n={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=r=>{var i;const s=Bt.now();if(this.updatedAt!==s&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(r),this.current!==this.prev&&((i=this.events.change)==null||i.notify(this.current),this.dependents))for(const o of this.dependents)o.dirty()},this.hasAnimated=!1,this.setCurrent(e),this.owner=n.owner}setCurrent(e){this.current=e,this.updatedAt=Bt.now(),this.canTrackVelocity===null&&e!==void 0&&(this.canTrackVelocity=g6(this.current))}setPrevFrameValue(e=this.current){this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt}onChange(e){return this.on("change",e)}on(e,n){this.events[e]||(this.events[e]=new nx);const r=this.events[e].add(n);return e==="change"?()=>{r(),ke.read(()=>{this.events.change.getSize()||this.stop()})}:r}clearListeners(){for(const e in this.events)this.events[e].clear()}attach(e,n){this.passiveEffect=e,this.stopPassiveEffect=n}set(e){this.passiveEffect?this.passiveEffect(e,this.updateAndNotify):this.updateAndNotify(e)}setWithVelocity(e,n,r){this.set(n),this.prev=void 0,this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt-r}jump(e,n=!0){this.updateAndNotify(e),this.prev=e,this.prevUpdatedAt=this.prevFrameValue=void 0,n&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}dirty(){var e;(e=this.events.change)==null||e.notify(this.current)}addDependent(e){this.dependents||(this.dependents=new Set),this.dependents.add(e)}removeDependent(e){this.dependents&&this.dependents.delete(e)}get(){return Bl.current&&Bl.current.push(this),this.current}getPrevious(){return this.prev}getVelocity(){const e=Bt.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||e-this.updatedAt>Xb)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,Xb);return rx(parseFloat(this.current)-parseFloat(this.prevFrameValue),n)}start(e){return this.stop(),new Promise(n=>{this.hasAnimated=!0,this.animation=e(n),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(){var e,n;(e=this.dependents)==null||e.clear(),(n=this.events.destroy)==null||n.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function Gn(t,e){return new y6(t,e)}const qg=t=>Array.isArray(t);function v6(t,e,n){t.hasValue(e)?t.getValue(e).set(n):t.addValue(e,Gn(n))}function x6(t){return qg(t)?t[t.length-1]||0:t}function w6(t,e){const n=ea(t,e);let{transitionEnd:r={},transition:s={},...i}=n||{};i={...i,...r};for(const o in i){const a=x6(i[o]);v6(t,o,a)}}const Pt=t=>!!(t&&t.getVelocity);function b6(t){return!!(Pt(t)&&t.add)}function Yg(t,e){const n=t.getValue("willChange");if(b6(n))return n.add(e);if(!n&&Jr.WillChange){const r=new Jr.WillChange("auto");t.addValue("willChange",r),r.add(e)}}function xx(t){return t.replace(/([A-Z])/g,e=>`-${e.toLowerCase()}`)}const _6="framerAppearId",_T="data-"+xx(_6);function kT(t){return t.props[_T]}function k6({protectedKeys:t,needsAnimating:e},n){const r=t.hasOwnProperty(n)&&e[n]!==!0;return e[n]=!1,r}function ET(t,e,{delay:n=0,transitionOverride:r,type:s}={}){let{transition:i=t.getDefaultTransition(),transitionEnd:o,...a}=e;r&&(i=r);const c=[],u=s&&t.animationState&&t.animationState.getState()[s];for(const d in a){const h=t.getValue(d,t.latestValues[d]??null),f=a[d];if(f===void 0||u&&k6(u,d))continue;const p={delay:n,...gx(i||{},d)},x=h.get();if(x!==void 0&&!h.isAnimating&&!Array.isArray(f)&&f===x&&!p.velocity)continue;let g=!1;if(window.MotionHandoffAnimation){const w=kT(t);if(w){const v=window.MotionHandoffAnimation(w,d,ke);v!==null&&(p.startTime=v,g=!0)}}Yg(t,d),h.start(yx(d,h,f,t.shouldReduceMotion&&bT.has(d)?{type:!1}:p,t,g));const y=h.animation;y&&c.push(y)}return o&&Promise.all(c).then(()=>{ke.update(()=>{o&&w6(t,o)})}),c}function Qg(t,e,n={}){var c;const r=ea(t,e,n.type==="exit"?(c=t.presenceContext)==null?void 0:c.custom:void 0);let{transition:s=t.getDefaultTransition()||{}}=r||{};n.transitionOverride&&(s=n.transitionOverride);const i=r?()=>Promise.all(ET(t,r,n)):()=>Promise.resolve(),o=t.variantChildren&&t.variantChildren.size?(u=0)=>{const{delayChildren:d=0,staggerChildren:h,staggerDirection:f}=s;return E6(t,e,u,d,h,f,n)}:()=>Promise.resolve(),{when:a}=s;if(a){const[u,d]=a==="beforeChildren"?[i,o]:[o,i];return u().then(()=>d())}else return Promise.all([i(),o(n.delay)])}function E6(t,e,n=0,r=0,s=0,i=1,o){const a=[];for(const c of t.variantChildren)c.notify("AnimationStart",e),a.push(Qg(c,e,{...o,delay:n+(typeof r=="function"?0:r)+xT(t.variantChildren,c,r,s,i)}).then(()=>c.notify("AnimationComplete",e)));return Promise.all(a)}function C6(t,e,n={}){t.notify("AnimationStart",e);let r;if(Array.isArray(e)){const s=e.map(i=>Qg(t,i,n));r=Promise.all(s)}else if(typeof e=="string")r=Qg(t,e,n);else{const s=typeof e=="function"?ea(t,e,n.custom):e;r=Promise.all(ET(t,s,n))}return r.then(()=>{t.notify("AnimationComplete",e)})}const S6={test:t=>t==="auto",parse:t=>t},CT=t=>e=>e.test(t),ST=[za,Y,kr,ms,t5,e5,S6],Jb=t=>ST.find(CT(t));function N6(t){return typeof t=="number"?t===0:t!==null?t==="none"||t==="0"||VN(t):!0}const T6=new Set(["brightness","contrast","saturate","opacity"]);function I6(t){const[e,n]=t.slice(0,-1).split("(");if(e==="drop-shadow")return t;const[r]=n.match(ax)||[];if(!r)return t;const s=n.replace(r,"");let i=T6.has(e)?1:0;return r!==n&&(i*=100),e+"("+i+s+")"}const P6=/\b([a-z-]*)\(.*?\)/gu,Xg={...ii,getAnimatableNone:t=>{const e=t.match(P6);return e?e.map(I6).join(" "):t}},Zb={...za,transform:Math.round},j6={rotate:ms,rotateX:ms,rotateY:ms,rotateZ:ms,scale:Du,scaleX:Du,scaleY:Du,scaleZ:Du,skew:ms,skewX:ms,skewY:ms,distance:Y,translateX:Y,translateY:Y,translateZ:Y,x:Y,y:Y,z:Y,perspective:Y,transformPerspective:Y,opacity:xc,originX:Ub,originY:Ub,originZ:Y},wx={borderWidth:Y,borderTopWidth:Y,borderRightWidth:Y,borderBottomWidth:Y,borderLeftWidth:Y,borderRadius:Y,borderTopLeftRadius:Y,borderTopRightRadius:Y,borderBottomRightRadius:Y,borderBottomLeftRadius:Y,width:Y,maxWidth:Y,height:Y,maxHeight:Y,top:Y,right:Y,bottom:Y,left:Y,inset:Y,insetBlock:Y,insetBlockStart:Y,insetBlockEnd:Y,insetInline:Y,insetInlineStart:Y,insetInlineEnd:Y,padding:Y,paddingTop:Y,paddingRight:Y,paddingBottom:Y,paddingLeft:Y,paddingBlock:Y,paddingBlockStart:Y,paddingBlockEnd:Y,paddingInline:Y,paddingInlineStart:Y,paddingInlineEnd:Y,margin:Y,marginTop:Y,marginRight:Y,marginBottom:Y,marginLeft:Y,marginBlock:Y,marginBlockStart:Y,marginBlockEnd:Y,marginInline:Y,marginInlineStart:Y,marginInlineEnd:Y,fontSize:Y,backgroundPositionX:Y,backgroundPositionY:Y,...j6,zIndex:Zb,fillOpacity:xc,strokeOpacity:xc,numOctaves:Zb},R6={...wx,color:et,backgroundColor:et,outlineColor:et,fill:et,stroke:et,borderColor:et,borderTopColor:et,borderRightColor:et,borderBottomColor:et,borderLeftColor:et,filter:Xg,WebkitFilter:Xg},NT=t=>R6[t];function TT(t,e){let n=NT(t);return n!==Xg&&(n=ii),n.getAnimatableNone?n.getAnimatableNone(e):void 0}const A6=new Set(["auto","none","0"]);function D6(t,e,n){let r=0,s;for(;r<t.length&&!s;){const i=t[r];typeof i=="string"&&!A6.has(i)&&wc(i).values.length&&(s=t[r]),r++}if(s&&n)for(const i of e)t[i]=TT(n,s)}class M6 extends mx{constructor(e,n,r,s,i){super(e,n,r,s,i,!0)}readKeyframes(){const{unresolvedKeyframes:e,element:n,name:r}=this;if(!n||!n.current)return;super.readKeyframes();for(let d=0;d<e.length;d++){let h=e[d];if(typeof h=="string"&&(h=h.trim(),ox(h))){const f=wT(h,n.current);f!==void 0&&(e[d]=f),d===e.length-1&&(this.finalKeyframe=h)}}if(this.resolveNoneKeyframes(),!bT.has(r)||e.length!==2)return;const[s,i]=e,o=Jb(s),a=Jb(i),c=Fb(s),u=Fb(i);if(c!==u&&Os[r]){this.needsMeasurement=!0;return}if(o!==a)if(Gb(o)&&Gb(a))for(let d=0;d<e.length;d++){const h=e[d];typeof h=="string"&&(e[d]=parseFloat(h))}else Os[r]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){const{unresolvedKeyframes:e,name:n}=this,r=[];for(let s=0;s<e.length;s++)(e[s]===null||N6(e[s]))&&r.push(s);r.length&&D6(e,r,n)}measureInitialState(){const{element:e,unresolvedKeyframes:n,name:r}=this;if(!e||!e.current)return;r==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=Os[r](e.measureViewportBox(),window.getComputedStyle(e.current)),n[0]=this.measuredOrigin;const s=n[n.length-1];s!==void 0&&e.getValue(r,s).jump(s,!1)}measureEndState(){var a;const{element:e,name:n,unresolvedKeyframes:r}=this;if(!e||!e.current)return;const s=e.getValue(n);s&&s.jump(this.measuredOrigin,!1);const i=r.length-1,o=r[i];r[i]=Os[n](e.measureViewportBox(),window.getComputedStyle(e.current)),o!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=o),(a=this.removedTransforms)!=null&&a.length&&this.removedTransforms.forEac
vendor: 6,912 bytes, line 248
248h(([c,u])=>{e.getValue(c).set(u)}),this.resolveNoneKeyframes()}}function bx(t,e,n){if(t==null)return[];if(t instanceof EventTarget)return[t];if(typeof t=="string"){const s=document.querySelectorAll(t);return s?Array.from(s):[]}return Array.from(t).filter(r=>r!=null)}const IT=(t,e)=>e&&typeof t=="number"?e.transform(t):t;function ch(t){return BN(t)&&"offsetHeight"in t}const{schedule:_x,cancel:gJ}=JN(queueMicrotask,!1),Un={x:!1,y:!1};function PT(){return Un.x||Un.y}function O6(t){return t==="x"||t==="y"?Un[t]?null:(Un[t]=!0,()=>{Un[t]=!1}):Un.x||Un.y?null:(Un.x=Un.y=!0,()=>{Un.x=Un.y=!1})}function jT(t,e){const n=bx(t),r=new AbortController,s={passive:!0,...e,signal:r.signal};return[n,s,()=>r.abort()]}function e_(t){return!(t.pointerType==="touch"||PT())}function L6(t,e,n={}){const[r,s,i]=jT(t,n),o=a=>{if(!e_(a))return;const{target:c}=a,u=e(c,a);if(typeof u!="function"||!c)return;const d=h=>{e_(h)&&(u(h),c.removeEventListener("pointerleave",d))};c.addEventListener("pointerleave",d,s)};return r.forEach(a=>{a.addEventListener("pointerenter",o,s)}),i}const RT=(t,e)=>e?t===e?!0:RT(t,e.parentElement):!1,kx=t=>t.pointerType==="mouse"?typeof t.button!="number"||t.button<=0:t.isPrimary!==!1,F6=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function AT(t){return F6.has(t.tagName)||t.isContentEditable===!0}const gd=new WeakSet;function t_(t){return e=>{e.key==="Enter"&&t(e)}}function zp(t,e){t.dispatchEvent(new PointerEvent("pointer"+e,{isPrimary:!0,bubbles:!0}))}const U6=(t,e)=>{const n=t.currentTarget;if(!n)return;const r=t_(()=>{if(gd.has(n))return;zp(n,"down");const s=t_(()=>{zp(n,"up")}),i=()=>zp(n,"cancel");n.addEventListener("keyup",s,e),n.addEventListener("blur",i,e)});n.addEventListener("keydown",r,e),n.addEventListener("blur",()=>n.removeEventListener("keydown",r),e)};function n_(t){return kx(t)&&!PT()}function B6(t,e,n={}){const[r,s,i]=jT(t,n),o=a=>{const c=a.currentTarget;if(!n_(a))return;gd.add(c);const u=e(c,a),d=(p,x)=>{window.removeEventListener("pointerup",h),window.removeEventListener("pointercancel",f),gd.has(c)&&gd.delete(c),n_(p)&&typeof u=="function"&&u(p,{success:x})},h=p=>{d(p,c===window||c===document||n.useGlobalTarget||RT(c,p.target))},f=p=>{d(p,!1)};window.addEventListener("pointerup",h,s),window.addEventListener("pointercancel",f,s)};return r.forEach(a=>{(n.useGlobalTarget?window:a).addEventListener("pointerdown",o,s),ch(a)&&(a.addEventListener("focus",u=>U6(u,s)),!AT(a)&&!a.hasAttribute("tabindex")&&(a.tabIndex=0))}),i}function Ex(t){return BN(t)&&"ownerSVGElement"in t}const yd=new WeakMap;let gs;const DT=(t,e,n)=>(r,s)=>s&&s[0]?s[0][t+"Size"]:Ex(r)&&"getBBox"in r?r.getBBox()[e]:r[n],V6=DT("inline","width","offsetWidth"),$6=DT("block","height","offsetHeight");function z6({target:t,borderBoxSize:e}){var n;(n=yd.get(t))==null||n.forEach(r=>{r(t,{get width(){return V6(t,e)},get height(){return $6(t,e)}})})}function W6(t){t.forEach(z6)}function H6(){typeof ResizeObserver>"u"||(gs=new ResizeObserver(W6))}function K6(t,e){gs||H6();const n=bx(t);return n.forEach(r=>{let s=yd.get(r);s||(s=new Set,yd.set(r,s)),s.add(e),gs==null||gs.observe(r)}),()=>{n.forEach(r=>{const s=yd.get(r);s==null||s.delete(e),s!=null&&s.size||gs==null||gs.unobserve(r)})}}const vd=new Set;let Fo;function G6(){Fo=()=>{const t={get width(){return window.innerWidth},get height(){return window.innerHeight}};vd.forEach(e=>e(t))},window.addEventListener("resize",Fo)}function q6(t){return vd.add(t),Fo||G6(),()=>{vd.delete(t),!vd.size&&typeof Fo=="function"&&(window.removeEventListener("resize",Fo),Fo=void 0)}}function Y6(t,e){return typeof t=="function"?q6(t):K6(t,e)}function MT(t,e){let n;const r=()=>{const{currentTime:s}=e,o=(s===null?0:s.value)/100;n!==o&&t(o),n=o};return ke.preUpdate(r,!0),()=>Pn(r)}function Q6(t){return Ex(t)&&t.tagName==="svg"}function X6(...t){const e=!Array.isArray(t[0]),n=e?0:-1,r=t[0+n],s=t[1+n],i=t[2+n],o=t[3+n],a=dx(s,i,o);return e?a(r):a}const J6=[...ST,et,ii],Z6=t=>J6.find(CT(t)),r_=()=>({translate:0,scale:1,origin:0,originPoint:0}),Uo=()=>({x:r_(),y:r_()}),s_=()=>({min:0,max:0}),it=()=>({x:s_(),y:s_()}),Jg={current:null},OT={current:!1},eU=typeof window<"u";function tU(){if(OT.current=!0,!!eU)if(window.matchMedia){const t=window.matchMedia("(prefers-reduced-motion)"),e=()=>Jg.current=t.matches;t.addEventListener("change",e),e()}else Jg.current=!1}const nU=new WeakMap;function xf(t){return t!==null&&typeof t=="object"&&typeof t.start=="function"}function bc(t){return typeof t=="string"||Array.isArray(t)}const Cx=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],Sx=["initial",...Cx];function wf(t){return xf(t.animate)||Sx.some(e=>bc(t[e]))}function LT(t){return!!(wf(t)||t.variants)}function rU(t,e,n){for(const r in e){const s=e[r],i=n[r];if(Pt(s))t.addValue(r,s);else if(Pt(i))t.addValue(r,Gn(s,{owner:t}));else if(i!==s)if(t.hasValue(r)){const o=t.getValue(r);o.liveStyle===!0?o.jump(s):o.hasAnimated||o.set(s)}else{const o=t.getStaticValue(r);t.addValue(r,Gn(o!==void 0?o:s,{owner:t}))}}for(const r in n)e[r]===void 0&&t.removeValue(r);return e}const i_=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];let uh={};function FT(t){uh=t}function sU(){return uh}class iU{scrapeMotionValuesFromProps(e,n,r){return{}}constructor({parent:e,props:n,presenceContext:r,reducedMotionConfig:s,blockInitialAnimation:i,visualState:o},a={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=mx,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},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=()=>{const f=Bt.now();this.renderScheduledAt<f&&(this.renderScheduledAt=f,ke.render(this.render,!1,!0))};const{latestValues:c,renderState:u}=o;this.latestValues=c,this.baseTarget={...c},this.initialValues=n.initial?{...c}:{},this.renderState=u,this.parent=e,this.props=n,this.presenceContext=r,this.depth=e?e.depth+1:0,this.reducedMotionConfig=s,this.options=a,this.blockInitialAnimation=!!i,this.isControllingVariants=wf(n),this.isVariantNode=LT(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(e&&e.current);const{willChange:d,...h}=this.scrapeMotionValuesFromProps(n,{},this);for(const f in h){const p=h[f];c[f]!==void 0&&Pt(p)&&p.set(c[f])}}mount(e){var n;this.current=e,nU.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.forEac
vendor: 7,919 bytes, line 248
248h((r,s)=>this.bindToMotionValue(s,r)),this.reducedMotionConfig==="never"?this.shouldReduceMotion=!1:this.reducedMotionConfig==="always"?this.shouldReduceMotion=!0:(OT.current||tU(),this.shouldReduceMotion=Jg.current),(n=this.parent)==null||n.addChild(this),this.update(this.props,this.presenceContext)}unmount(){var e;this.projection&&this.projection.unmount(),Pn(this.notifyUpdate),Pn(this.render),this.valueSubscriptions.forEach(n=>n()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),(e=this.parent)==null||e.removeChild(this);for(const n in this.events)this.events[n].clear();for(const n in this.features){const r=this.features[n];r&&(r.unmount(),r.isMounted=!1)}this.current=null}addChild(e){this.children.add(e),this.enteringChildren??(this.enteringChildren=new Set),this.enteringChildren.add(e)}removeChild(e){this.children.delete(e),this.enteringChildren&&this.enteringChildren.delete(e)}bindToMotionValue(e,n){this.valueSubscriptions.has(e)&&this.valueSubscriptions.get(e)();const r=Ha.has(e);r&&this.onBindTransform&&this.onBindTransform();const s=n.on("change",o=>{this.latestValues[e]=o,this.props.onUpdate&&ke.preRender(this.notifyUpdate),r&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()});let i;typeof window<"u"&&window.MotionCheckAppearSync&&(i=window.MotionCheckAppearSync(this,e,n)),this.valueSubscriptions.set(e,()=>{s(),i&&i(),n.owner&&n.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 uh){const n=uh[e];if(!n)continue;const{isEnabled:r,Feature:s}=n;if(!this.features[e]&&s&&r(this.props)&&(this.features[e]=new s(this)),this.features[e]){const i=this.features[e];i.isMounted?i.update():(i.mount(),i.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):it()}getStaticValue(e){return this.latestValues[e]}setStaticValue(e,n){this.latestValues[e]=n}update(e,n){(e.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=e,this.prevPresenceContext=this.presenceContext,this.presenceContext=n;for(let r=0;r<i_.length;r++){const s=i_[r];this.propEventSubscriptions[s]&&(this.propEventSubscriptions[s](),delete this.propEventSubscriptions[s]);const i="on"+s,o=e[i];o&&(this.propEventSubscriptions[s]=this.on(s,o))}this.prevMotionValues=rU(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){const n=this.getClosestVariantNode();if(n)return n.variantChildren&&n.variantChildren.add(e),()=>n.variantChildren.delete(e)}addValue(e,n){const r=this.values.get(e);n!==r&&(r&&this.removeValue(e),this.bindToMotionValue(e,n),this.values.set(e,n),this.latestValues[e]=n.get())}removeValue(e){this.values.delete(e);const n=this.valueSubscriptions.get(e);n&&(n(),this.valueSubscriptions.delete(e)),delete this.latestValues[e],this.removeValueFromRenderState(e,this.renderState)}hasValue(e){return this.values.has(e)}getValue(e,n){if(this.props.values&&this.props.values[e])return this.props.values[e];let r=this.values.get(e);return r===void 0&&n!==void 0&&(r=Gn(n===null?void 0:n,{owner:this}),this.addValue(e,r)),r}readValue(e,n){let r=this.latestValues[e]!==void 0||!this.current?this.latestValues[e]:this.getBaseTargetFromProps(this.props,e)??this.readValueFromInstance(this.current,e,this.options);return r!=null&&(typeof r=="string"&&(UN(r)||VN(r))?r=parseFloat(r):!Z6(r)&&ii.test(n)&&(r=TT(e,n)),this.setBaseTarget(e,Pt(r)?r.get():r)),Pt(r)?r.get():r}setBaseTarget(e,n){this.baseTarget[e]=n}getBaseTarget(e){var i;const{initial:n}=this.props;let r;if(typeof n=="string"||typeof n=="object"){const o=vx(this.props,n,(i=this.presenceContext)==null?void 0:i.custom);o&&(r=o[e])}if(n&&r!==void 0)return r;const s=this.getBaseTargetFromProps(this.props,e);return s!==void 0&&!Pt(s)?s:this.initialValues[e]!==void 0&&r===void 0?void 0:this.baseTarget[e]}on(e,n){return this.events[e]||(this.events[e]=new nx),this.events[e].add(n)}notify(e,...n){this.events[e]&&this.events[e].notify(...n)}scheduleRenderMicrotask(){_x.render(this.render)}}class UT extends iU{constructor(){super(...arguments),this.KeyframeResolver=M6}sortInstanceNodePosition(e,n){return e.compareDocumentPosition(n)&2?1:-1}getBaseTargetFromProps(e,n){const r=e.style;return r?r[n]:void 0}removeValueFromRenderState(e,{vars:n,style:r}){delete n[e],delete r[e]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:e}=this.props;Pt(e)&&(this.childSubscription=e.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}}class gi{constructor(e){this.isMounted=!1,this.node=e}update(){}}function BT({top:t,left:e,right:n,bottom:r}){return{x:{min:e,max:n},y:{min:t,max:r}}}function oU({x:t,y:e}){return{top:e.min,right:t.max,bottom:e.max,left:t.min}}function aU(t,e){if(!e)return t;const n=e({x:t.left,y:t.top}),r=e({x:t.right,y:t.bottom});return{top:n.y,left:n.x,bottom:r.y,right:r.x}}function Wp(t){return t===void 0||t===1}function Zg({scale:t,scaleX:e,scaleY:n}){return!Wp(t)||!Wp(e)||!Wp(n)}function ki(t){return Zg(t)||VT(t)||t.z||t.rotate||t.rotateX||t.rotateY||t.skewX||t.skewY}function VT(t){return o_(t.x)||o_(t.y)}function o_(t){return t&&t!=="0%"}function dh(t,e,n){const r=t-n,s=e*r;return n+s}function a_(t,e,n,r,s){return s!==void 0&&(t=dh(t,s,r)),dh(t,n,r)+e}function ey(t,e=0,n=1,r,s){t.min=a_(t.min,e,n,r,s),t.max=a_(t.max,e,n,r,s)}function $T(t,{x:e,y:n}){ey(t.x,e.translate,e.scale,e.originPoint),ey(t.y,n.translate,n.scale,n.originPoint)}const l_=.999999999999,c_=1.0000000000001;function lU(t,e,n,r=!1){const s=n.length;if(!s)return;e.x=e.y=1;let i,o;for(let a=0;a<s;a++){i=n[a],o=i.projectionDelta;const{visualElement:c}=i.options;c&&c.props.style&&c.props.style.display==="contents"||(r&&i.options.layoutScroll&&i.scroll&&i!==i.root&&Vo(t,{x:-i.scroll.offset.x,y:-i.scroll.offset.y}),o&&(e.x*=o.x.scale,e.y*=o.y.scale,$T(t,o)),r&&ki(i.latestValues)&&Vo(t,i.latestValues))}e.x<c_&&e.x>l_&&(e.x=1),e.y<c_&&e.y>l_&&(e.y=1)}function Bo(t,e){t.min=t.min+e,t.max=t.max+e}function u_(t,e,n,r,s=.5){const i=$e(t.min,t.max,s);ey(t,e,n,i,r)}function Vo(t,e){u_(t.x,e.x,e.scaleX,e.scale,e.originX),u_(t.y,e.y,e.scaleY,e.scale,e.originY)}function zT(t,e){return BT(aU(t.getBoundingClientRect(),e))}function cU(t,e,n){const r=zT(t,n),{scroll:s}=e;return s&&(Bo(r.x,s.offset.x),Bo(r.y,s.offset.y)),r}const uU={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},dU=Wa.length;function hU(t,e,n){let r="",s=!0;for(let i=0;i<dU;i++){const o=Wa[i],a=t[o];if(a===void 0)continue;let c=!0;if(typeof a=="number")c=a===(o.startsWith("scale")?1:0);else{const u=parseFloat(a);c=o.startsWith("scale")?u===1:u===0}if(!c||n){const u=IT(a,wx[o]);if(!c){s=!1;const d=uU[o]||o;r+=`${d}(${u}) `}n&&(e[o]=u)}}return r=r.trim(),n?r=n(e,s?"":r):s&&(r="none"),r}function Nx(t,e,n){const{style:r,vars:s,transformOrigin:i}=t;let o=!1,a=!1;for(const c in e){const u=e[c];if(Ha.has(c)){o=!0;continue}else if(eT(c)){s[c]=u;continue}else{const d=IT(u,wx[c]);c.startsWith("origin")?(a=!0,i[c]=d):r[c]=d}}if(e.transform||(o||n?r.transform=hU(e,t.transform,n):r.transform&&(r.transform="none")),a){const{originX:c="50%",originY:u="50%",originZ:d=0}=i;r.transformOrigin=`${c} ${u} ${d}`}}function WT(t,{style:e,vars:n}
vendor: 3,794 bytes, line 248
248,r,s){const i=t.style;let o;for(o in e)i[o]=e[o];s==null||s.applyProjectionStyles(i,r);for(o in n)i.setProperty(o,n[o])}function d_(t,e){return e.max===e.min?0:t/(e.max-e.min)*100}const hl={correct:(t,e)=>{if(!e.target)return t;if(typeof t=="string")if(Y.test(t))t=parseFloat(t);else return t;const n=d_(t,e.target.x),r=d_(t,e.target.y);return`${n}% ${r}%`}},fU={correct:(t,{treeScale:e,projectionDelta:n})=>{const r=t,s=ii.parse(t);if(s.length>5)return r;const i=ii.createTransformer(t),o=typeof s[0]!="number"?1:0,a=n.x.scale*e.x,c=n.y.scale*e.y;s[0+o]/=a,s[1+o]/=c;const u=$e(a,c,.5);return typeof s[2+o]=="number"&&(s[2+o]/=u),typeof s[3+o]=="number"&&(s[3+o]/=u),i(s)}},ty={borderRadius:{...hl,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:hl,borderTopRightRadius:hl,borderBottomLeftRadius:hl,borderBottomRightRadius:hl,boxShadow:fU};function HT(t,{layout:e,layoutId:n}){return Ha.has(t)||t.startsWith("origin")||(e||n!==void 0)&&(!!ty[t]||t==="opacity")}function Tx(t,e,n){var o;const r=t.style,s=e==null?void 0:e.style,i={};if(!r)return i;for(const a in r)(Pt(r[a])||s&&Pt(s[a])||HT(a,t)||((o=n==null?void 0:n.getValue(a))==null?void 0:o.liveStyle)!==void 0)&&(i[a]=r[a]);return i}function pU(t){return window.getComputedStyle(t)}class mU extends UT{constructor(){super(...arguments),this.type="html",this.renderInstance=WT}readValueFromInstance(e,n){var r;if(Ha.has(n))return(r=this.projection)!=null&&r.isProjecting?$g(n):O5(e,n);{const s=pU(e),i=(eT(n)?s.getPropertyValue(n):s[n])||0;return typeof i=="string"?i.trim():i}}measureInstanceViewportBox(e,{transformPagePoint:n}){return zT(e,n)}build(e,n,r){Nx(e,n,r.transformTemplate)}scrapeMotionValuesFromProps(e,n,r){return Tx(e,n,r)}}const gU={offset:"stroke-dashoffset",array:"stroke-dasharray"},yU={offset:"strokeDashoffset",array:"strokeDasharray"};function vU(t,e,n=1,r=0,s=!0){t.pathLength=1;const i=s?gU:yU;t[i.offset]=`${-r}`,t[i.array]=`${e} ${n}`}const xU=["offsetDistance","offsetPath","offsetRotate","offsetAnchor"];function KT(t,{attrX:e,attrY:n,attrScale:r,pathLength:s,pathSpacing:i=1,pathOffset:o=0,...a},c,u,d){if(Nx(t,a,u),c){t.style.viewBox&&(t.attrs.viewBox=t.style.viewBox);return}t.attrs=t.style,t.style={};const{attrs:h,style:f}=t;h.transform&&(f.transform=h.transform,delete h.transform),(f.transform||h.transformOrigin)&&(f.transformOrigin=h.transformOrigin??"50% 50%",delete h.transformOrigin),f.transform&&(f.transformBox=(d==null?void 0:d.transformBox)??"fill-box",delete h.transformBox);for(const p of xU)h[p]!==void 0&&(f[p]=h[p],delete h[p]);e!==void 0&&(h.x=e),n!==void 0&&(h.y=n),r!==void 0&&(h.scale=r),s!==void 0&&vU(h,s,i,o,!1)}const GT=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"]),qT=t=>typeof t=="string"&&t.toLowerCase()==="svg";function wU(t,e,n,r){WT(t,e,void 0,r);for(const s in e.attrs)t.setAttribute(GT.has(s)?s:xx(s),e.attrs[s])}function YT(t,e,n){const r=Tx(t,e,n);for(const s in t)if(Pt(t[s])||Pt(e[s])){const i=Wa.indexOf(s)!==-1?"attr"+s.charAt(0).toUpperCase()+s.substring(1):s;r[i]=t[s]}return r}class bU extends UT{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=it}getBaseTargetFromProps(e,n){return e[n]}readValueFromInstance(e,n){if(Ha.has(n)){const r=NT(n);return r&&r.default||0}return n=GT.has(n)?n:xx(n),e.getAttribute(n)}scrapeMotionValuesFromProps(e,n,r){return YT(e,n,r)}build(e,n,r){KT(e,n,this.isSVGTag,r.transformTemplate,r.style)}
vendor: 24,356 bytes, line 248
248renderInstance(e,n,r,s){wU(e,n,r,s)}mount(e){this.isSVGTag=qT(e.tagName),super.mount(e)}}const _U=Sx.length;function QT(t){if(!t)return;if(!t.isControllingVariants){const n=t.parent?QT(t.parent)||{}:{};return t.props.initial!==void 0&&(n.initial=t.props.initial),n}const e={};for(let n=0;n<_U;n++){const r=Sx[n],s=t.props[r];(bc(s)||s===!1)&&(e[r]=s)}return e}function XT(t,e){if(!Array.isArray(e))return!1;const n=e.length;if(n!==t.length)return!1;for(let r=0;r<n;r++)if(e[r]!==t[r])return!1;return!0}const kU=[...Cx].reverse(),EU=Cx.length;function CU(t){return e=>Promise.all(e.map(({animation:n,options:r})=>C6(t,n,r)))}function SU(t){let e=CU(t),n=h_(),r=!0;const s=c=>(u,d)=>{var f;const h=ea(t,d,c==="exit"?(f=t.presenceContext)==null?void 0:f.custom:void 0);if(h){const{transition:p,transitionEnd:x,...g}=h;u={...u,...g,...x}}return u};function i(c){e=c(t)}function o(c){const{props:u}=t,d=QT(t.parent)||{},h=[],f=new Set;let p={},x=1/0;for(let y=0;y<EU;y++){const w=kU[y],v=n[w],b=u[w]!==void 0?u[w]:d[w],_=bc(b),k=w===c?v.isActive:null;k===!1&&(x=y);let S=b===d[w]&&b!==u[w]&&_;if(S&&r&&t.manuallyAnimateOnMount&&(S=!1),v.protectedKeys={...p},!v.isActive&&k===null||!b&&!v.prevProp||xf(b)||typeof b=="boolean")continue;const C=NU(v.prevProp,b);let N=C||w===c&&v.isActive&&!S&&_||y>x&&_,P=!1;const j=Array.isArray(b)?b:[b];let O=j.reduce(s(w),{});k===!1&&(O={});const{prevResolvedValues:L={}}=v,K={...L,...O},U=R=>{N=!0,f.has(R)&&(P=!0,f.delete(R)),v.needsAnimating[R]=!0;const E=t.getValue(R);E&&(E.liveStyle=!1)};for(const R in K){const E=O[R],T=L[R];if(p.hasOwnProperty(R))continue;let I=!1;qg(E)&&qg(T)?I=!XT(E,T):I=E!==T,I?E!=null?U(R):f.add(R):E!==void 0&&f.has(R)?U(R):v.protectedKeys[R]=!0}v.prevProp=b,v.prevResolvedValues=O,v.isActive&&(p={...p,...O}),r&&t.blockInitialAnimation&&(N=!1);const A=S&&C;N&&(!A||P)&&h.push(...j.map(R=>{const E={type:w};if(typeof R=="string"&&r&&!A&&t.manuallyAnimateOnMount&&t.parent){const{parent:T}=t,I=ea(T,R);if(T.enteringChildren&&I){const{delayChildren:H}=I.transition||{};E.delay=xT(T.enteringChildren,t,H)}}return{animation:R,options:E}}))}if(f.size){const y={};if(typeof u.initial!="boolean"){const w=ea(t,Array.isArray(u.initial)?u.initial[0]:u.initial);w&&w.transition&&(y.transition=w.transition)}f.forEach(w=>{const v=t.getBaseTarget(w),b=t.getValue(w);b&&(b.liveStyle=!0),y[w]=v??null}),h.push({animation:y})}let g=!!h.length;return r&&(u.initial===!1||u.initial===u.animate)&&!t.manuallyAnimateOnMount&&(g=!1),r=!1,g?e(h):Promise.resolve()}function a(c,u){var h;if(n[c].isActive===u)return Promise.resolve();(h=t.variantChildren)==null||h.forEach(f=>{var p;return(p=f.animationState)==null?void 0:p.setActive(c,u)}),n[c].isActive=u;const d=o(c);for(const f in n)n[f].protectedKeys={};return d}return{animateChanges:o,setActive:a,setAnimateFunction:i,getState:()=>n,reset:()=>{n=h_()}}}function NU(t,e){return typeof e=="string"?e!==t:Array.isArray(e)?!XT(e,t):!1}function wi(t=!1){return{isActive:t,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function h_(){return{animate:wi(!0),whileInView:wi(),whileHover:wi(),whileTap:wi(),whileDrag:wi(),whileFocus:wi(),exit:wi()}}function f_(t,e){t.min=e.min,t.max=e.max}function Ln(t,e){f_(t.x,e.x),f_(t.y,e.y)}function p_(t,e){t.translate=e.translate,t.scale=e.scale,t.originPoint=e.originPoint,t.origin=e.origin}const JT=1e-4,TU=1-JT,IU=1+JT,ZT=.01,PU=0-ZT,jU=0+ZT;function Vt(t){return t.max-t.min}function RU(t,e,n){return Math.abs(t-e)<=n}function m_(t,e,n,r=.5){t.origin=r,t.originPoint=$e(e.min,e.max,t.origin),t.scale=Vt(n)/Vt(e),t.translate=$e(n.min,n.max,t.origin)-t.originPoint,(t.scale>=TU&&t.scale<=IU||isNaN(t.scale))&&(t.scale=1),(t.translate>=PU&&t.translate<=jU||isNaN(t.translate))&&(t.translate=0)}function Vl(t,e,n,r){m_(t.x,e.x,n.x,r?r.originX:void 0),m_(t.y,e.y,n.y,r?r.originY:void 0)}function g_(t,e,n){t.min=n.min+e.min,t.max=t.min+Vt(e)}function AU(t,e,n){g_(t.x,e.x,n.x),g_(t.y,e.y,n.y)}function y_(t,e,n){t.min=e.min-n.min,t.max=t.min+Vt(e)}function hh(t,e,n){y_(t.x,e.x,n.x),y_(t.y,e.y,n.y)}function v_(t,e,n,r,s){return t-=e,t=dh(t,1/n,r),s!==void 0&&(t=dh(t,1/s,r)),t}function DU(t,e=0,n=1,r=.5,s,i=t,o=t){if(kr.test(e)&&(e=parseFloat(e),e=$e(o.min,o.max,e/100)-o.min),typeof e!="number")return;let a=$e(i.min,i.max,r);t===i&&(a-=e),t.min=v_(t.min,e,n,a,s),t.max=v_(t.max,e,n,a,s)}function x_(t,e,[n,r,s],i,o){DU(t,e[n],e[r],e[s],e.scale,i,o)}const MU=["x","scaleX","originX"],OU=["y","scaleY","originY"];function w_(t,e,n,r){x_(t.x,e,MU,n?n.x:void 0,r?r.x:void 0),x_(t.y,e,OU,n?n.y:void 0,r?r.y:void 0)}function b_(t){return t.translate===0&&t.scale===1}function eI(t){return b_(t.x)&&b_(t.y)}function __(t,e){return t.min===e.min&&t.max===e.max}function LU(t,e){return __(t.x,e.x)&&__(t.y,e.y)}function k_(t,e){return Math.round(t.min)===Math.round(e.min)&&Math.round(t.max)===Math.round(e.max)}function tI(t,e){return k_(t.x,e.x)&&k_(t.y,e.y)}function E_(t){return Vt(t.x)/Vt(t.y)}function C_(t,e){return t.translate===e.translate&&t.scale===e.scale&&t.originPoint===e.originPoint}function yn(t){return[t("x"),t("y")]}function FU(t,e,n){let r="";const s=t.x.translate/e.x,i=t.y.translate/e.y,o=(n==null?void 0:n.z)||0;if((s||i||o)&&(r=`translate3d(${s}px, ${i}px, ${o}px) `),(e.x!==1||e.y!==1)&&(r+=`scale(${1/e.x}, ${1/e.y}) `),n){const{transformPerspective:u,rotate:d,rotateX:h,rotateY:f,skewX:p,skewY:x}=n;u&&(r=`perspective(${u}px) ${r}`),d&&(r+=`rotate(${d}deg) `),h&&(r+=`rotateX(${h}deg) `),f&&(r+=`rotateY(${f}deg) `),p&&(r+=`skewX(${p}deg) `),x&&(r+=`skewY(${x}deg) `)}const a=t.x.scale*e.x,c=t.y.scale*e.y;return(a!==1||c!==1)&&(r+=`scale(${a}, ${c})`),r||"none"}const nI=["TopLeft","TopRight","BottomLeft","BottomRight"],UU=nI.length,S_=t=>typeof t=="string"?parseFloat(t):t,N_=t=>typeof t=="number"||Y.test(t);function BU(t,e,n,r,s,i){s?(t.opacity=$e(0,n.opacity??1,VU(r)),t.opacityExit=$e(e.opacity??1,0,$U(r))):i&&(t.opacity=$e(e.opacity??1,n.opacity??1,r));for(let o=0;o<UU;o++){const a=`border${nI[o]}Radius`;let c=T_(e,a),u=T_(n,a);if(c===void 0&&u===void 0)continue;c||(c=0),u||(u=0),c===0||u===0||N_(c)===N_(u)?(t[a]=Math.max($e(S_(c),S_(u),r),0),(kr.test(u)||kr.test(c))&&(t[a]+="%")):t[a]=u}(e.rotate||n.rotate)&&(t.rotate=$e(e.rotate||0,n.rotate||0,r))}function T_(t,e){return t[e]!==void 0?t[e]:t.borderRadius}const VU=rI(0,.5,qN),$U=rI(.5,.95,tn);function rI(t,e,n){return r=>r<t?0:r>e?1:n(Ca(t,e,r))}function zU(t,e,n){const r=Pt(t)?t:Gn(t);return r.start(yx("",r,e,n)),r.animation}function _c(t,e,n,r={passive:!0}){return t.addEventListener(e,n,r),()=>t.removeEventListener(e,n)}const WU=(t,e)=>t.depth-e.depth;class HU{constructor(){this.children=[],this.isDirty=!1}add(e){Zv(this.children,e),this.isDirty=!0}remove(e){ex(this.children,e),this.isDirty=!0}forEach(e){this.isDirty&&this.children.sort(WU),this.isDirty=!1,this.children.forEach(e)}}function KU(t,e){const n=Bt.now(),r=({timestamp:s})=>{const i=s-n;i>=e&&(Pn(r),t(i-e))};return ke.setup(r,!0),()=>Pn(r)}function xd(t){return Pt(t)?t.get():t}class GU{constructor(){this.members=[]}add(e){Zv(this.members,e),e.scheduleRender()}remove(e){if(ex(this.members,e),e===this.prevLead&&(this.prevLead=void 0),e===this.lead){const n=this.members[this.members.length-1];n&&this.promote(n)}}relegate(e){const n=this.members.findIndex(s=>e===s);if(n===0)return!1;let r;for(let s=n;s>=0;s--){const i=this.members[s];if(i.isPresent!==!1){r=i;break}}return r?(this.promote(r),!0):!1}promote(e,n){const r=this.lead;if(e!==r&&(this.prevLead=r,this.lead=e,e.show(),r)){r.instance&&r.scheduleRender(),e.scheduleRender();const s=r.options.layoutDependency,i=e.options.layoutDependency;s!==void 0&&i!==void 0&&s===i||(e.resumeFrom=r,n&&(e.resumeFrom.preserveOpacity=!0),r.snapshot&&(e.snapshot=r.snapshot,e.snapshot.latestValues=r.animationValues||r.latestValues),e.root&&e.root.isUpdating&&(e.isLayoutDirty=!0));const{crossfade:a}=e.options;a===!1&&r.hide()}}exitAnimationComplete(){this.members.forEach(e=>{const{options:n,resumingFrom:r}=e;n.onExitComplete&&n.onExitComplete(),r&&r.options.onExitComplete&&r.options.onExitComplete()})}scheduleRender(){this.members.forEach(e=>{e.instance&&e.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}const wd={hasAnimatedSinceResize:!0,hasEverUpdated:!1},Hp=["","X","Y","Z"],qU=1e3;let YU=0;function Kp(t,e,n,r){const{latestValues:s}=e;s[t]&&(n[t]=s[t],e.setStaticValue(t,0),r&&(r[t]=0))}function sI(t){if(t.hasCheckedOptimisedAppear=!0,t.root===t)return;const{visualElement:e}=t.options;if(!e)return;const n=kT(e);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:s,layoutId:i}=t.options;window.MotionCancelOptimisedAnimation(n,"transform",ke,!(s||i))}const{parent:r}=t;r&&!r.hasCheckedOptimisedAppear&&sI(r)}function iI({attachResizeListener:t,defaultParent:e,measureScroll:n,checkIsScrollRoot:r,resetTransform:s}){return class{constructor(o={},a=e==null?void 0:e()){this.id=YU++,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,this.nodes.forEach(JU),this.nodes.forEach(nB),this.nodes.forEach(rB),this.nodes.forEach(ZU)},this.resolvedRelativeTargetAt=0,this.linkedParentVersion=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=o,this.root=a?a.root||a:this,this.path=a?[...a.path,a]:[],this.parent=a,this.depth=a?a.depth+1:0;for(let c=0;c<this.path.length;c++)this.path[c].shouldResetTransform=!0;this.root===this&&(this.nodes=new HU)}addEventListener(o,a){return this.eventHandlers.has(o)||this.eventHandlers.set(o,new nx),this.eventHandlers.get(o).add(a)}notifyListeners(o,...a){const c=this.eventHandlers.get(o);c&&c.notify(...a)}hasListeners(o){return this.eventHandlers.has(o)}mount(o){if(this.instance)return;this.isSVG=Ex(o)&&!Q6(o),this.instance=o;const{layoutId:a,layout:c,visualElement:u}=this.options;if(u&&!u.current&&u.mount(o),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),this.root.hasTreeAnimated&&(c||a)&&(this.isLayoutDirty=!0),t){let d,h=0;const f=()=>this.root.updateBlockedByResize=!1;ke.read(()=>{h=window.innerWidth}),t(o,()=>{const p=window.innerWidth;p!==h&&(h=p,this.root.updateBlockedByResize=!0,d&&d(),d=KU(f,250),wd.hasAnimatedSinceResize&&(wd.hasAnimatedSinceResize=!1,this.nodes.forEach(j_)))})}a&&this.root.registerSharedNode(a,this),this.options.animate!==!1&&u&&(a||c)&&this.addEventListener("didUpdate",({delta:d,hasLayoutChanged:h,hasRelativeLayoutChanged:f,layout:p})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const x=this.options.transition||u.getDefaultTransition()||lB,{onLayoutAnimationStart:g,onLayoutAnimationComplete:y}=u.getProps(),w=!this.targetLayout||!tI(this.targetLayout,p),v=!h&&f;if(this.options.layoutRoot||this.resumeFrom||v||h&&(w||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);const b={...gx(x,"layout"),onPlay:g,onComplete:y};(u.shouldReduceMotion||this.options.layoutRoot)&&(b.delay=0,b.type=!1),this.startAnimation(b),this.setAnimationOrigin(d,v)}else h||j_(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=p})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const o=this.getStack();o&&o.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,this.eventHandlers.clear(),Pn(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(sB),this.animationId++)}getTransformTemplate(){const{visualElement:o}=this.options;return o&&o.getProps().transformTemplate}willUpdate(o=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&sI(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let d=0;d<this.path.length;d++){const h=this.path[d];h.shouldResetTransform=!0,h.updateScroll("snapshot"),h.options.layoutRoot&&h.willUpdate(!1)}const{layoutId:a,layout:c}=this.options;if(a===void 0&&!c)return;const u=this.getTransformTemplate();this.prevTransformTemplateValue=u?u(this.latestValues,""):void 0,this.updateSnapshot(),o&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEach(I_);return}if(this.animationId<=this.animationCommitId){this.nodes.forEach(P_);return}this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(tB),this.nodes.forEach(QU),this.nodes.forEach(XU)):this.nodes.forEach(P_),this.clearAllSnapshots();const a=Bt.now();dt.delta=rr(0,1e3/60,a-dt.timestamp),dt.timestamp=a,dt.isProcessing=!0,Lp.update.process(dt),Lp.preRender.process(dt),Lp.render.process(dt),dt.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,_x.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(eB),this.sharedNodes.forEach(iB)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,ke.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){ke.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!Vt(this.snapshot.measuredBox.x)&&!Vt(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 c=0;c<this.path.length;c++)this.path[c].updateScroll();const o=this.layout;this.layout=this.measure(!1),this.layoutVersion++,this.layoutCorrected=it(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:a}=this.options;a&&a.notify("LayoutMeasure",this.layout.layoutBox,o?o.layoutBox:void 0)}updateScroll(o="measure"){let a=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===o&&(a=!1),a&&this.instance){const c=r(this.instance);this.scroll={animationId:this.root.animationId,phase:o,isRoot:c,offset:n(this.instance),wasRoot:this.scroll?this.scroll.isRoot:c}}}resetTransform(){if(!s)return;const o=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,a=this.projectionDelta&&!eI(this.projectionDelta),c=this.getTransformTemplate(),u=c?c(this.latestValues,""):void 0,d=u!==this.prevTransformTemplateValue;o&&this.instance&&(a||ki(this.latestValues)||d)&&(s(this.instance,u),this.shouldResetTransform=!1,this.scheduleRender())}measure(o=!0){const a=this.measurePageBox();let c=this.removeElementScroll(a);return o&&(c=this.removeTransform(c)),cB(c),{animationId:this.root.animationId,measuredBox:a,layoutBox:c,latestValues:{},source:this.id}}measurePageBox(){var u;const{visualElement:o}=this.options;if(!o)return it();const a=o.measureViewportBox();if(!(((u=this.scroll)==null?void 0:u.wasRoot)||this.path.some(uB))){const{scroll:d}=this.root;d&&(Bo(a.x,d.offset.x),Bo(a.y,d.offset.y))}return a}removeElementScroll(o){var c;const a=it();if(Ln(a,o),(c=this.scroll)!=null&&c.wasRoot)return a;for(let u=0;u<this.path.length;u++){const d=this.path[u],{scroll:h,options:f}=d;d!==this.root&&h&&f.layoutScroll&&(h.wasRoot&&Ln(a,o),Bo(a.x,h.offset.x),Bo(a.y,h.offset.y))}return a}applyTransform(o,a=!1){const c=it();Ln(c,o);for(let u=0;u<this.path.length;u++){const d=this.path[u];!a&&d.options.layoutScroll&&d.scroll&&d!==d.root&&Vo(c,{x:-d.scroll.offset.x,y:-d.scroll.offset.y}),ki(d.latestValues)&&Vo(c,d.latestValues)}return ki(this.latestValues)&&Vo(c,this.latestValues),c}removeTransform(o){const a=it();Ln(a,o);for(let c=0;c<this.path.length;c++){const u=this.path[c];if(!u.instance||!ki(u.latestValues))continue;Zg(u.latestValues)&&u.updateSnapshot();const d=it(),h=u.measurePageBox();Ln(d,h),w_(a,u.latestValues,u.snapshot?u.snapshot.layoutBox:void 0,d)}return ki(this.latestValues)&&w_(a,this.latestValues),a}setTargetDelta(o){this.targetDelta=o,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(o){this.options={...this.options,...o,crossfade:o.crossfade!==void 0?o.crossfade:!0}}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!==dt.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(o=!1){var p;const a=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=a.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=a.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=a.isSharedProjectionDirty);const c=!!this.resumingFrom||this!==a;if(!(o||c&&this.isSharedProjectionDirty||this.isProjectionDirty||(p=this.parent)!=null&&p.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:d,layoutId:h}=this.options;if(!this.layout||!(d||h))return;this.resolvedRelativeTargetAt=dt.timestamp;const f=this.getClosestProjectingParent();f&&this.linkedParentVersion!==f.layoutVersion&&!f.options.layoutRoot&&this.removeRelativeTarget(),!this.targetDelta&&!this.relativeTarget&&(f&&f.layout?this.createRelativeTarget(f,this.layout.layoutBox,f.layout.layoutBox):this.removeRelativeTarget()),!(!this.relativeTarget&&!this.targetDelta)&&(this.target||(this.target=it(),this.targetWithTransforms=it()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),AU(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):Ln(this.target,this.layout.layoutBox),$T(this.target,this.targetDelta)):Ln(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget&&(this.attemptToResolveRelativeTarget=!1,f&&!!f.resumingFrom==!!this.resumingFrom&&!f.options.layoutScroll&&f.target&&this.animationProgress!==1?this.createRelativeTarget(f,this.target,f.target):this.relativeParent=this.relativeTarget=void 0))}getClosestProjectingParent(){if(!(!this.parent||Zg(this.parent.latestValues)||VT(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}createRelativeTarget(o,a,c){this.relativeParent=o,this.linkedParentVersion=o.layoutVersion,this.forceRelativeParentToResolveTarget(),this.relativeTarget=it(),this.relativeTargetOrigin=it(),hh(this.relativeTargetOrigin,a,c),Ln(this.relativeTarget,this.relativeTargetOrigin)}removeRelativeTarget(){this.relativeParent=this.relativeTarget=void 0}calcProjection(){var x;const o=this.getLead(),a=!!this.resumingFrom||this!==o;let c=!0;if((this.isProjectionDirty||(x=this.parent)!=null&&x.isProjectionDirty)&&(c=!1),a&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(c=!1),this.resolvedRelativeTargetAt===dt.timestamp&&(c=!1),c)return;const{layout:u,layoutId:d}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(u||d))return;Ln(this.layoutCorrected,this.layout.layoutBox);const h=this.treeScale.x,f=this.treeScale.y;lU(this.layoutCorrected,this.treeScale,this.path,a),o.layout&&!o.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(o.target=o.layout.layoutBox,o.targetWithTransforms=it());const{target:p}=o;if(!p){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(p_(this.prevProjectionDelta.x,this.projectionDelta.x),p_(this.prevProjectionDelta.y,this.projectionDelta.y)),Vl(this.projectionDelta,this.layoutCorrected,p,this.latestValues),(this.treeScale.x!==h||this.treeScale.y!==f||!C_(this.projectionDelta.x,this.prevProjectionDelta.x)||!C_(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",p))}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(o=!0){var a;if((a=this.options.visualElement)==null||a.scheduleRender(),o){const c=this.getStack();c&&c.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=Uo(),this.projectionDelta=Uo(),this.projectionDeltaWithTransform=Uo()}setAnimationOrigin(o,a=!1){const c=this.snapshot,u=c?c.latestValues:{},d={...this.latestValues},h=Uo();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!a;const f=it(),p=c?c.source:void 0,x=this.layout?this.layout.source:void 0,g=p!==x,y=this.getStack(),w=!y||y.members.length<=1,v=!!(g&&!w&&this.options.crossfade===!0&&!this.path.some(aB));this.animationProgress=0;let b;this.mixTargetDelta=_=>{const k=_/1e3;R_(h.x,o.x,k),R_(h.y,o.y,k),this.setTargetDelta(h),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(hh(f,this.layout.layoutBox,this.relativeParent.layout.layoutBox),oB(this.relativeTarget,this.relativeTargetOrigin,f,k),b&&LU(this.relativeTarget,b)&&(this.isProjectionDirty=!1),b||(b=it()),Ln(b,this.relativeTarget)),g&&(this.animationValues=d,BU(d,u,this.latestValues,k,v,w)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=k},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(o){var a,c,u;this.notifyListeners("animationStart"),(a=this.currentAnimation)==null||a.stop(),(u=(c=this.resumingFrom)==null?void 0:c.currentAnimation)==null||u.stop(),this.pendingAnimation&&(Pn(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=ke.update(()=>{wd.hasAnimatedSinceResize=!0,this.motionValue||(this.motionValue=Gn(0)),this.currentAnimation=zU(this.motionValue,[0,1e3],{...o,velocity:0,isSync:!0,onUpdate:d=>{this.mixTargetDelta(d),o.onUpdate&&o.onUpdate(d)},onStop:()=>{},onComplete:()=>{o.onComplete&&o.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);const o=this.getStack();o&&o.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(qU),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const o=this.getLead();let{targetWithTransforms:a,target:c,layout:u,latestValues:d}=o;if(!(!a||!c||!u)){if(this!==o&&this.layout&&u&&oI(this.options.animationType,this.layout.layoutBox,u.layoutBox)){c=this.target||it();const h=Vt(this.layout.layoutBox.x);
vendor: 4,672 bytes, line 248
248c.x.min=o.target.x.min,c.x.max=c.x.min+h;const f=Vt(this.layout.layoutBox.y);c.y.min=o.target.y.min,c.y.max=c.y.min+f}Ln(a,c),Vo(a,d),Vl(this.projectionDeltaWithTransform,this.layoutCorrected,a,d)}}registerSharedNode(o,a){this.sharedNodes.has(o)||this.sharedNodes.set(o,new GU),this.sharedNodes.get(o).add(a);const u=a.options.initialPromotionConfig;a.promote({transition:u?u.transition:void 0,preserveFollowOpacity:u&&u.shouldPreserveFollowOpacity?u.shouldPreserveFollowOpacity(a):void 0})}isLead(){const o=this.getStack();return o?o.lead===this:!0}getLead(){var a;const{layoutId:o}=this.options;return o?((a=this.getStack())==null?void 0:a.lead)||this:this}getPrevLead(){var a;const{layoutId:o}=this.options;return o?(a=this.getStack())==null?void 0:a.prevLead:void 0}getStack(){const{layoutId:o}=this.options;if(o)return this.root.sharedNodes.get(o)}promote({needsReset:o,transition:a,preserveFollowOpacity:c}={}){const u=this.getStack();u&&u.promote(this,c),o&&(this.projectionDelta=void 0,this.needsReset=!0),a&&this.setOptions({transition:a})}relegate(){const o=this.getStack();return o?o.relegate(this):!1}resetSkewAndRotation(){const{visualElement:o}=this.options;if(!o)return;let a=!1;const{latestValues:c}=o;if((c.z||c.rotate||c.rotateX||c.rotateY||c.rotateZ||c.skewX||c.skewY)&&(a=!0),!a)return;const u={};c.z&&Kp("z",o,u,this.animationValues);for(let d=0;d<Hp.length;d++)Kp(`rotate${Hp[d]}`,o,u,this.animationValues),Kp(`skew${Hp[d]}`,o,u,this.animationValues);o.render();for(const d in u)o.setStaticValue(d,u[d]),this.animationValues&&(this.animationValues[d]=u[d]);o.scheduleRender()}applyProjectionStyles(o,a){if(!this.instance||this.isSVG)return;if(!this.isVisible){o.visibility="hidden";return}const c=this.getTransformTemplate();if(this.needsReset){this.needsReset=!1,o.visibility="",o.opacity="",o.pointerEvents=xd(a==null?void 0:a.pointerEvents)||"",o.transform=c?c(this.latestValues,""):"none";return}const u=this.getLead();if(!this.projectionDelta||!this.layout||!u.target){this.options.layoutId&&(o.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,o.pointerEvents=xd(a==null?void 0:a.pointerEvents)||""),this.hasProjected&&!ki(this.latestValues)&&(o.transform=c?c({},""):"none",this.hasProjected=!1);return}o.visibility="";const d=u.animationValues||u.latestValues;this.applyTransformsToTarget();let h=FU(this.projectionDeltaWithTransform,this.treeScale,d);c&&(h=c(d,h)),o.transform=h;const{x:f,y:p}=this.projectionDelta;o.transformOrigin=`${f.origin*100}% ${p.origin*100}% 0`,u.animationValues?o.opacity=u===this?d.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:d.opacityExit:o.opacity=u===this?d.opacity!==void 0?d.opacity:"":d.opacityExit!==void 0?d.opacityExit:0;for(const x in ty){if(d[x]===void 0)continue;const{correct:g,applyTo:y,isCSSVariable:w}=ty[x],v=h==="none"?d[x]:g(d[x],u);if(y){const b=y.length;for(let _=0;_<b;_++)o[y[_]]=v}else w?this.options.visualElement.renderState.vars[x]=v:o[x]=v}this.options.layoutId&&(o.pointerEvents=u===this?xd(a==null?void 0:a.pointerEvents)||"":"none")}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(o=>{var a;return(a=o.currentAnimation)==null?void 0:a.stop()}),this.root.nodes.forEach(I_),this.root.sharedNodes.clear()}}}function QU(t){t.updateLayout()}function XU(t){var n;const e=((n=t.resumeFrom)==null?void 0:n.snapshot)||t.snapshot;if(t.isLead()&&t.layout&&e&&t.hasListeners("didUpdate")){const{layoutBox:r,measuredBox:s}=t.layout,{animationType:i}=t.options,o=e.source!==t.layout.source;i==="size"?yn(h=>{const f=o?e.measuredBox[h]:e.layoutBox[h],p=Vt(f);f.min=r[h].min,f.max=f.min+p}):oI(i,e.layoutBox,r)&&yn(h=>{const f=o?e.measuredBox[h]:e.layoutBox[h],p=Vt(r[h]);f.max=f.min+p,t.relativeTarget&&!t.currentAnimation&&(t.isProjectionDirty=!0,t.relativeTarget[h].max=t.relativeTarget[h].min+p)});const a=Uo();Vl(a,r,e.layoutBox);const c=Uo();o?Vl(c,t.applyTransform(s,!0),e.measuredBox):Vl(c,r,e.layoutBox);const u=!eI(a);let d=!1;if(!t.resumeFrom){const h=t.getClosestProjectingParent();if(h&&!h.resumeFrom){const{snapshot:f,layout:p}=h;if(f&&p){const x=it();hh(x,e.layoutBox,f.layoutBox);const g=it();hh(g,r,p.layoutBox),tI(x,g)||(d=!0),h.options.layoutRoot&&(t.relativeTarget=g,t.relativeTargetOrigin=x,t.relativeParent=h)}}}t.notifyListeners("didUpdate",{layout:r,snapshot:e,delta:c,layoutDelta:a,hasLayoutChanged:u,hasRelativeLayoutChanged:d})}else if(t.isLead()){const{onExitComplete:r}=t.options;r&&r()}t.options.transition=void 0}function JU(t){t.parent&&(t.isProjecting()||(t.isProjectionDirty=t.parent.isProjectionDirty),t.isSharedProjectionDirty||(t.isSharedProjectionDirty=!!(t.
vendor: 27,907 bytes, lines 248-256
248isProjectionDirty||t.parent.isProjectionDirty||t.parent.isSharedProjectionDirty)),t.isTransformDirty||(t.isTransformDirty=t.parent.isTransformDirty))}function ZU(t){t.isProjectionDirty=t.isSharedProjectionDirty=t.isTransformDirty=!1}function eB(t){t.clearSnapshot()}function I_(t){t.clearMeasurements()}function P_(t){t.isLayoutDirty=!1}function tB(t){const{visualElement:e}=t.options;e&&e.getProps().onBeforeLayoutMeasure&&e.notify("BeforeLayoutMeasure"),t.resetTransform()}function j_(t){t.finishAnimation(),t.targetDelta=t.relativeTarget=t.target=void 0,t.isProjectionDirty=!0}function nB(t){t.resolveTargetDelta()}function rB(t){t.calcProjection()}function sB(t){t.resetSkewAndRotation()}function iB(t){t.removeLeadSnapshot()}function R_(t,e,n){t.translate=$e(e.translate,0,n),t.scale=$e(e.scale,1,n),t.origin=e.origin,t.originPoint=e.originPoint}function A_(t,e,n,r){t.min=$e(e.min,n.min,r),t.max=$e(e.max,n.max,r)}function oB(t,e,n,r){A_(t.x,e.x,n.x,r),A_(t.y,e.y,n.y,r)}function aB(t){return t.animationValues&&t.animationValues.opacityExit!==void 0}const lB={duration:.45,ease:[.4,0,.1,1]},D_=t=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(t),M_=D_("applewebkit/")&&!D_("chrome/")?Math.round:tn;function O_(t){t.min=M_(t.min),t.max=M_(t.max)}function cB(t){O_(t.x),O_(t.y)}function oI(t,e,n){return t==="position"||t==="preserve-aspect"&&!RU(E_(e),E_(n),.2)}function uB(t){var e;return t!==t.root&&((e=t.scroll)==null?void 0:e.wasRoot)}const dB=iI({attachResizeListener:(t,e)=>_c(t,"resize",e),measureScroll:()=>{var t,e;return{x:document.documentElement.scrollLeft||((t=document.body)==null?void 0:t.scrollLeft)||0,y:document.documentElement.scrollTop||((e=document.body)==null?void 0:e.scrollTop)||0}},checkIsScrollRoot:()=>!0}),Gp={current:void 0},aI=iI({measureScroll:t=>({x:t.scrollLeft,y:t.scrollTop}),defaultParent:()=>{if(!Gp.current){const t=new dB({});t.mount(window),t.setOptions({layoutScroll:!0}),Gp.current=t}return Gp.current},resetTransform:(t,e)=>{t.style.transform=e!==void 0?e:"none"},checkIsScrollRoot:t=>window.getComputedStyle(t).position==="fixed"}),bf=m.createContext({transformPagePoint:t=>t,isStatic:!1,reducedMotion:"never"});function L_(t,e){if(typeof t=="function")return t(e);t!=null&&(t.current=e)}function hB(...t){return e=>{let n=!1;const r=t.map(s=>{const i=L_(s,e);return!n&&typeof i=="function"&&(n=!0),i});if(n)return()=>{for(let s=0;s<r.length;s++){const i=r[s];typeof i=="function"?i():L_(t[s],null)}}}}function fB(...t){return m.useCallback(hB(...t),t)}class pB extends m.Component{getSnapshotBeforeUpdate(e){const n=this.props.childRef.current;if(n&&e.isPresent&&!this.props.isPresent){const r=n.offsetParent,s=ch(r)&&r.offsetWidth||0,i=ch(r)&&r.offsetHeight||0,o=this.props.sizeRef.current;o.height=n.offsetHeight||0,o.width=n.offsetWidth||0,o.top=n.offsetTop,o.left=n.offsetLeft,o.right=s-o.width-o.left,o.bottom=i-o.height-o.top}return null}componentDidUpdate(){}render(){return this.props.children}}function mB({children:t,isPresent:e,anchorX:n,anchorY:r,root:s}){var h;const i=m.useId(),o=m.useRef(null),a=m.useRef({width:0,height:0,top:0,left:0,right:0,bottom:0}),{nonce:c}=m.useContext(bf),u=((h=t.props)==null?void 0:h.ref)??(t==null?void 0:t.ref),d=fB(o,u);return m.useInsertionEffect(()=>{const{width:f,height:p,top:x,left:g,right:y,bottom:w}=a.current;if(e||!o.current||!f||!p)return;const v=n==="left"?`left: ${g}`:`right: ${y}`,b=r==="bottom"?`bottom: ${w}`:`top: ${x}`;o.current.dataset.motionPopId=i;const _=document.createElement("style");c&&(_.nonce=c);const k=s??document.head;return k.appendChild(_),_.sheet&&_.sheet.insertRule(` 249 [data-motion-pop-id="${i}"] { 250 position: absolute !important; 251 width: ${f}px !important; 252 height: ${p}px !important; 253 ${v}px !important; 254 ${b}px !important; 255 } 256 `),()=>{k.contains(_)&&k.removeChild(_)}},[e]),l.jsx(pB,{isPresent:e,childRef:o,sizeRef:a,children:m.cloneElement(t,{ref:d})})}const gB=({children:t,initial:e,isPresent:n,onExitComplete:r,custom:s,presenceAffectsLayout:i,mode:o,anchorX:a,anchorY:c,root:u})=>{const d=ri(yB),h=m.useId();let f=!0,p=m.useMemo(()=>(f=!1,{id:h,initial:e,isPresent:n,custom:s,onExitComplete:x=>{d.set(x,!0);for(const g of d.values())if(!g)return;r&&r()},register:x=>(d.set(x,!1),()=>d.delete(x))}),[n,d,r]);return i&&f&&(p={...p}),m.useMemo(()=>{d.forEach((x,g)=>d.set(g,!1))},[n]),m.useEffect(()=>{!n&&!d.size&&r&&r()},[n]),o==="popLayout"&&(t=l.jsx(mB,{isPresent:n,anchorX:a,anchorY:c,root:u,children:t})),l.jsx(yf.Provider,{value:p,children:t})};function yB(){return new Map}function lI(t=!0){const e=m.useContext(yf);if(e===null)return[!0,null];const{isPresent:n,onExitComplete:r,register:s}=e,i=m.useId();m.useEffect(()=>{if(t)return s(i)},[t]);const o=m.useCallback(()=>t&&r&&r(i),[i,r,t]);return!n&&r?[!1,o]:[!0]}const Mu=t=>t.key||"";function F_(t){const e=[];return m.Children.forEach(t,n=>{m.isValidElement(n)&&e.push(n)}),e}const Xi=({children:t,custom:e,initial:n=!0,onExitComplete:r,presenceAffectsLayout:s=!0,mode:i="sync",propagate:o=!1,anchorX:a="left",anchorY:c="top",root:u})=>{const[d,h]=lI(o),f=m.useMemo(()=>F_(t),[t]),p=o&&!d?[]:f.map(Mu),x=m.useRef(!0),g=m.useRef(f),y=ri(()=>new Map),w=m.useRef(new Set),[v,b]=m.useState(f),[_,k]=m.useState(f);gf(()=>{x.current=!1,g.current=f;for(let N=0;N<_.length;N++){const P=Mu(_[N]);p.includes(P)?(y.delete(P),w.current.delete(P)):y.get(P)!==!0&&y.set(P,!1)}},[_,p.length,p.join("-")]);const S=[];if(f!==v){let N=[...f];for(let P=0;P<_.length;P++){const j=_[P],O=Mu(j);p.includes(O)||(N.splice(P,0,j),S.push(j))}return i==="wait"&&S.length&&(N=S),k(F_(N)),b(f),null}const{forceRender:C}=m.useContext(Jv);return l.jsx(l.Fragment,{children:_.map(N=>{const P=Mu(N),j=o&&!d?!1:f===_||p.includes(P),O=()=>{if(w.current.has(P))return;if(w.current.add(P),y.has(P))y.set(P,!0);else return;let L=!0;y.forEach(K=>{K||(L=!1)}),L&&(C==null||C(),k(g.current),o&&(h==null||h()),r&&r())};return l.jsx(gB,{isPresent:j,initial:!x.current||n?void 0:!1,custom:e,presenceAffectsLayout:s,mode:i,root:u,onExitComplete:j?void 0:O,anchorX:a,anchorY:c,children:N},P)})})},cI=m.createContext({strict:!1}),U_={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"]};let B_=!1;function vB(){if(B_)return;const t={};for(const e in U_)t[e]={isEnabled:n=>U_[e].some(r=>!!n[r])};FT(t),B_=!0}function uI(){return vB(),sU()}function xB(t){const e=uI();for(const n in t)e[n]={...e[n],...t[n]};FT(e)}const wB=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","ignoreStrict","viewport"]);function fh(t){return t.startsWith("while")||t.startsWith("drag")&&t!=="draggable"||t.startsWith("layout")||t.startsWith("onTap")||t.startsWith("onPan")||t.startsWith("onLayout")||wB.has(t)}let dI=t=>!fh(t);function bB(t){typeof t=="function"&&(dI=e=>e.startsWith("on")?!fh(e):t(e))}try{bB(require("@emotion/is-prop-valid").default)}catch{}function _B(t,e,n){const r={};for(const s in t)s==="values"&&typeof t.values=="object"||(dI(s)||n===!0&&fh(s)||!e&&!fh(s)||t.draggable&&s.startsWith("onDrag"))&&(r[s]=t[s]);return r}const _f=m.createContext({});function kB(t,e){if(wf(t)){const{initial:n,animate:r}=t;return{initial:n===!1||bc(n)?n:void 0,animate:bc(r)?r:void 0}}return t.inherit!==!1?e:{}}function EB(t){const{initial:e,animate:n}=kB(t,m.useContext(_f));return m.useMemo(()=>({initial:e,animate:n}),[V_(e),V_(n)])}function V_(t){return Array.isArray(t)?t.join(" "):t}const Ix=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function hI(t,e,n){for(const r in e)!Pt(e[r])&&!HT(r,n)&&(t[r]=e[r])}function CB({transformTemplate:t},e){return m.useMemo(()=>{const n=Ix();return Nx(n,e,t),Object.assign({},n.vars,n.style)},[e])}function SB(t,e){const n=t.style||{},r={};return hI(r,n,t),Object.assign(r,CB(t,e)),r}function NB(t,e){const n={},r=SB(t,e);return t.drag&&t.dragListener!==!1&&(n.draggable=!1,r.userSelect=r.WebkitUserSelect=r.WebkitTouchCallout="none",r.touchAction=t.drag===!0?"none":`pan-${t.drag==="x"?"y":"x"}`),t.tabIndex===void 0&&(t.onTap||t.onTapStart||t.whileTap)&&(n.tabIndex=0),n.style=r,n}const fI=()=>({...Ix(),attrs:{}});function TB(t,e,n,r){const s=m.useMemo(()=>{const i=fI();return KT(i,e,qT(r),t.transformTemplate,t.style),{...i.attrs,style:{...i.style}}},[e]);if(t.style){const i={};hI(i,t.style,t),s.style={...i,...s.style}}return s}const IB=["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 Px(t){return typeof t!="string"||t.includes("-")?!1:!!(IB.indexOf(t)>-1||/[A-Z]/u.test(t))}function PB(t,e,n,{latestValues:r},s,i=!1,o){const c=(o??Px(t)?TB:NB)(e,r,s,t),u=_B(e,typeof t=="string",i),d=t!==m.Fragment?{...u,...c,ref:n}:{},{children:h}=e,f=m.useMemo(()=>Pt(h)?h.get():h,[h]);return m.createElement(t,{...d,children:f})}function jB({scrapeMotionValuesFromProps:t,createRenderState:e},n,r,s){return{latestValues:RB(n,r,s,t),renderState:e()}}function RB(t,e,n,r){const s={},i=r(t,{});for(const f in i)s[f]=xd(i[f]);let{initial:o,animate:a}=t;const c=wf(t),u=LT(t);e&&u&&!c&&t.inherit!==!1&&(o===void 0&&(o=e.initial),a===void 0&&(a=e.animate));let d=n?n.initial===!1:!1;d=d||o===!1;const h=d?a:o;if(h&&typeof h!="boolean"&&!xf(h)){const f=Array.isArray(h)?h:[h];for(let p=0;p<f.length;p++){const x=vx(t,f[p]);if(x){const{transitionEnd:g,transition:y,...w}=x;for(const v in w){let b=w[v];if(Array.isArray(b)){const _=d?b.length-1:0;b=b[_]}b!==null&&(s[v]=b)}for(const v in g)s[v]=g[v]}}}return s}const pI=t=>(e,n)=>{const r=m.useContext(_f),s=m.useContext(yf),i=()=>jB(t,e,r,s);return n?i():ri(i)},AB=pI({scrapeMotionValuesFromProps:Tx,createRenderState:Ix}),DB=pI({scrapeMotionValuesFromProps:YT,createRenderState:fI}),MB=Symbol.for("motionComponentSymbol");function OB(t,e,n){const r=m.useRef(n);m.useInsertionEffect(()=>{r.current=n});const s=m.useRef(null);return m.useCallback(i=>{var a;i&&((a=t.onMount)==null||a.call(t,i)),e&&(i?e.mount(i):e.unmount());const o=r.current;if(typeof o=="function")if(i){const c=o(i);typeof c=="function"&&(s.current=c)}else s.current?(s.current(),s.current=null):o(i);else o&&(o.current=i)},[e])}const mI=m.createContext({});function El(t){return t&&typeof t=="object"&&Object.prototype.hasOwnProperty.call(t,"current")}function LB(t,e,n,r,s,i){var w,v;const{visualElement:o}=m.useContext(_f),a=m.useContext(cI),c=m.useContext(yf),u=m.useContext(bf).reducedMotion,d=m.useRef(null),h=m.useRef(!1);r=r||a.renderer,!d.current&&r&&(d.current=r(t,{visualState:e,parent:o,props:n,presenceContext:c,blockInitialAnimation:c?c.initial===!1:!1,reducedMotionConfig:u,isSVG:i}),h.current&&d.current&&(d.current.manuallyAnimateOnMount=!0));const f=d.current,p=m.useContext(mI);f&&!f.projection&&s&&(f.type==="html"||f.type==="svg")&&FB(d.current,n,s,p);const x=m.useRef(!1);m.useInsertionEffect(()=>{f&&x.current&&f.update(n,c)});const g=n[_T],y=m.useRef(!!g&&!((w=window.MotionHandoffIsComplete)!=null&&w.call(window,g))&&((v=window.MotionHasOptimisedAnimation)==null?void 0:v.call(window,g)));return gf(()=>{h.current=!0,f&&(x.current=!0,window.MotionIsMounted=!0,f.updateFeatures(),f.scheduleRenderMicrotask(),y.current&&f.animationState&&f.animationState.animateChanges())}),m.useEffect(()=>{f&&(!y.current&&f.animationState&&f.animationState.animateChanges(),y.current&&(queueMicrotask(()=>{var b;(b=window.MotionHandoffMarkAsComplete)==null||b.call(window,g)}),y.current=!1),f.enteringChildren=void 0)}),f}function FB(t,e,n,r){const{layoutId:s,layout:i,drag:o,dragConstraints:a,layoutScroll:c,layoutRoot:u,layoutCrossfade:d}=e;t.projection=new n(t.latestValues,e["data-framer-portal-id"]?void 0:gI(t.parent)),t.projection.setOptions({layoutId:s,layout:i,alwaysMeasureLayout:!!o||a&&El(a),visualElement:t,animationType:typeof i=="string"?i:"both",initialPromotionConfig:r,crossfade:d,layoutScroll:c,layoutRoot:u})}function gI(t){if(t)return t.options.allowProjection!==!1?t.projection:gI(t.parent)}function qp(t,{forwardMotionProps:e=!1,type:n}={},r,s){r&&xB(r);const i=n?n==="svg":Px(t),o=i?DB:AB;function a(u,d){let h;const f={...m.useContext(bf),...u,layoutId:UB(u)},{isStatic:p}=f,x=EB(u),g=o(u,p);if(!p&&FN){BB();const y=VB(f);h=y.MeasureLayout,x.visualElement=LB(t,g,f,s,y.ProjectionNode,i)}return l.jsxs(_f.Provider,{value:x,children:[h&&x.visualElement?l.jsx(h,{visualElement:x.visualElement,...f}):null,PB(t,u,OB(g,x.visualElement,d),g,p,e,i)]})}a.displayName=`motion.${typeof t=="string"?t:`create(${t.displayName??t.name??""})`}`;const c=m.forwardRef(a);return c[MB]=t,c}function UB({layoutId:t}){const e=m.useContext(Jv).id;return e&&t!==void 0?e+"-"+t:t}function BB(t,e){m.useContext(cI).strict}function VB(t){const e=uI(),{drag:n,layout:r}=e;if(!n&&!r)return{};const s={...n,...r};return{MeasureLayout:n!=null&&n.isEnabled(t)||r!=null&&r.isEnabled(t)?s.MeasureLayout:void 0,ProjectionNode:s.ProjectionNode}}function $B(t,e){if(typeof Proxy>"u")return qp;const n=new Map,r=(i,o)=>qp(i,o,t,e),s=(i,o)=>r(i,o);return new Proxy(s,{get:(i,o)=>o==="create"?r:(n.has(o)||n.set(o,qp(o,void 0,t,e)),n.get(o))})}const zB=(t,e)=>e.isSVG??Px(t)?new bU(e):new mU(e,{allowProjection:t!==m.Fragment});class WB extends gi{constructor(e){super(e),e.animationState||(e.animationState=SU(e))}updateAnimationControlsSubscription(){const{animate:e}=this.node.getProps();xf(e)&&(this.unmountControls=e.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:e}=this.node.getProps(),{animate:n}=this.node.prevProps||{};e!==n&&this.updateAnimationControlsSubscription()}unmount(){var e;this.node.animationState.reset(),(e=this.unmountControls)==null||e.call(this)}}let HB=0;class KB extends gi{constructor(){super(...arguments),this.id=HB++}update(){if(!this.node.presenceContext)return;const{isPresent:e,onExitComplete:n}=this.node.presenceContext,{isPresent:r}=this.node.prevPresenceContext||{};if(!this.node.animationState||e===r)return;const s=this.node.animationState.setActive("exit",!e);n&&!e&&s.then(()=>{n(this.id)})}mount(){const{register:e,onExitComplete:n}=this.node.presenceContext||{};n&&n(this.id),e&&(this.unmount=e(this.id))}unmount(){}}const GB={animation:{Feature:WB},exit:{Feature:KB}};function Jc(t){return{point:{x:t.pageX,y:t.pageY}}}const qB=t=>e=>kx(e)&&t(e,Jc(e));function $l(t,e,n,r){return _c(t,e,qB(n),r)}const yI=({current:t})=>t?t.ownerDocument.defaultView:null,$_=(t,e)=>Math.abs(t-e);function YB(t,e){const n=$_(t.x,e.x),r=$_(t.y,e.y);return Math.sqrt(n**2+r**2)}const z_=new Set(["auto","scroll"]);class vI{constructor(e,n,{transformPagePoint:r,contextWindow:s=window,dragSnapToOrigin:i=!1,distanceThreshold:o=3,element:a}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.scrollPositions=new Map,this.removeScrollListeners=null,this.onElementScroll=p=>{this.handleScroll(p.target)},this.onWindowScroll=()=>{this.handleScroll(window)},this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const p=Qp(this.lastMoveEventInfo,this.history),x=this.startEvent!==null,g=YB(p.offset,{x:0,y:0})>=this.distanceThreshold;if(!x&&!g)return;const{point:y}=p,{timestamp:w}=dt;this.history.push({...y,timestamp:w});const{onStart:v,onMove:b}=this.handlers;x||(v&&v(this.lastMoveEvent,p),this.startEvent=this.lastMoveEvent),b&&b(this.lastMoveEvent,p)},this.handlePointerMove=(p,x)=>{this.lastMoveEvent=p,this.lastMoveEventInfo=Yp(x,this.transformPagePoint),ke.update(this.updatePoint,!0)},this.handlePointerUp=(p,x)=>{this.end();const{onEnd:g,onSessionEnd:y,resumeAnimation:w}=this.handlers;if((this.dragSnapToOrigin||!this.startEvent)&&w&&w(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const v=Qp(p.type==="pointercancel"?this.lastMoveEventInfo:Yp(x,this.transformPagePoint),this.history);this.startEvent&&g&&g(p,v),y&&y(p,v)},!kx(e))return;this.dragSnapToOrigin=i,this.handlers=n,this.transformPagePoint=r,this.distanceThreshold=o,this.contextWindow=s||window;const c=Jc(e),u=Yp(c,this.transformPagePoint),{point:d}=u,{timestamp:h}=dt;this.history=[{...d,timestamp:h}];const{onSessionStart:f}=n;f&&f(e,Qp(u,this.history)),this.removeListeners=Yc($l(this.contextWindow,"pointermove",this.handlePointerMove),$l(this.contextWindow,"pointerup",this.handlePointerUp),$l(this.contextWindow,"pointercancel",this.handlePointerUp)),a&&this.startScrollTracking(a)}startScrollTracking(e){let n=e.parentElement;for(;n;){const r=getComputedStyle(n);(z_.has(r.overflowX)||z_.has(r.overflowY))&&this.scrollPositions.set(n,{x:n.scrollLeft,y:n.scrollTop}),n=n.parentElement}this.scrollPositions.set(window,{x:window.scrollX,y:window.scrollY}),window.addEventListener("scroll",this.onElementScroll,{capture:!0,passive:!0}),window.addEventListener("scroll",this.onWindowScroll,{passive:!0}),this.removeScrollListeners=()=>{window.removeEventListener("scroll",this.onElementScroll,{capture:!0}),window.removeEventListener("scroll",this.onWindowScroll)}}handleScroll(e){const n=this.scrollPositions.get(e);if(!n)return;const r=e===window,s=r?{x:window.scrollX,y:window.scrollY}:{x:e.scrollLeft,y:e.scrollTop},i={x:s.x-n.x,y:s.y-n.y};i.x===0&&i.y===0||(r?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,s),ke.update(this.updatePoint,!0))}updateHandlers(e){this.handlers=e}end(){this.removeListeners&&this.removeListeners(),this.removeScrollListeners&&this.removeScrollListeners(),this.scrollPositions.clear(),Pn(this.updatePoint)}}function Yp(t,e){return e?{point:e(t.point)}:t}function W_(t,e){return{x:t.x-e.x,y:t.y-e.y}}function Qp({point:t},e){return{point:t,delta:W_(t,xI(e)),offset:W_(t,QB(e)),velocity:XB(e,.1)}}function QB(t){return t[0]}function xI(t){return t[t.length-1]}function XB(t,e){if(t.length<2)return{x:0,y:0};let n=t.length-1,r=null;const s=xI(t);for(;n>=0&&(r=t[n],!(s.timestamp-r.timestamp>_r(e)));)n--;if(!r)return{x:0,y:0};const i=Cn(s.timestamp-r.timestamp);if(i===0)return{x:0,y:0};const o={x:(s.x-r.x)/i,y:(s.y-r.y)/i};return o.x===1/0&&(o.x=0),o.y===1/0&&(o.y=0),o}function JB(t,{min:e,max:n},r){return e!==void 0&&t<e?t=r?$e(e,t,r.min):Math.max(t,e):n!==void 0&&t>n&&(t=r?$e(n,t,r.max):Math.min(t,n)),t}function H_(t,e,n){return{min:e!==void 0?t.min+e:void 0,max:n!==void 0?t.max+n-(t.max-t.min):void 0}}function ZB(t,{top:e,left:n,bottom:r,right:s}){return{x:H_(t.x,n,s),y:H_(t.y,e,r)}}function K_(t,e){let n=e.min-t.min,r=e.max-t.max;return e.max-e.min<t.max-t.min&&([n,r]=[r,n]),{min:n,max:r}}function eV(t,e){return{x:K_(t.x,e.x),y:K_(t.y,e.y)}}function tV(t,e){let n=.5;const r=Vt(t),s=Vt(e);return s>r?n=Ca(e.min,e.max-r,t.min):r>s&&(n=Ca(t.min,t.max-s,e.min)),rr(0,1,n)}function nV(t,e){const n={};return e.min!==void 0&&(n.min=e.min-t.min),e.max!==void 0&&(n.max=e.max-t.min),n}const ny=.35;function rV(t=ny){return t===!1?t=0:t===!0&&(t=ny),{x:G_(t,"left","right"),y:G_(t,"top","bottom")}}function G_(t,e,n){return{min:q_(t,e),max:q_(t,n)}}function q_(t,e){return typeof t=="number"?t:t[e]||0}const sV=new WeakMap;class iV{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=it(),this.latestPointerEvent=null,this.latestPanInfo=null,this.visualElement=e}start(e,{snapToCursor:n=!1,distanceThreshold:r}={}){const{presenceContext:s}=this.visualElement;if(s&&s.isPresent===!1)return;const i=h=>{n?(this.stopAnimation(),this.snapToCursor(Jc(h).point)):this.pauseAnimation()},o=(h,f)=>{this.stopAnimation();const{drag:p,dragPropagation:x,onDragStart:g}=this.getProps();if(p&&!x&&(this.openDragLock&&this.openDragLock(),this.openDragLock=O6(p),!this.openDragLock))return;this.latestPointerEvent=h,this.latestPanInfo=f,this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),yn(w=>{let v=this.getAxisMotionValue(w).get()||0;if(kr.test(v)){const{projection:b}=this.visualElement;if(b&&b.layout){const _=b.layout.layoutBox[w];_&&(v=Vt(_)*(parseFloat(v)/100))}}this.originPoint[w]=v}),g&&ke.postRender(()=>g(h,f)),Yg(this.visualElement,"transform");const{animationState:y}=this.visualElement;y&&y.setActive("whileDrag",!0)},a=(h,f)=>{this.latestPointerEvent=h,this.latestPanInfo=f;const{dragPropagation:p,dragDirectionLock:x,onDirectionLock:g,onDrag:y}=this.getProps();if(!p&&!this.openDragLock)return;const{offset:w}=f;if(x&&this.currentDirection===null){this.currentDirection=oV(w),this.currentDirection!==null&&g&&g(this.currentDirection);return}this.updateAxis("x",f.point,w),this.updateAxis("y",f.point,w),this.visualElement.render(),y&&y(h,f)},c=(h,f)=>{this.latestPointerEvent=h,this.latestPanInfo=f,this.stop(h,f),this.latestPointerEvent=null,this.latestPanInfo=null},u=()=>yn(h=>{var f;return this.getAnimationState(h)==="paused"&&((f=this.getAxisMotionValue(h).animation)==null?void 0:f.play())}),{dragSnapToOrigin:d}=this.getProps();this.panSession=new vI(e,{onSessionStart:i,onStart:o,onMove:a,onSessionEnd:c,resumeAnimation:u},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:d,distanceThreshold:r,contextWindow:yI(this.visualElement),element:this.visualElement.current})}stop(e,n){const r=e||this.latestPointerEvent,s=n||this.latestPanInfo,i=this.isDragging;if(this.cancel(),!i||!s||!r)return;const{velocity:o}=s;this.startAnimation(o);const{onDragEnd:a}=this.getProps();a&&ke.postRender(()=>a(r,s))}cancel(){this.isDragging=!1;const{projection:e,animationState:n}=this.visualElement;e&&(e.isAnimationBlocked=!1),this.endPanSession();const{dragPropagation:r}=this.getProps();!r&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),n&&n.setActive("whileDrag",!1)}endPanSession(){this.panSession&&this.panSession.end(),this.panSession=void 0}updateAxis(e,n,r){const{drag:s}=this.getProps();if(!r||!Ou(e,s,this.currentDirection))return;const i=this.getAxisMotionValue(e);let o=this.originPoint[e]+r[e];this.constraints&&this.constraints[e]&&(o=JB(o,this.constraints[e],this.elastic[e])),i.set(o)}resolveConstraints(){var i;const{dragConstraints:e,dragElastic:n}=this.getProps(),r=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):(i=this.visualElement.projection)==null?void 0:i.layout,s=this.constraints;e&&El(e)?this.constraints||(this.constraints=this.resolveRefConstraints()):e&&r?this.constraints=ZB(r.layoutBox,e):this.constraints=!1,this.elastic=rV(n),s!==this.constraints&&r&&this.constraints&&!this.hasMutatedConstraints&&yn(o=>{this.constraints!==!1&&this.getAxisMotionValue(o)&&(this.constraints[o]=nV(r.layoutBox[o],this.constraints[o]))})}resolveRefConstraints(){const{dragConstraints:e,onMeasureDragConstraints:n}=this.getProps();if(!e||!El(e))return!1;const r=e.current;si(r!==null,"If `dragConstraints` is set as a React ref, that ref must be passed to another component's `ref` prop.","drag-constraints-ref");const{projection:s}=this.visualElement;if(!s||!s.layout)return!1;const i=cU(r,s.root,this.visualElement.getTransformPagePoint());let o=eV(s.layout.layoutBox,i);if(n){const a=n(oU(o));this.hasMutatedConstraints=!!a,a&&(o=BT(a))}return o}startAnimation(e){const{drag:n,dragMomentum:r,dragElastic:s,dragTransition:i,dragSnapToOrigin:o,onDragTransitionEnd:a}=this.getProps(),c=this.constraints||{},u=yn(d=>{if(!Ou(d,n,this.currentDirection))return;let h=c&&c[d]||{};o&&(h={min:0,max:0});const f=s?200:1e6,p=s?40:1e7,x={type:"inertia",velocity:r?e[d]:0,bounceStiffness:f,bounceDamping:p,timeConstant:750,restDelta:1,restSpeed:10,...i,...h};return this.startAxisValueAnimation(d,x)});return Promise.all(u).then(a)}startAxisValueAnimation(e,n){const r=this.getAxisMotionValue(e);return Yg(this.visualElement,e),r.start(yx(e,r,0,n,this.visualElement,!1))}stopAnimation(){yn(e=>this.getAxisMotionValue(e).stop())}pauseAnimation(){yn(e=>{var n;return(n=this.getAxisMotionValue(e).animation)==null?void 0:n.pause()})}getAnimationState(e){var n;return(n=this.getAxisMotionValue(e).animation)==null?void 0:n.state}getAxisMotionValue(e){const n=`_drag${e.toUpperCase()}`,r=this.visualElement.getProps(),s=r[n];return s||this.visualElement.getValue(e,(r.initial?r.initial[e]:void 0)||0)}snapToCursor(e){yn(n=>{const{drag:r}=this.getProps();if(!Ou(n,r,this.currentDirection))return;const{projection:s}=this.visualElement,i=this.getAxisMotionValue(n);if(s&&s.layout){const{min:o,max:a}=s.layout.layoutBox[n],c=i.get()||0;i.set(e[n]-$e(o,a,.5)+c)}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:e,dragConstraints:n}=this.getProps(),{projection:r}=this.visualElement;if(!El(n)||!r||!this.constraints)return;this.stopAnimation();const s={x:0,y:0};yn(o=>{const a=this.getAxisMotionValue(o);if(a&&this.constraints!==!1){const c=a.get();s[o]=tV({min:c,max:c},this.constraints[o])}});const{transformTemplate:i}=this.visualElement.getProps();this.visualElement.current.style.transform=i?i({},""):"none",r.root&&r.root.updateScroll(),r.updateLayout(),this.resolveConstraints(),yn(o=>{if(!Ou(o,e,null))return;const a=this.getAxisMotionValue(o),{min:c,max:u}=this.constraints[o];a.set($e(c,u,s[o]))})}addListeners(){if(!this.visualElement.current)return;sV.set(this.visualElement,this);const e=this.visualElement.current,n=$l(e,"pointerdown",c=>{const{drag:u,dragListener:d=!0}=this.getProps(),h=c.target,f=h!==e&&AT(h);u&&d&&!f&&this.start(c)}),r=()=>{const{dragConstraints:c}=this.getProps();El(c)&&c.current&&(this.constraints=this.resolveRefConstraints())},{projection:s}=this.visualElement,i=s.addEventListener("measure",r);s&&!s.layout&&(s.root&&s.root.updateScroll(),s.updateLayout()),ke.read(r);const o=_c(window,"resize",()=>this.scalePositionWithinConstraints()),a=s.addEventListener("didUpdate",({delta:c,hasLayoutChanged:u})=>{this.isDragging&&u&&(yn(d=>{const h=this.getAxisMotionValue(d);h&&(this.originPoint[d]+=c[d].translate,h.set(h.get()+c[d].translate))}),this.visualElement.render())});return()=>{o(),n(),i(),a&&a()}}getProps(){const e=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:r=!1,dragPropagation:s=!1,dragConstraints:i=!1,dragElastic:o=ny,dragMomentum:a=!0}=e;return{...e,drag:n,dragDirectionLock:r,dragPropagation:s,dragConstraints:i,dragElastic:o,dragMomentum:a}}}function Ou(t,e,n){return(e===!0||e===t)&&(n===null||n===t)}function oV(t,e=10){let n=null;return Math.abs(t.y)>e?n="y":Math.abs(t.x)>e&&(n="x"),n}class aV extends gi{constructor(e){super(e),this.removeGroupControls=tn,this.removeListeners=tn,this.controls=new iV(e)}mount(){const{dragControls:e}=this.node.getProps();e&&(this.removeGroupControls=e.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||tn}update(){const{dragControls:e}=this.node.getProps(),{dragControls:n}=this.node.prevProps||{};e!==n&&(this.removeGroupControls(),e&&(this.removeGroupControls=e.subscribe(this.controls)))}unmount(){this.removeGroupControls(),this.removeListeners(),this.controls.isDragging||this.controls.endPanSession()}}const Y_=t=>
256(e,n)=>{t&&ke.postRender(()=>t(e,n))};class lV extends gi{constructor(){super(...arguments),this.removePointerDownListener=tn}onPointerDown(e){this.session=new vI(e,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:yI(this.node)})}createPanHandlers(){const{onPanSessionStart:e,onPanStart:n,onPan:r,onPanEnd:s}=this.node.getProps();return{onSessionStart:Y_(e),onStart:Y_(n),onMove:r,onEnd:(i,o)=>{delete this.session,s&&ke.postRender(()=>s(i,o))}}}mount(){this.removePointerDownListener=$l(this.node.current,"pointerdown",e=>this.onPointerDown(e))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}let Xp=!1;class cV extends m.Component{componentDidMount(){const{visualElement:e,layoutGroup:n,switchLayoutGroup:r,layoutId:s}=this.props,{projection:i}=e;i&&(n.group&&n.group.add(i),r&&r.register&&s&&r.register(i),Xp&&i.root.didUpdate(),i.addEventListener("animationComplete",()=>{this.safeToRemove()}),i.setOptions({...i.options,layoutDependency:this.props.layoutDependency,onExitComplete:()=>this.safeToRemove()})),wd.hasEverUpdated=!0}getSnapshotBeforeUpdate(e){const{layoutDependency:n,visualElement:r,drag:s,isPresent:i}=this.props,{projection:o}=r;return o&&(o.isPresent=i,e.layoutDependency!==n&&o.setOptions({...o.options,layoutDependency:n}),Xp=!0,s||e.layoutDependency!==n||n===void 0||e.isPresent!==i?o.willUpdate():this.safeToRemove(),e.isPresent!==i&&(i?o.promote():o.relegate()||ke.postRender(()=>{const a=o.getStack();(!a||!a.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:e}=this.props.visualElement;e&&(e.root.didUpdate(),_x.postRender(()=>{!e.currentAnimation&&e.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:e,layoutGroup:n,switchLayoutGroup:r}=this.props,{projection:s}=e;Xp=!0,s&&(s.scheduleCheckAfterUnmount(),n&&n.group&&n.group.remove(s),r&&r.deregister&&r.deregister(s))}safeToRemove(){const{safeToRemove:e}=this.props;e&&e()}render(){return null}}function wI(t){const[e,n]=lI(),r=m.useContext(Jv);return l.jsx(cV,{...t,layoutGroup:r,switchLayoutGroup:m.useContext(mI),isPresent:e,safeToRemove:n})}const uV={pan:{Feature:lV},drag:{Feature:aV,ProjectionNode:aI,MeasureLayout:wI}};function Q_(t,e,n){const{props:r}=t;t.animationState&&r.whileHover&&t.animationState.setActive("whileHover",n==="Start");const s="onHover"+n,i=r[s];i&&ke.postRender(()=>i(e,Jc(e)))}class dV extends gi{mount(){const{current:e}=this.node;e&&(this.unmount=L6(e,(n,r)=>(Q_(this.node,r,"Start"),s=>Q_(this.node,s,"End"))))}unmount(){}}class hV extends gi{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=Yc(_c(this.node.current,"focus",()=>this.onFocus()),_c(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function X_(t,e,n){const{props:r}=t;if(t.current instanceof HTMLButtonElement&&t.current.disabled)return;t.animationState&&r.whileTap&&t.animationState.setActive("whileTap",n==="Start");const s="onTap"+(n==="End"?"":n),i=r[s];i&&ke.postRender(()=>i(e,Jc(e)))}class fV extends gi{mount(){const{current:e}=this.node;e&&(this.unmount=B6(e,(n,r)=>(X_(this.node,r,"Start"),(s,{success:i})=>X_(this.node,s,i?"End":"Cancel")),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}}const ry=new WeakMap,Jp=new WeakMap,pV=t=>{const e=ry.get(t.target);e&&e(t)},mV=t=>{t.forEach(pV)};function gV({root:t,...e}){const n=t||document;Jp.has(n)||Jp.set(n,{});const r=Jp.get(n),s=JSON.stringify(e);return r[s]||(r[s]=new IntersectionObserver(mV,{root:t,...e})),r[s]}function yV(t,e,n){const r=gV(e);return ry.set(t,n),r.observe(t),()=>{ry.delete(t),r.unobserve(t)}}const vV={some:0,all:1};class xV extends gi{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:e={}}=this.node.getProps(),{root:n,margin:r,amount:s="some",once:i}=e,o={root:n?n.current:void 0,rootMargin:r,threshold:typeof s=="number"?s:vV[s]},a=c=>{const{isIntersecting:u}=c;if(this.isInView===u||(this.isInView=u,i&&!u&&this.hasEnteredView))return;u&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",u);const{onViewportEnter:d,onViewportLeave:h}=this.node.getProps(),f=u?d:h;f&&f(c)};return yV(this.node.current,o,a)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:e,prevProps:n}=this.node;["amount","margin","root"].some(wV(e,n))&&this.startObserver()}unmount(){}}function wV({viewport:t={}},{viewport:e={}}={}){return n=>t[n]!==e[n]}const bV={inView:{Feature:xV},tap:{Feature:fV},focus:{Feature:hV},hover:{Feature:dV}},_V={layout:{ProjectionNode:aI,MeasureLayout:wI}},kV={...GB,...bV,...uV,..._V},oe=$B(kV,zB),EV=50,J_=()=>({current:0,offset:[],progress:0,scrollLength:0,targetOffset:0,targetLength:0,containerLength:0,velocity:0}),CV=()=>({time:0,x:J_(),y:J_()}),SV={x:{length:"Width",position:"Left"},y:{length:"Height",position:"Top"}};function Z_(t,e,n,r){const s=n[e],{length:i,position:o}=SV[e],a=s.current,c=n.time;s.current=t[`scroll${o}`],s.scrollLength=t[`scroll${i}`]-t[`client${i}`],s.offset.length=0,s.offset[0]=0,s.offset[1]=s.scrollLength,s.progress=Ca(0,s.scrollLength,s.current);const u=r-c;s.velocity=u>EV?0:rx(s.current-a,u)}function NV(t,e,n){Z_(t,"x",e,n),Z_(t,"y",e,n),e.time=n}function TV(t,e){const n={x:0,y:0};let r=t;for(;r&&r!==e;)if(ch(r))n.x+=r.offsetLeft,n.y+=r.offsetTop,r=r.offsetParent;else if(r.tagName==="svg"){const s=r.getBoundingClientRect();r=r.parentElement;const i=r.getBoundingClientRect();n.x+=s.left-i.left,n.y+=s.top-i.top}else if(r instanceof SVGGraphicsElement){const{x:s,y:i}=r.getBBox();n.x+=s,n.y+=i;let o=null,a=r.parentNode;for(;!o;)a.tagName==="svg"&&(o=a),a=r.parentNode;r=o}else break;return n}const sy={start:0,center:.5,end:1};function e1(t,e,n=0){let r=0;if(t in sy&&(t=sy[t]),typeof t=="string"){const s=parseFloat(t);t.endsWith("px")?r=s:t.endsWith("%")?t=s/100:t.endsWith("vw")?r=s/100*document.documentElement.clientWidth:t.endsWith("vh")?r=s/100*document.documentElement.clientHeight:t=s}return typeof t=="number"&&(r=e*t),n+r}const IV=[0,0];function PV(t,e,n,r){let s=Array.isArray(t)?t:IV,i=0,o=0;return typeof t=="number"?s=[t,t]:typeof t=="string"&&(t=t.trim(),t.includes(" ")?s=t.split(" "):s=[t,sy[t]?t:"0"]),i=e1(s[0],n,r),o=e1(s[1],e),i-o}const jV={Enter:[[0,1],[1,1]],Exit:[[0,0],[1,0]],Any:[[1,0],[0,1]],All:[[0,0],[1,1]]},RV={x:0,y:0};function AV(t){return"getBBox"in t&&t.tagName!=="svg"?t.getBBox():{width:t.clientWidth,height:t.clientHeight}}function DV(t,e,n){const{offset:r=jV.All}=n,{target:s=t,axis:i="y"}=n,o=i==="y"?"height":"width",a=s!==t?TV(s,t):RV,c=s===t?{width:t.scrollWidth,height:t.scrollHeight}:AV(s),u={width:t.clientWidth,height:t.clientHeight};e[i].offset.length=0;let d=!e[i].interpolate;const h=r.length;for(let f=0;f<h;f++){const p=PV(r[f],u[o],c[o],a[i]);
256!d&&p!==e[i].interpolatorOffsets[f]&&(d=!0),e[i].offset[f]=p}d&&(e[i].interpolate=dx(e[i].offset,uT(r),{clamp:!1}),e[i].interpolatorOffsets=[...e[i].offset]),e[i].progress=rr(0,1,e[i].interpolate(e[i].current))}function MV(t,e=t,n){if(n.x.targetOffset=0,n.y.targetOffset=0,e!==t){let r=e;for(;r&&r!==t;)n.x.targetOffset+=r.offsetLeft,n.y.targetOffset+=r.offsetTop,r=r.offsetParent}n.x.targetLength=e===t?e.scrollWidth:e.clientWidth,n.y.targetLength=e===t?e.scrollHeight:e.clientHeight,n.x.containerLength=t.clientWidth,n.y.containerLength=t.clientHeight}function OV(t,e,n,r={}){return{measure:s=>{MV(t,r.target,n),NV(t,n,s),(r.offset||r.target)&&DV(t,n,r)},notify:()=>e(n)}}const vo=new WeakMap,t1=new WeakMap,Zp=new WeakMap,n1=new WeakMap,Lu=new WeakMap,r1=t=>t===document.scrollingElement?window:t;function bI(t,{container:e=document.scrollingElement,trackContentSize:n=!1,...r}={}){if(!e)return tn;let s=Zp.get(e);s||(s=new Set,Zp.set(e,s));const i=CV(),o=OV(e,t,i,r);if(s.add(o),!vo.has(e)){const c=()=>{for(const f of s)f.measure(dt.timestamp);ke.preUpdate(u)},u=()=>{for(const f of s)f.notify()},d=()=>ke.read(c);vo.set(e,d);const h=r1(e);window.addEventListener("resize",d,{passive:!0}),e!==document.documentElement&&t1.set(e,Y6(e,d)),h.addEventListener("scroll",d,{passive:!0}),d()}if(n&&!Lu.has(e)){const c=vo.get(e),u={width:e.scrollWidth,height:e.scrollHeight};n1.set(e,u);const d=()=>{const f=e.scrollWidth,p=e.scrollHeight;(u.width!==f||u.height!==p)&&(c(),u.width=f,u.height=p)},h=ke.read(d,!0);Lu.set(e,h)}const a=vo.get(e);return ke.read(a,!1,!0),()=>{var h;Pn(a);const c=Zp.get(e);if(!c||(c.delete(o),c.size))return;const u=vo.get(e);vo.delete(e),u&&(r1(e).removeEventListener("scroll",u),(h=t1.get(e))==null||h(),window.removeEventListener("resize",u));const d=Lu.get(e);d&&(Pn(d),Lu.delete(e)),n1.delete(e)}}const s1=new Map;function LV(t){const e={value:0},n=bI(r=>{e.value=r[t.axis].progress*100},t);return{currentTime:e,cancel:n}}function _I({source:t,container:e,...n}){const{axis:r}=n;t&&(e=t);const s=s1.get(e)??new Map;s1.set(e,s);const i=n.target??"self",o=s.get(i)??{},a=r+(n.offset??[]).join(",");return o[a]||(o[a]=!n.target&&pT()?new ScrollTimeline({source:e,axis:r}):LV({container:e,...n})),o[a]}function FV(t,e){const n=_I(e);return t.attachTimeline({timeline:e.target?void 0:n,observe:r=>(r.pause(),MT(s=>{r.time=r.iterationDuration*s},n))})}function UV(t){return t.length===2}function BV(t,e){return UV(t)?bI(n=>{t(n[e.axis].progress,n)},e):MT(t,_I(e))}function VV(t,{axis:e="y",container:n=document.scrollingElement,...r}={}){if(!n)return tn;const s={axis:e,container:n,...r};return typeof t=="function"?BV(t,s):FV(t,s)}const $V=()=>({scrollX:Gn(0),scrollY:Gn(0),scrollXProgress:Gn(0),scrollYProgress:Gn(0)}),Fu=t=>t?!t.current:!1;function zV({container:t,target:e,...n}={}){const r=ri($V),s=m.useRef(null),i=m.useRef(!1),o=m.useCallback(()=>(s.current=VV((a,{x:c,y:u})=>{r.scrollX.set(c.current),r.scrollXProgress.set(c.progress),r.scrollY.set(u.current),r.scrollYProgress.set(u.progress)},{...n,container:(t==null?void 0:t.current)||void 0,target:(e==null?void 0:e.current)||void 0}),()=>{var a;(a=s.current)==null||a.call(s)}),[t,e,JSON.stringify(n.offset)]);return gf(()=>{if(i.current=!1,Fu(t)||Fu(e)){i.current=!0;return}else return o()},[o]),m.useEffect(()=>{if(i.current)return si(!Fu(t),"Container ref is defined but not hydrated","use-scroll-ref"),si(!Fu(e),"Target ref is defined but not hydrated","use-scroll-ref"),o()},[o]),r}function WV(t){const e=ri(()=>Gn(t)),{isStatic:n}=m.useContext(bf);if(n){const[,r]=m.useState(t);m.useEffect(()=>e.on("change",r),[])}return e}function kI(t,e){const n=WV(e()),r=()=>n.set(e());return r(),gf(()=>{const s=()=>ke.preRender(r,!1,!0),i=t.map(o=>o.on("change",s));return()=>{i.forEach(o=>o()),Pn(r)}}),n}function HV(t){Bl.current=[],t();const e=kI(Bl.current,t);return Bl.current=void 0,e}function EI(t,e,n,r){if(typeof t=="function")return HV(t);if(n!==void 0&&!Array.isArray(n)&&typeof e!="function")return KV(t,e,n,r);const o=typeof e=="function"?e:X6(e,n,r);return Array.isArray(t)?i1(t,o):i1([t],([a])=>o(a))}function i1(t,e){const n=ri(()=>[]);return kI(t,()=>{n.length=0;const r=t.length;for(let s=0;s<r;s++)n[s]=t[s].get();return e(n)})}function KV(t,e,n,r){const s=ri(()=>Object.keys(n)),i=ri(()=>({}));for(const o of s)i[o]=EI(t,e,n[o],r);return i}const GV={some:0,all:1};function qV(t,e,{root:n,margin:r,amount:s="some"}={}){const i=bx(t),o=new WeakMap,a=u=>{u.forEach(d=>{const h=o.get(d.target);if(d.isIntersecting!==!!h)if(d.isIntersecting){const f=e(d.target,d);typeof f=="function"?o.set(d.target,f):c.unobserve(d.target)}
256else typeof h=="function"&&(h(d),o.delete(d.target))})},c=new IntersectionObserver(a,{root:n,rootMargin:r,threshold:typeof s=="number"?s:GV[s]});return i.forEach(u=>c.observe(u)),()=>c.disconnect()}function iy(t,{root:e,margin:n,amount:r,once:s=!1,initial:i=!1}={}){const[o,a]=m.useState(i);return m.useEffect(()=>{if(!t.current||s&&o)return;const c=()=>(a(!0),s?void 0:()=>a(!1)),u={root:e&&e.current||void 0,margin:n,amount:r};return qV(t.current,c,u)},[e,t,n,s,r]),o}function YV(){const[t,e]=m.useState(!1);m.useEffect(()=>{const r=()=>{e(window.scrollY>400)};return window.addEventListener("scroll",r),()=>window.removeEventListener("scroll",r)},[]);const n=()=>{window.scrollTo({top:0,behavior:"smooth"})};return l.jsx(Xi,{children:t&&l.jsx(oe.button,{initial:{opacity:0,scale:.8},animate:{opacity:1,scale:1},exit:{opacity:0,scale:.8},transition:{duration:.2},onClick:n,className:"fixed bottom-6 right-6 z-40 w-12 h-12 bg-foreground text-background rounded-full shadow-lg flex items-center justify-center hover:bg-foreground/90 transition-colors duration-300","aria-label":"Scroll to top",children:l.jsx(wO,{className:"w-5 h-5"})})})}var kf=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(t){return this.listeners.add(t),this.onSubscribe(),()=>{this.listeners.delete(t),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},Ef=typeof window>"u"||"Deno"in globalThis;function Vn(){}function QV(t,e){return typeof t=="function"?t(e):t}function XV(t){return typeof t=="number"&&t>=0&&t!==1/0}function JV(t,e){return Math.max(t+(e||0)-Date.now(),0)}function oy(t,e){return typeof t=="function"?t(e):t}function ZV(t,e){return typeof t=="function"?t(e):t}function o1(t,e){const{type:n="all",exact:r,fetchStatus:s,predicate:i,queryKey:o,stale:a}=t;if(o){if(r){if(e.queryHash!==jx(o,e.options))return!1}else if(!Ec(e.queryKey,o))return!1}if(n!=="all"){const c=e.isActive();if(n==="active"&&!c||n==="inactive"&&c)return!1}return!(typeof a=="boolean"&&e.isStale()!==a||s&&s!==e.state.fetchStatus||i&&!i(e))}function a1(t,e){const{exact:n,status:r,predicate:s,mutationKey:i}=t;if(i){if(!e.options.mutationKey)return!1;if(n){if(kc(e.options.mutationKey)!==kc(i))return!1}else if(!Ec(e.options.mutationKey,i))return!1}return!(r&&e.state.status!==r||s&&!s(e))}function jx(t,e){return((e==null?void 0:e.queryKeyHashFn)||kc)(t)}function kc(t){return JSON.stringify(t,(e,n)=>ay(n)?Object.keys(n).sort().reduce((r,s)=>(r[s]=n[s],r),{}):n)}function Ec(t,e){return t===e?!0:typeof t!=typeof e?!1:t&&e&&typeof t=="object"&&typeof e=="object"?Object.keys(e).every(n=>Ec(t[n],e[n])):!1}function CI(t,e){if(t===e)return t;const n=l1(t)&&l1(e);if(n||ay(t)&&ay(e)){const r=n?t:Object.keys(t),s=r.length,i=n?e:Object.keys(e),o=i.length,a=n?[]:{},c=new Set(r);let u=0;for(let d=0;d<o;d++){const h=n?d:i[d];(!n&&c.has(h)||n)&&t[h]===void 0&&e[h]===void 0?(a[h]=void 0,u++):(a[h]=CI(t[h],e[h]),a[h]===t[h]&&t[h]!==void 0&&u++)}return s===o&&u===s?t:a}return e}function l1(t){return Array.isArray(t)&&t.length===Object.keys(t).length}function ay(t){if(!c1(t))return!1;const e=t.constructor;if(e===void 0)return!0;const n=e.prototype;return!(!c1(n)||!n.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(t)!==Object.prototype)}function c1(t){return Object.prototype.toString.call(t)==="[object Object]"}function e8(t){return new Promise(e=>{setTimeout(e,t)})}function t8(t,e,n){return typeof n.structuralSharing=="function"?n.structuralSharing(t,e):n.structuralSharing!==!1?CI(t,e):e}function n8(t,e,n=0){const r=[...t,e];return n&&r.length>n?r.slice(1):r}function r8(t,e,n=0){const r=[e,...t];return n&&r.length>n?r.slice(0,-1):r}var Rx=Symbol();function SI(t,e){return!t.queryFn&&(e!=null&&e.initialPromise)?()=>e.initialPromise:!t.queryFn||t.queryFn===Rx?()=>Promise.reject(new Error(`Missing queryFn: '${t.queryHash}'`)):t.queryFn}var Mi,Ts,aa,zk,s8=(zk=class extends kf{constructor(){super();ve(this,Mi);ve(this,Ts);ve(this,aa);le(this,aa,e=>{if(!Ef&&window.addEventListener){const n=()=>e();return window.addEventListener("visibilitychange",n,!1),()=>{window.removeEventListener("visibilitychange",n)}}})}
vendor: 5,328 bytes, line 256
256onSubscribe(){D(this,Ts)||this.setEventListener(D(this,aa))}onUnsubscribe(){var e;this.hasListeners()||((e=D(this,Ts))==null||e.call(this),le(this,Ts,void 0))}setEventListener(e){var n;le(this,aa,e),(n=D(this,Ts))==null||n.call(this),le(this,Ts,e(r=>{typeof r=="boolean"?this.setFocused(r):this.onFocus()}))}setFocused(e){D(this,Mi)!==e&&(le(this,Mi,e),this.onFocus())}onFocus(){const e=this.isFocused();this.listeners.forEach(n=>{n(e)})}isFocused(){var e;return typeof D(this,Mi)=="boolean"?D(this,Mi):((e=globalThis.document)==null?void 0:e.visibilityState)!=="hidden"}},Mi=new WeakMap,Ts=new WeakMap,aa=new WeakMap,zk),NI=new s8,la,Is,ca,Wk,i8=(Wk=class extends kf{constructor(){super();ve(this,la,!0);ve(this,Is);ve(this,ca);le(this,ca,e=>{if(!Ef&&window.addEventListener){const n=()=>e(!0),r=()=>e(!1);return window.addEventListener("online",n,!1),window.addEventListener("offline",r,!1),()=>{window.removeEventListener("online",n),window.removeEventListener("offline",r)}}})}onSubscribe(){D(this,Is)||this.setEventListener(D(this,ca))}onUnsubscribe(){var e;this.hasListeners()||((e=D(this,Is))==null||e.call(this),le(this,Is,void 0))}setEventListener(e){var n;le(this,ca,e),(n=D(this,Is))==null||n.call(this),le(this,Is,e(this.setOnline.bind(this)))}setOnline(e){D(this,la)!==e&&(le(this,la,e),this.listeners.forEach(r=>{r(e)}))}isOnline(){return D(this,la)}},la=new WeakMap,Is=new WeakMap,ca=new WeakMap,Wk),ph=new i8;function o8(){let t,e;const n=new Promise((s,i)=>{t=s,e=i});n.status="pending",n.catch(()=>{});function r(s){Object.assign(n,s),delete n.resolve,delete n.reject}return n.resolve=s=>{r({status:"fulfilled",value:s}),t(s)},n.reject=s=>{r({status:"rejected",reason:s}),e(s)},n}function a8(t){return Math.min(1e3*2**t,3e4)}function TI(t){return(t??"online")==="online"?ph.isOnline():!0}var II=class extends Error{constructor(t){super("CancelledError"),this.revert=t==null?void 0:t.revert,this.silent=t==null?void 0:t.silent}};function em(t){return t instanceof II}function PI(t){let e=!1,n=0,r=!1,s;const i=o8(),o=g=>{var y;r||(f(new II(g)),(y=t.abort)==null||y.call(t))},a=()=>{e=!0},c=()=>{e=!1},u=()=>NI.isFocused()&&(t.networkMode==="always"||ph.isOnline())&&t.canRun(),d=()=>TI(t.networkMode)&&t.canRun(),h=g=>{var y;r||(r=!0,(y=t.onSuccess)==null||y.call(t,g),s==null||s(),i.resolve(g))},f=g=>{var y;r||(r=!0,(y=t.onError)==null||y.call(t,g),s==null||s(),i.reject(g))},p=()=>new Promise(g=>{var y;s=w=>{(r||u())&&g(w)},(y=t.onPause)==null||y.call(t)}).then(()=>{var g;s=void 0,r||(g=t.onContinue)==null||g.call(t)}),x=()=>{if(r)return;let g;const y=n===0?t.initialPromise:void 0;try{g=y??t.fn()}catch(w){g=Promise.reject(w)}Promise.resolve(g).then(h).catch(w=>{var S;if(r)return;const v=t.retry??(Ef?0:3),b=t.retryDelay??a8,_=typeof b=="function"?b(n,w):b,k=v===!0||typeof v=="number"&&n<v||typeof v=="function"&&v(n,w);if(e||!k){f(w);return}n++,(S=t.onFail)==null||S.call(t,n,w),e8(_).then(()=>u()?void 0:p()).then(()=>{e?f(w):x()})})};return{promise:i,cancel:o,continue:()=>(s==null||s(),i),cancelRetry:a,continueRetry:c,canStart:d,start:()=>(d()?x():p().then(x),i)}}var l8=t=>setTimeout(t,0);function c8(){let t=[],e=0,n=a=>{a()},r=a=>{a()},s=l8;const i=a=>{e?t.push(a):s(()=>{n(a)})},o=()=>{const a=t;t=[],a.length&&s(()=>{r(()=>{a.forEach(c=>{n(c)})})})};return{batch:a=>{let c;e++;try{c=a()}finally{e--,e||o()}return c},batchCalls:a=>(...c)=>{i(()=>{a(...c)})},schedule:i,setNotifyFunction:a=>{n=a},setBatchNotifyFunction:a=>{r=a},setScheduler:a=>{s=a}}}var Ut=c8(),Oi,Hk,jI=(Hk=class{constructor(){ve(this,Oi)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),XV(this.gcTime)&&le(this,Oi,setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(t){this.gcTime=Math.max(this.gcTime||0,t??(Ef?1/0:5*60*1e3))}clearGcTimeout(){D(this,Oi)&&(clearTimeout(D(this,Oi)),le(this,Oi,void 0))}},Oi=new WeakMap,Hk),ua,Li,xn,Fi,St,Lc,Ui,$n,Dr,Kk,u8=(Kk=class extends jI{constructor(e){super();ve(this,$n);ve(this,ua);ve(this,Li);ve(this,xn);ve(this,Fi);ve(this,St);ve(this,Lc);ve(this,Ui);le(this,Ui,!1),le(this,Lc,e.defaultOptions),this.setOptions(e.options),this.observers=[],le(this,Fi,e.client),le(this,xn,D(this,Fi).getQueryCache()),this.queryKey=e.queryKey,this.queryHash=e.queryHash,le(this,ua,h8(this.options)),this.state=e.state??D(this,ua),this.scheduleGc()}get meta(){return this.options.meta}get promise(){var e;return(e=D(this,St))==null?void 0:e.promise}setOptions(e){this.options={...D(this,Lc),...e},this.updateGcTime(this.options.gcTime)}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&D(this,xn).remove(this)}setData(e,n){const r=t8(this.state.data,e,this.options);return kt(this,$n,Dr).call(this,{data:r,type:"success",dataUpdatedAt:n==null?void 0:n.updatedAt,manual:n==null?void 0:n.manual}),r}setState(e,n){kt(this,$n,Dr).call(this,{type:"setState",state:e,setStateOptions:n})}cancel(e){var r,s;const n=(r=D(this,St))==null?void 0:r.promise;return(s=D(this,St))==null||s.cancel(e),n?n.then(Vn).catch(Vn):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(D(this,ua))}isActive(){return this.observers.some(e=>ZV(e.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===Rx||this.state.dataUpdateCount+this.state.errorUpdate
256Count===0}isStatic(){return this.getObserversCount()>0?this.observers.some(e=>oy(e.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(e=>e.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(e=0){return this.state.data===void 0?!0:e==="static"?!1:this.state.isInvalidated?!0:!JV(this.state.dataUpdatedAt,e)}onFocus(){var n;const e=this.observers.find(r=>r.shouldFetchOnWindowFocus());e==null||e.refetch({cancelRefetch:!1}),(n=D(this,St))==null||n.continue()}onOnline(){var n;const e=this.observers.find(r=>r.shouldFetchOnReconnect());e==null||e.refetch({cancelRefetch:!1}),(n=D(this,St))==null||n.continue()}addObserver(e){this.observers.includes(e)||(this.observers.push(e),this.clearGcTimeout(),D(this,xn).notify({type:"observerAdded",query:this,observer:e}))}removeObserver(e){this.observers.includes(e)&&(this.observers=this.observers.filter(n=>n!==e),this.observers.length||(D(this,St)&&(D(this,Ui)?D(this,St).cancel({revert:!0}):D(this,St).cancelRetry()),this.scheduleGc()),D(this,xn).notify({type:"observerRemoved",query:this,observer:e}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||kt(this,$n,Dr).call(this,{type:"invalidate"})}fetch(e,n){var u,d,h;if(this.state.fetchStatus!=="idle"){if(this.state.data!==void 0&&(n!=null&&n.cancelRefetch))this.cancel({silent:!0});else if(D(this,St))return D(this,St).continueRetry(),D(this,St).promise}if(e&&this.setOptions(e),!this.options.queryFn){const f=this.observers.find(p=>p.options.queryFn);f&&this.setOptions(f.options)}const r=new AbortController,s=f=>{Object.defineProperty(f,"signal",{enumerable:!0,get:()=>(le(this,Ui,!0),r.signal)})},i=()=>{const f=SI(this.options,n),x=(()=>{const g={client:D(this,Fi),queryKey:this.queryKey,meta:this.meta};return s(g),g})();return le(this,Ui,!1),this.options.persister?this.options.persister(f,x,this):f(x)},a=(()=>{const f={fetchOptions:n,options:this.options,queryKey:this.queryKey,client:D(this,Fi),state:this.state,fetchFn:i};return s(f),f})();(u=this.options.behavior)==null||u.onFetch(a,this),le(this,Li,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((d=a.fetchOptions)==null?void 0:d.meta))&&kt(this,$n,Dr).call(this,{type:"fetch",meta:(h=a.fetchOptions)==null?void 0:h.meta});const c=f=>{var p,x,g,y;em(f)&&f.silent||kt(this,$n,Dr).call(this,{type:"error",error:f}),em(f)||((x=(p=D(this,xn).config).onError)==null||x.call(p,f,this),(y=(g=D(this,xn).config).onSettled)==null||y.call(g,this.state.data,f,this)),this.scheduleGc()};return le(this,St,PI({initialPromise:n==null?void 0:n.initialPromise,fn:a.fetchFn,abort:r.abort.bind(r),onSuccess:f=>{var p,x,g,y;if(f===void 0){c(new Error(`${this.queryHash} data is undefined`));return}try{this.setData(f)}catch(w){c(w);return}(x=(p=D(this,xn).config).onSuccess)==null||x.call(p,f,this),(y=(g=D(this,xn).config).onSettled)==null||y.call(g,f,this.state.error,this),this.scheduleGc()},onError:c,onFail:(f,p)=>{kt(this,$n,Dr).call(this,{type:"failed",failureCount:f,error:p})},onPause:()=>{kt(this,$n,Dr).call(this,{type:"pause"})},onContinue:()=>{kt(this,$n,Dr).call(this,{type:"continue"})},retry:a.options.retry,retryDelay:a.options.retryDelay,networkMode:a.options.networkMode,canRun:()=>!0})),D(this,St).start()}},ua=new WeakMap,Li=new WeakMap,xn=new WeakMap,Fi=new WeakMap,St=new WeakMap,Lc=new WeakMap,Ui=new WeakMap,$n=new WeakSet,Dr=function(e){const n=r=>{switch(e.type){case"failed":return{...r,fetchFailureCount:e.failureCount,fetchFailureReason:e.error};case"pause":return{...r,fetchStatus:"paused"};case"continue":return{...r,fetchStatus:"fetching"};case"fetch":return{...r,...d8(r.data,this.options),fetchMeta:e.meta??null};case"success":return le(this,Li,void 0),{...r,data:e.data,dataUpdateCount:r.dataUpdateCount+1,dataUpdatedAt:e.dataUpdatedAt??Date.now(),error:null,isInvalidated:!1,status:"success",...!e.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};case"error":const s=e.error;return em(s)&&s.revert&&D(this,Li)?{...D(this,Li),fetchStatus:"idle"}
vendor: 14,924 bytes, lines 256-281
256:{...r,error:s,errorUpdateCount:r.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:r.fetchFailureCount+1,fetchFailureReason:s,fetchStatus:"idle",status:"error"};case"invalidate":return{...r,isInvalidated:!0};case"setState":return{...r,...e.state}}};this.state=n(this.state),Ut.batch(()=>{this.observers.forEach(r=>{r.onQueryUpdate()}),D(this,xn).notify({query:this,type:"updated",action:e})})},Kk);function d8(t,e){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:TI(e.networkMode)?"fetching":"paused",...t===void 0&&{error:null,status:"pending"}}}function h8(t){const e=typeof t.initialData=="function"?t.initialData():t.initialData,n=e!==void 0,r=n?typeof t.initialDataUpdatedAt=="function"?t.initialDataUpdatedAt():t.initialDataUpdatedAt:0;return{data:e,dataUpdateCount:0,dataUpdatedAt:n?r??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:n?"success":"pending",fetchStatus:"idle"}}var dr,Gk,f8=(Gk=class extends kf{constructor(e={}){super();ve(this,dr);this.config=e,le(this,dr,new Map)}build(e,n,r){const s=n.queryKey,i=n.queryHash??jx(s,n);let o=this.get(i);return o||(o=new u8({client:e,queryKey:s,queryHash:i,options:e.defaultQueryOptions(n),state:r,defaultOptions:e.getQueryDefaults(s)}),this.add(o)),o}add(e){D(this,dr).has(e.queryHash)||(D(this,dr).set(e.queryHash,e),this.notify({type:"added",query:e}))}remove(e){const n=D(this,dr).get(e.queryHash);n&&(e.destroy(),n===e&&D(this,dr).delete(e.queryHash),this.notify({type:"removed",query:e}))}clear(){Ut.batch(()=>{this.getAll().forEach(e=>{this.remove(e)})})}get(e){return D(this,dr).get(e)}getAll(){return[...D(this,dr).values()]}find(e){const n={exact:!0,...e};return this.getAll().find(r=>o1(n,r))}findAll(e={}){const n=this.getAll();return Object.keys(e).length>0?n.filter(r=>o1(e,r)):n}notify(e){Ut.batch(()=>{this.listeners.forEach(n=>{n(e)})})}onFocus(){Ut.batch(()=>{this.getAll().forEach(e=>{e.onFocus()})})}onOnline(){Ut.batch(()=>{this.getAll().forEach(e=>{e.onOnline()})})}},dr=new WeakMap,Gk),hr,Lt,Bi,fr,ys,qk,p8=(qk=class extends jI{constructor(e){super();ve(this,fr);ve(this,hr);ve(this,Lt);ve(this,Bi);this.mutationId=e.mutationId,le(this,Lt,e.mutationCache),le(this,hr,[]),this.state=e.state||m8(),this.setOptions(e.options),this.scheduleGc()}setOptions(e){this.options=e,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(e){D(this,hr).includes(e)||(D(this,hr).push(e),this.clearGcTimeout(),D(this,Lt).notify({type:"observerAdded",mutation:this,observer:e}))}removeObserver(e){le(this,hr,D(this,hr).filter(n=>n!==e)),this.scheduleGc(),D(this,Lt).notify({type:"observerRemoved",mutation:this,observer:e})}optionalRemove(){D(this,hr).length||(this.state.status==="pending"?this.scheduleGc():D(this,Lt).remove(this))}continue(){var e;return((e=D(this,Bi))==null?void 0:e.continue())??this.execute(this.state.variables)}async execute(e){var i,o,a,c,u,d,h,f,p,x,g,y,w,v,b,_,k,S,C,N;const n=()=>{kt(this,fr,ys).call(this,{type:"continue"})};le(this,Bi,PI({fn:()=>this.options.mutationFn?this.options.mutationFn(e):Promise.reject(new Error("No mutationFn found")),onFail:(P,j)=>{kt(this,fr,ys).call(this,{type:"failed",failureCount:P,error:j})},onPause:()=>{kt(this,fr,ys).call(this,{type:"pause"})},onContinue:n,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>D(this,Lt).canRun(this)}));const r=this.state.status==="pending",s=!D(this,Bi).canStart();try{if(r)n();else{kt(this,fr,ys).call(this,{type:"pending",variables:e,isPaused:s}),await((o=(i=D(this,Lt).config).onMutate)==null?void 0:o.call(i,e,this));const j=await((c=(a=this.options).onMutate)==null?void 0:c.call(a,e));j!==this.state.context&&kt(this,fr,ys).call(this,{type:"pending",context:j,variables:e,isPaused:s})}const P=await D(this,Bi).start();return await((d=(u=D(this,Lt).config).onSuccess)==null?void 0:d.call(u,P,e,this.state.context,this)),await((f=(h=this.options).onSuccess)==null?void 0:f.call(h,P,e,this.state.context)),await((x=(p=D(this,Lt).config).onSettled)==null?void 0:x.call(p,P,null,this.state.variables,this.state.context,this)),await((y=(g=this.options).onSettled)==null?void 0:y.call(g,P,null,e,this.state.context)),kt(this,fr,ys).call(this,{type:"success",data:P}),P}catch(P){try{throw await((v=(w=D(this,Lt).config).onError)==null?void 0:v.call(w,P,e,this.state.context,this)),await((_=(b=this.options).onError)==null?void 0:_.call(b,P,e,this.state.context)),await((S=(k=D(this,Lt).config).onSettled)==null?void 0:S.call(k,void 0,P,this.state.variables,this.state.context,this)),await((N=(C=this.options).onSettled)==null?void 0:N.call(C,void 0,P,e,this.state.context)),P}finally{kt(this,fr,ys).call(this,{type:"error",error:P})}}finally{D(this,Lt).runNext(this)}}},hr=new WeakMap,Lt=new WeakMap,Bi=new WeakMap,fr=new WeakSet,ys=function(e){const n=r=>{switch(e.type){case"failed":return{...r,failureCount:e.failureCount,failureReason:e.error};case"pause":return{...r,isPaused:!0};case"continue":return{...r,isPaused:!1};case"pending":return{...r,context:e.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:e.isPaused,status:"pending",variables:e.variables,submittedAt:Date.now()};case"success":return{...r,data:e.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...r,data:void 0,error:e.error,failureCount:r.failureCount+1,failureReason:e.error,isPaused:!1,status:"error"}}};this.state=n(this.state),Ut.batch(()=>{D(this,hr).forEach(r=>{r.onMutationUpdate(e)}),D(this,Lt).notify({mutation:this,type:"updated",action:e})})},qk);function m8(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var Lr,zn,Fc,Yk,g8=(Yk=class extends kf{constructor(e={}){super();ve(this,Lr);ve(this,zn);ve(this,Fc);this.config=e,le(this,Lr,new Set),le(this,zn,new Map),le(this,Fc,0)}build(e,n,r){const s=new p8({mutationCache:this,mutationId:++du(this,Fc)._,options:e.defaultMutationOptions(n),state:r});return this.add(s),s}add(e){D(this,Lr).add(e);const n=Uu(e);if(typeof n=="string"){const r=D(this,zn).get(n);r?r.push(e):D(this,zn).set(n,[e])}this.notify({type:"added",mutation:e})}remove(e){if(D(this,Lr).delete(e)){const n=Uu(e);if(typeof n=="string"){const r=D(this,zn).get(n);if(r)if(r.length>1){const s=r.indexOf(e);s!==-1&&r.splice(s,1)}else r[0]===e&&D(this,zn).delete(n)}}this.notify({type:"removed",mutation:e})}canRun(e){const n=Uu(e);if(typeof n=="string"){const r=D(this,zn).get(n),s=r==null?void 0:r.find(i=>i.state.status==="pending");return!s||s===e}else return!0}runNext(e){var r;const n=Uu(e);if(typeof n=="string"){const s=(r=D(this,zn).get(n))==null?void 0:r.find(i=>i!==e&&i.state.isPaused);return(s==null?void 0:s.continue())??Promise.resolve()}else return Promise.resolve()}clear(){Ut.batch(()=>{D(this,Lr).forEach(e=>{this.notify({type:"removed",mutation:e})}),D(this,Lr).clear(),D(this,zn).clear()})}getAll(){return Array.from(D(this,Lr))}find(e){const n={exact:!0,...e};return this.getAll().find(r=>a1(n,r))}findAll(e={}){return this.getAll().filter(n=>a1(e,n))}notify(e){Ut.batch(()=>{this.listeners.forEach(n=>{n(e)})})}resumePausedMutations(){const e=this.getAll().filter(n=>n.state.isPaused);return Ut.batch(()=>Promise.all(e.map(n=>n.continue().catch(Vn))))}},Lr=new WeakMap,zn=new WeakMap,Fc=new WeakMap,Yk);function Uu(t){var e;return(e=t.options.scope)==null?void 0:e.id}function u1(t){return{onFetch:(e,n)=>{var d,h,f,p,x;const r=e.options,s=(f=(h=(d=e.fetchOptions)==null?void 0:d.meta)==null?void 0:h.fetchMore)==null?void 0:f.direction,i=((p=e.state.data)==null?void 0:p.pages)||[],o=((x=e.state.data)==null?void 0:x.pageParams)||[];let a={pages:[],pageParams:[]},c=0;const u=async()=>{let g=!1;const y=b=>{Object.defineProperty(b,"signal",{enumerable:!0,get:()=>(e.signal.aborted?g=!0:e.signal.addEventListener("abort",()=>{g=!0}),e.signal)})},w=SI(e.options,e.fetchOptions),v=async(b,_,k)=>{if(g)return Promise.reject();if(_==null&&b.pages.length)return Promise.resolve(b);const C=(()=>{const O={client:e.client,queryKey:e.queryKey,pageParam:_,direction:k?"backward":"forward",meta:e.options.meta};return y(O),O})(),N=await w(C),{maxPages:P}=e.options,j=k?r8:n8;return{pages:j(b.pages,N,P),pageParams:j(b.pageParams,_,P)}};if(s&&i.length){const b=s==="backward",_=b?y8:d1,k={pages:i,pageParams:o},S=_(r,k);a=await v(k,S,b)}else{const b=t??i.length;do{const _=c===0?o[0]??r.initialPageParam:d1(r,a);if(c>0&&_==null)break;a=await v(a,_),c++}while(c<b)}return a};e.options.persister?e.fetchFn=()=>{var g,y;return(y=(g=e.options).persister)==null?void 0:y.call(g,u,{client:e.client,queryKey:e.queryKey,meta:e.options.meta,signal:e.signal},n)}:e.fetchFn=u}}}function d1(t,{pages:e,pageParams:n}){const r=e.length-1;return e.length>0?t.getNextPageParam(e[r],e,n[r],n):void 0}function y8(t,{pages:e,pageParams:n}){var r;return e.length>0?(r=t.getPreviousPageParam)==null?void 0:r.call(t,e[0],e,n[0],n):void 0}var Ke,Ps,js,da,ha,Rs,fa,pa,Qk,v8=(Qk=class{constructor(t={}){ve(this,Ke);ve(this,Ps);ve(this,js);ve(this,da);ve(this,ha);ve(this,Rs);ve(this,fa);ve(this,pa);le(this,Ke,t.queryCache||new f8),le(this,Ps,t.mutationCache||new g8),le(this,js,t.defaultOptions||{}),le(this,da,new Map),le(this,ha,new Map),le(this,Rs,0)}mount(){du(this,Rs)._++,D(this,Rs)===1&&(le(this,fa,NI.subscribe(async t=>{t&&(await this.resumePausedMutations(),D(this,Ke).onFocus())})),le(this,pa,ph.subscribe(async t=>{t&&(await this.resumePausedMutations(),D(this,Ke).onOnline())})))}unmount(){var t,e;du(this,Rs)._--,D(this,Rs)===0&&((t=D(this,fa))==null||t.call(this),le(this,fa,void 0),(e=D(this,pa))==null||e.call(this),le(this,pa,void 0))}isFetching(t){return D(this,Ke).findAll({...t,fetchStatus:"fetching"}).length}isMutating(t){return D(this,Ps).findAll({...t,status:"pending"}).length}getQueryData(t){var n;const e=this.defaultQueryOptions({queryKey:t});return(n=D(this,Ke).get(e.queryHash))==null?void 0:n.state.data}ensureQueryData(t){const e=this.defaultQueryOptions(t),n=D(this,Ke).build(this,e),r=n.state.data;return r===void 0?this.fetchQuery(t):(t.revalidateIfStale&&n.isStaleByTime(oy(e.staleTime,n))&&this.prefetchQuery(e),Promise.resolve(r))}getQueriesData(t){return D(this,Ke).findAll(t).map(({queryKey:e,state:n})=>{const r=n.data;return[e,r]})}setQueryData(t,e,n){const r=this.defaultQueryOptions({queryKey:t}),s=D(this,Ke).get(r.queryHash),i=s==null?void 0:s.state.data,o=QV(e,i);if(o!==void 0)return D(this,Ke).build(this,r).setData(o,{...n,manual:!0})}setQueriesData(t,e,n){return Ut.batch(()=>D(this,Ke).findAll(t).map(({queryKey:r})=>[r,this.setQueryData(r,e,n)]))}getQueryState(t){var n;const e=this.defaultQueryOptions({queryKey:t});return(n=D(this,Ke).get(e.queryHash))==null?void 0:n.state}removeQueries(t){const e=D(this,Ke);Ut.batch(()=>{e.findAll(t).forEach(n=>{e.remove(n)})})}resetQueries(t,e){const n=D(this,Ke);return Ut.batch(()=>(n.findAll(t).forEach(r=>{r.reset()}),this.refetchQueries({type:"active",...t},e)))}cancelQueries(t,e={}){const n={revert:!0,...e},r=Ut.batch(()=>D(this,Ke).findAll(t).map(s=>s.cancel(n)));return Promise.all(r).then(Vn).catch(Vn)}invalidateQueries(t,e={}){return Ut.batch(()=>(D(this,Ke).findAll(t).forEach(n=>{n.invalidate()}),(t==null?void 0:t.refetchType)==="none"?Promise.resolve():this.refetchQueries({...t,type:(t==null?void 0:t.refetchType)??(t==null?void 0:t.type)??"active"},e)))}refetchQueries(t,e={}){const n={...e,cancelRefetch:e.cancelRefetch??!0},r=Ut.batch(()=>D(this,Ke).findAll(t).filter(s=>!s.isDisabled()&&!s.isStatic()).map(s=>{let i=s.fetch(void 0,n);return n.throwOnError||(i=i.catch(Vn)),s.state.fetchStatus==="paused"?Promise.resolve():i}));return Promise.all(r).then(Vn)}fetchQuery(t){const e=this.defaultQueryOptions(t);e.retry===void 0&&(e.retry=!1);const n=D(this,Ke).build(this,e);return n.isStaleByTime(oy(e.staleTime,n))?n.fetch(e):Promise.resolve(n.state.data)}prefetchQuery(t){return this.fetchQuery(t).then(Vn).catch(Vn)}fetchInfiniteQuery(t){return t.behavior=u1(t.pages),this.fetchQuery(t)}prefetchInfiniteQuery(t){return this.fetchInfiniteQuery(t).then(Vn).catch(Vn)}ensureInfiniteQueryData(t){return t.behavior=u1(t.pages),this.ensureQueryData(t)}resumePausedMutations(){return ph.isOnline()?D(this,Ps).resumePausedMutations():Promise.resolve()}getQueryCache(){return D(this,Ke)}getMutationCache(){return D(this,Ps)}getDefaultOptions(){return D(this,js)}setDefaultOptions(t){le(this,js,t)}setQueryDefaults(t,e){D(this,da).set(kc(t),{queryKey:t,defaultOptions:e})}getQueryDefaults(t){const e=[...D(this,da).values()],n={};return e.forEach(r=>{Ec(t,r.queryKey)&&Object.assign(n,r.defaultOptions)}),n}setMutationDefaults(t,e){D(this,ha).set(kc(t),{mutationKey:t,defaultOptions:e})}getMutationDefaults(t){const e=[...D(this,ha).values()],n={};return e.forEach(r=>{Ec(t,r.mutationKey)&&Object.assign(n,r.defaultOptions)}),n}defaultQueryOptions(t){if(t._defaulted)return t;const e={...D(this,js).queries,...this.getQueryDefaults(t.queryKey),...t,_defaulted:!0};return e.queryHash||(e.queryHash=jx(e.queryKey,e)),e.refetchOnReconnect===void 0&&(e.refetchOnReconnect=e.networkMode!=="always"),e.throwOnError===void 0&&(e.throwOnError=!!e.suspense),!e.networkMode&&e.persister&&(e.networkMode="offlineFirst"),e.queryFn===Rx&&(e.enabled=!1),e}defaultMutationOptions(t){return t!=null&&t._defaulted?t:{...D(this,js).mutations,...(t==null?void 0:t.mutationKey)&&this.getMutationDefaults(t.mutationKey),...t,_defaulted:!0}}clear(){D(this,Ke).clear(),D(this,Ps).clear()}},Ke=new WeakMap,Ps=new WeakMap,js=new WeakMap,da=new WeakMap,ha=new WeakMap,Rs=new WeakMap,fa=new WeakMap,pa=new WeakMap,Qk),x8=m.createContext(void 0),w8=({client:t,children:e})=>(m.useEffect(()=>(t.mount(),()=>{t.unmount()}),[t]),l.jsx(x8.Provider,{value:t,children:e}));const b8=()=>{};var h1={};/** 257 * @license 258 * Copyright 2017 Google LLC 259 * 260 * Licensed under the Apache License, Version 2.0 (the "License"); 261 * you may not use this file except in compliance with the License. 262 * You may obtain a copy of the License at 263 * 264 * http://www.apache.org/licenses/LICENSE-2.0 265 * 266 * Unless required by applicable law or agreed to in writing, software 267 * distributed under the License is distributed on an "AS IS" BASIS, 268 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 269 * See the License for the specific language governing permissions and 270 * limitations under the License. 271 */const RI={NODE_CLIENT:!1,NODE_ADMIN:!1,SDK_VERSION:"${JSCORE_VERSION}"};/** 272 * @license 273 * Copyright 2017 Google LLC 274 * 275 * Licensed under the Apache License, Version 2.0 (the "License"); 276 * you may not use this file except in compliance with the License. 277 * You may obtain a copy of the License at 278 * 279 * http://www.apache.org/licenses/LICENSE-2.0 280 * 281 * Unless required by applicable law or agreed to in writing, softw
281are 282 * distributed under the License is distributed on an "AS IS" BASIS, 283 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 284 * See the License for the specific language governing permissions and 285 * limitations under the License. 286 */const $=function(t,e){if(!t)throw Ka(e)},Ka=function(t){return new Error("Firebase Database ("+RI.SDK_VERSION+") INTERNAL ASSERT FAILED: "+t)};/** 287 * @license 288 * Copyright 2017 Google LLC 289 * 290 * Licensed under the Apache License, Version 2.0 (the "License"); 291 * you may not use this file except in compliance with the License. 292 * You may obtain a copy of the License at 293 * 294 * http://www.apache.org/licenses/LICENSE-2.0 295 * 296 * Unless required by applicable law or agreed to in writing, software 297 * distributed under the License is distributed on an "AS IS" BASIS, 298 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 299 * See the License for the specific language governing permissions and 300 * limitations under the License. 301 */const AI=function(t){const e=[];let n=0;for(let r=0;r<t.length;r++){let s=t.charCodeAt(r);s<128?e[n++]=s:s<2048?(e[n++]=s>>6|192,e[n++]=s&63|128):(s&64512)===55296&&r+1<t.length&&(t.charCodeAt(r+1)&64512)===56320?(s=65536+((s&1023)<<10)+(t.charCodeAt(++r)&1023),e[n++]=s>>18|240,e[n++]=s>>12&63|128,e[n++]=s>>6&63|128,e[n++]=s&63|128):(e[n++]=s>>12|224,e[n++]=s>>6&63|128,e[n++]=s&63|128)}return e},_8=function(t){const e=[];let n=0,r=0;for(;n<t.length;){const s=t[n++];if(s<128)e[r++]=String.fromCharCode(s);else if(s>191&&s<224){const i=t[n++];e[r++]=String.fromCharCode((s&31)<<6|i&63)}else if(s>239&&s<365){const i=t[n++],o=t[n++],a=t[n++],c=((s&7)<<18|(i&63)<<12|(o&63)<<6|a&63)-65536;e[r++]=String.fromCharCode(55296+(c>>10)),e[r++]=String.fromCharCode(56320+(c&1023))}else{const i=t[n++],o=t[n++];e[r++]=String.fromCharCode((s&15)<<12|(i&63)<<6|o&63)}}return e.join("")},Ax={byteToCharMap_:null,charToByteMap_:null,byteToCharMapWebSafe_:null,charToByteMapWebSafe_:null,ENCODED_VALS_BASE:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",get ENCODED_VALS(){return this.ENCODED_VALS_BASE+"+/="},get ENCODED_VALS_WEBSAFE(){return this.ENCODED_VALS_BASE+"-_."},HAS_NATIVE_SUPPORT:typeof atob=="function",encodeByteArray(t,e){if(!Array.isArray(t))throw Error("encodeByteArray takes an array as a parameter");this.init_();const n=e?this.byteToCharMapWebSafe_:this.byteToCharMap_,r=[];for(let s=0;s<t.length;s+=3){const i=t[s],o=s+1<t.length,a=o?t[s+1]:0,c=s+2<t.length,u=c?t[s+2]:0,d=i>>2,h=(i&3)<<4|a>>4;let f=(a&15)<<2|u>>6,p=u&63;c||(p=64,o||(f=64)),r.push(n[d],n[h],n[f],n[p])}return r.join("")},encodeString(t,e){return this.HAS_NATIVE_SUPPORT&&!e?btoa(t):this.encodeByteArray(AI(t),e)},decodeString(t,e){return this.HAS_NATIVE_SUPPORT&&!e?atob(t):_8(this.decodeStringToByteArray(t,e))},decodeStringToByteArray(t,e){this.init_();const n=e?this.charToByteMapWebSafe_:this.charToByteMap_,r=[];for(let s=0;s<t.length;){const i=n[t.charAt(s++)],a=s<t.length?n[t.charAt(s)]:0;++s;const u=s<t.length?n[t.charAt(s)]:64;++s;const h=s<t.length?n[t.charAt(s)]:64;if(++s,i==null||a==null||u==null||h==null)throw new k8;const f=i<<2|a>>4;if(r.push(f),u!==64){const p=a<<4&240|u>>2;if(r.push(p),h!==64){const x=u<<6&192|h;r.push(x)}}}return r},init_(){if(!this.byteToCharMap_){this.byteToCharMap_={},this.charToByteMap_={},this.byteToCharMapWebSafe_={},this.charToByteMapWebSafe_={};for(let t=0;t<this.ENCODED_VALS.length;t++)this.byteToCharMap_[t]=this.ENCODED_VALS.charAt(t),this.charToByteMap_[this.byteToCharMap_[t]]=t,this.byteToCharMapWebSafe_[t]=this.ENCODED_VALS_WEBSAFE.charAt(t),this.charToByteMapWebSafe_[this.byteToCharMapWebSafe_[t]]=t,t>=this.ENCODED_VALS_BASE.length&&(this.charToByteMap_[this.ENCODED_VALS_WEBSAFE.charAt(t)]=t,this.charToByteMapWebSafe_[this.ENCODED_VALS.charAt(t)]=t)}}};class k8 extends Error{constructor(){super(...arguments),this.name="DecodeBase64StringError"}}const DI=function(t){const e=AI(t);return Ax.encodeByteArray(e,!0)},mh=function(t){return DI(t).replace(/\./g,"")},gh=function(t){try{return Ax.decodeString(t,!0)}catch(e){console.error("base64Decode failed: ",e)}return null};/** 302 * @license 303 * Copyright 2017 Google LLC 304 * 305 * Licensed under the Apache License, Version 2.0 (the "License");
306 * you may not use this file except in compliance with the License. 307 * You may obtain a copy of the License at 308 * 309 * http://www.apache.org/licenses/LICENSE-2.0 310 * 311 * Unless required by applicable law or agreed to in writing, software 312 * distributed under the License is distributed on an "AS IS" BASIS, 313 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 314 * See the License for the specific language governing permissions and 315 * limitations under the License. 316 */function E8(t){return MI(void 0,t)}function MI(t,e){if(!(e instanceof Object))return e;switch(e.constructor){case Date:const n=e;return new Date(n.getTime());case Object:t===void 0&&(t={});break;case Array:t=[];break;default:return e}for(const n in e)!e.hasOwnProperty(n)||!C8(n)||(t[n]=MI(t[n],e[n]));return t}function C8(t){return t!=="__proto__"}/** 317 * @license 318 * Copyright 2022 Google LLC 319 * 320 * Licensed under the Apache License, Version 2.0 (the "License"); 321 * you may not use this file except in compliance with the License. 322 * You may obtain a copy of the License at 323 * 324 * http://www.apache.org/licenses/LICENSE-2.0 325 * 326 * Unless required by applicable law or agreed to in writing, software 327 * distributed under the License is distributed on an "AS IS" BASIS, 328 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 329 * See the License for the specific language governing permissions and 330 * limitations under the License. 331 */function S8(){if(typeof self<"u")return self;if(typeof window<"u")return window;if(typeof global<"u")return global;throw new Error("Unable to locate global object.")}/** 332 * @license 333 * Copyright 2022 Google LLC 334 * 335 * Licensed under the Apache License, Version 2.0 (the "License"); 336 * you may not use this file except in compliance with the License. 337 * You may obtain a copy of the License at 338 * 339 * http://www.apache.org/licenses/LICENSE-2.0 340 * 341 * Unless required by applicable law or agreed to in writing, software 342 * distributed under the License is distributed on an "AS IS" BASIS, 343 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 344 * See the License for the specific language governing permissions and 345 * limitations under the License. 346 */const N8=()=>S8().__FIREBASE_DEFAULTS__,T8=()=>{if(typeof process>"u"||typeof h1>"u")return;const t=h1.__FIREBASE_DEFAULTS__;if(t)return JSON.parse(t)},I8=()=>{if(typeof document>"u")return;let t;try{t=document.cookie.match(/__FIREBASE_DEFAULTS__=([^;]+)/)}catch{return}const e=t&&gh(t[1]);return e&&JSON.parse(e)},Dx=()=>{try{return b8()||N8()||T8()||I8()}catch(t){console.info(`Unable to get __FIREBASE_DEFAULTS__ due to: ${t}`);return}},OI=t=>{var e,n;return(n=(e=Dx())==null?void 0:e.emulatorHosts)==null?void 0:n[t]},LI=t=>{const e=OI(t);if(!e)return;const n=e.lastIndexOf(":");if(n<=0||n+1===e.length)throw new Error(`Invalid host ${e} with no separate hostname and port!`);const r=parseInt(e.substring(n+1),10);return e[0]==="["?[e.substring(1,n-1),r]:[e.substring(0,n),r]},FI=()=>{var t;return(t=Dx())==null?void 0:t.config},UI=t=>{var e;return(e=Dx())==null?void 0:e[`_${t}`]};/** 347 * @license 348 * Copyright 2017 Google LLC 349 * 350 * Licensed under the Apache License, Version 2.0 (the "License"); 351 * you may not use this file except in compliance with the License. 352 * You may obtain a copy of the License at 353 * 354 * http://www.apache.org/licenses/LICENSE-2.0 355 * 356 * Unless required by applicable law or agreed to in writing, software 357 * distributed under the License is distributed on an "AS IS" BASIS, 358 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 359 * See the License for the specific language governing permissions and 360 * limitations under the License. 361 */class Cf{constructor(){this.reject=()=>{},this.resolve=()=>{},this.promise=new Promise((e,n)=>{this.resolve=e,this.reject=n})}wrapCallback(e){return(n,r)=>{n?this.reject(n):this.resolve(r),typeof e=="function"&&(this.promise.catch(()=>{}),e.length===1?e(n):e(n,r))}}}/** 362 * @license 363 * Copyright 2025 Google LLC 364 * 365 * Licensed under the Apache License, Version 2.0 (the "License"); 366 * you may not use this file except in compliance with the License. 367 * You may obtain a copy of the License at 368 * 369 * http://www.apache.org/licenses/LICENSE-2.0 370 * 371 * Unless required by applicable law or agreed to in writing, softw
371are 372 * distributed under the License is distributed on an "AS IS" BASIS, 373 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 374 * See the License for the specific language governing permissions and 375 * limitations under the License. 376 */function yi(t){try{return(t.startsWith("http://")||t.startsWith("https://")?new URL(t).hostname:t).endsWith(".cloudworkstations.dev")}catch{return!1}}async function Mx(t){return(await fetch(t,{credentials:"include"})).ok}/** 377 * @license 378 * Copyright 2021 Google LLC 379 * 380 * Licensed under the Apache License, Version 2.0 (the "License"); 381 * you may not use this file except in compliance with the License. 382 * You may obtain a copy of the License at 383 * 384 * http://www.apache.org/licenses/LICENSE-2.0 385 * 386 * Unless required by applicable law or agreed to in writing, software 387 * distributed under the License is distributed on an "AS IS" BASIS, 388 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 389 * See the License for the specific language governing permissions and 390 * limitations under the License. 391 */function BI(t,e){if(t.uid)throw new Error('The "uid" field is no longer supported by mockUserToken. Please use "sub" instead for Firebase Auth User ID.');const n={alg:"none",type:"JWT"},r=e||"demo-project",s=t.iat||0,i=t.sub||t.user_id;if(!i)throw new Error("mockUserToken must contain 'sub' or 'user_id' field!");const o={iss:`https://securetoken.google.com/${r}`,aud:r,iat:s,exp:s+3600,auth_time:s,sub:i,user_id:i,firebase:{sign_in_provider:"custom",identities:{}},...t};return[mh(JSON.stringify(n)),mh(JSON.stringify(o)),""].join(".")}const zl={};function P8(){const t={prod:[],emulator:[]};for(const e of Object.keys(zl))zl[e]?t.emulator.push(e):t.prod.push(e);return t}function j8(t){let e=document.getElementById(t),n=!1;return e||(e=document.createElement("div"),e.setAttribute("id",t),n=!0),{created:n,element:e}}let f1=!1;function Ox(t,e){if(typeof window>"u"||typeof document>"u"||!yi(window.location.host)||zl[t]===e||zl[t]||f1)return;zl[t]=e;function n(f){return`__firebase__banner__${f}`}const r="__firebase__banner",i=P8().prod.length>0;function o(){const f=document.getElementById(r);f&&f.remove()}function a(f){f.style.display="flex",f.style.background="#7faaf0",f.style.position="fixed",f.style.bottom="5px",f.style.left="5px",f.style.padding=".5em",f.style.borderRadius="5px",f.style.alignItems="center"}function c(f,p){f.setAttribute("width","24"),f.setAttribute("id",p),f.setAttribute("height","24"),f.setAttribute("viewBox","0 0 24 24"),f.setAttribute("fill","none"),f.style.marginLeft="-6px"}function u(){const f=document.createElement("span");return f.style.cursor="pointer",f.style.marginLeft="16px",f.style.fontSize="24px",f.innerHTML=" ×",f.onclick=()=>{f1=!0,o()},f}function d(f,p){f.setAttribute("id",p),f.innerText="Learn more",f.href="https://firebase.google.com/docs/studio/preview-apps#preview-backend",f.setAttribute("target","__blank"),f.style.paddingLeft="5px",f.style.textDecoration="underline"}function h(){const f=j8(r),p=n("text"),x=document.getElementById(p)||document.createElement("span"),g=n("learnmore"),y=document.getElementById(g)||document.createElement("a"),w=n("preprendIcon"),v=document.getElementById(w)||document.createElementNS("http://www.w3.org/2000/svg","svg");if(f.created){const b=f.element;a(b),d(y,g);const _=u();c(v,w),b.append(v,x,y,_),document.body.appendChild(b)}i?(x.innerText="Preview backend disconnected.",v.innerHTML=`<g clip-path="url(#clip0_6013_33858)"> 392<path d="M4.8 17.6L12 5.6L19.2 17.6H4.8ZM6.91667 16.4H17.0833L12 7.93333L6.91667 16.4ZM12 15.6C12.1667 15.6 12.3056 15.5444 12.4167 15.4333C12.5389 15.3111 12.6 15.1667 12.6 15C12.6 14.8333 12.5389 14.6944 12.4167 14.5833C12.3056 14.4611 12.1667 14.4 12 14.4C11.8333 14.4 11.6889 14.4611 11.5667 14.5833C11.4556 14.6944 11.4 14.8333 11.4 15C11.4 15.1667 11.4556 15.3111 11.5667 15.4333C11.6889 15.5444 11.8333 15.6 12 15.6ZM11.4 13.6H12.6V10.4H11.4V13.6Z" fill="#212121"/> 393</g> 394<defs> 395<clipPath id="clip0_6013_33858"> 396<rect width="24" height="24" fill="white"/> 397</clipPath> 398</defs>`):(v.innerHTML=`<g clip-path="url(#clip0_6083_34804)"> 399<path d="M11.4 15.2H12.6V11.2H11.4V15.2ZM12 10C12.1667 10 12.3056 9.94444
39912.4167 9.83333C12.5389 9.71111 12.6 9.56667 12.6 9.4C12.6 9.23333 12.5389 9.09444 12.4167 8.98333C12.3056 8.86111 12.1667 8.8 12 8.8C11.8333 8.8 11.6889 8.86111 11.5667 8.98333C11.4556 9.09444 11.4 9.23333 11.4 9.4C11.4 9.56667 11.4556 9.71111 11.5667 9.83333C11.6889 9.94444 11.8333 10 12 10ZM12 18.4C11.1222 18.4 10.2944 18.2333 9.51667 17.9C8.73889 17.5667 8.05556 17.1111 7.46667 16.5333C6.88889 15.9444 6.43333 15.2611 6.1 14.4833C5.76667 13.7056 5.6 12.8778 5.6 12C5.6 11.1111 5.76667 10.2833 6.1 9.51667C6.43333 8.73889 6.88889 8.06111 7.46667 7.48333C8.05556 6.89444 8.73889 6.43333 9.51667 6.1C10.2944 5.76667 11.1222 5.6 12 5.6C12.8889 5.6 13.7167 5.76667 14.4833 6.1C15.2611 6.43333 15.9389 6.89444 16.5167 7.48333C17.1056 8.06111 17.5667 8.73889 17.9 9.51667C18.2333 10.2833 18.4 11.1111 18.4 12C18.4 12.8778 18.2333 13.7056 17.9 14.4833C17.5667 15.2611 17.1056 15.9444 16.5167 16.5333C15.9389 17.1111 15.2611 17.5667 14.4833 17.9C13.7167 18.2333 12.8889 18.4 12 18.4ZM12 17.2C13.4444 17.2 14.6722 16.6944 15.6833 15.6833C16.6944 14.6722 17.2 13.4444 17.2 12C17.2 10.5556 16.6944 9.32778 15.6833 8.31667C14.6722 7.30555 13.4444 6.8 12 6.8C10.5556 6.8 9.32778 7.30555 8.31667 8.31667C7.30556 9.32778 6.8 10.5556 6.8 12C6.8 13.4444 7.30556 14.6722 8.31667 15.6833C9.32778 16.6944 10.5556 17.2 12 17.2Z" fill="#212121"/> 400</g> 401<defs> 402<clipPath id="clip0_6083_34804"> 403<rect width="24" height="24" fill="white"/> 404</clipPath> 405</defs>`,x.innerText="Preview backend running in this workspace."),x.setAttribute("id",p)}document.readyState==="loading"?window.addEventListener("DOMContentLoaded",h):h()}/** 406 * @license 407 * Copyright 2017 Google LLC 408 * 409 * Licensed under the Apache License, Version 2.0 (the "License"); 410 * you may not use this file except in compliance with the License. 411 * You may obtain a copy of the License at 412 * 413 * http://www.apache.org/licenses/LICENSE-2.0 414 * 415 * Unless required by applicable law or agreed to in writing, software 416 * distributed under the License is distributed on an "AS IS" BASIS, 417 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 418 * See the License for the specific language governing permissions and 419 * limitations under the License. 420 */function Wt(){return typeof navigator<"u"&&typeof navigator.userAgent=="string"?navigator.userAgent:""}function Lx(){return typeof window<"u"&&!!(window.cordova||window.phonegap||window.PhoneGap)&&/ios|iphone|ipod|ipad|android|blackberry|iemobile/i.test(Wt())}function R8(){return typeof navigator<"u"&&navigator.userAgent==="Cloudflare-Workers"}function A8(){const t=typeof chrome=="object"?chrome.runtime:typeof browser=="object"?browser.runtime:void 0;return typeof t=="object"&&t.id!==void 0}function VI(){return typeof navigator=="object"&&navigator.product==="ReactNative"}function D8(){const t=Wt();return t.indexOf("MSIE ")>=0||t.indexOf("Trident/")>=0}function $I(){return RI.NODE_ADMIN===!0}function M8(){try{return typeof indexedDB=="object"}catch{return!1}}function O8(){return new Promise((t,e)=>{try{let n=!0;const r="validate-browser-context-for-indexeddb-analytics-module",s=self.indexedDB.open(r);s.onsuccess=()=>{s.result.close(),n||self.indexedDB.deleteDatabase(r),t(!0)},s.onupgradeneeded=()=>{n=!1},s.onerror=()=>{var i;e(((i=s.error)==null?void 0:i.message)||"")}}catch(n){e(n)}})}/** 421 * @license 422 * Copyright 2017 Google LLC 423 * 424 * Licensed under the Apache License, Version 2.0 (the "License"); 425 * you may not use this file except in compliance with the License. 426 * You may obtain a copy of the License at 427 * 428 * http://www.apache.org/licenses/LICENSE-2.0 429 * 430 * Unless required by applicable law or agreed to in writing, software 431 * distributed under the License is distributed on an "AS IS" BASIS, 432 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 433 * See the License for the specific language governing permissions and 434 * limitations under the License. 435 */const L8="FirebaseError";
435class ss extends Error{constructor(e,n,r){super(n),this.code=e,this.customData=r,this.name=L8,Object.setPrototypeOf(this,ss.prototype),Error.captureStackTrace&&Error.captureStackTrace(this,Zc.prototype.create)}}class Zc{constructor(e,n,r){this.service=e,this.serviceName=n,this.errors=r}create(e,...n){const r=n[0]||{},s=`${this.service}/${e}`,i=this.errors[e],o=i?F8(i,r):"Error",a=`${this.serviceName}: ${o} (${s}).`;return new ss(s,a,r)}}function F8(t,e){return t.replace(U8,(n,r)=>{const s=e[r];return s!=null?String(s):`<${r}?>`})}const U8=/\{\$([^}]+)}/g;/** 436 * @license 437 * Copyright 2017 Google LLC 438 * 439 * Licensed under the Apache License, Version 2.0 (the "License"); 440 * you may not use this file except in compliance with the License. 441 * You may obtain a copy of the License at 442 * 443 * http://www.apache.org/licenses/LICENSE-2.0 444 * 445 * Unless required by applicable law or agreed to in writing, software 446 * distributed under the License is distributed on an "AS IS" BASIS, 447 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 448 * See the License for the specific language governing permissions and 449 * limitations under the License. 450 */function Cc(t){return JSON.parse(t)}function at(t){return JSON.stringify(t)}/** 451 * @license 452 * Copyright 2017 Google LLC 453 * 454 * Licensed under the Apache License, Version 2.0 (the "License"); 455 * you may not use this file except in compliance with the License. 456 * You may obtain a copy of the License at 457 * 458 * http://www.apache.org/licenses/LICENSE-2.0 459 * 460 * Unless required by applicable law or agreed to in writing, software 461 * distributed under the License is distributed on an "AS IS" BASIS, 462 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 463 * See the License for the specific language governing permissions and 464 * limitations under the License. 465 */const zI=function(t){let e={},n={},r={},s="";try{const i=t.split(".");e=Cc(gh(i[0])||""),n=Cc(gh(i[1])||""),s=i[2],r=n.d||{},delete n.d}catch{}return{header:e,claims:n,data:r,signature:s}},B8=function(t){const e=zI(t),n=e.claims;return!!n&&typeof n=="object"&&n.hasOwnProperty("iat")},V8=function(t){const e=zI(t).claims;return typeof e=="object"&&e.admin===!0};/** 466 * @license 467 * Copyright 2017 Google LLC 468 * 469 * Licensed under the Apache License, Version 2.0 (the "License"); 470 * you may not use this file except in compliance with the License. 471 * You may obtain a copy of the License at 472 * 473 * http://www.apache.org/licenses/LICENSE-2.0 474 * 475 * Unless required by applicable law or agreed to in writing, software 476 * distributed under the License is distributed on an "AS IS" BASIS, 477 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 478 * See the License for the specific language governing permissions and 479 * limitations under the License. 480 */function is(t,e){return Object.prototype.hasOwnProperty.call(t,e)}function Sa(t,e){if(Object.prototype.hasOwnProperty.call(t,e))return t[e]}function ly(t){for(const e in t)if(Object.prototype.hasOwnProperty.call(t,e))return!1;return!0}function yh(t,e,n){const r={};for(const s in t)Object.prototype.hasOwnProperty.call(t,s)&&(r[s]=e.call(n,t[s],s,t));return r}function Ji(t,e){if(t===e)return!0;const n=Object.keys(t),r=Object.keys(e);for(const s of n){if(!r.includes(s))return!1;const i=t[s],o=e[s];if(p1(i)&&p1(o)){if(!Ji(i,o))return!1}else if(i!==o)return!1}for(const s of r)if(!n.includes(s))return!1;return!0}function p1(t){return t!==null&&typeof t=="object"}/** 481 * @license 482 * Copyright 2017 Google LLC 483 * 484 * Licensed under the Apache License, Version 2.0 (the "License"); 485 * you may not use this file except in compliance with the License. 486 * You may obtain a copy of the License at 487 * 488 * http://www.apache.org/licenses/LICENSE-2.0 489 * 490 * Unless required by applicable law or agreed to in writing, software 491 * distributed under the License is distributed on an "AS IS" BASIS, 492 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 493 * See the License for the specific language governing permissions and 494 * limitations under the License. 495 */function Ga(t){const e=[];for(const[n,r]of Object.entries(t))Array.isArray(r)?r.forEach(s=>{e.push(encodeURIComponent(n)+"="+encodeURIComponent(s))}):e.push(encodeURIComponent(n)+"="+encodeURIComponent(r));return e.length?"&"+e.join("&"):""}function Cl(t){const e={};return t.replace(/^\?/,"").split("&").forEach(r=>{if(r){const[s,i]=r.split("=");e[decodeURIComponent(s)]=decodeURIComponent(i)}}),e}function Sl(t){const e=t.indexOf("?");if(!e)return"";const n=t.indexOf("#",e);return t.substring(e,n>0?n:void 0)}/** 496 * @license 497 * Copyright 2017 Google LLC 498 * 499 * Licensed under the Apache License, Version 2.0 (the "License");
500 * you may not use this file except in compliance with the License. 501 * You may obtain a copy of the License at 502 * 503 * http://www.apache.org/licenses/LICENSE-2.0 504 * 505 * Unless required by applicable law or agreed to in writing, software 506 * distributed under the License is distributed on an "AS IS" BASIS, 507 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 508 * See the License for the specific language governing permissions and 509 * limitations under the License. 510 */class $8{constructor(){this.chain_=[],this.buf_=[],this.W_=[],this.pad_=[],this.inbuf_=0,this.total_=0,this.blockSize=512/8,this.pad_[0]=128;for(let e=1;e<this.blockSize;++e)this.pad_[e]=0;this.reset()}reset(){this.chain_[0]=1732584193,this.chain_[1]=4023233417,this.chain_[2]=2562383102,this.chain_[3]=271733878,this.chain_[4]=3285377520,this.inbuf_=0,this.total_=0}compress_(e,n){n||(n=0);const r=this.W_;if(typeof e=="string")for(let h=0;h<16;h++)r[h]=e.charCodeAt(n)<<24|e.charCodeAt(n+1)<<16|e.charCodeAt(n+2)<<8|e.charCodeAt(n+3),n+=4;else for(let h=0;h<16;h++)r[h]=e[n]<<24|e[n+1]<<16|e[n+2]<<8|e[n+3],n+=4;for(let h=16;h<80;h++){const f=r[h-3]^r[h-8]^r[h-14]^r[h-16];r[h]=(f<<1|f>>>31)&4294967295}let s=this.chain_[0],i=this.chain_[1],o=this.chain_[2],a=this.chain_[3],c=this.chain_[4],u,d;for(let h=0;h<80;h++){h<40?h<20?(u=a^i&(o^a),d=1518500249):(u=i^o^a,d=1859775393):h<60?(u=i&o|a&(i|o),d=2400959708):(u=i^o^a,d=3395469782);const f=(s<<5|s>>>27)+u+c+d+r[h]&4294967295;c=a,a=o,o=(i<<30|i>>>2)&4294967295,i=s,s=f}this.chain_[0]=this.chain_[0]+s&4294967295,this.chain_[1]=this.chain_[1]+i&4294967295,this.chain_[2]=this.chain_[2]+o&4294967295,this.chain_[3]=this.chain_[3]+a&4294967295,this.chain_[4]=this.chain_[4]+c&4294967295}update(e,n){if(e==null)return;n===void 0&&(n=e.length);const r=n-this.blockSize;let s=0;const i=this.buf_;let o=this.inbuf_;for(;s<n;){if(o===0)for(;s<=r;)this.compress_(e,s),s+=this.blockSize;if(typeof e=="string"){for(;s<n;)if(i[o]=e.charCodeAt(s),++o,++s,o===this.blockSize){this.compress_(i),o=0;break}}else for(;s<n;)if(i[o]=e[s],++o,++s,o===this.blockSize){this.compress_(i),o=0;break}}this.inbuf_=o,this.total_+=n}digest(){const e=[];let n=this.total_*8;this.inbuf_<56?this.update(this.pad_,56-this.inbuf_):this.update(this.pad_,this.blockSize-(this.inbuf_-56));for(let s=this.blockSize-1;s>=56;s--)this.buf_[s]=n&255,n/=256;this.compress_(this.buf_);let r=0;for(let s=0;s<5;s++)for(let i=24;i>=0;i-=8)e[r]=this.chain_[s]>>i&255,++r;return e}}function z8(t,e){const n=new W8(t,e);return n.subscribe.bind(n)}class W8{constructor(e,n){this.observers=[],this.unsubscribes=[],this.observerCount=0,this.task=Promise.resolve(),this.finalized=!1,this.onNoObservers=n,this.task.then(()=>{e(this)}).catch(r=>{this.error(r)})}next(e){this.forEachObserver(n=>{n.next(e)})}error(e){this.forEachObserver(n=>{n.error(e)}),this.close(e)}complete(){this.forEachObserver(e=>{e.complete()}),this.close()}subscribe(e,n,r){let s;if(e===void 0&&n===void 0&&r===void 0)throw new Error("Missing Observer.");H8(e,["next","error","complete"])?s=e:s={next:e,error:n,complete:r},s.next===void 0&&(s.next=tm),s.error===void 0&&(s.error=tm),s.complete===void 0&&(s.complete=tm);const i=this.unsubscribeOne.bind(this,this.observers.length);return this.finalized&&this.task.then(()=>{try{this.finalError?s.error(this.finalError):s.complete()}catch{}}),this.observers.push(s),i}unsubscribeOne(e){this.observers===void 0||this.observers[e]===void 0||(delete this.observers[e],this.observerCount-=1,this.observerCount===0&&this.onNoObservers!==void 0&&this.onNoObservers(this))}forEachObserver(e){if(!this.finalized)for(let n=0;n<this.observers.length;n++)this.sendOne(n,e)}sendOne(e,n){this.task.then(()=>{if(this.observers!==void 0&&this.observers[e]!==void 0)try{n(this.observers[e])}catch(r){typeof console<"u"&&console.error&&console.error(r)}})}close(e){this.finalized||(this.finalized=!0,e!==void 0&&(this.finalError=e),this.task.then(()=>{this.observers=void 0,this.onNoObservers=void 0}))}}function H8(t,e){if(typeof t!="object"||t===null)return!1;for(const n of e)if(n in t&&typeof t[n]=="function")return!0;return!1}function tm(){}function Fx(t,e){return`${t} failed: ${e} argument `}/** 511 * @license 512 * Copyright 2017 Google LLC 513 * 514 * Licensed under the Apache License, Version 2.0 (the "License");
515 * you may not use this file except in compliance with the License. 516 * You may obtain a copy of the License at 517 * 518 * http://www.apache.org/licenses/LICENSE-2.0 519 * 520 * Unless required by applicable law or agreed to in writing, software 521 * distributed under the License is distributed on an "AS IS" BASIS, 522 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 523 * See the License for the specific language governing permissions and 524 * limitations under the License. 525 */const K8=function(t){const e=[];let n=0;for(let r=0;r<t.length;r++){let s=t.charCodeAt(r);if(s>=55296&&s<=56319){const i=s-55296;r++,$(r<t.length,"Surrogate pair missing trail surrogate.");const o=t.charCodeAt(r)-56320;s=65536+(i<<10)+o}s<128?e[n++]=s:s<2048?(e[n++]=s>>6|192,e[n++]=s&63|128):s<65536?(e[n++]=s>>12|224,e[n++]=s>>6&63|128,e[n++]=s&63|128):(e[n++]=s>>18|240,e[n++]=s>>12&63|128,e[n++]=s>>6&63|128,e[n++]=s&63|128)}return e},Sf=function(t){let e=0;for(let n=0;n<t.length;n++){const r=t.charCodeAt(n);r<128?e++:r<2048?e+=2:r>=55296&&r<=56319?(e+=4,n++):e+=3}return e};/** 526 * @license 527 * Copyright 2021 Google LLC 528 * 529 * Licensed under the Apache License, Version 2.0 (the "License"); 530 * you may not use this file except in compliance with the License. 531 * You may obtain a copy of the License at 532 * 533 * http://www.apache.org/licenses/LICENSE-2.0 534 * 535 * Unless required by applicable law or agreed to in writing, software 536 * distributed under the License is distributed on an "AS IS" BASIS, 537 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 538 * See the License for the specific language governing permissions and 539 * limitations under the License. 540 */function nt(t){return t&&t._delegate?t._delegate:t}class oi{constructor(e,n,r){this.name=e,this.instanceFactory=n,this.type=r,this.multipleInstances=!1,this.serviceProps={},this.instantiationMode="LAZY",this.onInstanceCreated=null}setInstantiationMode(e){return this.instantiationMode=e,this}setMultipleInstances(e){return this.multipleInstances=e,this}setServiceProps(e){return this.serviceProps=e,this}setInstanceCreatedCallback(e){return this.onInstanceCreated=e,this}}/** 541 * @license 542 * Copyright 2019 Google LLC 543 * 544 * Licensed under the Apache License, Version 2.0 (the "License"); 545 * you may not use this file except in compliance with the License. 546 * You may obtain a copy of the License at 547 * 548 * http://www.apache.org/licenses/LICENSE-2.0 549 * 550 * Unless required by applicable law or agreed to in writing, software 551 * distributed under the License is distributed on an "AS IS" BASIS, 552 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 553 * See the License for the specific language governing permissions and 554 * limitations under the License. 555 */const Ei="[DEFAULT]";/** 556 * @license 557 * Copyright 2019 Google LLC 558 * 559 * Licensed under the Apache License, Version 2.0 (the "License"); 560 * you may not use this file except in compliance with the License. 561 * You may obtain a copy of the License at 562 * 563 * http://www.apache.org/licenses/LICENSE-2.0 564 * 565 * Unless required by applicable law or agreed to in writing, software 566 * distributed under the License is distributed on an "AS IS" BASIS, 567 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 568 * See the License for the specific language governing permissions and 569 * limitations under the License. 570 */class G8{constructor(e,n){this.name=e,this.container=n,this.component=null,this.instances=new Map,this.instancesDeferred=new Map,this.instancesOptions=new Map,this.onInitCallbacks=new Map}get(e){const n=this.normalizeInstanceIdentifier(e);if(!this.instancesDeferred.has(n)){const r=new Cf;if(this.instancesDeferred.set(n,r),this.isInitialized(n)||this.shouldAutoInitialize())try{const s=this.getOrInitializeService({instanceIdentifier:n});s&&r.resolve(s)}catch{}}return this.instancesDeferred.get(n).promise}getImmediate(e){const n=this.normalizeInstanceIdentifier(e==null?void 0:e.identifier),r=(e==null?void 0:e.optional)??!1;if(this.isInitialized(n)||this.shouldAutoInitialize())try{return this.getOrInitializeService({instanceIdentifier:n})}catch(s){if(r)return null;throw s}else{if(r)return null;throw Error(`Service ${this.name} is not available`)}}getComponent(){return this.component}setComponent(e){if(e.name!==this.name)throw Error(`Mismatching Component ${e.name} for Provider ${this.name}.`);if(this.component)throw Error(`Component for ${this.name} has already been provided`);if(this.component=e,!!this.shouldAutoInitialize()){if(Y8(e))try{this.getOrInitializeService({instanceIdentifier:Ei})}catch{}for(const[n,r]of this.instancesDeferred.entries()){const s=this.normalizeInstanceIdentifier(n);try{const i=this.getOrInitializeService({instanceIdentifier:s});r.resolve(i)}catch{}}}}clearInstance(e=Ei){this.instancesDeferred.delete(e),this.instancesOptions.delete(e),this.instances.delete(e)}async delete(){const e=Array.from(this.instances.values());await Promise.all([...e.filter(n=>"INTERNAL"in n).map(n=>n.INTERNAL.delete()),...e.filter(n=>"_delete"in n).map(n=>n._delete())])}isComponentSet(){return this.component!=null}isInitialized(e=Ei){return this.instances.has(e)}getOptions(e=Ei){return this.instancesOptions.get(e)||{}}initialize(e={}){const{options:n={}}=e,r=this.normalizeInstanceIdentifier(e.instanceIdentifier);if(this.isInitialized(r))throw Error(`${this.name}(${r}) has already been initialized`);if(!this.isComponentSet())throw Error(`Component ${this.name} has not been registered yet`);const s=this.getOrInitializeService({instanceIdentifier:r,options:n});for(const[i,o]of this.instancesDeferred.entries()){const a=this.normalizeInstanceIdentifier(i);r===a&&o.resolve(s)}return s}onInit(e,n){const r=this.normalizeInstanceIdentifier(n),s=this.onInitCallbacks.get(r)??new Set;s.add(e),this.onInitCallbacks.set(r,s);const i=this.instances.get(r);return i&&e(i,r),()=>{s.delete(e)}}invokeOnInitCallbacks(e,n){const r=this.onInitCallbacks.get(n);if(r)for(const s of r)try{s(e,n)}catch{}}getOrInitializeService({instanceIdentifier:e,options:n={}}){let r=this.instances.get(e);if(!r&&this.component&&(r=this.component.instanceFactory(this.container,{instanceIdentifier:q8(e),options:n}),this.instances.set(e,r),this.instancesOptions.set(e,n),this.invokeOnInitCallbacks(r,e),this.component.onInstanceCreated))try{this.component.onInstanceCreated(this.container,e,r)}catch{}return r||null}normalizeInstanceIdentifier(e=Ei){return this.component?this.component.multipleInstances?e:Ei:e}shouldAutoInitialize(){return!!this.component&&this.component.instantiationMode!=="EXPLICIT"}}function q8(t){return t===Ei?void 0:t}function Y8(t){return t.instantiationMode==="EAGER"}/** 571 * @license 572 * Copyright 2019 Google LLC 573 * 574 * Licensed under the Apache License, Version 2.0 (the "License");
575 * you may not use this file except in compliance with the License. 576 * You may obtain a copy of the License at 577 * 578 * http://www.apache.org/licenses/LICENSE-2.0 579 * 580 * Unless required by applicable law or agreed to in writing, software 581 * distributed under the License is distributed on an "AS IS" BASIS, 582 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 583 * See the License for the specific language governing permissions and 584 * limitations under the License. 585 */class Q8{constructor(e){this.name=e,this.providers=new Map}addComponent(e){const n=this.getProvider(e.name);if(n.isComponentSet())throw new Error(`Component ${e.name} has already been registered with ${this.name}`);n.setComponent(e)}addOrOverwriteComponent(e){this.getProvider(e.name).isComponentSet()&&this.providers.delete(e.name),this.addComponent(e)}getProvider(e){if(this.providers.has(e))return this.providers.get(e);const n=new G8(e,this);return this.providers.set(e,n),n}getProviders(){return Array.from(this.providers.values())}}/** 586 * @license 587 * Copyright 2017 Google LLC 588 * 589 * Licensed under the Apache License, Version 2.0 (the "License"); 590 * you may not use this file except in compliance with the License. 591 * You may obtain a copy of the License at 592 * 593 * http://www.apache.org/licenses/LICENSE-2.0 594 * 595 * Unless required by applicable law or agreed to in writing, software 596 * distributed under the License is distributed on an "AS IS" BASIS, 597 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 598 * See the License for the specific language governing permissions and 599 * limitations under the License. 600 */var Se;(function(t){t[t.DEBUG=0]="DEBUG",t[t.VERBOSE=1]="VERBOSE",t[t.INFO=2]="INFO",t[t.WARN=3]="WARN",t[t.ERROR=4]="ERROR",t[t.SILENT=5]="SILENT"})(Se||(Se={}));const X8={debug:Se.DEBUG,verbose:Se.VERBOSE,info:Se.INFO,warn:Se.WARN,error:Se.ERROR,silent:Se.SILENT},J8=Se.INFO,Z8={[Se.DEBUG]:"log",[Se.VERBOSE]:"log",[Se.INFO]:"info",[Se.WARN]:"warn",[Se.ERROR]:"error"},e$=(t,e,...n)=>{if(e<t.logLevel)return;const r=new Date().toISOString(),s=Z8[e];if(s)console[s](`[${r}] ${t.name}:`,...n);else throw new Error(`Attempted to log a message with an invalid logType (value: ${e})`)};class Ux{constructor(e){this.name=e,this._logLevel=J8,this._logHandler=e$,this._userLogHandler=null}get logLevel(){return this._logLevel}set logLevel(e){if(!(e in Se))throw new TypeError(`Invalid value "${e}" assigned to \`logLevel\``);this._logLevel=e}setLogLevel(e){this._logLevel=typeof e=="string"?X8[e]:e}get logHandler(){return this._logHandler}set logHandler(e){if(typeof e!="function")throw new TypeError("Value assigned to `logHandler` must be a function");this._logHandler=e}get userLogHandler(){return this._userLogHandler}set userLogHandler(e){this._userLogHandler=e}debug(...e){this._userLogHandler&&this._userLogHandler(this,Se.DEBUG,...e),this._logHandler(this,Se.DEBUG,...e)}log(...e){this._userLogHandler&&this._userLogHandler(this,Se.VERBOSE,...e),this._logHandler(this,Se.VERBOSE,...e)}info(...e){this._userLogHandler&&this._userLogHandler(this,Se.INFO,...e),this._logHandler(this,Se.INFO,...e)}warn(...e){this._userLogHandler&&this._userLogHandler(this,Se.WARN,...e),this._logHandler(this,Se.WARN,...e)}error(...e){this._userLogHandler&&this._userLogHandler(this,Se.ERROR,...e),this._logHandler(this,Se.ERROR,...e)}}const t$=(t,e)=>e.some(n=>t instanceof n);let m1,g1;function n$(){return m1||(m1=[IDBDatabase,IDBObjectStore,IDBIndex,IDBCursor,IDBTransaction])}function r$(){return g1||(g1=[IDBCursor.prototype.advance,IDBCursor.prototype.continue,IDBCursor.prototype.continuePrimaryKey])}const WI=new WeakMap,cy=new WeakMap,HI=new WeakMap,nm=new WeakMap,Bx=new WeakMap;function s$(t){const e=new Promise((n,r)=>{const s=()=>{t.removeEventListener("success",i),t.removeEventListener("error",o)},i=()=>{n(Ks(t.result)),s()},o=()=>{r(t.error),s()};t.addEventListener("success",i),t.addEventListener("error",o)});return e.then(n=>{n instanceof IDBCursor&&WI.set(n,t)}).catch(()=>{}),Bx.set(e,t),e}function i$(t){if(cy.has(t))return;const e=new Promise((n,r)=>{const s=()=>{t.removeEventListener("complete",i),t.removeEventListener("error",o),t.removeEventListener("abort",o)},i=()=>{n(),s()},o=()=>{r(t.error||new DOMException("AbortError","AbortError")),s()};t.addEventListener("complete",i),t.addEventListener("error",o),t.addEventListener("abort",o)});cy.set(t,e)}let uy={get(t,e,n){if(t instanceof IDBTransaction){if(e==="done")return cy.get(t);if(e==="objectStoreNames")return t.objectStoreNames||HI.get(t);if(e==="store")return n.objectStoreNames[1]?void 0:n.objectStore(n.objectStoreNames[0])}return Ks(t[e])},set(t,e,n){return t[e]=n,!0},has(t,e){return t instanceof IDBTransaction&&(e==="done"||e==="store")?!0:e in t}};function o$(t){uy=t(uy)}function a$(t){return t===IDBDatabase.prototype.transaction&&!("objectStoreNames"in IDBTransaction.prototype)?function(e,...n){const r=t.call(rm(this),e,...n);return HI.set(r,e.sort?e.sort():[e]),Ks(r)}:r$().includes(t)?function(...e){return t.apply(rm(this),e),Ks(WI.get(this))}:function(...e){return Ks(t.apply(rm(this),e))}}function l$(t){return typeof t=="function"?a$(t):(t instanceof IDBTransaction&&i$(t),t$(t,n$())?new Proxy(t,uy):t)}function Ks(t){if(t instanceof IDBRequest)return s$(t);if(nm.has(t))return nm.get(t);const e=l$(t);return e!==t&&(nm.set(t,e),Bx.set(e,t)),e}const rm=t=>Bx.get(t);function c$(t,e,{blocked:n,upgrade:r,blocking:s,terminated:i}={}){const o=indexedDB.open(t,e),a=Ks(o);return r&&o.addEventListener("upgradeneeded",c=>{r(Ks(o.result),c.oldVersion,c.newVersion,Ks(o.transaction),c)}),n&&o.addEventListener("blocked",c=>n(c.oldVersion,c.newVersion,c)),a.then(c=>{i&&c.addEventListener("close",()=>i()),s&&c.addEventListener("versionchange",u=>s(u.oldVersion,u.newVersion,u))}).catch(()=>{}),a}const u$=["get","getKey","getAll","getAllKeys","count"],d$=["put","add","delete","clear"],sm=new Map;function y1(t,e){if(!(t instanceof IDBDatabase&&!(e in t)&&typeof e=="string"))return;if(sm.get(e))return sm.get(e);const n=e.replace(/FromIndex$/,""),r=e!==n,s=d$.includes(n);if(!(n in(r?IDBIndex:IDBObjectStore).prototype)||!(s||u$.includes(n)))return;const i=async function(o,...a){const c=this.transaction(o,s?"readwrite":"readonly");let u=c.store;
600return r&&(u=u.index(a.shift())),(await Promise.all([u[n](...a),s&&c.done]))[0]};return sm.set(e,i),i}o$(t=>({...t,get:(e,n,r)=>y1(e,n)||t.get(e,n,r),has:(e,n)=>!!y1(e,n)||t.has(e,n)}));/** 601 * @license 602 * Copyright 2019 Google LLC 603 * 604 * Licensed under the Apache License, Version 2.0 (the "License"); 605 * you may not use this file except in compliance with the License. 606 * You may obtain a copy of the License at 607 * 608 * http://www.apache.org/licenses/LICENSE-2.0 609 * 610 * Unless required by applicable law or agreed to in writing, software 611 * distributed under the License is distributed on an "AS IS" BASIS, 612 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 613 * See the License for the specific language governing permissions and 614 * limitations under the License. 615 */class h${constructor(e){this.container=e}getPlatformInfoString(){return this.container.getProviders().map(n=>{if(f$(n)){const r=n.getImmediate();return`${r.library}/${r.version}`}else return null}).filter(n=>n).join(" ")}}function f$(t){const e=t.getComponent();return(e==null?void 0:e.type)==="VERSION"}const dy="@firebase/app",v1="0.14.8";/** 616 * @license 617 * Copyright 2019 Google LLC 618 * 619 * Licensed under the Apache License, Version 2.0 (the "License"); 620 * you may not use this file except in compliance with the License. 621 * You may obtain a copy of the License at 622 * 623 * http://www.apache.org/licenses/LICENSE-2.0 624 * 625 * Unless required by applicable law or agreed to in writing, software 626 * distributed under the License is distributed on an "AS IS" BASIS, 627 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 628 * See the License for the specific language governing permissions and 629 * limitations under the License. 630 */const Zr=new Ux("@firebase/app"),p$="@firebase/app-compat",m$="@firebase/analytics-compat",g$="@firebase/analytics",y$="@firebase/app-check-compat",v$="@firebase/app-check",x$="@firebase/auth",w$="@firebase/auth-compat",b$="@firebase/database",_$="@firebase/data-connect",k$="@firebase/database-compat",E$="@firebase/functions",C$="@firebase/functions-compat",S$="@firebase/installations",N$="@firebase/installations-compat",T$="@firebase/messaging",I$="@firebase/messaging-compat",P$="@firebase/performance",j$="@firebase/performance-compat",R$="@firebase/remote-config",A$="@firebase/remote-config-compat",D$="@firebase/storage",M$="@firebase/storage-compat",O$="@firebase/firestore",L$="@firebase/ai",F$="@firebase/firestore-compat",U$="firebase",B$="12.9.0";/** 631 * @license 632 * Copyright 2019 Google LLC 633 * 634 * Licensed under the Apache License, Version 2.0 (the "License"); 635 * you may not use this file except in compliance with the License. 636 * You may obtain a copy of the License at 637 * 638 * http://www.apache.org/licenses/LICENSE-2.0 639 * 640 * Unless required by applicable law or agreed to in writing, software 641 * distributed under the License is distributed on an "AS IS" BASIS, 642 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 643 * See the License for the specific language governing permissions and 644 * limitations under the License. 645 */const hy="[DEFAULT]",V$={[dy]:"fire-core",[p$]:"fire-core-compat",[g$]:"fire-analytics",[m$]:"fire-analytics-compat",[v$]:"fire-app-check",[y$]:"fire-app-check-compat",[x$]:"fire-auth",[w$]:"fire-auth-compat",[b$]:"fire-rtdb",[_$]:"fire-data-connect",[k$]:"fire-rtdb-compat",[E$]:"fire-fn",[C$]:"fire-fn-compat",[S$]:"fire-iid",[N$]:"fire-iid-compat",[T$]:"fire-fcm",[I$]:"fire-fcm-compat",[P$]:"fire-perf",[j$]:"fire-perf-compat",[R$]:"fire-rc",[A$]:"fire-rc-compat",[D$]:"fire-gcs",[M$]:"fire-gcs-compat",[O$]:"fire-fst",[F$]:"fire-fst-compat",[L$]:"fire-vertex","fire-js":"fire-js",[U$]:"fire-js-all"};/** 646 * @license 647 * Copyright 2019 Google LLC 648 * 649 * Licensed under the Apache License, Version 2.0 (the "License"); 650 * you may not use this file except in compliance with the License. 651 * You may obtain a copy of the License at 652 * 653 * http://www.apache.org/licenses/LICENSE-2.0 654 * 655 * Unless required by applicable law or agreed to in writing, software 656 * distributed under the License is distributed on an "AS IS" BASIS, 657 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 658 * See the License for the specific language governing permissions and 659 * limitations under the License.
660 */const vh=new Map,$$=new Map,fy=new Map;function x1(t,e){try{t.container.addComponent(e)}catch(n){Zr.debug(`Component ${e.name} failed to register with FirebaseApp ${t.name}`,n)}}function Zi(t){const e=t.name;if(fy.has(e))return Zr.debug(`There were multiple attempts to register component ${e}.`),!1;fy.set(e,t);for(const n of vh.values())x1(n,t);for(const n of $$.values())x1(n,t);return!0}function Nf(t,e){const n=t.container.getProvider("heartbeat").getImmediate({optional:!0});return n&&n.triggerHeartbeat(),t.container.getProvider(e)}function kn(t){return t==null?!1:t.settings!==void 0}/** 661 * @license 662 * Copyright 2019 Google LLC 663 * 664 * Licensed under the Apache License, Version 2.0 (the "License"); 665 * you may not use this file except in compliance with the License. 666 * You may obtain a copy of the License at 667 * 668 * http://www.apache.org/licenses/LICENSE-2.0 669 * 670 * Unless required by applicable law or agreed to in writing, software 671 * distributed under the License is distributed on an "AS IS" BASIS, 672 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 673 * See the License for the specific language governing permissions and 674 * limitations under the License. 675 */const z$={"no-app":"No Firebase App '{$appName}' has been created - call initializeApp() first","bad-app-name":"Illegal App name: '{$appName}'","duplicate-app":"Firebase App named '{$appName}' already exists with different options or config","app-deleted":"Firebase App named '{$appName}' already deleted","server-app-deleted":"Firebase Server App has been deleted","no-options":"Need to provide options, when not being deployed to hosting via source.","invalid-app-argument":"firebase.{$appName}() takes either no argument or a Firebase App instance.","invali
675d-log-argument":"First argument to `onLog` must be null or a function.","idb-open":"Error thrown when opening IndexedDB. Original error: {$originalErrorMessage}.","idb-get":"Error thrown when reading from IndexedDB. Original error: {$originalErrorMessage}.","idb-set":"Error thrown when writing to IndexedDB. Original error: {$originalErrorMessage}.","idb-delete":"Error thrown when deleting from IndexedDB. Original error: {$originalErrorMessage}.","finalization-registry-not-supported":"FirebaseServerApp deleteOnDeref field defined but the JS runtime does not support FinalizationRegistry.","invalid-server-app-environment":"FirebaseServerApp is not for use in browser environments."},Gs=new Zc("app","Firebase",z$);/** 676 * @license 677 * Copyright 2019 Google LLC 678 * 679 * Licensed under the Apache License, Version 2.0 (the "License"); 680 * you may not use this file except in compliance with the License. 681 * You may obtain a copy of the License at 682 * 683 * http://www.apache.org/licenses/LICENSE-2.0 684 * 685 * Unless required by applicable law or agreed to in writing, software 686 * distributed under the License is distributed on an "AS IS" BASIS, 687 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 688 * See the License for the specific language governing permissions and 689 * limitations under the License. 690 */class W${constructor(e,n,r){this._isDeleted=!1,this._options={...e},this._config={...n},this._name=n.name,this._automaticDataCollectionEnabled=n.automaticDataCollectionEnabled,this._container=r,this.container.addComponent(new oi("app",()=>this,"PUBLIC"))}get automaticDataCollectionEnabled(){return this.checkDestroyed(),this._automaticDataCollectionEnabled}set automaticDataCollectionEnabled(e){this.checkDestroyed(),this._automaticDataCollectionEnabled=e}get name(){return this.checkDestroyed(),this._name}get options(){return this.checkDestroyed(),this._options}get config(){return this.checkDestroyed(),this._config}get container(){return this._container}get isDeleted(){return this._isDeleted}set isDeleted(e){this._isDeleted=e}checkDestroyed(){if(this.isDeleted)throw Gs.create("app-deleted",{appName:this._name})}}/** 691 * @license 692 * Copyright 2019 Google LLC 693 * 694 * Licensed under the Apache License, Version 2.0 (the "License"); 695 * you may not use this file except in compliance with the License. 696 * You may obtain a copy of the License at 697 * 698 * http://www.apache.org/licenses/LICENSE-2.0 699 * 700 * Unless required by applicable law or agreed to in writing, software 701 * distributed under the License is distributed on an "AS IS" BASIS, 702 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 703 * See the License for the specific language governing permissions and 704 * limitations under the License. 705 */const uo=B$;function KI(t,e={}){let n=t;typeof e!="object"&&(e={name:e});const r={name:hy,automaticDataCollectionEnabled:!0,...e},s=r.name;if(typeof s!="string"||!s)throw Gs.create("bad-app-name",{appName:String(s)});if(n||(n=FI()),!n)throw Gs.create("no-options");const i=vh.get(s);if(i){if(Ji(n,i.options)&&Ji(r,i.config))return i;throw Gs.create("duplicate-app",{appName:s})}const o=new Q8(s);for(const c of fy.values())o.addComponent(c);const a=new W$(n,r,o);return vh.set(s,a),a}function Vx(t=hy){const e=vh.get(t);if(!e&&t===hy&&FI())return KI();if(!e)throw Gs.create("no-app",{appName:t});return e}function Er(t,e,n){let r=V$[t]??t;n&&(r+=`-${n}`);const s=r.match(/\s|\//),i=e.match(/\s|\//);if(s||i){const o=[`Unable to register library "${r}" with version "${e}":`];s&&o.push(`library name "${r}" contains illegal characters (whitespace or "/")`),s&&i&&o.push("and"),i&&o.push(`version name "${e}" contains illegal characters (whitespace or "/")`),Zr.warn(o.join(" "));return}Zi(new oi(`${r}-version`,()=>({library:r,version:e}),"VERSION"))}/** 706 * @license 707 * Copyright 2021 Google LLC 708 * 709 * Licensed under the Apache License, Version 2.0 (the "License"); 710 * you may not use this file except in compliance with the License. 711 * You may obtain a copy of the License at 712 * 713 * http://www.apache.org/licenses/LICENSE-2.0 714 * 715 * Unless required by applicable law or agreed to in writing, softw
715are 716 * distributed under the License is distributed on an "AS IS" BASIS, 717 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 718 * See the License for the specific language governing permissions and 719 * limitations under the License. 720 */const H$="firebase-heartbeat-database",K$=1,Sc="firebase-heartbeat-store";let im=null;function GI(){return im||(im=c$(H$,K$,{upgrade:(t,e)=>{switch(e){case 0:try{t.createObjectStore(Sc)}catch(n){console.warn(n)}}}}).catch(t=>{throw Gs.create("idb-open",{originalErrorMessage:t.message})})),im}async function G$(t){try{const n=(await GI()).transaction(Sc),r=await n.objectStore(Sc).get(qI(t));return await n.done,r}catch(e){if(e instanceof ss)Zr.warn(e.message);else{const n=Gs.create("idb-get",{originalErrorMessage:e==null?void 0:e.message});Zr.warn(n.message)}}}async function w1(t,e){try{const r=(await GI()).transaction(Sc,"readwrite");await r.objectStore(Sc).put(e,qI(t)),await r.done}catch(n){if(n instanceof ss)Zr.warn(n.message);else{const r=Gs.create("idb-set",{originalErrorMessage:n==null?void 0:n.message});Zr.warn(r.message)}}}function qI(t){return`${t.name}!${t.options.appId}`}/** 721 * @license 722 * Copyright 2021 Google LLC 723 * 724 * Licensed under the Apache License, Version 2.0 (the "License"); 725 * you may not use this file except in compliance with the License. 726 * You may obtain a copy of the License at 727 * 728 * http://www.apache.org/licenses/LICENSE-2.0 729 * 730 * Unless required by applicable law or agreed to in writing, software 731 * distributed under the License is distributed on an "AS IS" BASIS, 732 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 733 * See the License for the specific language governing permissions and 734 * limitations under the License. 735 */const q$=1024,Y$=30;class Q${constructor(e){this.container=e,this._heartbeatsCache=null;const n=this.container.getProvider("app").getImmediate();this._storage=new J$(n),this._heartbeatsCachePromise=this._storage.read().then(r=>(this._heartbeatsCache=r,r))}async triggerHeartbeat(){var e,n;try{const s=this.container.getProvider("platform-logger").getImmediate().getPlatformInfoString(),i=b1();if(((e=this._heartbeatsCache)==null?void 0:e.heartbeats)==null&&(this._heartbeatsCache=await this._heartbeatsCachePromise,((n=this._heartbeatsCache)==null?void 0:n.heartbeats)==null)||this._heartbeatsCache.lastSentHeartbeatDate===i||this._heartbeatsCache.heartbeats.some(o=>o.date===i))return;if(this._heartbeatsCache.heartbeats.push({date:i,agent:s}),this._heartbeatsCache.heartbeats.length>Y$){const o=Z$(this._heartbeatsCache.heartbeats);this._heartbeatsCache.heartbeats.splice(o,1)}return this._storage.overwrite(this._heartbeatsCache)}catch(r){Zr.warn(r)}}async getHeartbeatsHeader(){var e;try{if(this._heartbeatsCache===null&&await this._heartbeatsCachePromise,((e=this._heartbeatsCache)==null?void 0:e.heartbeats)==null||this._heartbeatsCache.heartbeats.length===0)return"";const n=b1(),{heartbeatsToSend:r,unsentEntries:s}=X$(this._heartbeatsCache.heartbeats),i=mh(JSON.stringify({version:2,heartbeats:r}));return this._heartbeatsCache.lastSentHeartbeatDate=n,s.length>0?(this._heartbeatsCache.heartbeats=s,await this._storage.overwrite(this._heartbeatsCache)):(this._heartbeatsCache.heartbeats=[],this._storage.overwrite(this._heartbeatsCache)),i}catch(n){return Zr.warn(n),""}}}function b1(){return new Date().toISOString().substring(0,10)}function X$(t,e=q$){const n=[];let r=t.slice();for(const s of t){const i=n.find(o=>o.agent===s.agent);if(i){if(i.dates.push(s.date),_1(n)>e){i.dates.pop();break}}else if(n.push({agent:s.agent,dates:[s.date]}),_1(n)>e){n.pop();break}r=r.slice(1)}return{heartbeatsToSend:n,unsentEntries:r}}class J${constructor(e){this.app=e,this._canUseIndexedDBPromise=this.runIndexedDBEnvironmentCheck()}async runIndexedDBEnvironmentCheck(){return M8()?O8().then(()=>!0).catch(()=>!1):!1}async read(){if(await this._canUseIndexedDBPromise){const n=await G$(this.app);return n!=null&&n.heartbeats?n:{heartbeats:[]}}else return{heartbeats:[]}}async overwrite(e){if(await this._canUseIndexedDBPromise){const r=await this.read();return w1(this.app,{lastSentHeartbeatDate:e.lastSentHeartbeatDate??r.lastSentHeartbeatDate,heartbeats:e.heartbeats})}else return}async add(e){if(await this._canUseIndexedDBPromise){const r=await this.read();return w1(this.app,{lastSentHeartbeatDate:e.lastSentHeartbeatDate??r.lastSentHeartbeatDate,heartbeats:[...r.heartbeats,...e.heartbeats]})}else return}}function _1(t){return mh(JSON.stringify({version:2,heartbeats:t})).length}function Z$(t){if(t.length===0)return-1;let e=0,n=t[0].date;for(let r=1;r<t.length;r++)t[r].date<n&&(n=t[r].date,e=r);return e}/** 736 * @license 737 * Copyright 2019 Google LLC 738 * 739 * Licensed under the Apache License, Version 2.0 (the "License");
740 * you may not use this file except in compliance with the License. 741 * You may obtain a copy of the License at 742 * 743 * http://www.apache.org/licenses/LICENSE-2.0 744 * 745 * Unless required by applicable law or agreed to in writing, software 746 * distributed under the License is distributed on an "AS IS" BASIS, 747 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 748 * See the License for the specific language governing permissions and 749 * limitations under the License. 750 */function ez(t){Zi(new oi("platform-logger",e=>new h$(e),"PRIVATE")),Zi(new oi("heartbeat",e=>new Q$(e),"PRIVATE")),Er(dy,v1,t),Er(dy,v1,"esm2020"),Er("fire-js","")}ez("");var tz="firebase",nz="12.9.0";/** 751 * @license 752 * Copyright 2020 Google LLC 753 * 754 * Licensed under the Apache License, Version 2.0 (the "License"); 755 * you may not use this file except in compliance with the License. 756 * You may obtain a copy of the License at 757 * 758 * http://www.apache.org/licenses/LICENSE-2.0 759 * 760 * Unless required by applicable law or agreed to in writing, software 761 * distributed under the License is distributed on an "AS IS" BASIS, 762 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 763 * See the License for the specific language governing permissions and 764 * limitations under the License. 765 */Er(tz,nz,"app");var k1={};const E1="@firebase/database",C1="1.1.0";/** 766 * @license 767 * Copyright 2019 Google LLC 768 * 769 * Licensed under the Apache License, Version 2.0 (the "License"); 770 * you may not use this file except in compliance with the License. 771 * You may obtain a copy of the License at 772 * 773 * http://www.apache.org/licenses/LICENSE-2.0 774 * 775 * Unless required by applicable law or agreed to in writing, software 776 * distributed under the License is distributed on an "AS IS" BASIS, 777 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 778 * See the License for the specific language governing permissions and 779 * limitations under the License. 780 */let YI="";function rz(t){YI=t}/** 781 * @license 782 * Copyright 2017 Google LLC 783 * 784 * Licensed under the Apache License, Version 2.0 (the "License"); 785 * you may not use this file except in compliance with the License. 786 * You may obtain a copy of the License at 787 * 788 * http://www.apache.org/licenses/LICENSE-2.0 789 * 790 * Unless required by applicable law or agreed to in writing, software 791 * distributed under the License is distributed on an "AS IS" BASIS, 792 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 793 * See the License for the specific language governing permissions and 794 * limitations under the License. 795 */class sz{constructor(e){this.domStorage_=e,this.prefix_="firebase:"}set(e,n){n==null?this.domStorage_.removeItem(this.prefixedName_(e)):this.domStorage_.setItem(this.prefixedName_(e),at(n))}get(e){const n=this.domStorage_.getItem(this.prefixedName_(e));return n==null?null:Cc(n)}remove(e){this.domStorage_.removeItem(this.prefixedName_(e))}prefixedName_(e){return this.prefix_+e}toString(){return this.domStorage_.toString()}}/** 796 * @license 797 * Copyright 2017 Google LLC 798 * 799 * Licensed under the Apache License, Version 2.0 (the "License"); 800 * you may not use this file except in compliance with the License. 801 * You may obtain a copy of the License at 802 * 803 * http://www.apache.org/licenses/LICENSE-2.0 804 * 805 * Unless required by applicable law or agreed to in writing, software 806 * distributed under the License is distributed on an "AS IS" BASIS, 807 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 808 * See the License for the specific language governing permissions and 809 * limitations under the License. 810 */class iz{constructor(){this.cache_={},this.isInMemoryStorage=!0}set(e,n){n==null?delete this.cache_[e]:this.cache_[e]=n}get(e){return is(this.cache_,e)?this.cache_[e]:null}remove(e){delete this.cache_[e]}}/** 811 * @license 812 * Copyright 2017 Google LLC 813 * 814 * Licensed under the Apache License, Version 2.0 (the "License"); 815 * you may not use this file except in compliance with the License. 816 * You may obtain a copy of the License at 817 * 818 * http://www.apache.org/licenses/LICENSE-2.0 819 * 820 * Unless required by applicable law or agreed to in writing, softw
820are 821 * distributed under the License is distributed on an "AS IS" BASIS, 822 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 823 * See the License for the specific language governing permissions and 824 * limitations under the License. 825 */const QI=function(t){try{if(typeof window<"u"&&typeof window[t]<"u"){const e=window[t];return e.setItem("firebase:sentinel","cache"),e.removeItem("firebase:sentinel"),new sz(e)}}catch{}return new iz},Ri=QI("localStorage"),oz=QI("sessionStorage");/** 826 * @license 827 * Copyright 2017 Google LLC 828 * 829 * Licensed under the Apache License, Version 2.0 (the "License"); 830 * you may not use this file except in compliance with the License. 831 * You may obtain a copy of the License at 832 * 833 * http://www.apache.org/licenses/LICENSE-2.0 834 * 835 * Unless required by applicable law or agreed to in writing, software 836 * distributed under the License is distributed on an "AS IS" BASIS, 837 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 838 * See the License for the specific language governing permissions and 839 * limitations under the License. 840 */const ta=new Ux("@firebase/database"),az=function(){let t=1;return function(){return t++}}(),XI=function(t){const e=K8(t),n=new $8;n.update(e);const r=n.digest();return Ax.encodeByteArray(r)},eu=function(...t){let e="";for(let n=0;n<t.length;n++){const r=t[n];Array.isArray(r)||r&&typeof r=="object"&&typeof r.length=="number"?e+=eu.apply(null,r):typeof r=="object"?e+=at(r):e+=r,e+=" "}return e};let Wl=null,S1=!0;const lz=function(t,e){$(!e,"Can't turn on custom loggers persistently."),ta.logLevel=Se.VERBOSE,Wl=ta.log.bind(ta)},It=function(...t){if(S1===!0&&(S1=!1,Wl===null&&oz.get("logging_enabled")===!0&&lz()),Wl){const e=eu.apply(null,t);Wl(e)}},tu=function(t){return function(...e){It(t,...e)}},py=function(...t){const e="FIREBASE INTERNAL ERROR: "+eu(...t);ta.error(e)},es=function(...t){const e=`FIREBASE FATAL ERROR: ${eu(...t)}`;throw ta.error(e),new Error(e)},nn=function(...t){const e="FIREBASE WARNING: "+eu(...t);ta.warn(e)},cz=function(){typeof window<"u"&&window.location&&window.location.protocol&&window.location.protocol.indexOf("https:")!==-1&&nn("Insecure Firebase access from a secure page. Please use https in calls to new Firebase().")},JI=function(t){return typeof t=="number"&&(t!==t||t===Number.POSITIVE_INFINITY||t===Number.NEGATIVE_INFINITY)},uz=function(t){if(document.readyState==="complete")t();else{let e=!1;const n=function(){if(!document.body){setTimeout(n,Math.floor(10));return}e||(e=!0,t())};document.addEventListener?(document.addEventListener("DOMContentLoaded",n,!1),window.addEventListener("load",n,!1)):document.attachEvent&&(document.attachEvent("onreadystatechange",()=>{document.readyState==="complete"&&n()}),window.attachEvent("onload",n))}},Na="[MIN_NAME]",eo="[MAX_NAME]",qa=function(t,e){if(t===e)return 0;if(t===Na||e===eo)return-1;if(e===Na||t===eo)return 1;{const n=N1(t),r=N1(e);return n!==null?r!==null?n-r===0?t.length-e.length:n-r:-1:r!==null?1:t<e?-1:1}},dz=function(t,e){return t===e?0:t<e?-1:1},fl=function(t,e){if(e&&t in e)return e[t];throw new Error("Missing required key ("+t+") in object: "+at(e))},$x=function(t){if(typeof t!="object"||t===null)return at(t);const e=[];for(const r in t)e.push(r);e.sort();let n="{";for(let r=0;r<e.length;r++)r!==0&&(n+=","),n+=at(e[r]),n+=":",n+=$x(t[e[r]]);return n+="}",n},ZI=function(t,e){const n=t.length;if(n<=e)return[t];const r=[];for(let s=0;s<n;s+=e)s+e>n?r.push(t.substring(s,n)):r.push(t.substring(s,s+e));return r};function rn(t,e){for(const n in t)t.hasOwnProperty(n)&&e(n,t[n])}const eP=function(t){$(!JI(t),"Invalid JSON number");const e=11,n=52,r=(1<<e-1)-1;let s,i,o,a,c;t===0?(i=0,o=0,s=1/t===-1/0?1:0):(s=t<0,t=Math.abs(t),t>=Math.pow(2,1-r)?(a=Math.min(Math.floor(Math.log(t)/Math.LN2),r),i=a+r,o=Math.round(t*Math.pow(2,n-a)-Math.pow(2,n))):(i=0,o=Math.round(t/Math.pow(2,1-r-n))));const u=[];for(c=n;c;c-=1)u.push(o%2?1:0),o=Math.floor(o/2);for(c=e;c;c-=1)u.push(i%2?1:0),i=Math.floor(i/2);u.push(s?1:0),u.reverse();const d=u.join("");let h="";for(c=0;c<64;c+=8){let f=parseInt(d.substr(c,8),2).toString(16);f.length===1&&(f="0"+f),h=h+f}return h.toLowerCase()},hz=function(){return!!(typeof window=="object"&&window.chrome&&window.chrome.extension&&!/^chrome/.test(window.location.href))},fz=function(){return typeof Windows=="object"&&typeof Windows.UI=="object"};function pz(t,e){let n="Unknown Error";t==="too_big"?n="The data requested exceeds the maximum size that can be accessed with a single request.":t==="permission_denied"?n="Client doesn't have permission to access the desired data.":t==="unavailable"&&(n="The service is unavailable");const r=new Error(t+" at "+e._path.toString()+": "+n);return r.code=t.toUpperCase(),r}const mz=new RegExp("^-?(0*)\\d{1,10}$"),gz=-2147483648,yz=2147483647,N1=function(t){if(mz.test(t)){const e=Number(t);if(e>=gz&&e<=yz)return e}return null},Ya=function(t){try{t()}catch(e){setTimeout(()=>{const n=e.stack||"";throw nn("Exception was thrown by user callback.",n),e},Math.floor(0))}},vz=function(){return(typeof window=="object"&&window.navigator&&window.navigator.userAgent||"").search(/googlebot|google webmaster tools|bingbot|yahoo! slurp|baiduspider|yandexbot|duckduckbot/i)>=0},Hl=function(t,e){const n=setTimeout(t,e);return typeof n=="number"&&typeof Deno<"u"&&Deno.unrefTimer?Deno.unrefTimer(n):typeof n=="object"&&n.unref&&n.unref(),n};/** 841 * @license 842 * Copyright 2021 Google LLC 843 * 844 * Licensed under the Apache License, Version 2.0 (the "License");
845 * you may not use this file except in compliance with the License. 846 * You may obtain a copy of the License at 847 * 848 * http://www.apache.org/licenses/LICENSE-2.0 849 * 850 * Unless required by applicable law or agreed to in writing, software 851 * distributed under the License is distributed on an "AS IS" BASIS, 852 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 853 * See the License for the specific language governing permissions and 854 * limitations under the License. 855 */class xz{constructor(e,n){this.appCheckProvider=n,this.appName=e.name,kn(e)&&e.settings.appCheckToken&&(this.serverAppAppCheckToken=e.settings.appCheckToken),this.appCheck=n==null?void 0:n.getImmediate({optional:!0}),this.appCheck||n==null||n.get().then(r=>this.appCheck=r)}getToken(e){if(this.serverAppAppCheckToken){if(e)throw new Error("Attempted reuse of `FirebaseServerApp.appCheckToken` after previous usage failed.");return Promise.resolve({token:this.serverAppAppCheckToken})}return this.appCheck?this.appCheck.getToken(e):new Promise((n,r)=>{setTimeout(()=>{this.appCheck?this.getToken(e).then(n,r):n(null)},0)})}addTokenChangeListener(e){var n;(n=this.appCheckProvider)==null||n.get().then(r=>r.addTokenListener(e))}notifyForInvalidToken(){nn(`Provided AppCheck credentials for the app named "${this.appName}" are invalid. This usually indicates your app was not initialized correctly.`)}}/** 856 * @license 857 * Copyright 2017 Google LLC 858 * 859 * Licensed under the Apache License, Version 2.0 (the "License"); 860 * you may not use this file except in compliance with the License. 861 * You may obtain a copy of the License at 862 * 863 * http://www.apache.org/licenses/LICENSE-2.0 864 * 865 * Unless required by applicable law or agreed to in writing, software 866 * distributed under the License is distributed on an "AS IS" BASIS, 867 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 868 * See the License for the specific language governing permissions and 869 * limitations under the License. 870 */class wz{constructor(e,n,r){this.appName_=e,this.firebaseOptions_=n,this.authProvider_=r,this.auth_=null,this.auth_=r.getImmediate({optional:!0}),this.auth_||r.onInit(s=>this.auth_=s)}getToken(e){return this.auth_?this.auth_.getToken(e).catch(n=>n&&n.code==="auth/token-not-initialized"?(It("Got auth/token-not-initialized error. Treating as null token."),null):Promise.reject(n)):new Promise((n,r)=>{setTimeout(()=>{this.auth_?this.getToken(e).then(n,r):n(null)},0)})}addTokenChangeListener(e){this.auth_?this.auth_.addAuthTokenListener(e):this.authProvider_.get().then(n=>n.addAuthTokenListener(e))}removeTokenChangeListener(e){this.authProvider_.get().then(n=>n.removeAuthTokenListener(e))}notifyForInvalidToken(){let e='Provided authentication credentials for the app named "'+this.appName_+'" are invalid. This usually indicates your app was not initialized correctly. ';"credential"in this.firebaseOptions_?e+='Make sure the "credential" property provided to initializeApp() is authorized to access the specified "databaseURL" and is from the correct project.':"serviceAccount"in this.firebaseOptions_?e+='Make sure the "serviceAccount" property provided to initializeApp() is authorized to access the specified "databaseURL" and is from the correct project.':e+='Make sure the "apiKey" and "databaseURL" properties provided to initializeApp() match the values provided for your app at https://console.firebase.google.com/.',nn(e)}}class bd{constructor(e){this.accessToken=e}getToken(e){return Promise.resolve({accessToken:this.accessToken})}addTokenChangeListener(e){e(this.accessToken)}removeTokenChangeListener(e){}notifyForInvalidToken(){}}bd.OWNER="owner";/** 871 * @license 872 * Copyright 2017 Google LLC 873 * 874 * Licensed under the Apache License, Version 2.0 (the "License"); 875 * you may not use this file except in compliance with the License. 876 * You may obtain a copy of the License at 877 * 878 * http://www.apache.org/licenses/LICENSE-2.0 879 * 880 * Unless required by applicable law or agreed to in writing, software 881 * distributed under the License is distributed on an "AS IS" BASIS, 882 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 883 * See the License for the specific language governing permissions and 884 * limitations under the License. 885 */const zx="5",tP="v",nP="s",rP="r",sP="f",iP=/(console\.firebase|firebase-console-\w+\.corp|firebase\.corp)\.google\.com/,oP="ls",aP="p",my="ac",lP="websocket",cP="long_polling";/** 886 * @license 887 * Copyright 2017 Google LLC 888 * 889 * Licensed under the Apache License, Version 2.0 (the "License");
890 * you may not use this file except in compliance with the License. 891 * You may obtain a copy of the License at 892 * 893 * http://www.apache.org/licenses/LICENSE-2.0 894 * 895 * Unless required by applicable law or agreed to in writing, software 896 * distributed under the License is distributed on an "AS IS" BASIS, 897 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 898 * See the License for the specific language governing permissions and 899 * limitations under the License. 900 */class uP{constructor(e,n,r,s,i=!1,o="",a=!1,c=!1,u=null){this.secure=n,this.namespace=r,this.webSocketOnly=s,this.nodeAdmin=i,this.persistenceKey=o,this.includeNamespaceInQueryParams=a,this.isUsingEmulator=c,this.emulatorOptions=u,this._host=e.toLowerCase(),this._domain=this._host.substr(this._host.indexOf(".")+1),this.internalHost=Ri.get("host:"+e)||this._host}isCacheableHost(){return this.internalHost.substr(0,2)==="s-"}isCustomHost(){return this._domain!=="firebaseio.com"&&this._domain!=="firebaseio-demo.com"}get host(){return this._host}set host(e){e!==this.internalHost&&(this.internalHost=e,this.isCacheableHost()&&Ri.set("host:"+this._host,this.internalHost))}toString(){let e=this.toURLString();return this.persistenceKey&&(e+="<"+this.persistenceKey+">"),e}toURLString(){const e=this.secure?"https://":"http://",n=this.includeNamespaceInQueryParams?`?ns=${this.namespace}`:"";return`${e}${this.host}/${n}`}}function bz(t){return t.host!==t.internalHost||t.isCustomHost()||t.includeNamespaceInQueryParams}function dP(t,e,n){$(typeof e=="string","typeof type must == string"),$(typeof n=="object","typeof params must == object");let r;if(e===lP)r=(t.secure?"wss://":"ws://")+t.internalHost+"/.ws?";else if(e===cP)r=(t.secure?"https://":"http://")+t.internalHost+"/.lp?";else throw new Error("Unknown connection type: "+e);bz(t)&&(n.ns=t.namespace);const s=[];return rn(n,(i,o)=>{s.push(i+"="+o)}),r+s.join("&")}/** 901 * @license 902 * Copyright 2017 Google LLC 903 * 904 * Licensed under the Apache License, Version 2.0 (the "License"); 905 * you may not use this file except in compliance with the License. 906 * You may obtain a copy of the License at 907 * 908 * http://www.apache.org/licenses/LICENSE-2.0 909 * 910 * Unless required by applicable law or agreed to in writing, software 911 * distributed under the License is distributed on an "AS IS" BASIS, 912 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 913 * See the License for the specific language governing permissions and 914 * limitations under the License. 915 */class _z{constructor(){this.counters_={}}incrementCounter(e,n=1){is(this.counters_,e)||(this.counters_[e]=0),this.counters_[e]+=n}get(){return E8(this.counters_)}}/** 916 * @license 917 * Copyright 2017 Google LLC 918 * 919 * Licensed under the Apache License, Version 2.0 (the "License"); 920 * you may not use this file except in compliance with the License. 921 * You may obtain a copy of the License at 922 * 923 * http://www.apache.org/licenses/LICENSE-2.0 924 * 925 * Unless required by applicable law or agreed to in writing, software 926 * distributed under the License is distributed on an "AS IS" BASIS, 927 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 928 * See the License for the specific language governing permissions and 929 * limitations under the License. 930 */const om={},am={};function Wx(t){const e=t.toString();return om[e]||(om[e]=new _z),om[e]}function kz(t,e){const n=t.toString();return am[n]||(am[n]=e()),am[n]}/** 931 * @license 932 * Copyright 2017 Google LLC 933 * 934 * Licensed under the Apache License, Version 2.0 (the "License"); 935 * you may not use this file except in compliance with the License. 936 * You may obtain a copy of the License at 937 * 938 * http://www.apache.org/licenses/LICENSE-2.0 939 * 940 * Unless required by applicable law or agreed to in writing, software 941 * distributed under the License is distributed on an "AS IS" BASIS, 942 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 943 * See the License for the specific language governing permissions and 944 * limitations under the License. 945 */class Ez{constructor(e){this.onMessage_=e,this.pendingResponses=[],this.currentResponseNum=0,this.closeAfterResponse=-1,this.onClose=null}closeAfter(e,n){this.closeAfterResponse=e,this.onClose=n,this.closeAfterResponse<this.currentResponseNum&&(this.onClose(),this.onClose=null)}handleResponse(e,n){for(this.pendingResponses[e]=n;this.pendingResponses[this.currentResponseNum];){const r=this.pendingResponses[this.currentResponseNum];delete this.pendingResponses[this.currentResponseNum];for(let s=0;s<r.length;++s)r[s]&&Ya(()=>{this.onMessage_(r[s])});if(this.currentResponseNum===this.closeAfterResponse){this.onClose&&(this.onClose(),this.onClose=null);break}this.currentResponseNum++}}}/** 946 * @license 947 * Copyright 2017 Google LLC 948 * 949 * Licensed under the Apache License, Version 2.0 (the "License");
950 * you may not use this file except in compliance with the License. 951 * You may obtain a copy of the License at 952 * 953 * http://www.apache.org/licenses/LICENSE-2.0 954 * 955 * Unless required by applicable law or agreed to in writing, software 956 * distributed under the License is distributed on an "AS IS" BASIS, 957 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 958 * See the License for the specific language governing permissions and 959 * limitations under the License. 960 */const T1="start",Cz="close",Sz="pLPCommand",Nz="pRTLPCB",hP="id",fP="pw",pP="ser",Tz="cb",Iz="seg",Pz="ts",jz="d",Rz="dframe",mP=1870,gP=30,Az=mP-gP,Dz=25e3,Mz=3e4;class $o{constructor(e,n,r,s,i,o,a){this.connId=e,this.repoInfo=n,this.applicationId=r,this.appCheckToken=s,this.authToken=i,this.transportSessionId=o,this.lastSessionId=a,this.bytesSent=0,this.bytesReceived=0,this.everConnected_=!1,this.log_=tu(e),this.stats_=Wx(n),this.urlFn=c=>(this.appCheckToken&&(c[my]=this.appCheckToken),dP(n,cP,c))}open(e,n){this.curSegmentNum=0,this.onDisconnect_=n,this.myPacketOrderer=new Ez(e),this.isClosed_=!1,this.connectTimeoutTimer_=setTimeout(()=>{this.log_("Timed out trying to connect."),this.onClosed_(),this.connectTimeoutTimer_=null},Math.floor(Mz)),uz(()=>{if(this.isClosed_)return;this.scriptTagHolder=new Hx((...i)=>{const[o,a,c,u,d]=i;if(this.incrementIncomingBytes_(i),!!this.scriptTagHolder)if(this.connectTimeoutTimer_&&(clearTimeout(this.connectTimeoutTimer_),this.connectTimeoutTimer_=null),this.everConnected_=!0,o===T1)this.id=a,this.password=c;else if(o===Cz)a?(this.scriptTagHolder.sendNewPolls=!1,this.myPacketOrderer.closeAfter(a,()=>{this.onClosed_()})):this.onClosed_();else throw new Error("Unrecognized command received: "+o)},(...i)=>{const[o,a]=i;this.incrementIncomingBytes_(i),this.myPacketOrderer.handleResponse(o,a)},()=>{this.onClosed_()},this.urlFn);const r={};r[T1]="t",r[pP]=Math.floor(Math.random()*1e8),this.scriptTagHolder.uniqueCallbackIdentifier&&(r[Tz]=this.scriptTagHolder.uniqueCallbackIdentifier),r[tP]=zx,this.transportSessionId&&(r[nP]=this.transportSessionId),this.lastSessionId&&(r[oP]=this.lastSessionId),this.applicationId&&(r[aP]=this.applicationId),this.appCheckToken&&(r[my]=this.appCheckToken),typeof location<"u"&&location.hostname&&iP.test(location.hostname)&&(r[rP]=sP);const s=this.urlFn(r);this.log_("Connecting via long-poll to "+s),this.scriptTagHolder.addTag(s,()=>{})})}start(){this.scriptTagHolder.startLongPoll(this.id,this.password),this.addDisconnectPingFrame(this.id,this.password)}static forceAllow(){$o.forceAllow_=!0}static forceDisallow(){$o.forceDisallow_=!0}static isAvailable(){return $o.forceAllow_?!0:!$o.forceDisallow_&&typeof document<"u"&&document.createElement!=null&&!hz()&&!fz()}markConnectionHealthy(){}shutdown_(){this.isClosed_=!0,this.scriptTagHolder&&(this.scriptTagHolder.close(),this.scriptTagHolder=null),this.myDisconnFrame&&(document.body.removeChild(this.myDisconnFrame),this.myDisconnFrame=null),this.connectTimeoutTimer_&&(clearTimeout(this.connectTimeoutTimer_),this.connectTimeoutTimer_=null)}onClosed_(){this.isClosed_||(this.log_("Longpoll is closing itself"),this.shutdown_(),this.onDisconnect_&&(this.onDisconnect_(this.everConnected_),this.onDisconnect_=null))}close(){this.isClosed_||(this.log_("Longpoll is being closed."),this.shutdown_())}send(e){const n=at(e);this.bytesSent+=n.length,this.stats_.incrementCounter("bytes_sent",n.length);const r=DI(n),s=ZI(r,Az);for(let i=0;i<s.length;i++)this.scriptTagHolder.enqueueSegment(this.curSegmentNum,s.length,s[i]),this.curSegmentNum++}addDisconnectPingFrame(e,n){this.myDisconnFrame=document.createElement("iframe");const r={};r[Rz]="t",r[hP]=e,r[fP]=n,this.myDisconnFrame.src=this.urlFn(r),this.myDisconnFrame.style.display="none",document.body.appendChild(this.myDisconnFrame)}incrementIncomingBytes_(e){const n=at(e).length;this.bytesReceived+=n,this.stats_.incrementCounter("bytes_received",n)}}class Hx{constructor(e,n,r,s){this.onDisconnect=r,this.urlFn=s,this.outstandingRequests=new Set,this.pendingSegs=[],this.currentSerial=Math.floor(Math.random()*1e8),this.sendNewPolls=!0;{this.uniqueCallbackIdentifier=az(),window[Sz+this.uniqueCallbackIdentifier]=e,window[Nz+this.uniqueCallbackIdentifier]=n,this.myIFrame=Hx.createIFrame_();let i="";this.myIFrame.src&&this.myIFrame.src.substr(0,11)==="javascript:"&&(i='<script>document.domain="'+document.domain+'";<\/script>');const o="<html><body>"+i+"</body></html>";
vendor: 15,850 bytes, lines 960-1015
960try{this.myIFrame.doc.open(),this.myIFrame.doc.write(o),this.myIFrame.doc.close()}catch(a){It("frame writing exception"),a.stack&&It(a.stack),It(a)}}}static createIFrame_(){const e=document.createElement("iframe");if(e.style.display="none",document.body){document.body.appendChild(e);try{e.contentWindow.document||It("No IE domain setting required")}catch{const r=document.domain;e.src="javascript:void((function(){document.open();document.domain='"+r+"';document.close();})())"}}else throw"Document body has not initialized. Wait to initialize Firebase until after the document is ready.";return e.contentDocument?e.doc=e.contentDocument:e.contentWindow?e.doc=e.contentWindow.document:e.document&&(e.doc=e.document),e}close(){this.alive=!1,this.myIFrame&&(this.myIFrame.doc.body.textContent="",setTimeout(()=>{this.myIFrame!==null&&(document.body.removeChild(this.myIFrame),this.myIFrame=null)},Math.floor(0)));const e=this.onDisconnect;e&&(this.onDisconnect=null,e())}startLongPoll(e,n){for(this.myID=e,this.myPW=n,this.alive=!0;this.newRequest_(););}newRequest_(){if(this.alive&&this.sendNewPolls&&this.outstandingRequests.size<(this.pendingSegs.length>0?2:1)){this.currentSerial++;const e={};e[hP]=this.myID,e[fP]=this.myPW,e[pP]=this.currentSerial;let n=this.urlFn(e),r="",s=0;for(;this.pendingSegs.length>0&&this.pendingSegs[0].d.length+gP+r.length<=mP;){const o=this.pendingSegs.shift();r=r+"&"+Iz+s+"="+o.seg+"&"+Pz+s+"="+o.ts+"&"+jz+s+"="+o.d,s++}return n=n+r,this.addLongPollTag_(n,this.currentSerial),!0}else return!1}enqueueSegment(e,n,r){this.pendingSegs.push({seg:e,ts:n,d:r}),this.alive&&this.newRequest_()}addLongPollTag_(e,n){this.outstandingRequests.add(n);const r=()=>{this.outstandingRequests.delete(n),this.newRequest_()},s=setTimeout(r,Math.floor(Dz)),i=()=>{clearTimeout(s),r()};this.addTag(e,i)}addTag(e,n){setTimeout(()=>{try{if(!this.sendNewPolls)return;const r=this.myIFrame.doc.createElement("script");r.type="text/javascript",r.async=!0,r.src=e,r.onload=r.onreadystatechange=function(){const s=r.readyState;(!s||s==="loaded"||s==="complete")&&(r.onload=r.onreadystatechange=null,r.parentNode&&r.parentNode.removeChild(r),n())},r.onerror=()=>{It("Long-poll script failed to load: "+e),this.sendNewPolls=!1,this.close()},this.myIFrame.doc.body.appendChild(r)}catch{}},Math.floor(1))}}/** 961 * @license 962 * Copyright 2017 Google LLC 963 * 964 * Licensed under the Apache License, Version 2.0 (the "License"); 965 * you may not use this file except in compliance with the License. 966 * You may obtain a copy of the License at 967 * 968 * http://www.apache.org/licenses/LICENSE-2.0 969 * 970 * Unless required by applicable law or agreed to in writing, software 971 * distributed under the License is distributed on an "AS IS" BASIS, 972 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 973 * See the License for the specific language governing permissions and 974 * limitations under the License. 975 */const Oz=16384,Lz=45e3;let xh=null;typeof MozWebSocket<"u"?xh=MozWebSocket:typeof WebSocket<"u"&&(xh=WebSocket);class Kn{constructor(e,n,r,s,i,o,a){this.connId=e,this.applicationId=r,this.appCheckToken=s,this.authToken=i,this.keepaliveTimer=null,this.frames=null,this.totalFrames=0,this.bytesSent=0,this.bytesReceived=0,this.log_=tu(this.connId),this.stats_=Wx(n),this.connURL=Kn.connectionURL_(n,o,a,s,r),this.nodeAdmin=n.nodeAdmin}static connectionURL_(e,n,r,s,i){const o={};return o[tP]=zx,typeof location<"u"&&location.hostname&&iP.test(location.hostname)&&(o[rP]=sP),n&&(o[nP]=n),r&&(o[oP]=r),s&&(o[my]=s),i&&(o[aP]=i),dP(e,lP,o)}open(e,n){this.onDisconnect=n,this.onMessage=e,this.log_("Websocket connecting to "+this.connURL),this.everConnected_=!1,Ri.set("previous_websocket_failure",!0);try{let r;$I(),this.mySock=new xh(this.connURL,[],r)}catch(r){this.log_("Error instantiating WebSocket.");const s=r.message||r.data;s&&this.log_(s),this.onClosed_();return}this.mySock.onopen=()=>{this.log_("Websocket connected."),this.everConnected_=!0},this.mySock.onclose=()=>{this.log_("Websocket connection was disconnected."),this.mySock=null,this.onClosed_()},this.mySock.onmessage=r=>{this.handleIncomingFrame(r)},this.mySock.onerror=r=>{this.log_("WebSocket error. Closing connection.");const s=r.message||r.data;s&&this.log_(s),this.onClosed_()}}start(){}static forceDisallow(){Kn.forceDisallow_=!0}static isAvailable(){let e=!1;if(typeof navigator<"u"&&navigator.userAgent){const n=/Android ([0-9]{0,}\.[0-9]{0,})/,r=navigator.userAgent.match(n);r&&r.length>1&&parseFloat(r[1])<4.4&&(e=!0)}return!e&&xh!==null&&!Kn.forceDisallow_}static previouslyFailed(){return Ri.isInMemoryStorage||Ri.get("previous_websocket_failure")===!0}markConnectionHealthy(){Ri.remove("previous_websocket_failure")}appendFrame_(e){if(this.frames.push(e),this.frames.length===this.totalFrames){const n=this.frames.join("");this.frames=null;const r=Cc(n);this.onMessage(r)}}handleNewFrameCount_(e){this.totalFrames=e,this.frames=[]}extractFrameCount_(e){if($(this.frames===null,"We already have a frame buffer"),e.length<=6){const n=Number(e);if(!isNaN(n))return this.handleNewFrameCount_(n),null}return this.handleNewFrameCount_(1),e}handleIncomingFrame(e){if(this.mySock===null)return;const n=e.data;if(this.bytesReceived+=n.length,this.stats_.incrementCounter("bytes_received",n.length),this.resetKeepAlive(),this.frames!==null)this.appendFrame_(n);else{const r=this.extractFrameCount_(n);r!==null&&this.appendFrame_(r)}}send(e){this.resetKeepAlive();const n=at(e);this.bytesSent+=n.length,this.stats_.incrementCounter("bytes_sent",n.length);const r=ZI(n,Oz);r.length>1&&this.sendString_(String(r.length));for(let s=0;s<r.length;s++)this.sendString_(r[s])}shutdown_(){this.isClosed_=!0,this.keepaliveTimer&&(clearInterval(this.keepaliveTimer),this.keepaliveTimer=null),this.mySock&&(this.mySock.close(),this.mySock=null)}onClosed_(){this.isClosed_||(this.log_("WebSocket is closing itself"),this.shutdown_(),this.onDisconnect&&(this.onDisconnect(this.everConnected_),this.onDisconnect=null))}close(){this.isClosed_||(this.log_("WebSocket is being closed"),this.shutdown_())}resetKeepAlive(){clearInterval(this.keepaliveTimer),this.keepaliveTimer=setInterval(()=>{this.mySock&&this.sendString_("0"),this.resetKeepAlive()},Math.floor(Lz))}sendString_(e){try{this.mySock.send(e)}catch(n){this.log_("Exception thrown from WebSocket.send():",n.message||n.data,"Closing connection."),setTimeout(this.onClosed_.bind(this),0)}}}Kn.responsesRequiredToBeHealthy=2;Kn.healthyTimeout=3e4;/** 976 * @license 977 * Copyright 2017 Google LLC 978 * 979 * Licensed under the Apache License, Version 2.0 (the "License"); 980 * you may not use this file except in compliance with the License. 981 * You may obtain a copy of the License at 982 * 983 * http://www.apache.org/licenses/LICENSE-2.0 984 * 985 * Unless required by applicable law or agreed to in writing, software 986 * distributed under the License is distributed on an "AS IS" BASIS, 987 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 988 * See the License for the specific language governing permissions and 989 * limitations under the License. 990 */class Nc{static get ALL_TRANSPORTS(){return[$o,Kn]}static get IS_TRANSPORT_INITIALIZED(){return this.globalTransportInitialized_}constructor(e){this.initTransports_(e)}initTransports_(e){const n=Kn&&Kn.isAvailable();let r=n&&!Kn.previouslyFailed();if(e.webSocketOnly&&(n||nn("wss:// URL used, but browser isn't known to support websockets. Trying anyway."),r=!0),r)this.transports_=[Kn];else{const s=this.transports_=[];for(const i of Nc.ALL_TRANSPORTS)i&&i.isAvailable()&&s.push(i);Nc.globalTransportInitialized_=!0}}initialTransport(){if(this.transports_.length>0)return this.transports_[0];throw new Error("No transports available")}upgradeTransport(){return this.transports_.length>1?this.transports_[1]:null}}Nc.globalTransportInitialized_=!1;/** 991 * @license 992 * Copyright 2017 Google LLC 993 * 994 * Licensed under the Apache License, Version 2.0 (the "License"); 995 * you may not use this file except in compliance with the License. 996 * You may obtain a copy of the License at 997 * 998 * http://www.apache.org/licenses/LICENSE-2.0 999 * 1000 * Unless required by applicable law or agreed to in writing, software 1001 * distributed under the License is distributed on an "AS IS" BASIS, 1002 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1003 * See the License for the specific language governing permissions and 1004 * limitations under the License. 1005 */const Fz=6e4,Uz=5e3,Bz=10*1024,Vz=100*1024,lm="t",I1="d",$z="s",P1="r",zz="e",j1="o",R1="a",A1="n",D1="p",Wz="h";class Hz{constructor(e,n,r,s,i,o,a,c,u,d){this.id=e,this.repoInfo_=n,this.applicationId_=r,this.appCheckToken_=s,this.authToken_=i,this.onMessage_=o,this.onReady_=a,this.onDisconnect_=c,this.onKill_=u,this.lastSessionId=d,this.connectionCount=0,this.pendingDataMessages=[],this.state_=0,this.log_=tu("c:"+this.id+":"),this.transportManager_=new Nc(n),this.log_("Connection created"),this.start_()}start_(){const e=this.transportManager_.initialTransport();this.conn_=new e(this.nextTransportId_(),this.repoInfo_,this.applicationId_,this.appCheckToken_,this.authToken_,null,this.lastSessionId),this.primaryResponsesRequired_=e.responsesRequiredToBeHealthy||0;const n=this.connReceiver_(this.conn_),r=this.disconnReceiver_(this.conn_);this.tx_=this.conn_,this.rx_=this.conn_,this.secondaryConn_=null,this.isHealthy_=!1,setTimeout(()=>{this.conn_&&this.conn_.open(n,r)},Math.floor(0));const s=e.healthyTimeout||0;s>0&&(this.healthyTimeout_=Hl(()=>{this.healthyTimeout_=null,this.isHealthy_||(this.conn_&&this.conn_.bytesReceived>Vz?(this.log_("Connection exceeded healthy timeout but has received "+this.conn_.bytesReceived+" bytes. Marking connection healthy."),this.isHealthy_=!0,this.conn_.markConnectionHealthy()):this.conn_&&this.conn_.bytesSent>Bz?this.log_("Connection exceeded healthy timeout but has sent "+this.conn_.bytesSent+" bytes. Leaving connection alive."):(this.log_("Closing unhealthy connection after timeout."),this.close()))},Math.floor(s)))}nextTransportId_(){return"c:"+this.id+":"+this.connectionCount++}disconnReceiver_(e){return n=>{e===this.conn_?this.onConnectionLost_(n):e===this.secondaryConn_?(this.log_("Secondary connection lost."),this.onSecondaryConnectionLost_()):this.log_("closing an old connection")}}connReceiver_(e){return n=>{this.state_!==2&&(e===this.rx_?this.onPrimaryMessageReceived_(n):e===this.secondaryConn_?this.onSecondaryMessageReceived_(n):this.log_("message on old connection"))}}sendRequest(e){const n={t:"d",d:e};this.sendData_(n)}tryCleanupConnection(){this.tx_===this.secondaryConn_&&this.rx_===this.secondaryConn_&&(this.log_("cleaning up and promoting a connection: "+this.secondaryConn_.connId),this.conn_=this.secondaryConn_,this.secondaryConn_=null)}onSecondaryControl_(e){if(lm in e){const n=e[lm];n===R1?this.upgradeIfSecondaryHealthy_():n===P1?(this.log_("Got a reset on secondary, closing it"),this.secondaryConn_.close(),(this.tx_===this.secondaryConn_||this.rx_===this.secondaryConn_)&&this.close()):n===j1&&(this.log_("got pong on secondary."),this.secondaryResponsesRequired_--,this.upgradeIfSecondaryHealthy_())}}onSecondaryMessageReceived_(e){const n=fl("t",e),r=fl("d",e);if(n==="c")this.onSecondaryControl_(r);else if(n==="d")this.pendingDataMessages.push(r);else throw new Error("Unknown protocol layer: "+n)}upgradeIfSecondaryHealthy_(){this.secondaryResponsesRequired_<=0?(this.log_("Secondary connection is healthy."),this.isHealthy_=!0,this.secondaryConn_.markConnectionHealthy(),this.proceedWithUpgrade_()):(this.log_("sending ping on secondary."),this.secondaryConn_.send({t:"c",d:{t:D1,d:{}}}))}proceedWithUpgrade_(){this.secondaryConn_.start(),this.log_("sending client ack on secondary"),this.secondaryConn_.send({t:"c",d:{t:R1,d:{}}}),this.log_("Ending transmission on primary"),this.conn_.send({t:"c",d:{t:A1,d:{}}}),this.tx_=this.secondaryConn_,this.tryCleanupConnection()}onPrimaryMessageReceived_(e){const n=fl("t",e),r=fl("d",e);n==="c"?this.onControl_(r):n==="d"&&this.onDataMessage_(r)}onDataMessage_(e){this.onPrimaryResponse_(),this.onMessage_(e)}onPrimaryResponse_(){this.isHealthy_||(this.primaryResponsesRequired_--,this.primaryResponsesRequired_<=0&&(this.log_("Primary connection is healthy."),this.isHealthy_=!0,this.conn_.markConnectionHealthy()))}onControl_(e){const n=fl(lm,e);if(I1 in e){const r=e[I1];if(n===Wz){const s={...r};this.repoInfo_.isUsingEmulator&&(s.h=this.repoInfo_.host),this.onHandshake_(s)}else if(n===A1){this.log_("recvd end transmission on primary"),this.rx_=this.secondaryConn_;for(let s=0;s<this.pendingDataMessages.length;++s)this.onDataMessage_(this.pendingDataMessages[s]);this.pendingDataMessages=[],this.tryCleanupConnection()}else n===$z?this.onConnectionShutdown_(r):n===P1?this.onReset_(r):n===zz?py("Server Error: "+r):n===j1?(this.log_("got pong on primary."),this.onPrimaryResponse_(),this.sendPingOnPrimaryIfNecessary_()):py("Unknown control packet command: "+n)}}onHandshake_(e){const n=e.ts,r=e.v,s=e.h;this.sessionId=e.s,this.repoInfo_.host=s,this.state_===0&&(this.conn_.start(),this.onConnectionEstablished_(this.conn_,n),zx!==r&&nn("Protocol version mismatch detected"),this.tryStartUpgrade_())}tryStartUpgrade_(){const e=this.transportManager_.upgradeTransport();e&&this.startUpgrade_(e)}startUpgrade_(e){this.secondaryConn_=new e(this.nextTransportId_(),this.repoInfo_,this.applicationId_,this.appCheckToken_,this.authToken_,this.sessionId),this.secondaryResponsesRequired_=e.responsesRequiredToBeHealthy||0;const n=this.connReceiver_(this.secondaryConn_),r=this.disconnReceiver_(this.secondaryConn_);this.secondaryConn_.open(n,r),Hl(()=>{this.secondaryConn_&&(this.log_("Timed out trying to upgrade."),this.secondaryConn_.close())},Math.floor(Fz))}onReset_(e){this.log_("Reset packet received. New host: "+e),this.repoInfo_.host=e,this.state_===1?this.close():(this.closeConnections_(),this.start_())}onConnectionEstablished_(e,n){this.log_("Realtime connection established."),this.conn_=e,this.state_=1,this.onReady_&&(this.onReady_(n,this.sessionId),this.onReady_=null),this.primaryResponsesRequired_===0?(this.log_("Primary connection is healthy."),this.isHealthy_=!0):Hl(()=>{this.sendPingOnPrimaryIfNecessary_()},Math.floor(Uz))}sendPingOnPrimaryIfNecessary_(){!this.isHealthy_&&this.state_===1&&(this.log_("sending ping on primary."),this.sendData_({t:"c",d:{t:D1,d:{}}}))}onSecondaryConnectionLost_(){const e=this.secondaryConn_;this.secondaryConn_=null,(this.tx_===e||this.rx_===e)&&this.close()}onConnectionLost_(e){this.conn_=null,!e&&this.state_===0?(this.log_("Realtime connection failed."),this.repoInfo_.isCacheableHost()&&(Ri.remove("host:"+this.repoInfo_.host),this.repoInfo_.internalHost=this.repoInfo_.host)):this.state_===1&&this.log_("Realtime connection lost."),this.close()}onConnectionShutdown_(e){this.log_("Connection shutdown command received. Shutting down..."),this.onKill_&&(this.onKill_(e),this.onKill_=null),this.onDisconnect_=null,this.close()}sendData_(e){if(this.state_!==1)throw"Connection is not connected";this.tx_.send(e)}close(){this.state_!==2&&(this.log_("Closing realtime connection."),this.state_=2,this.closeConnections_(),this.onDisconnect_&&(this.onDisconnect_(),this.onDisconnect_=null))}closeConnections_(){this.log_("Shutting down all connections"),this.conn_&&(this.conn_.close(),this.conn_=null),this.secondaryConn_&&(this.secondaryConn_.close(),this.secondaryConn_=null),this.healthyTimeout_&&(clearTimeout(this.healthyTimeout_),this.healthyTimeout_=null)}}/** 1006 * @license 1007 * Copyright 2017 Google LLC 1008 * 1009 * Licensed under the Apache License, Version 2.0 (the "License"); 1010 * you may not use this file except in compliance with the License. 1011 * You may obtain a copy of the License at 1012 * 1013 * http://www.apache.org/licenses/LICENSE-2.0 1014 * 1015 * Unless required by applicable law or agreed to in writing, softw
1015are 1016 * distributed under the License is distributed on an "AS IS" BASIS, 1017 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1018 * See the License for the specific language governing permissions and 1019 * limitations under the License. 1020 */class yP{put(e,n,r,s){}merge(e,n,r,s){}refreshAuthToken(e){}refreshAppCheckToken(e){}onDisconnectPut(e,n,r){}onDisconnectMerge(e,n,r){}onDisconnectCancel(e,n){}reportStats(e){}}/** 1021 * @license 1022 * Copyright 2017 Google LLC 1023 * 1024 * Licensed under the Apache License, Version 2.0 (the "License"); 1025 * you may not use this file except in compliance with the License. 1026 * You may obtain a copy of the License at 1027 * 1028 * http://www.apache.org/licenses/LICENSE-2.0 1029 * 1030 * Unless required by applicable law or agreed to in writing, software 1031 * distributed under the License is distributed on an "AS IS" BASIS, 1032 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1033 * See the License for the specific language governing permissions and 1034 * limitations under the License. 1035 */class vP{constructor(e){this.allowedEvents_=e,this.listeners_={},$(Array.isArray(e)&&e.length>0,"Requires a non-empty array")}trigger(e,...n){if(Array.isArray(this.listeners_[e])){const r=[...this.listeners_[e]];for(let s=0;s<r.length;s++)r[s].callback.apply(r[s].context,n)}}on(e,n,r){this.validateEventType_(e),this.listeners_[e]=this.listeners_[e]||[],this.listeners_[e].push({callback:n,context:r});const s=this.getInitialEvent(e);s&&n.apply(r,s)}off(e,n,r){this.validateEventType_(e);const s=this.listeners_[e]||[];for(let i=0;i<s.length;i++)if(s[i].callback===n&&(!r||r===s[i].context)){s.splice(i,1);return}}validateEventType_(e){$(this.allowedEvents_.find(n=>n===e),"Unknown event: "+e)}}/** 1036 * @license 1037 * Copyright 2017 Google LLC 1038 * 1039 * Licensed under the Apache License, Version 2.0 (the "License"); 1040 * you may not use this file except in compliance with the License. 1041 * You may obtain a copy of the License at 1042 * 1043 * http://www.apache.org/licenses/LICENSE-2.0 1044 * 1045 * Unless required by applicable law or agreed to in writing, software 1046 * distributed under the License is distributed on an "AS IS" BASIS, 1047 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1048 * See the License for the specific language governing permissions and 1049 * limitations under the License. 1050 */class wh extends vP{static getInstance(){return new wh}constructor(){super(["online"]),this.online_=!0,typeof window<"u"&&typeof window.addEventListener<"u"&&!Lx()&&(window.addEventListener("online",()=>{this.online_||(this.online_=!0,this.trigger("online",!0))},!1),window.addEventListener("offline",()=>{this.online_&&(this.online_=!1,this.trigger("online",!1))},!1))}getInitialEvent(e){return $(e==="online","Unknown event type: "+e),[this.online_]}currentlyOnline(){return this.online_}}/** 1051 * @license 1052 * Copyright 2017 Google LLC 1053 * 1054 * Licensed under the Apache License, Version 2.0 (the "License"); 1055 * you may not use this file except in compliance with the License. 1056 * You may obtain a copy of the License at 1057 * 1058 * http://www.apache.org/licenses/LICENSE-2.0 1059 * 1060 * Unless required by applicable law or agreed to in writing, software 1061 * distributed under the License is distributed on an "AS IS" BASIS, 1062 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1063 * See the License for the specific language governing permissions and 1064 * limitations under the License. 1065 */const M1=32,O1=768;class Te{constructor(e,n){if(n===void 0){this.pieces_=e.split("/");let r=0;for(let s=0;s<this.pieces_.length;s++)this.pieces_[s].length>0&&(this.pieces_[r]=this.pieces_[s],r++);this.pieces_.length=r,this.pieceNum_=0}else this.pieces_=e,this.pieceNum_=n}toString(){let e="";for(let n=this.pieceNum_;n<this.pieces_.length;n++)this.pieces_[n]!==""&&(e+="/"+this.pieces_[n]);return e||"/"}}function we(){return new Te("")}function de(t){return t.pieceNum_>=t.pieces_.length?null:t.pieces_[t.pieceNum_]}function ai(t){return t.pieces_.length-t.pieceNum_}function Ie(t){let e=t.pieceNum_;return e<t.pieces_.length&&e++,new Te(t.pieces_,e)}function xP(t){return t.pieceNum_<t.pieces_.length?t.pieces_[t.pieces_.length-1]:null}function Kz(t){let e="";for(let n=t.pieceNum_;n<t.pieces_.length;n++)t.pieces_[n]!==""&&(e+="/"+encodeURIComponent(String(t.pieces_[n])));return e||"/"}function wP(t,e=0){return t.pieces_.slice(t.pieceNum_+e)}function bP(t){if(t.pieceNum_>=t.pieces_.length)return null;const e=[];for(let n=t.pieceNum_;n<t.pieces_.length-1;n++)e.push(t.pieces_[n]);return new Te(e,0)}function lt(t,e){const n=[];for(let r=t.pieceNum_;r<t.pieces_.length;r++)n.push(t.pieces_[r]);if(e instanceof Te)for(let r=e.pieceNum_;r<e.pieces_.length;r++)n.push(e.pieces_[r]);else{const r=e.split("/");for(let s=0;s<r.length;s++)r[s].length>0&&n.push(r[s])}return new Te(n,0)}function fe(t){return t.pieceNum_>=t.pieces_.length}function $t(t,e){const n=de(t),r=de(e);if(n===null)return e;if(n===r)return $t(Ie(t),Ie(e));
vendor: 11,915 bytes, lines 1065-1096
1065throw new Error("INTERNAL ERROR: innerPath ("+e+") is not within outerPath ("+t+")")}function Kx(t,e){if(ai(t)!==ai(e))return!1;for(let n=t.pieceNum_,r=e.pieceNum_;n<=t.pieces_.length;n++,r++)if(t.pieces_[n]!==e.pieces_[r])return!1;return!0}function qn(t,e){let n=t.pieceNum_,r=e.pieceNum_;if(ai(t)>ai(e))return!1;for(;n<t.pieces_.length;){if(t.pieces_[n]!==e.pieces_[r])return!1;++n,++r}return!0}class Gz{constructor(e,n){this.errorPrefix_=n,this.parts_=wP(e,0),this.byteLength_=Math.max(1,this.parts_.length);for(let r=0;r<this.parts_.length;r++)this.byteLength_+=Sf(this.parts_[r]);_P(this)}}function qz(t,e){t.parts_.length>0&&(t.byteLength_+=1),t.parts_.push(e),t.byteLength_+=Sf(e),_P(t)}function Yz(t){const e=t.parts_.pop();t.byteLength_-=Sf(e),t.parts_.length>0&&(t.byteLength_-=1)}function _P(t){if(t.byteLength_>O1)throw new Error(t.errorPrefix_+"has a key path longer than "+O1+" bytes ("+t.byteLength_+").");if(t.parts_.length>M1)throw new Error(t.errorPrefix_+"path specified exceeds the maximum depth that can be written ("+M1+") or object contains a cycle "+Ci(t))}function Ci(t){return t.parts_.length===0?"":"in property '"+t.parts_.join(".")+"'"}/** 1066 * @license 1067 * Copyright 2017 Google LLC 1068 * 1069 * Licensed under the Apache License, Version 2.0 (the "License"); 1070 * you may not use this file except in compliance with the License. 1071 * You may obtain a copy of the License at 1072 * 1073 * http://www.apache.org/licenses/LICENSE-2.0 1074 * 1075 * Unless required by applicable law or agreed to in writing, software 1076 * distributed under the License is distributed on an "AS IS" BASIS, 1077 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1078 * See the License for the specific language governing permissions and 1079 * limitations under the License. 1080 */class Gx extends vP{static getInstance(){return new Gx}constructor(){super(["visible"]);let e,n;typeof document<"u"&&typeof document.addEventListener<"u"&&(typeof document.hidden<"u"?(n="visibilitychange",e="hidden"):typeof document.mozHidden<"u"?(n="mozvisibilitychange",e="mozHidden"):typeof document.msHidden<"u"?(n="msvisibilitychange",e="msHidden"):typeof document.webkitHidden<"u"&&(n="webkitvisibilitychange",e="webkitHidden")),this.visible_=!0,n&&document.addEventListener(n,()=>{const r=!document[e];r!==this.visible_&&(this.visible_=r,this.trigger("visible",r))},!1)}getInitialEvent(e){return $(e==="visible","Unknown event type: "+e),[this.visible_]}}/** 1081 * @license 1082 * Copyright 2017 Google LLC 1083 * 1084 * Licensed under the Apache License, Version 2.0 (the "License"); 1085 * you may not use this file except in compliance with the License. 1086 * You may obtain a copy of the License at 1087 * 1088 * http://www.apache.org/licenses/LICENSE-2.0 1089 * 1090 * Unless required by applicable law or agreed to in writing, software 1091 * distributed under the License is distributed on an "AS IS" BASIS, 1092 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1093 * See the License for the specific language governing permissions and 1094 * limitations under the License. 1095 */const pl=1e3,Qz=60*5*1e3,L1=30*1e3,Xz=1.3,Jz=3e4,Zz="server_kill",F1=3;class Wr extends yP{constructor(e,n,r,s,i,o,a,c){if(super(),this.repoInfo_=e,this.applicationId_=n,this.onDataUpdate_=r,this.onConnectStatus_=s,this.onServerInfoUpdate_=i,this.authTokenProvider_=o,this.appCheckTokenProvider_=a,this.authOverride_=c,this.id=Wr.nextPersistentConnectionId_++,this.log_=tu("p:"+this.id+":"),this.interruptReasons_={},this.listens=new Map,this.outstandingPuts_=[],this.outstandingGets_=[],this.outstandingPutCount_=0,this.outstandingGetCount_=0,this.onDisconnectRequestQueue_=[],this.connected_=!1,this.reconnectDelay_=pl,this.maxReconnectDelay_=Qz,this.securityDebugCallback_=null,this.lastSessionId=null,this.establishConnectionTimer_=null,this.visible_=!1,this.requestCBHash_={},this.requestNumber_=0,this.realtime_=null,this.authToken_=null,this.appCheckToken_=null,this.forceTokenRefresh_=!1,this.invalidAuthTokenCount_=0,this.invalidAppCheckTokenCount_=0,this.firstConnection_=!0,this.lastConnectionAttemptTime_=null,this.lastConnectionEstablishedTime_=null,c&&!$I())throw new Error("Auth override specified in options, but not supported on non Node.js platforms");Gx.getInstance().on("visible",this.onVisible_,this),e.host.indexOf("fblocal")===-1&&wh.getInstance().on("online",this.onOnline_,this)}sendRequest(e,n,r){const s=++this.requestNumber_,i={r:s,a:e,b:n};this.log_(at(i)),$(this.connected_,"sendRequest call when we're not connected not allowed."),this.realtime_.sendRequest(i),r&&(this.requestCBHash_[s]=r)}get(e){this.initConnection_();const n=new Cf,s={action:"g",request:{p:e._path.toString(),q:e._queryObject},onComplete:o=>{const a=o.d;o.s==="ok"?n.resolve(a):n.reject(a)}};this.outstandingGets_.push(s),this.outstandingGetCount_++;const i=this.outstandingGets_.length-1;return this.connected_&&this.sendGet_(i),n.promise}listen(e,n,r,s){this.initConnection_();const i=e._queryIdentifier,o=e._path.toString();this.log_("Listen called for "+o+" "+i),this.listens.has(o)||this.listens.set(o,new Map),$(e._queryParams.isDefault()||!e._queryParams.loadsAllData(),"listen() called for non-default but complete query"),$(!this.listens.get(o).has(i),"listen() called twice for same path/queryId.");const a={onComplete:s,hashFn:n,query:e,tag:r};this.listens.get(o).set(i,a),this.connected_&&this.sendListen_(a)}sendGet_(e){const n=this.outstandingGets_[e];this.sendRequest("g",n.request,r=>{delete this.outstandingGets_[e],this.outstandingGetCount_--,this.outstandingGetCount_===0&&(this.outstandingGets_=[]),n.onComplete&&n.onComplete(r)})}sendListen_(e){const n=e.query,r=n._path.toString(),s=n._queryIdentifier;this.log_("Listen on "+r+" for "+s);const i={p:r},o="q";e.tag&&(i.q=n._queryObject,i.t=e.tag),i.h=e.hashFn(),this.sendRequest(o,i,a=>{const c=a.d,u=a.s;Wr.warnOnListenWarnings_(c,n),(this.listens.get(r)&&this.listens.get(r).get(s))===e&&(this.log_("listen response",a),u!=="ok"&&this.removeListen_(r,s),e.onComplete&&e.onComplete(u,c))})}static warnOnListenWarnings_(e,n){if(e&&typeof e=="object"&&is(e,"w")){const r=Sa(e,"w");if(Array.isArray(r)&&~r.indexOf("no_index")){const s='".indexOn": "'+n._queryParams.getIndex().toString()+'"',i=n._path.toString();nn(`Using an unspecified index. Your data will be downloaded and filtered on the client. Consider adding ${s} at ${i} to your security rules for better performance.`)}}}refreshAuthToken(e){this.authToken_=e,this.log_("Auth token refreshed"),this.authToken_?this.tryAuth():this.connected_&&this.sendRequest("unauth",{},()=>{}),this.reduceReconnectDelayIfAdminCredential_(e)}reduceReconnectDelayIfAdminCredential_(e){(e&&e.length===40||V8(e))&&(this.log_("Admin auth credential detected. Reducing max reconnect time."),this.maxReconnectDelay_=L1)}refreshAppCheckToken(e){this.appCheckToken_=e,this.log_("App check token refreshed"),this.appCheckToken_?this.tryAppCheck():this.connected_&&this.sendRequest("unappeck",{},()=>{})}tryAuth(){if(this.connected_&&this.authToken_){const e=this.authToken_,n=B8(e)?"auth":"gauth",r={cred:e};this.authOverride_===null?r.noauth=!0:typeof this.authOverride_=="object"&&(r.authvar=this.authOverride_),this.sendRequest(n,r,s=>{const i=s.s,o=s.d||"error";this.authToken_===e&&(i==="ok"?this.invalidAuthTokenCount_=0:this.onAuthRevoked_(i,o))})}}tryAppCheck(){this.connected_&&this.appCheckToken_&&this.sendRequest("appcheck",{token:this.appCheckToken_},e=>{const n=e.s,r=e.d||"error";n==="ok"?this.invalidAppCheckTokenCount_=0:this.onAppCheckRevoked_(n,r)})}unlisten(e,n){const r=e._path.toString(),s=e._queryIdentifier;this.log_("Unlisten called for "+r+" "+s),$(e._queryParams.isDefault()||!e._queryParams.loadsAllData(),"unlisten() called for non-default but complete query"),this.removeListen_(r,s)&&this.connected_&&this.sendUnlisten_(r,s,e._queryObject,n)}sendUnlisten_(e,n,r,s){this.log_("Unlisten on "+e+" for "+n);const i={p:e},o="n";s&&(i.q=r,i.t=s),this.sendRequest(o,i)}onDisconnectPut(e,n,r){this.initConnection_(),this.connected_?this.sendOnDisconnect_("o",e,n,r):this.onDisconnectRequestQueue_.push({pathString:e,action:"o",data:n,onComplete:r})}onDisconnectMerge(e,n,r){this.initConnection_(),this.connected_?this.sendOnDisconnect_("om",e,n,r):this.onDisconnectRequestQueue_.push({pathString:e,action:"om",data:n,onComplete:r})}onDisconnectCancel(e,n){this.initConnection_(),this.connected_?this.sendOnDisconnect_("oc",e,null,n):this.onDisconnectRequestQueue_.push({pathString:e,action:"oc",data:null,onComplete:n})}sendOnDisconnect_(e,n,r,s){const i={p:n,d:r};this.log_("onDisconnect "+e,i),this.sendRequest(e,i,o=>{s&&setTimeout(()=>{s(o.s,o.d)},Math.floor(0))})}put(e,n,r,s){this.putInternal("p",e,n,r,s)}merge(e,n,r,s){this.putInternal("m",e,n,r,s)}putInternal(e,n,r,s,i){this.initConnection_();const o={p:n,d:r};i!==void 0&&(o.h=i),this.outstandingPuts_.push({action:e,request:o,onComplete:s}),this.outstandingPutCount_++;const a=this.outstandingPuts_.length-1;this.connected_?this.sendPut_(a):this.log_("Buffering put: "+n)}sendPut_(e){const n=this.outstandingPuts_[e].action,r=this.outstandingPuts_[e].request,s=this.outstandingPuts_[e].onComplete;this.outstandingPuts_[e].queued=this.connected_,this.sendRequest(n,r,i=>{this.log_(n+" response",i),delete this.outstandingPuts_[e],this.outstandingPutCount_--,this.outstandingPutCount_===0&&(this.outstandingPuts_=[]),s&&s(i.s,i.d)})}reportStats(e){if(this.connected_){const n={c:e};this.log_("reportStats",n),this.sendRequest("s",n,r=>{if(r.s!=="ok"){const i=r.d;this.log_("reportStats","Error sending stats: "+i)}})}}onDataMessage_(e){if("r"in e){this.log_("from server: "+at(e));const n=e.r,r=this.requestCBHash_[n];r&&(delete this.requestCBHash_[n],r(e.b))}else{if("error"in e)throw"A server-side error has occurred: "+e.error;"a"in e&&this.onDataPush_(e.a,e.b)}}onDataPush_(e,n){this.log_("handleServerMessage",e,n),e==="d"?this.onDataUpdate_(n.p,n.d,!1,n.t):e==="m"?this.onDataUpdate_(n.p,n.d,!0,n.t):e==="c"?this.onListenRevoked_(n.p,n.q):e==="ac"?this.onAuthRevoked_(n.s,n.d):e==="apc"?this.onAppCheckRevoked_(n.s,n.d):e==="sd"?this.onSecurityDebugPacket_(n):py("Unrecognized action received from server: "+at(e)+` 1096Are you using the latest client?`)}onReady_(e,n){this.log_("connection ready"),this.connected_=!0,this.lastConnectionEstablishedTime_=new Date().getTime(),this.handleTimestamp_(e),this.lastSessionId=n,this.firstConnection_&&this.sendConnectStats_(),this.restoreState_(),this.firstConnection_=!1,this.onConnectStatus_(!0)}scheduleConnect_(e){$(!this.realtime_,"Scheduling a connect when we're already connected/ing?"),this.establishConnectionTimer_&&clearTimeout(this.establishConnectionTimer_),this.establishConnectionTimer_=setTimeout(()=>{this.establishConnectionTimer_=null,this.establishConnection_()},Math.floor(e))}initConnection_(){!this.realtime_&&this.firstConnection_&&this.scheduleConnect_(0)}onVisible_(e){e&&!this.visible_&&this.reconnectDelay_===this.maxReconnectDelay_&&(this.log_("Window became visible. Reducing delay."),this.reconnectDelay_=pl,this.realtime_||this.scheduleConnect_(0)),this.visible_=e}onOnline_(e){e?(this.log_("Browser went online."),this.reconnectDelay_=pl,this.realtime_||this.scheduleConnect_(0)):(this.log_("Browser went offline. Killing connection."),this.realtime_&&this.realtime_.close())}onRealtimeDisconnect_(){if(this.log_("data client disconnected"),this.connected_=!1,this.realtime_=null,this.cancelSentTransactions_(),this.requestCBHash_={},this.shouldReconnect_()){this.visible_?this.lastConnectionEstablishedTime_&&(new Date().getTime()-this.lastConnectionEstablishedTime_>Jz&&(this.reconnectDelay_=pl),this.lastConnectionEstablishedTime_=null):(this.log_("Window isn't visible. Delaying reconnect."),this.reconnectDelay_=this.maxReconnectDelay_,this.lastConnectionAttemptTime_=new Date().getTime());const e=Math.max(0,new Date().getTime()-this.lastConnectionAttemptTime_);let n=Math.max(0,this.reconnectDelay_-e);
1096n=Math.random()*n,this.log_("Trying to reconnect in "+n+"ms"),this.scheduleConnect_(n),this.reconnectDelay_=Math.min(this.maxReconnectDelay_,this.reconnectDelay_*Xz)}this.onConnectStatus_(!1)}async establishConnection_(){if(this.shouldReconnect_()){this.log_("Making a connection attempt"),this.lastConnectionAttemptTime_=new Date().getTime(),this.lastConnectionEstablishedTime_=null;const e=this.onDataMessage_.bind(this),n=this.onReady_.bind(this),r=this.onRealtimeDisconnect_.bind(this),s=this.id+":"+Wr.nextConnectionId_++,i=this.lastSessionId;let o=!1,a=null;const c=function(){a?a.close():(o=!0,r())},u=function(h){$(a,"sendRequest call when we're not connected not allowed."),a.sendRequest(h)};this.realtime_={close:c,sendRequest:u};const d=this.forceTokenRefresh_;this.forceTokenRefresh_=!1;try{const[h,f]=await Promise.all([this.authTokenProvider_.getToken(d),this.appCheckTokenProvider_.getToken(d)]);o?It("getToken() completed but was canceled"):(It("getToken() completed. Creating connection."),this.authToken_=h&&h.accessToken,this.appCheckToken_=f&&f.token,a=new Hz(s,this.repoInfo_,this.applicationId_,this.appCheckToken_,this.authToken_,e,n,r,p=>{nn(p+" ("+this.repoInfo_.toString()+")"),this.interrupt(Zz)},i))}catch(h){this.log_("Failed to get token: "+h),o||(this.repoInfo_.nodeAdmin&&nn(h),c())}}}interrupt(e){It("Interrupting connection for reason: "+e),this.interruptReasons_[e]=!0,this.realtime_?this.realtime_.close():(this.establishConnectionTimer_&&(clearTimeout(this.establishConnectionTimer_),this.establishConnectionTimer_=null),this.connected_&&this.onRealtimeDisconnect_())}resume(e){It("Resuming connection for reason: "+e),delete this.interruptReasons_[e],ly(this.interruptReasons_)&&(this.reconnectDelay_=pl,this.realtime_||this.scheduleConnect_(0))}handleTimestamp_(e){const n=e-new Date().getTime();this.onServerInfoUpdate_({serverTimeOffset:n})}cancelSentTransactions_(){for(let e=0;e<this.outstandingPuts_.length;e++){const n=this.outstandingPuts_[e];n&&"h"in n.request&&n.queued&&(n.onComplete&&n.onComplete("disconnect"),delete this.outstandingPuts_[e],this.outstandingPutCount_--)}this.outstandingPutCount_===0&&(this.outstandingPuts_=[])}onListenRevoked_(e,n){let r;n?r=n.map(i=>$x(i)).join("$"):r="default";const s=this.removeListen_(e,r);s&&s.onComplete&&s.onComplete("permission_denied")}removeListen_(e,n){const r=new Te(e).toString();let s;if(this.listens.has(r)){const i=this.listens.get(r);s=i.get(n),i.delete(n),i.size===0&&this.listens.delete(r)}else s=void 0;return s}onAuthRevoked_(e,n){It("Auth token revoked: "+e+"/"+n),this.authToken_=null,this.forceTokenRefresh_=!0,this.realtime_.close(),(e==="invalid_token"||e==="permission_denied")&&(this.invalidAuthTokenCount_++,this.invalidAuthTokenCount_>=F1&&(this.reconnectDelay_=L1,this.authTokenProvider_.notifyForInvalidToken()))}onAppCheckRevoked_(e,n){It("App check token revoked: "+e+"/"+n),this.appCheckToken_=null,this.forceTokenRefresh_=!0,(e==="invalid_token"||e==="permission_denied")&&(this.invalidAppCheckTokenCount_++,this.invalidAppCheckTokenCount_>=F1&&this.appCheckTokenProvider_.notifyForInvalidToken())}onSecurityDebugPacket_(e){this.securityDebugCallback_?this.securityDebugCallback_(e):"msg"in e&&console.log("FIREBASE: "+e.msg.replace(` 1097`,` 1098FIREBASE: `))}restoreState_(){this.tryAuth(),this.tryAppCheck();for(const e of this.listens.values())for(const n of e.values())this.sendListen_(n);for(let e=0;e<this.outstandingPuts_.length;e++)this.outstandingPuts_[e]&&this.sendPut_(e);for(;this.onDisconnectRequestQueue_.length;){const e=this.onDisconnectRequestQueue_.shift();this.sendOnDisconnect_(e.action,e.pathString,e.data,e.onComplete)}for(let e=0;e<this.outstandingGets_.length;e++)this.outstandingGets_[e]&&this.sendGet_(e)}sendConnectStats_(){const e={};let n="js";e["sdk."+n+"."+YI.replace(/\./g,"-")]=1,Lx()?e["framework.cordova"]=1:VI()&&(e["framework.reactnative"]=1),this.reportStats(e)}shouldReconnect_(){const e=wh.getInstance().currentlyOnline();return ly(this.interruptReasons_)&&e}}Wr.nextPersistentConnectionId_=0;Wr.nextConnectionId_=0;/** 1099 * @license 1100 * Copyright 2017 Google LLC 1101 * 1102 * Licensed under the Apache License, Version 2.0 (the "License");
vendor: 11,989 bytes, lines 1103-1203
1103 * you may not use this file except in compliance with the License. 1104 * You may obtain a copy of the License at 1105 * 1106 * http://www.apache.org/licenses/LICENSE-2.0 1107 * 1108 * Unless required by applicable law or agreed to in writing, software 1109 * distributed under the License is distributed on an "AS IS" BASIS, 1110 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1111 * See the License for the specific language governing permissions and 1112 * limitations under the License. 1113 */class he{constructor(e,n){this.name=e,this.node=n}static Wrap(e,n){return new he(e,n)}}/** 1114 * @license 1115 * Copyright 2017 Google LLC 1116 * 1117 * Licensed under the Apache License, Version 2.0 (the "License"); 1118 * you may not use this file except in compliance with the License. 1119 * You may obtain a copy of the License at 1120 * 1121 * http://www.apache.org/licenses/LICENSE-2.0 1122 * 1123 * Unless required by applicable law or agreed to in writing, software 1124 * distributed under the License is distributed on an "AS IS" BASIS, 1125 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1126 * See the License for the specific language governing permissions and 1127 * limitations under the License. 1128 */let Tf=class{getCompare(){return this.compare.bind(this)}indexedValueChanged(e,n){const r=new he(Na,e),s=new he(Na,n);return this.compare(r,s)!==0}minPost(){return he.MIN}};/** 1129 * @license 1130 * Copyright 2017 Google LLC 1131 * 1132 * Licensed under the Apache License, Version 2.0 (the "License"); 1133 * you may not use this file except in compliance with the License. 1134 * You may obtain a copy of the License at 1135 * 1136 * http://www.apache.org/licenses/LICENSE-2.0 1137 * 1138 * Unless required by applicable law or agreed to in writing, software 1139 * distributed under the License is distributed on an "AS IS" BASIS, 1140 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1141 * See the License for the specific language governing permissions and 1142 * limitations under the License. 1143 */let Bu;class kP extends Tf{static get __EMPTY_NODE(){return Bu}static set __EMPTY_NODE(e){Bu=e}compare(e,n){return qa(e.name,n.name)}isDefinedOn(e){throw Ka("KeyIndex.isDefinedOn not expected to be called.")}indexedValueChanged(e,n){return!1}minPost(){return he.MIN}maxPost(){return new he(eo,Bu)}makePost(e,n){return $(typeof e=="string","KeyIndex indexValue must always be a string."),new he(e,Bu)}toString(){return".key"}}const na=new kP;/** 1144 * @license 1145 * Copyright 2017 Google LLC 1146 * 1147 * Licensed under the Apache License, Version 2.0 (the "License"); 1148 * you may not use this file except in compliance with the License. 1149 * You may obtain a copy of the License at 1150 * 1151 * http://www.apache.org/licenses/LICENSE-2.0 1152 * 1153 * Unless required by applicable law or agreed to in writing, software 1154 * distributed under the License is distributed on an "AS IS" BASIS, 1155 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1156 * See the License for the specific language governing permissions and 1157 * limitations under the License. 1158 */class Vu{constructor(e,n,r,s,i=null){this.isReverse_=s,this.resultGenerator_=i,this.nodeStack_=[];let o=1;for(;!e.isEmpty();)if(e=e,o=n?r(e.key,n):1,s&&(o*=-1),o<0)this.isReverse_?e=e.left:e=e.right;else if(o===0){this.nodeStack_.push(e);break}else this.nodeStack_.push(e),this.isReverse_?e=e.right:e=e.left}getNext(){if(this.nodeStack_.length===0)return null;let e=this.nodeStack_.pop(),n;if(this.resultGenerator_?n=this.resultGenerator_(e.key,e.value):n={key:e.key,value:e.value},this.isReverse_)for(e=e.left;!e.isEmpty();)this.nodeStack_.push(e),e=e.right;else for(e=e.right;!e.isEmpty();)this.nodeStack_.push(e),e=e.left;return n}hasNext(){return this.nodeStack_.length>0}peek(){if(this.nodeStack_.length===0)return null;const e=this.nodeStack_[this.nodeStack_.length-1];return this.resultGenerator_?this.resultGenerator_(e.key,e.value):{key:e.key,value:e.value}}}class pt{constructor(e,n,r,s,i){this.key=e,this.value=n,this.color=r??pt.RED,this.left=s??Xt.EMPTY_NODE,this.right=i??Xt.EMPTY_NODE}copy(e,n,r,s,i){return new pt(e??this.key,n??this.value,r??this.color,s??this.left,i??this.right)}count(){return this.left.count()+1+this.right.count()}isEmpty(){return!1}inorderTraversal(e){return this.left.inorderTraversal(e)||!!e(this.key,this.value)||this.right.inorderTraversal(e)}reverseTraversal(e){return this.right.reverseTraversal(e)||e(this.key,this.value)||this.left.reverseTraversal(e)}min_(){return this.left.isEmpty()?this:this.left.min_()}minKey(){return this.min_().key}maxKey(){return this.right.isEmpty()?this.key:this.right.maxKey()}insert(e,n,r){let s=this;const i=r(e,s.key);return i<0?s=s.copy(null,null,null,s.left.insert(e,n,r),null):i===0?s=s.copy(null,n,null,null,null):s=s.copy(null,null,null,null,s.right.insert(e,n,r)),s.fixUp_()}removeMin_(){if(this.left.isEmpty())return Xt.EMPTY_NODE;let e=this;return!e.left.isRed_()&&!e.left.left.isRed_()&&(e=e.moveRedLeft_()),e=e.copy(null,null,null,e.left.removeMin_(),null),e.fixUp_()}remove(e,n){let r,s;if(r=this,n(e,r.key)<0)!r.left.isEmpty()&&!r.left.isRed_()&&!r.left.left.isRed_()&&(r=r.moveRedLeft_()),r=r.copy(null,null,null,r.left.remove(e,n),null);else{if(r.left.isRed_()&&(r=r.rotateRight_()),!r.right.isEmpty()&&!r.right.isRed_()&&!r.right.left.isRed_()&&(r=r.moveRedRight_()),n(e,r.key)===0){if(r.right.isEmpty())return Xt.EMPTY_NODE;s=r.right.min_(),r=r.copy(s.key,s.value,null,null,r.right.removeMin_())}r=r.copy(null,null,null,null,r.right.remove(e,n))}return r.fixUp_()}isRed_(){return this.color}fixUp_(){let e=this;return e.right.isRed_()&&!e.left.isRed_()&&(e=e.rotateLeft_()),e.left.isRed_()&&e.left.left.isRed_()&&(e=e.rotateRight_()),e.left.isRed_()&&e.right.isRed_()&&(e=e.colorFlip_()),e}moveRedLeft_(){let e=this.colorFlip_();return e.right.left.isRed_()&&(e=e.copy(null,null,null,null,e.right.rotateRight_()),e=e.rotateLeft_(),e=e.colorFlip_()),e}moveRedRight_(){let e=this.colorFlip_();return e.left.left.isRed_()&&(e=e.rotateRight_(),e=e.colorFlip_()),e}rotateLeft_(){const e=this.copy(null,null,pt.RED,null,this.right.left);return this.right.copy(null,null,this.color,e,null)}rotateRight_(){const e=this.copy(null,null,pt.RED,this.left.right,null);return this.left.copy(null,null,this.color,null,e)}colorFlip_(){const e=this.left.copy(null,null,!this.left.color,null,null),n=this.right.copy(null,null,!this.right.color,null,null);return this.copy(null,null,!this.color,e,n)}checkMaxDepth_(){const e=this.check_();return Math.pow(2,e)<=this.count()+1}check_(){if(this.isRed_()&&this.left.isRed_())throw new Error("Red node has red child("+this.key+","+this.value+")");if(this.right.isRed_())throw new Error("Right child of ("+this.key+","+this.value+") is red");const e=this.left.check_();if(e!==this.right.check_())throw new Error("Black depths differ");return e+(this.isRed_()?0:1)}}pt.RED=!0;pt.BLACK=!1;class eW{copy(e,n,r,s,i){return this}insert(e,n,r){return new pt(e,n,null)}remove(e,n){return this}count(){return 0}isEmpty(){return!0}inorderTraversal(e){return!1}reverseTraversal(e){return!1}minKey(){return null}maxKey(){return null}check_(){return 0}isRed_(){return!1}}class Xt{constructor(e,n=Xt.EMPTY_NODE){this.comparator_=e,this.root_=n}insert(e,n){return new Xt(this.comparator_,this.root_.insert(e,n,this.comparator_).copy(null,null,pt.BLACK,null,null))}remove(e){return new Xt(this.comparator_,this.root_.remove(e,this.comparator_).copy(null,null,pt.BLACK,null,null))}get(e){let n,r=this.root_;for(;!r.isEmpty();){if(n=this.comparator_(e,r.key),n===0)return r.value;n<0?r=r.left:n>0&&(r=r.right)}return null}getPredecessorKey(e){let n,r=this.root_,s=null;for(;!r.isEmpty();)if(n=this.comparator_(e,r.key),n===0){if(r.left.isEmpty())return s?s.key:null;for(r=r.left;!r.right.isEmpty();)r=r.right;return r.key}else n<0?r=r.left:n>0&&(s=r,r=r.right);throw new Error("Attempted to find predecessor key for a nonexistent key. What gives?")}isEmpty(){return this.root_.isEmpty()}count(){return this.root_.count()}minKey(){return this.root_.minKey()}maxKey(){return this.root_.maxKey()}inorderTraversal(e){return this.root_.inorderTraversal(e)}reverseTraversal(e){return this.root_.reverseTraversal(e)}getIterator(e){return new Vu(this.root_,null,this.comparator_,!1,e)}getIteratorFrom(e,n){return new Vu(this.root_,e,this.comparator_,!1,n)}getReverseIteratorFrom(e,n){return new Vu(this.root_,e,this.comparator_,!0,n)}getReverseIterator(e){return new Vu(this.root_,null,this.comparator_,!0,e)}}Xt.EMPTY_NODE=new eW;/** 1159 * @license 1160 * Copyright 2017 Google LLC 1161 * 1162 * Licensed under the Apache License, Version 2.0 (the "License"); 1163 * you may not use this file except in compliance with the License. 1164 * You may obtain a copy of the License at 1165 * 1166 * http://www.apache.org/licenses/LICENSE-2.0 1167 * 1168 * Unless required by applicable law or agreed to in writing, software 1169 * distributed under the License is distributed on an "AS IS" BASIS, 1170 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1171 * See the License for the specific language governing permissions and 1172 * limitations under the License. 1173 */function tW(t,e){return qa(t.name,e.name)}function qx(t,e){return qa(t,e)}/** 1174 * @license 1175 * Copyright 2017 Google LLC 1176 * 1177 * Licensed under the Apache License, Version 2.0 (the "License"); 1178 * you may not use this file except in compliance with the License. 1179 * You may obtain a copy of the License at 1180 * 1181 * http://www.apache.org/licenses/LICENSE-2.0 1182 * 1183 * Unless required by applicable law or agreed to in writing, software 1184 * distributed under the License is distributed on an "AS IS" BASIS, 1185 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1186 * See the License for the specific language governing permissions and 1187 * limitations under the License. 1188 */let gy;function nW(t){gy=t}const EP=function(t){return typeof t=="number"?"number:"+eP(t):"string:"+t},CP=function(t){if(t.isLeafNode()){const e=t.val();$(typeof e=="string"||typeof e=="number"||typeof e=="object"&&is(e,".sv"),"Priority must be a string or number.")}else $(t===gy||t.isEmpty(),"priority of unexpected type.");$(t===gy||t.getPriority().isEmpty(),"Priority nodes can't have a priority of their own.")};/** 1189 * @license 1190 * Copyright 2017 Google LLC 1191 * 1192 * Licensed under the Apache License, Version 2.0 (the "License"); 1193 * you may not use this file except in compliance with the License. 1194 * You may obtain a copy of the License at 1195 * 1196 * http://www.apache.org/licenses/LICENSE-2.0 1197 * 1198 * Unless required by applicable law or agreed to in writing, software 1199 * distributed under the License is distributed on an "AS IS" BASIS, 1200 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1201 * See the License for the specific language governing permissions and 1202 * limitations under the License. 1203 */let U1;class ht{static set __childrenNodeConstructor(e){U1=e}static get __childrenNodeConstructor(){return U1}constructor(e,n=ht.__childrenNodeConstructor.EMPTY_NODE){this.value_=e,this.priorityNode_=n,this.lazyHash_=null,$(this.value_!==void 0&&this.value_!==null,"LeafNode shouldn't be created with null/undefined value."),CP(this.priorityNode_)}isLeafNode(){return!0}getPriority(){return this.priorityNode_}updatePriority(e){return new ht(this.value_,e)}getImmediateChild(e){return e===".priority"?this.priorityNode_:ht.__childrenNodeConstructor.EMPTY_NODE}getChild(e){return fe(e)?this:de(e)===".priority"?this.priorityNode_:ht.__childrenNodeConstructor.EMPTY_NODE}hasChild(){return!1}getPredecessorChildName(e,n){return null}updateImmediateChild(e,n){return e===".priority"?this.updatePriority(n):n.isEmpty()&&e!==".priority"?this:ht.__childrenNodeConstructor.EMPTY_NODE.updateImmediateChild(e,n).updatePriority(this.priorityNode_)}updateChild(e,n){const r=de(e);return r===null?n:n.isEmpty()&&r!==".priority"?this:($(r!==".priority"||ai(e)===1,".priority must be the last token in a path"),this.updateImmediateChild(r,ht.__childrenNodeConstructor.EMPTY_NODE.updateChild(Ie(e),n)))}isEmpty(){return!1}numChildren(){return 0}forEachChild(e,n){return!1}
1203val(e){return e&&!this.getPriority().isEmpty()?{".value":this.getValue(),".priority":this.getPriority().val()}:this.getValue()}hash(){if(this.lazyHash_===null){let e="";this.priorityNode_.isEmpty()||(e+="priority:"+EP(this.priorityNode_.val())+":");const n=typeof this.value_;e+=n+":",n==="number"?e+=eP(this.value_):e+=this.value_,this.lazyHash_=XI(e)}return this.lazyHash_}getValue(){return this.value_}compareTo(e){return e===ht.__childrenNodeConstructor.EMPTY_NODE?1:e instanceof ht.__childrenNodeConstructor?-1:($(e.isLeafNode(),"Unknown node type"),this.compareToLeafNode_(e))}compareToLeafNode_(e){const n=typeof e.value_,r=typeof this.value_,s=ht.VALUE_TYPE_ORDER.indexOf(n),i=ht.VALUE_TYPE_ORDER.indexOf(r);return $(s>=0,"Unknown leaf type: "+n),$(i>=0,"Unknown leaf type: "+r),s===i?r==="object"?0:this.value_<e.value_?-1:this.value_===e.value_?0:1:i-s}withIndex(){return this}isIndexed(){return!0}equals(e){if(e===this)return!0;if(e.isLeafNode()){const n=e;return this.value_===n.value_&&this.priorityNode_.equals(n.priorityNode_)}else return!1}}ht.VALUE_TYPE_ORDER=["object","boolean","number","string"];/** 1204 * @license 1205 * Copyright 2017 Google LLC 1206 * 1207 * Licensed under the Apache License, Version 2.0 (the "License"); 1208 * you may not use this file except in compliance with the License. 1209 * You may obtain a copy of the License at 1210 * 1211 * http://www.apache.org/licenses/LICENSE-2.0 1212 * 1213 * Unless required by applicable law or agreed to in writing, software 1214 * distributed under the License is distributed on an "AS IS" BASIS, 1215 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1216 * See the License for the specific language governing permissions and 1217 * limitations under the License. 1218 */let SP,NP;function rW(t){SP=t}function sW(t){NP=t}class iW extends Tf{compare(e,n){const r=e.node.getPriority(),s=n.node.getPriority(),i=r.compareTo(s);return i===0?qa(e.name,n.name):i}isDefinedOn(e){return!e.getPriority().isEmpty()}indexedValueChanged(e,n){return!e.getPriority().equals(n.getPriority())}minPost(){return he.MIN}maxPost(){return new he(eo,new ht("[PRIORITY-POST]",NP))}makePost(e,n){const r=SP(e);return new he(n,new ht("[PRIORITY-POST]",r))}toString(){return".priority"}}const qe=new iW;/** 1219 * @license 1220 * Copyright 2017 Google LLC 1221 * 1222 * Licensed under the Apache License, Version 2.0 (the "License"); 1223 * you may not use this file except in compliance with the License. 1224 * You may obtain a copy of the License at 1225 * 1226 * http://www.apache.org/licenses/LICENSE-2.0 1227 * 1228 * Unless required by applicable law or agreed to in writing, software 1229 * distributed under the License is distributed on an "AS IS" BASIS, 1230 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1231 * See the License for the specific language governing permissions and 1232 * limitations under the License. 1233 */const oW=Math.log(2);class aW{constructor(e){const n=i=>parseInt(Math.log(i)/oW,10),r=i=>parseInt(Array(i+1).join("1"),2);this.count=n(e+1),this.current_=this.count-1;const s=r(this.count);this.bits_=e+1&s}nextBitIsOne(){const e=!(this.bits_&1<<this.current_);return this.current_--,e}}const bh=function(t,e,n,r){t.sort(e);const s=function(c,u){const d=u-c;let h,f;if(d===0)return null;if(d===1)return h=t[c],f=n?n(h):h,new pt(f,h.node,pt.BLACK,null,null);{const p=parseInt(d/2,10)+c,x=s(c,p),g=s(p+1,u);return h=t[p],f=n?n(h):h,new pt(f,h.node,pt.BLACK,x,g)}},i=function(c){let u=null,d=null,h=t.length;const f=function(x,g){const y=h-x,w=h;h-=x;const v=s(y+1,w),b=t[y],_=n?n(b):b;p(new pt(_,b.node,g,null,v))},p=function(x){u?(u.left=x,u=x):(d=x,u=x)};for(let x=0;x<c.count;++x){const g=c.nextBitIsOne(),y=Math.pow(2,c.count-(x+1));g?f(y,pt.BLACK):(f(y,pt.BLACK),f(y,pt.RED))}return d},o=new aW(t.length),a=i(o);return new Xt(r||e,a)};/** 1234 * @license 1235 * Copyright 2017 Google LLC 1236 * 1237 * Licensed under the Apache License, Version 2.0 (the "License"); 1238 * you may not use this file except in compliance with the License. 1239 * You may obtain a copy of the License at 1240 * 1241 * http://www.apache.org/licenses/LICENSE-2.0 1242 * 1243 * Unless required by applicable law or agreed to in writing, softw
1243are 1244 * distributed under the License is distributed on an "AS IS" BASIS, 1245 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1246 * See the License for the specific language governing permissions and 1247 * limitations under the License. 1248 */let cm;const xo={};class Br{static get Default(){return $(xo&&qe,"ChildrenNode.ts has not been loaded"),cm=cm||new Br({".priority":xo},{".priority":qe}),cm}constructor(e,n){this.indexes_=e,this.indexSet_=n}get(e){const n=Sa(this.indexes_,e);if(!n)throw new Error("No index defined for "+e);return n instanceof Xt?n:null}hasIndex(e){return is(this.indexSet_,e.toString())}addIndex(e,n){$(e!==na,"KeyIndex always exists and isn't meant to be added to the IndexMap.");const r=[];let s=!1;const i=n.getIterator(he.Wrap);let o=i.getNext();for(;o;)s=s||e.isDefinedOn(o.node),r.push(o),o=i.getNext();let a;s?a=bh(r,e.getCompare()):a=xo;const c=e.toString(),u={...this.indexSet_};u[c]=e;const d={...this.indexes_};return d[c]=a,new Br(d,u)}addToIndexes(e,n){const r=yh(this.indexes_,(s,i)=>{const o=Sa(this.indexSet_,i);if($(o,"Missing index implementation for "+i),s===xo)if(o.isDefinedOn(e.node)){const a=[],c=n.getIterator(he.Wrap);let u=c.getNext();for(;u;)u.name!==e.name&&a.push(u),u=c.getNext();return a.push(e),bh(a,o.getCompare())}else return xo;else{const a=n.get(e.name);let c=s;return a&&(c=c.remove(new he(e.name,a))),c.insert(e,e.node)}});return new Br(r,this.indexSet_)}removeFromIndexes(e,n){const r=yh(this.indexes_,s=>{if(s===xo)return s;{const i=n.get(e.name);return i?s.remove(new he(e.name,i)):s}});return new Br(r,this.indexSet_)}}/** 1249 * @license 1250 * Copyright 2017 Google LLC 1251 * 1252 * Licensed under the Apache License, Version 2.0 (the "License"); 1253 * you may not use this file except in compliance with the License. 1254 * You may obtain a copy of the License at 1255 * 1256 * http://www.apache.org/licenses/LICENSE-2.0 1257 * 1258 * Unless required by applicable law or agreed to in writing, software 1259 * distributed under the License is distributed on an "AS IS" BASIS, 1260 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1261 * See the License for the specific language governing permissions and 1262 * limitations under the License. 1263 */let ml;class te{static get EMPTY_NODE(){return ml||(ml=new te(new Xt(qx),null,Br.Default))}constructor(e,n,r){this.children_=e,this.priorityNode_=n,this.indexMap_=r,this.lazyHash_=null,this.priorityNode_&&CP(this.priorityNode_),this.children_.isEmpty()&&$(!this.priorityNode_||this.priorityNode_.isEmpty(),"An empty node cannot have a priority")}isLeafNode(){return!1}getPriority(){return this.priorityNode_||ml}updatePriority(e){return this.children_.isEmpty()?this:new te(this.children_,e,this.indexMap_)}getImmediateChild(e){if(e===".priority")return this.getPriority();{const n=this.children_.get(e);return n===null?ml:n}}getChild(e){const n=de(e);return n===null?this:this.getImmediateChild(n).getChild(Ie(e))}hasChild(e){return this.children_.get(e)!==null}updateImmediateChild(e,n){if($(n,"We should always be passing snapshot nodes"),e===".priority")return this.updatePriority(n);{const r=new he(e,n);let s,i;n.isEmpty()?(s=this.children_.remove(e),i=this.indexMap_.removeFromIndexes(r,this.children_)):(s=this.children_.insert(e,n),i=this.indexMap_.addToIndexes(r,this.children_));const o=s.isEmpty()?ml:this.priorityNode_;return new te(s,o,i)}}updateChild(e,n){const r=de(e);if(r===null)return n;{$(de(e)!==".priority"||ai(e)===1,".priority must be the last token in a path");const s=this.getImmediateChild(r).updateChild(Ie(e),n);return this.updateImmediateChild(r,s)}}isEmpty(){return this.children_.isEmpty()}numChildren(){return this.children_.count()}val(e){if(this.isEmpty())return null;const n={};let r=0,s=0,i=!0;if(this.forEachChild(qe,(o,a)=>{n[o]=a.val(e),r++,i&&te.INTEGER_REGEXP_.test(o)?s=Math.max(s,Number(o)):i=!1}),!e&&i&&s<2*r){const o=[];for(const a in n)o[a]=n[a];return o}else return e&&!this.getPriority().isEmpty()&&(n[".priority"]=this.getPriority().val()),n}hash(){if(this.lazyHash_===null){let e="";
1263this.getPriority().isEmpty()||(e+="priority:"+EP(this.getPriority().val())+":"),this.forEachChild(qe,(n,r)=>{const s=r.hash();s!==""&&(e+=":"+n+":"+s)}),this.lazyHash_=e===""?"":XI(e)}return this.lazyHash_}getPredecessorChildName(e,n,r){const s=this.resolveIndex_(r);if(s){const i=s.getPredecessorKey(new he(e,n));return i?i.name:null}else return this.children_.getPredecessorKey(e)}getFirstChildName(e){const n=this.resolveIndex_(e);if(n){const r=n.minKey();return r&&r.name}else return this.children_.minKey()}getFirstChild(e){const n=this.getFirstChildName(e);return n?new he(n,this.children_.get(n)):null}getLastChildName(e){const n=this.resolveIndex_(e);if(n){const r=n.maxKey();return r&&r.name}else return this.children_.maxKey()}getLastChild(e){const n=this.getLastChildName(e);return n?new he(n,this.children_.get(n)):null}forEachChild(e,n){const r=this.resolveIndex_(e);return r?r.inorderTraversal(s=>n(s.name,s.node)):this.children_.inorderTraversal(n)}getIterator(e){return this.getIteratorFrom(e.minPost(),e)}getIteratorFrom(e,n){const r=this.resolveIndex_(n);if(r)return r.getIteratorFrom(e,s=>s);{const s=this.children_.getIteratorFrom(e.name,he.Wrap);let i=s.peek();for(;i!=null&&n.compare(i,e)<0;)s.getNext(),i=s.peek();return s}}getReverseIterator(e){return this.getReverseIteratorFrom(e.maxPost(),e)}getReverseIteratorFrom(e,n){const r=this.resolveIndex_(n);if(r)return r.getReverseIteratorFrom(e,s=>s);{const s=this.children_.getReverseIteratorFrom(e.name,he.Wrap);let i=s.peek();for(;i!=null&&n.compare(i,e)>0;)s.getNext(),i=s.peek();return s}}compareTo(e){return this.isEmpty()?e.isEmpty()?0:-1:e.isLeafNode()||e.isEmpty()?1:e===nu?-1:0}withIndex(e){if(e===na||this.indexMap_.hasIndex(e))return this;{const n=this.indexMap_.addIndex(e,this.children_);return new te(this.children_,this.priorityNode_,n)}}isIndexed(e){return e===na||this.indexMap_.hasIndex(e)}equals(e){if(e===this)return!0;if(e.isLeafNode())return!1;{const n=e;if(this.getPriority().equals(n.getPriority()))if(this.children_.count()===n.children_.count()){const r=this.getIterator(qe),s=n.getIterator(qe);let i=r.getNext(),o=s.getNext();for(;i&&o;){if(i.name!==o.name||!i.node.equals(o.node))return!1;i=r.getNext(),o=s.getNext()}return i===null&&o===null}else return!1;else return!1}}resolveIndex_(e){return e===na?null:this.indexMap_.get(e.toString())}}te.INTEGER_REGEXP_=/^(0|[1-9]\d*)$/;class lW extends te{constructor(){super(new Xt(qx),te.EMPTY_NODE,Br.Default)}compareTo(e){return e===this?0:1}equals(e){return e===this}getPriority(){return this}getImmediateChild(e){return te.EMPTY_NODE}isEmpty(){return!1}}const nu=new lW;Object.defineProperties(he,{MIN:{value:new he(Na,te.EMPTY_NODE)},MAX:{value:new he(eo,nu)}});kP.__EMPTY_NODE=te.EMPTY_NODE;ht.__childrenNodeConstructor=te;nW(nu);sW(nu);/** 1264 * @license 1265 * Copyright 2017 Google LLC 1266 * 1267 * Licensed under the Apache License, Version 2.0 (the "License"); 1268 * you may not use this file except in compliance with the License. 1269 * You may obtain a copy of the License at 1270 * 1271 * http://www.apache.org/licenses/LICENSE-2.0 1272 * 1273 * Unless required by applicable law or agreed to in writing, software 1274 * distributed under the License is distributed on an "AS IS" BASIS, 1275 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1276 * See the License for the specific language governing permissions and 1277 * limitations under the License. 1278 */const cW=!0;function mt(t,e=null){if(t===null)return te.EMPTY_NODE;if(typeof t=="object"&&".priority"in t&&(e=t[".priority"]),$(e===null||typeof e=="string"||typeof e=="number"||typeof e=="object"&&".sv"in e,"Invalid priority type found: "+typeof e),typeof t=="object"&&".value"in t&&t[".value"]!==null&&(t=t[".value"]),typeof t!="object"||".sv"in t){const n=t;return new ht(n,mt(e))}if(!(t instanceof Array)&&cW){const n=[];let r=!1;if(rn(t,(o,a)=>{if(o.substring(0,1)!=="."){const c=mt(a);c.isEmpty()||(r=r||!c.getPriority().isEmpty(),n.push(new he(o,c)))}}),n.length===0)return te.EMPTY_NODE;const i=bh(n,tW,o=>o.name,qx);if(r){const o=bh(n,qe.getCompare());return new te(i,mt(e),new Br({".priority":o},{".priority":qe}))}else return new te(i,mt(e),Br.Default)}else{let n=te.EMPTY_NODE;return rn(t,(r,s)=>{if(is(t,r)&&r.substring(0,1)!=="."){const i=mt(s);(i.isLeafNode()||!i.isEmpty())&&(n=n.updateImmediateChild(r,i))}}),n.updatePriority(mt(e))}}rW(mt);/** 1279 * @license 1280 * Copyright 2017 Google LLC 1281 * 1282 * Licensed under the Apache License, Version 2.0 (the "License");
1283 * you may not use this file except in compliance with the License. 1284 * You may obtain a copy of the License at 1285 * 1286 * http://www.apache.org/licenses/LICENSE-2.0 1287 * 1288 * Unless required by applicable law or agreed to in writing, software 1289 * distributed under the License is distributed on an "AS IS" BASIS, 1290 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1291 * See the License for the specific language governing permissions and 1292 * limitations under the License. 1293 */class uW extends Tf{constructor(e){super(),this.indexPath_=e,$(!fe(e)&&de(e)!==".priority","Can't create PathIndex with empty path or .priority key")}extractChild(e){return e.getChild(this.indexPath_)}isDefinedOn(e){return!e.getChild(this.indexPath_).isEmpty()}compare(e,n){const r=this.extractChild(e.node),s=this.extractChild(n.node),i=r.compareTo(s);return i===0?qa(e.name,n.name):i}makePost(e,n){const r=mt(e),s=te.EMPTY_NODE.updateChild(this.indexPath_,r);return new he(n,s)}maxPost(){const e=te.EMPTY_NODE.updateChild(this.indexPath_,nu);return new he(eo,e)}toString(){return wP(this.indexPath_,0).join("/")}}/** 1294 * @license 1295 * Copyright 2017 Google LLC 1296 * 1297 * Licensed under the Apache License, Version 2.0 (the "License"); 1298 * you may not use this file except in compliance with the License. 1299 * You may obtain a copy of the License at 1300 * 1301 * http://www.apache.org/licenses/LICENSE-2.0 1302 * 1303 * Unless required by applicable law or agreed to in writing, software 1304 * distributed under the License is distributed on an "AS IS" BASIS, 1305 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1306 * See the License for the specific language governing permissions and 1307 * limitations under the License. 1308 */class dW extends Tf{compare(e,n){const r=e.node.compareTo(n.node);return r===0?qa(e.name,n.name):r}isDefinedOn(e){return!0}indexedValueChanged(e,n){return!e.equals(n)}
vendor: 2,569 bytes, lines 1308-1338
1308minPost(){return he.MIN}maxPost(){return he.MAX}makePost(e,n){const r=mt(e);return new he(n,r)}toString(){return".value"}}const hW=new dW;/** 1309 * @license 1310 * Copyright 2017 Google LLC 1311 * 1312 * Licensed under the Apache License, Version 2.0 (the "License"); 1313 * you may not use this file except in compliance with the License. 1314 * You may obtain a copy of the License at 1315 * 1316 * http://www.apache.org/licenses/LICENSE-2.0 1317 * 1318 * Unless required by applicable law or agreed to in writing, software 1319 * distributed under the License is distributed on an "AS IS" BASIS, 1320 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1321 * See the License for the specific language governing permissions and 1322 * limitations under the License. 1323 */function TP(t){return{type:"value",snapshotNode:t}}function Ta(t,e){return{type:"child_added",snapshotNode:e,childName:t}}function Tc(t,e){return{type:"child_removed",snapshotNode:e,childName:t}}function Ic(t,e,n){return{type:"child_changed",snapshotNode:e,childName:t,oldSnap:n}}function fW(t,e){return{type:"child_moved",snapshotNode:e,childName:t}}/** 1324 * @license 1325 * Copyright 2017 Google LLC 1326 * 1327 * Licensed under the Apache License, Version 2.0 (the "License"); 1328 * you may not use this file except in compliance with the License. 1329 * You may obtain a copy of the License at 1330 * 1331 * http://www.apache.org/licenses/LICENSE-2.0 1332 * 1333 * Unless required by applicable law or agreed to in writing, software 1334 * distributed under the License is distributed on an "AS IS" BASIS, 1335 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1336 * See the License for the specific language governing permissions and 1337 * limitations under the License. 1338 */class Yx{constructor(e){this.index_=e}updateChild(e,n,r,s,i,o){$(e.isIndexed(this.index_),"A node must be indexed if only a child is updated");const a=e.getImmediateChild(n);return a.getChild(s).equals(r.getChild(s))&&a.isEmpty()===r.isEmpty()||(o!=null&&(r.isEmpty()?e.hasChild(n)?o.trackChildChange(Tc(n,a)):$(e.isLeafNode(),"A child remove without an old child only makes sense on a leaf node"):a.isEmpty()?o.trackChildChange(Ta(n,r)):o.trackChildChange(Ic(n,r,a))),e.isLeafNode()&&r.isEmpty())?e:e.updateImmediateChild(n,r).withIndex(this.index_)}updateFullNode(e,n,r){return r!=null&&(e.isLeafNode()||e.forEachChild(qe,(s,i)=>{n.hasChild(s)||r.trackChildChange(Tc(s,i))}),n.isLeafNode()||n.forEachChild(qe,(s,i)=>{if(e.hasChild(s)){const o=e.getImmediateChild(s);o.equals(i)||r.trackChildChange(Ic(s,i,o))}else r.trackChildChange(Ta(s,i))})),n.withIndex(this.index_)}
vendor: 1,728 bytes, lines 1338-1353
1338updatePriority(e,n){return e.isEmpty()?te.EMPTY_NODE:e.updatePriority(n)}filtersNodes(){return!1}getIndexedFilter(){return this}getIndex(){return this.index_}}/** 1339 * @license 1340 * Copyright 2017 Google LLC 1341 * 1342 * Licensed under the Apache License, Version 2.0 (the "License"); 1343 * you may not use this file except in compliance with the License. 1344 * You may obtain a copy of the License at 1345 * 1346 * http://www.apache.org/licenses/LICENSE-2.0 1347 * 1348 * Unless required by applicable law or agreed to in writing, software 1349 * distributed under the License is distributed on an "AS IS" BASIS, 1350 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1351 * See the License for the specific language governing permissions and 1352 * limitations under the License. 1353 */class Pc{constructor(e){this.indexedFilter_=new Yx(e.getIndex()),this.index_=e.getIndex(),this.startPost_=Pc.getStartPost_(e),this.endPost_=Pc.getEndPost_(e),this.startIsInclusive_=!e.startAfterSet_,this.endIsInclusive_=!e.endBeforeSet_}getStartPost(){return this.startPost_}getEndPost(){return this.endPost_}matches(e){const n=this.startIsInclusive_?this.index_.compare(this.getStartPost(),e)<=0:this.index_.compare(this.getStartPost(),e)<0,r=this.endIsInclusive_?this.index_.compare(e,this.getEndPost())<=0:this.index_.compare(e,this.getEndPost())<0;return n&&r}updateChild(e,n,r,s,i,o){return this.matches(new he(n,r))||(r=te.EMPTY_NODE),this.indexedFilter_.updateChild(e,n,r,s,i,o)}updateFullNode(e,n,r){n.isLeafNode()&&(n=te.EMPTY_NODE);let s=n.withIndex(this.index_);s=s.updatePriority(te.EMPTY_NODE);const i=this;return n.forEachChild(qe,(o,a)=>{i.matches(new he(o,a))||(s=s.updateImmediateChild(o,te.EMPTY_NODE))}),this.indexedFilter_.updateFullNode(e,s,r)}
vendor: 2,905 bytes, lines 1353-1368
1353updatePriority(e,n){return e}filtersNodes(){return!0}getIndexedFilter(){return this.indexedFilter_}getIndex(){return this.index_}static getStartPost_(e){if(e.hasStart()){const n=e.getIndexStartName();return e.getIndex().makePost(e.getIndexStartValue(),n)}else return e.getIndex().minPost()}static getEndPost_(e){if(e.hasEnd()){const n=e.getIndexEndName();return e.getIndex().makePost(e.getIndexEndValue(),n)}else return e.getIndex().maxPost()}}/** 1354 * @license 1355 * Copyright 2017 Google LLC 1356 * 1357 * Licensed under the Apache License, Version 2.0 (the "License"); 1358 * you may not use this file except in compliance with the License. 1359 * You may obtain a copy of the License at 1360 * 1361 * http://www.apache.org/licenses/LICENSE-2.0 1362 * 1363 * Unless required by applicable law or agreed to in writing, software 1364 * distributed under the License is distributed on an "AS IS" BASIS, 1365 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1366 * See the License for the specific language governing permissions and 1367 * limitations under the License. 1368 */class pW{constructor(e){this.withinDirectionalStart=n=>this.reverse_?this.withinEndPost(n):this.withinStartPost(n),this.withinDirectionalEnd=n=>this.reverse_?this.withinStartPost(n):this.withinEndPost(n),this.withinStartPost=n=>{const r=this.index_.compare(this.rangedFilter_.getStartPost(),n);return this.startIsInclusive_?r<=0:r<0},this.withinEndPost=n=>{const r=this.index_.compare(n,this.rangedFilter_.getEndPost());return this.endIsInclusive_?r<=0:r<0},this.rangedFilter_=new Pc(e),this.index_=e.getIndex(),this.limit_=e.getLimit(),this.reverse_=!e.isViewFromLeft(),this.startIsInclusive_=!e.startAfterSet_,this.endIsInclusive_=!e.endBeforeSet_}updateChild(e,n,r,s,i,o){return this.rangedFilter_.matches(new he(n,r))||(r=te.EMPTY_NODE),e.getImmediateChild(n).equals(r)?e:e.numChildren()<this.limit_?this.rangedFilter_.getIndexedFilter().updateChild(e,n,r,s,i,o):this.fullLimitUpdateChild_(e,n,r,i,o)}updateFullNode(e,n,r){let s;if(n.isLeafNode()||n.isEmpty())s=te.EMPTY_NODE.withIndex(this.index_);else if(this.limit_*2<n.numChildren()&&n.isIndexed(this.index_)){s=te.EMPTY_NODE.withIndex(this.index_);let i;this.reverse_?i=n.getReverseIteratorFrom(this.rangedFilter_.getEndPost(),this.index_):i=n.getIteratorFrom(this.rangedFilter_.getStartPost(),this.index_);let o=0;for(;i.hasNext()&&o<this.limit_;){const a=i.getNext();if(this.withinDirectionalStart(a))if(this.withinDirectionalEnd(a))s=s.updateImmediateChild(a.name,a.node),o++;else break;else continue}}else{s=n.withIndex(this.index_),s=s.updatePriority(te.EMPTY_NODE);let i;this.reverse_?i=s.getReverseIterator(this.index_):i=s.getIterator(this.index_);let o=0;for(;i.hasNext();){const a=i.getNext();o<this.limit_&&this.withinDirectionalStart(a)&&this.withinDirectionalEnd(a)?o++:s=s.updateImmediateChild(a.name,te.EMPTY_NODE)}}return this.rangedFilter_.getIndexedFilter().updateFullNode(e,s,r)}
1368updatePriority(e,n){return e}filtersNodes(){return!0}getIndexedFilter(){return this.rangedFilter_.getIndexedFilter()}getIndex(){return this.index_}fullLimitUpdateChild_(e,n,r,s,i){let o;if(this.reverse_){const h=this.index_.getCompare();o=(f,p)=>h(p,f)}else o=this.index_.getCompare();const a=e;$(a.numChildren()===this.limit_,"");const c=new he(n,r),u=this.reverse_?a.getFirstChild(this.index_):a.getLastChild(this.index_),d=this.rangedFilter_.matches(c);if(a.hasChild(n)){const h=a.getImmediateChild(n);let f=s.getChildAfterChild(this.index_,u,this.reverse_);for(;f!=null&&(f.name===n||a.hasChild(f.name));)f=s.getChildAfterChild(this.index_,f,this.reverse_);const p=f==null?1:o(f,c);if(d&&!r.isEmpty()&&p>=0)return i!=null&&i.trackChildChange(Ic(n,r,h)),a.updateImmediateChild(n,r);{i!=null&&i.trackChildChange(Tc(n,h));const g=a.updateImmediateChild(n,te.EMPTY_NODE);return f!=null&&this.rangedFilter_.matches(f)?(i!=null&&i.trackChildChange(Ta(f.name,f.node)),g.updateImmediateChild(f.name,f.node)):g}}else return r.isEmpty()?e:d&&o(u,c)>=0?(i!=null&&(i.trackChildChange(Tc(u.name,u.node)),i.trackChildChange(Ta(n,r))),a.updateImmediateChild(n,r).updateImmediateChild(u.name,te.EMPTY_NODE)):e}}/** 1369 * @license 1370 * Copyright 2017 Google LLC 1371 * 1372 * Licensed under the Apache License, Version 2.0 (the "License"); 1373 * you may not use this file except in compliance with the License. 1374 * You may obtain a copy of the License at 1375 * 1376 * http://www.apache.org/licenses/LICENSE-2.0 1377 * 1378 * Unless required by applicable law or agreed to in writing, software 1379 * distributed under the License is distributed on an "AS IS" BASIS, 1380 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1381 * See the License for the specific language governing permissions and 1382 * limitations under the License. 1383 */class Qx{constructor(){this.limitSet_=!1,this.startSet_=!1,this.startNameSet_=!1,this.startAfterSet_=!1,this.endSet_=!1,this.endNameSet_=!1,this.endBeforeSet_=!1,this.limit_=0,this.viewFrom_="",this.indexStartValue_=null,this.indexStartName_="",this.indexEndValue_=null,this.indexEndName_="",this.index_=qe}hasStart(){return this.startSet_}isViewFromLeft(){return this.viewFrom_===""?this.startSet_:this.viewFrom_==="l"}getIndexStartValue(){return $(this.startSet_,"Only valid if start has been set"),this.indexStartValue_}getIndexStartName(){return $(this.startSet_,"Only valid if start has been set"),this.startNameSet_?this.indexStartName_:Na}hasEnd(){return this.endSet_}getIndexEndValue(){return $(this.endSet_,"Only valid if end has been set"),this.indexEndValue_}getIndexEndName(){return $(this.endSet_,"Only valid if end has been set"),this.endNameSet_?this.indexEndName_:eo}hasLimit(){return this.limitSet_}hasAnchoredLimit(){return this.limitSet_&&this.viewFrom_!==""}getLimit(){return $(this.limitSet_,"Only valid if limit has been set"),this.limit_}getIndex(){return this.index_}loadsAllData(){return!(this.startSet_||this.endSet_||this.limitSet_)}isDefault(){return this.loadsAllData()&&this.index_===qe}copy(){const e=new Qx;return e.limitSet_=this.limitSet_,e.limit_=this.limit_,e.startSet_=this.startSet_,e.startAfterSet_=this.startAfterSet_,e.indexStartValue_=this.indexStartValue_,e.startNameSet_=this.startNameSet_,e.indexStartName_=this.indexStartName_,e.endSet_=this.endSet_,e.endBeforeSet_=this.endBeforeSet_,e.indexEndValue_=this.indexEndValue_,e.endNameSet_=this.endNameSet_,e.indexEndName_=this.indexEndName_,e.index_=this.index_,e.viewFrom_=this.viewFrom_,e}}function mW(t){return t.loadsAllData()?new Yx(t.getIndex()):t.hasLimit()?new pW(t):new Pc(t)}function B1(t){const e={};if(t.isDefault())return e;let n;if(t.index_===qe?n="$priority":t.index_===hW?n="$value":t.index_===na?n="$key":($(t.index_ instanceof uW,"Unrecognized index type!"),n=t.index_.toString()),e.orderBy=at(n),t.startSet_){const r=t.startAfterSet_?"startAfter":"startAt";e[r]=at(t.indexStartValue_),t.startNameSet_&&(e[r]+=","+at(t.indexStartName_))}if(t.endSet_){const r=t.endBeforeSet_?"endBefore":"endAt";e[r]=at(t.indexEndValue_),t.endNameSet_&&(e[r]+=","+at(t.indexEndName_))}return t.limitSet_&&(t.isViewFromLeft()?e.limitToFirst=t.limit_:e.limitToLast=t.limit_),e}function V1(t){const e={};if(t.startSet_&&(e.sp=t.indexStartValue_,t.startNameSet_&&(e.sn=t.indexStartName_),e.sin=!t.startAfterSet_),t.endSet_&&(e.ep=t.indexEndValue_,t.endNameSet_&&(e.en=t.indexEndName_),e.ein=!t.endBeforeSet_),t.limitSet_){e.l=t.limit_;let n=t.viewFrom_;n===""&&(t.isViewFromLeft()?n="l":n="r"),e.vf=n}return t.index_!==qe&&(e.i=t.index_.toString()),e}/** 1384 * @license 1385 * Copyright 2017 Google LLC 1386 * 1387 * Licensed under the Apache License, Version 2.0 (the "License");
1388 * you may not use this file except in compliance with the License. 1389 * You may obtain a copy of the License at 1390 * 1391 * http://www.apache.org/licenses/LICENSE-2.0 1392 * 1393 * Unless required by applicable law or agreed to in writing, software 1394 * distributed under the License is distributed on an "AS IS" BASIS, 1395 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1396 * See the License for the specific language governing permissions and 1397 * limitations under the License. 1398 */class _h extends yP{reportStats(e){throw new Error("Method not implemented.")}static getListenId_(e,n){return n!==void 0?"tag$"+n:($(e._queryParams.isDefault(),"should have a tag if it's not a default query."),e._path.toString())}constructor(e,n,r,s){super(),this.repoInfo_=e,this.onDataUpdate_=n,this.authTokenProvider_=r,this.appCheckTokenProvider_=s,this.log_=tu("p:rest:"),this.listens_={}}listen(e,n,r,s){const i=e._path.toString();this.log_("Listen called for "+i+" "+e._queryIdentifier);const o=_h.getListenId_(e,r),a={};this.listens_[o]=a;const c=B1(e._queryParams);this.restRequest_(i+".json",c,(u,d)=>{let h=d;if(u===404&&(h=null,u=null),u===null&&this.onDataUpdate_(i,h,!1,r),Sa(this.listens_,o)===a){let f;u?u===401?f="permission_denied":f="rest_error:"+u:f="ok",s(f,null)}})}unlisten(e,n){const r=_h.getListenId_(e,n);delete this.listens_[r]}get(e){const n=B1(e._queryParams),r=e._path.toString(),s=new Cf;return this.restRequest_(r+".json",n,(i,o)=>{let a=o;i===404&&(a=null,i=null),i===null?(this.onDataUpdate_(r,a,!1,null),s.resolve(a)):s.reject(new Error(a))}),s.promise}refreshAuthToken(e){}restRequest_(e,n={},r){return n.format="export",Promise.all([this.authTokenProvider_.getToken(!1),this.appCheckTokenProvider_.getToken(!1)]).then(([s,i])=>{s&&s.accessToken&&(n.auth=s.accessToken),i&&i.token&&(n.ac=i.token);const o=(this.repoInfo_.secure?"https://":"http://")+this.repoInfo_.host+e+"?ns="+this.repoInfo_.namespace+Ga(n);this.log_("Sending REST request for "+o);const a=new XMLHttpRequest;a.onreadystatechange=()=>{if(r&&a.readyState===4){this.log_("REST Response for "+o+" received. status:",a.status,"response:",a.responseText);let c=null;if(a.status>=200&&a.status<300){try{c=Cc(a.responseText)}catch{nn("Failed to parse JSON response for "+o+": "+a.responseText)}r(null,c)}else a.status!==401&&a.status!==404&&nn("Got unsuccessful REST response for "+o+" Status: "+a.status),r(a.status);r=null}},a.open("GET",o,!0),a.send()})}}/** 1399 * @license 1400 * Copyright 2017 Google LLC 1401 * 1402 * Licensed under the Apache License, Version 2.0 (the "License"); 1403 * you may not use this file except in compliance with the License. 1404 * You may obtain a copy of the License at 1405 * 1406 * http://www.apache.org/licenses/LICENSE-2.0 1407 * 1408 * Unless required by applicable law or agreed to in writing, software 1409 * distributed under the License is distributed on an "AS IS" BASIS, 1410 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1411 * See the License for the specific language governing permissions and 1412 * limitations under the License. 1413 */class gW{constructor(){this.rootNode_=te.EMPTY_NODE}getNode(e){return this.rootNode_.getChild(e)}updateSnapshot(e,n){this.rootNode_=this.rootNode_.updateChild(e,n)}}/** 1414 * @license 1415 * Copyright 2017 Google LLC 1416 * 1417 * Licensed under the Apache License, Version 2.0 (the "License"); 1418 * you may not use this file except in compliance with the License. 1419 * You may obtain a copy of the License at 1420 * 1421 * http://www.apache.org/licenses/LICENSE-2.0 1422 * 1423 * Unless required by applicable law or agreed to in writing, software 1424 * distributed under the License is distributed on an "AS IS" BASIS, 1425 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1426 * See the License for the specific language governing permissions and 1427 * limitations under the License. 1428 */function kh(){return{value:null,children:new Map}}function IP(t,e,n){if(fe(e))t.value=n,t.children.clear();else if(t.value!==null)t.value=t.value.updateChild(e,n);else{const r=de(e);t.children.has(r)||t.children.set(r,kh());const s=t.children.get(r);e=Ie(e),IP(s,e,n)}}function yy(t,e,n){t.value!==null?n(e,t.value):yW(t,(r,s)=>{const i=new Te(e.toString()+"/"+r);yy(s,i,n)})}
1428function yW(t,e){t.children.forEach((n,r)=>{e(r,n)})}/** 1429 * @license 1430 * Copyright 2017 Google LLC 1431 * 1432 * Licensed under the Apache License, Version 2.0 (the "License"); 1433 * you may not use this file except in compliance with the License. 1434 * You may obtain a copy of the License at 1435 * 1436 * http://www.apache.org/licenses/LICENSE-2.0 1437 * 1438 * Unless required by applicable law or agreed to in writing, software 1439 * distributed under the License is distributed on an "AS IS" BASIS, 1440 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1441 * See the License for the specific language governing permissions and 1442 * limitations under the License. 1443 */class vW{constructor(e){this.collection_=e,this.last_=null}get(){const e=this.collection_.get(),n={...e};return this.last_&&rn(this.last_,(r,s)=>{n[r]=n[r]-s}),this.last_=e,n}}/** 1444 * @license 1445 * Copyright 2017 Google LLC 1446 * 1447 * Licensed under the Apache License, Version 2.0 (the "License"); 1448 * you may not use this file except in compliance with the License. 1449 * You may obtain a copy of the License at 1450 * 1451 * http://www.apache.org/licenses/LICENSE-2.0 1452 * 1453 * Unless required by applicable law or agreed to in writing, software 1454 * distributed under the License is distributed on an "AS IS" BASIS, 1455 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1456 * See the License for the specific language governing permissions and 1457 * limitations under the License. 1458 */const $1=10*1e3,xW=30*1e3,wW=5*60*1e3;class bW{constructor(e,n){this.server_=n,this.statsToReport_={},this.statsListener_=new vW(e);const r=$1+(xW-$1)*Math.random();Hl(this.reportStats_.bind(this),Math.floor(r))}reportStats_(){const e=this.statsListener_.get(),n={};let r=!1;rn(e,(s,i)=>{i>0&&is(this.statsToReport_,s)&&(n[s]=i,r=!0)}),r&&this.server_.reportStats(n),Hl(this.reportStats_.bind(this),Math.floor(Math.random()*2*wW))}}/** 1459 * @license 1460 * Copyright 2017 Google LLC 1461 * 1462 * Licensed under the Apache License, Version 2.0 (the "License"); 1463 * you may not use this file except in compliance with the License. 1464 * You may obtain a copy of the License at 1465 * 1466 * http://www.apache.org/licenses/LICENSE-2.0 1467 * 1468 * Unless required by applicable law or agreed to in writing, software 1469 * distributed under the License is distributed on an "AS IS" BASIS, 1470 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1471 * See the License for the specific language governing permissions and 1472 * limitations under the License. 1473 */var Yn;(function(t){t[t.OVERWRITE=0]="OVERWRITE",t[t.MERGE=1]="MERGE",t[t.ACK_USER_WRITE=2]="ACK_USER_WRITE",t[t.LISTEN_COMPLETE=3]="LISTEN_COMPLETE"})(Yn||(Yn={}));function PP(){return{fromUser:!0,fromServer:!1,queryId:null,tagged:!1}}function Xx(){return{fromUser:!1,fromServer:!0,queryId:null,tagged:!1}}function Jx(t){return{fromUser:!1,fromServer:!0,queryId:t,tagged:!0}}/** 1474 * @license 1475 * Copyright 2017 Google LLC 1476 * 1477 * Licensed under the Apache License, Version 2.0 (the "License"); 1478 * you may not use this file except in compliance with the License. 1479 * You may obtain a copy of the License at 1480 * 1481 * http://www.apache.org/licenses/LICENSE-2.0 1482 * 1483 * Unless required by applicable law or agreed to in writing, software 1484 * distributed under the License is distributed on an "AS IS" BASIS, 1485 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1486 * See the License for the specific language governing permissions and 1487 * limitations under the License. 1488 */class Eh{constructor(e,n,r){this.path=e,this.affectedTree=n,this.revert=r,this.type=Yn.ACK_USER_WRITE,this.source=PP()}operationForChild(e){if(fe(this.path)){if(this.affectedTree.value!=null)return $(this.affectedTree.children.isEmpty(),"affectedTree should not have overlapping affected paths."),this;{const n=this.affectedTree.subtree(new Te(e));return new Eh(we(),n,this.revert)}}else return $(de(this.path)===e,"operationForChild called for unrelated child."),new Eh(Ie(this.path),this.affectedTree,this.revert)}}/** 1489 * @license 1490 * Copyright 2017 Google LLC 1491 * 1492 * Licensed under the Apache License, Version 2.0 (the "License");
1493 * you may not use this file except in compliance with the License. 1494 * You may obtain a copy of the License at 1495 * 1496 * http://www.apache.org/licenses/LICENSE-2.0 1497 * 1498 * Unless required by applicable law or agreed to in writing, software 1499 * distributed under the License is distributed on an "AS IS" BASIS, 1500 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1501 * See the License for the specific language governing permissions and 1502 * limitations under the License. 1503 */class jc{constructor(e,n){this.source=e,this.path=n,this.type=Yn.LISTEN_COMPLETE}operationForChild(e){return fe(this.path)?new jc(this.source,we()):new jc(this.source,Ie(this.path))}}/** 1504 * @license 1505 * Copyright 2017 Google LLC 1506 * 1507 * Licensed under the Apache License, Version 2.0 (the "License"); 1508 * you may not use this file except in compliance with the License. 1509 * You may obtain a copy of the License at 1510 * 1511 * http://www.apache.org/licenses/LICENSE-2.0 1512 * 1513 * Unless required by applicable law or agreed to in writing, software 1514 * distributed under the License is distributed on an "AS IS" BASIS, 1515 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1516 * See the License for the specific language governing permissions and 1517 * limitations under the License. 1518 */class to{constructor(e,n,r){this.source=e,this.path=n,this.snap=r,this.type=Yn.OVERWRITE}operationForChild(e){return fe(this.path)?new to(this.source,we(),this.snap.getImmediateChild(e)):new to(this.source,Ie(this.path),this.snap)}}/** 1519 * @license 1520 * Copyright 2017 Google LLC 1521 * 1522 * Licensed under the Apache License, Version 2.0 (the "License"); 1523 * you may not use this file except in compliance with the License. 1524 * You may obtain a copy of the License at 1525 * 1526 * http://www.apache.org/licenses/LICENSE-2.0 1527 * 1528 * Unless required by applicable law or agreed to in writing, software 1529 * distributed under the License is distributed on an "AS IS" BASIS, 1530 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1531 * See the License for the specific language governing permissions and 1532 * limitations under the License. 1533 */class Rc{constructor(e,n,r){this.source=e,this.path=n,this.children=r,this.type=Yn.MERGE}operationForChild(e){if(fe(this.path)){const n=this.children.subtree(new Te(e));return n.isEmpty()?null:n.value?new to(this.source,we(),n.value):new Rc(this.source,we(),n)}else return $(de(this.path)===e,"Can't get a merge for a child not on the path of the operation"),new Rc(this.source,Ie(this.path),this.children)}toString(){return"Operation("+this.path+": "+this.source.toString()+" merge: "+this.children.toString()+")"}}/** 1534 * @license 1535 * Copyright 2017 Google LLC 1536 * 1537 * Licensed under the Apache License, Version 2.0 (the "License"); 1538 * you may not use this file except in compliance with the License. 1539 * You may obtain a copy of the License at 1540 * 1541 * http://www.apache.org/licenses/LICENSE-2.0 1542 * 1543 * Unless required by applicable law or agreed to in writing, software 1544 * distributed under the License is distributed on an "AS IS" BASIS, 1545 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1546 * See the License for the specific language governing permissions and 1547 * limitations under the License. 1548 */class li{constructor(e,n,r){this.node_=e,this.fullyInitialized_=n,this.filtered_=r}isFullyInitialized(){return this.fullyInitialized_}isFiltered(){return this.filtered_}isCompleteForPath(e){if(fe(e))return this.isFullyInitialized()&&!this.filtered_;const n=de(e);return this.isCompleteForChild(n)}isCompleteForChild(e){return this.isFullyInitialized()&&!this.filtered_||this.node_.hasChild(e)}getNode(){return this.node_}}/** 1549 * @license 1550 * Copyright 2017 Google LLC 1551 * 1552 * Licensed under the Apache License, Version 2.0 (the "License"); 1553 * you may not use this file except in compliance with the License. 1554 * You may obtain a copy of the License at 1555 * 1556 * http://www.apache.org/licenses/LICENSE-2.0 1557 * 1558 * Unless required by applicable law or agreed to in writing, software 1559 * distributed under the License is distributed on an "AS IS" BASIS, 1560 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1561 * See the License for the specific language governing permissions and 1562 * limitations under the License. 1563 */class _W{constructor(e){this.query_=e,this.index_=this.query_._queryParams.getIndex()}}function kW(t,e,n,r){const s=[],i=[];return e.forEach(o=>{o.type==="child_changed"&&t.index_.indexedValueChanged(o.oldSnap,o.snapshotNode)&&i.push(fW(o.childName,o.snapshotNode))}),gl(t,s,"child_removed",e,r,n),gl(t,s,"child_added",e,r,n),gl(t,s,"child_moved",i,r,n),gl(t,s,"child_changed",e,r,n),gl(t,s,"value",e,r,n),s}function gl(t,e,n,r,s,i){const o=r.filter(a=>a.type===n);o.sort((a,c)=>CW(t,a,c)),o.forEach(a=>{const c=EW(t,a,i);
1563s.forEach(u=>{u.respondsTo(a.type)&&e.push(u.createEvent(c,t.query_))})})}function EW(t,e,n){return e.type==="value"||e.type==="child_removed"||(e.prevName=n.getPredecessorChildName(e.childName,e.snapshotNode,t.index_)),e}function CW(t,e,n){if(e.childName==null||n.childName==null)throw Ka("Should only compare child_ events.");const r=new he(e.childName,e.snapshotNode),s=new he(n.childName,n.snapshotNode);return t.index_.compare(r,s)}/** 1564 * @license 1565 * Copyright 2017 Google LLC 1566 * 1567 * Licensed under the Apache License, Version 2.0 (the "License"); 1568 * you may not use this file except in compliance with the License. 1569 * You may obtain a copy of the License at 1570 * 1571 * http://www.apache.org/licenses/LICENSE-2.0 1572 * 1573 * Unless required by applicable law or agreed to in writing, software 1574 * distributed under the License is distributed on an "AS IS" BASIS, 1575 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1576 * See the License for the specific language governing permissions and 1577 * limitations under the License. 1578 */function If(t,e){return{eventCache:t,serverCache:e}}function Kl(t,e,n,r){return If(new li(e,n,r),t.serverCache)}function jP(t,e,n,r){return If(t.eventCache,new li(e,n,r))}function Ch(t){return t.eventCache.isFullyInitialized()?t.eventCache.getNode():null}function no(t){return t.serverCache.isFullyInitialized()?t.serverCache.getNode():null}/** 1579 * @license 1580 * Copyright 2017 Google LLC 1581 * 1582 * Licensed under the Apache License, Version 2.0 (the "License"); 1583 * you may not use this file except in compliance with the License. 1584 * You may obtain a copy of the License at 1585 * 1586 * http://www.apache.org/licenses/LICENSE-2.0 1587 * 1588 * Unless required by applicable law or agreed to in writing, software 1589 * distributed under the License is distributed on an "AS IS" BASIS, 1590 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1591 * See the License for the specific language governing permissions and 1592 * limitations under the License. 1593 */let um;const SW=()=>(um||(um=new Xt(dz)),um);class Ae{static fromObject(e){let n=new Ae(null);return rn(e,(r,s)=>{n=n.set(new Te(r),s)}),n}constructor(e,n=SW()){this.value=e,this.children=n}isEmpty(){return this.value===null&&this.children.isEmpty()}findRootMostMatchingPathAndValue(e,n){if(this.value!=null&&n(this.value))return{path:we(),value:this.value};if(fe(e))return null;{const r=de(e),s=this.children.get(r);if(s!==null){const i=s.findRootMostMatchingPathAndValue(Ie(e),n);return i!=null?{path:lt(new Te(r),i.path),value:i.value}:null}else return null}}findRootMostValueAndPath(e){return this.findRootMostMatchingPathAndValue(e,()=>!0)}subtree(e){if(fe(e))return this;{const n=de(e),r=this.children.get(n);return r!==null?r.subtree(Ie(e)):new Ae(null)}}set(e,n){if(fe(e))return new Ae(n,this.children);{const r=de(e),i=(this.children.get(r)||new Ae(null)).set(Ie(e),n),o=this.children.insert(r,i);return new Ae(this.value,o)}}remove(e){if(fe(e))return this.children.isEmpty()?new Ae(null):new Ae(null,this.children);{const n=de(e),r=this.children.get(n);if(r){const s=r.remove(Ie(e));let i;return s.isEmpty()?i=this.children.remove(n):i=this.children.insert(n,s),this.value===null&&i.isEmpty()?new Ae(null):new Ae(this.value,i)}else return this}}get(e){if(fe(e))return this.value;{const n=de(e),r=this.children.get(n);return r?r.get(Ie(e)):null}}setTree(e,n){if(fe(e))return n;{const r=de(e),i=(this.children.get(r)||new Ae(null)).setTree(Ie(e),n);let o;return i.isEmpty()?o=this.children.remove(r):o=this.children.insert(r,i),new Ae(this.value,o)}}fold(e){return this.fold_(we(),e)}fold_(e,n){const r={};return this.children.inorderTraversal((s,i)=>{r[s]=i.fold_(lt(e,s),n)}),n(e,this.value,r)}findOnPath(e,n){return this.findOnPath_(e,we(),n)}findOnPath_(e,n,r){const s=this.value?r(n,this.value):!1;if(s)return s;if(fe(e))return null;{const i=de(e),o=this.children.get(i);return o?o.findOnPath_(Ie(e),lt(n,i),r):null}}foreachOnPath(e,n){return this.foreachOnPath_(e,we(),n)}foreachOnPath_(e,n,r){if(fe(e))return this;{this.value&&r(n,this.value);const s=de(e),i=this.children.get(s);return i?i.foreachOnPath_(Ie(e),lt(n,s),r):new Ae(null)}}foreach(e){this.foreach_(we(),e)}foreach_(e,n){this.children.inorderTraversal((r,s)=>{s.foreach_(lt(e,r),n)}),this.value&&n(e,this.value)}foreachChild(e){this.children.inorderTraversal((n,r)=>{r.value&&e(n,r.value)})}}/** 1594 * @license 1595 * Copyright 2017 Google LLC 1596 * 1597 * Licensed under the Apache License, Version 2.0 (the "License");
1598 * you may not use this file except in compliance with the License. 1599 * You may obtain a copy of the License at 1600 * 1601 * http://www.apache.org/licenses/LICENSE-2.0 1602 * 1603 * Unless required by applicable law or agreed to in writing, software 1604 * distributed under the License is distributed on an "AS IS" BASIS, 1605 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1606 * See the License for the specific language governing permissions and 1607 * limitations under the License. 1608 */class Zn{constructor(e){this.writeTree_=e}static empty(){return new Zn(new Ae(null))}}function Gl(t,e,n){if(fe(e))return new Zn(new Ae(n));{const r=t.writeTree_.findRootMostValueAndPath(e);if(r!=null){const s=r.path;let i=r.value;const o=$t(s,e);return i=i.updateChild(o,n),new Zn(t.writeTree_.set(s,i))}else{const s=new Ae(n),i=t.writeTree_.setTree(e,s);return new Zn(i)}}}function z1(t,e,n){let r=t;return rn(n,(s,i)=>{r=Gl(r,lt(e,s),i)}),r}function W1(t,e){if(fe(e))return Zn.empty();{const n=t.writeTree_.setTree(e,new Ae(null));return new Zn(n)}}function vy(t,e){return ho(t,e)!=null}function ho(t,e){const n=t.writeTree_.findRootMostValueAndPath(e);return n!=null?t.writeTree_.get(n.path).getChild($t(n.path,e)):null}function H1(t){const e=[],n=t.writeTree_.value;return n!=null?n.isLeafNode()||n.forEachChild(qe,(r,s)=>{e.push(new he(r,s))}):t.writeTree_.children.inorderTraversal((r,s)=>{s.value!=null&&e.push(new he(r,s.value))}),e}function qs(t,e){if(fe(e))return t;{const n=ho(t,e);return n!=null?new Zn(new Ae(n)):new Zn(t.writeTree_.subtree(e))}}function xy(t){return t.writeTree_.isEmpty()}function Ia(t,e){return RP(we(),t.writeTree_,e)}function RP(t,e,n){if(e.value!=null)return n.updateChild(t,e.value);{let r=null;return e.children.inorderTraversal((s,i)=>{s===".priority"?($(i.value!==null,"Priority writes must always be leaf nodes"),r=i.value):n=RP(lt(t,s),i,n)}),!n.getChild(t).isEmpty()&&r!==null&&(n=n.updateChild(lt(t,".priority"),r)),n}}/** 1609 * @license 1610 * Copyright 2017 Google LLC 1611 * 1612 * Licensed under the Apache License, Version 2.0 (the "License"); 1613 * you may not use this file except in compliance with the License. 1614 * You may obtain a copy of the License at 1615 * 1616 * http://www.apache.org/licenses/LICENSE-2.0 1617 * 1618 * Unless required by applicable law or agreed to in writing, software 1619 * distributed under the License is distributed on an "AS IS" BASIS, 1620 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1621 * See the License for the specific language governing permissions and 1622 * limitations under the License. 1623 */function Pf(t,e){return OP(e,t)}function NW(t,e,n,r,s){$(r>t.lastWriteId,"Stacking an older write on top of newer ones"),s===void 0&&(s=!0),t.allWrites.push({path:e,snap:n,writeId:r,visible:s}),s&&(t.visibleWrites=Gl(t.visibleWrites,e,n)),t.lastWriteId=r}function TW(t,e){for(let n=0;n<t.allWrites.length;n++){const r=t.allWrites[n];if(r.writeId===e)return r}return null}function IW(t,e){const n=t.allWrites.findIndex(a=>a.writeId===e);$(n>=0,"removeWrite called with nonexistent writeId.");const r=t.allWrites[n];t.allWrites.splice(n,1);let s=r.visible,i=!1,o=t.allWrites.length-1;for(;s&&o>=0;){const a=t.allWrites[o];a.visible&&(o>=n&&PW(a,r.path)?s=!1:qn(r.path,a.path)&&(i=!0)),o--}if(s){if(i)return jW(t),!0;if(r.snap)t.visibleWrites=W1(t.visibleWrites,r.path);else{const a=r.children;rn(a,c=>{t.visibleWrites=W1(t.visibleWrites,lt(r.path,c))})}return!0}else return!1}function PW(t,e){if(t.snap)return qn(t.path,e);for(const n in t.children)if(t.children.hasOwnProperty(n)&&qn(lt(t.path,n),e))return!0;return!1}function jW(t){t.visibleWrites=AP(t.allWrites,RW,we()),t.allWrites.length>0?t.lastWriteId=t.allWrites[t.allWrites.length-1].writeId:t.lastWriteId=-1}function RW(t){return t.visible}function AP(t,e,n){let r=Zn.empty();for(let s=0;s<t.length;++s){const i=t[s];if(e(i)){const o=i.path;let a;if(i.snap)qn(n,o)?(a=$t(n,o),r=Gl(r,a,i.snap)):qn(o,n)&&(a=$t(o,n),r=Gl(r,we(),i.snap.getChild(a)));else if(i.children){if(qn(n,o))a=$t(n,o),r=z1(r,a,i.children);else if(qn(o,n))if(a=$t(o,n),fe(a))r=z1(r,we(),i.children);else{const c=Sa(i.children,de(a));if(c){const u=c.getChild(Ie(a));r=Gl(r,we(),u)}}}else throw Ka("WriteRecord should have .snap or .children")}}return r}function DP(t,e,n,r,s){if(!r&&!s){const i=ho(t.visibleWrites,e);if(i!=null)return i;{const o=qs(t.visibleWrites,e);if(xy(o))return n;if(n==null&&!vy(o,we()))return null;{const a=n||te.EMPTY_NODE;return Ia(o,a)}}}else{const i=qs(t.visibleWrites,e);if(!s&&xy(i))return n;if(!s&&n==null&&!vy(i,we()))return null;{const o=function(u){return(u.visible||s)&&(!r||!~r.indexOf(u.writeId))&&(qn(u.path,e)||qn(e,u.path))},a=AP(t.allWrites,o,e),c=n||te.EMPTY_NODE;return Ia(a,c)}}}function AW(t,e,n){let r=te.EMPTY_NODE;const s=ho(t.visibleWrites,e);
1623if(s)return s.isLeafNode()||s.forEachChild(qe,(i,o)=>{r=r.updateImmediateChild(i,o)}),r;if(n){const i=qs(t.visibleWrites,e);return n.forEachChild(qe,(o,a)=>{const c=Ia(qs(i,new Te(o)),a);r=r.updateImmediateChild(o,c)}),H1(i).forEach(o=>{r=r.updateImmediateChild(o.name,o.node)}),r}else{const i=qs(t.visibleWrites,e);return H1(i).forEach(o=>{r=r.updateImmediateChild(o.name,o.node)}),r}}function DW(t,e,n,r,s){$(r||s,"Either existingEventSnap or existingServerSnap must exist");const i=lt(e,n);if(vy(t.visibleWrites,i))return null;{const o=qs(t.visibleWrites,i);return xy(o)?s.getChild(n):Ia(o,s.getChild(n))}}function MW(t,e,n,r){const s=lt(e,n),i=ho(t.visibleWrites,s);if(i!=null)return i;if(r.isCompleteForChild(n)){const o=qs(t.visibleWrites,s);return Ia(o,r.getNode().getImmediateChild(n))}else return null}function OW(t,e){return ho(t.visibleWrites,e)}function LW(t,e,n,r,s,i,o){let a;const c=qs(t.visibleWrites,e),u=ho(c,we());if(u!=null)a=u;else if(n!=null)a=Ia(c,n);else return[];if(a=a.withIndex(o),!a.isEmpty()&&!a.isLeafNode()){const d=[],h=o.getCompare(),f=i?a.getReverseIteratorFrom(r,o):a.getIteratorFrom(r,o);let p=f.getNext();for(;p&&d.length<s;)h(p,r)!==0&&d.push(p),p=f.getNext();return d}else return[]}function FW(){return{visibleWrites:Zn.empty(),allWrites:[],lastWriteId:-1}}function Sh(t,e,n,r){return DP(t.writeTree,t.treePath,e,n,r)}function Zx(t,e){return AW(t.writeTree,t.treePath,e)}function K1(t,e,n,r){return DW(t.writeTree,t.treePath,e,n,r)}function Nh(t,e){return OW(t.writeTree,lt(t.treePath,e))}function UW(t,e,n,r,s,i){return LW(t.writeTree,t.treePath,e,n,r,s,i)}function e0(t,e,n){return MW(t.writeTree,t.treePath,e,n)}function MP(t,e){return OP(lt(t.treePath,e),t.writeTree)}function OP(t,e){return{treePath:t,writeTree:e}}/** 1624 * @license 1625 * Copyright 2017 Google LLC 1626 * 1627 * Licensed under the Apache License, Version 2.0 (the "License"); 1628 * you may not use this file except in compliance with the License. 1629 * You may obtain a copy of the License at 1630 * 1631 * http://www.apache.org/licenses/LICENSE-2.0 1632 * 1633 * Unless required by applicable law or agreed to in writing, software 1634 * distributed under the License is distributed on an "AS IS" BASIS, 1635 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1636 * See the License for the specific language governing permissions and 1637 * limitations under the License. 1638 */class BW{constructor(){this.changeMap=new Map}trackChildChange(e){const n=e.type,r=e.childName;$(n==="child_added"||n==="child_changed"||n==="child_removed","Only child changes supported for tracking"),$(r!==".priority","Only non-priority child changes can be tracked.");const s=this.changeMap.get(r);if(s){const i=s.type;if(n==="child_added"&&i==="child_removed")this.changeMap.set(r,Ic(r,e.snapshotNode,s.snapshotNode));else if(n==="child_removed"&&i==="child_added")this.changeMap.delete(r);else if(n==="child_removed"&&i==="child_changed")this.changeMap.set(r,Tc(r,s.oldSnap));else if(n==="child_changed"&&i==="child_added")this.changeMap.set(r,Ta(r,e.snapshotNode));else if(n==="child_changed"&&i==="child_changed")this.changeMap.set(r,Ic(r,e.snapshotNode,s.oldSnap));else throw Ka("Illegal combination of changes: "+e+" occurred after "+s)}else this.changeMap.set(r,e)}getChanges(){return Array.from(this.changeMap.values())}}/** 1639 * @license 1640 * Copyright 2017 Google LLC 1641 * 1642 * Licensed under the Apache License, Version 2.0 (the "License"); 1643 * you may not use this file except in compliance with the License. 1644 * You may obtain a copy of the License at 1645 * 1646 * http://www.apache.org/licenses/LICENSE-2.0 1647 * 1648 * Unless required by applicable law or agreed to in writing, software 1649 * distributed under the License is distributed on an "AS IS" BASIS, 1650 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1651 * See the License for the specific language governing permissions and 1652 * limitations under the License. 1653 */class VW{getCompleteChild(e){return null}getChildAfterChild(e,n,r){return null}}const LP=new VW;class t0{constructor(e,n,r=null){this.writes_=e,this.viewCache_=n,this.optCompleteServerCache_=r}getCompleteChild(e){const n=this.viewCache_.eventCache;if(n.isCompleteForChild(e))return n.getNode().getImmediateChild(e);{const r=this.optCompleteServerCache_!=null?new li(this.optCompleteServerCache_,!0,!1):this.viewCache_.serverCache;return e0(this.writes_,e,r)}}getChildAfterChild(e,n,r){const s=this.optCompleteServerCache_!=null?this.optCompleteServerCache_:no(this.viewCache_),i=UW(this.writes_,s,n,1,r,e);return i.length===0?null:i[0]}}/** 1654 * @license 1655 * Copyright 2017 Google LLC 1656 * 1657 * Licensed under the Apache License, Version 2.0 (the "License");
1658 * you may not use this file except in compliance with the License. 1659 * You may obtain a copy of the License at 1660 * 1661 * http://www.apache.org/licenses/LICENSE-2.0 1662 * 1663 * Unless required by applicable law or agreed to in writing, software 1664 * distributed under the License is distributed on an "AS IS" BASIS, 1665 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1666 * See the License for the specific language governing permissions and 1667 * limitations under the License. 1668 */function $W(t){return{filter:t}}function zW(t,e){$(e.eventCache.getNode().isIndexed(t.filter.getIndex()),"Event snap not indexed"),$(e.serverCache.getNode().isIndexed(t.filter.getIndex()),"Server snap not indexed")}function WW(t,e,n,r,s){const i=new BW;let o,a;if(n.type===Yn.OVERWRITE){const u=n;u.source.fromUser?o=wy(t,e,u.path,u.snap,r,s,i):($(u.source.fromServer,"Unknown source."),a=u.source.tagged||e.serverCache.isFiltered()&&!fe(u.path),o=Th(t,e,u.path,u.snap,r,s,a,i))}else if(n.type===Yn.MERGE){const u=n;u.source.fromUser?o=KW(t,e,u.path,u.children,r,s,i):($(u.source.fromServer,"Unknown source."),a=u.source.tagged||e.serverCache.isFiltered(),o=by(t,e,u.path,u.children,r,s,a,i))}else if(n.type===Yn.ACK_USER_WRITE){const u=n;u.revert?o=YW(t,e,u.path,r,s,i):o=GW(t,e,u.path,u.affectedTree,r,s,i)}else if(n.type===Yn.LISTEN_COMPLETE)o=qW(t,e,n.path,r,i);else throw Ka("Unknown operation type: "+n.type);const c=i.getChanges();return HW(e,o,c),{viewCache:o,changes:c}}function HW(t,e,n){const r=e.eventCache;if(r.isFullyInitialized()){const s=r.getNode().isLeafNode()||r.getNode().isEmpty(),i=Ch(t);(n.length>0||!t.eventCache.isFullyInitialized()||s&&!r.getNode().equals(i)||!r.getNode().getPriority().equals(i.getPriority()))&&n.push(TP(Ch(e)))}}function FP(t,e,n,r,s,i){const o=e.eventCache;if(Nh(r,n)!=null)return e;{let a,c;if(fe(n))if($(e.serverCache.isFullyInitialized(),"If change path is empty, we must have complete server data"),e.serverCache.isFiltered()){const u=no(e),d=u instanceof te?u:te.EMPTY_NODE,h=Zx(r,d);a=t.filter.updateFullNode(e.eventCache.getNode(),h,i)}else{const u=Sh(r,no(e));a=t.filter.updateFullNode(e.eventCache.getNode(),u,i)}else{const u=de(n);if(u===".priority"){$(ai(n)===1,"Can't have a priority with additional path components");const d=o.getNode();c=e.serverCache.getNode();const h=K1(r,n,d,c);h!=null?a=t.filter.updatePriority(d,h):a=o.getNode()}else{const d=Ie(n);let h;if(o.isCompleteForChild(u)){c=e.serverCache.getNode();const f=K1(r,n,o.getNode(),c);f!=null?h=o.getNode().getImmediateChild(u).updateChild(d,f):h=o.getNode().getImmediateChild(u)}else h=e0(r,u,e.serverCache);h!=null?a=t.filter.updateChild(o.getNode(),u,h,d,s,i):a=o.getNode()}}return Kl(e,a,o.isFullyInitialized()||fe(n),t.filter.filtersNodes())}}function Th(t,e,n,r,s,i,o,a){const c=e.serverCache;let u;const d=o?t.filter:t.filter.getIndexedFilter();if(fe(n))u=d.updateFullNode(c.getNode(),r,null);else if(d.filtersNodes()&&!c.isFiltered()){const p=c.getNode().updateChild(n,r);u=d.updateFullNode(c.getNode(),p,null)}else{const p=de(n);if(!c.isCompleteForPath(n)&&ai(n)>1)return e;const x=Ie(n),y=c.getNode().getImmediateChild(p).updateChild(x,r);p===".priority"?u=d.updatePriority(c.getNode(),y):u=d.updateChild(c.getNode(),p,y,x,LP,null)}const h=jP(e,u,c.isFullyInitialized()||fe(n),d.filtersNodes()),f=new t0(s,h,i);return FP(t,h,n,s,f,a)}function wy(t,e,n,r,s,i,o){const a=e.eventCache;let c,u;const d=new t0(s,e,i);if(fe(n))u=t.filter.updateFullNode(e.eventCache.getNode(),r,o),c=Kl(e,u,!0,t.filter.filtersNodes());else{const h=de(n);if(h===".priority")u=t.filter.updatePriority(e.eventCache.getNode(),r),c=Kl(e,u,a.isFullyInitialized(),a.isFiltered());else{const f=Ie(n),p=a.getNode().getImmediateChild(h);let x;if(fe(f))x=r;else{const g=d.getCompleteChild(h);g!=null?xP(f)===".priority"&&g.getChild(bP(f)).isEmpty()?x=g:x=g.updateChild(f,r):x=te.EMPTY_NODE}if(p.equals(x))c=e;else{const g=t.filter.updateChild(a.getNode(),h,x,f,d,o);c=Kl(e,g,a.isFullyInitialized(),t.filter.filtersNodes())}}}return c}function G1(t,e){return t.eventCache.isCompleteForChild(e)}function KW(t,e,n,r,s,i,o){let a=e;return r.foreach((c,u)=>{const d=lt(n,c);G1(e,de(d))&&(a=wy(t,a,d,u,s,i,o))}),r.foreach((c,u)=>{const d=lt(n,c);G1(e,de(d))||(a=wy(t,a,d,u,s,i,o))}),a}function q1(t,e,n){return n.foreach((r,s)=>{e=e.updateChild(r,s)}),e}function by(t,e,n,r,s,i,o,a){if(e.serverCache.getNode().isEmpty()&&!e.serverCache.isFullyInitialized())return e;let c=e,u;fe(n)?u=r:u=new Ae(null).setTree(n,r);const d=e.serverCache.getNode();return u.children.inorderTraversal((h,f)=>{if(d.hasChild(h)){const p=e.serverCache.getNode().getImmediateChild(h),x=q1(t,p,f);c=Th(t,c,new Te(h),x,s,i,o,a)}}),u.children.inorderTraversal((h,f)=>{const p=!e.serverCache.isCompleteForChild(h)&&f.value===null;if(!d.hasChild(h)&&!p){const x=e.serverCache.getNode().getImmediateChild(h),g=q1(t,x,f);c=Th(t,c,new Te(h),g,s,i,o,a)}}),c}function GW(t,e,n,r,s,i,o){if(Nh(s,n)!=null)return e;const a=e.serverCache.isFiltered(),c=e.serverCache;if(r.value!=null){if(fe(n)&&c.isFullyInitialized()||c.isCompleteForPath(n))return Th(t,e,n,c.getNode().getChild(n),s,i,a,o);if(fe(n)){let u=new Ae(null);
vendor: 4,306 bytes, lines 1668-1693
1668return c.getNode().forEachChild(na,(d,h)=>{u=u.set(new Te(d),h)}),by(t,e,n,u,s,i,a,o)}else return e}else{let u=new Ae(null);return r.foreach((d,h)=>{const f=lt(n,d);c.isCompleteForPath(f)&&(u=u.set(d,c.getNode().getChild(f)))}),by(t,e,n,u,s,i,a,o)}}function qW(t,e,n,r,s){const i=e.serverCache,o=jP(e,i.getNode(),i.isFullyInitialized()||fe(n),i.isFiltered());return FP(t,o,n,r,LP,s)}function YW(t,e,n,r,s,i){let o;if(Nh(r,n)!=null)return e;{const a=new t0(r,e,s),c=e.eventCache.getNode();let u;if(fe(n)||de(n)===".priority"){let d;if(e.serverCache.isFullyInitialized())d=Sh(r,no(e));else{const h=e.serverCache.getNode();$(h instanceof te,"serverChildren would be complete if leaf node"),d=Zx(r,h)}d=d,u=t.filter.updateFullNode(c,d,i)}else{const d=de(n);let h=e0(r,d,e.serverCache);h==null&&e.serverCache.isCompleteForChild(d)&&(h=c.getImmediateChild(d)),h!=null?u=t.filter.updateChild(c,d,h,Ie(n),a,i):e.eventCache.getNode().hasChild(d)?u=t.filter.updateChild(c,d,te.EMPTY_NODE,Ie(n),a,i):u=c,u.isEmpty()&&e.serverCache.isFullyInitialized()&&(o=Sh(r,no(e)),o.isLeafNode()&&(u=t.filter.updateFullNode(u,o,i)))}return o=e.serverCache.isFullyInitialized()||Nh(r,we())!=null,Kl(e,u,o,t.filter.filtersNodes())}}/** 1669 * @license 1670 * Copyright 2017 Google LLC 1671 * 1672 * Licensed under the Apache License, Version 2.0 (the "License"); 1673 * you may not use this file except in compliance with the License. 1674 * You may obtain a copy of the License at 1675 * 1676 * http://www.apache.org/licenses/LICENSE-2.0 1677 * 1678 * Unless required by applicable law or agreed to in writing, software 1679 * distributed under the License is distributed on an "AS IS" BASIS, 1680 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1681 * See the License for the specific language governing permissions and 1682 * limitations under the License. 1683 */class QW{constructor(e,n){this.query_=e,this.eventRegistrations_=[];const r=this.query_._queryParams,s=new Yx(r.getIndex()),i=mW(r);this.processor_=$W(i);const o=n.serverCache,a=n.eventCache,c=s.updateFullNode(te.EMPTY_NODE,o.getNode(),null),u=i.updateFullNode(te.EMPTY_NODE,a.getNode(),null),d=new li(c,o.isFullyInitialized(),s.filtersNodes()),h=new li(u,a.isFullyInitialized(),i.filtersNodes());this.viewCache_=If(h,d),this.eventGenerator_=new _W(this.query_)}get query(){return this.query_}}function XW(t){return t.viewCache_.serverCache.getNode()}function JW(t){return Ch(t.viewCache_)}function ZW(t,e){const n=no(t.viewCache_);return n&&(t.query._queryParams.loadsAllData()||!fe(e)&&!n.getImmediateChild(de(e)).isEmpty())?n.getChild(e):null}function Y1(t){return t.eventRegistrations_.length===0}function eH(t,e){t.eventRegistrations_.push(e)}function Q1(t,e,n){const r=[];if(n){$(e==null,"A cancel should cancel all event registrations.");const s=t.query._path;t.eventRegistrations_.forEach(i=>{const o=i.createCancelEvent(n,s);o&&r.push(o)})}if(e){let s=[];for(let i=0;i<t.eventRegistrations_.length;++i){const o=t.eventRegistrations_[i];if(!o.matches(e))s.push(o);else if(e.hasAnyCallback()){s=s.concat(t.eventRegistrations_.slice(i+1));break}}t.eventRegistrations_=s}else t.eventRegistrations_=[];return r}function X1(t,e,n,r){e.type===Yn.MERGE&&e.source.queryId!==null&&($(no(t.viewCache_),"We should always have a full cache before handling merges"),$(Ch(t.viewCache_),"Missing event cache, even though we have a server cache"));const s=t.viewCache_,i=WW(t.processor_,s,e,n,r);return zW(t.processor_,i.viewCache),$(i.viewCache.serverCache.isFullyInitialized()||!s.serverCache.isFullyInitialized(),"Once a server snap is complete, it should never go back"),t.viewCache_=i.viewCache,UP(t,i.changes,i.viewCache.eventCache.getNode(),null)}function tH(t,e){const n=t.viewCache_.eventCache,r=[];return n.getNode().isLeafNode()||n.getNode().forEachChild(qe,(i,o)=>{r.push(Ta(i,o))}),n.isFullyInitialized()&&r.push(TP(n.getNode())),UP(t,r,n.getNode(),e)}function UP(t,e,n,r){const s=r?[r]:t.eventRegistrations_;return kW(t.eventGenerator_,e,n,s)}/** 1684 * @license 1685 * Copyright 2017 Google LLC 1686 * 1687 * Licensed under the Apache License, Version 2.0 (the "License"); 1688 * you may not use this file except in compliance with the License. 1689 * You may obtain a copy of the License at 1690 * 1691 * http://www.apache.org/licenses/LICENSE-2.0 1692 * 1693 * Unless required by applicable law or agreed to in writing, softw
1693are 1694 * distributed under the License is distributed on an "AS IS" BASIS, 1695 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1696 * See the License for the specific language governing permissions and 1697 * limitations under the License. 1698 */let Ih;class BP{constructor(){this.views=new Map}}function nH(t){$(!Ih,"__referenceConstructor has already been defined"),Ih=t}function rH(){return $(Ih,"Reference.ts has not been loaded"),Ih}function sH(t){return t.views.size===0}function n0(t,e,n,r){const s=e.source.queryId;if(s!==null){const i=t.views.get(s);return $(i!=null,"SyncTree gave us an op for an invalid query."),X1(i,e,n,r)}else{let i=[];for(const o of t.views.values())i=i.concat(X1(o,e,n,r));return i}}function VP(t,e,n,r,s){const i=e._queryIdentifier,o=t.views.get(i);if(!o){let a=Sh(n,s?r:null),c=!1;a?c=!0:r instanceof te?(a=Zx(n,r),c=!1):(a=te.EMPTY_NODE,c=!1);const u=If(new li(a,c,!1),new li(r,s,!1));return new QW(e,u)}return o}function iH(t,e,n,r,s,i){const o=VP(t,e,r,s,i);return t.views.has(e._queryIdentifier)||t.views.set(e._queryIdentifier,o),eH(o,n),tH(o,n)}function oH(t,e,n,r){const s=e._queryIdentifier,i=[];let o=[];const a=ci(t);if(s==="default")for(const[c,u]of t.views.entries())o=o.concat(Q1(u,n,r)),Y1(u)&&(t.views.delete(c),u.query._queryParams.loadsAllData()||i.push(u.query));else{const c=t.views.get(s);c&&(o=o.concat(Q1(c,n,r)),Y1(c)&&(t.views.delete(s),c.query._queryParams.loadsAllData()||i.push(c.query)))}return a&&!ci(t)&&i.push(new(rH())(e._repo,e._path)),{removed:i,events:o}}function $P(t){const e=[];for(const n of t.views.values())n.query._queryParams.loadsAllData()||e.push(n);return e}function Ys(t,e){let n=null;for(const r of t.views.values())n=n||ZW(r,e);return n}function zP(t,e){if(e._queryParams.loadsAllData())return jf(t);{const r=e._queryIdentifier;return t.views.get(r)}}function WP(t,e){return zP(t,e)!=null}function ci(t){return jf(t)!=null}function jf(t){for(const e of t.views.values())if(e.query._queryParams.loadsAllData())return e;return null}/** 1699 * @license 1700 * Copyright 2017 Google LLC 1701 * 1702 * Licensed under the Apache License, Version 2.0 (the "License"); 1703 * you may not use this file except in compliance with the License. 1704 * You may obtain a copy of the License at 1705 * 1706 * http://www.apache.org/licenses/LICENSE-2.0 1707 * 1708 * Unless required by applicable law or agreed to in writing, software 1709 * distributed under the License is distributed on an "AS IS" BASIS, 1710 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1711 * See the License for the specific language governing permissions and 1712 * limitations under the License. 1713 */let Ph;function aH(t){$(!Ph,"__referenceConstructor has already been defined"),Ph=t}function lH(){return $(Ph,"Reference.ts has not been loaded"),Ph}let cH=1;class J1{constructor(e){this.listenProvider_=e,this.syncPointTree_=new Ae(null),this.pendingWriteTree_=FW(),this.tagToQueryMap=new Map,this.queryToTagMap=new Map}}function HP(t,e,n,r,s){return NW(t.pendingWriteTree_,e,n,r,s),s?su(t,new to(PP(),e,n)):[]}function Ai(t,e,n=!1){const r=TW(t.pendingWriteTree_,e);if(IW(t.pendingWriteTree_,e)){let i=new Ae(null);return r.snap!=null?i=i.set(we(),!0):rn(r.children,o=>{i=i.set(new Te(o),!0)}),su(t,new Eh(r.path,i,n))}else return[]}function ru(t,e,n){return su(t,new to(Xx(),e,n))}function uH(t,e,n){const r=Ae.fromObject(n);return su(t,new Rc(Xx(),e,r))}function dH(t,e){return su(t,new jc(Xx(),e))}function hH(t,e,n){const r=s0(t,n);if(r){const s=i0(r),i=s.path,o=s.queryId,a=$t(i,e),c=new jc(Jx(o),a);return o0(t,i,c)}else return[]}function jh(t,e,n,r,s=!1){const i=e._path,o=t.syncPointTree_.get(i);let a=[];if(o&&(e._queryIdentifier==="default"||WP(o,e))){const c=oH(o,e,n,r);sH(o)&&(t.syncPointTree_=t.syncPointTree_.remove(i));const u=c.removed;if(a=c.events,!s){const d=u.findIndex(f=>f._queryParams.loadsAllData())!==-1,h=t.syncPointTree_.findOnPath(i,(f,p)=>ci(p));if(d&&!h){const f=t.syncPointTree_.subtree(i);if(!f.isEmpty()){const p=mH(f);for(let x=0;x<p.length;++x){const g=p[x],y=g.query,w=YP(t,g);t.listenProvider_.startListening(ql(y),Ac(t,y),w.hashFn,w.onComplete)}}}!h&&u.length>
17130&&!r&&(d?t.listenProvider_.stopListening(ql(e),null):u.forEach(f=>{const p=t.queryToTagMap.get(Rf(f));t.listenProvider_.stopListening(ql(f),p)}))}gH(t,u)}return a}function KP(t,e,n,r){const s=s0(t,r);if(s!=null){const i=i0(s),o=i.path,a=i.queryId,c=$t(o,e),u=new to(Jx(a),c,n);return o0(t,o,u)}else return[]}function fH(t,e,n,r){const s=s0(t,r);if(s){const i=i0(s),o=i.path,a=i.queryId,c=$t(o,e),u=Ae.fromObject(n),d=new Rc(Jx(a),c,u);return o0(t,o,d)}else return[]}function _y(t,e,n,r=!1){const s=e._path;let i=null,o=!1;t.syncPointTree_.foreachOnPath(s,(f,p)=>{const x=$t(f,s);i=i||Ys(p,x),o=o||ci(p)});let a=t.syncPointTree_.get(s);a?(o=o||ci(a),i=i||Ys(a,we())):(a=new BP,t.syncPointTree_=t.syncPointTree_.set(s,a));let c;i!=null?c=!0:(c=!1,i=te.EMPTY_NODE,t.syncPointTree_.subtree(s).foreachChild((p,x)=>{const g=Ys(x,we());g&&(i=i.updateImmediateChild(p,g))}));const u=WP(a,e);if(!u&&!e._queryParams.loadsAllData()){const f=Rf(e);$(!t.queryToTagMap.has(f),"View does not exist, but we have a tag");const p=yH();t.queryToTagMap.set(f,p),t.tagToQueryMap.set(p,f)}const d=Pf(t.pendingWriteTree_,s);let h=iH(a,e,n,d,i,c);if(!u&&!o&&!r){const f=zP(a,e);h=h.concat(vH(t,e,f))}return h}function r0(t,e,n){const s=t.pendingWriteTree_,i=t.syncPointTree_.findOnPath(e,(o,a)=>{const c=$t(o,e),u=Ys(a,c);if(u)return u});return DP(s,e,i,n,!0)}function pH(t,e){const n=e._path;let r=null;t.syncPointTree_.foreachOnPath(n,(u,d)=>{const h=$t(u,n);r=r||Ys(d,h)});let s=t.syncPointTree_.get(n);s?r=r||Ys(s,we()):(s=new BP,t.syncPointTree_=t.syncPointTree_.set(n,s));const i=r!=null,o=i?new li(r,!0,!1):null,a=Pf(t.pendingWriteTree_,e._path),c=VP(s,e,a,i?o.getNode():te.EMPTY_NODE,i);return JW(c)}function su(t,e){return GP(e,t.syncPointTree_,null,Pf(t.pendingWriteTree_,we()))}function GP(t,e,n,r){if(fe(t.path))return qP(t,e,n,r);{const s=e.get(we());n==null&&s!=null&&(n=Ys(s,we()));let i=[];const o=de(t.path),a=t.operationForChild(o),c=e.children.get(o);if(c&&a){const u=n?n.getImmediateChild(o):null,d=MP(r,o);i=i.concat(GP(a,c,u,d))}return s&&(i=i.concat(n0(s,t,r,n))),i}}function qP(t,e,n,r){const s=e.get(we());n==null&&s!=null&&(n=Ys(s,we()));let i=[];return e.children.inorderTraversal((o,a)=>{const c=n?n.getImmediateChild(o):null,u=MP(r,o),d=t.operationForChild(o);d&&(i=i.concat(qP(d,a,c,u)))}),s&&(i=i.concat(n0(s,t,r,n))),i}function YP(t,e){const n=e.query,r=Ac(t,n);return{hashFn:()=>(XW(e)||te.EMPTY_NODE).hash(),onComplete:s=>{if(s==="ok")return r?hH(t,n._path,r):dH(t,n._path);{const i=pz(s,n);return jh(t,n,null,i)}}}}function Ac(t,e){const n=Rf(e);return t.queryToTagMap.get(n)}function Rf(t){return t._path.toString()+"$"+t._queryIdentifier}function s0(t,e){return t.tagToQueryMap.get(e)}function i0(t){const e=t.indexOf("$");return $(e!==-1&&e<t.length-1,"Bad queryKey."),{queryId:t.substr(e+1),path:new Te(t.substr(0,e))}}function o0(t,e,n){const r=t.syncPointTree_.get(e);$(r,"Missing sync point for query tag that we're tracking");const s=Pf(t.pendingWriteTree_,e);return n0(r,n,s,null)}function mH(t){return t.fold((e,n,r)=>{if(n&&ci(n))return[jf(n)];{let s=[];return n&&(s=$P(n)),rn(r,(i,o)=>{s=s.concat(o)}),s}})}
1713function ql(t){return t._queryParams.loadsAllData()&&!t._queryParams.isDefault()?new(lH())(t._repo,t._path):t}function gH(t,e){for(let n=0;n<e.length;++n){const r=e[n];if(!r._queryParams.loadsAllData()){const s=Rf(r),i=t.queryToTagMap.get(s);t.queryToTagMap.delete(s),t.tagToQueryMap.delete(i)}}}function yH(){return cH++}function vH(t,e,n){const r=e._path,s=Ac(t,e),i=YP(t,n),o=t.listenProvider_.startListening(ql(e),s,i.hashFn,i.onComplete),a=t.syncPointTree_.subtree(r);if(s)$(!ci(a.value),"If we're adding a query, it shouldn't be shadowed");else{const c=a.fold((u,d,h)=>{if(!fe(u)&&d&&ci(d))return[jf(d).query];{let f=[];return d&&(f=f.concat($P(d).map(p=>p.query))),rn(h,(p,x)=>{f=f.concat(x)}),f}});for(let u=0;u<c.length;++u){const d=c[u];t.listenProvider_.stopListening(ql(d),Ac(t,d))}}return o}/** 1714 * @license 1715 * Copyright 2017 Google LLC 1716 * 1717 * Licensed under the Apache License, Version 2.0 (the "License"); 1718 * you may not use this file except in compliance with the License. 1719 * You may obtain a copy of the License at 1720 * 1721 * http://www.apache.org/licenses/LICENSE-2.0 1722 * 1723 * Unless required by applicable law or agreed to in writing, software 1724 * distributed under the License is distributed on an "AS IS" BASIS, 1725 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1726 * See the License for the specific language governing permissions and 1727 * limitations under the License. 1728 */class a0{constructor(e){this.node_=e}getImmediateChild(e){const n=this.node_.getImmediateChild(e);return new a0(n)}node(){return this.node_}}class l0{constructor(e,n){this.syncTree_=e,this.path_=n}getImmediateChild(e){const n=lt(this.path_,e);return new l0(this.syncTree_,n)}node(){return r0(this.syncTree_,this.path_)}}const xH=function(t){return t=t||{},t.timestamp=t.timestamp||new Date().getTime(),t},Z1=function(t,e,n){if(!t||typeof t!="object")return t;if($(".sv"in t,"Unexpected leaf node or priority contents"),typeof t[".sv"]=="string")return wH(t[".sv"],e,n);if(typeof t[".sv"]=="object")return bH(t[".sv"],e);$(!1,"Unexpected server value: "+JSON.stringify(t,null,2))},wH=function(t,e,n){switch(t){case"timestamp":return n.timestamp;default:$(!1,"Unexpected server value: "+t)}},bH=function(t,e,n){t.hasOwnProperty("increment")||$(!1,"Unexpected server value: "+JSON.stringify(t,null,2));const r=t.increment;typeof r!="number"&&$(!1,"Unexpected increment value: "+r);const s=e.node();if($(s!==null&&typeof s<"u","Expected ChildrenNode.EMPTY_NODE for nulls"),!s.isLeafNode())return r;const o=s.getValue();return typeof o!="number"?r:o+r},_H=function(t,e,n,r){return c0(e,new l0(n,t),r)},QP=function(t,e,n){return c0(t,new a0(e),n)};function c0(t,e,n){const r=t.getPriority().val(),s=Z1(r,e.getImmediateChild(".priority"),n);let i;if(t.isLeafNode()){const o=t,a=Z1(o.getValue(),e,n);return a!==o.getValue()||s!==o.getPriority().val()?new ht(a,mt(s)):t}else{const o=t;return i=o,s!==o.getPriority().val()&&(i=i.updatePriority(new ht(s))),o.forEachChild(qe,(a,c)=>{const u=c0(c,e.getImmediateChild(a),n);u!==c&&(i=i.updateImmediateChild(a,u))}),i}}/** 1729 * @license 1730 * Copyright 2017 Google LLC 1731 * 1732 * Licensed under the Apache License, Version 2.0 (the "License"); 1733 * you may not use this file except in compliance with the License. 1734 * You may obtain a copy of the License at 1735 * 1736 * http://www.apache.org/licenses/LICENSE-2.0 1737 * 1738 * Unless required by applicable law or agreed to in writing, software 1739 * distributed under the License is distributed on an "AS IS" BASIS, 1740 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1741 * See the License for the specific language governing permissions and 1742 * limitations under the License. 1743 */class u0{constructor(e="",n=null,r={children:{},childCount:0}){this.name=e,this.parent=n,this.node=r}}function d0(t,e){let n=e instanceof Te?e:new Te(e),r=t,s=de(n);for(;s!==null;){const i=Sa(r.node.children,s)||{children:{},childCount:0};r=new u0(s,r,i),n=Ie(n),s=de(n)}return r}function Qa(t){return t.node.value}function XP(t,e){t.node.value=e,ky(t)}function JP(t){return t.node.childCount>0}function kH(t){return Qa(t)===void 0&&!JP(t)}function Af(t,e){rn(t.node.children,(n,r)=>{e(new u0(n,t,r))})}function ZP(t,e,n,r){n&&!r&&e(t),Af(t,s=>{ZP(s,e,!0,r)}),n&&r&&e(t)}function EH(t,e,n){let r=t.parent;for(;r!==null;){if(e(r))return!0;r=r.parent}return!1}function iu(t){return new Te(t.parent===null?t.name:iu(t.parent)+"/"+t.name)}function ky(t){t.parent!==null&&CH(t.parent,t.name,t)}function CH(t,e,n){const r=kH(n),s=is(t.node.children,e);r&&s?(delete t.node.children[e],t.node.childCount--,ky(t)):!r&&!s&&(t.node.children[e]=n.node,t.node.childCount++,ky(t))}/** 1744 * @license 1745 * Copyright 2017 Google LLC 1746 * 1747 * Licensed under the Apache License, Version 2.0 (the "License");
vendor: 6,272 bytes, lines 1748-1788
1748 * you may not use this file except in compliance with the License. 1749 * You may obtain a copy of the License at 1750 * 1751 * http://www.apache.org/licenses/LICENSE-2.0 1752 * 1753 * Unless required by applicable law or agreed to in writing, software 1754 * distributed under the License is distributed on an "AS IS" BASIS, 1755 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1756 * See the License for the specific language governing permissions and 1757 * limitations under the License. 1758 */const SH=/[\[\].#$\/\u0000-\u001F\u007F]/,NH=/[\[\].#$\u0000-\u001F\u007F]/,dm=10*1024*1024,ej=function(t){return typeof t=="string"&&t.length!==0&&!SH.test(t)},tj=function(t){return typeof t=="string"&&t.length!==0&&!NH.test(t)},TH=function(t){return t&&(t=t.replace(/^\/*\.info(\/|$)/,"/")),tj(t)},IH=function(t,e,n,r){h0(Fx(t,"value"),e,n)},h0=function(t,e,n){const r=n instanceof Te?new Gz(n,t):n;if(e===void 0)throw new Error(t+"contains undefined "+Ci(r));if(typeof e=="function")throw new Error(t+"contains a function "+Ci(r)+" with contents = "+e.toString());if(JI(e))throw new Error(t+"contains "+e.toString()+" "+Ci(r));if(typeof e=="string"&&e.length>dm/3&&Sf(e)>dm)throw new Error(t+"contains a string greater than "+dm+" utf8 bytes "+Ci(r)+" ('"+e.substring(0,50)+"...')");if(e&&typeof e=="object"){let s=!1,i=!1;if(rn(e,(o,a)=>{if(o===".value")s=!0;else if(o!==".priority"&&o!==".sv"&&(i=!0,!ej(o)))throw new Error(t+" contains an invalid key ("+o+") "+Ci(r)+`. Keys must be non-empty strings and can't contain ".", "#", "$", "/", "[", or "]"`);qz(r,o),h0(t,a,r),Yz(r)}),s&&i)throw new Error(t+' contains ".value" child '+Ci(r)+" in addition to actual children.")}},nj=function(t,e,n,r){if(!tj(n))throw new Error(Fx(t,e)+'was an invalid path = "'+n+`". Paths must be non-empty strings and can't contain ".", "#", "$", "[", or "]"`)},PH=function(t,e,n,r){n&&(n=n.replace(/^\/*\.info(\/|$)/,"/")),nj(t,e,n)},rj=function(t,e){if(de(e)===".info")throw new Error(t+" failed = Can't modify data under /.info/")},jH=function(t,e){const n=e.path.toString();if(typeof e.repoInfo.host!="string"||e.repoInfo.host.length===0||!ej(e.repoInfo.namespace)&&e.repoInfo.host.split(":")[0]!=="localhost"||n.length!==0&&!TH(n))throw new Error(Fx(t,"url")+`must be a valid firebase URL and the path can't contain ".", "#", "$", "[", or "]".`)};/** 1759 * @license 1760 * Copyright 2017 Google LLC 1761 * 1762 * Licensed under the Apache License, Version 2.0 (the "License"); 1763 * you may not use this file except in compliance with the License. 1764 * You may obtain a copy of the License at 1765 * 1766 * http://www.apache.org/licenses/LICENSE-2.0 1767 * 1768 * Unless required by applicable law or agreed to in writing, software 1769 * distributed under the License is distributed on an "AS IS" BASIS, 1770 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1771 * See the License for the specific language governing permissions and 1772 * limitations under the License. 1773 */class RH{constructor(){this.eventLists_=[],this.recursionDepth_=0}}function f0(t,e){let n=null;for(let r=0;r<e.length;r++){const s=e[r],i=s.getPath();n!==null&&!Kx(i,n.path)&&(t.eventLists_.push(n),n=null),n===null&&(n={events:[],path:i}),n.events.push(s)}n&&t.eventLists_.push(n)}function sj(t,e,n){f0(t,n),ij(t,r=>Kx(r,e))}function Pr(t,e,n){f0(t,n),ij(t,r=>qn(r,e)||qn(e,r))}function ij(t,e){t.recursionDepth_++;let n=!0;for(let r=0;r<t.eventLists_.length;r++){const s=t.eventLists_[r];if(s){const i=s.path;e(i)?(AH(t.eventLists_[r]),t.eventLists_[r]=null):n=!1}}n&&(t.eventLists_=[]),t.recursionDepth_--}function AH(t){for(let e=0;e<t.events.length;e++){const n=t.events[e];if(n!==null){t.events[e]=null;const r=n.getEventRunner();Wl&&It("event: "+n.toString()),Ya(r)}}}/** 1774 * @license 1775 * Copyright 2017 Google LLC 1776 * 1777 * Licensed under the Apache License, Version 2.0 (the "License"); 1778 * you may not use this file except in compliance with the License. 1779 * You may obtain a copy of the License at 1780 * 1781 * http://www.apache.org/licenses/LICENSE-2.0 1782 * 1783 * Unless required by applicable law or agreed to in writing, software 1784 * distributed under the License is distributed on an "AS IS" BASIS, 1785 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1786 * See the License for the specific language governing permissions and 1787 * limitations under the License. 1788 */const DH="repo_interrupt",MH=25;class OH{constructor(e,n,r,s){this.repoInfo_=e,this.forceRestClient_=n,this.authTokenProvider_=r,this.appCheckProvider_=s,this.dataUpdateCount=0,this.statsListener_=null,this.eventQueue_=new RH,this.nextWriteId_=1,this.interceptServerDataCallback_=null,this.onDisconnect_=kh(),this.transactionQueueTree_=new u0,this.persistentConnection_=null,this.key=this.repoInfo_.toURLString()}toString(){return(this.repoInfo_.secure?"https://":"http://")+this.repoInfo_.host}}function LH(t,e,n){if(t.stats_=Wx(t.repoInfo_),t.forceRestClient_||vz())t.server_=new _h(t.repoInfo_,(r,s,i,o)=>{ek(t,r,s,i,o)},t.authTokenProvider_,t.appCheckProvider_),setTimeout(()=>tk(t,!0),0);else{if(typeof n<"u"&&n!==null){if(typeof n!="object")throw new Error("Only objects are supported for option databaseAuthVariableOverride");try{at(n)}catch(r){throw new Error("Invalid authOverride provided: "+r)}}t.persistentConnection_=new Wr(t.repoInfo_,e,(r,s,i,o)=>{ek(t,r,s,i,o)},r=>{tk(t,r)},r=>{UH(t,r)},t.authTokenProvider_,t.appCheckProvider_,n),t.server_=t.persistentConnection_}t.authTokenProvider_.addTokenChangeListener(r=>{t.server_.refreshAuthToken(r)}),t.appCheckProvider_.addTokenChangeListener(r=>{t.server_.refreshAppCheckToken(r.token)}),t.statsReporter_=kz(t.repoInfo_,()=>new bW(t.stats_,t.server_)),t.infoData_=new gW,t.infoSyncTree_=new J1({startListening:(r,s,i,o)=>{let a=[];const c=t.infoData_.getNode(r._path);return c.isEmpty()||(a=ru(t.infoSyncTree_,r._path,c),setTimeout(()=>{o("ok")},0)),a},stopListening:()=>{}}),m0(t,"connected",!1),t.serverSyncTree_=new J1({startListening:(r,s,i,o)=>(t.server_.listen(r,i,s,(a,c)=>{const u=o(a,c);Pr(t.eventQueue_,r._path,u)}),[]),stopListening:(r,s)=>{t.server_.unlisten(r,s)}})}function FH(t){const n=t.infoData_.getNode(new Te(".info/serverTimeOffset")).val()||0;return new Date().getTime()+n}function p0(t){return xH({timestamp:FH(t)})}function ek(t,e,n,r,s){t.dataUpdateCount++;const i=new Te(e);
1788n=t.interceptServerDataCallback_?t.interceptServerDataCallback_(e,n):n;let o=[];if(s)if(r){const c=yh(n,u=>mt(u));o=fH(t.serverSyncTree_,i,c,s)}else{const c=mt(n);o=KP(t.serverSyncTree_,i,c,s)}else if(r){const c=yh(n,u=>mt(u));o=uH(t.serverSyncTree_,i,c)}else{const c=mt(n);o=ru(t.serverSyncTree_,i,c)}let a=i;o.length>0&&(a=Mf(t,i)),Pr(t.eventQueue_,a,o)}function tk(t,e){m0(t,"connected",e),e===!1&&$H(t)}function UH(t,e){rn(e,(n,r)=>{m0(t,n,r)})}function m0(t,e,n){const r=new Te("/.info/"+e),s=mt(n);t.infoData_.updateSnapshot(r,s);const i=ru(t.infoSyncTree_,r,s);Pr(t.eventQueue_,r,i)}function oj(t){return t.nextWriteId_++}function BH(t,e,n){const r=pH(t.serverSyncTree_,e);return r!=null?Promise.resolve(r):t.server_.get(e).then(s=>{const i=mt(s).withIndex(e._queryParams.getIndex());_y(t.serverSyncTree_,e,n,!0);let o;if(e._queryParams.loadsAllData())o=ru(t.serverSyncTree_,e._path,i);else{const a=Ac(t.serverSyncTree_,e);o=KP(t.serverSyncTree_,e._path,i,a)}return Pr(t.eventQueue_,e._path,o),jh(t.serverSyncTree_,e,n,null,!0),i},s=>(Df(t,"get for query "+at(e)+" failed: "+s),Promise.reject(new Error(s))))}function VH(t,e,n,r,s){Df(t,"set",{path:e.toString(),value:n,priority:r});const i=p0(t),o=mt(n,r),a=r0(t.serverSyncTree_,e),c=QP(o,a,i),u=oj(t),d=HP(t.serverSyncTree_,e,c,u,!0);f0(t.eventQueue_,d),t.server_.put(e.toString(),o.val(!0),(f,p)=>{const x=f==="ok";x||nn("set at "+e+" failed: "+f);const g=Ai(t.serverSyncTree_,u,!x);Pr(t.eventQueue_,e,g),KH(t,s,f,p)});const h=dj(t,e);Mf(t,h),Pr(t.eventQueue_,h,[])}function $H(t){Df(t,"onDisconnectEvents");const e=p0(t),n=kh();yy(t.onDisconnect_,we(),(s,i)=>{const o=_H(s,i,t.serverSyncTree_,e);IP(n,s,o)});let r=[];yy(n,we(),(s,i)=>{r=r.concat(ru(t.serverSyncTree_,s,i));const o=dj(t,s);Mf(t,o)}),t.onDisconnect_=kh(),Pr(t.eventQueue_,we(),r)}function zH(t,e,n){let r;de(e._path)===".info"?r=_y(t.infoSyncTree_,e,n):r=_y(t.serverSyncTree_,e,n),sj(t.eventQueue_,e._path,r)}function WH(t,e,n){let r;de(e._path)===".info"?r=jh(t.infoSyncTree_,e,n):r=jh(t.serverSyncTree_,e,n),sj(t.eventQueue_,e._path,r)}function HH(t){t.persistentConnection_&&t.persistentConnection_.interrupt(DH)}function Df(t,...e){let n="";t.persistentConnection_&&(n=t.persistentConnection_.id+":"),It(n,...e)}function KH(t,e,n,r){e&&Ya(()=>{if(n==="ok")e(null);else{const s=(n||"error").toUpperCase();let i=s;r&&(i+=": "+r);const o=new Error(i);o.code=s,e(o)}})}function aj(t,e,n){return r0(t.serverSyncTree_,e,n)||te.EMPTY_NODE}function g0(t,e=t.transactionQueueTree_){if(e||Of(t,e),Qa(e)){const n=cj(t,e);$(n.length>0,"Sending zero length transaction queue"),n.every(s=>s.status===0)&&GH(t,iu(e),n)}else JP(e)&&Af(e,n=>{g0(t,n)})}function GH(t,e,n){const r=n.map(u=>u.currentWriteId),s=aj(t,e,r);let i=s;const o=s.hash();for(let u=0;u<n.length;u++){const d=n[u];$(d.status===0,"tryToSendTransactionQueue_: items in queue should all be run."),d.status=1,d.retryCount++;const h=$t(e,d.path);i=i.updateChild(h,d.currentOutputSnapshotRaw)}const a=i.val(!0),c=e;t.server_.put(c.toString(),a,u=>{Df(t,"transaction put response",{path:c.toString(),status:u});let d=[];if(u==="ok"){const h=[];for(let f=0;f<n.length;f++)n[f].status=2,d=d.concat(Ai(t.serverSyncTree_,n[f].currentWriteId)),n[f].onComplete&&h.push(()=>n[f].onComplete(null,!0,n[f].currentOutputSnapshotResolved)),n[f].unwatcher();Of(t,d0(t.transactionQueueTree_,e)),g0(t,t.transactionQueueTree_),Pr(t.eventQueue_,e,d);for(let f=0;f<h.length;f++)Ya(h[f])}else{if(u==="datastale")for(let h=0;h<n.length;h++)n[h].status===3?n[h].status=4:n[h].status=0;else{nn("transaction at "+c.toString()+" failed: "+u);for(let h=0;h<n.length;h++)n[h].status=4,n[h].abortReason=u}Mf(t,e)}},o)}function Mf(t,e){const n=lj(t,e),r=iu(n),s=cj(t,n);return qH(t,s,r),r}function qH(t,e,n){if(e.length===0)return;const r=[];let s=[];const o=e.filter(a=>a.status===0).map(a=>a.currentWriteId);for(let a=0;a<e.length;a++){const c=e[a],u=$t(n,c.path);let d=!1,h;if($(u!==null,"rerunTransactionsUnderNode_: relativePath should not be null."),c.status===4)d=!0,h=c.abortReason,s=s.concat(Ai(t.serverSyncTree_,c.currentWriteId,!0));else if(c.status===0)if(c.retryCount>=MH)d=!0,h="maxretry",s=s.concat(Ai(t.serverSyncTree_,c.currentWriteId,!0));else{const f=aj(t,c.path,o);c.currentInputSnapshot=f;const p=e[a].update(f.val());if(p!==void 0){h0("transaction failed: Data returned ",p,c.path);let x=mt(p);typeof p=="object"&&p!=null&&is(p,".priority")||(x=x.updatePriority(f.getPriority()));const y=c.currentWriteId,w=p0(t),v=QP(x,f,w);c.currentOutputSnapshotRaw=x,c.currentOutputSnapshotResolved=v,c.currentWriteId=oj(t),o.splice(o.indexOf(y),1),s=s.concat(HP(t.serverSyncTree_,c.path,v,c.currentWriteId,c.applyLocally)),s=s.concat(Ai(t.serverSyncTree_,y,!0))}
vendor: 4,109 bytes, lines 1788-1813
1788else d=!0,h="nodata",s=s.concat(Ai(t.serverSyncTree_,c.currentWriteId,!0))}Pr(t.eventQueue_,n,s),s=[],d&&(e[a].status=2,function(f){setTimeout(f,Math.floor(0))}(e[a].unwatcher),e[a].onComplete&&(h==="nodata"?r.push(()=>e[a].onComplete(null,!1,e[a].currentInputSnapshot)):r.push(()=>e[a].onComplete(new Error(h),!1,null))))}Of(t,t.transactionQueueTree_);for(let a=0;a<r.length;a++)Ya(r[a]);g0(t,t.transactionQueueTree_)}function lj(t,e){let n,r=t.transactionQueueTree_;for(n=de(e);n!==null&&Qa(r)===void 0;)r=d0(r,n),e=Ie(e),n=de(e);return r}function cj(t,e){const n=[];return uj(t,e,n),n.sort((r,s)=>r.order-s.order),n}function uj(t,e,n){const r=Qa(e);if(r)for(let s=0;s<r.length;s++)n.push(r[s]);Af(e,s=>{uj(t,s,n)})}function Of(t,e){const n=Qa(e);if(n){let r=0;for(let s=0;s<n.length;s++)n[s].status!==2&&(n[r]=n[s],r++);n.length=r,XP(e,n.length>0?n:void 0)}Af(e,r=>{Of(t,r)})}function dj(t,e){const n=iu(lj(t,e)),r=d0(t.transactionQueueTree_,e);return EH(r,s=>{hm(t,s)}),hm(t,r),ZP(r,s=>{hm(t,s)}),n}function hm(t,e){const n=Qa(e);if(n){const r=[];let s=[],i=-1;for(let o=0;o<n.length;o++)n[o].status===3||(n[o].status===1?($(i===o-1,"All SENT items should be at beginning of queue."),i=o,n[o].status=3,n[o].abortReason="set"):($(n[o].status===0,"Unexpected transaction status in abort"),n[o].unwatcher(),s=s.concat(Ai(t.serverSyncTree_,n[o].currentWriteId,!0)),n[o].onComplete&&r.push(n[o].onComplete.bind(null,new Error("set"),!1,null))));i===-1?XP(e,void 0):n.length=i+1,Pr(t.eventQueue_,iu(e),s);for(let o=0;o<r.length;o++)Ya(r[o])}}/** 1789 * @license 1790 * Copyright 2017 Google LLC 1791 * 1792 * Licensed under the Apache License, Version 2.0 (the "License"); 1793 * you may not use this file except in compliance with the License. 1794 * You may obtain a copy of the License at 1795 * 1796 * http://www.apache.org/licenses/LICENSE-2.0 1797 * 1798 * Unless required by applicable law or agreed to in writing, software 1799 * distributed under the License is distributed on an "AS IS" BASIS, 1800 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1801 * See the License for the specific language governing permissions and 1802 * limitations under the License. 1803 */function YH(t){let e="";const n=t.split("/");for(let r=0;r<n.length;r++)if(n[r].length>0){let s=n[r];try{s=decodeURIComponent(s.replace(/\+/g," "))}catch{}e+="/"+s}return e}function QH(t){const e={};t.charAt(0)==="?"&&(t=t.substring(1));for(const n of t.split("&")){if(n.length===0)continue;const r=n.split("=");r.length===2?e[decodeURIComponent(r[0])]=decodeURIComponent(r[1]):nn(`Invalid query segment '${n}' in query '${t}'`)}return e}const nk=function(t,e){const n=XH(t),r=n.namespace;n.domain==="firebase.com"&&es(n.host+" is no longer supported. Please use <YOUR FIREBASE>.firebaseio.com instead"),(!r||r==="undefined")&&n.domain!=="localhost"&&es("Cannot parse Firebase url. Please use https://<YOUR FIREBASE>.firebaseio.com"),n.secure||cz();const s=n.scheme==="ws"||n.scheme==="wss";return{repoInfo:new uP(n.host,n.secure,r,s,e,"",r!==n.subdomain),path:new Te(n.pathString)}},XH=function(t){let e="",n="",r="",s="",i="",o=!0,a="https",c=443;if(typeof t=="string"){let u=t.indexOf("//");u>=0&&(a=t.substring(0,u-1),t=t.substring(u+2));let d=t.indexOf("/");d===-1&&(d=t.length);let h=t.indexOf("?");h===-1&&(h=t.length),e=t.substring(0,Math.min(d,h)),d<h&&(s=YH(t.substring(d,h)));const f=QH(t.substring(Math.min(t.length,h)));u=e.indexOf(":"),u>=0?(o=a==="https"||a==="wss",c=parseInt(e.substring(u+1),10)):u=e.length;const p=e.slice(0,u);if(p.toLowerCase()==="localhost")n="localhost";else if(p.split(".").length<=2)n=p;else{const x=e.indexOf(".");r=e.substring(0,x).toLowerCase(),n=e.substring(x+1),i=r}"ns"in f&&(i=f.ns)}return{host:e,port:c,domain:n,subdomain:r,secure:o,scheme:a,pathString:s,namespace:i}};/** 1804 * @license 1805 * Copyright 2017 Google LLC 1806 * 1807 * Licensed under the Apache License, Version 2.0 (the "License"); 1808 * you may not use this file except in compliance with the License. 1809 * You may obtain a copy of the License at 1810 * 1811 * http://www.apache.org/licenses/LICENSE-2.0 1812 * 1813 * Unless required by applicable law or agreed to in writing, softw
1813are 1814 * distributed under the License is distributed on an "AS IS" BASIS, 1815 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1816 * See the License for the specific language governing permissions and 1817 * limitations under the License. 1818 */class JH{constructor(e,n,r,s){this.eventType=e,this.eventRegistration=n,this.snapshot=r,this.prevName=s}getPath(){const e=this.snapshot.ref;return this.eventType==="value"?e._path:e.parent._path}getEventType(){return this.eventType}getEventRunner(){return this.eventRegistration.getEventRunner(this)}toString(){return this.getPath().toString()+":"+this.eventType+":"+at(this.snapshot.exportVal())}}class ZH{constructor(e,n,r){this.eventRegistration=e,this.error=n,this.path=r}getPath(){return this.path}getEventType(){return"cancel"}getEventRunner(){return this.eventRegistration.getEventRunner(this)}toString(){return this.path.toString()+":cancel"}}/** 1819 * @license 1820 * Copyright 2017 Google LLC 1821 * 1822 * Licensed under the Apache License, Version 2.0 (the "License"); 1823 * you may not use this file except in compliance with the License. 1824 * You may obtain a copy of the License at 1825 * 1826 * http://www.apache.org/licenses/LICENSE-2.0 1827 * 1828 * Unless required by applicable law or agreed to in writing, software 1829 * distributed under the License is distributed on an "AS IS" BASIS, 1830 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1831 * See the License for the specific language governing permissions and 1832 * limitations under the License. 1833 */class hj{constructor(e,n){this.snapshotCallback=e,this.cancelCallback=n}onValue(e,n){this.snapshotCallback.call(null,e,n)}onCancel(e){return $(this.hasCancelCallback,"Raising a cancel event on a listener with no cancel callback"),this.cancelCallback.call(null,e)}get hasCancelCallback(){return!!this.cancelCallback}matches(e){return this.snapshotCallback===e.snapshotCallback||this.snapshotCallback.userCallback!==void 0&&this.snapshotCallback.userCallback===e.snapshotCallback.userCallback&&this.snapshotCallback.context===e.snapshotCallback.context}}/** 1834 * @license 1835 * Copyright 2020 Google LLC 1836 * 1837 * Licensed under the Apache License, Version 2.0 (the "License"); 1838 * you may not use this file except in compliance with the License. 1839 * You may obtain a copy of the License at 1840 * 1841 * http://www.apache.org/licenses/LICENSE-2.0 1842 * 1843 * Unless required by applicable law or agreed to in writing, software 1844 * distributed under the License is distributed on an "AS IS" BASIS, 1845 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1846 * See the License for the specific language governing permissions and 1847 * limitations under the License. 1848 */class y0{constructor(e,n,r,s){this._repo=e,this._path=n,this._queryParams=r,this._orderByCalled=s}get key(){return fe(this._path)?null:xP(this._path)}get ref(){return new os(this._repo,this._path)}get _queryIdentifier(){const e=V1(this._queryParams),n=$x(e);return n==="{}"?"default":n}get _queryObject(){return V1(this._queryParams)}isEqual(e){if(e=nt(e),!(e instanceof y0))return!1;const n=this._repo===e._repo,r=Kx(this._path,e._path),s=this._queryIdentifier===e._queryIdentifier;return n&&r&&s}toJSON(){return this.toString()}toString(){return this._repo.toString()+Kz(this._path)}}class os extends y0{constructor(e,n){super(e,n,new Qx,!1)}get parent(){const e=bP(this._path);return e===null?null:new os(this._repo,e)}get root(){let e=this;for(;e.parent!==null;)e=e.parent;return e}}class Dc{constructor(e,n,r){this._node=e,this.ref=n,this._index=r}get priority(){return this._node.getPriority().val()}get key(){return this.ref.key}get size(){return this._node.numChildren()}child(e){const n=new Te(e),r=Ey(this.ref,e);return new Dc(this._node.getChild(n),r,qe)}exists(){return!this._node.isEmpty()}exportVal(){return this._node.val(!0)}forEach(e){return this._node.isLeafNode()?!1:!!this._node.forEachChild(this._index,(r,s)=>e(new Dc(s,Ey(this.ref,r),qe)))}hasChild(e){const n=new Te(e);return!this._node.getChild(n).isEmpty()}hasChildren(){return this._node.isLeafNode()?!1:!this._node.isEmpty()}toJSON(){return this.exportVal()}val(){return this._node.val()}}function Oe(t,e){return t=nt(t),t._checkNotDeleted("ref"),e!==void 0?Ey(t._root,e):t._root}function Ey(t,e){return t=nt(t),de(t._path)===null?PH("child","path",e):nj("child","path",e),new os(t._repo,lt(t._path,e))}function e7(t){return rj("remove",t._path),st(t,null)}function st(t,e){t=nt(t),rj("set",t._path),IH("set",e,t._path);const n=new Cf;return VH(t._repo,t._path,e,null,n.wrapCallback(()=>{})),n.promise}function t7(t){t=nt(t);const e=new hj(()=>{}),n=new Lf(e);return BH(t._repo,t,n).then(r=>new Dc(r,new os(t._repo,t._path),t._queryParams.getIndex()))}class Lf{constructor(e){this.callbackContext=e}respondsTo(e){return e==="value"}createEvent(e,n){const r=n._queryParams.getIndex();return new JH("value",this,new Dc(e.snapshotNode,new os(n._repo,n._path),r))}getEventRunner(e){return e.getEventType()==="cancel"?()=>this.callbackContext.onCancel(e.error):()=>this.callbackContext.onValue(e.snapshot,null)}createCancelEvent(e,n){return this.callbackContext.hasCancelCallback?new ZH(this,e,n):null}matches(e){return e instanceof Lf?!e.callbackContext||!this.callbackContext?!0:e.callbackContext.matches(this.callbackContext):!1}hasAnyCallback(){return this.callbackContext!==null}}function n7(t,e,n,r,s){const i=new hj(n,void 0),o=new Lf(i);return zH(t._repo,t,o),()=>WH(t._repo,t,o)}function $u(t,e,n,r){return n7(t,"value",e)}nH(os);aH(os);/** 1849 * @license 1850 * Copyright 2020 Google LLC 1851 * 1852 * Licensed under the Apache License, Version 2.0 (the "License");
1853 * you may not use this file except in compliance with the License. 1854 * You may obtain a copy of the License at 1855 * 1856 * http://www.apache.org/licenses/LICENSE-2.0 1857 * 1858 * Unless required by applicable law or agreed to in writing, software 1859 * distributed under the License is distributed on an "AS IS" BASIS, 1860 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1861 * See the License for the specific language governing permissions and 1862 * limitations under the License. 1863 */const r7="FIREBASE_DATABASE_EMULATOR_HOST",Cy={};let s7=!1;function i7(t,e,n,r){const s=e.lastIndexOf(":"),i=e.substring(0,s),o=yi(i);t.repoInfo_=new uP(e,o,t.repoInfo_.namespace,t.repoInfo_.webSocketOnly,t.repoInfo_.nodeAdmin,t.repoInfo_.persistenceKey,t.repoInfo_.includeNamespaceInQueryParams,!0,n),r&&(t.authTokenProvider_=r)}function o7(t,e,n,r,s){let i=r||t.options.databaseURL;i===void 0&&(t.options.projectId||es("Can't determine Firebase Database URL. Be sure to include a Project ID when calling firebase.initializeApp()."),It("Using default host for project ",t.options.projectId),i=`${t.options.projectId}-default-rtdb.firebaseio.com`);let o=nk(i,s),a=o.repoInfo,c;typeof process<"u"&&k1&&(c=k1[r7]),c?(i=`http://${c}?ns=${a.namespace}`,o=nk(i,s),a=o.repoInfo):o.repoInfo.secure;const u=new wz(t.name,t.options,e);jH("Invalid Firebase Database URL",o),fe(o.path)||es("Database URL must point to the root of a Firebase Database (not including a child path).");const d=l7(a,t,u,new xz(t,n));return new c7(d,t)}function a7(t,e){const n=Cy[e];(!n||n[t.key]!==t)&&es(`Database ${e}(${t.repoInfo_}) has already been deleted.`),HH(t),delete n[t.key]}function l7(t,e,n,r){let s=Cy[e.name];s||(s={},Cy[e.name]=s);let i=s[t.toURLString()];return i&&es("Database initialized multiple times. Please make sure the format of the database URL matches with each database() call."),i=new OH(t,s7,n,r),s[t.toURLString()]=i,i}class c7{constructor(e,n){this._repoInternal=e,this.app=n,this.type="database",this._instanceStarted=!1}get _repo(){return this._instanceStarted||(LH(this._repoInternal,this.app.options.appId,this.app.options.databaseAuthVariableOverride),this._instanceStarted=!0),this._repoInternal}get _root(){return this._rootInternal||(this._rootInternal=new os(this._repo,we())),this._rootInternal}_delete(){return this._rootInternal!==null&&(a7(this._repo,this.app.name),this._repoInternal=null,this._rootInternal=null),Promise.resolve()}_checkNotDeleted(e){this._rootInternal===null&&es("Cannot call "+e+" on a deleted database.")}}function u7(t=Vx(),e){const n=Nf(t,"database").getImmediate({identifier:e});if(!n._instanceStarted){const r=LI("database");r&&d7(n,...r)}return n}function d7(t,e,n,r={}){t=nt(t),t._checkNotDeleted("useEmulator");const s=`${e}:${n}`,i=t._repoInternal;if(t._instanceStarted){if(s===t._repoInternal.repoInfo_.host&&Ji(r,i.repoInfo_.emulatorOptions))return;es("connectDatabaseEmulator() cannot initialize or alter the emulator configuration after the database instance has started.")}let o;if(i.repoInfo_.nodeAdmin)r.mockUserToken&&es('mockUserToken is not supported by the Admin SDK. For client access with mock users, please use the "firebase" package instead of "firebase-admin".'),o=new bd(bd.OWNER);else if(r.mockUserToken){const a=typeof r.mockUserToken=="string"?r.mockUserToken:BI(r.mockUserToken,t.app.options.projectId);o=new bd(a)}yi(e)&&(Mx(e),Ox("Database",!0)),i7(i,s,r,o)}/** 1864 * @license 1865 * Copyright 2021 Google LLC 1866 * 1867 * Licensed under the Apache License, Version 2.0 (the "License"); 1868 * you may not use this file except in compliance with the License. 1869 * You may obtain a copy of the License at 1870 * 1871 * http://www.apache.org/licenses/LICENSE-2.0 1872 * 1873 * Unless required by applicable law or agreed to in writing, software 1874 * distributed under the License is distributed on an "AS IS" BASIS, 1875 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1876 * See the License for the specific language governing permissions and 1877 * limitations under the License. 1878 */function h7(t){rz(uo),Zi(new oi("database",(e,{instanceIdentifier:n})=>{const r=e.getProvider("app").getImmediate(),s=e.getProvider("auth-internal"),i=e.getProvider("app-check-internal");return o7(r,s,i,n)},"PUBLIC").setMultipleInstances(!0)),Er(E1,C1,t),Er(E1,C1,"esm2020")}Wr.prototype.simpleListen=function(t,e){this.sendRequest("q",{p:t},e)};Wr.prototype.echo=function(t,e){this.sendRequest("echo",{d:t},e)};h7();function fj(){return{"dependent-sdk-initialized-before-auth":"Another Firebase SDK was initialized and is trying to use Auth before Auth is initialized. Please be sure to call `initializeAuth` or `getAuth` before starting any other Firebase SDK."}}const f7=fj,pj=new Zc("auth","Firebase",fj());/** 1879 * @license 1880 * Copyright 2020 Google LLC 1881 * 1882 * Licensed under the Apache License, Version 2.0 (the "License");
1883 * you may not use this file except in compliance with the License. 1884 * You may obtain a copy of the License at 1885 * 1886 * http://www.apache.org/licenses/LICENSE-2.0 1887 * 1888 * Unless required by applicable law or agreed to in writing, software 1889 * distributed under the License is distributed on an "AS IS" BASIS, 1890 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1891 * See the License for the specific language governing permissions and 1892 * limitations under the License. 1893 */const Rh=new Ux("@firebase/auth");function p7(t,...e){Rh.logLevel<=Se.WARN&&Rh.warn(`Auth (${uo}): ${t}`,...e)}function _d(t,...e){Rh.logLevel<=Se.ERROR&&Rh.error(`Auth (${uo}): ${t}`,...e)}/** 1894 * @license 1895 * Copyright 2020 Google LLC 1896 * 1897 * Licensed under the Apache License, Version 2.0 (the "License"); 1898 * you may not use this file except in compliance with the License. 1899 * You may obtain a copy of the License at 1900 * 1901 * http://www.apache.org/licenses/LICENSE-2.0 1902 * 1903 * Unless required by applicable law or agreed to in writing, software 1904 * distributed under the License is distributed on an "AS IS" BASIS, 1905 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1906 * See the License for the specific language governing permissions and 1907 * limitations under the License. 1908 */function sr(t,...e){throw v0(t,...e)}function Cr(t,...e){return v0(t,...e)}function mj(t,e,n){const r={...f7(),[e]:n};return new Zc("auth","Firebase",r).create(e,{appName:t.name})}function Qs(t){return mj(t,"operation-not-supported-in-this-environment","Operations that alter the current user are not supported in conjunction with FirebaseServerApp")}function v0(t,...e){if(typeof t!="string"){const n=e[0],r=[...e.slice(1)];return r[0]&&(r[0].appName=t.name),t._errorFactory.create(n,...r)}return pj.create(t,...e)}function ee(t,e,...n){if(!t)throw v0(e,...n)}function Vr(t){const e="INTERNAL ASSERTION FAILED: "+t;throw _d(e),new Error(e)}function ts(t,e){t||Vr(e)}/** 1909 * @license 1910 * Copyright 2020 Google LLC 1911 * 1912 * Licensed under the Apache License, Version 2.0 (the "License"); 1913 * you may not use this file except in compliance with the License. 1914 * You may obtain a copy of the License at 1915 * 1916 * http://www.apache.org/licenses/LICENSE-2.0 1917 * 1918 * Unless required by applicable law or agreed to in writing, software 1919 * distributed under the License is distributed on an "AS IS" BASIS, 1920 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1921 * See the License for the specific language governing permissions and 1922 * limitations under the License. 1923 */function Sy(){var t;return typeof self<"u"&&((t=self.location)==null?void 0:t.href)||""}function m7(){return rk()==="http:"||rk()==="https:"}function rk(){var t;return typeof self<"u"&&((t=self.location)==null?void 0:t.protocol)||null}/** 1924 * @license 1925 * Copyright 2020 Google LLC 1926 * 1927 * Licensed under the Apache License, Version 2.0 (the "License"); 1928 * you may not use this file except in compliance with the License. 1929 * You may obtain a copy of the License at 1930 * 1931 * http://www.apache.org/licenses/LICENSE-2.0 1932 * 1933 * Unless required by applicable law or agreed to in writing, software 1934 * distributed under the License is distributed on an "AS IS" BASIS, 1935 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1936 * See the License for the specific language governing permissions and 1937 * limitations under the License. 1938 */function g7(){return typeof navigator<"u"&&navigator&&"onLine"in navigator&&typeof navigator.onLine=="boolean"&&(m7()||A8()||"connection"in navigator)?navigator.onLine:!0}function y7(){if(typeof navigator>"u")return null;const t=navigator;return t.languages&&t.languages[0]||t.language||null}/** 1939 * @license 1940 * Copyright 2020 Google LLC 1941 * 1942 * Licensed under the Apache License, Version 2.0 (the "License"); 1943 * you may not use this file except in compliance with the License. 1944 * You may obtain a copy of the License at 1945 * 1946 * http://www.apache.org/licenses/LICENSE-2.0 1947 * 1948 * Unless required by applicable law or agreed to in writing, software 1949 * distributed under the License is distributed on an "AS IS" BASIS, 1950 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1951 * See the License for the specific language governing permissions and 1952 * limitations under the License. 1953 */class ou{constructor(e,n){this.shortDelay=e,this.longDelay=n,ts(n>
1953e,"Short delay should be less than long delay!"),this.isMobile=Lx()||VI()}get(){return g7()?this.isMobile?this.longDelay:this.shortDelay:Math.min(5e3,this.shortDelay)}}/** 1954 * @license 1955 * Copyright 2020 Google LLC 1956 * 1957 * Licensed under the Apache License, Version 2.0 (the "License"); 1958 * you may not use this file except in compliance with the License. 1959 * You may obtain a copy of the License at 1960 * 1961 * http://www.apache.org/licenses/LICENSE-2.0 1962 * 1963 * Unless required by applicable law or agreed to in writing, software 1964 * distributed under the License is distributed on an "AS IS" BASIS, 1965 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1966 * See the License for the specific language governing permissions and 1967 * limitations under the License. 1968 */function x0(t,e){ts(t.emulator,"Emulator should always be set here");const{url:n}=t.emulator;return e?`${n}${e.startsWith("/")?e.slice(1):e}`:n}/** 1969 * @license 1970 * Copyright 2020 Google LLC 1971 * 1972 * Licensed under the Apache License, Version 2.0 (the "License"); 1973 * you may not use this file except in compliance with the License. 1974 * You may obtain a copy of the License at 1975 * 1976 * http://www.apache.org/licenses/LICENSE-2.0 1977 * 1978 * Unless required by applicable law or agreed to in writing, software 1979 * distributed under the License is distributed on an "AS IS" BASIS, 1980 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1981 * See the License for the specific language governing permissions and 1982 * limitations under the License. 1983 */class gj{static initialize(e,n,r){this.fetchImpl=e,n&&(this.headersImpl=n),r&&(this.responseImpl=r)}static fetch(){if(this.fetchImpl)return this.fetchImpl;if(typeof self<"u"&&"fetch"in self)return self.fetch;if(typeof globalThis<"u"&&globalThis.fetch)return globalThis.fetch;if(typeof fetch<"u")return fetch;Vr("Could not find fetch implementation, make sure you call FetchProvider.initialize() with an appropriate polyfill")}static headers(){if(this.headersImpl)return this.headersImpl;if(typeof self<"u"&&"Headers"in self)return self.Headers;if(typeof globalThis<"u"&&globalThis.Headers)return globalThis.Headers;if(typeof Headers<"u")return Headers;Vr("Could not find Headers implementation, make sure you call FetchProvider.initialize() with an appropriate polyfill")}static response(){if(this.responseImpl)return this.responseImpl;if(typeof self<"u"&&"Response"in self)return self.Response;if(typeof globalThis<"u"&&globalThis.Response)return globalThis.Response;if(typeof Response<"u")return Response;Vr("Could not find Response implementation, make sure you call FetchProvider.initialize() with an appropriate polyfill")}}/** 1984 * @license 1985 * Copyright 2020 Google LLC 1986 * 1987 * Licensed under the Apache License, Version 2.0 (the "License"); 1988 * you may not use this file except in compliance with the License. 1989 * You may obtain a copy of the License at 1990 * 1991 * http://www.apache.org/licenses/LICENSE-2.0 1992 * 1993 * Unless required by applicable law or agreed to in writing, software 1994 * distributed under the License is distributed on an "AS IS" BASIS, 1995 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1996 * See the License for the specific language governing permissions and 1997 * limitations under the License. 1998 */const v7={CREDENTIAL_MISMATCH:"custom-token-mismatch",MISSING_CUSTOM_TOKEN:"internal-error",INVALID_IDENTIFIER:"invalid-email",MISSING_CONTINUE_URI:"internal-error",INVALID_PASSWORD:"wrong-password",MISSING_PASSWORD:"missing-password",INVALID_LOGIN_CREDENTIALS:"invalid-credential",EMAIL_EXISTS:"email-already-in-use",PASSWORD_LOGIN_DISABLED:"operation-not-allowed",INVALID_IDP_RESPONSE:"invalid-credential",INVALID_PENDING_TOKEN:"invalid-credential",FEDERATED_USER_ID_ALREADY_LINKED:"credential-already-in-use",MISSING_REQ_TYPE:"internal-error",EMAIL_NOT_FOUND:"user-not-found",RESET_PASSWORD_EXCEED_LIMIT:"too-many-requests",EXPIRED_OOB_CODE:"expired-action-code",INVALID_OOB_CODE:"invalid-action-code",MISSING_OOB_CODE:"internal-error",CREDENTIAL_TOO_OLD_LOGIN_AGAIN:"requires-recent-login",INVALID_ID_TOKEN:"invalid-user-token",TOKEN_EXPIRED:"user-token-expired",USER_NOT_FOUND:"user-token-expired",TOO_MANY_ATTEMPTS_TRY_LATER:"too-many-requests",PASSWORD_DOES_NOT_MEET_REQUIREMENTS:"password-does-not-meet-requirements",INVALID_CODE:"invalid-verification-code",INVALID_SESSION_INFO:"invalid-verification-id",INVALID_TEMPORARY_PROOF:"invalid-credential",MISSING_SESSION_INFO:"missing-verification-id",SESSION_EXPIRED:"code-expired",MISSING_ANDROID_PACKAGE_NAME:"missing-android-pkg-name",UNAUTHORIZED_DOMAIN:"unauthorized-continue-uri",INVALID_OAUTH_CLIENT_ID:"invalid-oauth-client-id",ADMIN_ONLY_OPERATION:"admin-restricted-operation",INVALID_MFA_PENDING_CREDENTIAL:"invalid-multi-factor-session",MFA_ENROLLMENT_NOT_FOUND:"multi-factor-info-not-found",MISSING_MFA_ENROLLMENT_ID:"missing-multi-factor-info",MISSING_MFA_PENDING_CREDENTIAL:"missing-multi-factor-session",SECOND_FACTOR_EXISTS:"second-factor-already-in-use",SECOND_FACTOR_LIMIT_EXCEEDED:"maximum-second-factor-count-exceeded",BLOCKING_FUNCTION_ERROR_RESPONSE:"internal-error",RECAPTCHA_NOT_ENABLED:"recaptcha-not-enabled",MISSING_RECAPTCHA_TOKEN:"missing-rec
1998aptcha-token",INVALID_RECAPTCHA_TOKEN:"invalid-recaptcha-token",INVALID_RECAPTCHA_ACTION:"invalid-recaptcha-action",MISSING_CLIENT_TYPE:"missing-client-type",MISSING_RECAPTCHA_VERSION:"missing-recaptcha-version",INVALID_RECAPTCHA_VERSION:"invalid-recaptcha-version",INVALID_REQ_TYPE:"invalid-req-type"};/** 1999 * @license 2000 * Copyright 2020 Google LLC 2001 * 2002 * Licensed under the Apache License, Version 2.0 (the "License"); 2003 * you may not use this file except in compliance with the License. 2004 * You may obtain a copy of the License at 2005 * 2006 * http://www.apache.org/licenses/LICENSE-2.0 2007 * 2008 * Unless required by applicable law or agreed to in writing, software 2009 * distributed under the License is distributed on an "AS IS" BASIS, 2010 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 2011 * See the License for the specific language governing permissions and 2012 * limitations under the License. 2013 */const x7=["/v1/accounts:signInWithCustomToken","/v1/accounts:signInWithEmailLink","/v1/accounts:signInWithIdp","/v1/accounts:signInWithPassword","/v1/accounts:signInWithPhoneNumber","/v1/token"],w7=new ou(3e4,6e4);function fo(t,e){return t.tenantId&&!e.tenantId?{...e,tenantId:t.tenantId}:e}async function vi(t,e,n,r,s={}){return yj(t,s,async()=>{let i={},o={};r&&(e==="GET"?o=r:i={body:JSON.stringify(r)});const a=Ga({key:t.config.apiKey,...o}).slice(1),c=await t._getAdditionalHeaders();c["Content-Type"]="application/json",t.languageCode&&(c["X-Firebase-Locale"]=t.languageCode);const u={method:e,headers:c,...i};return R8()||(u.referrerPolicy="no-referrer"),t.emulatorConfig&&yi(t.emulatorConfig.host)&&(u.credentials="include"),gj.fetch()(await vj(t,t.config.apiHost,n,a),u)})}async function yj(t,e,n){t._canInitEmulator=!1;const r={...v7,...e};try{const s=new _7(t),i=await Promise.race([n(),s.promise]);s.clearNetworkTimeout();const o=await i.json();if("needConfirmation"in o)throw zu(t,"account-exists-with-different-credential",o);if(i.ok&&!("errorMessage"in o))return o;{const a=i.ok?o.errorMessage:o.error.message,[c,u]=a.split(" : ");if(c==="FEDERATED_USER_ID_ALREADY_LINKED")throw zu(t,"credential-already-in-use",o);if(c==="EMAIL_EXISTS")throw zu(t,"email-already-in-use",o);if(c==="USER_DISABLED")throw zu(t,"user-disabled",o);const d=r[c]||c.toLowerCase().replace(/[_\s]+/g,"-");if(u)throw mj(t,d,u);sr(t,d)}}catch(s){if(s instanceof ss)throw s;sr(t,"network-request-failed",{message:String(s)})}}async function Ff(t,e,n,r,s={}){const i=await vi(t,e,n,r,s);return"mfaPendingCredential"in i&&sr(t,"multi-factor-auth-required",{_serverResponse:i}),i}async function vj(t,e,n,r){const s=`${e}${n}?${r}`,i=t,o=i.config.emulator?x0(t.config,s):`${t.config.apiScheme}://${s}`;return x7.includes(n)&&(await i._persistenceManagerAvailable,i._getPersistenceType()==="COOKIE")?i._getPersistence()._getFinalTarget(o).toString():o}function b7(t){switch(t){case"ENFORCE":return"ENFORCE";case"AUDIT":return"AUDIT";case"OFF":return"OFF";default:return"ENFORCEMENT_STATE_UNSPECIFIED"}}class _7{clearNetworkTimeout(){clearTimeout(this.timer)}constructor(e){this.auth=e,this.timer=null,this.promise=new Promise((n,r)=>{this.timer=setTimeout(()=>r(Cr(this.auth,"network-request-failed")),w7.get())})}}function zu(t,e,n){const r={appName:t.name};n.email&&(r.email=n.email),n.phoneNumber&&(r.phoneNumber=n.phoneNumber);const s=Cr(t,e,r);return s.customData._tokenResponse=n,s}function sk(t){return t!==void 0&&t.enterprise!==void 0}class k7{constructor(e){if(this.siteKey="",this.recaptchaEnforcementState=[],e.recaptchaKey===void 0)throw new Error("recaptchaKey undefined");this.siteKey=e.recaptchaKey.split("/")[3],this.recaptchaEnforcementState=e.recaptchaEnforcementState}getProviderEnforcementState(e){if(!this.recaptchaEnforcementState||this.recaptchaEnforcementState.length===0)return null;for(const n of this.recaptchaEnforcementState)if(n.provider&&n.provider===e)return b7(n.enforcementState);return null}isProviderEnabled(e){return this.getProviderEnforcementState(e)==="ENFORCE"||this.getProviderEnforcementState(e)==="AUDIT"}isAnyProviderEnabled(){return this.isProviderEnabled("EMAIL_PASSWORD_PROVIDER")||this.isProviderEnabled("PHONE_PRO
2013VIDER")}}async function E7(t,e){return vi(t,"GET","/v2/recaptchaConfig",fo(t,e))}/** 2014 * @license 2015 * Copyright 2020 Google LLC 2016 * 2017 * Licensed under the Apache License, Version 2.0 (the "License"); 2018 * you may not use this file except in compliance with the License. 2019 * You may obtain a copy of the License at 2020 * 2021 * http://www.apache.org/licenses/LICENSE-2.0 2022 * 2023 * Unless required by applicable law or agreed to in writing, software 2024 * distributed under the License is distributed on an "AS IS" BASIS, 2025 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 2026 * See the License for the specific language governing permissions and 2027 * limitations under the License. 2028 */async function C7(t,e){return vi(t,"POST","/v1/accounts:delete",e)}async function Ah(t,e){return vi(t,"POST","/v1/accounts:lookup",e)}/** 2029 * @license 2030 * Copyright 2020 Google LLC 2031 * 2032 * Licensed under the Apache License, Version 2.0 (the "License"); 2033 * you may not use this file except in compliance with the License. 2034 * You may obtain a copy of the License at 2035 * 2036 * http://www.apache.org/licenses/LICENSE-2.0 2037 * 2038 * Unless required by applicable law or agreed to in writing, software 2039 * distributed under the License is distributed on an "AS IS" BASIS, 2040 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 2041 * See the License for the specific language governing permissions and 2042 * limitations under the License. 2043 */function Yl(t){if(t)try{const e=new Date(Number(t));if(!isNaN(e.getTime()))return e.toUTCString()}catch{}}async function S7(t,e=!1){const n=nt(t),r=await n.getIdToken(e),s=w0(r);ee(s&&s.exp&&s.auth_time&&s.iat,n.auth,"internal-error");const i=typeof s.firebase=="object"?s.firebase:void 0,o=i==null?void 0:i.sign_in_provider;return{claims:s,token:r,authTime:Yl(fm(s.auth_time)),issuedAtTime:Yl(fm(s.iat)),expirationTime:Yl(fm(s.exp)),signInProvider:o||null,signInSecondFactor:(i==null?void 0:i.sign_in_second_factor)||null}}function fm(t){return Number(t)*1e3}function w0(t){const[e,n,r]=t.split(".");if(e===void 0||n===void 0||r===void 0)return _d("JWT malformed, contained fewer than 3 sections"),null;try{const s=gh(n);return s?JSON.parse(s):(_d("Failed to decode base64 JWT payload"),null)}catch(s){return _d("Caught error parsing JWT payload as JSON",s==null?void 0:s.toString()),null}}function ik(t){const e=w0(t);return ee(e,"internal-error"),ee(typeof e.exp<"u","internal-error"),ee(typeof e.iat<"u","internal-error"),Number(e.exp)-Number(e.iat)}/** 2044 * @license 2045 * Copyright 2020 Google LLC 2046 * 2047 * Licensed under the Apache License, Version 2.0 (the "License"); 2048 * you may not use this file except in compliance with the License. 2049 * You may obtain a copy of the License at 2050 * 2051 * http://www.apache.org/licenses/LICENSE-2.0 2052 * 2053 * Unless required by applicable law or agreed to in writing, software 2054 * distributed under the License is distributed on an "AS IS" BASIS, 2055 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 2056 * See the License for the specific language governing permissions and 2057 * limitations under the License. 2058 */async function Mc(t,e,n=!1){if(n)return e;try{return await e}catch(r){throw r instanceof ss&&N7(r)&&t.auth.currentUser===t&&await t.auth.signOut(),r}}function N7({code:t}){return t==="auth/user-disabled"||t==="auth/user-token-expired"}/** 2059 * @license 2060 * Copyright 2020 Google LLC 2061 * 2062 * Licensed under the Apache License, Version 2.0 (the "License"); 2063 * you may not use this file except in compliance with the License. 2064 * You may obtain a copy of the License at 2065 * 2066 * http://www.apache.org/licenses/LICENSE-2.0 2067 * 2068 * Unless required by applicable law or agreed to in writing, software 2069 * distributed under the License is distributed on an "AS IS" BASIS, 2070 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 2071 * See the License for the specific language governing permissions and 2072 * limitations under the License. 2073 */class T7{constructor(e){this.user=e,this.isRunning=!1,this.timerId=null,this.errorBackoff=3e4}_start(){this.isRunning||(this.isRunning=!0,this.schedule())}_stop(){this.isRunning&&(this.isRunning=!1,this.timerId!==null&&clearTimeout(this.timerId))}getInterval(e){if(e){const n=this.errorBackoff;return this.errorBackoff=Math.min(this.errorBackoff*2,96e4),n}else{this.errorBackoff=3e4;const r=(this.user.stsTokenManager.expirationTime??0)-Date.now()-3e5;return Math.max(0,r)}}schedule(e=!1){if(!this.isRunning)return;const n=this.getInterval(e);this.timerId=setTimeout(async()=>{await this.iteration()},n)}async iteration(){try{await this.user.getIdToken(!0)}catch(e){(e==null?void 0:e.code)==="auth/network-request-failed"&&this.schedule(!0);return}this.schedule()}}/** 2074 * @license 2075 * Copyright 2020 Google LLC 2076 * 2077 * Licensed under the Apache License, Version 2.0 (the "License");
2078 * you may not use this file except in compliance with the License. 2079 * You may obtain a copy of the License at 2080 * 2081 * http://www.apache.org/licenses/LICENSE-2.0 2082 * 2083 * Unless required by applicable law or agreed to in writing, software 2084 * distributed under the License is distributed on an "AS IS" BASIS, 2085 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 2086 * See the License for the specific language governing permissions and 2087 * limitations under the License. 2088 */class Ny{constructor(e,n){this.createdAt=e,this.lastLoginAt=n,this._initializeTime()}_initializeTime(){this.lastSignInTime=Yl(this.lastLoginAt),this.creationTime=Yl(this.createdAt)}_copy(e){this.createdAt=e.createdAt,this.lastLoginAt=e.lastLoginAt,this._initializeTime()}toJSON(){return{createdAt:this.createdAt,lastLoginAt:this.lastLoginAt}}}/** 2089 * @license 2090 * Copyright 2019 Google LLC 2091 * 2092 * Licensed under the Apache License, Version 2.0 (the "License"); 2093 * you may not use this file except in compliance with the License. 2094 * You may obtain a copy of the License at 2095 * 2096 * http://www.apache.org/licenses/LICENSE-2.0 2097 * 2098 * Unless required by applicable law or agreed to in writing, software 2099 * distributed under the License is distributed on an "AS IS" BASIS, 2100 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 2101 * See the License for the specific language governing permissions and 2102 * limitations under the License. 2103 */async function Dh(t){var h;const e=t.auth,n=await t.getIdToken(),r=await Mc(t,Ah(e,{idToken:n}));ee(r==null?void 0:r.users.length,e,"internal-error");const s=r.users[0];t._notifyReloadListener(s);const i=(h=s.providerUserInfo)!=null&&h.length?xj(s.providerUserInfo):[],o=P7(t.providerData,i),a=t.isAnonymous,c=!(t.email&&s.passwordHash)&&!(o!=null&&o.length),u=a?c:!1,d={uid:s.localId,displayName:s.displayName||null,photoURL:s.photoUrl||null,email:s.email||null,emailVerified:s.emailVerified||!1,phoneNumber:s.phoneNumber||null,tenantId:s.tenantId||null,providerData:o,metadata:new Ny(s.createdAt,s.lastLoginAt),isAnonymous:u};Object.assign(t,d)}async function I7(t){const e=nt(t);await Dh(e),await e.auth._persistUserIfCurrent(e),e.auth._notifyListenersIfCurrent(e)}function P7(t,e){return[...t.filter(r=>!e.some(s=>s.providerId===r.providerId)),...e]}function xj(t){return t.map(({providerId:e,...n})=>({providerId:e,uid:n.rawId||"",displayName:n.displayName||null,email:n.email||null,phoneNumber:n.phoneNumber||null,photoURL:n.photoUrl||null}))}/** 2104 * @license 2105 * Copyright 2020 Google LLC 2106 * 2107 * Licensed under the Apache License, Version 2.0 (the "License"); 2108 * you may not use this file except in compliance with the License. 2109 * You may obtain a copy of the License at 2110 * 2111 * http://www.apache.org/licenses/LICENSE-2.0 2112 * 2113 * Unless required by applicable law or agreed to in writing, software 2114 * distributed under the License is distributed on an "AS IS" BASIS, 2115 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 2116 * See the License for the specific language governing permissions and 2117 * limitations under the License. 2118 */async function j7(t,e){const n=await yj(t,{},async()=>{const r=Ga({grant_type:"refresh_token",refresh_token:e}).slice(1),{tokenApiHost:s,apiKey:i}=t.config,o=await vj(t,s,"/v1/token",`key=${i}`),a=await t._getAdditionalHeaders();a["Content-Type"]="application/x-www-form-urlencoded";const c={method:"POST",headers:a,body:r};return t.emulatorConfig&&yi(t.emulatorConfig.host)&&(c.credentials="include"),gj.fetch()(o,c)});return{accessToken:n.access_token,expiresIn:n.expires_in,refreshToken:n.refresh_token}}async function R7(t,e){return vi(t,"POST","/v2/accounts:revokeToken",fo(t,e))}/** 2119 * @license 2120 * Copyright 2020 Google LLC 2121 * 2122 * Licensed under the Apache License, Version 2.0 (the "License"); 2123 * you may not use this file except in compliance with the License. 2124 * You may obtain a copy of the License at 2125 * 2126 * http://www.apache.org/licenses/LICENSE-2.0 2127 * 2128 * Unless required by applicable law or agreed to in writing, software 2129 * distributed under the License is distributed on an "AS IS" BASIS, 2130 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 2131 * See the License for the specific language governing permissions and 2132 * limitations under the License. 2133 */class ra{constructor(){this.refreshToken=null,this.accessToken=null,this.expirationTime=null}get isExpired(){return!this.expirationTime||Date.now()>this.expirationTime-3e4}updateFromServerResponse(e){ee(e.idToken,"internal-error"),ee(typeof e.idToken<"u","internal-error"),ee(typeof e.refreshToken<"u","internal-error");
2133const n="expiresIn"in e&&typeof e.expiresIn<"u"?Number(e.expiresIn):ik(e.idToken);this.updateTokensAndExpiration(e.idToken,e.refreshToken,n)}updateFromIdToken(e){ee(e.length!==0,"internal-error");const n=ik(e);this.updateTokensAndExpiration(e,null,n)}async getToken(e,n=!1){return!n&&this.accessToken&&!this.isExpired?this.accessToken:(ee(this.refreshToken,e,"user-token-expired"),this.refreshToken?(await this.refresh(e,this.refreshToken),this.accessToken):null)}clearRefreshToken(){this.refreshToken=null}async refresh(e,n){const{accessToken:r,refreshToken:s,expiresIn:i}=await j7(e,n);this.updateTokensAndExpiration(r,s,Number(i))}updateTokensAndExpiration(e,n,r){this.refreshToken=n||null,this.accessToken=e||null,this.expirationTime=Date.now()+r*1e3}static fromJSON(e,n){const{refreshToken:r,accessToken:s,expirationTime:i}=n,o=new ra;return r&&(ee(typeof r=="string","internal-error",{appName:e}),o.refreshToken=r),s&&(ee(typeof s=="string","internal-error",{appName:e}),o.accessToken=s),i&&(ee(typeof i=="number","internal-error",{appName:e}),o.expirationTime=i),o}toJSON(){return{refreshToken:this.refreshToken,accessToken:this.accessToken,expirationTime:this.expirationTime}}_assign(e){this.accessToken=e.accessToken,this.refreshToken=e.refreshToken,this.expirationTime=e.expirationTime}_clone(){return Object.assign(new ra,this.toJSON())}_performRefresh(){return Vr("not implemented")}}/** 2134 * @license 2135 * Copyright 2020 Google LLC 2136 * 2137 * Licensed under the Apache License, Version 2.0 (the "License"); 2138 * you may not use this file except in compliance with the License. 2139 * You may obtain a copy of the License at 2140 * 2141 * http://www.apache.org/licenses/LICENSE-2.0 2142 * 2143 * Unless required by applicable law or agreed to in writing, software 2144 * distributed under the License is distributed on an "AS IS" BASIS, 2145 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 2146 * See the License for the specific language governing permissions and 2147 * limitations under the License. 2148 */function fs(t,e){ee(typeof t=="string"||typeof t>"u","internal-error",{appName:e})}class Qn{constructor({uid:e,auth:n,stsTokenManager:r,...s}){this.providerId="firebase",this.proactiveRefresh=new T7(this),this.reloadUserInfo=null,this.reloadListener=null,this.uid=e,this.auth=n,this.stsTokenManager=r,this.accessToken=r.accessToken,this.displayName=s.displayName||null,this.email=s.email||null,this.emailVerified=s.emailVerified||!1,this.phoneNumber=s.phoneNumber||null,this.photoURL=s.photoURL||null,this.isAnonymous=s.isAnonymous||!1,this.tenantId=s.tenantId||null,this.providerData=s.providerData?[...s.providerData]:[],this.metadata=new Ny(s.createdAt||void 0,s.lastLoginAt||void 0)}async getIdToken(e){const n=await Mc(this,this.stsTokenManager.getToken(this.auth,e));return ee(n,this.auth,"internal-error"),this.accessToken!==n&&(this.accessToken=n,await this.auth._persistUserIfCurrent(this),this.auth._notifyListenersIfCurrent(this)),n}getIdTokenResult(e){return S7(this,e)}reload(){return I7(this)}_assign(e){this!==e&&(ee(this.uid===e.uid,this.auth,"internal-error"),this.displayName=e.displayName,this.photoURL=e.photoURL,this.email=e.email,this.emailVerified=e.emailVerified,this.phoneNumber=e.phoneNumber,this.isAnonymous=e.isAnonymous,this.tenantId=e.tenantId,this.providerData=e.providerData.map(n=>({...n})),this.metadata._copy(e.metadata),this.stsTokenManager._assign(e.stsTokenManager))}_clone(e){const n=new Qn({...this,auth:e,stsTokenManager:this.stsTokenManager._clone()});return n.metadata._copy(this.metadata),n}_onReload(e){ee(!this.reloadListener,this.auth,"internal-error"),this.reloadListener=e,this.reloadUserInfo&&(this._notifyReloadListener(this.reloadUserInfo),this.reloadUserInfo=null)}_notifyReloadListener(e){this.reloadListener?this.reloadListener(e):this.reloadUserInfo=e}_startProactiveRefresh(){this.proactiveRefresh._start()}_stopProactiveRefresh(){this.proactiveRefresh._stop()}async _updateTokensIfNecessary(e,n=!1){let r=!1;e.idToken&&e.idToken!==this.stsTokenManager.accessToken&&(this.stsTokenManager.updateFromServerResponse(e),r=!0),n&&await Dh(this),await this.auth._persistUserIfCurrent(this),r&&this.auth._notifyListenersIfCurrent(this)}async delete(){if(kn(this.auth.app))return Promise.reject(Qs(this.auth));const e=await this.getIdToken();return await Mc(this,C7(this.auth,{idToken:e})),this.stsTokenManager.clearRefreshToken(),this.auth.signOut()}toJSON(){return{uid:this.uid,email:this.email||void 0,emailVerified:this.emailVerified,displayName:this.displayName||void 0,isA
2148nonymous:this.isAnonymous,photoURL:this.photoURL||void 0,phoneNumber:this.phoneNumber||void 0,tenantId:this.tenantId||void 0,providerData:this.providerData.map(e=>({...e})),stsTokenManager:this.stsTokenManager.toJSON(),_redirectEventId:this._redirectEventId,...this.metadata.toJSON(),apiKey:this.auth.config.apiKey,appName:this.auth.name}}get refreshToken(){return this.stsTokenManager.refreshToken||""}static _fromJSON(e,n){const r=n.displayName??void 0,s=n.email??void 0,i=n.phoneNumber??void 0,o=n.photoURL??void 0,a=n.tenantId??void 0,c=n._redirectEventId??void 0,u=n.createdAt??void 0,d=n.lastLoginAt??void 0,{uid:h,emailVerified:f,isAnonymous:p,providerData:x,stsTokenManager:g}=n;ee(h&&g,e,"internal-error");const y=ra.fromJSON(this.name,g);ee(typeof h=="string",e,"internal-error"),fs(r,e.name),fs(s,e.name),ee(typeof f=="boolean",e,"internal-error"),ee(typeof p=="boolean",e,"internal-error"),fs(i,e.name),fs(o,e.name),fs(a,e.name),fs(c,e.name),fs(u,e.name),fs(d,e.name);const w=new Qn({uid:h,auth:e,email:s,emailVerified:f,displayName:r,isAnonymous:p,photoURL:o,phoneNumber:i,tenantId:a,stsTokenManager:y,createdAt:u,lastLoginAt:d});return x&&Array.isArray(x)&&(w.providerData=x.map(v=>({...v}))),c&&(w._redirectEventId=c),w}static async _fromIdTokenResponse(e,n,r=!1){const s=new ra;s.updateFromServerResponse(n);const i=new Qn({uid:n.localId,auth:e,stsTokenManager:s,isAnonymous:r});return await Dh(i),i}static async _fromGetAccountInfoResponse(e,n,r){const s=n.users[0];ee(s.localId!==void 0,"internal-error");const i=s.providerUserInfo!==void 0?xj(s.providerUserInfo):[],o=!(s.email&&s.passwordHash)&&!(i!=null&&i.length),a=new ra;a.updateFromIdToken(r);const c=new Qn({uid:s.localId,auth:e,stsTokenManager:a,isAnonymous:o}),u={uid:s.localId,displayName:s.displayName||null,photoURL:s.photoUrl||null,email:s.email||null,emailVerified:s.emailVerified||!1,phoneNumber:s.phoneNumber||null,tenantId:s.tenantId||null,providerData:i,metadata:new Ny(s.createdAt,s.lastLoginAt),isAnonymous:!(s.email&&s.passwordHash)&&!(i!=null&&i.length)};return Object.assign(c,u),c}}/** 2149 * @license 2150 * Copyright 2020 Google LLC 2151 * 2152 * Licensed under the Apache License, Version 2.0 (the "License"); 2153 * you may not use this file except in compliance with the License. 2154 * You may obtain a copy of the License at 2155 * 2156 * http://www.apache.org/licenses/LICENSE-2.0 2157 * 2158 * Unless required by applicable law or agreed to in writing, software 2159 * distributed under the License is distributed on an "AS IS" BASIS, 2160 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 2161 * See the License for the specific language governing permissions and 2162 * limitations under the License. 2163 */const ok=new Map;function $r(t){ts(t instanceof Function,"Expected a class definition");let e=ok.get(t);return e?(ts(e instanceof t,"Instance stored in cache mismatched with class"),e):(e=new t,ok.set(t,e),e)}/** 2164 * @license 2165 * Copyright 2019 Google LLC 2166 * 2167 * Licensed under the Apache License, Version 2.0 (the "License"); 2168 * you may not use this file except in compliance with the License. 2169 * You may obtain a copy of the License at 2170 * 2171 * http://www.apache.org/licenses/LICENSE-2.0 2172 * 2173 * Unless required by applicable law or agreed to in writing, software 2174 * distributed under the License is distributed on an "AS IS" BASIS, 2175 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 2176 * See the License for the specific language governing permissions and 2177 * limitations under the License. 2178 */class wj{constructor(){this.type="NONE",this.storage={}}async _isAvailable(){return!0}async _set(e,n){this.storage[e]=n}async _get(e){const n=this.storage[e];return n===void 0?null:n}async _remove(e){delete this.storage[e]}_addListener(e,n){}_removeListener(e,n){}}wj.type="NONE";const ak=wj;/** 2179 * @license 2180 * Copyright 2019 Google LLC 2181 * 2182 * Licensed under the Apache License, Version 2.0 (the "License"); 2183 * you may not use this file except in compliance with the License. 2184 * You may obtain a copy of the License at 2185 * 2186 * http://www.apache.org/licenses/LICENSE-2.0 2187 * 2188 * Unless required by applicable law or agreed to in writing, softw
2188are 2189 * distributed under the License is distributed on an "AS IS" BASIS, 2190 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 2191 * See the License for the specific language governing permissions and 2192 * limitations under the License. 2193 */function kd(t,e,n){return`firebase:${t}:${e}:${n}`}class sa{constructor(e,n,r){this.persistence=e,this.auth=n,this.userKey=r;const{config:s,name:i}=this.auth;this.fullUserKey=kd(this.userKey,s.apiKey,i),this.fullPersistenceKey=kd("persistence",s.apiKey,i),this.boundEventHandler=n._onStorageEvent.bind(n),this.persistence._addListener(this.fullUserKey,this.boundEventHandler)}setCurrentUser(e){return this.persistence._set(this.fullUserKey,e.toJSON())}async getCurrentUser(){const e=await this.persistence._get(this.fullUserKey);if(!e)return null;if(typeof e=="string"){const n=await Ah(this.auth,{idToken:e}).catch(()=>{});return n?Qn._fromGetAccountInfoResponse(this.auth,n,e):null}return Qn._fromJSON(this.auth,e)}removeCurrentUser(){return this.persistence._remove(this.fullUserKey)}savePersistenceForRedirect(){return this.persistence._set(this.fullPersistenceKey,this.persistence.type)}async setPersistence(e){if(this.persistence===e)return;const n=await this.getCurrentUser();if(await this.removeCurrentUser(),this.persistence=e,n)return this.setCurrentUser(n)}delete(){this.persistence._removeListener(this.fullUserKey,this.boundEventHandler)}static async create(e,n,r="authUser"){if(!n.length)return new sa($r(ak),e,r);const s=(await Promise.all(n.map(async u=>{if(await u._isAvailable())return u}))).filter(u=>u);let i=s[0]||$r(ak);const o=kd(r,e.config.apiKey,e.name);let a=null;for(const u of n)try{const d=await u._get(o);if(d){let h;if(typeof d=="string"){const f=await Ah(e,{idToken:d}).catch(()=>{});if(!f)break;h=await Qn._fromGetAccountInfoResponse(e,f,d)}else h=Qn._fromJSON(e,d);u!==i&&(a=h),i=u;break}}catch{}const c=s.filter(u=>u._shouldAllowMigration);return!i._shouldAllowMigration||!c.length?new sa(i,e,r):(i=c[0],a&&await i._set(o,a.toJSON()),await Promise.all(n.map(async u=>{if(u!==i)try{await u._remove(o)}catch{}})),new sa(i,e,r))}}/** 2194 * @license 2195 * Copyright 2020 Google LLC 2196 * 2197 * Licensed under the Apache License, Version 2.0 (the "License"); 2198 * you may not use this file except in compliance with the License. 2199 * You may obtain a copy of the License at 2200 * 2201 * http://www.apache.org/licenses/LICENSE-2.0 2202 * 2203 * Unless required by applicable law or agreed to in writing, software 2204 * distributed under the License is distributed on an "AS IS" BASIS, 2205 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 2206 * See the License for the specific language governing permissions and 2207 * limitations under the License. 2208 */function lk(t){const e=t.toLowerCase();if(e.includes("opera/")||e.includes("opr/")||e.includes("opios/"))return"Opera";if(Ej(e))return"IEMobile";if(e.includes("msie")||e.includes("trident/"))return"IE";if(e.includes("edge/"))return"Edge";if(bj(e))return"Firefox";if(e.includes("silk/"))return"Silk";if(Sj(e))return"Blackberry";if(Nj(e))return"Webos";if(_j(e))return"Safari";if((e.includes("chrome/")||kj(e))&&!e.includes("edge/"))return"Chrome";if(Cj(e))return"Android";{const n=/([a-zA-Z\d\.]+)\/[a-zA-Z\d\.]*$/,r=t.match(n);if((r==null?void 0:r.length)===2)return r[1]}return"Other"}function bj(t=Wt()){return/firefox\//i.test(t)}function _j(t=Wt()){const e=t.toLowerCase();return e.includes("safari/")&&!e.includes("chrome/")&&!e.includes("crios/")&&!e.includes("android")}function kj(t=Wt()){return/crios\//i.test(t)}function Ej(t=Wt()){return/iemobile/i.test(t)}function Cj(t=Wt()){return/android/i.test(t)}function Sj(t=Wt()){return/blackberry/i.test(t)}function Nj(t=Wt()){return/webos/i.test(t)}function b0(t=Wt()){return/iphone|ipad|ipod/i.test(t)||/macintosh/i.test(t)&&/mobile/i.test(t)}function A7(t=Wt()){var e;return b0(t)&&!!((e=window.navigator)!=null&&e.standalone)}function D7(){return D8()&&document.documentMode===10}function Tj(t=Wt()){return b0(t)||Cj(t)||Nj(t)||Sj(t)||/windows phone/i.test(t)||Ej(t)}/** 2209 * @license 2210 * Copyright 2020 Google LLC 2211 * 2212 * Licensed under the Apache License, Version 2.0 (the "License");
2213 * you may not use this file except in compliance with the License. 2214 * You may obtain a copy of the License at 2215 * 2216 * http://www.apache.org/licenses/LICENSE-2.0 2217 * 2218 * Unless required by applicable law or agreed to in writing, software 2219 * distributed under the License is distributed on an "AS IS" BASIS, 2220 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 2221 * See the License for the specific language governing permissions and 2222 * limitations under the License. 2223 */function Ij(t,e=[]){let n;switch(t){case"Browser":n=lk(Wt());break;case"Worker":n=`${lk(Wt())}-${t}`;break;default:n=t}const r=e.length?e.join(","):"FirebaseCore-web";return`${n}/JsCore/${uo}/${r}`}/** 2224 * @license 2225 * Copyright 2022 Google LLC 2226 * 2227 * Licensed under the Apache License, Version 2.0 (the "License"); 2228 * you may not use this file except in compliance with the License. 2229 * You may obtain a copy of the License at 2230 * 2231 * http://www.apache.org/licenses/LICENSE-2.0 2232 * 2233 * Unless required by applicable law or agreed to in writing, software 2234 * distributed under the License is distributed on an "AS IS" BASIS, 2235 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 2236 * See the License for the specific language governing permissions and 2237 * limitations under the License. 2238 */class M7{constructor(e){this.auth=e,this.queue=[]}pushCallback(e,n){const r=i=>new Promise((o,a)=>{try{const c=e(i);o(c)}catch(c){a(c)}});r.onAbort=n,this.queue.push(r);const s=this.queue.length-1;return()=>{this.queue[s]=()=>Promise.resolve()}}async runMiddleware(e){if(this.auth.currentUser===e)return;const n=[];try{for(const r of this.queue)await r(e),r.onAbort&&n.push(r.onAbort)}catch(r){n.reverse();for(const s of n)try{s()}catch{}throw this.auth._errorFactory.create("login-blocked",{originalMessage:r==null?void 0:r.message})}}}/** 2239 * @license 2240 * Copyright 2023 Google LLC 2241 * 2242 * Licensed under the Apache License, Version 2.0 (the "License"); 2243 * you may not use this file except in compliance with the License. 2244 * You may obtain a copy of the License at 2245 * 2246 * http://www.apache.org/licenses/LICENSE-2.0 2247 * 2248 * Unless required by applicable law or agreed to in writing, software 2249 * distributed under the License is distributed on an "AS IS" BASIS, 2250 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 2251 * See the License for the specific language governing permissions and 2252 * limitations under the License. 2253 */async function O7(t,e={}){return vi(t,"GET","/v2/passwordPolicy",fo(t,e))}/** 2254 * @license 2255 * Copyright 2023 Google LLC 2256 * 2257 * Licensed under the Apache License, Version 2.0 (the "License"); 2258 * you may not use this file except in compliance with the License. 2259 * You may obtain a copy of the License at 2260 * 2261 * http://www.apache.org/licenses/LICENSE-2.0 2262 * 2263 * Unless required by applicable law or agreed to in writing, software 2264 * distributed under the License is distributed on an "AS IS" BASIS, 2265 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 2266 * See the License for the specific language governing permissions and 2267 * limitations under the License. 2268 */const L7=6;class F7{constructor(e){var r;const n=e.customStrengthOptions;this.customStrengthOptions={},this.customStrengthOptions.minPasswordLength=n.minPasswordLength??L7,n.maxPasswordLength&&(this.customStrengthOptions.maxPasswordLength=n.maxPasswordLength),n.containsLowercaseCharacter!==void 0&&(this.customStrengthOptions.containsLowercaseLetter=n.containsLowercaseCharacter),n.containsUppercaseCharacter!==void 0&&(this.customStrengthOptions.containsUppercaseLetter=n.containsUppercaseCharacter),n.containsNumericCharacter!==void 0&&(this.customStrengthOptions.containsNumericCharacter=n.containsNumericCharacter),n.containsNonAlphanumericCharacter!==void 0&&(this.customStrengthOptions.containsNonAlphanumericCharacter=n.containsNonAlphanumericCharacter),this.enforcementState=e.enforcementState,this.enforcementState==="ENFORCEMENT_STATE_UNSPECIFIED"&&(this.enforcementState="OFF"),this.allowedNonAlphanumericCharacters=((r=e.allowedNonAlphanumericCharacters)==null?void 0:r.join(""))??"",this.forceUpgradeOnSignin=e.forceUpgradeOnSignin??!1,this.schemaVersion=e.schemaVersion}validatePassword(e){const n={isValid:!0,passwordPolicy:this};return this.validatePasswordLengthOptions(e,n),this.validatePasswordCharacterOptions(e,n),n.isValid&&
2268(n.isValid=n.meetsMinPasswordLength??!0),n.isValid&&(n.isValid=n.meetsMaxPasswordLength??!0),n.isValid&&(n.isValid=n.containsLowercaseLetter??!0),n.isValid&&(n.isValid=n.containsUppercaseLetter??!0),n.isValid&&(n.isValid=n.containsNumericCharacter??!0),n.isValid&&(n.isValid=n.containsNonAlphanumericCharacter??!0),n}validatePasswordLengthOptions(e,n){const r=this.customStrengthOptions.minPasswordLength,s=this.customStrengthOptions.maxPasswordLength;r&&(n.meetsMinPasswordLength=e.length>=r),s&&(n.meetsMaxPasswordLength=e.length<=s)}validatePasswordCharacterOptions(e,n){this.updatePasswordCharacterOptionsStatuses(n,!1,!1,!1,!1);let r;for(let s=0;s<e.length;s++)r=e.charAt(s),this.updatePasswordCharacterOptionsStatuses(n,r>="a"&&r<="z",r>="A"&&r<="Z",r>="0"&&r<="9",this.allowedNonAlphanumericCharacters.includes(r))}updatePasswordCharacterOptionsStatuses(e,n,r,s,i){this.customStrengthOptions.containsLowercaseLetter&&(e.containsLowercaseLetter||(e.containsLowercaseLetter=n)),this.customStrengthOptions.containsUppercaseLetter&&(e.containsUppercaseLetter||(e.containsUppercaseLetter=r)),this.customStrengthOptions.containsNumericCharacter&&(e.containsNumericCharacter||(e.containsNumericCharacter=s)),this.customStrengthOptions.containsNonAlphanumericCharacter&&(e.containsNonAlphanumericCharacter||(e.containsNonAlphanumericCharacter=i))}}/** 2269 * @license 2270 * Copyright 2020 Google LLC 2271 * 2272 * Licensed under the Apache License, Version 2.0 (the "License"); 2273 * you may not use this file except in compliance with the License. 2274 * You may obtain a copy of the License at 2275 * 2276 * http://www.apache.org/licenses/LICENSE-2.0 2277 * 2278 * Unless required by applicable law or agreed to in writing, software 2279 * distributed under the License is distributed on an "AS IS" BASIS, 2280 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 2281 * See the License for the specific language governing permissions and 2282 * limitations under the License. 2283 */class U7{constructor(e,n,r,s){this.app=e,this.heartbeatServiceProvider=n,this.appCheckServiceProvider=r,this.config=s,this.currentUser=null,this.emulatorConfig=null,this.operations=Promise.resolve(),this.authStateSubscription=new ck(this),this.idTokenSubscription=new ck(this),this.beforeStateQueue=new M7(this),this.redirectUser=null,this.isProactiveRefreshEnabled=!1,this.EXPECTED_PASSWORD_POLICY_SCHEMA_VERSION=1,this._canInitEmulator=!0,this._isInitialized=!1,this._deleted=!1,this._initializationPromise=null,this._popupRedirectResolver=null,this._errorFactory=pj,this._agentRecaptchaConfig=null,this._tenantRecaptchaConfigs={},this._projectPasswordPolicy=null,this._tenantPasswordPolicies={},this._resolvePersistenceManagerAvailable=void 0,this.lastNotifiedUid=void 0,this.languageCode=null,this.tenantId=null,this.settings={appVerificationDisabledForTesting:!1},this.frameworks=[],this.name=e.name,this.clientVersion=s.sdkClientVersion,this._persistenceManagerAvailable=new Promise(i=>this._resolvePersistenceManagerAvailable=i)}_initializeWithPersistence(e,n){return n&&(this._popupRedirectResolver=$r(n)),this._initializationPromise=this.queue(async()=>{var r,s,i;if(!this._deleted&&(this.persistenceManager=await sa.create(this,e),(r=this._resolvePersistenceManagerAvailable)==null||r.call(this),!this._deleted)){if((s=this._popupRedirectResolver)!=null&&s._shouldInitProactively)try{await this._popupRedirectResolver._initialize(this)}catch{}await this.initializeCurrentUser(n),this.lastNotifiedUid=((i=this.currentUser)==null?void 0:i.uid)||null,!this._deleted&&(this._isInitialized=!0)}}),this._initializationPromise}async _onStorageEvent(){if(this._deleted)return;const e=await this.assertedPersistence.getCurrentUser();if(!(!this.currentUser&&!e)){if(this.currentUser&&e&&this.currentUser.uid===e.uid){this._currentUser._assign(e),await this.currentUser.getIdToken();return}await this._updateCurrentUser(e,!0)}}async initializeCurrentUserFromIdToken(e){try{const n=await Ah(this,{idToken:e}),r=await Qn._fromGetAccountInfoResponse(this,n,e);await this.directlySetCurrentUser(r)}catch(n){console.warn("FirebaseServerApp could not login user with provided authIdToken: ",n),await this.directlySetCurrentUser(null)}}async initializeCurrentUser(e){var i;if(kn(this.app)){const o=this.app.settings.authIdToken;return o?new Promise(a=>{setTimeout(()=>this.initializeCurrentUserFromIdToken(o).then(a,a))}):this.directlySetCurrentUser(null)}const n=await this.assertedPersistence.getCurrentUser();let r=n,s=!1;if(e&&this.config.authDomain){await this.getOrInitRedirectPersistenceManager();const o=(i=this.redirectUser)==null?void 0:i._redirectEventId,a=r==null?void 0:r._redirectEventId,c=await this.tryRedirectSignIn(e);(!o||o===a)&&(c!=null&&c.user)&&(r=c.user,s=!0)}if(!r)return this.directlySetCurrentUser(null);
2283if(!r._redirectEventId){if(s)try{await this.beforeStateQueue.runMiddleware(r)}catch(o){r=n,this._popupRedirectResolver._overrideRedirectResult(this,()=>Promise.reject(o))}return r?this.reloadAndSetCurrentUserOrClear(r):this.directlySetCurrentUser(null)}return ee(this._popupRedirectResolver,this,"argument-error"),await this.getOrInitRedirectPersistenceManager(),this.redirectUser&&this.redirectUser._redirectEventId===r._redirectEventId?this.directlySetCurrentUser(r):this.reloadAndSetCurrentUserOrClear(r)}async tryRedirectSignIn(e){let n=null;try{n=await this._popupRedirectResolver._completeRedirectFn(this,e,!0)}catch{await this._setRedirectUser(null)}return n}async reloadAndSetCurrentUserOrClear(e){try{await Dh(e)}catch(n){if((n==null?void 0:n.code)!=="auth/network-request-failed")return this.directlySetCurrentUser(null)}return this.directlySetCurrentUser(e)}useDeviceLanguage(){this.languageCode=y7()}async _delete(){this._deleted=!0}async updateCurrentUser(e){if(kn(this.app))return Promise.reject(Qs(this));const n=e?nt(e):null;return n&&ee(n.auth.config.apiKey===this.config.apiKey,this,"invalid-user-token"),this._updateCurrentUser(n&&n._clone(this))}async _updateCurrentUser(e,n=!1){if(!this._deleted)return e&&ee(this.tenantId===e.tenantId,this,"tenant-id-mismatch"),n||await this.beforeStateQueue.runMiddleware(e),this.queue(async()=>{await this.directlySetCurrentUser(e),this.notifyAuthListeners()})}async signOut(){return kn(this.app)?Promise.reject(Qs(this)):(await this.beforeStateQueue.runMiddleware(null),(this.redirectPersistenceManager||this._popupRedirectResolver)&&await this._setRedirectUser(null),this._updateCurrentUser(null,!0))}setPersistence(e){return kn(this.app)?Promise.reject(Qs(this)):this.queue(async()=>{await this.assertedPersistence.setPersistence($r(e))})}_getRecaptchaConfig(){return this.tenantId==null?this._agentRecaptchaConfig:this._tenantRecaptchaConfigs[this.tenantId]}async validatePassword(e){this._getPasswordPolicyInternal()||await this._updatePasswordPolicy();const n=this._getPasswordPolicyInternal();return n.schemaVersion!==this.EXPECTED_PASSWORD_POLICY_SCHEMA_VERSION?Promise.reject(this._errorFactory.create("unsupported-password-policy-schema-version",{})):n.validatePassword(e)}_getPasswordPolicyInternal(){return this.tenantId===null?this._projectPasswordPolicy:this._tenantPasswordPolicies[this.tenantId]}async _updatePasswordPolicy(){const e=await O7(this),n=new F7(e);this.tenantId===null?this._projectPasswordPolicy=n:this._tenantPasswordPolicies[this.tenantId]=n}_getPersistenceType(){return this.assertedPersistence.persistence.type}_getPersistence(){return this.assertedPersistence.persistence}_updateErrorMap(e){this._errorFactory=new Zc("auth","Firebase",e())}onAuthStateChanged(e,n,r){return this.registerStateListener(this.authStateSubscription,e,n,r)}beforeAuthStateChanged(e,n){return this.beforeStateQueue.pushCallback(e,n)}onIdTokenChanged(e,n,r){return this.registerStateListener(this.idTokenSubscription,e,n,r)}authStateReady(){return new Promise((e,n)=>{if(this.currentUser)e();else{const r=this.onAuthStateChanged(()=>{r(),e()},n)}})}async revokeAccessToken(e){if(this.currentUser){const n=await this.currentUser.getIdToken(),r={providerId:"apple.com",tokenType:"ACCESS_TOKEN",token:e,idToken:n};this.tenantId!=null&&(r.tenantId=this.tenantId),await R7(this,r)}}toJSON(){var e;return{apiKey:this.config.apiKey,authDomain:this.config.authDomain,appName:this.name,currentUser:(e=this._currentUser)==null?void 0:e.toJSON()}}async _setRedirectUser(e,n){const r=await this.getOrInitRedirectPersistenceManager(n);return e===null?r.removeCurrentUser():r.setCurrentUser(e)}async getOrInitRedirectPersistenceManager(e){if(!this.redirectPersistenceManager){const n=e&&$r(e)||this._popupRedirectResolver;ee(n,this,"argument-error"),this.redirectPersistenceManager=await sa.create(this,[$r(n._redirectPersistence)],"redirectUser"),this.redirectUser=await this.redirectPersistenceManager.getCurrentUser()}return this.redirectPersistenceManager}async _redirectUserForId(e){var n,r;return this._isInitialized&&await this.queue(async()=>{}),((n=this._currentUser)==null?void 0:n._redirectEventId)===e?this._currentUser:((r=this.redirectUser)==null?void 0:r._redirectEventId)===e?this.redirectUser:null}async _persistUserIfCurrent(e){if(e===this.currentUser)return this.queue(async()=>this.directlySetCurrentUser(e))}_notifyListenersIfCurrent(e){e===this.currentUser&&this.notifyAuthListeners()}_key(){return`${this.config.authDomain}:${this.config.apiKey}:${this.name}`}_startProactiveRefresh(){this.isProactiveRefreshEnabled=!0,this.currentUser&&this._currentUser._startProactiveRefresh()}_stopProactiveRefresh(){this.isProactiveRefreshEnabled=!1,this.currentUser&&this._currentUser._stopProactiveRefresh()}get _currentUser(){return this.currentUser}notifyAuthListeners(){var n;if(!this._isInitialized)return;this.idTokenSubscription.next(this.currentUser);const e=((n=this.currentUser)==null?void 0:n.uid)??null;this.lastNotifiedUid!==e&&(this.lastNotifiedUid=e,this.authStateSubscription.next(this.currentUser))}registerStateListener(e,n,r,s){if(this._deleted)return()=>{};const i=typeof n=="function"?n:n.next.bind(n);let o=!1;const a=this._isInitialized?Promise.resolve():this._initializationPromise;if(ee(a,this,"internal-error"),a.then(()=>{o||i(this.currentUser)}),typeof n=="function"){const c=e.addObserver(n,r,s);return()=>{o=!0,c()}}else{const c=e.addObserver(n);return()=>{o=!0,c()}}}async directlySetCurrentUser(e){this.currentUser&&this.currentUser!==e&&this._currentUser._stopProactiveRefresh(),e&&this.isProactiveRefreshEnabled&&e._startProactiveRefresh(),this.currentUser=e,e?await this.assertedPersistence.setCurrentUser(e):await this.assertedPersistence.removeCurrentUser()}queue(e){return this.operations=this.operations.then(e,e),this.operations}get assertedPersistence(){return ee(this.persistenceManager,this,"internal-error"),this.persistenceManager}_logFramework(e){!e||this.frameworks.includes(e)||(this.frameworks.push(e),this.frameworks.sort(),this.clientVersion=Ij(this.config.clientPlatform,this._getFrameworks()))}_getFrameworks(){return this.frameworks}async _getAdditionalHeaders(){var s;const e={"X-Client-Version":this.clientVersion};this.app.options.appId&&(e["X-Firebase-gmpid"]=this.app.options.appId);const n=await((s=this.heartbeatServiceProvider.getImmediate({optional:!0}))==null?void 0:s.getHeartbeatsHeader());n&&(e["X-Firebase-Client"]=n);const r=await this._getAppCheckToken();return r&&(e["X-Firebase-AppCheck"]=r),e}async _getAppCheckToken(){var n;if(kn(this.app)&&this.app.settings.appCheckToken)return this.app.settings.appCheckToken;const e=await((n=this.appCheckServiceProvider.getImmediate({optional:!0}))==null?void 0:n.getToken());return e!=null&&e.error&&p7(`Error while retrieving App Check token: ${e.error}`),e==null?void 0:e.token}}function Xa(t){return nt(t)}class ck{constructor(e){this.auth=e,this.observer=null,this.addObserver=z8(n=>this.observer=n)}get next(){return ee(this.observer,this.auth,"internal-error"),this.observer.next.bind(this.observer)}}/** 2284 * @license 2285 * Copyright 2020 Google LLC 2286 * 2287 * Licensed under the Apache License, Version 2.0 (the "License");
2288 * you may not use this file except in compliance with the License. 2289 * You may obtain a copy of the License at 2290 * 2291 * http://www.apache.org/licenses/LICENSE-2.0 2292 * 2293 * Unless required by applicable law or agreed to in writing, software 2294 * distributed under the License is distributed on an "AS IS" BASIS, 2295 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 2296 * See the License for the specific language governing permissions and 2297 * limitations under the License. 2298 */let Uf={async loadJS(){throw new Error("Unable to load external scripts")},recaptchaV2Script:"",recaptchaEnterpriseScript:"",gapiScript:""};function B7(t){Uf=t}function Pj(t){return Uf.loadJS(t)}function V7(){return Uf.recaptchaEnterpriseScript}function $7(){return Uf.gapiScript}function z7(t){return`__${t}${Math.floor(Math.random()*1e6)}`}class W7{constructor(){this.enterprise=new H7}ready(e){e()}execute(e,n){return Promise.resolve("token")}render(e,n){return""}}class H7{ready(e){e()}execute(e,n){return Promise.resolve("token")}render(e,n){return""}}const K7="recaptcha-enterprise",jj="NO_RECAPTCHA";class G7{constructor(e){this.type=K7,this.auth=Xa(e)}async verify(e="verify",n=!1){async function r(i){if(!n){if(i.tenantId==null&&i._agentRecaptchaConfig!=null)return i._agentRecaptchaConfig.siteKey;if(i.tenantId!=null&&i._tenantRecaptchaConfigs[i.tenantId]!==void 0)return i._tenantRecaptchaConfigs[i.tenantId].siteKey}return new Promise(async(o,a)=>{E7(i,{clientType:"CLIENT_TYPE_WEB",version:"RECAPTCHA_ENTERPRISE"}).then(c=>{if(c.recaptchaKey===void 0)a(new Error("recaptcha Enterprise site key undefined"));else{const u=new k7(c);return i.tenantId==null?i._agentRecaptchaConfig=u:i._tenantRecaptchaConfigs[i.tenantId]=u,o(u.siteKey)}}).catch(c=>{a(c)})})}function s(i,o,a){const c=window.grecaptcha;sk(c)?c.enterprise.ready(()=>{c.enterprise.execute(i,{action:e}).then(u=>{o(u)}).catch(()=>{o(jj)})}):a(Error("No reCAPTCHA enterprise script loaded."))}return this.auth.settings.appVerificationDisabledForTesting?new W7().execute("siteKey",{action:"verify"}):new Promise((i,o)=>{r(this.auth).then(a=>{if(!n&&sk(window.grecaptcha))s(a,i,o);else{if(typeof window>"u"){o(new Error("RecaptchaVerifier is only supported in browser"));return}let c=V7();c.length!==0&&(c+=a),Pj(c).then(()=>{s(a,i,o)}).catch(u=>{o(u)})}}).catch(a=>{o(a)})})}}async function uk(t,e,n,r=!1,s=!1){const i=new G7(t);let o;if(s)o=jj;else try{o=await i.verify(n)}catch{o=await i.verify(n,!0)}const a={...e};if(n==="mfaSmsEnrollment"||n==="mfaSmsSignIn"){if("phoneEnrollmentInfo"in a){const c=a.phoneEnrollmentInfo.phoneNumber,u=a.phoneEnrollmentInfo.recaptchaToken;Object.assign(a,{phoneEnrollmentInfo:{phoneNumber:c,recaptchaToken:u,captchaResponse:o,clientType:"CLIENT_TYPE_WEB",recaptchaVersion:"RECAPTCHA_ENTERPRISE"}})}else if("phoneSignInInfo"in a){const c=a.phoneSignInInfo.recaptchaToken;Object.assign(a,{phoneSignInInfo:{recaptchaToken:c,captchaResponse:o,clientType:"CLIENT_TYPE_WEB",recaptchaVersion:"RECAPTCHA_ENTERPRISE"}})}return a}return r?Object.assign(a,{captchaResp:o}):Object.assign(a,{captchaResponse:o}),Object.assign(a,{clientType:"CLIENT_TYPE_WEB"}),Object.assign(a,{recaptchaVersion:"RECAPTCHA_ENTERPRISE"}),a}async function dk(t,e,n,r,s){var i;if((i=t._getRecaptchaConfig())!=null&&i.isProviderEnabled("EMAIL_PASSWORD_PROVIDER")){const o=await uk(t,e,n,n==="getOobCode");return r(t,o)}else return r(t,e).catch(async o=>{if(o.code==="auth/missing-recaptcha-token"){console.log(`${n} is protected by reCAPTCHA Enterprise for this project. Automatically triggering the reCAPTCHA flow and restarting the flow.`);const a=await uk(t,e,n,n==="getOobCode");return r(t,a)}else return Promise.reject(o)})}/** 2299 * @license 2300 * Copyright 2020 Google LLC 2301 * 2302 * Licensed under the Apache License, Version 2.0 (the "License"); 2303 * you may not use this file except in compliance with the License. 2304 * You may obtain a copy of the License at 2305 * 2306 * http://www.apache.org/licenses/LICENSE-2.0 2307 * 2308 * Unless required by applicable law or agreed to in writing, software 2309 * distributed under the License is distributed on an "AS IS" BASIS, 2310 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 2311 * See the License for the specific language governing permissions and 2312 * limitations under the License. 2313 */function q7(t,e){const n=Nf(t,"auth");if(n.isInitialized()){const s=n.getImmediate(),i=n.getOptions();if(Ji(i,e??{}))return s;sr(s,"already-initialized")}return n.initialize({options:e})}function Y7(t,e){const n=(e==null?void 0:e.persistence)||[],r=(Array.isArray(n)?n:[n]).map($r);e!=null&&e.errorMap&&t._updateErrorMap(e.errorMap),t._initializeWithPersistence(r,e==null?void 0:e.popupRedirectResolver)}function Q7(t,e,n){const r=Xa(t);
2313ee(/^https?:\/\//.test(e),r,"invalid-emulator-scheme");const s=!!(n!=null&&n.disableWarnings),i=Rj(e),{host:o,port:a}=X7(e),c=a===null?"":`:${a}`,u={url:`${i}//${o}${c}/`},d=Object.freeze({host:o,port:a,protocol:i.replace(":",""),options:Object.freeze({disableWarnings:s})});if(!r._canInitEmulator){ee(r.config.emulator&&r.emulatorConfig,r,"emulator-config-failed"),ee(Ji(u,r.config.emulator)&&Ji(d,r.emulatorConfig),r,"emulator-config-failed");return}r.config.emulator=u,r.emulatorConfig=d,r.settings.appVerificationDisabledForTesting=!0,yi(o)?(Mx(`${i}//${o}${c}`),Ox("Auth",!0)):J7()}function Rj(t){const e=t.indexOf(":");return e<0?"":t.substr(0,e+1)}function X7(t){const e=Rj(t),n=/(\/\/)?([^?#/]+)/.exec(t.substr(e.length));if(!n)return{host:"",port:null};const r=n[2].split("@").pop()||"",s=/^(\[[^\]]+\])(:|$)/.exec(r);if(s){const i=s[1];return{host:i,port:hk(r.substr(i.length+1))}}else{const[i,o]=r.split(":");return{host:i,port:hk(o)}}}function hk(t){if(!t)return null;const e=Number(t);return isNaN(e)?null:e}function J7(){function t(){const e=document.createElement("p"),n=e.style;e.innerText="Running in emulator mode. Do not use with production credentials.",n.position="fixed",n.width="100%",n.backgroundColor="#ffffff",n.border=".1em solid #000000",n.color="#b50000",n.bottom="0px",n.left="0px",n.margin="0px",n.zIndex="10000",n.textAlign="center",e.classList.add("firebase-emulator-warning"),document.body.appendChild(e)}typeof console<"u"&&typeof console.info=="function"&&console.info("WARNING: You are using the Auth Emulator, which is intended for local testing only. Do not use with production credentials."),typeof window<"u"&&typeof document<"u"&&(document.readyState==="loading"?window.addEventListener("DOMContentLoaded",t):t())}/** 2314 * @license 2315 * Copyright 2020 Google LLC 2316 * 2317 * Licensed under the Apache License, Version 2.0 (the "License"); 2318 * you may not use this file except in compliance with the License. 2319 * You may obtain a copy of the License at 2320 * 2321 * http://www.apache.org/licenses/LICENSE-2.0 2322 * 2323 * Unless required by applicable law or agreed to in writing, software 2324 * distributed under the License is distributed on an "AS IS" BASIS, 2325 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 2326 * See the License for the specific language governing permissions and 2327 * limitations under the License. 2328 */class _0{constructor(e,n){this.providerId=e,this.signInMethod=n}toJSON(){return Vr("not implemented")}_getIdTokenResponse(e){return Vr("not implemented")}_linkToIdToken(e,n){return Vr("not implemented")}_getReauthenticationResolver(e){return Vr("not implemented")}}async function Z7(t,e){return vi(t,"POST","/v1/accounts:signUp",e)}/** 2329 * @license 2330 * Copyright 2020 Google LLC 2331 * 2332 * Licensed under the Apache License, Version 2.0 (the "License"); 2333 * you may not use this file except in compliance with the License. 2334 * You may obtain a copy of the License at 2335 * 2336 * http://www.apache.org/licenses/LICENSE-2.0 2337 * 2338 * Unless required by applicable law or agreed to in writing, software 2339 * distributed under the License is distributed on an "AS IS" BASIS, 2340 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 2341 * See the License for the specific language governing permissions and 2342 * limitations under the License. 2343 */async function e9(t,e){return Ff(t,"POST","/v1/accounts:signInWithPassword",fo(t,e))}/** 2344 * @license 2345 * Copyright 2020 Google LLC 2346 * 2347 * Licensed under the Apache License, Version 2.0 (the "License"); 2348 * you may not use this file except in compliance with the License. 2349 * You may obtain a copy of the License at 2350 * 2351 * http://www.apache.org/licenses/LICENSE-2.0 2352 * 2353 * Unless required by applicable law or agreed to in writing, software 2354 * distributed under the License is distributed on an "AS IS" BASIS, 2355 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 2356 * See the License for the specific language governing permissions and 2357 * limitations under the License. 2358 */async function t9(t,e){return Ff(t,"POST","/v1/accounts:signInWithEmailLink",fo(t,e))}async function n9(t,e){return Ff(t,"POST","/v1/accounts:signInWithEmailLink",fo(t,e))}/** 2359 * @license 2360 * Copyright 2020 Google LLC 2361 * 2362 * Licensed under the Apache License, Version 2.0 (the "License");
2363 * you may not use this file except in compliance with the License. 2364 * You may obtain a copy of the License at 2365 * 2366 * http://www.apache.org/licenses/LICENSE-2.0 2367 * 2368 * Unless required by applicable law or agreed to in writing, software 2369 * distributed under the License is distributed on an "AS IS" BASIS, 2370 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 2371 * See the License for the specific language governing permissions and 2372 * limitations under the License. 2373 */class Oc extends _0{constructor(e,n,r,s=null){super("password",r),this._email=e,this._password=n,this._tenantId=s}static _fromEmailAndPassword(e,n){return new Oc(e,n,"password")}static _fromEmailAndCode(e,n,r=null){return new Oc(e,n,"emailLink",r)}toJSON(){return{email:this._email,password:this._password,signInMethod:this.signInMethod,tenantId:this._tenantId}}static fromJSON(e){const n=typeof e=="string"?JSON.parse(e):e;if(n!=null&&n.email&&(n!=null&&n.password)){if(n.signInMethod==="password")return this._fromEmailAndPassword(n.email,n.password);if(n.signInMethod==="emailLink")return this._fromEmailAndCode(n.email,n.password,n.tenantId)}return null}async _getIdTokenResponse(e){switch(this.signInMethod){case"password":const n={returnSecureToken:!0,email:this._email,password:this._password,clientType:"CLIENT_TYPE_WEB"};return dk(e,n,"signInWithPassword",e9);case"emailLink":return t9(e,{email:this._email,oobCode:this._password});default:sr(e,"internal-error")}}async _linkToIdToken(e,n){switch(this.signInMethod){case"password":const r={idToken:n,returnSecureToken:!0,email:this._email,password:this._password,clientType:"CLIENT_TYPE_WEB"};return dk(e,r,"signUpPassword",Z7);case"emailLink":return n9(e,{idToken:n,email:this._email,oobCode:this._password});default:sr(e,"internal-error")}}_getReauthenticationResolver(e){return this._getIdTokenResponse(e)}}/** 2374 * @license 2375 * Copyright 2020 Google LLC 2376 * 2377 * Licensed under the Apache License, Version 2.0 (the "License"); 2378 * you may not use this file except in compliance with the License. 2379 * You may obtain a copy of the License at 2380 * 2381 * http://www.apache.org/licenses/LICENSE-2.0 2382 * 2383 * Unless required by applicable law or agreed to in writing, software 2384 * distributed under the License is distributed on an "AS IS" BASIS, 2385 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 2386 * See the License for the specific language governing permissions and 2387 * limitations under the License. 2388 */async function ia(t,e){return Ff(t,"POST","/v1/accounts:signInWithIdp",fo(t,e))}/** 2389 * @license 2390 * Copyright 2020 Google LLC 2391 * 2392 * Licensed under the Apache License, Version 2.0 (the "License"); 2393 * you may not use this file except in compliance with the License. 2394 * You may obtain a copy of the License at 2395 * 2396 * http://www.apache.org/licenses/LICENSE-2.0 2397 * 2398 * Unless required by applicable law or agreed to in writing, software 2399 * distributed under the License is distributed on an "AS IS" BASIS, 2400 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 2401 * See the License for the specific language governing permissions and 2402 * limitations under the License. 2403 */const r9="http://localhost";class ro extends _0{constructor(){super(...arguments),this.pendingToken=null}static _fromParams(e){const n=new ro(e.providerId,e.signInMethod);return e.idToken||e.accessToken?(e.idToken&&(n.idToken=e.idToken),e.accessToken&&(n.accessToken=e.accessToken),e.nonce&&!e.pendingToken&&(n.nonce=e.nonce),e.pendingToken&&(n.pendingToken=e.pendingToken)):e.oauthToken&&e.oauthTokenSecret?(n.accessToken=e.oauthToken,n.secret=e.oauthTokenSecret):sr("argument-error"),n}toJSON(){return{idToken:this.idToken,accessToken:this.accessToken,secret:this.secret,n
2403once:this.nonce,pendingToken:this.pendingToken,providerId:this.providerId,signInMethod:this.signInMethod}}static fromJSON(e){const n=typeof e=="string"?JSON.parse(e):e,{providerId:r,signInMethod:s,...i}=n;if(!r||!s)return null;const o=new ro(r,s);return o.idToken=i.idToken||void 0,o.accessToken=i.accessToken||void 0,o.secret=i.secret,o.nonce=i.nonce,o.pendingToken=i.pendingToken||null,o}_getIdTokenResponse(e){const n=this.buildRequest();return ia(e,n)}_linkToIdToken(e,n){const r=this.buildRequest();return r.idToken=n,ia(e,r)}_getReauthenticationResolver(e){const n=this.buildRequest();return n.autoCreate=!1,ia(e,n)}buildRequest(){const e={requestUri:r9,returnSecureToken:!0};if(this.pendingToken)e.pendingToken=this.pendingToken;else{const n={};this.idToken&&(n.id_token=this.idToken),this.accessToken&&(n.access_token=this.accessToken),this.secret&&(n.oauth_token_secret=this.secret),n.providerId=this.providerId,this.nonce&&!this.pendingToken&&(n.nonce=this.nonce),e.postBody=Ga(n)}return e}}/** 2404 * @license 2405 * Copyright 2020 Google LLC 2406 * 2407 * Licensed under the Apache License, Version 2.0 (the "License"); 2408 * you may not use this file except in compliance with the License. 2409 * You may obtain a copy of the License at 2410 * 2411 * http://www.apache.org/licenses/LICENSE-2.0 2412 * 2413 * Unless required by applicable law or agreed to in writing, software 2414 * distributed under the License is distributed on an "AS IS" BASIS, 2415 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 2416 * See the License for the specific language governing permissions and 2417 * limitations under the License. 2418 */function s9(t){switch(t){case"recoverEmail":return"RECOVER_EMAIL";case"resetPassword":return"PASSWORD_RESET";case"signIn":return"EMAIL_SIGNIN";case"verifyEmail":return"VERIFY_EMAIL";case"verifyAndChangeEmail":return"VERIFY_AND_CHANGE_EMAIL";case"revertSecondFactorAddition":return"REVERT_SECOND_FACTOR_ADDITION";default:return null}}function i9(t){const e=Cl(Sl(t)).link,n=e?Cl(Sl(e)).deep_link_id:null,r=Cl(Sl(t)).deep_link_id;return(r?Cl(Sl(r)).link:null)||r||n||e||t}class k0{constructor(e){const n=Cl(Sl(e)),r=n.apiKey??null,s=n.oobCode??null,i=s9(n.mode??null);ee(r&&s&&i,"argument-error"),this.apiKey=r,this.operation=i,this.code=s,this.continueUrl=n.continueUrl??null,this.languageCode=n.lang??null,this.tenantId=n.tenantId??null}static parseLink(e){const n=i9(e);try{return new k0(n)}catch{return null}}}/** 2419 * @license 2420 * Copyright 2020 Google LLC 2421 * 2422 * Licensed under the Apache License, Version 2.0 (the "License"); 2423 * you may not use this file except in compliance with the License. 2424 * You may obtain a copy of the License at 2425 * 2426 * http://www.apache.org/licenses/LICENSE-2.0 2427 * 2428 * Unless required by applicable law or agreed to in writing, software 2429 * distributed under the License is distributed on an "AS IS" BASIS, 2430 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 2431 * See the License for the specific language governing permissions and 2432 * limitations under the License. 2433 */class Ja{constructor(){this.providerId=Ja.PROVIDER_ID}static credential(e,n){return Oc._fromEmailAndPassword(e,n)}static credentialWithLink(e,n){const r=k0.parseLink(n);return ee(r,"argument-error"),Oc._fromEmailAndCode(e,r.code,r.tenantId)}}Ja.PROVIDER_ID="password";Ja.EMAIL_PASSWORD_SIGN_IN_METHOD="password";Ja.EMAIL_LINK_SIGN_IN_METHOD="emailLink";/** 2434 * @license 2435 * Copyright 2020 Google LLC 2436 * 2437 * Licensed under the Apache License, Version 2.0 (the "License"); 2438 * you may not use this file except in compliance with the License. 2439 * You may obtain a copy of the License at 2440 * 2441 * http://www.apache.org/licenses/LICENSE-2.0 2442 * 2443 * Unless required by applicable law or agreed to in writing, software 2444 * distributed under the License is distributed on an "AS IS" BASIS, 2445 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 2446 * See the License for the specific language governing permissions and 2447 * limitations under the License. 2448 */class Aj{constructor(e){this.providerId=e,this.defaultLanguageCode=null,this.customParameters={}}setDefaultLanguage(e){this.defaultLanguageCode=e}setCustomParameters(e){return this.customParameters=e,this}getCustomParameters(){return this.customParameters}}/** 2449 * @license 2450 * Copyright 2019 Google LLC 2451 * 2452 * Licensed under the Apache License, Version 2.0 (the "License");
2453 * you may not use this file except in compliance with the License. 2454 * You may obtain a copy of the License at 2455 * 2456 * http://www.apache.org/licenses/LICENSE-2.0 2457 * 2458 * Unless required by applicable law or agreed to in writing, software 2459 * distributed under the License is distributed on an "AS IS" BASIS, 2460 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 2461 * See the License for the specific language governing permissions and 2462 * limitations under the License. 2463 */class au extends Aj{constructor(){super(...arguments),this.scopes=[]}addScope(e){return this.scopes.includes(e)||this.scopes.push(e),this}getScopes(){return[...this.scopes]}}/** 2464 * @license 2465 * Copyright 2020 Google LLC 2466 * 2467 * Licensed under the Apache License, Version 2.0 (the "License"); 2468 * you may not use this file except in compliance with the License. 2469 * You may obtain a copy of the License at 2470 * 2471 * http://www.apache.org/licenses/LICENSE-2.0 2472 * 2473 * Unless required by applicable law or agreed to in writing, software 2474 * distributed under the License is distributed on an "AS IS" BASIS, 2475 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 2476 * See the License for the specific language governing permissions and 2477 * limitations under the License. 2478 */class ks extends au{constructor(){super("facebook.com")}static credential(e){return ro._fromParams({providerId:ks.PROVIDER_ID,signInMethod:ks.FACEBOOK_SIGN_IN_METHOD,accessToken:e})}static credentialFromResult(e){return ks.credentialFromTaggedObject(e)}static credentialFromError(e){return ks.credentialFromTaggedObject(e.customData||{})}static credentialFromTaggedObject({_tokenResponse:e}){if(!e||!("oauthAccessToken"in e)||!e.oauthAccessToken)return null;try{return ks.credential(e.oauthAccessToken)}catch{return null}}}ks.FACEBOOK_SIGN_IN_METHOD="facebook.com";ks.PROVIDER_ID="facebook.com";/** 2479 * @license 2480 * Copyright 2020 Google LLC 2481 * 2482 * Licensed under the Apache License, Version 2.0 (the "License"); 2483 * you may not use this file except in compliance with the License. 2484 * You may obtain a copy of the License at 2485 * 2486 * http://www.apache.org/licenses/LICENSE-2.0 2487 * 2488 * Unless required by applicable law or agreed to in writing, software 2489 * distributed under the License is distributed on an "AS IS" BASIS, 2490 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 2491 * See the License for the specific language governing permissions and 2492 * limitations under the License. 2493 */class Es extends au{constructor(){super("google.com"),this.addScope("profile")}static credential(e,n){return ro._fromParams({providerId:Es.PROVIDER_ID,signInMethod:Es.GOOGLE_SIGN_IN_METHOD,idToken:e,accessToken:n})}static credentialFromResult(e){return Es.credentialFromTaggedObject(e)}static credentialFromError(e){return Es.credentialFromTaggedObject(e.customData||{})}static credentialFromTaggedObject({_tokenResponse:e}){if(!e)return null;const{oauthIdToken:n,oauthAccessToken:r}=e;if(!n&&!r)return null;try{return Es.credential(n,r)}catch{return null}}}Es.GOOGLE_SIGN_IN_METHOD="google.com";Es.PROVIDER_ID="google.com";/** 2494 * @license 2495 * Copyright 2020 Google LLC 2496 * 2497 * Licensed under the Apache License, Version 2.0 (the "License"); 2498 * you may not use this file except in compliance with the License. 2499 * You may obtain a copy of the License at 2500 * 2501 * http://www.apache.org/licenses/LICENSE-2.0 2502 * 2503 * Unless required by applicable law or agreed to in writing, software 2504 * distributed under the License is distributed on an "AS IS" BASIS, 2505 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 2506 * See the License for the specific language governing permissions and 2507 * limitations under the License. 2508 */class Cs extends au{constructor(){super("github.com")}static credential(e){return ro._fromParams({providerId:Cs.PROVIDER_ID,signInMethod:Cs.GITHUB_SIGN_IN_METHOD,accessToken:e})}static credentialFromResult(e){return Cs.credentialFromTaggedObject(e)}static credentialFromError(e){return Cs.credentialFromTaggedObject(e.customData||{})}static credentialFromTaggedObject({_tokenResponse:e}){if(!e||!("oauthAccessToken"in e)||!e.oauthAccessToken)return null;try{return Cs.credential(e.oauthAccessToken)}catch{return null}}}Cs.GITHUB_SIGN_IN_METHOD="github.com";Cs.PROVIDER_ID="github.com";/** 2509 * @license 2510 * Copyright 2020 Google LLC 2511 * 2512 * Licensed under the Apache License, Version 2.0 (the "License");
2513 * you may not use this file except in compliance with the License. 2514 * You may obtain a copy of the License at 2515 * 2516 * http://www.apache.org/licenses/LICENSE-2.0 2517 * 2518 * Unless required by applicable law or agreed to in writing, software 2519 * distributed under the License is distributed on an "AS IS" BASIS, 2520 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 2521 * See the License for the specific language governing permissions and 2522 * limitations under the License. 2523 */class Ss extends au{constructor(){super("twitter.com")}static credential(e,n){return ro._fromParams({providerId:Ss.PROVIDER_ID,signInMethod:Ss.TWITTER_SIGN_IN_METHOD,oauthToken:e,oauthTokenSecret:n})}static credentialFromResult(e){return Ss.credentialFromTaggedObject(e)}static credentialFromError(e){return Ss.credentialFromTaggedObject(e.customData||{})}static credentialFromTaggedObject({_tokenResponse:e}){if(!e)return null;const{oauthAccessToken:n,oauthTokenSecret:r}=e;if(!n||!r)return null;try{return Ss.credential(n,r)}catch{return null}}}Ss.TWITTER_SIGN_IN_METHOD="twitter.com";Ss.PROVIDER_ID="twitter.com";/** 2524 * @license 2525 * Copyright 2020 Google LLC 2526 * 2527 * Licensed under the Apache License, Version 2.0 (the "License"); 2528 * you may not use this file except in compliance with the License. 2529 * You may obtain a copy of the License at 2530 * 2531 * http://www.apache.org/licenses/LICENSE-2.0 2532 * 2533 * Unless required by applicable law or agreed to in writing, software 2534 * distributed under the License is distributed on an "AS IS" BASIS, 2535 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 2536 * See the License for the specific language governing permissions and 2537 * limitations under the License. 2538 */class Pa{constructor(e){this.user=e.user,this.providerId=e.providerId,this._tokenResponse=e._tokenResponse,this.operationType=e.operationType}static async _fromIdTokenResponse(e,n,r,s=!1){const i=await Qn._fromIdTokenResponse(e,r,s),o=fk(r);return new Pa({user:i,providerId:o,_tokenResponse:r,operationType:n})}static async _forOperation(e,n,r){await e._updateTokensIfNecessary(r,!0);const s=fk(r);return new Pa({user:e,providerId:s,_tokenResponse:r,operationType:n})}}function fk(t){return t.providerId?t.providerId:"phoneNumber"in t?"phone":null}/** 2539 * @license 2540 * Copyright 2020 Google LLC 2541 * 2542 * Licensed under the Apache License, Version 2.0 (the "License"); 2543 * you may not use this file except in compliance with the License. 2544 * You may obtain a copy of the License at 2545 * 2546 * http://www.apache.org/licenses/LICENSE-2.0 2547 * 2548 * Unless required by applicable law or agreed to in writing, software 2549 * distributed under the License is distributed on an "AS IS" BASIS, 2550 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 2551 * See the License for the specific language governing permissions and 2552 * limitations under the License. 2553 */class Mh extends ss{constructor(e,n,r,s){super(n.code,n.message),this.operationType=r,this.user=s,Object.setPrototypeOf(this,Mh.prototype),this.customData={appName:e.name,tenantId:e.tenantId??void 0,_serverResponse:n.customData._serverResponse,operationType:r}}static _fromErrorAndOperation(e,n,r,s){return new Mh(e,n,r,s)}}function Dj(t,e,n,r){return(e==="reauthenticate"?n._getReauthenticationResolver(t):n._getIdTokenResponse(t)).catch(i=>{throw i.code==="auth/multi-factor-auth-required"?Mh._fromErrorAndOperation(t,i,e,r):i})}async function o9(t,e,n=!1){const r=await Mc(t,e._linkToIdToken(t.auth,await t.getIdToken()),n);return Pa._forOperation(t,"link",r)}/** 2554 * @license 2555 * Copyright 2019 Google LLC 2556 * 2557 * Licensed under the Apache License, Version 2.0 (the "License"); 2558 * you may not use this file except in compliance with the License. 2559 * You may obtain a copy of the License at 2560 * 2561 * http://www.apache.org/licenses/LICENSE-2.0 2562 * 2563 * Unless required by applicable law or agreed to in writing, software 2564 * distributed under the License is distributed on an "AS IS" BASIS, 2565 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 2566 * See the License for the specific language governing permissions and 2567 * limitations under the License. 2568 */async function a9(t,e,n=!1){const{auth:r}=t;if(kn(r.app))return Promise.reject(Qs(r));const s="reauthenticate";try{const i=await Mc(t,Dj(r,s,e,t),n);ee(i.idToken,r,"internal-error");const o=w0(i.idToken);ee(o,r,"internal-error");const{sub:a}=o;return ee(t.uid===a,r,"user-mismatch"),Pa._forOperation(t,s,i)}catch(i){throw(i==null?void 0:i.code)==="auth/user-not-found"&&sr(r,"user-mismatch"),i}}/** 2569 * @license 2570 * Copyright 2020 Google LLC 2571 * 2572 * Licensed under the Apache License, Version 2.0 (the "License");
2573 * you may not use this file except in compliance with the License. 2574 * You may obtain a copy of the License at 2575 * 2576 * http://www.apache.org/licenses/LICENSE-2.0 2577 * 2578 * Unless required by applicable law or agreed to in writing, software 2579 * distributed under the License is distributed on an "AS IS" BASIS, 2580 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 2581 * See the License for the specific language governing permissions and 2582 * limitations under the License. 2583 */async function Mj(t,e,n=!1){if(kn(t.app))return Promise.reject(Qs(t));const r="signIn",s=await Dj(t,r,e),i=await Pa._fromIdTokenResponse(t,r,s);return n||await t._updateCurrentUser(i.user),i}async function l9(t,e){return Mj(Xa(t),e)}/** 2584 * @license 2585 * Copyright 2020 Google LLC 2586 * 2587 * Licensed under the Apache License, Version 2.0 (the "License"); 2588 * you may not use this file except in compliance with the License. 2589 * You may obtain a copy of the License at 2590 * 2591 * http://www.apache.org/licenses/LICENSE-2.0 2592 * 2593 * Unless required by applicable law or agreed to in writing, software 2594 * distributed under the License is distributed on an "AS IS" BASIS, 2595 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 2596 * See the License for the specific language governing permissions and 2597 * limitations under the License. 2598 */async function c9(t){const e=Xa(t);e._getPasswordPolicyInternal()&&await e._updatePasswordPolicy()}function u9(t,e,n){return kn(t.app)?Promise.reject(Qs(t)):l9(nt(t),Ja.credential(e,n)).catch(async r=>{throw r.code==="auth/password-does-not-meet-requirements"&&c9(t),r})}function d9(t,e,n,r){return nt(t).onIdTokenChanged(e,n,r)}function h9(t,e,n){return nt(t).beforeAuthStateChanged(e,n)}function f9(t,e,n,r){return nt(t).onAuthStateChanged(e,n,r)}function p9(t){return nt(t).signOut()}const Oh="__sak";/** 2599 * @license 2600 * Copyright 2019 Google LLC 2601 * 2602 * Licensed under the Apache License, Version 2.0 (the "License"); 2603 * you may not use this file except in compliance with the License. 2604 * You may obtain a copy of the License at 2605 * 2606 * http://www.apache.org/licenses/LICENSE-2.0 2607 * 2608 * Unless required by applicable law or agreed to in writing, software 2609 * distributed under the License is distributed on an "AS IS" BASIS, 2610 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 2611 * See the License for the specific language governing permissions and 2612 * limitations under the License. 2613 */class Oj{constructor(e,n){this.storageRetriever=e,this.type=n}_isAvailable(){try{return this.storage?(this.storage.setItem(Oh,"1"),this.storage.removeItem(Oh),Promise.resolve(!0)):Promise.resolve(!1)}catch{return Promise.resolve(!1)}}_set(e,n){return this.storage.setItem(e,JSON.stringify(n)),Promise.resolve()}_get(e){const n=this.storage.getItem(e);return Promise.resolve(n?JSON.parse(n):null)}_remove(e){return this.storage.removeItem(e),Promise.resolve()}get storage(){return this.storageRetriever()}}/** 2614 * @license 2615 * Copyright 2020 Google LLC 2616 * 2617 * Licensed under the Apache License, Version 2.0 (the "License"); 2618 * you may not use this file except in compliance with the License. 2619 * You may obtain a copy of the License at 2620 * 2621 * http://www.apache.org/licenses/LICENSE-2.0 2622 * 2623 * Unless required by applicable law or agreed to in writing, software 2624 * distributed under the License is distributed on an "AS IS" BASIS, 2625 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 2626 * See the License for the specific language governing permissions and 2627 * limitations under the License. 2628 */const m9=1e3,g9=10;class Lj extends Oj{constructor(){super(()=>window.localStorage,"LOCAL"),this.boundEventHandler=(e,n)=>this.onStorageEvent(e,n),this.listeners={},this.localCache={},this.pollTimer=null,this.fallbackToPolling=Tj(),this._shouldAllowMigration=!0}forAllChangedKeys(e){for(const n of Object.keys(this.listeners)){const r=this.storage.getItem(n),s=this.localCache[n];r!==s&&e(n,s,r)}}onStorageEvent(e,n=!1){if(!e.key){this.forAllChangedKeys((o,a,c)=>{this.notifyListeners(o,c)});return}const r=e.key;n?this.detachListener():this.stopPolling();const s=()=>{const o=this.storage.getItem(r);!n&&this.localCache[r]===o||this.notifyListeners(r,o)},i=this.storage.getItem(r);D7()&&i!==e.newValue&&e.newValue!==e.oldValue?setTimeout(s,g9):s()}notifyListeners(e,n){this.localCache[e]=n;const r=this.listeners[e];if(r)for(const s of Array.from(r))s(n&&JSON.parse(n))}startPolling(){this.stopPolling(),this.pollTimer=setInterval(()=>{this.forAllChangedKeys((e,n,r)=>{this.onStorageEvent(new StorageEvent("storage",{key:e,oldValue:n,newValue:r}),!0)})},m9)}stopPolling(){this.pollTimer&&(clearInterval(this.pollTimer),this.pollTimer=null)}attachListener(){window.addEventListener("storage",this.boundEventHandler)}detachListener(){window.removeEventListener("storage",this.boundEventHandler)}_addListener(e,n){Object.keys(this.listeners).length===0&&(this.fallbackToPolling?this.startPolling():this.attachListener()),this.listeners[e]||(this.listeners[e]=new Set,this.localCache[e]=this.storage.getItem(e)),this.listeners[e].add(n)}_removeListener(e,n){this.listeners[e]&&(this.listeners[e].delete(n),this.listeners[e].size===0&&delete this.listeners[e]),Ob
2628ject.keys(this.listeners).length===0&&(this.detachListener(),this.stopPolling())}async _set(e,n){await super._set(e,n),this.localCache[e]=JSON.stringify(n)}async _get(e){const n=await super._get(e);return this.localCache[e]=JSON.stringify(n),n}async _remove(e){await super._remove(e),delete this.localCache[e]}}Lj.type="LOCAL";const y9=Lj;/** 2629 * @license 2630 * Copyright 2020 Google LLC 2631 * 2632 * Licensed under the Apache License, Version 2.0 (the "License"); 2633 * you may not use this file except in compliance with the License. 2634 * You may obtain a copy of the License at 2635 * 2636 * http://www.apache.org/licenses/LICENSE-2.0 2637 * 2638 * Unless required by applicable law or agreed to in writing, software 2639 * distributed under the License is distributed on an "AS IS" BASIS, 2640 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 2641 * See the License for the specific language governing permissions and 2642 * limitations under the License. 2643 */class Fj extends Oj{constructor(){super(()=>window.sessionStorage,"SESSION")}_addListener(e,n){}_removeListener(e,n){}}Fj.type="SESSION";const Uj=Fj;/** 2644 * @license 2645 * Copyright 2019 Google LLC 2646 * 2647 * Licensed under the Apache License, Version 2.0 (the "License"); 2648 * you may not use this file except in compliance with the License. 2649 * You may obtain a copy of the License at 2650 * 2651 * http://www.apache.org/licenses/LICENSE-2.0 2652 * 2653 * Unless required by applicable law or agreed to in writing, software 2654 * distributed under the License is distributed on an "AS IS" BASIS, 2655 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 2656 * See the License for the specific language governing permissions and 2657 * limitations under the License. 2658 */function v9(t){return Promise.all(t.map(async e=>{try{return{fulfilled:!0,value:await e}}catch(n){return{fulfilled:!1,reason:n}}}))}/** 2659 * @license 2660 * Copyright 2019 Google LLC 2661 * 2662 * Licensed under the Apache License, Version 2.0 (the "License"); 2663 * you may not use this file except in compliance with the License. 2664 * You may obtain a copy of the License at 2665 * 2666 * http://www.apache.org/licenses/LICENSE-2.0 2667 * 2668 * Unless required by applicable law or agreed to in writing, software 2669 * distributed under the License is distributed on an "AS IS" BASIS, 2670 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 2671 * See the License for the specific language governing permissions and 2672 * limitations under the License. 2673 */class Bf{constructor(e){this.eventTarget=e,this.handlersMap={},this.boundEventHandler=this.handleEvent.bind(this)}static _getInstance(e){const n=this.receivers.find(s=>s.isListeningto(e));if(n)return n;const r=new Bf(e);return this.receivers.push(r),r}isListeningto(e){return this.eventTarget===e}async handleEvent(e){const n=e,{eventId:r,eventType:s,data:i}=n.data,o=this.handlersMap[s];if(!(o!=null&&o.size))return;n.ports[0].postMessage({status:"ack",eventId:r,eventType:s});const a=Array.from(o).map(async u=>u(n.origin,i)),c=await v9(a);n.ports[0].postMessage({status:"done",eventId:r,eventType:s,response:c})}_subscribe(e,n){Object.keys(this.handlersMap).length===0&&this.eventTarget.addEventListener("message",this.boundEventHandler),this.handlersMap[e]||(this.handlersMap[e]=new Set),this.handlersMap[e].add(n)}_unsubscribe(e,n){this.handlersMap[e]&&n&&this.handlersMap[e].delete(n),(!n||this.handlersMap[e].size===0)&&delete this.handlersMap[e],Object.keys(this.handlersMap).length===0&&this.eventTarget.removeEventListener("message",this.boundEventHandler)}}Bf.receivers=[];/** 2674 * @license 2675 * Copyright 2020 Google LLC 2676 * 2677 * Licensed under the Apache License, Version 2.0 (the "License"); 2678 * you may not use this file except in compliance with the License. 2679 * You may obtain a copy of the License at 2680 * 2681 * http://www.apache.org/licenses/LICENSE-2.0 2682 * 2683 * Unless required by applicable law or agreed to in writing, software 2684 * distributed under the License is distributed on an "AS IS" BASIS, 2685 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 2686 * See the License for the specific language governing permissions and 2687 * limitations under the License. 2688 */function E0(t="",e=10){let n="";for(let r=0;r<e;r++)n+=Math.floor(Math.random()*10);return t+n}/** 2689 * @license 2690 * Copyright 2019 Google LLC 2691 * 2692 * Licensed under the Apache License, Version 2.0 (the "License");
2693 * you may not use this file except in compliance with the License. 2694 * You may obtain a copy of the License at 2695 * 2696 * http://www.apache.org/licenses/LICENSE-2.0 2697 * 2698 * Unless required by applicable law or agreed to in writing, software 2699 * distributed under the License is distributed on an "AS IS" BASIS, 2700 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 2701 * See the License for the specific language governing permissions and 2702 * limitations under the License. 2703 */class x9{constructor(e){this.target=e,this.handlers=new Set}removeMessageHandler(e){e.messageChannel&&(e.messageChannel.port1.removeEventListener("message",e.onMessage),e.messageChannel.port1.close()),this.handlers.delete(e)}async _send(e,n,r=50){const s=typeof MessageChannel<"u"?new MessageChannel:null;if(!s)throw new Error("connection_unavailable");let i,o;return new Promise((a,c)=>{const u=E0("",20);s.port1.start();const d=setTimeout(()=>{c(new Error("unsupported_event"))},r);o={messageChannel:s,onMessage(h){const f=h;if(f.data.eventId===u)switch(f.data.status){case"ack":clearTimeout(d),i=setTimeout(()=>{c(new Error("timeout"))},3e3);break;case"done":clearTimeout(i),a(f.data.response);break;default:clearTimeout(d),clearTimeout(i),c(new Error("invalid_response"));break}}},this.handlers.add(o),s.port1.addEventListener("message",o.onMessage),this.target.postMessage({eventType:e,eventId:u,data:n},[s.port2])}).finally(()=>{o&&this.removeMessageHandler(o)})}}/** 2704 * @license 2705 * Copyright 2020 Google LLC 2706 * 2707 * Licensed under the Apache License, Version 2.0 (the "License"); 2708 * you may not use this file except in compliance with the License. 2709 * You may obtain a copy of the License at 2710 * 2711 * http://www.apache.org/licenses/LICENSE-2.0 2712 * 2713 * Unless required by applicable law or agreed to in writing, software 2714 * distributed under the License is distributed on an "AS IS" BASIS, 2715 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 2716 * See the License for the specific language governing permissions and 2717 * limitations under the License. 2718 */function Sr(){return window}function w9(t){Sr().location.href=t}/** 2719 * @license 2720 * Copyright 2020 Google LLC. 2721 * 2722 * Licensed under the Apache License, Version 2.0 (the "License"); 2723 * you may not use this file except in compliance with the License. 2724 * You may obtain a copy of the License at 2725 * 2726 * http://www.apache.org/licenses/LICENSE-2.0 2727 * 2728 * Unless required by applicable law or agreed to in writing, software 2729 * distributed under the License is distributed on an "AS IS" BASIS, 2730 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 2731 * See the License for the specific language governing permissions and 2732 * limitations under the License. 2733 */function Bj(){return typeof Sr().WorkerGlobalScope<"u"&&typeof Sr().importScripts=="function"}async function b9(){if(!(navigator!=null&&navigator.serviceWorker))return null;try{return(await navigator.serviceWorker.ready).active}catch{return null}}function _9(){var t;return((t=navigator==null?void 0:navigator.serviceWorker)==null?void 0:t.controller)||null}function k9(){return Bj()?self:null}/** 2734 * @license 2735 * Copyright 2019 Google LLC 2736 * 2737 * Licensed under the Apache License, Version 2.0 (the "License"); 2738 * you may not use this file except in compliance with the License. 2739 * You may obtain a copy of the License at 2740 * 2741 * http://www.apache.org/licenses/LICENSE-2.0 2742 * 2743 * Unless required by applicable law or agreed to in writing, software 2744 * distributed under the License is distributed on an "AS IS" BASIS, 2745 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 2746 * See the License for the specific language governing permissions and 2747 * limitations under the License. 2748 */const Vj="firebaseLocalStorageDb",E9=1,Lh="firebaseLocalStorage",$j="fbase_key";class lu{constructor(e){this.request=e}toPromise(){return new Promise((e,n)=>{this.request.addEventListener("success",()=>{e(this.request.result)}),this.request.addEventListener("error",()=>{n(this.request.error)})})}}function Vf(t,e){return t.transaction([Lh],e?"readwrite":"readonly").objectStore(Lh
2748)}function C9(){const t=indexedDB.deleteDatabase(Vj);return new lu(t).toPromise()}function Ty(){const t=indexedDB.open(Vj,E9);return new Promise((e,n)=>{t.addEventListener("error",()=>{n(t.error)}),t.addEventListener("upgradeneeded",()=>{const r=t.result;try{r.createObjectStore(Lh,{keyPath:$j})}catch(s){n(s)}}),t.addEventListener("success",async()=>{const r=t.result;r.objectStoreNames.contains(Lh)?e(r):(r.close(),await C9(),e(await Ty()))})})}async function pk(t,e,n){const r=Vf(t,!0).put({[$j]:e,value:n});return new lu(r).toPromise()}async function S9(t,e){const n=Vf(t,!1).get(e),r=await new lu(n).toPromise();return r===void 0?null:r.value}function mk(t,e){const n=Vf(t,!0).delete(e);return new lu(n).toPromise()}const N9=800,T9=3;class zj{constructor(){this.type="LOCAL",this._shouldAllowMigration=!0,this.listeners={},this.localCache={},this.pollTimer=null,this.pendingWrites=0,this.receiver=null,this.sender=null,this.serviceWorkerReceiverAvailable=!1,this.activeServiceWorker=null,this._workerInitializationPromise=this.initializeServiceWorkerMessaging().then(()=>{},()=>{})}async _openDb(){return this.db?this.db:(this.db=await Ty(),this.db)}async _withRetries(e){let n=0;for(;;)try{const r=await this._openDb();return await e(r)}catch(r){if(n++>T9)throw r;this.db&&(this.db.close(),this.db=void 0)}}async initializeServiceWorkerMessaging(){return Bj()?this.initializeReceiver():this.initializeSender()}async initializeReceiver(){this.receiver=Bf._getInstance(k9()),this.receiver._subscribe("keyChanged",async(e,n)=>({keyProcessed:(await this._poll()).includes(n.key)}
2748)),this.receiver._subscribe("ping",async(e,n)=>["keyChanged"])}async initializeSender(){var n,r;if(this.activeServiceWorker=await b9(),!this.activeServiceWorker)return;this.sender=new x9(this.activeServiceWorker);const e=await this.sender._send("ping",{},800);e&&(n=e[0])!=null&&n.fulfilled&&(r=e[0])!=null&&r.value.includes("keyChanged")&&(this.serviceWorkerReceiverAvailable=!0)}async notifyServiceWorker(e){if(!(!this.sender||!this.activeServiceWorker||_9()!==this.activeServiceWorker))try{await this.sender._send("keyChanged",{key:e},this.serviceWorkerReceiverAvailable?800:50)}catch{}}async _isAvailable(){try{if(!indexedDB)return!1;const e=await Ty();return await pk(e,Oh,"1"),await mk(e,Oh),!0}catch{}return!1}async _withPendingWrite(e){this.pendingWrites++;try{await e()}finally{this.pendingWrites--}}async _set(e,n){return this._withPendingWrite(async()=>(await this._withRetries(r=>pk(r,e,n)),this.localCache[e]=n,this.notifyServiceWorker(e)))}async _get(e){const n=await this._withRetries(r=>S9(r,e));return this.localCache[e]=n,n}async _remove(e){return this._withPendingWrite(async()=>(await this._withRetries(n=>mk(n,e)),delete this.localCache[e],this.notifyServiceWorker(e)))}async _poll(){const e=await this._withRetries(s=>{const i=Vf(s,!1).getAll();return new lu(i).toPromise()});if(!e)return[];if(this.pendingWrites!==0)return[];const n=[],r=new Set;if(e.length!==0)for(const{fbase_key:s,value:i}of e)r.add(s),JSON.stringify(this.localCache[s])!==JSON.stringify(i)&&(this.notifyListeners(s,i),n.push(s));for(const s of Object.keys(this.localCache))this.localCache[s]&&!r.has(s)&&(this.notifyListeners(s,null),n.push(s));return n}notifyListeners(e,n){this.localCache[e]=n;const r=this.listeners[e];if(r)for(const s of Array.from(r))s(n)}startPolling(){this.stopPolling(),this.pollTimer=setInterval(async()=>this._poll(),N9)}stopPolling(){this.pollTimer&&(clearInterval(this.pollTimer),this.pollTimer=null)}_addListener(e,n){Object.keys(this.listeners).length===0&&this.startPolling(),this.listeners[e]||(this.listeners[e]=new Set,this._get(e)),this.listeners[e].add(n)}_removeListener(e,n){this.listeners[e]&&(this.listeners[e].delete(n),this.listeners[e].size===0&&delete this.listeners[e]),Ob
vendor: 4,318 bytes, lines 2748-2797
2748ject.keys(this.listeners).length===0&&this.stopPolling()}}zj.type="LOCAL";const I9=zj;new ou(3e4,6e4);/** 2749 * @license 2750 * Copyright 2021 Google LLC 2751 * 2752 * Licensed under the Apache License, Version 2.0 (the "License"); 2753 * you may not use this file except in compliance with the License. 2754 * You may obtain a copy of the License at 2755 * 2756 * http://www.apache.org/licenses/LICENSE-2.0 2757 * 2758 * Unless required by applicable law or agreed to in writing, software 2759 * distributed under the License is distributed on an "AS IS" BASIS, 2760 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 2761 * See the License for the specific language governing permissions and 2762 * limitations under the License. 2763 */function P9(t,e){return e?$r(e):(ee(t._popupRedirectResolver,t,"argument-error"),t._popupRedirectResolver)}/** 2764 * @license 2765 * Copyright 2019 Google LLC 2766 * 2767 * Licensed under the Apache License, Version 2.0 (the "License"); 2768 * you may not use this file except in compliance with the License. 2769 * You may obtain a copy of the License at 2770 * 2771 * http://www.apache.org/licenses/LICENSE-2.0 2772 * 2773 * Unless required by applicable law or agreed to in writing, software 2774 * distributed under the License is distributed on an "AS IS" BASIS, 2775 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 2776 * See the License for the specific language governing permissions and 2777 * limitations under the License. 2778 */class C0 extends _0{constructor(e){super("custom","custom"),this.params=e}_getIdTokenResponse(e){return ia(e,this._buildIdpRequest())}_linkToIdToken(e,n){return ia(e,this._buildIdpRequest(n))}_getReauthenticationResolver(e){return ia(e,this._buildIdpRequest())}_buildIdpRequest(e){const n={requestUri:this.params.requestUri,sessionId:this.params.sessionId,postBody:this.params.postBody,tenantId:this.params.tenantId,pendingToken:this.params.pendingToken,returnSecureToken:!0,returnIdpCredential:!0};return e&&(n.idToken=e),n}}function j9(t){return Mj(t.auth,new C0(t),t.bypassAuthState)}function R9(t){const{auth:e,user:n}=t;return ee(n,e,"internal-error"),a9(n,new C0(t),t.bypassAuthState)}async function A9(t){const{auth:e,user:n}=t;return ee(n,e,"internal-error"),o9(n,new C0(t),t.bypassAuthState)}/** 2779 * @license 2780 * Copyright 2020 Google LLC 2781 * 2782 * Licensed under the Apache License, Version 2.0 (the "License"); 2783 * you may not use this file except in compliance with the License. 2784 * You may obtain a copy of the License at 2785 * 2786 * http://www.apache.org/licenses/LICENSE-2.0 2787 * 2788 * Unless required by applicable law or agreed to in writing, software 2789 * distributed under the License is distributed on an "AS IS" BASIS, 2790 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 2791 * See the License for the specific language governing permissions and 2792 * limitations under the License. 2793 */class Wj{constructor(e,n,r,s,i=!1){this.auth=e,this.resolver=r,this.user=s,this.bypassAuthState=i,this.pendingPromise=null,this.eventManager=null,this.filter=Array.isArray(n)?n:[n]}execute(){return new Promise(async(e,n)=>{this.pendingPromise={resolve:e,reject:n};try{this.eventManager=await this.resolver._initialize(this.auth),await this.onExecution(),this.eventManager.registerConsumer(this)}catch(r){this.reject(r)}})}async onAuthEvent(e){const{urlResponse:n,sessionId:r,postBody:s,tenantId:i,error:o,type:a}=e;if(o){this.reject(o);return}const c={auth:this.auth,requestUri:n,sessionId:r,tenantId:i||void 0,postBody:s||void 0,user:this.user,bypassAuthState:this.bypassAuthState};try{this.resolve(await this.getIdpTask(a)(c))}catch(u){this.reject(u)}}onError(e){this.reject(e)}getIdpTask(e){switch(e){case"signInViaPopup":case"signInViaRedirect":return j9;case"linkViaPopup":case"linkViaRedirect":return A9;case"reauthViaPopup":case"reauthViaRedirect":return R9;default:sr(this.auth,"internal-error")}}resolve(e){ts(this.pendingPromise,"Pending promise was never set"),this.pendingPromise.resolve(e),this.unregisterAndCleanUp()}reject(e){ts(this.pendingPromise,"Pending promise was never set"),this.pendingPromise.reject(e),this.unregisterAndCleanUp()}unregisterAndCleanUp(){this.eventManager&&this.eventManager.unregisterConsumer(this),this.pendingPromise=null,this.cleanUp()}}/** 2794 * @license 2795 * Copyright 2020 Google LLC 2796 * 2797 * Licensed under the Apache License, Version 2.0 (the "License");
2798 * you may not use this file except in compliance with the License. 2799 * You may obtain a copy of the License at 2800 * 2801 * http://www.apache.org/licenses/LICENSE-2.0 2802 * 2803 * Unless required by applicable law or agreed to in writing, software 2804 * distributed under the License is distributed on an "AS IS" BASIS, 2805 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 2806 * See the License for the specific language governing permissions and 2807 * limitations under the License. 2808 */const D9=new ou(2e3,1e4);class zo extends Wj{constructor(e,n,r,s,i){super(e,n,s,i),this.provider=r,this.authWindow=null,this.pollId=null,zo.currentPopupAction&&zo.currentPopupAction.cancel(),zo.currentPopupAction=this}async executeNotNull(){const e=await this.execute();return ee(e,this.auth,"internal-error"),e}async onExecution(){ts(this.filter.length===1,"Popup operations only handle one event");const e=E0();this.authWindow=await this.resolver._openPopup(this.auth,this.provider,this.filter[0],e),this.authWindow.associatedEvent=e,this.resolver._originValidation(this.auth).catch(n=>{this.reject(n)}),this.resolver._isIframeWebStorageSupported(this.auth,n=>{n||this.reject(Cr(this.auth,"web-storage-unsupported"))}),this.pollUserCancellation()}get eventId(){var e;return((e=this.authWindow)==null?void 0:e.associatedEvent)||null}cancel(){this.reject(Cr(this.auth,"cancelled-popup-request"))}cleanUp(){this.authWindow&&this.authWindow.close(),this.pollId&&window.clearTimeout(this.pollId),this.authWindow=null,this.pollId=null,zo.currentPopupAction=null}pollUserCancellation(){const e=()=>{var n,r;if((r=(n=this.authWindow)==null?void 0:n.window)!=null&&r.closed){this.pollId=window.setTimeout(()=>{this.pollId=null,this.reject(Cr(this.auth,"popup-closed-by-user"))},8e3);return}this.pollId=window.setTimeout(e,D9.get())};e()}}zo.currentPopupAction=null;/** 2809 * @license 2810 * Copyright 2020 Google LLC 2811 * 2812 * Licensed under the Apache License, Version 2.0 (the "License"); 2813 * you may not use this file except in compliance with the License. 2814 * You may obtain a copy of the License at 2815 * 2816 * http://www.apache.org/licenses/LICENSE-2.0 2817 * 2818 * Unless required by applicable law or agreed to in writing, software 2819 * distributed under the License is distributed on an "AS IS" BASIS, 2820 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 2821 * See the License for the specific language governing permissions and 2822 * limitations under the License. 2823 */const M9="pendingRedirect",Ed=new Map;class O9 extends Wj{constructor(e,n,r=!1){super(e,["signInViaRedirect","linkViaRedirect","reauthViaRedirect","unknown"],n,void 0,r),this.eventId=null}async execute(){let e=Ed.get(this.auth._key());if(!e){try{const r=await L9(this.resolver,this.auth)?await super.execute():null;e=()=>Promise.resolve(r)}catch(n){e=()=>Promise.reject(n)}Ed.set(this.auth._key(),e)}return this.bypassAuthState||Ed.set(this.auth._key(),()=>Promise.resolve(null)),e()}async onAuthEvent(e){if(e.type==="signInViaRedirect")return super.onAuthEvent(e);if(e.type==="unknown"){this.resolve(null);return}if(e.eventId){const n=await this.auth._redirectUserForId(e.eventId);if(n)return this.user=n,super.onAuthEvent(e);this.resolve(null)}}async onExecution(){}cleanUp(){}}async function L9(t,e){const n=B9(e),r=U9(t);if(!await r._isAvailable())return!1;const s=await r._get(n)==="true";return await r._remove(n),s}function F9(t,e){Ed.set(t._key(),e)}function U9(t){return $r(t._redirectPersistence)}function B9(t){return kd(M9,t.config.apiKey,t.name)}async function V9(t,e,n=!1){if(kn(t.app))return Promise.reject(Qs(t));const r=Xa(t),s=P9(r,e),o=await new O9(r,s,n).execute();return o&&!n&&(delete o.user._redirectEventId,await r._persistUserIfCurrent(o.user),await r._setRedirectUser(null,e)),o}/** 2824 * @license 2825 * Copyright 2020 Google LLC 2826 * 2827 * Licensed under the Apache License, Version 2.0 (the "License"); 2828 * you may not use this file except in compliance with the License. 2829 * You may obtain a copy of the License at 2830 * 2831 * http://www.apache.org/licenses/LICENSE-2.0 2832 * 2833 * Unless required by applicable law or agreed to in writing, softw
2833are 2834 * distributed under the License is distributed on an "AS IS" BASIS, 2835 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 2836 * See the License for the specific language governing permissions and 2837 * limitations under the License. 2838 */const $9=10*60*1e3;class z9{constructor(e){this.auth=e,this.cachedEventUids=new Set,this.consumers=new Set,this.queuedRedirectEvent=null,this.hasHandledPotentialRedirect=!1,this.lastProcessedEventTime=Date.now()}registerConsumer(e){this.consumers.add(e),this.queuedRedirectEvent&&this.isEventForConsumer(this.queuedRedirectEvent,e)&&(this.sendToConsumer(this.queuedRedirectEvent,e),this.saveEventToCache(this.queuedRedirectEvent),this.queuedRedirectEvent=null)}unregisterConsumer(e){this.consumers.delete(e)}onEvent(e){if(this.hasEventBeenHandled(e))return!1;let n=!1;return this.consumers.forEach(r=>{this.isEventForConsumer(e,r)&&(n=!0,this.sendToConsumer(e,r),this.saveEventToCache(e))}),this.hasHandledPotentialRedirect||!W9(e)||(this.hasHandledPotentialRedirect=!0,n||(this.queuedRedirectEvent=e,n=!0)),n}sendToConsumer(e,n){var r;if(e.error&&!Hj(e)){const s=((r=e.error.code)==null?void 0:r.split("auth/")[1])||"internal-error";n.onError(Cr(this.auth,s))}else n.onAuthEvent(e)}isEventForConsumer(e,n){const r=n.eventId===null||!!e.eventId&&e.eventId===n.eventId;return n.filter.includes(e.type)&&r}hasEventBeenHandled(e){return Date.now()-this.lastProcessedEventTime>=$9&&this.cachedEventUids.clear(),this.cachedEventUids.has(gk(e))}saveEventToCache(e){this.cachedEventUids.add(gk(e)),this.lastProcessedEventTime=Date.now()}}function gk(t){return[t.type,t.eventId,t.sessionId,t.tenantId].filter(e=>e).join("-")}function Hj({type:t,error:e}){return t==="unknown"&&(e==null?void 0:e.code)==="auth/no-auth-event"}function W9(t){switch(t.type){case"signInViaRedirect":case"linkViaRedirect":case"reauthViaRedirect":return!0;case"unknown":return Hj(t);default:return!1}}/** 2839 * @license 2840 * Copyright 2020 Google LLC 2841 * 2842 * Licensed under the Apache License, Version 2.0 (the "License"); 2843 * you may not use this file except in compliance with the License. 2844 * You may obtain a copy of the License at 2845 * 2846 * http://www.apache.org/licenses/LICENSE-2.0 2847 * 2848 * Unless required by applicable law or agreed to in writing, software 2849 * distributed under the License is distributed on an "AS IS" BASIS, 2850 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 2851 * See the License for the specific language governing permissions and 2852 * limitations under the License. 2853 */async function H9(t,e={}){return vi(t,"GET","/v1/projects",e)}/** 2854 * @license 2855 * Copyright 2020 Google LLC 2856 * 2857 * Licensed under the Apache License, Version 2.0 (the "License"); 2858 * you may not use this file except in compliance with the License. 2859 * You may obtain a copy of the License at 2860 * 2861 * http://www.apache.org/licenses/LICENSE-2.0 2862 * 2863 * Unless required by applicable law or agreed to in writing, software 2864 * distributed under the License is distributed on an "AS IS" BASIS, 2865 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 2866 * See the License for the specific language governing permissions and 2867 * limitations under the License. 2868 */const K9=/^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$/,G9=/^https?/;async function q9(t){if(t.config.emulator)return;const{authorizedDomains:e}=await H9(t);for(const n of e)try{if(Y9(n))return}catch{}sr(t,"unauthorized-domain")}function Y9(t){const e=Sy(),{protocol:n,hostname:r}=new URL(e);if(t.startsWith("chrome-extension://")){const o=new URL(t);return o.hostname===""&&r===""?n==="chrome-extension:"&&t.replace("chrome-extension://","")===e.replace("chrome-extension://",""):n==="chrome-extension:"&&o.hostname===r}if(!G9.test(n))return!1;if(K9.test(t))return r===t;const s=t.replace(/\./g,"\\.");return new RegExp("^(.+\\."+s+"|"+s+")$","i").test(r)}/** 2869 * @license 2870 * Copyright 2020 Google LLC. 2871 * 2872 * Licensed under the Apache License, Version 2.0 (the "License"); 2873 * you may not use this file except in compliance with the License. 2874 * You may obtain a copy of the License at 2875 * 2876 * http://www.apache.org/licenses/LICENSE-2.0 2877 * 2878 * Unless required by applicable law or agreed to in writing, softw
2878are 2879 * distributed under the License is distributed on an "AS IS" BASIS, 2880 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 2881 * See the License for the specific language governing permissions and 2882 * limitations under the License. 2883 */const Q9=new ou(3e4,6e4);function yk(){const t=Sr().___jsl;if(t!=null&&t.H){for(const e of Object.keys(t.H))if(t.H[e].r=t.H[e].r||[],t.H[e].L=t.H[e].L||[],t.H[e].r=[...t.H[e].L],t.CP)for(let n=0;n<t.CP.length;n++)t.CP[n]=null}}function X9(t){return new Promise((e,n)=>{var s,i,o;function r(){yk(),gapi.load("gapi.iframes",{callback:()=>{e(gapi.iframes.getContext())},ontimeout:()=>{yk(),n(Cr(t,"network-request-failed"))},timeout:Q9.get()})}if((i=(s=Sr().gapi)==null?void 0:s.iframes)!=null&&i.Iframe)e(gapi.iframes.getContext());else if((o=Sr().gapi)!=null&&o.load)r();else{const a=z7("iframefcb");return Sr()[a]=()=>{gapi.load?r():n(Cr(t,"network-request-failed"))},Pj(`${$7()}?onload=${a}`).catch(c=>n(c))}}).catch(e=>{throw Cd=null,e})}let Cd=null;function J9(t){return Cd=Cd||X9(t),Cd}/** 2884 * @license 2885 * Copyright 2020 Google LLC. 2886 * 2887 * Licensed under the Apache License, Version 2.0 (the "License"); 2888 * you may not use this file except in compliance with the License. 2889 * You may obtain a copy of the License at 2890 * 2891 * http://www.apache.org/licenses/LICENSE-2.0 2892 * 2893 * Unless required by applicable law or agreed to in writing, software 2894 * distributed under the License is distributed on an "AS IS" BASIS, 2895 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 2896 * See the License for the specific language governing permissions and 2897 * limitations under the License. 2898 */const Z9=new ou(5e3,15e3),eK="__/auth/iframe",tK="emulator/auth/iframe",nK={style:{position:"absolute",top:"-100px",width:"1px",height:"1px"},"aria-hidden":"true",tabindex:"-1"},rK=new Map([["identitytoolkit.googleapis.com","p"],["staging-identitytoolkit.sandbox.googleapis.com","s"],["test-identitytoolkit.sandbox.googleapis.com","t"]]);function sK(t){const e=t.config;ee(e.authDomain,t,"auth-domain-config-required");const n=e.emulator?x0(e,tK):`https://${t.config.authDomain}/${eK}`,r={apiKey:e.apiKey,appName:t.name,v:uo},s=rK.get(t.config.apiHost);s&&(r.eid=s);const i=t._getFrameworks();return i.length&&(r.fw=i.join(",")),`${n}?${Ga(r).slice(1)}`}async function iK(t){const e=await J9(t),n=Sr().gapi;return ee(n,t,"internal-error"),e.open({where:document.body,url:sK(t),messageHandlersFilter:n.iframes.CROSS_ORIGIN_IFRAMES_FILTER,attributes:nK,dontclear:!0},r=>new Promise(async(s,i)=>{await r.restyle({setHideOnLeave:!1});const o=Cr(t,"network-request-failed"),a=Sr().setTimeout(()=>{i(o)},Z9.get());function c(){Sr().clearTimeout(a),s(r)}r.ping(c).then(c,()=>{i(o)})}))}/** 2899 * @license 2900 * Copyright 2020 Google LLC. 2901 * 2902 * Licensed under the Apache License, Version 2.0 (the "License"); 2903 * you may not use this file except in compliance with the License. 2904 * You may obtain a copy of the License at 2905 * 2906 * http://www.apache.org/licenses/LICENSE-2.0 2907 * 2908 * Unless required by applicable law or agreed to in writing, software 2909 * distributed under the License is distributed on an "AS IS" BASIS, 2910 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 2911 * See the License for the specific language governing permissions and 2912 * limitations under the License. 2913 */const oK={location:"yes",resizable:"yes",statusbar:"yes",toolbar:"no"},aK=500,lK=600,cK="_blank",uK="http://localhost";class vk{constructor(e){this.window=e,this.associatedEvent=null}close(){if(this.window)try{this.window.close()}catch{}}}function dK(t,e,n,r=aK,s=lK){const i=Math.max((window.screen.availHeight-s)/2,0).toString(),o=Math.max((window.screen.availWidth-r)/2,0).toString();let a="";const c={...oK,width:r.toString(),height:s.toString(),top:i,left:o},u=Wt().toLowerCase();n&&(a=kj(u)?cK:n),bj(u)&&(e=e||uK,c.scrollbars="yes");const d=Object.entries(c).reduce((f,[p,x])=>`${f}${p}=${x},`,"");if(A7(u)&&a!=="_self")return hK(e||"",a),new vk(null);const h=window.open(e||"",a,d);ee(h,t,"popup-blocked");try{h.focus()}catch{}return new vk(h)}function hK(t,e){const n=document.createElement("a");n.href=t,n.target=e;const r=document.createEvent("MouseEvent");
2913r.initMouseEvent("click",!0,!0,window,1,0,0,0,0,!1,!1,!1,!1,1,null),n.dispatchEvent(r)}/** 2914 * @license 2915 * Copyright 2021 Google LLC 2916 * 2917 * Licensed under the Apache License, Version 2.0 (the "License"); 2918 * you may not use this file except in compliance with the License. 2919 * You may obtain a copy of the License at 2920 * 2921 * http://www.apache.org/licenses/LICENSE-2.0 2922 * 2923 * Unless required by applicable law or agreed to in writing, software 2924 * distributed under the License is distributed on an "AS IS" BASIS, 2925 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 2926 * See the License for the specific language governing permissions and 2927 * limitations under the License. 2928 */const fK="__/auth/handler",pK="emulator/auth/handler",mK=encodeURIComponent("fac");async function xk(t,e,n,r,s,i){ee(t.config.authDomain,t,"auth-domain-config-required"),ee(t.config.apiKey,t,"invalid-api-key");const o={apiKey:t.config.apiKey,appName:t.name,authType:n,redirectUrl:r,v:uo,eventId:s};if(e instanceof Aj){e.setDefaultLanguage(t.languageCode),o.providerId=e.providerId||"",ly(e.getCustomParameters())||(o.customParameters=JSON.stringify(e.getCustomParameters()));for(const[d,h]of Object.entries({}))o[d]=h}if(e instanceof au){const d=e.getScopes().filter(h=>h!=="");d.length>0&&(o.scopes=d.join(","))}t.tenantId&&(o.tid=t.tenantId);const a=o;for(const d of Object.keys(a))a[d]===void 0&&delete a[d];const c=await t._getAppCheckToken(),u=c?`#${mK}=${encodeURIComponent(c)}`:"";return`${gK(t)}?${Ga(a).slice(1)}${u}`}function gK({config:t}){return t.emulator?x0(t,pK):`https://${t.authDomain}/${fK}`}/** 2929 * @license 2930 * Copyright 2020 Google LLC 2931 * 2932 * Licensed under the Apache License, Version 2.0 (the "License"); 2933 * you may not use this file except in compliance with the License. 2934 * You may obtain a copy of the License at 2935 * 2936 * http://www.apache.org/licenses/LICENSE-2.0 2937 * 2938 * Unless required by applicable law or agreed to in writing, software 2939 * distributed under the License is distributed on an "AS IS" BASIS, 2940 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 2941 * See the License for the specific language governing permissions and 2942 * limitations under the License. 2943 */const pm="webStorageSupport";class yK{constructor(){this.eventManagers={},this.iframes={},this.originValidationPromises={},this._redirectPersistence=Uj,this._completeRedirectFn=V9,this._overrideRedirectResult=F9}
2943async _openPopup(e,n,r,s){var o;ts((o=this.eventManagers[e._key()])==null?void 0:o.manager,"_initialize() not called before _openPopup()");const i=await xk(e,n,r,Sy(),s);return dK(e,i,E0())}async _openRedirect(e,n,r,s){await this._originValidation(e);const i=await xk(e,n,r,Sy(),s);return w9(i),new Promise(()=>{})}_initialize(e){const n=e._key();if(this.eventManagers[n]){const{manager:s,promise:i}=this.eventManagers[n];return s?Promise.resolve(s):(ts(i,"If manager is not set, promise should be"),i)}const r=this.initAndGetManager(e);return this.eventManagers[n]={promise:r},r.catch(()=>{delete this.eventManagers[n]}),r}async initAndGetManager(e){const n=await iK(e),r=new z9(e);return n.register("authEvent",s=>(ee(s==null?void 0:s.authEvent,e,"invalid-auth-event"),{status:r.onEvent(s.authEvent)?"ACK":"ERROR"}),gapi.iframes.CROSS_ORIGIN_IFRAMES_FILTER),this.eventManagers[e._key()]={manager:r},this.iframes[e._key()]=n,r}_isIframeWebStorageSupported(e,n){this.iframes[e._key()].send(pm,{type:pm},s=>{var o;const i=(o=s==null?void 0:s[0])==null?void 0:o[pm];
2943i!==void 0&&n(!!i),sr(e,"internal-error")},gapi.iframes.CROSS_ORIGIN_IFRAMES_FILTER)}_originValidation(e){const n=e._key();return this.originValidationPromises[n]||(this.originValidationPromises[n]=q9(e)),this.originValidationPromises[n]}get _shouldInitProactively(){return Tj()||_j()||b0()}}const vK=yK;var wk="@firebase/auth",bk="1.12.0";/** 2944 * @license 2945 * Copyright 2020 Google LLC 2946 * 2947 * Licensed under the Apache License, Version 2.0 (the "License"); 2948 * you may not use this file except in compliance with the License. 2949 * You may obtain a copy of the License at 2950 * 2951 * http://www.apache.org/licenses/LICENSE-2.0 2952 * 2953 * Unless required by applicable law or agreed to in writing, software 2954 * distributed under the License is distributed on an "AS IS" BASIS, 2955 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 2956 * See the License for the specific language governing permissions and 2957 * limitations under the License. 2958 */class xK{constructor(e){this.auth=e,this.internalListeners=new Map}getUid(){var e;return this.assertAuthConfigured(),((e=this.auth.currentUser)==null?void 0:e.uid)||null}async getToken(e){return this.assertAuthConfigured(),await this.auth._initializationPromise,this.auth.currentUser?{accessToken:await this.auth.currentUser.getIdToken(e)}:null}addAuthTokenListener(e){if(this.assertAuthConfigured(),this.internalListeners.has(e))return;const n=this.auth.onIdTokenChanged(r=>{e((r==null?void 0:r.stsTokenManager.accessToken)||null)});this.internalListeners.set(e,n),this.updateProactiveRefresh()}removeAuthTokenListener(e){this.assertAuthConfigured();const n=this.internalListeners.get(e);n&&(this.internalListeners.delete(e),n(),this.updateProactiveRefresh())}assertAuthConfigured(){ee(this.auth._initializationPromise,"dependent-sdk-initialized-before-auth")}updateProactiveRefresh(){this.internalListeners.size>0?this.auth._startProactiveRefresh():this.auth._stopProactiveRefresh()}}/** 2959 * @license 2960 * Copyright 2020 Google LLC 2961 * 2962 * Licensed under the Apache License, Version 2.0 (the "License"); 2963 * you may not use this file except in compliance with the License. 2964 * You may obtain a copy of the License at 2965 * 2966 * http://www.apache.org/licenses/LICENSE-2.0 2967 * 2968 * Unless required by applicable law or agreed to in writing, software 2969 * distributed under the License is distributed on an "AS IS" BASIS, 2970 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 2971 * See the License for the specific language governing permissions and 2972 * limitations under the License. 2973 */function wK(t){switch(t){case"Node":return"node";case"ReactNative":return"rn";case"Worker":return"webworker";case"Cordova":return"cordova";case"WebExtension":return"web-extension";default:return}}function bK(t){Zi(new oi("auth",(e,{options:n})=>{const r=e.getProvider("app").getImmediate(),s=e.getProvider("heartbeat"),i=e.getProvider("app-check-internal"),{apiKey:o,authDomain:a}=r.options;ee(o&&!o.includes(":"),"invalid-api-key",{appName:r.name});const c={apiKey:o,authDomain:a,clientPlatform:t,apiHost:"identitytoolkit.googleapis.com",tokenApiHost:"securetoken.googleapis.com",apiScheme:"https",sdkClientVersion:Ij(t)},u=new U7(r,s,i,c);return Y7(u,n),u},"PUBLIC").setInstantiationMode("EXPLICIT").setInstanceCreatedCallback((e,n,r)=>{e.getProvider("auth-internal").initialize()})),Zi(new oi("auth-internal",e=>{const n=Xa(e.getProvider("auth").getImmediate());return(r=>new xK(r))(n)},"PRIVATE").setInstantiationMode("EXPLICIT")),Er(wk,bk,wK(t)),Er(wk,bk,"esm2020")}/** 2974 * @license 2975 * Copyright 2021 Google LLC 2976 * 2977 * Licensed under the Apache License, Version 2.0 (the "License"); 2978 * you may not use this file except in compliance with the License. 2979 * You may obtain a copy of the License at 2980 * 2981 * http://www.apache.org/licenses/LICENSE-2.0 2982 * 2983 * Unless required by applicable law or agreed to in writing, software 2984 * distributed under the License is distributed on an "AS IS" BASIS, 2985 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 2986 * See the License for the specific language governing permissions and 2987 * limitations under the License. 2988 */const _K=5*60,kK=UI("authIdTokenMaxAge")||_K;let _k=null;const EK=t=>async e=>{const n=e&&await e.getIdTokenResult(),r=n&&(new Date().getTime()-Date.parse(n.issuedAtTime))/1e3;if(r&&r>kK)return;const s=n==null?void 0:n.token;_k!==s&&(_k=s,await fetch(t,{method:s?"POST":"DELETE",headers:s?{Authorization:`Bearer ${s}`}:{}}))};function CK(t=Vx()){const e=Nf(t,"auth");if(e.isInitialized())return e.getImmediate();const n=q7(t,{popupRedirectResolver:vK,persistence:[I9,y9,Uj]}),r=UI("authTokenSyncURL");if(r&&typeof isSecureContext=="boolean"&&isSecureContext){const i=new URL(r,location.origin);if(location.origin===i.origin){const o=EK(i.toString());h9(n,o,()=>o(n.currentUser)),d9(n,a=>o(a))}}const s=OI("auth");return s&&Q7(n,`http://${s}`),n}function SK(){var t;return((t=document.getElementsByTagName("head"))==null?void 0:t[0])??document}
2988B7({loadJS(t){return new Promise((e,n)=>{const r=document.createElement("script");r.setAttribute("src",t),r.onload=e,r.onerror=s=>{const i=Cr("internal-error");i.customData=s,n(i)},r.type="text/javascript",r.charset="UTF-8",SK().appendChild(r)})},gapiScript:"https://apis.google.com/js/api.js",recaptchaV2Script:"https://www.google.com/recaptcha/api.js",recaptchaEnterpriseScript:"https://www.google.com/recaptcha/enterprise.js?render="});bK("Browser");/** 2989 * @license 2990 * Copyright 2017 Google LLC 2991 * 2992 * Licensed under the Apache License, Version 2.0 (the "License"); 2993 * you may not use this file except in compliance with the License. 2994 * You may obtain a copy of the License at 2995 * 2996 * http://www.apache.org/licenses/LICENSE-2.0 2997 * 2998 * Unless required by applicable law or agreed to in writing, software 2999 * distributed under the License is distributed on an "AS IS" BASIS, 3000 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 3001 * See the License for the specific language governing permissions and 3002 * limitations under the License. 3003 */const Kj="firebasestorage.googleapis.com",Gj="storageBucket",NK=2*60*1e3,TK=10*60*1e3;/** 3004 * @license 3005 * Copyright 2017 Google LLC 3006 * 3007 * Licensed under the Apache License, Version 2.0 (the "License"); 3008 * you may not use this file except in compliance with the License. 3009 * You may obtain a copy of the License at 3010 * 3011 * http://www.apache.org/licenses/LICENSE-2.0 3012 * 3013 * Unless required by applicable law or agreed to in writing, software 3014 * distributed under the License is distributed on an "AS IS" BASIS, 3015 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 3016 * See the License for the specific language governing permissions and 3017 * limitations under the License. 3018 */class Qe extends ss{constructor(e,n,r=0){super(mm(e),`Firebase Storage: ${n} (${mm(e)})`),this.status_=r,this.customData={serverResponse:null},this._baseMessage=this.message,Object.setPrototypeOf(this,Qe.prototype)}get status(){return this.status_}set status(e){this.status_=e}_codeEquals(e){return mm(e)===this.code}get serverResponse(){return this.customData.serverResponse}set serverResponse(e){this.customData.serverResponse=e,this.customData.serverResponse?this.message=`${this._baseMessage} 3019${this.customData.serverResponse}`:this.message=this._baseMessage}}var Ye;(function(t){t.UNKNOWN="unknown",t.OBJECT_NOT_FOUND="object-not-found",t.BUCKET_NOT_FOUND="bucket-not-found",t.PROJECT_NOT_FOUND="project-not-found",t.QUOTA_EXCEEDED="quota-exceeded",t.UNAUTHENTICATED="unauthenticated",t.UNAUTHORIZED="unauthorized",t.UNAUTHORIZED_APP="unauthorized-app",t.RETRY_LIMIT_EXCEEDED="retry-limit-exceeded",t.INVALID_CHECKSUM="invalid-checksum",t.CANCELED="canceled",t.INVALID_EVENT_NAME="invalid-event-name",t.INVALID_URL="invalid-url",t.INVALID_DEFAULT_BUCKET="invalid-default-bucket",t.NO_DEFAULT_BUCKET="no-default-bucket",t.CANNOT_SLICE_BLOB="cannot-slice-blob",t.SERVER_FILE_WRONG_SIZE="server-file-wrong-size",t.NO_DOWNLOAD_URL="no-download-url",t.INVALID_ARGUMENT="invalid-argument",t.INVALID_ARGUMENT_COUNT="invalid-argument-count",t.APP_DELETED="app-deleted",t.INVALID_ROOT_OPERATION="invalid-root-operation",t.INVALID_FORMAT="invalid-format",t.INTERNAL_ERROR="internal-error",t.UNSUPPORTED_ENVIRONMENT="unsupported-environment"})(Ye||(Ye={}));function mm(t){return"storage/"+t}function S0(){const t="An unknown error occurred, please check the error payload for server response.";return new Qe(Ye.UNKNOWN,t)}function IK(t){return new Qe(Ye.OBJECT_NOT_FOUND,"Object '"+t+"' does not exist.")}function PK(t){return new Qe(Ye.QUOTA_EXCEEDED,"Quota for bucket '"+t+"' exceeded, please view quota on https://firebase.google.com/pricing/.")}function jK(){const t="User is not authenticated, please authenticate using Firebase Authentication and try again.";return new Qe(Ye.UNAUTHENTICATED,t)}function RK(){return new Qe(Ye.UNAUTHORIZED_APP,"This app does not have permission to access Firebase Storage on this project.")}function AK(t){return new Qe(Ye.UNAUTHORIZED,"User does not have permission to access '"+t+"'.")}function DK(){return new Qe(Ye.RETRY_LIMIT_EXCEEDED,"Max retry time for operation exceeded, please try again.")}function MK(){return new Qe(Ye.CANCELED,"User canceled the upload/download.")}function OK(t){return new Qe(Ye.INVALID_URL,"Invalid URL '"+t+"'.")}function LK(t){return new Qe(Ye.INVALID_DEFAULT_BUCKET,"Invalid default bucket '"+t+"'.")}function FK(){return new Qe(Ye.NO_DEFAULT_BUCKET,"No default bucket found. Did you set the '"+Gj+"' property when initializing the app?")}function UK(){return new Qe(Ye.CANNOT_SLICE_BLOB,"Cannot slice blob for upload. Please retry the upload.")}function BK(){return new Qe(Ye.NO_DOWNLOAD_URL,"The given file does not have any download URLs.")}function VK(t){return new Qe(Ye.UNSUPPORTED_ENVIRONMENT,`${t} is missing. Make sure to install the required polyfills. See https://firebase.google.com/docs/web/environments-js-sdk#polyfills for more information.`)}function Iy(t){return new Qe(Ye.INVALID_ARGUMENT,t)}function qj(){return new Qe(Ye.APP_DELETED,"The Firebase app was deleted.")}function $K(t){return new Qe(Ye.INVALID_ROOT_OPERATION,"The operation '"+t+"' cannot be performed on a root reference, create a non-root reference using child, such as .child('file.png').")}function Ql(t,e){return new Qe(Ye.INVALID_FORMAT,"String does not match format '"+t+"': "+e)}function yl(t){throw new Qe(Ye.INTERNAL_ERROR,"Internal error: "+t)}/** 3020 * @license 3021 * Copyright 2017 Google LLC 3022 * 3023 * Licensed under the Apache License, Version 2.0 (the "License");
3024 * you may not use this file except in compliance with the License. 3025 * You may obtain a copy of the License at 3026 * 3027 * http://www.apache.org/licenses/LICENSE-2.0 3028 * 3029 * Unless required by applicable law or agreed to in writing, software 3030 * distributed under the License is distributed on an "AS IS" BASIS, 3031 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 3032 * See the License for the specific language governing permissions and 3033 * limitations under the License. 3034 */class ln{constructor(e,n){this.bucket=e,this.path_=n}get path(){return this.path_}get isRoot(){return this.path.length===0}fullServerUrl(){const e=encodeURIComponent;return"/b/"+e(this.bucket)+"/o/"+e(this.path)}bucketOnlyServerUrl(){return"/b/"+encodeURIComponent(this.bucket)+"/o"}static makeFromBucketSpec(e,n){let r;try{r=ln.makeFromUrl(e,n)}catch{return new ln(e,"")}if(r.path==="")return r;throw LK(e)}static makeFromUrl(e,n){let r=null;const s="([A-Za-z0-9.\\-_]+)";function i(_){_.path.charAt(_.path.length-1)==="/"&&(_.path_=_.path_.slice(0,-1))}const o="(/(.*))?$",a=new RegExp("^gs://"+s+o,"i"),c={bucket:1,path:3};function u(_){_.path_=decodeURIComponent(_.path)}const d="v[A-Za-z0-9_]+",h=n.replace(/[.]/g,"\\."),f="(/([^?#]*).*)?$",p=new RegExp(`^https?://${h}/${d}/b/${s}/o${f}`,"i"),x={bucket:1,path:3},g=n===Kj?"(?:storage.googleapis.com|storage.cloud.google.com)":n,y="([^?#]*)",w=new RegExp(`^https?://${g}/${s}/${y}`,"i"),b=[{regex:a,indices:c,postModify:i},{regex:p,indices:x,postModify:u},{regex:w,indices:{bucket:1,path:2},postModify:u}];for(let _=0;_<b.length;_++){const k=b[_],S=k.regex.exec(e);if(S){const C=S[k.indices.bucket];let N=S[k.indices.path];N||(N=""),r=new ln(C,N),k.postModify(r);break}}if(r==null)throw OK(e);return r}}class zK{constructor(e){this.promise_=Promise.reject(e)}getPromise(){return this.promise_}cancel(e=!1){}}/** 3035 * @license 3036 * Copyright 2017 Google LLC 3037 * 3038 * Licensed under the Apache License, Version 2.0 (the "License"); 3039 * you may not use this file except in compliance with the License. 3040 * You may obtain a copy of the License at 3041 * 3042 * http://www.apache.org/licenses/LICENSE-2.0 3043 * 3044 * Unless required by applicable law or agreed to in writing, software 3045 * distributed under the License is distributed on an "AS IS" BASIS, 3046 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 3047 * See the License for the specific language governing permissions and 3048 * limitations under the License. 3049 */function WK(t,e,n){let r=1,s=null,i=null,o=!1,a=0;function c(){return a===2}let u=!1;function d(...y){u||(u=!0,e.apply(null,y))}function h(y){s=setTimeout(()=>{s=null,t(p,c())},y)}function f(){i&&clearTimeout(i)}function p(y,...w){if(u){f();return}if(y){f(),d.call(null,y,...w);return}if(c()||o){f(),d.call(null,y,...w);return}r<64&&(r*=2);let b;
3049a===1?(a=2,b=0):b=(r+Math.random())*1e3,h(b)}let x=!1;function g(y){x||(x=!0,f(),!u&&(s!==null?(y||(a=2),clearTimeout(s),h(0)):y||(a=1)))}return h(0),i=setTimeout(()=>{o=!0,g(!0)},n),g}function HK(t){t(!1)}/** 3050 * @license 3051 * Copyright 2017 Google LLC 3052 * 3053 * Licensed under the Apache License, Version 2.0 (the "License"); 3054 * you may not use this file except in compliance with the License. 3055 * You may obtain a copy of the License at 3056 * 3057 * http://www.apache.org/licenses/LICENSE-2.0 3058 * 3059 * Unless required by applicable law or agreed to in writing, software 3060 * distributed under the License is distributed on an "AS IS" BASIS, 3061 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 3062 * See the License for the specific language governing permissions and 3063 * limitations under the License. 3064 */function KK(t){return t!==void 0}function GK(t){return typeof t=="object"&&!Array.isArray(t)}function N0(t){return typeof t=="string"||t instanceof String}function kk(t){return T0()&&t instanceof Blob}function T0(){return typeof Blob<"u"}function Ek(t,e,n,r){if(r<e)throw Iy(`Invalid value for '${t}'. Expected ${e} or greater.`);if(r>n)throw Iy(`Invalid value for '${t}'. Expected ${n} or less.`)}/** 3065 * @license 3066 * Copyright 2017 Google LLC 3067 * 3068 * Licensed under the Apache License, Version 2.0 (the "License"); 3069 * you may not use this file except in compliance with the License. 3070 * You may obtain a copy of the License at 3071 * 3072 * http://www.apache.org/licenses/LICENSE-2.0 3073 * 3074 * Unless required by applicable law or agreed to in writing, software 3075 * distributed under the License is distributed on an "AS IS" BASIS, 3076 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 3077 * See the License for the specific language governing permissions and 3078 * limitations under the License. 3079 */function $f(t,e,n){let r=e;return n==null&&(r=`https://${e}`),`${n}://${r}/v0${t}`}function Yj(t){const e=encodeURIComponent;let n="?";for(const r in t)if(t.hasOwnProperty(r)){const s=e(r)+"="+e(t[r]);n=n+s+"&"}return n=n.slice(0,-1),n}var Wi;(function(t){t[t.NO_ERROR=0]="NO_ERROR",t[t.NETWORK_ERROR=1]="NETWORK_ERROR",t[t.ABORT=2]="ABORT"})(Wi||(Wi={}));/** 3080 * @license 3081 * Copyright 2022 Google LLC 3082 * 3083 * Licensed under the Apache License, Version 2.0 (the "License"); 3084 * you may not use this file except in compliance with the License. 3085 * You may obtain a copy of the License at 3086 * 3087 * http://www.apache.org/licenses/LICENSE-2.0 3088 * 3089 * Unless required by applicable law or agreed to in writing, software 3090 * distributed under the License is distributed on an "AS IS" BASIS, 3091 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 3092 * See the License for the specific language governing permissions and 3093 * limitations under the License. 3094 */function qK(t,e){const n=t>=500&&t<600,s=[408,429].indexOf(t)!==-1,i=e.indexOf(t)!==-1;return n||s||i}/** 3095 * @license 3096 * Copyright 2017 Google LLC 3097 * 3098 * Licensed under the Apache License, Version 2.0 (the "License"); 3099 * you may not use this file except in compliance with the License. 3100 * You may obtain a copy of the License at 3101 * 3102 * http://www.apache.org/licenses/LICENSE-2.0 3103 * 3104 * Unless required by applicable law or agreed to in writing, software 3105 * distributed under the License is distributed on an "AS IS" BASIS, 3106 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 3107 * See the License for the specific language governing permissions and 3108 * limitations under the License. 3109 */class YK{constructor(e,n,r,s,i,o,a,c,u,d,h,f=!0,p=!1){this.url_=e,this.method_=n,this.headers_=r,this.body_=s,this.successCodes_=i,this.additionalRetryCodes_=o,this.callback_=a,this.errorCallback_=c,this.timeout_=u,this.progressCallback_=d,this.connectionFactory_=h,this.retry=f,this.isUsingEmulator=p,this.pendingConnection_=null,this.backoffId_=null,this.canceled_=!1,this.appDelete_=!1,this.promise_=new Promise((x,g)=>{this.resolve_=x,this.reject_=g,this.start_()})}start_(){const e=(r,s)=>{if(s){r(!1,new Wu(!1,null,!0));return}const i=this.connectionFactory_();this.pendingConnection_=i;const o=a=>{const c=a.loaded,u=a.lengthComputable?a.total:-1;this.progressCallback_!==null&&this.progressCallback_(c,u)};this.progressCallback_!==null&&i.addUploadProgressListener(o),i.send(this.url_,this.method_,this.isUsingEmulator,this.body_,this.headers_).then(()=>{this.progressCallback_!==null&&i.removeUploadProgressListener(o),this.pendingConnection_=null;const a=i.getErrorCode()===Wi.NO_ERROR,c=i.getStatus();if(!a||qK(c,this.additionalRetryCodes_)&&this.retry){const d=i.getErrorCode()===Wi.ABORT;r(!1,new Wu(!1,null,d));return}const u=this.successCodes_.indexOf(c)!==-1;r(!0,new Wu(u,i))})},n=(r,s)=>{const i=this.resolve_,o=this.reject_,a=s.connection;if(s.wasSuccessCode)try{const c=this.callback_(a,a.getResponse());KK(c)?i(c):i()}catch(c){o(c)}else if(a!==null){const c=S0();c.serverResponse=a.getErrorText(),this.errorCallback_?o(this.errorCallback_(a,c)):o(c)}else if(s.canceled){const c=this.appDelete_?qj():MK();o(c)}else{const c=DK();o(c)}};this.canceled_?n(!1,new Wu(!1,null,!0)):this.backoffId_=WK(e,n,this.timeout_)}getPromise(){return this.promise_}cancel(e){this.canceled_=!0,this.appDelete_=e||!1,this.backoffId_!==null&&HK(this.backoffId_),this.pendingConnection_!==null&&this.pendingConnection_.abort()}}class Wu{constructor(e,n,r){this.wasSuccessCode=e,this.connection=n,this.canceled=!!r}}function QK(t,e){e!==null&&e.length>0&&(t.Authorization="Firebase "+e)}function XK(t,e){t["X-Firebase-Storage-Version"]="webjs/"+(e??"AppManager")}function JK(t,e){e&&(t["X-Firebase-GMPID"]=e)}function ZK(t,e){e!==null&&(t["X-Firebase-AppCheck"]=e)}
3109function eG(t,e,n,r,s,i,o=!0,a=!1){const c=Yj(t.urlParams),u=t.url+c,d=Object.assign({},t.headers);return JK(d,e),QK(d,n),XK(d,i),ZK(d,r),new YK(u,t.method,d,t.body,t.successCodes,t.additionalRetryCodes,t.handler,t.errorHandler,t.timeout,t.progressCallback,s,o,a)}/** 3110 * @license 3111 * Copyright 2017 Google LLC 3112 * 3113 * Licensed under the Apache License, Version 2.0 (the "License"); 3114 * you may not use this file except in compliance with the License. 3115 * You may obtain a copy of the License at 3116 * 3117 * http://www.apache.org/licenses/LICENSE-2.0 3118 * 3119 * Unless required by applicable law or agreed to in writing, software 3120 * distributed under the License is distributed on an "AS IS" BASIS, 3121 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 3122 * See the License for the specific language governing permissions and 3123 * limitations under the License. 3124 */function tG(){return typeof BlobBuilder<"u"?BlobBuilder:typeof WebKitBlobBuilder<"u"?WebKitBlobBuilder:void 0}function nG(...t){const e=tG();if(e!==void 0){const n=new e;for(let r=0;r<t.length;r++)n.append(t[r]);return n.getBlob()}else{if(T0())return new Blob(t);throw new Qe(Ye.UNSUPPORTED_ENVIRONMENT,"This browser doesn't seem to support creating Blobs")}}function rG(t,e,n){return t.webkitSlice?t.webkitSlice(e,n):t.mozSlice?t.mozSlice(e,n):t.slice?t.slice(e,n):null}/** 3125 * @license 3126 * Copyright 2021 Google LLC 3127 * 3128 * Licensed under the Apache License, Version 2.0 (the "License"); 3129 * you may not use this file except in compliance with the License. 3130 * You may obtain a copy of the License at 3131 * 3132 * http://www.apache.org/licenses/LICENSE-2.0 3133 * 3134 * Unless required by applicable law or agreed to in writing, software 3135 * distributed under the License is distributed on an "AS IS" BASIS, 3136 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 3137 * See the License for the specific language governing permissions and 3138 * limitations under the License. 3139 */function sG(t){if(typeof atob>"u")throw VK("base-64");return atob(t)}/** 3140 * @license 3141 * Copyright 2017 Google LLC 3142 * 3143 * Licensed under the Apache License, Version 2.0 (the "License"); 3144 * you may not use this file except in compliance with the License. 3145 * You may obtain a copy of the License at 3146 * 3147 * http://www.apache.org/licenses/LICENSE-2.0 3148 * 3149 * Unless required by applicable law or agreed to in writing, software 3150 * distributed under the License is distributed on an "AS IS" BASIS, 3151 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 3152 * See the License for the specific language governing permissions and 3153 * limitations under the License. 3154 */const yr={RAW:"raw",BASE64:"base64",BASE64URL:"base64url",DATA_URL:"data_url"};class gm{constructor(e,n){this.data=e,this.contentType=n||null}}function iG(t,e){switch(t){case yr.RAW:return new gm(Qj(e));case yr.BASE64:case yr.BASE64URL:return new gm(Xj(t,e));case yr.DATA_URL:return new gm(aG(e),lG(e))}throw S0()}function Qj(t){const e=[];for(let n=0;n<t.length;n++){let r=t.charCodeAt(n);if(r<=127)e.push(r);else if(r<=2047)e.push(192|r>>6,128|r&63);else if((r&64512)===55296)if(!(n<t.length-1&&(t.charCodeAt(n+1)&64512)===56320))e.push(239,191,189);else{const i=r,o=t.charCodeAt(++n);r=65536|(i&1023)<<10|o&1023,e.push(240|r>>18,128|r>>12&63,128|r>>6&63,128|r&63)}else(r&64512)===56320?e.push(239,191,189):e.push(224|r>>12,128|r>>6&63,128|r&63)}return new Uint8Array(e)}function oG(t){let e;try{e=decodeURIComponent(t)}catch{throw Ql(yr.DATA_URL,"Malformed data URL.")}return Qj(e)}function Xj(t,e){switch(t){case yr.BASE64:{const s=e.indexOf("-")!==-1,i=e.indexOf("_")!==-1;if(s||i)throw Ql(t,"Invalid character '"+(s?"-":"_")+"' found: is it base64url encoded?");break}case yr.BASE64URL:{const s=e.indexOf("+")!==-1,i=e.indexOf("/")!==-1;if(s||i)throw Ql(t,"Invalid character '"+(s?"+":"/")+"' found: is it base64 encoded?");e=e.replace(/-/g,"+").replace(/_/g,"/");break}}let n;try{n=sG(e)}catch(s){throw s.message.includes("polyfill")?s:Ql(t,"Invalid character found")}const r=new Uint8Array(n.length);for(let s=0;s<n.length;s++)r[s]=n.charCodeAt(s);return r}class Jj{constructor(e){this.base64=!1,this.contentType=null;const n=e.match(/^data:([^,]+)?,/);if(n===null)throw Ql(yr.DATA_URL,"Must be formatted 'data:[<mediatype>][;base64],<data>");const r=n[1]||null;r!=null&&(this.base64=cG(r,";base64"),this.contentType=this.base64?r.substring(0,r.length-7):r),this.rest=e.substring(e.indexOf(",")+1)}}function aG(t){const e=new Jj(t);return e.base64?Xj(yr.BASE64,e.rest):oG(e.rest)}function lG(t){return new Jj(t).contentType}function cG(t,e){return t.length>=e.length?t.substring(t.length-e.length)===e:!1}/** 3155 * @license 3156 * Copyright 2017 Google LLC 3157 * 3158 * Licensed under the Apache License, Version 2.0 (the "License");
3159 * you may not use this file except in compliance with the License. 3160 * You may obtain a copy of the License at 3161 * 3162 * http://www.apache.org/licenses/LICENSE-2.0 3163 * 3164 * Unless required by applicable law or agreed to in writing, software 3165 * distributed under the License is distributed on an "AS IS" BASIS, 3166 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 3167 * See the License for the specific language governing permissions and 3168 * limitations under the License. 3169 */class Ns{constructor(e,n){let r=0,s="";kk(e)?(this.data_=e,r=e.size,s=e.type):e instanceof ArrayBuffer?(n?this.data_=new Uint8Array(e):(this.data_=new Uint8Array(e.byteLength),this.data_.set(new Uint8Array(e))),r=this.data_.length):e instanceof Uint8Array&&(n?this.data_=e:(this.data_=new Uint8Array(e.length),this.data_.set(e)),r=e.length),this.size_=r,this.type_=s}size(){return this.size_}type(){return this.type_}slice(e,n){if(kk(this.data_)){const r=this.data_,s=rG(r,e,n);return s===null?null:new Ns(s)}else{const r=new Uint8Array(this.data_.buffer,e,n-e);return new Ns(r,!0)}}static getBlob(...e){if(T0()){const n=e.map(r=>r instanceof Ns?r.data_:r);return new Ns(nG.apply(null,n))}else{const n=e.map(o=>N0(o)?iG(yr.RAW,o).data:o.data_);let r=0;n.forEach(o=>{r+=o.byteLength});const s=new Uint8Array(r);let i=0;return n.forEach(o=>{for(let a=0;a<o.length;a++)s[i++]=o[a]}),new Ns(s,!0)}}uploadData(){return this.data_}}/** 3170 * @license 3171 * Copyright 2017 Google LLC 3172 * 3173 * Licensed under the Apache License, Version 2.0 (the "License"); 3174 * you may not use this file except in compliance with the License. 3175 * You may obtain a copy of the License at 3176 * 3177 * http://www.apache.org/licenses/LICENSE-2.0 3178 * 3179 * Unless required by applicable law or agreed to in writing, software 3180 * distributed under the License is distributed on an "AS IS" BASIS, 3181 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 3182 * See the License for the specific language governing permissions and 3183 * limitations under the License. 3184 */function Zj(t){let e;try{e=JSON.parse(t)}catch{return null}return GK(e)?e:null}/** 3185 * @license 3186 * Copyright 2017 Google LLC 3187 * 3188 * Licensed under the Apache License, Version 2.0 (the "License"); 3189 * you may not use this file except in compliance with the License. 3190 * You may obtain a copy of the License at 3191 * 3192 * http://www.apache.org/licenses/LICENSE-2.0 3193 * 3194 * Unless required by applicable law or agreed to in writing, software 3195 * distributed under the License is distributed on an "AS IS" BASIS, 3196 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 3197 * See the License for the specific language governing permissions and 3198 * limitations under the License. 3199 */function uG(t){if(t.length===0)return null;const e=t.lastIndexOf("/");return e===-1?"":t.slice(0,e)}function dG(t,e){const n=e.split("/").filter(r=>r.length>0).join("/");return t.length===0?n:t+"/"+n}function eR(t){const e=t.lastIndexOf("/",t.length-2);return e===-1?t:t.slice(e+1)}/** 3200 * @license 3201 * Copyright 2017 Google LLC 3202 * 3203 * Licensed under the Apache License, Version 2.0 (the "License"); 3204 * you may not use this file except in compliance with the License. 3205 * You may obtain a copy of the License at 3206 * 3207 * http://www.apache.org/licenses/LICENSE-2.0 3208 * 3209 * Unless required by applicable law or agreed to in writing, software 3210 * distributed under the License is distributed on an "AS IS" BASIS, 3211 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 3212 * See the License for the specific language governing permissions and 3213 * limitations under the License. 3214 */function hG(t,e){return e}class Ot{constructor(e,n,r,s){this.server=e,this.local=n||e,this.writable=!!r,this.xform=s||hG}}let Hu=null;function fG(t){return!N0(t)||t.length<2?t:eR(t)}function tR(){if(Hu)return Hu;const t=[];t.push(new Ot("bucket")),t.push(new Ot("generation")),t.push(new Ot("metageneration")),t.push(new Ot("name","fullPath",!0));function e(i,o){return fG(o)}const n=new Ot("name");n.xform=e,t.push(n);function r(i,o){return o!==void 0?Number(o):o}const s=new Ot("size");return s.xform=r,t.push(s),t.push(new Ot("timeCreated")),t.push(new Ot("updated")),t.push(new Ot("md5Hash",null,!0)),t.push(new Ot("cacheControl",null,!0)),t.push(new Ot("contentDisposition",null,!0)),t.push(new Ot("contentEncoding",null,!0)),t.push(new Ot("contentLanguage",null,!0)),t.push(new Ot("contentType",null,!0)),t.push(new Ot("metadata","customMetadata",!0)),Hu=t,Hu}function pG(t,e){function n(){const r=t.bucket,s=t.fullPath,i=new ln(r,s);return e._makeStorageReference(i)}Object.defineProperty(t,"ref",{get:n})}function mG(t,e,n){const r={};r.type="file";const s=n.length;for(let i=0;i<s;i++){const o=n[i];r[o.local]=o.xform(r,e[o.server])}return pG(r,t),r}function nR(t,e,n){const r=Zj(e);return r===null?null:mG(t,r,n)}function gG(t,e,n,r){const s=Zj(e);if(s===null||!N0(s.downloadTokens))return null;const i=s.downloadTokens;if(i.length===0)return null;const o=encodeURIComponent;return i.split(",").map(u=>{const d=t.bucket,h=t.fullPath,f="/b/"+o(d)+"/o/"+o(h),p=$f(f,n,r),x=Yj({alt:"media",token:u});return p+x})[0]}function yG(t,e){const n={},r=e.length;for(let s=0;s<r;s++){const i=e[s];i.writable&&(n[i.server]=t[i.local])}return JSON.stringify(n)}class I0{constructor(e,n,r,s){this.url=e,this.method=n,this.handler=r,this.timeout=s,this.urlParam
vendor: 4,205 bytes, lines 3214-3241
3214s={},this.headers={},this.body=null,this.errorHandler=null,this.progressCallback=null,this.successCodes=[200],this.additionalRetryCodes=[]}}/** 3215 * @license 3216 * Copyright 2017 Google LLC 3217 * 3218 * Licensed under the Apache License, Version 2.0 (the "License"); 3219 * you may not use this file except in compliance with the License. 3220 * You may obtain a copy of the License at 3221 * 3222 * http://www.apache.org/licenses/LICENSE-2.0 3223 * 3224 * Unless required by applicable law or agreed to in writing, software 3225 * distributed under the License is distributed on an "AS IS" BASIS, 3226 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 3227 * See the License for the specific language governing permissions and 3228 * limitations under the License. 3229 */function rR(t){if(!t)throw S0()}function vG(t,e){function n(r,s){const i=nR(t,s,e);return rR(i!==null),i}return n}function xG(t,e){function n(r,s){const i=nR(t,s,e);return rR(i!==null),gG(i,s,t.host,t._protocol)}return n}function sR(t){function e(n,r){let s;return n.getStatus()===401?n.getErrorText().includes("Firebase App Check token is invalid")?s=RK():s=jK():n.getStatus()===402?s=PK(t.bucket):n.getStatus()===403?s=AK(t.path):s=r,s.status=n.getStatus(),s.serverResponse=r.serverResponse,s}return e}function iR(t){const e=sR(t);function n(r,s){let i=e(r,s);return r.getStatus()===404&&(i=IK(t.path)),i.serverResponse=s.serverResponse,i}return n}function wG(t,e,n){const r=e.fullServerUrl(),s=$f(r,t.host,t._protocol),i="GET",o=t.maxOperationRetryTime,a=new I0(s,i,xG(t,n),o);return a.errorHandler=iR(e),a}function bG(t,e){const n=e.fullServerUrl(),r=$f(n,t.host,t._protocol),s="DELETE",i=t.maxOperationRetryTime;function o(c,u){}const a=new I0(r,s,o,i);return a.successCodes=[200,204],a.errorHandler=iR(e),a}function _G(t,e){return t&&t.contentType||e&&e.type()||"application/octet-stream"}function kG(t,e,n){const r=Object.assign({},n);return r.fullPath=t.path,r.size=e.size(),r.contentType||(r.contentType=_G(null,e)),r}function EG(t,e,n,r,s){const i=e.bucketOnlyServerUrl(),o={"X-Goog-Upload-Protocol":"multipart"};function a(){let b="";for(let _=0;_<2;_++)b=b+Math.random().toString().slice(2);return b}const c=a();o["Content-Type"]="multipart/related; boundary="+c;const u=kG(e,r,s),d=yG(u,n),h="--"+c+`\r 3230Content-Type: application/json; charset=utf-8\r 3231\r 3232`+d+`\r 3233--`+c+`\r 3234Content-Type: `+u.contentType+`\r 3235\r 3236`,f=`\r 3237--`+c+"--",p=Ns.getBlob(h,r,f);if(p===null)throw UK();const x={name:u.fullPath},g=$f(i,t.host,t._protocol),y="POST",w=t.maxUploadRetryTime,v=new I0(g,y,vG(t,n),w);return v.urlParams=x,v.headers=o,v.body=p.uploadData(),v.errorHandler=sR(e),v}class CG{constructor(){this.sent_=!1,this.xhr_=new XMLHttpRequest,this.initXhr(),this.errorCode_=Wi.NO_ERROR,this.sendPromise_=new Promise(e=>{this.xhr_.addEventListener("abort",()=>{this.errorCode_=Wi.ABORT,e()}),this.xhr_.addEventListener("error",()=>{this.errorCode_=Wi.NETWORK_ERROR,e()}),this.xhr_.addEventListener("load",()=>{e()})})}send(e,n,r,s,i){if(this.sent_)throw yl("cannot .send() more than once");if(yi(e)&&r&&(this.xhr_.withCredentials=!0),this.sent_=!0,this.xhr_.open(n,e,!0),i!==void 0)for(const o in i)i.hasOwnProperty(o)&&this.xhr_.setRequestHeader(o,i[o].toString());return s!==void 0?this.xhr_.send(s):this.xhr_.send(),this.sendPromise_}getErrorCode(){if(!this.sent_)throw yl("cannot .getErrorCode() before sending");return this.errorCode_}getStatus(){if(!this.sent_)throw yl("cannot .getStatus() before sending");try{return this.xhr_.status}catch{return-1}}getResponse(){if(!this.sent_)throw yl("cannot .getResponse() before sending");return this.xhr_.response}getErrorText(){if(!this.sent_)throw yl("cannot .getErrorText() before sending");return this.xhr_.statusText}abort(){this.xhr_.abort()}getResponseHeader(e){return this.xhr_.getResponseHeader(e)}addUploadProgressListener(e){this.xhr_.upload!=null&&this.xhr_.upload.addEventListener("progress",e)}removeUploadProgressListener(e){this.xhr_.upload!=null&&this.xhr_.upload.removeEventListener("progress",e)}}class SG extends CG{initXhr(){this.xhr_.responseType="text"}}function P0(){return new SG}/** 3238 * @license 3239 * Copyright 2019 Google LLC 3240 * 3241 * Licensed under the Apache License, Version 2.0 (the "License");
3242 * you may not use this file except in compliance with the License. 3243 * You may obtain a copy of the License at 3244 * 3245 * http://www.apache.org/licenses/LICENSE-2.0 3246 * 3247 * Unless required by applicable law or agreed to in writing, software 3248 * distributed under the License is distributed on an "AS IS" BASIS, 3249 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 3250 * See the License for the specific language governing permissions and 3251 * limitations under the License. 3252 */class so{constructor(e,n){this._service=e,n instanceof ln?this._location=n:this._location=ln.makeFromUrl(n,e.host)}toString(){return"gs://"+this._location.bucket+"/"+this._location.path}_newRef(e,n){return new so(e,n)}get root(){const e=new ln(this._location.bucket,"");return this._newRef(this._service,e)}get bucket(){return this._location.bucket}get fullPath(){return this._location.path}get name(){return eR(this._location.path)}get storage(){return this._service}get parent(){const e=uG(this._location.path);if(e===null)return null;const n=new ln(this._location.bucket,e);return new so(this._service,n)}_throwIfRoot(e){if(this._location.path==="")throw $K(e)}}function NG(t,e,n){t._throwIfRoot("uploadBytes");const r=EG(t.storage,t._location,tR(),new Ns(e,!0),n);return t.storage.makeRequestWithTokens(r,P0).then(s=>({metadata:s,ref:t}))}function TG(t){t._throwIfRoot("getDownloadURL");const e=wG(t.storage,t._location,tR());return t.storage.makeRequestWithTokens(e,P0).then(n=>{if(n===null)throw BK();return n})}function IG(t){t._throwIfRoot("deleteObject");const e=bG(t.storage,t._location);return t.storage.makeRequestWithTokens(e,P0)}function PG(t,e){const n=dG(t._location.path,e),r=new ln(t._location.bucket,n);return new so(t.storage,r)}/** 3253 * @license 3254 * Copyright 2017 Google LLC 3255 * 3256 * Licensed under the Apache License, Version 2.0 (the "License"); 3257 * you may not use this file except in compliance with the License. 3258 * You may obtain a copy of the License at 3259 * 3260 * http://www.apache.org/licenses/LICENSE-2.0 3261 * 3262 * Unless required by applicable law or agreed to in writing, software 3263 * distributed under the License is distributed on an "AS IS" BASIS, 3264 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 3265 * See the License for the specific language governing permissions and 3266 * limitations under the License. 3267 */function jG(t){return/^[A-Za-z]+:\/\//.test(t)}function RG(t,e){return new so(t,e)}function oR(t,e){if(t instanceof j0){const n=t;if(n._bucket==null)throw FK();const r=new so(n,n._bucket);return e!=null?oR(r,e):r}else return e!==void 0?PG(t,e):t}function AG(t,e){if(e&&jG(e)){if(t instanceof j0)return RG(t,e);throw Iy("To use ref(service, url), the first argument must be a Storage instance.")}else return oR(t,e)}function Ck(t,e){const n=e==null?void 0:e[Gj];return n==null?null:ln.makeFromBucketSpec(n,t)}function DG(t,e,n,r={}){t.host=`${e}:${n}`;const s=yi(e);s&&(Mx(`https://${t.host}/b`),Ox("Storage",!0)),t._isUsingEmulator=!0,t._protocol=s?"https":"http";const{mockUserToken:i}=r;i&&(t._overrideAuthToken=typeof i=="string"?i:BI(i,t.app.options.projectId))}class j0{constructor(e,n,r,s,i,o=!1){this.app=e,this._authProvider=n,this._appCheckProvider=r,this._url=s,this._firebaseVersion=i,this._isUsingEmulator=o,this._bucket=null,this._host=Kj,this._protocol="https",this._appId=null,this._deleted=!1,this._maxOperationRetryTime=NK,this._maxUploadRetryTime=TK,this._requests=new Set,s!=null?this._bucket=ln.makeFromBucketSpec(s,this._host):this._bucket=Ck(this._host,this.app.options)}get host(){return this._host}set host(e){this._host=e,this._url!=null?this._bucket=ln.makeFromBucketSpec(this._url,e):this._bucket=Ck(e,this.app.options)}get maxUploadRetryTime(){return this._maxUploadRetryTime}set maxUploadRetryTime(e){Ek("time",0,Number.POSITIVE_INFINITY,e),this._maxUploadRetryTime=e}get maxOperationRetryTime(){return this._maxOperationRetryTime}set maxOperationRetryTime(e){Ek("time",0,Number.POSITIVE_INFINITY,e),this._maxOperationRetryTime=e}async _getAuthToken(){if(this._overrideAuthToken)return this._overrideAuthToken;const e=this._authProvider.getImmediate({optional:!0});if(e){const n=await e.getToken();if(n!==null)return n.accessToken}return null}async _getAppCheckToken(){if(kn(this.app)&&this.app.settings.appCheckToken)return this.app.settings.appCheckToken;const e=this._appCheckProvider.getImmediate({optional:!0});
3267return e?(await e.getToken()).token:null}_delete(){return this._deleted||(this._deleted=!0,this._requests.forEach(e=>e.cancel()),this._requests.clear()),Promise.resolve()}_makeStorageReference(e){return new so(this,e)}_makeRequest(e,n,r,s,i=!0){if(this._deleted)return new zK(qj());{const o=eG(e,this._appId,r,s,n,this._firebaseVersion,i,this._isUsingEmulator);return this._requests.add(o),o.getPromise().then(()=>this._requests.delete(o),()=>this._requests.delete(o)),o}}async makeRequestWithTokens(e,n){const[r,s]=await Promise.all([this._getAuthToken(),this._getAppCheckToken()]);return this._makeRequest(e,n,r,s).getPromise()}}const Sk="@firebase/storage",Nk="0.14.0";/** 3268 * @license 3269 * Copyright 2020 Google LLC 3270 * 3271 * Licensed under the Apache License, Version 2.0 (the "License"); 3272 * you may not use this file except in compliance with the License. 3273 * You may obtain a copy of the License at 3274 * 3275 * http://www.apache.org/licenses/LICENSE-2.0 3276 * 3277 * Unless required by applicable law or agreed to in writing, software 3278 * distributed under the License is distributed on an "AS IS" BASIS, 3279 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 3280 * See the License for the specific language governing permissions and 3281 * limitations under the License. 3282 */const aR="storage";function Ku(t,e,n){return t=nt(t),NG(t,e,n)}function Gu(t){return t=nt(t),TG(t)}function MG(t){return t=nt(t),IG(t)}function vl(t,e){return t=nt(t),AG(t,e)}function OG(t=Vx(),e){t=nt(t);const r=Nf(t,aR).getImmediate({identifier:e}),s=LI("storage");return s&&LG(r,...s),r}function LG(t,e,n,r={}){DG(t,e,n,r)}function FG(t,{instanceIdentifier:e}){const n=t.getProvider("app").getImmediate(),r=t.getProvider("auth-internal"),s=t.getProvider("app-check-internal");return new j0(n,r,s,e,uo)}function UG(){Zi(new oi(aR,FG,"PUBLIC").setMultipleInstances(!0)),Er(Sk,Nk,""),Er(Sk,Nk,"esm2020")}UG();const Py={apiKey:"AIzaSyBEFXKhrBVddCcp_SI8gZH-suEPF_YlssA",authDomain:"billyokland-5f7e1.firebaseapp.com",databaseURL:"https://billyokland-5f7e1-default-rtdb.europe-west1.firebasedatabase.app",projectId:"billyokland-5f7e1",storageBucket:"billyokland-5f7e1.firebasestorage.app",messagingSenderId:"1038375269623",appId:"1:1038375269623:web:c709d2513bd8ea8c290ff2"},Nl=!!(Py.apiKey&&Py.databaseURL),ja=Nl?KI(Py):null,re=ja?u7(ja):null,wo=ja?CK(ja):null,Fn=ja?OG(ja):null,ym=[{id:"trip-eze-2019",year:2019,location:{NO:"Ezé, Frankrike 2019",EN:"Ezé, France 2019"},title:{NO:"I Edvard Munchs fotspor",EN:"In the Footsteps of Edvard Munch"},description:{NO:'En studiereise sammen med min gode venn og kollega Thomas Klevjer, hvor vi oppsøkte steder hvor Munch og Skredsvig malte på slutten av 1800-tallet. Det var akkurat på denne stranden ved St. Jean Cap-Ferrat at Munch laget det første utkastet av "Skrik".',EN:'A study trip together with my good friend and colleague Thomas Klevjer, visiting places where Munch and Skredsvig painted in the late 1800s. It was on this very beach at St. Jean Cap-Ferrat that Munch created the first draft of "The Scream".'},imageUrl:"/studiereiser.jpg",videoUrl:"https://www.youtube.com/embed/OUsTXRgINbc",order:0}],vm="billy-edit-mode",lR=m.createContext(void 0);async function BG(){try{const t=await fetch("/content-overrides.json");return t.ok?await t.json():null}catch{return null}}function xm(t){const e=document.documentElement;for(const[n,r]of Object.entries(t))e.style.setProperty(`--${n}`,r)}function cR(t,e=""){const n={};for(const[r,s]of Object.entries(t)){const i=e?`${e}.${r}`:r;typeof s=="object"&&s!==null?Object.assign(n,cR(s,i)):typeof s=="string"&&(n[i]=s)}return n}function VG({children:t}){const[e,n]=m.useState({}),[r,s]=m.useState({}),[i,o]=m.useState({}),[a,c]=m.useState({}),[u,d]=m.useState({}),[h,f]=m.useState(!1),[p,x]=m.useState(!1),[g,y]=m.useState(!1),[w,v]=m.useState(ym),[b,_]=m.useState([]),[k,S]=m.useState({}),C=m.useRef(null),[N,P]=m.useState(!1),j=m.useCallback(F=>{F?window.sessionStorage.setItem(vm,"true"):window.sessionStorage.removeItem(vm)},[]);m.useEffect(()=>{BG().then(F=>{F&&(F.text&&n(G=>({...F.text,...G})),F.colors&&(s(G=>({...F.colors,...G})),xm(F.colors)),F.images&&o(G=>({...F.images,...G})),F.imageStyles&&c(G=>({...F.imageStyles,...G})),F.galleryImages&&d(G=>({...F.galleryImages,...G})))})},[]),m.useEffect(()=>{if(!Nl||!re)return;const F=Oe(re,"content"),G=$u(F,se=>{const ie=se.val();if(ie){if(ie.text){const rt={};for(const[Xe,ut]of Object.entries(ie.text))rt[Xe]=typeof ut=="object"&&ut!==null?cR(ut):{};n(rt)}ie.colors&&(s(ie.colors),xm(ie.colors)),o(ie.images&&typeof ie.images=="object"?ie.images:{}),c(ie.imageStyles&&typeof ie.imageStyles=="object"?ie.imageStyles:{}),d(ie.galleryImages&&typeof ie.galleryImages=="object"?ie.galleryImages:{})}else n({}),s({}),o({}),c({}),d({})});return()=>G()},[]),m.useEffect(()=>{if(!Nl||!re)return;const F=Oe(re,"content/studyTrips"),G=$u(F,se=>{const ie=se.val();if(ie){const rt=Object.values(ie).filter(Xe=>Xe&&typeof Xe=="object"&&Xe.id&&Xe.title);rt.sort((Xe,ut)=>Xe.order-ut.order),v(rt.length>0?rt:ym)}else v(ym)});return()=>G()},[]),m.useEffect(()=>{if(!Nl||!re)return;const F=Oe(re,"content/customProducts"),G=$u(F,se=>{const ie=se.val();if(ie){const rt=Object.values(ie).filter(Xe=>Xe&&typeof Xe=="object"&&Xe.id&&Xe.name);rt.sort((Xe,ut)=>Xe.order-ut.order),_(rt)}else _([])});return()=>G()},[]),m.useEffect(()=>{if(!Nl||!re)return;const F=Oe(re,"content/productOverrides"),G=$u(F,se=>{const ie=se.val();S(ie&&typeof ie=="object"?ie:{})});return()=>G()},[]),m.useEffect(()=>{if(!wo)return;const F=f9(wo,G=>{x(!!G),G||f(!1)});return()=>F()},[j]);const O=m.useCallback(async()=>
3282{if(re)try{const F=await t7(Oe(re,"content"));C.current=F.val(),P(!0)}catch(F){console.error("Failed to capture session snapshot:",F)}},[]);m.useEffect(()=>{(new URLSearchParams(window.location.search).get("edit")==="true"||window.sessionStorage.getItem(vm)==="true")&&p&&!h&&(j(!0),O(),f(!0))},[p,h,O,j]);const L=m.useCallback(async(F,G)=>{if(!wo)throw new Error("Firebase not configured");await u9(wo,F,G),await O(),j(!0),f(!0)},[O,j]),K=m.useCallback(()=>{f(!1),j(!1),wo&&p9(wo)},[j]),U=m.useCallback(async(F,G,se)=>{if(re){y(!0);try{const ie=G.replace(/\./g,"/");await st(Oe(re,`content/text/${F}/${ie}`),se)}finally{y(!1)}}},[]),A=m.useCallback(async(F,G)=>{if(re){y(!0);try{await st(Oe(re,`content/colors/${F}`),G),document.documentElement.style.setProperty(`--${F}`,G)}finally{y(!1)}}},[]),M=m.useCallback(async(F,G)=>{if(!re||!Fn)throw new Error("Firebase not configured");y(!0);try{const se=vl(Fn,`content-images/${F}-${Date.now()}`);await Ku(se,G);const ie=await Gu(se);return await st(Oe(re,`content/images/${F}`),ie),ie}finally{y(!1)}},[]),R=m.useCallback(async F=>{if(!(!Fn||!F))try{await MG(vl(Fn,F))}catch(G){console.warn("Could not delete image file from storage:",G)}},[]),E=m.useCallback(async F=>{if(re){y(!0);try{const G=i[F];Fn&&G&&await R(G),await st(Oe(re,`content/images/${F}`),null)}finally{y(!1)}}},[R,i]),T=m.useCallback(async(F,G)=>{if(re){y(!0);try{await st(Oe(re,`content/imageStyles/${F}`),G)}finally{y(!1)}}},[]),I=m.useCallback(async F=>{if(re){y(!0);try{await st(Oe(re,`content/imageStyles/${F}`),null)}finally{y(!1)}}},[]),H=m.useCallback(async F=>{if(re){y(!0);try{await st(Oe(re,`content/galleryImages/${F.id}`),ne(F))}finally{y(!1)}}},[]),Q=m.useCallback(async(F,G)=>{if(!Fn)throw new Error("Firebase not configured");y(!0);try{const se=vl(Fn,`content-images/gallery-${F}-${Date.now()}`);return await Ku(se,G),await Gu(se)}finally{y(!1)}},[]),ne=F=>{const G={...F};return Object.keys(G).forEach(se=>{G[se]===void 0&&delete G[se]}),G},z=m.useCallback(async F=>{if(re){y(!0);try{await st(Oe(re,`content/studyTrips/${F.id}`),ne(F))}finally{y(!1)}}},[]),ue=m.useCallback(async F=>{if(re){y(!0);try{await st(Oe(re,`content/studyTrips/${F.id}`),ne(F))}finally{y(!1)}}},[]),Fe=m.useCallback(async F=>{if(re){y(!0);try{await st(Oe(re,`content/studyTrips/${F}`),null)}finally{y(!1)}}},[]),me=m.useCallback(async(F,G)=>{if(!re)return;const se=[...w].sort((tl,Zf)=>tl.order-Zf.order),ie=se.findIndex(tl=>tl.id===F);if(ie<0)return;const rt=G==="up"?ie-1:ie+1;if(rt<0||rt>=se.length)return;const Xe=se[ie],ut=se[rt];y(!0);try{await st(Oe(re,`content/studyTrips/${Xe.id}/order`),ut.order),await st(Oe(re,`content/studyTrips/${ut.id}/order`),Xe.order)}finally{y(!1)}},[w]),or=m.useCallback(async(F,G)=>{if(!Fn)throw new Error("Firebase not configured");y(!0);try{const se=vl(Fn,`content-images/study-trip-${F}-${Date.now()}`);return await Ku(se,G),await Gu(se)}finally{y(!1)}},[]),pn=m.useCallback(async F=>{if(re){y(!0);try{await st(Oe(re,`content/customProducts/${F.id}`),ne(F))}finally{y(!1)}}},[]),mn=m.useCallback(async F=>{if(re){y(!0);try{await st(Oe(re,`content/customProducts/${F.id}`),ne(F))}finally{y(!1)}}},[]),W=m.useCallback(async F=>{if(re){y(!0);try{await st(Oe(re,`content/customProducts/${F}`),null)}finally{y(!1)}}},[]),X=m.useCallback(async F=>{if(re){y(!0);try{await st(Oe(re,`content/productOverrides/${F.id}`),ne(F))}finally{y(!1)}}},[]),_e=m.useCallback(async(F,G)=>{if(!Fn)throw new Error("Firebase not configured");y(!0);try{const se=vl(Fn,`content-images/product-${F}-${Date.now()}`);return await Ku(se,G),await Gu(se)}finally{y(!1)}},[]),_t=m.useCallback(async()=>{if(re){y(!0);try{await st(Oe(re,"content"),null),n({}),s({}),o({}),c({}),d({});const F=document.documentElement;for(let G=F.style.length-1;G>=0;G--){const se=F.style[G];se.startsWith("--")&&F.style.removeProperty(se)}}finally{y(!1)}}},[]),ar=m.useCallback(async()=>{var F;if(re){y(!0);try{await st(Oe(re,"content"),C.current);const G=document.documentElement;for(let se=G.style.length-1;se>=0;se--){const ie=G.style[se];ie.startsWith("--")&&G.style.removeProperty(ie)}(F=C.current)!=null&&F.colors&&xm(C.current.colors)}finally{y(!1)}}},[]),jn=m.useCallback(()=>{const F={text:e,colors:r,images:i,imageStyles:a,galleryImages:u},G=new Blob([JSON.stringify(F,null,2)],{type:"application/json"}),se=URL.createObjectURL(G),ie=document.createElement("a");ie.href=se,ie.download="content-overrides.json",ie.click(),URL.revokeObjectURL(se)},[e,r,i,a,u]);return l.jsx(lR.Provider,{value:{textOverrides:e,colorOverrides:r,imageOverrides:i,imageStyleOverrides:a,galleryImageOverrides:u,isEditMode:h,isAuthenticated:p,isSaving:g,enterEditMode:L,exitEditMode:K,updateText:U,updateColor:A,updateImage:M,deleteImage:E,updateImageStyle:T,deleteImageStyle:I,saveGalleryImage:H,uploadGalleryImage:Q,deleteStorageFile:R,exportOverrides:jn,resetAll:_t,resetSession:ar,hasSessionSnapshot:N,studyTrips:w,addStudyTrip:z,updateStudyTrip:ue,deleteStudyTrip:Fe,reorderStudyTrips:me,uploadStudyTripImage:or,customProducts:b,addCustomProduct:pn,updateCustomProduct:mn,deleteCustomProduct:W,uploadProductImage:_e,productOverrides:k,updateProductOverride:X},children:t})}function vt(){const t=m.useContext(lR);if(t===void 0)throw new Error("useContent must be used within a ContentProvider");return t}const $G={NO:{"nav.home":"Hjem","nav.store":"Nettbutikk","nav.galleries":"Bildegallerier","nav.about":"Om maler","nav.contact":"Kontakt","nav.events":"Arrangementer","nav.viewArtworks":"Se kunstverk","nav.tagline":"Klassisk figurativ kunst","nav.menu":"Meny","nav.language":"Spraak","nav.openMenu":"Ã
pne meny","nav.closeMenu":"Lukk meny","nav.search":"Søk","nav.searchPlaceholder":"Søk etter kunstverk...","hero.subtitle":"Klassisk figurativ maler","hero.cta":"Utforsk verkene","hero.ctaSecondary":"Kontakt meg","gallery.title":"Bildegallerier","gallery.description":"Utforsk samlinger av malerier fra ulike perioder og temaer.","gallery.viewAll":"Se alle gallerier","gallery.pageDescription":"En samling av malerier fra ulike perioder og temaer. Klikk på et bilde for å se det i full størrelse.","gallery.backToGalleries":"Tilbake til gallerier","gallery.exploreCategories":"Utforsk kategorier","store.title":"Nettbutikk","store.description":"Originale malerier og trykk tilgjengelig for kjøp.","store.visitStore":"Besøk nettbutikken","storePreview.0.title":"Væren","storePreview.1.title":"Egget","storePreview.2.title":"Linolje","store.pageDescription":"Originale malerier og trykk. Ta kontakt for pris og tilgjengelighet.","store.contactForInfo":"Ta kontakt for informasjon","store.inquiry":"Forespørsel","store.interested":"Interessert i et kunstverk?","store.interestedDesc":"Ta kontakt for pris, tilgjengelighet, eller for å diskutere et oppdrag.","store.contactMe":"Kontakt meg","store.each":"per stk","store.filterAll":"Alle","store.filterGiclee":"Giclée-trykk","store.filterLithograph":"Litografi","store.filterOriginal":"Oljemaleri","store.items":"verk","about.title":"Maleren","about.subt
3282itle":"Klassisk figurativ maler fra Sveio, Norge","about.quote":"«Ã
skape et vakkert maleri, er som Ã¥ spille etter noter. Men det Ã¥ skape et kraftfullt og inderlig verk, er som Ã¥ lage en stor symfoni som vekker sterke følelser i sjelen.»","about.description1":"Billy Ãkland er en klassisk figurativ maler som er opptatt av det sanselige og tidløse.","about.description2":"Billy Roy Ãkland f. 30.08.1969 fra Auklandshamn i Sveio, er en klassisk figurative maler med internasjonal erfaring. Han har blant annet stilt ut malerier i Kitsch-Biennale i München, representert i magasin Poets and Artists (USA), MEAM i Barcelona. Han er opptatt av det sanselige, levende, og tidløse, noe som gjenspeiles bÃ¥de i hans portrett, landskasp, og stilleben.","about.description3":"Ãkland har vært elev av Odd Nerdrum, og ellers brukt mange timer pÃ¥ Ã¥ studere i kunstgallerier og kunstmuseum rundt i Europa. Ãkland er inspirert av malere som: Rembrandt, Titian, Goya, Odd Nerdrum, Lars Hertervig, P.S.Krøyer og flere.","about.description4":"Innkjøpt av bÃ¥de offentlig og privat virksomhet! I tillegg til utstillinger i inn og utland, maler han mye pÃ¥ oppdrag bÃ¥de for næring og private samlere.","about.readMore":"Les mer om kunstneren","about.atelier":"Atelier","about.contact":"Kontakt","about.followWork":"Følg arbeidet","events.title":"Arrangementer","events.description":"Kommende utstillinger, kurs og hendelser.","events.viewAll":"Se alle arrangementer","events.pageDescription":"Kommende og tidligere utstillinger, kurs og hendelser.","events.interested":"Interessert i et kurs?","events.interestedDesc":"Ta kontakt for mer informasjon om kommende arrangementer.","events.followFacebook":"Følg pÃ¥ Facebook","events.followInstagram":"Følg pÃ¥ Instagram","events.noEvents":"Ingen kommende arrangementer for øyeblikket.","events.stayUpdated":"Hold deg oppdatert","events.stayUpdatedDesc":"Følg pÃ¥ sosiale medier for oppdateringer om kommende utstillinger, kurs og andre arrangementer.","studyTrip.location":"Ezé, Frankrike 2019","studyTrip.title":"I Edvard Munchs fotspor","studyTrip.description":'En studiereise sammen med min gode venn og kollega Thomas Klevjer, hvor vi oppsøkte steder hvor Munch og Skredsvig malte pÃ¥ slutten av 1800-tallet. Det var akkurat pÃ¥ denne stranden ved St. Jean Cap-Ferrat at Munch laget det første utkastet av "Skrik".',"studyTrips.sectionLabel":"Studiereiser","studyTrips.sectionTitle":"Studiereiser","studyTrips.addTrip":"Legg til reise","instagram.title":"Følg pÃ¥ Instagram","instagram.description":"Bak kulissene, pÃ¥gÃ¥ende arbeider og mer fra atelieret.","search.title":"Søkeresultater","search.showingResults":"Viser resultater for","search.artworksFound":"kunstverk funnet","search.enterTerm":"Skriv inn et søkeord for Ã¥ finne kunstverk","search.noResults":"Ingen resultater funnet for","search.trySearching":'Prøv Ã¥ søke etter kunstverktitler som "Balanse", "Dora", eller kategorinavn som "Portrett"',"gallery.artworks":"kunstverk","gallery.comingSoon":"Kommer snart...","contact.title":"Kontakt","contact.description":"Ta gjerne kontakt for spørsmÃ¥l om malerier, oppdrag, eller kurs.","contact.form":"Kontaktskjema","contact.info":"Kontaktinformasjon","contact.email":"E-post","contact.phone":"Telefon","contact.atelier":"Atelier","contact.socialMedia":"Sosiale medier","contact.sendMessage":"Send en melding","contact.name":"Navn","contact.namePlaceholder":"Ditt navn","contact.emailPlaceholder":"[email protected]","contact.subject":"Emne","contact.subjectPlaceholder":"Hva gjelder henvendelsen?","contact.message":"Melding","contact.messagePlaceholder":"Skriv din melding her...","contact.send":"Send melding","contact.consent":"Jeg samtykker til at mine personopplysninger lagres og brukes for Ã¥ svare pÃ¥ min henvendelse.","footer.tagline":"Klassisk figurativ maler opptatt av det sanselige og tidløse.","footer.pages":"Sider","footer.contact":"Kontakt","footer.rights":"Alle rettigheter reservert.","common.norway":"Norge","cart.title":"Handlekurv","cart.empty":"Handlekurven er tom","cart.continueShopping":"Fortsett Ã¥ handle","cart.subtotal":"Subtotal","cart.shipping":"Frakt","cart.shippingNote":"Giclée-trykk, litografi, tegning","cart.total":"Totalt","cart.checkout":"GÃ¥ til kassen","cart.remove":"Fjern","cart.addToCart":"Legg i handlekurv","cart.added":"Lagt til i handlekurv","product.giclee":"Giclée-trykk","product.lithograph":"Litografi","product.original":"Originalt maleri","product.dimensions":"MÃ¥l","product.backToShop":"Tilbake til nettbutikken","checkout.title":"Kasse","checkout.shipping":"Frakt","checkout.payment":"Betaling","checkout.paymentMethod":"FÃ¥ faktura tilsendt","checkout.reviewOrder":"Se over bestillingen","checkout.product":"Produkt","checkout.price":"Pris","checkout.quantity":"Antall","checkout.sum":"Sum","checkout.freight":"Frakt","checkout.userInfo":"Brukerinformasjon","checkout.requiredFields":"Felt merket med * mÃ¥ fylles ut.","checkout.firstName":"Fornavn","checkout.lastName":"Etternavn","checkout.phone":"Telefon","checkout.email":"E-post","checkout.repeatEmail":"Gjenta e-post","checkout.repeatEmailNote":"(Ekstra sikkerhet)","checkout.billingAddress":"Fakturaadresse","checkout.company":"Firma","checkout.companyNote":"(Fyll inn hvis du har et firma)","checkout.address":"Adresse","checkout.postalCode":"Postnummer","checkout.postalAddress":"Poststed","checkout.country":"Land","checkout.sameAddress":"Faktura- og leveringsadresse er den samme","checkout.moreInfo":"Mer informasjon","checkout.comment":"Kommentar","checkout.sendOrder":"Send bestilling","checkout.orderSuccess":"Takk for din bestilling!","checkout.orderSuccessDesc":"Du vil motta en bekreftelse pÃ¥ e-post.","checkout.shippingMethod":"Giclée-trykk, litografi, tegning","checkout.invoice":"FÃ¥ faktura tilsendt","checkout.emailRepeat":"Gjenta e-post","checkout.orderConfirmed":"Bestilling bekreftet","checkout.orderConfirmedMessage":"Takk for din bestilling! Du vil motta en bekreftelse pÃ¥ e-post.","checkout.processing":"Behandler..."},EN:{"nav.home":"Home","nav.store":"Shop","nav.galleries":"Galleries","nav.about":"About","nav.contact":"Contact","nav.events":"Events","nav.viewArtworks":"View artworks","nav.tagline":"Classical figurative art","nav.menu":"Menu","nav.language":"Language","nav.openMenu":"Open menu","nav.closeMenu":"Close menu","nav.search":"Search","nav.searchPlaceholder":"Search for artworks...","hero.subtitle":"Classical figurative painter","hero.cta":"Explore the works","hero.ctaSecondary":"Contact me","gallery.title":"Galleries","gallery.description":"Explore collections of paintings from various periods and themes.","gallery.viewAll":"View all galleries","gallery.pageDescription":"A collection of paintings from various periods and themes. Click on an image to view it in full size.","gallery.backToGalleries":"Back to galleries","gallery.exploreCategories":"Explore categories","store.title":"Shop","store.description":"Original paintings and prints available for purchase.","store.visitStore":"Visit the shop","storePreview.0.title":"Væren","storePreview.1.title":"The Egg","storePreview.2.title":"Linseed Oil","store.pageDescription":"Original paintings and prints. Contact for price and availability.","store.contactForInfo":"Contact for information","store.inquiry":"Inquiry","store.interested":"Interested in an artwork?","store.interestedDesc":"Contact for price, availability, or to discu
3282ss a commission.","store.contactMe":"Contact me","store.each":"each","store.filterAll":"All","store.filterGiclee":"Giclée Prints","store.filterLithograph":"Lithographs","store.filterOriginal":"Oil Paintings","store.items":"works","about.title":"The Painter","about.subtitle":"Classical figurative painter from Sveio, Norway","about.quote":'"Creating a beautiful painting is like playing to sheet music. But creating a powerful and heartfelt work is like making a great symphony that awakens strong emotions in your soul."',"about.description1":"Billy Ãkland is a classical figurative painter focused on the sensual and timeless.","about.description2":"Billy Roy Ãkland b. 30.08.1969 from Auklandshamn in Sveio, is a classical figurative painter with international experience. He has exhibited paintings at the Kitsch-Biennale in Munich, been represented in Poets and Artists magazine (USA), and at MEAM in Barcelona. He is focused on the sensual, vivid, and timeless, which is reflected in his portraits, landscapes, and still lifes.","about.description3":"Ãkland has been a student of Odd Nerdrum, and has spent many hours studying in art galleries and museums across Europe. Ãkland is inspired by painters such as: Rembrandt, Titian, Goya, Odd Nerdrum, Lars Hertervig, P.S. Krøyer and more.","about.description4":"Purchased by both public and private enterprises! In addition to exhibitions in Norway and abroad, he paints many commissioned works for both businesses and private collectors.","about.readMore":"Read more about the artist","about.atelier":"Studio","about.contact":"Contact","about.followWork":"Follow the work","events.title":"Events","events.description":"Upcoming exhibitions, courses and events.","events.viewAll":"View all events","events.pageDescription":"Upcoming and past exhibitions, courses and events.","events.interested":"Interested in a course?","events.interestedDesc":"Contact for more information about upcoming events.","events.followFacebook":"Follow on Facebook","events.followInstagram":"Follow on Instagram","events.noEvents":"No upcoming events at the moment.","events.stayUpdated":"Stay updated","events.stayUpdatedDesc":"Follow on social media for updates about upcoming exhibitions, courses, and other events.","studyTrip.location":"Ezé, France 2019","studyTrip.title":"In the Footsteps of Edvard Munch","studyTrip.description":'A study trip together with my good friend and colleague Thomas Klevjer, visiting places where Munch and Skredsvig painted in the late 1800s. It was on this very beach at St. Jean Cap-Ferrat that Munch created the first draft of "The Scream".',"studyTrips.sectionLabel":"Study Trips","studyTrips.sectionTitle":"Study Trips","studyTrips.addTrip":"Add Trip","instagram.title":"Follow on Instagram","instagram.description":"Behind the scenes, works in progress, and more from the studio.","search.title":"Search Results","search.showingResults":"Showing results for","search.artworksFound":"artworks found","search.enterTerm":"Enter a search term to find artworks","
3282search.noResults":"No results found for","search.trySearching":'Try searching for artwork titles like "Balanse", "Dora", or category names like "Portrait"',"gallery.artworks":"artworks","gallery.comingSoon":"Coming soon...","contact.title":"Contact","contact.description":"Feel free to contact for questions about paintings, commissions, or courses.","contact.form":"Contact form","contact.info":"Contact information","contact.email":"Email","contact.phone":"Phone","contact.atelier":"Studio","contact.socialMedia":"Social media","contact.sendMessage":"Send a message","contact.name":"Name","contact.namePlaceholder":"Your name","contact.emailPlaceholder":"[email protected]","contact.subject":"Subject","contact.subjectPlaceholder":"What is your inquiry about?","contact.message":"Message","contact.messagePlaceholder":"Write your message here...","contact.send":"Send message","contact.consent":"I consent to my personal information being stored and used to respond to my inquiry.","footer.tagline":"Classical figurative painter focused on the sensual and timeless.","footer.pages":"Pages","footer.contact":"Contact","footer.rights":"All rights reserved.","common.norway":"Norway","cart.title":"Shopping Cart","cart.empty":"Your cart is empty","cart.continueShopping":"Continue shopping","cart.subtotal":"Subtotal","cart.shipping":"Shipping","cart.shippingNote":"Giclée print, lithograph, drawing","cart.total":"Total","cart.checkout":"Proceed to checkout","cart.remove":"Remove","cart.addToCart":"Add to cart","cart.added":"Added to cart","product.giclee":"Giclée print","product.lithograph":"Lithograph","product.original":"Original painting","product.dimensions":"Dimensions","product.backToShop":"Back to shop","checkout.title":"Checkout","checkout.shipping":"Shipping","checkout.payment":"Payment","checkout.paymentMethod":"Get an invoice sent to you","checkout.reviewOrder":"Review your order","checkout.product":"Product","checkout.price":"Price","checkout.quantity":"Quantity","checkout.sum":"Sum","checkout.freight":"Freight","checkout.userInfo":"User information","checkout.requiredFields":"Fields marked with * must be filled in.","checkout.firstName":"First name","checkout.lastName":"Surname","checkout.phone":"Telephone","checkout.email":"Email","checkout.repeatEmail":"Repeat email","checkout.repeatEmailNote":"(Extra security)","checkout.billingAddress":"Billing address","checkout.company":"Company","checkout.companyNote":"(Fill in if you have a company)","checkout.address":"Address","checkout.postalCode":"Postal code","checkout.postalAddress":"Postal address","checkout.country":"Country","checkout.sameAddress":"Invoice and delivery address are the same","checkout.moreInfo":"More information","checkout.comment":"Comment","checkout.sendOrder":"Send order","checkout.orderSuccess":"Thank you for your order!","checkout.orderSuccessDesc":"You will receive a confirmation email.","checkout.shippingMethod":"Giclée print, lithograph, drawing","checkout.invoice":"Get an invoice sent to you","checkout.emailRepeat":"Repeat email","checkout.orderConfirmed":"Order confirmed","checkout.orderConfirmedMessage":"Thank you for your order! You will receive a confirmation email.","checkout.processing":"Processing..."}},uR=m.createContext(void 0);function zG({children:t}){const[e,n]=m.useState("NO"),{textOverrides:r}=vt(),s=i=>{var a;const o=(a=r==null?void 0:r[e])==null?void 0:a[i];return o!==void 0&&o!==""?o:$G[e][i]||i};return l.jsx(uR.Provider,{value:{language:e,setLanguage:n,t:s},children:t})}function Mt(){const t=m.useContext(uR);if(t===void 0)throw new Error("useLanguage must be used within a LanguageProvider");return t}const dR=m.createContext(void 0),hR=150;function WG({children:t}){const[e,n]=m.useState(()=>{if(typeof window<"u"){const h=localStorage.getItem("cart");return h?JSON.parse(h):[]}return[]}),[r,s]=m.useState(!1);m.useEffect(()=>{localStorage.setItem("cart",JSON.stringify(e))},[e]);const i=h=>{h.sold||(n(f=>f.find(x=>x.product.id===h.id)?f.map(x=>x.product.id===h.id?{...x,quantity:x.quantity+1}:x):[...f,{product:h,quantity:1}]),s(!0))},o=h=>{n(f=>f.filter(p=>p.product.id!==h))},a=(h,f)=>{if(f<=0){o(h);return}n(p=>p.map(x=>x.product.id===h?{...x,quantity:f}:x))},c=()=>{n([])},u=()=>{const h=e.reduce((f,p)=>f+p.product.price*p.quantity,0);return h>0?h+hR:0},d=()=>e.reduce((h,f)=>h+f.quantity,0);return l.jsx(dR.Provider,{value:{items:e,addToCart:i,removeFromCart:o,updateQuantity:a,clearCart:c,getCartTotal:u,getCartCount:d,isCartOpen:r,setIsCartOpen:s},children:t})}function zf(){const t=m.useContext(dR);if(t===void 0)throw new Error("useCart must be used within a CartProvider");return t}const jy=hR,fR=m.createContext(void 0);function HG({children:t}){const[e,n]=m.useState(()=>{try{return localStorage.getItem("cookieConsent")==="true"}catch{return!1}}),r=m.useRef(null),s=m.useCallback(()=>{var o;(o=r.current)==null||o.call(r)},[]),i=m.useCallback(o=>{r.current=o},[]);return l.jsx(fR.Provider,{value:{hasConsent:e,openCookieSettings:s,_setHasConsent:n,_registerOpenSettings:i},children:t})}function Za(){const t=m.useContext(fR);if(!t)throw new Error("useCookieConsent must be used within CookieConsentProvider");return t}function KG(){const{_setHasConsent:t,_registerOpenSettings:e}=Za(),[n,r]=m.useState(!1),[s,i]=m.useState(!1),[o,a]=m.useState(!1);m.useEffect(()=>{localStorage.getItem("cookieConsent")===null&&r(!0)},[]);const c=m.useCallback(()=>{const g=localStorage.getItem("cookieConsent");a(g==="true"),i(!0)},[]);m.useEffect(()=>{e(c)},[c,e]);const u=m.useCallback(g=>{localStorage.setItem("cookieConsent",g?"true":"false"),localStorage.setItem("cookieConsentDate",new Date().toISOString()),t(g),r(!1),i(!1)},[t]),d=()=>u(!0),h=()=>u(!1),f=()=>u(o),p=()=>{a(!0),u(!0)},x=()=>{a(!1),u(!1)};return l.jsxs(l.Fragment,{children:[n&&!s&&l.jsx("div",{className:"fixed bottom-0 left-0 right-0 z-50 bg-white border-t border-gray-300 shadow-lg",children:l.jsxs("div",{className:"max-w-6xl mx-auto px-4 py-4 flex flex-col sm:flex-row items-start sm:items-center gap-3 sm:gap-6",children:[l.jsxs("div",{className:"flex-1 min-w-0",children:[l.jsx("p",{className:"font-semibold text-black text-sm mb-0.5",children:"Informasjonskapsler og samtykke"}),l.jsx("p",{className:"text-gray-600 text-xs leading-relaxed",children:"Vi bruker tjenester som Google Maps. Velg hva du ønsker å aktivere."})]}),l.jsxs("div",{className:"flex flex-row gap-2 flex-nowrap shrink-0",children:[l.jsx("button",{onClick:()=>c(),className:"border border-black text-black bg-white px-3 py-2 text-xs font-medium hover:bg-gray-50 transition-colors whitespace-nowrap",children:"Innstillinger"}),l.jsx("button",{onClick:h,className:"bg-black text-white px-3 py-2 text-xs font-medium hover:bg-gray-800 transition-colors whitespace-nowrap",children:"Avslå"}),l.jsx("button",{onClick:d,className:"bg-black text-white px-3 py-2 text-xs font-medium hover:bg-gray-800 transition-colors whitespace-nowrap",children:"Godta"})]})]})}),s&&l.jsxs("div",{className:"fixed inset-0 z-[60] flex items-center justify-center p-4",children:[l.jsx("div",{className:"absolute inset-0 bg-black/50",onClick:f}),l.jsxs("div",{className:"relative bg-white text-gray-900 max-w-2xl w-full max-h-[90vh] overflow-y-auto rounded-lg shadow-2xl",children:[l.jsxs("div",{className:"flex items-center justify-between p-6 border-b border-gray-200",children:[l.jsx("h2",{className:"text-lg font-semibold text-gray-900",children:"Samtykkeinnstillinger"}),l.jsx("button",{onClick:f,className:"text-gray-500 hover:text-gray-900 transition-colors p-1","aria-label":"Lukk",children:l.jsx(In,{className:"w-5 h-5"})})]}),l.jsxs("div",{className:"p-6 space-y-4",children:[l.jsx("div",{className:"border border-gray-200 rounded-lg p-5",children:l.jsxs("div",{className:"flex items-start justify-between gap-4",children:[l.jsxs("div",{children:[l.jsx("h3",{className:"font-medium text-gray-900 mb-1",children:"Nødvendige informasjonskapsler"}),l.jsx("p",{className:"text-sm text-gray-500",children:"Grunnleggende funksjonalitet"})]}),l.jsx("span",{className:"shrink-0 text-xs font-medium text-green-700 bg-green-50 border border-green-200 px-2.5 py-1 rounded",children:"Alltid aktivert"})]})}),l.jsx("div",{className:"border border-gray-200 rounded-lg p-5",children:l.jsxs("div",{className:"flex items-start justify-between gap-4",children:[l.jsxs("div",{className:"flex-1 min-w-0",children:[l.jsx("h3",{className:"font-medium text-gray-900 mb-2",children:"Funksjonelle tjenester"}),l.jsx("p",{className:"text-sm font-medium text-gray-700 mb-1",children:"Google Maps"}),l.jsx("p",{className:"text-xs text-gray-500 mb-1",children:"Viser interaktive kart | Levetid: Sesjon"}),l.jsx("a",{href:"https://policies.google.com/privacy",target:"_blank",rel:"noopener noreferrer",className:"text-xs text-blue-600 hover:underline",onClick:g=>g.stopPropagation(),children:"Googles personvernerklæring"})]}),l.jsx("button",{role:"switch","aria-checked":o,"aria-label":"Aktiver Google Maps",onClick:g=>{g.stopPropagation(),a(y=>!y)},className:`relative shrink-0 inline-flex h-6 w-11 items-center rounded-full transition-colors focus:outline-none focus-visible:ring-2 focus-visible:ring-offset-2 focus-visible:ring-black ${o?"bg-black":"bg-gray-300"}
3282`,children:l.jsx("span",{className:`inline-block h-4 w-4 rounded-full bg-white shadow-sm transition-transform ${o?"translate-x-6":"translate-x-1"}`})})]})})]}),l.jsxs("div",{className:"flex flex-row gap-3 p-6 pt-0",children:[l.jsx("button",{onClick:x,className:"flex-1 border border-gray-300 text-gray-700 bg-white px-4 py-2.5 text-sm font-medium hover:bg-gray-50 transition-colors rounded",children:"Avslå alle"}),l.jsx("button",{onClick:f,className:"flex-1 border border-black text-black bg-white px-4 py-2.5 text-sm font-medium hover:bg-gray-50 transition-colors rounded",children:"Lagre"}),l.jsx("button",{onClick:p,className:"flex-1 bg-black text-white px-4 py-2.5 text-sm font-medium hover:bg-gray-800 transition-colors rounded",children:"Godta alle"})]})]})]})]})}const GG=1500;function J({tKey:t,as:e="span",className:n="",style:r,fallbackText:s}){var S;const{isEditMode:i,updateText:o,textOverrides:a}=vt(),{t:c,language:u}=Mt(),[d,h]=m.useState(!1),[f,p]=m.useState(""),[x,g]=m.useState(!1),y=m.useRef(null),w=(S=a==null?void 0:a[u])==null?void 0:S[t],v=w!==void 0&&w!==""?w:s??c(t);m.useEffect(()=>{d&&y.current&&(y.current.focus(),y.current.select())},[d]),m.useEffect(()=>{if(x){const C=setTimeout(()=>g(!1),GG);return()=>clearTimeout(C)}},[x]);const b=async()=>{try{f!==v&&await o(u,t,f)}catch(C){console.error("Failed to save text:",C)}h(!1),g(!0)},_=()=>{h(!1),p(v)},k=C=>{C.key==="Enter"&&!C.shiftKey&&(C.preventDefault(),b()),C.key==="Escape"&&_()};if(!i)return m.createElement(e,{className:n,style:r},v);if(d){const C=N=>{N.preventDefault(),N.stopPropagation()};return l.jsxs("div",{className:"relative inline-block w-full",onClick:C,children:[l.jsx("textarea",{ref:y,value:f,onChange:N=>p(N.target.value),onKeyDown:k,onClick:C,className:"w-full p-2 border-2 border-blue-500 bg-white text-black rounded resize-y min-h-[2.5rem] text-sm",rows:Math.max(1,Math.ceil(f.length/60))}),l.jsxs("div",{className:"flex gap-1 mt-1",children:[l.jsxs("button",{onClick:N=>{C(N),b()},className:"flex items-center gap-1 px-2 py-1 bg-green-600 text-white text-xs rounded hover:bg-green-700",children:[l.jsx(_a,{className:"w-3 h-3"})," Save"]}),l.jsxs("button",{onClick:N=>{C(N),_()},className:"flex items-center gap-1 px-2 py-1 bg-gray-500 text-white text-xs rounded hover:bg-gray-600",children:[l.jsx(In,{className:"w-3 h-3"})," Cancel"]})]})]})}return m.createElement(e,{className:`${n} relative group/editable`,style:r},l.jsxs(l.Fragment,{children:[v,x?l.jsx("span",{className:"absolute -top-2 -right-2 bg-green-500 text-white p-1 rounded-full shadow-lg z-50 animate-pulse",children:l.jsx(_a,{className:"w-3 h-3"})}):l.jsx("button",{type:"button",onClick:C=>{C.preventDefault(),C.stopPropagation(),p(v),h(!0)},className:"absolute -top-2 -right-2 opacity-0 group-hover/editable:opacity-100 transition-opacity bg-blue-500 text-white p-1 rounded-full shadow-lg z-50 cursor-pointer",children:l.jsx(Gc,{className:"w-3 h-3"})}),l.jsx("span",{className:`absolute inset-0 border-2 border-dashed rounded pointer-events-none transition-opacity ${x?"border-green-400 opacity-100":"border-blue-400 opacity-0 group-hover/editable:opacity-100"}`})]}))}const pR="/assets/logo-W2upDtoa.png";function qG({isHeroVisible:t=!0}){const[e,n]=m.useState(!1),[r,s]=m.useState(!1),[i,o]=m.useState(!1),[a,c]=m.useState(""),{language:u,setLanguage:d,t:h}=Mt(),{getCartCount:f,setIsCartOpen:p}=zf(),x=Rr(),g=$a(),y=f(),w=[{tKey:"nav.home",path:"/"},{tKey:"nav.about",path:"/om-oss"},{tKey:"nav.store",path:"/nettbutikk"},{tKey:"nav.galleries",path:"/gallerier"},{tKey:"nav.events",path:"/arrangementer"},{tKey:"nav.contact",path:"/kontakt"}];m.useEffect(()=>{const _=()=>{n(window.scrollY>50)};return window.addEventListener("scroll",_),()=>window.removeEventListener("scroll",_)},[]),m.useEffect(()=>{s(!1),o(!1)},[x.pathname]);const v=t&&!e,b=_=>{_.preventDefault(),a.trim()&&(g(`/sok?q=${encodeURIComponent(a.trim())}`),o(!1),c(""))};return l.jsxs(l.Fragment,{children:[l.jsx(oe.div,{initial:{opacity:0}
3282,animate:{opacity:1},className:`fixed top-0 left-0 right-0 z-50 hidden md:block transition-all duration-500 ${v?"bg-transparent":"bg-background"}`,children:l.jsxs("div",{className:"container-gallery flex items-center justify-between h-10 text-xs",children:[l.jsxs("div",{className:"flex items-center gap-4",children:[l.jsxs("a",{href:"mailto:[email protected]",className:`flex items-center gap-1.5 transition-colors duration-300 ${v?"text-hero-text/80 hover:text-hero-text":"text-muted-foreground hover:text-foreground"}`,children:[l.jsx(Cg,{className:"w-3.5 h-3.5"}),l.jsx("span",{children:"[email protected]"})]}),l.jsx("span",{className:`${v?"text-hero-text/30":"text-muted-foreground/50"}`,children:"|"}),l.jsxs("a",{href:"https://www.google.com/maps/search/?api=1&query=Gallery+Billy+Okland,+Mjånesvegen+97,+5551+Auklandshamn",target:"_blank",rel:"noopener noreferrer",className:`flex items-center gap-1.5 transition-colors duration-300 ${v?"text-hero-text/80 hover:text-hero-text":"text-muted-foreground hover:text-foreground"}`,children:[l.jsx(VS,{className:"w-3.5 h-3.5"}),l.jsx("span",{children:"Mjånesvegen 97, 5551 Auklandshamn"})]})]}),l.jsxs("div",{className:"flex items-center gap-4",children:[l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsx("a",{href:"https://www.facebook.com/billyokland",target:"_blank",rel:"noopener noreferrer",className:`transition-colors duration-300 ${v?"text-hero-text/80 hover:text-hero-text":"text-muted-foreground hover:text-foreground"}`,"aria-label":"Facebook",children:l.jsx(Kc,{className:"w-4 h-4"})}),l.jsx("a",{href:"https://www.instagram.com/billyokland",target:"_blank",rel:"noopener noreferrer",className:`transition-colors duration-300 ${v?"text-hero-text/80 hover:text-hero-text":"text-muted-foreground hover:text-foreground"}`,"aria-label":"Instagram",children:l.jsx(Oa,{className:"w-4 h-4"})}),l.jsx("a",{href:"https://www.youtube.com/@billykland7495",target:"_blank",rel:"noopener noreferrer",className:`transition-colors duration-300 ${v?"text-hero-text/80 hover:text-hero-text":"text-muted-foreground hover:text-foreground"}`,"aria-label":"YouTube",children:l.jsx(lf,{className:"w-4 h-4"})})]}),l.jsx("span",{className:`${v?"text-hero-text/30":"text-muted-foreground/50"}`,children:"|"}),l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsx("button",{onClick:()=>d("NO"),className:`font-medium tracking-wide transition-colors duration-300 ${u==="NO"?v?"text-hero-text":"text-foreground":v?"text-hero-text/50 hover:text-hero-text/70":"text-muted-foreground hover:text-foreground"}`,children:"NO"}),l.jsx("span",{className:`${v?"text-hero-text/50":"text-muted-foreground"}`,children:"/"}),l.jsx("button",{onClick:()=>d("EN"),className:`font-medium tracking-wide transition-colors duration-300 ${u==="EN"?v?"text-hero-text":"text-foreground":v?"text-hero-text/50 hover:text-hero-text/70":"text-muted-foreground hover:text-foreground"}`,children:"EN"})]})]})]})}),l.jsxs(oe.nav,{initial:{opacity:0,y:-10},animate:{opacity:1,y:0},transition:{duration:.5,delay:.1},className:`fixed left-0 right-0 z-40 top-0 md:top-10 transition-colors duration-500 ${v?"bg-transparent":"bg-background shadow-sm"}`,children:[l.jsx(oe.div,{initial:{opacity:0}
3282,animate:{opacity:e?1:0},className:"absolute bottom-0 left-0 right-0 h-px bg-border"}),l.jsxs("div",{className:"container-gallery flex items-center justify-between h-16 md:h-20",children:[l.jsx(ge,{to:"/",onClick:()=>window.scrollTo({top:0,behavior:"smooth"}),className:"flex items-center",children:l.jsx("img",{src:pR,alt:"Billy Ãkland",className:`h-12 md:h-16 w-auto transition-all duration-300 ${v?"brightness-0 invert":""}`})}),l.jsx("div",{className:"hidden lg:flex items-center gap-8 overflow-visible",children:w.map(_=>l.jsx(ge,{to:_.path,onClick:()=>{x.pathname===_.path&&window.scrollTo({top:0,behavior:"smooth"})},className:`link-underline text-sm tracking-wide uppercase transition-colors duration-300 ${x.pathname===_.path?v?"text-hero-text":"text-foreground":v?"text-hero-text/80 hover:text-hero-text":"text-muted-foreground hover:text-foreground"}`,children:l.jsx(J,{tKey:_.tKey,as:"span"})},_.path))}),l.jsxs("div",{className:"hidden lg:flex items-center gap-1",children:[l.jsx("button",{onClick:()=>o(!0),className:`flex items-center justify-center p-2 transition-colors duration-300 ${v?"text-hero-text hover:text-hero-text/80":"text-foreground hover:text-muted-foreground"}`,"aria-label":h("nav.search"),children:l.jsx(Xo,{className:"w-5 h-5"})}),l.jsxs("button",{onClick:()=>p(!0),className:`relative flex items-center justify-center p-2 transition-colors duration-300 ${v?"text-hero-text hover:text-hero-text/80":"text-foreground hover:text-muted-foreground"}`,"aria-label":h("cart.title"),children:[l.jsx(cb,{className:"w-5 h-5"}),y>0&&l.jsx("span",{className:"absolute -top-0.5 -right-0.5 w-4 h-4 bg-accent text-background text-[10px] font-medium rounded-full flex items-center justify-center",children:y})]})]}),l.jsxs("div",{className:"flex items-center gap-1 lg:hidden",children:[l.jsx("button",{onClick:()=>o(!0),className:`p-2 transition-colors duration-300 ${v?"text-hero-text":"text-foreground"}`,"aria-label":h("nav.search"),children:l.jsx(Xo,{className:"w-5 h-5"})}),l.jsxs("button",{onClick:()=>p(!0),className:`relative p-2 transition-colors duration-300 ${v?"text-hero-text":"text-foreground"}`,"aria-label":h("cart.title"),children:[l.jsx(cb,{className:"w-5 h-5"}),y>0&&l.jsx("span",{className:"absolute top-0.5 right-0.5 w-4 h-4 bg-accent text-background text-[10px] font-medium rounded-full flex items-center justify-center",children:y})]}),l.jsx("button",{onClick:()=>s(!0),className:`p-2 transition-colors duration-300 ${v?"text-hero-text":"text-foreground"}`,"aria-label":h("nav.openMenu"),children:l.jsx(PO,{className:"w-6 h-6"})})]})]})]}),l.jsx(Xi,{children:i&&l.jsxs(l.Fragment,{children:[l.jsx(oe.div,{initial:{opacity:0}
3282,animate:{opacity:1},exit:{opacity:0},transition:{duration:.2},className:"fixed inset-0 bg-overlay/80 z-50",onClick:()=>o(!1)}),l.jsx(oe.div,{initial:{opacity:0,y:-20},animate:{opacity:1,y:0},exit:{opacity:0,y:-20},transition:{duration:.2},className:"fixed top-0 left-0 right-0 z-50 bg-background p-6 md:p-8",children:l.jsxs("div",{className:"container-gallery",children:[l.jsxs("div",{className:"flex items-center justify-between mb-6",children:[l.jsx("span",{className:"font-serif text-lg",children:h("nav.search")}),l.jsx("button",{onClick:()=>o(!1),className:"p-2 text-foreground hover:text-muted-foreground transition-colors",children:l.jsx(In,{className:"w-5 h-5"})})]}),l.jsx("form",{onSubmit:b,children:l.jsxs("div",{className:"relative",children:[l.jsx(Xo,{className:"absolute left-4 top-1/2 -translate-y-1/2 w-5 h-5 text-muted-foreground"}),l.jsx("input",{type:"text",value:a,onChange:_=>c(_.target.value),placeholder:h("nav.searchPlaceholder"),className:"w-full pl-12 pr-4 py-4 bg-transparent border border-border text-foreground placeholder:text-muted-foreground focus:outline-none focus:border-foreground transition-colors text-lg",autoFocus:!0})]})})]})})]})}),l.jsx(Xi,{children:r&&l.jsxs(l.Fragment,{children:[l.jsx(oe.div,{initial:{opacity:0}
3282,animate:{opacity:1},exit:{opacity:0},transition:{duration:.3},className:"fixed inset-0 bg-overlay/50 z-50 lg:hidden",onClick:()=>s(!1)}),l.jsx(oe.div,{initial:{x:"100%"},animate:{x:0},exit:{x:"100%"},transition:{type:"tween",duration:.3},className:"fixed top-0 right-0 bottom-0 w-80 max-w-[85vw] bg-background z-50 lg:hidden",children:l.jsxs("div",{className:"flex flex-col h-full",children:[l.jsxs("div",{className:"flex items-center justify-between px-6 h-16 border-b border-border",children:[l.jsx("span",{className:"font-serif text-lg",children:h("nav.menu")}),l.jsx("button",{onClick:()=>s(!1),className:"p-2 text-foreground","aria-label":h("nav.closeMenu"),children:l.jsx(In,{className:"w-5 h-5"})})]}),l.jsx("nav",{className:"flex-1 px-6 py-8 overflow-y-auto",children:l.jsx("ul",{className:"space-y-6",children:w.map((_,k)=>l.jsx(oe.li,{initial:{opacity:0,x:20},animate:{opacity:1,x:0},transition:{delay:k*.05},children:l.jsx(ge,{to:_.path,onClick:()=>{x.pathname===_.path&&window.scrollTo({top:0,behavior:"smooth"})},className:`block text-lg font-serif uppercase ${x.pathname===_.path?"text-foreground":"text-muted-foreground"}`,children:l.jsx(J,{tKey:_.tKey,as:"span"})})},_.path))})}),l.jsxs("div",{className:"px-6 py-6 border-t border-border space-y-4",children:[l.jsxs("div",{className:"space-y-2 pb-4 border-b border-border",children:[l.jsxs("a",{href:"tel:+4740201696",className:"flex items-center gap-2 text-sm text-muted-foreground hover:text-foreground transition-colors",children:[l.jsx(zS,{className:"w-3.5 h-3.5"}),"+47 40 20 16 96"]}),l.jsxs("a",{href:"mailto:[email protected]",className:"flex items-center gap-2 text-sm text-muted-foreground hover:text-foreground transition-colors",children:[l.jsx(Cg,{className:"w-3.5 h-3.5"}),"[email protected]"]})]}),l.jsxs("div",{className:"flex items-center justify-between",children:[l.jsx("span",{className:"text-sm text-muted-foreground",children:h("nav.language")}),l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsx("button",{onClick:()=>d("NO"),className:`text-sm font-medium transition-colors ${u==="NO"?"text-foreground":"text-muted-foreground"}`,children:"NO"}),l.jsx("span",{className:"text-muted-foreground",children:"/"}),l.jsx("button",{onClick:()=>d("EN"),className:`text-sm font-medium transition-colors ${u==="EN"?"text-foreground":"text-muted-foreground"}`,children:"EN"})]})]})]})]})})]})})]})}function YG(){const{t}=Mt(),{openCookieSettings:e}=Za(),n=Rr(),r=[{label:t("nav.home"),path:"/"},{label:t("nav.about"),path:"/om-oss"},{label:t("nav.store"),path:"/nettbutikk"},{label:t("nav.galleries"),path:"/gallerier"},{label:t("nav.events"),path:"/arrangementer"},{label:t("nav.contact"),path:"/kontakt"}];return l.jsx("footer",{className:"bg-secondary/50 border-t border-border",children:l.jsxs("div",{className:"container-gallery section-spacing",children:[l.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-12 md:gap-8",children:[l.jsxs("div",{children:[l.jsx(ge,{to:"/",onClick:()=>{n.pathname==="/"&&window.scrollTo({top:0,behavior:"smooth"})},className:"inline-block",children:l.jsx("img",{src:pR,alt:"Billy Ãkland",className:"h-16 w-auto"})}),l.jsx("div",{className:"mt-4 body-small text-muted-foreground max-w-xs",children:l.jsx(J,{tKey:"footer.tagline",as:"p"})})]}),l.jsxs("div",{children:[l.jsx("h4",{className:"text-sm font-medium tracking-wide text-foreground mb-6",children:t("footer.pages")}),l.jsx("ul",{className:"space-y-3",children:r.map(s=>l.jsx("li",{children:l.jsx(ge,{to:s.path,onClick:()=>{n.pathname===s.path&&window.scrollTo({top:0,behavior:"smooth"})},className:"text-sm text-muted-foreground hover:text-foreground transition-colors duration-300",children:s.label})},s.path))})]}),l.jsxs("div",{children:[l.jsx("h4",{className:"text-sm font-medium tracking-wide text-foreground mb-6",children:t("footer.contact")}),l.jsxs("address",{className:"not-italic space-y-3 text-sm text-muted-foreground",children:[l.jsx("p",{children:"MjÃ¥nesvegen 97"}),l.jsx("p",{children:"5551 Auklandshamn"}),l.jsx("p",{className:"pt-2",children:l.jsx("a",{href:"tel:+47402
328201696",className:"hover:text-foreground transition-colors duration-300",children:"+47 40 20 16 96"})}),l.jsx("p",{children:l.jsx("a",{href:"mailto:[email protected]",className:"hover:text-foreground transition-colors duration-300",children:"[email protected]"})}),l.jsx("p",{children:l.jsx("a",{href:"mailto:[email protected]",className:"hover:text-foreground transition-colors duration-300",children:"[email protected]"})})]}),l.jsxs("div",{className:"flex items-center gap-4 mt-6",children:[l.jsx("a",{href:"https://www.facebook.com/billyokland",target:"_blank",rel:"noopener noreferrer",className:"text-muted-foreground hover:text-foreground transition-colors duration-300","aria-label":"Facebook",children:l.jsx(Kc,{className:"w-5 h-5"})}),l.jsx("a",{href:"https://www.instagram.com/billyokland",target:"_blank",rel:"noopener noreferrer",className:"text-muted-foreground hover:text-foreground transition-colors duration-300","aria-label":"Instagram",children:l.jsx(Oa,{className:"w-5 h-5"})}),l.jsx("a",{href:"https://www.youtube.com/@billykland7495",target:"_blank",rel:"noopener noreferrer",className:"text-muted-foreground hover:text-foreground transition-colors duration-300","aria-label":"YouTube",children:l.jsx(lf,{className:"w-5 h-5"})})]})]})]}),l.jsxs("div",{className:"mt-16 pt-8 border-t border-border flex flex-col md:flex-row items-center justify-between gap-4",children:[l.jsxs("p",{className:"text-xs text-muted-foreground",children:["© ",new Date().getFullYear()," Billy Ãkland. ",t("footer.rights")]}),l.jsxs("div",{className:"flex items-center gap-4 flex-wrap justify-center",children:[l.jsx(ge,{to:"/pers
3282onvern",className:"text-xs text-muted-foreground hover:text-foreground transition-colors duration-300",children:"Personvern"}),l.jsxs("button",{onClick:e,className:"flex items-center gap-1 text-xs text-muted-foreground hover:text-foreground transition-colors duration-300",children:[l.jsx(RO,{className:"w-3.5 h-3.5"}),"Samtykkeinnstillinger"]}),l.jsx("a",{href:"https://www.facebook.com/billyokland",target:"_blank",rel:"noopener noreferrer",className:"text-xs text-muted-foreground hover:text-foreground transition-colors duration-300",children:"Facebook"}),l.jsx("a",{href:"https://www.instagram.com/billyokland",target:"_blank",rel:"noopener noreferrer",className:"text-xs text-muted-foreground hover:text-foreground transition-colors duration-300",children:"Instagram"}),l.jsx("a",{href:"https://www.youtube.com/@billykland7495",target:"_blank",rel:"noopener noreferrer",className:"text-xs text-muted-foreground hover:text-foreground transition-colors duration-300",children:"YouTube"})]})]})]})})}const mR="/assets/01-balanse-i-CLDyxU9V.jpg",QG="/assets/balanse-2-B48I6lyJ.jpg",XG="/assets/balanse-3-DNhBFDVl.jpg",JG="/assets/balanse-4-CTuW3rEs.jpg",ZG="/assets/balanse-5-Dt4wBGOf.jpg",eq="/assets/balanse-6-BLcLmlfW.jpg",tq="/assets/balanse-7-BqAr1ZUI.jpg",nq="/assets/balanse-8-5zXo5Zg4.jpg",rq="/assets/balanse-9-qHx7zhfd.jpg",sq="/assets/balanse-10-wSbII-Az.jpg",iq="/assets/balanse-11-Cjjrzh53.jpg",oq="/assets/balanse-12-BuRAr7W2.jpg",aq="/assets/ryggen-D77kddF7.jpg",lq="/assets/tankefull_u_ramme-utTpBNhv.jpg",cq="/assets/liakjodno-CalLfxfi.jpg",uq="/assets/fersken-CXI2pY2e.jpg",dq="/assets/nybegynner-Bx_EKZKk.jpg",hq="/assets/forlatt-Ctkl1Cx1.jpg",fq="/assets/frihet-N9ovpbN4.jpg",pq="/assets/balanse-original-CNO5hI1L.jpg",mq="/assets/brodre-Ch2L-wYu.jpg",gq="/assets/drommende-pike-8JTZIgQd.jpg",yq="/assets/lengselen-DnHZM0Bm.jpg",vq="/assets/siggjo-BfzEvQjm.jpg",xq="/assets/akrasanden-spyVj-el.jpg",wq="/assets/kveldsbad-BZ2bQxEZ.jpg",bq="/assets/solnedgang-BYTZM_sO.jpg",gR="/assets/argang-2003-34x34-BaruD0Pu.jpg",R0="/assets/02-the-flame-jZWeYTMs.jpg",yR="/assets/17-i-kraft-av-haaret-SVJ5iUJh.jpg",vR="/assets/18-akt-med-klede-D22ihcVw.jpg",xR="/assets/16-hvile-DLX9HGY7.jpg",wR="/assets/08-brothers-DjhCW01s.jpg",bR="/assets/07-vaeren-JNO0v8ek.jpg",Xs=[{id:"balanse-1",name:"Balanse I",nameEN:"Balanse I",price:3800,image:mR,category:"giclee",subtitle:"Sort/Hvitt",subtitleEN:"Black/White",description:`Giclée-trykk, signert og nummerert, opplag: 80 eks. 3283 3284Størrelse: 44 x 44 cm 3285 3286trykket på syrefritt papir "Fine Art Cotton Natural" 3287Med lysekte farger fra Epson 7 fargesystem 3288Minimums holdbarhet: 60-100 år`,descriptionEN:`Giclée print, signed and numbered, edition: 80 copies. 3289 3290Size: 44 x 44 cm 3291 3292printed on acid-free paper "Fine Art Cotton Natural" 3293With lightfast colors from Epson 7 color system 3294Minimum durability: 60-100 years`,dimensions:"44 x 44 cm"},{id:"balanse-2",name:"Balanse II",nameEN:"Balanse II",price:3800,image:QG,category:"giclee",subtitle:"Sort/Hvitt",subtitleEN:"Black/White",description:`Giclée-trykk, signert og nummerert, opplag: 80 eks. 3295 3296Størrelse: 34 x 38 cm 3297 3298trykket på syrefritt papir "Fine Art Cotton Natural" 3299Med lysekte farger fra Epson 7 fargesystem 3300Minimums holdbarhet: 60-100 år`,descriptionEN:`Giclée print, signed and numbered, edition: 80 copies. 3301 3302Size: 34 x 38 cm 3303 3304printed on acid-free paper "Fine Art Cotton Natural" 3305With lightfast colors from Epson 7 color system 3306Minimum durability: 60-100 years`,dimensions:"34 x 38 cm"},{id:"balanse-3",name:"Balanse III",nameEN:"Balanse III",price:3800,image:XG,category:"giclee",subtitle:"Sort/Hvitt",subtitleEN:"Black/White",description:`Giclée-trykk, signert og nummerert, opplag: 80 eks. 3307 3308Størrelse: 44 x 44 cm 3309 3310trykket på syrefritt papir "Fine Art Cotton Natural" 3311Med lysekte farger fra Epson 7 fargesystem 3312Minimums holdbarhet: 60-100 år`,descriptionEN:`Giclée print, signed and numbered, edition: 80 copies. 3313 3314Size: 44 x 44 cm 3315 3316printed on acid-free paper "Fine Art Cotton Natural" 3317With lightfast colors from Epson 7 color system 3318Minimum durability: 60-100 years`,dimensions:"44 x 44 cm"},{id:"balanse-4",name:"Balanse IV",nameEN:"Balanse IV",price:3800,image:JG,category:"giclee",subt
3318itle:"Sort/Hvitt",subtitleEN:"Black/White",description:`Giclée-trykk, signert og nummerert, opplag: 80 eks. 3319 3320Størrelse: 44 x 44 cm 3321 3322trykket på syrefritt papir "Fine Art Cotton Natural" 3323Med lysekte farger fra Epson 7 fargesystem 3324Minimums holdbarhet: 60-100 år`,descriptionEN:`Giclée print, signed and numbered, edition: 80 copies. 3325 3326Size: 44 x 44 cm 3327 3328printed on acid-free paper "Fine Art Cotton Natural" 3329With lightfast colors from Epson 7 color system 3330Minimum durability: 60-100 years`,dimensions:"44 x 44 cm"},{id:"balanse-5",name:"Balanse V",nameEN:"Balanse V",price:3800,image:ZG,category:"giclee",subtitle:"Sort/Hvitt",subtitleEN:"Black/White",description:`Giclée-trykk, signert og nummerert, opplag: 80 eks. 3331 3332Størrelse: 44 x 44 cm 3333 3334trykket på syrefritt papir "Fine Art Cotton Natural" 3335Med lysekte farger fra Epson 7 fargesystem 3336Minimums holdbarhet: 60-100 år`,descriptionEN:`Giclée print, signed and numbered, edition: 80 copies. 3337 3338Size: 44 x 44 cm 3339 3340printed on acid-free paper "Fine Art Cotton Natural" 3341With lightfast colors from Epson 7 color system 3342Minimum durability: 60-100 years`,dimensions:"44 x 44 cm"},{id:"balanse-6",name:"Balanse VI",nameEN:"Balanse VI",price:3800,image:eq,category:"giclee",subtitle:"Sort/Hvitt",subtitleEN:"Black/White",description:`Giclée-trykk, signert og nummerert, opplag: 80 eks. 3343 3344Størrelse: 44 x 44 cm 3345 3346trykket på syrefritt papir "Fine Art Cotton Natural" 3347Med lysekte farger fra Epson 7 fargesystem 3348Minimums holdbarhet: 60-100 år`,descriptionEN:`Giclée print, signed and numbered, edition: 80 copies. 3349 3350Size: 44 x 44 cm 3351 3352printed on acid-free paper "Fine Art Cotton Natural" 3353With lightfast colors from Epson 7 color system 3354Minimum durability: 60-100 years`,dimensions:"44 x 44 cm"},{id:"balanse-7",name:"Balanse VII",nameEN:"Balanse VII",price:3800,image:tq,category:"giclee",subtitle:"Sort/Hvitt",subtitleEN:"Black/White",description:`Giclée-trykk, signert og nummerert, opplag: 80 eks. 3355 3356Størrelse: 44 x 44 cm 3357 3358trykket på syrefritt papir "Fine Art Cotton Natural" 3359Med lysekte farger fra Epson 7 fargesystem 3360Minimums holdbarhet: 60-100 år`,descriptionEN:`Giclée print, signed and numbered, edition: 80 copies. 3361 3362Size: 44 x 44 cm 3363 3364printed on acid-free paper "Fine Art Cotton Natural" 3365With lightfast colors from Epson 7 color system 3366Minimum durability: 60-100 years`,dimensions:"44 x 44 cm"},{id:"balanse-8",name:"Balanse VIII",nameEN:"Balanse VIII",price:3800,image:nq,category:"giclee",subtitle:"Sort/Hvitt",subtitleEN:"Black/White",description:`Giclée-trykk, signert og nummerert, opplag: 80 eks. 3367 3368Størrelse: 34 x 38 cm 3369 3370trykket på syrefritt papir "Fine Art Cotton Natural" 3371Med lysekte farger fra Epson 7 fargesystem 3372Minimums holdbarhet: 60-100 år`,descriptionEN:`Giclée print, signed and numbered, edition: 80 copies. 3373 3374Size: 34 x 38 cm 3375 3376printed on acid-free paper "Fine Art Cotton Natural" 3377With lightfast colors from Epson 7 color system 3378Minimum durability: 60-100 years`,dimensions:"34 x 38 cm"},{id:"balanse-9",name:"Balanse IX",nameEN:"Balanse IX",price:3800,image:rq,category:"giclee",subtitle:"Sort/Hvitt",subtitleEN:"Black/White",description:`Giclée-trykk, signert og nummerert, opplag: 80 eks. 3379 3380Størrelse: 40 x 34 cm 3381 3382trykket på syrefritt papir "Fine Art Cotton Natural" 3383Med lysekte farger fra Epson 7 fargesystem 3384Minimums holdbarhet: 60-100 år`,descriptionEN:`Giclée print, signed and numbered, edition: 80 copies. 3385 3386Size: 40 x 34 cm 3387 3388printed on acid-free paper "Fine Art Cotton Natural" 3389With lightfast colors from Epson 7 color system 3390Minimum durability: 60-100 years`,dimensions:"40 x 34 cm"},{id:"balanse-10",name:"Balanse X",nameEN:"Balanse X",price:3800,image:sq,category:"giclee",subtitle:"Sort/Hvitt",subtitleEN:"Black/White",description:`Giclée-trykk, signert og nummerert, opplag: 80 eks. 3391 3392Størrelse: 44 x 44 cm 3393 3394trykket på syrefritt papir "Fine Art Cotton Natural" 3395Med lysekte farger fra Epson 7 fargesystem 3396Minimums holdbarhet: 60-100 år`,descriptionEN:`Giclée print, signed and numbered, edition: 80 copies. 3397 3398Size: 44 x 44 cm 3399 3400printed on acid-free paper "Fine Art Cotton Natural" 3401With lightfast colors from Epson 7 color system 3402Minimum durability: 60-100 years`,dimensions:"44 x 44 cm"},{id:"balanse-11",name:"Balanse XI",nameEN:"Balanse XI",price:3800,image:iq,category:"giclee",subt
3402itle:"Sort/Hvitt",subtitleEN:"Black/White",description:`Giclée-trykk, signert og nummerert, opplag: 80 eks. 3403 3404Størrelse: 34 x 38 cm 3405 3406trykket på syrefritt papir "Fine Art Cotton Natural" 3407Med lysekte farger fra Epson 7 fargesystem 3408Minimums holdbarhet: 60-100 år`,descriptionEN:`Giclée print, signed and numbered, edition: 80 copies. 3409 3410Size: 34 x 38 cm 3411 3412printed on acid-free paper "Fine Art Cotton Natural" 3413With lightfast colors from Epson 7 color system 3414Minimum durability: 60-100 years`,dimensions:"34 x 38 cm"},{id:"balanse-12",name:"Balanse XII",nameEN:"Balanse XII",price:3800,image:oq,category:"giclee",subtitle:"Sort/Hvitt",subtitleEN:"Black/White",description:`Giclée-trykk, signert og nummerert, opplag: 80 eks. 3415 3416Størrelse: 44 x 44 cm 3417 3418trykket på syrefritt papir "Fine Art Cotton Natural" 3419Med lysekte farger fra Epson 7 fargesystem 3420Minimums holdbarhet: 60-100 år`,descriptionEN:`Giclée print, signed and numbered, edition: 80 copies. 3421 3422Size: 44 x 44 cm 3423 3424printed on acid-free paper "Fine Art Cotton Natural" 3425With lightfast colors from Epson 7 color system 3426Minimum durability: 60-100 years`,dimensions:"44 x 44 cm"},{id:"ryggen",name:"Ryggen",nameEN:"Ryggen",price:3800,image:aq,category:"giclee",description:`Giclée-trykk, signert og nummerert, opplag: 60 eks. 3427 3428Størrelse: 34 x 37 cm 3429 3430trykket på syrefritt papir "Fine Art Cotton Natural" 3431Med lysekte farger fra Epson 7 fargesystem 3432Minimums holdbarhet: 60-100 år`,descriptionEN:`Giclée print, signed and numbered, edition: 60 copies. 3433 3434Size: 34 x 37 cm 3435 3436printed on acid-free paper "Fine Art Cotton Natural" 3437With lightfast colors from Epson 7 color system 3438Minimum durability: 60-100 years`,dimensions:"34 x 37 cm"},{id:"liakjodno",name:"Liakjødno",nameEN:"Liakjødno",price:3800,image:cq,category:"giclee",description:`Giclée-trykk, signert og nummerert, opplag: 50 eks. 3439 3440Størrelse: 44 x 38 cm 3441 3442trykket på syrefritt papir "Fine Art Cotton Natural" 3443Med lysekte farger fra Epson 7 fargesystem 3444Minimums holdbarhet: 60-100 år`,descriptionEN:`Giclée print, signed and numbered, edition: 50 copies. 3445 3446Size: 44 x 38 cm 3447 3448printed on acid-free paper "Fine Art Cotton Natural" 3449With lightfast colors from Epson 7 color system 3450Minimum durability: 60-100 years`,dimensions:"44 x 38 cm"},{id:"fersken",name:"Fersken",nameEN:"Fersken",price:3500,image:uq,category:"giclee",description:`Giclée-trykk, signert og nummerert, opplag: 50 eks. 3451 3452Størrelse: 30 x 30 cm 3453 3454trykket på syrefritt papir "Fine Art Cotton Natural" 3455Med lysekte farger fra Epson 7 fargesystem 3456Minimums holdbarhet: 60-100 år`,descriptionEN:`Giclée print, signed and numbered, edition: 50 copies. 3457 3458Size: 30 x 30 cm 3459 3460printed on acid-free paper "Fine Art Cotton Natural" 3461With lightfast colors from Epson 7 color system 3462Minimum durability: 60-100 years`,dimensions:"30 x 30 cm"},{id:"solnedgang-storoya",name:"Solnedgang ved Storøya",nameEN:"Solnedgang ved Storøya",price:3800,image:wq,category:"giclee",description:`Giclée-trykk, signert og nummerert, 60 eks. 3463 3464Størrelse: 34x34 og 44x44 cm, ramme kommer i tillegg 3465 3466trykket på syrefritt papir "Fine Art Cotton Natural" 3467Med lysekte farger fra Epson 7 fargesystem 3468Minimums holdbarhet: 60-100 år`,descriptionEN:`Giclée print, signed and numbered, 60 copies. 3469 3470Size: 34x34 and 44x44 cm, frame not included 3471 3472printed on acid-free paper "Fine Art Cotton Natural" 3473With lightfast colors from Epson 7 color system 3474Minimum durability: 60-100 years`,dimensions:"34 x 34 cm / 44 x 44 cm"},{id:"argang-2003",name:"à rgang 2003",nameEN:"à rgang 2003",price:2500,image:gR,category:"giclee",description:`Giclée-trykk, signert og nummerert 3475 3476Størrelse: 34x34 cm 3477 3478trykket på syrefritt papir "Fine Art Cotton Natural" 3479Med lysekte farger fra Epson 7 fargesystem 3480Minimums holdbarhet: 60-100 år`,descriptionEN:`Giclée print, signed and numbered 3481 3482Size: 34x34 cm 3483 3484printed on acid-free paper "Fine Art Cotton Natural" 3485With lightfast colors from Epson 7 color system 3486Minimum durability: 60-100 years`,dimensions:"34 x 34 cm"},{id:"flammen",name:"Flammen",nameEN:"Flammen",price:3800,image:R0,category:"giclee",description:`Giclée-trykk, signert og nummerert 3487 3488Størrelse: 34 x 34 cm 3489 3490trykket på syrefritt papir "Fine Art Cotton Natural" 3491Med lysekte farger fra Epson 7 fargesystem 3492Minimums holdbarhet: 60-100 år`,descriptionEN:`Giclée print, signed and numbered 3493 3494Size: 34 x 34 cm 3495 3496printed on acid-free paper "Fine Art Cotton Natural" 3497With lightfast colors from Epson 7 color system 3498Minimum durability: 60-100 years`,dimensions:"34 x 34 cm"},{id:"kraft-av-haaret",name:"I kraft av håret",nameEN:"I kraft av håret",price:4500,image:yR,category:"giclee",description:`Giclée-trykk, signert og nummerert 3499 3500Størrelse: 44 x 50 cm 3501 3502trykket på syrefritt papir "Fine Art Cotton Natural" 3503Med lysekte farger fra Epson 7 fargesystem 3504Minimums holdbarhet: 60-100 år`,descriptionEN:`Giclée print, signed and numbered 3505 3506Size: 44 x 50 cm 3507 3508printed on acid-free paper "Fine Art Cotton Natural" 3509With lightfast colors from Epson 7 color system 3510Minimum durability: 60-100 years`,dimensions:"44 x 50 cm"},{id:"akt-med-klede",name:"Akt med klede",nameEN:"Akt med klede",price:3800,image:vR,category:"giclee",description:`Giclée-trykk, signert og nummerert 3511 3512Størrelse: 34 x 38 cm 3513 3514trykket på syrefritt papir "Fine Art Cotton Natural" 3515Med lysekte farger fra Epson 7 fargesystem 3516Minimums holdbarhet: 60-100 år`,descriptionEN:`Giclée print, signed and numbered 3517 3518Size: 34 x 38 cm 3519 3520printed on acid-free paper "Fine Art Cotton Natural" 3521With lightfast colors from Epson 7 color system 3522Minimum durability: 60-100 years`,dimensions:"34 x 38 cm"},{id:"hvile",name:"Hvile",nameEN:"Hvile",price:3800,image:xR,category:"giclee",description:`Giclée-trykk, signert og nummerert 3523 3524Størrelse: 44 x 44 cm 3525 3526trykket på syrefritt papir "Fine Art Cotton Natural" 3527Med lysekte farger fra Epson 7 fargesystem 3528Minimums holdbarhet: 60-100 år`,descriptionEN:`Giclée print, signed and numbered 3529 3530Size: 44 x 44 cm 3531 3532printed on acid-free paper "Fine Art Cotton Natural" 3533With lightfast colors from Epson 7 color system 3534Minimum durability: 60-100 years`,dimensions:"44 x 44 cm"},{id:"brodre-giclee",name:"Brødre",nameEN:"Brødre",price:3800,image:wR,category:"giclee",description:`Giclée-trykk, signert og nummerert 3535 3536Størrelse: 34 x 38 cm / 44 x 52 cm 3537 3538trykket på syrefritt papir "Fine Art Cotton Natural" 3539Med lysekte farger fra Epson 7 fargesystem 3540Minimums holdbarhet: 60-100 år`,descriptionEN:`Giclée print, signed and numbered 3541 3542Size: 34 x 38 cm / 44 x 52 cm 3543 3544printed on acid-free paper "Fine Art Cotton Natural" 3545With lightfast colors from Epson 7 color system 3546Minimum durability: 60-100 years`,dimensions:"34 x 38 cm / 44 x 52 cm"},{id:"vaeren",name:"Væren",nameEN:"Væren",price:3800,image:bR,category:"giclee",description:`Giclée-trykk, signert og nummerert 3547 3548Størrelse: 44 x 44 cm 3549 3550trykket på syrefritt papir "Fine Art Cotton Natural" 3551Med lysekte farger fra Epson 7 fargesystem 3552Minimums holdbarhet: 60-100 år`,descriptionEN:`Giclée print, signed and numbered 3553 3554Size: 44 x 44 cm 3555 3556printed on acid-free paper "Fine Art Cotton Natural" 3557With lightfast colors from Epson 7 color system 3558Minimum durability: 60-100 years`,dimensions:"44 x 44 cm"},{id:"nybegynner",name:"Nybegynner",nameEN:"Nybegynner",price:3800,image:bq,category:"lithograph",description:"Litografi, 27x37 cm, signert og nummerert, opplag 110 eks.",descriptionEN:"Lithograph, 27x37 cm, signed and numbered, edition 110 copies.",dimensions:"27 x 37 cm"},{id:"forlatt",name:"Forlatt",nameEN:"Forlatt",price:4500,image:dq,category:"lithograph",subtitle:"Håndkolorert",subtitleEN:"Hand-colored",description:"Signert og nummerert",descriptionEN:"Signed and numbered",dimensions:"37 x 42 cm"}
3558,{id:"frihet",name:"Frihet",nameEN:"Frihet",price:15e4,image:hq,category:"original",description:"Olje pÃ¥ lerret, 125 x 140 cm",descriptionEN:"Oil on canvas, 125 x 140 cm",dimensions:"125 x 140 cm"},{id:"balanse-original",name:"Balanse 2",nameEN:"Balanse 2",price:15e4,image:fq,category:"original",description:"Olje pÃ¥ lerret, 125 x 140 cm",descriptionEN:"Oil on canvas, 125 x 140 cm",dimensions:"125 x 140 cm"},{id:"imitasjon",name:"Imitasjon",nameEN:"Imitasjon",price:15e4,image:pq,category:"original",description:"Olje pÃ¥ lerret, 125 x 140 cm",descriptionEN:"Oil on canvas, 125 x 140 cm",dimensions:"125 x 140 cm"},{id:"tankefull-original",name:"Tankefull",nameEN:"Tankefull",price:85e3,image:lq,category:"original",description:"Olje pÃ¥ lerret, 85 x 95 cm",descriptionEN:"Oil on canvas, 85 x 95 cm",dimensions:"85 x 95 cm"},{id:"drommende-pike",name:"Drømmende pike",nameEN:"Drømmende pike",price:38e3,image:mq,category:"original",description:"",descriptionEN:"",dimensions:""},{id:"lengselen",name:"Lengselen er sterkere enn smerten",nameEN:"Lengselen er sterkere enn smerten",price:17e4,image:gq,category:"original",description:"Olje pÃ¥ lerret, 150 x 160 cm",descriptionEN:"Oil on canvas, 150 x 160 cm",dimensions:"150 x 160 cm"},{id:"siggjo",name:"Siggjo",nameEN:"Siggjo",price:15e4,image:yq,category:"original",description:"Olje pÃ¥ lerret, 100 x 124 cm",descriptionEN:"Oil on canvas, 100 x 124 cm",dimensions:"100 x 124 cm"},{id:"akrasanden",name:"Ã
krasanden",nameEN:"Ã
krasanden",price:38e3,image:vq,category:"original",description:"Olje på lerret, 60 x 60 cm",descriptionEN:"Oil on canvas, 60 x 60 cm",dimensions:"60 x 60 cm"},{id:"kveldsbad",name:"Kveldsbad ved Skagen",nameEN:"Kveldsbad ved Skagen",price:28e3,image:xq,category:"original",description:"",descriptionEN:"",dimensions:"",sold:!0}];function jt(t){return t?t.startsWith("http://")||t.startsWith("https://"):!1}function _q(t){return Xs.find(e=>e.id===t)}function Yt(t){return new Intl.NumberFormat("nb-NO",{style:"currency",currency:"NOK",minimumFractionDigits:0,maximumFractionDigits:0}).format(t)}function vr(t,e){return e==="EN"?t.nameEN:t.name}function Fh(t,e){return e==="EN"?t.subtitleEN||t.subtitle||"":t.subtitle||""}function Tk(t,e){return e==="EN"?t.descriptionEN||t.description||"":t.description||""}function kq(){const{items:t,isCartOpen:e,setIsCartOpen:n,updateQuantity:r,removeFromCart:s,getCartTotal:i,getCartCount:o}=zf(),{t:a,language:c}=Mt(),u=t.reduce((d,h)=>d+h.product.price*h.quantity,0);return l.jsx(Xi,{children:e&&l.jsxs(l.Fragment,{children:[l.jsx(oe.div,{initial:{opacity:0}
3558,animate:{opacity:1},exit:{opacity:0},transition:{duration:.3},className:"fixed inset-0 bg-overlay/50 z-50",onClick:()=>n(!1)}),l.jsx(oe.div,{initial:{x:"100%"},animate:{x:0},exit:{x:"100%"},transition:{type:"tween",duration:.3},className:"fixed top-0 right-0 bottom-0 w-full max-w-md bg-background z-50 shadow-xl",children:l.jsxs("div",{className:"flex flex-col h-full",children:[l.jsxs("div",{className:"flex items-center justify-between px-6 py-4 border-b border-border",children:[l.jsxs("h2",{className:"font-serif text-xl",children:[a("cart.title")," (",o(),")"]}),l.jsx("button",{onClick:()=>n(!1),className:"p-2 text-foreground hover:text-muted-foreground transition-colors",children:l.jsx(In,{className:"w-5 h-5"})})]}),l.jsx("div",{className:"flex-1 overflow-y-auto px-6 py-4",children:t.length===0?l.jsxs("div",{className:"text-center py-12",children:[l.jsx("p",{className:"text-muted-foreground mb-6",children:a("cart.empty")}),l.jsx("button",{onClick:()=>n(!1),className:"btn-editorial",children:a("cart.continueShopping")})]}):l.jsx("ul",{className:"space-y-6",children:t.map(d=>l.jsxs("li",{className:"flex gap-4",children:[l.jsx(ge,{to:`/store/${d.product.id}`,onClick:()=>n(!1),className:"w-20 h-20 flex-shrink-0 overflow-hidden",children:l.jsx("img",{src:d.product.image,alt:vr(d.product,c),className:"w-full h-full object-cover"})}),l.jsxs("div",{className:"flex-1 min-w-0",children:[l.jsx(ge,{to:`/store/${d.product.id}`,onClick:()=>n(!1),className:"font-medium text-foreground hover:text-muted-foreground transition-colors line-clamp-1",children:vr(d.product,c)}),l.jsx("p",{className:"text-sm text-muted-foreground mt-1",children:Yt(d.product.price)}),l.jsxs("div",{className:"flex items-center gap-3 mt-3",children:[l.jsxs("div",{className:"flex items-center border border-border",children:[l.jsx("button",{onClick:()=>r(d.product.id,d.quantity-1),className:"p-1.5 hover:bg-secondary transition-colors",children:l.jsx(jO,{className:"w-3 h-3"})}),l.jsx("span",{className:"px-3 text-sm",children:d.quantity}),l.jsx("button",{onClick:()=>r(d.product.id,d.quantity+1),className:"p-1.5 hover:bg-secondary transition-colors",children:l.jsx(Mv,{className:"w-3 h-3"})})]}),l.jsx("button",{onClick:()=>s(d.product.id),className:"p-1.5 text-muted-foreground hover:text-foreground transition-colors",children:l.jsx(pi,{className:"w-4 h-4"})})]})]}),l.jsx("div",{className:"text-right",children:l.jsx("p",{className:"font-medium",children:Yt(d.product.price*d.quantity)})})]},d.product.id))})}),t.length>0&&l.jsxs("div",{className:"border-t border-border px-6 py-4 space-y-4",children:[l.jsxs("div",{className:"space-y-2",children:[l.jsxs("div",{className:"flex justify-between text-sm",children:[l.jsx("span",{className:"text-muted-foreground",children:a("cart.subtotal")}),l.jsx("span",{children:Yt(u)})]}),l.jsxs("div",{className:"flex justify-between text-sm",children:[l.jsxs("span",{className:"text-muted-foreground",children:[a("cart.shipping"),l.jsxs("span",{className:"block text-xs",children:["(",a("cart.shippingNote"),")"]})]}),l.jsx("span",{children:Yt(jy)})]}),l.jsxs("div",{className:"flex justify-between font-medium pt-2 border-t border-border",children:[l.jsx("span",{children:a("cart.total")}),l.jsx("span",{children:Yt(i())})]})]}),l.jsx(ge,{to:"/checkout",onClick:()=>n(!1),className:"btn-editorial w-full text-center block",children:a("cart.checkout")})]})]})})]})})}function Ik(t){const e=t.replace(/%/g,"").split(/\s+/).map(Number);if(e.length<3)return"#888888";const[n,r,s]=e,i=r/100,o=s/100,a=i*Math.min(o,1-o),c=u=>{const d=(u+n/30)%12,h=o-a*Math.max(Math.min(d-3,9-d,1),-1);return Math.round(255*h).toString(16).padStart(2,"0")};return`#${c(0)}${c(8)}${c(4)}`}function Eq(t){const e=parseInt(t.slice(1,3),16)/255,n=parseInt(t.slice(3,5),16)/255,r=parseInt(t.slice(5,7),16)/255,s=Math.max(e,n,r),i=Math.min(e,n,r),o=(s+i)/2;let a=0,c=0;if(s!==i){const u=s-i;switch(c=o>.5?u/(2-s-i):u/(s+i),s){case e:a=((n-r)/u+(n<r?6:0))/6;break;case n:a=((r-e)/u+2)/6;break;case r:a=((e-n)/u+4)/6;break}}return`${Math.round(a*360)} ${Math.round(c*100)}% ${Math.round(o*100)}%`}function _R({currentHsl:t,onSave:e,onCancel:n,onReset:r,inline:s=!1}){const[i,o]=m.useState(()=>Ik(t));return m.useEffect(()=>{o(Ik(t))},[t]),l.jsxs("div",{className:`${s?"relative":"absolute top-full left-0 mt-2"} z-[9999] bg-white rounded-lg shadow-2xl border border-gray-200 p-3 min-w-[200px]`,onClick:a=>a.stopPropagation(),children:[l.jsxs("div",{className:"flex items-center gap-3 mb-3",children:[l.jsx("input",{type:"color",value:i,onChange:a=>o(a.target.value),className:"w-10 h-10 rounded cursor-pointer border-0"}),l.jsx("input",{type:"text",value:i,onChange:a=>o(a.target.value),className:"flex-1 px-2 py-1 border border-gray-300 rounded text-sm text-black font-mono"})]}),l.jsxs("div",{className:"flex gap-1",children:[l.jsxs("button",{onClick:()=>e(Eq(i)),className:"flex items-center gap-1 px-2 py-1 bg-green-600 text-white text-xs rounded hover:bg-green-700",children:[l.jsx(_a,{className:"w-3 h-3"})," Save"]}),l.jsxs("button",{onClick:r,className:"flex items-center gap-1 px-2 py-1 bg-orange-500 text-white text-xs rounded hover:bg-orange-600",children:[l.jsx(Qo,{className:"w-3 h-3"})," Reset"]}),l.jsx("button",{onClick:n,className:"flex items-center gap-1 px-2 py-1 bg-gray-500 text-white text-xs rounded hover:bg-gray-600",children:l.jsx(In,{className:"w-3 h-3"})})]})]})}
3558const Cq=[{key:"background",label:"Background"},{key:"foreground",label:"Text"},{key:"primary",label:"Primary"},{key:"accent",label:"Accent"},{key:"muted-foreground",label:"Muted Text"},{key:"gallery-detail-bg",label:"Gallery Subpage BG"},{key:"store-card-bg",label:"Store Cards"},{key:"border",label:"Border"}];function Sq(){const{isEditMode:t,isSaving:e,exitEditMode:n,exportOverrides:r,resetAll:s,resetSession:i,hasSessionSnapshot:o,colorOverrides:a,updateColor:c}=vt(),[u,d]=m.useState(!1),[h,f]=m.useState("session"),[p,x]=m.useState(!1),[g,y]=m.useState(null);if(!t)return null;const w=v=>a[v]?a[v]:getComputedStyle(document.documentElement).getPropertyValue(`--${v}`).trim()||"0 0% 50%";return l.jsxs("div",{"data-admin-ui":!0,children:[l.jsx("div",{className:"fixed bottom-0 left-0 right-0 z-[9998] bg-gray-900 text-white shadow-2xl border-t border-gray-700",children:l.jsxs("div",{className:"max-w-7xl mx-auto px-4 py-3 flex items-center justify-between",children:[l.jsxs("div",{className:"flex items-center gap-3",children:[l.jsxs("span",{className:"flex items-center gap-2 text-sm font-medium",children:[l.jsx(Gc,{className:"w-4 h-4 text-blue-400"}),"Edit Mode"]}),e&&l.jsxs("span",{className:"flex items-center gap-1 text-xs text-yellow-400",children:[l.jsx(Tr,{className:"w-3 h-3 animate-spin"}),"Saving..."]})]}),l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsxs("button",{onClick:()=>x(!p),className:`flex items-center gap-2 px-3 py-1.5 text-xs rounded transition-colors ${p?"bg-purple-600 hover:bg-purple-700":"bg-gray-700 hover:bg-gray-600"}`,children:[l.jsx($S,{className:"w-3.5 h-3.5"}),"Site Colors"]}),l.jsxs("button",{onClick:r,className:"flex items-center gap-2 px-3 py-1.5 text-xs bg-gray-700 hover:bg-gray-600 rounded transition-colors",children:[l.jsx(SO,{className:"w-3.5 h-3.5"}),"Export"]}),o&&l.jsxs("button",{onClick:()=>{f("session"),d(!0)},className:"flex items-center gap-2 px-3 py-1.5 text-xs bg-yellow-600 hover:bg-yellow-700 rounded transition-colors",children:[l.jsx(Qo,{className:"w-3.5 h-3.5"}),"Undo Session"]}),l.jsxs("button",{onClick:()=>{f("all"),d(!0)},className:"flex items-center gap-2 px-3 py-1.5 text-xs bg-orange-600 hover:bg-orange-700 rounded transition-colors",children:[l.jsx(Qo,{className:"w-3.5 h-3.5"}),"Reset All"]}),l.jsxs("button",{onClick:n,className:"flex items-center gap-2 px-3 py-1.5 text-xs bg-red-600 hover:bg-red-700 rounded transition-colors",children:[l.jsx(IO,{className:"w-3.5 h-3.5"}),"Exit"]})]})]})}),p&&l.jsxs("div",{className:"fixed bottom-14 right-4 z-[9998] bg-gray-900 border border-gray-700 rounded-lg shadow-2xl p-4 w-72",children:[l.jsx("h3",{className:"text-white text-sm font-medium mb-3",children:"Site Colors"}),l.jsx("div",{className:"space-y-2",children:Cq.map(v=>{const b=w(v.key);return l.jsxs("div",{className:"relative",children:[l.jsxs("button",{onClick:()=>y(g===v.key?null:v.key),className:"w-full flex items-center gap-3 px-2 py-1.5 rounded hover:bg-gray-800 transition-colors",children:[l.jsx("span",{className:"w-6 h-6 rounded border border-gray-600 flex-shrink-0",style:{backgroundColor:`hsl(${b})`}}),l.jsx("span",{className:"text-white text-xs",children:v.label}),l.jsx("span",{className:"text-gray-500 text-xs ml-auto font-mono",children:b})]}),g===v.key&&l.jsx("div",{className:"mt-1 mb-2",children:l.jsx(_R,{inline:!0,currentHsl:b,onSave:async _=>{await c(v.key,_),y(null)},onCancel:()=>y(null),onReset:async()=>{document.documentElement.style.removeProperty(`--${v.key}`),y(null)}})})]},v.key)})})]}),u&&l.jsx("div",{className:"fixed inset-0 z-[9999] flex items-center justify-center bg-black/60 backdrop-blur-sm",children:l.jsxs("div",{className:"bg-white rounded-lg shadow-2xl p-6 w-full max-w-sm mx-4 text-center",children:[l.jsx(Qo,{className:`w-8 h-8 mx-auto mb-3 ${h==="session"?"text-yellow-500":"text-orange-500"}`}),l.jsx("h3",{className:"text-lg font-semibold text-gray-900 mb-2",children:h==="session"?"Undo session changes?":"Reset all changes?"}),l.jsx("p",{className:"text-sm text-gray-500 mb-6",children:h==="session"?"This will revert all changes made during this editing session, back to when you entered edit mode.":"This will revert all text, color, product, and image edits back to the original defaults. This cannot be undone."}),l.jsxs("div",{className:"flex gap-3 justify-center",children:[l.jsx("button",{onClick:()=>d(!1),className:"px-4 py-2 text-sm bg-gray-200 hover:bg-gray-300 text-gray-700 rounded transition-colors",children:"Cancel"}),l.jsx("button",{onClick:async()=>{h==="session"?await i():await s(),d(!1)},className:`px-4 py-2 text-sm text-white rounded transition-colors ${h==="session"?"bg-yellow-600 hover:bg-yellow-700":"bg-orange-600 hover:bg-orange-700"}`,children:h==="session"?"Yes, undo session":"Yes, reset everything"})]})]})})]})}function Nq(){const{isAuthenticated:t,enterEditMode:e}=vt(),[n,r]=m.useState(!1),[s,i]=m.useState(""),[o,a]=m.useState(""),[c,u]=m.useState(""),[d,h]=m.useState(!1);m.useEffect(()=>{new URLSearchParams(window.location.search).get("edit")==="true"&&!t&&r(!0)},[t]),m.useEffect(()=>{t&&r(!1)},[t]);const f=async p=>{p.preventDefault(),u(""),h(!0);try{await e(s,o)}catch{u("Invalid credentials. Please try again.")}finally{h(!1)}};return n?l.jsx("div",{className:"fixed inset-0 z-[9999] flex items-center justify-center bg-black/60 backdrop-blur-sm",children:l.jsxs("div",{className:"bg-white rounded-lg shadow-2xl p-8 w-full max-w-sm mx-4 relative",children:[l.jsx("button",{onClick:()=>r(!1),className:"absolute top-3 right-3 text-gray-400 hover:text-gray-600",children:l.jsx(In,{className:"w-5 h-5"})}),l.jsxs("div",{className:"text-center mb-6",children:[l.jsx(TO,{className:"w-8 h-8 mx-auto mb-3 text-gray-700"}),l.jsx("h2",{className:"text-lg font-semibold text-gray-900",children:"Admin Login"}),l.jsx("p",{className:"text-sm text-gray-500 mt-1",children:"Sign in to edit content"})]}),l.jsxs("form",{onSubmit:f,className:"space-y-4",children:[c&&l.jsx("p",{className:"text-sm text-red-600 bg-red-50 px-3 py-2 rounded",children:c}),l.jsxs("div",{children:[l.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"Email"}),l.jsx("input",{type:"email",value:s,onChange:p=>i(p.target.value),className:"w-full px-3 py-2 border border-gray-300 rounded-md text-gray-900 focus:outline-none focus:ring-2 focus:ring-blue-500",required:!0})]}),l.jsxs("div",{children:[l.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"Password"}),l.jsx("input",{type:"password",value:o,onChange:p=>a(p.target.value),className:"w-full px-3 py-2 border border-gray-300 rounded-md text-gray-900 focus:outline-none focus:ring-2 focus:ring-blue-500",required:!0})]}),l.jsx("button",{type:"submit",disabled:d,className:"w-full flex items-center justify-center gap-2 px-4 py-2 bg-blue-600 text-white rounded-md hover:bg-blue-700 disabled:opacity-50",children:d?l.jsx(Tr,{className:"w-4 h-4 animate-spin"}):"Sign In"})]})]})}):null}function Rt({children:t,hasHero:e=!1}){return l.jsxs("div",{className:"min-h-screen flex flex-col",children:[l.jsx(qG,{isHeroVisible:e}),l.jsx("main",{className:"flex-1",children:t}),l.jsx(YG,{}),l.jsx(kq,{}),l.jsx(Sq,{}),l.jsx(Nq,{})]})}function Z({children:t,className:e="",delay:n=0,direction:r="up",duration:s=.6,once:i=!0}
3558){const o=m.useRef(null),a=iy(o,{once:i,margin:"-50px"}),c=()=>{switch(r){case"up":return{y:30};case"down":return{y:-30};case"left":return{x:30};case"right":return{x:-30};default:return{}}};return l.jsx(oe.div,{ref:o,initial:{opacity:0,...c()},animate:a?{opacity:1,x:0,y:0}:{opacity:0,...c()},transition:{duration:s,delay:n,ease:[.25,.4,.25,1]},className:e,children:t})}function Si({imageKey:t,src:e,alt:n,className:r=""}){const{isEditMode:s,imageOverrides:i,updateImage:o,deleteImage:a}=vt(),[c,u]=m.useState(!1),[d,h]=m.useState(!1),f=m.useRef(null),p=!!i[t],x=i[t]||e,g=async w=>{var b;const v=(b=w.target.files)==null?void 0:b[0];if(v){u(!0);try{await o(t,v)}catch(_){console.error("Image upload failed:",_)}finally{u(!1)}}},y=async w=>{if(w.preventDefault(),w.stopPropagation(),!!p&&confirm("Fjern dette bildet og gjenopprett standardbildet?")){h(!0);try{await a(t)}catch(v){console.error("Image delete failed:",v)}finally{h(!1)}}};return s?l.jsxs("div",{className:`relative group/image ${r}`,children:[l.jsx("img",{src:x,alt:n,className:"w-full h-full object-cover"}),l.jsx("input",{ref:f,type:"file",accept:"image/*",onChange:g,className:"hidden"}),l.jsx("button",{onClick:w=>{var v;w.preventDefault(),w.stopPropagation(),(v=f.current)==null||v.click()},disabled:c||d,className:"absolute top-2 right-2 opacity-0 group-hover/image:opacity-100 transition-opacity bg-blue-500 text-white p-2 rounded-full shadow-lg z-50 cursor-pointer disabled:opacity-60",children:c?l.jsx(Tr,{className:"w-4 h-4 animate-spin"}):l.jsx(Ma,{className:"w-4 h-4"})}),p&&l.jsx("button",{onClick:y,disabled:c||d,className:"absolute top-2 right-12 opacity-0 group-hover/image:opacity-100 transition-opacity bg-red-500 text-white p-2 rounded-full shadow-lg z-50 cursor-pointer disabled:opacity-60",title:"Fjern bilde",children:d?l.jsx(Tr,{className:"w-4 h-4 animate-spin"}):l.jsx(pi,{className:"w-4 h-4"})})]}):l.jsx("img",{src:x,alt:n,className:r})}function ui({colorKey:t,children:e,className:n=""}){const{isEditMode:r,colorOverrides:s,updateColor:i}=vt(),[o,a]=m.useState(!1),c=s[t],u=()=>c||getComputedStyle(document.documentElement).getPropertyValue(`--${t}`).trim()||"0 0% 50%",d=async f=>{await i(t,f),a(!1)},h=async()=>{re&&(await e7(Oe(re,`content/colors/${t}`)),document.documentElement.style.removeProperty(`--${t}`)),a(!1)};return r?l.jsxs("div",{className:`${n} relative group/section`,children:[e,l.jsx("button",{onClick:f=>{f.stopPropagation(),a(!o)},className:"absolute top-4 right-4 z-50 opacity-0 group-hover/section:opacity-100 transition-opacity bg-purple-500 hover:bg-purple-600 text-white p-2 rounded-full shadow-lg",title:`Edit color: ${t}`,children:l.jsx($S,{className:"w-4 h-4"})}),o&&l.jsx("div",{className:"absolute top-4 right-16 z-[9999]",children:l.jsx(_R,{currentHsl:u(),onSave:d,onCancel:()=>a(!1),onReset:h})})]}):l.jsx("div",{className:n,children:e})}function Tq(t){var r,s;if(!t)return null;let e=null,n=!1;try{const i=new URL(t);i.hostname.includes("youtu.be")?e=i.pathname.slice(1).split(/[/?]/)[0]:i.pathname.includes("/shorts/")?(e=((r=i.pathname.split("/shorts/")[1])==null?void 0:r.split(/[/?]/)[0])??null,n=!0):i.pathname.includes("/embed/")?e=((s=i.pathname.split("/embed/")[1])==null?void 0:s.split(/[/?]/)[0])??null:i.searchParams.has("v")&&(e=i.searchParams.get("v"))}catch{return null}return e?{embedUrl:`https://www.youtube-nocookie.com/embed/${e}`,isShort:n}:null}const Iq={hidden:{opacity:0},visible:{opacity:1,transition:{staggerChildren:.12,delayChildren:.15}}},qu={hidden:{opacity:0,y:15},visible:{opacity:1,y:0,transition:{duration:.5,ease:[.25,.4,.25,1]}}},Pq={hidden:{opacity:0},visible:{opacity:1,transition:{staggerChildren:.25,delayChildren:.1}}},Pk={hidden:{opacity:0,y:20},visible:{opacity:1,y:0,transition:{duration:.6,ease:[.25,.4,.25,1]}}};function jq({trip:t,index:e,total:n,onEdit:r,onDelete:s,onReorder:i}){const{language:o}=Mt(),{isEditMode:a}=vt(),c=e===0,u=!!t.imageUrl,d=!!t.videoUrl,h=u&&d,f=e%2===1,p=d?Tq(t.videoUrl):null,x=(p==null?void 0:p.embedUrl)??t.videoUrl,g=(p==null?void 0:p.isShort)??!1,y=m.useRef(null),w=m.useRef(null),v=iy(y,{once:!0,margin:"-10% 0px"}),b=iy(w,{once:!0,margin:"-10% 0px"}),_=N=>l.jsx("iframe",{src:x,title:t.title[o],className:N,allow:"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture",allowFullScreen:!0}),k=l.jsx("div",{ref:y,className:"flex justify-center mb-8",children:l.jsx(oe.div,{className:"w-12 h-12 rounded-full bg-background border-2 border-foreground
3558/20 flex items-center justify-center z-10",initial:{scale:0,opacity:0},animate:v?{scale:1,opacity:1}:{scale:0,opacity:0},transition:{type:"spring",stiffness:300,damping:20},children:l.jsx("span",{className:"text-xs font-medium tracking-wide",children:t.year})})}),S=a&&l.jsxs("div",{className:"absolute top-0 right-0 flex gap-1 opacity-0 group-hover/card:opacity-100 transition-opacity z-20",children:[e>0&&l.jsx("button",{onClick:()=>i("up"),className:"p-1.5 bg-blue-500 text-white rounded hover:bg-blue-600 transition-colors",title:"Move up",children:l.jsx(EO,{className:"w-3.5 h-3.5"})}),e<n-1&&l.jsx("button",{onClick:()=>i("down"),className:"p-1.5 bg-blue-500 text-white rounded hover:bg-blue-600 transition-colors",title:"Move down",children:l.jsx(bO,{className:"w-3.5 h-3.5"})}),l.jsx("button",{onClick:r,className:"p-1.5 bg-blue-500 text-white rounded hover:bg-blue-600 transition-colors",title:"Edit",children:l.jsx(Gc,{className:"w-3.5 h-3.5"})}),l.jsx("button",{onClick:()=>{window.confirm("Delete this trip?")&&s()},className:"p-1.5 bg-red-500 text-white rounded hover:bg-red-600 transition-colors",title:"Delete",children:l.jsx(pi,{className:"w-3.5 h-3.5"})})]});if(c)return l.jsxs("div",{className:"relative group/card",children:[k,S,l.jsxs(oe.div,{ref:w,className:"text-center max-w-2xl mx-auto",variants:Iq,initial:"hidden",animate:b?"visible":"hidden",children:[l.jsx(oe.span,{className:"text-xs tracking-[0.25em] uppercase text-muted-foreground mb-4 block",variants:qu,children:t.location[o]}),l.jsx(oe.h3,{className:"heading-section mb-6",style:{fontFamily:"'Playfair Display', serif"},variants:qu,children:t.title[o]}),l.jsx(oe.p,{className:"body-regular text-muted-foreground",variants:qu,children:t.description[o]})]}),(u||d)&&l.jsx(oe.div,{className:"mt-8 md:mt-12",variants:qu,initial:"hidden",animate:b?"visible":"hidden",children:h?l.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4 md:gap-6",children:[l.jsx("div",{className:"aspect-[4/3] overflow-hidden",children:l.jsx("img",{src:t.imageUrl,alt:t.title[o],className:"w-full h-full object-cover"})}),l.jsx("div",{className:g?"flex justify-center":"aspect-[4/3] overflow-hidden",children:g?l.jsx("div",{className:"aspect-[9/16] h-full max-h-[400px] overflow-hidden",children:_("w-full h-full")}):_("w-full h-full")})]}):u?l.jsx("div",{className:"aspect-[4/3] overflow-hidden",children:l.jsx("img",{src:t.imageUrl,alt:t.title[o],className:"w-full h-full object-cover"})}):g?l.jsx("div",{className:"flex justify-center",children:l.jsx("div",{className:"aspect-[9/16] max-h-[500px] overflow-hidden",children:_("w-full h-full")})}):l.jsx("div",{className:"aspect-video max-w-3xl mx-auto overflow-hidden",children:_("w-full h-full")})})]});const C=u;return l.jsxs("div",{className:"relative group/card",children:[k,S,l.jsxs(oe.div,{ref:w,className:"grid grid-cols-1 md:grid-cols-2 gap-8 md:gap-12 items-center",variants:Pq,initial:"hidden",animate:b?"visible":"hidden",children:[l.jsx(oe.div,{className:f?"":"md:order-2",variants:Pk,children:h&&g?l.jsxs("div",{className:"flex gap-3 md:gap-4 items-start",children:[l.jsx("div",{className:"flex-1 aspect-[4/3] overflow-hidden",children:l.jsx("img",{src:t.imageUrl,alt:t.title[o],className:"w-full h-full object-cover"})}),l.jsx("div",{className:"w-[35%] md:w-[30%] flex-shrink-0 aspect-[9/16] overflow-hidden",children:_("w-full h-full")})]}):C?l.jsx("div",{className:"aspect-[4/3] overflow-hidden",children:l.jsx("img",{src:t.imageUrl,alt:t.title[o],className:"w-full h-full object-cover"})}):d?g?l.jsx("div",{className:"flex justify-center",children:l.jsx("div",{className:"aspect-[9/16] max-h-[450px] overflow-hidden",children:_("w-full h-full")})}):l.jsx("div",{className:"aspect-[4/3] overflow-hidden",children:_("w-full h-full")}):l.jsx("div",{className:"aspect-[4/3] bg-muted/20"})}),l.jsxs(oe.div,{className:f?"":"md:order-1",variants:Pk,children:[l.jsx("span",{className:"text-xs tracking-[0.25em] uppercase text-muted-foreground mb-4 block",children:t.location[o]}),l.jsx("h3",{className:"heading-section mb-6",style:{fontFamily:"'Playfair Display', serif"},children:t.title[o]}),l.jsx("p",{className:"body-regular text-muted-foreground",children:t.description[o]})]})]}),h&&!g&&l.jsx(oe.div,{className:"mt-8 md:mt-12",initial:{opacity:0,y:15},animate:b?{opacity:1,y:0}:{opacity:0,y:15},transition:{duration:.6,delay:.65,ease:[.25,.4,.25,1]},children:g?l.jsx("div",{className:"flex justify-center",children:l.jsx("div",{className:"aspect-[9/16] max-h-[500px] overflow-hidden",children:_("w-full h-full")})}):l.jsx("div",{className:"aspect-video max-w-3xl mx-auto overflow-hidden",children:_("w-full h-full")})})]})}var wm="focusScope.autoFocusOnMount",bm="focusScope.autoFocusOnUnmount",jk={bubbles:!1,cancelable:!0},Rq="FocusScope",kR=m.forwardRef((t,e)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:s,onUnmountAutoFocus:i,...o}
vendor: 4,929 bytes, line 3558
3558=t,[a,c]=m.useState(null),u=Nr(s),d=Nr(i),h=m.useRef(null),f=He(e,g=>c(g)),p=m.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;m.useEffect(()=>{if(r){let g=function(b){if(p.paused||!a)return;const _=b.target;a.contains(_)?h.current=_:vs(h.current,{select:!0})},y=function(b){if(p.paused||!a)return;const _=b.relatedTarget;_!==null&&(a.contains(_)||vs(h.current,{select:!0}))},w=function(b){if(document.activeElement===document.body)for(const k of b)k.removedNodes.length>0&&vs(a)};document.addEventListener("focusin",g),document.addEventListener("focusout",y);const v=new MutationObserver(w);return a&&v.observe(a,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",g),document.removeEventListener("focusout",y),v.disconnect()}}},[r,a,p.paused]),m.useEffect(()=>{if(a){Ak.add(p);const g=document.activeElement;if(!a.contains(g)){const w=new CustomEvent(wm,jk);a.addEventListener(wm,u),a.dispatchEvent(w),w.defaultPrevented||(Aq(Fq(ER(a)),{select:!0}),document.activeElement===g&&vs(a))}return()=>{a.removeEventListener(wm,u),setTimeout(()=>{const w=new CustomEvent(bm,jk);a.addEventListener(bm,d),a.dispatchEvent(w),w.defaultPrevented||vs(g??document.body,{select:!0}),a.removeEventListener(bm,d),Ak.remove(p)},0)}}},[a,u,d,p]);const x=m.useCallback(g=>{if(!n&&!r||p.paused)return;const y=g.key==="Tab"&&!g.altKey&&!g.ctrlKey&&!g.metaKey,w=document.activeElement;if(y&&w){const v=g.currentTarget,[b,_]=Dq(v);b&&_?!g.shiftKey&&w===_?(g.preventDefault(),n&&vs(b,{select:!0})):g.shiftKey&&w===b&&(g.preventDefault(),n&&vs(_,{select:!0})):w===v&&g.preventDefault()}},[n,r,p.paused]);return l.jsx(Ne.div,{tabIndex:-1,...o,ref:f,onKeyDown:x})});kR.displayName=Rq;function Aq(t,{select:e=!1}={}){const n=document.activeElement;for(const r of t)if(vs(r,{select:e}),document.activeElement!==n)return}function Dq(t){const e=ER(t),n=Rk(e,t),r=Rk(e.reverse(),t);return[n,r]}function ER(t){const e=[],n=document.createTreeWalker(t,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const s=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||s?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)e.push(n.currentNode);return e}function Rk(t,e){for(const n of t)if(!Mq(n,{upTo:e}))return n}function Mq(t,{upTo:e}){if(getComputedStyle(t).visibility==="hidden")return!0;for(;t;){if(e!==void 0&&t===e)return!1;if(getComputedStyle(t).display==="none")return!0;t=t.parentElement}return!1}function Oq(t){return t instanceof HTMLInputElement&&"select"in t}function vs(t,{select:e=!1}={}){if(t&&t.focus){const n=document.activeElement;t.focus({preventScroll:!0}),t!==n&&Oq(t)&&e&&t.select()}}var Ak=Lq();function Lq(){let t=[];return{add(e){const n=t[0];e!==n&&(n==null||n.pause()),t=Dk(t,e),t.unshift(e)},remove(e){var n;t=Dk(t,e),(n=t[0])==null||n.resume()}}}function Dk(t,e){const n=[...t],r=n.indexOf(e);return r!==-1&&n.splice(r,1),n}function Fq(t){return t.filter(e=>e.tagName!=="A")}var _m=0;function Uq(){m.useEffect(()=>{const t=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",t[0]??Mk()),document.body.insertAdjacentElement("beforeend",t[1]??Mk()),_m++,()=>{_m===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(e=>e.remove()),_m--}},[])}function Mk(){const t=document.createElement("span");return t.setAttribute("data-radix-focus-guard",""),t.tabIndex=0,t.style.outline="none",t.style.opacity="0",t.style.position="fixed",t.style.pointerEvents="none",t}var mr=function(){return mr=Object.assign||function(e){for(var n,r=1,s=arguments.length;r<s;r++){n=arguments[r];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},mr.apply(this,arguments)};function CR(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var s=0,r=Object.getOwnPropertySymbols(t);s<r.length;s++)e.indexOf(r[s])<0&&Object.prototype.propertyIsEnumerable.call(t,r[s])&&(n[r[s]]=t[r[s]]);return n}function Bq(t,e,n){if(n||arguments.length===2)for(var r=0,s=e.length,i;r<s;r++)(i||!(r in e))&&(i||(i=Array.prototype.slice.call(e,0,r)),i[r]=e[r]);return t.concat(i||Array.prototype.slice.call(e))}var Sd="right-scroll-bar-position",Nd="width-before-scroll-bar",Vq="with-scroll-bars-hidden",$q="--removed-body-scroll-bar-size";function km(t,e){return typeof t=="function"?t(e):t&&(t.current=e),t}function zq(t,e){var n=m.useState(function(){return{value:t,callback:e,facade:{get current(){return n.value},set current(r){var s=n.value;s!==r&&(n.value=r,n.callback(r,s))}}}})[0];return n.callback=e,n.facade}var Wq=typeof window<"u"?m.useLayoutEffect:m.useEffect,Ok=new WeakMap;function Hq(t,e){var n=zq(null,function(r){return t.forEach(function(s){return km(s,r)})});return Wq(function(){var r=Ok.get(n);if(r){var s=new Set(r),i=new Set(t),o=n.current;
vendor: 4,196 bytes, lines 3558-3573
3558s.forEach(function(a){i.has(a)||km(a,null)}),i.forEach(function(a){s.has(a)||km(a,o)})}Ok.set(n,t)},[t]),n}function Kq(t){return t}function Gq(t,e){e===void 0&&(e=Kq);var n=[],r=!1,s={read:function(){if(r)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:t},useMedium:function(i){var o=e(i,r);return n.push(o),function(){n=n.filter(function(a){return a!==o})}},assignSyncMedium:function(i){for(r=!0;n.length;){var o=n;n=[],o.forEach(i)}n={push:function(a){return i(a)},filter:function(){return n}}},assignMedium:function(i){r=!0;var o=[];if(n.length){var a=n;n=[],a.forEach(i),o=n}var c=function(){var d=o;o=[],d.forEach(i)},u=function(){return Promise.resolve().then(c)};u(),n={push:function(d){o.push(d),u()},filter:function(d){return o=o.filter(d),n}}}};return s}function qq(t){t===void 0&&(t={});var e=Gq(null);return e.options=mr({async:!0,ssr:!1},t),e}var SR=function(t){var e=t.sideCar,n=CR(t,["sideCar"]);if(!e)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var r=e.read();if(!r)throw new Error("Sidecar medium not found");return m.createElement(r,mr({},n))};SR.isSideCarExport=!0;function Yq(t,e){return t.useMedium(e),SR}var NR=qq(),Em=function(){},Wf=m.forwardRef(function(t,e){var n=m.useRef(null),r=m.useState({onScrollCapture:Em,onWheelCapture:Em,onTouchMoveCapture:Em}),s=r[0],i=r[1],o=t.forwardProps,a=t.children,c=t.className,u=t.removeScrollBar,d=t.enabled,h=t.shards,f=t.sideCar,p=t.noRelative,x=t.noIsolation,g=t.inert,y=t.allowPinchZoom,w=t.as,v=w===void 0?"div":w,b=t.gapMode,_=CR(t,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),k=f,S=Hq([n,e]),C=mr(mr({},_),s);return m.createElement(m.Fragment,null,d&&m.createElement(k,{sideCar:NR,removeScrollBar:u,shards:h,noRelative:p,noIsolation:x,inert:g,setCallbacks:i,allowPinchZoom:!!y,lockRef:n,gapMode:b}),o?m.cloneElement(m.Children.only(a),mr(mr({},C),{ref:S})):m.createElement(v,mr({},C,{className:c,ref:S}),a))});Wf.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};Wf.classNames={fullWidth:Nd,zeroRight:Sd};var Qq=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function Xq(){if(!document)return null;var t=document.createElement("style");t.type="text/css";var e=Qq();return e&&t.setAttribute("nonce",e),t}function Jq(t,e){t.styleSheet?t.styleSheet.cssText=e:t.appendChild(document.createTextNode(e))}function Zq(t){var e=document.head||document.getElementsByTagName("head")[0];e.appendChild(t)}var eY=function(){var t=0,e=null;return{add:function(n){t==0&&(e=Xq())&&(Jq(e,n),Zq(e)),t++},remove:function(){t--,!t&&e&&(e.parentNode&&e.parentNode.removeChild(e),e=null)}}},tY=function(){var t=eY();return function(e,n){m.useEffect(function(){return t.add(e),function(){t.remove()}},[e&&n])}},TR=function(){var t=tY(),e=function(n){var r=n.styles,s=n.dynamic;return t(r,s),null};return e},nY={left:0,top:0,right:0,gap:0},Cm=function(t){return parseInt(t||"",10)||0},rY=function(t){var e=window.getComputedStyle(document.body),n=e[t==="padding"?"paddingLeft":"marginLeft"],r=e[t==="padding"?"paddingTop":"marginTop"],s=e[t==="padding"?"paddingRight":"marginRight"];return[Cm(n),Cm(r),Cm(s)]},sY=function(t){if(t===void 0&&(t="margin"),typeof window>"u")return nY;var e=rY(t),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:e[0],top:e[1],right:e[2],gap:Math.max(0,r-n+e[2]-e[0])}},iY=TR(),oa="data-scroll-locked",oY=function(t,e,n,r){var s=t.left,i=t.top,o=t.right,a=t.gap;return n===void 0&&(n="margin"),` 3559 .`.concat(Vq,` { 3560 overflow: hidden `).concat(r,`; 3561 padding-right: `).concat(a,"px ").concat(r,`; 3562 } 3563 body[`).concat(oa,`] { 3564 overflow: hidden `).concat(r,`; 3565 overscroll-behavior: contain; 3566 `).concat([e&&"position: relative ".concat(r,";"),n==="margin"&&` 3567 padding-left: `.concat(s,`px; 3568 padding-top: `).concat(i,`px; 3569 padding-right: `).concat(o,`px; 3570 margin-left:0; 3571 margin-top:0; 3572 margin-right: `).concat(a,"px ").concat(r,`; 3573 `),n==="padding"&&"padding-right: ".concat(a,"px ").concat(r,";
3573")].filter(Boolean).join(""),` 3574 } 3575 3576 .`).concat(Sd,` { 3577 right: `).concat(a,"px ").concat(r,`; 3578 } 3579 3580 .`).concat(Nd,` { 3581 margin-right: `).concat(a,"px ").concat(r,`; 3582 } 3583 3584 .`).concat(Sd," .").concat(Sd,` { 3585 right: 0 `).concat(r,`; 3586 } 3587 3588 .`).concat(Nd," .").concat(Nd,` { 3589 margin-right: 0 `).concat(r,`; 3590 } 3591 3592 body[`).concat(oa,`] { 3593 `).concat($q,": ").concat(a,`px; 3594 } 3595`)},Lk=function(){var t=parseInt(document.body.getAttribute(oa)||"0",10);return isFinite(t)?t:0},aY=function(){m.useEffect(function(){return document.body.setAttribute(oa,(Lk()+1).toString()),function(){var t=Lk()-1;t<=0?document.body.removeAttribute(oa):document.body.setAttribute(oa,t.toString())}},[])},lY=function(t){var e=t.noRelative,n=t.noImportant,r=t.gapMode,s=r===void 0?"margin":r;aY();var i=m.useMemo(function(){return sY(s)},[s]);return m.createElement(iY,{styles:oY(i,!e,s,n?"":"!important")})},Ry=!1;if(typeof window<"u")try{var Yu=Object.defineProperty({},"passive",{get:function(){return Ry=!0,!0}});window.addEventListener("test",Yu,Yu),window.removeEventListener("test",Yu,Yu)}catch{Ry=!1}var bo=Ry?{passive:!1}:!1,cY=function(t){return t.tagName==="TEXTAREA"},IR=function(t,e){if(!(t instanceof Element))return!1;var n=window.getComputedStyle(t);return n[e]!=="hidden"&&!(n.overflowY===n.overflowX&&!cY(t)&&n[e]==="visible")},uY=function(t){return IR(t,"overflowY")},dY=function(t){return IR(t,"overflowX")},Fk=function(t,e){var n=e.ownerDocument,r=e;do{typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host);var s=PR(t,r);if(s){var i=jR(t,r),o=i[1],a=i[2];if(o>a)return!0}r=r.parentNode}while(r&&r!==n.body);return!1},hY=function(t){var e=t.scrollTop,n=t.scrollHeight,r=t.clientHeight;return[e,n,r]},fY=function(t){var e=t.scrollLeft,n=t.scrollWidth,r=t.clientWidth;return[e,n,r]},PR=function(t,e){return t==="v"?uY(e):dY(e)},jR=function(t,e){return t==="v"?hY(e):fY(e)},pY=function(t,e){return t==="h"&&e==="rtl"?-1:1},mY=function(t,e,n,r,s){var i=pY(t,window.getComputedStyle(e).direction),o=i*r,a=n.target,c=e.contains(a),u=!1,d=o>0,h=0,f=0;do{if(!a)break;var p=jR(t,a),x=p[0],g=p[1],y=p[2],w=g-y-i*x;(x||w)&&PR(t,a)&&(h+=w,f+=x);var v=a.parentNode;a=v&&v.nodeType===Node.DOCUMENT_FRAGMENT_NODE?v.host:v}while(!c&&a!==document.body||c&&(e.contains(a)||e===a));return(d&&(Math.abs(h)<1||!s)||!d&&(Math.abs(f)<1||!s))&&(u=!0),u},Qu=function(t){return"changedTouches"in t?[t.changedTouches[0].clientX,t.changedTouches[0].clientY]:[0,0]},Uk=function(t){return[t.deltaX,t.deltaY]},Bk=function(t){return t&&"current"in t?t.current:t},gY=function(t,e){return t[0]===e[0]&&t[1]===e[1]},yY=function(t){return` 3596 .block-interactivity-`.concat(t,` {pointer-events: none;} 3597 .allow-interactivity-`).concat(t,` {pointer-events: all;} 3598`)},vY=0,_o=[];function xY(t){var e=m.useRef([]),n=m.useRef([0,0]),r=m.useRef(),s=m.useState(vY++)[0],i=m.useState(TR)[0],o=m.useRef(t);m.useEffect(function(){o.current=t},[t]),m.useEffect(function(){if(t.inert){document.body.classList.add("block-interactivity-".concat(s));var g=Bq([t.lockRef.current],(t.shards||[]).map(Bk),!0).filter(Boolean);return g.forEach(function(y){return y.classList.add("allow-interactivity-".concat(s))}),function(){document.body.classList.remove("block-interactivity-".concat(s)),g.forEach(function(y){return y.classList.remove("allow-interactivity-".concat(s))})}}},[t.inert,t.lockRef.current,t.shards]);var a=m.useCallback(function(g,y){if("touches"in g&&g.touches.length===2||g.type==="wheel"&&g.ctrlKey)return!o.current.allowPinchZoom;var w=Qu(g),v=n.current,b="deltaX"in g?g.deltaX:v[0]-w[0],_="deltaY"in g?g.deltaY:v[1]-w[1],k,S=g.target,C=Math.abs(b)>Math.abs(_)?"h":"v";if("touches"in g&&C==="h"&&S.type==="range")return!1;var N=Fk(C,S);if(!N)return!0;
vendor: 9,425 bytes, lines 3598-3602
3598if(N?k=C:(k=C==="v"?"h":"v",N=Fk(C,S)),!N)return!1;if(!r.current&&"changedTouches"in g&&(b||_)&&(r.current=k),!k)return!0;var P=r.current||k;return mY(P,y,g,P==="h"?b:_,!0)},[]),c=m.useCallback(function(g){var y=g;if(!(!_o.length||_o[_o.length-1]!==i)){var w="deltaY"in y?Uk(y):Qu(y),v=e.current.filter(function(k){return k.name===y.type&&(k.target===y.target||y.target===k.shadowParent)&&gY(k.delta,w)})[0];if(v&&v.should){y.cancelable&&y.preventDefault();return}if(!v){var b=(o.current.shards||[]).map(Bk).filter(Boolean).filter(function(k){return k.contains(y.target)}),_=b.length>0?a(y,b[0]):!o.current.noIsolation;_&&y.cancelable&&y.preventDefault()}}},[]),u=m.useCallback(function(g,y,w,v){var b={name:g,delta:y,target:w,should:v,shadowParent:wY(w)};e.current.push(b),setTimeout(function(){e.current=e.current.filter(function(_){return _!==b})},1)},[]),d=m.useCallback(function(g){n.current=Qu(g),r.current=void 0},[]),h=m.useCallback(function(g){u(g.type,Uk(g),g.target,a(g,t.lockRef.current))},[]),f=m.useCallback(function(g){u(g.type,Qu(g),g.target,a(g,t.lockRef.current))},[]);m.useEffect(function(){return _o.push(i),t.setCallbacks({onScrollCapture:h,onWheelCapture:h,onTouchMoveCapture:f}),document.addEventListener("wheel",c,bo),document.addEventListener("touchmove",c,bo),document.addEventListener("touchstart",d,bo),function(){_o=_o.filter(function(g){return g!==i}),document.removeEventListener("wheel",c,bo),document.removeEventListener("touchmove",c,bo),document.removeEventListener("touchstart",d,bo)}},[]);var p=t.removeScrollBar,x=t.inert;return m.createElement(m.Fragment,null,x?m.createElement(i,{styles:yY(s)}):null,p?m.createElement(lY,{noRelative:t.noRelative,gapMode:t.gapMode}):null)}function wY(t){for(var e=null;t!==null;)t instanceof ShadowRoot&&(e=t.host,t=t.host),t=t.parentNode;return e}const bY=Yq(NR,xY);var RR=m.forwardRef(function(t,e){return m.createElement(Wf,mr({},t,{ref:e,sideCar:bY}))});RR.classNames=Wf.classNames;var _Y=function(t){if(typeof document>"u")return null;var e=Array.isArray(t)?t[0]:t;return e.ownerDocument.body},ko=new WeakMap,Xu=new WeakMap,Ju={},Sm=0,AR=function(t){return t&&(t.host||AR(t.parentNode))},kY=function(t,e){return e.map(function(n){if(t.contains(n))return n;var r=AR(n);return r&&t.contains(r)?r:(console.error("aria-hidden",n,"in not contained inside",t,". Doing nothing"),null)}).filter(function(n){return!!n})},EY=function(t,e,n,r){var s=kY(e,Array.isArray(t)?t:[t]);Ju[n]||(Ju[n]=new WeakMap);var i=Ju[n],o=[],a=new Set,c=new Set(s),u=function(h){!h||a.has(h)||(a.add(h),u(h.parentNode))};s.forEach(u);var d=function(h){!h||c.has(h)||Array.prototype.forEach.call(h.children,function(f){if(a.has(f))d(f);else try{var p=f.getAttribute(r),x=p!==null&&p!=="false",g=(ko.get(f)||0)+1,y=(i.get(f)||0)+1;ko.set(f,g),i.set(f,y),o.push(f),g===1&&x&&Xu.set(f,!0),y===1&&f.setAttribute(n,"true"),x||f.setAttribute(r,"true")}catch(w){console.error("aria-hidden: cannot operate on ",f,w)}})};return d(e),a.clear(),Sm++,function(){o.forEach(function(h){var f=ko.get(h)-1,p=i.get(h)-1;ko.set(h,f),i.set(h,p),f||(Xu.has(h)||h.removeAttribute(r),Xu.delete(h)),p||h.removeAttribute(n)}),Sm--,Sm||(ko=new WeakMap,ko=new WeakMap,Xu=new WeakMap,Ju={})}},CY=function(t,e,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(t)?t:[t]),s=_Y(t);return s?(r.push.apply(r,Array.from(s.querySelectorAll("[aria-live]"))),EY(r,s,n,"aria-hidden")):function(){return null}},Hf="Dialog",[DR,xJ]=lo(Hf),[SY,ir]=DR(Hf),MR=t=>{const{__scopeDialog:e,children:n,open:r,defaultOpen:s,onOpenChange:i,modal:o=!0}=t,a=m.useRef(null),c=m.useRef(null),[u,d]=rf({prop:r,defaultProp:s??!1,onChange:i,caller:Hf});return l.jsx(SY,{scope:e,triggerRef:a,contentRef:c,contentId:Ap(),titleId:Ap(),descriptionId:Ap(),open:u,onOpenChange:d,onOpenToggle:m.useCallback(()=>d(h=>!h),[d]),modal:o,children:n})};MR.displayName=Hf;var OR="DialogTrigger",NY=m.forwardRef((t,e)=>{const{__scopeDialog:n,...r}=t,s=ir(OR,n),i=He(e,s.triggerRef);return l.jsx(Ne.button,{type:"button","aria-haspopup":"dialog","aria-expanded":s.open,"aria-controls":s.contentId,"data-state":M0(s.open),...r,ref:i,onClick:xe(t.onClick,s.onOpenToggle)})});NY.displayName=OR;var A0="DialogPortal",[TY,LR]=DR(A0,{forceMount:void 0}),FR=t=>{const{__scopeDialog:e,forceMount:n,children:r,container:s}=t,i=ir(A0,e);return l.jsx(TY,{scope:e,forceMount:n,children:m.Children.map(r,o=>l.jsx(co,{present:n||i.open,children:l.jsx(jv,{asChild:!0,container:s,children:o})}))})};FR.displayName=A0;var Uh="DialogOverlay",UR=m.forwardRef((t,e)=>{const n=LR(Uh,t.__scopeDialog),{forceMount:r=n.forceMount,...s}=t,i=ir(Uh,t.__scopeDialog);return i.modal?l.jsx(co,{present:r||i.open,children:l.jsx(PY,{...s,ref:e})}):null});UR.displayName=Uh;var IY=Zd("DialogOverlay.RemoveScroll"),PY=m.forwardRef((t,e)=>{const{__scopeDialog:n,...r}=t,s=ir(Uh,n);return l.jsx(RR,{as:IY,allowPinchZoom:!0,shards:[s.contentRef],children:l.jsx(Ne.div,{"data-state":M0(s.open),...r,ref:e,style:{pointerEvents:"auto",...r.style}})})}),io="DialogContent",BR=m.forwardRef((t,e)=>{const n=LR(io,t.__scopeDialog),{forceMount:r=n.forceMount,...s}=t,i=ir(io,t.__scopeDialog);return l.jsx(co,{present:r||i.open,children:i.modal?l.jsx(jY,{...s,ref:e}):l.jsx(RY,{...s,ref:e})})});BR.displayName=io;var jY=m.forwardRef((t,e)=>{const n=ir(io,t.__scopeDialog),r=m.useRef(null),s=He(e,n.contentRef,r);return m.useEffect(()=>{const i=r.current;if(i)return CY(i)},[]),l.jsx(VR,{...t,ref:s,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:xe(t.onCloseAutoFocus,i=>{var o;i.preventDefault(),(o=n.triggerRef.current)==null||o.focus()}),onPointerDownOutside:xe(t.onPointerDownOutside,i=>{const o=i.detail.originalEvent,a=o.button===0&&o.ctrlKey===!0;(o.button===2||a)&&i.preventDefault()}),onFocusOutside:xe(t.onFocusOutside,i=>i.preventDefault())})}),RY=m.forwardRef((t,e)=>{const n=ir(io,t.__scopeDialog),r=m.useRef(!1),s=m.useRef(!1);return l.jsx(VR,{...t,ref:e,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:i=>{var o,a;(o=t.onCloseAutoFocus)==null||o.call(t,i),i.defaultPrevented||(r.current||(a=n.triggerRef.current)==null||a.focus(),i.preventDefault()),r.current=!1,s.current=!1},onInteractOutside:i=>{var c,u;(c=t.onInteractOutside)==null||c.call(t,i),i.defaultPrevented||(r.current=!0,i.detail.originalEvent.type==="pointerdown"&&(s.current=!0));const o=i.target;((u=n.triggerRef.current)==null?void 0:u.contains(o))&&i.preventDefault(),i.detail.originalEvent.type==="focusin"&&s.current&&i.preventDefault()}})}),VR=m.forwardRef((t,e)=>{const{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:s,onCloseAutoFocus:i,...o}=t,a=ir(io,n),c=m.useRef(null),u=He(e,c);return Uq(),l.jsxs(l.Fragment,{children:[l.jsx(kR,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:s,onUnmountAutoFocus:i,children:l.jsx(nf,{role:"dialog",id:a.contentId,"aria-describedby":a.descriptionId,"aria-labelledby":a.titleId,"data-state":M0(a.open),...o,ref:u,onDismiss:()=>a.onOpenChange(!1)})}),l.jsxs(l.Fragment,{children:[l.jsx(AY,{titleId:a.titleId}),l.jsx(MY,{contentRef:c,descriptionId:a.descriptionId})]})]})}),D0="DialogTitle",$R=m.forwardRef((t,e)=>{const{__scopeDialog:n,...r}=t,s=ir(D0,n);return l.jsx(Ne.h2,{id:s.titleId,...r,ref:e})});$R.displayName=D0;var zR="DialogDescription",WR=m.forwardRef((t,e)=>{const{__scopeDialog:n,...r}=t,s=ir(zR,n);return l.jsx(Ne.p,{id:s.descriptionId,...r,ref:e})});WR.displayName=zR;var HR="DialogClose",KR=m.forwardRef((t,e)=>{const{__scopeDialog:n,...r}=t,s=ir(HR,n);return l.jsx(Ne.button,{type:"button",...r,ref:e,onClick:xe(t.onClick,()=>s.onOpenChange(!1))})});KR.displayName=HR;function M0(t){return t?"open":"closed"}var GR="DialogTitleWarning",[wJ,qR]=CM(GR,{contentName:io,titleName:D0,docsSlug:"dialog"}),AY=({titleId:t})=>{const e=qR(GR),n=`\`${e.contentName}\` requires a \`${e.titleName}\` for the component to be accessible for screen reader users. 3599 3600If you want to hide the \`${e.titleName}\`, you can wrap it with our VisuallyHidden component. 3601 3602For more information, see https://radix-ui.com/primitives/docs/components/${e.docsSlug}`;return m.useEffect(()=>{t&&(document.getElementById(t)||console.error(n))},[n,t]),null},DY="DialogDescriptionWarning",MY=({contentRef:t,descriptionId:e})=>{const r=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${qR(DY).contentName}}.`;return m.useEffect(()=>{var i;const s=(i=t.current)==null?void 0:i.getAttribute("aria-describedby");e&&s&&(document.getElementById(e)||console.warn(r))},[r,t,e]),null},OY=MR,LY=FR,YR=UR,QR=BR,XR=$R,JR=WR,FY=KR;const O0=OY,UY=LY,ZR=m.forwardRef(({className:t,...e},n)=>l.jsx(YR,{ref:n,className:Dt("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",t),...e}));ZR.displayName=YR.displayName;const Kf=m.forwardRef(({className:t,children:e,...n},r)=>l.jsxs(UY,{children:[l.jsx(ZR,{}),l.jsxs(QR,{ref:r,className:Dt("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rou
3602nded-lg",t),...n,children:[e,l.jsxs(FY,{className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity data-[state=open]:bg-accent data-[state=open]:text-muted-foreground hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none",children:[l.jsx(In,{className:"h-4 w-4"}),l.jsx("span",{className:"sr-only",children:"Close"})]})]})]}));Kf.displayName=QR.displayName;const Gf=({className:t,...e})=>l.jsx("div",{className:Dt("flex flex-col space-y-1.5 text-center sm:text-left",t),...e});Gf.displayName="DialogHeader";const qf=({className:t,...e})=>l.jsx("div",{className:Dt("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",t),...e});qf.displayName="DialogFooter";const Yf=m.forwardRef(({className:t,...e},n)=>l.jsx(XR,{ref:n,className:Dt("text-lg font-semibold leading-none tracking-tight",t),...e}));Yf.displayName=XR.displayName;const Qf=m.forwardRef(({className:t,...e},n)=>l.jsx(JR,{ref:n,className:Dt("text-sm text-muted-foreground",t),...e}));Qf.displayName=JR.displayName;function BY({open:t,onClose:e,trip:n,onSave:r,nextOrder:s}){const{uploadStudyTripImage:i}=vt(),o=!n,[a,c]=m.useState((n==null?void 0:n.year)??new Date().getFullYear()),[u,d]=m.useState((n==null?void 0:n.location.NO)??""),[h,f]=m.useState((n==null?void 0:n.location.EN)??""),[p,x]=m.useState((n==null?void 0:n.title.NO)??""),[g,y]=m.useState((n==null?void 0:n.title.EN)??""),[w,v]=m.useState((n==null?void 0:n.description.NO)??""),[b,_]=m.useState((n==null?void 0:n.description.EN)??""),[k,S]=m.useState((n==null?void 0:n.imageUrl)??""),[C,N]=m.useState((n==null?void 0:n.videoUrl)??""),[P,j]=m.useState(!1),[O,L]=m.useState(!1),[K,U]=m.useState(""),A=m.useRef(null),M=m.useRef(`trip-${Date.now()}`);m.useEffect(()=>{t&&(c((n==null?void 0:n.year)??new Date().getFullYear()),d((n==null?void 0:n.location.NO)??""),f((n==null?void 0:n.location.EN)??""),x((n==null?void 0:n.title.NO)??""),y((n==null?void 0:n.title.EN)??""),v((n==null?void 0:n.description.NO)??""),_((n==null?void 0:n.description.EN)??""),S((n==null?void 0:n.imageUrl)??""),N((n==null?void 0:n.videoUrl)??""),j(!1),U(""),n||(M.current=`trip-${Date.now()}`))},[t,n]);const R=(n==null?void 0:n.id)??M.current,E=async I=>{L(!0),U("");try{const H=await i(R,I);S(H)}catch(H){console.error("Image upload failed:",H),U((H==null?void 0:H.message)||"Upload failed. Use the URL field instead.")}finally{L(!1)}},T=async()=>{j(!0);try{await r({id:R,year:a,location:{NO:u,EN:h},title:{NO:p,EN:g},description:{NO:w,EN:b},imageUrl:k||void 0,videoUrl:C||void 0,order:(n==null?void 0:n.order)??s}),e()}finally{j(!1)}};return l.jsx(O0,{open:t,onOpenChange:I=>!I&&e(),children:l.jsxs(Kf,{className:"max-w-2xl max-h-[90vh] overflow-y-auto",children:[l.jsxs(Gf,{children:[l.jsx(Yf,{children:o?"Legg til studiereise":"Rediger studiereise"}),l.jsx(Qf,{children:o?"Fyll ut informasjon om studiereisen.":"Endre informasjon om studiereisen."})]}),l.jsxs("div",{className:"space-y-4",children:[l.jsxs("div",{children:[l.jsx("label",{className:"text-sm font-medium block mb-1",children:"Year"}),l.jsx("input",{type:"number",value:a,onChange:I=>c(Number(I.target.value)),className:"w-full p-2 border rounded bg-background text-foreground"})]}),l.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[l.jsxs("div",{children:[l.jsx("label",{className:"text-sm font-medium block mb-1",children:"Location (NO)"}),l.jsx("input",{type:"text",value:u,onChange:I=>d(I.target.value),placeholder:"Ezé, Frankrike 2019",className:"w-full p-2 border rounded bg-background text-foreground"})]}),l.jsxs("div",{children:[l.jsx("label",{className:"text-sm font-medium block mb-1",children:"Location (EN)"}),l.jsx("input",{type:"text",value:h,onChange:I=>f(I.target.value),placeholder:"Ezé, France 2019",className:"w-full p-2 border rounded bg-background text-foreground"})]})]}),l.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[l.jsxs("div",{children:[l.jsx("label",{className:"text-sm font-medium block mb-1",children:"Title (NO)"}),l.jsx("input",{type:"text",value:p,onChange:I=>x(I.target.value),className:"w-full p-2 border rounded bg-background text-foreground"})]}),l.jsxs("div",{children:[l.jsx("label",{className:"text-sm font-medium block mb-1",children:"Title (EN)"}),l.jsx("input",{type:"text",value:g,onChange:I=>y(I.target.value),className:"w-full p-2 border rounded bg-background text-foreground"})]})]}),l.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[l.jsxs("div",{children:[l.jsx("label",{className:"text-sm font-medium block mb-1",children:"Description (NO)"}),l.jsx("textarea",{value:w,onChange:I=>v(I.target.value),rows:4,className:"w-full p-2 border rounded bg-background text-foreground resize-y"})]}),l.jsxs("div",{children:[l.jsx("label",{className:"text-sm font-medium block mb-1",children:"Description (EN)"}),l.jsx("textarea",{value:b,onChange:I=>_(I.target.value),rows:4,className:"w-full p-2 border rounded bg-background text-foreground resize-y"})]})]}),l.jsxs("div",{children:[l.jsx("label",{className:"text-sm font-medium block mb-1",children:"Image URL"}),l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsx("input",{type:"text",value:k,onChange:I=>S(I.target.value),placeholder:"/studiereiser.jpg or https://...",className:"flex-1 p-2 border rounded bg-background text-foreground"}),l.jsx("input",{ref:A,type:"file",accept:"image/*",className:"hidden",onChange:I=>{var Q;const H=(Q=I.target.files)==null?void 0:Q[0];H&&E(H)}}),l.jsxs("button",{onClick:()=>{var I;return(I=A.current)==null?void 0:I.click()},className:"flex items-center gap-2 px-3 py-2 text-sm border rounded hover:bg-muted transition-colors whitespace-nowrap",children:[O?l.jsx(Tr,{className:"w-4 h-4 animate-spin"}):l.jsx(Ma,{className:"w-4 h-4"}),O?"Uploading...":"Upload"]})]}),K&&l.jsx("p",{className:"text-xs text-red-500 mt-1",children:K}),k&&l.jsxs("div",{className:"relative w-24 h-16 rounded overflow-hidden border mt-2",children:[l.jsx("img",{src:k,alt:"Preview",className:"w-full h-full object-cover"}),l.jsx("button",{onClick:()=>S(""),className:"absolute -top-1 -right-1 bg-red-500 text-white rounded-full p-0.5",children:l.jsx(In,{className:"w-3 h-3"})})]})]}),l.jsxs("div",{children:[l.jsx("label",{className:"text-sm font-medium block mb-1",children:"YouTube URL"}),l.jsx("input",{type:"text",value:C,onChange:I=>N(I.target.value),placeholder:"Any YouTube link (embed, watch, shorts, youtu.be)",className:"w-full p-2 border rounded bg-background text-foreground"}),l.jsx("p",{className:"text-xs text-muted-foreground mt-1",children:"Supports all formats: embed, watch, youtu.be, and Shorts URLs"})]})]}),l.jsxs(qf,{className:"mt-4",children:[l.jsx("button",{onClick:e,className:"px-4 py-2 text-sm border rounded hover:bg-muted transition-colors",children:"Cancel"}),l.jsx("button",{onClick:T,disabled:P||!p,className:"px-4 py-2 text-sm bg-blue-600 text-white rounded hover:bg-blue-700 transition-colors disabled:opacity-50",children:P?"Saving...":"Save"})]})]})})}function VY(){const{t}=Mt(),{isEditMode:e,studyTrips:n,addStudyTrip:r,updateStudyTrip:s,deleteStudyTrip:i,reorderStudyTrips:o}=vt(),[a,c]=m.useState(null),[u,d]=m.useState(!1),h=m.useRef(null),{scrollYProgress:f}=zV({target:h,offset:["start end","end start"]}),p=EI(f,[0,1],[.05,1]),x=[...n].sort((v,b)=>v.order-b.order),g=()=>{c(null),d(!0)},y=v=>{c(v),d(!0)},w=async v=>{if(a)await s(v);else{for(const b of x)await r(b);await r(v)}};return l.jsxs("section",{className:"py-20 md:py-32",children:[l.jsxs("div",{className:"container-gallery",children:[l.jsx(Z,{children:l.jsxs("div",{className:"text-center max-w-2xl mx-auto mb-12 md:mb-16",children:[l.jsx(J,{tKey:"studyTrips.sectionLabel",as:"span",className:"text-xs tracking-[0.25em] uppercase text-muted-foreground mb-4 block"}),l.jsx(J,{tKey:"studyTrips.sectionTitle",as:"h2",className:"heading-section"})]})}),e&&l.jsx("div",{className:"flex justify-center mb-10",children:l.jsxs("button",{onClick:g,className:"flex items-center gap-2 px-4 py-2 bg-blue-600 text-white text-sm rounded hover:bg-blue-700 transition-colors",children:[l.jsx(Mv,{className:"w-4 h-4"}),t("studyTrips.addTrip")]})}),l.jsxs("div",{className:"relative",ref:h,children:[l.jsx(oe.div,{className:"absolute left-1/2 -translate-x-px top-0 bottom-0 w-px bg-border",style:{scaleY:p,transformOrigin:"top"}}),l.jsx("div",{className:"space-y-20 md:space-y-32",children:x.map((v,b)=>l.jsx(jq,{trip:v,index:b,total:x.length,onEdit:()=>y(v),onDelete:()=>i(v.id),onReorder:_=>o(v.id,_)},v.id))})]})]}),l.jsx(BY,{open:u,onClose:()=>d(!1),trip:a,onSave:w,nextOrder:x.length})]})}const eA="/assets/07-balanse1-BPr62R0C.jpg",tA="/assets/03-selvportrett-D_RU1W3q.jpg",nA="/assets/02-dreamy-girl-c-BKLCrJLv.jpg",rA="/assets/11-solastranden-rm6UsfMR.jpg",sA="/assets/11-espresso-DbOuFjpe.jpg",iA="/assets/05-shipowner-Azg7c1qH.jpg",oA="/assets/07-solnedgang-notholmen-CVK1mszQ.jpg",aA="/assets/04-balanse2-rYETOcoy.jpg",$Y="/assets/gallery-1-5DJr0GHy.jpg",zY="/assets/gallery-2-DNDW3YLQ.jpg",WY="/assets/gallery-3-DAXGYeFt.jpg",HY="/assets/gallery-4-CRaX2lcz.jpg",lA="/assets/store-1-BBb1O0kk.jpg",KY="/assets/store-2-CWCZjy9l.jpg",GY="/assets/store-3-BVWmqv2J.jpg",cA="/assets/about-image-8RQ9YLN-.jpg",qY="/assets/upscale-Dw5hgqUT.png",Nm=[eA,tA,nA,rA,R0,sA,iA,oA,aA],ps=[{src:$Y,alt:"Stilleben"},{src:zY,alt:"Espresso"},{src:WY,alt:"The Flame"},{src:HY,alt:"Dreamy Girl"}],YY=[{src:lA,alt:"Våren",tKey:"storePreview.0.title"},{src:KY,alt:"Egget",tKey:"storePreview.1.title"},{src:GY,alt:"Linolje",tKey:"storePreview.2.title"}];function QY(){const[t,e]=m.useState(0);Mt();const{isEditMode:n,imageOverrides:r,updateImage:s}=vt(),{hasConsent:i,openCookieSettings:o}=Za(),[a,c]=m.useState(null),u=m.useRef([]),d=f=>r[`hero-${f}`]||Nm[f],h=async(f,p)=>{c(f);try{await s(`hero-${f}`,p)}catch(x){console.error("Hero image upload failed:",x)}finally{c(null)}};return m.useEffect(()=>{const f=setInterval(()=>{e(p=>(p+1)%Nm.length)},6e3);return()=>clearInterval(f)},[]),l.jsxs(Rt,{hasHero:!0,children:[l.jsxs("section",{className:"relative h-screen w-full overflow-hidden bg-black",children:[l.jsx(Xi,{children:l.jsxs(oe.div,{initial:{opacity:0}
3602,animate:{opacity:1},exit:{opacity:0},transition:{duration:1.5,ease:"easeInOut"},className:"absolute inset-0",children:[l.jsx("img",{src:d(t),alt:"Billy Ãkland artwork",className:"w-full h-full object-cover"}),l.jsx("div",{className:"absolute inset-0 bg-overlay/40"})]},t)}),n&&l.jsx("div",{className:"absolute bottom-24 left-0 right-0 z-50 flex justify-center",children:l.jsxs("div",{className:"bg-black/80 backdrop-blur-sm rounded-lg p-3 flex gap-2 max-w-[90vw] overflow-x-auto",children:[l.jsx("span",{className:"text-white text-xs self-center mr-2 whitespace-nowrap",children:"Hero images:"}),Nm.map((f,p)=>l.jsxs("div",{className:"relative flex-shrink-0",children:[l.jsx("input",{ref:x=>{u.current[p]=x},type:"file",accept:"image/*",className:"hidden",onChange:x=>{var y;const g=(y=x.target.files)==null?void 0:y[0];g&&h(p,g)}}),l.jsx("button",{onClick:x=>{x.preventDefault(),x.stopPropagation(),e(p)},className:`w-16 h-10 rounded overflow-hidden border-2 transition-colors ${t===p?"border-blue-400":"border-transparent hover:border-white/50"}`,children:l.jsx("img",{src:d(p),alt:`Hero ${p+1}`,className:"w-full h-full object-cover"})}),l.jsx("button",{onClick:x=>{var g;x.preventDefault(),x.stopPropagation(),(g=u.current[p])==null||g.click()},className:"absolute -top-1 -right-1 bg-blue-500 hover:bg-blue-600 text-white rounded-full p-0.5 shadow",children:a===p?l.jsx(Tr,{className:"w-3 h-3 animate-spin"}):l.jsx(Ma,{className:"w-3 h-3"})})]},p))]})}),l.jsx("div",{className:"absolute inset-0 flex items-center justify-center",children:l.jsxs("div",{className:"container-gallery text-center",children:[l.jsx(oe.div,{initial:{opacity:0,y:30},animate:{opacity:1,y:0},transition:{duration:.8,delay:.3},className:"mb-8",children:l.jsx("img",{src:qY,alt:"Billy Ãkland",className:"h-24 md:h-32 lg:h-40 w-auto mx-auto brightness-0 invert"})}),l.jsx(oe.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.8,delay:.5},className:"body-large hero-text max-w-xl mx-auto mb-10 opacity-90",children:l.jsx(J,{tKey:"hero.subtitle",as:"p"})}),l.jsxs(oe.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.8,delay:.7},className:"flex flex-col sm:flex-row items-center justify-center gap-4",children:[l.jsx(ge,{to:"/gallerier",className:"btn-editorial-light min-w-[180px] text-center",children:l.jsx(J,{tKey:"hero.cta",as:"span"})}),l.jsx(ge,{to:"/kontakt",className:"inline-flex items-center justify-center min-w-[180px] px-6 py-3 text-sm tracking-wide border border-hero-text/40 text-hero-text hover:bg-hero-text hover:text-overlay transition-all duration-300",children:l.jsx(J,{tKey:"hero.ctaSecondary",as:"span"})})]})]})})]}),l.jsx("section",{className:"section-spacing",children:l.jsx("div",{className:"container-gallery",children:l.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-12 lg:gap-20 items-center",children:[l.jsx(Z,{direction:"left",children:l.jsxs("div",{children:[l.jsx(J,{tKey:"about.title",as:"span",className:"text-xs tracking-[0.25em] uppercase text-muted-foreground mb-6 block"}),l.jsx("blockquote",{className:"text-xl md:text-2xl italic text-foreground leading-relaxed mb-8",style:{fontFamily:"'Playfair Display', serif"},children:l.jsx(J,{tKey:"about.quote",as:"span"})}),l.jsx(J,{tKey:"about.description1",as:"p",className:"body-regular text-muted-foreground mb-10"}),l.jsxs(ge,{to:"/om-oss",className:"group inline-flex items-center gap-3 text-sm tracking-wide text-foreground hover:gap-5 transition-all duration-300",children:[l.jsx(J,{tKey:"about.readMore",as:"span"}),l.jsx(_n,{className:"w-4 h-4"})]})]})}),l.jsx(Z,{direction:"right",delay:.2,children:l.jsx("div",{className:"aspect-[3/4] overflow-hidden",children:l.jsx(Si,{imageKey:"about-preview",src:cA,alt:"Billy Ãkland i atelieret",className:"w-full h-full object-cover"})})})]})})}),l.jsx(VY,{}),l.jsx("section",{className:"py-20 md:py-32",children:l.jsxs("div",{className:"container-gallery",children:[l.jsx(Z,{children:l.jsxs("div",{className:"flex flex-col md:flex-row md:items-end md:justify-between mb-12 md:mb-16",children:[l.jsxs("div",{children:[l.jsx(J,{tKey:"store.title",as:"span",className:"text-xs tracking-[0.25em] uppercase text-muted-foreground mb-4 block"}),l.jsx(J,{tKey:"store.description",as:"h2",className:"heading-section max-w-md"})]}),l.jsxs(ge,{to:"/nettbutikk",className:"group inline-flex items-center gap-3 text-sm tracking-wide mt-6 md:mt-0 hover:gap-5 transition-all duration-300",children:[l.jsx(J,{tKey:"store.visitStore",as:"span"}),l.jsx(_n,{className:"w-4 h-4"})]})]})}),l.jsx("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-4 md:gap-6",children:YY.map((f,p)=>l.jsx(Z,{delay:p*.1,children:l.jsxs(ge,{to:"/nettbutikk",className:"group block",children:[l.jsx("div",{className:"gallery-image aspect-[4/5] mb-5",children:l.jsx(Si,{imageKey:`store-preview-${p}`,src:f.src,alt:f.alt,className:"w-full h-full object-cover"})}),l.jsx(J,{tKey:f.tKey,as:"p",className:"text-sm tracking-wide text-muted-foreground text-center group-hover:text-foreground transition-colors duration-300"})]})},p))})]})}),l.jsx(ui,{colorKey:"gallery-dark-bg",className:"bg-gallery-dark py-20 md:py-32",children:l.jsxs("div",{className:"container-gallery",children:[l.jsx(Z,{children:l.jsxs("div",{className:"flex flex-col md:flex-row md:items-end md:justify-between mb-12 md:mb-16",children:[l.jsxs("div",{children:[l.jsx(J,{tKey:"gallery.title",as:"span",className:"text-xs tracking-[0.25em] uppercase text-muted-foreground mb-4 block"}),l.jsx(J,{tKey:"gallery.description",as:"h2",className:"heading-section"})]}),l.jsxs(ge,{to:"/gallerier",className:"group inline-flex items-center gap-3 text-sm tracking-wide mt-6 md:mt-0 hover:gap-5 transition-all duration-300",children:[l.jsx(J,{tKey:"gallery.viewAll",as:"span"}),l.jsx(_n,{className:"w-4 h-4"})]})]})}),l.jsxs("div",{className:"grid grid-cols-2 md:grid-cols-4 gap-3 md:gap-4",children:[l.jsx(Z,{delay:0,children:l.jsx(ge,{to:"/gallerier",className:"gallery-image block aspect-[3/4]",children:l.jsx(Si,{imageKey:"gallery-preview-0",
3602src:ps[0].src,alt:ps[0].alt,className:"w-full h-full object-cover"})})}),l.jsx(Z,{delay:.1,children:l.jsx(ge,{to:"/gallerier",className:"gallery-image block aspect-square mt-0 md:mt-12",children:l.jsx(Si,{imageKey:"gallery-preview-1",src:ps[1].src,alt:ps[1].alt,className:"w-full h-full object-cover"})})}),l.jsx(Z,{delay:.2,children:l.jsx(ge,{to:"/gallerier",className:"gallery-image block aspect-[3/4]",children:l.jsx(Si,{imageKey:"gallery-preview-2",src:ps[2].src,alt:ps[2].alt,className:"w-full h-full object-cover"})})}),l.jsx(Z,{delay:.3,children:l.jsx(ge,{to:"/gallerier",className:"gallery-image block aspect-square mt-0 md:mt-12",children:l.jsx(Si,{imageKey:"gallery-preview-3",src:ps[3].src,alt:ps[3].alt,className:"w-full h-full object-cover"})})})]})]})}),l.jsxs(ui,{colorKey:"warm-umber-bg",className:"bg-warm-umber",children:[l.jsx("div",{className:"container-gallery py-20 md:py-32",children:l.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-16 md:gap-20",children:[l.jsx(Z,{children:l.jsxs("div",{className:"flex flex-col justify-center",children:[l.jsx(Oa,{className:"w-8 h-8 mb-6 opacity-70"}),l.jsx(J,{tKey:"instagram.title",as:"h2",className:"heading-section mb-4"}),l.jsx(J,{tKey:"instagram.description",as:"p",className:"body-regular text-muted-foreground mb-8"}),l.jsxs("a",{href:"https://www.instagram.com/billyokland",target:"_blank",rel:"noopener noreferrer",className:"group inline-flex items-center gap-3 text-sm tracking-wide hover:gap-5 transition-all duration-300",children:["@billyokland",l.jsx(_n,{className:"w-4 h-4"})]})]})}),l.jsx(Z,{delay:.15,children:l.jsxs("div",{className:"flex flex-col justify-center md:border-l md:border-white/10 md:pl-20",children:[l.jsx(J,{tKey:"contact.title",as:"span",className:"text-xs tracking-[0.25em] uppercase text-muted-foreground mb-6 block"}),l.jsx(J,{tKey:"contact.description",as:"p",className:"body-regular text-muted-foreground mb-8"}),l.jsxs("div",{className:"space-y-3 mb-10",children:[l.jsx("p",{children:l.jsx("a",{href:"mailto:[email protected]",className:"body-regular link-underline",children:"[email protected]"})}),l.jsx("p",{children:l.jsx("a",{href:"tel:+4740201696",className:"body-regular link-underline",children:"+47 40 20 16 96"})})]}),l.jsxs(ge,{to:"/kontakt",className:"group inline-flex items-center gap-3 text-sm tracking-wide hover:gap-5 transition-all duration-300",children:[l.jsx(J,{tKey:"contact.form",as:"span"}),l.jsx(_n,{className:"w-4 h-4"})]})]})})]})}),l.jsx("div",{className:"w-full h-[400px] md:h-[450px]",children:i?l.jsx("iframe",{src:"https://www.google.com/maps/embed?pb=!1m18!1m12!1m3!1d2016.502660203953!2d5.3781959!3d59.6412843!2m3!1f0!2f0!3f0!3m2!1i1024!2i768!4f13.1!3m3!1m2!1s0x463b817c4fb2f29b%3A0xb95eac97d1cc7c1b!2sBilly-Roy%20%C3%98kland!5e0!3m2!1sen!2sph!4v1769388827897!5m2!1sen!2sph",width:"100%",height:"100%",style:{border:0},allowFullScreen:!0,loading:"lazy",referrerPolicy:"no-referrer-when-downgrade",title:"Billy Ãkland Location"}):l.jsxs("div",{className:"w-full h-full bg-gray-100 flex flex-col items-center justify-center gap-4",children:[l.jsx("p",{className:"text-sm text-gray-600 text-center px-4",children:"Kart er deaktivert. Aktiver informasjonskapsler for Ã¥ vise interaktivt kart."}),l.jsx("button",{onClick:o,className:"px-4 py-2 bg-black text-white text-sm hover:bg-gray-800 transition-colors",children:"Samtykkeinnstillinger"})]})})]})]})}function uA(t,[e,n]){return Math.min(n,Math.max(e,t))}var XY=m.createContext(void 0);function JY(t){const e=m.useContext(XY);return t||e||"ltr"}function dA(t){const e=m.useRef({value:t,previous:t});return m.useMemo(()=>(e.current.value!==t&&(e.current.previous=e.current.value,e.current.value=t),e.current.previous),[t])}var hA=["PageUp","PageDown"],fA=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],pA={"from-left":["Home","PageDown","ArrowDown","ArrowLeft"],"from-right":["Home","PageDown","ArrowDown","ArrowRight"],"from-bottom":["Home","PageDown","ArrowDown","ArrowLeft"],"from-top":["Home","PageDown","ArrowUp","ArrowLeft"]},el="Slider",[Ay,ZY,eQ]=pS(el),[mA,bJ]=lo(el,[eQ]),[tQ,Xf]=mA(el),gA=m.forwardRef((t,e)=>{const{name:n,min:r=0,max:s=100,step:i=1,orientation:o="horizontal",disabled:a=!1,minStepsBetweenThumbs:c=0,defaultValue:u=[r],value:d,onValueChange:h=()=>{},onValueCommit:f=()=>{},inverted:p=!1,form:x,...g}=t,y=m.useRef(new Set),w=m.useRef(0),b=o==="horizontal"?nQ:rQ,[_=[],k]=rf({prop:d,defaultProp:u,onChange:O=>{var K;(K=[...y.current][w.current])==null||K.focus(),h(O)}
3602}),S=m.useRef(_);function C(O){const L=lQ(_,O);j(O,L)}function N(O){j(O,w.current)}function P(){const O=S.current[w.current];_[w.current]!==O&&f(_)}function j(O,L,{commit:K}={commit:!1}){const U=hQ(i),A=fQ(Math.round((O-r)/i)*i+r,U),M=uA(A,[r,s]);k((R=[])=>{const E=oQ(R,M,L);if(dQ(E,c*i)){w.current=E.indexOf(M);const T=String(E)!==String(R);return T&&K&&f(E),T?E:R}else return R})}return l.jsx(tQ,{scope:t.__scopeSlider,name:n,disabled:a,min:r,max:s,valueIndexToChangeRef:w,thumbs:y.current,values:_,orientation:o,form:x,children:l.jsx(Ay.Provider,{scope:t.__scopeSlider,children:l.jsx(Ay.Slot,{scope:t.__scopeSlider,children:l.jsx(b,{"aria-disabled":a,"data-disabled":a?"":void 0,...g,ref:e,onPointerDown:xe(g.onPointerDown,()=>{a||(S.current=_)}),min:r,max:s,inverted:p,onSlideStart:a?void 0:C,onSlideMove:a?void 0:N,onSlideEnd:a?void 0:P,onHomeKeyDown:()=>!a&&j(r,0,{commit:!0}),onEndKeyDown:()=>!a&&j(s,_.length-1,{commit:!0}),onStepKeyDown:({event:O,direction:L})=>{if(!a){const A=hA.includes(O.key)||O.shiftKey&&fA.includes(O.key)?10:1,M=w.current,R=_[M],E=i*A*L;j(R+E,M,{commit:!0})}}})})})})});gA.displayName=el;var[yA,vA]=mA(el,{startEdge:"left",endEdge:"right",size:"width",direction:1}),nQ=m.forwardRef((t,e)=>{const{min:n,max:r,dir:s,inverted:i,onSlideStart:o,onSlideMove:a,onSlideEnd:c,onStepKeyDown:u,...d}=t,[h,f]=m.useState(null),p=He(e,b=>f(b)),x=m.useRef(void 0),g=JY(s),y=g==="ltr",w=y&&!i||!y&&i;function v(b){const _=x.current||h.getBoundingClientRect(),k=[0,_.width],C=L0(k,w?[n,r]:[r,n]);return x.current=_,C(b-_.left)}return l.jsx(yA,{scope:t.__scopeSlider,startEdge:w?"left":"right",endEdge:w?"right":"left",direction:w?1:-1,size:"width",children:l.jsx(xA,{dir:g,"data-orientation":"horizontal",...d,ref:p,style:{...d.style,"--radix-slider-thumb-transform":"translateX(-50%)"},onSlideStart:b=>{const _=v(b.clientX);o==null||o(_)},onSlideMove:b=>{const _=v(b.clientX);a==null||a(_)},onSlideEnd:()=>{x.current=void 0,c==null||c()},onStepKeyDown:b=>{const k=pA[w?"from-left":"from-right"].includes(b.key);u==null||u({event:b,direction:k?-1:1})}})})}),rQ=m.forwardRef((t,e)=>{const{min:n,max:r,inverted:s,onSlideStart:i,onSlideMove:o,onSlideEnd:a,onStepKeyDown:c,...u}=t,d=m.useRef(null),h=He(e,d),f=m.useRef(void 0),p=!s;function x(g){const y=f.current||d.current.getBoundingClientRect(),w=[0,y.height],b=L0(w,p?[r,n]:[n,r]);return f.current=y,b(g-y.top)}return l.jsx(yA,{scope:t.__scopeSlider,startEdge:p?"bottom":"top",endEdge:p?"top":"bottom",size:"height",direction:p?1:-1,children:l.jsx(xA,{"data-orientation":"vertical",...u,ref:h,style:{...u.style,"--radix-slider-thumb-transform":"translateY(50%)"},onSlideStart:g=>{const y=x(g.clientY);i==null||i(y)},onSlideMove:g=>{const y=x(g.clientY);o==null||o(y)},onSlideEnd:()=>{f.current=void 0,a==null||a()},onStepKeyDown:g=>{const w=pA[p?"from-bottom":"from-top"].includes(g.key);c==null||c({event:g,direction:w?-1:1})}})})}),xA=m.forwardRef((t,e)=>{const{__scopeSlider:n,onSlideStart:r,onSlideMove:s,onSlideEnd:i,onHomeKeyDown:o,onEndKeyDown:a,onStepKeyDown:c,...u}=t,d=Xf(el,n);return l.jsx(Ne.span,{...u,ref:e,onKeyDown:xe(t.onKeyDown,h=>{h.key==="Home"?(o(h),h.preventDefault()):h.key==="End"?(a(h),h.preventDefault()):hA.concat(fA).includes(h.key)&&(c(h),h.preventDefault())}),onPointerDown:xe(t.onPointerDown,h=>{const f=h.target;f.setPointerCapture(h.pointerId),h.preventDefault(),d.thumbs.has(f)?f.focus():r(h)}),onPointerMove:xe(t.onPointerMove,h=>{h.target.hasPointerCapture(h.pointerId)&&s(h)}),onPointerUp:xe(t.onPointerUp,h=>{const f=h.target;f.hasPointerCapture(h.pointerId)&&(f.releasePointerCapture(h.pointerId),i(h))})})}),wA="SliderTrack",bA=m.forwardRef((t,e)=>{const{__scopeSlider:n,...r}=t,s=Xf(wA,n);return l.jsx(Ne.span,{"data-disabled":s.disabled?"":void 0,"data-orientation":s.orientation,...r,ref:e})});bA.displayName=wA;var Dy="SliderRange",_A=m.forwardRef((t,e)=>{const{__scopeSlider:n,...r}=t,s=Xf(Dy,n),i=vA(Dy,n),o=m.useRef(null),a=He(e,o),c=s.values.length,u=s.values.map(f=>CA(f,s.min,s.max)),d=c>1?Math.min(...u):0,h=100-Math.max(...u);return l.jsx(Ne.span,{"data-orientation":s.orientation,"data-disabled":s.disabled?"":void 0,...r,ref:a,style:{...t.style,[i.startEdge]:d+"%",[i.endEdge]:h+"%"}})});_A.displayName=Dy;var My="SliderThumb",kA=m.forwardRef((t,e)=>{const n=ZY(t.__scopeSlider),[r,s]=m.useState(null),i=He(e,a=>s(a)),o=m.useMemo(()=>r?n().findIndex(a=>a.ref.current===r):-1,[n,r]);return l.jsx(sQ,{...t,ref:i,index:o})}),sQ=m.forwardRef((t,e)=>{const{__scopeSlider:n,index:r,name:s,...i}=t,o=Xf(My,n),a=vA(My,n),[c,u]=m.useState(null),d=He(e,v=>u(v)),h=c?o.form||!!c.closest("form"):!0,f=Wv(c),p=o.values[r],x=p===void 0?0:CA(p,o.min,o.max),g=aQ(r,o.values.length),y=f==null?void 0:f[a.size],w=y?cQ(y,x,a.direction):0;return m.useEffect(()=>{if(c)return o.thumbs.add(c),()=>{o.thumbs.delete(c)}},[c,o.thumbs]),l.jsxs("span",{style:{transform:"var(--radix-slider-thumb-transform)",position:"absolute",[a.startEdge]:`calc(${x}% + ${w}px)`},children:[l.jsx(Ay.ItemSlot,{scope:t.__scopeSlider,children:l.jsx(Ne.span,{role:"slider","aria-label":t["aria-label"]||g,"aria-valuemin":o.min,"aria-valuenow":p,"aria-valuemax":o.max,"aria-orientation":o.orientation,"data-orientation":o.orientation,"data-disabled":o.disabled?"":void 0,tabIndex:o.disabled?void 0:0,...i,ref:d,style:p===void 0?{display:"none"}:t.style,onFocus:xe(t.onFocus,()=>{o.valueIndexToChangeRef.current=r})})}),h&&l.jsx(EA,{name:s??(o.name?o.name+(o.values.length>1?"[]":""):void 0),form:o.form,value:p},r)]})});kA.displayName=My;var iQ="RadioBubbleInput",EA=m.forwardRef(({__scopeSlider:t,value:e,...n},r)=>{const s=m.useRef(null),i=He(s,r),o=dA(e);return m.useEffect(()=>{const a=s.current;if(!a)return;const c=window.HTMLInputElement.prototype,d=Object.getOwnPropertyDescriptor(c,"value").set;if(o!==e&&d){const h=new Event("input",{bubbles:!0});d.call(a,e),a.dispatchEvent(h)}},[o,e]),l.jsx(Ne.input,{style:{display:"none"},...n,ref:i,defaultValue:e})});EA.displayName=iQ;function oQ(t=[],e,n){const r=[...t];return r[n]=e,r.sort((s,i)=>s-i)}function CA(t,e,n){const i=100/(n-e)*(t-e);return uA(i,[0,100])}function aQ(t,e){return e>2?`Value ${t+1} of ${e}`:e===2?["Minimum","Maximum"][t]:void 0}function lQ(t,e){if(t.length===1)return 0;const n=t.map(s=>Math.abs(s-e)),r=Math.min(...n);return n.indexOf(r)}function cQ(t,e,n){const r=t/2,i=L0([0,50],[0,r]);return(r-i(e)*n)*n}function uQ(t){return t.slice(0,-1).map((e,n)=>t[n+1]-e)}function dQ(t,e){if(e>0){const n=uQ(t);return Math.min(...n)>=e}return!0}function L0(t,e){return n=>{if(t[0]===t[1]||e[0]===e[1])return e[0];const r=(e[1]-e[0])/(t[1]-t[0]);return e[0]+r*(n-t[0])}}function hQ(t){return(String(t).split(".")[1]||"").length}function fQ(t,e){const n=Math.pow(10,e);return Math.round(t*n)/n}var SA=gA,pQ=bA,mQ=_A,gQ=kA;const Td=m.forwardRef(({className:t,...e},n)=>l.jsxs(SA,{ref:n,className:Dt("relative flex w-full touch-none select-none items-center",t),...e,children:[l.jsx(pQ,{className:"relative h-2 w-full grow overflow-hidden rounded-full bg-secondary",children:l.jsx(mQ,{className:"absolute h-full bg-primary"})}),l.jsx(gQ,{className:"block h-5 w-5 rounded-full border-2 border-primary bg-background ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50"})]}));Td.displayName=SA.displayName;const vn={x:50,y:50,scale:1};function Tm(t,e,n){return Math.min(n,Math.max(e,t))}function Zu(t){return{x:Tm(t.x,0,100),y:Tm(t.y,0,100),scale:Tm(t.scale,1,3)}}function yQ(t){return t.x===vn.x&&t.y===vn.y&&t.scale===vn.scale}function cu({imageKey:t,src:e,alt:n,className:r=""}){const{isEditMode:s,imageOverrides:i,imageStyleOverrides:o,updateImage:a,deleteImage:c,updateImageStyle:u,deleteImageStyle:d}=vt(),[h,f]=m.useState(!1),[p,x]=m.useState(!1),[g,y]=m.useState(!1),[w,v]=m.useState(!1),[b,_]=m.useState(vn),[k,S]=m.useState(null),[C,N]=m.useState(null),P=m.useRef(null),j=m.useRef(null),O=m.useRef(vn),L=m.useRef(null),K=!!i[t],U=!!o[t],A=i[t]||e,M=o[t]||vn;m.useEffect(()=>
3602{_(M),O.current=M},[M]),m.useEffect(()=>{const W=j.current;if(!W)return;const X=()=>{const _t=W.getBoundingClientRect();N({width:_t.width,height:_t.height})};X();const _e=new ResizeObserver(X);return _e.observe(W),()=>_e.disconnect()},[]);const R=s?b:M,E=m.useMemo(()=>{if(!k||!C||C.width===0||C.height===0)return null;const W=Zu(R),_e=Math.max(C.width/k.width,C.height/k.height)*W.scale,_t=k.width*_e,ar=k.height*_e,jn=Math.max(0,_t-C.width),F=Math.max(0,ar-C.height);return{imageWidth:_t,imageHeight:ar,maxOffsetX:jn,maxOffsetY:F,offsetX:-jn*(W.x/100),offsetY:-F*(W.y/100),totalScale:_e}},[C,k,R]),T=m.useMemo(()=>{if(!(!E||!k))return{width:`${k.width}px`,height:`${k.height}px`,transform:`translate(${E.offsetX}px, ${E.offsetY}px) scale(${E.totalScale})`,transformOrigin:"top left"}},[E,k]),I=async W=>{const X=Zu(W);if(yQ(X)){await d(t);return}await u(t,X)},H=W=>{W.preventDefault(),W.stopPropagation()},Q=async W=>{var _e;const X=(_e=W.target.files)==null?void 0:_e[0];if(X){f(!0);try{await a(t,X),_(vn),O.current=vn,await d(t)}catch(_t){console.error("Image upload failed:",_t)}finally{f(!1),P.current&&(P.current.value="")}}},ne=async W=>{if(H(W),!!K&&confirm("Fjern dette bildet og gjenopprett standardbildet?")){x(!0);try{await c(t),_(vn),O.current=vn,await d(t)}catch(X){console.error("Image delete failed:",X)}finally{x(!1)}}},z=(W,X)=>{const _e=Zu({...O.current,[W]:X});return O.current=_e,_(_e),_e},ue=async W=>{H(W),_(vn),O.current=vn;try{await d(t)}catch(X){console.error("Image style reset failed:",X)}},Fe=W=>{!s||!E||W.button!==0||(W.preventDefault(),W.currentTarget.setPointerCapture(W.pointerId),L.current={pointerId:W.pointerId,startClientX:W.clientX,startClientY:W.clientY,startStyle:O.current,maxOffsetX:E.maxOffsetX,maxOffsetY:E.maxOffsetY},v(!0),y(!0))},me=W=>{const X=L.current;if(!X||X.pointerId!==W.pointerId)return;const _e=W.clientX-X.startClientX,_t=W.clientY-X.startClientY,ar=X.maxOffsetX>0?X.startStyle.x-_e/X.maxOffsetX*100:X.startStyle.x,jn=X.maxOffsetY>0?X.startStyle.y-_t/X.maxOffsetY*100:X.startStyle.y,F=Zu({...X.startStyle,x:ar,y:jn});O.current=F,_(F)},or=async W=>{const X=L.current;if(!(!X||X.pointerId!==W.pointerId)){W.currentTarget.releasePointerCapture(W.pointerId),L.current=null,v(!1);try{await I(O.current)}catch(_e){console.error("Image style update failed:",_e)}}},pn=W=>{const X=L.current;!X||X.pointerId!==W.pointerId||(W.currentTarget.releasePointerCapture(W.pointerId),L.current=null,v(!1))},mn=l.jsx("img",{src:A,alt:n,onLoad:W=>{const{naturalWidth:X,naturalHeight:_e}=W.currentTarget;X&&_e&&S({width:X,height:_e})},className:E?"absolute top-0 left-0 max-w-none select-none":"h-full w-full object-cover",style:T,draggable:!1});return s?l.jsxs("div",{ref:j,className:`relative overflow-hidden ${r} ${w?"cursor-grabbing":"cursor-grab"}`,onPointerDown:Fe,onPointerMove:me,onPointerUp:or,onPointerCancel:pn,children:[mn,l.jsx("div",{className:"pointer-events-none absolute inset-0 z-20 border border-white/15 shadow-[inset_0_0_0_1px_rgba(0,0,0,0.18)]"}),l.jsx("input",{ref:P,type:"file",accept:"image/*",onChange:Q,className:"hidden"}),l.jsxs("div",{className:"absolute top-4 right-4 z-[70] flex items-center gap-2 rounded-full bg-stone-950/78 px-3 py-2 text-white shadow-xl backdrop-blur-sm",onPointerDown:W=>W.stopPropagation(),children:[l.jsxs("button",{type:"button",onClick:W=>{var X;H(W),(X=P.current)==null||X.click()},disabled:h||p,className:"inline-flex items-center gap-2 rounded-full bg-white/12 px-3 py-1.5 text-xs tracking-wide transition-colors hover:bg-white/20 disabled:opacity-60",title:"Bytt hero-bilde",children:[h?l.jsx(Tr,{className:"h-3.5 w-3.5 animate-spin"}):l.jsx(Ma,{className:"h-3.5 w-3.5"}),"Bytt bilde"]}),l.jsxs("button",{type:"button",onClick:W=>{H(W),y(X=>!X)},className:`inline-flex items-center gap-2 rounded-full px-3 py-1.5 text-xs tracking-wide transition-colors ${g?"bg-white text-stone-900":"bg-white/12 hover:bg-white/20"}`,title:"Juster utsnitt",children:[l.jsx(CO,{className:"h-3.5 w-3.5"}),"Utsnitt"]}),(K||U)&&l.jsxs(l.Fragment,{children:[l.jsxs("button",{type:"button",onClick:ue,className:"inline-flex items-center gap-2 rounded-full bg-white/12 px-3 py-1.5 text-xs tracking-wide transition-colors hover:bg-white/20",title:"Nullstill utsnitt",children:[l.jsx(Qo,{className:"h-3.5 w-3.5"}),"Nullstill utsnitt"]}),K&&l.jsxs("button",{type:"button",onClick:ne,disabled:h||p,className:"inline-flex items-center gap-2 rounded-full bg-red-500/85 px-3 py-1.5 text-xs tracking-wide transition-colors hover:bg-red-500 disabled:opacity-60",title:"Fjern bilde",children:[p?l.
3602jsx(Tr,{className:"h-3.5 w-3.5 animate-spin"}):l.jsx(pi,{className:"h-3.5 w-3.5"}),"Standardbilde"]})]})]}),g&&l.jsxs("div",{className:"absolute inset-x-4 bottom-4 z-[70] rounded-[28px] bg-stone-950/82 p-4 text-white shadow-2xl backdrop-blur-md",onPointerDown:W=>W.stopPropagation(),children:[l.jsxs("div",{className:"mb-4 flex items-center justify-between gap-4",children:[l.jsxs("div",{children:[l.jsx("p",{className:"text-[11px] uppercase tracking-[0.2em] text-white/65",children:"Banner Crop"}),l.jsx("p",{className:"text-xs text-white/80",children:"Dra bildet direkte i banneren for a plassere utsnittet."})]}),l.jsx("div",{className:"text-[11px] uppercase tracking-[0.2em] text-white/50",children:E?`${Math.round(E.imageWidth)} x ${Math.round(E.imageHeight)}`:"Laster"})]}),l.jsxs("div",{className:"grid gap-5 md:grid-cols-3",children:[l.jsxs("label",{className:"block",children:[l.jsx("span",{className:"mb-2 block text-[11px] uppercase tracking-[0.18em] text-white/70",children:"Vannrett"}),l.jsx(Td,{min:0,max:100,step:.1,value:[b.x],onValueChange:W=>{z("x",W[0]??50)},onValueCommit:async W=>{try{await I(z("x",W[0]??50))}catch(X){console.error("Image style update failed:",X)}}})]}),l.jsxs("label",{className:"block",children:[l.jsx("span",{className:"mb-2 block text-[11px] uppercase tracking-[0.18em] text-white/70",children:"Loddrett"}),l.jsx(Td,{min:0,max:100,step:.1,value:[b.y],onValueChange:W=>{z("y",W[0]??50)},onValueCommit:async W=>{try{await I(z("y",W[0]??50))}catch(X){console.error("Image style update failed:",X)}}})]}),l.jsxs("label",{className:"block",children:[l.jsx("span",{className:"mb-2 block text-[11px] uppercase tracking-[0.18em] text-white/70",children:"Zoom"}),l.jsx(Td,{min:1,max:3,step:.01,value:[b.scale],onValueChange:W=>{z("scale",W[0]??1)},onValueCommit:async W=>{try{await I(z("scale",W[0]??1))}catch(X){console.error("Image style update failed:",X)}}})]})]})]})]}):l.jsx("div",{ref:j,className:`relative overflow-hidden ${r}`,children:mn})}function vQ({open:t,onClose:e,product:n,onSave:r,nextOrder:s}){const{uploadProductImage:i,deleteStorageFile:o}=vt(),a=!n,[c,u]=m.useState((n==null?void 0:n.name)??""),[d,h]=m.useState((n==null?void 0:n.subtitle)??""),[f,p]=m.useState((n==null?void 0:n.price)??3800),[x,g]=m.useState((n==null?void 0:n.category)??"giclee"),[y,w]=m.useState((n==null?void 0:n.dimensions)??""),[v,b]=m.useState((n==null?void 0:n.description)??""),[_,k]=m.useState((n==null?void 0:n.imageUrl)??""),[S,C]=m.useState((n==null?void 0:n.imageRemoved)??!1),[N,P]=m.useState((n==null?void 0:n.sold)??!1),[j,O]=m.useState(!1),[L,K]=m.useState(!1),[U,A]=m.useState(""),M=m.useRef(null),R=m.useRef(`product-${Date.now()}`),E=m.useRef("");m.useEffect(()=>{t&&(u((n==null?void 0:n.name)??""),h((n==null?void 0:n.subtitle)??""),p((n==null?void 0:n.price)??3800),g((n==null?void 0:n.category)??"giclee"),w((n==null?void 0:n.dimensions)??""),b((n==null?void 0:n.description)??""),k(n!=null&&n.imageRemoved?"":(n==null?void 0:n.imageUrl)??""),C((n==null?void 0:n.imageRemoved)??!1),P((n==null?void 0:n.sold)??!1),O(!1),A(""),E.current=n!=null&&n.imageRemoved?"":n!=null&&n.imageUrl&&jt(n.imageUrl)?n.imageUrl:"",n||(R.current=`product-${Date.now()}`))},[t,n]);const T=(n==null?void 0:n.id)??R.current,I=async z=>{K(!0),A("");try{const ue=await i(T,z);k(ue),C(!1)}catch(ue){console.error("Image upload failed:",ue),A((ue==null?void 0:ue.message)||"Upload failed.")}finally{K(!1)}},H=async()=>{O(!0);try{const z=jt(_)?_:"";await r({id:T,name:c,price:f,imageUrl:z,imageRemoved:S,category:x,subtitle:d,description:v,dimensions:y,sold:N||void 0,order:(n==null?void 0:n.order)??s});const ue=E.current;ue&&ue!==z&&await o(ue),e()}finally{O(!1)}},Q=()=>{_&&confirm("Fjern bildet fra produktet?")&&(k(""),C(!0),A(""))},ne=[{value:"giclee",label:"Giclée-trykk"},{value:"lithograph",label:"Litografi / Håndkolorert"},{value:"original",label:"Oljemaleri"}];return l.jsx(O0,{open:t,onOpenChange:z=>!z&&e(),children:l.jsxs(Kf,{className:"max-w-lg max-h-[90vh] overflow-y-auto",children:[l.jsxs(Gf,{children:[l.jsx(Yf,{children:a?"Legg til produkt":"Rediger produkt"}),l.jsx(Qf,{children:a?"Fyll ut informasjon om produktet.":"Endre produktinformasjon."})]}),l.jsxs("div",{className:"space-y-4",children:[l.jsxs("div",{children:[l.jsx("label",{className:"text-sm font-medium block mb-1",children:"Navn"}),l.jsx("input",{type:"text",value:c,onChange:z=>u(z.target.value),placeholder:"Navn på verket",className:"w-full p-2 border rounded bg-background text-foreground"})]}),l.jsxs("div",{children:[l.jsx("label",{className:"text-sm font-medium block mb-1",children:"Undertekst"}),l.jsx("input",{type:"text",value:d,onChange:z=>h(z.target.value),placeholder:"f.eks. Sort/Hvitt, Håndkolorert",className:"w-full p-2 border rounded bg-background text-foreground"}),l.jsx("p",{className:"text-[11px] text-muted-foreground mt-1",children:"Vises under tittelen (farge, teknikk o.l.)"})]}),l.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[l.jsxs("div",{children:[l.jsx("label",{className:"text-sm font-medium block mb-1",children:"Pris (NOK)"}),l.jsx("input",{type:"number",value:f,onChange:z=>p(Number(z.target.value)),className:"w-full p-2 border rounded bg-background text-foreground"})]}),l.jsxs("div",{children:[l.jsx("label",{className:"text-sm font-medium block mb-1",children:"Kategori"}),l.jsx("select",{value:x,onChange:z=>g(z.target.value),className:"w-full p-2 border rounded bg-background text-foreground",children:ne.map(z=>l.jsx("option",{value:z.value,children:z.label},z.value))})]})]}),l.jsxs("div",{children:[l.jsx("label",{className:"text-sm font-medium block mb-1",children:"Mål (dimensjoner)"}),l.jsx("input",{type:"text",value:y,onChange:z=>w(z.target.value),placeholder:"f.eks. 44 x 44 cm",className:"w-full p-2 border rounded bg-background text-foreground"})]}),l.jsxs("div",{children:[l.jsx("label",{className:"text-sm font-medium block mb-1",children:"Beskrivelse"}
3602),l.jsx("textarea",{value:v,onChange:z=>b(z.target.value),rows:3,placeholder:"Giclée-trykk, signert og nummerert...",className:"w-full p-2 border rounded bg-background text-foreground resize-y"})]}),l.jsxs("div",{children:[l.jsx("label",{className:"text-sm font-medium block mb-1",children:"Bilde"}),l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsx("input",{type:"text",value:_,onChange:z=>{k(z.target.value),z.target.value&&C(!1)},placeholder:"https://... eller last opp",className:"flex-1 p-2 border rounded bg-background text-foreground"}),l.jsx("input",{ref:M,type:"file",accept:"image/*",className:"hidden",onChange:z=>{var Fe;const ue=(Fe=z.target.files)==null?void 0:Fe[0];ue&&I(ue)}}),l.jsxs("button",{onClick:()=>{var z;return(z=M.current)==null?void 0:z.click()},className:"flex items-center gap-2 px-3 py-2 text-sm border rounded hover:bg-muted transition-colors whitespace-nowrap",children:[L?l.jsx(Tr,{className:"w-4 h-4 animate-spin"}):l.jsx(Ma,{className:"w-4 h-4"}),L?"Laster...":"Last opp"]}),l.jsxs("button",{onClick:Q,disabled:!_||L,className:"flex items-center gap-2 px-3 py-2 text-sm border border-red-200 text-red-600 rounded hover:bg-red-50 transition-colors whitespace-nowrap disabled:opacity-50 disabled:cursor-not-allowed",children:[l.jsx(pi,{className:"w-4 h-4"}),"Fjern bilde"]})]}),U&&l.jsx("p",{className:"text-xs text-red-500 mt-1",children:U}),_&&l.jsxs("div",{className:"relative w-24 h-24 rounded overflow-hidden border mt-2",children:[l.jsx("img",{src:_,alt:"Preview",className:"w-full h-full object-cover"}),l.jsx("button",{onClick:()=>{k(""),C(!0)},className:"absolute -top-1 -right-1 bg-red-500 text-white rounded-full p-0.5",children:l.jsx(In,{className:"w-3 h-3"})})]})]}),l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsx("input",{type:"checkbox",id:"sold-checkbox",checked:N,onChange:z=>P(z.target.checked),className:"rounded"}),l.jsx("label",{htmlFor:"sold-checkbox",className:"text-sm font-medium",children:"Solgt"})]})]}),l.jsxs(qf,{className:"mt-4",children:[l.jsx("button",{onClick:e,className:"px-4 py-2 text-sm border rounded hover:bg-muted transition-colors",children:"Avbryt"}),l.jsx("button",{onClick:H,disabled:j||!c,className:"px-4 py-2 text-sm bg-blue-600 text-white rounded hover:bg-blue-700 transition-colors disabled:opacity-50",children:j?"Lagrer...":"Lagre"})]})]})})}const gt="data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='250' fill='%23e5e5e5'%3E%3Crect width='200' height='250'/%3E%3Ctext x='50%25' y='50%25' dominant-baseline='middle' text-anchor='middle' font-family='sans-serif' font-size='14' fill='%23999'%3EIngen bilde%3C/text%3E%3C/svg%3E";function xQ(t){return{id:t.id,name:t.name,nameEN:t.name,price:t.price,image:t.imageRemoved?gt:jt(t.imageUrl)?t.imageUrl:gt,category:t.category,subtitle:t.subtitle||void 0,subtitleEN:t.subtitle||void 0,description:t.description,descriptionEN:t.description,dimensions:t.dimensions,sold:t.sold}}const wQ=["giclee","lithograph","original"],bQ={giclee:{NO:"Giclée-trykk",EN:"Giclée Prints"},lithograph:{NO:"Litografi / Håndkolorert",EN:"Lithographs / Hand-colored"},original:{NO:"Oljemaleri",EN:"Oil Paintings"}};function _Q(){const{t,language:e}=Mt(),{isEditMode:n,customProducts:r,addCustomProduct:s,updateCustomProduct:i,deleteCustomProduct:o,productOverrides:a,updateProductOverride:c}=vt(),[u,d]=m.useState("all"),[h,f]=m.useState(!1),[p,x]=m.useState(null),g=[{key:"all",label:t("store.filterAll")},{key:"giclee",label:t("store.filterGiclee")},{key:"lithograph",label:t("store.filterLithograph")},{key:"original",label:t("store.filterOriginal")}],y=m.useMemo(()=>{const A=Xs.map(R=>{const E=a[R.id];return E?E.deleted?null:{...R,name:E.name||R.name,nameEN:E.name||R.nameEN,price:E.price??R.price,image:E.imageRemoved?gt:jt(E.imageUrl)?E.imageUrl:R.image,category:E.category||R.category,subtitle:E.subtitle||R.subtitle,subtitleEN:E.subtitle||R.subtitleEN,description:E.description||R.description,descriptionEN:E.description||R.descriptionEN,dimensions:E.dimensions||R.dimensions,sold:E.sold??R.sold}:R}).filter(R=>R!==null),M=r.filter(R=>!R.deleted).map(xQ);return[...A,...M]},[r,a]),w=m.useMemo(()=>u==="all"?y:y.filter(A=>A.category===u),[u,y]),v=m.useMemo(()=>wQ.map(A=>({category:A,label:bQ[A][e],products:y.filter(M=>M.category===A)})).filter(A=>A.products.length>0),[y,e]),b=A=>r.some(M=>M.id===A),_=A=>Xs.some(M=>M.id===A),k=A=>r.find(M=>M.id===A)??null,S=A=>{const M=k(A);if(M)return M;const R=Xs.find(T=>T.id===A);if(!R)return null;const E=a[A];return{id:R.id,name:R.name,price:R.price,imageUrl:E!=null&&E.imageRemoved?"":(E==null?void 0:E.imageUrl)||R.image,imageRemoved:(E==null?void 0:E.imageRemoved)??!1,deleted:!1,category:R.category,subtitle:R.subtitle||"",description:R.description||"",dimensions:R.dimensions||"",sold:R.sold,order:(E==null?void 0:E.order)??0}},C=()=>{x(null),f(!0)},N=A=>{x(S(A)),f(!0)}
3602,P=async A=>{if(!confirm("Er du sikker på at du vil slette dette produktet?"))return;if(b(A)){await o(A);return}const M=S(A);M&&await c({...M,deleted:!0})},j=async A=>{b(A.id)?await i({...A,deleted:!1}):_(A.id)?await c({...A,deleted:!1}):await s(A)},O=r.length>0?Math.max(...r.map(A=>A.order))+1:1,L=u==="all"?y.length:w.length,K=A=>l.jsxs("div",{className:"relative group",children:[l.jsxs(ge,{to:`/nettbutikk/${A.id}`,className:"block",children:[l.jsxs("div",{className:"gallery-image aspect-[4/5] mb-4 flex items-center justify-center bg-store-card p-4 relative overflow-hidden",children:[l.jsx("img",{src:A.image,alt:vr(A,e),className:"max-w-full max-h-full object-contain",loading:"lazy"}),A.sold&&l.jsx("div",{className:"absolute inset-0 backdrop-blur-[6px] bg-white/30 flex items-center justify-center",children:l.jsx("span",{className:"text-lg md:text-xl font-semibold tracking-widest uppercase text-gray-800/80",children:"Solgt"})})]}),l.jsx("h3",{className:"text-sm md:text-base font-medium mb-0.5 group-hover:text-muted-foreground transition-colors duration-300",style:{fontFamily:"'Playfair Display', serif"},children:vr(A,e)}),Fh(A,e)&&l.jsx("p",{className:"text-[11px] md:text-xs text-muted-foreground/70 italic mb-1",children:Fh(A,e)}),l.jsx("p",{className:"text-xs md:text-sm text-muted-foreground",children:A.sold?e==="EN"?"Sold":"Solgt":Yt(A.price)})]}),n&&l.jsxs("div",{className:"absolute top-2 right-2 flex gap-1 opacity-0 group-hover:opacity-100 transition-opacity z-10","data-admin-ui":!0,children:[l.jsx("button",{onClick:M=>{M.preventDefault(),M.stopPropagation(),N(A.id)},className:"p-1.5 bg-blue-500 hover:bg-blue-600 text-white rounded shadow",title:"Rediger",children:l.jsx(Gc,{className:"w-3.5 h-3.5"})}),l.jsx("button",{onClick:M=>{M.preventDefault(),M.stopPropagation(),P(A.id)},className:"p-1.5 bg-red-500 hover:bg-red-600 text-white rounded shadow",title:"Slett",children:l.jsx(pi,{className:"w-3.5 h-3.5"})})]})]},A.id),U=A=>l.jsxs("div",{className:"flex items-center gap-4 md:gap-6 py-2",children:[l.jsx("div",{className:"flex-1 h-px bg-border"}),l.jsx("span",{className:"text-[11px] md:text-xs tracking-[0.2em] uppercase text-muted-foreground whitespace-nowrap",children:A}),l.jsx("div",{className:"flex-1 h-px bg-border"})]});return l.jsxs(Rt,{hasHero:!0,children:[l.jsxs("section",{className:"relative h-[50vh] min-h-[400px] w-full overflow-hidden",children:[l.jsxs("div",{className:"absolute inset-0",children:[l.jsx(cu,{imageKey:"store-hero-image",src:lA,alt:"Store banner",className:"h-full w-full"}),l.jsx("div",{className:"absolute inset-0 bg-overlay/50 pointer-events-none"})]}),l.jsx("div",{className:"absolute inset-0 z-20 flex items-center justify-center pointer-events-none",children:l.jsxs("div",{className:"container-gallery text-center",children:[l.jsx(oe.div,{initial:{opacity:0,y:30},animate:{opacity:1,y:0},transition:{duration:.8,delay:.3},className:"heading-hero hero-text mb-6 pointer-events-auto",children:l.jsx(J,{tKey:"store.title",as:"h1"})}),l.jsx(oe.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.8,delay:.5},className:"body-large hero-text max-w-xl mx-auto opacity-90 pointer-events-auto",children:l.jsx(J,{tKey:"store.description",as:"p"})})]})})]}),l.jsx("section",{className:"border-b border-border sticky top-[4rem] md:top-[6.5rem] z-30 bg-background/95 backdrop-blur-sm",children:l.jsx("div",{className:"container-gallery",children:l.jsxs("div",{className:"flex items-center gap-8 overflow-x-auto py-4 md:py-5 -mx-6 px-6 md:mx-0 md:px-0",children:[g.map(A=>l.jsx("button",{onClick:()=>d(A.key),className:`text-sm tracking-wide whitespace-nowrap transition-all duration-300 pb-1 border-b-2 ${u===A.key?"text-foreground border-foreground":"text-muted-foreground border-transparent hover:text-foreground"}`,children:A.label},A.key)),l.jsxs("span",{className:"ml-auto text-xs text-muted-foreground whitespace-nowrap hidden md:block",children:[L," ",t("store.items")]})]})})}),l.jsx("section",{className:"py-16 md:py-24",children:l.jsxs("div",{className:"container-gallery",children:[n&&l.jsx("div",{className:"mb-8","data-admin-ui":!0,children:l.jsxs("button",{onClick:C,className:"inline-flex items-center gap-2 px-4 py-2 text-sm bg-blue-600 text-white rounded hover:bg-blue-700 transition-colors",children:[l.jsx(Mv,{className:"w-4 h-4"}),"Legg til produkt"]})}),l.jsx(Xi,{mode:"wait",children:l.jsx(oe.div,{initial:{opacity:0,y:12}
3602,animate:{opacity:1,y:0},exit:{opacity:0,y:-12},transition:{duration:.3},children:u==="all"?l.jsx("div",{className:"space-y-12 md:space-y-16",children:v.map(A=>l.jsxs("div",{children:[U(A.label),l.jsx("div",{className:"grid grid-cols-2 md:grid-cols-3 lg:grid-cols-4 gap-4 md:gap-8 mt-8",children:A.products.map(K)})]},A.category))}):l.jsx("div",{className:"grid grid-cols-2 md:grid-cols-3 lg:grid-cols-4 gap-4 md:gap-8",children:w.map(K)})},u)})]})}),l.jsx(ui,{colorKey:"gallery-dark-bg",className:"bg-gallery-dark py-20 md:py-32",children:l.jsx("div",{className:"container-gallery",children:l.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-12 md:gap-20 items-center",children:[l.jsx(Z,{children:l.jsxs("div",{children:[l.jsx(J,{tKey:"store.inquiry",as:"span",className:"text-xs tracking-[0.25em] uppercase text-muted-foreground mb-6 block"}),l.jsx(J,{tKey:"store.interested",as:"h2",className:"heading-section mb-6"}),l.jsx(J,{tKey:"store.interestedDesc",as:"p",className:"body-regular text-muted-foreground mb-10"}),l.jsxs(ge,{to:"/kontakt",className:"group inline-flex items-center gap-3 text-sm tracking-wide hover:gap-5 transition-all duration-300",children:[t("store.contactMe"),l.jsx(_n,{className:"w-4 h-4"})]})]})}),l.jsx(Z,{delay:.15,children:l.jsxs("div",{className:"hidden md:block",children:[l.jsx("div",{className:"w-12 h-px bg-white/20 mb-8"}),l.jsx("blockquote",{className:"text-lg italic text-muted-foreground leading-relaxed",style:{fontFamily:"'Playfair Display', serif"},children:t("about.quote")})]})})]})})}),n&&l.jsx(vQ,{open:h,onClose:()=>{f(!1),x(null)},product:p,onSave:j,nextOrder:O})]})}function kQ(){const{id:t}=mf(),e=$a(),{t:n,language:r}=Mt(),{addToCart:s}=zf(),{customProducts:i,productOverrides:o}=vt(),[a,c]=m.useState(!1),u=m.useMemo(()=>{if(!t)return;const x=_q(t);if(x){const y=o[t];return y!=null&&y.deleted?void 0:y?{...x,name:y.name||x.name,nameEN:y.name||x.nameEN,price:y.price??x.price,image:y.imageRemoved?gt:jt(y.imageUrl)?y.imageUrl:x.image,category:y.category||x.category,subtitle:y.subtitle||x.subtitle,subtitleEN:y.subtitle||x.subtitleEN,description:y.description||x.description,descriptionEN:y.description||x.descriptionEN,dimensions:y.dimensions||x.dimensions,sold:y.sold??x.sold}:x}const g=i.find(y=>y.id===t&&!y.deleted);if(g)return{id:g.id,name:g.name,nameEN:g.name,price:g.price,image:g.imageRemoved?gt:jt(g.imageUrl)?g.imageUrl:gt,category:g.category,subtitle:g.subtitle||void 0,subtitleEN:g.subtitle||void 0,description:g.description,descriptionEN:g.description,dimensions:g.dimensions,sold:g.sold}},[t,i,o]);if(!u)return l.jsx(Rt,{children:l.jsx("div",{className:"pt-32 md:pt-40 pb-20 md:pb-32",children:l.jsxs("div",{className:"container-gallery text-center",children:[l.jsx("h1",{className:"heading-hero mb-6",children:"Product not found"}),l.jsx(ge,{to:"/nettbutikk",className:"btn-editorial",children:n("product.backToShop")})]})})});const d=x=>{switch(x){case"giclee":return n("product.giclee");case"lithograph":return n("product.lithograph");case"original":return n("product.original");default:return x}},h=()=>{s(u),c(!0),setTimeout(()=>c(!1),2e3)},p=m.useMemo(()=>{const x=Xs.map(y=>{const w=o[y.id];return w?w.deleted?null:{...y,name:w.name||y.name,nameEN:w.name||y.nameEN,price:w.price??y.price,image:w.imageRemoved?gt:jt(w.imageUrl)?w.imageUrl:y.image,category:w.category||y.category,subtitle:w.subtitle||y.subtitle,subtitleEN:w.subtitle||y.subtitleEN,description:w.description||y.description,descriptionEN:w.description||y.descriptionEN,dimensions:w.dimensions||y.dimensions,sold:w.sold??y.sold}:y}).filter(y=>y!==null),g=i.filter(y=>!y.deleted).map(y=>({id:y.id,name:y.name,nameEN:y.name,price:y.price,image:y.imageRemoved?gt:jt(y.imageUrl)?y.imageUrl:gt,category:y.category,subtitle:y.subtitle||void 0,subtitleEN:y.subtitle||void 0,description:y.description,descriptionEN:y.description,dimensions:y.dimensions,sold:y.sold}));return[...x,...g]},[i,o]).filter(x=>x.category===u.category&&x.id!==u.id).slice(0,3);return l.jsxs(Rt,{children:[l.jsx("section",{className:"pt-28 md:pt-36 pb-8",children:l.jsx("div",{className:"container-gallery",children:l.jsxs("button",{onClick:()=>e(-1),className:"inline-flex items-center gap-2 text-muted-foreground hover:text-foreground transition-colors",children:[l.jsx(af,{className:"w-4 h-4"}),l.jsx("span",{className:"text-sm",children:n("product.backToShop")})]})})}),l.jsx("section",{className:"pb-20 md:pb-32",children:l.jsx("div",{className:"container-gallery",children:l.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-12 lg:gap-20",children:[l.jsx(Z,{direction:"left",children:l.jsxs("div",{className:"aspect-[4/5] overflow-hidden bg-store-card flex items-center justify-center p-6 relative",children:[l.jsx("img",{src:u.image,alt:vr(u,r),className:"max-w-full max-h-full object-contain"}),u.sold&&l.jsx("div",{className:"absolute inset-0 backdrop-blur-[6px] bg-white/30 flex items-center justify-center",children:l.jsx("span",{className:"text-2xl md:text-3xl font-semibold tracking-widest uppercase text-gray-800/80",children:"Solgt"})})]})}),l.jsx(Z,{direction:"right",delay:.2,children:l.jsxs("div",{className:"lg:sticky lg:top-32",children:[l.jsx("span",{className:"text-sm text-muted-foreground uppercase tracking-wider",children:d(u.category)}),l.jsx("h1",{className:"heading-hero mt-2 mb-2",children:vr(u,r)}),Fh(u,r)&&l.jsx("p",{className:"text-sm md:text-base text-muted-foreground
3602/70 italic mb-4",children:Fh(u,r)}),l.jsx("p",{className:"text-2xl md:text-3xl font-serif mb-6",children:Yt(u.price)}),Tk(u,r)&&l.jsx("p",{className:"body-regular text-muted-foreground mb-6",children:Tk(u,r)}),u.dimensions&&l.jsxs("div",{className:"mb-8",children:[l.jsxs("span",{className:"text-sm text-muted-foreground",children:[n("product.dimensions"),":"]}),l.jsx("span",{className:"text-sm ml-2",children:u.dimensions})]}),u.sold?l.jsx("div",{className:"w-full md:w-auto px-8 py-4 text-sm tracking-wide bg-gray-300 text-gray-600 text-center uppercase",children:r==="EN"?"Sold":"Solgt"}):l.jsx(oe.button,{onClick:h,disabled:a,className:`w-full md:w-auto px-8 py-4 text-sm tracking-wide transition-all duration-300 flex items-center justify-center gap-2 ${a?"bg-green-600 text-white":"bg-foreground text-background hover:bg-foreground/90"}`,whileTap:{scale:.98},children:a?l.jsxs(l.Fragment,{children:[l.jsx(_a,{className:"w-4 h-4"}),n("cart.added")]}):n("cart.addToCart")}),l.jsx("div",{className:"mt-8 pt-8 border-t border-border",children:l.jsxs("p",{className:"text-sm text-muted-foreground",children:[n("cart.shipping"),": ",Yt(150)," (",n("cart.shippingNote"),")"]})})]})})]})})}),p.length>0&&l.jsx("section",{className:"section-spacing bg-warm-taupe",children:l.jsxs("div",{className:"container-gallery",children:[l.jsx(Z,{children:l.jsx("h2",{className:"heading-section text-center mb-12",children:n("store.interested")})}),l.jsx("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-8",children:p.map((x,g)=>l.jsx(Z,{delay:g*.1,children:l.jsxs(ge,{to:`/nettbutikk/${x.id}`,className:"group block",children:[l.jsx("div",{className:"gallery-image aspect-[4/5] mb-4 flex items-center justify-center bg-store-card p-4",children:l.jsx("img",{src:x.image,alt:vr(x,r),className:"max-w-full max-h-full object-contain"})}),l.jsx("h3",{className:"heading-card mb-1",children:vr(x,r)}),l.jsx("p",{className:"text-muted-foreground",children:Yt(x.price)})]})},x.id))})]})})]})}var Jf="Checkbox",[EQ,_J]=lo(Jf),[CQ,F0]=EQ(Jf);function SQ(t){const{__scopeCheckbox:e,checked:n,children:r,defaultChecked:s,disabled:i,form:o,name:a,onCheckedChange:c,required:u,value:d="on",internal_do_not_use_render:h}=t,[f,p]=rf({prop:n,defaultProp:s??!1,onChange:c,caller:Jf}),[x,g]=m.useState(null),[y,w]=m.useState(null),v=m.useRef(!1),b=x?!!o||!!x.closest("form"):!0,_={checked:f,disabled:i,setChecked:p,control:x,setControl:g,name:a,form:o,value:d,hasConsumerStoppedPropagationRef:v,required:u,defaultChecked:Js(s)?!1:s,isFormControl:b,bubbleInput:y,setBubbleInput:w};return l.jsx(CQ,{scope:e,..._,children:NQ(h)?h(_):r})}var NA="CheckboxTrigger",TA=m.forwardRef(({__scopeCheckbox:t,onKeyDown:e,onClick:n,...r},s)=>{const{control:i,value:o,disabled:a,checked:c,required:u,setControl:d,setChecked:h,hasConsumerStoppedPropagationRef:f,isFormControl:p,bubbleInput:x}=F0(NA,t),g=He(s,d),y=m.useRef(c);return m.useEffect(()=>{const w=i==null?void 0:i.form;if(w){const v=()=>h(y.current);return w.addEventListener("reset",v),()=>w.removeEventListener("reset",v)}},[i,h]),l.jsx(Ne.button,{type:"button",role:"checkbox","aria-checked":Js(c)?"mixed":c,"aria-required":u,"data-state":AA(c),"data-disabled":a?"":void 0,disabled:a,value:o,...r,ref:g,onKeyDown:xe(e,w=>{w.key==="Enter"&&w.preventDefault()}),onClick:xe(n,w=>{h(v=>Js(v)?!0:!v),x&&p&&(f.current=w.isPropagationStopped(),f.current||w.stopPropagation())})})});TA.displayName=NA;var U0=m.forwardRef((t,e)=>{const{__scopeCheckbox:n,name:r,checked:s,defaultChecked:i,required:o,disabled:a,value:c,onCheckedChange:u,form:d,...h}=t;return l.jsx(SQ,{__scopeCheckbox:n,checked:s,defaultChecked:i,disabled:a,required:o,onCheckedChange:u,name:r,form:d,value:c,internal_do_not_use_render:({isFormControl:f})=>l.jsxs(l.Fragment,{children:[l.jsx(TA,{...h,ref:e,__scopeCheckbox:n}),f&&l.jsx(RA,{__scopeCheckbox:n})]})})});U0.displayName=Jf;var IA="CheckboxIndicator",PA=m.forwardRef((t,e)=>{const{__scopeCheckbox:n,forceMount:r,...s}=t,i=F0(IA,n);return l.jsx(co,{present:r||Js(i.checked)||i.checked===!0,children:l.jsx(Ne.span,{"data-state":AA(i.checked),"data-disabled":i.disabled?"":void 0,...s,ref:e,style:{pointerEvents:"none",...t.style}})})});PA.displayName=IA;var jA="CheckboxBubbleInput",RA=m.forwardRef(({__scopeCheckbox:t,...e},n)=>{const{control:r,hasConsumerStoppedPropagationRef:s,checked:i,defaultChecked:o,required:a,disabled:c,name:u,value:d,form:h,bubbleInput:f,setBubbleInput:p}=F0(jA,t),x=He(n,p),g=dA(i),y=Wv(r);m.useEffect(()=>{const v=f;if(!v)return;const b=window.HTMLInputElement.prototype,k=Object.getOwnPropertyDescriptor(b,"checked").set,S=!s.current;if(g!==i&&k){const C=new Event("click",{bubbles:S});v.indeterminate=Js(i),k.call(v,Js(i)?!1:i),v.dispatchEvent(C)}},[f,g,i,s]);const w=m.useRef(Js(i)?!1:i);return l.jsx(Ne.input,{type:"checkbox","aria-hidden":!0,defaultChecked:o??w.current,required:a,disabled:c,name:u,value:d,form:h,...e,tabIndex:-1,ref:x,style:{...e.style,...y,position:"absolute",pointerEvents:"none",opacity:0,margin:0,transform:"translateX(-100%)"}})});RA.displayName=jA;function NQ(t){return typeof t=="function"}function Js(t){return t==="indeterminate"}function AA(t){return Js(t)?"indeterminate":t?"checked":"unchecked"}const B0=m.forwardRef(({className:t,...e},n)=>l.jsx(U0,{ref:n,className:Dt("peer h-5 w-5 shrink-0 border border-border bg-background ring-offset-background transition-all duration-200 hover:border-foreground data-[state=checked]:bg-foreground data-[state=checked]:border-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-foreground focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",t),...e,children:l.jsx(PA,{className:Dt("flex items-center justify-center text-background"),children:l.jsx(_a,{className:"h-4 w-4",strokeWidth:3})})}));B0.displayName=U0.displayName;function TQ(){const t=$a(),{t:e,language:n}=Mt(),{items:r,getCartTotal:s,clearCart:i}=zf(),[o,a]=m.useState(!1),[c,u]=m.useState(!1),[d,h]=m.useState({firstName:"",lastName:"",phone:"",email:"",emailRepeat:"",company:"",address:"",postalCode:"",postalAddress:"",country:"Norge",sameAddress:!0,comment:""}),f=r.reduce((g,y)=>g+y.product.price*y.quantity,0),p=g=>{const{name:y,value:w,type:v}=g.target,b=g.target.checked;h(_=>({..._,[y]:v==="checkbox"?b:w}))},x=async g=>{g.preventDefault(),a(!0),await new Promise(y=>setTimeout(y,1500)),a(!1),u(!0),i()};return r.length===0&&!c?l.jsx(Rt,{children:l.jsx("div",{className:"pt-32 md:pt-40 pb-20 md:pb-32",children:l.jsxs("div",{className:"container-gallery text-center",children:[l.jsx(J,{tKey:"cart.empty",as:"h1",className:"heading-hero mb-6"}),l.jsx(ge,{to:"/store",className:"btn-editorial",children:e("cart.continueShopping")})]})})}):c?l.jsx(Rt,{children:l.jsx("div",{className:"pt-32 md:pt-40 pb-20 md:pb-32",children:l.jsx("div",{className:"container-gallery text-center",children:l.jsxs(Z,{children:[l.jsx("div",{className:"w-16 h-16 bg-green-600 rounded-full flex items-center justify-center mx-auto mb-6",children:l.jsx(_a,{className:"w-8 h-8 text-white"})}),l.jsx(J,{tKey:"checkout.orderConfirmed",as:"h1",className:"heading-hero mb-4"}),l.jsx(J,{tKey:"checkout.orderConfirmedMessage",as:"p",className:"body-regular text-muted-foreground mb-8"}),l.jsx(ge,{to:"/store",className:"btn-editorial",children:e("cart.continueShopping")})]})})})}):l.jsxs(Rt,{children:[l.jsx("section",{className:"pt-28 md:pt-36 pb-8",children:l.jsx("div",{className:"container-gallery",children:l.jsxs("button",{onClick:()=>t(-1),className:"inline-flex items-center gap-2 text-muted-foreground hover:text-foreground transition-colors",children:[l.jsx(af,{className:"w-4 h-4"}),l.jsx("span",{className:"text-sm",children:e("product.backToShop")})]})})}),l.jsx("section",{className:"pb-20 md:pb-32",children:l.jsxs("div",{className:"container-gallery",children:[l.jsx(Z,{children:l.jsx(J,{tKey:"checkout.title",as:"h1",className:"heading-hero mb-12"})}),l.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-3 gap-12 lg:gap-16",children:[l.jsx("div",{className:"lg:col-span-2",children:l.jsxs("form",{onSubmit:x,className:"space-y-8",children:[l.jsx(Z,{delay:.1,children:l.jsxs("div",{className:"border border-border p-6",children:[l.jsx("h2",{className:"font-serif text-xl mb-4",children:e("checkout.freight")}),l.jsxs("p",{className:"text-muted-foreground",children:[e("checkout.shippingMethod"),": ",Yt(jy)]})]})}),l.jsx(Z,{delay:.15,children:l.jsxs("div",{className:"border border-border p-6",children:[l.jsx("h2",{className:"font-serif text-xl mb-4",children:e("checkout.payment")}),l.jsx("p",{className:"text-muted-foreground",children:e("checkout.invoice")})]})}),l.jsx(Z,{delay:.2,children:l.jsxs("div",{className:"border border-border p-6",children:[l.jsx("h2",{className:"font-serif text-xl mb-6",children:e("checkout.userInfo")}),l.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[l.jsxs("div",{children:[l.jsxs("label",{className:"block text-sm mb-2",children:[e("checkout.firstName")," *"]}),l.jsx("input",{type:"text",name:"firstName",value:d.firstName,onChange:p,required:!0,className:"w-full px-4 py-3 border border-border bg-background focus:outline-none focus:border-foreground transition-colors"})]}),l.jsxs("div",{children:[l.jsxs("label",{className:"block text-sm mb-2",children:[e("checkout.lastName")," *"]}),l.jsx("input",{type:"text",name:"lastName",value:d.lastName,onChange:p,required:!0,className:"w-full px-4 py-3 border border-border bg-background focus:outline-none focus:border-foreground transition-colors"})]}),l.jsxs("div",{children:[l.jsxs("label",{className:"block text-sm mb-2",children:[e("checkout.phone")," *"]}),l.jsx("input",{type:"tel",name:"phone",value:d.phone,onChange:p,required:!0,className:"w-full px-4 py-3 border border-border bg-background focus:outline-none focus:border-foreground transition-colors"})]}),l.jsxs("div",{className:"md:col-span-2",children:[l.jsxs("label",{className:"block text-sm mb-2",children:[e("checkout.email")," *"]}),l.jsx("input",{type:"email",name:"email",value:d.email,onChange:p,required:!0,className:"w-full px-4 py-3 border border-border bg-background focus:outline-none focus:border-foreground transition-colors"})]}),l.jsxs("div",{className:"md:col-span-2",children:[l.jsxs("label",{className:"block text-sm mb-2",children:[e("checkout.emailRepeat")," *"]}),l.jsx("input",{type:"email",name:"emailRepeat",value:d.emailRepeat,onChange:p,required:!0,className:"w-full px-4 py-3 border border-border bg-background focus:outline-none focus:border-foreground transition-colors"})]})]})]})}),l.jsx(Z,{delay:.25,children:l.jsxs("div",{className:"border border-border p-6",children:[l.jsx("h2",{className:"font-serif text-xl mb-6",children:e("checkout.billingAddress")}),l.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[l.jsxs("div",{className:"md:col-span-2",children:[l.jsx("label",{className:"block text-sm mb-2",children:e("checkout.company")}),l.jsx("input",{type:"text",name:"company",value:d.company,onChange:p,className:"w-full px-4 py-3 border border-border bg-background focus:outline-none focus:border-foreground transition-colors"})]}),l.jsxs("div",{className:"md:col-span-2",children:[l.jsxs("label",{className:"block text-sm mb-2",children:[e("checkout.address")," *"]}),l.jsx("input",{type:"text",name:"address",value:d.address,onChange:p,required:!0,className:"w-full px-4 py-3 border border-border bg-background focus:outline-none focus:border-foreground transition-colors"})]}),l.jsxs("div",{children:[l.jsxs("label",{className:"block text-sm mb-2",children:[e("checkout.postalCode")," *"]}),l.jsx("input",{type:"text",name:"postalCode",value:d.postalCode,onChange:p,required:!0,className:"w-full px-4 py-3 border border-border bg-background focus:outline-none focus:border-foreground transition-colors"})]}),l.jsxs("div",{children:[l.jsxs("label",{className:"block text-sm mb-2",children:[e("checkout.postalAddress")," *"]}),l.jsx("input",{type:"text",name:"postalAddress",value:d.postalAddress,onChange:p,required:!0,className:"w-full px-4 py-3 border border-border bg-background focus:outline-none focus:border-foreground transition-colors"})]}),l.jsxs("div",{className:"md:col-span-2",children:[l.jsxs("label",{className:"block text-sm mb-2",children:[e("checkout.country")," *"]}),l.jsxs("select",{name:"country",value:d.country,onChange:p,required:!0,className:"w-full px-4 py-3 border border-border bg-background focus:outline-none focus:border-foreground transition-colors",children:[l.jsx("option",{value:"Norge",children:"Norge"}),l.jsx("option",{value:"Sverige",children:"Sverige"}),l.jsx("option",{value:"Danmark",children:"Danmark"}),l.jsx("option",{value:"Finland",children:"Finland"})]})]}),l.jsx("div",{className:"md:col-span-2",children:l.jsxs("div",{className:"flex items-start gap-3",children:[l.jsx(B0,{id:"sameAddress",checked:d.sameAddress,onCheckedChange:g=>h(y=>({...y,sameAddress:g}))}),l.jsx("label",{htmlFor:"sameAddress",className:"text-sm leading-relaxed cursor-pointer select-none",children:e("checkout.sameAddress")})]})})]})]})}),l.jsx(Z,{delay:.3,children:l.jsxs("div",{className:"border border-border p-6",children:[l.jsx("h2",{className:"font-serif text-xl mb-6",children:e("checkout.moreInfo")}),l.jsxs("div",{children:[l.jsx("label",{className:"block text-sm mb-2",children:e("checkout.comment")}),l.jsx("textarea",{name:"comment",value:d.comment,onChange:p,rows:4,className:"w-full px-4 py-3 border border-border bg-background focus:outline-none focus:border-foreground transition-colors resize-none"})]})]})}),l.jsx(Z,{delay:.35,children:l.jsx("button",{type:"submit",disabled:o,className:"w-full py-4 bg-foreground text-background hover:bg-foreground
3602/90 transition-colors text-sm tracking-wide disabled:opacity-50",children:e(o?"checkout.processing":"checkout.sendOrder")})})]})}),l.jsx("div",{className:"lg:col-span-1",children:l.jsx(Z,{delay:.2,children:l.jsxs("div",{className:"border border-border p-6 lg:sticky lg:top-32",children:[l.jsx("h2",{className:"font-serif text-xl mb-6",children:e("checkout.reviewOrder")}),l.jsx("ul",{className:"space-y-4 mb-6",children:r.map(g=>l.jsxs("li",{className:"flex gap-4",children:[l.jsx("div",{className:"w-16 h-16 flex-shrink-0 overflow-hidden",children:l.jsx("img",{src:g.product.image,alt:vr(g.product,n),className:"w-full h-full object-cover"})}),l.jsxs("div",{className:"flex-1 min-w-0",children:[l.jsx("p",{className:"font-medium text-sm line-clamp-1",children:vr(g.product,n)}),l.jsxs("p",{className:"text-xs text-muted-foreground mt-1",children:[e("checkout.quantity"),": ",g.quantity]})]}),l.jsx("div",{className:"text-right",children:l.jsx("p",{className:"text-sm font-medium",children:Yt(g.product.price*g.quantity)})})]},g.product.id))}),l.jsxs("div",{className:"space-y-2 pt-4 border-t border-border",children:[l.jsxs("div",{className:"flex justify-between text-sm",children:[l.jsx("span",{className:"text-muted-foreground",children:e("cart.subtotal")}),l.jsx("span",{children:Yt(f)})]}),l.jsxs("div",{className:"flex justify-between text-sm",children:[l.jsx("span",{className:"text-muted-foreground",children:e("cart.shipping")}),l.jsx("span",{children:Yt(jy)})]}),l.jsxs("div",{className:"flex justify-between font-medium pt-2 border-t border-border",children:[l.jsx("span",{children:e("cart.total")}),l.jsx("span",{children:Yt(s())})]})]})]})})})]})]})})]})}const IQ="/assets/05-the-back-oKguGTtA.jpg",PQ="/assets/06-imitasjon-B4BIsz7p.jpg",jQ="/assets/09-frihet-w-9lz8eb.jpg",RQ="/assets/10-forlatt-BjNdqABS.jpg",AQ="/assets/11-forlatt-2-krYnX6TV.jpg",DQ="/assets/12-hvit-BsEhslDy.jpg",MQ="/assets/13-dora-CkoMWLis.jpg",OQ="/assets/14-the-longing-fPymejLk.jpg",LQ="/assets/15-guarding-kingdom-BWinKJXD.jpg",FQ="/assets/01-polfarer-C8ZQcSHv.jpg",UQ="/assets/04-portrett-dora-XL7hffAH.jpg",BQ="/assets/06-dora-MkGAMTul.jpg",VQ="/assets/08-portrett-pike-B8kzR6BT.jpg",$Q="/assets/09-dreamy-girl-72-BZDj9kL0.jpg",zQ="/assets/10-detail-CTc6xh3W.jpg",WQ="/assets/11-dreamy-girl-72-2-CC8-RW7Z.jpg",HQ="/assets/12-knut-w-aa-W8au0NKh.jpg",KQ="/assets/13-lars-peder-s-ChAeR9Zf.jpg",GQ="/assets/14-male-portrait-CNDc1wJs.jpg",qQ="/assets/15-dreamy-girl-header-Bt6EFY8B.jpg",YQ="/assets/16-dsc0300-CwBKNtmb.jpg",QQ="/assets/17-gjermundhjelmen-HuB0MGo5.jpg",XQ="/assets/01-solnedgang-storoya-CEIrFJrO.jpg",JQ="/assets/02-vinterkveld-BW7Dll_T.jpg",ZQ="/assets/03-knowledge-gives-CmSxiRx3.jpg",eX="/assets/04-vannliljer-C-v3blp1.jpg",tX="/assets/05-taken-letter-Cx8_lgbH.jpg",nX="/assets/06-vinteropplag-CIAtFR2W.jpg",rX="/assets/08-liatjodno-CQAKkHiP.jpg",sX="/assets/09-juveren-DuicsYQ7.jpg",iX="/assets/10-siggj
3602o-CiXAT9wz.jpg",oX="/assets/12-regatta-DbjWyD7J.jpg",aX="/assets/13-kveldsbad-skagen-B-nPnKdC.jpg",lX="/assets/14-hjartholmen-CjTCJPGM.jpg",cX="/assets/15-evening-field-CLxidIkw.jpg",uX="/assets/16-akrasanden-DSJYNvGy.jpg",dX="/assets/17-atelier-okland-Cdo-FtBj.jpg",hX="/assets/18-storoya-2-bIXhplku.jpg",fX="/assets/19-tailwind-DLiWpca_.jpg",pX="/assets/01-murstein-D7Pc_1j_.jpg",mX="/assets/02-mirroring-DnmgU5Hc.jpg",gX="/assets/03-murstein-x-9dtfwVr7.jpg",yX="/assets/04-malefille-DUgmAIfH.jpg",vX="/assets/05-egget-ECCQPEa9.jpg",xX="/assets/06-linolje-DBvBa86e.jpg",wX="/assets/07-krabbeklo-DbkLDcfb.jpg",bX="/assets/08-fiolin-BDDg1Fdn.jpg",_X="/assets/09-havrekjeks-FIdcxG5o.jpg",kX="/assets/10-camembert-Oq6ydidj.jpg",EX="/assets/13-caiano-DSXmmW5W.jpg",CX="/assets/14-albueskjell--Tq9HsUB.jpg",SX="/assets/15-oljeflasken-adE4JkyP.jpg",NX="/assets/16-daglige-brod-DV5FZASR.jpg",TX="/assets/01-forlatt-brun-COOpqkFV.jpg",IX="/assets/02-nybegynner-Co0fw4ln.jpg",PX="/assets/02-balanse-ix-BF3PE8hV.jpg",DA=["figur","portrett","landskap","stilleben"];function jX(t){return DA.includes(t)}function Eo(t,e){return e.map((n,r)=>({id:`${t}-${r}`,...n}))}const Nt={figur:{id:"figur",name:"Figur",nameEN:"Figure",images:Eo("figur",[{src:R0,alt:"Flammen",title:"Flammen",titleEN:"Flammen"},{src:eA,alt:"Balanse I",title:"Balanse I",titleEN:"Balanse I"},{src:aA,alt:"Balanse II",title:"Balanse II",titleEN:"Balanse II"},{src:IQ,alt:"Ryggen",title:"Ryggen",titleEN:"Ryggen"},{src:PQ,alt:"Imitasjon",title:"Imitasjon",titleEN:"Imitasjon"},{src:wR,alt:"Tankefull",title:"Tankefull",titleEN:"Tankefull"},{src:jQ,alt:"Frihet",title:"Frihet",titleEN:"Frihet"},{src:RQ,alt:"Forlatt",title:"Forlatt",titleEN:"Forlatt"},{src:AQ,alt:"Forlatt",title:"Forlatt",titleEN:"Forlatt"},{src:DQ,alt:"Forlatt",title:"Forlatt",titleEN:"Forlatt"},{src:MQ,alt:"Dora",title:"Dora",titleEN:"Dora"},{src:OQ,alt:"Lengselen er sterkere enn smerten",title:"Lengselen er sterkere enn smerten",titleEN:"Lengselen er sterkere enn smerten"},{src:LQ,alt:"Vokter sitt rike",title:"Vokter sitt rike",titleEN:"Vokter sitt rike"},{src:xR,alt:"Hvile",title:"Hvile",titleEN:"Hvile"},{src:yR,alt:"I kraft av håret",title:"I kraft av håret",titleEN:"I kraft av håret"},{src:vR,alt:"Akt med klede",title:"Akt med klede",titleEN:"Akt med klede"}])},portrett:{id:"portrett",name:"Portrett",nameEN:"Portrait",images:Eo("portrett",[{src:FQ,alt:"Polfarer",title:"Polfarer",titleEN:"Polar Explorer"},{src:nA,alt:"Dreamy Girl",title:"Drømmende pike",titleEN:"Dreamy Girl"},{src:tA,alt:"Selvportrett",title:"Selvportrett",titleEN:"Self-Portrait"},{src:UQ,alt:"Portrett Dora",title:"Portrett Dora",titleEN:"Portrait of Dora"},{src:iA,alt:"Shipowner",title:"Rederen",titleEN:"The Shipowner"},{src:BQ,alt:"Dora",title:"Dora",titleEN:"Dora"},{src:bR,alt:"Væren",title:"Væren",titleEN:"The Ram"},{src:VQ,alt:"Portrett Pike",title:"Portrett Pike",titleEN:"Portrait of a Girl"},{src:$Q,alt:"Dreamy Girl",title:"Drømmende pike",titleEN:"Dreamy Girl"},{src:zQ,alt:"Detail",title:"Detalj",titleEN:"Detail"},{src:WQ,alt:"Dreamy Girl",title:"Drømmende pike",titleEN:"Dreamy Girl"},{src:HQ,alt:"Knut W. Aa",title:"Knut W. Aa",titleEN:"Knut W. Aa"},{src:KQ,alt:"Lars Peder S.",title:"Lars Peder S.",titleEN:"Lars Peder S."},{src:GQ,alt:"Male Portrait",title:"Mannsportrett",titleEN:"Male Portrait"},{src:qQ,alt:"Dreamy Girl",title:"Drømmende pike",titleEN:"Dreamy Girl"},{src:YQ,alt:"Portrett",title:"Portrett",titleEN:"Portrett"}])},landskap:{id:"landskap",name:"Landskap",nameEN:"Landscape",images:Eo("landskap",[{src:XQ,alt:"Solnedgang ved Storøya",title:"Solnedgang ved Storøya",titleEN:"Sunset at Storøya"},{src:JQ,alt:"Vinterkveld",title:"Vinterkveld",titleEN:"Winter Evening"},{src:ZQ,alt:"Knowledge Gives",title:"Kunnskap gir",titleEN:"Knowledge Gives"},{src:eX,alt:"Vannliljer",title:"Vannliljer",titleEN:"Water Lilies"},{src:tX,alt:"Tåken Letter",title:"Tåken letter",titleEN:"The Fog Lifts"},{src:nX,alt:"Vinteropplag",title:"Vinteropplag",titleEN:"Winter Storage"},{src:oA,alt:"Solnedgang ved Notholmen",title:"Solnedgang ved Notholmen",titleEN:"Sunset at Notholmen"},{src:rX,alt:"Liatjødno",title:"Liatjødno",titleEN:"Liatjødno"},{src:sX,alt:"Juveren, Ringeriket",title:"Juveren, Ringeriket",titleEN:"Juveren, Ringerike"},{src:iX,alt:"Siggjo",title:"Siggjo",titleEN:"Siggjo"},{src:rA,alt:"Solastranden",title:"Solastranden",titleEN:"Sola Beach"},{src:oX,alt:"Regatta",title:"Regatta",titleEN:"Regatta"},{src:aX,alt:"Kveldsbad ved Skagen",title:"Kveldsbad ved Skagen",titleEN:"Evening Swim at Skagen"},{src:lX,alt:"Hjartholmen",title:"Hjartholmen",titleEN:"Hjartholmen"},{src:cX,alt:"Evening on the Field",title:"Kveld på jordet",titleEN:"Evening on the Field"}
3602,{src:uX,alt:"Ã
krasanden",title:"Ã
krasanden",titleEN:"Ã
krasanden"},{src:dX,alt:"Atelier Ãkland",title:"Atelier Ãkland",titleEN:"Studio Ãkland"},{src:hX,alt:"Storøya",title:"Storøya",titleEN:"Storøya"},{src:fX,alt:"Tailwind",title:"Medvind",titleEN:"Tailwind"}])},stilleben:{id:"stilleben",name:"Stilleben",nameEN:"Still Life",images:Eo("stilleben",[{src:pX,alt:"Murstein",title:"Murstein",titleEN:"Brick"},{src:mX,alt:"Mirroring",title:"Speiling",titleEN:"Mirroring"},{src:gX,alt:"Murstein",title:"Murstein",titleEN:"Brick"},{src:yX,alt:"Malefille",title:"Malefille",titleEN:"Paint Rag"},{src:vX,alt:"Egget",title:"Egget",titleEN:"The Egg"},{src:xX,alt:"Linolje",title:"Linolje",titleEN:"Linseed Oil"},{src:wX,alt:"Krabbeklo",title:"Krabbeklo",titleEN:"Crab Claw"},{src:bX,alt:"Fiolin pÃ¥ Bordlien",title:"Fiolin pÃ¥ Bordlien",titleEN:"Violin on Bordlien"},{src:_X,alt:"Havrekjeks",title:"Havrekjeks",titleEN:"Oat Biscuit"},{src:kX,alt:"Camembert",title:"Camembert",titleEN:"Camembert"},{src:sA,alt:"Espresso i Box",title:"Espresso i Box",titleEN:"Espresso in a Box"},{src:gR,alt:"Ã
rgang 2003",title:"Ã
rgang 2003",titleEN:"Vintage 2003"},{src:EX,alt:"Caiano",title:"Caiano",titleEN:"Caiano"},{src:CX,alt:"Albueskjell",title:"Albueskjell",titleEN:"Limpet"},{src:SX,alt:"Oljeflasken",title:"Oljeflasken",titleEN:"The Oil Bottle"},{src:NX,alt:"Daglige Brød",title:"Daglige Brød",titleEN:"Daily Bread"},{src:QQ,alt:"Gjermund Bu Hjelmen",title:"Gjermund Bu Hjelmen",titleEN:"Gjermund Bu Hjelmen"}])},"alle-bilder":{id:"alle-bilder",name:"Alle bilder",nameEN:"All Photos",images:[]},litografi:{id:"litografi",name:"Litografi",nameEN:"Lithography",images:Eo("litografi",[{src:TX,alt:"Forlatt",title:"Forlatt",titleEN:"Abandoned"},{src:IX,alt:"Nybegynner",title:"Nybegynner",titleEN:"Beginner"}])},giclee:{id:"giclee",name:"Giclée-trykk",nameEN:"Giclée Print",images:Eo("giclee",[{src:mR,alt:"Balanse I",title:"Balanse I",titleEN:"Balance I"},{src:PX,alt:"Balanse IX",title:"Balanse IX",titleEN:"Balance IX"}])}},RX=Nt.figur.images[2],AX=Nt.portrett.images[2],DX=Nt.figur.images.filter((t,e)=>e!==2),MX=Nt.portrett.images.filter((t,e)=>e!==2),OX=[RX,AX,...DX,...MX,...Nt.landskap.images,...Nt.stilleben.images,...Nt.litografi.images,...Nt.giclee.images];Nt["alle-bilder"].images=OX;function LX(t,e){return e==="EN"&&t.titleEN||t.title}function MA(t){return`gallery.categories.${t}.title`}function OA(t){return`gallery.images.${t}.title`}function FX(t){return`gallery.images.${t}.info`}function Di(t,e,n){var s;const r=(s=n==null?void 0:n[e])==null?void 0:s[MA(t.id)];return r!==void 0&&r!==""?r:e==="EN"?t.nameEN:t.name}function Xl(t,e,n){var s;const r=(s=n==null?void 0:n[e])==null?void 0:s[OA(t.id)];return r!==void 0&&r!==""?r:LX(t,e)}function LA(t,e,n){var s;const r=(s=n==null?void 0:n[e])==null?void 0:s[FX(t.id)];return r!==void 0&&r!==""?r:e==="EN"?t.titleEN||t.alt||t.title||"":t.alt||t.title||""}function Vk(t){return{id:t.id||t.name,src:t.image,alt:t.name,title:t.name,titleEN:t.nameEN}}function V0(t,e={}){const n={};for(const o of DA){const a=Nt[o].images.map((u,d)=>{const h=e[u.id];return h!=null&&h.deleted?null:{...u,src:(h==null?void 0:h.imageUrl)||u.src,alt:(h==null?void 0:h.alt)||u.alt,title:(h==null?void 0:h.title)||u.title,titleEN:(h==null?void 0:h.titleEN)||u.titleEN,order:(h==null?void 0:h.order)??d}}).filter(u=>u!==null),c=Object.values(e).filter(u=>u.isCustom&&!u.deleted&&u.categoryId===o&&u.imageUrl).map((u,d)=>({id:u.id,src:u.imageUrl,alt:u.alt||u.title||Nt[o].name,title:u.title,titleEN:u.titleEN||u.title,order:u.order??Nt[o].images.length+d}));n[o]={...Nt[o],images:[...a,...c].sort((u,d)=>(u.order??0)-(d.order??0))}}n.giclee={...Nt.giclee,images:t.filter(o=>o.category==="giclee").map(Vk)},n.litografi={...Nt.litografi,images:t.filter(o=>o.category==="lithograph").map(Vk)};const r=new Set,s=[],i=o=>{for(const a of o)r.has(a.src)||(r.add(a.src),s.push(a))};return i(n.figur.images),i(n.portrett.images),i(n.landskap.images),i(n.stilleben.images),i(n.giclee.images),i(n.litografi.images),n["alle-bilder"]={...Nt["alle-bilder"],images:s},n}const UX="/assets/figur-AtUy78Ql.jpg",BX="/assets/portrett-DpKuy2kQ.jpg",VX="/assets/landskap-DSspepuf.jpg",$X="/assets/stilleben-D6CFXwCy.jpg",zX="/assets/alle-bilder-DHWBKZ5O.jpg",WX="/assets/litografi-D01N8A_R.jpg",HX="/assets/giclee-Hp8u-sva.jpg",FA="/assets/hero-2-DaoJqjwd.jpg",$k=[{id:"figur",name:"Figur",nameEN:"Figure",image:UX,path:"/gallerier/figur"},{id:"portrett",name:"Portrett",nameEN:"Portrait",image:BX,path:"/gallerier/portrett"},{id:"landskap",name:"Landskap",nameEN:"Landscape",image:VX,path:"/gallerier/landskap"},{id:"stilleben",name:"Stilleben",nameEN:"Still Life",image:$X,path:"/gallerier/stilleben"},{id:"alle-bilder",name:"Alle bilder",nameEN:"All Photos",image:zX,path:"/gallerier/alle-bilder"}
3602,{id:"litografi",name:"Litografi",nameEN:"Lithography",image:WX,path:"/gallerier/litografi"},{id:"giclee",name:"Giclée-trykk",nameEN:"Giclée Print",image:HX,path:"/gallerier/giclee"}];function KX(){const{t,language:e}=Mt(),{customProducts:n,productOverrides:r,textOverrides:s,galleryImageOverrides:i}=vt(),o=m.useMemo(()=>{const c=Xs.map(d=>{const h=r[d.id];return h?h.deleted?null:{...d,name:h.name||d.name,nameEN:h.name||d.nameEN,image:h.imageRemoved?gt:jt(h.imageUrl)?h.imageUrl:d.image,category:h.category||d.category}:d}).filter(d=>d!==null),u=n.filter(d=>!d.deleted).map(d=>({id:d.id,name:d.name,nameEN:d.name,price:d.price,image:d.imageRemoved?gt:jt(d.imageUrl)?d.imageUrl:gt,category:d.category}));return[...c,...u]},[n,r]),a=m.useMemo(()=>V0(o,i),[o,i]);return l.jsxs(Rt,{hasHero:!0,children:[l.jsxs("section",{className:"relative h-[50vh] min-h-[400px] w-full overflow-hidden",children:[l.jsxs("div",{className:"absolute inset-0",children:[l.jsx(cu,{imageKey:"galleries-hero-image",src:FA,alt:"Gallery banner",className:"h-full w-full"}),l.jsx("div",{className:"absolute inset-0 bg-overlay/50 pointer-events-none"})]}),l.jsx("div",{className:"absolute inset-0 z-20 flex items-center justify-center pointer-events-none",children:l.jsxs("div",{className:"container-gallery text-center",children:[l.jsx(oe.div,{initial:{opacity:0,y:30},animate:{opacity:1,y:0},transition:{duration:.8,delay:.3},className:"heading-hero hero-text mb-6 pointer-events-auto",children:l.jsx(J,{tKey:"gallery.title",as:"h1"})}),l.jsx(oe.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.8,delay:.5},className:"body-large hero-text max-w-xl mx-auto opacity-90 pointer-events-auto",children:l.jsx(J,{tKey:"gallery.pageDescription",as:"p"})})]})})]}),l.jsx("section",{className:"pt-16 md:pt-24 pb-4",children:l.jsx("div",{className:"container-gallery",children:l.jsx(Z,{children:l.jsx("span",{className:"text-xs tracking-[0.25em] uppercase text-muted-foreground block",children:t("gallery.exploreCategories")})})})}),l.jsx("section",{className:"pb-8 md:pb-12",children:l.jsx("div",{className:"container-gallery",children:$k.slice(0,4).map((c,u)=>{var f;const d=((f=a[c.id])==null?void 0:f.images.length)||0,h=u%2!==0;return l.jsx(Z,{delay:u*.05,children:l.jsxs(ge,{to:c.path,className:"group grid grid-cols-1 md:grid-cols-2 gap-6 md:gap-10 items-center py-8 md:py-12 border-b border-border",children:[l.jsx("div",{className:`gallery-image aspect-[3/2] overflow-hidden ${h?"md:order-2":""}`,children:l.jsx("img",{src:c.image,alt:Di(c,e,s),className:"w-full h-full object-cover transition-transform duration-700 group-hover:scale-105",loading:"lazy"})}),l.jsxs("div",{className:`${h?"md:order-1 md:text-right":""}`,children:[l.jsx("h2",{className:"heading-section mb-3 group-hover:text-muted-foreground transition-colors duration-300",children:Di(c,e,s)}),d>0&&l.jsxs("p",{className:"text-sm text-muted-foreground mb-6",children:[d," ",t("gallery.artworks")]}),l.jsxs("span",{className:`inline-flex items-center gap-3 text-sm tracking-wide text-muted-foreground group-hover:text-foreground group-hover:gap-5 transition-all duration-300 ${h?"md:flex-row-reverse":""}`,children:[t("gallery.viewAll"),l.jsx(_n,{className:`w-4 h-4 ${h?"md:rotate-180":""}`})]})]})]})},c.id)})})}),l.jsx(ui,{colorKey:"gallery-dark-bg",className:"bg-gallery-dark py-16 md:py-24",children:l.jsx("div",{className:"container-gallery",children:l.jsx("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-6 md:gap-8",children:$k.slice(4).map((c,u)=>{var h;const d=((h=a[c.id])==null?void 0:h.images.length)||0;return l.jsx(Z,{delay:u*.1,children:l.jsxs(ge,{to:c.path,className:"group block",children:[l.jsx("div",{className:"gallery-image aspect-[4/3] overflow-hidden mb-5",children:l.jsx("img",{src:c.image,alt:Di(c,e,s),className:"w-full h-full object-cover transition-transform duration-700 group-hover:scale-105",loading:"lazy"})}),l.jsxs("div",{className:"flex items-end justify-between",children:[l.jsxs("div",{children:[l.jsx("h3",{className:"text-lg font-medium mb-1 group-hover:text-muted-foreground transition-colors duration-300",style:{fontFamily:"'Playfair Display', serif"},children:Di(c,e,s)}),d>0&&l.jsxs("p",{className:"text-xs text-muted-foreground",children:[d," ",t("gallery.artworks")]})]}),l.jsx(_n,{className:"w-4 h-4 text-muted-foreground opacity-0 group-hover:opacity-100 group-hover:translate-x-1 transition-all duration-300"})]})]})},c.id)})})})})]})}function UA({images:t,currentIndex:e,isOpen:n,onClose:r,onNext:s,onPrev:i}){const o=m.useCallback(c=>{c.key==="Escape"&&r(),c.key==="ArrowRight"&&s(),c.key==="ArrowLeft"&&i()},[r,s,i]);m.useEffect(()=>
3602(n&&(document.body.style.overflow="hidden",window.addEventListener("keydown",o)),()=>{document.body.style.overflow="",window.removeEventListener("keydown",o)}),[n,o]);const a=t[e];return l.jsx(Xi,{children:n&&a&&l.jsxs(oe.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:{duration:.3},className:"fixed inset-0 z-[100] bg-overlay/95 flex items-center justify-center",onClick:r,children:[l.jsx("button",{onClick:r,className:"absolute top-6 right-6 p-2 text-hero-text/80 hover:text-hero-text transition-colors z-10","aria-label":"Lukk",children:l.jsx(In,{className:"w-6 h-6"})}),t.length>1&&l.jsx("button",{onClick:c=>{c.stopPropagation(),i()},className:"absolute left-4 md:left-8 p-2 text-hero-text/60 hover:text-hero-text transition-colors z-10","aria-label":"Forrige",children:l.jsx(_O,{className:"w-8 h-8"})}),l.jsxs(oe.div,{initial:{opacity:0,scale:.95},animate:{opacity:1,scale:1},exit:{opacity:0,scale:.95},transition:{duration:.3},className:"max-w-[90vw] max-h-[85vh] flex flex-col items-center",onClick:c=>c.stopPropagation(),children:[l.jsx("img",{src:a.src,alt:a.alt,className:"max-w-full max-h-[75vh] object-contain"}),a.title&&l.jsx(oe.p,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},transition:{delay:.2},className:"mt-6 text-hero-text/80 font-serif text-lg",children:a.title})]},e),t.length>1&&l.jsx("button",{onClick:c=>{c.stopPropagation(),s()},className:"absolute right-4 md:right-8 p-2 text-hero-text/60 hover:text-hero-text transition-colors z-10","aria-label":"Neste",children:l.jsx(kO,{className:"w-8 h-8"})}),t.length>1&&l.jsxs("div",{className:"absolute bottom-6 left-1/2 -translate-x-1/2 text-hero-text/60 text-sm",children:[e+1," / ",t.length]})]})})}function GX({open:t,onClose:e,categoryId:n,image:r,nextOrder:s,onSave:i}){const{uploadGalleryImage:o,deleteStorageFile:a}=vt(),c=!r,u=m.useRef(null),d=m.useRef(`gallery-image-${Date.now()}`),h=m.useRef(""),[f,p]=m.useState(""),[x,g]=m.useState(""),[y,w]=m.useState(""),[v,b]=m.useState(""),[_,k]=m.useState(""),[S,C]=m.useState(!1),[N,P]=m.useState(!1),[j,O]=m.useState("");m.useEffect(()=>{if(!t)return;const M=(r==null?void 0:r.title)||"",R=(r==null?void 0:r.titleEN)||(r==null?void 0:r.title)||"",E=(r==null?void 0:r.alt)||(r==null?void 0:r.title)||"",T=r!=null&&r.src&&jt(r.src)?r.src:"";p(M),g(R),w(E),b((r==null?void 0:r.src)||""),k(T),C(!1),P(!1),O(""),h.current=T,r||(d.current=`gallery-image-${Date.now()}`)},[r,t]);const L=(r==null?void 0:r.id)??d.current,K=async M=>{P(!0),O("");try{const R=await o(L,M);b(R),k(R)}catch(R){console.error("Gallery image upload failed:",R),O((R==null?void 0:R.message)||"Upload failed.")}finally{P(!1)}},U=()=>{c||!r||(b(r.src),k(""),O(""))},A=async()=>{if(!r&&!_){O("Last opp et bilde for nye verk.");return}C(!0);try{const M=f.trim(),R=x.trim()||M,E=y.trim()||M||R;await i({id:L,categoryId:(r==null?void 0:r.categoryId)||n,imageUrl:_||void 0,title:M||void 0,titleEN:R||void 0,alt:E||void 0,order:(r==null?void 0:r.order)??s,isCustom:(r==null?void 0:r.isCustom)??!0,deleted:!1});const T=h.current;T&&T!==_&&await a(T),e()}finally{C(!1)}};return l.jsx(O0,{open:t,onOpenChange:M=>!M&&e(),children:l.jsxs(Kf,{className:"max-w-2xl overflow-y-auto",children:[l.jsxs(Gf,{children:[l.jsx(Yf,{children:c?"Legg til bilde":"Rediger bilde"}),l.jsx(Qf,{children:"Last opp et nytt verkbilde eller bytt ut det som allerede ligger i galleriet."})]}),l.jsxs("div",{className:"grid gap-6 md:grid-cols-[minmax(0,1.15fr)_minmax(18rem,0.85fr)]",children:[l.jsxs("div",{className:"space-y-3",children:[l.jsx("div",{className:"aspect-[4/5] overflow-hidden rounded-2xl border border-border bg-muted/40",children:v?l.jsx("img",{src:v,alt:y||f||"Forhåndsvisning",className:"h-full w-full object-cover"}):l.jsx("div",{className:"flex h-full items-center justify-center px-6 text-center text-sm text-muted-foreground",children:"Last opp et bilde for å se forhåndsvisning."})}),l.jsx("input",{ref:u,type:"file",accept:"image/*",className:"hidden",onChange:M=>{var E;const R=(E=M.target.files)==null?void 0:E[0];R&&K(R)}}),l.jsxs("div",{className:"flex flex-wrap gap-2",children:[l.jsxs("button",{type:"button",onClick:()=>{var M;return(M=u.current)==null?void 0:M.click()},disabled:N||S,className:"inline-flex items-center gap-2 rounded-full border border-border bg-background px-4 py-2 text-sm font-medium text-foreground transition-colors hover:bg-muted disabled:cursor-not-allowed disabled:opacity-60",children:[N?l.jsx(Tr,{className:"h-4 w-4 animate-spin"}):l.jsx(Ma,{className:"h-4 w-4"}),N?"Laster opp...":"Bytt bilde"]}),!c&&_&&l.jsxs("button",{type:"button",onClick:U,disabled:N||S,className:"inline-flex items-center gap-2 rounded-full border border-border bg-background px-4 py-2 text-sm font-medium text-foreground transition-colors hover:bg-muted disabled:cursor-not-allowed disabled:opacity-60",children:[l.jsx(Qo,{className:"h-4 w-4"}),"Bruk originalt"]}),v&&l.jsxs("button",{type:"button",onClick:()=>{b(""),k(""),O("")},disabled:N||S||!c&&!_,className:"inline-flex items-center gap-2 rounded-full border border-red-200 bg-red-50 px-4 py-2 text-sm font-medium text-red-700 transition-colors hover:bg-red-100 disabled:cursor-not-allowed disabled:opacity-60",children:[l.jsx(pi,{className:"h-4 w-4"}),"Fjern opplastet"]})]}),j?l.jsx("p",{className:"text-xs text-red-600",children:j}):null]}),l.jsxs("div",{className:"space-y-4",children:[l.jsxs("div",{children:[l.jsx("label",{className:"mb-1 block text-sm font-medium",children:"Navn"}),l.jsx("input",{type:"text",value:f,onChange:M=>p(M.target.value),placeholder:"Navn på verket",className:"w-full rounded-xl border border-border bg-background px-3 py-2 text-sm text-foreground"})]}),l.jsxs("div",{children:[l.jsx("label",{className:"mb-1 block text-sm font-medium",children:"Navn på engelsk"}),l.jsx("input",{type:"text",value:x,onChange:M=>g(M.target.value),placeholder:"Brukes i engelsk språkmodus",className:"w-full rounded-xl border border-border bg-background px-3 py-2 text-sm text-foreground"})]}),l.jsxs("div",{children:[l.jsx("label",{className:"mb-1 block text-sm font-medium",children:"Alternativ tekst"}),l.jsx("textarea",{value:y,onChange:M=>w(M.target.value),rows:4,placeholder:"Kort beskrivelse av motivet",className:"w-full resize-y rounded-xl border border-border bg-background px-3 py-2 text-sm text-foreground"})]}),l.jsx("p",{className:"rounded-2xl bg-muted/50 px-4 py-3 text-xs leading-relaxed text-muted-foreground",children:"Bildet vises i denne underkategorien og blir automatisk tatt med i «Alle bilder»."})]})]}),l.jsxs(qf,{children:[l.jsx("button",{type:"button",onClick:e,className:"rounded-full border border-border px-4 py-2 text-sm font-medium transition-colors hover:bg-muted",children:"Avbryt"}),l.jsx("button",{type:"button",onClick:A,disabled:S||N||!v&&c,className:"rounded-full bg-foreground px-4 py-2 text-sm font-medium text-background transition-opacity hover:opacity-90 disabled:cursor-not-allowed disabled:opacity-60",children:S?"
3602Lagrer...":"Lagre bilde"})]})]})})}function qX(){const{categoryId:t}=mf(),{language:e,t:n}=Mt(),{customProducts:r,productOverrides:s,textOverrides:i,isEditMode:o,galleryImageOverrides:a,saveGalleryImage:c,deleteStorageFile:u}=vt(),[d,h]=m.useState(!1),[f,p]=m.useState(0),[x,g]=m.useState(!1),[y,w]=m.useState(null),v=m.useMemo(()=>{const E=Xs.map(I=>{const H=s[I.id];return H?H.deleted?null:{...I,name:H.name||I.name,nameEN:H.name||I.nameEN,image:H.imageRemoved?gt:jt(H.imageUrl)?H.imageUrl:I.image,category:H.category||I.category}:I}).filter(I=>I!==null),T=r.filter(I=>!I.deleted).map(I=>({id:I.id,name:I.name,nameEN:I.name,price:I.price,image:I.imageRemoved?gt:jt(I.imageUrl)?I.imageUrl:gt,category:I.category}));return[...E,...T]},[r,s]),b=m.useMemo(()=>V0(v,a),[v,a]),_=t?b[t]:null;if(!_)return l.jsx(ur,{to:"/gallerier",replace:!0});const k=Di(_,e,i),S=e==="EN"?_.nameEN:_.name,C=jX(_.id),N=m.useMemo(()=>_.images.map(E=>{var T;return{...E,displayTitle:Xl(E,e,i),displayInfo:LA(E,e,i),isCustom:!!((T=a[E.id])!=null&&T.isCustom)}}),[_.images,a,e,i]),P=m.useMemo(()=>N.reduce((E,T)=>Math.max(E,T.order??0),-1)+1,[N]),j=E=>{p(E),h(!0)},O=()=>{h(!1)},L=()=>{p(E=>E===0?_.images.length-1:E-1)},K=()=>{p(E=>E===_.images.length-1?0:E+1)},U=E=>{w(E),g(!0)},A=()=>{g(!1),w(null)},M=async E=>{await c(E)},R=async E=>{if(!confirm("Fjern dette bildet fra galleriet?"))return;const T=a[E.id],I=(T==null?void 0:T.imageUrl)||(E.isCustom&&jt(E.src)?E.src:"");await c({id:E.id,categoryId:_.id,imageUrl:T==null?void 0:T.imageUrl,title:(T==null?void 0:T.title)??E.title,titleEN:(T==null?void 0:T.titleEN)??E.titleEN,alt:(T==null?void 0:T.alt)??E.alt,order:(T==null?void 0:T.order)??E.order,isCustom:(T==null?void 0:T.isCustom)??E.isCustom,deleted:!0}),I&&await u(I)};return l.jsxs(Rt,{children:[l.jsx("section",{className:"pt-32 md:pt-40 pb-12 bg-warm-cream",children:l.jsxs("div",{className:"container-gallery",children:[l.jsx(Z,{children:l.jsxs(ge,{to:"/gallerier",className:"inline-flex items-center gap-2 text-muted-foreground hover:text-foreground transition-colors mb-8",children:[l.jsx(af,{className:"w-4 h-4"}),l.jsx("span",{className:"text-sm",children:n("gallery.backToGalleries")})]})}),l.jsx(Z,{delay:.1,children:l.jsxs("div",{className:"flex flex-col gap-4 md:flex-row md:items-end md:justify-between",children:[l.jsxs("div",{children:[l.jsx(J,{tKey:MA(_.id),fallbackText:S,as:"h1",className:"heading-section"}),N.length>0&&l.jsxs("p",{className:"body-regular text-muted-foreground mt-4",children:[N.length," ",n("gallery.artworks")]})]}),o&&C?l.jsxs("button",{type:"button",onClick:()=>U(null),className:"inline-flex items-center gap-2 self-start rounded-full border border-border bg-background px-4 py-2 text-sm font-medium text-foreground transition-colors hover:bg-muted",children:[l.jsx(NO,{className:"h-4 w-4"}),"Legg til bilde"]}):null]})})]})}),l.jsx(ui,{colorKey:"gallery-detail-bg",className:"section-spacing bg-gallery-detail",children:l.jsx("div",{className:"container-gallery",children:N.length>0?l.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-6 md:gap-8",children:N.map((E,T)=>l.jsx(Z,{delay:T*.05,children:l.jsxs(oe.div,{onClick:()=>j(T),onKeyDown:I=>{I.target===I.currentTarget&&(I.key==="Enter"||I.key===" ")&&(I.preventDefault(),j(T))},className:"group block w-full text-left",role:"button",tabIndex:0,whileHover:{scale:1.02},transition:{duration:.3},children:[l.jsxs("div",{className:"gallery-image relative mb-4 aspect-[4/5] overflow-hidden",children:[l.jsx("img",{src:E.src,alt:E.displayInfo||E.displayTitle||k,className:"w-full h-full object-cover transition-transform duration-500 group-hover:scale-105",loading:"lazy"}),o&&C?l.jsxs("div",{className:"absolute inset-x-3 top-3 z-20 flex items-center justify-between gap-2","data-admin-ui":!0,children:[l.jsx("div",{className:"rounded-full bg-black/65 px-3 py-1 text-[11px] font-medium tracking-[0.24em] text-white/90 backdrop-blur-sm",children:E.isCustom?"EGET BILDE":"GALLERI"}),l.jsxs("div",{className:"flex gap-2",children:[l.jsxs("button",{type:"button",onClick:I=>{I.preventDefault(),I.stopPropagation(),U({id:E.id,categoryId:_.id,src:E.src,title:E.title,titleEN:E.titleEN,alt:E.alt,order:E.order??T,isCustom:E.isCustom})},className:"inline-flex items-center gap-2 rounded-full bg-white/92 px-3 py-2 text-xs font-medium text-foreground shadow-sm transition-colors hover:bg-white",children:[l.jsx(Gc,{
3602className:"h-3.5 w-3.5"}),"Rediger bilde"]}),l.jsxs("button",{type:"button",onClick:I=>{I.preventDefault(),I.stopPropagation(),R({id:E.id,categoryId:_.id,src:E.src,title:E.title,titleEN:E.titleEN,alt:E.alt,order:E.order??T,isCustom:E.isCustom})},className:"inline-flex items-center gap-2 rounded-full bg-red-600/92 px-3 py-2 text-xs font-medium text-white shadow-sm transition-colors hover:bg-red-600",children:[l.jsx(pi,{className:"h-3.5 w-3.5"}),"Fjern"]})]})]}):null]}),E.displayTitle&&l.jsx(J,{tKey:OA(E.id),fallbackText:Xl(E,e),as:"h3",className:"text-sm font-medium text-center text-foreground"})]})},E.id))}):l.jsx(Z,{children:l.jsx("div",{className:"text-center py-20",children:l.jsx("p",{className:"body-large text-muted-foreground",children:n("gallery.comingSoon")})})})})}),l.jsx(UA,{images:N.map(E=>({...E,alt:E.displayInfo||E.displayTitle||k,title:E.displayTitle})),currentIndex:f,isOpen:d,onClose:O,onPrev:L,onNext:K}),C?l.jsx(GX,{open:x,onClose:A,categoryId:_.id,image:y,nextOrder:P,onSave:M}):null]})}function YX(){const[t]=MF(),e=t.get("q")||"",{language:n,t:r}=Mt(),{customProducts:s,productOverrides:i,textOverrides:o,galleryImageOverrides:a}=vt(),[c,u]=m.useState(!1),[d,h]=m.useState(0),f=n==="EN",p=m.useMemo(()=>{const _=Xs.map(S=>{const C=i[S.id];return C?C.deleted?null:{...S,name:C.name||S.name,nameEN:C.name||S.nameEN,image:C.imageRemoved?gt:jt(C.imageUrl)?C.imageUrl:S.image,category:C.category||S.category}:S}).filter(S=>S!==null),k=s.filter(S=>!S.deleted).map(S=>({id:S.id,name:S.name,nameEN:S.name,price:S.price,image:S.imageRemoved?gt:jt(S.imageUrl)?S.imageUrl:gt,category:S.category}));return[..._,...k]},[s,i]),x=m.useMemo(()=>V0(p,a),[p,a]),g=m.useMemo(()=>{if(!e.trim())return[];const _=e.toLowerCase(),k=[];return Object.entries(x).forEach(([S,C])=>{S!=="alle-bilder"&&C.images.forEach(N=>{const P=Xl(N,n,o)||"",j=LA(N,n,o),O=Di(C,n,o),L=Xl(N,f?"NO":"EN",o)||"",K=Di(C,f?"NO":"EN",o),U=P.toLowerCase().includes(_)||L.toLowerCase().includes(_),A=j.toLowerCase().includes(_),M=O.toLowerCase().includes(_)||K.toLowerCase().includes(_);(U||A||M)&&k.push({...N,category:S,alt:j,title:P,titleEN:L,categoryName:O})})}),k},[x,f,n,e,o]),y=_=>{h(_),u(!0)},w=()=>{u(!1)},v=()=>{h(_=>_===0?g.length-1:_-1)},b=()=>{h(_=>_===g.length-1?0:_+1)};return l.jsxs(Rt,{children:[l.jsx("section",{className:"pt-32 md:pt-40 pb-12 bg-warm-cream",children:l.jsxs("div",{className:"container-gallery",children:[l.jsx(Z,{children:l.jsxs(ge,{to:"/gallerier",className:"inline-flex items-center gap-2 text-muted-foreground hover:text-foreground transition-colors mb-8",children:[l.jsx(af,{className:"w-4 h-4"}),l.jsx("span",{className:"text-sm",children:r("gallery.backToGalleries")})]})}),l.jsxs(Z,{delay:.1,children:[l.jsxs("div",{className:"flex items-center gap-3 mb-4",children:[l.jsx(Xo,{className:"w-6 h-6 text-muted-foreground"}),l.jsx(J,{tKey:"search.title",as:"h1",className:"heading-section"})]}),e&&l.jsxs("p",{className:"body-regular text-muted-foreground",children:[r("search.showingResults"),' "',e,'"',g.length>0&&l.jsxs("span",{className:"ml-2",children:["(",g.length," ",r("search.artworksFound"),")"]})]})]})]})}),l.jsx("section",{className:"section-spacing bg-soft-sand",children:l.jsx("div",{className:"container-gallery",children:e.trim()?g.length>0?l.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-6 md:gap-8",children:g.map((_,k)=>l.jsx(Z,{delay:k*.03,children:l.jsxs(oe.button,{onClick:()=>y(k),className:"group block w-full text-left",whileHover:{scale:1.02},transition:{duration:.3},children:[l.jsx("div",{className:"gallery-image aspect-[4/5] overflow-hidden mb-4",children:l.jsx("img",{src:_.src,alt:_.alt,className:"w-full h-full object-cover transition-transform duration-500 group-hover:scale-105",loading:"lazy"})}),_.title&&l.jsx("h3",{className:"text-sm font-medium text-center text-foreground",children:Xl(_,n,o)}),l.jsx("p",{className:"text-xs text-muted-foreground text-center mt-1",children:_.categoryName})]})},`${_.category}-${k}`))}):l.jsx(Z,{children:l.jsxs("div",{className:"text-center py-20",children:[l.jsx(Xo,{className:"w-12 h-12 text-muted-foreground
3602/50 mx-auto mb-4"}),l.jsxs("p",{className:"body-large text-muted-foreground mb-2",children:[r("search.noResults"),' "',e,'"']}),l.jsx("p",{className:"body-regular text-muted-foreground",children:r("search.trySearching")})]})}):l.jsx(Z,{children:l.jsxs("div",{className:"text-center py-20",children:[l.jsx(Xo,{className:"w-12 h-12 text-muted-foreground/50 mx-auto mb-4"}),l.jsx("p",{className:"body-large text-muted-foreground",children:r("search.enterTerm")})]})})})}),l.jsx(UA,{images:g,currentIndex:d,isOpen:c,onClose:w,onPrev:v,onNext:b})]})}function QX(){const{t}=Mt();return l.jsxs(Rt,{hasHero:!0,children:[l.jsxs("section",{className:"relative h-[50vh] min-h-[400px] w-full overflow-hidden",children:[l.jsxs("div",{className:"absolute inset-0",children:[l.jsx(cu,{imageKey:"about-hero-image",src:FA,alt:"About banner",className:"h-full w-full"}),l.jsx("div",{className:"absolute inset-0 bg-overlay/50 pointer-events-none"})]}),l.jsx("div",{className:"absolute inset-0 z-20 flex items-center justify-center pointer-events-none",children:l.jsxs("div",{className:"container-gallery text-center",children:[l.jsx(oe.div,{initial:{opacity:0,y:30},animate:{opacity:1,y:0},transition:{duration:.8,delay:.3},className:"heading-hero hero-text mb-6 pointer-events-auto",children:l.jsx(J,{tKey:"about.title",as:"h1"})}),l.jsx(oe.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.8,delay:.5},className:"body-large hero-text max-w-xl mx-auto opacity-90 pointer-events-auto",children:l.jsx(J,{tKey:"about.subtitle",as:"p"})})]})})]}),l.jsx(ui,{colorKey:"warm-cream-bg",className:"section-spacing bg-warm-cream",children:l.jsx("div",{className:"container-gallery",children:l.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-12 lg:gap-20",children:[l.jsx(Z,{direction:"left",children:l.jsx("div",{className:"lg:pt-8",children:l.jsxs("div",{className:"prose prose-lg max-w-none",children:[l.jsx("blockquote",{className:"text-lg italic text-muted-foreground border-l-2 border-foreground
3602/30 pl-6 mb-10",children:l.jsx(J,{tKey:"about.quote",as:"span"})}),l.jsx(J,{tKey:"about.description2",as:"p",className:"body-regular text-muted-foreground mb-6"}),l.jsx(J,{tKey:"about.description3",as:"p",className:"body-regular text-muted-foreground mb-6"}),l.jsx(J,{tKey:"about.description4",as:"p",className:"body-regular text-muted-foreground mb-6"}),l.jsx("div",{className:"divider my-10"}),l.jsx("h2",{className:"heading-card mb-6",children:t("about.atelier")}),l.jsxs("address",{className:"not-italic body-regular text-muted-foreground space-y-1 mb-8",children:[l.jsx("p",{children:"MjÃ¥nesvegen 97"}),l.jsx("p",{children:"5551 Auklandshamn"}),l.jsx("p",{children:t("common.norway")})]}),l.jsx("div",{className:"divider my-10"}),l.jsx("h2",{className:"heading-card mb-6",children:t("about.contact")}),l.jsxs("div",{className:"body-regular space-y-2",children:[l.jsx("p",{children:l.jsx("a",{href:"mailto:[email protected]",className:"link-underline text-foreground",children:"[email protected]"})}),l.jsx("p",{children:l.jsx("a",{href:"tel:+4740201696",className:"link-underline text-foreground",children:"+47 40 20 16 96"})})]}),l.jsx("div",{className:"divider my-10"}),l.jsx("h2",{className:"heading-card mb-6",children:t("about.followWork")}),l.jsxs("div",{className:"flex items-center gap-4",children:[l.jsx("a",{href:"https://www.facebook.com/billyokland",target:"_blank",rel:"noopener noreferrer",className:"text-foreground hover:text-muted-foreground transition-colors duration-300","aria-label":"Facebook",children:l.jsx(Kc,{className:"w-6 h-6"})}),l.jsx("a",{href:"https://www.instagram.com/billyokland",target:"_blank",rel:"noopener noreferrer",className:"text-foreground hover:text-muted-foreground transition-colors duration-300","aria-label":"Instagram",children:l.jsx(Oa,{className:"w-6 h-6"})}),l.jsx("a",{href:"https://www.youtube.com/@billykland7495",target:"_blank",rel:"noopener noreferrer",className:"text-foreground hover:text-muted-foreground transition-colors duration-300","aria-label":"YouTube",children:l.jsx(lf,{className:"w-6 h-6"})})]})]})})}),l.jsx(Z,{direction:"right",delay:.2,children:l.jsx("div",{className:"aspect-[3/4] overflow-hidden lg:sticky lg:top-32",children:l.jsx(Si,{imageKey:"about-image",src:cA,alt:"Billy Ãkland",className:"w-full h-full object-cover"})})})]})})})]})}const XX="/assets/hero-3-Ci231teR.jpg";function JX(){const{t}=Mt();return l.jsxs(Rt,{hasHero:!0,children:[l.jsxs("section",{className:"relative h-[50vh] min-h-[400px] w-full overflow-hidden",children:[l.jsxs("div",{className:"absolute inset-0",children:[l.jsx(cu,{imageKey:"events-hero-image",src:XX,alt:"Events banner",className:"h-full w-full"}),l.jsx("div",{className:"absolute inset-0 bg-overlay/50 pointer-events-none"})]}),l.jsx("div",{className:"absolute inset-0 z-20 flex items-center justify-center pointer-events-none",children:l.jsxs("div",{className:"container-gallery text-center",children:[l.jsx(oe.div,{initial:{opacity:0,y:30},animate:{opacity:1,y:0},transition:{duration:.8,delay:.3},className:"heading-hero hero-text mb-6 pointer-events-auto",children:l.jsx(J,{tKey:"events.title",as:"h1"})}),l.jsx(oe.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.8,delay:.5},className:"body-large hero-text max-w-xl mx-auto opacity-90 pointer-events-auto",children:l.jsx(J,{tKey:"events.pageDescription",as:"p"})})]})})]}),l.jsx("section",{className:"py-24 md:py-36",children:l.jsx("div",{className:"container-gallery",children:l.jsx(Z,{children:l.jsxs("div",{className:"max-w-2xl mx-auto text-center",children:[l.jsx("span",{className:"text-xs tracking-[0.25em] uppercase text-muted-foreground mb-6 block",children:t("events.title")}),l.jsx("div",{className:"text-xl md:text-2xl italic leading-relaxed text-foreground mb-4",style:{fontFamily:"'Playfair Display', serif"},children:l.jsx(J,{tKey:"events.noEvents",as:"p"})}),l.jsx("div",{className:"w-12 h-px bg-border mx-auto mt-8"})]})})})}),l.jsx(ui,{colorKey:"gallery-dark-bg",className:"bg-gallery-dark py-20 md:py-32",children:l.jsx("div",{className:"container-gallery",children:l.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-16 md:gap-20",children:[l.jsx(Z,{children:l.jsxs("div",{children:[l.jsx(J,{tKey:"events.stayUpdated",as:"span",className:"text-xs tracking-[0.25em] uppercase text-muted-foreground mb-6 block"}),l.jsx(J,{tKey:"events.stayUpdatedDesc",as:"p",className:"body-regular text-muted-foreground mb-10"}),l.jsxs("div",{className:"space-y-4",children:[l.jsxs("a",{href:"https://www.facebook.com/billyokland",target:"_blank",rel:"noopener noreferrer",className:"group flex items-center gap-4 py-4 border-b border-white/10 hover:border-white/25 transition-all duration-300",children:[l.jsx(Kc,{className:"w-5 h-5 opacity-70"}),l.jsx("span",{className:"text-sm tracking-wide flex-1",children:t("events.followFacebook")}),l.jsx(_n,{className:"w-4 h-4 opacity-50 group-hover:opacity-100 group-hover:translate-x-1 transition-all duration-300"})]}),l.jsxs("a",{href:"https://www.instagram.com/billyokland",target:"_blank",rel:"noopener noreferrer",className:"group flex items-center gap-4 py-4 border-b border-white/10 hover:border-white/25 transition-all duration-300",children:[l.jsx(Oa,{className:"w-5 h-5 opacity-70"}),l.jsx("span",{className:"text-sm tracking-wide flex-1",children:t("events.followInstagram")}),l.jsx(_n,{className:"w-4 h-4 opacity-50 group-hover:opacity-100 group-hover:translate-x-1 transition-all duration-300"})]})]})]})}),l.jsx(Z,{delay:.15,children:l.jsxs("div",{className:"flex flex-col justify-center md:border-l md:border-white/10 md:pl-20",children:[l.jsx(J,{tKey:"events.interested",as:"span",className:"text-xs tracking-[0.25em] uppercase text-muted-foreground mb-6 block"}),l.jsx(J,{tKey:"events.interestedDesc",as:"p",className:"body-regular text-muted-foreground mb-10"}),l.jsxs(ge,{to:"/kontakt",className:"group inline-flex items-center gap-3 text-sm tracking-wide hover:gap-5 transition-all duration-300",children:[t("contact.form"),l.jsx(_n,{className:"w-4 h-4"})]})]})})]})})})]})}const ZX="/assets/frihet-N9ovpbN4.jpg";function eJ(){const{t}=Mt(),{hasConsent:e,openCookieSettings:n}=Za(),[r,s]=m.useState(!1),[i,o]=m.useState({navn:"",email:"",emne:"",melding:""}),[a,c]=m.useState(!1),[u,d]=m.useState(!1),h=async p=>{if(p.preventDefault(),!!r){d(!0);try{const x=new FormData;x.append("navn",i.navn),x.append("email",i.email),x.append("emne",i.emne),x.append("melding",i.melding),await fetch("https://usebasin.com/f/1682d41a46e8",{method:"POST",body:x,mode:"no-cors"}),c(!0),o({navn:"",email:"",emne:"",melding:""}),s(!1),setTimeout(()=>{c(!1)},5e3)}catch(x){console.error("Error submitting form:",x),alert("Det oppstod en feil ved sending av meldingen. Prøv igjen eller r
3602ing direkte.")}finally{d(!1)}}},f=p=>{o({...i,[p.target.name]:p.target.value})};return l.jsxs(Rt,{hasHero:!0,children:[l.jsxs("section",{className:"relative h-[50vh] min-h-[400px] w-full overflow-hidden",children:[l.jsxs("div",{className:"absolute inset-0",children:[l.jsx(cu,{imageKey:"contact-hero-image",src:ZX,alt:"Contact banner",className:"h-full w-full"}),l.jsx("div",{className:"absolute inset-0 bg-overlay/50 pointer-events-none"})]}),l.jsx("div",{className:"absolute inset-0 z-20 flex items-center justify-center pointer-events-none",children:l.jsxs("div",{className:"container-gallery text-center",children:[l.jsx(oe.div,{initial:{opacity:0,y:30},animate:{opacity:1,y:0},transition:{duration:.8,delay:.3},className:"heading-hero hero-text mb-6 pointer-events-auto",children:l.jsx(J,{tKey:"contact.title",as:"h1"})}),l.jsx(oe.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.8,delay:.5},className:"body-large hero-text max-w-xl mx-auto opacity-90 pointer-events-auto",children:l.jsx(J,{tKey:"contact.description",as:"p"})})]})})]}),l.jsx(ui,{colorKey:"gallery-dark-bg",className:"bg-gallery-dark",children:l.jsx("div",{className:"container-gallery py-12 md:py-16",children:l.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-8 md:gap-12",children:[l.jsx(Z,{children:l.jsxs("a",{href:"mailto:[email protected]",className:"group flex items-start gap-4",children:[l.jsx(Cg,{className:"w-5 h-5 mt-0.5 opacity-60 shrink-0"}),l.jsxs("div",{children:[l.jsx("span",{className:"text-xs tracking-[0.2em] uppercase text-muted-foreground block mb-2",children:t("contact.email")}),l.jsx("span",{className:"text-sm tracking-wide group-hover:opacity-70 transition-opacity duration-300",children:"[email protected]"})]})]})}),l.jsx(Z,{delay:.1,children:l.jsxs("a",{href:"tel:+4740201696",className:"group flex items-start gap-4",children:[l.jsx(zS,{className:"w-5 h-5 mt-0.5 opacity-60 shrink-0"}),l.jsxs("div",{children:[l.jsx("span",{className:"text-xs tracking-[0.2em] uppercase text-muted-foreground block mb-2",children:t("contact.phone")}),l.jsx("span",{className:"text-sm tracking-wide group-hover:opacity-70 transition-opacity duration-300",children:"+47 40 20 16 96"})]})]})}),l.jsx(Z,{delay:.2,children:l.jsxs("a",{href:"https://www.google.com/maps/search/?api=1&query=Gallery+Billy+Okland,+Mjånesvegen+97,+5551+Auklandshamn",target:"_blank",rel:"noopener noreferrer",className:"group flex items-start gap-4",children:[l.jsx(VS,{className:"w-5 h-5 mt-0.5 opacity-60 shrink-0"}),l.jsxs("div",{children:[l.jsx("span",{className:"text-xs tracking-[0.2em] uppercase text-muted-foreground block mb-2",children:t("contact.atelier")}),l.jsx("span",{className:"text-sm tracking-wide group-hover:opacity-70 transition-opacity duration-300",children:"Mjånesvegen 97, 5551 Auklandshamn"})]})]})})]})})}),l.jsx("section",{className:"py-20 md:py-32",children:l.jsx("div",{className:"container-gallery",children:l.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-5 gap-16 lg:gap-20",children:[l.jsx(Z,{className:"lg:col-span-3",children:l.jsxs("div",{children:[l.jsx("span",{className:"text-xs tracking-[0.25em] uppercase text-muted-foreground mb-6 block",children:t("contact.sendMessage")}),l.jsxs("form",{className:"space-y-6",onSubmit:h,children:[a&&l.jsx("div",{className:"p-4 bg-foreground
3602/10 border border-foreground/30 text-foreground",children:"Takk for din henvendelse! Vi vil svare deg så snart som mulig."}),l.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6",children:[l.jsxs("div",{children:[l.jsx("label",{htmlFor:"navn",className:"block text-sm font-medium text-foreground mb-2",children:t("contact.name")}),l.jsx("input",{type:"text",id:"navn",name:"navn",value:i.navn,onChange:f,className:"w-full px-4 py-3 bg-transparent border border-border text-foreground placeholder:text-muted-foreground/60 focus:outline-none focus:border-foreground transition-colors",placeholder:t("contact.namePlaceholder"),required:!0})]}),l.jsxs("div",{children:[l.jsx("label",{htmlFor:"email",className:"block text-sm font-medium text-foreground mb-2",children:t("contact.email")}),l.jsx("input",{type:"email",id:"email",name:"email",value:i.email,onChange:f,className:"w-full px-4 py-3 bg-transparent border border-border text-foreground placeholder:text-muted-foreground/60 focus:outline-none focus:border-foreground transition-colors",placeholder:t("contact.emailPlaceholder"),required:!0})]})]}),l.jsxs("div",{children:[l.jsx("label",{htmlFor:"emne",className:"block text-sm font-medium text-foreground mb-2",children:t("contact.subject")}),l.jsx("input",{type:"text",id:"emne",name:"emne",value:i.emne,onChange:f,className:"w-full px-4 py-3 bg-transparent border border-border text-foreground placeholder:text-muted-foreground/60 focus:outline-none focus:border-foreground transition-colors",placeholder:t("contact.subjectPlaceholder")})]}),l.jsxs("div",{children:[l.jsx("label",{htmlFor:"melding",className:"block text-sm font-medium text-foreground mb-2",children:t("contact.message")}),l.jsx("textarea",{id:"melding",name:"melding",value:i.melding,onChange:f,rows:6,className:"w-full px-4 py-3 bg-transparent border border-border text-foreground placeholder:text-muted-foreground/60 focus:outline-none focus:border-foreground transition-colors resize-none",placeholder:t("contact.messagePlaceholder"),required:!0})]}),l.jsxs("div",{className:"flex items-start gap-3",children:[l.jsx(B0,{id:"consent",checked:r,onCheckedChange:p=>s(p)}),l.jsx("label",{htmlFor:"consent",className:"text-sm leading-relaxed cursor-pointer select-none text-muted-foreground",children:t("contact.consent")})]}),l.jsxs("button",{type:"submit",disabled:!r||u,className:"btn-editorial disabled:opacity-40 disabled:cursor-not-allowed",children:[u?"Sender...":t("contact.send"),!u&&l.jsx(_n,{className:"w-4 h-4 ml-2"})]})]})]})}),l.jsx(Z,{delay:.2,className:"lg:col-span-2",children:l.jsxs("div",{className:"lg:border-l lg:border-border lg:pl-12",children:[l.jsx("span",{className:"text-xs tracking-[0.25em] uppercase text-muted-foreground mb-6 block",children:t("contact.info")}),l.jsxs("div",{className:"space-y-8 mb-12",children:[l.jsxs("div",{children:[l.jsx("h3",{className:"text-sm font-medium text-muted-foreground mb-2",children:t("contact.email")}),l.jsxs("div",{className:"space-y-1",children:[l.jsx("a",{href:"mailto:[email protected]",className:"body-regular link-underline text-foreground block",children:"[email protected]"}),l.jsx("a",{href:"mailto:[email protected]",className:"body-regular link-underline text-foreground block",children:"[email protected]"})]})]}),l.jsxs("div",{children:[l.jsx("h3",{className:"text-sm font-medium text-muted-foreground mb-2",children:t("contact.phone")}),l.jsx("a",{href:"tel:+4740201696",className:"body-regular link-underline text-foreground",children:"+47 40 20 16 96"})]}),l.jsxs("div",{children:[l.jsx("h3",{className:"text-sm font-medium text-muted-foreground mb-2",children:t("contact.atelier")}),l.jsxs("address",{className:"not-italic body-regular text-foreground",children:[l.jsx("p",{children:"Mjånesvegen 97"}),l.jsx("p",{children:"5551 Auklandshamn"}),l.jsx("p",{children:t("common.norway")})]})]})]}),l.jsxs("div",{className:"pt-8 border-t border-border",children:[l.jsx("h3",{className:"text-sm font-medium text-muted-foreground mb-4",children:t("contact.socialMedia")}),l.jsxs("div",{className:"flex items-center gap-5",children:[l.jsx("a",{href:"https://www.facebook.com/billyokland",target:"_blank",rel:"noopener noreferrer",className:"text-foreground hover:text-muted-foreground transition-colors duration-300","aria-label":"Facebook",children:l.jsx(Kc,{className:"w-5 h-5"})}),l.jsx("a",{href:"https://www.instagram.com/billyokland",target:"_blank",rel:"noopener noreferrer",className:"text-foreground hover:text-muted-foreground transition-colors duration-300","aria-label":"Instagram",children:l.jsx(Oa,{className:"w-5 h-5"})}),l.jsx("a",{href:"https://www.youtube.com/@billykland7495",target:"_blank",rel:"noopener noreferrer",className:"text-foreground hover:text-muted-foreground transition-colors duration-300","aria-label":"YouTube",children:l.jsx(lf,{className:"w-5 h-5"})})]})]})]})})]})})}),l.jsx("section",{children:l.jsx("div",{className:"w-full h-[400px] md:h-[500px]",children:e?l.jsx("iframe",{src:"https://www.google.com/maps/embed?pb=!1m18!1m12!1m3!1d2016.502660203953!2d5.3781959!3d59.6412843!2m3!1f0!2f0!3f0!3m2!1i1024!2i768!4f13.1!3m3!1m2!1s0x463b817c4fb2f29b%3A0xb95eac97d1cc7c1b!2sBilly-Roy%20%C3%98kland!5e0!3m2!1sen!2sph!4v1769388827897!
36025m2!1sen!2sph",width:"100%",height:"100%",style:{border:0},allowFullScreen:!0,loading:"lazy",referrerPolicy:"no-referrer-when-downgrade",title:"Billy Ãkland Location"}):l.jsxs("div",{className:"w-full h-full bg-gray-100 flex flex-col items-center justify-center gap-4",children:[l.jsx("p",{className:"text-sm text-gray-600 text-center px-4",children:"Kart er deaktivert. Aktiver informasjonskapsler for Ã¥ vise interaktivt kart."}),l.jsx("button",{onClick:n,className:"px-4 py-2 bg-black text-white text-sm hover:bg-gray-800 transition-colors",children:"Samtykkeinnstillinger"})]})})})]})}const tJ=JSON.stringify({"@context":"https://schema.org","@type":"BreadcrumbList",itemListElement:[{"@type":"ListItem",position:1,name:"Hjem",item:"https://billyokland.com/"},{"@type":"ListItem",position:2,name:"Personvern",item:"https://billyokland.com/personvern"}]});function nJ(){const{openCookieSettings:t}=Za();return l.jsxs(Rt,{children:[l.jsx("script",{type:"application/ld+json",dangerouslySetInnerHTML:{__html:tJ}}),l.jsx("section",{className:"pt-32 md:pt-40 pb-20 md:pb-32",children:l.jsx("div",{className:"container-gallery",children:l.jsx(Z,{children:l.jsxs("div",{className:"max-w-2xl mx-auto",children:[l.jsx(ge,{to:"/",className:"text-xs text-muted-foreground hover:text-foreground transition-colors mb-8 inline-block tracking-wide",children:"â Tilbake til forsiden"}),l.jsx("h1",{className:"heading-section mb-12",children:"Personvernerklæring"}),l.jsxs("div",{className:"space-y-10 body-regular text-muted-foreground",children:[l.jsxs("section",{children:[l.jsx("h2",{className:"heading-card text-foreground mb-4",children:"Behandlingsansvarlig"}),l.jsxs("p",{children:["Billy Ãkland (org.nr. 981370406) er behandlingsansvarlig for behandling av personopplysninger pÃ¥ dette nettstedet. Kontakt:"," ",l.jsx("a",{href:"mailto:[email protected]",className:"underline hover:text-foreground transition-colors",children:"[email protected]"}),","," ",l.jsx("a",{href:"tel:+4740201696",className:"underline hover:text-foreground transition-colors",children:"+47 40 20 16 96"}),"."]})]}),l.jsxs("section",{children:[l.jsx("h2",{className:"heading-card text-foreground mb-4",children:"Hvilke opplysninger vi samler inn"}),l.jsx("p",{children:"Vi kan behandle personopplysninger som du gir oss, for eksempel navn, e-postadresse, telefonnummer og informasjon knyttet til forespørsler eller oppdrag. Tekniske driftsdata: IP-adresse, tidsstempler og nettleser/user-agent som oppstÃ¥r ved bruk av nettsted og skjema (for sikkerhet og feilsøking)."})]}),l.jsxs("section",{children:[l.jsx("h2",{className:"heading-card text-foreground mb-4",children:"FormÃ¥l og behandlingsgrunnlag"}),l.jsx("p",{className:"mb-3",children:"Opplysningene brukes til Ã¥:"}),l.jsxs("ul",{className:"list-disc pl-6 space-y-1",children:[l.jsx("li",{children:"besvare henvendelser og levere tjenester (avtale),"}),l.jsx("li",{children:"oppfylle lovpÃ¥lagte krav (juridisk plikt),"}),l.jsx("li",{children:"drift, sikkerhet og misbruksvern â art. 6(1)(f) (berettiget interesse),"}),l.jsx("li",{children:"ikke-nødvendige teknologier (f.eks. innebygde kart/iframes, ev. markedsføring/analyse) â kun med samtykke, art. 6(1)(a) (samtykke kan trekkes tilbake nÃ¥r som helst)."})]})]}),l.jsxs("section",{children:[l.jsx("h2",{className:"heading-card text-foreground mb-4",children:"Frivillighet"}),l.jsx("p",{children:"Det er frivillig Ã¥ oppgi opplysninger, men uten nødvendig kontakt- og saksinformasjon kan vi ikke besvare henvendelser eller inngÃ¥/oppfylle avtaler."})]}),l.jsxs("section",{children:[l.jsx("h2",{className:"heading-card text-foreground mb-4",children:"Mottakere (kategorier)"}),l.jsx("p",{children:"Hostingleverandør (nettsidedrift) og skjemaleverandør (innsending) som databehandlere; tredjeparts innbygg (kart/andre iframes) som selvstendig behandlingsansvarlig. Databehandleravtaler (DPA) er inngÃ¥tt der pÃ¥krevd."})]}),l.jsxs("section",{children:[l.jsx("h2",{className:"heading-card text-foreground mb-4",children:"Overføringer utenfor EÃS (kap. V)"}),l.jsx("p",{children:"Overføring kan forekomme. Grunnlag: EU-US Data Privacy Framework (DPF) der leverandør er sertifisert, ellers EUs standardkontrakter (SCC); Canada (kommersielt) via adekvans. Info/kopi gis pÃ¥ forespørsel."})]}),l.jsxs("section",{children:[l.jsx("h2",{className:"heading-card text-foreground mb-4",children:"Lagring"}),l.jsxs("ul",{className:"list-disc pl-6 space-y-1",children:[l.jsx("li",{children:"Henvendelser uten oppdrag: 12 mÃ¥neder."}),l.jsx("li",{children:"Kunde-/oppdragsdata: avtaletid + lovpÃ¥lagt oppbevaring."}),l.jsx("li",{children:"Tekniske logger: 90 dager."})]}),l.jsx("p",{className:"mt-3",children:"Data slettes eller anonymiseres nÃ¥r de ikke lenger er nødvendige, eller ved forespørsel."})]}),l.jsxs("section",{children:[l.jsx("h2",{className:"heading-card text-foreground mb-4",children:"Dine rettigheter"}),l.jsxs("p",{children:["Du har rett til innsyn, retting og sletting, samt Ã¥ klage til tilsynsmyndigheten. I tillegg har du rett til begrensning, dataportabilitet og til Ã¥ protestere mot behandling basert pÃ¥ berettiget interesse. Der vi bygger pÃ¥ samtykke, kan du trekke samtykket tilbake nÃ¥r som helst. Forespørsler om rettigheter sendes til"," ",l.jsx("a",{href:"mailto:[email protected]",className:"underline hover:text-foreground transition-colors",children:"[email protected]"}),"."]})]}),l.jsxs("section",{children:[l.jsx("h2",{className:"heading-card text-foreground mb-4",children:"Automatiserte beslutninger"}),l.jsx("p",{children:"Vi foretar ikke automatisert beslutningstaking eller profilering."})]}),l.jsxs("section",{children:[l.jsx("h2",{className:"heading-card text-foreground mb-4",children:"Sikkerhet"}),l.jsx("p",{children:"Vi har passende tekniske og organisatoriske tiltak for Ã¥ beskytte personopplysninger mot uautorisert tilgang, endring og sletting."})]}),l.jsxs("section",{children:[l.jsx("h2",{className:"heading-card text-foreground mb-4",children:"Informasjonskapsler (cookie
3602s) og tredjepart"}),l.jsxs("p",{children:["Ikke-nødvendige teknologier (f.eks. innebygd kart/iframes) aktiveres først etter ditt samtykke. Du kan endre/trekke samtykke nÃ¥r som helst via"," ",l.jsx("button",{onClick:t,className:"underline hover:text-foreground transition-colors",children:"samtykkeinnstillinger"}),"."]})]})]})]})})})})]})}const rJ=JSON.stringify({"@context":"https://schema.org","@type":"BreadcrumbList",itemListElement:[{"@type":"ListItem",position:1,name:"Home",item:"https://billyokland.com/"},{"@type":"ListItem",position:2,name:"Privacy Policy",item:"https://billyokland.com/privacy"}]});function sJ(){const{openCookieSettings:t}=Za();return l.jsxs(Rt,{children:[l.jsx("script",{type:"application/ld+json",dangerouslySetInnerHTML:{__html:rJ}}),l.jsx("section",{className:"pt-32 md:pt-40 pb-20 md:pb-32",children:l.jsx("div",{className:"container-gallery",children:l.jsx(Z,{children:l.jsxs("div",{className:"max-w-2xl mx-auto",children:[l.jsx(ge,{to:"/",className:"text-xs text-muted-foreground hover:text-foreground transition-colors mb-8 inline-block tracking-wide",children:"â Back to homepage"}),l.jsx("h1",{className:"heading-section mb-12",children:"Privacy Policy"}),l.jsxs("div",{className:"space-y-10 body-regular text-muted-foreground",children:[l.jsxs("section",{children:[l.jsx("h2",{className:"heading-card text-foreground mb-4",children:"Data Controller"}),l.jsxs("p",{children:["Billy Ãkland (org. no. 981370406) is the data controller for the processing of personal data on this website. Contact:"," ",l.jsx("a",{href:"mailto:[email protected]",className:"underline hover:text-foreground transition-colors",children:"[email protected]"}),","," ",l.jsx("a",{href:"tel:+4740201696",className:"underline hover:text-foreground transition-colors",children:"+47 40 20 16 96"}),"."]})]}),l.jsxs("section",{children:[l.jsx("h2",{className:"heading-card text-foreground mb-4",children:"What information we collect"}),l.jsx("p",{children:"We may process personal data you provide to us, such as name, email address, phone number, and information related to inquiries or commissions. Technical operational data: IP address, timestamps, and browser/user-agent data generated by use of the website and forms (for security and troubleshooting purposes)."})]}),l.jsxs("section",{children:[l.jsx("h2",{className:"heading-card text-foreground mb-4",children:"Purposes and legal basis"}),l.jsx("p",{className:"mb-3",children:"The information is used to:"}),l.jsxs("ul",{className:"list-disc pl-6 space-y-1",children:[l.jsx("li",{children:"respond to inquiries and deliver services (contract),"}),l.jsx("li",{children:"fulfil legal obligations (legal obligation),"}),l.jsx("li",{children:"operations, security and abuse prevention â Art. 6(1)(f) (legitimate interest),"}),l.jsx("li",{children:"non-essential technologies (e.g. embedded maps/iframes, marketing/analytics) â only with consent, Art. 6(1)(a) (consent may be withdrawn at any time)."})]})]}),l.jsxs("section",{children:[l.jsx("h2",{className:"heading-card text-foreground mb-4",children:"Voluntary disclosure"}),l.jsx("p",{children:"Providing information is voluntary, but without the necessary contact and case information we cannot respond to inquiries or enter into/fulfil agreements."})]}),l.jsxs("section",{children:[l.jsx("h2",{className:"heading-card text-foreground mb-4",children:"Recipients (categories)"}),l.jsx("p",{children:"Hosting provider (website operations) and form provider (submissions) as data processors; third-party embeds (maps/other iframes) as independent data controllers. Data processing agreements (DPAs) are in place where required."})]}),l.jsxs("section",{children:[l.jsx("h2",{className:"heading-card text-foreground mb-4",children:"Transfers outside the EEA (Ch. V)"}),l.jsx("p",{children:"Transfers may occur. Basis: EU-US Data Privacy Framework (DPF) where the provider is certified, otherwise EU Standard Contractual Clauses (SCCs); Canada (commercial) via adequacy. Information/copies provided upon request."})]}),l.jsxs("section",{children:[l.jsx("h2",{className:"heading-card text-foreground mb-4",children:"Retention"}),l.jsxs("ul",{className:"list-disc pl-6 space-y-1",children:[l.jsx("li",{children:"Inquiries without commission: 12 months."}),l.jsx("li",{children:"Client/commission data: contract period + statutory retention."}),l.jsx("li",{children:"Technical logs: 90 days."})]}),l.jsx("p",{className:"mt-3",children:"Data is deleted or anonymised when no longer necessary, or upon request."})]}),l.jsxs("section",{children:[l.jsx("h2",{className:"heading-card text-foreground mb-4",children:"Your rights"}),l.jsxs("p",{children:["You have the right to access, rectification, and erasure, as well as to lodge a complaint with the supervisory authority. You also have the right to restriction, data portability, and to object to processing based on legitimate interest. Where we rely on consent, you may withdraw it at any time. Rights requests should be sent to"," ",l.jsx("a",{href:"mailto:[email protected]",className:"underline hover:text-foreground transition-colors",children:"[email protected]"}),"."]})]}),l.jsxs("section",{children:[l.jsx("h2",{className:"heading-card text-foreground mb-4",children:"Automated decisions"}),l.jsx("p",{children:"We do not carry out automated decision-making or profiling."})]}),l.jsxs("section",{children:[l.jsx("h2",{className:"heading-card text-foreground mb-4",children:"Security"}),l.jsx("p",{children:"We have appropriate technical and organisational measures in place to protect personal data against unauthorised access, alteration, and deletion."})]}),l.jsxs("section",{children:[l.jsx("h2",{className:"heading-card text-foreground mb-4",children:"Cookies and third parties"}),l.jsxs("p",{children:["Non-essential technologies (e.g. embedded maps/iframes) are only activated after your consent. You may change or withdraw consent at any time via"," ",l.jsx("button",{onClick:t,className:"underline hover:text-foreground transition-colors",children:"cookie settings"}),"."]})]})]})]})})})})]})}const iJ=()=>{const t=Rr();return m.useEffect(()=>{console.error("404 Error: User attempted to access non-existent route:",t.pathname)},[t.pathname]),l.jsx(Rt,{children:l.jsx("section",{className:"pt-32 md:pt-40 pb-20 md:pb-32 min-h-[70vh] flex items-center",children:l.jsx("div",{className:"container-gallery",children:l.jsx(Z,{children:l.jsxs("div",{className:"max-w-lg mx-auto text-center",children:[l.jsx("h1",{className:"heading-hero mb-6",children:"404"}),l.jsx("p",{className:"body-large text-muted-foreground mb-8",children:"Siden du leter etter finnes ikke."}),l.jsx(ge,{to:"/",className:"btn-editorial",children:"Tilbake til forsiden"})]})})})})})},oJ=new v8;function aJ(){const{id:t}=mf();return l.jsx(ur,{to:`/nettbutikk/${t}`,replace:!0})}function lJ(){const{categoryId:t}=mf();return l.jsx(ur,{to:`/gallerier/${t}`,replace:!0})}const cJ=()=>l.jsx(w8,{client:oJ,children:l.jsx(VG,{children:l.jsx(zG,{children:l.jsx(WG,{children:l.jsx(HG,{children:l.jsxs(R3,{children:[l.jsx(pL,{}),l.jsx(KL,{}),l.jsxs(jF,{children:[l.jsx(OF,{}),l.jsx(YV,{}),l.jsx(KG,{}),l.jsxs(kF,{children:[l.jsx(Ue,{path:"/",element:l.jsx(QY,{})}),l.jsx(Ue,{path:"/om-oss",element:l.jsx(QX,{})}),l.jsx(Ue,{path:"/nettbutikk",element:l.jsx(_Q,{})}),l.jsx(Ue,{path:"/nettbutikk/:id",element:l.jsx(kQ,{})}),l.jsx(Ue,{path:"/kasse",element:l.jsx(TQ,{})}),l.jsx(Ue,{path:"/gallerier",element:l.jsx(KX,{})}),l.jsx(Ue,{path:"/gallerier/:categoryId",element:l.jsx(qX,{})}),l.jsx(Ue,{path:"/sok",element:l.jsx(YX,{})}),l.jsx(Ue,{path:"/arrangementer",element:l.jsx(JX,{})}),l.jsx(Ue,{path:"/kontakt",element:l.jsx(eJ,{})}
3602),l.jsx(Ue,{path:"/personvern",element:l.jsx(nJ,{})}),l.jsx(Ue,{path:"/privacy",element:l.jsx(sJ,{})}),l.jsx(Ue,{path:"/about",element:l.jsx(ur,{to:"/om-oss",replace:!0})}),l.jsx(Ue,{path:"/store",element:l.jsx(ur,{to:"/nettbutikk",replace:!0})}),l.jsx(Ue,{path:"/store/:id",element:l.jsx(aJ,{})}),l.jsx(Ue,{path:"/checkout",element:l.jsx(ur,{to:"/kasse",replace:!0})}),l.jsx(Ue,{path:"/galleries",element:l.jsx(ur,{to:"/gallerier",replace:!0})}),l.jsx(Ue,{path:"/galleries/:categoryId",element:l.jsx(lJ,{})}),l.jsx(Ue,{path:"/search",element:l.jsx(ur,{to:"/sok",replace:!0})}),l.jsx(Ue,{path:"/events",element:l.jsx(ur,{to:"/arrangementer",replace:!0})}),l.jsx(Ue,{path:"/contact",element:l.jsx(ur,{to:"/kontakt",replace:!0})}),l.jsx(Ue,{path:"*",element:l.jsx(iJ,{})})]})]})]})})})})})});dS(document.getElementById("root")).render(l.jsx(cJ,{}));
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.