rivet-design 0.1.13 → 0.1.15
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/jest.config.d.ts.map +1 -1
- package/dist/jest.config.js +42 -1
- package/dist/jest.config.js.map +1 -1
- package/dist/services/LLMService.d.ts.map +1 -1
- package/dist/services/LLMService.js +2 -0
- package/dist/services/LLMService.js.map +1 -1
- package/dist/services/LocalGitService.d.ts.map +1 -1
- package/dist/services/LocalGitService.js +4 -26
- package/dist/services/LocalGitService.js.map +1 -1
- package/dist/services/__tests__/LocalGitService.test.js +3 -13
- package/dist/services/__tests__/LocalGitService.test.js.map +1 -1
- package/dist/shared/FileSystemAdapter.d.ts +9 -0
- package/dist/shared/FileSystemAdapter.d.ts.map +1 -0
- package/dist/shared/FileSystemAdapter.js +7 -0
- package/dist/shared/FileSystemAdapter.js.map +1 -0
- package/dist/shared/LLMService.d.ts +58 -0
- package/dist/shared/LLMService.d.ts.map +1 -0
- package/dist/shared/LLMService.js +169 -0
- package/dist/shared/LLMService.js.map +1 -0
- package/dist/shared/types.d.ts +25 -0
- package/dist/shared/types.d.ts.map +1 -0
- package/dist/shared/types.js +6 -0
- package/dist/shared/types.js.map +1 -0
- package/package.json +23 -16
- package/src/ui/dist/assets/main-BLxJfHns.css +1 -0
- package/src/ui/dist/assets/main-Bga_UZFY.js +155 -0
- package/src/ui/dist/index.html +2 -2
- package/src/ui/dist/assets/main-CdGS8Nf3.js +0 -145
- package/src/ui/dist/assets/main-QSIylYLL.css +0 -1
|
@@ -0,0 +1,155 @@
|
|
|
1
|
+
function gS(t,e){for(var n=0;n<e.length;n++){const r=e[n];if(typeof r!="string"&&!Array.isArray(r)){for(const i in r)if(i!=="default"&&!(i in t)){const s=Object.getOwnPropertyDescriptor(r,i);s&&Object.defineProperty(t,i,s.get?s:{enumerable:!0,get:()=>r[i]})}}}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 i of document.querySelectorAll('link[rel="modulepreload"]'))r(i);new MutationObserver(i=>{for(const s of i)if(s.type==="childList")for(const o of s.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&r(o)}).observe(document,{childList:!0,subtree:!0});function n(i){const s={};return i.integrity&&(s.integrity=i.integrity),i.referrerPolicy&&(s.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?s.credentials="include":i.crossOrigin==="anonymous"?s.credentials="omit":s.credentials="same-origin",s}function r(i){if(i.ep)return;i.ep=!0;const s=n(i);fetch(i.href,s)}})();var mS=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function of(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var ry={exports:{}},cl={},iy={exports:{}},Q={};/**
|
|
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 oo=Symbol.for("react.element"),vS=Symbol.for("react.portal"),yS=Symbol.for("react.fragment"),_S=Symbol.for("react.strict_mode"),wS=Symbol.for("react.profiler"),xS=Symbol.for("react.provider"),SS=Symbol.for("react.context"),ES=Symbol.for("react.forward_ref"),kS=Symbol.for("react.suspense"),CS=Symbol.for("react.memo"),bS=Symbol.for("react.lazy"),dp=Symbol.iterator;function PS(t){return t===null||typeof t!="object"?null:(t=dp&&t[dp]||t["@@iterator"],typeof t=="function"?t:null)}var sy={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},oy=Object.assign,ay={};function Ii(t,e,n){this.props=t,this.context=e,this.refs=ay,this.updater=n||sy}Ii.prototype.isReactComponent={};Ii.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")};Ii.prototype.forceUpdate=function(t){this.updater.enqueueForceUpdate(this,t,"forceUpdate")};function ly(){}ly.prototype=Ii.prototype;function af(t,e,n){this.props=t,this.context=e,this.refs=ay,this.updater=n||sy}var lf=af.prototype=new ly;lf.constructor=af;oy(lf,Ii.prototype);lf.isPureReactComponent=!0;var fp=Array.isArray,uy=Object.prototype.hasOwnProperty,uf={current:null},cy={key:!0,ref:!0,__self:!0,__source:!0};function dy(t,e,n){var r,i={},s=null,o=null;if(e!=null)for(r in e.ref!==void 0&&(o=e.ref),e.key!==void 0&&(s=""+e.key),e)uy.call(e,r)&&!cy.hasOwnProperty(r)&&(i[r]=e[r]);var a=arguments.length-2;if(a===1)i.children=n;else if(1<a){for(var l=Array(a),u=0;u<a;u++)l[u]=arguments[u+2];i.children=l}if(t&&t.defaultProps)for(r in a=t.defaultProps,a)i[r]===void 0&&(i[r]=a[r]);return{$$typeof:oo,type:t,key:s,ref:o,props:i,_owner:uf.current}}function TS(t,e){return{$$typeof:oo,type:t.type,key:e,ref:t.ref,props:t.props,_owner:t._owner}}function cf(t){return typeof t=="object"&&t!==null&&t.$$typeof===oo}function AS(t){var e={"=":"=0",":":"=2"};return"$"+t.replace(/[=:]/g,function(n){return e[n]})}var hp=/\/+/g;function ql(t,e){return typeof t=="object"&&t!==null&&t.key!=null?AS(""+t.key):e.toString(36)}function Yo(t,e,n,r,i){var s=typeof t;(s==="undefined"||s==="boolean")&&(t=null);var o=!1;if(t===null)o=!0;else switch(s){case"string":case"number":o=!0;break;case"object":switch(t.$$typeof){case oo:case vS:o=!0}}if(o)return o=t,i=i(o),t=r===""?"."+ql(o,0):r,fp(i)?(n="",t!=null&&(n=t.replace(hp,"$&/")+"/"),Yo(i,e,n,"",function(u){return u})):i!=null&&(cf(i)&&(i=TS(i,n+(!i.key||o&&o.key===i.key?"":(""+i.key).replace(hp,"$&/")+"/")+t)),e.push(i)),1;if(o=0,r=r===""?".":r+":",fp(t))for(var a=0;a<t.length;a++){s=t[a];var l=r+ql(s,a);o+=Yo(s,e,n,l,i)}else if(l=PS(t),typeof l=="function")for(t=l.call(t),a=0;!(s=t.next()).done;)s=s.value,l=r+ql(s,a++),o+=Yo(s,e,n,l,i);else if(s==="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 vo(t,e,n){if(t==null)return t;var r=[],i=0;return Yo(t,r,"","",function(s){return e.call(n,s,i++)}),r}function RS(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 et={current:null},Xo={transition:null},MS={ReactCurrentDispatcher:et,ReactCurrentBatchConfig:Xo,ReactCurrentOwner:uf};function fy(){throw Error("act(...) is not supported in production builds of React.")}Q.Children={map:vo,forEach:function(t,e,n){vo(t,function(){e.apply(this,arguments)},n)},count:function(t){var e=0;return vo(t,function(){e++}),e},toArray:function(t){return vo(t,function(e){return e})||[]},only:function(t){if(!cf(t))throw Error("React.Children.only expected to receive a single React element child.");return t}};Q.Component=Ii;Q.Fragment=yS;Q.Profiler=wS;Q.PureComponent=af;Q.StrictMode=_S;Q.Suspense=kS;Q.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=MS;Q.act=fy;Q.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=oy({},t.props),i=t.key,s=t.ref,o=t._owner;if(e!=null){if(e.ref!==void 0&&(s=e.ref,o=uf.current),e.key!==void 0&&(i=""+e.key),t.type&&t.type.defaultProps)var a=t.type.defaultProps;for(l in e)uy.call(e,l)&&!cy.hasOwnProperty(l)&&(r[l]=e[l]===void 0&&a!==void 0?a[l]:e[l])}var l=arguments.length-2;if(l===1)r.children=n;else if(1<l){a=Array(l);for(var u=0;u<l;u++)a[u]=arguments[u+2];r.children=a}return{$$typeof:oo,type:t.type,key:i,ref:s,props:r,_owner:o}};Q.createContext=function(t){return t={$$typeof:SS,_currentValue:t,_currentValue2:t,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},t.Provider={$$typeof:xS,_context:t},t.Consumer=t};Q.createElement=dy;Q.createFactory=function(t){var e=dy.bind(null,t);return e.type=t,e};Q.createRef=function(){return{current:null}};Q.forwardRef=function(t){return{$$typeof:ES,render:t}};Q.isValidElement=cf;Q.lazy=function(t){return{$$typeof:bS,_payload:{_status:-1,_result:t},_init:RS}};Q.memo=function(t,e){return{$$typeof:CS,type:t,compare:e===void 0?null:e}};Q.startTransition=function(t){var e=Xo.transition;Xo.transition={};try{t()}finally{Xo.transition=e}};Q.unstable_act=fy;Q.useCallback=function(t,e){return et.current.useCallback(t,e)};Q.useContext=function(t){return et.current.useContext(t)};Q.useDebugValue=function(){};Q.useDeferredValue=function(t){return et.current.useDeferredValue(t)};Q.useEffect=function(t,e){return et.current.useEffect(t,e)};Q.useId=function(){return et.current.useId()};Q.useImperativeHandle=function(t,e,n){return et.current.useImperativeHandle(t,e,n)};Q.useInsertionEffect=function(t,e){return et.current.useInsertionEffect(t,e)};Q.useLayoutEffect=function(t,e){return et.current.useLayoutEffect(t,e)};Q.useMemo=function(t,e){return et.current.useMemo(t,e)};Q.useReducer=function(t,e,n){return et.current.useReducer(t,e,n)};Q.useRef=function(t){return et.current.useRef(t)};Q.useState=function(t){return et.current.useState(t)};Q.useSyncExternalStore=function(t,e,n){return et.current.useSyncExternalStore(t,e,n)};Q.useTransition=function(){return et.current.useTransition()};Q.version="18.3.1";iy.exports=Q;var x=iy.exports;const ee=of(x),hy=gS({__proto__:null,default:ee},[x]);/**
|
|
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 IS=x,NS=Symbol.for("react.element"),OS=Symbol.for("react.fragment"),LS=Object.prototype.hasOwnProperty,DS=IS.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,$S={key:!0,ref:!0,__self:!0,__source:!0};function py(t,e,n){var r,i={},s=null,o=null;n!==void 0&&(s=""+n),e.key!==void 0&&(s=""+e.key),e.ref!==void 0&&(o=e.ref);for(r in e)LS.call(e,r)&&!$S.hasOwnProperty(r)&&(i[r]=e[r]);if(t&&t.defaultProps)for(r in e=t.defaultProps,e)i[r]===void 0&&(i[r]=e[r]);return{$$typeof:NS,type:t,key:s,ref:o,props:i,_owner:DS.current}}cl.Fragment=OS;cl.jsx=py;cl.jsxs=py;ry.exports=cl;var k=ry.exports,tc={},gy={exports:{}},_t={},my={exports:{}},vy={};/**
|
|
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(R,$){var j=R.length;R.push($);e:for(;0<j;){var q=j-1>>>1,W=R[q];if(0<i(W,$))R[q]=$,R[j]=W,j=q;else break e}}function n(R){return R.length===0?null:R[0]}function r(R){if(R.length===0)return null;var $=R[0],j=R.pop();if(j!==$){R[0]=j;e:for(var q=0,W=R.length,ve=W>>>1;q<ve;){var ue=2*(q+1)-1,Gt=R[ue],je=ue+1,Dr=R[je];if(0>i(Gt,j))je<W&&0>i(Dr,Gt)?(R[q]=Dr,R[je]=j,q=je):(R[q]=Gt,R[ue]=j,q=ue);else if(je<W&&0>i(Dr,j))R[q]=Dr,R[je]=j,q=je;else break e}}return $}function i(R,$){var j=R.sortIndex-$.sortIndex;return j!==0?j:R.id-$.id}if(typeof performance=="object"&&typeof performance.now=="function"){var s=performance;t.unstable_now=function(){return s.now()}}else{var o=Date,a=o.now();t.unstable_now=function(){return o.now()-a}}var l=[],u=[],c=1,d=null,f=3,h=!1,y=!1,m=!1,_=typeof setTimeout=="function"?setTimeout:null,p=typeof clearTimeout=="function"?clearTimeout:null,g=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function v(R){for(var $=n(u);$!==null;){if($.callback===null)r(u);else if($.startTime<=R)r(u),$.sortIndex=$.expirationTime,e(l,$);else break;$=n(u)}}function w(R){if(m=!1,v(R),!y)if(n(l)!==null)y=!0,Y(E);else{var $=n(u);$!==null&&G(w,$.startTime-R)}}function E(R,$){y=!1,m&&(m=!1,p(S),S=-1),h=!0;var j=f;try{for(v($),d=n(l);d!==null&&(!(d.expirationTime>$)||R&&!O());){var q=d.callback;if(typeof q=="function"){d.callback=null,f=d.priorityLevel;var W=q(d.expirationTime<=$);$=t.unstable_now(),typeof W=="function"?d.callback=W:d===n(l)&&r(l),v($)}else r(l);d=n(l)}if(d!==null)var ve=!0;else{var ue=n(u);ue!==null&&G(w,ue.startTime-$),ve=!1}return ve}finally{d=null,f=j,h=!1}}var P=!1,C=null,S=-1,A=5,M=-1;function O(){return!(t.unstable_now()-M<A)}function T(){if(C!==null){var R=t.unstable_now();M=R;var $=!0;try{$=C(!0,R)}finally{$?D():(P=!1,C=null)}}else P=!1}var D;if(typeof g=="function")D=function(){g(T)};else if(typeof MessageChannel<"u"){var I=new MessageChannel,U=I.port2;I.port1.onmessage=T,D=function(){U.postMessage(null)}}else D=function(){_(T,0)};function Y(R){C=R,P||(P=!0,D())}function G(R,$){S=_(function(){R(t.unstable_now())},$)}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(R){R.callback=null},t.unstable_continueExecution=function(){y||h||(y=!0,Y(E))},t.unstable_forceFrameRate=function(R){0>R||125<R?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):A=0<R?Math.floor(1e3/R):5},t.unstable_getCurrentPriorityLevel=function(){return f},t.unstable_getFirstCallbackNode=function(){return n(l)},t.unstable_next=function(R){switch(f){case 1:case 2:case 3:var $=3;break;default:$=f}var j=f;f=$;try{return R()}finally{f=j}},t.unstable_pauseExecution=function(){},t.unstable_requestPaint=function(){},t.unstable_runWithPriority=function(R,$){switch(R){case 1:case 2:case 3:case 4:case 5:break;default:R=3}var j=f;f=R;try{return $()}finally{f=j}},t.unstable_scheduleCallback=function(R,$,j){var q=t.unstable_now();switch(typeof j=="object"&&j!==null?(j=j.delay,j=typeof j=="number"&&0<j?q+j:q):j=q,R){case 1:var W=-1;break;case 2:W=250;break;case 5:W=1073741823;break;case 4:W=1e4;break;default:W=5e3}return W=j+W,R={id:c++,callback:$,priorityLevel:R,startTime:j,expirationTime:W,sortIndex:-1},j>q?(R.sortIndex=j,e(u,R),n(l)===null&&R===n(u)&&(m?(p(S),S=-1):m=!0,G(w,j-q))):(R.sortIndex=W,e(l,R),y||h||(y=!0,Y(E))),R},t.unstable_shouldYield=O,t.unstable_wrapCallback=function(R){var $=f;return function(){var j=f;f=$;try{return R.apply(this,arguments)}finally{f=j}}}})(vy);my.exports=vy;var FS=my.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 jS=x,yt=FS;function N(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 yy=new Set,Ns={};function Or(t,e){mi(t,e),mi(t+"Capture",e)}function mi(t,e){for(Ns[t]=e,t=0;t<e.length;t++)yy.add(e[t])}var yn=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),nc=Object.prototype.hasOwnProperty,VS=/^[: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]*$/,pp={},gp={};function BS(t){return nc.call(gp,t)?!0:nc.call(pp,t)?!1:VS.test(t)?gp[t]=!0:(pp[t]=!0,!1)}function zS(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 US(t,e,n,r){if(e===null||typeof e>"u"||zS(t,e,n,r))return!0;if(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 tt(t,e,n,r,i,s,o){this.acceptsBooleans=e===2||e===3||e===4,this.attributeName=r,this.attributeNamespace=i,this.mustUseProperty=n,this.propertyName=t,this.type=e,this.sanitizeURL=s,this.removeEmptyString=o}var Fe={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(t){Fe[t]=new tt(t,0,!1,t,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(t){var e=t[0];Fe[e]=new tt(e,1,!1,t[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(t){Fe[t]=new tt(t,2,!1,t.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(t){Fe[t]=new tt(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){Fe[t]=new tt(t,3,!1,t.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(t){Fe[t]=new tt(t,3,!0,t,null,!1,!1)});["capture","download"].forEach(function(t){Fe[t]=new tt(t,4,!1,t,null,!1,!1)});["cols","rows","size","span"].forEach(function(t){Fe[t]=new tt(t,6,!1,t,null,!1,!1)});["rowSpan","start"].forEach(function(t){Fe[t]=new tt(t,5,!1,t.toLowerCase(),null,!1,!1)});var df=/[\-:]([a-z])/g;function ff(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(df,ff);Fe[e]=new tt(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(df,ff);Fe[e]=new tt(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(df,ff);Fe[e]=new tt(e,1,!1,t,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(t){Fe[t]=new tt(t,1,!1,t.toLowerCase(),null,!1,!1)});Fe.xlinkHref=new tt("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(t){Fe[t]=new tt(t,1,!1,t.toLowerCase(),null,!0,!0)});function hf(t,e,n,r){var i=Fe.hasOwnProperty(e)?Fe[e]:null;(i!==null?i.type!==0:r||!(2<e.length)||e[0]!=="o"&&e[0]!=="O"||e[1]!=="n"&&e[1]!=="N")&&(US(e,n,i,r)&&(n=null),r||i===null?BS(e)&&(n===null?t.removeAttribute(e):t.setAttribute(e,""+n)):i.mustUseProperty?t[i.propertyName]=n===null?i.type===3?!1:"":n:(e=i.attributeName,r=i.attributeNamespace,n===null?t.removeAttribute(e):(i=i.type,n=i===3||i===4&&n===!0?"":""+n,r?t.setAttributeNS(r,e,n):t.setAttribute(e,n))))}var Cn=jS.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,yo=Symbol.for("react.element"),Br=Symbol.for("react.portal"),zr=Symbol.for("react.fragment"),pf=Symbol.for("react.strict_mode"),rc=Symbol.for("react.profiler"),_y=Symbol.for("react.provider"),wy=Symbol.for("react.context"),gf=Symbol.for("react.forward_ref"),ic=Symbol.for("react.suspense"),sc=Symbol.for("react.suspense_list"),mf=Symbol.for("react.memo"),Nn=Symbol.for("react.lazy"),xy=Symbol.for("react.offscreen"),mp=Symbol.iterator;function Fi(t){return t===null||typeof t!="object"?null:(t=mp&&t[mp]||t["@@iterator"],typeof t=="function"?t:null)}var me=Object.assign,Yl;function ns(t){if(Yl===void 0)try{throw Error()}catch(n){var e=n.stack.trim().match(/\n( *(at )?)/);Yl=e&&e[1]||""}return`
|
|
34
|
+
`+Yl+t}var Xl=!1;function Ql(t,e){if(!t||Xl)return"";Xl=!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()}}catch(u){if(u&&r&&typeof u.stack=="string"){for(var i=u.stack.split(`
|
|
35
|
+
`),s=r.stack.split(`
|
|
36
|
+
`),o=i.length-1,a=s.length-1;1<=o&&0<=a&&i[o]!==s[a];)a--;for(;1<=o&&0<=a;o--,a--)if(i[o]!==s[a]){if(o!==1||a!==1)do if(o--,a--,0>a||i[o]!==s[a]){var l=`
|
|
37
|
+
`+i[o].replace(" at new "," at ");return t.displayName&&l.includes("<anonymous>")&&(l=l.replace("<anonymous>",t.displayName)),l}while(1<=o&&0<=a);break}}}finally{Xl=!1,Error.prepareStackTrace=n}return(t=t?t.displayName||t.name:"")?ns(t):""}function HS(t){switch(t.tag){case 5:return ns(t.type);case 16:return ns("Lazy");case 13:return ns("Suspense");case 19:return ns("SuspenseList");case 0:case 2:case 15:return t=Ql(t.type,!1),t;case 11:return t=Ql(t.type.render,!1),t;case 1:return t=Ql(t.type,!0),t;default:return""}}function oc(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 zr:return"Fragment";case Br:return"Portal";case rc:return"Profiler";case pf:return"StrictMode";case ic:return"Suspense";case sc:return"SuspenseList"}if(typeof t=="object")switch(t.$$typeof){case wy:return(t.displayName||"Context")+".Consumer";case _y:return(t._context.displayName||"Context")+".Provider";case gf:var e=t.render;return t=t.displayName,t||(t=e.displayName||e.name||"",t=t!==""?"ForwardRef("+t+")":"ForwardRef"),t;case mf:return e=t.displayName||null,e!==null?e:oc(t.type)||"Memo";case Nn:e=t._payload,t=t._init;try{return oc(t(e))}catch{}}return null}function WS(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 oc(e);case 8:return e===pf?"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 Xn(t){switch(typeof t){case"boolean":case"number":case"string":case"undefined":return t;case"object":return t;default:return""}}function Sy(t){var e=t.type;return(t=t.nodeName)&&t.toLowerCase()==="input"&&(e==="checkbox"||e==="radio")}function KS(t){var e=Sy(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 i=n.get,s=n.set;return Object.defineProperty(t,e,{configurable:!0,get:function(){return i.call(this)},set:function(o){r=""+o,s.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 _o(t){t._valueTracker||(t._valueTracker=KS(t))}function Ey(t){if(!t)return!1;var e=t._valueTracker;if(!e)return!0;var n=e.getValue(),r="";return t&&(r=Sy(t)?t.checked?"true":"false":t.value),t=r,t!==n?(e.setValue(t),!0):!1}function pa(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 ac(t,e){var n=e.checked;return me({},e,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??t._wrapperState.initialChecked})}function vp(t,e){var n=e.defaultValue==null?"":e.defaultValue,r=e.checked!=null?e.checked:e.defaultChecked;n=Xn(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 ky(t,e){e=e.checked,e!=null&&hf(t,"checked",e,!1)}function lc(t,e){ky(t,e);var n=Xn(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")?uc(t,e.type,n):e.hasOwnProperty("defaultValue")&&uc(t,e.type,Xn(e.defaultValue)),e.checked==null&&e.defaultChecked!=null&&(t.defaultChecked=!!e.defaultChecked)}function yp(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)}function uc(t,e,n){(e!=="number"||pa(t.ownerDocument)!==t)&&(n==null?t.defaultValue=""+t._wrapperState.initialValue:t.defaultValue!==""+n&&(t.defaultValue=""+n))}var rs=Array.isArray;function ai(t,e,n,r){if(t=t.options,e){e={};for(var i=0;i<n.length;i++)e["$"+n[i]]=!0;for(n=0;n<t.length;n++)i=e.hasOwnProperty("$"+t[n].value),t[n].selected!==i&&(t[n].selected=i),i&&r&&(t[n].defaultSelected=!0)}else{for(n=""+Xn(n),e=null,i=0;i<t.length;i++){if(t[i].value===n){t[i].selected=!0,r&&(t[i].defaultSelected=!0);return}e!==null||t[i].disabled||(e=t[i])}e!==null&&(e.selected=!0)}}function cc(t,e){if(e.dangerouslySetInnerHTML!=null)throw Error(N(91));return me({},e,{value:void 0,defaultValue:void 0,children:""+t._wrapperState.initialValue})}function _p(t,e){var n=e.value;if(n==null){if(n=e.children,e=e.defaultValue,n!=null){if(e!=null)throw Error(N(92));if(rs(n)){if(1<n.length)throw Error(N(93));n=n[0]}e=n}e==null&&(e=""),n=e}t._wrapperState={initialValue:Xn(n)}}function Cy(t,e){var n=Xn(e.value),r=Xn(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 wp(t){var e=t.textContent;e===t._wrapperState.initialValue&&e!==""&&e!==null&&(t.value=e)}function by(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 dc(t,e){return t==null||t==="http://www.w3.org/1999/xhtml"?by(e):t==="http://www.w3.org/2000/svg"&&e==="foreignObject"?"http://www.w3.org/1999/xhtml":t}var wo,Py=function(t){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(e,n,r,i){MSApp.execUnsafeLocalFunction(function(){return t(e,n,r,i)})}:t}(function(t,e){if(t.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in t)t.innerHTML=e;else{for(wo=wo||document.createElement("div"),wo.innerHTML="<svg>"+e.valueOf().toString()+"</svg>",e=wo.firstChild;t.firstChild;)t.removeChild(t.firstChild);for(;e.firstChild;)t.appendChild(e.firstChild)}});function Os(t,e){if(e){var n=t.firstChild;if(n&&n===t.lastChild&&n.nodeType===3){n.nodeValue=e;return}}t.textContent=e}var ms={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},GS=["Webkit","ms","Moz","O"];Object.keys(ms).forEach(function(t){GS.forEach(function(e){e=e+t.charAt(0).toUpperCase()+t.substring(1),ms[e]=ms[t]})});function Ty(t,e,n){return e==null||typeof e=="boolean"||e===""?"":n||typeof e!="number"||e===0||ms.hasOwnProperty(t)&&ms[t]?(""+e).trim():e+"px"}function Ay(t,e){t=t.style;for(var n in e)if(e.hasOwnProperty(n)){var r=n.indexOf("--")===0,i=Ty(n,e[n],r);n==="float"&&(n="cssFloat"),r?t.setProperty(n,i):t[n]=i}}var qS=me({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 fc(t,e){if(e){if(qS[t]&&(e.children!=null||e.dangerouslySetInnerHTML!=null))throw Error(N(137,t));if(e.dangerouslySetInnerHTML!=null){if(e.children!=null)throw Error(N(60));if(typeof e.dangerouslySetInnerHTML!="object"||!("__html"in e.dangerouslySetInnerHTML))throw Error(N(61))}if(e.style!=null&&typeof e.style!="object")throw Error(N(62))}}function hc(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 pc=null;function vf(t){return t=t.target||t.srcElement||window,t.correspondingUseElement&&(t=t.correspondingUseElement),t.nodeType===3?t.parentNode:t}var gc=null,li=null,ui=null;function xp(t){if(t=uo(t)){if(typeof gc!="function")throw Error(N(280));var e=t.stateNode;e&&(e=gl(e),gc(t.stateNode,t.type,e))}}function Ry(t){li?ui?ui.push(t):ui=[t]:li=t}function My(){if(li){var t=li,e=ui;if(ui=li=null,xp(t),e)for(t=0;t<e.length;t++)xp(e[t])}}function Iy(t,e){return t(e)}function Ny(){}var Zl=!1;function Oy(t,e,n){if(Zl)return t(e,n);Zl=!0;try{return Iy(t,e,n)}finally{Zl=!1,(li!==null||ui!==null)&&(Ny(),My())}}function Ls(t,e){var n=t.stateNode;if(n===null)return null;var r=gl(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(N(231,e,typeof n));return n}var mc=!1;if(yn)try{var ji={};Object.defineProperty(ji,"passive",{get:function(){mc=!0}}),window.addEventListener("test",ji,ji),window.removeEventListener("test",ji,ji)}catch{mc=!1}function YS(t,e,n,r,i,s,o,a,l){var u=Array.prototype.slice.call(arguments,3);try{e.apply(n,u)}catch(c){this.onError(c)}}var vs=!1,ga=null,ma=!1,vc=null,XS={onError:function(t){vs=!0,ga=t}};function QS(t,e,n,r,i,s,o,a,l){vs=!1,ga=null,YS.apply(XS,arguments)}function ZS(t,e,n,r,i,s,o,a,l){if(QS.apply(this,arguments),vs){if(vs){var u=ga;vs=!1,ga=null}else throw Error(N(198));ma||(ma=!0,vc=u)}}function Lr(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 Ly(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 Sp(t){if(Lr(t)!==t)throw Error(N(188))}function JS(t){var e=t.alternate;if(!e){if(e=Lr(t),e===null)throw Error(N(188));return e!==t?null:t}for(var n=t,r=e;;){var i=n.return;if(i===null)break;var s=i.alternate;if(s===null){if(r=i.return,r!==null){n=r;continue}break}if(i.child===s.child){for(s=i.child;s;){if(s===n)return Sp(i),t;if(s===r)return Sp(i),e;s=s.sibling}throw Error(N(188))}if(n.return!==r.return)n=i,r=s;else{for(var o=!1,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){for(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)throw Error(N(189))}}if(n.alternate!==r)throw Error(N(190))}if(n.tag!==3)throw Error(N(188));return n.stateNode.current===n?t:e}function Dy(t){return t=JS(t),t!==null?$y(t):null}function $y(t){if(t.tag===5||t.tag===6)return t;for(t=t.child;t!==null;){var e=$y(t);if(e!==null)return e;t=t.sibling}return null}var Fy=yt.unstable_scheduleCallback,Ep=yt.unstable_cancelCallback,eE=yt.unstable_shouldYield,tE=yt.unstable_requestPaint,ke=yt.unstable_now,nE=yt.unstable_getCurrentPriorityLevel,yf=yt.unstable_ImmediatePriority,jy=yt.unstable_UserBlockingPriority,va=yt.unstable_NormalPriority,rE=yt.unstable_LowPriority,Vy=yt.unstable_IdlePriority,dl=null,en=null;function iE(t){if(en&&typeof en.onCommitFiberRoot=="function")try{en.onCommitFiberRoot(dl,t,void 0,(t.current.flags&128)===128)}catch{}}var zt=Math.clz32?Math.clz32:aE,sE=Math.log,oE=Math.LN2;function aE(t){return t>>>=0,t===0?32:31-(sE(t)/oE|0)|0}var xo=64,So=4194304;function is(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 ya(t,e){var n=t.pendingLanes;if(n===0)return 0;var r=0,i=t.suspendedLanes,s=t.pingedLanes,o=n&268435455;if(o!==0){var a=o&~i;a!==0?r=is(a):(s&=o,s!==0&&(r=is(s)))}else o=n&~i,o!==0?r=is(o):s!==0&&(r=is(s));if(r===0)return 0;if(e!==0&&e!==r&&!(e&i)&&(i=r&-r,s=e&-e,i>=s||i===16&&(s&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-zt(e),i=1<<n,r|=t[n],e&=~i;return r}function lE(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 uE(t,e){for(var n=t.suspendedLanes,r=t.pingedLanes,i=t.expirationTimes,s=t.pendingLanes;0<s;){var o=31-zt(s),a=1<<o,l=i[o];l===-1?(!(a&n)||a&r)&&(i[o]=lE(a,e)):l<=e&&(t.expiredLanes|=a),s&=~a}}function yc(t){return t=t.pendingLanes&-1073741825,t!==0?t:t&1073741824?1073741824:0}function By(){var t=xo;return xo<<=1,!(xo&4194240)&&(xo=64),t}function Jl(t){for(var e=[],n=0;31>n;n++)e.push(t);return e}function ao(t,e,n){t.pendingLanes|=e,e!==536870912&&(t.suspendedLanes=0,t.pingedLanes=0),t=t.eventTimes,e=31-zt(e),t[e]=n}function cE(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 i=31-zt(n),s=1<<i;e[i]=0,r[i]=-1,t[i]=-1,n&=~s}}function _f(t,e){var n=t.entangledLanes|=e;for(t=t.entanglements;n;){var r=31-zt(n),i=1<<r;i&e|t[r]&e&&(t[r]|=e),n&=~i}}var te=0;function zy(t){return t&=-t,1<t?4<t?t&268435455?16:536870912:4:1}var Uy,wf,Hy,Wy,Ky,_c=!1,Eo=[],Vn=null,Bn=null,zn=null,Ds=new Map,$s=new Map,Ln=[],dE="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 kp(t,e){switch(t){case"focusin":case"focusout":Vn=null;break;case"dragenter":case"dragleave":Bn=null;break;case"mouseover":case"mouseout":zn=null;break;case"pointerover":case"pointerout":Ds.delete(e.pointerId);break;case"gotpointercapture":case"lostpointercapture":$s.delete(e.pointerId)}}function Vi(t,e,n,r,i,s){return t===null||t.nativeEvent!==s?(t={blockedOn:e,domEventName:n,eventSystemFlags:r,nativeEvent:s,targetContainers:[i]},e!==null&&(e=uo(e),e!==null&&wf(e)),t):(t.eventSystemFlags|=r,e=t.targetContainers,i!==null&&e.indexOf(i)===-1&&e.push(i),t)}function fE(t,e,n,r,i){switch(e){case"focusin":return Vn=Vi(Vn,t,e,n,r,i),!0;case"dragenter":return Bn=Vi(Bn,t,e,n,r,i),!0;case"mouseover":return zn=Vi(zn,t,e,n,r,i),!0;case"pointerover":var s=i.pointerId;return Ds.set(s,Vi(Ds.get(s)||null,t,e,n,r,i)),!0;case"gotpointercapture":return s=i.pointerId,$s.set(s,Vi($s.get(s)||null,t,e,n,r,i)),!0}return!1}function Gy(t){var e=gr(t.target);if(e!==null){var n=Lr(e);if(n!==null){if(e=n.tag,e===13){if(e=Ly(n),e!==null){t.blockedOn=e,Ky(t.priority,function(){Hy(n)});return}}else if(e===3&&n.stateNode.current.memoizedState.isDehydrated){t.blockedOn=n.tag===3?n.stateNode.containerInfo:null;return}}}t.blockedOn=null}function Qo(t){if(t.blockedOn!==null)return!1;for(var e=t.targetContainers;0<e.length;){var n=wc(t.domEventName,t.eventSystemFlags,e[0],t.nativeEvent);if(n===null){n=t.nativeEvent;var r=new n.constructor(n.type,n);pc=r,n.target.dispatchEvent(r),pc=null}else return e=uo(n),e!==null&&wf(e),t.blockedOn=n,!1;e.shift()}return!0}function Cp(t,e,n){Qo(t)&&n.delete(e)}function hE(){_c=!1,Vn!==null&&Qo(Vn)&&(Vn=null),Bn!==null&&Qo(Bn)&&(Bn=null),zn!==null&&Qo(zn)&&(zn=null),Ds.forEach(Cp),$s.forEach(Cp)}function Bi(t,e){t.blockedOn===e&&(t.blockedOn=null,_c||(_c=!0,yt.unstable_scheduleCallback(yt.unstable_NormalPriority,hE)))}function Fs(t){function e(i){return Bi(i,t)}if(0<Eo.length){Bi(Eo[0],t);for(var n=1;n<Eo.length;n++){var r=Eo[n];r.blockedOn===t&&(r.blockedOn=null)}}for(Vn!==null&&Bi(Vn,t),Bn!==null&&Bi(Bn,t),zn!==null&&Bi(zn,t),Ds.forEach(e),$s.forEach(e),n=0;n<Ln.length;n++)r=Ln[n],r.blockedOn===t&&(r.blockedOn=null);for(;0<Ln.length&&(n=Ln[0],n.blockedOn===null);)Gy(n),n.blockedOn===null&&Ln.shift()}var ci=Cn.ReactCurrentBatchConfig,_a=!0;function pE(t,e,n,r){var i=te,s=ci.transition;ci.transition=null;try{te=1,xf(t,e,n,r)}finally{te=i,ci.transition=s}}function gE(t,e,n,r){var i=te,s=ci.transition;ci.transition=null;try{te=4,xf(t,e,n,r)}finally{te=i,ci.transition=s}}function xf(t,e,n,r){if(_a){var i=wc(t,e,n,r);if(i===null)uu(t,e,r,wa,n),kp(t,r);else if(fE(i,t,e,n,r))r.stopPropagation();else if(kp(t,r),e&4&&-1<dE.indexOf(t)){for(;i!==null;){var s=uo(i);if(s!==null&&Uy(s),s=wc(t,e,n,r),s===null&&uu(t,e,r,wa,n),s===i)break;i=s}i!==null&&r.stopPropagation()}else uu(t,e,r,null,n)}}var wa=null;function wc(t,e,n,r){if(wa=null,t=vf(r),t=gr(t),t!==null)if(e=Lr(t),e===null)t=null;else if(n=e.tag,n===13){if(t=Ly(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 wa=t,null}function qy(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(nE()){case yf:return 1;case jy:return 4;case va:case rE:return 16;case Vy:return 536870912;default:return 16}default:return 16}}var $n=null,Sf=null,Zo=null;function Yy(){if(Zo)return Zo;var t,e=Sf,n=e.length,r,i="value"in $n?$n.value:$n.textContent,s=i.length;for(t=0;t<n&&e[t]===i[t];t++);var o=n-t;for(r=1;r<=o&&e[n-r]===i[s-r];r++);return Zo=i.slice(t,1<r?1-r:void 0)}function Jo(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 ko(){return!0}function bp(){return!1}function wt(t){function e(n,r,i,s,o){this._reactName=n,this._targetInst=i,this.type=r,this.nativeEvent=s,this.target=o,this.currentTarget=null;for(var a in t)t.hasOwnProperty(a)&&(n=t[a],this[a]=n?n(s):s[a]);return this.isDefaultPrevented=(s.defaultPrevented!=null?s.defaultPrevented:s.returnValue===!1)?ko:bp,this.isPropagationStopped=bp,this}return me(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=ko)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!="unknown"&&(n.cancelBubble=!0),this.isPropagationStopped=ko)},persist:function(){},isPersistent:ko}),e}var Ni={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(t){return t.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Ef=wt(Ni),lo=me({},Ni,{view:0,detail:0}),mE=wt(lo),eu,tu,zi,fl=me({},lo,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:kf,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!==zi&&(zi&&t.type==="mousemove"?(eu=t.screenX-zi.screenX,tu=t.screenY-zi.screenY):tu=eu=0,zi=t),eu)},movementY:function(t){return"movementY"in t?t.movementY:tu}}),Pp=wt(fl),vE=me({},fl,{dataTransfer:0}),yE=wt(vE),_E=me({},lo,{relatedTarget:0}),nu=wt(_E),wE=me({},Ni,{animationName:0,elapsedTime:0,pseudoElement:0}),xE=wt(wE),SE=me({},Ni,{clipboardData:function(t){return"clipboardData"in t?t.clipboardData:window.clipboardData}}),EE=wt(SE),kE=me({},Ni,{data:0}),Tp=wt(kE),CE={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},bE={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"},PE={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function TE(t){var e=this.nativeEvent;return e.getModifierState?e.getModifierState(t):(t=PE[t])?!!e[t]:!1}function kf(){return TE}var AE=me({},lo,{key:function(t){if(t.key){var e=CE[t.key]||t.key;if(e!=="Unidentified")return e}return t.type==="keypress"?(t=Jo(t),t===13?"Enter":String.fromCharCode(t)):t.type==="keydown"||t.type==="keyup"?bE[t.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:kf,charCode:function(t){return t.type==="keypress"?Jo(t):0},keyCode:function(t){return t.type==="keydown"||t.type==="keyup"?t.keyCode:0},which:function(t){return t.type==="keypress"?Jo(t):t.type==="keydown"||t.type==="keyup"?t.keyCode:0}}),RE=wt(AE),ME=me({},fl,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Ap=wt(ME),IE=me({},lo,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:kf}),NE=wt(IE),OE=me({},Ni,{propertyName:0,elapsedTime:0,pseudoElement:0}),LE=wt(OE),DE=me({},fl,{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}),$E=wt(DE),FE=[9,13,27,32],Cf=yn&&"CompositionEvent"in window,ys=null;yn&&"documentMode"in document&&(ys=document.documentMode);var jE=yn&&"TextEvent"in window&&!ys,Xy=yn&&(!Cf||ys&&8<ys&&11>=ys),Rp=" ",Mp=!1;function Qy(t,e){switch(t){case"keyup":return FE.indexOf(e.keyCode)!==-1;case"keydown":return e.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Zy(t){return t=t.detail,typeof t=="object"&&"data"in t?t.data:null}var Ur=!1;function VE(t,e){switch(t){case"compositionend":return Zy(e);case"keypress":return e.which!==32?null:(Mp=!0,Rp);case"textInput":return t=e.data,t===Rp&&Mp?null:t;default:return null}}function BE(t,e){if(Ur)return t==="compositionend"||!Cf&&Qy(t,e)?(t=Yy(),Zo=Sf=$n=null,Ur=!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 Xy&&e.locale!=="ko"?null:e.data;default:return null}}var zE={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 Ip(t){var e=t&&t.nodeName&&t.nodeName.toLowerCase();return e==="input"?!!zE[t.type]:e==="textarea"}function Jy(t,e,n,r){Ry(r),e=xa(e,"onChange"),0<e.length&&(n=new Ef("onChange","change",null,n,r),t.push({event:n,listeners:e}))}var _s=null,js=null;function UE(t){c0(t,0)}function hl(t){var e=Kr(t);if(Ey(e))return t}function HE(t,e){if(t==="change")return e}var e0=!1;if(yn){var ru;if(yn){var iu="oninput"in document;if(!iu){var Np=document.createElement("div");Np.setAttribute("oninput","return;"),iu=typeof Np.oninput=="function"}ru=iu}else ru=!1;e0=ru&&(!document.documentMode||9<document.documentMode)}function Op(){_s&&(_s.detachEvent("onpropertychange",t0),js=_s=null)}function t0(t){if(t.propertyName==="value"&&hl(js)){var e=[];Jy(e,js,t,vf(t)),Oy(UE,e)}}function WE(t,e,n){t==="focusin"?(Op(),_s=e,js=n,_s.attachEvent("onpropertychange",t0)):t==="focusout"&&Op()}function KE(t){if(t==="selectionchange"||t==="keyup"||t==="keydown")return hl(js)}function GE(t,e){if(t==="click")return hl(e)}function qE(t,e){if(t==="input"||t==="change")return hl(e)}function YE(t,e){return t===e&&(t!==0||1/t===1/e)||t!==t&&e!==e}var Ht=typeof Object.is=="function"?Object.is:YE;function Vs(t,e){if(Ht(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 i=n[r];if(!nc.call(e,i)||!Ht(t[i],e[i]))return!1}return!0}function Lp(t){for(;t&&t.firstChild;)t=t.firstChild;return t}function Dp(t,e){var n=Lp(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=Lp(n)}}function n0(t,e){return t&&e?t===e?!0:t&&t.nodeType===3?!1:e&&e.nodeType===3?n0(t,e.parentNode):"contains"in t?t.contains(e):t.compareDocumentPosition?!!(t.compareDocumentPosition(e)&16):!1:!1}function r0(){for(var t=window,e=pa();e instanceof t.HTMLIFrameElement;){try{var n=typeof e.contentWindow.location.href=="string"}catch{n=!1}if(n)t=e.contentWindow;else break;e=pa(t.document)}return e}function bf(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 XE(t){var e=r0(),n=t.focusedElem,r=t.selectionRange;if(e!==n&&n&&n.ownerDocument&&n0(n.ownerDocument.documentElement,n)){if(r!==null&&bf(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 i=n.textContent.length,s=Math.min(r.start,i);r=r.end===void 0?s:Math.min(r.end,i),!t.extend&&s>r&&(i=r,r=s,s=i),i=Dp(n,s);var o=Dp(n,r);i&&o&&(t.rangeCount!==1||t.anchorNode!==i.node||t.anchorOffset!==i.offset||t.focusNode!==o.node||t.focusOffset!==o.offset)&&(e=e.createRange(),e.setStart(i.node,i.offset),t.removeAllRanges(),s>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 QE=yn&&"documentMode"in document&&11>=document.documentMode,Hr=null,xc=null,ws=null,Sc=!1;function $p(t,e,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Sc||Hr==null||Hr!==pa(r)||(r=Hr,"selectionStart"in r&&bf(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}),ws&&Vs(ws,r)||(ws=r,r=xa(xc,"onSelect"),0<r.length&&(e=new Ef("onSelect","select",null,e,n),t.push({event:e,listeners:r}),e.target=Hr)))}function Co(t,e){var n={};return n[t.toLowerCase()]=e.toLowerCase(),n["Webkit"+t]="webkit"+e,n["Moz"+t]="moz"+e,n}var Wr={animationend:Co("Animation","AnimationEnd"),animationiteration:Co("Animation","AnimationIteration"),animationstart:Co("Animation","AnimationStart"),transitionend:Co("Transition","TransitionEnd")},su={},i0={};yn&&(i0=document.createElement("div").style,"AnimationEvent"in window||(delete Wr.animationend.animation,delete Wr.animationiteration.animation,delete Wr.animationstart.animation),"TransitionEvent"in window||delete Wr.transitionend.transition);function pl(t){if(su[t])return su[t];if(!Wr[t])return t;var e=Wr[t],n;for(n in e)if(e.hasOwnProperty(n)&&n in i0)return su[t]=e[n];return t}var s0=pl("animationend"),o0=pl("animationiteration"),a0=pl("animationstart"),l0=pl("transitionend"),u0=new Map,Fp="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 tr(t,e){u0.set(t,e),Or(e,[t])}for(var ou=0;ou<Fp.length;ou++){var au=Fp[ou],ZE=au.toLowerCase(),JE=au[0].toUpperCase()+au.slice(1);tr(ZE,"on"+JE)}tr(s0,"onAnimationEnd");tr(o0,"onAnimationIteration");tr(a0,"onAnimationStart");tr("dblclick","onDoubleClick");tr("focusin","onFocus");tr("focusout","onBlur");tr(l0,"onTransitionEnd");mi("onMouseEnter",["mouseout","mouseover"]);mi("onMouseLeave",["mouseout","mouseover"]);mi("onPointerEnter",["pointerout","pointerover"]);mi("onPointerLeave",["pointerout","pointerover"]);Or("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));Or("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));Or("onBeforeInput",["compositionend","keypress","textInput","paste"]);Or("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));Or("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));Or("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var ss="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(" "),ek=new Set("cancel close invalid load scroll toggle".split(" ").concat(ss));function jp(t,e,n){var r=t.type||"unknown-event";t.currentTarget=n,ZS(r,e,void 0,t),t.currentTarget=null}function c0(t,e){e=(e&4)!==0;for(var n=0;n<t.length;n++){var r=t[n],i=r.event;r=r.listeners;e:{var s=void 0;if(e)for(var o=r.length-1;0<=o;o--){var a=r[o],l=a.instance,u=a.currentTarget;if(a=a.listener,l!==s&&i.isPropagationStopped())break e;jp(i,a,u),s=l}else for(o=0;o<r.length;o++){if(a=r[o],l=a.instance,u=a.currentTarget,a=a.listener,l!==s&&i.isPropagationStopped())break e;jp(i,a,u),s=l}}}if(ma)throw t=vc,ma=!1,vc=null,t}function oe(t,e){var n=e[Pc];n===void 0&&(n=e[Pc]=new Set);var r=t+"__bubble";n.has(r)||(d0(e,t,2,!1),n.add(r))}function lu(t,e,n){var r=0;e&&(r|=4),d0(n,t,r,e)}var bo="_reactListening"+Math.random().toString(36).slice(2);function Bs(t){if(!t[bo]){t[bo]=!0,yy.forEach(function(n){n!=="selectionchange"&&(ek.has(n)||lu(n,!1,t),lu(n,!0,t))});var e=t.nodeType===9?t:t.ownerDocument;e===null||e[bo]||(e[bo]=!0,lu("selectionchange",!1,e))}}function d0(t,e,n,r){switch(qy(e)){case 1:var i=pE;break;case 4:i=gE;break;default:i=xf}n=i.bind(null,e,n,t),i=void 0,!mc||e!=="touchstart"&&e!=="touchmove"&&e!=="wheel"||(i=!0),r?i!==void 0?t.addEventListener(e,n,{capture:!0,passive:i}):t.addEventListener(e,n,!0):i!==void 0?t.addEventListener(e,n,{passive:i}):t.addEventListener(e,n,!1)}function uu(t,e,n,r,i){var s=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===i||a.nodeType===8&&a.parentNode===i)break;if(o===4)for(o=r.return;o!==null;){var l=o.tag;if((l===3||l===4)&&(l=o.stateNode.containerInfo,l===i||l.nodeType===8&&l.parentNode===i))return;o=o.return}for(;a!==null;){if(o=gr(a),o===null)return;if(l=o.tag,l===5||l===6){r=s=o;continue e}a=a.parentNode}}r=r.return}Oy(function(){var u=s,c=vf(n),d=[];e:{var f=u0.get(t);if(f!==void 0){var h=Ef,y=t;switch(t){case"keypress":if(Jo(n)===0)break e;case"keydown":case"keyup":h=RE;break;case"focusin":y="focus",h=nu;break;case"focusout":y="blur",h=nu;break;case"beforeblur":case"afterblur":h=nu;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":h=Pp;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":h=yE;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":h=NE;break;case s0:case o0:case a0:h=xE;break;case l0:h=LE;break;case"scroll":h=mE;break;case"wheel":h=$E;break;case"copy":case"cut":case"paste":h=EE;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":h=Ap}var m=(e&4)!==0,_=!m&&t==="scroll",p=m?f!==null?f+"Capture":null:f;m=[];for(var g=u,v;g!==null;){v=g;var w=v.stateNode;if(v.tag===5&&w!==null&&(v=w,p!==null&&(w=Ls(g,p),w!=null&&m.push(zs(g,w,v)))),_)break;g=g.return}0<m.length&&(f=new h(f,y,null,n,c),d.push({event:f,listeners:m}))}}if(!(e&7)){e:{if(f=t==="mouseover"||t==="pointerover",h=t==="mouseout"||t==="pointerout",f&&n!==pc&&(y=n.relatedTarget||n.fromElement)&&(gr(y)||y[_n]))break e;if((h||f)&&(f=c.window===c?c:(f=c.ownerDocument)?f.defaultView||f.parentWindow:window,h?(y=n.relatedTarget||n.toElement,h=u,y=y?gr(y):null,y!==null&&(_=Lr(y),y!==_||y.tag!==5&&y.tag!==6)&&(y=null)):(h=null,y=u),h!==y)){if(m=Pp,w="onMouseLeave",p="onMouseEnter",g="mouse",(t==="pointerout"||t==="pointerover")&&(m=Ap,w="onPointerLeave",p="onPointerEnter",g="pointer"),_=h==null?f:Kr(h),v=y==null?f:Kr(y),f=new m(w,g+"leave",h,n,c),f.target=_,f.relatedTarget=v,w=null,gr(c)===u&&(m=new m(p,g+"enter",y,n,c),m.target=v,m.relatedTarget=_,w=m),_=w,h&&y)t:{for(m=h,p=y,g=0,v=m;v;v=$r(v))g++;for(v=0,w=p;w;w=$r(w))v++;for(;0<g-v;)m=$r(m),g--;for(;0<v-g;)p=$r(p),v--;for(;g--;){if(m===p||p!==null&&m===p.alternate)break t;m=$r(m),p=$r(p)}m=null}else m=null;h!==null&&Vp(d,f,h,m,!1),y!==null&&_!==null&&Vp(d,_,y,m,!0)}}e:{if(f=u?Kr(u):window,h=f.nodeName&&f.nodeName.toLowerCase(),h==="select"||h==="input"&&f.type==="file")var E=HE;else if(Ip(f))if(e0)E=qE;else{E=KE;var P=WE}else(h=f.nodeName)&&h.toLowerCase()==="input"&&(f.type==="checkbox"||f.type==="radio")&&(E=GE);if(E&&(E=E(t,u))){Jy(d,E,n,c);break e}P&&P(t,f,u),t==="focusout"&&(P=f._wrapperState)&&P.controlled&&f.type==="number"&&uc(f,"number",f.value)}switch(P=u?Kr(u):window,t){case"focusin":(Ip(P)||P.contentEditable==="true")&&(Hr=P,xc=u,ws=null);break;case"focusout":ws=xc=Hr=null;break;case"mousedown":Sc=!0;break;case"contextmenu":case"mouseup":case"dragend":Sc=!1,$p(d,n,c);break;case"selectionchange":if(QE)break;case"keydown":case"keyup":$p(d,n,c)}var C;if(Cf)e:{switch(t){case"compositionstart":var S="onCompositionStart";break e;case"compositionend":S="onCompositionEnd";break e;case"compositionupdate":S="onCompositionUpdate";break e}S=void 0}else Ur?Qy(t,n)&&(S="onCompositionEnd"):t==="keydown"&&n.keyCode===229&&(S="onCompositionStart");S&&(Xy&&n.locale!=="ko"&&(Ur||S!=="onCompositionStart"?S==="onCompositionEnd"&&Ur&&(C=Yy()):($n=c,Sf="value"in $n?$n.value:$n.textContent,Ur=!0)),P=xa(u,S),0<P.length&&(S=new Tp(S,t,null,n,c),d.push({event:S,listeners:P}),C?S.data=C:(C=Zy(n),C!==null&&(S.data=C)))),(C=jE?VE(t,n):BE(t,n))&&(u=xa(u,"onBeforeInput"),0<u.length&&(c=new Tp("onBeforeInput","beforeinput",null,n,c),d.push({event:c,listeners:u}),c.data=C))}c0(d,e)})}function zs(t,e,n){return{instance:t,listener:e,currentTarget:n}}function xa(t,e){for(var n=e+"Capture",r=[];t!==null;){var i=t,s=i.stateNode;i.tag===5&&s!==null&&(i=s,s=Ls(t,n),s!=null&&r.unshift(zs(t,s,i)),s=Ls(t,e),s!=null&&r.push(zs(t,s,i))),t=t.return}return r}function $r(t){if(t===null)return null;do t=t.return;while(t&&t.tag!==5);return t||null}function Vp(t,e,n,r,i){for(var s=e._reactName,o=[];n!==null&&n!==r;){var a=n,l=a.alternate,u=a.stateNode;if(l!==null&&l===r)break;a.tag===5&&u!==null&&(a=u,i?(l=Ls(n,s),l!=null&&o.unshift(zs(n,l,a))):i||(l=Ls(n,s),l!=null&&o.push(zs(n,l,a)))),n=n.return}o.length!==0&&t.push({event:e,listeners:o})}var tk=/\r\n?/g,nk=/\u0000|\uFFFD/g;function Bp(t){return(typeof t=="string"?t:""+t).replace(tk,`
|
|
38
|
+
`).replace(nk,"")}function Po(t,e,n){if(e=Bp(e),Bp(t)!==e&&n)throw Error(N(425))}function Sa(){}var Ec=null,kc=null;function Cc(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 bc=typeof setTimeout=="function"?setTimeout:void 0,rk=typeof clearTimeout=="function"?clearTimeout:void 0,zp=typeof Promise=="function"?Promise:void 0,ik=typeof queueMicrotask=="function"?queueMicrotask:typeof zp<"u"?function(t){return zp.resolve(null).then(t).catch(sk)}:bc;function sk(t){setTimeout(function(){throw t})}function cu(t,e){var n=e,r=0;do{var i=n.nextSibling;if(t.removeChild(n),i&&i.nodeType===8)if(n=i.data,n==="/$"){if(r===0){t.removeChild(i),Fs(e);return}r--}else n!=="$"&&n!=="$?"&&n!=="$!"||r++;n=i}while(n);Fs(e)}function Un(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 Up(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 Oi=Math.random().toString(36).slice(2),Zt="__reactFiber$"+Oi,Us="__reactProps$"+Oi,_n="__reactContainer$"+Oi,Pc="__reactEvents$"+Oi,ok="__reactListeners$"+Oi,ak="__reactHandles$"+Oi;function gr(t){var e=t[Zt];if(e)return e;for(var n=t.parentNode;n;){if(e=n[_n]||n[Zt]){if(n=e.alternate,e.child!==null||n!==null&&n.child!==null)for(t=Up(t);t!==null;){if(n=t[Zt])return n;t=Up(t)}return e}t=n,n=t.parentNode}return null}function uo(t){return t=t[Zt]||t[_n],!t||t.tag!==5&&t.tag!==6&&t.tag!==13&&t.tag!==3?null:t}function Kr(t){if(t.tag===5||t.tag===6)return t.stateNode;throw Error(N(33))}function gl(t){return t[Us]||null}var Tc=[],Gr=-1;function nr(t){return{current:t}}function le(t){0>Gr||(t.current=Tc[Gr],Tc[Gr]=null,Gr--)}function se(t,e){Gr++,Tc[Gr]=t.current,t.current=e}var Qn={},qe=nr(Qn),ct=nr(!1),kr=Qn;function vi(t,e){var n=t.type.contextTypes;if(!n)return Qn;var r=t.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===e)return r.__reactInternalMemoizedMaskedChildContext;var i={},s;for(s in n)i[s]=e[s];return r&&(t=t.stateNode,t.__reactInternalMemoizedUnmaskedChildContext=e,t.__reactInternalMemoizedMaskedChildContext=i),i}function dt(t){return t=t.childContextTypes,t!=null}function Ea(){le(ct),le(qe)}function Hp(t,e,n){if(qe.current!==Qn)throw Error(N(168));se(qe,e),se(ct,n)}function f0(t,e,n){var r=t.stateNode;if(e=e.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var i in r)if(!(i in e))throw Error(N(108,WS(t)||"Unknown",i));return me({},n,r)}function ka(t){return t=(t=t.stateNode)&&t.__reactInternalMemoizedMergedChildContext||Qn,kr=qe.current,se(qe,t),se(ct,ct.current),!0}function Wp(t,e,n){var r=t.stateNode;if(!r)throw Error(N(169));n?(t=f0(t,e,kr),r.__reactInternalMemoizedMergedChildContext=t,le(ct),le(qe),se(qe,t)):le(ct),se(ct,n)}var fn=null,ml=!1,du=!1;function h0(t){fn===null?fn=[t]:fn.push(t)}function lk(t){ml=!0,h0(t)}function rr(){if(!du&&fn!==null){du=!0;var t=0,e=te;try{var n=fn;for(te=1;t<n.length;t++){var r=n[t];do r=r(!0);while(r!==null)}fn=null,ml=!1}catch(i){throw fn!==null&&(fn=fn.slice(t+1)),Fy(yf,rr),i}finally{te=e,du=!1}}return null}var qr=[],Yr=0,Ca=null,ba=0,Et=[],kt=0,Cr=null,gn=1,mn="";function cr(t,e){qr[Yr++]=ba,qr[Yr++]=Ca,Ca=t,ba=e}function p0(t,e,n){Et[kt++]=gn,Et[kt++]=mn,Et[kt++]=Cr,Cr=t;var r=gn;t=mn;var i=32-zt(r)-1;r&=~(1<<i),n+=1;var s=32-zt(e)+i;if(30<s){var o=i-i%5;s=(r&(1<<o)-1).toString(32),r>>=o,i-=o,gn=1<<32-zt(e)+i|n<<i|r,mn=s+t}else gn=1<<s|n<<i|r,mn=t}function Pf(t){t.return!==null&&(cr(t,1),p0(t,1,0))}function Tf(t){for(;t===Ca;)Ca=qr[--Yr],qr[Yr]=null,ba=qr[--Yr],qr[Yr]=null;for(;t===Cr;)Cr=Et[--kt],Et[kt]=null,mn=Et[--kt],Et[kt]=null,gn=Et[--kt],Et[kt]=null}var vt=null,pt=null,ce=!1,Vt=null;function g0(t,e){var n=Ct(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 Kp(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,vt=t,pt=Un(e.firstChild),!0):!1;case 6:return e=t.pendingProps===""||e.nodeType!==3?null:e,e!==null?(t.stateNode=e,vt=t,pt=null,!0):!1;case 13:return e=e.nodeType!==8?null:e,e!==null?(n=Cr!==null?{id:gn,overflow:mn}:null,t.memoizedState={dehydrated:e,treeContext:n,retryLane:1073741824},n=Ct(18,null,null,0),n.stateNode=e,n.return=t,t.child=n,vt=t,pt=null,!0):!1;default:return!1}}function Ac(t){return(t.mode&1)!==0&&(t.flags&128)===0}function Rc(t){if(ce){var e=pt;if(e){var n=e;if(!Kp(t,e)){if(Ac(t))throw Error(N(418));e=Un(n.nextSibling);var r=vt;e&&Kp(t,e)?g0(r,n):(t.flags=t.flags&-4097|2,ce=!1,vt=t)}}else{if(Ac(t))throw Error(N(418));t.flags=t.flags&-4097|2,ce=!1,vt=t}}}function Gp(t){for(t=t.return;t!==null&&t.tag!==5&&t.tag!==3&&t.tag!==13;)t=t.return;vt=t}function To(t){if(t!==vt)return!1;if(!ce)return Gp(t),ce=!0,!1;var e;if((e=t.tag!==3)&&!(e=t.tag!==5)&&(e=t.type,e=e!=="head"&&e!=="body"&&!Cc(t.type,t.memoizedProps)),e&&(e=pt)){if(Ac(t))throw m0(),Error(N(418));for(;e;)g0(t,e),e=Un(e.nextSibling)}if(Gp(t),t.tag===13){if(t=t.memoizedState,t=t!==null?t.dehydrated:null,!t)throw Error(N(317));e:{for(t=t.nextSibling,e=0;t;){if(t.nodeType===8){var n=t.data;if(n==="/$"){if(e===0){pt=Un(t.nextSibling);break e}e--}else n!=="$"&&n!=="$!"&&n!=="$?"||e++}t=t.nextSibling}pt=null}}else pt=vt?Un(t.stateNode.nextSibling):null;return!0}function m0(){for(var t=pt;t;)t=Un(t.nextSibling)}function yi(){pt=vt=null,ce=!1}function Af(t){Vt===null?Vt=[t]:Vt.push(t)}var uk=Cn.ReactCurrentBatchConfig;function Ui(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(N(309));var r=n.stateNode}if(!r)throw Error(N(147,t));var i=r,s=""+t;return e!==null&&e.ref!==null&&typeof e.ref=="function"&&e.ref._stringRef===s?e.ref:(e=function(o){var a=i.refs;o===null?delete a[s]:a[s]=o},e._stringRef=s,e)}if(typeof t!="string")throw Error(N(284));if(!n._owner)throw Error(N(290,t))}return t}function Ao(t,e){throw t=Object.prototype.toString.call(e),Error(N(31,t==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":t))}function qp(t){var e=t._init;return e(t._payload)}function v0(t){function e(p,g){if(t){var v=p.deletions;v===null?(p.deletions=[g],p.flags|=16):v.push(g)}}function n(p,g){if(!t)return null;for(;g!==null;)e(p,g),g=g.sibling;return null}function r(p,g){for(p=new Map;g!==null;)g.key!==null?p.set(g.key,g):p.set(g.index,g),g=g.sibling;return p}function i(p,g){return p=Gn(p,g),p.index=0,p.sibling=null,p}function s(p,g,v){return p.index=v,t?(v=p.alternate,v!==null?(v=v.index,v<g?(p.flags|=2,g):v):(p.flags|=2,g)):(p.flags|=1048576,g)}function o(p){return t&&p.alternate===null&&(p.flags|=2),p}function a(p,g,v,w){return g===null||g.tag!==6?(g=yu(v,p.mode,w),g.return=p,g):(g=i(g,v),g.return=p,g)}function l(p,g,v,w){var E=v.type;return E===zr?c(p,g,v.props.children,w,v.key):g!==null&&(g.elementType===E||typeof E=="object"&&E!==null&&E.$$typeof===Nn&&qp(E)===g.type)?(w=i(g,v.props),w.ref=Ui(p,g,v),w.return=p,w):(w=oa(v.type,v.key,v.props,null,p.mode,w),w.ref=Ui(p,g,v),w.return=p,w)}function u(p,g,v,w){return g===null||g.tag!==4||g.stateNode.containerInfo!==v.containerInfo||g.stateNode.implementation!==v.implementation?(g=_u(v,p.mode,w),g.return=p,g):(g=i(g,v.children||[]),g.return=p,g)}function c(p,g,v,w,E){return g===null||g.tag!==7?(g=xr(v,p.mode,w,E),g.return=p,g):(g=i(g,v),g.return=p,g)}function d(p,g,v){if(typeof g=="string"&&g!==""||typeof g=="number")return g=yu(""+g,p.mode,v),g.return=p,g;if(typeof g=="object"&&g!==null){switch(g.$$typeof){case yo:return v=oa(g.type,g.key,g.props,null,p.mode,v),v.ref=Ui(p,null,g),v.return=p,v;case Br:return g=_u(g,p.mode,v),g.return=p,g;case Nn:var w=g._init;return d(p,w(g._payload),v)}if(rs(g)||Fi(g))return g=xr(g,p.mode,v,null),g.return=p,g;Ao(p,g)}return null}function f(p,g,v,w){var E=g!==null?g.key:null;if(typeof v=="string"&&v!==""||typeof v=="number")return E!==null?null:a(p,g,""+v,w);if(typeof v=="object"&&v!==null){switch(v.$$typeof){case yo:return v.key===E?l(p,g,v,w):null;case Br:return v.key===E?u(p,g,v,w):null;case Nn:return E=v._init,f(p,g,E(v._payload),w)}if(rs(v)||Fi(v))return E!==null?null:c(p,g,v,w,null);Ao(p,v)}return null}function h(p,g,v,w,E){if(typeof w=="string"&&w!==""||typeof w=="number")return p=p.get(v)||null,a(g,p,""+w,E);if(typeof w=="object"&&w!==null){switch(w.$$typeof){case yo:return p=p.get(w.key===null?v:w.key)||null,l(g,p,w,E);case Br:return p=p.get(w.key===null?v:w.key)||null,u(g,p,w,E);case Nn:var P=w._init;return h(p,g,v,P(w._payload),E)}if(rs(w)||Fi(w))return p=p.get(v)||null,c(g,p,w,E,null);Ao(g,w)}return null}function y(p,g,v,w){for(var E=null,P=null,C=g,S=g=0,A=null;C!==null&&S<v.length;S++){C.index>S?(A=C,C=null):A=C.sibling;var M=f(p,C,v[S],w);if(M===null){C===null&&(C=A);break}t&&C&&M.alternate===null&&e(p,C),g=s(M,g,S),P===null?E=M:P.sibling=M,P=M,C=A}if(S===v.length)return n(p,C),ce&&cr(p,S),E;if(C===null){for(;S<v.length;S++)C=d(p,v[S],w),C!==null&&(g=s(C,g,S),P===null?E=C:P.sibling=C,P=C);return ce&&cr(p,S),E}for(C=r(p,C);S<v.length;S++)A=h(C,p,S,v[S],w),A!==null&&(t&&A.alternate!==null&&C.delete(A.key===null?S:A.key),g=s(A,g,S),P===null?E=A:P.sibling=A,P=A);return t&&C.forEach(function(O){return e(p,O)}),ce&&cr(p,S),E}function m(p,g,v,w){var E=Fi(v);if(typeof E!="function")throw Error(N(150));if(v=E.call(v),v==null)throw Error(N(151));for(var P=E=null,C=g,S=g=0,A=null,M=v.next();C!==null&&!M.done;S++,M=v.next()){C.index>S?(A=C,C=null):A=C.sibling;var O=f(p,C,M.value,w);if(O===null){C===null&&(C=A);break}t&&C&&O.alternate===null&&e(p,C),g=s(O,g,S),P===null?E=O:P.sibling=O,P=O,C=A}if(M.done)return n(p,C),ce&&cr(p,S),E;if(C===null){for(;!M.done;S++,M=v.next())M=d(p,M.value,w),M!==null&&(g=s(M,g,S),P===null?E=M:P.sibling=M,P=M);return ce&&cr(p,S),E}for(C=r(p,C);!M.done;S++,M=v.next())M=h(C,p,S,M.value,w),M!==null&&(t&&M.alternate!==null&&C.delete(M.key===null?S:M.key),g=s(M,g,S),P===null?E=M:P.sibling=M,P=M);return t&&C.forEach(function(T){return e(p,T)}),ce&&cr(p,S),E}function _(p,g,v,w){if(typeof v=="object"&&v!==null&&v.type===zr&&v.key===null&&(v=v.props.children),typeof v=="object"&&v!==null){switch(v.$$typeof){case yo:e:{for(var E=v.key,P=g;P!==null;){if(P.key===E){if(E=v.type,E===zr){if(P.tag===7){n(p,P.sibling),g=i(P,v.props.children),g.return=p,p=g;break e}}else if(P.elementType===E||typeof E=="object"&&E!==null&&E.$$typeof===Nn&&qp(E)===P.type){n(p,P.sibling),g=i(P,v.props),g.ref=Ui(p,P,v),g.return=p,p=g;break e}n(p,P);break}else e(p,P);P=P.sibling}v.type===zr?(g=xr(v.props.children,p.mode,w,v.key),g.return=p,p=g):(w=oa(v.type,v.key,v.props,null,p.mode,w),w.ref=Ui(p,g,v),w.return=p,p=w)}return o(p);case Br:e:{for(P=v.key;g!==null;){if(g.key===P)if(g.tag===4&&g.stateNode.containerInfo===v.containerInfo&&g.stateNode.implementation===v.implementation){n(p,g.sibling),g=i(g,v.children||[]),g.return=p,p=g;break e}else{n(p,g);break}else e(p,g);g=g.sibling}g=_u(v,p.mode,w),g.return=p,p=g}return o(p);case Nn:return P=v._init,_(p,g,P(v._payload),w)}if(rs(v))return y(p,g,v,w);if(Fi(v))return m(p,g,v,w);Ao(p,v)}return typeof v=="string"&&v!==""||typeof v=="number"?(v=""+v,g!==null&&g.tag===6?(n(p,g.sibling),g=i(g,v),g.return=p,p=g):(n(p,g),g=yu(v,p.mode,w),g.return=p,p=g),o(p)):n(p,g)}return _}var _i=v0(!0),y0=v0(!1),Pa=nr(null),Ta=null,Xr=null,Rf=null;function Mf(){Rf=Xr=Ta=null}function If(t){var e=Pa.current;le(Pa),t._currentValue=e}function Mc(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 di(t,e){Ta=t,Rf=Xr=null,t=t.dependencies,t!==null&&t.firstContext!==null&&(t.lanes&e&&(ot=!0),t.firstContext=null)}function It(t){var e=t._currentValue;if(Rf!==t)if(t={context:t,memoizedValue:e,next:null},Xr===null){if(Ta===null)throw Error(N(308));Xr=t,Ta.dependencies={lanes:0,firstContext:t}}else Xr=Xr.next=t;return e}var mr=null;function Nf(t){mr===null?mr=[t]:mr.push(t)}function _0(t,e,n,r){var i=e.interleaved;return i===null?(n.next=n,Nf(e)):(n.next=i.next,i.next=n),e.interleaved=n,wn(t,r)}function wn(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 On=!1;function Of(t){t.updateQueue={baseState:t.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function w0(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 vn(t,e){return{eventTime:t,lane:e,tag:0,payload:null,callback:null,next:null}}function Hn(t,e,n){var r=t.updateQueue;if(r===null)return null;if(r=r.shared,J&2){var i=r.pending;return i===null?e.next=e:(e.next=i.next,i.next=e),r.pending=e,wn(t,n)}return i=r.interleaved,i===null?(e.next=e,Nf(r)):(e.next=i.next,i.next=e),r.interleaved=e,wn(t,n)}function ea(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,_f(t,n)}}function Yp(t,e){var n=t.updateQueue,r=t.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var i=null,s=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};s===null?i=s=o:s=s.next=o,n=n.next}while(n!==null);s===null?i=s=e:s=s.next=e}else i=s=e;n={baseState:r.baseState,firstBaseUpdate:i,lastBaseUpdate:s,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 Aa(t,e,n,r){var i=t.updateQueue;On=!1;var s=i.firstBaseUpdate,o=i.lastBaseUpdate,a=i.shared.pending;if(a!==null){i.shared.pending=null;var l=a,u=l.next;l.next=null,o===null?s=u:o.next=u,o=l;var c=t.alternate;c!==null&&(c=c.updateQueue,a=c.lastBaseUpdate,a!==o&&(a===null?c.firstBaseUpdate=u:a.next=u,c.lastBaseUpdate=l))}if(s!==null){var d=i.baseState;o=0,c=u=l=null,a=s;do{var f=a.lane,h=a.eventTime;if((r&f)===f){c!==null&&(c=c.next={eventTime:h,lane:0,tag:a.tag,payload:a.payload,callback:a.callback,next:null});e:{var y=t,m=a;switch(f=e,h=n,m.tag){case 1:if(y=m.payload,typeof y=="function"){d=y.call(h,d,f);break e}d=y;break e;case 3:y.flags=y.flags&-65537|128;case 0:if(y=m.payload,f=typeof y=="function"?y.call(h,d,f):y,f==null)break e;d=me({},d,f);break e;case 2:On=!0}}a.callback!==null&&a.lane!==0&&(t.flags|=64,f=i.effects,f===null?i.effects=[a]:f.push(a))}else h={eventTime:h,lane:f,tag:a.tag,payload:a.payload,callback:a.callback,next:null},c===null?(u=c=h,l=d):c=c.next=h,o|=f;if(a=a.next,a===null){if(a=i.shared.pending,a===null)break;f=a,a=f.next,f.next=null,i.lastBaseUpdate=f,i.shared.pending=null}}while(!0);if(c===null&&(l=d),i.baseState=l,i.firstBaseUpdate=u,i.lastBaseUpdate=c,e=i.shared.interleaved,e!==null){i=e;do o|=i.lane,i=i.next;while(i!==e)}else s===null&&(i.shared.lanes=0);Pr|=o,t.lanes=o,t.memoizedState=d}}function Xp(t,e,n){if(t=e.effects,e.effects=null,t!==null)for(e=0;e<t.length;e++){var r=t[e],i=r.callback;if(i!==null){if(r.callback=null,r=n,typeof i!="function")throw Error(N(191,i));i.call(r)}}}var co={},tn=nr(co),Hs=nr(co),Ws=nr(co);function vr(t){if(t===co)throw Error(N(174));return t}function Lf(t,e){switch(se(Ws,e),se(Hs,t),se(tn,co),t=e.nodeType,t){case 9:case 11:e=(e=e.documentElement)?e.namespaceURI:dc(null,"");break;default:t=t===8?e.parentNode:e,e=t.namespaceURI||null,t=t.tagName,e=dc(e,t)}le(tn),se(tn,e)}function wi(){le(tn),le(Hs),le(Ws)}function x0(t){vr(Ws.current);var e=vr(tn.current),n=dc(e,t.type);e!==n&&(se(Hs,t),se(tn,n))}function Df(t){Hs.current===t&&(le(tn),le(Hs))}var fe=nr(0);function Ra(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 fu=[];function $f(){for(var t=0;t<fu.length;t++)fu[t]._workInProgressVersionPrimary=null;fu.length=0}var ta=Cn.ReactCurrentDispatcher,hu=Cn.ReactCurrentBatchConfig,br=0,ge=null,Pe=null,Ie=null,Ma=!1,xs=!1,Ks=0,ck=0;function Ve(){throw Error(N(321))}function Ff(t,e){if(e===null)return!1;for(var n=0;n<e.length&&n<t.length;n++)if(!Ht(t[n],e[n]))return!1;return!0}function jf(t,e,n,r,i,s){if(br=s,ge=e,e.memoizedState=null,e.updateQueue=null,e.lanes=0,ta.current=t===null||t.memoizedState===null?pk:gk,t=n(r,i),xs){s=0;do{if(xs=!1,Ks=0,25<=s)throw Error(N(301));s+=1,Ie=Pe=null,e.updateQueue=null,ta.current=mk,t=n(r,i)}while(xs)}if(ta.current=Ia,e=Pe!==null&&Pe.next!==null,br=0,Ie=Pe=ge=null,Ma=!1,e)throw Error(N(300));return t}function Vf(){var t=Ks!==0;return Ks=0,t}function Xt(){var t={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Ie===null?ge.memoizedState=Ie=t:Ie=Ie.next=t,Ie}function Nt(){if(Pe===null){var t=ge.alternate;t=t!==null?t.memoizedState:null}else t=Pe.next;var e=Ie===null?ge.memoizedState:Ie.next;if(e!==null)Ie=e,Pe=t;else{if(t===null)throw Error(N(310));Pe=t,t={memoizedState:Pe.memoizedState,baseState:Pe.baseState,baseQueue:Pe.baseQueue,queue:Pe.queue,next:null},Ie===null?ge.memoizedState=Ie=t:Ie=Ie.next=t}return Ie}function Gs(t,e){return typeof e=="function"?e(t):e}function pu(t){var e=Nt(),n=e.queue;if(n===null)throw Error(N(311));n.lastRenderedReducer=t;var r=Pe,i=r.baseQueue,s=n.pending;if(s!==null){if(i!==null){var o=i.next;i.next=s.next,s.next=o}r.baseQueue=i=s,n.pending=null}if(i!==null){s=i.next,r=r.baseState;var a=o=null,l=null,u=s;do{var c=u.lane;if((br&c)===c)l!==null&&(l=l.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 d={lane:c,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null};l===null?(a=l=d,o=r):l=l.next=d,ge.lanes|=c,Pr|=c}u=u.next}while(u!==null&&u!==s);l===null?o=r:l.next=a,Ht(r,e.memoizedState)||(ot=!0),e.memoizedState=r,e.baseState=o,e.baseQueue=l,n.lastRenderedState=r}if(t=n.interleaved,t!==null){i=t;do s=i.lane,ge.lanes|=s,Pr|=s,i=i.next;while(i!==t)}else i===null&&(n.lanes=0);return[e.memoizedState,n.dispatch]}function gu(t){var e=Nt(),n=e.queue;if(n===null)throw Error(N(311));n.lastRenderedReducer=t;var r=n.dispatch,i=n.pending,s=e.memoizedState;if(i!==null){n.pending=null;var o=i=i.next;do s=t(s,o.action),o=o.next;while(o!==i);Ht(s,e.memoizedState)||(ot=!0),e.memoizedState=s,e.baseQueue===null&&(e.baseState=s),n.lastRenderedState=s}return[s,r]}function S0(){}function E0(t,e){var n=ge,r=Nt(),i=e(),s=!Ht(r.memoizedState,i);if(s&&(r.memoizedState=i,ot=!0),r=r.queue,Bf(b0.bind(null,n,r,t),[t]),r.getSnapshot!==e||s||Ie!==null&&Ie.memoizedState.tag&1){if(n.flags|=2048,qs(9,C0.bind(null,n,r,i,e),void 0,null),Ne===null)throw Error(N(349));br&30||k0(n,e,i)}return i}function k0(t,e,n){t.flags|=16384,t={getSnapshot:e,value:n},e=ge.updateQueue,e===null?(e={lastEffect:null,stores:null},ge.updateQueue=e,e.stores=[t]):(n=e.stores,n===null?e.stores=[t]:n.push(t))}function C0(t,e,n,r){e.value=n,e.getSnapshot=r,P0(e)&&T0(t)}function b0(t,e,n){return n(function(){P0(e)&&T0(t)})}function P0(t){var e=t.getSnapshot;t=t.value;try{var n=e();return!Ht(t,n)}catch{return!0}}function T0(t){var e=wn(t,1);e!==null&&Ut(e,t,1,-1)}function Qp(t){var e=Xt();return typeof t=="function"&&(t=t()),e.memoizedState=e.baseState=t,t={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:Gs,lastRenderedState:t},e.queue=t,t=t.dispatch=hk.bind(null,ge,t),[e.memoizedState,t]}function qs(t,e,n,r){return t={tag:t,create:e,destroy:n,deps:r,next:null},e=ge.updateQueue,e===null?(e={lastEffect:null,stores:null},ge.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 A0(){return Nt().memoizedState}function na(t,e,n,r){var i=Xt();ge.flags|=t,i.memoizedState=qs(1|e,n,void 0,r===void 0?null:r)}function vl(t,e,n,r){var i=Nt();r=r===void 0?null:r;var s=void 0;if(Pe!==null){var o=Pe.memoizedState;if(s=o.destroy,r!==null&&Ff(r,o.deps)){i.memoizedState=qs(e,n,s,r);return}}ge.flags|=t,i.memoizedState=qs(1|e,n,s,r)}function Zp(t,e){return na(8390656,8,t,e)}function Bf(t,e){return vl(2048,8,t,e)}function R0(t,e){return vl(4,2,t,e)}function M0(t,e){return vl(4,4,t,e)}function I0(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 N0(t,e,n){return n=n!=null?n.concat([t]):null,vl(4,4,I0.bind(null,e,t),n)}function zf(){}function O0(t,e){var n=Nt();e=e===void 0?null:e;var r=n.memoizedState;return r!==null&&e!==null&&Ff(e,r[1])?r[0]:(n.memoizedState=[t,e],t)}function L0(t,e){var n=Nt();e=e===void 0?null:e;var r=n.memoizedState;return r!==null&&e!==null&&Ff(e,r[1])?r[0]:(t=t(),n.memoizedState=[t,e],t)}function D0(t,e,n){return br&21?(Ht(n,e)||(n=By(),ge.lanes|=n,Pr|=n,t.baseState=!0),e):(t.baseState&&(t.baseState=!1,ot=!0),t.memoizedState=n)}function dk(t,e){var n=te;te=n!==0&&4>n?n:4,t(!0);var r=hu.transition;hu.transition={};try{t(!1),e()}finally{te=n,hu.transition=r}}function $0(){return Nt().memoizedState}function fk(t,e,n){var r=Kn(t);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},F0(t))j0(e,n);else if(n=_0(t,e,n,r),n!==null){var i=Je();Ut(n,t,r,i),V0(n,e,r)}}function hk(t,e,n){var r=Kn(t),i={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(F0(t))j0(e,i);else{var s=t.alternate;if(t.lanes===0&&(s===null||s.lanes===0)&&(s=e.lastRenderedReducer,s!==null))try{var o=e.lastRenderedState,a=s(o,n);if(i.hasEagerState=!0,i.eagerState=a,Ht(a,o)){var l=e.interleaved;l===null?(i.next=i,Nf(e)):(i.next=l.next,l.next=i),e.interleaved=i;return}}catch{}finally{}n=_0(t,e,i,r),n!==null&&(i=Je(),Ut(n,t,r,i),V0(n,e,r))}}function F0(t){var e=t.alternate;return t===ge||e!==null&&e===ge}function j0(t,e){xs=Ma=!0;var n=t.pending;n===null?e.next=e:(e.next=n.next,n.next=e),t.pending=e}function V0(t,e,n){if(n&4194240){var r=e.lanes;r&=t.pendingLanes,n|=r,e.lanes=n,_f(t,n)}}var Ia={readContext:It,useCallback:Ve,useContext:Ve,useEffect:Ve,useImperativeHandle:Ve,useInsertionEffect:Ve,useLayoutEffect:Ve,useMemo:Ve,useReducer:Ve,useRef:Ve,useState:Ve,useDebugValue:Ve,useDeferredValue:Ve,useTransition:Ve,useMutableSource:Ve,useSyncExternalStore:Ve,useId:Ve,unstable_isNewReconciler:!1},pk={readContext:It,useCallback:function(t,e){return Xt().memoizedState=[t,e===void 0?null:e],t},useContext:It,useEffect:Zp,useImperativeHandle:function(t,e,n){return n=n!=null?n.concat([t]):null,na(4194308,4,I0.bind(null,e,t),n)},useLayoutEffect:function(t,e){return na(4194308,4,t,e)},useInsertionEffect:function(t,e){return na(4,2,t,e)},useMemo:function(t,e){var n=Xt();return e=e===void 0?null:e,t=t(),n.memoizedState=[t,e],t},useReducer:function(t,e,n){var r=Xt();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=fk.bind(null,ge,t),[r.memoizedState,t]},useRef:function(t){var e=Xt();return t={current:t},e.memoizedState=t},useState:Qp,useDebugValue:zf,useDeferredValue:function(t){return Xt().memoizedState=t},useTransition:function(){var t=Qp(!1),e=t[0];return t=dk.bind(null,t[1]),Xt().memoizedState=t,[e,t]},useMutableSource:function(){},useSyncExternalStore:function(t,e,n){var r=ge,i=Xt();if(ce){if(n===void 0)throw Error(N(407));n=n()}else{if(n=e(),Ne===null)throw Error(N(349));br&30||k0(r,e,n)}i.memoizedState=n;var s={value:n,getSnapshot:e};return i.queue=s,Zp(b0.bind(null,r,s,t),[t]),r.flags|=2048,qs(9,C0.bind(null,r,s,n,e),void 0,null),n},useId:function(){var t=Xt(),e=Ne.identifierPrefix;if(ce){var n=mn,r=gn;n=(r&~(1<<32-zt(r)-1)).toString(32)+n,e=":"+e+"R"+n,n=Ks++,0<n&&(e+="H"+n.toString(32)),e+=":"}else n=ck++,e=":"+e+"r"+n.toString(32)+":";return t.memoizedState=e},unstable_isNewReconciler:!1},gk={readContext:It,useCallback:O0,useContext:It,useEffect:Bf,useImperativeHandle:N0,useInsertionEffect:R0,useLayoutEffect:M0,useMemo:L0,useReducer:pu,useRef:A0,useState:function(){return pu(Gs)},useDebugValue:zf,useDeferredValue:function(t){var e=Nt();return D0(e,Pe.memoizedState,t)},useTransition:function(){var t=pu(Gs)[0],e=Nt().memoizedState;return[t,e]},useMutableSource:S0,useSyncExternalStore:E0,useId:$0,unstable_isNewReconciler:!1},mk={readContext:It,useCallback:O0,useContext:It,useEffect:Bf,useImperativeHandle:N0,useInsertionEffect:R0,useLayoutEffect:M0,useMemo:L0,useReducer:gu,useRef:A0,useState:function(){return gu(Gs)},useDebugValue:zf,useDeferredValue:function(t){var e=Nt();return Pe===null?e.memoizedState=t:D0(e,Pe.memoizedState,t)},useTransition:function(){var t=gu(Gs)[0],e=Nt().memoizedState;return[t,e]},useMutableSource:S0,useSyncExternalStore:E0,useId:$0,unstable_isNewReconciler:!1};function Dt(t,e){if(t&&t.defaultProps){e=me({},e),t=t.defaultProps;for(var n in t)e[n]===void 0&&(e[n]=t[n]);return e}return e}function Ic(t,e,n,r){e=t.memoizedState,n=n(r,e),n=n==null?e:me({},e,n),t.memoizedState=n,t.lanes===0&&(t.updateQueue.baseState=n)}var yl={isMounted:function(t){return(t=t._reactInternals)?Lr(t)===t:!1},enqueueSetState:function(t,e,n){t=t._reactInternals;var r=Je(),i=Kn(t),s=vn(r,i);s.payload=e,n!=null&&(s.callback=n),e=Hn(t,s,i),e!==null&&(Ut(e,t,i,r),ea(e,t,i))},enqueueReplaceState:function(t,e,n){t=t._reactInternals;var r=Je(),i=Kn(t),s=vn(r,i);s.tag=1,s.payload=e,n!=null&&(s.callback=n),e=Hn(t,s,i),e!==null&&(Ut(e,t,i,r),ea(e,t,i))},enqueueForceUpdate:function(t,e){t=t._reactInternals;var n=Je(),r=Kn(t),i=vn(n,r);i.tag=2,e!=null&&(i.callback=e),e=Hn(t,i,r),e!==null&&(Ut(e,t,r,n),ea(e,t,r))}};function Jp(t,e,n,r,i,s,o){return t=t.stateNode,typeof t.shouldComponentUpdate=="function"?t.shouldComponentUpdate(r,s,o):e.prototype&&e.prototype.isPureReactComponent?!Vs(n,r)||!Vs(i,s):!0}function B0(t,e,n){var r=!1,i=Qn,s=e.contextType;return typeof s=="object"&&s!==null?s=It(s):(i=dt(e)?kr:qe.current,r=e.contextTypes,s=(r=r!=null)?vi(t,i):Qn),e=new e(n,s),t.memoizedState=e.state!==null&&e.state!==void 0?e.state:null,e.updater=yl,t.stateNode=e,e._reactInternals=t,r&&(t=t.stateNode,t.__reactInternalMemoizedUnmaskedChildContext=i,t.__reactInternalMemoizedMaskedChildContext=s),e}function eg(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&&yl.enqueueReplaceState(e,e.state,null)}function Nc(t,e,n,r){var i=t.stateNode;i.props=n,i.state=t.memoizedState,i.refs={},Of(t);var s=e.contextType;typeof s=="object"&&s!==null?i.context=It(s):(s=dt(e)?kr:qe.current,i.context=vi(t,s)),i.state=t.memoizedState,s=e.getDerivedStateFromProps,typeof s=="function"&&(Ic(t,e,s,n),i.state=t.memoizedState),typeof e.getDerivedStateFromProps=="function"||typeof i.getSnapshotBeforeUpdate=="function"||typeof i.UNSAFE_componentWillMount!="function"&&typeof i.componentWillMount!="function"||(e=i.state,typeof i.componentWillMount=="function"&&i.componentWillMount(),typeof i.UNSAFE_componentWillMount=="function"&&i.UNSAFE_componentWillMount(),e!==i.state&&yl.enqueueReplaceState(i,i.state,null),Aa(t,n,i,r),i.state=t.memoizedState),typeof i.componentDidMount=="function"&&(t.flags|=4194308)}function xi(t,e){try{var n="",r=e;do n+=HS(r),r=r.return;while(r);var i=n}catch(s){i=`
|
|
39
|
+
Error generating stack: `+s.message+`
|
|
40
|
+
`+s.stack}return{value:t,source:e,stack:i,digest:null}}function mu(t,e,n){return{value:t,source:null,stack:n??null,digest:e??null}}function Oc(t,e){try{console.error(e.value)}catch(n){setTimeout(function(){throw n})}}var vk=typeof WeakMap=="function"?WeakMap:Map;function z0(t,e,n){n=vn(-1,n),n.tag=3,n.payload={element:null};var r=e.value;return n.callback=function(){Oa||(Oa=!0,Hc=r),Oc(t,e)},n}function U0(t,e,n){n=vn(-1,n),n.tag=3;var r=t.type.getDerivedStateFromError;if(typeof r=="function"){var i=e.value;n.payload=function(){return r(i)},n.callback=function(){Oc(t,e)}}var s=t.stateNode;return s!==null&&typeof s.componentDidCatch=="function"&&(n.callback=function(){Oc(t,e),typeof r!="function"&&(Wn===null?Wn=new Set([this]):Wn.add(this));var o=e.stack;this.componentDidCatch(e.value,{componentStack:o!==null?o:""})}),n}function tg(t,e,n){var r=t.pingCache;if(r===null){r=t.pingCache=new vk;var i=new Set;r.set(e,i)}else i=r.get(e),i===void 0&&(i=new Set,r.set(e,i));i.has(n)||(i.add(n),t=Mk.bind(null,t,e,n),e.then(t,t))}function ng(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 rg(t,e,n,r,i){return t.mode&1?(t.flags|=65536,t.lanes=i,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=vn(-1,1),e.tag=2,Hn(n,e,1))),n.lanes|=1),t)}var yk=Cn.ReactCurrentOwner,ot=!1;function Xe(t,e,n,r){e.child=t===null?y0(e,null,n,r):_i(e,t.child,n,r)}function ig(t,e,n,r,i){n=n.render;var s=e.ref;return di(e,i),r=jf(t,e,n,r,s,i),n=Vf(),t!==null&&!ot?(e.updateQueue=t.updateQueue,e.flags&=-2053,t.lanes&=~i,xn(t,e,i)):(ce&&n&&Pf(e),e.flags|=1,Xe(t,e,r,i),e.child)}function sg(t,e,n,r,i){if(t===null){var s=n.type;return typeof s=="function"&&!Xf(s)&&s.defaultProps===void 0&&n.compare===null&&n.defaultProps===void 0?(e.tag=15,e.type=s,H0(t,e,s,r,i)):(t=oa(n.type,null,r,e,e.mode,i),t.ref=e.ref,t.return=e,e.child=t)}if(s=t.child,!(t.lanes&i)){var o=s.memoizedProps;if(n=n.compare,n=n!==null?n:Vs,n(o,r)&&t.ref===e.ref)return xn(t,e,i)}return e.flags|=1,t=Gn(s,r),t.ref=e.ref,t.return=e,e.child=t}function H0(t,e,n,r,i){if(t!==null){var s=t.memoizedProps;if(Vs(s,r)&&t.ref===e.ref)if(ot=!1,e.pendingProps=r=s,(t.lanes&i)!==0)t.flags&131072&&(ot=!0);else return e.lanes=t.lanes,xn(t,e,i)}return Lc(t,e,n,r,i)}function W0(t,e,n){var r=e.pendingProps,i=r.children,s=t!==null?t.memoizedState:null;if(r.mode==="hidden")if(!(e.mode&1))e.memoizedState={baseLanes:0,cachePool:null,transitions:null},se(Zr,ht),ht|=n;else{if(!(n&1073741824))return t=s!==null?s.baseLanes|n:n,e.lanes=e.childLanes=1073741824,e.memoizedState={baseLanes:t,cachePool:null,transitions:null},e.updateQueue=null,se(Zr,ht),ht|=t,null;e.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=s!==null?s.baseLanes:n,se(Zr,ht),ht|=r}else s!==null?(r=s.baseLanes|n,e.memoizedState=null):r=n,se(Zr,ht),ht|=r;return Xe(t,e,i,n),e.child}function K0(t,e){var n=e.ref;(t===null&&n!==null||t!==null&&t.ref!==n)&&(e.flags|=512,e.flags|=2097152)}function Lc(t,e,n,r,i){var s=dt(n)?kr:qe.current;return s=vi(e,s),di(e,i),n=jf(t,e,n,r,s,i),r=Vf(),t!==null&&!ot?(e.updateQueue=t.updateQueue,e.flags&=-2053,t.lanes&=~i,xn(t,e,i)):(ce&&r&&Pf(e),e.flags|=1,Xe(t,e,n,i),e.child)}function og(t,e,n,r,i){if(dt(n)){var s=!0;ka(e)}else s=!1;if(di(e,i),e.stateNode===null)ra(t,e),B0(e,n,r),Nc(e,n,r,i),r=!0;else if(t===null){var o=e.stateNode,a=e.memoizedProps;o.props=a;var l=o.context,u=n.contextType;typeof u=="object"&&u!==null?u=It(u):(u=dt(n)?kr:qe.current,u=vi(e,u));var c=n.getDerivedStateFromProps,d=typeof c=="function"||typeof o.getSnapshotBeforeUpdate=="function";d||typeof o.UNSAFE_componentWillReceiveProps!="function"&&typeof o.componentWillReceiveProps!="function"||(a!==r||l!==u)&&eg(e,o,r,u),On=!1;var f=e.memoizedState;o.state=f,Aa(e,r,o,i),l=e.memoizedState,a!==r||f!==l||ct.current||On?(typeof c=="function"&&(Ic(e,n,c,r),l=e.memoizedState),(a=On||Jp(e,n,a,r,f,l,u))?(d||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=l),o.props=r,o.state=l,o.context=u,r=a):(typeof o.componentDidMount=="function"&&(e.flags|=4194308),r=!1)}else{o=e.stateNode,w0(t,e),a=e.memoizedProps,u=e.type===e.elementType?a:Dt(e.type,a),o.props=u,d=e.pendingProps,f=o.context,l=n.contextType,typeof l=="object"&&l!==null?l=It(l):(l=dt(n)?kr:qe.current,l=vi(e,l));var h=n.getDerivedStateFromProps;(c=typeof h=="function"||typeof o.getSnapshotBeforeUpdate=="function")||typeof o.UNSAFE_componentWillReceiveProps!="function"&&typeof o.componentWillReceiveProps!="function"||(a!==d||f!==l)&&eg(e,o,r,l),On=!1,f=e.memoizedState,o.state=f,Aa(e,r,o,i);var y=e.memoizedState;a!==d||f!==y||ct.current||On?(typeof h=="function"&&(Ic(e,n,h,r),y=e.memoizedState),(u=On||Jp(e,n,u,r,f,y,l)||!1)?(c||typeof o.UNSAFE_componentWillUpdate!="function"&&typeof o.componentWillUpdate!="function"||(typeof o.componentWillUpdate=="function"&&o.componentWillUpdate(r,y,l),typeof o.UNSAFE_componentWillUpdate=="function"&&o.UNSAFE_componentWillUpdate(r,y,l)),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=y),o.props=r,o.state=y,o.context=l,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 Dc(t,e,n,r,s,i)}function Dc(t,e,n,r,i,s){K0(t,e);var o=(e.flags&128)!==0;if(!r&&!o)return i&&Wp(e,n,!1),xn(t,e,s);r=e.stateNode,yk.current=e;var a=o&&typeof n.getDerivedStateFromError!="function"?null:r.render();return e.flags|=1,t!==null&&o?(e.child=_i(e,t.child,null,s),e.child=_i(e,null,a,s)):Xe(t,e,a,s),e.memoizedState=r.state,i&&Wp(e,n,!0),e.child}function G0(t){var e=t.stateNode;e.pendingContext?Hp(t,e.pendingContext,e.pendingContext!==e.context):e.context&&Hp(t,e.context,!1),Lf(t,e.containerInfo)}function ag(t,e,n,r,i){return yi(),Af(i),e.flags|=256,Xe(t,e,n,r),e.child}var $c={dehydrated:null,treeContext:null,retryLane:0};function Fc(t){return{baseLanes:t,cachePool:null,transitions:null}}function q0(t,e,n){var r=e.pendingProps,i=fe.current,s=!1,o=(e.flags&128)!==0,a;if((a=o)||(a=t!==null&&t.memoizedState===null?!1:(i&2)!==0),a?(s=!0,e.flags&=-129):(t===null||t.memoizedState!==null)&&(i|=1),se(fe,i&1),t===null)return Rc(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,s?(r=e.mode,s=e.child,o={mode:"hidden",children:o},!(r&1)&&s!==null?(s.childLanes=0,s.pendingProps=o):s=xl(o,r,0,null),t=xr(t,r,n,null),s.return=e,t.return=e,s.sibling=t,e.child=s,e.child.memoizedState=Fc(n),e.memoizedState=$c,t):Uf(e,o));if(i=t.memoizedState,i!==null&&(a=i.dehydrated,a!==null))return _k(t,e,o,r,a,i,n);if(s){s=r.fallback,o=e.mode,i=t.child,a=i.sibling;var l={mode:"hidden",children:r.children};return!(o&1)&&e.child!==i?(r=e.child,r.childLanes=0,r.pendingProps=l,e.deletions=null):(r=Gn(i,l),r.subtreeFlags=i.subtreeFlags&14680064),a!==null?s=Gn(a,s):(s=xr(s,o,n,null),s.flags|=2),s.return=e,r.return=e,r.sibling=s,e.child=r,r=s,s=e.child,o=t.child.memoizedState,o=o===null?Fc(n):{baseLanes:o.baseLanes|n,cachePool:null,transitions:o.transitions},s.memoizedState=o,s.childLanes=t.childLanes&~n,e.memoizedState=$c,r}return s=t.child,t=s.sibling,r=Gn(s,{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 Uf(t,e){return e=xl({mode:"visible",children:e},t.mode,0,null),e.return=t,t.child=e}function Ro(t,e,n,r){return r!==null&&Af(r),_i(e,t.child,null,n),t=Uf(e,e.pendingProps.children),t.flags|=2,e.memoizedState=null,t}function _k(t,e,n,r,i,s,o){if(n)return e.flags&256?(e.flags&=-257,r=mu(Error(N(422))),Ro(t,e,o,r)):e.memoizedState!==null?(e.child=t.child,e.flags|=128,null):(s=r.fallback,i=e.mode,r=xl({mode:"visible",children:r.children},i,0,null),s=xr(s,i,o,null),s.flags|=2,r.return=e,s.return=e,r.sibling=s,e.child=r,e.mode&1&&_i(e,t.child,null,o),e.child.memoizedState=Fc(o),e.memoizedState=$c,s);if(!(e.mode&1))return Ro(t,e,o,null);if(i.data==="$!"){if(r=i.nextSibling&&i.nextSibling.dataset,r)var a=r.dgst;return r=a,s=Error(N(419)),r=mu(s,r,void 0),Ro(t,e,o,r)}if(a=(o&t.childLanes)!==0,ot||a){if(r=Ne,r!==null){switch(o&-o){case 4:i=2;break;case 16:i=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:i=32;break;case 536870912:i=268435456;break;default:i=0}i=i&(r.suspendedLanes|o)?0:i,i!==0&&i!==s.retryLane&&(s.retryLane=i,wn(t,i),Ut(r,t,i,-1))}return Yf(),r=mu(Error(N(421))),Ro(t,e,o,r)}return i.data==="$?"?(e.flags|=128,e.child=t.child,e=Ik.bind(null,t),i._reactRetry=e,null):(t=s.treeContext,pt=Un(i.nextSibling),vt=e,ce=!0,Vt=null,t!==null&&(Et[kt++]=gn,Et[kt++]=mn,Et[kt++]=Cr,gn=t.id,mn=t.overflow,Cr=e),e=Uf(e,r.children),e.flags|=4096,e)}function lg(t,e,n){t.lanes|=e;var r=t.alternate;r!==null&&(r.lanes|=e),Mc(t.return,e,n)}function vu(t,e,n,r,i){var s=t.memoizedState;s===null?t.memoizedState={isBackwards:e,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:i}:(s.isBackwards=e,s.rendering=null,s.renderingStartTime=0,s.last=r,s.tail=n,s.tailMode=i)}function Y0(t,e,n){var r=e.pendingProps,i=r.revealOrder,s=r.tail;if(Xe(t,e,r.children,n),r=fe.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&&lg(t,n,e);else if(t.tag===19)lg(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(se(fe,r),!(e.mode&1))e.memoizedState=null;else switch(i){case"forwards":for(n=e.child,i=null;n!==null;)t=n.alternate,t!==null&&Ra(t)===null&&(i=n),n=n.sibling;n=i,n===null?(i=e.child,e.child=null):(i=n.sibling,n.sibling=null),vu(e,!1,i,n,s);break;case"backwards":for(n=null,i=e.child,e.child=null;i!==null;){if(t=i.alternate,t!==null&&Ra(t)===null){e.child=i;break}t=i.sibling,i.sibling=n,n=i,i=t}vu(e,!0,n,null,s);break;case"together":vu(e,!1,null,null,void 0);break;default:e.memoizedState=null}return e.child}function ra(t,e){!(e.mode&1)&&t!==null&&(t.alternate=null,e.alternate=null,e.flags|=2)}function xn(t,e,n){if(t!==null&&(e.dependencies=t.dependencies),Pr|=e.lanes,!(n&e.childLanes))return null;if(t!==null&&e.child!==t.child)throw Error(N(153));if(e.child!==null){for(t=e.child,n=Gn(t,t.pendingProps),e.child=n,n.return=e;t.sibling!==null;)t=t.sibling,n=n.sibling=Gn(t,t.pendingProps),n.return=e;n.sibling=null}return e.child}function wk(t,e,n){switch(e.tag){case 3:G0(e),yi();break;case 5:x0(e);break;case 1:dt(e.type)&&ka(e);break;case 4:Lf(e,e.stateNode.containerInfo);break;case 10:var r=e.type._context,i=e.memoizedProps.value;se(Pa,r._currentValue),r._currentValue=i;break;case 13:if(r=e.memoizedState,r!==null)return r.dehydrated!==null?(se(fe,fe.current&1),e.flags|=128,null):n&e.child.childLanes?q0(t,e,n):(se(fe,fe.current&1),t=xn(t,e,n),t!==null?t.sibling:null);se(fe,fe.current&1);break;case 19:if(r=(n&e.childLanes)!==0,t.flags&128){if(r)return Y0(t,e,n);e.flags|=128}if(i=e.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),se(fe,fe.current),r)break;return null;case 22:case 23:return e.lanes=0,W0(t,e,n)}return xn(t,e,n)}var X0,jc,Q0,Z0;X0=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}};jc=function(){};Q0=function(t,e,n,r){var i=t.memoizedProps;if(i!==r){t=e.stateNode,vr(tn.current);var s=null;switch(n){case"input":i=ac(t,i),r=ac(t,r),s=[];break;case"select":i=me({},i,{value:void 0}),r=me({},r,{value:void 0}),s=[];break;case"textarea":i=cc(t,i),r=cc(t,r),s=[];break;default:typeof i.onClick!="function"&&typeof r.onClick=="function"&&(t.onclick=Sa)}fc(n,r);var o;n=null;for(u in i)if(!r.hasOwnProperty(u)&&i.hasOwnProperty(u)&&i[u]!=null)if(u==="style"){var a=i[u];for(o in a)a.hasOwnProperty(o)&&(n||(n={}),n[o]="")}else u!=="dangerouslySetInnerHTML"&&u!=="children"&&u!=="suppressContentEditableWarning"&&u!=="suppressHydrationWarning"&&u!=="autoFocus"&&(Ns.hasOwnProperty(u)?s||(s=[]):(s=s||[]).push(u,null));for(u in r){var l=r[u];if(a=i!=null?i[u]:void 0,r.hasOwnProperty(u)&&l!==a&&(l!=null||a!=null))if(u==="style")if(a){for(o in a)!a.hasOwnProperty(o)||l&&l.hasOwnProperty(o)||(n||(n={}),n[o]="");for(o in l)l.hasOwnProperty(o)&&a[o]!==l[o]&&(n||(n={}),n[o]=l[o])}else n||(s||(s=[]),s.push(u,n)),n=l;else u==="dangerouslySetInnerHTML"?(l=l?l.__html:void 0,a=a?a.__html:void 0,l!=null&&a!==l&&(s=s||[]).push(u,l)):u==="children"?typeof l!="string"&&typeof l!="number"||(s=s||[]).push(u,""+l):u!=="suppressContentEditableWarning"&&u!=="suppressHydrationWarning"&&(Ns.hasOwnProperty(u)?(l!=null&&u==="onScroll"&&oe("scroll",t),s||a===l||(s=[])):(s=s||[]).push(u,l))}n&&(s=s||[]).push("style",n);var u=s;(e.updateQueue=u)&&(e.flags|=4)}};Z0=function(t,e,n,r){n!==r&&(e.flags|=4)};function Hi(t,e){if(!ce)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 Be(t){var e=t.alternate!==null&&t.alternate.child===t.child,n=0,r=0;if(e)for(var i=t.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags&14680064,r|=i.flags&14680064,i.return=t,i=i.sibling;else for(i=t.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags,r|=i.flags,i.return=t,i=i.sibling;return t.subtreeFlags|=r,t.childLanes=n,e}function xk(t,e,n){var r=e.pendingProps;switch(Tf(e),e.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Be(e),null;case 1:return dt(e.type)&&Ea(),Be(e),null;case 3:return r=e.stateNode,wi(),le(ct),le(qe),$f(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),(t===null||t.child===null)&&(To(e)?e.flags|=4:t===null||t.memoizedState.isDehydrated&&!(e.flags&256)||(e.flags|=1024,Vt!==null&&(Gc(Vt),Vt=null))),jc(t,e),Be(e),null;case 5:Df(e);var i=vr(Ws.current);if(n=e.type,t!==null&&e.stateNode!=null)Q0(t,e,n,r,i),t.ref!==e.ref&&(e.flags|=512,e.flags|=2097152);else{if(!r){if(e.stateNode===null)throw Error(N(166));return Be(e),null}if(t=vr(tn.current),To(e)){r=e.stateNode,n=e.type;var s=e.memoizedProps;switch(r[Zt]=e,r[Us]=s,t=(e.mode&1)!==0,n){case"dialog":oe("cancel",r),oe("close",r);break;case"iframe":case"object":case"embed":oe("load",r);break;case"video":case"audio":for(i=0;i<ss.length;i++)oe(ss[i],r);break;case"source":oe("error",r);break;case"img":case"image":case"link":oe("error",r),oe("load",r);break;case"details":oe("toggle",r);break;case"input":vp(r,s),oe("invalid",r);break;case"select":r._wrapperState={wasMultiple:!!s.multiple},oe("invalid",r);break;case"textarea":_p(r,s),oe("invalid",r)}fc(n,s),i=null;for(var o in s)if(s.hasOwnProperty(o)){var a=s[o];o==="children"?typeof a=="string"?r.textContent!==a&&(s.suppressHydrationWarning!==!0&&Po(r.textContent,a,t),i=["children",a]):typeof a=="number"&&r.textContent!==""+a&&(s.suppressHydrationWarning!==!0&&Po(r.textContent,a,t),i=["children",""+a]):Ns.hasOwnProperty(o)&&a!=null&&o==="onScroll"&&oe("scroll",r)}switch(n){case"input":_o(r),yp(r,s,!0);break;case"textarea":_o(r),wp(r);break;case"select":case"option":break;default:typeof s.onClick=="function"&&(r.onclick=Sa)}r=i,e.updateQueue=r,r!==null&&(e.flags|=4)}else{o=i.nodeType===9?i:i.ownerDocument,t==="http://www.w3.org/1999/xhtml"&&(t=by(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[Zt]=e,t[Us]=r,X0(t,e,!1,!1),e.stateNode=t;e:{switch(o=hc(n,r),n){case"dialog":oe("cancel",t),oe("close",t),i=r;break;case"iframe":case"object":case"embed":oe("load",t),i=r;break;case"video":case"audio":for(i=0;i<ss.length;i++)oe(ss[i],t);i=r;break;case"source":oe("error",t),i=r;break;case"img":case"image":case"link":oe("error",t),oe("load",t),i=r;break;case"details":oe("toggle",t),i=r;break;case"input":vp(t,r),i=ac(t,r),oe("invalid",t);break;case"option":i=r;break;case"select":t._wrapperState={wasMultiple:!!r.multiple},i=me({},r,{value:void 0}),oe("invalid",t);break;case"textarea":_p(t,r),i=cc(t,r),oe("invalid",t);break;default:i=r}fc(n,i),a=i;for(s in a)if(a.hasOwnProperty(s)){var l=a[s];s==="style"?Ay(t,l):s==="dangerouslySetInnerHTML"?(l=l?l.__html:void 0,l!=null&&Py(t,l)):s==="children"?typeof l=="string"?(n!=="textarea"||l!=="")&&Os(t,l):typeof l=="number"&&Os(t,""+l):s!=="suppressContentEditableWarning"&&s!=="suppressHydrationWarning"&&s!=="autoFocus"&&(Ns.hasOwnProperty(s)?l!=null&&s==="onScroll"&&oe("scroll",t):l!=null&&hf(t,s,l,o))}switch(n){case"input":_o(t),yp(t,r,!1);break;case"textarea":_o(t),wp(t);break;case"option":r.value!=null&&t.setAttribute("value",""+Xn(r.value));break;case"select":t.multiple=!!r.multiple,s=r.value,s!=null?ai(t,!!r.multiple,s,!1):r.defaultValue!=null&&ai(t,!!r.multiple,r.defaultValue,!0);break;default:typeof i.onClick=="function"&&(t.onclick=Sa)}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 Be(e),null;case 6:if(t&&e.stateNode!=null)Z0(t,e,t.memoizedProps,r);else{if(typeof r!="string"&&e.stateNode===null)throw Error(N(166));if(n=vr(Ws.current),vr(tn.current),To(e)){if(r=e.stateNode,n=e.memoizedProps,r[Zt]=e,(s=r.nodeValue!==n)&&(t=vt,t!==null))switch(t.tag){case 3:Po(r.nodeValue,n,(t.mode&1)!==0);break;case 5:t.memoizedProps.suppressHydrationWarning!==!0&&Po(r.nodeValue,n,(t.mode&1)!==0)}s&&(e.flags|=4)}else r=(n.nodeType===9?n:n.ownerDocument).createTextNode(r),r[Zt]=e,e.stateNode=r}return Be(e),null;case 13:if(le(fe),r=e.memoizedState,t===null||t.memoizedState!==null&&t.memoizedState.dehydrated!==null){if(ce&&pt!==null&&e.mode&1&&!(e.flags&128))m0(),yi(),e.flags|=98560,s=!1;else if(s=To(e),r!==null&&r.dehydrated!==null){if(t===null){if(!s)throw Error(N(318));if(s=e.memoizedState,s=s!==null?s.dehydrated:null,!s)throw Error(N(317));s[Zt]=e}else yi(),!(e.flags&128)&&(e.memoizedState=null),e.flags|=4;Be(e),s=!1}else Vt!==null&&(Gc(Vt),Vt=null),s=!0;if(!s)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||fe.current&1?Ae===0&&(Ae=3):Yf())),e.updateQueue!==null&&(e.flags|=4),Be(e),null);case 4:return wi(),jc(t,e),t===null&&Bs(e.stateNode.containerInfo),Be(e),null;case 10:return If(e.type._context),Be(e),null;case 17:return dt(e.type)&&Ea(),Be(e),null;case 19:if(le(fe),s=e.memoizedState,s===null)return Be(e),null;if(r=(e.flags&128)!==0,o=s.rendering,o===null)if(r)Hi(s,!1);else{if(Ae!==0||t!==null&&t.flags&128)for(t=e.child;t!==null;){if(o=Ra(t),o!==null){for(e.flags|=128,Hi(s,!1),r=o.updateQueue,r!==null&&(e.updateQueue=r,e.flags|=4),e.subtreeFlags=0,r=n,n=e.child;n!==null;)s=n,t=r,s.flags&=14680066,o=s.alternate,o===null?(s.childLanes=0,s.lanes=t,s.child=null,s.subtreeFlags=0,s.memoizedProps=null,s.memoizedState=null,s.updateQueue=null,s.dependencies=null,s.stateNode=null):(s.childLanes=o.childLanes,s.lanes=o.lanes,s.child=o.child,s.subtreeFlags=0,s.deletions=null,s.memoizedProps=o.memoizedProps,s.memoizedState=o.memoizedState,s.updateQueue=o.updateQueue,s.type=o.type,t=o.dependencies,s.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext}),n=n.sibling;return se(fe,fe.current&1|2),e.child}t=t.sibling}s.tail!==null&&ke()>Si&&(e.flags|=128,r=!0,Hi(s,!1),e.lanes=4194304)}else{if(!r)if(t=Ra(o),t!==null){if(e.flags|=128,r=!0,n=t.updateQueue,n!==null&&(e.updateQueue=n,e.flags|=4),Hi(s,!0),s.tail===null&&s.tailMode==="hidden"&&!o.alternate&&!ce)return Be(e),null}else 2*ke()-s.renderingStartTime>Si&&n!==1073741824&&(e.flags|=128,r=!0,Hi(s,!1),e.lanes=4194304);s.isBackwards?(o.sibling=e.child,e.child=o):(n=s.last,n!==null?n.sibling=o:e.child=o,s.last=o)}return s.tail!==null?(e=s.tail,s.rendering=e,s.tail=e.sibling,s.renderingStartTime=ke(),e.sibling=null,n=fe.current,se(fe,r?n&1|2:n&1),e):(Be(e),null);case 22:case 23:return qf(),r=e.memoizedState!==null,t!==null&&t.memoizedState!==null!==r&&(e.flags|=8192),r&&e.mode&1?ht&1073741824&&(Be(e),e.subtreeFlags&6&&(e.flags|=8192)):Be(e),null;case 24:return null;case 25:return null}throw Error(N(156,e.tag))}function Sk(t,e){switch(Tf(e),e.tag){case 1:return dt(e.type)&&Ea(),t=e.flags,t&65536?(e.flags=t&-65537|128,e):null;case 3:return wi(),le(ct),le(qe),$f(),t=e.flags,t&65536&&!(t&128)?(e.flags=t&-65537|128,e):null;case 5:return Df(e),null;case 13:if(le(fe),t=e.memoizedState,t!==null&&t.dehydrated!==null){if(e.alternate===null)throw Error(N(340));yi()}return t=e.flags,t&65536?(e.flags=t&-65537|128,e):null;case 19:return le(fe),null;case 4:return wi(),null;case 10:return If(e.type._context),null;case 22:case 23:return qf(),null;case 24:return null;default:return null}}var Mo=!1,Ue=!1,Ek=typeof WeakSet=="function"?WeakSet:Set,z=null;function Qr(t,e){var n=t.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){_e(t,e,r)}else n.current=null}function Vc(t,e,n){try{n()}catch(r){_e(t,e,r)}}var ug=!1;function kk(t,e){if(Ec=_a,t=r0(),bf(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 i=r.anchorOffset,s=r.focusNode;r=r.focusOffset;try{n.nodeType,s.nodeType}catch{n=null;break e}var o=0,a=-1,l=-1,u=0,c=0,d=t,f=null;t:for(;;){for(var h;d!==n||i!==0&&d.nodeType!==3||(a=o+i),d!==s||r!==0&&d.nodeType!==3||(l=o+r),d.nodeType===3&&(o+=d.nodeValue.length),(h=d.firstChild)!==null;)f=d,d=h;for(;;){if(d===t)break t;if(f===n&&++u===i&&(a=o),f===s&&++c===r&&(l=o),(h=d.nextSibling)!==null)break;d=f,f=d.parentNode}d=h}n=a===-1||l===-1?null:{start:a,end:l}}else n=null}n=n||{start:0,end:0}}else n=null;for(kc={focusedElem:t,selectionRange:n},_a=!1,z=e;z!==null;)if(e=z,t=e.child,(e.subtreeFlags&1028)!==0&&t!==null)t.return=e,z=t;else for(;z!==null;){e=z;try{var y=e.alternate;if(e.flags&1024)switch(e.tag){case 0:case 11:case 15:break;case 1:if(y!==null){var m=y.memoizedProps,_=y.memoizedState,p=e.stateNode,g=p.getSnapshotBeforeUpdate(e.elementType===e.type?m:Dt(e.type,m),_);p.__reactInternalSnapshotBeforeUpdate=g}break;case 3:var v=e.stateNode.containerInfo;v.nodeType===1?v.textContent="":v.nodeType===9&&v.documentElement&&v.removeChild(v.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(N(163))}}catch(w){_e(e,e.return,w)}if(t=e.sibling,t!==null){t.return=e.return,z=t;break}z=e.return}return y=ug,ug=!1,y}function Ss(t,e,n){var r=e.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var i=r=r.next;do{if((i.tag&t)===t){var s=i.destroy;i.destroy=void 0,s!==void 0&&Vc(e,n,s)}i=i.next}while(i!==r)}}function _l(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 Bc(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 J0(t){var e=t.alternate;e!==null&&(t.alternate=null,J0(e)),t.child=null,t.deletions=null,t.sibling=null,t.tag===5&&(e=t.stateNode,e!==null&&(delete e[Zt],delete e[Us],delete e[Pc],delete e[ok],delete e[ak])),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 e_(t){return t.tag===5||t.tag===3||t.tag===4}function cg(t){e:for(;;){for(;t.sibling===null;){if(t.return===null||e_(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 zc(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=Sa));else if(r!==4&&(t=t.child,t!==null))for(zc(t,e,n),t=t.sibling;t!==null;)zc(t,e,n),t=t.sibling}function Uc(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(Uc(t,e,n),t=t.sibling;t!==null;)Uc(t,e,n),t=t.sibling}var Oe=null,jt=!1;function Tn(t,e,n){for(n=n.child;n!==null;)t_(t,e,n),n=n.sibling}function t_(t,e,n){if(en&&typeof en.onCommitFiberUnmount=="function")try{en.onCommitFiberUnmount(dl,n)}catch{}switch(n.tag){case 5:Ue||Qr(n,e);case 6:var r=Oe,i=jt;Oe=null,Tn(t,e,n),Oe=r,jt=i,Oe!==null&&(jt?(t=Oe,n=n.stateNode,t.nodeType===8?t.parentNode.removeChild(n):t.removeChild(n)):Oe.removeChild(n.stateNode));break;case 18:Oe!==null&&(jt?(t=Oe,n=n.stateNode,t.nodeType===8?cu(t.parentNode,n):t.nodeType===1&&cu(t,n),Fs(t)):cu(Oe,n.stateNode));break;case 4:r=Oe,i=jt,Oe=n.stateNode.containerInfo,jt=!0,Tn(t,e,n),Oe=r,jt=i;break;case 0:case 11:case 14:case 15:if(!Ue&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){i=r=r.next;do{var s=i,o=s.destroy;s=s.tag,o!==void 0&&(s&2||s&4)&&Vc(n,e,o),i=i.next}while(i!==r)}Tn(t,e,n);break;case 1:if(!Ue&&(Qr(n,e),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(a){_e(n,e,a)}Tn(t,e,n);break;case 21:Tn(t,e,n);break;case 22:n.mode&1?(Ue=(r=Ue)||n.memoizedState!==null,Tn(t,e,n),Ue=r):Tn(t,e,n);break;default:Tn(t,e,n)}}function dg(t){var e=t.updateQueue;if(e!==null){t.updateQueue=null;var n=t.stateNode;n===null&&(n=t.stateNode=new Ek),e.forEach(function(r){var i=Nk.bind(null,t,r);n.has(r)||(n.add(r),r.then(i,i))})}}function Ot(t,e){var n=e.deletions;if(n!==null)for(var r=0;r<n.length;r++){var i=n[r];try{var s=t,o=e,a=o;e:for(;a!==null;){switch(a.tag){case 5:Oe=a.stateNode,jt=!1;break e;case 3:Oe=a.stateNode.containerInfo,jt=!0;break e;case 4:Oe=a.stateNode.containerInfo,jt=!0;break e}a=a.return}if(Oe===null)throw Error(N(160));t_(s,o,i),Oe=null,jt=!1;var l=i.alternate;l!==null&&(l.return=null),i.return=null}catch(u){_e(i,e,u)}}if(e.subtreeFlags&12854)for(e=e.child;e!==null;)n_(e,t),e=e.sibling}function n_(t,e){var n=t.alternate,r=t.flags;switch(t.tag){case 0:case 11:case 14:case 15:if(Ot(e,t),qt(t),r&4){try{Ss(3,t,t.return),_l(3,t)}catch(m){_e(t,t.return,m)}try{Ss(5,t,t.return)}catch(m){_e(t,t.return,m)}}break;case 1:Ot(e,t),qt(t),r&512&&n!==null&&Qr(n,n.return);break;case 5:if(Ot(e,t),qt(t),r&512&&n!==null&&Qr(n,n.return),t.flags&32){var i=t.stateNode;try{Os(i,"")}catch(m){_e(t,t.return,m)}}if(r&4&&(i=t.stateNode,i!=null)){var s=t.memoizedProps,o=n!==null?n.memoizedProps:s,a=t.type,l=t.updateQueue;if(t.updateQueue=null,l!==null)try{a==="input"&&s.type==="radio"&&s.name!=null&&ky(i,s),hc(a,o);var u=hc(a,s);for(o=0;o<l.length;o+=2){var c=l[o],d=l[o+1];c==="style"?Ay(i,d):c==="dangerouslySetInnerHTML"?Py(i,d):c==="children"?Os(i,d):hf(i,c,d,u)}switch(a){case"input":lc(i,s);break;case"textarea":Cy(i,s);break;case"select":var f=i._wrapperState.wasMultiple;i._wrapperState.wasMultiple=!!s.multiple;var h=s.value;h!=null?ai(i,!!s.multiple,h,!1):f!==!!s.multiple&&(s.defaultValue!=null?ai(i,!!s.multiple,s.defaultValue,!0):ai(i,!!s.multiple,s.multiple?[]:"",!1))}i[Us]=s}catch(m){_e(t,t.return,m)}}break;case 6:if(Ot(e,t),qt(t),r&4){if(t.stateNode===null)throw Error(N(162));i=t.stateNode,s=t.memoizedProps;try{i.nodeValue=s}catch(m){_e(t,t.return,m)}}break;case 3:if(Ot(e,t),qt(t),r&4&&n!==null&&n.memoizedState.isDehydrated)try{Fs(e.containerInfo)}catch(m){_e(t,t.return,m)}break;case 4:Ot(e,t),qt(t);break;case 13:Ot(e,t),qt(t),i=t.child,i.flags&8192&&(s=i.memoizedState!==null,i.stateNode.isHidden=s,!s||i.alternate!==null&&i.alternate.memoizedState!==null||(Kf=ke())),r&4&&dg(t);break;case 22:if(c=n!==null&&n.memoizedState!==null,t.mode&1?(Ue=(u=Ue)||c,Ot(e,t),Ue=u):Ot(e,t),qt(t),r&8192){if(u=t.memoizedState!==null,(t.stateNode.isHidden=u)&&!c&&t.mode&1)for(z=t,c=t.child;c!==null;){for(d=z=c;z!==null;){switch(f=z,h=f.child,f.tag){case 0:case 11:case 14:case 15:Ss(4,f,f.return);break;case 1:Qr(f,f.return);var y=f.stateNode;if(typeof y.componentWillUnmount=="function"){r=f,n=f.return;try{e=r,y.props=e.memoizedProps,y.state=e.memoizedState,y.componentWillUnmount()}catch(m){_e(r,n,m)}}break;case 5:Qr(f,f.return);break;case 22:if(f.memoizedState!==null){hg(d);continue}}h!==null?(h.return=f,z=h):hg(d)}c=c.sibling}e:for(c=null,d=t;;){if(d.tag===5){if(c===null){c=d;try{i=d.stateNode,u?(s=i.style,typeof s.setProperty=="function"?s.setProperty("display","none","important"):s.display="none"):(a=d.stateNode,l=d.memoizedProps.style,o=l!=null&&l.hasOwnProperty("display")?l.display:null,a.style.display=Ty("display",o))}catch(m){_e(t,t.return,m)}}}else if(d.tag===6){if(c===null)try{d.stateNode.nodeValue=u?"":d.memoizedProps}catch(m){_e(t,t.return,m)}}else if((d.tag!==22&&d.tag!==23||d.memoizedState===null||d===t)&&d.child!==null){d.child.return=d,d=d.child;continue}if(d===t)break e;for(;d.sibling===null;){if(d.return===null||d.return===t)break e;c===d&&(c=null),d=d.return}c===d&&(c=null),d.sibling.return=d.return,d=d.sibling}}break;case 19:Ot(e,t),qt(t),r&4&&dg(t);break;case 21:break;default:Ot(e,t),qt(t)}}function qt(t){var e=t.flags;if(e&2){try{e:{for(var n=t.return;n!==null;){if(e_(n)){var r=n;break e}n=n.return}throw Error(N(160))}switch(r.tag){case 5:var i=r.stateNode;r.flags&32&&(Os(i,""),r.flags&=-33);var s=cg(t);Uc(t,s,i);break;case 3:case 4:var o=r.stateNode.containerInfo,a=cg(t);zc(t,a,o);break;default:throw Error(N(161))}}catch(l){_e(t,t.return,l)}t.flags&=-3}e&4096&&(t.flags&=-4097)}function Ck(t,e,n){z=t,r_(t)}function r_(t,e,n){for(var r=(t.mode&1)!==0;z!==null;){var i=z,s=i.child;if(i.tag===22&&r){var o=i.memoizedState!==null||Mo;if(!o){var a=i.alternate,l=a!==null&&a.memoizedState!==null||Ue;a=Mo;var u=Ue;if(Mo=o,(Ue=l)&&!u)for(z=i;z!==null;)o=z,l=o.child,o.tag===22&&o.memoizedState!==null?pg(i):l!==null?(l.return=o,z=l):pg(i);for(;s!==null;)z=s,r_(s),s=s.sibling;z=i,Mo=a,Ue=u}fg(t)}else i.subtreeFlags&8772&&s!==null?(s.return=i,z=s):fg(t)}}function fg(t){for(;z!==null;){var e=z;if(e.flags&8772){var n=e.alternate;try{if(e.flags&8772)switch(e.tag){case 0:case 11:case 15:Ue||_l(5,e);break;case 1:var r=e.stateNode;if(e.flags&4&&!Ue)if(n===null)r.componentDidMount();else{var i=e.elementType===e.type?n.memoizedProps:Dt(e.type,n.memoizedProps);r.componentDidUpdate(i,n.memoizedState,r.__reactInternalSnapshotBeforeUpdate)}var s=e.updateQueue;s!==null&&Xp(e,s,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}Xp(e,o,n)}break;case 5:var a=e.stateNode;if(n===null&&e.flags&4){n=a;var l=e.memoizedProps;switch(e.type){case"button":case"input":case"select":case"textarea":l.autoFocus&&n.focus();break;case"img":l.src&&(n.src=l.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 c=u.memoizedState;if(c!==null){var d=c.dehydrated;d!==null&&Fs(d)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(N(163))}Ue||e.flags&512&&Bc(e)}catch(f){_e(e,e.return,f)}}if(e===t){z=null;break}if(n=e.sibling,n!==null){n.return=e.return,z=n;break}z=e.return}}function hg(t){for(;z!==null;){var e=z;if(e===t){z=null;break}var n=e.sibling;if(n!==null){n.return=e.return,z=n;break}z=e.return}}function pg(t){for(;z!==null;){var e=z;try{switch(e.tag){case 0:case 11:case 15:var n=e.return;try{_l(4,e)}catch(l){_e(e,n,l)}break;case 1:var r=e.stateNode;if(typeof r.componentDidMount=="function"){var i=e.return;try{r.componentDidMount()}catch(l){_e(e,i,l)}}var s=e.return;try{Bc(e)}catch(l){_e(e,s,l)}break;case 5:var o=e.return;try{Bc(e)}catch(l){_e(e,o,l)}}}catch(l){_e(e,e.return,l)}if(e===t){z=null;break}var a=e.sibling;if(a!==null){a.return=e.return,z=a;break}z=e.return}}var bk=Math.ceil,Na=Cn.ReactCurrentDispatcher,Hf=Cn.ReactCurrentOwner,Pt=Cn.ReactCurrentBatchConfig,J=0,Ne=null,be=null,$e=0,ht=0,Zr=nr(0),Ae=0,Ys=null,Pr=0,wl=0,Wf=0,Es=null,it=null,Kf=0,Si=1/0,un=null,Oa=!1,Hc=null,Wn=null,Io=!1,Fn=null,La=0,ks=0,Wc=null,ia=-1,sa=0;function Je(){return J&6?ke():ia!==-1?ia:ia=ke()}function Kn(t){return t.mode&1?J&2&&$e!==0?$e&-$e:uk.transition!==null?(sa===0&&(sa=By()),sa):(t=te,t!==0||(t=window.event,t=t===void 0?16:qy(t.type)),t):1}function Ut(t,e,n,r){if(50<ks)throw ks=0,Wc=null,Error(N(185));ao(t,n,r),(!(J&2)||t!==Ne)&&(t===Ne&&(!(J&2)&&(wl|=n),Ae===4&&Dn(t,$e)),ft(t,r),n===1&&J===0&&!(e.mode&1)&&(Si=ke()+500,ml&&rr()))}function ft(t,e){var n=t.callbackNode;uE(t,e);var r=ya(t,t===Ne?$e:0);if(r===0)n!==null&&Ep(n),t.callbackNode=null,t.callbackPriority=0;else if(e=r&-r,t.callbackPriority!==e){if(n!=null&&Ep(n),e===1)t.tag===0?lk(gg.bind(null,t)):h0(gg.bind(null,t)),ik(function(){!(J&6)&&rr()}),n=null;else{switch(zy(r)){case 1:n=yf;break;case 4:n=jy;break;case 16:n=va;break;case 536870912:n=Vy;break;default:n=va}n=d_(n,i_.bind(null,t))}t.callbackPriority=e,t.callbackNode=n}}function i_(t,e){if(ia=-1,sa=0,J&6)throw Error(N(327));var n=t.callbackNode;if(fi()&&t.callbackNode!==n)return null;var r=ya(t,t===Ne?$e:0);if(r===0)return null;if(r&30||r&t.expiredLanes||e)e=Da(t,r);else{e=r;var i=J;J|=2;var s=o_();(Ne!==t||$e!==e)&&(un=null,Si=ke()+500,wr(t,e));do try{Ak();break}catch(a){s_(t,a)}while(!0);Mf(),Na.current=s,J=i,be!==null?e=0:(Ne=null,$e=0,e=Ae)}if(e!==0){if(e===2&&(i=yc(t),i!==0&&(r=i,e=Kc(t,i))),e===1)throw n=Ys,wr(t,0),Dn(t,r),ft(t,ke()),n;if(e===6)Dn(t,r);else{if(i=t.current.alternate,!(r&30)&&!Pk(i)&&(e=Da(t,r),e===2&&(s=yc(t),s!==0&&(r=s,e=Kc(t,s))),e===1))throw n=Ys,wr(t,0),Dn(t,r),ft(t,ke()),n;switch(t.finishedWork=i,t.finishedLanes=r,e){case 0:case 1:throw Error(N(345));case 2:dr(t,it,un);break;case 3:if(Dn(t,r),(r&130023424)===r&&(e=Kf+500-ke(),10<e)){if(ya(t,0)!==0)break;if(i=t.suspendedLanes,(i&r)!==r){Je(),t.pingedLanes|=t.suspendedLanes&i;break}t.timeoutHandle=bc(dr.bind(null,t,it,un),e);break}dr(t,it,un);break;case 4:if(Dn(t,r),(r&4194240)===r)break;for(e=t.eventTimes,i=-1;0<r;){var o=31-zt(r);s=1<<o,o=e[o],o>i&&(i=o),r&=~s}if(r=i,r=ke()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*bk(r/1960))-r,10<r){t.timeoutHandle=bc(dr.bind(null,t,it,un),r);break}dr(t,it,un);break;case 5:dr(t,it,un);break;default:throw Error(N(329))}}}return ft(t,ke()),t.callbackNode===n?i_.bind(null,t):null}function Kc(t,e){var n=Es;return t.current.memoizedState.isDehydrated&&(wr(t,e).flags|=256),t=Da(t,e),t!==2&&(e=it,it=n,e!==null&&Gc(e)),t}function Gc(t){it===null?it=t:it.push.apply(it,t)}function Pk(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 i=n[r],s=i.getSnapshot;i=i.value;try{if(!Ht(s(),i))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 Dn(t,e){for(e&=~Wf,e&=~wl,t.suspendedLanes|=e,t.pingedLanes&=~e,t=t.expirationTimes;0<e;){var n=31-zt(e),r=1<<n;t[n]=-1,e&=~r}}function gg(t){if(J&6)throw Error(N(327));fi();var e=ya(t,0);if(!(e&1))return ft(t,ke()),null;var n=Da(t,e);if(t.tag!==0&&n===2){var r=yc(t);r!==0&&(e=r,n=Kc(t,r))}if(n===1)throw n=Ys,wr(t,0),Dn(t,e),ft(t,ke()),n;if(n===6)throw Error(N(345));return t.finishedWork=t.current.alternate,t.finishedLanes=e,dr(t,it,un),ft(t,ke()),null}function Gf(t,e){var n=J;J|=1;try{return t(e)}finally{J=n,J===0&&(Si=ke()+500,ml&&rr())}}function Tr(t){Fn!==null&&Fn.tag===0&&!(J&6)&&fi();var e=J;J|=1;var n=Pt.transition,r=te;try{if(Pt.transition=null,te=1,t)return t()}finally{te=r,Pt.transition=n,J=e,!(J&6)&&rr()}}function qf(){ht=Zr.current,le(Zr)}function wr(t,e){t.finishedWork=null,t.finishedLanes=0;var n=t.timeoutHandle;if(n!==-1&&(t.timeoutHandle=-1,rk(n)),be!==null)for(n=be.return;n!==null;){var r=n;switch(Tf(r),r.tag){case 1:r=r.type.childContextTypes,r!=null&&Ea();break;case 3:wi(),le(ct),le(qe),$f();break;case 5:Df(r);break;case 4:wi();break;case 13:le(fe);break;case 19:le(fe);break;case 10:If(r.type._context);break;case 22:case 23:qf()}n=n.return}if(Ne=t,be=t=Gn(t.current,null),$e=ht=e,Ae=0,Ys=null,Wf=wl=Pr=0,it=Es=null,mr!==null){for(e=0;e<mr.length;e++)if(n=mr[e],r=n.interleaved,r!==null){n.interleaved=null;var i=r.next,s=n.pending;if(s!==null){var o=s.next;s.next=i,r.next=o}n.pending=r}mr=null}return t}function s_(t,e){do{var n=be;try{if(Mf(),ta.current=Ia,Ma){for(var r=ge.memoizedState;r!==null;){var i=r.queue;i!==null&&(i.pending=null),r=r.next}Ma=!1}if(br=0,Ie=Pe=ge=null,xs=!1,Ks=0,Hf.current=null,n===null||n.return===null){Ae=1,Ys=e,be=null;break}e:{var s=t,o=n.return,a=n,l=e;if(e=$e,a.flags|=32768,l!==null&&typeof l=="object"&&typeof l.then=="function"){var u=l,c=a,d=c.tag;if(!(c.mode&1)&&(d===0||d===11||d===15)){var f=c.alternate;f?(c.updateQueue=f.updateQueue,c.memoizedState=f.memoizedState,c.lanes=f.lanes):(c.updateQueue=null,c.memoizedState=null)}var h=ng(o);if(h!==null){h.flags&=-257,rg(h,o,a,s,e),h.mode&1&&tg(s,u,e),e=h,l=u;var y=e.updateQueue;if(y===null){var m=new Set;m.add(l),e.updateQueue=m}else y.add(l);break e}else{if(!(e&1)){tg(s,u,e),Yf();break e}l=Error(N(426))}}else if(ce&&a.mode&1){var _=ng(o);if(_!==null){!(_.flags&65536)&&(_.flags|=256),rg(_,o,a,s,e),Af(xi(l,a));break e}}s=l=xi(l,a),Ae!==4&&(Ae=2),Es===null?Es=[s]:Es.push(s),s=o;do{switch(s.tag){case 3:s.flags|=65536,e&=-e,s.lanes|=e;var p=z0(s,l,e);Yp(s,p);break e;case 1:a=l;var g=s.type,v=s.stateNode;if(!(s.flags&128)&&(typeof g.getDerivedStateFromError=="function"||v!==null&&typeof v.componentDidCatch=="function"&&(Wn===null||!Wn.has(v)))){s.flags|=65536,e&=-e,s.lanes|=e;var w=U0(s,a,e);Yp(s,w);break e}}s=s.return}while(s!==null)}l_(n)}catch(E){e=E,be===n&&n!==null&&(be=n=n.return);continue}break}while(!0)}function o_(){var t=Na.current;return Na.current=Ia,t===null?Ia:t}function Yf(){(Ae===0||Ae===3||Ae===2)&&(Ae=4),Ne===null||!(Pr&268435455)&&!(wl&268435455)||Dn(Ne,$e)}function Da(t,e){var n=J;J|=2;var r=o_();(Ne!==t||$e!==e)&&(un=null,wr(t,e));do try{Tk();break}catch(i){s_(t,i)}while(!0);if(Mf(),J=n,Na.current=r,be!==null)throw Error(N(261));return Ne=null,$e=0,Ae}function Tk(){for(;be!==null;)a_(be)}function Ak(){for(;be!==null&&!eE();)a_(be)}function a_(t){var e=c_(t.alternate,t,ht);t.memoizedProps=t.pendingProps,e===null?l_(t):be=e,Hf.current=null}function l_(t){var e=t;do{var n=e.alternate;if(t=e.return,e.flags&32768){if(n=Sk(n,e),n!==null){n.flags&=32767,be=n;return}if(t!==null)t.flags|=32768,t.subtreeFlags=0,t.deletions=null;else{Ae=6,be=null;return}}else if(n=xk(n,e,ht),n!==null){be=n;return}if(e=e.sibling,e!==null){be=e;return}be=e=t}while(e!==null);Ae===0&&(Ae=5)}function dr(t,e,n){var r=te,i=Pt.transition;try{Pt.transition=null,te=1,Rk(t,e,n,r)}finally{Pt.transition=i,te=r}return null}function Rk(t,e,n,r){do fi();while(Fn!==null);if(J&6)throw Error(N(327));n=t.finishedWork;var i=t.finishedLanes;if(n===null)return null;if(t.finishedWork=null,t.finishedLanes=0,n===t.current)throw Error(N(177));t.callbackNode=null,t.callbackPriority=0;var s=n.lanes|n.childLanes;if(cE(t,s),t===Ne&&(be=Ne=null,$e=0),!(n.subtreeFlags&2064)&&!(n.flags&2064)||Io||(Io=!0,d_(va,function(){return fi(),null})),s=(n.flags&15990)!==0,n.subtreeFlags&15990||s){s=Pt.transition,Pt.transition=null;var o=te;te=1;var a=J;J|=4,Hf.current=null,kk(t,n),n_(n,t),XE(kc),_a=!!Ec,kc=Ec=null,t.current=n,Ck(n),tE(),J=a,te=o,Pt.transition=s}else t.current=n;if(Io&&(Io=!1,Fn=t,La=i),s=t.pendingLanes,s===0&&(Wn=null),iE(n.stateNode),ft(t,ke()),e!==null)for(r=t.onRecoverableError,n=0;n<e.length;n++)i=e[n],r(i.value,{componentStack:i.stack,digest:i.digest});if(Oa)throw Oa=!1,t=Hc,Hc=null,t;return La&1&&t.tag!==0&&fi(),s=t.pendingLanes,s&1?t===Wc?ks++:(ks=0,Wc=t):ks=0,rr(),null}function fi(){if(Fn!==null){var t=zy(La),e=Pt.transition,n=te;try{if(Pt.transition=null,te=16>t?16:t,Fn===null)var r=!1;else{if(t=Fn,Fn=null,La=0,J&6)throw Error(N(331));var i=J;for(J|=4,z=t.current;z!==null;){var s=z,o=s.child;if(z.flags&16){var a=s.deletions;if(a!==null){for(var l=0;l<a.length;l++){var u=a[l];for(z=u;z!==null;){var c=z;switch(c.tag){case 0:case 11:case 15:Ss(8,c,s)}var d=c.child;if(d!==null)d.return=c,z=d;else for(;z!==null;){c=z;var f=c.sibling,h=c.return;if(J0(c),c===u){z=null;break}if(f!==null){f.return=h,z=f;break}z=h}}}var y=s.alternate;if(y!==null){var m=y.child;if(m!==null){y.child=null;do{var _=m.sibling;m.sibling=null,m=_}while(m!==null)}}z=s}}if(s.subtreeFlags&2064&&o!==null)o.return=s,z=o;else e:for(;z!==null;){if(s=z,s.flags&2048)switch(s.tag){case 0:case 11:case 15:Ss(9,s,s.return)}var p=s.sibling;if(p!==null){p.return=s.return,z=p;break e}z=s.return}}var g=t.current;for(z=g;z!==null;){o=z;var v=o.child;if(o.subtreeFlags&2064&&v!==null)v.return=o,z=v;else e:for(o=g;z!==null;){if(a=z,a.flags&2048)try{switch(a.tag){case 0:case 11:case 15:_l(9,a)}}catch(E){_e(a,a.return,E)}if(a===o){z=null;break e}var w=a.sibling;if(w!==null){w.return=a.return,z=w;break e}z=a.return}}if(J=i,rr(),en&&typeof en.onPostCommitFiberRoot=="function")try{en.onPostCommitFiberRoot(dl,t)}catch{}r=!0}return r}finally{te=n,Pt.transition=e}}return!1}function mg(t,e,n){e=xi(n,e),e=z0(t,e,1),t=Hn(t,e,1),e=Je(),t!==null&&(ao(t,1,e),ft(t,e))}function _e(t,e,n){if(t.tag===3)mg(t,t,n);else for(;e!==null;){if(e.tag===3){mg(e,t,n);break}else if(e.tag===1){var r=e.stateNode;if(typeof e.type.getDerivedStateFromError=="function"||typeof r.componentDidCatch=="function"&&(Wn===null||!Wn.has(r))){t=xi(n,t),t=U0(e,t,1),e=Hn(e,t,1),t=Je(),e!==null&&(ao(e,1,t),ft(e,t));break}}e=e.return}}function Mk(t,e,n){var r=t.pingCache;r!==null&&r.delete(e),e=Je(),t.pingedLanes|=t.suspendedLanes&n,Ne===t&&($e&n)===n&&(Ae===4||Ae===3&&($e&130023424)===$e&&500>ke()-Kf?wr(t,0):Wf|=n),ft(t,e)}function u_(t,e){e===0&&(t.mode&1?(e=So,So<<=1,!(So&130023424)&&(So=4194304)):e=1);var n=Je();t=wn(t,e),t!==null&&(ao(t,e,n),ft(t,n))}function Ik(t){var e=t.memoizedState,n=0;e!==null&&(n=e.retryLane),u_(t,n)}function Nk(t,e){var n=0;switch(t.tag){case 13:var r=t.stateNode,i=t.memoizedState;i!==null&&(n=i.retryLane);break;case 19:r=t.stateNode;break;default:throw Error(N(314))}r!==null&&r.delete(e),u_(t,n)}var c_;c_=function(t,e,n){if(t!==null)if(t.memoizedProps!==e.pendingProps||ct.current)ot=!0;else{if(!(t.lanes&n)&&!(e.flags&128))return ot=!1,wk(t,e,n);ot=!!(t.flags&131072)}else ot=!1,ce&&e.flags&1048576&&p0(e,ba,e.index);switch(e.lanes=0,e.tag){case 2:var r=e.type;ra(t,e),t=e.pendingProps;var i=vi(e,qe.current);di(e,n),i=jf(null,e,r,t,i,n);var s=Vf();return e.flags|=1,typeof i=="object"&&i!==null&&typeof i.render=="function"&&i.$$typeof===void 0?(e.tag=1,e.memoizedState=null,e.updateQueue=null,dt(r)?(s=!0,ka(e)):s=!1,e.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,Of(e),i.updater=yl,e.stateNode=i,i._reactInternals=e,Nc(e,r,t,n),e=Dc(null,e,r,!0,s,n)):(e.tag=0,ce&&s&&Pf(e),Xe(null,e,i,n),e=e.child),e;case 16:r=e.elementType;e:{switch(ra(t,e),t=e.pendingProps,i=r._init,r=i(r._payload),e.type=r,i=e.tag=Lk(r),t=Dt(r,t),i){case 0:e=Lc(null,e,r,t,n);break e;case 1:e=og(null,e,r,t,n);break e;case 11:e=ig(null,e,r,t,n);break e;case 14:e=sg(null,e,r,Dt(r.type,t),n);break e}throw Error(N(306,r,""))}return e;case 0:return r=e.type,i=e.pendingProps,i=e.elementType===r?i:Dt(r,i),Lc(t,e,r,i,n);case 1:return r=e.type,i=e.pendingProps,i=e.elementType===r?i:Dt(r,i),og(t,e,r,i,n);case 3:e:{if(G0(e),t===null)throw Error(N(387));r=e.pendingProps,s=e.memoizedState,i=s.element,w0(t,e),Aa(e,r,null,n);var o=e.memoizedState;if(r=o.element,s.isDehydrated)if(s={element:r,isDehydrated:!1,cache:o.cache,pendingSuspenseBoundaries:o.pendingSuspenseBoundaries,transitions:o.transitions},e.updateQueue.baseState=s,e.memoizedState=s,e.flags&256){i=xi(Error(N(423)),e),e=ag(t,e,r,n,i);break e}else if(r!==i){i=xi(Error(N(424)),e),e=ag(t,e,r,n,i);break e}else for(pt=Un(e.stateNode.containerInfo.firstChild),vt=e,ce=!0,Vt=null,n=y0(e,null,r,n),e.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(yi(),r===i){e=xn(t,e,n);break e}Xe(t,e,r,n)}e=e.child}return e;case 5:return x0(e),t===null&&Rc(e),r=e.type,i=e.pendingProps,s=t!==null?t.memoizedProps:null,o=i.children,Cc(r,i)?o=null:s!==null&&Cc(r,s)&&(e.flags|=32),K0(t,e),Xe(t,e,o,n),e.child;case 6:return t===null&&Rc(e),null;case 13:return q0(t,e,n);case 4:return Lf(e,e.stateNode.containerInfo),r=e.pendingProps,t===null?e.child=_i(e,null,r,n):Xe(t,e,r,n),e.child;case 11:return r=e.type,i=e.pendingProps,i=e.elementType===r?i:Dt(r,i),ig(t,e,r,i,n);case 7:return Xe(t,e,e.pendingProps,n),e.child;case 8:return Xe(t,e,e.pendingProps.children,n),e.child;case 12:return Xe(t,e,e.pendingProps.children,n),e.child;case 10:e:{if(r=e.type._context,i=e.pendingProps,s=e.memoizedProps,o=i.value,se(Pa,r._currentValue),r._currentValue=o,s!==null)if(Ht(s.value,o)){if(s.children===i.children&&!ct.current){e=xn(t,e,n);break e}}else for(s=e.child,s!==null&&(s.return=e);s!==null;){var a=s.dependencies;if(a!==null){o=s.child;for(var l=a.firstContext;l!==null;){if(l.context===r){if(s.tag===1){l=vn(-1,n&-n),l.tag=2;var u=s.updateQueue;if(u!==null){u=u.shared;var c=u.pending;c===null?l.next=l:(l.next=c.next,c.next=l),u.pending=l}}s.lanes|=n,l=s.alternate,l!==null&&(l.lanes|=n),Mc(s.return,n,e),a.lanes|=n;break}l=l.next}}else if(s.tag===10)o=s.type===e.type?null:s.child;else if(s.tag===18){if(o=s.return,o===null)throw Error(N(341));o.lanes|=n,a=o.alternate,a!==null&&(a.lanes|=n),Mc(o,n,e),o=s.sibling}else o=s.child;if(o!==null)o.return=s;else for(o=s;o!==null;){if(o===e){o=null;break}if(s=o.sibling,s!==null){s.return=o.return,o=s;break}o=o.return}s=o}Xe(t,e,i.children,n),e=e.child}return e;case 9:return i=e.type,r=e.pendingProps.children,di(e,n),i=It(i),r=r(i),e.flags|=1,Xe(t,e,r,n),e.child;case 14:return r=e.type,i=Dt(r,e.pendingProps),i=Dt(r.type,i),sg(t,e,r,i,n);case 15:return H0(t,e,e.type,e.pendingProps,n);case 17:return r=e.type,i=e.pendingProps,i=e.elementType===r?i:Dt(r,i),ra(t,e),e.tag=1,dt(r)?(t=!0,ka(e)):t=!1,di(e,n),B0(e,r,i),Nc(e,r,i,n),Dc(null,e,r,!0,t,n);case 19:return Y0(t,e,n);case 22:return W0(t,e,n)}throw Error(N(156,e.tag))};function d_(t,e){return Fy(t,e)}function Ok(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 Ct(t,e,n,r){return new Ok(t,e,n,r)}function Xf(t){return t=t.prototype,!(!t||!t.isReactComponent)}function Lk(t){if(typeof t=="function")return Xf(t)?1:0;if(t!=null){if(t=t.$$typeof,t===gf)return 11;if(t===mf)return 14}return 2}function Gn(t,e){var n=t.alternate;return n===null?(n=Ct(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 oa(t,e,n,r,i,s){var o=2;if(r=t,typeof t=="function")Xf(t)&&(o=1);else if(typeof t=="string")o=5;else e:switch(t){case zr:return xr(n.children,i,s,e);case pf:o=8,i|=8;break;case rc:return t=Ct(12,n,e,i|2),t.elementType=rc,t.lanes=s,t;case ic:return t=Ct(13,n,e,i),t.elementType=ic,t.lanes=s,t;case sc:return t=Ct(19,n,e,i),t.elementType=sc,t.lanes=s,t;case xy:return xl(n,i,s,e);default:if(typeof t=="object"&&t!==null)switch(t.$$typeof){case _y:o=10;break e;case wy:o=9;break e;case gf:o=11;break e;case mf:o=14;break e;case Nn:o=16,r=null;break e}throw Error(N(130,t==null?t:typeof t,""))}return e=Ct(o,n,e,i),e.elementType=t,e.type=r,e.lanes=s,e}function xr(t,e,n,r){return t=Ct(7,t,r,e),t.lanes=n,t}function xl(t,e,n,r){return t=Ct(22,t,r,e),t.elementType=xy,t.lanes=n,t.stateNode={isHidden:!1},t}function yu(t,e,n){return t=Ct(6,t,null,e),t.lanes=n,t}function _u(t,e,n){return e=Ct(4,t.children!==null?t.children:[],t.key,e),e.lanes=n,e.stateNode={containerInfo:t.containerInfo,pendingChildren:null,implementation:t.implementation},e}function Dk(t,e,n,r,i){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=Jl(0),this.expirationTimes=Jl(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Jl(0),this.identifierPrefix=r,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function Qf(t,e,n,r,i,s,o,a,l){return t=new Dk(t,e,n,a,l),e===1?(e=1,s===!0&&(e|=8)):e=0,s=Ct(3,null,null,e),t.current=s,s.stateNode=t,s.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},Of(s),t}function $k(t,e,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:Br,key:r==null?null:""+r,children:t,containerInfo:e,implementation:n}}function f_(t){if(!t)return Qn;t=t._reactInternals;e:{if(Lr(t)!==t||t.tag!==1)throw Error(N(170));var e=t;do{switch(e.tag){case 3:e=e.stateNode.context;break e;case 1:if(dt(e.type)){e=e.stateNode.__reactInternalMemoizedMergedChildContext;break e}}e=e.return}while(e!==null);throw Error(N(171))}if(t.tag===1){var n=t.type;if(dt(n))return f0(t,n,e)}return e}function h_(t,e,n,r,i,s,o,a,l){return t=Qf(n,r,!0,t,i,s,o,a,l),t.context=f_(null),n=t.current,r=Je(),i=Kn(n),s=vn(r,i),s.callback=e??null,Hn(n,s,i),t.current.lanes=i,ao(t,i,r),ft(t,r),t}function Sl(t,e,n,r){var i=e.current,s=Je(),o=Kn(i);return n=f_(n),e.context===null?e.context=n:e.pendingContext=n,e=vn(s,o),e.payload={element:t},r=r===void 0?null:r,r!==null&&(e.callback=r),t=Hn(i,e,o),t!==null&&(Ut(t,i,o,s),ea(t,i,o)),o}function $a(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 vg(t,e){if(t=t.memoizedState,t!==null&&t.dehydrated!==null){var n=t.retryLane;t.retryLane=n!==0&&n<e?n:e}}function Zf(t,e){vg(t,e),(t=t.alternate)&&vg(t,e)}function Fk(){return null}var p_=typeof reportError=="function"?reportError:function(t){console.error(t)};function Jf(t){this._internalRoot=t}El.prototype.render=Jf.prototype.render=function(t){var e=this._internalRoot;if(e===null)throw Error(N(409));Sl(t,e,null,null)};El.prototype.unmount=Jf.prototype.unmount=function(){var t=this._internalRoot;if(t!==null){this._internalRoot=null;var e=t.containerInfo;Tr(function(){Sl(null,t,null,null)}),e[_n]=null}};function El(t){this._internalRoot=t}El.prototype.unstable_scheduleHydration=function(t){if(t){var e=Wy();t={blockedOn:null,target:t,priority:e};for(var n=0;n<Ln.length&&e!==0&&e<Ln[n].priority;n++);Ln.splice(n,0,t),n===0&&Gy(t)}};function eh(t){return!(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11)}function kl(t){return!(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11&&(t.nodeType!==8||t.nodeValue!==" react-mount-point-unstable "))}function yg(){}function jk(t,e,n,r,i){if(i){if(typeof r=="function"){var s=r;r=function(){var u=$a(o);s.call(u)}}var o=h_(e,r,t,0,null,!1,!1,"",yg);return t._reactRootContainer=o,t[_n]=o.current,Bs(t.nodeType===8?t.parentNode:t),Tr(),o}for(;i=t.lastChild;)t.removeChild(i);if(typeof r=="function"){var a=r;r=function(){var u=$a(l);a.call(u)}}var l=Qf(t,0,!1,null,null,!1,!1,"",yg);return t._reactRootContainer=l,t[_n]=l.current,Bs(t.nodeType===8?t.parentNode:t),Tr(function(){Sl(e,l,n,r)}),l}function Cl(t,e,n,r,i){var s=n._reactRootContainer;if(s){var o=s;if(typeof i=="function"){var a=i;i=function(){var l=$a(o);a.call(l)}}Sl(e,o,t,i)}else o=jk(n,e,t,i,r);return $a(o)}Uy=function(t){switch(t.tag){case 3:var e=t.stateNode;if(e.current.memoizedState.isDehydrated){var n=is(e.pendingLanes);n!==0&&(_f(e,n|1),ft(e,ke()),!(J&6)&&(Si=ke()+500,rr()))}break;case 13:Tr(function(){var r=wn(t,1);if(r!==null){var i=Je();Ut(r,t,1,i)}}),Zf(t,1)}};wf=function(t){if(t.tag===13){var e=wn(t,134217728);if(e!==null){var n=Je();Ut(e,t,134217728,n)}Zf(t,134217728)}};Hy=function(t){if(t.tag===13){var e=Kn(t),n=wn(t,e);if(n!==null){var r=Je();Ut(n,t,e,r)}Zf(t,e)}};Wy=function(){return te};Ky=function(t,e){var n=te;try{return te=t,e()}finally{te=n}};gc=function(t,e,n){switch(e){case"input":if(lc(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 i=gl(r);if(!i)throw Error(N(90));Ey(r),lc(r,i)}}}break;case"textarea":Cy(t,n);break;case"select":e=n.value,e!=null&&ai(t,!!n.multiple,e,!1)}};Iy=Gf;Ny=Tr;var Vk={usingClientEntryPoint:!1,Events:[uo,Kr,gl,Ry,My,Gf]},Wi={findFiberByHostInstance:gr,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},Bk={bundleType:Wi.bundleType,version:Wi.version,rendererPackageName:Wi.rendererPackageName,rendererConfig:Wi.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:Cn.ReactCurrentDispatcher,findHostInstanceByFiber:function(t){return t=Dy(t),t===null?null:t.stateNode},findFiberByHostInstance:Wi.findFiberByHostInstance||Fk,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.3.1-next-f1338f8080-20240426"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var No=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!No.isDisabled&&No.supportsFiber)try{dl=No.inject(Bk),en=No}catch{}}_t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=Vk;_t.createPortal=function(t,e){var n=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!eh(e))throw Error(N(200));return $k(t,e,null,n)};_t.createRoot=function(t,e){if(!eh(t))throw Error(N(299));var n=!1,r="",i=p_;return e!=null&&(e.unstable_strictMode===!0&&(n=!0),e.identifierPrefix!==void 0&&(r=e.identifierPrefix),e.onRecoverableError!==void 0&&(i=e.onRecoverableError)),e=Qf(t,1,!1,null,null,n,!1,r,i),t[_n]=e.current,Bs(t.nodeType===8?t.parentNode:t),new Jf(e)};_t.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(N(188)):(t=Object.keys(t).join(","),Error(N(268,t)));return t=Dy(e),t=t===null?null:t.stateNode,t};_t.flushSync=function(t){return Tr(t)};_t.hydrate=function(t,e,n){if(!kl(e))throw Error(N(200));return Cl(null,t,e,!0,n)};_t.hydrateRoot=function(t,e,n){if(!eh(t))throw Error(N(405));var r=n!=null&&n.hydratedSources||null,i=!1,s="",o=p_;if(n!=null&&(n.unstable_strictMode===!0&&(i=!0),n.identifierPrefix!==void 0&&(s=n.identifierPrefix),n.onRecoverableError!==void 0&&(o=n.onRecoverableError)),e=h_(e,null,t,1,n??null,i,!1,s,o),t[_n]=e.current,Bs(t),r)for(t=0;t<r.length;t++)n=r[t],i=n._getVersion,i=i(n._source),e.mutableSourceEagerHydrationData==null?e.mutableSourceEagerHydrationData=[n,i]:e.mutableSourceEagerHydrationData.push(n,i);return new El(e)};_t.render=function(t,e,n){if(!kl(e))throw Error(N(200));return Cl(null,t,e,!1,n)};_t.unmountComponentAtNode=function(t){if(!kl(t))throw Error(N(40));return t._reactRootContainer?(Tr(function(){Cl(null,null,t,!1,function(){t._reactRootContainer=null,t[_n]=null})}),!0):!1};_t.unstable_batchedUpdates=Gf;_t.unstable_renderSubtreeIntoContainer=function(t,e,n,r){if(!kl(n))throw Error(N(200));if(t==null||t._reactInternals===void 0)throw Error(N(38));return Cl(t,e,n,!1,r)};_t.version="18.3.1-next-f1338f8080-20240426";function g_(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(g_)}catch(t){console.error(t)}}g_(),gy.exports=_t;var bl=gy.exports;const zk=of(bl);var _g=bl;tc.createRoot=_g.createRoot,tc.hydrateRoot=_g.hydrateRoot;const m_=x.createContext({});function Uk(t){const e=x.useRef(null);return e.current===null&&(e.current=t()),e.current}const th=typeof window<"u",Hk=th?x.useLayoutEffect:x.useEffect,nh=x.createContext(null);function rh(t,e){t.indexOf(e)===-1&&t.push(e)}function ih(t,e){const n=t.indexOf(e);n>-1&&t.splice(n,1)}const Sn=(t,e,n)=>n>e?e:n<t?t:n;let sh=()=>{};const En={},v_=t=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(t);function y_(t){return typeof t=="object"&&t!==null}const __=t=>/^0[^.\s]+$/u.test(t);function oh(t){let e;return()=>(e===void 0&&(e=t()),e)}const Tt=t=>t,Wk=(t,e)=>n=>e(t(n)),fo=(...t)=>t.reduce(Wk),Xs=(t,e,n)=>{const r=e-t;return r===0?1:(n-t)/r};class ah{constructor(){this.subscriptions=[]}add(e){return rh(this.subscriptions,e),()=>ih(this.subscriptions,e)}notify(e,n,r){const i=this.subscriptions.length;if(i)if(i===1)this.subscriptions[0](e,n,r);else for(let s=0;s<i;s++){const o=this.subscriptions[s];o&&o(e,n,r)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const nn=t=>t*1e3,bt=t=>t/1e3;function w_(t,e){return e?t*(1e3/e):0}const x_=(t,e,n)=>(((1-3*n+3*e)*t+(3*n-6*e))*t+3*e)*t,Kk=1e-7,Gk=12;function qk(t,e,n,r,i){let s,o,a=0;do o=e+(n-e)/2,s=x_(o,r,i)-t,s>0?n=o:e=o;while(Math.abs(s)>Kk&&++a<Gk);return o}function ho(t,e,n,r){if(t===e&&n===r)return Tt;const i=s=>qk(s,0,1,t,n);return s=>s===0||s===1?s:x_(i(s),e,r)}const S_=t=>e=>e<=.5?t(2*e)/2:(2-t(2*(1-e)))/2,E_=t=>e=>1-t(1-e),k_=ho(.33,1.53,.69,.99),lh=E_(k_),C_=S_(lh),b_=t=>(t*=2)<1?.5*lh(t):.5*(2-Math.pow(2,-10*(t-1))),uh=t=>1-Math.sin(Math.acos(t)),P_=E_(uh),T_=S_(uh),Yk=ho(.42,0,1,1),Xk=ho(0,0,.58,1),A_=ho(.42,0,.58,1),Qk=t=>Array.isArray(t)&&typeof t[0]!="number",R_=t=>Array.isArray(t)&&typeof t[0]=="number",Zk={linear:Tt,easeIn:Yk,easeInOut:A_,easeOut:Xk,circIn:uh,circInOut:T_,circOut:P_,backIn:lh,backInOut:C_,backOut:k_,anticipate:b_},Jk=t=>typeof t=="string",wg=t=>{if(R_(t)){sh(t.length===4);const[e,n,r,i]=t;return ho(e,n,r,i)}else if(Jk(t))return Zk[t];return t},Oo=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"];function eC(t,e){let n=new Set,r=new Set,i=!1,s=!1;const o=new WeakSet;let a={delta:0,timestamp:0,isProcessing:!1};function l(c){o.has(c)&&(u.schedule(c),t()),c(a)}const u={schedule:(c,d=!1,f=!1)=>{const y=f&&i?n:r;return d&&o.add(c),y.has(c)||y.add(c),c},cancel:c=>{r.delete(c),o.delete(c)},process:c=>{if(a=c,i){s=!0;return}i=!0,[n,r]=[r,n],n.forEach(l),n.clear(),i=!1,s&&(s=!1,u.process(c))}};return u}const tC=40;function M_(t,e){let n=!1,r=!0;const i={delta:0,timestamp:0,isProcessing:!1},s=()=>n=!0,o=Oo.reduce((v,w)=>(v[w]=eC(s),v),{}),{setup:a,read:l,resolveKeyframes:u,preUpdate:c,update:d,preRender:f,render:h,postRender:y}=o,m=()=>{const v=En.useManualTiming?i.timestamp:performance.now();n=!1,En.useManualTiming||(i.delta=r?1e3/60:Math.max(Math.min(v-i.timestamp,tC),1)),i.timestamp=v,i.isProcessing=!0,a.process(i),l.process(i),u.process(i),c.process(i),d.process(i),f.process(i),h.process(i),y.process(i),i.isProcessing=!1,n&&e&&(r=!1,t(m))},_=()=>{n=!0,r=!0,i.isProcessing||t(m)};return{schedule:Oo.reduce((v,w)=>{const E=o[w];return v[w]=(P,C=!1,S=!1)=>(n||_(),E.schedule(P,C,S)),v},{}),cancel:v=>{for(let w=0;w<Oo.length;w++)o[Oo[w]].cancel(v)},state:i,steps:o}}const{schedule:de,cancel:Zn,state:Le,steps:wu}=M_(typeof requestAnimationFrame<"u"?requestAnimationFrame:Tt,!0);let aa;function nC(){aa=void 0}const at={now:()=>(aa===void 0&&at.set(Le.isProcessing||En.useManualTiming?Le.timestamp:performance.now()),aa),set:t=>{aa=t,queueMicrotask(nC)}},I_=t=>e=>typeof e=="string"&&e.startsWith(t),ch=I_("--"),rC=I_("var(--"),dh=t=>rC(t)?iC.test(t.split("/*")[0].trim()):!1,iC=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,Li={test:t=>typeof t=="number",parse:parseFloat,transform:t=>t},Qs={...Li,transform:t=>Sn(0,1,t)},Lo={...Li,default:1},Cs=t=>Math.round(t*1e5)/1e5,fh=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function sC(t){return t==null}const oC=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,hh=(t,e)=>n=>!!(typeof n=="string"&&oC.test(n)&&n.startsWith(t)||e&&!sC(n)&&Object.prototype.hasOwnProperty.call(n,e)),N_=(t,e,n)=>r=>{if(typeof r!="string")return r;const[i,s,o,a]=r.match(fh);return{[t]:parseFloat(i),[e]:parseFloat(s),[n]:parseFloat(o),alpha:a!==void 0?parseFloat(a):1}},aC=t=>Sn(0,255,t),xu={...Li,transform:t=>Math.round(aC(t))},yr={test:hh("rgb","red"),parse:N_("red","green","blue"),transform:({red:t,green:e,blue:n,alpha:r=1})=>"rgba("+xu.transform(t)+", "+xu.transform(e)+", "+xu.transform(n)+", "+Cs(Qs.transform(r))+")"};function lC(t){let e="",n="",r="",i="";return t.length>5?(e=t.substring(1,3),n=t.substring(3,5),r=t.substring(5,7),i=t.substring(7,9)):(e=t.substring(1,2),n=t.substring(2,3),r=t.substring(3,4),i=t.substring(4,5),e+=e,n+=n,r+=r,i+=i),{red:parseInt(e,16),green:parseInt(n,16),blue:parseInt(r,16),alpha:i?parseInt(i,16)/255:1}}const qc={test:hh("#"),parse:lC,transform:yr.transform},po=t=>({test:e=>typeof e=="string"&&e.endsWith(t)&&e.split(" ").length===1,parse:parseFloat,transform:e=>`${e}${t}`}),Mn=po("deg"),rn=po("%"),K=po("px"),uC=po("vh"),cC=po("vw"),xg={...rn,parse:t=>rn.parse(t)/100,transform:t=>rn.transform(t*100)},Jr={test:hh("hsl","hue"),parse:N_("hue","saturation","lightness"),transform:({hue:t,saturation:e,lightness:n,alpha:r=1})=>"hsla("+Math.round(t)+", "+rn.transform(Cs(e))+", "+rn.transform(Cs(n))+", "+Cs(Qs.transform(r))+")"},Ce={test:t=>yr.test(t)||qc.test(t)||Jr.test(t),parse:t=>yr.test(t)?yr.parse(t):Jr.test(t)?Jr.parse(t):qc.parse(t),transform:t=>typeof t=="string"?t:t.hasOwnProperty("red")?yr.transform(t):Jr.transform(t),getAnimatableNone:t=>{const e=Ce.parse(t);return e.alpha=0,Ce.transform(e)}},dC=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function fC(t){var e,n;return isNaN(t)&&typeof t=="string"&&(((e=t.match(fh))==null?void 0:e.length)||0)+(((n=t.match(dC))==null?void 0:n.length)||0)>0}const O_="number",L_="color",hC="var",pC="var(",Sg="${}",gC=/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 Zs(t){const e=t.toString(),n=[],r={color:[],number:[],var:[]},i=[];let s=0;const a=e.replace(gC,l=>(Ce.test(l)?(r.color.push(s),i.push(L_),n.push(Ce.parse(l))):l.startsWith(pC)?(r.var.push(s),i.push(hC),n.push(l)):(r.number.push(s),i.push(O_),n.push(parseFloat(l))),++s,Sg)).split(Sg);return{values:n,split:a,indexes:r,types:i}}function D_(t){return Zs(t).values}function $_(t){const{split:e,types:n}=Zs(t),r=e.length;return i=>{let s="";for(let o=0;o<r;o++)if(s+=e[o],i[o]!==void 0){const a=n[o];a===O_?s+=Cs(i[o]):a===L_?s+=Ce.transform(i[o]):s+=i[o]}return s}}const mC=t=>typeof t=="number"?0:Ce.test(t)?Ce.getAnimatableNone(t):t;function vC(t){const e=D_(t);return $_(t)(e.map(mC))}const Jn={test:fC,parse:D_,createTransformer:$_,getAnimatableNone:vC};function Su(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 yC({hue:t,saturation:e,lightness:n,alpha:r}){t/=360,e/=100,n/=100;let i=0,s=0,o=0;if(!e)i=s=o=n;else{const a=n<.5?n*(1+e):n+e-n*e,l=2*n-a;i=Su(l,a,t+1/3),s=Su(l,a,t),o=Su(l,a,t-1/3)}return{red:Math.round(i*255),green:Math.round(s*255),blue:Math.round(o*255),alpha:r}}function Fa(t,e){return n=>n>0?e:t}const he=(t,e,n)=>t+(e-t)*n,Eu=(t,e,n)=>{const r=t*t,i=n*(e*e-r)+r;return i<0?0:Math.sqrt(i)},_C=[qc,yr,Jr],wC=t=>_C.find(e=>e.test(t));function Eg(t){const e=wC(t);if(!e)return!1;let n=e.parse(t);return e===Jr&&(n=yC(n)),n}const kg=(t,e)=>{const n=Eg(t),r=Eg(e);if(!n||!r)return Fa(t,e);const i={...n};return s=>(i.red=Eu(n.red,r.red,s),i.green=Eu(n.green,r.green,s),i.blue=Eu(n.blue,r.blue,s),i.alpha=he(n.alpha,r.alpha,s),yr.transform(i))},Yc=new Set(["none","hidden"]);function xC(t,e){return Yc.has(t)?n=>n<=0?t:e:n=>n>=1?e:t}function SC(t,e){return n=>he(t,e,n)}function ph(t){return typeof t=="number"?SC:typeof t=="string"?dh(t)?Fa:Ce.test(t)?kg:CC:Array.isArray(t)?F_:typeof t=="object"?Ce.test(t)?kg:EC:Fa}function F_(t,e){const n=[...t],r=n.length,i=t.map((s,o)=>ph(s)(s,e[o]));return s=>{for(let o=0;o<r;o++)n[o]=i[o](s);return n}}function EC(t,e){const n={...t,...e},r={};for(const i in n)t[i]!==void 0&&e[i]!==void 0&&(r[i]=ph(t[i])(t[i],e[i]));return i=>{for(const s in r)n[s]=r[s](i);return n}}function kC(t,e){const n=[],r={color:0,var:0,number:0};for(let i=0;i<e.values.length;i++){const s=e.types[i],o=t.indexes[s][r[s]],a=t.values[o]??0;n[i]=a,r[s]++}return n}const CC=(t,e)=>{const n=Jn.createTransformer(e),r=Zs(t),i=Zs(e);return r.indexes.var.length===i.indexes.var.length&&r.indexes.color.length===i.indexes.color.length&&r.indexes.number.length>=i.indexes.number.length?Yc.has(t)&&!i.values.length||Yc.has(e)&&!r.values.length?xC(t,e):fo(F_(kC(r,i),i.values),n):Fa(t,e)};function j_(t,e,n){return typeof t=="number"&&typeof e=="number"&&typeof n=="number"?he(t,e,n):ph(t)(t,e)}const bC=t=>{const e=({timestamp:n})=>t(n);return{start:(n=!0)=>de.update(e,n),stop:()=>Zn(e),now:()=>Le.isProcessing?Le.timestamp:at.now()}},V_=(t,e,n=10)=>{let r="";const i=Math.max(Math.round(e/n),2);for(let s=0;s<i;s++)r+=Math.round(t(s/(i-1))*1e4)/1e4+", ";return`linear(${r.substring(0,r.length-2)})`},ja=2e4;function gh(t){let e=0;const n=50;let r=t.next(e);for(;!r.done&&e<ja;)e+=n,r=t.next(e);return e>=ja?1/0:e}function PC(t,e=100,n){const r=n({...t,keyframes:[0,e]}),i=Math.min(gh(r),ja);return{type:"keyframes",ease:s=>r.next(i*s).value/e,duration:bt(i)}}const TC=5;function B_(t,e,n){const r=Math.max(e-TC,0);return w_(n-t(r),e-r)}const ye={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},ku=.001;function AC({duration:t=ye.duration,bounce:e=ye.bounce,velocity:n=ye.velocity,mass:r=ye.mass}){let i,s,o=1-e;o=Sn(ye.minDamping,ye.maxDamping,o),t=Sn(ye.minDuration,ye.maxDuration,bt(t)),o<1?(i=u=>{const c=u*o,d=c*t,f=c-n,h=Xc(u,o),y=Math.exp(-d);return ku-f/h*y},s=u=>{const d=u*o*t,f=d*n+n,h=Math.pow(o,2)*Math.pow(u,2)*t,y=Math.exp(-d),m=Xc(Math.pow(u,2),o);return(-i(u)+ku>0?-1:1)*((f-h)*y)/m}):(i=u=>{const c=Math.exp(-u*t),d=(u-n)*t+1;return-ku+c*d},s=u=>{const c=Math.exp(-u*t),d=(n-u)*(t*t);return c*d});const a=5/t,l=MC(i,s,a);if(t=nn(t),isNaN(l))return{stiffness:ye.stiffness,damping:ye.damping,duration:t};{const u=Math.pow(l,2)*r;return{stiffness:u,damping:o*2*Math.sqrt(r*u),duration:t}}}const RC=12;function MC(t,e,n){let r=n;for(let i=1;i<RC;i++)r=r-t(r)/e(r);return r}function Xc(t,e){return t*Math.sqrt(1-e*e)}const IC=["duration","bounce"],NC=["stiffness","damping","mass"];function Cg(t,e){return e.some(n=>t[n]!==void 0)}function OC(t){let e={velocity:ye.velocity,stiffness:ye.stiffness,damping:ye.damping,mass:ye.mass,isResolvedFromDuration:!1,...t};if(!Cg(t,NC)&&Cg(t,IC))if(t.visualDuration){const n=t.visualDuration,r=2*Math.PI/(n*1.2),i=r*r,s=2*Sn(.05,1,1-(t.bounce||0))*Math.sqrt(i);e={...e,mass:ye.mass,stiffness:i,damping:s}}else{const n=AC(t);e={...e,...n,mass:ye.mass},e.isResolvedFromDuration=!0}return e}function Va(t=ye.visualDuration,e=ye.bounce){const n=typeof t!="object"?{visualDuration:t,keyframes:[0,1],bounce:e}:t;let{restSpeed:r,restDelta:i}=n;const s=n.keyframes[0],o=n.keyframes[n.keyframes.length-1],a={done:!1,value:s},{stiffness:l,damping:u,mass:c,duration:d,velocity:f,isResolvedFromDuration:h}=OC({...n,velocity:-bt(n.velocity||0)}),y=f||0,m=u/(2*Math.sqrt(l*c)),_=o-s,p=bt(Math.sqrt(l/c)),g=Math.abs(_)<5;r||(r=g?ye.restSpeed.granular:ye.restSpeed.default),i||(i=g?ye.restDelta.granular:ye.restDelta.default);let v;if(m<1){const E=Xc(p,m);v=P=>{const C=Math.exp(-m*p*P);return o-C*((y+m*p*_)/E*Math.sin(E*P)+_*Math.cos(E*P))}}else if(m===1)v=E=>o-Math.exp(-p*E)*(_+(y+p*_)*E);else{const E=p*Math.sqrt(m*m-1);v=P=>{const C=Math.exp(-m*p*P),S=Math.min(E*P,300);return o-C*((y+m*p*_)*Math.sinh(S)+E*_*Math.cosh(S))/E}}const w={calculatedDuration:h&&d||null,next:E=>{const P=v(E);if(h)a.done=E>=d;else{let C=E===0?y:0;m<1&&(C=E===0?nn(y):B_(v,E,P));const S=Math.abs(C)<=r,A=Math.abs(o-P)<=i;a.done=S&&A}return a.value=a.done?o:P,a},toString:()=>{const E=Math.min(gh(w),ja),P=V_(C=>w.next(E*C).value,E,30);return E+"ms "+P},toTransition:()=>{}};return w}Va.applyToOptions=t=>{const e=PC(t,100,Va);return t.ease=e.ease,t.duration=nn(e.duration),t.type="keyframes",t};function Qc({keyframes:t,velocity:e=0,power:n=.8,timeConstant:r=325,bounceDamping:i=10,bounceStiffness:s=500,modifyTarget:o,min:a,max:l,restDelta:u=.5,restSpeed:c}){const d=t[0],f={done:!1,value:d},h=S=>a!==void 0&&S<a||l!==void 0&&S>l,y=S=>a===void 0?l:l===void 0||Math.abs(a-S)<Math.abs(l-S)?a:l;let m=n*e;const _=d+m,p=o===void 0?_:o(_);p!==_&&(m=p-d);const g=S=>-m*Math.exp(-S/r),v=S=>p+g(S),w=S=>{const A=g(S),M=v(S);f.done=Math.abs(A)<=u,f.value=f.done?p:M};let E,P;const C=S=>{h(f.value)&&(E=S,P=Va({keyframes:[f.value,y(f.value)],velocity:B_(v,S,f.value),damping:i,stiffness:s,restDelta:u,restSpeed:c}))};return C(0),{calculatedDuration:null,next:S=>{let A=!1;return!P&&E===void 0&&(A=!0,w(S),C(S)),E!==void 0&&S>=E?P.next(S-E):(!A&&w(S),f)}}}function LC(t,e,n){const r=[],i=n||En.mix||j_,s=t.length-1;for(let o=0;o<s;o++){let a=i(t[o],t[o+1]);if(e){const l=Array.isArray(e)?e[o]||Tt:e;a=fo(l,a)}r.push(a)}return r}function DC(t,e,{clamp:n=!0,ease:r,mixer:i}={}){const s=t.length;if(sh(s===e.length),s===1)return()=>e[0];if(s===2&&e[0]===e[1])return()=>e[1];const o=t[0]===t[1];t[0]>t[s-1]&&(t=[...t].reverse(),e=[...e].reverse());const a=LC(e,r,i),l=a.length,u=c=>{if(o&&c<t[0])return e[0];let d=0;if(l>1)for(;d<t.length-2&&!(c<t[d+1]);d++);const f=Xs(t[d],t[d+1],c);return a[d](f)};return n?c=>u(Sn(t[0],t[s-1],c)):u}function $C(t,e){const n=t[t.length-1];for(let r=1;r<=e;r++){const i=Xs(0,e,r);t.push(he(n,1,i))}}function FC(t){const e=[0];return $C(e,t.length-1),e}function jC(t,e){return t.map(n=>n*e)}function VC(t,e){return t.map(()=>e||A_).splice(0,t.length-1)}function bs({duration:t=300,keyframes:e,times:n,ease:r="easeInOut"}){const i=Qk(r)?r.map(wg):wg(r),s={done:!1,value:e[0]},o=jC(n&&n.length===e.length?n:FC(e),t),a=DC(o,e,{ease:Array.isArray(i)?i:VC(e,i)});return{calculatedDuration:t,next:l=>(s.value=a(l),s.done=l>=t,s)}}const BC=t=>t!==null;function mh(t,{repeat:e,repeatType:n="loop"},r,i=1){const s=t.filter(BC),a=i<0||e&&n!=="loop"&&e%2===1?0:s.length-1;return!a||r===void 0?s[a]:r}const zC={decay:Qc,inertia:Qc,tween:bs,keyframes:bs,spring:Va};function z_(t){typeof t.type=="string"&&(t.type=zC[t.type])}class vh{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 UC=t=>t/100;class yh extends vh{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,i;const{motionValue:n}=this.options;n&&n.updatedAt!==at.now()&&this.tick(at.now()),this.isStopped=!0,this.state!=="idle"&&(this.teardown(),(i=(r=this.options).onStop)==null||i.call(r))},this.options=e,this.initAnimation(),this.play(),e.autoplay===!1&&this.pause()}initAnimation(){const{options:e}=this;z_(e);const{type:n=bs,repeat:r=0,repeatDelay:i=0,repeatType:s,velocity:o=0}=e;let{keyframes:a}=e;const l=n||bs;l!==bs&&typeof a[0]!="number"&&(this.mixKeyframes=fo(UC,j_(a[0],a[1])),a=[0,100]);const u=l({...e,keyframes:a});s==="mirror"&&(this.mirroredGenerator=l({...e,keyframes:[...a].reverse(),velocity:-o})),u.calculatedDuration===null&&(u.calculatedDuration=gh(u));const{calculatedDuration:c}=u;this.calculatedDuration=c,this.resolvedDuration=c+i,this.totalDuration=this.resolvedDuration*(r+1)-i,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:i,mixKeyframes:s,mirroredGenerator:o,resolvedDuration:a,calculatedDuration:l}=this;if(this.startTime===null)return r.next(0);const{delay:u=0,keyframes:c,repeat:d,repeatType:f,repeatDelay:h,type:y,onUpdate:m,finalKeyframe:_}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,e):this.speed<0&&(this.startTime=Math.min(e-i/this.speed,this.startTime)),n?this.currentTime=e:this.updateTime(e);const p=this.currentTime-u*(this.playbackSpeed>=0?1:-1),g=this.playbackSpeed>=0?p<0:p>i;this.currentTime=Math.max(p,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=i);let v=this.currentTime,w=r;if(d){const S=Math.min(this.currentTime,i)/a;let A=Math.floor(S),M=S%1;!M&&S>=1&&(M=1),M===1&&A--,A=Math.min(A,d+1),!!(A%2)&&(f==="reverse"?(M=1-M,h&&(M-=h/a)):f==="mirror"&&(w=o)),v=Sn(0,1,M)*a}const E=g?{done:!1,value:c[0]}:w.next(v);s&&(E.value=s(E.value));let{done:P}=E;!g&&l!==null&&(P=this.playbackSpeed>=0?this.currentTime>=i:this.currentTime<=0);const C=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&P);return C&&y!==Qc&&(E.value=mh(c,this.options,_,this.speed)),m&&m(E.value),C&&this.finish(),E}then(e,n){return this.finished.then(e,n)}get duration(){return bt(this.calculatedDuration)}get iterationDuration(){const{delay:e=0}=this.options||{};return this.duration+bt(e)}get time(){return bt(this.currentTime)}set time(e){var n;e=nn(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(at.now());const n=this.playbackSpeed!==e;this.playbackSpeed=e,n&&(this.time=bt(this.currentTime))}play(){var i,s;if(this.isStopped)return;const{driver:e=bC,startTime:n}=this.options;this.driver||(this.driver=e(o=>this.tick(o))),(s=(i=this.options).onPlay)==null||s.call(i);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(at.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 HC(t){for(let e=1;e<t.length;e++)t[e]??(t[e]=t[e-1])}const _r=t=>t*180/Math.PI,Zc=t=>{const e=_r(Math.atan2(t[1],t[0]));return Jc(e)},WC={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:t=>(Math.abs(t[0])+Math.abs(t[3]))/2,rotate:Zc,rotateZ:Zc,skewX:t=>_r(Math.atan(t[1])),skewY:t=>_r(Math.atan(t[2])),skew:t=>(Math.abs(t[1])+Math.abs(t[2]))/2},Jc=t=>(t=t%360,t<0&&(t+=360),t),bg=Zc,Pg=t=>Math.sqrt(t[0]*t[0]+t[1]*t[1]),Tg=t=>Math.sqrt(t[4]*t[4]+t[5]*t[5]),KC={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:Pg,scaleY:Tg,scale:t=>(Pg(t)+Tg(t))/2,rotateX:t=>Jc(_r(Math.atan2(t[6],t[5]))),rotateY:t=>Jc(_r(Math.atan2(-t[2],t[0]))),rotateZ:bg,rotate:bg,skewX:t=>_r(Math.atan(t[4])),skewY:t=>_r(Math.atan(t[1])),skew:t=>(Math.abs(t[1])+Math.abs(t[4]))/2};function ed(t){return t.includes("scale")?1:0}function td(t,e){if(!t||t==="none")return ed(e);const n=t.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let r,i;if(n)r=KC,i=n;else{const a=t.match(/^matrix\(([-\d.e\s,]+)\)$/u);r=WC,i=a}if(!i)return ed(e);const s=r[e],o=i[1].split(",").map(qC);return typeof s=="function"?s(o):o[s]}const GC=(t,e)=>{const{transform:n="none"}=getComputedStyle(t);return td(n,e)};function qC(t){return parseFloat(t.trim())}const Di=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],$i=new Set(Di),Ag=t=>t===Li||t===K,YC=new Set(["x","y","z"]),XC=Di.filter(t=>!YC.has(t));function QC(t){const e=[];return XC.forEach(n=>{const r=t.getValue(n);r!==void 0&&(e.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))}),e}const Sr={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})=>td(e,"x"),y:(t,{transform:e})=>td(e,"y")};Sr.translateX=Sr.x;Sr.translateY=Sr.y;const Er=new Set;let nd=!1,rd=!1,id=!1;function U_(){if(rd){const t=Array.from(Er).filter(r=>r.needsMeasurement),e=new Set(t.map(r=>r.element)),n=new Map;e.forEach(r=>{const i=QC(r);i.length&&(n.set(r,i),r.render())}),t.forEach(r=>r.measureInitialState()),e.forEach(r=>{r.render();const i=n.get(r);i&&i.forEach(([s,o])=>{var a;(a=r.getValue(s))==null||a.set(o)})}),t.forEach(r=>r.measureEndState()),t.forEach(r=>{r.suspendedScrollY!==void 0&&window.scrollTo(0,r.suspendedScrollY)})}rd=!1,nd=!1,Er.forEach(t=>t.complete(id)),Er.clear()}function H_(){Er.forEach(t=>{t.readKeyframes(),t.needsMeasurement&&(rd=!0)})}function ZC(){id=!0,H_(),U_(),id=!1}class _h{constructor(e,n,r,i,s,o=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...e],this.onComplete=n,this.name=r,this.motionValue=i,this.element=s,this.isAsync=o}scheduleResolve(){this.state="scheduled",this.isAsync?(Er.add(this),nd||(nd=!0,de.read(H_),de.resolveKeyframes(U_))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:e,name:n,element:r,motionValue:i}=this;if(e[0]===null){const s=i==null?void 0:i.get(),o=e[e.length-1];if(s!==void 0)e[0]=s;else if(r&&n){const a=r.readValue(n,o);a!=null&&(e[0]=a)}e[0]===void 0&&(e[0]=o),i&&s===void 0&&i.set(e[0])}HC(e)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(e=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,e),Er.delete(this)}cancel(){this.state==="scheduled"&&(Er.delete(this),this.state="pending")}resume(){this.state==="pending"&&this.scheduleResolve()}}const JC=t=>t.startsWith("--");function eb(t,e,n){JC(e)?t.style.setProperty(e,n):t.style[e]=n}const tb=oh(()=>window.ScrollTimeline!==void 0),nb={};function rb(t,e){const n=oh(t);return()=>nb[e]??n()}const W_=rb(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),os=([t,e,n,r])=>`cubic-bezier(${t}, ${e}, ${n}, ${r})`,Rg={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:os([0,.65,.55,1]),circOut:os([.55,0,1,.45]),backIn:os([.31,.01,.66,-.59]),backOut:os([.33,1.53,.69,.99])};function K_(t,e){if(t)return typeof t=="function"?W_()?V_(t,e):"ease-out":R_(t)?os(t):Array.isArray(t)?t.map(n=>K_(n,e)||Rg.easeOut):Rg[t]}function ib(t,e,n,{delay:r=0,duration:i=300,repeat:s=0,repeatType:o="loop",ease:a="easeOut",times:l}={},u=void 0){const c={[e]:n};l&&(c.offset=l);const d=K_(a,i);Array.isArray(d)&&(c.easing=d);const f={delay:r,duration:i,easing:Array.isArray(d)?"linear":d,fill:"both",iterations:s+1,direction:o==="reverse"?"alternate":"normal"};return u&&(f.pseudoElement=u),t.animate(c,f)}function G_(t){return typeof t=="function"&&"applyToOptions"in t}function sb({type:t,...e}){return G_(t)&&W_()?t.applyToOptions(e):(e.duration??(e.duration=300),e.ease??(e.ease="easeOut"),e)}class ob extends vh{constructor(e){if(super(),this.finishedTime=null,this.isStopped=!1,!e)return;const{element:n,name:r,keyframes:i,pseudoElement:s,allowFlatten:o=!1,finalKeyframe:a,onComplete:l}=e;this.isPseudoElement=!!s,this.allowFlatten=o,this.options=e,sh(typeof e.type!="string");const u=sb(e);this.animation=ib(n,r,i,u,s),u.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!s){const c=mh(i,this.options,a,this.speed);this.updateMotionValue?this.updateMotionValue(c):eb(n,r,c),this.animation.cancel()}l==null||l(),this.notifyFinished()}}play(){this.isStopped||(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 bt(Number(e))}get iterationDuration(){const{delay:e=0}=this.options||{};return this.duration+bt(e)}get time(){return bt(Number(this.animation.currentTime)||0)}set time(e){this.finishedTime=null,this.animation.currentTime=nn(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 Number(this.animation.startTime)}set startTime(e){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&&tb()?(this.animation.timeline=e,Tt):n(this)}}const q_={anticipate:b_,backInOut:C_,circInOut:T_};function ab(t){return t in q_}function lb(t){typeof t.ease=="string"&&ab(t.ease)&&(t.ease=q_[t.ease])}const Mg=10;class ub extends ob{constructor(e){lb(e),z_(e),super(e),e.startTime&&(this.startTime=e.startTime),this.options=e}updateMotionValue(e){const{motionValue:n,onUpdate:r,onComplete:i,element:s,...o}=this.options;if(!n)return;if(e!==void 0){n.set(e);return}const a=new yh({...o,autoplay:!1}),l=nn(this.finishedTime??this.time);n.setWithVelocity(a.sample(l-Mg).value,a.sample(l).value,Mg),a.stop()}}const Ig=(t,e)=>e==="zIndex"?!1:!!(typeof t=="number"||Array.isArray(t)||typeof t=="string"&&(Jn.test(t)||t==="0")&&!t.startsWith("url("));function cb(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 db(t,e,n,r){const i=t[0];if(i===null)return!1;if(e==="display"||e==="visibility")return!0;const s=t[t.length-1],o=Ig(i,e),a=Ig(s,e);return!o||!a?!1:cb(t)||(n==="spring"||G_(n))&&r}function sd(t){t.duration=0,t.type="keyframes"}const fb=new Set(["opacity","clipPath","filter","transform"]),hb=oh(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));function pb(t){var c;const{motionValue:e,name:n,repeatDelay:r,repeatType:i,damping:s,type:o}=t;if(!(((c=e==null?void 0:e.owner)==null?void 0:c.current)instanceof HTMLElement))return!1;const{onUpdate:l,transformTemplate:u}=e.owner.getProps();return hb()&&n&&fb.has(n)&&(n!=="transform"||!u)&&!l&&!r&&i!=="mirror"&&s!==0&&o!=="inertia"}const gb=40;class mb extends vh{constructor({autoplay:e=!0,delay:n=0,type:r="keyframes",repeat:i=0,repeatDelay:s=0,repeatType:o="loop",keyframes:a,name:l,motionValue:u,element:c,...d}){var y;super(),this.stop=()=>{var m,_;this._animation&&(this._animation.stop(),(m=this.stopTimeline)==null||m.call(this)),(_=this.keyframeResolver)==null||_.cancel()},this.createdAt=at.now();const f={autoplay:e,delay:n,type:r,repeat:i,repeatDelay:s,repeatType:o,name:l,motionValue:u,element:c,...d},h=(c==null?void 0:c.KeyframeResolver)||_h;this.keyframeResolver=new h(a,(m,_,p)=>this.onKeyframesResolved(m,_,f,!p),l,u,c),(y=this.keyframeResolver)==null||y.scheduleResolve()}onKeyframesResolved(e,n,r,i){this.keyframeResolver=void 0;const{name:s,type:o,velocity:a,delay:l,isHandoff:u,onUpdate:c}=r;this.resolvedAt=at.now(),db(e,s,o,a)||((En.instantAnimations||!l)&&(c==null||c(mh(e,r,n))),e[0]=e[e.length-1],sd(r),r.repeat=0);const f={startTime:i?this.resolvedAt?this.resolvedAt-this.createdAt>gb?this.resolvedAt:this.createdAt:this.createdAt:void 0,finalKeyframe:n,...r,keyframes:e},h=!u&&pb(f)?new ub({...f,element:f.motionValue.owner.current}):new yh(f);h.finished.then(()=>this.notifyFinished()).catch(Tt),this.pendingTimeline&&(this.stopTimeline=h.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=h}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(),ZC()),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()}}const vb=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function yb(t){const e=vb.exec(t);if(!e)return[,];const[,n,r,i]=e;return[`--${n??r}`,i]}function Y_(t,e,n=1){const[r,i]=yb(t);if(!r)return;const s=window.getComputedStyle(e).getPropertyValue(r);if(s){const o=s.trim();return v_(o)?parseFloat(o):o}return dh(i)?Y_(i,e,n+1):i}function wh(t,e){return(t==null?void 0:t[e])??(t==null?void 0:t.default)??t}const X_=new Set(["width","height","top","left","right","bottom",...Di]),_b={test:t=>t==="auto",parse:t=>t},Q_=t=>e=>e.test(t),Z_=[Li,K,rn,Mn,cC,uC,_b],Ng=t=>Z_.find(Q_(t));function wb(t){return typeof t=="number"?t===0:t!==null?t==="none"||t==="0"||__(t):!0}const xb=new Set(["brightness","contrast","saturate","opacity"]);function Sb(t){const[e,n]=t.slice(0,-1).split("(");if(e==="drop-shadow")return t;const[r]=n.match(fh)||[];if(!r)return t;const i=n.replace(r,"");let s=xb.has(e)?1:0;return r!==n&&(s*=100),e+"("+s+i+")"}const Eb=/\b([a-z-]*)\(.*?\)/gu,od={...Jn,getAnimatableNone:t=>{const e=t.match(Eb);return e?e.map(Sb).join(" "):t}},Og={...Li,transform:Math.round},kb={rotate:Mn,rotateX:Mn,rotateY:Mn,rotateZ:Mn,scale:Lo,scaleX:Lo,scaleY:Lo,scaleZ:Lo,skew:Mn,skewX:Mn,skewY:Mn,distance:K,translateX:K,translateY:K,translateZ:K,x:K,y:K,z:K,perspective:K,transformPerspective:K,opacity:Qs,originX:xg,originY:xg,originZ:K},xh={borderWidth:K,borderTopWidth:K,borderRightWidth:K,borderBottomWidth:K,borderLeftWidth:K,borderRadius:K,radius:K,borderTopLeftRadius:K,borderTopRightRadius:K,borderBottomRightRadius:K,borderBottomLeftRadius:K,width:K,maxWidth:K,height:K,maxHeight:K,top:K,right:K,bottom:K,left:K,padding:K,paddingTop:K,paddingRight:K,paddingBottom:K,paddingLeft:K,margin:K,marginTop:K,marginRight:K,marginBottom:K,marginLeft:K,backgroundPositionX:K,backgroundPositionY:K,...kb,zIndex:Og,fillOpacity:Qs,strokeOpacity:Qs,numOctaves:Og},Cb={...xh,color:Ce,backgroundColor:Ce,outlineColor:Ce,fill:Ce,stroke:Ce,borderColor:Ce,borderTopColor:Ce,borderRightColor:Ce,borderBottomColor:Ce,borderLeftColor:Ce,filter:od,WebkitFilter:od},J_=t=>Cb[t];function ew(t,e){let n=J_(t);return n!==od&&(n=Jn),n.getAnimatableNone?n.getAnimatableNone(e):void 0}const bb=new Set(["auto","none","0"]);function Pb(t,e,n){let r=0,i;for(;r<t.length&&!i;){const s=t[r];typeof s=="string"&&!bb.has(s)&&Zs(s).values.length&&(i=t[r]),r++}if(i&&n)for(const s of e)t[s]=ew(n,i)}class Tb extends _h{constructor(e,n,r,i,s){super(e,n,r,i,s,!0)}readKeyframes(){const{unresolvedKeyframes:e,element:n,name:r}=this;if(!n||!n.current)return;super.readKeyframes();for(let l=0;l<e.length;l++){let u=e[l];if(typeof u=="string"&&(u=u.trim(),dh(u))){const c=Y_(u,n.current);c!==void 0&&(e[l]=c),l===e.length-1&&(this.finalKeyframe=u)}}if(this.resolveNoneKeyframes(),!X_.has(r)||e.length!==2)return;const[i,s]=e,o=Ng(i),a=Ng(s);if(o!==a)if(Ag(o)&&Ag(a))for(let l=0;l<e.length;l++){const u=e[l];typeof u=="string"&&(e[l]=parseFloat(u))}else Sr[r]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){const{unresolvedKeyframes:e,name:n}=this,r=[];for(let i=0;i<e.length;i++)(e[i]===null||wb(e[i]))&&r.push(i);r.length&&Pb(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=Sr[r](e.measureViewportBox(),window.getComputedStyle(e.current)),n[0]=this.measuredOrigin;const i=n[n.length-1];i!==void 0&&e.getValue(r,i).jump(i,!1)}measureEndState(){var a;const{element:e,name:n,unresolvedKeyframes:r}=this;if(!e||!e.current)return;const i=e.getValue(n);i&&i.jump(this.measuredOrigin,!1);const s=r.length-1,o=r[s];r[s]=Sr[n](e.measureViewportBox(),window.getComputedStyle(e.current)),o!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=o),(a=this.removedTransforms)!=null&&a.length&&this.removedTransforms.forEach(([l,u])=>{e.getValue(l).set(u)}),this.resolveNoneKeyframes()}}function Ab(t,e,n){if(t instanceof EventTarget)return[t];if(typeof t=="string"){let r=document;const i=(n==null?void 0:n[t])??r.querySelectorAll(t);return i?Array.from(i):[]}return Array.from(t)}const tw=(t,e)=>e&&typeof t=="number"?e.transform(t):t;function Rb(t){return y_(t)&&"offsetHeight"in t}const Lg=30,Mb=t=>!isNaN(parseFloat(t));class Ib{constructor(e,n={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=r=>{var s;const i=at.now();if(this.updatedAt!==i&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(r),this.current!==this.prev&&((s=this.events.change)==null||s.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=at.now(),this.canTrackVelocity===null&&e!==void 0&&(this.canTrackVelocity=Mb(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 ah);const r=this.events[e].add(n);return e==="change"?()=>{r(),de.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 this.current}getPrevious(){return this.prev}getVelocity(){const e=at.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||e-this.updatedAt>Lg)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,Lg);return w_(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 Ei(t,e){return new Ib(t,e)}const{schedule:Sh}=M_(queueMicrotask,!1),Lt={x:!1,y:!1};function nw(){return Lt.x||Lt.y}function Nb(t){return t==="x"||t==="y"?Lt[t]?null:(Lt[t]=!0,()=>{Lt[t]=!1}):Lt.x||Lt.y?null:(Lt.x=Lt.y=!0,()=>{Lt.x=Lt.y=!1})}function rw(t,e){const n=Ab(t),r=new AbortController,i={passive:!0,...e,signal:r.signal};return[n,i,()=>r.abort()]}function Dg(t){return!(t.pointerType==="touch"||nw())}function Ob(t,e,n={}){const[r,i,s]=rw(t,n),o=a=>{if(!Dg(a))return;const{target:l}=a,u=e(l,a);if(typeof u!="function"||!l)return;const c=d=>{Dg(d)&&(u(d),l.removeEventListener("pointerleave",c))};l.addEventListener("pointerleave",c,i)};return r.forEach(a=>{a.addEventListener("pointerenter",o,i)}),s}const iw=(t,e)=>e?t===e?!0:iw(t,e.parentElement):!1,Eh=t=>t.pointerType==="mouse"?typeof t.button!="number"||t.button<=0:t.isPrimary!==!1,Lb=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function Db(t){return Lb.has(t.tagName)||t.tabIndex!==-1}const la=new WeakSet;function $g(t){return e=>{e.key==="Enter"&&t(e)}}function Cu(t,e){t.dispatchEvent(new PointerEvent("pointer"+e,{isPrimary:!0,bubbles:!0}))}const $b=(t,e)=>{const n=t.currentTarget;if(!n)return;const r=$g(()=>{if(la.has(n))return;Cu(n,"down");const i=$g(()=>{Cu(n,"up")}),s=()=>Cu(n,"cancel");n.addEventListener("keyup",i,e),n.addEventListener("blur",s,e)});n.addEventListener("keydown",r,e),n.addEventListener("blur",()=>n.removeEventListener("keydown",r),e)};function Fg(t){return Eh(t)&&!nw()}function Fb(t,e,n={}){const[r,i,s]=rw(t,n),o=a=>{const l=a.currentTarget;if(!Fg(a))return;la.add(l);const u=e(l,a),c=(h,y)=>{window.removeEventListener("pointerup",d),window.removeEventListener("pointercancel",f),la.has(l)&&la.delete(l),Fg(h)&&typeof u=="function"&&u(h,{success:y})},d=h=>{c(h,l===window||l===document||n.useGlobalTarget||iw(l,h.target))},f=h=>{c(h,!1)};window.addEventListener("pointerup",d,i),window.addEventListener("pointercancel",f,i)};return r.forEach(a=>{(n.useGlobalTarget?window:a).addEventListener("pointerdown",o,i),Rb(a)&&(a.addEventListener("focus",u=>$b(u,i)),!Db(a)&&!a.hasAttribute("tabindex")&&(a.tabIndex=0))}),s}function sw(t){return y_(t)&&"ownerSVGElement"in t}function jb(t){return sw(t)&&t.tagName==="svg"}const We=t=>!!(t&&t.getVelocity),Vb=[...Z_,Ce,Jn],Bb=t=>Vb.find(Q_(t)),ow=x.createContext({transformPagePoint:t=>t,isStatic:!1,reducedMotion:"never"});function zb(t=!0){const e=x.useContext(nh);if(e===null)return[!0,null];const{isPresent:n,onExitComplete:r,register:i}=e,s=x.useId();x.useEffect(()=>{if(t)return i(s)},[t]);const o=x.useCallback(()=>t&&r&&r(s),[s,r,t]);return!n&&r?[!1,o]:[!0]}const aw=x.createContext({strict:!1}),jg={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"]},ki={};for(const t in jg)ki[t]={isEnabled:e=>jg[t].some(n=>!!e[n])};function Ub(t){for(const e in t)ki[e]={...ki[e],...t[e]}}const Hb=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 Ba(t){return t.startsWith("while")||t.startsWith("drag")&&t!=="draggable"||t.startsWith("layout")||t.startsWith("onTap")||t.startsWith("onPan")||t.startsWith("onLayout")||Hb.has(t)}let lw=t=>!Ba(t);function Wb(t){typeof t=="function"&&(lw=e=>e.startsWith("on")?!Ba(e):t(e))}try{Wb(require("@emotion/is-prop-valid").default)}catch{}function Kb(t,e,n){const r={};for(const i in t)i==="values"&&typeof t.values=="object"||(lw(i)||n===!0&&Ba(i)||!e&&!Ba(i)||t.draggable&&i.startsWith("onDrag"))&&(r[i]=t[i]);return r}const Pl=x.createContext({});function Tl(t){return t!==null&&typeof t=="object"&&typeof t.start=="function"}function Js(t){return typeof t=="string"||Array.isArray(t)}const kh=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],Ch=["initial",...kh];function Al(t){return Tl(t.animate)||Ch.some(e=>Js(t[e]))}function uw(t){return!!(Al(t)||t.variants)}function Gb(t,e){if(Al(t)){const{initial:n,animate:r}=t;return{initial:n===!1||Js(n)?n:void 0,animate:Js(r)?r:void 0}}return t.inherit!==!1?e:{}}function qb(t){const{initial:e,animate:n}=Gb(t,x.useContext(Pl));return x.useMemo(()=>({initial:e,animate:n}),[Vg(e),Vg(n)])}function Vg(t){return Array.isArray(t)?t.join(" "):t}const eo={};function Yb(t){for(const e in t)eo[e]=t[e],ch(e)&&(eo[e].isCSSVariable=!0)}function cw(t,{layout:e,layoutId:n}){return $i.has(t)||t.startsWith("origin")||(e||n!==void 0)&&(!!eo[t]||t==="opacity")}const Xb={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},Qb=Di.length;function Zb(t,e,n){let r="",i=!0;for(let s=0;s<Qb;s++){const o=Di[s],a=t[o];if(a===void 0)continue;let l=!0;if(typeof a=="number"?l=a===(o.startsWith("scale")?1:0):l=parseFloat(a)===0,!l||n){const u=tw(a,xh[o]);if(!l){i=!1;const c=Xb[o]||o;r+=`${c}(${u}) `}n&&(e[o]=u)}}return r=r.trim(),n?r=n(e,i?"":r):i&&(r="none"),r}function bh(t,e,n){const{style:r,vars:i,transformOrigin:s}=t;let o=!1,a=!1;for(const l in e){const u=e[l];if($i.has(l)){o=!0;continue}else if(ch(l)){i[l]=u;continue}else{const c=tw(u,xh[l]);l.startsWith("origin")?(a=!0,s[l]=c):r[l]=c}}if(e.transform||(o||n?r.transform=Zb(e,t.transform,n):r.transform&&(r.transform="none")),a){const{originX:l="50%",originY:u="50%",originZ:c=0}=s;r.transformOrigin=`${l} ${u} ${c}`}}const Ph=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function dw(t,e,n){for(const r in e)!We(e[r])&&!cw(r,n)&&(t[r]=e[r])}function Jb({transformTemplate:t},e){return x.useMemo(()=>{const n=Ph();return bh(n,e,t),Object.assign({},n.vars,n.style)},[e])}function eP(t,e){const n=t.style||{},r={};return dw(r,n,t),Object.assign(r,Jb(t,e)),r}function tP(t,e){const n={},r=eP(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 nP={offset:"stroke-dashoffset",array:"stroke-dasharray"},rP={offset:"strokeDashoffset",array:"strokeDasharray"};function iP(t,e,n=1,r=0,i=!0){t.pathLength=1;const s=i?nP:rP;t[s.offset]=K.transform(-r);const o=K.transform(e),a=K.transform(n);t[s.array]=`${o} ${a}`}function fw(t,{attrX:e,attrY:n,attrScale:r,pathLength:i,pathSpacing:s=1,pathOffset:o=0,...a},l,u,c){if(bh(t,a,u),l){t.style.viewBox&&(t.attrs.viewBox=t.style.viewBox);return}t.attrs=t.style,t.style={};const{attrs:d,style:f}=t;d.transform&&(f.transform=d.transform,delete d.transform),(f.transform||d.transformOrigin)&&(f.transformOrigin=d.transformOrigin??"50% 50%",delete d.transformOrigin),f.transform&&(f.transformBox=(c==null?void 0:c.transformBox)??"fill-box",delete d.transformBox),e!==void 0&&(d.x=e),n!==void 0&&(d.y=n),r!==void 0&&(d.scale=r),i!==void 0&&iP(d,i,s,o,!1)}const hw=()=>({...Ph(),attrs:{}}),pw=t=>typeof t=="string"&&t.toLowerCase()==="svg";function sP(t,e,n,r){const i=x.useMemo(()=>{const s=hw();return fw(s,e,pw(r),t.transformTemplate,t.style),{...s.attrs,style:{...s.style}}},[e]);if(t.style){const s={};dw(s,t.style,t),i.style={...s,...i.style}}return i}const oP=["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 Th(t){return typeof t!="string"||t.includes("-")?!1:!!(oP.indexOf(t)>-1||/[A-Z]/u.test(t))}function aP(t,e,n,{latestValues:r},i,s=!1){const a=(Th(t)?sP:tP)(e,r,i,t),l=Kb(e,typeof t=="string",s),u=t!==x.Fragment?{...l,...a,ref:n}:{},{children:c}=e,d=x.useMemo(()=>We(c)?c.get():c,[c]);return x.createElement(t,{...u,children:d})}function Bg(t){const e=[{},{}];return t==null||t.values.forEach((n,r)=>{e[0][r]=n.get(),e[1][r]=n.getVelocity()}),e}function Ah(t,e,n,r){if(typeof e=="function"){const[i,s]=Bg(r);e=e(n!==void 0?n:t.custom,i,s)}if(typeof e=="string"&&(e=t.variants&&t.variants[e]),typeof e=="function"){const[i,s]=Bg(r);e=e(n!==void 0?n:t.custom,i,s)}return e}function ua(t){return We(t)?t.get():t}function lP({scrapeMotionValuesFromProps:t,createRenderState:e},n,r,i){return{latestValues:uP(n,r,i,t),renderState:e()}}function uP(t,e,n,r){const i={},s=r(t,{});for(const f in s)i[f]=ua(s[f]);let{initial:o,animate:a}=t;const l=Al(t),u=uw(t);e&&u&&!l&&t.inherit!==!1&&(o===void 0&&(o=e.initial),a===void 0&&(a=e.animate));let c=n?n.initial===!1:!1;c=c||o===!1;const d=c?a:o;if(d&&typeof d!="boolean"&&!Tl(d)){const f=Array.isArray(d)?d:[d];for(let h=0;h<f.length;h++){const y=Ah(t,f[h]);if(y){const{transitionEnd:m,transition:_,...p}=y;for(const g in p){let v=p[g];if(Array.isArray(v)){const w=c?v.length-1:0;v=v[w]}v!==null&&(i[g]=v)}for(const g in m)i[g]=m[g]}}}return i}const gw=t=>(e,n)=>{const r=x.useContext(Pl),i=x.useContext(nh),s=()=>lP(t,e,r,i);return n?s():Uk(s)};function Rh(t,e,n){var s;const{style:r}=t,i={};for(const o in r)(We(r[o])||e.style&&We(e.style[o])||cw(o,t)||((s=n==null?void 0:n.getValue(o))==null?void 0:s.liveStyle)!==void 0)&&(i[o]=r[o]);return i}const cP=gw({scrapeMotionValuesFromProps:Rh,createRenderState:Ph});function mw(t,e,n){const r=Rh(t,e,n);for(const i in t)if(We(t[i])||We(e[i])){const s=Di.indexOf(i)!==-1?"attr"+i.charAt(0).toUpperCase()+i.substring(1):i;r[s]=t[i]}return r}const dP=gw({scrapeMotionValuesFromProps:mw,createRenderState:hw}),fP=Symbol.for("motionComponentSymbol");function ei(t){return t&&typeof t=="object"&&Object.prototype.hasOwnProperty.call(t,"current")}function hP(t,e,n){return x.useCallback(r=>{r&&t.onMount&&t.onMount(r),e&&(r?e.mount(r):e.unmount()),n&&(typeof n=="function"?n(r):ei(n)&&(n.current=r))},[e])}const Mh=t=>t.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),pP="framerAppearId",vw="data-"+Mh(pP),yw=x.createContext({});function gP(t,e,n,r,i){var m,_;const{visualElement:s}=x.useContext(Pl),o=x.useContext(aw),a=x.useContext(nh),l=x.useContext(ow).reducedMotion,u=x.useRef(null);r=r||o.renderer,!u.current&&r&&(u.current=r(t,{visualState:e,parent:s,props:n,presenceContext:a,blockInitialAnimation:a?a.initial===!1:!1,reducedMotionConfig:l}));const c=u.current,d=x.useContext(yw);c&&!c.projection&&i&&(c.type==="html"||c.type==="svg")&&mP(u.current,n,i,d);const f=x.useRef(!1);x.useInsertionEffect(()=>{c&&f.current&&c.update(n,a)});const h=n[vw],y=x.useRef(!!h&&!((m=window.MotionHandoffIsComplete)!=null&&m.call(window,h))&&((_=window.MotionHasOptimisedAnimation)==null?void 0:_.call(window,h)));return Hk(()=>{c&&(f.current=!0,window.MotionIsMounted=!0,c.updateFeatures(),c.scheduleRenderMicrotask(),y.current&&c.animationState&&c.animationState.animateChanges())}),x.useEffect(()=>{c&&(!y.current&&c.animationState&&c.animationState.animateChanges(),y.current&&(queueMicrotask(()=>{var p;(p=window.MotionHandoffMarkAsComplete)==null||p.call(window,h)}),y.current=!1),c.enteringChildren=void 0)}),c}function mP(t,e,n,r){const{layoutId:i,layout:s,drag:o,dragConstraints:a,layoutScroll:l,layoutRoot:u,layoutCrossfade:c}=e;t.projection=new n(t.latestValues,e["data-framer-portal-id"]?void 0:_w(t.parent)),t.projection.setOptions({layoutId:i,layout:s,alwaysMeasureLayout:!!o||a&&ei(a),visualElement:t,animationType:typeof s=="string"?s:"both",initialPromotionConfig:r,crossfade:c,layoutScroll:l,layoutRoot:u})}function _w(t){if(t)return t.options.allowProjection!==!1?t.projection:_w(t.parent)}function bu(t,{forwardMotionProps:e=!1}={},n,r){n&&Ub(n);const i=Th(t)?dP:cP;function s(a,l){let u;const c={...x.useContext(ow),...a,layoutId:vP(a)},{isStatic:d}=c,f=qb(a),h=i(a,d);if(!d&&th){yP();const y=_P(c);u=y.MeasureLayout,f.visualElement=gP(t,h,c,r,y.ProjectionNode)}return k.jsxs(Pl.Provider,{value:f,children:[u&&f.visualElement?k.jsx(u,{visualElement:f.visualElement,...c}):null,aP(t,a,hP(h,f.visualElement,l),h,d,e)]})}s.displayName=`motion.${typeof t=="string"?t:`create(${t.displayName??t.name??""})`}`;const o=x.forwardRef(s);return o[fP]=t,o}function vP({layoutId:t}){const e=x.useContext(m_).id;return e&&t!==void 0?e+"-"+t:t}function yP(t,e){x.useContext(aw).strict}function _P(t){const{drag:e,layout:n}=ki;if(!e&&!n)return{};const r={...e,...n};return{MeasureLayout:e!=null&&e.isEnabled(t)||n!=null&&n.isEnabled(t)?r.MeasureLayout:void 0,ProjectionNode:r.ProjectionNode}}function wP(t,e){if(typeof Proxy>"u")return bu;const n=new Map,r=(s,o)=>bu(s,o,t,e),i=(s,o)=>r(s,o);return new Proxy(i,{get:(s,o)=>o==="create"?r:(n.has(o)||n.set(o,bu(o,void 0,t,e)),n.get(o))})}function ww({top:t,left:e,right:n,bottom:r}){return{x:{min:e,max:n},y:{min:t,max:r}}}function xP({x:t,y:e}){return{top:e.min,right:t.max,bottom:e.max,left:t.min}}function SP(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 Pu(t){return t===void 0||t===1}function ad({scale:t,scaleX:e,scaleY:n}){return!Pu(t)||!Pu(e)||!Pu(n)}function fr(t){return ad(t)||xw(t)||t.z||t.rotate||t.rotateX||t.rotateY||t.skewX||t.skewY}function xw(t){return zg(t.x)||zg(t.y)}function zg(t){return t&&t!=="0%"}function za(t,e,n){const r=t-n,i=e*r;return n+i}function Ug(t,e,n,r,i){return i!==void 0&&(t=za(t,i,r)),za(t,n,r)+e}function ld(t,e=0,n=1,r,i){t.min=Ug(t.min,e,n,r,i),t.max=Ug(t.max,e,n,r,i)}function Sw(t,{x:e,y:n}){ld(t.x,e.translate,e.scale,e.originPoint),ld(t.y,n.translate,n.scale,n.originPoint)}const Hg=.999999999999,Wg=1.0000000000001;function EP(t,e,n,r=!1){const i=n.length;if(!i)return;e.x=e.y=1;let s,o;for(let a=0;a<i;a++){s=n[a],o=s.projectionDelta;const{visualElement:l}=s.options;l&&l.props.style&&l.props.style.display==="contents"||(r&&s.options.layoutScroll&&s.scroll&&s!==s.root&&ni(t,{x:-s.scroll.offset.x,y:-s.scroll.offset.y}),o&&(e.x*=o.x.scale,e.y*=o.y.scale,Sw(t,o)),r&&fr(s.latestValues)&&ni(t,s.latestValues))}e.x<Wg&&e.x>Hg&&(e.x=1),e.y<Wg&&e.y>Hg&&(e.y=1)}function ti(t,e){t.min=t.min+e,t.max=t.max+e}function Kg(t,e,n,r,i=.5){const s=he(t.min,t.max,i);ld(t,e,n,s,r)}function ni(t,e){Kg(t.x,e.x,e.scaleX,e.scale,e.originX),Kg(t.y,e.y,e.scaleY,e.scale,e.originY)}function Ew(t,e){return ww(SP(t.getBoundingClientRect(),e))}function kP(t,e,n){const r=Ew(t,n),{scroll:i}=e;return i&&(ti(r.x,i.offset.x),ti(r.y,i.offset.y)),r}const Gg=()=>({translate:0,scale:1,origin:0,originPoint:0}),ri=()=>({x:Gg(),y:Gg()}),qg=()=>({min:0,max:0}),Se=()=>({x:qg(),y:qg()}),ud={current:null},kw={current:!1};function CP(){if(kw.current=!0,!!th)if(window.matchMedia){const t=window.matchMedia("(prefers-reduced-motion)"),e=()=>ud.current=t.matches;t.addEventListener("change",e),e()}else ud.current=!1}const bP=new WeakMap;function PP(t,e,n){for(const r in e){const i=e[r],s=n[r];if(We(i))t.addValue(r,i);else if(We(s))t.addValue(r,Ei(i,{owner:t}));else if(s!==i)if(t.hasValue(r)){const o=t.getValue(r);o.liveStyle===!0?o.jump(i):o.hasAnimated||o.set(i)}else{const o=t.getStaticValue(r);t.addValue(r,Ei(o!==void 0?o:i,{owner:t}))}}for(const r in n)e[r]===void 0&&t.removeValue(r);return e}const Yg=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class TP{scrapeMotionValuesFromProps(e,n,r){return{}}constructor({parent:e,props:n,presenceContext:r,reducedMotionConfig:i,blockInitialAnimation:s,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=_h,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=at.now();this.renderScheduledAt<f&&(this.renderScheduledAt=f,de.render(this.render,!1,!0))};const{latestValues:l,renderState:u}=o;this.latestValues=l,this.baseTarget={...l},this.initialValues=n.initial?{...l}:{},this.renderState=u,this.parent=e,this.props=n,this.presenceContext=r,this.depth=e?e.depth+1:0,this.reducedMotionConfig=i,this.options=a,this.blockInitialAnimation=!!s,this.isControllingVariants=Al(n),this.isVariantNode=uw(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(e&&e.current);const{willChange:c,...d}=this.scrapeMotionValuesFromProps(n,{},this);for(const f in d){const h=d[f];l[f]!==void 0&&We(h)&&h.set(l[f])}}mount(e){var n;this.current=e,bP.set(e,this),this.projection&&!this.projection.instance&&this.projection.mount(e),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((r,i)=>this.bindToMotionValue(i,r)),kw.current||CP(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:ud.current,(n=this.parent)==null||n.addChild(this),this.update(this.props,this.presenceContext)}unmount(){var e;this.projection&&this.projection.unmount(),Zn(this.notifyUpdate),Zn(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=$i.has(e);r&&this.onBindTransform&&this.onBindTransform();const i=n.on("change",o=>{this.latestValues[e]=o,this.props.onUpdate&&de.preRender(this.notifyUpdate),r&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()});let s;window.MotionCheckAppearSync&&(s=window.MotionCheckAppearSync(this,e,n)),this.valueSubscriptions.set(e,()=>{i(),s&&s(),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 ki){const n=ki[e];if(!n)continue;const{isEnabled:r,Feature:i}=n;if(!this.features[e]&&i&&r(this.props)&&(this.features[e]=new i(this)),this.features[e]){const s=this.features[e];s.isMounted?s.update():(s.mount(),s.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):Se()}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<Yg.length;r++){const i=Yg[r];this.propEventSubscriptions[i]&&(this.propEventSubscriptions[i](),delete this.propEventSubscriptions[i]);const s="on"+i,o=e[s];o&&(this.propEventSubscriptions[i]=this.on(i,o))}this.prevMotionValues=PP(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=Ei(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"&&(v_(r)||__(r))?r=parseFloat(r):!Bb(r)&&Jn.test(n)&&(r=ew(e,n)),this.setBaseTarget(e,We(r)?r.get():r)),We(r)?r.get():r}setBaseTarget(e,n){this.baseTarget[e]=n}getBaseTarget(e){var s;const{initial:n}=this.props;let r;if(typeof n=="string"||typeof n=="object"){const o=Ah(this.props,n,(s=this.presenceContext)==null?void 0:s.custom);o&&(r=o[e])}if(n&&r!==void 0)return r;const i=this.getBaseTargetFromProps(this.props,e);return i!==void 0&&!We(i)?i:this.initialValues[e]!==void 0&&r===void 0?void 0:this.baseTarget[e]}on(e,n){return this.events[e]||(this.events[e]=new ah),this.events[e].add(n)}notify(e,...n){this.events[e]&&this.events[e].notify(...n)}scheduleRenderMicrotask(){Sh.render(this.render)}}class Cw extends TP{constructor(){super(...arguments),this.KeyframeResolver=Tb}sortInstanceNodePosition(e,n){return e.compareDocumentPosition(n)&2?1:-1}getBaseTargetFromProps(e,n){return e.style?e.style[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;We(e)&&(this.childSubscription=e.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}}function bw(t,{style:e,vars:n},r,i){const s=t.style;let o;for(o in e)s[o]=e[o];i==null||i.applyProjectionStyles(s,r);for(o in n)s.setProperty(o,n[o])}function AP(t){return window.getComputedStyle(t)}class RP extends Cw{constructor(){super(...arguments),this.type="html",this.renderInstance=bw}readValueFromInstance(e,n){var r;if($i.has(n))return(r=this.projection)!=null&&r.isProjecting?ed(n):GC(e,n);{const i=AP(e),s=(ch(n)?i.getPropertyValue(n):i[n])||0;return typeof s=="string"?s.trim():s}}measureInstanceViewportBox(e,{transformPagePoint:n}){return Ew(e,n)}build(e,n,r){bh(e,n,r.transformTemplate)}scrapeMotionValuesFromProps(e,n,r){return Rh(e,n,r)}}const Pw=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"]);function MP(t,e,n,r){bw(t,e,void 0,r);for(const i in e.attrs)t.setAttribute(Pw.has(i)?i:Mh(i),e.attrs[i])}class IP extends Cw{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=Se}getBaseTargetFromProps(e,n){return e[n]}readValueFromInstance(e,n){if($i.has(n)){const r=J_(n);return r&&r.default||0}return n=Pw.has(n)?n:Mh(n),e.getAttribute(n)}scrapeMotionValuesFromProps(e,n,r){return mw(e,n,r)}build(e,n,r){fw(e,n,this.isSVGTag,r.transformTemplate,r.style)}renderInstance(e,n,r,i){MP(e,n,r,i)}mount(e){this.isSVGTag=pw(e.tagName),super.mount(e)}}const NP=(t,e)=>Th(t)?new IP(e):new RP(e,{allowProjection:t!==x.Fragment});function hi(t,e,n){const r=t.getProps();return Ah(r,e,n!==void 0?n:r.custom,t)}const cd=t=>Array.isArray(t);function OP(t,e,n){t.hasValue(e)?t.getValue(e).set(n):t.addValue(e,Ei(n))}function LP(t){return cd(t)?t[t.length-1]||0:t}function DP(t,e){const n=hi(t,e);let{transitionEnd:r={},transition:i={},...s}=n||{};s={...s,...r};for(const o in s){const a=LP(s[o]);OP(t,o,a)}}function $P(t){return!!(We(t)&&t.add)}function dd(t,e){const n=t.getValue("willChange");if($P(n))return n.add(e);if(!n&&En.WillChange){const r=new En.WillChange("auto");t.addValue("willChange",r),r.add(e)}}function Tw(t){return t.props[vw]}const FP=t=>t!==null;function jP(t,{repeat:e,repeatType:n="loop"},r){const i=t.filter(FP),s=e&&n!=="loop"&&e%2===1?0:i.length-1;return i[s]}const VP={type:"spring",stiffness:500,damping:25,restSpeed:10},BP=t=>({type:"spring",stiffness:550,damping:t===0?2*Math.sqrt(550):30,restSpeed:10}),zP={type:"keyframes",duration:.8},UP={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},HP=(t,{keyframes:e})=>e.length>2?zP:$i.has(t)?t.startsWith("scale")?BP(e[1]):VP:UP;function WP({when:t,delay:e,delayChildren:n,staggerChildren:r,staggerDirection:i,repeat:s,repeatType:o,repeatDelay:a,from:l,elapsed:u,...c}){return!!Object.keys(c).length}const Ih=(t,e,n,r={},i,s)=>o=>{const a=wh(r,t)||{},l=a.delay||r.delay||0;let{elapsed:u=0}=r;u=u-nn(l);const c={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:s?void 0:i};WP(a)||Object.assign(c,HP(t,c)),c.duration&&(c.duration=nn(c.duration)),c.repeatDelay&&(c.repeatDelay=nn(c.repeatDelay)),c.from!==void 0&&(c.keyframes[0]=c.from);let d=!1;if((c.type===!1||c.duration===0&&!c.repeatDelay)&&(sd(c),c.delay===0&&(d=!0)),(En.instantAnimations||En.skipAnimations)&&(d=!0,sd(c),c.delay=0),c.allowFlatten=!a.type&&!a.ease,d&&!s&&e.get()!==void 0){const f=jP(c.keyframes,a);if(f!==void 0){de.update(()=>{c.onUpdate(f),c.onComplete()});return}}return a.isSync?new yh(c):new mb(c)};function KP({protectedKeys:t,needsAnimating:e},n){const r=t.hasOwnProperty(n)&&e[n]!==!0;return e[n]=!1,r}function Aw(t,e,{delay:n=0,transitionOverride:r,type:i}={}){let{transition:s=t.getDefaultTransition(),transitionEnd:o,...a}=e;r&&(s=r);const l=[],u=i&&t.animationState&&t.animationState.getState()[i];for(const c in a){const d=t.getValue(c,t.latestValues[c]??null),f=a[c];if(f===void 0||u&&KP(u,c))continue;const h={delay:n,...wh(s||{},c)},y=d.get();if(y!==void 0&&!d.isAnimating&&!Array.isArray(f)&&f===y&&!h.velocity)continue;let m=!1;if(window.MotionHandoffAnimation){const p=Tw(t);if(p){const g=window.MotionHandoffAnimation(p,c,de);g!==null&&(h.startTime=g,m=!0)}}dd(t,c),d.start(Ih(c,d,f,t.shouldReduceMotion&&X_.has(c)?{type:!1}:h,t,m));const _=d.animation;_&&l.push(_)}return o&&Promise.all(l).then(()=>{de.update(()=>{o&&DP(t,o)})}),l}function Rw(t,e,n,r=0,i=1){const s=Array.from(t).sort((u,c)=>u.sortNodePosition(c)).indexOf(e),o=t.size,a=(o-1)*r;return typeof n=="function"?n(s,o):i===1?s*r:a-s*r}function fd(t,e,n={}){var l;const r=hi(t,e,n.type==="exit"?(l=t.presenceContext)==null?void 0:l.custom:void 0);let{transition:i=t.getDefaultTransition()||{}}=r||{};n.transitionOverride&&(i=n.transitionOverride);const s=r?()=>Promise.all(Aw(t,r,n)):()=>Promise.resolve(),o=t.variantChildren&&t.variantChildren.size?(u=0)=>{const{delayChildren:c=0,staggerChildren:d,staggerDirection:f}=i;return GP(t,e,u,c,d,f,n)}:()=>Promise.resolve(),{when:a}=i;if(a){const[u,c]=a==="beforeChildren"?[s,o]:[o,s];return u().then(()=>c())}else return Promise.all([s(),o(n.delay)])}function GP(t,e,n=0,r=0,i=0,s=1,o){const a=[];for(const l of t.variantChildren)l.notify("AnimationStart",e),a.push(fd(l,e,{...o,delay:n+(typeof r=="function"?0:r)+Rw(t.variantChildren,l,r,i,s)}).then(()=>l.notify("AnimationComplete",e)));return Promise.all(a)}function qP(t,e,n={}){t.notify("AnimationStart",e);let r;if(Array.isArray(e)){const i=e.map(s=>fd(t,s,n));r=Promise.all(i)}else if(typeof e=="string")r=fd(t,e,n);else{const i=typeof e=="function"?hi(t,e,n.custom):e;r=Promise.all(Aw(t,i,n))}return r.then(()=>{t.notify("AnimationComplete",e)})}function Mw(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 YP=Ch.length;function Iw(t){if(!t)return;if(!t.isControllingVariants){const n=t.parent?Iw(t.parent)||{}:{};return t.props.initial!==void 0&&(n.initial=t.props.initial),n}const e={};for(let n=0;n<YP;n++){const r=Ch[n],i=t.props[r];(Js(i)||i===!1)&&(e[r]=i)}return e}const XP=[...kh].reverse(),QP=kh.length;function ZP(t){return e=>Promise.all(e.map(({animation:n,options:r})=>qP(t,n,r)))}function JP(t){let e=ZP(t),n=Xg(),r=!0;const i=l=>(u,c)=>{var f;const d=hi(t,c,l==="exit"?(f=t.presenceContext)==null?void 0:f.custom:void 0);if(d){const{transition:h,transitionEnd:y,...m}=d;u={...u,...m,...y}}return u};function s(l){e=l(t)}function o(l){const{props:u}=t,c=Iw(t.parent)||{},d=[],f=new Set;let h={},y=1/0;for(let _=0;_<QP;_++){const p=XP[_],g=n[p],v=u[p]!==void 0?u[p]:c[p],w=Js(v),E=p===l?g.isActive:null;E===!1&&(y=_);let P=v===c[p]&&v!==u[p]&&w;if(P&&r&&t.manuallyAnimateOnMount&&(P=!1),g.protectedKeys={...h},!g.isActive&&E===null||!v&&!g.prevProp||Tl(v)||typeof v=="boolean")continue;const C=eT(g.prevProp,v);let S=C||p===l&&g.isActive&&!P&&w||_>y&&w,A=!1;const M=Array.isArray(v)?v:[v];let O=M.reduce(i(p),{});E===!1&&(O={});const{prevResolvedValues:T={}}=g,D={...T,...O},I=G=>{S=!0,f.has(G)&&(A=!0,f.delete(G)),g.needsAnimating[G]=!0;const R=t.getValue(G);R&&(R.liveStyle=!1)};for(const G in D){const R=O[G],$=T[G];if(h.hasOwnProperty(G))continue;let j=!1;cd(R)&&cd($)?j=!Mw(R,$):j=R!==$,j?R!=null?I(G):f.add(G):R!==void 0&&f.has(G)?I(G):g.protectedKeys[G]=!0}g.prevProp=v,g.prevResolvedValues=O,g.isActive&&(h={...h,...O}),r&&t.blockInitialAnimation&&(S=!1);const U=P&&C;S&&(!U||A)&&d.push(...M.map(G=>{const R={type:p};if(typeof G=="string"&&r&&!U&&t.manuallyAnimateOnMount&&t.parent){const{parent:$}=t,j=hi($,G);if($.enteringChildren&&j){const{delayChildren:q}=j.transition||{};R.delay=Rw($.enteringChildren,t,q)}}return{animation:G,options:R}}))}if(f.size){const _={};if(typeof u.initial!="boolean"){const p=hi(t,Array.isArray(u.initial)?u.initial[0]:u.initial);p&&p.transition&&(_.transition=p.transition)}f.forEach(p=>{const g=t.getBaseTarget(p),v=t.getValue(p);v&&(v.liveStyle=!0),_[p]=g??null}),d.push({animation:_})}let m=!!d.length;return r&&(u.initial===!1||u.initial===u.animate)&&!t.manuallyAnimateOnMount&&(m=!1),r=!1,m?e(d):Promise.resolve()}function a(l,u){var d;if(n[l].isActive===u)return Promise.resolve();(d=t.variantChildren)==null||d.forEach(f=>{var h;return(h=f.animationState)==null?void 0:h.setActive(l,u)}),n[l].isActive=u;const c=o(l);for(const f in n)n[f].protectedKeys={};return c}return{animateChanges:o,setActive:a,setAnimateFunction:s,getState:()=>n,reset:()=>{n=Xg(),r=!0}}}function eT(t,e){return typeof e=="string"?e!==t:Array.isArray(e)?!Mw(e,t):!1}function sr(t=!1){return{isActive:t,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function Xg(){return{animate:sr(!0),whileInView:sr(),whileHover:sr(),whileTap:sr(),whileDrag:sr(),whileFocus:sr(),exit:sr()}}class ir{constructor(e){this.isMounted=!1,this.node=e}update(){}}class tT extends ir{constructor(e){super(e),e.animationState||(e.animationState=JP(e))}updateAnimationControlsSubscription(){const{animate:e}=this.node.getProps();Tl(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 nT=0;class rT extends ir{constructor(){super(...arguments),this.id=nT++}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 i=this.node.animationState.setActive("exit",!e);n&&!e&&i.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 iT={animation:{Feature:tT},exit:{Feature:rT}};function to(t,e,n,r={passive:!0}){return t.addEventListener(e,n,r),()=>t.removeEventListener(e,n)}function go(t){return{point:{x:t.pageX,y:t.pageY}}}const sT=t=>e=>Eh(e)&&t(e,go(e));function Ps(t,e,n,r){return to(t,e,sT(n),r)}const Nw=1e-4,oT=1-Nw,aT=1+Nw,Ow=.01,lT=0-Ow,uT=0+Ow;function Ze(t){return t.max-t.min}function cT(t,e,n){return Math.abs(t-e)<=n}function Qg(t,e,n,r=.5){t.origin=r,t.originPoint=he(e.min,e.max,t.origin),t.scale=Ze(n)/Ze(e),t.translate=he(n.min,n.max,t.origin)-t.originPoint,(t.scale>=oT&&t.scale<=aT||isNaN(t.scale))&&(t.scale=1),(t.translate>=lT&&t.translate<=uT||isNaN(t.translate))&&(t.translate=0)}function Ts(t,e,n,r){Qg(t.x,e.x,n.x,r?r.originX:void 0),Qg(t.y,e.y,n.y,r?r.originY:void 0)}function Zg(t,e,n){t.min=n.min+e.min,t.max=t.min+Ze(e)}function dT(t,e,n){Zg(t.x,e.x,n.x),Zg(t.y,e.y,n.y)}function Jg(t,e,n){t.min=e.min-n.min,t.max=t.min+Ze(e)}function As(t,e,n){Jg(t.x,e.x,n.x),Jg(t.y,e.y,n.y)}function St(t){return[t("x"),t("y")]}const Lw=({current:t})=>t?t.ownerDocument.defaultView:null,em=(t,e)=>Math.abs(t-e);function fT(t,e){const n=em(t.x,e.x),r=em(t.y,e.y);return Math.sqrt(n**2+r**2)}class Dw{constructor(e,n,{transformPagePoint:r,contextWindow:i=window,dragSnapToOrigin:s=!1,distanceThreshold:o=3}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const f=Au(this.lastMoveEventInfo,this.history),h=this.startEvent!==null,y=fT(f.offset,{x:0,y:0})>=this.distanceThreshold;if(!h&&!y)return;const{point:m}=f,{timestamp:_}=Le;this.history.push({...m,timestamp:_});const{onStart:p,onMove:g}=this.handlers;h||(p&&p(this.lastMoveEvent,f),this.startEvent=this.lastMoveEvent),g&&g(this.lastMoveEvent,f)},this.handlePointerMove=(f,h)=>{this.lastMoveEvent=f,this.lastMoveEventInfo=Tu(h,this.transformPagePoint),de.update(this.updatePoint,!0)},this.handlePointerUp=(f,h)=>{this.end();const{onEnd:y,onSessionEnd:m,resumeAnimation:_}=this.handlers;if(this.dragSnapToOrigin&&_&&_(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const p=Au(f.type==="pointercancel"?this.lastMoveEventInfo:Tu(h,this.transformPagePoint),this.history);this.startEvent&&y&&y(f,p),m&&m(f,p)},!Eh(e))return;this.dragSnapToOrigin=s,this.handlers=n,this.transformPagePoint=r,this.distanceThreshold=o,this.contextWindow=i||window;const a=go(e),l=Tu(a,this.transformPagePoint),{point:u}=l,{timestamp:c}=Le;this.history=[{...u,timestamp:c}];const{onSessionStart:d}=n;d&&d(e,Au(l,this.history)),this.removeListeners=fo(Ps(this.contextWindow,"pointermove",this.handlePointerMove),Ps(this.contextWindow,"pointerup",this.handlePointerUp),Ps(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(e){this.handlers=e}end(){this.removeListeners&&this.removeListeners(),Zn(this.updatePoint)}}function Tu(t,e){return e?{point:e(t.point)}:t}function tm(t,e){return{x:t.x-e.x,y:t.y-e.y}}function Au({point:t},e){return{point:t,delta:tm(t,$w(e)),offset:tm(t,hT(e)),velocity:pT(e,.1)}}function hT(t){return t[0]}function $w(t){return t[t.length-1]}function pT(t,e){if(t.length<2)return{x:0,y:0};let n=t.length-1,r=null;const i=$w(t);for(;n>=0&&(r=t[n],!(i.timestamp-r.timestamp>nn(e)));)n--;if(!r)return{x:0,y:0};const s=bt(i.timestamp-r.timestamp);if(s===0)return{x:0,y:0};const o={x:(i.x-r.x)/s,y:(i.y-r.y)/s};return o.x===1/0&&(o.x=0),o.y===1/0&&(o.y=0),o}function gT(t,{min:e,max:n},r){return e!==void 0&&t<e?t=r?he(e,t,r.min):Math.max(t,e):n!==void 0&&t>n&&(t=r?he(n,t,r.max):Math.min(t,n)),t}function nm(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 mT(t,{top:e,left:n,bottom:r,right:i}){return{x:nm(t.x,n,i),y:nm(t.y,e,r)}}function rm(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 vT(t,e){return{x:rm(t.x,e.x),y:rm(t.y,e.y)}}function yT(t,e){let n=.5;const r=Ze(t),i=Ze(e);return i>r?n=Xs(e.min,e.max-r,t.min):r>i&&(n=Xs(t.min,t.max-i,e.min)),Sn(0,1,n)}function _T(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 hd=.35;function wT(t=hd){return t===!1?t=0:t===!0&&(t=hd),{x:im(t,"left","right"),y:im(t,"top","bottom")}}function im(t,e,n){return{min:sm(t,e),max:sm(t,n)}}function sm(t,e){return typeof t=="number"?t:t[e]||0}const xT=new WeakMap;class ST{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=Se(),this.latestPointerEvent=null,this.latestPanInfo=null,this.visualElement=e}start(e,{snapToCursor:n=!1,distanceThreshold:r}={}){const{presenceContext:i}=this.visualElement;if(i&&i.isPresent===!1)return;const s=d=>{const{dragSnapToOrigin:f}=this.getProps();f?this.pauseAnimation():this.stopAnimation(),n&&this.snapToCursor(go(d).point)},o=(d,f)=>{const{drag:h,dragPropagation:y,onDragStart:m}=this.getProps();if(h&&!y&&(this.openDragLock&&this.openDragLock(),this.openDragLock=Nb(h),!this.openDragLock))return;this.latestPointerEvent=d,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),St(p=>{let g=this.getAxisMotionValue(p).get()||0;if(rn.test(g)){const{projection:v}=this.visualElement;if(v&&v.layout){const w=v.layout.layoutBox[p];w&&(g=Ze(w)*(parseFloat(g)/100))}}this.originPoint[p]=g}),m&&de.postRender(()=>m(d,f)),dd(this.visualElement,"transform");const{animationState:_}=this.visualElement;_&&_.setActive("whileDrag",!0)},a=(d,f)=>{this.latestPointerEvent=d,this.latestPanInfo=f;const{dragPropagation:h,dragDirectionLock:y,onDirectionLock:m,onDrag:_}=this.getProps();if(!h&&!this.openDragLock)return;const{offset:p}=f;if(y&&this.currentDirection===null){this.currentDirection=ET(p),this.currentDirection!==null&&m&&m(this.currentDirection);return}this.updateAxis("x",f.point,p),this.updateAxis("y",f.point,p),this.visualElement.render(),_&&_(d,f)},l=(d,f)=>{this.latestPointerEvent=d,this.latestPanInfo=f,this.stop(d,f),this.latestPointerEvent=null,this.latestPanInfo=null},u=()=>St(d=>{var f;return this.getAnimationState(d)==="paused"&&((f=this.getAxisMotionValue(d).animation)==null?void 0:f.play())}),{dragSnapToOrigin:c}=this.getProps();this.panSession=new Dw(e,{onSessionStart:s,onStart:o,onMove:a,onSessionEnd:l,resumeAnimation:u},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:c,distanceThreshold:r,contextWindow:Lw(this.visualElement)})}stop(e,n){const r=e||this.latestPointerEvent,i=n||this.latestPanInfo,s=this.isDragging;if(this.cancel(),!s||!i||!r)return;const{velocity:o}=i;this.startAnimation(o);const{onDragEnd:a}=this.getProps();a&&de.postRender(()=>a(r,i))}cancel(){this.isDragging=!1;const{projection:e,animationState:n}=this.visualElement;e&&(e.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;const{dragPropagation:r}=this.getProps();!r&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),n&&n.setActive("whileDrag",!1)}updateAxis(e,n,r){const{drag:i}=this.getProps();if(!r||!Do(e,i,this.currentDirection))return;const s=this.getAxisMotionValue(e);let o=this.originPoint[e]+r[e];this.constraints&&this.constraints[e]&&(o=gT(o,this.constraints[e],this.elastic[e])),s.set(o)}resolveConstraints(){var s;const{dragConstraints:e,dragElastic:n}=this.getProps(),r=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):(s=this.visualElement.projection)==null?void 0:s.layout,i=this.constraints;e&&ei(e)?this.constraints||(this.constraints=this.resolveRefConstraints()):e&&r?this.constraints=mT(r.layoutBox,e):this.constraints=!1,this.elastic=wT(n),i!==this.constraints&&r&&this.constraints&&!this.hasMutatedConstraints&&St(o=>{this.constraints!==!1&&this.getAxisMotionValue(o)&&(this.constraints[o]=_T(r.layoutBox[o],this.constraints[o]))})}resolveRefConstraints(){const{dragConstraints:e,onMeasureDragConstraints:n}=this.getProps();if(!e||!ei(e))return!1;const r=e.current,{projection:i}=this.visualElement;if(!i||!i.layout)return!1;const s=kP(r,i.root,this.visualElement.getTransformPagePoint());let o=vT(i.layout.layoutBox,s);if(n){const a=n(xP(o));this.hasMutatedConstraints=!!a,a&&(o=ww(a))}return o}startAnimation(e){const{drag:n,dragMomentum:r,dragElastic:i,dragTransition:s,dragSnapToOrigin:o,onDragTransitionEnd:a}=this.getProps(),l=this.constraints||{},u=St(c=>{if(!Do(c,n,this.currentDirection))return;let d=l&&l[c]||{};o&&(d={min:0,max:0});const f=i?200:1e6,h=i?40:1e7,y={type:"inertia",velocity:r?e[c]:0,bounceStiffness:f,bounceDamping:h,timeConstant:750,restDelta:1,restSpeed:10,...s,...d};return this.startAxisValueAnimation(c,y)});return Promise.all(u).then(a)}startAxisValueAnimation(e,n){const r=this.getAxisMotionValue(e);return dd(this.visualElement,e),r.start(Ih(e,r,0,n,this.visualElement,!1))}stopAnimation(){St(e=>this.getAxisMotionValue(e).stop())}pauseAnimation(){St(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(),i=r[n];return i||this.visualElement.getValue(e,(r.initial?r.initial[e]:void 0)||0)}snapToCursor(e){St(n=>{const{drag:r}=this.getProps();if(!Do(n,r,this.currentDirection))return;const{projection:i}=this.visualElement,s=this.getAxisMotionValue(n);if(i&&i.layout){const{min:o,max:a}=i.layout.layoutBox[n];s.set(e[n]-he(o,a,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:e,dragConstraints:n}=this.getProps(),{projection:r}=this.visualElement;if(!ei(n)||!r||!this.constraints)return;this.stopAnimation();const i={x:0,y:0};St(o=>{const a=this.getAxisMotionValue(o);if(a&&this.constraints!==!1){const l=a.get();i[o]=yT({min:l,max:l},this.constraints[o])}});const{transformTemplate:s}=this.visualElement.getProps();this.visualElement.current.style.transform=s?s({},""):"none",r.root&&r.root.updateScroll(),r.updateLayout(),this.resolveConstraints(),St(o=>{if(!Do(o,e,null))return;const a=this.getAxisMotionValue(o),{min:l,max:u}=this.constraints[o];a.set(he(l,u,i[o]))})}addListeners(){if(!this.visualElement.current)return;xT.set(this.visualElement,this);const e=this.visualElement.current,n=Ps(e,"pointerdown",l=>{const{drag:u,dragListener:c=!0}=this.getProps();u&&c&&this.start(l)}),r=()=>{const{dragConstraints:l}=this.getProps();ei(l)&&l.current&&(this.constraints=this.resolveRefConstraints())},{projection:i}=this.visualElement,s=i.addEventListener("measure",r);i&&!i.layout&&(i.root&&i.root.updateScroll(),i.updateLayout()),de.read(r);const o=to(window,"resize",()=>this.scalePositionWithinConstraints()),a=i.addEventListener("didUpdate",({delta:l,hasLayoutChanged:u})=>{this.isDragging&&u&&(St(c=>{const d=this.getAxisMotionValue(c);d&&(this.originPoint[c]+=l[c].translate,d.set(d.get()+l[c].translate))}),this.visualElement.render())});return()=>{o(),n(),s(),a&&a()}}getProps(){const e=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:r=!1,dragPropagation:i=!1,dragConstraints:s=!1,dragElastic:o=hd,dragMomentum:a=!0}=e;return{...e,drag:n,dragDirectionLock:r,dragPropagation:i,dragConstraints:s,dragElastic:o,dragMomentum:a}}}function Do(t,e,n){return(e===!0||e===t)&&(n===null||n===t)}function ET(t,e=10){let n=null;return Math.abs(t.y)>e?n="y":Math.abs(t.x)>e&&(n="x"),n}class kT extends ir{constructor(e){super(e),this.removeGroupControls=Tt,this.removeListeners=Tt,this.controls=new ST(e)}mount(){const{dragControls:e}=this.node.getProps();e&&(this.removeGroupControls=e.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||Tt}unmount(){this.removeGroupControls(),this.removeListeners()}}const om=t=>(e,n)=>{t&&de.postRender(()=>t(e,n))};class CT extends ir{constructor(){super(...arguments),this.removePointerDownListener=Tt}onPointerDown(e){this.session=new Dw(e,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:Lw(this.node)})}createPanHandlers(){const{onPanSessionStart:e,onPanStart:n,onPan:r,onPanEnd:i}=this.node.getProps();return{onSessionStart:om(e),onStart:om(n),onMove:r,onEnd:(s,o)=>{delete this.session,i&&de.postRender(()=>i(s,o))}}}mount(){this.removePointerDownListener=Ps(this.node.current,"pointerdown",e=>this.onPointerDown(e))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}const ca={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function am(t,e){return e.max===e.min?0:t/(e.max-e.min)*100}const Ki={correct:(t,e)=>{if(!e.target)return t;if(typeof t=="string")if(K.test(t))t=parseFloat(t);else return t;const n=am(t,e.target.x),r=am(t,e.target.y);return`${n}% ${r}%`}},bT={correct:(t,{treeScale:e,projectionDelta:n})=>{const r=t,i=Jn.parse(t);if(i.length>5)return r;const s=Jn.createTransformer(t),o=typeof i[0]!="number"?1:0,a=n.x.scale*e.x,l=n.y.scale*e.y;i[0+o]/=a,i[1+o]/=l;const u=he(a,l,.5);return typeof i[2+o]=="number"&&(i[2+o]/=u),typeof i[3+o]=="number"&&(i[3+o]/=u),s(i)}};let Ru=!1;class PT extends x.Component{componentDidMount(){const{visualElement:e,layoutGroup:n,switchLayoutGroup:r,layoutId:i}=this.props,{projection:s}=e;Yb(TT),s&&(n.group&&n.group.add(s),r&&r.register&&i&&r.register(s),Ru&&s.root.didUpdate(),s.addEventListener("animationComplete",()=>{this.safeToRemove()}),s.setOptions({...s.options,onExitComplete:()=>this.safeToRemove()})),ca.hasEverUpdated=!0}getSnapshotBeforeUpdate(e){const{layoutDependency:n,visualElement:r,drag:i,isPresent:s}=this.props,{projection:o}=r;return o&&(o.isPresent=s,Ru=!0,i||e.layoutDependency!==n||n===void 0||e.isPresent!==s?o.willUpdate():this.safeToRemove(),e.isPresent!==s&&(s?o.promote():o.relegate()||de.postRender(()=>{const a=o.getStack();(!a||!a.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:e}=this.props.visualElement;e&&(e.root.didUpdate(),Sh.postRender(()=>{!e.currentAnimation&&e.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:e,layoutGroup:n,switchLayoutGroup:r}=this.props,{projection:i}=e;Ru=!0,i&&(i.scheduleCheckAfterUnmount(),n&&n.group&&n.group.remove(i),r&&r.deregister&&r.deregister(i))}safeToRemove(){const{safeToRemove:e}=this.props;e&&e()}render(){return null}}function Fw(t){const[e,n]=zb(),r=x.useContext(m_);return k.jsx(PT,{...t,layoutGroup:r,switchLayoutGroup:x.useContext(yw),isPresent:e,safeToRemove:n})}const TT={borderRadius:{...Ki,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:Ki,borderTopRightRadius:Ki,borderBottomLeftRadius:Ki,borderBottomRightRadius:Ki,boxShadow:bT};function AT(t,e,n){const r=We(t)?t:Ei(t);return r.start(Ih("",r,e,n)),r.animation}const RT=(t,e)=>t.depth-e.depth;class MT{constructor(){this.children=[],this.isDirty=!1}add(e){rh(this.children,e),this.isDirty=!0}remove(e){ih(this.children,e),this.isDirty=!0}forEach(e){this.isDirty&&this.children.sort(RT),this.isDirty=!1,this.children.forEach(e)}}function IT(t,e){const n=at.now(),r=({timestamp:i})=>{const s=i-n;s>=e&&(Zn(r),t(s-e))};return de.setup(r,!0),()=>Zn(r)}const jw=["TopLeft","TopRight","BottomLeft","BottomRight"],NT=jw.length,lm=t=>typeof t=="string"?parseFloat(t):t,um=t=>typeof t=="number"||K.test(t);function OT(t,e,n,r,i,s){i?(t.opacity=he(0,n.opacity??1,LT(r)),t.opacityExit=he(e.opacity??1,0,DT(r))):s&&(t.opacity=he(e.opacity??1,n.opacity??1,r));for(let o=0;o<NT;o++){const a=`border${jw[o]}Radius`;let l=cm(e,a),u=cm(n,a);if(l===void 0&&u===void 0)continue;l||(l=0),u||(u=0),l===0||u===0||um(l)===um(u)?(t[a]=Math.max(he(lm(l),lm(u),r),0),(rn.test(u)||rn.test(l))&&(t[a]+="%")):t[a]=u}(e.rotate||n.rotate)&&(t.rotate=he(e.rotate||0,n.rotate||0,r))}function cm(t,e){return t[e]!==void 0?t[e]:t.borderRadius}const LT=Vw(0,.5,P_),DT=Vw(.5,.95,Tt);function Vw(t,e,n){return r=>r<t?0:r>e?1:n(Xs(t,e,r))}function dm(t,e){t.min=e.min,t.max=e.max}function xt(t,e){dm(t.x,e.x),dm(t.y,e.y)}function fm(t,e){t.translate=e.translate,t.scale=e.scale,t.originPoint=e.originPoint,t.origin=e.origin}function hm(t,e,n,r,i){return t-=e,t=za(t,1/n,r),i!==void 0&&(t=za(t,1/i,r)),t}function $T(t,e=0,n=1,r=.5,i,s=t,o=t){if(rn.test(e)&&(e=parseFloat(e),e=he(o.min,o.max,e/100)-o.min),typeof e!="number")return;let a=he(s.min,s.max,r);t===s&&(a-=e),t.min=hm(t.min,e,n,a,i),t.max=hm(t.max,e,n,a,i)}function pm(t,e,[n,r,i],s,o){$T(t,e[n],e[r],e[i],e.scale,s,o)}const FT=["x","scaleX","originX"],jT=["y","scaleY","originY"];function gm(t,e,n,r){pm(t.x,e,FT,n?n.x:void 0,r?r.x:void 0),pm(t.y,e,jT,n?n.y:void 0,r?r.y:void 0)}function mm(t){return t.translate===0&&t.scale===1}function Bw(t){return mm(t.x)&&mm(t.y)}function vm(t,e){return t.min===e.min&&t.max===e.max}function VT(t,e){return vm(t.x,e.x)&&vm(t.y,e.y)}function ym(t,e){return Math.round(t.min)===Math.round(e.min)&&Math.round(t.max)===Math.round(e.max)}function zw(t,e){return ym(t.x,e.x)&&ym(t.y,e.y)}function _m(t){return Ze(t.x)/Ze(t.y)}function wm(t,e){return t.translate===e.translate&&t.scale===e.scale&&t.originPoint===e.originPoint}class BT{constructor(){this.members=[]}add(e){rh(this.members,e),e.scheduleRender()}remove(e){if(ih(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(i=>e===i);if(n===0)return!1;let r;for(let i=n;i>=0;i--){const s=this.members[i];if(s.isPresent!==!1){r=s;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(),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:i}=e.options;i===!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)}}function zT(t,e,n){let r="";const i=t.x.translate/e.x,s=t.y.translate/e.y,o=(n==null?void 0:n.z)||0;if((i||s||o)&&(r=`translate3d(${i}px, ${s}px, ${o}px) `),(e.x!==1||e.y!==1)&&(r+=`scale(${1/e.x}, ${1/e.y}) `),n){const{transformPerspective:u,rotate:c,rotateX:d,rotateY:f,skewX:h,skewY:y}=n;u&&(r=`perspective(${u}px) ${r}`),c&&(r+=`rotate(${c}deg) `),d&&(r+=`rotateX(${d}deg) `),f&&(r+=`rotateY(${f}deg) `),h&&(r+=`skewX(${h}deg) `),y&&(r+=`skewY(${y}deg) `)}const a=t.x.scale*e.x,l=t.y.scale*e.y;return(a!==1||l!==1)&&(r+=`scale(${a}, ${l})`),r||"none"}const Mu=["","X","Y","Z"],UT=1e3;let HT=0;function Iu(t,e,n,r){const{latestValues:i}=e;i[t]&&(n[t]=i[t],e.setStaticValue(t,0),r&&(r[t]=0))}function Uw(t){if(t.hasCheckedOptimisedAppear=!0,t.root===t)return;const{visualElement:e}=t.options;if(!e)return;const n=Tw(e);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:i,layoutId:s}=t.options;window.MotionCancelOptimisedAnimation(n,"transform",de,!(i||s))}const{parent:r}=t;r&&!r.hasCheckedOptimisedAppear&&Uw(r)}function Hw({attachResizeListener:t,defaultParent:e,measureScroll:n,checkIsScrollRoot:r,resetTransform:i}){return class{constructor(o={},a=e==null?void 0:e()){this.id=HT++,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.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(GT),this.nodes.forEach(QT),this.nodes.forEach(ZT),this.nodes.forEach(qT)},this.resolvedRelativeTargetAt=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 l=0;l<this.path.length;l++)this.path[l].shouldResetTransform=!0;this.root===this&&(this.nodes=new MT)}addEventListener(o,a){return this.eventHandlers.has(o)||this.eventHandlers.set(o,new ah),this.eventHandlers.get(o).add(a)}notifyListeners(o,...a){const l=this.eventHandlers.get(o);l&&l.notify(...a)}hasListeners(o){return this.eventHandlers.has(o)}mount(o){if(this.instance)return;this.isSVG=sw(o)&&!jb(o),this.instance=o;const{layoutId:a,layout:l,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&&(l||a)&&(this.isLayoutDirty=!0),t){let c,d=0;const f=()=>this.root.updateBlockedByResize=!1;de.read(()=>{d=window.innerWidth}),t(o,()=>{const h=window.innerWidth;h!==d&&(d=h,this.root.updateBlockedByResize=!0,c&&c(),c=IT(f,250),ca.hasAnimatedSinceResize&&(ca.hasAnimatedSinceResize=!1,this.nodes.forEach(Em)))})}a&&this.root.registerSharedNode(a,this),this.options.animate!==!1&&u&&(a||l)&&this.addEventListener("didUpdate",({delta:c,hasLayoutChanged:d,hasRelativeLayoutChanged:f,layout:h})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const y=this.options.transition||u.getDefaultTransition()||rA,{onLayoutAnimationStart:m,onLayoutAnimationComplete:_}=u.getProps(),p=!this.targetLayout||!zw(this.targetLayout,h),g=!d&&f;if(this.options.layoutRoot||this.resumeFrom||g||d&&(p||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);const v={...wh(y,"layout"),onPlay:m,onComplete:_};(u.shouldReduceMotion||this.options.layoutRoot)&&(v.delay=0,v.type=!1),this.startAnimation(v),this.setAnimationOrigin(c,g)}else d||Em(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=h})}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(),Zn(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(JT),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&&Uw(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let c=0;c<this.path.length;c++){const d=this.path[c];d.shouldResetTransform=!0,d.updateScroll("snapshot"),d.options.layoutRoot&&d.willUpdate(!1)}const{layoutId:a,layout:l}=this.options;if(a===void 0&&!l)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(xm);return}if(this.animationId<=this.animationCommitId){this.nodes.forEach(Sm);return}this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(XT),this.nodes.forEach(WT),this.nodes.forEach(KT)):this.nodes.forEach(Sm),this.clearAllSnapshots();const a=at.now();Le.delta=Sn(0,1e3/60,a-Le.timestamp),Le.timestamp=a,Le.isProcessing=!0,wu.update.process(Le),wu.preRender.process(Le),wu.render.process(Le),Le.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,Sh.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(YT),this.sharedNodes.forEach(eA)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,de.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){de.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!Ze(this.snapshot.measuredBox.x)&&!Ze(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 l=0;l<this.path.length;l++)this.path[l].updateScroll();const o=this.layout;this.layout=this.measure(!1),this.layoutCorrected=Se(),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 l=r(this.instance);this.scroll={animationId:this.root.animationId,phase:o,isRoot:l,offset:n(this.instance),wasRoot:this.scroll?this.scroll.isRoot:l}}}resetTransform(){if(!i)return;const o=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,a=this.projectionDelta&&!Bw(this.projectionDelta),l=this.getTransformTemplate(),u=l?l(this.latestValues,""):void 0,c=u!==this.prevTransformTemplateValue;o&&this.instance&&(a||fr(this.latestValues)||c)&&(i(this.instance,u),this.shouldResetTransform=!1,this.scheduleRender())}measure(o=!0){const a=this.measurePageBox();let l=this.removeElementScroll(a);return o&&(l=this.removeTransform(l)),iA(l),{animationId:this.root.animationId,measuredBox:a,layoutBox:l,latestValues:{},source:this.id}}measurePageBox(){var u;const{visualElement:o}=this.options;if(!o)return Se();const a=o.measureViewportBox();if(!(((u=this.scroll)==null?void 0:u.wasRoot)||this.path.some(sA))){const{scroll:c}=this.root;c&&(ti(a.x,c.offset.x),ti(a.y,c.offset.y))}return a}removeElementScroll(o){var l;const a=Se();if(xt(a,o),(l=this.scroll)!=null&&l.wasRoot)return a;for(let u=0;u<this.path.length;u++){const c=this.path[u],{scroll:d,options:f}=c;c!==this.root&&d&&f.layoutScroll&&(d.wasRoot&&xt(a,o),ti(a.x,d.offset.x),ti(a.y,d.offset.y))}return a}applyTransform(o,a=!1){const l=Se();xt(l,o);for(let u=0;u<this.path.length;u++){const c=this.path[u];!a&&c.options.layoutScroll&&c.scroll&&c!==c.root&&ni(l,{x:-c.scroll.offset.x,y:-c.scroll.offset.y}),fr(c.latestValues)&&ni(l,c.latestValues)}return fr(this.latestValues)&&ni(l,this.latestValues),l}removeTransform(o){const a=Se();xt(a,o);for(let l=0;l<this.path.length;l++){const u=this.path[l];if(!u.instance||!fr(u.latestValues))continue;ad(u.latestValues)&&u.updateSnapshot();const c=Se(),d=u.measurePageBox();xt(c,d),gm(a,u.latestValues,u.snapshot?u.snapshot.layoutBox:void 0,c)}return fr(this.latestValues)&&gm(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!==Le.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(o=!1){var f;const a=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=a.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=a.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=a.isSharedProjectionDirty);const l=!!this.resumingFrom||this!==a;if(!(o||l&&this.isSharedProjectionDirty||this.isProjectionDirty||(f=this.parent)!=null&&f.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:c,layoutId:d}=this.options;if(!(!this.layout||!(c||d))){if(this.resolvedRelativeTargetAt=Le.timestamp,!this.targetDelta&&!this.relativeTarget){const h=this.getClosestProjectingParent();h&&h.layout&&this.animationProgress!==1?(this.relativeParent=h,this.forceRelativeParentToResolveTarget(),this.relativeTarget=Se(),this.relativeTargetOrigin=Se(),As(this.relativeTargetOrigin,this.layout.layoutBox,h.layout.layoutBox),xt(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}if(!(!this.relativeTarget&&!this.targetDelta)&&(this.target||(this.target=Se(),this.targetWithTransforms=Se()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),dT(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):xt(this.target,this.layout.layoutBox),Sw(this.target,this.targetDelta)):xt(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget)){this.attemptToResolveRelativeTarget=!1;const h=this.getClosestProjectingParent();h&&!!h.resumingFrom==!!this.resumingFrom&&!h.options.layoutScroll&&h.target&&this.animationProgress!==1?(this.relativeParent=h,this.forceRelativeParentToResolveTarget(),this.relativeTarget=Se(),this.relativeTargetOrigin=Se(),As(this.relativeTargetOrigin,this.target,h.target),xt(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}}}getClosestProjectingParent(){if(!(!this.parent||ad(this.parent.latestValues)||xw(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}calcProjection(){var y;const o=this.getLead(),a=!!this.resumingFrom||this!==o;let l=!0;if((this.isProjectionDirty||(y=this.parent)!=null&&y.isProjectionDirty)&&(l=!1),a&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(l=!1),this.resolvedRelativeTargetAt===Le.timestamp&&(l=!1),l)return;const{layout:u,layoutId:c}=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||c))return;xt(this.layoutCorrected,this.layout.layoutBox);const d=this.treeScale.x,f=this.treeScale.y;EP(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=Se());const{target:h}=o;if(!h){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(fm(this.prevProjectionDelta.x,this.projectionDelta.x),fm(this.prevProjectionDelta.y,this.projectionDelta.y)),Ts(this.projectionDelta,this.layoutCorrected,h,this.latestValues),(this.treeScale.x!==d||this.treeScale.y!==f||!wm(this.projectionDelta.x,this.prevProjectionDelta.x)||!wm(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",h))}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(o=!0){var a;if((a=this.options.visualElement)==null||a.scheduleRender(),o){const l=this.getStack();l&&l.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=ri(),this.projectionDelta=ri(),this.projectionDeltaWithTransform=ri()}setAnimationOrigin(o,a=!1){const l=this.snapshot,u=l?l.latestValues:{},c={...this.latestValues},d=ri();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!a;const f=Se(),h=l?l.source:void 0,y=this.layout?this.layout.source:void 0,m=h!==y,_=this.getStack(),p=!_||_.members.length<=1,g=!!(m&&!p&&this.options.crossfade===!0&&!this.path.some(nA));this.animationProgress=0;let v;this.mixTargetDelta=w=>{const E=w/1e3;km(d.x,o.x,E),km(d.y,o.y,E),this.setTargetDelta(d),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(As(f,this.layout.layoutBox,this.relativeParent.layout.layoutBox),tA(this.relativeTarget,this.relativeTargetOrigin,f,E),v&&VT(this.relativeTarget,v)&&(this.isProjectionDirty=!1),v||(v=Se()),xt(v,this.relativeTarget)),m&&(this.animationValues=c,OT(c,u,this.latestValues,E,g,p)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=E},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(o){var a,l,u;this.notifyListeners("animationStart"),(a=this.currentAnimation)==null||a.stop(),(u=(l=this.resumingFrom)==null?void 0:l.currentAnimation)==null||u.stop(),this.pendingAnimation&&(Zn(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=de.update(()=>{ca.hasAnimatedSinceResize=!0,this.motionValue||(this.motionValue=Ei(0)),this.currentAnimation=AT(this.motionValue,[0,1e3],{...o,velocity:0,isSync:!0,onUpdate:c=>{this.mixTargetDelta(c),o.onUpdate&&o.onUpdate(c)},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(UT),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const o=this.getLead();let{targetWithTransforms:a,target:l,layout:u,latestValues:c}=o;if(!(!a||!l||!u)){if(this!==o&&this.layout&&u&&Ww(this.options.animationType,this.layout.layoutBox,u.layoutBox)){l=this.target||Se();const d=Ze(this.layout.layoutBox.x);l.x.min=o.target.x.min,l.x.max=l.x.min+d;const f=Ze(this.layout.layoutBox.y);l.y.min=o.target.y.min,l.y.max=l.y.min+f}xt(a,l),ni(a,c),Ts(this.projectionDeltaWithTransform,this.layoutCorrected,a,c)}}registerSharedNode(o,a){this.sharedNodes.has(o)||this.sharedNodes.set(o,new BT),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:l}={}){const u=this.getStack();u&&u.promote(this,l),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:l}=o;if((l.z||l.rotate||l.rotateX||l.rotateY||l.rotateZ||l.skewX||l.skewY)&&(a=!0),!a)return;const u={};l.z&&Iu("z",o,u,this.animationValues);for(let c=0;c<Mu.length;c++)Iu(`rotate${Mu[c]}`,o,u,this.animationValues),Iu(`skew${Mu[c]}`,o,u,this.animationValues);o.render();for(const c in u)o.setStaticValue(c,u[c]),this.animationValues&&(this.animationValues[c]=u[c]);o.scheduleRender()}applyProjectionStyles(o,a){if(!this.instance||this.isSVG)return;if(!this.isVisible){o.visibility="hidden";return}const l=this.getTransformTemplate();if(this.needsReset){this.needsReset=!1,o.visibility="",o.opacity="",o.pointerEvents=ua(a==null?void 0:a.pointerEvents)||"",o.transform=l?l(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=ua(a==null?void 0:a.pointerEvents)||""),this.hasProjected&&!fr(this.latestValues)&&(o.transform=l?l({},""):"none",this.hasProjected=!1);return}o.visibility="";const c=u.animationValues||u.latestValues;this.applyTransformsToTarget();let d=zT(this.projectionDeltaWithTransform,this.treeScale,c);l&&(d=l(c,d)),o.transform=d;const{x:f,y:h}=this.projectionDelta;o.transformOrigin=`${f.origin*100}% ${h.origin*100}% 0`,u.animationValues?o.opacity=u===this?c.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:c.opacityExit:o.opacity=u===this?c.opacity!==void 0?c.opacity:"":c.opacityExit!==void 0?c.opacityExit:0;for(const y in eo){if(c[y]===void 0)continue;const{correct:m,applyTo:_,isCSSVariable:p}=eo[y],g=d==="none"?c[y]:m(c[y],u);if(_){const v=_.length;for(let w=0;w<v;w++)o[_[w]]=g}else p?this.options.visualElement.renderState.vars[y]=g:o[y]=g}this.options.layoutId&&(o.pointerEvents=u===this?ua(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(xm),this.root.sharedNodes.clear()}}}function WT(t){t.updateLayout()}function KT(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:i}=t.layout,{animationType:s}=t.options,o=e.source!==t.layout.source;s==="size"?St(d=>{const f=o?e.measuredBox[d]:e.layoutBox[d],h=Ze(f);f.min=r[d].min,f.max=f.min+h}):Ww(s,e.layoutBox,r)&&St(d=>{const f=o?e.measuredBox[d]:e.layoutBox[d],h=Ze(r[d]);f.max=f.min+h,t.relativeTarget&&!t.currentAnimation&&(t.isProjectionDirty=!0,t.relativeTarget[d].max=t.relativeTarget[d].min+h)});const a=ri();Ts(a,r,e.layoutBox);const l=ri();o?Ts(l,t.applyTransform(i,!0),e.measuredBox):Ts(l,r,e.layoutBox);const u=!Bw(a);let c=!1;if(!t.resumeFrom){const d=t.getClosestProjectingParent();if(d&&!d.resumeFrom){const{snapshot:f,layout:h}=d;if(f&&h){const y=Se();As(y,e.layoutBox,f.layoutBox);const m=Se();As(m,r,h.layoutBox),zw(y,m)||(c=!0),d.options.layoutRoot&&(t.relativeTarget=m,t.relativeTargetOrigin=y,t.relativeParent=d)}}}t.notifyListeners("didUpdate",{layout:r,snapshot:e,delta:l,layoutDelta:a,hasLayoutChanged:u,hasRelativeLayoutChanged:c})}else if(t.isLead()){const{onExitComplete:r}=t.options;r&&r()}t.options.transition=void 0}function GT(t){t.parent&&(t.isProjecting()||(t.isProjectionDirty=t.parent.isProjectionDirty),t.isSharedProjectionDirty||(t.isSharedProjectionDirty=!!(t.isProjectionDirty||t.parent.isProjectionDirty||t.parent.isSharedProjectionDirty)),t.isTransformDirty||(t.isTransformDirty=t.parent.isTransformDirty))}function qT(t){t.isProjectionDirty=t.isSharedProjectionDirty=t.isTransformDirty=!1}function YT(t){t.clearSnapshot()}function xm(t){t.clearMeasurements()}function Sm(t){t.isLayoutDirty=!1}function XT(t){const{visualElement:e}=t.options;e&&e.getProps().onBeforeLayoutMeasure&&e.notify("BeforeLayoutMeasure"),t.resetTransform()}function Em(t){t.finishAnimation(),t.targetDelta=t.relativeTarget=t.target=void 0,t.isProjectionDirty=!0}function QT(t){t.resolveTargetDelta()}function ZT(t){t.calcProjection()}function JT(t){t.resetSkewAndRotation()}function eA(t){t.removeLeadSnapshot()}function km(t,e,n){t.translate=he(e.translate,0,n),t.scale=he(e.scale,1,n),t.origin=e.origin,t.originPoint=e.originPoint}function Cm(t,e,n,r){t.min=he(e.min,n.min,r),t.max=he(e.max,n.max,r)}function tA(t,e,n,r){Cm(t.x,e.x,n.x,r),Cm(t.y,e.y,n.y,r)}function nA(t){return t.animationValues&&t.animationValues.opacityExit!==void 0}const rA={duration:.45,ease:[.4,0,.1,1]},bm=t=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(t),Pm=bm("applewebkit/")&&!bm("chrome/")?Math.round:Tt;function Tm(t){t.min=Pm(t.min),t.max=Pm(t.max)}function iA(t){Tm(t.x),Tm(t.y)}function Ww(t,e,n){return t==="position"||t==="preserve-aspect"&&!cT(_m(e),_m(n),.2)}function sA(t){var e;return t!==t.root&&((e=t.scroll)==null?void 0:e.wasRoot)}const oA=Hw({attachResizeListener:(t,e)=>to(t,"resize",e),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),Nu={current:void 0},Kw=Hw({measureScroll:t=>({x:t.scrollLeft,y:t.scrollTop}),defaultParent:()=>{if(!Nu.current){const t=new oA({});t.mount(window),t.setOptions({layoutScroll:!0}),Nu.current=t}return Nu.current},resetTransform:(t,e)=>{t.style.transform=e!==void 0?e:"none"},checkIsScrollRoot:t=>window.getComputedStyle(t).position==="fixed"}),aA={pan:{Feature:CT},drag:{Feature:kT,ProjectionNode:Kw,MeasureLayout:Fw}};function Am(t,e,n){const{props:r}=t;t.animationState&&r.whileHover&&t.animationState.setActive("whileHover",n==="Start");const i="onHover"+n,s=r[i];s&&de.postRender(()=>s(e,go(e)))}class lA extends ir{mount(){const{current:e}=this.node;e&&(this.unmount=Ob(e,(n,r)=>(Am(this.node,r,"Start"),i=>Am(this.node,i,"End"))))}unmount(){}}class uA extends ir{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=fo(to(this.node.current,"focus",()=>this.onFocus()),to(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function Rm(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 i="onTap"+(n==="End"?"":n),s=r[i];s&&de.postRender(()=>s(e,go(e)))}class cA extends ir{mount(){const{current:e}=this.node;e&&(this.unmount=Fb(e,(n,r)=>(Rm(this.node,r,"Start"),(i,{success:s})=>Rm(this.node,i,s?"End":"Cancel")),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}}const pd=new WeakMap,Ou=new WeakMap,dA=t=>{const e=pd.get(t.target);e&&e(t)},fA=t=>{t.forEach(dA)};function hA({root:t,...e}){const n=t||document;Ou.has(n)||Ou.set(n,{});const r=Ou.get(n),i=JSON.stringify(e);return r[i]||(r[i]=new IntersectionObserver(fA,{root:t,...e})),r[i]}function pA(t,e,n){const r=hA(e);return pd.set(t,n),r.observe(t),()=>{pd.delete(t),r.unobserve(t)}}const gA={some:0,all:1};class mA extends ir{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:e={}}=this.node.getProps(),{root:n,margin:r,amount:i="some",once:s}=e,o={root:n?n.current:void 0,rootMargin:r,threshold:typeof i=="number"?i:gA[i]},a=l=>{const{isIntersecting:u}=l;if(this.isInView===u||(this.isInView=u,s&&!u&&this.hasEnteredView))return;u&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",u);const{onViewportEnter:c,onViewportLeave:d}=this.node.getProps(),f=u?c:d;f&&f(l)};return pA(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(vA(e,n))&&this.startObserver()}unmount(){}}function vA({viewport:t={}},{viewport:e={}}={}){return n=>t[n]!==e[n]}const yA={inView:{Feature:mA},tap:{Feature:cA},focus:{Feature:uA},hover:{Feature:lA}},_A={layout:{ProjectionNode:Kw,MeasureLayout:Fw}},wA={...iT,...yA,...aA,..._A},Gw=wP(wA,NP),Ci={};function qw(t){return"init"in t}function gd(t){return!!t.write}function Mm(t){return"v"in t||"e"in t}function Ua(t){if("e"in t)throw t.e;if((Ci?"production":void 0)!=="production"&&!("v"in t))throw new Error("[Bug] atom state is not initialized");return t.v}const Ha=new WeakMap;function Yw(t){var e;return Wa(t)&&!!((e=Ha.get(t))!=null&&e[0])}function xA(t){const e=Ha.get(t);e!=null&&e[0]&&(e[0]=!1,e[1].forEach(n=>n()))}function md(t,e){let n=Ha.get(t);if(!n){n=[!0,new Set],Ha.set(t,n);const r=()=>{n[0]=!1};t.then(r,r)}n[1].add(e)}function Wa(t){return typeof(t==null?void 0:t.then)=="function"}function Xw(t,e,n){if(!n.p.has(t)){n.p.add(t);const r=()=>n.p.delete(t);e.then(r,r)}}function Qw(t,e,n){var r;const i=new Set;for(const s of((r=n.get(t))==null?void 0:r.t)||[])n.has(s)&&i.add(s);for(const s of e.p)i.add(s);return i}const SA=(t,e,...n)=>e.read(...n),EA=(t,e,...n)=>e.write(...n),kA=(t,e)=>{var n;return(n=e.unstable_onInit)==null?void 0:n.call(e,t)},CA=(t,e,n)=>{var r;return(r=e.onMount)==null?void 0:r.call(e,n)},bA=(t,e)=>{const n=Ke(t),r=n[0],i=n[9];if((Ci?"production":void 0)!=="production"&&!e)throw new Error("Atom is undefined or null");let s=r.get(e);return s||(s={d:new Map,p:new Set,n:0},r.set(e,s),i==null||i(t,e)),s},PA=t=>{const e=Ke(t),n=e[1],r=e[3],i=e[4],s=e[5],o=e[6],a=e[13],l=[],u=c=>{try{c()}catch(d){l.push(d)}};do{o.f&&u(o.f);const c=new Set,d=c.add.bind(c);r.forEach(f=>{var h;return(h=n.get(f))==null?void 0:h.l.forEach(d)}),r.clear(),s.forEach(d),s.clear(),i.forEach(d),i.clear(),c.forEach(u),r.size&&a(t)}while(r.size||s.size||i.size);if(l.length)throw new AggregateError(l)},TA=t=>{const e=Ke(t),n=e[1],r=e[2],i=e[3],s=e[11],o=e[14],a=e[17],l=[],u=new WeakSet,c=new WeakSet,d=Array.from(i);for(;d.length;){const f=d[d.length-1],h=s(t,f);if(c.has(f)){d.pop();continue}if(u.has(f)){if(r.get(f)===h.n)l.push([f,h]);else if((Ci?"production":void 0)!=="production"&&r.has(f))throw new Error("[Bug] invalidated atom exists");c.add(f),d.pop();continue}u.add(f);for(const y of Qw(f,h,n))u.has(y)||d.push(y)}for(let f=l.length-1;f>=0;--f){const[h,y]=l[f];let m=!1;for(const _ of y.d.keys())if(_!==h&&i.has(_)){m=!0;break}m&&(o(t,h),a(t,h)),r.delete(h)}},AA=(t,e)=>{var n,r;const i=Ke(t),s=i[1],o=i[2],a=i[3],l=i[6],u=i[7],c=i[11],d=i[12],f=i[13],h=i[14],y=i[16],m=i[17],_=c(t,e);if(Mm(_)&&(s.has(e)&&o.get(e)!==_.n||Array.from(_.d).every(([S,A])=>h(t,S).n===A)))return _;_.d.clear();let p=!0;function g(){s.has(e)&&(m(t,e),f(t),d(t))}function v(S){var A;if(S===e){const O=c(t,S);if(!Mm(O))if(qw(S))Ka(t,S,S.init);else throw new Error("no atom init");return Ua(O)}const M=h(t,S);try{return Ua(M)}finally{_.d.set(S,M.n),Yw(_.v)&&Xw(e,_.v,M),(A=s.get(S))==null||A.t.add(e),p||g()}}let w,E;const P={get signal(){return w||(w=new AbortController),w.signal},get setSelf(){return(Ci?"production":void 0)!=="production"&&!gd(e)&&console.warn("setSelf function cannot be used with read-only atom"),!E&&gd(e)&&(E=(...S)=>{if((Ci?"production":void 0)!=="production"&&p&&console.warn("setSelf function cannot be called in sync"),!p)try{return y(t,e,...S)}finally{f(t),d(t)}}),E}},C=_.n;try{const S=u(t,e,v,P);return Ka(t,e,S),Wa(S)&&(md(S,()=>w==null?void 0:w.abort()),S.then(g,g)),(n=l.r)==null||n.call(l,e),_}catch(S){return delete _.v,_.e=S,++_.n,_}finally{p=!1,C!==_.n&&o.get(e)===C&&(o.set(e,_.n),a.add(e),(r=l.c)==null||r.call(l,e))}},RA=(t,e)=>{const n=Ke(t),r=n[1],i=n[2],s=n[11],o=[e];for(;o.length;){const a=o.pop(),l=s(t,a);for(const u of Qw(a,l,r)){const c=s(t,u);i.set(u,c.n),o.push(u)}}},Zw=(t,e,...n)=>{const r=Ke(t),i=r[3],s=r[6],o=r[8],a=r[11],l=r[12],u=r[13],c=r[14],d=r[15],f=r[17];let h=!0;const y=_=>Ua(c(t,_)),m=(_,...p)=>{var g;const v=a(t,_);try{if(_===e){if(!qw(_))throw new Error("atom not writable");const w=v.n,E=p[0];Ka(t,_,E),f(t,_),w!==v.n&&(i.add(_),(g=s.c)==null||g.call(s,_),d(t,_));return}else return Zw(t,_,...p)}finally{h||(u(t),l(t))}};try{return o(t,e,y,m,...n)}finally{h=!1}},MA=(t,e)=>{var n;const r=Ke(t),i=r[1],s=r[3],o=r[6],a=r[11],l=r[15],u=r[18],c=r[19],d=a(t,e),f=i.get(e);if(f&&!Yw(d.v)){for(const[h,y]of d.d)if(!f.d.has(h)){const m=a(t,h);u(t,h).t.add(e),f.d.add(h),y!==m.n&&(s.add(h),(n=o.c)==null||n.call(o,h),l(t,h))}for(const h of f.d||[])if(!d.d.has(h)){f.d.delete(h);const y=c(t,h);y==null||y.t.delete(e)}}},Jw=(t,e)=>{var n;const r=Ke(t),i=r[1],s=r[4],o=r[6],a=r[10],l=r[11],u=r[12],c=r[13],d=r[14],f=r[16],h=l(t,e);let y=i.get(e);if(!y){d(t,e);for(const m of h.d.keys())Jw(t,m).t.add(e);if(y={l:new Set,d:new Set(h.d.keys()),t:new Set},i.set(e,y),(n=o.m)==null||n.call(o,e),gd(e)){const m=()=>{let _=!0;const p=(...g)=>{try{return f(t,e,...g)}finally{_||(c(t),u(t))}};try{const g=a(t,e,p);g&&(y.u=()=>{_=!0;try{g()}finally{_=!1}})}finally{_=!1}};s.add(m)}}return y},IA=(t,e)=>{var n;const r=Ke(t),i=r[1],s=r[5],o=r[6],a=r[11],l=r[19],u=a(t,e);let c=i.get(e);if(c&&!c.l.size&&!Array.from(c.t).some(d=>{var f;return(f=i.get(d))==null?void 0:f.d.has(e)})){c.u&&s.add(c.u),c=void 0,i.delete(e),(n=o.u)==null||n.call(o,e);for(const d of u.d.keys()){const f=l(t,d);f==null||f.t.delete(e)}return}return c},Ka=(t,e,n)=>{const r=Ke(t)[11],i=r(t,e),s="v"in i,o=i.v;if(Wa(n))for(const a of i.d.keys())Xw(e,n,r(t,a));i.v=n,delete i.e,(!s||!Object.is(o,i.v))&&(++i.n,Wa(o)&&xA(o))},NA=(t,e)=>{const n=Ke(t)[14];return Ua(n(t,e))},OA=(t,e,...n)=>{const r=Ke(t),i=r[12],s=r[13],o=r[16];try{return o(t,e,...n)}finally{s(t),i(t)}},LA=(t,e,n)=>{const r=Ke(t),i=r[12],s=r[18],o=r[19],l=s(t,e).l;return l.add(n),i(t),()=>{l.delete(n),o(t,e),i(t)}},e1=new WeakMap,Ke=t=>{const e=e1.get(t);if((Ci?"production":void 0)!=="production"&&!e)throw new Error("Store must be created by buildStore to read its building blocks");return e};function DA(...t){const e={get(r){const i=Ke(e)[21];return i(e,r)},set(r,...i){const s=Ke(e)[22];return s(e,r,...i)},sub(r,i){const s=Ke(e)[23];return s(e,r,i)}},n=[new WeakMap,new WeakMap,new WeakMap,new Set,new Set,new Set,{},SA,EA,kA,CA,bA,PA,TA,AA,RA,Zw,MA,Jw,IA,Ka,NA,OA,LA,void 0].map((r,i)=>t[i]||r);return e1.set(e,Object.freeze(n)),e}const t1={};let $A=0;function n1(t,e){const n=`atom${++$A}`,r={toString(){return(t1?"production":void 0)!=="production"&&this.debugLabel?n+":"+this.debugLabel:n}};return r.init=t,r.read=FA,r.write=jA,r}function FA(t){return t(this)}function jA(t,e,n){return e(this,typeof n=="function"?n(t(this)):n)}function VA(){return DA()}let Gi;function BA(){return Gi||(Gi=VA(),(t1?"production":void 0)!=="production"&&(globalThis.__JOTAI_DEFAULT_STORE__||(globalThis.__JOTAI_DEFAULT_STORE__=Gi),globalThis.__JOTAI_DEFAULT_STORE__!==Gi&&console.warn("Detected multiple Jotai instances. It may cause unexpected behavior with the default store. https://github.com/pmndrs/jotai/discussions/2044"))),Gi}const zA={},UA=x.createContext(void 0);function r1(t){return x.useContext(UA)||BA()}const vd=t=>typeof(t==null?void 0:t.then)=="function",yd=t=>{t.status||(t.status="pending",t.then(e=>{t.status="fulfilled",t.value=e},e=>{t.status="rejected",t.reason=e}))},HA=ee.use||(t=>{if(t.status==="pending")throw t;if(t.status==="fulfilled")return t.value;throw t.status==="rejected"?t.reason:(yd(t),t)}),Lu=new WeakMap,Im=(t,e)=>{let n=Lu.get(t);return n||(n=new Promise((r,i)=>{let s=t;const o=u=>c=>{s===u&&r(c)},a=u=>c=>{s===u&&i(c)},l=()=>{try{const u=e();vd(u)?(Lu.set(u,n),s=u,u.then(o(u),a(u)),md(u,l)):r(u)}catch(u){i(u)}};t.then(o(t),a(t)),md(t,l)}),Lu.set(t,n)),n};function i1(t,e){const{delay:n,unstable_promiseStatus:r=!ee.use}={},i=r1(),[[s,o,a],l]=x.useReducer(c=>{const d=i.get(t);return Object.is(c[0],d)&&c[1]===i&&c[2]===t?c:[d,i,t]},void 0,()=>[i.get(t),i,t]);let u=s;if((o!==i||a!==t)&&(l(),u=i.get(t)),x.useEffect(()=>{const c=i.sub(t,()=>{if(r)try{const d=i.get(t);vd(d)&&yd(Im(d,()=>i.get(t)))}catch{}if(typeof n=="number"){setTimeout(l,n);return}l()});return l(),c},[i,t,n,r]),x.useDebugValue(u),vd(u)){const c=Im(u,()=>i.get(t));return r&&yd(c),HA(c)}return u}function Ga(t,e){const n=r1();return x.useCallback((...i)=>{if((zA?"production":void 0)!=="production"&&!("write"in t))throw new Error("not writable atom");return n.set(t,...i)},[n,t])}function s1(t,e){return[i1(t),Ga(t)]}/**
|
|
41
|
+
* @license lucide-react v0.539.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 WA=t=>t.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),KA=t=>t.replace(/^([A-Z])|[\s-_]+(\w)/g,(e,n,r)=>r?r.toUpperCase():n.toLowerCase()),Nm=t=>{const e=KA(t);return e.charAt(0).toUpperCase()+e.slice(1)},o1=(...t)=>t.filter((e,n,r)=>!!e&&e.trim()!==""&&r.indexOf(e)===n).join(" ").trim(),GA=t=>{for(const e in t)if(e.startsWith("aria-")||e==="role"||e==="title")return!0};/**
|
|
46
|
+
* @license lucide-react v0.539.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 qA={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.539.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 YA=x.forwardRef(({color:t="currentColor",size:e=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:i="",children:s,iconNode:o,...a},l)=>x.createElement("svg",{ref:l,...qA,width:e,height:e,stroke:t,strokeWidth:r?Number(n)*24/Number(e):n,className:o1("lucide",i),...!s&&!GA(a)&&{"aria-hidden":"true"},...a},[...o.map(([u,c])=>x.createElement(u,c)),...Array.isArray(s)?s:[s]]));/**
|
|
56
|
+
* @license lucide-react v0.539.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 Wt=(t,e)=>{const n=x.forwardRef(({className:r,...i},s)=>x.createElement(YA,{ref:s,iconNode:e,className:o1(`lucide-${WA(Nm(t))}`,`lucide-${t}`,r),...i}));return n.displayName=Nm(t),n};/**
|
|
61
|
+
* @license lucide-react v0.539.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 XA=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],QA=Wt("chevron-down",XA);/**
|
|
66
|
+
* @license lucide-react v0.539.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 ZA=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]],Om=Wt("circle-alert",ZA);/**
|
|
71
|
+
* @license lucide-react v0.539.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 JA=[["path",{d:"M21.801 10A10 10 0 1 1 17 3.335",key:"yps3ct"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]],eR=Wt("circle-check-big",JA);/**
|
|
76
|
+
* @license lucide-react v0.539.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 tR=[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]],nR=Wt("eye",tR);/**
|
|
81
|
+
* @license lucide-react v0.539.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 rR=[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]],a1=Wt("loader-circle",rR);/**
|
|
86
|
+
* @license lucide-react v0.539.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 iR=[["path",{d:"M12 22a1 1 0 0 1 0-20 10 9 0 0 1 10 9 5 5 0 0 1-5 5h-2.25a1.75 1.75 0 0 0-1.4 2.8l.3.4a1.75 1.75 0 0 1-1.4 2.8z",key:"e79jfc"}],["circle",{cx:"13.5",cy:"6.5",r:".5",fill:"currentColor",key:"1okk4w"}],["circle",{cx:"17.5",cy:"10.5",r:".5",fill:"currentColor",key:"f64h9f"}],["circle",{cx:"6.5",cy:"12.5",r:".5",fill:"currentColor",key:"qy21gx"}],["circle",{cx:"8.5",cy:"7.5",r:".5",fill:"currentColor",key:"fotxhn"}]],sR=Wt("palette",iR);/**
|
|
91
|
+
* @license lucide-react v0.539.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 oR=[["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"}]],aR=Wt("pencil",oR);/**
|
|
96
|
+
* @license lucide-react v0.539.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 lR=[["path",{d:"M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z",key:"1ffxy3"}],["path",{d:"m21.854 2.147-10.94 10.939",key:"12cjpa"}]],uR=Wt("send",lR);/**
|
|
101
|
+
* @license lucide-react v0.539.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 cR=[["path",{d:"M11.017 2.814a1 1 0 0 1 1.966 0l1.051 5.558a2 2 0 0 0 1.594 1.594l5.558 1.051a1 1 0 0 1 0 1.966l-5.558 1.051a2 2 0 0 0-1.594 1.594l-1.051 5.558a1 1 0 0 1-1.966 0l-1.051-5.558a2 2 0 0 0-1.594-1.594l-5.558-1.051a1 1 0 0 1 0-1.966l5.558-1.051a2 2 0 0 0 1.594-1.594z",key:"1s2grr"}],["path",{d:"M20 2v4",key:"1rf3ol"}],["path",{d:"M22 4h-4",key:"gwowj6"}],["circle",{cx:"4",cy:"20",r:"2",key:"6kqj1y"}]],dR=Wt("sparkles",cR);/**
|
|
106
|
+
* @license lucide-react v0.539.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 fR=[["path",{d:"M12 3v12",key:"1x0j5s"}],["path",{d:"m17 8-5-5-5 5",key:"7q97r8"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}]],hR=Wt("upload",fR);/**
|
|
111
|
+
* @license lucide-react v0.539.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 pR=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],gR=Wt("x",pR);var l1={exports:{}};(function(t){(function(e,n){t.exports?t.exports=n():e.log=n()})(mS,function(){var e=function(){},n="undefined",r=typeof window!==n&&typeof window.navigator!==n&&/Trident\/|MSIE /.test(window.navigator.userAgent),i=["trace","debug","info","warn","error"],s={},o=null;function a(m,_){var p=m[_];if(typeof p.bind=="function")return p.bind(m);try{return Function.prototype.bind.call(p,m)}catch{return function(){return Function.prototype.apply.apply(p,[m,arguments])}}}function l(){console.log&&(console.log.apply?console.log.apply(console,arguments):Function.prototype.apply.apply(console.log,[console,arguments])),console.trace&&console.trace()}function u(m){return m==="debug"&&(m="log"),typeof console===n?!1:m==="trace"&&r?l:console[m]!==void 0?a(console,m):console.log!==void 0?a(console,"log"):e}function c(){for(var m=this.getLevel(),_=0;_<i.length;_++){var p=i[_];this[p]=_<m?e:this.methodFactory(p,m,this.name)}if(this.log=this.debug,typeof console===n&&m<this.levels.SILENT)return"No console available for logging"}function d(m){return function(){typeof console!==n&&(c.call(this),this[m].apply(this,arguments))}}function f(m,_,p){return u(m)||d.apply(this,arguments)}function h(m,_){var p=this,g,v,w,E="loglevel";typeof m=="string"?E+=":"+m:typeof m=="symbol"&&(E=void 0);function P(O){var T=(i[O]||"silent").toUpperCase();if(!(typeof window===n||!E)){try{window.localStorage[E]=T;return}catch{}try{window.document.cookie=encodeURIComponent(E)+"="+T+";"}catch{}}}function C(){var O;if(!(typeof window===n||!E)){try{O=window.localStorage[E]}catch{}if(typeof O===n)try{var T=window.document.cookie,D=encodeURIComponent(E),I=T.indexOf(D+"=");I!==-1&&(O=/^([^;]+)/.exec(T.slice(I+D.length+1))[1])}catch{}return p.levels[O]===void 0&&(O=void 0),O}}function S(){if(!(typeof window===n||!E)){try{window.localStorage.removeItem(E)}catch{}try{window.document.cookie=encodeURIComponent(E)+"=; expires=Thu, 01 Jan 1970 00:00:00 UTC"}catch{}}}function A(O){var T=O;if(typeof T=="string"&&p.levels[T.toUpperCase()]!==void 0&&(T=p.levels[T.toUpperCase()]),typeof T=="number"&&T>=0&&T<=p.levels.SILENT)return T;throw new TypeError("log.setLevel() called with invalid level: "+O)}p.name=m,p.levels={TRACE:0,DEBUG:1,INFO:2,WARN:3,ERROR:4,SILENT:5},p.methodFactory=_||f,p.getLevel=function(){return w??v??g},p.setLevel=function(O,T){return w=A(O),T!==!1&&P(w),c.call(p)},p.setDefaultLevel=function(O){v=A(O),C()||p.setLevel(O,!1)},p.resetLevel=function(){w=null,S(),c.call(p)},p.enableAll=function(O){p.setLevel(p.levels.TRACE,O)},p.disableAll=function(O){p.setLevel(p.levels.SILENT,O)},p.rebuild=function(){if(o!==p&&(g=A(o.getLevel())),c.call(p),o===p)for(var O in s)s[O].rebuild()},g=A(o?o.getLevel():"WARN");var M=C();M!=null&&(w=A(M)),c.call(p)}o=new h,o.getLogger=function(_){if(typeof _!="symbol"&&typeof _!="string"||_==="")throw new TypeError("You must supply a name when creating a logger.");var p=s[_];return p||(p=s[_]=new h(_,o.methodFactory)),p};var y=typeof window!==n?window.log:void 0;return o.noConflict=function(){return typeof window!==n&&window.log===o&&(window.log=y),o},o.getLoggers=function(){return s},o.default=o,o})})(l1);var mR=l1.exports;const $t=of(mR),vR="INFO",yR=vR.toUpperCase();$t.setLevel($t.levels[yR]||$t.levels.INFO);const Rl=t=>{const e=t?`[${t}] `:"";return{trace:(n,...r)=>$t.trace(`${e}${n}`,...r),debug:(n,...r)=>$t.debug(`${e}${n}`,...r),info:(n,...r)=>$t.info(`${e}${n}`,...r),warn:(n,...r)=>$t.warn(`${e}${n}`,...r),error:(n,...r)=>$t.error(`${e}${n}`,...r),api:(n,...r)=>$t.info(`${e}API: ${n}`,...r),hook:(n,...r)=>$t.debug(`${e}Hook: ${n}`,...r),mount:(n,...r)=>$t.debug(`${e}Mount: ${n}`,...r)}},qi=Rl("useGitPublish"),_R=()=>{const[t,e]=x.useState(!1),[n,r]=x.useState(null),i=x.useCallback(async()=>{qi.debug("publishChanges called"),e(!0),r(null);try{qi.debug("Making fetch request to /api/git/publish");const o=await fetch("/api/git/publish",{method:"POST",headers:{"Content-Type":"application/json"}});if(qi.debug("Response received",{status:o.status,ok:o.ok}),!o.ok){const l=await o.json();throw new Error(l.details||l.error||`HTTP ${o.status}`)}const a=await o.json();return qi.info("Git publish completed successfully:",a.prUrl),a}catch(o){const a=o instanceof Error?o.message:"Failed to publish changes";return r(a),qi.error("Git publish error:",o),null}finally{e(!1)}},[]);return{publishChanges:x.useCallback(async o=>{const a=await i();return a?o("success","🎉 Changes published successfully!","Your branch has been pushed and is ready for a pull request.",{label:"View PR",onClick:()=>window.open(a.prUrl,"_blank")}):n&&o("error","Failed to publish changes",n),a},[i,n]),isPublishing:t,error:n,clearError:()=>r(null)}};function Qe(t,e,{checkForDefaultPrevented:n=!0}={}){return function(i){if(t==null||t(i),n===!1||!i.defaultPrevented)return e==null?void 0:e(i)}}function Lm(t,e){if(typeof t=="function")return t(e);t!=null&&(t.current=e)}function u1(...t){return e=>{let n=!1;const r=t.map(i=>{const s=Lm(i,e);return!n&&typeof s=="function"&&(n=!0),s});if(n)return()=>{for(let i=0;i<r.length;i++){const s=r[i];typeof s=="function"?s():Lm(t[i],null)}}}}function kn(...t){return x.useCallback(u1(...t),t)}function Ml(t,e=[]){let n=[];function r(s,o){const a=x.createContext(o),l=n.length;n=[...n,o];const u=d=>{var p;const{scope:f,children:h,...y}=d,m=((p=f==null?void 0:f[t])==null?void 0:p[l])||a,_=x.useMemo(()=>y,Object.values(y));return k.jsx(m.Provider,{value:_,children:h})};u.displayName=s+"Provider";function c(d,f){var m;const h=((m=f==null?void 0:f[t])==null?void 0:m[l])||a,y=x.useContext(h);if(y)return y;if(o!==void 0)return o;throw new Error(`\`${d}\` must be used within \`${s}\``)}return[u,c]}const i=()=>{const s=n.map(o=>x.createContext(o));return function(a){const l=(a==null?void 0:a[t])||s;return x.useMemo(()=>({[`__scope${t}`]:{...a,[t]:l}}),[a,l])}};return i.scopeName=t,[r,wR(i,...e)]}function wR(...t){const e=t[0];if(t.length===1)return e;const n=()=>{const r=t.map(i=>({useScope:i(),scopeName:i.scopeName}));return function(s){const o=r.reduce((a,{useScope:l,scopeName:u})=>{const d=l(s)[`__scope${u}`];return{...a,...d}},{});return x.useMemo(()=>({[`__scope${e.scopeName}`]:o}),[o])}};return n.scopeName=e.scopeName,n}function _d(t){const e=xR(t),n=x.forwardRef((r,i)=>{const{children:s,...o}=r,a=x.Children.toArray(s),l=a.find(ER);if(l){const u=l.props.children,c=a.map(d=>d===l?x.Children.count(u)>1?x.Children.only(null):x.isValidElement(u)?u.props.children:null:d);return k.jsx(e,{...o,ref:i,children:x.isValidElement(u)?x.cloneElement(u,void 0,c):null})}return k.jsx(e,{...o,ref:i,children:s})});return n.displayName=`${t}.Slot`,n}function xR(t){const e=x.forwardRef((n,r)=>{const{children:i,...s}=n;if(x.isValidElement(i)){const o=CR(i),a=kR(s,i.props);return i.type!==x.Fragment&&(a.ref=r?u1(r,o):o),x.cloneElement(i,a)}return x.Children.count(i)>1?x.Children.only(null):null});return e.displayName=`${t}.SlotClone`,e}var SR=Symbol("radix.slottable");function ER(t){return x.isValidElement(t)&&typeof t.type=="function"&&"__radixId"in t.type&&t.type.__radixId===SR}function kR(t,e){const n={...e};for(const r in e){const i=t[r],s=e[r];/^on[A-Z]/.test(r)?i&&s?n[r]=(...a)=>{const l=s(...a);return i(...a),l}:i&&(n[r]=i):r==="style"?n[r]={...i,...s}:r==="className"&&(n[r]=[i,s].filter(Boolean).join(" "))}return{...t,...n}}function CR(t){var r,i;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=(i=Object.getOwnPropertyDescriptor(t,"ref"))==null?void 0:i.get,n=e&&"isReactWarning"in e&&e.isReactWarning,n?t.props.ref:t.props.ref||t.ref)}function c1(t){const e=t+"CollectionProvider",[n,r]=Ml(e),[i,s]=n(e,{collectionRef:{current:null},itemMap:new Map}),o=m=>{const{scope:_,children:p}=m,g=ee.useRef(null),v=ee.useRef(new Map).current;return k.jsx(i,{scope:_,itemMap:v,collectionRef:g,children:p})};o.displayName=e;const a=t+"CollectionSlot",l=_d(a),u=ee.forwardRef((m,_)=>{const{scope:p,children:g}=m,v=s(a,p),w=kn(_,v.collectionRef);return k.jsx(l,{ref:w,children:g})});u.displayName=a;const c=t+"CollectionItemSlot",d="data-radix-collection-item",f=_d(c),h=ee.forwardRef((m,_)=>{const{scope:p,children:g,...v}=m,w=ee.useRef(null),E=kn(_,w),P=s(c,p);return ee.useEffect(()=>(P.itemMap.set(w,{ref:w,...v}),()=>void P.itemMap.delete(w))),k.jsx(f,{[d]:"",ref:E,children:g})});h.displayName=c;function y(m){const _=s(t+"CollectionConsumer",m);return ee.useCallback(()=>{const g=_.collectionRef.current;if(!g)return[];const v=Array.from(g.querySelectorAll(`[${d}]`));return Array.from(_.itemMap.values()).sort((P,C)=>v.indexOf(P.ref.current)-v.indexOf(C.ref.current))},[_.collectionRef,_.itemMap])}return[{Provider:o,Slot:u,ItemSlot:h},y,r]}var bR=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],nt=bR.reduce((t,e)=>{const n=_d(`Primitive.${e}`),r=x.forwardRef((i,s)=>{const{asChild:o,...a}=i,l=o?n:e;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),k.jsx(l,{...a,ref:s})});return r.displayName=`Primitive.${e}`,{...t,[e]:r}},{});function d1(t,e){t&&bl.flushSync(()=>t.dispatchEvent(e))}function Ar(t){const e=x.useRef(t);return x.useEffect(()=>{e.current=t}),x.useMemo(()=>(...n)=>{var r;return(r=e.current)==null?void 0:r.call(e,...n)},[])}function PR(t,e=globalThis==null?void 0:globalThis.document){const n=Ar(t);x.useEffect(()=>{const r=i=>{i.key==="Escape"&&n(i)};return e.addEventListener("keydown",r,{capture:!0}),()=>e.removeEventListener("keydown",r,{capture:!0})},[n,e])}var TR="DismissableLayer",wd="dismissableLayer.update",AR="dismissableLayer.pointerDownOutside",RR="dismissableLayer.focusOutside",Dm,f1=x.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),h1=x.forwardRef((t,e)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:i,onFocusOutside:s,onInteractOutside:o,onDismiss:a,...l}=t,u=x.useContext(f1),[c,d]=x.useState(null),f=(c==null?void 0:c.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,h]=x.useState({}),y=kn(e,C=>d(C)),m=Array.from(u.layers),[_]=[...u.layersWithOutsidePointerEventsDisabled].slice(-1),p=m.indexOf(_),g=c?m.indexOf(c):-1,v=u.layersWithOutsidePointerEventsDisabled.size>0,w=g>=p,E=IR(C=>{const S=C.target,A=[...u.branches].some(M=>M.contains(S));!w||A||(i==null||i(C),o==null||o(C),C.defaultPrevented||a==null||a())},f),P=NR(C=>{const S=C.target;[...u.branches].some(M=>M.contains(S))||(s==null||s(C),o==null||o(C),C.defaultPrevented||a==null||a())},f);return PR(C=>{g===u.layers.size-1&&(r==null||r(C),!C.defaultPrevented&&a&&(C.preventDefault(),a()))},f),x.useEffect(()=>{if(c)return n&&(u.layersWithOutsidePointerEventsDisabled.size===0&&(Dm=f.body.style.pointerEvents,f.body.style.pointerEvents="none"),u.layersWithOutsidePointerEventsDisabled.add(c)),u.layers.add(c),$m(),()=>{n&&u.layersWithOutsidePointerEventsDisabled.size===1&&(f.body.style.pointerEvents=Dm)}},[c,f,n,u]),x.useEffect(()=>()=>{c&&(u.layers.delete(c),u.layersWithOutsidePointerEventsDisabled.delete(c),$m())},[c,u]),x.useEffect(()=>{const C=()=>h({});return document.addEventListener(wd,C),()=>document.removeEventListener(wd,C)},[]),k.jsx(nt.div,{...l,ref:y,style:{pointerEvents:v?w?"auto":"none":void 0,...t.style},onFocusCapture:Qe(t.onFocusCapture,P.onFocusCapture),onBlurCapture:Qe(t.onBlurCapture,P.onBlurCapture),onPointerDownCapture:Qe(t.onPointerDownCapture,E.onPointerDownCapture)})});h1.displayName=TR;var MR="DismissableLayerBranch",p1=x.forwardRef((t,e)=>{const n=x.useContext(f1),r=x.useRef(null),i=kn(e,r);return x.useEffect(()=>{const s=r.current;if(s)return n.branches.add(s),()=>{n.branches.delete(s)}},[n.branches]),k.jsx(nt.div,{...t,ref:i})});p1.displayName=MR;function IR(t,e=globalThis==null?void 0:globalThis.document){const n=Ar(t),r=x.useRef(!1),i=x.useRef(()=>{});return x.useEffect(()=>{const s=a=>{if(a.target&&!r.current){let l=function(){g1(AR,n,u,{discrete:!0})};const u={originalEvent:a};a.pointerType==="touch"?(e.removeEventListener("click",i.current),i.current=l,e.addEventListener("click",i.current,{once:!0})):l()}else e.removeEventListener("click",i.current);r.current=!1},o=window.setTimeout(()=>{e.addEventListener("pointerdown",s)},0);return()=>{window.clearTimeout(o),e.removeEventListener("pointerdown",s),e.removeEventListener("click",i.current)}},[e,n]),{onPointerDownCapture:()=>r.current=!0}}function NR(t,e=globalThis==null?void 0:globalThis.document){const n=Ar(t),r=x.useRef(!1);return x.useEffect(()=>{const i=s=>{s.target&&!r.current&&g1(RR,n,{originalEvent:s},{discrete:!1})};return e.addEventListener("focusin",i),()=>e.removeEventListener("focusin",i)},[e,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function $m(){const t=new CustomEvent(wd);document.dispatchEvent(t)}function g1(t,e,n,{discrete:r}){const i=n.originalEvent.target,s=new CustomEvent(t,{bubbles:!1,cancelable:!0,detail:n});e&&i.addEventListener(t,e,{once:!0}),r?d1(i,s):i.dispatchEvent(s)}var OR=h1,LR=p1,Rr=globalThis!=null&&globalThis.document?x.useLayoutEffect:()=>{},DR="Portal",m1=x.forwardRef((t,e)=>{var a;const{container:n,...r}=t,[i,s]=x.useState(!1);Rr(()=>s(!0),[]);const o=n||i&&((a=globalThis==null?void 0:globalThis.document)==null?void 0:a.body);return o?zk.createPortal(k.jsx(nt.div,{...r,ref:e}),o):null});m1.displayName=DR;function $R(t,e){return x.useReducer((n,r)=>e[n][r]??n,t)}var Nh=t=>{const{present:e,children:n}=t,r=FR(e),i=typeof n=="function"?n({present:r.isPresent}):x.Children.only(n),s=kn(r.ref,jR(i));return typeof n=="function"||r.isPresent?x.cloneElement(i,{ref:s}):null};Nh.displayName="Presence";function FR(t){const[e,n]=x.useState(),r=x.useRef(null),i=x.useRef(t),s=x.useRef("none"),o=t?"mounted":"unmounted",[a,l]=$R(o,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return x.useEffect(()=>{const u=$o(r.current);s.current=a==="mounted"?u:"none"},[a]),Rr(()=>{const u=r.current,c=i.current;if(c!==t){const f=s.current,h=$o(u);t?l("MOUNT"):h==="none"||(u==null?void 0:u.display)==="none"?l("UNMOUNT"):l(c&&f!==h?"ANIMATION_OUT":"UNMOUNT"),i.current=t}},[t,l]),Rr(()=>{if(e){let u;const c=e.ownerDocument.defaultView??window,d=h=>{const m=$o(r.current).includes(CSS.escape(h.animationName));if(h.target===e&&m&&(l("ANIMATION_END"),!i.current)){const _=e.style.animationFillMode;e.style.animationFillMode="forwards",u=c.setTimeout(()=>{e.style.animationFillMode==="forwards"&&(e.style.animationFillMode=_)})}},f=h=>{h.target===e&&(s.current=$o(r.current))};return e.addEventListener("animationstart",f),e.addEventListener("animationcancel",d),e.addEventListener("animationend",d),()=>{c.clearTimeout(u),e.removeEventListener("animationstart",f),e.removeEventListener("animationcancel",d),e.removeEventListener("animationend",d)}}else l("ANIMATION_END")},[e,l]),{isPresent:["mounted","unmountSuspended"].includes(a),ref:x.useCallback(u=>{r.current=u?getComputedStyle(u):null,n(u)},[])}}function $o(t){return(t==null?void 0:t.animationName)||"none"}function jR(t){var r,i;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=(i=Object.getOwnPropertyDescriptor(t,"ref"))==null?void 0:i.get,n=e&&"isReactWarning"in e&&e.isReactWarning,n?t.props.ref:t.props.ref||t.ref)}var VR=hy[" useInsertionEffect ".trim().toString()]||Rr;function Il({prop:t,defaultProp:e,onChange:n=()=>{},caller:r}){const[i,s,o]=BR({defaultProp:e,onChange:n}),a=t!==void 0,l=a?t:i;{const c=x.useRef(t!==void 0);x.useEffect(()=>{const d=c.current;d!==a&&console.warn(`${r} is changing from ${d?"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.`),c.current=a},[a,r])}const u=x.useCallback(c=>{var d;if(a){const f=zR(c)?c(t):c;f!==t&&((d=o.current)==null||d.call(o,f))}else s(c)},[a,t,s,o]);return[l,u]}function BR({defaultProp:t,onChange:e}){const[n,r]=x.useState(t),i=x.useRef(n),s=x.useRef(e);return VR(()=>{s.current=e},[e]),x.useEffect(()=>{var o;i.current!==n&&((o=s.current)==null||o.call(s,n),i.current=n)},[n,i]),[n,r,s]}function zR(t){return typeof t=="function"}var UR=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"}),HR="VisuallyHidden",Oh=x.forwardRef((t,e)=>k.jsx(nt.span,{...t,ref:e,style:{...UR,...t.style}}));Oh.displayName=HR;var Lh="ToastProvider",[Dh,WR,KR]=c1("Toast"),[v1]=Ml("Toast",[KR]),[GR,Nl]=v1(Lh),y1=t=>{const{__scopeToast:e,label:n="Notification",duration:r=5e3,swipeDirection:i="right",swipeThreshold:s=50,children:o}=t,[a,l]=x.useState(null),[u,c]=x.useState(0),d=x.useRef(!1),f=x.useRef(!1);return n.trim()||console.error(`Invalid prop \`label\` supplied to \`${Lh}\`. Expected non-empty \`string\`.`),k.jsx(Dh.Provider,{scope:e,children:k.jsx(GR,{scope:e,label:n,duration:r,swipeDirection:i,swipeThreshold:s,toastCount:u,viewport:a,onViewportChange:l,onToastAdd:x.useCallback(()=>c(h=>h+1),[]),onToastRemove:x.useCallback(()=>c(h=>h-1),[]),isFocusedToastEscapeKeyDownRef:d,isClosePausedRef:f,children:o})})};y1.displayName=Lh;var _1="ToastViewport",qR=["F8"],xd="toast.viewportPause",Sd="toast.viewportResume",w1=x.forwardRef((t,e)=>{const{__scopeToast:n,hotkey:r=qR,label:i="Notifications ({hotkey})",...s}=t,o=Nl(_1,n),a=WR(n),l=x.useRef(null),u=x.useRef(null),c=x.useRef(null),d=x.useRef(null),f=kn(e,d,o.onViewportChange),h=r.join("+").replace(/Key/g,"").replace(/Digit/g,""),y=o.toastCount>0;x.useEffect(()=>{const _=p=>{var v;r.length!==0&&r.every(w=>p[w]||p.code===w)&&((v=d.current)==null||v.focus())};return document.addEventListener("keydown",_),()=>document.removeEventListener("keydown",_)},[r]),x.useEffect(()=>{const _=l.current,p=d.current;if(y&&_&&p){const g=()=>{if(!o.isClosePausedRef.current){const P=new CustomEvent(xd);p.dispatchEvent(P),o.isClosePausedRef.current=!0}},v=()=>{if(o.isClosePausedRef.current){const P=new CustomEvent(Sd);p.dispatchEvent(P),o.isClosePausedRef.current=!1}},w=P=>{!_.contains(P.relatedTarget)&&v()},E=()=>{_.contains(document.activeElement)||v()};return _.addEventListener("focusin",g),_.addEventListener("focusout",w),_.addEventListener("pointermove",g),_.addEventListener("pointerleave",E),window.addEventListener("blur",g),window.addEventListener("focus",v),()=>{_.removeEventListener("focusin",g),_.removeEventListener("focusout",w),_.removeEventListener("pointermove",g),_.removeEventListener("pointerleave",E),window.removeEventListener("blur",g),window.removeEventListener("focus",v)}}},[y,o.isClosePausedRef]);const m=x.useCallback(({tabbingDirection:_})=>{const g=a().map(v=>{const w=v.ref.current,E=[w,...aM(w)];return _==="forwards"?E:E.reverse()});return(_==="forwards"?g.reverse():g).flat()},[a]);return x.useEffect(()=>{const _=d.current;if(_){const p=g=>{var E,P,C;const v=g.altKey||g.ctrlKey||g.metaKey;if(g.key==="Tab"&&!v){const S=document.activeElement,A=g.shiftKey;if(g.target===_&&A){(E=u.current)==null||E.focus();return}const T=m({tabbingDirection:A?"backwards":"forwards"}),D=T.findIndex(I=>I===S);Du(T.slice(D+1))?g.preventDefault():A?(P=u.current)==null||P.focus():(C=c.current)==null||C.focus()}};return _.addEventListener("keydown",p),()=>_.removeEventListener("keydown",p)}},[a,m]),k.jsxs(LR,{ref:l,role:"region","aria-label":i.replace("{hotkey}",h),tabIndex:-1,style:{pointerEvents:y?void 0:"none"},children:[y&&k.jsx(Ed,{ref:u,onFocusFromOutsideViewport:()=>{const _=m({tabbingDirection:"forwards"});Du(_)}}),k.jsx(Dh.Slot,{scope:n,children:k.jsx(nt.ol,{tabIndex:-1,...s,ref:f})}),y&&k.jsx(Ed,{ref:c,onFocusFromOutsideViewport:()=>{const _=m({tabbingDirection:"backwards"});Du(_)}})]})});w1.displayName=_1;var x1="ToastFocusProxy",Ed=x.forwardRef((t,e)=>{const{__scopeToast:n,onFocusFromOutsideViewport:r,...i}=t,s=Nl(x1,n);return k.jsx(Oh,{tabIndex:0,...i,ref:e,style:{position:"fixed"},onFocus:o=>{var u;const a=o.relatedTarget;!((u=s.viewport)!=null&&u.contains(a))&&r()}})});Ed.displayName=x1;var mo="Toast",YR="toast.swipeStart",XR="toast.swipeMove",QR="toast.swipeCancel",ZR="toast.swipeEnd",S1=x.forwardRef((t,e)=>{const{forceMount:n,open:r,defaultOpen:i,onOpenChange:s,...o}=t,[a,l]=Il({prop:r,defaultProp:i??!0,onChange:s,caller:mo});return k.jsx(Nh,{present:n||a,children:k.jsx(tM,{open:a,...o,ref:e,onClose:()=>l(!1),onPause:Ar(t.onPause),onResume:Ar(t.onResume),onSwipeStart:Qe(t.onSwipeStart,u=>{u.currentTarget.setAttribute("data-swipe","start")}),onSwipeMove:Qe(t.onSwipeMove,u=>{const{x:c,y:d}=u.detail.delta;u.currentTarget.setAttribute("data-swipe","move"),u.currentTarget.style.setProperty("--radix-toast-swipe-move-x",`${c}px`),u.currentTarget.style.setProperty("--radix-toast-swipe-move-y",`${d}px`)}),onSwipeCancel:Qe(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:Qe(t.onSwipeEnd,u=>{const{x:c,y:d}=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",`${c}px`),u.currentTarget.style.setProperty("--radix-toast-swipe-end-y",`${d}px`),l(!1)})})})});S1.displayName=mo;var[JR,eM]=v1(mo,{onClose(){}}),tM=x.forwardRef((t,e)=>{const{__scopeToast:n,type:r="foreground",duration:i,open:s,onClose:o,onEscapeKeyDown:a,onPause:l,onResume:u,onSwipeStart:c,onSwipeMove:d,onSwipeCancel:f,onSwipeEnd:h,...y}=t,m=Nl(mo,n),[_,p]=x.useState(null),g=kn(e,I=>p(I)),v=x.useRef(null),w=x.useRef(null),E=i||m.duration,P=x.useRef(0),C=x.useRef(E),S=x.useRef(0),{onToastAdd:A,onToastRemove:M}=m,O=Ar(()=>{var U;(_==null?void 0:_.contains(document.activeElement))&&((U=m.viewport)==null||U.focus()),o()}),T=x.useCallback(I=>{!I||I===1/0||(window.clearTimeout(S.current),P.current=new Date().getTime(),S.current=window.setTimeout(O,I))},[O]);x.useEffect(()=>{const I=m.viewport;if(I){const U=()=>{T(C.current),u==null||u()},Y=()=>{const G=new Date().getTime()-P.current;C.current=C.current-G,window.clearTimeout(S.current),l==null||l()};return I.addEventListener(xd,Y),I.addEventListener(Sd,U),()=>{I.removeEventListener(xd,Y),I.removeEventListener(Sd,U)}}},[m.viewport,E,l,u,T]),x.useEffect(()=>{s&&!m.isClosePausedRef.current&&T(E)},[s,E,m.isClosePausedRef,T]),x.useEffect(()=>(A(),()=>M()),[A,M]);const D=x.useMemo(()=>_?A1(_):null,[_]);return m.viewport?k.jsxs(k.Fragment,{children:[D&&k.jsx(nM,{__scopeToast:n,role:"status","aria-live":r==="foreground"?"assertive":"polite",children:D}),k.jsx(JR,{scope:n,onClose:O,children:bl.createPortal(k.jsx(Dh.ItemSlot,{scope:n,children:k.jsx(OR,{asChild:!0,onEscapeKeyDown:Qe(a,()=>{m.isFocusedToastEscapeKeyDownRef.current||O(),m.isFocusedToastEscapeKeyDownRef.current=!1}),children:k.jsx(nt.li,{tabIndex:0,"data-state":s?"open":"closed","data-swipe-direction":m.swipeDirection,...y,ref:g,style:{userSelect:"none",touchAction:"none",...t.style},onKeyDown:Qe(t.onKeyDown,I=>{I.key==="Escape"&&(a==null||a(I.nativeEvent),I.nativeEvent.defaultPrevented||(m.isFocusedToastEscapeKeyDownRef.current=!0,O()))}),onPointerDown:Qe(t.onPointerDown,I=>{I.button===0&&(v.current={x:I.clientX,y:I.clientY})}),onPointerMove:Qe(t.onPointerMove,I=>{if(!v.current)return;const U=I.clientX-v.current.x,Y=I.clientY-v.current.y,G=!!w.current,R=["left","right"].includes(m.swipeDirection),$=["left","up"].includes(m.swipeDirection)?Math.min:Math.max,j=R?$(0,U):0,q=R?0:$(0,Y),W=I.pointerType==="touch"?10:2,ve={x:j,y:q},ue={originalEvent:I,delta:ve};G?(w.current=ve,Fo(XR,d,ue,{discrete:!1})):Fm(ve,m.swipeDirection,W)?(w.current=ve,Fo(YR,c,ue,{discrete:!1}),I.target.setPointerCapture(I.pointerId)):(Math.abs(U)>W||Math.abs(Y)>W)&&(v.current=null)}),onPointerUp:Qe(t.onPointerUp,I=>{const U=w.current,Y=I.target;if(Y.hasPointerCapture(I.pointerId)&&Y.releasePointerCapture(I.pointerId),w.current=null,v.current=null,U){const G=I.currentTarget,R={originalEvent:I,delta:U};Fm(U,m.swipeDirection,m.swipeThreshold)?Fo(ZR,h,R,{discrete:!0}):Fo(QR,f,R,{discrete:!0}),G.addEventListener("click",$=>$.preventDefault(),{once:!0})}})})})}),m.viewport)})]}):null}),nM=t=>{const{__scopeToast:e,children:n,...r}=t,i=Nl(mo,e),[s,o]=x.useState(!1),[a,l]=x.useState(!1);return sM(()=>o(!0)),x.useEffect(()=>{const u=window.setTimeout(()=>l(!0),1e3);return()=>window.clearTimeout(u)},[]),a?null:k.jsx(m1,{asChild:!0,children:k.jsx(Oh,{...r,children:s&&k.jsxs(k.Fragment,{children:[i.label," ",n]})})})},rM="ToastTitle",E1=x.forwardRef((t,e)=>{const{__scopeToast:n,...r}=t;return k.jsx(nt.div,{...r,ref:e})});E1.displayName=rM;var iM="ToastDescription",k1=x.forwardRef((t,e)=>{const{__scopeToast:n,...r}=t;return k.jsx(nt.div,{...r,ref:e})});k1.displayName=iM;var C1="ToastAction",b1=x.forwardRef((t,e)=>{const{altText:n,...r}=t;return n.trim()?k.jsx(T1,{altText:n,asChild:!0,children:k.jsx($h,{...r,ref:e})}):(console.error(`Invalid prop \`altText\` supplied to \`${C1}\`. Expected non-empty \`string\`.`),null)});b1.displayName=C1;var P1="ToastClose",$h=x.forwardRef((t,e)=>{const{__scopeToast:n,...r}=t,i=eM(P1,n);return k.jsx(T1,{asChild:!0,children:k.jsx(nt.button,{type:"button",...r,ref:e,onClick:Qe(t.onClick,i.onClose)})})});$h.displayName=P1;var T1=x.forwardRef((t,e)=>{const{__scopeToast:n,altText:r,...i}=t;return k.jsx(nt.div,{"data-radix-toast-announce-exclude":"","data-radix-toast-announce-alt":r||void 0,...i,ref:e})});function A1(t){const e=[];return Array.from(t.childNodes).forEach(r=>{if(r.nodeType===r.TEXT_NODE&&r.textContent&&e.push(r.textContent),oM(r)){const i=r.ariaHidden||r.hidden||r.style.display==="none",s=r.dataset.radixToastAnnounceExclude==="";if(!i)if(s){const o=r.dataset.radixToastAnnounceAlt;o&&e.push(o)}else e.push(...A1(r))}}),e}function Fo(t,e,n,{discrete:r}){const i=n.originalEvent.currentTarget,s=new CustomEvent(t,{bubbles:!0,cancelable:!0,detail:n});e&&i.addEventListener(t,e,{once:!0}),r?d1(i,s):i.dispatchEvent(s)}var Fm=(t,e,n=0)=>{const r=Math.abs(t.x),i=Math.abs(t.y),s=r>i;return e==="left"||e==="right"?s&&r>n:!s&&i>n};function sM(t=()=>{}){const e=Ar(t);Rr(()=>{let n=0,r=0;return n=window.requestAnimationFrame(()=>r=window.requestAnimationFrame(e)),()=>{window.cancelAnimationFrame(n),window.cancelAnimationFrame(r)}},[e])}function oM(t){return t.nodeType===t.ELEMENT_NODE}function aM(t){const e=[],n=document.createTreeWalker(t,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const i=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||i?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)e.push(n.currentNode);return e}function Du(t){const e=document.activeElement;return t.some(n=>n===e?!0:(n.focus(),document.activeElement!==e))}var lM=y1,uM=w1,cM=S1,dM=E1,fM=k1,hM=b1,pM=$h;const R1=({isOpen:t,onOpenChange:e,type:n,title:r,description:i,action:s})=>{const o=()=>{switch(n){case"success":return{Icon:eR,bgColor:"bg-accent-success/90",borderColor:"border-accent-success",textColor:"text-content",iconColor:"text-content",actionStyles:"border-white hover:bg-white/10 hover:border-white text-content"};case"error":return{Icon:Om,bgColor:"bg-accent-error/90",borderColor:"border-accent-error",textColor:"text-content",iconColor:"text-content",actionStyles:"border-white hover:bg-white/10 hover:border-white text-content"};default:return{Icon:Om,bgColor:"bg-content-muted/90",borderColor:"border-divider",textColor:"text-content",iconColor:"text-content-subtle",actionStyles:"border-divider hover:bg-content-muted/10 hover:border-divider"}}},{Icon:a,bgColor:l,borderColor:u,textColor:c,iconColor:d,actionStyles:f}=o();return k.jsxs(cM,{className:`${l} ${u} ${c} data-[state=open]:animate-slideIn data-[state=closed]:animate-hide data-[swipe=end]:animate-swipeOut grid grid-cols-[auto_1fr_auto] items-start gap-3 rounded-lg border p-4 shadow-lg data-[swipe=cancel]:translate-x-0 data-[swipe=move]:translate-x-[var(--radix-toast-swipe-move-x)]`,open:t,onOpenChange:e,duration:9e3,children:[k.jsx(a,{className:`${d} mt-0.5 h-5 w-5`}),k.jsxs("div",{className:"flex flex-col gap-2",children:[k.jsxs("div",{className:"flex flex-col gap-1",children:[k.jsx(dM,{className:"text-sm font-semibold",children:r}),i&&k.jsx(fM,{className:"text-sm",children:i})]}),s&&k.jsx(hM,{className:`rounded border px-3 py-1.5 text-xs font-medium transition-colors ${f} self-start`,altText:s.label,onClick:s.onClick,children:s.label})]}),k.jsx(pM,{className:"rounded p-1 transition-colors hover:bg-black/10",children:k.jsx(gR,{className:"h-4 w-4"})})]})},M1=({children:t})=>k.jsxs(lM,{swipeDirection:"right",children:[t,k.jsx(uM,{className:"z-ui-primary fixed bottom-0 right-0 m-0 flex w-96 max-w-[100vw] list-none flex-col gap-3 p-6 outline-none"})]}),$u=({onClick:t,isActive:e=!1,isDisabled:n=!1,title:r,children:i,className:s=""})=>{const o="p-2 rounded-md transition-colors",a=e?"bg-primary/20 text-primary":"text-content hover:bg-main-input",l=n?"opacity-50 cursor-not-allowed":"";return k.jsx("button",{onClick:t,disabled:n,className:`${o} ${a} ${l} ${s}`,title:r,children:i})},gM=({mode:t,onModeChange:e,isLoading:n=!1})=>{const{publishChanges:r,isPublishing:i}=_R(),[s,o]=x.useState({isOpen:!1,type:"success",title:"",onOpenChange:()=>{},description:void 0,action:void 0}),a=(l,u,c,d)=>{o({isOpen:!0,type:l,title:u,description:c,action:d,onOpenChange:f=>o(h=>({...h,isOpen:f}))})};return k.jsxs(M1,{children:[k.jsx(Gw.div,{className:"z-ui-primary absolute bottom-6 left-1/2 -translate-x-1/2 transform",initial:{y:100,opacity:0},animate:{y:n?100:0,opacity:n?0:1},transition:{duration:.6,ease:"easeOut",delay:n?0:.3},children:k.jsxs("div",{className:"bg-main border-primary/30 flex items-center space-x-1 rounded-lg border p-2 shadow-lg",children:[k.jsx($u,{onClick:()=>e(!1),isActive:t==="view",title:"View Mode",children:k.jsx(nR,{className:"h-5 w-5"})}),k.jsx($u,{onClick:()=>e(!0),isActive:t==="edit",title:"Edit Mode - Drag to select elements",children:k.jsx(aR,{className:"h-5 w-5"})}),k.jsx($u,{onClick:()=>r(a),isDisabled:i,title:i?"Publishing changes...":"Publish changes & create PR",children:i?k.jsx("div",{className:"h-5 w-5 animate-spin",children:k.jsxs("svg",{className:"h-5 w-5",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",children:[k.jsx("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),k.jsx("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"})]})}):k.jsx(hR,{className:"h-5 w-5"})})]})}),k.jsx(R1,{isOpen:s.isOpen,onOpenChange:s.onOpenChange,type:s.type,title:s.title,description:s.description,action:s.action})]})},I1=t=>{var e;try{return t.contentDocument||((e=t.contentWindow)==null?void 0:e.document)}catch(n){return console.error("[IframeDom] Cannot access iframe document:",n),null}},jm=(t,e,n)=>{const r=I1(t);if(!r)return null;const i=t.getBoundingClientRect(),s=e-i.left,o=n-i.top;return r.elementFromPoint(s,o)},mM=t=>Object.fromEntries(Array.from(t).map(e=>[e,t.getPropertyValue(e)])),N1=t=>{var r,i;if(t.id)return`//*[@id="${t.id}"]`;if(t===((r=t.ownerDocument)==null?void 0:r.body))return"/html/body";let e=0;const n=((i=t.parentNode)==null?void 0:i.childNodes)||[];for(let s=0;s<n.length;s++){const o=n[s];if(o===t){const a=t.parentNode;if(a)return N1(a)+"/"+t.tagName.toLowerCase()+"["+(e+1)+"]"}o.nodeType===1&&o.tagName===t.tagName&&e++}return""},Vm=t=>{var o,a,l;const e=t.getBoundingClientRect(),n=(o=t.ownerDocument)==null?void 0:o.defaultView,r=n==null?void 0:n.getComputedStyle(t);let i="";try{const u=t;"className"in u&&(typeof u.className=="string"?i=u.className:u.className&&typeof u.className=="object"&&"baseVal"in u.className&&(i=u.className.baseVal||""))}catch(u){i="",console.warn("[IframeDom] Error getting className:",u)}let s="";try{s=t.id||""}catch(u){s="",console.warn("[IframeDom] Error getting id:",u)}return{tagName:t.tagName.toLowerCase(),className:i,id:s,textContent:((a=t.textContent)==null?void 0:a.trim().substring(0,100))||"",innerHTML:((l=t.innerHTML)==null?void 0:l.substring(0,200))||"",attributes:Array.from(t.attributes).reduce((u,c)=>(u[c.name]=c.value,u),{}),computedStyles:r?mM(r):{},boundingRect:{x:e.x,y:e.y,width:e.width,height:e.height,top:e.top,left:e.left,right:e.right,bottom:e.bottom},xpath:N1(t),filePath:null}},Ol=n1(null),O1=n1(null),Bm=t=>{const e=getComputedStyle(t);return{content:t.getBoundingClientRect(),padding:{top:parseFloat(e.paddingTop),right:parseFloat(e.paddingRight),bottom:parseFloat(e.paddingBottom),left:parseFloat(e.paddingLeft)},border:{top:parseFloat(e.borderTopWidth),right:parseFloat(e.borderRightWidth),bottom:parseFloat(e.borderBottomWidth),left:parseFloat(e.borderLeftWidth)},margin:{top:parseFloat(e.marginTop),right:parseFloat(e.marginRight),bottom:parseFloat(e.marginBottom),left:parseFloat(e.marginLeft)}}},zm=(t,e)=>({top:t.top+e.top,left:t.left+e.left,width:t.width-e.left-e.right,height:t.height-e.top-e.bottom}),Um=(t,e)=>({top:t.top-e.top,left:t.left-e.left,width:t.width+e.left+e.right,height:t.height+e.top+e.bottom}),vM=t=>{const{padding:e,border:n,margin:r}=t;return e.top>0||e.right>0||e.bottom>0||e.left>0||n.top>0||n.right>0||n.bottom>0||n.left>0||r.top>0||r.right>0||r.bottom>0||r.left>0},Ll={theme:{extend:{zIndex:{"capture-overlay":"35","selection-overlay":"34","hover-overlay":"30","element-overlay":"25"},colors:{primary:{DEFAULT:"#f97316",hover:"#ea580c",border:"#ff6b35"},yellow:{DEFAULT:"#FFC857"},green:{DEFAULT:"#3E4128"},accent:{success:"#10b981"}}}}},yM=Ll.theme.extend.zIndex,Fu=Ll.theme.extend.colors,_M=({iframeRef:t})=>{const e=x.useRef(new Map),n=x.useCallback((l,u)=>{const c=document.createElement("div");c.id=`rivet-box-model-${u}-${Math.random().toString(36).substr(2,9)}`,c.__element=l,c.__type=u;const d=`
|
|
116
|
+
position: fixed;
|
|
117
|
+
pointer-events: none;
|
|
118
|
+
z-index: ${yM["element-overlay"]};
|
|
119
|
+
box-sizing: border-box;
|
|
120
|
+
`;let f="";switch(u){case"margin":f=`
|
|
121
|
+
background-color: rgb(from ${Fu.yellow.DEFAULT} r g b / 0.2);
|
|
122
|
+
`;break;case"border":f=`
|
|
123
|
+
background-color: rgb(from ${Fu.accent.success} r g b / 0.2);
|
|
124
|
+
`;break;case"padding":f=`
|
|
125
|
+
background-color: rgb(from ${Fu.green.DEFAULT} r g b / 0.2);
|
|
126
|
+
`;break}return c.style.cssText=d+f,c.style.display="none",document.body.appendChild(c),c},[]),r=x.useCallback((l,u)=>{const c=t.current;if(!c){console.log("[BoxModelVisualization] No iframe ref available for positioning");return}const d=c.getBoundingClientRect(),f=d.left+u.left,h=d.top+u.top,y=Math.max(0,u.width),m=Math.max(0,u.height);y>0&&m>0?(l.style.display="block",l.style.left=`${f}px`,l.style.top=`${h}px`,l.style.width=`${y}px`,l.style.height=`${m}px`):(console.log("[BoxModelVisualization] Hiding overlay due to zero dimensions:",{width:y,height:m}),l.style.display="none")},[t]),i=x.useCallback(l=>{const u=Bm(l);if(console.log("[BoxModelVisualization] Calculated box model:",u),!vM(u)){console.log("[BoxModelVisualization] Element has no meaningful box model properties to visualize");return}const c=[];if(console.log("[BoxModelVisualization] Element has box model properties, creating overlays..."),u.margin.top>0||u.margin.right>0||u.margin.bottom>0||u.margin.left>0){console.log("[BoxModelVisualization] Creating margin overlay:",u.margin);const d=Um(u.content,u.margin),f=n(l,"margin");r(f,d),c.push(f)}if(u.border.top>0||u.border.right>0||u.border.bottom>0||u.border.left>0){console.log("[BoxModelVisualization] Creating border overlay:",u.border);const d={top:u.content.top,left:u.content.left,width:u.content.width,height:u.content.height},f=n(l,"border");r(f,d),c.push(f)}if(u.padding.top>0||u.padding.right>0||u.padding.bottom>0||u.padding.left>0){console.log("[BoxModelVisualization] Creating padding overlay:",u.padding);const d=zm(u.content,u.border),f=n(l,"padding");r(f,d),c.push(f)}console.log(`[BoxModelVisualization] Created ${c.length} overlays for element, storing for cleanup`),e.current.set(l,c)},[n,r]),s=x.useCallback(l=>{console.log("[BoxModelVisualization] Hiding box model for element:",l.tagName);const u=e.current.get(l);u?(console.log(`[BoxModelVisualization] Removing ${u.length} overlays for element`),u.forEach(c=>c.remove()),e.current.delete(l)):console.log("[BoxModelVisualization] No overlays found for element to hide")},[]),o=x.useCallback(()=>{const l=Array.from(e.current.values()).reduce((u,c)=>u+c.length,0);console.log(`[BoxModelVisualization] Clearing all box models (${l} overlays total)`),e.current.forEach(u=>{u.forEach(c=>c.remove())}),e.current.clear()},[]),a=x.useCallback(()=>{e.current.forEach((l,u)=>{const c=Bm(u);l.forEach(d=>{const f=d.__type;if(!f)return;let h;switch(f){case"margin":h=Um(c.content,c.margin);break;case"border":h={top:c.content.top,left:c.content.left,width:c.content.width,height:c.content.height};break;case"padding":h=zm(c.content,c.border);break;default:return}r(d,h)})})},[r]);return{showBoxModel:i,hideBoxModel:s,clearAllBoxModels:o,repositionAllOverlays:a}},Fh=Ll.theme.extend.zIndex,kd=Ll.theme.extend.colors,wM=t=>{const e=t.tagName.toLowerCase();return!!(["path","g","circle","rect","line","polygon"].includes(e)||e==="i"&&t.className&&/\b(fa|icon|material)\b/.test(t.className))},xM=(t,e)=>{const r=t.map(s=>{const o=s.getBoundingClientRect(),l=o.width*o.height/e,u=s.tagName.toLowerCase();let c=l>=.2&&l<=3?100:20;return["button","a","input","select","textarea"].includes(u)&&(c+=50),(l<.05||l>10)&&(c-=50),{element:s,score:c,ratio:l}}).filter(s=>s.score>30).filter(s=>!wM(s.element)).sort((s,o)=>o.score-s.score),i=[];for(const s of r)i.some(a=>a.element.contains(s.element))||i.push(s);return console.log(`[IframeSelection] Multi-selection: ${i.length} elements selected`),i.slice(0,6).map(s=>s.element)},SM=()=>{let t=document.getElementById("rivet-hover-overlay");return t||(t=document.createElement("div"),t.id="rivet-hover-overlay",t.style.cssText=`
|
|
127
|
+
position: fixed;
|
|
128
|
+
pointer-events: none;
|
|
129
|
+
z-index: ${Fh["hover-overlay"]};
|
|
130
|
+
border: 3px solid ${kd.primary.border};
|
|
131
|
+
border-radius: 2px;
|
|
132
|
+
background-color: rgb(from ${kd.primary.hover} r g b / 0.2);
|
|
133
|
+
display: none;
|
|
134
|
+
`,document.body.appendChild(t)),t},EM=t=>{const e=`rivet-selection-${Math.random().toString(36).substr(2,9)}`,n=document.createElement("div");return n.id=e,n.style.cssText=`
|
|
135
|
+
position: fixed;
|
|
136
|
+
pointer-events: none;
|
|
137
|
+
z-index: ${Fh["selection-overlay"]};
|
|
138
|
+
border-radius: 2px;
|
|
139
|
+
background-color: rgb(from ${kd.primary.DEFAULT} r g b / 0.2);
|
|
140
|
+
box-shadow: box-shadow: 0 0 10px rgba(255, 107, 53, 0.7);
|
|
141
|
+
`,n.__element=t,document.body.appendChild(n),n},ju=(t,e,n,r)=>{const i=document.querySelector('[data-cy="element-inspector"]');if(!i)return!1;const s=i.getBoundingClientRect(),o=t+n,a=e+r;return!(o<=s.left||t>=s.right||a<=s.top||e>=s.bottom)},kM=t=>{let e=t.querySelector("#rivet-mouse-capture");return e||(e=document.createElement("div"),e.id="rivet-mouse-capture",e.style.cssText=`
|
|
142
|
+
position: absolute;
|
|
143
|
+
top: 0;
|
|
144
|
+
left: 0;
|
|
145
|
+
right: 0;
|
|
146
|
+
bottom: 0;
|
|
147
|
+
z-index: ${Fh["capture-overlay"]};
|
|
148
|
+
background: transparent;
|
|
149
|
+
pointer-events: none;
|
|
150
|
+
display: none;
|
|
151
|
+
`,t.appendChild(e)),e},CM=({mode:t,isBoxModelVisible:e=!1})=>{const n=x.useRef(null),r=Ga(Ol),i=Ga(O1),[s,o]=x.useState(null),[a,l]=x.useState(null),[u,c]=x.useState(null),d=_M({iframeRef:n}),f=x.useCallback(async T=>{var D;console.log("[IframeSelection] searchComponent called for element:",T.tagName);try{const I=await fetch("/api/search-components",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify([T])});return I.ok?((D=(await I.json()).elements)==null?void 0:D[0])||null:(console.error(`Component search failed: HTTP ${I.status}`),null)}catch(I){return console.error("Component search error:",I),null}},[]),h=x.useCallback(async T=>{const D=await f(T);r(D)},[f,r]),y=x.useCallback(()=>{r(null)},[r]),m=u!==null,_=t==="edit",p=x.useCallback(T=>{const D=n.current,I=SM();if(!T||!D){I.style.display="none";return}const U=D.getBoundingClientRect(),Y=T.getBoundingClientRect(),G=U.left+Y.left,R=U.top+Y.top,$=Y.width,j=Y.height;if(ju(G,R,$,j)){I.style.display="none";return}I.style.display="block",I.style.left=`${G}px`,I.style.top=`${R}px`,I.style.width=`${$}px`,I.style.height=`${j}px`},[]),g=x.useCallback(T=>{const D=n.current;if(D)if(a===T)l(null),document.querySelectorAll('[id^="rivet-selection-"]').forEach(U=>U.remove()),e&&d.hideBoxModel(T),i(null);else{a&&(document.querySelectorAll('[id^="rivet-selection-"]').forEach(q=>q.remove()),e&&d.hideBoxModel(a)),l(T);const I=D.getBoundingClientRect(),U=T.getBoundingClientRect(),Y=I.left+U.left,G=I.top+U.top,R=U.width,$=U.height;if(!ju(Y,G,R,$)){const j=EM(T);j.style.left=`${Y}px`,j.style.top=`${G}px`,j.style.width=`${R}px`,j.style.height=`${$}px`}e&&d.showBoxModel(T),i(T)}},[a,e,d,i]),v=x.useCallback(()=>{const T=document.getElementById("rivet-hover-overlay");T&&(T.style.display="none"),o(null)},[]),w=x.useCallback(()=>{document.querySelectorAll('[id^="rivet-selection-"]').forEach(D=>D.remove()),d.clearAllBoxModels(),i(null),l(null)},[d,i]),E=x.useCallback(T=>{if(console.log("[IframeSelection] Mouse move detected, editMode:",_,"boxSelection:",m),!_||!n.current||m)return;console.log("[IframeSelection] Mouse move in edit mode:",{x:T.clientX,y:T.clientY});const D=jm(n.current,T.clientX,T.clientY);if(!D){console.log("[IframeSelection] No element found at point");return}console.log("[IframeSelection] Element found:",D.tagName),D&&D!==s&&(o(D),p(D))},[_,s,p,m]),P=x.useCallback(T=>{if(!_||!n.current||m)return;T.preventDefault(),T.stopPropagation();const D=jm(n.current,T.clientX,T.clientY);if(D){console.log("[IframeSelection] Element clicked for selection toggle:",D.tagName);const I=Vm(D);a===D?(console.log("[IframeSelection] Removing element from selection"),y()):(console.log("[IframeSelection] Adding element to selection"),h(I)),g(D)}},[_,m,a,g,h,y]),C=x.useCallback(T=>{!_||!n.current||(T.preventDefault(),T.stopPropagation(),c({x:T.clientX,y:T.clientY}),v())},[_,v]),S=x.useCallback(T=>{if(!m||!u||!n.current)return;T.preventDefault(),T.stopPropagation();const D=n.current,I=D.getBoundingClientRect(),U={left:Math.min(u.x,T.clientX)-I.left,top:Math.min(u.y,T.clientY)-I.top,right:Math.max(u.x,T.clientX)-I.left,bottom:Math.max(u.y,T.clientY)-I.top},Y=I1(D);if(Y){const R=Array.from(Y.querySelectorAll("*")).filter(q=>{const W=q.getBoundingClientRect();return W.left<U.right&&W.right>U.left&&W.top<U.bottom&&W.bottom>U.top&&W.width>0&&W.height>0}),$=(U.right-U.left)*(U.bottom-U.top),j=xM(R,$);if(console.log("[IframeSelection] Using single-element selection logic"),j.length>=1){const q=Vm(j[0]);console.log("[IframeSelection] Single element via box selection:",j[0].tagName),h(q),g(j[0])}else console.log("[IframeSelection] No meaningful elements found in selection")}c(null)},[m,u,h,g]),A=x.useCallback(T=>{if(n.current=T,!T)return;const D=()=>{console.log("[IframeSelection] Iframe loaded")};return T.addEventListener("load",D),()=>{T.removeEventListener("load",D)}},[]);x.useEffect(()=>{var T,D;if(!_){if(v(),w(),c(null),(T=n.current)!=null&&T.parentElement){const I=n.current.parentElement.querySelector("#rivet-mouse-capture");I&&(I.style.display="none",I.style.pointerEvents="none")}document.body.style.cursor="auto";return}if((D=n.current)!=null&&D.parentElement){const I=n.current,U=kM(I.parentElement);U.style.display="block",U.style.pointerEvents="auto",U.style.cursor="crosshair",document.body.style.cursor="crosshair"}},[_,v,w]);const M=x.useCallback(()=>{const T=n.current;if(!T)return;const D=T.getBoundingClientRect();document.querySelectorAll('[id^="rivet-selection-"]').forEach(U=>{const Y=U,G=Y.__element;if(G){const R=G.getBoundingClientRect(),$=D.left+R.left,j=D.top+R.top,q=R.width,W=R.height;ju($,j,q,W)?Y.style.display="none":(Y.style.display="block",Y.style.left=`${$}px`,Y.style.top=`${j}px`,Y.style.width=`${q}px`,Y.style.height=`${W}px`)}}),e&&d.repositionAllOverlays()},[e,d]);x.useEffect(()=>{if(!_)return;const T=new ResizeObserver(()=>{M()}),D=new MutationObserver(()=>{M()});if(n.current){T.observe(n.current);const I=n.current.contentDocument;I&&D.observe(I.body,{childList:!0,subtree:!0,attributes:!0})}return window.addEventListener("resize",M),()=>{T.disconnect(),D.disconnect(),window.removeEventListener("resize",M)}},[_,M]),x.useEffect(()=>{var D;if(!_||!((D=n.current)!=null&&D.parentElement))return;const T=n.current.parentElement.querySelector("#rivet-mouse-capture");if(T)return console.log("[IframeSelection] Setting up mouse listeners on overlay"),T.addEventListener("mousemove",E),T.addEventListener("mouseleave",v),T.addEventListener("click",P),T.addEventListener("mousedown",C),T.addEventListener("mouseup",S),()=>{console.log("[IframeSelection] Cleaning up mouse listeners"),T.removeEventListener("mousemove",E),T.removeEventListener("mouseleave",v),T.removeEventListener("click",P),T.removeEventListener("mousedown",C),T.removeEventListener("mouseup",S)}},[_,E,P,C,S,v]),x.useEffect(()=>()=>{const T=document.getElementById("rivet-hover-overlay");T&&T.remove(),document.querySelectorAll('[id^="rivet-selection-"]').forEach(U=>U.remove()),document.querySelectorAll("#rivet-mouse-capture").forEach(U=>U.remove())},[]);const O=x.useCallback(()=>{o(null),c(null),v(),w()},[v,w]);return{setupIframe:A,clearSelectionState:O,selectedElement:a}},bM=({isLoading:t=!1})=>{const e=Ga(Ol),[n,r]=x.useState("view"),i=x.useRef(null),{setupIframe:s}=CM({mode:n,isBoxModelVisible:!0});x.useEffect(()=>{n==="view"&&e(null)},[n,e]);const o=a=>{r(a?"edit":"view")};return k.jsxs("div",{className:"relative h-full w-full",children:[k.jsx(gM,{mode:n,onModeChange:o,isLoading:t}),k.jsx("iframe",{ref:a=>{i.current=a,s(a)},src:"/",className:"h-full w-full border-none",title:"Project Preview",sandbox:"allow-scripts allow-same-origin allow-forms allow-popups allow-modals"})]})},PM=({type:t,value:e,onChange:n,disabled:r=!1})=>{const i=s=>{n(s.target.value)};switch(t){case"color":return k.jsxs("div",{className:"border-divider bg-main-input focus-within:ring-primary focus-within:border-primary flex w-28 items-center space-x-1 rounded border px-2 py-1 focus-within:ring-1",children:[k.jsx("input",{type:"color",value:e,onChange:i,disabled:r,className:"flex-shrink-0 cursor-pointer rounded border-0 outline-none",style:{width:"16px",height:"16px",padding:"0",margin:"0",border:"none",borderRadius:"2px",WebkitAppearance:"none",MozAppearance:"none",appearance:"none",aspectRatio:"1/1"},title:e}),k.jsx("span",{className:"text-content min-w-0 flex-1 text-center font-mono text-xs",children:e})]});case"range":return k.jsx("input",{type:"text",value:`${e}%`,onChange:s=>{const o=s.target.value.replace("%","");n(o)},disabled:r,className:"border-divider bg-main-input focus:ring-primary focus:border-primary text-content placeholder-content-subtle w-28 rounded border px-4 py-1 text-right text-xs focus:ring-1",placeholder:"100%"});case"text":case"spacing":default:return k.jsx("input",{type:"text",value:e,onChange:i,disabled:r,className:"border-divider bg-main-input focus:ring-primary focus:border-primary text-content placeholder-content-subtle w-28 rounded border px-4 py-1 text-right text-xs focus:ring-1"})}},Hm=Rl("StreamingUtils"),TM=async(t,e)=>{var c;const{url:n,method:r="POST",headers:i={},body:s}=t,{onChunk:o,onProgress:a,onComplete:l,onError:u}=e;try{const d=await fetch(n,{method:r,headers:{"Content-Type":"application/json",...i},body:JSON.stringify(s)});if(!d.ok)throw new Error(`HTTP error! status: ${d.status}`);const f=(c=d.body)==null?void 0:c.getReader(),h=new TextDecoder;if(!f)throw new Error("No response body reader available");let y="",m="";for(;;){const{done:_,value:p}=await f.read();if(_)break;y+=h.decode(p,{stream:!0});const g=y.split(`
|
|
152
|
+
`);y=g.pop()||"";for(const v of g)if(v.trim()!==""){if(v.startsWith("event: ")){m=v.slice(7).trim();continue}if(v.startsWith("data: "))try{const w=JSON.parse(v.slice(6));if(m==="progress")a("current",w.content||"");else if(w.content&&!w.done)o("current",w.content);else if(w.done){l("current",w.usage,w);break}else if(w.error){u("current",w.error);break}}catch(w){Hm.error("Failed to parse SSE data:",w)}}}}catch(d){Hm.error("Streaming request failed:",d);const f=d instanceof Error?d.message:"An unexpected error occurred.";u("unknown",f)}},AM=t=>{const e=(l,u)=>{t(c=>c.map(d=>d.id===l?{...d,message:d.message+u}:d))},n=l=>{t(u=>u.map(c=>c.id===l?{...c,isLoading:!1}:c))},r=(l,u)=>{t(c=>c.map(d=>d.id===l?{...d,message:`Error: ${u}`,isLoading:!1}:d))},i=(l,u,c="",d=!1)=>{const f={id:l,message:c,isUser:u,isLoading:!u,isProgress:d};t(h=>[...h,f])};return{updateStreamingMessage:e,finalizeStreamingMessage:n,setErrorMessage:r,addStreamingMessage:i,addProgressMessage:(l,u="")=>{i(l,!1,u,!0)},updateOrAddProgressMessage:(l,u)=>{t(c=>{const d=c.filter(h=>!h.isProgress),f={id:l,message:u,isUser:!1,isLoading:!0,isProgress:!0};return[...d,f]})},removeProgressMessages:()=>{t(l=>l.filter(u=>!u.isProgress))}}},Wm=Rl("useGenerateCode"),RM=()=>{const[t,e]=x.useState(!1),[n,r]=x.useState(null),[i,s]=x.useState(""),o=x.useCallback(async c=>{e(!0),r(null),s("");try{const{instruction:d,elements:f,temperature:h=.7,shouldStream:y=!1,messages:m,onChunk:_,onProgress:p,onComplete:g,onError:v}=c;return f&&f.length>0?await a({instruction:d,elements:f,temperature:h},{onChunk:_,onProgress:p,onComplete:g,onError:v}):(y&&m&&Wm.warn("Streaming LLM requests are not supported yet"),await l({instruction:d,messages:m,temperature:h}))}catch(d){const f=d instanceof Error?d.message:"Code generation failed";return r(f),Wm.error("Code generation error:",f),null}finally{e(!1)}},[]),a=async(c,d)=>{var m;const f={url:"/api/code/modify",body:{instruction:c.instruction,elements:c.elements,temperature:c.temperature}};let h=null,y=null;try{if(await TM(f,{onChunk:(_,p)=>{var g;s(v=>v+p),(g=d.onChunk)==null||g.call(d,p)},onProgress:(_,p)=>{var g;(g=d.onProgress)==null||g.call(d,p)},onComplete:(_,p,g)=>{var w;h=g||{changes:"Code modification completed",filesModified:[],totalElements:c.elements.length},(w=d.onComplete)==null||w.call(d,p)},onError:(_,p)=>{var g;y=p,(g=d.onError)==null||g.call(d,p)}}),y)throw new Error(y);return h}catch(_){const p=_ instanceof Error?_.message:"Streaming failed";throw y||(m=d.onError)==null||m.call(d,p),_}},l=async c=>{var h;const d=await fetch("/api/code/modify",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({messages:c.messages||[{role:"user",content:c.instruction}],temperature:c.temperature,stream:!1})});if(!d.ok){const y=await d.json();throw new Error(y.error||`HTTP ${d.status}`)}const f=await d.json();return{content:((h=f.data)==null?void 0:h.text)||f.text}},u=x.useCallback(async(c,d,f)=>{const y=`Apply these CSS styles: ${Object.entries(d).map(([m,_])=>`${m}: ${_}`).join(", ")}`;return o({instruction:y,elements:[c],temperature:.3,...f})},[o]);return{generateCode:o,generateCodeWithCSS:u,isGenerating:t,error:n,streamingContent:i,clearError:()=>r(null),clearStreamingContent:()=>s("")}};var MM=hy[" useId ".trim().toString()]||(()=>{}),IM=0;function L1(t){const[e,n]=x.useState(MM());return Rr(()=>{n(r=>r??String(IM++))},[t]),t||(e?`radix-${e}`:"")}var Dl="Collapsible",[NM,D1]=Ml(Dl),[OM,jh]=NM(Dl),$1=x.forwardRef((t,e)=>{const{__scopeCollapsible:n,open:r,defaultOpen:i,disabled:s,onOpenChange:o,...a}=t,[l,u]=Il({prop:r,defaultProp:i??!1,onChange:o,caller:Dl});return k.jsx(OM,{scope:n,disabled:s,contentId:L1(),open:l,onOpenToggle:x.useCallback(()=>u(c=>!c),[u]),children:k.jsx(nt.div,{"data-state":Bh(l),"data-disabled":s?"":void 0,...a,ref:e})})});$1.displayName=Dl;var F1="CollapsibleTrigger",j1=x.forwardRef((t,e)=>{const{__scopeCollapsible:n,...r}=t,i=jh(F1,n);return k.jsx(nt.button,{type:"button","aria-controls":i.contentId,"aria-expanded":i.open||!1,"data-state":Bh(i.open),"data-disabled":i.disabled?"":void 0,disabled:i.disabled,...r,ref:e,onClick:Qe(t.onClick,i.onOpenToggle)})});j1.displayName=F1;var Vh="CollapsibleContent",V1=x.forwardRef((t,e)=>{const{forceMount:n,...r}=t,i=jh(Vh,t.__scopeCollapsible);return k.jsx(Nh,{present:n||i.open,children:({present:s})=>k.jsx(LM,{...r,ref:e,present:s})})});V1.displayName=Vh;var LM=x.forwardRef((t,e)=>{const{__scopeCollapsible:n,present:r,children:i,...s}=t,o=jh(Vh,n),[a,l]=x.useState(r),u=x.useRef(null),c=kn(e,u),d=x.useRef(0),f=d.current,h=x.useRef(0),y=h.current,m=o.open||a,_=x.useRef(m),p=x.useRef(void 0);return x.useEffect(()=>{const g=requestAnimationFrame(()=>_.current=!1);return()=>cancelAnimationFrame(g)},[]),Rr(()=>{const g=u.current;if(g){p.current=p.current||{transitionDuration:g.style.transitionDuration,animationName:g.style.animationName},g.style.transitionDuration="0s",g.style.animationName="none";const v=g.getBoundingClientRect();d.current=v.height,h.current=v.width,_.current||(g.style.transitionDuration=p.current.transitionDuration,g.style.animationName=p.current.animationName),l(r)}},[o.open,r]),k.jsx(nt.div,{"data-state":Bh(o.open),"data-disabled":o.disabled?"":void 0,id:o.contentId,hidden:!m,...s,ref:c,style:{"--radix-collapsible-content-height":f?`${f}px`:void 0,"--radix-collapsible-content-width":y?`${y}px`:void 0,...t.style},children:m&&i})});function Bh(t){return t?"open":"closed"}var DM=$1,$M=j1,FM=V1,jM=x.createContext(void 0);function VM(t){const e=x.useContext(jM);return t||e||"ltr"}var Kt="Accordion",BM=["Home","End","ArrowDown","ArrowUp","ArrowLeft","ArrowRight"],[zh,zM,UM]=c1(Kt),[$l]=Ml(Kt,[UM,D1]),Uh=D1(),B1=ee.forwardRef((t,e)=>{const{type:n,...r}=t,i=r,s=r;return k.jsx(zh.Provider,{scope:t.__scopeAccordion,children:n==="multiple"?k.jsx(GM,{...s,ref:e}):k.jsx(KM,{...i,ref:e})})});B1.displayName=Kt;var[z1,HM]=$l(Kt),[U1,WM]=$l(Kt,{collapsible:!1}),KM=ee.forwardRef((t,e)=>{const{value:n,defaultValue:r,onValueChange:i=()=>{},collapsible:s=!1,...o}=t,[a,l]=Il({prop:n,defaultProp:r??"",onChange:i,caller:Kt});return k.jsx(z1,{scope:t.__scopeAccordion,value:ee.useMemo(()=>a?[a]:[],[a]),onItemOpen:l,onItemClose:ee.useCallback(()=>s&&l(""),[s,l]),children:k.jsx(U1,{scope:t.__scopeAccordion,collapsible:s,children:k.jsx(H1,{...o,ref:e})})})}),GM=ee.forwardRef((t,e)=>{const{value:n,defaultValue:r,onValueChange:i=()=>{},...s}=t,[o,a]=Il({prop:n,defaultProp:r??[],onChange:i,caller:Kt}),l=ee.useCallback(c=>a((d=[])=>[...d,c]),[a]),u=ee.useCallback(c=>a((d=[])=>d.filter(f=>f!==c)),[a]);return k.jsx(z1,{scope:t.__scopeAccordion,value:o,onItemOpen:l,onItemClose:u,children:k.jsx(U1,{scope:t.__scopeAccordion,collapsible:!0,children:k.jsx(H1,{...s,ref:e})})})}),[qM,Fl]=$l(Kt),H1=ee.forwardRef((t,e)=>{const{__scopeAccordion:n,disabled:r,dir:i,orientation:s="vertical",...o}=t,a=ee.useRef(null),l=kn(a,e),u=zM(n),d=VM(i)==="ltr",f=Qe(t.onKeyDown,h=>{var S;if(!BM.includes(h.key))return;const y=h.target,m=u().filter(A=>{var M;return!((M=A.ref.current)!=null&&M.disabled)}),_=m.findIndex(A=>A.ref.current===y),p=m.length;if(_===-1)return;h.preventDefault();let g=_;const v=0,w=p-1,E=()=>{g=_+1,g>w&&(g=v)},P=()=>{g=_-1,g<v&&(g=w)};switch(h.key){case"Home":g=v;break;case"End":g=w;break;case"ArrowRight":s==="horizontal"&&(d?E():P());break;case"ArrowDown":s==="vertical"&&E();break;case"ArrowLeft":s==="horizontal"&&(d?P():E());break;case"ArrowUp":s==="vertical"&&P();break}const C=g%p;(S=m[C].ref.current)==null||S.focus()});return k.jsx(qM,{scope:n,disabled:r,direction:i,orientation:s,children:k.jsx(zh.Slot,{scope:n,children:k.jsx(nt.div,{...o,"data-orientation":s,ref:l,onKeyDown:r?void 0:f})})})}),qa="AccordionItem",[YM,Hh]=$l(qa),W1=ee.forwardRef((t,e)=>{const{__scopeAccordion:n,value:r,...i}=t,s=Fl(qa,n),o=HM(qa,n),a=Uh(n),l=L1(),u=r&&o.value.includes(r)||!1,c=s.disabled||t.disabled;return k.jsx(YM,{scope:n,open:u,disabled:c,triggerId:l,children:k.jsx(DM,{"data-orientation":s.orientation,"data-state":Q1(u),...a,...i,ref:e,disabled:c,open:u,onOpenChange:d=>{d?o.onItemOpen(r):o.onItemClose(r)}})})});W1.displayName=qa;var K1="AccordionHeader",G1=ee.forwardRef((t,e)=>{const{__scopeAccordion:n,...r}=t,i=Fl(Kt,n),s=Hh(K1,n);return k.jsx(nt.h3,{"data-orientation":i.orientation,"data-state":Q1(s.open),"data-disabled":s.disabled?"":void 0,...r,ref:e})});G1.displayName=K1;var Cd="AccordionTrigger",q1=ee.forwardRef((t,e)=>{const{__scopeAccordion:n,...r}=t,i=Fl(Kt,n),s=Hh(Cd,n),o=WM(Cd,n),a=Uh(n);return k.jsx(zh.ItemSlot,{scope:n,children:k.jsx($M,{"aria-disabled":s.open&&!o.collapsible||void 0,"data-orientation":i.orientation,id:s.triggerId,...a,...r,ref:e})})});q1.displayName=Cd;var Y1="AccordionContent",X1=ee.forwardRef((t,e)=>{const{__scopeAccordion:n,...r}=t,i=Fl(Kt,n),s=Hh(Y1,n),o=Uh(n);return k.jsx(FM,{role:"region","aria-labelledby":s.triggerId,"data-orientation":i.orientation,...o,...r,ref:e,style:{"--radix-accordion-content-height":"var(--radix-collapsible-content-height)","--radix-accordion-content-width":"var(--radix-collapsible-content-width)",...t.style}})});X1.displayName=Y1;function Q1(t){return t?"open":"closed"}var XM=B1,QM=W1,ZM=G1,JM=q1,e2=X1;const as=({children:t,defaultValue:e=[],className:n=""})=>k.jsx(XM,{type:"multiple",defaultValue:e,className:`space-y-4 ${n}`,children:t}),t2=({value:t,title:e,icon:n,children:r,className:i=""})=>k.jsxs(QM,{value:t,className:`flex h-full flex-col overflow-hidden rounded-none ${i}`,children:[k.jsx(ZM,{children:k.jsxs(JM,{className:"hover:bg-divider-muted focus:bg-divider-muted group flex w-full items-center justify-between px-2 text-left focus:outline-none",children:[k.jsxs("div",{className:"flex items-center space-x-2 py-3",children:[n,k.jsx("h5",{className:"text-content text-sm font-medium",children:e})]}),k.jsx(QA,{className:"text-content-subtle h-4 w-4 transition-transform group-data-[state=open]:rotate-180"})]})}),k.jsx(e2,{className:"data-[state=open]:animate-accordion-down data-[state=closed]:animate-accordion-up min-h-0 flex-1",children:k.jsx("div",{className:"h-full",children:r})})]});as.Item=t2;const n2=({message:t,isUser:e})=>k.jsx("div",{className:`flex ${e?"justify-end":"justify-start"} mb-4`,children:k.jsx("div",{className:`max-w-[80%] ${e?"order-2":"order-1"}`,children:k.jsx("div",{className:`rounded-lg px-3 py-2 text-sm ${e?"bg-divider-muted border-divider text-content border":"text-content-muted bg-transparent"}`,children:k.jsx("div",{className:"whitespace-pre-wrap",children:t})})})}),r2=({message:t,isLoading:e=!0})=>k.jsxs("div",{className:"text-content-muted flex items-center gap-2 text-sm",children:[e?k.jsx(a1,{className:"text-content-subtle h-4 w-4 animate-spin"}):null,k.jsx("span",{className:"whitespace-pre-wrap font-sans",children:t})]}),i2=({message:t})=>k.jsx("pre",{className:"text-content-muted overflow-x-auto whitespace-pre-wrap font-sans text-sm",children:t}),s2=({messages:t})=>{const e=x.useRef(null);x.useEffect(()=>{e.current&&(e.current.scrollTop=e.current.scrollHeight)},[t]);const n=r=>r.isUser?k.jsx(n2,{message:r.message,isUser:r.isUser},r.id):r.isProgress?k.jsx(r2,{message:r.message,isLoading:r.isLoading},r.id):k.jsx(i2,{message:r.message},r.id);return t.length===0?k.jsx("div",{className:"text-content-subtle flex flex-1 items-center justify-center text-sm"}):k.jsx("div",{ref:e,className:"scrollbar-hide h-full space-y-3 overflow-y-auto p-2",children:t.map(n)})},o2=({onSend:t,disabled:e=!1,placeholder:n="Type your message..."})=>{const[r,i]=x.useState(""),s=x.useRef(null),o=()=>{r.trim()&&!e&&(t(r.trim()),i(""))};x.useEffect(()=>{s.current&&(s.current.style.height="auto",s.current.style.height=`${s.current.scrollHeight}px`)},[r]);const a=l=>{l.key==="Enter"&&!l.shiftKey&&(l.preventDefault(),o())};return k.jsxs("div",{className:"relative px-2",children:[k.jsx("textarea",{ref:s,value:r,onChange:l=>i(l.target.value),onKeyDown:a,placeholder:n,disabled:e,className:"border-divider bg-main-input focus:ring-primary focus:border-primary text-content placeholder-content-subtle max-h-32 min-h-[2.5rem] w-full resize-none overflow-hidden rounded-lg border py-2 pl-3 pr-10 text-sm focus:ring-1 disabled:opacity-50",rows:3}),k.jsx("button",{onClick:o,disabled:!r.trim()||e,className:"bg-primary text-content hover:bg-primary-hover absolute bottom-4 right-4 flex items-center justify-center rounded p-1 transition-colors disabled:cursor-not-allowed disabled:opacity-50",children:k.jsx(uR,{className:"h-5 w-5"})})]})},jo=Rl("ElementInspector"),a2=[{key:"backgroundColor",label:"Background Color",type:"color"},{key:"color",label:"Text Color",type:"color"},{key:"fontSize",label:"Text Size",type:"text"},{key:"opacity",label:"Opacity",type:"range"},{key:"borderColor",label:"Border Color",type:"color"},{key:"borderWidth",label:"Border Width",type:"text"},{key:"borderRadius",label:"Border Radius",type:"text"},{key:"paddingTop",label:"Padding Top",type:"spacing"},{key:"paddingBottom",label:"Padding Bottom",type:"spacing"},{key:"paddingLeft",label:"Padding Left",type:"spacing"},{key:"paddingRight",label:"Padding Right",type:"spacing"},{key:"marginTop",label:"Margin Top",type:"spacing"},{key:"marginBottom",label:"Margin Bottom",type:"spacing"},{key:"marginLeft",label:"Margin Left",type:"spacing"},{key:"marginRight",label:"Margin Right",type:"spacing"}],l2={black:"#000000",white:"#ffffff",red:"#ff0000",green:"#008000",blue:"#0000ff",yellow:"#ffff00",cyan:"#00ffff",magenta:"#ff00ff",silver:"#c0c0c0",gray:"#808080",grey:"#808080"},u2=t=>t.replace(/([A-Z])/g,"-$1").toLowerCase(),Km=(t,e)=>t[e]||t[u2(e)]||"",c2=t=>{if(!t||t==="transparent"||t==="inherit"||t==="initial")return"#000000";if(t.startsWith("#"))return t;const e=t.match(/rgba?\((\d+),\s*(\d+),\s*(\d+)(?:,\s*([\d.]+))?\)/);if(e){const n=parseInt(e[1]),r=parseInt(e[2]),i=parseInt(e[3]),s=o=>{const a=o.toString(16);return a.length===1?"0"+a:a};return`#${s(n)}${s(r)}${s(i)}`}return l2[t.toLowerCase()]||"#000000"},d2=({onClick:t,disabled:e=!1,isLoading:n=!1,children:r})=>k.jsxs("button",{onClick:t,disabled:e,className:"bg-primary text-content hover:bg-primary-hover flex w-full cursor-pointer items-center justify-center gap-2 rounded px-3 py-2 text-sm transition-all duration-200 disabled:cursor-not-allowed disabled:opacity-50",children:[n?k.jsx(a1,{className:"h-4 w-4 animate-spin"}):null,r]}),f2=({onClose:t,chatMessages:e,setChatMessages:n})=>{const[r,i]=s1(Ol);return r?k.jsxs("div",{className:"bg-main border-divider scrollbar-hide w-96 cursor-auto overflow-y-auto border-l","data-cy":"element-inspector",children:[k.jsxs("div",{className:"border-divider border-b p-4",children:[k.jsxs("div",{className:"mb-2 flex items-center justify-between",children:[k.jsx("h3",{className:"text-content text-lg font-semibold",children:"Element"}),k.jsx("button",{onClick:t,className:"text-content-subtle hover:text-content-muted",children:"✕"})]}),k.jsxs("div",{className:"text-content-muted text-sm",children:["Selected:"," ",k.jsxs("span",{className:"text-primary font-mono",children:[r.tagName,r.className&&`.${r.className.split(" ")[0]}`,r.id&&`#${r.id}`]}),r.filePath&&k.jsxs("span",{className:"text-content-subtle ml-1",children:["in ",r.filePath.split("/").pop()]})]})]}),k.jsx("div",{children:k.jsx(h2,{selectedElement:r,chatMessages:e,setChatMessages:n,onElementChange:i})})]}):null},h2=({selectedElement:t,chatMessages:e,setChatMessages:n,onElementChange:r})=>{const[i,s]=x.useState({}),[o,a]=x.useState({isOpen:!1,type:"success",title:"",description:"",onOpenChange:()=>{}}),l=i1(O1),u=AM(n),{generateCode:c,generateCodeWithCSS:d,isGenerating:f}=RM(),h=!!t.filePath,y=()=>{if(!l)return t.computedStyles;const C=window.getComputedStyle(l),S={};for(let A=0;A<C.length;A++){const M=C[A];S[M]=C.getPropertyValue(M)}return S},m=()=>{document.querySelectorAll('[id^="rivet-selection-"]').forEach(A=>A.remove());const S=document.getElementById("rivet-hover-overlay");S&&(S.style.display="none"),r(null)},_=C=>{const S=y(),A=["color","backgroundColor","borderColor"];switch(C){case"opacity":return Km(S,"opacity")||"1";case"borderColor":return S["border-color"]||S["border-top-color"]||S["border-right-color"]||S["border-bottom-color"]||S["border-left-color"]||"";case"borderWidth":return S["border-width"]||S["border-top-width"]||S["border-right-width"]||S["border-bottom-width"]||S["border-left-width"]||"";case"borderRadius":return S["border-radius"]||S["border-top-left-radius"]||"";default:const M=Km(S,C);return A.includes(C)&&M?c2(M):M}},p=C=>i[C]??_(C),g=(C,S)=>{s(A=>({...A,[C]:S}))},v=C=>{const S=p(C),A=parseFloat(S??"");return isNaN(A)?100:Math.round(A*100)},w=(C,S)=>{const A=S.replace("%","").trim(),M=parseFloat(A);if(!isNaN(M)){const T=(Math.max(0,Math.min(100,M))/100).toString();g(C,T)}},E=async()=>{if(Object.keys(i).length!==0){if(!t.filePath){jo.error("Please find the component file first using the search functionality.");return}try{const C=await d(t,i);C?(jo.info("CSS changes applied successfully:",C.changes),s({}),m()):a({isOpen:!0,type:"error",title:"Failed to apply CSS changes",description:"An error occurred while applying the style changes.",onOpenChange:S=>a(A=>({...A,isOpen:S}))})}catch(C){jo.error("Error applying CSS changes:",C),a({isOpen:!0,type:"error",title:"Failed to apply CSS changes",description:C instanceof Error?C.message:"An unexpected error occurred.",onOpenChange:S=>a(A=>({...A,isOpen:S}))})}}},P=async C=>{const S=Date.now().toString(),A=(Date.now()+1).toString();if(u.addStreamingMessage(S,!0,C),u.addStreamingMessage(A,!1,""),!t.filePath){u.setErrorMessage(A,"Cannot modify - component file not found for element.");return}const M="progress-"+Date.now();try{await c({instruction:C,elements:[t],shouldStream:!0,onProgress:O=>{u.updateOrAddProgressMessage(M,O)},onChunk:O=>{u.removeProgressMessages(),u.updateStreamingMessage(A,O)},onComplete:()=>{u.removeProgressMessages(),u.finalizeStreamingMessage(A),m(),a({isOpen:!0,type:"success",title:"Code modification completed!",description:"Changes applied successfully.",onOpenChange:O=>a(T=>({...T,isOpen:O}))})},onError:O=>{u.removeProgressMessages(),u.setErrorMessage(A,O),a({isOpen:!0,type:"error",title:"Code Modification Error",description:O,onOpenChange:T=>a(D=>({...D,isOpen:T}))})}})}catch(O){jo.error("Error with streaming request:",O);const T=O instanceof Error?O.message:"An unexpected error occurred.";u.removeProgressMessages(),u.setErrorMessage(A,T),a({isOpen:!0,type:"error",title:"Failed to generate AI response",description:T,onOpenChange:D=>a(I=>({...I,isOpen:D}))})}};return k.jsxs("div",{className:"bg-main scrollbar-hide flex h-screen flex-col overflow-hidden",children:[k.jsx("div",{className:"flex-shrink-0",children:k.jsx(as,{defaultValue:["ai-input"],children:k.jsx(as.Item,{value:"ai-input",title:"Change element",icon:k.jsx(dR,{className:"text-content h-4 w-4"}),children:k.jsxs("div",{className:"flex h-96 flex-col",children:[k.jsx("div",{className:"min-h-0 flex-1 overflow-hidden",children:k.jsx(s2,{messages:e})}),k.jsx("div",{className:"border-divider bg-main flex-shrink-0 border-t py-4",children:k.jsx(o2,{onSend:P,disabled:f})})]})})})}),k.jsx("div",{className:"border-divider flex-shrink-0 border-t pt-4",children:k.jsx(as,{defaultValue:["style-properties"],className:"overflow-visible",children:k.jsx(as.Item,{value:"style-properties",title:"Style properties",icon:k.jsx(sR,{className:"text-content h-4 w-4"}),children:k.jsxs("div",{className:"flex flex-col",children:[k.jsx("div",{className:"max-h-96 space-y-3 overflow-y-auto p-2",children:a2.filter(({isHidden:C})=>!C).map(({key:C,label:S,type:A})=>k.jsxs("div",{className:"flex items-center justify-between",children:[k.jsx("label",{className:"text-content flex-1 text-xs",children:S}),k.jsx(PM,{type:A,value:A==="range"?v(C):p(C),onChange:M=>{A==="range"?w(C,M+"%"):g(C,M)}})]},C))}),k.jsx("div",{className:"border-divider border-t px-2 pt-3",children:k.jsx(d2,{onClick:E,disabled:Object.keys(i).length===0||f||!h,isLoading:f,children:f?"Applying Style Changes...":"Apply Style Changes"})})]})})})}),h?null:k.jsx("div",{className:"border-accent-warning bg-accent-warning/20 text-accent-warning rounded border p-3 text-xs",children:"Cannot modify - no component file found."}),k.jsx(M1,{children:k.jsx(R1,{isOpen:o.isOpen,onOpenChange:o.onOpenChange,type:o.type,title:o.title,description:o.description})})]})},p2=()=>{const[t,e]=s1(Ol),[n,r]=x.useState([]);x.useEffect(()=>{r([])},[t]);const i=()=>{e(null)};return k.jsxs(Gw.div,{className:"flex h-screen",initial:{opacity:0},animate:{opacity:1},transition:{duration:.5,ease:"easeOut"},children:[k.jsx("div",{className:"relative flex flex-1 flex-col",children:k.jsx(bM,{})}),k.jsx(f2,{onClose:i,chatMessages:n,setChatMessages:r})]})};var b=typeof window<"u"?window:void 0,lt=typeof globalThis<"u"?globalThis:b,Z1=Array.prototype,Gm=Z1.forEach,qm=Z1.indexOf,gt=lt==null?void 0:lt.navigator,B=lt==null?void 0:lt.document,st=lt==null?void 0:lt.location,bd=lt==null?void 0:lt.fetch,Pd=lt!=null&<.XMLHttpRequest&&"withCredentials"in new lt.XMLHttpRequest?lt.XMLHttpRequest:void 0,Ym=lt==null?void 0:lt.AbortController,rt=gt==null?void 0:gt.userAgent,H=b??{},hn={DEBUG:!1,LIB_VERSION:"1.268.9"};function Xm(t,e,n,r,i,s,o){try{var a=t[s](o),l=a.value}catch(u){return void n(u)}a.done?e(l):Promise.resolve(l).then(r,i)}function Qm(t){return function(){var e=this,n=arguments;return new Promise(function(r,i){var s=t.apply(e,n);function o(l){Xm(s,r,i,o,a,"next",l)}function a(l){Xm(s,r,i,o,a,"throw",l)}o(void 0)})}}function F(){return F=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)({}).hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},F.apply(null,arguments)}function J1(t,e){if(t==null)return{};var n={};for(var r in t)if({}.hasOwnProperty.call(t,r)){if(e.indexOf(r)!==-1)continue;n[r]=t[r]}return n}var g2=["$snapshot","$pageview","$pageleave","$set","survey dismissed","survey sent","survey shown","$identify","$groupidentify","$create_alias","$$client_ingestion_warning","$web_experiment_applied","$feature_enrollment_update","$feature_flag_called"];function X(t,e){return t.indexOf(e)!==-1}var jl=function(t){return t.trim()},Td=function(t){return t.replace(/^\$/,"")},m2=Array.isArray,ex=Object.prototype,tx=ex.hasOwnProperty,Vl=ex.toString,ie=m2||function(t){return Vl.call(t)==="[object Array]"},At=t=>typeof t=="function",we=t=>t===Object(t)&&!ie(t),ii=t=>{if(we(t)){for(var e in t)if(tx.call(t,e))return!1;return!0}return!1},L=t=>t===void 0,xe=t=>Vl.call(t)=="[object String]",Ad=t=>xe(t)&&t.trim().length===0,bn=t=>t===null,Z=t=>L(t)||bn(t),He=t=>Vl.call(t)=="[object Number]",Bt=t=>Vl.call(t)==="[object Boolean]",v2=t=>t instanceof FormData,y2=t=>X(g2,t);function Rd(t){return t===null||typeof t!="object"}function Ya(t,e){return Object.prototype.toString.call(t)==="[object "+e+"]"}function nx(t){return!L(Event)&&function(e,n){try{return e instanceof n}catch{return!1}}(t,Event)}var _2=[!0,"true",1,"1","yes"],Vu=t=>X(_2,t),w2=[!1,"false",0,"0","no"];function mt(t,e,n,r,i){return e>n&&(r.warn("min cannot be greater than max."),e=n),He(t)?t>n?(r.warn(" cannot be greater than max: "+n+". Using max value instead."),n):t<e?(r.warn(" cannot be less than min: "+e+". Using min value instead."),e):t:(r.warn(" must be a number. using max or fallback. max: "+n+", fallback: "+i),mt(i||n,e,n,r))}class rx{constructor(e){this.t=e,this.i={},this.o=()=>{Object.keys(this.i).forEach(n=>{var r=this.h(n)+this.m;r>=this.S?delete this.i[n]:this.k(n,r)})},this.h=n=>this.i[String(n)],this.k=(n,r)=>{this.i[String(n)]=r},this.consumeRateLimit=n=>{var r,i,s=(r=this.h(n))!==null&&r!==void 0?r:this.S;if((s=Math.max(s-1,0))===0)return!0;this.k(n,s);var o=s===0;return o&&((i=this.$)==null||i.call(this,n)),o},this.$=this.t.$,this.S=mt(this.t.bucketSize,0,100,this.t.R),this.m=mt(this.t.refillRate,0,this.S,this.t.R),this.P=mt(this.t.refillInterval,0,864e5,this.t.R),this.I=setInterval(()=>{this.o()},this.P)}stop(){this.I&&(clearInterval(this.I),this.I=void 0)}}var Vo,Zm,Bu,x2=t=>t instanceof Error;function S2(t){var e=globalThis._posthogChunkIds;if(e){var n=Object.keys(e);return Bu&&n.length===Zm||(Zm=n.length,Bu=n.reduce((r,i)=>{Vo||(Vo={});var s=Vo[i];if(s)r[s[0]]=s[1];else for(var o=t(i),a=o.length-1;a>=0;a--){var l=o[a],u=l==null?void 0:l.filename,c=e[i];if(u&&c){r[u]=c,Vo[i]=[u,c];break}}return r},{})),Bu}}var bi="?";function Md(t,e,n,r){var i={platform:"web:javascript",filename:t,function:e==="<anonymous>"?bi:e,in_app:!0};return L(n)||(i.lineno=n),L(r)||(i.colno=r),i}var ix=(t,e)=>{var n=t.indexOf("safari-extension")!==-1,r=t.indexOf("safari-web-extension")!==-1;return n||r?[t.indexOf("@")!==-1?t.split("@")[0]:bi,n?"safari-extension:"+e:"safari-web-extension:"+e]:[t,e]},E2=/^\s*at (\S+?)(?::(\d+))(?::(\d+))\s*$/i,k2=/^\s*at (?:(.+?\)(?: \[.+\])?|.*?) ?\((?:address at )?)?(?:async )?((?:<anonymous>|[-a-z]+:|.*bundle|\/)?.*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,C2=/\((\S*)(?::(\d+))(?::(\d+))\)/,b2=t=>{var e=E2.exec(t);if(e){var[,n,r,i]=e;return Md(n,bi,+r,+i)}var s=k2.exec(t);if(s){if(s[2]&&s[2].indexOf("eval")===0){var o=C2.exec(s[2]);o&&(s[2]=o[1],s[3]=o[2],s[4]=o[3])}var[a,l]=ix(s[1]||bi,s[2]);return Md(l,a,s[3]?+s[3]:void 0,s[4]?+s[4]:void 0)}},P2=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:[-a-z]+)?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js)|\/[\w\-. /=]+)(?::(\d+))?(?::(\d+))?\s*$/i,T2=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i,A2=t=>{var e=P2.exec(t);if(e){if(e[3]&&e[3].indexOf(" > eval")>-1){var n=T2.exec(e[3]);n&&(e[1]=e[1]||"eval",e[3]=n[1],e[4]=n[2],e[5]="")}var r=e[3],i=e[1]||bi;return[i,r]=ix(i,r),Md(r,i,e[4]?+e[4]:void 0,e[5]?+e[5]:void 0)}},Jm=/\(error: (.*)\)/,ev=50;function R2(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return function(r,i){i===void 0&&(i=0);for(var s=[],o=r.split(`
|
|
153
|
+
`),a=i;a<o.length;a++){var l=o[a];if(!(l.length>1024)){var u=Jm.test(l)?l.replace(Jm,"$1"):l;if(!u.match(/\S*Error: /)){for(var c of e){var d=c(u);if(d){s.push(d);break}}if(s.length>=ev)break}}}return function(f){if(!f.length)return[];var h=Array.from(f);return h.reverse(),h.slice(0,ev).map(y=>{return F({},y,{filename:y.filename||(m=h,m[m.length-1]||{}).filename,function:y.function||bi});var m})}(s)}}class M2{constructor(e,n,r){e===void 0&&(e=[]),n===void 0&&(n=[]),r===void 0&&(r=[]),this.coercers=e,this.modifiers=r,this.stackParser=R2(...n)}buildFromUnknown(e,n){n===void 0&&(n={});var r=n&&n.mechanism||{handled:!0,type:"generic"},i=this.buildCoercingContext(r,n,0).apply(e),s=this.buildParsingContext(),o=this.parseStacktrace(i,s);return{$exception_list:this.convertToExceptionList(o,r),$exception_level:"error"}}modifyFrames(e){var n=this;return Qm(function*(){for(var r of e)r.stacktrace&&r.stacktrace.frames&&ie(r.stacktrace.frames)&&(r.stacktrace.frames=yield n.applyModifiers(r.stacktrace.frames));return e})()}coerceFallback(e){var n;return{type:"Error",value:"Unknown error",stack:(n=e.syntheticException)==null?void 0:n.stack,synthetic:!0}}parseStacktrace(e,n){var r,i;return e.cause!=null&&(r=this.parseStacktrace(e.cause,n)),e.stack!=""&&e.stack!=null&&(i=this.applyChunkIds(this.stackParser(e.stack,e.synthetic?1:0),n.chunkIdMap)),F({},e,{cause:r,stack:i})}applyChunkIds(e,n){return e.map(r=>(r.filename&&n&&(r.chunk_id=n[r.filename]),r))}applyCoercers(e,n){for(var r of this.coercers)if(r.match(e))return r.coerce(e,n);return this.coerceFallback(n)}applyModifiers(e){var n=this;return Qm(function*(){var r=e;for(var i of n.modifiers)r=yield i(r);return r})()}convertToExceptionList(e,n){var r,i,s,o={type:e.type,value:e.value,mechanism:{type:(r=n.type)!==null&&r!==void 0?r:"generic",handled:(i=n.handled)===null||i===void 0||i,synthetic:(s=e.synthetic)!==null&&s!==void 0&&s}};e.stack&&(o.stacktrace={type:"raw",frames:e.stack});var a=[o];return e.cause!=null&&a.push(...this.convertToExceptionList(e.cause,F({},n,{handled:!0}))),a}buildParsingContext(){return{chunkIdMap:S2(this.stackParser)}}buildCoercingContext(e,n,r){r===void 0&&(r=0);var i=(s,o)=>{if(o<=4){var a=this.buildCoercingContext(e,n,o);return this.applyCoercers(s,a)}};return F({},n,{syntheticException:r==0?n.syntheticException:void 0,mechanism:e,apply:s=>i(s,r),next:s=>i(s,r+1)})}}class I2{match(e){return this.isDOMException(e)||this.isDOMError(e)}coerce(e,n){var r=xe(e.stack);return{type:this.getType(e),value:this.getValue(e),stack:r?e.stack:void 0,cause:e.cause?n.next(e.cause):void 0,synthetic:!1}}getType(e){return this.isDOMError(e)?"DOMError":"DOMException"}getValue(e){var n=e.name||(this.isDOMError(e)?"DOMError":"DOMException");return e.message?n+": "+e.message:n}isDOMException(e){return Ya(e,"DOMException")}isDOMError(e){return Ya(e,"DOMError")}}class N2{match(e){return(n=>n instanceof Error)(e)}coerce(e,n){return{type:this.getType(e),value:this.getMessage(e,n),stack:this.getStack(e),cause:e.cause?n.next(e.cause):void 0,synthetic:!1}}getType(e){return e.name||e.constructor.name}getMessage(e,n){var r=e.message;return r.error&&typeof r.error.message=="string"?String(r.error.message):String(r)}getStack(e){return e.stacktrace||e.stack||void 0}}class O2{constructor(){}match(e){return Ya(e,"ErrorEvent")&&e.error!=null}coerce(e,n){var r,i=n.apply(e.error);return i||{type:"ErrorEvent",value:e.message,stack:(r=n.syntheticException)==null?void 0:r.stack,synthetic:!0}}}var L2=/^(?:[Uu]ncaught (?:exception: )?)?(?:((?:Eval|Internal|Range|Reference|Syntax|Type|URI|)Error): )?(.*)$/i;class D2{match(e){return typeof e=="string"}coerce(e,n){var r,[i,s]=this.getInfos(e);return{type:i??"Error",value:s??e,stack:(r=n.syntheticException)==null?void 0:r.stack,synthetic:!0}}getInfos(e){var n="Error",r=e,i=e.match(L2);return i&&(n=i[1],r=i[2]),[n,r]}}var $2=["fatal","error","warning","log","info","debug"];function sx(t,e){e===void 0&&(e=40);var n=Object.keys(t);if(n.sort(),!n.length)return"[object has no keys]";for(var r=n.length;r>0;r--){var i=n.slice(0,r).join(", ");if(!(i.length>e))return r===n.length||i.length<=e?i:i.slice(0,e)+"..."}return""}class F2{match(e){return typeof e=="object"&&e!==null}coerce(e,n){var r,i=this.getErrorPropertyFromObject(e);return i?n.apply(i):{type:this.getType(e),value:this.getValue(e),stack:(r=n.syntheticException)==null?void 0:r.stack,level:this.isSeverityLevel(e.level)?e.level:"error",synthetic:!0}}getType(e){return nx(e)?e.constructor.name:"Error"}getValue(e){if("name"in e&&typeof e.name=="string"){var n="'"+e.name+"' captured as exception";return"message"in e&&typeof e.message=="string"&&(n+=" with message: '"+e.message+"'"),n}if("message"in e&&typeof e.message=="string")return e.message;var r=this.getObjectClassName(e);return(r&&r!=="Object"?"'"+r+"'":"Object")+" captured as exception with keys: "+sx(e)}isSeverityLevel(e){return xe(e)&&!Ad(e)&&$2.indexOf(e)>=0}getErrorPropertyFromObject(e){for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){var r=e[n];if(x2(r))return r}}getObjectClassName(e){try{var n=Object.getPrototypeOf(e);return n?n.constructor.name:void 0}catch{return}}}class j2{match(e){return nx(e)}coerce(e,n){var r,i=e.constructor.name;return{type:i,value:i+" captured as exception with keys: "+sx(e),stack:(r=n.syntheticException)==null?void 0:r.stack,synthetic:!0}}}class V2{match(e){return Rd(e)}coerce(e,n){var r;return{type:"Error",value:"Primitive value captured as exception: "+String(e),stack:(r=n.syntheticException)==null?void 0:r.stack,synthetic:!0}}}class B2{match(e){return Ya(e,"PromiseRejectionEvent")}coerce(e,n){var r,i=this.getUnhandledRejectionReason(e);return Rd(i)?{type:"UnhandledRejection",value:"Non-Error promise rejection captured with value: "+String(i),stack:(r=n.syntheticException)==null?void 0:r.stack,synthetic:!0}:n.apply(i)}getUnhandledRejectionReason(e){if(Rd(e))return e;try{if("reason"in e)return e.reason;if("detail"in e&&"reason"in e.detail)return e.detail.reason}catch{}return e}}var ox=t=>{var e={T:function(n){if(b&&(hn.DEBUG||H.POSTHOG_DEBUG)&&!L(b.console)&&b.console){for(var r=("__rrweb_original__"in b.console[n])?b.console[n].__rrweb_original__:b.console[n],i=arguments.length,s=new Array(i>1?i-1:0),o=1;o<i;o++)s[o-1]=arguments[o];r(t,...s)}},info:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];e.T("log",...r)},warn:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];e.T("warn",...r)},error:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];e.T("error",...r)},critical:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];console.error(t,...r)},uninitializedWarning:n=>{e.error("You must initialize PostHog before calling "+n)},createLogger:n=>ox(t+" "+n)};return e},V=ox("[PostHog.js]"),Re=V.createLogger,z2=Re("[ExternalScriptsLoader]"),tv=(t,e,n)=>{if(t.config.disable_external_dependency_loading)return z2.warn(e+" was requested but loading of external scripts is disabled."),n("Loading of external scripts is disabled");var r=B==null?void 0:B.querySelectorAll("script");if(r){for(var i,s=function(){if(r[o].src===e){var l=r[o];return l.__posthog_loading_callback_fired?{v:n()}:(l.addEventListener("load",u=>{l.__posthog_loading_callback_fired=!0,n(void 0,u)}),l.onerror=u=>n(u),{v:void 0})}},o=0;o<r.length;o++)if(i=s())return i.v}var a=()=>{if(!B)return n("document not found");var l=B.createElement("script");if(l.type="text/javascript",l.crossOrigin="anonymous",l.src=e,l.onload=d=>{l.__posthog_loading_callback_fired=!0,n(void 0,d)},l.onerror=d=>n(d),t.config.prepare_external_dependency_script&&(l=t.config.prepare_external_dependency_script(l)),!l)return n("prepare_external_dependency_script returned null");var u,c=B.querySelectorAll("body > script");c.length>0?(u=c[0].parentNode)==null||u.insertBefore(l,c[0]):B.body.appendChild(l)};B!=null&&B.body?a():B==null||B.addEventListener("DOMContentLoaded",a)};H.__PosthogExtensions__=H.__PosthogExtensions__||{},H.__PosthogExtensions__.loadExternalDependency=(t,e,n)=>{var r="/static/"+e+".js?v="+t.version;if(e==="remote-config"&&(r="/array/"+t.config.token+"/config.js"),e==="toolbar"){var i=3e5;r=r+"&t="+Math.floor(Date.now()/i)*i}var s=t.requestRouter.endpointFor("assets",r);tv(t,s,n)},H.__PosthogExtensions__.loadSiteApp=(t,e,n)=>{var r=t.requestRouter.endpointFor("api",e);tv(t,r,n)};var Xa={};function qn(t,e,n){if(ie(t)){if(Gm&&t.forEach===Gm)t.forEach(e,n);else if("length"in t&&t.length===+t.length){for(var r=0,i=t.length;r<i;r++)if(r in t&&e.call(n,t[r],r)===Xa)return}}}function re(t,e,n){if(!Z(t)){if(ie(t))return qn(t,e,n);if(v2(t)){for(var r of t.entries())if(e.call(n,r[1],r[0])===Xa)return}else for(var i in t)if(tx.call(t,i)&&e.call(n,t[i],i)===Xa)return}}var Ee=function(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),r=1;r<e;r++)n[r-1]=arguments[r];return qn(n,function(i){for(var s in i)i[s]!==void 0&&(t[s]=i[s])}),t},Bl=function(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),r=1;r<e;r++)n[r-1]=arguments[r];return qn(n,function(i){qn(i,function(s){t.push(s)})}),t};function da(t){for(var e=Object.keys(t),n=e.length,r=new Array(n);n--;)r[n]=[e[n],t[e[n]]];return r}var nv=function(t){try{return t()}catch{return}},U2=function(t){return function(){try{for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return t.apply(this,n)}catch(i){V.critical("Implementation error. Please turn on debug mode and open a ticket on https://app.posthog.com/home#panel=support%3Asupport%3A."),V.critical(i)}}},Wh=function(t){var e={};return re(t,function(n,r){(xe(n)&&n.length>0||He(n))&&(e[r]=n)}),e};function H2(t,e){return n=t,r=s=>xe(s)&&!bn(e)?s.slice(0,e):s,i=new Set,function s(o,a){return o!==Object(o)?r?r(o,a):o:i.has(o)?void 0:(i.add(o),ie(o)?(l=[],qn(o,u=>{l.push(s(u))})):(l={},re(o,(u,c)=>{i.has(u)||(l[c]=s(u,c))})),l);var l}(n);var n,r,i}var W2=["herokuapp.com","vercel.app","netlify.app"];function K2(t){var e=t==null?void 0:t.hostname;if(!xe(e))return!1;var n=e.split(".").slice(-2).join(".");for(var r of W2)if(n===r)return!1;return!0}function ax(t,e){for(var n=0;n<t.length;n++)if(e(t[n]))return t[n]}function pe(t,e,n,r){var{capture:i=!1,passive:s=!0}=r??{};t==null||t.addEventListener(e,n,{capture:i,passive:s})}var lx="$people_distinct_id",ls="__alias",us="__timers",rv="$autocapture_disabled_server_side",Id="$heatmaps_enabled_server_side",iv="$exception_capture_enabled_server_side",Nd="$error_tracking_suppression_rules",sv="$error_tracking_capture_extension_exceptions",ov="$web_vitals_enabled_server_side",ux="$dead_clicks_enabled_server_side",av="$web_vitals_allowed_metrics",zu="$session_recording_remote_config",Od="$session_recording_enabled_server_side",lv="$console_log_recording_enabled_server_side",uv="$session_recording_network_payload_capture",cv="$session_recording_masking",dv="$session_recording_canvas_recording",fv="$replay_sample_rate",hv="$replay_minimum_duration",pv="$replay_script_config",Qa="$sesid",si="$session_is_sampled",Ld="$session_recording_url_trigger_activated_session",Dd="$session_recording_event_trigger_activated_session",oi="$enabled_feature_flags",cs="$early_access_features",$d="$feature_flag_details",ds="$stored_person_properties",hr="$stored_group_properties",Fd="$surveys",Bo="$surveys_activated",Za="$flag_call_reported",cn="$user_state",jd="$client_session_props",Vd="$capture_rate_limit",Bd="$initial_campaign_params",zd="$initial_referrer_info",Ja="$initial_person_info",el="$epp",cx="__POSTHOG_TOOLBAR__",Yi="$posthog_cookieless",G2=[lx,ls,"__cmpns",us,Od,Id,Qa,oi,Nd,cn,cs,$d,hr,ds,Fd,Za,jd,Vd,Bd,zd,el,Ja];function gv(t){return t instanceof Element&&(t.id===cx||!(t.closest==null||!t.closest(".toolbar-global-fade-container")))}function zl(t){return!!t&&t.nodeType===1}function Yn(t,e){return!!t&&!!t.tagName&&t.tagName.toLowerCase()===e.toLowerCase()}function dx(t){return!!t&&t.nodeType===3}function fx(t){return!!t&&t.nodeType===11}function Kh(t){return t?jl(t).split(/\s+/):[]}function mv(t){var e=b==null?void 0:b.location.href;return!!(e&&t&&t.some(n=>e.match(n)))}function tl(t){var e="";switch(typeof t.className){case"string":e=t.className;break;case"object":e=(t.className&&"baseVal"in t.className?t.className.baseVal:null)||t.getAttribute("class")||"";break;default:e=""}return Kh(e)}function hx(t){return Z(t)?null:jl(t).split(/(\s+)/).filter(e=>Pi(e)).join("").replace(/[\r\n]/g," ").replace(/[ ]+/g," ").substring(0,255)}function Ul(t){var e="";return Ud(t)&&!yx(t)&&t.childNodes&&t.childNodes.length&&re(t.childNodes,function(n){var r;dx(n)&&n.textContent&&(e+=(r=hx(n.textContent))!==null&&r!==void 0?r:"")}),jl(e)}function px(t){return L(t.target)?t.srcElement||null:(e=t.target)!=null&&e.shadowRoot?t.composedPath()[0]||null:t.target||null;var e}var Gh=["a","button","form","input","select","textarea","label"];function gx(t,e){if(L(e))return!0;var n,r=function(s){if(e.some(o=>s.matches(o)))return{v:!0}};for(var i of t)if(n=r(i))return n.v;return!1}function mx(t){var e=t.parentNode;return!(!e||!zl(e))&&e}var vv=[".ph-no-rageclick",".ph-no-capture"],qh=t=>!t||Yn(t,"html")||!zl(t),vx=(t,e)=>{if(!b||qh(t))return{parentIsUsefulElement:!1,targetElementList:[]};for(var n=!1,r=[t],i=t;i.parentNode&&!Yn(i,"body");)if(fx(i.parentNode))r.push(i.parentNode.host),i=i.parentNode.host;else{var s=mx(i);if(!s)break;if(e||Gh.indexOf(s.tagName.toLowerCase())>-1)n=!0;else{var o=b.getComputedStyle(s);o&&o.getPropertyValue("cursor")==="pointer"&&(n=!0)}r.push(s),i=s}return{parentIsUsefulElement:n,targetElementList:r}};function q2(t,e,n,r,i){var s,o,a,l;if(n===void 0&&(n=void 0),!b||qh(t)||(s=n)!=null&&s.url_allowlist&&!mv(n.url_allowlist)||(o=n)!=null&&o.url_ignorelist&&mv(n.url_ignorelist))return!1;if((a=n)!=null&&a.dom_event_allowlist){var u=n.dom_event_allowlist;if(u&&!u.some(y=>e.type===y))return!1}var{parentIsUsefulElement:c,targetElementList:d}=vx(t,r);if(!function(y,m){var _=m==null?void 0:m.element_allowlist;if(L(_))return!0;var p,g=function(w){if(_.some(E=>w.tagName.toLowerCase()===E))return{v:!0}};for(var v of y)if(p=g(v))return p.v;return!1}(d,n)||!gx(d,(l=n)==null?void 0:l.css_selector_allowlist))return!1;var f=b.getComputedStyle(t);if(f&&f.getPropertyValue("cursor")==="pointer"&&e.type==="click")return!0;var h=t.tagName.toLowerCase();switch(h){case"html":return!1;case"form":return(i||["submit"]).indexOf(e.type)>=0;case"input":case"select":case"textarea":return(i||["change","click"]).indexOf(e.type)>=0;default:return c?(i||["click"]).indexOf(e.type)>=0:(i||["click"]).indexOf(e.type)>=0&&(Gh.indexOf(h)>-1||t.getAttribute("contenteditable")==="true")}}function Ud(t){for(var e=t;e.parentNode&&!Yn(e,"body");e=e.parentNode){var n=tl(e);if(X(n,"ph-sensitive")||X(n,"ph-no-capture"))return!1}if(X(tl(t),"ph-include"))return!0;var r=t.type||"";if(xe(r))switch(r.toLowerCase()){case"hidden":case"password":return!1}var i=t.name||t.id||"";return!(xe(i)&&/^cc|cardnum|ccnum|creditcard|csc|cvc|cvv|exp|pass|pwd|routing|seccode|securitycode|securitynum|socialsec|socsec|ssn/i.test(i.replace(/[^a-zA-Z0-9]/g,"")))}function yx(t){return!!(Yn(t,"input")&&!["button","checkbox","submit","reset"].includes(t.type)||Yn(t,"select")||Yn(t,"textarea")||t.getAttribute("contenteditable")==="true")}var _x="(4[0-9]{12}(?:[0-9]{3})?)|(5[1-5][0-9]{14})|(6(?:011|5[0-9]{2})[0-9]{12})|(3[47][0-9]{13})|(3(?:0[0-5]|[68][0-9])[0-9]{11})|((?:2131|1800|35[0-9]{3})[0-9]{11})",Y2=new RegExp("^(?:"+_x+")$"),X2=new RegExp(_x),wx="\\d{3}-?\\d{2}-?\\d{4}",Q2=new RegExp("^("+wx+")$"),Z2=new RegExp("("+wx+")");function Pi(t,e){return e===void 0&&(e=!0),!(Z(t)||xe(t)&&(t=jl(t),(e?Y2:X2).test((t||"").replace(/[- ]/g,""))||(e?Q2:Z2).test(t)))}function xx(t){var e=Ul(t);return Pi(e=(e+" "+Sx(t)).trim())?e:""}function Sx(t){var e="";return t&&t.childNodes&&t.childNodes.length&&re(t.childNodes,function(n){var r;if(n&&((r=n.tagName)==null?void 0:r.toLowerCase())==="span")try{var i=Ul(n);e=(e+" "+i).trim(),n.childNodes&&n.childNodes.length&&(e=(e+" "+Sx(n)).trim())}catch(s){V.error("[AutoCapture]",s)}}),e}function J2(t){return function(e){var n=e.map(r=>{var i,s,o="";if(r.tag_name&&(o+=r.tag_name),r.attr_class)for(var a of(r.attr_class.sort(),r.attr_class))o+="."+a.replace(/"/g,"");var l=F({},r.text?{text:r.text}:{},{"nth-child":(i=r.nth_child)!==null&&i!==void 0?i:0,"nth-of-type":(s=r.nth_of_type)!==null&&s!==void 0?s:0},r.href?{href:r.href}:{},r.attr_id?{attr_id:r.attr_id}:{},r.attributes),u={};return da(l).sort((c,d)=>{var[f]=c,[h]=d;return f.localeCompare(h)}).forEach(c=>{var[d,f]=c;return u[yv(d.toString())]=yv(f.toString())}),o+=":",o+=da(u).map(c=>{var[d,f]=c;return d+'="'+f+'"'}).join("")});return n.join(";")}(function(e){return e.map(n=>{var r,i,s={text:(r=n.$el_text)==null?void 0:r.slice(0,400),tag_name:n.tag_name,href:(i=n.attr__href)==null?void 0:i.slice(0,2048),attr_class:eI(n),attr_id:n.attr__id,nth_child:n.nth_child,nth_of_type:n.nth_of_type,attributes:{}};return da(n).filter(o=>{var[a]=o;return a.indexOf("attr__")===0}).forEach(o=>{var[a,l]=o;return s.attributes[a]=l}),s})}(t))}function yv(t){return t.replace(/"|\\"/g,'\\"')}function eI(t){var e=t.attr__class;return e?ie(e)?e:Kh(e):void 0}class Ex{constructor(){this.clicks=[]}isRageClick(e,n,r){var i=this.clicks[this.clicks.length-1];if(i&&Math.abs(e-i.x)+Math.abs(n-i.y)<30&&r-i.timestamp<1e3){if(this.clicks.push({x:e,y:n,timestamp:r}),this.clicks.length===3)return!0}else this.clicks=[{x:e,y:n,timestamp:r}];return!1}}var Uu="$copy_autocapture",pn=function(t){return t.GZipJS="gzip-js",t.Base64="base64",t}({}),tI=["localhost","127.0.0.1"],Ti=t=>{var e=B==null?void 0:B.createElement("a");return L(e)?null:(e.href=t,e)},nI=function(t,e){var n,r;e===void 0&&(e="&");var i=[];return re(t,function(s,o){L(s)||L(o)||o==="undefined"||(n=encodeURIComponent((a=>a instanceof File)(s)?s.name:s.toString()),r=encodeURIComponent(o),i[i.length]=r+"="+n)}),i.join(e)},nl=function(t,e){for(var n,r=((t.split("#")[0]||"").split(/\?(.*)/)[1]||"").replace(/^\?+/g,"").split("&"),i=0;i<r.length;i++){var s=r[i].split("=");if(s[0]===e){n=s;break}}if(!ie(n)||n.length<2)return"";var o=n[1];try{o=decodeURIComponent(o)}catch{V.error("Skipping decoding for malformed query param: "+o)}return o.replace(/\+/g," ")},Yh=function(t,e,n){if(!t||!e||!e.length)return t;for(var r=t.split("#"),i=r[0]||"",s=r[1],o=i.split("?"),a=o[1],l=o[0],u=(a||"").split("&"),c=[],d=0;d<u.length;d++){var f=u[d].split("=");ie(f)&&(e.includes(f[0])?c.push(f[0]+"="+n):c.push(u[d]))}var h=l;return a!=null&&(h+="?"+c.join("&")),s!=null&&(h+="#"+s),h},rl=function(t,e){var n=t.match(new RegExp(e+"=([^&]*)"));return n?n[1]:null},_v=Re("[AutoCapture]");function Hu(t,e){return e.length>t?e.slice(0,t)+"...":e}function rI(t){if(t.previousElementSibling)return t.previousElementSibling;var e=t;do e=e.previousSibling;while(e&&!zl(e));return e}function iI(t,e,n,r){var i=t.tagName.toLowerCase(),s={tag_name:i};Gh.indexOf(i)>-1&&!n&&(i.toLowerCase()==="a"||i.toLowerCase()==="button"?s.$el_text=Hu(1024,xx(t)):s.$el_text=Hu(1024,Ul(t)));var o=tl(t);o.length>0&&(s.classes=o.filter(function(c){return c!==""})),re(t.attributes,function(c){var d;if((!yx(t)||["name","id","class","aria-label"].indexOf(c.name)!==-1)&&(r==null||!r.includes(c.name))&&!e&&Pi(c.value)&&(d=c.name,!xe(d)||d.substring(0,10)!=="_ngcontent"&&d.substring(0,7)!=="_nghost")){var f=c.value;c.name==="class"&&(f=Kh(f).join(" ")),s["attr__"+c.name]=Hu(1024,f)}});for(var a=1,l=1,u=t;u=rI(u);)a++,u.tagName===t.tagName&&l++;return s.nth_child=a,s.nth_of_type=l,s}function sI(t,e){for(var n,r,{e:i,maskAllElementAttributes:s,maskAllText:o,elementAttributeIgnoreList:a,elementsChainAsString:l}=e,u=[t],c=t;c.parentNode&&!Yn(c,"body");)fx(c.parentNode)?(u.push(c.parentNode.host),c=c.parentNode.host):(u.push(c.parentNode),c=c.parentNode);var d,f=[],h={},y=!1,m=!1;if(re(u,w=>{var E=Ud(w);w.tagName.toLowerCase()==="a"&&(y=w.getAttribute("href"),y=E&&y&&Pi(y)&&y),X(tl(w),"ph-no-capture")&&(m=!0),f.push(iI(w,s,o,a));var P=function(C){if(!Ud(C))return{};var S={};return re(C.attributes,function(A){if(A.name&&A.name.indexOf("data-ph-capture-attribute")===0){var M=A.name.replace("data-ph-capture-attribute-",""),O=A.value;M&&O&&Pi(O)&&(S[M]=O)}}),S}(w);Ee(h,P)}),m)return{props:{},explicitNoCapture:m};if(o||(t.tagName.toLowerCase()==="a"||t.tagName.toLowerCase()==="button"?f[0].$el_text=xx(t):f[0].$el_text=Ul(t)),y){var _,p;f[0].attr__href=y;var g=(_=Ti(y))==null?void 0:_.host,v=b==null||(p=b.location)==null?void 0:p.host;g&&v&&g!==v&&(d=y)}return{props:Ee({$event_type:i.type,$ce_version:1},l?{}:{$elements:f},{$elements_chain:J2(f)},(n=f[0])!=null&&n.$el_text?{$el_text:(r=f[0])==null?void 0:r.$el_text}:{},d&&i.type==="click"?{$external_click_url:d}:{},h)}}class oI{constructor(e){this.C=!1,this.M=null,this.rageclicks=new Ex,this.O=!1,this.instance=e,this.F=null}get A(){var e,n,r=we(this.instance.config.autocapture)?this.instance.config.autocapture:{};return r.url_allowlist=(e=r.url_allowlist)==null?void 0:e.map(i=>new RegExp(i)),r.url_ignorelist=(n=r.url_ignorelist)==null?void 0:n.map(i=>new RegExp(i)),r}D(){if(this.isBrowserSupported()){if(b&&B){var e=r=>{r=r||(b==null?void 0:b.event);try{this.j(r)}catch(i){_v.error("Failed to capture event",i)}};if(pe(B,"submit",e,{capture:!0}),pe(B,"change",e,{capture:!0}),pe(B,"click",e,{capture:!0}),this.A.capture_copied_text){var n=r=>{r=r||(b==null?void 0:b.event),this.j(r,Uu)};pe(B,"copy",n,{capture:!0}),pe(B,"cut",n,{capture:!0})}}}else _v.info("Disabling Automatic Event Collection because this browser is not supported")}startIfEnabled(){this.isEnabled&&!this.C&&(this.D(),this.C=!0)}onRemoteConfig(e){e.elementsChainAsString&&(this.O=e.elementsChainAsString),this.instance.persistence&&this.instance.persistence.register({[rv]:!!e.autocapture_opt_out}),this.M=!!e.autocapture_opt_out,this.startIfEnabled()}setElementSelectors(e){this.F=e}getElementSelectors(e){var n,r=[];return(n=this.F)==null||n.forEach(i=>{var s=B==null?void 0:B.querySelectorAll(i);s==null||s.forEach(o=>{e===o&&r.push(i)})}),r}get isEnabled(){var e,n,r=(e=this.instance.persistence)==null?void 0:e.props[rv],i=this.M;if(bn(i)&&!Bt(r)&&!this.instance.L())return!1;var s=(n=this.M)!==null&&n!==void 0?n:!!r;return!!this.instance.config.autocapture&&!s}j(e,n){if(n===void 0&&(n="$autocapture"),this.isEnabled){var r,i=px(e);dx(i)&&(i=i.parentNode||null),n==="$autocapture"&&e.type==="click"&&e instanceof MouseEvent&&this.instance.config.rageclick&&(r=this.rageclicks)!=null&&r.isRageClick(e.clientX,e.clientY,new Date().getTime())&&function(f,h){if(!b||qh(f))return!1;var y,m;if((y=Bt(h)?!!h&&vv:(m=h==null?void 0:h.css_selector_ignorelist)!==null&&m!==void 0?m:vv)===!1)return!1;var{targetElementList:_}=vx(f,!1);return!gx(_,y)}(i,this.instance.config.rageclick)&&this.j(e,"$rageclick");var s=n===Uu;if(i&&q2(i,e,this.A,s,s?["copy","cut"]:void 0)){var{props:o,explicitNoCapture:a}=sI(i,{e,maskAllElementAttributes:this.instance.config.mask_all_element_attributes,maskAllText:this.instance.config.mask_all_text,elementAttributeIgnoreList:this.A.element_attribute_ignorelist,elementsChainAsString:this.O});if(a)return!1;var l=this.getElementSelectors(i);if(l&&l.length>0&&(o.$element_selectors=l),n===Uu){var u,c=hx(b==null||(u=b.getSelection())==null?void 0:u.toString()),d=e.type||"clipboard";if(!c)return!1;o.$selected_content=c,o.$copy_type=d}return this.instance.capture(n,o),!0}}}isBrowserSupported(){return At(B==null?void 0:B.querySelectorAll)}}Math.trunc||(Math.trunc=function(t){return t<0?Math.ceil(t):Math.floor(t)}),Number.isInteger||(Number.isInteger=function(t){return He(t)&&isFinite(t)&&Math.floor(t)===t});var wv="0123456789abcdef";class il{constructor(e){if(this.bytes=e,e.length!==16)throw new TypeError("not 128-bit length")}static fromFieldsV7(e,n,r,i){if(!Number.isInteger(e)||!Number.isInteger(n)||!Number.isInteger(r)||!Number.isInteger(i)||e<0||n<0||r<0||i<0||e>0xffffffffffff||n>4095||r>1073741823||i>4294967295)throw new RangeError("invalid field value");var s=new Uint8Array(16);return s[0]=e/Math.pow(2,40),s[1]=e/Math.pow(2,32),s[2]=e/Math.pow(2,24),s[3]=e/Math.pow(2,16),s[4]=e/Math.pow(2,8),s[5]=e,s[6]=112|n>>>8,s[7]=n,s[8]=128|r>>>24,s[9]=r>>>16,s[10]=r>>>8,s[11]=r,s[12]=i>>>24,s[13]=i>>>16,s[14]=i>>>8,s[15]=i,new il(s)}toString(){for(var e="",n=0;n<this.bytes.length;n++)e=e+wv.charAt(this.bytes[n]>>>4)+wv.charAt(15&this.bytes[n]),n!==3&&n!==5&&n!==7&&n!==9||(e+="-");if(e.length!==36)throw new Error("Invalid UUIDv7 was generated");return e}clone(){return new il(this.bytes.slice(0))}equals(e){return this.compareTo(e)===0}compareTo(e){for(var n=0;n<16;n++){var r=this.bytes[n]-e.bytes[n];if(r!==0)return Math.sign(r)}return 0}}class aI{constructor(){this.N=0,this.U=0,this.B=new lI}generate(){var e=this.generateOrAbort();if(L(e)){this.N=0;var n=this.generateOrAbort();if(L(n))throw new Error("Could not generate UUID after timestamp reset");return n}return e}generateOrAbort(){var e=Date.now();if(e>this.N)this.N=e,this.q();else{if(!(e+1e4>this.N))return;this.U++,this.U>4398046511103&&(this.N++,this.q())}return il.fromFieldsV7(this.N,Math.trunc(this.U/Math.pow(2,30)),this.U&Math.pow(2,30)-1,this.B.nextUint32())}q(){this.U=1024*this.B.nextUint32()+(1023&this.B.nextUint32())}}var xv,kx=t=>{if(typeof UUIDV7_DENY_WEAK_RNG<"u"&&UUIDV7_DENY_WEAK_RNG)throw new Error("no cryptographically strong RNG available");for(var e=0;e<t.length;e++)t[e]=65536*Math.trunc(65536*Math.random())+Math.trunc(65536*Math.random());return t};b&&!L(b.crypto)&&crypto.getRandomValues&&(kx=t=>crypto.getRandomValues(t));class lI{constructor(){this.H=new Uint32Array(8),this.W=1/0}nextUint32(){return this.W>=this.H.length&&(kx(this.H),this.W=0),this.H[this.W++]}}var jn=()=>uI().toString(),uI=()=>(xv||(xv=new aI)).generate(),Xi="",cI=/[a-z0-9][a-z0-9-]+\.[a-z]{2,}$/i;function dI(t,e){if(e){var n=function(i,s){if(s===void 0&&(s=B),Xi)return Xi;if(!s||["localhost","127.0.0.1"].includes(i))return"";for(var o=i.split("."),a=Math.min(o.length,8),l="dmn_chk_"+jn();!Xi&&a--;){var u=o.slice(a).join("."),c=l+"=1;domain=."+u+";path=/";s.cookie=c+";max-age=3",s.cookie.includes(l)&&(s.cookie=c+";max-age=0",Xi=u)}return Xi}(t);if(!n){var r=(i=>{var s=i.match(cI);return s?s[0]:""})(t);r!==n&&V.info("Warning: cookie subdomain discovery mismatch",r,n),n=r}return n?"; domain=."+n:""}return""}var sn={G:()=>!!B,V:function(t){V.error("cookieStore error: "+t)},J:function(t){if(B){try{for(var e=t+"=",n=B.cookie.split(";").filter(s=>s.length),r=0;r<n.length;r++){for(var i=n[r];i.charAt(0)==" ";)i=i.substring(1,i.length);if(i.indexOf(e)===0)return decodeURIComponent(i.substring(e.length,i.length))}}catch{}return null}},K:function(t){var e;try{e=JSON.parse(sn.J(t))||{}}catch{}return e},Y:function(t,e,n,r,i){if(B)try{var s="",o="",a=dI(B.location.hostname,r);if(n){var l=new Date;l.setTime(l.getTime()+24*n*60*60*1e3),s="; expires="+l.toUTCString()}i&&(o="; secure");var u=t+"="+encodeURIComponent(JSON.stringify(e))+s+"; SameSite=Lax; path=/"+a+o;return u.length>3686.4&&V.warn("cookieStore warning: large cookie, len="+u.length),B.cookie=u,u}catch{return}},X:function(t,e){if(B!=null&&B.cookie)try{sn.Y(t,"",-1,e)}catch{return}}},Wu=null,Te={G:function(){if(!bn(Wu))return Wu;var t=!0;if(L(b))t=!1;else try{var e="__mplssupport__";Te.Y(e,"xyz"),Te.J(e)!=='"xyz"'&&(t=!1),Te.X(e)}catch{t=!1}return t||V.error("localStorage unsupported; falling back to cookie store"),Wu=t,t},V:function(t){V.error("localStorage error: "+t)},J:function(t){try{return b==null?void 0:b.localStorage.getItem(t)}catch(e){Te.V(e)}return null},K:function(t){try{return JSON.parse(Te.J(t))||{}}catch{}return null},Y:function(t,e){try{b==null||b.localStorage.setItem(t,JSON.stringify(e))}catch(n){Te.V(n)}},X:function(t){try{b==null||b.localStorage.removeItem(t)}catch(e){Te.V(e)}}},fI=["distinct_id",Qa,si,el,Ja],zo=F({},Te,{K:function(t){try{var e={};try{e=sn.K(t)||{}}catch{}var n=Ee(e,JSON.parse(Te.J(t)||"{}"));return Te.Y(t,n),n}catch{}return null},Y:function(t,e,n,r,i,s){try{Te.Y(t,e,void 0,void 0,s);var o={};fI.forEach(a=>{e[a]&&(o[a]=e[a])}),Object.keys(o).length&&sn.Y(t,o,n,r,i,s)}catch(a){Te.V(a)}},X:function(t,e){try{b==null||b.localStorage.removeItem(t),sn.X(t,e)}catch(n){Te.V(n)}}}),Uo={},hI={G:function(){return!0},V:function(t){V.error("memoryStorage error: "+t)},J:function(t){return Uo[t]||null},K:function(t){return Uo[t]||null},Y:function(t,e){Uo[t]=e},X:function(t){delete Uo[t]}},or=null,De={G:function(){if(!bn(or))return or;if(or=!0,L(b))or=!1;else try{var t="__support__";De.Y(t,"xyz"),De.J(t)!=='"xyz"'&&(or=!1),De.X(t)}catch{or=!1}return or},V:function(t){V.error("sessionStorage error: ",t)},J:function(t){try{return b==null?void 0:b.sessionStorage.getItem(t)}catch(e){De.V(e)}return null},K:function(t){try{return JSON.parse(De.J(t))||null}catch{}return null},Y:function(t,e){try{b==null||b.sessionStorage.setItem(t,JSON.stringify(e))}catch(n){De.V(n)}},X:function(t){try{b==null||b.sessionStorage.removeItem(t)}catch(e){De.V(e)}}},dn=function(t){return t[t.PENDING=-1]="PENDING",t[t.DENIED=0]="DENIED",t[t.GRANTED=1]="GRANTED",t}({});class pI{constructor(e){this._instance=e}get A(){return this._instance.config}get consent(){return this.Z()?dn.DENIED:this.tt}isOptedOut(){return this.A.cookieless_mode==="always"||this.consent===dn.DENIED||this.consent===dn.PENDING&&(this.A.opt_out_capturing_by_default||this.A.cookieless_mode==="on_reject")}isOptedIn(){return!this.isOptedOut()}isExplicitlyOptedOut(){return this.consent===dn.DENIED}optInOut(e){this.it.Y(this.et,e?1:0,this.A.cookie_expiration,this.A.cross_subdomain_cookie,this.A.secure_cookie)}reset(){this.it.X(this.et,this.A.cross_subdomain_cookie)}get et(){var{token:e,opt_out_capturing_cookie_prefix:n,consent_persistence_name:r}=this._instance.config;return r||(n?n+e:"__ph_opt_in_out_"+e)}get tt(){var e=this.it.J(this.et);return Vu(e)?dn.GRANTED:X(w2,e)?dn.DENIED:dn.PENDING}get it(){if(!this.rt){var e=this.A.opt_out_capturing_persistence_type;this.rt=e==="localStorage"?Te:sn;var n=e==="localStorage"?sn:Te;n.J(this.et)&&(this.rt.J(this.et)||this.optInOut(Vu(n.J(this.et))),n.X(this.et,this.A.cross_subdomain_cookie))}return this.rt}Z(){return!!this.A.respect_dnt&&!!ax([gt==null?void 0:gt.doNotTrack,gt==null?void 0:gt.msDoNotTrack,H.doNotTrack],e=>Vu(e))}}var Ho=Re("[Dead Clicks]"),gI=()=>!0,mI=t=>{var e,n=!((e=t.instance.persistence)==null||!e.get_property(ux)),r=t.instance.config.capture_dead_clicks;return Bt(r)?r:n};class Cx{get lazyLoadedDeadClicksAutocapture(){return this.st}constructor(e,n,r){this.instance=e,this.isEnabled=n,this.onCapture=r,this.startIfEnabled()}onRemoteConfig(e){this.instance.persistence&&this.instance.persistence.register({[ux]:e==null?void 0:e.captureDeadClicks}),this.startIfEnabled()}startIfEnabled(){this.isEnabled(this)&&this.nt(()=>{this.ot()})}nt(e){var n,r;(n=H.__PosthogExtensions__)!=null&&n.initDeadClicksAutocapture&&e(),(r=H.__PosthogExtensions__)==null||r.loadExternalDependency==null||r.loadExternalDependency(this.instance,"dead-clicks-autocapture",i=>{i?Ho.error("failed to load script",i):e()})}ot(){var e;if(B){if(!this.st&&(e=H.__PosthogExtensions__)!=null&&e.initDeadClicksAutocapture){var n=we(this.instance.config.capture_dead_clicks)?this.instance.config.capture_dead_clicks:{};n.__onCapture=this.onCapture,this.st=H.__PosthogExtensions__.initDeadClicksAutocapture(this.instance,n),this.st.start(B),Ho.info("starting...")}}else Ho.error("`document` not found. Cannot start.")}stop(){this.st&&(this.st.stop(),this.st=void 0,Ho.info("stopping..."))}}var Qi=Re("[ExceptionAutocapture]");class vI{constructor(e){var n,r,i;this.lt=()=>{var s;if(b&&this.isEnabled&&(s=H.__PosthogExtensions__)!=null&&s.errorWrappingFunctions){var o=H.__PosthogExtensions__.errorWrappingFunctions.wrapOnError,a=H.__PosthogExtensions__.errorWrappingFunctions.wrapUnhandledRejection,l=H.__PosthogExtensions__.errorWrappingFunctions.wrapConsoleError;try{!this.ut&&this.A.capture_unhandled_errors&&(this.ut=o(this.captureException.bind(this))),!this.ht&&this.A.capture_unhandled_rejections&&(this.ht=a(this.captureException.bind(this))),!this.dt&&this.A.capture_console_errors&&(this.dt=l(this.captureException.bind(this)))}catch(u){Qi.error("failed to start",u),this.vt()}}},this._instance=e,this.ct=!((n=this._instance.persistence)==null||!n.props[iv]),this.A=this.ft(),this.gt=new rx({refillRate:(r=this._instance.config.error_tracking.__exceptionRateLimiterRefillRate)!==null&&r!==void 0?r:1,bucketSize:(i=this._instance.config.error_tracking.__exceptionRateLimiterBucketSize)!==null&&i!==void 0?i:10,refillInterval:1e4,R:Qi}),this.startIfEnabled()}ft(){var e=this._instance.config.capture_exceptions,n={capture_unhandled_errors:!1,capture_unhandled_rejections:!1,capture_console_errors:!1};return we(e)?n=F({},n,e):(L(e)?this.ct:e)&&(n=F({},n,{capture_unhandled_errors:!0,capture_unhandled_rejections:!0})),n}get isEnabled(){return this.A.capture_console_errors||this.A.capture_unhandled_errors||this.A.capture_unhandled_rejections}startIfEnabled(){this.isEnabled&&(Qi.info("enabled"),this.nt(this.lt))}nt(e){var n,r;(n=H.__PosthogExtensions__)!=null&&n.errorWrappingFunctions&&e(),(r=H.__PosthogExtensions__)==null||r.loadExternalDependency==null||r.loadExternalDependency(this._instance,"exception-autocapture",i=>{if(i)return Qi.error("failed to load script",i);e()})}vt(){var e,n,r;(e=this.ut)==null||e.call(this),this.ut=void 0,(n=this.ht)==null||n.call(this),this.ht=void 0,(r=this.dt)==null||r.call(this),this.dt=void 0}onRemoteConfig(e){var n=e.autocaptureExceptions;this.ct=!!n||!1,this.A=this.ft(),this._instance.persistence&&this._instance.persistence.register({[iv]:this.ct}),this.startIfEnabled()}captureException(e){var n,r,i=(n=e==null||(r=e.$exception_list)==null||(r=r[0])==null?void 0:r.type)!==null&&n!==void 0?n:"Exception";this.gt.consumeRateLimit(i)?Qi.info("Skipping exception capture because of client rate limiting.",{exception:i}):this._instance.exceptions.sendExceptionEvent(e)}}function Sv(t,e,n){try{if(!(e in t))return()=>{};var r=t[e],i=n(r);return At(i)&&(i.prototype=i.prototype||{},Object.defineProperties(i,{__posthog_wrapped__:{enumerable:!1,value:!0}})),t[e]=i,()=>{t[e]=r}}catch{return()=>{}}}class yI{constructor(e){var n;this._instance=e,this._t=(b==null||(n=b.location)==null?void 0:n.pathname)||""}get isEnabled(){return this._instance.config.capture_pageview==="history_change"}startIfEnabled(){this.isEnabled&&(V.info("History API monitoring enabled, starting..."),this.monitorHistoryChanges())}stop(){this.yt&&this.yt(),this.yt=void 0,V.info("History API monitoring stopped")}monitorHistoryChanges(){var e,n;if(b&&b.history){var r=this;(e=b.history.pushState)!=null&&e.__posthog_wrapped__||Sv(b.history,"pushState",i=>function(s,o,a){i.call(this,s,o,a),r.bt("pushState")}),(n=b.history.replaceState)!=null&&n.__posthog_wrapped__||Sv(b.history,"replaceState",i=>function(s,o,a){i.call(this,s,o,a),r.bt("replaceState")}),this.wt()}}bt(e){try{var n,r=b==null||(n=b.location)==null?void 0:n.pathname;if(!r)return;r!==this._t&&this.isEnabled&&this._instance.capture("$pageview",{navigation_type:e}),this._t=r}catch(i){V.error("Error capturing "+e+" pageview",i)}}wt(){if(!this.yt){var e=()=>{this.bt("popstate")};pe(b,"popstate",e),this.yt=()=>{b&&b.removeEventListener("popstate",e)}}}}function Rs(t){var e,n;return((e=JSON.stringify(t,(n=[],function(r,i){if(we(i)){for(;n.length>0&&n[n.length-1]!==this;)n.pop();return n.includes(i)?"[Circular]":(n.push(i),i)}return i})))==null?void 0:e.length)||0}function Hd(t,e){if(e===void 0&&(e=66060288e-1),t.size>=e&&t.data.length>1){var n=Math.floor(t.data.length/2),r=t.data.slice(0,n),i=t.data.slice(n);return[Hd({size:Rs(r),data:r,sessionId:t.sessionId,windowId:t.windowId}),Hd({size:Rs(i),data:i,sessionId:t.sessionId,windowId:t.windowId})].flatMap(s=>s)}return[t]}var Qt=(t=>(t[t.DomContentLoaded=0]="DomContentLoaded",t[t.Load=1]="Load",t[t.FullSnapshot=2]="FullSnapshot",t[t.IncrementalSnapshot=3]="IncrementalSnapshot",t[t.Meta=4]="Meta",t[t.Custom=5]="Custom",t[t.Plugin=6]="Plugin",t))(Qt||{}),Ft=(t=>(t[t.Mutation=0]="Mutation",t[t.MouseMove=1]="MouseMove",t[t.MouseInteraction=2]="MouseInteraction",t[t.Scroll=3]="Scroll",t[t.ViewportResize=4]="ViewportResize",t[t.Input=5]="Input",t[t.TouchMove=6]="TouchMove",t[t.MediaInteraction=7]="MediaInteraction",t[t.StyleSheetRule=8]="StyleSheetRule",t[t.CanvasMutation=9]="CanvasMutation",t[t.Font=10]="Font",t[t.Log=11]="Log",t[t.Drag=12]="Drag",t[t.StyleDeclaration=13]="StyleDeclaration",t[t.Selection=14]="Selection",t[t.AdoptedStyleSheet=15]="AdoptedStyleSheet",t[t.CustomElement=16]="CustomElement",t))(Ft||{}),Wd="[SessionRecording]",Kd="redacted",Wo={initiatorTypes:["audio","beacon","body","css","early-hint","embed","fetch","frame","iframe","icon","image","img","input","link","navigation","object","ping","script","track","video","xmlhttprequest"],maskRequestFn:t=>t,recordHeaders:!1,recordBody:!1,recordInitialRequests:!1,recordPerformance:!1,performanceEntryTypeToObserve:["first-input","navigation","paint","resource"],payloadSizeLimitBytes:1e6,payloadHostDenyList:[".lr-ingest.io",".ingest.sentry.io",".clarity.ms","analytics.google.com","bam.nr-data.net"]},_I=["authorization","x-forwarded-for","authorization","cookie","set-cookie","x-api-key","x-real-ip","remote-addr","forwarded","proxy-authorization","x-csrf-token","x-csrftoken","x-xsrf-token"],wI=["password","secret","passwd","api_key","apikey","auth","credentials","mysql_pwd","privatekey","private_key","token"],xI=["/s/","/e/","/i/"];function Ev(t,e,n,r){if(Z(t))return t;var i=(e==null?void 0:e["content-length"])||function(s){return new Blob([s]).size}(t);return xe(i)&&(i=parseInt(i)),i>n?Wd+" "+r+" body too large to record ("+i+" bytes)":t}function kv(t,e){if(Z(t))return t;var n=t;return Pi(n,!1)||(n=Wd+" "+e+" body "+Kd),re(wI,r=>{var i,s;(i=n)!=null&&i.length&&((s=n)==null?void 0:s.indexOf(r))!==-1&&(n=Wd+" "+e+" body "+Kd+" as might contain: "+r)}),n}var SI=(t,e)=>{var n,r,i,s={payloadSizeLimitBytes:Wo.payloadSizeLimitBytes,performanceEntryTypeToObserve:[...Wo.performanceEntryTypeToObserve],payloadHostDenyList:[...e.payloadHostDenyList||[],...Wo.payloadHostDenyList]},o=t.session_recording.recordHeaders!==!1&&e.recordHeaders,a=t.session_recording.recordBody!==!1&&e.recordBody,l=t.capture_performance!==!1&&e.recordPerformance,u=(n=s,i=Math.min(1e6,(r=n.payloadSizeLimitBytes)!==null&&r!==void 0?r:1e6),f=>(f!=null&&f.requestBody&&(f.requestBody=Ev(f.requestBody,f.requestHeaders,i,"Request")),f!=null&&f.responseBody&&(f.responseBody=Ev(f.responseBody,f.responseHeaders,i,"Response")),f)),c=f=>{return u(((m,_)=>{var p,g=Ti(m.name),v=_.indexOf("http")===0?(p=Ti(_))==null?void 0:p.pathname:_;v==="/"&&(v="");var w=g==null?void 0:g.pathname.replace(v||"","");if(!(g&&w&&xI.some(E=>w.indexOf(E)===0)))return m})((y=(h=f).requestHeaders,Z(y)||re(Object.keys(y??{}),m=>{_I.includes(m.toLowerCase())&&(y[m]=Kd)}),h),t.api_host));var h,y},d=At(t.session_recording.maskNetworkRequestFn);return d&&At(t.session_recording.maskCapturedNetworkRequestFn)&&V.warn("Both `maskNetworkRequestFn` and `maskCapturedNetworkRequestFn` are defined. `maskNetworkRequestFn` will be ignored."),d&&(t.session_recording.maskCapturedNetworkRequestFn=f=>{var h=t.session_recording.maskNetworkRequestFn({url:f.name});return F({},f,{name:h==null?void 0:h.url})}),s.maskRequestFn=At(t.session_recording.maskCapturedNetworkRequestFn)?f=>{var h,y=c(f);return y&&(h=t.session_recording.maskCapturedNetworkRequestFn==null?void 0:t.session_recording.maskCapturedNetworkRequestFn(y))!==null&&h!==void 0?h:void 0}:f=>function(h){if(!L(h))return h.requestBody=kv(h.requestBody,"Request"),h.responseBody=kv(h.responseBody,"Response"),h}(c(f)),F({},Wo,s,{recordHeaders:o,recordBody:a,recordPerformance:l,recordInitialRequests:l})};class EI{constructor(e,n){var r,i;n===void 0&&(n={}),this.St={},this.kt=s=>{if(!this.St[s]){var o,a;this.St[s]=!0;var l=this.$t(s);(o=(a=this.t).onBlockedNode)==null||o.call(a,s,l)}},this.xt=s=>{var o=this.$t(s);if((o==null?void 0:o.nodeName)!=="svg"&&o instanceof Element){var a=o.closest("svg");if(a)return[this._rrweb.mirror.getId(a),a]}return[s,o]},this.$t=s=>this._rrweb.mirror.getNode(s),this.Et=s=>{var o,a,l,u,c,d,f,h;return((o=(a=s.removes)==null?void 0:a.length)!==null&&o!==void 0?o:0)+((l=(u=s.attributes)==null?void 0:u.length)!==null&&l!==void 0?l:0)+((c=(d=s.texts)==null?void 0:d.length)!==null&&c!==void 0?c:0)+((f=(h=s.adds)==null?void 0:h.length)!==null&&f!==void 0?f:0)},this.throttleMutations=s=>{if(s.type!==3||s.data.source!==0)return s;var o=s.data,a=this.Et(o);o.attributes&&(o.attributes=o.attributes.filter(u=>{var[c]=this.xt(u.id);return!this.gt.consumeRateLimit(c)&&u}));var l=this.Et(o);return l!==0||a===l?s:void 0},this._rrweb=e,this.t=n,this.gt=new rx({bucketSize:(r=this.t.bucketSize)!==null&&r!==void 0?r:100,refillRate:(i=this.t.refillRate)!==null&&i!==void 0?i:10,refillInterval:1e3,$:this.kt,R:V})}}var Rt=Uint8Array,ut=Uint16Array,Ai=Uint32Array,Xh=new Rt([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0]),Qh=new Rt([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0]),Cv=new Rt([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),bx=function(t,e){for(var n=new ut(31),r=0;r<31;++r)n[r]=e+=1<<t[r-1];var i=new Ai(n[30]);for(r=1;r<30;++r)for(var s=n[r];s<n[r+1];++s)i[s]=s-n[r]<<5|r;return[n,i]},Px=bx(Xh,2),kI=Px[0],Gd=Px[1];kI[28]=258,Gd[258]=28;for(var bv=bx(Qh,0)[1],Tx=new ut(32768),ae=0;ae<32768;++ae){var ar=(43690&ae)>>>1|(21845&ae)<<1;ar=(61680&(ar=(52428&ar)>>>2|(13107&ar)<<2))>>>4|(3855&ar)<<4,Tx[ae]=((65280&ar)>>>8|(255&ar)<<8)>>>1}var Ms=function(t,e,n){for(var r=t.length,i=0,s=new ut(e);i<r;++i)++s[t[i]-1];var o,a=new ut(e);for(i=0;i<e;++i)a[i]=a[i-1]+s[i-1]<<1;for(o=new ut(r),i=0;i<r;++i)o[i]=Tx[a[t[i]-1]++]>>>15-t[i];return o},Mr=new Rt(288);for(ae=0;ae<144;++ae)Mr[ae]=8;for(ae=144;ae<256;++ae)Mr[ae]=9;for(ae=256;ae<280;++ae)Mr[ae]=7;for(ae=280;ae<288;++ae)Mr[ae]=8;var sl=new Rt(32);for(ae=0;ae<32;++ae)sl[ae]=5;var CI=Ms(Mr,9),bI=Ms(sl,5),Ax=function(t){return(t/8>>0)+(7&t&&1)},Rx=function(t,e,n){(n==null||n>t.length)&&(n=t.length);var r=new(t instanceof ut?ut:t instanceof Ai?Ai:Rt)(n-e);return r.set(t.subarray(e,n)),r},ln=function(t,e,n){n<<=7&e;var r=e/8>>0;t[r]|=n,t[r+1]|=n>>>8},Zi=function(t,e,n){n<<=7&e;var r=e/8>>0;t[r]|=n,t[r+1]|=n>>>8,t[r+2]|=n>>>16},Ku=function(t,e){for(var n=[],r=0;r<t.length;++r)t[r]&&n.push({s:r,f:t[r]});var i=n.length,s=n.slice();if(!i)return[new Rt(0),0];if(i==1){var o=new Rt(n[0].s+1);return o[n[0].s]=1,[o,1]}n.sort(function(E,P){return E.f-P.f}),n.push({s:-1,f:25001});var a=n[0],l=n[1],u=0,c=1,d=2;for(n[0]={s:-1,f:a.f+l.f,l:a,r:l};c!=i-1;)a=n[n[u].f<n[d].f?u++:d++],l=n[u!=c&&n[u].f<n[d].f?u++:d++],n[c++]={s:-1,f:a.f+l.f,l:a,r:l};var f=s[0].s;for(r=1;r<i;++r)s[r].s>f&&(f=s[r].s);var h=new ut(f+1),y=qd(n[c-1],h,0);if(y>e){r=0;var m=0,_=y-e,p=1<<_;for(s.sort(function(E,P){return h[P.s]-h[E.s]||E.f-P.f});r<i;++r){var g=s[r].s;if(!(h[g]>e))break;m+=p-(1<<y-h[g]),h[g]=e}for(m>>>=_;m>0;){var v=s[r].s;h[v]<e?m-=1<<e-h[v]++-1:++r}for(;r>=0&&m;--r){var w=s[r].s;h[w]==e&&(--h[w],++m)}y=e}return[new Rt(h),y]},qd=function(t,e,n){return t.s==-1?Math.max(qd(t.l,e,n+1),qd(t.r,e,n+1)):e[t.s]=n},Pv=function(t){for(var e=t.length;e&&!t[--e];);for(var n=new ut(++e),r=0,i=t[0],s=1,o=function(l){n[r++]=l},a=1;a<=e;++a)if(t[a]==i&&a!=e)++s;else{if(!i&&s>2){for(;s>138;s-=138)o(32754);s>2&&(o(s>10?s-11<<5|28690:s-3<<5|12305),s=0)}else if(s>3){for(o(i),--s;s>6;s-=6)o(8304);s>2&&(o(s-3<<5|8208),s=0)}for(;s--;)o(i);s=1,i=t[a]}return[n.subarray(0,r),e]},Ji=function(t,e){for(var n=0,r=0;r<e.length;++r)n+=t[r]*e[r];return n},Yd=function(t,e,n){var r=n.length,i=Ax(e+2);t[i]=255&r,t[i+1]=r>>>8,t[i+2]=255^t[i],t[i+3]=255^t[i+1];for(var s=0;s<r;++s)t[i+s+4]=n[s];return 8*(i+4+r)},Tv=function(t,e,n,r,i,s,o,a,l,u,c){ln(e,c++,n),++i[256];for(var d=Ku(i,15),f=d[0],h=d[1],y=Ku(s,15),m=y[0],_=y[1],p=Pv(f),g=p[0],v=p[1],w=Pv(m),E=w[0],P=w[1],C=new ut(19),S=0;S<g.length;++S)C[31&g[S]]++;for(S=0;S<E.length;++S)C[31&E[S]]++;for(var A=Ku(C,7),M=A[0],O=A[1],T=19;T>4&&!M[Cv[T-1]];--T);var D,I,U,Y,G=u+5<<3,R=Ji(i,Mr)+Ji(s,sl)+o,$=Ji(i,f)+Ji(s,m)+o+14+3*T+Ji(C,M)+(2*C[16]+3*C[17]+7*C[18]);if(G<=R&&G<=$)return Yd(e,c,t.subarray(l,l+u));if(ln(e,c,1+($<R)),c+=2,$<R){D=Ms(f,h),I=f,U=Ms(m,_),Y=m;var j=Ms(M,O);for(ln(e,c,v-257),ln(e,c+5,P-1),ln(e,c+10,T-4),c+=14,S=0;S<T;++S)ln(e,c+3*S,M[Cv[S]]);c+=3*T;for(var q=[g,E],W=0;W<2;++W){var ve=q[W];for(S=0;S<ve.length;++S){var ue=31&ve[S];ln(e,c,j[ue]),c+=M[ue],ue>15&&(ln(e,c,ve[S]>>>5&127),c+=ve[S]>>>12)}}}else D=CI,I=Mr,U=bI,Y=sl;for(S=0;S<a;++S)if(r[S]>255){ue=r[S]>>>18&31,Zi(e,c,D[ue+257]),c+=I[ue+257],ue>7&&(ln(e,c,r[S]>>>23&31),c+=Xh[ue]);var Gt=31&r[S];Zi(e,c,U[Gt]),c+=Y[Gt],Gt>3&&(Zi(e,c,r[S]>>>5&8191),c+=Qh[Gt])}else Zi(e,c,D[r[S]]),c+=I[r[S]];return Zi(e,c,D[256]),c+I[256]},PI=new Ai([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),TI=function(){for(var t=new Ai(256),e=0;e<256;++e){for(var n=e,r=9;--r;)n=(1&n&&3988292384)^n>>>1;t[e]=n}return t}(),AI=function(){var t=4294967295;return{p:function(e){for(var n=t,r=0;r<e.length;++r)n=TI[255&n^e[r]]^n>>>8;t=n},d:function(){return 4294967295^t}}},RI=function(t,e,n,r,i){return function(s,o,a,l,u,c){var d=s.length,f=new Rt(l+d+5*(1+Math.floor(d/7e3))+u),h=f.subarray(l,f.length-u),y=0;if(!o||d<8)for(var m=0;m<=d;m+=65535){var _=m+65535;_<d?y=Yd(h,y,s.subarray(m,_)):(h[m]=c,y=Yd(h,y,s.subarray(m,d)))}else{for(var p=PI[o-1],g=p>>>13,v=8191&p,w=(1<<a)-1,E=new ut(32768),P=new ut(w+1),C=Math.ceil(a/3),S=2*C,A=function(Gl){return(s[Gl]^s[Gl+1]<<C^s[Gl+2]<<S)&w},M=new Ai(25e3),O=new ut(288),T=new ut(32),D=0,I=0,U=(m=0,0),Y=0,G=0;m<d;++m){var R=A(m),$=32767&m,j=P[R];if(E[$]=j,P[R]=$,Y<=m){var q=d-m;if((D>7e3||U>24576)&&q>423){y=Tv(s,h,0,M,O,T,I,U,G,m-G,y),U=D=I=0,G=m;for(var W=0;W<286;++W)O[W]=0;for(W=0;W<30;++W)T[W]=0}var ve=2,ue=0,Gt=v,je=$-j&32767;if(q>2&&R==A(m-je))for(var Dr=Math.min(g,q)-1,fS=Math.min(32767,m),hS=Math.min(258,q);je<=fS&&--Gt&&$!=j;){if(s[m+ve]==s[m+ve-je]){for(var Pn=0;Pn<hS&&s[m+Pn]==s[m+Pn-je];++Pn);if(Pn>ve){if(ve=Pn,ue=je,Pn>Dr)break;var pS=Math.min(je,Pn-2),ap=0;for(W=0;W<pS;++W){var Kl=m-je+W+32768&32767,lp=Kl-E[Kl]+32768&32767;lp>ap&&(ap=lp,j=Kl)}}}je+=($=j)-(j=E[$])+32768&32767}if(ue){M[U++]=268435456|Gd[ve]<<18|bv[ue];var up=31&Gd[ve],cp=31&bv[ue];I+=Xh[up]+Qh[cp],++O[257+up],++T[cp],Y=m+ve,++D}else M[U++]=s[m],++O[s[m]]}}y=Tv(s,h,c,M,O,T,I,U,G,m-G,y)}return Rx(f,0,l+Ax(y)+u)}(t,e.level==null?6:e.level,e.mem==null?Math.ceil(1.5*Math.max(8,Math.min(13,Math.log(t.length)))):12+e.mem,n,r,!0)},Xd=function(t,e,n){for(;n;++e)t[e]=n,n>>>=8},MI=function(t,e){var n=e.filename;if(t[0]=31,t[1]=139,t[2]=8,t[8]=e.level<2?4:e.level==9?2:0,t[9]=3,e.mtime!=0&&Xd(t,4,Math.floor(new Date(e.mtime||Date.now())/1e3)),n){t[3]=8;for(var r=0;r<=n.length;++r)t[r+10]=n.charCodeAt(r)}},II=function(t){return 10+(t.filename&&t.filename.length+1||0)};function Mx(t,e){e===void 0&&(e={});var n=AI(),r=t.length;n.p(t);var i=RI(t,e,II(e),8),s=i.length;return MI(i,e),Xd(i,s-8,n.d()),Xd(i,s-4,r),i}function Ix(t,e){var n=t.length;if(typeof TextEncoder<"u")return new TextEncoder().encode(t);for(var r=new Rt(t.length+(t.length>>>1)),i=0,s=function(u){r[i++]=u},o=0;o<n;++o){if(i+5>r.length){var a=new Rt(i+8+(n-o<<1));a.set(r),r=a}var l=t.charCodeAt(o);l<128||e?s(l):l<2048?(s(192|l>>>6),s(128|63&l)):l>55295&&l<57344?(s(240|(l=65536+(1047552&l)|1023&t.charCodeAt(++o))>>>18),s(128|l>>>12&63),s(128|l>>>6&63),s(128|63&l)):(s(224|l>>>12),s(128|l>>>6&63),s(128|63&l))}return Rx(r,0,i)}function NI(t,e){return function(n){for(var r=0,i=0;i<n.length;i++)r=(r<<5)-r+n.charCodeAt(i),r|=0;return Math.abs(r)}(t)%100<mt(100*e,0,100,V)}var er="disabled",Zh="sampled",ol="active",Ir="buffering",Jh="paused",ep="trigger",on=ep+"_activated",Ge=ep+"_pending",an=ep+"_"+er;function Av(t,e){return e.some(n=>n.matching==="regex"&&new RegExp(n.url).test(t))}class Nx{constructor(e){this.Rt=e}triggerStatus(e){var n=this.Rt.map(r=>r.triggerStatus(e));return n.includes(on)?on:n.includes(Ge)?Ge:an}stop(){this.Rt.forEach(e=>e.stop())}}class Ox{constructor(e){this.Rt=e}triggerStatus(e){var n=new Set;for(var r of this.Rt)n.add(r.triggerStatus(e));switch(n.delete(an),n.size){case 0:return an;case 1:return Array.from(n)[0];default:return Ge}}stop(){this.Rt.forEach(e=>e.stop())}}class OI{triggerStatus(){return Ge}stop(){}}var al=t=>"sessionRecording"in t;class LI{constructor(e){this.Pt=[],this.It=[],this.urlBlocked=!1,this._instance=e}onConfig(e){var n,r;this.Pt=(al(e)?(n=e.sessionRecording)==null?void 0:n.urlTriggers:e==null?void 0:e.urlTriggers)||[],this.It=(al(e)?(r=e.sessionRecording)==null?void 0:r.urlBlocklist:e==null?void 0:e.urlBlocklist)||[]}onRemoteConfig(e){this.onConfig(e)}Tt(e){var n;return this.Pt.length===0?an:((n=this._instance)==null?void 0:n.get_property(Ld))===e?on:Ge}triggerStatus(e){var n=this.Tt(e),r=n===on?on:n===Ge?Ge:an;return this._instance.register_for_session({$sdk_debug_replay_url_trigger_status:r}),r}checkUrlTriggerConditions(e,n,r){if(b!==void 0&&b.location.href){var i=b.location.href,s=this.urlBlocked,o=Av(i,this.It);s&&o||(o&&!s?e():!o&&s&&n(),Av(i,this.Pt)&&r("url"))}}stop(){}}class DI{constructor(e){this.linkedFlag=null,this.linkedFlagSeen=!1,this.Ct=()=>{},this._instance=e}triggerStatus(){var e=Ge;return Z(this.linkedFlag)&&(e=an),this.linkedFlagSeen&&(e=on),this._instance.register_for_session({$sdk_debug_replay_linked_flag_trigger_status:e}),e}onConfig(e,n){var r;if(this.linkedFlag=(al(e)?(r=e.sessionRecording)==null?void 0:r.linkedFlag:e==null?void 0:e.linkedFlag)||null,!Z(this.linkedFlag)&&!this.linkedFlagSeen){var i=xe(this.linkedFlag)?this.linkedFlag:this.linkedFlag.flag,s=xe(this.linkedFlag)?null:this.linkedFlag.variant;this.Ct=this._instance.onFeatureFlags((o,a)=>{var l=!1;if(we(a)&&i in a){var u=a[i];l=Bt(u)?u===!0:s?u===s:!!u}this.linkedFlagSeen=l,l&&n(i,s)})}}onRemoteConfig(e,n){this.onConfig(e,n)}stop(){this.Ct()}}class $I{constructor(e){this.Mt=[],this._instance=e}onConfig(e){var n;this.Mt=(al(e)?(n=e.sessionRecording)==null?void 0:n.eventTriggers:e==null?void 0:e.eventTriggers)||[]}onRemoteConfig(e){this.onConfig(e)}Ot(e){var n;return this.Mt.length===0?an:((n=this._instance)==null?void 0:n.get_property(Dd))===e?on:Ge}triggerStatus(e){var n=this.Ot(e),r=n===on?on:n===Ge?Ge:an;return this._instance.register_for_session({$sdk_debug_replay_event_trigger_status:r}),r}stop(){}}function FI(t){return t.isRecordingEnabled?Ir:er}function jI(t){if(!t.receivedFlags)return Ir;if(!t.isRecordingEnabled)return er;if(t.urlTriggerMatching.urlBlocked)return Jh;var e=t.isSampled===!0,n=new Nx([t.eventTriggerMatching,t.urlTriggerMatching,t.linkedFlagMatching]).triggerStatus(t.sessionId);return e?Zh:n===on?ol:n===Ge?Ir:t.isSampled===!1?er:ol}function VI(t){if(!t.receivedFlags)return Ir;if(!t.isRecordingEnabled)return er;if(t.urlTriggerMatching.urlBlocked)return Jh;var e=new Ox([t.eventTriggerMatching,t.urlTriggerMatching,t.linkedFlagMatching]).triggerStatus(t.sessionId),n=e!==an,r=Bt(t.isSampled);return n&&e===Ge?Ir:n&&e===an||r&&!t.isSampled?er:t.isSampled===!0?Zh:ol}var fs="[SessionRecording]",Me=Re(fs);function Ko(){var t;return H==null||(t=H.__PosthogExtensions__)==null||(t=t.rrweb)==null?void 0:t.record}var BI=3e5,zI=[Ft.MouseMove,Ft.MouseInteraction,Ft.Scroll,Ft.ViewportResize,Ft.Input,Ft.TouchMove,Ft.MediaInteraction,Ft.Drag],Rv=t=>({rrwebMethod:t,enqueuedAt:Date.now(),attempt:1});function lr(t){return function(e,n){for(var r="",i=0;i<e.length;){var s=e[i++];r+=String.fromCharCode(s)}return r}(Mx(Ix(JSON.stringify(t))))}function Mv(t){return t.type===Qt.Custom&&t.data.tag==="sessionIdle"}class Iv{get sessionId(){return this.Ft}get At(){return this._instance.config.session_recording.session_idle_threshold_ms||3e5}get started(){return this.Dt}get jt(){if(!this._instance.sessionManager)throw new Error(fs+" must be started with a valid sessionManager.");return this._instance.sessionManager}get Lt(){var e,n;return this.Nt.triggerStatus(this.sessionId)===Ge?6e4:(e=(n=this._instance.config.session_recording)==null?void 0:n.full_snapshot_interval_millis)!==null&&e!==void 0?e:BI}get Ut(){var e=this._instance.get_property(si);return Bt(e)?e:null}get zt(){var e,n,r=(e=this.H)==null?void 0:e.data[((n=this.H)==null?void 0:n.data.length)-1],{sessionStartTimestamp:i}=this.jt.checkAndGetSessionAndWindowId(!0);return r?r.timestamp-i:null}get Bt(){var e=!!this._instance.get_property(Od),n=!this._instance.config.disable_session_recording;return b&&e&&n}get qt(){var e=!!this._instance.get_property(lv),n=this._instance.config.enable_recording_console_log;return n??e}get Ht(){var e,n,r,i,s,o,a=this._instance.config.session_recording.captureCanvas,l=this._instance.get_property(dv),u=(e=(n=a==null?void 0:a.recordCanvas)!==null&&n!==void 0?n:l==null?void 0:l.enabled)!==null&&e!==void 0&&e,c=(r=(i=a==null?void 0:a.canvasFps)!==null&&i!==void 0?i:l==null?void 0:l.fps)!==null&&r!==void 0?r:4,d=(s=(o=a==null?void 0:a.canvasQuality)!==null&&o!==void 0?o:l==null?void 0:l.quality)!==null&&s!==void 0?s:.4;if(typeof d=="string"){var f=parseFloat(d);d=isNaN(f)?.4:f}return{enabled:u,fps:mt(c,0,12,Me.createLogger("canvas recording fps"),4),quality:mt(d,0,1,Me.createLogger("canvas recording quality"),.4)}}get Wt(){var e,n,r=this._instance.get_property(uv),i={recordHeaders:(e=this._instance.config.session_recording)==null?void 0:e.recordHeaders,recordBody:(n=this._instance.config.session_recording)==null?void 0:n.recordBody},s=(i==null?void 0:i.recordHeaders)||(r==null?void 0:r.recordHeaders),o=(i==null?void 0:i.recordBody)||(r==null?void 0:r.recordBody),a=we(this._instance.config.capture_performance)?this._instance.config.capture_performance.network_timing:this._instance.config.capture_performance,l=!!(Bt(a)?a:r!=null&&r.capturePerformance);return s||o||l?{recordHeaders:s,recordBody:o,recordPerformance:l}:void 0}get Gt(){var e,n,r,i,s,o,a=this._instance.get_property(cv),l={maskAllInputs:(e=this._instance.config.session_recording)==null?void 0:e.maskAllInputs,maskTextSelector:(n=this._instance.config.session_recording)==null?void 0:n.maskTextSelector,blockSelector:(r=this._instance.config.session_recording)==null?void 0:r.blockSelector},u=(i=l==null?void 0:l.maskAllInputs)!==null&&i!==void 0?i:a==null?void 0:a.maskAllInputs,c=(s=l==null?void 0:l.maskTextSelector)!==null&&s!==void 0?s:a==null?void 0:a.maskTextSelector,d=(o=l==null?void 0:l.blockSelector)!==null&&o!==void 0?o:a==null?void 0:a.blockSelector;return L(u)&&L(c)&&L(d)?void 0:{maskAllInputs:u==null||u,maskTextSelector:c,blockSelector:d}}get Vt(){var e=this._instance.get_property(fv);return He(e)?e:null}get Jt(){var e=this._instance.get_property(hv);return He(e)?e:null}get status(){return this.Kt?this.Yt({receivedFlags:this.Kt,isRecordingEnabled:this.Bt,isSampled:this.Ut,urlTriggerMatching:this.Xt,eventTriggerMatching:this.Qt,linkedFlagMatching:this.Zt,sessionId:this.sessionId}):Ir}constructor(e){if(this.Yt=FI,this.Kt=!1,this.ti=[],this.ii="unknown",this.ei=Date.now(),this.Nt=new OI,this.ri=void 0,this.si=void 0,this.ni=void 0,this.oi=void 0,this.ai=void 0,this._forceAllowLocalhostNetworkCapture=!1,this.li=()=>{this.ui()},this.hi=()=>{this.tryAddCustomEvent("browser offline",{})},this.di=()=>{this.tryAddCustomEvent("browser online",{})},this.vi=()=>{if(B!=null&&B.visibilityState){var i="window "+B.visibilityState;this.tryAddCustomEvent(i,{})}},this._instance=e,this.Dt=!1,this.ci="/s/",this.fi=void 0,this.Kt=!1,!this._instance.sessionManager)throw Me.error("started without valid sessionManager"),new Error(fs+" started without valid sessionManager. This is a bug.");if(this._instance.config.cookieless_mode==="always")throw new Error(fs+' cannot be used with cookieless_mode="always"');this.Zt=new DI(this._instance),this.Xt=new LI(this._instance),this.Qt=new $I(this._instance);var{sessionId:n,windowId:r}=this.jt.checkAndGetSessionAndWindowId();this.Ft=n,this.pi=r,this.H=this.gi(),this.At>=this.jt.sessionTimeoutMs&&Me.warn("session_idle_threshold_ms ("+this.At+") is greater than the session timeout ("+this.jt.sessionTimeoutMs+"). Session will never be detected as idle")}startIfEnabledOrStop(e){this.Bt?(this.mi(e),pe(b,"beforeunload",this.li),pe(b,"offline",this.hi),pe(b,"online",this.di),pe(b,"visibilitychange",this.vi),this.yi(),this.bi(),Z(this.ri)&&(this.ri=this._instance.on("eventCaptured",n=>{try{if(n.event==="$pageview"){var r=n!=null&&n.properties.$current_url?this.wi(n==null?void 0:n.properties.$current_url):"";if(!r)return;this.tryAddCustomEvent("$pageview",{href:r})}}catch(i){Me.error("Could not add $pageview to rrweb session",i)}})),this.si||(this.si=this.jt.onSessionId((n,r,i)=>{var s,o;i&&(this.tryAddCustomEvent("$session_id_change",{sessionId:n,windowId:r,changeReason:i}),(s=this._instance)==null||(s=s.persistence)==null||s.unregister(Dd),(o=this._instance)==null||(o=o.persistence)==null||o.unregister(Ld))}))):this.stopRecording()}stopRecording(){var e,n,r,i;this.Dt&&this.fi&&(this.fi(),this.fi=void 0,this.Dt=!1,b==null||b.removeEventListener("beforeunload",this.li),b==null||b.removeEventListener("offline",this.hi),b==null||b.removeEventListener("online",this.di),b==null||b.removeEventListener("visibilitychange",this.vi),this.gi(),clearInterval(this.Si),(e=this.ri)==null||e.call(this),this.ri=void 0,(n=this.ai)==null||n.call(this),this.ai=void 0,(r=this.si)==null||r.call(this),this.si=void 0,(i=this.oi)==null||i.call(this),this.oi=void 0,this.Qt.stop(),this.Xt.stop(),this.Zt.stop(),Me.info("stopped"))}ki(){var e;(e=this._instance.persistence)==null||e.unregister(si)}$i(e){var n,r=this.Ft!==e,i=this.Vt;if(He(i)){var s=this.Ut,o=r||!Bt(s),a=o?NI(e,i):s;o&&(a?this.xi(Zh):Me.warn("Sample rate ("+i+") has determined that this sessionId ("+e+") will not be sent to the server."),this.tryAddCustomEvent("samplingDecisionMade",{sampleRate:i,isSampled:a})),(n=this._instance.persistence)==null||n.register({[si]:a})}else this.ki()}onRemoteConfig(e){var n,r,i,s;this.tryAddCustomEvent("$remote_config_received",e),this.Ei(e),(n=e.sessionRecording)!=null&&n.endpoint&&(this.ci=(s=e.sessionRecording)==null?void 0:s.endpoint),this.yi(),((r=e.sessionRecording)==null?void 0:r.triggerMatchType)==="any"?(this.Yt=jI,this.Nt=new Nx([this.Qt,this.Xt])):(this.Yt=VI,this.Nt=new Ox([this.Qt,this.Xt])),this._instance.register_for_session({$sdk_debug_replay_remote_trigger_matching_config:(i=e.sessionRecording)==null?void 0:i.triggerMatchType}),this.Xt.onConfig(e),this.Qt.onConfig(e),this.Zt.onConfig(e,(o,a)=>{this.xi("linked_flag_matched",{flag:o,variant:a})}),this.Kt=!0,this.startIfEnabledOrStop()}yi(){He(this.Vt)&&Z(this.oi)&&(this.oi=this.jt.onSessionId(e=>{this.$i(e)}))}Ei(e){if(this._instance.persistence){var n,r=this._instance.persistence,i=()=>{var s,o,a,l,u,c,d,f,h,y=(s=e.sessionRecording)==null?void 0:s.sampleRate,m=Z(y)?null:parseFloat(y);Z(m)&&this.ki();var _=(o=e.sessionRecording)==null?void 0:o.minimumDurationMilliseconds;r.register({[Od]:!!e.sessionRecording,[lv]:(a=e.sessionRecording)==null?void 0:a.consoleLogRecordingEnabled,[uv]:F({capturePerformance:e.capturePerformance},(l=e.sessionRecording)==null?void 0:l.networkPayloadCapture),[cv]:(u=e.sessionRecording)==null?void 0:u.masking,[dv]:{enabled:(c=e.sessionRecording)==null?void 0:c.recordCanvas,fps:(d=e.sessionRecording)==null?void 0:d.canvasFps,quality:(f=e.sessionRecording)==null?void 0:f.canvasQuality},[fv]:m,[hv]:L(_)?null:_,[pv]:(h=e.sessionRecording)==null?void 0:h.scriptConfig})};i(),(n=this.ni)==null||n.call(this),this.ni=this.jt.onSessionId(i)}}log(e,n){var r;n===void 0&&(n="log"),(r=this._instance.sessionRecording)==null||r.onRRwebEmit({type:6,data:{plugin:"rrweb/console@1",payload:{level:n,trace:[],payload:[JSON.stringify(e)]}},timestamp:Date.now()})}mi(e){if(!L(Object.assign)&&!L(Array.from)&&!(this.Dt||this._instance.config.disable_session_recording||this._instance.consent.isOptedOut())){var n;this.Dt=!0,this.jt.checkAndGetSessionAndWindowId(),Ko()?this.Ri():(n=H.__PosthogExtensions__)==null||n.loadExternalDependency==null||n.loadExternalDependency(this._instance,this.Pi,r=>{if(r)return Me.error("could not load recorder",r);this.Ri()}),Me.info("starting"),this.status===ol&&this.xi(e||"recording_initialized")}}get Pi(){var e;return((e=this._instance)==null||(e=e.persistence)==null||(e=e.get_property(pv))==null?void 0:e.script)||"recorder"}Ii(e){var n;return e.type===3&&zI.indexOf((n=e.data)==null?void 0:n.source)!==-1}Ti(e){var n=this.Ii(e);n||this.ii||e.timestamp-this.ei>this.At&&(this.ii=!0,clearInterval(this.Si),this.tryAddCustomEvent("sessionIdle",{eventTimestamp:e.timestamp,lastActivityTimestamp:this.ei,threshold:this.At,bufferLength:this.H.data.length,bufferSize:this.H.size}),this.ui());var r=!1;if(n&&(this.ei=e.timestamp,this.ii)){var i=this.ii==="unknown";this.ii=!1,i||(this.tryAddCustomEvent("sessionNoLongerIdle",{reason:"user activity",type:e.type}),r=!0)}if(!this.ii){var{windowId:s,sessionId:o}=this.jt.checkAndGetSessionAndWindowId(!n,e.timestamp),a=this.Ft!==o,l=this.pi!==s;this.pi=s,this.Ft=o,a||l?(this.stopRecording(),this.startIfEnabledOrStop("session_id_changed")):r&&this.Ci()}}Mi(e){try{return e.rrwebMethod(),!0}catch(n){return this.ti.length<10?this.ti.push({enqueuedAt:e.enqueuedAt||Date.now(),attempt:e.attempt++,rrwebMethod:e.rrwebMethod}):Me.warn("could not emit queued rrweb event.",n,e),!1}}tryAddCustomEvent(e,n){return this.Mi(Rv(()=>Ko().addCustomEvent(e,n)))}Oi(){return this.Mi(Rv(()=>Ko().takeFullSnapshot()))}Ri(){var e,n,r,i,s={blockClass:"ph-no-capture",blockSelector:void 0,ignoreClass:"ph-ignore-input",maskTextClass:"ph-mask",maskTextSelector:void 0,maskTextFn:void 0,maskAllInputs:!0,maskInputOptions:{password:!0},maskInputFn:void 0,slimDOMOptions:{},collectFonts:!1,inlineStylesheet:!0,recordCrossOriginIframes:!1},o=this._instance.config.session_recording;for(var[a,l]of Object.entries(o||{}))a in s&&(a==="maskInputOptions"?s.maskInputOptions=F({password:!0},l):s[a]=l);this.Ht&&this.Ht.enabled&&(s.recordCanvas=!0,s.sampling={canvas:this.Ht.fps},s.dataURLOptions={type:"image/webp",quality:this.Ht.quality}),this.Gt&&(s.maskAllInputs=(n=this.Gt.maskAllInputs)===null||n===void 0||n,s.maskTextSelector=(r=this.Gt.maskTextSelector)!==null&&r!==void 0?r:void 0,s.blockSelector=(i=this.Gt.blockSelector)!==null&&i!==void 0?i:void 0);var u=Ko();if(u){this.Fi=(e=this.Fi)!==null&&e!==void 0?e:new EI(u,{refillRate:this._instance.config.session_recording.__mutationThrottlerRefillRate,bucketSize:this._instance.config.session_recording.__mutationThrottlerBucketSize,onBlockedNode:(d,f)=>{var h="Too many mutations on node '"+d+"'. Rate limiting. This could be due to SVG animations or something similar";Me.info(h,{node:f}),this.log(fs+" "+h,"warn")}});var c=this.Ai();this.fi=u(F({emit:d=>{this.onRRwebEmit(d)},plugins:c},s)),this.ei=Date.now(),this.ii=Bt(this.ii)?this.ii:"unknown",this.tryAddCustomEvent("$session_options",{sessionRecordingOptions:s,activePlugins:c.map(d=>d==null?void 0:d.name)}),this.tryAddCustomEvent("$posthog_config",{config:this._instance.config})}else Me.error("onScriptLoaded was called but rrwebRecord is not available. This indicates something has gone wrong.")}Ci(){if(this.Si&&clearInterval(this.Si),this.ii!==!0){var e=this.Lt;e&&(this.Si=setInterval(()=>{this.Oi()},e))}}Ai(){var e,n,r=[],i=(e=H.__PosthogExtensions__)==null||(e=e.rrwebPlugins)==null?void 0:e.getRecordConsolePlugin;i&&this.qt&&r.push(i());var s=(n=H.__PosthogExtensions__)==null||(n=n.rrwebPlugins)==null?void 0:n.getRecordNetworkPlugin;return this.Wt&&At(s)&&(!tI.includes(location.hostname)||this._forceAllowLocalhostNetworkCapture?r.push(s(SI(this._instance.config,this.Wt))):Me.info("NetworkCapture not started because we are on localhost.")),r}onRRwebEmit(e){var n;if(this.Di(),e&&we(e)){if(e.type===Qt.Meta){var r=this.wi(e.data.href);if(this.ji=r,!r)return;e.data.href=r}else this.Li();if(this.Xt.checkUrlTriggerConditions(()=>this.Ni(),()=>this.Ui(),f=>this.zi(f)),!this.Xt.urlBlocked||(i=e).type===Qt.Custom&&i.data.tag==="recording paused"){var i;e.type===Qt.FullSnapshot&&this.Ci(),e.type===Qt.FullSnapshot&&this.Kt&&this.Nt.triggerStatus(this.sessionId)===Ge&&this.Bi();var s=this.Fi?this.Fi.throttleMutations(e):e;if(s){var o=function(f){var h=f;if(h&&we(h)&&h.type===6&&we(h.data)&&h.data.plugin==="rrweb/console@1"){h.data.payload.payload.length>10&&(h.data.payload.payload=h.data.payload.payload.slice(0,10),h.data.payload.payload.push("...[truncated]"));for(var y=[],m=0;m<h.data.payload.payload.length;m++)h.data.payload.payload[m]&&h.data.payload.payload[m].length>2e3?y.push(h.data.payload.payload[m].slice(0,2e3)+"...[truncated]"):y.push(h.data.payload.payload[m]);return h.data.payload.payload=y,f}return f}(s);if(this.Ti(o),this.ii!==!0||Mv(o)){if(Mv(o)){var a=o.data.payload;if(a){var l=a.lastActivityTimestamp,u=a.threshold;o.timestamp=l+u}}var c=(n=this._instance.config.session_recording.compress_events)===null||n===void 0||n?function(f){if(Rs(f)<1024)return f;try{if(f.type===Qt.FullSnapshot)return F({},f,{data:lr(f.data),cv:"2024-10"});if(f.type===Qt.IncrementalSnapshot&&f.data.source===Ft.Mutation)return F({},f,{cv:"2024-10",data:F({},f.data,{texts:lr(f.data.texts),attributes:lr(f.data.attributes),removes:lr(f.data.removes),adds:lr(f.data.adds)})});if(f.type===Qt.IncrementalSnapshot&&f.data.source===Ft.StyleSheetRule)return F({},f,{cv:"2024-10",data:F({},f.data,{adds:f.data.adds?lr(f.data.adds):void 0,removes:f.data.removes?lr(f.data.removes):void 0})})}catch(h){Me.error("could not compress event - will use uncompressed event",h)}return f}(o):o,d={$snapshot_bytes:Rs(c),$snapshot_data:c,$session_id:this.Ft,$window_id:this.pi};this.status!==er?this.qi(d):this.gi()}}}}}Li(){if(!this._instance.config.capture_pageview&&b){var e=this.wi(b.location.href);this.ji!==e&&(this.tryAddCustomEvent("$url_changed",{href:e}),this.ji=e)}}Di(){if(this.ti.length){var e=[...this.ti];this.ti=[],e.forEach(n=>{Date.now()-n.enqueuedAt<=2e3&&this.Mi(n)})}}wi(e){var n=this._instance.config.session_recording;if(n.maskNetworkRequestFn){var r,i={url:e};return(r=i=n.maskNetworkRequestFn(i))==null?void 0:r.url}return e}Bi(){if(!this.H||this.H.data.length===0)return this.gi();for(var e=-1,n=this.H.data.length-1;n>=0;n--)if(this.H.data[n].type===Qt.Meta){e=n;break}return e>=0?(this.H.data=this.H.data.slice(e),this.H.size=this.H.data.reduce((r,i)=>r+Rs(i),0),this.H):this.gi()}gi(){return this.H={size:0,data:[],sessionId:this.Ft,windowId:this.pi},this.H}ui(){this.Hi&&(clearTimeout(this.Hi),this.Hi=void 0);var e=this.Jt,n=this.zt,r=He(n)&&n>=0,i=He(e)&&r&&n<e;return this.status===Ir||this.status===Jh||this.status===er||i?(this.Hi=setTimeout(()=>{this.ui()},2e3),this.H):(this.H.data.length>0&&Hd(this.H).forEach(s=>{this.Wi({$snapshot_bytes:s.size,$snapshot_data:s.data,$session_id:s.sessionId,$window_id:s.windowId,$lib:"web",$lib_version:hn.LIB_VERSION})}),this.gi())}qi(e){var n,r=2+(((n=this.H)==null?void 0:n.data.length)||0);!this.ii&&(this.H.size+e.$snapshot_bytes+r>943718.4||this.H.sessionId!==this.Ft)&&(this.H=this.ui()),this.H.size+=e.$snapshot_bytes,this.H.data.push(e.$snapshot_data),this.Hi||this.ii||(this.Hi=setTimeout(()=>{this.ui()},2e3))}Wi(e){this._instance.capture("$snapshot",e,{_url:this._instance.requestRouter.endpointFor("api",this.ci),_noTruncate:!0,_batchKey:"recordings",skip_client_rate_limiting:!0})}zi(e){var n;this.Nt.triggerStatus(this.sessionId)===Ge&&((n=this._instance)==null||(n=n.persistence)==null||n.register({[e==="url"?Ld:Dd]:this.Ft}),this.ui(),this.xi(e+"_trigger_matched"))}Ni(){this.Xt.urlBlocked||(this.Xt.urlBlocked=!0,clearInterval(this.Si),Me.info("recording paused due to URL blocker"),this.tryAddCustomEvent("recording paused",{reason:"url blocker"}))}Ui(){this.Xt.urlBlocked&&(this.Xt.urlBlocked=!1,this.Oi(),this.Ci(),this.tryAddCustomEvent("recording resumed",{reason:"left blocked url"}),Me.info("recording resumed"))}bi(){this.Qt.Mt.length!==0&&Z(this.ai)&&(this.ai=this._instance.on("eventCaptured",e=>{try{this.Qt.Mt.includes(e.event)&&this.zi("event")}catch(n){Me.error("Could not activate event trigger",n)}}))}overrideLinkedFlag(){this.Zt.linkedFlagSeen=!0,this.Oi(),this.xi("linked_flag_overridden")}overrideSampling(){var e;(e=this._instance.persistence)==null||e.register({[si]:!0}),this.Oi(),this.xi("sampling_overridden")}overrideTrigger(e){this.zi(e)}xi(e,n){this._instance.register_for_session({$session_recording_start_reason:e}),Me.info(e.replace("_"," "),n),X(["recording_initialized","session_id_changed"],e)||this.tryAddCustomEvent(e,n)}get sdkDebugProperties(){var{sessionStartTimestamp:e}=this.jt.checkAndGetSessionAndWindowId(!0);return{$recording_status:this.status,$sdk_debug_replay_internal_buffer_length:this.H.data.length,$sdk_debug_replay_internal_buffer_size:this.H.size,$sdk_debug_current_session_duration:this.zt,$sdk_debug_session_start:e}}}var Gu=Re("[SegmentIntegration]");function UI(t,e){var n=t.config.segment;if(!n)return e();(function(r,i){var s=r.config.segment;if(!s)return i();var o=l=>{var u=()=>l.anonymousId()||jn();r.config.get_device_id=u,l.id()&&(r.register({distinct_id:l.id(),$device_id:u()}),r.persistence.set_property(cn,"identified")),i()},a=s.user();"then"in a&&At(a.then)?a.then(l=>o(l)):o(a)})(t,()=>{n.register((r=>{Promise&&Promise.resolve||Gu.warn("This browser does not have Promise support, and can not use the segment integration");var i=(s,o)=>{if(!o)return s;s.event.userId||s.event.anonymousId===r.get_distinct_id()||(Gu.info("No userId set, resetting PostHog"),r.reset()),s.event.userId&&s.event.userId!==r.get_distinct_id()&&(Gu.info("UserId set, identifying with PostHog"),r.identify(s.event.userId));var a=r.calculateEventProperties(o,s.event.properties);return s.event.properties=Object.assign({},a,s.event.properties),s};return{name:"PostHog JS",type:"enrichment",version:"1.0.0",isLoaded:()=>!0,load:()=>Promise.resolve(),track:s=>i(s,s.event.event),page:s=>i(s,"$pageview"),identify:s=>i(s,"$identify"),screen:s=>i(s,"$screen")}})(t)).then(()=>{e()})})}var Lx="posthog-js";function Dx(t,e){var{organization:n,projectId:r,prefix:i,severityAllowList:s=["error"],sendExceptionsToPostHog:o=!0}=e===void 0?{}:e;return a=>{var l,u,c,d,f;if(!(s==="*"||s.includes(a.level))||!t.__loaded)return a;a.tags||(a.tags={});var h=t.requestRouter.endpointFor("ui","/project/"+t.config.token+"/person/"+t.get_distinct_id());a.tags["PostHog Person URL"]=h,t.sessionRecordingStarted()&&(a.tags["PostHog Recording URL"]=t.get_session_replay_url({withTimestamp:!0}));var y=((l=a.exception)==null?void 0:l.values)||[],m=y.map(p=>F({},p,{stacktrace:p.stacktrace?F({},p.stacktrace,{type:"raw",frames:(p.stacktrace.frames||[]).map(g=>F({},g,{platform:"web:javascript"}))}):void 0})),_={$exception_message:((u=y[0])==null?void 0:u.value)||a.message,$exception_type:(c=y[0])==null?void 0:c.type,$exception_personURL:h,$exception_level:a.level,$exception_list:m,$sentry_event_id:a.event_id,$sentry_exception:a.exception,$sentry_exception_message:((d=y[0])==null?void 0:d.value)||a.message,$sentry_exception_type:(f=y[0])==null?void 0:f.type,$sentry_tags:a.tags};return n&&r&&(_.$sentry_url=(i||"https://sentry.io/organizations/")+n+"/issues/?project="+r+"&query="+a.event_id),o&&t.exceptions.sendExceptionEvent(_),a}}class HI{constructor(e,n,r,i,s,o){this.name=Lx,this.setupOnce=function(a){a(Dx(e,{organization:n,projectId:r,prefix:i,severityAllowList:s,sendExceptionsToPostHog:o==null||o}))}}}var WI=b!=null&&b.location?rl(b.location.hash,"__posthog")||rl(location.hash,"state"):null,Nv="_postHogToolbarParams",Ov=Re("[Toolbar]"),In=function(t){return t[t.UNINITIALIZED=0]="UNINITIALIZED",t[t.LOADING=1]="LOADING",t[t.LOADED=2]="LOADED",t}(In||{});class KI{constructor(e){this.instance=e}Gi(e){H.ph_toolbar_state=e}Vi(){var e;return(e=H.ph_toolbar_state)!==null&&e!==void 0?e:In.UNINITIALIZED}maybeLoadToolbar(e,n,r){if(e===void 0&&(e=void 0),n===void 0&&(n=void 0),r===void 0&&(r=void 0),!b||!B)return!1;e=e??b.location,r=r??b.history;try{if(!n){try{b.localStorage.setItem("test","test"),b.localStorage.removeItem("test")}catch{return!1}n=b==null?void 0:b.localStorage}var i,s=WI||rl(e.hash,"__posthog")||rl(e.hash,"state"),o=s?nv(()=>JSON.parse(atob(decodeURIComponent(s))))||nv(()=>JSON.parse(decodeURIComponent(s))):null;return o&&o.action==="ph_authorize"?((i=o).source="url",i&&Object.keys(i).length>0&&(o.desiredHash?e.hash=o.desiredHash:r?r.replaceState(r.state,"",e.pathname+e.search):e.hash="")):((i=JSON.parse(n.getItem(Nv)||"{}")).source="localstorage",delete i.userIntent),!(!i.token||this.instance.config.token!==i.token)&&(this.loadToolbar(i),!0)}catch{return!1}}Ji(e){var n=H.ph_load_toolbar||H.ph_load_editor;!Z(n)&&At(n)?n(e,this.instance):Ov.warn("No toolbar load function found")}loadToolbar(e){var n=!(B==null||!B.getElementById(cx));if(!b||n)return!1;var r=this.instance.requestRouter.region==="custom"&&this.instance.config.advanced_disable_toolbar_metrics,i=F({token:this.instance.config.token},e,{apiURL:this.instance.requestRouter.endpointFor("ui")},r?{instrument:!1}:{});if(b.localStorage.setItem(Nv,JSON.stringify(F({},i,{source:void 0}))),this.Vi()===In.LOADED)this.Ji(i);else if(this.Vi()===In.UNINITIALIZED){var s;this.Gi(In.LOADING),(s=H.__PosthogExtensions__)==null||s.loadExternalDependency==null||s.loadExternalDependency(this.instance,"toolbar",o=>{if(o)return Ov.error("[Toolbar] Failed to load",o),void this.Gi(In.UNINITIALIZED);this.Gi(In.LOADED),this.Ji(i)}),pe(b,"turbolinks:load",()=>{this.Gi(In.UNINITIALIZED),this.loadToolbar(i)})}return!0}Ki(e){return this.loadToolbar(e)}maybeLoadEditor(e,n,r){return e===void 0&&(e=void 0),n===void 0&&(n=void 0),r===void 0&&(r=void 0),this.maybeLoadToolbar(e,n,r)}}var GI=Re("[TracingHeaders]");class qI{constructor(e){this.Yi=void 0,this.Xi=void 0,this.lt=()=>{var n,r;L(this.Yi)&&((n=H.__PosthogExtensions__)==null||(n=n.tracingHeadersPatchFns)==null||n._patchXHR(this._instance.config.__add_tracing_headers||[],this._instance.get_distinct_id(),this._instance.sessionManager)),L(this.Xi)&&((r=H.__PosthogExtensions__)==null||(r=r.tracingHeadersPatchFns)==null||r._patchFetch(this._instance.config.__add_tracing_headers||[],this._instance.get_distinct_id(),this._instance.sessionManager))},this._instance=e}nt(e){var n,r;(n=H.__PosthogExtensions__)!=null&&n.tracingHeadersPatchFns&&e(),(r=H.__PosthogExtensions__)==null||r.loadExternalDependency==null||r.loadExternalDependency(this._instance,"tracing-headers",i=>{if(i)return GI.error("failed to load script",i);e()})}startIfEnabledOrStop(){var e,n;this._instance.config.__add_tracing_headers?this.nt(this.lt):((e=this.Yi)==null||e.call(this),(n=this.Xi)==null||n.call(this),this.Yi=void 0,this.Xi=void 0)}}var An=Re("[Web Vitals]"),Lv=9e5;class YI{constructor(e){var n;this.Qi=!1,this.C=!1,this.H={url:void 0,metrics:[],firstMetricTimestamp:void 0},this.Zi=()=>{clearTimeout(this.te),this.H.metrics.length!==0&&(this._instance.capture("$web_vitals",this.H.metrics.reduce((r,i)=>F({},r,{["$web_vitals_"+i.name+"_event"]:F({},i),["$web_vitals_"+i.name+"_value"]:i.value}),{})),this.H={url:void 0,metrics:[],firstMetricTimestamp:void 0})},this.ie=r=>{var i,s=(i=this._instance.sessionManager)==null?void 0:i.checkAndGetSessionAndWindowId(!0);if(L(s))An.error("Could not read session ID. Dropping metrics!");else{this.H=this.H||{url:void 0,metrics:[],firstMetricTimestamp:void 0};var o=this.ee();L(o)||(Z(r==null?void 0:r.name)||Z(r==null?void 0:r.value)?An.error("Invalid metric received",r):this.re&&r.value>=this.re?An.error("Ignoring metric with value >= "+this.re,r):(this.H.url!==o&&(this.Zi(),this.te=setTimeout(this.Zi,this.flushToCaptureTimeoutMs)),L(this.H.url)&&(this.H.url=o),this.H.firstMetricTimestamp=L(this.H.firstMetricTimestamp)?Date.now():this.H.firstMetricTimestamp,r.attribution&&r.attribution.interactionTargetElement&&(r.attribution.interactionTargetElement=void 0),this.H.metrics.push(F({},r,{$current_url:o,$session_id:s.sessionId,$window_id:s.windowId,timestamp:Date.now()})),this.H.metrics.length===this.allowedMetrics.length&&this.Zi()))}},this.lt=()=>{var r,i,s,o,a=H.__PosthogExtensions__;L(a)||L(a.postHogWebVitalsCallbacks)||({onLCP:r,onCLS:i,onFCP:s,onINP:o}=a.postHogWebVitalsCallbacks),r&&i&&s&&o?(this.allowedMetrics.indexOf("LCP")>-1&&r(this.ie.bind(this)),this.allowedMetrics.indexOf("CLS")>-1&&i(this.ie.bind(this)),this.allowedMetrics.indexOf("FCP")>-1&&s(this.ie.bind(this)),this.allowedMetrics.indexOf("INP")>-1&&o(this.ie.bind(this)),this.C=!0):An.error("web vitals callbacks not loaded - not starting")},this._instance=e,this.Qi=!((n=this._instance.persistence)==null||!n.props[ov]),this.startIfEnabled()}get allowedMetrics(){var e,n,r=we(this._instance.config.capture_performance)?(e=this._instance.config.capture_performance)==null?void 0:e.web_vitals_allowed_metrics:void 0;return L(r)?((n=this._instance.persistence)==null?void 0:n.props[av])||["CLS","FCP","INP","LCP"]:r}get flushToCaptureTimeoutMs(){return(we(this._instance.config.capture_performance)?this._instance.config.capture_performance.web_vitals_delayed_flush_ms:void 0)||5e3}get re(){var e=we(this._instance.config.capture_performance)&&He(this._instance.config.capture_performance.__web_vitals_max_value)?this._instance.config.capture_performance.__web_vitals_max_value:Lv;return 0<e&&e<=6e4?Lv:e}get isEnabled(){var e=st==null?void 0:st.protocol;if(e!=="http:"&&e!=="https:")return An.info("Web Vitals are disabled on non-http/https protocols"),!1;var n=we(this._instance.config.capture_performance)?this._instance.config.capture_performance.web_vitals:Bt(this._instance.config.capture_performance)?this._instance.config.capture_performance:void 0;return Bt(n)?n:this.Qi}startIfEnabled(){this.isEnabled&&!this.C&&(An.info("enabled, starting..."),this.nt(this.lt))}onRemoteConfig(e){var n=we(e.capturePerformance)&&!!e.capturePerformance.web_vitals,r=we(e.capturePerformance)?e.capturePerformance.web_vitals_allowed_metrics:void 0;this._instance.persistence&&(this._instance.persistence.register({[ov]:n}),this._instance.persistence.register({[av]:r})),this.Qi=n,this.startIfEnabled()}nt(e){var n,r;(n=H.__PosthogExtensions__)!=null&&n.postHogWebVitalsCallbacks&&e(),(r=H.__PosthogExtensions__)==null||r.loadExternalDependency==null||r.loadExternalDependency(this._instance,"web-vitals",i=>{i?An.error("failed to load script",i):e()})}ee(){var e=b?b.location.href:void 0;return e||An.error("Could not determine current URL"),e}}var XI=Re("[Heatmaps]");function Dv(t){return we(t)&&"clientX"in t&&"clientY"in t&&He(t.clientX)&&He(t.clientY)}class QI{constructor(e){var n;this.rageclicks=new Ex,this.Qi=!1,this.C=!1,this.se=null,this.instance=e,this.Qi=!((n=this.instance.persistence)==null||!n.props[Id])}get flushIntervalMilliseconds(){var e=5e3;return we(this.instance.config.capture_heatmaps)&&this.instance.config.capture_heatmaps.flush_interval_milliseconds&&(e=this.instance.config.capture_heatmaps.flush_interval_milliseconds),e}get isEnabled(){return L(this.instance.config.capture_heatmaps)?L(this.instance.config.enable_heatmaps)?this.Qi:this.instance.config.enable_heatmaps:this.instance.config.capture_heatmaps!==!1}startIfEnabled(){if(this.isEnabled){if(this.C)return;XI.info("starting..."),this.ne(),this.se=setInterval(this.oe.bind(this),this.flushIntervalMilliseconds)}else{var e,n;clearInterval((e=this.se)!==null&&e!==void 0?e:void 0),(n=this.ae)==null||n.stop(),this.getAndClearBuffer()}}onRemoteConfig(e){var n=!!e.heatmaps;this.instance.persistence&&this.instance.persistence.register({[Id]:n}),this.Qi=n,this.startIfEnabled()}getAndClearBuffer(){var e=this.H;return this.H=void 0,e}le(e){this.ue(e.originalEvent,"deadclick")}ne(){b&&B&&(pe(b,"beforeunload",this.oe.bind(this)),pe(B,"click",e=>this.ue(e||(b==null?void 0:b.event)),{capture:!0}),pe(B,"mousemove",e=>this.he(e||(b==null?void 0:b.event)),{capture:!0}),this.ae=new Cx(this.instance,gI,this.le.bind(this)),this.ae.startIfEnabled(),this.C=!0)}de(e,n){var r=this.instance.scrollManager.scrollY(),i=this.instance.scrollManager.scrollX(),s=this.instance.scrollManager.scrollElement(),o=function(a,l,u){for(var c=a;c&&zl(c)&&!Yn(c,"body");){if(c===u)return!1;if(X(l,b==null?void 0:b.getComputedStyle(c).position))return!0;c=mx(c)}return!1}(px(e),["fixed","sticky"],s);return{x:e.clientX+(o?0:i),y:e.clientY+(o?0:r),target_fixed:o,type:n}}ue(e,n){var r;if(n===void 0&&(n="click"),!gv(e.target)&&Dv(e)){var i=this.de(e,n);(r=this.rageclicks)!=null&&r.isRageClick(e.clientX,e.clientY,new Date().getTime())&&this.ve(F({},i,{type:"rageclick"})),this.ve(i)}}he(e){!gv(e.target)&&Dv(e)&&(clearTimeout(this.ce),this.ce=setTimeout(()=>{this.ve(this.de(e,"mousemove"))},500))}ve(e){if(b){var n=b.location.href;this.H=this.H||{},this.H[n]||(this.H[n]=[]),this.H[n].push(e)}}oe(){this.H&&!ii(this.H)&&this.instance.capture("$$heatmap",{$heatmap_data:this.getAndClearBuffer()})}}class ZI{constructor(e){this._instance=e}doPageView(e,n){var r,i=this.fe(e,n);return this.pe={pathname:(r=b==null?void 0:b.location.pathname)!==null&&r!==void 0?r:"",pageViewId:n,timestamp:e},this._instance.scrollManager.resetContext(),i}doPageLeave(e){var n;return this.fe(e,(n=this.pe)==null?void 0:n.pageViewId)}doEvent(){var e;return{$pageview_id:(e=this.pe)==null?void 0:e.pageViewId}}fe(e,n){var r=this.pe;if(!r)return{$pageview_id:n};var i={$pageview_id:n,$prev_pageview_id:r.pageViewId},s=this._instance.scrollManager.getContext();if(s&&!this._instance.config.disable_scroll_properties){var{maxScrollHeight:o,lastScrollY:a,maxScrollY:l,maxContentHeight:u,lastContentY:c,maxContentY:d}=s;if(!(L(o)||L(a)||L(l)||L(u)||L(c)||L(d))){o=Math.ceil(o),a=Math.ceil(a),l=Math.ceil(l),u=Math.ceil(u),c=Math.ceil(c),d=Math.ceil(d);var f=o<=1?1:mt(a/o,0,1,V),h=o<=1?1:mt(l/o,0,1,V),y=u<=1?1:mt(c/u,0,1,V),m=u<=1?1:mt(d/u,0,1,V);i=Ee(i,{$prev_pageview_last_scroll:a,$prev_pageview_last_scroll_percentage:f,$prev_pageview_max_scroll:l,$prev_pageview_max_scroll_percentage:h,$prev_pageview_last_content:c,$prev_pageview_last_content_percentage:y,$prev_pageview_max_content:d,$prev_pageview_max_content_percentage:m})}}return r.pathname&&(i.$prev_pageview_pathname=r.pathname),r.timestamp&&(i.$prev_pageview_duration=(e.getTime()-r.timestamp.getTime())/1e3),i}}var JI=function(t){var e,n,r,i,s="";for(e=n=0,r=(t=(t+"").replace(/\r\n/g,`
|
|
154
|
+
`).replace(/\r/g,`
|
|
155
|
+
`)).length,i=0;i<r;i++){var o=t.charCodeAt(i),a=null;o<128?n++:a=o>127&&o<2048?String.fromCharCode(o>>6|192,63&o|128):String.fromCharCode(o>>12|224,o>>6&63|128,63&o|128),bn(a)||(n>e&&(s+=t.substring(e,n)),s+=a,e=n=i+1)}return n>e&&(s+=t.substring(e,t.length)),s},eN=!!Pd||!!bd,$v="text/plain",ll=(t,e)=>{var[n,r]=t.split("?"),i=F({},e);r==null||r.split("&").forEach(o=>{var[a]=o.split("=");delete i[a]});var s=nI(i);return n+"?"+(s=s?(r?r+"&":"")+s:r)},hs=(t,e)=>JSON.stringify(t,(n,r)=>typeof r=="bigint"?r.toString():r,e),qu=t=>{var{data:e,compression:n}=t;if(e){if(n===pn.GZipJS){var r=Mx(Ix(hs(e)),{mtime:0}),i=new Blob([r],{type:$v});return{contentType:$v,body:i,estimatedSize:i.size}}if(n===pn.Base64){var s=function(l){var u,c,d,f,h,y="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",m=0,_=0,p="",g=[];if(!l)return l;l=JI(l);do u=(h=l.charCodeAt(m++)<<16|l.charCodeAt(m++)<<8|l.charCodeAt(m++))>>18&63,c=h>>12&63,d=h>>6&63,f=63&h,g[_++]=y.charAt(u)+y.charAt(c)+y.charAt(d)+y.charAt(f);while(m<l.length);switch(p=g.join(""),l.length%3){case 1:p=p.slice(0,-2)+"==";break;case 2:p=p.slice(0,-1)+"="}return p}(hs(e)),o=(l=>"data="+encodeURIComponent(typeof l=="string"?l:hs(l)))(s);return{contentType:"application/x-www-form-urlencoded",body:o,estimatedSize:new Blob([o]).size}}var a=hs(e);return{contentType:"application/json",body:a,estimatedSize:new Blob([a]).size}}},fa=[];bd&&fa.push({transport:"fetch",method:t=>{var e,n,{contentType:r,body:i,estimatedSize:s}=(e=qu(t))!==null&&e!==void 0?e:{},o=new Headers;re(t.headers,function(c,d){o.append(d,c)}),r&&o.append("Content-Type",r);var a=t.url,l=null;if(Ym){var u=new Ym;l={signal:u.signal,timeout:setTimeout(()=>u.abort(),t.timeout)}}bd(a,F({method:(t==null?void 0:t.method)||"GET",headers:o,keepalive:t.method==="POST"&&(s||0)<52428.8,body:i,signal:(n=l)==null?void 0:n.signal},t.fetchOptions)).then(c=>c.text().then(d=>{var f={statusCode:c.status,text:d};if(c.status===200)try{f.json=JSON.parse(d)}catch(h){V.error(h)}t.callback==null||t.callback(f)})).catch(c=>{V.error(c),t.callback==null||t.callback({statusCode:0,text:c})}).finally(()=>l?clearTimeout(l.timeout):null)}}),Pd&&fa.push({transport:"XHR",method:t=>{var e,n=new Pd;n.open(t.method||"GET",t.url,!0);var{contentType:r,body:i}=(e=qu(t))!==null&&e!==void 0?e:{};re(t.headers,function(s,o){n.setRequestHeader(o,s)}),r&&n.setRequestHeader("Content-Type",r),t.timeout&&(n.timeout=t.timeout),t.disableXHRCredentials||(n.withCredentials=!0),n.onreadystatechange=()=>{if(n.readyState===4){var s={statusCode:n.status,text:n.responseText};if(n.status===200)try{s.json=JSON.parse(n.responseText)}catch{}t.callback==null||t.callback(s)}},n.send(i)}}),gt!=null&>.sendBeacon&&fa.push({transport:"sendBeacon",method:t=>{var e=ll(t.url,{beacon:"1"});try{var n,{contentType:r,body:i}=(n=qu(t))!==null&&n!==void 0?n:{},s=typeof i=="string"?new Blob([i],{type:r}):i;gt.sendBeacon(e,s)}catch{}}});var Ri=function(t,e){if(!function(n){try{new RegExp(n)}catch{return!1}return!0}(e))return!1;try{return new RegExp(e).test(t)}catch{return!1}};function Fv(t,e,n){return hs({distinct_id:t,userPropertiesToSet:e,userPropertiesToSetOnce:n})}var $x={exact:(t,e)=>e.some(n=>t.some(r=>n===r)),is_not:(t,e)=>e.every(n=>t.every(r=>n!==r)),regex:(t,e)=>e.some(n=>t.some(r=>Ri(n,r))),not_regex:(t,e)=>e.every(n=>t.every(r=>!Ri(n,r))),icontains:(t,e)=>e.map(Go).some(n=>t.map(Go).some(r=>n.includes(r))),not_icontains:(t,e)=>e.map(Go).every(n=>t.map(Go).every(r=>!n.includes(r)))},Go=t=>t.toLowerCase(),jv=Re("[Error tracking]");class tN{constructor(e){var n,r;this.ge=[],this._e=new M2([new I2,new B2,new O2,new N2,new j2,new F2,new D2,new V2],[b2,A2]),this._instance=e,this.ge=(n=(r=this._instance.persistence)==null?void 0:r.get_property(Nd))!==null&&n!==void 0?n:[]}onRemoteConfig(e){var n,r,i,s=(n=(r=e.errorTracking)==null?void 0:r.suppressionRules)!==null&&n!==void 0?n:[],o=(i=e.errorTracking)==null?void 0:i.captureExtensionExceptions;this.ge=s,this._instance.persistence&&this._instance.persistence.register({[Nd]:this.ge,[sv]:o})}get me(){var e,n=!!this._instance.get_property(sv),r=this._instance.config.error_tracking.captureExtensionExceptions;return(e=r??n)!==null&&e!==void 0&&e}buildProperties(e,n){return this._e.buildFromUnknown(e,{syntheticException:n==null?void 0:n.syntheticException,mechanism:{handled:n==null?void 0:n.handled}})}sendExceptionEvent(e){if(this.ye(e))jv.info("Skipping exception capture because a suppression rule matched");else{if(this.me||!this.be(e))return this._instance.capture("$exception",e,{_noTruncate:!0,_batchKey:"exceptionEvent"});jv.info("Skipping exception capture because it was thrown by an extension")}}ye(e){var n=e.$exception_list;if(!n||!ie(n)||n.length===0)return!1;var r=n.reduce((i,s)=>{var{type:o,value:a}=s;return xe(o)&&o.length>0&&i.$exception_types.push(o),xe(a)&&a.length>0&&i.$exception_values.push(a),i},{$exception_types:[],$exception_values:[]});return this.ge.some(i=>{var s=i.values.map(o=>{var a,l=$x[o.operator],u=ie(o.value)?o.value:[o.value],c=(a=r[o.key])!==null&&a!==void 0?a:[];return u.length>0&&l(u,c)});return i.type==="OR"?s.some(Boolean):s.every(Boolean)})}be(e){var n=e.$exception_list;return!(!n||!ie(n))&&n.flatMap(r=>{var i,s;return(i=(s=r.stacktrace)==null?void 0:s.frames)!==null&&i!==void 0?i:[]}).some(r=>r.filename&&r.filename.startsWith("chrome-extension://"))}}var Mt="Mobile",ul="iOS",Jt="Android",no="Tablet",Fx=Jt+" "+no,jx="iPad",Vx="Apple",Bx=Vx+" Watch",ro="Safari",Mi="BlackBerry",zx="Samsung",Ux=zx+"Browser",Hx=zx+" Internet",Nr="Chrome",nN=Nr+" OS",Wx=Nr+" "+ul,tp="Internet Explorer",Kx=tp+" "+Mt,np="Opera",rN=np+" Mini",rp="Edge",Gx="Microsoft "+rp,pi="Firefox",qx=pi+" "+ul,io="Nintendo",so="PlayStation",gi="Xbox",Yx=Jt+" "+Mt,Xx=Mt+" "+ro,ps="Windows",Qd=ps+" Phone",Vv="Nokia",Zd="Ouya",Qx="Generic",iN=Qx+" "+Mt.toLowerCase(),Zx=Qx+" "+no.toLowerCase(),Jd="Konqueror",Ye="(\\d+(\\.\\d+)?)",Yu=new RegExp("Version/"+Ye),sN=new RegExp(gi,"i"),oN=new RegExp(so+" \\w+","i"),aN=new RegExp(io+" \\w+","i"),ip=new RegExp(Mi+"|PlayBook|BB10","i"),lN={"NT3.51":"NT 3.11","NT4.0":"NT 4.0","5.0":"2000",5.1:"XP",5.2:"XP","6.0":"Vista",6.1:"7",6.2:"8",6.3:"8.1",6.4:"10","10.0":"10"},uN=(t,e)=>e&&X(e,Vx)||function(n){return X(n,ro)&&!X(n,Nr)&&!X(n,Jt)}(t),Jx=function(t,e){return e=e||"",X(t," OPR/")&&X(t,"Mini")?rN:X(t," OPR/")?np:ip.test(t)?Mi:X(t,"IE"+Mt)||X(t,"WPDesktop")?Kx:X(t,Ux)?Hx:X(t,rp)||X(t,"Edg/")?Gx:X(t,"FBIOS")?"Facebook "+Mt:X(t,"UCWEB")||X(t,"UCBrowser")?"UC Browser":X(t,"CriOS")?Wx:X(t,"CrMo")||X(t,Nr)?Nr:X(t,Jt)&&X(t,ro)?Yx:X(t,"FxiOS")?qx:X(t.toLowerCase(),Jd.toLowerCase())?Jd:uN(t,e)?X(t,Mt)?Xx:ro:X(t,pi)?pi:X(t,"MSIE")||X(t,"Trident/")?tp:X(t,"Gecko")?pi:""},cN={[Kx]:[new RegExp("rv:"+Ye)],[Gx]:[new RegExp(rp+"?\\/"+Ye)],[Nr]:[new RegExp("("+Nr+"|CrMo)\\/"+Ye)],[Wx]:[new RegExp("CriOS\\/"+Ye)],"UC Browser":[new RegExp("(UCBrowser|UCWEB)\\/"+Ye)],[ro]:[Yu],[Xx]:[Yu],[np]:[new RegExp("(Opera|OPR)\\/"+Ye)],[pi]:[new RegExp(pi+"\\/"+Ye)],[qx]:[new RegExp("FxiOS\\/"+Ye)],[Jd]:[new RegExp("Konqueror[:/]?"+Ye,"i")],[Mi]:[new RegExp(Mi+" "+Ye),Yu],[Yx]:[new RegExp("android\\s"+Ye,"i")],[Hx]:[new RegExp(Ux+"\\/"+Ye)],[tp]:[new RegExp("(rv:|MSIE )"+Ye)],Mozilla:[new RegExp("rv:"+Ye)]},dN=function(t,e){var n=Jx(t,e),r=cN[n];if(L(r))return null;for(var i=0;i<r.length;i++){var s=r[i],o=t.match(s);if(o)return parseFloat(o[o.length-2])}return null},Bv=[[new RegExp(gi+"; "+gi+" (.*?)[);]","i"),t=>[gi,t&&t[1]||""]],[new RegExp(io,"i"),[io,""]],[new RegExp(so,"i"),[so,""]],[ip,[Mi,""]],[new RegExp(ps,"i"),(t,e)=>{if(/Phone/.test(e)||/WPDesktop/.test(e))return[Qd,""];if(new RegExp(Mt).test(e)&&!/IEMobile\b/.test(e))return[ps+" "+Mt,""];var n=/Windows NT ([0-9.]+)/i.exec(e);if(n&&n[1]){var r=n[1],i=lN[r]||"";return/arm/i.test(e)&&(i="RT"),[ps,i]}return[ps,""]}],[/((iPhone|iPad|iPod).*?OS (\d+)_(\d+)_?(\d+)?|iPhone)/,t=>{if(t&&t[3]){var e=[t[3],t[4],t[5]||"0"];return[ul,e.join(".")]}return[ul,""]}],[/(watch.*\/(\d+\.\d+\.\d+)|watch os,(\d+\.\d+),)/i,t=>{var e="";return t&&t.length>=3&&(e=L(t[2])?t[3]:t[2]),["watchOS",e]}],[new RegExp("("+Jt+" (\\d+)\\.(\\d+)\\.?(\\d+)?|"+Jt+")","i"),t=>{if(t&&t[2]){var e=[t[2],t[3],t[4]||"0"];return[Jt,e.join(".")]}return[Jt,""]}],[/Mac OS X (\d+)[_.](\d+)[_.]?(\d+)?/i,t=>{var e=["Mac OS X",""];if(t&&t[1]){var n=[t[1],t[2],t[3]||"0"];e[1]=n.join(".")}return e}],[/Mac/i,["Mac OS X",""]],[/CrOS/,[nN,""]],[/Linux|debian/i,["Linux",""]]],zv=function(t){return aN.test(t)?io:oN.test(t)?so:sN.test(t)?gi:new RegExp(Zd,"i").test(t)?Zd:new RegExp("("+Qd+"|WPDesktop)","i").test(t)?Qd:/iPad/.test(t)?jx:/iPod/.test(t)?"iPod Touch":/iPhone/.test(t)?"iPhone":/(watch)(?: ?os[,/]|\d,\d\/)[\d.]+/i.test(t)?Bx:ip.test(t)?Mi:/(kobo)\s(ereader|touch)/i.test(t)?"Kobo":new RegExp(Vv,"i").test(t)?Vv:/(kf[a-z]{2}wi|aeo[c-r]{2})( bui|\))/i.test(t)||/(kf[a-z]+)( bui|\)).+silk\//i.test(t)?"Kindle Fire":/(Android|ZTE)/i.test(t)?!new RegExp(Mt).test(t)||/(9138B|TB782B|Nexus [97]|pixel c|HUAWEISHT|BTV|noble nook|smart ultra 6)/i.test(t)?/pixel[\daxl ]{1,6}/i.test(t)&&!/pixel c/i.test(t)||/(huaweimed-al00|tah-|APA|SM-G92|i980|zte|U304AA)/i.test(t)||/lmy47v/i.test(t)&&!/QTAQZ3/i.test(t)?Jt:Fx:Jt:new RegExp("(pda|"+Mt+")","i").test(t)?iN:new RegExp(no,"i").test(t)&&!new RegExp(no+" pc","i").test(t)?Zx:""},qo="https?://(.*)",Hl=["gclid","gclsrc","dclid","gbraid","wbraid","fbclid","msclkid","twclid","li_fat_id","igshid","ttclid","rdt_cid","epik","qclid","sccid","irclid","_kx"],fN=Bl(["utm_source","utm_medium","utm_campaign","utm_content","utm_term","gad_source","mc_cid"],Hl),sp="<masked>",hN=["li_fat_id"];function eS(t,e,n){if(!B)return{};var r,i=e?Bl([],Hl,n||[]):[],s=tS(Yh(B.URL,i,sp),t),o=(r={},re(hN,function(a){var l=sn.J(a);r[a]=l||null}),r);return Ee(o,s)}function tS(t,e){var n=fN.concat(e||[]),r={};return re(n,function(i){var s=nl(t,i);r[i]=s||null}),r}function nS(t){var e=function(s){return s?s.search(qo+"google.([^/?]*)")===0?"google":s.search(qo+"bing.com")===0?"bing":s.search(qo+"yahoo.com")===0?"yahoo":s.search(qo+"duckduckgo.com")===0?"duckduckgo":null:null}(t),n=e!="yahoo"?"q":"p",r={};if(!bn(e)){r.$search_engine=e;var i=B?nl(B.referrer,n):"";i.length&&(r.ph_keyword=i)}return r}function Uv(){return navigator.language||navigator.userLanguage}function rS(){return(B==null?void 0:B.referrer)||"$direct"}function iS(t,e){var n=t?Bl([],Hl,e||[]):[],r=st==null?void 0:st.href.substring(0,1e3);return{r:rS().substring(0,1e3),u:r?Yh(r,n,sp):void 0}}function sS(t){var e,{r:n,u:r}=t,i={$referrer:n,$referring_domain:n==null?void 0:n=="$direct"?"$direct":(e=Ti(n))==null?void 0:e.host};if(r){i.$current_url=r;var s=Ti(r);i.$host=s==null?void 0:s.host,i.$pathname=s==null?void 0:s.pathname;var o=tS(r);Ee(i,o)}if(n){var a=nS(n);Ee(i,a)}return i}function oS(){try{return Intl.DateTimeFormat().resolvedOptions().timeZone}catch{return}}function pN(){try{return new Date().getTimezoneOffset()}catch{return}}function gN(t,e){if(!rt)return{};var n,r,i,s=t?Bl([],Hl,e||[]):[],[o,a]=function(l){for(var u=0;u<Bv.length;u++){var[c,d]=Bv[u],f=c.exec(l),h=f&&(At(d)?d(f,l):d);if(h)return h}return["",""]}(rt);return Ee(Wh({$os:o,$os_version:a,$browser:Jx(rt,navigator.vendor),$device:zv(rt),$device_type:(r=rt,i=zv(r),i===jx||i===Fx||i==="Kobo"||i==="Kindle Fire"||i===Zx?no:i===io||i===gi||i===so||i===Zd?"Console":i===Bx?"Wearable":i?Mt:"Desktop"),$timezone:oS(),$timezone_offset:pN()}),{$current_url:Yh(st==null?void 0:st.href,s,sp),$host:st==null?void 0:st.host,$pathname:st==null?void 0:st.pathname,$raw_user_agent:rt.length>1e3?rt.substring(0,997)+"...":rt,$browser_version:dN(rt,navigator.vendor),$browser_language:Uv(),$browser_language_prefix:(n=Uv(),typeof n=="string"?n.split("-")[0]:void 0),$screen_height:b==null?void 0:b.screen.height,$screen_width:b==null?void 0:b.screen.width,$viewport_height:b==null?void 0:b.innerHeight,$viewport_width:b==null?void 0:b.innerWidth,$lib:"web",$lib_version:hn.LIB_VERSION,$insert_id:Math.random().toString(36).substring(2,10)+Math.random().toString(36).substring(2,10),$time:Date.now()/1e3})}var Yt=Re("[FeatureFlags]"),Xu="$active_feature_flags",Fr="$override_feature_flags",Hv="$feature_flag_payloads",es="$override_feature_flag_payloads",Wv="$feature_flag_request_id",Kv=t=>{var e={};for(var[n,r]of da(t||{}))r&&(e[n]=r);return e},mN=t=>{var e=t.flags;return e?(t.featureFlags=Object.fromEntries(Object.keys(e).map(n=>{var r;return[n,(r=e[n].variant)!==null&&r!==void 0?r:e[n].enabled]})),t.featureFlagPayloads=Object.fromEntries(Object.keys(e).filter(n=>e[n].enabled).filter(n=>{var r;return(r=e[n].metadata)==null?void 0:r.payload}).map(n=>{var r;return[n,(r=e[n].metadata)==null?void 0:r.payload]}))):Yt.warn("Using an older version of the feature flags endpoint. Please upgrade your PostHog server to the latest version"),t},vN=function(t){return t.FeatureFlags="feature_flags",t.Recordings="recordings",t}({});class yN{constructor(e){this.we=!1,this.Se=!1,this.ke=!1,this.$e=!1,this.xe=!1,this.Ee=!1,this.Re=!1,this._instance=e,this.featureFlagEventHandlers=[]}flags(){if(this._instance.config.__preview_remote_config)this.Ee=!0;else{var e=!this.Pe&&(this._instance.config.advanced_disable_feature_flags||this._instance.config.advanced_disable_feature_flags_on_first_load);this.Ie({disableFlags:e})}}get hasLoadedFlags(){return this.Se}getFlags(){return Object.keys(this.getFlagVariants())}getFlagsWithDetails(){var e=this._instance.get_property($d),n=this._instance.get_property(Fr),r=this._instance.get_property(es);if(!r&&!n)return e||{};var i=Ee({},e||{}),s=[...new Set([...Object.keys(r||{}),...Object.keys(n||{})])];for(var o of s){var a,l,u=i[o],c=n==null?void 0:n[o],d=L(c)?(a=u==null?void 0:u.enabled)!==null&&a!==void 0&&a:!!c,f=L(c)?u.variant:typeof c=="string"?c:void 0,h=r==null?void 0:r[o],y=F({},u,{enabled:d,variant:d?f??(u==null?void 0:u.variant):void 0});d!==(u==null?void 0:u.enabled)&&(y.original_enabled=u==null?void 0:u.enabled),f!==(u==null?void 0:u.variant)&&(y.original_variant=u==null?void 0:u.variant),h&&(y.metadata=F({},u==null?void 0:u.metadata,{payload:h,original_payload:u==null||(l=u.metadata)==null?void 0:l.payload})),i[o]=y}return this.we||(Yt.warn(" Overriding feature flag details!",{flagDetails:e,overriddenPayloads:r,finalDetails:i}),this.we=!0),i}getFlagVariants(){var e=this._instance.get_property(oi),n=this._instance.get_property(Fr);if(!n)return e||{};for(var r=Ee({},e),i=Object.keys(n),s=0;s<i.length;s++)r[i[s]]=n[i[s]];return this.we||(Yt.warn(" Overriding feature flags!",{enabledFlags:e,overriddenFlags:n,finalFlags:r}),this.we=!0),r}getFlagPayloads(){var e=this._instance.get_property(Hv),n=this._instance.get_property(es);if(!n)return e||{};for(var r=Ee({},e||{}),i=Object.keys(n),s=0;s<i.length;s++)r[i[s]]=n[i[s]];return this.we||(Yt.warn(" Overriding feature flag payloads!",{flagPayloads:e,overriddenPayloads:n,finalPayloads:r}),this.we=!0),r}reloadFeatureFlags(){this.$e||this._instance.config.advanced_disable_feature_flags||this.Pe||(this.Pe=setTimeout(()=>{this.Ie()},5))}Te(){clearTimeout(this.Pe),this.Pe=void 0}ensureFlagsLoaded(){this.Se||this.ke||this.Pe||this.reloadFeatureFlags()}setAnonymousDistinctId(e){this.$anon_distinct_id=e}setReloadingPaused(e){this.$e=e}Ie(e){var n;if(this.Te(),!this._instance.L())if(this.ke)this.xe=!0;else{var r={token:this._instance.config.token,distinct_id:this._instance.get_distinct_id(),groups:this._instance.getGroups(),$anon_distinct_id:this.$anon_distinct_id,person_properties:F({},((n=this._instance.persistence)==null?void 0:n.get_initial_props())||{},this._instance.get_property(ds)||{}),group_properties:this._instance.get_property(hr)};(e!=null&&e.disableFlags||this._instance.config.advanced_disable_feature_flags)&&(r.disable_flags=!0);var i=this._instance.config.__preview_remote_config,s=i?"/flags/?v=2":"/flags/?v=2&config=true",o=this._instance.config.advanced_only_evaluate_survey_feature_flags?"&only_evaluate_survey_feature_flags=true":"",a=this._instance.requestRouter.endpointFor("api",s+o);i&&(r.timezone=oS()),this.ke=!0,this._instance.Ce({method:"POST",url:a,data:r,compression:this._instance.config.disable_compression?void 0:pn.Base64,timeout:this._instance.config.feature_flag_request_timeout_ms,callback:l=>{var u,c,d=!0;if(l.statusCode===200&&(this.xe||(this.$anon_distinct_id=void 0),d=!1),this.ke=!1,this.Ee||(this.Ee=!0,this._instance.Me((c=l.json)!==null&&c!==void 0?c:{})),!r.disable_flags||this.xe)if(this.Re=!d,l.json&&(u=l.json.quotaLimited)!=null&&u.includes(vN.FeatureFlags))Yt.warn("You have hit your feature flags quota limit, and will not be able to load feature flags until the quota is reset. Please visit https://posthog.com/docs/billing/limits-alerts to learn more.");else{var f;r.disable_flags||this.receivedFeatureFlags((f=l.json)!==null&&f!==void 0?f:{},d),this.xe&&(this.xe=!1,this.Ie())}}})}}getFeatureFlag(e,n){if(n===void 0&&(n={}),this.Se||this.getFlags()&&this.getFlags().length>0){var r=this.getFlagVariants()[e],i=""+r,s=this._instance.get_property(Wv)||void 0,o=this._instance.get_property(Za)||{};if((n.send_event||!("send_event"in n))&&(!(e in o)||!o[e].includes(i))){var a,l,u,c,d,f,h,y,m;ie(o[e])?o[e].push(i):o[e]=[i],(a=this._instance.persistence)==null||a.register({[Za]:o});var _=this.getFeatureFlagDetails(e),p={$feature_flag:e,$feature_flag_response:r,$feature_flag_payload:this.getFeatureFlagPayload(e)||null,$feature_flag_request_id:s,$feature_flag_bootstrapped_response:((l=this._instance.config.bootstrap)==null||(l=l.featureFlags)==null?void 0:l[e])||null,$feature_flag_bootstrapped_payload:((u=this._instance.config.bootstrap)==null||(u=u.featureFlagPayloads)==null?void 0:u[e])||null,$used_bootstrap_value:!this.Re};L(_==null||(c=_.metadata)==null?void 0:c.version)||(p.$feature_flag_version=_.metadata.version);var g,v=(d=_==null||(f=_.reason)==null?void 0:f.description)!==null&&d!==void 0?d:_==null||(h=_.reason)==null?void 0:h.code;v&&(p.$feature_flag_reason=v),_!=null&&(y=_.metadata)!=null&&y.id&&(p.$feature_flag_id=_.metadata.id),L(_==null?void 0:_.original_variant)&&L(_==null?void 0:_.original_enabled)||(p.$feature_flag_original_response=L(_.original_variant)?_.original_enabled:_.original_variant),_!=null&&(m=_.metadata)!=null&&m.original_payload&&(p.$feature_flag_original_payload=_==null||(g=_.metadata)==null?void 0:g.original_payload),this._instance.capture("$feature_flag_called",p)}return r}Yt.warn('getFeatureFlag for key "'+e+`" failed. Feature flags didn't load in time.`)}getFeatureFlagDetails(e){return this.getFlagsWithDetails()[e]}getFeatureFlagPayload(e){return this.getFlagPayloads()[e]}getRemoteConfigPayload(e,n){var r=this._instance.config.token;this._instance.Ce({method:"POST",url:this._instance.requestRouter.endpointFor("api","/flags/?v=2&config=true"),data:{distinct_id:this._instance.get_distinct_id(),token:r},compression:this._instance.config.disable_compression?void 0:pn.Base64,timeout:this._instance.config.feature_flag_request_timeout_ms,callback:i=>{var s,o=(s=i.json)==null?void 0:s.featureFlagPayloads;n((o==null?void 0:o[e])||void 0)}})}isFeatureEnabled(e,n){if(n===void 0&&(n={}),this.Se||this.getFlags()&&this.getFlags().length>0){var r=this.getFeatureFlag(e,n);return L(r)?void 0:!!r}Yt.warn('isFeatureEnabled for key "'+e+`" failed. Feature flags didn't load in time.`)}addFeatureFlagsHandler(e){this.featureFlagEventHandlers.push(e)}removeFeatureFlagsHandler(e){this.featureFlagEventHandlers=this.featureFlagEventHandlers.filter(n=>n!==e)}receivedFeatureFlags(e,n){if(this._instance.persistence){this.Se=!0;var r=this.getFlagVariants(),i=this.getFlagPayloads(),s=this.getFlagsWithDetails();(function(o,a,l,u,c){l===void 0&&(l={}),u===void 0&&(u={}),c===void 0&&(c={});var d=mN(o),f=d.flags,h=d.featureFlags,y=d.featureFlagPayloads;if(h){var m=o.requestId;if(ie(h)){Yt.warn("v1 of the feature flags endpoint is deprecated. Please use the latest version.");var _={};if(h)for(var p=0;p<h.length;p++)_[h[p]]=!0;a&&a.register({[Xu]:h,[oi]:_})}else{var g=h,v=y,w=f;o.errorsWhileComputingFlags&&(g=F({},l,g),v=F({},u,v),w=F({},c,w)),a&&a.register(F({[Xu]:Object.keys(Kv(g)),[oi]:g||{},[Hv]:v||{},[$d]:w||{}},m?{[Wv]:m}:{}))}}})(e,this._instance.persistence,r,i,s),this.Oe(n)}}override(e,n){n===void 0&&(n=!1),Yt.warn("override is deprecated. Please use overrideFeatureFlags instead."),this.overrideFeatureFlags({flags:e,suppressWarning:n})}overrideFeatureFlags(e){if(!this._instance.__loaded||!this._instance.persistence)return Yt.uninitializedWarning("posthog.featureFlags.overrideFeatureFlags");if(e===!1)return this._instance.persistence.unregister(Fr),this._instance.persistence.unregister(es),void this.Oe();if(e&&typeof e=="object"&&("flags"in e||"payloads"in e)){var n,r=e;if(this.we=!!((n=r.suppressWarning)!==null&&n!==void 0&&n),"flags"in r){if(r.flags===!1)this._instance.persistence.unregister(Fr);else if(r.flags)if(ie(r.flags)){for(var i={},s=0;s<r.flags.length;s++)i[r.flags[s]]=!0;this._instance.persistence.register({[Fr]:i})}else this._instance.persistence.register({[Fr]:r.flags})}return"payloads"in r&&(r.payloads===!1?this._instance.persistence.unregister(es):r.payloads&&this._instance.persistence.register({[es]:r.payloads})),void this.Oe()}this.Oe()}onFeatureFlags(e){if(this.addFeatureFlagsHandler(e),this.Se){var{flags:n,flagVariants:r}=this.Fe();e(n,r)}return()=>this.removeFeatureFlagsHandler(e)}updateEarlyAccessFeatureEnrollment(e,n,r){var i,s=(this._instance.get_property(cs)||[]).find(u=>u.flagKey===e),o={["$feature_enrollment/"+e]:n},a={$feature_flag:e,$feature_enrollment:n,$set:o};s&&(a.$early_access_feature_name=s.name),r&&(a.$feature_enrollment_stage=r),this._instance.capture("$feature_enrollment_update",a),this.setPersonPropertiesForFlags(o,!1);var l=F({},this.getFlagVariants(),{[e]:n});(i=this._instance.persistence)==null||i.register({[Xu]:Object.keys(Kv(l)),[oi]:l}),this.Oe()}getEarlyAccessFeatures(e,n,r){n===void 0&&(n=!1);var i=this._instance.get_property(cs),s=r?"&"+r.map(o=>"stage="+o).join("&"):"";if(i&&!n)return e(i);this._instance.Ce({url:this._instance.requestRouter.endpointFor("api","/api/early_access_features/?token="+this._instance.config.token+s),method:"GET",callback:o=>{var a,l;if(o.json){var u=o.json.earlyAccessFeatures;return(a=this._instance.persistence)==null||a.unregister(cs),(l=this._instance.persistence)==null||l.register({[cs]:u}),e(u)}}})}Fe(){var e=this.getFlags(),n=this.getFlagVariants();return{flags:e.filter(r=>n[r]),flagVariants:Object.keys(n).filter(r=>n[r]).reduce((r,i)=>(r[i]=n[i],r),{})}}Oe(e){var{flags:n,flagVariants:r}=this.Fe();this.featureFlagEventHandlers.forEach(i=>i(n,r,{errorsLoading:e}))}setPersonPropertiesForFlags(e,n){n===void 0&&(n=!0);var r=this._instance.get_property(ds)||{};this._instance.register({[ds]:F({},r,e)}),n&&this._instance.reloadFeatureFlags()}resetPersonPropertiesForFlags(){this._instance.unregister(ds)}setGroupPropertiesForFlags(e,n){n===void 0&&(n=!0);var r=this._instance.get_property(hr)||{};Object.keys(r).length!==0&&Object.keys(r).forEach(i=>{r[i]=F({},r[i],e[i]),delete e[i]}),this._instance.register({[hr]:F({},r,e)}),n&&this._instance.reloadFeatureFlags()}resetGroupPropertiesForFlags(e){if(e){var n=this._instance.get_property(hr)||{};this._instance.register({[hr]:F({},n,{[e]:{}})})}else this._instance.unregister(hr)}reset(){this.Se=!1,this.ke=!1,this.$e=!1,this.xe=!1,this.Ee=!1,this.Re=!1,this.$anon_distinct_id=void 0,this.Te(),this.we=!1}}var _N=["cookie","localstorage","localstorage+cookie","sessionstorage","memory"];class Qu{constructor(e,n){this.A=e,this.props={},this.Ae=!1,this.De=(r=>{var i="";return r.token&&(i=r.token.replace(/\+/g,"PL").replace(/\//g,"SL").replace(/=/g,"EQ")),r.persistence_name?"ph_"+r.persistence_name:"ph_"+i+"_posthog"})(e),this.it=this.je(e),this.load(),e.debug&&V.info("Persistence loaded",e.persistence,F({},this.props)),this.update_config(e,e,n),this.save()}isDisabled(){return!!this.Le}je(e){_N.indexOf(e.persistence.toLowerCase())===-1&&(V.critical("Unknown persistence type "+e.persistence+"; falling back to localStorage+cookie"),e.persistence="localStorage+cookie");var n=e.persistence.toLowerCase();return n==="localstorage"&&Te.G()?Te:n==="localstorage+cookie"&&zo.G()?zo:n==="sessionstorage"&&De.G()?De:n==="memory"?hI:n==="cookie"?sn:zo.G()?zo:sn}properties(){var e={};return re(this.props,function(n,r){if(r===oi&&we(n))for(var i=Object.keys(n),s=0;s<i.length;s++)e["$feature/"+i[s]]=n[i[s]];else a=r,l=!1,(bn(o=G2)?l:qm&&o.indexOf===qm?o.indexOf(a)!=-1:(re(o,function(u){if(l||(l=u===a))return Xa}),l))||(e[r]=n);var o,a,l}),e}load(){if(!this.Le){var e=this.it.K(this.De);e&&(this.props=Ee({},e))}}save(){this.Le||this.it.Y(this.De,this.props,this.Ne,this.Ue,this.ze,this.A.debug)}remove(){this.it.X(this.De,!1),this.it.X(this.De,!0)}clear(){this.remove(),this.props={}}register_once(e,n,r){if(we(e)){L(n)&&(n="None"),this.Ne=L(r)?this.Be:r;var i=!1;if(re(e,(s,o)=>{this.props.hasOwnProperty(o)&&this.props[o]!==n||(this.props[o]=s,i=!0)}),i)return this.save(),!0}return!1}register(e,n){if(we(e)){this.Ne=L(n)?this.Be:n;var r=!1;if(re(e,(i,s)=>{e.hasOwnProperty(s)&&this.props[s]!==i&&(this.props[s]=i,r=!0)}),r)return this.save(),!0}return!1}unregister(e){e in this.props&&(delete this.props[e],this.save())}update_campaign_params(){if(!this.Ae){var e=eS(this.A.custom_campaign_params,this.A.mask_personal_data_properties,this.A.custom_personal_data_properties);ii(Wh(e))||this.register(e),this.Ae=!0}}update_search_keyword(){var e;this.register((e=B==null?void 0:B.referrer)?nS(e):{})}update_referrer_info(){var e;this.register_once({$referrer:rS(),$referring_domain:B!=null&&B.referrer&&((e=Ti(B.referrer))==null?void 0:e.host)||"$direct"},void 0)}set_initial_person_info(){this.props[Bd]||this.props[zd]||this.register_once({[Ja]:iS(this.A.mask_personal_data_properties,this.A.custom_personal_data_properties)},void 0)}get_initial_props(){var e={};re([zd,Bd],o=>{var a=this.props[o];a&&re(a,function(l,u){e["$initial_"+Td(u)]=l})});var n,r,i=this.props[Ja];if(i){var s=(n=sS(i),r={},re(n,function(o,a){r["$initial_"+Td(a)]=o}),r);Ee(e,s)}return e}safe_merge(e){return re(this.props,function(n,r){r in e||(e[r]=n)}),e}update_config(e,n,r){if(this.Be=this.Ne=e.cookie_expiration,this.set_disabled(e.disable_persistence||!!r),this.set_cross_subdomain(e.cross_subdomain_cookie),this.set_secure(e.secure_cookie),e.persistence!==n.persistence){var i=this.je(e),s=this.props;this.clear(),this.it=i,this.props=s,this.save()}}set_disabled(e){this.Le=e,this.Le?this.remove():this.save()}set_cross_subdomain(e){e!==this.Ue&&(this.Ue=e,this.remove(),this.save())}set_secure(e){e!==this.ze&&(this.ze=e,this.remove(),this.save())}set_event_timer(e,n){var r=this.props[us]||{};r[e]=n,this.props[us]=r,this.save()}remove_event_timer(e){var n=(this.props[us]||{})[e];return L(n)||(delete this.props[us][e],this.save()),n}get_property(e){return this.props[e]}set_property(e,n){this.props[e]=n,this.save()}}(function(t){return t.Button="button",t.Tab="tab",t.Selector="selector",t})({});(function(t){return t.TopLeft="top_left",t.TopRight="top_right",t.TopCenter="top_center",t.MiddleLeft="middle_left",t.MiddleRight="middle_right",t.MiddleCenter="middle_center",t.Left="left",t.Center="center",t.Right="right",t.NextToTrigger="next_to_trigger",t})({});var Zu=function(t){return t.Popover="popover",t.API="api",t.Widget="widget",t.ExternalSurvey="external_survey",t}({});(function(t){return t.Open="open",t.MultipleChoice="multiple_choice",t.SingleChoice="single_choice",t.Rating="rating",t.Link="link",t})({});(function(t){return t.NextQuestion="next_question",t.End="end",t.ResponseBased="response_based",t.SpecificQuestion="specific_question",t})({});(function(t){return t.Once="once",t.Recurring="recurring",t.Always="always",t})({});var ha=function(t){return t.SHOWN="survey shown",t.DISMISSED="survey dismissed",t.SENT="survey sent",t}({}),Gv=function(t){return t.SURVEY_ID="$survey_id",t.SURVEY_NAME="$survey_name",t.SURVEY_RESPONSE="$survey_response",t.SURVEY_ITERATION="$survey_iteration",t.SURVEY_ITERATION_START_DATE="$survey_iteration_start_date",t.SURVEY_PARTIALLY_COMPLETED="$survey_partially_completed",t.SURVEY_SUBMISSION_ID="$survey_submission_id",t.SURVEY_QUESTIONS="$survey_questions",t.SURVEY_COMPLETED="$survey_completed",t}({}),aS=function(t){return t.Popover="popover",t.Inline="inline",t}({});class op{constructor(){this.qe={},this.qe={}}on(e,n){return this.qe[e]||(this.qe[e]=[]),this.qe[e].push(n),()=>{this.qe[e]=this.qe[e].filter(r=>r!==n)}}emit(e,n){for(var r of this.qe[e]||[])r(n);for(var i of this.qe["*"]||[])i(e,n)}}class pr{constructor(e){this.He=new op,this.We=(n,r)=>this.Ge(n,r)&&this.Ve(n,r)&&this.Je(n,r),this.Ge=(n,r)=>r==null||!r.event||(n==null?void 0:n.event)===(r==null?void 0:r.event),this._instance=e,this.Ke=new Set,this.Ye=new Set}init(){var e;if(!L((e=this._instance)==null?void 0:e.Xe)){var n;(n=this._instance)==null||n.Xe((r,i)=>{this.on(r,i)})}}register(e){var n,r;if(!L((n=this._instance)==null?void 0:n.Xe)&&(e.forEach(o=>{var a,l;(a=this.Ye)==null||a.add(o),(l=o.steps)==null||l.forEach(u=>{var c;(c=this.Ke)==null||c.add((u==null?void 0:u.event)||"")})}),(r=this._instance)!=null&&r.autocapture)){var i,s=new Set;e.forEach(o=>{var a;(a=o.steps)==null||a.forEach(l=>{l!=null&&l.selector&&s.add(l==null?void 0:l.selector)})}),(i=this._instance)==null||i.autocapture.setElementSelectors(s)}}on(e,n){var r;n!=null&&e.length!=0&&(this.Ke.has(e)||this.Ke.has(n==null?void 0:n.event))&&this.Ye&&((r=this.Ye)==null?void 0:r.size)>0&&this.Ye.forEach(i=>{this.Qe(n,i)&&this.He.emit("actionCaptured",i.name)})}Ze(e){this.onAction("actionCaptured",n=>e(n))}Qe(e,n){if((n==null?void 0:n.steps)==null)return!1;for(var r of n.steps)if(this.We(e,r))return!0;return!1}onAction(e,n){return this.He.on(e,n)}Ve(e,n){if(n!=null&&n.url){var r,i=e==null||(r=e.properties)==null?void 0:r.$current_url;if(!i||typeof i!="string"||!pr.tr(i,n==null?void 0:n.url,(n==null?void 0:n.url_matching)||"contains"))return!1}return!0}static tr(e,n,r){switch(r){case"regex":return!!b&&Ri(e,n);case"exact":return n===e;case"contains":var i=pr.ir(n).replace(/_/g,".").replace(/%/g,".*");return Ri(e,i);default:return!1}}static ir(e){return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}Je(e,n){if((n!=null&&n.href||n!=null&&n.tag_name||n!=null&&n.text)&&!this.er(e).some(s=>!(n!=null&&n.href&&!pr.tr(s.href||"",n==null?void 0:n.href,(n==null?void 0:n.href_matching)||"exact"))&&(n==null||!n.tag_name||s.tag_name===(n==null?void 0:n.tag_name))&&!(n!=null&&n.text&&!pr.tr(s.text||"",n==null?void 0:n.text,(n==null?void 0:n.text_matching)||"exact")&&!pr.tr(s.$el_text||"",n==null?void 0:n.text,(n==null?void 0:n.text_matching)||"exact"))))return!1;if(n!=null&&n.selector){var r,i=e==null||(r=e.properties)==null?void 0:r.$element_selectors;if(!i||!i.includes(n==null?void 0:n.selector))return!1}return!0}er(e){return(e==null?void 0:e.properties.$elements)==null?[]:e==null?void 0:e.properties.$elements}}var ne=Re("[Surveys]"),ef="seenSurvey_",wN=(t,e)=>{var n="$survey_"+e+"/"+t.id;return t.current_iteration&&t.current_iteration>0&&(n="$survey_"+e+"/"+t.id+"/"+t.current_iteration),n},qv=t=>{var e=""+ef+t.id;return t.current_iteration&&t.current_iteration>0&&(e=""+ef+t.id+"_"+t.current_iteration),e},xN=[Zu.Popover,Zu.Widget,Zu.API],SN={ignoreConditions:!1,ignoreDelay:!1,displayType:aS.Popover};class EN{constructor(e){this._instance=e,this.rr=new Map,this.sr=new Map}register(e){var n;L((n=this._instance)==null?void 0:n.Xe)||(this.nr(e),this.ar(e))}ar(e){var n=e.filter(r=>{var i,s;return((i=r.conditions)==null?void 0:i.actions)&&((s=r.conditions)==null||(s=s.actions)==null||(s=s.values)==null?void 0:s.length)>0});n.length!==0&&(this.lr==null&&(this.lr=new pr(this._instance),this.lr.init(),this.lr.Ze(r=>{this.onAction(r)})),n.forEach(r=>{var i,s,o,a,l;r.conditions&&(i=r.conditions)!=null&&i.actions&&(s=r.conditions)!=null&&(s=s.actions)!=null&&s.values&&((o=r.conditions)==null||(o=o.actions)==null||(o=o.values)==null?void 0:o.length)>0&&((a=this.lr)==null||a.register(r.conditions.actions.values),(l=r.conditions)==null||(l=l.actions)==null||(l=l.values)==null||l.forEach(u=>{if(u&&u.name){var c=this.sr.get(u.name);c&&c.push(r.id),this.sr.set(u.name,c||[r.id])}}))}))}nr(e){var n;e.filter(r=>{var i,s;return((i=r.conditions)==null?void 0:i.events)&&((s=r.conditions)==null||(s=s.events)==null||(s=s.values)==null?void 0:s.length)>0}).length!==0&&((n=this._instance)==null||n.Xe((r,i)=>{this.onEvent(r,i)}),e.forEach(r=>{var i;(i=r.conditions)==null||(i=i.events)==null||(i=i.values)==null||i.forEach(s=>{if(s&&s.name){var o=this.rr.get(s.name);o&&o.push(r.id),this.rr.set(s.name,o||[r.id])}})}))}onEvent(e,n){var r,i,s=((r=this._instance)==null||(r=r.persistence)==null?void 0:r.props[Bo])||[];if(ha.SHOWN===e&&n&&s.length>0){var o;ne.info("survey event matched, removing survey from activated surveys",{event:e,eventPayload:n,existingActivatedSurveys:s});var a=n==null||(o=n.properties)==null?void 0:o.$survey_id;if(a){var l=s.indexOf(a);l>=0&&(s.splice(l,1),this.ur(s))}}else if(this.rr.has(e)){ne.info("survey event name matched",{event:e,eventPayload:n,surveys:this.rr.get(e)});var u=[];(i=this._instance)==null||i.getSurveys(d=>{u=d.filter(f=>{var h;return(h=this.rr.get(e))==null?void 0:h.includes(f.id)})});var c=u.filter(d=>{var f,h=(f=d.conditions)==null||(f=f.events)==null||(f=f.values)==null?void 0:f.find(y=>y.name===e);return!!h&&(!h.propertyFilters||Object.entries(h.propertyFilters).every(y=>{var m,[_,p]=y,g=n==null||(m=n.properties)==null?void 0:m[_];if(L(g)||bn(g))return!1;var v=[String(g)],w=$x[p.operator];return w?w(p.values,v):(ne.warn("Unknown property comparison operator: "+p.operator),!1)}))});this.ur(s.concat(c.map(d=>d.id)||[]))}}onAction(e){var n,r=((n=this._instance)==null||(n=n.persistence)==null?void 0:n.props[Bo])||[];this.sr.has(e)&&this.ur(r.concat(this.sr.get(e)||[]))}ur(e){var n;ne.info("updating activated surveys",{activatedSurveys:e}),(n=this._instance)==null||(n=n.persistence)==null||n.register({[Bo]:[...new Set(e)]})}getSurveys(){var e,n=(e=this._instance)==null||(e=e.persistence)==null?void 0:e.props[Bo];return n||[]}getEventToSurveys(){return this.rr}hr(){return this.lr}}class kN{constructor(e){this.dr=void 0,this._surveyManager=null,this.vr=!1,this.cr=!1,this.pr=[],this._instance=e,this._surveyEventReceiver=null}onRemoteConfig(e){if(!this._instance.config.disable_surveys){var n=e.surveys;if(Z(n))return ne.warn("Flags not loaded yet. Not loading surveys.");var r=ie(n);this.dr=r?n.length>0:n,ne.info("flags response received, isSurveysEnabled: "+this.dr),this.loadIfEnabled()}}reset(){localStorage.removeItem("lastSeenSurveyDate");for(var e=[],n=0;n<localStorage.length;n++){var r=localStorage.key(n);(r!=null&&r.startsWith(ef)||r!=null&&r.startsWith("inProgressSurvey_"))&&e.push(r)}e.forEach(i=>localStorage.removeItem(i))}loadIfEnabled(){if(!this._surveyManager)if(this.cr)ne.info("Already initializing surveys, skipping...");else if(this._instance.config.disable_surveys)ne.info("Disabled. Not loading surveys.");else if(this._instance.config.cookieless_mode&&this._instance.consent.isOptedOut())ne.info("Not loading surveys in cookieless mode without consent.");else{var e=H==null?void 0:H.__PosthogExtensions__;if(e){if(!L(this.dr)||this._instance.config.advanced_enable_surveys){var n=this.dr||this._instance.config.advanced_enable_surveys;this.cr=!0;try{var r=e.generateSurveys;if(r)return void this.gr(r,n);var i=e.loadExternalDependency;if(!i)return void this._r("PostHog loadExternalDependency extension not found.");i(this._instance,"surveys",s=>{s||!e.generateSurveys?this._r("Could not load surveys script",s):this.gr(e.generateSurveys,n)})}catch(s){throw this._r("Error initializing surveys",s),s}finally{this.cr=!1}}}else ne.error("PostHog Extensions not found.")}}gr(e,n){this._surveyManager=e(this._instance,n),this._surveyEventReceiver=new EN(this._instance),ne.info("Surveys loaded successfully"),this.mr({isLoaded:!0})}_r(e,n){ne.error(e,n),this.mr({isLoaded:!1,error:e})}onSurveysLoaded(e){return this.pr.push(e),this._surveyManager&&this.mr({isLoaded:!0}),()=>{this.pr=this.pr.filter(n=>n!==e)}}getSurveys(e,n){if(n===void 0&&(n=!1),this._instance.config.disable_surveys)return ne.info("Disabled. Not loading surveys."),e([]);var r=this._instance.get_property(Fd);if(r&&!n)return e(r,{isLoaded:!0});if(this.vr)return e([],{isLoaded:!1,error:"Surveys are already being loaded"});try{this.vr=!0,this._instance.Ce({url:this._instance.requestRouter.endpointFor("api","/api/surveys/?token="+this._instance.config.token),method:"GET",timeout:this._instance.config.surveys_request_timeout_ms,callback:i=>{var s;this.vr=!1;var o=i.statusCode;if(o!==200||!i.json){var a="Surveys API could not be loaded, status: "+o;return ne.error(a),e([],{isLoaded:!1,error:a})}var l,u=i.json.surveys||[],c=u.filter(d=>function(f){return!(!f.start_date||f.end_date)}(d)&&(function(f){var h;return!((h=f.conditions)==null||(h=h.events)==null||(h=h.values)==null||!h.length)}(d)||function(f){var h;return!((h=f.conditions)==null||(h=h.actions)==null||(h=h.values)==null||!h.length)}(d)));return c.length>0&&((l=this._surveyEventReceiver)==null||l.register(c)),(s=this._instance.persistence)==null||s.register({[Fd]:u}),e(u,{isLoaded:!0})}})}catch(i){throw this.vr=!1,i}}mr(e){for(var n of this.pr)try{if(!e.isLoaded)return n([],e);this.getSurveys(n)}catch(r){ne.error("Error in survey callback",r)}}getActiveMatchingSurveys(e,n){if(n===void 0&&(n=!1),!Z(this._surveyManager))return this._surveyManager.getActiveMatchingSurveys(e,n);ne.warn("init was not called")}yr(e){var n=null;return this.getSurveys(r=>{var i;n=(i=r.find(s=>s.id===e))!==null&&i!==void 0?i:null}),n}br(e){if(Z(this._surveyManager))return{eligible:!1,reason:"SDK is not enabled or survey functionality is not yet loaded"};var n=typeof e=="string"?this.yr(e):e;return n?this._surveyManager.checkSurveyEligibility(n):{eligible:!1,reason:"Survey not found"}}canRenderSurvey(e){if(Z(this._surveyManager))return ne.warn("init was not called"),{visible:!1,disabledReason:"SDK is not enabled or survey functionality is not yet loaded"};var n=this.br(e);return{visible:n.eligible,disabledReason:n.reason}}canRenderSurveyAsync(e,n){return Z(this._surveyManager)?(ne.warn("init was not called"),Promise.resolve({visible:!1,disabledReason:"SDK is not enabled or survey functionality is not yet loaded"})):new Promise(r=>{this.getSurveys(i=>{var s,o=(s=i.find(l=>l.id===e))!==null&&s!==void 0?s:null;if(o){var a=this.br(o);r({visible:a.eligible,disabledReason:a.reason})}else r({visible:!1,disabledReason:"Survey not found"})},n)})}renderSurvey(e,n){var r;if(Z(this._surveyManager))ne.warn("init was not called");else{var i=typeof e=="string"?this.yr(e):e;if(i!=null&&i.id)if(xN.includes(i.type)){var s=B==null?void 0:B.querySelector(n);if(s)return(r=i.appearance)!=null&&r.surveyPopupDelaySeconds?(ne.info("Rendering survey "+i.id+" with delay of "+i.appearance.surveyPopupDelaySeconds+" seconds"),void setTimeout(()=>{var o,a;ne.info("Rendering survey "+i.id+" with delay of "+((o=i.appearance)==null?void 0:o.surveyPopupDelaySeconds)+" seconds"),(a=this._surveyManager)==null||a.renderSurvey(i,s),ne.info("Survey "+i.id+" rendered")},1e3*i.appearance.surveyPopupDelaySeconds)):void this._surveyManager.renderSurvey(i,s);ne.warn("Survey element not found")}else ne.warn("Surveys of type "+i.type+" cannot be rendered in the app");else ne.warn("Survey not found")}}displaySurvey(e,n){var r;if(Z(this._surveyManager))ne.warn("init was not called");else{var i=this.yr(e);if(i){var s=i;if((r=i.appearance)!=null&&r.surveyPopupDelaySeconds&&n.ignoreDelay&&(s=F({},i,{appearance:F({},i.appearance,{surveyPopupDelaySeconds:0})})),n.ignoreConditions===!1){var o=this.canRenderSurvey(i);if(!o.visible)return void ne.warn("Survey is not eligible to be displayed: ",o.disabledReason)}n.displayType!==aS.Inline?this._surveyManager.handlePopoverSurvey(s):this.renderSurvey(s,n.selector)}else ne.warn("Survey not found")}}}var Yv=Re("[RateLimiter]");class CN{constructor(e){var n,r;this.serverLimits={},this.lastEventRateLimited=!1,this.checkForLimiting=i=>{var s=i.text;if(s&&s.length)try{(JSON.parse(s).quota_limited||[]).forEach(o=>{Yv.info((o||"events")+" is quota limited."),this.serverLimits[o]=new Date().getTime()+6e4})}catch(o){return void Yv.warn('could not rate limit - continuing. Error: "'+(o==null?void 0:o.message)+'"',{text:s})}},this.instance=e,this.captureEventsPerSecond=((n=e.config.rate_limiting)==null?void 0:n.events_per_second)||10,this.captureEventsBurstLimit=Math.max(((r=e.config.rate_limiting)==null?void 0:r.events_burst_limit)||10*this.captureEventsPerSecond,this.captureEventsPerSecond),this.lastEventRateLimited=this.clientRateLimitContext(!0).isRateLimited}clientRateLimitContext(e){var n,r,i;e===void 0&&(e=!1);var s=new Date().getTime(),o=(n=(r=this.instance.persistence)==null?void 0:r.get_property(Vd))!==null&&n!==void 0?n:{tokens:this.captureEventsBurstLimit,last:s};o.tokens+=(s-o.last)/1e3*this.captureEventsPerSecond,o.last=s,o.tokens>this.captureEventsBurstLimit&&(o.tokens=this.captureEventsBurstLimit);var a=o.tokens<1;return a||e||(o.tokens=Math.max(0,o.tokens-1)),!a||this.lastEventRateLimited||e||this.instance.capture("$$client_ingestion_warning",{$$client_ingestion_warning_message:"posthog-js client rate limited. Config is set to "+this.captureEventsPerSecond+" events per second and "+this.captureEventsBurstLimit+" events burst limit."},{skip_client_rate_limiting:!0}),this.lastEventRateLimited=a,(i=this.instance.persistence)==null||i.set_property(Vd,o),{isRateLimited:a,remainingTokens:o.tokens}}isServerRateLimited(e){var n=this.serverLimits[e||"events"]||!1;return n!==!1&&new Date().getTime()<n}}var ur=Re("[RemoteConfig]");class bN{constructor(e){this._instance=e}get remoteConfig(){var e;return(e=H._POSTHOG_REMOTE_CONFIG)==null||(e=e[this._instance.config.token])==null?void 0:e.config}wr(e){var n,r;(n=H.__PosthogExtensions__)!=null&&n.loadExternalDependency?(r=H.__PosthogExtensions__)==null||r.loadExternalDependency==null||r.loadExternalDependency(this._instance,"remote-config",()=>e(this.remoteConfig)):(ur.error("PostHog Extensions not found. Cannot load remote config."),e())}Sr(e){this._instance.Ce({method:"GET",url:this._instance.requestRouter.endpointFor("assets","/array/"+this._instance.config.token+"/config"),callback:n=>{e(n.json)}})}load(){try{if(this.remoteConfig)return ur.info("Using preloaded remote config",this.remoteConfig),void this.Me(this.remoteConfig);if(this._instance.L())return void ur.warn("Remote config is disabled. Falling back to local config.");this.wr(e=>{if(!e)return ur.info("No config found after loading remote JS config. Falling back to JSON."),void this.Sr(n=>{this.Me(n)});this.Me(e)})}catch(e){ur.error("Error loading remote config",e)}}Me(e){e?this._instance.config.__preview_remote_config?(this._instance.Me(e),e.hasFeatureFlags!==!1&&this._instance.featureFlags.ensureFlagsLoaded()):ur.info("__preview_remote_config is disabled. Logging config instead",e):ur.error("Failed to fetch remote config from PostHog.")}}var tf=3e3;class PN{constructor(e,n){this.kr=!0,this.$r=[],this.Er=mt((n==null?void 0:n.flush_interval_ms)||tf,250,5e3,V.createLogger("flush interval"),tf),this.Rr=e}enqueue(e){this.$r.push(e),this.Pr||this.Ir()}unload(){this.Tr();var e=this.$r.length>0?this.Cr():{},n=Object.values(e);[...n.filter(r=>r.url.indexOf("/e")===0),...n.filter(r=>r.url.indexOf("/e")!==0)].map(r=>{this.Rr(F({},r,{transport:"sendBeacon"}))})}enable(){this.kr=!1,this.Ir()}Ir(){var e=this;this.kr||(this.Pr=setTimeout(()=>{if(this.Tr(),this.$r.length>0){var n=this.Cr(),r=function(){var s=n[i],o=new Date().getTime();s.data&&ie(s.data)&&re(s.data,a=>{a.offset=Math.abs(a.timestamp-o),delete a.timestamp}),e.Rr(s)};for(var i in n)r()}},this.Er))}Tr(){clearTimeout(this.Pr),this.Pr=void 0}Cr(){var e={};return re(this.$r,n=>{var r,i=n,s=(i?i.batchKey:null)||i.url;L(e[s])&&(e[s]=F({},i,{data:[]})),(r=e[s].data)==null||r.push(i.data)}),this.$r=[],e}}var TN=["retriesPerformedSoFar"];class AN{constructor(e){this.Mr=!1,this.Or=3e3,this.$r=[],this._instance=e,this.$r=[],this.Fr=!0,!L(b)&&"onLine"in b.navigator&&(this.Fr=b.navigator.onLine,pe(b,"online",()=>{this.Fr=!0,this.oe()}),pe(b,"offline",()=>{this.Fr=!1}))}get length(){return this.$r.length}retriableRequest(e){var{retriesPerformedSoFar:n}=e,r=J1(e,TN);He(n)&&n>0&&(r.url=ll(r.url,{retry_count:n})),this._instance.Ce(F({},r,{callback:i=>{i.statusCode!==200&&(i.statusCode<400||i.statusCode>=500)&&(n??0)<10?this.Ar(F({retriesPerformedSoFar:n},r)):r.callback==null||r.callback(i)}}))}Ar(e){var n=e.retriesPerformedSoFar||0;e.retriesPerformedSoFar=n+1;var r=function(o){var a=3e3*Math.pow(2,o),l=a/2,u=Math.min(18e5,a),c=(Math.random()-.5)*(u-l);return Math.ceil(u+c)}(n),i=Date.now()+r;this.$r.push({retryAt:i,requestOptions:e});var s="Enqueued failed request for retry in "+r;navigator.onLine||(s+=" (Browser is offline)"),V.warn(s),this.Mr||(this.Mr=!0,this.Dr())}Dr(){this.jr&&clearTimeout(this.jr),this.jr=setTimeout(()=>{this.Fr&&this.$r.length>0&&this.oe(),this.Dr()},this.Or)}oe(){var e=Date.now(),n=[],r=this.$r.filter(s=>s.retryAt<e||(n.push(s),!1));if(this.$r=n,r.length>0)for(var{requestOptions:i}of r)this.retriableRequest(i)}unload(){for(var{requestOptions:e}of(this.jr&&(clearTimeout(this.jr),this.jr=void 0),this.$r))try{this._instance.Ce(F({},e,{transport:"sendBeacon"}))}catch(n){V.error(n)}this.$r=[]}}class RN{constructor(e){this.Lr=()=>{var n,r,i,s;this.Nr||(this.Nr={});var o=this.scrollElement(),a=this.scrollY(),l=o?Math.max(0,o.scrollHeight-o.clientHeight):0,u=a+((o==null?void 0:o.clientHeight)||0),c=(o==null?void 0:o.scrollHeight)||0;this.Nr.lastScrollY=Math.ceil(a),this.Nr.maxScrollY=Math.max(a,(n=this.Nr.maxScrollY)!==null&&n!==void 0?n:0),this.Nr.maxScrollHeight=Math.max(l,(r=this.Nr.maxScrollHeight)!==null&&r!==void 0?r:0),this.Nr.lastContentY=u,this.Nr.maxContentY=Math.max(u,(i=this.Nr.maxContentY)!==null&&i!==void 0?i:0),this.Nr.maxContentHeight=Math.max(c,(s=this.Nr.maxContentHeight)!==null&&s!==void 0?s:0)},this._instance=e}getContext(){return this.Nr}resetContext(){var e=this.Nr;return setTimeout(this.Lr,0),e}startMeasuringScrollPosition(){pe(b,"scroll",this.Lr,{capture:!0}),pe(b,"scrollend",this.Lr,{capture:!0}),pe(b,"resize",this.Lr)}scrollElement(){if(!this._instance.config.scroll_root_selector)return b==null?void 0:b.document.documentElement;var e=ie(this._instance.config.scroll_root_selector)?this._instance.config.scroll_root_selector:[this._instance.config.scroll_root_selector];for(var n of e){var r=b==null?void 0:b.document.querySelector(n);if(r)return r}}scrollY(){if(this._instance.config.scroll_root_selector){var e=this.scrollElement();return e&&e.scrollTop||0}return b&&(b.scrollY||b.pageYOffset||b.document.documentElement.scrollTop)||0}scrollX(){if(this._instance.config.scroll_root_selector){var e=this.scrollElement();return e&&e.scrollLeft||0}return b&&(b.scrollX||b.pageXOffset||b.document.documentElement.scrollLeft)||0}}var MN=t=>iS(t==null?void 0:t.config.mask_personal_data_properties,t==null?void 0:t.config.custom_personal_data_properties);class Xv{constructor(e,n,r,i){this.Ur=s=>{var o=this.zr();if(!o||o.sessionId!==s){var a={sessionId:s,props:this.Br(this._instance)};this.qr.register({[jd]:a})}},this._instance=e,this.Hr=n,this.qr=r,this.Br=i||MN,this.Hr.onSessionId(this.Ur)}zr(){return this.qr.props[jd]}getSetOnceProps(){var e,n=(e=this.zr())==null?void 0:e.props;return n?"r"in n?sS(n):{$referring_domain:n.referringDomain,$pathname:n.initialPathName,utm_source:n.utm_source,utm_campaign:n.utm_campaign,utm_medium:n.utm_medium,utm_content:n.utm_content,utm_term:n.utm_term}:{}}getSessionProps(){var e={};return re(Wh(this.getSetOnceProps()),(n,r)=>{r==="$current_url"&&(r="url"),e["$session_entry_"+Td(r)]=n}),e}}var Ju=Re("[SessionId]");class Qv{on(e,n){return this.Wr.on(e,n)}constructor(e,n,r){var i;if(this.Gr=[],this.Wr=new op,this.Vr=(c,d)=>Math.abs(c-d)>this.sessionTimeoutMs,!e.persistence)throw new Error("SessionIdManager requires a PostHogPersistence instance");if(e.config.cookieless_mode==="always")throw new Error('SessionIdManager cannot be used with cookieless_mode="always"');this.A=e.config,this.qr=e.persistence,this.pi=void 0,this.Ft=void 0,this._sessionStartTimestamp=null,this._sessionActivityTimestamp=null,this.Jr=n||jn,this.Kr=r||jn;var s=this.A.persistence_name||this.A.token,o=this.A.session_idle_timeout_seconds||1800;if(this._sessionTimeoutMs=1e3*mt(o,60,36e3,Ju.createLogger("session_idle_timeout_seconds"),1800),e.register({$configured_session_timeout_ms:this._sessionTimeoutMs}),this.Yr(),this.Xr="ph_"+s+"_window_id",this.Qr="ph_"+s+"_primary_window_exists",this.Zr()){var a=De.K(this.Xr),l=De.K(this.Qr);a&&!l?this.pi=a:De.X(this.Xr),De.Y(this.Qr,!0)}if((i=this.A.bootstrap)!=null&&i.sessionID)try{var u=(c=>{var d=c.replace(/-/g,"");if(d.length!==32)throw new Error("Not a valid UUID");if(d[12]!=="7")throw new Error("Not a UUIDv7");return parseInt(d.substring(0,12),16)})(this.A.bootstrap.sessionID);this.ts(this.A.bootstrap.sessionID,new Date().getTime(),u)}catch(c){Ju.error("Invalid sessionID in bootstrap",c)}this.es()}get sessionTimeoutMs(){return this._sessionTimeoutMs}onSessionId(e){return L(this.Gr)&&(this.Gr=[]),this.Gr.push(e),this.Ft&&e(this.Ft,this.pi),()=>{this.Gr=this.Gr.filter(n=>n!==e)}}Zr(){return this.A.persistence!=="memory"&&!this.qr.Le&&De.G()}rs(e){e!==this.pi&&(this.pi=e,this.Zr()&&De.Y(this.Xr,e))}ss(){return this.pi?this.pi:this.Zr()?De.K(this.Xr):null}ts(e,n,r){e===this.Ft&&n===this._sessionActivityTimestamp&&r===this._sessionStartTimestamp||(this._sessionStartTimestamp=r,this._sessionActivityTimestamp=n,this.Ft=e,this.qr.register({[Qa]:[n,e,r]}))}ns(){if(this.Ft&&this._sessionActivityTimestamp&&this._sessionStartTimestamp)return[this._sessionActivityTimestamp,this.Ft,this._sessionStartTimestamp];var e=this.qr.props[Qa];return ie(e)&&e.length===2&&e.push(e[0]),e||[0,null,0]}resetSessionId(){this.ts(null,null,null)}es(){pe(b,"beforeunload",()=>{this.Zr()&&De.X(this.Qr)},{capture:!1})}checkAndGetSessionAndWindowId(e,n){if(e===void 0&&(e=!1),n===void 0&&(n=null),this.A.cookieless_mode==="always")throw new Error('checkAndGetSessionAndWindowId should not be called with cookieless_mode="always"');var r=n||new Date().getTime(),[i,s,o]=this.ns(),a=this.ss(),l=He(o)&&o>0&&Math.abs(r-o)>864e5,u=!1,c=!s,d=!e&&this.Vr(r,i);c||d||l?(s=this.Jr(),a=this.Kr(),Ju.info("new session ID generated",{sessionId:s,windowId:a,changeReason:{noSessionId:c,activityTimeout:d,sessionPastMaximumLength:l}}),o=r,u=!0):a||(a=this.Kr(),u=!0);var f=i===0||!e||l?r:i,h=o===0?new Date().getTime():o;return this.rs(a),this.ts(s,f,h),e||this.Yr(),u&&this.Gr.forEach(y=>y(s,a,u?{noSessionId:c,activityTimeout:d,sessionPastMaximumLength:l}:void 0)),{sessionId:s,windowId:a,sessionStartTimestamp:h,changeReason:u?{noSessionId:c,activityTimeout:d,sessionPastMaximumLength:l}:void 0,lastActivityTimestamp:i}}Yr(){clearTimeout(this.os),this.os=setTimeout(()=>{var[e]=this.ns();if(this.Vr(new Date().getTime(),e)){var n=this.Ft;this.resetSessionId(),this.Wr.emit("forcedIdleReset",{idleSessionId:n})}},1.1*this.sessionTimeoutMs)}}var IN=["$set_once","$set"],Rn=Re("[SiteApps]");class NN{constructor(e){this._instance=e,this.ls=[],this.apps={}}get isEnabled(){return!!this._instance.config.opt_in_site_apps}us(e,n){if(n){var r=this.globalsForEvent(n);this.ls.push(r),this.ls.length>1e3&&(this.ls=this.ls.slice(10))}}get siteAppLoaders(){var e;return(e=H._POSTHOG_REMOTE_CONFIG)==null||(e=e[this._instance.config.token])==null?void 0:e.siteApps}init(){if(this.isEnabled){var e=this._instance.Xe(this.us.bind(this));this.hs=()=>{e(),this.ls=[],this.hs=void 0}}}globalsForEvent(e){var n,r,i,s,o,a,l;if(!e)throw new Error("Event payload is required");var u={},c=this._instance.get_property("$groups")||[],d=this._instance.get_property("$stored_group_properties")||{};for(var[f,h]of Object.entries(d))u[f]={id:c[f],type:f,properties:h};var{$set_once:y,$set:m}=e;return{event:F({},J1(e,IN),{properties:F({},e.properties,m?{$set:F({},(n=(r=e.properties)==null?void 0:r.$set)!==null&&n!==void 0?n:{},m)}:{},y?{$set_once:F({},(i=(s=e.properties)==null?void 0:s.$set_once)!==null&&i!==void 0?i:{},y)}:{}),elements_chain:(o=(a=e.properties)==null?void 0:a.$elements_chain)!==null&&o!==void 0?o:"",distinct_id:(l=e.properties)==null?void 0:l.distinct_id}),person:{properties:this._instance.get_property("$stored_person_properties")},groups:u}}setupSiteApp(e){var n=this.apps[e.id],r=()=>{var a;!n.errored&&this.ls.length&&(Rn.info("Processing "+this.ls.length+" events for site app with id "+e.id),this.ls.forEach(l=>n.processEvent==null?void 0:n.processEvent(l)),n.processedBuffer=!0),Object.values(this.apps).every(l=>l.processedBuffer||l.errored)&&((a=this.hs)==null||a.call(this))},i=!1,s=a=>{n.errored=!a,n.loaded=!0,Rn.info("Site app with id "+e.id+" "+(a?"loaded":"errored")),i&&r()};try{var{processEvent:o}=e.init({posthog:this._instance,callback:a=>{s(a)}});o&&(n.processEvent=o),i=!0}catch(a){Rn.error("Error while initializing PostHog app with config id "+e.id,a),s(!1)}if(i&&n.loaded)try{r()}catch(a){Rn.error("Error while processing buffered events PostHog app with config id "+e.id,a),n.errored=!0}}ds(){var e=this.siteAppLoaders||[];for(var n of e)this.apps[n.id]={id:n.id,loaded:!1,errored:!1,processedBuffer:!1};for(var r of e)this.setupSiteApp(r)}vs(e){if(Object.keys(this.apps).length!==0){var n=this.globalsForEvent(e);for(var r of Object.values(this.apps))try{r.processEvent==null||r.processEvent(n)}catch(i){Rn.error("Error while processing event "+e.event+" for site app "+r.id,i)}}}onRemoteConfig(e){var n,r,i,s=this;if((n=this.siteAppLoaders)!=null&&n.length)return this.isEnabled?(this.ds(),void this._instance.on("eventCaptured",u=>this.vs(u))):void Rn.error('PostHog site apps are disabled. Enable the "opt_in_site_apps" config to proceed.');if((r=this.hs)==null||r.call(this),(i=e.siteApps)!=null&&i.length)if(this.isEnabled){var o=function(u){var c;H["__$$ph_site_app_"+u]=s._instance,(c=H.__PosthogExtensions__)==null||c.loadSiteApp==null||c.loadSiteApp(s._instance,l,d=>{if(d)return Rn.error("Error while initializing PostHog app with config id "+u,d)})};for(var{id:a,url:l}of e.siteApps)o(a)}else Rn.error('PostHog site apps are disabled. Enable the "opt_in_site_apps" config to proceed.')}}var ON=["amazonbot","amazonproductbot","app.hypefactors.com","applebot","archive.org_bot","awariobot","backlinksextendedbot","baiduspider","bingbot","bingpreview","chrome-lighthouse","dataforseobot","deepscan","duckduckbot","facebookexternal","facebookcatalog","http://yandex.com/bots","hubspot","ia_archiver","leikibot","linkedinbot","meta-externalagent","mj12bot","msnbot","nessus","petalbot","pinterest","prerender","rogerbot","screaming frog","sebot-wa","sitebulb","slackbot","slurp","trendictionbot","turnitin","twitterbot","vercel-screenshot","vercelbot","yahoo! slurp","yandexbot","zoombot","bot.htm","bot.php","(bot;","bot/","crawler","ahrefsbot","ahrefssiteaudit","semrushbot","siteauditbot","splitsignalbot","gptbot","oai-searchbot","chatgpt-user","perplexitybot","better uptime bot","sentryuptimebot","uptimerobot","headlesschrome","cypress","google-hoteladsverifier","adsbot-google","apis-google","duplexweb-google","feedfetcher-google","google favicon","google web preview","google-read-aloud","googlebot","googleother","google-cloudvertexbot","googleweblight","mediapartners-google","storebot-google","google-inspectiontool","bytespider"],Zv=function(t,e){if(!t)return!1;var n=t.toLowerCase();return ON.concat(e||[]).some(r=>{var i=r.toLowerCase();return n.indexOf(i)!==-1})},lS=function(t,e){if(!t)return!1;var n=t.userAgent;if(n&&Zv(n,e))return!0;try{var r=t==null?void 0:t.userAgentData;if(r!=null&&r.brands&&r.brands.some(i=>Zv(i==null?void 0:i.brand,e)))return!0}catch{}return!!t.webdriver},gs=function(t){return t.US="us",t.EU="eu",t.CUSTOM="custom",t}({}),Jv="i.posthog.com";class LN{constructor(e){this.cs={},this.instance=e}get apiHost(){var e=this.instance.config.api_host.trim().replace(/\/$/,"");return e==="https://app.posthog.com"?"https://us.i.posthog.com":e}get uiHost(){var e,n=(e=this.instance.config.ui_host)==null?void 0:e.replace(/\/$/,"");return n||(n=this.apiHost.replace("."+Jv,".posthog.com")),n==="https://app.posthog.com"?"https://us.posthog.com":n}get region(){return this.cs[this.apiHost]||(/https:\/\/(app|us|us-assets)(\.i)?\.posthog\.com/i.test(this.apiHost)?this.cs[this.apiHost]=gs.US:/https:\/\/(eu|eu-assets)(\.i)?\.posthog\.com/i.test(this.apiHost)?this.cs[this.apiHost]=gs.EU:this.cs[this.apiHost]=gs.CUSTOM),this.cs[this.apiHost]}endpointFor(e,n){if(n===void 0&&(n=""),n&&(n=n[0]==="/"?n:"/"+n),e==="ui")return this.uiHost+n;if(this.region===gs.CUSTOM)return this.apiHost+n;var r=Jv+n;switch(e){case"assets":return"https://"+this.region+"-assets."+r;case"api":return"https://"+this.region+"."+r}}}var DN={icontains:(t,e)=>!!b&&e.href.toLowerCase().indexOf(t.toLowerCase())>-1,not_icontains:(t,e)=>!!b&&e.href.toLowerCase().indexOf(t.toLowerCase())===-1,regex:(t,e)=>!!b&&Ri(e.href,t),not_regex:(t,e)=>!!b&&!Ri(e.href,t),exact:(t,e)=>e.href===t,is_not:(t,e)=>e.href!==t};class ze{constructor(e){var n=this;this.getWebExperimentsAndEvaluateDisplayLogic=function(r){r===void 0&&(r=!1),n.getWebExperiments(i=>{ze.fs("retrieved web experiments from the server"),n.ps=new Map,i.forEach(s=>{if(s.feature_flag_key){var o;n.ps&&(ze.fs("setting flag key ",s.feature_flag_key," to web experiment ",s),(o=n.ps)==null||o.set(s.feature_flag_key,s));var a=n._instance.getFeatureFlag(s.feature_flag_key);xe(a)&&s.variants[a]&&n.gs(s.name,a,s.variants[a].transforms)}else if(s.variants)for(var l in s.variants){var u=s.variants[l];ze._s(u)&&n.gs(s.name,l,u.transforms)}})},r)},this._instance=e,this._instance.onFeatureFlags(r=>{this.onFeatureFlags(r)})}onFeatureFlags(e){if(this._is_bot())ze.fs("Refusing to render web experiment since the viewer is a likely bot");else if(!this._instance.config.disable_web_experiments){if(Z(this.ps))return this.ps=new Map,this.loadIfEnabled(),void this.previewWebExperiment();ze.fs("applying feature flags",e),e.forEach(n=>{var r;if(this.ps&&(r=this.ps)!=null&&r.has(n)){var i,s=this._instance.getFeatureFlag(n),o=(i=this.ps)==null?void 0:i.get(n);s&&o!=null&&o.variants[s]&&this.gs(o.name,s,o.variants[s].transforms)}})}}previewWebExperiment(){var e=ze.getWindowLocation();if(e!=null&&e.search){var n=nl(e==null?void 0:e.search,"__experiment_id"),r=nl(e==null?void 0:e.search,"__experiment_variant");n&&r&&(ze.fs("previewing web experiments "+n+" && "+r),this.getWebExperiments(i=>{this.ys(parseInt(n),r,i)},!1,!0))}}loadIfEnabled(){this._instance.config.disable_web_experiments||this.getWebExperimentsAndEvaluateDisplayLogic()}getWebExperiments(e,n,r){if(this._instance.config.disable_web_experiments&&!r)return e([]);var i=this._instance.get_property("$web_experiments");if(i&&!n)return e(i);this._instance.Ce({url:this._instance.requestRouter.endpointFor("api","/api/web_experiments/?token="+this._instance.config.token),method:"GET",callback:s=>{if(s.statusCode!==200||!s.json)return e([]);var o=s.json.experiments||[];return e(o)}})}ys(e,n,r){var i=r.filter(s=>s.id===e);i&&i.length>0&&(ze.fs("Previewing web experiment ["+i[0].name+"] with variant ["+n+"]"),this.gs(i[0].name,n,i[0].variants[n].transforms))}static _s(e){return!Z(e.conditions)&&ze.bs(e)&&ze.ws(e)}static bs(e){var n;if(Z(e.conditions)||Z((n=e.conditions)==null?void 0:n.url))return!0;var r,i,s,o=ze.getWindowLocation();return!!o&&((r=e.conditions)==null||!r.url||DN[(i=(s=e.conditions)==null?void 0:s.urlMatchType)!==null&&i!==void 0?i:"icontains"](e.conditions.url,o))}static getWindowLocation(){return b==null?void 0:b.location}static ws(e){var n;if(Z(e.conditions)||Z((n=e.conditions)==null?void 0:n.utm))return!0;var r=eS();if(r.utm_source){var i,s,o,a,l,u,c,d,f=(i=e.conditions)==null||(i=i.utm)==null||!i.utm_campaign||((s=e.conditions)==null||(s=s.utm)==null?void 0:s.utm_campaign)==r.utm_campaign,h=(o=e.conditions)==null||(o=o.utm)==null||!o.utm_source||((a=e.conditions)==null||(a=a.utm)==null?void 0:a.utm_source)==r.utm_source,y=(l=e.conditions)==null||(l=l.utm)==null||!l.utm_medium||((u=e.conditions)==null||(u=u.utm)==null?void 0:u.utm_medium)==r.utm_medium,m=(c=e.conditions)==null||(c=c.utm)==null||!c.utm_term||((d=e.conditions)==null||(d=d.utm)==null?void 0:d.utm_term)==r.utm_term;return f&&y&&m&&h}return!1}static fs(e){for(var n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];V.info("[WebExperiments] "+e,r)}gs(e,n,r){this._is_bot()?ze.fs("Refusing to render web experiment since the viewer is a likely bot"):n!=="control"?r.forEach(i=>{if(i.selector){var s;ze.fs("applying transform of variant "+n+" for experiment "+e+" ",i);var o=(s=document)==null?void 0:s.querySelectorAll(i.selector);o==null||o.forEach(a=>{var l=a;i.html&&(l.innerHTML=i.html),i.css&&l.setAttribute("style",i.css)})}}):ze.fs("Control variants leave the page unmodified.")}_is_bot(){return gt&&this._instance?lS(gt,this._instance.config.custom_blocked_useragents):void 0}}var $N=Re("[PostHog ExternalIntegrations]"),FN={intercom:"intercom-integration",crispChat:"crisp-chat-integration"};class jN{constructor(e){this._instance=e}nt(e,n){var r;(r=H.__PosthogExtensions__)==null||r.loadExternalDependency==null||r.loadExternalDependency(this._instance,e,i=>{if(i)return $N.error("failed to load script",i);n()})}startIfEnabledOrStop(){var e=this,n=function(o){var a,l,u;!i||(a=H.__PosthogExtensions__)!=null&&(a=a.integrations)!=null&&a[o]||e.nt(FN[o],()=>{var c;(c=H.__PosthogExtensions__)==null||(c=c.integrations)==null||(c=c[o])==null||c.start(e._instance)}),!i&&(l=H.__PosthogExtensions__)!=null&&(l=l.integrations)!=null&&l[o]&&((u=H.__PosthogExtensions__)==null||(u=u.integrations)==null||(u=u[o])==null||u.stop())};for(var[r,i]of Object.entries((s=this._instance.config.integrations)!==null&&s!==void 0?s:{})){var s;n(r)}}}var nf="[SessionRecording]",ts=Re(nf);class VN{get started(){var e;return!((e=this.Ss)==null||!e.isStarted)}get status(){var e;return((e=this.Ss)==null?void 0:e.status)||"lazy_loading"}constructor(e){if(this._forceAllowLocalhostNetworkCapture=!1,this.ni=void 0,this._instance=e,!this._instance.sessionManager)throw ts.error("started without valid sessionManager"),new Error(nf+" started without valid sessionManager. This is a bug.");if(this._instance.config.cookieless_mode==="always")throw new Error(nf+' cannot be used with cookieless_mode="always"')}get Bt(){var e,n=!((e=this._instance.get_property(zu))==null||!e.enabled),r=!this._instance.config.disable_session_recording,i=this._instance.config.disable_session_recording||this._instance.consent.isOptedOut();return b&&n&&r&&!i}startIfEnabledOrStop(e){var n;if(!this.Bt||(n=this.Ss)==null||!n.isStarted){var r=!L(Object.assign)&&!L(Array.from);this.Bt&&r?(this.ks(e),ts.info("starting")):this.stopRecording()}}ks(e){var n,r,i;this.Bt&&(H!=null&&(n=H.__PosthogExtensions__)!=null&&(n=n.rrweb)!=null&&n.record&&(r=H.__PosthogExtensions__)!=null&&r.initSessionRecording?this.Ri(e):(i=H.__PosthogExtensions__)==null||i.loadExternalDependency==null||i.loadExternalDependency(this._instance,this.Pi,s=>{if(s)return ts.error("could not load recorder",s);this.Ri(e)}))}stopRecording(){var e;(e=this.Ss)==null||e.stop()}ki(){var e;(e=this._instance.persistence)==null||e.unregister(si)}Ei(e){if(this._instance.persistence){var n,r,i=this._instance.persistence,s=()=>{var o=e.sessionRecording,a=o==null?void 0:o.sampleRate,l=Z(a)?null:parseFloat(a);Z(l)&&this.ki();var u=o==null?void 0:o.minimumDurationMilliseconds;i.register({[zu]:F({enabled:!!o},o,{networkPayloadCapture:F({capturePerformance:e.capturePerformance},o==null?void 0:o.networkPayloadCapture),canvasRecording:{enabled:o==null?void 0:o.recordCanvas,fps:o==null?void 0:o.canvasFps,quality:o==null?void 0:o.canvasQuality},sampleRate:l,minimumDurationMilliseconds:L(u)?null:u,endpoint:o==null?void 0:o.endpoint,triggerMatchType:o==null?void 0:o.triggerMatchType,masking:o==null?void 0:o.masking,urlTriggers:o==null?void 0:o.urlTriggers})})};s(),(n=this.ni)==null||n.call(this),this.ni=(r=this._instance.sessionManager)==null?void 0:r.onSessionId(s)}}onRemoteConfig(e){"sessionRecording"in e?(this.Ei(e),this.startIfEnabledOrStop()):ts.info("skipping remote config with no sessionRecording",e)}log(e,n){var r;n===void 0&&(n="log"),(r=this.Ss)!=null&&r.log?this.Ss.log(e,n):ts.warn("log called before recorder was ready")}get Pi(){var e,n,r=(e=this._instance)==null||(e=e.persistence)==null?void 0:e.get_property(zu);return(r==null||(n=r.scriptConfig)==null?void 0:n.script)||"lazy-recorder"}Ri(e){var n,r;if((n=H.__PosthogExtensions__)==null||!n.initSessionRecording)throw Error("Called on script loaded before session recording is available");this.Ss||(this.Ss=(r=H.__PosthogExtensions__)==null?void 0:r.initSessionRecording(this._instance),this.Ss._forceAllowLocalhostNetworkCapture=this._forceAllowLocalhostNetworkCapture),this.Ss.start(e)}onRRwebEmit(e){var n;(n=this.Ss)==null||n.onRRwebEmit==null||n.onRRwebEmit(e)}overrideLinkedFlag(){var e;(e=this.Ss)==null||e.overrideLinkedFlag()}overrideSampling(){var e;(e=this.Ss)==null||e.overrideSampling()}overrideTrigger(e){var n;(n=this.Ss)==null||n.overrideTrigger(e)}get sdkDebugProperties(){var e;return((e=this.Ss)==null?void 0:e.sdkDebugProperties)||{$recording_status:this.status}}tryAddCustomEvent(e,n){var r;return!((r=this.Ss)==null||!r.tryAddCustomEvent(e,n))}}var Is={},rf=()=>{},jr="posthog",uS=!eN&&(rt==null?void 0:rt.indexOf("MSIE"))===-1&&(rt==null?void 0:rt.indexOf("Mozilla"))===-1,ey=t=>{var e;return{api_host:"https://us.i.posthog.com",ui_host:null,token:"",autocapture:!0,rageclick:!0,cross_subdomain_cookie:K2(B==null?void 0:B.location),persistence:"localStorage+cookie",persistence_name:"",loaded:rf,save_campaign_params:!0,custom_campaign_params:[],custom_blocked_useragents:[],save_referrer:!0,capture_pageview:t!=="2025-05-24"||"history_change",capture_pageleave:"if_capture_pageview",defaults:t??"unset",debug:st&&xe(st==null?void 0:st.search)&&st.search.indexOf("__posthog_debug=true")!==-1||!1,cookie_expiration:365,upgrade:!1,disable_session_recording:!1,disable_persistence:!1,disable_web_experiments:!0,disable_surveys:!1,disable_surveys_automatic_display:!1,disable_external_dependency_loading:!1,enable_recording_console_log:void 0,secure_cookie:(b==null||(e=b.location)==null?void 0:e.protocol)==="https:",ip:!1,opt_out_capturing_by_default:!1,opt_out_persistence_by_default:!1,opt_out_useragent_filter:!1,opt_out_capturing_persistence_type:"localStorage",consent_persistence_name:null,opt_out_capturing_cookie_prefix:null,opt_in_site_apps:!1,property_denylist:[],respect_dnt:!1,sanitize_properties:null,request_headers:{},request_batching:!0,properties_string_max_length:65535,session_recording:{},mask_all_element_attributes:!1,mask_all_text:!1,mask_personal_data_properties:!1,custom_personal_data_properties:[],advanced_disable_flags:!1,advanced_disable_decide:!1,advanced_disable_feature_flags:!1,advanced_disable_feature_flags_on_first_load:!1,advanced_only_evaluate_survey_feature_flags:!1,advanced_enable_surveys:!1,advanced_disable_toolbar_metrics:!1,feature_flag_request_timeout_ms:3e3,surveys_request_timeout_ms:1e4,on_request_error:n=>{var r="Bad HTTP status: "+n.statusCode+" "+n.text;V.error(r)},get_device_id:n=>n,capture_performance:void 0,name:"posthog",bootstrap:{},disable_compression:!1,session_idle_timeout_seconds:1800,person_profiles:"identified_only",before_send:void 0,request_queue_config:{flush_interval_ms:tf},error_tracking:{},_onCapture:rf,__preview_eager_load_replay:!0}},ty=t=>{var e={};L(t.process_person)||(e.person_profiles=t.process_person),L(t.xhr_headers)||(e.request_headers=t.xhr_headers),L(t.cookie_name)||(e.persistence_name=t.cookie_name),L(t.disable_cookie)||(e.disable_persistence=t.disable_cookie),L(t.store_google)||(e.save_campaign_params=t.store_google),L(t.verbose)||(e.debug=t.verbose);var n=Ee({},e,t);return ie(t.property_blacklist)&&(L(t.property_denylist)?n.property_denylist=t.property_blacklist:ie(t.property_denylist)?n.property_denylist=[...t.property_blacklist,...t.property_denylist]:V.error("Invalid value for property_denylist config: "+t.property_denylist)),n};class BN{constructor(){this.__forceAllowLocalhost=!1}get $s(){return this.__forceAllowLocalhost}set $s(e){V.error("WebPerformanceObserver is deprecated and has no impact on network capture. Use `_forceAllowLocalhostNetworkCapture` on `posthog.sessionRecording`"),this.__forceAllowLocalhost=e}}class Wl{get decideEndpointWasHit(){var e,n;return(e=(n=this.featureFlags)==null?void 0:n.hasLoadedFlags)!==null&&e!==void 0&&e}get flagsEndpointWasHit(){var e,n;return(e=(n=this.featureFlags)==null?void 0:n.hasLoadedFlags)!==null&&e!==void 0&&e}constructor(){this.webPerformance=new BN,this.xs=!1,this.version=hn.LIB_VERSION,this.Es=new op,this._calculate_event_properties=this.calculateEventProperties.bind(this),this.config=ey(),this.SentryIntegration=HI,this.sentryIntegration=e=>function(n,r){var i=Dx(n,r);return{name:Lx,processEvent:s=>i(s)}}(this,e),this.__request_queue=[],this.__loaded=!1,this.analyticsDefaultEndpoint="/e/",this.Rs=!1,this.Ps=null,this.Is=null,this.Ts=null,this.featureFlags=new yN(this),this.toolbar=new KI(this),this.scrollManager=new RN(this),this.pageViewManager=new ZI(this),this.surveys=new kN(this),this.experiments=new ze(this),this.exceptions=new tN(this),this.rateLimiter=new CN(this),this.requestRouter=new LN(this),this.consent=new pI(this),this.externalIntegrations=new jN(this),this.people={set:(e,n,r)=>{var i=xe(e)?{[e]:n}:e;this.setPersonProperties(i),r==null||r({})},set_once:(e,n,r)=>{var i=xe(e)?{[e]:n}:e;this.setPersonProperties(void 0,i),r==null||r({})}},this.on("eventCaptured",e=>V.info('send "'+(e==null?void 0:e.event)+'"',e))}init(e,n,r){if(r&&r!==jr){var i,s=(i=Is[r])!==null&&i!==void 0?i:new Wl;return s._init(e,n,r),Is[r]=s,Is[jr][r]=s,s}return this._init(e,n,r)}_init(e,n,r){var i,s;if(n===void 0&&(n={}),L(e)||Ad(e))return V.critical("PostHog was initialized without a token. This likely indicates a misconfiguration. Please check the first argument passed to posthog.init()"),this;if(this.__loaded)return V.warn("You have already initialized PostHog! Re-initializing is a no-op"),this;this.__loaded=!0,this.config={},this.Cs=n,this.Ms=[],n.person_profiles&&(this.Is=n.person_profiles),this.set_config(Ee({},ey(n.defaults),ty(n),{name:r,token:e})),this.config.on_xhr_error&&V.error("on_xhr_error is deprecated. Use on_request_error instead"),this.compression=n.disable_compression?void 0:pn.GZipJS;var o=this.Os();this.persistence=new Qu(this.config,o),this.sessionPersistence=this.config.persistence==="sessionStorage"||this.config.persistence==="memory"?this.persistence:new Qu(F({},this.config,{persistence:"sessionStorage"}),o);var a=F({},this.persistence.props),l=F({},this.sessionPersistence.props);this.register({$initialization_time:new Date().toISOString()}),this.Fs=new PN(v=>this.As(v),this.config.request_queue_config),this.Ds=new AN(this),this.__request_queue=[];var u=this.config.cookieless_mode==="always"||this.config.cookieless_mode==="on_reject"&&this.consent.isExplicitlyOptedOut();if(u||(this.sessionManager=new Qv(this),this.sessionPropsManager=new Xv(this,this.sessionManager,this.persistence)),new qI(this).startIfEnabledOrStop(),this.siteApps=new NN(this),(i=this.siteApps)==null||i.init(),u||(this.config.__preview_eager_load_replay?this.sessionRecording=new Iv(this):this.sessionRecording=new VN(this),this.sessionRecording.startIfEnabledOrStop()),this.config.disable_scroll_properties||this.scrollManager.startMeasuringScrollPosition(),this.autocapture=new oI(this),this.autocapture.startIfEnabled(),this.surveys.loadIfEnabled(),this.heatmaps=new QI(this),this.heatmaps.startIfEnabled(),this.webVitalsAutocapture=new YI(this),this.exceptionObserver=new vI(this),this.exceptionObserver.startIfEnabled(),this.deadClicksAutocapture=new Cx(this,mI),this.deadClicksAutocapture.startIfEnabled(),this.historyAutocapture=new yI(this),this.historyAutocapture.startIfEnabled(),hn.DEBUG=hn.DEBUG||this.config.debug,hn.DEBUG&&V.info("Starting in debug mode",{this:this,config:n,thisC:F({},this.config),p:a,s:l}),((s=n.bootstrap)==null?void 0:s.distinctID)!==void 0){var c,d,f=this.config.get_device_id(jn()),h=(c=n.bootstrap)!=null&&c.isIdentifiedID?f:n.bootstrap.distinctID;this.persistence.set_property(cn,(d=n.bootstrap)!=null&&d.isIdentifiedID?"identified":"anonymous"),this.register({distinct_id:n.bootstrap.distinctID,$device_id:h})}if(this.js()){var y,m,_=Object.keys(((y=n.bootstrap)==null?void 0:y.featureFlags)||{}).filter(v=>{var w;return!((w=n.bootstrap)==null||(w=w.featureFlags)==null||!w[v])}).reduce((v,w)=>{var E;return v[w]=((E=n.bootstrap)==null||(E=E.featureFlags)==null?void 0:E[w])||!1,v},{}),p=Object.keys(((m=n.bootstrap)==null?void 0:m.featureFlagPayloads)||{}).filter(v=>_[v]).reduce((v,w)=>{var E,P;return(E=n.bootstrap)!=null&&(E=E.featureFlagPayloads)!=null&&E[w]&&(v[w]=(P=n.bootstrap)==null||(P=P.featureFlagPayloads)==null?void 0:P[w]),v},{});this.featureFlags.receivedFeatureFlags({featureFlags:_,featureFlagPayloads:p})}if(u)this.register_once({distinct_id:Yi,$device_id:null},"");else if(!this.get_distinct_id()){var g=this.config.get_device_id(jn());this.register_once({distinct_id:g,$device_id:g},""),this.persistence.set_property(cn,"anonymous")}return pe(b,"onpagehide"in self?"pagehide":"unload",this._handle_unload.bind(this),{passive:!1}),this.toolbar.maybeLoadToolbar(),n.segment?UI(this,()=>this.Ls()):this.Ls(),At(this.config._onCapture)&&this.config._onCapture!==rf&&(V.warn("onCapture is deprecated. Please use `before_send` instead"),this.on("eventCaptured",v=>this.config._onCapture(v.event,v))),this.config.ip&&V.warn('The `ip` config option has NO EFFECT AT ALL and has been deprecated. Use a custom transformation or "Discard IP data" project setting instead. See https://posthog.com/tutorials/web-redact-properties#hiding-customer-ip-address for more information.'),this}Me(e){var n,r,i,s,o,a,l,u;if(!B||!B.body)return V.info("document not ready yet, trying again in 500 milliseconds..."),void setTimeout(()=>{this.Me(e)},500);this.compression=void 0,e.supportedCompression&&!this.config.disable_compression&&(this.compression=X(e.supportedCompression,pn.GZipJS)?pn.GZipJS:X(e.supportedCompression,pn.Base64)?pn.Base64:void 0),(n=e.analytics)!=null&&n.endpoint&&(this.analyticsDefaultEndpoint=e.analytics.endpoint),this.set_config({person_profiles:this.Is?this.Is:"identified_only"}),(r=this.siteApps)==null||r.onRemoteConfig(e),(i=this.sessionRecording)==null||i.onRemoteConfig(e),(s=this.autocapture)==null||s.onRemoteConfig(e),(o=this.heatmaps)==null||o.onRemoteConfig(e),this.surveys.onRemoteConfig(e),(a=this.webVitalsAutocapture)==null||a.onRemoteConfig(e),(l=this.exceptionObserver)==null||l.onRemoteConfig(e),this.exceptions.onRemoteConfig(e),(u=this.deadClicksAutocapture)==null||u.onRemoteConfig(e)}Ls(){try{this.config.loaded(this)}catch(e){V.critical("`loaded` function failed",e)}this.Ns(),this.config.capture_pageview&&setTimeout(()=>{(this.consent.isOptedIn()||this.config.cookieless_mode==="always")&&this.Us()},1),new bN(this).load(),this.featureFlags.flags()}Ns(){var e;this.is_capturing()&&this.config.request_batching&&((e=this.Fs)==null||e.enable())}_dom_loaded(){this.is_capturing()&&qn(this.__request_queue,e=>this.As(e)),this.__request_queue=[],this.Ns()}_handle_unload(){var e,n;this.config.request_batching?(this.zs()&&this.capture("$pageleave"),(e=this.Fs)==null||e.unload(),(n=this.Ds)==null||n.unload()):this.zs()&&this.capture("$pageleave",null,{transport:"sendBeacon"})}Ce(e){this.__loaded&&(uS?this.__request_queue.push(e):this.rateLimiter.isServerRateLimited(e.batchKey)||(e.transport=e.transport||this.config.api_transport,e.url=ll(e.url,{ip:this.config.ip?1:0}),e.headers=F({},this.config.request_headers),e.compression=e.compression==="best-available"?this.compression:e.compression,e.disableXHRCredentials=this.config.__preview_disable_xhr_credentials,this.config.__preview_disable_beacon&&(e.disableTransport=["sendBeacon"]),e.fetchOptions=e.fetchOptions||this.config.fetch_options,(n=>{var r,i,s,o=F({},n);o.timeout=o.timeout||6e4,o.url=ll(o.url,{_:new Date().getTime().toString(),ver:hn.LIB_VERSION,compression:o.compression});var a=(r=o.transport)!==null&&r!==void 0?r:"fetch",l=fa.filter(c=>!o.disableTransport||!c.transport||!o.disableTransport.includes(c.transport)),u=(i=(s=ax(l,c=>c.transport===a))==null?void 0:s.method)!==null&&i!==void 0?i:l[0].method;if(!u)throw new Error("No available transport method");u(o)})(F({},e,{callback:n=>{var r,i;this.rateLimiter.checkForLimiting(n),n.statusCode>=400&&((r=(i=this.config).on_request_error)==null||r.call(i,n)),e.callback==null||e.callback(n)}}))))}As(e){this.Ds?this.Ds.retriableRequest(e):this.Ce(e)}_execute_array(e){var n,r=[],i=[],s=[];qn(e,a=>{a&&(n=a[0],ie(n)?s.push(a):At(a)?a.call(this):ie(a)&&n==="alias"?r.push(a):ie(a)&&n.indexOf("capture")!==-1&&At(this[n])?s.push(a):i.push(a))});var o=function(a,l){qn(a,function(u){if(ie(u[0])){var c=l;re(u,function(d){c=c[d[0]].apply(c,d.slice(1))})}else this[u[0]].apply(this,u.slice(1))},l)};o(r,this),o(i,this),o(s,this)}js(){var e,n;return((e=this.config.bootstrap)==null?void 0:e.featureFlags)&&Object.keys((n=this.config.bootstrap)==null?void 0:n.featureFlags).length>0||!1}push(e){this._execute_array([e])}capture(e,n,r){var i;if(this.__loaded&&this.persistence&&this.sessionPersistence&&this.Fs){if(this.is_capturing())if(!L(e)&&xe(e)){if(this.config.opt_out_useragent_filter||!this._is_bot()){var s=r!=null&&r.skip_client_rate_limiting?void 0:this.rateLimiter.clientRateLimitContext();if(s==null||!s.isRateLimited){n!=null&&n.$current_url&&!xe(n==null?void 0:n.$current_url)&&(V.error("Invalid `$current_url` property provided to `posthog.capture`. Input must be a string. Ignoring provided value."),n==null||delete n.$current_url),this.sessionPersistence.update_search_keyword(),this.config.save_campaign_params&&this.sessionPersistence.update_campaign_params(),this.config.save_referrer&&this.sessionPersistence.update_referrer_info(),(this.config.save_campaign_params||this.config.save_referrer)&&this.persistence.set_initial_person_info();var o=new Date,a=(r==null?void 0:r.timestamp)||o,l=jn(),u={uuid:l,event:e,properties:this.calculateEventProperties(e,n||{},a,l)};s&&(u.properties.$lib_rate_limit_remaining_tokens=s.remainingTokens),r!=null&&r.$set&&(u.$set=r==null?void 0:r.$set);var c,d=this.Bs(r==null?void 0:r.$set_once);if(d&&(u.$set_once=d),(u=H2(u,r!=null&&r._noTruncate?null:this.config.properties_string_max_length)).timestamp=a,L(r==null?void 0:r.timestamp)||(u.properties.$event_time_override_provided=!0,u.properties.$event_time_override_system_time=o),e===ha.DISMISSED||e===ha.SENT){var f=n==null?void 0:n[Gv.SURVEY_ID],h=n==null?void 0:n[Gv.SURVEY_ITERATION];c={id:f,current_iteration:h},localStorage.getItem(qv(c))||localStorage.setItem(qv(c),"true"),u.$set=F({},u.$set,{[wN({id:f,current_iteration:h},e===ha.SENT?"responded":"dismissed")]:!0})}var y=F({},u.properties.$set,u.$set);if(ii(y)||this.setPersonPropertiesForFlags(y),!Z(this.config.before_send)){var m=this.qs(u);if(!m)return;u=m}this.Es.emit("eventCaptured",u);var _={method:"POST",url:(i=r==null?void 0:r._url)!==null&&i!==void 0?i:this.requestRouter.endpointFor("api",this.analyticsDefaultEndpoint),data:u,compression:"best-available",batchKey:r==null?void 0:r._batchKey};return!this.config.request_batching||r&&(r==null||!r._batchKey)||r!=null&&r.send_instantly?this.As(_):this.Fs.enqueue(_),u}V.critical("This capture call is ignored due to client rate limiting.")}}else V.error("No event name provided to posthog.capture")}else V.uninitializedWarning("posthog.capture")}Xe(e){return this.on("eventCaptured",n=>e(n.event,n))}calculateEventProperties(e,n,r,i,s){if(r=r||new Date,!this.persistence||!this.sessionPersistence)return n;var o=s?void 0:this.persistence.remove_event_timer(e),a=F({},n);if(a.token=this.config.token,a.$config_defaults=this.config.defaults,(this.config.cookieless_mode=="always"||this.config.cookieless_mode=="on_reject"&&this.consent.isExplicitlyOptedOut())&&(a.$cookieless_mode=!0),e==="$snapshot"){var l=F({},this.persistence.properties(),this.sessionPersistence.properties());return a.distinct_id=l.distinct_id,(!xe(a.distinct_id)&&!He(a.distinct_id)||Ad(a.distinct_id))&&V.error("Invalid distinct_id for replay event. This indicates a bug in your implementation"),a}var u,c=gN(this.config.mask_personal_data_properties,this.config.custom_personal_data_properties);if(this.sessionManager){var{sessionId:d,windowId:f}=this.sessionManager.checkAndGetSessionAndWindowId(s,r.getTime());a.$session_id=d,a.$window_id=f}this.sessionPropsManager&&Ee(a,this.sessionPropsManager.getSessionProps());try{var h;this.sessionRecording&&Ee(a,this.sessionRecording.sdkDebugProperties),a.$sdk_debug_retry_queue_size=(h=this.Ds)==null?void 0:h.length}catch(p){a.$sdk_debug_error_capturing_properties=String(p)}if(this.requestRouter.region===gs.CUSTOM&&(a.$lib_custom_api_host=this.config.api_host),u=e!=="$pageview"||s?e!=="$pageleave"||s?this.pageViewManager.doEvent():this.pageViewManager.doPageLeave(r):this.pageViewManager.doPageView(r,i),a=Ee(a,u),e==="$pageview"&&B&&(a.title=B.title),!L(o)){var y=r.getTime()-o;a.$duration=parseFloat((y/1e3).toFixed(3))}rt&&this.config.opt_out_useragent_filter&&(a.$browser_type=this._is_bot()?"bot":"browser"),(a=Ee({},c,this.persistence.properties(),this.sessionPersistence.properties(),a)).$is_identified=this._isIdentified(),ie(this.config.property_denylist)?re(this.config.property_denylist,function(p){delete a[p]}):V.error("Invalid value for property_denylist config: "+this.config.property_denylist+" or property_blacklist config: "+this.config.property_blacklist);var m=this.config.sanitize_properties;m&&(V.error("sanitize_properties is deprecated. Use before_send instead"),a=m(a,e));var _=this.Hs();return a.$process_person_profile=_,_&&!s&&this.Ws("_calculate_event_properties"),a}Bs(e){var n;if(!this.persistence||!this.Hs()||this.xs)return e;var r=this.persistence.get_initial_props(),i=(n=this.sessionPropsManager)==null?void 0:n.getSetOnceProps(),s=Ee({},r,i||{},e||{}),o=this.config.sanitize_properties;return o&&(V.error("sanitize_properties is deprecated. Use before_send instead"),s=o(s,"$set_once")),this.xs=!0,ii(s)?void 0:s}register(e,n){var r;(r=this.persistence)==null||r.register(e,n)}register_once(e,n,r){var i;(i=this.persistence)==null||i.register_once(e,n,r)}register_for_session(e){var n;(n=this.sessionPersistence)==null||n.register(e)}unregister(e){var n;(n=this.persistence)==null||n.unregister(e)}unregister_for_session(e){var n;(n=this.sessionPersistence)==null||n.unregister(e)}Gs(e,n){this.register({[e]:n})}getFeatureFlag(e,n){return this.featureFlags.getFeatureFlag(e,n)}getFeatureFlagPayload(e){var n=this.featureFlags.getFeatureFlagPayload(e);try{return JSON.parse(n)}catch{return n}}isFeatureEnabled(e,n){return this.featureFlags.isFeatureEnabled(e,n)}reloadFeatureFlags(){this.featureFlags.reloadFeatureFlags()}updateEarlyAccessFeatureEnrollment(e,n,r){this.featureFlags.updateEarlyAccessFeatureEnrollment(e,n,r)}getEarlyAccessFeatures(e,n,r){return n===void 0&&(n=!1),this.featureFlags.getEarlyAccessFeatures(e,n,r)}on(e,n){return this.Es.on(e,n)}onFeatureFlags(e){return this.featureFlags.onFeatureFlags(e)}onSurveysLoaded(e){return this.surveys.onSurveysLoaded(e)}onSessionId(e){var n,r;return(n=(r=this.sessionManager)==null?void 0:r.onSessionId(e))!==null&&n!==void 0?n:()=>{}}getSurveys(e,n){n===void 0&&(n=!1),this.surveys.getSurveys(e,n)}getActiveMatchingSurveys(e,n){n===void 0&&(n=!1),this.surveys.getActiveMatchingSurveys(e,n)}renderSurvey(e,n){this.surveys.renderSurvey(e,n)}displaySurvey(e,n){n===void 0&&(n=SN),this.surveys.displaySurvey(e,n)}canRenderSurvey(e){return this.surveys.canRenderSurvey(e)}canRenderSurveyAsync(e,n){return n===void 0&&(n=!1),this.surveys.canRenderSurveyAsync(e,n)}identify(e,n,r){if(!this.__loaded||!this.persistence)return V.uninitializedWarning("posthog.identify");if(He(e)&&(e=e.toString(),V.warn("The first argument to posthog.identify was a number, but it should be a string. It has been converted to a string.")),e)if(["distinct_id","distinctid"].includes(e.toLowerCase()))V.critical('The string "'+e+'" was set in posthog.identify which indicates an error. This ID should be unique to the user and not a hardcoded string.');else if(e!==Yi){if(this.Ws("posthog.identify")){var i=this.get_distinct_id();if(this.register({$user_id:e}),!this.get_property("$device_id")){var s=i;this.register_once({$had_persisted_distinct_id:!0,$device_id:s},"")}e!==i&&e!==this.get_property(ls)&&(this.unregister(ls),this.register({distinct_id:e}));var o=(this.persistence.get_property(cn)||"anonymous")==="anonymous";e!==i&&o?(this.persistence.set_property(cn,"identified"),this.setPersonPropertiesForFlags(F({},r||{},n||{}),!1),this.capture("$identify",{distinct_id:e,$anon_distinct_id:i},{$set:n||{},$set_once:r||{}}),this.Ts=Fv(e,n,r),this.featureFlags.setAnonymousDistinctId(i)):(n||r)&&this.setPersonProperties(n,r),e!==i&&(this.reloadFeatureFlags(),this.unregister(Za))}}else V.critical('The string "'+Yi+'" was set in posthog.identify which indicates an error. This ID is only used as a sentinel value.');else V.error("Unique user id has not been set in posthog.identify")}setPersonProperties(e,n){if((e||n)&&this.Ws("posthog.setPersonProperties")){var r=Fv(this.get_distinct_id(),e,n);this.Ts!==r?(this.setPersonPropertiesForFlags(F({},n||{},e||{})),this.capture("$set",{$set:e||{},$set_once:n||{}}),this.Ts=r):V.info("A duplicate setPersonProperties call was made with the same properties. It has been ignored.")}}group(e,n,r){if(e&&n){if(this.Ws("posthog.group")){var i=this.getGroups();i[e]!==n&&this.resetGroupPropertiesForFlags(e),this.register({$groups:F({},i,{[e]:n})}),r&&(this.capture("$groupidentify",{$group_type:e,$group_key:n,$group_set:r}),this.setGroupPropertiesForFlags({[e]:r})),i[e]===n||r||this.reloadFeatureFlags()}}else V.error("posthog.group requires a group type and group key")}resetGroups(){this.register({$groups:{}}),this.resetGroupPropertiesForFlags(),this.reloadFeatureFlags()}setPersonPropertiesForFlags(e,n){n===void 0&&(n=!0),this.featureFlags.setPersonPropertiesForFlags(e,n)}resetPersonPropertiesForFlags(){this.featureFlags.resetPersonPropertiesForFlags()}setGroupPropertiesForFlags(e,n){n===void 0&&(n=!0),this.Ws("posthog.setGroupPropertiesForFlags")&&this.featureFlags.setGroupPropertiesForFlags(e,n)}resetGroupPropertiesForFlags(e){this.featureFlags.resetGroupPropertiesForFlags(e)}reset(e){var n,r,i,s;if(V.info("reset"),!this.__loaded)return V.uninitializedWarning("posthog.reset");var o=this.get_property("$device_id");if(this.consent.reset(),(n=this.persistence)==null||n.clear(),(r=this.sessionPersistence)==null||r.clear(),this.surveys.reset(),this.featureFlags.reset(),(i=this.persistence)==null||i.set_property(cn,"anonymous"),(s=this.sessionManager)==null||s.resetSessionId(),this.Ts=null,this.config.cookieless_mode==="always")this.register_once({distinct_id:Yi,$device_id:null},"");else{var a=this.config.get_device_id(jn());this.register_once({distinct_id:a,$device_id:e?a:o},"")}this.register({$last_posthog_reset:new Date().toISOString()},1)}get_distinct_id(){return this.get_property("distinct_id")}getGroups(){return this.get_property("$groups")||{}}get_session_id(){var e,n;return(e=(n=this.sessionManager)==null?void 0:n.checkAndGetSessionAndWindowId(!0).sessionId)!==null&&e!==void 0?e:""}get_session_replay_url(e){if(!this.sessionManager)return"";var{sessionId:n,sessionStartTimestamp:r}=this.sessionManager.checkAndGetSessionAndWindowId(!0),i=this.requestRouter.endpointFor("ui","/project/"+this.config.token+"/replay/"+n);if(e!=null&&e.withTimestamp&&r){var s,o=(s=e.timestampLookBack)!==null&&s!==void 0?s:10;if(!r)return i;i+="?t="+Math.max(Math.floor((new Date().getTime()-r)/1e3)-o,0)}return i}alias(e,n){return e===this.get_property(lx)?(V.critical("Attempting to create alias for existing People user - aborting."),-2):this.Ws("posthog.alias")?(L(n)&&(n=this.get_distinct_id()),e!==n?(this.Gs(ls,e),this.capture("$create_alias",{alias:e,distinct_id:n})):(V.warn("alias matches current distinct_id - skipping api call."),this.identify(e),-1)):void 0}set_config(e){var n=F({},this.config);if(we(e)){var r,i,s,o,a;Ee(this.config,ty(e));var l=this.Os();(r=this.persistence)==null||r.update_config(this.config,n,l),this.sessionPersistence=this.config.persistence==="sessionStorage"||this.config.persistence==="memory"?this.persistence:new Qu(F({},this.config,{persistence:"sessionStorage"}),l),Te.G()&&Te.J("ph_debug")==="true"&&(this.config.debug=!0),this.config.debug&&(hn.DEBUG=!0,V.info("set_config",{config:e,oldConfig:n,newConfig:F({},this.config)})),(i=this.sessionRecording)==null||i.startIfEnabledOrStop(),(s=this.autocapture)==null||s.startIfEnabled(),(o=this.heatmaps)==null||o.startIfEnabled(),this.surveys.loadIfEnabled(),this.Vs(),(a=this.externalIntegrations)==null||a.startIfEnabledOrStop()}}startSessionRecording(e){var n=e===!0,r={sampling:n||!(e==null||!e.sampling),linked_flag:n||!(e==null||!e.linked_flag),url_trigger:n||!(e==null||!e.url_trigger),event_trigger:n||!(e==null||!e.event_trigger)};if(Object.values(r).some(Boolean)){var i,s,o,a,l;(i=this.sessionManager)==null||i.checkAndGetSessionAndWindowId(),r.sampling&&((s=this.sessionRecording)==null||s.overrideSampling()),r.linked_flag&&((o=this.sessionRecording)==null||o.overrideLinkedFlag()),r.url_trigger&&((a=this.sessionRecording)==null||a.overrideTrigger("url")),r.event_trigger&&((l=this.sessionRecording)==null||l.overrideTrigger("event"))}this.set_config({disable_session_recording:!1})}stopSessionRecording(){this.set_config({disable_session_recording:!0})}sessionRecordingStarted(){var e;return!((e=this.sessionRecording)==null||!e.started)}captureException(e,n){var r=new Error("PostHog syntheticException"),i=this.exceptions.buildProperties(e,{handled:!0,syntheticException:r});return this.exceptions.sendExceptionEvent(F({},i,n))}loadToolbar(e){return this.toolbar.loadToolbar(e)}get_property(e){var n;return(n=this.persistence)==null?void 0:n.props[e]}getSessionProperty(e){var n;return(n=this.sessionPersistence)==null?void 0:n.props[e]}toString(){var e,n=(e=this.config.name)!==null&&e!==void 0?e:jr;return n!==jr&&(n=jr+"."+n),n}_isIdentified(){var e,n;return((e=this.persistence)==null?void 0:e.get_property(cn))==="identified"||((n=this.sessionPersistence)==null?void 0:n.get_property(cn))==="identified"}Hs(){var e,n;return!(this.config.person_profiles==="never"||this.config.person_profiles==="identified_only"&&!this._isIdentified()&&ii(this.getGroups())&&((e=this.persistence)==null||(e=e.props)==null||!e[ls])&&((n=this.persistence)==null||(n=n.props)==null||!n[el]))}zs(){return this.config.capture_pageleave===!0||this.config.capture_pageleave==="if_capture_pageview"&&(this.config.capture_pageview===!0||this.config.capture_pageview==="history_change")}createPersonProfile(){this.Hs()||this.Ws("posthog.createPersonProfile")&&this.setPersonProperties({},{})}Ws(e){return this.config.person_profiles==="never"?(V.error(e+' was called, but process_person is set to "never". This call will be ignored.'),!1):(this.Gs(el,!0),!0)}Os(){if(this.config.cookieless_mode==="always")return!0;var e=this.consent.isOptedOut(),n=this.config.opt_out_persistence_by_default||this.config.cookieless_mode==="on_reject";return this.config.disable_persistence||e&&!!n}Vs(){var e,n,r,i,s=this.Os();return((e=this.persistence)==null?void 0:e.Le)!==s&&((r=this.persistence)==null||r.set_disabled(s)),((n=this.sessionPersistence)==null?void 0:n.Le)!==s&&((i=this.sessionPersistence)==null||i.set_disabled(s)),s}opt_in_capturing(e){if(this.config.cookieless_mode!=="always"){var n;this.config.cookieless_mode==="on_reject"&&this.consent.isExplicitlyOptedOut()&&(this.reset(!0),this.sessionManager=new Qv(this),this.persistence&&(this.sessionPropsManager=new Xv(this,this.sessionManager,this.persistence)),this.sessionRecording=new Iv(this),this.sessionRecording.startIfEnabledOrStop()),this.consent.optInOut(!0),this.Vs(),this.config.cookieless_mode=="on_reject"&&this.surveys.loadIfEnabled(),(L(e==null?void 0:e.captureEventName)||e!=null&&e.captureEventName)&&this.capture((n=e==null?void 0:e.captureEventName)!==null&&n!==void 0?n:"$opt_in",e==null?void 0:e.captureProperties,{send_instantly:!0}),this.config.capture_pageview&&this.Us()}else V.warn('Consent opt in/out is not valid with cookieless_mode="always" and will be ignored')}opt_out_capturing(){var e;this.config.cookieless_mode!=="always"?(this.config.cookieless_mode==="on_reject"&&this.consent.isOptedIn()&&this.reset(!0),this.consent.optInOut(!1),this.Vs(),this.config.cookieless_mode==="on_reject"&&(this.register({distinct_id:Yi,$device_id:null}),this.sessionManager=void 0,this.sessionPropsManager=void 0,(e=this.sessionRecording)==null||e.stopRecording(),this.sessionRecording=void 0,this.Us())):V.warn('Consent opt in/out is not valid with cookieless_mode="always" and will be ignored')}has_opted_in_capturing(){return this.consent.isOptedIn()}has_opted_out_capturing(){return this.consent.isOptedOut()}get_explicit_consent_status(){var e=this.consent.consent;return e===dn.GRANTED?"granted":e===dn.DENIED?"denied":"pending"}is_capturing(){return this.config.cookieless_mode==="always"||(this.config.cookieless_mode==="on_reject"?this.consent.isExplicitlyOptedOut()||this.consent.isOptedIn():!this.has_opted_out_capturing())}clear_opt_in_out_capturing(){this.consent.reset(),this.Vs()}_is_bot(){return gt?lS(gt,this.config.custom_blocked_useragents):void 0}Us(){B&&(B.visibilityState==="visible"?this.Rs||(this.Rs=!0,this.capture("$pageview",{title:B.title},{send_instantly:!0}),this.Ps&&(B.removeEventListener("visibilitychange",this.Ps),this.Ps=null)):this.Ps||(this.Ps=this.Us.bind(this),pe(B,"visibilitychange",this.Ps)))}debug(e){e===!1?(b==null||b.console.log("You've disabled debug mode."),localStorage&&localStorage.removeItem("ph_debug"),this.set_config({debug:!1})):(b==null||b.console.log("You're now in debug mode. All calls to PostHog will be logged in your console.\nYou can disable this with `posthog.debug(false)`."),localStorage&&localStorage.setItem("ph_debug","true"),this.set_config({debug:!0}))}L(){var e,n,r,i,s,o,a,l=this.Cs||{};return"advanced_disable_flags"in l?!!l.advanced_disable_flags:this.config.advanced_disable_flags!==!1?!!this.config.advanced_disable_flags:this.config.advanced_disable_decide===!0?(V.warn("Config field 'advanced_disable_decide' is deprecated. Please use 'advanced_disable_flags' instead. The old field will be removed in a future major version."),!0):(r="advanced_disable_decide",i=!1,s=V,o=(n="advanced_disable_flags")in(e=l)&&!L(e[n]),a=r in e&&!L(e[r]),o?e[n]:a?(s&&s.warn("Config field '"+r+"' is deprecated. Please use '"+n+"' instead. The old field will be removed in a future major version."),e[r]):i)}qs(e){if(Z(this.config.before_send))return e;var n=ie(this.config.before_send)?this.config.before_send:[this.config.before_send],r=e;for(var i of n){if(r=i(r),Z(r)){var s="Event '"+e.event+"' was rejected in beforeSend function";return y2(e.event)?V.warn(s+". This can cause unexpected behavior."):V.info(s),null}r.properties&&!ii(r.properties)||V.warn("Event '"+e.event+"' has no properties after beforeSend function, this is likely an error.")}return r}getPageViewId(){var e;return(e=this.pageViewManager.pe)==null?void 0:e.pageViewId}captureTraceFeedback(e,n){this.capture("$ai_feedback",{$ai_trace_id:String(e),$ai_feedback_text:n})}captureTraceMetric(e,n,r){this.capture("$ai_metric",{$ai_trace_id:String(e),$ai_metric_name:n,$ai_metric_value:String(r)})}}(function(t,e){for(var n=0;n<e.length;n++)t.prototype[e[n]]=U2(t.prototype[e[n]])})(Wl,["identify"]);var ny,Vr=(ny=Is[jr]=new Wl,function(){function t(){t.done||(t.done=!0,uS=!1,re(Is,function(e){e._dom_loaded()}))}B!=null&&B.addEventListener?B.readyState==="complete"?t():pe(B,"DOMContentLoaded",t,{capture:!1}):b&&V.error("Browser doesn't support `document.addEventListener` so PostHog couldn't be initialized")}(),ny),cS=x.createContext({client:Vr});function dS(t,e,n){if(n===void 0&&(n=new WeakMap),t===e)return!0;if(typeof t!="object"||t===null||typeof e!="object"||e===null)return!1;if(n.has(t)&&n.get(t)===e)return!0;n.set(t,e);var r=Object.keys(t),i=Object.keys(e);if(r.length!==i.length)return!1;for(var s=0,o=r;s<o.length;s++){var a=o[s];if(!i.includes(a)||!dS(t[a],e[a],n))return!1}return!0}function zN(t){var e=t.children,n=t.client,r=t.apiKey,i=t.options,s=x.useRef(null),o=x.useMemo(function(){return n?(r&&console.warn("[PostHog.js] You have provided both `client` and `apiKey` to `PostHogProvider`. `apiKey` will be ignored in favour of `client`."),i&&console.warn("[PostHog.js] You have provided both `client` and `options` to `PostHogProvider`. `options` will be ignored in favour of `client`."),n):(r||console.warn("[PostHog.js] No `apiKey` or `client` were provided to `PostHogProvider`. Using default global `window.posthog` instance. You must initialize it manually. This is not recommended behavior."),Vr)},[n,r,JSON.stringify(i)]);return x.useEffect(function(){if(!n){var a=s.current;a?(r!==a.apiKey&&console.warn("[PostHog.js] You have provided a different `apiKey` to `PostHogProvider` than the one that was already initialized. This is not supported by our provider and we'll keep using the previous key. If you need to toggle between API Keys you need to control the `client` yourself and pass it in as a prop rather than an `apiKey` prop."),i&&!dS(i,a.options)&&Vr.set_config(i),s.current={apiKey:r,options:i??{}}):(Vr.__loaded&&console.warn("[PostHog.js] `posthog` was already loaded elsewhere. This may cause issues."),Vr.init(r,i),s.current={apiKey:r,options:i??{}})}},[n,r,JSON.stringify(i)]),ee.createElement(cS.Provider,{value:{client:o}},e)}var sf=function(t,e){return sf=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,r){n.__proto__=r}||function(n,r){for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(n[i]=r[i])},sf(t,e)};function UN(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");sf(t,e);function n(){this.constructor=t}t.prototype=e===null?Object.create(e):(n.prototype=e.prototype,new n)}var ec=function(t){return typeof t=="function"},HN={componentStack:null,exceptionEvent:null,error:null},WN={INVALID_FALLBACK:"[PostHog.js][PostHogErrorBoundary] Invalid fallback prop, provide a valid React element or a function that returns a valid React element."};(function(t){UN(e,t);function e(n){var r=t.call(this,n)||this;return r.state=HN,r}return e.prototype.componentDidCatch=function(n,r){var i=this.props.additionalProperties,s;ec(i)?s=i(n):typeof i=="object"&&(s=i);var o=this.context.client,a=o.captureException(n,s),l=r.componentStack;this.setState({error:n,componentStack:l,exceptionEvent:a})},e.prototype.render=function(){var n=this.props,r=n.children,i=n.fallback,s=this.state;if(s.componentStack==null)return ec(r)?r():r;var o=ec(i)?ee.createElement(i,{error:s.error,componentStack:s.componentStack,exceptionEvent:s.exceptionEvent}):i;return ee.isValidElement(o)?o:(console.warn(WN.INVALID_FALLBACK),ee.createElement(ee.Fragment,null))},e.contextType=cS,e})(ee.Component);const KN="phc_Ntj9tXHbS64XgYxlTfhglRmFivFsfm0AERph4ZlnNH",GN="https://us.i.posthog.com";tc.createRoot(document.getElementById("root")).render(k.jsx(ee.StrictMode,{children:k.jsx(zN,{apiKey:KN,options:{api_host:GN,capture_exceptions:!0,debug:!1},children:k.jsx(p2,{})})}));
|