@homepages/concrete 10.0.0 → 11.0.0
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/CHANGELOG.md +29 -0
- package/codemods/manifest.json +5 -158
- package/dist/artifact/playground/client/assets/index-ByeGGedv.js +1259 -0
- package/dist/artifact/playground/client/assets/index-CxWPYOH2.css +1 -0
- package/dist/artifact/playground/client/index.html +2 -2
- package/dist/artifact/playground/client/island-canvas-host.mjs +1 -1
- package/dist/artifact/playground/host.mjs +26 -26
- package/dist/base.css +1 -8
- package/dist/cli/build/artifact.js +1 -1
- package/dist/cli/build/fixtures.js +3 -2
- package/dist/cli/check/stages/sections.js +1 -1
- package/dist/cli/dev/workspace-reader.js +3 -2
- package/dist/css/compile.js +3 -6
- package/dist/css/rules.js +1 -51
- package/dist/design-system/format-variants.js +1 -1
- package/dist/fixtures/resolve.js +5 -1
- package/dist/fixtures/rows.js +2 -2
- package/dist/index.d.ts +5 -5
- package/dist/packages/external/concrete/package.js +1 -1
- package/dist/packages/internal/fill-vocabulary/dist/holder.js +3 -14
- package/dist/packages/internal/media-resolution/dist/document.js +3 -3
- package/dist/packages/internal/media-resolution/dist/image.js +3 -3
- package/dist/packages/internal/media-resolution/dist/tour.js +6 -6
- package/dist/packages/internal/media-resolution/dist/video.js +9 -9
- package/dist/packages/internal/section-contracts/dist/fill-verb-contract.js +1 -0
- package/dist/packages/internal/section-contracts/dist/runners.js +1 -3
- package/dist/packages/internal/section-contracts/dist/source-contract.js +3 -3
- package/dist/packages/internal/section-contracts/dist/sources-contract.js +0 -2
- package/dist/packages/internal/template-artifact/dist/index.js +2 -2
- package/dist/packages/internal/template-artifact/dist/layout.js +11 -11
- package/dist/packages/internal/template-artifact/dist/manifest.js +1 -1
- package/dist/packages/internal/template-artifact/dist/verify.js +13 -17
- package/dist/packages/internal/template-contracts/dist/document-value.d.ts +3 -5
- package/dist/packages/internal/template-contracts/dist/fill-builders.js +2 -6
- package/dist/packages/internal/template-contracts/dist/fill-spec-schema.js +4 -1
- package/dist/packages/internal/template-contracts/dist/list.js +0 -14
- package/dist/packages/internal/template-contracts/dist/primitive-descriptors.js +1 -1
- package/dist/packages/internal/template-contracts/dist/runtime-values.d.ts +6 -7
- package/dist/packages/internal/template-contracts/dist/slot-builders.js +0 -2
- package/dist/packages/internal/template-contracts/dist/slot-ref.d.ts +6 -1
- package/dist/packages/internal/template-contracts/dist/tour-value.d.ts +2 -4
- package/dist/packages/internal/template-contracts/dist/video-value.d.ts +3 -4
- package/dist/primitives/Image.d.ts +2 -2
- package/dist/primitives/Tour.d.ts +2 -2
- package/dist/primitives/Video.d.ts +2 -2
- package/dist/primitives/slot-bindings.js +6 -13
- package/dist/primitives/slot-document.d.ts +1 -1
- package/dist/primitives/slot-download.d.ts +3 -1
- package/dist/primitives/slot-media.d.ts +5 -2
- package/dist/primitives/slot-media.js +1 -1
- package/dist/rules/registry.js +0 -6
- package/dist/schema/format-presets.d.ts +1 -1
- package/dist/schema/section-schema.d.ts +5 -5
- package/dist/styles.css +4 -4
- package/dist/template/define-template.js +0 -1
- package/guide/reference/cli/INDEX.md +2 -2
- package/guide/reference/cli/build.md +1 -1
- package/guide/reference/cli/check.md +1 -1
- package/guide/reference/cli/dev.md +1 -1
- package/guide/reference/cli/property-add.md +1 -1
- package/guide/reference/cli/property-list.md +1 -1
- package/guide/reference/cli/publish.md +1 -1
- package/guide/reference/cli/upgrade.md +1 -1
- package/guide/reference/rules/INDEX.md +1 -2
- package/package.json +2 -2
- package/codemods/fill-is-a-source.mjs +0 -533
- package/codemods/framework-namespace.mjs +0 -107
- package/codemods/list-grammar.mjs +0 -923
- package/codemods/object-form-only.mjs +0 -39
- package/codemods/platform-namespace.mjs +0 -83
- package/codemods/process-builders.mjs +0 -198
- package/codemods/reads-replace-reconcile.mjs +0 -285
- package/codemods/registry-keys-only.mjs +0 -113
- package/codemods/slot-object.mjs +0 -1097
- package/codemods/steps/content-object-fields.mjs +0 -324
- package/codemods/steps/list-object-form.mjs +0 -686
- package/codemods/steps/registry-key-reads.mjs +0 -276
- package/codemods/steps/select-object-form.mjs +0 -210
- package/codemods/table-rows.mjs +0 -568
- package/codemods/theme-collapse.mjs +0 -396
- package/codemods/unlayer-author-css.mjs +0 -194
- package/codemods/unwrap-object-fields.mjs +0 -310
- package/codemods/viewer-slot-document.mjs +0 -131
- package/codemods/write-property-as-facts-document.mjs +0 -716
- package/codemods/write-the-address-line.mjs +0 -255
- package/codemods/write-the-registry-members.mjs +0 -653
- package/codemods/write-the-select-from.mjs +0 -141
- package/codemods/write-the-sole-from.mjs +0 -369
- package/codemods/write-the-table-from.mjs +0 -267
- package/codemods/write-the-whole-item.mjs +0 -512
- package/codemods/writeback-drop.mjs +0 -168
- package/codemods/written-contact-address.mjs +0 -162
- package/codemods/written-media-category.mjs +0 -227
- package/codemods/written-ref-kinds-name-the-layer.mjs +0 -172
- package/codemods/written-uploads-replace-pool-reads.mjs +0 -454
- package/codemods/written-uploads-sort-into-lists.mjs +0 -405
- package/codemods/written-uploads-stated-in-sorted-lists.mjs +0 -295
- package/codemods/written-video-sources-drop.mjs +0 -144
- package/codemods/written-without-pick-none.mjs +0 -146
- package/codemods/written-without-retired-knowledge.mjs +0 -223
- package/codemods/written-without-the-media-key.mjs +0 -202
- package/codemods/written-without-the-property-type.mjs +0 -249
- package/dist/artifact/playground/client/assets/index-BFNHB7VM.css +0 -1
- package/dist/artifact/playground/client/assets/index-Div1yo6s.js +0 -1259
|
@@ -0,0 +1,1259 @@
|
|
|
1
|
+
var gx=e=>{throw TypeError(e)};var jm=(e,t,a)=>t.has(e)||gx("Cannot "+a);var $=(e,t,a)=>(jm(e,t,"read from private field"),a?a.call(e):t.get(e)),Ne=(e,t,a)=>t.has(e)?gx("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,a),xe=(e,t,a,r)=>(jm(e,t,"write to private field"),r?r.call(e,a):t.set(e,a),a),He=(e,t,a)=>(jm(e,t,"access private method"),a);var Lu=(e,t,a,r)=>({set _(l){xe(e,t,l,a)},get _(){return $(e,t,r)}});(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const l of document.querySelectorAll('link[rel="modulepreload"]'))r(l);new MutationObserver(l=>{for(const c of l)if(c.type==="childList")for(const u of c.addedNodes)u.tagName==="LINK"&&u.rel==="modulepreload"&&r(u)}).observe(document,{childList:!0,subtree:!0});function a(l){const c={};return l.integrity&&(c.integrity=l.integrity),l.referrerPolicy&&(c.referrerPolicy=l.referrerPolicy),l.crossOrigin==="use-credentials"?c.credentials="include":l.crossOrigin==="anonymous"?c.credentials="omit":c.credentials="same-origin",c}function r(l){if(l.ep)return;l.ep=!0;const c=a(l);fetch(l.href,c)}})();function cM(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Om={exports:{}},ys={};/**
|
|
2
|
+
* @license React
|
|
3
|
+
* react-jsx-runtime.production.js
|
|
4
|
+
*
|
|
5
|
+
* Copyright (c) Meta Platforms, Inc. and 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 yx;function uM(){if(yx)return ys;yx=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.fragment");function a(r,l,c){var u=null;if(c!==void 0&&(u=""+c),l.key!==void 0&&(u=""+l.key),"key"in l){c={};for(var m in l)m!=="key"&&(c[m]=l[m])}else c=l;return l=c.ref,{$$typeof:e,type:r,key:u,ref:l!==void 0?l:null,props:c}}return ys.Fragment=t,ys.jsx=a,ys.jsxs=a,ys}var bx;function dM(){return bx||(bx=1,Om.exports=uM()),Om.exports}var d=dM(),Am={exports:{}},qe={};/**
|
|
10
|
+
* @license React
|
|
11
|
+
* react.production.js
|
|
12
|
+
*
|
|
13
|
+
* Copyright (c) Meta Platforms, Inc. and 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 vx;function fM(){if(vx)return qe;vx=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.portal"),a=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),l=Symbol.for("react.profiler"),c=Symbol.for("react.consumer"),u=Symbol.for("react.context"),m=Symbol.for("react.forward_ref"),p=Symbol.for("react.suspense"),g=Symbol.for("react.memo"),b=Symbol.for("react.lazy"),v=Symbol.for("react.activity"),k=Symbol.iterator;function w(N){return N===null||typeof N!="object"?null:(N=k&&N[k]||N["@@iterator"],typeof N=="function"?N:null)}var j={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},E=Object.assign,_={};function C(N,q,I){this.props=N,this.context=q,this.refs=_,this.updater=I||j}C.prototype.isReactComponent={},C.prototype.setState=function(N,q){if(typeof N!="object"&&typeof N!="function"&&N!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,N,q,"setState")},C.prototype.forceUpdate=function(N){this.updater.enqueueForceUpdate(this,N,"forceUpdate")};function O(){}O.prototype=C.prototype;function A(N,q,I){this.props=N,this.context=q,this.refs=_,this.updater=I||j}var D=A.prototype=new O;D.constructor=A,E(D,C.prototype),D.isPureReactComponent=!0;var R=Array.isArray;function F(){}var L={H:null,A:null,T:null,S:null},T=Object.prototype.hasOwnProperty;function H(N,q,I){var P=I.ref;return{$$typeof:e,type:N,key:q,ref:P!==void 0?P:null,props:I}}function ne(N,q){return H(N.type,q,N.props)}function Y(N){return typeof N=="object"&&N!==null&&N.$$typeof===e}function le(N){var q={"=":"=0",":":"=2"};return"$"+N.replace(/[=:]/g,function(I){return q[I]})}var K=/\/+/g;function X(N,q){return typeof N=="object"&&N!==null&&N.key!=null?le(""+N.key):q.toString(36)}function ue(N){switch(N.status){case"fulfilled":return N.value;case"rejected":throw N.reason;default:switch(typeof N.status=="string"?N.then(F,F):(N.status="pending",N.then(function(q){N.status==="pending"&&(N.status="fulfilled",N.value=q)},function(q){N.status==="pending"&&(N.status="rejected",N.reason=q)})),N.status){case"fulfilled":return N.value;case"rejected":throw N.reason}}throw N}function M(N,q,I,P,ee){var pe=typeof N;(pe==="undefined"||pe==="boolean")&&(N=null);var se=!1;if(N===null)se=!0;else switch(pe){case"bigint":case"string":case"number":se=!0;break;case"object":switch(N.$$typeof){case e:case t:se=!0;break;case b:return se=N._init,M(se(N._payload),q,I,P,ee)}}if(se)return ee=ee(N),se=P===""?"."+X(N,0):P,R(ee)?(I="",se!=null&&(I=se.replace(K,"$&/")+"/"),M(ee,q,I,"",function(ce){return ce})):ee!=null&&(Y(ee)&&(ee=ne(ee,I+(ee.key==null||N&&N.key===ee.key?"":(""+ee.key).replace(K,"$&/")+"/")+se)),q.push(ee)),1;se=0;var ke=P===""?".":P+":";if(R(N))for(var z=0;z<N.length;z++)P=N[z],pe=ke+X(P,z),se+=M(P,q,I,pe,ee);else if(z=w(N),typeof z=="function")for(N=z.call(N),z=0;!(P=N.next()).done;)P=P.value,pe=ke+X(P,z++),se+=M(P,q,I,pe,ee);else if(pe==="object"){if(typeof N.then=="function")return M(ue(N),q,I,P,ee);throw q=String(N),Error("Objects are not valid as a React child (found: "+(q==="[object Object]"?"object with keys {"+Object.keys(N).join(", ")+"}":q)+"). If you meant to render a collection of children, use an array instead.")}return se}function V(N,q,I){if(N==null)return N;var P=[],ee=0;return M(N,P,"","",function(pe){return q.call(I,pe,ee++)}),P}function te(N){if(N._status===-1){var q=N._result;q=q(),q.then(function(I){(N._status===0||N._status===-1)&&(N._status=1,N._result=I)},function(I){(N._status===0||N._status===-1)&&(N._status=2,N._result=I)}),N._status===-1&&(N._status=0,N._result=q)}if(N._status===1)return N._result.default;throw N._result}var me=typeof reportError=="function"?reportError:function(N){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var q=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof N=="object"&&N!==null&&typeof N.message=="string"?String(N.message):String(N),error:N});if(!window.dispatchEvent(q))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",N);return}console.error(N)},Q={map:V,forEach:function(N,q,I){V(N,function(){q.apply(this,arguments)},I)},count:function(N){var q=0;return V(N,function(){q++}),q},toArray:function(N){return V(N,function(q){return q})||[]},only:function(N){if(!Y(N))throw Error("React.Children.only expected to receive a single React element child.");return N}};return qe.Activity=v,qe.Children=Q,qe.Component=C,qe.Fragment=a,qe.Profiler=l,qe.PureComponent=A,qe.StrictMode=r,qe.Suspense=p,qe.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=L,qe.__COMPILER_RUNTIME={__proto__:null,c:function(N){return L.H.useMemoCache(N)}},qe.cache=function(N){return function(){return N.apply(null,arguments)}},qe.cacheSignal=function(){return null},qe.cloneElement=function(N,q,I){if(N==null)throw Error("The argument must be a React element, but you passed "+N+".");var P=E({},N.props),ee=N.key;if(q!=null)for(pe in q.key!==void 0&&(ee=""+q.key),q)!T.call(q,pe)||pe==="key"||pe==="__self"||pe==="__source"||pe==="ref"&&q.ref===void 0||(P[pe]=q[pe]);var pe=arguments.length-2;if(pe===1)P.children=I;else if(1<pe){for(var se=Array(pe),ke=0;ke<pe;ke++)se[ke]=arguments[ke+2];P.children=se}return H(N.type,ee,P)},qe.createContext=function(N){return N={$$typeof:u,_currentValue:N,_currentValue2:N,_threadCount:0,Provider:null,Consumer:null},N.Provider=N,N.Consumer={$$typeof:c,_context:N},N},qe.createElement=function(N,q,I){var P,ee={},pe=null;if(q!=null)for(P in q.key!==void 0&&(pe=""+q.key),q)T.call(q,P)&&P!=="key"&&P!=="__self"&&P!=="__source"&&(ee[P]=q[P]);var se=arguments.length-2;if(se===1)ee.children=I;else if(1<se){for(var ke=Array(se),z=0;z<se;z++)ke[z]=arguments[z+2];ee.children=ke}if(N&&N.defaultProps)for(P in se=N.defaultProps,se)ee[P]===void 0&&(ee[P]=se[P]);return H(N,pe,ee)},qe.createRef=function(){return{current:null}},qe.forwardRef=function(N){return{$$typeof:m,render:N}},qe.isValidElement=Y,qe.lazy=function(N){return{$$typeof:b,_payload:{_status:-1,_result:N},_init:te}},qe.memo=function(N,q){return{$$typeof:g,type:N,compare:q===void 0?null:q}},qe.startTransition=function(N){var q=L.T,I={};L.T=I;try{var P=N(),ee=L.S;ee!==null&&ee(I,P),typeof P=="object"&&P!==null&&typeof P.then=="function"&&P.then(F,me)}catch(pe){me(pe)}finally{q!==null&&I.types!==null&&(q.types=I.types),L.T=q}},qe.unstable_useCacheRefresh=function(){return L.H.useCacheRefresh()},qe.use=function(N){return L.H.use(N)},qe.useActionState=function(N,q,I){return L.H.useActionState(N,q,I)},qe.useCallback=function(N,q){return L.H.useCallback(N,q)},qe.useContext=function(N){return L.H.useContext(N)},qe.useDebugValue=function(){},qe.useDeferredValue=function(N,q){return L.H.useDeferredValue(N,q)},qe.useEffect=function(N,q){return L.H.useEffect(N,q)},qe.useEffectEvent=function(N){return L.H.useEffectEvent(N)},qe.useId=function(){return L.H.useId()},qe.useImperativeHandle=function(N,q,I){return L.H.useImperativeHandle(N,q,I)},qe.useInsertionEffect=function(N,q){return L.H.useInsertionEffect(N,q)},qe.useLayoutEffect=function(N,q){return L.H.useLayoutEffect(N,q)},qe.useMemo=function(N,q){return L.H.useMemo(N,q)},qe.useOptimistic=function(N,q){return L.H.useOptimistic(N,q)},qe.useReducer=function(N,q,I){return L.H.useReducer(N,q,I)},qe.useRef=function(N){return L.H.useRef(N)},qe.useState=function(N){return L.H.useState(N)},qe.useSyncExternalStore=function(N,q,I){return L.H.useSyncExternalStore(N,q,I)},qe.useTransition=function(){return L.H.useTransition()},qe.version="19.2.6",qe}var xx;function ug(){return xx||(xx=1,Am.exports=fM()),Am.exports}var x=ug();const La=cM(x);var Nm={exports:{}},bs={},Mm={exports:{}},Cm={};/**
|
|
18
|
+
* @license React
|
|
19
|
+
* scheduler.production.js
|
|
20
|
+
*
|
|
21
|
+
* Copyright (c) Meta Platforms, Inc. and 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
|
+
*/var wx;function hM(){return wx||(wx=1,(function(e){function t(M,V){var te=M.length;M.push(V);e:for(;0<te;){var me=te-1>>>1,Q=M[me];if(0<l(Q,V))M[me]=V,M[te]=Q,te=me;else break e}}function a(M){return M.length===0?null:M[0]}function r(M){if(M.length===0)return null;var V=M[0],te=M.pop();if(te!==V){M[0]=te;e:for(var me=0,Q=M.length,N=Q>>>1;me<N;){var q=2*(me+1)-1,I=M[q],P=q+1,ee=M[P];if(0>l(I,te))P<Q&&0>l(ee,I)?(M[me]=ee,M[P]=te,me=P):(M[me]=I,M[q]=te,me=q);else if(P<Q&&0>l(ee,te))M[me]=ee,M[P]=te,me=P;else break e}}return V}function l(M,V){var te=M.sortIndex-V.sortIndex;return te!==0?te:M.id-V.id}if(e.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var c=performance;e.unstable_now=function(){return c.now()}}else{var u=Date,m=u.now();e.unstable_now=function(){return u.now()-m}}var p=[],g=[],b=1,v=null,k=3,w=!1,j=!1,E=!1,_=!1,C=typeof setTimeout=="function"?setTimeout:null,O=typeof clearTimeout=="function"?clearTimeout:null,A=typeof setImmediate<"u"?setImmediate:null;function D(M){for(var V=a(g);V!==null;){if(V.callback===null)r(g);else if(V.startTime<=M)r(g),V.sortIndex=V.expirationTime,t(p,V);else break;V=a(g)}}function R(M){if(E=!1,D(M),!j)if(a(p)!==null)j=!0,F||(F=!0,le());else{var V=a(g);V!==null&&ue(R,V.startTime-M)}}var F=!1,L=-1,T=5,H=-1;function ne(){return _?!0:!(e.unstable_now()-H<T)}function Y(){if(_=!1,F){var M=e.unstable_now();H=M;var V=!0;try{e:{j=!1,E&&(E=!1,O(L),L=-1),w=!0;var te=k;try{t:{for(D(M),v=a(p);v!==null&&!(v.expirationTime>M&&ne());){var me=v.callback;if(typeof me=="function"){v.callback=null,k=v.priorityLevel;var Q=me(v.expirationTime<=M);if(M=e.unstable_now(),typeof Q=="function"){v.callback=Q,D(M),V=!0;break t}v===a(p)&&r(p),D(M)}else r(p);v=a(p)}if(v!==null)V=!0;else{var N=a(g);N!==null&&ue(R,N.startTime-M),V=!1}}break e}finally{v=null,k=te,w=!1}V=void 0}}finally{V?le():F=!1}}}var le;if(typeof A=="function")le=function(){A(Y)};else if(typeof MessageChannel<"u"){var K=new MessageChannel,X=K.port2;K.port1.onmessage=Y,le=function(){X.postMessage(null)}}else le=function(){C(Y,0)};function ue(M,V){L=C(function(){M(e.unstable_now())},V)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(M){M.callback=null},e.unstable_forceFrameRate=function(M){0>M||125<M?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):T=0<M?Math.floor(1e3/M):5},e.unstable_getCurrentPriorityLevel=function(){return k},e.unstable_next=function(M){switch(k){case 1:case 2:case 3:var V=3;break;default:V=k}var te=k;k=V;try{return M()}finally{k=te}},e.unstable_requestPaint=function(){_=!0},e.unstable_runWithPriority=function(M,V){switch(M){case 1:case 2:case 3:case 4:case 5:break;default:M=3}var te=k;k=M;try{return V()}finally{k=te}},e.unstable_scheduleCallback=function(M,V,te){var me=e.unstable_now();switch(typeof te=="object"&&te!==null?(te=te.delay,te=typeof te=="number"&&0<te?me+te:me):te=me,M){case 1:var Q=-1;break;case 2:Q=250;break;case 5:Q=1073741823;break;case 4:Q=1e4;break;default:Q=5e3}return Q=te+Q,M={id:b++,callback:V,priorityLevel:M,startTime:te,expirationTime:Q,sortIndex:-1},te>me?(M.sortIndex=te,t(g,M),a(p)===null&&M===a(g)&&(E?(O(L),L=-1):E=!0,ue(R,te-me))):(M.sortIndex=Q,t(p,M),j||w||(j=!0,F||(F=!0,le()))),M},e.unstable_shouldYield=ne,e.unstable_wrapCallback=function(M){var V=k;return function(){var te=k;k=V;try{return M.apply(this,arguments)}finally{k=te}}}})(Cm)),Cm}var kx;function mM(){return kx||(kx=1,Mm.exports=hM()),Mm.exports}var Rm={exports:{}},ln={};/**
|
|
26
|
+
* @license React
|
|
27
|
+
* react-dom.production.js
|
|
28
|
+
*
|
|
29
|
+
* Copyright (c) Meta Platforms, Inc. and 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 Sx;function pM(){if(Sx)return ln;Sx=1;var e=ug();function t(p){var g="https://react.dev/errors/"+p;if(1<arguments.length){g+="?args[]="+encodeURIComponent(arguments[1]);for(var b=2;b<arguments.length;b++)g+="&args[]="+encodeURIComponent(arguments[b])}return"Minified React error #"+p+"; visit "+g+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function a(){}var r={d:{f:a,r:function(){throw Error(t(522))},D:a,C:a,L:a,m:a,X:a,S:a,M:a},p:0,findDOMNode:null},l=Symbol.for("react.portal");function c(p,g,b){var v=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:l,key:v==null?null:""+v,children:p,containerInfo:g,implementation:b}}var u=e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function m(p,g){if(p==="font")return"";if(typeof g=="string")return g==="use-credentials"?g:""}return ln.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=r,ln.createPortal=function(p,g){var b=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!g||g.nodeType!==1&&g.nodeType!==9&&g.nodeType!==11)throw Error(t(299));return c(p,g,null,b)},ln.flushSync=function(p){var g=u.T,b=r.p;try{if(u.T=null,r.p=2,p)return p()}finally{u.T=g,r.p=b,r.d.f()}},ln.preconnect=function(p,g){typeof p=="string"&&(g?(g=g.crossOrigin,g=typeof g=="string"?g==="use-credentials"?g:"":void 0):g=null,r.d.C(p,g))},ln.prefetchDNS=function(p){typeof p=="string"&&r.d.D(p)},ln.preinit=function(p,g){if(typeof p=="string"&&g&&typeof g.as=="string"){var b=g.as,v=m(b,g.crossOrigin),k=typeof g.integrity=="string"?g.integrity:void 0,w=typeof g.fetchPriority=="string"?g.fetchPriority:void 0;b==="style"?r.d.S(p,typeof g.precedence=="string"?g.precedence:void 0,{crossOrigin:v,integrity:k,fetchPriority:w}):b==="script"&&r.d.X(p,{crossOrigin:v,integrity:k,fetchPriority:w,nonce:typeof g.nonce=="string"?g.nonce:void 0})}},ln.preinitModule=function(p,g){if(typeof p=="string")if(typeof g=="object"&&g!==null){if(g.as==null||g.as==="script"){var b=m(g.as,g.crossOrigin);r.d.M(p,{crossOrigin:b,integrity:typeof g.integrity=="string"?g.integrity:void 0,nonce:typeof g.nonce=="string"?g.nonce:void 0})}}else g==null&&r.d.M(p)},ln.preload=function(p,g){if(typeof p=="string"&&typeof g=="object"&&g!==null&&typeof g.as=="string"){var b=g.as,v=m(b,g.crossOrigin);r.d.L(p,b,{crossOrigin:v,integrity:typeof g.integrity=="string"?g.integrity:void 0,nonce:typeof g.nonce=="string"?g.nonce:void 0,type:typeof g.type=="string"?g.type:void 0,fetchPriority:typeof g.fetchPriority=="string"?g.fetchPriority:void 0,referrerPolicy:typeof g.referrerPolicy=="string"?g.referrerPolicy:void 0,imageSrcSet:typeof g.imageSrcSet=="string"?g.imageSrcSet:void 0,imageSizes:typeof g.imageSizes=="string"?g.imageSizes:void 0,media:typeof g.media=="string"?g.media:void 0})}},ln.preloadModule=function(p,g){if(typeof p=="string")if(g){var b=m(g.as,g.crossOrigin);r.d.m(p,{as:typeof g.as=="string"&&g.as!=="script"?g.as:void 0,crossOrigin:b,integrity:typeof g.integrity=="string"?g.integrity:void 0})}else r.d.m(p)},ln.requestFormReset=function(p){r.d.r(p)},ln.unstable_batchedUpdates=function(p,g){return p(g)},ln.useFormState=function(p,g,b){return u.H.useFormState(p,g,b)},ln.useFormStatus=function(){return u.H.useHostTransitionStatus()},ln.version="19.2.6",ln}var Ex;function k2(){if(Ex)return Rm.exports;Ex=1;function e(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}return e(),Rm.exports=pM(),Rm.exports}/**
|
|
34
|
+
* @license React
|
|
35
|
+
* react-dom-client.production.js
|
|
36
|
+
*
|
|
37
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
38
|
+
*
|
|
39
|
+
* This source code is licensed under the MIT license found in the
|
|
40
|
+
* LICENSE file in the root directory of this source tree.
|
|
41
|
+
*/var _x;function gM(){if(_x)return bs;_x=1;var e=mM(),t=ug(),a=k2();function r(n){var i="https://react.dev/errors/"+n;if(1<arguments.length){i+="?args[]="+encodeURIComponent(arguments[1]);for(var o=2;o<arguments.length;o++)i+="&args[]="+encodeURIComponent(arguments[o])}return"Minified React error #"+n+"; visit "+i+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function l(n){return!(!n||n.nodeType!==1&&n.nodeType!==9&&n.nodeType!==11)}function c(n){var i=n,o=n;if(n.alternate)for(;i.return;)i=i.return;else{n=i;do i=n,(i.flags&4098)!==0&&(o=i.return),n=i.return;while(n)}return i.tag===3?o:null}function u(n){if(n.tag===13){var i=n.memoizedState;if(i===null&&(n=n.alternate,n!==null&&(i=n.memoizedState)),i!==null)return i.dehydrated}return null}function m(n){if(n.tag===31){var i=n.memoizedState;if(i===null&&(n=n.alternate,n!==null&&(i=n.memoizedState)),i!==null)return i.dehydrated}return null}function p(n){if(c(n)!==n)throw Error(r(188))}function g(n){var i=n.alternate;if(!i){if(i=c(n),i===null)throw Error(r(188));return i!==n?null:n}for(var o=n,s=i;;){var f=o.return;if(f===null)break;var h=f.alternate;if(h===null){if(s=f.return,s!==null){o=s;continue}break}if(f.child===h.child){for(h=f.child;h;){if(h===o)return p(f),n;if(h===s)return p(f),i;h=h.sibling}throw Error(r(188))}if(o.return!==s.return)o=f,s=h;else{for(var y=!1,S=f.child;S;){if(S===o){y=!0,o=f,s=h;break}if(S===s){y=!0,s=f,o=h;break}S=S.sibling}if(!y){for(S=h.child;S;){if(S===o){y=!0,o=h,s=f;break}if(S===s){y=!0,s=h,o=f;break}S=S.sibling}if(!y)throw Error(r(189))}}if(o.alternate!==s)throw Error(r(190))}if(o.tag!==3)throw Error(r(188));return o.stateNode.current===o?n:i}function b(n){var i=n.tag;if(i===5||i===26||i===27||i===6)return n;for(n=n.child;n!==null;){if(i=b(n),i!==null)return i;n=n.sibling}return null}var v=Object.assign,k=Symbol.for("react.element"),w=Symbol.for("react.transitional.element"),j=Symbol.for("react.portal"),E=Symbol.for("react.fragment"),_=Symbol.for("react.strict_mode"),C=Symbol.for("react.profiler"),O=Symbol.for("react.consumer"),A=Symbol.for("react.context"),D=Symbol.for("react.forward_ref"),R=Symbol.for("react.suspense"),F=Symbol.for("react.suspense_list"),L=Symbol.for("react.memo"),T=Symbol.for("react.lazy"),H=Symbol.for("react.activity"),ne=Symbol.for("react.memo_cache_sentinel"),Y=Symbol.iterator;function le(n){return n===null||typeof n!="object"?null:(n=Y&&n[Y]||n["@@iterator"],typeof n=="function"?n:null)}var K=Symbol.for("react.client.reference");function X(n){if(n==null)return null;if(typeof n=="function")return n.$$typeof===K?null:n.displayName||n.name||null;if(typeof n=="string")return n;switch(n){case E:return"Fragment";case C:return"Profiler";case _:return"StrictMode";case R:return"Suspense";case F:return"SuspenseList";case H:return"Activity"}if(typeof n=="object")switch(n.$$typeof){case j:return"Portal";case A:return n.displayName||"Context";case O:return(n._context.displayName||"Context")+".Consumer";case D:var i=n.render;return n=n.displayName,n||(n=i.displayName||i.name||"",n=n!==""?"ForwardRef("+n+")":"ForwardRef"),n;case L:return i=n.displayName||null,i!==null?i:X(n.type)||"Memo";case T:i=n._payload,n=n._init;try{return X(n(i))}catch{}}return null}var ue=Array.isArray,M=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,V=a.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,te={pending:!1,data:null,method:null,action:null},me=[],Q=-1;function N(n){return{current:n}}function q(n){0>Q||(n.current=me[Q],me[Q]=null,Q--)}function I(n,i){Q++,me[Q]=n.current,n.current=i}var P=N(null),ee=N(null),pe=N(null),se=N(null);function ke(n,i){switch(I(pe,i),I(ee,n),I(P,null),i.nodeType){case 9:case 11:n=(n=i.documentElement)&&(n=n.namespaceURI)?I1(n):0;break;default:if(n=i.tagName,i=i.namespaceURI)i=I1(i),n=H1(i,n);else switch(n){case"svg":n=1;break;case"math":n=2;break;default:n=0}}q(P),I(P,n)}function z(){q(P),q(ee),q(pe)}function ce(n){n.memoizedState!==null&&I(se,n);var i=P.current,o=H1(i,n.type);i!==o&&(I(ee,n),I(P,o))}function ge(n){ee.current===n&&(q(P),q(ee)),se.current===n&&(q(se),hs._currentValue=te)}var Ee,Ue;function Le(n){if(Ee===void 0)try{throw Error()}catch(o){var i=o.stack.trim().match(/\n( *(at )?)/);Ee=i&&i[1]||"",Ue=-1<o.stack.indexOf(`
|
|
42
|
+
at`)?" (<anonymous>)":-1<o.stack.indexOf("@")?"@unknown:0:0":""}return`
|
|
43
|
+
`+Ee+n+Ue}var ye=!1;function Re(n,i){if(!n||ye)return"";ye=!0;var o=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var s={DetermineComponentFrameRoot:function(){try{if(i){var he=function(){throw Error()};if(Object.defineProperty(he.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(he,[])}catch(oe){var J=oe}Reflect.construct(n,[],he)}else{try{he.call()}catch(oe){J=oe}n.call(he.prototype)}}else{try{throw Error()}catch(oe){J=oe}(he=n())&&typeof he.catch=="function"&&he.catch(function(){})}}catch(oe){if(oe&&J&&typeof oe.stack=="string")return[oe.stack,J.stack]}return[null,null]}};s.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var f=Object.getOwnPropertyDescriptor(s.DetermineComponentFrameRoot,"name");f&&f.configurable&&Object.defineProperty(s.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var h=s.DetermineComponentFrameRoot(),y=h[0],S=h[1];if(y&&S){var U=y.split(`
|
|
44
|
+
`),W=S.split(`
|
|
45
|
+
`);for(f=s=0;s<U.length&&!U[s].includes("DetermineComponentFrameRoot");)s++;for(;f<W.length&&!W[f].includes("DetermineComponentFrameRoot");)f++;if(s===U.length||f===W.length)for(s=U.length-1,f=W.length-1;1<=s&&0<=f&&U[s]!==W[f];)f--;for(;1<=s&&0<=f;s--,f--)if(U[s]!==W[f]){if(s!==1||f!==1)do if(s--,f--,0>f||U[s]!==W[f]){var de=`
|
|
46
|
+
`+U[s].replace(" at new "," at ");return n.displayName&&de.includes("<anonymous>")&&(de=de.replace("<anonymous>",n.displayName)),de}while(1<=s&&0<=f);break}}}finally{ye=!1,Error.prepareStackTrace=o}return(o=n?n.displayName||n.name:"")?Le(o):""}function ht(n,i){switch(n.tag){case 26:case 27:case 5:return Le(n.type);case 16:return Le("Lazy");case 13:return n.child!==i&&i!==null?Le("Suspense Fallback"):Le("Suspense");case 19:return Le("SuspenseList");case 0:case 15:return Re(n.type,!1);case 11:return Re(n.type.render,!1);case 1:return Re(n.type,!0);case 31:return Le("Activity");default:return""}}function $e(n){try{var i="",o=null;do i+=ht(n,o),o=n,n=n.return;while(n);return i}catch(s){return`
|
|
47
|
+
Error generating stack: `+s.message+`
|
|
48
|
+
`+s.stack}}var Lt=Object.prototype.hasOwnProperty,st=e.unstable_scheduleCallback,Bn=e.unstable_cancelCallback,On=e.unstable_shouldYield,cn=e.unstable_requestPaint,yt=e.unstable_now,Wi=e.unstable_getCurrentPriorityLevel,ci=e.unstable_ImmediatePriority,ti=e.unstable_UserBlockingPriority,we=e.unstable_NormalPriority,Te=e.unstable_LowPriority,Ce=e.unstable_IdlePriority,Xe=e.log,at=e.unstable_setDisableYieldValue,Vt=null,ut=null;function ie(n){if(typeof Xe=="function"&&at(n),ut&&typeof ut.setStrictMode=="function")try{ut.setStrictMode(Vt,n)}catch{}}var be=Math.clz32?Math.clz32:Ge,Oe=Math.log,ze=Math.LN2;function Ge(n){return n>>>=0,n===0?32:31-(Oe(n)/ze|0)|0}var Be=256,kt=262144,jt=4194304;function St(n){var i=n&42;if(i!==0)return i;switch(n&-n){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return n&261888;case 262144:case 524288:case 1048576:case 2097152:return n&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return n&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return n}}function Bt(n,i,o){var s=n.pendingLanes;if(s===0)return 0;var f=0,h=n.suspendedLanes,y=n.pingedLanes;n=n.warmLanes;var S=s&134217727;return S!==0?(s=S&~h,s!==0?f=St(s):(y&=S,y!==0?f=St(y):o||(o=S&~n,o!==0&&(f=St(o))))):(S=s&~h,S!==0?f=St(S):y!==0?f=St(y):o||(o=s&~n,o!==0&&(f=St(o)))),f===0?0:i!==0&&i!==f&&(i&h)===0&&(h=f&-f,o=i&-i,h>=o||h===32&&(o&4194048)!==0)?i:f}function Gt(n,i){return(n.pendingLanes&~(n.suspendedLanes&~n.pingedLanes)&i)===0}function Kt(n,i){switch(n){case 1:case 2:case 4:case 8:case 64:return i+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return i+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function An(){var n=jt;return jt<<=1,(jt&62914560)===0&&(jt=4194304),n}function Si(n){for(var i=[],o=0;31>o;o++)i.push(n);return i}function ni(n,i){n.pendingLanes|=i,i!==268435456&&(n.suspendedLanes=0,n.pingedLanes=0,n.warmLanes=0)}function ui(n,i,o,s,f,h){var y=n.pendingLanes;n.pendingLanes=o,n.suspendedLanes=0,n.pingedLanes=0,n.warmLanes=0,n.expiredLanes&=o,n.entangledLanes&=o,n.errorRecoveryDisabledLanes&=o,n.shellSuspendCounter=0;var S=n.entanglements,U=n.expirationTimes,W=n.hiddenUpdates;for(o=y&~o;0<o;){var de=31-be(o),he=1<<de;S[de]=0,U[de]=-1;var J=W[de];if(J!==null)for(W[de]=null,de=0;de<J.length;de++){var oe=J[de];oe!==null&&(oe.lane&=-536870913)}o&=~he}s!==0&&Qr(n,s,0),h!==0&&f===0&&n.tag!==0&&(n.suspendedLanes|=h&~(y&~i))}function Qr(n,i,o){n.pendingLanes|=i,n.suspendedLanes&=~i;var s=31-be(i);n.entangledLanes|=i,n.entanglements[s]=n.entanglements[s]|1073741824|o&261930}function kc(n,i){var o=n.entangledLanes|=i;for(n=n.entanglements;o;){var s=31-be(o),f=1<<s;f&i|n[s]&i&&(n[s]|=i),o&=~f}}function re(n,i){var o=i&-i;return o=(o&42)!==0?1:Se(o),(o&(n.suspendedLanes|i))!==0?0:o}function Se(n){switch(n){case 2:n=1;break;case 8:n=4;break;case 32:n=16;break;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:n=128;break;case 268435456:n=134217728;break;default:n=0}return n}function Pe(n){return n&=-n,2<n?8<n?(n&134217727)!==0?32:268435456:8:2}function At(){var n=V.p;return n!==0?n:(n=window.event,n===void 0?32:cx(n.type))}function nt(n,i){var o=V.p;try{return V.p=n,i()}finally{V.p=o}}var qn=Math.random().toString(36).slice(2),Ot="__reactFiber$"+qn,gn="__reactProps$"+qn,Xr="__reactContainer$"+qn,yf="__reactEvents$"+qn,WO="__reactListeners$"+qn,JO="__reactHandles$"+qn,jb="__reactResources$"+qn,Al="__reactMarker$"+qn;function bf(n){delete n[Ot],delete n[gn],delete n[yf],delete n[WO],delete n[JO]}function Zr(n){var i=n[Ot];if(i)return i;for(var o=n.parentNode;o;){if(i=o[Xr]||o[Ot]){if(o=i.alternate,i.child!==null||o!==null&&o.child!==null)for(n=K1(n);n!==null;){if(o=n[Ot])return o;n=K1(n)}return i}n=o,o=n.parentNode}return null}function Wr(n){if(n=n[Ot]||n[Xr]){var i=n.tag;if(i===5||i===6||i===13||i===31||i===26||i===27||i===3)return n}return null}function Nl(n){var i=n.tag;if(i===5||i===26||i===27||i===6)return n.stateNode;throw Error(r(33))}function Jr(n){var i=n[jb];return i||(i=n[jb]={hoistableStyles:new Map,hoistableScripts:new Map}),i}function Yt(n){n[Al]=!0}var Ob=new Set,Ab={};function ir(n,i){eo(n,i),eo(n+"Capture",i)}function eo(n,i){for(Ab[n]=i,n=0;n<i.length;n++)Ob.add(i[n])}var eA=RegExp("^[: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]*$"),Nb={},Mb={};function tA(n){return Lt.call(Mb,n)?!0:Lt.call(Nb,n)?!1:eA.test(n)?Mb[n]=!0:(Nb[n]=!0,!1)}function Sc(n,i,o){if(tA(i))if(o===null)n.removeAttribute(i);else{switch(typeof o){case"undefined":case"function":case"symbol":n.removeAttribute(i);return;case"boolean":var s=i.toLowerCase().slice(0,5);if(s!=="data-"&&s!=="aria-"){n.removeAttribute(i);return}}n.setAttribute(i,""+o)}}function Ec(n,i,o){if(o===null)n.removeAttribute(i);else{switch(typeof o){case"undefined":case"function":case"symbol":case"boolean":n.removeAttribute(i);return}n.setAttribute(i,""+o)}}function Ei(n,i,o,s){if(s===null)n.removeAttribute(o);else{switch(typeof s){case"undefined":case"function":case"symbol":case"boolean":n.removeAttribute(o);return}n.setAttributeNS(i,o,""+s)}}function Fn(n){switch(typeof n){case"bigint":case"boolean":case"number":case"string":case"undefined":return n;case"object":return n;default:return""}}function Cb(n){var i=n.type;return(n=n.nodeName)&&n.toLowerCase()==="input"&&(i==="checkbox"||i==="radio")}function nA(n,i,o){var s=Object.getOwnPropertyDescriptor(n.constructor.prototype,i);if(!n.hasOwnProperty(i)&&typeof s<"u"&&typeof s.get=="function"&&typeof s.set=="function"){var f=s.get,h=s.set;return Object.defineProperty(n,i,{configurable:!0,get:function(){return f.call(this)},set:function(y){o=""+y,h.call(this,y)}}),Object.defineProperty(n,i,{enumerable:s.enumerable}),{getValue:function(){return o},setValue:function(y){o=""+y},stopTracking:function(){n._valueTracker=null,delete n[i]}}}}function vf(n){if(!n._valueTracker){var i=Cb(n)?"checked":"value";n._valueTracker=nA(n,i,""+n[i])}}function Rb(n){if(!n)return!1;var i=n._valueTracker;if(!i)return!0;var o=i.getValue(),s="";return n&&(s=Cb(n)?n.checked?"true":"false":n.value),n=s,n!==o?(i.setValue(n),!0):!1}function _c(n){if(n=n||(typeof document<"u"?document:void 0),typeof n>"u")return null;try{return n.activeElement||n.body}catch{return n.body}}var iA=/[\n"\\]/g;function Pn(n){return n.replace(iA,function(i){return"\\"+i.charCodeAt(0).toString(16)+" "})}function xf(n,i,o,s,f,h,y,S){n.name="",y!=null&&typeof y!="function"&&typeof y!="symbol"&&typeof y!="boolean"?n.type=y:n.removeAttribute("type"),i!=null?y==="number"?(i===0&&n.value===""||n.value!=i)&&(n.value=""+Fn(i)):n.value!==""+Fn(i)&&(n.value=""+Fn(i)):y!=="submit"&&y!=="reset"||n.removeAttribute("value"),i!=null?wf(n,y,Fn(i)):o!=null?wf(n,y,Fn(o)):s!=null&&n.removeAttribute("value"),f==null&&h!=null&&(n.defaultChecked=!!h),f!=null&&(n.checked=f&&typeof f!="function"&&typeof f!="symbol"),S!=null&&typeof S!="function"&&typeof S!="symbol"&&typeof S!="boolean"?n.name=""+Fn(S):n.removeAttribute("name")}function Tb(n,i,o,s,f,h,y,S){if(h!=null&&typeof h!="function"&&typeof h!="symbol"&&typeof h!="boolean"&&(n.type=h),i!=null||o!=null){if(!(h!=="submit"&&h!=="reset"||i!=null)){vf(n);return}o=o!=null?""+Fn(o):"",i=i!=null?""+Fn(i):o,S||i===n.value||(n.value=i),n.defaultValue=i}s=s??f,s=typeof s!="function"&&typeof s!="symbol"&&!!s,n.checked=S?n.checked:!!s,n.defaultChecked=!!s,y!=null&&typeof y!="function"&&typeof y!="symbol"&&typeof y!="boolean"&&(n.name=y),vf(n)}function wf(n,i,o){i==="number"&&_c(n.ownerDocument)===n||n.defaultValue===""+o||(n.defaultValue=""+o)}function to(n,i,o,s){if(n=n.options,i){i={};for(var f=0;f<o.length;f++)i["$"+o[f]]=!0;for(o=0;o<n.length;o++)f=i.hasOwnProperty("$"+n[o].value),n[o].selected!==f&&(n[o].selected=f),f&&s&&(n[o].defaultSelected=!0)}else{for(o=""+Fn(o),i=null,f=0;f<n.length;f++){if(n[f].value===o){n[f].selected=!0,s&&(n[f].defaultSelected=!0);return}i!==null||n[f].disabled||(i=n[f])}i!==null&&(i.selected=!0)}}function Db(n,i,o){if(i!=null&&(i=""+Fn(i),i!==n.value&&(n.value=i),o==null)){n.defaultValue!==i&&(n.defaultValue=i);return}n.defaultValue=o!=null?""+Fn(o):""}function Lb(n,i,o,s){if(i==null){if(s!=null){if(o!=null)throw Error(r(92));if(ue(s)){if(1<s.length)throw Error(r(93));s=s[0]}o=s}o==null&&(o=""),i=o}o=Fn(i),n.defaultValue=o,s=n.textContent,s===o&&s!==""&&s!==null&&(n.value=s),vf(n)}function no(n,i){if(i){var o=n.firstChild;if(o&&o===n.lastChild&&o.nodeType===3){o.nodeValue=i;return}}n.textContent=i}var aA=new Set("animationIterationCount aspectRatio borderImageOutset borderImageSlice borderImageWidth boxFlex boxFlexGroup boxOrdinalGroup columnCount columns flex flexGrow flexPositive flexShrink flexNegative flexOrder gridArea gridRow gridRowEnd gridRowSpan gridRowStart gridColumn gridColumnEnd gridColumnSpan gridColumnStart fontWeight lineClamp lineHeight opacity order orphans scale tabSize widows zIndex zoom fillOpacity floodOpacity stopOpacity strokeDasharray strokeDashoffset strokeMiterlimit strokeOpacity strokeWidth MozAnimationIterationCount MozBoxFlex MozBoxFlexGroup MozLineClamp msAnimationIterationCount msFlex msZoom msFlexGrow msFlexNegative msFlexOrder msFlexPositive msFlexShrink msGridColumn msGridColumnSpan msGridRow msGridRowSpan WebkitAnimationIterationCount WebkitBoxFlex WebKitBoxFlexGroup WebkitBoxOrdinalGroup WebkitColumnCount WebkitColumns WebkitFlex WebkitFlexGrow WebkitFlexPositive WebkitFlexShrink WebkitLineClamp".split(" "));function zb(n,i,o){var s=i.indexOf("--")===0;o==null||typeof o=="boolean"||o===""?s?n.setProperty(i,""):i==="float"?n.cssFloat="":n[i]="":s?n.setProperty(i,o):typeof o!="number"||o===0||aA.has(i)?i==="float"?n.cssFloat=o:n[i]=(""+o).trim():n[i]=o+"px"}function $b(n,i,o){if(i!=null&&typeof i!="object")throw Error(r(62));if(n=n.style,o!=null){for(var s in o)!o.hasOwnProperty(s)||i!=null&&i.hasOwnProperty(s)||(s.indexOf("--")===0?n.setProperty(s,""):s==="float"?n.cssFloat="":n[s]="");for(var f in i)s=i[f],i.hasOwnProperty(f)&&o[f]!==s&&zb(n,f,s)}else for(var h in i)i.hasOwnProperty(h)&&zb(n,h,i[h])}function kf(n){if(n.indexOf("-")===-1)return!1;switch(n){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 rA=new Map([["acceptCharset","accept-charset"],["htmlFor","for"],["httpEquiv","http-equiv"],["crossOrigin","crossorigin"],["accentHeight","accent-height"],["alignmentBaseline","alignment-baseline"],["arabicForm","arabic-form"],["baselineShift","baseline-shift"],["capHeight","cap-height"],["clipPath","clip-path"],["clipRule","clip-rule"],["colorInterpolation","color-interpolation"],["colorInterpolationFilters","color-interpolation-filters"],["colorProfile","color-profile"],["colorRendering","color-rendering"],["dominantBaseline","dominant-baseline"],["enableBackground","enable-background"],["fillOpacity","fill-opacity"],["fillRule","fill-rule"],["floodColor","flood-color"],["floodOpacity","flood-opacity"],["fontFamily","font-family"],["fontSize","font-size"],["fontSizeAdjust","font-size-adjust"],["fontStretch","font-stretch"],["fontStyle","font-style"],["fontVariant","font-variant"],["fontWeight","font-weight"],["glyphName","glyph-name"],["glyphOrientationHorizontal","glyph-orientation-horizontal"],["glyphOrientationVertical","glyph-orientation-vertical"],["horizAdvX","horiz-adv-x"],["horizOriginX","horiz-origin-x"],["imageRendering","image-rendering"],["letterSpacing","letter-spacing"],["lightingColor","lighting-color"],["markerEnd","marker-end"],["markerMid","marker-mid"],["markerStart","marker-start"],["overlinePosition","overline-position"],["overlineThickness","overline-thickness"],["paintOrder","paint-order"],["panose-1","panose-1"],["pointerEvents","pointer-events"],["renderingIntent","rendering-intent"],["shapeRendering","shape-rendering"],["stopColor","stop-color"],["stopOpacity","stop-opacity"],["strikethroughPosition","strikethrough-position"],["strikethroughThickness","strikethrough-thickness"],["strokeDasharray","stroke-dasharray"],["strokeDashoffset","stroke-dashoffset"],["strokeLinecap","stroke-linecap"],["strokeLinejoin","stroke-linejoin"],["strokeMiterlimit","stroke-miterlimit"],["strokeOpacity","stroke-opacity"],["strokeWidth","stroke-width"],["textAnchor","text-anchor"],["textDecoration","text-decoration"],["textRendering","text-rendering"],["transformOrigin","transform-origin"],["underlinePosition","underline-position"],["underlineThickness","underline-thickness"],["unicodeBidi","unicode-bidi"],["unicodeRange","unicode-range"],["unitsPerEm","units-per-em"],["vAlphabetic","v-alphabetic"],["vHanging","v-hanging"],["vIdeographic","v-ideographic"],["vMathematical","v-mathematical"],["vectorEffect","vector-effect"],["vertAdvY","vert-adv-y"],["vertOriginX","vert-origin-x"],["vertOriginY","vert-origin-y"],["wordSpacing","word-spacing"],["writingMode","writing-mode"],["xmlnsXlink","xmlns:xlink"],["xHeight","x-height"]]),oA=/^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*:/i;function jc(n){return oA.test(""+n)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":n}function _i(){}var Sf=null;function Ef(n){return n=n.target||n.srcElement||window,n.correspondingUseElement&&(n=n.correspondingUseElement),n.nodeType===3?n.parentNode:n}var io=null,ao=null;function Ub(n){var i=Wr(n);if(i&&(n=i.stateNode)){var o=n[gn]||null;e:switch(n=i.stateNode,i.type){case"input":if(xf(n,o.value,o.defaultValue,o.defaultValue,o.checked,o.defaultChecked,o.type,o.name),i=o.name,o.type==="radio"&&i!=null){for(o=n;o.parentNode;)o=o.parentNode;for(o=o.querySelectorAll('input[name="'+Pn(""+i)+'"][type="radio"]'),i=0;i<o.length;i++){var s=o[i];if(s!==n&&s.form===n.form){var f=s[gn]||null;if(!f)throw Error(r(90));xf(s,f.value,f.defaultValue,f.defaultValue,f.checked,f.defaultChecked,f.type,f.name)}}for(i=0;i<o.length;i++)s=o[i],s.form===n.form&&Rb(s)}break e;case"textarea":Db(n,o.value,o.defaultValue);break e;case"select":i=o.value,i!=null&&to(n,!!o.multiple,i,!1)}}}var _f=!1;function Ib(n,i,o){if(_f)return n(i,o);_f=!0;try{var s=n(i);return s}finally{if(_f=!1,(io!==null||ao!==null)&&(hu(),io&&(i=io,n=ao,ao=io=null,Ub(i),n)))for(i=0;i<n.length;i++)Ub(n[i])}}function Ml(n,i){var o=n.stateNode;if(o===null)return null;var s=o[gn]||null;if(s===null)return null;o=s[i];e:switch(i){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(s=!s.disabled)||(n=n.type,s=!(n==="button"||n==="input"||n==="select"||n==="textarea")),n=!s;break e;default:n=!1}if(n)return null;if(o&&typeof o!="function")throw Error(r(231,i,typeof o));return o}var ji=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),jf=!1;if(ji)try{var Cl={};Object.defineProperty(Cl,"passive",{get:function(){jf=!0}}),window.addEventListener("test",Cl,Cl),window.removeEventListener("test",Cl,Cl)}catch{jf=!1}var Ji=null,Of=null,Oc=null;function Hb(){if(Oc)return Oc;var n,i=Of,o=i.length,s,f="value"in Ji?Ji.value:Ji.textContent,h=f.length;for(n=0;n<o&&i[n]===f[n];n++);var y=o-n;for(s=1;s<=y&&i[o-s]===f[h-s];s++);return Oc=f.slice(n,1<s?1-s:void 0)}function Ac(n){var i=n.keyCode;return"charCode"in n?(n=n.charCode,n===0&&i===13&&(n=13)):n=i,n===10&&(n=13),32<=n||n===13?n:0}function Nc(){return!0}function Bb(){return!1}function yn(n){function i(o,s,f,h,y){this._reactName=o,this._targetInst=f,this.type=s,this.nativeEvent=h,this.target=y,this.currentTarget=null;for(var S in n)n.hasOwnProperty(S)&&(o=n[S],this[S]=o?o(h):h[S]);return this.isDefaultPrevented=(h.defaultPrevented!=null?h.defaultPrevented:h.returnValue===!1)?Nc:Bb,this.isPropagationStopped=Bb,this}return v(i.prototype,{preventDefault:function(){this.defaultPrevented=!0;var o=this.nativeEvent;o&&(o.preventDefault?o.preventDefault():typeof o.returnValue!="unknown"&&(o.returnValue=!1),this.isDefaultPrevented=Nc)},stopPropagation:function(){var o=this.nativeEvent;o&&(o.stopPropagation?o.stopPropagation():typeof o.cancelBubble!="unknown"&&(o.cancelBubble=!0),this.isPropagationStopped=Nc)},persist:function(){},isPersistent:Nc}),i}var ar={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(n){return n.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Mc=yn(ar),Rl=v({},ar,{view:0,detail:0}),lA=yn(Rl),Af,Nf,Tl,Cc=v({},Rl,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Cf,button:0,buttons:0,relatedTarget:function(n){return n.relatedTarget===void 0?n.fromElement===n.srcElement?n.toElement:n.fromElement:n.relatedTarget},movementX:function(n){return"movementX"in n?n.movementX:(n!==Tl&&(Tl&&n.type==="mousemove"?(Af=n.screenX-Tl.screenX,Nf=n.screenY-Tl.screenY):Nf=Af=0,Tl=n),Af)},movementY:function(n){return"movementY"in n?n.movementY:Nf}}),qb=yn(Cc),sA=v({},Cc,{dataTransfer:0}),cA=yn(sA),uA=v({},Rl,{relatedTarget:0}),Mf=yn(uA),dA=v({},ar,{animationName:0,elapsedTime:0,pseudoElement:0}),fA=yn(dA),hA=v({},ar,{clipboardData:function(n){return"clipboardData"in n?n.clipboardData:window.clipboardData}}),mA=yn(hA),pA=v({},ar,{data:0}),Fb=yn(pA),gA={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},yA={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"},bA={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function vA(n){var i=this.nativeEvent;return i.getModifierState?i.getModifierState(n):(n=bA[n])?!!i[n]:!1}function Cf(){return vA}var xA=v({},Rl,{key:function(n){if(n.key){var i=gA[n.key]||n.key;if(i!=="Unidentified")return i}return n.type==="keypress"?(n=Ac(n),n===13?"Enter":String.fromCharCode(n)):n.type==="keydown"||n.type==="keyup"?yA[n.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Cf,charCode:function(n){return n.type==="keypress"?Ac(n):0},keyCode:function(n){return n.type==="keydown"||n.type==="keyup"?n.keyCode:0},which:function(n){return n.type==="keypress"?Ac(n):n.type==="keydown"||n.type==="keyup"?n.keyCode:0}}),wA=yn(xA),kA=v({},Cc,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Pb=yn(kA),SA=v({},Rl,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Cf}),EA=yn(SA),_A=v({},ar,{propertyName:0,elapsedTime:0,pseudoElement:0}),jA=yn(_A),OA=v({},Cc,{deltaX:function(n){return"deltaX"in n?n.deltaX:"wheelDeltaX"in n?-n.wheelDeltaX:0},deltaY:function(n){return"deltaY"in n?n.deltaY:"wheelDeltaY"in n?-n.wheelDeltaY:"wheelDelta"in n?-n.wheelDelta:0},deltaZ:0,deltaMode:0}),AA=yn(OA),NA=v({},ar,{newState:0,oldState:0}),MA=yn(NA),CA=[9,13,27,32],Rf=ji&&"CompositionEvent"in window,Dl=null;ji&&"documentMode"in document&&(Dl=document.documentMode);var RA=ji&&"TextEvent"in window&&!Dl,Vb=ji&&(!Rf||Dl&&8<Dl&&11>=Dl),Gb=" ",Kb=!1;function Yb(n,i){switch(n){case"keyup":return CA.indexOf(i.keyCode)!==-1;case"keydown":return i.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Qb(n){return n=n.detail,typeof n=="object"&&"data"in n?n.data:null}var ro=!1;function TA(n,i){switch(n){case"compositionend":return Qb(i);case"keypress":return i.which!==32?null:(Kb=!0,Gb);case"textInput":return n=i.data,n===Gb&&Kb?null:n;default:return null}}function DA(n,i){if(ro)return n==="compositionend"||!Rf&&Yb(n,i)?(n=Hb(),Oc=Of=Ji=null,ro=!1,n):null;switch(n){case"paste":return null;case"keypress":if(!(i.ctrlKey||i.altKey||i.metaKey)||i.ctrlKey&&i.altKey){if(i.char&&1<i.char.length)return i.char;if(i.which)return String.fromCharCode(i.which)}return null;case"compositionend":return Vb&&i.locale!=="ko"?null:i.data;default:return null}}var LA={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 Xb(n){var i=n&&n.nodeName&&n.nodeName.toLowerCase();return i==="input"?!!LA[n.type]:i==="textarea"}function Zb(n,i,o,s){io?ao?ao.push(s):ao=[s]:io=s,i=xu(i,"onChange"),0<i.length&&(o=new Mc("onChange","change",null,o,s),n.push({event:o,listeners:i}))}var Ll=null,zl=null;function zA(n){T1(n,0)}function Rc(n){var i=Nl(n);if(Rb(i))return n}function Wb(n,i){if(n==="change")return i}var Jb=!1;if(ji){var Tf;if(ji){var Df="oninput"in document;if(!Df){var e0=document.createElement("div");e0.setAttribute("oninput","return;"),Df=typeof e0.oninput=="function"}Tf=Df}else Tf=!1;Jb=Tf&&(!document.documentMode||9<document.documentMode)}function t0(){Ll&&(Ll.detachEvent("onpropertychange",n0),zl=Ll=null)}function n0(n){if(n.propertyName==="value"&&Rc(zl)){var i=[];Zb(i,zl,n,Ef(n)),Ib(zA,i)}}function $A(n,i,o){n==="focusin"?(t0(),Ll=i,zl=o,Ll.attachEvent("onpropertychange",n0)):n==="focusout"&&t0()}function UA(n){if(n==="selectionchange"||n==="keyup"||n==="keydown")return Rc(zl)}function IA(n,i){if(n==="click")return Rc(i)}function HA(n,i){if(n==="input"||n==="change")return Rc(i)}function BA(n,i){return n===i&&(n!==0||1/n===1/i)||n!==n&&i!==i}var Nn=typeof Object.is=="function"?Object.is:BA;function $l(n,i){if(Nn(n,i))return!0;if(typeof n!="object"||n===null||typeof i!="object"||i===null)return!1;var o=Object.keys(n),s=Object.keys(i);if(o.length!==s.length)return!1;for(s=0;s<o.length;s++){var f=o[s];if(!Lt.call(i,f)||!Nn(n[f],i[f]))return!1}return!0}function i0(n){for(;n&&n.firstChild;)n=n.firstChild;return n}function a0(n,i){var o=i0(n);n=0;for(var s;o;){if(o.nodeType===3){if(s=n+o.textContent.length,n<=i&&s>=i)return{node:o,offset:i-n};n=s}e:{for(;o;){if(o.nextSibling){o=o.nextSibling;break e}o=o.parentNode}o=void 0}o=i0(o)}}function r0(n,i){return n&&i?n===i?!0:n&&n.nodeType===3?!1:i&&i.nodeType===3?r0(n,i.parentNode):"contains"in n?n.contains(i):n.compareDocumentPosition?!!(n.compareDocumentPosition(i)&16):!1:!1}function o0(n){n=n!=null&&n.ownerDocument!=null&&n.ownerDocument.defaultView!=null?n.ownerDocument.defaultView:window;for(var i=_c(n.document);i instanceof n.HTMLIFrameElement;){try{var o=typeof i.contentWindow.location.href=="string"}catch{o=!1}if(o)n=i.contentWindow;else break;i=_c(n.document)}return i}function Lf(n){var i=n&&n.nodeName&&n.nodeName.toLowerCase();return i&&(i==="input"&&(n.type==="text"||n.type==="search"||n.type==="tel"||n.type==="url"||n.type==="password")||i==="textarea"||n.contentEditable==="true")}var qA=ji&&"documentMode"in document&&11>=document.documentMode,oo=null,zf=null,Ul=null,$f=!1;function l0(n,i,o){var s=o.window===o?o.document:o.nodeType===9?o:o.ownerDocument;$f||oo==null||oo!==_c(s)||(s=oo,"selectionStart"in s&&Lf(s)?s={start:s.selectionStart,end:s.selectionEnd}:(s=(s.ownerDocument&&s.ownerDocument.defaultView||window).getSelection(),s={anchorNode:s.anchorNode,anchorOffset:s.anchorOffset,focusNode:s.focusNode,focusOffset:s.focusOffset}),Ul&&$l(Ul,s)||(Ul=s,s=xu(zf,"onSelect"),0<s.length&&(i=new Mc("onSelect","select",null,i,o),n.push({event:i,listeners:s}),i.target=oo)))}function rr(n,i){var o={};return o[n.toLowerCase()]=i.toLowerCase(),o["Webkit"+n]="webkit"+i,o["Moz"+n]="moz"+i,o}var lo={animationend:rr("Animation","AnimationEnd"),animationiteration:rr("Animation","AnimationIteration"),animationstart:rr("Animation","AnimationStart"),transitionrun:rr("Transition","TransitionRun"),transitionstart:rr("Transition","TransitionStart"),transitioncancel:rr("Transition","TransitionCancel"),transitionend:rr("Transition","TransitionEnd")},Uf={},s0={};ji&&(s0=document.createElement("div").style,"AnimationEvent"in window||(delete lo.animationend.animation,delete lo.animationiteration.animation,delete lo.animationstart.animation),"TransitionEvent"in window||delete lo.transitionend.transition);function or(n){if(Uf[n])return Uf[n];if(!lo[n])return n;var i=lo[n],o;for(o in i)if(i.hasOwnProperty(o)&&o in s0)return Uf[n]=i[o];return n}var c0=or("animationend"),u0=or("animationiteration"),d0=or("animationstart"),FA=or("transitionrun"),PA=or("transitionstart"),VA=or("transitioncancel"),f0=or("transitionend"),h0=new Map,If="abort auxClick beforeToggle cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");If.push("scrollEnd");function ii(n,i){h0.set(n,i),ir(i,[n])}var Tc=typeof reportError=="function"?reportError:function(n){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var i=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof n=="object"&&n!==null&&typeof n.message=="string"?String(n.message):String(n),error:n});if(!window.dispatchEvent(i))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",n);return}console.error(n)},Vn=[],so=0,Hf=0;function Dc(){for(var n=so,i=Hf=so=0;i<n;){var o=Vn[i];Vn[i++]=null;var s=Vn[i];Vn[i++]=null;var f=Vn[i];Vn[i++]=null;var h=Vn[i];if(Vn[i++]=null,s!==null&&f!==null){var y=s.pending;y===null?f.next=f:(f.next=y.next,y.next=f),s.pending=f}h!==0&&m0(o,f,h)}}function Lc(n,i,o,s){Vn[so++]=n,Vn[so++]=i,Vn[so++]=o,Vn[so++]=s,Hf|=s,n.lanes|=s,n=n.alternate,n!==null&&(n.lanes|=s)}function Bf(n,i,o,s){return Lc(n,i,o,s),zc(n)}function lr(n,i){return Lc(n,null,null,i),zc(n)}function m0(n,i,o){n.lanes|=o;var s=n.alternate;s!==null&&(s.lanes|=o);for(var f=!1,h=n.return;h!==null;)h.childLanes|=o,s=h.alternate,s!==null&&(s.childLanes|=o),h.tag===22&&(n=h.stateNode,n===null||n._visibility&1||(f=!0)),n=h,h=h.return;return n.tag===3?(h=n.stateNode,f&&i!==null&&(f=31-be(o),n=h.hiddenUpdates,s=n[f],s===null?n[f]=[i]:s.push(i),i.lane=o|536870912),h):null}function zc(n){if(50<os)throw os=0,Xh=null,Error(r(185));for(var i=n.return;i!==null;)n=i,i=n.return;return n.tag===3?n.stateNode:null}var co={};function GA(n,i,o,s){this.tag=n,this.key=o,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=i,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=s,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Mn(n,i,o,s){return new GA(n,i,o,s)}function qf(n){return n=n.prototype,!(!n||!n.isReactComponent)}function Oi(n,i){var o=n.alternate;return o===null?(o=Mn(n.tag,i,n.key,n.mode),o.elementType=n.elementType,o.type=n.type,o.stateNode=n.stateNode,o.alternate=n,n.alternate=o):(o.pendingProps=i,o.type=n.type,o.flags=0,o.subtreeFlags=0,o.deletions=null),o.flags=n.flags&65011712,o.childLanes=n.childLanes,o.lanes=n.lanes,o.child=n.child,o.memoizedProps=n.memoizedProps,o.memoizedState=n.memoizedState,o.updateQueue=n.updateQueue,i=n.dependencies,o.dependencies=i===null?null:{lanes:i.lanes,firstContext:i.firstContext},o.sibling=n.sibling,o.index=n.index,o.ref=n.ref,o.refCleanup=n.refCleanup,o}function p0(n,i){n.flags&=65011714;var o=n.alternate;return o===null?(n.childLanes=0,n.lanes=i,n.child=null,n.subtreeFlags=0,n.memoizedProps=null,n.memoizedState=null,n.updateQueue=null,n.dependencies=null,n.stateNode=null):(n.childLanes=o.childLanes,n.lanes=o.lanes,n.child=o.child,n.subtreeFlags=0,n.deletions=null,n.memoizedProps=o.memoizedProps,n.memoizedState=o.memoizedState,n.updateQueue=o.updateQueue,n.type=o.type,i=o.dependencies,n.dependencies=i===null?null:{lanes:i.lanes,firstContext:i.firstContext}),n}function $c(n,i,o,s,f,h){var y=0;if(s=n,typeof n=="function")qf(n)&&(y=1);else if(typeof n=="string")y=ZN(n,o,P.current)?26:n==="html"||n==="head"||n==="body"?27:5;else e:switch(n){case H:return n=Mn(31,o,i,f),n.elementType=H,n.lanes=h,n;case E:return sr(o.children,f,h,i);case _:y=8,f|=24;break;case C:return n=Mn(12,o,i,f|2),n.elementType=C,n.lanes=h,n;case R:return n=Mn(13,o,i,f),n.elementType=R,n.lanes=h,n;case F:return n=Mn(19,o,i,f),n.elementType=F,n.lanes=h,n;default:if(typeof n=="object"&&n!==null)switch(n.$$typeof){case A:y=10;break e;case O:y=9;break e;case D:y=11;break e;case L:y=14;break e;case T:y=16,s=null;break e}y=29,o=Error(r(130,n===null?"null":typeof n,"")),s=null}return i=Mn(y,o,i,f),i.elementType=n,i.type=s,i.lanes=h,i}function sr(n,i,o,s){return n=Mn(7,n,s,i),n.lanes=o,n}function Ff(n,i,o){return n=Mn(6,n,null,i),n.lanes=o,n}function g0(n){var i=Mn(18,null,null,0);return i.stateNode=n,i}function Pf(n,i,o){return i=Mn(4,n.children!==null?n.children:[],n.key,i),i.lanes=o,i.stateNode={containerInfo:n.containerInfo,pendingChildren:null,implementation:n.implementation},i}var y0=new WeakMap;function Gn(n,i){if(typeof n=="object"&&n!==null){var o=y0.get(n);return o!==void 0?o:(i={value:n,source:i,stack:$e(i)},y0.set(n,i),i)}return{value:n,source:i,stack:$e(i)}}var uo=[],fo=0,Uc=null,Il=0,Kn=[],Yn=0,ea=null,di=1,fi="";function Ai(n,i){uo[fo++]=Il,uo[fo++]=Uc,Uc=n,Il=i}function b0(n,i,o){Kn[Yn++]=di,Kn[Yn++]=fi,Kn[Yn++]=ea,ea=n;var s=di;n=fi;var f=32-be(s)-1;s&=~(1<<f),o+=1;var h=32-be(i)+f;if(30<h){var y=f-f%5;h=(s&(1<<y)-1).toString(32),s>>=y,f-=y,di=1<<32-be(i)+f|o<<f|s,fi=h+n}else di=1<<h|o<<f|s,fi=n}function Vf(n){n.return!==null&&(Ai(n,1),b0(n,1,0))}function Gf(n){for(;n===Uc;)Uc=uo[--fo],uo[fo]=null,Il=uo[--fo],uo[fo]=null;for(;n===ea;)ea=Kn[--Yn],Kn[Yn]=null,fi=Kn[--Yn],Kn[Yn]=null,di=Kn[--Yn],Kn[Yn]=null}function v0(n,i){Kn[Yn++]=di,Kn[Yn++]=fi,Kn[Yn++]=ea,di=i.id,fi=i.overflow,ea=n}var Jt=null,xt=null,et=!1,ta=null,Qn=!1,Kf=Error(r(519));function na(n){var i=Error(r(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw Hl(Gn(i,n)),Kf}function x0(n){var i=n.stateNode,o=n.type,s=n.memoizedProps;switch(i[Ot]=n,i[gn]=s,o){case"dialog":Qe("cancel",i),Qe("close",i);break;case"iframe":case"object":case"embed":Qe("load",i);break;case"video":case"audio":for(o=0;o<ss.length;o++)Qe(ss[o],i);break;case"source":Qe("error",i);break;case"img":case"image":case"link":Qe("error",i),Qe("load",i);break;case"details":Qe("toggle",i);break;case"input":Qe("invalid",i),Tb(i,s.value,s.defaultValue,s.checked,s.defaultChecked,s.type,s.name,!0);break;case"select":Qe("invalid",i);break;case"textarea":Qe("invalid",i),Lb(i,s.value,s.defaultValue,s.children)}o=s.children,typeof o!="string"&&typeof o!="number"&&typeof o!="bigint"||i.textContent===""+o||s.suppressHydrationWarning===!0||$1(i.textContent,o)?(s.popover!=null&&(Qe("beforetoggle",i),Qe("toggle",i)),s.onScroll!=null&&Qe("scroll",i),s.onScrollEnd!=null&&Qe("scrollend",i),s.onClick!=null&&(i.onclick=_i),i=!0):i=!1,i||na(n,!0)}function w0(n){for(Jt=n.return;Jt;)switch(Jt.tag){case 5:case 31:case 13:Qn=!1;return;case 27:case 3:Qn=!0;return;default:Jt=Jt.return}}function ho(n){if(n!==Jt)return!1;if(!et)return w0(n),et=!0,!1;var i=n.tag,o;if((o=i!==3&&i!==27)&&((o=i===5)&&(o=n.type,o=!(o!=="form"&&o!=="button")||dm(n.type,n.memoizedProps)),o=!o),o&&xt&&na(n),w0(n),i===13){if(n=n.memoizedState,n=n!==null?n.dehydrated:null,!n)throw Error(r(317));xt=G1(n)}else if(i===31){if(n=n.memoizedState,n=n!==null?n.dehydrated:null,!n)throw Error(r(317));xt=G1(n)}else i===27?(i=xt,ga(n.type)?(n=gm,gm=null,xt=n):xt=i):xt=Jt?Zn(n.stateNode.nextSibling):null;return!0}function cr(){xt=Jt=null,et=!1}function Yf(){var n=ta;return n!==null&&(wn===null?wn=n:wn.push.apply(wn,n),ta=null),n}function Hl(n){ta===null?ta=[n]:ta.push(n)}var Qf=N(null),ur=null,Ni=null;function ia(n,i,o){I(Qf,i._currentValue),i._currentValue=o}function Mi(n){n._currentValue=Qf.current,q(Qf)}function Xf(n,i,o){for(;n!==null;){var s=n.alternate;if((n.childLanes&i)!==i?(n.childLanes|=i,s!==null&&(s.childLanes|=i)):s!==null&&(s.childLanes&i)!==i&&(s.childLanes|=i),n===o)break;n=n.return}}function Zf(n,i,o,s){var f=n.child;for(f!==null&&(f.return=n);f!==null;){var h=f.dependencies;if(h!==null){var y=f.child;h=h.firstContext;e:for(;h!==null;){var S=h;h=f;for(var U=0;U<i.length;U++)if(S.context===i[U]){h.lanes|=o,S=h.alternate,S!==null&&(S.lanes|=o),Xf(h.return,o,n),s||(y=null);break e}h=S.next}}else if(f.tag===18){if(y=f.return,y===null)throw Error(r(341));y.lanes|=o,h=y.alternate,h!==null&&(h.lanes|=o),Xf(y,o,n),y=null}else y=f.child;if(y!==null)y.return=f;else for(y=f;y!==null;){if(y===n){y=null;break}if(f=y.sibling,f!==null){f.return=y.return,y=f;break}y=y.return}f=y}}function mo(n,i,o,s){n=null;for(var f=i,h=!1;f!==null;){if(!h){if((f.flags&524288)!==0)h=!0;else if((f.flags&262144)!==0)break}if(f.tag===10){var y=f.alternate;if(y===null)throw Error(r(387));if(y=y.memoizedProps,y!==null){var S=f.type;Nn(f.pendingProps.value,y.value)||(n!==null?n.push(S):n=[S])}}else if(f===se.current){if(y=f.alternate,y===null)throw Error(r(387));y.memoizedState.memoizedState!==f.memoizedState.memoizedState&&(n!==null?n.push(hs):n=[hs])}f=f.return}n!==null&&Zf(i,n,o,s),i.flags|=262144}function Ic(n){for(n=n.firstContext;n!==null;){if(!Nn(n.context._currentValue,n.memoizedValue))return!0;n=n.next}return!1}function dr(n){ur=n,Ni=null,n=n.dependencies,n!==null&&(n.firstContext=null)}function en(n){return k0(ur,n)}function Hc(n,i){return ur===null&&dr(n),k0(n,i)}function k0(n,i){var o=i._currentValue;if(i={context:i,memoizedValue:o,next:null},Ni===null){if(n===null)throw Error(r(308));Ni=i,n.dependencies={lanes:0,firstContext:i},n.flags|=524288}else Ni=Ni.next=i;return o}var KA=typeof AbortController<"u"?AbortController:function(){var n=[],i=this.signal={aborted:!1,addEventListener:function(o,s){n.push(s)}};this.abort=function(){i.aborted=!0,n.forEach(function(o){return o()})}},YA=e.unstable_scheduleCallback,QA=e.unstable_NormalPriority,zt={$$typeof:A,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Wf(){return{controller:new KA,data:new Map,refCount:0}}function Bl(n){n.refCount--,n.refCount===0&&YA(QA,function(){n.controller.abort()})}var ql=null,Jf=0,po=0,go=null;function XA(n,i){if(ql===null){var o=ql=[];Jf=0,po=nm(),go={status:"pending",value:void 0,then:function(s){o.push(s)}}}return Jf++,i.then(S0,S0),i}function S0(){if(--Jf===0&&ql!==null){go!==null&&(go.status="fulfilled");var n=ql;ql=null,po=0,go=null;for(var i=0;i<n.length;i++)(0,n[i])()}}function ZA(n,i){var o=[],s={status:"pending",value:null,reason:null,then:function(f){o.push(f)}};return n.then(function(){s.status="fulfilled",s.value=i;for(var f=0;f<o.length;f++)(0,o[f])(i)},function(f){for(s.status="rejected",s.reason=f,f=0;f<o.length;f++)(0,o[f])(void 0)}),s}var E0=M.S;M.S=function(n,i){l1=yt(),typeof i=="object"&&i!==null&&typeof i.then=="function"&&XA(n,i),E0!==null&&E0(n,i)};var fr=N(null);function eh(){var n=fr.current;return n!==null?n:bt.pooledCache}function Bc(n,i){i===null?I(fr,fr.current):I(fr,i.pool)}function _0(){var n=eh();return n===null?null:{parent:zt._currentValue,pool:n}}var yo=Error(r(460)),th=Error(r(474)),qc=Error(r(542)),Fc={then:function(){}};function j0(n){return n=n.status,n==="fulfilled"||n==="rejected"}function O0(n,i,o){switch(o=n[o],o===void 0?n.push(i):o!==i&&(i.then(_i,_i),i=o),i.status){case"fulfilled":return i.value;case"rejected":throw n=i.reason,N0(n),n;default:if(typeof i.status=="string")i.then(_i,_i);else{if(n=bt,n!==null&&100<n.shellSuspendCounter)throw Error(r(482));n=i,n.status="pending",n.then(function(s){if(i.status==="pending"){var f=i;f.status="fulfilled",f.value=s}},function(s){if(i.status==="pending"){var f=i;f.status="rejected",f.reason=s}})}switch(i.status){case"fulfilled":return i.value;case"rejected":throw n=i.reason,N0(n),n}throw mr=i,yo}}function hr(n){try{var i=n._init;return i(n._payload)}catch(o){throw o!==null&&typeof o=="object"&&typeof o.then=="function"?(mr=o,yo):o}}var mr=null;function A0(){if(mr===null)throw Error(r(459));var n=mr;return mr=null,n}function N0(n){if(n===yo||n===qc)throw Error(r(483))}var bo=null,Fl=0;function Pc(n){var i=Fl;return Fl+=1,bo===null&&(bo=[]),O0(bo,n,i)}function Pl(n,i){i=i.props.ref,n.ref=i!==void 0?i:null}function Vc(n,i){throw i.$$typeof===k?Error(r(525)):(n=Object.prototype.toString.call(i),Error(r(31,n==="[object Object]"?"object with keys {"+Object.keys(i).join(", ")+"}":n)))}function M0(n){function i(G,B){if(n){var Z=G.deletions;Z===null?(G.deletions=[B],G.flags|=16):Z.push(B)}}function o(G,B){if(!n)return null;for(;B!==null;)i(G,B),B=B.sibling;return null}function s(G){for(var B=new Map;G!==null;)G.key!==null?B.set(G.key,G):B.set(G.index,G),G=G.sibling;return B}function f(G,B){return G=Oi(G,B),G.index=0,G.sibling=null,G}function h(G,B,Z){return G.index=Z,n?(Z=G.alternate,Z!==null?(Z=Z.index,Z<B?(G.flags|=67108866,B):Z):(G.flags|=67108866,B)):(G.flags|=1048576,B)}function y(G){return n&&G.alternate===null&&(G.flags|=67108866),G}function S(G,B,Z,fe){return B===null||B.tag!==6?(B=Ff(Z,G.mode,fe),B.return=G,B):(B=f(B,Z),B.return=G,B)}function U(G,B,Z,fe){var De=Z.type;return De===E?de(G,B,Z.props.children,fe,Z.key):B!==null&&(B.elementType===De||typeof De=="object"&&De!==null&&De.$$typeof===T&&hr(De)===B.type)?(B=f(B,Z.props),Pl(B,Z),B.return=G,B):(B=$c(Z.type,Z.key,Z.props,null,G.mode,fe),Pl(B,Z),B.return=G,B)}function W(G,B,Z,fe){return B===null||B.tag!==4||B.stateNode.containerInfo!==Z.containerInfo||B.stateNode.implementation!==Z.implementation?(B=Pf(Z,G.mode,fe),B.return=G,B):(B=f(B,Z.children||[]),B.return=G,B)}function de(G,B,Z,fe,De){return B===null||B.tag!==7?(B=sr(Z,G.mode,fe,De),B.return=G,B):(B=f(B,Z),B.return=G,B)}function he(G,B,Z){if(typeof B=="string"&&B!==""||typeof B=="number"||typeof B=="bigint")return B=Ff(""+B,G.mode,Z),B.return=G,B;if(typeof B=="object"&&B!==null){switch(B.$$typeof){case w:return Z=$c(B.type,B.key,B.props,null,G.mode,Z),Pl(Z,B),Z.return=G,Z;case j:return B=Pf(B,G.mode,Z),B.return=G,B;case T:return B=hr(B),he(G,B,Z)}if(ue(B)||le(B))return B=sr(B,G.mode,Z,null),B.return=G,B;if(typeof B.then=="function")return he(G,Pc(B),Z);if(B.$$typeof===A)return he(G,Hc(G,B),Z);Vc(G,B)}return null}function J(G,B,Z,fe){var De=B!==null?B.key:null;if(typeof Z=="string"&&Z!==""||typeof Z=="number"||typeof Z=="bigint")return De!==null?null:S(G,B,""+Z,fe);if(typeof Z=="object"&&Z!==null){switch(Z.$$typeof){case w:return Z.key===De?U(G,B,Z,fe):null;case j:return Z.key===De?W(G,B,Z,fe):null;case T:return Z=hr(Z),J(G,B,Z,fe)}if(ue(Z)||le(Z))return De!==null?null:de(G,B,Z,fe,null);if(typeof Z.then=="function")return J(G,B,Pc(Z),fe);if(Z.$$typeof===A)return J(G,B,Hc(G,Z),fe);Vc(G,Z)}return null}function oe(G,B,Z,fe,De){if(typeof fe=="string"&&fe!==""||typeof fe=="number"||typeof fe=="bigint")return G=G.get(Z)||null,S(B,G,""+fe,De);if(typeof fe=="object"&&fe!==null){switch(fe.$$typeof){case w:return G=G.get(fe.key===null?Z:fe.key)||null,U(B,G,fe,De);case j:return G=G.get(fe.key===null?Z:fe.key)||null,W(B,G,fe,De);case T:return fe=hr(fe),oe(G,B,Z,fe,De)}if(ue(fe)||le(fe))return G=G.get(Z)||null,de(B,G,fe,De,null);if(typeof fe.then=="function")return oe(G,B,Z,Pc(fe),De);if(fe.$$typeof===A)return oe(G,B,Z,Hc(B,fe),De);Vc(B,fe)}return null}function Ae(G,B,Z,fe){for(var De=null,rt=null,Me=B,Ve=B=0,We=null;Me!==null&&Ve<Z.length;Ve++){Me.index>Ve?(We=Me,Me=null):We=Me.sibling;var ot=J(G,Me,Z[Ve],fe);if(ot===null){Me===null&&(Me=We);break}n&&Me&&ot.alternate===null&&i(G,Me),B=h(ot,B,Ve),rt===null?De=ot:rt.sibling=ot,rt=ot,Me=We}if(Ve===Z.length)return o(G,Me),et&&Ai(G,Ve),De;if(Me===null){for(;Ve<Z.length;Ve++)Me=he(G,Z[Ve],fe),Me!==null&&(B=h(Me,B,Ve),rt===null?De=Me:rt.sibling=Me,rt=Me);return et&&Ai(G,Ve),De}for(Me=s(Me);Ve<Z.length;Ve++)We=oe(Me,G,Ve,Z[Ve],fe),We!==null&&(n&&We.alternate!==null&&Me.delete(We.key===null?Ve:We.key),B=h(We,B,Ve),rt===null?De=We:rt.sibling=We,rt=We);return n&&Me.forEach(function(wa){return i(G,wa)}),et&&Ai(G,Ve),De}function Ie(G,B,Z,fe){if(Z==null)throw Error(r(151));for(var De=null,rt=null,Me=B,Ve=B=0,We=null,ot=Z.next();Me!==null&&!ot.done;Ve++,ot=Z.next()){Me.index>Ve?(We=Me,Me=null):We=Me.sibling;var wa=J(G,Me,ot.value,fe);if(wa===null){Me===null&&(Me=We);break}n&&Me&&wa.alternate===null&&i(G,Me),B=h(wa,B,Ve),rt===null?De=wa:rt.sibling=wa,rt=wa,Me=We}if(ot.done)return o(G,Me),et&&Ai(G,Ve),De;if(Me===null){for(;!ot.done;Ve++,ot=Z.next())ot=he(G,ot.value,fe),ot!==null&&(B=h(ot,B,Ve),rt===null?De=ot:rt.sibling=ot,rt=ot);return et&&Ai(G,Ve),De}for(Me=s(Me);!ot.done;Ve++,ot=Z.next())ot=oe(Me,G,Ve,ot.value,fe),ot!==null&&(n&&ot.alternate!==null&&Me.delete(ot.key===null?Ve:ot.key),B=h(ot,B,Ve),rt===null?De=ot:rt.sibling=ot,rt=ot);return n&&Me.forEach(function(sM){return i(G,sM)}),et&&Ai(G,Ve),De}function gt(G,B,Z,fe){if(typeof Z=="object"&&Z!==null&&Z.type===E&&Z.key===null&&(Z=Z.props.children),typeof Z=="object"&&Z!==null){switch(Z.$$typeof){case w:e:{for(var De=Z.key;B!==null;){if(B.key===De){if(De=Z.type,De===E){if(B.tag===7){o(G,B.sibling),fe=f(B,Z.props.children),fe.return=G,G=fe;break e}}else if(B.elementType===De||typeof De=="object"&&De!==null&&De.$$typeof===T&&hr(De)===B.type){o(G,B.sibling),fe=f(B,Z.props),Pl(fe,Z),fe.return=G,G=fe;break e}o(G,B);break}else i(G,B);B=B.sibling}Z.type===E?(fe=sr(Z.props.children,G.mode,fe,Z.key),fe.return=G,G=fe):(fe=$c(Z.type,Z.key,Z.props,null,G.mode,fe),Pl(fe,Z),fe.return=G,G=fe)}return y(G);case j:e:{for(De=Z.key;B!==null;){if(B.key===De)if(B.tag===4&&B.stateNode.containerInfo===Z.containerInfo&&B.stateNode.implementation===Z.implementation){o(G,B.sibling),fe=f(B,Z.children||[]),fe.return=G,G=fe;break e}else{o(G,B);break}else i(G,B);B=B.sibling}fe=Pf(Z,G.mode,fe),fe.return=G,G=fe}return y(G);case T:return Z=hr(Z),gt(G,B,Z,fe)}if(ue(Z))return Ae(G,B,Z,fe);if(le(Z)){if(De=le(Z),typeof De!="function")throw Error(r(150));return Z=De.call(Z),Ie(G,B,Z,fe)}if(typeof Z.then=="function")return gt(G,B,Pc(Z),fe);if(Z.$$typeof===A)return gt(G,B,Hc(G,Z),fe);Vc(G,Z)}return typeof Z=="string"&&Z!==""||typeof Z=="number"||typeof Z=="bigint"?(Z=""+Z,B!==null&&B.tag===6?(o(G,B.sibling),fe=f(B,Z),fe.return=G,G=fe):(o(G,B),fe=Ff(Z,G.mode,fe),fe.return=G,G=fe),y(G)):o(G,B)}return function(G,B,Z,fe){try{Fl=0;var De=gt(G,B,Z,fe);return bo=null,De}catch(Me){if(Me===yo||Me===qc)throw Me;var rt=Mn(29,Me,null,G.mode);return rt.lanes=fe,rt.return=G,rt}finally{}}}var pr=M0(!0),C0=M0(!1),aa=!1;function nh(n){n.updateQueue={baseState:n.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function ih(n,i){n=n.updateQueue,i.updateQueue===n&&(i.updateQueue={baseState:n.baseState,firstBaseUpdate:n.firstBaseUpdate,lastBaseUpdate:n.lastBaseUpdate,shared:n.shared,callbacks:null})}function ra(n){return{lane:n,tag:0,payload:null,callback:null,next:null}}function oa(n,i,o){var s=n.updateQueue;if(s===null)return null;if(s=s.shared,(lt&2)!==0){var f=s.pending;return f===null?i.next=i:(i.next=f.next,f.next=i),s.pending=i,i=zc(n),m0(n,null,o),i}return Lc(n,s,i,o),zc(n)}function Vl(n,i,o){if(i=i.updateQueue,i!==null&&(i=i.shared,(o&4194048)!==0)){var s=i.lanes;s&=n.pendingLanes,o|=s,i.lanes=o,kc(n,o)}}function ah(n,i){var o=n.updateQueue,s=n.alternate;if(s!==null&&(s=s.updateQueue,o===s)){var f=null,h=null;if(o=o.firstBaseUpdate,o!==null){do{var y={lane:o.lane,tag:o.tag,payload:o.payload,callback:null,next:null};h===null?f=h=y:h=h.next=y,o=o.next}while(o!==null);h===null?f=h=i:h=h.next=i}else f=h=i;o={baseState:s.baseState,firstBaseUpdate:f,lastBaseUpdate:h,shared:s.shared,callbacks:s.callbacks},n.updateQueue=o;return}n=o.lastBaseUpdate,n===null?o.firstBaseUpdate=i:n.next=i,o.lastBaseUpdate=i}var rh=!1;function Gl(){if(rh){var n=go;if(n!==null)throw n}}function Kl(n,i,o,s){rh=!1;var f=n.updateQueue;aa=!1;var h=f.firstBaseUpdate,y=f.lastBaseUpdate,S=f.shared.pending;if(S!==null){f.shared.pending=null;var U=S,W=U.next;U.next=null,y===null?h=W:y.next=W,y=U;var de=n.alternate;de!==null&&(de=de.updateQueue,S=de.lastBaseUpdate,S!==y&&(S===null?de.firstBaseUpdate=W:S.next=W,de.lastBaseUpdate=U))}if(h!==null){var he=f.baseState;y=0,de=W=U=null,S=h;do{var J=S.lane&-536870913,oe=J!==S.lane;if(oe?(Ze&J)===J:(s&J)===J){J!==0&&J===po&&(rh=!0),de!==null&&(de=de.next={lane:0,tag:S.tag,payload:S.payload,callback:null,next:null});e:{var Ae=n,Ie=S;J=i;var gt=o;switch(Ie.tag){case 1:if(Ae=Ie.payload,typeof Ae=="function"){he=Ae.call(gt,he,J);break e}he=Ae;break e;case 3:Ae.flags=Ae.flags&-65537|128;case 0:if(Ae=Ie.payload,J=typeof Ae=="function"?Ae.call(gt,he,J):Ae,J==null)break e;he=v({},he,J);break e;case 2:aa=!0}}J=S.callback,J!==null&&(n.flags|=64,oe&&(n.flags|=8192),oe=f.callbacks,oe===null?f.callbacks=[J]:oe.push(J))}else oe={lane:J,tag:S.tag,payload:S.payload,callback:S.callback,next:null},de===null?(W=de=oe,U=he):de=de.next=oe,y|=J;if(S=S.next,S===null){if(S=f.shared.pending,S===null)break;oe=S,S=oe.next,oe.next=null,f.lastBaseUpdate=oe,f.shared.pending=null}}while(!0);de===null&&(U=he),f.baseState=U,f.firstBaseUpdate=W,f.lastBaseUpdate=de,h===null&&(f.shared.lanes=0),da|=y,n.lanes=y,n.memoizedState=he}}function R0(n,i){if(typeof n!="function")throw Error(r(191,n));n.call(i)}function T0(n,i){var o=n.callbacks;if(o!==null)for(n.callbacks=null,n=0;n<o.length;n++)R0(o[n],i)}var vo=N(null),Gc=N(0);function D0(n,i){n=Ii,I(Gc,n),I(vo,i),Ii=n|i.baseLanes}function oh(){I(Gc,Ii),I(vo,vo.current)}function lh(){Ii=Gc.current,q(vo),q(Gc)}var Cn=N(null),Xn=null;function la(n){var i=n.alternate;I(Tt,Tt.current&1),I(Cn,n),Xn===null&&(i===null||vo.current!==null||i.memoizedState!==null)&&(Xn=n)}function sh(n){I(Tt,Tt.current),I(Cn,n),Xn===null&&(Xn=n)}function L0(n){n.tag===22?(I(Tt,Tt.current),I(Cn,n),Xn===null&&(Xn=n)):sa()}function sa(){I(Tt,Tt.current),I(Cn,Cn.current)}function Rn(n){q(Cn),Xn===n&&(Xn=null),q(Tt)}var Tt=N(0);function Kc(n){for(var i=n;i!==null;){if(i.tag===13){var o=i.memoizedState;if(o!==null&&(o=o.dehydrated,o===null||mm(o)||pm(o)))return i}else if(i.tag===19&&(i.memoizedProps.revealOrder==="forwards"||i.memoizedProps.revealOrder==="backwards"||i.memoizedProps.revealOrder==="unstable_legacy-backwards"||i.memoizedProps.revealOrder==="together")){if((i.flags&128)!==0)return i}else if(i.child!==null){i.child.return=i,i=i.child;continue}if(i===n)break;for(;i.sibling===null;){if(i.return===null||i.return===n)return null;i=i.return}i.sibling.return=i.return,i=i.sibling}return null}var Ci=0,Fe=null,mt=null,$t=null,Yc=!1,xo=!1,gr=!1,Qc=0,Yl=0,wo=null,WA=0;function Nt(){throw Error(r(321))}function ch(n,i){if(i===null)return!1;for(var o=0;o<i.length&&o<n.length;o++)if(!Nn(n[o],i[o]))return!1;return!0}function uh(n,i,o,s,f,h){return Ci=h,Fe=i,i.memoizedState=null,i.updateQueue=null,i.lanes=0,M.H=n===null||n.memoizedState===null?bv:_h,gr=!1,h=o(s,f),gr=!1,xo&&(h=$0(i,o,s,f)),z0(n),h}function z0(n){M.H=Zl;var i=mt!==null&&mt.next!==null;if(Ci=0,$t=mt=Fe=null,Yc=!1,Yl=0,wo=null,i)throw Error(r(300));n===null||Ut||(n=n.dependencies,n!==null&&Ic(n)&&(Ut=!0))}function $0(n,i,o,s){Fe=n;var f=0;do{if(xo&&(wo=null),Yl=0,xo=!1,25<=f)throw Error(r(301));if(f+=1,$t=mt=null,n.updateQueue!=null){var h=n.updateQueue;h.lastEffect=null,h.events=null,h.stores=null,h.memoCache!=null&&(h.memoCache.index=0)}M.H=vv,h=i(o,s)}while(xo);return h}function JA(){var n=M.H,i=n.useState()[0];return i=typeof i.then=="function"?Ql(i):i,n=n.useState()[0],(mt!==null?mt.memoizedState:null)!==n&&(Fe.flags|=1024),i}function dh(){var n=Qc!==0;return Qc=0,n}function fh(n,i,o){i.updateQueue=n.updateQueue,i.flags&=-2053,n.lanes&=~o}function hh(n){if(Yc){for(n=n.memoizedState;n!==null;){var i=n.queue;i!==null&&(i.pending=null),n=n.next}Yc=!1}Ci=0,$t=mt=Fe=null,xo=!1,Yl=Qc=0,wo=null}function un(){var n={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return $t===null?Fe.memoizedState=$t=n:$t=$t.next=n,$t}function Dt(){if(mt===null){var n=Fe.alternate;n=n!==null?n.memoizedState:null}else n=mt.next;var i=$t===null?Fe.memoizedState:$t.next;if(i!==null)$t=i,mt=n;else{if(n===null)throw Fe.alternate===null?Error(r(467)):Error(r(310));mt=n,n={memoizedState:mt.memoizedState,baseState:mt.baseState,baseQueue:mt.baseQueue,queue:mt.queue,next:null},$t===null?Fe.memoizedState=$t=n:$t=$t.next=n}return $t}function Xc(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Ql(n){var i=Yl;return Yl+=1,wo===null&&(wo=[]),n=O0(wo,n,i),i=Fe,($t===null?i.memoizedState:$t.next)===null&&(i=i.alternate,M.H=i===null||i.memoizedState===null?bv:_h),n}function Zc(n){if(n!==null&&typeof n=="object"){if(typeof n.then=="function")return Ql(n);if(n.$$typeof===A)return en(n)}throw Error(r(438,String(n)))}function mh(n){var i=null,o=Fe.updateQueue;if(o!==null&&(i=o.memoCache),i==null){var s=Fe.alternate;s!==null&&(s=s.updateQueue,s!==null&&(s=s.memoCache,s!=null&&(i={data:s.data.map(function(f){return f.slice()}),index:0})))}if(i==null&&(i={data:[],index:0}),o===null&&(o=Xc(),Fe.updateQueue=o),o.memoCache=i,o=i.data[i.index],o===void 0)for(o=i.data[i.index]=Array(n),s=0;s<n;s++)o[s]=ne;return i.index++,o}function Ri(n,i){return typeof i=="function"?i(n):i}function Wc(n){var i=Dt();return ph(i,mt,n)}function ph(n,i,o){var s=n.queue;if(s===null)throw Error(r(311));s.lastRenderedReducer=o;var f=n.baseQueue,h=s.pending;if(h!==null){if(f!==null){var y=f.next;f.next=h.next,h.next=y}i.baseQueue=f=h,s.pending=null}if(h=n.baseState,f===null)n.memoizedState=h;else{i=f.next;var S=y=null,U=null,W=i,de=!1;do{var he=W.lane&-536870913;if(he!==W.lane?(Ze&he)===he:(Ci&he)===he){var J=W.revertLane;if(J===0)U!==null&&(U=U.next={lane:0,revertLane:0,gesture:null,action:W.action,hasEagerState:W.hasEagerState,eagerState:W.eagerState,next:null}),he===po&&(de=!0);else if((Ci&J)===J){W=W.next,J===po&&(de=!0);continue}else he={lane:0,revertLane:W.revertLane,gesture:null,action:W.action,hasEagerState:W.hasEagerState,eagerState:W.eagerState,next:null},U===null?(S=U=he,y=h):U=U.next=he,Fe.lanes|=J,da|=J;he=W.action,gr&&o(h,he),h=W.hasEagerState?W.eagerState:o(h,he)}else J={lane:he,revertLane:W.revertLane,gesture:W.gesture,action:W.action,hasEagerState:W.hasEagerState,eagerState:W.eagerState,next:null},U===null?(S=U=J,y=h):U=U.next=J,Fe.lanes|=he,da|=he;W=W.next}while(W!==null&&W!==i);if(U===null?y=h:U.next=S,!Nn(h,n.memoizedState)&&(Ut=!0,de&&(o=go,o!==null)))throw o;n.memoizedState=h,n.baseState=y,n.baseQueue=U,s.lastRenderedState=h}return f===null&&(s.lanes=0),[n.memoizedState,s.dispatch]}function gh(n){var i=Dt(),o=i.queue;if(o===null)throw Error(r(311));o.lastRenderedReducer=n;var s=o.dispatch,f=o.pending,h=i.memoizedState;if(f!==null){o.pending=null;var y=f=f.next;do h=n(h,y.action),y=y.next;while(y!==f);Nn(h,i.memoizedState)||(Ut=!0),i.memoizedState=h,i.baseQueue===null&&(i.baseState=h),o.lastRenderedState=h}return[h,s]}function U0(n,i,o){var s=Fe,f=Dt(),h=et;if(h){if(o===void 0)throw Error(r(407));o=o()}else o=i();var y=!Nn((mt||f).memoizedState,o);if(y&&(f.memoizedState=o,Ut=!0),f=f.queue,vh(B0.bind(null,s,f,n),[n]),f.getSnapshot!==i||y||$t!==null&&$t.memoizedState.tag&1){if(s.flags|=2048,ko(9,{destroy:void 0},H0.bind(null,s,f,o,i),null),bt===null)throw Error(r(349));h||(Ci&127)!==0||I0(s,i,o)}return o}function I0(n,i,o){n.flags|=16384,n={getSnapshot:i,value:o},i=Fe.updateQueue,i===null?(i=Xc(),Fe.updateQueue=i,i.stores=[n]):(o=i.stores,o===null?i.stores=[n]:o.push(n))}function H0(n,i,o,s){i.value=o,i.getSnapshot=s,q0(i)&&F0(n)}function B0(n,i,o){return o(function(){q0(i)&&F0(n)})}function q0(n){var i=n.getSnapshot;n=n.value;try{var o=i();return!Nn(n,o)}catch{return!0}}function F0(n){var i=lr(n,2);i!==null&&kn(i,n,2)}function yh(n){var i=un();if(typeof n=="function"){var o=n;if(n=o(),gr){ie(!0);try{o()}finally{ie(!1)}}}return i.memoizedState=i.baseState=n,i.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ri,lastRenderedState:n},i}function P0(n,i,o,s){return n.baseState=o,ph(n,mt,typeof s=="function"?s:Ri)}function eN(n,i,o,s,f){if(tu(n))throw Error(r(485));if(n=i.action,n!==null){var h={payload:f,action:n,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(y){h.listeners.push(y)}};M.T!==null?o(!0):h.isTransition=!1,s(h),o=i.pending,o===null?(h.next=i.pending=h,V0(i,h)):(h.next=o.next,i.pending=o.next=h)}}function V0(n,i){var o=i.action,s=i.payload,f=n.state;if(i.isTransition){var h=M.T,y={};M.T=y;try{var S=o(f,s),U=M.S;U!==null&&U(y,S),G0(n,i,S)}catch(W){bh(n,i,W)}finally{h!==null&&y.types!==null&&(h.types=y.types),M.T=h}}else try{h=o(f,s),G0(n,i,h)}catch(W){bh(n,i,W)}}function G0(n,i,o){o!==null&&typeof o=="object"&&typeof o.then=="function"?o.then(function(s){K0(n,i,s)},function(s){return bh(n,i,s)}):K0(n,i,o)}function K0(n,i,o){i.status="fulfilled",i.value=o,Y0(i),n.state=o,i=n.pending,i!==null&&(o=i.next,o===i?n.pending=null:(o=o.next,i.next=o,V0(n,o)))}function bh(n,i,o){var s=n.pending;if(n.pending=null,s!==null){s=s.next;do i.status="rejected",i.reason=o,Y0(i),i=i.next;while(i!==s)}n.action=null}function Y0(n){n=n.listeners;for(var i=0;i<n.length;i++)(0,n[i])()}function Q0(n,i){return i}function X0(n,i){if(et){var o=bt.formState;if(o!==null){e:{var s=Fe;if(et){if(xt){t:{for(var f=xt,h=Qn;f.nodeType!==8;){if(!h){f=null;break t}if(f=Zn(f.nextSibling),f===null){f=null;break t}}h=f.data,f=h==="F!"||h==="F"?f:null}if(f){xt=Zn(f.nextSibling),s=f.data==="F!";break e}}na(s)}s=!1}s&&(i=o[0])}}return o=un(),o.memoizedState=o.baseState=i,s={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Q0,lastRenderedState:i},o.queue=s,o=pv.bind(null,Fe,s),s.dispatch=o,s=yh(!1),h=Eh.bind(null,Fe,!1,s.queue),s=un(),f={state:i,dispatch:null,action:n,pending:null},s.queue=f,o=eN.bind(null,Fe,f,h,o),f.dispatch=o,s.memoizedState=n,[i,o,!1]}function Z0(n){var i=Dt();return W0(i,mt,n)}function W0(n,i,o){if(i=ph(n,i,Q0)[0],n=Wc(Ri)[0],typeof i=="object"&&i!==null&&typeof i.then=="function")try{var s=Ql(i)}catch(y){throw y===yo?qc:y}else s=i;i=Dt();var f=i.queue,h=f.dispatch;return o!==i.memoizedState&&(Fe.flags|=2048,ko(9,{destroy:void 0},tN.bind(null,f,o),null)),[s,h,n]}function tN(n,i){n.action=i}function J0(n){var i=Dt(),o=mt;if(o!==null)return W0(i,o,n);Dt(),i=i.memoizedState,o=Dt();var s=o.queue.dispatch;return o.memoizedState=n,[i,s,!1]}function ko(n,i,o,s){return n={tag:n,create:o,deps:s,inst:i,next:null},i=Fe.updateQueue,i===null&&(i=Xc(),Fe.updateQueue=i),o=i.lastEffect,o===null?i.lastEffect=n.next=n:(s=o.next,o.next=n,n.next=s,i.lastEffect=n),n}function ev(){return Dt().memoizedState}function Jc(n,i,o,s){var f=un();Fe.flags|=n,f.memoizedState=ko(1|i,{destroy:void 0},o,s===void 0?null:s)}function eu(n,i,o,s){var f=Dt();s=s===void 0?null:s;var h=f.memoizedState.inst;mt!==null&&s!==null&&ch(s,mt.memoizedState.deps)?f.memoizedState=ko(i,h,o,s):(Fe.flags|=n,f.memoizedState=ko(1|i,h,o,s))}function tv(n,i){Jc(8390656,8,n,i)}function vh(n,i){eu(2048,8,n,i)}function nN(n){Fe.flags|=4;var i=Fe.updateQueue;if(i===null)i=Xc(),Fe.updateQueue=i,i.events=[n];else{var o=i.events;o===null?i.events=[n]:o.push(n)}}function nv(n){var i=Dt().memoizedState;return nN({ref:i,nextImpl:n}),function(){if((lt&2)!==0)throw Error(r(440));return i.impl.apply(void 0,arguments)}}function iv(n,i){return eu(4,2,n,i)}function av(n,i){return eu(4,4,n,i)}function rv(n,i){if(typeof i=="function"){n=n();var o=i(n);return function(){typeof o=="function"?o():i(null)}}if(i!=null)return n=n(),i.current=n,function(){i.current=null}}function ov(n,i,o){o=o!=null?o.concat([n]):null,eu(4,4,rv.bind(null,i,n),o)}function xh(){}function lv(n,i){var o=Dt();i=i===void 0?null:i;var s=o.memoizedState;return i!==null&&ch(i,s[1])?s[0]:(o.memoizedState=[n,i],n)}function sv(n,i){var o=Dt();i=i===void 0?null:i;var s=o.memoizedState;if(i!==null&&ch(i,s[1]))return s[0];if(s=n(),gr){ie(!0);try{n()}finally{ie(!1)}}return o.memoizedState=[s,i],s}function wh(n,i,o){return o===void 0||(Ci&1073741824)!==0&&(Ze&261930)===0?n.memoizedState=i:(n.memoizedState=o,n=c1(),Fe.lanes|=n,da|=n,o)}function cv(n,i,o,s){return Nn(o,i)?o:vo.current!==null?(n=wh(n,o,s),Nn(n,i)||(Ut=!0),n):(Ci&42)===0||(Ci&1073741824)!==0&&(Ze&261930)===0?(Ut=!0,n.memoizedState=o):(n=c1(),Fe.lanes|=n,da|=n,i)}function uv(n,i,o,s,f){var h=V.p;V.p=h!==0&&8>h?h:8;var y=M.T,S={};M.T=S,Eh(n,!1,i,o);try{var U=f(),W=M.S;if(W!==null&&W(S,U),U!==null&&typeof U=="object"&&typeof U.then=="function"){var de=ZA(U,s);Xl(n,i,de,Ln(n))}else Xl(n,i,s,Ln(n))}catch(he){Xl(n,i,{then:function(){},status:"rejected",reason:he},Ln())}finally{V.p=h,y!==null&&S.types!==null&&(y.types=S.types),M.T=y}}function iN(){}function kh(n,i,o,s){if(n.tag!==5)throw Error(r(476));var f=dv(n).queue;uv(n,f,i,te,o===null?iN:function(){return fv(n),o(s)})}function dv(n){var i=n.memoizedState;if(i!==null)return i;i={memoizedState:te,baseState:te,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ri,lastRenderedState:te},next:null};var o={};return i.next={memoizedState:o,baseState:o,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ri,lastRenderedState:o},next:null},n.memoizedState=i,n=n.alternate,n!==null&&(n.memoizedState=i),i}function fv(n){var i=dv(n);i.next===null&&(i=n.alternate.memoizedState),Xl(n,i.next.queue,{},Ln())}function Sh(){return en(hs)}function hv(){return Dt().memoizedState}function mv(){return Dt().memoizedState}function aN(n){for(var i=n.return;i!==null;){switch(i.tag){case 24:case 3:var o=Ln();n=ra(o);var s=oa(i,n,o);s!==null&&(kn(s,i,o),Vl(s,i,o)),i={cache:Wf()},n.payload=i;return}i=i.return}}function rN(n,i,o){var s=Ln();o={lane:s,revertLane:0,gesture:null,action:o,hasEagerState:!1,eagerState:null,next:null},tu(n)?gv(i,o):(o=Bf(n,i,o,s),o!==null&&(kn(o,n,s),yv(o,i,s)))}function pv(n,i,o){var s=Ln();Xl(n,i,o,s)}function Xl(n,i,o,s){var f={lane:s,revertLane:0,gesture:null,action:o,hasEagerState:!1,eagerState:null,next:null};if(tu(n))gv(i,f);else{var h=n.alternate;if(n.lanes===0&&(h===null||h.lanes===0)&&(h=i.lastRenderedReducer,h!==null))try{var y=i.lastRenderedState,S=h(y,o);if(f.hasEagerState=!0,f.eagerState=S,Nn(S,y))return Lc(n,i,f,0),bt===null&&Dc(),!1}catch{}finally{}if(o=Bf(n,i,f,s),o!==null)return kn(o,n,s),yv(o,i,s),!0}return!1}function Eh(n,i,o,s){if(s={lane:2,revertLane:nm(),gesture:null,action:s,hasEagerState:!1,eagerState:null,next:null},tu(n)){if(i)throw Error(r(479))}else i=Bf(n,o,s,2),i!==null&&kn(i,n,2)}function tu(n){var i=n.alternate;return n===Fe||i!==null&&i===Fe}function gv(n,i){xo=Yc=!0;var o=n.pending;o===null?i.next=i:(i.next=o.next,o.next=i),n.pending=i}function yv(n,i,o){if((o&4194048)!==0){var s=i.lanes;s&=n.pendingLanes,o|=s,i.lanes=o,kc(n,o)}}var Zl={readContext:en,use:Zc,useCallback:Nt,useContext:Nt,useEffect:Nt,useImperativeHandle:Nt,useLayoutEffect:Nt,useInsertionEffect:Nt,useMemo:Nt,useReducer:Nt,useRef:Nt,useState:Nt,useDebugValue:Nt,useDeferredValue:Nt,useTransition:Nt,useSyncExternalStore:Nt,useId:Nt,useHostTransitionStatus:Nt,useFormState:Nt,useActionState:Nt,useOptimistic:Nt,useMemoCache:Nt,useCacheRefresh:Nt};Zl.useEffectEvent=Nt;var bv={readContext:en,use:Zc,useCallback:function(n,i){return un().memoizedState=[n,i===void 0?null:i],n},useContext:en,useEffect:tv,useImperativeHandle:function(n,i,o){o=o!=null?o.concat([n]):null,Jc(4194308,4,rv.bind(null,i,n),o)},useLayoutEffect:function(n,i){return Jc(4194308,4,n,i)},useInsertionEffect:function(n,i){Jc(4,2,n,i)},useMemo:function(n,i){var o=un();i=i===void 0?null:i;var s=n();if(gr){ie(!0);try{n()}finally{ie(!1)}}return o.memoizedState=[s,i],s},useReducer:function(n,i,o){var s=un();if(o!==void 0){var f=o(i);if(gr){ie(!0);try{o(i)}finally{ie(!1)}}}else f=i;return s.memoizedState=s.baseState=f,n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:n,lastRenderedState:f},s.queue=n,n=n.dispatch=rN.bind(null,Fe,n),[s.memoizedState,n]},useRef:function(n){var i=un();return n={current:n},i.memoizedState=n},useState:function(n){n=yh(n);var i=n.queue,o=pv.bind(null,Fe,i);return i.dispatch=o,[n.memoizedState,o]},useDebugValue:xh,useDeferredValue:function(n,i){var o=un();return wh(o,n,i)},useTransition:function(){var n=yh(!1);return n=uv.bind(null,Fe,n.queue,!0,!1),un().memoizedState=n,[!1,n]},useSyncExternalStore:function(n,i,o){var s=Fe,f=un();if(et){if(o===void 0)throw Error(r(407));o=o()}else{if(o=i(),bt===null)throw Error(r(349));(Ze&127)!==0||I0(s,i,o)}f.memoizedState=o;var h={value:o,getSnapshot:i};return f.queue=h,tv(B0.bind(null,s,h,n),[n]),s.flags|=2048,ko(9,{destroy:void 0},H0.bind(null,s,h,o,i),null),o},useId:function(){var n=un(),i=bt.identifierPrefix;if(et){var o=fi,s=di;o=(s&~(1<<32-be(s)-1)).toString(32)+o,i="_"+i+"R_"+o,o=Qc++,0<o&&(i+="H"+o.toString(32)),i+="_"}else o=WA++,i="_"+i+"r_"+o.toString(32)+"_";return n.memoizedState=i},useHostTransitionStatus:Sh,useFormState:X0,useActionState:X0,useOptimistic:function(n){var i=un();i.memoizedState=i.baseState=n;var o={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return i.queue=o,i=Eh.bind(null,Fe,!0,o),o.dispatch=i,[n,i]},useMemoCache:mh,useCacheRefresh:function(){return un().memoizedState=aN.bind(null,Fe)},useEffectEvent:function(n){var i=un(),o={impl:n};return i.memoizedState=o,function(){if((lt&2)!==0)throw Error(r(440));return o.impl.apply(void 0,arguments)}}},_h={readContext:en,use:Zc,useCallback:lv,useContext:en,useEffect:vh,useImperativeHandle:ov,useInsertionEffect:iv,useLayoutEffect:av,useMemo:sv,useReducer:Wc,useRef:ev,useState:function(){return Wc(Ri)},useDebugValue:xh,useDeferredValue:function(n,i){var o=Dt();return cv(o,mt.memoizedState,n,i)},useTransition:function(){var n=Wc(Ri)[0],i=Dt().memoizedState;return[typeof n=="boolean"?n:Ql(n),i]},useSyncExternalStore:U0,useId:hv,useHostTransitionStatus:Sh,useFormState:Z0,useActionState:Z0,useOptimistic:function(n,i){var o=Dt();return P0(o,mt,n,i)},useMemoCache:mh,useCacheRefresh:mv};_h.useEffectEvent=nv;var vv={readContext:en,use:Zc,useCallback:lv,useContext:en,useEffect:vh,useImperativeHandle:ov,useInsertionEffect:iv,useLayoutEffect:av,useMemo:sv,useReducer:gh,useRef:ev,useState:function(){return gh(Ri)},useDebugValue:xh,useDeferredValue:function(n,i){var o=Dt();return mt===null?wh(o,n,i):cv(o,mt.memoizedState,n,i)},useTransition:function(){var n=gh(Ri)[0],i=Dt().memoizedState;return[typeof n=="boolean"?n:Ql(n),i]},useSyncExternalStore:U0,useId:hv,useHostTransitionStatus:Sh,useFormState:J0,useActionState:J0,useOptimistic:function(n,i){var o=Dt();return mt!==null?P0(o,mt,n,i):(o.baseState=n,[n,o.queue.dispatch])},useMemoCache:mh,useCacheRefresh:mv};vv.useEffectEvent=nv;function jh(n,i,o,s){i=n.memoizedState,o=o(s,i),o=o==null?i:v({},i,o),n.memoizedState=o,n.lanes===0&&(n.updateQueue.baseState=o)}var Oh={enqueueSetState:function(n,i,o){n=n._reactInternals;var s=Ln(),f=ra(s);f.payload=i,o!=null&&(f.callback=o),i=oa(n,f,s),i!==null&&(kn(i,n,s),Vl(i,n,s))},enqueueReplaceState:function(n,i,o){n=n._reactInternals;var s=Ln(),f=ra(s);f.tag=1,f.payload=i,o!=null&&(f.callback=o),i=oa(n,f,s),i!==null&&(kn(i,n,s),Vl(i,n,s))},enqueueForceUpdate:function(n,i){n=n._reactInternals;var o=Ln(),s=ra(o);s.tag=2,i!=null&&(s.callback=i),i=oa(n,s,o),i!==null&&(kn(i,n,o),Vl(i,n,o))}};function xv(n,i,o,s,f,h,y){return n=n.stateNode,typeof n.shouldComponentUpdate=="function"?n.shouldComponentUpdate(s,h,y):i.prototype&&i.prototype.isPureReactComponent?!$l(o,s)||!$l(f,h):!0}function wv(n,i,o,s){n=i.state,typeof i.componentWillReceiveProps=="function"&&i.componentWillReceiveProps(o,s),typeof i.UNSAFE_componentWillReceiveProps=="function"&&i.UNSAFE_componentWillReceiveProps(o,s),i.state!==n&&Oh.enqueueReplaceState(i,i.state,null)}function yr(n,i){var o=i;if("ref"in i){o={};for(var s in i)s!=="ref"&&(o[s]=i[s])}if(n=n.defaultProps){o===i&&(o=v({},o));for(var f in n)o[f]===void 0&&(o[f]=n[f])}return o}function kv(n){Tc(n)}function Sv(n){console.error(n)}function Ev(n){Tc(n)}function nu(n,i){try{var o=n.onUncaughtError;o(i.value,{componentStack:i.stack})}catch(s){setTimeout(function(){throw s})}}function _v(n,i,o){try{var s=n.onCaughtError;s(o.value,{componentStack:o.stack,errorBoundary:i.tag===1?i.stateNode:null})}catch(f){setTimeout(function(){throw f})}}function Ah(n,i,o){return o=ra(o),o.tag=3,o.payload={element:null},o.callback=function(){nu(n,i)},o}function jv(n){return n=ra(n),n.tag=3,n}function Ov(n,i,o,s){var f=o.type.getDerivedStateFromError;if(typeof f=="function"){var h=s.value;n.payload=function(){return f(h)},n.callback=function(){_v(i,o,s)}}var y=o.stateNode;y!==null&&typeof y.componentDidCatch=="function"&&(n.callback=function(){_v(i,o,s),typeof f!="function"&&(fa===null?fa=new Set([this]):fa.add(this));var S=s.stack;this.componentDidCatch(s.value,{componentStack:S!==null?S:""})})}function oN(n,i,o,s,f){if(o.flags|=32768,s!==null&&typeof s=="object"&&typeof s.then=="function"){if(i=o.alternate,i!==null&&mo(i,o,f,!0),o=Cn.current,o!==null){switch(o.tag){case 31:case 13:return Xn===null?mu():o.alternate===null&&Mt===0&&(Mt=3),o.flags&=-257,o.flags|=65536,o.lanes=f,s===Fc?o.flags|=16384:(i=o.updateQueue,i===null?o.updateQueue=new Set([s]):i.add(s),Jh(n,s,f)),!1;case 22:return o.flags|=65536,s===Fc?o.flags|=16384:(i=o.updateQueue,i===null?(i={transitions:null,markerInstances:null,retryQueue:new Set([s])},o.updateQueue=i):(o=i.retryQueue,o===null?i.retryQueue=new Set([s]):o.add(s)),Jh(n,s,f)),!1}throw Error(r(435,o.tag))}return Jh(n,s,f),mu(),!1}if(et)return i=Cn.current,i!==null?((i.flags&65536)===0&&(i.flags|=256),i.flags|=65536,i.lanes=f,s!==Kf&&(n=Error(r(422),{cause:s}),Hl(Gn(n,o)))):(s!==Kf&&(i=Error(r(423),{cause:s}),Hl(Gn(i,o))),n=n.current.alternate,n.flags|=65536,f&=-f,n.lanes|=f,s=Gn(s,o),f=Ah(n.stateNode,s,f),ah(n,f),Mt!==4&&(Mt=2)),!1;var h=Error(r(520),{cause:s});if(h=Gn(h,o),rs===null?rs=[h]:rs.push(h),Mt!==4&&(Mt=2),i===null)return!0;s=Gn(s,o),o=i;do{switch(o.tag){case 3:return o.flags|=65536,n=f&-f,o.lanes|=n,n=Ah(o.stateNode,s,n),ah(o,n),!1;case 1:if(i=o.type,h=o.stateNode,(o.flags&128)===0&&(typeof i.getDerivedStateFromError=="function"||h!==null&&typeof h.componentDidCatch=="function"&&(fa===null||!fa.has(h))))return o.flags|=65536,f&=-f,o.lanes|=f,f=jv(f),Ov(f,n,o,s),ah(o,f),!1}o=o.return}while(o!==null);return!1}var Nh=Error(r(461)),Ut=!1;function tn(n,i,o,s){i.child=n===null?C0(i,null,o,s):pr(i,n.child,o,s)}function Av(n,i,o,s,f){o=o.render;var h=i.ref;if("ref"in s){var y={};for(var S in s)S!=="ref"&&(y[S]=s[S])}else y=s;return dr(i),s=uh(n,i,o,y,h,f),S=dh(),n!==null&&!Ut?(fh(n,i,f),Ti(n,i,f)):(et&&S&&Vf(i),i.flags|=1,tn(n,i,s,f),i.child)}function Nv(n,i,o,s,f){if(n===null){var h=o.type;return typeof h=="function"&&!qf(h)&&h.defaultProps===void 0&&o.compare===null?(i.tag=15,i.type=h,Mv(n,i,h,s,f)):(n=$c(o.type,null,s,i,i.mode,f),n.ref=i.ref,n.return=i,i.child=n)}if(h=n.child,!$h(n,f)){var y=h.memoizedProps;if(o=o.compare,o=o!==null?o:$l,o(y,s)&&n.ref===i.ref)return Ti(n,i,f)}return i.flags|=1,n=Oi(h,s),n.ref=i.ref,n.return=i,i.child=n}function Mv(n,i,o,s,f){if(n!==null){var h=n.memoizedProps;if($l(h,s)&&n.ref===i.ref)if(Ut=!1,i.pendingProps=s=h,$h(n,f))(n.flags&131072)!==0&&(Ut=!0);else return i.lanes=n.lanes,Ti(n,i,f)}return Mh(n,i,o,s,f)}function Cv(n,i,o,s){var f=s.children,h=n!==null?n.memoizedState:null;if(n===null&&i.stateNode===null&&(i.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),s.mode==="hidden"){if((i.flags&128)!==0){if(h=h!==null?h.baseLanes|o:o,n!==null){for(s=i.child=n.child,f=0;s!==null;)f=f|s.lanes|s.childLanes,s=s.sibling;s=f&~h}else s=0,i.child=null;return Rv(n,i,h,o,s)}if((o&536870912)!==0)i.memoizedState={baseLanes:0,cachePool:null},n!==null&&Bc(i,h!==null?h.cachePool:null),h!==null?D0(i,h):oh(),L0(i);else return s=i.lanes=536870912,Rv(n,i,h!==null?h.baseLanes|o:o,o,s)}else h!==null?(Bc(i,h.cachePool),D0(i,h),sa(),i.memoizedState=null):(n!==null&&Bc(i,null),oh(),sa());return tn(n,i,f,o),i.child}function Wl(n,i){return n!==null&&n.tag===22||i.stateNode!==null||(i.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),i.sibling}function Rv(n,i,o,s,f){var h=eh();return h=h===null?null:{parent:zt._currentValue,pool:h},i.memoizedState={baseLanes:o,cachePool:h},n!==null&&Bc(i,null),oh(),L0(i),n!==null&&mo(n,i,s,!0),i.childLanes=f,null}function iu(n,i){return i=ru({mode:i.mode,children:i.children},n.mode),i.ref=n.ref,n.child=i,i.return=n,i}function Tv(n,i,o){return pr(i,n.child,null,o),n=iu(i,i.pendingProps),n.flags|=2,Rn(i),i.memoizedState=null,n}function lN(n,i,o){var s=i.pendingProps,f=(i.flags&128)!==0;if(i.flags&=-129,n===null){if(et){if(s.mode==="hidden")return n=iu(i,s),i.lanes=536870912,Wl(null,n);if(sh(i),(n=xt)?(n=V1(n,Qn),n=n!==null&&n.data==="&"?n:null,n!==null&&(i.memoizedState={dehydrated:n,treeContext:ea!==null?{id:di,overflow:fi}:null,retryLane:536870912,hydrationErrors:null},o=g0(n),o.return=i,i.child=o,Jt=i,xt=null)):n=null,n===null)throw na(i);return i.lanes=536870912,null}return iu(i,s)}var h=n.memoizedState;if(h!==null){var y=h.dehydrated;if(sh(i),f)if(i.flags&256)i.flags&=-257,i=Tv(n,i,o);else if(i.memoizedState!==null)i.child=n.child,i.flags|=128,i=null;else throw Error(r(558));else if(Ut||mo(n,i,o,!1),f=(o&n.childLanes)!==0,Ut||f){if(s=bt,s!==null&&(y=re(s,o),y!==0&&y!==h.retryLane))throw h.retryLane=y,lr(n,y),kn(s,n,y),Nh;mu(),i=Tv(n,i,o)}else n=h.treeContext,xt=Zn(y.nextSibling),Jt=i,et=!0,ta=null,Qn=!1,n!==null&&v0(i,n),i=iu(i,s),i.flags|=4096;return i}return n=Oi(n.child,{mode:s.mode,children:s.children}),n.ref=i.ref,i.child=n,n.return=i,n}function au(n,i){var o=i.ref;if(o===null)n!==null&&n.ref!==null&&(i.flags|=4194816);else{if(typeof o!="function"&&typeof o!="object")throw Error(r(284));(n===null||n.ref!==o)&&(i.flags|=4194816)}}function Mh(n,i,o,s,f){return dr(i),o=uh(n,i,o,s,void 0,f),s=dh(),n!==null&&!Ut?(fh(n,i,f),Ti(n,i,f)):(et&&s&&Vf(i),i.flags|=1,tn(n,i,o,f),i.child)}function Dv(n,i,o,s,f,h){return dr(i),i.updateQueue=null,o=$0(i,s,o,f),z0(n),s=dh(),n!==null&&!Ut?(fh(n,i,h),Ti(n,i,h)):(et&&s&&Vf(i),i.flags|=1,tn(n,i,o,h),i.child)}function Lv(n,i,o,s,f){if(dr(i),i.stateNode===null){var h=co,y=o.contextType;typeof y=="object"&&y!==null&&(h=en(y)),h=new o(s,h),i.memoizedState=h.state!==null&&h.state!==void 0?h.state:null,h.updater=Oh,i.stateNode=h,h._reactInternals=i,h=i.stateNode,h.props=s,h.state=i.memoizedState,h.refs={},nh(i),y=o.contextType,h.context=typeof y=="object"&&y!==null?en(y):co,h.state=i.memoizedState,y=o.getDerivedStateFromProps,typeof y=="function"&&(jh(i,o,y,s),h.state=i.memoizedState),typeof o.getDerivedStateFromProps=="function"||typeof h.getSnapshotBeforeUpdate=="function"||typeof h.UNSAFE_componentWillMount!="function"&&typeof h.componentWillMount!="function"||(y=h.state,typeof h.componentWillMount=="function"&&h.componentWillMount(),typeof h.UNSAFE_componentWillMount=="function"&&h.UNSAFE_componentWillMount(),y!==h.state&&Oh.enqueueReplaceState(h,h.state,null),Kl(i,s,h,f),Gl(),h.state=i.memoizedState),typeof h.componentDidMount=="function"&&(i.flags|=4194308),s=!0}else if(n===null){h=i.stateNode;var S=i.memoizedProps,U=yr(o,S);h.props=U;var W=h.context,de=o.contextType;y=co,typeof de=="object"&&de!==null&&(y=en(de));var he=o.getDerivedStateFromProps;de=typeof he=="function"||typeof h.getSnapshotBeforeUpdate=="function",S=i.pendingProps!==S,de||typeof h.UNSAFE_componentWillReceiveProps!="function"&&typeof h.componentWillReceiveProps!="function"||(S||W!==y)&&wv(i,h,s,y),aa=!1;var J=i.memoizedState;h.state=J,Kl(i,s,h,f),Gl(),W=i.memoizedState,S||J!==W||aa?(typeof he=="function"&&(jh(i,o,he,s),W=i.memoizedState),(U=aa||xv(i,o,U,s,J,W,y))?(de||typeof h.UNSAFE_componentWillMount!="function"&&typeof h.componentWillMount!="function"||(typeof h.componentWillMount=="function"&&h.componentWillMount(),typeof h.UNSAFE_componentWillMount=="function"&&h.UNSAFE_componentWillMount()),typeof h.componentDidMount=="function"&&(i.flags|=4194308)):(typeof h.componentDidMount=="function"&&(i.flags|=4194308),i.memoizedProps=s,i.memoizedState=W),h.props=s,h.state=W,h.context=y,s=U):(typeof h.componentDidMount=="function"&&(i.flags|=4194308),s=!1)}else{h=i.stateNode,ih(n,i),y=i.memoizedProps,de=yr(o,y),h.props=de,he=i.pendingProps,J=h.context,W=o.contextType,U=co,typeof W=="object"&&W!==null&&(U=en(W)),S=o.getDerivedStateFromProps,(W=typeof S=="function"||typeof h.getSnapshotBeforeUpdate=="function")||typeof h.UNSAFE_componentWillReceiveProps!="function"&&typeof h.componentWillReceiveProps!="function"||(y!==he||J!==U)&&wv(i,h,s,U),aa=!1,J=i.memoizedState,h.state=J,Kl(i,s,h,f),Gl();var oe=i.memoizedState;y!==he||J!==oe||aa||n!==null&&n.dependencies!==null&&Ic(n.dependencies)?(typeof S=="function"&&(jh(i,o,S,s),oe=i.memoizedState),(de=aa||xv(i,o,de,s,J,oe,U)||n!==null&&n.dependencies!==null&&Ic(n.dependencies))?(W||typeof h.UNSAFE_componentWillUpdate!="function"&&typeof h.componentWillUpdate!="function"||(typeof h.componentWillUpdate=="function"&&h.componentWillUpdate(s,oe,U),typeof h.UNSAFE_componentWillUpdate=="function"&&h.UNSAFE_componentWillUpdate(s,oe,U)),typeof h.componentDidUpdate=="function"&&(i.flags|=4),typeof h.getSnapshotBeforeUpdate=="function"&&(i.flags|=1024)):(typeof h.componentDidUpdate!="function"||y===n.memoizedProps&&J===n.memoizedState||(i.flags|=4),typeof h.getSnapshotBeforeUpdate!="function"||y===n.memoizedProps&&J===n.memoizedState||(i.flags|=1024),i.memoizedProps=s,i.memoizedState=oe),h.props=s,h.state=oe,h.context=U,s=de):(typeof h.componentDidUpdate!="function"||y===n.memoizedProps&&J===n.memoizedState||(i.flags|=4),typeof h.getSnapshotBeforeUpdate!="function"||y===n.memoizedProps&&J===n.memoizedState||(i.flags|=1024),s=!1)}return h=s,au(n,i),s=(i.flags&128)!==0,h||s?(h=i.stateNode,o=s&&typeof o.getDerivedStateFromError!="function"?null:h.render(),i.flags|=1,n!==null&&s?(i.child=pr(i,n.child,null,f),i.child=pr(i,null,o,f)):tn(n,i,o,f),i.memoizedState=h.state,n=i.child):n=Ti(n,i,f),n}function zv(n,i,o,s){return cr(),i.flags|=256,tn(n,i,o,s),i.child}var Ch={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function Rh(n){return{baseLanes:n,cachePool:_0()}}function Th(n,i,o){return n=n!==null?n.childLanes&~o:0,i&&(n|=Dn),n}function $v(n,i,o){var s=i.pendingProps,f=!1,h=(i.flags&128)!==0,y;if((y=h)||(y=n!==null&&n.memoizedState===null?!1:(Tt.current&2)!==0),y&&(f=!0,i.flags&=-129),y=(i.flags&32)!==0,i.flags&=-33,n===null){if(et){if(f?la(i):sa(),(n=xt)?(n=V1(n,Qn),n=n!==null&&n.data!=="&"?n:null,n!==null&&(i.memoizedState={dehydrated:n,treeContext:ea!==null?{id:di,overflow:fi}:null,retryLane:536870912,hydrationErrors:null},o=g0(n),o.return=i,i.child=o,Jt=i,xt=null)):n=null,n===null)throw na(i);return pm(n)?i.lanes=32:i.lanes=536870912,null}var S=s.children;return s=s.fallback,f?(sa(),f=i.mode,S=ru({mode:"hidden",children:S},f),s=sr(s,f,o,null),S.return=i,s.return=i,S.sibling=s,i.child=S,s=i.child,s.memoizedState=Rh(o),s.childLanes=Th(n,y,o),i.memoizedState=Ch,Wl(null,s)):(la(i),Dh(i,S))}var U=n.memoizedState;if(U!==null&&(S=U.dehydrated,S!==null)){if(h)i.flags&256?(la(i),i.flags&=-257,i=Lh(n,i,o)):i.memoizedState!==null?(sa(),i.child=n.child,i.flags|=128,i=null):(sa(),S=s.fallback,f=i.mode,s=ru({mode:"visible",children:s.children},f),S=sr(S,f,o,null),S.flags|=2,s.return=i,S.return=i,s.sibling=S,i.child=s,pr(i,n.child,null,o),s=i.child,s.memoizedState=Rh(o),s.childLanes=Th(n,y,o),i.memoizedState=Ch,i=Wl(null,s));else if(la(i),pm(S)){if(y=S.nextSibling&&S.nextSibling.dataset,y)var W=y.dgst;y=W,s=Error(r(419)),s.stack="",s.digest=y,Hl({value:s,source:null,stack:null}),i=Lh(n,i,o)}else if(Ut||mo(n,i,o,!1),y=(o&n.childLanes)!==0,Ut||y){if(y=bt,y!==null&&(s=re(y,o),s!==0&&s!==U.retryLane))throw U.retryLane=s,lr(n,s),kn(y,n,s),Nh;mm(S)||mu(),i=Lh(n,i,o)}else mm(S)?(i.flags|=192,i.child=n.child,i=null):(n=U.treeContext,xt=Zn(S.nextSibling),Jt=i,et=!0,ta=null,Qn=!1,n!==null&&v0(i,n),i=Dh(i,s.children),i.flags|=4096);return i}return f?(sa(),S=s.fallback,f=i.mode,U=n.child,W=U.sibling,s=Oi(U,{mode:"hidden",children:s.children}),s.subtreeFlags=U.subtreeFlags&65011712,W!==null?S=Oi(W,S):(S=sr(S,f,o,null),S.flags|=2),S.return=i,s.return=i,s.sibling=S,i.child=s,Wl(null,s),s=i.child,S=n.child.memoizedState,S===null?S=Rh(o):(f=S.cachePool,f!==null?(U=zt._currentValue,f=f.parent!==U?{parent:U,pool:U}:f):f=_0(),S={baseLanes:S.baseLanes|o,cachePool:f}),s.memoizedState=S,s.childLanes=Th(n,y,o),i.memoizedState=Ch,Wl(n.child,s)):(la(i),o=n.child,n=o.sibling,o=Oi(o,{mode:"visible",children:s.children}),o.return=i,o.sibling=null,n!==null&&(y=i.deletions,y===null?(i.deletions=[n],i.flags|=16):y.push(n)),i.child=o,i.memoizedState=null,o)}function Dh(n,i){return i=ru({mode:"visible",children:i},n.mode),i.return=n,n.child=i}function ru(n,i){return n=Mn(22,n,null,i),n.lanes=0,n}function Lh(n,i,o){return pr(i,n.child,null,o),n=Dh(i,i.pendingProps.children),n.flags|=2,i.memoizedState=null,n}function Uv(n,i,o){n.lanes|=i;var s=n.alternate;s!==null&&(s.lanes|=i),Xf(n.return,i,o)}function zh(n,i,o,s,f,h){var y=n.memoizedState;y===null?n.memoizedState={isBackwards:i,rendering:null,renderingStartTime:0,last:s,tail:o,tailMode:f,treeForkCount:h}:(y.isBackwards=i,y.rendering=null,y.renderingStartTime=0,y.last=s,y.tail=o,y.tailMode=f,y.treeForkCount=h)}function Iv(n,i,o){var s=i.pendingProps,f=s.revealOrder,h=s.tail;s=s.children;var y=Tt.current,S=(y&2)!==0;if(S?(y=y&1|2,i.flags|=128):y&=1,I(Tt,y),tn(n,i,s,o),s=et?Il:0,!S&&n!==null&&(n.flags&128)!==0)e:for(n=i.child;n!==null;){if(n.tag===13)n.memoizedState!==null&&Uv(n,o,i);else if(n.tag===19)Uv(n,o,i);else if(n.child!==null){n.child.return=n,n=n.child;continue}if(n===i)break e;for(;n.sibling===null;){if(n.return===null||n.return===i)break e;n=n.return}n.sibling.return=n.return,n=n.sibling}switch(f){case"forwards":for(o=i.child,f=null;o!==null;)n=o.alternate,n!==null&&Kc(n)===null&&(f=o),o=o.sibling;o=f,o===null?(f=i.child,i.child=null):(f=o.sibling,o.sibling=null),zh(i,!1,f,o,h,s);break;case"backwards":case"unstable_legacy-backwards":for(o=null,f=i.child,i.child=null;f!==null;){if(n=f.alternate,n!==null&&Kc(n)===null){i.child=f;break}n=f.sibling,f.sibling=o,o=f,f=n}zh(i,!0,o,null,h,s);break;case"together":zh(i,!1,null,null,void 0,s);break;default:i.memoizedState=null}return i.child}function Ti(n,i,o){if(n!==null&&(i.dependencies=n.dependencies),da|=i.lanes,(o&i.childLanes)===0)if(n!==null){if(mo(n,i,o,!1),(o&i.childLanes)===0)return null}else return null;if(n!==null&&i.child!==n.child)throw Error(r(153));if(i.child!==null){for(n=i.child,o=Oi(n,n.pendingProps),i.child=o,o.return=i;n.sibling!==null;)n=n.sibling,o=o.sibling=Oi(n,n.pendingProps),o.return=i;o.sibling=null}return i.child}function $h(n,i){return(n.lanes&i)!==0?!0:(n=n.dependencies,!!(n!==null&&Ic(n)))}function sN(n,i,o){switch(i.tag){case 3:ke(i,i.stateNode.containerInfo),ia(i,zt,n.memoizedState.cache),cr();break;case 27:case 5:ce(i);break;case 4:ke(i,i.stateNode.containerInfo);break;case 10:ia(i,i.type,i.memoizedProps.value);break;case 31:if(i.memoizedState!==null)return i.flags|=128,sh(i),null;break;case 13:var s=i.memoizedState;if(s!==null)return s.dehydrated!==null?(la(i),i.flags|=128,null):(o&i.child.childLanes)!==0?$v(n,i,o):(la(i),n=Ti(n,i,o),n!==null?n.sibling:null);la(i);break;case 19:var f=(n.flags&128)!==0;if(s=(o&i.childLanes)!==0,s||(mo(n,i,o,!1),s=(o&i.childLanes)!==0),f){if(s)return Iv(n,i,o);i.flags|=128}if(f=i.memoizedState,f!==null&&(f.rendering=null,f.tail=null,f.lastEffect=null),I(Tt,Tt.current),s)break;return null;case 22:return i.lanes=0,Cv(n,i,o,i.pendingProps);case 24:ia(i,zt,n.memoizedState.cache)}return Ti(n,i,o)}function Hv(n,i,o){if(n!==null)if(n.memoizedProps!==i.pendingProps)Ut=!0;else{if(!$h(n,o)&&(i.flags&128)===0)return Ut=!1,sN(n,i,o);Ut=(n.flags&131072)!==0}else Ut=!1,et&&(i.flags&1048576)!==0&&b0(i,Il,i.index);switch(i.lanes=0,i.tag){case 16:e:{var s=i.pendingProps;if(n=hr(i.elementType),i.type=n,typeof n=="function")qf(n)?(s=yr(n,s),i.tag=1,i=Lv(null,i,n,s,o)):(i.tag=0,i=Mh(null,i,n,s,o));else{if(n!=null){var f=n.$$typeof;if(f===D){i.tag=11,i=Av(null,i,n,s,o);break e}else if(f===L){i.tag=14,i=Nv(null,i,n,s,o);break e}}throw i=X(n)||n,Error(r(306,i,""))}}return i;case 0:return Mh(n,i,i.type,i.pendingProps,o);case 1:return s=i.type,f=yr(s,i.pendingProps),Lv(n,i,s,f,o);case 3:e:{if(ke(i,i.stateNode.containerInfo),n===null)throw Error(r(387));s=i.pendingProps;var h=i.memoizedState;f=h.element,ih(n,i),Kl(i,s,null,o);var y=i.memoizedState;if(s=y.cache,ia(i,zt,s),s!==h.cache&&Zf(i,[zt],o,!0),Gl(),s=y.element,h.isDehydrated)if(h={element:s,isDehydrated:!1,cache:y.cache},i.updateQueue.baseState=h,i.memoizedState=h,i.flags&256){i=zv(n,i,s,o);break e}else if(s!==f){f=Gn(Error(r(424)),i),Hl(f),i=zv(n,i,s,o);break e}else{switch(n=i.stateNode.containerInfo,n.nodeType){case 9:n=n.body;break;default:n=n.nodeName==="HTML"?n.ownerDocument.body:n}for(xt=Zn(n.firstChild),Jt=i,et=!0,ta=null,Qn=!0,o=C0(i,null,s,o),i.child=o;o;)o.flags=o.flags&-3|4096,o=o.sibling}else{if(cr(),s===f){i=Ti(n,i,o);break e}tn(n,i,s,o)}i=i.child}return i;case 26:return au(n,i),n===null?(o=Z1(i.type,null,i.pendingProps,null))?i.memoizedState=o:et||(o=i.type,n=i.pendingProps,s=wu(pe.current).createElement(o),s[Ot]=i,s[gn]=n,nn(s,o,n),Yt(s),i.stateNode=s):i.memoizedState=Z1(i.type,n.memoizedProps,i.pendingProps,n.memoizedState),null;case 27:return ce(i),n===null&&et&&(s=i.stateNode=Y1(i.type,i.pendingProps,pe.current),Jt=i,Qn=!0,f=xt,ga(i.type)?(gm=f,xt=Zn(s.firstChild)):xt=f),tn(n,i,i.pendingProps.children,o),au(n,i),n===null&&(i.flags|=4194304),i.child;case 5:return n===null&&et&&((f=s=xt)&&(s=UN(s,i.type,i.pendingProps,Qn),s!==null?(i.stateNode=s,Jt=i,xt=Zn(s.firstChild),Qn=!1,f=!0):f=!1),f||na(i)),ce(i),f=i.type,h=i.pendingProps,y=n!==null?n.memoizedProps:null,s=h.children,dm(f,h)?s=null:y!==null&&dm(f,y)&&(i.flags|=32),i.memoizedState!==null&&(f=uh(n,i,JA,null,null,o),hs._currentValue=f),au(n,i),tn(n,i,s,o),i.child;case 6:return n===null&&et&&((n=o=xt)&&(o=IN(o,i.pendingProps,Qn),o!==null?(i.stateNode=o,Jt=i,xt=null,n=!0):n=!1),n||na(i)),null;case 13:return $v(n,i,o);case 4:return ke(i,i.stateNode.containerInfo),s=i.pendingProps,n===null?i.child=pr(i,null,s,o):tn(n,i,s,o),i.child;case 11:return Av(n,i,i.type,i.pendingProps,o);case 7:return tn(n,i,i.pendingProps,o),i.child;case 8:return tn(n,i,i.pendingProps.children,o),i.child;case 12:return tn(n,i,i.pendingProps.children,o),i.child;case 10:return s=i.pendingProps,ia(i,i.type,s.value),tn(n,i,s.children,o),i.child;case 9:return f=i.type._context,s=i.pendingProps.children,dr(i),f=en(f),s=s(f),i.flags|=1,tn(n,i,s,o),i.child;case 14:return Nv(n,i,i.type,i.pendingProps,o);case 15:return Mv(n,i,i.type,i.pendingProps,o);case 19:return Iv(n,i,o);case 31:return lN(n,i,o);case 22:return Cv(n,i,o,i.pendingProps);case 24:return dr(i),s=en(zt),n===null?(f=eh(),f===null&&(f=bt,h=Wf(),f.pooledCache=h,h.refCount++,h!==null&&(f.pooledCacheLanes|=o),f=h),i.memoizedState={parent:s,cache:f},nh(i),ia(i,zt,f)):((n.lanes&o)!==0&&(ih(n,i),Kl(i,null,null,o),Gl()),f=n.memoizedState,h=i.memoizedState,f.parent!==s?(f={parent:s,cache:s},i.memoizedState=f,i.lanes===0&&(i.memoizedState=i.updateQueue.baseState=f),ia(i,zt,s)):(s=h.cache,ia(i,zt,s),s!==f.cache&&Zf(i,[zt],o,!0))),tn(n,i,i.pendingProps.children,o),i.child;case 29:throw i.pendingProps}throw Error(r(156,i.tag))}function Di(n){n.flags|=4}function Uh(n,i,o,s,f){if((i=(n.mode&32)!==0)&&(i=!1),i){if(n.flags|=16777216,(f&335544128)===f)if(n.stateNode.complete)n.flags|=8192;else if(h1())n.flags|=8192;else throw mr=Fc,th}else n.flags&=-16777217}function Bv(n,i){if(i.type!=="stylesheet"||(i.state.loading&4)!==0)n.flags&=-16777217;else if(n.flags|=16777216,!nx(i))if(h1())n.flags|=8192;else throw mr=Fc,th}function ou(n,i){i!==null&&(n.flags|=4),n.flags&16384&&(i=n.tag!==22?An():536870912,n.lanes|=i,jo|=i)}function Jl(n,i){if(!et)switch(n.tailMode){case"hidden":i=n.tail;for(var o=null;i!==null;)i.alternate!==null&&(o=i),i=i.sibling;o===null?n.tail=null:o.sibling=null;break;case"collapsed":o=n.tail;for(var s=null;o!==null;)o.alternate!==null&&(s=o),o=o.sibling;s===null?i||n.tail===null?n.tail=null:n.tail.sibling=null:s.sibling=null}}function wt(n){var i=n.alternate!==null&&n.alternate.child===n.child,o=0,s=0;if(i)for(var f=n.child;f!==null;)o|=f.lanes|f.childLanes,s|=f.subtreeFlags&65011712,s|=f.flags&65011712,f.return=n,f=f.sibling;else for(f=n.child;f!==null;)o|=f.lanes|f.childLanes,s|=f.subtreeFlags,s|=f.flags,f.return=n,f=f.sibling;return n.subtreeFlags|=s,n.childLanes=o,i}function cN(n,i,o){var s=i.pendingProps;switch(Gf(i),i.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return wt(i),null;case 1:return wt(i),null;case 3:return o=i.stateNode,s=null,n!==null&&(s=n.memoizedState.cache),i.memoizedState.cache!==s&&(i.flags|=2048),Mi(zt),z(),o.pendingContext&&(o.context=o.pendingContext,o.pendingContext=null),(n===null||n.child===null)&&(ho(i)?Di(i):n===null||n.memoizedState.isDehydrated&&(i.flags&256)===0||(i.flags|=1024,Yf())),wt(i),null;case 26:var f=i.type,h=i.memoizedState;return n===null?(Di(i),h!==null?(wt(i),Bv(i,h)):(wt(i),Uh(i,f,null,s,o))):h?h!==n.memoizedState?(Di(i),wt(i),Bv(i,h)):(wt(i),i.flags&=-16777217):(n=n.memoizedProps,n!==s&&Di(i),wt(i),Uh(i,f,n,s,o)),null;case 27:if(ge(i),o=pe.current,f=i.type,n!==null&&i.stateNode!=null)n.memoizedProps!==s&&Di(i);else{if(!s){if(i.stateNode===null)throw Error(r(166));return wt(i),null}n=P.current,ho(i)?x0(i):(n=Y1(f,s,o),i.stateNode=n,Di(i))}return wt(i),null;case 5:if(ge(i),f=i.type,n!==null&&i.stateNode!=null)n.memoizedProps!==s&&Di(i);else{if(!s){if(i.stateNode===null)throw Error(r(166));return wt(i),null}if(h=P.current,ho(i))x0(i);else{var y=wu(pe.current);switch(h){case 1:h=y.createElementNS("http://www.w3.org/2000/svg",f);break;case 2:h=y.createElementNS("http://www.w3.org/1998/Math/MathML",f);break;default:switch(f){case"svg":h=y.createElementNS("http://www.w3.org/2000/svg",f);break;case"math":h=y.createElementNS("http://www.w3.org/1998/Math/MathML",f);break;case"script":h=y.createElement("div"),h.innerHTML="<script><\/script>",h=h.removeChild(h.firstChild);break;case"select":h=typeof s.is=="string"?y.createElement("select",{is:s.is}):y.createElement("select"),s.multiple?h.multiple=!0:s.size&&(h.size=s.size);break;default:h=typeof s.is=="string"?y.createElement(f,{is:s.is}):y.createElement(f)}}h[Ot]=i,h[gn]=s;e:for(y=i.child;y!==null;){if(y.tag===5||y.tag===6)h.appendChild(y.stateNode);else if(y.tag!==4&&y.tag!==27&&y.child!==null){y.child.return=y,y=y.child;continue}if(y===i)break e;for(;y.sibling===null;){if(y.return===null||y.return===i)break e;y=y.return}y.sibling.return=y.return,y=y.sibling}i.stateNode=h;e:switch(nn(h,f,s),f){case"button":case"input":case"select":case"textarea":s=!!s.autoFocus;break e;case"img":s=!0;break e;default:s=!1}s&&Di(i)}}return wt(i),Uh(i,i.type,n===null?null:n.memoizedProps,i.pendingProps,o),null;case 6:if(n&&i.stateNode!=null)n.memoizedProps!==s&&Di(i);else{if(typeof s!="string"&&i.stateNode===null)throw Error(r(166));if(n=pe.current,ho(i)){if(n=i.stateNode,o=i.memoizedProps,s=null,f=Jt,f!==null)switch(f.tag){case 27:case 5:s=f.memoizedProps}n[Ot]=i,n=!!(n.nodeValue===o||s!==null&&s.suppressHydrationWarning===!0||$1(n.nodeValue,o)),n||na(i,!0)}else n=wu(n).createTextNode(s),n[Ot]=i,i.stateNode=n}return wt(i),null;case 31:if(o=i.memoizedState,n===null||n.memoizedState!==null){if(s=ho(i),o!==null){if(n===null){if(!s)throw Error(r(318));if(n=i.memoizedState,n=n!==null?n.dehydrated:null,!n)throw Error(r(557));n[Ot]=i}else cr(),(i.flags&128)===0&&(i.memoizedState=null),i.flags|=4;wt(i),n=!1}else o=Yf(),n!==null&&n.memoizedState!==null&&(n.memoizedState.hydrationErrors=o),n=!0;if(!n)return i.flags&256?(Rn(i),i):(Rn(i),null);if((i.flags&128)!==0)throw Error(r(558))}return wt(i),null;case 13:if(s=i.memoizedState,n===null||n.memoizedState!==null&&n.memoizedState.dehydrated!==null){if(f=ho(i),s!==null&&s.dehydrated!==null){if(n===null){if(!f)throw Error(r(318));if(f=i.memoizedState,f=f!==null?f.dehydrated:null,!f)throw Error(r(317));f[Ot]=i}else cr(),(i.flags&128)===0&&(i.memoizedState=null),i.flags|=4;wt(i),f=!1}else f=Yf(),n!==null&&n.memoizedState!==null&&(n.memoizedState.hydrationErrors=f),f=!0;if(!f)return i.flags&256?(Rn(i),i):(Rn(i),null)}return Rn(i),(i.flags&128)!==0?(i.lanes=o,i):(o=s!==null,n=n!==null&&n.memoizedState!==null,o&&(s=i.child,f=null,s.alternate!==null&&s.alternate.memoizedState!==null&&s.alternate.memoizedState.cachePool!==null&&(f=s.alternate.memoizedState.cachePool.pool),h=null,s.memoizedState!==null&&s.memoizedState.cachePool!==null&&(h=s.memoizedState.cachePool.pool),h!==f&&(s.flags|=2048)),o!==n&&o&&(i.child.flags|=8192),ou(i,i.updateQueue),wt(i),null);case 4:return z(),n===null&&om(i.stateNode.containerInfo),wt(i),null;case 10:return Mi(i.type),wt(i),null;case 19:if(q(Tt),s=i.memoizedState,s===null)return wt(i),null;if(f=(i.flags&128)!==0,h=s.rendering,h===null)if(f)Jl(s,!1);else{if(Mt!==0||n!==null&&(n.flags&128)!==0)for(n=i.child;n!==null;){if(h=Kc(n),h!==null){for(i.flags|=128,Jl(s,!1),n=h.updateQueue,i.updateQueue=n,ou(i,n),i.subtreeFlags=0,n=o,o=i.child;o!==null;)p0(o,n),o=o.sibling;return I(Tt,Tt.current&1|2),et&&Ai(i,s.treeForkCount),i.child}n=n.sibling}s.tail!==null&&yt()>du&&(i.flags|=128,f=!0,Jl(s,!1),i.lanes=4194304)}else{if(!f)if(n=Kc(h),n!==null){if(i.flags|=128,f=!0,n=n.updateQueue,i.updateQueue=n,ou(i,n),Jl(s,!0),s.tail===null&&s.tailMode==="hidden"&&!h.alternate&&!et)return wt(i),null}else 2*yt()-s.renderingStartTime>du&&o!==536870912&&(i.flags|=128,f=!0,Jl(s,!1),i.lanes=4194304);s.isBackwards?(h.sibling=i.child,i.child=h):(n=s.last,n!==null?n.sibling=h:i.child=h,s.last=h)}return s.tail!==null?(n=s.tail,s.rendering=n,s.tail=n.sibling,s.renderingStartTime=yt(),n.sibling=null,o=Tt.current,I(Tt,f?o&1|2:o&1),et&&Ai(i,s.treeForkCount),n):(wt(i),null);case 22:case 23:return Rn(i),lh(),s=i.memoizedState!==null,n!==null?n.memoizedState!==null!==s&&(i.flags|=8192):s&&(i.flags|=8192),s?(o&536870912)!==0&&(i.flags&128)===0&&(wt(i),i.subtreeFlags&6&&(i.flags|=8192)):wt(i),o=i.updateQueue,o!==null&&ou(i,o.retryQueue),o=null,n!==null&&n.memoizedState!==null&&n.memoizedState.cachePool!==null&&(o=n.memoizedState.cachePool.pool),s=null,i.memoizedState!==null&&i.memoizedState.cachePool!==null&&(s=i.memoizedState.cachePool.pool),s!==o&&(i.flags|=2048),n!==null&&q(fr),null;case 24:return o=null,n!==null&&(o=n.memoizedState.cache),i.memoizedState.cache!==o&&(i.flags|=2048),Mi(zt),wt(i),null;case 25:return null;case 30:return null}throw Error(r(156,i.tag))}function uN(n,i){switch(Gf(i),i.tag){case 1:return n=i.flags,n&65536?(i.flags=n&-65537|128,i):null;case 3:return Mi(zt),z(),n=i.flags,(n&65536)!==0&&(n&128)===0?(i.flags=n&-65537|128,i):null;case 26:case 27:case 5:return ge(i),null;case 31:if(i.memoizedState!==null){if(Rn(i),i.alternate===null)throw Error(r(340));cr()}return n=i.flags,n&65536?(i.flags=n&-65537|128,i):null;case 13:if(Rn(i),n=i.memoizedState,n!==null&&n.dehydrated!==null){if(i.alternate===null)throw Error(r(340));cr()}return n=i.flags,n&65536?(i.flags=n&-65537|128,i):null;case 19:return q(Tt),null;case 4:return z(),null;case 10:return Mi(i.type),null;case 22:case 23:return Rn(i),lh(),n!==null&&q(fr),n=i.flags,n&65536?(i.flags=n&-65537|128,i):null;case 24:return Mi(zt),null;case 25:return null;default:return null}}function qv(n,i){switch(Gf(i),i.tag){case 3:Mi(zt),z();break;case 26:case 27:case 5:ge(i);break;case 4:z();break;case 31:i.memoizedState!==null&&Rn(i);break;case 13:Rn(i);break;case 19:q(Tt);break;case 10:Mi(i.type);break;case 22:case 23:Rn(i),lh(),n!==null&&q(fr);break;case 24:Mi(zt)}}function es(n,i){try{var o=i.updateQueue,s=o!==null?o.lastEffect:null;if(s!==null){var f=s.next;o=f;do{if((o.tag&n)===n){s=void 0;var h=o.create,y=o.inst;s=h(),y.destroy=s}o=o.next}while(o!==f)}}catch(S){ft(i,i.return,S)}}function ca(n,i,o){try{var s=i.updateQueue,f=s!==null?s.lastEffect:null;if(f!==null){var h=f.next;s=h;do{if((s.tag&n)===n){var y=s.inst,S=y.destroy;if(S!==void 0){y.destroy=void 0,f=i;var U=o,W=S;try{W()}catch(de){ft(f,U,de)}}}s=s.next}while(s!==h)}}catch(de){ft(i,i.return,de)}}function Fv(n){var i=n.updateQueue;if(i!==null){var o=n.stateNode;try{T0(i,o)}catch(s){ft(n,n.return,s)}}}function Pv(n,i,o){o.props=yr(n.type,n.memoizedProps),o.state=n.memoizedState;try{o.componentWillUnmount()}catch(s){ft(n,i,s)}}function ts(n,i){try{var o=n.ref;if(o!==null){switch(n.tag){case 26:case 27:case 5:var s=n.stateNode;break;case 30:s=n.stateNode;break;default:s=n.stateNode}typeof o=="function"?n.refCleanup=o(s):o.current=s}}catch(f){ft(n,i,f)}}function hi(n,i){var o=n.ref,s=n.refCleanup;if(o!==null)if(typeof s=="function")try{s()}catch(f){ft(n,i,f)}finally{n.refCleanup=null,n=n.alternate,n!=null&&(n.refCleanup=null)}else if(typeof o=="function")try{o(null)}catch(f){ft(n,i,f)}else o.current=null}function Vv(n){var i=n.type,o=n.memoizedProps,s=n.stateNode;try{e:switch(i){case"button":case"input":case"select":case"textarea":o.autoFocus&&s.focus();break e;case"img":o.src?s.src=o.src:o.srcSet&&(s.srcset=o.srcSet)}}catch(f){ft(n,n.return,f)}}function Ih(n,i,o){try{var s=n.stateNode;RN(s,n.type,o,i),s[gn]=i}catch(f){ft(n,n.return,f)}}function Gv(n){return n.tag===5||n.tag===3||n.tag===26||n.tag===27&&ga(n.type)||n.tag===4}function Hh(n){e:for(;;){for(;n.sibling===null;){if(n.return===null||Gv(n.return))return null;n=n.return}for(n.sibling.return=n.return,n=n.sibling;n.tag!==5&&n.tag!==6&&n.tag!==18;){if(n.tag===27&&ga(n.type)||n.flags&2||n.child===null||n.tag===4)continue e;n.child.return=n,n=n.child}if(!(n.flags&2))return n.stateNode}}function Bh(n,i,o){var s=n.tag;if(s===5||s===6)n=n.stateNode,i?(o.nodeType===9?o.body:o.nodeName==="HTML"?o.ownerDocument.body:o).insertBefore(n,i):(i=o.nodeType===9?o.body:o.nodeName==="HTML"?o.ownerDocument.body:o,i.appendChild(n),o=o._reactRootContainer,o!=null||i.onclick!==null||(i.onclick=_i));else if(s!==4&&(s===27&&ga(n.type)&&(o=n.stateNode,i=null),n=n.child,n!==null))for(Bh(n,i,o),n=n.sibling;n!==null;)Bh(n,i,o),n=n.sibling}function lu(n,i,o){var s=n.tag;if(s===5||s===6)n=n.stateNode,i?o.insertBefore(n,i):o.appendChild(n);else if(s!==4&&(s===27&&ga(n.type)&&(o=n.stateNode),n=n.child,n!==null))for(lu(n,i,o),n=n.sibling;n!==null;)lu(n,i,o),n=n.sibling}function Kv(n){var i=n.stateNode,o=n.memoizedProps;try{for(var s=n.type,f=i.attributes;f.length;)i.removeAttributeNode(f[0]);nn(i,s,o),i[Ot]=n,i[gn]=o}catch(h){ft(n,n.return,h)}}var Li=!1,It=!1,qh=!1,Yv=typeof WeakSet=="function"?WeakSet:Set,Qt=null;function dN(n,i){if(n=n.containerInfo,cm=Au,n=o0(n),Lf(n)){if("selectionStart"in n)var o={start:n.selectionStart,end:n.selectionEnd};else e:{o=(o=n.ownerDocument)&&o.defaultView||window;var s=o.getSelection&&o.getSelection();if(s&&s.rangeCount!==0){o=s.anchorNode;var f=s.anchorOffset,h=s.focusNode;s=s.focusOffset;try{o.nodeType,h.nodeType}catch{o=null;break e}var y=0,S=-1,U=-1,W=0,de=0,he=n,J=null;t:for(;;){for(var oe;he!==o||f!==0&&he.nodeType!==3||(S=y+f),he!==h||s!==0&&he.nodeType!==3||(U=y+s),he.nodeType===3&&(y+=he.nodeValue.length),(oe=he.firstChild)!==null;)J=he,he=oe;for(;;){if(he===n)break t;if(J===o&&++W===f&&(S=y),J===h&&++de===s&&(U=y),(oe=he.nextSibling)!==null)break;he=J,J=he.parentNode}he=oe}o=S===-1||U===-1?null:{start:S,end:U}}else o=null}o=o||{start:0,end:0}}else o=null;for(um={focusedElem:n,selectionRange:o},Au=!1,Qt=i;Qt!==null;)if(i=Qt,n=i.child,(i.subtreeFlags&1028)!==0&&n!==null)n.return=i,Qt=n;else for(;Qt!==null;){switch(i=Qt,h=i.alternate,n=i.flags,i.tag){case 0:if((n&4)!==0&&(n=i.updateQueue,n=n!==null?n.events:null,n!==null))for(o=0;o<n.length;o++)f=n[o],f.ref.impl=f.nextImpl;break;case 11:case 15:break;case 1:if((n&1024)!==0&&h!==null){n=void 0,o=i,f=h.memoizedProps,h=h.memoizedState,s=o.stateNode;try{var Ae=yr(o.type,f);n=s.getSnapshotBeforeUpdate(Ae,h),s.__reactInternalSnapshotBeforeUpdate=n}catch(Ie){ft(o,o.return,Ie)}}break;case 3:if((n&1024)!==0){if(n=i.stateNode.containerInfo,o=n.nodeType,o===9)hm(n);else if(o===1)switch(n.nodeName){case"HEAD":case"HTML":case"BODY":hm(n);break;default:n.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((n&1024)!==0)throw Error(r(163))}if(n=i.sibling,n!==null){n.return=i.return,Qt=n;break}Qt=i.return}}function Qv(n,i,o){var s=o.flags;switch(o.tag){case 0:case 11:case 15:$i(n,o),s&4&&es(5,o);break;case 1:if($i(n,o),s&4)if(n=o.stateNode,i===null)try{n.componentDidMount()}catch(y){ft(o,o.return,y)}else{var f=yr(o.type,i.memoizedProps);i=i.memoizedState;try{n.componentDidUpdate(f,i,n.__reactInternalSnapshotBeforeUpdate)}catch(y){ft(o,o.return,y)}}s&64&&Fv(o),s&512&&ts(o,o.return);break;case 3:if($i(n,o),s&64&&(n=o.updateQueue,n!==null)){if(i=null,o.child!==null)switch(o.child.tag){case 27:case 5:i=o.child.stateNode;break;case 1:i=o.child.stateNode}try{T0(n,i)}catch(y){ft(o,o.return,y)}}break;case 27:i===null&&s&4&&Kv(o);case 26:case 5:$i(n,o),i===null&&s&4&&Vv(o),s&512&&ts(o,o.return);break;case 12:$i(n,o);break;case 31:$i(n,o),s&4&&Wv(n,o);break;case 13:$i(n,o),s&4&&Jv(n,o),s&64&&(n=o.memoizedState,n!==null&&(n=n.dehydrated,n!==null&&(o=xN.bind(null,o),HN(n,o))));break;case 22:if(s=o.memoizedState!==null||Li,!s){i=i!==null&&i.memoizedState!==null||It,f=Li;var h=It;Li=s,(It=i)&&!h?Ui(n,o,(o.subtreeFlags&8772)!==0):$i(n,o),Li=f,It=h}break;case 30:break;default:$i(n,o)}}function Xv(n){var i=n.alternate;i!==null&&(n.alternate=null,Xv(i)),n.child=null,n.deletions=null,n.sibling=null,n.tag===5&&(i=n.stateNode,i!==null&&bf(i)),n.stateNode=null,n.return=null,n.dependencies=null,n.memoizedProps=null,n.memoizedState=null,n.pendingProps=null,n.stateNode=null,n.updateQueue=null}var Et=null,bn=!1;function zi(n,i,o){for(o=o.child;o!==null;)Zv(n,i,o),o=o.sibling}function Zv(n,i,o){if(ut&&typeof ut.onCommitFiberUnmount=="function")try{ut.onCommitFiberUnmount(Vt,o)}catch{}switch(o.tag){case 26:It||hi(o,i),zi(n,i,o),o.memoizedState?o.memoizedState.count--:o.stateNode&&(o=o.stateNode,o.parentNode.removeChild(o));break;case 27:It||hi(o,i);var s=Et,f=bn;ga(o.type)&&(Et=o.stateNode,bn=!1),zi(n,i,o),us(o.stateNode),Et=s,bn=f;break;case 5:It||hi(o,i);case 6:if(s=Et,f=bn,Et=null,zi(n,i,o),Et=s,bn=f,Et!==null)if(bn)try{(Et.nodeType===9?Et.body:Et.nodeName==="HTML"?Et.ownerDocument.body:Et).removeChild(o.stateNode)}catch(h){ft(o,i,h)}else try{Et.removeChild(o.stateNode)}catch(h){ft(o,i,h)}break;case 18:Et!==null&&(bn?(n=Et,F1(n.nodeType===9?n.body:n.nodeName==="HTML"?n.ownerDocument.body:n,o.stateNode),Do(n)):F1(Et,o.stateNode));break;case 4:s=Et,f=bn,Et=o.stateNode.containerInfo,bn=!0,zi(n,i,o),Et=s,bn=f;break;case 0:case 11:case 14:case 15:ca(2,o,i),It||ca(4,o,i),zi(n,i,o);break;case 1:It||(hi(o,i),s=o.stateNode,typeof s.componentWillUnmount=="function"&&Pv(o,i,s)),zi(n,i,o);break;case 21:zi(n,i,o);break;case 22:It=(s=It)||o.memoizedState!==null,zi(n,i,o),It=s;break;default:zi(n,i,o)}}function Wv(n,i){if(i.memoizedState===null&&(n=i.alternate,n!==null&&(n=n.memoizedState,n!==null))){n=n.dehydrated;try{Do(n)}catch(o){ft(i,i.return,o)}}}function Jv(n,i){if(i.memoizedState===null&&(n=i.alternate,n!==null&&(n=n.memoizedState,n!==null&&(n=n.dehydrated,n!==null))))try{Do(n)}catch(o){ft(i,i.return,o)}}function fN(n){switch(n.tag){case 31:case 13:case 19:var i=n.stateNode;return i===null&&(i=n.stateNode=new Yv),i;case 22:return n=n.stateNode,i=n._retryCache,i===null&&(i=n._retryCache=new Yv),i;default:throw Error(r(435,n.tag))}}function su(n,i){var o=fN(n);i.forEach(function(s){if(!o.has(s)){o.add(s);var f=wN.bind(null,n,s);s.then(f,f)}})}function vn(n,i){var o=i.deletions;if(o!==null)for(var s=0;s<o.length;s++){var f=o[s],h=n,y=i,S=y;e:for(;S!==null;){switch(S.tag){case 27:if(ga(S.type)){Et=S.stateNode,bn=!1;break e}break;case 5:Et=S.stateNode,bn=!1;break e;case 3:case 4:Et=S.stateNode.containerInfo,bn=!0;break e}S=S.return}if(Et===null)throw Error(r(160));Zv(h,y,f),Et=null,bn=!1,h=f.alternate,h!==null&&(h.return=null),f.return=null}if(i.subtreeFlags&13886)for(i=i.child;i!==null;)e1(i,n),i=i.sibling}var ai=null;function e1(n,i){var o=n.alternate,s=n.flags;switch(n.tag){case 0:case 11:case 14:case 15:vn(i,n),xn(n),s&4&&(ca(3,n,n.return),es(3,n),ca(5,n,n.return));break;case 1:vn(i,n),xn(n),s&512&&(It||o===null||hi(o,o.return)),s&64&&Li&&(n=n.updateQueue,n!==null&&(s=n.callbacks,s!==null&&(o=n.shared.hiddenCallbacks,n.shared.hiddenCallbacks=o===null?s:o.concat(s))));break;case 26:var f=ai;if(vn(i,n),xn(n),s&512&&(It||o===null||hi(o,o.return)),s&4){var h=o!==null?o.memoizedState:null;if(s=n.memoizedState,o===null)if(s===null)if(n.stateNode===null){e:{s=n.type,o=n.memoizedProps,f=f.ownerDocument||f;t:switch(s){case"title":h=f.getElementsByTagName("title")[0],(!h||h[Al]||h[Ot]||h.namespaceURI==="http://www.w3.org/2000/svg"||h.hasAttribute("itemprop"))&&(h=f.createElement(s),f.head.insertBefore(h,f.querySelector("head > title"))),nn(h,s,o),h[Ot]=n,Yt(h),s=h;break e;case"link":var y=ex("link","href",f).get(s+(o.href||""));if(y){for(var S=0;S<y.length;S++)if(h=y[S],h.getAttribute("href")===(o.href==null||o.href===""?null:o.href)&&h.getAttribute("rel")===(o.rel==null?null:o.rel)&&h.getAttribute("title")===(o.title==null?null:o.title)&&h.getAttribute("crossorigin")===(o.crossOrigin==null?null:o.crossOrigin)){y.splice(S,1);break t}}h=f.createElement(s),nn(h,s,o),f.head.appendChild(h);break;case"meta":if(y=ex("meta","content",f).get(s+(o.content||""))){for(S=0;S<y.length;S++)if(h=y[S],h.getAttribute("content")===(o.content==null?null:""+o.content)&&h.getAttribute("name")===(o.name==null?null:o.name)&&h.getAttribute("property")===(o.property==null?null:o.property)&&h.getAttribute("http-equiv")===(o.httpEquiv==null?null:o.httpEquiv)&&h.getAttribute("charset")===(o.charSet==null?null:o.charSet)){y.splice(S,1);break t}}h=f.createElement(s),nn(h,s,o),f.head.appendChild(h);break;default:throw Error(r(468,s))}h[Ot]=n,Yt(h),s=h}n.stateNode=s}else tx(f,n.type,n.stateNode);else n.stateNode=J1(f,s,n.memoizedProps);else h!==s?(h===null?o.stateNode!==null&&(o=o.stateNode,o.parentNode.removeChild(o)):h.count--,s===null?tx(f,n.type,n.stateNode):J1(f,s,n.memoizedProps)):s===null&&n.stateNode!==null&&Ih(n,n.memoizedProps,o.memoizedProps)}break;case 27:vn(i,n),xn(n),s&512&&(It||o===null||hi(o,o.return)),o!==null&&s&4&&Ih(n,n.memoizedProps,o.memoizedProps);break;case 5:if(vn(i,n),xn(n),s&512&&(It||o===null||hi(o,o.return)),n.flags&32){f=n.stateNode;try{no(f,"")}catch(Ae){ft(n,n.return,Ae)}}s&4&&n.stateNode!=null&&(f=n.memoizedProps,Ih(n,f,o!==null?o.memoizedProps:f)),s&1024&&(qh=!0);break;case 6:if(vn(i,n),xn(n),s&4){if(n.stateNode===null)throw Error(r(162));s=n.memoizedProps,o=n.stateNode;try{o.nodeValue=s}catch(Ae){ft(n,n.return,Ae)}}break;case 3:if(Eu=null,f=ai,ai=ku(i.containerInfo),vn(i,n),ai=f,xn(n),s&4&&o!==null&&o.memoizedState.isDehydrated)try{Do(i.containerInfo)}catch(Ae){ft(n,n.return,Ae)}qh&&(qh=!1,t1(n));break;case 4:s=ai,ai=ku(n.stateNode.containerInfo),vn(i,n),xn(n),ai=s;break;case 12:vn(i,n),xn(n);break;case 31:vn(i,n),xn(n),s&4&&(s=n.updateQueue,s!==null&&(n.updateQueue=null,su(n,s)));break;case 13:vn(i,n),xn(n),n.child.flags&8192&&n.memoizedState!==null!=(o!==null&&o.memoizedState!==null)&&(uu=yt()),s&4&&(s=n.updateQueue,s!==null&&(n.updateQueue=null,su(n,s)));break;case 22:f=n.memoizedState!==null;var U=o!==null&&o.memoizedState!==null,W=Li,de=It;if(Li=W||f,It=de||U,vn(i,n),It=de,Li=W,xn(n),s&8192)e:for(i=n.stateNode,i._visibility=f?i._visibility&-2:i._visibility|1,f&&(o===null||U||Li||It||br(n)),o=null,i=n;;){if(i.tag===5||i.tag===26){if(o===null){U=o=i;try{if(h=U.stateNode,f)y=h.style,typeof y.setProperty=="function"?y.setProperty("display","none","important"):y.display="none";else{S=U.stateNode;var he=U.memoizedProps.style,J=he!=null&&he.hasOwnProperty("display")?he.display:null;S.style.display=J==null||typeof J=="boolean"?"":(""+J).trim()}}catch(Ae){ft(U,U.return,Ae)}}}else if(i.tag===6){if(o===null){U=i;try{U.stateNode.nodeValue=f?"":U.memoizedProps}catch(Ae){ft(U,U.return,Ae)}}}else if(i.tag===18){if(o===null){U=i;try{var oe=U.stateNode;f?P1(oe,!0):P1(U.stateNode,!1)}catch(Ae){ft(U,U.return,Ae)}}}else if((i.tag!==22&&i.tag!==23||i.memoizedState===null||i===n)&&i.child!==null){i.child.return=i,i=i.child;continue}if(i===n)break e;for(;i.sibling===null;){if(i.return===null||i.return===n)break e;o===i&&(o=null),i=i.return}o===i&&(o=null),i.sibling.return=i.return,i=i.sibling}s&4&&(s=n.updateQueue,s!==null&&(o=s.retryQueue,o!==null&&(s.retryQueue=null,su(n,o))));break;case 19:vn(i,n),xn(n),s&4&&(s=n.updateQueue,s!==null&&(n.updateQueue=null,su(n,s)));break;case 30:break;case 21:break;default:vn(i,n),xn(n)}}function xn(n){var i=n.flags;if(i&2){try{for(var o,s=n.return;s!==null;){if(Gv(s)){o=s;break}s=s.return}if(o==null)throw Error(r(160));switch(o.tag){case 27:var f=o.stateNode,h=Hh(n);lu(n,h,f);break;case 5:var y=o.stateNode;o.flags&32&&(no(y,""),o.flags&=-33);var S=Hh(n);lu(n,S,y);break;case 3:case 4:var U=o.stateNode.containerInfo,W=Hh(n);Bh(n,W,U);break;default:throw Error(r(161))}}catch(de){ft(n,n.return,de)}n.flags&=-3}i&4096&&(n.flags&=-4097)}function t1(n){if(n.subtreeFlags&1024)for(n=n.child;n!==null;){var i=n;t1(i),i.tag===5&&i.flags&1024&&i.stateNode.reset(),n=n.sibling}}function $i(n,i){if(i.subtreeFlags&8772)for(i=i.child;i!==null;)Qv(n,i.alternate,i),i=i.sibling}function br(n){for(n=n.child;n!==null;){var i=n;switch(i.tag){case 0:case 11:case 14:case 15:ca(4,i,i.return),br(i);break;case 1:hi(i,i.return);var o=i.stateNode;typeof o.componentWillUnmount=="function"&&Pv(i,i.return,o),br(i);break;case 27:us(i.stateNode);case 26:case 5:hi(i,i.return),br(i);break;case 22:i.memoizedState===null&&br(i);break;case 30:br(i);break;default:br(i)}n=n.sibling}}function Ui(n,i,o){for(o=o&&(i.subtreeFlags&8772)!==0,i=i.child;i!==null;){var s=i.alternate,f=n,h=i,y=h.flags;switch(h.tag){case 0:case 11:case 15:Ui(f,h,o),es(4,h);break;case 1:if(Ui(f,h,o),s=h,f=s.stateNode,typeof f.componentDidMount=="function")try{f.componentDidMount()}catch(W){ft(s,s.return,W)}if(s=h,f=s.updateQueue,f!==null){var S=s.stateNode;try{var U=f.shared.hiddenCallbacks;if(U!==null)for(f.shared.hiddenCallbacks=null,f=0;f<U.length;f++)R0(U[f],S)}catch(W){ft(s,s.return,W)}}o&&y&64&&Fv(h),ts(h,h.return);break;case 27:Kv(h);case 26:case 5:Ui(f,h,o),o&&s===null&&y&4&&Vv(h),ts(h,h.return);break;case 12:Ui(f,h,o);break;case 31:Ui(f,h,o),o&&y&4&&Wv(f,h);break;case 13:Ui(f,h,o),o&&y&4&&Jv(f,h);break;case 22:h.memoizedState===null&&Ui(f,h,o),ts(h,h.return);break;case 30:break;default:Ui(f,h,o)}i=i.sibling}}function Fh(n,i){var o=null;n!==null&&n.memoizedState!==null&&n.memoizedState.cachePool!==null&&(o=n.memoizedState.cachePool.pool),n=null,i.memoizedState!==null&&i.memoizedState.cachePool!==null&&(n=i.memoizedState.cachePool.pool),n!==o&&(n!=null&&n.refCount++,o!=null&&Bl(o))}function Ph(n,i){n=null,i.alternate!==null&&(n=i.alternate.memoizedState.cache),i=i.memoizedState.cache,i!==n&&(i.refCount++,n!=null&&Bl(n))}function ri(n,i,o,s){if(i.subtreeFlags&10256)for(i=i.child;i!==null;)n1(n,i,o,s),i=i.sibling}function n1(n,i,o,s){var f=i.flags;switch(i.tag){case 0:case 11:case 15:ri(n,i,o,s),f&2048&&es(9,i);break;case 1:ri(n,i,o,s);break;case 3:ri(n,i,o,s),f&2048&&(n=null,i.alternate!==null&&(n=i.alternate.memoizedState.cache),i=i.memoizedState.cache,i!==n&&(i.refCount++,n!=null&&Bl(n)));break;case 12:if(f&2048){ri(n,i,o,s),n=i.stateNode;try{var h=i.memoizedProps,y=h.id,S=h.onPostCommit;typeof S=="function"&&S(y,i.alternate===null?"mount":"update",n.passiveEffectDuration,-0)}catch(U){ft(i,i.return,U)}}else ri(n,i,o,s);break;case 31:ri(n,i,o,s);break;case 13:ri(n,i,o,s);break;case 23:break;case 22:h=i.stateNode,y=i.alternate,i.memoizedState!==null?h._visibility&2?ri(n,i,o,s):ns(n,i):h._visibility&2?ri(n,i,o,s):(h._visibility|=2,So(n,i,o,s,(i.subtreeFlags&10256)!==0||!1)),f&2048&&Fh(y,i);break;case 24:ri(n,i,o,s),f&2048&&Ph(i.alternate,i);break;default:ri(n,i,o,s)}}function So(n,i,o,s,f){for(f=f&&((i.subtreeFlags&10256)!==0||!1),i=i.child;i!==null;){var h=n,y=i,S=o,U=s,W=y.flags;switch(y.tag){case 0:case 11:case 15:So(h,y,S,U,f),es(8,y);break;case 23:break;case 22:var de=y.stateNode;y.memoizedState!==null?de._visibility&2?So(h,y,S,U,f):ns(h,y):(de._visibility|=2,So(h,y,S,U,f)),f&&W&2048&&Fh(y.alternate,y);break;case 24:So(h,y,S,U,f),f&&W&2048&&Ph(y.alternate,y);break;default:So(h,y,S,U,f)}i=i.sibling}}function ns(n,i){if(i.subtreeFlags&10256)for(i=i.child;i!==null;){var o=n,s=i,f=s.flags;switch(s.tag){case 22:ns(o,s),f&2048&&Fh(s.alternate,s);break;case 24:ns(o,s),f&2048&&Ph(s.alternate,s);break;default:ns(o,s)}i=i.sibling}}var is=8192;function Eo(n,i,o){if(n.subtreeFlags&is)for(n=n.child;n!==null;)i1(n,i,o),n=n.sibling}function i1(n,i,o){switch(n.tag){case 26:Eo(n,i,o),n.flags&is&&n.memoizedState!==null&&WN(o,ai,n.memoizedState,n.memoizedProps);break;case 5:Eo(n,i,o);break;case 3:case 4:var s=ai;ai=ku(n.stateNode.containerInfo),Eo(n,i,o),ai=s;break;case 22:n.memoizedState===null&&(s=n.alternate,s!==null&&s.memoizedState!==null?(s=is,is=16777216,Eo(n,i,o),is=s):Eo(n,i,o));break;default:Eo(n,i,o)}}function a1(n){var i=n.alternate;if(i!==null&&(n=i.child,n!==null)){i.child=null;do i=n.sibling,n.sibling=null,n=i;while(n!==null)}}function as(n){var i=n.deletions;if((n.flags&16)!==0){if(i!==null)for(var o=0;o<i.length;o++){var s=i[o];Qt=s,o1(s,n)}a1(n)}if(n.subtreeFlags&10256)for(n=n.child;n!==null;)r1(n),n=n.sibling}function r1(n){switch(n.tag){case 0:case 11:case 15:as(n),n.flags&2048&&ca(9,n,n.return);break;case 3:as(n);break;case 12:as(n);break;case 22:var i=n.stateNode;n.memoizedState!==null&&i._visibility&2&&(n.return===null||n.return.tag!==13)?(i._visibility&=-3,cu(n)):as(n);break;default:as(n)}}function cu(n){var i=n.deletions;if((n.flags&16)!==0){if(i!==null)for(var o=0;o<i.length;o++){var s=i[o];Qt=s,o1(s,n)}a1(n)}for(n=n.child;n!==null;){switch(i=n,i.tag){case 0:case 11:case 15:ca(8,i,i.return),cu(i);break;case 22:o=i.stateNode,o._visibility&2&&(o._visibility&=-3,cu(i));break;default:cu(i)}n=n.sibling}}function o1(n,i){for(;Qt!==null;){var o=Qt;switch(o.tag){case 0:case 11:case 15:ca(8,o,i);break;case 23:case 22:if(o.memoizedState!==null&&o.memoizedState.cachePool!==null){var s=o.memoizedState.cachePool.pool;s!=null&&s.refCount++}break;case 24:Bl(o.memoizedState.cache)}if(s=o.child,s!==null)s.return=o,Qt=s;else e:for(o=n;Qt!==null;){s=Qt;var f=s.sibling,h=s.return;if(Xv(s),s===o){Qt=null;break e}if(f!==null){f.return=h,Qt=f;break e}Qt=h}}}var hN={getCacheForType:function(n){var i=en(zt),o=i.data.get(n);return o===void 0&&(o=n(),i.data.set(n,o)),o},cacheSignal:function(){return en(zt).controller.signal}},mN=typeof WeakMap=="function"?WeakMap:Map,lt=0,bt=null,Ye=null,Ze=0,dt=0,Tn=null,ua=!1,_o=!1,Vh=!1,Ii=0,Mt=0,da=0,vr=0,Gh=0,Dn=0,jo=0,rs=null,wn=null,Kh=!1,uu=0,l1=0,du=1/0,fu=null,fa=null,qt=0,ha=null,Oo=null,Hi=0,Yh=0,Qh=null,s1=null,os=0,Xh=null;function Ln(){return(lt&2)!==0&&Ze!==0?Ze&-Ze:M.T!==null?nm():At()}function c1(){if(Dn===0)if((Ze&536870912)===0||et){var n=kt;kt<<=1,(kt&3932160)===0&&(kt=262144),Dn=n}else Dn=536870912;return n=Cn.current,n!==null&&(n.flags|=32),Dn}function kn(n,i,o){(n===bt&&(dt===2||dt===9)||n.cancelPendingCommit!==null)&&(Ao(n,0),ma(n,Ze,Dn,!1)),ni(n,o),((lt&2)===0||n!==bt)&&(n===bt&&((lt&2)===0&&(vr|=o),Mt===4&&ma(n,Ze,Dn,!1)),mi(n))}function u1(n,i,o){if((lt&6)!==0)throw Error(r(327));var s=!o&&(i&127)===0&&(i&n.expiredLanes)===0||Gt(n,i),f=s?yN(n,i):Wh(n,i,!0),h=s;do{if(f===0){_o&&!s&&ma(n,i,0,!1);break}else{if(o=n.current.alternate,h&&!pN(o)){f=Wh(n,i,!1),h=!1;continue}if(f===2){if(h=i,n.errorRecoveryDisabledLanes&h)var y=0;else y=n.pendingLanes&-536870913,y=y!==0?y:y&536870912?536870912:0;if(y!==0){i=y;e:{var S=n;f=rs;var U=S.current.memoizedState.isDehydrated;if(U&&(Ao(S,y).flags|=256),y=Wh(S,y,!1),y!==2){if(Vh&&!U){S.errorRecoveryDisabledLanes|=h,vr|=h,f=4;break e}h=wn,wn=f,h!==null&&(wn===null?wn=h:wn.push.apply(wn,h))}f=y}if(h=!1,f!==2)continue}}if(f===1){Ao(n,0),ma(n,i,0,!0);break}e:{switch(s=n,h=f,h){case 0:case 1:throw Error(r(345));case 4:if((i&4194048)!==i)break;case 6:ma(s,i,Dn,!ua);break e;case 2:wn=null;break;case 3:case 5:break;default:throw Error(r(329))}if((i&62914560)===i&&(f=uu+300-yt(),10<f)){if(ma(s,i,Dn,!ua),Bt(s,0,!0)!==0)break e;Hi=i,s.timeoutHandle=B1(d1.bind(null,s,o,wn,fu,Kh,i,Dn,vr,jo,ua,h,"Throttled",-0,0),f);break e}d1(s,o,wn,fu,Kh,i,Dn,vr,jo,ua,h,null,-0,0)}}break}while(!0);mi(n)}function d1(n,i,o,s,f,h,y,S,U,W,de,he,J,oe){if(n.timeoutHandle=-1,he=i.subtreeFlags,he&8192||(he&16785408)===16785408){he={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:_i},i1(i,h,he);var Ae=(h&62914560)===h?uu-yt():(h&4194048)===h?l1-yt():0;if(Ae=JN(he,Ae),Ae!==null){Hi=h,n.cancelPendingCommit=Ae(v1.bind(null,n,i,h,o,s,f,y,S,U,de,he,null,J,oe)),ma(n,h,y,!W);return}}v1(n,i,h,o,s,f,y,S,U)}function pN(n){for(var i=n;;){var o=i.tag;if((o===0||o===11||o===15)&&i.flags&16384&&(o=i.updateQueue,o!==null&&(o=o.stores,o!==null)))for(var s=0;s<o.length;s++){var f=o[s],h=f.getSnapshot;f=f.value;try{if(!Nn(h(),f))return!1}catch{return!1}}if(o=i.child,i.subtreeFlags&16384&&o!==null)o.return=i,i=o;else{if(i===n)break;for(;i.sibling===null;){if(i.return===null||i.return===n)return!0;i=i.return}i.sibling.return=i.return,i=i.sibling}}return!0}function ma(n,i,o,s){i&=~Gh,i&=~vr,n.suspendedLanes|=i,n.pingedLanes&=~i,s&&(n.warmLanes|=i),s=n.expirationTimes;for(var f=i;0<f;){var h=31-be(f),y=1<<h;s[h]=-1,f&=~y}o!==0&&Qr(n,o,i)}function hu(){return(lt&6)===0?(ls(0),!1):!0}function Zh(){if(Ye!==null){if(dt===0)var n=Ye.return;else n=Ye,Ni=ur=null,hh(n),bo=null,Fl=0,n=Ye;for(;n!==null;)qv(n.alternate,n),n=n.return;Ye=null}}function Ao(n,i){var o=n.timeoutHandle;o!==-1&&(n.timeoutHandle=-1,LN(o)),o=n.cancelPendingCommit,o!==null&&(n.cancelPendingCommit=null,o()),Hi=0,Zh(),bt=n,Ye=o=Oi(n.current,null),Ze=i,dt=0,Tn=null,ua=!1,_o=Gt(n,i),Vh=!1,jo=Dn=Gh=vr=da=Mt=0,wn=rs=null,Kh=!1,(i&8)!==0&&(i|=i&32);var s=n.entangledLanes;if(s!==0)for(n=n.entanglements,s&=i;0<s;){var f=31-be(s),h=1<<f;i|=n[f],s&=~h}return Ii=i,Dc(),o}function f1(n,i){Fe=null,M.H=Zl,i===yo||i===qc?(i=A0(),dt=3):i===th?(i=A0(),dt=4):dt=i===Nh?8:i!==null&&typeof i=="object"&&typeof i.then=="function"?6:1,Tn=i,Ye===null&&(Mt=1,nu(n,Gn(i,n.current)))}function h1(){var n=Cn.current;return n===null?!0:(Ze&4194048)===Ze?Xn===null:(Ze&62914560)===Ze||(Ze&536870912)!==0?n===Xn:!1}function m1(){var n=M.H;return M.H=Zl,n===null?Zl:n}function p1(){var n=M.A;return M.A=hN,n}function mu(){Mt=4,ua||(Ze&4194048)!==Ze&&Cn.current!==null||(_o=!0),(da&134217727)===0&&(vr&134217727)===0||bt===null||ma(bt,Ze,Dn,!1)}function Wh(n,i,o){var s=lt;lt|=2;var f=m1(),h=p1();(bt!==n||Ze!==i)&&(fu=null,Ao(n,i)),i=!1;var y=Mt;e:do try{if(dt!==0&&Ye!==null){var S=Ye,U=Tn;switch(dt){case 8:Zh(),y=6;break e;case 3:case 2:case 9:case 6:Cn.current===null&&(i=!0);var W=dt;if(dt=0,Tn=null,No(n,S,U,W),o&&_o){y=0;break e}break;default:W=dt,dt=0,Tn=null,No(n,S,U,W)}}gN(),y=Mt;break}catch(de){f1(n,de)}while(!0);return i&&n.shellSuspendCounter++,Ni=ur=null,lt=s,M.H=f,M.A=h,Ye===null&&(bt=null,Ze=0,Dc()),y}function gN(){for(;Ye!==null;)g1(Ye)}function yN(n,i){var o=lt;lt|=2;var s=m1(),f=p1();bt!==n||Ze!==i?(fu=null,du=yt()+500,Ao(n,i)):_o=Gt(n,i);e:do try{if(dt!==0&&Ye!==null){i=Ye;var h=Tn;t:switch(dt){case 1:dt=0,Tn=null,No(n,i,h,1);break;case 2:case 9:if(j0(h)){dt=0,Tn=null,y1(i);break}i=function(){dt!==2&&dt!==9||bt!==n||(dt=7),mi(n)},h.then(i,i);break e;case 3:dt=7;break e;case 4:dt=5;break e;case 7:j0(h)?(dt=0,Tn=null,y1(i)):(dt=0,Tn=null,No(n,i,h,7));break;case 5:var y=null;switch(Ye.tag){case 26:y=Ye.memoizedState;case 5:case 27:var S=Ye;if(y?nx(y):S.stateNode.complete){dt=0,Tn=null;var U=S.sibling;if(U!==null)Ye=U;else{var W=S.return;W!==null?(Ye=W,pu(W)):Ye=null}break t}}dt=0,Tn=null,No(n,i,h,5);break;case 6:dt=0,Tn=null,No(n,i,h,6);break;case 8:Zh(),Mt=6;break e;default:throw Error(r(462))}}bN();break}catch(de){f1(n,de)}while(!0);return Ni=ur=null,M.H=s,M.A=f,lt=o,Ye!==null?0:(bt=null,Ze=0,Dc(),Mt)}function bN(){for(;Ye!==null&&!On();)g1(Ye)}function g1(n){var i=Hv(n.alternate,n,Ii);n.memoizedProps=n.pendingProps,i===null?pu(n):Ye=i}function y1(n){var i=n,o=i.alternate;switch(i.tag){case 15:case 0:i=Dv(o,i,i.pendingProps,i.type,void 0,Ze);break;case 11:i=Dv(o,i,i.pendingProps,i.type.render,i.ref,Ze);break;case 5:hh(i);default:qv(o,i),i=Ye=p0(i,Ii),i=Hv(o,i,Ii)}n.memoizedProps=n.pendingProps,i===null?pu(n):Ye=i}function No(n,i,o,s){Ni=ur=null,hh(i),bo=null,Fl=0;var f=i.return;try{if(oN(n,f,i,o,Ze)){Mt=1,nu(n,Gn(o,n.current)),Ye=null;return}}catch(h){if(f!==null)throw Ye=f,h;Mt=1,nu(n,Gn(o,n.current)),Ye=null;return}i.flags&32768?(et||s===1?n=!0:_o||(Ze&536870912)!==0?n=!1:(ua=n=!0,(s===2||s===9||s===3||s===6)&&(s=Cn.current,s!==null&&s.tag===13&&(s.flags|=16384))),b1(i,n)):pu(i)}function pu(n){var i=n;do{if((i.flags&32768)!==0){b1(i,ua);return}n=i.return;var o=cN(i.alternate,i,Ii);if(o!==null){Ye=o;return}if(i=i.sibling,i!==null){Ye=i;return}Ye=i=n}while(i!==null);Mt===0&&(Mt=5)}function b1(n,i){do{var o=uN(n.alternate,n);if(o!==null){o.flags&=32767,Ye=o;return}if(o=n.return,o!==null&&(o.flags|=32768,o.subtreeFlags=0,o.deletions=null),!i&&(n=n.sibling,n!==null)){Ye=n;return}Ye=n=o}while(n!==null);Mt=6,Ye=null}function v1(n,i,o,s,f,h,y,S,U){n.cancelPendingCommit=null;do gu();while(qt!==0);if((lt&6)!==0)throw Error(r(327));if(i!==null){if(i===n.current)throw Error(r(177));if(h=i.lanes|i.childLanes,h|=Hf,ui(n,o,h,y,S,U),n===bt&&(Ye=bt=null,Ze=0),Oo=i,ha=n,Hi=o,Yh=h,Qh=f,s1=s,(i.subtreeFlags&10256)!==0||(i.flags&10256)!==0?(n.callbackNode=null,n.callbackPriority=0,kN(we,function(){return E1(),null})):(n.callbackNode=null,n.callbackPriority=0),s=(i.flags&13878)!==0,(i.subtreeFlags&13878)!==0||s){s=M.T,M.T=null,f=V.p,V.p=2,y=lt,lt|=4;try{dN(n,i,o)}finally{lt=y,V.p=f,M.T=s}}qt=1,x1(),w1(),k1()}}function x1(){if(qt===1){qt=0;var n=ha,i=Oo,o=(i.flags&13878)!==0;if((i.subtreeFlags&13878)!==0||o){o=M.T,M.T=null;var s=V.p;V.p=2;var f=lt;lt|=4;try{e1(i,n);var h=um,y=o0(n.containerInfo),S=h.focusedElem,U=h.selectionRange;if(y!==S&&S&&S.ownerDocument&&r0(S.ownerDocument.documentElement,S)){if(U!==null&&Lf(S)){var W=U.start,de=U.end;if(de===void 0&&(de=W),"selectionStart"in S)S.selectionStart=W,S.selectionEnd=Math.min(de,S.value.length);else{var he=S.ownerDocument||document,J=he&&he.defaultView||window;if(J.getSelection){var oe=J.getSelection(),Ae=S.textContent.length,Ie=Math.min(U.start,Ae),gt=U.end===void 0?Ie:Math.min(U.end,Ae);!oe.extend&&Ie>gt&&(y=gt,gt=Ie,Ie=y);var G=a0(S,Ie),B=a0(S,gt);if(G&&B&&(oe.rangeCount!==1||oe.anchorNode!==G.node||oe.anchorOffset!==G.offset||oe.focusNode!==B.node||oe.focusOffset!==B.offset)){var Z=he.createRange();Z.setStart(G.node,G.offset),oe.removeAllRanges(),Ie>gt?(oe.addRange(Z),oe.extend(B.node,B.offset)):(Z.setEnd(B.node,B.offset),oe.addRange(Z))}}}}for(he=[],oe=S;oe=oe.parentNode;)oe.nodeType===1&&he.push({element:oe,left:oe.scrollLeft,top:oe.scrollTop});for(typeof S.focus=="function"&&S.focus(),S=0;S<he.length;S++){var fe=he[S];fe.element.scrollLeft=fe.left,fe.element.scrollTop=fe.top}}Au=!!cm,um=cm=null}finally{lt=f,V.p=s,M.T=o}}n.current=i,qt=2}}function w1(){if(qt===2){qt=0;var n=ha,i=Oo,o=(i.flags&8772)!==0;if((i.subtreeFlags&8772)!==0||o){o=M.T,M.T=null;var s=V.p;V.p=2;var f=lt;lt|=4;try{Qv(n,i.alternate,i)}finally{lt=f,V.p=s,M.T=o}}qt=3}}function k1(){if(qt===4||qt===3){qt=0,cn();var n=ha,i=Oo,o=Hi,s=s1;(i.subtreeFlags&10256)!==0||(i.flags&10256)!==0?qt=5:(qt=0,Oo=ha=null,S1(n,n.pendingLanes));var f=n.pendingLanes;if(f===0&&(fa=null),Pe(o),i=i.stateNode,ut&&typeof ut.onCommitFiberRoot=="function")try{ut.onCommitFiberRoot(Vt,i,void 0,(i.current.flags&128)===128)}catch{}if(s!==null){i=M.T,f=V.p,V.p=2,M.T=null;try{for(var h=n.onRecoverableError,y=0;y<s.length;y++){var S=s[y];h(S.value,{componentStack:S.stack})}}finally{M.T=i,V.p=f}}(Hi&3)!==0&&gu(),mi(n),f=n.pendingLanes,(o&261930)!==0&&(f&42)!==0?n===Xh?os++:(os=0,Xh=n):os=0,ls(0)}}function S1(n,i){(n.pooledCacheLanes&=i)===0&&(i=n.pooledCache,i!=null&&(n.pooledCache=null,Bl(i)))}function gu(){return x1(),w1(),k1(),E1()}function E1(){if(qt!==5)return!1;var n=ha,i=Yh;Yh=0;var o=Pe(Hi),s=M.T,f=V.p;try{V.p=32>o?32:o,M.T=null,o=Qh,Qh=null;var h=ha,y=Hi;if(qt=0,Oo=ha=null,Hi=0,(lt&6)!==0)throw Error(r(331));var S=lt;if(lt|=4,r1(h.current),n1(h,h.current,y,o),lt=S,ls(0,!1),ut&&typeof ut.onPostCommitFiberRoot=="function")try{ut.onPostCommitFiberRoot(Vt,h)}catch{}return!0}finally{V.p=f,M.T=s,S1(n,i)}}function _1(n,i,o){i=Gn(o,i),i=Ah(n.stateNode,i,2),n=oa(n,i,2),n!==null&&(ni(n,2),mi(n))}function ft(n,i,o){if(n.tag===3)_1(n,n,o);else for(;i!==null;){if(i.tag===3){_1(i,n,o);break}else if(i.tag===1){var s=i.stateNode;if(typeof i.type.getDerivedStateFromError=="function"||typeof s.componentDidCatch=="function"&&(fa===null||!fa.has(s))){n=Gn(o,n),o=jv(2),s=oa(i,o,2),s!==null&&(Ov(o,s,i,n),ni(s,2),mi(s));break}}i=i.return}}function Jh(n,i,o){var s=n.pingCache;if(s===null){s=n.pingCache=new mN;var f=new Set;s.set(i,f)}else f=s.get(i),f===void 0&&(f=new Set,s.set(i,f));f.has(o)||(Vh=!0,f.add(o),n=vN.bind(null,n,i,o),i.then(n,n))}function vN(n,i,o){var s=n.pingCache;s!==null&&s.delete(i),n.pingedLanes|=n.suspendedLanes&o,n.warmLanes&=~o,bt===n&&(Ze&o)===o&&(Mt===4||Mt===3&&(Ze&62914560)===Ze&&300>yt()-uu?(lt&2)===0&&Ao(n,0):Gh|=o,jo===Ze&&(jo=0)),mi(n)}function j1(n,i){i===0&&(i=An()),n=lr(n,i),n!==null&&(ni(n,i),mi(n))}function xN(n){var i=n.memoizedState,o=0;i!==null&&(o=i.retryLane),j1(n,o)}function wN(n,i){var o=0;switch(n.tag){case 31:case 13:var s=n.stateNode,f=n.memoizedState;f!==null&&(o=f.retryLane);break;case 19:s=n.stateNode;break;case 22:s=n.stateNode._retryCache;break;default:throw Error(r(314))}s!==null&&s.delete(i),j1(n,o)}function kN(n,i){return st(n,i)}var yu=null,Mo=null,em=!1,bu=!1,tm=!1,pa=0;function mi(n){n!==Mo&&n.next===null&&(Mo===null?yu=Mo=n:Mo=Mo.next=n),bu=!0,em||(em=!0,EN())}function ls(n,i){if(!tm&&bu){tm=!0;do for(var o=!1,s=yu;s!==null;){if(n!==0){var f=s.pendingLanes;if(f===0)var h=0;else{var y=s.suspendedLanes,S=s.pingedLanes;h=(1<<31-be(42|n)+1)-1,h&=f&~(y&~S),h=h&201326741?h&201326741|1:h?h|2:0}h!==0&&(o=!0,M1(s,h))}else h=Ze,h=Bt(s,s===bt?h:0,s.cancelPendingCommit!==null||s.timeoutHandle!==-1),(h&3)===0||Gt(s,h)||(o=!0,M1(s,h));s=s.next}while(o);tm=!1}}function SN(){O1()}function O1(){bu=em=!1;var n=0;pa!==0&&DN()&&(n=pa);for(var i=yt(),o=null,s=yu;s!==null;){var f=s.next,h=A1(s,i);h===0?(s.next=null,o===null?yu=f:o.next=f,f===null&&(Mo=o)):(o=s,(n!==0||(h&3)!==0)&&(bu=!0)),s=f}qt!==0&&qt!==5||ls(n),pa!==0&&(pa=0)}function A1(n,i){for(var o=n.suspendedLanes,s=n.pingedLanes,f=n.expirationTimes,h=n.pendingLanes&-62914561;0<h;){var y=31-be(h),S=1<<y,U=f[y];U===-1?((S&o)===0||(S&s)!==0)&&(f[y]=Kt(S,i)):U<=i&&(n.expiredLanes|=S),h&=~S}if(i=bt,o=Ze,o=Bt(n,n===i?o:0,n.cancelPendingCommit!==null||n.timeoutHandle!==-1),s=n.callbackNode,o===0||n===i&&(dt===2||dt===9)||n.cancelPendingCommit!==null)return s!==null&&s!==null&&Bn(s),n.callbackNode=null,n.callbackPriority=0;if((o&3)===0||Gt(n,o)){if(i=o&-o,i===n.callbackPriority)return i;switch(s!==null&&Bn(s),Pe(o)){case 2:case 8:o=ti;break;case 32:o=we;break;case 268435456:o=Ce;break;default:o=we}return s=N1.bind(null,n),o=st(o,s),n.callbackPriority=i,n.callbackNode=o,i}return s!==null&&s!==null&&Bn(s),n.callbackPriority=2,n.callbackNode=null,2}function N1(n,i){if(qt!==0&&qt!==5)return n.callbackNode=null,n.callbackPriority=0,null;var o=n.callbackNode;if(gu()&&n.callbackNode!==o)return null;var s=Ze;return s=Bt(n,n===bt?s:0,n.cancelPendingCommit!==null||n.timeoutHandle!==-1),s===0?null:(u1(n,s,i),A1(n,yt()),n.callbackNode!=null&&n.callbackNode===o?N1.bind(null,n):null)}function M1(n,i){if(gu())return null;u1(n,i,!0)}function EN(){zN(function(){(lt&6)!==0?st(ci,SN):O1()})}function nm(){if(pa===0){var n=po;n===0&&(n=Be,Be<<=1,(Be&261888)===0&&(Be=256)),pa=n}return pa}function C1(n){return n==null||typeof n=="symbol"||typeof n=="boolean"?null:typeof n=="function"?n:jc(""+n)}function R1(n,i){var o=i.ownerDocument.createElement("input");return o.name=i.name,o.value=i.value,n.id&&o.setAttribute("form",n.id),i.parentNode.insertBefore(o,i),n=new FormData(n),o.parentNode.removeChild(o),n}function _N(n,i,o,s,f){if(i==="submit"&&o&&o.stateNode===f){var h=C1((f[gn]||null).action),y=s.submitter;y&&(i=(i=y[gn]||null)?C1(i.formAction):y.getAttribute("formAction"),i!==null&&(h=i,y=null));var S=new Mc("action","action",null,s,f);n.push({event:S,listeners:[{instance:null,listener:function(){if(s.defaultPrevented){if(pa!==0){var U=y?R1(f,y):new FormData(f);kh(o,{pending:!0,data:U,method:f.method,action:h},null,U)}}else typeof h=="function"&&(S.preventDefault(),U=y?R1(f,y):new FormData(f),kh(o,{pending:!0,data:U,method:f.method,action:h},h,U))},currentTarget:f}]})}}for(var im=0;im<If.length;im++){var am=If[im],jN=am.toLowerCase(),ON=am[0].toUpperCase()+am.slice(1);ii(jN,"on"+ON)}ii(c0,"onAnimationEnd"),ii(u0,"onAnimationIteration"),ii(d0,"onAnimationStart"),ii("dblclick","onDoubleClick"),ii("focusin","onFocus"),ii("focusout","onBlur"),ii(FA,"onTransitionRun"),ii(PA,"onTransitionStart"),ii(VA,"onTransitionCancel"),ii(f0,"onTransitionEnd"),eo("onMouseEnter",["mouseout","mouseover"]),eo("onMouseLeave",["mouseout","mouseover"]),eo("onPointerEnter",["pointerout","pointerover"]),eo("onPointerLeave",["pointerout","pointerover"]),ir("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),ir("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),ir("onBeforeInput",["compositionend","keypress","textInput","paste"]),ir("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),ir("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),ir("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(" "),AN=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(ss));function T1(n,i){i=(i&4)!==0;for(var o=0;o<n.length;o++){var s=n[o],f=s.event;s=s.listeners;e:{var h=void 0;if(i)for(var y=s.length-1;0<=y;y--){var S=s[y],U=S.instance,W=S.currentTarget;if(S=S.listener,U!==h&&f.isPropagationStopped())break e;h=S,f.currentTarget=W;try{h(f)}catch(de){Tc(de)}f.currentTarget=null,h=U}else for(y=0;y<s.length;y++){if(S=s[y],U=S.instance,W=S.currentTarget,S=S.listener,U!==h&&f.isPropagationStopped())break e;h=S,f.currentTarget=W;try{h(f)}catch(de){Tc(de)}f.currentTarget=null,h=U}}}}function Qe(n,i){var o=i[yf];o===void 0&&(o=i[yf]=new Set);var s=n+"__bubble";o.has(s)||(D1(i,n,2,!1),o.add(s))}function rm(n,i,o){var s=0;i&&(s|=4),D1(o,n,s,i)}var vu="_reactListening"+Math.random().toString(36).slice(2);function om(n){if(!n[vu]){n[vu]=!0,Ob.forEach(function(o){o!=="selectionchange"&&(AN.has(o)||rm(o,!1,n),rm(o,!0,n))});var i=n.nodeType===9?n:n.ownerDocument;i===null||i[vu]||(i[vu]=!0,rm("selectionchange",!1,i))}}function D1(n,i,o,s){switch(cx(i)){case 2:var f=nM;break;case 8:f=iM;break;default:f=wm}o=f.bind(null,i,o,n),f=void 0,!jf||i!=="touchstart"&&i!=="touchmove"&&i!=="wheel"||(f=!0),s?f!==void 0?n.addEventListener(i,o,{capture:!0,passive:f}):n.addEventListener(i,o,!0):f!==void 0?n.addEventListener(i,o,{passive:f}):n.addEventListener(i,o,!1)}function lm(n,i,o,s,f){var h=s;if((i&1)===0&&(i&2)===0&&s!==null)e:for(;;){if(s===null)return;var y=s.tag;if(y===3||y===4){var S=s.stateNode.containerInfo;if(S===f)break;if(y===4)for(y=s.return;y!==null;){var U=y.tag;if((U===3||U===4)&&y.stateNode.containerInfo===f)return;y=y.return}for(;S!==null;){if(y=Zr(S),y===null)return;if(U=y.tag,U===5||U===6||U===26||U===27){s=h=y;continue e}S=S.parentNode}}s=s.return}Ib(function(){var W=h,de=Ef(o),he=[];e:{var J=h0.get(n);if(J!==void 0){var oe=Mc,Ae=n;switch(n){case"keypress":if(Ac(o)===0)break e;case"keydown":case"keyup":oe=wA;break;case"focusin":Ae="focus",oe=Mf;break;case"focusout":Ae="blur",oe=Mf;break;case"beforeblur":case"afterblur":oe=Mf;break;case"click":if(o.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":oe=qb;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":oe=cA;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":oe=EA;break;case c0:case u0:case d0:oe=fA;break;case f0:oe=jA;break;case"scroll":case"scrollend":oe=lA;break;case"wheel":oe=AA;break;case"copy":case"cut":case"paste":oe=mA;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":oe=Pb;break;case"toggle":case"beforetoggle":oe=MA}var Ie=(i&4)!==0,gt=!Ie&&(n==="scroll"||n==="scrollend"),G=Ie?J!==null?J+"Capture":null:J;Ie=[];for(var B=W,Z;B!==null;){var fe=B;if(Z=fe.stateNode,fe=fe.tag,fe!==5&&fe!==26&&fe!==27||Z===null||G===null||(fe=Ml(B,G),fe!=null&&Ie.push(cs(B,fe,Z))),gt)break;B=B.return}0<Ie.length&&(J=new oe(J,Ae,null,o,de),he.push({event:J,listeners:Ie}))}}if((i&7)===0){e:{if(J=n==="mouseover"||n==="pointerover",oe=n==="mouseout"||n==="pointerout",J&&o!==Sf&&(Ae=o.relatedTarget||o.fromElement)&&(Zr(Ae)||Ae[Xr]))break e;if((oe||J)&&(J=de.window===de?de:(J=de.ownerDocument)?J.defaultView||J.parentWindow:window,oe?(Ae=o.relatedTarget||o.toElement,oe=W,Ae=Ae?Zr(Ae):null,Ae!==null&&(gt=c(Ae),Ie=Ae.tag,Ae!==gt||Ie!==5&&Ie!==27&&Ie!==6)&&(Ae=null)):(oe=null,Ae=W),oe!==Ae)){if(Ie=qb,fe="onMouseLeave",G="onMouseEnter",B="mouse",(n==="pointerout"||n==="pointerover")&&(Ie=Pb,fe="onPointerLeave",G="onPointerEnter",B="pointer"),gt=oe==null?J:Nl(oe),Z=Ae==null?J:Nl(Ae),J=new Ie(fe,B+"leave",oe,o,de),J.target=gt,J.relatedTarget=Z,fe=null,Zr(de)===W&&(Ie=new Ie(G,B+"enter",Ae,o,de),Ie.target=Z,Ie.relatedTarget=gt,fe=Ie),gt=fe,oe&&Ae)t:{for(Ie=NN,G=oe,B=Ae,Z=0,fe=G;fe;fe=Ie(fe))Z++;fe=0;for(var De=B;De;De=Ie(De))fe++;for(;0<Z-fe;)G=Ie(G),Z--;for(;0<fe-Z;)B=Ie(B),fe--;for(;Z--;){if(G===B||B!==null&&G===B.alternate){Ie=G;break t}G=Ie(G),B=Ie(B)}Ie=null}else Ie=null;oe!==null&&L1(he,J,oe,Ie,!1),Ae!==null&>!==null&&L1(he,gt,Ae,Ie,!0)}}e:{if(J=W?Nl(W):window,oe=J.nodeName&&J.nodeName.toLowerCase(),oe==="select"||oe==="input"&&J.type==="file")var rt=Wb;else if(Xb(J))if(Jb)rt=HA;else{rt=UA;var Me=$A}else oe=J.nodeName,!oe||oe.toLowerCase()!=="input"||J.type!=="checkbox"&&J.type!=="radio"?W&&kf(W.elementType)&&(rt=Wb):rt=IA;if(rt&&(rt=rt(n,W))){Zb(he,rt,o,de);break e}Me&&Me(n,J,W),n==="focusout"&&W&&J.type==="number"&&W.memoizedProps.value!=null&&wf(J,"number",J.value)}switch(Me=W?Nl(W):window,n){case"focusin":(Xb(Me)||Me.contentEditable==="true")&&(oo=Me,zf=W,Ul=null);break;case"focusout":Ul=zf=oo=null;break;case"mousedown":$f=!0;break;case"contextmenu":case"mouseup":case"dragend":$f=!1,l0(he,o,de);break;case"selectionchange":if(qA)break;case"keydown":case"keyup":l0(he,o,de)}var Ve;if(Rf)e:{switch(n){case"compositionstart":var We="onCompositionStart";break e;case"compositionend":We="onCompositionEnd";break e;case"compositionupdate":We="onCompositionUpdate";break e}We=void 0}else ro?Yb(n,o)&&(We="onCompositionEnd"):n==="keydown"&&o.keyCode===229&&(We="onCompositionStart");We&&(Vb&&o.locale!=="ko"&&(ro||We!=="onCompositionStart"?We==="onCompositionEnd"&&ro&&(Ve=Hb()):(Ji=de,Of="value"in Ji?Ji.value:Ji.textContent,ro=!0)),Me=xu(W,We),0<Me.length&&(We=new Fb(We,n,null,o,de),he.push({event:We,listeners:Me}),Ve?We.data=Ve:(Ve=Qb(o),Ve!==null&&(We.data=Ve)))),(Ve=RA?TA(n,o):DA(n,o))&&(We=xu(W,"onBeforeInput"),0<We.length&&(Me=new Fb("onBeforeInput","beforeinput",null,o,de),he.push({event:Me,listeners:We}),Me.data=Ve)),_N(he,n,W,o,de)}T1(he,i)})}function cs(n,i,o){return{instance:n,listener:i,currentTarget:o}}function xu(n,i){for(var o=i+"Capture",s=[];n!==null;){var f=n,h=f.stateNode;if(f=f.tag,f!==5&&f!==26&&f!==27||h===null||(f=Ml(n,o),f!=null&&s.unshift(cs(n,f,h)),f=Ml(n,i),f!=null&&s.push(cs(n,f,h))),n.tag===3)return s;n=n.return}return[]}function NN(n){if(n===null)return null;do n=n.return;while(n&&n.tag!==5&&n.tag!==27);return n||null}function L1(n,i,o,s,f){for(var h=i._reactName,y=[];o!==null&&o!==s;){var S=o,U=S.alternate,W=S.stateNode;if(S=S.tag,U!==null&&U===s)break;S!==5&&S!==26&&S!==27||W===null||(U=W,f?(W=Ml(o,h),W!=null&&y.unshift(cs(o,W,U))):f||(W=Ml(o,h),W!=null&&y.push(cs(o,W,U)))),o=o.return}y.length!==0&&n.push({event:i,listeners:y})}var MN=/\r\n?/g,CN=/\u0000|\uFFFD/g;function z1(n){return(typeof n=="string"?n:""+n).replace(MN,`
|
|
49
|
+
`).replace(CN,"")}function $1(n,i){return i=z1(i),z1(n)===i}function pt(n,i,o,s,f,h){switch(o){case"children":typeof s=="string"?i==="body"||i==="textarea"&&s===""||no(n,s):(typeof s=="number"||typeof s=="bigint")&&i!=="body"&&no(n,""+s);break;case"className":Ec(n,"class",s);break;case"tabIndex":Ec(n,"tabindex",s);break;case"dir":case"role":case"viewBox":case"width":case"height":Ec(n,o,s);break;case"style":$b(n,s,h);break;case"data":if(i!=="object"){Ec(n,"data",s);break}case"src":case"href":if(s===""&&(i!=="a"||o!=="href")){n.removeAttribute(o);break}if(s==null||typeof s=="function"||typeof s=="symbol"||typeof s=="boolean"){n.removeAttribute(o);break}s=jc(""+s),n.setAttribute(o,s);break;case"action":case"formAction":if(typeof s=="function"){n.setAttribute(o,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}else typeof h=="function"&&(o==="formAction"?(i!=="input"&&pt(n,i,"name",f.name,f,null),pt(n,i,"formEncType",f.formEncType,f,null),pt(n,i,"formMethod",f.formMethod,f,null),pt(n,i,"formTarget",f.formTarget,f,null)):(pt(n,i,"encType",f.encType,f,null),pt(n,i,"method",f.method,f,null),pt(n,i,"target",f.target,f,null)));if(s==null||typeof s=="symbol"||typeof s=="boolean"){n.removeAttribute(o);break}s=jc(""+s),n.setAttribute(o,s);break;case"onClick":s!=null&&(n.onclick=_i);break;case"onScroll":s!=null&&Qe("scroll",n);break;case"onScrollEnd":s!=null&&Qe("scrollend",n);break;case"dangerouslySetInnerHTML":if(s!=null){if(typeof s!="object"||!("__html"in s))throw Error(r(61));if(o=s.__html,o!=null){if(f.children!=null)throw Error(r(60));n.innerHTML=o}}break;case"multiple":n.multiple=s&&typeof s!="function"&&typeof s!="symbol";break;case"muted":n.muted=s&&typeof s!="function"&&typeof s!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(s==null||typeof s=="function"||typeof s=="boolean"||typeof s=="symbol"){n.removeAttribute("xlink:href");break}o=jc(""+s),n.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",o);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":s!=null&&typeof s!="function"&&typeof s!="symbol"?n.setAttribute(o,""+s):n.removeAttribute(o);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":s&&typeof s!="function"&&typeof s!="symbol"?n.setAttribute(o,""):n.removeAttribute(o);break;case"capture":case"download":s===!0?n.setAttribute(o,""):s!==!1&&s!=null&&typeof s!="function"&&typeof s!="symbol"?n.setAttribute(o,s):n.removeAttribute(o);break;case"cols":case"rows":case"size":case"span":s!=null&&typeof s!="function"&&typeof s!="symbol"&&!isNaN(s)&&1<=s?n.setAttribute(o,s):n.removeAttribute(o);break;case"rowSpan":case"start":s==null||typeof s=="function"||typeof s=="symbol"||isNaN(s)?n.removeAttribute(o):n.setAttribute(o,s);break;case"popover":Qe("beforetoggle",n),Qe("toggle",n),Sc(n,"popover",s);break;case"xlinkActuate":Ei(n,"http://www.w3.org/1999/xlink","xlink:actuate",s);break;case"xlinkArcrole":Ei(n,"http://www.w3.org/1999/xlink","xlink:arcrole",s);break;case"xlinkRole":Ei(n,"http://www.w3.org/1999/xlink","xlink:role",s);break;case"xlinkShow":Ei(n,"http://www.w3.org/1999/xlink","xlink:show",s);break;case"xlinkTitle":Ei(n,"http://www.w3.org/1999/xlink","xlink:title",s);break;case"xlinkType":Ei(n,"http://www.w3.org/1999/xlink","xlink:type",s);break;case"xmlBase":Ei(n,"http://www.w3.org/XML/1998/namespace","xml:base",s);break;case"xmlLang":Ei(n,"http://www.w3.org/XML/1998/namespace","xml:lang",s);break;case"xmlSpace":Ei(n,"http://www.w3.org/XML/1998/namespace","xml:space",s);break;case"is":Sc(n,"is",s);break;case"innerText":case"textContent":break;default:(!(2<o.length)||o[0]!=="o"&&o[0]!=="O"||o[1]!=="n"&&o[1]!=="N")&&(o=rA.get(o)||o,Sc(n,o,s))}}function sm(n,i,o,s,f,h){switch(o){case"style":$b(n,s,h);break;case"dangerouslySetInnerHTML":if(s!=null){if(typeof s!="object"||!("__html"in s))throw Error(r(61));if(o=s.__html,o!=null){if(f.children!=null)throw Error(r(60));n.innerHTML=o}}break;case"children":typeof s=="string"?no(n,s):(typeof s=="number"||typeof s=="bigint")&&no(n,""+s);break;case"onScroll":s!=null&&Qe("scroll",n);break;case"onScrollEnd":s!=null&&Qe("scrollend",n);break;case"onClick":s!=null&&(n.onclick=_i);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!Ab.hasOwnProperty(o))e:{if(o[0]==="o"&&o[1]==="n"&&(f=o.endsWith("Capture"),i=o.slice(2,f?o.length-7:void 0),h=n[gn]||null,h=h!=null?h[o]:null,typeof h=="function"&&n.removeEventListener(i,h,f),typeof s=="function")){typeof h!="function"&&h!==null&&(o in n?n[o]=null:n.hasAttribute(o)&&n.removeAttribute(o)),n.addEventListener(i,s,f);break e}o in n?n[o]=s:s===!0?n.setAttribute(o,""):Sc(n,o,s)}}}function nn(n,i,o){switch(i){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":Qe("error",n),Qe("load",n);var s=!1,f=!1,h;for(h in o)if(o.hasOwnProperty(h)){var y=o[h];if(y!=null)switch(h){case"src":s=!0;break;case"srcSet":f=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(r(137,i));default:pt(n,i,h,y,o,null)}}f&&pt(n,i,"srcSet",o.srcSet,o,null),s&&pt(n,i,"src",o.src,o,null);return;case"input":Qe("invalid",n);var S=h=y=f=null,U=null,W=null;for(s in o)if(o.hasOwnProperty(s)){var de=o[s];if(de!=null)switch(s){case"name":f=de;break;case"type":y=de;break;case"checked":U=de;break;case"defaultChecked":W=de;break;case"value":h=de;break;case"defaultValue":S=de;break;case"children":case"dangerouslySetInnerHTML":if(de!=null)throw Error(r(137,i));break;default:pt(n,i,s,de,o,null)}}Tb(n,h,S,U,W,y,f,!1);return;case"select":Qe("invalid",n),s=y=h=null;for(f in o)if(o.hasOwnProperty(f)&&(S=o[f],S!=null))switch(f){case"value":h=S;break;case"defaultValue":y=S;break;case"multiple":s=S;default:pt(n,i,f,S,o,null)}i=h,o=y,n.multiple=!!s,i!=null?to(n,!!s,i,!1):o!=null&&to(n,!!s,o,!0);return;case"textarea":Qe("invalid",n),h=f=s=null;for(y in o)if(o.hasOwnProperty(y)&&(S=o[y],S!=null))switch(y){case"value":s=S;break;case"defaultValue":f=S;break;case"children":h=S;break;case"dangerouslySetInnerHTML":if(S!=null)throw Error(r(91));break;default:pt(n,i,y,S,o,null)}Lb(n,s,f,h);return;case"option":for(U in o)if(o.hasOwnProperty(U)&&(s=o[U],s!=null))switch(U){case"selected":n.selected=s&&typeof s!="function"&&typeof s!="symbol";break;default:pt(n,i,U,s,o,null)}return;case"dialog":Qe("beforetoggle",n),Qe("toggle",n),Qe("cancel",n),Qe("close",n);break;case"iframe":case"object":Qe("load",n);break;case"video":case"audio":for(s=0;s<ss.length;s++)Qe(ss[s],n);break;case"image":Qe("error",n),Qe("load",n);break;case"details":Qe("toggle",n);break;case"embed":case"source":case"link":Qe("error",n),Qe("load",n);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(W in o)if(o.hasOwnProperty(W)&&(s=o[W],s!=null))switch(W){case"children":case"dangerouslySetInnerHTML":throw Error(r(137,i));default:pt(n,i,W,s,o,null)}return;default:if(kf(i)){for(de in o)o.hasOwnProperty(de)&&(s=o[de],s!==void 0&&sm(n,i,de,s,o,void 0));return}}for(S in o)o.hasOwnProperty(S)&&(s=o[S],s!=null&&pt(n,i,S,s,o,null))}function RN(n,i,o,s){switch(i){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var f=null,h=null,y=null,S=null,U=null,W=null,de=null;for(oe in o){var he=o[oe];if(o.hasOwnProperty(oe)&&he!=null)switch(oe){case"checked":break;case"value":break;case"defaultValue":U=he;default:s.hasOwnProperty(oe)||pt(n,i,oe,null,s,he)}}for(var J in s){var oe=s[J];if(he=o[J],s.hasOwnProperty(J)&&(oe!=null||he!=null))switch(J){case"type":h=oe;break;case"name":f=oe;break;case"checked":W=oe;break;case"defaultChecked":de=oe;break;case"value":y=oe;break;case"defaultValue":S=oe;break;case"children":case"dangerouslySetInnerHTML":if(oe!=null)throw Error(r(137,i));break;default:oe!==he&&pt(n,i,J,oe,s,he)}}xf(n,y,S,U,W,de,h,f);return;case"select":oe=y=S=J=null;for(h in o)if(U=o[h],o.hasOwnProperty(h)&&U!=null)switch(h){case"value":break;case"multiple":oe=U;default:s.hasOwnProperty(h)||pt(n,i,h,null,s,U)}for(f in s)if(h=s[f],U=o[f],s.hasOwnProperty(f)&&(h!=null||U!=null))switch(f){case"value":J=h;break;case"defaultValue":S=h;break;case"multiple":y=h;default:h!==U&&pt(n,i,f,h,s,U)}i=S,o=y,s=oe,J!=null?to(n,!!o,J,!1):!!s!=!!o&&(i!=null?to(n,!!o,i,!0):to(n,!!o,o?[]:"",!1));return;case"textarea":oe=J=null;for(S in o)if(f=o[S],o.hasOwnProperty(S)&&f!=null&&!s.hasOwnProperty(S))switch(S){case"value":break;case"children":break;default:pt(n,i,S,null,s,f)}for(y in s)if(f=s[y],h=o[y],s.hasOwnProperty(y)&&(f!=null||h!=null))switch(y){case"value":J=f;break;case"defaultValue":oe=f;break;case"children":break;case"dangerouslySetInnerHTML":if(f!=null)throw Error(r(91));break;default:f!==h&&pt(n,i,y,f,s,h)}Db(n,J,oe);return;case"option":for(var Ae in o)if(J=o[Ae],o.hasOwnProperty(Ae)&&J!=null&&!s.hasOwnProperty(Ae))switch(Ae){case"selected":n.selected=!1;break;default:pt(n,i,Ae,null,s,J)}for(U in s)if(J=s[U],oe=o[U],s.hasOwnProperty(U)&&J!==oe&&(J!=null||oe!=null))switch(U){case"selected":n.selected=J&&typeof J!="function"&&typeof J!="symbol";break;default:pt(n,i,U,J,s,oe)}return;case"img":case"link":case"area":case"base":case"br":case"col":case"embed":case"hr":case"keygen":case"meta":case"param":case"source":case"track":case"wbr":case"menuitem":for(var Ie in o)J=o[Ie],o.hasOwnProperty(Ie)&&J!=null&&!s.hasOwnProperty(Ie)&&pt(n,i,Ie,null,s,J);for(W in s)if(J=s[W],oe=o[W],s.hasOwnProperty(W)&&J!==oe&&(J!=null||oe!=null))switch(W){case"children":case"dangerouslySetInnerHTML":if(J!=null)throw Error(r(137,i));break;default:pt(n,i,W,J,s,oe)}return;default:if(kf(i)){for(var gt in o)J=o[gt],o.hasOwnProperty(gt)&&J!==void 0&&!s.hasOwnProperty(gt)&&sm(n,i,gt,void 0,s,J);for(de in s)J=s[de],oe=o[de],!s.hasOwnProperty(de)||J===oe||J===void 0&&oe===void 0||sm(n,i,de,J,s,oe);return}}for(var G in o)J=o[G],o.hasOwnProperty(G)&&J!=null&&!s.hasOwnProperty(G)&&pt(n,i,G,null,s,J);for(he in s)J=s[he],oe=o[he],!s.hasOwnProperty(he)||J===oe||J==null&&oe==null||pt(n,i,he,J,s,oe)}function U1(n){switch(n){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function TN(){if(typeof performance.getEntriesByType=="function"){for(var n=0,i=0,o=performance.getEntriesByType("resource"),s=0;s<o.length;s++){var f=o[s],h=f.transferSize,y=f.initiatorType,S=f.duration;if(h&&S&&U1(y)){for(y=0,S=f.responseEnd,s+=1;s<o.length;s++){var U=o[s],W=U.startTime;if(W>S)break;var de=U.transferSize,he=U.initiatorType;de&&U1(he)&&(U=U.responseEnd,y+=de*(U<S?1:(S-W)/(U-W)))}if(--s,i+=8*(h+y)/(f.duration/1e3),n++,10<n)break}}if(0<n)return i/n/1e6}return navigator.connection&&(n=navigator.connection.downlink,typeof n=="number")?n:5}var cm=null,um=null;function wu(n){return n.nodeType===9?n:n.ownerDocument}function I1(n){switch(n){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function H1(n,i){if(n===0)switch(i){case"svg":return 1;case"math":return 2;default:return 0}return n===1&&i==="foreignObject"?0:n}function dm(n,i){return n==="textarea"||n==="noscript"||typeof i.children=="string"||typeof i.children=="number"||typeof i.children=="bigint"||typeof i.dangerouslySetInnerHTML=="object"&&i.dangerouslySetInnerHTML!==null&&i.dangerouslySetInnerHTML.__html!=null}var fm=null;function DN(){var n=window.event;return n&&n.type==="popstate"?n===fm?!1:(fm=n,!0):(fm=null,!1)}var B1=typeof setTimeout=="function"?setTimeout:void 0,LN=typeof clearTimeout=="function"?clearTimeout:void 0,q1=typeof Promise=="function"?Promise:void 0,zN=typeof queueMicrotask=="function"?queueMicrotask:typeof q1<"u"?function(n){return q1.resolve(null).then(n).catch($N)}:B1;function $N(n){setTimeout(function(){throw n})}function ga(n){return n==="head"}function F1(n,i){var o=i,s=0;do{var f=o.nextSibling;if(n.removeChild(o),f&&f.nodeType===8)if(o=f.data,o==="/$"||o==="/&"){if(s===0){n.removeChild(f),Do(i);return}s--}else if(o==="$"||o==="$?"||o==="$~"||o==="$!"||o==="&")s++;else if(o==="html")us(n.ownerDocument.documentElement);else if(o==="head"){o=n.ownerDocument.head,us(o);for(var h=o.firstChild;h;){var y=h.nextSibling,S=h.nodeName;h[Al]||S==="SCRIPT"||S==="STYLE"||S==="LINK"&&h.rel.toLowerCase()==="stylesheet"||o.removeChild(h),h=y}}else o==="body"&&us(n.ownerDocument.body);o=f}while(o);Do(i)}function P1(n,i){var o=n;n=0;do{var s=o.nextSibling;if(o.nodeType===1?i?(o._stashedDisplay=o.style.display,o.style.display="none"):(o.style.display=o._stashedDisplay||"",o.getAttribute("style")===""&&o.removeAttribute("style")):o.nodeType===3&&(i?(o._stashedText=o.nodeValue,o.nodeValue=""):o.nodeValue=o._stashedText||""),s&&s.nodeType===8)if(o=s.data,o==="/$"){if(n===0)break;n--}else o!=="$"&&o!=="$?"&&o!=="$~"&&o!=="$!"||n++;o=s}while(o)}function hm(n){var i=n.firstChild;for(i&&i.nodeType===10&&(i=i.nextSibling);i;){var o=i;switch(i=i.nextSibling,o.nodeName){case"HTML":case"HEAD":case"BODY":hm(o),bf(o);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(o.rel.toLowerCase()==="stylesheet")continue}n.removeChild(o)}}function UN(n,i,o,s){for(;n.nodeType===1;){var f=o;if(n.nodeName.toLowerCase()!==i.toLowerCase()){if(!s&&(n.nodeName!=="INPUT"||n.type!=="hidden"))break}else if(s){if(!n[Al])switch(i){case"meta":if(!n.hasAttribute("itemprop"))break;return n;case"link":if(h=n.getAttribute("rel"),h==="stylesheet"&&n.hasAttribute("data-precedence"))break;if(h!==f.rel||n.getAttribute("href")!==(f.href==null||f.href===""?null:f.href)||n.getAttribute("crossorigin")!==(f.crossOrigin==null?null:f.crossOrigin)||n.getAttribute("title")!==(f.title==null?null:f.title))break;return n;case"style":if(n.hasAttribute("data-precedence"))break;return n;case"script":if(h=n.getAttribute("src"),(h!==(f.src==null?null:f.src)||n.getAttribute("type")!==(f.type==null?null:f.type)||n.getAttribute("crossorigin")!==(f.crossOrigin==null?null:f.crossOrigin))&&h&&n.hasAttribute("async")&&!n.hasAttribute("itemprop"))break;return n;default:return n}}else if(i==="input"&&n.type==="hidden"){var h=f.name==null?null:""+f.name;if(f.type==="hidden"&&n.getAttribute("name")===h)return n}else return n;if(n=Zn(n.nextSibling),n===null)break}return null}function IN(n,i,o){if(i==="")return null;for(;n.nodeType!==3;)if((n.nodeType!==1||n.nodeName!=="INPUT"||n.type!=="hidden")&&!o||(n=Zn(n.nextSibling),n===null))return null;return n}function V1(n,i){for(;n.nodeType!==8;)if((n.nodeType!==1||n.nodeName!=="INPUT"||n.type!=="hidden")&&!i||(n=Zn(n.nextSibling),n===null))return null;return n}function mm(n){return n.data==="$?"||n.data==="$~"}function pm(n){return n.data==="$!"||n.data==="$?"&&n.ownerDocument.readyState!=="loading"}function HN(n,i){var o=n.ownerDocument;if(n.data==="$~")n._reactRetry=i;else if(n.data!=="$?"||o.readyState!=="loading")i();else{var s=function(){i(),o.removeEventListener("DOMContentLoaded",s)};o.addEventListener("DOMContentLoaded",s),n._reactRetry=s}}function Zn(n){for(;n!=null;n=n.nextSibling){var i=n.nodeType;if(i===1||i===3)break;if(i===8){if(i=n.data,i==="$"||i==="$!"||i==="$?"||i==="$~"||i==="&"||i==="F!"||i==="F")break;if(i==="/$"||i==="/&")return null}}return n}var gm=null;function G1(n){n=n.nextSibling;for(var i=0;n;){if(n.nodeType===8){var o=n.data;if(o==="/$"||o==="/&"){if(i===0)return Zn(n.nextSibling);i--}else o!=="$"&&o!=="$!"&&o!=="$?"&&o!=="$~"&&o!=="&"||i++}n=n.nextSibling}return null}function K1(n){n=n.previousSibling;for(var i=0;n;){if(n.nodeType===8){var o=n.data;if(o==="$"||o==="$!"||o==="$?"||o==="$~"||o==="&"){if(i===0)return n;i--}else o!=="/$"&&o!=="/&"||i++}n=n.previousSibling}return null}function Y1(n,i,o){switch(i=wu(o),n){case"html":if(n=i.documentElement,!n)throw Error(r(452));return n;case"head":if(n=i.head,!n)throw Error(r(453));return n;case"body":if(n=i.body,!n)throw Error(r(454));return n;default:throw Error(r(451))}}function us(n){for(var i=n.attributes;i.length;)n.removeAttributeNode(i[0]);bf(n)}var Wn=new Map,Q1=new Set;function ku(n){return typeof n.getRootNode=="function"?n.getRootNode():n.nodeType===9?n:n.ownerDocument}var Bi=V.d;V.d={f:BN,r:qN,D:FN,C:PN,L:VN,m:GN,X:YN,S:KN,M:QN};function BN(){var n=Bi.f(),i=hu();return n||i}function qN(n){var i=Wr(n);i!==null&&i.tag===5&&i.type==="form"?fv(i):Bi.r(n)}var Co=typeof document>"u"?null:document;function X1(n,i,o){var s=Co;if(s&&typeof i=="string"&&i){var f=Pn(i);f='link[rel="'+n+'"][href="'+f+'"]',typeof o=="string"&&(f+='[crossorigin="'+o+'"]'),Q1.has(f)||(Q1.add(f),n={rel:n,crossOrigin:o,href:i},s.querySelector(f)===null&&(i=s.createElement("link"),nn(i,"link",n),Yt(i),s.head.appendChild(i)))}}function FN(n){Bi.D(n),X1("dns-prefetch",n,null)}function PN(n,i){Bi.C(n,i),X1("preconnect",n,i)}function VN(n,i,o){Bi.L(n,i,o);var s=Co;if(s&&n&&i){var f='link[rel="preload"][as="'+Pn(i)+'"]';i==="image"&&o&&o.imageSrcSet?(f+='[imagesrcset="'+Pn(o.imageSrcSet)+'"]',typeof o.imageSizes=="string"&&(f+='[imagesizes="'+Pn(o.imageSizes)+'"]')):f+='[href="'+Pn(n)+'"]';var h=f;switch(i){case"style":h=Ro(n);break;case"script":h=To(n)}Wn.has(h)||(n=v({rel:"preload",href:i==="image"&&o&&o.imageSrcSet?void 0:n,as:i},o),Wn.set(h,n),s.querySelector(f)!==null||i==="style"&&s.querySelector(ds(h))||i==="script"&&s.querySelector(fs(h))||(i=s.createElement("link"),nn(i,"link",n),Yt(i),s.head.appendChild(i)))}}function GN(n,i){Bi.m(n,i);var o=Co;if(o&&n){var s=i&&typeof i.as=="string"?i.as:"script",f='link[rel="modulepreload"][as="'+Pn(s)+'"][href="'+Pn(n)+'"]',h=f;switch(s){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":h=To(n)}if(!Wn.has(h)&&(n=v({rel:"modulepreload",href:n},i),Wn.set(h,n),o.querySelector(f)===null)){switch(s){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(o.querySelector(fs(h)))return}s=o.createElement("link"),nn(s,"link",n),Yt(s),o.head.appendChild(s)}}}function KN(n,i,o){Bi.S(n,i,o);var s=Co;if(s&&n){var f=Jr(s).hoistableStyles,h=Ro(n);i=i||"default";var y=f.get(h);if(!y){var S={loading:0,preload:null};if(y=s.querySelector(ds(h)))S.loading=5;else{n=v({rel:"stylesheet",href:n,"data-precedence":i},o),(o=Wn.get(h))&&ym(n,o);var U=y=s.createElement("link");Yt(U),nn(U,"link",n),U._p=new Promise(function(W,de){U.onload=W,U.onerror=de}),U.addEventListener("load",function(){S.loading|=1}),U.addEventListener("error",function(){S.loading|=2}),S.loading|=4,Su(y,i,s)}y={type:"stylesheet",instance:y,count:1,state:S},f.set(h,y)}}}function YN(n,i){Bi.X(n,i);var o=Co;if(o&&n){var s=Jr(o).hoistableScripts,f=To(n),h=s.get(f);h||(h=o.querySelector(fs(f)),h||(n=v({src:n,async:!0},i),(i=Wn.get(f))&&bm(n,i),h=o.createElement("script"),Yt(h),nn(h,"link",n),o.head.appendChild(h)),h={type:"script",instance:h,count:1,state:null},s.set(f,h))}}function QN(n,i){Bi.M(n,i);var o=Co;if(o&&n){var s=Jr(o).hoistableScripts,f=To(n),h=s.get(f);h||(h=o.querySelector(fs(f)),h||(n=v({src:n,async:!0,type:"module"},i),(i=Wn.get(f))&&bm(n,i),h=o.createElement("script"),Yt(h),nn(h,"link",n),o.head.appendChild(h)),h={type:"script",instance:h,count:1,state:null},s.set(f,h))}}function Z1(n,i,o,s){var f=(f=pe.current)?ku(f):null;if(!f)throw Error(r(446));switch(n){case"meta":case"title":return null;case"style":return typeof o.precedence=="string"&&typeof o.href=="string"?(i=Ro(o.href),o=Jr(f).hoistableStyles,s=o.get(i),s||(s={type:"style",instance:null,count:0,state:null},o.set(i,s)),s):{type:"void",instance:null,count:0,state:null};case"link":if(o.rel==="stylesheet"&&typeof o.href=="string"&&typeof o.precedence=="string"){n=Ro(o.href);var h=Jr(f).hoistableStyles,y=h.get(n);if(y||(f=f.ownerDocument||f,y={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},h.set(n,y),(h=f.querySelector(ds(n)))&&!h._p&&(y.instance=h,y.state.loading=5),Wn.has(n)||(o={rel:"preload",as:"style",href:o.href,crossOrigin:o.crossOrigin,integrity:o.integrity,media:o.media,hrefLang:o.hrefLang,referrerPolicy:o.referrerPolicy},Wn.set(n,o),h||XN(f,n,o,y.state))),i&&s===null)throw Error(r(528,""));return y}if(i&&s!==null)throw Error(r(529,""));return null;case"script":return i=o.async,o=o.src,typeof o=="string"&&i&&typeof i!="function"&&typeof i!="symbol"?(i=To(o),o=Jr(f).hoistableScripts,s=o.get(i),s||(s={type:"script",instance:null,count:0,state:null},o.set(i,s)),s):{type:"void",instance:null,count:0,state:null};default:throw Error(r(444,n))}}function Ro(n){return'href="'+Pn(n)+'"'}function ds(n){return'link[rel="stylesheet"]['+n+"]"}function W1(n){return v({},n,{"data-precedence":n.precedence,precedence:null})}function XN(n,i,o,s){n.querySelector('link[rel="preload"][as="style"]['+i+"]")?s.loading=1:(i=n.createElement("link"),s.preload=i,i.addEventListener("load",function(){return s.loading|=1}),i.addEventListener("error",function(){return s.loading|=2}),nn(i,"link",o),Yt(i),n.head.appendChild(i))}function To(n){return'[src="'+Pn(n)+'"]'}function fs(n){return"script[async]"+n}function J1(n,i,o){if(i.count++,i.instance===null)switch(i.type){case"style":var s=n.querySelector('style[data-href~="'+Pn(o.href)+'"]');if(s)return i.instance=s,Yt(s),s;var f=v({},o,{"data-href":o.href,"data-precedence":o.precedence,href:null,precedence:null});return s=(n.ownerDocument||n).createElement("style"),Yt(s),nn(s,"style",f),Su(s,o.precedence,n),i.instance=s;case"stylesheet":f=Ro(o.href);var h=n.querySelector(ds(f));if(h)return i.state.loading|=4,i.instance=h,Yt(h),h;s=W1(o),(f=Wn.get(f))&&ym(s,f),h=(n.ownerDocument||n).createElement("link"),Yt(h);var y=h;return y._p=new Promise(function(S,U){y.onload=S,y.onerror=U}),nn(h,"link",s),i.state.loading|=4,Su(h,o.precedence,n),i.instance=h;case"script":return h=To(o.src),(f=n.querySelector(fs(h)))?(i.instance=f,Yt(f),f):(s=o,(f=Wn.get(h))&&(s=v({},o),bm(s,f)),n=n.ownerDocument||n,f=n.createElement("script"),Yt(f),nn(f,"link",s),n.head.appendChild(f),i.instance=f);case"void":return null;default:throw Error(r(443,i.type))}else i.type==="stylesheet"&&(i.state.loading&4)===0&&(s=i.instance,i.state.loading|=4,Su(s,o.precedence,n));return i.instance}function Su(n,i,o){for(var s=o.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),f=s.length?s[s.length-1]:null,h=f,y=0;y<s.length;y++){var S=s[y];if(S.dataset.precedence===i)h=S;else if(h!==f)break}h?h.parentNode.insertBefore(n,h.nextSibling):(i=o.nodeType===9?o.head:o,i.insertBefore(n,i.firstChild))}function ym(n,i){n.crossOrigin==null&&(n.crossOrigin=i.crossOrigin),n.referrerPolicy==null&&(n.referrerPolicy=i.referrerPolicy),n.title==null&&(n.title=i.title)}function bm(n,i){n.crossOrigin==null&&(n.crossOrigin=i.crossOrigin),n.referrerPolicy==null&&(n.referrerPolicy=i.referrerPolicy),n.integrity==null&&(n.integrity=i.integrity)}var Eu=null;function ex(n,i,o){if(Eu===null){var s=new Map,f=Eu=new Map;f.set(o,s)}else f=Eu,s=f.get(o),s||(s=new Map,f.set(o,s));if(s.has(n))return s;for(s.set(n,null),o=o.getElementsByTagName(n),f=0;f<o.length;f++){var h=o[f];if(!(h[Al]||h[Ot]||n==="link"&&h.getAttribute("rel")==="stylesheet")&&h.namespaceURI!=="http://www.w3.org/2000/svg"){var y=h.getAttribute(i)||"";y=n+y;var S=s.get(y);S?S.push(h):s.set(y,[h])}}return s}function tx(n,i,o){n=n.ownerDocument||n,n.head.insertBefore(o,i==="title"?n.querySelector("head > title"):null)}function ZN(n,i,o){if(o===1||i.itemProp!=null)return!1;switch(n){case"meta":case"title":return!0;case"style":if(typeof i.precedence!="string"||typeof i.href!="string"||i.href==="")break;return!0;case"link":if(typeof i.rel!="string"||typeof i.href!="string"||i.href===""||i.onLoad||i.onError)break;switch(i.rel){case"stylesheet":return n=i.disabled,typeof i.precedence=="string"&&n==null;default:return!0}case"script":if(i.async&&typeof i.async!="function"&&typeof i.async!="symbol"&&!i.onLoad&&!i.onError&&i.src&&typeof i.src=="string")return!0}return!1}function nx(n){return!(n.type==="stylesheet"&&(n.state.loading&3)===0)}function WN(n,i,o,s){if(o.type==="stylesheet"&&(typeof s.media!="string"||matchMedia(s.media).matches!==!1)&&(o.state.loading&4)===0){if(o.instance===null){var f=Ro(s.href),h=i.querySelector(ds(f));if(h){i=h._p,i!==null&&typeof i=="object"&&typeof i.then=="function"&&(n.count++,n=_u.bind(n),i.then(n,n)),o.state.loading|=4,o.instance=h,Yt(h);return}h=i.ownerDocument||i,s=W1(s),(f=Wn.get(f))&&ym(s,f),h=h.createElement("link"),Yt(h);var y=h;y._p=new Promise(function(S,U){y.onload=S,y.onerror=U}),nn(h,"link",s),o.instance=h}n.stylesheets===null&&(n.stylesheets=new Map),n.stylesheets.set(o,i),(i=o.state.preload)&&(o.state.loading&3)===0&&(n.count++,o=_u.bind(n),i.addEventListener("load",o),i.addEventListener("error",o))}}var vm=0;function JN(n,i){return n.stylesheets&&n.count===0&&Ou(n,n.stylesheets),0<n.count||0<n.imgCount?function(o){var s=setTimeout(function(){if(n.stylesheets&&Ou(n,n.stylesheets),n.unsuspend){var h=n.unsuspend;n.unsuspend=null,h()}},6e4+i);0<n.imgBytes&&vm===0&&(vm=62500*TN());var f=setTimeout(function(){if(n.waitingForImages=!1,n.count===0&&(n.stylesheets&&Ou(n,n.stylesheets),n.unsuspend)){var h=n.unsuspend;n.unsuspend=null,h()}},(n.imgBytes>vm?50:800)+i);return n.unsuspend=o,function(){n.unsuspend=null,clearTimeout(s),clearTimeout(f)}}:null}function _u(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)Ou(this,this.stylesheets);else if(this.unsuspend){var n=this.unsuspend;this.unsuspend=null,n()}}}var ju=null;function Ou(n,i){n.stylesheets=null,n.unsuspend!==null&&(n.count++,ju=new Map,i.forEach(eM,n),ju=null,_u.call(n))}function eM(n,i){if(!(i.state.loading&4)){var o=ju.get(n);if(o)var s=o.get(null);else{o=new Map,ju.set(n,o);for(var f=n.querySelectorAll("link[data-precedence],style[data-precedence]"),h=0;h<f.length;h++){var y=f[h];(y.nodeName==="LINK"||y.getAttribute("media")!=="not all")&&(o.set(y.dataset.precedence,y),s=y)}s&&o.set(null,s)}f=i.instance,y=f.getAttribute("data-precedence"),h=o.get(y)||s,h===s&&o.set(null,f),o.set(y,f),this.count++,s=_u.bind(this),f.addEventListener("load",s),f.addEventListener("error",s),h?h.parentNode.insertBefore(f,h.nextSibling):(n=n.nodeType===9?n.head:n,n.insertBefore(f,n.firstChild)),i.state.loading|=4}}var hs={$$typeof:A,Provider:null,Consumer:null,_currentValue:te,_currentValue2:te,_threadCount:0};function tM(n,i,o,s,f,h,y,S,U){this.tag=1,this.containerInfo=n,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=Si(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Si(0),this.hiddenUpdates=Si(null),this.identifierPrefix=s,this.onUncaughtError=f,this.onCaughtError=h,this.onRecoverableError=y,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=U,this.incompleteTransitions=new Map}function ix(n,i,o,s,f,h,y,S,U,W,de,he){return n=new tM(n,i,o,y,U,W,de,he,S),i=1,h===!0&&(i|=24),h=Mn(3,null,null,i),n.current=h,h.stateNode=n,i=Wf(),i.refCount++,n.pooledCache=i,i.refCount++,h.memoizedState={element:s,isDehydrated:o,cache:i},nh(h),n}function ax(n){return n?(n=co,n):co}function rx(n,i,o,s,f,h){f=ax(f),s.context===null?s.context=f:s.pendingContext=f,s=ra(i),s.payload={element:o},h=h===void 0?null:h,h!==null&&(s.callback=h),o=oa(n,s,i),o!==null&&(kn(o,n,i),Vl(o,n,i))}function ox(n,i){if(n=n.memoizedState,n!==null&&n.dehydrated!==null){var o=n.retryLane;n.retryLane=o!==0&&o<i?o:i}}function xm(n,i){ox(n,i),(n=n.alternate)&&ox(n,i)}function lx(n){if(n.tag===13||n.tag===31){var i=lr(n,67108864);i!==null&&kn(i,n,67108864),xm(n,67108864)}}function sx(n){if(n.tag===13||n.tag===31){var i=Ln();i=Se(i);var o=lr(n,i);o!==null&&kn(o,n,i),xm(n,i)}}var Au=!0;function nM(n,i,o,s){var f=M.T;M.T=null;var h=V.p;try{V.p=2,wm(n,i,o,s)}finally{V.p=h,M.T=f}}function iM(n,i,o,s){var f=M.T;M.T=null;var h=V.p;try{V.p=8,wm(n,i,o,s)}finally{V.p=h,M.T=f}}function wm(n,i,o,s){if(Au){var f=km(s);if(f===null)lm(n,i,s,Nu,o),ux(n,s);else if(rM(f,n,i,o,s))s.stopPropagation();else if(ux(n,s),i&4&&-1<aM.indexOf(n)){for(;f!==null;){var h=Wr(f);if(h!==null)switch(h.tag){case 3:if(h=h.stateNode,h.current.memoizedState.isDehydrated){var y=St(h.pendingLanes);if(y!==0){var S=h;for(S.pendingLanes|=2,S.entangledLanes|=2;y;){var U=1<<31-be(y);S.entanglements[1]|=U,y&=~U}mi(h),(lt&6)===0&&(du=yt()+500,ls(0))}}break;case 31:case 13:S=lr(h,2),S!==null&&kn(S,h,2),hu(),xm(h,2)}if(h=km(s),h===null&&lm(n,i,s,Nu,o),h===f)break;f=h}f!==null&&s.stopPropagation()}else lm(n,i,s,null,o)}}function km(n){return n=Ef(n),Sm(n)}var Nu=null;function Sm(n){if(Nu=null,n=Zr(n),n!==null){var i=c(n);if(i===null)n=null;else{var o=i.tag;if(o===13){if(n=u(i),n!==null)return n;n=null}else if(o===31){if(n=m(i),n!==null)return n;n=null}else if(o===3){if(i.stateNode.current.memoizedState.isDehydrated)return i.tag===3?i.stateNode.containerInfo:null;n=null}else i!==n&&(n=null)}}return Nu=n,null}function cx(n){switch(n){case"beforetoggle":case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"toggle":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 2;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 8;case"message":switch(Wi()){case ci:return 2;case ti:return 8;case we:case Te:return 32;case Ce:return 268435456;default:return 32}default:return 32}}var Em=!1,ya=null,ba=null,va=null,ms=new Map,ps=new Map,xa=[],aM="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset".split(" ");function ux(n,i){switch(n){case"focusin":case"focusout":ya=null;break;case"dragenter":case"dragleave":ba=null;break;case"mouseover":case"mouseout":va=null;break;case"pointerover":case"pointerout":ms.delete(i.pointerId);break;case"gotpointercapture":case"lostpointercapture":ps.delete(i.pointerId)}}function gs(n,i,o,s,f,h){return n===null||n.nativeEvent!==h?(n={blockedOn:i,domEventName:o,eventSystemFlags:s,nativeEvent:h,targetContainers:[f]},i!==null&&(i=Wr(i),i!==null&&lx(i)),n):(n.eventSystemFlags|=s,i=n.targetContainers,f!==null&&i.indexOf(f)===-1&&i.push(f),n)}function rM(n,i,o,s,f){switch(i){case"focusin":return ya=gs(ya,n,i,o,s,f),!0;case"dragenter":return ba=gs(ba,n,i,o,s,f),!0;case"mouseover":return va=gs(va,n,i,o,s,f),!0;case"pointerover":var h=f.pointerId;return ms.set(h,gs(ms.get(h)||null,n,i,o,s,f)),!0;case"gotpointercapture":return h=f.pointerId,ps.set(h,gs(ps.get(h)||null,n,i,o,s,f)),!0}return!1}function dx(n){var i=Zr(n.target);if(i!==null){var o=c(i);if(o!==null){if(i=o.tag,i===13){if(i=u(o),i!==null){n.blockedOn=i,nt(n.priority,function(){sx(o)});return}}else if(i===31){if(i=m(o),i!==null){n.blockedOn=i,nt(n.priority,function(){sx(o)});return}}else if(i===3&&o.stateNode.current.memoizedState.isDehydrated){n.blockedOn=o.tag===3?o.stateNode.containerInfo:null;return}}}n.blockedOn=null}function Mu(n){if(n.blockedOn!==null)return!1;for(var i=n.targetContainers;0<i.length;){var o=km(n.nativeEvent);if(o===null){o=n.nativeEvent;var s=new o.constructor(o.type,o);Sf=s,o.target.dispatchEvent(s),Sf=null}else return i=Wr(o),i!==null&&lx(i),n.blockedOn=o,!1;i.shift()}return!0}function fx(n,i,o){Mu(n)&&o.delete(i)}function oM(){Em=!1,ya!==null&&Mu(ya)&&(ya=null),ba!==null&&Mu(ba)&&(ba=null),va!==null&&Mu(va)&&(va=null),ms.forEach(fx),ps.forEach(fx)}function Cu(n,i){n.blockedOn===i&&(n.blockedOn=null,Em||(Em=!0,e.unstable_scheduleCallback(e.unstable_NormalPriority,oM)))}var Ru=null;function hx(n){Ru!==n&&(Ru=n,e.unstable_scheduleCallback(e.unstable_NormalPriority,function(){Ru===n&&(Ru=null);for(var i=0;i<n.length;i+=3){var o=n[i],s=n[i+1],f=n[i+2];if(typeof s!="function"){if(Sm(s||o)===null)continue;break}var h=Wr(o);h!==null&&(n.splice(i,3),i-=3,kh(h,{pending:!0,data:f,method:o.method,action:s},s,f))}}))}function Do(n){function i(U){return Cu(U,n)}ya!==null&&Cu(ya,n),ba!==null&&Cu(ba,n),va!==null&&Cu(va,n),ms.forEach(i),ps.forEach(i);for(var o=0;o<xa.length;o++){var s=xa[o];s.blockedOn===n&&(s.blockedOn=null)}for(;0<xa.length&&(o=xa[0],o.blockedOn===null);)dx(o),o.blockedOn===null&&xa.shift();if(o=(n.ownerDocument||n).$$reactFormReplay,o!=null)for(s=0;s<o.length;s+=3){var f=o[s],h=o[s+1],y=f[gn]||null;if(typeof h=="function")y||hx(o);else if(y){var S=null;if(h&&h.hasAttribute("formAction")){if(f=h,y=h[gn]||null)S=y.formAction;else if(Sm(f)!==null)continue}else S=y.action;typeof S=="function"?o[s+1]=S:(o.splice(s,3),s-=3),hx(o)}}}function mx(){function n(h){h.canIntercept&&h.info==="react-transition"&&h.intercept({handler:function(){return new Promise(function(y){return f=y})},focusReset:"manual",scroll:"manual"})}function i(){f!==null&&(f(),f=null),s||setTimeout(o,20)}function o(){if(!s&&!navigation.transition){var h=navigation.currentEntry;h&&h.url!=null&&navigation.navigate(h.url,{state:h.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var s=!1,f=null;return navigation.addEventListener("navigate",n),navigation.addEventListener("navigatesuccess",i),navigation.addEventListener("navigateerror",i),setTimeout(o,100),function(){s=!0,navigation.removeEventListener("navigate",n),navigation.removeEventListener("navigatesuccess",i),navigation.removeEventListener("navigateerror",i),f!==null&&(f(),f=null)}}}function _m(n){this._internalRoot=n}Tu.prototype.render=_m.prototype.render=function(n){var i=this._internalRoot;if(i===null)throw Error(r(409));var o=i.current,s=Ln();rx(o,s,n,i,null,null)},Tu.prototype.unmount=_m.prototype.unmount=function(){var n=this._internalRoot;if(n!==null){this._internalRoot=null;var i=n.containerInfo;rx(n.current,2,null,n,null,null),hu(),i[Xr]=null}};function Tu(n){this._internalRoot=n}Tu.prototype.unstable_scheduleHydration=function(n){if(n){var i=At();n={blockedOn:null,target:n,priority:i};for(var o=0;o<xa.length&&i!==0&&i<xa[o].priority;o++);xa.splice(o,0,n),o===0&&dx(n)}};var px=t.version;if(px!=="19.2.6")throw Error(r(527,px,"19.2.6"));V.findDOMNode=function(n){var i=n._reactInternals;if(i===void 0)throw typeof n.render=="function"?Error(r(188)):(n=Object.keys(n).join(","),Error(r(268,n)));return n=g(i),n=n!==null?b(n):null,n=n===null?null:n.stateNode,n};var lM={bundleType:0,version:"19.2.6",rendererPackageName:"react-dom",currentDispatcherRef:M,reconcilerVersion:"19.2.6"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Du=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Du.isDisabled&&Du.supportsFiber)try{Vt=Du.inject(lM),ut=Du}catch{}}return bs.createRoot=function(n,i){if(!l(n))throw Error(r(299));var o=!1,s="",f=kv,h=Sv,y=Ev;return i!=null&&(i.unstable_strictMode===!0&&(o=!0),i.identifierPrefix!==void 0&&(s=i.identifierPrefix),i.onUncaughtError!==void 0&&(f=i.onUncaughtError),i.onCaughtError!==void 0&&(h=i.onCaughtError),i.onRecoverableError!==void 0&&(y=i.onRecoverableError)),i=ix(n,1,!1,null,null,o,s,null,f,h,y,mx),n[Xr]=i.current,om(n),new _m(i)},bs.hydrateRoot=function(n,i,o){if(!l(n))throw Error(r(299));var s=!1,f="",h=kv,y=Sv,S=Ev,U=null;return o!=null&&(o.unstable_strictMode===!0&&(s=!0),o.identifierPrefix!==void 0&&(f=o.identifierPrefix),o.onUncaughtError!==void 0&&(h=o.onUncaughtError),o.onCaughtError!==void 0&&(y=o.onCaughtError),o.onRecoverableError!==void 0&&(S=o.onRecoverableError),o.formState!==void 0&&(U=o.formState)),i=ix(n,1,!0,i,o??null,s,f,U,h,y,S,mx),i.context=ax(null),o=i.current,s=Ln(),s=Se(s),f=ra(s),f.callback=null,oa(o,f,s),o=s,i.current.lanes=o,ni(i,o),mi(i),n[Xr]=i.current,om(n),new Tu(i)},bs.version="19.2.6",bs}var jx;function yM(){if(jx)return Nm.exports;jx=1;function e(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}return e(),Nm.exports=gM(),Nm.exports}var bM=yM();function vM(e){if(!e)return null;const t=e.split("~"),a=t[0];if(!a)return null;if(t.length===1)return{kind:"section",instanceId:a};const r=t[1];if(!r)return null;const l=t[2],c=l!==void 0?Number(l):NaN;return{kind:"slot",instanceId:a,slotId:r,...Number.isInteger(c)?{itemIndex:c}:{}}}function xM(e){if(!e)return null;if(e.kind==="section")return e.instanceId;const t=`${e.instanceId}~${e.slotId}`;return e.itemIndex!==void 0?`${t}~${e.itemIndex}`:t}function wM(e,t){const a=new URL(t).pathname,r=a.endsWith("/")?a:`${a}/`;return`${e}/`===r?"":e.startsWith(r)?e.slice(r.length):null}function kM(e,t){const[a,r,l,c,...u]=e.split("/").filter(Boolean);if(a!=="fixtures"||!r||l!=="canvas"||u.length>0)return null;const m=new URLSearchParams(t);return{fixture:decodeURIComponent(r),canvasId:c?decodeURIComponent(c):null,format:m.get("format"),selection:vM(m.get("sel"))}}function SM(e){var a;const t=e.fixtures[0];return t===void 0?null:{fixture:t.id,canvasId:((a=e.template.canvases[0])==null?void 0:a.id)??null,format:null,selection:null}}function Ox(e){const t=e.canvasId===null?"canvas":`canvas/${encodeURIComponent(e.canvasId)}`,a=`fixtures/${encodeURIComponent(e.fixture)}/${t}`,r=new URLSearchParams;e.format!==null&&r.set("format",e.format);const l=xM(e.selection);l&&r.set("sel",l);const c=r.toString();return c?`${a}?${c}`:a}function S2(e,t){var a;return((a=e.parentElement)==null?void 0:a.closest(`[${t.slotId}],[${t.slotField}]`))??null}function Ki(e,t){return!e.hasAttribute(t.slotUnselectable)}function E2(e,t,a,r){const l=[];for(const c of Array.from(e.querySelectorAll(t)))S2(c,r)===a&&l.push(c);return l}function dg(e,t,a){return E2(e,`[${a.slotItem}="${String(t)}"]`,e,a)}function Ax(e,t,a,r){var c;let l=e.closest(`[${t}]`);for(;l&&a.contains(l);){if(Ki(l,r)&&S2(l,r)===a)return l;l=((c=l.parentElement)==null?void 0:c.closest(`[${t}]`))??null}return null}const Tm=1,EM=12;function _M(e,t){return{"--we-r-top":`${e.top}px`,"--we-r-left":`${e.left}px`,"--we-r-w":`${e.width}px`,"--we-r-h":`${e.height}px`,"--we-r-off":`${t}px`}}function jM(e){const t=Rd(e);return t.width<=0||t.height<=0?!1:!OM(e,t)}function Nx(e){return e==="hidden"||e==="scroll"||e==="auto"||e==="clip"}function OM(e,t){const a=e.ownerDocument.defaultView;if(!a)return!1;let r=-1/0,l=-1/0,c=1/0,u=1/0;for(let g=e.parentElement;g;g=g.parentElement){const b=a.getComputedStyle(g),v=Nx(b.overflowX||b.overflow),k=Nx(b.overflowY||b.overflow);if(!v&&!k)continue;const w=g.getBoundingClientRect();v&&(l=Math.max(l,w.left),c=Math.min(c,w.right)),k&&(r=Math.max(r,w.top),u=Math.min(u,w.bottom))}const m=t.left+t.width<=l||t.left>=c,p=t.top+t.height<=r||t.top>=u;return m||p}function Rd(e){const t=e.getBoundingClientRect();if(t.width>0&&t.height>0)return t;let a=1/0,r=1/0,l=-1/0,c=-1/0,u=!1;for(const m of Array.from(e.children)){const p=Rd(m);p.width<=0||p.height<=0||(u=!0,a=Math.min(a,p.top),r=Math.min(r,p.left),l=Math.max(l,p.right),c=Math.max(c,p.bottom))}return u?new DOMRect(r,a,l-r,c-a):t}function _2(e,t,a,r){if(!e)return;if(!t){Qu(e);return}const l=_M(Rd(t),a);for(const[c,u]of Object.entries(l))e.style.setProperty(c,u);r&&e.setAttribute("data-kind",r),e.setAttribute("data-active","true")}function Qu(e){e&&(e.removeAttribute("data-active"),e.removeAttribute("data-kind"))}function Mx(e,t,a,r){if(!e)return[];const l=e.ownerDocument,c=Array.from(e.querySelectorAll(".we-chrome-ring--selection")),u=e.querySelector(":scope > .we-chrome-label");for(;c.length<t.length;){const m=l.createElement("div");m.className="we-chrome-ring we-chrome-ring--selection",e.insertBefore(m,u),c.push(m)}c.forEach((m,p)=>_2(m,t[p]??null,a,r));for(const m of c.slice(Math.max(t.length,1)))m.remove();return c.slice(0,t.length)}function AM(e,t,a){if(!e)return;if(!t||!a){rp(e);return}const r=Rd(t),l=e.getAttribute("data-active")==="true",c=e.textContent!==a;e.textContent=a,e.style.setProperty("--we-l-top",`${r.top}px`),e.style.setProperty("--we-l-left",`${r.left}px`),e.style.setProperty("--we-l-indent",`${EM}px`),l&&c&&(e.removeAttribute("data-active"),e.offsetWidth),e.setAttribute("data-active","true")}function rp(e){e&&(e.removeAttribute("data-active"),e.textContent="")}function Ir(e){return typeof CSS<"u"&&CSS.escape?CSS.escape(e):e.replace(/[^a-zA-Z0-9_-]/g,t=>`\\${t}`)}function fg(e){const t=e.filter(a=>jM(a));return t.length>0?t:e.slice(0,1)}function j2(e,t,a){const r=Array.from(e.querySelectorAll(`[${a.slotId}="${Ir(t)}"]`)).filter(l=>Ki(l,a));return fg(r)}function NM(e,t,a){if(!t||t.kind!=="slot"||t.item_index==null)return[];const r=[];for(const l of e)r.push(...dg(l,t.item_index,a).filter(c=>Ki(c,a)));return fg(r)}function O2(e,t,a){if(!t)return[];const r=e.querySelector(`[${a.sectionInstanceId}="${Ir(t.instance_id)}"]`);if(!r)return[];if(t.kind==="section")return[r];const l=j2(r,t.slot_id,a);if(l.length===0)return[];if(t.item_index!=null||t.field_name){const c=t.field_name?`[${a.slotField}="${Ir(t.field_name)}"]`:null,u=[];for(const m of l){let p=[m];if(!(t.item_index!=null&&(p=dg(m,t.item_index,a).filter(g=>Ki(g,a)),p.length===0)))for(const g of p)if(c){const b=E2(g,c,m,a).filter(v=>Ki(v,a));if(b.length>0){u.push(...b);continue}g!==m&&u.push(g)}else u.push(g)}if(u.length>0)return fg(u)}return l.map(c=>{const u=c.closest(`[${a.slotGroup}]`);return u&&Ki(u,a)?u:c})}function MM(e,t,a){return O2(e,t,a)[0]??null}const Cx="we-enh-shield",CM="we-enh-shield--item",zo="data-we-live";function RM(e,t,a){if(!t||t.kind!=="slot"||t.item_index==null)return[];const r=[];for(const l of A2(e,t,a))r.push(...dg(l,t.item_index,a).filter(c=>Ki(c,a)));return r}function A2(e,t,a){if(!t||t.kind!=="slot")return[];const r=e.querySelector(`[${a.sectionInstanceId}="${Ir(t.instance_id)}"]`);return r?Array.from(r.querySelectorAll(`[${a.slotId}="${Ir(t.slot_id)}"]`)):[]}function TM(e,t,a){if(e.querySelectorAll(`[${zo}]`).forEach(l=>l.removeAttribute(zo)),!t)return;const r=e.querySelector(`[${a.sectionInstanceId}="${Ir(t.instance_id)}"]`);if(r)if(t.kind==="section")r.setAttribute(zo,"true");else{const l=RM(e,t,a),c=l.length>0?l:A2(e,t,a).filter(u=>Ki(u,a));for(const u of c)u.setAttribute(zo,"true")}}const zr=1440,Rx=Math.round(zr*9/16),N2=14,hg="we-frame-defaults";function DM(e){return`
|
|
50
|
+
/* Section wrapper -- structure only. No selection chrome here;
|
|
51
|
+
rings are painted by the host's overlay. Zero margin
|
|
52
|
+
+ padding means sections butt edge-to-edge, matching publisher. */
|
|
53
|
+
[${e}] {
|
|
54
|
+
position: relative;
|
|
55
|
+
margin: 0;
|
|
56
|
+
padding: 0;
|
|
57
|
+
cursor: pointer;
|
|
58
|
+
display: grid;
|
|
59
|
+
grid-template-rows: 1fr;
|
|
60
|
+
/* Reveal transition — governs the hidden→visible direction because
|
|
61
|
+
CSS uses the destination state's transition property. Spring easing
|
|
62
|
+
gives a snappy entrance. */
|
|
63
|
+
transition:
|
|
64
|
+
grid-template-rows 200ms cubic-bezier(0.16, 1, 0.3, 1),
|
|
65
|
+
opacity 180ms cubic-bezier(0.16, 1, 0.3, 1);
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
/* Hidden state -- collapse the section out of the page so it reflows shut.
|
|
69
|
+
The 0-height wrapper stays in flow as the anchor for the section's
|
|
70
|
+
floating edge tab (built by the host in its own document). */
|
|
71
|
+
[${e}][data-hidden="true"] {
|
|
72
|
+
grid-template-rows: 0fr;
|
|
73
|
+
opacity: 0;
|
|
74
|
+
pointer-events: none;
|
|
75
|
+
/* Collapse transition — governs the visible→hidden direction.
|
|
76
|
+
Faster + accelerating so the hide feels decisive. */
|
|
77
|
+
transition:
|
|
78
|
+
grid-template-rows 150ms cubic-bezier(0.4, 0, 1, 1),
|
|
79
|
+
opacity 120ms cubic-bezier(0.4, 0, 1, 1);
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
/* Per-section body holds the API HTML.
|
|
83
|
+
1. position:relative gives the body a positioning context for any
|
|
84
|
+
body-scoped chrome or future body-only effects.
|
|
85
|
+
2. isolation:isolate SEALS the section's z-index hierarchy
|
|
86
|
+
inside this stacking context. Without it, any positioned
|
|
87
|
+
descendant with z-index > 0 (the header's sticky+z-50, a
|
|
88
|
+
dropdown's z-40, a sticky CTA) creates a stacking context
|
|
89
|
+
that escapes upward. Sections never need to know the
|
|
90
|
+
editor chrome exists -- internal z-index is unconstrained. */
|
|
91
|
+
/* overflow:hidden clips section content as the grid row collapses;
|
|
92
|
+
min-height:0 lets the grid child shrink below its content size.
|
|
93
|
+
Constraint: overflow:hidden is permanent (not just during animation), so
|
|
94
|
+
section content must not overflow its section-body boundary — sticky
|
|
95
|
+
elements, absolutely-positioned dropdowns, or shadows that bleed outside
|
|
96
|
+
the section edge will be silently clipped. Template sections are
|
|
97
|
+
self-contained blocks; this is safe in practice. */
|
|
98
|
+
.we-section-body { position: relative; isolation: isolate; overflow: hidden; min-height: 0; }`}function LM(e){return`
|
|
99
|
+
[${e}] {
|
|
100
|
+
display: contents;
|
|
101
|
+
/* Computed even while boxless, so the collapse below has a 1fr start
|
|
102
|
+
value to animate from the instant the hidden box appears. */
|
|
103
|
+
grid-template-rows: 1fr;
|
|
104
|
+
cursor: pointer;
|
|
105
|
+
}
|
|
106
|
+
[${e}] > .we-section-body { display: contents; }
|
|
107
|
+
|
|
108
|
+
/* Hidden state -- the wrapper takes a real box again: a zero-height grid
|
|
109
|
+
item in the frame column, collapsing the section out of the page while
|
|
110
|
+
staying in flow as the anchor for its edge tab. display is not
|
|
111
|
+
transitioned, so the box appears at 1fr immediately and the collapse
|
|
112
|
+
animates its full run; the reveal returns to display:contents at once —
|
|
113
|
+
a boxless wrapper has nothing to animate, so re-entry is instant by
|
|
114
|
+
design. */
|
|
115
|
+
[${e}][data-hidden="true"] {
|
|
116
|
+
display: grid;
|
|
117
|
+
grid-template-rows: 0fr;
|
|
118
|
+
opacity: 0;
|
|
119
|
+
pointer-events: none;
|
|
120
|
+
transition:
|
|
121
|
+
grid-template-rows 150ms cubic-bezier(0.4, 0, 1, 1),
|
|
122
|
+
opacity 120ms cubic-bezier(0.4, 0, 1, 1);
|
|
123
|
+
}
|
|
124
|
+
[${e}][data-hidden="true"] > .we-section-body {
|
|
125
|
+
display: block;
|
|
126
|
+
overflow: hidden;
|
|
127
|
+
min-height: 0;
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
/* The frame stylesheet imposes flex-shrink:0 on the column's items from
|
|
131
|
+
outside the section; with the wrapper boxless the section IS that item,
|
|
132
|
+
so the same imposition lands here. Layered so an author utility on the
|
|
133
|
+
section root still wins, exactly as it does against the stylesheet's own
|
|
134
|
+
copy of this rule. */
|
|
135
|
+
@layer ${hg} {
|
|
136
|
+
[${e}] > .we-section-body > * { flex-shrink: 0; }
|
|
137
|
+
}`}function zM(e,t){const a=t?`#we-page {
|
|
138
|
+
padding: 0;
|
|
139
|
+
}`:`#we-page {
|
|
140
|
+
width: ${zr}px;
|
|
141
|
+
min-height: ${Rx}px;
|
|
142
|
+
overflow: hidden;
|
|
143
|
+
border-radius: ${N2}px;
|
|
144
|
+
background: #f5f3ee;
|
|
145
|
+
padding: 0;
|
|
146
|
+
}
|
|
147
|
+
/* The window this card stands for. The card's WIDTH is a real viewport, so
|
|
148
|
+
vw units and width queries need nothing from us; its HEIGHT is the page's
|
|
149
|
+
own measurement, which makes 100svh circular here — a section sized from it
|
|
150
|
+
asks for a window its own height is what produced, and climbs on every
|
|
151
|
+
pass. The window-height token is the seam that ends it: a section writes
|
|
152
|
+
the token instead of the unit, and here it is the screen this card is cut
|
|
153
|
+
from (the floor above), a constant that settles in one pass. Declared
|
|
154
|
+
UNLAYERED, unlike the document defaults: this is not a fallback a template
|
|
155
|
+
may better, it is what the window IS on this surface, and Concrete's own
|
|
156
|
+
declaration of the token is unlayered too. A page box takes none of this —
|
|
157
|
+
a frame document is given the window its format declares, so 100svh there
|
|
158
|
+
is already the truth. */
|
|
159
|
+
:root {
|
|
160
|
+
--concrete-window-h: ${Rx}px;
|
|
161
|
+
}`;return`
|
|
162
|
+
html, body {
|
|
163
|
+
margin: 0;
|
|
164
|
+
/* The host owns the scroll container; this document never scrolls —
|
|
165
|
+
not even programmatically (overflow: clip pins scrollTop to 0), so a
|
|
166
|
+
transient gap while the host syncs the iframe's height to the page
|
|
167
|
+
can never flash a scrollbar or shift a measured rect. */
|
|
168
|
+
overflow: clip;
|
|
169
|
+
}
|
|
170
|
+
/* Document defaults, NOT document truth: the theme's own body mapping is
|
|
171
|
+
what the published page renders with, so it must win here too — fonts and
|
|
172
|
+
wraps in the frame diverge from capture otherwise. The layer (pre-declared
|
|
173
|
+
by the srcdoc, see FRAME_DEFAULTS_LAYER) is what makes these lose to any
|
|
174
|
+
template declaration. */
|
|
175
|
+
@layer ${hg} {
|
|
176
|
+
html, body {
|
|
177
|
+
background: transparent;
|
|
178
|
+
}
|
|
179
|
+
body {
|
|
180
|
+
color: #14180F;
|
|
181
|
+
font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
|
|
182
|
+
}
|
|
183
|
+
}
|
|
184
|
+
${a}
|
|
185
|
+
${t?LM(e.sectionInstanceId):DM(e.sectionInstanceId)}
|
|
186
|
+
|
|
187
|
+
/* Slot wrapper -- structure only. No outline here; the host's overlay
|
|
188
|
+
ring handles slot hover + selection too. */
|
|
189
|
+
[${e.slotId}] {
|
|
190
|
+
cursor: pointer;
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
/* Slot-group container -- the gaps between grouped members (dividers,
|
|
194
|
+
padding) carry no slot id, so give the group container itself
|
|
195
|
+
the pointer cursor: the whole group reads as one clickable unit, and
|
|
196
|
+
the overlay ring outlines this container. */
|
|
197
|
+
[${e.slotGroup}],
|
|
198
|
+
[${e.slotItem}] {
|
|
199
|
+
cursor: pointer;
|
|
200
|
+
}
|
|
201
|
+
|
|
202
|
+
/* Deliberately NO position default on the marker elements: published pages
|
|
203
|
+
and captured artifacts set no position on them, so an unpositioned slot
|
|
204
|
+
must compute static here too — a relative default (even layered, losing
|
|
205
|
+
to author utilities) re-anchored an author's absolutely positioned
|
|
206
|
+
descendant to the slot on this surface while the published page anchored
|
|
207
|
+
it farther up, and could shift stacking the same way. Nothing in the
|
|
208
|
+
chrome needs it: rings measure client rects from the host overlay, and
|
|
209
|
+
everything that mounts absolute chrome inside the frame (island shields,
|
|
210
|
+
the crop spinner) checks the surface's computed position and forces an
|
|
211
|
+
inline relative itself. */
|
|
212
|
+
|
|
213
|
+
@media (prefers-reduced-motion: reduce) {
|
|
214
|
+
[${e.sectionInstanceId}] {
|
|
215
|
+
transition: none !important;
|
|
216
|
+
}
|
|
217
|
+
}
|
|
218
|
+
|
|
219
|
+
/* Render-error placeholder ------------------------------------- */
|
|
220
|
+
.we-render-error {
|
|
221
|
+
margin: 8px 0;
|
|
222
|
+
padding: 24px 16px;
|
|
223
|
+
border-radius: 6px;
|
|
224
|
+
border: 1px dashed #ebebe6;
|
|
225
|
+
background: #ffffff;
|
|
226
|
+
color: #8a877e;
|
|
227
|
+
font-size: 12.5px;
|
|
228
|
+
}
|
|
229
|
+
.we-render-error__title {
|
|
230
|
+
margin: 0;
|
|
231
|
+
color: #4a4842;
|
|
232
|
+
font-weight: 500;
|
|
233
|
+
}
|
|
234
|
+
.we-render-error__detail {
|
|
235
|
+
margin: 4px 0 0 0;
|
|
236
|
+
color: #b9b6ab;
|
|
237
|
+
font-size: 11.5px;
|
|
238
|
+
}
|
|
239
|
+
|
|
240
|
+
/* Island interaction shield: a transparent click layer derived from a live
|
|
241
|
+
island's own markup (island-shields.ts) — a base shield per island root box,
|
|
242
|
+
an item shield per rendered list-item copy. Present until the shield's
|
|
243
|
+
owner carries the live-owner stamp; a click on a shield falls through to the
|
|
244
|
+
editor's resolver, which selects the nearest marked ancestor. Base z-index 1
|
|
245
|
+
sits on the island content's plane but below floating content that must stay
|
|
246
|
+
clickable at z-index 2 (e.g. the neighborhood card over the map canvas). Item
|
|
247
|
+
shields ride one plane above the base, so a click over an item copy hits the
|
|
248
|
+
ITEM's shield and one click selects that item. */
|
|
249
|
+
.${Cx} {
|
|
250
|
+
position: absolute;
|
|
251
|
+
inset: 0;
|
|
252
|
+
z-index: 1;
|
|
253
|
+
cursor: pointer;
|
|
254
|
+
background: transparent;
|
|
255
|
+
}
|
|
256
|
+
.${CM} { z-index: 2; }
|
|
257
|
+
[${zo}] .${Cx} { display: none; }
|
|
258
|
+
|
|
259
|
+
/* Image slider: until the slider's \`images\` slot is the live selection, its
|
|
260
|
+
z-index:2 nav arrows would paint above the z-index:1 shield and stay
|
|
261
|
+
clickable, escaping the select-first gate. Disable them so the shield
|
|
262
|
+
catches the first click; restored once .tr-slider carries data-we-live.
|
|
263
|
+
Editor-only — deliberately not in published tokens.css. */
|
|
264
|
+
.tr-slider:not([${zo}]) .tr-slider__nav { pointer-events: none; }
|
|
265
|
+
`}function $M(e,t){const r=e/zr,l=Number.POSITIVE_INFINITY;return Math.max(.05,Math.min(.9,.72*r,.1926*r+.54,l))}const UM=420,Tx=.92;function IM(e,t,a){if(!a)return e;const r=Math.max(e,UM/a.width),l=Math.min(.9,e*zr/a.width,Tx*t.availableWidthPx/a.width,Tx*t.availableHeightPx/a.height);return Math.max(.05,Math.min(r,l))}const id="/section-assets/",M2="[A-Za-z0-9._-]+\\.[A-Za-z0-9]+",HM=new RegExp(`^${M2}$`),BM=new RegExp(`${id.replace(/\//g,"\\/")}(${M2})`,"g");function qM(e){switch(e.kind){case"canonical":return id;case"publishedDocument":return"/assets/";case"publishedStylesheet":return"";case"canvas":return`${e.basePath}runtime/section-asset/`}}function FM(e,t){const a=e.startsWith(id)?e.slice(id.length):"";if(!HM.test(a))throw new Error(`not a canonical section-asset ref: ${e}`);return`${qM(t)}${a}`}function PM(e,t){return e.replace(BM,a=>FM(a,t))}function Dx(e,t,a){var l;let r=e.closest(`[${t}]`);for(;r&&!Ki(r,a);)r=((l=r.parentElement)==null?void 0:l.closest(`[${t}]`))??null;return r}function VM(e,t,a){for(const r of Array.from(e.querySelectorAll(`[${a.markers.slotId}]`))){if(r.closest(`[${a.markers.slotGroup}]`)!==e)continue;const l=r.getAttribute(a.markers.slotId);if(l&&a.isSlotEditable(t,l))return l}return null}function GM(e,t,a){if(!e)return null;const r=e.closest(`[${a.markers.sectionInstanceId}]`),l=r==null?void 0:r.getAttribute(a.markers.sectionInstanceId);if(!r||!l)return null;const c=t.find(_=>_.instance_id===l),u={selection:{kind:"section",instance_id:l},element:r};if(!c)return u;const m=Dx(e,a.markers.slotGroup,a.markers);if(m&&r.contains(m)){const _=VM(m,l,a);return _?{selection:{kind:"slot",instance_id:l,slot_id:_},element:m}:u}const p=Dx(e,a.markers.slotId,a.markers),g=p==null?void 0:p.getAttribute(a.markers.slotId);if(!p||!g||!a.isSlotEditable(l,g))return u;const b=Ax(e,a.markers.slotItem,p,a.markers),v=b?Number(b.getAttribute(a.markers.slotItem)):NaN,k=Number.isInteger(v)?v:void 0,w=Ax(e,a.markers.slotField,p,a.markers),j=(w==null?void 0:w.getAttribute(a.markers.slotField))??null,E=j&&a.isSlotEditable(l,g,j)?j:null;return{selection:{kind:"slot",instance_id:l,slot_id:g,...k!==void 0?{item_index:k}:{},...E?{field_name:E}:{}},element:(E?w:null)??b??p}}function op(e){return e.section_display_name?e.section_display_name:e.section_key.split("-").map(t=>t&&t[0].toUpperCase()+t.slice(1)).join(" ")}function KM(e){if(!e)return"null";let t=2166136261;for(let a=0;a<e.length;a++)t^=e.charCodeAt(a),t=Math.imul(t,16777619);return(t>>>0).toString(16)}function C2(e,t){var c;const a=t.createElement("div");a.className="we-render-error";const r=t.createElement("p");r.className="we-render-error__title",r.textContent="Couldn’t render this section.";const l=t.createElement("p");return l.className="we-render-error__detail",l.textContent=((c=e.render_error)==null?void 0:c.message)??"Unknown render error.",a.appendChild(r),a.appendChild(l),a}function YM(e,t,a,r){const l=t.createElement("div");l.setAttribute(a.sectionInstanceId,e.instance_id),l.setAttribute("data-section-label",op(e)),l.dataset.svId=e.section_version_id,l.dataset.htmlHash=KM(e.html);const c=t.createElement("div");return c.className="we-section-body",e.render_error||e.html===null?c.appendChild(C2(e,t)):c.innerHTML=r(e.html),l.appendChild(c),l}const QM=`(function () {
|
|
266
|
+
function CaptureIntersectionObserver(callback, options) {
|
|
267
|
+
var opts = options || {};
|
|
268
|
+
this.root = opts.root || null;
|
|
269
|
+
this.rootMargin = opts.rootMargin || "0px";
|
|
270
|
+
var threshold = opts.threshold;
|
|
271
|
+
this.thresholds = Object.freeze(
|
|
272
|
+
Array.isArray(threshold) ? threshold.slice() : [typeof threshold === "number" ? threshold : 0],
|
|
273
|
+
);
|
|
274
|
+
this._callback = callback;
|
|
275
|
+
this._queued = [];
|
|
276
|
+
this._scheduled = false;
|
|
277
|
+
}
|
|
278
|
+
CaptureIntersectionObserver.prototype._flush = function () {
|
|
279
|
+
this._scheduled = false;
|
|
280
|
+
var entries = this._queued;
|
|
281
|
+
this._queued = [];
|
|
282
|
+
if (entries.length === 0) return;
|
|
283
|
+
this._callback(entries, this);
|
|
284
|
+
};
|
|
285
|
+
CaptureIntersectionObserver.prototype.observe = function (target) {
|
|
286
|
+
var rect = target.getBoundingClientRect();
|
|
287
|
+
this._queued.push({
|
|
288
|
+
target: target,
|
|
289
|
+
isIntersecting: true,
|
|
290
|
+
intersectionRatio: 1,
|
|
291
|
+
boundingClientRect: rect,
|
|
292
|
+
intersectionRect: rect,
|
|
293
|
+
rootBounds: new DOMRectReadOnly(0, 0, window.innerWidth, window.innerHeight),
|
|
294
|
+
time: performance.now(),
|
|
295
|
+
});
|
|
296
|
+
if (this._scheduled) return;
|
|
297
|
+
this._scheduled = true;
|
|
298
|
+
var observer = this;
|
|
299
|
+
Promise.resolve().then(function () {
|
|
300
|
+
observer._flush();
|
|
301
|
+
});
|
|
302
|
+
};
|
|
303
|
+
CaptureIntersectionObserver.prototype.unobserve = function () {};
|
|
304
|
+
CaptureIntersectionObserver.prototype.disconnect = function () {
|
|
305
|
+
this._queued = [];
|
|
306
|
+
};
|
|
307
|
+
CaptureIntersectionObserver.prototype.takeRecords = function () {
|
|
308
|
+
var entries = this._queued;
|
|
309
|
+
this._queued = [];
|
|
310
|
+
return entries;
|
|
311
|
+
};
|
|
312
|
+
window.IntersectionObserver = CaptureIntersectionObserver;
|
|
313
|
+
})();`,ka=96,qi=72,XM=25.4,ZM=/^(\d+(?:\.\d+)?)(in|mm)$/;function Dm(e){const t=ZM.exec(e),[,a,r]=t??[];if(a===void 0||r===void 0)throw new Error(`malformed physical length: "${e}"`);const l=Number.parseFloat(a);return r==="mm"?l/XM:l}function Td(e){if(typeof e.width=="number"&&typeof e.height=="number")return{frameWidth:e.width,frameHeight:e.height,bleed:0,viewportWidth:e.width,viewportHeight:e.height,deviceScaleFactor:1,pixelWidth:e.width,pixelHeight:e.height,pointWidth:e.width/ka*qi,pointHeight:e.height/ka*qi,bleedPoints:0,panels:1,sheetWidth:e.width,sheetHeight:e.height,sheetPointWidth:e.width/ka*qi,sheetPointHeight:e.height/ka*qi};const t=e,a=Dm(t.width),r=Dm(t.height),l=t.bleed===void 0?0:Dm(t.bleed),c=a*ka,u=r*ka,m=l*ka,p=c+2*m,g=u+2*m,b=t.dpi/ka,v=t.panels??1;return{frameWidth:c,frameHeight:u,bleed:m,viewportWidth:p,viewportHeight:g,deviceScaleFactor:b,pixelWidth:Math.round(p*b),pixelHeight:Math.round(g*b),pointWidth:(a+2*l)*qi,pointHeight:(r+2*l)*qi,bleedPoints:l*qi,panels:v,sheetWidth:v*c+2*m,sheetHeight:g,sheetPointWidth:(v*a+2*l)*qi,sheetPointHeight:(r+2*l)*qi}}const R2="concrete-frame",T2="concrete-sheet";function WM(e){const t=Td(e);return{"--frame-w":`${t.frameWidth}px`,"--frame-h":`${t.frameHeight}px`,"--frame-bleed":`${t.bleed}px`}}function JM(e){const t=Td(e);return{"--sheet-w":`${t.panels*t.frameWidth}px`,"--sheet-h":`${t.frameHeight}px`,"--frame-bleed":`${t.bleed}px`}}function Je(e){return e.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")}function tl(e){return JSON.stringify(e).replace(/</g,"\\u003c").replace(/>/g,"\\u003e").replace(/&/g,"\\u0026")}function eC(e){return D2(e.id,{...WM(e)})}function D2(e,t){const a=Object.entries(t).map(([r,l])=>`${r}:${l}`).join(";");return{class:R2,dataFormat:e,style:a}}function Lx(e,t){const a=eC(e);return`<div class="${Je(a.class)}" data-format="${Je(a.dataFormat)}" style="${Je(a.style)}">${t.join("")}</div>`}function tC(e,t){const a=Object.entries(JM(e)).map(([r,l])=>`${r}:${l}`).join(";");return`<div class="${Je(T2)}" style="${Je(a)}">${t.join("")}</div>`}function nC(e){switch(e.destination){case"published":return iC(e);case"artifact":return aC(e);case"preview":return rC(e);case"canvas":return oC(e)}}function L2(e){return e.kind==="none"||Object.keys(e.islandMap).length===0?[]:[`<script>${QM}<\/script>`]}const z2="html, body { margin: 0; padding: 0; }";function $2(e){const t=[`rel="${e.rel}"`,`href="${Je(e.href)}"`];return e.sizes!==void 0&&t.push(`sizes="${Je(e.sizes)}"`),e.type!==void 0&&t.push(`type="${Je(e.type)}"`),`<link ${t.join(" ")} />`}function iC(e){const{meta:t}=e,a=['<meta charset="utf-8" />','<meta name="viewport" content="width=device-width, initial-scale=1" />',`<title>${Je(t.title)}</title>`,`<meta name="description" content="${Je(t.description)}" />`];t.canonical&&a.push(`<link rel="canonical" href="${Je(t.canonical)}" />`);for(const l of t.icons??[])a.push($2(l));a.push('<meta property="og:type" content="website" />'),t.siteName&&a.push(`<meta property="og:site_name" content="${Je(t.siteName)}" />`),a.push(`<meta property="og:title" content="${Je(t.title)}" />`),a.push(`<meta property="og:description" content="${Je(t.description)}" />`),t.ogUrl&&a.push(`<meta property="og:url" content="${Je(t.ogUrl)}" />`),t.ogImage&&(a.push(`<meta property="og:image" content="${Je(t.ogImage)}" />`),t.ogImageWidth&&a.push(`<meta property="og:image:width" content="${t.ogImageWidth}" />`),t.ogImageHeight&&a.push(`<meta property="og:image:height" content="${t.ogImageHeight}" />`),t.ogImageType&&a.push(`<meta property="og:image:type" content="${Je(t.ogImageType)}" />`),t.ogImageAlt&&a.push(`<meta property="og:image:alt" content="${Je(t.ogImageAlt)}" />`),a.push('<meta name="twitter:card" content="summary_large_image" />'),a.push(`<meta name="twitter:title" content="${Je(t.title)}" />`),a.push(`<meta name="twitter:description" content="${Je(t.description)}" />`),a.push(`<meta name="twitter:image" content="${Je(t.ogImage)}" />`)),a.push(...pg(e.stylesheets)),a.push(...gg(e.islands)),e.prefetchUrls&&e.prefetchUrls.length>0&&a.push(`<script type="speculationrules">${tl({prefetch:[{source:"list",urls:[...e.prefetchUrls]}]})}<\/script>`);const r=e.siteConfig?`
|
|
314
|
+
<script type="application/json" id="concrete-site-config">${tl(e.siteConfig)}<\/script>`:"";return mg({lang:t.lang??"en",head:a,body:` <body class="concrete-root">
|
|
315
|
+
${e.root.bodyHtml}${r}${yg(e.islands,"viewport")}
|
|
316
|
+
<script type="module" src="${Je(e.analyticsJs.url)}"><\/script>
|
|
317
|
+
</body>`})}function aC(e){const t=['<meta charset="utf-8" />'];e.title!==void 0&&t.push(`<title>${Je(e.title)}</title>`),t.push(...pg(e.stylesheets));const a=[z2,...uC(e.root)];return t.push(U2(a)),t.push(...L2(e.islands)),t.push(...gg(e.islands)),mg({lang:"en",head:t,body:` <body>${cC(e.root)}${yg(e.islands,"eager")}</body>`})}function rC(e){const t=['<meta charset="utf-8" />','<meta name="viewport" content="width=device-width, initial-scale=1" />',`<title>${Je(e.title)}</title>`,...e.icon===void 0?[]:[$2({rel:"icon",href:e.icon})],...pg(e.stylesheets),U2([z2,...e.extraCss??[]]),...e.capture===!0?L2(e.islands):[],...gg(e.islands)],a=(e.devScripts??[]).map(r=>`
|
|
318
|
+
${r}`).join("");return mg({lang:"en",head:t,body:` <body>
|
|
319
|
+
${e.root.bodyHtml}${yg(e.islands,e.capture===!0?"eager":"viewport")}${a}
|
|
320
|
+
</body>`})}function oC(e){const t=e.stylesheets.hrefs.map(a=>`<link rel="stylesheet" href="${Je(a)}">`).join("");return`<!doctype html>
|
|
321
|
+
<html>
|
|
322
|
+
<head>
|
|
323
|
+
<meta charset="utf-8">
|
|
324
|
+
<base href="${Je(e.base)}">
|
|
325
|
+
<!-- Cascade-layer order is fixed by FIRST declaration, document-wide. The
|
|
326
|
+
kernel's document defaults must lose to everything a template declares,
|
|
327
|
+
so their layer is pre-declared here, before any template stylesheet,
|
|
328
|
+
pinning it below every layer those go on to declare. -->
|
|
329
|
+
<style>@layer ${e.defaultsLayer};</style>
|
|
330
|
+
${t}${sC(e.islands)}
|
|
331
|
+
<style>${e.frameCss}</style>
|
|
332
|
+
</head>
|
|
333
|
+
<body>
|
|
334
|
+
<div id="${Je(e.root.id)}"${lC(e.root)}></div>
|
|
335
|
+
</body>
|
|
336
|
+
</html>`}function lC(e){if(!e.pageBox)return"";const t=D2(e.pageBox.formatId,e.pageBox.tokens);return` class="${Je(t.class)}" data-format="${Je(t.dataFormat)}" style="${Je(t.style)}"`}function sC(e){if(e.kind==="none"||Object.keys(e.islandMap).length===0)return"";const t=e.hostScriptSrc?`
|
|
337
|
+
<script id="tr-island-host" type="module" src="${Je(e.hostScriptSrc)}"><\/script>`:"";return`${Object.keys(e.importMap).length===0?"":`
|
|
338
|
+
<script type="importmap">${tl({imports:e.importMap})}<\/script>`}
|
|
339
|
+
<script>window.__TR_ISLAND_MAP=${tl(e.islandMap)};<\/script>
|
|
340
|
+
<!-- id is the contract the host's readiness gate keys off — it waits on THIS
|
|
341
|
+
element's load event, not a timeout, so a slow cold first load still
|
|
342
|
+
activates without a refresh. -->${t}`}function mg(e){const t=e.head.map(a=>` ${a}`).join(`
|
|
343
|
+
`);return`<!doctype html>
|
|
344
|
+
<html lang="${Je(e.lang)}">
|
|
345
|
+
<head>
|
|
346
|
+
${t}
|
|
347
|
+
</head>
|
|
348
|
+
${e.body}
|
|
349
|
+
</html>
|
|
350
|
+
`}function cC(e){if(e.kind==="frame")return Lx(e.format,e.sectionHtml);const t=e.pages.map(l=>Lx(e.format,l)),{panels:a}=Td(e.format);if(a===1)return t.join(`
|
|
351
|
+
`);if(t.length%a!==0)throw new Error(`page-shell: format "${e.format.id}" folds ${a} panels to a sheet, but the stack has ${t.length} pages, not a whole number of sheets`);const r=[];for(let l=0;l<t.length;l+=a)r.push(tC(e.format,t.slice(l,l+a)));return r.join(`
|
|
352
|
+
`)}function uC(e){if(e.kind!=="frameStack")return[];const t=Td(e.format).panels===1?R2:T2;return[`body > .${t} { break-after: page; }`,`body > .${t}:last-child { break-after: auto; }`]}function pg(e){return e.kind==="links"?e.hrefs.map(t=>`<link rel="stylesheet" href="${Je(t)}" />`):e.css.map(t=>`<style>${t}</style>`)}function U2(e){const[t,...a]=e;return t===void 0?"<style></style>":a.length===0?`<style>${t}</style>`:`<style>${t}
|
|
353
|
+
${a.join(`
|
|
354
|
+
`)}
|
|
355
|
+
</style>`}function gg(e){if(e.kind!=="bundles"||Object.keys(e.islandMap).length===0)return[];const t=[`<script type="importmap">${tl({imports:e.reactVendorMap})}<\/script>`];for(const a of[e.runtime.url,...Object.values(e.reactVendorMap),e.reactVendorCore.url])t.push(`<link rel="modulepreload" href="${Je(a)}" />`);return t}function yg(e,t){if(e.kind==="none"||Object.keys(e.islandMap).length===0)return"";const a=tl(e.islandMap),r=t==="eager"?' window.__TR_ISLAND_SCHEDULE = "eager";':"";return e.kind==="bundles"?`
|
|
356
|
+
<script>window.__TR_ISLAND_MAP=${a};${r}<\/script>
|
|
357
|
+
<script type="module" src="${Je(e.runtime.url)}"><\/script>`:`
|
|
358
|
+
${dC}
|
|
359
|
+
<script>window.__TR_ISLAND_MAP = ${a};${r}<\/script>
|
|
360
|
+
<script type="module" src="${Je(e.bootstrapUrl)}"><\/script>`}const dC=`<script type="module">
|
|
361
|
+
import RefreshRuntime from "/@react-refresh";
|
|
362
|
+
RefreshRuntime.injectIntoGlobalHook(window);
|
|
363
|
+
window.$RefreshReg$ = () => {};
|
|
364
|
+
window.$RefreshSig$ = () => (type) => type;
|
|
365
|
+
window.__vite_plugin_react_preamble_installed__ = true;
|
|
366
|
+
<\/script>`;function fC(e){return Object.keys(e.islandMap).length===0?{kind:"none"}:{kind:"editorHost",islandMap:e.islandMap,importMap:e.importMap,hostScriptSrc:e.hostScriptSrc}}function hC(e,t,a){return nC({destination:"canvas",root:{kind:"canvas",id:"we-page",...a?{pageBox:{formatId:a.formatId,tokens:a.tokens}}:{}},islands:fC(e),stylesheets:{kind:"links",hrefs:e.stylesheets},base:e.basePath,defaultsLayer:hg,frameCss:zM(t,a)})}function mC(e){return!!(e!=null&&e.getElementById("we-page"))}function zx(e){const t=a=>PM(a,{kind:"canvas",basePath:e.assets.basePath});return{srcdoc:()=>hC(e.assets,e.markers,e.pageBox),buildSectionWrapper:(a,r)=>YM(a,r,e.markers,t),buildErrorPlaceholder:C2,resolveTarget:(a,r)=>GM(a,r,e),localizeSectionAssets:t,resolveSelectionEl:(a,r)=>MM(a,r,e.markers),resolveSelectionEls:(a,r)=>O2(a,r,e.markers),resolveVisibleSlotEls:(a,r)=>j2(a,r,e.markers),resolveItemEls:(a,r)=>NM(a,r,e.markers),setLiveOwner:(a,r)=>TM(a,r,e.markers)}}const I2=(e,t)=>`<svg class="${e}" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true">${t}</svg>`;function pC(e){return I2(e,'<path d="M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49"/><path d="M14.084 14.158a3 3 0 0 1-4.242-4.242"/><path d="M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143"/><path d="m2 2 20 20"/>')}function gC(e){return I2(e,'<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"/><circle cx="12" cy="12" r="3"/>')}const yC=42,H2=16;function bC(e,t){const a=[];for(const l of e)for(a.push({sum:l.y,n:1,items:[l]});a.length>1;){const c=a[a.length-1],u=a[a.length-2];if(!c||!u)break;const m=c.sum/c.n-(c.n-1)/2*t,p=u.sum/u.n+(u.n-1)/2*t;if(m-p<t)a.splice(a.length-2,2,{sum:u.sum+c.sum,n:u.n+c.n,items:u.items.concat(c.items)});else break}const r={};for(const l of a){const c=l.sum/l.n-(l.n-1)/2*t;l.items.forEach((u,m)=>{r[u.idx]=c+m*t})}return r}const vC=pC("we-htab-eye-off"),xC=gC("we-htab-eye-on"),lp=new WeakMap;function wC(e,t,a,r){const l=e.createElement("button");l.type="button",l.className="we-htab",l.dataset.hiddenTab=t,l.title=`Show ${a}`,l.setAttribute("aria-label",`Show ${a}`),l.innerHTML=`<span class="we-htab-eye">${vC}${xC}</span><span class="we-htab-name"></span>`;const c=l.querySelector(".we-htab-name");return c&&(c.textContent=a),lp.set(l,r),l.addEventListener("click",u=>{var m;u.stopPropagation(),(m=lp.get(l))==null||m()}),l}function kC(e,t,a,r){const l=new Map;e.querySelectorAll(".we-htab").forEach(m=>{const p=m.dataset.hiddenTab;p&&l.set(p,m)});const c=new Set,u=[];for(const m of a){let p=l.get(m.instanceId);if(!p)p=wC(t,m.instanceId,m.label,()=>r(m.instanceId)),e.appendChild(p);else{const g=p.querySelector(".we-htab-name");g&&g.textContent!==m.label&&(g.textContent=m.label),p.title=`Show ${m.label}`,p.setAttribute("aria-label",`Show ${m.label}`),lp.set(p,()=>r(m.instanceId))}c.add(m.instanceId),u.push(p)}return l.forEach((m,p)=>{c.has(p)||m.remove()}),u}function SC(e,t,a){const r=e.map((c,u)=>{const m=t(c.dataset.hiddenTab??""),p=m?m.getBoundingClientRect().top*a:0;return{idx:u,y:p}}),l=bC(r,yC);e.forEach((c,u)=>{c.style.top=`${l[u]}px`,c.style.left=`${H2-c.offsetWidth}px`})}const EC=48,_C=30,jC=`
|
|
367
|
+
@property --we-scale {
|
|
368
|
+
syntax: "<number>";
|
|
369
|
+
inherits: true;
|
|
370
|
+
initial-value: 1;
|
|
371
|
+
}
|
|
372
|
+
|
|
373
|
+
/* The scroll container + dotted canvas surface. The host lays this element
|
|
374
|
+
out — position and size are the host's (it must both bound the height and
|
|
375
|
+
be positioned, so the frame wrapper's offset parent is the stage);
|
|
376
|
+
everything inside is kernel-defined. Declaring position here would win
|
|
377
|
+
the cascade over a host's own positioning utility classes (this sheet
|
|
378
|
+
loads after theirs), which is how the app's absolutely-positioned stage
|
|
379
|
+
once silently became in-flow and unscrollable.
|
|
380
|
+
background-attachment: local makes the grid scroll together with
|
|
381
|
+
the page card so the canvas + website read as one scene being panned, not
|
|
382
|
+
a card sliding over a fixed grid. Padding aligns the page card with the
|
|
383
|
+
floating panel: top/bottom/left 20px; the right constant (40px) covers the
|
|
384
|
+
panel's right inset (20px) plus an equal 20px gap. Fallback 436px matches
|
|
385
|
+
the panel's base CSS width.
|
|
386
|
+
The top padding also carries the label lane: a page-title row is drawn
|
|
387
|
+
ABOVE its frame's box, so the topmost frame's row would otherwise sit in
|
|
388
|
+
the 20px margin. --we-frame-label-lane is set by the stage reconciler only
|
|
389
|
+
when some frame is labeled, so a canvas whose pages declare no label keeps
|
|
390
|
+
the original 20px exactly. */
|
|
391
|
+
.we-canvas-stage {
|
|
392
|
+
overflow: auto;
|
|
393
|
+
padding: calc(20px + var(--we-frame-label-lane, 0px))
|
|
394
|
+
calc(var(--we-panel-w, 436px) + 40px) 20px 20px;
|
|
395
|
+
transition: --we-scale 150ms cubic-bezier(0.4, 0, 0.2, 1);
|
|
396
|
+
background-image: radial-gradient(rgba(20, 18, 13, 0.13) 1px, transparent 1.2px);
|
|
397
|
+
background-size: 20px 20px;
|
|
398
|
+
background-position: 10px 10px;
|
|
399
|
+
background-attachment: local;
|
|
400
|
+
scrollbar-width: none;
|
|
401
|
+
-ms-overflow-style: none;
|
|
402
|
+
}
|
|
403
|
+
.we-canvas-stage::-webkit-scrollbar { width: 0; height: 0; display: none; }
|
|
404
|
+
|
|
405
|
+
/* The scaled page card's layout box: exactly the iframe's visual footprint,
|
|
406
|
+
so the stage scrolls and centers the card correctly. Auto inline margins
|
|
407
|
+
rather than flex centering: they collapse to 0 when the card overflows the
|
|
408
|
+
stage, keeping the left edge reachable by scroll at high zoom.
|
|
409
|
+
|
|
410
|
+
isolation:isolate SEALS the canvas's own stacking hierarchy (tab layer,
|
|
411
|
+
page card, chrome overlay) into this element, so those z-indexes are
|
|
412
|
+
ordered only against each other and the whole card paints at the stage's
|
|
413
|
+
position in the HOST's DOM order. Without it the overlay competed
|
|
414
|
+
directly with the host's floating chrome -- a panel, a zoom toolbar, a
|
|
415
|
+
notice banner -- and a hover outline drew straight over the controls.
|
|
416
|
+
Same reasoning as the section wrappers' isolate in the frame document. */
|
|
417
|
+
.we-canvas-frame {
|
|
418
|
+
position: relative;
|
|
419
|
+
width: calc(var(--we-page-w, ${zr}px) * var(--we-scale, 1));
|
|
420
|
+
height: calc(var(--we-page-h, 0px) * var(--we-scale, 1));
|
|
421
|
+
margin-inline: auto;
|
|
422
|
+
isolation: isolate;
|
|
423
|
+
}
|
|
424
|
+
|
|
425
|
+
/* The multi-frame stack: one frame per row, in the canvas's page order, each
|
|
426
|
+
centered on the same axis a lone page card already used (the auto inline
|
|
427
|
+
margins above), separated by a constant host-px gap plus whatever lane the
|
|
428
|
+
label chips need. Expressed as an adjacent-sibling rule so a single-frame
|
|
429
|
+
canvas matches no selector at all and lays out byte-identically to what it
|
|
430
|
+
did before frames could stack. The gap does NOT ride --we-scale: it is
|
|
431
|
+
chrome between two artifacts, not a part of either, so it stays the same
|
|
432
|
+
distance at any zoom. */
|
|
433
|
+
.we-canvas-frame + .we-canvas-frame {
|
|
434
|
+
margin-top: calc(${EC}px + var(--we-frame-label-lane, 0px));
|
|
435
|
+
}
|
|
436
|
+
|
|
437
|
+
/* Page-title row -- "Front", "Back": which page of the canvas this frame
|
|
438
|
+
is, with the visibility toggle seated directly beside the name it acts
|
|
439
|
+
on (one group, never split across the page's corners). Drawn ABOVE the
|
|
440
|
+
frame's box (bottom: 100%, in the lane the stage padding and the
|
|
441
|
+
inter-frame gap reserve) so it never covers artwork, and sized in
|
|
442
|
+
--we-content like the edge tabs: constant visual size at any zoom,
|
|
443
|
+
because it names the page rather than belonging to it.
|
|
444
|
+
pointer-events:none at the row so the lane's empty run stays stage
|
|
445
|
+
surface (a deselect click must fall through); the toggle re-enables its
|
|
446
|
+
own. */
|
|
447
|
+
.we-frame-titlebar {
|
|
448
|
+
position: absolute;
|
|
449
|
+
bottom: 100%;
|
|
450
|
+
left: 0;
|
|
451
|
+
right: 0;
|
|
452
|
+
margin-bottom: calc(4 * var(--we-content, 1px));
|
|
453
|
+
display: flex;
|
|
454
|
+
align-items: center;
|
|
455
|
+
gap: calc(6 * var(--we-content, 1px));
|
|
456
|
+
pointer-events: none;
|
|
457
|
+
}
|
|
458
|
+
/* Quiet by design: the row annotates the artwork below it, so it reads in
|
|
459
|
+
a light gray that cedes attention to the page — the ink weights are
|
|
460
|
+
reserved for the states that earn them (hover, the engaged toggle). */
|
|
461
|
+
.we-canvas-frame-label {
|
|
462
|
+
min-width: 0;
|
|
463
|
+
overflow: hidden;
|
|
464
|
+
text-overflow: ellipsis;
|
|
465
|
+
white-space: nowrap;
|
|
466
|
+
color: #a09d94;
|
|
467
|
+
font-size: calc(13 * var(--we-content, 1px));
|
|
468
|
+
font-weight: 500;
|
|
469
|
+
letter-spacing: -0.01em;
|
|
470
|
+
line-height: 1;
|
|
471
|
+
}
|
|
472
|
+
|
|
473
|
+
/* Page-visibility toggle -- the eye beside the page title, resting in the
|
|
474
|
+
title's own gray so the row reads as one quiet group. Rendered only
|
|
475
|
+
for pages the composition marks optional (frame-visibility.ts). */
|
|
476
|
+
.we-frame-toggle {
|
|
477
|
+
flex: 0 0 auto;
|
|
478
|
+
display: grid;
|
|
479
|
+
place-items: center;
|
|
480
|
+
width: calc(24 * var(--we-content, 1px));
|
|
481
|
+
height: calc(22 * var(--we-content, 1px));
|
|
482
|
+
padding: 0;
|
|
483
|
+
border: 0;
|
|
484
|
+
border-radius: calc(6 * var(--we-content, 1px));
|
|
485
|
+
background: transparent;
|
|
486
|
+
color: #a09d94;
|
|
487
|
+
cursor: pointer;
|
|
488
|
+
pointer-events: auto;
|
|
489
|
+
transition: background-color 0.15s, color 0.15s;
|
|
490
|
+
}
|
|
491
|
+
.we-frame-toggle svg {
|
|
492
|
+
width: calc(14 * var(--we-content, 1px));
|
|
493
|
+
height: calc(14 * var(--we-content, 1px));
|
|
494
|
+
}
|
|
495
|
+
.we-frame-toggle:hover {
|
|
496
|
+
background: rgba(20, 18, 13, 0.06);
|
|
497
|
+
color: #14180F;
|
|
498
|
+
}
|
|
499
|
+
.we-frame-toggle:focus-visible {
|
|
500
|
+
outline: none;
|
|
501
|
+
background: rgba(20, 18, 13, 0.06);
|
|
502
|
+
color: #14180F;
|
|
503
|
+
box-shadow: 0 0 0 2px rgba(15, 42, 34, 0.5);
|
|
504
|
+
}
|
|
505
|
+
/* Hidden state reads as an engaged control (the section eye's hidden
|
|
506
|
+
treatment): filled box, full-ink glyph. */
|
|
507
|
+
.we-frame-toggle[data-page-visibility="hidden"] {
|
|
508
|
+
background: rgba(20, 18, 13, 0.06);
|
|
509
|
+
color: #14180F;
|
|
510
|
+
box-shadow: inset 0 0 0 1px #ebebe6;
|
|
511
|
+
}
|
|
512
|
+
/* Hidden page -- tinted to a clear deactivated state, in place and at full
|
|
513
|
+
footprint (a page never collapses the way a hidden section does), still
|
|
514
|
+
fully interactive: the tint says "excluded from the artifact", not
|
|
515
|
+
"locked". The title strikes through and lightens, the same reading as a
|
|
516
|
+
fully-hidden canvas's bar tab. The stamp is written by
|
|
517
|
+
frame-visibility.ts. */
|
|
518
|
+
.we-canvas-frame[data-page-hidden="true"] > iframe {
|
|
519
|
+
filter: grayscale(1) opacity(0.55);
|
|
520
|
+
}
|
|
521
|
+
.we-canvas-frame[data-page-hidden="true"] > .we-frame-titlebar > .we-canvas-frame-label {
|
|
522
|
+
text-decoration: line-through;
|
|
523
|
+
color: #b6b3aa;
|
|
524
|
+
}
|
|
525
|
+
|
|
526
|
+
/* The frame document: unscaled ${zr}px layout, scaled here as an
|
|
527
|
+
element. The border-radius matches #we-page inside, so the card shadow
|
|
528
|
+
follows the content's silhouette; both radius and shadow ride the
|
|
529
|
+
transform, exactly as they rode the old in-document scaling. z-index 2
|
|
530
|
+
stacks the card above the edge tabs (z-index 1) so the shadow falls over a
|
|
531
|
+
tab's tucked-under inner edge, nestling it against the page. */
|
|
532
|
+
.we-canvas-frame > iframe {
|
|
533
|
+
display: block;
|
|
534
|
+
border: 0;
|
|
535
|
+
background: transparent;
|
|
536
|
+
width: var(--we-page-w, ${zr}px);
|
|
537
|
+
height: var(--we-page-h, 0px);
|
|
538
|
+
border-radius: var(--we-page-radius, ${N2}px);
|
|
539
|
+
box-shadow:
|
|
540
|
+
0 1px 0 rgba(20,18,13,0.06),
|
|
541
|
+
0 2px 6px -2px rgba(20,18,13,0.10),
|
|
542
|
+
0 12px 28px -8px rgba(20,18,13,0.18),
|
|
543
|
+
0 32px 64px -20px rgba(20,18,13,0.28);
|
|
544
|
+
transform: scale(var(--we-scale, 1));
|
|
545
|
+
transform-origin: 0 0;
|
|
546
|
+
position: relative;
|
|
547
|
+
z-index: 2;
|
|
548
|
+
transition: filter 0.2s ease;
|
|
549
|
+
}
|
|
550
|
+
|
|
551
|
+
/* Chrome overlay -- sized to the frame wrapper, i.e. the scaled page card,
|
|
552
|
+
so x=0/y=0 is the page's top-left corner. overflow stays visible: a ring
|
|
553
|
+
at the page boundary or a label straddling the top border extends past
|
|
554
|
+
the card and must not clip. pointer-events:none so clicks pass through to
|
|
555
|
+
the iframe underneath.
|
|
556
|
+
|
|
557
|
+
Positioning contract: chrome.ts measures a target in the FRAME document
|
|
558
|
+
(layout truth — that document never scales or scrolls) and writes the
|
|
559
|
+
rect as custom properties on the ring/label; the formulas here scale it
|
|
560
|
+
into host space. Keeping the formula in the stylesheet and the data in
|
|
561
|
+
properties is what lets a transitioned --we-scale move every ring in
|
|
562
|
+
lockstep with the iframe's own animated transform. The ring's offset
|
|
563
|
+
(its inflation past the target's edge) stays OUTSIDE the multiplication:
|
|
564
|
+
constant host px at any zoom.
|
|
565
|
+
|
|
566
|
+
z-index 3 -- one step above the page card, and nothing more: the frame's
|
|
567
|
+
isolate is what keeps the chrome under the host's own UI, so a large
|
|
568
|
+
value here would buy nothing and read as an escape hatch.
|
|
569
|
+
|
|
570
|
+
A CLASS, not an id: every frame on the stage carries one of these, and the
|
|
571
|
+
chrome functions are handed the overlay rather than resolving it by
|
|
572
|
+
document-global id. */
|
|
573
|
+
.we-chrome-overlay {
|
|
574
|
+
position: absolute;
|
|
575
|
+
inset: 0;
|
|
576
|
+
pointer-events: none;
|
|
577
|
+
z-index: 3;
|
|
578
|
+
}
|
|
579
|
+
.we-chrome-ring {
|
|
580
|
+
position: absolute;
|
|
581
|
+
pointer-events: none;
|
|
582
|
+
border: 2px solid transparent;
|
|
583
|
+
border-radius: 6px;
|
|
584
|
+
opacity: 0;
|
|
585
|
+
box-sizing: border-box;
|
|
586
|
+
top: calc(var(--we-r-top, 0px) * var(--we-scale, 1) - var(--we-r-off, 0px));
|
|
587
|
+
left: calc(var(--we-r-left, 0px) * var(--we-scale, 1) - var(--we-r-off, 0px));
|
|
588
|
+
width: calc(var(--we-r-w, 0px) * var(--we-scale, 1) + 2 * var(--we-r-off, 0px));
|
|
589
|
+
height: calc(var(--we-r-h, 0px) * var(--we-scale, 1) + 2 * var(--we-r-off, 0px));
|
|
590
|
+
}
|
|
591
|
+
/* Hover ring -- instant on cursor arrival, fades out on leave.
|
|
592
|
+
Position updates instantly (no top/left transition) so dragging
|
|
593
|
+
across elements never flickers. Ink stroke + white drop-shadow
|
|
594
|
+
halo keeps the ring readable on both light sections and dark ones. */
|
|
595
|
+
.we-chrome-ring--hover {
|
|
596
|
+
border-color: rgba(15,42,34,0.85);
|
|
597
|
+
filter: drop-shadow(0 0 1px rgba(255,255,255,0.95));
|
|
598
|
+
transition: opacity 70ms ease-in;
|
|
599
|
+
}
|
|
600
|
+
.we-chrome-ring--hover[data-active="true"] {
|
|
601
|
+
opacity: 1;
|
|
602
|
+
transition: opacity 100ms cubic-bezier(0.16, 1, 0.3, 1);
|
|
603
|
+
}
|
|
604
|
+
/* Selection ring -- appears instantly (continuous with hover),
|
|
605
|
+
then morphs ink → gold. No position transition so resize
|
|
606
|
+
tracking stays tight. Same ink + white halo as hover. */
|
|
607
|
+
.we-chrome-ring--selection {
|
|
608
|
+
border-color: rgba(15,42,34,0.85);
|
|
609
|
+
filter: drop-shadow(0 0 1px rgba(255,255,255,0.95));
|
|
610
|
+
transform: scale(1);
|
|
611
|
+
box-shadow: none;
|
|
612
|
+
transition:
|
|
613
|
+
opacity 50ms ease-in,
|
|
614
|
+
border-color 160ms cubic-bezier(0.2, 0, 0, 1),
|
|
615
|
+
box-shadow 160ms cubic-bezier(0.2, 0, 0, 1);
|
|
616
|
+
}
|
|
617
|
+
.we-chrome-ring--selection[data-active="true"] {
|
|
618
|
+
opacity: 1;
|
|
619
|
+
/* Instant show on select; only border + glow animate */
|
|
620
|
+
transition:
|
|
621
|
+
opacity 0ms,
|
|
622
|
+
border-color 180ms cubic-bezier(0.2, 0, 0, 1),
|
|
623
|
+
box-shadow 180ms cubic-bezier(0.2, 0, 0, 1);
|
|
624
|
+
}
|
|
625
|
+
.we-chrome-ring--selection[data-kind="section"],
|
|
626
|
+
.we-chrome-ring--selection[data-kind="slot"] {
|
|
627
|
+
border-color: #E5B832;
|
|
628
|
+
filter: drop-shadow(0 0 1px rgba(255,255,255,0.95));
|
|
629
|
+
box-shadow: 0 0 0 1px rgba(229,184,50,0.25), 0 8px 24px -10px rgba(229,184,50,0.35);
|
|
630
|
+
}
|
|
631
|
+
|
|
632
|
+
/* Geometry guides -- the trim line and the bleed region for a rendered-class
|
|
633
|
+
page. The overlay is the page (bleed) box exactly, so insetting all four
|
|
634
|
+
sides by the declared bleed gives the trim box with no arithmetic: the
|
|
635
|
+
border draws the trim line and the shadow's spread fills the band between
|
|
636
|
+
trim and page edge. Data/formula split as for the rings — guides.ts writes
|
|
637
|
+
--we-g-bleed in frame space, the multiplication happens here, so a
|
|
638
|
+
transitioned zoom moves the guides with the card. The 1px line itself
|
|
639
|
+
stays OUTSIDE the multiplication: constant host px at any zoom, like the
|
|
640
|
+
ring's offset.
|
|
641
|
+
|
|
642
|
+
Magenta rather than the chrome's ink/gold: a guide is an instrument about
|
|
643
|
+
the artifact, never a selection, and the print convention reads instantly.
|
|
644
|
+
The inset white hairline keeps the line legible over dark artwork, the
|
|
645
|
+
role the rings' drop-shadow halo plays for them. First child of the
|
|
646
|
+
overlay, so rings and the title pill paint above it. */
|
|
647
|
+
.we-guide {
|
|
648
|
+
position: absolute;
|
|
649
|
+
box-sizing: border-box;
|
|
650
|
+
pointer-events: none;
|
|
651
|
+
opacity: 0;
|
|
652
|
+
top: calc(var(--we-g-bleed, 0px) * var(--we-scale, 1));
|
|
653
|
+
right: calc(var(--we-g-bleed, 0px) * var(--we-scale, 1));
|
|
654
|
+
bottom: calc(var(--we-g-bleed, 0px) * var(--we-scale, 1));
|
|
655
|
+
left: calc(var(--we-g-bleed, 0px) * var(--we-scale, 1));
|
|
656
|
+
border: 1px solid rgba(214,32,140,0.9);
|
|
657
|
+
box-shadow:
|
|
658
|
+
inset 0 0 0 1px rgba(255,255,255,0.55),
|
|
659
|
+
0 0 0 calc(var(--we-g-bleed, 0px) * var(--we-scale, 1)) rgba(214,32,140,0.16);
|
|
660
|
+
transition: opacity 90ms ease-in;
|
|
661
|
+
}
|
|
662
|
+
.we-guide[data-active="true"] { opacity: 1; }
|
|
663
|
+
|
|
664
|
+
/* Section title pill -- straddles the selection's top border; geometry set
|
|
665
|
+
by chrome.ts as custom properties, same contract as the rings. The left
|
|
666
|
+
indent is constant host px. Sections only; slots get the outline ring but
|
|
667
|
+
no on-canvas label. */
|
|
668
|
+
.we-chrome-label {
|
|
669
|
+
position: absolute;
|
|
670
|
+
top: calc(var(--we-l-top, 0px) * var(--we-scale, 1));
|
|
671
|
+
left: calc(var(--we-l-left, 0px) * var(--we-scale, 1) + var(--we-l-indent, 0px));
|
|
672
|
+
pointer-events: none;
|
|
673
|
+
z-index: 1;
|
|
674
|
+
background: rgba(229,184,50,0.95);
|
|
675
|
+
color: #282c32;
|
|
676
|
+
padding: 3px 8px;
|
|
677
|
+
border-radius: 4px;
|
|
678
|
+
font-size: 10.5px;
|
|
679
|
+
font-weight: 600;
|
|
680
|
+
line-height: 1;
|
|
681
|
+
white-space: nowrap;
|
|
682
|
+
opacity: 0;
|
|
683
|
+
transform: translateY(calc(-50% - 4px)) scale(0.96);
|
|
684
|
+
transition:
|
|
685
|
+
opacity 60ms ease-in,
|
|
686
|
+
transform 60ms ease-in;
|
|
687
|
+
}
|
|
688
|
+
.we-chrome-label[data-active="true"] {
|
|
689
|
+
opacity: 1;
|
|
690
|
+
transform: translateY(-50%) scale(1);
|
|
691
|
+
transition:
|
|
692
|
+
opacity 130ms cubic-bezier(0.16, 1, 0.3, 1) 50ms,
|
|
693
|
+
transform 130ms cubic-bezier(0.16, 1, 0.3, 1) 50ms;
|
|
694
|
+
}
|
|
695
|
+
|
|
696
|
+
/* Hidden-section edge tabs -------------------------------------
|
|
697
|
+
One dim chip-tab per hidden section, pinned to the page card's left edge
|
|
698
|
+
at the collapsed wrapper's reflow seam. Built + positioned by the host
|
|
699
|
+
orchestrator; de-collided via placeTabs. Constant visual size at any zoom
|
|
700
|
+
— the layer sits outside the scaled iframe. --we-content is the host's
|
|
701
|
+
interior scaling unit (its large-screen chrome scale); a host without one
|
|
702
|
+
leaves the 1px fallback in force. A class for the same reason the overlay
|
|
703
|
+
is one: one tab layer per frame, addressed through that frame's handle. */
|
|
704
|
+
.we-htabs {
|
|
705
|
+
position: absolute;
|
|
706
|
+
inset: 0;
|
|
707
|
+
pointer-events: none;
|
|
708
|
+
z-index: 1;
|
|
709
|
+
}
|
|
710
|
+
.we-htab {
|
|
711
|
+
position: absolute;
|
|
712
|
+
transform: translateY(-50%);
|
|
713
|
+
display: flex;
|
|
714
|
+
align-items: center;
|
|
715
|
+
gap: calc(9 * var(--we-content, 1px));
|
|
716
|
+
height: calc(34 * var(--we-content, 1px));
|
|
717
|
+
padding: 0 calc(${12+H2} * var(--we-content, 1px)) 0 calc(13 * var(--we-content, 1px));
|
|
718
|
+
background: #ffffff;
|
|
719
|
+
border: 1px solid #ebebe6;
|
|
720
|
+
border-radius: calc(9 * var(--we-content, 1px)) 0 0 calc(9 * var(--we-content, 1px));
|
|
721
|
+
box-shadow: 0 10px 24px -12px rgba(20,18,13,0.34);
|
|
722
|
+
color: #4a4842;
|
|
723
|
+
font: inherit;
|
|
724
|
+
cursor: pointer;
|
|
725
|
+
opacity: 1;
|
|
726
|
+
pointer-events: auto;
|
|
727
|
+
transition: transform 0.2s cubic-bezier(0.2,0.7,0.3,1),
|
|
728
|
+
border-color 0.18s, box-shadow 0.18s;
|
|
729
|
+
}
|
|
730
|
+
.we-htab-eye {
|
|
731
|
+
display: grid;
|
|
732
|
+
place-items: center;
|
|
733
|
+
flex: 0 0 auto;
|
|
734
|
+
color: #8a877e;
|
|
735
|
+
transition: color 0.18s;
|
|
736
|
+
}
|
|
737
|
+
.we-htab-eye svg { width: calc(14 * var(--we-content, 1px)); height: calc(14 * var(--we-content, 1px)); }
|
|
738
|
+
.we-htab-name {
|
|
739
|
+
font-size: calc(13 * var(--we-content, 1px));
|
|
740
|
+
font-weight: 600;
|
|
741
|
+
letter-spacing: -0.01em;
|
|
742
|
+
color: #14180F;
|
|
743
|
+
white-space: nowrap;
|
|
744
|
+
}
|
|
745
|
+
.we-htab:hover {
|
|
746
|
+
transform: translateY(-50%) scale(1.07);
|
|
747
|
+
border-color: rgba(15,42,34,0.5);
|
|
748
|
+
box-shadow: 0 13px 30px -12px rgba(15,42,34,0.45);
|
|
749
|
+
}
|
|
750
|
+
.we-htab:hover .we-htab-eye { color: #0F2A22; }
|
|
751
|
+
.we-htab:focus-visible {
|
|
752
|
+
outline: none;
|
|
753
|
+
transform: translateY(-50%) scale(1.07);
|
|
754
|
+
border-color: #0F2A22;
|
|
755
|
+
box-shadow: 0 0 0 3px #F3F6EF, 0 13px 30px -12px rgba(15,42,34,0.45);
|
|
756
|
+
}
|
|
757
|
+
/* Hover/focus swaps the eye-off glyph to the eye glyph in place — no width
|
|
758
|
+
change, no sliding label. Only one glyph is in flow at a time, so the eye
|
|
759
|
+
slot's grid keeps the shown glyph centered. */
|
|
760
|
+
.we-htab-eye-on { display: none; }
|
|
761
|
+
.we-htab:hover .we-htab-eye-off,
|
|
762
|
+
.we-htab:focus-visible .we-htab-eye-off { display: none; }
|
|
763
|
+
.we-htab:hover .we-htab-eye-on,
|
|
764
|
+
.we-htab:focus-visible .we-htab-eye-on { display: block; }
|
|
765
|
+
|
|
766
|
+
@media (prefers-reduced-motion: reduce) {
|
|
767
|
+
.we-canvas-stage,
|
|
768
|
+
.we-canvas-frame > iframe,
|
|
769
|
+
.we-chrome-ring,
|
|
770
|
+
.we-chrome-label,
|
|
771
|
+
.we-guide,
|
|
772
|
+
.we-htab,
|
|
773
|
+
.we-frame-toggle {
|
|
774
|
+
transition: none !important;
|
|
775
|
+
}
|
|
776
|
+
}
|
|
777
|
+
`,OC='<div class="we-guide"></div><div class="we-chrome-ring we-chrome-ring--hover"></div><div class="we-chrome-ring we-chrome-ring--selection"></div><div class="we-chrome-label"></div>',ad="we-canvas-frame",$x="we-frame-titlebar",Ux="we-canvas-frame-label",Ix="we-htabs",Hx="we-chrome-overlay";function Lm(e,t,a){const r=e.querySelector(t);if(r)return r;const l=a();return e.appendChild(l),l}function AC(e,t){const a=e.querySelector(`:scope > .${$x}`);if(a)return a;const r=t.createElement("div");return r.className=$x,e.insertBefore(r,e.firstChild),r}function NC(e){for(let t=e.nextElementSibling;t;t=t.nextElementSibling)if(t.classList.contains(ad))return t;return null}function MC(e,t){const a=e.ownerDocument,r=AC(e,a),l=t.label??"",c=r.querySelector(`:scope > .${Ux}`);if(l==="")c==null||c.remove();else{const b=c??r.insertBefore(a.createElement("div"),r.firstChild);b.className=Ux,b.textContent!==l&&(b.textContent=l)}const u=Lm(e,":scope > iframe",()=>a.createElement("iframe"));t.title!==void 0&&u.title!==t.title&&(u.title=t.title),t.sandbox!==void 0&&u.getAttribute("sandbox")!==t.sandbox&&u.setAttribute("sandbox",t.sandbox),u.getAttribute("srcdoc")!==t.srcdoc&&u.setAttribute("srcdoc",t.srcdoc);const m=Lm(e,`:scope > .${Ix}`,()=>{const b=a.createElement("div");return b.className=Ix,b}),p=Lm(e,`:scope > .${Hx}`,()=>{const b=a.createElement("div");return b.className=Hx,b.setAttribute("aria-hidden","true"),b});p.childElementCount===0&&(p.innerHTML=OC);const g=t.pageBox;return g?(e.style.setProperty("--we-page-w",`${g.width}px`),e.style.setProperty("--we-page-h",`${g.height}px`),e.style.setProperty("--we-page-radius","0px")):(e.style.removeProperty("--we-page-w"),e.style.removeProperty("--we-page-radius")),{iframe:u,overlay:p,tabLayer:m}}function CC(e,t,a){const{iframe:r}=a;return{key:t,wrapper:e,iframe:r,overlay:a.overlay,tabLayer:a.tabLayer,get doc(){return r.contentDocument},setPageHeight(l){e.style.setProperty("--we-page-h",`${l}px`)}}}function RC(e,t){const a=e.ownerDocument,r=new Map;for(const p of Array.from(e.querySelectorAll(`:scope > .${ad}`))){const g=p.dataset.frameKey;g!==void 0&&r.set(g,p)}const l=[],c=[],u=new Set;for(const p of t){let g=r.get(p.key);g||(g=a.createElement("div"),g.className=ad,g.dataset.frameKey=p.key);const b=MC(g,p);l.push(g),u.add(p.key),c.push(CC(g,p.key,b))}let m=null;for(let p=l.length-1;p>=0;p--){const g=l[p];g&&((g.parentNode!==e||NC(g)!==m)&&e.insertBefore(g,m),m=g)}return r.forEach((p,g)=>{u.has(g)||p.remove()}),t.some(p=>(p.label??"")!=="")?e.style.setProperty("--we-frame-label-lane",`${_C}px`):e.style.removeProperty("--we-frame-label-lane"),c}function TC(e,t,a){const r=[];for(const l of e){const c=l.doc;if(!c)continue;const u=t.resolveSelectionEls(c,a);u.length>0&&r.push({handle:l,els:u})}return r}function DC(e,t){const a=e==null?void 0:e.querySelector(":scope > .we-guide");if(a){if(t===null){a.removeAttribute("data-active");return}a.style.setProperty("--we-g-bleed",`${t}px`),a.setAttribute("data-active","true")}}const LC=24;function zC(e,t,a,r){if(e.height+2*r<=t)return e.top>=r&&e.bottom<=t-r?null:e.top<r?Math.max(0,a+e.top-r):Math.max(0,a+e.bottom-(t-r));const c=Math.max(0,a+e.top-r);return Math.abs(c-a)<1?null:c}function $C(e,t,a,r){const l=t+e.top*a-r,c=e.height*a;return{top:l,bottom:l+c,height:c}}const Bx="__trEditorBridge",UC=1,B2=new WeakMap;function IC(e){return e?e.kind==="section"?{kind:"section",instanceId:e.instance_id}:{kind:"slot",instanceId:e.instance_id,slotId:e.slot_id,...e.item_index!==void 0?{itemIndex:e.item_index}:{},...e.field_name!==void 0?{fieldName:e.field_name}:{}}:null}function HC(e){const t=e[Bx];if(t)return t;const a=new Set,r={protocol:UC,selection:null,subscribe(l){return a.add(l),()=>{a.delete(l)}}};return B2.set(r,a),e[Bx]=r,r}function BC(e,t,a){if(!e||!t)return;const l=HC(e);l.selection=IC(a);for(const c of[...B2.get(l)??[]])c()}const qC=6,Sr=12,FC=288,PC='[aria-modal="true"]',VC=".hp-sb-scroll";function Hr(e){var u,m;const t=window.innerWidth,a=window.innerHeight,r=(u=e.closest(PC))==null?void 0:u.getBoundingClientRect(),l=r||(m=e.closest(VC))==null?void 0:m.getBoundingClientRect(),c=r?{top:Math.max(0,r.top),left:Math.max(0,r.left),right:Math.min(t,r.right),bottom:Math.min(a,r.bottom)}:l?{top:Math.max(0,l.top),left:0,right:t,bottom:Math.min(a,l.bottom)}:{top:0,left:0,right:t,bottom:a};return{rect:e.getBoundingClientRect(),bounds:c,viewportHeight:a,viewportWidth:t}}function hl({rect:e,bounds:t,viewportHeight:a},{maxHeight:r=FC,minWidth:l=0,gap:c=qC,height:u}={}){if(e.bottom<t.top||e.top>t.bottom||e.right<t.left||e.left>t.right)return null;const m=t.bottom-e.bottom-c-Sr,p=e.top-t.top-c-Sr,g=u??Math.min(r,220),b=m<g&&p>m,k=Math.max(0,Math.min(r,b?p:m)),w=Math.max(t.left+Sr,Math.min(e.left,t.right-Math.max(e.width,l)-Sr)),j={left:w,width:e.width,maxWidth:Math.max(e.width,l,t.right-w-Sr),maxHeight:k};return b?{...j,bottom:a-e.top+c}:{...j,top:e.bottom+c}}function GC(e,t,a){const[r,l]=x.useState(null);return x.useEffect(()=>{if(!e)return;const c=()=>{const m=t.current;m&&l(Hr(m))},u=requestAnimationFrame(c);return window.addEventListener("scroll",c,!0),window.addEventListener("resize",c),()=>{cancelAnimationFrame(u),window.removeEventListener("scroll",c,!0),window.removeEventListener("resize",c)}},[e,t]),!e||!r?null:hl(r,a)}const q2=Symbol.for("@homepages/concrete:row:of"),F2=Symbol.for("@homepages/concrete:element:of");function bg(e){return typeof e=="object"&&e!==null&&e.kind==="sibling"&&Hn(e.of)}function KC(e,t){return e===t||Zt(e)&&Zt(t)&&e.key===t.key}function P2(e,t){const a=[...e];for(const r of t??[])a.some(l=>KC(l,r))||a.push(r);return a}function ml(e){return typeof e=="object"&&e!==null&&"section"in e&&typeof e.section=="string"&&"slot"in e&&typeof e.slot=="string"}function V2(e){return typeof e=="object"&&e!==null&&"kind"in e&&e.kind==="row"&&"field"in e&&typeof e.field=="string"}function ic(e){if(!V2(e))return;const t=e[q2];return typeof t=="object"&&t!==null?t:void 0}function Ua(e){return typeof e=="object"&&e!==null&&"kind"in e&&e.kind==="element"}function YC(e){if(!Ua(e))return;const t=e[F2];return typeof t=="object"&&t!==null?t:void 0}function Zt(e){return typeof e=="object"&&e!==null&&"kind"in e&&e.kind==="home"&&"key"in e&&typeof e.key=="string"}function QC(e){return typeof e=="object"&&e!==null&&"head"in e&&typeof e.head=="object"&&"declaration"in e&&Hn(e.declaration)}function Hn(e){return typeof e=="object"&&e!==null&&"type"in e&&typeof e.type=="string"}function zm(e,t){if(typeof e=="function")return{kind:"compute",fn:e,reads:[]};const a=t;if(e.requires===void 0)return{kind:"compute",fn:a,reads:[...e.reads]};if(!Array.isArray(e.requires)||e.requires.length===0)throw new Error("compute(): `requires` names at least one read — omit it when the value needs none.");return{kind:"compute",fn:a,reads:P2(e.reads,e.requires),requires:[...e.requires]}}function Ia(e){return typeof e=="object"&&e!==null&&"kind"in e&&e.kind==="compute"&&"fn"in e&&typeof e.fn=="function"}function vg(e){return typeof e=="object"&&e!==null&&e.kind==="compute"&&typeof e.fn=="function"}function XC(e){return vg(e.source)}const ZC={write:new Set(["brief","reads","requires","none"]),pick:new Set(["brief","reads","requires","unique"]),find:new Set(["brief","reads","requires","none"])};function xg(e,t){const a=`fill.${e}()`;if(typeof t.brief!="string"||t.brief.trim()==="")throw new Error(`${a}: \`brief\` is required — it is the whole instruction the model is given.`);const r=ZC[e],l={kind:"fill",verb:e};for(const[u,m]of Object.entries(t)){if(!r.has(u))throw new Error(`${a}: "${u}" is not an option — it takes ${[...r].map(p=>`\`${p}\``).join(", ")}, and everything the model should know goes in the brief.`);if(u==="none"&&m!==void 0&&m!==!0)throw new Error(`${a}: \`none\` is \`true\` or absent — it admits the empty answer, and the brief's last sentence says when nothing is right.`);if(u==="unique"&&m!==void 0&&typeof m!="boolean")throw new Error(`${a}: \`unique\` is a boolean — \`false\` lets a pick repeat an element.`);if(u==="requires"&&m!==void 0&&(!Array.isArray(m)||m.length===0))throw new Error(`${a}: \`requires\` names at least one read — omit it when the fill needs none.`);m!==void 0&&(l[u]=u==="reads"||u==="requires"?[...m]:m)}const c=l.requires;return c!==void 0&&(l.reads=P2(l.reads??[],c)),l}function WC(e){return xg("write",e)}function JC(e){return xg("pick",e)}function e5(e){return xg("find",e)}const ki={write:WC,pick:JC,find:e5};function Va(e,t){if(Br(e))return[e];if(!Array.isArray(e)||!e.every(l=>typeof l=="object"&&l!==null))return;if(e.length===0)throw new Error(`${t} declares \`source: []\` — a list of fills names at least one fill, and a holder nothing fills declares no \`source\`.`);const a=e.filter(l=>!Br(l)).length;if(a===0)return e;const r=a<e.length?"a derivation beside a fill":a>1?"several derivations":"a derivation in a list";throw new Error(`${t}'s \`source\` lists ${r} — \`source\` takes one derivation (a fact, a slot, a row's member, the element, a \`compute()\`) or an ordered list of fills: a holder has one write path, and a derived value has no writer beside it.`)}function Dd(e){return Br(e)||Array.isArray(e)&&e.length>0&&e.every(Br)}function Br(e){return typeof e=="object"&&e!==null&&"kind"in e&&e.kind==="fill"&&"verb"in e&&(e.verb==="write"||e.verb==="pick"||e.verb==="find")&&"brief"in e&&typeof e.brief=="string"}const wg=Symbol.for("@homepages/concrete:fill:declaration");function t5(e){return Dd(e)?{[wg]:Br(e)?[e]:[...e]}:{}}function Ga(e){if(!(typeof e!="object"||e===null))return e[wg]}const n5=["Basement","Ground","1st floor","2nd floor","3rd floor","4th floor","Penthouse"],qx=["id","slot","index","def","value","present","enclosing"],Kr=["image","video","tour","document"];function pn(e){return Kr.includes(e)}function pl(e){return e==="media"||pn(e)}const Ka={cutout:{label:"Background removed",kinds:["image"],site:"holder",options:{enclosed:{required:!1,type:"string",values:["clear","keep"]}}},autocrop:{label:"Cropped to its subject",kinds:["image"],site:"holder",options:{brief:{required:!0,type:"string"}}},probe:{label:"Probed",kinds:["image","video","document"],site:"kind",options:{}},understand:{label:"Understood",kinds:["image","video","document","tour"],site:"kind",options:{}},preview:{label:"Preview",kinds:["image","video","document"],site:"kind",options:{}},ladder:{label:"Renditions",kinds:["image","video","document"],site:"kind",options:{}},transcode:{label:"Transcoded",kinds:["video"],site:"kind",options:{}},poster:{label:"Poster",kinds:["video","document"],site:"kind",options:{}},rasterize:{label:"Pages rasterized",kinds:["document"],site:"kind",options:{}},fetch:{label:"Link fetched",kinds:["video","tour"],site:"kind",options:{}},tour_details:{label:"Tour details",kinds:["tour"],site:"kind",options:{}},crop:{label:"Cut to its crop",kinds:["image"],site:"place",options:{}}},G2=Object.keys(Ka),i5=G2.filter(e=>Ka[e].site==="holder");G2.filter(e=>Ka[e].site==="kind");function a5(e){return typeof e=="string"&&Object.hasOwn(Ka,e)}function K2(e){if(typeof e!="object"||e===null||Array.isArray(e))return null;const{kind:t,verb:a}=e;return t==="process"&&a5(a)?e:null}function kg(e){const t=Ka[e.verb],a=Object.keys(t.options),r=a.length>0?`it takes ${a.map(l=>`\`${l}\``).join(", ")}`:"it takes none";for(const[l,c]of Object.entries(e)){if(l==="kind"||l==="verb"||c===void 0)continue;if(l==="reads")return`\`${e.verb}\` takes no \`reads\` — a process is about one media value, never the property`;const u=t.options[l];if(u===void 0){const m=l==="aspect"&&e.verb==="autocrop"?"; its aspect is the holder's `crop` — the aspect it locks, free form where it locks none":"";return`\`${e.verb}\` takes no option "${l}" — ${r}${m}`}if(u.values!==void 0){if(typeof c!="string"||!u.values.includes(c))return`\`${e.verb}\`'s \`${l}\` is one of ${u.values.map(m=>`"${m}"`).join(", ")}`;continue}if(typeof c!==u.type||typeof c=="string"&&c.trim()==="")return`\`${e.verb}\`'s \`${l}\` is a non-empty ${u.type}`}for(const[l,c]of Object.entries(t.options))if(c.required&&e[l]===void 0)return`\`${e.verb}\` requires \`${l}\``;return null}function Ha(e){const{type:t,kinds:a}=e;if(t==="media"){const r=Array.isArray(a)?a.filter(l=>typeof l=="string"&&pn(l)):[];return r.length>0?r:Kr}return typeof t=="string"&&pn(t)?[t]:[]}function Y2(e){const{kinds:t,process:a}=e;if(t!==void 0){if(e.type!=="media")return"declares `kinds` — only `media()` leaves its kind open; a kind's own builder fixes it";if(!Array.isArray(t)||t.length===0||!t.every(c=>typeof c=="string"&&pn(c)))return`declares \`kinds\` ${JSON.stringify(t)} — a non-empty list of ${Kr.join(", ")}`}if(a===void 0)return null;const r=i5.map(c=>`process.${c}()`).join(", ");if(!Array.isArray(a)||a.length===0)return`declares \`process\` ${JSON.stringify(a)} — a non-empty list of processes (${r})`;const l=new Set;for(const c of a){const u=K2(c);if(u===null)return`processes ${JSON.stringify(c)}, which is no process (${r})`;const{verb:m}=u,p=Ka[m];if(p.site==="kind")return`processes "${m}", which every ${p.kinds.join(", ")} gets from birth on its kind's row — never a holder's to declare`;if(p.site==="place")return`processes "${m}", which every ${p.kinds.join(", ")} place gets wherever its value carries a crop — never a holder's to declare`;if(l.has(m))return`processes "${m}" twice — a holder declares each process once`;l.add(m);const g=kg(u);if(g!==null)return`processes "${m}" with options that do not fit: ${g}`;const b=Ha(e).filter(v=>!p.kinds.includes(v));if(b.length>0)return`processes "${m}", which applies to ${p.kinds.join(", ")} and not to ${b.join(", ")}`}return null}const r5=new Set(["application/pdf","application/vnd.openxmlformats-officedocument.wordprocessingml.document","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet","application/vnd.openxmlformats-officedocument.presentationml.presentation","application/msword","application/vnd.ms-excel","application/vnd.ms-powerpoint","text/plain","text/csv"]);function Q2(e){const t=(e.split(";")[0]??"").trim().toLowerCase();return t.startsWith("image/")?"image":t.startsWith("video/")?"video":r5.has(t)?"document":null}function X2(e){const t=ac(e);if(t===null)return null;const a=Ya[t].kind;return a==="tour"||a==="video"?a:null}const o5=["tour","video","social","listing","file","map"],Ya={matterport:{kind:"tour",label:"Matterport",pattern:/(^|\.)matterport\.com$/i,strategy:"api"},biganto:{kind:"tour",label:"Biganto",pattern:/(^|\.)biganto\.com$/i,strategy:"opengraph"},iguide:{kind:"tour",label:"iGUIDE",pattern:/(^|\.)youriguide\.com$/i,strategy:"opengraph"},kuula:{kind:"tour",label:"Kuula",pattern:/(^|\.)kuula\.co$/i,strategy:"opengraph"},momento360:{kind:"tour",label:"Momento360",pattern:/(^|\.)momento360\.com$/i,strategy:"opengraph"},cloudpano:{kind:"tour",label:"CloudPano",pattern:/(^|\.)cloudpano\.com$/i,strategy:"none"},asteroom:{kind:"tour",label:"Asteroom",pattern:/(^|\.)asteroom\.com$/i,strategy:"none"},zillow3d:{kind:"tour",label:"Zillow 3D Home",pattern:/(^|\.)zillow\.com$/i,path:/^\/view-3d-home\//i,strategy:"none"},youtube:{kind:"video",label:"YouTube",pattern:/(^|\.)(youtube\.com|youtu\.be)$/i,strategy:"oembed"},vimeo:{kind:"video",label:"Vimeo",pattern:/(^|\.)vimeo\.com$/i,strategy:"oembed"},zillow:{kind:"listing",label:"Zillow",pattern:/(^|\.)zillow\.com$/i,strategy:"none"},redfin:{kind:"listing",label:"Redfin",pattern:/(^|\.)redfin\.com$/i,strategy:"none"},dropbox:{kind:"file",label:"Dropbox",pattern:/(^|\.)dropbox\.com$/i,strategy:"none"},drive:{kind:"file",label:"Google Drive",pattern:/^drive\.google\.com$/i,strategy:"none"},maps:{kind:"map",label:"Google Maps",pattern:/(^|\.)google\.com$/i,path:/^\/maps(\/|$)/i,strategy:"none"}};function ac(e){let t;try{t=new URL(e)}catch{return null}if(t.protocol!=="http:"&&t.protocol!=="https:")return null;for(const[a,r]of Object.entries(Ya))if(r.pattern.test(t.hostname)&&!(r.path&&!r.path.test(t.pathname)))return a;return null}function l5(e,t){const a=ac(t);return a===null?!1:a===e?!0:o5.includes(e)&&Ya[a].kind===e}const s5=new Set(Kr.filter(e=>Object.values(Ya).some(t=>t.kind===e)));function Sg(e){return e.filter(t=>s5.has(t))}function Z2(e){if(typeof e!="string"||!/^\d{4}-\d{2}-\d{2}$/.test(e))return!1;const t=new Date(`${e}T00:00:00Z`);return!Number.isNaN(t.getTime())&&t.toISOString().slice(0,10)===e}function c5(e){return typeof e=="string"&&/^[^\s@]+@[^\s@.]+(\.[^\s@.]+)+$/.test(e)}function u5(e){if(typeof e!="string"||!/^\+?[\d\s().-]+$/.test(e))return!1;const t=e.replace(/\D/g,"").length;return t>=7&&t<=15}function d5(e){try{return new URL(e)}catch{return null}}function As(e){const t=e.trim();return t&&(/^https?:\/\//i.test(t)?t:`https://${t}`)}function Eg(e){const t=d5(e);if(t===null||t.protocol!=="http:"&&t.protocol!=="https:"||t.username!==""||t.password!=="")return!1;const a=t.hostname;return a.includes(".")&&!a.startsWith(".")&&!a.endsWith(".")}function f5(e){const t=e.trim();if(!t)return null;const a=ac(t);if(a==="matterport"){const r=new URL(t).searchParams.get("m");return r!==null&&/^[A-Za-z0-9]+$/.test(r)?`https://my.matterport.com/show/?m=${r}&nt=1`:null}return a!==null&&h5.has(a)?t:null}const h5=new Set(["biganto","iguide","kuula","momento360","cloudpano","asteroom","zillow3d"]);function W2(e,t){return[e,t].map(a=>(a??"").trim()).filter(a=>a!=="").join(", ")}const m5=["autocomplete","manual_pinned","resolved"],J2=["street","unit","city","state","postal"],_g=[...J2,"latitude","longitude"];function Ld(e){return _g.includes(e)}function vs(e){if(typeof e!="string")return null;const t=e.trim();return t===""?null:t}function Fx(e,t){return typeof e=="number"&&Number.isFinite(e)&&Math.abs(e)<=t?e:null}function xi(e){if(typeof e!="object"||e===null||Array.isArray(e))return null;const t=e,a=Fx(t.latitude,90),r=Fx(t.longitude,180),l=a!==null&&r!==null,c=t.source,u={street:vs(t.street),unit:vs(t.unit),city:vs(t.city),state:vs(t.state),postal:vs(t.postal),latitude:l?a:null,longitude:l?r:null,source:typeof c=="string"&&m5.includes(c)?c:null};return l||J2.some(m=>u[m]!==null)?u:null}function jg(e){var t;return((t=/^\s*(\d{5})-?\d{4}\s*$/.exec(e))==null?void 0:t[1])??e}function p5(e){const t=W2(e.street,e.unit),a=[e.state,e.postal===null?null:jg(e.postal)].filter(l=>l!==null).join(" "),r=[t,e.city??"",a].filter(l=>l!=="").join(", ");return r===""?null:r}function g5(e,t){const a=xi(e);return a===null?null:a[t]}const eS=["crop","cutout","mask_white","mask_black"],y5=["master","crop","cutout","mask_white","mask_black","poster","encode"];function rc(e){return e!==null&&!(e.x<=0&&e.y<=0&&e.width>=1&&e.height>=1)}function b5(e,t=e){return{id:t,file:e,crop:null,name:null,renditions:{crop:null,cutout:null,mask_white:null,mask_black:null}}}function v5(e){var t;return e.url!==null?e.url.replace(/^[a-z][a-z0-9+.-]*:\/\//i,""):((t=e.key)==null?void 0:t.split("/").pop())??e.id}function x5(e,t){const{id:a,renditions:r,...l}=e,c=e.kind==="image";return{...l,id:t.id,file:t.file,crop:c?t.crop:null,name:t.name!==null&&t.name!==""?t.name:v5(e),renditions:{...r,crop:c?t.renditions.crop:null,cutout:c?t.renditions.cutout:null,mask_white:c?t.renditions.mask_white:null,mask_black:c?t.renditions.mask_black:null}}}function w5(e){const{id:t,file:a,crop:r,name:l,renditions:c,...u}=e,{crop:m,cutout:p,mask_white:g,mask_black:b,...v}=c;return{file:{...u,id:a,renditions:v},value:{id:t,file:a,crop:r,name:l,renditions:{crop:m,cutout:p,mask_white:g,mask_black:b}}}}function Og(e,t){return x5(e,t)}function k5(e){return e.url===null?"upload":"link"}function Yi(e){return e!==null&&typeof e=="object"&&!Array.isArray(e)}function zd(e){if(!Yi(e))return!1;const{id:t,kind:a,renditions:r}=e;return typeof t=="string"&&typeof a=="string"&&pn(a)&&Yi(r)}function oc(e){return Yi(e)&&typeof e.id=="string"&&typeof e.file=="string"&&Yi(e.renditions)&&!("kind"in e)&&!("picked"in e)}function tS(e){return Yi(e)&&typeof e.file=="string"&&e.file!==""&&!oc(e)&&!zd(e)}function Qa(e){return Yi(e)&&typeof e.media=="string"&&e.media!==""}function Ba(e){if(Yi(e)){if(Qa(e))return e.media;if(oc(e)||zd(e))return e.id;if(tS(e))return e.picked??e.file}}function S5(e){if(Qa(e))return e.media;if(tS(e))return e.file}function sp(e,t){if(Array.isArray(e))for(const a of e)sp(a,t);else if(oc(e))t.has(e.id)||t.set(e.id,e);else if(Yi(e)&&!zd(e))for(const a of Object.values(e))sp(a,t)}function $d(e){const t=new Map;for(const[a,r]of Object.entries(e))a!=="files"&&sp(r,t);return t}function E5(e){return Object.hasOwn(e,"crop")||e.renditions!==void 0}function _5(e,t){const a=Object.hasOwn(t,"crop"),r=t.renditions??{},l=a?null:e.renditions,c=Object.fromEntries(eS.map(u=>[u,Object.hasOwn(r,u)?r[u]??null:(l==null?void 0:l[u])??null]));return{crop:a?t.crop??null:e.crop,renditions:c}}function Ag(e,t){return E5(t)?{...e,..._5({crop:e.crop,renditions:e.renditions},t)}:e}function rd(e){if(Array.isArray(e))return e.map(rd);if(!Yi(e))return e;if(zd(e)||oc(e))return{media:e.id};if(Qa(e)){const{crop:a,renditions:r,...l}=e;return l}const t={};for(const[a,r]of Object.entries(e))t[a]=rd(r);return t}const od="property.uploads";function lc(e){if(typeof e=="string"&&e!=="")return[e];if(!(!Array.isArray(e)||e.length===0||!e.every(t=>typeof t=="string"&&t!=="")))return[...e]}function ld(e){const t=Ha(e);if(t.length===0)return null;const a=lc(e.from);return a===void 0?{kinds:t}:{kinds:t,from:a}}function Ds(e){return{kinds:e.kinds,from:lc(e.from)??[od]}}function nS(e){return Ds(e).from[0]}function cp(e){return e!==null&&typeof e=="object"&&!Array.isArray(e)}function j5(e){if(Ba(e)!==void 0||!cp(e))return e;for(const t of Object.values(e))if(Ba(t)!==void 0)return t}function iS(e,t){const[a,...r]=t.split(".");if(a!=="property"||r.length===0)return null;let l=e;for(const c of r)if(l=Array.isArray(l)?l.find(u=>cp(u)&&u.id===c):cp(l)&&Object.hasOwn(l,c)?l[c]:void 0,l===void 0)return null;return Array.isArray(l)?l.flatMap(c=>{const u=j5(c),m=Ba(u);return m===void 0?[]:[{id:m,value:u}]}):null}function O5(e,t){const a=$d(e),r=new Set,l=[];for(const c of lc(t.from)??[])for(const{id:u,value:m}of iS(e,c)??[]){if(r.has(u))continue;const p=a.get(u),g=p===void 0||!Object.hasOwn(e.files,p.file)?void 0:e.files[p.file];if(p===void 0||g===void 0||!t.kinds.includes(g.kind))continue;r.add(u);const b=Qa(m)?Ag(p,m):p;l.push({id:u,value:b,file:g,list:c})}return l}function A5(e,t){const a={uploads:(e[od]??t.map(r=>r.id)).map(r=>b5(r))};for(const[r,l]of Object.entries(e)){const[c,u,...m]=r.split(".");if(c!=="property"||u===void 0||m.length>0)throw new Error(`media candidates: "${r}" names no top-level property list`);r!==od&&(a[u]=l.map(p=>({media:p})))}return{...a,files:Object.fromEntries(t.map(r=>[r.id,r]))}}function N5(e,t){const a=new Map(t.map(c=>[c.id,w5(c)])),r=A5(e,[...a.values()].map(({file:c})=>c)),l=r.uploads.map(c=>{var u;return((u=a.get(c.id))==null?void 0:u.value)??c});return{...r,uploads:l}}function M5(e){if(e===null||typeof e!="object")return null;const t=e;return t.type!=="media"||t.kinds===void 0||Y2({type:"media",kinds:t.kinds})!==null||t.from!==void 0&&(!Array.isArray(t.from)||lc(t.from)===void 0)?null:ld(t)}function C5(e,t){const a=new Set(e),r=t.filter(u=>a.has(u)),l=new Set(r);let c=0;return e.map(u=>l.has(u)?r[c++]:u)}const $o=new Map;function aS(e){$o.set(e.home,e)}function rS(e){const t=$o.get(e);if(t===void 0)throw new Error(`fact registry: the ${e} registry is not declared yet — import @homepages/template-contracts/fact-registry (or ./fact-keys, ./table-members) before reading it.`);return t}const oS=new Set(["text","select","email","phone","url","date"]);function Ng(e){switch(e.type){case"number":case"image":case"address":return e.type;case"list":return R5(e.element);default:return oS.has(e.type)?"text":null}}function R5(e){return e.type==="object"?"row_list":e.type==="image"?"image_list":e.type==="number"?"number_list":oS.has(e.type)?"text_list":null}function up(e){if(e.type==="list"){const a=e.element;if(a.type!=="object")return up(a);for(const r of Object.values(a.fields)){const l=up(r);if(l!==void 0)return l}return}const t=e.from===void 0?null:ld(e);return(t==null?void 0:t.from)===void 0?void 0:t}function T5(e){if(e.type!=="list")return!1;const t=e.element.type;return pn(t)||t==="media"}function D5(e){return Object.entries(e.pages).flatMap(([t,a])=>T5(a.declaration)?[`${e.home}.${t}`]:[])}function L5(e){return vg(e.source)}const Px=new WeakMap;function lS(e){let t=Px.get(e);return t===void 0&&(t=z5(e),Px.set(e,t)),t}function z5(e){const t=new Map;for(const[a,r]of Object.entries(e.pages)){const l=r.declaration;if(l.type==="list")continue;const c=`${e.home}.${a}`;if(l.type==="address"){t.set(c,{declaration:l,value_type:"address"});for(const u of _g)t.set(`${c}.${u}`,{declaration:l,value_type:sS(u)});continue}t.set(c,{declaration:l,value_type:$5(c,l)})}return t}function $5(e,t){if(t.type==="image")return"image";if(pn(t.type)||t.type==="media")throw new Error(`fact registry: ${e} is a single ${t.type} — a top-level media fact is an image, the one media value a slot binds.`);return t.type==="number"?"number":"text"}function sS(e){return e==="latitude"||e==="longitude"?"number":"text"}function U5(e,t){if(t.type!=="list")return null;const a=t.element;return a.type==="object"?e:a.type==="row"?a.from.slice(a.from.indexOf(".")+1):null}let $m;function cS(){if($m!==void 0)return $m;rS("library");const e=new Map;for(const t of $o.values())for(const[a,r]of Object.entries(t.pages)){const l=U5(a,r.declaration);l!==null&&e.set(`${t.home}.${a}`,l)}return $o.has("property")&&$o.has("library")&&($m=e),e}function I5(){return[...new Set(cS().values())]}function on(e){return typeof e=="string"?cS().get(e)??null:null}function Mg(e){return(e==null?void 0:e.kind)==="home"?on(e.key):null}function Cg(e){for(const t of $o.values()){const a=Object.hasOwn(t.pages,e)?t.pages[e]:void 0;if((a==null?void 0:a.declaration.type)==="list"&&a.declaration.element.type==="object")return t.home}throw new Error(`fact registry: no linked registry declares a table "${e}"`)}function uS(e){return`property.${e}`}function dS(e,t){const a=e.pages[t],r=(a==null?void 0:a.declaration.type)==="list"?a.declaration.element:void 0;if((r==null?void 0:r.type)!=="object")throw new Error(`fact registry: the ${e.home} registry declares no list of objects "${t}"`);return r.fields}function fS(e){return dS(rS(Cg(e)),e)}function hS(e,t){return Object.hasOwn(e,t)?e[t]:void 0}function sc(e,t){const a=hS(fS(e),t);return a===void 0?void 0:Ng(a)}function H5(e){if(typeof e!="string")return null;const t=e.lastIndexOf(".");if(t<=0)return null;const a=on(e.slice(0,t));if(a===null)return null;const r=e.slice(t+1);return sc(a,r)==="row_list"?{table:a,member:r}:null}function B5(e){if(typeof e!="string")return null;const t=e.lastIndexOf(".");if(t<=0)return null;const a=e.slice(0,t),r=on(a);if(r===null)return null;const l=e.slice(t+1);return sc(r,l)===void 0?null:{table:r,tableKey:a,member:l}}const Rg=["type","label","from","source","locked","when"],Vx=new Set(Rg),Tg=Symbol.for("@homepages/concrete:table-of");function mS(e,t){return Object.defineProperty(e,Tg,{value:t,enumerable:!1})}function Dg(e){if(typeof e!="object"||e===null)return null;const t=e[Tg];return typeof t=="string"?t:null}function q5(e){return Object.keys(fS(e))}function Ls(e,t){return Object.freeze({kind:"row",field:t,[q2]:e})}function F5(e,t){return new Proxy(Ls(e,t),{get(a,r,l){return typeof r=="string"&&!(r in a)&&Ld(r)?Ls(e,`${t}.${r}`):Reflect.get(a,r,l)}})}const pS=Symbol.for("@homepages/concrete:row:definition");function wi(e){const t=e[pS];return typeof t=="object"&&t!==null?t:e}const P5=new Set(["then","toJSON","$$typeof","asymmetricMatch","nodeType","tagName","@@iterator"]);function V5(e,t,a=[]){const r=t===null?null:new Set(q5(t)),l=new Proxy(e,{get(c,u,m){if(u===pS)return c;if(typeof u!="string")return Reflect.get(c,u,m);if(t!==null&&r!==null){const p=[t,...a],g=p.map(v=>v===t&&!r.has(u)?void 0:sc(v,u));if(g.every(v=>v===void 0))return Reflect.get(c,u,m);const b=g.findIndex(v=>v===void 0||v!==g[0]);if(b===-1)return g[0]==="address"?F5(l,u):Ls(l,u);if(u in c||Vx.has(u))return Reflect.get(c,u,m);throw new Error(`row: "${String(c.label)}" reads the member "${u}", which its \`from\` table ${p[b]} ${g[b]===void 0?"lacks":"holds at another kind"} — every table a row names carries every member its readers read, at one kind.`)}return u in c||Vx.has(u)?Reflect.get(c,u,m):P5.has(u)?void 0:Ls(l,u)}});return l}function G5(e){const t=new Proxy(e,{get(a,r,l){return typeof r=="string"&&!(r in a)&&Ld(r)?Ls(t,r):Reflect.get(a,r,l)}});return t}function Gx(e,t){const a=e.map(t);return a.some((r,l)=>r!==e[l])?a:void 0}function Kx(e,t){const a=e.reads===void 0?void 0:Gx(e.reads,t),r=e.requires===void 0?void 0:Gx(e.requires,t);return a===void 0&&r===void 0?e:{...e,...a===void 0?{}:{reads:a},...r===void 0?{}:{requires:r}}}function nl(e,t){const a=wi(e);let r;const l=a.source;if(l!==void 0)if(Ia(l)){const u=Kx(l,t);u!==l&&(r={...a,source:u})}else{const u=t(l);u!==l&&(r={...a,source:u})}const c=Ga(a);if(c!==void 0){let u=!1;const m=c.map(p=>{const g=Kx(p,t);return g!==p&&(u=!0),g});u&&(r={...r??a,[wg]:m})}return r??a}function K5(e){return t=>{const a=ic(t);if(a===void 0)return t;const r=e.get(a);return r===void 0?t:{kind:"row",slot:r,field:t.field}}}const gS=new Set(["row","address"]);function Y5(e){const t=new Map;for(const[a,r]of Object.entries(e))typeof r=="object"&&r!==null&&gS.has(r.type)&&t.set(r,a);return t}function Q5(e,t,a){const r=[e.source];nl(e,l=>(r.push(l),l));for(const[l,c]of t)if(!(l===e||c===a))for(const u of Rg){const m=l[u];if(m!==void 0&&r.includes(m))return`${c}.${u}`}}function X5(e){const t=e.slice(e.indexOf(".")+1);return`reads \`${e}\`, which is the row's own \`${t}\`, not a member — a row's ${Rg.map(a=>`\`${a}\``).join(", ")} are its slot definition's, and its table has no member named \`${t}\`.`}function zs(e){return gS.has(e.type)?{...wi(e)}:e}function Lg(e,t){for(const a of Va(t,e)??[])if(!(a.verb!=="pick"||a.of===void 0))throw new Error(`${e}'s \`fill.pick\` states \`of\` — a pick chooses from its holder's \`from\`; remove \`of\` and name the candidates in \`from\`.`)}function Z5(e){return ml(e)?{kind:"section",section:e.section,slot:e.slot}:Hn(e)?{kind:"sibling",of:e}:Zt(e)?{kind:"home",key:e.key}:e}function si(e){return zg(e,Z5)}function W5(e,t,a){if(!(t!==!0||a===void 0)){if(Ia(a)){if(a.requires!==void 0&&a.requires.length>0)return;throw new Error(`${e} is \`required\` and sourced by a \`compute()\` naming no \`requires\` — nothing to require. Name the reads the value cannot do without: \`compute({ reads, requires: [fact.property.address] }, …)\`.`)}if(ml(a)||Hn(a)||bg(a))throw new Error(`${e} is \`required\` and mirrors another slot — a mirror requires its upstream; mark that slot \`required\` instead.`)}}function zg(e,t){const a=e.source;W5(e.label??"a slot",e.required,a);const r=a!==void 0&&Va(a,e.label??"a slot")===void 0;return{...e.locked===!0?{locked:!0}:{},...e.required===!0?{required:!0}:{},...r?{source:t(a)}:{},...t5(a),...e.label!==void 0?{label:e.label}:{},...e.placeholder!==void 0?{placeholder:e.placeholder}:{},...e.when!==void 0?{when:e.when}:{}}}function Um(e){return t=>({type:"text",size:e,...si(t),...t.cap!==void 0?{cap:t.cap}:{}})}const mn={short:Um("short"),medium:Um("medium"),long:Um("long")};function rn(e){return{type:"number",...si(e),...e.thousandsSep!==void 0?{thousandsSep:e.thousandsSep}:{},...e.decimals!==void 0?{decimals:e.decimals}:{},...e.maxDigits!==void 0?{maxDigits:e.maxDigits}:{}}}function J5(e){return{type:"select",...si(e),...e.creatable!==void 0?{creatable:e.creatable}:{}}}function e4(e){if(Zt(e.source))throw new Error(`select: "${e.label}" declares both \`from\` and a fact \`source\` — a select takes exactly one set of choices.`);return Lg(`select: "${e.label}"`,e.source),{type:"select",...si(e),values:[...e.from],...e.creatable!==void 0?{creatable:e.creatable}:{}}}function t4(e,t){if(Br(t.source)&&t.source.verb!=="pick")throw new Error(`select: a display entry is filled by \`fill.pick\` — the model picks one of its cases — never \`fill.${t.source.verb}\`.`);return Lg("select: a display entry",t.source),{cases:[...e],...t.locked===!0?{locked:!0}:{},...t.source!==void 0?{source:t.source}:{}}}function n4(e){if(Array.isArray(e))throw new Error("select: takes one options object — write the choices as `from`: `select({ from: [...], … })`.");if(e.options!==void 0)throw new Error("select: declares `options` — a select names its choices in `from`: `select({ from: [...], … })`.");return e.label===void 0&&Array.isArray(e.from)?t4(e.from,e):e.from!==void 0?e4(e):J5(e)}const sd=n4;function Lo(e){return{type:"url",...si(e),...e.accepts!==void 0?{accepts:e.accepts}:{}}}function yS(e){return{type:"date",...si(e)}}function i4(e){return{type:"email",...si(e)}}function a4(e){return{type:"phone",...si(e)}}function $g(e={}){return G5({type:"address",...si(e)})}function bS(e,t){const a=`${e}: "${t.label??e}"`;Lg(a,t.source);const r=Y2({type:e,kinds:t.kinds,process:t.process});if(r!==null)throw new Error(`${a} ${r}.`);const l=Va(t.source,a),c=t.source!==void 0&&l===void 0&&!Ia(t.source);if(c&&t.from!==void 0)throw new Error(`${a} picks \`from\` a media list and declares a \`source\` — a slot bound to a fact holds what that fact holds.`);if((c||Ia(t.source))&&t.process!==void 0)throw new Error(`${a} declares \`process\` beside a \`source\` that derives its value — a derived slot holds what it derives from, processed where that is declared.`);if((l==null?void 0:l.some(p=>p.verb==="pick"))===!0&&t.from===void 0)throw new Error(`${a} is picked by a \`fill.pick\` and names no \`from\` — a pick chooses from its holder's \`from\` (\`from: fact.property.property_media\`); a media declaration without one owns its media.`);const u=r4(a,e,t.kinds,t.from),m=u==null?void 0:u.map(p=>Zt(p)?p.key:p);return{...m!==void 0?{from:m.length===1?m[0]:m}:{},...t.process!==void 0?{process:t.process.map(p=>({...p}))}:{}}}function r4(e,t,a,r){if(r===void 0)return;const l=Array.isArray(r)?r:[r];if(l.length===0)throw new Error(`${e} declares \`from: []\` — name the media list it picks from, or omit \`from\` and the declaration owns its media.`);const c=Ha({type:t,kinds:a}),u=new Set;for(const m of l){const p=typeof m=="object"&&m!==null&&!Zt(m),g=Zt(m)?m.key:p&&"declaration"in m?m.declaration:m;if(u.has(g))throw new Error(`${e} picks \`from\` one media list twice — each list is named once; a media value two lists hold is one candidate, attributed to the first.`);if(u.add(g),!p)continue;const b=Ha(g.element);if(b.length>0&&!c.some(v=>b.includes(v)))throw new Error(`${e} picks \`from\` a list of ${b.join(", ")}, whose items can never be ${c.join(" or ")} — each list it picks from holds items of its kinds.`)}return l}function za(e={}){return{type:"image",...si(e),...e.crop!==void 0?{crop:e.crop}:{},...bS("image",e)}}function Ug(e={}){return{type:"media",...si(e),...e.kinds!==void 0?{kinds:[...e.kinds]}:{},...bS("media",e)}}const Ig=Symbol.for("@homepages/concrete:object:declared-fields");function gl(e){return e[Ig]}function vS(e,t){const a=gl(t);return a!==void 0&&Object.defineProperty(e,Ig,{value:a,enumerable:!1}),e}const xS="a label is a source, as a text slot takes one",dp="`label: text.short({ cap: 60, source: fill.write({ reads, brief }) })`",o4=new Set(["type","size","cap","locked"]);function l4(e,t,a){if(typeof t=="string")throw new Error(`${e} declares the label ${JSON.stringify(t)} — ${xS}: write \`label: compute(() => ${JSON.stringify(t)})\`.`);if(Hn(t)){const r=Object.entries(a).find(([,l])=>l===t);if(r===void 0)return s4(e,t);if(t.type!=="text"&&t.type!=="address")throw new Error(`${e} label names its field "${r[0]}", a "${t.type}" — a label names a text or an address field.`);return{field:r[0]}}if(Dd(t)){const r=Br(t)?`\`fill.${t.verb}\``:"list of fills";throw new Error(`${e} label is a bare ${r} — the label is the fill's holder, so it states the kind the fill writes: ${dp}.`)}return mn.short({locked:!0,source:t})}function s4(e,t){const a=Ga(t);if(a===void 0||a.some(u=>u.verb!=="write")||t.type!=="text")throw new Error(`${e} declares a slot as its label that is none of its fields — ${xS}: write what that slot read as the label (\`label: comp.address.street\`, \`label: compute(() => "Listing agent")\`), a written label as ${dp}; a title the user edits is a field, which the label names by its const.`);const r=Object.keys(t).filter(u=>!o4.has(u));if(r.length>0)throw new Error(`${e} label is a written text slot declaring ${r.map(u=>`\`${u}\``).join(", ")} — a label states only its kind and cap: ${dp}; a title the user edits is a field, which the label names by its const.`);const{size:l,cap:c}=t;return mn[l]({locked:!0,source:a.length===1?a[0]:a,...c!==void 0?{cap:c}:{}})}function c4(e){const{type:t,element:a}=e;if(t==="object")return"an object — an object never holds another; flatten its fields into this one";if(t==="list"&&(a==null?void 0:a.type)==="object")return u4(e);if(t==="list"&&(a==null?void 0:a.type)==="row")return"a list of rows — declare the selection at the top level instead"}const Ns="declare the list at the top level instead";function u4(e){const t=Ga(e);if(t!==void 0&&t.some(l=>l.verb!=="pick")||t===void 0&&Dd(e.source))return`a list of objects declaring a fill other than a pick — no fill but a pick writes a list inside an object; ${Ns}`;const a=e.source;if(Zt(a))return`a list of objects sourced by the fact "${a.key}" — its items carry their own minted ids, so it lists a row's member, a \`compute()\` or authored items; ${Ns}`;if(ml(a)||bg(a)||Hn(a))return`a list of objects sourced by another list slot — its items carry their own minted ids, so it lists a row's member, a \`compute()\` or authored items; ${Ns}`;const r=e.element.fields;for(const[l,c]of Object.entries(r)){const u=d4(c,r);if(u!==void 0)return`a list of objects whose item field "${l}" is ${u}`}}function d4(e,t){var c,u;if(e.type==="list"&&((c=e.element)==null?void 0:c.type)==="object")return"a list of objects — a list of objects nests one level; flatten the inner list's fields into this item or declare it beside the outer list";if(Ga(e)!==void 0)return`filled — no fill writes into a list inside an object; ${Ns}`;const a=e.source;if(a===void 0)return;if(Ia(a))return`a \`compute()\` — an item of a list inside an object reads its element, or a row \`from\` its member; ${Ns}`;const{kind:r,slot:l}=a;if(r==="element"&&e.type==="row"&&on(e.from)!==null)return"a table's row holding the element — the element of a list inside an object is a member's item: hold it in a row `from` that member (`row({ label, from: unit.floor_plans, source: entry })`)";if(r!=="element"&&!(e.type!=="row"&&r==="row"&&typeof l=="string"&&((u=t[l])==null?void 0:u.type)==="row"))return"bound to something outside its item — an item of a list inside an object reads its element, a row `from` its member, or a row beside it"}function cc(e){const t="object";if(e.source!==void 0)throw new Error(`${t} declares \`source\`, but an object is a pure container with no value of its own — declare it on the field that holds the value.`);if(Object.hasOwn(e.fields,"label")&&e.fields.label!==e.label)throw new Error(`${t} declares a field keyed "label" — the key is reserved for the object's label: write its source as \`label\`, beside \`fields\`.`);const a=qx.find(b=>Object.hasOwn(e.fields,b));if(a!==void 0)throw new Error(`${t} field "${a}" is named like its binding's own \`${a}\` — a field is read straight off its object's binding, which owns ${qx.map(b=>`\`${b}\``).join(", ")}. Rename the field.`);const r=e.label===void 0?void 0:l4(t,e.label,e.fields),l=r!==void 0&&!("type"in r)?r:void 0,c={...r===void 0||l!==void 0?{}:{label:r},...e.fields};if(Object.keys(c).length===0)throw new Error(`${t} declares no fields — an object groups at least one.`);for(const[b,v]of Object.entries(c)){const k=c4(v);if(k!==void 0)throw new Error(`${t} field "${b}" is ${k}.`);if(b!=="label"&&v.label===void 0)throw new Error(`${t} field "${b}" declares no \`label\` — every field of an object states the name the editor shows it by.`)}const u=Y5(c);for(const[b,v]of Object.entries(c)){const k=Q5(v,u);if(k!==void 0)throw new Error(`${t} field "${b}" ${X5(k)}`)}const m=K5(u),p={};for(const[b,v]of Object.entries(c))p[b]=zs(nl(v,m));const g={type:"object",...e.locked===!0?{locked:!0}:{},...l!==void 0?{label:l}:{},fields:p,...e.when!==void 0?{when:e.when}:{}};return Object.defineProperty(g,Ig,{value:c,enumerable:!1}),g}function f4(e){if(e.type==="object")return null;const t=e.source;if(t===null||typeof t!="object")return null;const{kind:a,section:r,slot:l}=t;return a==="section"&&typeof r=="string"&&typeof l=="string"?{kind:"section",section:r,slot:l}:null}const uc=e=>e!==null&&typeof e=="object"&&!Array.isArray(e);function Hg(e,t){if(Object.hasOwn(e,t))return e[t];const a=t.indexOf(".");if(a<=0)return;const r=e[t.slice(0,a)];if((r==null?void 0:r.type)!=="object"||!uc(r.fields))return;const l=t.slice(a+1);return Object.hasOwn(r.fields,l)?r.fields[l]:void 0}function wS(e,t,a){if(t.siblings!==void 0&&Object.hasOwn(t.siblings,a))return{path:t.container===void 0?a:`${t.container}.${a}`,def:t.siblings[a],sibling:!0};if(t.nested===!0)return;const r=Hg(e,a);return r===void 0?void 0:{path:a,def:r,sibling:!1}}function h4(e){return e==="row"||e==="address"}function m4(e,t,a){const r=wS(e,t,a);if(!(r===void 0||!h4(r.def.type)))return{...r,kind:r.def.type}}function p4(e){return on(e.from)}function $s(e){if(!Array.isArray(e.from)){const t=p4(e);return t===null?[]:[t]}return e.from.flatMap(t=>on(t)??[])}function g4(e,t){const a=new Set,r=[];for(const l of t){const c=e[l];for(const u of c){const m=cd(u.id);m===null||a.has(m)||(a.add(m),r.push({id:m,table:l}))}}return r}function y4(e,t,a){if(t.length>1&&a!==null){const r=g4(e,t).find(l=>l.id===a);if(r!==void 0)return r.table}return t[0]??null}function kS(e){if(e===void 0)return;if(Yx(e.source))return e;if(e.type!=="object"||!uc(e.fields))return;const t=Object.values(e.fields).filter(a=>Yx(a.source));return t.length===1?t[0]:void 0}function SS(e){const t=kS(e);return(t==null?void 0:t.type)==="row"?$s(t):[]}function Yx(e){return uc(e)&&e.kind==="element"}function b4(e,t){return ES(e,e.section,e.slots,t,new Set)}function Qx(e,t,a,r,l){const c=`${t??""}\0${r}`;if(l.has(c))return[];l.add(c);const u=Hg(a,r);return(u==null?void 0:u.type)==="row"?$s(u):(u==null?void 0:u.type)==="list"?ES(e,t,a,u,l):[]}function ES(e,t,a,r,l){var v;const c=uc(r.source)?r.source:void 0;if(c===void 0||c.kind==="authored"||c.kind==="derived")return SS(r.element);const u=Mg(c);if(u!==null)return[u];const{kind:m,section:p,slot:g}=c;if(m!=="section"||typeof p!="string"||typeof g!="string")return[];if(p===t)return Qx(e,t,a,g,l);const b=(v=e.sectionSlots)==null?void 0:v.call(e,p);return b===void 0?[]:Qx(e,p,b,g,l)}const cd=e=>typeof e=="string"&&e!==""?e:null;function v4(e,t=null){if(typeof e=="string")return t===null?null:cd(e);const a=x4(e);return a===null?null:cd(e[a])}function x4(e){return uc(e)?["id","media","file"].find(t=>cd(e[t])!==null)??null:null}function w4(e,t){if(Zt(e)){if(on(e.key)===null)throw new Error(`list: "${t}" is sourced by the fact "${e.key}", which is no table — a list's source is a table, a list slot, a list-valued member, a \`compute()\` or a fill; a list of the property's media is picked (\`fill.pick\`) from its item's \`from\`, or computed over a media list (\`compute({ reads: [fact.property.property_media] }, …)\`).`);return{kind:"home",key:e.key}}if(ml(e))return{kind:"section",section:e.section,slot:e.slot};if(Hn(e))return{kind:"sibling",of:e};if(ic(e)!==void 0||Ia(e))return e;throw new Error(`list: "${t}" declares a source that is no list.`)}function _S(e){return Zt(e)?on(e.key):Hn(e)&&e.type==="list"?Dg(e):null}const k4=new Set(["label","locked","placeholder","when","source"]);function S4(e){const t={};for(const[a,r]of Object.entries(e))k4.has(a)||(t[a]=r);return t}function E4(e,t){if(Zt(e)&&on(e.key)!==null)return{type:"row",from:e.key,source:{kind:"element"}};for(const r of Va(e,`list: "${t}"`)??[]){if(r.verb==="write")throw new Error(jS(t,"declares no `item`"));if(r.verb==="pick")throw new Error(fp(t,"declares no `item`"))}if(Dd(e))return{type:"poi"};if(Hn(e)&&e.type==="list")return _4(e,t);const a=ic(e);if(a!==void 0){const r=Dg(a);if(r!==null&&sc(r,e.field)==="image_list")return{type:"image"}}throw new Error(`list: "${t}" declares no \`item\`, and its source does not say what its elements are — declare \`item\`: a plain slot (\`item: image()\`), or a function of the element (\`item: (el) => object({ … })\`).`)}function jS(e,t){return`list: "${e}" is written by a \`fill.write\` and ${t} — the item is the kind every written element is: a value slot (\`item: text.short({ cap: 80 })\`), an object exactly one field of which holds the element (\`question: text.medium({ label: "Question", cap: 48, source: el })\`), or an object declared plainly whose members the write answers (\`item: object({ label: text.short({ label: "Unit" }), fields: { … } })\`).`}function OS(e){if(typeof e!="object"||e===null||e.type!=="object")return!1;const t=e.fields??{};return!Object.values(t).some(a=>Ua(a.source))}function Xx(e,t){if(e.type!=="object")return;const a=Object.entries(e.fields).filter(([,r])=>{var l;return r.type!=="row"&&((l=r.source)==null?void 0:l.kind)==="element"});if(a.length!==1)throw new Error(jS(t,a.length===0?"its object item holds the element in no field":`its object item holds the element in ${String(a.length)} fields (${a.map(([r])=>`"${r}"`).join(", ")}) — one field holds it`))}function _4(e,t){const a=e.element;if(a===void 0||a.type==="object")throw new Error(`list: "${t}" lists the items of a list of objects — declare \`item\` to say what each item holds.`);return a.type==="row"?{type:"row",from:a.from,source:{kind:"element"}}:S4(a)}function fp(e,t){return`list: "${e}" is picked by a \`fill.pick\` and ${t} — the item holds the pick in the field holding its candidates: a candidate holder itself (\`item: image({ from: fact.property.property_media })\`, \`item: row({ label: "Agent", from: fact.property.contacts })\`), or an object exactly one field of which holds candidates and no source, which its siblings read by its const (\`const photo = image({ label: "Photo", from: fact.property.property_media }); object({ fields: { photo, caption: text.short({ label: "Caption", source: fill.write({ reads: [photo], brief }) }) } })\`).`}function hp(e){const t=wi(e);return t.type==="row"?typeof t.from=="string":t.type==="select"?Array.isArray(t.values):typeof t.type=="string"&&(pn(t.type)||t.type==="media")&&t.from!==void 0}function mp(e){return wi(e).source===void 0&&Ga(e)===void 0}function AS(e,t){if(e.type!=="object")return hp(e)&&mp(e)?null:void 0;const a=gl(e)??e.fields??{},r=Object.entries(a).filter(([,u])=>typeof u=="object"&&u!==null&&hp(u)&&mp(u)),l=r.filter(([,u])=>wi(u).type!=="select"),c=l.length>0?l:r;if(c.length>1)throw new Error(`list: "${t}"'s item declares ${String(c.length)} fields with \`from\` and no source (${c.map(([u])=>`"${u}"`).join(", ")}) — a picked list's item holds its pick in exactly one; give the others a source of their own.`);return c.length===1?c[0][0]:void 0}function Zx(e){return{...zs(e),source:{kind:"element"}}}function Im(e,t){if(t===void 0)return null;const a=t===null?e:(gl(e)??e.fields)[t],r=wi(a);return r.type==="row"?on(r.from):null}function j4(e,t){if(t===null)return Zx(e);const a=e,r=(gl(e)??a.fields)[t],l=u=>u===r||typeof u=="object"&&u!==null&&wi(u)===wi(r)?{kind:"element"}:u,c={};for(const[u,m]of Object.entries(a.fields))c[u]=u===t?Zx(m):nl(m,l);return vS({...a,fields:c},a)}function O4(e,t,a){const r=c=>{if(!Ua(c))return c;if(YC(c)!==t)throw new Error(`list: "${a}"'s item reads the element of another list — an element is read only inside its own list's item.`);return{kind:"element"}};if(e.type==="object"){const c=e,u={};let m=!1;for(const[p,g]of Object.entries(c.fields))u[p]=zs(nl(g,r)),u[p]!==g&&(m=!0);return m?vS({...c,fields:u},c):c}return zs(nl(e,r))}function NS(e,t){const a=e.type==="object"?Object.entries(e.fields):[["",e]];for(const[r,l]of a){const c=l.source;if((c==null?void 0:c.kind)==="home")throw new Error(`list: "${t}"'s item${r===""?"":` field "${r}"`} is bound to the fact "${String(c.key)}", which is the same value in every item — read the element or a row's member instead; a property fact belongs in a fill's or a \`compute()\`'s \`reads\`.`)}}function A4(e,t){if(e.item===void 0)return E4(e.source,t);const a=new Set((Va(e.source,`list: "${t}"`)??[]).map(p=>p.verb));if(a.has("pick")){const p=N4(e.item,t);return a.has("write")&&Xx(p,t),p}const r={},l=Object.freeze({kind:"element",[F2]:r,[Tg]:_S(e.source)}),c=typeof e.item=="function"?e.item(l):e.item;if(typeof c!="object"||c===null||typeof c.type!="string")throw new Error(`list: "${t}"'s item is no slot — return a value slot, a row or an object.`);if(c.type==="list")throw new Error(`list: "${t}"'s item is a list — a list's item is a value slot, a row or an object; a list never holds lists.`);if(c.type!=="object"&&Ga(c)!==void 0)throw new Error(`list: "${t}"'s item declares a fill — one decision produces the whole list, so the fill belongs on the list's \`source:\`; a field of an object item may carry its own.`);NS(c,t);const u=O4(c,r,t);if(a.has("write")&&!OS(e.item)&&Xx(u,t),u.type==="object"||u.type==="row")return u;const m={...u};return delete m.locked,m}function N4(e,t){if(typeof e=="function")throw new Error(fp(t,"declares its item as a function"));if(typeof e!="object"||e===null||typeof e.type!="string")throw new Error(`list: "${t}"'s item is no slot — return a value slot, a row or an object.`);const a=AS(e,t);if(a===void 0)throw new Error(fp(t,"its item declares no field with `from` and no source"));NS(e,t);const r=j4(e,a);if(r.type==="object"||r.type==="row")return r;const l={...r};return delete l.locked,l}function M4(e,t){const a=e.source;if(!(a===void 0||(Va(a,"list")??[]).some(c=>c.verb==="pick"))||typeof e.item!="object"||e.item===null)return _S(a);const l=e.item;if(a===void 0){if(l.type!=="object")return Im(l,hp(l)?null:void 0);const c=Object.entries(gl(l)??{}).filter(([,u])=>wi(u).type==="row"&&mp(u));return c.length===1?Im(l,c[0][0]):null}return Im(l,AS(l,t))}function ei(e){const t=e.label??"list",a=e.source,r=Va(a,`list: "${t}"`),l=OS(e.item),c=(r==null?void 0:r.every(g=>g.verb==="pick"||g.verb==="write"&&l))===!0;if(r!==void 0&&e.max===void 0&&!c)throw new Error(`list: "${t}" is filled but declares no \`max\` — a fill is an open supply, so the list bounds it.`);for(const g of r??[])if(g.verb==="pick"&&g.of!==void 0)throw new Error(`list: "${t}"'s \`fill.pick\` states \`of\` — a list's pick chooses from its item's \`from\`; remove \`of\`.`);const u={type:"list",...zg(e,g=>w4(g,t)),element:A4(e,t),...e.min!==void 0?{min:e.min}:{},...e.max!==void 0?{max:e.max}:{}},m=Ia(a)?SS(u.element):void 0,p=m===void 0?M4(e,t):m.length===1?m[0]:null;return mS(u,p)}function Ud(e,t){if(t!==void 0&&(typeof t!="object"||t===null||Array.isArray(t)))throw new Error(`process.${e}(): takes an options object, or nothing.`);const a={kind:"process",verb:e};for(const[l,c]of Object.entries(t??{}))c!==void 0&&(a[l]=c);const r=kg(a);if(r!==null)throw new Error(`process.${e}(): ${r}.`);return a}function C4(e){return Ud("cutout",e)}function R4(e){return Ud("autocrop",e)}function Qi(e,t){return Ud(e,t)}function T4(e){return Qi("probe",e)}function D4(e){return Qi("understand",e)}function L4(e){return Qi("preview",e)}function z4(e){return Qi("ladder",e)}function $4(e){return Qi("transcode",e)}function U4(e){return Qi("poster",e)}function I4(e){return Qi("rasterize",e)}function H4(e){return Qi("fetch",e)}function B4(e){return Qi("tour_details",e)}function q4(e){return Ud("crop",e)}const F4={cutout:C4,autocrop:R4},_t={...F4,probe:T4,understand:D4,preview:L4,ladder:z4,transcode:$4,poster:U4,rasterize:I4,fetch:H4,tour_details:B4,crop:q4};function P4(e,t="a list"){return`${e} is sourced by ${t} — a row's slot source names a row, which it mirrors. A list's first row is a \`compute()\` over the list: \`source: compute({ reads: [list] }, (rows) => rows[0] ?? null)\`.`}function V4(e,t){if(Zt(e))throw new Error(`row: "${t}" is sourced by the fact "${e.key}" — a table is a row's \`from\`, never its source: \`row({ label, from: fact.${e.key} })\` holds its first row, which the user may re-pick.`);if(ml(e))return{kind:"section",section:e.section,slot:e.slot};if(Hn(e))return{kind:"sibling",of:e};if(Ua(e)||Ia(e))return Object.freeze({...e});throw new Error(`row: "${t}" declares a source that is no element, slot, compute or pick.`)}function G4(e,t){if(Array.isArray(e))return K4(e,t);const a=Zt(e)?on(e.key):null;if(a!==null)return{key:e.key,tables:[a]};const r=ic(e);if(r!==void 0){const l=`${String(wi(r).from)}.${e.field}`;if(H5(l)!==null)return{key:l,tables:[]}}throw new Error(e===void 0?`row: "${t}" declares no \`from\` — a row names its fact data: a table (\`row({ label, from: fact.property.contacts })\`) or a row's list-valued member (\`from: unit.floor_plans\`).`:`row: "${t}"'s \`from\` is ${Zt(e)?`the fact "${e.key}", which is not a table`:"no table or list-valued member"} — a row's \`from\` is a fact table (\`fact.property.contacts\`) or a table row's list-valued member (\`unit.floor_plans\`).`)}function K4(e,t){if(e.length===0)throw new Error(`row: "${t}" declares \`from: []\` — a row names the table it is a row of.`);const a=[],r=[];for(const l of e){const c=Zt(l)?on(l.key):null;if(c===null)throw new Error(`row: "${t}"'s \`from\` lists ${Zt(l)?`the fact "${l.key}", which is not a table`:"something that is no table"} — a row's list of \`from\` names tables (\`[fact.property.contacts, …]\`); a list-valued member is a row's only \`from\`.`);if(r.includes(c))throw new Error(`row: "${t}" names the ${c} table twice in \`from\` — each table is named once.`);a.push(l.key),r.push(c)}return{key:a.length===1?a[0]:a,tables:r}}function Y4(e,t,a){const r=Dg(Hn(e)||Ua(e)?e:void 0);if(!(r===null||t.includes(r)))throw new Error(`row: "${a}" is \`from\` the ${t.join(", ")} table${t.length===1?"":"s"} but its source holds a row of ${r} — a row's source yields a row of its own \`from\`.`)}function Q4(e){const{key:t,tables:a}=G4(e.from,e.label),r=a[0]??null;if(r===null&&!Ua(e.source))throw new Error(`row: "${e.label}" is \`from\` the list-valued member "${t}" but its source is no element — a row from a member holds an item of it, the element of the list over that member: \`source: entry\`.`);if(Hn(e.source)&&e.source.type==="list")throw new Error(P4(`row: "${e.label}"`));const l=Va(e.source,`row: "${e.label}"`);for(const m of l??[]){if(m.verb!=="pick")throw new Error(`row: "${e.label}" is filled by \`fill.${m.verb}\` — a row holds a row that exists, which only a \`fill.pick({ brief })\` out of its \`from\` yields.`);if(m.of!==void 0)throw new Error(`row: "${e.label}"'s \`fill.pick\` states \`of\` — a row's pick chooses from its \`from\`; remove \`of\`.`)}l===void 0&&e.source!==void 0&&r!==null&&Y4(e.source,a,e.label);const c=zg(e,m=>V4(m,e.label)),u=mS({type:"row",from:t,...c},r);return V5(u,r,a.slice(1))}const MS=["property","library"];function Us(e){const t=e.indexOf("."),a=t===-1?"":e.slice(0,t);if(!MS.includes(a))throw new Error(`fact registry: "${e}" names no home's list fact`);return{home:a,key:e.slice(t+1)}}function X4(e){return e.type==="row"?e:null}function Z4(e){if(e.type!=="object")return null;for(const[t,a]of Object.entries(e.fields)){const r=a.source;if(pn(a.type)&&typeof r=="object"&&r!==null&&r.kind==="element")return t}return null}function Bg(e){return(Array.isArray(e.from)?e.from:[e.from]).filter(a=>typeof a=="string")}function ud(e){const t=CS(e);return t===null?null:t.label??null}function CS(e){const t=Us(e),a=t.home==="library"?yl.pages:Za.pages,[r,...l]=t.key.split(".");let c=r!==void 0&&Object.hasOwn(a,r)?a[r].declaration:void 0;for(const u of l)if((c==null?void 0:c.type)==="list")c=c.element;else if((c==null?void 0:c.type)==="object")c=Object.hasOwn(c.fields,u)?c.fields[u]:void 0;else return null;return(c==null?void 0:c.type)==="list"?c:null}function qr(e){const t=[];let a=e;for(;a!==void 0&&!t.includes(a);){const r=CS(a);if(r===null)break;t.push(a),a=RS(r.element)}return t}function RS(e){const t=X4(e);if(t!==null)return Bg(t)[0];const a=e.type==="object"?Z4(e):null,r=e.type==="object"&&a!==null?e.fields[a]:e;if(!pn(r.type)&&r.type!=="media")return;const l=r.from,c=Array.isArray(l)?l[0]:l;return typeof c=="string"&&c!==""?c:void 0}function W4(e){const t=typeof e=="string"?[e]:[...e],a=t[0];return a===void 0?[]:[...qr(a).slice(1).filter(l=>!t.includes(l)).reverse().map(l=>[l]),t]}function J4(e){return e.head!==null}function Xi(e,t){if("label"in e)throw new Error("fact registry: a page head holds no `label` — the declaration states the fact's name");for(const a of["title","description"]){const r=e[a];if(typeof r=="string"&&r.trim()==="")throw new Error(`fact registry: a page declares an empty ${a}`)}return{head:e,declaration:t}}const e3=new Set(["home","item"]);function pp(e,t,a){var c;const r=typeof t=="object"&&t!==null?a.pages.get(t):void 0;if(r!==void 0)return{kind:"home",key:`${a.home}.${r}`};if(QC(t)){const u=a.pages.get(t);if(u===void 0)throw new Error(`${e} reads a page that is not one of this registry's — a registry reads its own facts by their page's const.`);return{kind:"home",key:`${a.home}.${u}`}}const l=bg(t)?t.of:t;if(Hn(l)){const u=(c=a.fields)==null?void 0:c.get(l);if(u===void 0)throw new Error(`${e} reads the declaration "${l.label??l.type}", which is not a field of the same item — a field reads its siblings by their consts, and a top-level fact by its page's const.`);return{kind:"item",field:u}}if(Zt(t)&&[...a.pages.values()].some(u=>t.key===`${a.home}.${u}`))return{kind:"home",key:t.key};if(Zt(t))throw new Error(`${e} is bound to the fact "${t.key}" — a registry declares the facts; it reads a sibling page by its const and binds none.`);if(ml(t))throw new Error(`${e} reads a section's slot — a registry reads no section.`);if(Ua(t)&&a.picked===!0)return{kind:"element"};if(Ua(t))throw new Error(`${e} reads the element — a registry's list nothing picks is built by the user, so its item's fields read one another by const.`);if(ic(t)!==void 0)throw new Error(`${e} reads the member "${t.field}" of a row that is not a field of the same item.`);if(V2(t)&&typeof t.slot=="string")return{kind:"row",slot:t.slot,field:t.field};if(typeof t=="object"&&t!==null&&e3.has(String(t.kind)))return t;throw new Error(`${e} declares a read a registry cannot answer.`)}function t3(e,t,a){return Array.isArray(t)?t.length===1?Hm(e,t[0],a):t.map(r=>Hm(e,r,a)):Hm(e,t,a)}function Hm(e,t,a){const r=typeof t=="object"&&t!==null?a.pages.get(t):void 0,l=typeof t=="string"?t:r===void 0?void 0:`${a.home}.${r}`;if(l===void 0||!a.mediaLists.has(l))throw new Error(`${e} picks \`from\` something other than one of this registry's media lists — a media field picks from a list of media (the \`uploads\` page, a sorted list), by its const, or owns its media.`);return l}function gp(e,t,a){const r=t.reads.map(l=>pp(e,l,a));return t.requires===void 0?{kind:"compute",fn:t.fn,reads:r}:{kind:"compute",fn:t.fn,reads:r,requires:t.requires.map(l=>pp(e,l,a))}}function n3(e,t){if(t.when!==void 0)throw new Error(`${e} declares \`when\` — a registry has no display variant; a page is drawn when a template reads it.`);if(t.required!==void 0)throw new Error(`${e} declares \`required\` — a fact requires nothing on its own account; what a property must answer is what its templates require.`);if(t.type==="poi")throw new Error(`${e} is a poi — a place the platform builds is no fact.`)}function i3(e,t,a){const r=Ga(a)??[];if(t==="library"&&r.length>0)throw new Error(`${e} declares a fill — a library's facts are the org's own, and nothing fills them.`);if(r.some(l=>l.verb==="find"))throw new Error(`${e} declares a \`find\` — a home's fact is answered, written or picked, never looked up.`)}function a3(e,t){const{type:a,fields:r}=t;if(a!=="object"||r===void 0)return;const l=Object.entries(r).filter(([,c])=>c.type==="row");if(l.length>0)throw new Error(`${e} holds a picked row in ${l.map(([c])=>`"${c}"`).join(", ")} — a list picking rows declares the row as its item (\`item: row({ from })\`), whose members are the row's.`)}function r3(e){const t=new Map,a=e.fields;for(const r of[a,gl(e)??{}])for(const[l,c]of Object.entries(r))typeof c=="object"&&c!==null&&t.set(c,l);return t}function yp(e,t,a){var l;n3(e,t),i3(e,a.home,t);let r=zs(nl(t,c=>pp(e,c,a)));switch(r.from!==void 0&&(pn(String(r.type))||r.type==="media")&&(r={...r,from:t3(e,t.from,a)}),r.type){case"object":{const c={},u={...a,fields:r3(r)};for(const[m,p]of Object.entries(r.fields))c[m]=yp(`${e}.${m}`,p,u);r={...r,fields:c};break}case"list":{const c=r.max,u={home:a.home,pages:a.pages,mediaLists:a.mediaLists},m=((l=Ga(t))==null?void 0:l.some(g=>g.verb==="pick"))===!0,p=yp(`${e}[]`,r.element,m?{...u,picked:!0}:u);a3(`${e}[]`,p),r={...r,element:p,...vg(c)?{max:gp(`${e}.max`,c,u)}:{}};break}}return r}function o3(e,t,a,r){const l=`${e}.${t}`,c=yp(l,a.declaration,r);if(c.type==="object")throw new Error(`${l} is an object — a top-level fact is a value or a list; a group of fields is a list's item.`);if(c.label===void 0)throw new Error(`${l} declares no \`label\` — a top-level fact states the name its page and its Details section show it by.`);if(a.head===null)return{head:null,declaration:c};const{title:u,description:m}=a.head;return{head:{title:typeof u=="string"?u:gp(`${l}.title`,u,r),description:typeof m=="string"?m:gp(`${l}.description`,m,r)},declaration:c}}const l3=["home","pages"];function s3(e){return"head"in e&&"declaration"in e}function c3(e){const t=e.element;return e.type==="list"&&typeof(t==null?void 0:t.type)=="string"&&(pn(t.type)||t.type==="media")}function TS(e,t){if(!MS.includes(e))throw new Error(`fact registry: "${e}" is not a home`);const a=new Map,r=new Set,l={};for(const[p,g]of Object.entries(t)){if(l3.includes(p))throw new Error(`fact registry: ${e} declares a page keyed "${p}", a registry's own key`);a.set(g,p);const b=s3(g)?g:{head:null,declaration:g};l[p]=b,c3(b.declaration)&&r.add(`${e}.${p}`)}const c={home:e,pages:a,mediaLists:r},u={};for(const[p,g]of Object.entries(l))u[p]=o3(e,p,g,c);const m={home:e,pages:u};for(const p of Object.keys(t))m[p]={kind:"home",key:`${e}.${p}`};return m}function u3(e){const t=e.declaration.label;if(typeof t!="string")throw new Error("fact registry: a page's declaration states no label");return t}const d3=[{value:"for_sale",label:"For sale",icon:"tag",description:"List price, finance details, and a sold-ready layout."},{value:"for_rent",label:"For rent",icon:"key",description:"Monthly rent, lease terms, pets, and utilities."}],f3=["sold","active"],h3=["total","monthly"];function m3(e){return e==null?"active":"sold"}function p3(e){return e==="for_rent"?"monthly":"total"}const g3=6371e3;function y3(e,t,a,r){const l=p=>p*Math.PI/180,c=l(a-e),u=l(r-t),m=Math.sin(c/2)**2+Math.cos(l(e))*Math.cos(l(a))*Math.sin(u/2)**2;return 2*g3*Math.asin(Math.sqrt(m))}function b3(e,t){return(e==null?void 0:e.latitude)==null||e.longitude==null||(t==null?void 0:t.latitude)==null||t.longitude==null?null:Math.round(y3(t.latitude,t.longitude,e.latitude,e.longitude))}const v3=Xi({title:"Your contacts",description:"The people your listings name, with the headshots and logos they carry."},ei({label:"Contacts",item:()=>{const e=mn.short({label:"Name",cap:256});return cc({label:e,fields:{headshot:za({label:"Headshot"}),name:e,title:mn.short({label:"Title",cap:128}),org_name:mn.short({label:"Organization",cap:256}),email:i4({label:"Email"}),phone:a4({label:"Phone"}),website:Lo({label:"Website"}),address:$g({label:"Address"}),bio:mn.long({label:"Bio",cap:4e3}),logo_dark:za({label:"Logo for light backgrounds",process:[_t.cutout()]}),logo_light:za({label:"Logo for dark backgrounds",process:[_t.cutout()]}),instagram:Lo({label:"Instagram"}),linkedin:Lo({label:"LinkedIn"}),x:Lo({label:"X"}),facebook:Lo({label:"Facebook"})}})}})),yl=TS("library",{contacts:v3});aS(yl);const bp=Xi({title:"What’s the address?",description:"We’ll build your map and neighborhood details from this."},$g({label:"Address"})),DS=Xi({title:"For sale or for rent?",description:"This adjusts the pricing details we ask for."},sd({label:"Listing intent",from:[...d3]})),Xa=Xi({title:"Add photos, docs, and links",description:"Everything you add helps fill and enrich your website."},ei({label:"Uploads",item:Ug()})),qg=ei({label:"Media",item:Ug({kinds:["image","video","tour"],from:Xa}),source:ki.pick({brief:"Does this upload show the property? It belongs when its name or account says it is a photograph, a rendering, a video or a virtual tour of the property: its building, rooms, grounds, amenities, surroundings or views. It does not belong when its name or account says it is a floor plan or another diagram; a logo, wordmark or brand graphic; a headshot, portrait or other photograph of a person or people; a flyer, ad, business card, slide or other image that is mostly text; a screenshot; a map; or a scanned document page. When neither its name nor its account says what it is, you cannot tell. Order what belongs as a walk through the property: aerial and street views first, then the approach and entry, then the interiors room by room (living spaces, kitchen and dining, bedrooms, bathrooms), then outdoor spaces, amenities, surroundings and views, with every shot of one space together. A video or tour sits with the space it shows, and one of the whole property comes first."})}),LS=ei({label:"Floor plans",item:za({label:"Floor plan",from:Xa,process:[_t.cutout({enclosed:"keep"})]}),source:ki.pick({brief:"Is this upload exactly one floor plan? A floor plan is a top-down view of one floor of a dwelling's rooms and walls — drawn or rendered, flat or in 3D, at any size. It belongs when its name or account says it shows one floor plan, whatever title, figures or text are printed around it. It does not belong when its name or account says it holds two or more plans, or says it is something else: a building key or locator diagram (the building's outline with one unit shaded), a site, plot, parking or driveway diagram, a standalone legend, scale bar or north arrow, a logo, a photograph, or plain text. When neither its name nor its account says what it is, or how many plans it holds, you cannot tell. Order what belongs from the lowest floor to the highest; plans of several units go in the order the units are numbered, each unit's floors together."})}),x3=ei({label:"Documents",item:Ug({kinds:["document","image","video"],from:Xa}),source:ki.pick({brief:"Does this upload set out the property's specifics? It belongs when its name or account says it records its figures, finances, terms, legal record, condition or plans: an offering memorandum, brochure, listing sheet, rent roll, financials, comparables, lease, survey, site plan, plan set, disclosure or report. It does not belong when its name or account says it is a photograph, rendering, video or tour showing the property; an image of floor plans or elevations; a logo; a photograph of people; an ad, sign or announcement; a map; or notes for whoever makes the marketing. When neither its name nor its account says what it is, you cannot tell. Order what belongs as a buyer reads it: the offering memorandum, brochure or listing sheet first, then the financials, rent roll and comparables, then the leases, legal record and disclosures, then the reports, surveys and plans."})}),w3=za({label:"Hero",from:qg,source:ki.pick({brief:"Choose the single cover photo for the property's page. The cover is a wide banner above the property's address, so it must stand for the whole property at a glance. Only an image whose name or account says it is a photograph of the property can be chosen. Never choose a logo, wordmark or other brand graphic; an agent, team or company headshot; a flyer, ad, business card, slide or any image that is mostly text; a screenshot; a map; a scanned document or brochure page; or a floor plan or other diagram — nor an image whose name and account do not say what it is. Among the photographs of the property prefer, in order: a front exterior of the building; another exterior or aerial view; the widest, brightest shot of the main living space. Rank close-up details, bathrooms, utility spaces, empty rooms and anything that reads as a fragment rather than a place last: they are weaker covers, never excluded, so when they are the only photographs of the property, choose the best of them. If not one candidate is a photograph of the property, choose none: no banner beats a banner that is not the property."})}),k3=Lo({label:"Website"}),S3=`Is this floor plan labelled for this unit? Its label is read from its name and the text printed on it, never from the rooms drawn or any figures. It belongs when its label names this unit: the unit's label or a plain variant of it ("Unit 3", "#3", "Apt 3" and "Residence 3" all label "Unit 3"); a descriptor the unit's label carries in brackets, like "(PH)", may be left off. A plan labelling several units, such as a shared floor printed "Unit 1/2/3", belongs to each of them. It is excluded when it labels other units and not this one. When it labels no unit, you cannot tell. Order what belongs from the lowest floor to the highest.`,E3=`Is this photo labelled for this unit? Its label is read from its name, the text printed on it and a caption its account records, never from the rooms it shows, any figures, how much it looks like the unit or where it falls among the uploads. It belongs when its label names this unit: the unit's label or a plain variant of it ("Unit 3", "#3", "Apt 3" and "Residence 3" all label "Unit 3"); a descriptor the unit's label carries in brackets, like "(PH)", may be left off. A photo labelled for several units belongs to each of them. It is excluded when it labels other units and not this one. When it labels no unit, you cannot tell.`,_3=[`List every dwelling the uploads present with its own specs printed — its beds, baths, square feet, asking price or rent written out for that dwelling: the home a listing describes, or each unit a building's documents name or number. A dwelling the uploads only name, picture or mark with a status, with no specs of its own, is not listed. A plan or row printed for several units ("Unit 4/6") lists each of those units, each with what is printed for it. A dwelling named in several uploads, or on several pages, is one item carrying everything they print for it. A unit-mix row standing for several unnamed units is not a dwelling; neither is a commercial space, a whole building, a comparable property, a market average or a portfolio total.`,"Every member is what an upload prints as text for that dwelling, and nothing else. An upload's own text, as its account quotes it (a document's or a sheet's content, an image's printed words), is what it prints; the account's description of what a drawing, a photo or a map shows (the rooms, the doors, the spaces) is never a member's source. Never count rooms; never compute, round or convert a figure; never carry one across from another dwelling, a unit-mix average or the building's totals; never add what is usual for a dwelling of its kind. A figure printed for a neighbourhood, a development or the building is never a dwelling's, and a count or fee is 0 only where the uploads print none for that dwelling. A member no upload prints for that dwelling is null, and a null is always better than a guess.",`label: the unit's own name as printed — its unit number or name ("201", "Residence 201", "4B", "Penthouse 501"), without a word marking its status ("model", "available") — and never its street address. A dwelling presented alone, with no unit name, is always labelled "Home", whatever name the uploads print for the home itself.`,"beds, baths, sqft: exactly as printed for that dwelling; a studio has one bedroom.",'price: the asking price or monthly rent as written for that dwelling, or its status word ("Sold", "Leased", "Request for Info").','floor: the floor of its building the dwelling sits on, as printed ("3", "PH", "Ground", "3 to 4"); never read off its unit number.',"hoa_monthly: the HOA, condo or strata fee printed per month for that dwelling. A fee printed for another period, or for the building, is null.",'parking: the number of parking spaces printed for that dwelling ("1 deeded space" is 1, "two-car garage" is 2). Parking printed with no count, or for the building, is null.',"lot_sqft: the lot size printed in square feet for that dwelling: a home's own lot. A lot in another unit, or the lot of a building several dwellings share, is null.",`amenities: a feature this dwelling has that the other dwellings in its building do not, in a few words as an upload states it, such as "Private roof deck", "Corner unit", "Harbor views". Check each one against the other dwellings: a feature printed for two of them, or for the building, is the building's and goes on no dwelling, however a sheet praises it; a routine fitting or finish, a note printed on a plan, or what its other members already say sets nothing apart. Most dwellings have none. Leave the list empty when nothing is this one's alone.`,"When the uploads present no dwelling with its own specs printed, return no items."].join(`
|
|
778
|
+
|
|
779
|
+
`),zu=mn.short({label:"Unit"}),j3=rn({label:"Beds"}),O3=rn({label:"Baths",decimals:!0}),zS=rn({label:"Sq ft",thousandsSep:!0}),$S=mn.short({label:"Price",cap:40}),US=mn.short({label:"Building floor(s)",cap:20}),IS=rn({label:"Parking spaces"}),HS=ei({label:"Amenities",max:12,item:mn.short({cap:40})});function BS(e,t){return ei({label:"Floor plans",source:ki.pick({reads:[e],brief:t}),item:cc({fields:{image:za({label:"Floor plan",from:LS}),floor:sd({label:"Floor",from:[...n5],creatable:!0})}})})}function qS(e,t){return ei({label:"Photos",source:ki.pick({reads:[e],brief:t}),item:za({label:"Photo",from:qg})})}const A3=Xi({title:"Tell us about the units",description:"Add each unit’s details and floor plans so they appear on your website."},ei({label:"Units",source:ki.write({reads:[Xa],brief:_3}),item:cc({label:zu,fields:{label:zu,beds:j3,baths:O3,sqft:zS,price:$S,floor:US,hoa_monthly:rn({label:"Monthly HOA fee"}),parking:IS,lot_sqft:rn({label:"Lot sq ft",thousandsSep:!0}),amenities:HS,floor_plans:BS(zu,S3),photos:qS(zu,E3)}})})),N3=`Is this floor plan labelled for this space? Its label is read from its name and the text printed on it, never from the rooms drawn or any figures. It belongs when its label names this space: the space's label or a plain variant of it ("Suite 200", "Ste 200" and "#200" all label "Suite 200"); a descriptor the space's label carries in brackets may be left off. A plan labelling several spaces belongs to each of them. It is excluded when it labels other spaces and not this one. When it labels no space, you cannot tell. Order what belongs from the lowest floor to the highest.`,M3=`Is this photo labelled for this space? Its label is read from its name, the text printed on it and a caption its account records, never from what it shows, any figures, how much it looks like the space or where it falls among the uploads. It belongs when its label names this space: the space's label or a plain variant of it ("Suite 200", "Ste 200" and "#200" all label "Suite 200"); a descriptor the space's label carries in brackets may be left off. A photo labelled for several spaces belongs to each of them. It is excluded when it labels other spaces and not this one. When it labels no space, you cannot tell.`,C3=["List every commercial space the uploads present with its own specs printed — its use, square feet, rent or price written out for that space: each shop, office suite, restaurant or other non-residential space a building's documents name or number. A space the uploads only name, picture or mark with a status, with no specs of its own, is not listed. A space named in several uploads, or on several pages, is one item carrying everything they print for it. A dwelling is never a commercial space; neither is a whole building, a comparable property, a market average or a portfolio total.","Every member is what an upload prints as text for that space, and nothing else. An upload's own text, as its account quotes it (a document's or a sheet's content, an image's printed words), is what it prints; the account's description of what a drawing, a photo or a map shows is never a member's source. Never compute, round or convert a figure; never carry one across from another space or the building's totals; never add what is usual for a space of its kind. A member no upload prints for that space is null, and a null is always better than a guess.",`label: the space's own name as printed ("Retail A", "Suite 200", "Ground-floor restaurant"), without a word marking its status ("available", "leased"), and never its street address.`,'use: what the space is for, as printed ("Retail", "Office", "Restaurant").',"sqft: the square feet printed for that space.",'price: the rent or price as written for that space ("$45/SF/yr", "$8,500/mo"), or its status word ("Leased", "Call for pricing").','floor: the floor of its building the space sits on, as printed ("1", "Ground", "Mezzanine"); never read off its suite number.',"parking: the number of parking spaces printed for that space. Parking printed with no count, or for the building, is null.",`amenities: a feature this space has that the other spaces in its building do not, in a few words as an upload states it, such as "Corner frontage", "Drive-thru", "Grease trap". Check each one against the other spaces: a feature printed for two of them, or for the building, is the building's and goes on no space, however a sheet praises it; a routine fitting or finish, a note printed on a plan, or what its other members already say sets nothing apart. Most spaces have none. Leave the list empty when nothing is this one's alone.`,"When the uploads present no commercial space with its own specs printed, return no items."].join(`
|
|
780
|
+
|
|
781
|
+
`),$u=mn.short({label:"Space"}),R3=Xi({title:"Tell us about the commercial spaces",description:"Add each space’s details and floor plans so they appear on your website."},ei({label:"Commercial spaces",source:ki.write({reads:[Xa],brief:C3}),item:cc({label:$u,fields:{label:$u,use:mn.short({label:"Use",cap:40}),sqft:zS,price:$S,floor:US,parking:IS,amenities:HS,floor_plans:BS($u,N3),photos:qS($u,M3)}})})),T3="The uploads may present comparable properties: other properties an upload sets beside the subject for comparison. The subject is the property the uploads are marketing, at the read address; in a building, that is the building and every unit the uploads market in it. Find every comparable and return it as an item. A property is a comparable because an upload compares it with the subject, and it may appear as a row in a sales or rent comparables table, as a panel with its own photo and figures, as a numbered pin in a map legend, or as a line in a survey of recent trades. An upload presenting the subject or one of its units for itself, such as its listing sheet, brochure, price list or market history, presents the subject, whatever unit line it prints beside the read street. Read every upload whole, including tables that continue from one page to the next. Copy each figure exactly as an upload states it for that property, and each listing's remarks word for word. Specs come only from what is printed as text: never count rooms or take a figure from what a floor plan drawing, a photo or a map shows; a studio has one bedroom. Never compute one: not by multiplying a price per unit by a unit count, not by dividing a price by a size, not by counting the days between two dates, not by converting a yearly fee to a monthly one, not by averaging rows, and never by carrying a figure across from a neighbouring row, a summary or the subject. If a property is listed in more than one place — on several pages, or in several uploads — return one item carrying every figure those places state. A figure no upload states for that property is null; a null is always better than a guess. Never return the subject, even where it appears in a comparables table or at the centre of a comparables map. Another unit of the subject's building is a comparable only where an upload sets it beside the subject as one, such as a sister unit's earlier sale in a comps table. Do not return a market, submarket or area average, a portfolio total, or anything that is not an individual property. When no upload compares another property with the subject, return no items.",Bm=$g({label:"Address"}),Wx=yS({label:"Sale date"}),D3=Xi({title:"Which properties compare?",description:"Recently sold or listed homes like this one shape the pricing story."},ei({label:"Comparables",max:50,source:ki.write({reads:[Xa,bp],brief:T3}),item:cc({label:Bm,fields:{address:Bm,price:rn({label:"Price"}),sale_date:Wx,beds:rn({label:"Beds"}),baths:rn({label:"Baths",decimals:!0}),sqft:rn({label:"Sq ft"}),photo:za({label:"Photo"}),year_built:rn({label:"Year built"}),lot_sqft:rn({label:"Lot sq ft"}),stories:rn({label:"Stories",decimals:!0}),units:rn({label:"Units"}),hoa_monthly:rn({label:"HOA per month"}),list_price:rn({label:"List price"}),listed_date:yS({label:"Listed date"}),mls_number:mn.short({label:"MLS number"}),description:mn.long({label:"Description"}),status:sd({label:"Status",from:[...f3],locked:!0,source:zm({reads:[Wx]},e=>m3(e))}),distance_m:rn({label:"Distance (m)",locked:!0,source:zm({reads:[Bm,bp]},(e,t)=>b3(e,t))}),price_period:sd({label:"Price period",from:[...h3],locked:!0,source:zm({reads:[DS]},e=>p3(e))})}})})),L3=Xi({title:"Who’s on this listing?",description:"Add the contacts for this property, and drag them into the order your marketing shows them."},ei({label:"Contacts",min:1,max:12,source:ki.pick({reads:[Xa],brief:"Choose this listing's contacts from the library's contacts, judging each one's name, title, organisation, email and phone against the read uploads' names and accounts. A contact may be chosen only when an upload's name or account says it prints their email or phone, or their full name, as a contact for this listing — an agent, broker, or sales or leasing contact. A contact the uploads leave out, where their accounts name the listing's contacts, is not chosen. A shared organisation, a matching first name, or a name printed in another role (an architect, a photographer, a seller) is not evidence. When no upload's account names any contact, choose none. Order those chosen as the uploads present them for this listing, the first or most prominent first."}),item:Q4({label:"Contact",from:yl.contacts})})),Za=TS("property",{address:bp,listing_intent:DS,description:Xi({title:"Describe the property",description:"Talk it up like you would to a buyer, and our AI writes your website copy."},mn.long({label:"Description"})),uploads:Xa,property_media:qg,floor_plans:LS,property_documents:x3,hero:w3,site_url:k3,units:A3,commercial_spaces:R3,contacts:L3,comparables:D3});aS(Za);const z3=["text","number","select","url","email","phone","date"],$3=new Set(z3);function Fg(e){return $3.has(e)}function FS(e){return e.type===void 0||!Fg(e.type)?!1:e.type!=="text"||e.size===void 0||e.size==="short"}const vp=new Set(["image","video","tour","document"]);function PS(e){return!(e!==null&&typeof e=="object"&&e.locked===!0)}function Pg(e){const t=Object.values(e).filter(PS).map(l=>l!==null&&typeof l=="object"?l:{}),a=t.filter(l=>l.type!==void 0&&vp.has(l.type)),r=t.filter(l=>!(l.type!==void 0&&vp.has(l.type)));return a.length===1&&r.length<=2&&r.every(FS)}function U3(e){var a;if(((a=e.element)==null?void 0:a.type)!=="object")return null;const t=e.element.fields;return t!==null&&typeof t=="object"?t:{}}function VS(e,t){var l,c;const a=U3(e);if(a!==null)return Pg(a)?"annotated-media":"object";const r=(l=e.element)==null?void 0:l.type;return r!==void 0&&vp.has(r)?"media":r==="media"?((c=e.element)==null?void 0:c.from)===void 0&&t==="home"?"upload":"media":r==="row"?"row":r==="poi"?"poi":"scalar"}const I3={scalar:{expanded:"bullet-list",compact:"bullet-list"},media:{expanded:"gallery",compact:"gallery"},upload:{expanded:"media-manager",compact:"media-manager"},"annotated-media":{expanded:"annotated-gallery",compact:"annotated-gallery"},object:{expanded:"table",compact:"accordion"},row:{expanded:"row-bar",compact:"row-bar"},poi:{expanded:"poi-curation",compact:"poi-curation"}};function H3(e,t,a){const r=VS(e,a),l=r==="object"||r==="annotated-media"?"item":"unit";return{itemKind:r,view:I3[r][t],granularity:l}}function B3(e){return/[^aeiou]ies$/i.test(e)?e.slice(0,-3)+"y":/(?:ss|x|z|ch|sh)es$/i.test(e)?e.slice(0,-2):/[^s]s$/i.test(e)?e.slice(0,-1):e}function GS(e){return/^[A-Z][A-Z]/.test(e)?e:e.charAt(0).toLowerCase()+e.slice(1)}function Wa(e){const t=GS((e??"").trim());if(t==="")return{singular:"item",plural:"items"};const a=t.search(/\S+$/);return{singular:t.slice(0,a)+B3(t.slice(a)),plural:t}}function Vg(e){return e.charAt(0).toUpperCase()+e.slice(1)}const q3=["verb","unique","brief","none","reads"];new Set(q3);function Jx(e){return e!==null&&typeof e=="object"&&!Array.isArray(e)}function F3(e){return!Jx(e)||!Array.isArray(e.fills)?[]:e.fills.filter(Jx).map(t=>({...t,kind:"fill"}))}function Gg(e){return e!==null&&typeof e=="object"?e:null}function dc(e){const t=Gg(e);if((t==null?void 0:t.kind)!=="row")return null;const{slot:a,field:r}=t;return typeof a!="string"||a===""||typeof r!="string"||r===""?null:{slot:a,field:r}}function KS(e){return Object.entries(e??{}).filter(([,t])=>{var a;return t.type==="row"&&((a=Gg(t.source))==null?void 0:a.kind)==="element"}).map(([t])=>t)}function P3(e){const t=new Set(KS(e)),a={};for(const[r,l]of Object.entries(e??{})){const c=dc(l.source);c!==null&&t.has(c.slot)&&(a[r]=c.field)}return a}function dd(e){var t;if(((t=e.element)==null?void 0:t.type)==="object")return e.element.fields}function V3(e){return dd(e)!==void 0}function G3(e){const t=Gg(e.source);if(t===null||t.kind==="authored")return{kind:"none"};const{kind:a,key:r,section:l,slot:c,transform:u}=t;if(a==="home"&&typeof r=="string"){const m=on(r);if(m!==null)return{kind:"table",table:m}}return a==="section"&&typeof l=="string"&&typeof c=="string"?{kind:"section",section:l,slot:c}:a==="derived"&&typeof u=="string"?{kind:"derived",transform:u}:{kind:"other"}}function fd(e){return lS(Za).has(e)}function YS(e){const t=lS(Za).get(e);if(t===void 0)throw new Error(`fact registry: "${e}" names no property fact`);return t}function QS(e){return YS(e).value_type}function K3(){return D5(Za)}function Y3(e){return typeof e=="string"&&K3().includes(e)}function Q3(e){if(!fd(e))return;const t=YS(e).declaration;return t.type==="select"?t.values:void 0}function X3(e){return typeof e=="string"?e:null}function Z3(e){const t=Ba(e);return t===void 0?null:{media:t}}function W3(e,t){const[,a="",r]=e.split("."),l=t[a];switch(QS(`property.${a}`)){case"address":{const c=xi(l);return r===void 0?c:c===null?null:c[r]}case"image":return Z3(l);case"number":return typeof l=="number"?l:null;case"text":return X3(l)}}function Kg(e){return dS(Cg(e)==="library"?yl:Za,e)}function XS(e,t){return hS(Kg(e),t)}function ew(e){return Object.keys(Kg(e))}function ZS(e,t){if(t==="id")return{kind:"identity"};const a=t.indexOf("."),r=a===-1?t:t.slice(0,a),l=sc(e,r)??null;if(l===null)return{kind:"unknown",offers:ew(e)};if(a!==-1){const c=t.slice(a+1);return l!=="address"?{kind:"unknown",offers:ew(e)}:Ld(c)?{kind:"member",value_type:sS(c),storable:tw(e,t)}:{kind:"unknown",offers:_g.map(u=>`${r}.${u}`)}}return{kind:"member",value_type:l,storable:tw(e,t)}}function tw(e,t){if(t===void 0){if(on(e)!==null)return!0;if(!fd(e))return!1;const r=e.slice(0,e.lastIndexOf("."));return!(fd(r)&&QS(r)==="address")}if(!I5().includes(e))return!1;const a=XS(e,t);return a!==void 0&&!L5(a)}function J3(e,t){const a=t.source;return(a==null?void 0:a.kind)!=="row"||typeof a.field!="string"||ZS(e,a.field).kind==="unknown"?null:a.field}function Yg(e,t){if(t==null)return null;const a=J3(t,e);if(a===null)return null;const r=XS(t,a),l=r===void 0?null:Ng(r);if(r===void 0||l==null)return null;const c=up(r);return{table:t,member:a,value_type:l,...c!==void 0?{filter:c}:{}}}const Id={kind:"owned"};function nw(e){return e===null?Id:{kind:"picked",filter:e}}function il(e,t){if(e.from!==void 0)return nw(ld(e));const a=Yg(e,t);return a===null?null:a.filter===void 0?Id:nw(ld({type:e.type,from:a.filter.from}))}function Hd(e,t){return il(e,t)??Id}function eR(e,t,a){return il(t,a)??il({...t,source:e.source},a)}function tR(e,t,a){var l;const r=il(t,a.itemTable);return r!==null?r:a.picksBy!==null&&((l=t.source)==null?void 0:l.kind)==="element"?{kind:"picked",filter:a.picksBy}:il({...t,source:e.source},a.listTable)??Id}const iw=1e-6;function nR(e,t){return e.w/e.h>t?{w:e.h*t,h:e.h}:{w:e.w,h:e.w/t}}function iR(e,t){const a=Math.max(e.w,e.h*t);return{w:a,h:a/t}}function aR(e,t){const a=Math.min(1,t.width/e.w,t.height/e.h);return{w:e.w*a,h:e.h*a}}function aw(e,t,a){const r=(l,c,u)=>Math.min(Math.max(l-c/2,0),u-c);return{x:r(t.x,e.w,a.width),y:r(t.y,e.h,a.height),w:e.w,h:e.h}}function rR(e,t,a,r){const l=iR(e,r);return l.w<=a.width+iw&&l.h<=a.height+iw?aw(aR(l,a),{x:e.x+e.w/2,y:e.y+e.h/2},a):aw(nR({w:a.width,h:a.height},r),t,a)}const rw=16/10;function ow(e){if(e===null||typeof e!="object")return null;const t=e,[a,r,l,c]=["x","y","width","height"].map(u=>t[u]);return![a,r,l,c].every(u=>typeof u=="number"&&Number.isFinite(u))||a===0&&r===0&&l===1&&c===1?null:{x:a,y:r,width:l,height:c}}function WS(e){var c;if(e===null||typeof e!="object")return{mode:"free",aspect:rw};const t=e,a=typeof t.aspect=="number"&&t.aspect>0?t.aspect:rw,r=(c=t.mobile)==null?void 0:c.aspect,l=typeof r=="number"&&r>0&&Math.abs(r-a)>1e-4?r:void 0;return{mode:t.mode==="free"?"free":"locked",aspect:a,...l===void 0?{}:{mobileAspect:l}}}function al(e,t){if(e===null||t===null)return e===t;const a=r=>Math.round(r*1e4)/1e4;return a(e.x)===a(t.x)&&a(e.y)===a(t.y)&&a(e.width)===a(t.width)&&a(e.height)===a(t.height)}function oR(e,t,a){const{width:r,height:l}=t,c={x:e.x*r,y:e.y*l,w:e.width*r,h:e.height*l},u=rR(c,{x:c.x+c.w/2,y:c.y+c.h/2},t,a),m={x:u.x/r,y:u.y/l,width:u.w/r,height:u.h/l};return al(m,{x:0,y:0,width:1,height:1})?null:m}function lw(e,t,a){return e===null||a===null?e:t===null?null:oR(e,t,a)}function JS(e,t){if(e===null||!(e>0)||!(t>0))return null;const a=Math.min(1,t/e),r=Math.min(1,e/t),l={x:(1-a)/2,y:0,width:a,height:r};return al(l,{x:0,y:0,width:1,height:1})?null:l}function lR(e,t,a){var u,m;const r=$d(e).get(a);if(r===void 0)return;const l=lc(t)??[od],c=[...l,...qr(l[0]).slice(1).filter(p=>!l.includes(p))];for(const p of c){const g=(m=(u=iS(e,p))==null?void 0:u.find(({id:b})=>b===a))==null?void 0:m.value;if(g!==void 0)return Qa(g)?Ag(r,g):r}return r}function sR(e,t,a){const r=t.width!==null&&t.height!==null&&t.width>0&&t.height>0?{width:t.width,height:t.height}:null,l=lw(e.crop,r,a.mode==="free"?null:a.aspect),c=l===null||a.mobileAspect===void 0?null:lw(e.crop,r,a.mobileAspect),u=Object.values(e.renditions).some(m=>m!==null);return{file:e.file,picked:e.id,name:e.name,...l===null?{}:{crop:l},...r===null?{}:{ar:r.width/r.height},...c===null?{}:{mobile:{crop:c,derived:!0}},...u?{renditions:e.renditions}:{}}}function Qg(e){var l;const{mode:t,aspect:a,mobileAspect:r}=WS(e.crop);return{mode:t,aspect:a,aspectLabel:(l=e.crop)==null?void 0:l.aspectLabel,mobileAspect:r}}function rl(e){return e==null?null:{nx:e.x,ny:e.y,nw:e.width,nh:e.height}}function xp(e){return cR(e)?null:{x:e.nx,y:e.ny,width:e.nw,height:e.nh}}function hd(e,t,a){if(e==="free")return{nx:0,ny:0,nw:1,nh:1};const r=JS(t,a);return r===null?{nx:0,ny:0,nw:1,nh:1}:{nx:r.x,ny:r.y,nw:r.width,nh:r.height}}function sw(e,t,a){const r=e.nx+e.nw/2,l=e.ny+e.nh/2;if(!t||!a)return{...e};const c=t/a;let u=e.nw,m=u/c;return m>e.nh&&(m=e.nh,u=m*c),{nx:r-u/2,ny:l-m/2,nw:u,nh:m}}function cR(e){const t=a=>Math.round(a*1e4)/1e4;return t(e.nx)===0&&t(e.ny)===0&&t(e.nw)===1&&t(e.nh)===1}function uR(e,t,a,r){const l=e==null?void 0:e.rect;return l&&l.nw&&l.nh?{nx:l.nx,ny:l.ny,nw:l.nw,nh:l.nh}:hd(t,a,r)}const _a=52,dR=1,fR=6,hR=.94,an=(e,t,a)=>a<t?t:Math.max(t,Math.min(a,e));function Uu(e,t,a,r,l,c,u){e=Math.max(_a,e);const m=l>0?u.r-a:a-u.l;e=Math.min(e,m);let p=e/t;const g=c>0?u.b-r:r-u.t;return p>g&&(p=g,e=p*t),{w:Math.max(_a,e),h:Math.max(_a,e/t)}}function mR({src:e,mode:t,aspect:a,seed:r}){const l=x.useRef(null),[,c]=x.useReducer(K=>K+1,0),u=x.useRef(null),m=x.useRef({w:0,h:0}),p=x.useRef({z:1,icx:0,icy:0}),g=x.useRef({x:0,y:0,w:0,h:0}),b=x.useRef(!1),v=x.useRef(r??null),[k,w]=x.useState(null),j=()=>{const K=u.current,X=m.current;if(!K||!X.w)return{w:0,h:0};const ue=Math.min(X.w/K.w,X.h/K.h)*hR;return{w:K.w*ue,h:K.h*ue}},E=()=>{const K=j(),X=p.current,ue=K.w*X.z,M=K.h*X.z;return{l:X.icx-ue/2,t:X.icy-M/2,r:X.icx+ue/2,b:X.icy+M/2,w:ue,h:M}},_=()=>{const K=E(),X=m.current;return{l:Math.max(K.l,0),t:Math.max(K.t,0),r:Math.min(K.r,X.w),b:Math.min(K.b,X.h)}},C=()=>{const K=E(),X=g.current,ue=p.current,M=K.w/2,V=K.h/2;K.w>=X.w&&(ue.icx=an(ue.icx,X.x+X.w-M,X.x+M)),K.h>=X.h&&(ue.icy=an(ue.icy,X.y+X.h-V,X.y+V))},O=()=>{const K=g.current,X=_(),ue=X.r-X.l,M=X.b-X.t;if(t==="locked"){let V=Math.min(K.w,ue),te=V/a;te>M&&(te=M,V=te*a),K.w=V,K.h=te}else K.w=Math.min(K.w,ue),K.h=Math.min(K.h,M);K.x=an(K.x,X.l,X.r-K.w),K.y=an(K.y,X.t,X.b-K.h)},A=()=>{O(),C(),O()},D=K=>{const X=m.current;if(!X.w||!u.current)return;p.current={z:1,icx:X.w/2,icy:X.h/2};const ue=E(),M=u.current.w/u.current.h,V=K?uR(v.current,t,M,a):hd(t,M,a);g.current={x:ue.l+V.nx*ue.w,y:ue.t+V.ny*ue.h,w:V.nw*ue.w,h:V.nh*ue.h},A(),b.current=!0,c()};x.useEffect(()=>{b.current=!1,u.current=null,c();const K=new Image;K.onload=()=>{u.current={w:K.naturalWidth||1,h:K.naturalHeight||1},D(!0)},K.src=e},[e]),x.useEffect(()=>{v.current=r??null},[r]),x.useEffect(()=>{u.current&&D(!1)},[t,a]),x.useLayoutEffect(()=>{const K=l.current;if(!K)return;const X=()=>{const M=K.getBoundingClientRect(),V=m.current.w;m.current={w:M.width,h:M.height},!V&&u.current?D(!0):V&&(A(),c())};X();const ue=new ResizeObserver(X);return ue.observe(K),()=>ue.disconnect()},[]);const R=K=>{const X=l.current.getBoundingClientRect();return{x:K.clientX-X.left,y:K.clientY-X.top}},F=K=>{var te,me;if(K.button)return;K.stopPropagation(),(me=(te=K.currentTarget).setPointerCapture)==null||me.call(te,K.pointerId),w("move");const X=R(K),ue={...g.current},M=Q=>{const N=R(Q),q=_(),I=g.current;I.x=an(ue.x+(N.x-X.x),q.l,q.r-I.w),I.y=an(ue.y+(N.y-X.y),q.t,q.b-I.h),c()},V=()=>{window.removeEventListener("pointermove",M),window.removeEventListener("pointerup",V),window.removeEventListener("pointercancel",V),w(null)};window.addEventListener("pointermove",M),window.addEventListener("pointerup",V),window.addEventListener("pointercancel",V)},L=K=>X=>{var Q,N;if(X.button)return;X.stopPropagation(),(N=(Q=X.currentTarget).setPointerCapture)==null||N.call(Q,X.pointerId),w(K);const ue=g.current,M={l:ue.x,t:ue.y,r:ue.x+ue.w,b:ue.y+ue.h},V=R(X),te=q=>{const I=R(q),P=_(),ee=I.x-V.x,pe=I.y-V.y;let se=M.l,ke=M.t,z=M.r,ce=M.b;if(t==="free")K.includes("w")&&(se=an(M.l+ee,P.l,z-_a)),K.includes("e")&&(z=an(M.r+ee,se+_a,P.r)),K.includes("n")&&(ke=an(M.t+pe,P.t,ce-_a)),K.includes("s")&&(ce=an(M.b+pe,ke+_a,P.b));else{const ge=a;if(K==="se"){const Ee=Uu(M.r+ee-M.l,ge,M.l,M.t,1,1,P);se=M.l,ke=M.t,z=se+Ee.w,ce=ke+Ee.h}else if(K==="nw"){const Ee=Uu(M.r-(M.l+ee),ge,M.r,M.b,-1,-1,P);z=M.r,ce=M.b,se=z-Ee.w,ke=ce-Ee.h}else if(K==="ne"){const Ee=Uu(M.r+ee-M.l,ge,M.l,M.b,1,-1,P);se=M.l,ce=M.b,z=se+Ee.w,ke=ce-Ee.h}else if(K==="sw"){const Ee=Uu(M.r-(M.l+ee),ge,M.r,M.t,-1,1,P);z=M.r,ke=M.t,se=z-Ee.w,ce=ke+Ee.h}else{const Ee=(M.l+M.r)/2,Ue=(M.t+M.b)/2;let Le=ue.w,ye=ue.h;K==="e"?Le=(M.r+ee-Ee)*2:K==="w"?Le=(Ee-(M.l+ee))*2:K==="s"?(ye=(M.b+pe-Ue)*2,Le=ye*ge):K==="n"&&(ye=(Ue-(M.t+pe))*2,Le=ye*ge),Le=Math.max(_a,Le),ye=Le/ge,Le=Math.min(Le,P.r-P.l),ye=Le/ge,ye>P.b-P.t&&(ye=P.b-P.t,Le=ye*ge),se=an(Ee-Le/2,P.l,P.r-Le),ke=an(Ue-ye/2,P.t,P.b-ye),z=se+Le,ce=ke+ye}}g.current={x:se,y:ke,w:z-se,h:ce-ke},c()},me=()=>{window.removeEventListener("pointermove",te),window.removeEventListener("pointerup",me),window.removeEventListener("pointercancel",me),w(null)};window.addEventListener("pointermove",te),window.addEventListener("pointerup",me),window.addEventListener("pointercancel",me)},T=(K,X,ue)=>{const M=p.current;K=an(K,dR,fR);const V=K/M.z;M.icx=X+(M.icx-X)*V,M.icy=ue+(M.icy-ue)*V,M.z=K,A(),c()},H=K=>{const X=m.current;T(p.current.z*K,X.w/2,X.h/2)},ne=x.useRef(()=>{});ne.current=K=>{K.preventDefault();const X=m.current,ue=Math.exp(-K.deltaY*.0015*(K.ctrlKey?2.6:1));T(p.current.z*ue,X.w/2,X.h/2)},x.useEffect(()=>{const K=l.current;if(!K)return;const X=ue=>ne.current(ue);return K.addEventListener("wheel",X,{passive:!1}),()=>K.removeEventListener("wheel",X)},[]);const Y=()=>D(!1),le=()=>{const K=E(),X=g.current;return K.w?{nx:an((X.x-K.l)/K.w,0,1),ny:an((X.y-K.t)/K.h,0,1),nw:an(X.w/K.w,0,1),nh:an(X.h/K.h,0,1)}:{nx:0,ny:0,nw:1,nh:1}};return{stageRef:l,ready:b.current,activeHandle:k,imgRect:E,box:g.current,view:p.current,onBoxDown:F,onHandleDown:L,zoomBy:H,reset:Y,cropValue:le,natAspect:u.current?u.current.w/u.current.h:null}}function pR({chrome:e,pct:t,onZoomOut:a,onZoomIn:r,resetSlot:l,children:c}){return d.jsxs("div",{className:e.foot,children:[d.jsxs("div",{className:"flex items-center gap-3",children:[l,d.jsxs("div",{className:"flex h-9 items-center overflow-hidden rounded-[9px] border border-line",children:[d.jsx("button",{type:"button",className:"grid size-9 place-items-center text-ink-2 hover:bg-[#f1f0ea] hover:text-ink",onClick:a,"aria-label":"Zoom out",children:d.jsx(e.ZoomOutIcon,{})}),d.jsx("span",{className:"grid h-9 min-w-[54px] place-items-center border-x border-line font-mono text-[12px] text-ink-2",children:t}),d.jsx("button",{type:"button",className:"grid size-9 place-items-center text-ink-2 hover:bg-[#f1f0ea] hover:text-ink",onClick:r,"aria-label":"Zoom in",children:d.jsx(e.ZoomInIcon,{})})]})]}),d.jsx("div",{className:e.actions,children:c})]})}const gR=["n","s","e","w"],yR=["nw","ne","sw","se"];function bR({cr:e,mode:t,src:a,stageClassName:r}){const l=e.imgRect(),c=e.box,u=e.activeHandle!==null;return d.jsx("div",{className:`we-cs-stage ${r}`,ref:e.stageRef,children:e.ready&&d.jsxs(d.Fragment,{children:[d.jsx("img",{className:"we-cs-img",src:a,alt:"",draggable:!1,style:{left:l.l,top:l.t,width:l.w,height:l.h}}),d.jsxs("div",{className:`we-cs-box${u?" live":""}`,"data-mode":t,"data-crop-box":!0,style:{left:c.x,top:c.y,width:c.w,height:c.h},onPointerDown:e.onBoxDown,children:[d.jsx("div",{className:"we-cs-ring"}),d.jsxs("div",{className:"we-cs-thirds",children:[d.jsx("i",{}),d.jsx("i",{}),d.jsx("i",{}),d.jsx("i",{})]}),gR.map(m=>d.jsx("div",{"data-crop-handle":m,className:`we-cs-h edge ${m}`,onPointerDown:e.onHandleDown(m)},m)),yR.map(m=>d.jsx("div",{"data-crop-handle":m,className:`we-cs-h corner ${m}`,onPointerDown:e.onHandleDown(m)},m))]})]})})}const vR=x.forwardRef(function({chrome:t,src:a,mode:r,aspect:l,seed:c,stageClassName:u="h-[412px]",footerActions:m,onUserEdit:p},g){const b=mR({src:a,mode:r,aspect:l,seed:c});x.useImperativeHandle(g,()=>({cropValue:()=>b.cropValue(),natAspect:()=>b.natAspect}),[b]);const v=Math.round(b.view.z*100)+"%",k=x.useRef(!1),w=x.useRef(!1),j=()=>{w.current=!0},E=()=>{w.current&&!k.current&&(k.current=!0,p==null||p())},_=()=>{w.current=!1};return d.jsxs(d.Fragment,{children:[d.jsx("div",{onPointerDownCapture:j,onPointerMoveCapture:E,onPointerUpCapture:_,children:d.jsx(bR,{cr:b,mode:r,src:a,stageClassName:u})}),d.jsx(pR,{chrome:t,pct:v,onZoomOut:()=>b.zoomBy(1/1.25),onZoomIn:()=>b.zoomBy(1.25),resetSlot:d.jsx("button",{type:"button",className:t.buttonLink,onClick:b.reset,children:"Reset"}),children:m})]})});function eE(e){var t,a,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var l=e.length;for(t=0;t<l;t++)e[t]&&(a=eE(e[t]))&&(r&&(r+=" "),r+=a)}else for(a in e)e[a]&&(r&&(r+=" "),r+=a);return r}function Xg(){for(var e,t,a=0,r="",l=arguments.length;a<l;a++)(e=arguments[a])&&(t=eE(e))&&(r&&(r+=" "),r+=t);return r}const xR=(e,t)=>{const a=new Array(e.length+t.length);for(let r=0;r<e.length;r++)a[r]=e[r];for(let r=0;r<t.length;r++)a[e.length+r]=t[r];return a},wR=(e,t)=>({classGroupId:e,validator:t}),tE=(e=new Map,t=null,a)=>({nextPart:e,validators:t,classGroupId:a}),md="-",cw=[],kR="arbitrary..",SR=e=>{const t=_R(e),{conflictingClassGroups:a,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:u=>{if(u.startsWith("[")&&u.endsWith("]"))return ER(u);const m=u.split(md),p=m[0]===""&&m.length>1?1:0;return nE(m,p,t)},getConflictingClassGroupIds:(u,m)=>{if(m){const p=r[u],g=a[u];return p?g?xR(g,p):p:g||cw}return a[u]||cw}}},nE=(e,t,a)=>{if(e.length-t===0)return a.classGroupId;const l=e[t],c=a.nextPart.get(l);if(c){const g=nE(e,t+1,c);if(g)return g}const u=a.validators;if(u===null)return;const m=t===0?e.join(md):e.slice(t).join(md),p=u.length;for(let g=0;g<p;g++){const b=u[g];if(b.validator(m))return b.classGroupId}},ER=e=>e.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const t=e.slice(1,-1),a=t.indexOf(":"),r=t.slice(0,a);return r?kR+r:void 0})(),_R=e=>{const{theme:t,classGroups:a}=e;return jR(a,t)},jR=(e,t)=>{const a=tE();for(const r in e){const l=e[r];Zg(l,a,r,t)}return a},Zg=(e,t,a,r)=>{const l=e.length;for(let c=0;c<l;c++){const u=e[c];OR(u,t,a,r)}},OR=(e,t,a,r)=>{if(typeof e=="string"){AR(e,t,a);return}if(typeof e=="function"){NR(e,t,a,r);return}MR(e,t,a,r)},AR=(e,t,a)=>{const r=e===""?t:iE(t,e);r.classGroupId=a},NR=(e,t,a,r)=>{if(CR(e)){Zg(e(r),t,a,r);return}t.validators===null&&(t.validators=[]),t.validators.push(wR(a,e))},MR=(e,t,a,r)=>{const l=Object.entries(e),c=l.length;for(let u=0;u<c;u++){const[m,p]=l[u];Zg(p,iE(t,m),a,r)}},iE=(e,t)=>{let a=e;const r=t.split(md),l=r.length;for(let c=0;c<l;c++){const u=r[c];let m=a.nextPart.get(u);m||(m=tE(),a.nextPart.set(u,m)),a=m}return a},CR=e=>"isThemeGetter"in e&&e.isThemeGetter===!0,RR=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,a=Object.create(null),r=Object.create(null);const l=(c,u)=>{a[c]=u,t++,t>e&&(t=0,r=a,a=Object.create(null))};return{get(c){let u=a[c];if(u!==void 0)return u;if((u=r[c])!==void 0)return l(c,u),u},set(c,u){c in a?a[c]=u:l(c,u)}}},wp="!",uw=":",TR=[],dw=(e,t,a,r,l)=>({modifiers:e,hasImportantModifier:t,baseClassName:a,maybePostfixModifierPosition:r,isExternal:l}),DR=e=>{const{prefix:t,experimentalParseClassName:a}=e;let r=l=>{const c=[];let u=0,m=0,p=0,g;const b=l.length;for(let E=0;E<b;E++){const _=l[E];if(u===0&&m===0){if(_===uw){c.push(l.slice(p,E)),p=E+1;continue}if(_==="/"){g=E;continue}}_==="["?u++:_==="]"?u--:_==="("?m++:_===")"&&m--}const v=c.length===0?l:l.slice(p);let k=v,w=!1;v.endsWith(wp)?(k=v.slice(0,-1),w=!0):v.startsWith(wp)&&(k=v.slice(1),w=!0);const j=g&&g>p?g-p:void 0;return dw(c,w,k,j)};if(t){const l=t+uw,c=r;r=u=>u.startsWith(l)?c(u.slice(l.length)):dw(TR,!1,u,void 0,!0)}if(a){const l=r;r=c=>a({className:c,parseClassName:l})}return r},LR=e=>{const t=new Map;return e.orderSensitiveModifiers.forEach((a,r)=>{t.set(a,1e6+r)}),a=>{const r=[];let l=[];for(let c=0;c<a.length;c++){const u=a[c],m=u[0]==="[",p=t.has(u);m||p?(l.length>0&&(l.sort(),r.push(...l),l=[]),r.push(u)):l.push(u)}return l.length>0&&(l.sort(),r.push(...l)),r}},zR=e=>({cache:RR(e.cacheSize),parseClassName:DR(e),sortModifiers:LR(e),postfixLookupClassGroupIds:$R(e),...SR(e)}),$R=e=>{const t=Object.create(null),a=e.postfixLookupClassGroups;if(a)for(let r=0;r<a.length;r++)t[a[r]]=!0;return t},UR=/\s+/,IR=(e,t)=>{const{parseClassName:a,getClassGroupId:r,getConflictingClassGroupIds:l,sortModifiers:c,postfixLookupClassGroupIds:u}=t,m=[],p=e.trim().split(UR);let g="";for(let b=p.length-1;b>=0;b-=1){const v=p[b],{isExternal:k,modifiers:w,hasImportantModifier:j,baseClassName:E,maybePostfixModifierPosition:_}=a(v);if(k){g=v+(g.length>0?" "+g:g);continue}let C=!!_,O;if(C){const L=E.substring(0,_);O=r(L);const T=O&&u[O]?r(E):void 0;T&&T!==O&&(O=T,C=!1)}else O=r(E);if(!O){if(!C){g=v+(g.length>0?" "+g:g);continue}if(O=r(E),!O){g=v+(g.length>0?" "+g:g);continue}C=!1}const A=w.length===0?"":w.length===1?w[0]:c(w).join(":"),D=j?A+wp:A,R=D+O;if(m.indexOf(R)>-1)continue;m.push(R);const F=l(O,C);for(let L=0;L<F.length;++L){const T=F[L];m.push(D+T)}g=v+(g.length>0?" "+g:g)}return g},HR=(...e)=>{let t=0,a,r,l="";for(;t<e.length;)(a=e[t++])&&(r=aE(a))&&(l&&(l+=" "),l+=r);return l},aE=e=>{if(typeof e=="string")return e;let t,a="";for(let r=0;r<e.length;r++)e[r]&&(t=aE(e[r]))&&(a&&(a+=" "),a+=t);return a},BR=(e,...t)=>{let a,r,l,c;const u=p=>{const g=t.reduce((b,v)=>v(b),e());return a=zR(g),r=a.cache.get,l=a.cache.set,c=m,m(p)},m=p=>{const g=r(p);if(g)return g;const b=IR(p,a);return l(p,b),b};return c=u,(...p)=>c(HR(...p))},qR=[],Ft=e=>{const t=a=>a[e]||qR;return t.isThemeGetter=!0,t},rE=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,oE=/^\((?:(\w[\w-]*):)?(.+)\)$/i,FR=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,PR=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,VR=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,GR=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,KR=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,YR=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Sa=e=>FR.test(e),Ke=e=>!!e&&!Number.isNaN(Number(e)),pi=e=>!!e&&Number.isInteger(Number(e)),qm=e=>e.endsWith("%")&&Ke(e.slice(0,-1)),Fi=e=>PR.test(e),lE=()=>!0,QR=e=>VR.test(e)&&!GR.test(e),Wg=()=>!1,XR=e=>KR.test(e),ZR=e=>YR.test(e),WR=e=>!_e(e)&&!je(e),JR=e=>e.startsWith("@container")&&(e[10]==="/"&&e[11]!==void 0||e[11]==="s"&&e[16]!==void 0&&e.startsWith("-size/",10)||e[11]==="n"&&e[18]!==void 0&&e.startsWith("-normal/",10)),eT=e=>Ja(e,uE,Wg),_e=e=>rE.test(e),xr=e=>Ja(e,dE,QR),fw=e=>Ja(e,sT,Ke),tT=e=>Ja(e,hE,lE),nT=e=>Ja(e,fE,Wg),hw=e=>Ja(e,sE,Wg),iT=e=>Ja(e,cE,ZR),Iu=e=>Ja(e,mE,XR),je=e=>oE.test(e),xs=e=>Yr(e,dE),aT=e=>Yr(e,fE),mw=e=>Yr(e,sE),rT=e=>Yr(e,uE),oT=e=>Yr(e,cE),Hu=e=>Yr(e,mE,!0),lT=e=>Yr(e,hE,!0),Ja=(e,t,a)=>{const r=rE.exec(e);return r?r[1]?t(r[1]):a(r[2]):!1},Yr=(e,t,a=!1)=>{const r=oE.exec(e);return r?r[1]?t(r[1]):a:!1},sE=e=>e==="position"||e==="percentage",cE=e=>e==="image"||e==="url",uE=e=>e==="length"||e==="size"||e==="bg-size",dE=e=>e==="length",sT=e=>e==="number",fE=e=>e==="family-name",hE=e=>e==="number"||e==="weight",mE=e=>e==="shadow",cT=()=>{const e=Ft("color"),t=Ft("font"),a=Ft("text"),r=Ft("font-weight"),l=Ft("tracking"),c=Ft("leading"),u=Ft("breakpoint"),m=Ft("container"),p=Ft("spacing"),g=Ft("radius"),b=Ft("shadow"),v=Ft("inset-shadow"),k=Ft("text-shadow"),w=Ft("drop-shadow"),j=Ft("blur"),E=Ft("perspective"),_=Ft("aspect"),C=Ft("ease"),O=Ft("animate"),A=()=>["auto","avoid","all","avoid-page","page","left","right","column"],D=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],R=()=>[...D(),je,_e],F=()=>["auto","hidden","clip","visible","scroll"],L=()=>["auto","contain","none"],T=()=>[je,_e,p],H=()=>[Sa,"full","auto",...T()],ne=()=>[pi,"none","subgrid",je,_e],Y=()=>["auto",{span:["full",pi,je,_e]},pi,je,_e],le=()=>[pi,"auto",je,_e],K=()=>["auto","min","max","fr",je,_e],X=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],ue=()=>["start","end","center","stretch","center-safe","end-safe"],M=()=>["auto",...T()],V=()=>[Sa,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...T()],te=()=>[Sa,"screen","full","dvw","lvw","svw","min","max","fit",...T()],me=()=>[Sa,"screen","full","lh","dvh","lvh","svh","min","max","fit",...T()],Q=()=>[e,je,_e],N=()=>[...D(),mw,hw,{position:[je,_e]}],q=()=>["no-repeat",{repeat:["","x","y","space","round"]}],I=()=>["auto","cover","contain",rT,eT,{size:[je,_e]}],P=()=>[qm,xs,xr],ee=()=>["","none","full",g,je,_e],pe=()=>["",Ke,xs,xr],se=()=>["solid","dashed","dotted","double"],ke=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],z=()=>[Ke,qm,mw,hw],ce=()=>["","none",j,je,_e],ge=()=>["none",Ke,je,_e],Ee=()=>["none",Ke,je,_e],Ue=()=>[Ke,je,_e],Le=()=>[Sa,"full",...T()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[Fi],breakpoint:[Fi],color:[lE],container:[Fi],"drop-shadow":[Fi],ease:["in","out","in-out"],font:[WR],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[Fi],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[Fi],shadow:[Fi],spacing:["px",Ke],text:[Fi],"text-shadow":[Fi],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",Sa,_e,je,_]}],container:["container"],"container-type":[{"@container":["","normal","size",je,_e]}],"container-named":[JR],columns:[{columns:[Ke,_e,je,m]}],"break-after":[{"break-after":A()}],"break-before":[{"break-before":A()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:R()}],overflow:[{overflow:F()}],"overflow-x":[{"overflow-x":F()}],"overflow-y":[{"overflow-y":F()}],overscroll:[{overscroll:L()}],"overscroll-x":[{"overscroll-x":L()}],"overscroll-y":[{"overscroll-y":L()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:H()}],"inset-x":[{"inset-x":H()}],"inset-y":[{"inset-y":H()}],start:[{"inset-s":H(),start:H()}],end:[{"inset-e":H(),end:H()}],"inset-bs":[{"inset-bs":H()}],"inset-be":[{"inset-be":H()}],top:[{top:H()}],right:[{right:H()}],bottom:[{bottom:H()}],left:[{left:H()}],visibility:["visible","invisible","collapse"],z:[{z:[pi,"auto",je,_e]}],basis:[{basis:[Sa,"full","auto",m,...T()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[Ke,Sa,"auto","initial","none",_e]}],grow:[{grow:["",Ke,je,_e]}],shrink:[{shrink:["",Ke,je,_e]}],order:[{order:[pi,"first","last","none",je,_e]}],"grid-cols":[{"grid-cols":ne()}],"col-start-end":[{col:Y()}],"col-start":[{"col-start":le()}],"col-end":[{"col-end":le()}],"grid-rows":[{"grid-rows":ne()}],"row-start-end":[{row:Y()}],"row-start":[{"row-start":le()}],"row-end":[{"row-end":le()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":K()}],"auto-rows":[{"auto-rows":K()}],gap:[{gap:T()}],"gap-x":[{"gap-x":T()}],"gap-y":[{"gap-y":T()}],"justify-content":[{justify:[...X(),"normal"]}],"justify-items":[{"justify-items":[...ue(),"normal"]}],"justify-self":[{"justify-self":["auto",...ue()]}],"align-content":[{content:["normal",...X()]}],"align-items":[{items:[...ue(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...ue(),{baseline:["","last"]}]}],"place-content":[{"place-content":X()}],"place-items":[{"place-items":[...ue(),"baseline"]}],"place-self":[{"place-self":["auto",...ue()]}],p:[{p:T()}],px:[{px:T()}],py:[{py:T()}],ps:[{ps:T()}],pe:[{pe:T()}],pbs:[{pbs:T()}],pbe:[{pbe:T()}],pt:[{pt:T()}],pr:[{pr:T()}],pb:[{pb:T()}],pl:[{pl:T()}],m:[{m:M()}],mx:[{mx:M()}],my:[{my:M()}],ms:[{ms:M()}],me:[{me:M()}],mbs:[{mbs:M()}],mbe:[{mbe:M()}],mt:[{mt:M()}],mr:[{mr:M()}],mb:[{mb:M()}],ml:[{ml:M()}],"space-x":[{"space-x":T()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":T()}],"space-y-reverse":["space-y-reverse"],size:[{size:V()}],"inline-size":[{inline:["auto",...te()]}],"min-inline-size":[{"min-inline":["auto",...te()]}],"max-inline-size":[{"max-inline":["none",...te()]}],"block-size":[{block:["auto",...me()]}],"min-block-size":[{"min-block":["auto",...me()]}],"max-block-size":[{"max-block":["none",...me()]}],w:[{w:[m,"screen",...V()]}],"min-w":[{"min-w":[m,"screen","none",...V()]}],"max-w":[{"max-w":[m,"screen","none","prose",{screen:[u]},...V()]}],h:[{h:["screen","lh",...V()]}],"min-h":[{"min-h":["screen","lh","none",...V()]}],"max-h":[{"max-h":["screen","lh",...V()]}],"font-size":[{text:["base",a,xs,xr]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[r,lT,tT]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",qm,_e]}],"font-family":[{font:[aT,nT,t]}],"font-features":[{"font-features":[_e]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[l,je,_e]}],"line-clamp":[{"line-clamp":[Ke,"none",je,fw]}],leading:[{leading:[c,...T()]}],"list-image":[{"list-image":["none",je,_e]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",je,_e]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:Q()}],"text-color":[{text:Q()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...se(),"wavy"]}],"text-decoration-thickness":[{decoration:[Ke,"from-font","auto",je,xr]}],"text-decoration-color":[{decoration:Q()}],"underline-offset":[{"underline-offset":[Ke,"auto",je,_e]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:T()}],"tab-size":[{tab:[pi,je,_e]}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",je,_e]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",je,_e]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:N()}],"bg-repeat":[{bg:q()}],"bg-size":[{bg:I()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},pi,je,_e],radial:["",je,_e],conic:[pi,je,_e]},oT,iT]}],"bg-color":[{bg:Q()}],"gradient-from-pos":[{from:P()}],"gradient-via-pos":[{via:P()}],"gradient-to-pos":[{to:P()}],"gradient-from":[{from:Q()}],"gradient-via":[{via:Q()}],"gradient-to":[{to:Q()}],rounded:[{rounded:ee()}],"rounded-s":[{"rounded-s":ee()}],"rounded-e":[{"rounded-e":ee()}],"rounded-t":[{"rounded-t":ee()}],"rounded-r":[{"rounded-r":ee()}],"rounded-b":[{"rounded-b":ee()}],"rounded-l":[{"rounded-l":ee()}],"rounded-ss":[{"rounded-ss":ee()}],"rounded-se":[{"rounded-se":ee()}],"rounded-ee":[{"rounded-ee":ee()}],"rounded-es":[{"rounded-es":ee()}],"rounded-tl":[{"rounded-tl":ee()}],"rounded-tr":[{"rounded-tr":ee()}],"rounded-br":[{"rounded-br":ee()}],"rounded-bl":[{"rounded-bl":ee()}],"border-w":[{border:pe()}],"border-w-x":[{"border-x":pe()}],"border-w-y":[{"border-y":pe()}],"border-w-s":[{"border-s":pe()}],"border-w-e":[{"border-e":pe()}],"border-w-bs":[{"border-bs":pe()}],"border-w-be":[{"border-be":pe()}],"border-w-t":[{"border-t":pe()}],"border-w-r":[{"border-r":pe()}],"border-w-b":[{"border-b":pe()}],"border-w-l":[{"border-l":pe()}],"divide-x":[{"divide-x":pe()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":pe()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...se(),"hidden","none"]}],"divide-style":[{divide:[...se(),"hidden","none"]}],"border-color":[{border:Q()}],"border-color-x":[{"border-x":Q()}],"border-color-y":[{"border-y":Q()}],"border-color-s":[{"border-s":Q()}],"border-color-e":[{"border-e":Q()}],"border-color-bs":[{"border-bs":Q()}],"border-color-be":[{"border-be":Q()}],"border-color-t":[{"border-t":Q()}],"border-color-r":[{"border-r":Q()}],"border-color-b":[{"border-b":Q()}],"border-color-l":[{"border-l":Q()}],"divide-color":[{divide:Q()}],"outline-style":[{outline:[...se(),"none","hidden"]}],"outline-offset":[{"outline-offset":[Ke,je,_e]}],"outline-w":[{outline:["",Ke,xs,xr]}],"outline-color":[{outline:Q()}],shadow:[{shadow:["","none",b,Hu,Iu]}],"shadow-color":[{shadow:Q()}],"inset-shadow":[{"inset-shadow":["none",v,Hu,Iu]}],"inset-shadow-color":[{"inset-shadow":Q()}],"ring-w":[{ring:pe()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:Q()}],"ring-offset-w":[{"ring-offset":[Ke,xr]}],"ring-offset-color":[{"ring-offset":Q()}],"inset-ring-w":[{"inset-ring":pe()}],"inset-ring-color":[{"inset-ring":Q()}],"text-shadow":[{"text-shadow":["none",k,Hu,Iu]}],"text-shadow-color":[{"text-shadow":Q()}],opacity:[{opacity:[Ke,je,_e]}],"mix-blend":[{"mix-blend":[...ke(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":ke()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[Ke]}],"mask-image-linear-from-pos":[{"mask-linear-from":z()}],"mask-image-linear-to-pos":[{"mask-linear-to":z()}],"mask-image-linear-from-color":[{"mask-linear-from":Q()}],"mask-image-linear-to-color":[{"mask-linear-to":Q()}],"mask-image-t-from-pos":[{"mask-t-from":z()}],"mask-image-t-to-pos":[{"mask-t-to":z()}],"mask-image-t-from-color":[{"mask-t-from":Q()}],"mask-image-t-to-color":[{"mask-t-to":Q()}],"mask-image-r-from-pos":[{"mask-r-from":z()}],"mask-image-r-to-pos":[{"mask-r-to":z()}],"mask-image-r-from-color":[{"mask-r-from":Q()}],"mask-image-r-to-color":[{"mask-r-to":Q()}],"mask-image-b-from-pos":[{"mask-b-from":z()}],"mask-image-b-to-pos":[{"mask-b-to":z()}],"mask-image-b-from-color":[{"mask-b-from":Q()}],"mask-image-b-to-color":[{"mask-b-to":Q()}],"mask-image-l-from-pos":[{"mask-l-from":z()}],"mask-image-l-to-pos":[{"mask-l-to":z()}],"mask-image-l-from-color":[{"mask-l-from":Q()}],"mask-image-l-to-color":[{"mask-l-to":Q()}],"mask-image-x-from-pos":[{"mask-x-from":z()}],"mask-image-x-to-pos":[{"mask-x-to":z()}],"mask-image-x-from-color":[{"mask-x-from":Q()}],"mask-image-x-to-color":[{"mask-x-to":Q()}],"mask-image-y-from-pos":[{"mask-y-from":z()}],"mask-image-y-to-pos":[{"mask-y-to":z()}],"mask-image-y-from-color":[{"mask-y-from":Q()}],"mask-image-y-to-color":[{"mask-y-to":Q()}],"mask-image-radial":[{"mask-radial":[je,_e]}],"mask-image-radial-from-pos":[{"mask-radial-from":z()}],"mask-image-radial-to-pos":[{"mask-radial-to":z()}],"mask-image-radial-from-color":[{"mask-radial-from":Q()}],"mask-image-radial-to-color":[{"mask-radial-to":Q()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":D()}],"mask-image-conic-pos":[{"mask-conic":[Ke]}],"mask-image-conic-from-pos":[{"mask-conic-from":z()}],"mask-image-conic-to-pos":[{"mask-conic-to":z()}],"mask-image-conic-from-color":[{"mask-conic-from":Q()}],"mask-image-conic-to-color":[{"mask-conic-to":Q()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:N()}],"mask-repeat":[{mask:q()}],"mask-size":[{mask:I()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",je,_e]}],filter:[{filter:["","none",je,_e]}],blur:[{blur:ce()}],brightness:[{brightness:[Ke,je,_e]}],contrast:[{contrast:[Ke,je,_e]}],"drop-shadow":[{"drop-shadow":["","none",w,Hu,Iu]}],"drop-shadow-color":[{"drop-shadow":Q()}],grayscale:[{grayscale:["",Ke,je,_e]}],"hue-rotate":[{"hue-rotate":[Ke,je,_e]}],invert:[{invert:["",Ke,je,_e]}],saturate:[{saturate:[Ke,je,_e]}],sepia:[{sepia:["",Ke,je,_e]}],"backdrop-filter":[{"backdrop-filter":["","none",je,_e]}],"backdrop-blur":[{"backdrop-blur":ce()}],"backdrop-brightness":[{"backdrop-brightness":[Ke,je,_e]}],"backdrop-contrast":[{"backdrop-contrast":[Ke,je,_e]}],"backdrop-grayscale":[{"backdrop-grayscale":["",Ke,je,_e]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[Ke,je,_e]}],"backdrop-invert":[{"backdrop-invert":["",Ke,je,_e]}],"backdrop-opacity":[{"backdrop-opacity":[Ke,je,_e]}],"backdrop-saturate":[{"backdrop-saturate":[Ke,je,_e]}],"backdrop-sepia":[{"backdrop-sepia":["",Ke,je,_e]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":T()}],"border-spacing-x":[{"border-spacing-x":T()}],"border-spacing-y":[{"border-spacing-y":T()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",je,_e]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[Ke,"initial",je,_e]}],ease:[{ease:["linear","initial",C,je,_e]}],delay:[{delay:[Ke,je,_e]}],animate:[{animate:["none",O,je,_e]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[E,je,_e]}],"perspective-origin":[{"perspective-origin":R()}],rotate:[{rotate:ge()}],"rotate-x":[{"rotate-x":ge()}],"rotate-y":[{"rotate-y":ge()}],"rotate-z":[{"rotate-z":ge()}],scale:[{scale:Ee()}],"scale-x":[{"scale-x":Ee()}],"scale-y":[{"scale-y":Ee()}],"scale-z":[{"scale-z":Ee()}],"scale-3d":["scale-3d"],skew:[{skew:Ue()}],"skew-x":[{"skew-x":Ue()}],"skew-y":[{"skew-y":Ue()}],transform:[{transform:[je,_e,"","none","gpu","cpu"]}],"transform-origin":[{origin:R()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:Le()}],"translate-x":[{"translate-x":Le()}],"translate-y":[{"translate-y":Le()}],"translate-z":[{"translate-z":Le()}],"translate-none":["translate-none"],zoom:[{zoom:[pi,je,_e]}],accent:[{accent:Q()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:Q()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",je,_e]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scrollbar-thumb-color":[{"scrollbar-thumb":Q()}],"scrollbar-track-color":[{"scrollbar-track":Q()}],"scrollbar-gutter":[{"scrollbar-gutter":["auto","stable","both"]}],"scrollbar-w":[{scrollbar:["auto","thin","none"]}],"scroll-m":[{"scroll-m":T()}],"scroll-mx":[{"scroll-mx":T()}],"scroll-my":[{"scroll-my":T()}],"scroll-ms":[{"scroll-ms":T()}],"scroll-me":[{"scroll-me":T()}],"scroll-mbs":[{"scroll-mbs":T()}],"scroll-mbe":[{"scroll-mbe":T()}],"scroll-mt":[{"scroll-mt":T()}],"scroll-mr":[{"scroll-mr":T()}],"scroll-mb":[{"scroll-mb":T()}],"scroll-ml":[{"scroll-ml":T()}],"scroll-p":[{"scroll-p":T()}],"scroll-px":[{"scroll-px":T()}],"scroll-py":[{"scroll-py":T()}],"scroll-ps":[{"scroll-ps":T()}],"scroll-pe":[{"scroll-pe":T()}],"scroll-pbs":[{"scroll-pbs":T()}],"scroll-pbe":[{"scroll-pbe":T()}],"scroll-pt":[{"scroll-pt":T()}],"scroll-pr":[{"scroll-pr":T()}],"scroll-pb":[{"scroll-pb":T()}],"scroll-pl":[{"scroll-pl":T()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",je,_e]}],fill:[{fill:["none",...Q()]}],"stroke-w":[{stroke:[Ke,xs,xr,fw]}],stroke:[{stroke:["none",...Q()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{"container-named":["container-type"],overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","inset-bs","inset-be","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pbs","pbe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mbs","mbe","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-bs","border-w-be","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-bs","border-color-be","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mbs","scroll-mbe","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pbs","scroll-pbe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},postfixLookupClassGroups:["container-type"],orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}},Jg=BR(cT);function pw(...e){return Jg(Xg(e))}function uT({view:e,onChange:t,className:a}){const r=(l,c,u)=>d.jsx("button",{type:"button","aria-label":c,"aria-pressed":e===l,onClick:()=>t(l),className:pw("flex h-7 w-8 items-center justify-center rounded-[6px] transition-[background,color] duration-[120ms]",e===l?"bg-white text-ink shadow-sm":"text-white/85 hover:text-white"),children:d.jsx("svg",{viewBox:"0 0 24 24",className:"h-4 w-4",fill:"none",stroke:"currentColor",strokeWidth:"1.8",children:d.jsx("path",{d:u})})});return d.jsxs("div",{className:pw("inline-flex gap-0.5 rounded-[8px] bg-[rgba(15,18,9,0.55)] p-0.5 backdrop-blur",a),children:[r("desktop","Desktop crop","M3 5h18v11H3zM8 20h8M12 16v4"),r("mobile","Mobile crop","M8 3h8a1 1 0 0 1 1 1v16a1 1 0 0 1-1 1H8a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1zM11 18h2")]})}const dT=(e,t)=>{const a=r=>Math.round(r*1e4)/1e4;return a(e.nx)===a(t.nx)&&a(e.ny)===a(t.ny)&&a(e.nw)===a(t.nw)&&a(e.nh)===a(t.nh)};function ey({chrome:e,open:t=!0,src:a,mode:r,aspect:l,mobileAspect:c,seed:u,mobileSeed:m,onApply:p,onClose:g,title:b="Crop photo",subtitle:v,variant:k="crop",stageClassName:w="h-[412px]"}){const[j]=x.useState(a),E=c!=null&&Math.abs(c-l)>1e-4,[_,C]=x.useState("desktop"),[O,A]=x.useState({desktop:(u==null?void 0:u.rect)??null,mobile:(m==null?void 0:m.rect)??null}),D=x.useRef(!(m!=null&&m.rect)),R=x.useRef(null),F=X=>X==="mobile"?c??l:l,L=()=>{var X;return((X=R.current)==null?void 0:X.natAspect())??l},T=X=>!(u!=null&&u.rect)&&(X===null||dT(X,hd(r,L(),l))),H=X=>({rect:X==="desktop"?O.desktop:O.mobile}),ne=()=>{var X;return((X=R.current)==null?void 0:X.cropValue())??null},Y=X=>{if(X===_)return;const ue=ne();A(M=>{const V={...M,[_]:ue??M[_]};if(_==="desktop"&&D.current){const te=V.desktop??ue;V.mobile=te&&!T(te)?sw(te,c??l,L()):null}return V}),C(X)},le=()=>{_==="mobile"&&(D.current=!1)},K=()=>{const X=ne(),ue=L(),M=(_==="desktop"?X:O.desktop)??X??{nx:0,ny:0,nw:1,nh:1};let V={rect:M,ar:ue};if(E){let te=_==="mobile"?X:O.mobile;te||(te=T(M)?hd(r,ue,c??l):sw(M,c??l,ue)),V={...V,mobile:{rect:te,derived:D.current}}}p(V)};return d.jsxs(e.Shell,{open:t,variant:k,onClose:g,children:[d.jsxs("div",{className:e.head,children:[d.jsxs("div",{className:e.titles,children:[d.jsx("h2",{className:e.title,children:b}),v?d.jsx("span",{className:e.subtitle,children:v}):null]}),d.jsx("button",{className:e.close,onClick:g,"aria-label":"Close",children:d.jsx(e.CloseIcon,{})})]}),d.jsxs("div",{className:"relative",children:[E&&d.jsx(uT,{view:_,onChange:Y,className:"absolute right-3 top-3 z-10"}),d.jsx(vR,{ref:R,chrome:e,src:j,mode:r,aspect:F(_),seed:H(_),stageClassName:w,onUserEdit:le,footerActions:d.jsxs(d.Fragment,{children:[d.jsx("button",{className:e.buttonGhost,onClick:g,children:"Cancel"}),d.jsx("button",{className:e.buttonPrimary,onClick:K,children:"Apply crop"})]})},_)]})]})}const gw=e=>{let t;const a=new Set,r=(g,b)=>{const v=typeof g=="function"?g(t):g;if(!Object.is(v,t)){const k=t;t=b??(typeof v!="object"||v===null)?v:Object.assign({},t,v),a.forEach(w=>w(t,k))}},l=()=>t,m={setState:r,getState:l,getInitialState:()=>p,subscribe:g=>(a.add(g),()=>a.delete(g))},p=t=e(r,l,m);return m},fT=(e=>e?gw(e):gw),hT=e=>e;function mT(e,t=hT){const a=La.useSyncExternalStore(e.subscribe,La.useCallback(()=>t(e.getState()),[e,t]),La.useCallback(()=>t(e.getInitialState()),[e,t]));return La.useDebugValue(a),a}const yw=e=>{const t=fT(e),a=r=>mT(t,r);return Object.assign(a,t),a},pE=(e=>e?yw(e):yw),ty=pE(e=>({noticeByKey:{},notice:(t,a)=>e(r=>r.noticeByKey[t]===a?r:{noticeByKey:{...r.noticeByKey,[t]:a}}),clearNotice:t=>e(a=>{if(!(t in a.noticeByKey))return a;const r={...a.noticeByKey};return delete r[t],{noticeByKey:r}})}));function pT(e){return ty(t=>t.noticeByKey[e])}const gT=12e4;function Fr(e){return`${e.holder}#${e.mediaId}`}const js=pE((e,t)=>({byPlace:{},start:(a,r,l)=>{const c=Fr(a),u={propertyId:r,place:a,crop:l};e(m=>({byPlace:{...m.byPlace,[c]:u}})),setTimeout(()=>{t().byPlace[c]===u&&t().settle(a)},gT)},settle:a=>e(r=>{const l=Fr(a);if(!(l in r.byPlace))return r;const c={...r.byPlace};return delete c[l],{byPlace:c}})})),Xu={dimOpacity:.35,grayscale:.4,transitionMs:120,spinner:{diameter:28,stroke:3,trackColor:"rgba(20,18,13,.18)",headColor:"rgba(20,18,13,.6)",spinDurationMs:800}},gE={opacity:Xu.dimOpacity,filter:`grayscale(${Xu.grayscale})`,transition:`opacity ${Xu.transitionMs}ms`};function yT(){if(typeof document>"u"||document.getElementById("recrop-spin-kf"))return;const e=document.createElement("style");e.id="recrop-spin-kf",e.textContent="@keyframes recrop-spin{to{transform:rotate(360deg)}}",document.head.appendChild(e)}function ny({label:e="Re-cropping…"}={}){yT();const t=Xu.spinner;return d.jsx("div",{"data-recrop-loading":!0,role:"status","aria-label":e,className:"pointer-events-none absolute inset-0 z-[5] grid place-items-center",children:d.jsx("span",{"aria-hidden":!0,style:{width:t.diameter,height:t.diameter,border:`${t.stroke}px solid ${t.trackColor}`,borderTopColor:t.headColor,borderRadius:"50%",animation:`recrop-spin ${t.spinDurationMs}ms linear infinite`}})})}var bl=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},jr,ja,Ho,d2,bT=(d2=class extends bl{constructor(){super();Ne(this,jr);Ne(this,ja);Ne(this,Ho);xe(this,Ho,t=>{if(typeof window<"u"&&window.addEventListener){const a=()=>t();return window.addEventListener("visibilitychange",a,!1),()=>{window.removeEventListener("visibilitychange",a)}}})}onSubscribe(){$(this,ja)||this.setEventListener($(this,Ho))}onUnsubscribe(){var t;this.hasListeners()||((t=$(this,ja))==null||t.call(this),xe(this,ja,void 0))}setEventListener(t){var a;xe(this,Ho,t),(a=$(this,ja))==null||a.call(this),xe(this,ja,t(r=>{typeof r=="boolean"?this.setFocused(r):this.onFocus()}))}setFocused(t){$(this,jr)!==t&&(xe(this,jr,t),this.onFocus())}onFocus(){const t=this.isFocused();this.listeners.forEach(a=>{a(t)})}isFocused(){var t;return typeof $(this,jr)=="boolean"?$(this,jr):((t=globalThis.document)==null?void 0:t.visibilityState)!=="hidden"}},jr=new WeakMap,ja=new WeakMap,Ho=new WeakMap,d2),iy=new bT,vT={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),setInterval:(e,t)=>setInterval(e,t),clearInterval:e=>clearInterval(e)},Oa,cg,f2,xT=(f2=class{constructor(){Ne(this,Oa,vT);Ne(this,cg,!1)}setTimeoutProvider(e){xe(this,Oa,e)}setTimeout(e,t){return $(this,Oa).setTimeout(e,t)}clearTimeout(e){$(this,Oa).clearTimeout(e)}setInterval(e,t){return $(this,Oa).setInterval(e,t)}clearInterval(e){$(this,Oa).clearInterval(e)}},Oa=new WeakMap,cg=new WeakMap,f2),Er=new xT;function wT(e){setTimeout(e,0)}var kT=typeof window>"u"||"Deno"in globalThis;function hn(){}function ST(e,t){return typeof e=="function"?e(t):e}function kp(e){return typeof e=="number"&&e>=0&&e!==1/0}function yE(e,t){return Math.max(e+(t||0)-Date.now(),0)}function $a(e,t){return typeof e=="function"?e(t):e}function Un(e,t){return typeof e=="function"?e(t):e}function bw(e,t){const{type:a="all",exact:r,fetchStatus:l,predicate:c,queryKey:u,stale:m}=e;if(u){if(r){if(t.queryHash!==ay(u,t.options))return!1}else if(!ol(t.queryKey,u))return!1}if(a!=="all"){const p=t.isActive();if(a==="active"&&!p||a==="inactive"&&p)return!1}return!(typeof m=="boolean"&&t.isStale()!==m||l&&l!==t.state.fetchStatus||c&&!c(t))}function vw(e,t){const{exact:a,status:r,predicate:l,mutationKey:c}=e;if(c){if(!t.options.mutationKey)return!1;if(a){if(Is(t.options.mutationKey)!==Is(c))return!1}else if(!ol(t.options.mutationKey,c))return!1}return!(r&&t.state.status!==r||l&&!l(t))}function ay(e,t){return((t==null?void 0:t.queryKeyHashFn)||Is)(e)}function Is(e){return JSON.stringify(e,(t,a)=>Sp(a)?Object.keys(a).sort().reduce((r,l)=>(r[l]=a[l],r),{}):a)}function ol(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(e&&t&&typeof e=="object"&&typeof t=="object"){if(Array.isArray(e)&&Array.isArray(t)){for(let r=0;r<t.length;r++)if(!ol(e[r],t[r]))return!1;return!0}const a=Object.keys(t);for(const r of a)if(!ol(e[r],t[r]))return!1;return!0}return!1}var ET=Object.prototype.hasOwnProperty;function ry(e,t,a=0){if(e===t)return e;if(a>500)return t;const r=xw(e)&&xw(t);if(!r&&!(Sp(e)&&Sp(t)))return t;const c=(r?e:Object.keys(e)).length,u=r?t:Object.keys(t),m=u.length,p=r?new Array(m):{};let g=0;for(let b=0;b<m;b++){const v=r?b:u[b],k=e[v],w=t[v];if(k===w){p[v]=k,(r?b<c:ET.call(e,v))&&g++;continue}if(k===null||w===null||typeof k!="object"||typeof w!="object"){p[v]=w;continue}const j=ry(k,w,a+1);p[v]=j,j===k&&g++}return c===m&&g===c?e:p}function pd(e,t){if(!t||Object.keys(e).length!==Object.keys(t).length)return!1;for(const a in e)if(e[a]!==t[a])return!1;return!0}function xw(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function Sp(e){if(!ww(e))return!1;const t=e.constructor;if(t===void 0)return!0;const a=t.prototype;return!(!ww(a)||!a.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(e)!==Object.prototype)}function ww(e){return Object.prototype.toString.call(e)==="[object Object]"}function _T(e){return new Promise(t=>{Er.setTimeout(t,e)})}function Ep(e,t,a){return typeof a.structuralSharing=="function"?a.structuralSharing(e,t):a.structuralSharing!==!1?ry(e,t):t}function jT(e,t,a=0){const r=[...e,t];return a&&r.length>a?r.slice(1):r}function OT(e,t,a=0){const r=[t,...e];return a&&r.length>a?r.slice(0,-1):r}var oy=Symbol();function bE(e,t){return!e.queryFn&&(t!=null&&t.initialPromise)?()=>t.initialPromise:!e.queryFn||e.queryFn===oy?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function vE(e,t){return typeof e=="function"?e(...t):!!e}function AT(e,t,a){let r=!1,l;return Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(l??(l=t()),r||(r=!0,l.aborted?a():l.addEventListener("abort",a,{once:!0})),l)}),e}var Hs=(()=>{let e=()=>kT;return{isServer(){return e()},setIsServer(t){e=t}}})();function _p(){let e,t;const a=new Promise((l,c)=>{e=l,t=c});a.status="pending",a.catch(()=>{});function r(l){Object.assign(a,l),delete a.resolve,delete a.reject}return a.resolve=l=>{r({status:"fulfilled",value:l}),e(l)},a.reject=l=>{r({status:"rejected",reason:l}),t(l)},a}var NT=wT;function MT(){let e=[],t=0,a=m=>{m()},r=m=>{m()},l=NT;const c=m=>{t?e.push(m):l(()=>{a(m)})},u=()=>{const m=e;e=[],m.length&&l(()=>{r(()=>{m.forEach(p=>{a(p)})})})};return{batch:m=>{let p;t++;try{p=m()}finally{t--,t||u()}return p},batchCalls:m=>(...p)=>{c(()=>{m(...p)})},schedule:c,setNotifyFunction:m=>{a=m},setBatchNotifyFunction:m=>{r=m},setScheduler:m=>{l=m}}}var Ht=MT(),Bo,Aa,qo,h2,CT=(h2=class extends bl{constructor(){super();Ne(this,Bo,!0);Ne(this,Aa);Ne(this,qo);xe(this,qo,t=>{if(typeof window<"u"&&window.addEventListener){const a=()=>t(!0),r=()=>t(!1);return window.addEventListener("online",a,!1),window.addEventListener("offline",r,!1),()=>{window.removeEventListener("online",a),window.removeEventListener("offline",r)}}})}onSubscribe(){$(this,Aa)||this.setEventListener($(this,qo))}onUnsubscribe(){var t;this.hasListeners()||((t=$(this,Aa))==null||t.call(this),xe(this,Aa,void 0))}setEventListener(t){var a;xe(this,qo,t),(a=$(this,Aa))==null||a.call(this),xe(this,Aa,t(this.setOnline.bind(this)))}setOnline(t){$(this,Bo)!==t&&(xe(this,Bo,t),this.listeners.forEach(r=>{r(t)}))}isOnline(){return $(this,Bo)}},Bo=new WeakMap,Aa=new WeakMap,qo=new WeakMap,h2),gd=new CT;function RT(e){return Math.min(1e3*2**e,3e4)}function xE(e){return(e??"online")==="online"?gd.isOnline():!0}var jp=class extends Error{constructor(e){super("CancelledError"),this.revert=e==null?void 0:e.revert,this.silent=e==null?void 0:e.silent}};function wE(e){let t=!1,a=0,r;const l=_p(),c=()=>l.status!=="pending",u=E=>{var _;if(!c()){const C=new jp(E);k(C),(_=e.onCancel)==null||_.call(e,C)}},m=()=>{t=!0},p=()=>{t=!1},g=()=>iy.isFocused()&&(e.networkMode==="always"||gd.isOnline())&&e.canRun(),b=()=>xE(e.networkMode)&&e.canRun(),v=E=>{c()||(r==null||r(),l.resolve(E))},k=E=>{c()||(r==null||r(),l.reject(E))},w=()=>new Promise(E=>{var _;r=C=>{(c()||g())&&E(C)},(_=e.onPause)==null||_.call(e)}).then(()=>{var E;r=void 0,c()||(E=e.onContinue)==null||E.call(e)}),j=()=>{if(c())return;let E;const _=a===0?e.initialPromise:void 0;try{E=_??e.fn()}catch(C){E=Promise.reject(C)}Promise.resolve(E).then(v).catch(C=>{var F;if(c())return;const O=e.retry??(Hs.isServer()?0:3),A=e.retryDelay??RT,D=typeof A=="function"?A(a,C):A,R=O===!0||typeof O=="number"&&a<O||typeof O=="function"&&O(a,C);if(t||!R){k(C);return}a++,(F=e.onFail)==null||F.call(e,a,C),_T(D).then(()=>g()?void 0:w()).then(()=>{t?k(C):j()})})};return{promise:l,status:()=>l.status,cancel:u,continue:()=>(r==null||r(),l),cancelRetry:m,continueRetry:p,canStart:b,start:()=>(b()?j():w().then(j),l)}}var Or,m2,kE=(m2=class{constructor(){Ne(this,Or)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),kp(this.gcTime)&&xe(this,Or,Er.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(Hs.isServer()?1/0:300*1e3))}clearGcTimeout(){$(this,Or)!==void 0&&(Er.clearTimeout($(this,Or)),xe(this,Or,void 0))}},Or=new WeakMap,m2);function TT(e){return{onFetch:(t,a)=>{var b,v,k,w,j;const r=t.options,l=(k=(v=(b=t.fetchOptions)==null?void 0:b.meta)==null?void 0:v.fetchMore)==null?void 0:k.direction,c=((w=t.state.data)==null?void 0:w.pages)||[],u=((j=t.state.data)==null?void 0:j.pageParams)||[];let m={pages:[],pageParams:[]},p=0;const g=async()=>{let E=!1;const _=A=>{AT(A,()=>t.signal,()=>E=!0)},C=bE(t.options,t.fetchOptions),O=async(A,D,R)=>{if(E)return Promise.reject(t.signal.reason);if(D==null&&A.pages.length)return Promise.resolve(A);const L=(()=>{const Y={client:t.client,queryKey:t.queryKey,pageParam:D,direction:R?"backward":"forward",meta:t.options.meta};return _(Y),Y})(),T=await C(L),{maxPages:H}=t.options,ne=R?OT:jT;return{pages:ne(A.pages,T,H),pageParams:ne(A.pageParams,D,H)}};if(l&&c.length){const A=l==="backward",D=A?DT:kw,R={pages:c,pageParams:u},F=D(r,R);m=await O(R,F,A)}else{const A=e??c.length;do{const D=p===0?u[0]??r.initialPageParam:kw(r,m);if(p>0&&D==null)break;m=await O(m,D),p++}while(p<A)}return m};t.options.persister?t.fetchFn=()=>{var E,_;return(_=(E=t.options).persister)==null?void 0:_.call(E,g,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},a)}:t.fetchFn=g}}}function kw(e,{pages:t,pageParams:a}){const r=t.length-1;return t.length>0?e.getNextPageParam(t[r],t,a[r],a):void 0}function DT(e,{pages:t,pageParams:a}){var r;return t.length>0?(r=e.getPreviousPageParam)==null?void 0:r.call(e,t[0],t,a[0],a):void 0}var Fo,Ar,Po,Jn,Nr,Xt,Ys,Mr,$n,SE,Pi,p2,LT=(p2=class extends kE{constructor(t){super();Ne(this,$n);Ne(this,Fo);Ne(this,Ar);Ne(this,Po);Ne(this,Jn);Ne(this,Nr);Ne(this,Xt);Ne(this,Ys);Ne(this,Mr);xe(this,Mr,!1),xe(this,Ys,t.defaultOptions),this.setOptions(t.options),this.observers=[],xe(this,Nr,t.client),xe(this,Jn,$(this,Nr).getQueryCache()),this.queryKey=t.queryKey,this.queryHash=t.queryHash,xe(this,Ar,Ew(this.options)),this.state=t.state??$(this,Ar),this.scheduleGc()}get meta(){return this.options.meta}get queryType(){return $(this,Fo)}get promise(){var t;return(t=$(this,Xt))==null?void 0:t.promise}setOptions(t){if(this.options={...$(this,Ys),...t},t!=null&&t._type&&xe(this,Fo,t._type),this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const a=Ew(this.options);a.data!==void 0&&(this.setState(Sw(a.data,a.dataUpdatedAt)),xe(this,Ar,a))}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&$(this,Jn).remove(this)}setData(t,a){const r=Ep(this.state.data,t,this.options);return He(this,$n,Pi).call(this,{data:r,type:"success",dataUpdatedAt:a==null?void 0:a.updatedAt,manual:a==null?void 0:a.manual}),r}setState(t){He(this,$n,Pi).call(this,{type:"setState",state:t})}cancel(t){var r,l;const a=(r=$(this,Xt))==null?void 0:r.promise;return(l=$(this,Xt))==null||l.cancel(t),a?a.then(hn).catch(hn):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}get resetState(){return $(this,Ar)}reset(){this.destroy(),this.setState(this.resetState)}isActive(){return this.observers.some(t=>Un(t.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===oy||!this.isFetched()}isFetched(){return this.state.dataUpdateCount+this.state.errorUpdateCount>0}isStatic(){return this.getObserversCount()>0?this.observers.some(t=>$a(t.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(t=>t.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(t=0){return this.state.data===void 0?!0:t==="static"?!1:this.state.isInvalidated?!0:!yE(this.state.dataUpdatedAt,t)}onFocus(){var a;const t=this.observers.find(r=>r.shouldFetchOnWindowFocus());t==null||t.refetch({cancelRefetch:!1}),(a=$(this,Xt))==null||a.continue()}onOnline(){var a;const t=this.observers.find(r=>r.shouldFetchOnReconnect());t==null||t.refetch({cancelRefetch:!1}),(a=$(this,Xt))==null||a.continue()}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),$(this,Jn).notify({type:"observerAdded",query:this,observer:t}))}removeObserver(t){this.observers.includes(t)&&(this.observers=this.observers.filter(a=>a!==t),this.observers.length||($(this,Xt)&&($(this,Mr)||He(this,$n,SE).call(this)?$(this,Xt).cancel({revert:!0}):$(this,Xt).cancelRetry()),this.scheduleGc()),$(this,Jn).notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||He(this,$n,Pi).call(this,{type:"invalidate"})}async fetch(t,a){var g,b,v,k,w,j,E,_,C,O,A;if(this.state.fetchStatus!=="idle"&&((g=$(this,Xt))==null?void 0:g.status())!=="rejected"){if(this.state.data!==void 0&&(a!=null&&a.cancelRefetch))this.cancel({silent:!0});else if($(this,Xt))return $(this,Xt).continueRetry(),$(this,Xt).promise}if(t&&this.setOptions(t),!this.options.queryFn){const D=this.observers.find(R=>R.options.queryFn);D&&this.setOptions(D.options)}const r=new AbortController,l=D=>{Object.defineProperty(D,"signal",{enumerable:!0,get:()=>(xe(this,Mr,!0),r.signal)})},c=()=>{const D=bE(this.options,a),F=(()=>{const L={client:$(this,Nr),queryKey:this.queryKey,meta:this.meta};return l(L),L})();return xe(this,Mr,!1),this.options.persister?this.options.persister(D,F,this):D(F)},m=(()=>{const D={fetchOptions:a,options:this.options,queryKey:this.queryKey,client:$(this,Nr),state:this.state,fetchFn:c};return l(D),D})(),p=$(this,Fo)==="infinite"?TT(this.options.pages):this.options.behavior;p==null||p.onFetch(m,this),xe(this,Po,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((b=m.fetchOptions)==null?void 0:b.meta))&&He(this,$n,Pi).call(this,{type:"fetch",meta:(v=m.fetchOptions)==null?void 0:v.meta}),xe(this,Xt,wE({initialPromise:a==null?void 0:a.initialPromise,fn:m.fetchFn,onCancel:D=>{D instanceof jp&&D.revert&&this.setState({...$(this,Po),fetchStatus:"idle"}),r.abort()},onFail:(D,R)=>{He(this,$n,Pi).call(this,{type:"failed",failureCount:D,error:R})},onPause:()=>{He(this,$n,Pi).call(this,{type:"pause"})},onContinue:()=>{He(this,$n,Pi).call(this,{type:"continue"})},retry:m.options.retry,retryDelay:m.options.retryDelay,networkMode:m.options.networkMode,canRun:()=>!0}));try{const D=await $(this,Xt).start();if(D===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(D),(w=(k=$(this,Jn).config).onSuccess)==null||w.call(k,D,this),(E=(j=$(this,Jn).config).onSettled)==null||E.call(j,D,this.state.error,this),D}catch(D){if(D instanceof jp){if(D.silent)return $(this,Xt).promise;if(D.revert){if(this.state.data===void 0)throw D;return this.state.data}}throw He(this,$n,Pi).call(this,{type:"error",error:D}),(C=(_=$(this,Jn).config).onError)==null||C.call(_,D,this),(A=(O=$(this,Jn).config).onSettled)==null||A.call(O,this.state.data,D,this),D}finally{this.scheduleGc()}}},Fo=new WeakMap,Ar=new WeakMap,Po=new WeakMap,Jn=new WeakMap,Nr=new WeakMap,Xt=new WeakMap,Ys=new WeakMap,Mr=new WeakMap,$n=new WeakSet,SE=function(){return this.state.fetchStatus==="paused"&&this.state.status==="pending"},Pi=function(t){const a=r=>{switch(t.type){case"failed":return{...r,fetchFailureCount:t.failureCount,fetchFailureReason:t.error};case"pause":return{...r,fetchStatus:"paused"};case"continue":return{...r,fetchStatus:"fetching"};case"fetch":return{...r,...EE(r.data,this.options),fetchMeta:t.meta??null};case"success":const l={...r,...Sw(t.data,t.dataUpdatedAt),dataUpdateCount:r.dataUpdateCount+1,...!t.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return xe(this,Po,t.manual?l:void 0),l;case"error":const c=t.error;return{...r,error:c,errorUpdateCount:r.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:r.fetchFailureCount+1,fetchFailureReason:c,fetchStatus:"idle",status:"error",isInvalidated:!0};case"invalidate":return{...r,isInvalidated:!0};case"setState":return{...r,...t.state}}};this.state=a(this.state),Ht.batch(()=>{this.observers.forEach(r=>{r.onQueryUpdate()}),$(this,Jn).notify({query:this,type:"updated",action:t})})},p2);function EE(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:xE(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function Sw(e,t){return{data:e,dataUpdatedAt:t??Date.now(),error:null,isInvalidated:!1,status:"success"}}function Ew(e){const t=typeof e.initialData=="function"?e.initialData():e.initialData,a=t!==void 0,r=a?typeof e.initialDataUpdatedAt=="function"?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:a?r??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:a?"success":"pending",fetchStatus:"idle"}}var Sn,tt,Qs,fn,Cr,Vo,Vi,Na,Xs,Go,Ko,Rr,Tr,Ma,Yo,ct,Os,Op,Ap,Np,Mp,Cp,Rp,Tp,_E,g2,ly=(g2=class extends bl{constructor(t,a){super();Ne(this,ct);Ne(this,Sn);Ne(this,tt);Ne(this,Qs);Ne(this,fn);Ne(this,Cr);Ne(this,Vo);Ne(this,Vi);Ne(this,Na);Ne(this,Xs);Ne(this,Go);Ne(this,Ko);Ne(this,Rr);Ne(this,Tr);Ne(this,Ma);Ne(this,Yo,new Set);this.options=a,xe(this,Sn,t),xe(this,Na,null),xe(this,Vi,_p()),this.bindMethods(),this.setOptions(a)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&($(this,tt).addObserver(this),_w($(this,tt),this.options)?He(this,ct,Os).call(this):this.updateResult(),He(this,ct,Mp).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return Dp($(this,tt),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return Dp($(this,tt),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,He(this,ct,Cp).call(this),He(this,ct,Rp).call(this),$(this,tt).removeObserver(this)}setOptions(t){const a=this.options,r=$(this,tt);if(this.options=$(this,Sn).defaultQueryOptions(t),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof Un(this.options.enabled,$(this,tt))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");He(this,ct,Tp).call(this),$(this,tt).setOptions(this.options),a._defaulted&&!pd(this.options,a)&&$(this,Sn).getQueryCache().notify({type:"observerOptionsUpdated",query:$(this,tt),observer:this});const l=this.hasListeners();l&&jw($(this,tt),r,this.options,a)&&He(this,ct,Os).call(this),this.updateResult(),l&&($(this,tt)!==r||Un(this.options.enabled,$(this,tt))!==Un(a.enabled,$(this,tt))||$a(this.options.staleTime,$(this,tt))!==$a(a.staleTime,$(this,tt)))&&He(this,ct,Op).call(this);const c=He(this,ct,Ap).call(this);l&&($(this,tt)!==r||Un(this.options.enabled,$(this,tt))!==Un(a.enabled,$(this,tt))||c!==$(this,Ma))&&He(this,ct,Np).call(this,c)}getOptimisticResult(t){const a=$(this,Sn).getQueryCache().build($(this,Sn),t),r=this.createResult(a,t);return $T(this,r)&&(xe(this,fn,r),xe(this,Vo,this.options),xe(this,Cr,$(this,tt).state)),r}getCurrentResult(){return $(this,fn)}trackResult(t,a){return new Proxy(t,{get:(r,l)=>(this.trackProp(l),a==null||a(l),l==="promise"&&(this.trackProp("data"),!this.options.experimental_prefetchInRender&&$(this,Vi).status==="pending"&&$(this,Vi).reject(new Error("experimental_prefetchInRender feature flag is not enabled"))),Reflect.get(r,l))})}trackProp(t){$(this,Yo).add(t)}getCurrentQuery(){return $(this,tt)}refetch({...t}={}){return this.fetch({...t})}fetchOptimistic(t){const a=$(this,Sn).defaultQueryOptions(t),r=$(this,Sn).getQueryCache().build($(this,Sn),a);return r.fetch().then(()=>this.createResult(r,a))}fetch(t){return He(this,ct,Os).call(this,{...t,cancelRefetch:t.cancelRefetch??!0}).then(()=>(this.updateResult(),$(this,fn)))}createResult(t,a){var H;const r=$(this,tt),l=this.options,c=$(this,fn),u=$(this,Cr),m=$(this,Vo),g=t!==r?t.state:$(this,Qs),{state:b}=t;let v={...b},k=!1,w;if(a._optimisticResults){const ne=this.hasListeners(),Y=!ne&&_w(t,a),le=ne&&jw(t,r,a,l);(Y||le)&&(v={...v,...EE(b.data,t.options)}),a._optimisticResults==="isRestoring"&&(v.fetchStatus="idle")}let{error:j,errorUpdatedAt:E,status:_}=v;w=v.data;let C=!1;if(a.placeholderData!==void 0&&w===void 0&&_==="pending"){let ne;c!=null&&c.isPlaceholderData&&a.placeholderData===(m==null?void 0:m.placeholderData)?(ne=c.data,C=!0):ne=typeof a.placeholderData=="function"?a.placeholderData((H=$(this,Ko))==null?void 0:H.state.data,$(this,Ko)):a.placeholderData,ne!==void 0&&(_="success",w=Ep(c==null?void 0:c.data,ne,a),k=!0)}if(a.select&&w!==void 0&&!C)if(c&&w===(u==null?void 0:u.data)&&a.select===$(this,Xs))w=$(this,Go);else try{xe(this,Xs,a.select),w=a.select(w),w=Ep(c==null?void 0:c.data,w,a),xe(this,Go,w),xe(this,Na,null)}catch(ne){xe(this,Na,ne)}$(this,Na)&&(j=$(this,Na),w=$(this,Go),E=Date.now(),_="error");const O=v.fetchStatus==="fetching",A=_==="pending",D=_==="error",R=A&&O,F=w!==void 0,T={status:_,fetchStatus:v.fetchStatus,isPending:A,isSuccess:_==="success",isError:D,isInitialLoading:R,isLoading:R,data:w,dataUpdatedAt:v.dataUpdatedAt,error:j,errorUpdatedAt:E,failureCount:v.fetchFailureCount,failureReason:v.fetchFailureReason,errorUpdateCount:v.errorUpdateCount,isFetched:t.isFetched(),isFetchedAfterMount:v.dataUpdateCount>g.dataUpdateCount||v.errorUpdateCount>g.errorUpdateCount,isFetching:O,isRefetching:O&&!A,isLoadingError:D&&!F,isPaused:v.fetchStatus==="paused",isPlaceholderData:k,isRefetchError:D&&F,isStale:sy(t,a),refetch:this.refetch,promise:$(this,Vi),isEnabled:Un(a.enabled,t)!==!1};if(this.options.experimental_prefetchInRender){const ne=T.data!==void 0,Y=T.status==="error"&&!ne,le=ue=>{Y?ue.reject(T.error):ne&&ue.resolve(T.data)},K=()=>{const ue=xe(this,Vi,T.promise=_p());le(ue)},X=$(this,Vi);switch(X.status){case"pending":t.queryHash===r.queryHash&&le(X);break;case"fulfilled":(Y||T.data!==X.value)&&K();break;case"rejected":(!Y||T.error!==X.reason)&&K();break}}return T}updateResult(){const t=$(this,fn),a=this.createResult($(this,tt),this.options);if(xe(this,Cr,$(this,tt).state),xe(this,Vo,this.options),$(this,Cr).data!==void 0&&xe(this,Ko,$(this,tt)),pd(a,t))return;xe(this,fn,a);const r=()=>{if(!t)return!0;const{notifyOnChangeProps:l}=this.options,c=typeof l=="function"?l():l;if(c==="all"||!c&&!$(this,Yo).size)return!0;const u=new Set(c??$(this,Yo));return this.options.throwOnError&&u.add("error"),Object.keys($(this,fn)).some(m=>{const p=m;return $(this,fn)[p]!==t[p]&&u.has(p)})};He(this,ct,_E).call(this,{listeners:r()})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&He(this,ct,Mp).call(this)}},Sn=new WeakMap,tt=new WeakMap,Qs=new WeakMap,fn=new WeakMap,Cr=new WeakMap,Vo=new WeakMap,Vi=new WeakMap,Na=new WeakMap,Xs=new WeakMap,Go=new WeakMap,Ko=new WeakMap,Rr=new WeakMap,Tr=new WeakMap,Ma=new WeakMap,Yo=new WeakMap,ct=new WeakSet,Os=function(t){He(this,ct,Tp).call(this);let a=$(this,tt).fetch(this.options,t);return t!=null&&t.throwOnError||(a=a.catch(hn)),a},Op=function(){He(this,ct,Cp).call(this);const t=$a(this.options.staleTime,$(this,tt));if(Hs.isServer()||$(this,fn).isStale||!kp(t))return;const r=yE($(this,fn).dataUpdatedAt,t)+1;xe(this,Rr,Er.setTimeout(()=>{$(this,fn).isStale||this.updateResult()},r))},Ap=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval($(this,tt)):this.options.refetchInterval)??!1},Np=function(t){He(this,ct,Rp).call(this),xe(this,Ma,t),!(Hs.isServer()||Un(this.options.enabled,$(this,tt))===!1||!kp($(this,Ma))||$(this,Ma)===0)&&xe(this,Tr,Er.setInterval(()=>{(this.options.refetchIntervalInBackground||iy.isFocused())&&He(this,ct,Os).call(this)},$(this,Ma)))},Mp=function(){He(this,ct,Op).call(this),He(this,ct,Np).call(this,He(this,ct,Ap).call(this))},Cp=function(){$(this,Rr)!==void 0&&(Er.clearTimeout($(this,Rr)),xe(this,Rr,void 0))},Rp=function(){$(this,Tr)!==void 0&&(Er.clearInterval($(this,Tr)),xe(this,Tr,void 0))},Tp=function(){const t=$(this,Sn).getQueryCache().build($(this,Sn),this.options);if(t===$(this,tt))return;const a=$(this,tt);xe(this,tt,t),xe(this,Qs,t.state),this.hasListeners()&&(a==null||a.removeObserver(this),t.addObserver(this))},_E=function(t){Ht.batch(()=>{t.listeners&&this.listeners.forEach(a=>{a($(this,fn))}),$(this,Sn).getQueryCache().notify({query:$(this,tt),type:"observerResultsUpdated"})})},g2);function zT(e,t){return Un(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&Un(t.retryOnMount,e)===!1)}function _w(e,t){return zT(e,t)||e.state.data!==void 0&&Dp(e,t,t.refetchOnMount)}function Dp(e,t,a){if(Un(t.enabled,e)!==!1&&$a(t.staleTime,e)!=="static"){const r=typeof a=="function"?a(e):a;return r==="always"||r!==!1&&sy(e,t)}return!1}function jw(e,t,a,r){return(e!==t||Un(r.enabled,e)===!1)&&(!a.suspense||e.state.status!=="error")&&sy(e,a)}function sy(e,t){return Un(t.enabled,e)!==!1&&e.isStaleByTime($a(t.staleTime,e))}function $T(e,t){return!pd(e.getCurrentResult(),t)}var Zs,yi,sn,Dr,bi,Ea,y2,UT=(y2=class extends kE{constructor(t){super();Ne(this,bi);Ne(this,Zs);Ne(this,yi);Ne(this,sn);Ne(this,Dr);xe(this,Zs,t.client),this.mutationId=t.mutationId,xe(this,sn,t.mutationCache),xe(this,yi,[]),this.state=t.state||IT(),this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options=t,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(t){$(this,yi).includes(t)||($(this,yi).push(t),this.clearGcTimeout(),$(this,sn).notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){xe(this,yi,$(this,yi).filter(a=>a!==t)),this.scheduleGc(),$(this,sn).notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){$(this,yi).length||(this.state.status==="pending"?this.scheduleGc():$(this,sn).remove(this))}continue(){var t;return((t=$(this,Dr))==null?void 0:t.continue())??this.execute(this.state.variables)}async execute(t){var u,m,p,g,b,v,k,w,j,E,_,C,O,A,D,R,F,L;const a=()=>{He(this,bi,Ea).call(this,{type:"continue"})},r={client:$(this,Zs),meta:this.options.meta,mutationKey:this.options.mutationKey};xe(this,Dr,wE({fn:()=>this.options.mutationFn?this.options.mutationFn(t,r):Promise.reject(new Error("No mutationFn found")),onFail:(T,H)=>{He(this,bi,Ea).call(this,{type:"failed",failureCount:T,error:H})},onPause:()=>{He(this,bi,Ea).call(this,{type:"pause"})},onContinue:a,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>$(this,sn).canRun(this)}));const l=this.state.status==="pending",c=!$(this,Dr).canStart();try{if(l)a();else{He(this,bi,Ea).call(this,{type:"pending",variables:t,isPaused:c}),$(this,sn).config.onMutate&&await $(this,sn).config.onMutate(t,this,r);const H=await((m=(u=this.options).onMutate)==null?void 0:m.call(u,t,r));H!==this.state.context&&He(this,bi,Ea).call(this,{type:"pending",context:H,variables:t,isPaused:c})}const T=await $(this,Dr).start();return await((g=(p=$(this,sn).config).onSuccess)==null?void 0:g.call(p,T,t,this.state.context,this,r)),await((v=(b=this.options).onSuccess)==null?void 0:v.call(b,T,t,this.state.context,r)),await((w=(k=$(this,sn).config).onSettled)==null?void 0:w.call(k,T,null,this.state.variables,this.state.context,this,r)),await((E=(j=this.options).onSettled)==null?void 0:E.call(j,T,null,t,this.state.context,r)),He(this,bi,Ea).call(this,{type:"success",data:T}),T}catch(T){try{await((C=(_=$(this,sn).config).onError)==null?void 0:C.call(_,T,t,this.state.context,this,r))}catch(H){Promise.reject(H)}try{await((A=(O=this.options).onError)==null?void 0:A.call(O,T,t,this.state.context,r))}catch(H){Promise.reject(H)}try{await((R=(D=$(this,sn).config).onSettled)==null?void 0:R.call(D,void 0,T,this.state.variables,this.state.context,this,r))}catch(H){Promise.reject(H)}try{await((L=(F=this.options).onSettled)==null?void 0:L.call(F,void 0,T,t,this.state.context,r))}catch(H){Promise.reject(H)}throw He(this,bi,Ea).call(this,{type:"error",error:T}),T}finally{$(this,sn).runNext(this)}}},Zs=new WeakMap,yi=new WeakMap,sn=new WeakMap,Dr=new WeakMap,bi=new WeakSet,Ea=function(t){const a=r=>{switch(t.type){case"failed":return{...r,failureCount:t.failureCount,failureReason:t.error};case"pause":return{...r,isPaused:!0};case"continue":return{...r,isPaused:!1};case"pending":return{...r,context:t.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:t.isPaused,status:"pending",variables:t.variables,submittedAt:Date.now()};case"success":return{...r,data:t.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...r,data:void 0,error:t.error,failureCount:r.failureCount+1,failureReason:t.error,isPaused:!1,status:"error"}}};this.state=a(this.state),Ht.batch(()=>{$(this,yi).forEach(r=>{r.onMutationUpdate(t)}),$(this,sn).notify({mutation:this,type:"updated",action:t})})},y2);function IT(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var Gi,oi,Ws,b2,HT=(b2=class extends bl{constructor(t={}){super();Ne(this,Gi);Ne(this,oi);Ne(this,Ws);this.config=t,xe(this,Gi,new Set),xe(this,oi,new Map),xe(this,Ws,0)}build(t,a,r){const l=new UT({client:t,mutationCache:this,mutationId:++Lu(this,Ws)._,options:t.defaultMutationOptions(a),state:r});return this.add(l),l}add(t){$(this,Gi).add(t);const a=Bu(t);if(typeof a=="string"){const r=$(this,oi).get(a);r?r.push(t):$(this,oi).set(a,[t])}this.notify({type:"added",mutation:t})}remove(t){if($(this,Gi).delete(t)){const a=Bu(t);if(typeof a=="string"){const r=$(this,oi).get(a);if(r)if(r.length>1){const l=r.indexOf(t);l!==-1&&r.splice(l,1)}else r[0]===t&&$(this,oi).delete(a)}}this.notify({type:"removed",mutation:t})}canRun(t){const a=Bu(t);if(typeof a=="string"){const r=$(this,oi).get(a),l=r==null?void 0:r.find(c=>c.state.status==="pending");return!l||l===t}else return!0}runNext(t){var r;const a=Bu(t);if(typeof a=="string"){const l=(r=$(this,oi).get(a))==null?void 0:r.find(c=>c!==t&&c.state.isPaused);return(l==null?void 0:l.continue())??Promise.resolve()}else return Promise.resolve()}clear(){Ht.batch(()=>{$(this,Gi).forEach(t=>{this.notify({type:"removed",mutation:t})}),$(this,Gi).clear(),$(this,oi).clear()})}getAll(){return Array.from($(this,Gi))}find(t){const a={exact:!0,...t};return this.getAll().find(r=>vw(a,r))}findAll(t={}){return this.getAll().filter(a=>vw(t,a))}notify(t){Ht.batch(()=>{this.listeners.forEach(a=>{a(t)})})}resumePausedMutations(){const t=this.getAll().filter(a=>a.state.isPaused);return Ht.batch(()=>Promise.all(t.map(a=>a.continue().catch(hn))))}},Gi=new WeakMap,oi=new WeakMap,Ws=new WeakMap,b2);function Bu(e){var t;return(t=e.options.scope)==null?void 0:t.id}function Ow(e,t){const a=new Set(t);return e.filter(r=>!a.has(r))}function BT(e,t,a){const r=e.slice(0);return r[t]=a,r}var Qo,En,Xo,Lr,zn,Ca,Js,ec,tc,nc,Pt,Lp,zp,jE,$p,Up,Ip,v2,qT=(v2=class extends bl{constructor(t,a,r){super();Ne(this,Pt);Ne(this,Qo);Ne(this,En);Ne(this,Xo);Ne(this,Lr);Ne(this,zn);Ne(this,Ca);Ne(this,Js);Ne(this,ec);Ne(this,tc);Ne(this,nc,[]);xe(this,Qo,t),xe(this,Lr,r),xe(this,Xo,[]),xe(this,zn,[]),xe(this,En,[]),this.setQueries(a)}onSubscribe(){this.listeners.size===1&&$(this,zn).forEach(t=>{t.subscribe(a=>{He(this,Pt,Up).call(this,t,a)})})}onUnsubscribe(){this.listeners.size||this.destroy()}destroy(){this.listeners=new Set,$(this,zn).forEach(t=>{t.destroy()})}setQueries(t,a){xe(this,Xo,t),xe(this,Lr,a),Ht.batch(()=>{const r=$(this,zn),l=He(this,Pt,$p).call(this,$(this,Xo));l.forEach(v=>v.observer.setOptions(v.defaultedQueryOptions));const c=l.map(v=>v.observer),u=c.map(v=>v.getCurrentResult()),m=r.length!==c.length,p=c.some((v,k)=>v!==r[k]),g=m||p,b=g?!0:u.some((v,k)=>{const w=$(this,En)[k];return!w||!pd(v,w)});!g&&!b||(g&&(xe(this,nc,l),xe(this,zn,c)),xe(this,En,u),this.hasListeners()&&(g&&(Ow(r,c).forEach(v=>{v.destroy()}),Ow(c,r).forEach(v=>{v.subscribe(k=>{He(this,Pt,Up).call(this,v,k)})})),He(this,Pt,Ip).call(this)))})}getCurrentResult(){return $(this,En)}getQueries(){return $(this,zn).map(t=>t.getCurrentQuery())}getObservers(){return $(this,zn)}getOptimisticResult(t,a){const r=He(this,Pt,$p).call(this,t),l=r.map(u=>u.observer.getOptimisticResult(u.defaultedQueryOptions)),c=r.map(u=>u.defaultedQueryOptions.queryHash);return[l,u=>He(this,Pt,zp).call(this,u??l,a,c),()=>He(this,Pt,Lp).call(this,l,r)]}},Qo=new WeakMap,En=new WeakMap,Xo=new WeakMap,Lr=new WeakMap,zn=new WeakMap,Ca=new WeakMap,Js=new WeakMap,ec=new WeakMap,tc=new WeakMap,nc=new WeakMap,Pt=new WeakSet,Lp=function(t,a){return a.map((r,l)=>{const c=t[l];return r.defaultedQueryOptions.notifyOnChangeProps?c:r.observer.trackResult(c,u=>{a.forEach(m=>{m.observer.trackProp(u)})})})},zp=function(t,a,r){if(a){const l=$(this,tc),c=r!==void 0&&l!==void 0&&(l.length!==r.length||r.some((u,m)=>u!==l[m]));return(!$(this,Ca)||$(this,En)!==$(this,ec)||c||a!==$(this,Js))&&(xe(this,Js,a),xe(this,ec,$(this,En)),r!==void 0&&xe(this,tc,r),xe(this,Ca,ry($(this,Ca),a(t)))),$(this,Ca)}return t},jE=function(){var t;return((t=$(this,Lr))==null?void 0:t.combine)!==void 0&&$(this,zn).some((a,r)=>{var l;return a.options.suspense&&((l=$(this,En)[r])==null?void 0:l.data)===void 0})},$p=function(t){const a=new Map;$(this,zn).forEach(l=>{const c=l.options.queryHash;if(!c)return;const u=a.get(c);u?u.push(l):a.set(c,[l])});const r=[];return t.forEach(l=>{var p;const c=$(this,Qo).defaultQueryOptions(l),m=((p=a.get(c.queryHash))==null?void 0:p.shift())??new ly($(this,Qo),c);r.push({defaultedQueryOptions:c,observer:m})}),r},Up=function(t,a){const r=$(this,zn).indexOf(t);r!==-1&&(xe(this,En,BT($(this,En),r,a)),He(this,Pt,Ip).call(this))},Ip=function(){var t;if(this.hasListeners()){const a=He(this,Pt,Lp).call(this,$(this,En),$(this,nc)),r=He(this,Pt,jE).call(this),l=$(this,Ca),c=r?l:He(this,Pt,zp).call(this,a,(t=$(this,Lr))==null?void 0:t.combine);(r||l!==c)&&Ht.batch(()=>{this.listeners.forEach(u=>{u($(this,En))})})}},v2),vi,x2,FT=(x2=class extends bl{constructor(t={}){super();Ne(this,vi);this.config=t,xe(this,vi,new Map)}build(t,a,r){const l=a.queryKey,c=a.queryHash??ay(l,a);let u=this.get(c);return u||(u=new LT({client:t,queryKey:l,queryHash:c,options:t.defaultQueryOptions(a),state:r,defaultOptions:t.getQueryDefaults(l)}),this.add(u)),u}add(t){$(this,vi).has(t.queryHash)||($(this,vi).set(t.queryHash,t),this.notify({type:"added",query:t}))}remove(t){const a=$(this,vi).get(t.queryHash);a&&(t.destroy(),a===t&&$(this,vi).delete(t.queryHash),this.notify({type:"removed",query:t}))}clear(){Ht.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}get(t){return $(this,vi).get(t)}getAll(){return[...$(this,vi).values()]}find(t){const a={exact:!0,...t};return this.getAll().find(r=>bw(a,r))}findAll(t={}){const a=this.getAll();return Object.keys(t).length>0?a.filter(r=>bw(t,r)):a}notify(t){Ht.batch(()=>{this.listeners.forEach(a=>{a(t)})})}onFocus(){Ht.batch(()=>{this.getAll().forEach(t=>{t.onFocus()})})}onOnline(){Ht.batch(()=>{this.getAll().forEach(t=>{t.onOnline()})})}},vi=new WeakMap,x2),Ct,Ra,Ta,Zo,Wo,Da,Jo,el,w2,PT=(w2=class{constructor(e={}){Ne(this,Ct);Ne(this,Ra);Ne(this,Ta);Ne(this,Zo);Ne(this,Wo);Ne(this,Da);Ne(this,Jo);Ne(this,el);xe(this,Ct,e.queryCache||new FT),xe(this,Ra,e.mutationCache||new HT),xe(this,Ta,e.defaultOptions||{}),xe(this,Zo,new Map),xe(this,Wo,new Map),xe(this,Da,0)}mount(){Lu(this,Da)._++,$(this,Da)===1&&(xe(this,Jo,iy.subscribe(async e=>{e&&(await this.resumePausedMutations(),$(this,Ct).onFocus())})),xe(this,el,gd.subscribe(async e=>{e&&(await this.resumePausedMutations(),$(this,Ct).onOnline())})))}unmount(){var e,t;Lu(this,Da)._--,$(this,Da)===0&&((e=$(this,Jo))==null||e.call(this),xe(this,Jo,void 0),(t=$(this,el))==null||t.call(this),xe(this,el,void 0))}isFetching(e){return $(this,Ct).findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return $(this,Ra).findAll({...e,status:"pending"}).length}getQueryData(e){var a;const t=this.defaultQueryOptions({queryKey:e});return(a=$(this,Ct).get(t.queryHash))==null?void 0:a.state.data}ensureQueryData(e){const t=this.defaultQueryOptions(e),a=$(this,Ct).build(this,t),r=a.state.data;return r===void 0?this.fetchQuery(e):(e.revalidateIfStale&&a.isStaleByTime($a(t.staleTime,a))&&this.prefetchQuery(t),Promise.resolve(r))}getQueriesData(e){return $(this,Ct).findAll(e).map(({queryKey:t,state:a})=>{const r=a.data;return[t,r]})}setQueryData(e,t,a){const r=this.defaultQueryOptions({queryKey:e}),l=$(this,Ct).get(r.queryHash),c=l==null?void 0:l.state.data,u=ST(t,c);if(u!==void 0)return $(this,Ct).build(this,r).setData(u,{...a,manual:!0})}setQueriesData(e,t,a){return Ht.batch(()=>$(this,Ct).findAll(e).map(({queryKey:r})=>[r,this.setQueryData(r,t,a)]))}getQueryState(e){var a;const t=this.defaultQueryOptions({queryKey:e});return(a=$(this,Ct).get(t.queryHash))==null?void 0:a.state}removeQueries(e){const t=$(this,Ct);Ht.batch(()=>{t.findAll(e).forEach(a=>{t.remove(a)})})}resetQueries(e,t){const a=$(this,Ct);return Ht.batch(()=>(a.findAll(e).forEach(r=>{r.reset()}),this.refetchQueries({type:"active",...e},t)))}cancelQueries(e,t={}){const a={revert:!0,...t},r=Ht.batch(()=>$(this,Ct).findAll(e).map(l=>l.cancel(a)));return Promise.all(r).then(hn).catch(hn)}invalidateQueries(e,t={}){return Ht.batch(()=>($(this,Ct).findAll(e).forEach(a=>{a.invalidate()}),(e==null?void 0:e.refetchType)==="none"?Promise.resolve():this.refetchQueries({...e,type:(e==null?void 0:e.refetchType)??(e==null?void 0:e.type)??"active"},t)))}refetchQueries(e,t={}){const a={...t,cancelRefetch:t.cancelRefetch??!0},r=Ht.batch(()=>$(this,Ct).findAll(e).filter(l=>!l.isDisabled()&&!l.isStatic()).map(l=>{let c=l.fetch(void 0,a);return a.throwOnError||(c=c.catch(hn)),l.state.fetchStatus==="paused"?Promise.resolve():c}));return Promise.all(r).then(hn)}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const a=$(this,Ct).build(this,t);return a.isStaleByTime($a(t.staleTime,a))?a.fetch(t):Promise.resolve(a.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(hn).catch(hn)}fetchInfiniteQuery(e){return e._type="infinite",this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(hn).catch(hn)}ensureInfiniteQueryData(e){return e._type="infinite",this.ensureQueryData(e)}resumePausedMutations(){return gd.isOnline()?$(this,Ra).resumePausedMutations():Promise.resolve()}getQueryCache(){return $(this,Ct)}getMutationCache(){return $(this,Ra)}getDefaultOptions(){return $(this,Ta)}setDefaultOptions(e){xe(this,Ta,e)}setQueryDefaults(e,t){$(this,Zo).set(Is(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...$(this,Zo).values()],a={};return t.forEach(r=>{ol(e,r.queryKey)&&Object.assign(a,r.defaultOptions)}),a}setMutationDefaults(e,t){$(this,Wo).set(Is(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...$(this,Wo).values()],a={};return t.forEach(r=>{ol(e,r.mutationKey)&&Object.assign(a,r.defaultOptions)}),a}defaultQueryOptions(e){if(e._defaulted)return e;const t={...$(this,Ta).queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=ay(t.queryKey,t)),t.refetchOnReconnect===void 0&&(t.refetchOnReconnect=t.networkMode!=="always"),t.throwOnError===void 0&&(t.throwOnError=!!t.suspense),!t.networkMode&&t.persister&&(t.networkMode="offlineFirst"),t.queryFn===oy&&(t.enabled=!1),t}defaultMutationOptions(e){return e!=null&&e._defaulted?e:{...$(this,Ta).mutations,...(e==null?void 0:e.mutationKey)&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){$(this,Ct).clear(),$(this,Ra).clear()}},Ct=new WeakMap,Ra=new WeakMap,Ta=new WeakMap,Zo=new WeakMap,Wo=new WeakMap,Da=new WeakMap,Jo=new WeakMap,el=new WeakMap,w2),OE=x.createContext(void 0),Bd=e=>{const t=x.useContext(OE);if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},VT=({client:e,children:t})=>(x.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),d.jsx(OE.Provider,{value:e,children:t})),AE=x.createContext(!1),NE=()=>x.useContext(AE);AE.Provider;function GT(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var KT=x.createContext(GT()),ME=()=>x.useContext(KT),CE=(e,t,a)=>{const r=a!=null&&a.state.error&&typeof e.throwOnError=="function"?vE(e.throwOnError,[a.state.error,a]):e.throwOnError;(e.suspense||e.experimental_prefetchInRender||r)&&(t.isReset()||(e.retryOnMount=!1))},RE=e=>{x.useEffect(()=>{e.clearReset()},[e])},TE=({result:e,errorResetBoundary:t,throwOnError:a,query:r,suspense:l})=>e.isError&&!t.isReset()&&!e.isFetching&&r&&(l&&e.data===void 0||vE(a,[e.error,r])),DE=e=>{if(e.suspense){const a=l=>l==="static"?l:Math.max(l??1e3,1e3),r=e.staleTime;e.staleTime=typeof r=="function"?(...l)=>a(r(...l)):a(r),typeof e.gcTime=="number"&&(e.gcTime=Math.max(e.gcTime,1e3))}},YT=(e,t)=>e.isLoading&&e.isFetching&&!t,Hp=(e,t)=>(e==null?void 0:e.suspense)&&t.isPending,Bp=(e,t,a)=>t.fetchOptimistic(e).catch(()=>{a.clearReset()});function QT({queries:e,...t},a){const r=Bd(),l=NE(),c=ME(),u=x.useMemo(()=>e.map(E=>{const _=r.defaultQueryOptions(E);return _._optimisticResults=l?"isRestoring":"optimistic",_}),[e,r,l]);u.forEach(E=>{DE(E);const _=r.getQueryCache().get(E.queryHash);CE(E,c,_)}),RE(c);const[m]=x.useState(()=>new qT(r,u,t)),[p,g,b]=m.getOptimisticResult(u,t.combine),v=!l&&t.subscribed!==!1;x.useSyncExternalStore(x.useCallback(E=>v?m.subscribe(Ht.batchCalls(E)):hn,[m,v]),()=>m.getCurrentResult(),()=>m.getCurrentResult()),x.useEffect(()=>{m.setQueries(u,t)},[u,t,m]);const w=p.some((E,_)=>Hp(u[_],E))?p.flatMap((E,_)=>{const C=u[_];if(C&&Hp(C,E)){const O=new ly(r,C);return Bp(C,O,c)}return[]}):[];if(w.length>0)throw Promise.all(w);const j=p.find((E,_)=>{const C=u[_];return C&&TE({result:E,errorResetBoundary:c,throwOnError:C.throwOnError,query:r.getQueryCache().get(C.queryHash),suspense:C.suspense})});if(j!=null&&j.error)throw j.error;return g(b())}function XT(e,t,a){var w,j,E,_;const r=NE(),l=ME(),c=Bd(),u=c.defaultQueryOptions(e);(j=(w=c.getDefaultOptions().queries)==null?void 0:w._experimental_beforeQuery)==null||j.call(w,u);const m=c.getQueryCache().get(u.queryHash),p=e.subscribed!==!1;u._optimisticResults=r?"isRestoring":p?"optimistic":void 0,DE(u),CE(u,l,m),RE(l);const g=!c.getQueryCache().get(u.queryHash),[b]=x.useState(()=>new t(c,u)),v=b.getOptimisticResult(u),k=!r&&p;if(x.useSyncExternalStore(x.useCallback(C=>{const O=k?b.subscribe(Ht.batchCalls(C)):hn;return b.updateResult(),O},[b,k]),()=>b.getCurrentResult(),()=>b.getCurrentResult()),x.useEffect(()=>{b.setOptions(u)},[u,b]),Hp(u,v))throw Bp(u,b,l);if(TE({result:v,errorResetBoundary:l,throwOnError:u.throwOnError,query:m,suspense:u.suspense}))throw v.error;if((_=(E=c.getDefaultOptions().queries)==null?void 0:E._experimental_afterQuery)==null||_.call(E,u,v),u.experimental_prefetchInRender&&!Hs.isServer()&&YT(v,r)){const C=g?Bp(u,b,l):m==null?void 0:m.promise;C==null||C.catch(hn).finally(()=>{b.updateResult()})}return u.notifyOnChangeProps?v:b.trackResult(v)}function qd(e,t){return XT(e,ly)}const ZT=600*1e3,WT=(e,t,a)=>({queryKey:["crop-url",e,t],queryFn:()=>a(e,t),staleTime:ZT});function LE(e,t,a){const r=x.useMemo(()=>[...new Set(t.filter(c=>!!c))],[t]),l=QT({queries:r.map(c=>({...WT(e,c,a),enabled:!!e}))});return x.useMemo(()=>{const c=new Map;return r.forEach((u,m)=>{var g;const p=(g=l[m])==null?void 0:g.data;typeof p=="string"&&c.set(u,p)}),c},[r,l])}/**
|
|
782
|
+
* @license lucide-react v1.28.0 - ISC
|
|
783
|
+
*
|
|
784
|
+
* This source code is licensed under the ISC license.
|
|
785
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
786
|
+
*/const zE=(...e)=>e.filter((t,a,r)=>!!t&&t.trim()!==""&&r.indexOf(t)===a).join(" ").trim();/**
|
|
787
|
+
* @license lucide-react v1.28.0 - ISC
|
|
788
|
+
*
|
|
789
|
+
* This source code is licensed under the ISC license.
|
|
790
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
791
|
+
*/const JT=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase();/**
|
|
792
|
+
* @license lucide-react v1.28.0 - ISC
|
|
793
|
+
*
|
|
794
|
+
* This source code is licensed under the ISC license.
|
|
795
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
796
|
+
*/const eD=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,a,r)=>r?r.toUpperCase():a.toLowerCase());/**
|
|
797
|
+
* @license lucide-react v1.28.0 - ISC
|
|
798
|
+
*
|
|
799
|
+
* This source code is licensed under the ISC license.
|
|
800
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
801
|
+
*/const Aw=e=>{const t=eD(e);return t.charAt(0).toUpperCase()+t.slice(1)};/**
|
|
802
|
+
* @license lucide-react v1.28.0 - ISC
|
|
803
|
+
*
|
|
804
|
+
* This source code is licensed under the ISC license.
|
|
805
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
806
|
+
*/var Fm={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"};/**
|
|
807
|
+
* @license lucide-react v1.28.0 - ISC
|
|
808
|
+
*
|
|
809
|
+
* This source code is licensed under the ISC license.
|
|
810
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
811
|
+
*/const tD=e=>{for(const t in e)if(t.startsWith("aria-")||t==="role"||t==="title")return!0;return!1},nD=x.createContext({}),iD=()=>x.useContext(nD),aD=x.forwardRef(({color:e,size:t,strokeWidth:a,absoluteStrokeWidth:r,className:l="",children:c,iconNode:u,...m},p)=>{const{size:g=24,strokeWidth:b=2,absoluteStrokeWidth:v=!1,color:k="currentColor",className:w=""}=iD()??{},j=r??v?Number(a??b)*24/Number(t??g):a??b;return x.createElement("svg",{ref:p,...Fm,width:t??g??Fm.width,height:t??g??Fm.height,stroke:e??k,strokeWidth:j,className:zE("lucide",w,l),...!c&&!tD(m)&&{"aria-hidden":"true"},...m},[...u.map(([E,_])=>x.createElement(E,_)),...Array.isArray(c)?c:[c]])});/**
|
|
812
|
+
* @license lucide-react v1.28.0 - ISC
|
|
813
|
+
*
|
|
814
|
+
* This source code is licensed under the ISC license.
|
|
815
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
816
|
+
*/const ve=(e,t)=>{const a=x.forwardRef(({className:r,...l},c)=>x.createElement(aD,{ref:c,iconNode:t,className:zE(`lucide-${JT(Aw(e))}`,`lucide-${e}`,r),...l}));return a.displayName=Aw(e),a};/**
|
|
817
|
+
* @license lucide-react v1.28.0 - ISC
|
|
818
|
+
*
|
|
819
|
+
* This source code is licensed under the ISC license.
|
|
820
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
821
|
+
*/const rD=[["path",{d:"M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.25.25 0 0 1-.48 0L9.24 2.18a.25.25 0 0 0-.48 0l-2.35 8.36A2 2 0 0 1 4.49 12H2",key:"169zse"}]],oD=ve("activity",rD);/**
|
|
822
|
+
* @license lucide-react v1.28.0 - ISC
|
|
823
|
+
*
|
|
824
|
+
* This source code is licensed under the ISC license.
|
|
825
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
826
|
+
*/const lD=[["rect",{width:"20",height:"5",x:"2",y:"3",rx:"1",key:"1wp1u1"}],["path",{d:"M4 8v11a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8",key:"1s80jp"}],["path",{d:"M10 12h4",key:"a56b0p"}]],sD=ve("archive",lD);/**
|
|
827
|
+
* @license lucide-react v1.28.0 - ISC
|
|
828
|
+
*
|
|
829
|
+
* This source code is licensed under the ISC license.
|
|
830
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
831
|
+
*/const cD=[["path",{d:"M12 5v14",key:"s699le"}],["path",{d:"m19 12-7 7-7-7",key:"1idqje"}]],uD=ve("arrow-down",cD);/**
|
|
832
|
+
* @license lucide-react v1.28.0 - ISC
|
|
833
|
+
*
|
|
834
|
+
* This source code is licensed under the ISC license.
|
|
835
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
836
|
+
*/const dD=[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]],fD=ve("arrow-left",dD);/**
|
|
837
|
+
* @license lucide-react v1.28.0 - ISC
|
|
838
|
+
*
|
|
839
|
+
* This source code is licensed under the ISC license.
|
|
840
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
841
|
+
*/const hD=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]],mD=ve("arrow-right",hD);/**
|
|
842
|
+
* @license lucide-react v1.28.0 - ISC
|
|
843
|
+
*
|
|
844
|
+
* This source code is licensed under the ISC license.
|
|
845
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
846
|
+
*/const pD=[["path",{d:"M7 7h10v10",key:"1tivn9"}],["path",{d:"M7 17 17 7",key:"1vkiza"}]],$E=ve("arrow-up-right",pD);/**
|
|
847
|
+
* @license lucide-react v1.28.0 - ISC
|
|
848
|
+
*
|
|
849
|
+
* This source code is licensed under the ISC license.
|
|
850
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
851
|
+
*/const gD=[["path",{d:"m5 12 7-7 7 7",key:"hav0vg"}],["path",{d:"M12 19V5",key:"x0mq9r"}]],yD=ve("arrow-up",gD);/**
|
|
852
|
+
* @license lucide-react v1.28.0 - ISC
|
|
853
|
+
*
|
|
854
|
+
* This source code is licensed under the ISC license.
|
|
855
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
856
|
+
*/const bD=[["path",{d:"M12 5v16",key:"1f6ucr"}],["path",{d:"M20.001 19A2 2 0 0022 17V5a2 2 0 00-1.999-2L16 3.002A5 5 0 0012 5a5 5 0 00-4-2H4a2 2 0 00-2 2v12a2 2 0 001.999 2H8a5 5 0 014 2 5 5 0 014-2z",key:"1fyvmf"}]],vD=ve("book-open",bD);/**
|
|
857
|
+
* @license lucide-react v1.28.0 - ISC
|
|
858
|
+
*
|
|
859
|
+
* This source code is licensed under the ISC license.
|
|
860
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
861
|
+
*/const xD=[["path",{d:"M21 8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16Z",key:"hh9hay"}],["path",{d:"m3.3 7 8.7 5 8.7-5",key:"g66t2b"}],["path",{d:"M12 22V12",key:"d0xqtd"}]],cy=ve("box",xD);/**
|
|
862
|
+
* @license lucide-react v1.28.0 - ISC
|
|
863
|
+
*
|
|
864
|
+
* This source code is licensed under the ISC license.
|
|
865
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
866
|
+
*/const wD=[["path",{d:"M10 12h4",key:"a56b0p"}],["path",{d:"M10 8h4",key:"1sr2af"}],["path",{d:"M14 21v-3a2 2 0 0 0-4 0v3",key:"1rgiei"}],["path",{d:"M6 10H4a2 2 0 0 0-2 2v7a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2V9a2 2 0 0 0-2-2h-2",key:"secmi2"}],["path",{d:"M6 21V5a2 2 0 0 1 2-2h8a2 2 0 0 1 2 2v16",key:"16ra0t"}]],kD=ve("building-2",wD);/**
|
|
867
|
+
* @license lucide-react v1.28.0 - ISC
|
|
868
|
+
*
|
|
869
|
+
* This source code is licensed under the ISC license.
|
|
870
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
871
|
+
*/const SD=[["path",{d:"M12 10h.01",key:"1nrarc"}],["path",{d:"M12 14h.01",key:"1etili"}],["path",{d:"M12 6h.01",key:"1vi96p"}],["path",{d:"M16 10h.01",key:"1m94wz"}],["path",{d:"M16 14h.01",key:"1gbofw"}],["path",{d:"M16 6h.01",key:"1x0f13"}],["path",{d:"M8 10h.01",key:"19clt8"}],["path",{d:"M8 14h.01",key:"6423bh"}],["path",{d:"M8 6h.01",key:"1dz90k"}],["path",{d:"M9 22v-3a1 1 0 0 1 1-1h4a1 1 0 0 1 1 1v3",key:"cabbwy"}],["rect",{x:"4",y:"2",width:"16",height:"20",rx:"2",key:"1uxh74"}]],ED=ve("building",SD);/**
|
|
872
|
+
* @license lucide-react v1.28.0 - ISC
|
|
873
|
+
*
|
|
874
|
+
* This source code is licensed under the ISC license.
|
|
875
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
876
|
+
*/const _D=[["path",{d:"M8 2v3",key:"1ioesn"}],["path",{d:"M16 2v3",key:"otl347"}],["rect",{x:"3",y:"3",width:"18",height:"18",rx:"2",key:"h1oib"}],["path",{d:"M3 9h18",key:"1pudct"}],["path",{d:"M8 13h.01",key:"1sbv64"}],["path",{d:"M12 13h.01",key:"y0uutt"}],["path",{d:"M16 13h.01",key:"wip0gl"}],["path",{d:"M8 17h.01",key:"p3bg7i"}],["path",{d:"M12 17h.01",key:"p32p05"}],["path",{d:"M16 17h.01",key:"ql8jdd"}]],jD=ve("calendar-days",_D);/**
|
|
877
|
+
* @license lucide-react v1.28.0 - ISC
|
|
878
|
+
*
|
|
879
|
+
* This source code is licensed under the ISC license.
|
|
880
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
881
|
+
*/const OD=[["path",{d:"M8 2v3",key:"1ioesn"}],["path",{d:"M16 2v3",key:"otl347"}],["rect",{x:"3",y:"3",width:"18",height:"18",rx:"2",key:"h1oib"}],["path",{d:"M3 9h18",key:"1pudct"}]],AD=ve("calendar",OD);/**
|
|
882
|
+
* @license lucide-react v1.28.0 - ISC
|
|
883
|
+
*
|
|
884
|
+
* This source code is licensed under the ISC license.
|
|
885
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
886
|
+
*/const ND=[["path",{d:"M3 3v16a2 2 0 0 0 2 2h16",key:"c24i48"}],["path",{d:"m19 9-5 5-4-4-3 3",key:"2osh9i"}]],MD=ve("chart-line",ND);/**
|
|
887
|
+
* @license lucide-react v1.28.0 - ISC
|
|
888
|
+
*
|
|
889
|
+
* This source code is licensed under the ISC license.
|
|
890
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
891
|
+
*/const CD=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],Fd=ve("check",CD);/**
|
|
892
|
+
* @license lucide-react v1.28.0 - ISC
|
|
893
|
+
*
|
|
894
|
+
* This source code is licensed under the ISC license.
|
|
895
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
896
|
+
*/const RD=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],uy=ve("chevron-down",RD);/**
|
|
897
|
+
* @license lucide-react v1.28.0 - ISC
|
|
898
|
+
*
|
|
899
|
+
* This source code is licensed under the ISC license.
|
|
900
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
901
|
+
*/const TD=[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]],UE=ve("chevron-left",TD);/**
|
|
902
|
+
* @license lucide-react v1.28.0 - ISC
|
|
903
|
+
*
|
|
904
|
+
* This source code is licensed under the ISC license.
|
|
905
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
906
|
+
*/const DD=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],dy=ve("chevron-right",DD);/**
|
|
907
|
+
* @license lucide-react v1.28.0 - ISC
|
|
908
|
+
*
|
|
909
|
+
* This source code is licensed under the ISC license.
|
|
910
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
911
|
+
*/const LD=[["path",{d:"m7 15 5 5 5-5",key:"1hf1tw"}],["path",{d:"m7 9 5-5 5 5",key:"sgt6xg"}]],zD=ve("chevrons-up-down",LD);/**
|
|
912
|
+
* @license lucide-react v1.28.0 - ISC
|
|
913
|
+
*
|
|
914
|
+
* This source code is licensed under the ISC license.
|
|
915
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
916
|
+
*/const $D=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3",key:"1u773s"}],["path",{d:"M12 17h.01",key:"p32p05"}]],UD=ve("circle-question-mark",$D);/**
|
|
917
|
+
* @license lucide-react v1.28.0 - ISC
|
|
918
|
+
*
|
|
919
|
+
* This source code is licensed under the ISC license.
|
|
920
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
921
|
+
*/const ID=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 6v6l4 2",key:"mmk7yg"}]],HD=ve("clock",ID);/**
|
|
922
|
+
* @license lucide-react v1.28.0 - ISC
|
|
923
|
+
*
|
|
924
|
+
* This source code is licensed under the ISC license.
|
|
925
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
926
|
+
*/const BD=[["path",{d:"M12 13v8",key:"1l5pq0"}],["path",{d:"M4 14.899A7 7 0 1 1 15.71 8h1.79a4.5 4.5 0 0 1 2.5 8.242",key:"1pljnt"}],["path",{d:"m8 17 4-4 4 4",key:"1quai1"}]],fy=ve("cloud-upload",BD);/**
|
|
927
|
+
* @license lucide-react v1.28.0 - ISC
|
|
928
|
+
*
|
|
929
|
+
* This source code is licensed under the ISC license.
|
|
930
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
931
|
+
*/const qD=[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]],FD=ve("copy",qD);/**
|
|
932
|
+
* @license lucide-react v1.28.0 - ISC
|
|
933
|
+
*
|
|
934
|
+
* This source code is licensed under the ISC license.
|
|
935
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
936
|
+
*/const PD=[["rect",{width:"20",height:"14",x:"2",y:"5",rx:"2",key:"ynyp8z"}],["line",{x1:"2",x2:"22",y1:"10",y2:"10",key:"1b3vmo"}]],VD=ve("credit-card",PD);/**
|
|
937
|
+
* @license lucide-react v1.28.0 - ISC
|
|
938
|
+
*
|
|
939
|
+
* This source code is licensed under the ISC license.
|
|
940
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
941
|
+
*/const GD=[["path",{d:"M6 2v14a2 2 0 0 0 2 2h14",key:"ron5a4"}],["path",{d:"M18 22V8a2 2 0 0 0-2-2H2",key:"7s9ehn"}]],KD=ve("crop",GD);/**
|
|
942
|
+
* @license lucide-react v1.28.0 - ISC
|
|
943
|
+
*
|
|
944
|
+
* This source code is licensed under the ISC license.
|
|
945
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
946
|
+
*/const YD=[["ellipse",{cx:"12",cy:"5",rx:"9",ry:"3",key:"msslwz"}],["path",{d:"M3 5V19A9 3 0 0 0 21 19V5",key:"1wlel7"}],["path",{d:"M3 12A9 3 0 0 0 21 12",key:"mv7ke4"}]],QD=ve("database",YD);/**
|
|
947
|
+
* @license lucide-react v1.28.0 - ISC
|
|
948
|
+
*
|
|
949
|
+
* This source code is licensed under the ISC license.
|
|
950
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
951
|
+
*/const XD=[["path",{d:"M12 15V3",key:"m9g1x1"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["path",{d:"m7 10 5 5 5-5",key:"brsn70"}]],IE=ve("download",XD);/**
|
|
952
|
+
* @license lucide-react v1.28.0 - ISC
|
|
953
|
+
*
|
|
954
|
+
* This source code is licensed under the ISC license.
|
|
955
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
956
|
+
*/const ZD=[["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["circle",{cx:"12",cy:"5",r:"1",key:"gxeob9"}],["circle",{cx:"12",cy:"19",r:"1",key:"lyex9k"}]],WD=ve("ellipsis-vertical",ZD);/**
|
|
957
|
+
* @license lucide-react v1.28.0 - ISC
|
|
958
|
+
*
|
|
959
|
+
* This source code is licensed under the ISC license.
|
|
960
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
961
|
+
*/const JD=[["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["circle",{cx:"19",cy:"12",r:"1",key:"1wjl8i"}],["circle",{cx:"5",cy:"12",r:"1",key:"1pcz8c"}]],e6=ve("ellipsis",JD);/**
|
|
962
|
+
* @license lucide-react v1.28.0 - ISC
|
|
963
|
+
*
|
|
964
|
+
* This source code is licensed under the ISC license.
|
|
965
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
966
|
+
*/const t6=[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]],HE=ve("external-link",t6);/**
|
|
967
|
+
* @license lucide-react v1.28.0 - ISC
|
|
968
|
+
*
|
|
969
|
+
* This source code is licensed under the ISC license.
|
|
970
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
971
|
+
*/const n6=[["path",{d:"M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49",key:"ct8e1f"}],["path",{d:"M14.084 14.158a3 3 0 0 1-4.242-4.242",key:"151rxh"}],["path",{d:"M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143",key:"13bj9a"}],["path",{d:"m2 2 20 20",key:"1ooewy"}]],i6=ve("eye-off",n6);/**
|
|
972
|
+
* @license lucide-react v1.28.0 - ISC
|
|
973
|
+
*
|
|
974
|
+
* This source code is licensed under the ISC license.
|
|
975
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
976
|
+
*/const a6=[["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"}]],BE=ve("eye",a6);/**
|
|
977
|
+
* @license lucide-react v1.28.0 - ISC
|
|
978
|
+
*
|
|
979
|
+
* This source code is licensed under the ISC license.
|
|
980
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
981
|
+
*/const r6=[["path",{d:"M14.364 13.634a2 2 0 0 0-.506.854l-.837 2.87a.5.5 0 0 0 .62.62l2.87-.837a2 2 0 0 0 .854-.506l4.013-4.009a1 1 0 0 0-3.004-3.004z",key:"ukzhwg"}],["path",{d:"M14.487 7.858A1 1 0 0 1 14 7V2",key:"1klhew"}],["path",{d:"M20 19.645V20a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l2.516 2.516",key:"rxaxab"}],["path",{d:"M8 18h1",key:"13wk12"}]],o6=ve("file-pen-line",r6);/**
|
|
982
|
+
* @license lucide-react v1.28.0 - ISC
|
|
983
|
+
*
|
|
984
|
+
* This source code is licensed under the ISC license.
|
|
985
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
986
|
+
*/const l6=[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M8 13h2",key:"yr2amv"}],["path",{d:"M14 13h2",key:"un5t4a"}],["path",{d:"M8 17h2",key:"2yhykz"}],["path",{d:"M14 17h2",key:"10kma7"}]],qE=ve("file-spreadsheet",l6);/**
|
|
987
|
+
* @license lucide-react v1.28.0 - ISC
|
|
988
|
+
*
|
|
989
|
+
* This source code is licensed under the ISC license.
|
|
990
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
991
|
+
*/const s6=[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]],Pd=ve("file-text",s6);/**
|
|
992
|
+
* @license lucide-react v1.28.0 - ISC
|
|
993
|
+
*
|
|
994
|
+
* This source code is licensed under the ISC license.
|
|
995
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
996
|
+
*/const c6=[["path",{d:"M15 2h-4a2 2 0 0 0-2 2v11a2 2 0 0 0 2 2h8a2 2 0 0 0 2-2V8",key:"14sh0y"}],["path",{d:"M16.706 2.706A2.4 2.4 0 0 0 15 2v5a1 1 0 0 0 1 1h5a2.4 2.4 0 0 0-.706-1.706z",key:"1970lx"}],["path",{d:"M5 7a2 2 0 0 0-2 2v11a2 2 0 0 0 2 2h8a2 2 0 0 0 1.732-1",key:"l4dndm"}]],Pm=ve("files",c6);/**
|
|
997
|
+
* @license lucide-react v1.28.0 - ISC
|
|
998
|
+
*
|
|
999
|
+
* This source code is licensed under the ISC license.
|
|
1000
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
1001
|
+
*/const u6=[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}]],d6=ve("file",u6);/**
|
|
1002
|
+
* @license lucide-react v1.28.0 - ISC
|
|
1003
|
+
*
|
|
1004
|
+
* This source code is licensed under the ISC license.
|
|
1005
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
1006
|
+
*/const f6=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M7 3v18",key:"bbkbws"}],["path",{d:"M3 7.5h4",key:"zfgn84"}],["path",{d:"M3 12h18",key:"1i2n21"}],["path",{d:"M3 16.5h4",key:"1230mu"}],["path",{d:"M17 3v18",key:"in4fa5"}],["path",{d:"M17 7.5h4",key:"myr1c1"}],["path",{d:"M17 16.5h4",key:"go4c1d"}]],h6=ve("film",f6);/**
|
|
1007
|
+
* @license lucide-react v1.28.0 - ISC
|
|
1008
|
+
*
|
|
1009
|
+
* This source code is licensed under the ISC license.
|
|
1010
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
1011
|
+
*/const m6=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20",key:"13o1zl"}],["path",{d:"M2 12h20",key:"9i4pu4"}]],p6=ve("globe",m6);/**
|
|
1012
|
+
* @license lucide-react v1.28.0 - ISC
|
|
1013
|
+
*
|
|
1014
|
+
* This source code is licensed under the ISC license.
|
|
1015
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
1016
|
+
*/const g6=[["circle",{cx:"9",cy:"12",r:"1",key:"1vctgf"}],["circle",{cx:"9",cy:"5",r:"1",key:"hp0tcf"}],["circle",{cx:"9",cy:"19",r:"1",key:"fkjjf6"}],["circle",{cx:"15",cy:"12",r:"1",key:"1tmaij"}],["circle",{cx:"15",cy:"5",r:"1",key:"19l28e"}],["circle",{cx:"15",cy:"19",r:"1",key:"f4zoj3"}]],hy=ve("grip-vertical",g6);/**
|
|
1017
|
+
* @license lucide-react v1.28.0 - ISC
|
|
1018
|
+
*
|
|
1019
|
+
* This source code is licensed under the ISC license.
|
|
1020
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
1021
|
+
*/const y6=[["path",{d:"M15 21v-8a1 1 0 0 0-1-1h-4a1 1 0 0 0-1 1v8",key:"5wwlr5"}],["path",{d:"M3 10a2 2 0 0 1 .709-1.528l7-6a2 2 0 0 1 2.582 0l7 6A2 2 0 0 1 21 10v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z",key:"r6nss1"}]],b6=ve("house",y6);/**
|
|
1022
|
+
* @license lucide-react v1.28.0 - ISC
|
|
1023
|
+
*
|
|
1024
|
+
* This source code is licensed under the ISC license.
|
|
1025
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
1026
|
+
*/const v6=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",ry:"2",key:"1m3agn"}],["circle",{cx:"9",cy:"9",r:"2",key:"af1f0g"}],["path",{d:"m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21",key:"1xmnt7"}]],Vd=ve("image",v6);/**
|
|
1027
|
+
* @license lucide-react v1.28.0 - ISC
|
|
1028
|
+
*
|
|
1029
|
+
* This source code is licensed under the ISC license.
|
|
1030
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
1031
|
+
*/const x6=[["path",{d:"m22 11-1.296-1.296a2.4 2.4 0 0 0-3.408 0L11 16",key:"9kzy35"}],["path",{d:"M4 8a2 2 0 0 0-2 2v10a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2",key:"1t0f0t"}],["circle",{cx:"13",cy:"7",r:"1",fill:"currentColor",key:"1obus6"}],["rect",{x:"8",y:"2",width:"14",height:"14",rx:"2",key:"1gvhby"}]],qp=ve("images",x6);/**
|
|
1032
|
+
* @license lucide-react v1.28.0 - ISC
|
|
1033
|
+
*
|
|
1034
|
+
* This source code is licensed under the ISC license.
|
|
1035
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
1036
|
+
*/const w6=[["path",{d:"M2.586 17.414A2 2 0 0 0 2 18.828V21a1 1 0 0 0 1 1h3a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h1a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h.172a2 2 0 0 0 1.414-.586l.814-.814a6.5 6.5 0 1 0-4-4z",key:"1s6t7t"}],["circle",{cx:"16.5",cy:"7.5",r:".5",fill:"currentColor",key:"w0ekpg"}]],k6=ve("key-round",w6);/**
|
|
1037
|
+
* @license lucide-react v1.28.0 - ISC
|
|
1038
|
+
*
|
|
1039
|
+
* This source code is licensed under the ISC license.
|
|
1040
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
1041
|
+
*/const S6=[["rect",{width:"7",height:"7",x:"3",y:"3",rx:"1",key:"1g98yp"}],["rect",{width:"7",height:"7",x:"14",y:"3",rx:"1",key:"6d4xhi"}],["rect",{width:"7",height:"7",x:"14",y:"14",rx:"1",key:"nxv5o0"}],["rect",{width:"7",height:"7",x:"3",y:"14",rx:"1",key:"1bb6yr"}]],FE=ve("layout-grid",S6);/**
|
|
1042
|
+
* @license lucide-react v1.28.0 - ISC
|
|
1043
|
+
*
|
|
1044
|
+
* This source code is licensed under the ISC license.
|
|
1045
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
1046
|
+
*/const E6=[["rect",{width:"18",height:"7",x:"3",y:"3",rx:"1",key:"f1a2em"}],["rect",{width:"9",height:"7",x:"3",y:"14",rx:"1",key:"jqznyg"}],["rect",{width:"5",height:"7",x:"16",y:"14",rx:"1",key:"q5h2i8"}]],_6=ve("layout-template",E6);/**
|
|
1047
|
+
* @license lucide-react v1.28.0 - ISC
|
|
1048
|
+
*
|
|
1049
|
+
* This source code is licensed under the ISC license.
|
|
1050
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
1051
|
+
*/const j6=[["rect",{width:"8",height:"18",x:"3",y:"3",rx:"1",key:"oynpb5"}],["path",{d:"M7 3v18",key:"bbkbws"}],["path",{d:"M20.4 18.9c.2.5-.1 1.1-.6 1.3l-1.9.7c-.5.2-1.1-.1-1.3-.6L11.1 5.1c-.2-.5.1-1.1.6-1.3l1.9-.7c.5-.2 1.1.1 1.3.6Z",key:"1qboyk"}]],O6=ve("library-big",j6);/**
|
|
1052
|
+
* @license lucide-react v1.28.0 - ISC
|
|
1053
|
+
*
|
|
1054
|
+
* This source code is licensed under the ISC license.
|
|
1055
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
1056
|
+
*/const A6=[["path",{d:"M9 17H7A5 5 0 0 1 7 7h2",key:"8i5ue5"}],["path",{d:"M15 7h2a5 5 0 1 1 0 10h-2",key:"1b9ql8"}],["line",{x1:"8",x2:"16",y1:"12",y2:"12",key:"1jonct"}]],my=ve("link-2",A6);/**
|
|
1057
|
+
* @license lucide-react v1.28.0 - ISC
|
|
1058
|
+
*
|
|
1059
|
+
* This source code is licensed under the ISC license.
|
|
1060
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
1061
|
+
*/const N6=[["path",{d:"M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71",key:"1cjeqo"}],["path",{d:"M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71",key:"19qd67"}]],M6=ve("link",N6);/**
|
|
1062
|
+
* @license lucide-react v1.28.0 - ISC
|
|
1063
|
+
*
|
|
1064
|
+
* This source code is licensed under the ISC license.
|
|
1065
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
1066
|
+
*/const C6=[["path",{d:"M3 5h.01",key:"18ugdj"}],["path",{d:"M3 12h.01",key:"nlz23k"}],["path",{d:"M3 19h.01",key:"noohij"}],["path",{d:"M8 5h13",key:"1pao27"}],["path",{d:"M8 12h13",key:"1za7za"}],["path",{d:"M8 19h13",key:"m83p4d"}]],PE=ve("list",C6);/**
|
|
1067
|
+
* @license lucide-react v1.28.0 - ISC
|
|
1068
|
+
*
|
|
1069
|
+
* This source code is licensed under the ISC license.
|
|
1070
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
1071
|
+
*/const R6=[["rect",{width:"18",height:"11",x:"3",y:"11",rx:"2",ry:"2",key:"1w4ew1"}],["path",{d:"M7 11V7a5 5 0 0 1 10 0v4",key:"fwvmzm"}]],T6=ve("lock",R6);/**
|
|
1072
|
+
* @license lucide-react v1.28.0 - ISC
|
|
1073
|
+
*
|
|
1074
|
+
* This source code is licensed under the ISC license.
|
|
1075
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
1076
|
+
*/const D6=[["path",{d:"m16 17 5-5-5-5",key:"1bji2h"}],["path",{d:"M21 12H9",key:"dn1m92"}],["path",{d:"M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4",key:"1uf3rs"}]],L6=ve("log-out",D6);/**
|
|
1077
|
+
* @license lucide-react v1.28.0 - ISC
|
|
1078
|
+
*
|
|
1079
|
+
* This source code is licensed under the ISC license.
|
|
1080
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
1081
|
+
*/const z6=[["path",{d:"m22 7-8.991 5.727a2 2 0 0 1-2.009 0L2 7",key:"132q7q"}],["rect",{x:"2",y:"4",width:"20",height:"16",rx:"2",key:"izxlao"}]],$6=ve("mail",z6);/**
|
|
1082
|
+
* @license lucide-react v1.28.0 - ISC
|
|
1083
|
+
*
|
|
1084
|
+
* This source code is licensed under the ISC license.
|
|
1085
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
1086
|
+
*/const U6=[["path",{d:"M15 22a1 1 0 0 1-1-1v-4a1 1 0 0 1 .445-.832l3-2a1 1 0 0 1 1.11 0l3 2A1 1 0 0 1 22 17v4a1 1 0 0 1-1 1z",key:"1p1rcz"}],["path",{d:"M18 10a8 8 0 0 0-16 0c0 4.993 5.539 10.193 7.399 11.799a1 1 0 0 0 .601.2",key:"mcbcs9"}],["path",{d:"M18 22v-3",key:"1t1ugv"}],["circle",{cx:"10",cy:"10",r:"3",key:"1ns7v1"}]],I6=ve("map-pin-house",U6);/**
|
|
1087
|
+
* @license lucide-react v1.28.0 - ISC
|
|
1088
|
+
*
|
|
1089
|
+
* This source code is licensed under the ISC license.
|
|
1090
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
1091
|
+
*/const H6=[["path",{d:"M20 10c0 4.993-5.539 10.193-7.399 11.799a1 1 0 0 1-1.202 0C9.539 20.193 4 14.993 4 10a8 8 0 0 1 16 0",key:"1r0f0z"}],["circle",{cx:"12",cy:"10",r:"3",key:"ilqhr7"}]],VE=ve("map-pin",H6);/**
|
|
1092
|
+
* @license lucide-react v1.28.0 - ISC
|
|
1093
|
+
*
|
|
1094
|
+
* This source code is licensed under the ISC license.
|
|
1095
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
1096
|
+
*/const B6=[["path",{d:"M18 8c0 3.613-3.869 7.429-5.393 8.795a1 1 0 0 1-1.214 0C9.87 15.429 6 11.613 6 8a6 6 0 0 1 12 0",key:"11u0oz"}],["circle",{cx:"12",cy:"8",r:"2",key:"1822b1"}],["path",{d:"M8.714 14h-3.71a1 1 0 0 0-.948.683l-2.004 6A1 1 0 0 0 3 22h18a1 1 0 0 0 .948-1.316l-2-6a1 1 0 0 0-.949-.684h-3.712",key:"q8zwxj"}]],q6=ve("map-pinned",B6);/**
|
|
1097
|
+
* @license lucide-react v1.28.0 - ISC
|
|
1098
|
+
*
|
|
1099
|
+
* This source code is licensed under the ISC license.
|
|
1100
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
1101
|
+
*/const F6=[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"m21 3-7 7",key:"1l2asr"}],["path",{d:"m3 21 7-7",key:"tjx5ai"}],["path",{d:"M9 21H3v-6",key:"wtvkvv"}]],P6=ve("maximize-2",F6);/**
|
|
1102
|
+
* @license lucide-react v1.28.0 - ISC
|
|
1103
|
+
*
|
|
1104
|
+
* This source code is licensed under the ISC license.
|
|
1105
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
1106
|
+
*/const V6=[["path",{d:"M12 19v3",key:"npa21l"}],["path",{d:"M19 10v2a7 7 0 0 1-14 0v-2",key:"1vc78b"}],["rect",{x:"9",y:"2",width:"6",height:"13",rx:"3",key:"s6n7sd"}]],G6=ve("mic",V6);/**
|
|
1107
|
+
* @license lucide-react v1.28.0 - ISC
|
|
1108
|
+
*
|
|
1109
|
+
* This source code is licensed under the ISC license.
|
|
1110
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
1111
|
+
*/const K6=[["path",{d:"M5 12h14",key:"1ays0h"}]],Y6=ve("minus",K6);/**
|
|
1112
|
+
* @license lucide-react v1.28.0 - ISC
|
|
1113
|
+
*
|
|
1114
|
+
* This source code is licensed under the ISC license.
|
|
1115
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
1116
|
+
*/const Q6=[["path",{d:"M14 4.1 12 6",key:"ita8i4"}],["path",{d:"m5.1 8-2.9-.8",key:"1go3kf"}],["path",{d:"m6 12-1.9 2",key:"mnht97"}],["path",{d:"M7.2 2.2 8 5.1",key:"1cfko1"}],["path",{d:"M9.037 9.69a.498.498 0 0 1 .653-.653l11 4.5a.5.5 0 0 1-.074.949l-4.349 1.041a1 1 0 0 0-.74.739l-1.04 4.35a.5.5 0 0 1-.95.074z",key:"s0h3yz"}]],X6=ve("mouse-pointer-click",Q6);/**
|
|
1117
|
+
* @license lucide-react v1.28.0 - ISC
|
|
1118
|
+
*
|
|
1119
|
+
* This source code is licensed under the ISC license.
|
|
1120
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
1121
|
+
*/const Z6=[["path",{d:"M15 18h-5",key:"95g1m2"}],["path",{d:"M18 14h-8",key:"sponae"}],["path",{d:"M4 22h16a2 2 0 0 0 2-2V4a2 2 0 0 0-2-2H8a2 2 0 0 0-2 2v16a2 2 0 0 1-4 0v-9a2 2 0 0 1 2-2h2",key:"39pd36"}],["rect",{width:"8",height:"4",x:"10",y:"6",rx:"1",key:"aywv1n"}]],W6=ve("newspaper",Z6);/**
|
|
1122
|
+
* @license lucide-react v1.28.0 - ISC
|
|
1123
|
+
*
|
|
1124
|
+
* This source code is licensed under the ISC license.
|
|
1125
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
1126
|
+
*/const J6=[["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"}]],eL=ve("palette",J6);/**
|
|
1127
|
+
* @license lucide-react v1.28.0 - ISC
|
|
1128
|
+
*
|
|
1129
|
+
* This source code is licensed under the ISC license.
|
|
1130
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
1131
|
+
*/const tL=[["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"}]],py=ve("pencil",tL);/**
|
|
1132
|
+
* @license lucide-react v1.28.0 - ISC
|
|
1133
|
+
*
|
|
1134
|
+
* This source code is licensed under the ISC license.
|
|
1135
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
1136
|
+
*/const nL=[["path",{d:"M13.832 16.568a1 1 0 0 0 1.213-.303l.355-.465A2 2 0 0 1 17 15h3a2 2 0 0 1 2 2v3a2 2 0 0 1-2 2A18 18 0 0 1 2 4a2 2 0 0 1 2-2h3a2 2 0 0 1 2 2v3a2 2 0 0 1-.8 1.6l-.468.351a1 1 0 0 0-.292 1.233 14 14 0 0 0 6.392 6.384",key:"9njp5v"}]],iL=ve("phone",nL);/**
|
|
1137
|
+
* @license lucide-react v1.28.0 - ISC
|
|
1138
|
+
*
|
|
1139
|
+
* This source code is licensed under the ISC license.
|
|
1140
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
1141
|
+
*/const aL=[["path",{d:"M5 5a2 2 0 0 1 3.008-1.728l11.997 6.998a2 2 0 0 1 .003 3.458l-12 7A2 2 0 0 1 5 19z",key:"10ikf1"}]],GE=ve("play",aL);/**
|
|
1142
|
+
* @license lucide-react v1.28.0 - ISC
|
|
1143
|
+
*
|
|
1144
|
+
* This source code is licensed under the ISC license.
|
|
1145
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
1146
|
+
*/const rL=[["path",{d:"M12 22v-5",key:"1ega77"}],["path",{d:"M15 8V2",key:"18g5xt"}],["path",{d:"M17 8a1 1 0 0 1 1 1v4a4 4 0 0 1-4 4h-4a4 4 0 0 1-4-4V9a1 1 0 0 1 1-1z",key:"1xoxul"}],["path",{d:"M9 8V2",key:"14iosj"}]],oL=ve("plug",rL);/**
|
|
1147
|
+
* @license lucide-react v1.28.0 - ISC
|
|
1148
|
+
*
|
|
1149
|
+
* This source code is licensed under the ISC license.
|
|
1150
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
1151
|
+
*/const lL=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]],Gd=ve("plus",lL);/**
|
|
1152
|
+
* @license lucide-react v1.28.0 - ISC
|
|
1153
|
+
*
|
|
1154
|
+
* This source code is licensed under the ISC license.
|
|
1155
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
1156
|
+
*/const sL=[["path",{d:"M12 2v10",key:"mnfbl"}],["path",{d:"M18.4 6.6a9 9 0 1 1-12.77.04",key:"obofu9"}]],cL=ve("power",sL);/**
|
|
1157
|
+
* @license lucide-react v1.28.0 - ISC
|
|
1158
|
+
*
|
|
1159
|
+
* This source code is licensed under the ISC license.
|
|
1160
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
1161
|
+
*/const uL=[["path",{d:"M2 3h20",key:"91anmk"}],["path",{d:"M21 3v11a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V3",key:"2k9sn8"}],["path",{d:"m7 21 5-5 5 5",key:"bip4we"}]],gy=ve("presentation",uL);/**
|
|
1162
|
+
* @license lucide-react v1.28.0 - ISC
|
|
1163
|
+
*
|
|
1164
|
+
* This source code is licensed under the ISC license.
|
|
1165
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
1166
|
+
*/const dL=[["path",{d:"m15 14 5-5-5-5",key:"12vg1m"}],["path",{d:"M20 9H9.5A5.5 5.5 0 0 0 4 14.5A5.5 5.5 0 0 0 9.5 20H13",key:"6uklza"}]],fL=ve("redo-2",dL);/**
|
|
1167
|
+
* @license lucide-react v1.28.0 - ISC
|
|
1168
|
+
*
|
|
1169
|
+
* This source code is licensed under the ISC license.
|
|
1170
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
1171
|
+
*/const hL=[["path",{d:"m15.194 13.707 3.814 1.86-1.86 3.814",key:"16shm9"}],["path",{d:"M16.47214 7.52786 A 5 10 0 1 0 13 21.79796",key:"1245p8"}],["path",{d:"M21.79796 11 A 10 5 0 1 0 19 15.57071",key:"1i40ks"}]],yy=ve("rotate-3d",hL);/**
|
|
1172
|
+
* @license lucide-react v1.28.0 - ISC
|
|
1173
|
+
*
|
|
1174
|
+
* This source code is licensed under the ISC license.
|
|
1175
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
1176
|
+
*/const mL=[["path",{d:"M21 12a9 9 0 1 1-9-9c2.52 0 4.93 1 6.74 2.74L21 8",key:"1p45f6"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}]],pL=ve("rotate-cw",mL);/**
|
|
1177
|
+
* @license lucide-react v1.28.0 - ISC
|
|
1178
|
+
*
|
|
1179
|
+
* This source code is licensed under the ISC license.
|
|
1180
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
1181
|
+
*/const gL=[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]],by=ve("search",gL);/**
|
|
1182
|
+
* @license lucide-react v1.28.0 - ISC
|
|
1183
|
+
*
|
|
1184
|
+
* This source code is licensed under the ISC license.
|
|
1185
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
1186
|
+
*/const yL=[["path",{d:"M9.671 4.136a2.34 2.34 0 0 1 4.659 0 2.34 2.34 0 0 0 3.319 1.915 2.34 2.34 0 0 1 2.33 4.033 2.34 2.34 0 0 0 0 3.831 2.34 2.34 0 0 1-2.33 4.033 2.34 2.34 0 0 0-3.319 1.915 2.34 2.34 0 0 1-4.659 0 2.34 2.34 0 0 0-3.32-1.915 2.34 2.34 0 0 1-2.33-4.033 2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915",key:"1i5ecw"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]],bL=ve("settings",yL);/**
|
|
1187
|
+
* @license lucide-react v1.28.0 - ISC
|
|
1188
|
+
*
|
|
1189
|
+
* This source code is licensed under the ISC license.
|
|
1190
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
1191
|
+
*/const vL=[["path",{d:"M12 2v13",key:"1km8f5"}],["path",{d:"m16 6-4-4-4 4",key:"13yo43"}],["path",{d:"M4 12v8a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-8",key:"1b2hhj"}]],xL=ve("share",vL);/**
|
|
1192
|
+
* @license lucide-react v1.28.0 - ISC
|
|
1193
|
+
*
|
|
1194
|
+
* This source code is licensed under the ISC license.
|
|
1195
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
1196
|
+
*/const wL=[["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"}]],kL=ve("sparkles",wL);/**
|
|
1197
|
+
* @license lucide-react v1.28.0 - ISC
|
|
1198
|
+
*
|
|
1199
|
+
* This source code is licensed under the ISC license.
|
|
1200
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
1201
|
+
*/const SL=[["path",{d:"M12.586 2.586A2 2 0 0 0 11.172 2H4a2 2 0 0 0-2 2v7.172a2 2 0 0 0 .586 1.414l8.704 8.704a2.426 2.426 0 0 0 3.42 0l6.58-6.58a2.426 2.426 0 0 0 0-3.42z",key:"vktsd0"}],["circle",{cx:"7.5",cy:"7.5",r:".5",fill:"currentColor",key:"kqv944"}]],EL=ve("tag",SL);/**
|
|
1202
|
+
* @license lucide-react v1.28.0 - ISC
|
|
1203
|
+
*
|
|
1204
|
+
* This source code is licensed under the ISC license.
|
|
1205
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
1206
|
+
*/const _L=[["path",{d:"M10 11v6",key:"nco0om"}],["path",{d:"M14 11v6",key:"outv1u"}],["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",key:"miytrc"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",key:"e791ji"}]],vl=ve("trash-2",_L);/**
|
|
1207
|
+
* @license lucide-react v1.28.0 - ISC
|
|
1208
|
+
*
|
|
1209
|
+
* This source code is licensed under the ISC license.
|
|
1210
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
1211
|
+
*/const jL=[["path",{d:"M16 7h6v6",key:"box55l"}],["path",{d:"m22 7-8.5 8.5-5-5L2 17",key:"1t1m79"}]],OL=ve("trending-up",jL);/**
|
|
1212
|
+
* @license lucide-react v1.28.0 - ISC
|
|
1213
|
+
*
|
|
1214
|
+
* This source code is licensed under the ISC license.
|
|
1215
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
1216
|
+
*/const AL=[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]],NL=ve("triangle-alert",AL);/**
|
|
1217
|
+
* @license lucide-react v1.28.0 - ISC
|
|
1218
|
+
*
|
|
1219
|
+
* This source code is licensed under the ISC license.
|
|
1220
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
1221
|
+
*/const ML=[["path",{d:"M12 4v16",key:"1654pz"}],["path",{d:"M4 7V5a1 1 0 0 1 1-1h14a1 1 0 0 1 1 1v2",key:"e0r10z"}],["path",{d:"M9 20h6",key:"s66wpe"}]],CL=ve("type",ML);/**
|
|
1222
|
+
* @license lucide-react v1.28.0 - ISC
|
|
1223
|
+
*
|
|
1224
|
+
* This source code is licensed under the ISC license.
|
|
1225
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
1226
|
+
*/const RL=[["path",{d:"M9 14 4 9l5-5",key:"102s5s"}],["path",{d:"M4 9h10.5a5.5 5.5 0 0 1 5.5 5.5a5.5 5.5 0 0 1-5.5 5.5H11",key:"f3b9sd"}]],TL=ve("undo-2",RL);/**
|
|
1227
|
+
* @license lucide-react v1.28.0 - ISC
|
|
1228
|
+
*
|
|
1229
|
+
* This source code is licensed under the ISC license.
|
|
1230
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
1231
|
+
*/const DL=[["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"}]],Kd=ve("upload",DL);/**
|
|
1232
|
+
* @license lucide-react v1.28.0 - ISC
|
|
1233
|
+
*
|
|
1234
|
+
* This source code is licensed under the ISC license.
|
|
1235
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
1236
|
+
*/const LL=[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}],["line",{x1:"19",x2:"19",y1:"8",y2:"14",key:"1bvyxn"}],["line",{x1:"22",x2:"16",y1:"11",y2:"11",key:"1shjgl"}]],zL=ve("user-plus",LL);/**
|
|
1237
|
+
* @license lucide-react v1.28.0 - ISC
|
|
1238
|
+
*
|
|
1239
|
+
* This source code is licensed under the ISC license.
|
|
1240
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
1241
|
+
*/const $L=[["path",{d:"M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2",key:"975kel"}],["circle",{cx:"12",cy:"7",r:"4",key:"17ys0d"}]],UL=ve("user",$L);/**
|
|
1242
|
+
* @license lucide-react v1.28.0 - ISC
|
|
1243
|
+
*
|
|
1244
|
+
* This source code is licensed under the ISC license.
|
|
1245
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
1246
|
+
*/const IL=[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["path",{d:"M16 3.128a4 4 0 0 1 0 7.744",key:"16gr8j"}],["path",{d:"M22 21v-2a4 4 0 0 0-3-3.87",key:"kshegd"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}]],HL=ve("users",IL);/**
|
|
1247
|
+
* @license lucide-react v1.28.0 - ISC
|
|
1248
|
+
*
|
|
1249
|
+
* This source code is licensed under the ISC license.
|
|
1250
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
1251
|
+
*/const BL=[["path",{d:"m16 13 5.223 3.482a.5.5 0 0 0 .777-.416V7.87a.5.5 0 0 0-.752-.432L16 10.5",key:"ftymec"}],["rect",{x:"2",y:"6",width:"14",height:"12",rx:"2",key:"158x01"}]],vy=ve("video",BL);/**
|
|
1252
|
+
* @license lucide-react v1.28.0 - ISC
|
|
1253
|
+
*
|
|
1254
|
+
* This source code is licensed under the ISC license.
|
|
1255
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
1256
|
+
*/const qL=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],xy=ve("x",qL);function ae(...e){return Jg(Xg(e))}const FL="flex flex-col gap-3.5 pt-1",Pr="flex flex-col gap-1",KE="text-[length:calc(11*var(--content))] font-medium text-ink-4 pl-0.5",xl="m-0 text-caption leading-[1.4] text-danger",YE="bg-[repeating-linear-gradient(135deg,rgba(20,18,13,0.05)_0_1px,transparent_1px_9px)]",vt="appearance-none cursor-pointer border-0 bg-transparent p-0 m-0 outline-none",PL="flex w-full items-stretch rounded-[calc(8*var(--content))] border border-line bg-white transition-[border-color,box-shadow] duration-[120ms] focus-within:border-accent focus-within:shadow-[0_0_0_3px_rgba(15,42,34,0.07)]",VL="min-w-0 flex-1 appearance-none border-0 bg-transparent px-2.75 py-2.25 text-[length:calc(13.5*var(--content))] text-ink outline-none placeholder:text-ink-4",wl=ae("data-[attention=required]:border-danger data-[attention=required]:bg-danger-soft","data-[attention=invalid]:border-danger data-[attention=invalid]:bg-danger-soft");function kl(e,t){return e===null||e==="required"&&!t?{}:{"data-attention":e}}const QE="flex items-center text-[length:calc(12.5*var(--content))] text-ink-4",GL=ae(vt,"min-w-0 flex-1 bg-transparent text-ink outline-none placeholder:text-ink-4"),KL="py-2.25",YL="text-[length:calc(13.5*var(--content))]",XE=ae(KL,YL),ZE="font-mono text-[length:calc(10.5*var(--content))] [font-feature-settings:'tnum'] shrink-0",WE="text-[#7a5a14]";function QL(e,t){const a=ae(ZE,"text-ink-4");return t==null?a:e>t?ae(a,"text-danger"):e>=t*.9?ae(a,WE):a}function XL({children:e}){return d.jsx("span",{className:KE,children:e})}function ZL({value:e,onChange:t,placeholder:a,inputMode:r,maxLength:l,spellCheck:c,className:u,ariaLabel:m,id:p}){return d.jsx("input",{id:p,className:ae(GL,u),value:e,placeholder:a,inputMode:r,maxLength:l,spellCheck:c,"aria-label":m,onChange:g=>t(g.target.value)})}function dn(e,t,a=1.5){const r=e;return function({size:c=t}={}){return d.jsx(r,{size:c,strokeWidth:a,style:{width:`calc(${c} * var(--content))`,height:`calc(${c} * var(--content))`}})}}const Rt={trash:dn(vl,11),plus:dn(Gd,14),up:dn(Kd,15),link:dn(M6,13),play:({size:e=20}={})=>d.jsx(GE,{size:e,strokeWidth:0,fill:"currentColor",style:{width:`calc(${e} * var(--content))`,height:`calc(${e} * var(--content))`}}),tour:dn(yy,18),search:dn(by,14),x:dn(xy,15),check:dn(Fd,13),minus:dn(Y6,16),external:dn(HE,11),grip:dn(hy,13,1.8),calendar:dn(jD,14),chevL:dn(UE,15),chevR:dn(dy,15),chevD:dn(uy,13)},Yd=x.createContext(null);function WL({ports:e,children:t}){return d.jsx(Yd.Provider,{value:e,children:t})}function Wt(){const e=x.useContext(Yd);if(!e)throw new Error("useSlotEditorPorts: missing SlotEditorPortsProvider");return e}function JL(){var e;return(e=x.useContext(Yd))==null?void 0:e.fillMark}function e8(){var e;return(e=x.useContext(Yd))==null?void 0:e.isMediaProcessing}function Uo(e){return Wt().useEditorStore(e)}const t8="size-[calc(6*var(--content))] shrink-0 rounded-full bg-honey-ink";function Bs(e,t){const a=v4(t);return e===void 0||a===null?void 0:`${e}.${a}`}function qs(e,t){return e===void 0?void 0:`${e}.${t}`}function JE(e){return e==="list"||e==="media"||pn(e)}function n8(e){const t=JL();return t===void 0||e===void 0?null:t(e)}function i8({mark:e}){return e===null?null:d.jsxs("span",{"data-fill-mark":"line",className:"inline-flex items-center gap-[calc(6*var(--content))] text-[length:calc(11.5*var(--content))] text-ink-3",children:[d.jsx("span",{className:t8,"aria-hidden":"true"}),e]})}var Zi=k2();function a8(...e){return Jg(Xg(e))}const Qd=1e3,qa=Qd+200,r8=Qd+500;let o8=0;const Fa=[];let e_="",t_="";function l8(){if(Fa.length!==1||typeof document>"u")return;const e=document.body;e_=e.style.overflow,t_=e.style.paddingRight;const t=window.innerWidth-document.documentElement.clientWidth;e.style.overflow="hidden",t>0&&(e.style.paddingRight=`${t}px`)}function s8(){Fa.length===0&&(typeof document>"u"||(document.body.style.overflow=e_,document.body.style.paddingRight=t_))}function n_(){const e=++o8;return Fa.push(e),l8(),e}function Fp(e){const t=Fa.indexOf(e);t!==-1&&Fa.splice(t,1),s8()}function i_(e){const t=Fa.indexOf(e);return Qd+(t===-1?0:t)*10}function Nw(e){return Fa[Fa.length-1]===e}const c8="(prefers-reduced-motion: reduce)";function u8(){const[e,t]=x.useState(!1);return x.useEffect(()=>{if(typeof window>"u"||!window.matchMedia)return;const a=window.matchMedia(c8);t(a.matches);const r=l=>t(l.matches);return a.addEventListener("change",r),()=>a.removeEventListener("change",r)},[]),e}const d8={sm:"max-w-[calc(420*var(--frame))]",md:"max-w-[calc(520*var(--frame))]",lg:"max-w-[calc(800*var(--frame))]",xl:"max-w-[calc(1240*var(--frame))]",full:"max-w-[calc(100vw-80px)]"},f8='a[href],button:not([disabled]),textarea:not([disabled]),input:not([disabled]),select:not([disabled]),[tabindex]:not([tabindex="-1"])';function wy({open:e,onClose:t,className:a,size:r,closeOnBackdrop:l=!0,closeOnEsc:c=!0,labelledBy:u,ariaLabel:m,children:p}){const[g,b]=x.useState("closed"),v=x.useRef(null),k=x.useRef(null),w=x.useRef(null),[j,E]=x.useState(1e3),_=u8(),[C,O]=x.useState(p);e&&C!==p&&O(p),x.useEffect(()=>{e&&g==="closed"?b("open"):!e&&g==="open"&&b(_?"closed":"closing")},[e,g,_]),x.useEffect(()=>{var R;if(g==="open"&&v.current===null){w.current=document.activeElement??null;const F=n_();v.current=F,E(i_(F)),(R=k.current)==null||R.focus()}},[g]),x.useEffect(()=>{var R,F;g==="closed"&&v.current!==null&&(Fp(v.current),v.current=null,(F=(R=w.current)==null?void 0:R.focus)==null||F.call(R),w.current=null)},[g]),x.useEffect(()=>()=>{v.current!==null&&(Fp(v.current),v.current=null)},[]),x.useEffect(()=>{if(g!=="closing")return;const R=setTimeout(()=>b("closed"),400);return()=>clearTimeout(R)},[g]),x.useEffect(()=>{if(g!=="open"||!c)return;const R=F=>{F.key==="Escape"&&(v.current===null||!Nw(v.current)||(F.stopPropagation(),t()))};return document.addEventListener("keydown",R,!0),()=>document.removeEventListener("keydown",R,!0)},[g,c,t]),x.useEffect(()=>{if(g!=="open")return;const R=F=>{if(F.key!=="Tab"||v.current===null||!Nw(v.current))return;const L=k.current;if(!L)return;const T=L.querySelectorAll(f8);if(T.length===0){F.preventDefault();return}const H=T[0],ne=T[T.length-1];F.shiftKey&&document.activeElement===H?(F.preventDefault(),ne==null||ne.focus()):!F.shiftKey&&document.activeElement===ne&&(F.preventDefault(),H==null||H.focus())};return document.addEventListener("keydown",R,!0),()=>document.removeEventListener("keydown",R,!0)},[g]);const A=x.useCallback(R=>{R.target===R.currentTarget&&g==="closing"&&b("closed")},[g]);if(g==="closed"||typeof document>"u")return null;const D=g==="closing"?"closing":"open";return Zi.createPortal(d.jsx("div",{className:"hp-modal-backdrop","data-state":D,inert:D==="closing",style:{zIndex:j},onMouseDown:l?t:void 0,children:d.jsx("div",{ref:k,className:a8("hp-modal-panel",r?d8[r]:void 0,a),"data-state":D,role:"dialog","aria-modal":"true","aria-labelledby":u,"aria-label":m,tabIndex:-1,onMouseDown:R=>R.stopPropagation(),onAnimationEnd:A,children:e?p:C})}),document.body)}function a_(){const[e,t]=x.useState(Qd);return x.useEffect(()=>{const a=n_();return t(i_(a)),()=>Fp(a)},[]),e}const h8={youtube:"video",vimeo:"video"};function r_(e){const t=ac(e.startsWith("http")?e:`https://${e}`);if(t!==null){const a=Ya[t],r=a.kind==="tour"||a.kind==="video"?a.kind:void 0;return{key:t,name:a.label,kind:h8[t]??"link",...r?{media:r}:{}}}try{return{key:"web",name:new URL(e.startsWith("http")?e:`https://${e}`).hostname.replace(/^www\./,""),kind:"link"}}catch{return{key:"web",name:"Link",kind:"link"}}}const ky="bg-[#f7f6f2]",_n="bg-[#eceae3]",m8="[mask-image:var(--fade-down)]",p8="[background-image:var(--wash-soft)]";function fc({className:e,children:t}){return d.jsx("div",{"aria-hidden":"true",className:ae("pointer-events-none absolute inset-0 select-none overflow-hidden",m8,e),children:t})}function yd({icon:e,headline:t,line:a,lifted:r=!1}){return d.jsx("div",{className:ae("absolute inset-0 flex items-center justify-center-safe overflow-y-auto px-6 py-8",p8),children:d.jsxs("div",{className:"flex max-w-full flex-col items-center text-center",children:[d.jsx("span",{"data-lifted":r||void 0,className:"grid h-14 w-14 place-items-center rounded-full bg-[#f3f2ed] text-ink-2 transition-[translate] duration-200 ease-settle data-lifted:-translate-y-0.5 motion-reduce:transition-none","aria-hidden":"true",children:e}),d.jsx("div",{className:"mt-4 text-[length:calc(17*var(--content))] font-semibold tracking-[-0.01em] text-ink",children:t}),a?d.jsx("div",{className:"mt-1.5 text-[length:calc(14*var(--content))] text-ink-3",children:a}):null]})})}const Sy="inline-flex h-9 cursor-pointer items-center gap-1.5 whitespace-nowrap rounded-lg border px-3 text-[length:calc(12.5*var(--content))] font-medium transition-colors duration-150",Ey="border-line bg-canvas text-ink-2 hover:bg-[#f6f5f1] hover:text-ink",Xd="hp-anim-menu absolute z-[80] rounded-xl border border-line bg-canvas shadow-[0_1px_2px_rgba(20,18,13,0.04),0_12px_32px_-8px_rgba(20,18,13,0.16)]",o_="flex w-full cursor-pointer items-center gap-2.5 rounded-lg px-2.5 py-2 text-left text-[length:calc(12.5*var(--content))] text-ink-2 hover:bg-[#f6f5f1] hover:text-ink",Mw=ae(Sy,Ey,"font-semibold text-ink focus-visible:bg-[#f6f5f1] aria-expanded:bg-[#f6f5f1]"),g8={large:Mw,compact:ae(Mw,"h-8")},y8="size-[calc(15*var(--content))] shrink-0";function bd({add:e,size:t,onClick:a,buttonRef:r,expanded:l}){return d.jsxs("button",{ref:r,type:"button",...l!==void 0?{"aria-haspopup":"dialog","aria-expanded":l}:{},"data-list-verb":e.verb,className:g8[t],onClick:a,children:[d.jsx(e.icon,{"aria-hidden":"true",strokeWidth:2.4,className:y8}),e.label]})}function hc({size:e,add:t,onAdd:a,newChip:r,choose:l}){const c=l!==void 0?d.jsx(bd,{add:l.choose,size:e,onClick:l.onChoose}):r??(a!==null?d.jsx(bd,{add:t,size:e,onClick:a}):null);return c===null?null:d.jsx("div",{"data-list-verbs":"",className:"flex flex-wrap items-center gap-2",children:c})}const l_=x.createContext(null);function b8({api:e,children:t}){return d.jsx(l_.Provider,{value:e,children:t})}function _y(){const e=x.useContext(l_);if(!e)throw new Error("useMediaLibraryApi: missing MediaLibraryApiProvider");return e}async function v8(e,t,a){let r=0;const l=Math.max(1,Math.min(t,e.length)),c=Array.from({length:l},async()=>{for(;r<e.length;){const u=r++;try{await a(e[u],u)}catch{}}});await Promise.all(c)}const Cw=500*1024*1024,vd=[{extension:".pdf",mimeTypes:["application/pdf"],family:"pdf"},{extension:".csv",mimeTypes:["text/csv","application/vnd.ms-excel"],family:"spreadsheet"},{extension:".xlsx",mimeTypes:["application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"],family:"spreadsheet"},{extension:".docx",mimeTypes:["application/vnd.openxmlformats-officedocument.wordprocessingml.document"],family:"text-document"},{extension:".doc",mimeTypes:["application/msword"],family:"text-document"},{extension:".txt",mimeTypes:["text/plain"],family:"text-document"},{extension:".pptx",mimeTypes:["application/vnd.openxmlformats-officedocument.presentationml.presentation"],family:"presentation"}],s_=new Set(vd.map(e=>e.extension)),c_=new Set(vd.flatMap(e=>e.mimeTypes));function Zd(e){const t=e.indexOf(";");return(t===-1?e:e.slice(0,t)).trim().toLowerCase()}function jy(e){const t=Math.max(e.lastIndexOf("/"),e.lastIndexOf("\\")),a=e.slice(t+1),r=a.lastIndexOf(".");return r<=0?"":a.slice(r).toLowerCase()}function x8(e){return Zd(e).startsWith("image/")}function w8(e){return Zd(e).startsWith("video/")}function k8(e,t){return s_.has(jy(e))&&c_.has(Zd(t))}function S8(e,t){return x8(t)||w8(t)||k8(e,t)}function E8(e,t){const a=jy(e),r=vd.find(u=>u.extension===a);if(r)return r.family;const l=Zd(t),c=vd.find(u=>u.mimeTypes.includes(l));return c?c.family:null}const _8=[...c_,...s_].join(","),j8="an image, a video, or a document (PDF, Word, Excel .xlsx, PowerPoint .pptx, CSV, or text)";function O8(e){return e.replace(/^https?:\/\//i,"").replace(/\/$/,"")}function A8(e){switch(e){case"pdf":return{glyph:"doc",typeNoun:"PDF"};case"spreadsheet":return{glyph:"spreadsheet",typeNoun:"Spreadsheet"};case"text-document":return{glyph:"doc",typeNoun:"Document"};case"presentation":return{glyph:"presentation",typeNoun:"Presentation"}}}function u_(e,t){const a=E8(e,t),{glyph:r,typeNoun:l}=a===null?{glyph:"doc",typeNoun:"File"}:A8(a);return{glyph:r,typeNoun:l,extension:jy(e).replace(".","").toUpperCase()}}function N8(e){return e<1024?`${e} B`:e<1048576?`${(e/1024).toFixed(0)} KB`:`${(e/1048576).toFixed(1)} MB`}function xd(e){var t;return((t=e.renditions.poster)==null?void 0:t.url)??(e.kind==="image"?e.file_url:null)}function M8(e){var t;return e.kind!=="image"?xd(e):(rc(e.crop)?(t=e.renditions.crop)==null?void 0:t.url:void 0)??xd(e)}function d_(e){if(e.kind!=="image"||e.state==="failed")return!1;const{crop:t,cutout:a}=e.renditions;return t!==null&&rc(e.crop)&&!al(t.over.crop,e.crop)?!0:a!==null&&!al(a.over.crop,e.crop)}function C8(e){return e.url!==null||e.renditions.encode!==null}function f_(e){return e.url!==null&&f5(e.url)!==null}function Wd({renditions:e={},...t}){const a=new Set(eS),r=l=>{const c=e[l];if(c===void 0)return null;const u={key:c,mime:null,width:null,height:null,bytes:null,url:c};return a.has(l)?{...u,over:{crop:t.crop??null,options:{}}}:u};return{crop:null,key:t.file_url??null,mime:null,bytes:null,url:null,provider:null,added_at:"1970-01-01T00:00:00.000Z",account:null,page_count:null,duration_ms:null,width:null,height:null,captured_at:null,scan_count:null,poster_at_ms:null,state:"ready",file_url:null,file:t.id,...t,renditions:Object.fromEntries(y5.map(l=>[l,r(l)]))}}function h_(e){var t,a,r,l;switch(e.kind){case"image":return{id:e.id,kind:"photo",name:e.name,size:"",src:((t=e.renditions.cutout)==null?void 0:t.url)??xd(e)??""};case"video":return{id:e.id,kind:"video",name:e.name,size:"",src:((a=e.renditions.poster)==null?void 0:a.url)??"",ready:C8(e),durationMs:e.renditions.encode===null?null:e.duration_ms,videoSource:k5(e),...e.provider!==null?{provider:e.provider}:{}};case"tour":return{id:e.id,kind:"tour",name:e.name,size:"",src:((r=e.renditions.poster)==null?void 0:r.url)??"",ready:f_(e),provider:e.provider??""};case"document":return{id:e.id,kind:"document",name:e.name,size:e.bytes!==null&&e.bytes>0?N8(e.bytes):"",src:((l=e.renditions.poster)==null?void 0:l.url)??"",mime:e.mime??""}}}function R8(e){if(e==null||!Number.isFinite(e)||e<0)return"";const t=Math.round(e/1e3),a=Math.floor(t/60),r=t%60;return`${a}:${String(r).padStart(2,"0")}`}const T8=5;function Rw(e){return`${Math.round(e/(1024*1024))} MB`}function D8(e){return e.size>Cw?{ok:!1,message:`This file is ${Rw(e.size)}. The maximum upload size is ${Rw(Cw)}.`}:S8(e.name,e.type)?{ok:!0}:{ok:!1,message:`This file type (${e.type||"unknown"}) isn't supported. Upload ${j8}.`}}function L8(e){return e.attempt?{kind:"resume",attempt:e.attempt}:{kind:"fresh"}}function Jd(e){const{mediaFactsQuery:t}=_y(),a=t(e??"");return qd({...a,select:r=>r.facts,enabled:!!e}).data}async function Pp(e,t,a){await e.invalidateQueries({queryKey:t.mediaFactsQuery(a).queryKey})}const z8=new Map;function $8(e){if(e===void 0)return z8;const t=new Map;for(const[a,r]of $d(e)){if(!Object.hasOwn(e.files,r.file))continue;const l=e.files[r.file];"renditions"in l&&t.set(a,Og(l,r))}return t}function Sl(e){const t=Jd(e===""?null:e);return x.useMemo(()=>$8(t),[t])}const U8={search:by,chevd:uy,chevr:dy,chevl:UE,grid:FE,list:PE,plus:Gd,choose:$E,cloud:fy,dots:WD,trash:vl,down:IE,x:xy,check:Fd,warn:NL,recheck:pL,play:GE,eye:BE,pencil:py,crop:KD,image:Vd,doc:Pd,spreadsheet:qE,presentation:gy,file:d6,video:vy,tour:cy,upload:Kd};function it({name:e,size:t=14,stroke:a=1.8}){const r=U8[e];if(!r)return null;const l={width:`calc(${t} * var(--content))`,height:`calc(${t} * var(--content))`};return e==="play"?d.jsx(r,{size:t,strokeWidth:a,fill:"currentColor",style:l}):d.jsx(r,{size:t,strokeWidth:a,style:l})}const Oy={image:{process:[_t.probe(),_t.understand(),_t.preview(),_t.ladder()],gates:["probe","understand"],publishes:["preview","ladder"]},video:{process:[_t.probe(),_t.transcode(),_t.poster(),_t.understand(),_t.preview(),_t.ladder(),_t.fetch()],gates:["probe","understand"],publishes:["transcode","poster","preview","ladder"]},document:{process:[_t.probe(),_t.understand(),_t.poster(),_t.rasterize(),_t.preview(),_t.ladder()],gates:["probe","understand"],publishes:["poster","preview","ladder"]},tour:{process:[_t.fetch(),_t.tour_details(),_t.understand()],gates:["understand"],publishes:[]}};function I8(e){for(const t of Kr){const a=e[t];if(a===void 0)return`has no row for ${t} — every media kind has one`;const r=new Set;for(const l of a.process){const c=K2(l);if(c===null||typeof l!="object")return`${t}'s row lists ${JSON.stringify(l)}, which is no process binding`;const u=Ka[c.verb];if(u.site!=="kind")return`${t}'s row lists "${c.verb}", a holder's process — a row lists kind-site processes only`;if(!u.kinds.includes(t))return`${t}'s row lists "${c.verb}", which applies to ${u.kinds.join(", ")} and not to ${t}`;const m=kg(c);if(m!==null)return`${t}'s row lists "${c.verb}" with options that do not fit: ${m}`;if(r.has(c.verb))return`${t}'s row lists "${c.verb}" twice — a row runs each process once`;r.add(c.verb)}for(const l of a.gates)if(!r.has(l))return`${t}'s row gates on "${l}", which is not on its row`;for(const l of a.publishes)if(!r.has(l))return`${t}'s row publishes on "${l}", which is not on its row`}return null}const Tw=I8(Oy);if(Tw!==null)throw new Error(`KIND_TABLE ${Tw}.`);const H8={original:e=>e.key!==null,"pageable original":e=>e.key!==null&&e.mime==="application/pdf",master:e=>e.key!==null,poster:e=>e.renditions.poster!==null,link:e=>e.url!==null&&e.provider!==null,"any original":e=>e.key!==null||e.url!==null&&e.provider!==null},B8={probe:"original",understand:"any original",transcode:"original",poster:{video:"original",document:"pageable original"},rasterize:"pageable original",preview:{image:"master",video:"poster",document:"poster"},ladder:{image:"master",video:"poster",document:"poster"},fetch:"link",tour_details:"link"};function q8(e,t){const a=B8[e];if(typeof a=="string")return a;const r=a[t];if(r===void 0)throw new Error(`kindRow(${t}): "${e}" names no input for ${t}.`);return r}const m_={image:[],video:[{before:"poster",after:"preview"},{before:"poster",after:"ladder"},{before:"fetch",after:"understand"}],document:[{before:"poster",after:"preview"},{before:"poster",after:"ladder"}],tour:[{before:"fetch",after:"tour_details"},{before:"fetch",after:"understand"}]};for(const e of Kr){const t=Oy[e].process.map(a=>a.verb);for(const{before:a,after:r}of m_[e])if(!t.includes(a)||!t.includes(r))throw new Error(`KIND_TABLE: ${e}'s edge ${a} → ${r} names a verb not on its row.`)}const Dw=new Map,F8={image:[_t.crop()],video:[],document:[],tour:[]};for(const e of Kr)for(const t of F8[e]){const a=Ka[t.verb];if(a.site!=="place"||!a.kinds.includes(e))throw new Error(`PLACE_TABLE: ${e}'s row lists "${t.verb}", which is no place process of ${e}.`)}function P8(e){const t=Dw.get(e);if(t!==void 0)return t;const a=Oy[e],r=a.process.map(c=>{const u=q8(c.verb,e);return{verb:c.verb,binding:c,input:u,present:H8[u],gates:a.gates.includes(c.verb),publishes:a.publishes.includes(c.verb)}}),l={kind:e,entries:r,edges:m_[e],gates:a.gates};return Dw.set(e,l),l}const mc={image:{label:"Image",plural:"Images",icon:"image",solid:"bg-[#2F8A5B]",soft:"bg-[#E6F2EA] text-[#1F6440]"},video:{label:"Video",plural:"Videos",icon:"video",solid:"bg-[#D2463A]",soft:"bg-[#FBE8E5] text-[#9A2C20]"},document:{label:"Document",plural:"Documents",icon:"doc",solid:"bg-[#3F73D3]",soft:"bg-[#E7EEFB] text-[#2A55A5]"},tour:{label:"Tour",plural:"Tours",icon:"tour",solid:"bg-[#7C5BC9]",soft:"bg-[#EFEAFA] text-[#5A3EA0]"}},wd=Object.keys(mc);function jn(e){return"send"in e}function p_(e){return jn(e)?e.id:e.record.id}function V8(e){return e.renditions.poster!==null||e.state==="failed"?!1:e.url!==null?e.state==="processing":P8(e.kind).entries.some(t=>t.verb==="poster"&&t.present(e))}function G8(e){return e.url!==null&&e.state==="failed"}function Ms(e){return e.url!==null}function g_(e){return X2(/^https?:\/\//i.test(e)?e:`https://${e}`)}const K8=()=>0;function Y8({record:e,list:t,tier:a},r){const l=r(t);return{id:e.id,kind:e.kind,state:e.state==="processing"?"processing":"ready",name:e.name,bytes:e.bytes,mime:e.mime,url:e.url,thumbnailUrl:M8(e),addedAt:Date.parse(e.added_at),previewPending:V8(e),linkUnreachable:G8(e),inFlight:!1,error:null,list:t,tier:a??l,upstream:l>0}}function Q8(e){const{send:t}=e;return{id:e.id,kind:e.kind,state:t.state==="uploading"?"uploading":t.state==="saving"?"processing":"failed",name:e.name,bytes:e.bytes,mime:e.mime,url:e.url,thumbnailUrl:e.preview,addedAt:e.addedAt,previewPending:!1,linkUnreachable:!1,inFlight:!0,...t.state==="uploading"?{progress:t.progress}:{},error:t.state==="failed"?t.error:null,list:e.list,tier:0,upstream:!1}}function X8(e,t=K8){return jn(e)?Q8(e):Y8(e,t)}function Lw(e){return e.kind===null?wd.length:wd.indexOf(e.kind)}const Z8={name:(e,t)=>e.name.localeCompare(t.name),kind:(e,t)=>Lw(e)-Lw(t)||t.addedAt-e.addedAt,size:(e,t)=>(t.bytes??0)-(e.bytes??0),date:(e,t)=>t.addedAt-e.addedAt,custom:(e,t)=>Number(t.inFlight)-Number(e.inFlight)};function W8(e,t,a){const r=t==="all"?[...e]:e.filter(c=>c.kind===t),l=Z8[a];return r.sort((c,u)=>c.tier-u.tier||l(c,u))}function J8(e){const t={all:e.length};for(const a of wd)t[a]=0;for(const a of e)a.kind&&(t[a.kind]+=1);return t}function y_(e){return e===null?"":e<1024?`${e} B`:e<1024*1024?`${(e/1024).toFixed(0)} KB`:e<1024*1024*1024?`${(e/(1024*1024)).toFixed(1)} MB`:`${(e/(1024*1024*1024)).toFixed(1)} GB`}function b_(e,t=Date.now()){const a=new Date(e),r=new Date(t),l=u=>new Date(u.getFullYear(),u.getMonth(),u.getDate()).getTime(),c=Math.round((l(r)-l(a))/864e5);return c<=0?"Today":c===1?"Yesterday":a.toLocaleDateString("en-US",{month:"short",day:"numeric"})}function ez(e){const[t,a]=x.useState(e);return(e===null||t===null)&&t!==e&&a(e),x.useEffect(()=>{if(e===null||t===null||e===t)return;let r=!0;const l=new Image,c=()=>{r&&a(e)};return l.onload=c,l.onerror=c,l.src=e,()=>{r=!1,l.onload=null,l.onerror=null}},[e,t]),e===null?null:t}const tz="inline-flex items-center gap-1 whitespace-nowrap rounded-full px-2 py-0.75 text-[length:calc(10.5*var(--content))] font-semibold tracking-[0.01em]",nz={dot:{box:"h-4 w-4 rounded-[calc(4*var(--content))]",glyph:10},mark:{box:"h-5 w-5 rounded-md",glyph:12},lead:{box:"h-6 w-6 rounded-md",glyph:14},thumb:{box:"h-5.5 w-5.5 rounded-md",glyph:13},logo:{box:"h-14 w-14 rounded-2xl",glyph:28},hero:{box:"h-20 w-20 rounded-[calc(22*var(--content))]",glyph:40}};function Vr({kind:e,size:t="mark",glyph:a,decorative:r=!1}){const l=mc[e],c=nz[t];return d.jsx("span",{className:ae("inline-grid shrink-0 place-items-center text-white",c.box,l.solid),...r?{"aria-hidden":!0}:{role:"img","aria-label":l.label},children:d.jsx(it,{name:a??l.icon,size:c.glyph,stroke:2})})}function v_({file:e}){if(e.kind===null)return null;const t=mc[e.kind];return d.jsxs("span",{className:ae(tz,t.soft),children:[d.jsx(it,{name:t.icon,size:10,stroke:2.2}),t.label]})}function iz(e){const t=e.url!==null?r_(e.url).name:e.bytes!==null?y_(e.bytes):"",a=b_(e.addedAt);return t?`${t} · ${a}`:a}function az(e){return u_(e.name,e.mime??"").glyph}function rz(e){return`flex items-center justify-center rounded-full border-[1.5px] border-white/85 bg-[rgba(10,12,10,0.55)] pl-0.5 text-white backdrop-blur-[2px] ${e?"h-13 w-13":"h-9 w-9"}`}const oz={row:"thumb",card:"logo",lightbox:"hero"};function Ay({file:e,face:t="card"}){const a=ez(e.thumbnailUrl);if(a)return d.jsx("div",{"data-preview":"image",className:"relative h-full w-full bg-cover bg-top",style:{backgroundImage:`url("${a}")`},children:e.kind==="video"?d.jsx("span",{className:`absolute inset-0 m-auto ${rz(t==="lightbox")}`,children:d.jsx(it,{name:"play",size:t==="lightbox"?20:14})}):null});if(e.previewPending)return d.jsx("div",{"data-preview":"skeleton",className:"h-full w-full animate-pulse bg-line-soft/40"});const r=e.kind==="document"?az(e):void 0;return d.jsxs("div",{"data-preview":"fallback",className:"flex h-full w-full flex-col items-center justify-center gap-4 bg-canvas px-4 text-center",children:[e.kind===null?d.jsx("span",{className:"text-ink-4",children:d.jsx(it,{name:"file",size:t==="row"?16:32,stroke:1.6})}):d.jsx(Vr,{kind:e.kind,size:oz[t],decorative:!0,...r===void 0?{}:{glyph:r}}),t==="lightbox"?d.jsx("span",{className:"line-clamp-2 max-w-[80%] text-body text-ink-3",children:e.name}):null]})}const qu="absolute inset-0 z-[2] flex flex-col items-center justify-center gap-2 bg-[rgba(252,252,250,0.82)] p-2 text-center backdrop-blur-[2px]",x_="Can’t be reached",Vp="We couldn’t load this link. It may be private, unpublished, or mistyped. Fix it at the provider, then re-check.",Fu="absolute inset-0 z-[2] flex items-center justify-center bg-[rgba(252,252,250,0.82)] px-1";function w_({file:e,compact:t=!1,onRetry:a,onRecheck:r}){if(e.state==="uploading"){const l=e.progress??0;return d.jsx("div",{className:t?Fu:qu,children:d.jsx("span",{role:"progressbar","aria-label":"Uploading","aria-valuenow":Math.round(l),className:`h-1 overflow-hidden rounded-full bg-[#e3e0d2] ${t?"w-full":"w-[62%]"}`,children:d.jsx("span",{className:"block h-full rounded-full bg-accent transition-[width] duration-[180ms]",style:{width:`${l}%`}})})})}return e.state==="processing"?d.jsx("div",{className:t?Fu:qu,children:d.jsx("span",{role:"progressbar","aria-label":"Loading",className:"h-3.5 w-3.5 animate-spin rounded-full border-2 border-[#d9d5c6] border-t-accent [animation-duration:0.7s]"})}):e.state==="failed"&&t?d.jsx("div",{className:`${Fu} text-danger`,title:e.error??void 0,children:d.jsx(it,{name:"warn",size:13})}):e.state==="failed"?d.jsxs("div",{className:`${qu} text-[length:calc(11.5*var(--content))] font-semibold text-danger`,children:[d.jsx(it,{name:"warn",size:15}),d.jsx("span",{className:"max-w-[85%] truncate",children:e.error}),a?d.jsx("button",{type:"button",className:"rounded-full border border-line bg-canvas px-2.75 py-1 text-[length:calc(11*var(--content))] font-semibold text-ink hover:border-[#d9d6cb]",onClick:l=>{l.stopPropagation(),a()},children:"Retry"}):null]}):e.linkUnreachable&&t?d.jsx("div",{className:`${Fu} text-warn`,title:Vp,children:d.jsx(it,{name:"warn",size:13})}):e.linkUnreachable?d.jsxs("div",{className:`${qu} text-[length:calc(11.5*var(--content))] font-semibold text-warn`,title:Vp,children:[d.jsx(it,{name:"warn",size:15}),d.jsx("span",{className:"max-w-[90%]",children:x_}),r?d.jsxs("button",{type:"button",className:"inline-flex items-center gap-1.5 rounded-full border border-line bg-canvas px-2.75 py-1 text-[length:calc(11*var(--content))] font-semibold text-ink hover:border-[#d9d6cb]",onClick:l=>{l.stopPropagation(),r()},children:[d.jsx(it,{name:"recheck",size:11}),"Re-check"]}):null]}):null}function pc(e,t,a,r){x.useEffect(()=>{if(!t)return;const l=u=>{var p,g;const m=u.target;!((p=e.current)!=null&&p.contains(m))&&!((g=r==null?void 0:r.current)!=null&&g.contains(m))&&a()},c=u=>{u.key!=="Escape"||u.defaultPrevented||(u.preventDefault(),a())};return document.addEventListener("pointerdown",l,!0),document.addEventListener("keydown",c),window.addEventListener("blur",a),()=>{document.removeEventListener("pointerdown",l,!0),document.removeEventListener("keydown",c),window.removeEventListener("blur",a)}},[e,t,a,r])}function k_({inputRef:e,accept:t,onFiles:a,disabled:r,multiple:l=!0}){return d.jsx("input",{ref:e,type:"file",multiple:l,hidden:!0,accept:t,onChange:c=>{!r&&c.target.files&&c.target.files.length>0&&a(Array.from(c.target.files)),c.target.value=""}})}function kd(e,t="or"){return e.length<2?e[0]??"":`${e.slice(0,-1).join(", ")} ${t} ${e.at(-1)}`}const S_=["tour","video"],lz={tour:"3D tour",video:"video"};function Ny(e){return S_.filter(t=>e.includes(t)).flatMap(t=>lz[t]??[])}function sz(e,t){const a=l=>e.includes(l);if(t.accept!==null){const l=[...a("image")?["photos"]:[],...a("image")&&a("document")?["floor plans"]:[],...a("document")?["documents"]:[],...a("video")?["video"]:[]];return l.length===0?null:`Drop ${kd(l)} anywhere here`}if(!t.onLink)return null;const r=Ny(e);return r.length===0?null:`Paste a link to a ${kd(r)}`}function cz(e,t){const a=e.trim();if(!a)return{state:"empty"};const r=g_(a);return r===null||!t.includes(r)?{state:"refused"}:{state:"ok",kind:r,provider:r_(a).name}}function uz(e,t,a){const[r,l]=x.useState(""),c=cz(r,a),u=!t&&c.state==="ok";return{value:r,setValue:l,verdict:c,canAdd:u,submit:p=>{p.preventDefault(),p.stopPropagation(),u&&(e(r.trim()),l(""))},kinds:a}}function dz({verdict:e,kinds:t,className:a}){return d.jsx("div",{className:ae("flex items-center gap-2 text-[length:calc(11.5*var(--content))]",a),"aria-live":"polite",children:e.state==="ok"?d.jsxs(d.Fragment,{children:[d.jsx(Vr,{kind:e.kind,decorative:!0}),d.jsxs("span",{className:"font-medium text-ink-2",children:[e.provider," ",mc[e.kind].label.toLowerCase()]})]}):e.state==="refused"?d.jsxs("span",{className:"text-warn",children:["Only ",kd(Ny(t),"and")," links can be added."]}):null})}const fz="shrink-0 cursor-pointer border border-honey-2 bg-honey font-semibold text-honey-ink transition-colors duration-150 hover:bg-honey-2 disabled:cursor-default disabled:border-line disabled:bg-[#f0efe9] disabled:text-ink-4";function hz({draft:e}){return d.jsxs("div",{className:"flex h-10 items-center rounded-lg border border-line bg-canvas py-1 pl-3 pr-1 transition-[border-color,box-shadow] duration-150 hover:border-ink-4 focus-within:border-ink-3 focus-within:shadow-[0_0_0_3px_rgba(20,18,13,0.05)]",children:[d.jsx("span",{className:"grid shrink-0 place-items-center text-ink-3","aria-hidden":"true",children:d.jsx(my,{size:15})}),d.jsx("input",{className:"h-full min-w-0 flex-1 appearance-none border-0 bg-transparent px-2.5 py-0 text-body text-ink placeholder:text-ink-4",type:"url",inputMode:"url",placeholder:`Paste a ${kd(Ny(e.kinds))} link`,"aria-label":"Link URL",autoFocus:!0,value:e.value,onChange:t=>e.setValue(t.target.value),onKeyDown:t=>{t.key==="Enter"&&e.submit(t)}}),d.jsx("button",{type:"button",disabled:!e.canAdd,onClick:e.submit,className:ae(fz,"h-8 rounded-md px-3 text-[length:calc(12.5*var(--content))]"),children:"New link"})]})}function mz({add:e,kinds:t,dragging:a}){if(e===null)return d.jsx(yd,{icon:d.jsx(qp,{size:25,strokeWidth:1.8}),headline:"Nothing here yet"});const r=sz(t,e);return d.jsx(yd,{icon:e.accept!==null?d.jsx(fy,{size:25,strokeWidth:1.8}):d.jsx(my,{size:24,strokeWidth:1.8}),headline:a?"Drop to upload":"Nothing uploaded yet",...r!==null?{line:r}:{},lifted:a})}function pz({onChoose:e,detail:t}){return d.jsxs("button",{type:"button",onClick:e,className:"group flex w-full cursor-pointer items-center gap-3 rounded-lg border-0 bg-transparent px-2.5 py-2.5 text-left hover:bg-[#f6f5f1] focus-visible:bg-[#f6f5f1]",children:[d.jsx("span",{className:"grid h-9 w-9 shrink-0 place-items-center rounded-lg bg-[#f3f2ed] text-ink-2 transition-colors duration-150 group-hover:bg-canvas group-hover:text-ink group-focus-visible:bg-canvas group-focus-visible:text-ink","aria-hidden":"true",children:d.jsx(fy,{size:18,strokeWidth:1.9})}),d.jsxs("span",{className:"flex min-w-0 flex-col",children:[d.jsx("span",{className:"text-body font-semibold text-ink",children:"Upload files"}),t!==void 0?d.jsx("span",{className:"text-[length:calc(11.5*var(--content))] text-ink-3",children:t}):null]})]})}function gz({onAdd:e,disabled:t,kinds:a}){const r=uz(e,t,a);return d.jsxs("div",{className:"flex flex-col gap-2 px-1 pb-1",children:[d.jsx(hz,{draft:r}),d.jsx(dz,{verdict:r.verdict,kinds:a,className:"px-0.5 empty:hidden"})]})}function E_({add:e,onBrowse:t,onLinked:a,uploadDetail:r}){return d.jsxs(d.Fragment,{children:[e.accept!==null?d.jsx(pz,{onChoose:t,...r!==void 0?{detail:r}:{}}):d.jsx("div",{className:"px-1.5 pb-0.5 pt-1 text-body font-semibold text-ink",children:"New link"}),d.jsx(gz,{onAdd:l=>{e.onLink(l),a()},disabled:e.disabled,kinds:e.linkKinds??S_})]})}function yz({add:e,verb:t}){const{accept:a,onFiles:r,onLink:l,disabled:c}=e,[u,m]=x.useState(!1),p=x.useRef(null),g=x.useRef(null),b=x.useCallback(()=>m(!1),[]);pc(p,u,b);const v=()=>{var w;b(),(w=g.current)==null||w.click()},k=()=>{u?b():l?m(!0):v()};return d.jsxs("div",{className:"relative",ref:p,onClick:w=>w.stopPropagation(),children:[a!==null?d.jsx(k_,{inputRef:g,accept:a,onFiles:r,disabled:c}):null,d.jsx(bd,{add:t,size:"large",onClick:k,...l?{expanded:u}:{}}),u&&l?d.jsx("div",{className:`${Xd} left-0 top-[calc(100%+6*var(--content))] flex w-[calc(360*var(--frame))] flex-col gap-1.5 p-1.5`,role:"dialog","aria-label":t.verb,children:d.jsx(E_,{add:{...e,onLink:l},onBrowse:v,onLinked:b,uploadDetail:"Photos, floor plans, documents or video"})}):null]})}function __(e,t,a,r=!0){const{accept:l,onFiles:c,onLink:u,disabled:m}=e,[p,g]=x.useState(!1),[b,v]=x.useState(null),k=x.useRef(null),w=x.useRef(null),j=x.useCallback(()=>{g(!1),v(null)},[]);pc(a,p,j,k),x.useLayoutEffect(()=>{if(!p)return;const C=()=>{const O=a.current,A=k.current;if(!O||!A)return;const D=A.offsetHeight,R=hl(Hr(O),{height:D,maxHeight:D,minWidth:A.offsetWidth});v(R?{left:R.left,top:R.top,bottom:R.bottom}:null)};return C(),window.addEventListener("scroll",C,!0),window.addEventListener("resize",C),()=>{window.removeEventListener("scroll",C,!0),window.removeEventListener("resize",C)}},[p,a]);const E=()=>{var C;j(),(C=w.current)==null||C.click()},_=d.jsxs(d.Fragment,{children:[l!==null?d.jsx(k_,{inputRef:w,accept:l,onFiles:c,disabled:m,multiple:r}):null,p&&u?Zi.createPortal(d.jsx("div",{ref:k,className:`we-no-drag ${Xd} flex w-[calc(360*var(--frame))] flex-col gap-1.5 p-1.5`,style:b?{position:"fixed",...b,zIndex:qa}:{position:"fixed",top:0,left:0,zIndex:qa,opacity:0,pointerEvents:"none"},role:"dialog","aria-label":t,onClick:C=>C.stopPropagation(),children:d.jsx(E_,{add:{...e,onLink:u},onBrowse:E,onLinked:j})}),document.body):null]});return{start:()=>{u?p?j():g(!0):E()},...u?{expanded:p}:{},node:_}}function bz({add:e,intake:t,trigger:a}){const r=x.useRef(null),l=__(t,e.label,r);return d.jsxs(d.Fragment,{children:[l.node,a({buttonRef:r,...l.expanded!==void 0?{expanded:l.expanded}:{},onClick:l.start})]})}const vz="relative cursor-grab touch-none select-none",xz="relative grid grid-cols-[repeat(auto-fill,minmax(calc(150*var(--frame)),1fr))] gap-2.5",wz={compact:"flex flex-col gap-2.5",large:"flex flex-col gap-3"},zw=new Set;function My(e,t,a){const r=a!==null?{kind:"take",intake:a}:t!==null?{kind:"choose",open:t}:null;return{add:e.add,onAdd:r,choose:e.choose!==null&&t!==null?{choose:e.choose,onChoose:t}:void 0}}function El(e,t,a,r,l){const c=new Set(t.map(g=>g.id)),u=e.filter(g=>{const b=a(g.value);return b===null||c.has(b)}),m=new Set(u.map(g=>a(g.value)));return[...t.filter(g=>!m.has(g.id)).map(g=>l(r(g))),...u]}function Cy({engine:e,label:t,noun:a,size:r,onAdd:l,add:c,choose:u,renderTile:m,tileActions:p,onRemove:g,children:b}){const{rows:v,canAdd:k,canRemove:w}=e,{containerRef:j,getItemProps:E}=e.drag,[_,C]=x.useState(zw),O=v.filter(H=>_.has(H.key)),A=O.map(H=>H.key),D=H=>C(ne=>{const Y=new Set(ne);return Y.has(H)?Y.delete(H):Y.add(H),Y}),R=()=>C(zw),F=H=>{g?g(H):e.removeMany(H.map(ne=>ne.key)),R()},L=H=>{if(!w)return null;const ne=_.has(H.key)&&O.length>1?O:null;return ne?{label:`Remove ${ne.length} ${a}s`,glyph:"trash",danger:!0,onSelect:()=>F(ne)}:{label:"Remove",glyph:"trash",danger:!0,onSelect:()=>F([H])}},T=k?d.jsx(hc,{size:r,add:c,onAdd:(l==null?void 0:l.kind)==="choose"?l.open:null,...(l==null?void 0:l.kind)==="take"?{newChip:d.jsx(bz,{add:c,intake:l.intake,trigger:H=>d.jsx(bd,{add:c,size:r,...H})})}:{},choose:u}):null;return d.jsxs("div",{className:Pr,children:[d.jsxs("div",{className:wz[r],children:[T,v.length===0?r==="large"&&d.jsx("div",{className:"py-4.5 text-center text-small text-ink-3",children:c.empty}):d.jsx("div",{className:xz,ref:j,onClick:H=>{H.target===H.currentTarget&&R()},children:d.jsx("div",{className:"contents",role:"listbox","aria-multiselectable":!0,"aria-label":t,onKeyDown:H=>{H.key!=="Escape"||A.length===0||(H.stopPropagation(),R())},children:v.map((H,ne)=>{const Y=L(H),le={selected:_.has(H.key),onToggleSelect:()=>D(H.key),actions:[...(p==null?void 0:p(H))??[],...Y?[Y]:[]]},K=_.has(H.key)&&A.length>1?A:void 0;return d.jsx("div",{...E(H.key,K),className:vz,children:m(H,ne,le)},H.key)})})})]}),b]})}const kz="data-drag-clone",$w="0 16px 38px -8px rgba(20,18,13,0.5)",Sz=["id","for","name","data-dragid","data-drag-scope"];function Zu(e){if(!e||e==="transparent")return!1;const t=/^rgba\([^,]+,[^,]+,[^,]+,\s*([\d.]+)\s*\)$/.exec(e);if(t)return Number(t[1])>=1;const a=/\/\s*([\d.]+)(%?)\s*\)$/.exec(e);return a?Number(a[1])>=(a[2]?100:1):!0}function Ez(e){for(let t=e;t;t=t.parentElement){const a=getComputedStyle(t).backgroundColor;if(Zu(a))return a}return"#fff"}function Uw(e){for(let t=e;t;){const a=getComputedStyle(t).borderRadius;if(_z(a))return a;const r=t.children.length===1?t.children[0]:null;t=r&&r.offsetWidth===e.offsetWidth&&r.offsetHeight===e.offsetHeight?r:null}return null}function _z(e){return e!==""&&!/^(0(px)?\s*)+$/.test(e)}function jz(e){const t=e.cloneNode(!0),a=[e,...e.querySelectorAll("*")],r=[t,...t.querySelectorAll("*")];a.forEach((l,c)=>{const u=r[c];if(!(!u||u.tagName!==l.tagName))switch(l.tagName){case"INPUT":u.value=l.value,u.checked=l.checked;break;case"TEXTAREA":case"SELECT":u.value=l.value;break;case"VIDEO":u.muted=!0,u.autoplay=!1;break}});for(const l of r)for(const c of Sz)l.removeAttribute(c);return t.setAttribute(kz,""),t.setAttribute("aria-hidden","true"),t.inert=!0,t}function Oz(e,t,a){if(t===a||t<0||a<0)return e;const r=e.slice(),[l]=r.splice(t,1);return r.splice(a,0,l),r}const j_="data-drag-scope";function Vm(e){return Array.from(e.querySelectorAll("[data-dragid]")).filter(t=>t.closest(`[${j_}]`)===e)}function Az(e){const t=/^matrix(3d)?\(([^)]+)\)$/.exec(e.trim());if(!(t!=null&&t[2]))return{x:0,y:0};const a=t[2].split(",").map(Number),[r,l]=t[1]?[a[12],a[13]]:[a[4],a[5]];return{x:r||0,y:l||0}}const Iw=190,Hw=220,Gm="cubic-bezier(.2,.7,.3,1)",Nz="0.4",Mz="0",Cz="1",Rz="2",Tz="60",Sd="data-drag-active",Bw="hp-drag-reorder-active",Dz=`html[${Sd}], html[${Sd}] * { cursor: grabbing !important; user-select: none !important; -webkit-user-select: none !important; }`;function Km(e){const t=document.documentElement;if(!e){t.removeAttribute(Sd);return}if(!document.getElementById(Bw)){const a=document.createElement("style");a.id=Bw,a.textContent=Dz,document.head.appendChild(a)}t.setAttribute(Sd,"")}function qw(e){return!e||typeof e.animate!="function"?!1:!(typeof window.matchMedia=="function"&&window.matchMedia("(prefers-reduced-motion: reduce)").matches)}function Lz(e){if(!e)return;const t=a=>{a.target!==null&&e.contains(a.target)&&(a.stopPropagation(),a.preventDefault()),window.removeEventListener("click",t,!0)};window.addEventListener("click",t,!0),setTimeout(()=>window.removeEventListener("click",t,!0),0)}const zz="pointer-events-none absolute -right-1.5 -top-1.5 z-[5] grid h-6 min-w-6 place-items-center rounded-full bg-accent px-1.5 text-[length:calc(11.5*var(--content))] font-bold tabular-nums text-white shadow-[0_1px_3px_rgba(20,18,13,0.3)]";function $z(e,t,a){const r=e.filter(c=>a.has(t(c))),l=r[0];return{collapsed:e.filter(c=>c===l||!a.has(t(c))),members:r}}function Uz(e,t){const a=t[0]===void 0?-1:e.indexOf(t[0]);return a<0?e:[...e.slice(0,a),...t,...e.slice(a+1)]}function O_({items:e,getKey:t,onReorder:a,onDrop:r,axis:l="xy",threshold:c=4,ignoreSelector:u=".we-no-drag"}){const[m,p]=x.useState(null),g=x.useRef(null),b=x.useRef({}),v=x.useRef({grabX:0,grabY:0,scale:1,originLeft:0}),k=x.useRef({x:0,y:0}),w=x.useRef(null),j=x.useRef(null),E=x.useRef(null),_=x.useRef(null),C=x.useRef("#fff"),O=x.useRef(new Set),A=x.useRef(new Map),D=x.useRef(new WeakMap),R=x.useRef(null),F=x.useRef(null),L=x.useRef(e),T=x.useRef(t),H=x.useRef({onReorder:a,onDrop:r});x.useLayoutEffect(()=>{H.current={onReorder:a,onDrop:r}}),x.useEffect(()=>()=>{var ee;const I=R.current;R.current=null,I&&H.current.onDrop(I);const P=F.current;P&&(window.removeEventListener("pointermove",P.move),window.removeEventListener("pointerup",P.end),window.removeEventListener("pointercancel",P.end)),(ee=_.current)==null||ee.remove(),E.current&&Km(!1)},[]);function ne(I){const P=I.getBoundingClientRect(),ee=v.current.scale||1;return{x:(k.current.x-P.left)/ee-I.clientLeft,y:(k.current.y-P.top)/ee-I.clientTop}}function Y(){const I=_.current,P=g.current;if(!I||!P)return;const ee=ne(P);I.style.left=`${l==="y"?v.current.originLeft:ee.x-v.current.grabX}px`,I.style.top=`${ee.y-v.current.grabY}px`}function le(){const I=g.current,{x:P,y:ee}=ne(I),pe=L.current;let se=0,ke=1/0;return Vm(I).forEach(z=>{const ce=pe.findIndex(Le=>T.current(Le)===z.dataset.dragid);if(ce<0)return;const ge=z.offsetLeft+z.offsetWidth/2,Ee=z.offsetTop+z.offsetHeight/2,Ue=(P-ge)**2+(ee-Ee)**2;Ue<ke&&(ke=Ue,se=ce)}),Math.max(0,Math.min(pe.length-1,se))}function K(I,P,ee){const pe=!A.current.has(I),se=A.current.get(I)??{position:I.style.position,zIndex:I.style.zIndex,opacity:I.style.opacity,borderRadius:I.style.borderRadius};A.current.set(I,se),getComputedStyle(I).position==="static"&&(I.style.position="relative"),pe&&(I.style.borderRadius=Uw(I)??se.borderRadius),I.style.zIndex=P,I.style.opacity=ee?Nz:se.opacity,ee?I.setAttribute("data-ghost",""):I.removeAttribute("data-ghost")}function X(I){const P=A.current.get(I);P&&(I.style.position=P.position,I.style.zIndex=P.zIndex,I.style.opacity=P.opacity,I.style.borderRadius=P.borderRadius,I.removeAttribute("data-ghost"),A.current.delete(I))}function ue(I,P){var z;C.current=Ez(I);const ee=getComputedStyle(P).backgroundColor,pe=Uw(P),se=jz(P);pe&&(se.style.borderRadius=pe),Object.assign(se.style,{position:"absolute",left:"0px",top:"0px",width:`${P.offsetWidth}px`,margin:"0",zIndex:Tz,pointerEvents:"none",transform:"none",opacity:"1",transition:"none",animation:"none",boxShadow:$w,backgroundColor:Zu(ee)?ee:C.current}),v.current.originLeft=P.offsetLeft;const ke=((z=j.current)==null?void 0:z.length)??1;if(ke>1){const ce=document.createElement("span");ce.className=zz,ce.textContent=String(ke),se.appendChild(ce)}I.appendChild(se),_.current=se}function M(I,P,ee,pe){if(P.left===ee.left&&P.top===ee.top)return;const se=D.current.get(I),ke=(se==null?void 0:se.playState)==="running"?Az(getComputedStyle(I).transform):{x:0,y:0};se==null||se.cancel();const z=P.left+ke.x-ee.left,ce=P.top+ke.y-ee.top;if(!z&&!ce)return;D.current.set(I,I.animate([{transform:`translate(${z}px,${ce}px)`},{transform:"none"}],{duration:Iw,easing:Gm}));const ge=C.current;pe&&!Zu(getComputedStyle(I).backgroundColor)&&I.animate([{backgroundColor:ge},{backgroundColor:ge}],{duration:Iw})}function V(I,P,ee){var Ee;(Ee=D.current.get(I))==null||Ee.cancel();const pe=P.left-ee.left,se=P.top-ee.top;if(!pe&&!se)return;const ke=getComputedStyle(I),z=Zu(ke.backgroundColor)?ke.backgroundColor:C.current;K(I,Rz,!1);const ce=I.animate([{transform:`translate(${pe}px,${se}px)`},{transform:"none"}],{duration:Hw,easing:Gm});I.animate([{boxShadow:$w,backgroundColor:z},{boxShadow:ke.boxShadow,backgroundColor:z}],{duration:Hw,easing:Gm}),D.current.set(I,ce);const ge=()=>{E.current||X(I)};ce.onfinish=ge,ce.oncancel=ge}x.useLayoutEffect(()=>{const I=g.current;if(!I)return;I.setAttribute(j_,"");const P=E.current,ee=O.current;O.current=new Set;const pe=Vm(I);if(P&&!_.current){const ce=pe.find(ge=>ge.dataset.dragid===P);ce&&ue(I,ce)}if(!P)for(const ce of[...A.current.keys()])X(ce);const se=qw(I),ke=b.current,z={};pe.forEach(ce=>{const ge=ce.dataset.dragid,Ee={left:ce.offsetLeft,top:ce.offsetTop};z[ge]=Ee,P&&K(ce,ge===P?Mz:Cz,ge===P);const Ue=ke[ge];!Ue||!se||(ee.has(ge)?V(ce,Ue,Ee):M(ce,Ue,Ee,P!==null&&ge!==P))}),b.current=z,P&&Y()});function te(){const I=R.current;R.current=null,I&&H.current.onDrop(I)}function me(I,P,ee){var ge,Ee,Ue,Le,ye;te();const pe=g.current,se=Vm(pe).find(Re=>Re.dataset.dragid===I)??null;if(!se)return;const ke=se.getBoundingClientRect(),z=pe.getBoundingClientRect().width/pe.offsetWidth||1;v.current={grabX:(ee.clientX-ke.left)/z,grabY:(ee.clientY-ke.top)/z,scale:z,originLeft:se.offsetLeft},(Ee=(ge=document.activeElement)==null?void 0:ge.blur)==null||Ee.call(ge),(ye=(Le=(Ue=window.getSelection)==null?void 0:Ue.call(window))==null?void 0:Le.removeAllRanges)==null||ye.call(Le),Km(!0),k.current={x:ee.clientX,y:ee.clientY},L.current=e,T.current=t,j.current=null;let ce=I;if(P&&P.length>1&&P.includes(I)){const{collapsed:Re,members:ht}=$z(e,t,new Set(P)),$e=ht[0];ht.length>1&&$e!==void 0&&(j.current=ht,ce=t($e),L.current=Re,H.current.onReorder(Re))}E.current=ce,p(ce)}function Q(I,P,ee){I.button===0&&(I.target.closest(u)||(w.current={key:P,x:I.clientX,y:I.clientY,group:ee},F.current={move:N,end:q},window.addEventListener("pointermove",N),window.addEventListener("pointerup",q),window.addEventListener("pointercancel",q)))}function N(I){const P=w.current;if(!P)return;if(!E.current){if(Math.hypot(I.clientX-P.x,I.clientY-P.y)<c)return;me(P.key,P.group,I)}k.current={x:I.clientX,y:I.clientY},Y();const ee=le(),pe=L.current,se=pe.findIndex(z=>T.current(z)===E.current);if(se<0||se===ee)return;const ke=Oz(pe,se,ee);L.current=ke,H.current.onReorder(ke)}function q(){window.removeEventListener("pointermove",N),window.removeEventListener("pointerup",q),window.removeEventListener("pointercancel",q),F.current=null,w.current=null;const I=E.current;if(!I)return;const P=j.current;j.current=null;const ee=P?P.map(se=>T.current(se)):[I];if(P){const se=Uz(L.current,P);L.current=se,H.current.onReorder(se)}const pe=_.current;if(pe){for(const se of ee)b.current[se]={left:pe.offsetLeft,top:pe.offsetTop};O.current=new Set(ee),pe.remove(),_.current=null}Lz(g.current),E.current=null,Km(!1),p(null),R.current=L.current,qw(g.current)?requestAnimationFrame(()=>setTimeout(te,0)):te()}return{containerRef:g,getItemProps:(I,P)=>({"data-dragid":I,onPointerDown:ee=>Q(ee,I,P)}),draggingKey:m}}let Iz=0;function Hz(){return typeof crypto<"u"&&"randomUUID"in crypto?crypto.randomUUID():`li-${(Iz++).toString(36)}`}function Ed(e,t){return{key:(t==null?void 0:t(e))??Hz(),value:e}}function Bz(e,t){return e.map(a=>Ed(a,t))}function qz(e,t,a){return t.map((r,l)=>{const c=e[l];return c!==void 0&&JSON.stringify(c.value)===JSON.stringify(r)?{key:c.key,value:r}:Ed(r,a)})}function Ym(e){return JSON.stringify(e)}function er({items:e,identityOf:t,fixed:a=!1,axis:r="y",commit:l,onCommitted:c}){const[u,m]=x.useState(()=>Bz(e,t)),[p,g]=x.useState(()=>Ym(e)),b=x.useRef(u);x.useEffect(()=>{b.current=u},[u]);function v(_){b.current=_,m(_)}function k(_,C){v(_),g(Ym(_.map(O=>O.value))),l(_,C),c==null||c(_,C)}const w=O_({items:u,getKey:_=>_.key,onReorder:v,onDrop:_=>k(_,"reorder"),axis:r,threshold:5});if(!w.draggingKey){const _=Ym(e);_!==p&&(g(_),m(qz(u,e,t)))}function j(_,C){const O=b.current;O.some(A=>A.key===_)&&k(O.map(A=>A.key===_?{...A,value:C(A.value)}:A),"edit")}function E(_,C=0){if(a)return;const O=b.current,A=Math.min(Math.max(C,0),O.length);k([...O.slice(0,A),_,...O.slice(A)],"add")}return{rows:u,drag:w,canAdd:!a,canRemove:!a,add:(_,C)=>E(Ed(_,t),C),insert:E,remove:_=>{a||k(b.current.filter(C=>C.key!==_),"remove")},removeMany:_=>{const C=b.current,O=C.filter(A=>!_.includes(A.key));a||O.length===C.length||k(O,"remove")},setValue:(_,C)=>j(_,()=>C),updateValue:j,replace:_=>k(_,"replace"),mint:_=>Ed(_,t),indexOf:_=>u.findIndex(C=>C.key===_),keyAt:_=>{var C;return((C=u[_])==null?void 0:C.key)??null},latestRows:()=>b.current}}function tr(e,t,a,r){return e.isEmpty(a)?r?"required":null:e.isInvalid(a,t)?"invalid":null}const Fz={failed:"Crop failed. The image is unchanged. Try cropping again."};function Pz({storeKey:e}){const t=pT(e),a=ty(r=>r.clearNotice);return t?d.jsxs("p",{role:"alert","data-crop-notice":t,className:ae(xl,"flex items-center justify-between gap-2"),children:[d.jsx("span",{children:Fz[t]}),d.jsx("button",{type:"button",className:ae(vt,"shrink-0 underline"),onClick:()=>a(e),children:"Dismiss"})]}):null}function Fs(e){if(typeof e!="object"||e===null)return null;const t=S5(e)??Ba(e);return t===void 0||t===""?null:t}function gc(e){const t=Fs(e);if(t!==null||typeof e!="object"||e===null)return t;const a=e.id;return typeof a=="string"&&a.length>0?a:null}function ll(e){if(typeof e!="object"||e===null)return;const t=e.picked;return typeof t=="string"||t===null?t:Qa(e)?e.media:void 0}function Vz(e){if(typeof e!="object"||e===null)return!1;const t=e;return["file","media"].some(a=>typeof t[a]=="string")||Ba(e)!==void 0}function A_(e){if(e!==null&&typeof e=="object"&&!Array.isArray(e)){const t=gc(e),a=ll(e);if(t!==null)return{file:t,...a===void 0?{}:{picked:a}}}return{file:""}}function Gz(e){return e.map(A_).filter(t=>t.file!=="")}function N_(e){switch(e.kind){case"document":return u_(e.name,e.mime??"");case"video":return{glyph:"video",typeNoun:"Video",extension:""};case"photo":return{glyph:"image",typeNoun:"Image",extension:""};case"tour":return{glyph:"video",typeNoun:"3D tour",extension:""}}}function Kz(e){return[N_(e).typeNoun,e.size].filter(Boolean).join(" · ")}function Yz(e){const t=Sl(e);return a=>{const r=t.get(a);return r===void 0?void 0:h_(r)}}const Qz={page:"expanded",panel:"compact",cell:"compact"};function Xz(e){return Qz[e]}const M_=x.createContext(null);function ef({place:e,children:t}){return d.jsx(M_.Provider,{value:e,children:t})}function Ry(){const e=x.useContext(M_);if(e===null)throw new Error("[slot-editors] a slot editor was drawn outside a place: its container mounts <SlotPlaceProvider>.");return e}const Zz=x.createContext(!1);function _l(){return x.useContext(Zz)}const Wz=ae("flex w-full items-stretch rounded-[calc(10*var(--content))] border-[1.5px] border-line bg-canvas","transition-[border-color,box-shadow,background-color] duration-[120ms]","focus-within:border-ink focus-within:shadow-[0_0_0_4px_rgba(20,18,13,0.05)]",wl),Jz="min-w-0 flex-1 appearance-none border-0 bg-transparent px-3.5 py-2.75 text-[length:calc(15*var(--content))] text-ink outline-none placeholder:text-ink-4",e$=ae("flex w-full min-w-0 flex-1 items-stretch rounded-[calc(6*var(--content))] border border-transparent bg-transparent","in-data-[card-fields]:bg-white","transition-[border-color,box-shadow,background-color] duration-100","group-hover/row:border-line group-hover/row:bg-white group-focus-within/row:border-line group-focus-within/row:bg-white","focus-within:border-ink focus-within:bg-white focus-within:shadow-[0_0_0_3px_rgba(20,18,13,0.05)]",wl),C_={"data-card-fields":""},t$="min-w-0 flex-1 appearance-none truncate border-0 bg-transparent px-2.5 py-2 text-[length:calc(13.5*var(--content))] leading-[1.2] text-ink outline-none placeholder:text-ink-4",n$={page:{frame:ae(Pr,"gap-1.5"),shell:Wz,inner:Jz,adornEnd:"pr-3.5",multiline:"resize-none leading-[1.5]",inline:!1},panel:{frame:Pr,shell:ae(PL,wl),inner:VL,adornEnd:"pr-2.75",multiline:"min-h-[calc(76*var(--content))] resize-none leading-[1.5]",inline:!1},cell:{frame:"flex w-full min-w-0 flex-col",shell:e$,inner:t$,adornEnd:"pr-2.5",multiline:"resize-none overflow-hidden whitespace-nowrap",inline:!0}};function nr(){return R_(Ry())}function R_(e){return{place:e,...n$[e]}}function i$({count:e,max:t}){const a=t-e;return a>Math.ceil(t/5)?null:a<=0?{left:0,tone:"text-danger"}:{left:a,tone:a<=Math.ceil(t/10)?WE:"text-ink-4"}}const a$=ae("relative","[&>input]:transition-[padding] [&>input]:duration-200 [&>input]:ease-out motion-reduce:[&>input]:transition-none","[&[data-count-open]>input]:pr-10","[&[data-count-room=band]]:flex-wrap"),r$="pointer-events-none absolute inset-y-0 right-0 flex items-center",o$=ae("flex h-0 basis-full items-end justify-end overflow-hidden","transition-[height] duration-200 ease-out motion-reduce:transition-none"),l$={page:"data-[open]:h-[calc(22*var(--content))] data-[open]:pb-2.75",panel:"data-[open]:h-[calc(20*var(--content))] data-[open]:pb-2.25",cell:""};function Gr({attention:e,count:t,className:a,ref:r,children:l}){const c=nr(),u=_l(),[m,p]=x.useState(!1),g=t!==void 0&&!c.inline,b=g&&m?i$(t):null,v=g&&t.multiline,k=b!==null&&d.jsxs("span",{"data-field-count":"",className:ae(ZE,b.tone,"leading-none transition-[opacity,transform] duration-200 ease-out starting:translate-y-1 starting:opacity-0 motion-reduce:transition-none"),children:[b.left,d.jsx("span",{className:"sr-only",children:" characters left"})]});return d.jsxs("div",{ref:r,className:ae(c.shell,g&&a$,a),...kl(e,u),"data-count-room":g?v?"band":"end":void 0,"data-count-open":b!==null?"":void 0,onFocus:g?()=>p(!0):void 0,onBlur:g?()=>p(!1):void 0,children:[l,v?d.jsx("div",{className:ae(o$,l$[c.place],c.adornEnd),"data-open":b!==null?"":void 0,children:k}):b!==null&&d.jsx("div",{className:ae(r$,c.adornEnd),children:k})]})}function T_({attention:e,message:t}){const a=nr();return e!=="invalid"||a.inline?null:d.jsx("p",{className:xl,children:t})}const D_="h-[var(--list-display-h,clamp(280px,calc(100cqh-var(--list-display-clear,32px)),calc(560*var(--frame))))]",s$="h-[var(--list-display-h,clamp(280px,calc(100cqh-var(--list-display-clear,32px)),calc(480*var(--frame))))]",Ty="data-upstream:opacity-55 data-upstream:hover:opacity-100 data-upstream:focus-within:opacity-100",c$="hp-anim-menu rounded border border-line bg-canvas shadow-[0_1px_2px_rgba(20,18,13,0.04),0_8px_24px_-8px_rgba(20,18,13,0.08)]",L_="flex w-full cursor-pointer items-center gap-2.5 rounded-md px-2.5 py-1.75 text-left text-[length:calc(12.5*var(--content))]",u$=`${L_} text-ink-2 hover:bg-accent-soft hover:text-ink`,z_="truncate rounded-full bg-white/90 px-1.5 py-0.5 text-[length:calc(10.5*var(--content))] font-semibold text-ink-2 shadow-[0_1px_3px_rgba(0,0,0,0.18)]",$_="select-none";function d$(e,t){const a=[{label:"Preview",glyph:"eye",onSelect:t.onPreview}];return t.onRenameStart&&a.push({label:"Rename",glyph:"pencil",onSelect:t.onRenameStart}),t.onCrop&&a.push({label:"Crop",glyph:"crop",onSelect:t.onCrop}),Ms(e)||a.push({label:"Download",glyph:"down",onSelect:t.onDownload}),t.onDelete&&a.push({label:t.deleteLabel??"Delete",glyph:"trash",onSelect:t.onDelete,danger:!0}),a}function U_({file:e,handlers:t,shown:a=!1}){return d.jsx(H_,{name:e.name,actions:d$(e,t),shown:a})}function I_(e){return{plain:e.filter(t=>!t.foot&&!t.danger),foot:[...e.filter(t=>t.foot&&!t.danger),...e.filter(t=>t.danger)]}}const Fw=4;function H_({name:e,actions:t,shown:a=!1,scale:r="card"}){const[l,c]=x.useState(!1),u=x.useRef(null),m=x.useRef(null),p=x.useRef(null),[g,b]=x.useState(null),v=x.useCallback(()=>{c(!1),b(null)},[]);pc(u,l,v,p),x.useLayoutEffect(()=>{if(!l)return;const E=()=>{const _=m.current,C=p.current;if(!_||!C)return;const O=Hr(_),A=C.offsetHeight,D=hl(O,{height:A,maxHeight:A,gap:Fw});if(!D){b(null);return}const R=document.documentElement.clientWidth-O.rect.right;if(D.maxHeight>=A){b({top:D.top,bottom:D.bottom,right:R});return}const{rect:F,bounds:L}=O,T=L.bottom-Sr-A,H=Math.max(L.top+Sr,Math.min(F.bottom+Fw,T));b({top:H,right:R})};return E(),window.addEventListener("scroll",E,!0),window.addEventListener("resize",E),()=>{window.removeEventListener("scroll",E,!0),window.removeEventListener("resize",E)}},[l]);const{plain:k,foot:w}=I_(t),j=E=>d.jsxs("button",{type:"button",role:"menuitem",className:E.danger?`${L_} text-danger hover:bg-accent-soft`:u$,onClick:()=>{v(),E.onSelect()},children:[d.jsx(it,{name:E.glyph,size:13}),E.label]},E.label);return d.jsxs("span",{className:"we-no-drag relative inline-flex",ref:u,children:[d.jsx("button",{ref:m,type:"button",className:`grid shrink-0 cursor-pointer place-items-center rounded-full text-ink-3 transition-opacity duration-[120ms] hover:bg-[rgba(20,18,13,0.07)] hover:text-ink focus-visible:opacity-100 group-hover:opacity-100 group-aria-selected:opacity-100 ${a?r==="compact"?"h-6 w-6":"h-8 w-8":"h-5.5 w-5.5"} ${l||a?"opacity-100":"opacity-0"}`,"aria-label":`Actions for ${e}`,"aria-haspopup":"menu","aria-expanded":l,onClick:E=>{E.stopPropagation(),c(_=>!_)},onDoubleClick:E=>E.stopPropagation(),children:d.jsx(it,{name:"dots",size:r==="compact"?13:14})}),l?Zi.createPortal(d.jsxs("div",{ref:p,className:`we-no-drag ${c$} w-[calc(188*var(--frame))] p-1.25`,style:g?{position:"fixed",...g,zIndex:qa}:{position:"fixed",top:0,right:0,zIndex:qa,visibility:"hidden"},role:"menu",onClick:E=>E.stopPropagation(),onDoubleClick:E=>E.stopPropagation(),children:[k.map(j),w.length>0?d.jsxs(d.Fragment,{children:[k.length>0?d.jsx("div",{className:"mx-0 my-1 h-px bg-line-soft"}):null,w.map(j)]}):null]}),document.body):null]})}function B_({name:e,onCommit:t}){const[a,r]=x.useState(e);return d.jsx("input",{className:"we-no-drag min-w-0 flex-1 rounded-md border border-accent bg-canvas px-1.5 py-0.5 text-[length:calc(12.5*var(--content))] font-medium text-ink",value:a,autoFocus:!0,"aria-label":`Rename ${e}`,onFocus:l=>l.target.select(),onClick:l=>l.stopPropagation(),onDoubleClick:l=>l.stopPropagation(),onChange:l=>r(l.target.value),onKeyDown:l=>{l.key==="Enter"&&t(a.trim()),l.key==="Escape"&&t(null),l.stopPropagation()},onBlur:()=>t(a.trim())})}function q_(e,t="card"){return`group/card relative flex cursor-pointer flex-col aria-disabled:cursor-not-allowed ${t==="compact"?"rounded-xl":"rounded-2xl"} outline-none transition-[background-color,box-shadow,opacity] duration-[140ms] ${e?"bg-accent-tint ring-2 ring-accent":"bg-[#f3f2ed] hover:bg-[#ebe9e2] focus-visible:ring-2 focus-visible:ring-accent"}`}const $r={card:{bar:"flex h-12 min-w-0 items-center gap-2.5 pl-3.5 pr-2",name:"min-w-0 flex-1 truncate text-[length:calc(13*var(--content))] font-medium text-ink",thumb:"relative mx-2 aspect-[16/11] overflow-hidden rounded-xl bg-canvas"},compact:{bar:"flex h-8.5 min-w-0 items-center gap-1.5 pl-2.5 pr-1",name:"min-w-0 flex-1 truncate text-[length:calc(12*var(--content))] font-medium text-ink",thumb:"relative mx-1.5 aspect-[16/11] overflow-hidden rounded-lg bg-canvas"}},f$="we-no-drag flex cursor-auto flex-col gap-2 px-2 pt-2";function F_({kind:e,name:t,selected:a,select:r,onToggleSelect:l,scale:c="card"}){const u=c==="compact";return d.jsxs("span",{className:`relative grid shrink-0 place-items-center ${u?"h-4 w-4":"h-5 w-5"}`,children:[d.jsx("span",{className:`grid place-items-center transition-opacity duration-[120ms] ${a?"opacity-0":r.disabled?"":"group-hover/card:opacity-0"}`,children:e===null?d.jsx("span",{className:"text-ink-3",children:d.jsx(it,{name:"file",size:u?13:16})}):d.jsx(Vr,{kind:e,size:u?"dot":"mark"})}),d.jsx("button",{type:"button",role:r.control,"aria-checked":a,disabled:r.disabled,className:`we-no-drag absolute inset-0 grid cursor-pointer place-items-center border-[1.5px] transition-opacity duration-[120ms] disabled:cursor-not-allowed disabled:opacity-0 ${r.control==="radio"?"rounded-full":u?"rounded-[calc(4*var(--content))]":"rounded-md"} ${a?"border-accent bg-accent text-white opacity-100":"border-[rgba(20,18,13,0.45)] bg-canvas text-transparent opacity-0 group-hover/card:opacity-100 focus-visible:opacity-100"}`,"aria-label":a?`Deselect ${t}`:`Select ${t}`,onClick:m=>{m.stopPropagation(),l()},onDoubleClick:m=>m.stopPropagation(),children:d.jsx(it,{name:"check",size:u?10:12,stroke:2.6})})]})}function h$({file:e,selected:t,renaming:a,onClick:r,onDoubleClick:l,onToggleSelect:c,select:u,listChip:m,onRetry:p,onRecheck:g,onRenameCommit:b,handlers:v,drag:k,beneath:w}){return d.jsxs("div",{...k,role:"option","aria-selected":t,"aria-disabled":u.disabled||void 0,"data-upstream":e.upstream||void 0,tabIndex:0,className:`${q_(t)} ${Ty} ${k?$_:""}`,onClick:r,onDoubleClick:l,onKeyDown:j=>{j.target===j.currentTarget&&j.key==="Enter"&&(j.stopPropagation(),v.onPreview())},children:[d.jsxs("div",{className:$r.card.bar,children:[d.jsx(F_,{kind:e.kind,name:e.name,selected:t,select:u,onToggleSelect:c}),a?d.jsx(B_,{name:e.name,onCommit:b}):d.jsx("span",{className:$r.card.name,title:e.name,children:e.name}),d.jsx(U_,{file:e,handlers:v,shown:!0})]}),d.jsxs("div",{className:$r.card.thumb,children:[d.jsx(Ay,{file:e}),d.jsx(w_,{file:e,onRetry:p,onRecheck:g}),m!==null?d.jsx("span",{className:`absolute right-2 top-2 z-[3] max-w-[calc(100%-16px)] ${z_}`,"data-list-chip":"",children:m}):null]}),w?d.jsx("div",{className:f$,...C_,onClick:j=>j.stopPropagation(),onDoubleClick:j=>j.stopPropagation(),children:w}):null,d.jsx("div",{className:"flex h-11 min-w-0 items-center px-3.5",children:d.jsx("span",{className:"truncate text-[length:calc(11.5*var(--content))] text-ink-3",children:iz(e)})})]})}function m$(){return d.jsxs("div",{className:`flex flex-col rounded-2xl ${ky}`,children:[d.jsxs("div",{className:$r.card.bar,children:[d.jsx("span",{className:`h-4.5 w-4.5 shrink-0 rounded-md ${_n}`}),d.jsx("span",{className:"min-w-0 flex-1",children:d.jsx("span",{className:`block h-2.5 w-3/5 rounded-full ${_n}`})}),d.jsx("span",{className:`mr-1.5 h-1.5 w-4 shrink-0 rounded-full ${_n}`})]}),d.jsx("div",{className:ae($r.card.thumb,_n)}),d.jsx("div",{className:"flex h-11 items-center px-3.5",children:d.jsx("span",{className:`h-2 w-2/5 rounded-full ${_n}`})})]})}const P_="grid grid-cols-[calc(28*var(--frame))_calc(44*var(--frame))_1fr_calc(110*var(--frame))_calc(80*var(--frame))_calc(90*var(--frame))_calc(36*var(--frame))] items-center gap-2.5 px-3",Pw="flex shrink-0 items-center gap-1.5 whitespace-nowrap text-[length:calc(11.5*var(--content))] font-medium";function p$(){return d.jsxs("div",{role:"row",className:`${P_} h-9.5 text-[length:calc(11*var(--content))] font-semibold tracking-[0.02em] text-ink-3`,children:[d.jsx("span",{}),d.jsx("span",{}),d.jsx("span",{children:"Name"}),d.jsx("span",{children:"Kind"}),d.jsx("span",{children:"Size"}),d.jsx("span",{children:"Added"}),d.jsx("span",{})]})}function g$({file:e,onRetry:t,onRecheck:a}){return e.state==="failed"?d.jsxs("span",{className:`${Pw} text-danger`,children:[e.error,t?d.jsx("button",{type:"button",className:"font-semibold text-ink underline",onClick:r=>{r.stopPropagation(),t()},children:"Retry"}):null]}):e.linkUnreachable?d.jsxs("span",{className:`${Pw} text-warn`,title:Vp,children:[x_,a?d.jsx("button",{type:"button",className:"font-semibold text-ink underline",onClick:r=>{r.stopPropagation(),a()},children:"Re-check"}):null]}):null}function y$({file:e,selected:t,renaming:a,onClick:r,onDoubleClick:l,onToggleSelect:c,select:u,listChip:m,onRetry:p,onRecheck:g,onRenameCommit:b,handlers:v,drag:k}){return d.jsxs("div",{...k,role:"row","aria-selected":t,"aria-disabled":u.disabled||void 0,"data-upstream":e.upstream||void 0,className:`group ${P_} ${Ty} h-12 cursor-pointer border-t border-line-soft transition-opacity duration-[140ms] aria-disabled:cursor-not-allowed last:rounded-b-[calc(11*var(--content))] ${t?"bg-accent-soft":"hover:bg-[#fbfaf7]"} ${k?$_:""}`,onClick:r,onDoubleClick:l,children:[d.jsx("button",{type:"button",role:u.control,"aria-checked":t,disabled:u.disabled,className:`grid h-4 w-4 cursor-pointer place-items-center border-[1.5px] disabled:cursor-not-allowed disabled:opacity-40 ${u.control==="radio"?"rounded-full":"rounded-[calc(5*var(--content))]"} ${t?"border-accent bg-accent text-white":"border-[#cfccc0] bg-canvas text-transparent group-hover:border-[#b3b0a3]"}`,"aria-label":t?`Deselect ${e.name}`:`Select ${e.name}`,onClick:w=>{w.stopPropagation(),c()},onDoubleClick:w=>w.stopPropagation(),children:t?d.jsx(it,{name:"check",size:10,stroke:3}):null}),d.jsxs("span",{className:"relative block h-7.5 w-11 overflow-hidden rounded-md border border-line-soft bg-[#f4f3ee]",children:[d.jsx(Ay,{file:e,face:"row"}),d.jsx(w_,{file:e,compact:!0})]}),d.jsxs("span",{className:"flex min-w-0 items-center gap-2",children:[a?d.jsx(B_,{name:e.name,onCommit:b}):d.jsx("span",{className:"min-w-0 truncate text-[length:calc(12.5*var(--content))] font-medium text-ink",title:e.name,children:e.name}),d.jsx(g$,{file:e,onRetry:p,onRecheck:g}),m!==null?d.jsx("span",{className:`shrink-0 ${z_}`,"data-list-chip":"",children:m}):null]}),d.jsx("span",{className:"inline-flex",children:d.jsx(v_,{file:e})}),d.jsx("span",{className:"whitespace-nowrap text-xs text-ink-3",children:y_(e.bytes)}),d.jsx("span",{className:"whitespace-nowrap text-xs text-ink-3",children:b_(e.addedAt)}),d.jsx(U_,{file:e,handlers:v})]})}const b$={control:"checkbox",disabled:!1},{bar:v$,name:x$,thumb:w$}=$r.compact,k$="we-no-drag flex cursor-auto flex-col gap-1.5 px-1.5 pt-1.5";function S$({kind:e,name:t,chrome:a,thumb:r,below:l,beneath:c}){const{selected:u,onToggleSelect:m,actions:p}=a;return d.jsxs("div",{role:"option","aria-selected":u,tabIndex:0,"data-gallery-card":"",className:q_(u,"compact"),onClick:m,onKeyDown:g=>{g.target===g.currentTarget&&(g.key===" "||g.key==="Enter")&&(g.preventDefault(),m())},children:[d.jsxs("div",{className:v$,children:[d.jsx(F_,{kind:e,name:t,selected:u,select:b$,onToggleSelect:m,scale:"compact"}),d.jsx("span",{className:x$,title:t,children:t}),p.length>0&&d.jsx(H_,{name:t,actions:p,shown:!0,scale:"compact"})]}),d.jsx("div",{className:w$,"data-thumb":!0,"data-media-tile":e,children:r}),l,c?d.jsx("div",{className:k$,...C_,onClick:g=>g.stopPropagation(),children:c}):null,d.jsx("div",{className:"h-1.5"})]})}function Dy(e,t){const a=e!=null&&e.cut?e.derivativeUrl:t,[r,l]=x.useState(a);return a!==void 0&&a!==r&&l(a),a??r??t}const Ly="flex max-h-full w-full flex-col overflow-hidden rounded-[14px] bg-canvas shadow-[0_24px_70px_-24px_rgba(20,18,13,0.5),0_2px_0_rgba(20,18,13,0.04)]",E$="h-[min(88vh,max(560px,calc(min(80vw,1440px)*0.625)))] max-h-full w-[min(80vw,1440px)] max-md:h-full max-md:w-full",_$=ae(Ly,E$),j$="max-h-[min(calc(100vh-120px),max(680px,72vh))] w-[clamp(560px,38vw,960px)] max-w-full max-md:w-full",V_="px-[clamp(18px,1.4vw,40px)]",zy="px-[clamp(20px,1.75vw,36px)]",O$=ae("flex flex-shrink-0 items-center gap-[14px] pb-3 pt-[clamp(18px,1.6vw,30px)]",zy),A$=ae("flex min-h-0 flex-1 flex-col overflow-y-auto pb-[clamp(20px,1.75vw,36px)] pt-3 [container-type:size] [--list-display-h:100cqh] [&>*]:shrink-0",zy),$y="mr-auto flex min-w-0 flex-col gap-0.5",Uy="m-0 text-[16px] font-semibold tracking-[-0.01em]",N$="text-[12px] text-ink-3",Iy=ae(vt,"grid size-8 flex-shrink-0 place-items-center rounded-[8px] text-ink-3 hover:bg-[#f1f0ea] hover:text-ink"),G_="px-[18px] py-[13px]",M$=ae("flex flex-shrink-0 items-center gap-[14px]",G_),C$=ae("flex flex-shrink-0 items-center justify-between gap-3 border-t border-line-soft",G_),R$="ml-auto flex gap-2",K_=ae(vt,"inline-flex h-9 items-center gap-1.5 rounded-[9px] border border-transparent px-4 text-[13px] font-semibold"),T$=ae(K_,"border-line bg-white text-ink hover:bg-[#faf9f6]"),D$=ae(K_,"border-honey-2 bg-honey text-honey-ink hover:bg-honey-2 disabled:cursor-default disabled:opacity-45"),L$=ae(vt,"inline-flex h-9 items-center px-1 font-medium text-ink-2 hover:text-ink"),z$={page:"max-w-[920px]",crop:"max-w-[680px]"};function $$({open:e=!0,variant:t,onClose:a,children:r}){return d.jsx(wy,{open:e,onClose:a,className:ae(Ly,z$[t]),children:r})}const Hy={Shell:$$,head:M$,titles:$y,title:Uy,subtitle:N$,close:Iy,CloseIcon:Rt.x,foot:C$,actions:R$,buttonGhost:T$,buttonPrimary:D$,buttonLink:L$,ZoomOutIcon:Rt.minus,ZoomInIcon:Rt.plus},Vw=e=>e!==null&&typeof e=="object"&&!Array.isArray(e);function U$(e,t){let a=e;for(const r of t.holder.split("."))Array.isArray(a)?a=a.find(l=>Vw(l)&&l.id===r):a=Vw(a)?a[r]:void 0;return Array.isArray(a)?a.find(r=>Ba(r)===t.mediaId):Ba(a)===t.mediaId?a:void 0}function I$(e,t,a){if(e===void 0)return;const r=U$(e,a),l=r===void 0?void 0:t.get(a.mediaId),c=l===void 0||!Object.hasOwn(e.files,l.file)?void 0:e.files[l.file];if(l===void 0||c===void 0)return;const u=Qa(r)?Ag(l,r):l;return Og(c,u)}const H$=16/10;function Gw(e){return e.slice(e.indexOf(".")+1)}function Kw(e,t){return e.state==="failed"?!0:!al(e.crop,t)||d_(e)?!1:!rc(t)||e.renditions.crop!==null}function Y_({propertyId:e,recordAt:t,write:a,onFailed:r,onArrived:l}){const c=js(k=>k.byPlace),[u,m]=x.useState(null),p=k=>{const w=t(k),j=c[Fr(k)];return j!==void 0?w===void 0||!Kw(w,j.crop):w!==void 0&&d_(w)};x.useEffect(()=>{const k=Object.values(c).filter(w=>{const j=w.propertyId===e?t(w.place):void 0;return j!==void 0&&Kw(j,w.crop)});if(k.length!==0){for(const w of k)js.getState().settle(w.place);l==null||l()}},[c,t,e,l]);const g=async(k,w,j)=>{if(m(null),a===void 0)return;const E=xp(j);if(!al(E,w.crop)){js.getState().start(k,e,E);try{await a(k,rl(E))}catch(_){js.getState().settle(k),r==null||r(k),console.error("[media] home crop failed",{place:k,err:_})}}},b=u===null?void 0:t(u),v=(b==null?void 0:b.file_url)??null;return{offers:k=>{const w=t(k);return e!==""&&a!==void 0&&(w==null?void 0:w.kind)==="image"&&w.url===null&&w.file_url!==null},open:m,isOpen:b!==void 0&&v!==null,recropping:p,modal:u!==null&&b!==void 0&&v!==null?d.jsx(ey,{chrome:Hy,src:v,mode:"free",aspect:H$,seed:{rect:rl(b.crop)},onClose:()=>m(null),onApply:k=>void g(u,b,k.rect)}):null}}const B$=1500;function q$(e){const t=Jd(e===""?null:e);return x.useMemo(()=>{const a=t===void 0?new Map:$d(t);return r=>I$(t,a,r)},[t])}function Q_(e,t){const a=_y(),r=Bd(),l=q$(e),{cropMedia:c}=a,u=x.useMemo(()=>c===void 0?void 0:async(v,k)=>{await c(e,v.mediaId,k,v.holder),await Pp(r,a,e)},[c,e,r,a]),m=x.useMemo(()=>()=>void Pp(r,a,e),[r,a,e]),p=Y_({propertyId:e,recordAt:l,write:u,onFailed:t,onArrived:m}),g=js(v=>v.byPlace),b=Object.values(g).some(v=>v.propertyId===e&&p.recropping(v.place));return qd({...a.mediaFactsQuery(e),enabled:e!==""&&b,refetchInterval:b?B$:!1}),p}function F$(e){const{width:t,height:a}=e!==null&&typeof e=="object"?e:{};return{width:typeof t=="number"?t:null,height:typeof a=="number"?a:null}}function sl(e){var t;return((t=e.renditions.cutout)==null?void 0:t.url)??xd(e)??""}function By(e,t,a,r,l){const c=sl(e);if(e.file===t.file)return{...t,url:c};const u=a===void 0?void 0:lR(a,l,e.id);return u===void 0||a===void 0?{file:e.file,url:c,alt:t.alt,picked:e.id}:{...sR(u,F$(a.files[u.file]),r),url:c,alt:t.alt}}const X_={New:Gd,Choose:$E,Upload:Kd};function Ps(e,t){return`${e} ${t}`}function qy(e,t,a){const r=Wa(t),l=a&&e==="New"?r.singular:r.plural;return{verb:e,icon:X_[e],label:Ps(e,l),empty:`No ${r.plural} yet`}}function P$(e,t,a,r){const l=a.flatMap(u=>{const m=Z_(u,r);return m===null?[]:[Wa(m)[t?"plural":"singular"]]}),c=qy("Choose",e,t);return l.length===0?c:{...c,label:Ps("Choose",[...new Set(l)].join(" or "))}}const V$={property:"Property",library:"Library"};function Z_(e,t){if(!/^(?:property|library)\./.test(e))return null;const a=ud(e);if(a===null)return null;const{home:r}=Us(e);return r===t?a:`${V$[r]} ${a.charAt(0).toLowerCase()}${a.slice(1)}`}function tf(e,t={}){return e.locked===!0||!G$(e)?null:Fy(e,t)}function G$(e){const t=e.type;return t==="list"||t==="row"||pl(e.type)}function Fy(e,t={}){const a=e.type==="list",r=Y$(e,t);return{add:qy(!a&&pl(e.type)?"Upload":"New",e.label,a),choose:r===null?null:P$(e.label,a,r.lists,r.home)}}function K$(e){const[t]=e,a=e.length===1&&t!==void 0?ud(t)??void 0:void 0;return qy("New",a,!0)}function W_(e){return e.choose??e.add}function Y$(e,t){const a=X$(e,t.table);if(a!==null&&qr(a).length>0){const c=qr(a)[1];return c===void 0?null:{lists:[c],home:Us(a).home}}const r=Q$(e,t),l=t.membership;if((l==null?void 0:l.kind)==="pick-row"||(l==null?void 0:l.kind)==="pick-media"){const c=l.kind==="pick-row"?l.tables.map(u=>uS(u)):_r(l.filter.from);return{lists:r!==null&&r.length>0?r:c,home:"property"}}return r===null?null:{lists:r,home:"property"}}function Q$(e,t){if(e.type==="list")return e.element===void 0?null:W$(e.element);if(e.type==="row")return _r(e.from);if(!pl(e.type))return null;const a=il(e,t.table);return(a==null?void 0:a.kind)==="picked"?_r(a.filter.from):null}function _r(e){return Bg({from:e}).filter(t=>/^(?:property|library)\./.test(t))}function X$(e,t){const a=e.source;if((a==null?void 0:a.kind)==="home"&&typeof a.key=="string")return/^(?:property|library)\./.test(a.key)?a.key:null;const r=(a==null?void 0:a.kind)==="row"?a.field:void 0;return typeof r!="string"||r===""||t==null?null:`${uS(t)}.${Z$}.${r}`}const Z$="_";function W$(e){const t=e.fields??{};if(RS(e)!==void 0)return e.from!==void 0?_r(e.from):Object.values(t).flatMap(l=>_r(l.from));if(e.type!=="object")return null;const a=kS(e);if((a==null?void 0:a.type)==="row"&&a.from!==void 0)return _r(a.from);if(!Pg(t))return null;const r=Object.values(t).filter(l=>pl(l.type)&&l.locked!==!0&&l.from!==void 0);return r.length===0?null:r.flatMap(l=>_r(l.from))}const Py={image:"image/*",video:"video/*",tour:null,document:_8};function Vy(e){const t=e.flatMap(a=>Py[a]??[]);return t.length===0?null:t.join(",")}function yc(e){return[...Vy(e)!==null?["file"]:[],...Sg(e).length>0?["link"]:[]]}const J$=ve("Instagram",[["rect",{width:"20",height:"20",x:"2",y:"2",rx:"5",ry:"5",key:"ig-frame"}],["path",{d:"M16 11.37A4 4 0 1 1 12.63 8 4 4 0 0 1 16 11.37z",key:"ig-lens"}],["line",{x1:"17.5",x2:"17.51",y1:"6.5",y2:"6.5",key:"ig-flash"}]]),e7=ve("Facebook",[["path",{d:"M18 2h-3a5 5 0 0 0-5 5v3H7v4h3v8h4v-8h3l1-4h-4V7a1 1 0 0 1 1-1h3z",key:"fb-f"}]]),t7=ve("Linkedin",[["path",{d:"M16 8a6 6 0 0 1 6 6v7h-4v-7a2 2 0 0 0-2-2 2 2 0 0 0-2 2v7h-4v-7a6 6 0 0 1 6-6z",key:"li-arm"}],["rect",{width:"4",height:"12",x:"2",y:"9",key:"li-stem"}],["circle",{cx:"4",cy:"4",r:"2",key:"li-dot"}]]),n7=ve("XLogo",[["path",{d:"M18.901 1.153h3.68l-8.04 9.19L24 22.846h-7.406l-5.8-7.584-6.638 7.584H.474l8.6-9.83L0 1.154h7.594l5.243 6.932ZM17.61 20.644h2.039L6.486 3.24H4.298Z",transform:"translate(2 2) scale(0.8333)",fill:"currentColor",stroke:"none",key:"x-mark"}]]),i7={home:b6,building:kD,apartments:ED,trendUp:OL,tag:EL,key:k6,template:_6,palette:eL,filePen:o6,library:O6,plug:oL,helpCircle:UD,lock:T6,creditCard:VD,settings:bL,power:cL,user:UL,plus:Gd,globe:p6,image:Vd,fileText:Pd,users:HL,eye:BE,eyeOff:i6,pulse:oD,search:by,chart:MD,layout:FE,chevDown:uy,chevRight:dy,chevSelector:zD,pencil:py,dots:e6,grip:hy,external:HE,copy:FD,trash:vl,archive:sD,sparkle:kL,arrowUp:yD,arrowDown:uD,arrowLeft:fD,arrowRight:mD,undo:TL,redo:fL,logout:L6,check:Fd,x:xy,clock:HD,calendar:AD,mapPin:VE,userPlus:zL,mail:$6,phone:iL,share:xL,upload:Kd,bookOpen:vD,newspaper:W6,presentation:gy,instagram:J$,facebook:e7,linkedin:t7,xLogo:n7};function li({name:e,size:t=18,stroke:a=2,fill:r,color:l,className:c,style:u}){const m=i7[e];return d.jsx(m,{size:t,strokeWidth:a,fill:r??"none",color:l,className:c,style:{flexShrink:0,width:`calc(${t} * var(--content))`,height:`calc(${t} * var(--content))`,color:l??"currentColor",...u},"aria-hidden":"true"})}function a7(e,t=Date.now()){const a=Math.floor((t-e)/1e3);return a<5?"just now":a<60?`${a}s ago`:a<3600?`${Math.floor(a/60)}m ago`:`${Math.floor(a/3600)}h ago`}const Qm="inline-flex flex-shrink-0 items-center gap-1.5 whitespace-nowrap p-1 text-[length:calc(12.5*var(--content))] font-medium";function r7({status:e}){const[,t]=x.useReducer(a=>a+1,0);return x.useEffect(()=>{const a=setInterval(t,15e3);return()=>clearInterval(a)},[]),e.state==="saving"?d.jsxs("div",{className:ae(Qm,"text-ink-2"),children:[d.jsx("span",{className:"size-3 animate-spin rounded-full border-[1.6px] border-ink-4 border-t-accent [animation-duration:0.8s]","aria-hidden":"true"}),d.jsx("span",{children:"Saving…"})]}):e.state==="error"?d.jsxs("div",{role:"status",className:ae(Qm,"text-ink-2"),children:[d.jsx(li,{name:"x",size:13,stroke:2.4,className:"text-danger"}),d.jsx("span",{children:"Not saved"})]}):d.jsxs("div",{className:ae(Qm,"text-ink-3"),children:[d.jsx(li,{name:"check",size:13,stroke:2.4,className:"text-good"}),d.jsxs("span",{children:["Saved"," ",d.jsx("span",{className:"ml-0.5 font-normal text-ink-4 [font-variant-numeric:tabular-nums]",children:a7(e.savedAt)})]})]})}const o7=x.createContext(null);function J_(){const e=x.useContext(o7);return e===null?null:d.jsx(r7,{status:e})}function l7({open:e=!0,onClose:t,title:a,notice:r,children:l}){return d.jsxs(wy,{open:e,onClose:t,ariaLabel:a,className:_$,children:[d.jsxs("div",{className:O$,children:[d.jsx("div",{className:$y,children:d.jsx("h2",{className:ae(Uy,"truncate"),children:a})}),d.jsx(J_,{}),d.jsx("button",{type:"button",className:Iy,onClick:t,"aria-label":"Close",children:d.jsx(Rt.x,{})})]}),r,d.jsx("div",{className:A$,children:l})]})}function s7(e){const[t]=e.ids,{removeFrom:a}=e,r=a===void 0&&e.ids.length===1&&t!==void 0&&!e.inFlightIds.has(t)?t:null,c=qd({queryKey:["media-holders",e.scope,r],queryFn:()=>{if(r===null)throw new Error("holder read disabled without a single listed id");return e.holders(r)},enabled:r!==null}).data??[],u=a_(),m=e.ids.length;return Zi.createPortal(d.jsx("div",{className:"fixed inset-0 flex items-center justify-center bg-black/40",style:{zIndex:u},onClick:e.onCancel,children:d.jsxs("div",{className:"w-[calc(400*var(--frame))] rounded-lg border border-line bg-canvas p-5 shadow-xl",role:"alertdialog","aria-modal":"true",onClick:p=>p.stopPropagation(),children:[d.jsxs("div",{className:"text-[length:calc(15*var(--content))] font-semibold text-ink",children:[a===void 0?"Delete":"Remove"," ",m===1?"this object":`${m} objects`,a===void 0?"":` from ${a}`,"?"]}),a!==void 0?d.jsx("p",{className:"mt-1.5 text-body leading-[1.5] text-ink-2",children:m===1?"It stays in your uploads.":"They stay in your uploads."}):c.length>0?d.jsxs(d.Fragment,{children:[d.jsx("p",{className:"mt-1.5 text-body leading-[1.5] text-ink-2",children:"Deleting it also removes it from:"}),d.jsx("ul",{className:"mt-1.5 max-h-[calc(160*var(--content))] overflow-y-auto text-body leading-[1.5] text-ink","aria-label":"Where this object is used",children:c.map(p=>d.jsx("li",{className:"truncate before:mr-1.5 before:text-ink-2 before:content-['•']",children:p.name},p.id))})]}):d.jsx("p",{className:"mt-1.5 text-body leading-[1.5] text-ink-2",children:m===1?"This permanently removes the file.":`This permanently removes ${m} objects.`}),d.jsxs("div",{className:"mt-4 flex justify-end gap-2",children:[d.jsx("button",{type:"button",className:"rounded-[calc(8*var(--content))] border border-line px-3 py-1.5 text-body font-medium text-ink hover:bg-accent-soft",onClick:e.onCancel,children:"Cancel"}),d.jsx("button",{type:"button",className:"rounded-[calc(8*var(--content))] bg-danger px-3 py-1.5 text-body font-medium text-white hover:opacity-90",onClick:e.onConfirm,children:a===void 0?"Delete":"Remove"})]})]})}),document.body)}const Pu="grid h-8 w-8 place-items-center rounded-full text-white/85 hover:bg-white/[0.12] hover:text-white",Yw="absolute top-1/2 z-[2] grid h-10 w-10 -translate-y-1/2 place-items-center rounded-full bg-white/10 text-white hover:bg-white/[0.22]";function c7({file:e,index:t,total:a,onClose:r,onPrev:l,onNext:c,onDownload:u,onDelete:m,onCrop:p}){const g=e.thumbnailUrl!==null,b=a_();return Zi.createPortal(d.jsxs("div",{className:"fixed inset-0 flex flex-col bg-black/80",style:{zIndex:b},role:"dialog","aria-modal":"true","aria-label":`Preview: ${e.name}`,onClick:r,children:[d.jsxs("div",{className:"flex shrink-0 items-center gap-2.5 px-4.5 py-3.25",onClick:v=>v.stopPropagation(),children:[d.jsx("span",{className:"max-w-[44vw] truncate text-[length:calc(13.5*var(--content))] font-semibold text-white",title:e.name,children:e.name}),d.jsx(v_,{file:e}),d.jsxs("div",{className:"ml-auto flex items-center gap-1",children:[p?d.jsx("button",{type:"button",className:Pu,title:"Crop","aria-label":`Crop ${e.name}`,onClick:v=>{v.stopPropagation(),p()},children:d.jsx(it,{name:"crop",size:15})}):null,u&&!Ms(e)?d.jsx("button",{type:"button",className:Pu,title:"Download",onClick:v=>{v.stopPropagation(),u()},children:d.jsx(it,{name:"down",size:15})}):null,m?d.jsx("button",{type:"button",className:Pu,title:"Delete",onClick:v=>{v.stopPropagation(),m()},children:d.jsx(it,{name:"trash",size:14})}):null,d.jsx("span",{className:"mx-2 h-4.5 w-px bg-white/[0.18]"}),d.jsx("button",{type:"button",className:Pu,title:"Close","aria-label":"Close preview",onClick:r,children:d.jsx(it,{name:"x",size:15})})]})]}),d.jsxs("div",{className:"relative grid min-h-0 flex-1 place-items-center px-19",children:[a>1?d.jsx("button",{type:"button",className:`${Yw} left-5`,"aria-label":"Previous",onClick:v=>{v.stopPropagation(),l()},children:d.jsx(it,{name:"chevl",size:16})}):null,g?d.jsx("div",{className:"relative h-[min(560px,100%)] w-[min(880px,100%)] rounded bg-contain bg-center bg-no-repeat shadow-[0_30px_80px_-20px_rgba(0,0,0,0.6)]",style:{backgroundImage:`url("${e.thumbnailUrl??""}")`},onClick:v=>v.stopPropagation(),children:e.kind==="video"?d.jsx("span",{className:"absolute inset-0 m-auto flex h-13 w-13 items-center justify-center rounded-full border-[1.5px] border-white/85 bg-[rgba(10,12,10,0.55)] pl-0.5 text-white backdrop-blur-[2px]",children:d.jsx(it,{name:"play",size:20})}):null}):d.jsx("div",{className:"relative h-[min(420px,100%)] w-[min(560px,100%)] overflow-hidden rounded shadow-[0_30px_80px_-20px_rgba(0,0,0,0.6)]",onClick:v=>v.stopPropagation(),children:d.jsx(Ay,{file:e,face:"lightbox"})}),a>1?d.jsx("button",{type:"button",className:`${Yw} right-5`,"aria-label":"Next",onClick:v=>{v.stopPropagation(),c()},children:d.jsx(it,{name:"chevr",size:16})}):null]}),d.jsxs("div",{className:"shrink-0 p-3.25 text-center text-xs font-medium text-white/55",children:[t+1," of ",a]})]}),document.body)}function u7(e){return[{id:"all",label:"All"},...wd.filter(t=>e.includes(t)).map(t=>({id:t,label:mc[t].plural}))]}const Qw=[{id:"custom",label:"Custom"},{id:"date",label:"Date added"},{id:"name",label:"Name"},{id:"kind",label:"Kind"},{id:"size",label:"Size"}],d7="ml-auto inline-flex text-ink-3";function f7({filter:e,setFilter:t,counts:a,kinds:r}){const l=u7(r),[c,u]=x.useState(!1),m=x.useRef(null),p=x.useCallback(()=>u(!1),[]);pc(m,c,p);const g=e!=="all",b=l.find(v=>v.id===e)??{label:"All"};return d.jsxs("div",{className:"relative",ref:m,children:[d.jsxs("button",{type:"button","aria-expanded":c,onClick:()=>u(v=>!v),className:`${Sy} ${g?"border-accent bg-accent-soft text-accent-ink":Ey}`,children:[e==="all"?null:d.jsx(Vr,{kind:e,decorative:!0}),d.jsx("span",{className:g?"text-accent-ink opacity-70":"text-ink-3",children:"Kind:"}),d.jsx("span",{className:"font-semibold",children:b.label}),d.jsx("span",{className:`inline-flex ${g?"text-accent-ink":"text-ink-3"}`,children:d.jsx(it,{name:"chevd",size:13})})]}),c?d.jsx("div",{className:`${Xd} right-0 top-[calc(100%+6*var(--content))] min-w-[calc(210*var(--frame))] p-1.5`,role:"menu",children:l.map(v=>d.jsxs("button",{type:"button",role:"menuitemradio","aria-checked":e===v.id,className:o_,onClick:()=>{t(v.id),u(!1)},children:[v.id==="all"?d.jsx("span",{className:"grid h-5 w-5 place-items-center text-ink-3","aria-hidden":"true",children:d.jsx(it,{name:"grid",size:13})}):d.jsx(Vr,{kind:v.id,decorative:!0}),d.jsx("span",{children:v.label}),d.jsx("span",{className:"ml-auto text-[length:calc(11.5*var(--content))] font-medium text-ink-4",children:a[v.id]}),d.jsx("span",{className:`inline-flex w-3 text-ink-3 ${e===v.id?"":"invisible"}`,children:d.jsx(it,{name:"check",size:12,stroke:2.4})})]},v.id))}):null]})}function h7({sort:e,setSort:t}){var m;const[a,r]=x.useState(!1),l=x.useRef(null),c=x.useCallback(()=>r(!1),[]);pc(l,a,c);const u=((m=Qw.find(p=>p.id===e))==null?void 0:m.label)??"Custom";return d.jsxs("span",{className:"relative inline-flex",ref:l,children:[d.jsxs("button",{type:"button",className:`${Sy} ${Ey}`,"aria-expanded":a,onClick:()=>r(p=>!p),children:[d.jsx("span",{className:"text-ink-3",children:"Sort:"}),d.jsx("span",{className:"font-semibold",children:u}),d.jsx("span",{className:"inline-flex text-ink-3",children:d.jsx(it,{name:"chevd",size:13})})]}),a?d.jsx("div",{className:`${Xd} right-0 top-[calc(100%+6*var(--content))] w-[calc(170*var(--frame))] p-1.5`,role:"menu",children:Qw.map(p=>d.jsxs("button",{type:"button",role:"menuitemradio","aria-checked":e===p.id,className:o_,onClick:()=>{t(p.id),r(!1)},children:[p.label,e===p.id?d.jsx("span",{className:d7,children:d.jsx(it,{name:"check",size:12,stroke:2.4})}):null]},p.id))}):null]})}function m7({view:e,setView:t}){const a=(r,l)=>{const c=e===r;return d.jsxs("button",{type:"button","aria-label":l,"aria-pressed":c,title:l,onClick:()=>t(r),className:`flex h-full cursor-pointer items-center gap-1 px-3 transition-colors duration-150 ${c?"bg-accent-soft text-accent-ink":"text-ink-3 hover:bg-[#f6f5f1] hover:text-ink"} ${r==="list"?"border-l border-line":""}`,children:[c?d.jsx(it,{name:"check",size:13,stroke:2.4}):null,d.jsx(it,{name:r,size:15})]})};return d.jsxs("div",{className:"flex h-9 shrink-0 overflow-hidden rounded-lg border border-line bg-canvas",role:"group","aria-label":"View",children:[a("list","List view"),a("grid","Grid view")]})}function p7({lead:e,selectionPill:t,filter:a,setFilter:r,counts:l,kinds:c,sort:u,setSort:m,view:p,setView:g}){return d.jsxs("div",{className:"flex min-h-9 shrink-0 flex-wrap items-center gap-2",onClick:b=>b.stopPropagation(),children:[e,t,d.jsxs("div",{className:"ml-auto flex items-center gap-2",children:[d.jsx(f7,{filter:a,setFilter:r,counts:l,kinds:c}),d.jsx(h7,{sort:u,setSort:m}),d.jsx(m7,{view:p,setView:g})]})]})}function g7({count:e,onClear:t,onDownload:a,onDelete:r}){const l="inline-flex h-7 cursor-pointer items-center gap-1.5 rounded-md px-2 text-[length:calc(12.5*var(--content))] font-semibold hover:bg-[rgba(15,42,34,0.08)]";return d.jsxs("div",{role:"toolbar","aria-label":"Selection",className:"flex h-9 max-w-[calc(420*var(--frame))] items-center gap-0.5 overflow-hidden whitespace-nowrap rounded-lg border border-[#d5e0cf] bg-accent-soft pl-1 pr-1 opacity-100 transition-[max-width,opacity] duration-300 ease-out starting:max-w-0 starting:opacity-0",onClick:c=>c.stopPropagation(),children:[d.jsx("button",{type:"button",className:"grid h-7 w-7 shrink-0 cursor-pointer place-items-center rounded-md text-ink-2 hover:bg-[rgba(15,42,34,0.08)]","aria-label":"Clear selection",onClick:t,children:d.jsx(it,{name:"x",size:14})}),d.jsxs("span",{className:"ml-0.5 mr-1.5 text-[length:calc(12.5*var(--content))] font-semibold text-ink",children:[e," selected"]}),d.jsx("span",{className:"mx-1 h-4 w-px shrink-0 bg-[rgba(15,42,34,0.16)]"}),d.jsxs("button",{type:"button",className:`${l} text-accent`,onClick:a,children:[d.jsx(it,{name:"down",size:13}),"Download"]}),r?d.jsxs("button",{type:"button",className:`${l} text-danger`,onClick:r,children:[d.jsx(it,{name:"trash",size:13}),"Delete"]}):null]})}function Gy(e,t,a=new Set){const r=e.includes(t);return{checked:r,disabled:!r&&a.has(t)}}function ej(e,t,a,r){const{checked:l,disabled:c}=Gy(e,t,r);return a==="radio"?l||c?e:[t]:l?e.filter(u=>u!==t):c?e:[t,...e]}const Xw="hp-uploads-view",y7=new Set;function b7({onReset:e}){return d.jsxs("div",{className:"flex min-h-0 flex-1 flex-col items-center justify-center-safe gap-3 overflow-y-auto px-6 py-12 text-center",children:[d.jsx("span",{className:"text-base font-semibold tracking-[-0.01em] text-ink",children:"Nothing matches this filter"}),d.jsx("button",{type:"button",className:"inline-flex h-8 items-center justify-center rounded-lg border border-line bg-canvas px-3 text-[length:calc(12.5*var(--content))] font-medium text-ink hover:bg-[#f6f5f1]",onClick:e,children:"Show everything"})]})}const v7=ae(D_,"flex flex-col gap-3"),x7="flex min-h-0 flex-1 flex-col overflow-hidden rounded-2xl border border-line bg-canvas transition-[box-shadow,background-color] duration-150 data-dragging:bg-accent-soft/40 data-dragging:ring-2 data-dragging:ring-accent",w7=ae(D_,"flex flex-col rounded-2xl border border-line bg-canvas items-center justify-center text-center text-body text-ink-3"),Zw="grid grid-cols-[repeat(auto-fill,minmax(calc(200*var(--frame)),1fr))] gap-4 p-4",k7=8;function S7({filter:e,selection:t,host:a,beneathOf:r,tiers:l}){const{capabilities:c,preparing:u}=a,{kinds:m,from:p}=Ds(e),g=x.useMemo(()=>{const re=new Map((l??[]).flatMap((Se,Pe)=>Se.map(At=>[At,Pe])));return Se=>re.get(Se)??0},[l]),b=(l==null?void 0:l.flat())??p,v=c.upload?Vy(m):null,k=c.upload&&Sg(m).length>0,w=x.useRef(null),j=x.useRef(new Set),E=re=>{t.mode!=="all"&&(w.current??(w.current=Date.now())),a.addFiles(re)},_=re=>{t.mode!=="all"&&(w.current??(w.current=Date.now())),a.addLink(re)},C=K$(p),O=v!==null||k?{accept:v,onFiles:E,...k?{onLink:_}:{},disabled:u}:null,[A,D]=x.useState(()=>new Set),[R,F]=x.useState(()=>t.mode==="multi"?t.selectedIds:[]),[L,T]=x.useState("all"),[H,ne]=x.useState("custom"),[Y,le]=x.useState(null),[K,X]=x.useState(null),[ue,M]=x.useState(()=>{if(typeof window>"u")return"grid";try{return window.localStorage.getItem(Xw)==="list"?"list":"grid"}catch{return"grid"}}),[V,te]=x.useState(null),[me,Q]=x.useState(null),[N,q]=x.useState(!1),[I,P]=x.useState(null),[ee,pe]=x.useState(null),se=x.useRef(0),ke=x.useRef(null);x.useEffect(()=>{try{window.localStorage.setItem(Xw,ue)}catch{}},[ue]),x.useEffect(()=>()=>{ke.current&&clearTimeout(ke.current)},[]);const z=x.useCallback(re=>{P(re),ke.current&&clearTimeout(ke.current),ke.current=setTimeout(()=>P(null),2400)},[]),ce=x.useMemo(()=>new Map(a.items.flatMap(re=>jn(re)?[]:[[re.record.id,re.record]])),[a.items]),ge=x.useMemo(()=>new Map(a.items.flatMap(re=>jn(re)?[]:[[Fr({holder:Gw(re.list),mediaId:re.record.id}),re.record]])),[a.items]),Ee=x.useCallback(re=>ge.get(Fr(re)),[ge]),Ue=Y_({propertyId:t.mode==="all"?a.scope:"",recordAt:Ee,write:a.crop,onFailed:()=>z("Couldn't crop")}),Le=re=>({holder:Gw(re.list),mediaId:re.id}),ye=re=>t.mode==="all"&&c.manage&&re.kind==="image"&&!re.inFlight&&Ue.offers(Le(re))?{onCrop:()=>Ue.open(Le(re))}:{},Re=a.items.filter(re=>{const Se=jn(re)?re.kind:re.record.kind;return b.includes(re.list)&&(Se===null||m.includes(Se))}).map(re=>X8(re,g)).map(re=>re.state==="ready"&&Ue.recropping(Le(re))?{...re,state:"processing"}:re),ht=x.useMemo(()=>new Set(a.items.filter(jn).map(p_)),[a.items]),$e=J8(Re),Lt=Y===null?Re:[...Re].sort((re,Se)=>Y.indexOf(re.id)-Y.indexOf(Se.id)),st=W8(Lt,L,H),[Bn]=p,On=a.reorder,cn=t.mode==="all"&&c.manage&&On!==void 0&&H==="custom"&&p.length===1&&V===null,yt=cn?st.filter(re=>!re.inFlight):[],Wi=re=>{X(null);const Se=re.map(nt=>nt.id),Pe=Lt.filter(nt=>!nt.inFlight).map(nt=>nt.id),At=C5(Pe,Se);On===void 0||Bn===void 0||At.every((nt,qn)=>nt===Pe[qn])||(le(At),On(Bn,Se).then(()=>le(null),()=>{le(null),z("Couldn't reorder")}))},{containerRef:ci,getItemProps:ti}=O_({items:yt,getKey:re=>re.id,onReorder:X,onDrop:Wi,axis:ue==="list"?"y":"xy",threshold:5}),we=K===null?st:[...st.filter(re=>re.inFlight),...K],Te=x.useCallback(()=>D(new Set),[]),Ce=x.useMemo(()=>t.mode==="all"?y7:new Set([...t.disabledIds??[],...ht]),[t,ht]),Xe=t.mode==="single"?t.selectedId===null?[]:[t.selectedId]:R,at=re=>{if(t.mode==="all")return;if(t.mode==="single"){const Pe=Ce.has(re)?void 0:ce.get(re);Pe&&t.onPick(Pe);return}const Se=ej(Xe,re,"checkbox",Ce);Se!==Xe&&(F(Se),t.onChange(Se.flatMap(Pe=>ce.get(Pe)??[])))};x.useEffect(()=>{const re=w.current;if(re===null||t.mode==="all")return;for(const nt of a.items)jn(nt)&&nt.addedAt>=re&&j.current.add(nt.id);const Se=[...j.current].filter(nt=>ce.has(nt)&&!Ce.has(nt)),[Pe]=Se;if(Pe===void 0)return;for(const nt of Se)j.current.delete(nt);if(t.mode==="single"){at(Pe);return}const At=[...Se.filter(nt=>!Xe.includes(nt)),...Xe];At.length!==Xe.length&&(F(At),t.onChange(At.flatMap(nt=>ce.get(nt)??[])))},[a.items]);const Vt=re=>{if(t.mode==="all")return{selected:A.has(re),control:"checkbox",disabled:!1};const{checked:Se,disabled:Pe}=Gy(Xe,re,Ce);return{selected:Se,control:t.mode==="single"?"radio":"checkbox",disabled:Pe}},ut=re=>{if(t.mode!=="all"){at(re);return}D(Se=>{const Pe=new Set(Se);return Pe.has(re)?Pe.delete(re):Pe.add(re),Pe})},ie=st.findIndex(re=>re.id===me),be=ie>=0?st[ie]:void 0,Oe=re=>{var Pe;if(st.length===0)return;const Se=(Math.max(ie,0)+re+st.length)%st.length;Q(((Pe=st[Se])==null?void 0:Pe.id)??null)},ze=re=>{if(!me||!re.includes(me))return;const Se=st.findIndex(nt=>nt.id===me),At=[...st.slice(Se+1),...st.slice(0,Math.max(Se,0))].find(nt=>!re.includes(nt.id));Q(At?At.id:null)};x.useEffect(()=>{const re=Se=>{if(Ue.isOpen)return;const Pe=Se.target instanceof HTMLElement?Se.target.tagName:"";if(!(Pe==="INPUT"||Pe==="TEXTAREA")){if(ee){Se.key==="Escape"&&pe(null),(Se.key==="Escape"||Se.key==="Enter")&&Se.preventDefault();return}if(Se.key==="Escape"){if(me)Q(null);else if(A.size>0)Te();else return;Se.preventDefault()}else me&&Se.key==="ArrowRight"?Oe(1):me&&Se.key==="ArrowLeft"?Oe(-1):me&&Se.key==="Enter"&&Se.preventDefault()}};return document.addEventListener("keydown",re),()=>document.removeEventListener("keydown",re)});const Ge=re=>{ze(re),D(Se=>{const Pe=new Set(Se);return re.forEach(At=>Pe.delete(At)),Pe}),a.remove(re).then(Se=>{Se>0?z(`Couldn't delete ${Se}`):z(`Deleted ${re.length} object${re.length===1?"":"s"}`)})},Be=()=>{ee&&(pe(null),Ge(ee))},kt=re=>{Ms(re)||re.inFlight||(z("Preparing download…"),a.download(re.id).catch(()=>z("Couldn't download")))},jt=()=>{const re=Re.filter(Se=>A.has(Se.id)&&!Ms(Se)&&!Se.inFlight);re.length!==0&&(z("Preparing download…"),re.forEach(Se=>void a.download(Se.id).catch(()=>z("Couldn't download"))))},St=(re,Se)=>{te(null),!(Se===null||!Se||Se===re.name)&&a.rename(re.id,Se).catch(()=>z("Couldn't rename"))},Bt=v!==null&&!u,Gt=re=>{re.preventDefault(),!(!Bt||!Array.from(re.dataTransfer.types).includes("Files"))&&(se.current+=1,q(!0))},Kt=re=>{re.preventDefault(),se.current-=1,se.current<=0&&(se.current=0,q(!1))},An=re=>{re.preventDefault(),se.current=0,q(!1),Bt&&re.dataTransfer.files.length>0&&E(Array.from(re.dataTransfer.files))},Si=re=>t.mode==="all"&&A.has(re)&&A.size>1?st.filter(Se=>A.has(Se.id)).map(Se=>Se.id):null,ni=re=>{const{selected:Se,control:Pe,disabled:At}=Vt(re.id),nt=Si(re.id),qn=nt==null?void 0:nt.filter(Ot=>!ht.has(Ot));return{file:re,selected:Se,select:{control:Pe,disabled:At},listChip:p.length<2||re.upstream?null:ud(re.list)??re.list,renaming:V===re.id,onClick:Ot=>{Ot.stopPropagation(),ut(re.id)},onDoubleClick:()=>t.mode==="single"?at(re.id):Q(re.id),onToggleSelect:()=>ut(re.id),...re.state==="failed"&&a.canRetry(re.id)?{onRetry:()=>a.retry(re.id)}:{},...re.linkUnreachable?{onRecheck:()=>void a.recheck(re.id)}:{},onRenameCommit:Ot=>St(re,Ot),handlers:{onPreview:()=>Q(re.id),onDownload:()=>kt(re),...ye(re),...c.manage?{onRenameStart:()=>te(re.id),onDelete:()=>pe(nt??[re.id]),...nt!==null?{deleteLabel:`Delete ${nt.length} objects`}:{}}:{}},...cn&&!re.inFlight?{drag:ti(re.id,qn)}:{}}},ui=re=>{const Se=new Set(Re.filter(At=>re.includes(At.id)).map(At=>At.list)),[Pe]=Se;return Se.size!==1||Pe===void 0||qr(Pe).at(-1)===Pe?{}:{removeFrom:ud(Pe)??Pe}},Qr=[...A],kc=Re.length===0;return d.jsxs("div",{className:"flex flex-col",onClick:Te,onDragEnter:Gt,onDragOver:re=>re.preventDefault(),onDragLeave:Kt,onDrop:An,children:[a.loading?d.jsx("div",{className:w7,children:"Loading…"}):d.jsxs("div",{className:v7,children:[d.jsx(p7,{lead:d.jsx(hc,{size:"large",add:C,onAdd:null,...O!==null?{newChip:d.jsx(yz,{add:O,verb:C})}:{}}),selectionPill:A.size>0?d.jsx(g7,{count:A.size,onClear:Te,onDownload:jt,...c.manage?{onDelete:()=>pe(Qr)}:{}}):null,filter:L,setFilter:T,counts:$e,kinds:m,sort:H,setSort:ne,view:ue,setView:M}),d.jsx("div",{className:x7,"data-dragging":N||void 0,children:kc?d.jsxs("div",{className:"relative min-h-0 flex-1",children:[d.jsx(fc,{children:d.jsx("div",{className:Zw,children:Array.from({length:k7},(re,Se)=>d.jsx(m$,{},Se))})}),d.jsx(mz,{add:O,kinds:m,dragging:N})]}):st.length===0?d.jsx(b7,{onReset:()=>T("all")}):d.jsx("div",{className:"min-h-0 flex-1 overflow-y-auto",children:ue==="grid"?d.jsx("div",{ref:ci,className:ae("relative",Zw),role:"listbox","aria-multiselectable":t.mode!=="single","aria-label":"Uploaded objects",children:we.map(re=>d.jsx(h$,{...ni(re),beneath:r==null?void 0:r(re)},re.id))}):d.jsxs("div",{ref:ci,className:"relative pt-1",role:"table","aria-label":"Uploaded objects",children:[d.jsx(p$,{}),we.map(re=>d.jsx(y$,{...ni(re)},re.id))]})})})]}),be?d.jsx(c7,{file:be,index:ie,total:st.length,onClose:()=>Q(null),onPrev:()=>Oe(-1),onNext:()=>Oe(1),...!Ms(be)&&!be.inFlight?{onDownload:()=>kt(be)}:{},...c.manage?{onDelete:()=>pe([be.id])}:{},...ye(be)}):null,Ue.modal,ee&&!u?d.jsx(s7,{scope:a.scope,ids:ee,inFlightIds:ht,holders:a.holders,...ui(ee),onCancel:()=>pe(null),onConfirm:Be}):null,I?d.jsx("div",{role:"status",style:{zIndex:r8},className:"fixed bottom-6 left-1/2 -translate-x-1/2 rounded-full bg-ink px-4 py-2 text-body font-semibold text-canvas shadow-[0_14px_34px_-10px_rgba(10,12,10,0.5)]",children:I}):null]})}function Ky(){return Wt()}function E7(e){const t=Us(e[0]).home;return W4(e).flatMap(a=>{const[r,...l]=a;return r===void 0?[]:[{lists:[r,...l],label:a.map(c=>Z_(c,t)??Us(c).key).join(" + ")}]}).reverse()}const Gp=new Map,Wu=new Map,Kp=new Set,Yp=[],Ju=new Map,Ww=new Set,cl=new Map;function _7(e,t){var a;(a=cl.get(e))==null||a.onStored(t),cl.delete(e)}function Xm(e,t){var a;(a=cl.get(e))==null||a.onFailed(t),cl.delete(e)}function tj(){for(const e of Kp)e()}function nj(e){return Kp.add(e),()=>{Kp.delete(e)}}function Yy(e,t){t.length===0?Gp.delete(e):Gp.set(e,t),tj()}function Ur(e){return Gp.get(e)??Yp}function Jw(e,t){t.length!==0&&Yy(e,[...t,...Ur(e)])}function Qp(e,t,a){const r=Ur(e);r.some(l=>l.inFlight.id===t)&&Yy(e,r.map(l=>l.inFlight.id===t?a(l):l))}function ek(e,t){var c;const a=new Set(t),r=Ur(e),l=r.filter(u=>a.has(u.inFlight.id));if(l.length!==0){for(const u of l)(c=u.inFlight.preview)!=null&&c.startsWith("blob:")&&URL.revokeObjectURL(u.inFlight.preview);Yy(e,r.filter(u=>!a.has(u.inFlight.id)))}}function tk(e,t,a,r){const l=Wu.get(e)??Ju,c=l.get(t)??[];if(c.includes(a)===r)return;const u=new Map(l),m=r?[...c,a]:c.filter(p=>p!==a);m.length===0?u.delete(t):u.set(t,m),u.size===0?Wu.delete(e):Wu.set(e,u),tj()}function j7(e){return x.useSyncExternalStore(nj,()=>e===null?Yp:Ur(e),()=>Yp)}function O7(e){return x.useSyncExternalStore(nj,()=>e===null?Ju:Wu.get(e)??Ju,()=>Ju)}function A7(e,t,a){const r=e.get(t);if(r===void 0)return!1;const l=qr(a).at(-1)??a;return r.includes(a)||r.includes(l)}function N7(e,t,a){return e.flatMap(({inFlight:r})=>{if(a.has(r.id))return[];const l=qr(r.list),c=t.find(u=>l.includes(u));return c===void 0?[]:[{...r,list:c}]})}const ij="local-",aj=()=>`${ij}${Math.random().toString(36).slice(2,10)}`,M7=e=>e.startsWith(ij);function nk(e,t){return e instanceof Error&&"problem"in e&&e.message!==""?e.message:t}function C7(e,t){const a=D8(t);return{inFlight:{id:aj(),list:e,kind:Q2(t.type),name:t.name,bytes:t.size,mime:t.type,url:null,addedAt:Date.now(),preview:a.ok&&t.type.startsWith("image/")?URL.createObjectURL(t):null,send:a.ok?{state:"uploading",progress:0}:{state:"failed",error:a.message}},baggage:{file:t}}}function ws(e,t,a){Qp(e,t,r=>({...r,inFlight:{...r.inFlight,send:a}}))}function R7(e,t,a){const{postListUploadWithProgress:r,postListLink:l,withdrawListItem:c,holdListItem:u}=e,m=O=>Pp(t,e,O),p=async(O,A,D)=>{tk(O,D,A,!0);try{await c(O,A,D)}catch(R){throw tk(O,D,A,!1),m(O),R}m(O)},g=async(O,A,D,R)=>{if(Ww.delete(A)){Xm(A,"Removed while sending"),p(O,R,D).catch(()=>{});return}Qp(O,A,F=>({...F,inFlight:{...F.inFlight,id:D,send:{state:"saving"}}})),await m(O),ek(O,[D]),_7(A,D)},b=async(O,A,D,R,F)=>{let L;try{L=(await r(O,D,R,H=>ws(O,A,{state:"uploading",progress:H}),{attempt:F,onAttempt:H=>Qp(O,A,ne=>({...ne,baggage:{...ne.baggage,attempt:H??void 0}}))})).id}catch(T){console.error("media.upload.failed",{itemId:A,propertyId:O,into:D,name:R.name,size:R.size,mime:R.type,error:T});const H=nk(T,"Upload failed");ws(O,A,{state:"failed",error:H}),Xm(A,H);return}await g(O,A,L,D)},v=async(O,A,D,R,F)=>{let L;try{L=(await l(O,D,R,F)).id}catch(T){console.error("media.link.create_failed",{itemId:A,propertyId:O,into:D,url:R,error:T});const H=nk(T,"Couldn’t add link");ws(O,A,{state:"failed",error:H}),Xm(A,H);return}await g(O,A,L,D)},k=(O,A,D)=>{if(a===null)return;const R=O.filter(Boolean).map(L=>C7(A,L));Jw(a,R);for(const L of R){if(D===void 0)continue;const{send:T}=L.inFlight;T.state==="failed"?D.onFailed(T.error):cl.set(L.inFlight.id,D)}const F=R.filter(L=>L.inFlight.send.state==="uploading");v8(F,T8,async L=>{L.baggage.file&&await b(a,L.inFlight.id,A,L.baggage.file)})},w=(O,A,D)=>{if(a===null)return;const R=/^https?:\/\//i.test(O)?O:`https://${O}`,F=crypto.randomUUID(),L={inFlight:{id:aj(),list:A,kind:g_(R),name:O8(R),bytes:null,mime:null,url:R,addedAt:Date.now(),preview:null,send:{state:"saving"}},baggage:{link:{url:R,idempotencyKey:F}}};Jw(a,[L]),D!==void 0&&cl.set(L.inFlight.id,D),v(a,L.inFlight.id,A,R,F)},j=O=>{if(a===null)return!1;const A=Ur(a).find(D=>D.inFlight.id===O);return A!==void 0&&A.inFlight.send.state==="failed"&&(A.baggage.file!==void 0||A.baggage.link!==void 0)},E=O=>{if(a===null)return;const A=Ur(a).find(R=>R.inFlight.id===O);if(A===void 0)return;const D=A.inFlight.list;if(A.baggage.link){const{url:R,idempotencyKey:F}=A.baggage.link;ws(a,O,{state:"saving"}),v(a,O,D,R,F);return}if(A.baggage.file){const R=L8({attempt:A.baggage.attempt});ws(a,O,{state:"uploading",progress:0}),b(a,O,D,A.baggage.file,R.kind==="resume"?R.attempt:void 0)}},_=async(O,A)=>{if(a===null)return 0;const D=new Set(O);for(const L of Ur(a))D.has(L.inFlight.id)&&L.inFlight.send.state==="uploading"&&Ww.add(L.inFlight.id);ek(a,O);const R=O.filter(L=>!M7(L));return(await Promise.allSettled(R.map(L=>p(a,A,L)))).filter(L=>L.status==="rejected").length},C=u===void 0||a===null?void 0:async(O,A)=>{await u(a,A,O),await m(a)};return{addFiles:k,addLink:w,canRetry:j,retry:E,remove:_,...C!==void 0?{hold:C}:{}}}function T7(e){const t=_y(),a=Bd();return x.useMemo(()=>R7(t,a,e),[t,a,e])}function D7(e,t,a,r){const l=Ds(t),c=e===void 0?[]:O5(e,l).filter(({id:p,list:g})=>!A7(r,p,g)),u=c.map(({value:p,file:g,list:b})=>({record:Og(g,p),list:b}));return[...N7(a,l.from,new Set(c.map(({id:p})=>p))),...u]}function L7(e,t,a,r){const l=j7(e),c=O7(e),u=T7(e),m=x.useMemo(()=>D7(a,t,l,c),[a,t,l,c]),p=r??nS(t),g=x.useCallback(j=>u.addFiles(j,p),[u,p]),b=x.useCallback(j=>u.addLink(j,p),[u,p]),v=x.useCallback(async j=>{const E=new Map;for(const C of m){const O=p_(C);j.includes(O)&&E.set(C.list,[...E.get(C.list)??[],O])}return(await Promise.all([...E].map(([C,O])=>u.remove(O,C)))).reduce((C,O)=>C+O,0)},[m,u]),{hold:k}=u,w=x.useMemo(()=>k===void 0||r===void 0?void 0:j=>k(j,r),[k,r]);return{items:m,sent:l,deleting:c,addFiles:g,addLink:b,remove:v,canRetry:u.canRetry,retry:u.retry,...w!==void 0?{land:w}:{}}}function bc(e){const{MediaPicker:t}=Ky();return d.jsx(t,{...e})}function z7(e){return new Set(e.flatMap(t=>{if(jn(t))return[];const{record:a}=t;return a.state!=="ready"||a.kind==="tour"&&!f_(a)?[a.id]:[]}))}const ik=ae("m-0 py-1 text-caption text-ink-3",zy);function $7({useHost:e,filter:t,propertyId:a,...r}){var K;const{onClose:l}=r,c=x.useMemo(()=>E7(Ds(t).from),[t]),u=x.useMemo(()=>c.map(({lists:X})=>X),[c]),m=x.useMemo(()=>({kinds:t.kinds,from:[...Ds(t).from,...u.slice(1).flat()]}),[t,u]),p=e(a,m,nS(t)),{land:g}=p,b=x.useMemo(()=>new Map(u.flatMap((X,ue)=>X.map(M=>[M,ue]))),[u]),[v,k]=x.useState(()=>new Set),w=x.useRef(null),j=x.useMemo(()=>{if(p.loading)return p.items;const X=new Map;for(const te of p.items){if(jn(te)||v.has(te.record.id))continue;const me=X.get(te.record.id);(me===void 0||(b.get(te.list)??0)<(b.get(me.list)??0))&&X.set(te.record.id,te)}const ue=[...X.values()],M=w.current??(w.current=new Map(ue.map((te,me)=>[te.record.id,{tier:b.get(te.list)??0,rank:me}])));for(const te of ue)M.has(te.record.id)||M.set(te.record.id,{tier:b.get(te.list)??0,rank:-M.size});const V=te=>M.get(te.record.id)??{tier:0,rank:0};return[...p.items.filter(jn),...ue.map(te=>({...te,tier:V(te).tier})).sort((te,me)=>V(te).rank-V(me).rank)]},[p.items,p.loading,b,v]),{remove:E}=p,_=x.useMemo(()=>({...p,items:j,remove:async ue=>{const M=ue.filter(te=>j.some(me=>!jn(me)&&me.record.id===te&&(b.get(me.list)??0)===0)),V=await E(ue);return V===0&&M.length>0&&k(te=>new Set([...te,...M])),V}}),[p,j,E,b]),C=x.useMemo(()=>z7(j),[j]),O=x.useMemo(()=>new Set(j.flatMap(X=>!jn(X)&&(b.get(X.list)??0)>0?[X.record.id]:[])),[j,b]),[A,D]=x.useState("idle"),[R,F]=x.useState(0),L=x.useRef(Promise.resolve()),T=x.useRef(0),H=x.useRef(new Set);if(t.kinds.length===0)return null;const ne=(X,ue)=>{const M=g===void 0?[]:X.filter(V=>O.has(V)&&!H.current.has(V));if(M.length===0&&T.current===0){ue();return}T.current+=1,L.current=L.current.then(async()=>{try{if(g===void 0||M.length===0){ue();return}D("landing");try{for(const V of M)await g(V),H.current.add(V)}catch{D("failed"),F(V=>V+1);return}D("idle"),ue()}finally{T.current-=1}})},Y=r.mode==="single"?{mode:"single",selectedId:r.currentId??null,disabledIds:C,onPick:X=>ne([X.id],()=>r.onPick(X))}:{mode:"multi",selectedIds:r.selectedIds.filter(Boolean),disabledIds:C,onChange:X=>{const ue=r.selectedIds;ne(X.filter(({id:M})=>!ue.includes(M)).map(({id:M})=>M),()=>r.onChange(X))}},le=((K=c[0])==null?void 0:K.label)??"";return d.jsx(l7,{onClose:l,title:le,notice:A==="landing"?d.jsxs("p",{role:"status",className:ik,children:["Adding to ",le,"…"]}):A==="failed"?d.jsxs("p",{role:"alert",className:ae(ik,"text-danger"),children:["Couldn't add it to ",le,". Try again."]}):null,children:d.jsx(S7,{filter:t,selection:Y,host:_,...g!==void 0?{tiers:u}:{}},R)})}function U7(e){return function(a,r,l){const c=Jd(a),u=L7(a,r,c,l),{items:m}=u,p=x.useCallback(g=>{const b=m.find(k=>!jn(k)&&k.record.id===g),v=b===void 0||jn(b)?null:b.record.file_url;return v&&window.open(v,"_blank","noopener"),Promise.resolve()},[m]);return{items:m,loading:c===void 0,capabilities:e,preparing:!1,scope:a,addFiles:u.addFiles,addLink:u.addLink,remove:u.remove,rename:()=>Promise.resolve(),canRetry:u.canRetry,retry:u.retry,recheck:()=>Promise.resolve(),download:p,holders:()=>Promise.resolve([]),...u.land!==void 0?{land:u.land}:{}}}}function I7({capabilities:e,...t}){const{upload:a,manage:r}=e,l=x.useMemo(()=>U7({upload:a,manage:r}),[a,r]);return d.jsx($7,{...t,useHost:l})}function Qy(e,t){const a=e8();return e!==void 0&&t!==""&&a!==void 0&&a(e,t)}const nf=ae(vt,"grid h-full w-[calc(36*var(--content))] cursor-pointer place-items-center rounded-[calc(6*var(--content))] text-ink-4","transition-[color,background-color] duration-[120ms] group-hover/row:text-ink-3 hover:bg-[rgba(20,18,13,.06)] hover:text-ink-2","focus-visible:outline-2 focus-visible:outline-offset-1 focus-visible:outline-ink"),Xy="hover:bg-[#fbe6e2] hover:text-danger",H7="size-[calc(13*var(--content))]",B7="we-no-drag h-[calc(36*var(--content))] shrink-0",rj="flex shrink-0 items-center";function af({icon:e,label:t,title:a,tone:r="neutral",onClick:l}){return d.jsx("button",{type:"button",className:ae(nf,B7,r==="remove"&&Xy),"aria-label":t,title:a,onClick:l,children:La.createElement(e,{className:H7})})}const q7={card:"rounded-2xl",compact:"rounded-xl"},F7={card:{bar:"flex h-14 min-w-0 items-center gap-3 pl-4 pr-2.5",name:"min-w-0 flex-1 truncate text-[length:calc(15*var(--content))] font-medium text-ink",mark:"h-6 w-6",button:"h-9 w-9",glyph:16},compact:{bar:"flex h-10 min-w-0 items-center gap-2 pl-3 pr-1.5",name:"min-w-0 flex-1 truncate text-[length:calc(13.5*var(--content))] font-medium text-ink",mark:"h-5 w-5",button:"h-8 w-8",glyph:15}},P7="text-ink-3",V7={card:"mx-2 rounded-xl",compact:"mx-1.5 rounded-lg"},G7=ae("flex aspect-[16/11] flex-col items-center justify-center gap-2 border-[1.5px] border-dashed border-line bg-canvas px-3 py-4 text-center","transition-[border-color,background-color] duration-[120ms]",YE),K7="border-honey-2 bg-honey-soft";function ak({kind:e,name:t,empty:a,scale:r,actions:l,attention:c,drop:u,children:m}){const p=_l(),g=$r[r],b=F7[r],{plain:v,foot:k}=I_(l),w=(u==null?void 0:u.over)??!1;return d.jsxs("div",{"data-media-slot-card":"",className:ae("relative flex flex-col border border-transparent bg-[#f3f2ed] transition-[background-color,box-shadow] duration-[140ms]",q7[r],wl,w&&!a&&"ring-2 ring-honey-2"),...kl(c,p),...u==null?void 0:u.handlers,"data-media-drop":u?"":void 0,children:[d.jsxs("div",{className:b.bar,children:[d.jsx("span",{className:ae("grid shrink-0 place-items-center",b.mark),children:d.jsx(Vr,{kind:e,size:r==="compact"?"mark":"lead"})}),d.jsx("span",{className:ae(b.name,a&&"font-normal text-ink-4"),title:t,children:t}),l.length>0&&d.jsx("span",{className:"we-no-drag flex shrink-0 items-center gap-0.5",children:[...v,...k].map(j=>d.jsx("button",{type:"button",className:ae(nf,P7,b.button,j.danger&&Xy),"aria-label":j.label,title:j.label,onClick:j.onSelect,children:d.jsx(it,{name:j.glyph,size:b.glyph})},j.label))})]}),a?d.jsx("div",{className:ae(G7,V7[r],w&&K7),"data-thumb":"",children:m}):d.jsx("div",{className:g.thumb,"data-thumb":"","data-media-tile":e,children:m}),d.jsx("div",{className:r==="compact"?"h-1.5":"h-2"})]})}function Xp(e){var t;return e===void 0?"Link":((t=Ya[e])==null?void 0:t.label)??"Link"}function Y7(e){return e.kind==="tour"?Xp(e.provider):e.kind!=="video"?"":e.videoSource==="link"?Xp(e.provider):e.ready===!1?"Processing…":R8(e.durationMs)||"Video"}function Q7({kind:e,size:t}){return e==="tour"?d.jsx(Rt.tour,{size:t}):d.jsx(Rt.play,{size:t})}const X7="absolute bottom-0 inset-x-0 truncate bg-[rgba(15,18,9,0.55)] px-0.5 text-center text-[length:calc(7.5*var(--content))] font-bold leading-[1.5] tracking-[0.02em] text-white",Z7={doc:Pd,spreadsheet:qE,presentation:gy,image:Vd,video:vy};function W7({glyph:e,extension:t,size:a=16,className:r}){const l=Z7[e];return d.jsxs(d.Fragment,{children:[d.jsx(l,{size:a,strokeWidth:1.5,className:r,style:{width:`calc(${a} * var(--content))`,height:`calc(${a} * var(--content))`}}),t&&d.jsx("span",{className:X7,children:t})]})}const J7=new Set(["image","video","tour","document","media"]);function eU(e){return Ha(e).length>0}function oj(e,t){const a=Yg(e,t);return a!==null?!J7.has(a.value_type)||a.filter!==void 0?null:{holder:"home",table:a.table,field:a.member}:!eU(e)||typeof e.from=="string"||e.source!==void 0&&e.source.kind!=="authored"?null:{holder:"section"}}function lj(){return`tmp_${globalThis.crypto.randomUUID()}`}function rf(e){return typeof e=="string"&&e.startsWith("tmp_")}function tU(e,t,a,r){const l=Cg(a.table)==="library"?{home:"library"}:{home:"property",propertyId:t},c=`${a.table}.${r}.${a.field}`;return{place:`${l.home}:${c}`,take:u=>e.stageOwnedMedia(l,c,u),presign:u=>e.ownedMediaUrl(l,c,u),discard:u=>e.discardStagedMedia(l,c,u)}}function sj(e,t,a){return{place:`content:${a.deliverableId}:${a.instanceId}:${a.slotId}`,take:r=>e.uploadContentMedia(t,a,r),presign:r=>e.contentMediaUrl(t,a,r),discard:null}}function nU(e,t){return e?e.itemId??null:t??null}function cj({props:e,table:t,ownerSlot:a,mediaId:r,inLibrary:l}){const{slot:c,propertyId:u,instanceId:m,recordContext:p,boundRowId:g,onUpload:b}=e,{api:v,useEditorStore:k}=Wt(),w=k(L=>L.session.deliverable_id),j=b===void 0?oj(a??c,t):null,E=(j==null?void 0:j.holder)==="home"?j:null,_=E===null?null:nU(p,g),C=rf(_),O=E===null||C?null:_;let A=null;E!==null&&O!==null&&(A=tU(v,u,E,O)),((j==null?void 0:j.holder)==="section"||C)&&w!==void 0&&(A=sj(v,u,{deliverableId:w,instanceId:m,slotId:uj(e)}));const D=qd({queryKey:["owned-media-url",A==null?void 0:A.place,r],queryFn:()=>A.presign(r),enabled:A!==null&&r!==""&&!l,retry:!1}),R=x.useRef(null);return{upload:A===null?null:async L=>{const T=await A.take(L),H=R.current;return R.current=T.media_id,A.discard!==null&&H!==null&&H!==T.media_id&&A.discard(H).catch(()=>{}),dj(T,L)},previewUrl:D.data}}function uj(e){var a;const t=(a=e.recordContext)==null?void 0:a.fieldKey;return t?`${e.slotId}.${t}`:e.slotId}function dj(e,t){const a=e.provider??("link"in t?ac(e.url)??void 0:void 0);return a===void 0?e:{...e,provider:a}}function Zy(e,t){var u;const{api:a,useEditorStore:r}=Wt(),l=r(m=>m.session.deliverable_id);if(l===void 0||((u=oj(e))==null?void 0:u.holder)!=="section")return null;const c=sj(a,t.propertyId,{deliverableId:l,instanceId:t.instanceId,slotId:t.slotId});return async m=>dj(await c.take(m),m)}function Cs(e,t){return e===void 0||e===""||t===""?null:{holder:e,mediaId:t}}function fj(e,t){const{capabilities:a}=Ky(),r=a.framingCrop!==!1,l=!r&&t==="image",c=x.useRef(new Map),u=Q_(l?e:"",m=>{const p=c.current.get(Fr(m));p!==void 0&&ty.getState().notice(p,"failed")});return{framing:r&&t==="image",offers:m=>r?t==="image":l&&m!==null&&u.offers(m),recrop:(m,p)=>{c.current.set(Fr(m),p),u.open(m)},recropping:m=>l&&m!==null&&u.recropping(m),modal:u.modal}}function hj(e,t,a,r){const l=t.file===""?void 0:e.get(t.file),u=((l==null?void 0:l.kind)==="image"?l.file_url??"":"")||r||t.url;if(t.crop)return{src:u,seed:rl(t.crop),inherited:!1};const m=(l==null?void 0:l.kind)==="image"&&a!=="locked"?l.crop:null;return m===null||!rc(m)?{src:u,seed:null,inherited:!1}:{src:u,seed:rl(m),inherited:!0}}function mj(e,t){if(!e.inherited||e.seed===null)return!1;const a=l=>Math.round(l*1e4)/1e4,{seed:r}=e;return a(t.nx)===a(r.nx)&&a(t.ny)===a(r.ny)&&a(t.nw)===a(r.nw)&&a(t.nh)===a(r.nh)}function pj(e,t){var l;const a=xp(t.rect);if(a===null){if(!e.crop&&!e.mobile)return null;const c=e.renditions?{renditions:{...e.renditions,crop:null}}:{};return{...e,crop:null,ar:null,mobile:null,...c}}const r=(l=e.mobile)!=null&&l.renditions?{renditions:e.mobile.renditions}:{};return{...e,crop:a,ar:t.ar,mobile:t.mobile?{crop:xp(t.mobile.rect),derived:t.mobile.derived,...r}:e.mobile??null}}function iU(e,t){return e.crop?rc(e.crop):(t==null?void 0:t.mode)!=="locked"?!1:typeof e.ar!="number"||JS(e.ar,t.aspect)!==null}function Zp(e,t){var l,c,u,m;if(!iU(e,t))return null;const a=(c=(l=e.renditions)==null?void 0:l.cutout)==null?void 0:c.key;if(typeof a=="string"&&a.startsWith(`processed/cutout/${e.file}/`))return a;const r=(m=(u=e.renditions)==null?void 0:u.crop)==null?void 0:m.key;return typeof r=="string"&&r.startsWith(`processed/crops/${e.file}/`)?r:null}function aU({value:e,onChange:t,propertyId:a,cropCfg:r}){const{api:l}=Wt(),c=Sl(a),[u,m]=x.useState(!1),p=Zp(e,r),g=LE(a,[p],l.getCropDerivativeUrl),b=p?g.get(p):void 0,v=k=>{var j;if(!u)return null;const w=hj(c,e,r.mode,k);return w.src?d.jsx(ey,{chrome:Hy,src:w.src,mode:r.mode,aspect:r.aspect,aspectLabel:r.aspectLabel,mobileAspect:r.mobileAspect,seed:{rect:w.seed},mobileSeed:{rect:rl((j=e.mobile)==null?void 0:j.crop)},onClose:()=>m(!1),onApply:E=>{if(m(!1),!e.file||!E.mobile&&mj(w,E.rect))return;const _=pj(e,E);_!==null&&t(_)}}):null};return{cropCfg:r,ar:e.ar??null,cut:p,derivativeUrl:b,open:()=>m(!0),modal:v}}function Wy({propertyId:e,children:t}){return d.jsx(d.Fragment,{children:t(Jd(e))})}function Jy(e,t){const a=Sl(t).get(e);return a===void 0?void 0:h_(a)}function rU(e){return e==null||e===""?void 0:e}function rk(e){return{file:e.file,url:e.url,alt:e.alt}}const oU={noun:"image",takes:yc(["image"]),fileIdOf:e=>e.file,fromPicked:(e,t)=>e.file===t.file?{...t,url:sl(e)}:{...rk(t),file:e.file,url:sl(e),alt:t.alt,picked:e.id},fromUploaded:(e,t)=>({...rk(t),file:e.media_id,url:e.url,picked:null}),cleared:{file:"",url:"",alt:""},usePreview:function(t,a){const r=Jy(t.file,a);return{src:(r==null?void 0:r.src)||t.url,name:rU(t.name)??(r==null?void 0:r.name)}}},lU={noun:"video",takes:yc(["video"]),fileIdOf:e=>e.file,fromPicked:(e,t)=>({...t,file:e.file,url:"",poster:sl(e),source:e.url!==null?"link":void 0,provider:e.url!==null?e.provider??void 0:void 0,picked:e.id}),fromUploaded:(e,t)=>({...t,file:e.media_id,url:"",poster:e.poster??"",source:e.provider!==void 0?"link":void 0,provider:e.provider,picked:null}),cleared:{file:"",url:"",poster:"",alt:""},usePreview:function(t,a){const r=Jy(t.file,a);return{src:(r==null?void 0:r.src)||t.poster,name:r==null?void 0:r.name,detail:r?Y7(r):void 0}}},sU={noun:"tour",takes:yc(["tour"]),fileIdOf:e=>e.file,fromPicked:(e,t)=>({...t,file:e.file,url:"",poster:sl(e),provider:e.provider??void 0,picked:e.id}),fromUploaded:(e,t)=>({...t,file:e.media_id,url:"",poster:e.poster??"",provider:e.provider,picked:null}),cleared:{file:"",url:"",poster:"",alt:""},usePreview:function(t,a){const r=Jy(t.file,a);return{src:(r==null?void 0:r.src)||t.poster,name:r==null?void 0:r.name,detail:t.file?Xp((r==null?void 0:r.provider)??t.provider):void 0}}},cU={noun:"document",takes:yc(["document"]),fileIdOf:e=>(e==null?void 0:e.file)??"",fromPicked:e=>({file:e.file,picked:e.id}),fromUploaded:e=>({file:e.media_id,picked:null}),cleared:null,usePreview:function(t,a){const r=Yz(a),l=(t==null?void 0:t.file)??"";if(!l)return{src:""};const c=r(l);return c?{src:c.src,name:c.name,detail:Kz(c),attachment:N_(c)}:{src:"",name:"Document unavailable"}}},uU={image:oU,video:lU,tour:sU,document:cU};function In(e){return uU[e]}function ul(e){return e.recordContext?e.recordContext.table??null:e.boundRowTable??null}const dU="text-[length:calc(11.5*var(--content))] text-ink-3",fU=ae(vt,"inline-flex items-center gap-1.5 rounded-full bg-accent px-3 py-1.5 text-[length:calc(12*var(--content))] font-semibold text-white transition-[background] duration-[120ms] hover:bg-accent-ink"),hU="flex w-full max-w-90 items-center gap-1.5",mU="min-w-0 flex-1 rounded-lg border border-line bg-white px-2.5 py-1.75 text-[length:calc(12.5*var(--content))] text-ink outline-none placeholder:text-ink-4 focus:border-ink",pU=ae(vt,"relative ml-[calc(10*var(--content))] grid aspect-square h-full shrink-0 cursor-pointer place-items-center overflow-hidden rounded-[calc(6*var(--content))] border border-line bg-[#e6e3da] text-ink-3","transition-[border-color,color] duration-[120ms] hover:border-ink-4 disabled:cursor-default disabled:hover:border-line","data-[empty]:border-dashed data-[empty]:not-data-[attention]:bg-transparent hover:data-[empty]:text-ink-2","focus-visible:outline-2 focus-visible:outline-offset-1 focus-visible:outline-ink",wl);function ok(e){return e.kind==="image"?d.jsx(gU,{...e}):d.jsx(gj,{...e})}function gj(e){const t=In(e.kind),a=cj({props:e.props,table:ul(e.props),mediaId:t.fileIdOf(e.props.value),inLibrary:!0});return d.jsx(xj,{...e,extras:{crop:null,pick:null,ownerUpload:a.upload,ownerPreview:void 0}})}function yj(e){const{slot:t,value:a,onChange:r,propertyId:l,factPath:c}=e,u=aU({value:a,onChange:r,propertyId:l,cropCfg:Qg(t)}),m=Ky().capabilities.framingCrop===!1,p=Q_(m?l:"");if(!m)return{...u,offered:!0,recropping:!1};const g=Cs(c,a.file);return{...u,cut:null,derivativeUrl:void 0,open:()=>{g!==null&&p.open(g)},modal:()=>p.modal,offered:g!==null&&p.offers(g),recropping:g!==null&&p.recropping(g)}}function gU(e){const t=yj(e.props),a=Sl(e.props.propertyId),r=e.props.value.file,l=(u,m,p)=>{e.props.onChange(By(u,e.props.value,m,t.cropCfg,p))},c=cj({props:e.props,table:ul(e.props),mediaId:r,inLibrary:r!==""&&a.has(r)});return d.jsx(xj,{...e,extras:{crop:t,pick:l,ownerUpload:c.upload,ownerPreview:c.previewUrl}})}function bj(e){return e.kind==="image"?d.jsx(yU,{...e}):d.jsx(vj,{...e,crop:null})}function yU(e){return d.jsx(vj,{...e,crop:yj(e.props)})}function vj({kind:e,model:t,props:a,onOpen:r,crop:l}){const{slot:c,value:u,propertyId:m,required:p}=a,g=In(e),b=g.usePreview(u,m),v=Hd(c,ul(a)),k=tf(c,{table:ul(a)}),w=Qy(a.factPath,g.fileIdOf(u));return d.jsx(xU,{kind:e,offer:v.kind,noun:g.noun,label:c.label,emptyName:k===null?c.label:W_(k).label,preview:b,empty:t.isEmpty(u),crop:l,processing:w,attention:tr(t,c,u,p??!1),onOpen:r})}function xj({kind:e,face:t,model:a,props:r,extras:l,open:c}){var se,ke;const{slot:u,value:m,onChange:p,propertyId:g,onUpload:b,required:v}=r,{crop:k,pick:w,ownerUpload:j,ownerPreview:E}=l,_=In(e),C=_.usePreview(m,g),O=E?{...C,src:E}:C,A=b!==void 0?{kind:"owned"}:Hd(u,ul(r)),D=a.isEmpty(m),R=tr(a,u,m,v??!1),F=Qy(r.factPath,_.fileIdOf(m))||((k==null?void 0:k.recropping)??!1),[L,T]=x.useState(!1),H=b??j??void 0,ne=bU(H,(z,ce)=>c?c.onUploaded(z,ce):p(_.fromUploaded(z,m))),Y=x.useRef(null),le=c?c.accept:Py[e]??void 0,K=c&&D?c.noun:_.noun,X=((ke=(se=tf(u,{table:ul(r)}))==null?void 0:se.choose)==null?void 0:ke.label)??Ps("Choose",K),ue=(c==null?void 0:c.takes)??_.takes,M=A.kind==="owned"&&H!==void 0,V=(z,ce)=>{c?c.onPicked(z):w?w(z,ce,A.kind==="picked"?A.filter.from:void 0):p(_.fromPicked(z,m))},te=ne,me=M&&ue.includes("file"),Q=M&&ue.includes("link"),N=Ps("Upload",K),q=__({accept:me?le??"":null,onFiles:([z])=>{z&&te.takeFile(z)},...Q?{onLink:te.takeLink,...c?{}:{linkKinds:[e]}}:{},disabled:te.busy},N,Y,!1),I=me||Q,P=A.kind==="picked"?[{label:X,glyph:"choose",run:()=>T(!0)}]:I?[{label:N,glyph:"upload",run:q.start}]:[],ee=k!=null&&k.offered&&!D&&O.src?k.open:null,pe=D?null:()=>p(_.cleared);return d.jsxs("div",{ref:Y,className:"flex min-w-0 flex-col gap-1",role:"group","aria-label":u.label,"data-media-face":t,"data-media-kind":e,"data-media-offer":A.kind,children:[d.jsx(vU,{scale:t==="expanded"?"card":"compact",kind:e,noun:K,label:u.label,preview:O,empty:D,crop:k,sources:P,onCrop:ee,onRemove:pe,drop:me?te.takeFile:null,link:Q?te.takeLink:null,busy:te.busy,processing:F,attention:R}),te.error&&d.jsx("p",{className:xl,children:te.error}),q.node,L&&A.kind==="picked"&&d.jsx(Wy,{propertyId:g,children:z=>d.jsx(bc,{mode:"single",propertyId:g,filter:A.filter,currentId:_.fileIdOf(m)||void 0,onClose:()=>T(!1),onPick:ce=>V(ce,z)})}),k==null?void 0:k.modal(E)]})}function bU(e,t){const[a,r]=x.useState(!1),[l,c]=x.useState(null),u=m=>{e&&(r(!0),c(null),e(m).then(p=>t(p,m)).catch(p=>{console.error("[editor] media upload failed",p),c("Upload failed. Try again.")}).finally(()=>r(!1)))};return{busy:a,error:l,takeFile:m=>u({file:m}),takeLink:m=>u({link:m})}}function wj({kind:e,preview:t,size:a}){var r,l;return e==="document"?d.jsx(W7,{glyph:((r=t.attachment)==null?void 0:r.glyph)??"doc",extension:((l=t.attachment)==null?void 0:l.extension)??"",size:a}):e==="video"||e==="tour"?d.jsx(Q7,{kind:e,size:a}):d.jsx(Rt.up,{})}function vU({scale:e,kind:t,noun:a,label:r,preview:l,empty:c,crop:u,sources:m,onCrop:p,onRemove:g,drop:b,link:v,busy:k,processing:w,attention:j}){const[E,_]=x.useState(!1),[C,O]=x.useState(""),A=Dy(u,l.src),D=b?{over:E,handlers:{onDragOver:F=>{F.preventDefault(),_(!0)},onDragLeave:F=>{F.currentTarget.contains(F.relatedTarget)||_(!1)},onDrop:F=>{var T;F.preventDefault(),_(!1);const L=(T=F.dataTransfer.files)==null?void 0:T[0];L&&b(L)}}}:null,R=[];if(p&&R.push({label:"Crop",glyph:"crop",onSelect:p}),!k)for(const F of m)R.push({label:F.label,glyph:F.glyph,onSelect:F.run,foot:!0});return g&&R.push({label:"Remove",glyph:"trash",onSelect:g,danger:!0}),c?d.jsxs(ak,{kind:t,name:`No ${a}`,empty:!0,scale:e,actions:R,attention:j,drop:D,children:[d.jsx("span",{className:"text-ink-4",children:d.jsx(wj,{kind:t,preview:l,size:24})}),(k||b)&&d.jsx("span",{className:dU,children:k?"Uploading…":E?`Drop to add this ${a}`:"Drop a file here"}),v&&d.jsxs("form",{className:hU,onSubmit:F=>{F.preventDefault(),C.trim()&&v(C.trim()),O("")},children:[d.jsx("input",{className:mU,value:C,onChange:F=>O(F.target.value),placeholder:`Paste a ${a} link`,"aria-label":`${r} link`}),d.jsxs("button",{type:"submit",className:fU,disabled:k||!C.trim(),children:[d.jsx(Rt.link,{})," Add"]})]})]}):d.jsx(ak,{kind:t,name:l.name??`Untitled ${a}`,empty:!1,scale:e,actions:R,attention:j,drop:D,children:d.jsx(kj,{kind:t,src:A,preview:l,dimmed:k||w,children:k?d.jsx(ny,{label:"Uploading…"}):w&&d.jsx(eb,{})})})}function eb(){return d.jsx(ny,{label:"Processing…"})}function xU({kind:e,offer:t,noun:a,label:r,emptyName:l,preview:c,empty:u,crop:m,processing:p,attention:g,onOpen:b}){const v=_l(),k=Dy(m,c.src),w=e==="image"?null:c.name??(u?null:`Untitled ${a}`),j=k?d.jsx("img",{className:"absolute inset-0 size-full object-cover object-top",src:k,alt:"",draggable:!1,style:p?gE:void 0}):u?d.jsx(Rt.plus,{}):d.jsx(wj,{kind:e,preview:c,size:16});return d.jsxs("button",{type:"button",className:pU,"data-media-summary":"","data-media-kind":e,"data-media-offer":t,"data-empty":u?"":void 0,...kl(g,v),"aria-label":u?l:`${r}: ${w??a}`,disabled:b===void 0,onClick:b,children:[j,p&&d.jsx(eb,{})]})}const wU="block size-full object-cover object-top",kU="flex size-full items-center justify-center bg-canvas",SU="pointer-events-none absolute bottom-1.5 left-1.5 z-[3] max-w-[80%] truncate rounded-full bg-[rgba(15,18,9,0.72)] px-1.5 py-0.5 text-[length:calc(10.5*var(--content))] font-semibold tabular-nums text-white",EU="pointer-events-none absolute inset-0 m-auto flex h-9 w-9 items-center justify-center rounded-full border-[1.5px] border-white/85 bg-[rgba(10,12,10,0.55)] pl-0.5 text-white backdrop-blur-[2px]";function kj({kind:e,src:t,preview:a,dimmed:r,children:l}){return d.jsxs(d.Fragment,{children:[t?d.jsx("img",{className:wU,src:t,alt:"",draggable:!1,style:r?gE:void 0}):d.jsx("span",{className:kU,children:d.jsx(Vr,{kind:e,size:"logo",decorative:!0,...e==="document"&&a.attachment?{glyph:a.attachment.glyph}:{}})}),e==="video"&&t&&d.jsx("span",{className:EU,children:d.jsx(it,{name:"play",size:14})}),l,a.detail&&d.jsx("span",{className:SU,children:a.detail})]})}function tb({kind:e,value:t,propertyId:a,frame:r,holderPath:l}){const c=In(e),u=c.usePreview(t,a),m=Qy(l,c.fileIdOf(t)),{chrome:p,crop:g,beneath:b}=r,v=Dy(g,u.src),k=(g==null?void 0:g.cropping)??!1,w=u.name??(c.fileIdOf(t)?`Untitled ${c.noun}`:`No ${c.noun}`);return d.jsx(S$,{kind:e,name:w,chrome:p,thumb:d.jsx(kj,{kind:e,src:v,preview:u,dimmed:k||m,children:k?d.jsx(ny,{}):m&&d.jsx(eb,{})}),below:g&&d.jsx(Pz,{storeKey:g.storeKey}),beneath:b})}function of(e,t){function a(l){return d.jsx(ok,{kind:e,face:"expanded",model:t.model,props:l})}a.displayName=`MediaExpandedFace(${e})`;function r(l){return d.jsx(ok,{kind:e,face:"compact",model:t.model,props:l})}return r.displayName=`MediaCompactFace(${e})`,{model:t.model,faces:{expanded:a,compact:r},applyOptimistic:t.applyOptimistic}}function _U(e,t){const a=Sl(t).get(e);return a===void 0?null:a.kind}function nb(e,t,a){const r=_U((e==null?void 0:e.kind)===void 0?(e==null?void 0:e.file)??"":"",a);return(e==null?void 0:e.kind)??r??t[0]??"image"}function lf(e,t){return t===null||In(e).fileIdOf(t)===""?null:{...t,kind:e}}function lk(e,t,a,r){const l=In(e),c=t===e?a:l.cleared;return lf(e,r(l,c))}function jU(e){const t=e.map(a=>Py[a]).filter(a=>a!==null);return{takes:yc(e),accept:t.length>0?t.join(","):void 0}}function ed(e){return"file"in e?Q2(e.file.type):X2(e.link)}function OU(e){const{kind:t}=e;return lf(t,In(t).fromPicked(e,In(t).cleared))}function AU(e,t,a,r){return{noun:e.length===1?In(t).noun:"media",...jU(e),onPicked:l=>r(lk(l.kind,t,a,(c,u)=>c.fromPicked(l,u))),onUploaded:(l,c)=>{const u=ed(c);if(u===null||!e.includes(u))throw new Error(`a ${u??"file of no media kind"} is not among this field's ${e.join(", ")}`);r(lk(u,t,a,(m,p)=>m.fromUploaded(l,p)))}}}function sk({face:e,models:t,props:a}){const r=Ha(a.slot),l=nb(a.value,r,a.propertyId);return d.jsx(NU,{kind:l,kinds:r,face:e,models:t,props:a},l)}function Sj(e,t,a){const r=a.value===null?In(e).cleared:t.coerce(a.value);return{...a,value:r,onChange:l=>a.onChange(lf(e,l))}}function NU({kind:e,kinds:t,face:a,models:r,props:l}){const c=r[e],u=Sj(e,c,l);return d.jsx(gj,{kind:e,face:a,model:c,props:u,open:AU(t,e,u.value,l.onChange)})}function MU({models:e,props:t,onOpen:a}){const r=nb(t.value,Ha(t.slot),t.propertyId);return d.jsx(CU,{kind:r,models:e,props:t,onOpen:a},r)}function CU({kind:e,models:t,props:a,onOpen:r}){const l=t[e];return d.jsx(bj,{kind:e,model:l,onOpen:r,props:Sj(e,l,a)})}function RU(e){function t(r){return d.jsx(sk,{face:"expanded",models:e.models(),props:r})}function a(r){return d.jsx(sk,{face:"compact",models:e.models(),props:r})}return{model:e.model,faces:{expanded:t,compact:a},applyOptimistic:null}}function TU(e,t){const a=e.querySelector("img");if(a){t.url&&a.setAttribute("src",t.url),a.setAttribute("alt",t.alt??""),a.style.transform="",a.style.transformOrigin="",a.style.objectPosition="";return}const r=e.querySelector("video");r&&(t.url?r.setAttribute("poster",t.url):r.removeAttribute("poster"))}function Ej(e){if(e&&typeof e=="object"){const t=e,a=ow(t.crop),r=ll(e);return{file:gc(t)??"",url:typeof t.url=="string"?t.url:"",alt:typeof t.alt=="string"?t.alt:"",crop:a??void 0,ar:typeof t.ar=="number"?t.ar:void 0,mobile:t.mobile&&typeof t.mobile=="object"&&ow(t.mobile.crop)!==null?t.mobile:void 0,...t.renditions&&typeof t.renditions=="object"?{renditions:t.renditions}:{},...r===void 0?{}:{picked:r},...typeof t.name=="string"||t.name===null?{name:t.name}:{}}}return{file:"",url:"",alt:""}}const _j=of("image",{model:{defaultValue:{file:"",url:"",alt:""},coerce:Ej,isEmpty:e=>e.file===""&&e.url==="",isInvalid:()=>!1},applyOptimistic:TU});function DU(e,t){const a=e.matches("img")?e:e.querySelector("img");a&&t.poster&&a.setAttribute("src",t.poster)}function jj(e){if(e&&typeof e=="object"){const t=e;return{file:gc(t)??"",url:typeof t.url=="string"?t.url:"",poster:typeof t.poster=="string"?t.poster:"",alt:typeof t.alt=="string"?t.alt:"",...typeof t.provider=="string"&&t.provider?{provider:t.provider}:{},...ll(e)===void 0?{}:{picked:ll(e)}}}return{file:"",url:"",poster:"",alt:""}}const Oj=of("tour",{model:{defaultValue:{file:"",url:"",poster:"",alt:""},coerce:jj,isEmpty:e=>e.file===""&&e.url==="",isInvalid:()=>!1},applyOptimistic:DU});function Aj({engine:e,lens:t,propertyId:a,instanceId:r,slotId:l,cropCfg:c}){const{api:u}=Wt(),m=Sl(a),{rows:p}=e,[g,b]=x.useState(null),v=C=>`${a}:${r}:${l}:${C}`,k=C=>t.get(C.value),w=LE(a,p.map(C=>{const O=k(C);return O===null?null:Zp(O,c)}),u.getCropDerivativeUrl),j=(C,O)=>{const A=g;b(null),A&&(!O.mobile&&mj(C,O.rect)||e.updateValue(A,D=>{const R=t.get(D);if(R===null||!R.file)return D;const F=pj(R,O);return F===null?D:t.set(D,F)}))},E=()=>{var D;const C=g?p.find(R=>R.key===g):null,O=C?k(C):null;if(!C||!O)return null;const A=hj(m,O,c.mode);return A.src?d.jsx(ey,{chrome:Hy,src:A.src,mode:c.mode,aspect:c.aspect,aspectLabel:c.aspectLabel,mobileAspect:c.mobileAspect,seed:{rect:A.seed},mobileSeed:{rect:rl((D=O.mobile)==null?void 0:D.crop)},onApply:R=>j(A,R),onClose:()=>b(null)}):null},_=C=>{const O=k(C);return O===null?null:Zp(O,c)};return{keyOf:v,cutOf:_,derivativeOf:C=>{const O=_(C);return O?w.get(O):void 0},open:b,modal:E}}function ck(e,t){return e.matches(t)?e:e.querySelector(t)}function LU(e,t){const a=ck(e,"video");if(a){t.poster&&a.setAttribute("poster",t.poster),t.url&&a.setAttribute("src",t.url),t.alt&&a.setAttribute("aria-label",t.alt);return}const r=ck(e,"img");r&&t.poster&&r.setAttribute("src",t.poster)}function Nj(e){if(e&&typeof e=="object"){const t=e;return{file:gc(t)??"",url:typeof t.url=="string"?t.url:"",poster:typeof t.poster=="string"?t.poster:"",alt:typeof t.alt=="string"?t.alt:"",width:typeof t.width=="number"?t.width:void 0,height:typeof t.height=="number"?t.height:void 0,...t.source==="link"?{source:"link"}:{},...typeof t.provider=="string"&&t.provider?{provider:t.provider}:{},...ll(e)===void 0?{}:{picked:ll(e)}}}return{file:"",url:"",poster:"",alt:""}}const Mj=of("video",{model:{defaultValue:{file:"",url:"",poster:"",alt:""},coerce:Nj,isEmpty:e=>e.file===""&&e.url==="",isInvalid:()=>!1},applyOptimistic:LU});function zU(e,t){switch(e){case"image":return t.map(Ej);case"video":return t.map(Nj);case"tour":return t.map(jj);case"document":return Gz(t)}}function $U(e){return{get:t=>e==="image"?t:null,set:(t,a)=>a}}function UU({kind:e,label:t,itemSlot:a,offer:r,verbs:l,fixed:c,instanceId:u,slotId:m,ownerSlotId:p=m,value:g,propertyId:b,commit:v,onUpload:k,factPath:w,size:j}){const E=In(e),_=Qg(a),C=x.useMemo(()=>zU(e,g),[e,g]),[O,A]=x.useState(!1),D=er({items:C,fixed:c,axis:"xy",commit:v}),{rows:R}=D,F=x.useMemo(()=>$U(e),[e]),L=Aj({engine:D,lens:F,propertyId:b,instanceId:u,slotId:m,cropCfg:_}),T=fj(b,e),H=Zy(a,{propertyId:b,instanceId:u,slotId:p}),ne=k??H??void 0,Y=Cj(ne,me=>D.add(E.fromUploaded(me,E.cleared))),le=r.kind==="owned"&&ne!==void 0,K=(me,Q)=>e==="image"?By(me,E.cleared,Q,_,r.kind==="picked"?r.filter.from:void 0):E.fromPicked(me,E.cleared),X=(me,Q)=>{D.replace(El(R,me,E.fileIdOf,N=>K(N,Q),D.mint))},{add:ue,onAdd:M,choose:V}=My(l,r.kind==="picked"?()=>A(!0):null,r.kind==="owned"&&le?ib([e],Y):null),te=Y.error;return d.jsxs(Cy,{engine:D,label:t,noun:E.noun,size:j,onAdd:M,add:ue,choose:V,renderTile:(me,Q,N)=>d.jsx(tb,{kind:e,value:me.value,propertyId:b,holderPath:w,frame:{chrome:N,crop:e==="image"?{cfg:_,cut:L.cutOf(me),derivativeUrl:L.derivativeOf(me),cropping:T.recropping(Cs(w,E.fileIdOf(me.value))),storeKey:L.keyOf(me.key)}:null}}),tileActions:me=>e==="image"&&T.offers(Cs(w,E.fileIdOf(me.value)))?[{label:"Crop",glyph:"crop",onSelect:()=>T.framing?L.open(me.key):T.recrop(Cs(w,E.fileIdOf(me.value)),L.keyOf(me.key))}]:[],children:[te&&d.jsx("p",{className:xl,children:te}),O&&r.kind==="picked"&&d.jsx(Wy,{propertyId:b,children:me=>d.jsx(bc,{mode:"multi",propertyId:b,filter:r.filter,selectedIds:R.map(Q=>E.fileIdOf(Q.value)),onChange:Q=>X(Q,me),onClose:()=>A(!1)})}),T.framing&&L.modal(),T.modal]})}function Cj(e,t){const[a,r]=x.useState(!1),[l,c]=x.useState(null);return{busy:a,error:l,take:m=>{!e||m.length===0||(r(!0),c(null),(async()=>{try{for(const p of m)t(await e(p),p)}catch(p){console.error("[editor] media upload failed",p),c("Upload failed. Try again.")}finally{r(!1)}})())}}}function ib(e,t){const a=Sg(e);return{accept:Vy(e),onFiles:r=>t.take(r.map(l=>({file:l}))),...a.length>0?{onLink:r=>t.take([{link:r}]),linkKinds:a}:{},disabled:t.busy}}const uk="label";function td(e){return e!==null&&typeof e=="object"&&!Array.isArray(e)?e:null}function sf(e){var c;const t=td(e);if((t==null?void 0:t.type)!=="object")return null;const a=td(t.fields);if(a===null)return null;const r=(c=td(t.label))==null?void 0:c.field,l=t.item_order;return{...typeof r=="string"?{labelField:r}:{},fields:a,...Array.isArray(l)?{item_order:l.filter(u=>typeof u=="string")}:{}}}function Pa(e){return sf(e.element)}function jl(e){const{fields:t}=e,a=e.item_order;if(!a||a.length===0)return Object.entries(t);const r=new Set,l=[];for(const c of a)c in t&&!r.has(c)&&(r.add(c),l.push([c,t[c]]));for(const[c,u]of Object.entries(t))r.has(c)||l.push([c,u]);return l}function dl(e,t){return e.labelField!==void 0&&e.fields[e.labelField]?{kind:"field",field:e.labelField}:e.fields[uk]?{kind:"field",field:uk}:{kind:"text",text:t}}function cf(e,t,a){var u;if(e.kind==="text")return e.text;const r=(u=td(a))==null?void 0:u[e.field],l=t.fields[e.field];if((l==null?void 0:l.type)==="address"){const m=xi(r);return(m===null?null:p5(m))??"Untitled"}const c=typeof r=="string"?r.trim():typeof r=="number"?String(r):"";if(!c)return"Untitled";if((l==null?void 0:l.type)!=="select")return c;for(const m of l.values??[])if(typeof m!="string"&&m.value===c)return m.label;return c}function IU(e){const t=Pa(e);return t?jl(t):[]}function HU(e){switch(e.type){case"text":case"select":case"url":case"email":case"phone":return"";case"number":case"date":case"image":case"video":case"tour":case"poi":case"document":case"address":case"media":return null;case"list":return[]}}function Io(e){const t={};for(const[a,r]of e)t[a]=HU(r);return t}const BU=["street","unit","city","state","postal"],Rj={street:null,unit:null,city:null,state:null,postal:null,latitude:null,longitude:null,source:null};function qU(e,t){const a=e??Rj,r=xi({...a,...t}),l=BU.filter(c=>((r==null?void 0:r[c])??null)!==a[c]);return l.length===0?e:l.every(c=>c==="unit")?r:r===null?null:xi({...r,latitude:null,longitude:null,source:null})}function dk(e,t,a){return qU(e,{[t]:a})}function FU(e){return xi({...e,source:"autocomplete"})}function PU(e,t){return xi({...e??Rj,...t,source:"manual_pinned"})}function Tj(e){return e!==null&&e.latitude!==null&&e.longitude!==null}function Dj(e){return e!==null&&!Tj(e)}function VU(e,t,a){const r=a===void 0||a.size===0?t!=="unit":a.has(t);return e!==null&&r&&e[t]===null}function GU(e){return Dj(e)||(e==null?void 0:e.source)==="manual_pinned"}const Lj={defaultValue:null,coerce:xi,isEmpty:e=>e===null,isInvalid:()=>!1},Wp=[{code:"AL",name:"Alabama"},{code:"AK",name:"Alaska"},{code:"AZ",name:"Arizona"},{code:"AR",name:"Arkansas"},{code:"CA",name:"California"},{code:"CO",name:"Colorado"},{code:"CT",name:"Connecticut"},{code:"DE",name:"Delaware"},{code:"DC",name:"District of Columbia"},{code:"FL",name:"Florida"},{code:"GA",name:"Georgia"},{code:"HI",name:"Hawaii"},{code:"ID",name:"Idaho"},{code:"IL",name:"Illinois"},{code:"IN",name:"Indiana"},{code:"IA",name:"Iowa"},{code:"KS",name:"Kansas"},{code:"KY",name:"Kentucky"},{code:"LA",name:"Louisiana"},{code:"ME",name:"Maine"},{code:"MD",name:"Maryland"},{code:"MA",name:"Massachusetts"},{code:"MI",name:"Michigan"},{code:"MN",name:"Minnesota"},{code:"MS",name:"Mississippi"},{code:"MO",name:"Missouri"},{code:"MT",name:"Montana"},{code:"NE",name:"Nebraska"},{code:"NV",name:"Nevada"},{code:"NH",name:"New Hampshire"},{code:"NJ",name:"New Jersey"},{code:"NM",name:"New Mexico"},{code:"NY",name:"New York"},{code:"NC",name:"North Carolina"},{code:"ND",name:"North Dakota"},{code:"OH",name:"Ohio"},{code:"OK",name:"Oklahoma"},{code:"OR",name:"Oregon"},{code:"PA",name:"Pennsylvania"},{code:"RI",name:"Rhode Island"},{code:"SC",name:"South Carolina"},{code:"SD",name:"South Dakota"},{code:"TN",name:"Tennessee"},{code:"TX",name:"Texas"},{code:"UT",name:"Utah"},{code:"VT",name:"Vermont"},{code:"VA",name:"Virginia"},{code:"WA",name:"Washington"},{code:"WV",name:"West Virginia"},{code:"WI",name:"Wisconsin"},{code:"WY",name:"Wyoming"},{code:"AS",name:"American Samoa"},{code:"GU",name:"Guam"},{code:"MP",name:"Northern Mariana Islands"},{code:"PR",name:"Puerto Rico"},{code:"VI",name:"U.S. Virgin Islands"}];function Vu(e){const t=e.trim().toLowerCase();if(t==="")return[...Wp];const a=r=>{const l=r.name.toLowerCase();return r.code.toLowerCase()===t||l===t?0:l.startsWith(t)?1:l.includes(` ${t}`)?2:l.includes(t)?3:-1};return Wp.map(r=>({state:r,rank:a(r)})).filter(({rank:r})=>r>=0).sort((r,l)=>r.rank-l.rank).map(({state:r})=>r)}function KU(e){const t=e.trim().toLowerCase();return t===""?null:Wp.find(a=>a.code.toLowerCase()===t||a.name.toLowerCase()===t)??null}const YU="fixed overflow-y-auto rounded-[calc(10*var(--content))] border border-line bg-white p-1.5 shadow-[0_16px_38px_-12px_rgba(20,18,13,0.4)]",QU=ae(vt,"flex w-full items-center gap-3 rounded-[calc(7*var(--content))] px-2.5 py-2 text-left text-body text-ink data-[active=true]:bg-accent-soft"),XU="ml-auto text-caption font-medium text-ink-4",ZU=4,WU=280,fk=220;function JU({value:e,onCommit:t,ariaLabel:a,placeholder:r,shellClassName:l,attention:c,inputClassName:u}){const m=e??"",[p,g]=x.useState(null),[b,v]=x.useState(0),[k,w]=x.useState(null),j=x.useId(),E=x.useRef(null),_=x.useRef(null),C=p!==null,O=C&&p!==m,A=Vu(O?p:""),D=x.useCallback(()=>{E.current&&w(Hr(E.current))},[]);x.useEffect(()=>{if(C)return window.addEventListener("scroll",D,!0),window.addEventListener("resize",D),()=>{window.removeEventListener("scroll",D,!0),window.removeEventListener("resize",D)}},[C,D]),x.useEffect(()=>{var Y,le;(le=(Y=_.current)==null?void 0:Y.querySelector('[data-active="true"]'))==null||le.scrollIntoView({block:"nearest"})},[b,C]);function R(){D(),g(m);const Y=Vu("").findIndex(le=>le.code===m);v(Math.max(0,Y))}function F(){g(null),w(null)}function L(Y){F(),Y!==e&&t(Y)}function T(Y){if(Y===m)return F();if(Y.trim()==="")return L(null);const le=KU(Y);if(le)return L(le.code);const K=Vu(Y);if(K.length===1)return L(K[0].code);F()}function H(Y){if(!C){(Y.key==="ArrowDown"||Y.key==="ArrowUp")&&(Y.preventDefault(),R());return}switch(Y.key){case"ArrowDown":Y.preventDefault(),v(le=>Math.min(A.length-1,le+1));return;case"ArrowUp":Y.preventDefault(),v(le=>Math.max(0,le-1));return;case"Enter":{Y.preventDefault(),Y.stopPropagation();const le=A[b];le?L(le.code):T(p);return}case"Tab":{const le=O?A[b]:void 0;le?L(le.code):T(p);return}case"Escape":Y.preventDefault(),F();return}}const ne=k?hl(k,{maxHeight:WU,minWidth:fk,gap:ZU}):null;return d.jsxs("div",{className:l,ref:E,...c,children:[d.jsx("input",{className:u,type:"text",role:"combobox","aria-label":a,"aria-expanded":C,"aria-controls":j,"aria-autocomplete":"list",autoComplete:"address-level1",placeholder:r,value:C?p:m,onFocus:Y=>{R(),Y.currentTarget.select()},onChange:Y=>{C||D(),g(Y.target.value),v(0)},onKeyDown:H,onBlur:()=>{C&&T(p)}}),C&&ne&&A.length>0&&typeof document<"u"&&Zi.createPortal(d.jsx("div",{ref:_,id:j,role:"listbox","aria-label":`${a} options`,className:YU,style:{left:ne.left,top:ne.top,bottom:ne.bottom,maxHeight:ne.maxHeight,minWidth:Math.max(ne.width,fk),zIndex:qa},children:A.map((Y,le)=>d.jsxs("button",{type:"button",role:"option",tabIndex:-1,"aria-selected":Y.code===m,"data-active":le===b,"data-state-option":Y.code,className:QU,onMouseEnter:()=>v(le),onMouseDown:K=>{K.preventDefault(),L(Y.code)},children:[d.jsx("span",{className:"truncate",children:Y.name}),d.jsx("span",{className:XU,children:Y.code})]},Y.code))}),document.body)]})}const e9=x.createContext(null);function zj(e){const t=x.useContext(e9);return t!==null&&e!==void 0&&t.factPath===e?t.fields:void 0}const t9={street:{label:"Street address",placeholder:"123 Main St",panelPlaceholder:"Street address"},unit:{label:"Address 2",placeholder:"Unit 4B",panelPlaceholder:"Unit"},city:{label:"City",placeholder:"Boulder",panelPlaceholder:"City"},state:{label:"State",placeholder:"CO",panelPlaceholder:"State"},postal:{label:"ZIP",placeholder:"80301",panelPlaceholder:"ZIP"}},n9={page:{grid:"grid grid-cols-12 gap-x-3 gap-y-4",span:{street:"col-span-8",unit:"col-span-4",city:"col-span-6",state:"col-span-2",postal:"col-span-4"},labelled:!0},panel:{grid:"grid grid-cols-[1fr_3rem_1.5rem_5.5rem] gap-1.5",span:{street:"col-span-2",unit:"col-span-2",city:"",state:"col-span-2",postal:""},labelled:!1}},i9=250,a9=2e3;function r9(e){const t=GU(e),[a,r]=x.useState(!1),[l,c]=x.useState(t);!a&&l!==t&&c(t);const u=x.useRef(null),m=x.useCallback(()=>{u.current!==null&&clearTimeout(u.current),u.current=null},[]);x.useEffect(()=>m,[m]);const p=x.useCallback(()=>{m(),r(!1)},[m]),g=x.useCallback(()=>{m(),r(!0),u.current=setTimeout(()=>{u.current=null,r(!1)},a9)},[m]);return{show:a?l:t,hold:g,settle:p}}function o9(){const[e,t]=x.useState({});return{shown:(a,r)=>e[a]??r,type:(a,r)=>t(l=>({...l,[a]:r})),settle:a=>t(({[a]:r,...l})=>l),settleAll:()=>t({})}}function l9(e){const t=Wt().address;return t?d.jsx(t.Input,{...e}):d.jsx("input",{className:e.className,type:"text",value:e.value,placeholder:e.placeholder,"aria-label":e.ariaLabel,autoComplete:"off",onChange:a=>e.onChange(a.target.value),onBlur:e.onBlur})}function s9({value:e,onPin:t,place:a}){const r=Wt().address;if(!r)return null;const l=Tj(e)?{latitude:e.latitude,longitude:e.longitude}:null;return d.jsx(r.PinMap,{pin:l,postal:(e==null?void 0:e.postal)??null,place:a,onPin:t})}function c9({value:e,show:t,onChange:a,place:r}){const[l,c]=x.useState(t);return t&&!l&&c(!0),x.useEffect(()=>{if(t)return;const u=setTimeout(()=>c(!1),i9);return()=>clearTimeout(u)},[t]),l?d.jsx("div",{"data-pin-map-reveal":!0,"data-open":t,"aria-hidden":!t,className:"grid grid-rows-[1fr] opacity-100 transition-[grid-template-rows,opacity] duration-250 ease-out starting:grid-rows-[0fr] starting:opacity-0 data-[open=false]:grid-rows-[0fr] data-[open=false]:opacity-0 motion-reduce:transition-none",children:d.jsx("div",{className:"min-h-0 overflow-hidden",children:d.jsx("div",{className:r==="page"?"pt-4":"pt-1.5",children:d.jsx(s9,{value:e,onPin:u=>a(PU(e,u)),place:r})})})}):null}function u9({value:e,onChange:t,place:a,fields:r,hold:l}){const c=o9(),u=_l(),m=R_(a),p=n9[a],g=ae(m.inner,"w-full"),b=v=>{const k=t9[v],w=kl(VU(e,v,r==null?void 0:r.required)?"required":null,u),j=p.labelled?k.placeholder:k.panelPlaceholder,E=(e==null?void 0:e[v])??"",_=v==="postal"?jg(E):E,C=A=>{c.type(v,A),l.hold(),t(dk(e,v,A))};let O;return v==="street"?O=d.jsx("div",{className:m.shell,...w,children:d.jsx(l9,{className:g,value:c.shown(v,_),placeholder:j,ariaLabel:k.label,onChange:C,onPick:A=>{c.settleAll(),l.settle(),t(FU(A))},onBlur:()=>c.settle(v)})}):v==="state"?O=d.jsx(JU,{value:(e==null?void 0:e.state)??null,onCommit:A=>{l.hold(),t(dk(e,"state",A??""))},ariaLabel:k.label,placeholder:j,shellClassName:m.shell,attention:w,inputClassName:g}):O=d.jsx("div",{className:m.shell,...w,children:d.jsx("input",{className:g,type:"text",value:c.shown(v,_),placeholder:j,"aria-label":k.label,autoComplete:"off",inputMode:v==="postal"?"numeric":void 0,maxLength:v==="postal"?10:void 0,onChange:A=>C(A.target.value),onBlur:()=>c.settle(v)})}),d.jsxs("label",{className:ae(m.frame,"min-w-0",p.span[v]),children:[p.labelled&&d.jsx("span",{className:KE,children:k.label}),O]},v)};return d.jsx("div",{className:p.grid,children:d9.filter(v=>r===void 0||r.used.has(v)).map(b)})}const d9=["street","unit","city","state","postal"];function f9(e){return e===void 0||e.used.has("latitude")||e.used.has("longitude")}function $j({slot:e,value:t,onChange:a,factPath:r,place:l}){const c=zj(r)??void 0,u=r9(t),m=g=>{g.relatedTarget instanceof Node&&g.currentTarget.contains(g.relatedTarget)||u.settle()},p=g=>{u.settle(),a(g)};return d.jsxs("div",{className:"flex flex-col",role:"group","aria-label":e.label,onBlur:m,children:[d.jsx(u9,{value:t,onChange:a,place:l,fields:c,hold:u}),f9(c)&&d.jsx(c9,{value:t,show:u.show,onChange:p,place:l})]})}function h9(e){return d.jsx($j,{...e,place:"page"})}function m9(e){return d.jsx($j,{...e,place:"panel"})}const p9={model:Lj,faces:{expanded:h9,compact:m9},applyOptimistic:null},hk=["January","February","March","April","May","June","July","August","September","October","November","December"],g9=["Su","Mo","Tu","We","Th","Fr","Sa"],mk=e=>String(e).padStart(2,"0");function Uj(e,t,a){return`${String(e).padStart(4,"0")}-${mk(t+1)}-${mk(a)}`}function y9(e=new Date){return Uj(e.getFullYear(),e.getMonth(),e.getDate())}function pk(e){return{year:Number(e.slice(0,4)),month:Number(e.slice(5,7))-1}}function b9(e,t){const a=e.year*12+e.month+t;return{year:Math.floor(a/12),month:(a%12+12)%12}}function v9(e){const t=new Date(Date.UTC(e.year,e.month,1)).getUTCDay();return Array.from({length:42},(a,r)=>{const l=new Date(Date.UTC(e.year,e.month,1+r-t));return{iso:Uj(l.getUTCFullYear(),l.getUTCMonth(),l.getUTCDate()),inMonth:l.getUTCMonth()===e.month,day:l.getUTCDate()}})}const x9="fixed w-[calc(260*var(--content))] rounded-[calc(10*var(--content))] border border-line bg-white p-2.5 shadow-[0_16px_38px_-12px_rgba(20,18,13,0.4)]",gk=ae(vt,"grid size-[calc(28*var(--content))] place-items-center rounded-[calc(7*var(--content))] text-ink-3 hover:bg-accent-soft hover:text-ink"),w9=ae(vt,"flex items-center gap-1 rounded-[calc(7*var(--content))] px-2 py-1 text-[length:calc(13.5*var(--content))] font-semibold text-ink hover:bg-accent-soft data-[open=true]:bg-accent-soft"),Ij=ae(vt,"grid h-[calc(32*var(--content))] place-items-center rounded-[calc(7*var(--content))] text-[length:calc(13*var(--content))] [font-variant-numeric:tabular-nums]","text-ink hover:bg-accent-soft data-[outside=true]:text-ink-4","data-[selected=true]:bg-accent data-[selected=true]:font-semibold data-[selected=true]:text-white data-[selected=true]:hover:bg-accent"),yk=ae(Ij,"h-[calc(40*var(--content))]"),bk=12,k9=4,S9=4;function E9({anchorRef:e,ownerRef:t,value:a,label:r,onPick:l,onClose:c}){const[u,m]=x.useState(()=>pk(a??y9())),[p,g]=x.useState("days"),[b,v]=x.useState(0),[k,w]=x.useState(null),j=x.useRef(null),[E,_]=x.useState(a);a!==E&&(_(a),a!==null&&m(pk(a))),x.useLayoutEffect(()=>{const R=()=>{const F=e.current,L=j.current;!F||!L||w(hl(Hr(F),{height:L.offsetHeight,minWidth:L.offsetWidth,gap:S9}))};return R(),window.addEventListener("scroll",R,!0),window.addEventListener("resize",R),()=>{window.removeEventListener("scroll",R,!0),window.removeEventListener("resize",R)}},[e,p]),x.useEffect(()=>{const R=T=>{var ne,Y;const H=T.target;(ne=j.current)!=null&&ne.contains(H)||(Y=t.current)!=null&&Y.contains(H)||c()},F=()=>c(),L=T=>{T.key!=="Escape"||T.defaultPrevented||(T.preventDefault(),c())};return document.addEventListener("pointerdown",R,!0),document.addEventListener("keydown",L),window.addEventListener("blur",F),()=>{document.removeEventListener("pointerdown",R,!0),document.removeEventListener("keydown",L),window.removeEventListener("blur",F)}},[t,c]);const C=R=>{R==="years"&&v(u.year-k9),g(p===R?"days":R)},O=R=>{p==="years"?v(b+R*bk):m(b9(u,R))},A=p==="years"?"years":"month",D=(R,F,L)=>d.jsxs("button",{type:"button",className:w9,"aria-label":L,"aria-expanded":p===R,"data-open":p===R,onClick:()=>C(R),children:[F,d.jsx("span",{className:ae("text-ink-4 transition-transform",p===R&&"rotate-180"),children:d.jsx(Rt.chevD,{})})]});return Zi.createPortal(d.jsxs("div",{ref:j,role:"dialog","aria-label":`${r} calendar`,className:x9,style:{left:(k==null?void 0:k.left)??0,top:k?k.top:0,bottom:k==null?void 0:k.bottom,visibility:k?void 0:"hidden",zIndex:qa},onMouseDown:R=>R.preventDefault(),children:[d.jsxs("div",{className:"mb-1.5 flex h-[calc(28*var(--content))] items-center justify-between",children:[d.jsxs("div",{className:"flex items-center",children:[D("months",hk[u.month]??"","Choose month"),D("years",String(u.year),"Choose year")]}),p!=="months"&&d.jsxs("div",{className:"flex items-center",children:[d.jsx("button",{type:"button",className:gk,"aria-label":`Previous ${A}`,onClick:()=>O(-1),children:d.jsx(Rt.chevL,{})}),d.jsx("button",{type:"button",className:gk,"aria-label":`Next ${A}`,onClick:()=>O(1),children:d.jsx(Rt.chevR,{})})]})]}),p==="days"?d.jsxs("div",{className:"grid grid-cols-7 gap-0.5",children:[g9.map(R=>d.jsx("span",{className:"grid h-[calc(24*var(--content))] place-items-center text-[length:calc(11*var(--content))] font-medium text-ink-4",children:R},R)),v9(u).map(R=>d.jsx("button",{type:"button",className:Ij,"aria-label":R.iso,"aria-pressed":R.iso===a,"data-outside":!R.inMonth,"data-selected":R.iso===a,onClick:()=>l(R.iso),children:R.day},R.iso))]}):p==="months"?d.jsx("div",{className:"grid grid-cols-3 gap-1",children:hk.map((R,F)=>d.jsx("button",{type:"button",className:yk,"aria-pressed":F===u.month,"data-selected":F===u.month,onClick:()=>{m({year:u.year,month:F}),g("days")},children:R.slice(0,3)},R))}):d.jsx("div",{className:"grid grid-cols-3 gap-1",children:Array.from({length:bk},(R,F)=>b+F).map(R=>d.jsx("button",{type:"button",className:yk,"aria-pressed":R===u.year,"data-selected":R===u.year,onClick:()=>{m({year:R,month:u.month}),g("days")},children:R},R))})]}),document.body)}const Hj={defaultValue:null,coerce:e=>typeof e=="string"&&e!==""?e:null,isEmpty:e=>e===null,isInvalid:e=>!Z2(e)};function vk({slot:e,value:t,onChange:a,required:r=!1}){const[l,c]=x.useState(!1),[u,m]=x.useState(!1),p=x.useRef(null),g=x.useRef(null),b=x.useRef(null),v=l||t!==null,k=tr(Hj,e,t,r),w=nr(),j=t!==null&&Z2(t)?t:null;x.useEffect(()=>{var C;l&&((C=p.current)==null||C.focus())},[l]);const E=x.useCallback(()=>{var C;m(!1),document.activeElement!==p.current&&((C=p.current)==null?void 0:C.value)===""&&c(!1)},[]),_=v?d.jsxs(Gr,{attention:k,className:u?"border-accent":void 0,ref:b,children:[d.jsx("input",{ref:p,className:ae(w.inner,"[font-variant-numeric:tabular-nums] [&::-webkit-calendar-picker-indicator]:hidden"),type:"date","aria-label":e.label,"aria-invalid":k==="invalid"||void 0,value:j??"",onFocus:()=>c(!0),onChange:C=>a(C.target.value===""?null:C.target.value),onBlur:C=>{m(!1),C.target.value===""&&c(!1)}}),d.jsx("span",{className:ae(QE,w.adornEnd),children:d.jsx("button",{type:"button",className:ae(vt,"flex items-center text-ink-4 hover:text-ink-2 data-[open=true]:text-accent"),"aria-label":`Choose ${e.label}`,"aria-haspopup":"dialog","aria-expanded":u,"data-open":u,onMouseDown:C=>C.preventDefault(),onClick:()=>u?E():m(!0),children:d.jsx(Rt.calendar,{})})})]}):d.jsx(Gr,{attention:k,children:d.jsx("button",{type:"button",className:ae(vt,w.inner,"cursor-pointer text-left text-ink-4"),"aria-label":e.label,onClick:()=>{c(!0),m(!0)},children:"None"})});return d.jsxs("div",{className:w.frame,ref:g,children:[_,v&&u&&d.jsx(E9,{anchorRef:b,ownerRef:g,value:j,label:e.label,onPick:C=>{var O;a(C),m(!1),(O=p.current)==null||O.focus()},onClose:E}),d.jsx(T_,{attention:k,message:"Not a real date. Pick one"})]})}const _9={model:Hj,faces:{expanded:vk,compact:vk},applyOptimistic:null},Bj=of("document",{model:{defaultValue:{file:""},coerce:A_,isEmpty:e=>e===null||e.file==="",isInvalid:()=>!1},applyOptimistic:null}),j9="data-slot-id",xk="data-slot-text-leaf",O9="data-slot-group",A9="data-slot-item",N9="data-slot-field",M9="data-slot-unselectable",uf="data-section-instance-id";function qj(e,t){const a=[];e.hasAttribute(xk)&&a.push(e),a.push(...Array.from(e.querySelectorAll(`[${xk}]`))),a.length!==0&&a.forEach(r=>{C9(r,t)})}function C9(e,t){const a=e.ownerDocument,r=[];t.split(`
|
|
1257
|
+
`).forEach((l,c)=>{c>0&&r.push(a.createElement("br")),r.push(a.createTextNode(l))}),e.replaceChildren(...r)}function vc(e){return typeof e=="string"?e:e==null?"":typeof e=="number"||typeof e=="boolean"?String(e):""}function R9(e){const[t,a]=x.useState(e),[r,l]=x.useState(e);return e!==r&&(l(e),a(e)),[t,a]}function ab({kind:e,slot:t,value:a,onChange:r,required:l=!1}){var k;const c=a??"",[u,m]=R9(c),p=tr(e.model,t,u,l),g=e.invalidMessage(u,t),b=w=>{if(!e.model.isEmpty(w)&&e.model.isInvalid(w,t))return;const E=e.model.isEmpty(w)?"":e.normalize(w);m(E),E!==c&&r(E)},v=nr();return d.jsxs("div",{className:v.frame,children:[d.jsxs(Gr,{attention:p,children:[d.jsx("input",{className:v.inner,type:e.inputType,inputMode:e.inputMode,autoComplete:e.autoComplete,value:u,placeholder:t.placeholder??e.placeholder,spellCheck:!1,"aria-label":t.label,"aria-invalid":p==="invalid"||void 0,"aria-description":v.inline&&p==="invalid"?g:void 0,onChange:w=>m(w.target.value),onBlur:w=>b(w.target.value)}),!v.inline&&((k=e.adornment)==null?void 0:k.call(e,u))]}),d.jsx(T_,{attention:p,message:g})]})}const Fj={model:{defaultValue:"",coerce:vc,isEmpty:e=>e.trim()==="",isInvalid:e=>!c5(e.trim())},normalize:e=>e.trim(),invalidMessage:()=>"Not a valid email address",inputType:"email",inputMode:"email",autoComplete:"email",placeholder:"name@example.com"};function wk(e){return d.jsx(ab,{kind:Fj,...e})}const T9={model:Fj.model,faces:{expanded:wk,compact:wk},applyOptimistic:null},Pj="section";function Vj(e,t){const{itemKind:a,view:r,granularity:l}=H3(e,t,Pj),c=a==="object"||a==="annotated-media"?{kind:"record",entries:IU(e)}:{kind:"single",slot:e.element??{type:"text",label:e.label}};return{itemKind:a,view:r,granularity:l,itemContent:c,axis:r==="gallery"||r==="annotated-gallery"?"xy":"y"}}function Jp(e,t){const a=Fs(e),r=Fs(t);if(a!=null||r!=null)return a===r;if(e===t||e==null&&t==null)return!0;if(e==null||t==null)return!1;if(Array.isArray(e)||Array.isArray(t))return Array.isArray(e)&&Array.isArray(t)&&e.length===t.length&&e.every((l,c)=>Jp(l,t[c]));if(typeof e=="object"||typeof t=="object"){if(typeof e!="object"||typeof t!="object")return!1;const l=e,c=t;return[...new Set([...Object.keys(l),...Object.keys(c)])].every(m=>Jp(l[m],c[m]))}return kk(e)===kk(t)}function kk(e){return typeof e=="string"||typeof e=="number"||typeof e=="boolean"?String(e):null}function D9(e,t,a,r,l){const c=Uo(m=>m.markSlotOverridden),u=!l&&!V3(e);return function(p,g){u&&c(t,a,{kind:"scalar"}),r(p.map(b=>b.value))}}function Vs(e){return e!==null&&typeof e=="object"&&!Array.isArray(e)?e:null}function L9(e){var t;return((t=Vs(e.element))==null?void 0:t.type)==="row"}function z9(e,t){var r;const a=(r=Vs(e))==null?void 0:r.decisions;if(Array.isArray(a))return a.find(l=>{var u;const c=(u=Vs(l))==null?void 0:u.produces;return Array.isArray(c)&&c[0]===t})}function Gj(e,t,a){const r=Vs(t),l=F3(r).some(b=>b.verb==="pick")||L9(e),c=b4({slots:{},...a===void 0?{}:{sectionSlots:a}},e);switch(G3(e).kind){case"table":{const b=Mg(e.source);return b===null?{kind:"owned"}:{kind:"table",table:b}}case"section":case"derived":return c.length===0?{kind:"follows"}:{kind:"follows",tables:c}}if(!l)return{kind:"owned"};const[m,...p]=c;if(m!==void 0)return{kind:"pick-row",tables:[m,...p]};const g=M5(r==null?void 0:r.of);return g===null?{kind:"owned"}:{kind:"pick-media",filter:g}}function rb(e){switch(e.kind){case"table":return[e.table];case"pick-row":return e.tables;case"follows":return e.tables??[];case"pick-media":case"owned":return[]}}function Kj(e){const t=rb(e);return t.length===1?t[0]:null}const ob="id";function Yj(e){const[t,...a]=[...new Set(e)];return t===void 0?null:[t,...a]}function lb(e){return Yj(rb(e))}const $9=()=>null;function df(e){const t=Yj($s(e));return t===null?{kind:"none"}:e.source===void 0?{kind:"table",tables:t}:{kind:"table",tables:t,inert:!0}}function Sk(e,t,a){const r=lb(t);if(r!==null)return{kind:"table",tables:r};const l=Vs(e.source);return t.kind==="follows"&&(l==null?void 0:l.kind)==="section"?U9(l,a):{kind:"none"}}function U9(e,t){const a=e.section,r=e.slot;return typeof a!="string"||typeof r!="string"?{kind:"none"}:{kind:"content",labelOf:(t==null?void 0:t({section:a,slot:r}))??$9}}function _d(e,t){const a=e[t];return typeof a=="string"&&a!==""?a:null}function Qj({instanceId:e,slotId:t,membership:a,itemBaseline:r,insideRecord:l}){const c=Uo(k=>k.markSlotOverridden),u=Uo(k=>k.relinkSlot),m=ob,p=Kj(a)===null&&a.kind!=="follows",g=a.kind==="table"||a.kind==="follows",b=k=>_d(k,m),v=k=>b(k.value)??(p?k.key:null);return{identityKey:m,identityOf:b,stamp:k=>p?k.map(w=>b(w.value)===null?{key:w.key,value:{...w.value,[m]:w.key}}:w):k,markerIdentity:v,markFields:(k,w)=>{if(l)return;const j=v(k);if(j===null){c(e,t,{kind:"scalar"});return}const E=r==null?void 0:r.find(_=>_[m]===j);for(const _ of Object.keys(w))_!==m&&(E!=null&&Jp(w[_],E[_])?u(e,t,{kind:"item",item_id:j,field:_}):c(e,t,{kind:"item",item_id:j,field:_}))},markRemoved:k=>{if(l||a.kind!=="table")return;const w=b(k.value);w!==null&&!rf(w)&&c(e,t,{kind:"item_removed",item_id:w})},markOrder:k=>{if(l||!g||r===void 0)return;const w=k.map(O=>b(O.value)).filter(O=>O!==null),j=new Set(w),E=r.map(O=>_d(O,m)).filter(O=>O!==null&&j.has(O)),_=new Set(E);w.filter(O=>_.has(O)).every((O,A)=>O===E[A])?u(e,t,{kind:"order"}):c(e,t,{kind:"order"})}}}async function I9(e,t,a){const r=await e(`/properties/${t}/poi/search`,{method:"POST",json:{query:a}});return Array.isArray(r==null?void 0:r.results)?r.results:[]}async function Xj(e,t,a){return e(`/properties/${t}/poi/${encodeURIComponent(a)}`)}async function H9(e,t,a){if(a.length===0)return{};const r=await e(`/properties/${t}/poi/photo-urls`,{method:"POST",json:{place_ids:a}});return(r==null?void 0:r.urls)??{}}function Zj(e){if(e==null||!Number.isFinite(e))return null;const t=e/1609.344;return t<.1?"< 0.1 mi":`${t.toFixed(1)} mi`}const jd=e=>typeof e=="number"&&Number.isFinite(e)?e:void 0,ks=e=>typeof e=="string"&&e!==""?e:void 0;function B9(e){const t={},a=jd(e.rating);a!==void 0&&(t.rating=a);const r=jd(e.review_count);r!==void 0&&(t.review_count=r);const l=ks(e.type_label);l!==void 0&&(t.type_label=l);const c=ks(e.price_level);c!==void 0&&(t.price_level=c);const u=ks(e.website_uri);u!==void 0&&(t.website_uri=u);const m=ks(e.google_maps_uri);m!==void 0&&(t.google_maps_uri=m);const p=ks(e.summary);p!==void 0&&(t.summary=p);const g=q9(e.photo);return g!==void 0&&(t.photo=g),t}function q9(e){if(!e||typeof e!="object")return;const t=e,a=jd(t.width),r=jd(t.height),l=t.attribution;if(!(a===void 0||r===void 0||typeof l!="string"))return{width:a,height:r,attribution:l}}function sb(e){if(!e||typeof e!="object")return null;const t=e;return typeof t.id!="string"||typeof t.place_id!="string"||typeof t.name!="string"||typeof t.lat!="number"||typeof t.lng!="number"?null:{id:t.id,place_id:t.place_id,name:t.name,address:typeof t.address=="string"?t.address:null,lat:t.lat,lng:t.lng,distance_m:typeof t.distance_m=="number"?t.distance_m:null,...B9(t)}}function F9(e){return e.map(sb).filter(t=>t!==null)}function P9(e){return[e.rating===void 0?null:`★ ${e.rating.toFixed(1)}${e.review_count===void 0?"":` (${e.review_count.toLocaleString()})`}`,e.type_label,Zj(e.distance_m),e.address].filter(Boolean).join(" · ")}const cb="group/row relative flex min-h-10.5 items-center gap-2.5 rounded-[calc(8*var(--content))] border border-line bg-white px-2.5 py-1.75 [transition:border-color_.14s,box-shadow_.14s,background_.3s]",ub="grid w-5 flex-shrink-0 place-items-center text-ink-4",db="flex min-w-0 flex-1 flex-col gap-px",fb="truncate text-[length:calc(13.5*var(--content))] text-ink",hb="truncate text-caption text-ink-3",V9="rounded-[calc(8*var(--content))] border border-dashed border-line px-3 py-3.5 text-center text-[length:calc(12.5*var(--content))] text-ink-4",Wj="text-caption text-danger",Jj="opacity-70",eO="size-[calc(14*var(--content))] flex-shrink-0 animate-[we-ml-spin_.7s_linear_infinite] rounded-full border-2 border-[#d9d5c9] border-t-accent",G9="size-[calc(26*var(--content))] flex-shrink-0 rounded-[calc(5*var(--content))] object-cover bg-[#f1f0ea]",K9="we-no-drag flex flex-shrink-0 items-center gap-0.75",Y9="flex items-center gap-0.75 opacity-0 transition-opacity duration-[120ms] group-hover/row:opacity-100",Q9="grid size-6 cursor-pointer place-items-center rounded-md border-0 bg-transparent p-0 text-ink-3 outline-none hover:bg-[#f1f0ea] hover:text-ink-2",X9=()=>d.jsxs("svg",{viewBox:"0 0 16 16",width:"14",height:"14",className:"w-[calc(14*var(--content))] h-[calc(14*var(--content))]",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",children:[d.jsx("path",{d:"M8 14s4.5-4 4.5-7.5a4.5 4.5 0 0 0-9 0C3.5 10 8 14 8 14Z"}),d.jsx("circle",{cx:"8",cy:"6.4",r:"1.7"})]});function tO(e,t){const{apiFetch:a}=Wt().api,[r,l]=x.useState({}),c=t.filter(m=>m.photo).map(m=>m.place_id).sort().join(","),u=x.useRef(new Set);return x.useEffect(()=>{const p=(c===""?[]:c.split(",")).filter(g=>!u.current.has(g));p.length!==0&&(p.forEach(g=>u.current.add(g)),H9(a,e,p).then(g=>{l(b=>({...b,...g}))}).catch(()=>{p.forEach(g=>u.current.delete(g))}))},[c,e,a]),{urls:r,dropUrl:m=>l(p=>{if(!(m in p))return p;const g={...p};return delete g[m],g})}}function nO({row:e,photoUrl:t,onPhotoError:a,onRemove:r,dragProps:l,flashNew:c}){const u=P9(e);return d.jsxs("div",{...l,className:ae(cb,l&&"cursor-grab hover:border-[#d9d5c9]",c&&"animate-[we-ml-rowin_.26s_cubic-bezier(.2,.7,.3,1)_both]"),children:[t?d.jsx("img",{className:G9,src:t,alt:"",draggable:!1,onError:a}):d.jsx("span",{className:ub,children:d.jsx(X9,{})}),d.jsxs("div",{className:db,children:[d.jsx("span",{className:fb,children:e.name}),u&&d.jsx("span",{className:hb,children:u})]}),r&&d.jsx("div",{className:K9,children:d.jsx("span",{className:Y9,children:d.jsx("button",{type:"button",className:ae(Q9,"hover:bg-[#fbecea] hover:text-danger"),title:"Remove",onClick:r,children:d.jsx(Rt.trash,{})})})})]})}const Z9="relative flex flex-col",W9="flex min-w-0 items-center gap-2 rounded-[calc(8*var(--content))] border border-line bg-white px-2.5 transition-[border-color,box-shadow] duration-[120ms] focus-within:border-accent focus-within:shadow-[0_0_0_3px_rgba(15,42,34,0.07)]",J9="grid flex-shrink-0 place-items-center text-ink-4",eI="min-w-0 flex-1 appearance-none border-0 bg-transparent py-2.25 text-[length:calc(13.5*var(--content))] text-ink placeholder:text-ink-4",tI="size-[calc(15*var(--content))] flex-shrink-0 animate-[we-ml-spin_.7s_linear_infinite] rounded-full border-2 border-[#d9d5c9] border-t-accent",nI="fixed flex flex-col overflow-hidden rounded-[calc(8*var(--content))] border border-line bg-white shadow-[0_14px_30px_-12px_rgba(20,18,13,0.28)]",iI="m-0 min-h-0 list-none overflow-y-auto p-1",aI={maxHeight:264,gap:4},rI=ae(vt,"flex w-full flex-col gap-px rounded-md px-2 py-1.75 text-left"),oI="bg-accent-soft",lI="cursor-default opacity-55",sI="flex items-center gap-1.5 truncate text-[length:calc(13.5*var(--content))] text-ink",cI="truncate text-caption text-ink-3",Zm="px-3 py-3 text-center text-[length:calc(12.5*var(--content))] text-ink-4",uI="inline-flex flex-shrink-0 items-center gap-1 text-good",dI=2,fI=300;function iO({propertyId:e,placeholder:t,addedIds:a,disabled:r=!1,disabledHint:l,onSelect:c}){const{apiFetch:u}=Wt().api,[m,p]=x.useState(""),[g,b]=x.useState([]),[v,k]=x.useState("idle"),[w,j]=x.useState(0),[E,_]=x.useState(0),C=x.useRef(0),O=x.useId(),A=x.useRef(null),D=x.useRef(null);x.useEffect(()=>{const H=m.trim();if(H.length<dI){++C.current,k("idle"),b([]);return}const ne=++C.current;k("loading");const Y=setTimeout(()=>{I9(u,e,H).then(le=>{ne===C.current&&(b(le),j(0),k(le.length?"results":"empty"))}).catch(()=>{ne===C.current&&k("error")})},fI);return()=>clearTimeout(Y)},[m,e,E,u]);function R(H){a.has(H.place_id)||(c(H),p(""),b([]),k("idle"))}function F(H){if(H.key==="Escape"){k("idle"),b([]);return}if(v==="results"){if(H.key==="ArrowDown")H.preventDefault(),j(ne=>Math.min(g.length-1,ne+1));else if(H.key==="ArrowUp")H.preventDefault(),j(ne=>Math.max(0,ne-1));else if(H.key==="Enter"){H.preventDefault();const ne=g[w];ne&&R(ne)}}}const L=v!=="idle",T=GC(L,A,aI);return d.jsxs("div",{className:Z9,onBlur:H=>{var Y;const ne=H.relatedTarget;!H.currentTarget.contains(ne)&&!((Y=D.current)!=null&&Y.contains(ne))&&k("idle")},children:[d.jsxs("div",{ref:A,className:ae(W9,r&&"opacity-55"),role:"combobox","aria-expanded":L,"aria-haspopup":"listbox","aria-controls":O,children:[d.jsx("span",{className:J9,children:d.jsx(Rt.search,{})}),d.jsx("input",{className:eI,value:m,placeholder:t,disabled:r,title:r?l:void 0,onChange:H=>p(H.target.value),onKeyDown:F,"aria-label":t,"aria-autocomplete":"list","aria-activedescendant":v==="results"?`${O}-${w}`:void 0}),v==="loading"&&d.jsx("span",{className:tI})]}),L&&T&&Zi.createPortal(d.jsxs("div",{ref:D,className:nI,style:{left:T.left,top:T.top,bottom:T.bottom,width:T.width,maxHeight:T.maxHeight,zIndex:qa},onMouseDown:H=>H.preventDefault(),children:[v==="loading"&&d.jsx("div",{className:Zm,children:"Searching…"}),v==="empty"&&d.jsxs("div",{className:Zm,children:["No places found for “",m.trim(),"”."]}),v==="error"&&d.jsxs("div",{className:Zm,children:["Couldn't reach search."," ",d.jsx("button",{type:"button",className:"font-semibold text-accent-ink underline",onClick:()=>_(H=>H+1),children:"Retry"})]}),v==="results"&&d.jsx("ul",{className:iI,role:"listbox",id:O,children:g.map((H,ne)=>{const Y=a.has(H.place_id),le=[Zj(H.distance_m),H.address].filter(Boolean).join(" · ");return d.jsx("li",{id:`${O}-${ne}`,role:"option","aria-selected":ne===w,children:d.jsxs("button",{type:"button",disabled:Y,className:ae(rI,ne===w&&!Y&&oI,Y&&lI),onMouseEnter:()=>j(ne),onClick:()=>R(H),children:[d.jsxs("span",{className:sI,children:[Y&&d.jsxs("span",{className:uI,children:[d.jsx(Rt.check,{size:12})," Added ·"]}),d.jsx("span",{className:"truncate",children:H.name})]}),le&&d.jsx("span",{className:cI,children:le})]})},H.place_id)})})]}),document.body)]})}const hI="flex flex-col gap-2.75",mI="relative flex flex-col gap-1.75",pI=400;function gI({slot:e,fixed:t,value:a,propertyId:r,commit:l}){const{apiFetch:c}=Wt().api,u=x.useMemo(()=>F9(a),[a]),[m,p]=x.useState(null),[g,b]=x.useState(null),[v,k]=x.useState({}),w=x.useRef({});x.useEffect(()=>()=>{Object.values(w.current).forEach(clearTimeout)},[]);const j=er({items:u,identityOf:L=>L.id,fixed:t,axis:"y",commit:l}),{rows:E}=j,{urls:_,dropUrl:C}=tO(r,u);function O(L){k(T=>({...T,[L]:!0})),clearTimeout(w.current[L]),w.current[L]=setTimeout(()=>k(T=>{const H={...T};return delete H[L],H}),pI)}async function A(L){if(p(null),!!j.canAdd&&!j.latestRows().some(T=>T.value.place_id===L.place_id)){b(L);try{let T;try{T=await Xj(c,r,L.place_id)}catch{p("Couldn't add that place. Try again.");return}if(j.latestRows().some(H=>H.value.place_id===T.place_id))return;j.add(T),O(T.id)}finally{b(null)}}}const{containerRef:D,getItemProps:R}=j.drag,F=new Set(E.map(L=>L.value.place_id));return d.jsxs("div",{className:hI,role:"group","aria-label":e.label,children:[d.jsx(iO,{propertyId:r,placeholder:e.placeholder??"Search nearby…",addedIds:F,disabled:!j.canAdd,disabledHint:"Set by its source",onSelect:L=>void A(L)}),m&&d.jsx("span",{className:Wj,children:m}),(E.length>0||g)&&d.jsxs("div",{className:mI,ref:D,children:[g&&d.jsxs("div",{className:ae(cb,Jj),"aria-live":"polite",children:[d.jsx("span",{className:ub,children:d.jsx("span",{className:eO})}),d.jsxs("div",{className:db,children:[d.jsx("span",{className:fb,children:g.name}),d.jsx("span",{className:hb,children:"Adding…"})]})]}),E.map(L=>d.jsx(nO,{row:L.value,photoUrl:_[L.value.place_id],onPhotoError:()=>C(L.value.place_id),onRemove:j.canRemove?()=>j.remove(L.key):void 0,dragProps:R(L.key),flashNew:v[L.value.id]===!0},L.key))]})]})}const yI={property:"this property's",library:"your"},bI={property:Za.pages,library:yl.pages};function Ss(e){return e!==null&&typeof e=="object"&&!Array.isArray(e)?e:null}function Ek(e){return Bg({from:e.from??[]}).filter(t=>t!=="")}function vI(e){var r;const t=Ss(e.source);if(Mg(t)!==null)return[String(t==null?void 0:t.key)];const a=Ss(e.element);if(a===null)return[];if(a.type==="row"||a.type==="media"||typeof a.type=="string"&&pl(a.type))return Ek(a);for(const l of Object.values(Ss(a.fields)??{})){const c=Ss(l);if(c!==null&&((r=Ss(c.source))==null?void 0:r.kind)==="element")return Ek(c)}return[]}function xI(e){const t=e.indexOf("."),a=e.slice(0,t);if(a!=="property"&&a!=="library")return null;const r=bI[a],l=e.slice(t+1),c=Object.hasOwn(r,l)?r[l]:null;return c!==null&&J4(c)&&c.declaration.type==="list"?{home:a,label:u3(c)}:null}function aO(e){const t=[...new Set(vI(e))],a=t.length===1?xI(t[0]):null;return a===null?null:`From ${yI[a.home]} ${Wa(a.label).plural}`}function wI(e,t){var a;return((a=e==null?void 0:e.scalar)==null?void 0:a[t])===!0}function rO(e,t){return`${e}.${t}`}function xc(e){const t=e.indexOf(".");return t<=0||t===e.length-1||e.includes(".",t+1)?null:{object:e.slice(0,t),field:e.slice(t+1)}}function nd(e,t){const a=xc(t);if(a===null)return e[t];const r=e[a.object];return r!==null&&typeof r=="object"&&!Array.isArray(r)?r[a.field]:void 0}function kI(e,t,a){const r=xc(t);if(r===null)return{...e,[t]:a};const l=e[r.object],c=l!==null&&typeof l=="object"&&!Array.isArray(l)?l:{};return{...e,[r.object]:{...c,[r.field]:a}}}function SI(e,t,a,r){var l,c,u;return wI(e,t)||((u=(c=(l=e==null?void 0:e.items)==null?void 0:l[t])==null?void 0:c[a])==null?void 0:u[r])===!0}function EI(e){return e!==null&&typeof e=="object"&&!Array.isArray(e)?e:null}const oO=e=>{var t;return(t=EI(e))==null?void 0:t.source};function _I(e,t){return Object.entries(e).flatMap(([a,r])=>{const l=dc(oO(r));return l!==null&&l.slot===t?[{key:a,member:l.field}]:[]})}function jI(e,t){var l;const a=dc(oO(e));if(a===null)return!1;const r=t.fields===void 0?{}:{siblings:t.fields};return((l=wS(t.slots??{},r,a.slot))==null?void 0:l.def.type)==="address"}function fl(e){var t;return((t=e.source)==null?void 0:t.kind)==="element"}function lO(e){return e.type==="row"}function sO(e,t,a){const r={};for(const l of _I(Object.fromEntries(e),t))Object.hasOwn(a,l.member)&&(r[l.key]=a[l.member]);return r}function mb(e,t,a,r){const l=Io(e);for(const[c,u]of e)fl(u)&&(l[c]=a,r&&Object.assign(l,sO(e,c,r)));return l[t]=a,l}function cO(e,t,a){var c;const r=(c=t.find(([,u])=>lO(u)&&fl(u)))==null?void 0:c[0],l=r!==void 0?e[r]:void 0;return typeof l=="string"&&l!==""?l:_d(e,a)}function Od(e,t,a){return e.flatMap(r=>cO(r,t,a)??[])}function OI(e,t){return e.map(a=>{const r=t.get(a);return r===void 0?{id:a}:{id:a,members:r}})}function uO(e,t,a,r,l,c){return El(e,OI(r,l),u=>cO(u,t,a),u=>mb(t,a,u.id,u.members),c)}function AI(e,t,a,r,l){const c=e.map((m,p)=>({key:String(p),value:m}));return uO(c,t,a,r,l,m=>({key:"",value:m})).map(m=>m.value)}function NI(e){const t=e.split(/\s+/).filter(r=>/[\p{L}\p{N}]/u.test(r));return(t.length>1?[t[0][0],t[t.length-1][0]]:[...(t[0]??"").slice(0,2)]).join("").toUpperCase()}const MI="flex min-w-0 flex-1 items-center gap-[calc(12*var(--content))]",CI={bar:"size-[calc(32*var(--content))] rounded-[calc(7*var(--content))] text-[length:calc(12*var(--content))]",cell:"size-[calc(22*var(--content))] rounded-[calc(5*var(--content))] text-[length:calc(9.5*var(--content))]"},dO={bar:"text-[length:calc(15*var(--content))]",cell:"text-[length:calc(12.5*var(--content))]"},RI={bar:"text-[length:calc(13.5*var(--content))]",cell:"text-[length:calc(12*var(--content))]"};function Wm({face:e,imageUrl:t,size:a="bar"}){return d.jsxs("span",{className:MI,"data-row-face":"",children:[e.image!==null&&d.jsx("span",{className:ae("relative grid shrink-0 place-items-center overflow-hidden bg-line-soft font-semibold text-ink-3",CI[a]),"data-row-face-thumb":"",children:t?d.jsx("img",{src:t,alt:"",className:"absolute inset-0 size-full object-cover object-top"}):NI(e.title)}),d.jsxs("span",{className:"flex min-w-0 items-baseline gap-[calc(8*var(--content))]",children:[d.jsx("span",{className:ae("min-w-0 shrink truncate font-medium text-ink",dO[a]),children:e.title}),e.supporting!==null&&d.jsx("span",{className:ae("min-w-0 shrink-[2] truncate text-ink-3",RI[a]),children:e.supporting})]})]})}function Jm({children:e,size:t="bar"}){return d.jsx("span",{className:ae("min-w-0 flex-1 truncate text-ink-4",dO[t]),children:e})}const TI="flex w-full items-center gap-2.5 rounded-[calc(8*var(--content))] border border-line bg-white py-[calc(7*var(--content))] pl-[calc(10*var(--content))] pr-[calc(7*var(--content))] text-ink",_k={contacts:"Contact",units:"Unit",comparables:"Comparable",commercial_spaces:"Commercial space"};function Gs(e){return typeof e=="string"&&e!==""?e:null}function DI(e){const t=e==null?void 0:e.fieldKey;return e===void 0||t===void 0?[]:(e.siblingRecords??[]).flatMap((a,r)=>{if(r===e.itemIndex)return[];const l=Gs(a[t]);return l===null?[]:[l]})}function LI({slot:e,value:t,onChange:a,onRowPick:r,recordContext:l,...c}){var j;const{TablePicker:u}=Wt(),[m,p]=x.useState(null),g=c.rowTable??df(e),b=g.kind==="table"&&g.inert!==!0?g.tables:null,v=!fl(e),k=(E,_)=>{E!==t&&(r?r(E,_):a(E))},w=GS(e.label);return d.jsxs("div",{className:Pr,role:"group","aria-label":e.label,children:[d.jsxs("div",{className:TI,children:[d.jsx(pb,{rowTable:g,value:t}),b!==null&&u!==void 0&&d.jsxs("span",{className:rj,children:[t!==null&&!rf(t)&&d.jsx(fO,{label:`Edit ${w}`,onClick:()=>p("record")}),v&&d.jsx(zI,{label:((j=Fy(e).choose)==null?void 0:j.label)??Ps("Choose",w),onClick:()=>p("pick")}),v&&t!==null&&d.jsx(af,{icon:vl,label:`Remove ${w}`,title:"Remove",tone:"remove",onClick:()=>k(null,{})})]})]}),m==="record"&&t!==null&&b!==null&&u!==void 0&&d.jsx(u,{open:!0,mode:"record",tables:b,rowId:t,onClose:()=>p(null)}),m==="pick"&&b!==null&&u!==void 0&&d.jsx(u,{open:!0,mode:"single",tables:b,selectedId:t,disabledIds:DI(l),onPick:k,onClose:()=>p(null)})]})}function fO({label:e,onClick:t}){return d.jsx(af,{icon:py,label:e,title:"Edit",onClick:t})}function zI({label:e,onClick:t}){return d.jsx(af,{icon:X_.Choose,label:e,title:"Choose",onClick:t})}function pb({rowTable:e,value:t,size:a="bar"}){const{TableRowSummary:r}=Wt();switch(e.kind){case"table":{if(rf(t))return d.jsx(Wm,{face:{title:`New ${_k[e.tables[0]].toLowerCase()}`,supporting:null,image:null},size:a});if(r)return d.jsx("span",{className:"flex min-w-0 flex-1",children:d.jsx(r,{tables:e.tables,rowId:t,size:a})});const l=_k[e.tables[0]];return t===null?d.jsxs(Jm,{size:a,children:["No ",l.toLowerCase()," chosen"]}):d.jsx(Wm,{face:{title:l,supporting:null,image:null},size:a})}case"content":return t===null?d.jsx(Jm,{size:a,children:"None"}):d.jsx(Wm,{face:{title:e.labelOf(t)??"Untitled",supporting:null,image:null},size:a});case"none":return d.jsx(Jm,{size:a,children:"Set automatically"})}}const $I={model:{defaultValue:null,coerce:Gs,isEmpty:e=>e===null,isInvalid:()=>!1},faces:{compact:LI},applyOptimistic:null};function UI(e){var t,a,r,l;switch(VS(e,Pj)){case"media":return((t=e.element)==null?void 0:t.type)==="media"?Pm:((a=e.element)==null?void 0:a.type)==="video"?h6:((r=e.element)==null?void 0:r.type)==="tour"?yy:((l=e.element)==null?void 0:l.type)==="document"?Pm:qp;case"upload":return Pm;case"poi":return q6;case"annotated-media":return qp;case"object":case"row":return QD;case"scalar":return PE}}function ff(e){switch(e.type){case"text":return CL;case"url":return my;case"image":case"media":return Vd;case"video":return vy;case"tour":return yy;case"poi":return VE;case"address":return I6;case"document":return Pd;case"select":return X6;case"list":return UI(e);default:return cy}}function hO(e){const t=new Set(e.map(ff));return t.size===1?[...t][0]:cy}const II="relative flex flex-col gap-2",HI={large:"gap-3",compact:"gap-2"},BI="group/li flex touch-none items-center gap-2 rounded-[calc(8*var(--content))] border border-line bg-white px-2.75 transition-[border-color,box-shadow] duration-[120ms] hover:border-line-strong focus-within:border-accent",qI={field:"cursor-text",bar:"cursor-grab pr-2"},FI=ae(vt,"we-no-drag grid size-5.5 flex-shrink-0 place-items-center rounded-[calc(5*var(--content))] text-ink-3 transition-[background,color] duration-[120ms] hover:bg-[#FBE6E2] hover:text-[#8E2C1E]");function PI(e){const t=e.currentTarget.control;if(!t||e.target===t||e.target.closest("button")||(e.preventDefault(),t.focus(),!(t instanceof HTMLInputElement)))return;const r=e.clientX<t.getBoundingClientRect().left?0:t.value.length;t.setSelectionRange(r,r)}function gb({engine:e,itemKind:t="field",label:a,add:r,choose:l,size:c,renderControl:u,renderActions:m,onAdd:p,renderAdd:g,addUnbound:b=!1,empty:v}){const{rows:k,drag:w}=e,{containerRef:j,getItemProps:E}=w,_=g==null?void 0:g(e.add),C=k.length===0&&v!==void 0&&_==null;return d.jsx("div",{className:Pr,role:"group","aria-label":a,children:d.jsxs("div",{className:ae("flex flex-col",HI[c]),children:[e.canAdd&&d.jsx(hc,{size:c,add:r,onAdd:b?null:()=>p(e.add),choose:l}),C&&v,_,k.length>0&&d.jsx("div",{className:II,ref:j,children:k.map(O=>d.jsxs("label",{htmlFor:O.key,onClick:PI,...E(O.key),className:ae(BI,qI[t]),children:[d.jsx("span",{"aria-hidden":"true",className:"flex flex-shrink-0 cursor-grab items-center text-ink-4 transition-colors duration-[120ms] hover:text-ink-2",children:d.jsx(Rt.grip,{})}),u({id:O.key,value:O.value,onChange:A=>e.setValue(O.key,A)}),t==="bar"&&d.jsxs("span",{className:rj,children:[m==null?void 0:m({id:O.key,value:O.value}),e.canRemove&&d.jsx(af,{icon:vl,label:`Remove ${Wa(a).singular}`,title:"Remove",tone:"remove",onClick:()=>e.remove(O.key)})]}),e.canRemove&&t==="field"&&d.jsx("button",{type:"button",className:FI,title:"Remove",onClick:()=>e.remove(O.key),children:d.jsx(Rt.trash,{})})]},O.key))})]})})}function VI({engine:e,label:t,add:a,placeholder:r="List item",maxLength:l,size:c}){return d.jsx(gb,{engine:e,label:t,add:a,size:c,renderControl:({id:u,value:m,onChange:p})=>d.jsx(ZL,{id:u,value:m,onChange:p,placeholder:r,ariaLabel:r,maxLength:l,className:ae("cursor-[inherit]",XE)}),onAdd:u=>u("")})}const GI="flex min-w-0 flex-1 cursor-[inherit] items-center gap-2.5 py-[calc(7*var(--content))] pl-[calc(2*var(--content))] text-ink",KI="relative h-[calc(280*var(--frame))]",YI=5,QI=ae("flex items-center gap-2 rounded-[calc(8*var(--content))] px-2.75 py-[calc(7*var(--content))] pr-2",ky),XI=ae("block size-[calc(13*var(--content))] rounded-[calc(3*var(--content))]",_n),jk=["w-[28%]","w-[22%]","w-[34%]"];function ZI({position:e}){return d.jsxs("div",{className:QI,children:[d.jsx("span",{className:"grid w-3.5 shrink-0 place-items-center",children:d.jsx("span",{className:ae("block h-[calc(14*var(--content))] w-[calc(6*var(--content))] rounded-full",_n)})}),d.jsxs("span",{className:"flex min-w-0 flex-1 items-center gap-[calc(12*var(--content))] pl-[calc(2*var(--content))]",children:[d.jsx("span",{className:ae("block size-[calc(32*var(--content))] shrink-0 rounded-[calc(7*var(--content))]",_n)}),d.jsx("span",{className:ae("block h-[calc(10*var(--content))] rounded-full",_n,jk[e%jk.length])}),d.jsx("span",{className:ae("block h-[calc(8*var(--content))] w-[16%] rounded-full",_n)})]}),[0,1].map(t=>d.jsx("span",{className:"grid h-[calc(36*var(--content))] w-[calc(36*var(--content))] shrink-0 place-items-center",children:d.jsx("span",{className:XI})},t))]})}function WI(e){return Gs(typeof e=="object"&&e!==null?e.id:e)}function JI({slot:e,face:t,rowTable:a,verbs:r,fixed:l,value:c,commit:u}){const{TablePicker:m,TableCreate:p}=Wt(),g=er({items:c.map(WI),fixed:l,axis:"y",commit:u}),[b,v]=x.useState(!1),[k,w]=x.useState(!1),[j,E]=x.useState(null),_=a.kind==="table"&&a.inert!==!0?a.tables:null,C=_!==null?m:void 0,O=_!==null?p:void 0,A=Wa(e.label).singular,D=()=>v(!0),R=C!==void 0&&r.choose!==null?{choose:r.choose,onChoose:D}:void 0,F=r.add,L=()=>w(!0),T=O!==void 0,H=g.rows.flatMap(Y=>Y.value!==null?[Y.value]:[]),ne=t==="expanded"&&g.rows.length===0?aO(e):null;return d.jsxs(d.Fragment,{children:[d.jsx(gb,{engine:g,itemKind:"bar",label:e.label,add:F,...R!==void 0?{choose:R}:{},size:t==="expanded"?"large":"compact",addUnbound:!T,onAdd:L,...t==="expanded"?{empty:d.jsxs("div",{className:KI,children:[d.jsx(fc,{className:"flex flex-col gap-2",children:Array.from({length:YI},(Y,le)=>d.jsx(ZI,{position:le},le))}),d.jsx(yd,{icon:La.createElement(ff(e),{size:25,strokeWidth:1.8}),headline:F.empty,...ne!==null?{line:ne}:{}})]})}:{},renderControl:({id:Y,value:le})=>d.jsx("div",{id:Y,className:GI,children:d.jsx(pb,{rowTable:a,value:le})}),renderActions:({value:Y})=>C!==void 0&&Y!==null&&d.jsx(fO,{label:`Edit ${A}`,onClick:()=>E(Y)})}),j!==null&&C!==void 0&&_!==null&&d.jsx(C,{open:!0,mode:"record",tables:_,rowId:j,onClose:()=>E(null)}),k&&O!==void 0&&_!==null&&d.jsx(O,{tables:_,onCreated:Y=>{w(!1),g.rows.some(le=>le.value===Y)||g.add(Y)},onClose:()=>w(!1)}),b&&C!==void 0&&_!==null&&d.jsx(C,{open:!0,mode:"multi",tables:_,selectedIds:H,onChange:Y=>g.replace(El(g.rows,Y.map(le=>({id:le})),le=>le,le=>le.id,g.mint)),onClose:()=>v(!1)})]})}const eH=12;function tH(e,t,a,r){if(e.top>=r&&e.bottom<=t-r)return null;const c=Math.max(0,a+e.top-r);return Math.abs(c-a)<1?null:c}function nH({icon:e,title:t,subtitle:a,showGrip:r=!1,open:l}){return d.jsxs(d.Fragment,{children:[r?d.jsx("span",{"aria-hidden":"true",className:"-mr-1 flex flex-shrink-0 cursor-grab items-center text-ink-4 transition-colors duration-[120ms] hover:text-ink-2 active:cursor-grabbing",children:d.jsx(li,{name:"grip",size:14,stroke:1.8})}):null,d.jsx("span",{className:"grid size-6.5 flex-shrink-0 place-items-center rounded-md bg-accent-soft text-accent-ink","aria-hidden":"true",children:e}),a?d.jsxs("span",{className:"flex min-w-0 flex-1 flex-col gap-px",children:[d.jsx("span",{className:"truncate text-[length:calc(13.5*var(--content))] font-medium text-ink-2",children:t}),d.jsx("span",{className:"truncate text-[length:calc(11.5*var(--content))] text-ink-3 [font-variant-numeric:tabular-nums]",children:a})]}):d.jsx("span",{className:"min-w-0 flex-1 truncate text-left text-[length:calc(13.5*var(--content))] font-medium text-ink-2",children:t}),d.jsx(iH,{open:l})]})}function iH({open:e}){return d.jsx("span",{"data-acc-open":e,className:"grid flex-shrink-0 place-items-center text-ink-3 transition-transform duration-150 ease-[ease] data-[acc-open=true]:rotate-180","aria-hidden":"true",children:d.jsx(li,{name:"chevDown",size:14,stroke:1.8})})}const Es=new WeakSet;function mO({open:e,onToggle:t,icon:a,title:r,subtitle:l,scrollKey:c,dragId:u,dragHandleProps:m,children:p}){const g=x.useRef(null);return x.useEffect(()=>{if(!e)return;const b=g.current,v=b==null?void 0:b.closest(".hp-sb-scroll");if(!b||!v||Array.from(b.querySelectorAll(".we-acc")).some(C=>Es.has(C)))return;Es.add(b);const k=window.matchMedia("(prefers-reduced-motion: reduce)").matches,w=()=>{Es.delete(b);const C=b.getBoundingClientRect(),O=v.getBoundingClientRect(),A=tH({top:C.top-O.top,bottom:C.bottom-O.top,height:C.height},v.clientHeight,v.scrollTop,eH);A!=null&&v.scrollTo({top:A,behavior:k?"auto":"smooth"})};if(k){const C=requestAnimationFrame(w);return()=>{cancelAnimationFrame(C),Es.delete(b)}}const j=new AbortController,E=()=>{j.abort(),window.clearTimeout(_),w()};b.addEventListener("transitionend",C=>{C.propertyName==="grid-template-rows"&&C.target instanceof Node&&C.target.parentNode===b&&E()},{signal:j.signal});const _=window.setTimeout(E,280);return()=>{j.abort(),window.clearTimeout(_),Es.delete(b)}},[e,c]),d.jsxs("div",{ref:g,"data-open":e,"data-dragid":u,className:ae("we-acc flex-shrink-0 overflow-hidden rounded border border-line bg-canvas","origin-center [transform:scale(var(--gx,1),var(--gy,1))] [will-change:transform]","[transition:transform_.18s_cubic-bezier(.34,1.56,.64,1),box-shadow_.18s_ease,border-color_.16s_ease]","has-[>.we-acc-head:hover]:shadow-[0_4px_14px_-6px_rgba(20,24,15,0.18)]","has-[>.we-acc-head:active]:[transition-duration:.08s]","motion-reduce:[transform:none] motion-reduce:[transition:box-shadow_.18s_ease,border-color_.16s_ease]"),children:[d.jsx("button",{type:"button",className:ae("we-acc-head flex w-full cursor-pointer appearance-none items-center gap-2.5 border-0 bg-transparent pr-3.5 py-3 text-left outline-none",m?"pl-2":"pl-3.5",m&&"touch-none"),onClick:t,onPointerDown:m==null?void 0:m.onPointerDown,"aria-expanded":e,children:d.jsx(nH,{icon:a,title:r,subtitle:l,showGrip:m!=null,open:e})}),d.jsx("div",{"data-acc-open":e,className:"grid grid-rows-[0fr] transition-[grid-template-rows] duration-200 ease-out data-[acc-open=true]:grid-rows-[1fr] motion-reduce:transition-none",inert:!e,children:d.jsx("div",{className:"min-h-0 overflow-hidden",children:d.jsx("div",{"data-acc-open":e,className:"bg-white px-3.5 pb-4 pt-2 opacity-0 transition-opacity duration-200 ease-out data-[acc-open=true]:opacity-100 motion-reduce:transition-none",children:p})})})]})}function Ok(e){return FS(e)}function aH(e){const t=[];for(let a=0;a<e.length;a++){const r=e[a+1];Ok(e[a])&&r!==void 0&&Ok(r)?(t.push({kind:"pair",indices:[a,a+1]}),a++):t.push({kind:"single",index:a})}return t}function rH({items:e,rows:t}){const a=r=>r&&d.jsxs("div",{className:`${Pr} min-w-0`,...r.attrs,children:[r.label!==null?d.jsx(XL,{children:r.label}):null,r.node]},r.key);return d.jsx("div",{className:FL,children:t.map(r=>r.kind==="pair"?d.jsxs("div",{className:"grid grid-cols-2 gap-2",children:[a(e[r.indices[0]]),a(e[r.indices[1]])]},`p${r.indices[0]}`):d.jsx("div",{children:a(e[r.index])},`s${r.index}`))})}const oH='input, textarea, select, button, [tabindex]:not([tabindex="-1"]), [contenteditable="true"]',Ad="data-field-name",yb="data-field-scope";function lH(e,t){var r;const a=(r=e.parentElement)==null?void 0:r.closest(`[${yb}]`);return a==null||a===t||!t.contains(a)}function pO(e,t){var r;const a=Array.from(e.querySelectorAll(`[${Ad}]`)).find(l=>l.getAttribute(Ad)===t&&lH(l,e));a&&(a.scrollIntoView({block:"nearest"}),(r=a.querySelector(oH))==null||r.focus({preventScroll:!0}))}function sH(e){const t={fields:Object.fromEntries(e)};return e.filter(([,a])=>Md(a,t)&&!XC(a))}const cH="data-object-fields";function bb({fields:e,lone:t=!1,reveal:a,renderField:r}){const l=Ry(),c=sH(e),u=x.useRef(null);return x.useEffect(()=>{if(!a)return;const m=requestAnimationFrame(()=>{u.current&&pO(u.current,a)});return()=>cancelAnimationFrame(m)},[a]),d.jsx("div",{ref:u,[cH]:l,[yb]:"",children:d.jsx(rH,{rows:aH(c.map(([,m])=>m)),items:c.map(([m,p])=>({key:m,label:t?null:p.label||m,attrs:{[Ad]:m},node:r(m,p)}))})})}function wc({slot:e,instanceId:t,slotId:a,value:r,propertyId:l,onChange:c,required:u,overridden:m,selectedItemIndex:p,selectedFieldName:g,itemBaseline:b,boundRowId:v,boundRowTable:k,membership:w,rowTable:j,onRowPick:E,onUpload:_,recordContext:C,factPath:O}){const A=Ry(),D=n8(e.type==="list"?void 0:O),R=Ol(e.type);if(!R)return null;const F=Xz(A),L=R.faces[F];if(!L)return null;const T=R.model.coerce(r),H=d.jsx(L,{slot:e,instanceId:t,slotId:a,value:T,onChange:c,required:u,propertyId:l,selectedItemIndex:p,selectedFieldName:g,overridden:m,itemBaseline:b,boundRowId:v,boundRowTable:k,membership:w,rowTable:j,onRowPick:E,onUpload:_,recordContext:C,factPath:O});return D===null?H:d.jsxs("div",{className:"flex flex-col gap-[calc(6*var(--content))]",children:[H,d.jsx(i8,{mark:D})]})}const uH=ae(vt,"inline-flex items-center gap-1.75 self-start h-9 px-3 rounded-lg text-body font-medium text-danger transition-[background,color] duration-[120ms] hover:bg-danger/15 focus-visible:bg-danger/15 focus-visible:ring-2 focus-visible:ring-danger/25"),dH="relative flex flex-col gap-3";function fH(e,t){return fl(e)?t:df(e)}function hH({slot:e,entries:t,fixed:a,instanceId:r,slotId:l,value:c,commit:u,membership:m,verbs:p,selectedItemIndex:g,selectedFieldName:b,itemBaseline:v,rowTable:k,insideRecord:w=!1,factPath:j}){var ti;const{TablePicker:E,TableCreate:_}=Wt(),C=hO(t.map(([,we])=>we)),O=Uo(we=>we.session.property_id),A=Uo(we=>we.select),D=Uo(we=>{var Te,Ce;return(Ce=(Te=we.content_doc)==null?void 0:Te.instances.find(Xe=>Xe.instance_id===r))==null?void 0:Ce.slot_overrides}),R=m.kind==="table"?m.table:null,F=Qj({instanceId:r,slotId:l,membership:m,itemBaseline:v,insideRecord:w}),{identityKey:L}=F,T=Pa(e)??{fields:Object.fromEntries(t)},H=Vg(Wa(e.label).singular),{add:ne}=p,Y=(we,Te)=>cf(dl(T,`${H} ${Te+1}`),T,we),le=dl(T,""),K=le.kind==="field"?le.field:void 0,[X,ue]=x.useState(!1),[M,V]=x.useState(!1),[te,me]=x.useState(null);function Q(we){A({kind:"slot",instance_id:r,slot_id:l,item_index:we})}const N=x.useRef(null),q=er({items:c,identityOf:F.identityOf,fixed:a,axis:"y",commit:(we,Te)=>{F.markOrder(we),u(F.stamp(we),Te)},onCommitted:(we,Te)=>{const Ce=N.current;if(w||Te!=="reorder"&&Te!=="replace"||Ce==null)return;const Xe=we.findIndex(at=>at.key===Ce);Xe<0?A({kind:"slot",instance_id:r,slot_id:l}):(Te==="reorder"||Xe!==q.indexOf(Ce))&&Q(Xe)}}),{rows:I}=q,P=w?te:g!=null?q.keyAt(g):null,ee=P!=null?q.indexOf(P):-1;x.useEffect(()=>{N.current=P},[P]);function pe(we){if(w){me(we);return}const Te=q.indexOf(we);Te<0||Q(Te)}function se(){w?me(null):A({kind:"slot",instance_id:r,slot_id:l})}function ke(we){P===we?se():pe(we)}const z=m.kind==="pick-row"||m.kind==="table"?lb(m):null,ce=q.canAdd&&(m.kind!=="pick-row"||_!==void 0),ge=p.choose!==null&&q.canAdd&&(z!==null&&E!==void 0||m.kind==="pick-media"),Ee=(ti=t.find(([,we])=>fl(we)))==null?void 0:ti[0];function Ue(we){const Te=q.mint(we);q.insert(Te),w?me(Te.key):Q(0)}function Le(){ge&&ue(!0)}function ye(){if(ce){if(m.kind==="pick-row"){V(!0);return}if(m.kind==="pick-media"){ue(!0);return}Ue(R?{...Io(t),[L]:lj()}:Io(t))}}function Re(we,Te){q.replace(uO(I,t,L,we,Te,q.mint))}function ht(we,Te){const Ce=Io(t);for(const[Xe,at]of t)fl(at)&&(Ce[Xe]=at.type==="image"?By(we,{file:"",url:"",alt:""},Te,WS(at.crop),m.kind==="pick-media"?m.filter.from:void 0):{file:we.file,url:sl(we),alt:""});return Ce}function $e(we){var Ce;const Te=Ee===void 0||(Ce=we[Ee])==null?void 0:Ce.file;return typeof Te=="string"&&Te!==""?Te:null}function Lt(we,Te){const Ce=El(I,we,$e,at=>ht(at,Te),q.mint),Xe=new Set(Ce.map(at=>at.key));for(const at of I)Xe.has(at.key)||F.markRemoved(at);q.replace(Ce)}function st(we){if(!q.canRemove)return;const Te=I.find(Xe=>Xe.key===we);Te&&F.markRemoved(Te);const Ce=q.indexOf(we);q.remove(we),P===we?se():!w&&ee>=0&&Ce>=0&&Ce<ee&&Q(ee-1)}function Bn(we,Te,Ce={}){const Xe=I.find(at=>at.key===we);Xe!=null&&(F.markFields(Xe,Te),q.setValue(we,{...Xe.value,...Ce,...Te}))}function On(we,Te,Ce,Xe){const at=I.find(ie=>ie.key===we);if(at==null)return;const Vt=F.markerIdentity(at),ut=Ce===null?{}:sO(t,Te,Xe);if(Vt!==null)for(const ie of Object.keys(ut))SI(D,l,Vt,ie)&&delete ut[ie];Bn(we,{[Te]:Ce},ut)}const{containerRef:cn,getItemProps:yt,draggingKey:Wi}=q.drag,ci=ge&&p.choose!==null?{choose:p.choose,onChoose:Le}:void 0;return d.jsxs("div",{className:"flex flex-col gap-3",children:[d.jsx(hc,{size:"compact",add:ne,onAdd:ce?ye:null,choose:ci}),I.length>0&&d.jsx("div",{ref:cn,className:dH,children:I.map((we,Te)=>{const Ce=Y(we.value,Te),Xe=P===we.key;return d.jsx("div",{children:d.jsx(mO,{open:Wi==null&&Xe,onToggle:()=>ke(we.key),icon:d.jsx(C,{size:14}),title:Ce,scrollKey:we.key,dragId:we.key,dragHandleProps:{onPointerDown:yt(we.key).onPointerDown},children:d.jsxs("div",{className:"flex flex-col gap-4",children:[d.jsx(bb,{fields:t,reveal:!w&&Xe?b:void 0,renderField:(at,Vt)=>d.jsx(wc,{slot:Vt,instanceId:r,slotId:l,value:we.value[at],propertyId:O,onChange:ut=>Bn(we.key,{[at]:ut}),...JE(Vt.type)?{factPath:qs(Bs(j,we.value),at)}:{},...lO(Vt)?{rowTable:fH(Vt,k),onRowPick:(ut,ie)=>On(we.key,at,ut,ie)}:{},recordContext:{...R?{itemId:_d(we.value,L)??void 0}:{},itemIndex:Te,siblingRecords:I.map(ut=>ut.value),fieldKey:at,table:R,...K?{titleKey:K}:{},membership:m}})}),Xe&&q.canRemove&&d.jsxs("button",{type:"button",className:ae(uH,"max-w-full"),onClick:()=>st(we.key),children:[d.jsx("span",{className:"inline-flex shrink-0",children:d.jsx(Rt.trash,{size:13})}),d.jsxs("span",{className:"min-w-0 truncate",children:["Delete ",Ce]})]})]})})},we.key)})}),M&&z!==null&&_!==void 0&&d.jsx(_,{tables:z,onCreated:(we,Te)=>{V(!1),Od(I.map(Ce=>Ce.value),t,L).includes(we)||Ue(mb(t,L,we,Te))},onClose:()=>V(!1)}),X&&z!==null&&E&&d.jsx(E,{open:!0,mode:"multi",tables:z,selectedIds:Od(I.map(we=>we.value),t,L),onChange:Re,onClose:()=>ue(!1)}),X&&m.kind==="pick-media"&&d.jsx(Wy,{propertyId:O,children:we=>d.jsx(bc,{mode:"multi",propertyId:O,filter:m.filter,selectedIds:I.flatMap(Te=>$e(Te.value)??[]),onChange:Te=>Lt(Te,we),onClose:()=>ue(!1)})})]})}function Ak(e){return typeof e=="string"?{value:e,label:e}:{value:e.value,label:e.label,...e.icon!==void 0?{icon:e.icon}:{},...e.description!==void 0?{description:e.description}:{}}}function gO(e){var a;if(e.values)return e.values.map(Ak);const t=((a=e.source)==null?void 0:a.kind)==="home"?e.source.key:void 0;return t===void 0?[]:(Q3(t)??[]).map(Ak)}function Rs(e){return e.trim().toLowerCase().replace(/\s+/g,"-")}const mH=["home","building","apartments","trendUp","tag","key","template","palette","filePen","library","plug","helpCircle","lock","creditCard","settings","power","user","plus","globe","image","fileText","users","eye","eyeOff","pulse","search","chart","layout","chevDown","chevRight","chevSelector","pencil","dots","grip","external","copy","trash","archive","sparkle","arrowUp","arrowDown","arrowLeft","arrowRight","undo","redo","logout","check","x","clock","calendar","mapPin","userPlus","mail","phone","share","upload","bookOpen","newspaper","presentation","instagram","facebook","linkedin","xLogo"],pH=new Set(mH);function yO(e){return typeof e=="string"&&pH.has(e)}const gH="fixed overflow-y-auto rounded-[calc(8*var(--content))] border border-line bg-white shadow-[0_16px_38px_-12px_rgba(20,18,13,0.4)]",bO=ae(vt,"flex w-full items-center justify-between gap-2 rounded-none px-2.5 py-2 text-left text-body text-ink hover:bg-accent-soft data-[active=true]:bg-accent-soft"),yH=ae(bO,"text-accent"),bH=4,Nk=160,Mk=240,vH=ae(vt,XE,"min-w-0 flex-1 cursor-text bg-transparent text-left text-ink outline-none placeholder:text-ink-4");function Ck({open:e,className:t,onMouseDown:a}){return d.jsx("span",{className:ae("flex flex-shrink-0 items-center text-ink-4 transition-transform duration-[120ms]",e&&"rotate-180",t),onMouseDown:a,"aria-hidden":"true",children:d.jsx("svg",{width:"11",height:"11",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:d.jsx("path",{d:"m6 9 6 6 6-6"})})})}function xH(){return d.jsx("svg",{className:"flex-shrink-0 text-ink-2",width:"13",height:"13",viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:"2.2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:d.jsx("path",{d:"M3.5 8.5l3 3 6-6.5"})})}function wH({option:e}){const t=yO(e.icon)?e.icon:null;return t===null&&e.description===void 0?d.jsx("span",{className:"truncate",children:e.label}):d.jsxs("span",{className:"flex min-w-0 items-start gap-2",children:[t!==null&&d.jsx(li,{name:t,size:15,stroke:1.7,className:"mt-[calc(2*var(--content))] text-ink-3"}),d.jsxs("span",{className:"flex min-w-0 flex-col",children:[d.jsx("span",{className:"truncate",children:e.label}),e.description!==void 0&&d.jsx("span",{className:"text-caption leading-[1.35] text-ink-3",children:e.description})]})]})}function kH(e,t){const a=t.toLowerCase().trim();return a?e.filter(r=>r.label.toLowerCase().includes(a)):e}function SH(e,t){const a=Rs(t);if(a.length!==0)return e.find(r=>Rs(r.value)===a||Rs(r.label)===a)}function eg({label:e,value:t,options:a,onChange:r,placeholder:l,bare:c=!1,autoOpen:u=!1,onDismiss:m,id:p,creatable:g=!1,canCreate:b,attention:v=null}){const k=nr(),[w,j]=x.useState(u),[E,_]=x.useState(0),[C,O]=x.useState(null),[A,D]=x.useState(""),R=x.useId(),F=x.useRef(null),L=x.useRef(null),T=x.useRef(null),H=a.findIndex(z=>z.value===t),ne=H>=0?a[H]:void 0,Y=kH(a,w?A:""),le=A.trim(),K=w?SH(a,A):void 0,X=K&&!Y.some(z=>z.value===K.value)?[...Y,K]:Y,ue=g&&le.length>0&&!K&&((b==null?void 0:b(le))??!0),M=X.length+(ue?1:0);function V(){T.current&&O(Hr(T.current)),_(Math.max(0,H)),j(!0)}const te=x.useCallback(()=>{j(!1),D(""),m==null||m()},[m]);function me(z){var ce;z.value!==t&&r(z.value),j(!1),D(""),(ce=L.current)==null||ce.focus()}function Q(z){var ce;r(z),j(!1),D(""),(ce=L.current)==null||ce.focus()}function N(z){var ce;if(!w){(z.key==="ArrowDown"||z.key==="Enter"||z.key===" ")&&(z.preventDefault(),V());return}if(z.key==="Escape")z.preventDefault(),(ce=L.current)==null||ce.focus(),te();else if(z.key==="ArrowDown")z.preventDefault(),_(ge=>Math.min(M-1,ge+1));else if(z.key==="ArrowUp")z.preventDefault(),_(ge=>Math.max(0,ge-1));else if(z.key==="Enter")if(z.preventDefault(),E<X.length){const ge=X[E];ge&&me(ge)}else ue&&Q(le)}const q=x.useCallback(z=>{var Ee,Ue;const ce=(Ee=F.current)==null?void 0:Ee.contains(z),ge=(Ue=document.getElementById(R))==null?void 0:Ue.contains(z);return!ce&&!ge},[R]);function I(z){w&&q(z.relatedTarget)&&te()}x.useEffect(()=>{var z;u&&((z=L.current)==null||z.focus())},[u]),x.useEffect(()=>{if(!w)return;const z=()=>{T.current&&O(Hr(T.current))};return z(),window.addEventListener("scroll",z,!0),window.addEventListener("resize",z),()=>{window.removeEventListener("scroll",z,!0),window.removeEventListener("resize",z)}},[w]),x.useEffect(()=>{if(!w)return;const z=ce=>{q(ce.target)&&te()};return document.addEventListener("mousedown",z),()=>document.removeEventListener("mousedown",z)},[w,q,te]);const P=z=>{z.preventDefault(),w||V()},ee=d.jsx("input",{ref:L,id:p,className:c?vH:ae(k.inner,"cursor-text"),value:w?A:(ne==null?void 0:ne.label)??t,placeholder:l??"",role:"combobox","aria-haspopup":"listbox","aria-expanded":w,"aria-controls":R,"aria-label":e,onFocus:V,onClick:()=>{w||V()},onChange:z=>{D(z.target.value),w||V(),_(0)},onKeyDown:N}),pe=c?d.jsxs(d.Fragment,{children:[ee,d.jsx(Ck,{open:w,className:"pl-2",onMouseDown:P})]}):d.jsxs(d.Fragment,{children:[ee,d.jsx(Ck,{open:w,className:"pl-1 pr-2.75",onMouseDown:P})]}),se=w&&C?hl(C,{maxHeight:Mk*2,minWidth:Nk,gap:bH}):null,ke=w&&se&&M>0?Zi.createPortal(d.jsxs("div",{className:gH,id:R,role:"listbox",style:{left:se.left,top:se.top,bottom:se.bottom,minWidth:Math.max(se.width,Nk),maxHeight:`min(${se.maxHeight}px, calc(${Mk}*var(--content)))`,zIndex:qa},children:[X.map((z,ce)=>d.jsxs("button",{type:"button",role:"option","aria-selected":z.value===t,"data-active":ce===E,className:bO,onMouseEnter:()=>_(ce),onMouseDown:ge=>ge.preventDefault(),onClick:()=>me(z),children:[d.jsx(wH,{option:z}),z.value===t&&d.jsx(xH,{})]},z.value)),ue&&d.jsx("button",{type:"button",role:"option","aria-selected":E===X.length,"data-active":E===X.length,className:yH,onMouseEnter:()=>_(X.length),onMouseDown:z=>z.preventDefault(),onClick:()=>Q(le),children:d.jsxs("span",{className:"truncate",children:["Create “",le,"”"]})})]}),document.body):null;return c?d.jsxs("div",{className:"flex min-w-0 flex-1 items-center",ref:z=>{F.current=z,T.current=z},onBlurCapture:I,children:[pe,ke]}):d.jsxs("div",{className:k.frame,ref:F,onBlurCapture:I,children:[d.jsx(Gr,{attention:v,className:w?"border-accent":void 0,ref:T,children:pe}),ke]})}function EH({engine:e,label:t,add:a,options:r,unique:l=!1,creatable:c=!1,size:u}){const[m,p]=x.useState(!1),g=e.rows.map(j=>j.value),b=j=>l?r.filter(E=>E.value===j||!g.includes(E.value)):r,v=b(null),k=j=>!l||!g.some(E=>Rs(E)===Rs(j)),w=v.length>0?v:r;return d.jsx(gb,{engine:e,label:t,add:a,size:u,renderControl:({id:j,value:E,onChange:_})=>d.jsx(eg,{bare:!0,id:j,label:t,value:E,options:b(E),onChange:_,creatable:c,canCreate:k}),onAdd:()=>p(!0),renderAdd:j=>m?d.jsx(eg,{bare:!0,autoOpen:!0,label:a.label,value:"",placeholder:"Choose one",options:w,onDismiss:()=>p(!1),onChange:E=>{p(!1),k(E)&&j(E)},creatable:c,canCreate:k}):null})}function _H({slot:e,itemSlot:t,add:a,fixed:r,value:l,commit:c,size:u}){const m=er({items:l,fixed:r,axis:"y",commit:c});return t.type==="select"?d.jsx(EH,{engine:m,label:e.label,add:a,options:gO(t),creatable:t.creatable===!0,unique:e.unique===!0,size:u}):d.jsx(VI,{engine:m,label:e.label,add:a,maxLength:t.cap,size:u})}const Rk="grid size-[calc(18*var(--content))] shrink-0 place-items-center border-[1.5px] bg-canvas transition-[border-color,background-color] duration-[120ms]";function jH({control:e,state:t,label:a,onToggle:r}){return d.jsx("button",{type:"button",role:e,"aria-checked":t.checked,"aria-label":a,disabled:t.disabled,className:ae(vt,"flex w-full items-center justify-center",t.disabled?"cursor-not-allowed":"cursor-pointer"),onClick:l=>{l.stopPropagation(),r()},children:e==="radio"?d.jsx("span",{"aria-hidden":"true",className:ae(Rk,"rounded-full",t.checked?"border-ink":"border-ink-4"),children:t.checked&&d.jsx("span",{className:"size-[calc(8*var(--content))] rounded-full bg-ink"})}):d.jsx("span",{"aria-hidden":"true",className:ae(Rk,"rounded-[calc(5*var(--content))]",t.checked?"border-ink bg-ink text-canvas":"border-ink-4 text-transparent"),children:d.jsx(Fd,{className:"size-[calc(11*var(--content))]",strokeWidth:3})})})}function OH(e){return e.derived!==void 0}const AH=new Set(["image","video","tour","document","media"]);function NH(e){switch(e.type){case"number":return 96;case"date":case"select":return 140;case"phone":return 150;case"url":case"email":return 200;case"address":return 260;case"image":case"video":case"tour":case"document":case"media":return 88;case"text":return e.size==="medium"||e.size==="long"?220:160;case"list":case"poi":return 140}}function MH(e){const t=NH(e),a=AH.has(e.type),r=`calc(${t}*var(--content))`;return{track:a?r:`minmax(${r},${t/100}fr)`,minPx:t}}function CH(e){const t=Object.entries(e.fields);return{used:new Set(t.map(([a])=>a)),required:new Set(t.filter(([,a])=>a.required===!0).map(([a])=>a))}}function vO(e){return e.reduce((t,a)=>t+a.minPx,0)}function RH(e,t,a=Number.POSITIVE_INFINITY){const r=Pa(e);if(r===null)return[];const l=dl(r,""),c=l.kind==="field"?l.field:null,u=[];for(const[b,v]of jl(r)){if(OH(v)||v.locked===!0||!t.used.has(b))continue;const k=b===c,w=t.required.has(b),j={key:b,slot:v,header:v.label||b,required:w,title:k,...MH(v)};u.push({column:j,pinned:k||w})}let m=a-vO(u.filter(b=>b.pinned).map(b=>b.column)),p=!1;const g=[];for(const{column:b,pinned:v}of u)v?g.push(b):!p&&b.minPx<=m?(m-=b.minPx,g.push(b)):p=!0;return g}function xO(e){if(e===null||typeof e!="object")return null;const t=gc(e);if(t===null||t==="")return null;if(oc(e)||Qa(e))return{file:t,picked:t};const{kind:a,id:r,...l}=e;return{...l,file:t,...typeof a=="string"&&pn(a)?{kind:a}:{}}}function vb(){return{image:_j.model,video:Mj.model,tour:Oj.model,document:Bj.model}}const TH=RU({model:{defaultValue:null,coerce:xO,isEmpty:e=>e===null||e.file==="",isInvalid:()=>!1},models:vb}),DH=ae(vt,"inline-flex self-stretch w-auto max-w-full min-w-0 cursor-pointer items-center gap-[calc(10*var(--content))] rounded-[calc(7*var(--content))] border px-[calc(11*var(--content))]","text-[length:calc(12.5*var(--content))] font-medium transition-[background,border-color,color] duration-[120ms]","data-[empty]:border-dashed data-[empty]:text-ink-3 hover:data-[empty]:border-ink-4 hover:data-[empty]:text-ink-2","border-line text-ink-2 hover:border-ink-4 disabled:cursor-default",wl),LH="inline-flex size-[calc(16*var(--content))] shrink-0 items-center justify-center opacity-80",zH="min-w-0 truncate";function hf({slot:e,reading:t,readingText:a,attention:r,scope:l,onOpen:c}){const u=_l(),m=t===null,p=m?tf(e,l):null,g=p!==null?W_(p):null,b=g!==null?g.label:a!==void 0?`${e.label}: ${a}`:`Open ${e.label}`;return d.jsxs("button",{type:"button",className:DH,"data-summary-pill":e.type,"data-empty":m?"":void 0,...kl(r,u),"aria-label":b,disabled:c===void 0,onClick:c,children:[d.jsx("span",{className:LH,children:La.createElement(g!==null?g.icon:ff(e),{size:14})}),d.jsx("span",{className:zH,children:m?e.label:t})]})}function mf({slot:e,value:t,required:a}){const r=Ol(e.type);return r===null?null:tr(r.model,e,r.model.coerce(t),a??!1)}function $H(e){var a;const t=Array.isArray(e.value)?e.value.length:0;return d.jsx(hf,{slot:e.slot,reading:t===0?null:`${t} ${e.slot.label}`,readingText:String(t),attention:mf(e),scope:{table:((a=e.recordContext)==null?void 0:a.table)??null},onOpen:e.onOpen})}function UH(e){const t=Lj.coerce(e.value),a=W2((t==null?void 0:t.street)??null,(t==null?void 0:t.unit)??null),r=[t==null?void 0:t.city,t==null?void 0:t.state,(t==null?void 0:t.postal)==null?null:jg(t.postal)].filter(Boolean).join(", "),l=a!==""?a:r!==""?r:null;return d.jsx(hf,{slot:e.slot,reading:l,readingText:l??void 0,attention:mf(e)??(Dj(t)?"required":null),onOpen:e.onOpen})}function IH(e){const t=sb(e.value);return d.jsx(hf,{slot:e.slot,reading:(t==null?void 0:t.name)??null,readingText:t==null?void 0:t.name,attention:mf(e),onOpen:e.onOpen})}function HH(e){const t=Gs(e.value);return d.jsx(hf,{slot:e.slot,reading:t===null?null:d.jsx(pb,{rowTable:df(e.slot),value:t,size:"cell"}),attention:mf(e),onOpen:e.onOpen})}function Gu(e){const t=e.slot.type,a=Ol(t).model;return d.jsx(bj,{kind:t,model:a,onOpen:e.onOpen,props:{slot:e.slot,instanceId:e.instanceId,slotId:e.slotId,value:a.coerce(e.value),onChange:e.onChange,required:e.required,propertyId:e.propertyId,recordContext:e.recordContext,factPath:e.factPath}})}function BH(e){const t=Ol("media").model;return d.jsx(MU,{models:vb(),onOpen:e.onOpen,props:{slot:e.slot,instanceId:e.instanceId,slotId:e.slotId,value:t.coerce(e.value),onChange:e.onChange,required:e.required,propertyId:e.propertyId,recordContext:e.recordContext,factPath:e.factPath}})}const qH={list:$H,image:Gu,video:Gu,tour:Gu,document:Gu,media:BH,address:UH,poi:IH,row:HH};function FH(e){const a=qH[e.slot.type];return a?d.jsx(a,{...e}):null}const xb=24,wO=36,PH=36,VH=8,ep=e=>`calc(${e}*var(--content))`,kO=ae(s$,"flex flex-col gap-3"),SO="flex min-h-0 flex-1 flex-col overflow-hidden rounded-[calc(12*var(--content))] border border-line bg-canvas",GH="-mb-px min-h-0 flex-1 overflow-auto",KH="transition-[background-color,opacity] duration-100 hover:bg-[#fbfaf6] focus-within:bg-[#faf8f1]",wb="h-[calc(44*var(--content))]",wr="flex min-w-0 items-stretch p-[calc(4*var(--content))]",YH=ae(nf,Xy),QH="[data-table-cell] > *, input, textarea, select, button, a, [contenteditable], [role='button'], [role='checkbox'], [role='radio'], [tabindex]:not([tabindex='-1'])",kb="[:where(&)_:where([data-table-cell]>*,input,textarea,select,button,a,[contenteditable],[role=button],[role=checkbox],[role=radio],[tabindex]:not([tabindex='-1']))]:cursor-auto",XH=ae("cursor-grab",kb),ZH=ae("cursor-pointer",kb),Tk=e=>e.closest(QH)!==null,EO=11,Nd=["w-3/5","w-2/5","w-1/2","w-[70%]"],_O=ae("block h-[calc(9*var(--content))] rounded-full",_n),WH=ae("block h-[calc(22*var(--content))] w-[calc(76*var(--content))] rounded-full",_n),JH=ae("block size-[calc(13*var(--content))] rounded-[calc(3*var(--content))]",_n);function jO(e){return VH+PH*(e?2:1)}function OO(e,t){return xb+(e?wO:0)+jO(t)}function eB(e,t,a){const r=jO(a),l=[ep(xb),...t?[ep(wO)]:[],...e.map(u=>u.track),ep(r)],c=OO(t,a)+vO(e);return{style:{gridTemplateColumns:l.join(" "),minWidth:c},selection:t,actionsPx:r}}function tB({columns:e,layout:t,position:a,marks:r}){return d.jsxs("div",{className:ae("grid items-center border-b border-line-soft",wb),style:t.style,children:[d.jsx("span",{}),t.selection&&d.jsx("span",{}),e.map((l,c)=>d.jsx("span",{className:"min-w-0 px-[calc(18*var(--content))]",children:d.jsx("span",{className:Fg(l.slot.type)?ae(_O,Nd[(a+c)%Nd.length]):WH})},l.key)),d.jsx("span",{className:"flex justify-end pr-[calc(4*var(--content))]",children:Array.from({length:r},(l,c)=>d.jsx("span",{className:"grid w-[calc(36*var(--content))] place-items-center",children:d.jsx("span",{className:JH})},c))})]})}const nB=3,iB=ae("grid items-center border-b border-line-soft","grid-cols-[calc(24*var(--content))_repeat(3,minmax(0,1fr))_calc(44*var(--content))]",wb);function aB(){return d.jsx("div",{className:kO,"data-table-pending":"",children:d.jsx("div",{className:SO,children:d.jsx("div",{className:"relative min-h-0 flex-1",children:d.jsx(fc,{children:Array.from({length:EO},(e,t)=>d.jsxs("div",{className:iB,children:[d.jsx("span",{}),Array.from({length:nB},(a,r)=>d.jsx("span",{className:"min-w-0 px-[calc(18*var(--content))]",children:d.jsx("span",{className:ae(_O,Nd[(t+r)%Nd.length])})},r)),d.jsx("span",{})]},t))})})})})}function rB(){const e=x.useRef(null),t=x.useRef(null),[a,r]=x.useState(Number.POSITIVE_INFINITY);return x.useLayoutEffect(()=>{const l=e.current;if(l===null||typeof ResizeObserver>"u")return;const c=()=>{var g;const m=((g=t.current)==null?void 0:g.getBoundingClientRect().width)??0,p=l.clientWidth;m<=0||p<=0||r(p/(m/xb))};c();const u=new ResizeObserver(c);return u.observe(l),()=>u.disconnect()},[]),{box:e,grip:t,widthPx:a}}const Dk=new Set;function oB(e,t){const a=e[t];return typeof a=="string"&&a!==""?a:null}function tp(e,t,a){return e.rowId?e.rowId(t,a):oB(t,e.idKey)}function lB(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)?e:{}}const sB="input:not([disabled]), textarea:not([disabled]), select:not([disabled]), button:not([disabled]), [tabindex]:not([tabindex='-1'])";function AO(e){return e instanceof HTMLTextAreaElement?!0:e instanceof HTMLInputElement?!["button","checkbox","radio","submit","reset","file","image","color","range"].includes(e.type):!1}function Lk(e){return e instanceof HTMLSelectElement||e.getAttribute("aria-expanded")==="true"?!0:e instanceof HTMLInputElement&&["date","datetime-local","month","time","week","number","range"].includes(e.type)}function cB(e,t){if(!AO(e))return!0;let a,r;try{a=e.selectionStart,r=e.selectionEnd}catch{return!0}return a===null||r===null?!0:t==="start"?a===0&&r===0:a===e.value.length&&r===e.value.length}function uB(e){const{fields:t}=e;return t===null?d.jsx(aB,{}):d.jsx(dB,{...e,fields:t})}function dB({declaration:e,value:t,onChange:a,propertyId:r,instanceId:l="",slotId:c="",selection:u,onOpenRecord:m,onAdd:p,newRowStamp:g,fixed:b=!1,orderable:v=!0,add:k=Fy(e).add,choose:w,factPath:j,fields:E}){const _=e,{itemContent:C}=Vj(_,"expanded"),O=C.kind==="record"?C.entries:[],{box:A,grip:D,widthPx:R}=rB(),F=RH(_,E,R-OO(u!==void 0,m!==void 0)),L=Pa(_),T=L?dl(L,""):null,H=(T==null?void 0:T.kind)==="field"?T.field:void 0,ne=eB(F,u!==void 0,m!==void 0),Y=Array.isArray(t)?t.map(lB):[],le=er({items:Y,fixed:b,axis:"y",commit:(z,ce)=>a(z.map(ge=>ge.value),ce)}),{drag:K}=le,X=le.rows,ue=p!==null&&le.canAdd,M=X.map(z=>({key:z.key,index:le.indexOf(z.key),value:z.value})),V=M.length===0,te=V?aO(_):null,me=x.useRef(null);x.useLayoutEffect(()=>{const z=me.current;z&&(me.current=null,Q(z.row,z.col))});function Q(z,ce){var Ue;const ge=K.containerRef.current,Ee=ge==null?void 0:ge.querySelector(`[data-table-cell][data-row="${z}"][data-col="${ce}"]`);(Ue=Ee==null?void 0:Ee.querySelector(sB))==null||Ue.focus()}function N(z,ce="top"){if(p){p();return}const ge=ce==="top"?0:le.rows.length;me.current={row:ge,col:z},le.add({...Io(O),...g==null?void 0:g()},ge)}function q(z,ce,ge){le.updateValue(z,Ee=>({...Ee,[ce]:ge}))}function I(z){if(z.defaultPrevented||z.altKey||z.ctrlKey||z.metaKey||z.nativeEvent.isComposing)return;const ce=z.target,ge=ce.closest("[data-table-cell]");if(!ge)return;const Ee=Number(ge.dataset.row),Ue=Number(ge.dataset.col),Le=M.length-1;switch(z.key){case"Enter":{if(z.shiftKey||!AO(ce))return;z.preventDefault(),Ee<Le?Q(Ee+1,Ue):ue&&N(Ue,"below");return}case"ArrowDown":case"ArrowUp":{if(Lk(ce))return;const ye=z.key==="ArrowDown"?Ee+1:Ee-1;if(ye<0||ye>Le)return;z.preventDefault(),Q(ye,Ue);return}case"ArrowLeft":case"ArrowRight":{if(Lk(ce))return;const ye=z.key==="ArrowLeft",Re=ye?Ue-1:Ue+1;if(Re<0||Re>=F.length||!cB(ce,ye?"start":"end"))return;z.preventDefault(),Q(Ee,Re);return}}}function P(z){const ce=`${Vg(Wa(e.label).singular)} ${z.index+1}`;if(!L||(T==null?void 0:T.kind)!=="field")return ce;const ge=cf(T,L,z.value);return ge==="Untitled"?ce:ge}const ee=u?u.control:null;function pe(z){if(!u)return null;const ce=tp(u,z.value,z.index);return ce===null?{checked:!1,disabled:!0}:Gy(u.ids,ce,u.held??Dk)}function se(z){const ce=u?tp(u,z.value,z.index):null;if(!u||ce===null)return;const ge=ej(u.ids,ce,u.control,u.held??Dk);ge!==u.ids&&u.onChange(ge)}function ke(z,ce){var ht;const ge=pe(z),Ee=K.getItemProps(z.key),Ue=P(z),Le=Bs(j,z.value),ye=ge!==null&&!ge.disabled,Re=u?tp(u,z.value,z.index):null;return d.jsxs("div",{role:"row","data-dragid":Ee["data-dragid"],"data-disabled":(ge==null?void 0:ge.disabled)||void 0,"data-upstream":Re!==null&&((ht=u==null?void 0:u.upstream)==null?void 0:ht.has(Re))||void 0,onPointerDown:v?$e=>{Tk($e.target)||Ee.onPointerDown($e)}:void 0,onClick:ye?$e=>{Tk($e.target)||se(z)}:void 0,className:ae("group/row grid items-stretch border-b border-line-soft data-[disabled=true]:opacity-50 data-[disabled=true]:focus-within:opacity-100",Ty,wb,KH,ye?ZH:v?XH:kb),style:ne.style,children:[d.jsx("div",{role:"cell",className:ae(wr,"items-center justify-center"),children:v&&d.jsx("span",{"aria-hidden":"true",className:ae("flex w-full touch-none items-center justify-center","text-ink-4 opacity-0 transition-[opacity,color] duration-[120ms] group-hover/row:opacity-100 hover:text-ink-2","group-data-[drag-clone]/row:text-ink-2 group-data-[drag-clone]/row:opacity-100"),children:d.jsx(hy,{className:"size-[calc(14*var(--content))]",strokeWidth:1.8})})}),ee&&d.jsx("div",{role:"cell",className:wr,children:ge&&d.jsx(jH,{control:ee,state:ge,label:`Select ${Ue}`,onToggle:()=>se(z)})}),F.map(($e,Lt)=>d.jsx("div",{role:"cell","data-table-cell":"","data-row":ce,"data-col":Lt,"data-field":$e.key,className:wr,children:Fg($e.slot.type)?d.jsx(wc,{slot:$e.slot,instanceId:l,slotId:c,propertyId:r,value:z.value[$e.key],required:$e.required,onChange:st=>q(z.key,$e.key,st),recordContext:{itemIndex:z.index,fieldKey:$e.key,...H?{titleKey:H}:{}}}):d.jsx(FH,{slot:$e.slot,instanceId:l,slotId:c,propertyId:r,value:z.value[$e.key],required:$e.required,onChange:st=>q(z.key,$e.key,st),recordContext:{itemIndex:z.index,fieldKey:$e.key,...H?{titleKey:H}:{}},factPath:qs(Le,$e.key),onOpen:m?()=>m(z.index,$e.key):void 0})},$e.key)),d.jsxs("div",{role:"cell",className:ae(wr,"justify-end"),children:[m&&d.jsx("button",{type:"button",className:nf,"aria-label":`Open ${Ue}`,onClick:()=>m(z.index),children:d.jsx(P6,{className:"size-[calc(13*var(--content))]"})}),le.canRemove&&d.jsx("button",{type:"button",className:YH,"aria-label":`Remove ${Ue}`,onClick:()=>le.remove(z.key),children:d.jsx(vl,{className:"size-[calc(13*var(--content))]"})})]})]},z.key)}return d.jsxs("div",{className:kO,children:[le.canAdd&&d.jsx(hc,{size:"large",add:k,onAdd:ue?()=>N(0):null,choose:w}),d.jsx("div",{className:SO,children:d.jsxs("div",{ref:A,className:ae(GH,V&&"flex flex-col"),role:"table","aria-rowcount":M.length+1,children:[d.jsxs("div",{role:"row",className:"sticky top-0 z-[1] grid items-stretch border-b border-line bg-canvas text-[length:calc(12*var(--content))] font-medium text-ink-3",style:ne.style,children:[d.jsx("div",{ref:D,role:"columnheader",className:wr}),ne.selection&&d.jsx("div",{role:"columnheader",className:wr}),F.map(z=>d.jsx("div",{role:"columnheader","data-field":z.key,className:"min-w-0 px-[calc(14*var(--content))] py-[calc(10*var(--content))]",children:d.jsx("span",{className:"block truncate",children:z.header})},z.key)),d.jsx("div",{role:"columnheader",className:wr})]}),d.jsx("div",{ref:K.containerRef,className:"relative",onKeyDown:I,children:d.jsx(ef,{place:"cell",children:M.map((z,ce)=>ke(z,ce))})}),V&&d.jsxs("div",{className:"relative min-h-0 flex-1",children:[d.jsx(fc,{children:Array.from({length:EO},(z,ce)=>d.jsx(tB,{columns:F,layout:ne,position:ce,marks:(m?1:0)+(le.canRemove?1:0)},ce))}),d.jsx(yd,{icon:La.createElement(ff(_),{size:25,strokeWidth:1.8}),headline:k.empty,...te!==null?{line:te}:{}})]})]})})]})}function fB({object:e,row:t,reveal:a,withRecordContext:r=!1,onField:l,host:c,fieldProps:u}){const{fields:m}=c;return m===null?d.jsx(gB,{}):d.jsx(bb,{fields:jl(e).filter(([p])=>m.used.has(p)),reveal:a,renderField:(p,g)=>d.jsx(wc,{slot:g,instanceId:c.instanceId,slotId:`${c.slotId}.${p}`,propertyId:c.propertyId,value:t[p],required:m.required.has(p),onChange:b=>l(p,b),...JE(g.type)?{factPath:qs(c.factPath,p)}:{},...r?{recordContext:{fieldKey:p}}:{},...u==null?void 0:u(p,g)})})}const hB=5,mB=ae("block h-[calc(9*var(--content))] w-1/4 rounded-full",_n),pB=ae("block h-[calc(40*var(--content))] w-full rounded-[calc(10*var(--content))]",ky);function gB(){return d.jsx("div",{className:"relative h-[calc(360*var(--content))]","data-record-pending":"",children:d.jsx(fc,{className:"flex flex-col gap-[calc(20*var(--content))]",children:Array.from({length:hB},(e,t)=>d.jsxs("span",{className:"flex flex-col gap-[calc(8*var(--content))]",children:[d.jsx("span",{className:mB}),d.jsx("span",{className:pB})]},t))})})}const yB=ae("relative z-[1] flex flex-shrink-0 items-center gap-[14px] py-3",V_);function bB(e){const{open:t,onClose:a}=e;return d.jsx(wy,{open:t,onClose:a,ariaLabel:e.fallbackTitle,className:ae(Ly,j$),children:t?d.jsx(vB,{...e}):null})}function vB({object:e,row:t,fallbackTitle:a,onChange:r,onClose:l,propertyId:c,instanceId:u,slotId:m,factPath:p,fields:g,revealFieldName:b,fieldProps:v}){const k=dl(e,a),w=cf(k,e,t),j=w==="Untitled"?a:w,E=x.useRef(t);x.useEffect(()=>{E.current=t},[t]);const _=(C,O)=>{E.current={...E.current,[C]:O},r(E.current)};return d.jsxs(d.Fragment,{children:[d.jsxs("div",{className:yB,children:[d.jsx("div",{className:$y,children:d.jsx("h2",{className:ae(Uy,"truncate"),children:j})}),d.jsx(J_,{}),d.jsx("button",{type:"button",className:Iy,"aria-label":"Close",onClick:l,children:d.jsx(Rt.x,{size:14})})]}),d.jsx("div",{className:ae("min-h-0 flex-1 overflow-y-auto py-[clamp(16px,1.2vw,28px)]",V_),children:d.jsx(ef,{place:"panel",children:d.jsx(fB,{object:e,row:t,reveal:b,withRecordContext:!0,onField:_,host:{propertyId:c,instanceId:u,slotId:m,factPath:p,fields:g},fieldProps:v})})})]})}const xB=new Set(["image","video","tour","document"]);function wB(e){var t;return((t=e.source)==null?void 0:t.kind)==="row"}function NO(e){return xB.has(e.type)&&Hd(e).kind==="owned"}function kB(e,t){return jl(e).some(([a,r])=>NO(r)&&!wB(r)&&t.required.has(a))}function SB({slot:e,value:t,onChange:a,propertyId:r,instanceId:l,slotId:c,selection:u,onRecordAdded:m,onAdd:p,newRowStamp:g,fixed:b,orderable:v,add:k,choose:w,factPath:j,record:E,fields:_}){const[C,O]=x.useState(null),A=E!==void 0?{index:E.index,added:E.added===!0}:C,{ownedUpload:D}=Wt(),R=Pa(e),F=t,L=A===null?void 0:F[A.index]??{},T=R!==null&&_!==null&&kB(R,_),H=x.useRef({open:A,rows:F});x.useEffect(()=>{H.current={open:A,rows:F}});const ne=()=>{const M=H.current.rows,V=[(g==null?void 0:g())??{},...M],te={index:0,added:!0};H.current={open:te,rows:V},a(V,"add"),O(te)},Y=M=>{const{open:V,rows:te}=H.current;if(V===null)return;const me=te.map((Q,N)=>N===V.index?M:Q);H.current={open:V,rows:me},a(me,"edit")},le=()=>{if(E!==void 0){E.onClose();return}(A==null?void 0:A.added)===!0&&(m==null||m(A.index)),O(null)},K=(M,V)=>{const te=H.current.open;return!D||te===null?Promise.reject(new Error("list-table-view: no record is open")):D({slotId:c,itemIndex:te.index,field:M},V)},X=D&&A!==null?(M,V)=>NO(V)?{onUpload:te=>K(M,te)}:{}:void 0,ue=Wa(e.label).singular;return d.jsxs(d.Fragment,{children:[E===void 0&&d.jsx(uB,{declaration:e,value:t,onChange:(M,V)=>a(M,V),propertyId:r,instanceId:l,slotId:c,selection:u,...k!==void 0?{add:k}:{},...w!==void 0?{choose:w}:{},...b!==void 0?{fixed:b}:{},...v!==void 0?{orderable:v}:{},onOpenRecord:R?(M,V)=>O({index:M,added:!1,field:V}):void 0,onAdd:p!==void 0?p:T?ne:void 0,...g!==void 0?{newRowStamp:g}:{},factPath:j,fields:_}),R&&d.jsx(bB,{open:L!==void 0,object:R,row:L??{},fallbackTitle:(A==null?void 0:A.added)===!0?`New ${ue}`:`${Vg(ue)} ${((A==null?void 0:A.index)??0)+1}`,propertyId:r,instanceId:l,slotId:c,fieldProps:X,factPath:Bs(j,L),fields:_,revealFieldName:A==null?void 0:A.field,onChange:Y,onClose:le})]})}function EB(e){return e.map(xO).filter(t=>t!==null)}function _B({label:e,itemSlot:t,offer:a,verbs:r,fixed:l,instanceId:c,slotId:u,ownerSlotId:m=u,value:p,propertyId:g,commit:b,onUpload:v,factPath:k,size:w}){const j=Ha(t),E=x.useMemo(()=>EB(p),[p]),[_,C]=x.useState(!1),O=er({items:E,fixed:l,axis:"xy",commit:b}),{rows:A}=O,D=Zy(t,{propertyId:g,instanceId:c,slotId:m}),R=a.kind==="owned"?v??D??void 0:void 0,F=OB(R,j,O.add),{add:L,onAdd:T,choose:H}=My(r,a.kind==="picked"?()=>C(!0):null,R!==void 0?ib(j,F):null),ne=F.error;return d.jsxs(Cy,{engine:O,label:e,noun:"item",size:w,onAdd:T,add:L,choose:H,renderTile:(Y,le,K)=>d.jsx(AB,{value:Y.value,kinds:j,propertyId:g,holderPath:k,frame:{chrome:K,crop:null}}),children:[ne&&d.jsx("p",{className:xl,children:ne}),_&&a.kind==="picked"&&d.jsx(bc,{mode:"multi",propertyId:g,filter:a.filter,selectedIds:A.map(Y=>Y.value.file),onChange:Y=>O.replace(El(A,Y,le=>le.file,jB,O.mint)),onClose:()=>C(!1)})]})}function jB(e){return OU(e)??{file:e.file}}function OB(e,t,a){const[r,l]=x.useState(!1),[c,u]=x.useState(null);return{busy:r,error:c,take:p=>{if(!e||p.length===0)return;const g=p.filter(v=>!zk(t,ed(v)));u(g.length>0?`Only ${t.join(", ")} can be added here.`:null);const b=p.filter(v=>zk(t,ed(v)));b.length!==0&&(l(!0),(async()=>{try{for(const v of b){const k=ed(v),w=In(k),j=lf(k,w.fromUploaded(await e(v),w.cleared));j!==null&&a(j)}}catch(v){console.error("[editor] media upload failed",v),u("Upload failed. Try again.")}finally{l(!1)}})())}}}function zk(e,t){return t!==null&&e.includes(t)}function AB({value:e,kinds:t,propertyId:a,frame:r,holderPath:l}){const c=nb(e,t,a);return d.jsx(tb,{kind:c,value:NB(c,e),propertyId:a,frame:r,holderPath:l},c)}function NB(e,t){return vb()[e].coerce(t)}function MO({face:e,...t}){const{slot:a,instanceId:r,slotId:l,value:c,onChange:u,recordContext:m}=t,p=Vj(a,e),g=D9(a,r,l,u,m!=null),b=t.membership??Gj(a,void 0),v=Array.isArray(c)?c:[],k=uj({slotId:l,recordContext:m}),w=m?m.table??null:dc(a.source)!==null?t.boundRowTable??null:null,j=x.useMemo(()=>p.view==="gallery"?bq(a,w):null,[p.view,a,w]),E=b.kind==="follows",{itemContent:_}=p,C=e==="compact"?"compact":"large",O=tf(a,{table:w,membership:b});if(O===null)return null;switch(p.view){case"table":return d.jsx(CB,{slot:a,items:v,onChange:u,membership:b,verbs:O,entries:_.kind==="record"?_.entries:null,fixed:E,propertyId:t.propertyId,instanceId:r,slotId:l,factPath:t.factPath});case"annotated-gallery":{const A=_.kind==="record"?qO(_.entries):null;return A===null?null:d.jsx(RB,{list:a,label:a.label,face:e,annotated:A,listTable:w,membership:b,verbs:O,itemBaseline:t.itemBaseline,insideRecord:m!=null,fixed:E,instanceId:r,slotId:l,mediaSlotId:`${k}.${A.mediaKey}`,value:v,propertyId:t.propertyId,table:(m==null?void 0:m.table)??Kj(b),selectedItemIndex:t.selectedItemIndex,selectedFieldName:t.selectedFieldName,commit:g,onUpload:t.onUpload,factPath:t.factPath,size:C})}case"accordion":return _.kind!=="record"?null:d.jsx(hH,{slot:a,entries:_.entries,fixed:E,instanceId:r,slotId:l,value:c,commit:g,membership:b,verbs:O,rowTable:t.rowTable??Sk(a,b),selectedItemIndex:t.selectedItemIndex,selectedFieldName:t.selectedFieldName,itemBaseline:t.itemBaseline,insideRecord:m!=null,factPath:t.factPath});case"gallery":{if(_.kind!=="single"||!pl(_.slot.type))return null;if(j!==null)return d.jsx(TB,{label:a.label,member:j,verbs:O,fixed:E,instanceId:r,slotId:l,mediaSlotId:k,value:c,propertyId:t.propertyId,selectedItemIndex:t.selectedItemIndex,commit:g,onUpload:t.onUpload,size:C});const A=_.slot,D=_.slot.type,R=eR(a,A,w)??{kind:"owned"};if(D==="media")return d.jsx(_B,{label:a.label,itemSlot:A,offer:R,verbs:O,fixed:E,instanceId:r,slotId:l,ownerSlotId:k,value:v,propertyId:t.propertyId,commit:g,onUpload:t.onUpload,factPath:t.factPath,size:C});const F=D;return d.jsx(UU,{kind:F,label:a.label,itemSlot:A,offer:R,verbs:O,fixed:E,instanceId:r,slotId:l,ownerSlotId:k,value:v,propertyId:t.propertyId,commit:g,onUpload:t.onUpload,factPath:t.factPath,size:C},F)}case"media-manager":return null;case"poi-curation":return d.jsx(gI,{slot:a,fixed:E,value:c,propertyId:t.propertyId,commit:g});case"bullet-list":return _.kind!=="single"?null:d.jsx(_H,{slot:a,itemSlot:_.slot,add:O.add,fixed:E,value:c,commit:g,size:C});case"row-bar":{const A=Sk(a,b),D=_.kind==="single"?df(_.slot):MB,R=t.rowTable??(A.kind!=="none"?A:D);return d.jsx(JI,{slot:a,face:e,rowTable:b.kind==="follows"&&R.kind==="table"?{...R,inert:!0}:R,verbs:O,fixed:E,value:v,commit:g})}}}const MB={kind:"none"};function CB({slot:e,items:t,onChange:a,membership:r,verbs:l,entries:c,fixed:u,propertyId:m,instanceId:p,slotId:g,factPath:b}){const{TablePicker:v,TableCreate:k}=Wt(),w=zj(b),j=w!==void 0?w:CH(Pa(e)??{fields:{}}),[E,_]=x.useState(!1),[C,O]=x.useState(!1),A=r.kind==="pick-row"&&c!==null?lb(r):null,D=ob,R=t,F=x.useRef(R);x.useEffect(()=>{F.current=R});const L=v===void 0?null:()=>_(!0),T=A!==null&&L!==null&&l.choose!==null?{choose:l.choose,onChoose:L}:void 0,H=A===null?void 0:k===void 0?null:()=>O(!0),ne=r.kind==="table"?()=>({[D]:lj()}):void 0;return d.jsxs(d.Fragment,{children:[d.jsx(SB,{slot:e,value:t,onChange:Y=>a(Y),propertyId:m,instanceId:p,slotId:g,factPath:b,fields:j,fixed:u,...H!==void 0?{onAdd:H}:{},...ne!==void 0?{newRowStamp:ne}:{},add:l.add,...T!==void 0?{choose:T}:{}}),C&&A!==null&&c!==null&&k!==void 0&&d.jsx(k,{tables:A,onCreated:(Y,le)=>{if(O(!1),Od(F.current,c,D).includes(Y))return;const K=[mb(c,D,Y,le),...F.current];F.current=K,a(K)},onClose:()=>O(!1)}),E&&A!==null&&c!==null&&v!==void 0&&d.jsx(v,{open:!0,mode:"multi",tables:A,selectedIds:Od(R,c,D),onChange:(Y,le)=>{const K=AI(F.current,c,D,Y,le);F.current=K,a(K)},onClose:()=>_(!1)})]})}function RB({list:e,face:t,annotated:a,listTable:r,membership:l,itemBaseline:c,insideRecord:u,table:m,...p}){const g=Qj({instanceId:p.instanceId,slotId:p.slotId,membership:l,itemBaseline:c,insideRecord:u});return d.jsx(FO,{...p,annotated:a,offer:tR(e,a.mediaSlot,{itemTable:m,listTable:r,picksBy:l.kind==="pick-media"?l.filter:null}),markers:t==="compact"?g:null,table:m})}function TB({member:e,value:t,commit:a,...r}){const l=x.useMemo(()=>Array.isArray(t)?t.map(e.toItem):[],[t,e]),c=(u,m)=>a(u.map(p=>({key:p.key,value:e.toStored(p.value)})),m);return d.jsx(FO,{...r,annotated:e.annotated,offer:Hd(e.annotated.mediaSlot,null),markers:null,value:l,table:null,commit:c})}function DB(e){return d.jsx(MO,{face:"expanded",...e})}function LB(e){return d.jsx(MO,{face:"compact",...e})}const zB={model:{defaultValue:[],coerce:e=>Array.isArray(e)?e:[],isEmpty:e=>e.length===0,isInvalid:()=>!1},faces:{expanded:DB,compact:LB},applyOptimistic:null};function $B(e,t){return e.toLocaleString("en-US",{useGrouping:t.thousandsSep===!0,maximumFractionDigits:t.decimals===!0?20:0})}function UB(e,t){const a=String(e??"").replace(/[^\d.]/g,"");if(a==="")return"";const[r,l]=a.split("."),c=(r??"").replace(/\B(?=(\d{3})+(?!\d))/g,",");return l!=null?`${c}.${l}`:c}function IB(e,t){if(t<=0)return 0;let a=0;for(let r=0;r<e.length;r++)if(e[r]!==","&&a++,a===t)return r+1;return e.length}function $k(e,t,a){e.value=t,e.setSelectionRange(a,a)}function Uk(e,t){let a=e.replace(t!=null&&t.decimals?/[^\d.]/g:/[^\d]/g,"");if(t!=null&&t.decimals){const l=a.indexOf(".");l>=0&&(a=a.slice(0,l+1)+a.slice(l+1).replace(/\./g,""))}const r=a.replace(/[^\d]/g,"");return(t==null?void 0:t.maxDigits)!=null&&r.length>t.maxDigits?null:a}function HB({label:e,value:t,onChange:a,group:r,decimals:l,maxDigits:c,placeholder:u,onBlur:m,attention:p=null}){const g=k=>r?UB(k):k,b=g(t),v=nr();return d.jsx("div",{className:v.frame,children:d.jsx(Gr,{attention:p,children:d.jsx("input",{className:ae(v.inner,"[font-variant-numeric:tabular-nums]"),"aria-label":e,inputMode:l?"decimal":"numeric",value:b,placeholder:u??"0",onBlur:m,onChange:k=>{var A;const w=k.currentTarget,j=w.value,E=w.selectionStart??j.length,_=Uk(j,{decimals:l,maxDigits:c});if(_==null){const D=E-(j.length-b.length);$k(w,b,Math.min(Math.max(D,0),b.length));return}const C=g(_),O=((A=Uk(j.slice(0,E),{decimals:l}))==null?void 0:A.length)??0;$k(w,C,IB(C,O)),a(_)}})})})}function np(e){return e==null?"":String(e)}function tg(e){const t=e.trim();if(t==="")return null;const a=Number(t);return Number.isFinite(a)?a:null}const CO={defaultValue:null,coerce:e=>typeof e=="number"?e:tg(typeof e=="string"?e:""),isEmpty:e=>e===null,isInvalid:()=>!1};function Ik({slot:e,value:t,onChange:a,required:r=!1}){const[l,c]=x.useState(()=>np(t)),u=tg(l)===t?l:np(t);return d.jsx(HB,{attention:tr(CO,e,t,r),label:e.label,value:u,onChange:m=>{c(m);const p=tg(m);p!==t&&a(p)},onBlur:()=>c(np(t)),group:e.thousandsSep,decimals:e.decimals,maxDigits:e.maxDigits,placeholder:e.placeholder})}const BB={model:CO,faces:{expanded:Ik,compact:Ik},applyOptimistic:(e,t,a)=>qj(e,t==null?"":$B(t,a))},RO={model:{defaultValue:"",coerce:vc,isEmpty:e=>e.trim()==="",isInvalid:e=>!u5(e.trim())},normalize:e=>e.trim(),invalidMessage:()=>"Not a valid phone number",inputType:"tel",inputMode:"tel",autoComplete:"tel",placeholder:"(555) 555-0100"};function Hk(e){return d.jsx(ab,{kind:RO,...e})}const qB={model:RO.model,faces:{expanded:Hk,compact:Hk},applyOptimistic:null},FB="flex flex-col gap-2";function PB({slot:e,value:t,onChange:a,propertyId:r}){const{apiFetch:l}=Wt().api,[c,u]=x.useState(null),[m,p]=x.useState(null),g=x.useMemo(()=>t?[t]:[],[t]),{urls:b,dropUrl:v}=tO(r,g);async function k(w){if(u(null),(t==null?void 0:t.place_id)!==w.place_id){p(w);try{const j=await Xj(l,r,w.place_id);a(j)}catch{u("Couldn't add that place. Try again.")}finally{p(null)}}}return d.jsxs("div",{className:FB,children:[d.jsx(iO,{propertyId:r,placeholder:e.placeholder??"Search nearby…",addedIds:t?new Set([t.place_id]):new Set,onSelect:w=>void k(w)}),c&&d.jsx("span",{className:Wj,children:c}),m?d.jsxs("div",{className:ae(cb,Jj),"aria-live":"polite",children:[d.jsx("span",{className:ub,children:d.jsx("span",{className:eO})}),d.jsxs("div",{className:db,children:[d.jsx("span",{className:fb,children:m.name}),d.jsx("span",{className:hb,children:"Adding…"})]})]}):t?d.jsx(nO,{row:t,photoUrl:b[t.place_id],onPhotoError:()=>v(t.place_id),onRemove:()=>a(null)}):d.jsx("div",{className:V9,children:"No place yet. Search above to choose one."})]})}const VB={model:{defaultValue:null,coerce:sb,isEmpty:e=>e===null,isInvalid:()=>!1},faces:{compact:PB},applyOptimistic:null},GB=ae(vt,"group box-border flex flex-col items-start gap-2.5 rounded-[calc(12*var(--content))] border-[1.5px] p-4.5 text-left","transition-[background-color,border-color] duration-[120ms]","border-line bg-canvas hover:border-ink-4","aria-checked:border-honey-2 aria-checked:bg-honey-soft","data-[attention=required]:border-danger data-[attention=required]:bg-danger-soft","data-[attention=invalid]:border-danger data-[attention=invalid]:bg-danger-soft"),KB=ae("grid size-9.5 place-items-center rounded-[calc(10*var(--content))] bg-line-soft text-ink-2","transition-[background-color,color] duration-[120ms]","group-aria-checked:bg-honey group-aria-checked:text-honey-ink");function YB(e){return e.length>0&&e.every(t=>t.description!==void 0)}function QB({label:e,value:t,options:a,onChange:r,attention:l}){const c=_l();return d.jsx("div",{className:ae(Pr,"gap-1.5"),children:d.jsx("div",{className:"grid grid-cols-2 gap-2.5",role:"radiogroup","aria-label":e,children:a.map(u=>{const m=yO(u.icon)?u.icon:null;return d.jsxs("button",{type:"button",role:"radio","aria-checked":u.value===t,className:GB,...kl(l,c),onClick:()=>{u.value!==t&&r(u.value)},children:[m!==null&&d.jsx("span",{className:KB,children:d.jsx(li,{name:m,size:18,stroke:1.7})}),d.jsx("span",{className:"text-[length:calc(15.5*var(--content))] font-semibold text-ink",children:u.label}),d.jsx("span",{className:"text-caption leading-[1.4] text-ink-3",children:u.description})]},u.value)})})})}const TO={defaultValue:null,coerce:e=>typeof e=="string"?e:null,isEmpty:e=>e===null||e==="",isInvalid:()=>!1};function DO({cards:e,slot:t,value:a,onChange:r,required:l=!1}){const c=gO(t),u=t.creatable??!1,m=tr(TO,t,a,l);return e&&!u&&YB(c)?d.jsx(QB,{label:t.label,value:a,options:c,onChange:r,attention:m}):d.jsx(eg,{attention:m,label:t.label,value:a??"",options:c,creatable:u,placeholder:"Choose one",onChange:r})}function XB(e){return d.jsx(DO,{cards:!0,...e})}function ZB(e){return d.jsx(DO,{cards:!1,...e})}const WB={model:TO,faces:{expanded:XB,compact:ZB},applyOptimistic:null};function LO(){const e=window;return e.SpeechRecognition??e.webkitSpeechRecognition??null}function JB(){return x.useSyncExternalStore(()=>()=>{},()=>LO()!==null,()=>!1)}function eq({value:e,onChange:t,recording:a,onRecordingChange:r,onEnd:l}){const c=JB(),[u,m]=x.useState(0),p=x.useRef(null),g=x.useRef(""),b=x.useRef(""),v=x.useRef(t),k=x.useRef(l);x.useEffect(()=>{v.current=t,k.current=l},[t,l]),x.useEffect(()=>{if(!a)return;const E=setInterval(()=>m(_=>_+1),1e3);return()=>clearInterval(E)},[a]),x.useEffect(()=>()=>{var E;(E=p.current)==null||E.abort(),p.current=null},[]);const w=x.useCallback(()=>{const E=LO();if(!E||p.current)return;const _=new E;_.continuous=!0,_.interimResults=!0,_.lang=typeof navigator<"u"&&navigator.language||"en-US",g.current=e,b.current="",_.onresult=C=>{let O="",A="";for(let L=C.resultIndex;L<C.results.length;L++){const T=C.results[L];if(T===void 0)continue;const H=T[0].transcript;T.isFinal?O+=H:A+=H}O&&(b.current+=O);const D=b.current+A,R=g.current,F=!R||/\s$/.test(R)||/^\s/.test(D)?"":" ";v.current(R+F+D)},_.onerror=()=>{},_.onend=()=>{var C;p.current=null,r(!1),m(0),(C=k.current)==null||C.call(k)},p.current=_,m(0),r(!0);try{_.start()}catch{p.current=null,r(!1)}},[r,e]),j=x.useCallback(()=>{var E;(E=p.current)==null||E.stop()},[]);return{canDictate:c,seconds:u,start:w,stop:j}}function tq(e){return`${String(Math.floor(e/60)).padStart(2,"0")}:${String(Math.floor(e%60)).padStart(2,"0")}`}const nq={short:120,medium:240,long:2e3};function iq(e){return nq[e]}const zO={defaultValue:"",coerce:vc,isEmpty:e=>e.trim()==="",isInvalid:()=>!1};function $O(e){const t=e.slot.size??"short";return{size:t,cap:typeof e.slot.cap=="number"?e.slot.cap:iq(t)}}function UO({slot:e}){if(e.placeholder!==void 0||e.size!=="long")return e.placeholder;const t=typeof e.label=="string"?e.label.trim().toLowerCase():"";return t===""?"Start typing…":`Write the ${t} here…`}function IO({slot:e,value:t,required:a=!1}){return tr(zO,e,t,a)}const aq={medium:2,long:5};function HO(e){const{slot:t,value:a,onChange:r}=e,{size:l,cap:c}=$O(e),u=nr(),m={value:a,maxLength:c,placeholder:UO(e),"aria-label":t.label};return d.jsx("div",{className:u.frame,children:d.jsx(Gr,{attention:IO(e),count:{count:a.length,max:c,multiline:l!=="short"},children:l==="short"?d.jsx("input",{className:u.inner,...m,onChange:p=>r(p.target.value)}):d.jsx("textarea",{className:ae(u.inner,u.multiline),rows:u.inline?1:aq[l],...m,onChange:p=>r(p.target.value)})})})}function rq(e){return $O(e).size==="long"?d.jsx(oq,{...e,cap:typeof e.slot.cap=="number"?e.slot.cap:null}):d.jsx(HO,{...e})}function oq(e){const{slot:t,value:a,onChange:r,cap:l}=e,c=nr(),u=x.useRef(null),[m,p]=x.useState(!1),g=x.useCallback(()=>requestAnimationFrame(()=>{var w;return(w=u.current)==null?void 0:w.focus()}),[]),b=x.useCallback(w=>r(l===null?w:w.slice(0,l)),[r,l]),v=eq({value:a,onChange:b,recording:m,onRecordingChange:p,onEnd:g}),k=m?null:a.length>0?l===null?`${a.length.toLocaleString()} character${a.length===1?"":"s"}`:`${a.length.toLocaleString()} / ${l.toLocaleString()}`:v.canDictate?"Type, or tap the mic to dictate":"Type to fill this in";return d.jsx("div",{className:c.frame,children:d.jsxs(Gr,{attention:IO(e),className:"flex-col overflow-hidden",children:[d.jsx("textarea",{ref:u,className:ae(c.inner,"min-h-[calc(160*var(--content))] resize-none whitespace-pre-wrap pt-3.5 leading-[1.55]"),value:a,maxLength:l??void 0,placeholder:UO(e),"aria-label":t.label,onChange:w=>r(w.target.value)}),d.jsxs("div",{className:"flex items-center justify-between gap-3 py-2 pr-2.5 pl-3.5",children:[m?d.jsxs("span",{className:"inline-flex min-w-0 items-center gap-2.5 text-caption text-ink-2",role:"status",children:[d.jsx("span",{className:"size-2 shrink-0 animate-pulse rounded-full bg-danger","aria-hidden":"true"}),d.jsx("span",{className:"font-mono font-semibold text-ink [font-feature-settings:'tnum']",children:tq(v.seconds)}),"Listening…"]}):d.jsx("span",{className:ae(QL(a.length,l??void 0),"font-sans text-caption"),children:k}),v.canDictate&&d.jsx("button",{type:"button",className:ae(vt,"grid size-9 shrink-0 place-items-center rounded-full bg-ink text-canvas transition-[background-color,transform] duration-[120ms] hover:scale-[1.04] hover:bg-ink-2"),"aria-label":m?"Stop dictation":"Dictate with your voice",onClick:m?v.stop:v.start,children:m?d.jsx("span",{className:"block size-2.75 rounded-[2px] bg-white","aria-hidden":"true"}):d.jsx(G6,{size:16})})]})]})})}const lq={model:zO,faces:{expanded:rq,compact:HO},applyOptimistic:(e,t)=>qj(e,vc(t))};function sq(e){if(e===void 0)return"Not a valid URL";const t=Object.entries(Ya).find(([r])=>r===e);if(t)return`Needs a ${t[1].label} link`;const a=cq(e);return a.length>0?`Needs a ${e} link (${a.join(", ")})`:`Needs a ${e} link`}function cq(e){return Object.values(Ya).filter(t=>t.kind===e).map(t=>t.label)}function uq(e,t){const a=As(e);return a===""?!1:Eg(a)?t.accepts!==void 0&&!l5(t.accepts,a):!0}const BO={model:{defaultValue:"",coerce:vc,isEmpty:e=>As(e)==="",isInvalid:uq},normalize:As,invalidMessage:(e,t)=>Eg(As(e))?sq(t.accepts):"Not a valid URL",inputType:"text",inputMode:"url",autoComplete:"url",placeholder:"https://",adornment:e=>d.jsx(dq,{draft:e})};function dq({draft:e}){const t=As(e);return d.jsx("span",{className:ae(QE,"pr-2.75"),children:Eg(t)?d.jsx("a",{href:t,target:"_blank",rel:"noopener noreferrer",className:ae(vt,"flex items-center text-ink-4 hover:text-accent transition-colors duration-[120ms]"),"aria-label":"Open URL in new tab",children:d.jsx(Rt.external,{})}):d.jsx("span",{className:"flex items-center text-ink-4 opacity-30",children:d.jsx(Rt.external,{})})})}function Bk(e){return d.jsx(ab,{kind:BO,...e})}const fq={model:BO.model,faces:{expanded:Bk,compact:Bk},applyOptimistic:null};let qk=null;function hq(){return qk??(qk={text:lq,number:BB,select:WB,url:fq,email:T9,phone:qB,date:_9,image:_j,list:zB,poi:VB,video:Mj,tour:Oj,document:Bj,media:TH,address:p9}),qk}function mq(){return $I}function Ol(e){if(e==="row")return mq();const a=hq()[e];return a===void 0?null:a}function Md(e,t={}){const a=sf(e);if(a!==null){const l={...t,fields:a.fields};return e.locked!==!0&&Object.values(a.fields).some(c=>Md(c,l))}if(jI(e,t))return!1;const r=Ol(e.type);return r?r.isEditable?r.isEditable(e):e.locked!==!0:!1}function qO(e){const t=e.filter(([,r])=>PS(r)),a=t.find(([,r])=>pn(r.type));return a?{mediaKey:a[0],mediaSlot:a[1],fields:t.filter(([r])=>r!==a[0])}:null}const pq="flex flex-col gap-1.5",gq="flex flex-col";function FO({label:e,annotated:t,offer:a,verbs:r,markers:l,fixed:c,instanceId:u,slotId:m,mediaSlotId:p,value:g,propertyId:b,table:v,selectedItemIndex:k,selectedFieldName:w,commit:j,onUpload:E,factPath:_,size:C}){const{mediaKey:O,mediaSlot:A,fields:D}=t,R=p??`${m}.${O}`,F=A.type,L=In(F),T=Qg(A),H=x.useMemo(()=>[[O,A],...D],[O,A,D]),ne=x.useMemo(()=>g.map(ye=>ye!==null&&typeof ye=="object"?{...ye}:{}),[g]),Y=er({items:ne,...l?{identityOf:l.identityOf}:{},fixed:c,axis:"xy",commit:(ye,Re)=>{l==null||l.markOrder(ye),j(l?l.stamp(ye):ye,Re)}}),{rows:le}=Y,K=ye=>{var Re;return((Re=Ol(F))==null?void 0:Re.model.coerce(ye[O]))??L.cleared},X=(ye,Re)=>({...ye,[O]:Re}),ue=(ye,Re,ht)=>{const $e=le.find(Lt=>Lt.key===ye);$e&&(l==null||l.markFields($e,{[Re]:ht($e.value)}),Y.updateValue(ye,Lt=>({...Lt,[Re]:ht(Lt)})))},M=ye=>{for(const Re of ye)l==null||l.markRemoved(Re);Y.removeMany(ye.map(Re=>Re.key))},V=ye=>X(Io(H),ye),te=x.useMemo(()=>({get:ye=>F==="image"?K(ye):null,set:(ye,Re)=>X(ye,Re)}),[F,O]),me=w!==void 0&&w!==O,Q=Aj({engine:Y,lens:te,propertyId:b,instanceId:u,slotId:m,cropCfg:T}),N=fj(b,F),q=ye=>Cs(qs(Bs(_,ye),O),L.fileIdOf(K(ye))),I=x.useRef(null);x.useEffect(()=>{me&&I.current&&pO(I.current,w)},[me,w,k]);const[P,ee]=x.useState(!1),pe=Zy(A,{propertyId:b,instanceId:u,slotId:R}),se=E??pe??void 0,ke=a.kind==="owned"&&se!==void 0,z=Cj(se,ye=>Y.add(V(L.fromUploaded(ye,L.cleared)))),ce=ye=>{const Re=El(le,ye,$e=>L.fileIdOf(K($e)),$e=>V(L.fromPicked($e,L.cleared)),Y.mint),ht=new Set(Re.map($e=>$e.key));for(const $e of le)ht.has($e.key)||l==null||l.markRemoved($e);Y.replace(Re)},{add:ge,onAdd:Ee,choose:Ue}=My(r,a.kind==="picked"?()=>ee(!0):null,a.kind==="owned"&&ke?ib([F],z):null),Le=z.error;return d.jsxs(Cy,{engine:Y,label:e,noun:L.noun,size:C,onAdd:Ee,add:ge,choose:Ue,renderTile:(ye,Re,ht)=>d.jsx("div",{className:gq,"data-annotated-item":Re,children:d.jsx(tb,{kind:F,value:K(ye.value),propertyId:b,holderPath:qs(Bs(_,ye.value),O),frame:{chrome:ht,beneath:D.length>0&&d.jsx("div",{className:pq,ref:Re===k?I:void 0,[yb]:"",children:d.jsx(ef,{place:"cell",children:D.map(([$e,Lt])=>d.jsx("div",{[Ad]:$e,children:d.jsx(wc,{slot:Lt,instanceId:u,slotId:m,value:ye.value[$e],propertyId:b,onChange:st=>ue(ye.key,$e,()=>st),recordContext:{itemIndex:Re,fieldKey:$e,table:v}})},$e))})}),crop:F==="image"?{cfg:T,cut:Q.cutOf(ye),derivativeUrl:Q.derivativeOf(ye),cropping:N.recropping(q(ye.value)),storeKey:Q.keyOf(ye.key)}:null}})}),onRemove:M,tileActions:ye=>{const Re=q(ye.value),ht=[];return N.offers(Re)&&ht.push({label:"Crop",glyph:"crop",onSelect:()=>N.framing?Q.open(ye.key):N.recrop(Re,Q.keyOf(ye.key))}),ht},children:[Le&&d.jsx("p",{className:xl,children:Le}),P&&a.kind==="picked"&&d.jsx(bc,{mode:"multi",propertyId:b,filter:a.filter,selectedIds:le.map(ye=>L.fileIdOf(K(ye.value))),onChange:ce,onClose:()=>ee(!1)}),N.framing&&Q.modal(),N.modal]})}function yq(e){const a={...yl.pages,...Za.pages}[e];return a?a.declaration:null}function bq(e,t){const a=Yg(e,t);if(a===null)return null;const r=yq(a.table),l=r?Pa(r):null,c=l==null?void 0:l.fields[a.member],u=c?Pa(c):null;if(!u||!Pg(u.fields))return null;const m=qO(jl(u));if(m===null)return null;const{mediaKey:p,fields:g}=m,b=new Set(g.map(([v])=>v));return{annotated:m,toItem:v=>{const k=v!==null&&typeof v=="object"?v:{},w={};for(const[E,_]of Object.entries(k))b.has(E)||(w[E]=_);const j={[p]:w};for(const[E]of g)j[E]=k[E]??null;return j},toStored:v=>{const k=v[p],w=k!==null&&typeof k=="object"?{...k}:{};for(const[j]of g){const E=v[j];w[j]=typeof E=="string"&&E.trim()===""?null:E??null}return w}}}const vq=ae(vt,"flex w-full items-center rounded-none px-2.5 py-2 text-left text-body text-ink hover:bg-accent-soft data-[active=true]:bg-accent-soft");ae(vq,"text-accent");ae("absolute inset-0 grid place-items-center font-mono text-[12px] text-ink-3",YE);ae(vt,"we-no-drag grid size-5 place-items-center rounded-[4px] bg-white text-ink-2 shadow-[0_1px_2px_rgba(20,18,13,0.18)] transition-[background,color] duration-[120ms] hover:bg-[#f3f1ea] hover:text-ink");function ng(e,t){const a=e.variant;return!a||t==null?!0:a.cases.includes(t)}const Fk=new WeakMap;function ig(e,t){const a=e.element;if((a==null?void 0:a.fields)===void 0)return e;const r=Fk.get(e)??new Map;Fk.set(e,r);const l=r.get(t);if(l!==void 0)return l;const c=xq(a.fields,t),u=c===a.fields?e:{...e,element:{...a,fields:c}};return r.set(t,u),u}function xq(e,t){let a=!1;const r={};for(const[l,c]of Object.entries(e)){if(!ng(c,t)){a=!0;continue}const u=ig(c,t);u!==c&&(a=!0),r[l]=u}return a?r:e}function Pk(e,t,a,r,l=!1){return{kind:"object",key:e,header:t,Icon:hO(a.map(c=>c.slot)),fields:a,selectSlotId:r,lone:l}}function PO(e,t){const a=[];for(const r of e.slot_order){const l=e.slots[r];if(!ng(l,t)||!Md(l,{slots:e.slots}))continue;const c=sf(l);if(c!==null){const u={slots:e.slots,fields:c.fields},m=jl(c).filter(([,p])=>Md(p,u)&&ng(p,t)).map(([p,g])=>({slotId:rO(r,p),slot:ig(g,t)}));if(m.length===0)continue;a.push(Pk(r,dl(c,r),m,r));continue}a.push(Pk(r,{kind:"text",text:l.label},[{slotId:r,slot:ig(l,t)}],r,!0))}return a}function wq(e,t,a){if(e.header.kind==="text")return e.header.text;const r=sf(t.slots[e.key]);return r===null?e.key:cf(e.header,r,a(e.key))}function Vk(e){var t;return((t=xc(e.slotId))==null?void 0:t.field)??e.slotId}function Gk(e,t){return e.key===t||e.fields.some(a=>a.slotId===t)}function kq(e){return e.fields.map(t=>t.slotId)}function Sq(e){return e==null?!0:typeof e=="string"?e.trim()==="":Array.isArray(e)?e.length===0:typeof e=="object"?Object.keys(e).length===0:!1}function Eq(e,t,a){const r=[];for(const l of PO(e,t))for(const{slotId:c,slot:u}of l.fields)u.variant&&Sq(a(c))&&r.push(c);return r}function Cd(e,t){const a=Object.entries(Kg(e)).filter(([,l])=>Ng(l)==="address").map(([l])=>l);return t[e].map(l=>{const c={...l};for(const u of a)c[u]=xi(l[u]);return c})}function ag(e,t,a){const r=ZS(e,a);if(r.kind==="identity")return t.id??null;if(r.kind==="unknown")return null;const l=a.indexOf(".");if(l===-1)return t[a]??null;const c=a.slice(l+1);return Ld(c)?g5(t[a.slice(0,l)],c):null}function VO(e,t,a){return Cd(e,a).find(r=>r.id===t)}function _q(e,t,a,r){const l=VO(e,t,r);return l===void 0?null:ag(e,l,a)}function rg(e,t,a,r={},l){const c=KS(a);return jq(e,t,P3(a),c,r,l)}function jq(e,t,a,r,l,c){return(c===void 0?Cd(e,t):c.flatMap(m=>{const p=VO(e,m,t);return p===void 0?[]:[p]})).map(m=>{const p={id:m.id};for(const g of r)p[g]=m.id;for(const[g,b]of Object.entries(a))p[g]=ag(e,m,b);for(const[g,b]of Object.entries(l))p[g]=b(v=>ag(e,m,v),m.id);return p})}function Oq(e,t){if(fd(t))return W3(t,e);if(Y3(t))return e[t.slice(9)];const a=on(t);if(a!==null)return Cd(a,e);const r=B5(t);if(r!==null)return Cd(r.table,e).map(l=>l[r.member]??null)}function Aq(e,t,a,r){const l=on(e);return rd(l!==null?rg(l,t,a,r):Oq(t,e)??null)}function Nq(e,t,a,r,l){if(a.kind==="computed")return Object.hasOwn(r.computed,t)?r.computed[t]:void 0;const{facts:c}=r;if(c!==null){if(a.kind==="fact")return Aq(a.key,c,dd(e));if(a.kind==="member"){const u=l(a.holder);if(typeof u!="string"||u==="")return;const m=y4(c,a.tables,u);return m===null?void 0:_q(m,u,a.member,c)}}}function Mq(e,t,a,r){if(a.kind==="computed"){const c=Object.hasOwn(r.computed,t)?r.computed[t]:void 0;return Array.isArray(c)?c.filter(Cq):void 0}const{facts:l}=r;if(l!==null){if(a.kind==="fact")return a.table===null?void 0:rg(a.table,l,dd(e));if(a.kind==="rows")return a.tables.flatMap(c=>rg(c,l,dd(e)))}}function Cq(e){return e!==null&&typeof e=="object"&&!Array.isArray(e)}function Rq(){return d.jsxs("div",{className:"hp-rest-in flex min-h-0 flex-1 flex-col items-center justify-center px-8 pb-10 text-center",children:[d.jsx("span",{className:"text-ink-4","aria-hidden":"true",children:d.jsx(li,{name:"pencil",size:22,stroke:1.6})}),d.jsx("p",{className:"m-0 mt-3 text-body-lg font-medium text-ink-2",children:"Nothing selected"}),d.jsx("p",{className:"m-0 mt-1 max-w-[calc(220*var(--content))] text-body leading-[1.45] text-ink-4",children:"Click anything on the canvas to edit it"})]})}function Tq(e){const t=e.source;return t==null?void 0:t.kind}function Kk(e,t,a,r,l){const c=r.type;if(c==="row")return{kind:"row",tables:$s(r)};const u=dc(r.source);if(u!==null){const p=m4(e,t,u.slot);return(p==null?void 0:p.kind)==="row"?{kind:"member",holder:p.path,tables:$s(p.def),member:u.field}:null}if(c==="list"){const p=z9(l.fillSpec,a),g=Gj(r,p,l.sectionSlots),[b,...v]=g.kind==="table"?[]:rb(g);if(b!==void 0)return{kind:"rows",tables:[b,...v]}}if(f4(r)!==null)return{kind:"slot"};const m=Tq(r);if(m==="home"){const p=r.source.key;return typeof p=="string"&&p!==""?{kind:"fact",key:p,table:on(p)}:null}return m==="derived"?{kind:"computed"}:null}function Dq(e,t={}){const a=[];for(const[r,l]of Object.entries(e)){if(l.type==="object"){const u=l.fields??{},m={container:r,siblings:u};for(const[p,g]of Object.entries(u)){const b=rO(r,p),v=Kk(e,m,b,g,t);v!==null&&a.push([b,v])}continue}const c=Kk(e,{},r,l,t);c!==null&&a.push([r,c])}return a}function Lq(e){return e.kind==="member"||e.kind==="fact"||e.kind==="rows"}function GO(e,t){const a=e==null||e==="",r=t==null||t==="";return a||r?a&&r:e===t?!0:typeof e=="object"||typeof t=="object"?Qk(e)===Qk(t):Yk(e)===Yk(t)}function Yk(e){return typeof e=="string"?e:typeof e=="number"||typeof e=="boolean"||typeof e=="bigint"?String(e):JSON.stringify(e)??""}function Qk(e){const t=xi(e);if(t!==null){const{source:a,...r}=t;return JSON.stringify(r)}return JSON.stringify(e,(a,r)=>r!==null&&typeof r=="object"&&!Array.isArray(r)?Object.fromEntries(Object.entries(r).sort(([l],[c])=>l.localeCompare(c))):r)}const ip=2.5,zq=1;function Ku(e){return e?e.closest(".we-acc-head"):null}function _s(e){return e.closest(".we-acc")}function Xk(e,t){const a=e.offsetWidth,r=e.offsetHeight;!a||!r||(e.style.setProperty("--gx",((a+t*2)/a).toFixed(5)),e.style.setProperty("--gy",((r+t*2)/r).toFixed(5)))}function $q(e){e.style.removeProperty("--gx"),e.style.removeProperty("--gy")}function Uq(){x.useEffect(()=>{var g;if(typeof window>"u"||(g=window.matchMedia)!=null&&g.call(window,"(prefers-reduced-motion: reduce)").matches)return;let e=null,t=ip;const a=typeof ResizeObserver<"u"?new ResizeObserver(()=>{e&&Xk(e,t)}):null,r=(b,v)=>{b&&(e&&e!==b&&l(e),e=b,t=v,Xk(b,v),a==null||a.observe(b))},l=b=>{b&&(a==null||a.unobserve(b),$q(b),e===b&&(e=null))},c=b=>{const v=Ku(b.target);v&&r(_s(v),ip)},u=b=>{const v=Ku(b.target);if(!v)return;const k=b.relatedTarget;k&&v.contains(k)||l(_s(v))},m=b=>{const v=Ku(b.target);v&&r(_s(v),zq)},p=b=>{const v=Ku(b.target);v&&(v.matches(":hover")?r(_s(v),ip):l(_s(v)))};return document.addEventListener("pointerover",c),document.addEventListener("pointerout",u),document.addEventListener("pointerdown",m),document.addEventListener("pointerup",p),()=>{document.removeEventListener("pointerover",c),document.removeEventListener("pointerout",u),document.removeEventListener("pointerdown",m),document.removeEventListener("pointerup",p),a==null||a.disconnect()}},[])}const Zk=2;function Wk(e){const t=new URLSearchParams;for(const[r,l]of Object.entries(e))l!=null&&l!==""&&t.set(r,l);const a=t.toString();return a===""?"":`?${a}`}const kr={catalog:"api/catalog",render:"api/render",media:e=>`api/media${Wk({fixture:e})}`,capture:(e,t)=>`api/capture/${e}${Wk({fixture:t.fixture,format:t.format,page:t.page,canvas:t.canvas})}`,live:(e,t)=>`fixtures/${encodeURIComponent(e)}/live${t==="/"?"/":`${t}/`}`,hmr:"__hmr"},Iq={source:"source:changed",stylesheet:"stylesheet:changed",fixtures:"fixtures:changed"};async function Jk(e,t){const a=(await t.text().catch(()=>"")).trim();return new Error(a===""?`${e}: HTTP ${t.status}`:a)}function Hq(e,t=(a,r)=>fetch(a,r)){const a=l=>new URL(l,e).href,r=async l=>{const c=await t(a(l));if(!c.ok)throw await Jk(l,c);return await c.json()};return{base:e,async catalog(){const l=await r(kr.catalog);if(l.wire!==Zk)throw new Error(`This playground speaks wire ${Zk}, and its host answered with wire ${String(l.wire)}.`);return l},async render(l){const c=await t(a(kr.render),{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify(l)});if(!c.ok)throw await Jk(kr.render,c);return await c.json()},media:l=>r(kr.media(l)),captureHref:(l,c)=>a(kr.capture(l,c)),liveHref:(l,c)=>a(kr.live(l,c)),subscribe(l){let c;try{c=new EventSource(a(kr.hmr))}catch{return()=>{}}const u=Object.entries(l).map(([m,p])=>{const g=Iq[m],b=()=>p();return c.addEventListener(g,b),()=>c.removeEventListener(g,b)});return()=>{for(const m of u)m();c.close()}}}}let og=null;function Bq(e){og=e}function qq(){if(og===null)throw new Error("The playground's host is not installed yet.");return og}let KO=null;function Fq(e){KO=e}function Pq(){return KO}function e2(e,t){return`${e} ${t}${e===1?"":"s"}`}function Vq(e){const t=[e.listingIntent].filter(r=>r!==null).map(r=>r.replaceAll("_"," "));t.push(e2(e.units,"unit"),e2(e.photos,"photo"));const a=t.join(", ");return a.charAt(0).toUpperCase()+a.slice(1)}function Gq(e){return`${e.label} (${Vq(e.summary)})`}const Kq={sectionInstanceId:uf,slotId:j9,slotGroup:O9,slotItem:A9,slotField:N9,slotUnselectable:M9};function Yq(e,t){return`${e}${e.includes("?")?"&":"?"}v=${encodeURIComponent(t)}`}function Qq(e){return{basePath:e.basePath,stylesheets:e.stylesheets.map(t=>Yq(t,e.cssRev)),importMap:e.importMap,islandMap:e.islands,hostScriptSrc:e.hostScript}}function t2(e){const t=e.sectionSchemaByInstance??{};return{markers:Kq,assets:Qq(e),...e.pageBox===void 0?{}:{pageBox:e.pageBox},isSlotEditable:(a,r,l)=>{var u,m,p,g;const c=(u=t[a])==null?void 0:u.slots[r];return c===void 0||c.locked===!0?!1:l===void 0||((g=(p=c.fields??((m=c.element)==null?void 0:m.fields))==null?void 0:p[l])==null?void 0:g.locked)!==!0}}}const Xq=/^\/properties\/[^/]+\/poi\/search$/,Zq=/^\/properties\/[^/]+\/poi\/([^/]+)$/,lg=[{place_id:"pg-coffee",name:"Bluebird Coffee",address:"88 Market St",lat:40.798,lng:-73.972,distance_m:210,rating:4.6,review_count:312,type_label:"Coffee shop",price_level:"PRICE_LEVEL_INEXPENSIVE"},{place_id:"pg-park",name:"Riverside Park",address:"500 Riverside Dr",lat:40.8,lng:-73.97,distance_m:320,type_label:"Park"},{place_id:"pg-grocer",name:"Corner Grocery",address:"45 Vine Ave",lat:40.796,lng:-73.968,distance_m:480,rating:4.1,review_count:88,type_label:"Grocery store"},{place_id:"pg-school",name:"Lincoln Elementary School",address:"12 School St",lat:40.803,lng:-73.965,distance_m:640,type_label:"Elementary school"},{place_id:"pg-transit",name:"Metro Station — 5th & Main",address:null,lat:40.799,lng:-73.975,distance_m:750,type_label:"Transit station"},{place_id:"pg-gym",name:"Eastside Fitness",address:"300 Water St",lat:40.805,lng:-73.961,distance_m:1100,rating:3.9,review_count:174,type_label:"Gym",summary:"A neighborhood gym with a lap pool and early hours."}];function Wq(e){const t=typeof e=="object"&&e!==null?e.query:void 0,a=typeof t=="string"?t.trim().toLowerCase():"";return a?{results:lg.filter(r=>{var l;return r.name.toLowerCase().includes(a)||(((l=r.address)==null?void 0:l.toLowerCase().includes(a))??!1)})}:{results:lg}}let Jq=0;function eF(e,t={}){const a=(t.method??"GET").toUpperCase();if(a==="POST"&&Xq.test(e))return Promise.resolve(Wq(t.json));const r=a==="GET"?Zq.exec(e):null;if(r){const l=decodeURIComponent(r[1]),c=lg.find(u=>u.place_id===l);if(c)return Promise.resolve({...c,id:`pg-row-${++Jq}`})}return Promise.reject(new Error(`No API backend in the playground: ${t.method??"GET"} ${e}. This capability is served by the host application; supply a provider to use it here.`))}function tF(e,t,a){const r=Math.min(Math.max(Math.round(e.nx*t),0),Math.max(t-1,0)),l=Math.min(Math.max(Math.round(e.ny*a),0),Math.max(a-1,0)),c=Math.max(Math.min(Math.round(e.nw*t),t-r),1),u=Math.max(Math.min(Math.round(e.nh*a),a-l),1);return{sx:r,sy:l,sw:c,sh:u}}function nF(e,t){return new Promise((a,r)=>{const l=t.createElement("img");l.onload=()=>a(l),l.onerror=()=>r(new Error(`Could not load ${e} to crop it.`)),l.src=e})}async function iF(e,t,a=document){const r=await nF(e,a),{sx:l,sy:c,sw:u,sh:m}=tF(t,r.naturalWidth,r.naturalHeight),p=a.createElement("canvas");p.width=u,p.height=m;const g=p.getContext("2d");if(!g)throw new Error("No 2d canvas context; cannot crop.");g.drawImage(r,l,c,u,m,0,0,u,m);const b=await new Promise(v=>p.toBlob(v));if(!b)throw new Error("Canvas produced no blob; cannot crop.");return URL.createObjectURL(b)}const pf="2026-01-01T00:00:00.000Z",n2=new Map;function Sb(e){let t=n2.get(e);return t===void 0&&(t=qq().media(e).catch(()=>({items:[],contacts:[],lists:{}})),n2.set(e,t)),t}async function aF(e){const{items:t,lists:a}=await Sb(e);return N5(a,rF(t))}function rF(e){return[...sF(e),...cF(e),...uF(e),...dF(e)]}async function oF(e){return(await Sb(e)).contacts}async function lF(e,t){var c;const{items:a,contacts:r}=await Sb(e);return((c=a.find(u=>u.id===t))==null?void 0:c.src)||r.map(u=>u.images[t]).find(u=>u!==void 0)}function sF(e){return e.filter(t=>t.kind==="photo").map(t=>Wd({id:t.id,kind:"image",name:t.name,added_at:pf,file_url:t.src}))}function cF(e){return e.filter(t=>t.kind==="video").map(t=>{const a=t.provider!==void 0,r=t.src===""?{}:{poster:t.src},l=!a&&(t.ready??!0)?{encode:t.src}:{};return Wd({id:t.id,kind:"video",name:t.name,added_at:pf,duration_ms:t.durationMs??null,url:a?"":null,provider:t.provider??null,renditions:{...r,...l}})})}function uF(e){return e.filter(t=>t.kind==="tour").map(t=>Wd({id:t.id,kind:"tour",name:t.name,added_at:pf,url:t.url??"",provider:t.provider??null,renditions:t.src===""?{}:{poster:t.src}}))}function dF(e){return e.filter(t=>t.kind==="document").map(t=>Wd({id:t.id,kind:"document",name:t.name,added_at:pf,mime:t.mime??null,bytes:t.sizeBytes??null,renditions:t.src===""?{}:{poster:t.src}}))}function fF(e){return Promise.reject(new Error(`${e} is served by the host application and has no playground equivalent. A fixture's media is read-only.`))}function hF(e){return aF(e)}function mF(e,t,a){return fF("Pasting a link")}const pF=/^processed\/crops\/([^/]+)\/(-?[\d.e-]+)_(-?[\d.e-]+)_(-?[\d.e-]+)_(-?[\d.e-]+)$/,i2=new Map;function gF(e,t){const a=pF.exec(t);if(a===null)return Promise.reject(new Error(`Unknown crop ${t}.`));const[,r,l,c,u,m]=a,p={nx:Number(l),ny:Number(c),nw:Number(u),nh:Number(m)};let g=i2.get(t);return g||(g=lF(e,r).then(b=>{if(!b)throw new Error(`The fixture's property has no media ${r} to crop.`);return iF(b,p)}),i2.set(t,g)),g}async function yF(e,t,a){var p;const[r,l]=t.split(".");if(e.home!=="library"||r!=="contacts")throw new Error(`The fixture holds no owned media at '${t}'.`);const c=Pq(),m=(p=(c===null?[]:await oF(c)).find(g=>g.id===l))==null?void 0:p.images[a];if(m===void 0)throw new Error(`The fixture's contact ${l} has no image ${a}.`);return m}function gf(){return Promise.reject(new Error("Uploads are served by the host application. The dev media pack is read-only."))}function bF(e,t,a){return gf()}function vF(e,t,a){return gf()}function xF(e,t,a){return gf()}function wF(e,t,a){return gf()}const Eb="Uploading is served by the host application; the playground has no upload backend.";function kF(e,t,a,r){return Promise.reject(new Error(Eb))}function SF(e,t,a,r){return Promise.reject(new Error(Eb))}function EF(e,t,a){return Promise.reject(new Error(Eb))}const _F={postListUploadWithProgress:kF,postListLink:SF,withdrawListItem:EF,mediaFactsQuery:e=>({queryKey:["media-facts",e],queryFn:async()=>({facts:await hF(e)})})};function sg(e){return e===null||typeof e!="object"?JSON.stringify(e)??"undefined":Array.isArray(e)?`[${e.map(sg).join(",")}]`:`{${Object.keys(e).sort().map(t=>`${JSON.stringify(t)}:${sg(e[t])}`).join(",")}}`}function jF(e){return Array.isArray(e)?e.filter(t=>t!==null&&typeof t=="object"&&!Array.isArray(t)):[]}function OF(e,t,a){const r=new Map(t.map(l=>[l[a],l]));return jF(e).some(l=>{const c=r.get(l[a]);return c!==void 0&&Object.keys(c).some(u=>u in l&&!GO(l[u],c[u]))})}function AF(e,t,a,r,l,c){if(a.kind==="rows"){const m=Mq(e,t,a,l);return m!==void 0&&OF(r,m,ob)}const u=Nq(e,t,a,l,c);return u===void 0?!1:Vz(r)?Fs(r)!==Fs(u):!GO(r,u)}function NF(e,t,a){if(t===null)return[];const r={facts:t.facts,computed:t.computed},l=u=>nd(e.slots,u)??nd(t.resolvedProps.slots,u),c=[];for(const[u,m]of Dq(a.slots)){if(!Lq(m))continue;const p=nd(e.slots,u),g=Hg(a.slots,u);p===void 0||g===void 0||!AF(g,u,m,p,r,l)||c.push({id:`${u}:scalar::@${sg(p)}`,kind:"scalar",label:g.label,slotId:u})}return c}const MF={fact:"border-accent/40 text-accent",computed:"border-accent/40 text-accent",authored:"border-line text-ink-2",empty:"border-dashed border-line text-ink-4",edited:"border-honey-2 bg-honey/20 text-honey-ink"};function CF(e){return d.jsx("span",{className:"inline-flex flex-shrink-0 items-center gap-1","data-testid":"provenance-chips",children:e.chips.map(t=>d.jsx("span",{"data-testid":"provenance-chip","data-provenance":t.kind,"data-slots":t.slots.map(a=>a.id).join(" "),title:`${t.kind}: ${t.slots.map(a=>a.ref===null?a.id:`${a.id} ← ${a.ref}`).join(", ")}`,className:`pointer-events-auto inline-flex h-[18px] cursor-help items-center rounded-full border bg-canvas px-1.5 font-mono text-[10px] font-normal normal-case leading-none tracking-[0.02em] ${MF[t.kind]}`,children:t.kind},t.kind))})}function RF(e){return d.jsxs("div",{className:"relative",children:[e.children,d.jsx("div",{className:"pointer-events-none absolute right-10 top-[15px]",children:d.jsx(CF,{chips:e.chips})})]})}function TF(e,t){const a=!t,r=e.required&&!a;return{hidden:a,locked:r,title:r?"Required section — cannot hide":a?"Hidden from live page":"Visible on live page"}}function YO(e){const{variant:t}=e;return t===null||t.locked||t.cases.length<2?null:t.cases}function DF(e,t){return t||(e==null?void 0:e.kind)==="session"?{kind:"edited",ref:null}:e===void 0?{kind:"empty",ref:null}:e.kind==="fact"||e.kind==="computed"?{kind:e.kind,ref:e.ref}:{kind:e.kind,ref:null}}function LF(e,t,a){const r=new Map;for(const l of e){const{kind:c,ref:u}=DF(t==null?void 0:t[l],a(l));r.set(c,[...r.get(c)??[],{id:l,ref:u}])}return[...r].map(([l,c])=>({kind:l,slots:c}))}const a2="grid h-8 w-8 cursor-pointer place-items-center rounded-md border-0 p-0 transition-colors";function zF(e){const t=TF(e.display,e.enabled);return d.jsxs("header",{className:"flex min-h-[calc(56*var(--content))] flex-shrink-0 items-center justify-between gap-3 px-5 pb-2 pt-4","data-testid":"section-header",children:[d.jsx("div",{className:"flex min-w-0 flex-1 items-center",children:d.jsx("h2",{className:"m-0 truncate text-body-lg font-semibold tracking-[-0.005em] text-ink",children:e.label})}),d.jsxs("div",{className:"inline-flex flex-shrink-0 items-center gap-0.5",children:[d.jsx("button",{type:"button","data-testid":"section-eye","aria-pressed":t.hidden,"aria-label":t.title,onClick:()=>!t.locked&&e.onSetEnabled(t.hidden),disabled:t.locked,title:t.title,className:`${a2} disabled:cursor-not-allowed disabled:text-ink-4 disabled:opacity-100 ${t.hidden?"bg-[rgba(20,18,13,0.06)] text-ink [box-shadow:inset_0_0_0_1px_var(--color-line)]":"bg-transparent text-ink-2 hover:bg-[rgba(20,18,13,0.06)] hover:text-ink disabled:hover:bg-transparent disabled:hover:text-ink-4"}`,children:d.jsx(li,{name:t.hidden?"eyeOff":"eye",size:15,stroke:1.8})}),YO(e.display)?d.jsx("button",{type:"button","data-testid":"section-gear",onClick:e.onOpenSettings,title:"Section settings","aria-label":"Section settings",className:`${a2} bg-transparent text-ink-2 hover:bg-[rgba(20,18,13,0.06)] hover:text-ink`,children:d.jsx(li,{name:"settings",size:15,stroke:1.8})}):null]})]})}const $F=ae("group/case flex cursor-pointer items-center gap-2.5 rounded border border-line bg-canvas px-3 py-2.5","transition-[border-color,background-color] hover:border-[var(--color-ink-4)]","has-[:focus-visible]:border-accent","data-[selected=true]:border-accent data-[selected=true]:bg-accent-soft");function UF(e){const t=YO(e.display),a=Eq(e.sectionSchema,e.variant,e.slotValue).length;return d.jsxs(d.Fragment,{children:[d.jsx("header",{className:"flex min-h-[calc(56*var(--content))] flex-shrink-0 items-center justify-between gap-3 px-5 pb-2 pt-4",children:d.jsxs("nav",{className:"inline-flex min-w-0 items-center gap-1.5 text-body-lg tracking-[-0.005em]","aria-label":"Breadcrumbs",children:[d.jsx("button",{type:"button","data-testid":"settings-back",onClick:e.onBack,className:"max-w-[calc(220*var(--content))] cursor-pointer truncate border-0 bg-transparent p-0 font-medium text-ink-3 hover:bg-transparent transition-colors hover:text-ink hover:underline hover:underline-offset-[3px]",children:e.label}),d.jsx("span",{className:"inline-grid place-items-center leading-none text-ink-4","aria-hidden":"true",children:d.jsx(li,{name:"chevRight",size:12,stroke:1.8})}),d.jsx("span",{className:"max-w-[calc(220*var(--content))] truncate font-semibold text-ink",children:"Settings"})]})}),d.jsx("div",{className:"hp-sb-scroll min-h-0 flex-1 overflow-y-auto px-4 pb-6 pt-2","data-testid":"section-settings",children:t?d.jsxs("section",{"aria-label":"Variation",className:"flex flex-col gap-2.5",children:[d.jsx("h3",{className:"px-1 text-[length:calc(11.5*var(--content))] font-medium uppercase tracking-[0.04em] text-ink-3",children:"Variation"}),d.jsx("div",{className:"flex flex-col gap-2",children:t.map(r=>d.jsxs("label",{"data-selected":r.value===e.variant,className:$F,children:[d.jsx("input",{type:"radio",className:"sr-only",name:`variation-${e.instanceId}`,value:r.value,checked:r.value===e.variant,onChange:()=>e.onSetVariant(r.value)}),d.jsx("span",{"aria-hidden":"true",className:"grid size-4 flex-shrink-0 place-items-center rounded-full border-[1.5px] border-ink-4 transition-colors group-data-[selected=true]/case:border-accent",children:d.jsx("span",{className:"size-2 rounded-full bg-accent opacity-0 transition-opacity group-data-[selected=true]/case:opacity-100"})}),d.jsx("span",{className:"min-w-0 flex-1 truncate text-[length:calc(13.5*var(--content))] font-medium text-ink",children:r.label})]},r.value))}),a>0?d.jsx("p",{"aria-live":"polite",className:"rounded border border-line bg-accent-soft px-3 py-2 text-[length:calc(12.5*var(--content))] leading-[1.45] text-ink-2",children:a===1?"1 empty field in this variation":`${a} empty fields in this variation`}):null]}):d.jsx("p",{className:"px-1 py-3 text-[length:calc(12.5*var(--content))] text-ink-3",children:"Nothing to configure in this section."})})]})}function IF(){return typeof window<"u"&&typeof window.matchMedia=="function"&&window.matchMedia("(prefers-reduced-motion: reduce)").matches}function r2(e){return d.jsx("svg",{viewBox:"0 0 14 14",width:"13",height:"13",fill:"none",stroke:"currentColor",strokeWidth:"1.7",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...e,children:d.jsx("path",{d:"M2.5 7h9M8 3.5 11.5 7 8 10.5"})})}function HF(e){return d.jsx("svg",{viewBox:"0 0 16 16",width:"15",height:"15",fill:"none",stroke:"currentColor",strokeWidth:"2.2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...e,children:d.jsx("path",{d:"M3.5 8.5l3 3 6-6.5"})})}function o2(e){return d.jsx("svg",{viewBox:"0 0 14 14",width:"13",height:"13",fill:"none",stroke:"currentColor",strokeWidth:"1.7",strokeLinecap:"round","aria-hidden":"true",...e,children:d.jsx("path",{d:"M3.5 3.5l7 7M10.5 3.5l-7 7"})})}function BF({items:e,onApply:t}){const a=e??[],r=a.length,l=a.map(ne=>ne.id).join("|"),[c,u]=x.useState(!1),[m,p]=x.useState("idle"),[g,b]=x.useState(!1),[v,k]=x.useState(0),w=x.useRef(null),j=x.useRef(null),E=x.useRef(null),_=x.useRef(null),C=x.useRef(a),O=x.useRef(!0);x.useLayoutEffect(()=>{C.current=a});const A=x.useRef(IF()).current,D=x.useCallback(ne=>{const Y=w.current;if(A||document.hidden||Y==null||typeof Y.animate!="function"){b(!1),u(!1),p("idle"),ne==null||ne();return}b(!0);const le=Y.animate([{opacity:1,transform:"none"},{opacity:0,transform:"translateY(6px)"}],{duration:240,easing:"cubic-bezier(.4,0,.2,1)",fill:"forwards"});le.onfinish=()=>{b(!1),u(!1),p("idle"),ne==null||ne()}},[A]);x.useEffect(()=>(j.current!=null&&clearTimeout(j.current),r>0&&m==="idle"?l!==_.current&&!c&&(j.current=setTimeout(()=>{u(!0)},550)):r===0&&c&&!g&&m==="idle"&&D(),()=>{j.current!=null&&clearTimeout(j.current)}),[r,l,c,m,g,D]),x.useLayoutEffect(()=>{if(!c||m!=="idle"||A||g)return;const ne=w.current;ne!=null&&typeof ne.animate=="function"&&!document.hidden&&ne.animate([{opacity:.45,transform:"translateY(10px)"},{opacity:1,transform:"none"}],{duration:420,easing:"cubic-bezier(.18,.82,.25,1)"})},[c,m,A,g]),x.useEffect(()=>{if(m!=="applying")return;const ne=Y=>{Y.preventDefault(),Y.returnValue=""};return window.addEventListener("beforeunload",ne),()=>window.removeEventListener("beforeunload",ne)},[m]),x.useEffect(()=>(O.current=!0,()=>{O.current=!1,j.current!=null&&clearTimeout(j.current),E.current!=null&&clearTimeout(E.current)}),[]);const R=()=>{const ne=C.current;k(ne.length),p("applying"),(async()=>{try{if(await t(ne),!O.current)return;u(!1),p("success"),E.current!=null&&clearTimeout(E.current),E.current=setTimeout(()=>{D(()=>{_.current=null})},1200)}catch{if(!O.current)return;p("error")}})()},F=()=>{_.current=l,D()};if(!c&&m!=="success"&&!g)return null;const L=m==="applying",T=L?v:r,H=T===1?d.jsxs(d.Fragment,{children:[d.jsx("b",{className:"font-bold text-ink",children:"1"})," change to your property details"]}):d.jsxs(d.Fragment,{children:[d.jsx("b",{className:"font-bold text-ink",children:T})," changes to your property details"]});return d.jsx("div",{className:"pointer-events-none absolute bottom-[10px] left-0 right-0 z-[6]","aria-live":"polite",children:d.jsx("div",{className:"pointer-events-none",ref:w,children:d.jsx("div",{className:"pointer-events-auto relative mx-3 rounded-[calc(11*var(--content))] border border-line bg-canvas px-[calc(13*var(--content))] pb-[calc(12*var(--content))] pt-[calc(11*var(--content))] shadow-[0_8px_22px_-8px_rgba(20,18,13,.26),0_2px_6px_rgba(20,18,13,.08)] data-[done]:border-[#cfe6d4] data-[done]:bg-[#eef6ef]","data-done":m==="success"?"":void 0,children:m==="success"?d.jsxs("div",{className:"flex items-center gap-2 text-body font-semibold text-good",children:[d.jsx("span",{className:"grid flex-shrink-0 place-items-center [animation:we-ub-pop_.34s_cubic-bezier(.2,1.3,.4,1)_both]",children:d.jsx(HF,{})}),"Updated everywhere"]}):m==="error"?d.jsxs(d.Fragment,{children:[d.jsxs("div",{className:"flex items-start gap-[calc(9*var(--content))]",children:[d.jsxs("div",{className:"min-w-0 flex-1 text-body leading-[1.4]",children:[d.jsx("div",{className:"font-semibold text-danger",children:"Couldn't update"}),d.jsx("div",{className:"mt-0.5 text-[length:calc(11.5*var(--content))] text-ink-3",children:"Something went wrong. Please try again."})]}),d.jsx("button",{type:"button",className:"-mr-0.5 -mt-0.5 grid h-[calc(20*var(--content))] w-[calc(20*var(--content))] flex-shrink-0 cursor-pointer place-items-center rounded-[calc(5*var(--content))] text-ink-4 transition-[background-color,color] duration-[120ms] hover:bg-[rgba(20,18,13,.06)] hover:text-ink-2",onClick:F,"aria-label":"Dismiss",children:d.jsx(o2,{})})]}),d.jsxs("button",{type:"button","data-action":"retry",className:"mt-[calc(10*var(--content))] box-border inline-flex h-[calc(34*var(--content))] w-full cursor-pointer items-center justify-center gap-[calc(6*var(--content))] rounded-[calc(8*var(--content))] bg-accent text-[length:calc(12.5*var(--content))] font-semibold text-white transition-[background-color,transform] duration-[120ms] hover:bg-[#143a2f] active:translate-y-[0.5px]",onClick:R,children:["Retry ",d.jsx(r2,{})]})]}):d.jsxs(d.Fragment,{children:[d.jsxs("div",{className:"flex items-start gap-[calc(9*var(--content))]",children:[d.jsxs("div",{className:"min-w-0 flex-1 text-body leading-[1.4] text-ink-2",children:[H,d.jsx("div",{className:"mt-0.5 text-[length:calc(11.5*var(--content))] text-ink-3",children:"Update them everywhere these details are used."})]}),d.jsx("button",{type:"button",className:"-mr-0.5 -mt-0.5 grid h-[calc(20*var(--content))] w-[calc(20*var(--content))] flex-shrink-0 cursor-pointer place-items-center rounded-[calc(5*var(--content))] text-ink-4 transition-[background-color,color] duration-[120ms] hover:bg-[rgba(20,18,13,.06)] hover:text-ink-2 disabled:cursor-default disabled:opacity-50",onClick:F,disabled:L,"aria-label":"Dismiss",children:d.jsx(o2,{})})]}),d.jsx("button",{type:"button","data-action":"apply",disabled:L,className:"mt-[calc(10*var(--content))] box-border inline-flex h-[calc(34*var(--content))] w-full cursor-pointer items-center justify-center gap-[calc(6*var(--content))] rounded-[calc(8*var(--content))] bg-accent text-[length:calc(12.5*var(--content))] font-semibold text-white transition-[background-color,transform] duration-[120ms] hover:bg-[#143a2f] active:translate-y-[0.5px] disabled:cursor-default disabled:hover:bg-accent disabled:active:translate-y-0",onClick:R,children:L?d.jsxs(d.Fragment,{children:[d.jsx("span",{className:"inline-block size-[calc(14*var(--content))] animate-spin rounded-full border-2 border-white/40 border-t-white",role:"status","aria-label":"Updating"}),"Updating…"]}):d.jsxs(d.Fragment,{children:["Update everywhere ",d.jsx(r2,{})]})})]})})})})}const qF="Real editor chrome. The playground has no linked sources, so this cannot update anything — the flow above is a preview.",FF="Nothing was updated. In the app this writes the change to every deliverable sharing the linked source.";function PF({items:e}){const[t,a]=x.useState([]),r=e.filter(u=>!t.includes(u.id)),l=t.length>0&&r.length===0,c=x.useCallback(u=>{a(m=>[...m,...u.map(p=>p.id)])},[]);return d.jsxs("div",{className:"instance-panel__we",children:[d.jsx("div",{className:"instance-panel__we-anchor",children:d.jsx(BF,{items:r,onApply:c})}),r.length>0||l?d.jsx("p",{className:"instance-panel__we-caption","data-testid":"we-caption","data-phase":l?"applied":"preview",children:l?FF:qF}):null]})}const VF={apiFetch:eF,getCropDerivativeUrl:gF,postLink:mF,stageOwnedMedia:bF,ownedMediaUrl:yF,discardStagedMedia:vF,uploadContentMedia:xF,contentMediaUrl:wF};function GF(e,t,a){return x.useMemo(()=>{const r={session:{property_id:e,listing_intent:null},select:l=>{if(l===null){a(null);return}if(l.kind==="section"){a({kind:"section",instanceId:l.instance_id});return}a({kind:"slot",instanceId:l.instance_id,slotId:l.slot_id,...l.item_index!==void 0?{itemIndex:l.item_index}:{}})},markSlotOverridden:()=>{},relinkSlot:()=>{}};return{useEditorStore:l=>l(r),capabilities:{},api:VF,MediaPicker:KF}},[e,t,a])}function KF(e){return d.jsx(I7,{...e,capabilities:{upload:!1,manage:!1}})}function YF(e,t){const{selection:a}=e;if((a==null?void 0:a.kind)==="slot"&&!(a.instanceId!==e.instanceId||a.slotId!==t))return a.itemIndex}function QF(e,t){var a;return LF(t,(a=e.payload)==null?void 0:a.provenance,r=>e.override.slots[r]!==void 0)}function Ts(e,t){var l;const a=xc(t);if(a!==null)return nd({[a.object]:Ts(e,a.object)},t);const r=e.override.slots[t];return r!==void 0?r:(l=e.payload)==null?void 0:l.resolvedProps.slots[t]}function XF(e,t,a){const r=xc(t);if(r===null)return e.onApplySlot(t,a);const l=kI({[r.object]:Ts(e,r.object)},t,a)[r.object];e.onApplySlot(r.object,l)}function ZF(e){var m;const t=GF(e.fixture,e.selection,e.onSelect);Uq();const a=x.useMemo(()=>new PT,[]),r=e.displayState.variant,l=x.useMemo(()=>PO(e.sectionSchema,r),[e.sectionSchema,r]),c=x.useMemo(()=>NF(e.override,e.payload,e.sectionSchema),[e.override,e.payload,e.sectionSchema]),u=((m=e.selection)==null?void 0:m.kind)==="slot"&&e.selection.instanceId===e.instanceId?e.selection.slotId:null;return d.jsxs("aside",{className:"instance-panel","data-testid":"instance-panel","data-instance-id":e.instanceId,children:[e.settingsOpen?d.jsx(UF,{instanceId:e.instanceId,label:e.label,display:e.display,sectionSchema:e.sectionSchema,variant:r,slotValue:p=>Ts(e,p),onSetVariant:e.onSetVariant,onBack:e.onCloseSettings}):d.jsx(zF,{label:e.label,display:e.display,enabled:e.displayState.enabled,onSetEnabled:e.onSetEnabled,onOpenSettings:e.onOpenSettings}),e.settingsOpen?null:e.renderError?d.jsx("p",{className:"instance-panel__error","data-testid":"render-error",children:e.renderError}):null,e.settingsOpen?null:e.payload===null?d.jsx("p",{className:"instance-panel__empty","data-testid":"panel-loading",children:"Loading…"}):d.jsx(VT,{client:a,children:d.jsx(b8,{api:_F,children:d.jsx(WL,{ports:t,children:d.jsx(ef,{place:"panel",children:d.jsxs("div",{className:"instance-panel__dock",children:[d.jsxs("div",{className:"hp-sb-scroll instance-panel__cards","data-testid":"slot-cards","data-dirty":c.length>0?"":void 0,children:[l.map(p=>d.jsx(RF,{chips:QF(e,kq(p)),children:d.jsx(mO,{open:u!=null&&Gk(p,u),onToggle:()=>u!=null&&Gk(p,u)?e.onSelect({kind:"section",instanceId:e.instanceId}):e.onSelect({kind:"slot",instanceId:e.instanceId,slotId:p.selectSlotId}),icon:p.Icon?d.jsx(p.Icon,{size:14}):null,title:wq(p,e.sectionSchema,g=>Ts(e,g)),scrollKey:p.key,children:d.jsx(bb,{fields:p.fields.map(g=>[Vk(g),g.slot]),lone:p.lone,renderField:(g,b)=>{const v=p.fields.find(k=>Vk(k)===g).slotId;return d.jsx(wc,{slot:b,instanceId:e.instanceId,slotId:v,value:Ts(e,v),propertyId:e.fixture,onChange:k=>XF(e,v,k),selectedItemIndex:YF(e,v)})}})})},p.key)),l.length===0?d.jsx("p",{className:"instance-panel__empty","data-testid":"no-editable-slots",children:"Nothing to edit in this section."}):null]}),d.jsx(PF,{items:c})]})})})})})]})}function WF(e,t){return e.find(a=>a.pages.includes(t))??null}function JF(e,t,a,r){const l=t.endsWith("/")?t:`${t}/`;if(!e.startsWith(l))return null;const c=e.indexOf("#"),u=c===-1?null:e.slice(c+1),m=(c===-1?e:e.slice(0,c)).slice(l.length).split("/").filter(Boolean),[p,g,b,v,...k]=m;if(p!=="fixtures"||g===void 0||b!=="live"||k.length>0)return null;const w=v===void 0?"/":`/${decodeURIComponent(v)}`,j=a.find(_=>_.path===w);if(!j)return null;const E=WF(r,j.id);return E?{pageId:j.id,canvasId:E.id,anchor:u||null}:null}const ap="box-border inline-flex h-10 w-full items-center justify-center gap-1.75 rounded-lg border text-center text-[length:calc(13.5*var(--content))] font-semibold tracking-[-0.005em]",eP="group cursor-pointer border-line bg-canvas text-ink transition-[background-color,border-color,box-shadow,color,transform] hover:border-[var(--color-ink-4)] hover:bg-[#fafaf8] active:translate-y-[0.5px]",tP="cursor-pointer border-honey-2 bg-honey text-honey-ink transition-[background-color,border-color,box-shadow,color,transform] hover:bg-honey-2 hover:shadow-[0_2px_6px_rgba(40,44,50,0.12)] active:translate-y-[0.5px]",nP="cursor-not-allowed border-line bg-[#f3f1ea] text-ink-4";function iP({host:e,templateName:t,fixture:a,output:r,format:l,canvas:c,pagePath:u}){const m=r==="website"?{href:e.liveHref(a,u??"/"),title:`Open this page as it would publish — ${t}`}:null,p=r==="image"?{href:e.captureHref("bundle",{fixture:a,format:l,canvas:c}),title:`Download every page of this canvas as a zip — ${t}`}:r==="document"?{href:e.captureHref("print",{fixture:a,format:l}),title:`Download the PDF — ${t}`}:null;return d.jsx("footer",{className:"flex-shrink-0 border-t border-line-soft bg-canvas p-3","data-testid":"panel-footer",children:d.jsxs("div",{className:p&&!m?"w-full":"grid w-full grid-cols-2 gap-2",children:[m?d.jsxs("a",{href:m.href,target:"_blank",rel:"noopener noreferrer","data-testid":"view-live",title:m.title,className:`${ap} ${eP}`,children:[d.jsx("span",{className:"grid place-items-center text-ink-3 transition-colors group-hover:text-ink",children:d.jsx(li,{name:"external",size:12,stroke:1.6})}),d.jsx("span",{"data-testid":"view-live-label",children:"View live"})]}):null,p?d.jsxs("a",{href:p.href,"data-testid":"download",title:p.title,className:`${ap} ${tP}`,children:[d.jsx(IE,{size:14,className:"h-[calc(14*var(--content))] w-[calc(14*var(--content))]"}),d.jsx("span",{"data-testid":"download-label",children:"Download"})]}):d.jsx("button",{type:"button",disabled:!0,"data-testid":"publish",title:"Publishing needs a property and a deliverable — preview publish states in the application",className:`${ap} ${nP}`,children:d.jsx("span",{children:"Publish"})})]})})}function aP(e,t,a,r){const l=e.ownerDocument,c=[],u=new Map;for(const m of Array.from(e.children)){const p=m,g=p.getAttribute(uf);g&&u.set(g,p)}for(const m of t){const p=u.get(m.instance_id),g=(p==null?void 0:p.dataset.svId)!==m.section_version_id;p&&g&&(r==null||r(p),p.remove());const b=p&&!g,v=b?p:a(m,l);b||c.push(v),e.appendChild(v),u.delete(m.instance_id)}return u.forEach(m=>{r==null||r(m),m.remove()}),c}function QO(e){return e==null?void 0:e.__trCanvasIslands}function rP(e,t,a,r){const l=e==null?void 0:e.querySelector(`[${uf}="${a}"]`);if(!l)return!1;const c=l.querySelector(":scope > .we-section-body")??l,u=QO(t);return u==null||u.unmountRoot(l),c.innerHTML=r,u==null||u.hydrateRoot(l),!0}function oP(){return{slots:{}}}function Ks(e,t,a){var r;return((r=e[t])==null?void 0:r[a])??oP()}function _b(e,t,a,r){return{...e,[t]:{...e[t],[a]:r}}}function lP(e,t,a,r,l){const c=Ks(e,t,a);return _b(e,t,a,{...c,slots:{...c.slots,[r]:l}})}function sP(e,t,a,r){return _b(e,t,a,{...Ks(e,t,a),enabled:r})}function cP(e,t,a,r){return _b(e,t,a,{...Ks(e,t,a),variant:r})}function uP(e,t){const a=e.enabled??(t==null?void 0:t.enabled)??!0,r=e.variant??(t==null?void 0:t.variant);return r===void 0?{enabled:a}:{enabled:a,variant:r}}function dP(e,t){const a={};for(const[r,l]of Object.entries(e[t]??{}))Object.keys(l.slots).length>0&&(a[r]={slots:l.slots});return a}function fP(e,t){const a={};for(const[r,l]of Object.entries(e[t]??{}))l.enabled===void 0&&l.variant===void 0||(a[r]={...l.enabled===void 0?{}:{enabled:l.enabled},...l.variant===void 0?{}:{variant:l.variant}});return a}function hP(e,t){return Object.keys(e).filter(a=>t[a]!==e[a])}function mP(e,t){if(!t.some(r=>r in e))return e;const a={...e};for(const r of t)delete a[r];return a}function l2(e,t,a,r){return{...e,[t]:{...e[t],[a]:r}}}function pP(e,t,a){const r=e[t];if(!r||!(a in r))return e;const l={...r};return delete l[a],{...e,[t]:l}}function gP(e){const{host:t,fixture:a,doc:r,resolvedDisplay:l,sessions:c,pages:u,frameFor:m}=e,{edits:p,setEdits:g}=c,[b,v]=x.useState({}),[k,w]=x.useState({}),j=[a,r??"",...u.map(Q=>Q.id)].join("\0"),[E,_]=x.useState(j);E!==j&&(_(j),v({}),w({}));const C=x.useRef(b);C.current=b;const O=x.useRef(m);O.current=m;const A=x.useRef(u);A.current=u;const D=x.useRef(p);D.current=p;const R=x.useRef(a);R.current=a;const F=x.useRef(r);F.current=r;const L=x.useRef(new Map),T=x.useCallback(Q=>Ks(p,a,Q),[p,a]),H=x.useCallback((Q,N)=>{var q;return((q=k[Q])==null?void 0:q[N])??null},[k]),ne=x.useCallback(Q=>{var N;for(const q of u){const I=(N=k[q.id])==null?void 0:N[Q];if(I!==void 0)return I}return null},[k,u]),Y=x.useCallback(Q=>{var N;for(const q of u){const I=(N=b[q.id])==null?void 0:N[Q];if(I)return I}return null},[b,u]),le=x.useCallback(Q=>{var N;return uP(Ks(p,a,Q),((N=Y(Q))==null?void 0:N.display)??(l==null?void 0:l[Q]))},[p,a,Y,l]),K=x.useCallback(async(Q,N,q)=>{var z;const I=Q.id,P=R.current,ee=F.current,pe=`${I}\0${N}`,se=(L.current.get(pe)??0)+1;L.current.set(pe,se);const ke=()=>P!==R.current||ee!==F.current||L.current.get(pe)!==se;try{const ce=await t.render({page:I,instance:N,fixture:P,session:dP(D.current,P),display:fP(D.current,P)});if(ke())return;const ge=(z=C.current[I])==null?void 0:z[N];if(v(Le=>l2(Le,I,N,ce)),w(Le=>pP(Le,I,N)),!q||(ge==null?void 0:ge.html)===ce.html)return;const{doc:Ee,win:Ue}=O.current(I);rP(Ee,Ue,N,ce.html)}catch(ce){if(ke())return;const ge=ce instanceof Error?ce.message:String(ce);w(Ee=>l2(Ee,I,N,ge))}},[t]),X=x.useCallback((Q,N)=>{var I;if((I=C.current[Q])!=null&&I[N])return;const q=A.current.find(P=>P.id===Q);q&&K(q,N,!1)},[K]),ue=x.useCallback(Q=>{var N;for(const q of A.current)((N=C.current[q.id])==null?void 0:N[Q])!==void 0&&K(q,Q,!0)},[K]),M=x.useCallback(Q=>{D.current=Q,g(Q);for(const N of A.current)for(const q of Object.keys(C.current[N.id]??{}))K(N,q,!0)},[K,g]),V=x.useCallback((Q,N,q)=>{M(lP(D.current,R.current,Q,N,q))},[M]),te=x.useCallback((Q,N)=>{M(sP(D.current,R.current,Q,N))},[M]),me=x.useCallback((Q,N)=>{M(cP(D.current,R.current,Q,N))},[M]);return x.useMemo(()=>({overrideFor:T,displayFor:le,payloads:b,errorOn:H,errorFor:ne,payloadFor:Y,ensureLoaded:X,reload:ue,applySlot:V,setEnabled:te,setVariant:me}),[T,le,b,H,ne,Y,X,ue,V,te,me])}const yP={slots:{},slot_order:[]},bP={required:!1,variant:null},vP=[];function s2(e){return e?e.kind==="section"?{kind:"section",instance_id:e.instanceId}:{kind:"slot",instance_id:e.instanceId,slot_id:e.slotId,...e.itemIndex!==void 0?{item_index:e.itemIndex}:{}}:null}function xP(e){return e.kind==="section"?{kind:"section",instanceId:e.instance_id}:{kind:"slot",instanceId:e.instance_id,slotId:e.slot_id,...e.item_index!==void 0?{itemIndex:e.item_index}:{}}}function wP(e,t){if(!e)return[];const a=[];for(const r of e.pages){const l=t.find(c=>c.id===r);l&&a.push(l)}return a}function Yu(e,t,a,r){var p;const l=((p=t.doc)==null?void 0:p.getElementById(e))??null;if(!l||!a)return;const c=l.getBoundingClientRect(),u=$C({top:c.top,height:c.height},t.wrapper.offsetTop,r,a.scrollTop),m=zC(u,a.clientHeight,a.scrollTop,LC);m!==null&&a.scrollTo({top:m,behavior:"smooth"})}function c2(e,t){return e.querySelector(`[${uf}="${Ir(t)}"]`)}function gi(e){const t=JSON.stringify(e);return x.useMemo(()=>e,[t])}function kP(e){var at,Vt,ut;const{host:t,catalog:a,view:r,onViewChange:l,sessions:c}=e,u=x.useRef(null),m=x.useRef([]),[p,g]=x.useState({}),[b,v]=x.useState(1),[k,w]=x.useState(0),[j,E]=x.useState(!1),[_,C]=x.useState(null),O=r.fixture,A=a.fixtures.find(ie=>ie.id===O),D=A==null?void 0:A.doc,R=A==null?void 0:A.display,[F,L]=x.useState(null),T=x.useCallback(ie=>{L(null),l(ie)},[l]);x.useEffect(()=>{Fq(O)},[O]);const H=x.useMemo(()=>new URL(t.base).pathname,[t.base]),ne=gi(a.template.pages),Y=gi(a.template.canvases),le=gi(a.islands.map),K=gi(a.stylesheets),X=a.islands.hostScript,ue=gi(a.islands.importMap),M=gi(Object.fromEntries(a.template.instances.map(ie=>[ie.instanceId,ie.sectionSchema]))),V=gi(Object.fromEntries(a.template.instances.map(ie=>[ie.instanceId,ie.section]))),te=gi(a.template.instances),me=a.template.output,Q=me!=="website",N=Q?a.template.formats:[],q=gi(Q?N.find(ie=>ie.id===r.format)??N[0]??null:null),I=q!==null&&q.bleed>0?q.bleed:null,P=x.useMemo(()=>q?{formatId:q.id,width:q.cssWidth,height:q.cssHeight,tokens:q.tokens}:void 0,[q]),ee=Y.find(ie=>ie.id===r.canvasId)??(r.canvasId===null?Y[0]??null:null),pe=Y.length>0&&ee===null,se=x.useMemo(()=>ee?wP(ee,ne):vP,[ee,ne]),ke=x.useMemo(()=>se.map(ie=>({id:ie.id})),[se]),z={basePath:H,stylesheets:K,cssRev:String(k),islands:le,hostScript:X,importMap:ue},ce=x.useMemo(()=>zx(t2({...z,sectionSchemaByInstance:M,...P?{pageBox:P}:{}})),[H,K,k,le,X,ue,M,P]),ge=x.useMemo(()=>zx(t2({...z,...P?{pageBox:P}:{}})).srcdoc(),[H,K,k,le,X,ue,P]),[Ee,Ue]=x.useState(ge);Ee!==ge&&(Ue(ge),g({}));const Le=x.useCallback(ie=>{const be=m.current.find(Oe=>Oe.key===ie);return{doc:(be==null?void 0:be.doc)??null,win:(be==null?void 0:be.iframe.contentWindow)??null}},[]),ye=gP({host:t,fixture:O,doc:D,resolvedDisplay:R,sessions:c,pages:ke,frameFor:Le}),Re=gi(te.map(ie=>ie.instanceId).filter(ie=>!ye.displayFor(ie).enabled)),[ht,$e]=x.useState(null),Lt=x.useRef(r.selection);Lt.current=r.selection;const st=x.useRef(ye);st.current=ye;const Bn=x.useRef(se);Bn.current=se;const On=x.useRef(b);On.current=b;const cn=x.useMemo(()=>se.map(ie=>({key:ie.id,srcdoc:ge,label:ie.label,title:`Canvas preview — ${ie.label}`,...P?{pageBox:P}:{}})),[se,ge,P]);x.useEffect(()=>{const ie=u.current;if(!ie)return;const be=RC(ie,cn);m.current=be;const Oe=be.map(ze=>{const Ge=()=>{mC(ze.doc)&&g(Be=>({...Be,[ze.key]:!0}))};return ze.iframe.addEventListener("load",Ge),()=>ze.iframe.removeEventListener("load",Ge)});return()=>{for(const ze of Oe)ze()}},[cn]),x.useEffect(()=>{for(const ie of m.current)DC(ie.overlay,j?I:null)},[j,I,cn]),x.useEffect(()=>{const ie=u.current;if(!ie||typeof ResizeObserver>"u")return;const be=new ResizeObserver(Oe=>{var Be;const ze=(Be=Oe[0])==null?void 0:Be.contentRect;if(!(ze!=null&&ze.width))return;const Ge=$M(ze.width);v(IM(Ge,{availableWidthPx:ze.width,availableHeightPx:ze.height},P?{width:P.width,height:P.height}:void 0))});return be.observe(ie),()=>be.disconnect()},[P]),x.useEffect(()=>{var ie;(ie=u.current)==null||ie.style.setProperty("--we-scale",String(b))},[b]),x.useEffect(()=>{var be;if(P)return;const ie=[];for(const Oe of m.current){if(!p[Oe.key])continue;const ze=(be=Oe.doc)==null?void 0:be.getElementById("we-page");if(!ze)continue;const Ge=()=>Oe.setPageHeight(ze.getBoundingClientRect().height);if(Ge(),typeof ResizeObserver>"u")continue;const Be=new ResizeObserver(Ge);Be.observe(ze),ie.push(()=>Be.disconnect())}return()=>{for(const Oe of ie)Oe()}},[p,cn,P]),x.useEffect(()=>{const ie=ht;if(!ie)return;const be=()=>{document.documentElement.style.setProperty("--we-panel-w",`${ie.offsetWidth}px`)};be();const Oe=typeof ResizeObserver<"u"?new ResizeObserver(be):null;return Oe==null||Oe.observe(ie),()=>{Oe==null||Oe.disconnect(),document.documentElement.style.removeProperty("--we-panel-w")}},[ht]),x.useEffect(()=>{for(const ie of se)for(const be of ie.instanceIds)ye.ensureLoaded(ie.id,be)},[se,ye.ensureLoaded,O,D]);const yt=x.useMemo(()=>{const ie={};for(const be of se){const Oe=ye.payloads[be.id]??{};ie[be.id]=be.instanceIds.filter(ze=>Oe[ze]??ye.errorOn(be.id,ze)).map(ze=>{var Be,kt;const Ge=ye.errorOn(be.id,ze);return{instance_id:ze,section_version_id:O,section_key:V[ze]??ze,section_display_name:((Be=te.find(jt=>jt.instanceId===ze))==null?void 0:Be.label)??null,html:((kt=Oe[ze])==null?void 0:kt.html)??null,render_error:Ge?{code:"render_failed",message:Ge}:null}})}return ie},[se,ye.payloads,ye.errorOn,V,te,O]);x.useEffect(()=>{let ie=!1;for(const be of m.current){if(!p[be.key])continue;const Oe=be.doc,ze=be.iframe.contentWindow,Ge=Oe==null?void 0:Oe.getElementById("we-page");if(!Ge)continue;const Be=QO(ze),kt=aP(Ge,yt[be.key]??[],(jt,St)=>ce.buildSectionWrapper(jt,St),jt=>Be==null?void 0:Be.unmountRoot(jt));kt.length>0&&!Be&&!ie&&Object.keys(le).length>0&&(ie=!0,console.warn("playground: no island host on a canvas frame, so nothing will hydrate and sections stay static. Expected window.__trCanvasIslands from the canvas island host script."));for(const jt of kt)Be==null||Be.hydrateRoot(jt).catch(St=>{console.error("playground: canvas hydration pass failed:",St)})}},[p,cn,yt,ce,le]);const Wi=x.useRef(()=>{});Wi.current=ie=>{ye.setEnabled(ie,!0),T({...r,selection:{kind:"section",instanceId:ie}})},x.useEffect(()=>{var Oe;const ie=new Set(Re),be=[];for(const ze of m.current){if(!p[ze.key])continue;const Ge=ze.doc;if(!Ge)continue;const Be=yt[ze.key]??[];for(const Kt of Be)(Oe=c2(Ge,Kt.instance_id))==null||Oe.setAttribute("data-hidden",ie.has(Kt.instance_id)?"true":"false");const kt=Be.filter(Kt=>ie.has(Kt.instance_id)).map(Kt=>({instanceId:Kt.instance_id,label:op(Kt)})),jt=kC(ze.tabLayer,document,kt,Kt=>Wi.current(Kt)),St=()=>SC(jt,Kt=>c2(Ge,Kt),b);St();const Bt=Ge.getElementById("we-page");if(!Bt||typeof ResizeObserver>"u")continue;const Gt=new ResizeObserver(St);Gt.observe(Bt),be.push(()=>Gt.disconnect())}return()=>{for(const ze of be)ze()}},[p,cn,yt,Re,b]);const ci=x.useCallback(()=>{const ie=m.current,be=Lt.current,Oe=s2(be);for(const Be of ie)Be.doc&&ce.setLiveOwner(Be.doc,Oe);const ze=TC(ie,ce,Oe),Ge=be!==null&&Re.includes(be.instanceId);for(const Be of ie){const kt=Be.overlay.querySelector(".we-chrome-label"),jt=be&&!Ge?ze.find(St=>St.handle.key===Be.key):void 0;if(!jt||!be){Mx(Be.overlay,[],Tm),rp(kt);continue}if(Mx(Be.overlay,jt.els,Tm,be.kind),be.kind==="section"){const St=(yt[Be.key]??[]).find(Bt=>Bt.instance_id===be.instanceId);AM(kt,jt.els[0]??null,St?op(St):"")}else rp(kt)}},[ce,yt,Re]);x.useEffect(()=>{ci();for(const ie of m.current){if(!p[ie.key])continue;const be=ie.doc,Oe=ie.iframe.contentWindow;be&&Oe&&BC(Oe,be,s2(r.selection))}},[p,cn,r.selection,ci]);const ti=x.useCallback((ie,be)=>{const Oe=ie.getAttribute("href")??"";if(!Oe||Oe==="#")return;const ze=u.current;if(Oe.startsWith("#")){Yu(Oe.slice(1),be,ze,On.current);return}const Ge=JF(Oe,H,ne,Y);if(!Ge){window.open(Oe,"_blank","noopener,noreferrer");return}if(ee!==null&&Ge.canvasId===ee.id){const Be=m.current.find(kt=>kt.key===Ge.pageId);if(!Be)return;Ge.anchor?Yu(Ge.anchor,Be,ze,On.current):Be!==be&&Yu("we-page",Be,ze,On.current);return}T({...r,canvasId:Ge.canvasId,selection:null}),Ge.anchor&&C({pageId:Ge.pageId,anchor:Ge.anchor})},[r,T,H,ne,Y,ee]);x.useEffect(()=>{var be;if(!_||!p[_.pageId])return;const ie=m.current.find(Oe=>Oe.key===_.pageId);(be=ie==null?void 0:ie.doc)!=null&&be.getElementById(_.anchor)&&(Yu(_.anchor,ie,u.current,On.current),C(null))},[_,p,yt]),x.useEffect(()=>{const ie=[];for(const be of m.current){if(!p[be.key])continue;const Oe=be.doc;if(!Oe)continue;const ze=yt[be.key]??[],Ge=be.overlay.querySelector(".we-chrome-ring--hover"),Be=Bt=>{var ni;const Gt=Bt.target,Kt=ce.resolveTarget(Gt,ze);Qu(Ge);const An=Kt?xP(Kt.selection):null,Si=((ni=Gt.closest)==null?void 0:ni.call(Gt,"a"))??null;if(Si){if(Bt.preventDefault(),(An==null?void 0:An.kind)==="slot"){const ui=r.selection,Qr=(ui==null?void 0:ui.kind)==="slot"&&ui.instanceId===An.instanceId&&ui.slotId===An.slotId&&ui.itemIndex===An.itemIndex;T({...r,selection:An}),Qr&&ti(Si,be);return}ti(Si,be);return}T({...r,selection:An})},kt=Bt=>{const Gt=ce.resolveTarget(Bt.target,ze);Gt?_2(Ge,Gt.element,Tm):Qu(Ge)},jt=()=>Qu(Ge),St=Bt=>{Bt.key==="Escape"&&T({...r,selection:null})};Oe.body.addEventListener("click",Be),Oe.body.addEventListener("mouseover",kt),Oe.body.addEventListener("mouseleave",jt),Oe.body.addEventListener("keydown",St),ie.push(()=>{Oe.body.removeEventListener("click",Be),Oe.body.removeEventListener("mouseover",kt),Oe.body.removeEventListener("mouseleave",jt),Oe.body.removeEventListener("keydown",St)})}return()=>{for(const be of ie)be()}},[p,cn,ce,yt,r,T,ti]);const we=a.capabilities.hmr;x.useEffect(()=>{if(!we)return;const ie=()=>{const be=new Set;for(const Oe of Bn.current)for(const ze of Oe.instanceIds)be.has(ze)||(be.add(ze),st.current.reload(ze))};return t.subscribe({source:ie,stylesheet:()=>w(be=>be+1)})},[t,we]);const Te=r.selection,Ce=(Te==null?void 0:Te.instanceId)??null,Xe=se.find(ie=>Ce!==null&&ie.instanceIds.includes(Ce))??se[0]??null;return x.useEffect(()=>{Ce&&Xe&&ye.ensureLoaded(Xe.id,Ce)},[Ce,Xe==null?void 0:Xe.id,ye.ensureLoaded]),pe?d.jsxs("div",{className:"boot-error",children:['The template declares no canvas "',r.canvasId,'".',`
|
|
1258
|
+
`,"Declared canvases: ",Y.map(ie=>ie.id).join(", ")]}):d.jsxs("div",{className:"canvas-mirror",children:[d.jsx("style",{children:jC}),Y.length>1?d.jsx("div",{className:"canvas-bar",children:d.jsx("nav",{className:"canvas-bar__card","aria-label":"Canvases",children:Y.map(ie=>d.jsx("button",{type:"button",className:ie.id===(ee==null?void 0:ee.id)?"canvas-bar__tab is-current":"canvas-bar__tab","aria-current":ie.id===(ee==null?void 0:ee.id)?"page":void 0,onClick:()=>T({...r,canvasId:ie.id,selection:null}),children:ie.label},ie.id))})}):null,d.jsx("div",{className:"we-canvas-stage canvas-mirror__stage",ref:u,onClick:ie=>{var Oe;const be=ie.target;(be===u.current||(Oe=be.classList)!=null&&Oe.contains(ad))&&T({...r,selection:null})}}),d.jsxs("div",{className:"canvas-mirror__sidebar",ref:$e,children:[d.jsxs("div",{className:"sidebar-template",children:[d.jsxs("label",{className:"sidebar-template__field",children:["Fixture",d.jsx("select",{"data-testid":"fixture-picker",value:O,onChange:ie=>T({...r,fixture:ie.target.value,selection:null}),children:a.fixtures.map(ie=>d.jsx("option",{value:ie.id,children:Gq(ie)},ie.id))})]}),Q&&q&&N.length>1?d.jsxs("label",{className:"sidebar-template__field",children:["Format",d.jsx("select",{"data-testid":"format-switcher",value:q.id,onChange:ie=>l({...r,format:ie.target.value}),children:N.map(ie=>d.jsx("option",{value:ie.id,children:`${ie.id} — ${ie.pixelWidth}×${ie.pixelHeight}px${ie.physical?` (${ie.physical})`:""}`},ie.id))})]}):null,I!==null?d.jsxs("label",{className:"sidebar-template__toggle",children:[d.jsx("input",{type:"checkbox","data-testid":"guides-toggle",checked:j,onChange:ie=>E(ie.target.checked)}),"Trim & bleed guides"]}):null]}),Ce?d.jsx(ZF,{instanceId:Ce,label:((at=te.find(ie=>ie.instanceId===Ce))==null?void 0:at.label)??Ce,display:((Vt=te.find(ie=>ie.instanceId===Ce))==null?void 0:Vt.display)??bP,displayState:ye.displayFor(Ce),settingsOpen:F===Ce,onSetEnabled:ie=>ye.setEnabled(Ce,ie),onSetVariant:ie=>ye.setVariant(Ce,ie),onOpenSettings:()=>L(Ce),onCloseSettings:()=>L(null),fixture:O,sectionSchema:M[Ce]??yP,override:ye.overrideFor(Ce),payload:ye.payloadFor(Ce),renderError:ye.errorFor(Ce),selection:Te,onSelect:ie=>T({...r,selection:ie}),onApplySlot:(ie,be)=>ye.applySlot(Ce,ie,be)}):d.jsx(Rq,{}),a.capabilities.capture||me==="website"?d.jsx(iP,{host:t,templateName:a.template.name,fixture:O,output:me,format:(q==null?void 0:q.id)??null,canvas:(ee==null?void 0:ee.id)??null,pagePath:((ut=se[0])==null?void 0:ut.path)??null}):null]})]})}function SP(e){const[t,a]=x.useState({}),[r,l]=x.useState(e);if(e!==null&&e!==r){const u=r===null?[]:hP(r,e);l(e),u.length>0&&a(m=>mP(m,u))}const c=x.useCallback(u=>a(u),[]);return x.useMemo(()=>({edits:t,setEdits:c}),[t,c])}function u2(e){const t=wM(window.location.pathname,e.base);return t===null?null:kM(t,window.location.search)}function EP({host:e}){const[t,a]=x.useState(null),[r,l]=x.useState(null),[c,u]=x.useState(0),[m,p]=x.useState(()=>u2(e)),g=x.useMemo(()=>t===null||t.error!==void 0?null:Object.fromEntries(t.fixtures.map(j=>[j.id,j.doc])),[t]),b=SP(g);x.useEffect(()=>{let j=!0;return e.catalog().then(E=>{j&&(a(E),l(null))},E=>{j&&l(E instanceof Error?E.message:String(E))}),()=>{j=!1}},[e,c]);const v=t==null?void 0:t.template.name;x.useEffect(()=>{v&&(document.title=`${v} - Playground`)},[v]);const k=(t==null?void 0:t.capabilities.hmr)===!0;x.useEffect(()=>{if(!k)return;const j=()=>u(E=>E+1);return e.subscribe({source:j,fixtures:j})},[e,k]),x.useEffect(()=>{const j=()=>p(u2(e));return window.addEventListener("popstate",j),()=>window.removeEventListener("popstate",j)},[e]),x.useEffect(()=>{if(m!==null||t===null)return;const j=SM(t);j!==null&&(window.history.replaceState({},"",new URL(Ox(j),e.base).href),p(j))},[m,t,e]);const w=x.useCallback(j=>{window.history.replaceState({},"",new URL(Ox(j),e.base).href),p(j)},[e]);return r?d.jsxs("div",{className:"boot-error",children:["The playground could not load its catalog — ",r,`
|
|
1259
|
+
`,"Is the server still starting? Try refreshing."]}):t?t.error!==void 0?d.jsx("div",{className:"boot-error","data-testid":"catalog-error",children:t.error}):t.fixtures.length===0?d.jsx("div",{className:"empty","data-testid":"no-fixtures",children:"No fixtures to render under. Export a defineFixture() value from a module under fixtures/."}):m?t.fixtures.some(j=>j.id===m.fixture)?d.jsx(kP,{host:e,catalog:t,view:m,onViewChange:w,sessions:b}):d.jsxs("div",{className:"boot-error","data-testid":"unknown-fixture",children:['There is no fixture "',m.fixture,'" (have: ',t.fixtures.map(j=>j.id).join(", "),")."]}):d.jsx("div",{className:"empty",children:"loading canvas…"}):d.jsx("div",{className:"empty",children:"loading…"})}const XO=document.getElementById("root");if(!XO)throw new Error("playground: #root missing from index.html");const ZO=Hq(document.baseURI);Bq(ZO);bM.createRoot(XO).render(d.jsx(x.StrictMode,{children:d.jsx(EP,{host:ZO})}));
|