@yext/visual-editor 0.0.10 → 0.0.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.cts +8 -7
- package/dist/index.d.ts +8 -7
- package/dist/visual-editor.cjs +92 -47
- package/dist/visual-editor.js +11783 -3896
- package/package.json +3 -1
package/dist/visual-editor.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";var
|
|
1
|
+
"use strict";var sh=Object.defineProperty;var lh=(e,t,r)=>t in e?sh(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;var Kr=(e,t,r)=>lh(e,typeof t!="symbol"?t+"":t,r);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const d=require("react"),ut=require("@measured/puck"),Ya=require("react-dom");function Lc(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const r in e)if(r!=="default"){const n=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,n.get?n:{enumerable:!0,get:()=>e[r]})}}return t.default=e,Object.freeze(t)}const v=Lc(d),Ka=Lc(Ya);var Rn=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function ch(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var ga={exports:{}},qr={};/**
|
|
2
2
|
* @license React
|
|
3
3
|
* react-jsx-runtime.production.min.js
|
|
4
4
|
*
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
*
|
|
7
7
|
* This source code is licensed under the MIT license found in the
|
|
8
8
|
* LICENSE file in the root directory of this source tree.
|
|
9
|
-
*/var
|
|
9
|
+
*/var bs;function uh(){if(bs)return qr;bs=1;var e=d,t=Symbol.for("react.element"),r=Symbol.for("react.fragment"),n=Object.prototype.hasOwnProperty,o=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,a={key:!0,ref:!0,__self:!0,__source:!0};function i(s,l,c){var u,p={},f=null,h=null;c!==void 0&&(f=""+c),l.key!==void 0&&(f=""+l.key),l.ref!==void 0&&(h=l.ref);for(u in l)n.call(l,u)&&!a.hasOwnProperty(u)&&(p[u]=l[u]);if(s&&s.defaultProps)for(u in l=s.defaultProps,l)p[u]===void 0&&(p[u]=l[u]);return{$$typeof:t,type:s,key:f,ref:h,props:p,_owner:o.current}}return qr.Fragment=r,qr.jsx=i,qr.jsxs=i,qr}var Xr={};/**
|
|
10
10
|
* @license React
|
|
11
11
|
* react-jsx-runtime.development.js
|
|
12
12
|
*
|
|
@@ -14,118 +14,163 @@
|
|
|
14
14
|
*
|
|
15
15
|
* This source code is licensed under the MIT license found in the
|
|
16
16
|
* LICENSE file in the root directory of this source tree.
|
|
17
|
-
*/var
|
|
18
|
-
`+
|
|
19
|
-
`),
|
|
20
|
-
`),
|
|
21
|
-
`+
|
|
17
|
+
*/var ms;function fh(){return ms||(ms=1,process.env.NODE_ENV!=="production"&&function(){var e=d,t=Symbol.for("react.element"),r=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),o=Symbol.for("react.strict_mode"),a=Symbol.for("react.profiler"),i=Symbol.for("react.provider"),s=Symbol.for("react.context"),l=Symbol.for("react.forward_ref"),c=Symbol.for("react.suspense"),u=Symbol.for("react.suspense_list"),p=Symbol.for("react.memo"),f=Symbol.for("react.lazy"),h=Symbol.for("react.offscreen"),b=Symbol.iterator,g="@@iterator";function m(x){if(x===null||typeof x!="object")return null;var A=b&&x[b]||x[g];return typeof A=="function"?A:null}var w=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function C(x){{for(var A=arguments.length,j=new Array(A>1?A-1:0),Q=1;Q<A;Q++)j[Q-1]=arguments[Q];E("error",x,j)}}function E(x,A,j){{var Q=w.ReactDebugCurrentFrame,de=Q.getStackAddendum();de!==""&&(A+="%s",j=j.concat([de]));var be=j.map(function(fe){return String(fe)});be.unshift("Warning: "+A),Function.prototype.apply.call(console[x],console,be)}}var _=!1,S=!1,O=!1,M=!1,I=!1,U;U=Symbol.for("react.module.reference");function V(x){return!!(typeof x=="string"||typeof x=="function"||x===n||x===a||I||x===o||x===c||x===u||M||x===h||_||S||O||typeof x=="object"&&x!==null&&(x.$$typeof===f||x.$$typeof===p||x.$$typeof===i||x.$$typeof===s||x.$$typeof===l||x.$$typeof===U||x.getModuleId!==void 0))}function K(x,A,j){var Q=x.displayName;if(Q)return Q;var de=A.displayName||A.name||"";return de!==""?j+"("+de+")":j}function F(x){return x.displayName||"Context"}function Y(x){if(x==null)return null;if(typeof x.tag=="number"&&C("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),typeof x=="function")return x.displayName||x.name||null;if(typeof x=="string")return x;switch(x){case n:return"Fragment";case r:return"Portal";case a:return"Profiler";case o:return"StrictMode";case c:return"Suspense";case u:return"SuspenseList"}if(typeof x=="object")switch(x.$$typeof){case s:var A=x;return F(A)+".Consumer";case i:var j=x;return F(j._context)+".Provider";case l:return K(x,x.render,"ForwardRef");case p:var Q=x.displayName||null;return Q!==null?Q:Y(x.type)||"Memo";case f:{var de=x,be=de._payload,fe=de._init;try{return Y(fe(be))}catch{return null}}}return null}var G=Object.assign,te=0,H,oe,N,Z,$,T,D;function k(){}k.__reactDisabledLog=!0;function z(){{if(te===0){H=console.log,oe=console.info,N=console.warn,Z=console.error,$=console.group,T=console.groupCollapsed,D=console.groupEnd;var x={configurable:!0,enumerable:!0,value:k,writable:!0};Object.defineProperties(console,{info:x,log:x,warn:x,error:x,group:x,groupCollapsed:x,groupEnd:x})}te++}}function W(){{if(te--,te===0){var x={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:G({},x,{value:H}),info:G({},x,{value:oe}),warn:G({},x,{value:N}),error:G({},x,{value:Z}),group:G({},x,{value:$}),groupCollapsed:G({},x,{value:T}),groupEnd:G({},x,{value:D})})}te<0&&C("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var L=w.ReactCurrentDispatcher,q;function X(x,A,j){{if(q===void 0)try{throw Error()}catch(de){var Q=de.stack.trim().match(/\n( *(at )?)/);q=Q&&Q[1]||""}return`
|
|
18
|
+
`+q+x}}var re=!1,J;{var Te=typeof WeakMap=="function"?WeakMap:Map;J=new Te}function R(x,A){if(!x||re)return"";{var j=J.get(x);if(j!==void 0)return j}var Q;re=!0;var de=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var be;be=L.current,L.current=null,z();try{if(A){var fe=function(){throw Error()};if(Object.defineProperty(fe.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(fe,[])}catch(Be){Q=Be}Reflect.construct(x,[],fe)}else{try{fe.call()}catch(Be){Q=Be}x.call(fe.prototype)}}else{try{throw Error()}catch(Be){Q=Be}x()}}catch(Be){if(Be&&Q&&typeof Be.stack=="string"){for(var le=Be.stack.split(`
|
|
19
|
+
`),je=Q.stack.split(`
|
|
20
|
+
`),Oe=le.length-1,Re=je.length-1;Oe>=1&&Re>=0&&le[Oe]!==je[Re];)Re--;for(;Oe>=1&&Re>=0;Oe--,Re--)if(le[Oe]!==je[Re]){if(Oe!==1||Re!==1)do if(Oe--,Re--,Re<0||le[Oe]!==je[Re]){var qe=`
|
|
21
|
+
`+le[Oe].replace(" at new "," at ");return x.displayName&&qe.includes("<anonymous>")&&(qe=qe.replace("<anonymous>",x.displayName)),typeof x=="function"&&J.set(x,qe),qe}while(Oe>=1&&Re>=0);break}}}finally{re=!1,L.current=be,W(),Error.prepareStackTrace=de}var or=x?x.displayName||x.name:"",Gt=or?X(or):"";return typeof x=="function"&&J.set(x,Gt),Gt}function Ae(x,A,j){return R(x,!1)}function Ie(x){var A=x.prototype;return!!(A&&A.isReactComponent)}function Fe(x,A,j){if(x==null)return"";if(typeof x=="function")return R(x,Ie(x));if(typeof x=="string")return X(x);switch(x){case c:return X("Suspense");case u:return X("SuspenseList")}if(typeof x=="object")switch(x.$$typeof){case l:return Ae(x.render);case p:return Fe(x.type,A,j);case f:{var Q=x,de=Q._payload,be=Q._init;try{return Fe(be(de),A,j)}catch{}}}return""}var ke=Object.prototype.hasOwnProperty,$t={},Tt=w.ReactDebugCurrentFrame;function Ce(x){if(x){var A=x._owner,j=Fe(x.type,x._source,A?A.type:null);Tt.setExtraStackFrame(j)}else Tt.setExtraStackFrame(null)}function it(x,A,j,Q,de){{var be=Function.call.bind(ke);for(var fe in x)if(be(x,fe)){var le=void 0;try{if(typeof x[fe]!="function"){var je=Error((Q||"React class")+": "+j+" type `"+fe+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof x[fe]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw je.name="Invariant Violation",je}le=x[fe](A,fe,Q,j,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(Oe){le=Oe}le&&!(le instanceof Error)&&(Ce(de),C("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).",Q||"React class",j,fe,typeof le),Ce(null)),le instanceof Error&&!(le.message in $t)&&($t[le.message]=!0,Ce(de),C("Failed %s type: %s",j,le.message),Ce(null))}}}var Ur=Array.isArray;function At(x){return Ur(x)}function gt(x){{var A=typeof Symbol=="function"&&Symbol.toStringTag,j=A&&x[Symbol.toStringTag]||x.constructor.name||"Object";return j}}function Gr(x){try{return se(x),!1}catch{return!0}}function se(x){return""+x}function ae(x){if(Gr(x))return C("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",gt(x)),se(x)}var ue=w.ReactCurrentOwner,Ke={key:!0,ref:!0,__self:!0,__source:!0},Ze,Wr,Vr;Vr={};function Tn(x){if(ke.call(x,"ref")){var A=Object.getOwnPropertyDescriptor(x,"ref").get;if(A&&A.isReactWarning)return!1}return x.ref!==void 0}function An(x){if(ke.call(x,"key")){var A=Object.getOwnPropertyDescriptor(x,"key").get;if(A&&A.isReactWarning)return!1}return x.key!==void 0}function Fo(x,A){if(typeof x.ref=="string"&&ue.current&&A&&ue.current.stateNode!==A){var j=Y(ue.current.type);Vr[j]||(C('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref',Y(ue.current.type),x.ref),Vr[j]=!0)}}function Yr(x,A){{var j=function(){Ze||(Ze=!0,C("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",A))};j.isReactWarning=!0,Object.defineProperty(x,"key",{get:j,configurable:!0})}}function st(x,A){{var j=function(){Wr||(Wr=!0,C("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",A))};j.isReactWarning=!0,Object.defineProperty(x,"ref",{get:j,configurable:!0})}}var Lo=function(x,A,j,Q,de,be,fe){var le={$$typeof:t,type:x,key:A,ref:j,props:fe,_owner:be};return le._store={},Object.defineProperty(le._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(le,"_self",{configurable:!1,enumerable:!1,writable:!1,value:Q}),Object.defineProperty(le,"_source",{configurable:!1,enumerable:!1,writable:!1,value:de}),Object.freeze&&(Object.freeze(le.props),Object.freeze(le)),le};function ne(x,A,j,Q,de){{var be,fe={},le=null,je=null;j!==void 0&&(ae(j),le=""+j),An(A)&&(ae(A.key),le=""+A.key),Tn(A)&&(je=A.ref,Fo(A,de));for(be in A)ke.call(A,be)&&!Ke.hasOwnProperty(be)&&(fe[be]=A[be]);if(x&&x.defaultProps){var Oe=x.defaultProps;for(be in Oe)fe[be]===void 0&&(fe[be]=Oe[be])}if(le||je){var Re=typeof x=="function"?x.displayName||x.name||"Unknown":x;le&&Yr(fe,Re),je&&st(fe,Re)}return Lo(x,le,je,de,Q,ue.current,fe)}}var ge=w.ReactCurrentOwner,ve=w.ReactDebugCurrentFrame;function De(x){if(x){var A=x._owner,j=Fe(x.type,x._source,A?A.type:null);ve.setExtraStackFrame(j)}else ve.setExtraStackFrame(null)}var Le;Le=!1;function Ot(x){return typeof x=="object"&&x!==null&&x.$$typeof===t}function On(){{if(ge.current){var x=Y(ge.current.type);if(x)return`
|
|
22
22
|
|
|
23
|
-
Check the render method of \``+
|
|
23
|
+
Check the render method of \``+x+"`."}return""}}function Jp(x){return""}var ds={};function Zp(x){{var A=On();if(!A){var j=typeof x=="string"?x:x.displayName||x.name;j&&(A=`
|
|
24
24
|
|
|
25
|
-
Check the top-level render call using <`+
|
|
25
|
+
Check the top-level render call using <`+j+">.")}return A}}function ps(x,A){{if(!x._store||x._store.validated||x.key!=null)return;x._store.validated=!0;var j=Zp(A);if(ds[j])return;ds[j]=!0;var Q="";x&&x._owner&&x._owner!==ge.current&&(Q=" It was passed a child from "+Y(x._owner.type)+"."),De(x),C('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',j,Q),De(null)}}function hs(x,A){{if(typeof x!="object")return;if(At(x))for(var j=0;j<x.length;j++){var Q=x[j];Ot(Q)&&ps(Q,A)}else if(Ot(x))x._store&&(x._store.validated=!0);else if(x){var de=m(x);if(typeof de=="function"&&de!==x.entries)for(var be=de.call(x),fe;!(fe=be.next()).done;)Ot(fe.value)&&ps(fe.value,A)}}}function Qp(x){{var A=x.type;if(A==null||typeof A=="string")return;var j;if(typeof A=="function")j=A.propTypes;else if(typeof A=="object"&&(A.$$typeof===l||A.$$typeof===p))j=A.propTypes;else return;if(j){var Q=Y(A);it(j,x.props,"prop",Q,x)}else if(A.PropTypes!==void 0&&!Le){Le=!0;var de=Y(A);C("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",de||"Unknown")}typeof A.getDefaultProps=="function"&&!A.getDefaultProps.isReactClassApproved&&C("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function eh(x){{for(var A=Object.keys(x.props),j=0;j<A.length;j++){var Q=A[j];if(Q!=="children"&&Q!=="key"){De(x),C("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",Q),De(null);break}}x.ref!==null&&(De(x),C("Invalid attribute `ref` supplied to `React.Fragment`."),De(null))}}var gs={};function vs(x,A,j,Q,de,be){{var fe=V(x);if(!fe){var le="";(x===void 0||typeof x=="object"&&x!==null&&Object.keys(x).length===0)&&(le+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");var je=Jp();je?le+=je:le+=On();var Oe;x===null?Oe="null":At(x)?Oe="array":x!==void 0&&x.$$typeof===t?(Oe="<"+(Y(x.type)||"Unknown")+" />",le=" Did you accidentally export a JSX literal instead of a component?"):Oe=typeof x,C("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",Oe,le)}var Re=ne(x,A,j,de,be);if(Re==null)return Re;if(fe){var qe=A.children;if(qe!==void 0)if(Q)if(At(qe)){for(var or=0;or<qe.length;or++)hs(qe[or],x);Object.freeze&&Object.freeze(qe)}else C("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else hs(qe,x)}if(ke.call(A,"key")){var Gt=Y(x),Be=Object.keys(A).filter(function(ih){return ih!=="key"}),Bo=Be.length>0?"{key: someKey, "+Be.join(": ..., ")+": ...}":"{key: someKey}";if(!gs[Gt+Bo]){var ah=Be.length>0?"{"+Be.join(": ..., ")+": ...}":"{}";C(`A props object containing a "key" prop is being spread into JSX:
|
|
26
26
|
let props = %s;
|
|
27
27
|
<%s {...props} />
|
|
28
28
|
React keys must be passed directly to JSX without using spread:
|
|
29
29
|
let props = %s;
|
|
30
|
-
<%s key={someKey} {...props} />`,
|
|
30
|
+
<%s key={someKey} {...props} />`,Bo,Gt,ah,Gt),gs[Gt+Bo]=!0}}return x===n?eh(Re):Qp(Re),Re}}function th(x,A,j){return vs(x,A,j,!0)}function rh(x,A,j){return vs(x,A,j,!1)}var nh=rh,oh=th;Xr.Fragment=n,Xr.jsx=nh,Xr.jsxs=oh}()),Xr}process.env.NODE_ENV==="production"?ga.exports=uh():ga.exports=fh();var y=ga.exports;/**
|
|
31
31
|
* @license lucide-react v0.414.0 - ISC
|
|
32
32
|
*
|
|
33
33
|
* This source code is licensed under the ISC license.
|
|
34
34
|
* See the LICENSE file in the root directory of this source tree.
|
|
35
|
-
*/const
|
|
35
|
+
*/const dh=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),Bc=(...e)=>e.filter((t,r,n)=>!!t&&n.indexOf(t)===r).join(" ");/**
|
|
36
36
|
* @license lucide-react v0.414.0 - ISC
|
|
37
37
|
*
|
|
38
38
|
* This source code is licensed under the ISC license.
|
|
39
39
|
* See the LICENSE file in the root directory of this source tree.
|
|
40
|
-
*/var
|
|
40
|
+
*/var ph={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"};/**
|
|
41
41
|
* @license lucide-react v0.414.0 - ISC
|
|
42
42
|
*
|
|
43
43
|
* This source code is licensed under the ISC license.
|
|
44
44
|
* See the LICENSE file in the root directory of this source tree.
|
|
45
|
-
*/const
|
|
45
|
+
*/const hh=d.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:r=2,absoluteStrokeWidth:n,className:o="",children:a,iconNode:i,...s},l)=>d.createElement("svg",{ref:l,...ph,width:t,height:t,stroke:e,strokeWidth:n?Number(r)*24/Number(t):r,className:Bc("lucide",o),...s},[...i.map(([c,u])=>d.createElement(c,u)),...Array.isArray(a)?a:[a]]));/**
|
|
46
46
|
* @license lucide-react v0.414.0 - ISC
|
|
47
47
|
*
|
|
48
48
|
* This source code is licensed under the ISC license.
|
|
49
49
|
* See the LICENSE file in the root directory of this source tree.
|
|
50
|
-
*/const
|
|
50
|
+
*/const hn=(e,t)=>{const r=d.forwardRef(({className:n,...o},a)=>d.createElement(hh,{ref:a,iconNode:t,className:Bc(`lucide-${dh(e)}`,n),...o}));return r.displayName=`${e}`,r};/**
|
|
51
51
|
* @license lucide-react v0.414.0 - ISC
|
|
52
52
|
*
|
|
53
53
|
* This source code is licensed under the ISC license.
|
|
54
54
|
* See the LICENSE file in the root directory of this source tree.
|
|
55
|
-
*/const
|
|
55
|
+
*/const gh=hn("Circle",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]]);/**
|
|
56
56
|
* @license lucide-react v0.414.0 - ISC
|
|
57
57
|
*
|
|
58
58
|
* This source code is licensed under the ISC license.
|
|
59
59
|
* See the LICENSE file in the root directory of this source tree.
|
|
60
|
-
*/const
|
|
60
|
+
*/const vh=hn("PanelLeft",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M9 3v18",key:"fh3hqa"}]]);/**
|
|
61
61
|
* @license lucide-react v0.414.0 - ISC
|
|
62
62
|
*
|
|
63
63
|
* This source code is licensed under the ISC license.
|
|
64
64
|
* See the LICENSE file in the root directory of this source tree.
|
|
65
|
-
*/const
|
|
65
|
+
*/const bh=hn("PanelRight",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M15 3v18",key:"14nvp0"}]]);/**
|
|
66
66
|
* @license lucide-react v0.414.0 - ISC
|
|
67
67
|
*
|
|
68
68
|
* This source code is licensed under the ISC license.
|
|
69
69
|
* See the LICENSE file in the root directory of this source tree.
|
|
70
|
-
*/const
|
|
70
|
+
*/const mh=hn("RotateCcw",[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}]]);/**
|
|
71
71
|
* @license lucide-react v0.414.0 - ISC
|
|
72
72
|
*
|
|
73
73
|
* This source code is licensed under the ISC license.
|
|
74
74
|
* See the LICENSE file in the root directory of this source tree.
|
|
75
|
-
*/const Ti=Wt("RotateCw",[["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"}]]);function Ni(e,t){const n=d.createContext(t);function r(a){const{children:s,...i}=a,c=d.useMemo(()=>i,Object.values(i));return v.jsx(n.Provider,{value:c,children:s})}function o(a){const s=d.useContext(n);if(s)return s;if(t!==void 0)return t;throw new Error(`\`${a}\` must be used within \`${e}\``)}return r.displayName=e+"Provider",[r,o]}function nt(e,t=[]){let n=[];function r(a,s){const i=d.createContext(s),c=n.length;n=[...n,s];function u(p){const{scope:l,children:g,...y}=p,h=(l==null?void 0:l[e][c])||i,b=d.useMemo(()=>y,Object.values(y));return v.jsx(h.Provider,{value:b,children:g})}function f(p,l){const g=(l==null?void 0:l[e][c])||i,y=d.useContext(g);if(y)return y;if(s!==void 0)return s;throw new Error(`\`${p}\` must be used within \`${a}\``)}return u.displayName=a+"Provider",[u,f]}const o=()=>{const a=n.map(s=>d.createContext(s));return function(i){const c=(i==null?void 0:i[e])||a;return d.useMemo(()=>({[`__scope${e}`]:{...i,[e]:c}}),[i,c])}};return o.scopeName=e,[r,Oi(o,...t)]}function Oi(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(o=>({useScope:o(),scopeName:o.scopeName}));return function(a){const s=r.reduce((i,{useScope:c,scopeName:u})=>{const p=c(a)[`__scope${u}`];return{...i,...p}},{});return d.useMemo(()=>({[`__scope${t.scopeName}`]:s}),[s])}};return n.scopeName=t.scopeName,n}function Di(e,t){typeof e=="function"?e(t):e!=null&&(e.current=t)}function So(...e){return t=>e.forEach(n=>Di(n,t))}function ue(...e){return d.useCallback(So(...e),e)}function oe(e,t,{checkForDefaultPrevented:n=!0}={}){return function(o){if(e==null||e(o),n===!1||!o.defaultPrevented)return t==null?void 0:t(o)}}var We=globalThis!=null&&globalThis.document?d.useLayoutEffect:()=>{},ki=d.useId||(()=>{}),_i=0;function Ft(e){const[t,n]=d.useState(ki());return We(()=>{n(r=>r??String(_i++))},[e]),t?`radix-${t}`:""}function Ve(e){const t=d.useRef(e);return d.useEffect(()=>{t.current=e}),d.useMemo(()=>(...n)=>{var r;return(r=t.current)==null?void 0:r.call(t,...n)},[])}function Vt({prop:e,defaultProp:t,onChange:n=()=>{}}){const[r,o]=ji({defaultProp:t,onChange:n}),a=e!==void 0,s=a?e:r,i=Ve(n),c=d.useCallback(u=>{if(a){const p=typeof u=="function"?u(e):u;p!==e&&i(p)}else o(u)},[a,e,o,i]);return[s,c]}function ji({defaultProp:e,onChange:t}){const n=d.useState(e),[r]=n,o=d.useRef(r),a=Ve(t);return d.useEffect(()=>{o.current!==r&&(a(r),o.current=r)},[r,o,a]),n}var it=d.forwardRef((e,t)=>{const{children:n,...r}=e,o=d.Children.toArray(n),a=o.find(Mi);if(a){const s=a.props.children,i=o.map(c=>c===a?d.Children.count(s)>1?d.Children.only(null):d.isValidElement(s)?s.props.children:null:c);return v.jsx(zn,{...r,ref:t,children:d.isValidElement(s)?d.cloneElement(s,void 0,i):null})}return v.jsx(zn,{...r,ref:t,children:n})});it.displayName="Slot";var zn=d.forwardRef((e,t)=>{const{children:n,...r}=e;if(d.isValidElement(n)){const o=Li(n);return d.cloneElement(n,{...Ii(r,n.props),ref:t?So(t,o):o})}return d.Children.count(n)>1?d.Children.only(null):null});zn.displayName="SlotClone";var lr=({children:e})=>v.jsx(v.Fragment,{children:e});function Mi(e){return d.isValidElement(e)&&e.type===lr}function Ii(e,t){const n={...t};for(const r in t){const o=e[r],a=t[r];/^on[A-Z]/.test(r)?o&&a?n[r]=(...i)=>{a(...i),o(...i)}:o&&(n[r]=o):r==="style"?n[r]={...o,...a}:r==="className"&&(n[r]=[o,a].filter(Boolean).join(" "))}return{...e,...n}}function Li(e){var r,o;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var Fi=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],ae=Fi.reduce((e,t)=>{const n=d.forwardRef((r,o)=>{const{asChild:a,...s}=r,i=a?it:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),v.jsx(i,{...s,ref:o})});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});function $i(e,t){e&&cr.flushSync(()=>e.dispatchEvent(t))}function Bi(e,t=globalThis==null?void 0:globalThis.document){const n=Ve(e);d.useEffect(()=>{const r=o=>{o.key==="Escape"&&n(o)};return t.addEventListener("keydown",r,{capture:!0}),()=>t.removeEventListener("keydown",r,{capture:!0})},[n,t])}var Wi="DismissableLayer",Un="dismissableLayer.update",Vi="dismissableLayer.pointerDownOutside",zi="dismissableLayer.focusOutside",Ur,Ro=d.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),ur=d.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:o,onFocusOutside:a,onInteractOutside:s,onDismiss:i,...c}=e,u=d.useContext(Ro),[f,p]=d.useState(null),l=(f==null?void 0:f.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,g]=d.useState({}),y=ue(t,A=>p(A)),h=Array.from(u.layers),[b]=[...u.layersWithOutsidePointerEventsDisabled].slice(-1),x=h.indexOf(b),w=f?h.indexOf(f):-1,C=u.layersWithOutsidePointerEventsDisabled.size>0,P=w>=x,R=Gi(A=>{const O=A.target,$=[...u.branches].some(M=>M.contains(O));!P||$||(o==null||o(A),s==null||s(A),A.defaultPrevented||i==null||i())},l),D=Yi(A=>{const O=A.target;[...u.branches].some(M=>M.contains(O))||(a==null||a(A),s==null||s(A),A.defaultPrevented||i==null||i())},l);return Bi(A=>{w===u.layers.size-1&&(r==null||r(A),!A.defaultPrevented&&i&&(A.preventDefault(),i()))},l),d.useEffect(()=>{if(f)return n&&(u.layersWithOutsidePointerEventsDisabled.size===0&&(Ur=l.body.style.pointerEvents,l.body.style.pointerEvents="none"),u.layersWithOutsidePointerEventsDisabled.add(f)),u.layers.add(f),Hr(),()=>{n&&u.layersWithOutsidePointerEventsDisabled.size===1&&(l.body.style.pointerEvents=Ur)}},[f,l,n,u]),d.useEffect(()=>()=>{f&&(u.layers.delete(f),u.layersWithOutsidePointerEventsDisabled.delete(f),Hr())},[f,u]),d.useEffect(()=>{const A=()=>g({});return document.addEventListener(Un,A),()=>document.removeEventListener(Un,A)},[]),v.jsx(ae.div,{...c,ref:y,style:{pointerEvents:C?P?"auto":"none":void 0,...e.style},onFocusCapture:oe(e.onFocusCapture,D.onFocusCapture),onBlurCapture:oe(e.onBlurCapture,D.onBlurCapture),onPointerDownCapture:oe(e.onPointerDownCapture,R.onPointerDownCapture)})});ur.displayName=Wi;var Ui="DismissableLayerBranch",Hi=d.forwardRef((e,t)=>{const n=d.useContext(Ro),r=d.useRef(null),o=ue(t,r);return d.useEffect(()=>{const a=r.current;if(a)return n.branches.add(a),()=>{n.branches.delete(a)}},[n.branches]),v.jsx(ae.div,{...e,ref:o})});Hi.displayName=Ui;function Gi(e,t=globalThis==null?void 0:globalThis.document){const n=Ve(e),r=d.useRef(!1),o=d.useRef(()=>{});return d.useEffect(()=>{const a=i=>{if(i.target&&!r.current){let c=function(){Po(Vi,n,u,{discrete:!0})};const u={originalEvent:i};i.pointerType==="touch"?(t.removeEventListener("click",o.current),o.current=c,t.addEventListener("click",o.current,{once:!0})):c()}else t.removeEventListener("click",o.current);r.current=!1},s=window.setTimeout(()=>{t.addEventListener("pointerdown",a)},0);return()=>{window.clearTimeout(s),t.removeEventListener("pointerdown",a),t.removeEventListener("click",o.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function Yi(e,t=globalThis==null?void 0:globalThis.document){const n=Ve(e),r=d.useRef(!1);return d.useEffect(()=>{const o=a=>{a.target&&!r.current&&Po(zi,n,{originalEvent:a},{discrete:!1})};return t.addEventListener("focusin",o),()=>t.removeEventListener("focusin",o)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function Hr(){const e=new CustomEvent(Un);document.dispatchEvent(e)}function Po(e,t,n,{discrete:r}){const o=n.originalEvent.target,a=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&o.addEventListener(e,t,{once:!0}),r?$i(o,a):o.dispatchEvent(a)}var On="focusScope.autoFocusOnMount",Dn="focusScope.autoFocusOnUnmount",Gr={bubbles:!1,cancelable:!0},Ki="FocusScope",Ao=d.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:o,onUnmountAutoFocus:a,...s}=e,[i,c]=d.useState(null),u=Ve(o),f=Ve(a),p=d.useRef(null),l=ue(t,h=>c(h)),g=d.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;d.useEffect(()=>{if(r){let h=function(C){if(g.paused||!i)return;const P=C.target;i.contains(P)?p.current=P:Xe(p.current,{select:!0})},b=function(C){if(g.paused||!i)return;const P=C.relatedTarget;P!==null&&(i.contains(P)||Xe(p.current,{select:!0}))},x=function(C){if(document.activeElement===document.body)for(const R of C)R.removedNodes.length>0&&Xe(i)};document.addEventListener("focusin",h),document.addEventListener("focusout",b);const w=new MutationObserver(x);return i&&w.observe(i,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",h),document.removeEventListener("focusout",b),w.disconnect()}}},[r,i,g.paused]),d.useEffect(()=>{if(i){Kr.add(g);const h=document.activeElement;if(!i.contains(h)){const x=new CustomEvent(On,Gr);i.addEventListener(On,u),i.dispatchEvent(x),x.defaultPrevented||(qi(ec(To(i)),{select:!0}),document.activeElement===h&&Xe(i))}return()=>{i.removeEventListener(On,u),setTimeout(()=>{const x=new CustomEvent(Dn,Gr);i.addEventListener(Dn,f),i.dispatchEvent(x),x.defaultPrevented||Xe(h??document.body,{select:!0}),i.removeEventListener(Dn,f),Kr.remove(g)},0)}}},[i,u,f,g]);const y=d.useCallback(h=>{if(!n&&!r||g.paused)return;const b=h.key==="Tab"&&!h.altKey&&!h.ctrlKey&&!h.metaKey,x=document.activeElement;if(b&&x){const w=h.currentTarget,[C,P]=Xi(w);C&&P?!h.shiftKey&&x===P?(h.preventDefault(),n&&Xe(C,{select:!0})):h.shiftKey&&x===C&&(h.preventDefault(),n&&Xe(P,{select:!0})):x===w&&h.preventDefault()}},[n,r,g.paused]);return v.jsx(ae.div,{tabIndex:-1,...s,ref:l,onKeyDown:y})});Ao.displayName=Ki;function qi(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(Xe(r,{select:t}),document.activeElement!==n)return}function Xi(e){const t=To(e),n=Yr(t,e),r=Yr(t.reverse(),e);return[n,r]}function To(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const o=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||o?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function Yr(e,t){for(const n of e)if(!Ji(n,{upTo:t}))return n}function Ji(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function Zi(e){return e instanceof HTMLInputElement&&"select"in e}function Xe(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&Zi(e)&&t&&e.select()}}var Kr=Qi();function Qi(){let e=[];return{add(t){const n=e[0];t!==n&&(n==null||n.pause()),e=qr(e,t),e.unshift(t)},remove(t){var n;e=qr(e,t),(n=e[0])==null||n.resume()}}}function qr(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function ec(e){return e.filter(t=>t.tagName!=="A")}var tc="Portal",No=d.forwardRef((e,t)=>{var i;const{container:n,...r}=e,[o,a]=d.useState(!1);We(()=>a(!0),[]);const s=n||o&&((i=globalThis==null?void 0:globalThis.document)==null?void 0:i.body);return s?ir.createPortal(v.jsx(ae.div,{...r,ref:t}),s):null});No.displayName=tc;function nc(e,t){return d.useReducer((n,r)=>t[n][r]??n,e)}var zt=e=>{const{present:t,children:n}=e,r=rc(t),o=typeof n=="function"?n({present:r.isPresent}):d.Children.only(n),a=ue(r.ref,oc(o));return typeof n=="function"||r.isPresent?d.cloneElement(o,{ref:a}):null};zt.displayName="Presence";function rc(e){const[t,n]=d.useState(),r=d.useRef({}),o=d.useRef(e),a=d.useRef("none"),s=e?"mounted":"unmounted",[i,c]=nc(s,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return d.useEffect(()=>{const u=qt(r.current);a.current=i==="mounted"?u:"none"},[i]),We(()=>{const u=r.current,f=o.current;if(f!==e){const l=a.current,g=qt(u);e?c("MOUNT"):g==="none"||(u==null?void 0:u.display)==="none"?c("UNMOUNT"):c(f&&l!==g?"ANIMATION_OUT":"UNMOUNT"),o.current=e}},[e,c]),We(()=>{if(t){const u=p=>{const g=qt(r.current).includes(p.animationName);p.target===t&&g&&cr.flushSync(()=>c("ANIMATION_END"))},f=p=>{p.target===t&&(a.current=qt(r.current))};return t.addEventListener("animationstart",f),t.addEventListener("animationcancel",u),t.addEventListener("animationend",u),()=>{t.removeEventListener("animationstart",f),t.removeEventListener("animationcancel",u),t.removeEventListener("animationend",u)}}else c("ANIMATION_END")},[t,c]),{isPresent:["mounted","unmountSuspended"].includes(i),ref:d.useCallback(u=>{u&&(r.current=getComputedStyle(u)),n(u)},[])}}function qt(e){return(e==null?void 0:e.animationName)||"none"}function oc(e){var r,o;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var kn=0;function ac(){d.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??Xr()),document.body.insertAdjacentElement("beforeend",e[1]??Xr()),kn++,()=>{kn===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),kn--}},[])}function Xr(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.cssText="outline: none; opacity: 0; position: fixed; pointer-events: none",e}var ke=function(){return ke=Object.assign||function(t){for(var n,r=1,o=arguments.length;r<o;r++){n=arguments[r];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(t[a]=n[a])}return t},ke.apply(this,arguments)};function Oo(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n}function sc(e,t,n){if(n||arguments.length===2)for(var r=0,o=t.length,a;r<o;r++)(a||!(r in t))&&(a||(a=Array.prototype.slice.call(t,0,r)),a[r]=t[r]);return e.concat(a||Array.prototype.slice.call(t))}var on="right-scroll-bar-position",an="width-before-scroll-bar",ic="with-scroll-bars-hidden",cc="--removed-body-scroll-bar-size";function _n(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function lc(e,t){var n=E.useState(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(r){var o=n.value;o!==r&&(n.value=r,n.callback(r,o))}}}})[0];return n.callback=t,n.facade}var uc=typeof window<"u"?d.useLayoutEffect:d.useEffect,Jr=new WeakMap;function dc(e,t){var n=lc(null,function(r){return e.forEach(function(o){return _n(o,r)})});return uc(function(){var r=Jr.get(n);if(r){var o=new Set(r),a=new Set(e),s=n.current;o.forEach(function(i){a.has(i)||_n(i,null)}),a.forEach(function(i){o.has(i)||_n(i,s)})}Jr.set(n,e)},[e]),n}function fc(e){return e}function pc(e,t){t===void 0&&(t=fc);var n=[],r=!1,o={read:function(){if(r)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(a){var s=t(a,r);return n.push(s),function(){n=n.filter(function(i){return i!==s})}},assignSyncMedium:function(a){for(r=!0;n.length;){var s=n;n=[],s.forEach(a)}n={push:function(i){return a(i)},filter:function(){return n}}},assignMedium:function(a){r=!0;var s=[];if(n.length){var i=n;n=[],i.forEach(a),s=n}var c=function(){var f=s;s=[],f.forEach(a)},u=function(){return Promise.resolve().then(c)};u(),n={push:function(f){s.push(f),u()},filter:function(f){return s=s.filter(f),n}}}};return o}function vc(e){e===void 0&&(e={});var t=pc(null);return t.options=ke({async:!0,ssr:!1},e),t}var Do=function(e){var t=e.sideCar,n=Oo(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw new Error("Sidecar medium not found");return d.createElement(r,ke({},n))};Do.isSideCarExport=!0;function mc(e,t){return e.useMedium(t),Do}var ko=vc(),jn=function(){},vn=d.forwardRef(function(e,t){var n=d.useRef(null),r=d.useState({onScrollCapture:jn,onWheelCapture:jn,onTouchMoveCapture:jn}),o=r[0],a=r[1],s=e.forwardProps,i=e.children,c=e.className,u=e.removeScrollBar,f=e.enabled,p=e.shards,l=e.sideCar,g=e.noIsolation,y=e.inert,h=e.allowPinchZoom,b=e.as,x=b===void 0?"div":b,w=e.gapMode,C=Oo(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as","gapMode"]),P=l,R=dc([n,t]),D=ke(ke({},C),o);return d.createElement(d.Fragment,null,f&&d.createElement(P,{sideCar:ko,removeScrollBar:u,shards:p,noIsolation:g,inert:y,setCallbacks:a,allowPinchZoom:!!h,lockRef:n,gapMode:w}),s?d.cloneElement(d.Children.only(i),ke(ke({},D),{ref:R})):d.createElement(x,ke({},D,{className:c,ref:R}),i))});vn.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};vn.classNames={fullWidth:an,zeroRight:on};var gc=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function hc(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=gc();return t&&e.setAttribute("nonce",t),e}function yc(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function bc(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var xc=function(){var e=0,t=null;return{add:function(n){e==0&&(t=hc())&&(yc(t,n),bc(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},wc=function(){var e=xc();return function(t,n){d.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},_o=function(){var e=wc(),t=function(n){var r=n.styles,o=n.dynamic;return e(r,o),null};return t},Ec={left:0,top:0,right:0,gap:0},Mn=function(e){return parseInt(e||"",10)||0},Cc=function(e){var t=window.getComputedStyle(document.body),n=t[e==="padding"?"paddingLeft":"marginLeft"],r=t[e==="padding"?"paddingTop":"marginTop"],o=t[e==="padding"?"paddingRight":"marginRight"];return[Mn(n),Mn(r),Mn(o)]},Sc=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return Ec;var t=Cc(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},Rc=_o(),bt="data-scroll-locked",Pc=function(e,t,n,r){var o=e.left,a=e.top,s=e.right,i=e.gap;return n===void 0&&(n="margin"),`
|
|
76
|
-
.`.concat(
|
|
77
|
-
overflow: hidden `).concat(
|
|
78
|
-
padding-right: `).concat(
|
|
75
|
+
*/const yh=hn("RotateCw",[["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"}]]);function xh(e,t){const r=v.createContext(t);function n(a){const{children:i,...s}=a,l=v.useMemo(()=>s,Object.values(s));return y.jsx(r.Provider,{value:l,children:i})}function o(a){const i=v.useContext(r);if(i)return i;if(t!==void 0)return t;throw new Error(`\`${a}\` must be used within \`${e}\``)}return n.displayName=e+"Provider",[n,o]}function zt(e,t=[]){let r=[];function n(a,i){const s=v.createContext(i),l=r.length;r=[...r,i];function c(p){const{scope:f,children:h,...b}=p,g=(f==null?void 0:f[e][l])||s,m=v.useMemo(()=>b,Object.values(b));return y.jsx(g.Provider,{value:m,children:h})}function u(p,f){const h=(f==null?void 0:f[e][l])||s,b=v.useContext(h);if(b)return b;if(i!==void 0)return i;throw new Error(`\`${p}\` must be used within \`${a}\``)}return c.displayName=a+"Provider",[c,u]}const o=()=>{const a=r.map(i=>v.createContext(i));return function(s){const l=(s==null?void 0:s[e])||a;return v.useMemo(()=>({[`__scope${e}`]:{...s,[e]:l}}),[s,l])}};return o.scopeName=e,[n,wh(o,...t)]}function wh(...e){const t=e[0];if(e.length===1)return t;const r=()=>{const n=e.map(o=>({useScope:o(),scopeName:o.scopeName}));return function(a){const i=n.reduce((s,{useScope:l,scopeName:c})=>{const p=l(a)[`__scope${c}`];return{...s,...p}},{});return v.useMemo(()=>({[`__scope${t.scopeName}`]:i}),[i])}};return r.scopeName=t.scopeName,r}function Eh(e,t){typeof e=="function"?e(t):e!=null&&(e.current=t)}function Hc(...e){return t=>e.forEach(r=>Eh(r,t))}function Pe(...e){return v.useCallback(Hc(...e),e)}function Se(e,t,{checkForDefaultPrevented:r=!0}={}){return function(o){if(e==null||e(o),r===!1||!o.defaultPrevented)return t==null?void 0:t(o)}}var mt=globalThis!=null&&globalThis.document?v.useLayoutEffect:()=>{},Sh=v.useId||(()=>{}),Ch=0;function ln(e){const[t,r]=v.useState(Sh());return mt(()=>{r(n=>n??String(Ch++))},[e]),t?`radix-${t}`:""}function yt(e){const t=v.useRef(e);return v.useEffect(()=>{t.current=e}),v.useMemo(()=>(...r)=>{var n;return(n=t.current)==null?void 0:n.call(t,...r)},[])}function gn({prop:e,defaultProp:t,onChange:r=()=>{}}){const[n,o]=_h({defaultProp:t,onChange:r}),a=e!==void 0,i=a?e:n,s=yt(r),l=v.useCallback(c=>{if(a){const p=typeof c=="function"?c(e):c;p!==e&&s(p)}else o(c)},[a,e,o,s]);return[i,l]}function _h({defaultProp:e,onChange:t}){const r=v.useState(e),[n]=r,o=v.useRef(n),a=yt(t);return v.useEffect(()=>{o.current!==n&&(a(n),o.current=n)},[n,o,a]),r}var Yt=v.forwardRef((e,t)=>{const{children:r,...n}=e,o=v.Children.toArray(r),a=o.find($h);if(a){const i=a.props.children,s=o.map(l=>l===a?v.Children.count(i)>1?v.Children.only(null):v.isValidElement(i)?i.props.children:null:l);return y.jsx(va,{...n,ref:t,children:v.isValidElement(i)?v.cloneElement(i,void 0,s):null})}return y.jsx(va,{...n,ref:t,children:r})});Yt.displayName="Slot";var va=v.forwardRef((e,t)=>{const{children:r,...n}=e;if(v.isValidElement(r)){const o=Ah(r);return v.cloneElement(r,{...Th(n,r.props),ref:t?Hc(t,o):o})}return v.Children.count(r)>1?v.Children.only(null):null});va.displayName="SlotClone";var qa=({children:e})=>y.jsx(y.Fragment,{children:e});function $h(e){return v.isValidElement(e)&&e.type===qa}function Th(e,t){const r={...t};for(const n in t){const o=e[n],a=t[n];/^on[A-Z]/.test(n)?o&&a?r[n]=(...s)=>{a(...s),o(...s)}:o&&(r[n]=o):n==="style"?r[n]={...o,...a}:n==="className"&&(r[n]=[o,a].filter(Boolean).join(" "))}return{...e,...r}}function Ah(e){var n,o;let t=(n=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:n.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}var Oh=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],$e=Oh.reduce((e,t)=>{const r=v.forwardRef((n,o)=>{const{asChild:a,...i}=n,s=a?Yt:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),y.jsx(s,{...i,ref:o})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function Rh(e,t){e&&Ka.flushSync(()=>e.dispatchEvent(t))}function Ph(e,t=globalThis==null?void 0:globalThis.document){const r=yt(e);v.useEffect(()=>{const n=o=>{o.key==="Escape"&&r(o)};return t.addEventListener("keydown",n,{capture:!0}),()=>t.removeEventListener("keydown",n,{capture:!0})},[r,t])}var Mh="DismissableLayer",ba="dismissableLayer.update",Nh="dismissableLayer.pointerDownOutside",Dh="dismissableLayer.focusOutside",ys,zc=v.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Xa=v.forwardRef((e,t)=>{const{disableOutsidePointerEvents:r=!1,onEscapeKeyDown:n,onPointerDownOutside:o,onFocusOutside:a,onInteractOutside:i,onDismiss:s,...l}=e,c=v.useContext(zc),[u,p]=v.useState(null),f=(u==null?void 0:u.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,h]=v.useState({}),b=Pe(t,M=>p(M)),g=Array.from(c.layers),[m]=[...c.layersWithOutsidePointerEventsDisabled].slice(-1),w=g.indexOf(m),C=u?g.indexOf(u):-1,E=c.layersWithOutsidePointerEventsDisabled.size>0,_=C>=w,S=Ih(M=>{const I=M.target,U=[...c.branches].some(V=>V.contains(I));!_||U||(o==null||o(M),i==null||i(M),M.defaultPrevented||s==null||s())},f),O=Fh(M=>{const I=M.target;[...c.branches].some(V=>V.contains(I))||(a==null||a(M),i==null||i(M),M.defaultPrevented||s==null||s())},f);return Ph(M=>{C===c.layers.size-1&&(n==null||n(M),!M.defaultPrevented&&s&&(M.preventDefault(),s()))},f),v.useEffect(()=>{if(u)return r&&(c.layersWithOutsidePointerEventsDisabled.size===0&&(ys=f.body.style.pointerEvents,f.body.style.pointerEvents="none"),c.layersWithOutsidePointerEventsDisabled.add(u)),c.layers.add(u),xs(),()=>{r&&c.layersWithOutsidePointerEventsDisabled.size===1&&(f.body.style.pointerEvents=ys)}},[u,f,r,c]),v.useEffect(()=>()=>{u&&(c.layers.delete(u),c.layersWithOutsidePointerEventsDisabled.delete(u),xs())},[u,c]),v.useEffect(()=>{const M=()=>h({});return document.addEventListener(ba,M),()=>document.removeEventListener(ba,M)},[]),y.jsx($e.div,{...l,ref:b,style:{pointerEvents:E?_?"auto":"none":void 0,...e.style},onFocusCapture:Se(e.onFocusCapture,O.onFocusCapture),onBlurCapture:Se(e.onBlurCapture,O.onBlurCapture),onPointerDownCapture:Se(e.onPointerDownCapture,S.onPointerDownCapture)})});Xa.displayName=Mh;var kh="DismissableLayerBranch",jh=v.forwardRef((e,t)=>{const r=v.useContext(zc),n=v.useRef(null),o=Pe(t,n);return v.useEffect(()=>{const a=n.current;if(a)return r.branches.add(a),()=>{r.branches.delete(a)}},[r.branches]),y.jsx($e.div,{...e,ref:o})});jh.displayName=kh;function Ih(e,t=globalThis==null?void 0:globalThis.document){const r=yt(e),n=v.useRef(!1),o=v.useRef(()=>{});return v.useEffect(()=>{const a=s=>{if(s.target&&!n.current){let l=function(){Uc(Nh,r,c,{discrete:!0})};const c={originalEvent:s};s.pointerType==="touch"?(t.removeEventListener("click",o.current),o.current=l,t.addEventListener("click",o.current,{once:!0})):l()}else t.removeEventListener("click",o.current);n.current=!1},i=window.setTimeout(()=>{t.addEventListener("pointerdown",a)},0);return()=>{window.clearTimeout(i),t.removeEventListener("pointerdown",a),t.removeEventListener("click",o.current)}},[t,r]),{onPointerDownCapture:()=>n.current=!0}}function Fh(e,t=globalThis==null?void 0:globalThis.document){const r=yt(e),n=v.useRef(!1);return v.useEffect(()=>{const o=a=>{a.target&&!n.current&&Uc(Dh,r,{originalEvent:a},{discrete:!1})};return t.addEventListener("focusin",o),()=>t.removeEventListener("focusin",o)},[t,r]),{onFocusCapture:()=>n.current=!0,onBlurCapture:()=>n.current=!1}}function xs(){const e=new CustomEvent(ba);document.dispatchEvent(e)}function Uc(e,t,r,{discrete:n}){const o=r.originalEvent.target,a=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:r});t&&o.addEventListener(e,t,{once:!0}),n?Rh(o,a):o.dispatchEvent(a)}var Ho="focusScope.autoFocusOnMount",zo="focusScope.autoFocusOnUnmount",ws={bubbles:!1,cancelable:!0},Lh="FocusScope",Gc=v.forwardRef((e,t)=>{const{loop:r=!1,trapped:n=!1,onMountAutoFocus:o,onUnmountAutoFocus:a,...i}=e,[s,l]=v.useState(null),c=yt(o),u=yt(a),p=v.useRef(null),f=Pe(t,g=>l(g)),h=v.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;v.useEffect(()=>{if(n){let g=function(E){if(h.paused||!s)return;const _=E.target;s.contains(_)?p.current=_:Mt(p.current,{select:!0})},m=function(E){if(h.paused||!s)return;const _=E.relatedTarget;_!==null&&(s.contains(_)||Mt(p.current,{select:!0}))},w=function(E){if(document.activeElement===document.body)for(const S of E)S.removedNodes.length>0&&Mt(s)};document.addEventListener("focusin",g),document.addEventListener("focusout",m);const C=new MutationObserver(w);return s&&C.observe(s,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",g),document.removeEventListener("focusout",m),C.disconnect()}}},[n,s,h.paused]),v.useEffect(()=>{if(s){Ss.add(h);const g=document.activeElement;if(!s.contains(g)){const w=new CustomEvent(Ho,ws);s.addEventListener(Ho,c),s.dispatchEvent(w),w.defaultPrevented||(Bh(Wh(Wc(s)),{select:!0}),document.activeElement===g&&Mt(s))}return()=>{s.removeEventListener(Ho,c),setTimeout(()=>{const w=new CustomEvent(zo,ws);s.addEventListener(zo,u),s.dispatchEvent(w),w.defaultPrevented||Mt(g??document.body,{select:!0}),s.removeEventListener(zo,u),Ss.remove(h)},0)}}},[s,c,u,h]);const b=v.useCallback(g=>{if(!r&&!n||h.paused)return;const m=g.key==="Tab"&&!g.altKey&&!g.ctrlKey&&!g.metaKey,w=document.activeElement;if(m&&w){const C=g.currentTarget,[E,_]=Hh(C);E&&_?!g.shiftKey&&w===_?(g.preventDefault(),r&&Mt(E,{select:!0})):g.shiftKey&&w===E&&(g.preventDefault(),r&&Mt(_,{select:!0})):w===C&&g.preventDefault()}},[r,n,h.paused]);return y.jsx($e.div,{tabIndex:-1,...i,ref:f,onKeyDown:b})});Gc.displayName=Lh;function Bh(e,{select:t=!1}={}){const r=document.activeElement;for(const n of e)if(Mt(n,{select:t}),document.activeElement!==r)return}function Hh(e){const t=Wc(e),r=Es(t,e),n=Es(t.reverse(),e);return[r,n]}function Wc(e){const t=[],r=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:n=>{const o=n.tagName==="INPUT"&&n.type==="hidden";return n.disabled||n.hidden||o?NodeFilter.FILTER_SKIP:n.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;r.nextNode();)t.push(r.currentNode);return t}function Es(e,t){for(const r of e)if(!zh(r,{upTo:t}))return r}function zh(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function Uh(e){return e instanceof HTMLInputElement&&"select"in e}function Mt(e,{select:t=!1}={}){if(e&&e.focus){const r=document.activeElement;e.focus({preventScroll:!0}),e!==r&&Uh(e)&&t&&e.select()}}var Ss=Gh();function Gh(){let e=[];return{add(t){const r=e[0];t!==r&&(r==null||r.pause()),e=Cs(e,t),e.unshift(t)},remove(t){var r;e=Cs(e,t),(r=e[0])==null||r.resume()}}}function Cs(e,t){const r=[...e],n=r.indexOf(t);return n!==-1&&r.splice(n,1),r}function Wh(e){return e.filter(t=>t.tagName!=="A")}var Vh="Portal",Vc=v.forwardRef((e,t)=>{var s;const{container:r,...n}=e,[o,a]=v.useState(!1);mt(()=>a(!0),[]);const i=r||o&&((s=globalThis==null?void 0:globalThis.document)==null?void 0:s.body);return i?Ya.createPortal(y.jsx($e.div,{...n,ref:t}),i):null});Vc.displayName=Vh;function Yh(e,t){return v.useReducer((r,n)=>t[r][n]??r,e)}var vn=e=>{const{present:t,children:r}=e,n=Kh(t),o=typeof r=="function"?r({present:n.isPresent}):v.Children.only(r),a=Pe(n.ref,qh(o));return typeof r=="function"||n.isPresent?v.cloneElement(o,{ref:a}):null};vn.displayName="Presence";function Kh(e){const[t,r]=v.useState(),n=v.useRef({}),o=v.useRef(e),a=v.useRef("none"),i=e?"mounted":"unmounted",[s,l]=Yh(i,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return v.useEffect(()=>{const c=Pn(n.current);a.current=s==="mounted"?c:"none"},[s]),mt(()=>{const c=n.current,u=o.current;if(u!==e){const f=a.current,h=Pn(c);e?l("MOUNT"):h==="none"||(c==null?void 0:c.display)==="none"?l("UNMOUNT"):l(u&&f!==h?"ANIMATION_OUT":"UNMOUNT"),o.current=e}},[e,l]),mt(()=>{if(t){const c=p=>{const h=Pn(n.current).includes(p.animationName);p.target===t&&h&&Ka.flushSync(()=>l("ANIMATION_END"))},u=p=>{p.target===t&&(a.current=Pn(n.current))};return t.addEventListener("animationstart",u),t.addEventListener("animationcancel",c),t.addEventListener("animationend",c),()=>{t.removeEventListener("animationstart",u),t.removeEventListener("animationcancel",c),t.removeEventListener("animationend",c)}}else l("ANIMATION_END")},[t,l]),{isPresent:["mounted","unmountSuspended"].includes(s),ref:v.useCallback(c=>{c&&(n.current=getComputedStyle(c)),r(c)},[])}}function Pn(e){return(e==null?void 0:e.animationName)||"none"}function qh(e){var n,o;let t=(n=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:n.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}var Uo=0;function Xh(){v.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??_s()),document.body.insertAdjacentElement("beforeend",e[1]??_s()),Uo++,()=>{Uo===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),Uo--}},[])}function _s(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.cssText="outline: none; opacity: 0; position: fixed; pointer-events: none",e}var ct=function(){return ct=Object.assign||function(t){for(var r,n=1,o=arguments.length;n<o;n++){r=arguments[n];for(var a in r)Object.prototype.hasOwnProperty.call(r,a)&&(t[a]=r[a])}return t},ct.apply(this,arguments)};function Yc(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,n=Object.getOwnPropertySymbols(e);o<n.length;o++)t.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(r[n[o]]=e[n[o]]);return r}function Jh(e,t,r){if(r||arguments.length===2)for(var n=0,o=t.length,a;n<o;n++)(a||!(n in t))&&(a||(a=Array.prototype.slice.call(t,0,n)),a[n]=t[n]);return e.concat(a||Array.prototype.slice.call(t))}var Wn="right-scroll-bar-position",Vn="width-before-scroll-bar",Zh="with-scroll-bars-hidden",Qh="--removed-body-scroll-bar-size";function Go(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function eg(e,t){var r=d.useState(function(){return{value:e,callback:t,facade:{get current(){return r.value},set current(n){var o=r.value;o!==n&&(r.value=n,r.callback(n,o))}}}})[0];return r.callback=t,r.facade}var tg=typeof window<"u"?v.useLayoutEffect:v.useEffect,$s=new WeakMap;function rg(e,t){var r=eg(null,function(n){return e.forEach(function(o){return Go(o,n)})});return tg(function(){var n=$s.get(r);if(n){var o=new Set(n),a=new Set(e),i=r.current;o.forEach(function(s){a.has(s)||Go(s,null)}),a.forEach(function(s){o.has(s)||Go(s,i)})}$s.set(r,e)},[e]),r}function ng(e){return e}function og(e,t){t===void 0&&(t=ng);var r=[],n=!1,o={read:function(){if(n)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return r.length?r[r.length-1]:e},useMedium:function(a){var i=t(a,n);return r.push(i),function(){r=r.filter(function(s){return s!==i})}},assignSyncMedium:function(a){for(n=!0;r.length;){var i=r;r=[],i.forEach(a)}r={push:function(s){return a(s)},filter:function(){return r}}},assignMedium:function(a){n=!0;var i=[];if(r.length){var s=r;r=[],s.forEach(a),i=r}var l=function(){var u=i;i=[],u.forEach(a)},c=function(){return Promise.resolve().then(l)};c(),r={push:function(u){i.push(u),c()},filter:function(u){return i=i.filter(u),r}}}};return o}function ag(e){e===void 0&&(e={});var t=og(null);return t.options=ct({async:!0,ssr:!1},e),t}var Kc=function(e){var t=e.sideCar,r=Yc(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var n=t.read();if(!n)throw new Error("Sidecar medium not found");return v.createElement(n,ct({},r))};Kc.isSideCarExport=!0;function ig(e,t){return e.useMedium(t),Kc}var qc=ag(),Wo=function(){},fo=v.forwardRef(function(e,t){var r=v.useRef(null),n=v.useState({onScrollCapture:Wo,onWheelCapture:Wo,onTouchMoveCapture:Wo}),o=n[0],a=n[1],i=e.forwardProps,s=e.children,l=e.className,c=e.removeScrollBar,u=e.enabled,p=e.shards,f=e.sideCar,h=e.noIsolation,b=e.inert,g=e.allowPinchZoom,m=e.as,w=m===void 0?"div":m,C=e.gapMode,E=Yc(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as","gapMode"]),_=f,S=rg([r,t]),O=ct(ct({},E),o);return v.createElement(v.Fragment,null,u&&v.createElement(_,{sideCar:qc,removeScrollBar:c,shards:p,noIsolation:h,inert:b,setCallbacks:a,allowPinchZoom:!!g,lockRef:r,gapMode:C}),i?v.cloneElement(v.Children.only(s),ct(ct({},O),{ref:S})):v.createElement(w,ct({},O,{className:l,ref:S}),s))});fo.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};fo.classNames={fullWidth:Vn,zeroRight:Wn};var sg=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function lg(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=sg();return t&&e.setAttribute("nonce",t),e}function cg(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function ug(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var fg=function(){var e=0,t=null;return{add:function(r){e==0&&(t=lg())&&(cg(t,r),ug(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},dg=function(){var e=fg();return function(t,r){v.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&r])}},Xc=function(){var e=dg(),t=function(r){var n=r.styles,o=r.dynamic;return e(n,o),null};return t},pg={left:0,top:0,right:0,gap:0},Vo=function(e){return parseInt(e||"",10)||0},hg=function(e){var t=window.getComputedStyle(document.body),r=t[e==="padding"?"paddingLeft":"marginLeft"],n=t[e==="padding"?"paddingTop":"marginTop"],o=t[e==="padding"?"paddingRight":"marginRight"];return[Vo(r),Vo(n),Vo(o)]},gg=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return pg;var t=hg(e),r=document.documentElement.clientWidth,n=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,n-r+t[2]-t[0])}},vg=Xc(),_r="data-scroll-locked",bg=function(e,t,r,n){var o=e.left,a=e.top,i=e.right,s=e.gap;return r===void 0&&(r="margin"),`
|
|
76
|
+
.`.concat(Zh,` {
|
|
77
|
+
overflow: hidden `).concat(n,`;
|
|
78
|
+
padding-right: `).concat(s,"px ").concat(n,`;
|
|
79
79
|
}
|
|
80
|
-
body[`).concat(
|
|
81
|
-
overflow: hidden `).concat(
|
|
80
|
+
body[`).concat(_r,`] {
|
|
81
|
+
overflow: hidden `).concat(n,`;
|
|
82
82
|
overscroll-behavior: contain;
|
|
83
|
-
`).concat([t&&"position: relative ".concat(
|
|
83
|
+
`).concat([t&&"position: relative ".concat(n,";"),r==="margin"&&`
|
|
84
84
|
padding-left: `.concat(o,`px;
|
|
85
85
|
padding-top: `).concat(a,`px;
|
|
86
|
-
padding-right: `).concat(
|
|
86
|
+
padding-right: `).concat(i,`px;
|
|
87
87
|
margin-left:0;
|
|
88
88
|
margin-top:0;
|
|
89
|
-
margin-right: `).concat(
|
|
90
|
-
`),
|
|
89
|
+
margin-right: `).concat(s,"px ").concat(n,`;
|
|
90
|
+
`),r==="padding"&&"padding-right: ".concat(s,"px ").concat(n,";")].filter(Boolean).join(""),`
|
|
91
91
|
}
|
|
92
92
|
|
|
93
|
-
.`).concat(
|
|
94
|
-
right: `).concat(
|
|
93
|
+
.`).concat(Wn,` {
|
|
94
|
+
right: `).concat(s,"px ").concat(n,`;
|
|
95
95
|
}
|
|
96
96
|
|
|
97
|
-
.`).concat(
|
|
98
|
-
margin-right: `).concat(
|
|
97
|
+
.`).concat(Vn,` {
|
|
98
|
+
margin-right: `).concat(s,"px ").concat(n,`;
|
|
99
99
|
}
|
|
100
100
|
|
|
101
|
-
.`).concat(
|
|
102
|
-
right: 0 `).concat(
|
|
101
|
+
.`).concat(Wn," .").concat(Wn,` {
|
|
102
|
+
right: 0 `).concat(n,`;
|
|
103
103
|
}
|
|
104
104
|
|
|
105
|
-
.`).concat(
|
|
106
|
-
margin-right: 0 `).concat(
|
|
105
|
+
.`).concat(Vn," .").concat(Vn,` {
|
|
106
|
+
margin-right: 0 `).concat(n,`;
|
|
107
107
|
}
|
|
108
108
|
|
|
109
|
-
body[`).concat(
|
|
110
|
-
`).concat(
|
|
109
|
+
body[`).concat(_r,`] {
|
|
110
|
+
`).concat(Qh,": ").concat(s,`px;
|
|
111
111
|
}
|
|
112
|
-
`)},
|
|
112
|
+
`)},Ts=function(){var e=parseInt(document.body.getAttribute(_r)||"0",10);return isFinite(e)?e:0},mg=function(){v.useEffect(function(){return document.body.setAttribute(_r,(Ts()+1).toString()),function(){var e=Ts()-1;e<=0?document.body.removeAttribute(_r):document.body.setAttribute(_r,e.toString())}},[])},yg=function(e){var t=e.noRelative,r=e.noImportant,n=e.gapMode,o=n===void 0?"margin":n;mg();var a=v.useMemo(function(){return gg(o)},[o]);return v.createElement(vg,{styles:bg(a,!t,o,r?"":"!important")})},ma=!1;if(typeof window<"u")try{var Mn=Object.defineProperty({},"passive",{get:function(){return ma=!0,!0}});window.addEventListener("test",Mn,Mn),window.removeEventListener("test",Mn,Mn)}catch{ma=!1}var ar=ma?{passive:!1}:!1,xg=function(e){return e.tagName==="TEXTAREA"},Jc=function(e,t){var r=window.getComputedStyle(e);return r[t]!=="hidden"&&!(r.overflowY===r.overflowX&&!xg(e)&&r[t]==="visible")},wg=function(e){return Jc(e,"overflowY")},Eg=function(e){return Jc(e,"overflowX")},As=function(e,t){var r=t.ownerDocument,n=t;do{typeof ShadowRoot<"u"&&n instanceof ShadowRoot&&(n=n.host);var o=Zc(e,n);if(o){var a=Qc(e,n),i=a[1],s=a[2];if(i>s)return!0}n=n.parentNode}while(n&&n!==r.body);return!1},Sg=function(e){var t=e.scrollTop,r=e.scrollHeight,n=e.clientHeight;return[t,r,n]},Cg=function(e){var t=e.scrollLeft,r=e.scrollWidth,n=e.clientWidth;return[t,r,n]},Zc=function(e,t){return e==="v"?wg(t):Eg(t)},Qc=function(e,t){return e==="v"?Sg(t):Cg(t)},_g=function(e,t){return e==="h"&&t==="rtl"?-1:1},$g=function(e,t,r,n,o){var a=_g(e,window.getComputedStyle(t).direction),i=a*n,s=r.target,l=t.contains(s),c=!1,u=i>0,p=0,f=0;do{var h=Qc(e,s),b=h[0],g=h[1],m=h[2],w=g-m-a*b;(b||w)&&Zc(e,s)&&(p+=w,f+=b),s instanceof ShadowRoot?s=s.host:s=s.parentNode}while(!l&&s!==document.body||l&&(t.contains(s)||t===s));return(u&&(Math.abs(p)<1||!o)||!u&&(Math.abs(f)<1||!o))&&(c=!0),c},Nn=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},Os=function(e){return[e.deltaX,e.deltaY]},Rs=function(e){return e&&"current"in e?e.current:e},Tg=function(e,t){return e[0]===t[0]&&e[1]===t[1]},Ag=function(e){return`
|
|
113
113
|
.block-interactivity-`.concat(e,` {pointer-events: none;}
|
|
114
114
|
.allow-interactivity-`).concat(e,` {pointer-events: all;}
|
|
115
|
-
`)},
|
|
115
|
+
`)},Og=0,ir=[];function Rg(e){var t=v.useRef([]),r=v.useRef([0,0]),n=v.useRef(),o=v.useState(Og++)[0],a=v.useState(Xc)[0],i=v.useRef(e);v.useEffect(function(){i.current=e},[e]),v.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(o));var g=Jh([e.lockRef.current],(e.shards||[]).map(Rs),!0).filter(Boolean);return g.forEach(function(m){return m.classList.add("allow-interactivity-".concat(o))}),function(){document.body.classList.remove("block-interactivity-".concat(o)),g.forEach(function(m){return m.classList.remove("allow-interactivity-".concat(o))})}}},[e.inert,e.lockRef.current,e.shards]);var s=v.useCallback(function(g,m){if("touches"in g&&g.touches.length===2)return!i.current.allowPinchZoom;var w=Nn(g),C=r.current,E="deltaX"in g?g.deltaX:C[0]-w[0],_="deltaY"in g?g.deltaY:C[1]-w[1],S,O=g.target,M=Math.abs(E)>Math.abs(_)?"h":"v";if("touches"in g&&M==="h"&&O.type==="range")return!1;var I=As(M,O);if(!I)return!0;if(I?S=M:(S=M==="v"?"h":"v",I=As(M,O)),!I)return!1;if(!n.current&&"changedTouches"in g&&(E||_)&&(n.current=S),!S)return!0;var U=n.current||S;return $g(U,m,g,U==="h"?E:_,!0)},[]),l=v.useCallback(function(g){var m=g;if(!(!ir.length||ir[ir.length-1]!==a)){var w="deltaY"in m?Os(m):Nn(m),C=t.current.filter(function(S){return S.name===m.type&&(S.target===m.target||m.target===S.shadowParent)&&Tg(S.delta,w)})[0];if(C&&C.should){m.cancelable&&m.preventDefault();return}if(!C){var E=(i.current.shards||[]).map(Rs).filter(Boolean).filter(function(S){return S.contains(m.target)}),_=E.length>0?s(m,E[0]):!i.current.noIsolation;_&&m.cancelable&&m.preventDefault()}}},[]),c=v.useCallback(function(g,m,w,C){var E={name:g,delta:m,target:w,should:C,shadowParent:Pg(w)};t.current.push(E),setTimeout(function(){t.current=t.current.filter(function(_){return _!==E})},1)},[]),u=v.useCallback(function(g){r.current=Nn(g),n.current=void 0},[]),p=v.useCallback(function(g){c(g.type,Os(g),g.target,s(g,e.lockRef.current))},[]),f=v.useCallback(function(g){c(g.type,Nn(g),g.target,s(g,e.lockRef.current))},[]);v.useEffect(function(){return ir.push(a),e.setCallbacks({onScrollCapture:p,onWheelCapture:p,onTouchMoveCapture:f}),document.addEventListener("wheel",l,ar),document.addEventListener("touchmove",l,ar),document.addEventListener("touchstart",u,ar),function(){ir=ir.filter(function(g){return g!==a}),document.removeEventListener("wheel",l,ar),document.removeEventListener("touchmove",l,ar),document.removeEventListener("touchstart",u,ar)}},[]);var h=e.removeScrollBar,b=e.inert;return v.createElement(v.Fragment,null,b?v.createElement(a,{styles:Ag(o)}):null,h?v.createElement(yg,{gapMode:e.gapMode}):null)}function Pg(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const Mg=ig(qc,Rg);var eu=v.forwardRef(function(e,t){return v.createElement(fo,ct({},e,{ref:t,sideCar:Mg}))});eu.classNames=fo.classNames;var Ng=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},sr=new WeakMap,Dn=new WeakMap,kn={},Yo=0,tu=function(e){return e&&(e.host||tu(e.parentNode))},Dg=function(e,t){return t.map(function(r){if(e.contains(r))return r;var n=tu(r);return n&&e.contains(n)?n:(console.error("aria-hidden",r,"in not contained inside",e,". Doing nothing"),null)}).filter(function(r){return!!r})},kg=function(e,t,r,n){var o=Dg(t,Array.isArray(e)?e:[e]);kn[r]||(kn[r]=new WeakMap);var a=kn[r],i=[],s=new Set,l=new Set(o),c=function(p){!p||s.has(p)||(s.add(p),c(p.parentNode))};o.forEach(c);var u=function(p){!p||l.has(p)||Array.prototype.forEach.call(p.children,function(f){if(s.has(f))u(f);else try{var h=f.getAttribute(n),b=h!==null&&h!=="false",g=(sr.get(f)||0)+1,m=(a.get(f)||0)+1;sr.set(f,g),a.set(f,m),i.push(f),g===1&&b&&Dn.set(f,!0),m===1&&f.setAttribute(r,"true"),b||f.setAttribute(n,"true")}catch(w){console.error("aria-hidden: cannot operate on ",f,w)}})};return u(t),s.clear(),Yo++,function(){i.forEach(function(p){var f=sr.get(p)-1,h=a.get(p)-1;sr.set(p,f),a.set(p,h),f||(Dn.has(p)||p.removeAttribute(n),Dn.delete(p)),h||p.removeAttribute(r)}),Yo--,Yo||(sr=new WeakMap,sr=new WeakMap,Dn=new WeakMap,kn={})}},jg=function(e,t,r){r===void 0&&(r="data-aria-hidden");var n=Array.from(Array.isArray(e)?e:[e]),o=Ng(e);return o?(n.push.apply(n,Array.from(o.querySelectorAll("[aria-live]"))),kg(n,o,r,"aria-hidden")):function(){return null}},Ja="Dialog",[ru,nu]=zt(Ja),[Ig,nt]=ru(Ja),ou=e=>{const{__scopeDialog:t,children:r,open:n,defaultOpen:o,onOpenChange:a,modal:i=!0}=e,s=v.useRef(null),l=v.useRef(null),[c=!1,u]=gn({prop:n,defaultProp:o,onChange:a});return y.jsx(Ig,{scope:t,triggerRef:s,contentRef:l,contentId:ln(),titleId:ln(),descriptionId:ln(),open:c,onOpenChange:u,onOpenToggle:v.useCallback(()=>u(p=>!p),[u]),modal:i,children:r})};ou.displayName=Ja;var au="DialogTrigger",iu=v.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,o=nt(au,r),a=Pe(t,o.triggerRef);return y.jsx($e.button,{type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.contentId,"data-state":ei(o.open),...n,ref:a,onClick:Se(e.onClick,o.onOpenToggle)})});iu.displayName=au;var Za="DialogPortal",[Fg,su]=ru(Za,{forceMount:void 0}),lu=e=>{const{__scopeDialog:t,forceMount:r,children:n,container:o}=e,a=nt(Za,t);return y.jsx(Fg,{scope:t,forceMount:r,children:v.Children.map(n,i=>y.jsx(vn,{present:r||a.open,children:y.jsx(Vc,{asChild:!0,container:o,children:i})}))})};lu.displayName=Za;var qn="DialogOverlay",cu=v.forwardRef((e,t)=>{const r=su(qn,e.__scopeDialog),{forceMount:n=r.forceMount,...o}=e,a=nt(qn,e.__scopeDialog);return a.modal?y.jsx(vn,{present:n||a.open,children:y.jsx(Lg,{...o,ref:t})}):null});cu.displayName=qn;var Lg=v.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,o=nt(qn,r);return y.jsx(eu,{as:Yt,allowPinchZoom:!0,shards:[o.contentRef],children:y.jsx($e.div,{"data-state":ei(o.open),...n,ref:t,style:{pointerEvents:"auto",...n.style}})})}),Kt="DialogContent",uu=v.forwardRef((e,t)=>{const r=su(Kt,e.__scopeDialog),{forceMount:n=r.forceMount,...o}=e,a=nt(Kt,e.__scopeDialog);return y.jsx(vn,{present:n||a.open,children:a.modal?y.jsx(Bg,{...o,ref:t}):y.jsx(Hg,{...o,ref:t})})});uu.displayName=Kt;var Bg=v.forwardRef((e,t)=>{const r=nt(Kt,e.__scopeDialog),n=v.useRef(null),o=Pe(t,r.contentRef,n);return v.useEffect(()=>{const a=n.current;if(a)return jg(a)},[]),y.jsx(fu,{...e,ref:o,trapFocus:r.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:Se(e.onCloseAutoFocus,a=>{var i;a.preventDefault(),(i=r.triggerRef.current)==null||i.focus()}),onPointerDownOutside:Se(e.onPointerDownOutside,a=>{const i=a.detail.originalEvent,s=i.button===0&&i.ctrlKey===!0;(i.button===2||s)&&a.preventDefault()}),onFocusOutside:Se(e.onFocusOutside,a=>a.preventDefault())})}),Hg=v.forwardRef((e,t)=>{const r=nt(Kt,e.__scopeDialog),n=v.useRef(!1),o=v.useRef(!1);return y.jsx(fu,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:a=>{var i,s;(i=e.onCloseAutoFocus)==null||i.call(e,a),a.defaultPrevented||(n.current||(s=r.triggerRef.current)==null||s.focus(),a.preventDefault()),n.current=!1,o.current=!1},onInteractOutside:a=>{var l,c;(l=e.onInteractOutside)==null||l.call(e,a),a.defaultPrevented||(n.current=!0,a.detail.originalEvent.type==="pointerdown"&&(o.current=!0));const i=a.target;((c=r.triggerRef.current)==null?void 0:c.contains(i))&&a.preventDefault(),a.detail.originalEvent.type==="focusin"&&o.current&&a.preventDefault()}})}),fu=v.forwardRef((e,t)=>{const{__scopeDialog:r,trapFocus:n,onOpenAutoFocus:o,onCloseAutoFocus:a,...i}=e,s=nt(Kt,r),l=v.useRef(null),c=Pe(t,l);return Xh(),y.jsxs(y.Fragment,{children:[y.jsx(Gc,{asChild:!0,loop:!0,trapped:n,onMountAutoFocus:o,onUnmountAutoFocus:a,children:y.jsx(Xa,{role:"dialog",id:s.contentId,"aria-describedby":s.descriptionId,"aria-labelledby":s.titleId,"data-state":ei(s.open),...i,ref:c,onDismiss:()=>s.onOpenChange(!1)})}),y.jsxs(y.Fragment,{children:[y.jsx(Ug,{titleId:s.titleId}),y.jsx(Wg,{contentRef:l,descriptionId:s.descriptionId})]})]})}),Qa="DialogTitle",du=v.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,o=nt(Qa,r);return y.jsx($e.h2,{id:o.titleId,...n,ref:t})});du.displayName=Qa;var pu="DialogDescription",hu=v.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,o=nt(pu,r);return y.jsx($e.p,{id:o.descriptionId,...n,ref:t})});hu.displayName=pu;var gu="DialogClose",vu=v.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,o=nt(gu,r);return y.jsx($e.button,{type:"button",...n,ref:t,onClick:Se(e.onClick,()=>o.onOpenChange(!1))})});vu.displayName=gu;function ei(e){return e?"open":"closed"}var bu="DialogTitleWarning",[zg,mu]=xh(bu,{contentName:Kt,titleName:Qa,docsSlug:"dialog"}),Ug=({titleId:e})=>{const t=mu(bu),r=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
|
|
116
116
|
|
|
117
117
|
If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.
|
|
118
118
|
|
|
119
|
-
For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return
|
|
119
|
+
For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return v.useEffect(()=>{e&&(document.getElementById(e)||console.error(r))},[r,e]),null},Gg="DialogDescriptionWarning",Wg=({contentRef:e,descriptionId:t})=>{const n=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${mu(Gg).contentName}}.`;return v.useEffect(()=>{var a;const o=(a=e.current)==null?void 0:a.getAttribute("aria-describedby");t&&o&&(document.getElementById(t)||console.warn(n))},[n,e,t]),null},Vg=ou,Yg=iu,Kg=lu,qg=cu,Xg=uu,Jg=du,Zg=hu,yu=vu,xu="AlertDialog",[Qg,Jk]=zt(xu,[nu]),Et=nu(),wu=e=>{const{__scopeAlertDialog:t,...r}=e,n=Et(t);return y.jsx(Vg,{...n,...r,modal:!0})};wu.displayName=xu;var ev="AlertDialogTrigger",Eu=v.forwardRef((e,t)=>{const{__scopeAlertDialog:r,...n}=e,o=Et(r);return y.jsx(Yg,{...o,...n,ref:t})});Eu.displayName=ev;var tv="AlertDialogPortal",Su=e=>{const{__scopeAlertDialog:t,...r}=e,n=Et(t);return y.jsx(Kg,{...n,...r})};Su.displayName=tv;var rv="AlertDialogOverlay",Cu=v.forwardRef((e,t)=>{const{__scopeAlertDialog:r,...n}=e,o=Et(r);return y.jsx(qg,{...o,...n,ref:t})});Cu.displayName=rv;var $r="AlertDialogContent",[nv,ov]=Qg($r),_u=v.forwardRef((e,t)=>{const{__scopeAlertDialog:r,children:n,...o}=e,a=Et(r),i=v.useRef(null),s=Pe(t,i),l=v.useRef(null);return y.jsx(zg,{contentName:$r,titleName:$u,docsSlug:"alert-dialog",children:y.jsx(nv,{scope:r,cancelRef:l,children:y.jsxs(Xg,{role:"alertdialog",...a,...o,ref:s,onOpenAutoFocus:Se(o.onOpenAutoFocus,c=>{var u;c.preventDefault(),(u=l.current)==null||u.focus({preventScroll:!0})}),onPointerDownOutside:c=>c.preventDefault(),onInteractOutside:c=>c.preventDefault(),children:[y.jsx(qa,{children:n}),y.jsx(iv,{contentRef:i})]})})})});_u.displayName=$r;var $u="AlertDialogTitle",Tu=v.forwardRef((e,t)=>{const{__scopeAlertDialog:r,...n}=e,o=Et(r);return y.jsx(Jg,{...o,...n,ref:t})});Tu.displayName=$u;var Au="AlertDialogDescription",Ou=v.forwardRef((e,t)=>{const{__scopeAlertDialog:r,...n}=e,o=Et(r);return y.jsx(Zg,{...o,...n,ref:t})});Ou.displayName=Au;var av="AlertDialogAction",Ru=v.forwardRef((e,t)=>{const{__scopeAlertDialog:r,...n}=e,o=Et(r);return y.jsx(yu,{...o,...n,ref:t})});Ru.displayName=av;var Pu="AlertDialogCancel",Mu=v.forwardRef((e,t)=>{const{__scopeAlertDialog:r,...n}=e,{cancelRef:o}=ov(Pu,r),a=Et(r),i=Pe(t,o);return y.jsx(yu,{...a,...n,ref:i})});Mu.displayName=Pu;var iv=({contentRef:e})=>{const t=`\`${$r}\` requires a description for the component to be accessible for screen reader users.
|
|
120
120
|
|
|
121
|
-
You can add a description to the \`${
|
|
121
|
+
You can add a description to the \`${$r}\` by passing a \`${Au}\` component as a child, which also benefits sighted users by adding visible context to the dialog.
|
|
122
122
|
|
|
123
|
-
Alternatively, you can use your own component as a description by assigning it an \`id\` and passing the same value to the \`aria-describedby\` prop in \`${
|
|
123
|
+
Alternatively, you can use your own component as a description by assigning it an \`id\` and passing the same value to the \`aria-describedby\` prop in \`${$r}\`. If the description is confusing or duplicative for sighted users, you can use the \`@radix-ui/react-visually-hidden\` primitive as a wrapper around your description component.
|
|
124
124
|
|
|
125
|
-
For more information, see https://radix-ui.com/primitives/docs/components/alert-dialog`;return d.useEffect(()=>{var r;document.getElementById((r=e.current)==null?void 0:r.getAttribute("aria-describedby"))||console.warn(t)},[t,e]),null},gl=oa,hl=aa,yl=sa,ga=ia,ha=ca,ya=pa,ba=ma,xa=ua,wa=fa;function Ea(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(n=Ea(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function bl(){for(var e,t,n=0,r="",o=arguments.length;n<o;n++)(e=arguments[n])&&(t=Ea(e))&&(r&&(r+=" "),r+=t);return r}const mr="-";function xl(e){const t=El(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;function o(s){const i=s.split(mr);return i[0]===""&&i.length!==1&&i.shift(),Ca(i,t)||wl(s)}function a(s,i){const c=n[s]||[];return i&&r[s]?[...c,...r[s]]:c}return{getClassGroupId:o,getConflictingClassGroupIds:a}}function Ca(e,t){var s;if(e.length===0)return t.classGroupId;const n=e[0],r=t.nextPart.get(n),o=r?Ca(e.slice(1),r):void 0;if(o)return o;if(t.validators.length===0)return;const a=e.join(mr);return(s=t.validators.find(({validator:i})=>i(a)))==null?void 0:s.classGroupId}const no=/^\[(.+)\]$/;function wl(e){if(no.test(e)){const t=no.exec(e)[1],n=t==null?void 0:t.substring(0,t.indexOf(":"));if(n)return"arbitrary.."+n}}function El(e){const{theme:t,prefix:n}=e,r={nextPart:new Map,validators:[]};return Sl(Object.entries(e.classGroups),n).forEach(([a,s])=>{Gn(s,r,a,t)}),r}function Gn(e,t,n,r){e.forEach(o=>{if(typeof o=="string"){const a=o===""?t:ro(t,o);a.classGroupId=n;return}if(typeof o=="function"){if(Cl(o)){Gn(o(r),t,n,r);return}t.validators.push({validator:o,classGroupId:n});return}Object.entries(o).forEach(([a,s])=>{Gn(s,ro(t,a),n,r)})})}function ro(e,t){let n=e;return t.split(mr).forEach(r=>{n.nextPart.has(r)||n.nextPart.set(r,{nextPart:new Map,validators:[]}),n=n.nextPart.get(r)}),n}function Cl(e){return e.isThemeGetter}function Sl(e,t){return t?e.map(([n,r])=>{const o=r.map(a=>typeof a=="string"?t+a:typeof a=="object"?Object.fromEntries(Object.entries(a).map(([s,i])=>[t+s,i])):a);return[n,o]}):e}function Rl(e){if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=new Map,r=new Map;function o(a,s){n.set(a,s),t++,t>e&&(t=0,r=n,n=new Map)}return{get(a){let s=n.get(a);if(s!==void 0)return s;if((s=r.get(a))!==void 0)return o(a,s),s},set(a,s){n.has(a)?n.set(a,s):o(a,s)}}}const Sa="!";function Pl(e){const{separator:t,experimentalParseClassName:n}=e,r=t.length===1,o=t[0],a=t.length;function s(i){const c=[];let u=0,f=0,p;for(let b=0;b<i.length;b++){let x=i[b];if(u===0){if(x===o&&(r||i.slice(b,b+a)===t)){c.push(i.slice(f,b)),f=b+a;continue}if(x==="/"){p=b;continue}}x==="["?u++:x==="]"&&u--}const l=c.length===0?i:i.substring(f),g=l.startsWith(Sa),y=g?l.substring(1):l,h=p&&p>f?p-f:void 0;return{modifiers:c,hasImportantModifier:g,baseClassName:y,maybePostfixModifierPosition:h}}return n?function(c){return n({className:c,parseClassName:s})}:s}function Al(e){if(e.length<=1)return e;const t=[];let n=[];return e.forEach(r=>{r[0]==="["?(t.push(...n.sort(),r),n=[]):n.push(r)}),t.push(...n.sort()),t}function Tl(e){return{cache:Rl(e.cacheSize),parseClassName:Pl(e),...xl(e)}}const Nl=/\s+/;function Ol(e,t){const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:o}=t,a=new Set;return e.trim().split(Nl).map(s=>{const{modifiers:i,hasImportantModifier:c,baseClassName:u,maybePostfixModifierPosition:f}=n(s);let p=!!f,l=r(p?u.substring(0,f):u);if(!l){if(!p)return{isTailwindClass:!1,originalClassName:s};if(l=r(u),!l)return{isTailwindClass:!1,originalClassName:s};p=!1}const g=Al(i).join(":");return{isTailwindClass:!0,modifierId:c?g+Sa:g,classGroupId:l,originalClassName:s,hasPostfixModifier:p}}).reverse().filter(s=>{if(!s.isTailwindClass)return!0;const{modifierId:i,classGroupId:c,hasPostfixModifier:u}=s,f=i+c;return a.has(f)?!1:(a.add(f),o(c,u).forEach(p=>a.add(i+p)),!0)}).reverse().map(s=>s.originalClassName).join(" ")}function Dl(){let e=0,t,n,r="";for(;e<arguments.length;)(t=arguments[e++])&&(n=Ra(t))&&(r&&(r+=" "),r+=n);return r}function Ra(e){if(typeof e=="string")return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=Ra(e[r]))&&(n&&(n+=" "),n+=t);return n}function kl(e,...t){let n,r,o,a=s;function s(c){const u=t.reduce((f,p)=>p(f),e());return n=Tl(u),r=n.cache.get,o=n.cache.set,a=i,i(c)}function i(c){const u=r(c);if(u)return u;const f=Ol(c,n);return o(c,f),f}return function(){return a(Dl.apply(null,arguments))}}function re(e){const t=n=>n[e]||[];return t.isThemeGetter=!0,t}const Pa=/^\[(?:([a-z-]+):)?(.+)\]$/i,_l=/^\d+\/\d+$/,jl=new Set(["px","full","screen"]),Ml=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Il=/\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$/,Ll=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,Fl=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,$l=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/;function $e(e){return st(e)||jl.has(e)||_l.test(e)}function Ke(e){return Rt(e,"length",Yl)}function st(e){return!!e&&!Number.isNaN(Number(e))}function en(e){return Rt(e,"number",st)}function It(e){return!!e&&Number.isInteger(Number(e))}function Bl(e){return e.endsWith("%")&&st(e.slice(0,-1))}function W(e){return Pa.test(e)}function qe(e){return Ml.test(e)}const Wl=new Set(["length","size","percentage"]);function Vl(e){return Rt(e,Wl,Aa)}function zl(e){return Rt(e,"position",Aa)}const Ul=new Set(["image","url"]);function Hl(e){return Rt(e,Ul,ql)}function Gl(e){return Rt(e,"",Kl)}function Lt(){return!0}function Rt(e,t,n){const r=Pa.exec(e);return r?r[1]?typeof t=="string"?r[1]===t:t.has(r[1]):n(r[2]):!1}function Yl(e){return Il.test(e)&&!Ll.test(e)}function Aa(){return!1}function Kl(e){return Fl.test(e)}function ql(e){return $l.test(e)}function Xl(){const e=re("colors"),t=re("spacing"),n=re("blur"),r=re("brightness"),o=re("borderColor"),a=re("borderRadius"),s=re("borderSpacing"),i=re("borderWidth"),c=re("contrast"),u=re("grayscale"),f=re("hueRotate"),p=re("invert"),l=re("gap"),g=re("gradientColorStops"),y=re("gradientColorStopPositions"),h=re("inset"),b=re("margin"),x=re("opacity"),w=re("padding"),C=re("saturate"),P=re("scale"),R=re("sepia"),D=re("skew"),A=re("space"),O=re("translate"),$=()=>["auto","contain","none"],M=()=>["auto","hidden","clip","visible","scroll"],z=()=>["auto",W,t],k=()=>[W,t],I=()=>["",$e,Ke],B=()=>["auto",st,W],q=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],_=()=>["solid","dashed","dotted","double","none"],X=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],N=()=>["start","end","center","between","around","evenly","stretch"],U=()=>["","0",W],se=()=>["auto","avoid","all","avoid-page","page","left","right","column"],L=()=>[st,en],H=()=>[st,W];return{cacheSize:500,separator:":",theme:{colors:[Lt],spacing:[$e,Ke],blur:["none","",qe,W],brightness:L(),borderColor:[e],borderRadius:["none","","full",qe,W],borderSpacing:k(),borderWidth:I(),contrast:L(),grayscale:U(),hueRotate:H(),invert:U(),gap:k(),gradientColorStops:[e],gradientColorStopPositions:[Bl,Ke],inset:z(),margin:z(),opacity:L(),padding:k(),saturate:L(),scale:L(),sepia:U(),skew:H(),space:k(),translate:k()},classGroups:{aspect:[{aspect:["auto","square","video",W]}],container:["container"],columns:[{columns:[qe]}],"break-after":[{"break-after":se()}],"break-before":[{"break-before":se()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:[...q(),W]}],overflow:[{overflow:M()}],"overflow-x":[{"overflow-x":M()}],"overflow-y":[{"overflow-y":M()}],overscroll:[{overscroll:$()}],"overscroll-x":[{"overscroll-x":$()}],"overscroll-y":[{"overscroll-y":$()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[h]}],"inset-x":[{"inset-x":[h]}],"inset-y":[{"inset-y":[h]}],start:[{start:[h]}],end:[{end:[h]}],top:[{top:[h]}],right:[{right:[h]}],bottom:[{bottom:[h]}],left:[{left:[h]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",It,W]}],basis:[{basis:z()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",W]}],grow:[{grow:U()}],shrink:[{shrink:U()}],order:[{order:["first","last","none",It,W]}],"grid-cols":[{"grid-cols":[Lt]}],"col-start-end":[{col:["auto",{span:["full",It,W]},W]}],"col-start":[{"col-start":B()}],"col-end":[{"col-end":B()}],"grid-rows":[{"grid-rows":[Lt]}],"row-start-end":[{row:["auto",{span:[It,W]},W]}],"row-start":[{"row-start":B()}],"row-end":[{"row-end":B()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",W]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",W]}],gap:[{gap:[l]}],"gap-x":[{"gap-x":[l]}],"gap-y":[{"gap-y":[l]}],"justify-content":[{justify:["normal",...N()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...N(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...N(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[w]}],px:[{px:[w]}],py:[{py:[w]}],ps:[{ps:[w]}],pe:[{pe:[w]}],pt:[{pt:[w]}],pr:[{pr:[w]}],pb:[{pb:[w]}],pl:[{pl:[w]}],m:[{m:[b]}],mx:[{mx:[b]}],my:[{my:[b]}],ms:[{ms:[b]}],me:[{me:[b]}],mt:[{mt:[b]}],mr:[{mr:[b]}],mb:[{mb:[b]}],ml:[{ml:[b]}],"space-x":[{"space-x":[A]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[A]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",W,t]}],"min-w":[{"min-w":[W,t,"min","max","fit"]}],"max-w":[{"max-w":[W,t,"none","full","min","max","fit","prose",{screen:[qe]},qe]}],h:[{h:[W,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[W,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[W,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[W,t,"auto","min","max","fit"]}],"font-size":[{text:["base",qe,Ke]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",en]}],"font-family":[{font:[Lt]}],"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-fractons"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",W]}],"line-clamp":[{"line-clamp":["none",st,en]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",$e,W]}],"list-image":[{"list-image":["none",W]}],"list-style-type":[{list:["none","disc","decimal",W]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[x]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[x]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[..._(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",$e,Ke]}],"underline-offset":[{"underline-offset":["auto",$e,W]}],"text-decoration-color":[{decoration:[e]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:k()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",W]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",W]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[x]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...q(),zl]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",Vl]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},Hl]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[y]}],"gradient-via-pos":[{via:[y]}],"gradient-to-pos":[{to:[y]}],"gradient-from":[{from:[g]}],"gradient-via":[{via:[g]}],"gradient-to":[{to:[g]}],rounded:[{rounded:[a]}],"rounded-s":[{"rounded-s":[a]}],"rounded-e":[{"rounded-e":[a]}],"rounded-t":[{"rounded-t":[a]}],"rounded-r":[{"rounded-r":[a]}],"rounded-b":[{"rounded-b":[a]}],"rounded-l":[{"rounded-l":[a]}],"rounded-ss":[{"rounded-ss":[a]}],"rounded-se":[{"rounded-se":[a]}],"rounded-ee":[{"rounded-ee":[a]}],"rounded-es":[{"rounded-es":[a]}],"rounded-tl":[{"rounded-tl":[a]}],"rounded-tr":[{"rounded-tr":[a]}],"rounded-br":[{"rounded-br":[a]}],"rounded-bl":[{"rounded-bl":[a]}],"border-w":[{border:[i]}],"border-w-x":[{"border-x":[i]}],"border-w-y":[{"border-y":[i]}],"border-w-s":[{"border-s":[i]}],"border-w-e":[{"border-e":[i]}],"border-w-t":[{"border-t":[i]}],"border-w-r":[{"border-r":[i]}],"border-w-b":[{"border-b":[i]}],"border-w-l":[{"border-l":[i]}],"border-opacity":[{"border-opacity":[x]}],"border-style":[{border:[..._(),"hidden"]}],"divide-x":[{"divide-x":[i]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[i]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[x]}],"divide-style":[{divide:_()}],"border-color":[{border:[o]}],"border-color-x":[{"border-x":[o]}],"border-color-y":[{"border-y":[o]}],"border-color-t":[{"border-t":[o]}],"border-color-r":[{"border-r":[o]}],"border-color-b":[{"border-b":[o]}],"border-color-l":[{"border-l":[o]}],"divide-color":[{divide:[o]}],"outline-style":[{outline:["",..._()]}],"outline-offset":[{"outline-offset":[$e,W]}],"outline-w":[{outline:[$e,Ke]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:I()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[x]}],"ring-offset-w":[{"ring-offset":[$e,Ke]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",qe,Gl]}],"shadow-color":[{shadow:[Lt]}],opacity:[{opacity:[x]}],"mix-blend":[{"mix-blend":[...X(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":X()}],filter:[{filter:["","none"]}],blur:[{blur:[n]}],brightness:[{brightness:[r]}],contrast:[{contrast:[c]}],"drop-shadow":[{"drop-shadow":["","none",qe,W]}],grayscale:[{grayscale:[u]}],"hue-rotate":[{"hue-rotate":[f]}],invert:[{invert:[p]}],saturate:[{saturate:[C]}],sepia:[{sepia:[R]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[n]}],"backdrop-brightness":[{"backdrop-brightness":[r]}],"backdrop-contrast":[{"backdrop-contrast":[c]}],"backdrop-grayscale":[{"backdrop-grayscale":[u]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[f]}],"backdrop-invert":[{"backdrop-invert":[p]}],"backdrop-opacity":[{"backdrop-opacity":[x]}],"backdrop-saturate":[{"backdrop-saturate":[C]}],"backdrop-sepia":[{"backdrop-sepia":[R]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[s]}],"border-spacing-x":[{"border-spacing-x":[s]}],"border-spacing-y":[{"border-spacing-y":[s]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",W]}],duration:[{duration:H()}],ease:[{ease:["linear","in","out","in-out",W]}],delay:[{delay:H()}],animate:[{animate:["none","spin","ping","pulse","bounce",W]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[P]}],"scale-x":[{"scale-x":[P]}],"scale-y":[{"scale-y":[P]}],rotate:[{rotate:[It,W]}],"translate-x":[{"translate-x":[O]}],"translate-y":[{"translate-y":[O]}],"skew-x":[{"skew-x":[D]}],"skew-y":[{"skew-y":[D]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",W]}],accent:[{accent:["auto",e]}],appearance:[{appearance:["none","auto"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",W]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":k()}],"scroll-mx":[{"scroll-mx":k()}],"scroll-my":[{"scroll-my":k()}],"scroll-ms":[{"scroll-ms":k()}],"scroll-me":[{"scroll-me":k()}],"scroll-mt":[{"scroll-mt":k()}],"scroll-mr":[{"scroll-mr":k()}],"scroll-mb":[{"scroll-mb":k()}],"scroll-ml":[{"scroll-ml":k()}],"scroll-p":[{"scroll-p":k()}],"scroll-px":[{"scroll-px":k()}],"scroll-py":[{"scroll-py":k()}],"scroll-ps":[{"scroll-ps":k()}],"scroll-pe":[{"scroll-pe":k()}],"scroll-pt":[{"scroll-pt":k()}],"scroll-pr":[{"scroll-pr":k()}],"scroll-pb":[{"scroll-pb":k()}],"scroll-pl":[{"scroll-pl":k()}],"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",W]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[$e,Ke,en]}],stroke:[{stroke:[e,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}}const Jl=kl(Xl);function de(...e){return Jl(bl(e))}function Ta(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e))for(t=0;t<e.length;t++)e[t]&&(n=Ta(e[t]))&&(r&&(r+=" "),r+=n);else for(t in e)e[t]&&(r&&(r+=" "),r+=t);return r}function Zl(){for(var e,t,n=0,r="";n<arguments.length;)(e=arguments[n++])&&(t=Ta(e))&&(r&&(r+=" "),r+=t);return r}const oo=e=>typeof e=="boolean"?"".concat(e):e===0?"0":e,ao=Zl,mn=(e,t)=>n=>{var r;if((t==null?void 0:t.variants)==null)return ao(e,n==null?void 0:n.class,n==null?void 0:n.className);const{variants:o,defaultVariants:a}=t,s=Object.keys(o).map(u=>{const f=n==null?void 0:n[u],p=a==null?void 0:a[u];if(f===null)return null;const l=oo(f)||oo(p);return o[u][l]}),i=n&&Object.entries(n).reduce((u,f)=>{let[p,l]=f;return l===void 0||(u[p]=l),u},{}),c=t==null||(r=t.compoundVariants)===null||r===void 0?void 0:r.reduce((u,f)=>{let{class:p,className:l,...g}=f;return Object.entries(g).every(y=>{let[h,b]=y;return Array.isArray(b)?b.includes({...a,...i}[h]):{...a,...i}[h]===b})?[...u,p,l]:u},[]);return ao(e,s,c,n==null?void 0:n.class,n==null?void 0:n.className)},gr=mn("inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-secondary active:bg-primary-foreground active:text-primary active:border-primary focus:border-2",secondary:"bg-primary-foreground text-primary border-2 border-primary hover:bg-primary hover:text-primary-foreground active:bg-secondary active:text-secondary-foreground focus:border-2",destructive:"bg-destructive text-destructive-foreground hover:bg-destructive/90",outline:"border-primary border-input bg-background hover:bg-accent hover:text-accent-foreground",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-10 rounded-md px-4 py-2",sm:"h-9 rounded-md px-3",lg:"h-11 rounded-md px-8",icon:"h-10 w-10"}},defaultVariants:{variant:"default",size:"default"}}),Ql=d.forwardRef(({className:e,variant:t,size:n,asChild:r=!1,...o},a)=>{const s=r?it:"button";return v.jsx(s,{className:de(gr({variant:t,size:n,className:e})),ref:a,...o})});Ql.displayName="Button";const eu=gl,tu=hl,nu=yl,Na=d.forwardRef(({className:e,...t},n)=>v.jsx(ga,{className:de("ve-fixed ve-inset-0 ve-z-50 ve-bg-black/80 data-[state=open]:ve-animate-in data-[state=closed]:ve-animate-out data-[state=closed]:ve-fade-out-0 data-[state=open]:ve-fade-in-0",e),...t,ref:n}));Na.displayName=ga.displayName;const Oa=d.forwardRef(({className:e,...t},n)=>v.jsxs(nu,{children:[v.jsx(Na,{}),v.jsx(ha,{ref:n,className:de("ve-fixed ve-left-[50%] ve-top-[50%] ve-z-50 ve-grid ve-w-full ve-max-w-lg ve-translate-x-[-50%] ve-translate-y-[-50%] ve-gap-4 ve-border ve-bg-background ve-p-6 ve-shadow-lg ve-duration-200 data-[state=open]:ve-animate-in data-[state=closed]:ve-animate-out data-[state=closed]:ve-fade-out-0 data-[state=open]:ve-fade-in-0 data-[state=closed]:ve-zoom-out-95 data-[state=open]:ve-zoom-in-95 data-[state=closed]:ve-slide-out-to-left-1/2 data-[state=closed]:ve-slide-out-to-top-[48%] data-[state=open]:ve-slide-in-from-left-1/2 data-[state=open]:ve-slide-in-from-top-[48%] sm:ve-rounded-lg",e),...t})]}));Oa.displayName=ha.displayName;const Da=({className:e,...t})=>v.jsx("div",{className:de("ve-flex ve-flex-col ve-space-y-2 ve-text-center sm:ve-text-left",e),...t});Da.displayName="AlertDialogHeader";const ka=({className:e,...t})=>v.jsx("div",{className:de("ve-flex ve-flex-col-reverse sm:ve-flex-row sm:ve-justify-end sm:ve-space-x-2",e),...t});ka.displayName="AlertDialogFooter";const _a=d.forwardRef(({className:e,...t},n)=>v.jsx(xa,{ref:n,className:de("ve-text-lg ve-font-semibold",e),...t}));_a.displayName=xa.displayName;const ja=d.forwardRef(({className:e,...t},n)=>v.jsx(wa,{ref:n,className:de("ve-text-sm ve-text-muted-foreground",e),...t}));ja.displayName=wa.displayName;const ru=d.forwardRef(({className:e,...t},n)=>v.jsx(ya,{ref:n,className:de(gr(),e),...t}));ru.displayName=ya.displayName;const Ma=d.forwardRef(({className:e,...t},n)=>v.jsx(ba,{ref:n,className:de(gr({variant:"outline"}),"ve-mt-2 sm:ve-mt-0",e),...t}));Ma.displayName=ba.displayName;const ou=mn("ve-inline-flex ve-items-center ve-justify-center ve-whitespace-nowrap ve-rounded-md ve-text-sm ve-font-medium ve-ring-offset-background ve-transition-colors focus-visible:ve-outline-none focus-visible:ve-ring-2 focus-visible:ve-ring-ring focus-visible:ve-ring-offset-2 disabled:ve-pointer-events-none disabled:ve-opacity-50",{variants:{variant:{default:"ve-bg-primary ve-text-primary-foreground hover:ve-bg-primary/90",destructive:"ve-bg-destructive ve-text-destructive-foreground hover:ve-bg-destructive/90",outline:"ve-border ve-border-input ve-bg-background hover:ve-bg-accent hover:ve-text-accent-foreground",secondary:"ve-bg-secondary ve-text-secondary-foreground hover:ve-bg-secondary/80",ghost:"hover:ve-bg-accent hover:ve-text-accent-foreground",link:"ve-text-primary ve-underline-offset-4 hover:ve-underline"},size:{default:"ve-h-10 ve-rounded-md ve-px-4 ve-py-2",sm:"ve-h-9 ve-rounded-md ve-px-3",lg:"ve-h-11 ve-rounded-md ve-px-8",icon:"ve-h-10 ve-w-10"}},defaultVariants:{variant:"default",size:"default"}}),Je=d.forwardRef(({className:e,variant:t,size:n,asChild:r=!1,...o},a)=>{const s=r?it:"button";return v.jsx(s,{className:de(ou({variant:t,size:n,className:e})),ref:a,...o})});Je.displayName="Button";function Ia(e){const t=d.useRef({value:e,previous:e});return d.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}function hr(e){const[t,n]=d.useState(void 0);return We(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const r=new ResizeObserver(o=>{if(!Array.isArray(o)||!o.length)return;const a=o[0];let s,i;if("borderBoxSize"in a){const c=a.borderBoxSize,u=Array.isArray(c)?c[0]:c;s=u.inlineSize,i=u.blockSize}else s=e.offsetWidth,i=e.offsetHeight;n({width:s,height:i})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}else n(void 0)},[e]),t}var yr="Switch",[au,Lp]=nt(yr),[su,iu]=au(yr),La=d.forwardRef((e,t)=>{const{__scopeSwitch:n,name:r,checked:o,defaultChecked:a,required:s,disabled:i,value:c="on",onCheckedChange:u,...f}=e,[p,l]=d.useState(null),g=ue(t,w=>l(w)),y=d.useRef(!1),h=p?!!p.closest("form"):!0,[b=!1,x]=Vt({prop:o,defaultProp:a,onChange:u});return v.jsxs(su,{scope:n,checked:b,disabled:i,children:[v.jsx(ae.button,{type:"button",role:"switch","aria-checked":b,"aria-required":s,"data-state":Ba(b),"data-disabled":i?"":void 0,disabled:i,value:c,...f,ref:g,onClick:oe(e.onClick,w=>{x(C=>!C),h&&(y.current=w.isPropagationStopped(),y.current||w.stopPropagation())})}),h&&v.jsx(cu,{control:p,bubbles:!y.current,name:r,value:c,checked:b,required:s,disabled:i,style:{transform:"translateX(-100%)"}})]})});La.displayName=yr;var Fa="SwitchThumb",$a=d.forwardRef((e,t)=>{const{__scopeSwitch:n,...r}=e,o=iu(Fa,n);return v.jsx(ae.span,{"data-state":Ba(o.checked),"data-disabled":o.disabled?"":void 0,...r,ref:t})});$a.displayName=Fa;var cu=e=>{const{control:t,checked:n,bubbles:r=!0,...o}=e,a=d.useRef(null),s=Ia(n),i=hr(t);return d.useEffect(()=>{const c=a.current,u=window.HTMLInputElement.prototype,p=Object.getOwnPropertyDescriptor(u,"checked").set;if(s!==n&&p){const l=new Event("click",{bubbles:r});p.call(c,n),c.dispatchEvent(l)}},[s,n,r]),v.jsx("input",{type:"checkbox","aria-hidden":!0,defaultChecked:n,...o,tabIndex:-1,ref:a,style:{...e.style,...i,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})};function Ba(e){return e?"checked":"unchecked"}var Wa=La,lu=$a;const br=d.forwardRef(({className:e,...t},n)=>v.jsx(Wa,{className:de("ve-self-center ve-peer ve-inline-flex ve-h-5 ve-w-9 ve-shrink-0 ve-cursor-pointer ve-items-center ve-rounded-full ve-border-2 ve-border-transparent ve-transition-colors focus-visible:ve-outline-none focus-visible:ve-ring-2 focus-visible:ve-ring-ring focus-visible:ve-ring-offset-2 focus-visible:ve-ring-offset-background disabled:ve-cursor-not-allowed disabled:ve-opacity-50 data-[state=checked]:ve-bg-primary data-[state=unchecked]:ve-bg-input",e),...t,ref:n,children:v.jsx(lu,{className:de("ve-self-center ve-pointer-events-none ve-block ve-h-4 ve-w-4 ve-rounded-full ve-bg-background ve-shadow-lg ve-ring-0 ve-transition-transform data-[state=checked]:ve-translate-x-4 data-[state=unchecked]:ve-translate-x-0")})}));br.displayName=Wa.displayName;const uu=["top","right","bottom","left"],Ze=Math.min,Ce=Math.max,ln=Math.round,tn=Math.floor,Qe=e=>({x:e,y:e}),du={left:"right",right:"left",bottom:"top",top:"bottom"},fu={start:"end",end:"start"};function Yn(e,t,n){return Ce(e,Ze(t,n))}function ze(e,t){return typeof e=="function"?e(t):e}function Ue(e){return e.split("-")[0]}function Pt(e){return e.split("-")[1]}function xr(e){return e==="x"?"y":"x"}function wr(e){return e==="y"?"height":"width"}function et(e){return["top","bottom"].includes(Ue(e))?"y":"x"}function Er(e){return xr(et(e))}function pu(e,t,n){n===void 0&&(n=!1);const r=Pt(e),o=Er(e),a=wr(o);let s=o==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[a]>t.floating[a]&&(s=un(s)),[s,un(s)]}function vu(e){const t=un(e);return[Kn(e),t,Kn(t)]}function Kn(e){return e.replace(/start|end/g,t=>fu[t])}function mu(e,t,n){const r=["left","right"],o=["right","left"],a=["top","bottom"],s=["bottom","top"];switch(e){case"top":case"bottom":return n?t?o:r:t?r:o;case"left":case"right":return t?a:s;default:return[]}}function gu(e,t,n,r){const o=Pt(e);let a=mu(Ue(e),n==="start",r);return o&&(a=a.map(s=>s+"-"+o),t&&(a=a.concat(a.map(Kn)))),a}function un(e){return e.replace(/left|right|bottom|top/g,t=>du[t])}function hu(e){return{top:0,right:0,bottom:0,left:0,...e}}function Va(e){return typeof e!="number"?hu(e):{top:e,right:e,bottom:e,left:e}}function dn(e){const{x:t,y:n,width:r,height:o}=e;return{width:r,height:o,top:n,left:t,right:t+r,bottom:n+o,x:t,y:n}}function so(e,t,n){let{reference:r,floating:o}=e;const a=et(t),s=Er(t),i=wr(s),c=Ue(t),u=a==="y",f=r.x+r.width/2-o.width/2,p=r.y+r.height/2-o.height/2,l=r[i]/2-o[i]/2;let g;switch(c){case"top":g={x:f,y:r.y-o.height};break;case"bottom":g={x:f,y:r.y+r.height};break;case"right":g={x:r.x+r.width,y:p};break;case"left":g={x:r.x-o.width,y:p};break;default:g={x:r.x,y:r.y}}switch(Pt(t)){case"start":g[s]-=l*(n&&u?-1:1);break;case"end":g[s]+=l*(n&&u?-1:1);break}return g}const yu=async(e,t,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:a=[],platform:s}=n,i=a.filter(Boolean),c=await(s.isRTL==null?void 0:s.isRTL(t));let u=await s.getElementRects({reference:e,floating:t,strategy:o}),{x:f,y:p}=so(u,r,c),l=r,g={},y=0;for(let h=0;h<i.length;h++){const{name:b,fn:x}=i[h],{x:w,y:C,data:P,reset:R}=await x({x:f,y:p,initialPlacement:r,placement:l,strategy:o,middlewareData:g,rects:u,platform:s,elements:{reference:e,floating:t}});f=w??f,p=C??p,g={...g,[b]:{...g[b],...P}},R&&y<=50&&(y++,typeof R=="object"&&(R.placement&&(l=R.placement),R.rects&&(u=R.rects===!0?await s.getElementRects({reference:e,floating:t,strategy:o}):R.rects),{x:f,y:p}=so(u,l,c)),h=-1)}return{x:f,y:p,placement:l,strategy:o,middlewareData:g}};async function $t(e,t){var n;t===void 0&&(t={});const{x:r,y:o,platform:a,rects:s,elements:i,strategy:c}=e,{boundary:u="clippingAncestors",rootBoundary:f="viewport",elementContext:p="floating",altBoundary:l=!1,padding:g=0}=ze(t,e),y=Va(g),b=i[l?p==="floating"?"reference":"floating":p],x=dn(await a.getClippingRect({element:(n=await(a.isElement==null?void 0:a.isElement(b)))==null||n?b:b.contextElement||await(a.getDocumentElement==null?void 0:a.getDocumentElement(i.floating)),boundary:u,rootBoundary:f,strategy:c})),w=p==="floating"?{x:r,y:o,width:s.floating.width,height:s.floating.height}:s.reference,C=await(a.getOffsetParent==null?void 0:a.getOffsetParent(i.floating)),P=await(a.isElement==null?void 0:a.isElement(C))?await(a.getScale==null?void 0:a.getScale(C))||{x:1,y:1}:{x:1,y:1},R=dn(a.convertOffsetParentRelativeRectToViewportRelativeRect?await a.convertOffsetParentRelativeRectToViewportRelativeRect({elements:i,rect:w,offsetParent:C,strategy:c}):w);return{top:(x.top-R.top+y.top)/P.y,bottom:(R.bottom-x.bottom+y.bottom)/P.y,left:(x.left-R.left+y.left)/P.x,right:(R.right-x.right+y.right)/P.x}}const bu=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:o,rects:a,platform:s,elements:i,middlewareData:c}=t,{element:u,padding:f=0}=ze(e,t)||{};if(u==null)return{};const p=Va(f),l={x:n,y:r},g=Er(o),y=wr(g),h=await s.getDimensions(u),b=g==="y",x=b?"top":"left",w=b?"bottom":"right",C=b?"clientHeight":"clientWidth",P=a.reference[y]+a.reference[g]-l[g]-a.floating[y],R=l[g]-a.reference[g],D=await(s.getOffsetParent==null?void 0:s.getOffsetParent(u));let A=D?D[C]:0;(!A||!await(s.isElement==null?void 0:s.isElement(D)))&&(A=i.floating[C]||a.floating[y]);const O=P/2-R/2,$=A/2-h[y]/2-1,M=Ze(p[x],$),z=Ze(p[w],$),k=M,I=A-h[y]-z,B=A/2-h[y]/2+O,q=Yn(k,B,I),_=!c.arrow&&Pt(o)!=null&&B!==q&&a.reference[y]/2-(B<k?M:z)-h[y]/2<0,X=_?B<k?B-k:B-I:0;return{[g]:l[g]+X,data:{[g]:q,centerOffset:B-q-X,..._&&{alignmentOffset:X}},reset:_}}}),xu=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:o,middlewareData:a,rects:s,initialPlacement:i,platform:c,elements:u}=t,{mainAxis:f=!0,crossAxis:p=!0,fallbackPlacements:l,fallbackStrategy:g="bestFit",fallbackAxisSideDirection:y="none",flipAlignment:h=!0,...b}=ze(e,t);if((n=a.arrow)!=null&&n.alignmentOffset)return{};const x=Ue(o),w=et(i),C=Ue(i)===i,P=await(c.isRTL==null?void 0:c.isRTL(u.floating)),R=l||(C||!h?[un(i)]:vu(i)),D=y!=="none";!l&&D&&R.push(...gu(i,h,y,P));const A=[i,...R],O=await $t(t,b),$=[];let M=((r=a.flip)==null?void 0:r.overflows)||[];if(f&&$.push(O[x]),p){const B=pu(o,s,P);$.push(O[B[0]],O[B[1]])}if(M=[...M,{placement:o,overflows:$}],!$.every(B=>B<=0)){var z,k;const B=(((z=a.flip)==null?void 0:z.index)||0)+1,q=A[B];if(q)return{data:{index:B,overflows:M},reset:{placement:q}};let _=(k=M.filter(X=>X.overflows[0]<=0).sort((X,N)=>X.overflows[1]-N.overflows[1])[0])==null?void 0:k.placement;if(!_)switch(g){case"bestFit":{var I;const X=(I=M.filter(N=>{if(D){const U=et(N.placement);return U===w||U==="y"}return!0}).map(N=>[N.placement,N.overflows.filter(U=>U>0).reduce((U,se)=>U+se,0)]).sort((N,U)=>N[1]-U[1])[0])==null?void 0:I[0];X&&(_=X);break}case"initialPlacement":_=i;break}if(o!==_)return{reset:{placement:_}}}return{}}}};function io(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function co(e){return uu.some(t=>e[t]>=0)}const wu=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n}=t,{strategy:r="referenceHidden",...o}=ze(e,t);switch(r){case"referenceHidden":{const a=await $t(t,{...o,elementContext:"reference"}),s=io(a,n.reference);return{data:{referenceHiddenOffsets:s,referenceHidden:co(s)}}}case"escaped":{const a=await $t(t,{...o,altBoundary:!0}),s=io(a,n.floating);return{data:{escapedOffsets:s,escaped:co(s)}}}default:return{}}}}};async function Eu(e,t){const{placement:n,platform:r,elements:o}=e,a=await(r.isRTL==null?void 0:r.isRTL(o.floating)),s=Ue(n),i=Pt(n),c=et(n)==="y",u=["left","top"].includes(s)?-1:1,f=a&&c?-1:1,p=ze(t,e);let{mainAxis:l,crossAxis:g,alignmentAxis:y}=typeof p=="number"?{mainAxis:p,crossAxis:0,alignmentAxis:null}:{mainAxis:p.mainAxis||0,crossAxis:p.crossAxis||0,alignmentAxis:p.alignmentAxis};return i&&typeof y=="number"&&(g=i==="end"?y*-1:y),c?{x:g*f,y:l*u}:{x:l*u,y:g*f}}const Cu=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:o,y:a,placement:s,middlewareData:i}=t,c=await Eu(t,e);return s===((n=i.offset)==null?void 0:n.placement)&&(r=i.arrow)!=null&&r.alignmentOffset?{}:{x:o+c.x,y:a+c.y,data:{...c,placement:s}}}}},Su=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:o}=t,{mainAxis:a=!0,crossAxis:s=!1,limiter:i={fn:b=>{let{x,y:w}=b;return{x,y:w}}},...c}=ze(e,t),u={x:n,y:r},f=await $t(t,c),p=et(Ue(o)),l=xr(p);let g=u[l],y=u[p];if(a){const b=l==="y"?"top":"left",x=l==="y"?"bottom":"right",w=g+f[b],C=g-f[x];g=Yn(w,g,C)}if(s){const b=p==="y"?"top":"left",x=p==="y"?"bottom":"right",w=y+f[b],C=y-f[x];y=Yn(w,y,C)}const h=i.fn({...t,[l]:g,[p]:y});return{...h,data:{x:h.x-n,y:h.y-r,enabled:{[l]:a,[p]:s}}}}}},Ru=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:o,rects:a,middlewareData:s}=t,{offset:i=0,mainAxis:c=!0,crossAxis:u=!0}=ze(e,t),f={x:n,y:r},p=et(o),l=xr(p);let g=f[l],y=f[p];const h=ze(i,t),b=typeof h=="number"?{mainAxis:h,crossAxis:0}:{mainAxis:0,crossAxis:0,...h};if(c){const C=l==="y"?"height":"width",P=a.reference[l]-a.floating[C]+b.mainAxis,R=a.reference[l]+a.reference[C]-b.mainAxis;g<P?g=P:g>R&&(g=R)}if(u){var x,w;const C=l==="y"?"width":"height",P=["top","left"].includes(Ue(o)),R=a.reference[p]-a.floating[C]+(P&&((x=s.offset)==null?void 0:x[p])||0)+(P?0:b.crossAxis),D=a.reference[p]+a.reference[C]+(P?0:((w=s.offset)==null?void 0:w[p])||0)-(P?b.crossAxis:0);y<R?y=R:y>D&&(y=D)}return{[l]:g,[p]:y}}}},Pu=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,r;const{placement:o,rects:a,platform:s,elements:i}=t,{apply:c=()=>{},...u}=ze(e,t),f=await $t(t,u),p=Ue(o),l=Pt(o),g=et(o)==="y",{width:y,height:h}=a.floating;let b,x;p==="top"||p==="bottom"?(b=p,x=l===(await(s.isRTL==null?void 0:s.isRTL(i.floating))?"start":"end")?"left":"right"):(x=p,b=l==="end"?"top":"bottom");const w=h-f.top-f.bottom,C=y-f.left-f.right,P=Ze(h-f[b],w),R=Ze(y-f[x],C),D=!t.middlewareData.shift;let A=P,O=R;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(O=C),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(A=w),D&&!l){const M=Ce(f.left,0),z=Ce(f.right,0),k=Ce(f.top,0),I=Ce(f.bottom,0);g?O=y-2*(M!==0||z!==0?M+z:Ce(f.left,f.right)):A=h-2*(k!==0||I!==0?k+I:Ce(f.top,f.bottom))}await c({...t,availableWidth:O,availableHeight:A});const $=await s.getDimensions(i.floating);return y!==$.width||h!==$.height?{reset:{rects:!0}}:{}}}};function gn(){return typeof window<"u"}function At(e){return za(e)?(e.nodeName||"").toLowerCase():"#document"}function Se(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function je(e){var t;return(t=(za(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function za(e){return gn()?e instanceof Node||e instanceof Se(e).Node:!1}function Te(e){return gn()?e instanceof Element||e instanceof Se(e).Element:!1}function _e(e){return gn()?e instanceof HTMLElement||e instanceof Se(e).HTMLElement:!1}function lo(e){return!gn()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Se(e).ShadowRoot}function Ut(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=Ne(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!["inline","contents"].includes(o)}function Au(e){return["table","td","th"].includes(At(e))}function hn(e){return[":popover-open",":modal"].some(t=>{try{return e.matches(t)}catch{return!1}})}function Cr(e){const t=Sr(),n=Te(e)?Ne(e):e;return n.transform!=="none"||n.perspective!=="none"||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||["transform","perspective","filter"].some(r=>(n.willChange||"").includes(r))||["paint","layout","strict","content"].some(r=>(n.contain||"").includes(r))}function Tu(e){let t=tt(e);for(;_e(t)&&!Ct(t);){if(Cr(t))return t;if(hn(t))return null;t=tt(t)}return null}function Sr(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function Ct(e){return["html","body","#document"].includes(At(e))}function Ne(e){return Se(e).getComputedStyle(e)}function yn(e){return Te(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function tt(e){if(At(e)==="html")return e;const t=e.assignedSlot||e.parentNode||lo(e)&&e.host||je(e);return lo(t)?t.host:t}function Ua(e){const t=tt(e);return Ct(t)?e.ownerDocument?e.ownerDocument.body:e.body:_e(t)&&Ut(t)?t:Ua(t)}function Bt(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const o=Ua(e),a=o===((r=e.ownerDocument)==null?void 0:r.body),s=Se(o);if(a){const i=qn(s);return t.concat(s,s.visualViewport||[],Ut(o)?o:[],i&&n?Bt(i):[])}return t.concat(o,Bt(o,[],n))}function qn(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function Ha(e){const t=Ne(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=_e(e),a=o?e.offsetWidth:n,s=o?e.offsetHeight:r,i=ln(n)!==a||ln(r)!==s;return i&&(n=a,r=s),{width:n,height:r,$:i}}function Rr(e){return Te(e)?e:e.contextElement}function wt(e){const t=Rr(e);if(!_e(t))return Qe(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:a}=Ha(t);let s=(a?ln(n.width):n.width)/r,i=(a?ln(n.height):n.height)/o;return(!s||!Number.isFinite(s))&&(s=1),(!i||!Number.isFinite(i))&&(i=1),{x:s,y:i}}const Nu=Qe(0);function Ga(e){const t=Se(e);return!Sr()||!t.visualViewport?Nu:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function Ou(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==Se(e)?!1:t}function lt(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const o=e.getBoundingClientRect(),a=Rr(e);let s=Qe(1);t&&(r?Te(r)&&(s=wt(r)):s=wt(e));const i=Ou(a,n,r)?Ga(a):Qe(0);let c=(o.left+i.x)/s.x,u=(o.top+i.y)/s.y,f=o.width/s.x,p=o.height/s.y;if(a){const l=Se(a),g=r&&Te(r)?Se(r):r;let y=l,h=qn(y);for(;h&&r&&g!==y;){const b=wt(h),x=h.getBoundingClientRect(),w=Ne(h),C=x.left+(h.clientLeft+parseFloat(w.paddingLeft))*b.x,P=x.top+(h.clientTop+parseFloat(w.paddingTop))*b.y;c*=b.x,u*=b.y,f*=b.x,p*=b.y,c+=C,u+=P,y=Se(h),h=qn(y)}}return dn({width:f,height:p,x:c,y:u})}function Du(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const a=o==="fixed",s=je(r),i=t?hn(t.floating):!1;if(r===s||i&&a)return n;let c={scrollLeft:0,scrollTop:0},u=Qe(1);const f=Qe(0),p=_e(r);if((p||!p&&!a)&&((At(r)!=="body"||Ut(s))&&(c=yn(r)),_e(r))){const l=lt(r);u=wt(r),f.x=l.x+r.clientLeft,f.y=l.y+r.clientTop}return{width:n.width*u.x,height:n.height*u.y,x:n.x*u.x-c.scrollLeft*u.x+f.x,y:n.y*u.y-c.scrollTop*u.y+f.y}}function ku(e){return Array.from(e.getClientRects())}function Xn(e,t){const n=yn(e).scrollLeft;return t?t.left+n:lt(je(e)).left+n}function _u(e){const t=je(e),n=yn(e),r=e.ownerDocument.body,o=Ce(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),a=Ce(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let s=-n.scrollLeft+Xn(e);const i=-n.scrollTop;return Ne(r).direction==="rtl"&&(s+=Ce(t.clientWidth,r.clientWidth)-o),{width:o,height:a,x:s,y:i}}function ju(e,t){const n=Se(e),r=je(e),o=n.visualViewport;let a=r.clientWidth,s=r.clientHeight,i=0,c=0;if(o){a=o.width,s=o.height;const u=Sr();(!u||u&&t==="fixed")&&(i=o.offsetLeft,c=o.offsetTop)}return{width:a,height:s,x:i,y:c}}function Mu(e,t){const n=lt(e,!0,t==="fixed"),r=n.top+e.clientTop,o=n.left+e.clientLeft,a=_e(e)?wt(e):Qe(1),s=e.clientWidth*a.x,i=e.clientHeight*a.y,c=o*a.x,u=r*a.y;return{width:s,height:i,x:c,y:u}}function uo(e,t,n){let r;if(t==="viewport")r=ju(e,n);else if(t==="document")r=_u(je(e));else if(Te(t))r=Mu(t,n);else{const o=Ga(e);r={...t,x:t.x-o.x,y:t.y-o.y}}return dn(r)}function Ya(e,t){const n=tt(e);return n===t||!Te(n)||Ct(n)?!1:Ne(n).position==="fixed"||Ya(n,t)}function Iu(e,t){const n=t.get(e);if(n)return n;let r=Bt(e,[],!1).filter(i=>Te(i)&&At(i)!=="body"),o=null;const a=Ne(e).position==="fixed";let s=a?tt(e):e;for(;Te(s)&&!Ct(s);){const i=Ne(s),c=Cr(s);!c&&i.position==="fixed"&&(o=null),(a?!c&&!o:!c&&i.position==="static"&&!!o&&["absolute","fixed"].includes(o.position)||Ut(s)&&!c&&Ya(e,s))?r=r.filter(f=>f!==s):o=i,s=tt(s)}return t.set(e,r),r}function Lu(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const s=[...n==="clippingAncestors"?hn(t)?[]:Iu(t,this._c):[].concat(n),r],i=s[0],c=s.reduce((u,f)=>{const p=uo(t,f,o);return u.top=Ce(p.top,u.top),u.right=Ze(p.right,u.right),u.bottom=Ze(p.bottom,u.bottom),u.left=Ce(p.left,u.left),u},uo(t,i,o));return{width:c.right-c.left,height:c.bottom-c.top,x:c.left,y:c.top}}function Fu(e){const{width:t,height:n}=Ha(e);return{width:t,height:n}}function $u(e,t,n){const r=_e(t),o=je(t),a=n==="fixed",s=lt(e,!0,a,t);let i={scrollLeft:0,scrollTop:0};const c=Qe(0);if(r||!r&&!a)if((At(t)!=="body"||Ut(o))&&(i=yn(t)),r){const g=lt(t,!0,a,t);c.x=g.x+t.clientLeft,c.y=g.y+t.clientTop}else o&&(c.x=Xn(o));let u=0,f=0;if(o&&!r&&!a){const g=o.getBoundingClientRect();f=g.top+i.scrollTop,u=g.left+i.scrollLeft-Xn(o,g)}const p=s.left+i.scrollLeft-c.x-u,l=s.top+i.scrollTop-c.y-f;return{x:p,y:l,width:s.width,height:s.height}}function Ln(e){return Ne(e).position==="static"}function fo(e,t){if(!_e(e)||Ne(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return je(e)===n&&(n=n.ownerDocument.body),n}function Ka(e,t){const n=Se(e);if(hn(e))return n;if(!_e(e)){let o=tt(e);for(;o&&!Ct(o);){if(Te(o)&&!Ln(o))return o;o=tt(o)}return n}let r=fo(e,t);for(;r&&Au(r)&&Ln(r);)r=fo(r,t);return r&&Ct(r)&&Ln(r)&&!Cr(r)?n:r||Tu(e)||n}const Bu=async function(e){const t=this.getOffsetParent||Ka,n=this.getDimensions,r=await n(e.floating);return{reference:$u(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function Wu(e){return Ne(e).direction==="rtl"}const Vu={convertOffsetParentRelativeRectToViewportRelativeRect:Du,getDocumentElement:je,getClippingRect:Lu,getOffsetParent:Ka,getElementRects:Bu,getClientRects:ku,getDimensions:Fu,getScale:wt,isElement:Te,isRTL:Wu};function zu(e,t){let n=null,r;const o=je(e);function a(){var i;clearTimeout(r),(i=n)==null||i.disconnect(),n=null}function s(i,c){i===void 0&&(i=!1),c===void 0&&(c=1),a();const{left:u,top:f,width:p,height:l}=e.getBoundingClientRect();if(i||t(),!p||!l)return;const g=tn(f),y=tn(o.clientWidth-(u+p)),h=tn(o.clientHeight-(f+l)),b=tn(u),w={rootMargin:-g+"px "+-y+"px "+-h+"px "+-b+"px",threshold:Ce(0,Ze(1,c))||1};let C=!0;function P(R){const D=R[0].intersectionRatio;if(D!==c){if(!C)return s();D?s(!1,D):r=setTimeout(()=>{s(!1,1e-7)},1e3)}C=!1}try{n=new IntersectionObserver(P,{...w,root:o.ownerDocument})}catch{n=new IntersectionObserver(P,w)}n.observe(e)}return s(!0),a}function Uu(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:o=!0,ancestorResize:a=!0,elementResize:s=typeof ResizeObserver=="function",layoutShift:i=typeof IntersectionObserver=="function",animationFrame:c=!1}=r,u=Rr(e),f=o||a?[...u?Bt(u):[],...Bt(t)]:[];f.forEach(x=>{o&&x.addEventListener("scroll",n,{passive:!0}),a&&x.addEventListener("resize",n)});const p=u&&i?zu(u,n):null;let l=-1,g=null;s&&(g=new ResizeObserver(x=>{let[w]=x;w&&w.target===u&&g&&(g.unobserve(t),cancelAnimationFrame(l),l=requestAnimationFrame(()=>{var C;(C=g)==null||C.observe(t)})),n()}),u&&!c&&g.observe(u),g.observe(t));let y,h=c?lt(e):null;c&&b();function b(){const x=lt(e);h&&(x.x!==h.x||x.y!==h.y||x.width!==h.width||x.height!==h.height)&&n(),h=x,y=requestAnimationFrame(b)}return n(),()=>{var x;f.forEach(w=>{o&&w.removeEventListener("scroll",n),a&&w.removeEventListener("resize",n)}),p==null||p(),(x=g)==null||x.disconnect(),g=null,c&&cancelAnimationFrame(y)}}const Hu=Cu,Gu=Su,Yu=xu,Ku=Pu,qu=wu,po=bu,Xu=Ru,Ju=(e,t,n)=>{const r=new Map,o={platform:Vu,...n},a={...o.platform,_c:r};return yu(e,t,{...o,platform:a})};var sn=typeof document<"u"?E.useLayoutEffect:E.useEffect;function fn(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,r,o;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!fn(e[r],t[r]))return!1;return!0}if(o=Object.keys(e),n=o.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,o[r]))return!1;for(r=n;r--!==0;){const a=o[r];if(!(a==="_owner"&&e.$$typeof)&&!fn(e[a],t[a]))return!1}return!0}return e!==e&&t!==t}function qa(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function vo(e,t){const n=qa(e);return Math.round(t*n)/n}function Fn(e){const t=d.useRef(e);return sn(()=>{t.current=e}),t}function Zu(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:o,elements:{reference:a,floating:s}={},transform:i=!0,whileElementsMounted:c,open:u}=e,[f,p]=d.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[l,g]=d.useState(r);fn(l,r)||g(r);const[y,h]=d.useState(null),[b,x]=d.useState(null),w=d.useCallback(N=>{N!==D.current&&(D.current=N,h(N))},[]),C=d.useCallback(N=>{N!==A.current&&(A.current=N,x(N))},[]),P=a||y,R=s||b,D=d.useRef(null),A=d.useRef(null),O=d.useRef(f),$=c!=null,M=Fn(c),z=Fn(o),k=Fn(u),I=d.useCallback(()=>{if(!D.current||!A.current)return;const N={placement:t,strategy:n,middleware:l};z.current&&(N.platform=z.current),Ju(D.current,A.current,N).then(U=>{const se={...U,isPositioned:k.current!==!1};B.current&&!fn(O.current,se)&&(O.current=se,cr.flushSync(()=>{p(se)}))})},[l,t,n,z,k]);sn(()=>{u===!1&&O.current.isPositioned&&(O.current.isPositioned=!1,p(N=>({...N,isPositioned:!1})))},[u]);const B=d.useRef(!1);sn(()=>(B.current=!0,()=>{B.current=!1}),[]),sn(()=>{if(P&&(D.current=P),R&&(A.current=R),P&&R){if(M.current)return M.current(P,R,I);I()}},[P,R,I,M,$]);const q=d.useMemo(()=>({reference:D,floating:A,setReference:w,setFloating:C}),[w,C]),_=d.useMemo(()=>({reference:P,floating:R}),[P,R]),X=d.useMemo(()=>{const N={position:n,left:0,top:0};if(!_.floating)return N;const U=vo(_.floating,f.x),se=vo(_.floating,f.y);return i?{...N,transform:"translate("+U+"px, "+se+"px)",...qa(_.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:U,top:se}},[n,i,_.floating,f.x,f.y]);return d.useMemo(()=>({...f,update:I,refs:q,elements:_,floatingStyles:X}),[f,I,q,_,X])}const Qu=e=>{function t(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:e,fn(n){const{element:r,padding:o}=typeof e=="function"?e(n):e;return r&&t(r)?r.current!=null?po({element:r.current,padding:o}).fn(n):{}:r?po({element:r,padding:o}).fn(n):{}}}},ed=(e,t)=>({...Hu(e),options:[e,t]}),td=(e,t)=>({...Gu(e),options:[e,t]}),nd=(e,t)=>({...Xu(e),options:[e,t]}),rd=(e,t)=>({...Yu(e),options:[e,t]}),od=(e,t)=>({...Ku(e),options:[e,t]}),ad=(e,t)=>({...qu(e),options:[e,t]}),sd=(e,t)=>({...Qu(e),options:[e,t]});var id="Arrow",Xa=d.forwardRef((e,t)=>{const{children:n,width:r=10,height:o=5,...a}=e;return v.jsx(ae.svg,{...a,ref:t,width:r,height:o,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:v.jsx("polygon",{points:"0,0 30,0 15,10"})})});Xa.displayName=id;var cd=Xa,Pr="Popper",[Ja,Za]=nt(Pr),[ld,Qa]=Ja(Pr),es=e=>{const{__scopePopper:t,children:n}=e,[r,o]=d.useState(null);return v.jsx(ld,{scope:t,anchor:r,onAnchorChange:o,children:n})};es.displayName=Pr;var ts="PopperAnchor",ns=d.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:r,...o}=e,a=Qa(ts,n),s=d.useRef(null),i=ue(t,s);return d.useEffect(()=>{a.onAnchorChange((r==null?void 0:r.current)||s.current)}),r?null:v.jsx(ae.div,{...o,ref:i})});ns.displayName=ts;var Ar="PopperContent",[ud,dd]=Ja(Ar),rs=d.forwardRef((e,t)=>{var fe,me,Re,xe,ut,Me;const{__scopePopper:n,side:r="bottom",sideOffset:o=0,align:a="center",alignOffset:s=0,arrowPadding:i=0,avoidCollisions:c=!0,collisionBoundary:u=[],collisionPadding:f=0,sticky:p="partial",hideWhenDetached:l=!1,updatePositionStrategy:g="optimized",onPlaced:y,...h}=e,b=Qa(Ar,n),[x,w]=d.useState(null),C=ue(t,Ie=>w(Ie)),[P,R]=d.useState(null),D=hr(P),A=(D==null?void 0:D.width)??0,O=(D==null?void 0:D.height)??0,$=r+(a!=="center"?"-"+a:""),M=typeof f=="number"?f:{top:0,right:0,bottom:0,left:0,...f},z=Array.isArray(u)?u:[u],k=z.length>0,I={padding:M,boundary:z.filter(pd),altBoundary:k},{refs:B,floatingStyles:q,placement:_,isPositioned:X,middlewareData:N}=Zu({strategy:"fixed",placement:$,whileElementsMounted:(...Ie)=>Uu(...Ie,{animationFrame:g==="always"}),elements:{reference:b.anchor},middleware:[ed({mainAxis:o+O,alignmentAxis:s}),c&&td({mainAxis:!0,crossAxis:!1,limiter:p==="partial"?nd():void 0,...I}),c&&rd({...I}),od({...I,apply:({elements:Ie,rects:rt,availableWidth:Le,availableHeight:he})=>{const{width:dt,height:ft}=rt.reference,ie=Ie.floating.style;ie.setProperty("--radix-popper-available-width",`${Le}px`),ie.setProperty("--radix-popper-available-height",`${he}px`),ie.setProperty("--radix-popper-anchor-width",`${dt}px`),ie.setProperty("--radix-popper-anchor-height",`${ft}px`)}}),P&&sd({element:P,padding:i}),vd({arrowWidth:A,arrowHeight:O}),l&&ad({strategy:"referenceHidden",...I})]}),[U,se]=ss(_),L=Ve(y);We(()=>{X&&(L==null||L())},[X,L]);const H=(fe=N.arrow)==null?void 0:fe.x,J=(me=N.arrow)==null?void 0:me.y,G=((Re=N.arrow)==null?void 0:Re.centerOffset)!==0,[ne,V]=d.useState();return We(()=>{x&&V(window.getComputedStyle(x).zIndex)},[x]),v.jsx("div",{ref:B.setFloating,"data-radix-popper-content-wrapper":"",style:{...q,transform:X?q.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:ne,"--radix-popper-transform-origin":[(xe=N.transformOrigin)==null?void 0:xe.x,(ut=N.transformOrigin)==null?void 0:ut.y].join(" "),...((Me=N.hide)==null?void 0:Me.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:v.jsx(ud,{scope:n,placedSide:U,onArrowChange:R,arrowX:H,arrowY:J,shouldHideArrow:G,children:v.jsx(ae.div,{"data-side":U,"data-align":se,...h,ref:C,style:{...h.style,animation:X?void 0:"none"}})})})});rs.displayName=Ar;var os="PopperArrow",fd={top:"bottom",right:"left",bottom:"top",left:"right"},as=d.forwardRef(function(t,n){const{__scopePopper:r,...o}=t,a=dd(os,r),s=fd[a.placedSide];return v.jsx("span",{ref:a.onArrowChange,style:{position:"absolute",left:a.arrowX,top:a.arrowY,[s]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[a.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[a.placedSide],visibility:a.shouldHideArrow?"hidden":void 0},children:v.jsx(cd,{...o,ref:n,style:{...o.style,display:"block"}})})});as.displayName=os;function pd(e){return e!==null}var vd=e=>({name:"transformOrigin",options:e,fn(t){var b,x,w;const{placement:n,rects:r,middlewareData:o}=t,s=((b=o.arrow)==null?void 0:b.centerOffset)!==0,i=s?0:e.arrowWidth,c=s?0:e.arrowHeight,[u,f]=ss(n),p={start:"0%",center:"50%",end:"100%"}[f],l=(((x=o.arrow)==null?void 0:x.x)??0)+i/2,g=(((w=o.arrow)==null?void 0:w.y)??0)+c/2;let y="",h="";return u==="bottom"?(y=s?p:`${l}px`,h=`${-c}px`):u==="top"?(y=s?p:`${l}px`,h=`${r.floating.height+c}px`):u==="right"?(y=`${-c}px`,h=s?p:`${g}px`):u==="left"&&(y=`${r.floating.width+c}px`,h=s?p:`${g}px`),{data:{x:y,y:h}}}});function ss(e){const[t,n="center"]=e.split("-");return[t,n]}var md=es,gd=ns,hd=rs,yd=as,bd="VisuallyHidden",is=d.forwardRef((e,t)=>v.jsx(ae.span,{...e,ref:t,style:{position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal",...e.style}}));is.displayName=bd;var xd=is,[bn,Fp]=nt("Tooltip",[Za]),xn=Za(),cs="TooltipProvider",wd=700,Jn="tooltip.open",[Ed,Tr]=bn(cs),ls=e=>{const{__scopeTooltip:t,delayDuration:n=wd,skipDelayDuration:r=300,disableHoverableContent:o=!1,children:a}=e,[s,i]=d.useState(!0),c=d.useRef(!1),u=d.useRef(0);return d.useEffect(()=>{const f=u.current;return()=>window.clearTimeout(f)},[]),v.jsx(Ed,{scope:t,isOpenDelayed:s,delayDuration:n,onOpen:d.useCallback(()=>{window.clearTimeout(u.current),i(!1)},[]),onClose:d.useCallback(()=>{window.clearTimeout(u.current),u.current=window.setTimeout(()=>i(!0),r)},[r]),isPointerInTransitRef:c,onPointerInTransitChange:d.useCallback(f=>{c.current=f},[]),disableHoverableContent:o,children:a})};ls.displayName=cs;var wn="Tooltip",[Cd,En]=bn(wn),us=e=>{const{__scopeTooltip:t,children:n,open:r,defaultOpen:o=!1,onOpenChange:a,disableHoverableContent:s,delayDuration:i}=e,c=Tr(wn,e.__scopeTooltip),u=xn(t),[f,p]=d.useState(null),l=Ft(),g=d.useRef(0),y=s??c.disableHoverableContent,h=i??c.delayDuration,b=d.useRef(!1),[x=!1,w]=Vt({prop:r,defaultProp:o,onChange:A=>{A?(c.onOpen(),document.dispatchEvent(new CustomEvent(Jn))):c.onClose(),a==null||a(A)}}),C=d.useMemo(()=>x?b.current?"delayed-open":"instant-open":"closed",[x]),P=d.useCallback(()=>{window.clearTimeout(g.current),b.current=!1,w(!0)},[w]),R=d.useCallback(()=>{window.clearTimeout(g.current),w(!1)},[w]),D=d.useCallback(()=>{window.clearTimeout(g.current),g.current=window.setTimeout(()=>{b.current=!0,w(!0)},h)},[h,w]);return d.useEffect(()=>()=>window.clearTimeout(g.current),[]),v.jsx(md,{...u,children:v.jsx(Cd,{scope:t,contentId:l,open:x,stateAttribute:C,trigger:f,onTriggerChange:p,onTriggerEnter:d.useCallback(()=>{c.isOpenDelayed?D():P()},[c.isOpenDelayed,D,P]),onTriggerLeave:d.useCallback(()=>{y?R():window.clearTimeout(g.current)},[R,y]),onOpen:P,onClose:R,disableHoverableContent:y,children:n})})};us.displayName=wn;var Zn="TooltipTrigger",ds=d.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,o=En(Zn,n),a=Tr(Zn,n),s=xn(n),i=d.useRef(null),c=ue(t,i,o.onTriggerChange),u=d.useRef(!1),f=d.useRef(!1),p=d.useCallback(()=>u.current=!1,[]);return d.useEffect(()=>()=>document.removeEventListener("pointerup",p),[p]),v.jsx(gd,{asChild:!0,...s,children:v.jsx(ae.button,{"aria-describedby":o.open?o.contentId:void 0,"data-state":o.stateAttribute,...r,ref:c,onPointerMove:oe(e.onPointerMove,l=>{l.pointerType!=="touch"&&!f.current&&!a.isPointerInTransitRef.current&&(o.onTriggerEnter(),f.current=!0)}),onPointerLeave:oe(e.onPointerLeave,()=>{o.onTriggerLeave(),f.current=!1}),onPointerDown:oe(e.onPointerDown,()=>{u.current=!0,document.addEventListener("pointerup",p,{once:!0})}),onFocus:oe(e.onFocus,()=>{u.current||o.onOpen()}),onBlur:oe(e.onBlur,o.onClose),onClick:oe(e.onClick,o.onClose)})})});ds.displayName=Zn;var Sd="TooltipPortal",[$p,Rd]=bn(Sd,{forceMount:void 0}),St="TooltipContent",fs=d.forwardRef((e,t)=>{const n=Rd(St,e.__scopeTooltip),{forceMount:r=n.forceMount,side:o="top",...a}=e,s=En(St,e.__scopeTooltip);return v.jsx(zt,{present:r||s.open,children:s.disableHoverableContent?v.jsx(ps,{side:o,...a,ref:t}):v.jsx(Pd,{side:o,...a,ref:t})})}),Pd=d.forwardRef((e,t)=>{const n=En(St,e.__scopeTooltip),r=Tr(St,e.__scopeTooltip),o=d.useRef(null),a=ue(t,o),[s,i]=d.useState(null),{trigger:c,onClose:u}=n,f=o.current,{onPointerInTransitChange:p}=r,l=d.useCallback(()=>{i(null),p(!1)},[p]),g=d.useCallback((y,h)=>{const b=y.currentTarget,x={x:y.clientX,y:y.clientY},w=Nd(x,b.getBoundingClientRect()),C=Od(x,w),P=Dd(h.getBoundingClientRect()),R=_d([...C,...P]);i(R),p(!0)},[p]);return d.useEffect(()=>()=>l(),[l]),d.useEffect(()=>{if(c&&f){const y=b=>g(b,f),h=b=>g(b,c);return c.addEventListener("pointerleave",y),f.addEventListener("pointerleave",h),()=>{c.removeEventListener("pointerleave",y),f.removeEventListener("pointerleave",h)}}},[c,f,g,l]),d.useEffect(()=>{if(s){const y=h=>{const b=h.target,x={x:h.clientX,y:h.clientY},w=(c==null?void 0:c.contains(b))||(f==null?void 0:f.contains(b)),C=!kd(x,s);w?l():C&&(l(),u())};return document.addEventListener("pointermove",y),()=>document.removeEventListener("pointermove",y)}},[c,f,s,u,l]),v.jsx(ps,{...e,ref:a})}),[Ad,Td]=bn(wn,{isInside:!1}),ps=d.forwardRef((e,t)=>{const{__scopeTooltip:n,children:r,"aria-label":o,onEscapeKeyDown:a,onPointerDownOutside:s,...i}=e,c=En(St,n),u=xn(n),{onClose:f}=c;return d.useEffect(()=>(document.addEventListener(Jn,f),()=>document.removeEventListener(Jn,f)),[f]),d.useEffect(()=>{if(c.trigger){const p=l=>{const g=l.target;g!=null&&g.contains(c.trigger)&&f()};return window.addEventListener("scroll",p,{capture:!0}),()=>window.removeEventListener("scroll",p,{capture:!0})}},[c.trigger,f]),v.jsx(ur,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:a,onPointerDownOutside:s,onFocusOutside:p=>p.preventDefault(),onDismiss:f,children:v.jsxs(hd,{"data-state":c.stateAttribute,...u,...i,ref:t,style:{...i.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[v.jsx(lr,{children:r}),v.jsx(Ad,{scope:n,isInside:!0,children:v.jsx(xd,{id:c.contentId,role:"tooltip",children:o||r})})]})})});fs.displayName=St;var vs="TooltipArrow",ms=d.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,o=xn(n);return Td(vs,n).isInside?null:v.jsx(yd,{...o,...r,ref:t})});ms.displayName=vs;function Nd(e,t){const n=Math.abs(t.top-e.y),r=Math.abs(t.bottom-e.y),o=Math.abs(t.right-e.x),a=Math.abs(t.left-e.x);switch(Math.min(n,r,o,a)){case a:return"left";case o:return"right";case n:return"top";case r:return"bottom";default:throw new Error("unreachable")}}function Od(e,t,n=5){const r=[];switch(t){case"top":r.push({x:e.x-n,y:e.y+n},{x:e.x+n,y:e.y+n});break;case"bottom":r.push({x:e.x-n,y:e.y-n},{x:e.x+n,y:e.y-n});break;case"left":r.push({x:e.x+n,y:e.y-n},{x:e.x+n,y:e.y+n});break;case"right":r.push({x:e.x-n,y:e.y-n},{x:e.x-n,y:e.y+n});break}return r}function Dd(e){const{top:t,right:n,bottom:r,left:o}=e;return[{x:o,y:t},{x:n,y:t},{x:n,y:r},{x:o,y:r}]}function kd(e,t){const{x:n,y:r}=e;let o=!1;for(let a=0,s=t.length-1;a<t.length;s=a++){const i=t[a].x,c=t[a].y,u=t[s].x,f=t[s].y;c>r!=f>r&&n<(u-i)*(r-c)/(f-c)+i&&(o=!o)}return o}function _d(e){const t=e.slice();return t.sort((n,r)=>n.x<r.x?-1:n.x>r.x?1:n.y<r.y?-1:n.y>r.y?1:0),jd(t)}function jd(e){if(e.length<=1)return e.slice();const t=[];for(let r=0;r<e.length;r++){const o=e[r];for(;t.length>=2;){const a=t[t.length-1],s=t[t.length-2];if((a.x-s.x)*(o.y-s.y)>=(a.y-s.y)*(o.x-s.x))t.pop();else break}t.push(o)}t.pop();const n=[];for(let r=e.length-1;r>=0;r--){const o=e[r];for(;n.length>=2;){const a=n[n.length-1],s=n[n.length-2];if((a.x-s.x)*(o.y-s.y)>=(a.y-s.y)*(o.x-s.x))n.pop();else break}n.push(o)}return n.pop(),t.length===1&&n.length===1&&t[0].x===n[0].x&&t[0].y===n[0].y?t:t.concat(n)}var Md=ls,Id=us,Ld=ds,gs=fs,Fd=ms;const Nr=Md,Or=Id,Dr=Ld,kr=Fd,Cn=d.forwardRef(({className:e,sideOffset:t=4,...n},r)=>v.jsx(gs,{ref:r,sideOffset:t,className:de("ve-z-50 ve-overflow-hidden ve-rounded-[6px] ve-bg-popover ve-px-3 ve-py-1.5 ve-text-sm ve-text-popover-foreground",e),...n}));Cn.displayName=gs.displayName;const $d=({displayName:e,fieldId:t,children:n})=>{const{tooltipsVisible:r}=ys();let o="";return e&&t?o=`${e} (${t})`:t?o=`(${t})`:e&&(o=`${e}`),v.jsx("div",{children:v.jsx(Nr,{children:v.jsxs(Or,{open:r&&!!o,children:[v.jsx(Dr,{asChild:!0,children:v.jsx("div",{className:r?"ve-outline-2 ve-outline-dotted ve-outline-[#5A58F2]":"",children:n})}),v.jsxs(Cn,{children:[v.jsx("p",{children:o}),v.jsx(kr,{fill:"bg-popover"})]})]})})})},hs=E.createContext(void 0),Bd=({children:e})=>{const[t,n]=E.useState(!1),r=()=>{n(o=>!o)};return v.jsx(hs.Provider,{value:{tooltipsVisible:t,toggleTooltips:r},children:e})},ys=()=>{const e=E.useContext(hs);return e||{tooltipsVisible:!1,toggleTooltips:()=>{}}},Wd=(e,t,n,r,o,a,s,i)=>{const{history:{back:c,forward:u,histories:f,index:p,hasPast:l,hasFuture:g,setHistories:y}}=Be.usePuck();return E.useEffect(()=>{t(f,p)},[p,f,t]),v.jsxs("header",{className:"puck-header",children:[v.jsxs("div",{className:"header-left",children:[v.jsx(zd,{}),v.jsx(Ud,{}),v.jsx(Hd,{themeModeActive:s,toggleThemeMode:i})]}),v.jsx("div",{className:"header-center"}),v.jsxs("div",{className:"actions",children:[!s&&v.jsx(Je,{variant:"ghost",size:"icon",disabled:!l,onClick:c,children:v.jsx(Ai,{className:"sm-icon"})}),!s&&v.jsx(Je,{variant:"ghost",size:"icon",disabled:!g,onClick:u,children:v.jsx(Ti,{className:"sm-icon"})}),v.jsx(Vd,{disabled:f.length===1,onClearLocalChanges:()=>{e(),y([{id:"root",state:{data:r}}])}}),!a&&v.jsx(Je,{variant:"secondary",disabled:f.length===1,onClick:async()=>{await o(n),e()},children:"Publish"})]})]})},Vd=({disabled:e,onClearLocalChanges:t})=>{const[n,r]=E.useState(!1),o=()=>{t(),r(!1)};return v.jsxs(eu,{open:n,onOpenChange:r,children:[v.jsx(tu,{disabled:e,asChild:!0,children:v.jsx(Je,{variant:"outline",children:"Clear Local Changes"})}),v.jsxs(Oa,{children:[v.jsxs(Da,{children:[v.jsx(_a,{children:"Clear Local Changes"}),v.jsx(ja,{children:"This action will remove your local changes. It cannot be undone."})]}),v.jsxs(ka,{children:[v.jsx(Ma,{children:"Cancel"}),v.jsx(Je,{onClick:o,children:"Confirm"})]})]})]})},zd=()=>{const{dispatch:e,appState:{ui:{leftSideBarVisible:t,rightSideBarVisible:n}}}=Be.usePuck(),r=E.useCallback(o=>{const a=window.matchMedia("(min-width: 638px)").matches,s=o==="left"?t:n,i=o==="left"?"rightSideBarVisible":"leftSideBarVisible";e({type:"setUi",ui:{[`${o}SideBarVisible`]:!s,...a?{}:{[i]:!1}}})},[e,t,n]);return v.jsxs(v.Fragment,{children:[v.jsx(Je,{variant:"ghost",size:"icon",onClick:()=>{r("left")},children:v.jsx(Ri,{className:"sm-icon"})}),v.jsx(Je,{variant:"ghost",size:"icon",onClick:()=>{r("right")},children:v.jsx(Pi,{className:"sm-icon"})})]})},Ud=()=>{const{toggleTooltips:e,tooltipsVisible:t}=ys();return v.jsx(Nr,{children:v.jsxs(Or,{children:[v.jsx(Dr,{asChild:!0,children:v.jsxs("div",{className:"ve-flex ve-flex-row ve-self-center ve-gap-3 ve-pl-2",children:[v.jsx(br,{onCheckedChange:e,checked:t}),v.jsx("p",{className:"ve-self-center ve-text-sm",children:"Entity Fields"})]})}),v.jsxs(Cn,{children:[t?"Hide Entity Fields":"Show Entity Fields",v.jsx(kr,{fill:"ve-bg-popover"})]})]})})},Hd=({themeModeActive:e,toggleThemeMode:t})=>v.jsx(Nr,{children:v.jsxs(Or,{children:[v.jsx(Dr,{asChild:!0,children:v.jsxs("div",{className:"ve-flex ve-flex-row ve-self-center ve-gap-3 ve-pl-2",children:[v.jsx(br,{onCheckedChange:t,checked:e}),v.jsx("p",{className:"ve-self-center ve-text-sm",children:"Theme Mode"})]})}),v.jsxs(Cn,{children:[e?"Disable Theme Mode":"Enable Theme Mode",v.jsx(kr,{fill:"ve-bg-popover"})]})]})}),mo="ROLE_",go="TEMPLATE_",Gd="LAYOUT_",Yd="ENTITY_";function Qn(e,t,n,r,o){const a=e?"dev":"";if(!t||!n||!o&&!r)throw new Error("Unable to generate local storage key, missing query parameters");if(t===$f.INDIVIDUAL){if(!o)throw new Error(`EntityId required for role ${t}`);return a+mo+t+go+n+Yd+o}if(!r)throw new Error(`LayoutId required for role ${t}`);return a+mo+t+go+n+Gd+r}const Kd=mn("ve-relative ve-rounded ve-border ve-m-4 ve-mb-0 ve-p-4 ve-[&>svg~*]:pl-7 ve-[&>svg+div]:translate-y-[-3px] ve-[&>svg]:absolute ve-[&>svg]:left-4 ve-[&>svg]:top-4 ve-[&>svg]:text-foreground",{variants:{variant:{default:"ve-bg-background ve-text-foreground",destructive:"ve-border-destructive/50 ve-text-destructive ve-dark:border-destructive ve-[&>svg]:text-destructive"}},defaultVariants:{variant:"default"}}),er=E.forwardRef(({className:e,variant:t,...n},r)=>v.jsx("div",{ref:r,role:"alert",className:de(Kd({variant:t}),e),...n}));er.displayName="Alert";const qd=E.forwardRef(({className:e,...t},n)=>v.jsx("h5",{ref:n,className:de("ve-mb-1 ve-font-medium ve-leading-none ve-tracking-tight",e),...t}));qd.displayName="AlertTitle";const tr=E.forwardRef(({className:e,...t},n)=>v.jsx("div",{ref:n,className:de("ve-text-sm [&_p]:ve-leading-relaxed",e),...t}));tr.displayName="AlertDescription";const bs=e=>{const t={label:e.label,type:"object",objectFields:{}};return Object.entries(e.styles).forEach(([n,r])=>{if("type"in r){const o=Xd(r);o&&(t.objectFields[n]=o)}else t.objectFields[n]=bs(r)}),t},Xd=e=>{switch(e.type){case"number":return{label:e.label,type:"number"};case"select":return{label:e.label,type:"select",options:e.options};case"color":return{label:e.label,type:"text"}}},xs=(e,t)=>{const n={};return Object.entries(t.styles).forEach(([r,o])=>{"type"in o?n[r]=(e==null?void 0:e[r])??o.default:n[r]=xs(e==null?void 0:e[r],o)}),n},Jd=e=>{const{saveTheme:t,themeConfig:n,savedThemeValues:r}=e;if(!n)return v.jsx("div",{children:v.jsx(er,{children:v.jsx(tr,{children:"Please contact your developer to set up theme management."})})});const o=(a,s)=>{const i={...n,[a]:{...n[a],styles:s}};t(i)};return v.jsxs("div",{children:[v.jsx(er,{children:v.jsx(tr,{children:"Changes to the theme will affect all templates and layouts for the entire site."})}),Object.entries(n).map(([a,s])=>{const i=bs(s),c=xs(r,s);return v.jsx(Be.AutoFieldPrivate,{field:i,onChange:u=>o(a,u),value:c},a)})]})},Zd=({puckConfig:e,puckInitialHistory:t,isLoading:n,clearHistory:r,templateMetadata:o,saveState:a,saveSaveState:s,saveVisualConfigData:i,sendDevSaveStateData:c,buildLocalStorageKey:u,devLogger:f,themeConfig:p})=>{const[l,g]=E.useState(!1),[y,h]=E.useState(!1),b=E.useRef(0),x=E.useCallback((A,O)=>{O!==0&&b.current!==O&&A.length>0&&(f.logFunc("handleHistoryChange"),f.logData("PUCK_INDEX",O),f.logData("PUCK_HISTORY",A),b.current=O,f.logFunc("saveToLocalStorage"),window.localStorage.setItem(u(),JSON.stringify(A)),(a==null?void 0:a.hash)!==A[O].id&&(o.isDevMode&&!o.devOverride?(f.logFunc("sendDevSaveStateData"),c({payload:{devSaveStateData:JSON.stringify(A[O].state.data)}})):(f.logFunc("saveSaveState"),s({payload:{hash:A[O].id,history:JSON.stringify(A[O].state)}}))))},[o,Qn,a]),w=()=>{r(),b.current=0},C=()=>{},P=async A=>{y||(f.logFunc("saveVisualConfigData"),i({payload:{visualConfigurationData:JSON.stringify(A)}}))},R=async()=>{if(!n&&!l){g(!0);return}},D=()=>{h(A=>!A)};return v.jsx(Bd,{children:v.jsx(Be.Puck,{config:e,data:{},initialHistory:t,onChange:R,overrides:{header:()=>{const{appState:A,refreshPermissions:O,config:$}=Be.usePuck();return E.useEffect(()=>{Object.values($.components).forEach(k=>{k.resolvePermissions=()=>({drag:!y,duplicate:!y,delete:!y,insert:!y,edit:!y})});const M=document.querySelector("[class*='PuckLayout-leftSideBar'] > div[class*='SidebarSection--noBorderTop']");M&&(M.style.display=y?"none":"");const z=document.querySelector("[class*='PuckLayout-rightSideBar'] > div[class*='SidebarSection--noBorderTop'] > div[class*='SidebarSection-title']");z&&(z.style.display=y?"none":""),O()},[y]),Wd(w,x,A.data,t==null?void 0:t.histories[0].state.data,P,o.isDevMode&&!o.devOverride,y,D)},actionBar:y?()=>v.jsx(v.Fragment,{}):void 0,components:y?()=>v.jsx(v.Fragment,{}):void 0,fields:y?()=>v.jsx(Jd,{themeConfig:p,saveTheme:C,savedThemeValues:void 0}):void 0}})})};var _r="Progress",jr=100,[Qd,Bp]=nt(_r),[ef,tf]=Qd(_r),ws=d.forwardRef((e,t)=>{const{__scopeProgress:n,value:r=null,max:o,getValueLabel:a=nf,...s}=e;(o||o===0)&&!ho(o)&&console.error(rf(`${o}`,"Progress"));const i=ho(o)?o:jr;r!==null&&!yo(r,i)&&console.error(of(`${r}`,"Progress"));const c=yo(r,i)?r:null,u=pn(c)?a(c,i):void 0;return v.jsx(ef,{scope:n,value:c,max:i,children:v.jsx(ae.div,{"aria-valuemax":i,"aria-valuemin":0,"aria-valuenow":pn(c)?c:void 0,"aria-valuetext":u,role:"progressbar","data-state":Ss(c,i),"data-value":c??void 0,"data-max":i,...s,ref:t})})});ws.displayName=_r;var Es="ProgressIndicator",Cs=d.forwardRef((e,t)=>{const{__scopeProgress:n,...r}=e,o=tf(Es,n);return v.jsx(ae.div,{"data-state":Ss(o.value,o.max),"data-value":o.value??void 0,"data-max":o.max,...r,ref:t})});Cs.displayName=Es;function nf(e,t){return`${Math.round(e/t*100)}%`}function Ss(e,t){return e==null?"indeterminate":e===t?"complete":"loading"}function pn(e){return typeof e=="number"}function ho(e){return pn(e)&&!isNaN(e)&&e>0}function yo(e,t){return pn(e)&&!isNaN(e)&&e<=t&&e>=0}function rf(e,t){return`Invalid prop \`max\` of value \`${e}\` supplied to \`${t}\`. Only numbers greater than 0 are valid max values. Defaulting to \`${jr}\`.`}function of(e,t){return`Invalid prop \`value\` of value \`${e}\` supplied to \`${t}\`. The \`value\` prop must be:
|
|
125
|
+
For more information, see https://radix-ui.com/primitives/docs/components/alert-dialog`;return v.useEffect(()=>{var n;document.getElementById((n=e.current)==null?void 0:n.getAttribute("aria-describedby"))||console.warn(t)},[t,e]),null},sv=wu,lv=Eu,cv=Su,Nu=Cu,Du=_u,ku=Ru,ju=Mu,Iu=Tu,Fu=Ou;function Lu(e){var t,r,n="";if(typeof e=="string"||typeof e=="number")n+=e;else if(typeof e=="object")if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(r=Lu(e[t]))&&(n&&(n+=" "),n+=r)}else for(r in e)e[r]&&(n&&(n+=" "),n+=r);return n}function uv(){for(var e,t,r=0,n="",o=arguments.length;r<o;r++)(e=arguments[r])&&(t=Lu(e))&&(n&&(n+=" "),n+=t);return n}const ti="-";function fv(e){const t=pv(e),{conflictingClassGroups:r,conflictingClassGroupModifiers:n}=e;function o(i){const s=i.split(ti);return s[0]===""&&s.length!==1&&s.shift(),Bu(s,t)||dv(i)}function a(i,s){const l=r[i]||[];return s&&n[i]?[...l,...n[i]]:l}return{getClassGroupId:o,getConflictingClassGroupIds:a}}function Bu(e,t){var i;if(e.length===0)return t.classGroupId;const r=e[0],n=t.nextPart.get(r),o=n?Bu(e.slice(1),n):void 0;if(o)return o;if(t.validators.length===0)return;const a=e.join(ti);return(i=t.validators.find(({validator:s})=>s(a)))==null?void 0:i.classGroupId}const Ps=/^\[(.+)\]$/;function dv(e){if(Ps.test(e)){const t=Ps.exec(e)[1],r=t==null?void 0:t.substring(0,t.indexOf(":"));if(r)return"arbitrary.."+r}}function pv(e){const{theme:t,prefix:r}=e,n={nextPart:new Map,validators:[]};return gv(Object.entries(e.classGroups),r).forEach(([a,i])=>{ya(i,n,a,t)}),n}function ya(e,t,r,n){e.forEach(o=>{if(typeof o=="string"){const a=o===""?t:Ms(t,o);a.classGroupId=r;return}if(typeof o=="function"){if(hv(o)){ya(o(n),t,r,n);return}t.validators.push({validator:o,classGroupId:r});return}Object.entries(o).forEach(([a,i])=>{ya(i,Ms(t,a),r,n)})})}function Ms(e,t){let r=e;return t.split(ti).forEach(n=>{r.nextPart.has(n)||r.nextPart.set(n,{nextPart:new Map,validators:[]}),r=r.nextPart.get(n)}),r}function hv(e){return e.isThemeGetter}function gv(e,t){return t?e.map(([r,n])=>{const o=n.map(a=>typeof a=="string"?t+a:typeof a=="object"?Object.fromEntries(Object.entries(a).map(([i,s])=>[t+i,s])):a);return[r,o]}):e}function vv(e){if(e<1)return{get:()=>{},set:()=>{}};let t=0,r=new Map,n=new Map;function o(a,i){r.set(a,i),t++,t>e&&(t=0,n=r,r=new Map)}return{get(a){let i=r.get(a);if(i!==void 0)return i;if((i=n.get(a))!==void 0)return o(a,i),i},set(a,i){r.has(a)?r.set(a,i):o(a,i)}}}const Hu="!";function bv(e){const{separator:t,experimentalParseClassName:r}=e,n=t.length===1,o=t[0],a=t.length;function i(s){const l=[];let c=0,u=0,p;for(let m=0;m<s.length;m++){let w=s[m];if(c===0){if(w===o&&(n||s.slice(m,m+a)===t)){l.push(s.slice(u,m)),u=m+a;continue}if(w==="/"){p=m;continue}}w==="["?c++:w==="]"&&c--}const f=l.length===0?s:s.substring(u),h=f.startsWith(Hu),b=h?f.substring(1):f,g=p&&p>u?p-u:void 0;return{modifiers:l,hasImportantModifier:h,baseClassName:b,maybePostfixModifierPosition:g}}return r?function(l){return r({className:l,parseClassName:i})}:i}function mv(e){if(e.length<=1)return e;const t=[];let r=[];return e.forEach(n=>{n[0]==="["?(t.push(...r.sort(),n),r=[]):r.push(n)}),t.push(...r.sort()),t}function yv(e){return{cache:vv(e.cacheSize),parseClassName:bv(e),...fv(e)}}const xv=/\s+/;function wv(e,t){const{parseClassName:r,getClassGroupId:n,getConflictingClassGroupIds:o}=t,a=new Set;return e.trim().split(xv).map(i=>{const{modifiers:s,hasImportantModifier:l,baseClassName:c,maybePostfixModifierPosition:u}=r(i);let p=!!u,f=n(p?c.substring(0,u):c);if(!f){if(!p)return{isTailwindClass:!1,originalClassName:i};if(f=n(c),!f)return{isTailwindClass:!1,originalClassName:i};p=!1}const h=mv(s).join(":");return{isTailwindClass:!0,modifierId:l?h+Hu:h,classGroupId:f,originalClassName:i,hasPostfixModifier:p}}).reverse().filter(i=>{if(!i.isTailwindClass)return!0;const{modifierId:s,classGroupId:l,hasPostfixModifier:c}=i,u=s+l;return a.has(u)?!1:(a.add(u),o(l,c).forEach(p=>a.add(s+p)),!0)}).reverse().map(i=>i.originalClassName).join(" ")}function Ev(){let e=0,t,r,n="";for(;e<arguments.length;)(t=arguments[e++])&&(r=zu(t))&&(n&&(n+=" "),n+=r);return n}function zu(e){if(typeof e=="string")return e;let t,r="";for(let n=0;n<e.length;n++)e[n]&&(t=zu(e[n]))&&(r&&(r+=" "),r+=t);return r}function Sv(e,...t){let r,n,o,a=i;function i(l){const c=t.reduce((u,p)=>p(u),e());return r=yv(c),n=r.cache.get,o=r.cache.set,a=s,s(l)}function s(l){const c=n(l);if(c)return c;const u=wv(l,r);return o(l,u),u}return function(){return a(Ev.apply(null,arguments))}}function ye(e){const t=r=>r[e]||[];return t.isThemeGetter=!0,t}const Uu=/^\[(?:([a-z-]+):)?(.+)\]$/i,Cv=/^\d+\/\d+$/,_v=new Set(["px","full","screen"]),$v=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Tv=/\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$/,Av=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,Ov=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,Rv=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/;function vt(e){return Vt(e)||_v.has(e)||Cv.test(e)}function Rt(e){return Rr(e,"length",Fv)}function Vt(e){return!!e&&!Number.isNaN(Number(e))}function jn(e){return Rr(e,"number",Vt)}function Jr(e){return!!e&&Number.isInteger(Number(e))}function Pv(e){return e.endsWith("%")&&Vt(e.slice(0,-1))}function ie(e){return Uu.test(e)}function Pt(e){return $v.test(e)}const Mv=new Set(["length","size","percentage"]);function Nv(e){return Rr(e,Mv,Gu)}function Dv(e){return Rr(e,"position",Gu)}const kv=new Set(["image","url"]);function jv(e){return Rr(e,kv,Bv)}function Iv(e){return Rr(e,"",Lv)}function Zr(){return!0}function Rr(e,t,r){const n=Uu.exec(e);return n?n[1]?typeof t=="string"?n[1]===t:t.has(n[1]):r(n[2]):!1}function Fv(e){return Tv.test(e)&&!Av.test(e)}function Gu(){return!1}function Lv(e){return Ov.test(e)}function Bv(e){return Rv.test(e)}function Hv(){const e=ye("colors"),t=ye("spacing"),r=ye("blur"),n=ye("brightness"),o=ye("borderColor"),a=ye("borderRadius"),i=ye("borderSpacing"),s=ye("borderWidth"),l=ye("contrast"),c=ye("grayscale"),u=ye("hueRotate"),p=ye("invert"),f=ye("gap"),h=ye("gradientColorStops"),b=ye("gradientColorStopPositions"),g=ye("inset"),m=ye("margin"),w=ye("opacity"),C=ye("padding"),E=ye("saturate"),_=ye("scale"),S=ye("sepia"),O=ye("skew"),M=ye("space"),I=ye("translate"),U=()=>["auto","contain","none"],V=()=>["auto","hidden","clip","visible","scroll"],K=()=>["auto",ie,t],F=()=>[ie,t],Y=()=>["",vt,Rt],G=()=>["auto",Vt,ie],te=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],H=()=>["solid","dashed","dotted","double","none"],oe=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],N=()=>["start","end","center","between","around","evenly","stretch"],Z=()=>["","0",ie],$=()=>["auto","avoid","all","avoid-page","page","left","right","column"],T=()=>[Vt,jn],D=()=>[Vt,ie];return{cacheSize:500,separator:":",theme:{colors:[Zr],spacing:[vt,Rt],blur:["none","",Pt,ie],brightness:T(),borderColor:[e],borderRadius:["none","","full",Pt,ie],borderSpacing:F(),borderWidth:Y(),contrast:T(),grayscale:Z(),hueRotate:D(),invert:Z(),gap:F(),gradientColorStops:[e],gradientColorStopPositions:[Pv,Rt],inset:K(),margin:K(),opacity:T(),padding:F(),saturate:T(),scale:T(),sepia:Z(),skew:D(),space:F(),translate:F()},classGroups:{aspect:[{aspect:["auto","square","video",ie]}],container:["container"],columns:[{columns:[Pt]}],"break-after":[{"break-after":$()}],"break-before":[{"break-before":$()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:[...te(),ie]}],overflow:[{overflow:V()}],"overflow-x":[{"overflow-x":V()}],"overflow-y":[{"overflow-y":V()}],overscroll:[{overscroll:U()}],"overscroll-x":[{"overscroll-x":U()}],"overscroll-y":[{"overscroll-y":U()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[g]}],"inset-x":[{"inset-x":[g]}],"inset-y":[{"inset-y":[g]}],start:[{start:[g]}],end:[{end:[g]}],top:[{top:[g]}],right:[{right:[g]}],bottom:[{bottom:[g]}],left:[{left:[g]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",Jr,ie]}],basis:[{basis:K()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",ie]}],grow:[{grow:Z()}],shrink:[{shrink:Z()}],order:[{order:["first","last","none",Jr,ie]}],"grid-cols":[{"grid-cols":[Zr]}],"col-start-end":[{col:["auto",{span:["full",Jr,ie]},ie]}],"col-start":[{"col-start":G()}],"col-end":[{"col-end":G()}],"grid-rows":[{"grid-rows":[Zr]}],"row-start-end":[{row:["auto",{span:[Jr,ie]},ie]}],"row-start":[{"row-start":G()}],"row-end":[{"row-end":G()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",ie]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",ie]}],gap:[{gap:[f]}],"gap-x":[{"gap-x":[f]}],"gap-y":[{"gap-y":[f]}],"justify-content":[{justify:["normal",...N()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...N(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...N(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[C]}],px:[{px:[C]}],py:[{py:[C]}],ps:[{ps:[C]}],pe:[{pe:[C]}],pt:[{pt:[C]}],pr:[{pr:[C]}],pb:[{pb:[C]}],pl:[{pl:[C]}],m:[{m:[m]}],mx:[{mx:[m]}],my:[{my:[m]}],ms:[{ms:[m]}],me:[{me:[m]}],mt:[{mt:[m]}],mr:[{mr:[m]}],mb:[{mb:[m]}],ml:[{ml:[m]}],"space-x":[{"space-x":[M]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[M]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",ie,t]}],"min-w":[{"min-w":[ie,t,"min","max","fit"]}],"max-w":[{"max-w":[ie,t,"none","full","min","max","fit","prose",{screen:[Pt]},Pt]}],h:[{h:[ie,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[ie,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[ie,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[ie,t,"auto","min","max","fit"]}],"font-size":[{text:["base",Pt,Rt]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",jn]}],"font-family":[{font:[Zr]}],"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-fractons"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",ie]}],"line-clamp":[{"line-clamp":["none",Vt,jn]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",vt,ie]}],"list-image":[{"list-image":["none",ie]}],"list-style-type":[{list:["none","disc","decimal",ie]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[w]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[w]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...H(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",vt,Rt]}],"underline-offset":[{"underline-offset":["auto",vt,ie]}],"text-decoration-color":[{decoration:[e]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:F()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",ie]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",ie]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[w]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...te(),Dv]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",Nv]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},jv]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[b]}],"gradient-via-pos":[{via:[b]}],"gradient-to-pos":[{to:[b]}],"gradient-from":[{from:[h]}],"gradient-via":[{via:[h]}],"gradient-to":[{to:[h]}],rounded:[{rounded:[a]}],"rounded-s":[{"rounded-s":[a]}],"rounded-e":[{"rounded-e":[a]}],"rounded-t":[{"rounded-t":[a]}],"rounded-r":[{"rounded-r":[a]}],"rounded-b":[{"rounded-b":[a]}],"rounded-l":[{"rounded-l":[a]}],"rounded-ss":[{"rounded-ss":[a]}],"rounded-se":[{"rounded-se":[a]}],"rounded-ee":[{"rounded-ee":[a]}],"rounded-es":[{"rounded-es":[a]}],"rounded-tl":[{"rounded-tl":[a]}],"rounded-tr":[{"rounded-tr":[a]}],"rounded-br":[{"rounded-br":[a]}],"rounded-bl":[{"rounded-bl":[a]}],"border-w":[{border:[s]}],"border-w-x":[{"border-x":[s]}],"border-w-y":[{"border-y":[s]}],"border-w-s":[{"border-s":[s]}],"border-w-e":[{"border-e":[s]}],"border-w-t":[{"border-t":[s]}],"border-w-r":[{"border-r":[s]}],"border-w-b":[{"border-b":[s]}],"border-w-l":[{"border-l":[s]}],"border-opacity":[{"border-opacity":[w]}],"border-style":[{border:[...H(),"hidden"]}],"divide-x":[{"divide-x":[s]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[s]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[w]}],"divide-style":[{divide:H()}],"border-color":[{border:[o]}],"border-color-x":[{"border-x":[o]}],"border-color-y":[{"border-y":[o]}],"border-color-t":[{"border-t":[o]}],"border-color-r":[{"border-r":[o]}],"border-color-b":[{"border-b":[o]}],"border-color-l":[{"border-l":[o]}],"divide-color":[{divide:[o]}],"outline-style":[{outline:["",...H()]}],"outline-offset":[{"outline-offset":[vt,ie]}],"outline-w":[{outline:[vt,Rt]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:Y()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[w]}],"ring-offset-w":[{"ring-offset":[vt,Rt]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",Pt,Iv]}],"shadow-color":[{shadow:[Zr]}],opacity:[{opacity:[w]}],"mix-blend":[{"mix-blend":[...oe(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":oe()}],filter:[{filter:["","none"]}],blur:[{blur:[r]}],brightness:[{brightness:[n]}],contrast:[{contrast:[l]}],"drop-shadow":[{"drop-shadow":["","none",Pt,ie]}],grayscale:[{grayscale:[c]}],"hue-rotate":[{"hue-rotate":[u]}],invert:[{invert:[p]}],saturate:[{saturate:[E]}],sepia:[{sepia:[S]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[r]}],"backdrop-brightness":[{"backdrop-brightness":[n]}],"backdrop-contrast":[{"backdrop-contrast":[l]}],"backdrop-grayscale":[{"backdrop-grayscale":[c]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[u]}],"backdrop-invert":[{"backdrop-invert":[p]}],"backdrop-opacity":[{"backdrop-opacity":[w]}],"backdrop-saturate":[{"backdrop-saturate":[E]}],"backdrop-sepia":[{"backdrop-sepia":[S]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[i]}],"border-spacing-x":[{"border-spacing-x":[i]}],"border-spacing-y":[{"border-spacing-y":[i]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",ie]}],duration:[{duration:D()}],ease:[{ease:["linear","in","out","in-out",ie]}],delay:[{delay:D()}],animate:[{animate:["none","spin","ping","pulse","bounce",ie]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[_]}],"scale-x":[{"scale-x":[_]}],"scale-y":[{"scale-y":[_]}],rotate:[{rotate:[Jr,ie]}],"translate-x":[{"translate-x":[I]}],"translate-y":[{"translate-y":[I]}],"skew-x":[{"skew-x":[O]}],"skew-y":[{"skew-y":[O]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",ie]}],accent:[{accent:["auto",e]}],appearance:[{appearance:["none","auto"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",ie]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":F()}],"scroll-mx":[{"scroll-mx":F()}],"scroll-my":[{"scroll-my":F()}],"scroll-ms":[{"scroll-ms":F()}],"scroll-me":[{"scroll-me":F()}],"scroll-mt":[{"scroll-mt":F()}],"scroll-mr":[{"scroll-mr":F()}],"scroll-mb":[{"scroll-mb":F()}],"scroll-ml":[{"scroll-ml":F()}],"scroll-p":[{"scroll-p":F()}],"scroll-px":[{"scroll-px":F()}],"scroll-py":[{"scroll-py":F()}],"scroll-ps":[{"scroll-ps":F()}],"scroll-pe":[{"scroll-pe":F()}],"scroll-pt":[{"scroll-pt":F()}],"scroll-pr":[{"scroll-pr":F()}],"scroll-pb":[{"scroll-pb":F()}],"scroll-pl":[{"scroll-pl":F()}],"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",ie]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[vt,Rt,jn]}],stroke:[{stroke:[e,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}}const zv=Sv(Hv);function Me(...e){return zv(uv(e))}function Wu(e){var t,r,n="";if(typeof e=="string"||typeof e=="number")n+=e;else if(typeof e=="object")if(Array.isArray(e))for(t=0;t<e.length;t++)e[t]&&(r=Wu(e[t]))&&(n&&(n+=" "),n+=r);else for(t in e)e[t]&&(n&&(n+=" "),n+=t);return n}function Uv(){for(var e,t,r=0,n="";r<arguments.length;)(e=arguments[r++])&&(t=Wu(e))&&(n&&(n+=" "),n+=t);return n}const Ns=e=>typeof e=="boolean"?"".concat(e):e===0?"0":e,Ds=Uv,po=(e,t)=>r=>{var n;if((t==null?void 0:t.variants)==null)return Ds(e,r==null?void 0:r.class,r==null?void 0:r.className);const{variants:o,defaultVariants:a}=t,i=Object.keys(o).map(c=>{const u=r==null?void 0:r[c],p=a==null?void 0:a[c];if(u===null)return null;const f=Ns(u)||Ns(p);return o[c][f]}),s=r&&Object.entries(r).reduce((c,u)=>{let[p,f]=u;return f===void 0||(c[p]=f),c},{}),l=t==null||(n=t.compoundVariants)===null||n===void 0?void 0:n.reduce((c,u)=>{let{class:p,className:f,...h}=u;return Object.entries(h).every(b=>{let[g,m]=b;return Array.isArray(m)?m.includes({...a,...s}[g]):{...a,...s}[g]===m})?[...c,p,f]:c},[]);return Ds(e,i,l,r==null?void 0:r.class,r==null?void 0:r.className)},ri=po("inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-secondary active:bg-primary-foreground active:text-primary active:border-primary focus:border-2",secondary:"bg-primary-foreground text-primary border-2 border-primary hover:bg-primary hover:text-primary-foreground active:bg-secondary active:text-secondary-foreground focus:border-2",destructive:"bg-destructive text-destructive-foreground hover:bg-destructive/90",outline:"border-primary border-input bg-background hover:bg-accent hover:text-accent-foreground",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-10 rounded-md px-4 py-2",sm:"h-9 rounded-md px-3",lg:"h-11 rounded-md px-8",icon:"h-10 w-10"}},defaultVariants:{variant:"default",size:"default"}}),Gv=v.forwardRef(({className:e,variant:t,size:r,asChild:n=!1,...o},a)=>{const i=n?Yt:"button";return y.jsx(i,{className:Me(ri({variant:t,size:r,className:e})),ref:a,...o})});Gv.displayName="Button";const Wv=sv,Vv=lv,Yv=cv,Vu=v.forwardRef(({className:e,...t},r)=>y.jsx(Nu,{className:Me("ve-fixed ve-inset-0 ve-z-50 ve-bg-black/80 data-[state=open]:ve-animate-in data-[state=closed]:ve-animate-out data-[state=closed]:ve-fade-out-0 data-[state=open]:ve-fade-in-0",e),...t,ref:r}));Vu.displayName=Nu.displayName;const Yu=v.forwardRef(({className:e,...t},r)=>y.jsxs(Yv,{children:[y.jsx(Vu,{}),y.jsx(Du,{ref:r,className:Me("ve-fixed ve-left-[50%] ve-top-[50%] ve-z-50 ve-grid ve-w-full ve-max-w-lg ve-translate-x-[-50%] ve-translate-y-[-50%] ve-gap-4 ve-border ve-bg-background ve-p-6 ve-shadow-lg ve-duration-200 data-[state=open]:ve-animate-in data-[state=closed]:ve-animate-out data-[state=closed]:ve-fade-out-0 data-[state=open]:ve-fade-in-0 data-[state=closed]:ve-zoom-out-95 data-[state=open]:ve-zoom-in-95 data-[state=closed]:ve-slide-out-to-left-1/2 data-[state=closed]:ve-slide-out-to-top-[48%] data-[state=open]:ve-slide-in-from-left-1/2 data-[state=open]:ve-slide-in-from-top-[48%] sm:ve-rounded-lg",e),...t})]}));Yu.displayName=Du.displayName;const Ku=({className:e,...t})=>y.jsx("div",{className:Me("ve-flex ve-flex-col ve-space-y-2 ve-text-center sm:ve-text-left",e),...t});Ku.displayName="AlertDialogHeader";const qu=({className:e,...t})=>y.jsx("div",{className:Me("ve-flex ve-flex-col-reverse sm:ve-flex-row sm:ve-justify-end sm:ve-space-x-2",e),...t});qu.displayName="AlertDialogFooter";const Xu=v.forwardRef(({className:e,...t},r)=>y.jsx(Iu,{ref:r,className:Me("ve-text-lg ve-font-semibold",e),...t}));Xu.displayName=Iu.displayName;const Ju=v.forwardRef(({className:e,...t},r)=>y.jsx(Fu,{ref:r,className:Me("ve-text-sm ve-text-muted-foreground",e),...t}));Ju.displayName=Fu.displayName;const Kv=v.forwardRef(({className:e,...t},r)=>y.jsx(ku,{ref:r,className:Me(ri(),e),...t}));Kv.displayName=ku.displayName;const Zu=v.forwardRef(({className:e,...t},r)=>y.jsx(ju,{ref:r,className:Me(ri({variant:"outline"}),"ve-mt-2 sm:ve-mt-0",e),...t}));Zu.displayName=ju.displayName;const qv=po("ve-inline-flex ve-items-center ve-justify-center ve-whitespace-nowrap ve-rounded-md ve-text-sm ve-font-medium ve-ring-offset-background ve-transition-colors focus-visible:ve-outline-none focus-visible:ve-ring-2 focus-visible:ve-ring-ring focus-visible:ve-ring-offset-2 disabled:ve-pointer-events-none disabled:ve-opacity-50",{variants:{variant:{default:"ve-bg-primary ve-text-primary-foreground hover:ve-bg-primary/90",destructive:"ve-bg-destructive ve-text-destructive-foreground hover:ve-bg-destructive/90",outline:"ve-border ve-border-input ve-bg-background hover:ve-bg-accent hover:ve-text-accent-foreground",secondary:"ve-bg-secondary ve-text-secondary-foreground hover:ve-bg-secondary/80",ghost:"hover:ve-bg-accent hover:ve-text-accent-foreground",link:"ve-text-primary ve-underline-offset-4 hover:ve-underline"},size:{default:"ve-h-10 ve-rounded-md ve-px-4 ve-py-2",sm:"ve-h-9 ve-rounded-md ve-px-3",lg:"ve-h-11 ve-rounded-md ve-px-8",icon:"ve-h-10 ve-w-10"}},defaultVariants:{variant:"default",size:"default"}}),kt=v.forwardRef(({className:e,variant:t,size:r,asChild:n=!1,...o},a)=>{const i=n?Yt:"button";return y.jsx(i,{className:Me(qv({variant:t,size:r,className:e})),ref:a,...o})});kt.displayName="Button";function Qu(e){const t=v.useRef({value:e,previous:e});return v.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}function ni(e){const[t,r]=v.useState(void 0);return mt(()=>{if(e){r({width:e.offsetWidth,height:e.offsetHeight});const n=new ResizeObserver(o=>{if(!Array.isArray(o)||!o.length)return;const a=o[0];let i,s;if("borderBoxSize"in a){const l=a.borderBoxSize,c=Array.isArray(l)?l[0]:l;i=c.inlineSize,s=c.blockSize}else i=e.offsetWidth,s=e.offsetHeight;r({width:i,height:s})});return n.observe(e,{box:"border-box"}),()=>n.unobserve(e)}else r(void 0)},[e]),t}var oi="Switch",[Xv,Zk]=zt(oi),[Jv,Zv]=Xv(oi),ef=v.forwardRef((e,t)=>{const{__scopeSwitch:r,name:n,checked:o,defaultChecked:a,required:i,disabled:s,value:l="on",onCheckedChange:c,...u}=e,[p,f]=v.useState(null),h=Pe(t,C=>f(C)),b=v.useRef(!1),g=p?!!p.closest("form"):!0,[m=!1,w]=gn({prop:o,defaultProp:a,onChange:c});return y.jsxs(Jv,{scope:r,checked:m,disabled:s,children:[y.jsx($e.button,{type:"button",role:"switch","aria-checked":m,"aria-required":i,"data-state":nf(m),"data-disabled":s?"":void 0,disabled:s,value:l,...u,ref:h,onClick:Se(e.onClick,C=>{w(E=>!E),g&&(b.current=C.isPropagationStopped(),b.current||C.stopPropagation())})}),g&&y.jsx(Qv,{control:p,bubbles:!b.current,name:n,value:l,checked:m,required:i,disabled:s,style:{transform:"translateX(-100%)"}})]})});ef.displayName=oi;var tf="SwitchThumb",rf=v.forwardRef((e,t)=>{const{__scopeSwitch:r,...n}=e,o=Zv(tf,r);return y.jsx($e.span,{"data-state":nf(o.checked),"data-disabled":o.disabled?"":void 0,...n,ref:t})});rf.displayName=tf;var Qv=e=>{const{control:t,checked:r,bubbles:n=!0,...o}=e,a=v.useRef(null),i=Qu(r),s=ni(t);return v.useEffect(()=>{const l=a.current,c=window.HTMLInputElement.prototype,p=Object.getOwnPropertyDescriptor(c,"checked").set;if(i!==r&&p){const f=new Event("click",{bubbles:n});p.call(l,r),l.dispatchEvent(f)}},[i,r,n]),y.jsx("input",{type:"checkbox","aria-hidden":!0,defaultChecked:r,...o,tabIndex:-1,ref:a,style:{...e.style,...s,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})};function nf(e){return e?"checked":"unchecked"}var of=ef,e0=rf;const af=v.forwardRef(({className:e,...t},r)=>y.jsx(of,{className:Me("ve-self-center ve-peer ve-inline-flex ve-h-5 ve-w-9 ve-shrink-0 ve-cursor-pointer ve-items-center ve-rounded-full ve-border-2 ve-border-transparent ve-transition-colors focus-visible:ve-outline-none focus-visible:ve-ring-2 focus-visible:ve-ring-ring focus-visible:ve-ring-offset-2 focus-visible:ve-ring-offset-background disabled:ve-cursor-not-allowed disabled:ve-opacity-50 data-[state=checked]:ve-bg-primary data-[state=unchecked]:ve-bg-input",e),...t,ref:r,children:y.jsx(e0,{className:Me("ve-self-center ve-pointer-events-none ve-block ve-h-4 ve-w-4 ve-rounded-full ve-bg-background ve-shadow-lg ve-ring-0 ve-transition-transform data-[state=checked]:ve-translate-x-4 data-[state=unchecked]:ve-translate-x-0")})}));af.displayName=of.displayName;const t0=["top","right","bottom","left"],jt=Math.min,We=Math.max,Xn=Math.round,In=Math.floor,It=e=>({x:e,y:e}),r0={left:"right",right:"left",bottom:"top",top:"bottom"},n0={start:"end",end:"start"};function xa(e,t,r){return We(e,jt(t,r))}function xt(e,t){return typeof e=="function"?e(t):e}function wt(e){return e.split("-")[0]}function Pr(e){return e.split("-")[1]}function ai(e){return e==="x"?"y":"x"}function ii(e){return e==="y"?"height":"width"}function Ft(e){return["top","bottom"].includes(wt(e))?"y":"x"}function si(e){return ai(Ft(e))}function o0(e,t,r){r===void 0&&(r=!1);const n=Pr(e),o=si(e),a=ii(o);let i=o==="x"?n===(r?"end":"start")?"right":"left":n==="start"?"bottom":"top";return t.reference[a]>t.floating[a]&&(i=Jn(i)),[i,Jn(i)]}function a0(e){const t=Jn(e);return[wa(e),t,wa(t)]}function wa(e){return e.replace(/start|end/g,t=>n0[t])}function i0(e,t,r){const n=["left","right"],o=["right","left"],a=["top","bottom"],i=["bottom","top"];switch(e){case"top":case"bottom":return r?t?o:n:t?n:o;case"left":case"right":return t?a:i;default:return[]}}function s0(e,t,r,n){const o=Pr(e);let a=i0(wt(e),r==="start",n);return o&&(a=a.map(i=>i+"-"+o),t&&(a=a.concat(a.map(wa)))),a}function Jn(e){return e.replace(/left|right|bottom|top/g,t=>r0[t])}function l0(e){return{top:0,right:0,bottom:0,left:0,...e}}function sf(e){return typeof e!="number"?l0(e):{top:e,right:e,bottom:e,left:e}}function Zn(e){const{x:t,y:r,width:n,height:o}=e;return{width:n,height:o,top:r,left:t,right:t+n,bottom:r+o,x:t,y:r}}function ks(e,t,r){let{reference:n,floating:o}=e;const a=Ft(t),i=si(t),s=ii(i),l=wt(t),c=a==="y",u=n.x+n.width/2-o.width/2,p=n.y+n.height/2-o.height/2,f=n[s]/2-o[s]/2;let h;switch(l){case"top":h={x:u,y:n.y-o.height};break;case"bottom":h={x:u,y:n.y+n.height};break;case"right":h={x:n.x+n.width,y:p};break;case"left":h={x:n.x-o.width,y:p};break;default:h={x:n.x,y:n.y}}switch(Pr(t)){case"start":h[i]-=f*(r&&c?-1:1);break;case"end":h[i]+=f*(r&&c?-1:1);break}return h}const c0=async(e,t,r)=>{const{placement:n="bottom",strategy:o="absolute",middleware:a=[],platform:i}=r,s=a.filter(Boolean),l=await(i.isRTL==null?void 0:i.isRTL(t));let c=await i.getElementRects({reference:e,floating:t,strategy:o}),{x:u,y:p}=ks(c,n,l),f=n,h={},b=0;for(let g=0;g<s.length;g++){const{name:m,fn:w}=s[g],{x:C,y:E,data:_,reset:S}=await w({x:u,y:p,initialPlacement:n,placement:f,strategy:o,middlewareData:h,rects:c,platform:i,elements:{reference:e,floating:t}});u=C??u,p=E??p,h={...h,[m]:{...h[m],..._}},S&&b<=50&&(b++,typeof S=="object"&&(S.placement&&(f=S.placement),S.rects&&(c=S.rects===!0?await i.getElementRects({reference:e,floating:t,strategy:o}):S.rects),{x:u,y:p}=ks(c,f,l)),g=-1)}return{x:u,y:p,placement:f,strategy:o,middlewareData:h}};async function un(e,t){var r;t===void 0&&(t={});const{x:n,y:o,platform:a,rects:i,elements:s,strategy:l}=e,{boundary:c="clippingAncestors",rootBoundary:u="viewport",elementContext:p="floating",altBoundary:f=!1,padding:h=0}=xt(t,e),b=sf(h),m=s[f?p==="floating"?"reference":"floating":p],w=Zn(await a.getClippingRect({element:(r=await(a.isElement==null?void 0:a.isElement(m)))==null||r?m:m.contextElement||await(a.getDocumentElement==null?void 0:a.getDocumentElement(s.floating)),boundary:c,rootBoundary:u,strategy:l})),C=p==="floating"?{x:n,y:o,width:i.floating.width,height:i.floating.height}:i.reference,E=await(a.getOffsetParent==null?void 0:a.getOffsetParent(s.floating)),_=await(a.isElement==null?void 0:a.isElement(E))?await(a.getScale==null?void 0:a.getScale(E))||{x:1,y:1}:{x:1,y:1},S=Zn(a.convertOffsetParentRelativeRectToViewportRelativeRect?await a.convertOffsetParentRelativeRectToViewportRelativeRect({elements:s,rect:C,offsetParent:E,strategy:l}):C);return{top:(w.top-S.top+b.top)/_.y,bottom:(S.bottom-w.bottom+b.bottom)/_.y,left:(w.left-S.left+b.left)/_.x,right:(S.right-w.right+b.right)/_.x}}const u0=e=>({name:"arrow",options:e,async fn(t){const{x:r,y:n,placement:o,rects:a,platform:i,elements:s,middlewareData:l}=t,{element:c,padding:u=0}=xt(e,t)||{};if(c==null)return{};const p=sf(u),f={x:r,y:n},h=si(o),b=ii(h),g=await i.getDimensions(c),m=h==="y",w=m?"top":"left",C=m?"bottom":"right",E=m?"clientHeight":"clientWidth",_=a.reference[b]+a.reference[h]-f[h]-a.floating[b],S=f[h]-a.reference[h],O=await(i.getOffsetParent==null?void 0:i.getOffsetParent(c));let M=O?O[E]:0;(!M||!await(i.isElement==null?void 0:i.isElement(O)))&&(M=s.floating[E]||a.floating[b]);const I=_/2-S/2,U=M/2-g[b]/2-1,V=jt(p[w],U),K=jt(p[C],U),F=V,Y=M-g[b]-K,G=M/2-g[b]/2+I,te=xa(F,G,Y),H=!l.arrow&&Pr(o)!=null&&G!==te&&a.reference[b]/2-(G<F?V:K)-g[b]/2<0,oe=H?G<F?G-F:G-Y:0;return{[h]:f[h]+oe,data:{[h]:te,centerOffset:G-te-oe,...H&&{alignmentOffset:oe}},reset:H}}}),f0=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var r,n;const{placement:o,middlewareData:a,rects:i,initialPlacement:s,platform:l,elements:c}=t,{mainAxis:u=!0,crossAxis:p=!0,fallbackPlacements:f,fallbackStrategy:h="bestFit",fallbackAxisSideDirection:b="none",flipAlignment:g=!0,...m}=xt(e,t);if((r=a.arrow)!=null&&r.alignmentOffset)return{};const w=wt(o),C=Ft(s),E=wt(s)===s,_=await(l.isRTL==null?void 0:l.isRTL(c.floating)),S=f||(E||!g?[Jn(s)]:a0(s)),O=b!=="none";!f&&O&&S.push(...s0(s,g,b,_));const M=[s,...S],I=await un(t,m),U=[];let V=((n=a.flip)==null?void 0:n.overflows)||[];if(u&&U.push(I[w]),p){const G=o0(o,i,_);U.push(I[G[0]],I[G[1]])}if(V=[...V,{placement:o,overflows:U}],!U.every(G=>G<=0)){var K,F;const G=(((K=a.flip)==null?void 0:K.index)||0)+1,te=M[G];if(te)return{data:{index:G,overflows:V},reset:{placement:te}};let H=(F=V.filter(oe=>oe.overflows[0]<=0).sort((oe,N)=>oe.overflows[1]-N.overflows[1])[0])==null?void 0:F.placement;if(!H)switch(h){case"bestFit":{var Y;const oe=(Y=V.filter(N=>{if(O){const Z=Ft(N.placement);return Z===C||Z==="y"}return!0}).map(N=>[N.placement,N.overflows.filter(Z=>Z>0).reduce((Z,$)=>Z+$,0)]).sort((N,Z)=>N[1]-Z[1])[0])==null?void 0:Y[0];oe&&(H=oe);break}case"initialPlacement":H=s;break}if(o!==H)return{reset:{placement:H}}}return{}}}};function js(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function Is(e){return t0.some(t=>e[t]>=0)}const d0=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:r}=t,{strategy:n="referenceHidden",...o}=xt(e,t);switch(n){case"referenceHidden":{const a=await un(t,{...o,elementContext:"reference"}),i=js(a,r.reference);return{data:{referenceHiddenOffsets:i,referenceHidden:Is(i)}}}case"escaped":{const a=await un(t,{...o,altBoundary:!0}),i=js(a,r.floating);return{data:{escapedOffsets:i,escaped:Is(i)}}}default:return{}}}}};async function p0(e,t){const{placement:r,platform:n,elements:o}=e,a=await(n.isRTL==null?void 0:n.isRTL(o.floating)),i=wt(r),s=Pr(r),l=Ft(r)==="y",c=["left","top"].includes(i)?-1:1,u=a&&l?-1:1,p=xt(t,e);let{mainAxis:f,crossAxis:h,alignmentAxis:b}=typeof p=="number"?{mainAxis:p,crossAxis:0,alignmentAxis:null}:{mainAxis:p.mainAxis||0,crossAxis:p.crossAxis||0,alignmentAxis:p.alignmentAxis};return s&&typeof b=="number"&&(h=s==="end"?b*-1:b),l?{x:h*u,y:f*c}:{x:f*c,y:h*u}}const h0=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var r,n;const{x:o,y:a,placement:i,middlewareData:s}=t,l=await p0(t,e);return i===((r=s.offset)==null?void 0:r.placement)&&(n=s.arrow)!=null&&n.alignmentOffset?{}:{x:o+l.x,y:a+l.y,data:{...l,placement:i}}}}},g0=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:r,y:n,placement:o}=t,{mainAxis:a=!0,crossAxis:i=!1,limiter:s={fn:m=>{let{x:w,y:C}=m;return{x:w,y:C}}},...l}=xt(e,t),c={x:r,y:n},u=await un(t,l),p=Ft(wt(o)),f=ai(p);let h=c[f],b=c[p];if(a){const m=f==="y"?"top":"left",w=f==="y"?"bottom":"right",C=h+u[m],E=h-u[w];h=xa(C,h,E)}if(i){const m=p==="y"?"top":"left",w=p==="y"?"bottom":"right",C=b+u[m],E=b-u[w];b=xa(C,b,E)}const g=s.fn({...t,[f]:h,[p]:b});return{...g,data:{x:g.x-r,y:g.y-n,enabled:{[f]:a,[p]:i}}}}}},v0=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:r,y:n,placement:o,rects:a,middlewareData:i}=t,{offset:s=0,mainAxis:l=!0,crossAxis:c=!0}=xt(e,t),u={x:r,y:n},p=Ft(o),f=ai(p);let h=u[f],b=u[p];const g=xt(s,t),m=typeof g=="number"?{mainAxis:g,crossAxis:0}:{mainAxis:0,crossAxis:0,...g};if(l){const E=f==="y"?"height":"width",_=a.reference[f]-a.floating[E]+m.mainAxis,S=a.reference[f]+a.reference[E]-m.mainAxis;h<_?h=_:h>S&&(h=S)}if(c){var w,C;const E=f==="y"?"width":"height",_=["top","left"].includes(wt(o)),S=a.reference[p]-a.floating[E]+(_&&((w=i.offset)==null?void 0:w[p])||0)+(_?0:m.crossAxis),O=a.reference[p]+a.reference[E]+(_?0:((C=i.offset)==null?void 0:C[p])||0)-(_?m.crossAxis:0);b<S?b=S:b>O&&(b=O)}return{[f]:h,[p]:b}}}},b0=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var r,n;const{placement:o,rects:a,platform:i,elements:s}=t,{apply:l=()=>{},...c}=xt(e,t),u=await un(t,c),p=wt(o),f=Pr(o),h=Ft(o)==="y",{width:b,height:g}=a.floating;let m,w;p==="top"||p==="bottom"?(m=p,w=f===(await(i.isRTL==null?void 0:i.isRTL(s.floating))?"start":"end")?"left":"right"):(w=p,m=f==="end"?"top":"bottom");const C=g-u.top-u.bottom,E=b-u.left-u.right,_=jt(g-u[m],C),S=jt(b-u[w],E),O=!t.middlewareData.shift;let M=_,I=S;if((r=t.middlewareData.shift)!=null&&r.enabled.x&&(I=E),(n=t.middlewareData.shift)!=null&&n.enabled.y&&(M=C),O&&!f){const V=We(u.left,0),K=We(u.right,0),F=We(u.top,0),Y=We(u.bottom,0);h?I=b-2*(V!==0||K!==0?V+K:We(u.left,u.right)):M=g-2*(F!==0||Y!==0?F+Y:We(u.top,u.bottom))}await l({...t,availableWidth:I,availableHeight:M});const U=await i.getDimensions(s.floating);return b!==U.width||g!==U.height?{reset:{rects:!0}}:{}}}};function ho(){return typeof window<"u"}function Mr(e){return lf(e)?(e.nodeName||"").toLowerCase():"#document"}function Ve(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function pt(e){var t;return(t=(lf(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function lf(e){return ho()?e instanceof Node||e instanceof Ve(e).Node:!1}function tt(e){return ho()?e instanceof Element||e instanceof Ve(e).Element:!1}function dt(e){return ho()?e instanceof HTMLElement||e instanceof Ve(e).HTMLElement:!1}function Fs(e){return!ho()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Ve(e).ShadowRoot}function bn(e){const{overflow:t,overflowX:r,overflowY:n,display:o}=rt(e);return/auto|scroll|overlay|hidden|clip/.test(t+n+r)&&!["inline","contents"].includes(o)}function m0(e){return["table","td","th"].includes(Mr(e))}function go(e){return[":popover-open",":modal"].some(t=>{try{return e.matches(t)}catch{return!1}})}function li(e){const t=ci(),r=tt(e)?rt(e):e;return r.transform!=="none"||r.perspective!=="none"||(r.containerType?r.containerType!=="normal":!1)||!t&&(r.backdropFilter?r.backdropFilter!=="none":!1)||!t&&(r.filter?r.filter!=="none":!1)||["transform","perspective","filter"].some(n=>(r.willChange||"").includes(n))||["paint","layout","strict","content"].some(n=>(r.contain||"").includes(n))}function y0(e){let t=Lt(e);for(;dt(t)&&!Ar(t);){if(li(t))return t;if(go(t))return null;t=Lt(t)}return null}function ci(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function Ar(e){return["html","body","#document"].includes(Mr(e))}function rt(e){return Ve(e).getComputedStyle(e)}function vo(e){return tt(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Lt(e){if(Mr(e)==="html")return e;const t=e.assignedSlot||e.parentNode||Fs(e)&&e.host||pt(e);return Fs(t)?t.host:t}function cf(e){const t=Lt(e);return Ar(t)?e.ownerDocument?e.ownerDocument.body:e.body:dt(t)&&bn(t)?t:cf(t)}function fn(e,t,r){var n;t===void 0&&(t=[]),r===void 0&&(r=!0);const o=cf(e),a=o===((n=e.ownerDocument)==null?void 0:n.body),i=Ve(o);if(a){const s=Ea(i);return t.concat(i,i.visualViewport||[],bn(o)?o:[],s&&r?fn(s):[])}return t.concat(o,fn(o,[],r))}function Ea(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function uf(e){const t=rt(e);let r=parseFloat(t.width)||0,n=parseFloat(t.height)||0;const o=dt(e),a=o?e.offsetWidth:r,i=o?e.offsetHeight:n,s=Xn(r)!==a||Xn(n)!==i;return s&&(r=a,n=i),{width:r,height:n,$:s}}function ui(e){return tt(e)?e:e.contextElement}function Tr(e){const t=ui(e);if(!dt(t))return It(1);const r=t.getBoundingClientRect(),{width:n,height:o,$:a}=uf(t);let i=(a?Xn(r.width):r.width)/n,s=(a?Xn(r.height):r.height)/o;return(!i||!Number.isFinite(i))&&(i=1),(!s||!Number.isFinite(s))&&(s=1),{x:i,y:s}}const x0=It(0);function ff(e){const t=Ve(e);return!ci()||!t.visualViewport?x0:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function w0(e,t,r){return t===void 0&&(t=!1),!r||t&&r!==Ve(e)?!1:t}function qt(e,t,r,n){t===void 0&&(t=!1),r===void 0&&(r=!1);const o=e.getBoundingClientRect(),a=ui(e);let i=It(1);t&&(n?tt(n)&&(i=Tr(n)):i=Tr(e));const s=w0(a,r,n)?ff(a):It(0);let l=(o.left+s.x)/i.x,c=(o.top+s.y)/i.y,u=o.width/i.x,p=o.height/i.y;if(a){const f=Ve(a),h=n&&tt(n)?Ve(n):n;let b=f,g=Ea(b);for(;g&&n&&h!==b;){const m=Tr(g),w=g.getBoundingClientRect(),C=rt(g),E=w.left+(g.clientLeft+parseFloat(C.paddingLeft))*m.x,_=w.top+(g.clientTop+parseFloat(C.paddingTop))*m.y;l*=m.x,c*=m.y,u*=m.x,p*=m.y,l+=E,c+=_,b=Ve(g),g=Ea(b)}}return Zn({width:u,height:p,x:l,y:c})}function E0(e){let{elements:t,rect:r,offsetParent:n,strategy:o}=e;const a=o==="fixed",i=pt(n),s=t?go(t.floating):!1;if(n===i||s&&a)return r;let l={scrollLeft:0,scrollTop:0},c=It(1);const u=It(0),p=dt(n);if((p||!p&&!a)&&((Mr(n)!=="body"||bn(i))&&(l=vo(n)),dt(n))){const f=qt(n);c=Tr(n),u.x=f.x+n.clientLeft,u.y=f.y+n.clientTop}return{width:r.width*c.x,height:r.height*c.y,x:r.x*c.x-l.scrollLeft*c.x+u.x,y:r.y*c.y-l.scrollTop*c.y+u.y}}function S0(e){return Array.from(e.getClientRects())}function Sa(e,t){const r=vo(e).scrollLeft;return t?t.left+r:qt(pt(e)).left+r}function C0(e){const t=pt(e),r=vo(e),n=e.ownerDocument.body,o=We(t.scrollWidth,t.clientWidth,n.scrollWidth,n.clientWidth),a=We(t.scrollHeight,t.clientHeight,n.scrollHeight,n.clientHeight);let i=-r.scrollLeft+Sa(e);const s=-r.scrollTop;return rt(n).direction==="rtl"&&(i+=We(t.clientWidth,n.clientWidth)-o),{width:o,height:a,x:i,y:s}}function _0(e,t){const r=Ve(e),n=pt(e),o=r.visualViewport;let a=n.clientWidth,i=n.clientHeight,s=0,l=0;if(o){a=o.width,i=o.height;const c=ci();(!c||c&&t==="fixed")&&(s=o.offsetLeft,l=o.offsetTop)}return{width:a,height:i,x:s,y:l}}function $0(e,t){const r=qt(e,!0,t==="fixed"),n=r.top+e.clientTop,o=r.left+e.clientLeft,a=dt(e)?Tr(e):It(1),i=e.clientWidth*a.x,s=e.clientHeight*a.y,l=o*a.x,c=n*a.y;return{width:i,height:s,x:l,y:c}}function Ls(e,t,r){let n;if(t==="viewport")n=_0(e,r);else if(t==="document")n=C0(pt(e));else if(tt(t))n=$0(t,r);else{const o=ff(e);n={...t,x:t.x-o.x,y:t.y-o.y}}return Zn(n)}function df(e,t){const r=Lt(e);return r===t||!tt(r)||Ar(r)?!1:rt(r).position==="fixed"||df(r,t)}function T0(e,t){const r=t.get(e);if(r)return r;let n=fn(e,[],!1).filter(s=>tt(s)&&Mr(s)!=="body"),o=null;const a=rt(e).position==="fixed";let i=a?Lt(e):e;for(;tt(i)&&!Ar(i);){const s=rt(i),l=li(i);!l&&s.position==="fixed"&&(o=null),(a?!l&&!o:!l&&s.position==="static"&&!!o&&["absolute","fixed"].includes(o.position)||bn(i)&&!l&&df(e,i))?n=n.filter(u=>u!==i):o=s,i=Lt(i)}return t.set(e,n),n}function A0(e){let{element:t,boundary:r,rootBoundary:n,strategy:o}=e;const i=[...r==="clippingAncestors"?go(t)?[]:T0(t,this._c):[].concat(r),n],s=i[0],l=i.reduce((c,u)=>{const p=Ls(t,u,o);return c.top=We(p.top,c.top),c.right=jt(p.right,c.right),c.bottom=jt(p.bottom,c.bottom),c.left=We(p.left,c.left),c},Ls(t,s,o));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function O0(e){const{width:t,height:r}=uf(e);return{width:t,height:r}}function R0(e,t,r){const n=dt(t),o=pt(t),a=r==="fixed",i=qt(e,!0,a,t);let s={scrollLeft:0,scrollTop:0};const l=It(0);if(n||!n&&!a)if((Mr(t)!=="body"||bn(o))&&(s=vo(t)),n){const h=qt(t,!0,a,t);l.x=h.x+t.clientLeft,l.y=h.y+t.clientTop}else o&&(l.x=Sa(o));let c=0,u=0;if(o&&!n&&!a){const h=o.getBoundingClientRect();u=h.top+s.scrollTop,c=h.left+s.scrollLeft-Sa(o,h)}const p=i.left+s.scrollLeft-l.x-c,f=i.top+s.scrollTop-l.y-u;return{x:p,y:f,width:i.width,height:i.height}}function Ko(e){return rt(e).position==="static"}function Bs(e,t){if(!dt(e)||rt(e).position==="fixed")return null;if(t)return t(e);let r=e.offsetParent;return pt(e)===r&&(r=r.ownerDocument.body),r}function pf(e,t){const r=Ve(e);if(go(e))return r;if(!dt(e)){let o=Lt(e);for(;o&&!Ar(o);){if(tt(o)&&!Ko(o))return o;o=Lt(o)}return r}let n=Bs(e,t);for(;n&&m0(n)&&Ko(n);)n=Bs(n,t);return n&&Ar(n)&&Ko(n)&&!li(n)?r:n||y0(e)||r}const P0=async function(e){const t=this.getOffsetParent||pf,r=this.getDimensions,n=await r(e.floating);return{reference:R0(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:n.width,height:n.height}}};function M0(e){return rt(e).direction==="rtl"}const N0={convertOffsetParentRelativeRectToViewportRelativeRect:E0,getDocumentElement:pt,getClippingRect:A0,getOffsetParent:pf,getElementRects:P0,getClientRects:S0,getDimensions:O0,getScale:Tr,isElement:tt,isRTL:M0};function D0(e,t){let r=null,n;const o=pt(e);function a(){var s;clearTimeout(n),(s=r)==null||s.disconnect(),r=null}function i(s,l){s===void 0&&(s=!1),l===void 0&&(l=1),a();const{left:c,top:u,width:p,height:f}=e.getBoundingClientRect();if(s||t(),!p||!f)return;const h=In(u),b=In(o.clientWidth-(c+p)),g=In(o.clientHeight-(u+f)),m=In(c),C={rootMargin:-h+"px "+-b+"px "+-g+"px "+-m+"px",threshold:We(0,jt(1,l))||1};let E=!0;function _(S){const O=S[0].intersectionRatio;if(O!==l){if(!E)return i();O?i(!1,O):n=setTimeout(()=>{i(!1,1e-7)},1e3)}E=!1}try{r=new IntersectionObserver(_,{...C,root:o.ownerDocument})}catch{r=new IntersectionObserver(_,C)}r.observe(e)}return i(!0),a}function k0(e,t,r,n){n===void 0&&(n={});const{ancestorScroll:o=!0,ancestorResize:a=!0,elementResize:i=typeof ResizeObserver=="function",layoutShift:s=typeof IntersectionObserver=="function",animationFrame:l=!1}=n,c=ui(e),u=o||a?[...c?fn(c):[],...fn(t)]:[];u.forEach(w=>{o&&w.addEventListener("scroll",r,{passive:!0}),a&&w.addEventListener("resize",r)});const p=c&&s?D0(c,r):null;let f=-1,h=null;i&&(h=new ResizeObserver(w=>{let[C]=w;C&&C.target===c&&h&&(h.unobserve(t),cancelAnimationFrame(f),f=requestAnimationFrame(()=>{var E;(E=h)==null||E.observe(t)})),r()}),c&&!l&&h.observe(c),h.observe(t));let b,g=l?qt(e):null;l&&m();function m(){const w=qt(e);g&&(w.x!==g.x||w.y!==g.y||w.width!==g.width||w.height!==g.height)&&r(),g=w,b=requestAnimationFrame(m)}return r(),()=>{var w;u.forEach(C=>{o&&C.removeEventListener("scroll",r),a&&C.removeEventListener("resize",r)}),p==null||p(),(w=h)==null||w.disconnect(),h=null,l&&cancelAnimationFrame(b)}}const j0=h0,I0=g0,F0=f0,L0=b0,B0=d0,Hs=u0,H0=v0,z0=(e,t,r)=>{const n=new Map,o={platform:N0,...r},a={...o.platform,_c:n};return c0(e,t,{...o,platform:a})};var Yn=typeof document<"u"?d.useLayoutEffect:d.useEffect;function Qn(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let r,n,o;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(r=e.length,r!==t.length)return!1;for(n=r;n--!==0;)if(!Qn(e[n],t[n]))return!1;return!0}if(o=Object.keys(e),r=o.length,r!==Object.keys(t).length)return!1;for(n=r;n--!==0;)if(!{}.hasOwnProperty.call(t,o[n]))return!1;for(n=r;n--!==0;){const a=o[n];if(!(a==="_owner"&&e.$$typeof)&&!Qn(e[a],t[a]))return!1}return!0}return e!==e&&t!==t}function hf(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function zs(e,t){const r=hf(e);return Math.round(t*r)/r}function qo(e){const t=v.useRef(e);return Yn(()=>{t.current=e}),t}function U0(e){e===void 0&&(e={});const{placement:t="bottom",strategy:r="absolute",middleware:n=[],platform:o,elements:{reference:a,floating:i}={},transform:s=!0,whileElementsMounted:l,open:c}=e,[u,p]=v.useState({x:0,y:0,strategy:r,placement:t,middlewareData:{},isPositioned:!1}),[f,h]=v.useState(n);Qn(f,n)||h(n);const[b,g]=v.useState(null),[m,w]=v.useState(null),C=v.useCallback(N=>{N!==O.current&&(O.current=N,g(N))},[]),E=v.useCallback(N=>{N!==M.current&&(M.current=N,w(N))},[]),_=a||b,S=i||m,O=v.useRef(null),M=v.useRef(null),I=v.useRef(u),U=l!=null,V=qo(l),K=qo(o),F=qo(c),Y=v.useCallback(()=>{if(!O.current||!M.current)return;const N={placement:t,strategy:r,middleware:f};K.current&&(N.platform=K.current),z0(O.current,M.current,N).then(Z=>{const $={...Z,isPositioned:F.current!==!1};G.current&&!Qn(I.current,$)&&(I.current=$,Ka.flushSync(()=>{p($)}))})},[f,t,r,K,F]);Yn(()=>{c===!1&&I.current.isPositioned&&(I.current.isPositioned=!1,p(N=>({...N,isPositioned:!1})))},[c]);const G=v.useRef(!1);Yn(()=>(G.current=!0,()=>{G.current=!1}),[]),Yn(()=>{if(_&&(O.current=_),S&&(M.current=S),_&&S){if(V.current)return V.current(_,S,Y);Y()}},[_,S,Y,V,U]);const te=v.useMemo(()=>({reference:O,floating:M,setReference:C,setFloating:E}),[C,E]),H=v.useMemo(()=>({reference:_,floating:S}),[_,S]),oe=v.useMemo(()=>{const N={position:r,left:0,top:0};if(!H.floating)return N;const Z=zs(H.floating,u.x),$=zs(H.floating,u.y);return s?{...N,transform:"translate("+Z+"px, "+$+"px)",...hf(H.floating)>=1.5&&{willChange:"transform"}}:{position:r,left:Z,top:$}},[r,s,H.floating,u.x,u.y]);return v.useMemo(()=>({...u,update:Y,refs:te,elements:H,floatingStyles:oe}),[u,Y,te,H,oe])}const G0=e=>{function t(r){return{}.hasOwnProperty.call(r,"current")}return{name:"arrow",options:e,fn(r){const{element:n,padding:o}=typeof e=="function"?e(r):e;return n&&t(n)?n.current!=null?Hs({element:n.current,padding:o}).fn(r):{}:n?Hs({element:n,padding:o}).fn(r):{}}}},W0=(e,t)=>({...j0(e),options:[e,t]}),V0=(e,t)=>({...I0(e),options:[e,t]}),Y0=(e,t)=>({...H0(e),options:[e,t]}),K0=(e,t)=>({...F0(e),options:[e,t]}),q0=(e,t)=>({...L0(e),options:[e,t]}),X0=(e,t)=>({...B0(e),options:[e,t]}),J0=(e,t)=>({...G0(e),options:[e,t]});var Z0="Arrow",gf=v.forwardRef((e,t)=>{const{children:r,width:n=10,height:o=5,...a}=e;return y.jsx($e.svg,{...a,ref:t,width:n,height:o,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?r:y.jsx("polygon",{points:"0,0 30,0 15,10"})})});gf.displayName=Z0;var Q0=gf,fi="Popper",[vf,bf]=zt(fi),[eb,mf]=vf(fi),yf=e=>{const{__scopePopper:t,children:r}=e,[n,o]=v.useState(null);return y.jsx(eb,{scope:t,anchor:n,onAnchorChange:o,children:r})};yf.displayName=fi;var xf="PopperAnchor",wf=v.forwardRef((e,t)=>{const{__scopePopper:r,virtualRef:n,...o}=e,a=mf(xf,r),i=v.useRef(null),s=Pe(t,i);return v.useEffect(()=>{a.onAnchorChange((n==null?void 0:n.current)||i.current)}),n?null:y.jsx($e.div,{...o,ref:s})});wf.displayName=xf;var di="PopperContent",[tb,rb]=vf(di),Ef=v.forwardRef((e,t)=>{var q,X,re,J,Te,R;const{__scopePopper:r,side:n="bottom",sideOffset:o=0,align:a="center",alignOffset:i=0,arrowPadding:s=0,avoidCollisions:l=!0,collisionBoundary:c=[],collisionPadding:u=0,sticky:p="partial",hideWhenDetached:f=!1,updatePositionStrategy:h="optimized",onPlaced:b,...g}=e,m=mf(di,r),[w,C]=v.useState(null),E=Pe(t,Ae=>C(Ae)),[_,S]=v.useState(null),O=ni(_),M=(O==null?void 0:O.width)??0,I=(O==null?void 0:O.height)??0,U=n+(a!=="center"?"-"+a:""),V=typeof u=="number"?u:{top:0,right:0,bottom:0,left:0,...u},K=Array.isArray(c)?c:[c],F=K.length>0,Y={padding:V,boundary:K.filter(ob),altBoundary:F},{refs:G,floatingStyles:te,placement:H,isPositioned:oe,middlewareData:N}=U0({strategy:"fixed",placement:U,whileElementsMounted:(...Ae)=>k0(...Ae,{animationFrame:h==="always"}),elements:{reference:m.anchor},middleware:[W0({mainAxis:o+I,alignmentAxis:i}),l&&V0({mainAxis:!0,crossAxis:!1,limiter:p==="partial"?Y0():void 0,...Y}),l&&K0({...Y}),q0({...Y,apply:({elements:Ae,rects:Ie,availableWidth:Fe,availableHeight:ke})=>{const{width:$t,height:Tt}=Ie.reference,Ce=Ae.floating.style;Ce.setProperty("--radix-popper-available-width",`${Fe}px`),Ce.setProperty("--radix-popper-available-height",`${ke}px`),Ce.setProperty("--radix-popper-anchor-width",`${$t}px`),Ce.setProperty("--radix-popper-anchor-height",`${Tt}px`)}}),_&&J0({element:_,padding:s}),ab({arrowWidth:M,arrowHeight:I}),f&&X0({strategy:"referenceHidden",...Y})]}),[Z,$]=_f(H),T=yt(b);mt(()=>{oe&&(T==null||T())},[oe,T]);const D=(q=N.arrow)==null?void 0:q.x,k=(X=N.arrow)==null?void 0:X.y,z=((re=N.arrow)==null?void 0:re.centerOffset)!==0,[W,L]=v.useState();return mt(()=>{w&&L(window.getComputedStyle(w).zIndex)},[w]),y.jsx("div",{ref:G.setFloating,"data-radix-popper-content-wrapper":"",style:{...te,transform:oe?te.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:W,"--radix-popper-transform-origin":[(J=N.transformOrigin)==null?void 0:J.x,(Te=N.transformOrigin)==null?void 0:Te.y].join(" "),...((R=N.hide)==null?void 0:R.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:y.jsx(tb,{scope:r,placedSide:Z,onArrowChange:S,arrowX:D,arrowY:k,shouldHideArrow:z,children:y.jsx($e.div,{"data-side":Z,"data-align":$,...g,ref:E,style:{...g.style,animation:oe?void 0:"none"}})})})});Ef.displayName=di;var Sf="PopperArrow",nb={top:"bottom",right:"left",bottom:"top",left:"right"},Cf=v.forwardRef(function(t,r){const{__scopePopper:n,...o}=t,a=rb(Sf,n),i=nb[a.placedSide];return y.jsx("span",{ref:a.onArrowChange,style:{position:"absolute",left:a.arrowX,top:a.arrowY,[i]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[a.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[a.placedSide],visibility:a.shouldHideArrow?"hidden":void 0},children:y.jsx(Q0,{...o,ref:r,style:{...o.style,display:"block"}})})});Cf.displayName=Sf;function ob(e){return e!==null}var ab=e=>({name:"transformOrigin",options:e,fn(t){var m,w,C;const{placement:r,rects:n,middlewareData:o}=t,i=((m=o.arrow)==null?void 0:m.centerOffset)!==0,s=i?0:e.arrowWidth,l=i?0:e.arrowHeight,[c,u]=_f(r),p={start:"0%",center:"50%",end:"100%"}[u],f=(((w=o.arrow)==null?void 0:w.x)??0)+s/2,h=(((C=o.arrow)==null?void 0:C.y)??0)+l/2;let b="",g="";return c==="bottom"?(b=i?p:`${f}px`,g=`${-l}px`):c==="top"?(b=i?p:`${f}px`,g=`${n.floating.height+l}px`):c==="right"?(b=`${-l}px`,g=i?p:`${h}px`):c==="left"&&(b=`${n.floating.width+l}px`,g=i?p:`${h}px`),{data:{x:b,y:g}}}});function _f(e){const[t,r="center"]=e.split("-");return[t,r]}var ib=yf,sb=wf,lb=Ef,cb=Cf,ub="VisuallyHidden",$f=v.forwardRef((e,t)=>y.jsx($e.span,{...e,ref:t,style:{position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal",...e.style}}));$f.displayName=ub;var fb=$f,[bo,Qk]=zt("Tooltip",[bf]),mo=bf(),Tf="TooltipProvider",db=700,Ca="tooltip.open",[pb,pi]=bo(Tf),Af=e=>{const{__scopeTooltip:t,delayDuration:r=db,skipDelayDuration:n=300,disableHoverableContent:o=!1,children:a}=e,[i,s]=v.useState(!0),l=v.useRef(!1),c=v.useRef(0);return v.useEffect(()=>{const u=c.current;return()=>window.clearTimeout(u)},[]),y.jsx(pb,{scope:t,isOpenDelayed:i,delayDuration:r,onOpen:v.useCallback(()=>{window.clearTimeout(c.current),s(!1)},[]),onClose:v.useCallback(()=>{window.clearTimeout(c.current),c.current=window.setTimeout(()=>s(!0),n)},[n]),isPointerInTransitRef:l,onPointerInTransitChange:v.useCallback(u=>{l.current=u},[]),disableHoverableContent:o,children:a})};Af.displayName=Tf;var yo="Tooltip",[hb,xo]=bo(yo),Of=e=>{const{__scopeTooltip:t,children:r,open:n,defaultOpen:o=!1,onOpenChange:a,disableHoverableContent:i,delayDuration:s}=e,l=pi(yo,e.__scopeTooltip),c=mo(t),[u,p]=v.useState(null),f=ln(),h=v.useRef(0),b=i??l.disableHoverableContent,g=s??l.delayDuration,m=v.useRef(!1),[w=!1,C]=gn({prop:n,defaultProp:o,onChange:M=>{M?(l.onOpen(),document.dispatchEvent(new CustomEvent(Ca))):l.onClose(),a==null||a(M)}}),E=v.useMemo(()=>w?m.current?"delayed-open":"instant-open":"closed",[w]),_=v.useCallback(()=>{window.clearTimeout(h.current),m.current=!1,C(!0)},[C]),S=v.useCallback(()=>{window.clearTimeout(h.current),C(!1)},[C]),O=v.useCallback(()=>{window.clearTimeout(h.current),h.current=window.setTimeout(()=>{m.current=!0,C(!0)},g)},[g,C]);return v.useEffect(()=>()=>window.clearTimeout(h.current),[]),y.jsx(ib,{...c,children:y.jsx(hb,{scope:t,contentId:f,open:w,stateAttribute:E,trigger:u,onTriggerChange:p,onTriggerEnter:v.useCallback(()=>{l.isOpenDelayed?O():_()},[l.isOpenDelayed,O,_]),onTriggerLeave:v.useCallback(()=>{b?S():window.clearTimeout(h.current)},[S,b]),onOpen:_,onClose:S,disableHoverableContent:b,children:r})})};Of.displayName=yo;var _a="TooltipTrigger",Rf=v.forwardRef((e,t)=>{const{__scopeTooltip:r,...n}=e,o=xo(_a,r),a=pi(_a,r),i=mo(r),s=v.useRef(null),l=Pe(t,s,o.onTriggerChange),c=v.useRef(!1),u=v.useRef(!1),p=v.useCallback(()=>c.current=!1,[]);return v.useEffect(()=>()=>document.removeEventListener("pointerup",p),[p]),y.jsx(sb,{asChild:!0,...i,children:y.jsx($e.button,{"aria-describedby":o.open?o.contentId:void 0,"data-state":o.stateAttribute,...n,ref:l,onPointerMove:Se(e.onPointerMove,f=>{f.pointerType!=="touch"&&!u.current&&!a.isPointerInTransitRef.current&&(o.onTriggerEnter(),u.current=!0)}),onPointerLeave:Se(e.onPointerLeave,()=>{o.onTriggerLeave(),u.current=!1}),onPointerDown:Se(e.onPointerDown,()=>{c.current=!0,document.addEventListener("pointerup",p,{once:!0})}),onFocus:Se(e.onFocus,()=>{c.current||o.onOpen()}),onBlur:Se(e.onBlur,o.onClose),onClick:Se(e.onClick,o.onClose)})})});Rf.displayName=_a;var gb="TooltipPortal",[ej,vb]=bo(gb,{forceMount:void 0}),Or="TooltipContent",Pf=v.forwardRef((e,t)=>{const r=vb(Or,e.__scopeTooltip),{forceMount:n=r.forceMount,side:o="top",...a}=e,i=xo(Or,e.__scopeTooltip);return y.jsx(vn,{present:n||i.open,children:i.disableHoverableContent?y.jsx(Mf,{side:o,...a,ref:t}):y.jsx(bb,{side:o,...a,ref:t})})}),bb=v.forwardRef((e,t)=>{const r=xo(Or,e.__scopeTooltip),n=pi(Or,e.__scopeTooltip),o=v.useRef(null),a=Pe(t,o),[i,s]=v.useState(null),{trigger:l,onClose:c}=r,u=o.current,{onPointerInTransitChange:p}=n,f=v.useCallback(()=>{s(null),p(!1)},[p]),h=v.useCallback((b,g)=>{const m=b.currentTarget,w={x:b.clientX,y:b.clientY},C=xb(w,m.getBoundingClientRect()),E=wb(w,C),_=Eb(g.getBoundingClientRect()),S=Cb([...E,..._]);s(S),p(!0)},[p]);return v.useEffect(()=>()=>f(),[f]),v.useEffect(()=>{if(l&&u){const b=m=>h(m,u),g=m=>h(m,l);return l.addEventListener("pointerleave",b),u.addEventListener("pointerleave",g),()=>{l.removeEventListener("pointerleave",b),u.removeEventListener("pointerleave",g)}}},[l,u,h,f]),v.useEffect(()=>{if(i){const b=g=>{const m=g.target,w={x:g.clientX,y:g.clientY},C=(l==null?void 0:l.contains(m))||(u==null?void 0:u.contains(m)),E=!Sb(w,i);C?f():E&&(f(),c())};return document.addEventListener("pointermove",b),()=>document.removeEventListener("pointermove",b)}},[l,u,i,c,f]),y.jsx(Mf,{...e,ref:a})}),[mb,yb]=bo(yo,{isInside:!1}),Mf=v.forwardRef((e,t)=>{const{__scopeTooltip:r,children:n,"aria-label":o,onEscapeKeyDown:a,onPointerDownOutside:i,...s}=e,l=xo(Or,r),c=mo(r),{onClose:u}=l;return v.useEffect(()=>(document.addEventListener(Ca,u),()=>document.removeEventListener(Ca,u)),[u]),v.useEffect(()=>{if(l.trigger){const p=f=>{const h=f.target;h!=null&&h.contains(l.trigger)&&u()};return window.addEventListener("scroll",p,{capture:!0}),()=>window.removeEventListener("scroll",p,{capture:!0})}},[l.trigger,u]),y.jsx(Xa,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:a,onPointerDownOutside:i,onFocusOutside:p=>p.preventDefault(),onDismiss:u,children:y.jsxs(lb,{"data-state":l.stateAttribute,...c,...s,ref:t,style:{...s.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[y.jsx(qa,{children:n}),y.jsx(mb,{scope:r,isInside:!0,children:y.jsx(fb,{id:l.contentId,role:"tooltip",children:o||n})})]})})});Pf.displayName=Or;var Nf="TooltipArrow",Df=v.forwardRef((e,t)=>{const{__scopeTooltip:r,...n}=e,o=mo(r);return yb(Nf,r).isInside?null:y.jsx(cb,{...o,...n,ref:t})});Df.displayName=Nf;function xb(e,t){const r=Math.abs(t.top-e.y),n=Math.abs(t.bottom-e.y),o=Math.abs(t.right-e.x),a=Math.abs(t.left-e.x);switch(Math.min(r,n,o,a)){case a:return"left";case o:return"right";case r:return"top";case n:return"bottom";default:throw new Error("unreachable")}}function wb(e,t,r=5){const n=[];switch(t){case"top":n.push({x:e.x-r,y:e.y+r},{x:e.x+r,y:e.y+r});break;case"bottom":n.push({x:e.x-r,y:e.y-r},{x:e.x+r,y:e.y-r});break;case"left":n.push({x:e.x+r,y:e.y-r},{x:e.x+r,y:e.y+r});break;case"right":n.push({x:e.x-r,y:e.y-r},{x:e.x-r,y:e.y+r});break}return n}function Eb(e){const{top:t,right:r,bottom:n,left:o}=e;return[{x:o,y:t},{x:r,y:t},{x:r,y:n},{x:o,y:n}]}function Sb(e,t){const{x:r,y:n}=e;let o=!1;for(let a=0,i=t.length-1;a<t.length;i=a++){const s=t[a].x,l=t[a].y,c=t[i].x,u=t[i].y;l>n!=u>n&&r<(c-s)*(n-l)/(u-l)+s&&(o=!o)}return o}function Cb(e){const t=e.slice();return t.sort((r,n)=>r.x<n.x?-1:r.x>n.x?1:r.y<n.y?-1:r.y>n.y?1:0),_b(t)}function _b(e){if(e.length<=1)return e.slice();const t=[];for(let n=0;n<e.length;n++){const o=e[n];for(;t.length>=2;){const a=t[t.length-1],i=t[t.length-2];if((a.x-i.x)*(o.y-i.y)>=(a.y-i.y)*(o.x-i.x))t.pop();else break}t.push(o)}t.pop();const r=[];for(let n=e.length-1;n>=0;n--){const o=e[n];for(;r.length>=2;){const a=r[r.length-1],i=r[r.length-2];if((a.x-i.x)*(o.y-i.y)>=(a.y-i.y)*(o.x-i.x))r.pop();else break}r.push(o)}return r.pop(),t.length===1&&r.length===1&&t[0].x===r[0].x&&t[0].y===r[0].y?t:t.concat(r)}var $b=Af,Tb=Of,Ab=Rf,kf=Pf,Ob=Df;const jf=$b,If=Tb,Ff=Ab,Lf=Ob,hi=v.forwardRef(({className:e,sideOffset:t=4,...r},n)=>y.jsx(kf,{ref:n,sideOffset:t,className:Me("ve-z-50 ve-overflow-hidden ve-rounded-[6px] ve-bg-popover ve-px-3 ve-py-1.5 ve-text-sm ve-text-popover-foreground",e),...r}));hi.displayName=kf.displayName;const Rb=({displayName:e,fieldId:t,children:r})=>{const{tooltipsVisible:n}=Hf();let o="";return e&&t?o=`${e} (${t})`:t?o=`(${t})`:e&&(o=`${e}`),y.jsx("div",{children:y.jsx(jf,{children:y.jsxs(If,{open:n&&!!o,children:[y.jsx(Ff,{asChild:!0,children:y.jsx("div",{className:n?"ve-outline-2 ve-outline-dotted ve-outline-[#5A58F2]":"",children:r})}),y.jsxs(hi,{children:[y.jsx("p",{children:o}),y.jsx(Lf,{fill:"bg-popover"})]})]})})})},Bf=d.createContext(void 0),Pb=({children:e})=>{const[t,r]=d.useState(!1),n=()=>{r(o=>!o)};return y.jsx(Bf.Provider,{value:{tooltipsVisible:t,toggleTooltips:n},children:e})},Hf=()=>{const e=d.useContext(Bf);return e||{tooltipsVisible:!1,toggleTooltips:()=>{}}},Mb=(e,t)=>{const r=Nb(e);return t&&Object.entries(r).forEach(([n])=>{t[n]&&(r[n]=t[n])}),r},zf=(e,t,r)=>(Object.entries(e.styles).forEach(([n,o])=>{"default"in o?r[`--${t}-${n}`]=o.default:zf(o,`${t}-${n}`,r)}),r),Nb=e=>{const t={};for(const r in e)zf(e[r],r,t);return t},Uf=(e,t="",r={})=>{for(const n in e){const o=e[n];typeof o=="object"?Uf(o,`${t}-${n}`,r):r[`--${t}-${n}`]=o}return r},Gf="visual-editor-theme",Db=(e,t,r)=>{var i,s;const n=(i=e==null?void 0:e._site)==null?void 0:i.pagesTheme;let o;(n==null?void 0:n.length)>0&&(o=e.siteId!==0?n.find(l=>Number(l.themeConfiguration.siteId)===e.siteId):n[0]);let a;return o!=null&&o.themeConfiguration&&(a=JSON.parse((s=o.themeConfiguration)==null?void 0:s.data)),Wf(a,t,r)},Wf=(e,t,r)=>{const n=Mb(t,e);return console.log("internalApplyTheme",e,t,n),!n||Object.keys(n).length===0?(console.log("apply theme returning nothing "),r??""):`${r??""}<style id="${Gf}" type="text/css">.components{`+Object.entries(n).map(([o,a])=>`${o}:${a} !important`).join(";")+"}</style>"},kb=e=>new Promise(t=>setTimeout(t,e)),gi=async(e,t)=>{var n,o;const r=document.getElementById("preview-frame");if(console.log("updateThemeInEditor previewFrame",r),r&&r.contentDocument)for(;;){const a=(n=r==null?void 0:r.contentDocument)==null?void 0:n.getElementById(Gf);if(console.log("updateThemeInEditor styleOverride",a),console.log("default zone",(o=r==null?void 0:r.contentDocument)==null?void 0:o.getElementById("default-zone")),a){a.outerHTML=Wf(e,t),console.log("updateThemeInEditor internalApplyTheme ran");return}await kb(10)}},jb=(e,t,r,n,o,a,i,s)=>{const{appState:l,history:{back:c,forward:u,histories:p,index:f,hasPast:h,hasFuture:b,setHistories:g}}=ut.usePuck();return d.useEffect(()=>{t(p,f)},[f,p,t]),y.jsxs("header",{className:"puck-header",children:[y.jsxs("div",{className:"header-left",children:[y.jsx(Fb,{}),y.jsx(Lb,{})]}),y.jsx("div",{className:"header-center"}),y.jsxs("div",{className:"actions",children:[!o&&y.jsx(kt,{variant:"ghost",size:"icon",disabled:!h,onClick:c,children:y.jsx(mh,{className:"sm-icon"})}),!o&&y.jsx(kt,{variant:"ghost",size:"icon",disabled:!b,onClick:u,children:y.jsx(yh,{className:"sm-icon"})}),y.jsx(Ib,{disabled:o?(s==null?void 0:s.history.length)===1:p.length===1,onClearLocalChanges:()=>{e(),o?(i&&gi(s==null?void 0:s.history[0],i),a({history:[s==null?void 0:s.history[0]],index:0})):g([{id:"root",state:{data:p[0].state.data}}])}}),!n&&y.jsx(kt,{variant:"secondary",disabled:o?(s==null?void 0:s.history.length)===1:p.length===1,onClick:async()=>{await r(l.data),e(),o?a({history:[s==null?void 0:s.history[(s==null?void 0:s.history.length)-1]],index:0}):g([{id:"root",state:{data:l.data}}])},children:"Publish"})]})]})},Ib=({disabled:e,onClearLocalChanges:t})=>{const[r,n]=d.useState(!1),o=()=>{t(),n(!1)};return y.jsxs(Wv,{open:r,onOpenChange:n,children:[y.jsx(Vv,{disabled:e,asChild:!0,children:y.jsx(kt,{variant:"outline",children:"Clear Local Changes"})}),y.jsxs(Yu,{children:[y.jsxs(Ku,{children:[y.jsx(Xu,{children:"Clear Local Changes"}),y.jsx(Ju,{children:"This action will remove your local changes. It cannot be undone."})]}),y.jsxs(qu,{children:[y.jsx(Zu,{children:"Cancel"}),y.jsx(kt,{onClick:o,children:"Confirm"})]})]})]})},Fb=()=>{const{dispatch:e,appState:{ui:{leftSideBarVisible:t,rightSideBarVisible:r}}}=ut.usePuck(),n=d.useCallback(o=>{const a=window.matchMedia("(min-width: 638px)").matches,i=o==="left"?t:r,s=o==="left"?"rightSideBarVisible":"leftSideBarVisible";e({type:"setUi",ui:{[`${o}SideBarVisible`]:!i,...a?{}:{[s]:!1}}})},[e,t,r]);return y.jsxs(y.Fragment,{children:[y.jsx(kt,{variant:"ghost",size:"icon",onClick:()=>{n("left")},children:y.jsx(vh,{className:"sm-icon"})}),y.jsx(kt,{variant:"ghost",size:"icon",onClick:()=>{n("right")},children:y.jsx(bh,{className:"sm-icon"})})]})},Lb=()=>{const{toggleTooltips:e,tooltipsVisible:t}=Hf();return y.jsx(jf,{children:y.jsxs(If,{children:[y.jsx(Ff,{asChild:!0,children:y.jsxs("div",{className:"ve-flex ve-flex-row ve-self-center ve-gap-3 ve-pl-2",children:[y.jsx(af,{onCheckedChange:e,checked:t}),y.jsx("p",{className:"ve-self-center ve-text-sm",children:"Entity Fields"})]})}),y.jsxs(hi,{children:[t?"Hide Entity Fields":"Show Entity Fields",y.jsx(Lf,{fill:"ve-bg-popover"})]})]})})},Us="ROLE_",Bb="SITE_",Gs="TEMPLATE_",Hb="LAYOUT_",zb="ENTITY_",Ub="THEME_";function $a(e,t,r,n,o){const a=e?"dev":"";if(!t||!r||!o&&!n)throw new Error("Unable to generate local storage key, missing query parameters");if(t===tk.INDIVIDUAL){if(!o)throw new Error(`EntityId required for role ${t}`);return a+Us+t+Gs+r+zb+o}if(!n)throw new Error(`LayoutId required for role ${t}`);return a+Us+t+Gs+r+Hb+n}function Ws(e,t,r){if(!r)throw new Error("Unable to generate local storage key for themes, missing query parameters");return(e?"dev":"")+Bb+t+Ub+r}const Gb=po("ve-relative ve-rounded ve-border ve-m-4 ve-mb-0 ve-p-4 ve-[&>svg~*]:pl-7 ve-[&>svg+div]:translate-y-[-3px] ve-[&>svg]:absolute ve-[&>svg]:left-4 ve-[&>svg]:top-4 ve-[&>svg]:text-foreground",{variants:{variant:{default:"ve-bg-background ve-text-foreground",destructive:"ve-border-destructive/50 ve-text-destructive ve-dark:border-destructive ve-[&>svg]:text-destructive"}},defaultVariants:{variant:"default"}}),Ta=d.forwardRef(({className:e,variant:t,...r},n)=>y.jsx("div",{ref:n,role:"alert",className:Me(Gb({variant:t}),e),...r}));Ta.displayName="Alert";const Wb=d.forwardRef(({className:e,...t},r)=>y.jsx("h5",{ref:r,className:Me("ve-mb-1 ve-font-medium ve-leading-none ve-tracking-tight",e),...t}));Wb.displayName="AlertTitle";const Aa=d.forwardRef(({className:e,...t},r)=>y.jsx("div",{ref:r,className:Me("ve-text-sm [&_p]:ve-leading-relaxed",e),...t}));Aa.displayName="AlertDescription";var Xe={},mn={},Vb=typeof Rn=="object"&&Rn&&Rn.Object===Object&&Rn,Vf=Vb,Yb=Vf,Kb=typeof self=="object"&&self&&self.Object===Object&&self,qb=Yb||Kb||Function("return this")(),ht=qb,Xb=ht,Jb=Xb.Symbol,yn=Jb,Vs=yn,Yf=Object.prototype,Zb=Yf.hasOwnProperty,Qb=Yf.toString,Qr=Vs?Vs.toStringTag:void 0;function em(e){var t=Zb.call(e,Qr),r=e[Qr];try{e[Qr]=void 0;var n=!0}catch{}var o=Qb.call(e);return n&&(t?e[Qr]=r:delete e[Qr]),o}var tm=em,rm=Object.prototype,nm=rm.toString;function om(e){return nm.call(e)}var am=om,Ys=yn,im=tm,sm=am,lm="[object Null]",cm="[object Undefined]",Ks=Ys?Ys.toStringTag:void 0;function um(e){return e==null?e===void 0?cm:lm:Ks&&Ks in Object(e)?im(e):sm(e)}var Jt=um,fm=Array.isArray,ot=fm;function dm(e){return e!=null&&typeof e=="object"}var St=dm,pm=Jt,hm=ot,gm=St,vm="[object String]";function bm(e){return typeof e=="string"||!hm(e)&&gm(e)&&pm(e)==vm}var mm=bm;function ym(e){return function(t,r,n){for(var o=-1,a=Object(t),i=n(t),s=i.length;s--;){var l=i[e?s:++o];if(r(a[l],l,a)===!1)break}return t}}var xm=ym,wm=xm,Em=wm(),Sm=Em;function Cm(e,t){for(var r=-1,n=Array(e);++r<e;)n[r]=t(r);return n}var _m=Cm,$m=Jt,Tm=St,Am="[object Arguments]";function Om(e){return Tm(e)&&$m(e)==Am}var Rm=Om,qs=Rm,Pm=St,Kf=Object.prototype,Mm=Kf.hasOwnProperty,Nm=Kf.propertyIsEnumerable,Dm=qs(function(){return arguments}())?qs:function(e){return Pm(e)&&Mm.call(e,"callee")&&!Nm.call(e,"callee")},qf=Dm,eo={exports:{}};function km(){return!1}var jm=km;eo.exports;(function(e,t){var r=ht,n=jm,o=t&&!t.nodeType&&t,a=o&&!0&&e&&!e.nodeType&&e,i=a&&a.exports===o,s=i?r.Buffer:void 0,l=s?s.isBuffer:void 0,c=l||n;e.exports=c})(eo,eo.exports);var vi=eo.exports,Im=9007199254740991,Fm=/^(?:0|[1-9]\d*)$/;function Lm(e,t){var r=typeof e;return t=t??Im,!!t&&(r=="number"||r!="symbol"&&Fm.test(e))&&e>-1&&e%1==0&&e<t}var Xf=Lm,Bm=9007199254740991;function Hm(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=Bm}var bi=Hm,zm=Jt,Um=bi,Gm=St,Wm="[object Arguments]",Vm="[object Array]",Ym="[object Boolean]",Km="[object Date]",qm="[object Error]",Xm="[object Function]",Jm="[object Map]",Zm="[object Number]",Qm="[object Object]",ey="[object RegExp]",ty="[object Set]",ry="[object String]",ny="[object WeakMap]",oy="[object ArrayBuffer]",ay="[object DataView]",iy="[object Float32Array]",sy="[object Float64Array]",ly="[object Int8Array]",cy="[object Int16Array]",uy="[object Int32Array]",fy="[object Uint8Array]",dy="[object Uint8ClampedArray]",py="[object Uint16Array]",hy="[object Uint32Array]",we={};we[iy]=we[sy]=we[ly]=we[cy]=we[uy]=we[fy]=we[dy]=we[py]=we[hy]=!0;we[Wm]=we[Vm]=we[oy]=we[Ym]=we[ay]=we[Km]=we[qm]=we[Xm]=we[Jm]=we[Zm]=we[Qm]=we[ey]=we[ty]=we[ry]=we[ny]=!1;function gy(e){return Gm(e)&&Um(e.length)&&!!we[zm(e)]}var vy=gy;function by(e){return function(t){return e(t)}}var mi=by,to={exports:{}};to.exports;(function(e,t){var r=Vf,n=t&&!t.nodeType&&t,o=n&&!0&&e&&!e.nodeType&&e,a=o&&o.exports===n,i=a&&r.process,s=function(){try{var l=o&&o.require&&o.require("util").types;return l||i&&i.binding&&i.binding("util")}catch{}}();e.exports=s})(to,to.exports);var yi=to.exports,my=vy,yy=mi,Xs=yi,Js=Xs&&Xs.isTypedArray,xy=Js?yy(Js):my,Jf=xy,wy=_m,Ey=qf,Sy=ot,Cy=vi,_y=Xf,$y=Jf,Ty=Object.prototype,Ay=Ty.hasOwnProperty;function Oy(e,t){var r=Sy(e),n=!r&&Ey(e),o=!r&&!n&&Cy(e),a=!r&&!n&&!o&&$y(e),i=r||n||o||a,s=i?wy(e.length,String):[],l=s.length;for(var c in e)(t||Ay.call(e,c))&&!(i&&(c=="length"||o&&(c=="offset"||c=="parent")||a&&(c=="buffer"||c=="byteLength"||c=="byteOffset")||_y(c,l)))&&s.push(c);return s}var Zf=Oy,Ry=Object.prototype;function Py(e){var t=e&&e.constructor,r=typeof t=="function"&&t.prototype||Ry;return e===r}var xi=Py;function My(e,t){return function(r){return e(t(r))}}var Qf=My,Ny=Qf,Dy=Ny(Object.keys,Object),ky=Dy,jy=xi,Iy=ky,Fy=Object.prototype,Ly=Fy.hasOwnProperty;function By(e){if(!jy(e))return Iy(e);var t=[];for(var r in Object(e))Ly.call(e,r)&&r!="constructor"&&t.push(r);return t}var Hy=By;function zy(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var Nr=zy,Uy=Jt,Gy=Nr,Wy="[object AsyncFunction]",Vy="[object Function]",Yy="[object GeneratorFunction]",Ky="[object Proxy]";function qy(e){if(!Gy(e))return!1;var t=Uy(e);return t==Vy||t==Yy||t==Wy||t==Ky}var ed=qy,Xy=ed,Jy=bi;function Zy(e){return e!=null&&Jy(e.length)&&!Xy(e)}var wo=Zy,Qy=Zf,ex=Hy,tx=wo;function rx(e){return tx(e)?Qy(e):ex(e)}var xn=rx,nx=Sm,ox=xn;function ax(e,t){return e&&nx(e,t,ox)}var td=ax;function ix(e){return e}var rd=ix,sx=rd;function lx(e){return typeof e=="function"?e:sx}var cx=lx,ux=td,fx=cx;function dx(e,t){return e&&ux(e,fx(t))}var wi=dx,px=Qf,hx=px(Object.getPrototypeOf,Object),Ei=hx,gx=Jt,vx=Ei,bx=St,mx="[object Object]",yx=Function.prototype,xx=Object.prototype,nd=yx.toString,wx=xx.hasOwnProperty,Ex=nd.call(Object);function Sx(e){if(!bx(e)||gx(e)!=mx)return!1;var t=vx(e);if(t===null)return!0;var r=wx.call(t,"constructor")&&t.constructor;return typeof r=="function"&&r instanceof r&&nd.call(r)==Ex}var Cx=Sx;function _x(e,t){for(var r=-1,n=e==null?0:e.length,o=Array(n);++r<n;)o[r]=t(e[r],r,e);return o}var od=_x;function $x(){this.__data__=[],this.size=0}var Tx=$x;function Ax(e,t){return e===t||e!==e&&t!==t}var Si=Ax,Ox=Si;function Rx(e,t){for(var r=e.length;r--;)if(Ox(e[r][0],t))return r;return-1}var Eo=Rx,Px=Eo,Mx=Array.prototype,Nx=Mx.splice;function Dx(e){var t=this.__data__,r=Px(t,e);if(r<0)return!1;var n=t.length-1;return r==n?t.pop():Nx.call(t,r,1),--this.size,!0}var kx=Dx,jx=Eo;function Ix(e){var t=this.__data__,r=jx(t,e);return r<0?void 0:t[r][1]}var Fx=Ix,Lx=Eo;function Bx(e){return Lx(this.__data__,e)>-1}var Hx=Bx,zx=Eo;function Ux(e,t){var r=this.__data__,n=zx(r,e);return n<0?(++this.size,r.push([e,t])):r[n][1]=t,this}var Gx=Ux,Wx=Tx,Vx=kx,Yx=Fx,Kx=Hx,qx=Gx;function Dr(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}Dr.prototype.clear=Wx;Dr.prototype.delete=Vx;Dr.prototype.get=Yx;Dr.prototype.has=Kx;Dr.prototype.set=qx;var So=Dr,Xx=So;function Jx(){this.__data__=new Xx,this.size=0}var Zx=Jx;function Qx(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r}var ew=Qx;function tw(e){return this.__data__.get(e)}var rw=tw;function nw(e){return this.__data__.has(e)}var ow=nw,aw=ht,iw=aw["__core-js_shared__"],sw=iw,Xo=sw,Zs=function(){var e=/[^.]+$/.exec(Xo&&Xo.keys&&Xo.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function lw(e){return!!Zs&&Zs in e}var cw=lw,uw=Function.prototype,fw=uw.toString;function dw(e){if(e!=null){try{return fw.call(e)}catch{}try{return e+""}catch{}}return""}var ad=dw,pw=ed,hw=cw,gw=Nr,vw=ad,bw=/[\\^$.*+?()[\]{}|]/g,mw=/^\[object .+?Constructor\]$/,yw=Function.prototype,xw=Object.prototype,ww=yw.toString,Ew=xw.hasOwnProperty,Sw=RegExp("^"+ww.call(Ew).replace(bw,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function Cw(e){if(!gw(e)||hw(e))return!1;var t=pw(e)?Sw:mw;return t.test(vw(e))}var _w=Cw;function $w(e,t){return e==null?void 0:e[t]}var Tw=$w,Aw=_w,Ow=Tw;function Rw(e,t){var r=Ow(e,t);return Aw(r)?r:void 0}var Zt=Rw,Pw=Zt,Mw=ht,Nw=Pw(Mw,"Map"),Ci=Nw,Dw=Zt,kw=Dw(Object,"create"),Co=kw,Qs=Co;function jw(){this.__data__=Qs?Qs(null):{},this.size=0}var Iw=jw;function Fw(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var Lw=Fw,Bw=Co,Hw="__lodash_hash_undefined__",zw=Object.prototype,Uw=zw.hasOwnProperty;function Gw(e){var t=this.__data__;if(Bw){var r=t[e];return r===Hw?void 0:r}return Uw.call(t,e)?t[e]:void 0}var Ww=Gw,Vw=Co,Yw=Object.prototype,Kw=Yw.hasOwnProperty;function qw(e){var t=this.__data__;return Vw?t[e]!==void 0:Kw.call(t,e)}var Xw=qw,Jw=Co,Zw="__lodash_hash_undefined__";function Qw(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=Jw&&t===void 0?Zw:t,this}var e1=Qw,t1=Iw,r1=Lw,n1=Ww,o1=Xw,a1=e1;function kr(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}kr.prototype.clear=t1;kr.prototype.delete=r1;kr.prototype.get=n1;kr.prototype.has=o1;kr.prototype.set=a1;var i1=kr,el=i1,s1=So,l1=Ci;function c1(){this.size=0,this.__data__={hash:new el,map:new(l1||s1),string:new el}}var u1=c1;function f1(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}var d1=f1,p1=d1;function h1(e,t){var r=e.__data__;return p1(t)?r[typeof t=="string"?"string":"hash"]:r.map}var _o=h1,g1=_o;function v1(e){var t=g1(this,e).delete(e);return this.size-=t?1:0,t}var b1=v1,m1=_o;function y1(e){return m1(this,e).get(e)}var x1=y1,w1=_o;function E1(e){return w1(this,e).has(e)}var S1=E1,C1=_o;function _1(e,t){var r=C1(this,e),n=r.size;return r.set(e,t),this.size+=r.size==n?0:1,this}var $1=_1,T1=u1,A1=b1,O1=x1,R1=S1,P1=$1;function jr(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}jr.prototype.clear=T1;jr.prototype.delete=A1;jr.prototype.get=O1;jr.prototype.has=R1;jr.prototype.set=P1;var _i=jr,M1=So,N1=Ci,D1=_i,k1=200;function j1(e,t){var r=this.__data__;if(r instanceof M1){var n=r.__data__;if(!N1||n.length<k1-1)return n.push([e,t]),this.size=++r.size,this;r=this.__data__=new D1(n)}return r.set(e,t),this.size=r.size,this}var I1=j1,F1=So,L1=Zx,B1=ew,H1=rw,z1=ow,U1=I1;function Ir(e){var t=this.__data__=new F1(e);this.size=t.size}Ir.prototype.clear=L1;Ir.prototype.delete=B1;Ir.prototype.get=H1;Ir.prototype.has=z1;Ir.prototype.set=U1;var $i=Ir,G1="__lodash_hash_undefined__";function W1(e){return this.__data__.set(e,G1),this}var V1=W1;function Y1(e){return this.__data__.has(e)}var K1=Y1,q1=_i,X1=V1,J1=K1;function ro(e){var t=-1,r=e==null?0:e.length;for(this.__data__=new q1;++t<r;)this.add(e[t])}ro.prototype.add=ro.prototype.push=X1;ro.prototype.has=J1;var Z1=ro;function Q1(e,t){for(var r=-1,n=e==null?0:e.length;++r<n;)if(t(e[r],r,e))return!0;return!1}var eE=Q1;function tE(e,t){return e.has(t)}var rE=tE,nE=Z1,oE=eE,aE=rE,iE=1,sE=2;function lE(e,t,r,n,o,a){var i=r&iE,s=e.length,l=t.length;if(s!=l&&!(i&&l>s))return!1;var c=a.get(e),u=a.get(t);if(c&&u)return c==t&&u==e;var p=-1,f=!0,h=r&sE?new nE:void 0;for(a.set(e,t),a.set(t,e);++p<s;){var b=e[p],g=t[p];if(n)var m=i?n(g,b,p,t,e,a):n(b,g,p,e,t,a);if(m!==void 0){if(m)continue;f=!1;break}if(h){if(!oE(t,function(w,C){if(!aE(h,C)&&(b===w||o(b,w,r,n,a)))return h.push(C)})){f=!1;break}}else if(!(b===g||o(b,g,r,n,a))){f=!1;break}}return a.delete(e),a.delete(t),f}var id=lE,cE=ht,uE=cE.Uint8Array,sd=uE;function fE(e){var t=-1,r=Array(e.size);return e.forEach(function(n,o){r[++t]=[o,n]}),r}var dE=fE;function pE(e){var t=-1,r=Array(e.size);return e.forEach(function(n){r[++t]=n}),r}var hE=pE,tl=yn,rl=sd,gE=Si,vE=id,bE=dE,mE=hE,yE=1,xE=2,wE="[object Boolean]",EE="[object Date]",SE="[object Error]",CE="[object Map]",_E="[object Number]",$E="[object RegExp]",TE="[object Set]",AE="[object String]",OE="[object Symbol]",RE="[object ArrayBuffer]",PE="[object DataView]",nl=tl?tl.prototype:void 0,Jo=nl?nl.valueOf:void 0;function ME(e,t,r,n,o,a,i){switch(r){case PE:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case RE:return!(e.byteLength!=t.byteLength||!a(new rl(e),new rl(t)));case wE:case EE:case _E:return gE(+e,+t);case SE:return e.name==t.name&&e.message==t.message;case $E:case AE:return e==t+"";case CE:var s=bE;case TE:var l=n&yE;if(s||(s=mE),e.size!=t.size&&!l)return!1;var c=i.get(e);if(c)return c==t;n|=xE,i.set(e,t);var u=vE(s(e),s(t),n,o,a,i);return i.delete(e),u;case OE:if(Jo)return Jo.call(e)==Jo.call(t)}return!1}var NE=ME;function DE(e,t){for(var r=-1,n=t.length,o=e.length;++r<n;)e[o+r]=t[r];return e}var ld=DE,kE=ld,jE=ot;function IE(e,t,r){var n=t(e);return jE(e)?n:kE(n,r(e))}var cd=IE;function FE(e,t){for(var r=-1,n=e==null?0:e.length,o=0,a=[];++r<n;){var i=e[r];t(i,r,e)&&(a[o++]=i)}return a}var LE=FE;function BE(){return[]}var ud=BE,HE=LE,zE=ud,UE=Object.prototype,GE=UE.propertyIsEnumerable,ol=Object.getOwnPropertySymbols,WE=ol?function(e){return e==null?[]:(e=Object(e),HE(ol(e),function(t){return GE.call(e,t)}))}:zE,Ti=WE,VE=cd,YE=Ti,KE=xn;function qE(e){return VE(e,KE,YE)}var fd=qE,al=fd,XE=1,JE=Object.prototype,ZE=JE.hasOwnProperty;function QE(e,t,r,n,o,a){var i=r&XE,s=al(e),l=s.length,c=al(t),u=c.length;if(l!=u&&!i)return!1;for(var p=l;p--;){var f=s[p];if(!(i?f in t:ZE.call(t,f)))return!1}var h=a.get(e),b=a.get(t);if(h&&b)return h==t&&b==e;var g=!0;a.set(e,t),a.set(t,e);for(var m=i;++p<l;){f=s[p];var w=e[f],C=t[f];if(n)var E=i?n(C,w,f,t,e,a):n(w,C,f,e,t,a);if(!(E===void 0?w===C||o(w,C,r,n,a):E)){g=!1;break}m||(m=f=="constructor")}if(g&&!m){var _=e.constructor,S=t.constructor;_!=S&&"constructor"in e&&"constructor"in t&&!(typeof _=="function"&&_ instanceof _&&typeof S=="function"&&S instanceof S)&&(g=!1)}return a.delete(e),a.delete(t),g}var eS=QE,tS=Zt,rS=ht,nS=tS(rS,"DataView"),oS=nS,aS=Zt,iS=ht,sS=aS(iS,"Promise"),lS=sS,cS=Zt,uS=ht,fS=cS(uS,"Set"),dS=fS,pS=Zt,hS=ht,gS=pS(hS,"WeakMap"),vS=gS,Oa=oS,Ra=Ci,Pa=lS,Ma=dS,Na=vS,dd=Jt,Fr=ad,il="[object Map]",bS="[object Object]",sl="[object Promise]",ll="[object Set]",cl="[object WeakMap]",ul="[object DataView]",mS=Fr(Oa),yS=Fr(Ra),xS=Fr(Pa),wS=Fr(Ma),ES=Fr(Na),Wt=dd;(Oa&&Wt(new Oa(new ArrayBuffer(1)))!=ul||Ra&&Wt(new Ra)!=il||Pa&&Wt(Pa.resolve())!=sl||Ma&&Wt(new Ma)!=ll||Na&&Wt(new Na)!=cl)&&(Wt=function(e){var t=dd(e),r=t==bS?e.constructor:void 0,n=r?Fr(r):"";if(n)switch(n){case mS:return ul;case yS:return il;case xS:return sl;case wS:return ll;case ES:return cl}return t});var $o=Wt,Zo=$i,SS=id,CS=NE,_S=eS,fl=$o,dl=ot,pl=vi,$S=Jf,TS=1,hl="[object Arguments]",gl="[object Array]",Fn="[object Object]",AS=Object.prototype,vl=AS.hasOwnProperty;function OS(e,t,r,n,o,a){var i=dl(e),s=dl(t),l=i?gl:fl(e),c=s?gl:fl(t);l=l==hl?Fn:l,c=c==hl?Fn:c;var u=l==Fn,p=c==Fn,f=l==c;if(f&&pl(e)){if(!pl(t))return!1;i=!0,u=!1}if(f&&!u)return a||(a=new Zo),i||$S(e)?SS(e,t,r,n,o,a):CS(e,t,l,r,n,o,a);if(!(r&TS)){var h=u&&vl.call(e,"__wrapped__"),b=p&&vl.call(t,"__wrapped__");if(h||b){var g=h?e.value():e,m=b?t.value():t;return a||(a=new Zo),o(g,m,r,n,a)}}return f?(a||(a=new Zo),_S(e,t,r,n,o,a)):!1}var RS=OS,PS=RS,bl=St;function pd(e,t,r,n,o){return e===t?!0:e==null||t==null||!bl(e)&&!bl(t)?e!==e&&t!==t:PS(e,t,r,n,pd,o)}var hd=pd,MS=$i,NS=hd,DS=1,kS=2;function jS(e,t,r,n){var o=r.length,a=o,i=!n;if(e==null)return!a;for(e=Object(e);o--;){var s=r[o];if(i&&s[2]?s[1]!==e[s[0]]:!(s[0]in e))return!1}for(;++o<a;){s=r[o];var l=s[0],c=e[l],u=s[1];if(i&&s[2]){if(c===void 0&&!(l in e))return!1}else{var p=new MS;if(n)var f=n(c,u,l,e,t,p);if(!(f===void 0?NS(u,c,DS|kS,n,p):f))return!1}}return!0}var IS=jS,FS=Nr;function LS(e){return e===e&&!FS(e)}var gd=LS,BS=gd,HS=xn;function zS(e){for(var t=HS(e),r=t.length;r--;){var n=t[r],o=e[n];t[r]=[n,o,BS(o)]}return t}var US=zS;function GS(e,t){return function(r){return r==null?!1:r[e]===t&&(t!==void 0||e in Object(r))}}var vd=GS,WS=IS,VS=US,YS=vd;function KS(e){var t=VS(e);return t.length==1&&t[0][2]?YS(t[0][0],t[0][1]):function(r){return r===e||WS(r,e,t)}}var qS=KS,XS=Jt,JS=St,ZS="[object Symbol]";function QS(e){return typeof e=="symbol"||JS(e)&&XS(e)==ZS}var Ai=QS,eC=ot,tC=Ai,rC=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,nC=/^\w*$/;function oC(e,t){if(eC(e))return!1;var r=typeof e;return r=="number"||r=="symbol"||r=="boolean"||e==null||tC(e)?!0:nC.test(e)||!rC.test(e)||t!=null&&e in Object(t)}var Oi=oC,bd=_i,aC="Expected a function";function Ri(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new TypeError(aC);var r=function(){var n=arguments,o=t?t.apply(this,n):n[0],a=r.cache;if(a.has(o))return a.get(o);var i=e.apply(this,n);return r.cache=a.set(o,i)||a,i};return r.cache=new(Ri.Cache||bd),r}Ri.Cache=bd;var iC=Ri,sC=iC,lC=500;function cC(e){var t=sC(e,function(n){return r.size===lC&&r.clear(),n}),r=t.cache;return t}var uC=cC,fC=uC,dC=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,pC=/\\(\\)?/g,hC=fC(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(""),e.replace(dC,function(r,n,o,a){t.push(o?a.replace(pC,"$1"):n||r)}),t}),gC=hC,ml=yn,vC=od,bC=ot,mC=Ai,yC=1/0,yl=ml?ml.prototype:void 0,xl=yl?yl.toString:void 0;function md(e){if(typeof e=="string")return e;if(bC(e))return vC(e,md)+"";if(mC(e))return xl?xl.call(e):"";var t=e+"";return t=="0"&&1/e==-yC?"-0":t}var xC=md,wC=xC;function EC(e){return e==null?"":wC(e)}var SC=EC,CC=ot,_C=Oi,$C=gC,TC=SC;function AC(e,t){return CC(e)?e:_C(e,t)?[e]:$C(TC(e))}var yd=AC,OC=Ai,RC=1/0;function PC(e){if(typeof e=="string"||OC(e))return e;var t=e+"";return t=="0"&&1/e==-RC?"-0":t}var To=PC,MC=yd,NC=To;function DC(e,t){t=MC(t,e);for(var r=0,n=t.length;e!=null&&r<n;)e=e[NC(t[r++])];return r&&r==n?e:void 0}var xd=DC,kC=xd;function jC(e,t,r){var n=e==null?void 0:kC(e,t);return n===void 0?r:n}var IC=jC;function FC(e,t){return e!=null&&t in Object(e)}var LC=FC,BC=yd,HC=qf,zC=ot,UC=Xf,GC=bi,WC=To;function VC(e,t,r){t=BC(t,e);for(var n=-1,o=t.length,a=!1;++n<o;){var i=WC(t[n]);if(!(a=e!=null&&r(e,i)))break;e=e[i]}return a||++n!=o?a:(o=e==null?0:e.length,!!o&&GC(o)&&UC(i,o)&&(zC(e)||HC(e)))}var YC=VC,KC=LC,qC=YC;function XC(e,t){return e!=null&&qC(e,t,KC)}var JC=XC,ZC=hd,QC=IC,e_=JC,t_=Oi,r_=gd,n_=vd,o_=To,a_=1,i_=2;function s_(e,t){return t_(e)&&r_(t)?n_(o_(e),t):function(r){var n=QC(r,e);return n===void 0&&n===t?e_(r,e):ZC(t,n,a_|i_)}}var l_=s_;function c_(e){return function(t){return t==null?void 0:t[e]}}var u_=c_,f_=xd;function d_(e){return function(t){return f_(t,e)}}var p_=d_,h_=u_,g_=p_,v_=Oi,b_=To;function m_(e){return v_(e)?h_(b_(e)):g_(e)}var y_=m_,x_=qS,w_=l_,E_=rd,S_=ot,C_=y_;function __(e){return typeof e=="function"?e:e==null?E_:typeof e=="object"?S_(e)?w_(e[0],e[1]):x_(e):C_(e)}var $_=__,T_=wo;function A_(e,t){return function(r,n){if(r==null)return r;if(!T_(r))return e(r,n);for(var o=r.length,a=t?o:-1,i=Object(r);(t?a--:++a<o)&&n(i[a],a,i)!==!1;);return r}}var O_=A_,R_=td,P_=O_,M_=P_(R_),N_=M_,D_=N_,k_=wo;function j_(e,t){var r=-1,n=k_(e)?Array(e.length):[];return D_(e,function(o,a,i){n[++r]=t(o,a,i)}),n}var I_=j_,F_=od,L_=$_,B_=I_,H_=ot;function z_(e,t){var r=H_(e)?F_:B_;return r(e,L_(t))}var U_=z_;Object.defineProperty(mn,"__esModule",{value:!0});mn.flattenNames=void 0;var G_=mm,W_=Ao(G_),V_=wi,Y_=Ao(V_),K_=Cx,q_=Ao(K_),X_=U_,J_=Ao(X_);function Ao(e){return e&&e.__esModule?e:{default:e}}var Z_=mn.flattenNames=function e(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],r=[];return(0,J_.default)(t,function(n){Array.isArray(n)?e(n).map(function(o){return r.push(o)}):(0,q_.default)(n)?(0,Y_.default)(n,function(o,a){o===!0&&r.push(a),r.push(a+"-"+o)}):(0,W_.default)(n)&&r.push(n)}),r};mn.default=Z_;var wn={};function Q_(e,t){for(var r=-1,n=e==null?0:e.length;++r<n&&t(e[r],r,e)!==!1;);return e}var e$=Q_,t$=Zt,r$=function(){try{var e=t$(Object,"defineProperty");return e({},"",{}),e}catch{}}(),n$=r$,wl=n$;function o$(e,t,r){t=="__proto__"&&wl?wl(e,t,{configurable:!0,enumerable:!0,value:r,writable:!0}):e[t]=r}var wd=o$,a$=wd,i$=Si,s$=Object.prototype,l$=s$.hasOwnProperty;function c$(e,t,r){var n=e[t];(!(l$.call(e,t)&&i$(n,r))||r===void 0&&!(t in e))&&a$(e,t,r)}var Ed=c$,u$=Ed,f$=wd;function d$(e,t,r,n){var o=!r;r||(r={});for(var a=-1,i=t.length;++a<i;){var s=t[a],l=n?n(r[s],e[s],s,r,e):void 0;l===void 0&&(l=e[s]),o?f$(r,s,l):u$(r,s,l)}return r}var Oo=d$,p$=Oo,h$=xn;function g$(e,t){return e&&p$(t,h$(t),e)}var v$=g$;function b$(e){var t=[];if(e!=null)for(var r in Object(e))t.push(r);return t}var m$=b$,y$=Nr,x$=xi,w$=m$,E$=Object.prototype,S$=E$.hasOwnProperty;function C$(e){if(!y$(e))return w$(e);var t=x$(e),r=[];for(var n in e)n=="constructor"&&(t||!S$.call(e,n))||r.push(n);return r}var _$=C$,$$=Zf,T$=_$,A$=wo;function O$(e){return A$(e)?$$(e,!0):T$(e)}var Pi=O$,R$=Oo,P$=Pi;function M$(e,t){return e&&R$(t,P$(t),e)}var N$=M$,no={exports:{}};no.exports;(function(e,t){var r=ht,n=t&&!t.nodeType&&t,o=n&&!0&&e&&!e.nodeType&&e,a=o&&o.exports===n,i=a?r.Buffer:void 0,s=i?i.allocUnsafe:void 0;function l(c,u){if(u)return c.slice();var p=c.length,f=s?s(p):new c.constructor(p);return c.copy(f),f}e.exports=l})(no,no.exports);var D$=no.exports;function k$(e,t){var r=-1,n=e.length;for(t||(t=Array(n));++r<n;)t[r]=e[r];return t}var j$=k$,I$=Oo,F$=Ti;function L$(e,t){return I$(e,F$(e),t)}var B$=L$,H$=ld,z$=Ei,U$=Ti,G$=ud,W$=Object.getOwnPropertySymbols,V$=W$?function(e){for(var t=[];e;)H$(t,U$(e)),e=z$(e);return t}:G$,Sd=V$,Y$=Oo,K$=Sd;function q$(e,t){return Y$(e,K$(e),t)}var X$=q$,J$=cd,Z$=Sd,Q$=Pi;function eT(e){return J$(e,Q$,Z$)}var tT=eT,rT=Object.prototype,nT=rT.hasOwnProperty;function oT(e){var t=e.length,r=new e.constructor(t);return t&&typeof e[0]=="string"&&nT.call(e,"index")&&(r.index=e.index,r.input=e.input),r}var aT=oT,El=sd;function iT(e){var t=new e.constructor(e.byteLength);return new El(t).set(new El(e)),t}var Mi=iT,sT=Mi;function lT(e,t){var r=t?sT(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.byteLength)}var cT=lT,uT=/\w*$/;function fT(e){var t=new e.constructor(e.source,uT.exec(e));return t.lastIndex=e.lastIndex,t}var dT=fT,Sl=yn,Cl=Sl?Sl.prototype:void 0,_l=Cl?Cl.valueOf:void 0;function pT(e){return _l?Object(_l.call(e)):{}}var hT=pT,gT=Mi;function vT(e,t){var r=t?gT(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.length)}var bT=vT,mT=Mi,yT=cT,xT=dT,wT=hT,ET=bT,ST="[object Boolean]",CT="[object Date]",_T="[object Map]",$T="[object Number]",TT="[object RegExp]",AT="[object Set]",OT="[object String]",RT="[object Symbol]",PT="[object ArrayBuffer]",MT="[object DataView]",NT="[object Float32Array]",DT="[object Float64Array]",kT="[object Int8Array]",jT="[object Int16Array]",IT="[object Int32Array]",FT="[object Uint8Array]",LT="[object Uint8ClampedArray]",BT="[object Uint16Array]",HT="[object Uint32Array]";function zT(e,t,r){var n=e.constructor;switch(t){case PT:return mT(e);case ST:case CT:return new n(+e);case MT:return yT(e,r);case NT:case DT:case kT:case jT:case IT:case FT:case LT:case BT:case HT:return ET(e,r);case _T:return new n;case $T:case OT:return new n(e);case TT:return xT(e);case AT:return new n;case RT:return wT(e)}}var UT=zT,GT=Nr,$l=Object.create,WT=function(){function e(){}return function(t){if(!GT(t))return{};if($l)return $l(t);e.prototype=t;var r=new e;return e.prototype=void 0,r}}(),VT=WT,YT=VT,KT=Ei,qT=xi;function XT(e){return typeof e.constructor=="function"&&!qT(e)?YT(KT(e)):{}}var JT=XT,ZT=$o,QT=St,eA="[object Map]";function tA(e){return QT(e)&&ZT(e)==eA}var rA=tA,nA=rA,oA=mi,Tl=yi,Al=Tl&&Tl.isMap,aA=Al?oA(Al):nA,iA=aA,sA=$o,lA=St,cA="[object Set]";function uA(e){return lA(e)&&sA(e)==cA}var fA=uA,dA=fA,pA=mi,Ol=yi,Rl=Ol&&Ol.isSet,hA=Rl?pA(Rl):dA,gA=hA,vA=$i,bA=e$,mA=Ed,yA=v$,xA=N$,wA=D$,EA=j$,SA=B$,CA=X$,_A=fd,$A=tT,TA=$o,AA=aT,OA=UT,RA=JT,PA=ot,MA=vi,NA=iA,DA=Nr,kA=gA,jA=xn,IA=Pi,FA=1,LA=2,BA=4,Cd="[object Arguments]",HA="[object Array]",zA="[object Boolean]",UA="[object Date]",GA="[object Error]",_d="[object Function]",WA="[object GeneratorFunction]",VA="[object Map]",YA="[object Number]",$d="[object Object]",KA="[object RegExp]",qA="[object Set]",XA="[object String]",JA="[object Symbol]",ZA="[object WeakMap]",QA="[object ArrayBuffer]",eO="[object DataView]",tO="[object Float32Array]",rO="[object Float64Array]",nO="[object Int8Array]",oO="[object Int16Array]",aO="[object Int32Array]",iO="[object Uint8Array]",sO="[object Uint8ClampedArray]",lO="[object Uint16Array]",cO="[object Uint32Array]",me={};me[Cd]=me[HA]=me[QA]=me[eO]=me[zA]=me[UA]=me[tO]=me[rO]=me[nO]=me[oO]=me[aO]=me[VA]=me[YA]=me[$d]=me[KA]=me[qA]=me[XA]=me[JA]=me[iO]=me[sO]=me[lO]=me[cO]=!0;me[GA]=me[_d]=me[ZA]=!1;function Kn(e,t,r,n,o,a){var i,s=t&FA,l=t&LA,c=t&BA;if(r&&(i=o?r(e,n,o,a):r(e)),i!==void 0)return i;if(!DA(e))return e;var u=PA(e);if(u){if(i=AA(e),!s)return EA(e,i)}else{var p=TA(e),f=p==_d||p==WA;if(MA(e))return wA(e,s);if(p==$d||p==Cd||f&&!o){if(i=l||f?{}:RA(e),!s)return l?CA(e,xA(i,e)):SA(e,yA(i,e))}else{if(!me[p])return o?e:{};i=OA(e,p,s)}}a||(a=new vA);var h=a.get(e);if(h)return h;a.set(e,i),kA(e)?e.forEach(function(m){i.add(Kn(m,t,r,m,e,a))}):NA(e)&&e.forEach(function(m,w){i.set(w,Kn(m,t,r,w,e,a))});var b=c?l?$A:_A:l?IA:jA,g=u?void 0:b(e);return bA(g||e,function(m,w){g&&(w=m,m=e[w]),mA(i,w,Kn(m,t,r,w,e,a))}),i}var uO=Kn,fO=uO,dO=1,pO=4;function hO(e){return fO(e,dO|pO)}var gO=hO;Object.defineProperty(wn,"__esModule",{value:!0});wn.mergeClasses=void 0;var vO=wi,bO=Td(vO),mO=gO,yO=Td(mO),xO=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e};function Td(e){return e&&e.__esModule?e:{default:e}}var wO=wn.mergeClasses=function(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],n=t.default&&(0,yO.default)(t.default)||{};return r.map(function(o){var a=t[o];return a&&(0,bO.default)(a,function(i,s){n[s]||(n[s]={}),n[s]=xO({},n[s],a[s])}),o}),n};wn.default=wO;var En={};Object.defineProperty(En,"__esModule",{value:!0});En.autoprefix=void 0;var EO=wi,Pl=CO(EO),SO=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e};function CO(e){return e&&e.__esModule?e:{default:e}}var _O={borderRadius:function(t){return{msBorderRadius:t,MozBorderRadius:t,OBorderRadius:t,WebkitBorderRadius:t,borderRadius:t}},boxShadow:function(t){return{msBoxShadow:t,MozBoxShadow:t,OBoxShadow:t,WebkitBoxShadow:t,boxShadow:t}},userSelect:function(t){return{WebkitTouchCallout:t,KhtmlUserSelect:t,MozUserSelect:t,msUserSelect:t,WebkitUserSelect:t,userSelect:t}},flex:function(t){return{WebkitBoxFlex:t,MozBoxFlex:t,WebkitFlex:t,msFlex:t,flex:t}},flexBasis:function(t){return{WebkitFlexBasis:t,flexBasis:t}},justifyContent:function(t){return{WebkitJustifyContent:t,justifyContent:t}},transition:function(t){return{msTransition:t,MozTransition:t,OTransition:t,WebkitTransition:t,transition:t}},transform:function(t){return{msTransform:t,MozTransform:t,OTransform:t,WebkitTransform:t,transform:t}},absolute:function(t){var r=t&&t.split(" ");return{position:"absolute",top:r&&r[0],right:r&&r[1],bottom:r&&r[2],left:r&&r[3]}},extend:function(t,r){var n=r[t];return n||{extend:t}}},$O=En.autoprefix=function(t){var r={};return(0,Pl.default)(t,function(n,o){var a={};(0,Pl.default)(n,function(i,s){var l=_O[s];l?a=SO({},a,l(i)):a[s]=i}),r[o]=a}),r};En.default=$O;var Sn={};Object.defineProperty(Sn,"__esModule",{value:!0});Sn.hover=void 0;var TO=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},AO=d,Qo=OO(AO);function OO(e){return e&&e.__esModule?e:{default:e}}function RO(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Ml(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t&&(typeof t=="object"||typeof t=="function")?t:e}function PO(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var MO=Sn.hover=function(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"span";return function(n){PO(o,n);function o(){var a,i,s,l;RO(this,o);for(var c=arguments.length,u=Array(c),p=0;p<c;p++)u[p]=arguments[p];return l=(i=(s=Ml(this,(a=o.__proto__||Object.getPrototypeOf(o)).call.apply(a,[this].concat(u))),s),s.state={hover:!1},s.handleMouseOver=function(){return s.setState({hover:!0})},s.handleMouseOut=function(){return s.setState({hover:!1})},s.render=function(){return Qo.default.createElement(r,{onMouseOver:s.handleMouseOver,onMouseOut:s.handleMouseOut},Qo.default.createElement(t,TO({},s.props,s.state)))},i),Ml(s,l)}return o}(Qo.default.Component)};Sn.default=MO;var Cn={};Object.defineProperty(Cn,"__esModule",{value:!0});Cn.active=void 0;var NO=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},DO=d,ea=kO(DO);function kO(e){return e&&e.__esModule?e:{default:e}}function jO(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Nl(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t&&(typeof t=="object"||typeof t=="function")?t:e}function IO(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var FO=Cn.active=function(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"span";return function(n){IO(o,n);function o(){var a,i,s,l;jO(this,o);for(var c=arguments.length,u=Array(c),p=0;p<c;p++)u[p]=arguments[p];return l=(i=(s=Nl(this,(a=o.__proto__||Object.getPrototypeOf(o)).call.apply(a,[this].concat(u))),s),s.state={active:!1},s.handleMouseDown=function(){return s.setState({active:!0})},s.handleMouseUp=function(){return s.setState({active:!1})},s.render=function(){return ea.default.createElement(r,{onMouseDown:s.handleMouseDown,onMouseUp:s.handleMouseUp},ea.default.createElement(t,NO({},s.props,s.state)))},i),Nl(s,l)}return o}(ea.default.Component)};Cn.default=FO;var Ni={};Object.defineProperty(Ni,"__esModule",{value:!0});var LO=function(t,r){var n={},o=function(i){var s=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;n[i]=s};return t===0&&o("first-child"),t===r-1&&o("last-child"),(t===0||t%2===0)&&o("even"),Math.abs(t%2)===1&&o("odd"),o("nth-child",t),n};Ni.default=LO;Object.defineProperty(Xe,"__esModule",{value:!0});Xe.ReactCSS=Xe.loop=Xe.handleActive=Di=Xe.handleHover=Xe.hover=void 0;var BO=mn,HO=Lr(BO),zO=wn,UO=Lr(zO),GO=En,WO=Lr(GO),VO=Sn,Ad=Lr(VO),YO=Cn,KO=Lr(YO),qO=Ni,XO=Lr(qO);function Lr(e){return e&&e.__esModule?e:{default:e}}Xe.hover=Ad.default;var Di=Xe.handleHover=Ad.default;Xe.handleActive=KO.default;Xe.loop=XO.default;var JO=Xe.ReactCSS=function(t){for(var r=arguments.length,n=Array(r>1?r-1:0),o=1;o<r;o++)n[o-1]=arguments[o];var a=(0,HO.default)(n),i=(0,UO.default)(t,a);return(0,WO.default)(i)},ee=Xe.default=JO,ZO=function(t,r,n,o,a){var i=a.clientWidth,s=a.clientHeight,l=typeof t.pageX=="number"?t.pageX:t.touches[0].pageX,c=typeof t.pageY=="number"?t.pageY:t.touches[0].pageY,u=l-(a.getBoundingClientRect().left+window.pageXOffset),p=c-(a.getBoundingClientRect().top+window.pageYOffset);if(n==="vertical"){var f=void 0;if(p<0?f=0:p>s?f=1:f=Math.round(p*100/s)/100,r.a!==f)return{h:r.h,s:r.s,l:r.l,a:f,source:"rgb"}}else{var h=void 0;if(u<0?h=0:u>i?h=1:h=Math.round(u*100/i)/100,o!==h)return{h:r.h,s:r.s,l:r.l,a:h,source:"rgb"}}return null},ta={},QO=function(t,r,n,o){if(typeof document>"u"&&!o)return null;var a=o?new o:document.createElement("canvas");a.width=n*2,a.height=n*2;var i=a.getContext("2d");return i?(i.fillStyle=t,i.fillRect(0,0,a.width,a.height),i.fillStyle=r,i.fillRect(0,0,n,n),i.translate(n,n),i.fillRect(0,0,n,n),a.toDataURL()):null},eR=function(t,r,n,o){var a=t+"-"+r+"-"+n+(o?"-server":"");if(ta[a])return ta[a];var i=QO(t,r,n,o);return ta[a]=i,i},Dl=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Br=function(t){var r=t.white,n=t.grey,o=t.size,a=t.renderers,i=t.borderRadius,s=t.boxShadow,l=t.children,c=ee({default:{grid:{borderRadius:i,boxShadow:s,absolute:"0px 0px 0px 0px",background:"url("+eR(r,n,o,a.canvas)+") center left"}}});return d.isValidElement(l)?d.cloneElement(l,Dl({},l.props,{style:Dl({},l.props.style,c.grid)})):d.createElement("div",{style:c.grid})};Br.defaultProps={size:8,white:"transparent",grey:"rgba(0,0,0,.08)",renderers:{}};var tR=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},rR=function(){function e(t,r){for(var n=0;n<r.length;n++){var o=r[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}();function nR(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function kl(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t&&(typeof t=="object"||typeof t=="function")?t:e}function oR(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var ki=function(e){oR(t,e);function t(){var r,n,o,a;nR(this,t);for(var i=arguments.length,s=Array(i),l=0;l<i;l++)s[l]=arguments[l];return a=(n=(o=kl(this,(r=t.__proto__||Object.getPrototypeOf(t)).call.apply(r,[this].concat(s))),o),o.handleChange=function(c){var u=ZO(c,o.props.hsl,o.props.direction,o.props.a,o.container);u&&typeof o.props.onChange=="function"&&o.props.onChange(u,c)},o.handleMouseDown=function(c){o.handleChange(c),window.addEventListener("mousemove",o.handleChange),window.addEventListener("mouseup",o.handleMouseUp)},o.handleMouseUp=function(){o.unbindEventListeners()},o.unbindEventListeners=function(){window.removeEventListener("mousemove",o.handleChange),window.removeEventListener("mouseup",o.handleMouseUp)},n),kl(o,a)}return rR(t,[{key:"componentWillUnmount",value:function(){this.unbindEventListeners()}},{key:"render",value:function(){var n=this,o=this.props.rgb,a=ee({default:{alpha:{absolute:"0px 0px 0px 0px",borderRadius:this.props.radius},checkboard:{absolute:"0px 0px 0px 0px",overflow:"hidden",borderRadius:this.props.radius},gradient:{absolute:"0px 0px 0px 0px",background:"linear-gradient(to right, rgba("+o.r+","+o.g+","+o.b+`, 0) 0%,
|
|
126
|
+
rgba(`+o.r+","+o.g+","+o.b+", 1) 100%)",boxShadow:this.props.shadow,borderRadius:this.props.radius},container:{position:"relative",height:"100%",margin:"0 3px"},pointer:{position:"absolute",left:o.a*100+"%"},slider:{width:"4px",borderRadius:"1px",height:"8px",boxShadow:"0 0 2px rgba(0, 0, 0, .6)",background:"#fff",marginTop:"1px",transform:"translateX(-2px)"}},vertical:{gradient:{background:"linear-gradient(to bottom, rgba("+o.r+","+o.g+","+o.b+`, 0) 0%,
|
|
127
|
+
rgba(`+o.r+","+o.g+","+o.b+", 1) 100%)"},pointer:{left:0,top:o.a*100+"%"}},overwrite:tR({},this.props.style)},{vertical:this.props.direction==="vertical",overwrite:!0});return d.createElement("div",{style:a.alpha},d.createElement("div",{style:a.checkboard},d.createElement(Br,{renderers:this.props.renderers})),d.createElement("div",{style:a.gradient}),d.createElement("div",{style:a.container,ref:function(s){return n.container=s},onMouseDown:this.handleMouseDown,onTouchMove:this.handleChange,onTouchStart:this.handleChange},d.createElement("div",{style:a.pointer},this.props.pointer?d.createElement(this.props.pointer,this.props):d.createElement("div",{style:a.slider}))))}}]),t}(d.PureComponent||d.Component),aR=function(){function e(t,r){for(var n=0;n<r.length;n++){var o=r[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}();function iR(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function sR(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function lR(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t&&(typeof t=="object"||typeof t=="function")?t:e}function cR(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var uR=1,Od=38,fR=40,dR=[Od,fR],pR=function(t){return dR.indexOf(t)>-1},hR=function(t){return Number(String(t).replace(/%/g,""))},gR=1,ce=function(e){cR(t,e);function t(r){sR(this,t);var n=lR(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return n.handleBlur=function(){n.state.blurValue&&n.setState({value:n.state.blurValue,blurValue:null})},n.handleChange=function(o){n.setUpdatedValue(o.target.value,o)},n.handleKeyDown=function(o){var a=hR(o.target.value);if(!isNaN(a)&&pR(o.keyCode)){var i=n.getArrowOffset(),s=o.keyCode===Od?a+i:a-i;n.setUpdatedValue(s,o)}},n.handleDrag=function(o){if(n.props.dragLabel){var a=Math.round(n.props.value+o.movementX);a>=0&&a<=n.props.dragMax&&n.props.onChange&&n.props.onChange(n.getValueObjectWithLabel(a),o)}},n.handleMouseDown=function(o){n.props.dragLabel&&(o.preventDefault(),n.handleDrag(o),window.addEventListener("mousemove",n.handleDrag),window.addEventListener("mouseup",n.handleMouseUp))},n.handleMouseUp=function(){n.unbindEventListeners()},n.unbindEventListeners=function(){window.removeEventListener("mousemove",n.handleDrag),window.removeEventListener("mouseup",n.handleMouseUp)},n.state={value:String(r.value).toUpperCase(),blurValue:String(r.value).toUpperCase()},n.inputId="rc-editable-input-"+gR++,n}return aR(t,[{key:"componentDidUpdate",value:function(n,o){this.props.value!==this.state.value&&(n.value!==this.props.value||o.value!==this.state.value)&&(this.input===document.activeElement?this.setState({blurValue:String(this.props.value).toUpperCase()}):this.setState({value:String(this.props.value).toUpperCase(),blurValue:!this.state.blurValue&&String(this.props.value).toUpperCase()}))}},{key:"componentWillUnmount",value:function(){this.unbindEventListeners()}},{key:"getValueObjectWithLabel",value:function(n){return iR({},this.props.label,n)}},{key:"getArrowOffset",value:function(){return this.props.arrowOffset||uR}},{key:"setUpdatedValue",value:function(n,o){var a=this.props.label?this.getValueObjectWithLabel(n):n;this.props.onChange&&this.props.onChange(a,o),this.setState({value:n})}},{key:"render",value:function(){var n=this,o=ee({default:{wrap:{position:"relative"}},"user-override":{wrap:this.props.style&&this.props.style.wrap?this.props.style.wrap:{},input:this.props.style&&this.props.style.input?this.props.style.input:{},label:this.props.style&&this.props.style.label?this.props.style.label:{}},"dragLabel-true":{label:{cursor:"ew-resize"}}},{"user-override":!0},this.props);return d.createElement("div",{style:o.wrap},d.createElement("input",{id:this.inputId,style:o.input,ref:function(i){return n.input=i},value:this.state.value,onKeyDown:this.handleKeyDown,onChange:this.handleChange,onBlur:this.handleBlur,placeholder:this.props.placeholder,spellCheck:"false"}),this.props.label&&!this.props.hideLabel?d.createElement("label",{htmlFor:this.inputId,style:o.label,onMouseDown:this.handleMouseDown},this.props.label):null)}}]),t}(d.PureComponent||d.Component),vR=function(t,r,n,o){var a=o.clientWidth,i=o.clientHeight,s=typeof t.pageX=="number"?t.pageX:t.touches[0].pageX,l=typeof t.pageY=="number"?t.pageY:t.touches[0].pageY,c=s-(o.getBoundingClientRect().left+window.pageXOffset),u=l-(o.getBoundingClientRect().top+window.pageYOffset);if(r==="vertical"){var p=void 0;if(u<0)p=359;else if(u>i)p=0;else{var f=-(u*100/i)+100;p=360*f/100}if(n.h!==p)return{h:p,s:n.s,l:n.l,a:n.a,source:"hsl"}}else{var h=void 0;if(c<0)h=0;else if(c>a)h=359;else{var b=c*100/a;h=360*b/100}if(n.h!==h)return{h,s:n.s,l:n.l,a:n.a,source:"hsl"}}return null},bR=function(){function e(t,r){for(var n=0;n<r.length;n++){var o=r[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}();function mR(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function jl(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t&&(typeof t=="object"||typeof t=="function")?t:e}function yR(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var Hr=function(e){yR(t,e);function t(){var r,n,o,a;mR(this,t);for(var i=arguments.length,s=Array(i),l=0;l<i;l++)s[l]=arguments[l];return a=(n=(o=jl(this,(r=t.__proto__||Object.getPrototypeOf(t)).call.apply(r,[this].concat(s))),o),o.handleChange=function(c){var u=vR(c,o.props.direction,o.props.hsl,o.container);u&&typeof o.props.onChange=="function"&&o.props.onChange(u,c)},o.handleMouseDown=function(c){o.handleChange(c),window.addEventListener("mousemove",o.handleChange),window.addEventListener("mouseup",o.handleMouseUp)},o.handleMouseUp=function(){o.unbindEventListeners()},n),jl(o,a)}return bR(t,[{key:"componentWillUnmount",value:function(){this.unbindEventListeners()}},{key:"unbindEventListeners",value:function(){window.removeEventListener("mousemove",this.handleChange),window.removeEventListener("mouseup",this.handleMouseUp)}},{key:"render",value:function(){var n=this,o=this.props.direction,a=o===void 0?"horizontal":o,i=ee({default:{hue:{absolute:"0px 0px 0px 0px",borderRadius:this.props.radius,boxShadow:this.props.shadow},container:{padding:"0 2px",position:"relative",height:"100%",borderRadius:this.props.radius},pointer:{position:"absolute",left:this.props.hsl.h*100/360+"%"},slider:{marginTop:"1px",width:"4px",borderRadius:"1px",height:"8px",boxShadow:"0 0 2px rgba(0, 0, 0, .6)",background:"#fff",transform:"translateX(-2px)"}},vertical:{pointer:{left:"0px",top:-(this.props.hsl.h*100/360)+100+"%"}}},{vertical:a==="vertical"});return d.createElement("div",{style:i.hue},d.createElement("div",{className:"hue-"+a,style:i.container,ref:function(l){return n.container=l},onMouseDown:this.handleMouseDown,onTouchMove:this.handleChange,onTouchStart:this.handleChange},d.createElement("style",null,`
|
|
128
|
+
.hue-horizontal {
|
|
129
|
+
background: linear-gradient(to right, #f00 0%, #ff0 17%, #0f0
|
|
130
|
+
33%, #0ff 50%, #00f 67%, #f0f 83%, #f00 100%);
|
|
131
|
+
background: -webkit-linear-gradient(to right, #f00 0%, #ff0
|
|
132
|
+
17%, #0f0 33%, #0ff 50%, #00f 67%, #f0f 83%, #f00 100%);
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
.hue-vertical {
|
|
136
|
+
background: linear-gradient(to top, #f00 0%, #ff0 17%, #0f0 33%,
|
|
137
|
+
#0ff 50%, #00f 67%, #f0f 83%, #f00 100%);
|
|
138
|
+
background: -webkit-linear-gradient(to top, #f00 0%, #ff0 17%,
|
|
139
|
+
#0f0 33%, #0ff 50%, #00f 67%, #f0f 83%, #f00 100%);
|
|
140
|
+
}
|
|
141
|
+
`),d.createElement("div",{style:i.pointer},this.props.pointer?d.createElement(this.props.pointer,this.props):d.createElement("div",{style:i.slider}))))}}]),t}(d.PureComponent||d.Component),Da={exports:{}},Ln={exports:{}},pe={};/** @license React v16.13.1
|
|
142
|
+
* react-is.production.min.js
|
|
143
|
+
*
|
|
144
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
145
|
+
*
|
|
146
|
+
* This source code is licensed under the MIT license found in the
|
|
147
|
+
* LICENSE file in the root directory of this source tree.
|
|
148
|
+
*/var Il;function xR(){if(Il)return pe;Il=1;var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,r=e?Symbol.for("react.portal"):60106,n=e?Symbol.for("react.fragment"):60107,o=e?Symbol.for("react.strict_mode"):60108,a=e?Symbol.for("react.profiler"):60114,i=e?Symbol.for("react.provider"):60109,s=e?Symbol.for("react.context"):60110,l=e?Symbol.for("react.async_mode"):60111,c=e?Symbol.for("react.concurrent_mode"):60111,u=e?Symbol.for("react.forward_ref"):60112,p=e?Symbol.for("react.suspense"):60113,f=e?Symbol.for("react.suspense_list"):60120,h=e?Symbol.for("react.memo"):60115,b=e?Symbol.for("react.lazy"):60116,g=e?Symbol.for("react.block"):60121,m=e?Symbol.for("react.fundamental"):60117,w=e?Symbol.for("react.responder"):60118,C=e?Symbol.for("react.scope"):60119;function E(S){if(typeof S=="object"&&S!==null){var O=S.$$typeof;switch(O){case t:switch(S=S.type,S){case l:case c:case n:case a:case o:case p:return S;default:switch(S=S&&S.$$typeof,S){case s:case u:case b:case h:case i:return S;default:return O}}case r:return O}}}function _(S){return E(S)===c}return pe.AsyncMode=l,pe.ConcurrentMode=c,pe.ContextConsumer=s,pe.ContextProvider=i,pe.Element=t,pe.ForwardRef=u,pe.Fragment=n,pe.Lazy=b,pe.Memo=h,pe.Portal=r,pe.Profiler=a,pe.StrictMode=o,pe.Suspense=p,pe.isAsyncMode=function(S){return _(S)||E(S)===l},pe.isConcurrentMode=_,pe.isContextConsumer=function(S){return E(S)===s},pe.isContextProvider=function(S){return E(S)===i},pe.isElement=function(S){return typeof S=="object"&&S!==null&&S.$$typeof===t},pe.isForwardRef=function(S){return E(S)===u},pe.isFragment=function(S){return E(S)===n},pe.isLazy=function(S){return E(S)===b},pe.isMemo=function(S){return E(S)===h},pe.isPortal=function(S){return E(S)===r},pe.isProfiler=function(S){return E(S)===a},pe.isStrictMode=function(S){return E(S)===o},pe.isSuspense=function(S){return E(S)===p},pe.isValidElementType=function(S){return typeof S=="string"||typeof S=="function"||S===n||S===c||S===a||S===o||S===p||S===f||typeof S=="object"&&S!==null&&(S.$$typeof===b||S.$$typeof===h||S.$$typeof===i||S.$$typeof===s||S.$$typeof===u||S.$$typeof===m||S.$$typeof===w||S.$$typeof===C||S.$$typeof===g)},pe.typeOf=E,pe}var he={};/** @license React v16.13.1
|
|
149
|
+
* react-is.development.js
|
|
150
|
+
*
|
|
151
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
152
|
+
*
|
|
153
|
+
* This source code is licensed under the MIT license found in the
|
|
154
|
+
* LICENSE file in the root directory of this source tree.
|
|
155
|
+
*/var Fl;function wR(){return Fl||(Fl=1,process.env.NODE_ENV!=="production"&&function(){var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,r=e?Symbol.for("react.portal"):60106,n=e?Symbol.for("react.fragment"):60107,o=e?Symbol.for("react.strict_mode"):60108,a=e?Symbol.for("react.profiler"):60114,i=e?Symbol.for("react.provider"):60109,s=e?Symbol.for("react.context"):60110,l=e?Symbol.for("react.async_mode"):60111,c=e?Symbol.for("react.concurrent_mode"):60111,u=e?Symbol.for("react.forward_ref"):60112,p=e?Symbol.for("react.suspense"):60113,f=e?Symbol.for("react.suspense_list"):60120,h=e?Symbol.for("react.memo"):60115,b=e?Symbol.for("react.lazy"):60116,g=e?Symbol.for("react.block"):60121,m=e?Symbol.for("react.fundamental"):60117,w=e?Symbol.for("react.responder"):60118,C=e?Symbol.for("react.scope"):60119;function E(R){return typeof R=="string"||typeof R=="function"||R===n||R===c||R===a||R===o||R===p||R===f||typeof R=="object"&&R!==null&&(R.$$typeof===b||R.$$typeof===h||R.$$typeof===i||R.$$typeof===s||R.$$typeof===u||R.$$typeof===m||R.$$typeof===w||R.$$typeof===C||R.$$typeof===g)}function _(R){if(typeof R=="object"&&R!==null){var Ae=R.$$typeof;switch(Ae){case t:var Ie=R.type;switch(Ie){case l:case c:case n:case a:case o:case p:return Ie;default:var Fe=Ie&&Ie.$$typeof;switch(Fe){case s:case u:case b:case h:case i:return Fe;default:return Ae}}case r:return Ae}}}var S=l,O=c,M=s,I=i,U=t,V=u,K=n,F=b,Y=h,G=r,te=a,H=o,oe=p,N=!1;function Z(R){return N||(N=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")),$(R)||_(R)===l}function $(R){return _(R)===c}function T(R){return _(R)===s}function D(R){return _(R)===i}function k(R){return typeof R=="object"&&R!==null&&R.$$typeof===t}function z(R){return _(R)===u}function W(R){return _(R)===n}function L(R){return _(R)===b}function q(R){return _(R)===h}function X(R){return _(R)===r}function re(R){return _(R)===a}function J(R){return _(R)===o}function Te(R){return _(R)===p}he.AsyncMode=S,he.ConcurrentMode=O,he.ContextConsumer=M,he.ContextProvider=I,he.Element=U,he.ForwardRef=V,he.Fragment=K,he.Lazy=F,he.Memo=Y,he.Portal=G,he.Profiler=te,he.StrictMode=H,he.Suspense=oe,he.isAsyncMode=Z,he.isConcurrentMode=$,he.isContextConsumer=T,he.isContextProvider=D,he.isElement=k,he.isForwardRef=z,he.isFragment=W,he.isLazy=L,he.isMemo=q,he.isPortal=X,he.isProfiler=re,he.isStrictMode=J,he.isSuspense=Te,he.isValidElementType=E,he.typeOf=_}()),he}var Ll;function Rd(){return Ll||(Ll=1,process.env.NODE_ENV==="production"?Ln.exports=xR():Ln.exports=wR()),Ln.exports}/*
|
|
156
|
+
object-assign
|
|
157
|
+
(c) Sindre Sorhus
|
|
158
|
+
@license MIT
|
|
159
|
+
*/var ra,Bl;function ER(){if(Bl)return ra;Bl=1;var e=Object.getOwnPropertySymbols,t=Object.prototype.hasOwnProperty,r=Object.prototype.propertyIsEnumerable;function n(a){if(a==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(a)}function o(){try{if(!Object.assign)return!1;var a=new String("abc");if(a[5]="de",Object.getOwnPropertyNames(a)[0]==="5")return!1;for(var i={},s=0;s<10;s++)i["_"+String.fromCharCode(s)]=s;var l=Object.getOwnPropertyNames(i).map(function(u){return i[u]});if(l.join("")!=="0123456789")return!1;var c={};return"abcdefghijklmnopqrst".split("").forEach(function(u){c[u]=u}),Object.keys(Object.assign({},c)).join("")==="abcdefghijklmnopqrst"}catch{return!1}}return ra=o()?Object.assign:function(a,i){for(var s,l=n(a),c,u=1;u<arguments.length;u++){s=Object(arguments[u]);for(var p in s)t.call(s,p)&&(l[p]=s[p]);if(e){c=e(s);for(var f=0;f<c.length;f++)r.call(s,c[f])&&(l[c[f]]=s[c[f]])}}return l},ra}var na,Hl;function ji(){if(Hl)return na;Hl=1;var e="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return na=e,na}var oa,zl;function Pd(){return zl||(zl=1,oa=Function.call.bind(Object.prototype.hasOwnProperty)),oa}var aa,Ul;function SR(){if(Ul)return aa;Ul=1;var e=function(){};if(process.env.NODE_ENV!=="production"){var t=ji(),r={},n=Pd();e=function(a){var i="Warning: "+a;typeof console<"u"&&console.error(i);try{throw new Error(i)}catch{}}}function o(a,i,s,l,c){if(process.env.NODE_ENV!=="production"){for(var u in a)if(n(a,u)){var p;try{if(typeof a[u]!="function"){var f=Error((l||"React class")+": "+s+" type `"+u+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof a[u]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw f.name="Invariant Violation",f}p=a[u](i,u,l,s,null,t)}catch(b){p=b}if(p&&!(p instanceof Error)&&e((l||"React class")+": type specification of "+s+" `"+u+"` is invalid; the type checker function must return `null` or an `Error` but returned a "+typeof p+". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."),p instanceof Error&&!(p.message in r)){r[p.message]=!0;var h=c?c():"";e("Failed "+s+" type: "+p.message+(h??""))}}}}return o.resetWarningCache=function(){process.env.NODE_ENV!=="production"&&(r={})},aa=o,aa}var ia,Gl;function CR(){if(Gl)return ia;Gl=1;var e=Rd(),t=ER(),r=ji(),n=Pd(),o=SR(),a=function(){};process.env.NODE_ENV!=="production"&&(a=function(s){var l="Warning: "+s;typeof console<"u"&&console.error(l);try{throw new Error(l)}catch{}});function i(){return null}return ia=function(s,l){var c=typeof Symbol=="function"&&Symbol.iterator,u="@@iterator";function p($){var T=$&&(c&&$[c]||$[u]);if(typeof T=="function")return T}var f="<<anonymous>>",h={array:w("array"),bigint:w("bigint"),bool:w("boolean"),func:w("function"),number:w("number"),object:w("object"),string:w("string"),symbol:w("symbol"),any:C(),arrayOf:E,element:_(),elementType:S(),instanceOf:O,node:V(),objectOf:I,oneOf:M,oneOfType:U,shape:F,exact:Y};function b($,T){return $===T?$!==0||1/$===1/T:$!==$&&T!==T}function g($,T){this.message=$,this.data=T&&typeof T=="object"?T:{},this.stack=""}g.prototype=Error.prototype;function m($){if(process.env.NODE_ENV!=="production")var T={},D=0;function k(W,L,q,X,re,J,Te){if(X=X||f,J=J||q,Te!==r){if(l){var R=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use `PropTypes.checkPropTypes()` to call them. Read more at http://fb.me/use-check-prop-types");throw R.name="Invariant Violation",R}else if(process.env.NODE_ENV!=="production"&&typeof console<"u"){var Ae=X+":"+q;!T[Ae]&&D<3&&(a("You are manually calling a React.PropTypes validation function for the `"+J+"` prop on `"+X+"`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details."),T[Ae]=!0,D++)}}return L[q]==null?W?L[q]===null?new g("The "+re+" `"+J+"` is marked as required "+("in `"+X+"`, but its value is `null`.")):new g("The "+re+" `"+J+"` is marked as required in "+("`"+X+"`, but its value is `undefined`.")):null:$(L,q,X,re,J)}var z=k.bind(null,!1);return z.isRequired=k.bind(null,!0),z}function w($){function T(D,k,z,W,L,q){var X=D[k],re=H(X);if(re!==$){var J=oe(X);return new g("Invalid "+W+" `"+L+"` of type "+("`"+J+"` supplied to `"+z+"`, expected ")+("`"+$+"`."),{expectedType:$})}return null}return m(T)}function C(){return m(i)}function E($){function T(D,k,z,W,L){if(typeof $!="function")return new g("Property `"+L+"` of component `"+z+"` has invalid PropType notation inside arrayOf.");var q=D[k];if(!Array.isArray(q)){var X=H(q);return new g("Invalid "+W+" `"+L+"` of type "+("`"+X+"` supplied to `"+z+"`, expected an array."))}for(var re=0;re<q.length;re++){var J=$(q,re,z,W,L+"["+re+"]",r);if(J instanceof Error)return J}return null}return m(T)}function _(){function $(T,D,k,z,W){var L=T[D];if(!s(L)){var q=H(L);return new g("Invalid "+z+" `"+W+"` of type "+("`"+q+"` supplied to `"+k+"`, expected a single ReactElement."))}return null}return m($)}function S(){function $(T,D,k,z,W){var L=T[D];if(!e.isValidElementType(L)){var q=H(L);return new g("Invalid "+z+" `"+W+"` of type "+("`"+q+"` supplied to `"+k+"`, expected a single ReactElement type."))}return null}return m($)}function O($){function T(D,k,z,W,L){if(!(D[k]instanceof $)){var q=$.name||f,X=Z(D[k]);return new g("Invalid "+W+" `"+L+"` of type "+("`"+X+"` supplied to `"+z+"`, expected ")+("instance of `"+q+"`."))}return null}return m(T)}function M($){if(!Array.isArray($))return process.env.NODE_ENV!=="production"&&(arguments.length>1?a("Invalid arguments supplied to oneOf, expected an array, got "+arguments.length+" arguments. A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z])."):a("Invalid argument supplied to oneOf, expected an array.")),i;function T(D,k,z,W,L){for(var q=D[k],X=0;X<$.length;X++)if(b(q,$[X]))return null;var re=JSON.stringify($,function(Te,R){var Ae=oe(R);return Ae==="symbol"?String(R):R});return new g("Invalid "+W+" `"+L+"` of value `"+String(q)+"` "+("supplied to `"+z+"`, expected one of "+re+"."))}return m(T)}function I($){function T(D,k,z,W,L){if(typeof $!="function")return new g("Property `"+L+"` of component `"+z+"` has invalid PropType notation inside objectOf.");var q=D[k],X=H(q);if(X!=="object")return new g("Invalid "+W+" `"+L+"` of type "+("`"+X+"` supplied to `"+z+"`, expected an object."));for(var re in q)if(n(q,re)){var J=$(q,re,z,W,L+"."+re,r);if(J instanceof Error)return J}return null}return m(T)}function U($){if(!Array.isArray($))return process.env.NODE_ENV!=="production"&&a("Invalid argument supplied to oneOfType, expected an instance of array."),i;for(var T=0;T<$.length;T++){var D=$[T];if(typeof D!="function")return a("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+N(D)+" at index "+T+"."),i}function k(z,W,L,q,X){for(var re=[],J=0;J<$.length;J++){var Te=$[J],R=Te(z,W,L,q,X,r);if(R==null)return null;R.data&&n(R.data,"expectedType")&&re.push(R.data.expectedType)}var Ae=re.length>0?", expected one of type ["+re.join(", ")+"]":"";return new g("Invalid "+q+" `"+X+"` supplied to "+("`"+L+"`"+Ae+"."))}return m(k)}function V(){function $(T,D,k,z,W){return G(T[D])?null:new g("Invalid "+z+" `"+W+"` supplied to "+("`"+k+"`, expected a ReactNode."))}return m($)}function K($,T,D,k,z){return new g(($||"React class")+": "+T+" type `"+D+"."+k+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+z+"`.")}function F($){function T(D,k,z,W,L){var q=D[k],X=H(q);if(X!=="object")return new g("Invalid "+W+" `"+L+"` of type `"+X+"` "+("supplied to `"+z+"`, expected `object`."));for(var re in $){var J=$[re];if(typeof J!="function")return K(z,W,L,re,oe(J));var Te=J(q,re,z,W,L+"."+re,r);if(Te)return Te}return null}return m(T)}function Y($){function T(D,k,z,W,L){var q=D[k],X=H(q);if(X!=="object")return new g("Invalid "+W+" `"+L+"` of type `"+X+"` "+("supplied to `"+z+"`, expected `object`."));var re=t({},D[k],$);for(var J in re){var Te=$[J];if(n($,J)&&typeof Te!="function")return K(z,W,L,J,oe(Te));if(!Te)return new g("Invalid "+W+" `"+L+"` key `"+J+"` supplied to `"+z+"`.\nBad object: "+JSON.stringify(D[k],null," ")+`
|
|
160
|
+
Valid keys: `+JSON.stringify(Object.keys($),null," "));var R=Te(q,J,z,W,L+"."+J,r);if(R)return R}return null}return m(T)}function G($){switch(typeof $){case"number":case"string":case"undefined":return!0;case"boolean":return!$;case"object":if(Array.isArray($))return $.every(G);if($===null||s($))return!0;var T=p($);if(T){var D=T.call($),k;if(T!==$.entries){for(;!(k=D.next()).done;)if(!G(k.value))return!1}else for(;!(k=D.next()).done;){var z=k.value;if(z&&!G(z[1]))return!1}}else return!1;return!0;default:return!1}}function te($,T){return $==="symbol"?!0:T?T["@@toStringTag"]==="Symbol"||typeof Symbol=="function"&&T instanceof Symbol:!1}function H($){var T=typeof $;return Array.isArray($)?"array":$ instanceof RegExp?"object":te(T,$)?"symbol":T}function oe($){if(typeof $>"u"||$===null)return""+$;var T=H($);if(T==="object"){if($ instanceof Date)return"date";if($ instanceof RegExp)return"regexp"}return T}function N($){var T=oe($);switch(T){case"array":case"object":return"an "+T;case"boolean":case"date":case"regexp":return"a "+T;default:return T}}function Z($){return!$.constructor||!$.constructor.name?f:$.constructor.name}return h.checkPropTypes=o,h.resetWarningCache=o.resetWarningCache,h.PropTypes=h,h},ia}var sa,Wl;function _R(){if(Wl)return sa;Wl=1;var e=ji();function t(){}function r(){}return r.resetWarningCache=t,sa=function(){function n(i,s,l,c,u,p){if(p!==e){var f=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw f.name="Invariant Violation",f}}n.isRequired=n;function o(){return n}var a={array:n,bigint:n,bool:n,func:n,number:n,object:n,string:n,symbol:n,any:n,arrayOf:o,element:n,elementType:n,instanceOf:o,node:n,objectOf:o,oneOf:o,oneOfType:o,shape:o,exact:o,checkPropTypes:r,resetWarningCache:t};return a.PropTypes=a,a},sa}if(process.env.NODE_ENV!=="production"){var $R=Rd(),TR=!0;Da.exports=CR()($R.isElement,TR)}else Da.exports=_R()();var AR=Da.exports;const P=ch(AR);function OR(){this.__data__=[],this.size=0}function _n(e,t){return e===t||e!==e&&t!==t}function Ro(e,t){for(var r=e.length;r--;)if(_n(e[r][0],t))return r;return-1}var RR=Array.prototype,PR=RR.splice;function MR(e){var t=this.__data__,r=Ro(t,e);if(r<0)return!1;var n=t.length-1;return r==n?t.pop():PR.call(t,r,1),--this.size,!0}function NR(e){var t=this.__data__,r=Ro(t,e);return r<0?void 0:t[r][1]}function DR(e){return Ro(this.__data__,e)>-1}function kR(e,t){var r=this.__data__,n=Ro(r,e);return n<0?(++this.size,r.push([e,t])):r[n][1]=t,this}function Ct(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}Ct.prototype.clear=OR;Ct.prototype.delete=MR;Ct.prototype.get=NR;Ct.prototype.has=DR;Ct.prototype.set=kR;function jR(){this.__data__=new Ct,this.size=0}function IR(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r}function FR(e){return this.__data__.get(e)}function LR(e){return this.__data__.has(e)}var Md=typeof global=="object"&&global&&global.Object===Object&&global,BR=typeof self=="object"&&self&&self.Object===Object&&self,at=Md||BR||Function("return this")(),Bt=at.Symbol,Nd=Object.prototype,HR=Nd.hasOwnProperty,zR=Nd.toString,en=Bt?Bt.toStringTag:void 0;function UR(e){var t=HR.call(e,en),r=e[en];try{e[en]=void 0;var n=!0}catch{}var o=zR.call(e);return n&&(t?e[en]=r:delete e[en]),o}var GR=Object.prototype,WR=GR.toString;function VR(e){return WR.call(e)}var YR="[object Null]",KR="[object Undefined]",Vl=Bt?Bt.toStringTag:void 0;function Qt(e){return e==null?e===void 0?KR:YR:Vl&&Vl in Object(e)?UR(e):VR(e)}function Je(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var qR="[object AsyncFunction]",XR="[object Function]",JR="[object GeneratorFunction]",ZR="[object Proxy]";function Ii(e){if(!Je(e))return!1;var t=Qt(e);return t==XR||t==JR||t==qR||t==ZR}var la=at["__core-js_shared__"],Yl=function(){var e=/[^.]+$/.exec(la&&la.keys&&la.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function QR(e){return!!Yl&&Yl in e}var e2=Function.prototype,t2=e2.toString;function er(e){if(e!=null){try{return t2.call(e)}catch{}try{return e+""}catch{}}return""}var r2=/[\\^$.*+?()[\]{}|]/g,n2=/^\[object .+?Constructor\]$/,o2=Function.prototype,a2=Object.prototype,i2=o2.toString,s2=a2.hasOwnProperty,l2=RegExp("^"+i2.call(s2).replace(r2,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function c2(e){if(!Je(e)||QR(e))return!1;var t=Ii(e)?l2:n2;return t.test(er(e))}function u2(e,t){return e==null?void 0:e[t]}function tr(e,t){var r=u2(e,t);return c2(r)?r:void 0}var dn=tr(at,"Map"),pn=tr(Object,"create");function f2(){this.__data__=pn?pn(null):{},this.size=0}function d2(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var p2="__lodash_hash_undefined__",h2=Object.prototype,g2=h2.hasOwnProperty;function v2(e){var t=this.__data__;if(pn){var r=t[e];return r===p2?void 0:r}return g2.call(t,e)?t[e]:void 0}var b2=Object.prototype,m2=b2.hasOwnProperty;function y2(e){var t=this.__data__;return pn?t[e]!==void 0:m2.call(t,e)}var x2="__lodash_hash_undefined__";function w2(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=pn&&t===void 0?x2:t,this}function Xt(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}Xt.prototype.clear=f2;Xt.prototype.delete=d2;Xt.prototype.get=v2;Xt.prototype.has=y2;Xt.prototype.set=w2;function E2(){this.size=0,this.__data__={hash:new Xt,map:new(dn||Ct),string:new Xt}}function S2(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}function Po(e,t){var r=e.__data__;return S2(t)?r[typeof t=="string"?"string":"hash"]:r.map}function C2(e){var t=Po(this,e).delete(e);return this.size-=t?1:0,t}function _2(e){return Po(this,e).get(e)}function $2(e){return Po(this,e).has(e)}function T2(e,t){var r=Po(this,e),n=r.size;return r.set(e,t),this.size+=r.size==n?0:1,this}function _t(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}_t.prototype.clear=E2;_t.prototype.delete=C2;_t.prototype.get=_2;_t.prototype.has=$2;_t.prototype.set=T2;var A2=200;function O2(e,t){var r=this.__data__;if(r instanceof Ct){var n=r.__data__;if(!dn||n.length<A2-1)return n.push([e,t]),this.size=++r.size,this;r=this.__data__=new _t(n)}return r.set(e,t),this.size=r.size,this}function ft(e){var t=this.__data__=new Ct(e);this.size=t.size}ft.prototype.clear=jR;ft.prototype.delete=IR;ft.prototype.get=FR;ft.prototype.has=LR;ft.prototype.set=O2;var oo=function(){try{var e=tr(Object,"defineProperty");return e({},"",{}),e}catch{}}();function Fi(e,t,r){t=="__proto__"&&oo?oo(e,t,{configurable:!0,enumerable:!0,value:r,writable:!0}):e[t]=r}function ka(e,t,r){(r!==void 0&&!_n(e[t],r)||r===void 0&&!(t in e))&&Fi(e,t,r)}function R2(e){return function(t,r,n){for(var o=-1,a=Object(t),i=n(t),s=i.length;s--;){var l=i[++o];if(r(a[l],l,a)===!1)break}return t}}var Dd=R2(),kd=typeof exports=="object"&&exports&&!exports.nodeType&&exports,Kl=kd&&typeof module=="object"&&module&&!module.nodeType&&module,P2=Kl&&Kl.exports===kd,ql=P2?at.Buffer:void 0;ql&&ql.allocUnsafe;function M2(e,t){return e.slice()}var ao=at.Uint8Array;function N2(e){var t=new e.constructor(e.byteLength);return new ao(t).set(new ao(e)),t}function D2(e,t){var r=N2(e.buffer);return new e.constructor(r,e.byteOffset,e.length)}function k2(e,t){var r=-1,n=e.length;for(t||(t=Array(n));++r<n;)t[r]=e[r];return t}var Xl=Object.create,j2=function(){function e(){}return function(t){if(!Je(t))return{};if(Xl)return Xl(t);e.prototype=t;var r=new e;return e.prototype=void 0,r}}();function jd(e,t){return function(r){return e(t(r))}}var Id=jd(Object.getPrototypeOf,Object),I2=Object.prototype;function Li(e){var t=e&&e.constructor,r=typeof t=="function"&&t.prototype||I2;return e===r}function F2(e){return typeof e.constructor=="function"&&!Li(e)?j2(Id(e)):{}}function Ht(e){return e!=null&&typeof e=="object"}var L2="[object Arguments]";function Jl(e){return Ht(e)&&Qt(e)==L2}var Fd=Object.prototype,B2=Fd.hasOwnProperty,H2=Fd.propertyIsEnumerable,io=Jl(function(){return arguments}())?Jl:function(e){return Ht(e)&&B2.call(e,"callee")&&!H2.call(e,"callee")},Ye=Array.isArray,z2=9007199254740991;function Bi(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=z2}function zr(e){return e!=null&&Bi(e.length)&&!Ii(e)}function U2(e){return Ht(e)&&zr(e)}function G2(){return!1}var Ld=typeof exports=="object"&&exports&&!exports.nodeType&&exports,Zl=Ld&&typeof module=="object"&&module&&!module.nodeType&&module,W2=Zl&&Zl.exports===Ld,Ql=W2?at.Buffer:void 0,V2=Ql?Ql.isBuffer:void 0,so=V2||G2,Y2="[object Object]",K2=Function.prototype,q2=Object.prototype,Bd=K2.toString,X2=q2.hasOwnProperty,J2=Bd.call(Object);function Z2(e){if(!Ht(e)||Qt(e)!=Y2)return!1;var t=Id(e);if(t===null)return!0;var r=X2.call(t,"constructor")&&t.constructor;return typeof r=="function"&&r instanceof r&&Bd.call(r)==J2}var Q2="[object Arguments]",eP="[object Array]",tP="[object Boolean]",rP="[object Date]",nP="[object Error]",oP="[object Function]",aP="[object Map]",iP="[object Number]",sP="[object Object]",lP="[object RegExp]",cP="[object Set]",uP="[object String]",fP="[object WeakMap]",dP="[object ArrayBuffer]",pP="[object DataView]",hP="[object Float32Array]",gP="[object Float64Array]",vP="[object Int8Array]",bP="[object Int16Array]",mP="[object Int32Array]",yP="[object Uint8Array]",xP="[object Uint8ClampedArray]",wP="[object Uint16Array]",EP="[object Uint32Array]",Ee={};Ee[hP]=Ee[gP]=Ee[vP]=Ee[bP]=Ee[mP]=Ee[yP]=Ee[xP]=Ee[wP]=Ee[EP]=!0;Ee[Q2]=Ee[eP]=Ee[dP]=Ee[tP]=Ee[pP]=Ee[rP]=Ee[nP]=Ee[oP]=Ee[aP]=Ee[iP]=Ee[sP]=Ee[lP]=Ee[cP]=Ee[uP]=Ee[fP]=!1;function SP(e){return Ht(e)&&Bi(e.length)&&!!Ee[Qt(e)]}function CP(e){return function(t){return e(t)}}var Hd=typeof exports=="object"&&exports&&!exports.nodeType&&exports,cn=Hd&&typeof module=="object"&&module&&!module.nodeType&&module,_P=cn&&cn.exports===Hd,ca=_P&&Md.process,ec=function(){try{var e=cn&&cn.require&&cn.require("util").types;return e||ca&&ca.binding&&ca.binding("util")}catch{}}(),tc=ec&&ec.isTypedArray,Hi=tc?CP(tc):SP;function ja(e,t){if(!(t==="constructor"&&typeof e[t]=="function")&&t!="__proto__")return e[t]}var $P=Object.prototype,TP=$P.hasOwnProperty;function AP(e,t,r){var n=e[t];(!(TP.call(e,t)&&_n(n,r))||r===void 0&&!(t in e))&&Fi(e,t,r)}function OP(e,t,r,n){var o=!r;r||(r={});for(var a=-1,i=t.length;++a<i;){var s=t[a],l=void 0;l===void 0&&(l=e[s]),o?Fi(r,s,l):AP(r,s,l)}return r}function RP(e,t){for(var r=-1,n=Array(e);++r<e;)n[r]=t(r);return n}var PP=9007199254740991,MP=/^(?:0|[1-9]\d*)$/;function zi(e,t){var r=typeof e;return t=t??PP,!!t&&(r=="number"||r!="symbol"&&MP.test(e))&&e>-1&&e%1==0&&e<t}var NP=Object.prototype,DP=NP.hasOwnProperty;function zd(e,t){var r=Ye(e),n=!r&&io(e),o=!r&&!n&&so(e),a=!r&&!n&&!o&&Hi(e),i=r||n||o||a,s=i?RP(e.length,String):[],l=s.length;for(var c in e)(t||DP.call(e,c))&&!(i&&(c=="length"||o&&(c=="offset"||c=="parent")||a&&(c=="buffer"||c=="byteLength"||c=="byteOffset")||zi(c,l)))&&s.push(c);return s}function kP(e){var t=[];if(e!=null)for(var r in Object(e))t.push(r);return t}var jP=Object.prototype,IP=jP.hasOwnProperty;function FP(e){if(!Je(e))return kP(e);var t=Li(e),r=[];for(var n in e)n=="constructor"&&(t||!IP.call(e,n))||r.push(n);return r}function Ud(e){return zr(e)?zd(e,!0):FP(e)}function LP(e){return OP(e,Ud(e))}function BP(e,t,r,n,o,a,i){var s=ja(e,r),l=ja(t,r),c=i.get(l);if(c){ka(e,r,c);return}var u=a?a(s,l,r+"",e,t,i):void 0,p=u===void 0;if(p){var f=Ye(l),h=!f&&so(l),b=!f&&!h&&Hi(l);u=l,f||h||b?Ye(s)?u=s:U2(s)?u=k2(s):h?(p=!1,u=M2(l)):b?(p=!1,u=D2(l)):u=[]:Z2(l)||io(l)?(u=s,io(s)?u=LP(s):(!Je(s)||Ii(s))&&(u=F2(l))):p=!1}p&&(i.set(l,u),o(u,l,n,a,i),i.delete(l)),ka(e,r,u)}function Gd(e,t,r,n,o){e!==t&&Dd(t,function(a,i){if(o||(o=new ft),Je(a))BP(e,t,i,r,Gd,n,o);else{var s=n?n(ja(e,i),a,i+"",e,t,o):void 0;s===void 0&&(s=a),ka(e,i,s)}},Ud)}function Mo(e){return e}function HP(e,t,r){switch(r.length){case 0:return e.call(t);case 1:return e.call(t,r[0]);case 2:return e.call(t,r[0],r[1]);case 3:return e.call(t,r[0],r[1],r[2])}return e.apply(t,r)}var rc=Math.max;function zP(e,t,r){return t=rc(t===void 0?e.length-1:t,0),function(){for(var n=arguments,o=-1,a=rc(n.length-t,0),i=Array(a);++o<a;)i[o]=n[t+o];o=-1;for(var s=Array(t+1);++o<t;)s[o]=n[o];return s[t]=r(i),HP(e,this,s)}}function UP(e){return function(){return e}}var GP=oo?function(e,t){return oo(e,"toString",{configurable:!0,enumerable:!1,value:UP(t),writable:!0})}:Mo,WP=800,VP=16,YP=Date.now;function KP(e){var t=0,r=0;return function(){var n=YP(),o=VP-(n-r);if(r=n,o>0){if(++t>=WP)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}var qP=KP(GP);function XP(e,t){return qP(zP(e,t,Mo),e+"")}function JP(e,t,r){if(!Je(r))return!1;var n=typeof t;return(n=="number"?zr(r)&&zi(t,r.length):n=="string"&&t in r)?_n(r[t],e):!1}function ZP(e){return XP(function(t,r){var n=-1,o=r.length,a=o>1?r[o-1]:void 0,i=o>2?r[2]:void 0;for(a=e.length>3&&typeof a=="function"?(o--,a):void 0,i&&JP(r[0],r[1],i)&&(a=o<3?void 0:a,o=1),t=Object(t);++n<o;){var s=r[n];s&&e(t,s,n,a)}return t})}var He=ZP(function(e,t,r){Gd(e,t,r)}),$n=function(t){var r=t.zDepth,n=t.radius,o=t.background,a=t.children,i=t.styles,s=i===void 0?{}:i,l=ee(He({default:{wrap:{position:"relative",display:"inline-block"},content:{position:"relative"},bg:{absolute:"0px 0px 0px 0px",boxShadow:"0 "+r+"px "+r*4+"px rgba(0,0,0,.24)",borderRadius:n,background:o}},"zDepth-0":{bg:{boxShadow:"none"}},"zDepth-1":{bg:{boxShadow:"0 2px 10px rgba(0,0,0,.12), 0 2px 5px rgba(0,0,0,.16)"}},"zDepth-2":{bg:{boxShadow:"0 6px 20px rgba(0,0,0,.19), 0 8px 17px rgba(0,0,0,.2)"}},"zDepth-3":{bg:{boxShadow:"0 17px 50px rgba(0,0,0,.19), 0 12px 15px rgba(0,0,0,.24)"}},"zDepth-4":{bg:{boxShadow:"0 25px 55px rgba(0,0,0,.21), 0 16px 28px rgba(0,0,0,.22)"}},"zDepth-5":{bg:{boxShadow:"0 40px 77px rgba(0,0,0,.22), 0 27px 24px rgba(0,0,0,.2)"}},square:{bg:{borderRadius:"0"}},circle:{bg:{borderRadius:"50%"}}},s),{"zDepth-1":r===1});return d.createElement("div",{style:l.wrap},d.createElement("div",{style:l.bg}),d.createElement("div",{style:l.content},a))};$n.propTypes={background:P.string,zDepth:P.oneOf([0,1,2,3,4,5]),radius:P.number,styles:P.object};$n.defaultProps={background:"#fff",zDepth:1,radius:2,styles:{}};var ua=function(){return at.Date.now()},QP=/\s/;function eM(e){for(var t=e.length;t--&&QP.test(e.charAt(t)););return t}var tM=/^\s+/;function rM(e){return e&&e.slice(0,eM(e)+1).replace(tM,"")}var nM="[object Symbol]";function No(e){return typeof e=="symbol"||Ht(e)&&Qt(e)==nM}var nc=NaN,oM=/^[-+]0x[0-9a-f]+$/i,aM=/^0b[01]+$/i,iM=/^0o[0-7]+$/i,sM=parseInt;function oc(e){if(typeof e=="number")return e;if(No(e))return nc;if(Je(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=Je(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=rM(e);var r=aM.test(e);return r||iM.test(e)?sM(e.slice(2),r?2:8):oM.test(e)?nc:+e}var lM="Expected a function",cM=Math.max,uM=Math.min;function Wd(e,t,r){var n,o,a,i,s,l,c=0,u=!1,p=!1,f=!0;if(typeof e!="function")throw new TypeError(lM);t=oc(t)||0,Je(r)&&(u=!!r.leading,p="maxWait"in r,a=p?cM(oc(r.maxWait)||0,t):a,f="trailing"in r?!!r.trailing:f);function h(O){var M=n,I=o;return n=o=void 0,c=O,i=e.apply(I,M),i}function b(O){return c=O,s=setTimeout(w,t),u?h(O):i}function g(O){var M=O-l,I=O-c,U=t-M;return p?uM(U,a-I):U}function m(O){var M=O-l,I=O-c;return l===void 0||M>=t||M<0||p&&I>=a}function w(){var O=ua();if(m(O))return C(O);s=setTimeout(w,g(O))}function C(O){return s=void 0,f&&n?h(O):(n=o=void 0,i)}function E(){s!==void 0&&clearTimeout(s),c=0,n=l=o=s=void 0}function _(){return s===void 0?i:C(ua())}function S(){var O=ua(),M=m(O);if(n=arguments,o=this,l=O,M){if(s===void 0)return b(l);if(p)return clearTimeout(s),s=setTimeout(w,t),h(l)}return s===void 0&&(s=setTimeout(w,t)),i}return S.cancel=E,S.flush=_,S}var fM="Expected a function";function dM(e,t,r){var n=!0,o=!0;if(typeof e!="function")throw new TypeError(fM);return Je(r)&&(n="leading"in r?!!r.leading:n,o="trailing"in r?!!r.trailing:o),Wd(e,t,{leading:n,maxWait:t,trailing:o})}var pM=function(t,r,n){var o=n.getBoundingClientRect(),a=o.width,i=o.height,s=typeof t.pageX=="number"?t.pageX:t.touches[0].pageX,l=typeof t.pageY=="number"?t.pageY:t.touches[0].pageY,c=s-(n.getBoundingClientRect().left+window.pageXOffset),u=l-(n.getBoundingClientRect().top+window.pageYOffset);c<0?c=0:c>a&&(c=a),u<0?u=0:u>i&&(u=i);var p=c/a,f=1-u/i;return{h:r.h,s:p,v:f,a:r.a,source:"hsv"}},hM=function(){function e(t,r){for(var n=0;n<r.length;n++){var o=r[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}();function gM(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function vM(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t&&(typeof t=="object"||typeof t=="function")?t:e}function bM(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var Do=function(e){bM(t,e);function t(r){gM(this,t);var n=vM(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,r));return n.handleChange=function(o){typeof n.props.onChange=="function"&&n.throttle(n.props.onChange,pM(o,n.props.hsl,n.container),o)},n.handleMouseDown=function(o){n.handleChange(o);var a=n.getContainerRenderWindow();a.addEventListener("mousemove",n.handleChange),a.addEventListener("mouseup",n.handleMouseUp)},n.handleMouseUp=function(){n.unbindEventListeners()},n.throttle=dM(function(o,a,i){o(a,i)},50),n}return hM(t,[{key:"componentWillUnmount",value:function(){this.throttle.cancel(),this.unbindEventListeners()}},{key:"getContainerRenderWindow",value:function(){for(var n=this.container,o=window;!o.document.contains(n)&&o.parent!==o;)o=o.parent;return o}},{key:"unbindEventListeners",value:function(){var n=this.getContainerRenderWindow();n.removeEventListener("mousemove",this.handleChange),n.removeEventListener("mouseup",this.handleMouseUp)}},{key:"render",value:function(){var n=this,o=this.props.style||{},a=o.color,i=o.white,s=o.black,l=o.pointer,c=o.circle,u=ee({default:{color:{absolute:"0px 0px 0px 0px",background:"hsl("+this.props.hsl.h+",100%, 50%)",borderRadius:this.props.radius},white:{absolute:"0px 0px 0px 0px",borderRadius:this.props.radius},black:{absolute:"0px 0px 0px 0px",boxShadow:this.props.shadow,borderRadius:this.props.radius},pointer:{position:"absolute",top:-(this.props.hsv.v*100)+100+"%",left:this.props.hsv.s*100+"%",cursor:"default"},circle:{width:"4px",height:"4px",boxShadow:`0 0 0 1.5px #fff, inset 0 0 1px 1px rgba(0,0,0,.3),
|
|
161
|
+
0 0 1px 2px rgba(0,0,0,.4)`,borderRadius:"50%",cursor:"hand",transform:"translate(-2px, -2px)"}},custom:{color:a,white:i,black:s,pointer:l,circle:c}},{custom:!!this.props.style});return d.createElement("div",{style:u.color,ref:function(f){return n.container=f},onMouseDown:this.handleMouseDown,onTouchMove:this.handleChange,onTouchStart:this.handleChange},d.createElement("style",null,`
|
|
162
|
+
.saturation-white {
|
|
163
|
+
background: -webkit-linear-gradient(to right, #fff, rgba(255,255,255,0));
|
|
164
|
+
background: linear-gradient(to right, #fff, rgba(255,255,255,0));
|
|
165
|
+
}
|
|
166
|
+
.saturation-black {
|
|
167
|
+
background: -webkit-linear-gradient(to top, #000, rgba(0,0,0,0));
|
|
168
|
+
background: linear-gradient(to top, #000, rgba(0,0,0,0));
|
|
169
|
+
}
|
|
170
|
+
`),d.createElement("div",{style:u.white,className:"saturation-white"},d.createElement("div",{style:u.black,className:"saturation-black"}),d.createElement("div",{style:u.pointer},this.props.pointer?d.createElement(this.props.pointer,this.props):d.createElement("div",{style:u.circle}))))}}]),t}(d.PureComponent||d.Component);function mM(e,t){for(var r=-1,n=e==null?0:e.length;++r<n&&t(e[r],r,e)!==!1;);return e}var yM=jd(Object.keys,Object),xM=Object.prototype,wM=xM.hasOwnProperty;function EM(e){if(!Li(e))return yM(e);var t=[];for(var r in Object(e))wM.call(e,r)&&r!="constructor"&&t.push(r);return t}function Ui(e){return zr(e)?zd(e):EM(e)}function SM(e,t){return e&&Dd(e,t,Ui)}function CM(e,t){return function(r,n){if(r==null)return r;if(!zr(r))return e(r,n);for(var o=r.length,a=-1,i=Object(r);++a<o&&n(i[a],a,i)!==!1;);return r}}var Vd=CM(SM);function _M(e){return typeof e=="function"?e:Mo}function $M(e,t){var r=Ye(e)?mM:Vd;return r(e,_M(t))}function lo(e){"@babel/helpers - typeof";return lo=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},lo(e)}var TM=/^\s+/,AM=/\s+$/;function B(e,t){if(e=e||"",t=t||{},e instanceof B)return e;if(!(this instanceof B))return new B(e,t);var r=OM(e);this._originalInput=e,this._r=r.r,this._g=r.g,this._b=r.b,this._a=r.a,this._roundA=Math.round(100*this._a)/100,this._format=t.format||r.format,this._gradientType=t.gradientType,this._r<1&&(this._r=Math.round(this._r)),this._g<1&&(this._g=Math.round(this._g)),this._b<1&&(this._b=Math.round(this._b)),this._ok=r.ok}B.prototype={isDark:function(){return this.getBrightness()<128},isLight:function(){return!this.isDark()},isValid:function(){return this._ok},getOriginalInput:function(){return this._originalInput},getFormat:function(){return this._format},getAlpha:function(){return this._a},getBrightness:function(){var t=this.toRgb();return(t.r*299+t.g*587+t.b*114)/1e3},getLuminance:function(){var t=this.toRgb(),r,n,o,a,i,s;return r=t.r/255,n=t.g/255,o=t.b/255,r<=.03928?a=r/12.92:a=Math.pow((r+.055)/1.055,2.4),n<=.03928?i=n/12.92:i=Math.pow((n+.055)/1.055,2.4),o<=.03928?s=o/12.92:s=Math.pow((o+.055)/1.055,2.4),.2126*a+.7152*i+.0722*s},setAlpha:function(t){return this._a=Yd(t),this._roundA=Math.round(100*this._a)/100,this},toHsv:function(){var t=ic(this._r,this._g,this._b);return{h:t.h*360,s:t.s,v:t.v,a:this._a}},toHsvString:function(){var t=ic(this._r,this._g,this._b),r=Math.round(t.h*360),n=Math.round(t.s*100),o=Math.round(t.v*100);return this._a==1?"hsv("+r+", "+n+"%, "+o+"%)":"hsva("+r+", "+n+"%, "+o+"%, "+this._roundA+")"},toHsl:function(){var t=ac(this._r,this._g,this._b);return{h:t.h*360,s:t.s,l:t.l,a:this._a}},toHslString:function(){var t=ac(this._r,this._g,this._b),r=Math.round(t.h*360),n=Math.round(t.s*100),o=Math.round(t.l*100);return this._a==1?"hsl("+r+", "+n+"%, "+o+"%)":"hsla("+r+", "+n+"%, "+o+"%, "+this._roundA+")"},toHex:function(t){return sc(this._r,this._g,this._b,t)},toHexString:function(t){return"#"+this.toHex(t)},toHex8:function(t){return NM(this._r,this._g,this._b,this._a,t)},toHex8String:function(t){return"#"+this.toHex8(t)},toRgb:function(){return{r:Math.round(this._r),g:Math.round(this._g),b:Math.round(this._b),a:this._a}},toRgbString:function(){return this._a==1?"rgb("+Math.round(this._r)+", "+Math.round(this._g)+", "+Math.round(this._b)+")":"rgba("+Math.round(this._r)+", "+Math.round(this._g)+", "+Math.round(this._b)+", "+this._roundA+")"},toPercentageRgb:function(){return{r:Math.round(_e(this._r,255)*100)+"%",g:Math.round(_e(this._g,255)*100)+"%",b:Math.round(_e(this._b,255)*100)+"%",a:this._a}},toPercentageRgbString:function(){return this._a==1?"rgb("+Math.round(_e(this._r,255)*100)+"%, "+Math.round(_e(this._g,255)*100)+"%, "+Math.round(_e(this._b,255)*100)+"%)":"rgba("+Math.round(_e(this._r,255)*100)+"%, "+Math.round(_e(this._g,255)*100)+"%, "+Math.round(_e(this._b,255)*100)+"%, "+this._roundA+")"},toName:function(){return this._a===0?"transparent":this._a<1?!1:WM[sc(this._r,this._g,this._b,!0)]||!1},toFilter:function(t){var r="#"+lc(this._r,this._g,this._b,this._a),n=r,o=this._gradientType?"GradientType = 1, ":"";if(t){var a=B(t);n="#"+lc(a._r,a._g,a._b,a._a)}return"progid:DXImageTransform.Microsoft.gradient("+o+"startColorstr="+r+",endColorstr="+n+")"},toString:function(t){var r=!!t;t=t||this._format;var n=!1,o=this._a<1&&this._a>=0,a=!r&&o&&(t==="hex"||t==="hex6"||t==="hex3"||t==="hex4"||t==="hex8"||t==="name");return a?t==="name"&&this._a===0?this.toName():this.toRgbString():(t==="rgb"&&(n=this.toRgbString()),t==="prgb"&&(n=this.toPercentageRgbString()),(t==="hex"||t==="hex6")&&(n=this.toHexString()),t==="hex3"&&(n=this.toHexString(!0)),t==="hex4"&&(n=this.toHex8String(!0)),t==="hex8"&&(n=this.toHex8String()),t==="name"&&(n=this.toName()),t==="hsl"&&(n=this.toHslString()),t==="hsv"&&(n=this.toHsvString()),n||this.toHexString())},clone:function(){return B(this.toString())},_applyModification:function(t,r){var n=t.apply(null,[this].concat([].slice.call(r)));return this._r=n._r,this._g=n._g,this._b=n._b,this.setAlpha(n._a),this},lighten:function(){return this._applyModification(IM,arguments)},brighten:function(){return this._applyModification(FM,arguments)},darken:function(){return this._applyModification(LM,arguments)},desaturate:function(){return this._applyModification(DM,arguments)},saturate:function(){return this._applyModification(kM,arguments)},greyscale:function(){return this._applyModification(jM,arguments)},spin:function(){return this._applyModification(BM,arguments)},_applyCombination:function(t,r){return t.apply(null,[this].concat([].slice.call(r)))},analogous:function(){return this._applyCombination(UM,arguments)},complement:function(){return this._applyCombination(HM,arguments)},monochromatic:function(){return this._applyCombination(GM,arguments)},splitcomplement:function(){return this._applyCombination(zM,arguments)},triad:function(){return this._applyCombination(cc,[3])},tetrad:function(){return this._applyCombination(cc,[4])}};B.fromRatio=function(e,t){if(lo(e)=="object"){var r={};for(var n in e)e.hasOwnProperty(n)&&(n==="a"?r[n]=e[n]:r[n]=on(e[n]));e=r}return B(e,t)};function OM(e){var t={r:0,g:0,b:0},r=1,n=null,o=null,a=null,i=!1,s=!1;return typeof e=="string"&&(e=qM(e)),lo(e)=="object"&&(bt(e.r)&&bt(e.g)&&bt(e.b)?(t=RM(e.r,e.g,e.b),i=!0,s=String(e.r).substr(-1)==="%"?"prgb":"rgb"):bt(e.h)&&bt(e.s)&&bt(e.v)?(n=on(e.s),o=on(e.v),t=MM(e.h,n,o),i=!0,s="hsv"):bt(e.h)&&bt(e.s)&&bt(e.l)&&(n=on(e.s),a=on(e.l),t=PM(e.h,n,a),i=!0,s="hsl"),e.hasOwnProperty("a")&&(r=e.a)),r=Yd(r),{ok:i,format:e.format||s,r:Math.min(255,Math.max(t.r,0)),g:Math.min(255,Math.max(t.g,0)),b:Math.min(255,Math.max(t.b,0)),a:r}}function RM(e,t,r){return{r:_e(e,255)*255,g:_e(t,255)*255,b:_e(r,255)*255}}function ac(e,t,r){e=_e(e,255),t=_e(t,255),r=_e(r,255);var n=Math.max(e,t,r),o=Math.min(e,t,r),a,i,s=(n+o)/2;if(n==o)a=i=0;else{var l=n-o;switch(i=s>.5?l/(2-n-o):l/(n+o),n){case e:a=(t-r)/l+(t<r?6:0);break;case t:a=(r-e)/l+2;break;case r:a=(e-t)/l+4;break}a/=6}return{h:a,s:i,l:s}}function PM(e,t,r){var n,o,a;e=_e(e,360),t=_e(t,100),r=_e(r,100);function i(c,u,p){return p<0&&(p+=1),p>1&&(p-=1),p<1/6?c+(u-c)*6*p:p<1/2?u:p<2/3?c+(u-c)*(2/3-p)*6:c}if(t===0)n=o=a=r;else{var s=r<.5?r*(1+t):r+t-r*t,l=2*r-s;n=i(l,s,e+1/3),o=i(l,s,e),a=i(l,s,e-1/3)}return{r:n*255,g:o*255,b:a*255}}function ic(e,t,r){e=_e(e,255),t=_e(t,255),r=_e(r,255);var n=Math.max(e,t,r),o=Math.min(e,t,r),a,i,s=n,l=n-o;if(i=n===0?0:l/n,n==o)a=0;else{switch(n){case e:a=(t-r)/l+(t<r?6:0);break;case t:a=(r-e)/l+2;break;case r:a=(e-t)/l+4;break}a/=6}return{h:a,s:i,v:s}}function MM(e,t,r){e=_e(e,360)*6,t=_e(t,100),r=_e(r,100);var n=Math.floor(e),o=e-n,a=r*(1-t),i=r*(1-o*t),s=r*(1-(1-o)*t),l=n%6,c=[r,i,a,a,s,r][l],u=[s,r,r,i,a,a][l],p=[a,a,s,r,r,i][l];return{r:c*255,g:u*255,b:p*255}}function sc(e,t,r,n){var o=[et(Math.round(e).toString(16)),et(Math.round(t).toString(16)),et(Math.round(r).toString(16))];return n&&o[0].charAt(0)==o[0].charAt(1)&&o[1].charAt(0)==o[1].charAt(1)&&o[2].charAt(0)==o[2].charAt(1)?o[0].charAt(0)+o[1].charAt(0)+o[2].charAt(0):o.join("")}function NM(e,t,r,n,o){var a=[et(Math.round(e).toString(16)),et(Math.round(t).toString(16)),et(Math.round(r).toString(16)),et(Kd(n))];return o&&a[0].charAt(0)==a[0].charAt(1)&&a[1].charAt(0)==a[1].charAt(1)&&a[2].charAt(0)==a[2].charAt(1)&&a[3].charAt(0)==a[3].charAt(1)?a[0].charAt(0)+a[1].charAt(0)+a[2].charAt(0)+a[3].charAt(0):a.join("")}function lc(e,t,r,n){var o=[et(Kd(n)),et(Math.round(e).toString(16)),et(Math.round(t).toString(16)),et(Math.round(r).toString(16))];return o.join("")}B.equals=function(e,t){return!e||!t?!1:B(e).toRgbString()==B(t).toRgbString()};B.random=function(){return B.fromRatio({r:Math.random(),g:Math.random(),b:Math.random()})};function DM(e,t){t=t===0?0:t||10;var r=B(e).toHsl();return r.s-=t/100,r.s=ko(r.s),B(r)}function kM(e,t){t=t===0?0:t||10;var r=B(e).toHsl();return r.s+=t/100,r.s=ko(r.s),B(r)}function jM(e){return B(e).desaturate(100)}function IM(e,t){t=t===0?0:t||10;var r=B(e).toHsl();return r.l+=t/100,r.l=ko(r.l),B(r)}function FM(e,t){t=t===0?0:t||10;var r=B(e).toRgb();return r.r=Math.max(0,Math.min(255,r.r-Math.round(255*-(t/100)))),r.g=Math.max(0,Math.min(255,r.g-Math.round(255*-(t/100)))),r.b=Math.max(0,Math.min(255,r.b-Math.round(255*-(t/100)))),B(r)}function LM(e,t){t=t===0?0:t||10;var r=B(e).toHsl();return r.l-=t/100,r.l=ko(r.l),B(r)}function BM(e,t){var r=B(e).toHsl(),n=(r.h+t)%360;return r.h=n<0?360+n:n,B(r)}function HM(e){var t=B(e).toHsl();return t.h=(t.h+180)%360,B(t)}function cc(e,t){if(isNaN(t)||t<=0)throw new Error("Argument to polyad must be a positive number");for(var r=B(e).toHsl(),n=[B(e)],o=360/t,a=1;a<t;a++)n.push(B({h:(r.h+a*o)%360,s:r.s,l:r.l}));return n}function zM(e){var t=B(e).toHsl(),r=t.h;return[B(e),B({h:(r+72)%360,s:t.s,l:t.l}),B({h:(r+216)%360,s:t.s,l:t.l})]}function UM(e,t,r){t=t||6,r=r||30;var n=B(e).toHsl(),o=360/r,a=[B(e)];for(n.h=(n.h-(o*t>>1)+720)%360;--t;)n.h=(n.h+o)%360,a.push(B(n));return a}function GM(e,t){t=t||6;for(var r=B(e).toHsv(),n=r.h,o=r.s,a=r.v,i=[],s=1/t;t--;)i.push(B({h:n,s:o,v:a})),a=(a+s)%1;return i}B.mix=function(e,t,r){r=r===0?0:r||50;var n=B(e).toRgb(),o=B(t).toRgb(),a=r/100,i={r:(o.r-n.r)*a+n.r,g:(o.g-n.g)*a+n.g,b:(o.b-n.b)*a+n.b,a:(o.a-n.a)*a+n.a};return B(i)};B.readability=function(e,t){var r=B(e),n=B(t);return(Math.max(r.getLuminance(),n.getLuminance())+.05)/(Math.min(r.getLuminance(),n.getLuminance())+.05)};B.isReadable=function(e,t,r){var n=B.readability(e,t),o,a;switch(a=!1,o=XM(r),o.level+o.size){case"AAsmall":case"AAAlarge":a=n>=4.5;break;case"AAlarge":a=n>=3;break;case"AAAsmall":a=n>=7;break}return a};B.mostReadable=function(e,t,r){var n=null,o=0,a,i,s,l;r=r||{},i=r.includeFallbackColors,s=r.level,l=r.size;for(var c=0;c<t.length;c++)a=B.readability(e,t[c]),a>o&&(o=a,n=B(t[c]));return B.isReadable(e,n,{level:s,size:l})||!i?n:(r.includeFallbackColors=!1,B.mostReadable(e,["#fff","#000"],r))};var Ia=B.names={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"0ff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000",blanchedalmond:"ffebcd",blue:"00f",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",burntsienna:"ea7e5d",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"0ff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkgrey:"a9a9a9",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkslategrey:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dimgrey:"696969",dodgerblue:"1e90ff",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"f0f",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",grey:"808080",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgray:"d3d3d3",lightgreen:"90ee90",lightgrey:"d3d3d3",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslategray:"789",lightslategrey:"789",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"0f0",limegreen:"32cd32",linen:"faf0e6",magenta:"f0f",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370db",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"db7093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",rebeccapurple:"663399",red:"f00",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",slategrey:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",wheat:"f5deb3",white:"fff",whitesmoke:"f5f5f5",yellow:"ff0",yellowgreen:"9acd32"},WM=B.hexNames=VM(Ia);function VM(e){var t={};for(var r in e)e.hasOwnProperty(r)&&(t[e[r]]=r);return t}function Yd(e){return e=parseFloat(e),(isNaN(e)||e<0||e>1)&&(e=1),e}function _e(e,t){YM(e)&&(e="100%");var r=KM(e);return e=Math.min(t,Math.max(0,parseFloat(e))),r&&(e=parseInt(e*t,10)/100),Math.abs(e-t)<1e-6?1:e%t/parseFloat(t)}function ko(e){return Math.min(1,Math.max(0,e))}function Ue(e){return parseInt(e,16)}function YM(e){return typeof e=="string"&&e.indexOf(".")!=-1&&parseFloat(e)===1}function KM(e){return typeof e=="string"&&e.indexOf("%")!=-1}function et(e){return e.length==1?"0"+e:""+e}function on(e){return e<=1&&(e=e*100+"%"),e}function Kd(e){return Math.round(parseFloat(e)*255).toString(16)}function uc(e){return Ue(e)/255}var Qe=function(){var e="[-\\+]?\\d+%?",t="[-\\+]?\\d*\\.\\d+%?",r="(?:"+t+")|(?:"+e+")",n="[\\s|\\(]+("+r+")[,|\\s]+("+r+")[,|\\s]+("+r+")\\s*\\)?",o="[\\s|\\(]+("+r+")[,|\\s]+("+r+")[,|\\s]+("+r+")[,|\\s]+("+r+")\\s*\\)?";return{CSS_UNIT:new RegExp(r),rgb:new RegExp("rgb"+n),rgba:new RegExp("rgba"+o),hsl:new RegExp("hsl"+n),hsla:new RegExp("hsla"+o),hsv:new RegExp("hsv"+n),hsva:new RegExp("hsva"+o),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/}}();function bt(e){return!!Qe.CSS_UNIT.exec(e)}function qM(e){e=e.replace(TM,"").replace(AM,"").toLowerCase();var t=!1;if(Ia[e])e=Ia[e],t=!0;else if(e=="transparent")return{r:0,g:0,b:0,a:0,format:"name"};var r;return(r=Qe.rgb.exec(e))?{r:r[1],g:r[2],b:r[3]}:(r=Qe.rgba.exec(e))?{r:r[1],g:r[2],b:r[3],a:r[4]}:(r=Qe.hsl.exec(e))?{h:r[1],s:r[2],l:r[3]}:(r=Qe.hsla.exec(e))?{h:r[1],s:r[2],l:r[3],a:r[4]}:(r=Qe.hsv.exec(e))?{h:r[1],s:r[2],v:r[3]}:(r=Qe.hsva.exec(e))?{h:r[1],s:r[2],v:r[3],a:r[4]}:(r=Qe.hex8.exec(e))?{r:Ue(r[1]),g:Ue(r[2]),b:Ue(r[3]),a:uc(r[4]),format:t?"name":"hex8"}:(r=Qe.hex6.exec(e))?{r:Ue(r[1]),g:Ue(r[2]),b:Ue(r[3]),format:t?"name":"hex"}:(r=Qe.hex4.exec(e))?{r:Ue(r[1]+""+r[1]),g:Ue(r[2]+""+r[2]),b:Ue(r[3]+""+r[3]),a:uc(r[4]+""+r[4]),format:t?"name":"hex8"}:(r=Qe.hex3.exec(e))?{r:Ue(r[1]+""+r[1]),g:Ue(r[2]+""+r[2]),b:Ue(r[3]+""+r[3]),format:t?"name":"hex"}:!1}function XM(e){var t,r;return e=e||{level:"AA",size:"small"},t=(e.level||"AA").toUpperCase(),r=(e.size||"small").toLowerCase(),t!=="AA"&&t!=="AAA"&&(t="AA"),r!=="small"&&r!=="large"&&(r="small"),{level:t,size:r}}var fc=function(t){var r=["r","g","b","a","h","s","l","v"],n=0,o=0;return $M(r,function(a){if(t[a]&&(n+=1,isNaN(t[a])||(o+=1),a==="s"||a==="l")){var i=/^\d+%$/;i.test(t[a])&&(o+=1)}}),n===o?t:!1},an=function(t,r){var n=t.hex?B(t.hex):B(t),o=n.toHsl(),a=n.toHsv(),i=n.toRgb(),s=n.toHex();o.s===0&&(o.h=r||0,a.h=r||0);var l=s==="000000"&&i.a===0;return{hsl:o,hex:l?"transparent":"#"+s,rgb:i,hsv:a,oldHue:t.h||r||o.h,source:t.source}},Ut=function(t){if(t==="transparent")return!0;var r=String(t).charAt(0)==="#"?1:0;return t.length!==4+r&&t.length<7+r&&B(t).isValid()},Gi=function(t){if(!t)return"#fff";var r=an(t);if(r.hex==="transparent")return"rgba(0,0,0,0.4)";var n=(r.rgb.r*299+r.rgb.g*587+r.rgb.b*114)/1e3;return n>=128?"#000":"#fff"},fa=function(t,r){var n=t.replace("°","");return B(r+" ("+n+")")._ok},tn=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},JM=function(){function e(t,r){for(var n=0;n<r.length;n++){var o=r[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}();function ZM(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function QM(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t&&(typeof t=="object"||typeof t=="function")?t:e}function e5(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var ze=function(t){var r=function(n){e5(o,n);function o(a){ZM(this,o);var i=QM(this,(o.__proto__||Object.getPrototypeOf(o)).call(this));return i.handleChange=function(s,l){var c=fc(s);if(c){var u=an(s,s.h||i.state.oldHue);i.setState(u),i.props.onChangeComplete&&i.debounce(i.props.onChangeComplete,u,l),i.props.onChange&&i.props.onChange(u,l)}},i.handleSwatchHover=function(s,l){var c=fc(s);if(c){var u=an(s,s.h||i.state.oldHue);i.props.onSwatchHover&&i.props.onSwatchHover(u,l)}},i.state=tn({},an(a.color,0)),i.debounce=Wd(function(s,l,c){s(l,c)},100),i}return JM(o,[{key:"render",value:function(){var i={};return this.props.onSwatchHover&&(i.onSwatchHover=this.handleSwatchHover),d.createElement(t,tn({},this.props,this.state,{onChange:this.handleChange},i))}}],[{key:"getDerivedStateFromProps",value:function(i,s){return tn({},an(i.color,s.oldHue))}}]),o}(d.PureComponent||d.Component);return r.propTypes=tn({},t.propTypes),r.defaultProps=tn({},t.defaultProps,{color:{h:250,s:.5,l:.2,a:1}}),r},t5=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},r5=function(){function e(t,r){for(var n=0;n<r.length;n++){var o=r[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}();function n5(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function dc(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t&&(typeof t=="object"||typeof t=="function")?t:e}function o5(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var a5=function(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"span";return function(n){o5(o,n);function o(){var a,i,s,l;n5(this,o);for(var c=arguments.length,u=Array(c),p=0;p<c;p++)u[p]=arguments[p];return l=(i=(s=dc(this,(a=o.__proto__||Object.getPrototypeOf(o)).call.apply(a,[this].concat(u))),s),s.state={focus:!1},s.handleFocus=function(){return s.setState({focus:!0})},s.handleBlur=function(){return s.setState({focus:!1})},i),dc(s,l)}return r5(o,[{key:"render",value:function(){return d.createElement(r,{onFocus:this.handleFocus,onBlur:this.handleBlur},d.createElement(t,t5({},this.props,this.state)))}}]),o}(d.Component)},pc=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},i5=13,s5=function(t){var r=t.color,n=t.style,o=t.onClick,a=o===void 0?function(){}:o,i=t.onHover,s=t.title,l=s===void 0?r:s,c=t.children,u=t.focus,p=t.focusStyle,f=p===void 0?{}:p,h=r==="transparent",b=ee({default:{swatch:pc({background:r,height:"100%",width:"100%",cursor:"pointer",position:"relative",outline:"none"},n,u?f:{})}}),g=function(_){return a(r,_)},m=function(_){return _.keyCode===i5&&a(r,_)},w=function(_){return i(r,_)},C={};return i&&(C.onMouseOver=w),d.createElement("div",pc({style:b.swatch,onClick:g,title:l,tabIndex:0,onKeyDown:m},C),c,h&&d.createElement(Br,{borderRadius:b.swatch.borderRadius,boxShadow:"inset 0 0 0 1px rgba(0,0,0,0.1)"}))};const rr=a5(s5);var l5=function(t){var r=t.direction,n=ee({default:{picker:{width:"18px",height:"18px",borderRadius:"50%",transform:"translate(-9px, -1px)",backgroundColor:"rgb(248, 248, 248)",boxShadow:"0 1px 4px 0 rgba(0, 0, 0, 0.37)"}},vertical:{picker:{transform:"translate(-3px, -9px)"}}},{vertical:r==="vertical"});return d.createElement("div",{style:n.picker})},c5=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},qd=function(t){var r=t.rgb,n=t.hsl,o=t.width,a=t.height,i=t.onChange,s=t.direction,l=t.style,c=t.renderers,u=t.pointer,p=t.className,f=p===void 0?"":p,h=ee({default:{picker:{position:"relative",width:o,height:a},alpha:{radius:"2px",style:l}}});return d.createElement("div",{style:h.picker,className:"alpha-picker "+f},d.createElement(ki,c5({},h.alpha,{rgb:r,hsl:n,pointer:u,renderers:c,onChange:i,direction:s})))};qd.defaultProps={width:"316px",height:"16px",direction:"horizontal",pointer:l5};ze(qd);function Xd(e,t){for(var r=-1,n=e==null?0:e.length,o=Array(n);++r<n;)o[r]=t(e[r],r,e);return o}var u5="__lodash_hash_undefined__";function f5(e){return this.__data__.set(e,u5),this}function d5(e){return this.__data__.has(e)}function co(e){var t=-1,r=e==null?0:e.length;for(this.__data__=new _t;++t<r;)this.add(e[t])}co.prototype.add=co.prototype.push=f5;co.prototype.has=d5;function p5(e,t){for(var r=-1,n=e==null?0:e.length;++r<n;)if(t(e[r],r,e))return!0;return!1}function h5(e,t){return e.has(t)}var g5=1,v5=2;function Jd(e,t,r,n,o,a){var i=r&g5,s=e.length,l=t.length;if(s!=l&&!(i&&l>s))return!1;var c=a.get(e),u=a.get(t);if(c&&u)return c==t&&u==e;var p=-1,f=!0,h=r&v5?new co:void 0;for(a.set(e,t),a.set(t,e);++p<s;){var b=e[p],g=t[p];if(n)var m=i?n(g,b,p,t,e,a):n(b,g,p,e,t,a);if(m!==void 0){if(m)continue;f=!1;break}if(h){if(!p5(t,function(w,C){if(!h5(h,C)&&(b===w||o(b,w,r,n,a)))return h.push(C)})){f=!1;break}}else if(!(b===g||o(b,g,r,n,a))){f=!1;break}}return a.delete(e),a.delete(t),f}function b5(e){var t=-1,r=Array(e.size);return e.forEach(function(n,o){r[++t]=[o,n]}),r}function m5(e){var t=-1,r=Array(e.size);return e.forEach(function(n){r[++t]=n}),r}var y5=1,x5=2,w5="[object Boolean]",E5="[object Date]",S5="[object Error]",C5="[object Map]",_5="[object Number]",$5="[object RegExp]",T5="[object Set]",A5="[object String]",O5="[object Symbol]",R5="[object ArrayBuffer]",P5="[object DataView]",hc=Bt?Bt.prototype:void 0,da=hc?hc.valueOf:void 0;function M5(e,t,r,n,o,a,i){switch(r){case P5:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case R5:return!(e.byteLength!=t.byteLength||!a(new ao(e),new ao(t)));case w5:case E5:case _5:return _n(+e,+t);case S5:return e.name==t.name&&e.message==t.message;case $5:case A5:return e==t+"";case C5:var s=b5;case T5:var l=n&y5;if(s||(s=m5),e.size!=t.size&&!l)return!1;var c=i.get(e);if(c)return c==t;n|=x5,i.set(e,t);var u=Jd(s(e),s(t),n,o,a,i);return i.delete(e),u;case O5:if(da)return da.call(e)==da.call(t)}return!1}function N5(e,t){for(var r=-1,n=t.length,o=e.length;++r<n;)e[o+r]=t[r];return e}function D5(e,t,r){var n=t(e);return Ye(e)?n:N5(n,r(e))}function k5(e,t){for(var r=-1,n=e==null?0:e.length,o=0,a=[];++r<n;){var i=e[r];t(i,r,e)&&(a[o++]=i)}return a}function j5(){return[]}var I5=Object.prototype,F5=I5.propertyIsEnumerable,gc=Object.getOwnPropertySymbols,L5=gc?function(e){return e==null?[]:(e=Object(e),k5(gc(e),function(t){return F5.call(e,t)}))}:j5;function vc(e){return D5(e,Ui,L5)}var B5=1,H5=Object.prototype,z5=H5.hasOwnProperty;function U5(e,t,r,n,o,a){var i=r&B5,s=vc(e),l=s.length,c=vc(t),u=c.length;if(l!=u&&!i)return!1;for(var p=l;p--;){var f=s[p];if(!(i?f in t:z5.call(t,f)))return!1}var h=a.get(e),b=a.get(t);if(h&&b)return h==t&&b==e;var g=!0;a.set(e,t),a.set(t,e);for(var m=i;++p<l;){f=s[p];var w=e[f],C=t[f];if(n)var E=i?n(C,w,f,t,e,a):n(w,C,f,e,t,a);if(!(E===void 0?w===C||o(w,C,r,n,a):E)){g=!1;break}m||(m=f=="constructor")}if(g&&!m){var _=e.constructor,S=t.constructor;_!=S&&"constructor"in e&&"constructor"in t&&!(typeof _=="function"&&_ instanceof _&&typeof S=="function"&&S instanceof S)&&(g=!1)}return a.delete(e),a.delete(t),g}var Fa=tr(at,"DataView"),La=tr(at,"Promise"),Ba=tr(at,"Set"),Ha=tr(at,"WeakMap"),bc="[object Map]",G5="[object Object]",mc="[object Promise]",yc="[object Set]",xc="[object WeakMap]",wc="[object DataView]",W5=er(Fa),V5=er(dn),Y5=er(La),K5=er(Ba),q5=er(Ha),Nt=Qt;(Fa&&Nt(new Fa(new ArrayBuffer(1)))!=wc||dn&&Nt(new dn)!=bc||La&&Nt(La.resolve())!=mc||Ba&&Nt(new Ba)!=yc||Ha&&Nt(new Ha)!=xc)&&(Nt=function(e){var t=Qt(e),r=t==G5?e.constructor:void 0,n=r?er(r):"";if(n)switch(n){case W5:return wc;case V5:return bc;case Y5:return mc;case K5:return yc;case q5:return xc}return t});var X5=1,Ec="[object Arguments]",Sc="[object Array]",Bn="[object Object]",J5=Object.prototype,Cc=J5.hasOwnProperty;function Z5(e,t,r,n,o,a){var i=Ye(e),s=Ye(t),l=i?Sc:Nt(e),c=s?Sc:Nt(t);l=l==Ec?Bn:l,c=c==Ec?Bn:c;var u=l==Bn,p=c==Bn,f=l==c;if(f&&so(e)){if(!so(t))return!1;i=!0,u=!1}if(f&&!u)return a||(a=new ft),i||Hi(e)?Jd(e,t,r,n,o,a):M5(e,t,l,r,n,o,a);if(!(r&X5)){var h=u&&Cc.call(e,"__wrapped__"),b=p&&Cc.call(t,"__wrapped__");if(h||b){var g=h?e.value():e,m=b?t.value():t;return a||(a=new ft),o(g,m,r,n,a)}}return f?(a||(a=new ft),U5(e,t,r,n,o,a)):!1}function Wi(e,t,r,n,o){return e===t?!0:e==null||t==null||!Ht(e)&&!Ht(t)?e!==e&&t!==t:Z5(e,t,r,n,Wi,o)}var Q5=1,eN=2;function tN(e,t,r,n){var o=r.length,a=o;if(e==null)return!a;for(e=Object(e);o--;){var i=r[o];if(i[2]?i[1]!==e[i[0]]:!(i[0]in e))return!1}for(;++o<a;){i=r[o];var s=i[0],l=e[s],c=i[1];if(i[2]){if(l===void 0&&!(s in e))return!1}else{var u=new ft,p;if(!(p===void 0?Wi(c,l,Q5|eN,n,u):p))return!1}}return!0}function Zd(e){return e===e&&!Je(e)}function rN(e){for(var t=Ui(e),r=t.length;r--;){var n=t[r],o=e[n];t[r]=[n,o,Zd(o)]}return t}function Qd(e,t){return function(r){return r==null?!1:r[e]===t&&(t!==void 0||e in Object(r))}}function nN(e){var t=rN(e);return t.length==1&&t[0][2]?Qd(t[0][0],t[0][1]):function(r){return r===e||tN(r,e,t)}}var oN=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,aN=/^\w*$/;function Vi(e,t){if(Ye(e))return!1;var r=typeof e;return r=="number"||r=="symbol"||r=="boolean"||e==null||No(e)?!0:aN.test(e)||!oN.test(e)||t!=null&&e in Object(t)}var iN="Expected a function";function Yi(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new TypeError(iN);var r=function(){var n=arguments,o=t?t.apply(this,n):n[0],a=r.cache;if(a.has(o))return a.get(o);var i=e.apply(this,n);return r.cache=a.set(o,i)||a,i};return r.cache=new(Yi.Cache||_t),r}Yi.Cache=_t;var sN=500;function lN(e){var t=Yi(e,function(n){return r.size===sN&&r.clear(),n}),r=t.cache;return t}var cN=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,uN=/\\(\\)?/g,fN=lN(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(""),e.replace(cN,function(r,n,o,a){t.push(o?a.replace(uN,"$1"):n||r)}),t}),dN=1/0,_c=Bt?Bt.prototype:void 0,$c=_c?_c.toString:void 0;function ep(e){if(typeof e=="string")return e;if(Ye(e))return Xd(e,ep)+"";if(No(e))return $c?$c.call(e):"";var t=e+"";return t=="0"&&1/e==-dN?"-0":t}function pN(e){return e==null?"":ep(e)}function tp(e,t){return Ye(e)?e:Vi(e,t)?[e]:fN(pN(e))}var hN=1/0;function jo(e){if(typeof e=="string"||No(e))return e;var t=e+"";return t=="0"&&1/e==-hN?"-0":t}function rp(e,t){t=tp(t,e);for(var r=0,n=t.length;e!=null&&r<n;)e=e[jo(t[r++])];return r&&r==n?e:void 0}function gN(e,t,r){var n=e==null?void 0:rp(e,t);return n===void 0?r:n}function vN(e,t){return e!=null&&t in Object(e)}function bN(e,t,r){t=tp(t,e);for(var n=-1,o=t.length,a=!1;++n<o;){var i=jo(t[n]);if(!(a=e!=null&&r(e,i)))break;e=e[i]}return a||++n!=o?a:(o=e==null?0:e.length,!!o&&Bi(o)&&zi(i,o)&&(Ye(e)||io(e)))}function mN(e,t){return e!=null&&bN(e,t,vN)}var yN=1,xN=2;function wN(e,t){return Vi(e)&&Zd(t)?Qd(jo(e),t):function(r){var n=gN(r,e);return n===void 0&&n===t?mN(r,e):Wi(t,n,yN|xN)}}function EN(e){return function(t){return t==null?void 0:t[e]}}function SN(e){return function(t){return rp(t,e)}}function CN(e){return Vi(e)?EN(jo(e)):SN(e)}function _N(e){return typeof e=="function"?e:e==null?Mo:typeof e=="object"?Ye(e)?wN(e[0],e[1]):nN(e):CN(e)}function $N(e,t){var r=-1,n=zr(e)?Array(e.length):[];return Vd(e,function(o,a,i){n[++r]=t(o,a,i)}),n}function nr(e,t){var r=Ye(e)?Xd:$N;return r(e,_N(t))}var TN=function(t){var r=t.colors,n=t.onClick,o=t.onSwatchHover,a=ee({default:{swatches:{marginRight:"-10px"},swatch:{width:"22px",height:"22px",float:"left",marginRight:"10px",marginBottom:"10px",borderRadius:"4px"},clear:{clear:"both"}}});return d.createElement("div",{style:a.swatches},nr(r,function(i){return d.createElement(rr,{key:i,color:i,style:a.swatch,onClick:n,onHover:o,focusStyle:{boxShadow:"0 0 4px "+i}})}),d.createElement("div",{style:a.clear}))},Ki=function(t){var r=t.onChange,n=t.onSwatchHover,o=t.hex,a=t.colors,i=t.width,s=t.triangle,l=t.styles,c=l===void 0?{}:l,u=t.className,p=u===void 0?"":u,f=o==="transparent",h=function(m,w){Ut(m)&&r({hex:m,source:"hex"},w)},b=ee(He({default:{card:{width:i,background:"#fff",boxShadow:"0 1px rgba(0,0,0,.1)",borderRadius:"6px",position:"relative"},head:{height:"110px",background:o,borderRadius:"6px 6px 0 0",display:"flex",alignItems:"center",justifyContent:"center",position:"relative"},body:{padding:"10px"},label:{fontSize:"18px",color:Gi(o),position:"relative"},triangle:{width:"0px",height:"0px",borderStyle:"solid",borderWidth:"0 10px 10px 10px",borderColor:"transparent transparent "+o+" transparent",position:"absolute",top:"-10px",left:"50%",marginLeft:"-10px"},input:{width:"100%",fontSize:"12px",color:"#666",border:"0px",outline:"none",height:"22px",boxShadow:"inset 0 0 0 1px #ddd",borderRadius:"4px",padding:"0 7px",boxSizing:"border-box"}},"hide-triangle":{triangle:{display:"none"}}},c),{"hide-triangle":s==="hide"});return d.createElement("div",{style:b.card,className:"block-picker "+p},d.createElement("div",{style:b.triangle}),d.createElement("div",{style:b.head},f&&d.createElement(Br,{borderRadius:"6px 6px 0 0"}),d.createElement("div",{style:b.label},o)),d.createElement("div",{style:b.body},d.createElement(TN,{colors:a,onClick:h,onSwatchHover:n}),d.createElement(ce,{style:{input:b.input},value:o,onChange:h})))};Ki.propTypes={width:P.oneOfType([P.string,P.number]),colors:P.arrayOf(P.string),triangle:P.oneOf(["top","hide"]),styles:P.object};Ki.defaultProps={width:170,colors:["#D9E3F0","#F47373","#697689","#37D67A","#2CCCE4","#555555","#dce775","#ff8a65","#ba68c8"],triangle:"top",styles:{}};ze(Ki);var lr={50:"#ffebee",100:"#ffcdd2",200:"#ef9a9a",300:"#e57373",400:"#ef5350",500:"#f44336",600:"#e53935",700:"#d32f2f",800:"#c62828",900:"#b71c1c",a100:"#ff8a80",a200:"#ff5252",a400:"#ff1744",a700:"#d50000"},cr={50:"#fce4ec",100:"#f8bbd0",200:"#f48fb1",300:"#f06292",400:"#ec407a",500:"#e91e63",600:"#d81b60",700:"#c2185b",800:"#ad1457",900:"#880e4f",a100:"#ff80ab",a200:"#ff4081",a400:"#f50057",a700:"#c51162"},ur={50:"#f3e5f5",100:"#e1bee7",200:"#ce93d8",300:"#ba68c8",400:"#ab47bc",500:"#9c27b0",600:"#8e24aa",700:"#7b1fa2",800:"#6a1b9a",900:"#4a148c",a100:"#ea80fc",a200:"#e040fb",a400:"#d500f9",a700:"#aa00ff"},fr={50:"#ede7f6",100:"#d1c4e9",200:"#b39ddb",300:"#9575cd",400:"#7e57c2",500:"#673ab7",600:"#5e35b1",700:"#512da8",800:"#4527a0",900:"#311b92",a100:"#b388ff",a200:"#7c4dff",a400:"#651fff",a700:"#6200ea"},dr={50:"#e8eaf6",100:"#c5cae9",200:"#9fa8da",300:"#7986cb",400:"#5c6bc0",500:"#3f51b5",600:"#3949ab",700:"#303f9f",800:"#283593",900:"#1a237e",a100:"#8c9eff",a200:"#536dfe",a400:"#3d5afe",a700:"#304ffe"},pr={50:"#e3f2fd",100:"#bbdefb",200:"#90caf9",300:"#64b5f6",400:"#42a5f5",500:"#2196f3",600:"#1e88e5",700:"#1976d2",800:"#1565c0",900:"#0d47a1",a100:"#82b1ff",a200:"#448aff",a400:"#2979ff",a700:"#2962ff"},hr={50:"#e1f5fe",100:"#b3e5fc",200:"#81d4fa",300:"#4fc3f7",400:"#29b6f6",500:"#03a9f4",600:"#039be5",700:"#0288d1",800:"#0277bd",900:"#01579b",a100:"#80d8ff",a200:"#40c4ff",a400:"#00b0ff",a700:"#0091ea"},gr={50:"#e0f7fa",100:"#b2ebf2",200:"#80deea",300:"#4dd0e1",400:"#26c6da",500:"#00bcd4",600:"#00acc1",700:"#0097a7",800:"#00838f",900:"#006064",a100:"#84ffff",a200:"#18ffff",a400:"#00e5ff",a700:"#00b8d4"},vr={50:"#e0f2f1",100:"#b2dfdb",200:"#80cbc4",300:"#4db6ac",400:"#26a69a",500:"#009688",600:"#00897b",700:"#00796b",800:"#00695c",900:"#004d40",a100:"#a7ffeb",a200:"#64ffda",a400:"#1de9b6",a700:"#00bfa5"},sn={50:"#e8f5e9",100:"#c8e6c9",200:"#a5d6a7",300:"#81c784",400:"#66bb6a",500:"#4caf50",600:"#43a047",700:"#388e3c",800:"#2e7d32",900:"#1b5e20",a100:"#b9f6ca",a200:"#69f0ae",a400:"#00e676",a700:"#00c853"},br={50:"#f1f8e9",100:"#dcedc8",200:"#c5e1a5",300:"#aed581",400:"#9ccc65",500:"#8bc34a",600:"#7cb342",700:"#689f38",800:"#558b2f",900:"#33691e",a100:"#ccff90",a200:"#b2ff59",a400:"#76ff03",a700:"#64dd17"},mr={50:"#f9fbe7",100:"#f0f4c3",200:"#e6ee9c",300:"#dce775",400:"#d4e157",500:"#cddc39",600:"#c0ca33",700:"#afb42b",800:"#9e9d24",900:"#827717",a100:"#f4ff81",a200:"#eeff41",a400:"#c6ff00",a700:"#aeea00"},yr={50:"#fffde7",100:"#fff9c4",200:"#fff59d",300:"#fff176",400:"#ffee58",500:"#ffeb3b",600:"#fdd835",700:"#fbc02d",800:"#f9a825",900:"#f57f17",a100:"#ffff8d",a200:"#ffff00",a400:"#ffea00",a700:"#ffd600"},xr={50:"#fff8e1",100:"#ffecb3",200:"#ffe082",300:"#ffd54f",400:"#ffca28",500:"#ffc107",600:"#ffb300",700:"#ffa000",800:"#ff8f00",900:"#ff6f00",a100:"#ffe57f",a200:"#ffd740",a400:"#ffc400",a700:"#ffab00"},wr={50:"#fff3e0",100:"#ffe0b2",200:"#ffcc80",300:"#ffb74d",400:"#ffa726",500:"#ff9800",600:"#fb8c00",700:"#f57c00",800:"#ef6c00",900:"#e65100",a100:"#ffd180",a200:"#ffab40",a400:"#ff9100",a700:"#ff6d00"},Er={50:"#fbe9e7",100:"#ffccbc",200:"#ffab91",300:"#ff8a65",400:"#ff7043",500:"#ff5722",600:"#f4511e",700:"#e64a19",800:"#d84315",900:"#bf360c",a100:"#ff9e80",a200:"#ff6e40",a400:"#ff3d00",a700:"#dd2c00"},Sr={50:"#efebe9",100:"#d7ccc8",200:"#bcaaa4",300:"#a1887f",400:"#8d6e63",500:"#795548",600:"#6d4c41",700:"#5d4037",800:"#4e342e",900:"#3e2723"},Cr={50:"#eceff1",100:"#cfd8dc",200:"#b0bec5",300:"#90a4ae",400:"#78909c",500:"#607d8b",600:"#546e7a",700:"#455a64",800:"#37474f",900:"#263238"},np=function(t){var r=t.color,n=t.onClick,o=t.onSwatchHover,a=t.hover,i=t.active,s=t.circleSize,l=t.circleSpacing,c=ee({default:{swatch:{width:s,height:s,marginRight:l,marginBottom:l,transform:"scale(1)",transition:"100ms transform ease"},Swatch:{borderRadius:"50%",background:"transparent",boxShadow:"inset 0 0 0 "+(s/2+1)+"px "+r,transition:"100ms box-shadow ease"}},hover:{swatch:{transform:"scale(1.2)"}},active:{Swatch:{boxShadow:"inset 0 0 0 3px "+r}}},{hover:a,active:i});return d.createElement("div",{style:c.swatch},d.createElement(rr,{style:c.Swatch,color:r,onClick:n,onHover:o,focusStyle:{boxShadow:c.Swatch.boxShadow+", 0 0 5px "+r}}))};np.defaultProps={circleSize:28,circleSpacing:14};const AN=Di(np);var qi=function(t){var r=t.width,n=t.onChange,o=t.onSwatchHover,a=t.colors,i=t.hex,s=t.circleSize,l=t.styles,c=l===void 0?{}:l,u=t.circleSpacing,p=t.className,f=p===void 0?"":p,h=ee(He({default:{card:{width:r,display:"flex",flexWrap:"wrap",marginRight:-u,marginBottom:-u}}},c)),b=function(m,w){return n({hex:m,source:"hex"},w)};return d.createElement("div",{style:h.card,className:"circle-picker "+f},nr(a,function(g){return d.createElement(AN,{key:g,color:g,onClick:b,onSwatchHover:o,active:i===g.toLowerCase(),circleSize:s,circleSpacing:u})}))};qi.propTypes={width:P.oneOfType([P.string,P.number]),circleSize:P.number,circleSpacing:P.number,styles:P.object};qi.defaultProps={width:252,circleSize:28,circleSpacing:14,colors:[lr[500],cr[500],ur[500],fr[500],dr[500],pr[500],hr[500],gr[500],vr[500],sn[500],br[500],mr[500],yr[500],xr[500],wr[500],Er[500],Sr[500],Cr[500]],styles:{}};ze(qi);function Tc(e){return e===void 0}var op={};Object.defineProperty(op,"__esModule",{value:!0});var Ac=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},ON=d,Oc=RN(ON);function RN(e){return e&&e.__esModule?e:{default:e}}function PN(e,t){var r={};for(var n in e)t.indexOf(n)>=0||Object.prototype.hasOwnProperty.call(e,n)&&(r[n]=e[n]);return r}var Hn=24,MN=op.default=function(e){var t=e.fill,r=t===void 0?"currentColor":t,n=e.width,o=n===void 0?Hn:n,a=e.height,i=a===void 0?Hn:a,s=e.style,l=s===void 0?{}:s,c=PN(e,["fill","width","height","style"]);return Oc.default.createElement("svg",Ac({viewBox:"0 0 "+Hn+" "+Hn,style:Ac({fill:r,width:o,height:i},l)},c),Oc.default.createElement("path",{d:"M12,18.17L8.83,15L7.42,16.41L12,21L16.59,16.41L15.17,15M12,5.83L15.17,9L16.58,7.59L12,3L7.41,7.59L8.83,9L12,5.83Z"}))},NN=function(){function e(t,r){for(var n=0;n<r.length;n++){var o=r[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}();function DN(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function kN(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t&&(typeof t=="object"||typeof t=="function")?t:e}function jN(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var ap=function(e){jN(t,e);function t(r){DN(this,t);var n=kN(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return n.toggleViews=function(){n.state.view==="hex"?n.setState({view:"rgb"}):n.state.view==="rgb"?n.setState({view:"hsl"}):n.state.view==="hsl"&&(n.props.hsl.a===1?n.setState({view:"hex"}):n.setState({view:"rgb"}))},n.handleChange=function(o,a){o.hex?Ut(o.hex)&&n.props.onChange({hex:o.hex,source:"hex"},a):o.r||o.g||o.b?n.props.onChange({r:o.r||n.props.rgb.r,g:o.g||n.props.rgb.g,b:o.b||n.props.rgb.b,source:"rgb"},a):o.a?(o.a<0?o.a=0:o.a>1&&(o.a=1),n.props.onChange({h:n.props.hsl.h,s:n.props.hsl.s,l:n.props.hsl.l,a:Math.round(o.a*100)/100,source:"rgb"},a)):(o.h||o.s||o.l)&&(typeof o.s=="string"&&o.s.includes("%")&&(o.s=o.s.replace("%","")),typeof o.l=="string"&&o.l.includes("%")&&(o.l=o.l.replace("%","")),o.s==1?o.s=.01:o.l==1&&(o.l=.01),n.props.onChange({h:o.h||n.props.hsl.h,s:Number(Tc(o.s)?n.props.hsl.s:o.s),l:Number(Tc(o.l)?n.props.hsl.l:o.l),source:"hsl"},a))},n.showHighlight=function(o){o.currentTarget.style.background="#eee"},n.hideHighlight=function(o){o.currentTarget.style.background="transparent"},r.hsl.a!==1&&r.view==="hex"?n.state={view:"rgb"}:n.state={view:r.view},n}return NN(t,[{key:"render",value:function(){var n=this,o=ee({default:{wrap:{paddingTop:"16px",display:"flex"},fields:{flex:"1",display:"flex",marginLeft:"-6px"},field:{paddingLeft:"6px",width:"100%"},alpha:{paddingLeft:"6px",width:"100%"},toggle:{width:"32px",textAlign:"right",position:"relative"},icon:{marginRight:"-4px",marginTop:"12px",cursor:"pointer",position:"relative"},iconHighlight:{position:"absolute",width:"24px",height:"28px",background:"#eee",borderRadius:"4px",top:"10px",left:"12px",display:"none"},input:{fontSize:"11px",color:"#333",width:"100%",borderRadius:"2px",border:"none",boxShadow:"inset 0 0 0 1px #dadada",height:"21px",textAlign:"center"},label:{textTransform:"uppercase",fontSize:"11px",lineHeight:"11px",color:"#969696",textAlign:"center",display:"block",marginTop:"12px"},svg:{fill:"#333",width:"24px",height:"24px",border:"1px transparent solid",borderRadius:"5px"}},disableAlpha:{alpha:{display:"none"}}},this.props,this.state),a=void 0;return this.state.view==="hex"?a=d.createElement("div",{style:o.fields,className:"flexbox-fix"},d.createElement("div",{style:o.field},d.createElement(ce,{style:{input:o.input,label:o.label},label:"hex",value:this.props.hex,onChange:this.handleChange}))):this.state.view==="rgb"?a=d.createElement("div",{style:o.fields,className:"flexbox-fix"},d.createElement("div",{style:o.field},d.createElement(ce,{style:{input:o.input,label:o.label},label:"r",value:this.props.rgb.r,onChange:this.handleChange})),d.createElement("div",{style:o.field},d.createElement(ce,{style:{input:o.input,label:o.label},label:"g",value:this.props.rgb.g,onChange:this.handleChange})),d.createElement("div",{style:o.field},d.createElement(ce,{style:{input:o.input,label:o.label},label:"b",value:this.props.rgb.b,onChange:this.handleChange})),d.createElement("div",{style:o.alpha},d.createElement(ce,{style:{input:o.input,label:o.label},label:"a",value:this.props.rgb.a,arrowOffset:.01,onChange:this.handleChange}))):this.state.view==="hsl"&&(a=d.createElement("div",{style:o.fields,className:"flexbox-fix"},d.createElement("div",{style:o.field},d.createElement(ce,{style:{input:o.input,label:o.label},label:"h",value:Math.round(this.props.hsl.h),onChange:this.handleChange})),d.createElement("div",{style:o.field},d.createElement(ce,{style:{input:o.input,label:o.label},label:"s",value:Math.round(this.props.hsl.s*100)+"%",onChange:this.handleChange})),d.createElement("div",{style:o.field},d.createElement(ce,{style:{input:o.input,label:o.label},label:"l",value:Math.round(this.props.hsl.l*100)+"%",onChange:this.handleChange})),d.createElement("div",{style:o.alpha},d.createElement(ce,{style:{input:o.input,label:o.label},label:"a",value:this.props.hsl.a,arrowOffset:.01,onChange:this.handleChange})))),d.createElement("div",{style:o.wrap,className:"flexbox-fix"},a,d.createElement("div",{style:o.toggle},d.createElement("div",{style:o.icon,onClick:this.toggleViews,ref:function(s){return n.icon=s}},d.createElement(MN,{style:o.svg,onMouseOver:this.showHighlight,onMouseEnter:this.showHighlight,onMouseOut:this.hideHighlight}))))}}],[{key:"getDerivedStateFromProps",value:function(n,o){return n.hsl.a!==1&&o.view==="hex"?{view:"rgb"}:null}}]),t}(d.Component);ap.defaultProps={view:"hex"};var Rc=function(){var t=ee({default:{picker:{width:"12px",height:"12px",borderRadius:"6px",transform:"translate(-6px, -1px)",backgroundColor:"rgb(248, 248, 248)",boxShadow:"0 1px 4px 0 rgba(0, 0, 0, 0.37)"}}});return d.createElement("div",{style:t.picker})},IN=function(){var t=ee({default:{picker:{width:"12px",height:"12px",borderRadius:"6px",boxShadow:"inset 0 0 0 1px #fff",transform:"translate(-6px, -6px)"}}});return d.createElement("div",{style:t.picker})},Xi=function(t){var r=t.width,n=t.onChange,o=t.disableAlpha,a=t.rgb,i=t.hsl,s=t.hsv,l=t.hex,c=t.renderers,u=t.styles,p=u===void 0?{}:u,f=t.className,h=f===void 0?"":f,b=t.defaultView,g=ee(He({default:{picker:{width:r,background:"#fff",borderRadius:"2px",boxShadow:"0 0 2px rgba(0,0,0,.3), 0 4px 8px rgba(0,0,0,.3)",boxSizing:"initial",fontFamily:"Menlo"},saturation:{width:"100%",paddingBottom:"55%",position:"relative",borderRadius:"2px 2px 0 0",overflow:"hidden"},Saturation:{radius:"2px 2px 0 0"},body:{padding:"16px 16px 12px"},controls:{display:"flex"},color:{width:"32px"},swatch:{marginTop:"6px",width:"16px",height:"16px",borderRadius:"8px",position:"relative",overflow:"hidden"},active:{absolute:"0px 0px 0px 0px",borderRadius:"8px",boxShadow:"inset 0 0 0 1px rgba(0,0,0,.1)",background:"rgba("+a.r+", "+a.g+", "+a.b+", "+a.a+")",zIndex:"2"},toggles:{flex:"1"},hue:{height:"10px",position:"relative",marginBottom:"8px"},Hue:{radius:"2px"},alpha:{height:"10px",position:"relative"},Alpha:{radius:"2px"}},disableAlpha:{color:{width:"22px"},alpha:{display:"none"},hue:{marginBottom:"0px"},swatch:{width:"10px",height:"10px",marginTop:"0px"}}},p),{disableAlpha:o});return d.createElement("div",{style:g.picker,className:"chrome-picker "+h},d.createElement("div",{style:g.saturation},d.createElement(Do,{style:g.Saturation,hsl:i,hsv:s,pointer:IN,onChange:n})),d.createElement("div",{style:g.body},d.createElement("div",{style:g.controls,className:"flexbox-fix"},d.createElement("div",{style:g.color},d.createElement("div",{style:g.swatch},d.createElement("div",{style:g.active}),d.createElement(Br,{renderers:c}))),d.createElement("div",{style:g.toggles},d.createElement("div",{style:g.hue},d.createElement(Hr,{style:g.Hue,hsl:i,pointer:Rc,onChange:n})),d.createElement("div",{style:g.alpha},d.createElement(ki,{style:g.Alpha,rgb:a,hsl:i,pointer:Rc,renderers:c,onChange:n})))),d.createElement(ap,{rgb:a,hsl:i,hex:l,view:b,onChange:n,disableAlpha:o})))};Xi.propTypes={width:P.oneOfType([P.string,P.number]),disableAlpha:P.bool,styles:P.object,defaultView:P.oneOf(["hex","rgb","hsl"])};Xi.defaultProps={width:225,disableAlpha:!1,styles:{}};ze(Xi);var FN=function(t){var r=t.color,n=t.onClick,o=n===void 0?function(){}:n,a=t.onSwatchHover,i=t.active,s=ee({default:{color:{background:r,width:"15px",height:"15px",float:"left",marginRight:"5px",marginBottom:"5px",position:"relative",cursor:"pointer"},dot:{absolute:"5px 5px 5px 5px",background:Gi(r),borderRadius:"50%",opacity:"0"}},active:{dot:{opacity:"1"}},"color-#FFFFFF":{color:{boxShadow:"inset 0 0 0 1px #ddd"},dot:{background:"#000"}},transparent:{dot:{background:"#000"}}},{active:i,"color-#FFFFFF":r==="#FFFFFF",transparent:r==="transparent"});return d.createElement(rr,{style:s.color,color:r,onClick:o,onHover:a,focusStyle:{boxShadow:"0 0 4px "+r}},d.createElement("div",{style:s.dot}))},LN=function(t){var r=t.hex,n=t.rgb,o=t.onChange,a=ee({default:{fields:{display:"flex",paddingBottom:"6px",paddingRight:"5px",position:"relative"},active:{position:"absolute",top:"6px",left:"5px",height:"9px",width:"9px",background:r},HEXwrap:{flex:"6",position:"relative"},HEXinput:{width:"80%",padding:"0px",paddingLeft:"20%",border:"none",outline:"none",background:"none",fontSize:"12px",color:"#333",height:"16px"},HEXlabel:{display:"none"},RGBwrap:{flex:"3",position:"relative"},RGBinput:{width:"70%",padding:"0px",paddingLeft:"30%",border:"none",outline:"none",background:"none",fontSize:"12px",color:"#333",height:"16px"},RGBlabel:{position:"absolute",top:"3px",left:"0px",lineHeight:"16px",textTransform:"uppercase",fontSize:"12px",color:"#999"}}}),i=function(l,c){l.r||l.g||l.b?o({r:l.r||n.r,g:l.g||n.g,b:l.b||n.b,source:"rgb"},c):o({hex:l.hex,source:"hex"},c)};return d.createElement("div",{style:a.fields,className:"flexbox-fix"},d.createElement("div",{style:a.active}),d.createElement(ce,{style:{wrap:a.HEXwrap,input:a.HEXinput,label:a.HEXlabel},label:"hex",value:r,onChange:i}),d.createElement(ce,{style:{wrap:a.RGBwrap,input:a.RGBinput,label:a.RGBlabel},label:"r",value:n.r,onChange:i}),d.createElement(ce,{style:{wrap:a.RGBwrap,input:a.RGBinput,label:a.RGBlabel},label:"g",value:n.g,onChange:i}),d.createElement(ce,{style:{wrap:a.RGBwrap,input:a.RGBinput,label:a.RGBlabel},label:"b",value:n.b,onChange:i}))},Ji=function(t){var r=t.onChange,n=t.onSwatchHover,o=t.colors,a=t.hex,i=t.rgb,s=t.styles,l=s===void 0?{}:s,c=t.className,u=c===void 0?"":c,p=ee(He({default:{Compact:{background:"#f6f6f6",radius:"4px"},compact:{paddingTop:"5px",paddingLeft:"5px",boxSizing:"initial",width:"240px"},clear:{clear:"both"}}},l)),f=function(b,g){b.hex?Ut(b.hex)&&r({hex:b.hex,source:"hex"},g):r(b,g)};return d.createElement($n,{style:p.Compact,styles:l},d.createElement("div",{style:p.compact,className:"compact-picker "+u},d.createElement("div",null,nr(o,function(h){return d.createElement(FN,{key:h,color:h,active:h.toLowerCase()===a,onClick:f,onSwatchHover:n})}),d.createElement("div",{style:p.clear})),d.createElement(LN,{hex:a,rgb:i,onChange:f})))};Ji.propTypes={colors:P.arrayOf(P.string),styles:P.object};Ji.defaultProps={colors:["#4D4D4D","#999999","#FFFFFF","#F44E3B","#FE9200","#FCDC00","#DBDF00","#A4DD00","#68CCCA","#73D8FF","#AEA1FF","#FDA1FF","#333333","#808080","#cccccc","#D33115","#E27300","#FCC400","#B0BC00","#68BC00","#16A5A5","#009CE0","#7B64FF","#FA28FF","#000000","#666666","#B3B3B3","#9F0500","#C45100","#FB9E00","#808900","#194D33","#0C797D","#0062B1","#653294","#AB149E"],styles:{}};ze(Ji);var BN=function(t){var r=t.hover,n=t.color,o=t.onClick,a=t.onSwatchHover,i={position:"relative",zIndex:"2",outline:"2px solid #fff",boxShadow:"0 0 5px 2px rgba(0,0,0,0.25)"},s=ee({default:{swatch:{width:"25px",height:"25px",fontSize:"0"}},hover:{swatch:i}},{hover:r});return d.createElement("div",{style:s.swatch},d.createElement(rr,{color:n,onClick:o,onHover:a,focusStyle:i}))};const HN=Di(BN);var Zi=function(t){var r=t.width,n=t.colors,o=t.onChange,a=t.onSwatchHover,i=t.triangle,s=t.styles,l=s===void 0?{}:s,c=t.className,u=c===void 0?"":c,p=ee(He({default:{card:{width:r,background:"#fff",border:"1px solid rgba(0,0,0,0.2)",boxShadow:"0 3px 12px rgba(0,0,0,0.15)",borderRadius:"4px",position:"relative",padding:"5px",display:"flex",flexWrap:"wrap"},triangle:{position:"absolute",border:"7px solid transparent",borderBottomColor:"#fff"},triangleShadow:{position:"absolute",border:"8px solid transparent",borderBottomColor:"rgba(0,0,0,0.15)"}},"hide-triangle":{triangle:{display:"none"},triangleShadow:{display:"none"}},"top-left-triangle":{triangle:{top:"-14px",left:"10px"},triangleShadow:{top:"-16px",left:"9px"}},"top-right-triangle":{triangle:{top:"-14px",right:"10px"},triangleShadow:{top:"-16px",right:"9px"}},"bottom-left-triangle":{triangle:{top:"35px",left:"10px",transform:"rotate(180deg)"},triangleShadow:{top:"37px",left:"9px",transform:"rotate(180deg)"}},"bottom-right-triangle":{triangle:{top:"35px",right:"10px",transform:"rotate(180deg)"},triangleShadow:{top:"37px",right:"9px",transform:"rotate(180deg)"}}},l),{"hide-triangle":i==="hide","top-left-triangle":i==="top-left","top-right-triangle":i==="top-right","bottom-left-triangle":i==="bottom-left","bottom-right-triangle":i==="bottom-right"}),f=function(b,g){return o({hex:b,source:"hex"},g)};return d.createElement("div",{style:p.card,className:"github-picker "+u},d.createElement("div",{style:p.triangleShadow}),d.createElement("div",{style:p.triangle}),nr(n,function(h){return d.createElement(HN,{color:h,key:h,onClick:f,onSwatchHover:a})}))};Zi.propTypes={width:P.oneOfType([P.string,P.number]),colors:P.arrayOf(P.string),triangle:P.oneOf(["hide","top-left","top-right","bottom-left","bottom-right"]),styles:P.object};Zi.defaultProps={width:200,colors:["#B80000","#DB3E00","#FCCB00","#008B02","#006B76","#1273DE","#004DCF","#5300EB","#EB9694","#FAD0C3","#FEF3BD","#C1E1C5","#BEDADC","#C4DEF6","#BED3F3","#D4C4FB"],triangle:"top-left",styles:{}};ze(Zi);var zN=function(t){var r=t.direction,n=ee({default:{picker:{width:"18px",height:"18px",borderRadius:"50%",transform:"translate(-9px, -1px)",backgroundColor:"rgb(248, 248, 248)",boxShadow:"0 1px 4px 0 rgba(0, 0, 0, 0.37)"}},vertical:{picker:{transform:"translate(-3px, -9px)"}}},{vertical:r==="vertical"});return d.createElement("div",{style:n.picker})},UN=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Qi=function(t){var r=t.width,n=t.height,o=t.onChange,a=t.hsl,i=t.direction,s=t.pointer,l=t.styles,c=l===void 0?{}:l,u=t.className,p=u===void 0?"":u,f=ee(He({default:{picker:{position:"relative",width:r,height:n},hue:{radius:"2px"}}},c)),h=function(g){return o({a:1,h:g.h,l:.5,s:1})};return d.createElement("div",{style:f.picker,className:"hue-picker "+p},d.createElement(Hr,UN({},f.hue,{hsl:a,pointer:s,onChange:h,direction:i})))};Qi.propTypes={styles:P.object};Qi.defaultProps={width:"316px",height:"16px",direction:"horizontal",pointer:zN,styles:{}};ze(Qi);var GN=function(t){var r=t.onChange,n=t.hex,o=t.rgb,a=t.styles,i=a===void 0?{}:a,s=t.className,l=s===void 0?"":s,c=ee(He({default:{material:{width:"98px",height:"98px",padding:"16px",fontFamily:"Roboto"},HEXwrap:{position:"relative"},HEXinput:{width:"100%",marginTop:"12px",fontSize:"15px",color:"#333",padding:"0px",border:"0px",borderBottom:"2px solid "+n,outline:"none",height:"30px"},HEXlabel:{position:"absolute",top:"0px",left:"0px",fontSize:"11px",color:"#999999",textTransform:"capitalize"},Hex:{style:{}},RGBwrap:{position:"relative"},RGBinput:{width:"100%",marginTop:"12px",fontSize:"15px",color:"#333",padding:"0px",border:"0px",borderBottom:"1px solid #eee",outline:"none",height:"30px"},RGBlabel:{position:"absolute",top:"0px",left:"0px",fontSize:"11px",color:"#999999",textTransform:"capitalize"},split:{display:"flex",marginRight:"-10px",paddingTop:"11px"},third:{flex:"1",paddingRight:"10px"}}},i)),u=function(f,h){f.hex?Ut(f.hex)&&r({hex:f.hex,source:"hex"},h):(f.r||f.g||f.b)&&r({r:f.r||o.r,g:f.g||o.g,b:f.b||o.b,source:"rgb"},h)};return d.createElement($n,{styles:i},d.createElement("div",{style:c.material,className:"material-picker "+l},d.createElement(ce,{style:{wrap:c.HEXwrap,input:c.HEXinput,label:c.HEXlabel},label:"hex",value:n,onChange:u}),d.createElement("div",{style:c.split,className:"flexbox-fix"},d.createElement("div",{style:c.third},d.createElement(ce,{style:{wrap:c.RGBwrap,input:c.RGBinput,label:c.RGBlabel},label:"r",value:o.r,onChange:u})),d.createElement("div",{style:c.third},d.createElement(ce,{style:{wrap:c.RGBwrap,input:c.RGBinput,label:c.RGBlabel},label:"g",value:o.g,onChange:u})),d.createElement("div",{style:c.third},d.createElement(ce,{style:{wrap:c.RGBwrap,input:c.RGBinput,label:c.RGBlabel},label:"b",value:o.b,onChange:u})))))};ze(GN);var WN=function(t){var r=t.onChange,n=t.rgb,o=t.hsv,a=t.hex,i=ee({default:{fields:{paddingTop:"5px",paddingBottom:"9px",width:"80px",position:"relative"},divider:{height:"5px"},RGBwrap:{position:"relative"},RGBinput:{marginLeft:"40%",width:"40%",height:"18px",border:"1px solid #888888",boxShadow:"inset 0 1px 1px rgba(0,0,0,.1), 0 1px 0 0 #ECECEC",marginBottom:"5px",fontSize:"13px",paddingLeft:"3px",marginRight:"10px"},RGBlabel:{left:"0px",top:"0px",width:"34px",textTransform:"uppercase",fontSize:"13px",height:"18px",lineHeight:"22px",position:"absolute"},HEXwrap:{position:"relative"},HEXinput:{marginLeft:"20%",width:"80%",height:"18px",border:"1px solid #888888",boxShadow:"inset 0 1px 1px rgba(0,0,0,.1), 0 1px 0 0 #ECECEC",marginBottom:"6px",fontSize:"13px",paddingLeft:"3px"},HEXlabel:{position:"absolute",top:"0px",left:"0px",width:"14px",textTransform:"uppercase",fontSize:"13px",height:"18px",lineHeight:"22px"},fieldSymbols:{position:"absolute",top:"5px",right:"-7px",fontSize:"13px"},symbol:{height:"20px",lineHeight:"22px",paddingBottom:"7px"}}}),s=function(c,u){c["#"]?Ut(c["#"])&&r({hex:c["#"],source:"hex"},u):c.r||c.g||c.b?r({r:c.r||n.r,g:c.g||n.g,b:c.b||n.b,source:"rgb"},u):(c.h||c.s||c.v)&&r({h:c.h||o.h,s:c.s||o.s,v:c.v||o.v,source:"hsv"},u)};return d.createElement("div",{style:i.fields},d.createElement(ce,{style:{wrap:i.RGBwrap,input:i.RGBinput,label:i.RGBlabel},label:"h",value:Math.round(o.h),onChange:s}),d.createElement(ce,{style:{wrap:i.RGBwrap,input:i.RGBinput,label:i.RGBlabel},label:"s",value:Math.round(o.s*100),onChange:s}),d.createElement(ce,{style:{wrap:i.RGBwrap,input:i.RGBinput,label:i.RGBlabel},label:"v",value:Math.round(o.v*100),onChange:s}),d.createElement("div",{style:i.divider}),d.createElement(ce,{style:{wrap:i.RGBwrap,input:i.RGBinput,label:i.RGBlabel},label:"r",value:n.r,onChange:s}),d.createElement(ce,{style:{wrap:i.RGBwrap,input:i.RGBinput,label:i.RGBlabel},label:"g",value:n.g,onChange:s}),d.createElement(ce,{style:{wrap:i.RGBwrap,input:i.RGBinput,label:i.RGBlabel},label:"b",value:n.b,onChange:s}),d.createElement("div",{style:i.divider}),d.createElement(ce,{style:{wrap:i.HEXwrap,input:i.HEXinput,label:i.HEXlabel},label:"#",value:a.replace("#",""),onChange:s}),d.createElement("div",{style:i.fieldSymbols},d.createElement("div",{style:i.symbol},"°"),d.createElement("div",{style:i.symbol},"%"),d.createElement("div",{style:i.symbol},"%")))},VN=function(t){var r=t.hsl,n=ee({default:{picker:{width:"12px",height:"12px",borderRadius:"6px",boxShadow:"inset 0 0 0 1px #fff",transform:"translate(-6px, -6px)"}},"black-outline":{picker:{boxShadow:"inset 0 0 0 1px #000"}}},{"black-outline":r.l>.5});return d.createElement("div",{style:n.picker})},YN=function(){var t=ee({default:{triangle:{width:0,height:0,borderStyle:"solid",borderWidth:"4px 0 4px 6px",borderColor:"transparent transparent transparent #fff",position:"absolute",top:"1px",left:"1px"},triangleBorder:{width:0,height:0,borderStyle:"solid",borderWidth:"5px 0 5px 8px",borderColor:"transparent transparent transparent #555"},left:{Extend:"triangleBorder",transform:"translate(-13px, -4px)"},leftInside:{Extend:"triangle",transform:"translate(-8px, -5px)"},right:{Extend:"triangleBorder",transform:"translate(20px, -14px) rotate(180deg)"},rightInside:{Extend:"triangle",transform:"translate(-8px, -5px)"}}});return d.createElement("div",{style:t.pointer},d.createElement("div",{style:t.left},d.createElement("div",{style:t.leftInside})),d.createElement("div",{style:t.right},d.createElement("div",{style:t.rightInside})))},Pc=function(t){var r=t.onClick,n=t.label,o=t.children,a=t.active,i=ee({default:{button:{backgroundImage:"linear-gradient(-180deg, #FFFFFF 0%, #E6E6E6 100%)",border:"1px solid #878787",borderRadius:"2px",height:"20px",boxShadow:"0 1px 0 0 #EAEAEA",fontSize:"14px",color:"#000",lineHeight:"20px",textAlign:"center",marginBottom:"10px",cursor:"pointer"}},active:{button:{boxShadow:"0 0 0 1px #878787"}}},{active:a});return d.createElement("div",{style:i.button,onClick:r},n||o)},KN=function(t){var r=t.rgb,n=t.currentColor,o=ee({default:{swatches:{border:"1px solid #B3B3B3",borderBottom:"1px solid #F0F0F0",marginBottom:"2px",marginTop:"1px"},new:{height:"34px",background:"rgb("+r.r+","+r.g+", "+r.b+")",boxShadow:"inset 1px 0 0 #000, inset -1px 0 0 #000, inset 0 1px 0 #000"},current:{height:"34px",background:n,boxShadow:"inset 1px 0 0 #000, inset -1px 0 0 #000, inset 0 -1px 0 #000"},label:{fontSize:"14px",color:"#000",textAlign:"center"}}});return d.createElement("div",null,d.createElement("div",{style:o.label},"new"),d.createElement("div",{style:o.swatches},d.createElement("div",{style:o.new}),d.createElement("div",{style:o.current})),d.createElement("div",{style:o.label},"current"))},qN=function(){function e(t,r){for(var n=0;n<r.length;n++){var o=r[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}();function XN(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function JN(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t&&(typeof t=="object"||typeof t=="function")?t:e}function ZN(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var es=function(e){ZN(t,e);function t(r){XN(this,t);var n=JN(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return n.state={currentColor:r.hex},n}return qN(t,[{key:"render",value:function(){var n=this.props,o=n.styles,a=o===void 0?{}:o,i=n.className,s=i===void 0?"":i,l=ee(He({default:{picker:{background:"#DCDCDC",borderRadius:"4px",boxShadow:"0 0 0 1px rgba(0,0,0,.25), 0 8px 16px rgba(0,0,0,.15)",boxSizing:"initial",width:"513px"},head:{backgroundImage:"linear-gradient(-180deg, #F0F0F0 0%, #D4D4D4 100%)",borderBottom:"1px solid #B1B1B1",boxShadow:"inset 0 1px 0 0 rgba(255,255,255,.2), inset 0 -1px 0 0 rgba(0,0,0,.02)",height:"23px",lineHeight:"24px",borderRadius:"4px 4px 0 0",fontSize:"13px",color:"#4D4D4D",textAlign:"center"},body:{padding:"15px 15px 0",display:"flex"},saturation:{width:"256px",height:"256px",position:"relative",border:"2px solid #B3B3B3",borderBottom:"2px solid #F0F0F0",overflow:"hidden"},hue:{position:"relative",height:"256px",width:"19px",marginLeft:"10px",border:"2px solid #B3B3B3",borderBottom:"2px solid #F0F0F0"},controls:{width:"180px",marginLeft:"10px"},top:{display:"flex"},previews:{width:"60px"},actions:{flex:"1",marginLeft:"20px"}}},a));return d.createElement("div",{style:l.picker,className:"photoshop-picker "+s},d.createElement("div",{style:l.head},this.props.header),d.createElement("div",{style:l.body,className:"flexbox-fix"},d.createElement("div",{style:l.saturation},d.createElement(Do,{hsl:this.props.hsl,hsv:this.props.hsv,pointer:VN,onChange:this.props.onChange})),d.createElement("div",{style:l.hue},d.createElement(Hr,{direction:"vertical",hsl:this.props.hsl,pointer:YN,onChange:this.props.onChange})),d.createElement("div",{style:l.controls},d.createElement("div",{style:l.top,className:"flexbox-fix"},d.createElement("div",{style:l.previews},d.createElement(KN,{rgb:this.props.rgb,currentColor:this.state.currentColor})),d.createElement("div",{style:l.actions},d.createElement(Pc,{label:"OK",onClick:this.props.onAccept,active:!0}),d.createElement(Pc,{label:"Cancel",onClick:this.props.onCancel}),d.createElement(WN,{onChange:this.props.onChange,rgb:this.props.rgb,hsv:this.props.hsv,hex:this.props.hex}))))))}}]),t}(d.Component);es.propTypes={header:P.string,styles:P.object};es.defaultProps={header:"Color Picker",styles:{}};ze(es);var QN=function(t){var r=t.onChange,n=t.rgb,o=t.hsl,a=t.hex,i=t.disableAlpha,s=ee({default:{fields:{display:"flex",paddingTop:"4px"},single:{flex:"1",paddingLeft:"6px"},alpha:{flex:"1",paddingLeft:"6px"},double:{flex:"2"},input:{width:"80%",padding:"4px 10% 3px",border:"none",boxShadow:"inset 0 0 0 1px #ccc",fontSize:"11px"},label:{display:"block",textAlign:"center",fontSize:"11px",color:"#222",paddingTop:"3px",paddingBottom:"4px",textTransform:"capitalize"}},disableAlpha:{alpha:{display:"none"}}},{disableAlpha:i}),l=function(u,p){u.hex?Ut(u.hex)&&r({hex:u.hex,source:"hex"},p):u.r||u.g||u.b?r({r:u.r||n.r,g:u.g||n.g,b:u.b||n.b,a:n.a,source:"rgb"},p):u.a&&(u.a<0?u.a=0:u.a>100&&(u.a=100),u.a/=100,r({h:o.h,s:o.s,l:o.l,a:u.a,source:"rgb"},p))};return d.createElement("div",{style:s.fields,className:"flexbox-fix"},d.createElement("div",{style:s.double},d.createElement(ce,{style:{input:s.input,label:s.label},label:"hex",value:a.replace("#",""),onChange:l})),d.createElement("div",{style:s.single},d.createElement(ce,{style:{input:s.input,label:s.label},label:"r",value:n.r,onChange:l,dragLabel:"true",dragMax:"255"})),d.createElement("div",{style:s.single},d.createElement(ce,{style:{input:s.input,label:s.label},label:"g",value:n.g,onChange:l,dragLabel:"true",dragMax:"255"})),d.createElement("div",{style:s.single},d.createElement(ce,{style:{input:s.input,label:s.label},label:"b",value:n.b,onChange:l,dragLabel:"true",dragMax:"255"})),d.createElement("div",{style:s.alpha},d.createElement(ce,{style:{input:s.input,label:s.label},label:"a",value:Math.round(n.a*100),onChange:l,dragLabel:"true",dragMax:"100"})))},eD=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},ip=function(t){var r=t.colors,n=t.onClick,o=n===void 0?function(){}:n,a=t.onSwatchHover,i=ee({default:{colors:{margin:"0 -10px",padding:"10px 0 0 10px",borderTop:"1px solid #eee",display:"flex",flexWrap:"wrap",position:"relative"},swatchWrap:{width:"16px",height:"16px",margin:"0 10px 10px 0"},swatch:{borderRadius:"3px",boxShadow:"inset 0 0 0 1px rgba(0,0,0,.15)"}},"no-presets":{colors:{display:"none"}}},{"no-presets":!r||!r.length}),s=function(c,u){o({hex:c,source:"hex"},u)};return d.createElement("div",{style:i.colors,className:"flexbox-fix"},r.map(function(l){var c=typeof l=="string"?{color:l}:l,u=""+c.color+(c.title||"");return d.createElement("div",{key:u,style:i.swatchWrap},d.createElement(rr,eD({},c,{style:i.swatch,onClick:s,onHover:a,focusStyle:{boxShadow:"inset 0 0 0 1px rgba(0,0,0,.15), 0 0 4px "+c.color}})))}))};ip.propTypes={colors:P.arrayOf(P.oneOfType([P.string,P.shape({color:P.string,title:P.string})])).isRequired};var tD=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},ts=function(t){var r=t.width,n=t.rgb,o=t.hex,a=t.hsv,i=t.hsl,s=t.onChange,l=t.onSwatchHover,c=t.disableAlpha,u=t.presetColors,p=t.renderers,f=t.styles,h=f===void 0?{}:f,b=t.className,g=b===void 0?"":b,m=ee(He({default:tD({picker:{width:r,padding:"10px 10px 0",boxSizing:"initial",background:"#fff",borderRadius:"4px",boxShadow:"0 0 0 1px rgba(0,0,0,.15), 0 8px 16px rgba(0,0,0,.15)"},saturation:{width:"100%",paddingBottom:"75%",position:"relative",overflow:"hidden"},Saturation:{radius:"3px",shadow:"inset 0 0 0 1px rgba(0,0,0,.15), inset 0 0 4px rgba(0,0,0,.25)"},controls:{display:"flex"},sliders:{padding:"4px 0",flex:"1"},color:{width:"24px",height:"24px",position:"relative",marginTop:"4px",marginLeft:"4px",borderRadius:"3px"},activeColor:{absolute:"0px 0px 0px 0px",borderRadius:"2px",background:"rgba("+n.r+","+n.g+","+n.b+","+n.a+")",boxShadow:"inset 0 0 0 1px rgba(0,0,0,.15), inset 0 0 4px rgba(0,0,0,.25)"},hue:{position:"relative",height:"10px",overflow:"hidden"},Hue:{radius:"2px",shadow:"inset 0 0 0 1px rgba(0,0,0,.15), inset 0 0 4px rgba(0,0,0,.25)"},alpha:{position:"relative",height:"10px",marginTop:"4px",overflow:"hidden"},Alpha:{radius:"2px",shadow:"inset 0 0 0 1px rgba(0,0,0,.15), inset 0 0 4px rgba(0,0,0,.25)"}},h),disableAlpha:{color:{height:"10px"},hue:{height:"10px"},alpha:{display:"none"}}},h),{disableAlpha:c});return d.createElement("div",{style:m.picker,className:"sketch-picker "+g},d.createElement("div",{style:m.saturation},d.createElement(Do,{style:m.Saturation,hsl:i,hsv:a,onChange:s})),d.createElement("div",{style:m.controls,className:"flexbox-fix"},d.createElement("div",{style:m.sliders},d.createElement("div",{style:m.hue},d.createElement(Hr,{style:m.Hue,hsl:i,onChange:s})),d.createElement("div",{style:m.alpha},d.createElement(ki,{style:m.Alpha,rgb:n,hsl:i,renderers:p,onChange:s}))),d.createElement("div",{style:m.color},d.createElement(Br,null),d.createElement("div",{style:m.activeColor}))),d.createElement(QN,{rgb:n,hsl:i,hex:o,onChange:s,disableAlpha:c}),d.createElement(ip,{colors:u,onClick:s,onSwatchHover:l}))};ts.propTypes={disableAlpha:P.bool,width:P.oneOfType([P.string,P.number]),styles:P.object};ts.defaultProps={disableAlpha:!1,width:200,styles:{},presetColors:["#D0021B","#F5A623","#F8E71C","#8B572A","#7ED321","#417505","#BD10E0","#9013FE","#4A90E2","#50E3C2","#B8E986","#000000","#4A4A4A","#9B9B9B","#FFFFFF"]};const rD=ze(ts);var rn=function(t){var r=t.hsl,n=t.offset,o=t.onClick,a=o===void 0?function(){}:o,i=t.active,s=t.first,l=t.last,c=ee({default:{swatch:{height:"12px",background:"hsl("+r.h+", 50%, "+n*100+"%)",cursor:"pointer"}},first:{swatch:{borderRadius:"2px 0 0 2px"}},last:{swatch:{borderRadius:"0 2px 2px 0"}},active:{swatch:{transform:"scaleY(1.8)",borderRadius:"3.6px/2px"}}},{active:i,first:s,last:l}),u=function(f){return a({h:r.h,s:.5,l:n,source:"hsl"},f)};return d.createElement("div",{style:c.swatch,onClick:u})},nD=function(t){var r=t.onClick,n=t.hsl,o=ee({default:{swatches:{marginTop:"20px"},swatch:{boxSizing:"border-box",width:"20%",paddingRight:"1px",float:"left"},clear:{clear:"both"}}}),a=.1;return d.createElement("div",{style:o.swatches},d.createElement("div",{style:o.swatch},d.createElement(rn,{hsl:n,offset:".80",active:Math.abs(n.l-.8)<a&&Math.abs(n.s-.5)<a,onClick:r,first:!0})),d.createElement("div",{style:o.swatch},d.createElement(rn,{hsl:n,offset:".65",active:Math.abs(n.l-.65)<a&&Math.abs(n.s-.5)<a,onClick:r})),d.createElement("div",{style:o.swatch},d.createElement(rn,{hsl:n,offset:".50",active:Math.abs(n.l-.5)<a&&Math.abs(n.s-.5)<a,onClick:r})),d.createElement("div",{style:o.swatch},d.createElement(rn,{hsl:n,offset:".35",active:Math.abs(n.l-.35)<a&&Math.abs(n.s-.5)<a,onClick:r})),d.createElement("div",{style:o.swatch},d.createElement(rn,{hsl:n,offset:".20",active:Math.abs(n.l-.2)<a&&Math.abs(n.s-.5)<a,onClick:r,last:!0})),d.createElement("div",{style:o.clear}))},oD=function(){var t=ee({default:{picker:{width:"14px",height:"14px",borderRadius:"6px",transform:"translate(-7px, -1px)",backgroundColor:"rgb(248, 248, 248)",boxShadow:"0 1px 4px 0 rgba(0, 0, 0, 0.37)"}}});return d.createElement("div",{style:t.picker})},rs=function(t){var r=t.hsl,n=t.onChange,o=t.pointer,a=t.styles,i=a===void 0?{}:a,s=t.className,l=s===void 0?"":s,c=ee(He({default:{hue:{height:"12px",position:"relative"},Hue:{radius:"2px"}}},i));return d.createElement("div",{style:c.wrap||{},className:"slider-picker "+l},d.createElement("div",{style:c.hue},d.createElement(Hr,{style:c.Hue,hsl:r,pointer:o,onChange:n})),d.createElement("div",{style:c.swatches},d.createElement(nD,{hsl:r,onClick:n})))};rs.propTypes={styles:P.object};rs.defaultProps={pointer:oD,styles:{}};ze(rs);var sp={};Object.defineProperty(sp,"__esModule",{value:!0});var Mc=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},aD=d,Nc=iD(aD);function iD(e){return e&&e.__esModule?e:{default:e}}function sD(e,t){var r={};for(var n in e)t.indexOf(n)>=0||Object.prototype.hasOwnProperty.call(e,n)&&(r[n]=e[n]);return r}var zn=24,lD=sp.default=function(e){var t=e.fill,r=t===void 0?"currentColor":t,n=e.width,o=n===void 0?zn:n,a=e.height,i=a===void 0?zn:a,s=e.style,l=s===void 0?{}:s,c=sD(e,["fill","width","height","style"]);return Nc.default.createElement("svg",Mc({viewBox:"0 0 "+zn+" "+zn,style:Mc({fill:r,width:o,height:i},l)},c),Nc.default.createElement("path",{d:"M21,7L9,19L3.5,13.5L4.91,12.09L9,16.17L19.59,5.59L21,7Z"}))},cD=function(t){var r=t.color,n=t.onClick,o=n===void 0?function(){}:n,a=t.onSwatchHover,i=t.first,s=t.last,l=t.active,c=ee({default:{color:{width:"40px",height:"24px",cursor:"pointer",background:r,marginBottom:"1px"},check:{color:Gi(r),marginLeft:"8px",display:"none"}},first:{color:{overflow:"hidden",borderRadius:"2px 2px 0 0"}},last:{color:{overflow:"hidden",borderRadius:"0 0 2px 2px"}},active:{check:{display:"block"}},"color-#FFFFFF":{color:{boxShadow:"inset 0 0 0 1px #ddd"},check:{color:"#333"}},transparent:{check:{color:"#333"}}},{first:i,last:s,active:l,"color-#FFFFFF":r==="#FFFFFF",transparent:r==="transparent"});return d.createElement(rr,{color:r,style:c.color,onClick:o,onHover:a,focusStyle:{boxShadow:"0 0 4px "+r}},d.createElement("div",{style:c.check},d.createElement(lD,null)))},uD=function(t){var r=t.onClick,n=t.onSwatchHover,o=t.group,a=t.active,i=ee({default:{group:{paddingBottom:"10px",width:"40px",float:"left",marginRight:"10px"}}});return d.createElement("div",{style:i.group},nr(o,function(s,l){return d.createElement(cD,{key:s,color:s,active:s.toLowerCase()===a,first:l===0,last:l===o.length-1,onClick:r,onSwatchHover:n})}))},ns=function(t){var r=t.width,n=t.height,o=t.onChange,a=t.onSwatchHover,i=t.colors,s=t.hex,l=t.styles,c=l===void 0?{}:l,u=t.className,p=u===void 0?"":u,f=ee(He({default:{picker:{width:r,height:n},overflow:{height:n,overflowY:"scroll"},body:{padding:"16px 0 6px 16px"},clear:{clear:"both"}}},c)),h=function(g,m){return o({hex:g,source:"hex"},m)};return d.createElement("div",{style:f.picker,className:"swatches-picker "+p},d.createElement($n,null,d.createElement("div",{style:f.overflow},d.createElement("div",{style:f.body},nr(i,function(b){return d.createElement(uD,{key:b.toString(),group:b,active:s,onClick:h,onSwatchHover:a})}),d.createElement("div",{style:f.clear})))))};ns.propTypes={width:P.oneOfType([P.string,P.number]),height:P.oneOfType([P.string,P.number]),colors:P.arrayOf(P.arrayOf(P.string)),styles:P.object};ns.defaultProps={width:320,height:240,colors:[[lr[900],lr[700],lr[500],lr[300],lr[100]],[cr[900],cr[700],cr[500],cr[300],cr[100]],[ur[900],ur[700],ur[500],ur[300],ur[100]],[fr[900],fr[700],fr[500],fr[300],fr[100]],[dr[900],dr[700],dr[500],dr[300],dr[100]],[pr[900],pr[700],pr[500],pr[300],pr[100]],[hr[900],hr[700],hr[500],hr[300],hr[100]],[gr[900],gr[700],gr[500],gr[300],gr[100]],[vr[900],vr[700],vr[500],vr[300],vr[100]],["#194D33",sn[700],sn[500],sn[300],sn[100]],[br[900],br[700],br[500],br[300],br[100]],[mr[900],mr[700],mr[500],mr[300],mr[100]],[yr[900],yr[700],yr[500],yr[300],yr[100]],[xr[900],xr[700],xr[500],xr[300],xr[100]],[wr[900],wr[700],wr[500],wr[300],wr[100]],[Er[900],Er[700],Er[500],Er[300],Er[100]],[Sr[900],Sr[700],Sr[500],Sr[300],Sr[100]],[Cr[900],Cr[700],Cr[500],Cr[300],Cr[100]],["#000000","#525252","#969696","#D9D9D9","#FFFFFF"]],styles:{}};ze(ns);var os=function(t){var r=t.onChange,n=t.onSwatchHover,o=t.hex,a=t.colors,i=t.width,s=t.triangle,l=t.styles,c=l===void 0?{}:l,u=t.className,p=u===void 0?"":u,f=ee(He({default:{card:{width:i,background:"#fff",border:"0 solid rgba(0,0,0,0.25)",boxShadow:"0 1px 4px rgba(0,0,0,0.25)",borderRadius:"4px",position:"relative"},body:{padding:"15px 9px 9px 15px"},label:{fontSize:"18px",color:"#fff"},triangle:{width:"0px",height:"0px",borderStyle:"solid",borderWidth:"0 9px 10px 9px",borderColor:"transparent transparent #fff transparent",position:"absolute"},triangleShadow:{width:"0px",height:"0px",borderStyle:"solid",borderWidth:"0 9px 10px 9px",borderColor:"transparent transparent rgba(0,0,0,.1) transparent",position:"absolute"},hash:{background:"#F0F0F0",height:"30px",width:"30px",borderRadius:"4px 0 0 4px",float:"left",color:"#98A1A4",display:"flex",alignItems:"center",justifyContent:"center"},input:{width:"100px",fontSize:"14px",color:"#666",border:"0px",outline:"none",height:"28px",boxShadow:"inset 0 0 0 1px #F0F0F0",boxSizing:"content-box",borderRadius:"0 4px 4px 0",float:"left",paddingLeft:"8px"},swatch:{width:"30px",height:"30px",float:"left",borderRadius:"4px",margin:"0 6px 6px 0"},clear:{clear:"both"}},"hide-triangle":{triangle:{display:"none"},triangleShadow:{display:"none"}},"top-left-triangle":{triangle:{top:"-10px",left:"12px"},triangleShadow:{top:"-11px",left:"12px"}},"top-right-triangle":{triangle:{top:"-10px",right:"12px"},triangleShadow:{top:"-11px",right:"12px"}}},c),{"hide-triangle":s==="hide","top-left-triangle":s==="top-left","top-right-triangle":s==="top-right"}),h=function(g,m){Ut(g)&&r({hex:g,source:"hex"},m)};return d.createElement("div",{style:f.card,className:"twitter-picker "+p},d.createElement("div",{style:f.triangleShadow}),d.createElement("div",{style:f.triangle}),d.createElement("div",{style:f.body},nr(a,function(b,g){return d.createElement(rr,{key:g,color:b,hex:b,style:f.swatch,onClick:h,onHover:n,focusStyle:{boxShadow:"0 0 4px "+b}})}),d.createElement("div",{style:f.hash},"#"),d.createElement(ce,{label:null,style:{input:f.input},value:o.replace("#",""),onChange:h}),d.createElement("div",{style:f.clear})))};os.propTypes={width:P.oneOfType([P.string,P.number]),triangle:P.oneOf(["hide","top-left","top-right"]),colors:P.arrayOf(P.string),styles:P.object};os.defaultProps={width:276,colors:["#FF6900","#FCB900","#7BDCB5","#00D084","#8ED1FC","#0693E3","#ABB8C3","#EB144C","#F78DA7","#9900EF"],triangle:"top-left",styles:{}};ze(os);var as=function(t){var r=ee({default:{picker:{width:"20px",height:"20px",borderRadius:"22px",border:"2px #fff solid",transform:"translate(-12px, -13px)",background:"hsl("+Math.round(t.hsl.h)+", "+Math.round(t.hsl.s*100)+"%, "+Math.round(t.hsl.l*100)+"%)"}}});return d.createElement("div",{style:r.picker})};as.propTypes={hsl:P.shape({h:P.number,s:P.number,l:P.number,a:P.number})};as.defaultProps={hsl:{a:1,h:249.94,l:.2,s:.5}};var is=function(t){var r=ee({default:{picker:{width:"20px",height:"20px",borderRadius:"22px",transform:"translate(-10px, -7px)",background:"hsl("+Math.round(t.hsl.h)+", 100%, 50%)",border:"2px white solid"}}});return d.createElement("div",{style:r.picker})};is.propTypes={hsl:P.shape({h:P.number,s:P.number,l:P.number,a:P.number})};is.defaultProps={hsl:{a:1,h:249.94,l:.2,s:.5}};var fD=function(t){var r=t.onChange,n=t.rgb,o=t.hsl,a=t.hex,i=t.hsv,s=function(h,b){if(h.hex)Ut(h.hex)&&r({hex:h.hex,source:"hex"},b);else if(h.rgb){var g=h.rgb.split(",");fa(h.rgb,"rgb")&&r({r:g[0],g:g[1],b:g[2],a:1,source:"rgb"},b)}else if(h.hsv){var m=h.hsv.split(",");fa(h.hsv,"hsv")&&(m[2]=m[2].replace("%",""),m[1]=m[1].replace("%",""),m[0]=m[0].replace("°",""),m[1]==1?m[1]=.01:m[2]==1&&(m[2]=.01),r({h:Number(m[0]),s:Number(m[1]),v:Number(m[2]),source:"hsv"},b))}else if(h.hsl){var w=h.hsl.split(",");fa(h.hsl,"hsl")&&(w[2]=w[2].replace("%",""),w[1]=w[1].replace("%",""),w[0]=w[0].replace("°",""),p[1]==1?p[1]=.01:p[2]==1&&(p[2]=.01),r({h:Number(w[0]),s:Number(w[1]),v:Number(w[2]),source:"hsl"},b))}},l=ee({default:{wrap:{display:"flex",height:"100px",marginTop:"4px"},fields:{width:"100%"},column:{paddingTop:"10px",display:"flex",justifyContent:"space-between"},double:{padding:"0px 4.4px",boxSizing:"border-box"},input:{width:"100%",height:"38px",boxSizing:"border-box",padding:"4px 10% 3px",textAlign:"center",border:"1px solid #dadce0",fontSize:"11px",textTransform:"lowercase",borderRadius:"5px",outline:"none",fontFamily:"Roboto,Arial,sans-serif"},input2:{height:"38px",width:"100%",border:"1px solid #dadce0",boxSizing:"border-box",fontSize:"11px",textTransform:"lowercase",borderRadius:"5px",outline:"none",paddingLeft:"10px",fontFamily:"Roboto,Arial,sans-serif"},label:{textAlign:"center",fontSize:"12px",background:"#fff",position:"absolute",textTransform:"uppercase",color:"#3c4043",width:"35px",top:"-6px",left:"0",right:"0",marginLeft:"auto",marginRight:"auto",fontFamily:"Roboto,Arial,sans-serif"},label2:{left:"10px",textAlign:"center",fontSize:"12px",background:"#fff",position:"absolute",textTransform:"uppercase",color:"#3c4043",width:"32px",top:"-6px",fontFamily:"Roboto,Arial,sans-serif"},single:{flexGrow:"1",margin:"0px 4.4px"}}}),c=n.r+", "+n.g+", "+n.b,u=Math.round(o.h)+"°, "+Math.round(o.s*100)+"%, "+Math.round(o.l*100)+"%",p=Math.round(i.h)+"°, "+Math.round(i.s*100)+"%, "+Math.round(i.v*100)+"%";return d.createElement("div",{style:l.wrap,className:"flexbox-fix"},d.createElement("div",{style:l.fields},d.createElement("div",{style:l.double},d.createElement(ce,{style:{input:l.input,label:l.label},label:"hex",value:a,onChange:s})),d.createElement("div",{style:l.column},d.createElement("div",{style:l.single},d.createElement(ce,{style:{input:l.input2,label:l.label2},label:"rgb",value:c,onChange:s})),d.createElement("div",{style:l.single},d.createElement(ce,{style:{input:l.input2,label:l.label2},label:"hsv",value:p,onChange:s})),d.createElement("div",{style:l.single},d.createElement(ce,{style:{input:l.input2,label:l.label2},label:"hsl",value:u,onChange:s})))))},ss=function(t){var r=t.width,n=t.onChange,o=t.rgb,a=t.hsl,i=t.hsv,s=t.hex,l=t.header,c=t.styles,u=c===void 0?{}:c,p=t.className,f=p===void 0?"":p,h=ee(He({default:{picker:{width:r,background:"#fff",border:"1px solid #dfe1e5",boxSizing:"initial",display:"flex",flexWrap:"wrap",borderRadius:"8px 8px 0px 0px"},head:{height:"57px",width:"100%",paddingTop:"16px",paddingBottom:"16px",paddingLeft:"16px",fontSize:"20px",boxSizing:"border-box",fontFamily:"Roboto-Regular,HelveticaNeue,Arial,sans-serif"},saturation:{width:"70%",padding:"0px",position:"relative",overflow:"hidden"},swatch:{width:"30%",height:"228px",padding:"0px",background:"rgba("+o.r+", "+o.g+", "+o.b+", 1)",position:"relative",overflow:"hidden"},body:{margin:"auto",width:"95%"},controls:{display:"flex",boxSizing:"border-box",height:"52px",paddingTop:"22px"},color:{width:"32px"},hue:{height:"8px",position:"relative",margin:"0px 16px 0px 16px",width:"100%"},Hue:{radius:"2px"}}},u));return d.createElement("div",{style:h.picker,className:"google-picker "+f},d.createElement("div",{style:h.head},l),d.createElement("div",{style:h.swatch}),d.createElement("div",{style:h.saturation},d.createElement(Do,{hsl:a,hsv:i,pointer:as,onChange:n})),d.createElement("div",{style:h.body},d.createElement("div",{style:h.controls,className:"flexbox-fix"},d.createElement("div",{style:h.hue},d.createElement(Hr,{style:h.Hue,hsl:a,radius:"4px",pointer:is,onChange:n}))),d.createElement(fD,{rgb:o,hsl:a,hex:s,hsv:i,onChange:n})))};ss.propTypes={width:P.oneOfType([P.string,P.number]),styles:P.object,header:P.string};ss.defaultProps={width:652,styles:{},header:"Color picker"};ze(ss);const lp=e=>({type:"custom",label:e.label,render:({field:t,value:r,onChange:n})=>{const[o,a]=d.useState(!1),i=dD(r);return y.jsx(y.Fragment,{children:y.jsxs(ut.FieldLabel,{label:t.label||"Label is undefined",className:"ve-mt-2.5",children:[y.jsx("div",{style:i.swatch,onClick:()=>a(s=>!s),children:y.jsx("div",{style:i.color})}),o&&y.jsxs("div",{style:i.popover,children:[y.jsx("div",{style:i.cover,onClick:()=>a(!1)}),y.jsx(rD,{disableAlpha:!0,color:r,onChange:s=>{n(s.hex)}})]})]})})}}),dD=e=>({color:{width:"36px",height:"14px",borderRadius:"2px",background:e},swatch:{padding:"5px",background:"#fff",borderRadius:"1px",boxShadow:"0 0 0 1px rgba(0,0,0,.1)",display:"inline-block",cursor:"pointer"},popover:{position:"absolute",zIndex:"2"},cover:{position:"fixed",top:"0px",right:"0px",bottom:"0px",left:"0px"}}),cp=e=>{const t={label:e.label,type:"object",objectFields:{}};return Object.entries(e.styles).forEach(([r,n])=>{if("type"in n){const o=pD(n);o&&(t.objectFields[r]=o)}else t.objectFields[r]=cp(n)}),t},pD=e=>{switch(e.type){case"number":return{label:e.label,type:"text"};case"select":return{label:e.label,type:"select",options:e.options};case"color":return lp({label:e.label})}},up=(e,t,r="")=>{const n={};return Object.entries(t.styles).forEach(([o,a])=>{"type"in a?n[o]=(e==null?void 0:e[`--${r}-${o}`])??a.default:n[o]=up(e,a,`${r}-${o}`)}),n},hD=e=>{const{saveTheme:t,themeConfig:r,themeHistory:n,setThemeHistory:o}=e;if(!r)return y.jsx("div",{children:y.jsx(Ta,{children:y.jsx(Aa,{children:"Please contact your developer to set up theme management."})})});const a=(i,s)=>{const l={...n.history[n.index],...Uf(s,i)};gi(l,r);const c={history:[...n.history,l],index:n.index+1};console.log(`handleThemeChange newHistory ${JSON.stringify(c)}`),t({payload:{history:JSON.stringify(c.history),index:c.index}}),o(c)};return y.jsxs("div",{children:[y.jsx(Ta,{children:y.jsx(Aa,{children:"Changes to the theme will affect all templates and layouts for the entire site."})}),Object.entries(r).map(([i,s])=>{const l=cp(s),c=up(n.history[n.index],s,i);return y.jsx(ut.AutoFieldPrivate,{field:l,onChange:u=>a(i,u),value:c},i)})]})},gD=({puckConfig:e,puckInitialHistory:t,isLoading:r,clearHistory:n,templateMetadata:o,saveState:a,saveSaveState:i,saveVisualConfigData:s,sendDevSaveStateData:l,saveThemeData:c,buildVisualConfigLocalStorageKey:u,devLogger:p,themeConfig:f,saveThemeSaveState:h,themeHistory:b,setThemeHistory:g,setPuckRendered:m})=>{const[w,C]=d.useState(!1),E=d.useRef(0),_=o.isThemeMode,S=d.useCallback((U,V)=>{V!==0&&E.current!==V&&U.length>0&&(p.logFunc("handleHistoryChange"),p.logData("PUCK_INDEX",V),p.logData("PUCK_HISTORY",U),E.current=V,p.logFunc("saveToLocalStorage"),window.localStorage.setItem(u(),JSON.stringify(U)),(a==null?void 0:a.hash)!==U[V].id&&(o.isDevMode&&!o.devOverride?(p.logFunc("sendDevSaveStateData"),l({payload:{devSaveStateData:JSON.stringify(U[V].state.data)}})):(p.logFunc("saveSaveState"),i({payload:{hash:U[V].id,history:JSON.stringify(U[V].state)}}))))},[o,$a,a]),O=()=>{n(),E.current=0},M=async U=>{if(_){p.logFunc("saveThemeData"),c({payload:{saveThemeData:JSON.stringify(b==null?void 0:b.history[b==null?void 0:b.index])}});return}p.logFunc("saveVisualConfigData"),s({payload:{visualConfigurationData:JSON.stringify(U)}})},I=async()=>{if(!r&&!w){C(!0);return}};return y.jsx(Pb,{children:y.jsx(ut.Puck,{config:e,data:{},initialHistory:t,onChange:I,overrides:{header:()=>{const{refreshPermissions:U,config:V}=ut.usePuck();return m(!0),d.useEffect(()=>{Object.values(V.components).forEach(Y=>{Y.resolvePermissions=()=>({drag:!_,duplicate:!_,delete:!_,insert:!_,edit:!_})});const K=document.querySelector("[class*='PuckLayout-leftSideBar'] > div[class*='SidebarSection--noBorderTop']");K&&(K.style.display=_?"none":"");const F=document.querySelector("[class*='PuckLayout-rightSideBar'] > div[class*='SidebarSection--noBorderTop'] > div[class*='SidebarSection-title']");F&&(F.style.display=_?"none":""),U()},[_]),jb(O,S,M,o.isDevMode&&!o.devOverride,o.isThemeMode,g,f,b)},actionBar:_?()=>y.jsx(y.Fragment,{}):void 0,components:_?()=>y.jsx(y.Fragment,{}):void 0,fields:_?()=>y.jsx(hD,{themeConfig:f,saveTheme:h,themeHistory:b,setThemeHistory:g}):void 0}})})};var ls="Progress",cs=100,[vD,tj]=zt(ls),[bD,mD]=vD(ls),fp=v.forwardRef((e,t)=>{const{__scopeProgress:r,value:n=null,max:o,getValueLabel:a=yD,...i}=e;(o||o===0)&&!Dc(o)&&console.error(xD(`${o}`,"Progress"));const s=Dc(o)?o:cs;n!==null&&!kc(n,s)&&console.error(wD(`${n}`,"Progress"));const l=kc(n,s)?n:null,c=uo(l)?a(l,s):void 0;return y.jsx(bD,{scope:r,value:l,max:s,children:y.jsx($e.div,{"aria-valuemax":s,"aria-valuemin":0,"aria-valuenow":uo(l)?l:void 0,"aria-valuetext":c,role:"progressbar","data-state":hp(l,s),"data-value":l??void 0,"data-max":s,...i,ref:t})})});fp.displayName=ls;var dp="ProgressIndicator",pp=v.forwardRef((e,t)=>{const{__scopeProgress:r,...n}=e,o=mD(dp,r);return y.jsx($e.div,{"data-state":hp(o.value,o.max),"data-value":o.value??void 0,"data-max":o.max,...n,ref:t})});pp.displayName=dp;function yD(e,t){return`${Math.round(e/t*100)}%`}function hp(e,t){return e==null?"indeterminate":e===t?"complete":"loading"}function uo(e){return typeof e=="number"}function Dc(e){return uo(e)&&!isNaN(e)&&e>0}function kc(e,t){return uo(e)&&!isNaN(e)&&e<=t&&e>=0}function xD(e,t){return`Invalid prop \`max\` of value \`${e}\` supplied to \`${t}\`. Only numbers greater than 0 are valid max values. Defaulting to \`${cs}\`.`}function wD(e,t){return`Invalid prop \`value\` of value \`${e}\` supplied to \`${t}\`. The \`value\` prop must be:
|
|
126
171
|
- a positive number
|
|
127
|
-
- less than the value passed to \`max\` (or ${
|
|
172
|
+
- less than the value passed to \`max\` (or ${cs} if no \`max\` prop is set)
|
|
128
173
|
- \`null\` or \`undefined\` if the progress is indeterminate.
|
|
129
174
|
|
|
130
|
-
Defaulting to \`null\`.`}var Rs=ws,af=Cs;const Ps=d.forwardRef(({className:e,value:t,...n},r)=>v.jsx(Rs,{ref:r,className:de("ve-relative ve-h-4 ve-w-full ve-overflow-hidden ve-rounded-full ve-bg-secondary",e),...n,children:v.jsx(af,{className:"ve-h-full ve-w-full ve-flex-1 ve-bg-primary ve-transition-all",style:{transform:`translateX(-${100-(t||0)}%)`}})}));Ps.displayName=Rs.displayName;function sf({progress:e}){return v.jsxs("div",{className:"ve-flex ve-h-screen ve-loading-wrapper ve-w-screen ve-flex-col ve-items-center ve-justify-center",children:[v.jsx(Ps,{className:"ve-w-1/3 ve-loading-progress",value:e}),v.jsx("div",{children:"Loading Visual Editor..."})]})}var bo=["light","dark"],cf="(prefers-color-scheme: dark)",lf=d.createContext(void 0),uf={setTheme:e=>{},themes:[]},df=()=>{var e;return(e=d.useContext(lf))!=null?e:uf};d.memo(({forcedTheme:e,storageKey:t,attribute:n,enableSystem:r,enableColorScheme:o,defaultTheme:a,value:s,attrs:i,nonce:c})=>{let u=a==="system",f=n==="class"?`var d=document.documentElement,c=d.classList;${`c.remove(${i.map(y=>`'${y}'`).join(",")})`};`:`var d=document.documentElement,n='${n}',s='setAttribute';`,p=o?bo.includes(a)&&a?`if(e==='light'||e==='dark'||!e)d.style.colorScheme=e||'${a}'`:"if(e==='light'||e==='dark')d.style.colorScheme=e":"",l=(y,h=!1,b=!0)=>{let x=s?s[y]:y,w=h?y+"|| ''":`'${x}'`,C="";return o&&b&&!h&&bo.includes(y)&&(C+=`d.style.colorScheme = '${y}';`),n==="class"?h||x?C+=`c.add(${w})`:C+="null":x&&(C+=`d[s](n,${w})`),C},g=e?`!function(){${f}${l(e)}}()`:r?`!function(){try{${f}var e=localStorage.getItem('${t}');if('system'===e||(!e&&${u})){var t='${cf}',m=window.matchMedia(t);if(m.media!==t||m.matches){${l("dark")}}else{${l("light")}}}else if(e){${s?`var x=${JSON.stringify(s)};`:""}${l(s?"x[e]":"e",!0)}}${u?"":"else{"+l(a,!1,!1)+"}"}${p}}catch(e){}}()`:`!function(){try{${f}var e=localStorage.getItem('${t}');if(e){${s?`var x=${JSON.stringify(s)};`:""}${l(s?"x[e]":"e",!0)}}else{${l(a,!1,!1)};}${p}}catch(t){}}();`;return d.createElement("script",{nonce:c,dangerouslySetInnerHTML:{__html:g}})});var ff=e=>{switch(e){case"success":return mf;case"info":return hf;case"warning":return gf;case"error":return yf;default:return null}},pf=Array(12).fill(0),vf=({visible:e})=>E.createElement("div",{className:"sonner-loading-wrapper","data-visible":e},E.createElement("div",{className:"sonner-spinner"},pf.map((t,n)=>E.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${n}`})))),mf=E.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},E.createElement("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z",clipRule:"evenodd"})),gf=E.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20"},E.createElement("path",{fillRule:"evenodd",d:"M9.401 3.003c1.155-2 4.043-2 5.197 0l7.355 12.748c1.154 2-.29 4.5-2.599 4.5H4.645c-2.309 0-3.752-2.5-2.598-4.5L9.4 3.003zM12 8.25a.75.75 0 01.75.75v3.75a.75.75 0 01-1.5 0V9a.75.75 0 01.75-.75zm0 8.25a.75.75 0 100-1.5.75.75 0 000 1.5z",clipRule:"evenodd"})),hf=E.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},E.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a.75.75 0 000 1.5h.253a.25.25 0 01.244.304l-.459 2.066A1.75 1.75 0 0010.747 15H11a.75.75 0 000-1.5h-.253a.25.25 0 01-.244-.304l.459-2.066A1.75 1.75 0 009.253 9H9z",clipRule:"evenodd"})),yf=E.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},E.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z",clipRule:"evenodd"})),bf=()=>{let[e,t]=E.useState(document.hidden);return E.useEffect(()=>{let n=()=>{t(document.hidden)};return document.addEventListener("visibilitychange",n),()=>window.removeEventListener("visibilitychange",n)},[]),e},nr=1,xf=class{constructor(){this.subscribe=e=>(this.subscribers.push(e),()=>{let t=this.subscribers.indexOf(e);this.subscribers.splice(t,1)}),this.publish=e=>{this.subscribers.forEach(t=>t(e))},this.addToast=e=>{this.publish(e),this.toasts=[...this.toasts,e]},this.create=e=>{var t;let{message:n,...r}=e,o=typeof(e==null?void 0:e.id)=="number"||((t=e.id)==null?void 0:t.length)>0?e.id:nr++,a=this.toasts.find(i=>i.id===o),s=e.dismissible===void 0?!0:e.dismissible;return a?this.toasts=this.toasts.map(i=>i.id===o?(this.publish({...i,...e,id:o,title:n}),{...i,...e,id:o,dismissible:s,title:n}):i):this.addToast({title:n,...r,dismissible:s,id:o}),o},this.dismiss=e=>(e||this.toasts.forEach(t=>{this.subscribers.forEach(n=>n({id:t.id,dismiss:!0}))}),this.subscribers.forEach(t=>t({id:e,dismiss:!0})),e),this.message=(e,t)=>this.create({...t,message:e}),this.error=(e,t)=>this.create({...t,message:e,type:"error"}),this.success=(e,t)=>this.create({...t,type:"success",message:e}),this.info=(e,t)=>this.create({...t,type:"info",message:e}),this.warning=(e,t)=>this.create({...t,type:"warning",message:e}),this.loading=(e,t)=>this.create({...t,type:"loading",message:e}),this.promise=(e,t)=>{if(!t)return;let n;t.loading!==void 0&&(n=this.create({...t,promise:e,type:"loading",message:t.loading,description:typeof t.description!="function"?t.description:void 0}));let r=e instanceof Promise?e:e(),o=n!==void 0;return r.then(async a=>{if(Ef(a)&&!a.ok){o=!1;let s=typeof t.error=="function"?await t.error(`HTTP error! status: ${a.status}`):t.error,i=typeof t.description=="function"?await t.description(`HTTP error! status: ${a.status}`):t.description;this.create({id:n,type:"error",message:s,description:i})}else if(t.success!==void 0){o=!1;let s=typeof t.success=="function"?await t.success(a):t.success,i=typeof t.description=="function"?await t.description(a):t.description;this.create({id:n,type:"success",message:s,description:i})}}).catch(async a=>{if(t.error!==void 0){o=!1;let s=typeof t.error=="function"?await t.error(a):t.error,i=typeof t.description=="function"?await t.description(a):t.description;this.create({id:n,type:"error",message:s,description:i})}}).finally(()=>{var a;o&&(this.dismiss(n),n=void 0),(a=t.finally)==null||a.call(t)}),n},this.custom=(e,t)=>{let n=(t==null?void 0:t.id)||nr++;return this.create({jsx:e(n),id:n,...t}),n},this.subscribers=[],this.toasts=[]}},Ee=new xf,wf=(e,t)=>{let n=(t==null?void 0:t.id)||nr++;return Ee.addToast({title:e,...t,id:n}),n},Ef=e=>e&&typeof e=="object"&&"ok"in e&&typeof e.ok=="boolean"&&"status"in e&&typeof e.status=="number",Cf=wf,Sf=()=>Ee.toasts;Object.assign(Cf,{success:Ee.success,info:Ee.info,warning:Ee.warning,error:Ee.error,custom:Ee.custom,message:Ee.message,promise:Ee.promise,dismiss:Ee.dismiss,loading:Ee.loading},{getHistory:Sf});function Rf(e,{insertAt:t}={}){if(typeof document>"u")return;let n=document.head||document.getElementsByTagName("head")[0],r=document.createElement("style");r.type="text/css",t==="top"&&n.firstChild?n.insertBefore(r,n.firstChild):n.appendChild(r),r.styleSheet?r.styleSheet.cssText=e:r.appendChild(document.createTextNode(e))}Rf(`:where(html[dir="ltr"]),:where([data-sonner-toaster][dir="ltr"]){--toast-icon-margin-start: -3px;--toast-icon-margin-end: 4px;--toast-svg-margin-start: -1px;--toast-svg-margin-end: 0px;--toast-button-margin-start: auto;--toast-button-margin-end: 0;--toast-close-button-start: 0;--toast-close-button-end: unset;--toast-close-button-transform: translate(-35%, -35%)}:where(html[dir="rtl"]),:where([data-sonner-toaster][dir="rtl"]){--toast-icon-margin-start: 4px;--toast-icon-margin-end: -3px;--toast-svg-margin-start: 0px;--toast-svg-margin-end: -1px;--toast-button-margin-start: 0;--toast-button-margin-end: auto;--toast-close-button-start: unset;--toast-close-button-end: 0;--toast-close-button-transform: translate(35%, -35%)}:where([data-sonner-toaster]){position:fixed;width:var(--width);font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;--gray1: hsl(0, 0%, 99%);--gray2: hsl(0, 0%, 97.3%);--gray3: hsl(0, 0%, 95.1%);--gray4: hsl(0, 0%, 93%);--gray5: hsl(0, 0%, 90.9%);--gray6: hsl(0, 0%, 88.7%);--gray7: hsl(0, 0%, 85.8%);--gray8: hsl(0, 0%, 78%);--gray9: hsl(0, 0%, 56.1%);--gray10: hsl(0, 0%, 52.3%);--gray11: hsl(0, 0%, 43.5%);--gray12: hsl(0, 0%, 9%);--border-radius: 8px;box-sizing:border-box;padding:0;margin:0;list-style:none;outline:none;z-index:999999999}:where([data-sonner-toaster][data-x-position="right"]){right:max(var(--offset),env(safe-area-inset-right))}:where([data-sonner-toaster][data-x-position="left"]){left:max(var(--offset),env(safe-area-inset-left))}:where([data-sonner-toaster][data-x-position="center"]){left:50%;transform:translate(-50%)}:where([data-sonner-toaster][data-y-position="top"]){top:max(var(--offset),env(safe-area-inset-top))}:where([data-sonner-toaster][data-y-position="bottom"]){bottom:max(var(--offset),env(safe-area-inset-bottom))}:where([data-sonner-toast]){--y: translateY(100%);--lift-amount: calc(var(--lift) * var(--gap));z-index:var(--z-index);position:absolute;opacity:0;transform:var(--y);filter:blur(0);touch-action:none;transition:transform .4s,opacity .4s,height .4s,box-shadow .2s;box-sizing:border-box;outline:none;overflow-wrap:anywhere}:where([data-sonner-toast][data-styled="true"]){padding:16px;background:var(--normal-bg);border:1px solid var(--normal-border);color:var(--normal-text);border-radius:var(--border-radius);box-shadow:0 4px 12px #0000001a;width:var(--width);font-size:13px;display:flex;align-items:center;gap:6px}:where([data-sonner-toast]:focus-visible){box-shadow:0 4px 12px #0000001a,0 0 0 2px #0003}:where([data-sonner-toast][data-y-position="top"]){top:0;--y: translateY(-100%);--lift: 1;--lift-amount: calc(1 * var(--gap))}:where([data-sonner-toast][data-y-position="bottom"]){bottom:0;--y: translateY(100%);--lift: -1;--lift-amount: calc(var(--lift) * var(--gap))}:where([data-sonner-toast]) :where([data-description]){font-weight:400;line-height:1.4;color:inherit}:where([data-sonner-toast]) :where([data-title]){font-weight:500;line-height:1.5;color:inherit}:where([data-sonner-toast]) :where([data-icon]){display:flex;height:16px;width:16px;position:relative;justify-content:flex-start;align-items:center;flex-shrink:0;margin-left:var(--toast-icon-margin-start);margin-right:var(--toast-icon-margin-end)}:where([data-sonner-toast][data-promise="true"]) :where([data-icon])>svg{opacity:0;transform:scale(.8);transform-origin:center;animation:sonner-fade-in .3s ease forwards}:where([data-sonner-toast]) :where([data-icon])>*{flex-shrink:0}:where([data-sonner-toast]) :where([data-icon]) svg{margin-left:var(--toast-svg-margin-start);margin-right:var(--toast-svg-margin-end)}:where([data-sonner-toast]) :where([data-content]){display:flex;flex-direction:column;gap:2px}[data-sonner-toast][data-styled=true] [data-button]{border-radius:4px;padding-left:8px;padding-right:8px;height:24px;font-size:12px;color:var(--normal-bg);background:var(--normal-text);margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end);border:none;cursor:pointer;outline:none;display:flex;align-items:center;flex-shrink:0;transition:opacity .4s,box-shadow .2s}:where([data-sonner-toast]) :where([data-button]):focus-visible{box-shadow:0 0 0 2px #0006}:where([data-sonner-toast]) :where([data-button]):first-of-type{margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end)}:where([data-sonner-toast]) :where([data-cancel]){color:var(--normal-text);background:rgba(0,0,0,.08)}:where([data-sonner-toast][data-theme="dark"]) :where([data-cancel]){background:rgba(255,255,255,.3)}:where([data-sonner-toast]) :where([data-close-button]){position:absolute;left:var(--toast-close-button-start);right:var(--toast-close-button-end);top:0;height:20px;width:20px;display:flex;justify-content:center;align-items:center;padding:0;background:var(--gray1);color:var(--gray12);border:1px solid var(--gray4);transform:var(--toast-close-button-transform);border-radius:50%;cursor:pointer;z-index:1;transition:opacity .1s,background .2s,border-color .2s}:where([data-sonner-toast]) :where([data-close-button]):focus-visible{box-shadow:0 4px 12px #0000001a,0 0 0 2px #0003}:where([data-sonner-toast]) :where([data-disabled="true"]){cursor:not-allowed}:where([data-sonner-toast]):hover :where([data-close-button]):hover{background:var(--gray2);border-color:var(--gray5)}:where([data-sonner-toast][data-swiping="true"]):before{content:"";position:absolute;left:0;right:0;height:100%;z-index:-1}:where([data-sonner-toast][data-y-position="top"][data-swiping="true"]):before{bottom:50%;transform:scaleY(3) translateY(50%)}:where([data-sonner-toast][data-y-position="bottom"][data-swiping="true"]):before{top:50%;transform:scaleY(3) translateY(-50%)}:where([data-sonner-toast][data-swiping="false"][data-removed="true"]):before{content:"";position:absolute;inset:0;transform:scaleY(2)}:where([data-sonner-toast]):after{content:"";position:absolute;left:0;height:calc(var(--gap) + 1px);bottom:100%;width:100%}:where([data-sonner-toast][data-mounted="true"]){--y: translateY(0);opacity:1}:where([data-sonner-toast][data-expanded="false"][data-front="false"]){--scale: var(--toasts-before) * .05 + 1;--y: translateY(calc(var(--lift-amount) * var(--toasts-before))) scale(calc(-1 * var(--scale)));height:var(--front-toast-height)}:where([data-sonner-toast])>*{transition:opacity .4s}:where([data-sonner-toast][data-expanded="false"][data-front="false"][data-styled="true"])>*{opacity:0}:where([data-sonner-toast][data-visible="false"]){opacity:0;pointer-events:none}:where([data-sonner-toast][data-mounted="true"][data-expanded="true"]){--y: translateY(calc(var(--lift) * var(--offset)));height:var(--initial-height)}:where([data-sonner-toast][data-removed="true"][data-front="true"][data-swipe-out="false"]){--y: translateY(calc(var(--lift) * -100%));opacity:0}:where([data-sonner-toast][data-removed="true"][data-front="false"][data-swipe-out="false"][data-expanded="true"]){--y: translateY(calc(var(--lift) * var(--offset) + var(--lift) * -100%));opacity:0}:where([data-sonner-toast][data-removed="true"][data-front="false"][data-swipe-out="false"][data-expanded="false"]){--y: translateY(40%);opacity:0;transition:transform .5s,opacity .2s}:where([data-sonner-toast][data-removed="true"][data-front="false"]):before{height:calc(var(--initial-height) + 20%)}[data-sonner-toast][data-swiping=true]{transform:var(--y) translateY(var(--swipe-amount, 0px));transition:none}[data-sonner-toast][data-swipe-out=true][data-y-position=bottom],[data-sonner-toast][data-swipe-out=true][data-y-position=top]{animation:swipe-out .2s ease-out forwards}@keyframes swipe-out{0%{transform:translateY(calc(var(--lift) * var(--offset) + var(--swipe-amount)));opacity:1}to{transform:translateY(calc(var(--lift) * var(--offset) + var(--swipe-amount) + var(--lift) * -100%));opacity:0}}@media (max-width: 600px){[data-sonner-toaster]{position:fixed;--mobile-offset: 16px;right:var(--mobile-offset);left:var(--mobile-offset);width:100%}[data-sonner-toaster] [data-sonner-toast]{left:0;right:0;width:calc(100% - var(--mobile-offset) * 2)}[data-sonner-toaster][data-x-position=left]{left:var(--mobile-offset)}[data-sonner-toaster][data-y-position=bottom]{bottom:20px}[data-sonner-toaster][data-y-position=top]{top:20px}[data-sonner-toaster][data-x-position=center]{left:var(--mobile-offset);right:var(--mobile-offset);transform:none}}[data-sonner-toaster][data-theme=light]{--normal-bg: #fff;--normal-border: var(--gray4);--normal-text: var(--gray12);--success-bg: hsl(143, 85%, 96%);--success-border: hsl(145, 92%, 91%);--success-text: hsl(140, 100%, 27%);--info-bg: hsl(208, 100%, 97%);--info-border: hsl(221, 91%, 91%);--info-text: hsl(210, 92%, 45%);--warning-bg: hsl(49, 100%, 97%);--warning-border: hsl(49, 91%, 91%);--warning-text: hsl(31, 92%, 45%);--error-bg: hsl(359, 100%, 97%);--error-border: hsl(359, 100%, 94%);--error-text: hsl(360, 100%, 45%)}[data-sonner-toaster][data-theme=light] [data-sonner-toast][data-invert=true]{--normal-bg: #000;--normal-border: hsl(0, 0%, 20%);--normal-text: var(--gray1)}[data-sonner-toaster][data-theme=dark] [data-sonner-toast][data-invert=true]{--normal-bg: #fff;--normal-border: var(--gray3);--normal-text: var(--gray12)}[data-sonner-toaster][data-theme=dark]{--normal-bg: #000;--normal-border: hsl(0, 0%, 20%);--normal-text: var(--gray1);--success-bg: hsl(150, 100%, 6%);--success-border: hsl(147, 100%, 12%);--success-text: hsl(150, 86%, 65%);--info-bg: hsl(215, 100%, 6%);--info-border: hsl(223, 100%, 12%);--info-text: hsl(216, 87%, 65%);--warning-bg: hsl(64, 100%, 6%);--warning-border: hsl(60, 100%, 12%);--warning-text: hsl(46, 87%, 65%);--error-bg: hsl(358, 76%, 10%);--error-border: hsl(357, 89%, 16%);--error-text: hsl(358, 100%, 81%)}[data-rich-colors=true][data-sonner-toast][data-type=success],[data-rich-colors=true][data-sonner-toast][data-type=success] [data-close-button]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=info],[data-rich-colors=true][data-sonner-toast][data-type=info] [data-close-button]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning],[data-rich-colors=true][data-sonner-toast][data-type=warning] [data-close-button]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=error],[data-rich-colors=true][data-sonner-toast][data-type=error] [data-close-button]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}.sonner-loading-wrapper{--size: 16px;height:var(--size);width:var(--size);position:absolute;inset:0;z-index:10}.sonner-loading-wrapper[data-visible=false]{transform-origin:center;animation:sonner-fade-out .2s ease forwards}.sonner-spinner{position:relative;top:50%;left:50%;height:var(--size);width:var(--size)}.sonner-loading-bar{animation:sonner-spin 1.2s linear infinite;background:var(--gray11);border-radius:6px;height:8%;left:-10%;position:absolute;top:-3.9%;width:24%}.sonner-loading-bar:nth-child(1){animation-delay:-1.2s;transform:rotate(.0001deg) translate(146%)}.sonner-loading-bar:nth-child(2){animation-delay:-1.1s;transform:rotate(30deg) translate(146%)}.sonner-loading-bar:nth-child(3){animation-delay:-1s;transform:rotate(60deg) translate(146%)}.sonner-loading-bar:nth-child(4){animation-delay:-.9s;transform:rotate(90deg) translate(146%)}.sonner-loading-bar:nth-child(5){animation-delay:-.8s;transform:rotate(120deg) translate(146%)}.sonner-loading-bar:nth-child(6){animation-delay:-.7s;transform:rotate(150deg) translate(146%)}.sonner-loading-bar:nth-child(7){animation-delay:-.6s;transform:rotate(180deg) translate(146%)}.sonner-loading-bar:nth-child(8){animation-delay:-.5s;transform:rotate(210deg) translate(146%)}.sonner-loading-bar:nth-child(9){animation-delay:-.4s;transform:rotate(240deg) translate(146%)}.sonner-loading-bar:nth-child(10){animation-delay:-.3s;transform:rotate(270deg) translate(146%)}.sonner-loading-bar:nth-child(11){animation-delay:-.2s;transform:rotate(300deg) translate(146%)}.sonner-loading-bar:nth-child(12){animation-delay:-.1s;transform:rotate(330deg) translate(146%)}@keyframes sonner-fade-in{0%{opacity:0;transform:scale(.8)}to{opacity:1;transform:scale(1)}}@keyframes sonner-fade-out{0%{opacity:1;transform:scale(1)}to{opacity:0;transform:scale(.8)}}@keyframes sonner-spin{0%{opacity:1}to{opacity:.15}}@media (prefers-reduced-motion){[data-sonner-toast],[data-sonner-toast]>*,.sonner-loading-bar{transition:none!important;animation:none!important}}.sonner-loader{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);transform-origin:center;transition:opacity .2s,transform .2s}.sonner-loader[data-visible=false]{opacity:0;transform:scale(.8) translate(-50%,-50%)}
|
|
131
|
-
`);function nn(e){return e.label!==void 0}var Pf=3,Af="32px",Tf=4e3,Nf=356,Of=14,Df=20,kf=200;function _f(...e){return e.filter(Boolean).join(" ")}var jf=e=>{var t,n,r,o,a,s,i,c,u,f;let{invert:p,toast:l,unstyled:g,interacting:y,setHeights:h,visibleToasts:b,heights:x,index:w,toasts:C,expanded:P,removeToast:R,defaultRichColors:D,closeButton:A,style:O,cancelButtonStyle:$,actionButtonStyle:M,className:z="",descriptionClassName:k="",duration:I,position:B,gap:q,loadingIcon:_,expandByDefault:X,classNames:N,icons:U,closeButtonAriaLabel:se="Close toast",pauseWhenPageIsHidden:L,cn:H}=e,[J,G]=E.useState(!1),[ne,V]=E.useState(!1),[fe,me]=E.useState(!1),[Re,xe]=E.useState(!1),[ut,Me]=E.useState(0),[Ie,rt]=E.useState(0),Le=E.useRef(null),he=E.useRef(null),dt=w===0,ft=w+1<=b,ie=l.type,Ge=l.dismissible!==!1,Rn=l.className||"",Tt=l.descriptionClassName||"",pt=E.useMemo(()=>x.findIndex(F=>F.toastId===l.id)||0,[x,l.id]),Pn=E.useMemo(()=>{var F;return(F=l.closeButton)!=null?F:A},[l.closeButton,A]),Nt=E.useMemo(()=>l.duration||I||Tf,[l.duration,I]),vt=E.useRef(0),Pe=E.useRef(0),Ht=E.useRef(0),Fe=E.useRef(null),[Ot,Dt]=B.split("-"),Gt=E.useMemo(()=>x.reduce((F,Q,ee)=>ee>=pt?F:F+Q.height,0),[x,pt]),Yt=bf(),An=l.invert||p,kt=ie==="loading";Pe.current=E.useMemo(()=>pt*q+Gt,[pt,Gt]),E.useEffect(()=>{G(!0)},[]),E.useLayoutEffect(()=>{if(!J)return;let F=he.current,Q=F.style.height;F.style.height="auto";let ee=F.getBoundingClientRect().height;F.style.height=Q,rt(ee),h(pe=>pe.find(ye=>ye.toastId===l.id)?pe.map(ye=>ye.toastId===l.id?{...ye,height:ee}:ye):[{toastId:l.id,height:ee,position:l.position},...pe])},[J,l.title,l.description,h,l.id]);let De=E.useCallback(()=>{V(!0),Me(Pe.current),h(F=>F.filter(Q=>Q.toastId!==l.id)),setTimeout(()=>{R(l)},kf)},[l,R,h,Pe]);E.useEffect(()=>{if(l.promise&&ie==="loading"||l.duration===1/0||l.type==="loading")return;let F,Q=Nt;return P||y||L&&Yt?(()=>{if(Ht.current<vt.current){let ee=new Date().getTime()-vt.current;Q=Q-ee}Ht.current=new Date().getTime()})():Q!==1/0&&(vt.current=new Date().getTime(),F=setTimeout(()=>{var ee;(ee=l.onAutoClose)==null||ee.call(l,l),De()},Q)),()=>clearTimeout(F)},[P,y,X,l,Nt,De,l.promise,ie,L,Yt]),E.useEffect(()=>{let F=he.current;if(F){let Q=F.getBoundingClientRect().height;return rt(Q),h(ee=>[{toastId:l.id,height:Q,position:l.position},...ee]),()=>h(ee=>ee.filter(pe=>pe.toastId!==l.id))}},[h,l.id]),E.useEffect(()=>{l.delete&&De()},[De,l.delete]);function Tn(){return U!=null&&U.loading?E.createElement("div",{className:"sonner-loader","data-visible":ie==="loading"},U.loading):_?E.createElement("div",{className:"sonner-loader","data-visible":ie==="loading"},_):E.createElement(vf,{visible:ie==="loading"})}return E.createElement("li",{"aria-live":l.important?"assertive":"polite","aria-atomic":"true",role:"status",tabIndex:0,ref:he,className:H(z,Rn,N==null?void 0:N.toast,(t=l==null?void 0:l.classNames)==null?void 0:t.toast,N==null?void 0:N.default,N==null?void 0:N[ie],(n=l==null?void 0:l.classNames)==null?void 0:n[ie]),"data-sonner-toast":"","data-rich-colors":(r=l.richColors)!=null?r:D,"data-styled":!(l.jsx||l.unstyled||g),"data-mounted":J,"data-promise":!!l.promise,"data-removed":ne,"data-visible":ft,"data-y-position":Ot,"data-x-position":Dt,"data-index":w,"data-front":dt,"data-swiping":fe,"data-dismissible":Ge,"data-type":ie,"data-invert":An,"data-swipe-out":Re,"data-expanded":!!(P||X&&J),style:{"--index":w,"--toasts-before":w,"--z-index":C.length-w,"--offset":`${ne?ut:Pe.current}px`,"--initial-height":X?"auto":`${Ie}px`,...O,...l.style},onPointerDown:F=>{kt||!Ge||(Le.current=new Date,Me(Pe.current),F.target.setPointerCapture(F.pointerId),F.target.tagName!=="BUTTON"&&(me(!0),Fe.current={x:F.clientX,y:F.clientY}))},onPointerUp:()=>{var F,Q,ee,pe;if(Re||!Ge)return;Fe.current=null;let ye=Number(((F=he.current)==null?void 0:F.style.getPropertyValue("--swipe-amount").replace("px",""))||0),Ye=new Date().getTime()-((Q=Le.current)==null?void 0:Q.getTime()),Kt=Math.abs(ye)/Ye;if(Math.abs(ye)>=Df||Kt>.11){Me(Pe.current),(ee=l.onDismiss)==null||ee.call(l,l),De(),xe(!0);return}(pe=he.current)==null||pe.style.setProperty("--swipe-amount","0px"),me(!1)},onPointerMove:F=>{var Q;if(!Fe.current||!Ge)return;let ee=F.clientY-Fe.current.y,pe=F.clientX-Fe.current.x,ye=(Ot==="top"?Math.min:Math.max)(0,ee),Ye=F.pointerType==="touch"?10:2;Math.abs(ye)>Ye?(Q=he.current)==null||Q.style.setProperty("--swipe-amount",`${ee}px`):Math.abs(pe)>Ye&&(Fe.current=null)}},Pn&&!l.jsx?E.createElement("button",{"aria-label":se,"data-disabled":kt,"data-close-button":!0,onClick:kt||!Ge?()=>{}:()=>{var F;De(),(F=l.onDismiss)==null||F.call(l,l)},className:H(N==null?void 0:N.closeButton,(o=l==null?void 0:l.classNames)==null?void 0:o.closeButton)},E.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"},E.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),E.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"}))):null,l.jsx||E.isValidElement(l.title)?l.jsx||l.title:E.createElement(E.Fragment,null,ie||l.icon||l.promise?E.createElement("div",{"data-icon":"",className:H(N==null?void 0:N.icon,(a=l==null?void 0:l.classNames)==null?void 0:a.icon)},l.promise||l.type==="loading"&&!l.icon?l.icon||Tn():null,l.type!=="loading"?l.icon||(U==null?void 0:U[ie])||ff(ie):null):null,E.createElement("div",{"data-content":"",className:H(N==null?void 0:N.content,(s=l==null?void 0:l.classNames)==null?void 0:s.content)},E.createElement("div",{"data-title":"",className:H(N==null?void 0:N.title,(i=l==null?void 0:l.classNames)==null?void 0:i.title)},l.title),l.description?E.createElement("div",{"data-description":"",className:H(k,Tt,N==null?void 0:N.description,(c=l==null?void 0:l.classNames)==null?void 0:c.description)},l.description):null),E.isValidElement(l.cancel)?l.cancel:l.cancel&&nn(l.cancel)?E.createElement("button",{"data-button":!0,"data-cancel":!0,style:l.cancelButtonStyle||$,onClick:F=>{var Q,ee;nn(l.cancel)&&Ge&&((ee=(Q=l.cancel).onClick)==null||ee.call(Q,F),De())},className:H(N==null?void 0:N.cancelButton,(u=l==null?void 0:l.classNames)==null?void 0:u.cancelButton)},l.cancel.label):null,E.isValidElement(l.action)?l.action:l.action&&nn(l.action)?E.createElement("button",{"data-button":!0,"data-action":!0,style:l.actionButtonStyle||M,onClick:F=>{var Q,ee;nn(l.action)&&(F.defaultPrevented||((ee=(Q=l.action).onClick)==null||ee.call(Q,F),De()))},className:H(N==null?void 0:N.actionButton,(f=l==null?void 0:l.classNames)==null?void 0:f.actionButton)},l.action.label):null))};function xo(){if(typeof window>"u"||typeof document>"u")return"ltr";let e=document.documentElement.getAttribute("dir");return e==="auto"||!e?window.getComputedStyle(document.documentElement).direction:e}var Mf=e=>{let{invert:t,position:n="bottom-right",hotkey:r=["altKey","KeyT"],expand:o,closeButton:a,className:s,offset:i,theme:c="light",richColors:u,duration:f,style:p,visibleToasts:l=Pf,toastOptions:g,dir:y=xo(),gap:h=Of,loadingIcon:b,icons:x,containerAriaLabel:w="Notifications",pauseWhenPageIsHidden:C,cn:P=_f}=e,[R,D]=E.useState([]),A=E.useMemo(()=>Array.from(new Set([n].concat(R.filter(L=>L.position).map(L=>L.position)))),[R,n]),[O,$]=E.useState([]),[M,z]=E.useState(!1),[k,I]=E.useState(!1),[B,q]=E.useState(c!=="system"?c:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),_=E.useRef(null),X=r.join("+").replace(/Key/g,"").replace(/Digit/g,""),N=E.useRef(null),U=E.useRef(!1),se=E.useCallback(L=>{var H;(H=R.find(J=>J.id===L.id))!=null&&H.delete||Ee.dismiss(L.id),D(J=>J.filter(({id:G})=>G!==L.id))},[R]);return E.useEffect(()=>Ee.subscribe(L=>{if(L.dismiss){D(H=>H.map(J=>J.id===L.id?{...J,delete:!0}:J));return}setTimeout(()=>{ir.flushSync(()=>{D(H=>{let J=H.findIndex(G=>G.id===L.id);return J!==-1?[...H.slice(0,J),{...H[J],...L},...H.slice(J+1)]:[L,...H]})})})}),[]),E.useEffect(()=>{if(c!=="system"){q(c);return}c==="system"&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?q("dark"):q("light")),typeof window<"u"&&window.matchMedia("(prefers-color-scheme: dark)").addEventListener("change",({matches:L})=>{q(L?"dark":"light")})},[c]),E.useEffect(()=>{R.length<=1&&z(!1)},[R]),E.useEffect(()=>{let L=H=>{var J,G;r.every(ne=>H[ne]||H.code===ne)&&(z(!0),(J=_.current)==null||J.focus()),H.code==="Escape"&&(document.activeElement===_.current||(G=_.current)!=null&&G.contains(document.activeElement))&&z(!1)};return document.addEventListener("keydown",L),()=>document.removeEventListener("keydown",L)},[r]),E.useEffect(()=>{if(_.current)return()=>{N.current&&(N.current.focus({preventScroll:!0}),N.current=null,U.current=!1)}},[_.current]),R.length?E.createElement("section",{"aria-label":`${w} ${X}`,tabIndex:-1},A.map((L,H)=>{var J;let[G,ne]=L.split("-");return E.createElement("ol",{key:L,dir:y==="auto"?xo():y,tabIndex:-1,ref:_,className:s,"data-sonner-toaster":!0,"data-theme":B,"data-y-position":G,"data-x-position":ne,style:{"--front-toast-height":`${((J=O[0])==null?void 0:J.height)||0}px`,"--offset":typeof i=="number"?`${i}px`:i||Af,"--width":`${Nf}px`,"--gap":`${h}px`,...p},onBlur:V=>{U.current&&!V.currentTarget.contains(V.relatedTarget)&&(U.current=!1,N.current&&(N.current.focus({preventScroll:!0}),N.current=null))},onFocus:V=>{V.target instanceof HTMLElement&&V.target.dataset.dismissible==="false"||U.current||(U.current=!0,N.current=V.relatedTarget)},onMouseEnter:()=>z(!0),onMouseMove:()=>z(!0),onMouseLeave:()=>{k||z(!1)},onPointerDown:V=>{V.target instanceof HTMLElement&&V.target.dataset.dismissible==="false"||I(!0)},onPointerUp:()=>I(!1)},R.filter(V=>!V.position&&H===0||V.position===L).map((V,fe)=>{var me,Re;return E.createElement(jf,{key:V.id,icons:x,index:fe,toast:V,defaultRichColors:u,duration:(me=g==null?void 0:g.duration)!=null?me:f,className:g==null?void 0:g.className,descriptionClassName:g==null?void 0:g.descriptionClassName,invert:t,visibleToasts:l,closeButton:(Re=g==null?void 0:g.closeButton)!=null?Re:a,interacting:k,position:L,style:g==null?void 0:g.style,unstyled:g==null?void 0:g.unstyled,classNames:g==null?void 0:g.classNames,cancelButtonStyle:g==null?void 0:g.cancelButtonStyle,actionButtonStyle:g==null?void 0:g.actionButtonStyle,removeToast:se,toasts:R.filter(xe=>xe.position==V.position),heights:O.filter(xe=>xe.position==V.position),setHeights:$,expandByDefault:o,gap:h,loadingIcon:b,expanded:M,pauseWhenPageIsHidden:C,cn:P})}))})):null};const If=({...e})=>{const{theme:t="system"}=df();return v.jsx(Mf,{theme:t,className:"toaster group",toastOptions:{classNames:{toast:"group toast group-[.toaster]:ve-bg-background group-[.toaster]:ve-text-foreground group-[.toaster]:ve-border-border group-[.toaster]:ve-shadow-lg",description:"group-[.toast]:ve-text-muted-foreground",actionButton:"group-[.toast]:ve-bg-primary group-[.toast]:ve-text-primary-foreground",cancelButton:"group-[.toast]:ve-bg-muted group-[.toast]:ve-text-muted-foreground"}},...e})},As=(e,t,n="*")=>t==null?void 0:t.postMessage(e,{targetOrigin:n}),at=(e,t)=>{const[n,r]=E.useState("pending");return Ts(e,t,Lf(r)),{sendToParent:a=>{if(!window.parent)throw new Error("Parent window has closed");r("pending");for(const s of t)As({...a,type:e},window.parent,s)},status:n}},Et=(e,t,n)=>{Ts(e,t,(o,a,s)=>{const{type:i,payload:c}=o;i===e&&typeof n=="function"&&n(u=>As({...u,type:e},s,a),c)})},Ts=(e,t,n)=>{const[r,o]=E.useState(),[a,s]=E.useState(),i=E.useRef(),c=E.useRef();i.current=r,c.current=a;const u=E.useCallback(({origin:f,source:p,data:l})=>{var y;if((y=l==null?void 0:l.source)!=null&&y.startsWith("react-devtools")||!t.includes(f))return;const{type:g}=l;g===e&&(s(p),o(f),n(l,f,p))},[e,t,s,o,n]);E.useEffect(()=>(window.addEventListener("message",u),()=>window.removeEventListener("message",u)),[e,a,r,u])},Lf=e=>(t,n,r)=>{const{status:o}=t;o==="success"?e("success"):o==="error"&&e("error")};class Ff{constructor(t=!1){_t(this,"enable",t=>{this.enabled=t,this.enabled&&console.log("[DEBUG] xYextDebug enabled")});_t(this,"logData",(t,n)=>{this.enabled&&console.log("[DEBUG]",t,"-",n)});_t(this,"logFunc",t=>{this.enabled&&console.log("[DEBUG] -->",t,"called")});_t(this,"log",t=>{this.enabled&&console.log("[DEBUG]",t)});this.enabled=t,this.enabled&&console.log("[DEBUG] xYextDebug enabled")}}const $f={GLOBAL:"global",INDIVIDUAL:"individual"},we=["http://localhost","https://dev.yext.com","https://qa.yext.com","https://sandbox.yext.com","https://www.yext.com","https://app-qa.eu.yext.com","https://app.eu.yext.com"],ve=new Ff,Bf=({document:e,componentRegistry:t,themeConfig:n})=>{const[r,o]=E.useState(),[a,s]=E.useState(!1),[i,c]=E.useState(),[u,f]=E.useState(!1),[p,l]=E.useState(),[g,y]=E.useState(!1),[h,b]=E.useState(void 0),[x,w]=E.useState(void 0),[C,P]=E.useState(),[R,D]=E.useState(),[A,O]=E.useState(!1);e&&ve.logData("DOCUMENT",e);const $=E.useCallback(()=>C?Qn(C.isDevMode&&!C.devOverride,C.role,C.templateId,C.layoutId,C.entityId):"",[C]);E.useEffect(()=>{if(typeof window<"u"){const G=window.location.ancestorOrigins;G.length===0||!G[0].includes("pagescdn")&&!G[0].includes("yext.com")&&!G[0].includes("localhost")?window.location.assign("/404.html"):O(!0)}},[]),Et("getTemplateMetadata",we,(G,ne)=>{const V=t.get(ne.templateId);D(V);const fe=ne;P(ne),ve.enable(fe.isxYextDebug),ve.logData("TEMPLATE_METADATA",fe),ve.logData("PUCK_CONFIG",V),G({status:"success",payload:{message:"payload received"}})}),E.useEffect(()=>{if(C!=null&&C.isDevMode)try{b(pageSets),w(siteStream)}catch{console.warn("pageSets are not defined")}},[C==null?void 0:C.isDevMode]);const M=()=>{ve.logFunc("clearLocalStorage"),window.localStorage.removeItem($())},z=()=>{ve.logFunc("clearHistory"),M(),N()},k=E.useRef(!0);E.useEffect(()=>{if(k.current){k.current=!1;return}I()},[C,g,u]);const I=E.useCallback(()=>{if(!u||!g||!C)return;if(ve.logFunc("loadPuckInitialHistory"),C.isDevMode&&!C.devOverride){const V=window.localStorage.getItem($());if(V){ve.log("Dev Mode - Using localStorage");const fe=JSON.parse(V),me=fe.length-1;o({histories:fe,index:me,appendData:!1}),s(!0);return}ve.log("Dev Mode - No localStorage. Using data from Content"),i&&o({histories:[{id:"root",state:{data:i}}],appendData:!1}),s(!0);return}if(!p){M(),ve.log("Prod Mode - No saveState. Using data from Content"),i&&o({histories:[{id:"root",state:{data:i}}],appendData:!1}),s(!0);return}const G=window.localStorage.getItem($());if(!G){ve.log("Prod Mode - No localStorage. Using saveState"),o({histories:i?[{id:"root",state:{data:i}},{id:p.hash,state:$n(p.history)}]:[{id:p.hash,state:$n(p.history)}],index:i?1:0,appendData:!1}),s(!0);return}const ne=JSON.parse(G).findIndex(V=>V.id===(p==null?void 0:p.hash));if(ne!==-1){ve.log("Prod Mode - Using localStorage"),o({histories:JSON.parse(G),index:ne,appendData:!1}),s(!0);return}M()},[o,s,M,Qn]);E.useEffect(()=>{r&&ve.logData("PUCK_INITIAL_HISTORY",r)},[r]);const{sendToParent:B}=at("iFrameLoaded",we),{sendToParent:q}=at("sendDevSaveStateData",we);E.useEffect(()=>{B({payload:{message:"iFrame is loaded"}})},[]),E.useEffect(()=>{var G;if(C!=null&&C.isDevMode){const ne=window.localStorage.getItem($()),V=ne?JSON.parse(ne):[],fe=JSON.stringify(V.length>0?(G=V[V.length-1].data)==null?void 0:G.data:{});q({payload:{devSaveStateData:fe}})}},[C]),Et("getSaveState",we,(G,ne)=>{ve.logData("SAVE_STATE",ne),l(ne),y(!0),G({status:"success",payload:{message:"saveState received"}})}),Et("getVisualConfigurationData",we,(G,ne)=>{const V=$n(ne.visualConfigurationData);ve.logData("VISUAL_CONFIGURATION_DATA",V),c(V),f(!0),G({status:"success",payload:{message:"getVisualConfigurationData received"}})});const{sendToParent:_}=at("pushPageSets",we);E.useEffect(()=>{typeof window<"u"&&(C!=null&&C.isDevMode)&&h&&_({payload:{...h,siteStream:x}})},[C==null?void 0:C.isDevMode,h]);const{sendToParent:X}=at("saveSaveState",we),{sendToParent:N}=at("deleteSaveState",we),{sendToParent:U}=at("saveVisualConfigData",we),{sendToParent:se}=at("openQuickFind",we),L=G=>{(G.ctrlKey||G.metaKey)&&G.key==="k"&&se()};E.useEffect(()=>(window.addEventListener("keydown",L),()=>{window.removeEventListener("keydown",L)}),[]);const H=!R||!C||!e||!g||!u||!a,J=100*(!!R+!!C+!!e+g+u+a)/6;return v.jsxs(v.Fragment,{children:[H?A&&v.jsx(sf,{progress:J}):v.jsx(Zd,{puckConfig:R,isLoading:H,puckInitialHistory:r,clearHistory:C.isDevMode&&!C.devOverride?M:z,templateMetadata:C,saveState:p,saveSaveState:X,saveVisualConfigData:U,sendDevSaveStateData:q,buildLocalStorageKey:$,devLogger:ve,themeConfig:n}),v.jsx(If,{closeButton:!0,richColors:!0})]})},$n=e=>JSON.parse(e.replace(/\\"/g,'"')),Wf=()=>{const[e,t]=E.useState(void 0);return Et("getTemplateStream",we,(n,r)=>{t(r.stream.schema.fields),n({status:"success",payload:{message:"templateStream received"}})}),Et("getDevEntityFields",we,(n,r)=>{t(Vf(r)),n({status:"success",payload:{message:"getDevEntityFields received"}})}),e},Vf=e=>e.map(t=>({name:t.name,definition:{name:t.name,typeName:t.typeName,type:t.type,registryId:t.registryId,typeRegistryId:t.typeRegistryId,isList:t.isList},children:t.children??[]})),Ns=d.createContext(void 0),zf=({entityFields:e,children:t})=>v.jsx(Ns.Provider,{value:e,children:t}),Os=()=>{const e=d.useContext(Ns);if(!e)throw new Error("useEntityFields must be used within a DocumentProvider");return e},Uf=["uid","meta","slug","c_visualConfigurations","c_pages_layouts"],Hf=[],Ds=e=>ks(e,""),ks=(e,t)=>{var o,a,s;const n=t?`${t}.${e.name}`:e.name;if(Hf.includes(_s(e)))return[{name:n,schemaField:e}];if(e.definition.isList)return[];const r=[{name:n,schemaField:e}];if((o=e.children)!=null&&o.fields&&((s=(a=e.children)==null?void 0:a.fields)==null?void 0:s.length)>0)for(const i of e.children.fields)r.push(...ks(i,n));return r},_s=e=>e.definition.typeName||e.definition.typeRegistryId||Object.entries(e.definition.type)[0][1];function Gf(e,t,n){const r=e.get(t)||[];return r.push(n),e.set(t,r),e}const Yf=e=>e.reduce((t,n)=>{const r=Ds(n);for(const o of r){const a=_s(o.schemaField);a&&(t=Gf(t,a,o.name))}return t},new Map),Kf=e=>{let n=Os().filter(o=>!Uf.includes(o.name));if(e!=null&&e.allowList){const o=n.map(a=>a.name);e.allowList.forEach(a=>{o.includes(a)||console.warn(`The entity field filter allowList included ${a}, which does not exist in the stream.`)}),n=n.filter(a=>e.allowList.includes(a.name))}e!=null&&e.disallowList&&(n=n.filter(o=>!e.disallowList.includes(o.name)));let r=[];for(const o of n){const a=Ds(o);for(const s of a)r.push({...s.schemaField,name:s.name})}if(e!=null&&e.types){const o=Yf(r),a=[];e.types.forEach(s=>{a.push(...r.filter(i=>{var c;return(c=o.get(s))==null?void 0:c.includes(i.name)}))}),r=a}return r};function js(e,t=[]){let n=[];function r(a,s){const i=d.createContext(s),c=n.length;n=[...n,s];const u=p=>{var x;const{scope:l,children:g,...y}=p,h=((x=l==null?void 0:l[e])==null?void 0:x[c])||i,b=d.useMemo(()=>y,Object.values(y));return v.jsx(h.Provider,{value:b,children:g})};u.displayName=a+"Provider";function f(p,l){var h;const g=((h=l==null?void 0:l[e])==null?void 0:h[c])||i,y=d.useContext(g);if(y)return y;if(s!==void 0)return s;throw new Error(`\`${p}\` must be used within \`${a}\``)}return[u,f]}const o=()=>{const a=n.map(s=>d.createContext(s));return function(i){const c=(i==null?void 0:i[e])||a;return d.useMemo(()=>({[`__scope${e}`]:{...i,[e]:c}}),[i,c])}};return o.scopeName=e,[r,qf(o,...t)]}function qf(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(o=>({useScope:o(),scopeName:o.scopeName}));return function(a){const s=r.reduce((i,{useScope:c,scopeName:u})=>{const p=c(a)[`__scope${u}`];return{...i,...p}},{});return d.useMemo(()=>({[`__scope${t.scopeName}`]:s}),[s])}};return n.scopeName=t.scopeName,n}function Xf(e){const t=e+"CollectionProvider",[n,r]=nt(t),[o,a]=n(t,{collectionRef:{current:null},itemMap:new Map}),s=g=>{const{scope:y,children:h}=g,b=E.useRef(null),x=E.useRef(new Map).current;return v.jsx(o,{scope:y,itemMap:x,collectionRef:b,children:h})};s.displayName=t;const i=e+"CollectionSlot",c=E.forwardRef((g,y)=>{const{scope:h,children:b}=g,x=a(i,h),w=ue(y,x.collectionRef);return v.jsx(it,{ref:w,children:b})});c.displayName=i;const u=e+"CollectionItemSlot",f="data-radix-collection-item",p=E.forwardRef((g,y)=>{const{scope:h,children:b,...x}=g,w=E.useRef(null),C=ue(y,w),P=a(u,h);return E.useEffect(()=>(P.itemMap.set(w,{ref:w,...x}),()=>void P.itemMap.delete(w))),v.jsx(it,{[f]:"",ref:C,children:b})});p.displayName=u;function l(g){const y=a(e+"CollectionConsumer",g);return E.useCallback(()=>{const b=y.collectionRef.current;if(!b)return[];const x=Array.from(b.querySelectorAll(`[${f}]`));return Array.from(y.itemMap.values()).sort((P,R)=>x.indexOf(P.ref.current)-x.indexOf(R.ref.current))},[y.collectionRef,y.itemMap])}return[{Provider:s,Slot:c,ItemSlot:p},l,r]}var Jf=d.createContext(void 0);function Ms(e){const t=d.useContext(Jf);return e||t||"ltr"}var Bn="rovingFocusGroup.onEntryFocus",Zf={bubbles:!1,cancelable:!0},Sn="RovingFocusGroup",[rr,Is,Qf]=Xf(Sn),[ep,Ls]=nt(Sn,[Qf]),[tp,np]=ep(Sn),Fs=d.forwardRef((e,t)=>v.jsx(rr.Provider,{scope:e.__scopeRovingFocusGroup,children:v.jsx(rr.Slot,{scope:e.__scopeRovingFocusGroup,children:v.jsx(rp,{...e,ref:t})})}));Fs.displayName=Sn;var rp=d.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,orientation:r,loop:o=!1,dir:a,currentTabStopId:s,defaultCurrentTabStopId:i,onCurrentTabStopIdChange:c,onEntryFocus:u,preventScrollOnEntryFocus:f=!1,...p}=e,l=d.useRef(null),g=ue(t,l),y=Ms(a),[h=null,b]=Vt({prop:s,defaultProp:i,onChange:c}),[x,w]=d.useState(!1),C=Ve(u),P=Is(n),R=d.useRef(!1),[D,A]=d.useState(0);return d.useEffect(()=>{const O=l.current;if(O)return O.addEventListener(Bn,C),()=>O.removeEventListener(Bn,C)},[C]),v.jsx(tp,{scope:n,orientation:r,dir:y,loop:o,currentTabStopId:h,onItemFocus:d.useCallback(O=>b(O),[b]),onItemShiftTab:d.useCallback(()=>w(!0),[]),onFocusableItemAdd:d.useCallback(()=>A(O=>O+1),[]),onFocusableItemRemove:d.useCallback(()=>A(O=>O-1),[]),children:v.jsx(ae.div,{tabIndex:x||D===0?-1:0,"data-orientation":r,...p,ref:g,style:{outline:"none",...e.style},onMouseDown:oe(e.onMouseDown,()=>{R.current=!0}),onFocus:oe(e.onFocus,O=>{const $=!R.current;if(O.target===O.currentTarget&&$&&!x){const M=new CustomEvent(Bn,Zf);if(O.currentTarget.dispatchEvent(M),!M.defaultPrevented){const z=P().filter(_=>_.focusable),k=z.find(_=>_.active),I=z.find(_=>_.id===h),q=[k,I,...z].filter(Boolean).map(_=>_.ref.current);Ws(q,f)}}R.current=!1}),onBlur:oe(e.onBlur,()=>w(!1))})})}),$s="RovingFocusGroupItem",Bs=d.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,focusable:r=!0,active:o=!1,tabStopId:a,...s}=e,i=Ft(),c=a||i,u=np($s,n),f=u.currentTabStopId===c,p=Is(n),{onFocusableItemAdd:l,onFocusableItemRemove:g}=u;return d.useEffect(()=>{if(r)return l(),()=>g()},[r,l,g]),v.jsx(rr.ItemSlot,{scope:n,id:c,focusable:r,active:o,children:v.jsx(ae.span,{tabIndex:f?0:-1,"data-orientation":u.orientation,...s,ref:t,onMouseDown:oe(e.onMouseDown,y=>{r?u.onItemFocus(c):y.preventDefault()}),onFocus:oe(e.onFocus,()=>u.onItemFocus(c)),onKeyDown:oe(e.onKeyDown,y=>{if(y.key==="Tab"&&y.shiftKey){u.onItemShiftTab();return}if(y.target!==y.currentTarget)return;const h=sp(y,u.orientation,u.dir);if(h!==void 0){if(y.metaKey||y.ctrlKey||y.altKey||y.shiftKey)return;y.preventDefault();let x=p().filter(w=>w.focusable).map(w=>w.ref.current);if(h==="last")x.reverse();else if(h==="prev"||h==="next"){h==="prev"&&x.reverse();const w=x.indexOf(y.currentTarget);x=u.loop?ip(x,w+1):x.slice(w+1)}setTimeout(()=>Ws(x))}})})})});Bs.displayName=$s;var op={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function ap(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function sp(e,t,n){const r=ap(e.key,n);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(r))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(r)))return op[r]}function Ws(e,t=!1){const n=document.activeElement;for(const r of e)if(r===n||(r.focus({preventScroll:t}),document.activeElement!==n))return}function ip(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var cp=Fs,lp=Bs;function up(e,t){return d.useReducer((n,r)=>t[n][r]??n,e)}var Vs=e=>{const{present:t,children:n}=e,r=dp(t),o=typeof n=="function"?n({present:r.isPresent}):d.Children.only(n),a=ue(r.ref,fp(o));return typeof n=="function"||r.isPresent?d.cloneElement(o,{ref:a}):null};Vs.displayName="Presence";function dp(e){const[t,n]=d.useState(),r=d.useRef({}),o=d.useRef(e),a=d.useRef("none"),s=e?"mounted":"unmounted",[i,c]=up(s,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return d.useEffect(()=>{const u=rn(r.current);a.current=i==="mounted"?u:"none"},[i]),We(()=>{const u=r.current,f=o.current;if(f!==e){const l=a.current,g=rn(u);e?c("MOUNT"):g==="none"||(u==null?void 0:u.display)==="none"?c("UNMOUNT"):c(f&&l!==g?"ANIMATION_OUT":"UNMOUNT"),o.current=e}},[e,c]),We(()=>{if(t){let u;const f=t.ownerDocument.defaultView??window,p=g=>{const h=rn(r.current).includes(g.animationName);if(g.target===t&&h&&(c("ANIMATION_END"),!o.current)){const b=t.style.animationFillMode;t.style.animationFillMode="forwards",u=f.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=b)})}},l=g=>{g.target===t&&(a.current=rn(r.current))};return t.addEventListener("animationstart",l),t.addEventListener("animationcancel",p),t.addEventListener("animationend",p),()=>{f.clearTimeout(u),t.removeEventListener("animationstart",l),t.removeEventListener("animationcancel",p),t.removeEventListener("animationend",p)}}else c("ANIMATION_END")},[t,c]),{isPresent:["mounted","unmountSuspended"].includes(i),ref:d.useCallback(u=>{u&&(r.current=getComputedStyle(u)),n(u)},[])}}function rn(e){return(e==null?void 0:e.animationName)||"none"}function fp(e){var r,o;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var Mr="Radio",[pp,zs]=js(Mr),[vp,mp]=pp(Mr),Us=d.forwardRef((e,t)=>{const{__scopeRadio:n,name:r,checked:o=!1,required:a,disabled:s,value:i="on",onCheck:c,form:u,...f}=e,[p,l]=d.useState(null),g=ue(t,b=>l(b)),y=d.useRef(!1),h=p?u||!!p.closest("form"):!0;return v.jsxs(vp,{scope:n,checked:o,disabled:s,children:[v.jsx(ae.button,{type:"button",role:"radio","aria-checked":o,"data-state":Ys(o),"data-disabled":s?"":void 0,disabled:s,value:i,...f,ref:g,onClick:oe(e.onClick,b=>{o||c==null||c(),h&&(y.current=b.isPropagationStopped(),y.current||b.stopPropagation())})}),h&&v.jsx(gp,{control:p,bubbles:!y.current,name:r,value:i,checked:o,required:a,disabled:s,form:u,style:{transform:"translateX(-100%)"}})]})});Us.displayName=Mr;var Hs="RadioIndicator",Gs=d.forwardRef((e,t)=>{const{__scopeRadio:n,forceMount:r,...o}=e,a=mp(Hs,n);return v.jsx(Vs,{present:r||a.checked,children:v.jsx(ae.span,{"data-state":Ys(a.checked),"data-disabled":a.disabled?"":void 0,...o,ref:t})})});Gs.displayName=Hs;var gp=e=>{const{control:t,checked:n,bubbles:r=!0,...o}=e,a=d.useRef(null),s=Ia(n),i=hr(t);return d.useEffect(()=>{const c=a.current,u=window.HTMLInputElement.prototype,p=Object.getOwnPropertyDescriptor(u,"checked").set;if(s!==n&&p){const l=new Event("click",{bubbles:r});p.call(c,n),c.dispatchEvent(l)}},[s,n,r]),v.jsx("input",{type:"radio","aria-hidden":!0,defaultChecked:n,...o,tabIndex:-1,ref:a,style:{...e.style,...i,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})};function Ys(e){return e?"checked":"unchecked"}var hp=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],Ir="RadioGroup",[yp,Wp]=js(Ir,[Ls,zs]),Ks=Ls(),qs=zs(),[bp,xp]=yp(Ir),Xs=d.forwardRef((e,t)=>{const{__scopeRadioGroup:n,name:r,defaultValue:o,value:a,required:s=!1,disabled:i=!1,orientation:c,dir:u,loop:f=!0,onValueChange:p,...l}=e,g=Ks(n),y=Ms(u),[h,b]=Vt({prop:a,defaultProp:o,onChange:p});return v.jsx(bp,{scope:n,name:r,required:s,disabled:i,value:h,onValueChange:b,children:v.jsx(cp,{asChild:!0,...g,orientation:c,dir:y,loop:f,children:v.jsx(ae.div,{role:"radiogroup","aria-required":s,"aria-orientation":c,"data-disabled":i?"":void 0,dir:y,...l,ref:t})})})});Xs.displayName=Ir;var Js="RadioGroupItem",Zs=d.forwardRef((e,t)=>{const{__scopeRadioGroup:n,disabled:r,...o}=e,a=xp(Js,n),s=a.disabled||r,i=Ks(n),c=qs(n),u=d.useRef(null),f=ue(t,u),p=a.value===o.value,l=d.useRef(!1);return d.useEffect(()=>{const g=h=>{hp.includes(h.key)&&(l.current=!0)},y=()=>l.current=!1;return document.addEventListener("keydown",g),document.addEventListener("keyup",y),()=>{document.removeEventListener("keydown",g),document.removeEventListener("keyup",y)}},[]),v.jsx(lp,{asChild:!0,...i,focusable:!s,active:p,children:v.jsx(Us,{disabled:s,required:a.required,checked:p,...c,...o,name:a.name,ref:f,onCheck:()=>a.onValueChange(o.value),onKeyDown:oe(g=>{g.key==="Enter"&&g.preventDefault()}),onFocus:oe(o.onFocus,()=>{var g;l.current&&((g=u.current)==null||g.click())})})})});Zs.displayName=Js;var wp="RadioGroupIndicator",Qs=d.forwardRef((e,t)=>{const{__scopeRadioGroup:n,...r}=e,o=qs(n);return v.jsx(Gs,{...o,...r,ref:t})});Qs.displayName=wp;var ei=Xs,ti=Zs,Ep=Qs;const ni=d.forwardRef(({className:e,...t},n)=>v.jsx(ei,{className:de("ve-grid ve-gap-2",e),...t,ref:n}));ni.displayName=ei.displayName;const or=d.forwardRef(({className:e,...t},n)=>v.jsx(ti,{ref:n,className:de("ve-aspect-square ve-h-4 ve-w-4 ve-rounded-full ve-border ve-border-[#dcdcdc] ve-ring-offset focus:ve-outline-none focus-visible:ve-ring-2 focus-visible:ve-ring-offset-2 disabled:ve-cursor-not-allowed disabled:ve-opacity-50",e),...t,children:v.jsx(Ep,{className:"ve-flex ve-items-center ve-justify-center",children:v.jsx(Si,{className:"ve-h-2.5 ve-w-2.5 ve-fill-current ve-text-current"})})}));or.displayName=ti.displayName;var Cp="Label",ri=d.forwardRef((e,t)=>v.jsx(ae.label,{...e,ref:t,onMouseDown:n=>{var o;n.target.closest("button, input, select, textarea")||((o=e.onMouseDown)==null||o.call(e,n),!n.defaultPrevented&&n.detail>1&&n.preventDefault())}}));ri.displayName=Cp;var oi=ri;const Sp=mn("ve-text-sm ve-font-medium ve-leading-none peer-disabled:ve-cursor-not-allowed peer-disabled:ve-opacity-70"),ar=d.forwardRef(({className:e,...t},n)=>v.jsx(oi,{ref:n,className:de(Sp(),e),...t}));ar.displayName=oi.displayName;const Rp=["type.string","type.phone"],Pp=e=>{for(const t of Rp)if(e.includes(t))return!0},Ap=e=>({type:"custom",label:e.label,render:({field:t,value:n,onChange:r})=>{const o=Kf(e.filter),a=s=>{r({field:(n==null?void 0:n.field)??"",constantValue:(n==null?void 0:n.constantValue)??"",constantValueEnabled:s})};return v.jsxs(v.Fragment,{children:[Pp(e.filter.types)&&v.jsx(Tp,{constantValueEnabled:n==null?void 0:n.constantValueEnabled,toggleConstantValueEnabled:a}),n!=null&&n.constantValueEnabled?v.jsx(Be.FieldLabel,{label:"Constant Value",className:"entityField-constantValue",children:v.jsx(Be.AutoField,{onChange:s=>r({field:(n==null?void 0:n.field)??"",constantValue:s,constantValueEnabled:!0}),value:n==null?void 0:n.constantValue,field:{type:"text"}})}):v.jsx(Be.FieldLabel,{label:t.label||"Label is undefined",className:"ve-mt-2.5",children:v.jsx(Be.AutoField,{field:{type:"select",options:[{value:"",label:"Select a Content field"},...o.map(s=>({label:s.name,value:s.name}))]},onChange:s=>{r({field:s,constantValue:(n==null?void 0:n.constantValue)??"",constantValueEnabled:!1})},value:n==null?void 0:n.field})})]})}}),Tp=({constantValueEnabled:e,toggleConstantValueEnabled:t})=>v.jsx("div",{className:"ve-mb-2 ve-w-full",children:v.jsxs(ni,{defaultValue:(e==null?void 0:e.toString())??"false",children:[v.jsxs("div",{className:"ve-flex ve-items-center ve-space-x-2",children:[v.jsx(or,{value:"false",id:"ve-use-entity-value",onClick:()=>t(!1)}),v.jsx(ar,{htmlFor:"ve-use-entity-value",children:"Use Entity Value"})]}),v.jsxs("div",{className:"ve-flex ve-items-center ve-space-x-2",children:[v.jsx(or,{value:"true",id:"ve-use-constant-value",onClick:()=>t(!0)}),v.jsx(ar,{htmlFor:"ve-use-constant-value",children:"Use Constant Value"})]})]})}),Np=()=>{const[e,t]=E.useState();return Et("getEntityDocument",we,(n,r)=>{t(r),n({status:"success",payload:{message:"getEntityDocument received"}})}),e},Op=(e,t)=>{const n=e.c_theme;return!n||Object.keys(n).length===0?t??"":`${t??""}<style type="text/css">.components{`+Object.entries(n).map(([r,o])=>`${r}:${o} !important`).join(";")+"}</style>"},sr=JSON.stringify({root:{},content:[],zones:{}});function Dp(e,t){var i,c,u;if(!t)throw new Error("Unable to parse puck data, template name must be defined in config.");const{document:n}=e,r=n.visualConfigurations??[],o=n.pageLayouts??[],a=(i=n._site)==null?void 0:i.defaultLayouts;for(const f of r)if(f.pageSet===t){const p=JSON.parse(Wn(f.data,t));return{...e,document:{...n,visualTemplate:p}}}for(const f of o)if(((c=f.visualConfiguration)==null?void 0:c.pageSet)===t){const p=JSON.parse(Wn(f.visualConfiguration.data,t));return{...e,document:{...n,visualTemplate:p}}}if(a){for(const f of a)if(((u=f.visualConfiguration)==null?void 0:u.pageSet)===t){const p=JSON.parse(Wn(f.visualConfiguration.data,t));return{...e,document:{...n,visualTemplate:p}}}}console.warn(`Unable to find puck data for pageSet: ${t}`);const s=JSON.parse(sr);return{...e,document:{...n,visualTemplate:s}}}function Wn(e,t){if(!e||e.length<1)return console.warn(`Missing visual editor data for template: ${t}`),sr;try{JSON.parse(e)}catch{return console.warn(`Invalid visual editor data for template: ${t}`),sr}return e}const kp=(e,t)=>{if(!(!t||typeof t!="object"||!("field"in t)||!("constantValue"in t))){if(t.constantValueEnabled)return t.constantValue;if(t.field!==""){try{const n=t.field.split(".");let r=!1,o=e;for(let a=0;a<n.length;a++)if((o==null?void 0:o[n[a]])!==void 0)o=o[n[a]];else{r=!0;break}if(!r)return o}catch(n){console.error("Error in resolveYextEntityField:",n)}console.warn(`The field ${t.field} was not found in the document.`)}}},ai=e=>{const t={};for(const n in e){const r=e[n];"default"in r?t[n]=r.default:"styles"in r&&(t[n]=ai(r.styles))}return t},_p=e=>{const t={};for(const n in e){const r=e[n];t[n]=ai(r.styles)}return t},si=(e,t)=>{const n={...t};for(const r in e)if(r in e){const o=e[r],a=n[r];wo(o)&&wo(a)?n[r]=si(o,a):n[r]=o}return n},wo=e=>e!==null&&typeof e=="object",jp=(e,t)=>{const n=_p(t);return si(e,n)};exports.Editor=Bf;exports.EntityField=$d;exports.EntityFieldsProvider=zf;exports.YextEntityFieldSelector=Ap;exports.applyTheme=Op;exports.resolveVisualEditorData=Dp;exports.resolveYextEntityField=kp;exports.themeResolver=jp;exports.useEntityFields=Os;exports.usePlatformBridgeDocument=Np;exports.usePlatformBridgeEntityFields=Wf;
|
|
175
|
+
Defaulting to \`null\`.`}var gp=fp,ED=pp;const vp=v.forwardRef(({className:e,value:t,...r},n)=>y.jsx(gp,{ref:n,className:Me("ve-relative ve-h-4 ve-w-full ve-overflow-hidden ve-rounded-full ve-bg-secondary",e),...r,children:y.jsx(ED,{className:"ve-h-full ve-w-full ve-flex-1 ve-bg-primary ve-transition-all",style:{transform:`translateX(-${100-(t||0)}%)`}})}));vp.displayName=gp.displayName;function SD({progress:e}){return y.jsxs("div",{className:"ve-flex ve-h-screen ve-loading-wrapper ve-w-screen ve-flex-col ve-items-center ve-justify-center",children:[y.jsx(vp,{className:"ve-w-1/3 ve-loading-progress",value:e}),y.jsx("div",{children:"Loading Visual Editor..."})]})}var jc=["light","dark"],CD="(prefers-color-scheme: dark)",_D=v.createContext(void 0),$D={setTheme:e=>{},themes:[]},TD=()=>{var e;return(e=v.useContext(_D))!=null?e:$D};v.memo(({forcedTheme:e,storageKey:t,attribute:r,enableSystem:n,enableColorScheme:o,defaultTheme:a,value:i,attrs:s,nonce:l})=>{let c=a==="system",u=r==="class"?`var d=document.documentElement,c=d.classList;${`c.remove(${s.map(b=>`'${b}'`).join(",")})`};`:`var d=document.documentElement,n='${r}',s='setAttribute';`,p=o?jc.includes(a)&&a?`if(e==='light'||e==='dark'||!e)d.style.colorScheme=e||'${a}'`:"if(e==='light'||e==='dark')d.style.colorScheme=e":"",f=(b,g=!1,m=!0)=>{let w=i?i[b]:b,C=g?b+"|| ''":`'${w}'`,E="";return o&&m&&!g&&jc.includes(b)&&(E+=`d.style.colorScheme = '${b}';`),r==="class"?g||w?E+=`c.add(${C})`:E+="null":w&&(E+=`d[s](n,${C})`),E},h=e?`!function(){${u}${f(e)}}()`:n?`!function(){try{${u}var e=localStorage.getItem('${t}');if('system'===e||(!e&&${c})){var t='${CD}',m=window.matchMedia(t);if(m.media!==t||m.matches){${f("dark")}}else{${f("light")}}}else if(e){${i?`var x=${JSON.stringify(i)};`:""}${f(i?"x[e]":"e",!0)}}${c?"":"else{"+f(a,!1,!1)+"}"}${p}}catch(e){}}()`:`!function(){try{${u}var e=localStorage.getItem('${t}');if(e){${i?`var x=${JSON.stringify(i)};`:""}${f(i?"x[e]":"e",!0)}}else{${f(a,!1,!1)};}${p}}catch(t){}}();`;return v.createElement("script",{nonce:l,dangerouslySetInnerHTML:{__html:h}})});var AD=e=>{switch(e){case"success":return PD;case"info":return ND;case"warning":return MD;case"error":return DD;default:return null}},OD=Array(12).fill(0),RD=({visible:e})=>d.createElement("div",{className:"sonner-loading-wrapper","data-visible":e},d.createElement("div",{className:"sonner-spinner"},OD.map((t,r)=>d.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${r}`})))),PD=d.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},d.createElement("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z",clipRule:"evenodd"})),MD=d.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20"},d.createElement("path",{fillRule:"evenodd",d:"M9.401 3.003c1.155-2 4.043-2 5.197 0l7.355 12.748c1.154 2-.29 4.5-2.599 4.5H4.645c-2.309 0-3.752-2.5-2.598-4.5L9.4 3.003zM12 8.25a.75.75 0 01.75.75v3.75a.75.75 0 01-1.5 0V9a.75.75 0 01.75-.75zm0 8.25a.75.75 0 100-1.5.75.75 0 000 1.5z",clipRule:"evenodd"})),ND=d.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},d.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a.75.75 0 000 1.5h.253a.25.25 0 01.244.304l-.459 2.066A1.75 1.75 0 0010.747 15H11a.75.75 0 000-1.5h-.253a.25.25 0 01-.244-.304l.459-2.066A1.75 1.75 0 009.253 9H9z",clipRule:"evenodd"})),DD=d.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},d.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z",clipRule:"evenodd"})),kD=()=>{let[e,t]=d.useState(document.hidden);return d.useEffect(()=>{let r=()=>{t(document.hidden)};return document.addEventListener("visibilitychange",r),()=>window.removeEventListener("visibilitychange",r)},[]),e},za=1,jD=class{constructor(){this.subscribe=e=>(this.subscribers.push(e),()=>{let t=this.subscribers.indexOf(e);this.subscribers.splice(t,1)}),this.publish=e=>{this.subscribers.forEach(t=>t(e))},this.addToast=e=>{this.publish(e),this.toasts=[...this.toasts,e]},this.create=e=>{var t;let{message:r,...n}=e,o=typeof(e==null?void 0:e.id)=="number"||((t=e.id)==null?void 0:t.length)>0?e.id:za++,a=this.toasts.find(s=>s.id===o),i=e.dismissible===void 0?!0:e.dismissible;return a?this.toasts=this.toasts.map(s=>s.id===o?(this.publish({...s,...e,id:o,title:r}),{...s,...e,id:o,dismissible:i,title:r}):s):this.addToast({title:r,...n,dismissible:i,id:o}),o},this.dismiss=e=>(e||this.toasts.forEach(t=>{this.subscribers.forEach(r=>r({id:t.id,dismiss:!0}))}),this.subscribers.forEach(t=>t({id:e,dismiss:!0})),e),this.message=(e,t)=>this.create({...t,message:e}),this.error=(e,t)=>this.create({...t,message:e,type:"error"}),this.success=(e,t)=>this.create({...t,type:"success",message:e}),this.info=(e,t)=>this.create({...t,type:"info",message:e}),this.warning=(e,t)=>this.create({...t,type:"warning",message:e}),this.loading=(e,t)=>this.create({...t,type:"loading",message:e}),this.promise=(e,t)=>{if(!t)return;let r;t.loading!==void 0&&(r=this.create({...t,promise:e,type:"loading",message:t.loading,description:typeof t.description!="function"?t.description:void 0}));let n=e instanceof Promise?e:e(),o=r!==void 0;return n.then(async a=>{if(FD(a)&&!a.ok){o=!1;let i=typeof t.error=="function"?await t.error(`HTTP error! status: ${a.status}`):t.error,s=typeof t.description=="function"?await t.description(`HTTP error! status: ${a.status}`):t.description;this.create({id:r,type:"error",message:i,description:s})}else if(t.success!==void 0){o=!1;let i=typeof t.success=="function"?await t.success(a):t.success,s=typeof t.description=="function"?await t.description(a):t.description;this.create({id:r,type:"success",message:i,description:s})}}).catch(async a=>{if(t.error!==void 0){o=!1;let i=typeof t.error=="function"?await t.error(a):t.error,s=typeof t.description=="function"?await t.description(a):t.description;this.create({id:r,type:"error",message:i,description:s})}}).finally(()=>{var a;o&&(this.dismiss(r),r=void 0),(a=t.finally)==null||a.call(t)}),r},this.custom=(e,t)=>{let r=(t==null?void 0:t.id)||za++;return this.create({jsx:e(r),id:r,...t}),r},this.subscribers=[],this.toasts=[]}},Ge=new jD,ID=(e,t)=>{let r=(t==null?void 0:t.id)||za++;return Ge.addToast({title:e,...t,id:r}),r},FD=e=>e&&typeof e=="object"&&"ok"in e&&typeof e.ok=="boolean"&&"status"in e&&typeof e.status=="number",LD=ID,BD=()=>Ge.toasts;Object.assign(LD,{success:Ge.success,info:Ge.info,warning:Ge.warning,error:Ge.error,custom:Ge.custom,message:Ge.message,promise:Ge.promise,dismiss:Ge.dismiss,loading:Ge.loading},{getHistory:BD});function HD(e,{insertAt:t}={}){if(typeof document>"u")return;let r=document.head||document.getElementsByTagName("head")[0],n=document.createElement("style");n.type="text/css",t==="top"&&r.firstChild?r.insertBefore(n,r.firstChild):r.appendChild(n),n.styleSheet?n.styleSheet.cssText=e:n.appendChild(document.createTextNode(e))}HD(`:where(html[dir="ltr"]),:where([data-sonner-toaster][dir="ltr"]){--toast-icon-margin-start: -3px;--toast-icon-margin-end: 4px;--toast-svg-margin-start: -1px;--toast-svg-margin-end: 0px;--toast-button-margin-start: auto;--toast-button-margin-end: 0;--toast-close-button-start: 0;--toast-close-button-end: unset;--toast-close-button-transform: translate(-35%, -35%)}:where(html[dir="rtl"]),:where([data-sonner-toaster][dir="rtl"]){--toast-icon-margin-start: 4px;--toast-icon-margin-end: -3px;--toast-svg-margin-start: 0px;--toast-svg-margin-end: -1px;--toast-button-margin-start: 0;--toast-button-margin-end: auto;--toast-close-button-start: unset;--toast-close-button-end: 0;--toast-close-button-transform: translate(35%, -35%)}:where([data-sonner-toaster]){position:fixed;width:var(--width);font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;--gray1: hsl(0, 0%, 99%);--gray2: hsl(0, 0%, 97.3%);--gray3: hsl(0, 0%, 95.1%);--gray4: hsl(0, 0%, 93%);--gray5: hsl(0, 0%, 90.9%);--gray6: hsl(0, 0%, 88.7%);--gray7: hsl(0, 0%, 85.8%);--gray8: hsl(0, 0%, 78%);--gray9: hsl(0, 0%, 56.1%);--gray10: hsl(0, 0%, 52.3%);--gray11: hsl(0, 0%, 43.5%);--gray12: hsl(0, 0%, 9%);--border-radius: 8px;box-sizing:border-box;padding:0;margin:0;list-style:none;outline:none;z-index:999999999}:where([data-sonner-toaster][data-x-position="right"]){right:max(var(--offset),env(safe-area-inset-right))}:where([data-sonner-toaster][data-x-position="left"]){left:max(var(--offset),env(safe-area-inset-left))}:where([data-sonner-toaster][data-x-position="center"]){left:50%;transform:translate(-50%)}:where([data-sonner-toaster][data-y-position="top"]){top:max(var(--offset),env(safe-area-inset-top))}:where([data-sonner-toaster][data-y-position="bottom"]){bottom:max(var(--offset),env(safe-area-inset-bottom))}:where([data-sonner-toast]){--y: translateY(100%);--lift-amount: calc(var(--lift) * var(--gap));z-index:var(--z-index);position:absolute;opacity:0;transform:var(--y);filter:blur(0);touch-action:none;transition:transform .4s,opacity .4s,height .4s,box-shadow .2s;box-sizing:border-box;outline:none;overflow-wrap:anywhere}:where([data-sonner-toast][data-styled="true"]){padding:16px;background:var(--normal-bg);border:1px solid var(--normal-border);color:var(--normal-text);border-radius:var(--border-radius);box-shadow:0 4px 12px #0000001a;width:var(--width);font-size:13px;display:flex;align-items:center;gap:6px}:where([data-sonner-toast]:focus-visible){box-shadow:0 4px 12px #0000001a,0 0 0 2px #0003}:where([data-sonner-toast][data-y-position="top"]){top:0;--y: translateY(-100%);--lift: 1;--lift-amount: calc(1 * var(--gap))}:where([data-sonner-toast][data-y-position="bottom"]){bottom:0;--y: translateY(100%);--lift: -1;--lift-amount: calc(var(--lift) * var(--gap))}:where([data-sonner-toast]) :where([data-description]){font-weight:400;line-height:1.4;color:inherit}:where([data-sonner-toast]) :where([data-title]){font-weight:500;line-height:1.5;color:inherit}:where([data-sonner-toast]) :where([data-icon]){display:flex;height:16px;width:16px;position:relative;justify-content:flex-start;align-items:center;flex-shrink:0;margin-left:var(--toast-icon-margin-start);margin-right:var(--toast-icon-margin-end)}:where([data-sonner-toast][data-promise="true"]) :where([data-icon])>svg{opacity:0;transform:scale(.8);transform-origin:center;animation:sonner-fade-in .3s ease forwards}:where([data-sonner-toast]) :where([data-icon])>*{flex-shrink:0}:where([data-sonner-toast]) :where([data-icon]) svg{margin-left:var(--toast-svg-margin-start);margin-right:var(--toast-svg-margin-end)}:where([data-sonner-toast]) :where([data-content]){display:flex;flex-direction:column;gap:2px}[data-sonner-toast][data-styled=true] [data-button]{border-radius:4px;padding-left:8px;padding-right:8px;height:24px;font-size:12px;color:var(--normal-bg);background:var(--normal-text);margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end);border:none;cursor:pointer;outline:none;display:flex;align-items:center;flex-shrink:0;transition:opacity .4s,box-shadow .2s}:where([data-sonner-toast]) :where([data-button]):focus-visible{box-shadow:0 0 0 2px #0006}:where([data-sonner-toast]) :where([data-button]):first-of-type{margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end)}:where([data-sonner-toast]) :where([data-cancel]){color:var(--normal-text);background:rgba(0,0,0,.08)}:where([data-sonner-toast][data-theme="dark"]) :where([data-cancel]){background:rgba(255,255,255,.3)}:where([data-sonner-toast]) :where([data-close-button]){position:absolute;left:var(--toast-close-button-start);right:var(--toast-close-button-end);top:0;height:20px;width:20px;display:flex;justify-content:center;align-items:center;padding:0;background:var(--gray1);color:var(--gray12);border:1px solid var(--gray4);transform:var(--toast-close-button-transform);border-radius:50%;cursor:pointer;z-index:1;transition:opacity .1s,background .2s,border-color .2s}:where([data-sonner-toast]) :where([data-close-button]):focus-visible{box-shadow:0 4px 12px #0000001a,0 0 0 2px #0003}:where([data-sonner-toast]) :where([data-disabled="true"]){cursor:not-allowed}:where([data-sonner-toast]):hover :where([data-close-button]):hover{background:var(--gray2);border-color:var(--gray5)}:where([data-sonner-toast][data-swiping="true"]):before{content:"";position:absolute;left:0;right:0;height:100%;z-index:-1}:where([data-sonner-toast][data-y-position="top"][data-swiping="true"]):before{bottom:50%;transform:scaleY(3) translateY(50%)}:where([data-sonner-toast][data-y-position="bottom"][data-swiping="true"]):before{top:50%;transform:scaleY(3) translateY(-50%)}:where([data-sonner-toast][data-swiping="false"][data-removed="true"]):before{content:"";position:absolute;inset:0;transform:scaleY(2)}:where([data-sonner-toast]):after{content:"";position:absolute;left:0;height:calc(var(--gap) + 1px);bottom:100%;width:100%}:where([data-sonner-toast][data-mounted="true"]){--y: translateY(0);opacity:1}:where([data-sonner-toast][data-expanded="false"][data-front="false"]){--scale: var(--toasts-before) * .05 + 1;--y: translateY(calc(var(--lift-amount) * var(--toasts-before))) scale(calc(-1 * var(--scale)));height:var(--front-toast-height)}:where([data-sonner-toast])>*{transition:opacity .4s}:where([data-sonner-toast][data-expanded="false"][data-front="false"][data-styled="true"])>*{opacity:0}:where([data-sonner-toast][data-visible="false"]){opacity:0;pointer-events:none}:where([data-sonner-toast][data-mounted="true"][data-expanded="true"]){--y: translateY(calc(var(--lift) * var(--offset)));height:var(--initial-height)}:where([data-sonner-toast][data-removed="true"][data-front="true"][data-swipe-out="false"]){--y: translateY(calc(var(--lift) * -100%));opacity:0}:where([data-sonner-toast][data-removed="true"][data-front="false"][data-swipe-out="false"][data-expanded="true"]){--y: translateY(calc(var(--lift) * var(--offset) + var(--lift) * -100%));opacity:0}:where([data-sonner-toast][data-removed="true"][data-front="false"][data-swipe-out="false"][data-expanded="false"]){--y: translateY(40%);opacity:0;transition:transform .5s,opacity .2s}:where([data-sonner-toast][data-removed="true"][data-front="false"]):before{height:calc(var(--initial-height) + 20%)}[data-sonner-toast][data-swiping=true]{transform:var(--y) translateY(var(--swipe-amount, 0px));transition:none}[data-sonner-toast][data-swipe-out=true][data-y-position=bottom],[data-sonner-toast][data-swipe-out=true][data-y-position=top]{animation:swipe-out .2s ease-out forwards}@keyframes swipe-out{0%{transform:translateY(calc(var(--lift) * var(--offset) + var(--swipe-amount)));opacity:1}to{transform:translateY(calc(var(--lift) * var(--offset) + var(--swipe-amount) + var(--lift) * -100%));opacity:0}}@media (max-width: 600px){[data-sonner-toaster]{position:fixed;--mobile-offset: 16px;right:var(--mobile-offset);left:var(--mobile-offset);width:100%}[data-sonner-toaster] [data-sonner-toast]{left:0;right:0;width:calc(100% - var(--mobile-offset) * 2)}[data-sonner-toaster][data-x-position=left]{left:var(--mobile-offset)}[data-sonner-toaster][data-y-position=bottom]{bottom:20px}[data-sonner-toaster][data-y-position=top]{top:20px}[data-sonner-toaster][data-x-position=center]{left:var(--mobile-offset);right:var(--mobile-offset);transform:none}}[data-sonner-toaster][data-theme=light]{--normal-bg: #fff;--normal-border: var(--gray4);--normal-text: var(--gray12);--success-bg: hsl(143, 85%, 96%);--success-border: hsl(145, 92%, 91%);--success-text: hsl(140, 100%, 27%);--info-bg: hsl(208, 100%, 97%);--info-border: hsl(221, 91%, 91%);--info-text: hsl(210, 92%, 45%);--warning-bg: hsl(49, 100%, 97%);--warning-border: hsl(49, 91%, 91%);--warning-text: hsl(31, 92%, 45%);--error-bg: hsl(359, 100%, 97%);--error-border: hsl(359, 100%, 94%);--error-text: hsl(360, 100%, 45%)}[data-sonner-toaster][data-theme=light] [data-sonner-toast][data-invert=true]{--normal-bg: #000;--normal-border: hsl(0, 0%, 20%);--normal-text: var(--gray1)}[data-sonner-toaster][data-theme=dark] [data-sonner-toast][data-invert=true]{--normal-bg: #fff;--normal-border: var(--gray3);--normal-text: var(--gray12)}[data-sonner-toaster][data-theme=dark]{--normal-bg: #000;--normal-border: hsl(0, 0%, 20%);--normal-text: var(--gray1);--success-bg: hsl(150, 100%, 6%);--success-border: hsl(147, 100%, 12%);--success-text: hsl(150, 86%, 65%);--info-bg: hsl(215, 100%, 6%);--info-border: hsl(223, 100%, 12%);--info-text: hsl(216, 87%, 65%);--warning-bg: hsl(64, 100%, 6%);--warning-border: hsl(60, 100%, 12%);--warning-text: hsl(46, 87%, 65%);--error-bg: hsl(358, 76%, 10%);--error-border: hsl(357, 89%, 16%);--error-text: hsl(358, 100%, 81%)}[data-rich-colors=true][data-sonner-toast][data-type=success],[data-rich-colors=true][data-sonner-toast][data-type=success] [data-close-button]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=info],[data-rich-colors=true][data-sonner-toast][data-type=info] [data-close-button]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning],[data-rich-colors=true][data-sonner-toast][data-type=warning] [data-close-button]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=error],[data-rich-colors=true][data-sonner-toast][data-type=error] [data-close-button]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}.sonner-loading-wrapper{--size: 16px;height:var(--size);width:var(--size);position:absolute;inset:0;z-index:10}.sonner-loading-wrapper[data-visible=false]{transform-origin:center;animation:sonner-fade-out .2s ease forwards}.sonner-spinner{position:relative;top:50%;left:50%;height:var(--size);width:var(--size)}.sonner-loading-bar{animation:sonner-spin 1.2s linear infinite;background:var(--gray11);border-radius:6px;height:8%;left:-10%;position:absolute;top:-3.9%;width:24%}.sonner-loading-bar:nth-child(1){animation-delay:-1.2s;transform:rotate(.0001deg) translate(146%)}.sonner-loading-bar:nth-child(2){animation-delay:-1.1s;transform:rotate(30deg) translate(146%)}.sonner-loading-bar:nth-child(3){animation-delay:-1s;transform:rotate(60deg) translate(146%)}.sonner-loading-bar:nth-child(4){animation-delay:-.9s;transform:rotate(90deg) translate(146%)}.sonner-loading-bar:nth-child(5){animation-delay:-.8s;transform:rotate(120deg) translate(146%)}.sonner-loading-bar:nth-child(6){animation-delay:-.7s;transform:rotate(150deg) translate(146%)}.sonner-loading-bar:nth-child(7){animation-delay:-.6s;transform:rotate(180deg) translate(146%)}.sonner-loading-bar:nth-child(8){animation-delay:-.5s;transform:rotate(210deg) translate(146%)}.sonner-loading-bar:nth-child(9){animation-delay:-.4s;transform:rotate(240deg) translate(146%)}.sonner-loading-bar:nth-child(10){animation-delay:-.3s;transform:rotate(270deg) translate(146%)}.sonner-loading-bar:nth-child(11){animation-delay:-.2s;transform:rotate(300deg) translate(146%)}.sonner-loading-bar:nth-child(12){animation-delay:-.1s;transform:rotate(330deg) translate(146%)}@keyframes sonner-fade-in{0%{opacity:0;transform:scale(.8)}to{opacity:1;transform:scale(1)}}@keyframes sonner-fade-out{0%{opacity:1;transform:scale(1)}to{opacity:0;transform:scale(.8)}}@keyframes sonner-spin{0%{opacity:1}to{opacity:.15}}@media (prefers-reduced-motion){[data-sonner-toast],[data-sonner-toast]>*,.sonner-loading-bar{transition:none!important;animation:none!important}}.sonner-loader{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);transform-origin:center;transition:opacity .2s,transform .2s}.sonner-loader[data-visible=false]{opacity:0;transform:scale(.8) translate(-50%,-50%)}
|
|
176
|
+
`);function Un(e){return e.label!==void 0}var zD=3,UD="32px",GD=4e3,WD=356,VD=14,YD=20,KD=200;function qD(...e){return e.filter(Boolean).join(" ")}var XD=e=>{var t,r,n,o,a,i,s,l,c,u;let{invert:p,toast:f,unstyled:h,interacting:b,setHeights:g,visibleToasts:m,heights:w,index:C,toasts:E,expanded:_,removeToast:S,defaultRichColors:O,closeButton:M,style:I,cancelButtonStyle:U,actionButtonStyle:V,className:K="",descriptionClassName:F="",duration:Y,position:G,gap:te,loadingIcon:H,expandByDefault:oe,classNames:N,icons:Z,closeButtonAriaLabel:$="Close toast",pauseWhenPageIsHidden:T,cn:D}=e,[k,z]=d.useState(!1),[W,L]=d.useState(!1),[q,X]=d.useState(!1),[re,J]=d.useState(!1),[Te,R]=d.useState(0),[Ae,Ie]=d.useState(0),Fe=d.useRef(null),ke=d.useRef(null),$t=C===0,Tt=C+1<=m,Ce=f.type,it=f.dismissible!==!1,Ur=f.className||"",At=f.descriptionClassName||"",gt=d.useMemo(()=>w.findIndex(ne=>ne.toastId===f.id)||0,[w,f.id]),Gr=d.useMemo(()=>{var ne;return(ne=f.closeButton)!=null?ne:M},[f.closeButton,M]),se=d.useMemo(()=>f.duration||Y||GD,[f.duration,Y]),ae=d.useRef(0),ue=d.useRef(0),Ke=d.useRef(0),Ze=d.useRef(null),[Wr,Vr]=G.split("-"),Tn=d.useMemo(()=>w.reduce((ne,ge,ve)=>ve>=gt?ne:ne+ge.height,0),[w,gt]),An=kD(),Fo=f.invert||p,Yr=Ce==="loading";ue.current=d.useMemo(()=>gt*te+Tn,[gt,Tn]),d.useEffect(()=>{z(!0)},[]),d.useLayoutEffect(()=>{if(!k)return;let ne=ke.current,ge=ne.style.height;ne.style.height="auto";let ve=ne.getBoundingClientRect().height;ne.style.height=ge,Ie(ve),g(De=>De.find(Le=>Le.toastId===f.id)?De.map(Le=>Le.toastId===f.id?{...Le,height:ve}:Le):[{toastId:f.id,height:ve,position:f.position},...De])},[k,f.title,f.description,g,f.id]);let st=d.useCallback(()=>{L(!0),R(ue.current),g(ne=>ne.filter(ge=>ge.toastId!==f.id)),setTimeout(()=>{S(f)},KD)},[f,S,g,ue]);d.useEffect(()=>{if(f.promise&&Ce==="loading"||f.duration===1/0||f.type==="loading")return;let ne,ge=se;return _||b||T&&An?(()=>{if(Ke.current<ae.current){let ve=new Date().getTime()-ae.current;ge=ge-ve}Ke.current=new Date().getTime()})():ge!==1/0&&(ae.current=new Date().getTime(),ne=setTimeout(()=>{var ve;(ve=f.onAutoClose)==null||ve.call(f,f),st()},ge)),()=>clearTimeout(ne)},[_,b,oe,f,se,st,f.promise,Ce,T,An]),d.useEffect(()=>{let ne=ke.current;if(ne){let ge=ne.getBoundingClientRect().height;return Ie(ge),g(ve=>[{toastId:f.id,height:ge,position:f.position},...ve]),()=>g(ve=>ve.filter(De=>De.toastId!==f.id))}},[g,f.id]),d.useEffect(()=>{f.delete&&st()},[st,f.delete]);function Lo(){return Z!=null&&Z.loading?d.createElement("div",{className:"sonner-loader","data-visible":Ce==="loading"},Z.loading):H?d.createElement("div",{className:"sonner-loader","data-visible":Ce==="loading"},H):d.createElement(RD,{visible:Ce==="loading"})}return d.createElement("li",{"aria-live":f.important?"assertive":"polite","aria-atomic":"true",role:"status",tabIndex:0,ref:ke,className:D(K,Ur,N==null?void 0:N.toast,(t=f==null?void 0:f.classNames)==null?void 0:t.toast,N==null?void 0:N.default,N==null?void 0:N[Ce],(r=f==null?void 0:f.classNames)==null?void 0:r[Ce]),"data-sonner-toast":"","data-rich-colors":(n=f.richColors)!=null?n:O,"data-styled":!(f.jsx||f.unstyled||h),"data-mounted":k,"data-promise":!!f.promise,"data-removed":W,"data-visible":Tt,"data-y-position":Wr,"data-x-position":Vr,"data-index":C,"data-front":$t,"data-swiping":q,"data-dismissible":it,"data-type":Ce,"data-invert":Fo,"data-swipe-out":re,"data-expanded":!!(_||oe&&k),style:{"--index":C,"--toasts-before":C,"--z-index":E.length-C,"--offset":`${W?Te:ue.current}px`,"--initial-height":oe?"auto":`${Ae}px`,...I,...f.style},onPointerDown:ne=>{Yr||!it||(Fe.current=new Date,R(ue.current),ne.target.setPointerCapture(ne.pointerId),ne.target.tagName!=="BUTTON"&&(X(!0),Ze.current={x:ne.clientX,y:ne.clientY}))},onPointerUp:()=>{var ne,ge,ve,De;if(re||!it)return;Ze.current=null;let Le=Number(((ne=ke.current)==null?void 0:ne.style.getPropertyValue("--swipe-amount").replace("px",""))||0),Ot=new Date().getTime()-((ge=Fe.current)==null?void 0:ge.getTime()),On=Math.abs(Le)/Ot;if(Math.abs(Le)>=YD||On>.11){R(ue.current),(ve=f.onDismiss)==null||ve.call(f,f),st(),J(!0);return}(De=ke.current)==null||De.style.setProperty("--swipe-amount","0px"),X(!1)},onPointerMove:ne=>{var ge;if(!Ze.current||!it)return;let ve=ne.clientY-Ze.current.y,De=ne.clientX-Ze.current.x,Le=(Wr==="top"?Math.min:Math.max)(0,ve),Ot=ne.pointerType==="touch"?10:2;Math.abs(Le)>Ot?(ge=ke.current)==null||ge.style.setProperty("--swipe-amount",`${ve}px`):Math.abs(De)>Ot&&(Ze.current=null)}},Gr&&!f.jsx?d.createElement("button",{"aria-label":$,"data-disabled":Yr,"data-close-button":!0,onClick:Yr||!it?()=>{}:()=>{var ne;st(),(ne=f.onDismiss)==null||ne.call(f,f)},className:D(N==null?void 0:N.closeButton,(o=f==null?void 0:f.classNames)==null?void 0:o.closeButton)},d.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"},d.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),d.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"}))):null,f.jsx||d.isValidElement(f.title)?f.jsx||f.title:d.createElement(d.Fragment,null,Ce||f.icon||f.promise?d.createElement("div",{"data-icon":"",className:D(N==null?void 0:N.icon,(a=f==null?void 0:f.classNames)==null?void 0:a.icon)},f.promise||f.type==="loading"&&!f.icon?f.icon||Lo():null,f.type!=="loading"?f.icon||(Z==null?void 0:Z[Ce])||AD(Ce):null):null,d.createElement("div",{"data-content":"",className:D(N==null?void 0:N.content,(i=f==null?void 0:f.classNames)==null?void 0:i.content)},d.createElement("div",{"data-title":"",className:D(N==null?void 0:N.title,(s=f==null?void 0:f.classNames)==null?void 0:s.title)},f.title),f.description?d.createElement("div",{"data-description":"",className:D(F,At,N==null?void 0:N.description,(l=f==null?void 0:f.classNames)==null?void 0:l.description)},f.description):null),d.isValidElement(f.cancel)?f.cancel:f.cancel&&Un(f.cancel)?d.createElement("button",{"data-button":!0,"data-cancel":!0,style:f.cancelButtonStyle||U,onClick:ne=>{var ge,ve;Un(f.cancel)&&it&&((ve=(ge=f.cancel).onClick)==null||ve.call(ge,ne),st())},className:D(N==null?void 0:N.cancelButton,(c=f==null?void 0:f.classNames)==null?void 0:c.cancelButton)},f.cancel.label):null,d.isValidElement(f.action)?f.action:f.action&&Un(f.action)?d.createElement("button",{"data-button":!0,"data-action":!0,style:f.actionButtonStyle||V,onClick:ne=>{var ge,ve;Un(f.action)&&(ne.defaultPrevented||((ve=(ge=f.action).onClick)==null||ve.call(ge,ne),st()))},className:D(N==null?void 0:N.actionButton,(u=f==null?void 0:f.classNames)==null?void 0:u.actionButton)},f.action.label):null))};function Ic(){if(typeof window>"u"||typeof document>"u")return"ltr";let e=document.documentElement.getAttribute("dir");return e==="auto"||!e?window.getComputedStyle(document.documentElement).direction:e}var JD=e=>{let{invert:t,position:r="bottom-right",hotkey:n=["altKey","KeyT"],expand:o,closeButton:a,className:i,offset:s,theme:l="light",richColors:c,duration:u,style:p,visibleToasts:f=zD,toastOptions:h,dir:b=Ic(),gap:g=VD,loadingIcon:m,icons:w,containerAriaLabel:C="Notifications",pauseWhenPageIsHidden:E,cn:_=qD}=e,[S,O]=d.useState([]),M=d.useMemo(()=>Array.from(new Set([r].concat(S.filter(T=>T.position).map(T=>T.position)))),[S,r]),[I,U]=d.useState([]),[V,K]=d.useState(!1),[F,Y]=d.useState(!1),[G,te]=d.useState(l!=="system"?l:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),H=d.useRef(null),oe=n.join("+").replace(/Key/g,"").replace(/Digit/g,""),N=d.useRef(null),Z=d.useRef(!1),$=d.useCallback(T=>{var D;(D=S.find(k=>k.id===T.id))!=null&&D.delete||Ge.dismiss(T.id),O(k=>k.filter(({id:z})=>z!==T.id))},[S]);return d.useEffect(()=>Ge.subscribe(T=>{if(T.dismiss){O(D=>D.map(k=>k.id===T.id?{...k,delete:!0}:k));return}setTimeout(()=>{Ya.flushSync(()=>{O(D=>{let k=D.findIndex(z=>z.id===T.id);return k!==-1?[...D.slice(0,k),{...D[k],...T},...D.slice(k+1)]:[T,...D]})})})}),[]),d.useEffect(()=>{if(l!=="system"){te(l);return}l==="system"&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?te("dark"):te("light")),typeof window<"u"&&window.matchMedia("(prefers-color-scheme: dark)").addEventListener("change",({matches:T})=>{te(T?"dark":"light")})},[l]),d.useEffect(()=>{S.length<=1&&K(!1)},[S]),d.useEffect(()=>{let T=D=>{var k,z;n.every(W=>D[W]||D.code===W)&&(K(!0),(k=H.current)==null||k.focus()),D.code==="Escape"&&(document.activeElement===H.current||(z=H.current)!=null&&z.contains(document.activeElement))&&K(!1)};return document.addEventListener("keydown",T),()=>document.removeEventListener("keydown",T)},[n]),d.useEffect(()=>{if(H.current)return()=>{N.current&&(N.current.focus({preventScroll:!0}),N.current=null,Z.current=!1)}},[H.current]),S.length?d.createElement("section",{"aria-label":`${C} ${oe}`,tabIndex:-1},M.map((T,D)=>{var k;let[z,W]=T.split("-");return d.createElement("ol",{key:T,dir:b==="auto"?Ic():b,tabIndex:-1,ref:H,className:i,"data-sonner-toaster":!0,"data-theme":G,"data-y-position":z,"data-x-position":W,style:{"--front-toast-height":`${((k=I[0])==null?void 0:k.height)||0}px`,"--offset":typeof s=="number"?`${s}px`:s||UD,"--width":`${WD}px`,"--gap":`${g}px`,...p},onBlur:L=>{Z.current&&!L.currentTarget.contains(L.relatedTarget)&&(Z.current=!1,N.current&&(N.current.focus({preventScroll:!0}),N.current=null))},onFocus:L=>{L.target instanceof HTMLElement&&L.target.dataset.dismissible==="false"||Z.current||(Z.current=!0,N.current=L.relatedTarget)},onMouseEnter:()=>K(!0),onMouseMove:()=>K(!0),onMouseLeave:()=>{F||K(!1)},onPointerDown:L=>{L.target instanceof HTMLElement&&L.target.dataset.dismissible==="false"||Y(!0)},onPointerUp:()=>Y(!1)},S.filter(L=>!L.position&&D===0||L.position===T).map((L,q)=>{var X,re;return d.createElement(XD,{key:L.id,icons:w,index:q,toast:L,defaultRichColors:c,duration:(X=h==null?void 0:h.duration)!=null?X:u,className:h==null?void 0:h.className,descriptionClassName:h==null?void 0:h.descriptionClassName,invert:t,visibleToasts:f,closeButton:(re=h==null?void 0:h.closeButton)!=null?re:a,interacting:F,position:T,style:h==null?void 0:h.style,unstyled:h==null?void 0:h.unstyled,classNames:h==null?void 0:h.classNames,cancelButtonStyle:h==null?void 0:h.cancelButtonStyle,actionButtonStyle:h==null?void 0:h.actionButtonStyle,removeToast:$,toasts:S.filter(J=>J.position==L.position),heights:I.filter(J=>J.position==L.position),setHeights:U,expandByDefault:o,gap:g,loadingIcon:m,expanded:V,pauseWhenPageIsHidden:E,cn:_})}))})):null};const ZD=({...e})=>{const{theme:t="system"}=TD();return y.jsx(JD,{theme:t,className:"toaster group",toastOptions:{classNames:{toast:"group toast group-[.toaster]:ve-bg-background group-[.toaster]:ve-text-foreground group-[.toaster]:ve-border-border group-[.toaster]:ve-shadow-lg",description:"group-[.toast]:ve-text-muted-foreground",actionButton:"group-[.toast]:ve-bg-primary group-[.toast]:ve-text-primary-foreground",cancelButton:"group-[.toast]:ve-bg-muted group-[.toast]:ve-text-muted-foreground"}},...e})},bp=(e,t,r="*")=>t==null?void 0:t.postMessage(e,{targetOrigin:r}),lt=(e,t)=>{const[r,n]=d.useState("pending");return mp(e,t,QD(n)),{sendToParent:a=>{if(!window.parent)throw new Error("Parent window has closed");n("pending");for(const i of t)bp({...a,type:e},window.parent,i)},status:r}},Dt=(e,t,r)=>{mp(e,t,(o,a,i)=>{const{type:s,payload:l}=o;s===e&&typeof r=="function"&&r(c=>bp({...c,type:e},i,a),l)})},mp=(e,t,r)=>{const[n,o]=d.useState(),[a,i]=d.useState(),s=d.useRef(),l=d.useRef();s.current=n,l.current=a;const c=d.useCallback(({origin:u,source:p,data:f})=>{var b;if((b=f==null?void 0:f.source)!=null&&b.startsWith("react-devtools")||!t.includes(u))return;const{type:h}=f;h===e&&(i(p),o(u),r(f,u,p))},[e,t,i,o,r]);d.useEffect(()=>(window.addEventListener("message",c),()=>window.removeEventListener("message",c)),[e,a,n,c])},QD=e=>(t,r,n)=>{const{status:o}=t;o==="success"?e("success"):o==="error"&&e("error")};class ek{constructor(t=!1){Kr(this,"enable",t=>{this.enabled=t,this.enabled&&console.log("[DEBUG] xYextDebug enabled")});Kr(this,"logData",(t,r)=>{this.enabled&&console.log("[DEBUG]",t,"-",r)});Kr(this,"logFunc",t=>{this.enabled&&console.log("[DEBUG] -->",t,"called")});Kr(this,"log",t=>{this.enabled&&console.log("[DEBUG]",t)});this.enabled=t,this.enabled&&console.log("[DEBUG] xYextDebug enabled")}}const tk={GLOBAL:"global",INDIVIDUAL:"individual"},Ne=["http://localhost","https://dev.yext.com","https://qa.yext.com","https://sandbox.yext.com","https://www.yext.com","https://app-qa.eu.yext.com","https://app.eu.yext.com"],xe=new ek,rk=({document:e,componentRegistry:t,themeConfig:r})=>{const[n,o]=d.useState(),[a,i]=d.useState(!1),[s,l]=d.useState(),[c,u]=d.useState(!1),[p,f]=d.useState(),[h,b]=d.useState(!1),[g,m]=d.useState(void 0),[w,C]=d.useState(void 0),[E,_]=d.useState(),[S,O]=d.useState(),[M,I]=d.useState(!1),[U,V]=d.useState(!1),[K,F]=d.useState({history:[{}],index:0}),[Y,G]=d.useState(!1),[te,H]=d.useState(),[oe,N]=d.useState(!1),[Z,$]=d.useState(void 0),[T,D]=d.useState(!1);e&&xe.logData("DOCUMENT",e);const k=d.useCallback(()=>E?$a(E.isDevMode&&!E.devOverride,E.role,E.templateId,E.layoutId,E.entityId):"",[E]),z=d.useCallback(()=>E?Ws(E.isDevMode,E.siteId,E.themeEntityId):"",[E]);d.useEffect(()=>{if(typeof window<"u"){const se=window.location.ancestorOrigins;se.length===0||!se[0].includes("pagescdn")&&!se[0].includes("yext.com")&&!se[0].includes("localhost")?window.location.assign("/404.html"):I(!0)}},[]),Dt("getTemplateMetadata",Ne,(se,ae)=>{const ue=t.get(ae.templateId);O(ue);const Ke=ae;_(ae),xe.enable(Ke.isxYextDebug),xe.logData("TEMPLATE_METADATA",Ke),xe.logData("PUCK_CONFIG",ue),se({status:"success",payload:{message:"payload received"}})}),d.useEffect(()=>{if(E!=null&&E.isDevMode)try{m(pageSets),C(siteStream)}catch{console.warn("pageSets are not defined")}},[E==null?void 0:E.isDevMode]);const W=()=>{E!=null&&E.isThemeMode?q():L()},L=()=>{xe.logFunc("clearVisualConfigLocalStorage"),window.localStorage.removeItem(k())},q=()=>{xe.logFunc("clearThemeLocalStorage"),window.localStorage.removeItem(z())},X=()=>{xe.logFunc("clearHistory"),W(),ke(),Ce()},re=d.useRef(!0);d.useEffect(()=>{if(re.current){re.current=!1;return}J(),Te()},[E,h,c,oe,T]);const J=d.useCallback(()=>{if(!c||!h||!E)return;if(xe.logFunc("loadPuckInitialHistory"),E.isDevMode&&!E.devOverride){const ue=window.localStorage.getItem(k());if(ue){xe.log("Dev Mode - Using localStorage");const Ke=JSON.parse(ue),Ze=Ke.length-1;o({histories:Ke,index:Ze,appendData:!1}),i(!0);return}xe.log("Dev Mode - No localStorage. Using data from Content"),s&&o({histories:[{id:"root",state:{data:s}}],appendData:!1}),i(!0);return}if(!p){W(),xe.log("Prod Mode - No saveState. Using data from Content"),s&&o({histories:[{id:"root",state:{data:s}}],appendData:!1}),i(!0);return}const se=window.localStorage.getItem(k());if(!se){xe.log("Prod Mode - No localStorage. Using saveState"),o({histories:s?[{id:"root",state:{data:s}},{id:p.hash,state:nn(p.history)}]:[{id:p.hash,state:nn(p.history)}],index:s?1:0,appendData:!1}),i(!0);return}const ae=JSON.parse(se).findIndex(ue=>ue.id===(p==null?void 0:p.hash));if(ae!==-1){xe.log("Prod Mode - Using localStorage"),o({histories:JSON.parse(se),index:ae,appendData:!1}),i(!0);return}W()},[o,i,W,$a]);d.useEffect(()=>{n&&xe.logData("PUCK_INITIAL_HISTORY",n)},[n]);const Te=d.useCallback(()=>{if(console.log(`themeData is ${JSON.stringify(te)}, themeSaveState is ${JSON.stringify(Z)}`),!(!T||!E||!E.isThemeMode)){if(xe.logFunc("loadThemeHistory"),E.isDevMode&&!E.devOverride){const se=window.localStorage.getItem(z());if(se){xe.log("Dev Mode - Using theme localStorage");const ae=JSON.parse(se),ue=ae.length-1;F({history:ae,index:ue}),G(!0);return}xe.log("Dev Mode - No localStorage. Using theme data from Content"),te&&(console.log(`starting fresh from content: ${te}`),F({history:[te],index:0})),G(!0);return}if(!Z){W(),xe.log("Prod Mode - No saveState. Using theme data from Content"),te&&F({history:[te],index:0}),G(!0);return}if(te){xe.log("Prod Mode - No themeLocalStorage. Using themeSaveState");const se=te?[te,...Z.history]:[...Z.history],ae={history:se,index:se.length-1};F(ae),G(!0),console.log(`themeInitialHistory is ${JSON.stringify(ae)}`);return}console.log("Setting blank now"),F({history:[{}],index:0}),G(!0)}},[F,G,W,Ws]),{sendToParent:R}=lt("iFrameLoaded",Ne),{sendToParent:Ae}=lt("sendDevSaveStateData",Ne);d.useEffect(()=>{R({payload:{message:"iFrame is loaded"}})},[]),d.useEffect(()=>{var se;if(E!=null&&E.isDevMode){const ae=window.localStorage.getItem(k()),ue=ae?JSON.parse(ae):[],Ke=JSON.stringify(ue.length>0?(se=ue[ue.length-1].data)==null?void 0:se.data:{});Ae({payload:{devSaveStateData:Ke}})}},[E]),Dt("getSaveState",Ne,(se,ae)=>{xe.logData("SAVE_STATE",ae),f(ae),b(!0),se({status:"success",payload:{message:"saveState received"}})}),Dt("getThemeSaveState",Ne,(se,ae)=>{xe.logData("THEME_SAVE_STATE",ae),console.log("themeSaveState",JSON.stringify(ae));const ue={history:ae!=null&&ae.history?nn(ae==null?void 0:ae.history):[],index:(ae==null?void 0:ae.index)??0};$(ue),D(!0),se({status:"success",payload:{message:"themeSaveState received"}})}),Dt("getVisualConfigurationData",Ne,(se,ae)=>{const ue=nn(ae.visualConfigurationData);xe.logData("VISUAL_CONFIGURATION_DATA",ue),l(ue),u(!0),se({status:"success",payload:{message:"getVisualConfigurationData received"}})}),Dt("getThemeData",Ne,(se,ae)=>{console.log(`payload in getThemeData is ${JSON.stringify(ae)}`);const ue=nn(ae);xe.logData("THEME_DATA",ue),H(ue),N(!0),se({status:"success",payload:{message:"getThemeData received"}})});const{sendToParent:Ie}=lt("pushPageSets",Ne);d.useEffect(()=>{typeof window<"u"&&(E!=null&&E.isDevMode)&&g&&Ie({payload:{...g,siteStream:w}})},[E==null?void 0:E.isDevMode,g]);const{sendToParent:Fe}=lt("saveSaveState",Ne),{sendToParent:ke}=lt("deleteSaveState",Ne),{sendToParent:$t}=lt("saveVisualConfigData",Ne),{sendToParent:Tt}=lt("saveThemeSaveState",Ne),{sendToParent:Ce}=lt("deleteThemeSaveState",Ne),{sendToParent:it}=lt("saveThemeData",Ne),{sendToParent:Ur}=lt("openQuickFind",Ne),At=se=>{(se.ctrlKey||se.metaKey)&&se.key==="k"&&Ur()};d.useEffect(()=>(window.addEventListener("keydown",At),()=>{window.removeEventListener("keydown",At)}),[]);const gt=!S||!E||!e||!h||!c||!a||E.isThemeMode&&(!oe||!T||!Y);d.useEffect(()=>{console.log("theme useEffect"),U&&K&&r&&(xe.logData("THEME_INITIAL_HISTORY",K),gi(K.history[K.index],r))},[K,r,U]);const Gr=100*(!!S+!!E+!!e+h+c+a+(E!=null&&E.isThemeMode?oe+T+Y:0))/(E!=null&&E.isThemeMode?9:6);return y.jsxs(y.Fragment,{children:[gt?M&&y.jsx(SD,{progress:Gr}):y.jsx(gD,{puckConfig:S,isLoading:gt,puckInitialHistory:n,clearHistory:E.isDevMode&&!E.devOverride?W:X,templateMetadata:E,saveState:p,saveSaveState:Fe,saveVisualConfigData:$t,sendDevSaveStateData:Ae,saveThemeData:it,buildVisualConfigLocalStorageKey:k,devLogger:xe,themeConfig:r,themeData:te,saveThemeSaveState:Tt,themeHistory:K,setThemeHistory:F,setPuckRendered:V}),y.jsx(ZD,{closeButton:!0,richColors:!0})]})},nn=e=>JSON.parse(e.replace(/\\"/g,'"')),nk=()=>{const[e,t]=d.useState(void 0);return Dt("getTemplateStream",Ne,(r,n)=>{t(n.stream.schema.fields),r({status:"success",payload:{message:"templateStream received"}})}),Dt("getDevEntityFields",Ne,(r,n)=>{t(ok(n)),r({status:"success",payload:{message:"getDevEntityFields received"}})}),e},ok=e=>e.map(t=>({name:t.name,definition:{name:t.name,typeName:t.typeName,type:t.type,registryId:t.registryId,typeRegistryId:t.typeRegistryId,isList:t.isList},children:t.children??[]})),yp=v.createContext(void 0),ak=({entityFields:e,children:t})=>y.jsx(yp.Provider,{value:e,children:t}),xp=()=>{const e=v.useContext(yp);if(!e)throw new Error("useEntityFields must be used within a DocumentProvider");return e},ik=["uid","meta","slug","c_visualConfigurations","c_pages_layouts"],sk=[],wp=e=>Ep(e,""),Ep=(e,t)=>{var o,a,i;const r=t?`${t}.${e.name}`:e.name;if(sk.includes(Sp(e)))return[{name:r,schemaField:e}];if(e.definition.isList)return[];const n=[{name:r,schemaField:e}];if((o=e.children)!=null&&o.fields&&((i=(a=e.children)==null?void 0:a.fields)==null?void 0:i.length)>0)for(const s of e.children.fields)n.push(...Ep(s,r));return n},Sp=e=>e.definition.typeName||e.definition.typeRegistryId||Object.entries(e.definition.type)[0][1];function lk(e,t,r){const n=e.get(t)||[];return n.push(r),e.set(t,n),e}const ck=e=>e.reduce((t,r)=>{const n=wp(r);for(const o of n){const a=Sp(o.schemaField);a&&(t=lk(t,a,o.name))}return t},new Map),uk=e=>{let r=xp().filter(o=>!ik.includes(o.name));if(e!=null&&e.allowList){const o=r.map(a=>a.name);e.allowList.forEach(a=>{o.includes(a)||console.warn(`The entity field filter allowList included ${a}, which does not exist in the stream.`)}),r=r.filter(a=>e.allowList.includes(a.name))}e!=null&&e.disallowList&&(r=r.filter(o=>!e.disallowList.includes(o.name)));let n=[];for(const o of r){const a=wp(o);for(const i of a)n.push({...i.schemaField,name:i.name})}if(e!=null&&e.types){const o=ck(n),a=[];e.types.forEach(i=>{a.push(...n.filter(s=>{var l;return(l=o.get(i))==null?void 0:l.includes(s.name)}))}),n=a}return n};function Cp(e,t=[]){let r=[];function n(a,i){const s=v.createContext(i),l=r.length;r=[...r,i];const c=p=>{var w;const{scope:f,children:h,...b}=p,g=((w=f==null?void 0:f[e])==null?void 0:w[l])||s,m=v.useMemo(()=>b,Object.values(b));return y.jsx(g.Provider,{value:m,children:h})};c.displayName=a+"Provider";function u(p,f){var g;const h=((g=f==null?void 0:f[e])==null?void 0:g[l])||s,b=v.useContext(h);if(b)return b;if(i!==void 0)return i;throw new Error(`\`${p}\` must be used within \`${a}\``)}return[c,u]}const o=()=>{const a=r.map(i=>v.createContext(i));return function(s){const l=(s==null?void 0:s[e])||a;return v.useMemo(()=>({[`__scope${e}`]:{...s,[e]:l}}),[s,l])}};return o.scopeName=e,[n,fk(o,...t)]}function fk(...e){const t=e[0];if(e.length===1)return t;const r=()=>{const n=e.map(o=>({useScope:o(),scopeName:o.scopeName}));return function(a){const i=n.reduce((s,{useScope:l,scopeName:c})=>{const p=l(a)[`__scope${c}`];return{...s,...p}},{});return v.useMemo(()=>({[`__scope${t.scopeName}`]:i}),[i])}};return r.scopeName=t.scopeName,r}function dk(e){const t=e+"CollectionProvider",[r,n]=zt(t),[o,a]=r(t,{collectionRef:{current:null},itemMap:new Map}),i=h=>{const{scope:b,children:g}=h,m=d.useRef(null),w=d.useRef(new Map).current;return y.jsx(o,{scope:b,itemMap:w,collectionRef:m,children:g})};i.displayName=t;const s=e+"CollectionSlot",l=d.forwardRef((h,b)=>{const{scope:g,children:m}=h,w=a(s,g),C=Pe(b,w.collectionRef);return y.jsx(Yt,{ref:C,children:m})});l.displayName=s;const c=e+"CollectionItemSlot",u="data-radix-collection-item",p=d.forwardRef((h,b)=>{const{scope:g,children:m,...w}=h,C=d.useRef(null),E=Pe(b,C),_=a(c,g);return d.useEffect(()=>(_.itemMap.set(C,{ref:C,...w}),()=>void _.itemMap.delete(C))),y.jsx(Yt,{[u]:"",ref:E,children:m})});p.displayName=c;function f(h){const b=a(e+"CollectionConsumer",h);return d.useCallback(()=>{const m=b.collectionRef.current;if(!m)return[];const w=Array.from(m.querySelectorAll(`[${u}]`));return Array.from(b.itemMap.values()).sort((_,S)=>w.indexOf(_.ref.current)-w.indexOf(S.ref.current))},[b.collectionRef,b.itemMap])}return[{Provider:i,Slot:l,ItemSlot:p},f,n]}var pk=v.createContext(void 0);function _p(e){const t=v.useContext(pk);return e||t||"ltr"}var pa="rovingFocusGroup.onEntryFocus",hk={bubbles:!1,cancelable:!0},Io="RovingFocusGroup",[Ua,$p,gk]=dk(Io),[vk,Tp]=zt(Io,[gk]),[bk,mk]=vk(Io),Ap=v.forwardRef((e,t)=>y.jsx(Ua.Provider,{scope:e.__scopeRovingFocusGroup,children:y.jsx(Ua.Slot,{scope:e.__scopeRovingFocusGroup,children:y.jsx(yk,{...e,ref:t})})}));Ap.displayName=Io;var yk=v.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:r,orientation:n,loop:o=!1,dir:a,currentTabStopId:i,defaultCurrentTabStopId:s,onCurrentTabStopIdChange:l,onEntryFocus:c,preventScrollOnEntryFocus:u=!1,...p}=e,f=v.useRef(null),h=Pe(t,f),b=_p(a),[g=null,m]=gn({prop:i,defaultProp:s,onChange:l}),[w,C]=v.useState(!1),E=yt(c),_=$p(r),S=v.useRef(!1),[O,M]=v.useState(0);return v.useEffect(()=>{const I=f.current;if(I)return I.addEventListener(pa,E),()=>I.removeEventListener(pa,E)},[E]),y.jsx(bk,{scope:r,orientation:n,dir:b,loop:o,currentTabStopId:g,onItemFocus:v.useCallback(I=>m(I),[m]),onItemShiftTab:v.useCallback(()=>C(!0),[]),onFocusableItemAdd:v.useCallback(()=>M(I=>I+1),[]),onFocusableItemRemove:v.useCallback(()=>M(I=>I-1),[]),children:y.jsx($e.div,{tabIndex:w||O===0?-1:0,"data-orientation":n,...p,ref:h,style:{outline:"none",...e.style},onMouseDown:Se(e.onMouseDown,()=>{S.current=!0}),onFocus:Se(e.onFocus,I=>{const U=!S.current;if(I.target===I.currentTarget&&U&&!w){const V=new CustomEvent(pa,hk);if(I.currentTarget.dispatchEvent(V),!V.defaultPrevented){const K=_().filter(H=>H.focusable),F=K.find(H=>H.active),Y=K.find(H=>H.id===g),te=[F,Y,...K].filter(Boolean).map(H=>H.ref.current);Pp(te,u)}}S.current=!1}),onBlur:Se(e.onBlur,()=>C(!1))})})}),Op="RovingFocusGroupItem",Rp=v.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:r,focusable:n=!0,active:o=!1,tabStopId:a,...i}=e,s=ln(),l=a||s,c=mk(Op,r),u=c.currentTabStopId===l,p=$p(r),{onFocusableItemAdd:f,onFocusableItemRemove:h}=c;return v.useEffect(()=>{if(n)return f(),()=>h()},[n,f,h]),y.jsx(Ua.ItemSlot,{scope:r,id:l,focusable:n,active:o,children:y.jsx($e.span,{tabIndex:u?0:-1,"data-orientation":c.orientation,...i,ref:t,onMouseDown:Se(e.onMouseDown,b=>{n?c.onItemFocus(l):b.preventDefault()}),onFocus:Se(e.onFocus,()=>c.onItemFocus(l)),onKeyDown:Se(e.onKeyDown,b=>{if(b.key==="Tab"&&b.shiftKey){c.onItemShiftTab();return}if(b.target!==b.currentTarget)return;const g=Ek(b,c.orientation,c.dir);if(g!==void 0){if(b.metaKey||b.ctrlKey||b.altKey||b.shiftKey)return;b.preventDefault();let w=p().filter(C=>C.focusable).map(C=>C.ref.current);if(g==="last")w.reverse();else if(g==="prev"||g==="next"){g==="prev"&&w.reverse();const C=w.indexOf(b.currentTarget);w=c.loop?Sk(w,C+1):w.slice(C+1)}setTimeout(()=>Pp(w))}})})})});Rp.displayName=Op;var xk={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function wk(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function Ek(e,t,r){const n=wk(e.key,r);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(n))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(n)))return xk[n]}function Pp(e,t=!1){const r=document.activeElement;for(const n of e)if(n===r||(n.focus({preventScroll:t}),document.activeElement!==r))return}function Sk(e,t){return e.map((r,n)=>e[(t+n)%e.length])}var Ck=Ap,_k=Rp;function $k(e,t){return v.useReducer((r,n)=>t[r][n]??r,e)}var Mp=e=>{const{present:t,children:r}=e,n=Tk(t),o=typeof r=="function"?r({present:n.isPresent}):v.Children.only(r),a=Pe(n.ref,Ak(o));return typeof r=="function"||n.isPresent?v.cloneElement(o,{ref:a}):null};Mp.displayName="Presence";function Tk(e){const[t,r]=v.useState(),n=v.useRef({}),o=v.useRef(e),a=v.useRef("none"),i=e?"mounted":"unmounted",[s,l]=$k(i,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return v.useEffect(()=>{const c=Gn(n.current);a.current=s==="mounted"?c:"none"},[s]),mt(()=>{const c=n.current,u=o.current;if(u!==e){const f=a.current,h=Gn(c);e?l("MOUNT"):h==="none"||(c==null?void 0:c.display)==="none"?l("UNMOUNT"):l(u&&f!==h?"ANIMATION_OUT":"UNMOUNT"),o.current=e}},[e,l]),mt(()=>{if(t){let c;const u=t.ownerDocument.defaultView??window,p=h=>{const g=Gn(n.current).includes(h.animationName);if(h.target===t&&g&&(l("ANIMATION_END"),!o.current)){const m=t.style.animationFillMode;t.style.animationFillMode="forwards",c=u.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=m)})}},f=h=>{h.target===t&&(a.current=Gn(n.current))};return t.addEventListener("animationstart",f),t.addEventListener("animationcancel",p),t.addEventListener("animationend",p),()=>{u.clearTimeout(c),t.removeEventListener("animationstart",f),t.removeEventListener("animationcancel",p),t.removeEventListener("animationend",p)}}else l("ANIMATION_END")},[t,l]),{isPresent:["mounted","unmountSuspended"].includes(s),ref:v.useCallback(c=>{c&&(n.current=getComputedStyle(c)),r(c)},[])}}function Gn(e){return(e==null?void 0:e.animationName)||"none"}function Ak(e){var n,o;let t=(n=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:n.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}var us="Radio",[Ok,Np]=Cp(us),[Rk,Pk]=Ok(us),Dp=v.forwardRef((e,t)=>{const{__scopeRadio:r,name:n,checked:o=!1,required:a,disabled:i,value:s="on",onCheck:l,form:c,...u}=e,[p,f]=v.useState(null),h=Pe(t,m=>f(m)),b=v.useRef(!1),g=p?c||!!p.closest("form"):!0;return y.jsxs(Rk,{scope:r,checked:o,disabled:i,children:[y.jsx($e.button,{type:"button",role:"radio","aria-checked":o,"data-state":Ip(o),"data-disabled":i?"":void 0,disabled:i,value:s,...u,ref:h,onClick:Se(e.onClick,m=>{o||l==null||l(),g&&(b.current=m.isPropagationStopped(),b.current||m.stopPropagation())})}),g&&y.jsx(Mk,{control:p,bubbles:!b.current,name:n,value:s,checked:o,required:a,disabled:i,form:c,style:{transform:"translateX(-100%)"}})]})});Dp.displayName=us;var kp="RadioIndicator",jp=v.forwardRef((e,t)=>{const{__scopeRadio:r,forceMount:n,...o}=e,a=Pk(kp,r);return y.jsx(Mp,{present:n||a.checked,children:y.jsx($e.span,{"data-state":Ip(a.checked),"data-disabled":a.disabled?"":void 0,...o,ref:t})})});jp.displayName=kp;var Mk=e=>{const{control:t,checked:r,bubbles:n=!0,...o}=e,a=v.useRef(null),i=Qu(r),s=ni(t);return v.useEffect(()=>{const l=a.current,c=window.HTMLInputElement.prototype,p=Object.getOwnPropertyDescriptor(c,"checked").set;if(i!==r&&p){const f=new Event("click",{bubbles:n});p.call(l,r),l.dispatchEvent(f)}},[i,r,n]),y.jsx("input",{type:"radio","aria-hidden":!0,defaultChecked:r,...o,tabIndex:-1,ref:a,style:{...e.style,...s,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})};function Ip(e){return e?"checked":"unchecked"}var Nk=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],fs="RadioGroup",[Dk,rj]=Cp(fs,[Tp,Np]),Fp=Tp(),Lp=Np(),[kk,jk]=Dk(fs),Bp=v.forwardRef((e,t)=>{const{__scopeRadioGroup:r,name:n,defaultValue:o,value:a,required:i=!1,disabled:s=!1,orientation:l,dir:c,loop:u=!0,onValueChange:p,...f}=e,h=Fp(r),b=_p(c),[g,m]=gn({prop:a,defaultProp:o,onChange:p});return y.jsx(kk,{scope:r,name:n,required:i,disabled:s,value:g,onValueChange:m,children:y.jsx(Ck,{asChild:!0,...h,orientation:l,dir:b,loop:u,children:y.jsx($e.div,{role:"radiogroup","aria-required":i,"aria-orientation":l,"data-disabled":s?"":void 0,dir:b,...f,ref:t})})})});Bp.displayName=fs;var Hp="RadioGroupItem",zp=v.forwardRef((e,t)=>{const{__scopeRadioGroup:r,disabled:n,...o}=e,a=jk(Hp,r),i=a.disabled||n,s=Fp(r),l=Lp(r),c=v.useRef(null),u=Pe(t,c),p=a.value===o.value,f=v.useRef(!1);return v.useEffect(()=>{const h=g=>{Nk.includes(g.key)&&(f.current=!0)},b=()=>f.current=!1;return document.addEventListener("keydown",h),document.addEventListener("keyup",b),()=>{document.removeEventListener("keydown",h),document.removeEventListener("keyup",b)}},[]),y.jsx(_k,{asChild:!0,...s,focusable:!i,active:p,children:y.jsx(Dp,{disabled:i,required:a.required,checked:p,...l,...o,name:a.name,ref:u,onCheck:()=>a.onValueChange(o.value),onKeyDown:Se(h=>{h.key==="Enter"&&h.preventDefault()}),onFocus:Se(o.onFocus,()=>{var h;f.current&&((h=c.current)==null||h.click())})})})});zp.displayName=Hp;var Ik="RadioGroupIndicator",Up=v.forwardRef((e,t)=>{const{__scopeRadioGroup:r,...n}=e,o=Lp(r);return y.jsx(jp,{...o,...n,ref:t})});Up.displayName=Ik;var Gp=Bp,Wp=zp,Fk=Up;const Vp=v.forwardRef(({className:e,...t},r)=>y.jsx(Gp,{className:Me("ve-grid ve-gap-2",e),...t,ref:r}));Vp.displayName=Gp.displayName;const Ga=v.forwardRef(({className:e,...t},r)=>y.jsx(Wp,{ref:r,className:Me("ve-aspect-square ve-h-4 ve-w-4 ve-rounded-full ve-border ve-border-[#dcdcdc] ve-ring-offset focus:ve-outline-none focus-visible:ve-ring-2 focus-visible:ve-ring-offset-2 disabled:ve-cursor-not-allowed disabled:ve-opacity-50",e),...t,children:y.jsx(Fk,{className:"ve-flex ve-items-center ve-justify-center",children:y.jsx(gh,{className:"ve-h-2.5 ve-w-2.5 ve-fill-current ve-text-current"})})}));Ga.displayName=Wp.displayName;var Lk="Label",Yp=v.forwardRef((e,t)=>y.jsx($e.label,{...e,ref:t,onMouseDown:r=>{var o;r.target.closest("button, input, select, textarea")||((o=e.onMouseDown)==null||o.call(e,r),!r.defaultPrevented&&r.detail>1&&r.preventDefault())}}));Yp.displayName=Lk;var Kp=Yp;const Bk=po("ve-text-sm ve-font-medium ve-leading-none peer-disabled:ve-cursor-not-allowed peer-disabled:ve-opacity-70"),Wa=v.forwardRef(({className:e,...t},r)=>y.jsx(Kp,{ref:r,className:Me(Bk(),e),...t}));Wa.displayName=Kp.displayName;const Hk=["type.string","type.phone"],zk=e=>{for(const t of Hk)if(e.includes(t))return!0},Uk=e=>({type:"custom",label:e.label,render:({field:t,value:r,onChange:n})=>{const o=uk(e.filter),a=i=>{n({field:(r==null?void 0:r.field)??"",constantValue:(r==null?void 0:r.constantValue)??"",constantValueEnabled:i})};return y.jsxs(y.Fragment,{children:[zk(e.filter.types)&&y.jsx(Gk,{constantValueEnabled:r==null?void 0:r.constantValueEnabled,toggleConstantValueEnabled:a}),r!=null&&r.constantValueEnabled?y.jsx(ut.FieldLabel,{label:"Constant Value",className:"entityField-constantValue",children:y.jsx(ut.AutoField,{onChange:i=>n({field:(r==null?void 0:r.field)??"",constantValue:i,constantValueEnabled:!0}),value:r==null?void 0:r.constantValue,field:{type:"text"}})}):y.jsx(ut.FieldLabel,{label:t.label||"Label is undefined",className:"ve-mt-2.5",children:y.jsx(ut.AutoField,{field:{type:"select",options:[{value:"",label:"Select a Content field"},...o.map(i=>({label:i.name,value:i.name}))]},onChange:i=>{n({field:i,constantValue:(r==null?void 0:r.constantValue)??"",constantValueEnabled:!1})},value:r==null?void 0:r.field})})]})}}),Gk=({constantValueEnabled:e,toggleConstantValueEnabled:t})=>y.jsx("div",{className:"ve-mb-2 ve-w-full",children:y.jsxs(Vp,{defaultValue:(e==null?void 0:e.toString())??"false",children:[y.jsxs("div",{className:"ve-flex ve-items-center ve-space-x-2",children:[y.jsx(Ga,{value:"false",id:"ve-use-entity-value",onClick:()=>t(!1)}),y.jsx(Wa,{htmlFor:"ve-use-entity-value",children:"Use Entity Value"})]}),y.jsxs("div",{className:"ve-flex ve-items-center ve-space-x-2",children:[y.jsx(Ga,{value:"true",id:"ve-use-constant-value",onClick:()=>t(!0)}),y.jsx(Wa,{htmlFor:"ve-use-constant-value",children:"Use Constant Value"})]})]})}),Wk=()=>{const[e,t]=d.useState();return Dt("getEntityDocument",Ne,(r,n)=>{t(n),r({status:"success",payload:{message:"getEntityDocument received"}})}),e},Va=JSON.stringify({root:{},content:[],zones:{}});function Vk(e,t){var s,l,c;if(!t)throw new Error("Unable to parse puck data, template name must be defined in config.");const{document:r}=e,n=r.visualConfigurations??[],o=r.pageLayouts??[],a=(s=r._site)==null?void 0:s.defaultLayouts;for(const u of n)if(u.pageSet===t){const p=JSON.parse(ha(u.data,t));return{...e,document:{...r,visualTemplate:p}}}for(const u of o)if(((l=u.visualConfiguration)==null?void 0:l.pageSet)===t){const p=JSON.parse(ha(u.visualConfiguration.data,t));return{...e,document:{...r,visualTemplate:p}}}if(a){for(const u of a)if(((c=u.visualConfiguration)==null?void 0:c.pageSet)===t){const p=JSON.parse(ha(u.visualConfiguration.data,t));return{...e,document:{...r,visualTemplate:p}}}}console.warn(`Unable to find puck data for pageSet: ${t}`);const i=JSON.parse(Va);return{...e,document:{...r,visualTemplate:i}}}function ha(e,t){if(!e||e.length<1)return console.warn(`Missing visual editor data for template: ${t}`),Va;try{JSON.parse(e)}catch{return console.warn(`Invalid visual editor data for template: ${t}`),Va}return e}const Yk=(e,t)=>{if(!(!t||typeof t!="object"||!("field"in t)||!("constantValue"in t))){if(t.constantValueEnabled)return t.constantValue;if(t.field!==""){try{const r=t.field.split(".");let n=!1,o=e;for(let a=0;a<r.length;a++)if((o==null?void 0:o[r[a]])!==void 0)o=o[r[a]];else{n=!0;break}if(!n)return o}catch(r){console.error("Error in resolveYextEntityField:",r)}console.warn(`The field ${t.field} was not found in the document.`)}}},qp=(e,t="")=>{const r={};for(const n in e){const o=e[n];"default"in o?r[n]=`var(--${t}-${n})`:"styles"in o&&(r[n]=qp(o.styles,`${t}-${n}`))}return r},Kk=e=>{const t={};for(const r in e){const n=e[r];t[r]=qp(n.styles,r)}return t},Xp=(e,t)=>{const r={...t};for(const n in e)if(n in e){const o=e[n],a=r[n];Fc(o)&&Fc(a)?r[n]=Xp(o,a):(o&&a&&console.warn(`Both theme.config.ts and tailwind.config.ts provided a value for ${n}. Using the value from theme.config.ts (${a})`),r[n]=a??o)}return r},Fc=e=>e!==null&&typeof e=="object",qk=(e,t)=>{const r=Kk(t);return Xp(e,r)};exports.ColorSelector=lp;exports.Editor=rk;exports.EntityField=Rb;exports.EntityFieldsProvider=ak;exports.YextEntityFieldSelector=Uk;exports.applyTheme=Db;exports.resolveVisualEditorData=Vk;exports.resolveYextEntityField=Yk;exports.themeResolver=qk;exports.useEntityFields=xp;exports.usePlatformBridgeDocument=Wk;exports.usePlatformBridgeEntityFields=nk;
|