@billgangcom/theme-lib 1.7.0 → 1.8.1

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.
@@ -0,0 +1,40 @@
1
+ "use strict";const D=require("react");function sn(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var It={exports:{}},Ce={};/**
2
+ * @license React
3
+ * react-jsx-runtime.production.min.js
4
+ *
5
+ * Copyright (c) Facebook, Inc. and its affiliates.
6
+ *
7
+ * This source code is licensed under the MIT license found in the
8
+ * LICENSE file in the root directory of this source tree.
9
+ */var Dr;function Ds(){if(Dr)return Ce;Dr=1;var t=D,e=Symbol.for("react.element"),r=Symbol.for("react.fragment"),n=Object.prototype.hasOwnProperty,s=t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,o={key:!0,ref:!0,__self:!0,__source:!0};function i(a,d,l){var u,h={},S=null,y=null;l!==void 0&&(S=""+l),d.key!==void 0&&(S=""+d.key),d.ref!==void 0&&(y=d.ref);for(u in d)n.call(d,u)&&!o.hasOwnProperty(u)&&(h[u]=d[u]);if(a&&a.defaultProps)for(u in d=a.defaultProps,d)h[u]===void 0&&(h[u]=d[u]);return{$$typeof:e,type:a,key:S,ref:y,props:h,_owner:s.current}}return Ce.Fragment=r,Ce.jsx=i,Ce.jsxs=i,Ce}var xe={};/**
10
+ * @license React
11
+ * react-jsx-runtime.development.js
12
+ *
13
+ * Copyright (c) Facebook, Inc. and its affiliates.
14
+ *
15
+ * This source code is licensed under the MIT license found in the
16
+ * LICENSE file in the root directory of this source tree.
17
+ */var Cr;function Cs(){return Cr||(Cr=1,process.env.NODE_ENV!=="production"&&function(){var t=D,e=Symbol.for("react.element"),r=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),s=Symbol.for("react.strict_mode"),o=Symbol.for("react.profiler"),i=Symbol.for("react.provider"),a=Symbol.for("react.context"),d=Symbol.for("react.forward_ref"),l=Symbol.for("react.suspense"),u=Symbol.for("react.suspense_list"),h=Symbol.for("react.memo"),S=Symbol.for("react.lazy"),y=Symbol.for("react.offscreen"),g=Symbol.iterator,p="@@iterator";function b(c){if(c===null||typeof c!="object")return null;var v=g&&c[g]||c[p];return typeof v=="function"?v:null}var O=t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function w(c){{for(var v=arguments.length,E=new Array(v>1?v-1:0),T=1;T<v;T++)E[T-1]=arguments[T];_("error",c,E)}}function _(c,v,E){{var T=O.ReactDebugCurrentFrame,R=T.getStackAddendum();R!==""&&(v+="%s",E=E.concat([R]));var N=E.map(function(I){return String(I)});N.unshift("Warning: "+v),Function.prototype.apply.call(console[c],console,N)}}var k=!1,M=!1,B=!1,X=!1,se=!1,ae;ae=Symbol.for("react.module.reference");function Z(c){return!!(typeof c=="string"||typeof c=="function"||c===n||c===o||se||c===s||c===l||c===u||X||c===y||k||M||B||typeof c=="object"&&c!==null&&(c.$$typeof===S||c.$$typeof===h||c.$$typeof===i||c.$$typeof===a||c.$$typeof===d||c.$$typeof===ae||c.getModuleId!==void 0))}function ee(c,v,E){var T=c.displayName;if(T)return T;var R=v.displayName||v.name||"";return R!==""?E+"("+R+")":E}function at(c){return c.displayName||"Context"}function te(c){if(c==null)return null;if(typeof c.tag=="number"&&w("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),typeof c=="function")return c.displayName||c.name||null;if(typeof c=="string")return c;switch(c){case n:return"Fragment";case r:return"Portal";case o:return"Profiler";case s:return"StrictMode";case l:return"Suspense";case u:return"SuspenseList"}if(typeof c=="object")switch(c.$$typeof){case a:var v=c;return at(v)+".Consumer";case i:var E=c;return at(E._context)+".Provider";case d:return ee(c,c.render,"ForwardRef");case h:var T=c.displayName||null;return T!==null?T:te(c.type)||"Memo";case S:{var R=c,N=R._payload,I=R._init;try{return te(I(N))}catch{return null}}}return null}var ce=Object.assign,_e=0,sr,or,ir,ar,cr,lr,ur;function dr(){}dr.__reactDisabledLog=!0;function Zn(){{if(_e===0){sr=console.log,or=console.info,ir=console.warn,ar=console.error,cr=console.group,lr=console.groupCollapsed,ur=console.groupEnd;var c={configurable:!0,enumerable:!0,value:dr,writable:!0};Object.defineProperties(console,{info:c,log:c,warn:c,error:c,group:c,groupCollapsed:c,groupEnd:c})}_e++}}function es(){{if(_e--,_e===0){var c={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:ce({},c,{value:sr}),info:ce({},c,{value:or}),warn:ce({},c,{value:ir}),error:ce({},c,{value:ar}),group:ce({},c,{value:cr}),groupCollapsed:ce({},c,{value:lr}),groupEnd:ce({},c,{value:ur})})}_e<0&&w("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var ct=O.ReactCurrentDispatcher,lt;function Ae(c,v,E){{if(lt===void 0)try{throw Error()}catch(R){var T=R.stack.trim().match(/\n( *(at )?)/);lt=T&&T[1]||""}return`
18
+ `+lt+c}}var ut=!1,Me;{var ts=typeof WeakMap=="function"?WeakMap:Map;Me=new ts}function fr(c,v){if(!c||ut)return"";{var E=Me.get(c);if(E!==void 0)return E}var T;ut=!0;var R=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var N;N=ct.current,ct.current=null,Zn();try{if(v){var I=function(){throw Error()};if(Object.defineProperty(I.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(I,[])}catch(H){T=H}Reflect.construct(c,[],I)}else{try{I.call()}catch(H){T=H}c.call(I.prototype)}}else{try{throw Error()}catch(H){T=H}c()}}catch(H){if(H&&T&&typeof H.stack=="string"){for(var P=H.stack.split(`
19
+ `),U=T.stack.split(`
20
+ `),L=P.length-1,q=U.length-1;L>=1&&q>=0&&P[L]!==U[q];)q--;for(;L>=1&&q>=0;L--,q--)if(P[L]!==U[q]){if(L!==1||q!==1)do if(L--,q--,q<0||P[L]!==U[q]){var J=`
21
+ `+P[L].replace(" at new "," at ");return c.displayName&&J.includes("<anonymous>")&&(J=J.replace("<anonymous>",c.displayName)),typeof c=="function"&&Me.set(c,J),J}while(L>=1&&q>=0);break}}}finally{ut=!1,ct.current=N,es(),Error.prepareStackTrace=R}var ye=c?c.displayName||c.name:"",le=ye?Ae(ye):"";return typeof c=="function"&&Me.set(c,le),le}function rs(c,v,E){return fr(c,!1)}function ns(c){var v=c.prototype;return!!(v&&v.isReactComponent)}function Le(c,v,E){if(c==null)return"";if(typeof c=="function")return fr(c,ns(c));if(typeof c=="string")return Ae(c);switch(c){case l:return Ae("Suspense");case u:return Ae("SuspenseList")}if(typeof c=="object")switch(c.$$typeof){case d:return rs(c.render);case h:return Le(c.type,v,E);case S:{var T=c,R=T._payload,N=T._init;try{return Le(N(R),v,E)}catch{}}}return""}var Te=Object.prototype.hasOwnProperty,hr={},pr=O.ReactDebugCurrentFrame;function qe(c){if(c){var v=c._owner,E=Le(c.type,c._source,v?v.type:null);pr.setExtraStackFrame(E)}else pr.setExtraStackFrame(null)}function ss(c,v,E,T,R){{var N=Function.call.bind(Te);for(var I in c)if(N(c,I)){var P=void 0;try{if(typeof c[I]!="function"){var U=Error((T||"React class")+": "+E+" type `"+I+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof c[I]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw U.name="Invariant Violation",U}P=c[I](v,I,T,E,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(L){P=L}P&&!(P instanceof Error)&&(qe(R),w("%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).",T||"React class",E,I,typeof P),qe(null)),P instanceof Error&&!(P.message in hr)&&(hr[P.message]=!0,qe(R),w("Failed %s type: %s",E,P.message),qe(null))}}}var os=Array.isArray;function dt(c){return os(c)}function is(c){{var v=typeof Symbol=="function"&&Symbol.toStringTag,E=v&&c[Symbol.toStringTag]||c.constructor.name||"Object";return E}}function as(c){try{return gr(c),!1}catch{return!0}}function gr(c){return""+c}function mr(c){if(as(c))return w("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",is(c)),gr(c)}var De=O.ReactCurrentOwner,cs={key:!0,ref:!0,__self:!0,__source:!0},vr,yr,ft;ft={};function ls(c){if(Te.call(c,"ref")){var v=Object.getOwnPropertyDescriptor(c,"ref").get;if(v&&v.isReactWarning)return!1}return c.ref!==void 0}function us(c){if(Te.call(c,"key")){var v=Object.getOwnPropertyDescriptor(c,"key").get;if(v&&v.isReactWarning)return!1}return c.key!==void 0}function ds(c,v){if(typeof c.ref=="string"&&De.current&&v&&De.current.stateNode!==v){var E=te(De.current.type);ft[E]||(w('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',te(De.current.type),c.ref),ft[E]=!0)}}function fs(c,v){{var E=function(){vr||(vr=!0,w("%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)",v))};E.isReactWarning=!0,Object.defineProperty(c,"key",{get:E,configurable:!0})}}function hs(c,v){{var E=function(){yr||(yr=!0,w("%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)",v))};E.isReactWarning=!0,Object.defineProperty(c,"ref",{get:E,configurable:!0})}}var ps=function(c,v,E,T,R,N,I){var P={$$typeof:e,type:c,key:v,ref:E,props:I,_owner:N};return P._store={},Object.defineProperty(P._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(P,"_self",{configurable:!1,enumerable:!1,writable:!1,value:T}),Object.defineProperty(P,"_source",{configurable:!1,enumerable:!1,writable:!1,value:R}),Object.freeze&&(Object.freeze(P.props),Object.freeze(P)),P};function gs(c,v,E,T,R){{var N,I={},P=null,U=null;E!==void 0&&(mr(E),P=""+E),us(v)&&(mr(v.key),P=""+v.key),ls(v)&&(U=v.ref,ds(v,R));for(N in v)Te.call(v,N)&&!cs.hasOwnProperty(N)&&(I[N]=v[N]);if(c&&c.defaultProps){var L=c.defaultProps;for(N in L)I[N]===void 0&&(I[N]=L[N])}if(P||U){var q=typeof c=="function"?c.displayName||c.name||"Unknown":c;P&&fs(I,q),U&&hs(I,q)}return ps(c,P,U,R,T,De.current,I)}}var ht=O.ReactCurrentOwner,br=O.ReactDebugCurrentFrame;function ve(c){if(c){var v=c._owner,E=Le(c.type,c._source,v?v.type:null);br.setExtraStackFrame(E)}else br.setExtraStackFrame(null)}var pt;pt=!1;function gt(c){return typeof c=="object"&&c!==null&&c.$$typeof===e}function Sr(){{if(ht.current){var c=te(ht.current.type);if(c)return`
22
+
23
+ Check the render method of \``+c+"`."}return""}}function ms(c){return""}var wr={};function vs(c){{var v=Sr();if(!v){var E=typeof c=="string"?c:c.displayName||c.name;E&&(v=`
24
+
25
+ Check the top-level render call using <`+E+">.")}return v}}function Er(c,v){{if(!c._store||c._store.validated||c.key!=null)return;c._store.validated=!0;var E=vs(v);if(wr[E])return;wr[E]=!0;var T="";c&&c._owner&&c._owner!==ht.current&&(T=" It was passed a child from "+te(c._owner.type)+"."),ve(c),w('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',E,T),ve(null)}}function Or(c,v){{if(typeof c!="object")return;if(dt(c))for(var E=0;E<c.length;E++){var T=c[E];gt(T)&&Er(T,v)}else if(gt(c))c._store&&(c._store.validated=!0);else if(c){var R=b(c);if(typeof R=="function"&&R!==c.entries)for(var N=R.call(c),I;!(I=N.next()).done;)gt(I.value)&&Er(I.value,v)}}}function ys(c){{var v=c.type;if(v==null||typeof v=="string")return;var E;if(typeof v=="function")E=v.propTypes;else if(typeof v=="object"&&(v.$$typeof===d||v.$$typeof===h))E=v.propTypes;else return;if(E){var T=te(v);ss(E,c.props,"prop",T,c)}else if(v.PropTypes!==void 0&&!pt){pt=!0;var R=te(v);w("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",R||"Unknown")}typeof v.getDefaultProps=="function"&&!v.getDefaultProps.isReactClassApproved&&w("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function bs(c){{for(var v=Object.keys(c.props),E=0;E<v.length;E++){var T=v[E];if(T!=="children"&&T!=="key"){ve(c),w("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",T),ve(null);break}}c.ref!==null&&(ve(c),w("Invalid attribute `ref` supplied to `React.Fragment`."),ve(null))}}var _r={};function Tr(c,v,E,T,R,N){{var I=Z(c);if(!I){var P="";(c===void 0||typeof c=="object"&&c!==null&&Object.keys(c).length===0)&&(P+=" 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 U=ms();U?P+=U:P+=Sr();var L;c===null?L="null":dt(c)?L="array":c!==void 0&&c.$$typeof===e?(L="<"+(te(c.type)||"Unknown")+" />",P=" Did you accidentally export a JSX literal instead of a component?"):L=typeof c,w("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",L,P)}var q=gs(c,v,E,R,N);if(q==null)return q;if(I){var J=v.children;if(J!==void 0)if(T)if(dt(J)){for(var ye=0;ye<J.length;ye++)Or(J[ye],c);Object.freeze&&Object.freeze(J)}else w("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 Or(J,c)}if(Te.call(v,"key")){var le=te(c),H=Object.keys(v).filter(function(Ts){return Ts!=="key"}),mt=H.length>0?"{key: someKey, "+H.join(": ..., ")+": ...}":"{key: someKey}";if(!_r[le+mt]){var _s=H.length>0?"{"+H.join(": ..., ")+": ...}":"{}";w(`A props object containing a "key" prop is being spread into JSX:
26
+ let props = %s;
27
+ <%s {...props} />
28
+ React keys must be passed directly to JSX without using spread:
29
+ let props = %s;
30
+ <%s key={someKey} {...props} />`,mt,le,_s,le),_r[le+mt]=!0}}return c===n?bs(q):ys(q),q}}function Ss(c,v,E){return Tr(c,v,E,!0)}function ws(c,v,E){return Tr(c,v,E,!1)}var Es=ws,Os=Ss;xe.Fragment=n,xe.jsx=Es,xe.jsxs=Os}()),xe}process.env.NODE_ENV==="production"?It.exports=Ds():It.exports=Cs();var m=It.exports;const xr=t=>{let e;const r=new Set,n=(l,u)=>{const h=typeof l=="function"?l(e):l;if(!Object.is(h,e)){const S=e;e=u??(typeof h!="object"||h===null)?h:Object.assign({},e,h),r.forEach(y=>y(e,S))}},s=()=>e,a={setState:n,getState:s,getInitialState:()=>d,subscribe:l=>(r.add(l),()=>r.delete(l))},d=e=t(n,s,a);return a},xs=t=>t?xr(t):xr,Ps=t=>t;function Is(t,e=Ps){const r=D.useSyncExternalStore(t.subscribe,()=>e(t.getState()),()=>e(t.getInitialState()));return D.useDebugValue(r),r}const Pr=t=>{const e=xs(t),r=n=>Is(e,n);return Object.assign(r,e),r},Y=t=>t?Pr(t):Pr,Rs=Y(t=>({blocks:{},setBlocks:e=>t(()=>({blocks:e})),activeBlock:null,setActiveBlock:e=>t(()=>({activeBlock:e})),sourceBlocks:{},setSourceBlocks:e=>t(()=>({sourceBlocks:e}))})),Ns=Y(t=>({currentDevice:"desktop",setCurrentDevice:e=>t(()=>({currentDevice:e}))}));Y(t=>({pageData:null,setPageData:e=>t(()=>({pageData:e}))}));const on=[{icon:"layers",name:"Layers"},{icon:"plus",name:"Add"},{icon:"palette",name:"Theme"},{icon:"settings",name:"Settings"}],ks=Array.from({length:122/2+1},(t,e)=>String(6+e*2)),js=["100","200","300","400","500","600","700","800","900"],As=["home","reviews","faqs","contact","product","ticket","login"],Ms={home:{path:"/",name:"home",icon:"house",seo:{description:"",title:""},visibility:"public"},product:{path:"/product",name:"product",icon:"squares",seo:{description:"",title:""},visibility:"public"},faqs:{path:"/faqs",name:"faqs",icon:"faqs",seo:{description:"",title:""},visibility:"public"},reviews:{path:"/reviews",name:"reviews",icon:"star",seo:{description:"",title:""},visibility:"public"},contact:{path:"/contact",name:"contact",icon:"chat",seo:{description:"",title:""},visibility:"public"},ticket:{path:"/ticket",name:"ticket",icon:"ticket",seo:{description:"",title:""},visibility:"public"},login:{path:"/login",name:"login",icon:"user-circle-gear",seo:{description:"",title:""},visibility:"public"}},Ls=Y(t=>({activeBlock:on[0],setActiveBlock:e=>t(()=>({activeBlock:e}))}));function qs(t,e){let r;try{r=t()}catch{return}return{getItem:s=>{var o;const i=d=>d===null?null:JSON.parse(d,void 0),a=(o=r.getItem(s))!=null?o:null;return a instanceof Promise?a.then(i):i(a)},setItem:(s,o)=>r.setItem(s,JSON.stringify(o,void 0)),removeItem:s=>r.removeItem(s)}}const Rt=t=>e=>{try{const r=t(e);return r instanceof Promise?r:{then(n){return Rt(n)(r)},catch(n){return this}}}catch(r){return{then(n){return this},catch(n){return Rt(n)(r)}}}},Bs=(t,e)=>(r,n,s)=>{let o={storage:qs(()=>localStorage),partialize:p=>p,version:0,merge:(p,b)=>({...b,...p}),...e},i=!1;const a=new Set,d=new Set;let l=o.storage;if(!l)return t((...p)=>{console.warn(`[zustand persist middleware] Unable to update item '${o.name}', the given storage is currently unavailable.`),r(...p)},n,s);const u=()=>{const p=o.partialize({...n()});return l.setItem(o.name,{state:p,version:o.version})},h=s.setState;s.setState=(p,b)=>{h(p,b),u()};const S=t((...p)=>{r(...p),u()},n,s);s.getInitialState=()=>S;let y;const g=()=>{var p,b;if(!l)return;i=!1,a.forEach(w=>{var _;return w((_=n())!=null?_:S)});const O=((b=o.onRehydrateStorage)==null?void 0:b.call(o,(p=n())!=null?p:S))||void 0;return Rt(l.getItem.bind(l))(o.name).then(w=>{if(w)if(typeof w.version=="number"&&w.version!==o.version){if(o.migrate)return[!0,o.migrate(w.state,w.version)];console.error("State loaded from storage couldn't be migrated since no migrate function was provided")}else return[!1,w.state];return[!1,void 0]}).then(w=>{var _;const[k,M]=w;if(y=o.merge(M,(_=n())!=null?_:S),r(y,!0),k)return u()}).then(()=>{O==null||O(y,void 0),y=n(),i=!0,d.forEach(w=>w(y))}).catch(w=>{O==null||O(void 0,w)})};return s.persist={setOptions:p=>{o={...o,...p},p.storage&&(l=p.storage)},clearStorage:()=>{l==null||l.removeItem(o.name)},getOptions:()=>o,rehydrate:()=>g(),hasHydrated:()=>i,onHydrate:p=>(a.add(p),()=>{a.delete(p)}),onFinishHydration:p=>(d.add(p),()=>{d.delete(p)})},o.skipHydration||g(),y||S},Ke=Bs,Fs=Y(Ke(t=>({onPreview:!1,setOnPreview:e=>t(()=>({onPreview:e})),activeBlock:null,setActiveBlock:e=>t(()=>({activeBlock:e}))}),{name:"preview-storage",partialize:t=>{const{onPreview:e}=t;return{onPreview:e}}}));var F=[];for(var vt=0;vt<256;++vt)F.push((vt+256).toString(16).slice(1));function Us(t,e=0){return(F[t[e+0]]+F[t[e+1]]+F[t[e+2]]+F[t[e+3]]+"-"+F[t[e+4]]+F[t[e+5]]+"-"+F[t[e+6]]+F[t[e+7]]+"-"+F[t[e+8]]+F[t[e+9]]+"-"+F[t[e+10]]+F[t[e+11]]+F[t[e+12]]+F[t[e+13]]+F[t[e+14]]+F[t[e+15]]).toLowerCase()}var Be,Hs=new Uint8Array(16);function $s(){if(!Be&&(Be=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!Be))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return Be(Hs)}var Vs=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto);const Ir={randomUUID:Vs};function Ye(t,e,r){if(Ir.randomUUID&&!e&&!t)return Ir.randomUUID();t=t||{};var n=t.random||(t.rng||$s)();return n[6]=n[6]&15|64,n[8]=n[8]&63|128,Us(n)}const zs=Y(Ke((t,e)=>({header:null,blocks:{home:{},contact:{},product:{},faqs:{},reviews:{},ticket:{},login:{}},footer:null,currentBlock:null,positionBlock:null,setHeader:r=>{t({header:r})},setFooter:r=>{t({footer:r})},createPage:r=>{const n=e().blocks;n[r]={},t({blocks:n})},deletePage:r=>{const n=e().blocks;delete n[r],t({blocks:n})},updatePage:(r,n)=>{const s=e().blocks;if(s[n])return;const o=s[r];delete s[r],s[n]=o,t({blocks:s})},setCurrentBlock:r=>{t({currentBlock:r})},setPositionBlock:r=>{t({positionBlock:r})},addBlock:(r,n)=>{const s=e().blocks,o=s[r]||{},i=e().positionBlock,a=Ye(),d=Object.keys(o);if(i===null||i>=d.length)o[a]={name:n.name,value:{...n.value}},t({blocks:{...s,[r]:o}});else{const l={name:n.name,value:{...n.value}},u=d.slice(0,i),h=d.slice(i),S={...u.reduce((y,g)=>(y[g]=o[g],y),{}),[a]:l,...h.reduce((y,g)=>(y[g]=o[g],y),{})};t({blocks:{...s,[r]:S}})}},editBlock:(r,n,s)=>{const o=e().blocks,i=o[r]||{};i[n]={name:s.name,value:{...s.value}},t({blocks:{...o,[r]:i}})},removeBlock:(r,n)=>{const s=e().blocks,o=s[r]||{};delete o[n],t({blocks:{...s,[r]:o}})},moveBlock:(r,n,s)=>t(o=>{const i={...o.blocks[r]},a=Object.keys(i),[d]=a.splice(n,1);a.splice(s,0,d);const l=a.reduce((u,h)=>(u[h]=i[h],u),{});return{blocks:{...o.blocks,[r]:l}}}),duplicateBlock:(r,n)=>{const{blocks:s}=e(),o=s[r],i=o[n],a=Ye(),d={name:i.name,value:{...i.value}},l=Object.keys(o),u=l.indexOf(n),h=l.slice(0,u+1),S=l.slice(u+1),y={...h.reduce((g,p)=>(g[p]=o[p],g),{}),[a]:d,...S.reduce((g,p)=>(g[p]=o[p],g),{})};t({blocks:{...s,[r]:y}})}}),{name:"layers-storage",partialize:t=>{const{blocks:e,header:r,footer:n}=t;return{blocks:e,header:r,footer:n}}})),an=Y((t,e)=>({isModalVisible:!1,hoverBlockId:null,isMouseOverModal:!1,hideTimeout:null,showModal:r=>{e().hideTimeout&&clearTimeout(e().hideTimeout),t({isModalVisible:!0,hoverBlockId:r})},hideModal:()=>{t({isModalVisible:!1,hoverBlockId:null})},startHideTimeout:()=>{if(!e().isMouseOverModal){const r=setTimeout(()=>{t({isModalVisible:!1,hoverBlockId:null})},500);t({hideTimeout:r})}},clearHideTimeout:()=>{e().hideTimeout&&(clearTimeout(e().hideTimeout),t({hideTimeout:null}))},setMouseOverModal:r=>{t({isMouseOverModal:r})},isPreviewVisible:!1,showPreview:r=>{t({isPreviewVisible:!0,hoverBlockId:r})},hidePreview:()=>{t({isPreviewVisible:!1,hoverBlockId:null})}})),Ws=Y(t=>({activeBlock:null,setActiveBlock:e=>t(()=>({activeBlock:e})),activeFont:null,setActiveFont:e=>t(()=>({activeFont:e})),themeSettings:{colors:{brand:{primary:"#fefefe",secondary:"#fefefe",toner:"#ffffff"},background:{primary:"#fefefe",secondary:"#000000"},text_icons:{primary:"#000000",secondary:"#fefefe",tertiary:"#fefefe",disabled:"#ffffff"},lines:{divider:"#000000",border:"#fefefe"},others:{link:"#000000"}},fonts:{heading:{h1:{font:"Archivo",weight:"900",size:48},h2:{font:"Archivo",weight:"700",size:32},h3:{font:"Archivo",weight:"600",size:24},h4:{font:"Archivo",weight:"500",size:16},h5:{font:"Archivo",weight:"400",size:16},h6:{font:"Archivo",weight:"400",size:16}},paragraph:{text:{font:"Archivo",size:48,weight:"400"}}},borders:{radius:52,thickness:52},buttons:{size:26,alignment:"left",radius:32,height:40},inputs:{general:{height:48,name:"Style Name",size:48,color:"black"},field:{active:!0,color:"black",opacity:40},border:{active:!0,style:"solid",radius:0,thickness:0,color:"black"},label:{height:48,size:48,color:"black",alignment:"left"}}},updateColor:(e,r,n)=>t(s=>{const o={...s.themeSettings.colors,[e]:{...s.themeSettings.colors[e],[r]:n}};return{themeSettings:{...s.themeSettings,colors:o}}}),updateFont:(e,r,n,s)=>t(o=>{const i={...o.themeSettings.fonts,[e]:{...o.themeSettings.fonts[e],[r]:{...o.themeSettings.fonts[e][r],[n]:s}}};return{themeSettings:{...o.themeSettings,fonts:i}}}),updateBorder:(e,r)=>t(n=>{const s={...n.themeSettings.borders,[e]:r};return{themeSettings:{...n.themeSettings,borders:s}}}),updateButton:(e,r)=>t(n=>{const s={...n.themeSettings.buttons,[e]:r};return{themeSettings:{...n.themeSettings,buttons:s}}}),updateInput:(e,r,n)=>t(s=>({themeSettings:{...s.themeSettings,inputs:{...s.themeSettings.inputs,[e]:{...s.themeSettings.inputs[e],[n]:r}}}}))})),Ys=Y(Ke(t=>({fonts:[],setFonts:e=>t(()=>({fonts:e}))}),{name:"fonts-storage"})),Js=Y(t=>({settings:null,setSettings:e=>t(()=>({settings:e}))})),cn=Y()(t=>({color:"default",initialColor:"",setInitialColor:e=>t(()=>({initialColor:e})),colorChange:()=>{},update:()=>{},activeLabel:null,modalPosition:{left:0,top:0},showModal:!1,dragging:!1,hue:0,saturation:100,brightness:100,setModalPosition:e=>t(()=>({modalPosition:e})),setHue:e=>t(()=>({hue:e})),setSaturation:e=>t(()=>({saturation:e})),setBrightness:e=>t(()=>({brightness:e})),setShowModal:e=>t(()=>({showModal:e})),setDragging:e=>t(()=>({dragging:e})),setActiveLabel:e=>t(()=>({activeLabel:e})),setColor:e=>t(()=>({color:e})),setUpdate:e=>t(()=>({update:e})),setColorChange:e=>t(()=>({colorChange:e}))})),Gs=Y(Ke((t,e)=>({pages:Ms,currentPage:"home",pageContext:{listings:void 0,products:void 0,reviews:void 0,categories:void 0,faqs:void 0,general:void 0},isOpenModal:!1,isOpenSelectModal:!1,isEdit:!1,editedPage:null,setEditedPage:r=>t(()=>({editedPage:r})),setCurrentPage:r=>t(()=>({currentPage:r})),setPageContext:r=>t(()=>({pageContext:r})),setIsOpenModal:r=>t(()=>({isOpenModal:r})),setIsOpenSelectModal:r=>t(()=>({isOpenSelectModal:r})),setIsEdit:r=>t(()=>({isEdit:r})),createPage:r=>{const n=e().pages,s=Ye();n[s]=r,t({pages:n})},updatePage:(r,n)=>{const s=e().pages;s[r]={...n},t({pages:s})},deletePage:r=>{const n=e().pages;delete n[r],t({pages:n})}}),{name:"pages-storage",partialize:t=>{const{pages:e}=t;return{pages:e}}})),zt=Y(t=>({openModal:!1,setOpenModal:e=>t(()=>({openModal:e})),onChange:null,setOnChange:e=>t(()=>({onChange:e}))})),Ks=(t,e,r)=>{const n=t[e];return n?typeof n=="function"?n():Promise.resolve(n):new Promise((s,o)=>{(typeof queueMicrotask=="function"?queueMicrotask:setTimeout)(o.bind(null,new Error("Unknown variable dynamic import: "+e+(e.split("/").length!==r?". Note that variables only represent file names one level deep.":""))))})},Xs="_icon_bsuj2_1",Qs="_hoverable_bsuj2_5",Zs="_rotated_bsuj2_9",yt={icon:Xs,hoverable:Qs,rotated:Zs};var ln={exports:{}};/*!
31
+ Copyright (c) 2018 Jed Watson.
32
+ Licensed under the MIT License (MIT), see
33
+ http://jedwatson.github.io/classnames
34
+ */(function(t){(function(){var e={}.hasOwnProperty;function r(){for(var o="",i=0;i<arguments.length;i++){var a=arguments[i];a&&(o=s(o,n(a)))}return o}function n(o){if(typeof o=="string"||typeof o=="number")return o;if(typeof o!="object")return"";if(Array.isArray(o))return r.apply(null,o);if(o.toString!==Object.prototype.toString&&!o.toString.toString().includes("[native code]"))return o.toString();var i="";for(var a in o)e.call(o,a)&&o[a]&&(i=s(i,a));return i}function s(o,i){return i?o?o+" "+i:o+i:o}t.exports?(r.default=r,t.exports=r):window.classNames=r})()})(ln);var eo=ln.exports;const z=sn(eo),ne=t=>{const{name:e,iconComponent:r=null,fill:n="currentColor",hoverable:s=!1,onClick:o,className:i,width:a,height:d,rotated:l=!1}=t;console.log(r);const[u,h]=D.useState(()=>r);return D.useEffect(()=>{r||(async()=>{try{const{default:y}=await Ks(Object.assign({"../../../assets/icons/align-bottom.svg":()=>Promise.resolve().then(()=>require("./align-bottom-BNcdAnw9.cjs")),"../../../assets/icons/align-center.svg":()=>Promise.resolve().then(()=>require("./align-center-DEANXdAS.cjs")),"../../../assets/icons/align-left.svg":()=>Promise.resolve().then(()=>require("./align-left-Cm-uab8B.cjs")),"../../../assets/icons/align-right.svg":()=>Promise.resolve().then(()=>require("./align-right-3l34PJVv.cjs")),"../../../assets/icons/align-top.svg":()=>Promise.resolve().then(()=>require("./align-top-BGk9vlUd.cjs")),"../../../assets/icons/arrow-down.svg":()=>Promise.resolve().then(()=>require("./arrow-down-BVZ1P_L9.cjs")),"../../../assets/icons/arrow-left.svg":()=>Promise.resolve().then(()=>require("./arrow-left-CXb5pfjn.cjs")),"../../../assets/icons/arrow-preview-down.svg":()=>Promise.resolve().then(()=>require("./arrow-preview-down-DaEiSgZ5.cjs")),"../../../assets/icons/arrow-preview-up.svg":()=>Promise.resolve().then(()=>require("./arrow-preview-up-DaNjYolK.cjs")),"../../../assets/icons/arrow-right.svg":()=>Promise.resolve().then(()=>require("./arrow-right-QxBPnNiY.cjs")),"../../../assets/icons/arrow-square.svg":()=>Promise.resolve().then(()=>require("./arrow-square-BQEpI5Xn.cjs")),"../../../assets/icons/arrow-up-right.svg":()=>Promise.resolve().then(()=>require("./arrow-up-right-BAHL0rjI.cjs")),"../../../assets/icons/border-dashed.svg":()=>Promise.resolve().then(()=>require("./border-dashed-hzn9HgjT.cjs")),"../../../assets/icons/border-solid.svg":()=>Promise.resolve().then(()=>require("./border-solid-7GLUyhD0.cjs")),"../../../assets/icons/cards.svg":()=>Promise.resolve().then(()=>require("./cards-DsOTH3J4.cjs")),"../../../assets/icons/chat.svg":()=>Promise.resolve().then(()=>require("./chat-B_av70HO.cjs")),"../../../assets/icons/check.svg":()=>Promise.resolve().then(()=>require("./check-b4m73KG0.cjs")),"../../../assets/icons/copy.svg":()=>Promise.resolve().then(()=>require("./copy-D4o494-8.cjs")),"../../../assets/icons/corners-out.svg":()=>Promise.resolve().then(()=>require("./corners-out-4-FEW-w_.cjs")),"../../../assets/icons/desktop.svg":()=>Promise.resolve().then(()=>require("./desktop-BaS7MtSb.cjs")),"../../../assets/icons/drag.svg":()=>Promise.resolve().then(()=>require("./drag-CRprmRb-.cjs")),"../../../assets/icons/faqs.svg":()=>Promise.resolve().then(()=>require("./faqs-BqOuvjUH.cjs")),"../../../assets/icons/file.svg":()=>Promise.resolve().then(()=>require("./file-8wBLPxbL.cjs")),"../../../assets/icons/font.svg":()=>Promise.resolve().then(()=>require("./font-DkMBoXe1.cjs")),"../../../assets/icons/globe.svg":()=>Promise.resolve().then(()=>require("./globe-Dc76Xp4l.cjs")),"../../../assets/icons/heading.svg":()=>Promise.resolve().then(()=>require("./heading-CPq36T7M.cjs")),"../../../assets/icons/house.svg":()=>Promise.resolve().then(()=>require("./house-CZ2u4ZpK.cjs")),"../../../assets/icons/image.svg":()=>Promise.resolve().then(()=>require("./image-Bx3xvWOB.cjs")),"../../../assets/icons/info-circle.svg":()=>Promise.resolve().then(()=>require("./info-circle-DxyEtmA8.cjs")),"../../../assets/icons/layers.svg":()=>Promise.resolve().then(()=>require("./layers-D-nS2yjm.cjs")),"../../../assets/icons/lock.svg":()=>Promise.resolve().then(()=>require("./lock-BmgYa3ZA.cjs")),"../../../assets/icons/mobile.svg":()=>Promise.resolve().then(()=>require("./mobile-jT12AeF2.cjs")),"../../../assets/icons/paint.svg":()=>Promise.resolve().then(()=>require("./paint-onR-PyLb.cjs")),"../../../assets/icons/palette.svg":()=>Promise.resolve().then(()=>require("./palette-BOR3Eq6r.cjs")),"../../../assets/icons/paragraph.svg":()=>Promise.resolve().then(()=>require("./paragraph-BYRArpHX.cjs")),"../../../assets/icons/plus.svg":()=>Promise.resolve().then(()=>require("./plus-7zIw2qu6.cjs")),"../../../assets/icons/radius.svg":()=>Promise.resolve().then(()=>require("./radius-CRLmETG0.cjs")),"../../../assets/icons/redo.svg":()=>Promise.resolve().then(()=>require("./redo-C-M_xJyP.cjs")),"../../../assets/icons/search.svg":()=>Promise.resolve().then(()=>require("./search-kPFRd0TJ.cjs")),"../../../assets/icons/settings.svg":()=>Promise.resolve().then(()=>require("./settings-BqG-9m9d.cjs")),"../../../assets/icons/sign-out.svg":()=>Promise.resolve().then(()=>require("./sign-out-vR-y-Fk7.cjs")),"../../../assets/icons/sliders.svg":()=>Promise.resolve().then(()=>require("./sliders-CsvSCMlf.cjs")),"../../../assets/icons/squares.svg":()=>Promise.resolve().then(()=>require("./squares-BaUyzSBO.cjs")),"../../../assets/icons/star.svg":()=>Promise.resolve().then(()=>require("./star-DX6bHsl_.cjs")),"../../../assets/icons/tablet.svg":()=>Promise.resolve().then(()=>require("./tablet-BvEDp-eu.cjs")),"../../../assets/icons/text-align-center.svg":()=>Promise.resolve().then(()=>require("./text-align-center-DSiXCwfH.cjs")),"../../../assets/icons/text-align-left.svg":()=>Promise.resolve().then(()=>require("./text-align-left-BLq4Pvg1.cjs")),"../../../assets/icons/text-align-right.svg":()=>Promise.resolve().then(()=>require("./text-align-right-B1liYPsk.cjs")),"../../../assets/icons/text-bold.svg":()=>Promise.resolve().then(()=>require("./text-bold-BqCslwM8.cjs")),"../../../assets/icons/text-code.svg":()=>Promise.resolve().then(()=>require("./text-code-CdpLXZEo.cjs")),"../../../assets/icons/text-italic.svg":()=>Promise.resolve().then(()=>require("./text-italic-DgM86CDI.cjs")),"../../../assets/icons/text-strike-through.svg":()=>Promise.resolve().then(()=>require("./text-strike-through-DUrcRZUF.cjs")),"../../../assets/icons/text-underline.svg":()=>Promise.resolve().then(()=>require("./text-underline-CwR9adlS.cjs")),"../../../assets/icons/textbox.svg":()=>Promise.resolve().then(()=>require("./textbox-CeYJQP_1.cjs")),"../../../assets/icons/thickness.svg":()=>Promise.resolve().then(()=>require("./thickness-DSnQHY5N.cjs")),"../../../assets/icons/ticket.svg":()=>Promise.resolve().then(()=>require("./ticket-BFI6P_1c.cjs")),"../../../assets/icons/trash.svg":()=>Promise.resolve().then(()=>require("./trash-Cy0hsvys.cjs")),"../../../assets/icons/undo.svg":()=>Promise.resolve().then(()=>require("./undo-D2eH1UgJ.cjs")),"../../../assets/icons/user-circle-gear.svg":()=>Promise.resolve().then(()=>require("./user-circle-gear-DeMV7Apx.cjs")),"../../../assets/icons/x.svg":()=>Promise.resolve().then(()=>require("./x-DW1UBLIF.cjs")),"../../../assets/icons/zoom-minus.svg":()=>Promise.resolve().then(()=>require("./zoom-minus-TiFzxDhk.cjs"))}),`../../../assets/icons/${e}.svg`,6);h(()=>y)}catch{console.error(`Icon "${e}" not found in assets.`),h(()=>null)}})()},[e,r]),u?m.jsx(u,{fill:n,style:{"--icon-fill":n},className:z(yt.icon,i,{[yt.hoverable]:s,[yt.rotated]:l}),onClick:o,width:a||"24",height:d||"24"}):null},to="_button_gxd35_1",ro="_primary_gxd35_13",no="_secondary_gxd35_18",Fe={button:to,primary:ro,secondary:no},Nt=t=>{const{children:e,onClick:r,style:n,className:s,disabled:o=!1,size:i="m",type:a="Primary"}=t;return m.jsx("button",{className:z(Fe.button,s,{[Fe.primary]:a==="Primary",[Fe.secondary]:a==="Secondary",[Fe.tertiary]:a==="Tertiary"}),onClick:r,style:{...n,fontSize:i==="m"?14:i==="s"?12:16},disabled:o,children:e})},so="_wrapper_wp7u5_1",oo="_label_wp7u5_9",io="_input_wp7u5_17",ao="_required_wp7u5_36",co="_paddingless_wp7u5_40",lo="_content_wp7u5_44",uo="_borderless_wp7u5_50",ue={wrapper:so,label:oo,input:io,required:ao,paddingless:co,content:lo,borderless:uo},fo=t=>{const{onChange:e,style:r,label:n,value:s,type:o,min:i,max:a,placeholder:d,disabled:l=!1,required:u=!1,regex:h,paddingless:S=!1,borderless:y=!1,editable:g=!1}=t,[p,b]=D.useState(!1);function O(_){return Number(_)<0?String(i):_}function w(_){return!u||!h?!0:new RegExp(h).test(_)}return m.jsxs("div",{className:ue.wrapper,children:[n&&m.jsx("label",{className:ue.label,htmlFor:n,children:n}),m.jsxs("div",{className:ue.content,children:[m.jsx("input",{id:n,type:o||"text",onChange:_=>{if(o==="text")e(_.target.value);else{const k=O(_.target.value);e(k)}},value:s,autoComplete:"off",placeholder:d,className:z(ue.input,{[ue.required]:p&&u&&!w(s),[ue.paddingless]:S,[ue.borderless]:y}),min:o==="number"?i:void 0,max:o==="number"?a:void 0,disabled:l,onFocus:()=>b(!0),style:r}),g&&m.jsx("div",{children:m.jsx(ne,{name:"sliders",width:20,height:20,hoverable:!0})})]})]})},ho="_wrapper_1v1ye_1",po="_label_1v1ye_9",go="_select_1v1ye_17",mo="_icon_1v1ye_30",vo="_rotate_1v1ye_34",yo="_content_1v1ye_38",bo="_options_1v1ye_42",So="_option_1v1ye_42",wo="_addon_1v1ye_66",oe={wrapper:ho,label:po,select:go,icon:mo,rotate:vo,content:yo,options:bo,option:So,addon:wo},Eo=t=>{const{leftAddon:e,onChange:r,label:n,value:s,options:o,style:i}=t,[a,d]=D.useState(!1);function l(u){r(u),d(!1)}return D.useEffect(()=>{const u=()=>{d(!1)};return u(),document.body.addEventListener("click",u),()=>{document.body.removeEventListener("click",u)}},[]),m.jsxs("div",{className:oe.wrapper,style:{...i},children:[n&&m.jsx("label",{className:oe.label,htmlFor:n,children:n}),m.jsxs("div",{className:oe.content,onClick:u=>u.stopPropagation(),children:[m.jsxs("div",{className:oe.select,onClick:()=>d(u=>!u),children:[m.jsxs("div",{className:oe.addon,children:[e,m.jsx("span",{children:s})]}),m.jsx(ne,{name:"arrow-down",className:z(oe.icon,{[oe.rotate]:a})})]}),a&&m.jsx("div",{className:oe.options,onClick:()=>d(!1),children:o.filter(u=>u!==s).map(u=>m.jsx("div",{className:oe.option,onClick:()=>l(u),children:u},u))})]})]})},Oo="_wrapper_3w2ni_1",_o="_active_3w2ni_24",To="_toggle_3w2ni_27",Do="_background_3w2ni_39",Co="_padding_3w2ni_43",re={wrapper:Oo,switch:"_switch_3w2ni_13",active:_o,toggle:To,background:Do,padding:Co},xo=t=>{const{onChange:e,style:r,current:n,label:s,hasBackground:o=!1,paddingless:i=!0}=t,[a,d]=D.useState(n),l=()=>{d(u=>!u),e==null||e(!a)};return m.jsx(m.Fragment,{children:s?m.jsxs("div",{className:z(re.wrapper,{[re.background]:o,[re.padding]:!i}),children:[m.jsx("div",{className:z(re.switch,{[re.active]:a}),onClick:l,style:r,children:m.jsx("div",{className:re.toggle})}),m.jsx("span",{className:re.value,children:s})]}):m.jsx("div",{className:z(re.switch,{[re.active]:a}),onClick:l,style:r,children:m.jsx("div",{className:re.toggle})})})},Po="_wrapper_1inu5_1",Io={wrapper:Po},Ro=({children:t})=>{const{hoverBlockId:e,startHideTimeout:r,clearHideTimeout:n,setMouseOverModal:s}=an();return e?m.jsx("div",{className:Io.wrapper,onMouseEnter:()=>{n(),s(!0)},onMouseLeave:()=>{s(!1),r()},children:t}):null},No="_blocks_1op3c_1",ko="_block_1op3c_1",jo="_active_1op3c_18",bt={blocks:No,block:ko,active:jo},Ao=t=>{const{items:e,selectedItem:r,onSelect:n,getIconName:s}=t;return m.jsx("div",{className:bt.blocks,children:e.map(o=>m.jsx("div",{className:z(bt.block,{[bt.active]:r===o}),onClick:()=>n(o),children:m.jsx(ne,{name:s(o),fill:r===o?"#252525":"#757575"})},String(o)))})},Mo="_applyButton_1cqw4_2",Lo="_cancelButton_1cqw4_7",qo="_content_1cqw4_12",Bo="_label_1cqw4_18",Fo="_colorValue_1cqw4_30",Uo="_modal_1cqw4_37",Ho="_colorMap_1cqw4_56",$o="_indicator_1cqw4_64",Vo="_hueSlider_1cqw4_73",zo="_slider_1cqw4_102",Wo="_buttons_1cqw4_107",Yo="_name_1cqw4_113",Jo="_secondary_1cqw4_118",Go="_input_1cqw4_126",fe={applyButton:Mo,cancelButton:Lo,content:qo,label:Bo,colorValue:Fo,modal:Uo,colorMap:Ho,indicator:$o,hueSlider:Vo,slider:zo,buttons:Wo,name:Yo,secondary:Jo,input:Go},Ko=t=>{const{initialColor:e,onChange:r,title:n,labelStyle:s="primary"}=t,[o,i]=D.useState(e),{setActiveLabel:a,setModalPosition:d,setInitialColor:l,setShowModal:u,setUpdate:h,setColor:S,setColorChange:y,colorChange:g}=cn();D.useEffect(()=>{const b=()=>{u(!1),a(null),l(e),h(()=>{}),S(e),y(()=>{})};return document.body.addEventListener("click",b),()=>{document.body.removeEventListener("click",b)}},[]);const p=b=>{b.stopPropagation(),u(!0),y(i),h(r),l(e),S(o);const O=b.currentTarget.getBoundingClientRect(),w=400,_=288,k=10,M=20,B=window.innerHeight-O.bottom,X=O.top,se=window.innerWidth-O.right,ae=O.left;let Z,ee;Z=O.bottom+k+window.scrollY,ee=O.left,(B<w||B<M)&&(X>=w?Z=O.top-w-k+window.scrollY:Z=window.scrollY+(window.innerHeight-w)/2),se<_&&(ae>=_?ee=O.right-_:ee=(window.innerWidth-_)/2),ee<O.right&&ee+_>O.left&&Z<O.bottom&&Z+w>O.top&&(se>=_?ee=O.right+k+100:B>=w?Z=O.bottom+k+window.scrollY:(Z=window.scrollY+(window.innerHeight-w)/2,ee=(window.innerWidth-_)/2)),d({top:Z,left:ee})};return m.jsxs("div",{className:fe.content,children:[m.jsx("span",{className:z(fe.name,{[fe.secondary]:s==="secondary"}),children:n}),m.jsxs("label",{htmlFor:"color",className:fe.label,children:[m.jsx("div",{className:fe.colorValue,style:{background:o},onClick:p}),m.jsx("input",{type:"text",defaultValue:o,value:o,onChange:b=>{const O=b.target.value;r(O),S(O),i(O),g(O)},className:fe.input})]})]})},Xo="_modal_1qb2a_1",Qo={modal:Xo},Zo=t=>{const{close:e,children:r}=t;return D.useEffect(()=>{const n=()=>{e(!1)};return document.body.addEventListener("click",n),()=>{document.body.removeEventListener("click",n)}},[]),m.jsx("div",{className:Qo.modal,children:r})},ei="_wrapper_1qvfi_1",ti="_label_1qvfi_10",ri="_textarea_1qvfi_18",ni="_length_1qvfi_33",Ue={wrapper:ei,label:ti,textarea:ri,length:ni},si=t=>{const{onChange:e,label:r,value:n,maxLength:s,placeholder:o}=t,[i,a]=D.useState(n.length);return m.jsxs("div",{className:Ue.wrapper,children:[r&&m.jsx("label",{className:Ue.label,htmlFor:r,children:r}),m.jsx("textarea",{id:r,defaultValue:n,onChange:d=>{a(d.target.value.length),e(d.target.value)},placeholder:o,className:Ue.textarea,maxLength:s}),s&&m.jsxs("div",{className:Ue.length,children:[i,"/",s]})]})},oi="_wrapper_1fcne_2",ii="_label_1fcne_10",ai="_options_1fcne_18",ci="_radioLabel_1fcne_23",li="_radio_1fcne_23",ui="_custom_1fcne_36",di="_option_1fcne_18",de={wrapper:oi,label:ii,options:ai,radioLabel:ci,radio:li,custom:ui,option:di},fi=t=>{const{defaultValue:e,options:r,onChange:n,label:s}=t,[o,i]=D.useState(e),a=d=>{const l=d.target.value;i(l),n(l)};return m.jsxs("div",{className:de.wrapper,children:[m.jsx("span",{className:de.label,children:s}),m.jsx("div",{className:de.options,children:r.map(d=>m.jsxs("label",{className:de.radioLabel,children:[m.jsx("input",{type:"radio",value:d.value,checked:o===d.value,onChange:a,className:de.radio}),m.jsx("span",{className:de.custom}),m.jsx("span",{className:de.option,children:d.label})]},d.value))})]})},hi="_tip_pl6k0_1",pi="_text_pl6k0_9",gi="_warning_pl6k0_15",mi="_error_pl6k0_20",vi="_hide_pl6k0_25",Pe={tip:hi,text:pi,warning:gi,error:mi,hide:vi},yi=t=>{const{type:e,message:r,style:n}=t,[s,o]=D.useState(!1);return m.jsxs("div",{className:z(Pe.tip,{[Pe.warning]:e==="warning",[Pe.error]:e==="error",[Pe.hide]:s}),style:n,children:[m.jsx("div",{children:m.jsx(ne,{name:"info-circle",fill:e==="warning"?"#C1972A":"#FF3F19",width:20,height:20})}),m.jsx("div",{className:Pe.text,children:r}),m.jsx("div",{children:m.jsx(ne,{name:"x",fill:e==="warning"?"#C1972A":"#FF3F19",width:20,height:20,hoverable:!0,onClick:()=>o(!0)})})]})},bi="_customCheckbox_1b69m_1",Si="_checkboxBox_1b69m_7",wi="_checked_1b69m_16",Ei="_icon_1b69m_21",He={customCheckbox:bi,checkboxBox:Si,checked:wi,icon:Ei},un=t=>{const{value:e,onChange:r}=t,[n,s]=D.useState(e),o=()=>{s(!n),r(!n)};return m.jsxs("label",{className:He.customCheckbox,children:[m.jsx("input",{type:"checkbox",checked:n,onChange:o,style:{display:"none"}}),m.jsx("span",{className:z(He.checkboxBox,{[He.checked]:n})}),n&&m.jsx("div",{className:He.icon,children:m.jsx(ne,{name:"check",width:14,height:14,fill:"#ff3f19"})})]})};function dn(t,e){return function(){return t.apply(e,arguments)}}const{toString:Oi}=Object.prototype,{getPrototypeOf:Wt}=Object,Xe=(t=>e=>{const r=Oi.call(e);return t[r]||(t[r]=r.slice(8,-1).toLowerCase())})(Object.create(null)),Q=t=>(t=t.toLowerCase(),e=>Xe(e)===t),Qe=t=>e=>typeof e===t,{isArray:we}=Array,Ne=Qe("undefined");function _i(t){return t!==null&&!Ne(t)&&t.constructor!==null&&!Ne(t.constructor)&&W(t.constructor.isBuffer)&&t.constructor.isBuffer(t)}const fn=Q("ArrayBuffer");function Ti(t){let e;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?e=ArrayBuffer.isView(t):e=t&&t.buffer&&fn(t.buffer),e}const Di=Qe("string"),W=Qe("function"),hn=Qe("number"),Ze=t=>t!==null&&typeof t=="object",Ci=t=>t===!0||t===!1,Ve=t=>{if(Xe(t)!=="object")return!1;const e=Wt(t);return(e===null||e===Object.prototype||Object.getPrototypeOf(e)===null)&&!(Symbol.toStringTag in t)&&!(Symbol.iterator in t)},xi=Q("Date"),Pi=Q("File"),Ii=Q("Blob"),Ri=Q("FileList"),Ni=t=>Ze(t)&&W(t.pipe),ki=t=>{let e;return t&&(typeof FormData=="function"&&t instanceof FormData||W(t.append)&&((e=Xe(t))==="formdata"||e==="object"&&W(t.toString)&&t.toString()==="[object FormData]"))},ji=Q("URLSearchParams"),[Ai,Mi,Li,qi]=["ReadableStream","Request","Response","Headers"].map(Q),Bi=t=>t.trim?t.trim():t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function ke(t,e,{allOwnKeys:r=!1}={}){if(t===null||typeof t>"u")return;let n,s;if(typeof t!="object"&&(t=[t]),we(t))for(n=0,s=t.length;n<s;n++)e.call(null,t[n],n,t);else{const o=r?Object.getOwnPropertyNames(t):Object.keys(t),i=o.length;let a;for(n=0;n<i;n++)a=o[n],e.call(null,t[a],a,t)}}function pn(t,e){e=e.toLowerCase();const r=Object.keys(t);let n=r.length,s;for(;n-- >0;)if(s=r[n],e===s.toLowerCase())return s;return null}const he=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,gn=t=>!Ne(t)&&t!==he;function kt(){const{caseless:t}=gn(this)&&this||{},e={},r=(n,s)=>{const o=t&&pn(e,s)||s;Ve(e[o])&&Ve(n)?e[o]=kt(e[o],n):Ve(n)?e[o]=kt({},n):we(n)?e[o]=n.slice():e[o]=n};for(let n=0,s=arguments.length;n<s;n++)arguments[n]&&ke(arguments[n],r);return e}const Fi=(t,e,r,{allOwnKeys:n}={})=>(ke(e,(s,o)=>{r&&W(s)?t[o]=dn(s,r):t[o]=s},{allOwnKeys:n}),t),Ui=t=>(t.charCodeAt(0)===65279&&(t=t.slice(1)),t),Hi=(t,e,r,n)=>{t.prototype=Object.create(e.prototype,n),t.prototype.constructor=t,Object.defineProperty(t,"super",{value:e.prototype}),r&&Object.assign(t.prototype,r)},$i=(t,e,r,n)=>{let s,o,i;const a={};if(e=e||{},t==null)return e;do{for(s=Object.getOwnPropertyNames(t),o=s.length;o-- >0;)i=s[o],(!n||n(i,t,e))&&!a[i]&&(e[i]=t[i],a[i]=!0);t=r!==!1&&Wt(t)}while(t&&(!r||r(t,e))&&t!==Object.prototype);return e},Vi=(t,e,r)=>{t=String(t),(r===void 0||r>t.length)&&(r=t.length),r-=e.length;const n=t.indexOf(e,r);return n!==-1&&n===r},zi=t=>{if(!t)return null;if(we(t))return t;let e=t.length;if(!hn(e))return null;const r=new Array(e);for(;e-- >0;)r[e]=t[e];return r},Wi=(t=>e=>t&&e instanceof t)(typeof Uint8Array<"u"&&Wt(Uint8Array)),Yi=(t,e)=>{const n=(t&&t[Symbol.iterator]).call(t);let s;for(;(s=n.next())&&!s.done;){const o=s.value;e.call(t,o[0],o[1])}},Ji=(t,e)=>{let r;const n=[];for(;(r=t.exec(e))!==null;)n.push(r);return n},Gi=Q("HTMLFormElement"),Ki=t=>t.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(r,n,s){return n.toUpperCase()+s}),Rr=(({hasOwnProperty:t})=>(e,r)=>t.call(e,r))(Object.prototype),Xi=Q("RegExp"),mn=(t,e)=>{const r=Object.getOwnPropertyDescriptors(t),n={};ke(r,(s,o)=>{let i;(i=e(s,o,t))!==!1&&(n[o]=i||s)}),Object.defineProperties(t,n)},Qi=t=>{mn(t,(e,r)=>{if(W(t)&&["arguments","caller","callee"].indexOf(r)!==-1)return!1;const n=t[r];if(W(n)){if(e.enumerable=!1,"writable"in e){e.writable=!1;return}e.set||(e.set=()=>{throw Error("Can not rewrite read-only method '"+r+"'")})}})},Zi=(t,e)=>{const r={},n=s=>{s.forEach(o=>{r[o]=!0})};return we(t)?n(t):n(String(t).split(e)),r},ea=()=>{},ta=(t,e)=>t!=null&&Number.isFinite(t=+t)?t:e,St="abcdefghijklmnopqrstuvwxyz",Nr="0123456789",vn={DIGIT:Nr,ALPHA:St,ALPHA_DIGIT:St+St.toUpperCase()+Nr},ra=(t=16,e=vn.ALPHA_DIGIT)=>{let r="";const{length:n}=e;for(;t--;)r+=e[Math.random()*n|0];return r};function na(t){return!!(t&&W(t.append)&&t[Symbol.toStringTag]==="FormData"&&t[Symbol.iterator])}const sa=t=>{const e=new Array(10),r=(n,s)=>{if(Ze(n)){if(e.indexOf(n)>=0)return;if(!("toJSON"in n)){e[s]=n;const o=we(n)?[]:{};return ke(n,(i,a)=>{const d=r(i,s+1);!Ne(d)&&(o[a]=d)}),e[s]=void 0,o}}return n};return r(t,0)},oa=Q("AsyncFunction"),ia=t=>t&&(Ze(t)||W(t))&&W(t.then)&&W(t.catch),yn=((t,e)=>t?setImmediate:e?((r,n)=>(he.addEventListener("message",({source:s,data:o})=>{s===he&&o===r&&n.length&&n.shift()()},!1),s=>{n.push(s),he.postMessage(r,"*")}))(`axios@${Math.random()}`,[]):r=>setTimeout(r))(typeof setImmediate=="function",W(he.postMessage)),aa=typeof queueMicrotask<"u"?queueMicrotask.bind(he):typeof process<"u"&&process.nextTick||yn,f={isArray:we,isArrayBuffer:fn,isBuffer:_i,isFormData:ki,isArrayBufferView:Ti,isString:Di,isNumber:hn,isBoolean:Ci,isObject:Ze,isPlainObject:Ve,isReadableStream:Ai,isRequest:Mi,isResponse:Li,isHeaders:qi,isUndefined:Ne,isDate:xi,isFile:Pi,isBlob:Ii,isRegExp:Xi,isFunction:W,isStream:Ni,isURLSearchParams:ji,isTypedArray:Wi,isFileList:Ri,forEach:ke,merge:kt,extend:Fi,trim:Bi,stripBOM:Ui,inherits:Hi,toFlatObject:$i,kindOf:Xe,kindOfTest:Q,endsWith:Vi,toArray:zi,forEachEntry:Yi,matchAll:Ji,isHTMLForm:Gi,hasOwnProperty:Rr,hasOwnProp:Rr,reduceDescriptors:mn,freezeMethods:Qi,toObjectSet:Zi,toCamelCase:Ki,noop:ea,toFiniteNumber:ta,findKey:pn,global:he,isContextDefined:gn,ALPHABET:vn,generateString:ra,isSpecCompliantForm:na,toJSONObject:sa,isAsyncFn:oa,isThenable:ia,setImmediate:yn,asap:aa};function C(t,e,r,n,s){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=t,this.name="AxiosError",e&&(this.code=e),r&&(this.config=r),n&&(this.request=n),s&&(this.response=s,this.status=s.status?s.status:null)}f.inherits(C,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:f.toJSONObject(this.config),code:this.code,status:this.status}}});const bn=C.prototype,Sn={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(t=>{Sn[t]={value:t}});Object.defineProperties(C,Sn);Object.defineProperty(bn,"isAxiosError",{value:!0});C.from=(t,e,r,n,s,o)=>{const i=Object.create(bn);return f.toFlatObject(t,i,function(d){return d!==Error.prototype},a=>a!=="isAxiosError"),C.call(i,t.message,e,r,n,s),i.cause=t,i.name=t.name,o&&Object.assign(i,o),i};const ca=null;function jt(t){return f.isPlainObject(t)||f.isArray(t)}function wn(t){return f.endsWith(t,"[]")?t.slice(0,-2):t}function kr(t,e,r){return t?t.concat(e).map(function(s,o){return s=wn(s),!r&&o?"["+s+"]":s}).join(r?".":""):e}function la(t){return f.isArray(t)&&!t.some(jt)}const ua=f.toFlatObject(f,{},null,function(e){return/^is[A-Z]/.test(e)});function et(t,e,r){if(!f.isObject(t))throw new TypeError("target must be an object");e=e||new FormData,r=f.toFlatObject(r,{metaTokens:!0,dots:!1,indexes:!1},!1,function(p,b){return!f.isUndefined(b[p])});const n=r.metaTokens,s=r.visitor||u,o=r.dots,i=r.indexes,d=(r.Blob||typeof Blob<"u"&&Blob)&&f.isSpecCompliantForm(e);if(!f.isFunction(s))throw new TypeError("visitor must be a function");function l(g){if(g===null)return"";if(f.isDate(g))return g.toISOString();if(!d&&f.isBlob(g))throw new C("Blob is not supported. Use a Buffer instead.");return f.isArrayBuffer(g)||f.isTypedArray(g)?d&&typeof Blob=="function"?new Blob([g]):Buffer.from(g):g}function u(g,p,b){let O=g;if(g&&!b&&typeof g=="object"){if(f.endsWith(p,"{}"))p=n?p:p.slice(0,-2),g=JSON.stringify(g);else if(f.isArray(g)&&la(g)||(f.isFileList(g)||f.endsWith(p,"[]"))&&(O=f.toArray(g)))return p=wn(p),O.forEach(function(_,k){!(f.isUndefined(_)||_===null)&&e.append(i===!0?kr([p],k,o):i===null?p:p+"[]",l(_))}),!1}return jt(g)?!0:(e.append(kr(b,p,o),l(g)),!1)}const h=[],S=Object.assign(ua,{defaultVisitor:u,convertValue:l,isVisitable:jt});function y(g,p){if(!f.isUndefined(g)){if(h.indexOf(g)!==-1)throw Error("Circular reference detected in "+p.join("."));h.push(g),f.forEach(g,function(O,w){(!(f.isUndefined(O)||O===null)&&s.call(e,O,f.isString(w)?w.trim():w,p,S))===!0&&y(O,p?p.concat(w):[w])}),h.pop()}}if(!f.isObject(t))throw new TypeError("data must be an object");return y(t),e}function jr(t){const e={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(t).replace(/[!'()~]|%20|%00/g,function(n){return e[n]})}function Yt(t,e){this._pairs=[],t&&et(t,this,e)}const En=Yt.prototype;En.append=function(e,r){this._pairs.push([e,r])};En.toString=function(e){const r=e?function(n){return e.call(this,n,jr)}:jr;return this._pairs.map(function(s){return r(s[0])+"="+r(s[1])},"").join("&")};function da(t){return encodeURIComponent(t).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function On(t,e,r){if(!e)return t;const n=r&&r.encode||da,s=r&&r.serialize;let o;if(s?o=s(e,r):o=f.isURLSearchParams(e)?e.toString():new Yt(e,r).toString(n),o){const i=t.indexOf("#");i!==-1&&(t=t.slice(0,i)),t+=(t.indexOf("?")===-1?"?":"&")+o}return t}class Ar{constructor(){this.handlers=[]}use(e,r,n){return this.handlers.push({fulfilled:e,rejected:r,synchronous:n?n.synchronous:!1,runWhen:n?n.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(e){f.forEach(this.handlers,function(n){n!==null&&e(n)})}}const _n={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},fa=typeof URLSearchParams<"u"?URLSearchParams:Yt,ha=typeof FormData<"u"?FormData:null,pa=typeof Blob<"u"?Blob:null,ga={isBrowser:!0,classes:{URLSearchParams:fa,FormData:ha,Blob:pa},protocols:["http","https","file","blob","url","data"]},Jt=typeof window<"u"&&typeof document<"u",At=typeof navigator=="object"&&navigator||void 0,ma=Jt&&(!At||["ReactNative","NativeScript","NS"].indexOf(At.product)<0),va=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",ya=Jt&&window.location.href||"http://localhost",ba=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:Jt,hasStandardBrowserEnv:ma,hasStandardBrowserWebWorkerEnv:va,navigator:At,origin:ya},Symbol.toStringTag,{value:"Module"})),$={...ba,...ga};function Sa(t,e){return et(t,new $.classes.URLSearchParams,Object.assign({visitor:function(r,n,s,o){return $.isNode&&f.isBuffer(r)?(this.append(n,r.toString("base64")),!1):o.defaultVisitor.apply(this,arguments)}},e))}function wa(t){return f.matchAll(/\w+|\[(\w*)]/g,t).map(e=>e[0]==="[]"?"":e[1]||e[0])}function Ea(t){const e={},r=Object.keys(t);let n;const s=r.length;let o;for(n=0;n<s;n++)o=r[n],e[o]=t[o];return e}function Tn(t){function e(r,n,s,o){let i=r[o++];if(i==="__proto__")return!0;const a=Number.isFinite(+i),d=o>=r.length;return i=!i&&f.isArray(s)?s.length:i,d?(f.hasOwnProp(s,i)?s[i]=[s[i],n]:s[i]=n,!a):((!s[i]||!f.isObject(s[i]))&&(s[i]=[]),e(r,n,s[i],o)&&f.isArray(s[i])&&(s[i]=Ea(s[i])),!a)}if(f.isFormData(t)&&f.isFunction(t.entries)){const r={};return f.forEachEntry(t,(n,s)=>{e(wa(n),s,r,0)}),r}return null}function Oa(t,e,r){if(f.isString(t))try{return(e||JSON.parse)(t),f.trim(t)}catch(n){if(n.name!=="SyntaxError")throw n}return(0,JSON.stringify)(t)}const je={transitional:_n,adapter:["xhr","http","fetch"],transformRequest:[function(e,r){const n=r.getContentType()||"",s=n.indexOf("application/json")>-1,o=f.isObject(e);if(o&&f.isHTMLForm(e)&&(e=new FormData(e)),f.isFormData(e))return s?JSON.stringify(Tn(e)):e;if(f.isArrayBuffer(e)||f.isBuffer(e)||f.isStream(e)||f.isFile(e)||f.isBlob(e)||f.isReadableStream(e))return e;if(f.isArrayBufferView(e))return e.buffer;if(f.isURLSearchParams(e))return r.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();let a;if(o){if(n.indexOf("application/x-www-form-urlencoded")>-1)return Sa(e,this.formSerializer).toString();if((a=f.isFileList(e))||n.indexOf("multipart/form-data")>-1){const d=this.env&&this.env.FormData;return et(a?{"files[]":e}:e,d&&new d,this.formSerializer)}}return o||s?(r.setContentType("application/json",!1),Oa(e)):e}],transformResponse:[function(e){const r=this.transitional||je.transitional,n=r&&r.forcedJSONParsing,s=this.responseType==="json";if(f.isResponse(e)||f.isReadableStream(e))return e;if(e&&f.isString(e)&&(n&&!this.responseType||s)){const i=!(r&&r.silentJSONParsing)&&s;try{return JSON.parse(e)}catch(a){if(i)throw a.name==="SyntaxError"?C.from(a,C.ERR_BAD_RESPONSE,this,null,this.response):a}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:$.classes.FormData,Blob:$.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};f.forEach(["delete","get","head","post","put","patch"],t=>{je.headers[t]={}});const _a=f.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),Ta=t=>{const e={};let r,n,s;return t&&t.split(`
35
+ `).forEach(function(i){s=i.indexOf(":"),r=i.substring(0,s).trim().toLowerCase(),n=i.substring(s+1).trim(),!(!r||e[r]&&_a[r])&&(r==="set-cookie"?e[r]?e[r].push(n):e[r]=[n]:e[r]=e[r]?e[r]+", "+n:n)}),e},Mr=Symbol("internals");function Ie(t){return t&&String(t).trim().toLowerCase()}function ze(t){return t===!1||t==null?t:f.isArray(t)?t.map(ze):String(t)}function Da(t){const e=Object.create(null),r=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let n;for(;n=r.exec(t);)e[n[1]]=n[2];return e}const Ca=t=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(t.trim());function wt(t,e,r,n,s){if(f.isFunction(n))return n.call(this,e,r);if(s&&(e=r),!!f.isString(e)){if(f.isString(n))return e.indexOf(n)!==-1;if(f.isRegExp(n))return n.test(e)}}function xa(t){return t.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(e,r,n)=>r.toUpperCase()+n)}function Pa(t,e){const r=f.toCamelCase(" "+e);["get","set","has"].forEach(n=>{Object.defineProperty(t,n+r,{value:function(s,o,i){return this[n].call(this,e,s,o,i)},configurable:!0})})}class V{constructor(e){e&&this.set(e)}set(e,r,n){const s=this;function o(a,d,l){const u=Ie(d);if(!u)throw new Error("header name must be a non-empty string");const h=f.findKey(s,u);(!h||s[h]===void 0||l===!0||l===void 0&&s[h]!==!1)&&(s[h||d]=ze(a))}const i=(a,d)=>f.forEach(a,(l,u)=>o(l,u,d));if(f.isPlainObject(e)||e instanceof this.constructor)i(e,r);else if(f.isString(e)&&(e=e.trim())&&!Ca(e))i(Ta(e),r);else if(f.isHeaders(e))for(const[a,d]of e.entries())o(d,a,n);else e!=null&&o(r,e,n);return this}get(e,r){if(e=Ie(e),e){const n=f.findKey(this,e);if(n){const s=this[n];if(!r)return s;if(r===!0)return Da(s);if(f.isFunction(r))return r.call(this,s,n);if(f.isRegExp(r))return r.exec(s);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,r){if(e=Ie(e),e){const n=f.findKey(this,e);return!!(n&&this[n]!==void 0&&(!r||wt(this,this[n],n,r)))}return!1}delete(e,r){const n=this;let s=!1;function o(i){if(i=Ie(i),i){const a=f.findKey(n,i);a&&(!r||wt(n,n[a],a,r))&&(delete n[a],s=!0)}}return f.isArray(e)?e.forEach(o):o(e),s}clear(e){const r=Object.keys(this);let n=r.length,s=!1;for(;n--;){const o=r[n];(!e||wt(this,this[o],o,e,!0))&&(delete this[o],s=!0)}return s}normalize(e){const r=this,n={};return f.forEach(this,(s,o)=>{const i=f.findKey(n,o);if(i){r[i]=ze(s),delete r[o];return}const a=e?xa(o):String(o).trim();a!==o&&delete r[o],r[a]=ze(s),n[a]=!0}),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){const r=Object.create(null);return f.forEach(this,(n,s)=>{n!=null&&n!==!1&&(r[s]=e&&f.isArray(n)?n.join(", "):n)}),r}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([e,r])=>e+": "+r).join(`
36
+ `)}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static concat(e,...r){const n=new this(e);return r.forEach(s=>n.set(s)),n}static accessor(e){const n=(this[Mr]=this[Mr]={accessors:{}}).accessors,s=this.prototype;function o(i){const a=Ie(i);n[a]||(Pa(s,i),n[a]=!0)}return f.isArray(e)?e.forEach(o):o(e),this}}V.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);f.reduceDescriptors(V.prototype,({value:t},e)=>{let r=e[0].toUpperCase()+e.slice(1);return{get:()=>t,set(n){this[r]=n}}});f.freezeMethods(V);function Et(t,e){const r=this||je,n=e||r,s=V.from(n.headers);let o=n.data;return f.forEach(t,function(a){o=a.call(r,o,s.normalize(),e?e.status:void 0)}),s.normalize(),o}function Dn(t){return!!(t&&t.__CANCEL__)}function Ee(t,e,r){C.call(this,t??"canceled",C.ERR_CANCELED,e,r),this.name="CanceledError"}f.inherits(Ee,C,{__CANCEL__:!0});function Cn(t,e,r){const n=r.config.validateStatus;!r.status||!n||n(r.status)?t(r):e(new C("Request failed with status code "+r.status,[C.ERR_BAD_REQUEST,C.ERR_BAD_RESPONSE][Math.floor(r.status/100)-4],r.config,r.request,r))}function Ia(t){const e=/^([-+\w]{1,25})(:?\/\/|:)/.exec(t);return e&&e[1]||""}function Ra(t,e){t=t||10;const r=new Array(t),n=new Array(t);let s=0,o=0,i;return e=e!==void 0?e:1e3,function(d){const l=Date.now(),u=n[o];i||(i=l),r[s]=d,n[s]=l;let h=o,S=0;for(;h!==s;)S+=r[h++],h=h%t;if(s=(s+1)%t,s===o&&(o=(o+1)%t),l-i<e)return;const y=u&&l-u;return y?Math.round(S*1e3/y):void 0}}function Na(t,e){let r=0,n=1e3/e,s,o;const i=(l,u=Date.now())=>{r=u,s=null,o&&(clearTimeout(o),o=null),t.apply(null,l)};return[(...l)=>{const u=Date.now(),h=u-r;h>=n?i(l,u):(s=l,o||(o=setTimeout(()=>{o=null,i(s)},n-h)))},()=>s&&i(s)]}const Je=(t,e,r=3)=>{let n=0;const s=Ra(50,250);return Na(o=>{const i=o.loaded,a=o.lengthComputable?o.total:void 0,d=i-n,l=s(d),u=i<=a;n=i;const h={loaded:i,total:a,progress:a?i/a:void 0,bytes:d,rate:l||void 0,estimated:l&&a&&u?(a-i)/l:void 0,event:o,lengthComputable:a!=null,[e?"download":"upload"]:!0};t(h)},r)},Lr=(t,e)=>{const r=t!=null;return[n=>e[0]({lengthComputable:r,total:t,loaded:n}),e[1]]},qr=t=>(...e)=>f.asap(()=>t(...e)),ka=$.hasStandardBrowserEnv?function(){const e=$.navigator&&/(msie|trident)/i.test($.navigator.userAgent),r=document.createElement("a");let n;function s(o){let i=o;return e&&(r.setAttribute("href",i),i=r.href),r.setAttribute("href",i),{href:r.href,protocol:r.protocol?r.protocol.replace(/:$/,""):"",host:r.host,search:r.search?r.search.replace(/^\?/,""):"",hash:r.hash?r.hash.replace(/^#/,""):"",hostname:r.hostname,port:r.port,pathname:r.pathname.charAt(0)==="/"?r.pathname:"/"+r.pathname}}return n=s(window.location.href),function(i){const a=f.isString(i)?s(i):i;return a.protocol===n.protocol&&a.host===n.host}}():function(){return function(){return!0}}(),ja=$.hasStandardBrowserEnv?{write(t,e,r,n,s,o){const i=[t+"="+encodeURIComponent(e)];f.isNumber(r)&&i.push("expires="+new Date(r).toGMTString()),f.isString(n)&&i.push("path="+n),f.isString(s)&&i.push("domain="+s),o===!0&&i.push("secure"),document.cookie=i.join("; ")},read(t){const e=document.cookie.match(new RegExp("(^|;\\s*)("+t+")=([^;]*)"));return e?decodeURIComponent(e[3]):null},remove(t){this.write(t,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function Aa(t){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t)}function Ma(t,e){return e?t.replace(/\/?\/$/,"")+"/"+e.replace(/^\/+/,""):t}function xn(t,e){return t&&!Aa(e)?Ma(t,e):e}const Br=t=>t instanceof V?{...t}:t;function ge(t,e){e=e||{};const r={};function n(l,u,h){return f.isPlainObject(l)&&f.isPlainObject(u)?f.merge.call({caseless:h},l,u):f.isPlainObject(u)?f.merge({},u):f.isArray(u)?u.slice():u}function s(l,u,h){if(f.isUndefined(u)){if(!f.isUndefined(l))return n(void 0,l,h)}else return n(l,u,h)}function o(l,u){if(!f.isUndefined(u))return n(void 0,u)}function i(l,u){if(f.isUndefined(u)){if(!f.isUndefined(l))return n(void 0,l)}else return n(void 0,u)}function a(l,u,h){if(h in e)return n(l,u);if(h in t)return n(void 0,l)}const d={url:o,method:o,data:o,baseURL:i,transformRequest:i,transformResponse:i,paramsSerializer:i,timeout:i,timeoutMessage:i,withCredentials:i,withXSRFToken:i,adapter:i,responseType:i,xsrfCookieName:i,xsrfHeaderName:i,onUploadProgress:i,onDownloadProgress:i,decompress:i,maxContentLength:i,maxBodyLength:i,beforeRedirect:i,transport:i,httpAgent:i,httpsAgent:i,cancelToken:i,socketPath:i,responseEncoding:i,validateStatus:a,headers:(l,u)=>s(Br(l),Br(u),!0)};return f.forEach(Object.keys(Object.assign({},t,e)),function(u){const h=d[u]||s,S=h(t[u],e[u],u);f.isUndefined(S)&&h!==a||(r[u]=S)}),r}const Pn=t=>{const e=ge({},t);let{data:r,withXSRFToken:n,xsrfHeaderName:s,xsrfCookieName:o,headers:i,auth:a}=e;e.headers=i=V.from(i),e.url=On(xn(e.baseURL,e.url),t.params,t.paramsSerializer),a&&i.set("Authorization","Basic "+btoa((a.username||"")+":"+(a.password?unescape(encodeURIComponent(a.password)):"")));let d;if(f.isFormData(r)){if($.hasStandardBrowserEnv||$.hasStandardBrowserWebWorkerEnv)i.setContentType(void 0);else if((d=i.getContentType())!==!1){const[l,...u]=d?d.split(";").map(h=>h.trim()).filter(Boolean):[];i.setContentType([l||"multipart/form-data",...u].join("; "))}}if($.hasStandardBrowserEnv&&(n&&f.isFunction(n)&&(n=n(e)),n||n!==!1&&ka(e.url))){const l=s&&o&&ja.read(o);l&&i.set(s,l)}return e},La=typeof XMLHttpRequest<"u",qa=La&&function(t){return new Promise(function(r,n){const s=Pn(t);let o=s.data;const i=V.from(s.headers).normalize();let{responseType:a,onUploadProgress:d,onDownloadProgress:l}=s,u,h,S,y,g;function p(){y&&y(),g&&g(),s.cancelToken&&s.cancelToken.unsubscribe(u),s.signal&&s.signal.removeEventListener("abort",u)}let b=new XMLHttpRequest;b.open(s.method.toUpperCase(),s.url,!0),b.timeout=s.timeout;function O(){if(!b)return;const _=V.from("getAllResponseHeaders"in b&&b.getAllResponseHeaders()),M={data:!a||a==="text"||a==="json"?b.responseText:b.response,status:b.status,statusText:b.statusText,headers:_,config:t,request:b};Cn(function(X){r(X),p()},function(X){n(X),p()},M),b=null}"onloadend"in b?b.onloadend=O:b.onreadystatechange=function(){!b||b.readyState!==4||b.status===0&&!(b.responseURL&&b.responseURL.indexOf("file:")===0)||setTimeout(O)},b.onabort=function(){b&&(n(new C("Request aborted",C.ECONNABORTED,t,b)),b=null)},b.onerror=function(){n(new C("Network Error",C.ERR_NETWORK,t,b)),b=null},b.ontimeout=function(){let k=s.timeout?"timeout of "+s.timeout+"ms exceeded":"timeout exceeded";const M=s.transitional||_n;s.timeoutErrorMessage&&(k=s.timeoutErrorMessage),n(new C(k,M.clarifyTimeoutError?C.ETIMEDOUT:C.ECONNABORTED,t,b)),b=null},o===void 0&&i.setContentType(null),"setRequestHeader"in b&&f.forEach(i.toJSON(),function(k,M){b.setRequestHeader(M,k)}),f.isUndefined(s.withCredentials)||(b.withCredentials=!!s.withCredentials),a&&a!=="json"&&(b.responseType=s.responseType),l&&([S,g]=Je(l,!0),b.addEventListener("progress",S)),d&&b.upload&&([h,y]=Je(d),b.upload.addEventListener("progress",h),b.upload.addEventListener("loadend",y)),(s.cancelToken||s.signal)&&(u=_=>{b&&(n(!_||_.type?new Ee(null,t,b):_),b.abort(),b=null)},s.cancelToken&&s.cancelToken.subscribe(u),s.signal&&(s.signal.aborted?u():s.signal.addEventListener("abort",u)));const w=Ia(s.url);if(w&&$.protocols.indexOf(w)===-1){n(new C("Unsupported protocol "+w+":",C.ERR_BAD_REQUEST,t));return}b.send(o||null)})},Ba=(t,e)=>{const{length:r}=t=t?t.filter(Boolean):[];if(e||r){let n=new AbortController,s;const o=function(l){if(!s){s=!0,a();const u=l instanceof Error?l:this.reason;n.abort(u instanceof C?u:new Ee(u instanceof Error?u.message:u))}};let i=e&&setTimeout(()=>{i=null,o(new C(`timeout ${e} of ms exceeded`,C.ETIMEDOUT))},e);const a=()=>{t&&(i&&clearTimeout(i),i=null,t.forEach(l=>{l.unsubscribe?l.unsubscribe(o):l.removeEventListener("abort",o)}),t=null)};t.forEach(l=>l.addEventListener("abort",o));const{signal:d}=n;return d.unsubscribe=()=>f.asap(a),d}},Fa=function*(t,e){let r=t.byteLength;if(r<e){yield t;return}let n=0,s;for(;n<r;)s=n+e,yield t.slice(n,s),n=s},Ua=async function*(t,e){for await(const r of Ha(t))yield*Fa(r,e)},Ha=async function*(t){if(t[Symbol.asyncIterator]){yield*t;return}const e=t.getReader();try{for(;;){const{done:r,value:n}=await e.read();if(r)break;yield n}}finally{await e.cancel()}},Fr=(t,e,r,n)=>{const s=Ua(t,e);let o=0,i,a=d=>{i||(i=!0,n&&n(d))};return new ReadableStream({async pull(d){try{const{done:l,value:u}=await s.next();if(l){a(),d.close();return}let h=u.byteLength;if(r){let S=o+=h;r(S)}d.enqueue(new Uint8Array(u))}catch(l){throw a(l),l}},cancel(d){return a(d),s.return()}},{highWaterMark:2})},tt=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",In=tt&&typeof ReadableStream=="function",$a=tt&&(typeof TextEncoder=="function"?(t=>e=>t.encode(e))(new TextEncoder):async t=>new Uint8Array(await new Response(t).arrayBuffer())),Rn=(t,...e)=>{try{return!!t(...e)}catch{return!1}},Va=In&&Rn(()=>{let t=!1;const e=new Request($.origin,{body:new ReadableStream,method:"POST",get duplex(){return t=!0,"half"}}).headers.has("Content-Type");return t&&!e}),Ur=64*1024,Mt=In&&Rn(()=>f.isReadableStream(new Response("").body)),Ge={stream:Mt&&(t=>t.body)};tt&&(t=>{["text","arrayBuffer","blob","formData","stream"].forEach(e=>{!Ge[e]&&(Ge[e]=f.isFunction(t[e])?r=>r[e]():(r,n)=>{throw new C(`Response type '${e}' is not supported`,C.ERR_NOT_SUPPORT,n)})})})(new Response);const za=async t=>{if(t==null)return 0;if(f.isBlob(t))return t.size;if(f.isSpecCompliantForm(t))return(await new Request($.origin,{method:"POST",body:t}).arrayBuffer()).byteLength;if(f.isArrayBufferView(t)||f.isArrayBuffer(t))return t.byteLength;if(f.isURLSearchParams(t)&&(t=t+""),f.isString(t))return(await $a(t)).byteLength},Wa=async(t,e)=>{const r=f.toFiniteNumber(t.getContentLength());return r??za(e)},Ya=tt&&(async t=>{let{url:e,method:r,data:n,signal:s,cancelToken:o,timeout:i,onDownloadProgress:a,onUploadProgress:d,responseType:l,headers:u,withCredentials:h="same-origin",fetchOptions:S}=Pn(t);l=l?(l+"").toLowerCase():"text";let y=Ba([s,o&&o.toAbortSignal()],i),g;const p=y&&y.unsubscribe&&(()=>{y.unsubscribe()});let b;try{if(d&&Va&&r!=="get"&&r!=="head"&&(b=await Wa(u,n))!==0){let M=new Request(e,{method:"POST",body:n,duplex:"half"}),B;if(f.isFormData(n)&&(B=M.headers.get("content-type"))&&u.setContentType(B),M.body){const[X,se]=Lr(b,Je(qr(d)));n=Fr(M.body,Ur,X,se)}}f.isString(h)||(h=h?"include":"omit");const O="credentials"in Request.prototype;g=new Request(e,{...S,signal:y,method:r.toUpperCase(),headers:u.normalize().toJSON(),body:n,duplex:"half",credentials:O?h:void 0});let w=await fetch(g);const _=Mt&&(l==="stream"||l==="response");if(Mt&&(a||_&&p)){const M={};["status","statusText","headers"].forEach(ae=>{M[ae]=w[ae]});const B=f.toFiniteNumber(w.headers.get("content-length")),[X,se]=a&&Lr(B,Je(qr(a),!0))||[];w=new Response(Fr(w.body,Ur,X,()=>{se&&se(),p&&p()}),M)}l=l||"text";let k=await Ge[f.findKey(Ge,l)||"text"](w,t);return!_&&p&&p(),await new Promise((M,B)=>{Cn(M,B,{data:k,headers:V.from(w.headers),status:w.status,statusText:w.statusText,config:t,request:g})})}catch(O){throw p&&p(),O&&O.name==="TypeError"&&/fetch/i.test(O.message)?Object.assign(new C("Network Error",C.ERR_NETWORK,t,g),{cause:O.cause||O}):C.from(O,O&&O.code,t,g)}}),Lt={http:ca,xhr:qa,fetch:Ya};f.forEach(Lt,(t,e)=>{if(t){try{Object.defineProperty(t,"name",{value:e})}catch{}Object.defineProperty(t,"adapterName",{value:e})}});const Hr=t=>`- ${t}`,Ja=t=>f.isFunction(t)||t===null||t===!1,Nn={getAdapter:t=>{t=f.isArray(t)?t:[t];const{length:e}=t;let r,n;const s={};for(let o=0;o<e;o++){r=t[o];let i;if(n=r,!Ja(r)&&(n=Lt[(i=String(r)).toLowerCase()],n===void 0))throw new C(`Unknown adapter '${i}'`);if(n)break;s[i||"#"+o]=n}if(!n){const o=Object.entries(s).map(([a,d])=>`adapter ${a} `+(d===!1?"is not supported by the environment":"is not available in the build"));let i=e?o.length>1?`since :
37
+ `+o.map(Hr).join(`
38
+ `):" "+Hr(o[0]):"as no adapter specified";throw new C("There is no suitable adapter to dispatch the request "+i,"ERR_NOT_SUPPORT")}return n},adapters:Lt};function Ot(t){if(t.cancelToken&&t.cancelToken.throwIfRequested(),t.signal&&t.signal.aborted)throw new Ee(null,t)}function $r(t){return Ot(t),t.headers=V.from(t.headers),t.data=Et.call(t,t.transformRequest),["post","put","patch"].indexOf(t.method)!==-1&&t.headers.setContentType("application/x-www-form-urlencoded",!1),Nn.getAdapter(t.adapter||je.adapter)(t).then(function(n){return Ot(t),n.data=Et.call(t,t.transformResponse,n),n.headers=V.from(n.headers),n},function(n){return Dn(n)||(Ot(t),n&&n.response&&(n.response.data=Et.call(t,t.transformResponse,n.response),n.response.headers=V.from(n.response.headers))),Promise.reject(n)})}const kn="1.7.7",Gt={};["object","boolean","number","function","string","symbol"].forEach((t,e)=>{Gt[t]=function(n){return typeof n===t||"a"+(e<1?"n ":" ")+t}});const Vr={};Gt.transitional=function(e,r,n){function s(o,i){return"[Axios v"+kn+"] Transitional option '"+o+"'"+i+(n?". "+n:"")}return(o,i,a)=>{if(e===!1)throw new C(s(i," has been removed"+(r?" in "+r:"")),C.ERR_DEPRECATED);return r&&!Vr[i]&&(Vr[i]=!0,console.warn(s(i," has been deprecated since v"+r+" and will be removed in the near future"))),e?e(o,i,a):!0}};function Ga(t,e,r){if(typeof t!="object")throw new C("options must be an object",C.ERR_BAD_OPTION_VALUE);const n=Object.keys(t);let s=n.length;for(;s-- >0;){const o=n[s],i=e[o];if(i){const a=t[o],d=a===void 0||i(a,o,t);if(d!==!0)throw new C("option "+o+" must be "+d,C.ERR_BAD_OPTION_VALUE);continue}if(r!==!0)throw new C("Unknown option "+o,C.ERR_BAD_OPTION)}}const qt={assertOptions:Ga,validators:Gt},ie=qt.validators;class pe{constructor(e){this.defaults=e,this.interceptors={request:new Ar,response:new Ar}}async request(e,r){try{return await this._request(e,r)}catch(n){if(n instanceof Error){let s;Error.captureStackTrace?Error.captureStackTrace(s={}):s=new Error;const o=s.stack?s.stack.replace(/^.+\n/,""):"";try{n.stack?o&&!String(n.stack).endsWith(o.replace(/^.+\n.+\n/,""))&&(n.stack+=`
39
+ `+o):n.stack=o}catch{}}throw n}}_request(e,r){typeof e=="string"?(r=r||{},r.url=e):r=e||{},r=ge(this.defaults,r);const{transitional:n,paramsSerializer:s,headers:o}=r;n!==void 0&&qt.assertOptions(n,{silentJSONParsing:ie.transitional(ie.boolean),forcedJSONParsing:ie.transitional(ie.boolean),clarifyTimeoutError:ie.transitional(ie.boolean)},!1),s!=null&&(f.isFunction(s)?r.paramsSerializer={serialize:s}:qt.assertOptions(s,{encode:ie.function,serialize:ie.function},!0)),r.method=(r.method||this.defaults.method||"get").toLowerCase();let i=o&&f.merge(o.common,o[r.method]);o&&f.forEach(["delete","get","head","post","put","patch","common"],g=>{delete o[g]}),r.headers=V.concat(i,o);const a=[];let d=!0;this.interceptors.request.forEach(function(p){typeof p.runWhen=="function"&&p.runWhen(r)===!1||(d=d&&p.synchronous,a.unshift(p.fulfilled,p.rejected))});const l=[];this.interceptors.response.forEach(function(p){l.push(p.fulfilled,p.rejected)});let u,h=0,S;if(!d){const g=[$r.bind(this),void 0];for(g.unshift.apply(g,a),g.push.apply(g,l),S=g.length,u=Promise.resolve(r);h<S;)u=u.then(g[h++],g[h++]);return u}S=a.length;let y=r;for(h=0;h<S;){const g=a[h++],p=a[h++];try{y=g(y)}catch(b){p.call(this,b);break}}try{u=$r.call(this,y)}catch(g){return Promise.reject(g)}for(h=0,S=l.length;h<S;)u=u.then(l[h++],l[h++]);return u}getUri(e){e=ge(this.defaults,e);const r=xn(e.baseURL,e.url);return On(r,e.params,e.paramsSerializer)}}f.forEach(["delete","get","head","options"],function(e){pe.prototype[e]=function(r,n){return this.request(ge(n||{},{method:e,url:r,data:(n||{}).data}))}});f.forEach(["post","put","patch"],function(e){function r(n){return function(o,i,a){return this.request(ge(a||{},{method:e,headers:n?{"Content-Type":"multipart/form-data"}:{},url:o,data:i}))}}pe.prototype[e]=r(),pe.prototype[e+"Form"]=r(!0)});class Kt{constructor(e){if(typeof e!="function")throw new TypeError("executor must be a function.");let r;this.promise=new Promise(function(o){r=o});const n=this;this.promise.then(s=>{if(!n._listeners)return;let o=n._listeners.length;for(;o-- >0;)n._listeners[o](s);n._listeners=null}),this.promise.then=s=>{let o;const i=new Promise(a=>{n.subscribe(a),o=a}).then(s);return i.cancel=function(){n.unsubscribe(o)},i},e(function(o,i,a){n.reason||(n.reason=new Ee(o,i,a),r(n.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){if(this.reason){e(this.reason);return}this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;const r=this._listeners.indexOf(e);r!==-1&&this._listeners.splice(r,1)}toAbortSignal(){const e=new AbortController,r=n=>{e.abort(n)};return this.subscribe(r),e.signal.unsubscribe=()=>this.unsubscribe(r),e.signal}static source(){let e;return{token:new Kt(function(s){e=s}),cancel:e}}}function Ka(t){return function(r){return t.apply(null,r)}}function Xa(t){return f.isObject(t)&&t.isAxiosError===!0}const Bt={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(Bt).forEach(([t,e])=>{Bt[e]=t});function jn(t){const e=new pe(t),r=dn(pe.prototype.request,e);return f.extend(r,pe.prototype,e,{allOwnKeys:!0}),f.extend(r,e,null,{allOwnKeys:!0}),r.create=function(s){return jn(ge(t,s))},r}const j=jn(je);j.Axios=pe;j.CanceledError=Ee;j.CancelToken=Kt;j.isCancel=Dn;j.VERSION=kn;j.toFormData=et;j.AxiosError=C;j.Cancel=j.CanceledError;j.all=function(e){return Promise.all(e)};j.spread=Ka;j.isAxiosError=Xa;j.mergeConfig=ge;j.AxiosHeaders=V;j.formToJSON=t=>Tn(f.isHTMLForm(t)?new FormData(t):t);j.getAdapter=Nn.getAdapter;j.HttpStatusCode=Bt;j.default=j;const Xt="https://g-api.billgang.com",Qa=async(t="get",e,r)=>{const n=localStorage.getItem("shopId")||void 0,s=`${Xt}/v2/builder/shops/${n}/${e}`,o=localStorage.getItem("accessToken")||void 0;if(t.toUpperCase()==="GET")return(await j.get(s,{headers:{Authorization:`Bearer ${o}`}})).data;t.toUpperCase()==="POST"&&await j.post(s,{...r},{headers:{Authorization:`Bearer ${o}`}}),t.toUpperCase()==="PUT"&&await j.put(s,{...r},{headers:{Authorization:`Bearer ${o}`}})},Za=async()=>{const t=localStorage.getItem("shopId")||void 0,e=`${Xt}/v1/dash/shops/${t}/images`,r=localStorage.getItem("accessToken")||void 0;return(await j.get(e,{headers:{Authorization:`Bearer ${r}`}})).data},ec=async t=>{const e=localStorage.getItem("shopId")||void 0,r=`${Xt}/v1/dash/shops/${e}/images`,n=localStorage.getItem("accessToken")||void 0;return(await j.post(r,t,{headers:{Authorization:`Bearer ${n}`,"Content-Type":"multipart/form-data"}})).data},An=D.createContext({dragDropManager:void 0});function G(t){return"Minified Redux error #"+t+"; visit https://redux.js.org/Errors?code="+t+" for the full message or use the non-minified dev environment for full errors. "}var zr=function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"}(),_t=function(){return Math.random().toString(36).substring(7).split("").join(".")},Wr={INIT:"@@redux/INIT"+_t(),REPLACE:"@@redux/REPLACE"+_t(),PROBE_UNKNOWN_ACTION:function(){return"@@redux/PROBE_UNKNOWN_ACTION"+_t()}};function tc(t){if(typeof t!="object"||t===null)return!1;for(var e=t;Object.getPrototypeOf(e)!==null;)e=Object.getPrototypeOf(e);return Object.getPrototypeOf(t)===e}function rc(t){if(t===void 0)return"undefined";if(t===null)return"null";var e=typeof t;switch(e){case"boolean":case"string":case"number":case"symbol":case"function":return e}if(Array.isArray(t))return"array";if(oc(t))return"date";if(sc(t))return"error";var r=nc(t);switch(r){case"Symbol":case"Promise":case"WeakMap":case"WeakSet":case"Map":case"Set":return r}return e.slice(8,-1).toLowerCase().replace(/\s/g,"")}function nc(t){return typeof t.constructor=="function"?t.constructor.name:null}function sc(t){return t instanceof Error||typeof t.message=="string"&&t.constructor&&typeof t.constructor.stackTraceLimit=="number"}function oc(t){return t instanceof Date?!0:typeof t.toDateString=="function"&&typeof t.getDate=="function"&&typeof t.setDate=="function"}function be(t){var e=typeof t;return process.env.NODE_ENV!=="production"&&(e=rc(t)),e}function Mn(t,e,r){var n;if(typeof e=="function"&&typeof r=="function"||typeof r=="function"&&typeof arguments[3]=="function")throw new Error(process.env.NODE_ENV==="production"?G(0):"It looks like you are passing several store enhancers to createStore(). This is not supported. Instead, compose them together to a single function. See https://redux.js.org/tutorials/fundamentals/part-4-store#creating-a-store-with-enhancers for an example.");if(typeof e=="function"&&typeof r>"u"&&(r=e,e=void 0),typeof r<"u"){if(typeof r!="function")throw new Error(process.env.NODE_ENV==="production"?G(1):"Expected the enhancer to be a function. Instead, received: '"+be(r)+"'");return r(Mn)(t,e)}if(typeof t!="function")throw new Error(process.env.NODE_ENV==="production"?G(2):"Expected the root reducer to be a function. Instead, received: '"+be(t)+"'");var s=t,o=e,i=[],a=i,d=!1;function l(){a===i&&(a=i.slice())}function u(){if(d)throw new Error(process.env.NODE_ENV==="production"?G(3):"You may not call store.getState() while the reducer is executing. The reducer has already received the state as an argument. Pass it down from the top reducer instead of reading it from the store.");return o}function h(p){if(typeof p!="function")throw new Error(process.env.NODE_ENV==="production"?G(4):"Expected the listener to be a function. Instead, received: '"+be(p)+"'");if(d)throw new Error(process.env.NODE_ENV==="production"?G(5):"You may not call store.subscribe() while the reducer is executing. If you would like to be notified after the store has been updated, subscribe from a component and invoke store.getState() in the callback to access the latest state. See https://redux.js.org/api/store#subscribelistener for more details.");var b=!0;return l(),a.push(p),function(){if(b){if(d)throw new Error(process.env.NODE_ENV==="production"?G(6):"You may not unsubscribe from a store listener while the reducer is executing. See https://redux.js.org/api/store#subscribelistener for more details.");b=!1,l();var w=a.indexOf(p);a.splice(w,1),i=null}}}function S(p){if(!tc(p))throw new Error(process.env.NODE_ENV==="production"?G(7):"Actions must be plain objects. Instead, the actual type was: '"+be(p)+"'. You may need to add middleware to your store setup to handle dispatching other values, such as 'redux-thunk' to handle dispatching functions. See https://redux.js.org/tutorials/fundamentals/part-4-store#middleware and https://redux.js.org/tutorials/fundamentals/part-6-async-logic#using-the-redux-thunk-middleware for examples.");if(typeof p.type>"u")throw new Error(process.env.NODE_ENV==="production"?G(8):'Actions may not have an undefined "type" property. You may have misspelled an action type string constant.');if(d)throw new Error(process.env.NODE_ENV==="production"?G(9):"Reducers may not dispatch actions.");try{d=!0,o=s(o,p)}finally{d=!1}for(var b=i=a,O=0;O<b.length;O++){var w=b[O];w()}return p}function y(p){if(typeof p!="function")throw new Error(process.env.NODE_ENV==="production"?G(10):"Expected the nextReducer to be a function. Instead, received: '"+be(p));s=p,S({type:Wr.REPLACE})}function g(){var p,b=h;return p={subscribe:function(w){if(typeof w!="object"||w===null)throw new Error(process.env.NODE_ENV==="production"?G(11):"Expected the observer to be an object. Instead, received: '"+be(w)+"'");function _(){w.next&&w.next(u())}_();var k=b(_);return{unsubscribe:k}}},p[zr]=function(){return this},p}return S({type:Wr.INIT}),n={dispatch:S,subscribe:h,getState:u,replaceReducer:y},n[zr]=g,n}function x(t,e,...r){if(ic()&&e===void 0)throw new Error("invariant requires an error message argument");if(!t){let n;if(e===void 0)n=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{let s=0;n=new Error(e.replace(/%s/g,function(){return r[s++]})),n.name="Invariant Violation"}throw n.framesToPop=1,n}}function ic(){return typeof process<"u"&&process.env.NODE_ENV==="production"}function ac(t,e,r){return e.split(".").reduce((n,s)=>n&&n[s]?n[s]:r||null,t)}function cc(t,e){return t.filter(r=>r!==e)}function Ln(t){return typeof t=="object"}function lc(t,e){const r=new Map,n=o=>{r.set(o,r.has(o)?r.get(o)+1:1)};t.forEach(n),e.forEach(n);const s=[];return r.forEach((o,i)=>{o===1&&s.push(i)}),s}function uc(t,e){return t.filter(r=>e.indexOf(r)>-1)}const Qt="dnd-core/INIT_COORDS",rt="dnd-core/BEGIN_DRAG",Zt="dnd-core/PUBLISH_DRAG_SOURCE",nt="dnd-core/HOVER",st="dnd-core/DROP",ot="dnd-core/END_DRAG";function Yr(t,e){return{type:Qt,payload:{sourceClientOffset:e||null,clientOffset:t||null}}}const dc={type:Qt,payload:{clientOffset:null,sourceClientOffset:null}};function fc(t){return function(r=[],n={publishSource:!0}){const{publishSource:s=!0,clientOffset:o,getSourceClientOffset:i}=n,a=t.getMonitor(),d=t.getRegistry();t.dispatch(Yr(o)),hc(r,a,d);const l=mc(r,a);if(l==null){t.dispatch(dc);return}let u=null;if(o){if(!i)throw new Error("getSourceClientOffset must be defined");pc(i),u=i(l)}t.dispatch(Yr(o,u));const S=d.getSource(l).beginDrag(a,l);if(S==null)return;gc(S),d.pinSource(l);const y=d.getSourceType(l);return{type:rt,payload:{itemType:y,item:S,sourceId:l,clientOffset:o||null,sourceClientOffset:u||null,isSourcePublic:!!s}}}}function hc(t,e,r){x(!e.isDragging(),"Cannot call beginDrag while dragging."),t.forEach(function(n){x(r.getSource(n),"Expected sourceIds to be registered.")})}function pc(t){x(typeof t=="function","When clientOffset is provided, getSourceClientOffset must be a function.")}function gc(t){x(Ln(t),"Item must be an object.")}function mc(t,e){let r=null;for(let n=t.length-1;n>=0;n--)if(e.canDragSource(t[n])){r=t[n];break}return r}function vc(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function yc(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{},n=Object.keys(r);typeof Object.getOwnPropertySymbols=="function"&&(n=n.concat(Object.getOwnPropertySymbols(r).filter(function(s){return Object.getOwnPropertyDescriptor(r,s).enumerable}))),n.forEach(function(s){vc(t,s,r[s])})}return t}function bc(t){return function(r={}){const n=t.getMonitor(),s=t.getRegistry();Sc(n),Oc(n).forEach((i,a)=>{const d=wc(i,a,s,n),l={type:st,payload:{dropResult:yc({},r,d)}};t.dispatch(l)})}}function Sc(t){x(t.isDragging(),"Cannot call drop while not dragging."),x(!t.didDrop(),"Cannot call drop twice during one drag operation.")}function wc(t,e,r,n){const s=r.getTarget(t);let o=s?s.drop(n,t):void 0;return Ec(o),typeof o>"u"&&(o=e===0?{}:n.getDropResult()),o}function Ec(t){x(typeof t>"u"||Ln(t),"Drop result must either be an object or undefined.")}function Oc(t){const e=t.getTargetIds().filter(t.canDropOnTarget,t);return e.reverse(),e}function _c(t){return function(){const r=t.getMonitor(),n=t.getRegistry();Tc(r);const s=r.getSourceId();return s!=null&&(n.getSource(s,!0).endDrag(r,s),n.unpinSource()),{type:ot}}}function Tc(t){x(t.isDragging(),"Cannot call endDrag while not dragging.")}function Ft(t,e){return e===null?t===null:Array.isArray(t)?t.some(r=>r===e):t===e}function Dc(t){return function(r,{clientOffset:n}={}){Cc(r);const s=r.slice(0),o=t.getMonitor(),i=t.getRegistry(),a=o.getItemType();return Pc(s,i,a),xc(s,o,i),Ic(s,o,i),{type:nt,payload:{targetIds:s,clientOffset:n||null}}}}function Cc(t){x(Array.isArray(t),"Expected targetIds to be an array.")}function xc(t,e,r){x(e.isDragging(),"Cannot call hover while not dragging."),x(!e.didDrop(),"Cannot call hover after drop.");for(let n=0;n<t.length;n++){const s=t[n];x(t.lastIndexOf(s)===n,"Expected targetIds to be unique in the passed array.");const o=r.getTarget(s);x(o,"Expected targetIds to be registered.")}}function Pc(t,e,r){for(let n=t.length-1;n>=0;n--){const s=t[n],o=e.getTargetType(s);Ft(o,r)||t.splice(n,1)}}function Ic(t,e,r){t.forEach(function(n){r.getTarget(n).hover(e,n)})}function Rc(t){return function(){if(t.getMonitor().isDragging())return{type:Zt}}}function Nc(t){return{beginDrag:fc(t),publishDragSource:Rc(t),hover:Dc(t),drop:bc(t),endDrag:_c(t)}}class kc{receiveBackend(e){this.backend=e}getMonitor(){return this.monitor}getBackend(){return this.backend}getRegistry(){return this.monitor.registry}getActions(){const e=this,{dispatch:r}=this.store;function n(o){return(...i)=>{const a=o.apply(e,i);typeof a<"u"&&r(a)}}const s=Nc(this);return Object.keys(s).reduce((o,i)=>{const a=s[i];return o[i]=n(a),o},{})}dispatch(e){this.store.dispatch(e)}constructor(e,r){this.isSetUp=!1,this.handleRefCountChange=()=>{const n=this.store.getState().refCount>0;this.backend&&(n&&!this.isSetUp?(this.backend.setup(),this.isSetUp=!0):!n&&this.isSetUp&&(this.backend.teardown(),this.isSetUp=!1))},this.store=e,this.monitor=r,e.subscribe(this.handleRefCountChange)}}function jc(t,e){return{x:t.x+e.x,y:t.y+e.y}}function qn(t,e){return{x:t.x-e.x,y:t.y-e.y}}function Ac(t){const{clientOffset:e,initialClientOffset:r,initialSourceClientOffset:n}=t;return!e||!r||!n?null:qn(jc(e,n),r)}function Mc(t){const{clientOffset:e,initialClientOffset:r}=t;return!e||!r?null:qn(e,r)}const Re=[],er=[];Re.__IS_NONE__=!0;er.__IS_ALL__=!0;function Lc(t,e){return t===Re?!1:t===er||typeof e>"u"?!0:uc(e,t).length>0}class qc{subscribeToStateChange(e,r={}){const{handlerIds:n}=r;x(typeof e=="function","listener must be a function."),x(typeof n>"u"||Array.isArray(n),"handlerIds, when specified, must be an array of strings.");let s=this.store.getState().stateId;const o=()=>{const i=this.store.getState(),a=i.stateId;try{a===s||a===s+1&&!Lc(i.dirtyHandlerIds,n)||e()}finally{s=a}};return this.store.subscribe(o)}subscribeToOffsetChange(e){x(typeof e=="function","listener must be a function.");let r=this.store.getState().dragOffset;const n=()=>{const s=this.store.getState().dragOffset;s!==r&&(r=s,e())};return this.store.subscribe(n)}canDragSource(e){if(!e)return!1;const r=this.registry.getSource(e);return x(r,`Expected to find a valid source. sourceId=${e}`),this.isDragging()?!1:r.canDrag(this,e)}canDropOnTarget(e){if(!e)return!1;const r=this.registry.getTarget(e);if(x(r,`Expected to find a valid target. targetId=${e}`),!this.isDragging()||this.didDrop())return!1;const n=this.registry.getTargetType(e),s=this.getItemType();return Ft(n,s)&&r.canDrop(this,e)}isDragging(){return!!this.getItemType()}isDraggingSource(e){if(!e)return!1;const r=this.registry.getSource(e,!0);if(x(r,`Expected to find a valid source. sourceId=${e}`),!this.isDragging()||!this.isSourcePublic())return!1;const n=this.registry.getSourceType(e),s=this.getItemType();return n!==s?!1:r.isDragging(this,e)}isOverTarget(e,r={shallow:!1}){if(!e)return!1;const{shallow:n}=r;if(!this.isDragging())return!1;const s=this.registry.getTargetType(e),o=this.getItemType();if(o&&!Ft(s,o))return!1;const i=this.getTargetIds();if(!i.length)return!1;const a=i.indexOf(e);return n?a===i.length-1:a>-1}getItemType(){return this.store.getState().dragOperation.itemType}getItem(){return this.store.getState().dragOperation.item}getSourceId(){return this.store.getState().dragOperation.sourceId}getTargetIds(){return this.store.getState().dragOperation.targetIds}getDropResult(){return this.store.getState().dragOperation.dropResult}didDrop(){return this.store.getState().dragOperation.didDrop}isSourcePublic(){return!!this.store.getState().dragOperation.isSourcePublic}getInitialClientOffset(){return this.store.getState().dragOffset.initialClientOffset}getInitialSourceClientOffset(){return this.store.getState().dragOffset.initialSourceClientOffset}getClientOffset(){return this.store.getState().dragOffset.clientOffset}getSourceClientOffset(){return Ac(this.store.getState().dragOffset)}getDifferenceFromInitialOffset(){return Mc(this.store.getState().dragOffset)}constructor(e,r){this.store=e,this.registry=r}}const Jr=typeof global<"u"?global:self,Bn=Jr.MutationObserver||Jr.WebKitMutationObserver;function Fn(t){return function(){const r=setTimeout(s,0),n=setInterval(s,50);function s(){clearTimeout(r),clearInterval(n),t()}}}function Bc(t){let e=1;const r=new Bn(t),n=document.createTextNode("");return r.observe(n,{characterData:!0}),function(){e=-e,n.data=e}}const Fc=typeof Bn=="function"?Bc:Fn;class Uc{enqueueTask(e){const{queue:r,requestFlush:n}=this;r.length||(n(),this.flushing=!0),r[r.length]=e}constructor(){this.queue=[],this.pendingErrors=[],this.flushing=!1,this.index=0,this.capacity=1024,this.flush=()=>{const{queue:e}=this;for(;this.index<e.length;){const r=this.index;if(this.index++,e[r].call(),this.index>this.capacity){for(let n=0,s=e.length-this.index;n<s;n++)e[n]=e[n+this.index];e.length-=this.index,this.index=0}}e.length=0,this.index=0,this.flushing=!1},this.registerPendingError=e=>{this.pendingErrors.push(e),this.requestErrorThrow()},this.requestFlush=Fc(this.flush),this.requestErrorThrow=Fn(()=>{if(this.pendingErrors.length)throw this.pendingErrors.shift()})}}class Hc{call(){try{this.task&&this.task()}catch(e){this.onError(e)}finally{this.task=null,this.release(this)}}constructor(e,r){this.onError=e,this.release=r,this.task=null}}class $c{create(e){const r=this.freeTasks,n=r.length?r.pop():new Hc(this.onError,s=>r[r.length]=s);return n.task=e,n}constructor(e){this.onError=e,this.freeTasks=[]}}const Un=new Uc,Vc=new $c(Un.registerPendingError);function zc(t){Un.enqueueTask(Vc.create(t))}const tr="dnd-core/ADD_SOURCE",rr="dnd-core/ADD_TARGET",nr="dnd-core/REMOVE_SOURCE",it="dnd-core/REMOVE_TARGET";function Wc(t){return{type:tr,payload:{sourceId:t}}}function Yc(t){return{type:rr,payload:{targetId:t}}}function Jc(t){return{type:nr,payload:{sourceId:t}}}function Gc(t){return{type:it,payload:{targetId:t}}}function Kc(t){x(typeof t.canDrag=="function","Expected canDrag to be a function."),x(typeof t.beginDrag=="function","Expected beginDrag to be a function."),x(typeof t.endDrag=="function","Expected endDrag to be a function.")}function Xc(t){x(typeof t.canDrop=="function","Expected canDrop to be a function."),x(typeof t.hover=="function","Expected hover to be a function."),x(typeof t.drop=="function","Expected beginDrag to be a function.")}function Ut(t,e){if(e&&Array.isArray(t)){t.forEach(r=>Ut(r,!1));return}x(typeof t=="string"||typeof t=="symbol",e?"Type can only be a string, a symbol, or an array of either.":"Type can only be a string or a symbol.")}var K;(function(t){t.SOURCE="SOURCE",t.TARGET="TARGET"})(K||(K={}));let Qc=0;function Zc(){return Qc++}function el(t){const e=Zc().toString();switch(t){case K.SOURCE:return`S${e}`;case K.TARGET:return`T${e}`;default:throw new Error(`Unknown Handler Role: ${t}`)}}function Gr(t){switch(t[0]){case"S":return K.SOURCE;case"T":return K.TARGET;default:throw new Error(`Cannot parse handler ID: ${t}`)}}function Kr(t,e){const r=t.entries();let n=!1;do{const{done:s,value:[,o]}=r.next();if(o===e)return!0;n=!!s}while(!n);return!1}class tl{addSource(e,r){Ut(e),Kc(r);const n=this.addHandler(K.SOURCE,e,r);return this.store.dispatch(Wc(n)),n}addTarget(e,r){Ut(e,!0),Xc(r);const n=this.addHandler(K.TARGET,e,r);return this.store.dispatch(Yc(n)),n}containsHandler(e){return Kr(this.dragSources,e)||Kr(this.dropTargets,e)}getSource(e,r=!1){return x(this.isSourceId(e),"Expected a valid source ID."),r&&e===this.pinnedSourceId?this.pinnedSource:this.dragSources.get(e)}getTarget(e){return x(this.isTargetId(e),"Expected a valid target ID."),this.dropTargets.get(e)}getSourceType(e){return x(this.isSourceId(e),"Expected a valid source ID."),this.types.get(e)}getTargetType(e){return x(this.isTargetId(e),"Expected a valid target ID."),this.types.get(e)}isSourceId(e){return Gr(e)===K.SOURCE}isTargetId(e){return Gr(e)===K.TARGET}removeSource(e){x(this.getSource(e),"Expected an existing source."),this.store.dispatch(Jc(e)),zc(()=>{this.dragSources.delete(e),this.types.delete(e)})}removeTarget(e){x(this.getTarget(e),"Expected an existing target."),this.store.dispatch(Gc(e)),this.dropTargets.delete(e),this.types.delete(e)}pinSource(e){const r=this.getSource(e);x(r,"Expected an existing source."),this.pinnedSourceId=e,this.pinnedSource=r}unpinSource(){x(this.pinnedSource,"No source is pinned at the time."),this.pinnedSourceId=null,this.pinnedSource=null}addHandler(e,r,n){const s=el(e);return this.types.set(s,r),e===K.SOURCE?this.dragSources.set(s,n):e===K.TARGET&&this.dropTargets.set(s,n),s}constructor(e){this.types=new Map,this.dragSources=new Map,this.dropTargets=new Map,this.pinnedSourceId=null,this.pinnedSource=null,this.store=e}}const rl=(t,e)=>t===e;function nl(t,e){return!t&&!e?!0:!t||!e?!1:t.x===e.x&&t.y===e.y}function sl(t,e,r=rl){if(t.length!==e.length)return!1;for(let n=0;n<t.length;++n)if(!r(t[n],e[n]))return!1;return!0}function ol(t=Re,e){switch(e.type){case nt:break;case tr:case rr:case it:case nr:return Re;case rt:case Zt:case ot:case st:default:return er}const{targetIds:r=[],prevTargetIds:n=[]}=e.payload,s=lc(r,n);if(!(s.length>0||!sl(r,n)))return Re;const i=n[n.length-1],a=r[r.length-1];return i!==a&&(i&&s.push(i),a&&s.push(a)),s}function il(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function al(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{},n=Object.keys(r);typeof Object.getOwnPropertySymbols=="function"&&(n=n.concat(Object.getOwnPropertySymbols(r).filter(function(s){return Object.getOwnPropertyDescriptor(r,s).enumerable}))),n.forEach(function(s){il(t,s,r[s])})}return t}const Xr={initialSourceClientOffset:null,initialClientOffset:null,clientOffset:null};function cl(t=Xr,e){const{payload:r}=e;switch(e.type){case Qt:case rt:return{initialSourceClientOffset:r.sourceClientOffset,initialClientOffset:r.clientOffset,clientOffset:r.clientOffset};case nt:return nl(t.clientOffset,r.clientOffset)?t:al({},t,{clientOffset:r.clientOffset});case ot:case st:return Xr;default:return t}}function ll(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function Se(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{},n=Object.keys(r);typeof Object.getOwnPropertySymbols=="function"&&(n=n.concat(Object.getOwnPropertySymbols(r).filter(function(s){return Object.getOwnPropertyDescriptor(r,s).enumerable}))),n.forEach(function(s){ll(t,s,r[s])})}return t}const ul={itemType:null,item:null,sourceId:null,targetIds:[],dropResult:null,didDrop:!1,isSourcePublic:null};function dl(t=ul,e){const{payload:r}=e;switch(e.type){case rt:return Se({},t,{itemType:r.itemType,item:r.item,sourceId:r.sourceId,isSourcePublic:r.isSourcePublic,dropResult:null,didDrop:!1});case Zt:return Se({},t,{isSourcePublic:!0});case nt:return Se({},t,{targetIds:r.targetIds});case it:return t.targetIds.indexOf(r.targetId)===-1?t:Se({},t,{targetIds:cc(t.targetIds,r.targetId)});case st:return Se({},t,{dropResult:r.dropResult,didDrop:!0,targetIds:[]});case ot:return Se({},t,{itemType:null,item:null,sourceId:null,dropResult:null,didDrop:!1,isSourcePublic:null,targetIds:[]});default:return t}}function fl(t=0,e){switch(e.type){case tr:case rr:return t+1;case nr:case it:return t-1;default:return t}}function hl(t=0){return t+1}function pl(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function gl(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{},n=Object.keys(r);typeof Object.getOwnPropertySymbols=="function"&&(n=n.concat(Object.getOwnPropertySymbols(r).filter(function(s){return Object.getOwnPropertyDescriptor(r,s).enumerable}))),n.forEach(function(s){pl(t,s,r[s])})}return t}function ml(t={},e){return{dirtyHandlerIds:ol(t.dirtyHandlerIds,{type:e.type,payload:gl({},e.payload,{prevTargetIds:ac(t,"dragOperation.targetIds",[])})}),dragOffset:cl(t.dragOffset,e),refCount:fl(t.refCount,e),dragOperation:dl(t.dragOperation,e),stateId:hl(t.stateId)}}function vl(t,e=void 0,r={},n=!1){const s=yl(n),o=new qc(s,new tl(s)),i=new kc(s,o),a=t(i,e,r);return i.receiveBackend(a),i}function yl(t){const e=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION__;return Mn(ml,t&&e&&e({name:"dnd-core",instanceId:"dnd-core"}))}function bl(t,e){if(t==null)return{};var r=Sl(t,e),n,s;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);for(s=0;s<o.length;s++)n=o[s],!(e.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(t,n)&&(r[n]=t[n])}return r}function Sl(t,e){if(t==null)return{};var r={},n=Object.keys(t),s,o;for(o=0;o<n.length;o++)s=n[o],!(e.indexOf(s)>=0)&&(r[s]=t[s]);return r}let Qr=0;const We=Symbol.for("__REACT_DND_CONTEXT_INSTANCE__");var wl=D.memo(function(e){var{children:r}=e,n=bl(e,["children"]);const[s,o]=El(n);return D.useEffect(()=>{if(o){const i=Hn();return++Qr,()=>{--Qr===0&&(i[We]=null)}}},[]),m.jsx(An.Provider,{value:s,children:r})});function El(t){if("manager"in t)return[{dragDropManager:t.manager},!1];const e=Ol(t.backend,t.context,t.options,t.debugMode),r=!t.context;return[e,r]}function Ol(t,e=Hn(),r,n){const s=e;return s[We]||(s[We]={dragDropManager:vl(t,e,r,n)}),s[We]}function Hn(){return typeof global<"u"?global:window}var _l=function t(e,r){if(e===r)return!0;if(e&&r&&typeof e=="object"&&typeof r=="object"){if(e.constructor!==r.constructor)return!1;var n,s,o;if(Array.isArray(e)){if(n=e.length,n!=r.length)return!1;for(s=n;s--!==0;)if(!t(e[s],r[s]))return!1;return!0}if(e.constructor===RegExp)return e.source===r.source&&e.flags===r.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===r.valueOf();if(e.toString!==Object.prototype.toString)return e.toString()===r.toString();if(o=Object.keys(e),n=o.length,n!==Object.keys(r).length)return!1;for(s=n;s--!==0;)if(!Object.prototype.hasOwnProperty.call(r,o[s]))return!1;for(s=n;s--!==0;){var i=o[s];if(!t(e[i],r[i]))return!1}return!0}return e!==e&&r!==r};const Tl=sn(_l),me=typeof window<"u"?D.useLayoutEffect:D.useEffect;function Dl(t,e,r){const[n,s]=D.useState(()=>e(t)),o=D.useCallback(()=>{const i=e(t);Tl(n,i)||(s(i),r&&r())},[n,t,r]);return me(o),[n,o]}function Cl(t,e,r){const[n,s]=Dl(t,e,r);return me(function(){const i=t.getHandlerId();if(i!=null)return t.subscribeToStateChange(s,{handlerIds:[i]})},[t,s]),n}function $n(t,e,r){return Cl(e,t||(()=>({})),()=>r.reconnect())}function Vn(t,e){const r=[];return typeof t!="function"&&r.push(t),D.useMemo(()=>typeof t=="function"?t():t,r)}function xl(t){return D.useMemo(()=>t.hooks.dragSource(),[t])}function Pl(t){return D.useMemo(()=>t.hooks.dragPreview(),[t])}let Tt=!1,Dt=!1;class Il{receiveHandlerId(e){this.sourceId=e}getHandlerId(){return this.sourceId}canDrag(){x(!Tt,"You may not call monitor.canDrag() inside your canDrag() implementation. Read more: http://react-dnd.github.io/react-dnd/docs/api/drag-source-monitor");try{return Tt=!0,this.internalMonitor.canDragSource(this.sourceId)}finally{Tt=!1}}isDragging(){if(!this.sourceId)return!1;x(!Dt,"You may not call monitor.isDragging() inside your isDragging() implementation. Read more: http://react-dnd.github.io/react-dnd/docs/api/drag-source-monitor");try{return Dt=!0,this.internalMonitor.isDraggingSource(this.sourceId)}finally{Dt=!1}}subscribeToStateChange(e,r){return this.internalMonitor.subscribeToStateChange(e,r)}isDraggingSource(e){return this.internalMonitor.isDraggingSource(e)}isOverTarget(e,r){return this.internalMonitor.isOverTarget(e,r)}getTargetIds(){return this.internalMonitor.getTargetIds()}isSourcePublic(){return this.internalMonitor.isSourcePublic()}getSourceId(){return this.internalMonitor.getSourceId()}subscribeToOffsetChange(e){return this.internalMonitor.subscribeToOffsetChange(e)}canDragSource(e){return this.internalMonitor.canDragSource(e)}canDropOnTarget(e){return this.internalMonitor.canDropOnTarget(e)}getItemType(){return this.internalMonitor.getItemType()}getItem(){return this.internalMonitor.getItem()}getDropResult(){return this.internalMonitor.getDropResult()}didDrop(){return this.internalMonitor.didDrop()}getInitialClientOffset(){return this.internalMonitor.getInitialClientOffset()}getInitialSourceClientOffset(){return this.internalMonitor.getInitialSourceClientOffset()}getSourceClientOffset(){return this.internalMonitor.getSourceClientOffset()}getClientOffset(){return this.internalMonitor.getClientOffset()}getDifferenceFromInitialOffset(){return this.internalMonitor.getDifferenceFromInitialOffset()}constructor(e){this.sourceId=null,this.internalMonitor=e.getMonitor()}}let Ct=!1;class Rl{receiveHandlerId(e){this.targetId=e}getHandlerId(){return this.targetId}subscribeToStateChange(e,r){return this.internalMonitor.subscribeToStateChange(e,r)}canDrop(){if(!this.targetId)return!1;x(!Ct,"You may not call monitor.canDrop() inside your canDrop() implementation. Read more: http://react-dnd.github.io/react-dnd/docs/api/drop-target-monitor");try{return Ct=!0,this.internalMonitor.canDropOnTarget(this.targetId)}finally{Ct=!1}}isOver(e){return this.targetId?this.internalMonitor.isOverTarget(this.targetId,e):!1}getItemType(){return this.internalMonitor.getItemType()}getItem(){return this.internalMonitor.getItem()}getDropResult(){return this.internalMonitor.getDropResult()}didDrop(){return this.internalMonitor.didDrop()}getInitialClientOffset(){return this.internalMonitor.getInitialClientOffset()}getInitialSourceClientOffset(){return this.internalMonitor.getInitialSourceClientOffset()}getSourceClientOffset(){return this.internalMonitor.getSourceClientOffset()}getClientOffset(){return this.internalMonitor.getClientOffset()}getDifferenceFromInitialOffset(){return this.internalMonitor.getDifferenceFromInitialOffset()}constructor(e){this.targetId=null,this.internalMonitor=e.getMonitor()}}function Nl(t,e,r){const n=r.getRegistry(),s=n.addTarget(t,e);return[s,()=>n.removeTarget(s)]}function kl(t,e,r){const n=r.getRegistry(),s=n.addSource(t,e);return[s,()=>n.removeSource(s)]}function Ht(t,e,r,n){let s;if(s!==void 0)return!!s;if(t===e)return!0;if(typeof t!="object"||!t||typeof e!="object"||!e)return!1;const o=Object.keys(t),i=Object.keys(e);if(o.length!==i.length)return!1;const a=Object.prototype.hasOwnProperty.bind(e);for(let d=0;d<o.length;d++){const l=o[d];if(!a(l))return!1;const u=t[l],h=e[l];if(s=void 0,s===!1||s===void 0&&u!==h)return!1}return!0}function $t(t){return t!==null&&typeof t=="object"&&Object.prototype.hasOwnProperty.call(t,"current")}function jl(t){if(typeof t.type=="string")return;const e=t.type.displayName||t.type.name||"the component";throw new Error(`Only native element nodes can now be passed to React DnD connectors.You can either wrap ${e} into a <div>, or turn it into a drag source or a drop target itself.`)}function Al(t){return(e=null,r=null)=>{if(!D.isValidElement(e)){const o=e;return t(o,r),o}const n=e;return jl(n),Ml(n,r?o=>t(o,r):t)}}function zn(t){const e={};return Object.keys(t).forEach(r=>{const n=t[r];if(r.endsWith("Ref"))e[r]=t[r];else{const s=Al(n);e[r]=()=>s}}),e}function Zr(t,e){typeof t=="function"?t(e):t.current=e}function Ml(t,e){const r=t.ref;return x(typeof r!="string","Cannot connect React DnD to an element with an existing string ref. Please convert it to use a callback ref instead, or wrap it into a <span> or <div>. Read more: https://reactjs.org/docs/refs-and-the-dom.html#callback-refs"),r?D.cloneElement(t,{ref:n=>{Zr(r,n),Zr(e,n)}}):D.cloneElement(t,{ref:e})}class Ll{receiveHandlerId(e){this.handlerId!==e&&(this.handlerId=e,this.reconnect())}get connectTarget(){return this.dragSource}get dragSourceOptions(){return this.dragSourceOptionsInternal}set dragSourceOptions(e){this.dragSourceOptionsInternal=e}get dragPreviewOptions(){return this.dragPreviewOptionsInternal}set dragPreviewOptions(e){this.dragPreviewOptionsInternal=e}reconnect(){const e=this.reconnectDragSource();this.reconnectDragPreview(e)}reconnectDragSource(){const e=this.dragSource,r=this.didHandlerIdChange()||this.didConnectedDragSourceChange()||this.didDragSourceOptionsChange();return r&&this.disconnectDragSource(),this.handlerId?e?(r&&(this.lastConnectedHandlerId=this.handlerId,this.lastConnectedDragSource=e,this.lastConnectedDragSourceOptions=this.dragSourceOptions,this.dragSourceUnsubscribe=this.backend.connectDragSource(this.handlerId,e,this.dragSourceOptions)),r):(this.lastConnectedDragSource=e,r):r}reconnectDragPreview(e=!1){const r=this.dragPreview,n=e||this.didHandlerIdChange()||this.didConnectedDragPreviewChange()||this.didDragPreviewOptionsChange();if(n&&this.disconnectDragPreview(),!!this.handlerId){if(!r){this.lastConnectedDragPreview=r;return}n&&(this.lastConnectedHandlerId=this.handlerId,this.lastConnectedDragPreview=r,this.lastConnectedDragPreviewOptions=this.dragPreviewOptions,this.dragPreviewUnsubscribe=this.backend.connectDragPreview(this.handlerId,r,this.dragPreviewOptions))}}didHandlerIdChange(){return this.lastConnectedHandlerId!==this.handlerId}didConnectedDragSourceChange(){return this.lastConnectedDragSource!==this.dragSource}didConnectedDragPreviewChange(){return this.lastConnectedDragPreview!==this.dragPreview}didDragSourceOptionsChange(){return!Ht(this.lastConnectedDragSourceOptions,this.dragSourceOptions)}didDragPreviewOptionsChange(){return!Ht(this.lastConnectedDragPreviewOptions,this.dragPreviewOptions)}disconnectDragSource(){this.dragSourceUnsubscribe&&(this.dragSourceUnsubscribe(),this.dragSourceUnsubscribe=void 0)}disconnectDragPreview(){this.dragPreviewUnsubscribe&&(this.dragPreviewUnsubscribe(),this.dragPreviewUnsubscribe=void 0,this.dragPreviewNode=null,this.dragPreviewRef=null)}get dragSource(){return this.dragSourceNode||this.dragSourceRef&&this.dragSourceRef.current}get dragPreview(){return this.dragPreviewNode||this.dragPreviewRef&&this.dragPreviewRef.current}clearDragSource(){this.dragSourceNode=null,this.dragSourceRef=null}clearDragPreview(){this.dragPreviewNode=null,this.dragPreviewRef=null}constructor(e){this.hooks=zn({dragSource:(r,n)=>{this.clearDragSource(),this.dragSourceOptions=n||null,$t(r)?this.dragSourceRef=r:this.dragSourceNode=r,this.reconnectDragSource()},dragPreview:(r,n)=>{this.clearDragPreview(),this.dragPreviewOptions=n||null,$t(r)?this.dragPreviewRef=r:this.dragPreviewNode=r,this.reconnectDragPreview()}}),this.handlerId=null,this.dragSourceRef=null,this.dragSourceOptionsInternal=null,this.dragPreviewRef=null,this.dragPreviewOptionsInternal=null,this.lastConnectedHandlerId=null,this.lastConnectedDragSource=null,this.lastConnectedDragSourceOptions=null,this.lastConnectedDragPreview=null,this.lastConnectedDragPreviewOptions=null,this.backend=e}}class ql{get connectTarget(){return this.dropTarget}reconnect(){const e=this.didHandlerIdChange()||this.didDropTargetChange()||this.didOptionsChange();e&&this.disconnectDropTarget();const r=this.dropTarget;if(this.handlerId){if(!r){this.lastConnectedDropTarget=r;return}e&&(this.lastConnectedHandlerId=this.handlerId,this.lastConnectedDropTarget=r,this.lastConnectedDropTargetOptions=this.dropTargetOptions,this.unsubscribeDropTarget=this.backend.connectDropTarget(this.handlerId,r,this.dropTargetOptions))}}receiveHandlerId(e){e!==this.handlerId&&(this.handlerId=e,this.reconnect())}get dropTargetOptions(){return this.dropTargetOptionsInternal}set dropTargetOptions(e){this.dropTargetOptionsInternal=e}didHandlerIdChange(){return this.lastConnectedHandlerId!==this.handlerId}didDropTargetChange(){return this.lastConnectedDropTarget!==this.dropTarget}didOptionsChange(){return!Ht(this.lastConnectedDropTargetOptions,this.dropTargetOptions)}disconnectDropTarget(){this.unsubscribeDropTarget&&(this.unsubscribeDropTarget(),this.unsubscribeDropTarget=void 0)}get dropTarget(){return this.dropTargetNode||this.dropTargetRef&&this.dropTargetRef.current}clearDropTarget(){this.dropTargetRef=null,this.dropTargetNode=null}constructor(e){this.hooks=zn({dropTarget:(r,n)=>{this.clearDropTarget(),this.dropTargetOptions=n,$t(r)?this.dropTargetRef=r:this.dropTargetNode=r,this.reconnect()}}),this.handlerId=null,this.dropTargetRef=null,this.dropTargetOptionsInternal=null,this.lastConnectedHandlerId=null,this.lastConnectedDropTarget=null,this.lastConnectedDropTargetOptions=null,this.backend=e}}function Oe(){const{dragDropManager:t}=D.useContext(An);return x(t!=null,"Expected drag drop context"),t}function Bl(t,e){const r=Oe(),n=D.useMemo(()=>new Ll(r.getBackend()),[r]);return me(()=>(n.dragSourceOptions=t||null,n.reconnect(),()=>n.disconnectDragSource()),[n,t]),me(()=>(n.dragPreviewOptions=e||null,n.reconnect(),()=>n.disconnectDragPreview()),[n,e]),n}function Fl(){const t=Oe();return D.useMemo(()=>new Il(t),[t])}class Ul{beginDrag(){const e=this.spec,r=this.monitor;let n=null;return typeof e.item=="object"?n=e.item:typeof e.item=="function"?n=e.item(r):n={},n??null}canDrag(){const e=this.spec,r=this.monitor;return typeof e.canDrag=="boolean"?e.canDrag:typeof e.canDrag=="function"?e.canDrag(r):!0}isDragging(e,r){const n=this.spec,s=this.monitor,{isDragging:o}=n;return o?o(s):r===e.getSourceId()}endDrag(){const e=this.spec,r=this.monitor,n=this.connector,{end:s}=e;s&&s(r.getItem(),r),n.reconnect()}constructor(e,r,n){this.spec=e,this.monitor=r,this.connector=n}}function Hl(t,e,r){const n=D.useMemo(()=>new Ul(t,e,r),[e,r]);return D.useEffect(()=>{n.spec=t},[t]),n}function $l(t){return D.useMemo(()=>{const e=t.type;return x(e!=null,"spec.type must be defined"),e},[t])}function Vl(t,e,r){const n=Oe(),s=Hl(t,e,r),o=$l(t);me(function(){if(o!=null){const[a,d]=kl(o,s,n);return e.receiveHandlerId(a),r.receiveHandlerId(a),d}},[n,e,r,s,o])}function zl(t,e){const r=Vn(t);x(!r.begin,"useDrag::spec.begin was deprecated in v14. Replace spec.begin() with spec.item(). (see more here - https://react-dnd.github.io/react-dnd/docs/api/use-drag)");const n=Fl(),s=Bl(r.options,r.previewOptions);return Vl(r,n,s),[$n(r.collect,n,s),xl(s),Pl(s)]}function Wl(t){return D.useMemo(()=>t.hooks.dropTarget(),[t])}function Yl(t){const e=Oe(),r=D.useMemo(()=>new ql(e.getBackend()),[e]);return me(()=>(r.dropTargetOptions=t||null,r.reconnect(),()=>r.disconnectDropTarget()),[t]),r}function Jl(){const t=Oe();return D.useMemo(()=>new Rl(t),[t])}function Gl(t){const{accept:e}=t;return D.useMemo(()=>(x(t.accept!=null,"accept must be defined"),Array.isArray(e)?e:[e]),[e])}class Kl{canDrop(){const e=this.spec,r=this.monitor;return e.canDrop?e.canDrop(r.getItem(),r):!0}hover(){const e=this.spec,r=this.monitor;e.hover&&e.hover(r.getItem(),r)}drop(){const e=this.spec,r=this.monitor;if(e.drop)return e.drop(r.getItem(),r)}constructor(e,r){this.spec=e,this.monitor=r}}function Xl(t,e){const r=D.useMemo(()=>new Kl(t,e),[e]);return D.useEffect(()=>{r.spec=t},[t]),r}function Ql(t,e,r){const n=Oe(),s=Xl(t,e),o=Gl(t);me(function(){const[a,d]=Nl(o,s,n);return e.receiveHandlerId(a),r.receiveHandlerId(a),d},[n,e,s,r,o.map(i=>i.toString()).join("|")])}function Zl(t,e){const r=Vn(t),n=Jl(),s=Yl(r.options);return Ql(r,n,s),[$n(r.collect,n,s),Wl(s)]}function Wn(t){let e=null;return()=>(e==null&&(e=t()),e)}function eu(t,e){return t.filter(r=>r!==e)}function tu(t,e){const r=new Set,n=o=>r.add(o);t.forEach(n),e.forEach(n);const s=[];return r.forEach(o=>s.push(o)),s}class ru{enter(e){const r=this.entered.length,n=s=>this.isNodeInDocument(s)&&(!s.contains||s.contains(e));return this.entered=tu(this.entered.filter(n),[e]),r===0&&this.entered.length>0}leave(e){const r=this.entered.length;return this.entered=eu(this.entered.filter(this.isNodeInDocument),e),r>0&&this.entered.length===0}reset(){this.entered=[]}constructor(e){this.entered=[],this.isNodeInDocument=e}}class nu{initializeExposedProperties(){Object.keys(this.config.exposeProperties).forEach(e=>{Object.defineProperty(this.item,e,{configurable:!0,enumerable:!0,get(){return console.warn(`Browser doesn't allow reading "${e}" until the drop event.`),null}})})}loadDataTransfer(e){if(e){const r={};Object.keys(this.config.exposeProperties).forEach(n=>{const s=this.config.exposeProperties[n];s!=null&&(r[n]={value:s(e,this.config.matchesTypes),configurable:!0,enumerable:!0})}),Object.defineProperties(this.item,r)}}canDrag(){return!0}beginDrag(){return this.item}isDragging(e,r){return r===e.getSourceId()}endDrag(){}constructor(e){this.config=e,this.item={},this.initializeExposedProperties()}}const Yn="__NATIVE_FILE__",Jn="__NATIVE_URL__",Gn="__NATIVE_TEXT__",Kn="__NATIVE_HTML__",en=Object.freeze(Object.defineProperty({__proto__:null,FILE:Yn,HTML:Kn,TEXT:Gn,URL:Jn},Symbol.toStringTag,{value:"Module"}));function xt(t,e,r){const n=e.reduce((s,o)=>s||t.getData(o),"");return n??r}const Vt={[Yn]:{exposeProperties:{files:t=>Array.prototype.slice.call(t.files),items:t=>t.items,dataTransfer:t=>t},matchesTypes:["Files"]},[Kn]:{exposeProperties:{html:(t,e)=>xt(t,e,""),dataTransfer:t=>t},matchesTypes:["Html","text/html"]},[Jn]:{exposeProperties:{urls:(t,e)=>xt(t,e,"").split(`
40
+ `),dataTransfer:t=>t},matchesTypes:["Url","text/uri-list"]},[Gn]:{exposeProperties:{text:(t,e)=>xt(t,e,""),dataTransfer:t=>t},matchesTypes:["Text","text/plain"]}};function su(t,e){const r=Vt[t];if(!r)throw new Error(`native type ${t} has no configuration`);const n=new nu(r);return n.loadDataTransfer(e),n}function Pt(t){if(!t)return null;const e=Array.prototype.slice.call(t.types||[]);return Object.keys(Vt).filter(r=>{const n=Vt[r];return n!=null&&n.matchesTypes?n.matchesTypes.some(s=>e.indexOf(s)>-1):!1})[0]||null}const ou=Wn(()=>/firefox/i.test(navigator.userAgent)),Xn=Wn(()=>!!window.safari);class tn{interpolate(e){const{xs:r,ys:n,c1s:s,c2s:o,c3s:i}=this;let a=r.length-1;if(e===r[a])return n[a];let d=0,l=i.length-1,u;for(;d<=l;){u=Math.floor(.5*(d+l));const y=r[u];if(y<e)d=u+1;else if(y>e)l=u-1;else return n[u]}a=Math.max(0,l);const h=e-r[a],S=h*h;return n[a]+s[a]*h+o[a]*S+i[a]*h*S}constructor(e,r){const{length:n}=e,s=[];for(let y=0;y<n;y++)s.push(y);s.sort((y,g)=>e[y]<e[g]?-1:1);const o=[],i=[];let a,d;for(let y=0;y<n-1;y++)a=e[y+1]-e[y],d=r[y+1]-r[y],o.push(a),i.push(d/a);const l=[i[0]];for(let y=0;y<o.length-1;y++){const g=i[y],p=i[y+1];if(g*p<=0)l.push(0);else{a=o[y];const b=o[y+1],O=a+b;l.push(3*O/((O+b)/g+(O+a)/p))}}l.push(i[i.length-1]);const u=[],h=[];let S;for(let y=0;y<l.length-1;y++){S=i[y];const g=l[y],p=1/o[y],b=g+l[y+1]-S-S;u.push((S-g-b)*p),h.push(b*p*p)}this.xs=e,this.ys=r,this.c1s=l,this.c2s=u,this.c3s=h}}const iu=1;function Qn(t){const e=t.nodeType===iu?t:t.parentElement;if(!e)return null;const{top:r,left:n}=e.getBoundingClientRect();return{x:n,y:r}}function $e(t){return{x:t.clientX,y:t.clientY}}function au(t){var e;return t.nodeName==="IMG"&&(ou()||!(!((e=document.documentElement)===null||e===void 0)&&e.contains(t)))}function cu(t,e,r,n){let s=t?e.width:r,o=t?e.height:n;return Xn()&&t&&(o/=window.devicePixelRatio,s/=window.devicePixelRatio),{dragPreviewWidth:s,dragPreviewHeight:o}}function lu(t,e,r,n,s){const o=au(e),a=Qn(o?t:e),d={x:r.x-a.x,y:r.y-a.y},{offsetWidth:l,offsetHeight:u}=t,{anchorX:h,anchorY:S}=n,{dragPreviewWidth:y,dragPreviewHeight:g}=cu(o,e,l,u),p=()=>{let B=new tn([0,.5,1],[d.y,d.y/u*g,d.y+g-u]).interpolate(S);return Xn()&&o&&(B+=(window.devicePixelRatio-1)*g),B},b=()=>new tn([0,.5,1],[d.x,d.x/l*y,d.x+y-l]).interpolate(h),{offsetX:O,offsetY:w}=s,_=O===0||O,k=w===0||w;return{x:_?O:b(),y:k?w:p()}}class uu{get window(){if(this.globalContext)return this.globalContext;if(typeof window<"u")return window}get document(){var e;return!((e=this.globalContext)===null||e===void 0)&&e.document?this.globalContext.document:this.window?this.window.document:void 0}get rootElement(){var e;return((e=this.optionsArgs)===null||e===void 0?void 0:e.rootElement)||this.window}constructor(e,r){this.ownerDocument=null,this.globalContext=e,this.optionsArgs=r}}function du(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function rn(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{},n=Object.keys(r);typeof Object.getOwnPropertySymbols=="function"&&(n=n.concat(Object.getOwnPropertySymbols(r).filter(function(s){return Object.getOwnPropertyDescriptor(r,s).enumerable}))),n.forEach(function(s){du(t,s,r[s])})}return t}class fu{profile(){var e,r;return{sourcePreviewNodes:this.sourcePreviewNodes.size,sourcePreviewNodeOptions:this.sourcePreviewNodeOptions.size,sourceNodeOptions:this.sourceNodeOptions.size,sourceNodes:this.sourceNodes.size,dragStartSourceIds:((e=this.dragStartSourceIds)===null||e===void 0?void 0:e.length)||0,dropTargetIds:this.dropTargetIds.length,dragEnterTargetIds:this.dragEnterTargetIds.length,dragOverTargetIds:((r=this.dragOverTargetIds)===null||r===void 0?void 0:r.length)||0}}get window(){return this.options.window}get document(){return this.options.document}get rootElement(){return this.options.rootElement}setup(){const e=this.rootElement;if(e!==void 0){if(e.__isReactDndBackendSetUp)throw new Error("Cannot have two HTML5 backends at the same time.");e.__isReactDndBackendSetUp=!0,this.addEventListeners(e)}}teardown(){const e=this.rootElement;if(e!==void 0&&(e.__isReactDndBackendSetUp=!1,this.removeEventListeners(this.rootElement),this.clearCurrentDragSourceNode(),this.asyncEndDragFrameId)){var r;(r=this.window)===null||r===void 0||r.cancelAnimationFrame(this.asyncEndDragFrameId)}}connectDragPreview(e,r,n){return this.sourcePreviewNodeOptions.set(e,n),this.sourcePreviewNodes.set(e,r),()=>{this.sourcePreviewNodes.delete(e),this.sourcePreviewNodeOptions.delete(e)}}connectDragSource(e,r,n){this.sourceNodes.set(e,r),this.sourceNodeOptions.set(e,n);const s=i=>this.handleDragStart(i,e),o=i=>this.handleSelectStart(i);return r.setAttribute("draggable","true"),r.addEventListener("dragstart",s),r.addEventListener("selectstart",o),()=>{this.sourceNodes.delete(e),this.sourceNodeOptions.delete(e),r.removeEventListener("dragstart",s),r.removeEventListener("selectstart",o),r.setAttribute("draggable","false")}}connectDropTarget(e,r){const n=i=>this.handleDragEnter(i,e),s=i=>this.handleDragOver(i,e),o=i=>this.handleDrop(i,e);return r.addEventListener("dragenter",n),r.addEventListener("dragover",s),r.addEventListener("drop",o),()=>{r.removeEventListener("dragenter",n),r.removeEventListener("dragover",s),r.removeEventListener("drop",o)}}addEventListeners(e){e.addEventListener&&(e.addEventListener("dragstart",this.handleTopDragStart),e.addEventListener("dragstart",this.handleTopDragStartCapture,!0),e.addEventListener("dragend",this.handleTopDragEndCapture,!0),e.addEventListener("dragenter",this.handleTopDragEnter),e.addEventListener("dragenter",this.handleTopDragEnterCapture,!0),e.addEventListener("dragleave",this.handleTopDragLeaveCapture,!0),e.addEventListener("dragover",this.handleTopDragOver),e.addEventListener("dragover",this.handleTopDragOverCapture,!0),e.addEventListener("drop",this.handleTopDrop),e.addEventListener("drop",this.handleTopDropCapture,!0))}removeEventListeners(e){e.removeEventListener&&(e.removeEventListener("dragstart",this.handleTopDragStart),e.removeEventListener("dragstart",this.handleTopDragStartCapture,!0),e.removeEventListener("dragend",this.handleTopDragEndCapture,!0),e.removeEventListener("dragenter",this.handleTopDragEnter),e.removeEventListener("dragenter",this.handleTopDragEnterCapture,!0),e.removeEventListener("dragleave",this.handleTopDragLeaveCapture,!0),e.removeEventListener("dragover",this.handleTopDragOver),e.removeEventListener("dragover",this.handleTopDragOverCapture,!0),e.removeEventListener("drop",this.handleTopDrop),e.removeEventListener("drop",this.handleTopDropCapture,!0))}getCurrentSourceNodeOptions(){const e=this.monitor.getSourceId(),r=this.sourceNodeOptions.get(e);return rn({dropEffect:this.altKeyPressed?"copy":"move"},r||{})}getCurrentDropEffect(){return this.isDraggingNativeItem()?"copy":this.getCurrentSourceNodeOptions().dropEffect}getCurrentSourcePreviewNodeOptions(){const e=this.monitor.getSourceId(),r=this.sourcePreviewNodeOptions.get(e);return rn({anchorX:.5,anchorY:.5,captureDraggingState:!1},r||{})}isDraggingNativeItem(){const e=this.monitor.getItemType();return Object.keys(en).some(r=>en[r]===e)}beginDragNativeItem(e,r){this.clearCurrentDragSourceNode(),this.currentNativeSource=su(e,r),this.currentNativeHandle=this.registry.addSource(e,this.currentNativeSource),this.actions.beginDrag([this.currentNativeHandle])}setCurrentDragSourceNode(e){this.clearCurrentDragSourceNode(),this.currentDragSourceNode=e;const r=1e3;this.mouseMoveTimeoutTimer=setTimeout(()=>{var n;return(n=this.rootElement)===null||n===void 0?void 0:n.addEventListener("mousemove",this.endDragIfSourceWasRemovedFromDOM,!0)},r)}clearCurrentDragSourceNode(){if(this.currentDragSourceNode){if(this.currentDragSourceNode=null,this.rootElement){var e;(e=this.window)===null||e===void 0||e.clearTimeout(this.mouseMoveTimeoutTimer||void 0),this.rootElement.removeEventListener("mousemove",this.endDragIfSourceWasRemovedFromDOM,!0)}return this.mouseMoveTimeoutTimer=null,!0}return!1}handleDragStart(e,r){e.defaultPrevented||(this.dragStartSourceIds||(this.dragStartSourceIds=[]),this.dragStartSourceIds.unshift(r))}handleDragEnter(e,r){this.dragEnterTargetIds.unshift(r)}handleDragOver(e,r){this.dragOverTargetIds===null&&(this.dragOverTargetIds=[]),this.dragOverTargetIds.unshift(r)}handleDrop(e,r){this.dropTargetIds.unshift(r)}constructor(e,r,n){this.sourcePreviewNodes=new Map,this.sourcePreviewNodeOptions=new Map,this.sourceNodes=new Map,this.sourceNodeOptions=new Map,this.dragStartSourceIds=null,this.dropTargetIds=[],this.dragEnterTargetIds=[],this.currentNativeSource=null,this.currentNativeHandle=null,this.currentDragSourceNode=null,this.altKeyPressed=!1,this.mouseMoveTimeoutTimer=null,this.asyncEndDragFrameId=null,this.dragOverTargetIds=null,this.lastClientOffset=null,this.hoverRafId=null,this.getSourceClientOffset=s=>{const o=this.sourceNodes.get(s);return o&&Qn(o)||null},this.endDragNativeItem=()=>{this.isDraggingNativeItem()&&(this.actions.endDrag(),this.currentNativeHandle&&this.registry.removeSource(this.currentNativeHandle),this.currentNativeHandle=null,this.currentNativeSource=null)},this.isNodeInDocument=s=>!!(s&&this.document&&this.document.body&&this.document.body.contains(s)),this.endDragIfSourceWasRemovedFromDOM=()=>{const s=this.currentDragSourceNode;s==null||this.isNodeInDocument(s)||(this.clearCurrentDragSourceNode()&&this.monitor.isDragging()&&this.actions.endDrag(),this.cancelHover())},this.scheduleHover=s=>{this.hoverRafId===null&&typeof requestAnimationFrame<"u"&&(this.hoverRafId=requestAnimationFrame(()=>{this.monitor.isDragging()&&this.actions.hover(s||[],{clientOffset:this.lastClientOffset}),this.hoverRafId=null}))},this.cancelHover=()=>{this.hoverRafId!==null&&typeof cancelAnimationFrame<"u"&&(cancelAnimationFrame(this.hoverRafId),this.hoverRafId=null)},this.handleTopDragStartCapture=()=>{this.clearCurrentDragSourceNode(),this.dragStartSourceIds=[]},this.handleTopDragStart=s=>{if(s.defaultPrevented)return;const{dragStartSourceIds:o}=this;this.dragStartSourceIds=null;const i=$e(s);this.monitor.isDragging()&&(this.actions.endDrag(),this.cancelHover()),this.actions.beginDrag(o||[],{publishSource:!1,getSourceClientOffset:this.getSourceClientOffset,clientOffset:i});const{dataTransfer:a}=s,d=Pt(a);if(this.monitor.isDragging()){if(a&&typeof a.setDragImage=="function"){const u=this.monitor.getSourceId(),h=this.sourceNodes.get(u),S=this.sourcePreviewNodes.get(u)||h;if(S){const{anchorX:y,anchorY:g,offsetX:p,offsetY:b}=this.getCurrentSourcePreviewNodeOptions(),_=lu(h,S,i,{anchorX:y,anchorY:g},{offsetX:p,offsetY:b});a.setDragImage(S,_.x,_.y)}}try{a==null||a.setData("application/json",{})}catch{}this.setCurrentDragSourceNode(s.target);const{captureDraggingState:l}=this.getCurrentSourcePreviewNodeOptions();l?this.actions.publishDragSource():setTimeout(()=>this.actions.publishDragSource(),0)}else if(d)this.beginDragNativeItem(d);else{if(a&&!a.types&&(s.target&&!s.target.hasAttribute||!s.target.hasAttribute("draggable")))return;s.preventDefault()}},this.handleTopDragEndCapture=()=>{this.clearCurrentDragSourceNode()&&this.monitor.isDragging()&&this.actions.endDrag(),this.cancelHover()},this.handleTopDragEnterCapture=s=>{if(this.dragEnterTargetIds=[],this.isDraggingNativeItem()){var o;(o=this.currentNativeSource)===null||o===void 0||o.loadDataTransfer(s.dataTransfer)}if(!this.enterLeaveCounter.enter(s.target)||this.monitor.isDragging())return;const{dataTransfer:a}=s,d=Pt(a);d&&this.beginDragNativeItem(d,a)},this.handleTopDragEnter=s=>{const{dragEnterTargetIds:o}=this;if(this.dragEnterTargetIds=[],!this.monitor.isDragging())return;this.altKeyPressed=s.altKey,o.length>0&&this.actions.hover(o,{clientOffset:$e(s)}),o.some(a=>this.monitor.canDropOnTarget(a))&&(s.preventDefault(),s.dataTransfer&&(s.dataTransfer.dropEffect=this.getCurrentDropEffect()))},this.handleTopDragOverCapture=s=>{if(this.dragOverTargetIds=[],this.isDraggingNativeItem()){var o;(o=this.currentNativeSource)===null||o===void 0||o.loadDataTransfer(s.dataTransfer)}},this.handleTopDragOver=s=>{const{dragOverTargetIds:o}=this;if(this.dragOverTargetIds=[],!this.monitor.isDragging()){s.preventDefault(),s.dataTransfer&&(s.dataTransfer.dropEffect="none");return}this.altKeyPressed=s.altKey,this.lastClientOffset=$e(s),this.scheduleHover(o),(o||[]).some(a=>this.monitor.canDropOnTarget(a))?(s.preventDefault(),s.dataTransfer&&(s.dataTransfer.dropEffect=this.getCurrentDropEffect())):this.isDraggingNativeItem()?s.preventDefault():(s.preventDefault(),s.dataTransfer&&(s.dataTransfer.dropEffect="none"))},this.handleTopDragLeaveCapture=s=>{this.isDraggingNativeItem()&&s.preventDefault(),this.enterLeaveCounter.leave(s.target)&&(this.isDraggingNativeItem()&&setTimeout(()=>this.endDragNativeItem(),0),this.cancelHover())},this.handleTopDropCapture=s=>{if(this.dropTargetIds=[],this.isDraggingNativeItem()){var o;s.preventDefault(),(o=this.currentNativeSource)===null||o===void 0||o.loadDataTransfer(s.dataTransfer)}else Pt(s.dataTransfer)&&s.preventDefault();this.enterLeaveCounter.reset()},this.handleTopDrop=s=>{const{dropTargetIds:o}=this;this.dropTargetIds=[],this.actions.hover(o,{clientOffset:$e(s)}),this.actions.drop({dropEffect:this.getCurrentDropEffect()}),this.isDraggingNativeItem()?this.endDragNativeItem():this.monitor.isDragging()&&this.actions.endDrag(),this.cancelHover()},this.handleSelectStart=s=>{const o=s.target;typeof o.dragDrop=="function"&&(o.tagName==="INPUT"||o.tagName==="SELECT"||o.tagName==="TEXTAREA"||o.isContentEditable||(s.preventDefault(),o.dragDrop()))},this.options=new uu(r,n),this.actions=e.getActions(),this.monitor=e.getMonitor(),this.registry=e.getRegistry(),this.enterLeaveCounter=new ru(this.isNodeInDocument)}}const hu=function(e,r,n){return new fu(e,r,n)},pu="_wrapper_tm686_2",gu="_label_tm686_9",mu="_icon_tm686_16",vu="_text_tm686_26",yu="_content_tm686_33",bu="_modal_tm686_43",Su="_top_tm686_51",wu="_title_tm686_58",Eu="_modalContent_tm686_65",Ou="_images_tm686_74",_u="_add_tm686_83",Tu="_description_tm686_95",Du="_bottom_tm686_105",Cu="_cancel_tm686_117",xu="_highlight_tm686_122",Pu="_accent_tm686_127",Iu="_image_tm686_74",Ru="_selected_tm686_141",Nu="_checkbox_tm686_145",ku="_loading_tm686_151",ju="_spinner_tm686_163",Au="_spin_tm686_163",A={wrapper:pu,label:gu,icon:mu,text:vu,content:yu,modal:bu,top:Su,title:wu,modalContent:Eu,images:Ou,add:_u,description:Tu,bottom:Du,cancel:Cu,highlight:xu,accent:Pu,image:Iu,selected:Ru,checkbox:Nu,loading:ku,spinner:ju,spin:Au},Mu=t=>{const{label:e,onChange:r}=t,{setOpenModal:n,setOnChange:s}=zt();return m.jsx(m.Fragment,{children:m.jsxs("div",{className:A.wrapper,onClick:o=>o.stopPropagation(),children:[e&&m.jsx("h4",{className:A.label,children:e}),m.jsxs("div",{onClick:()=>{s(r),n(!0)},className:A.content,children:[m.jsx("div",{className:A.icon,children:m.jsx(ne,{name:"plus",width:20,height:20,fill:"#757575"})}),m.jsx("span",{className:A.text,children:"Choose image"})]})]})})},Lu=()=>{const{setOpenModal:t,onChange:e}=zt(),r=()=>{var h;(h=n.current)==null||h.click()},n=D.useRef(null),[s,o]=D.useState([]),[i,a]=D.useState(!1),d=async h=>{var b;const S=((b=h.target.files)==null?void 0:b[0])||null;if(!S)return;const y=new FormData;y.append("file",S),a(!0);const{data:g}=await ec(y),p=[...s];p.unshift({...g,cfId:g.path}),o([...p]),a(!1)},l=h=>{const y=[...s].map(g=>g.id===h.id?{...h}:g);o([...y])};D.useEffect(()=>{(async()=>{const{data:S}=await Za(),y=S.map(g=>({...g,isSelected:!1}));o(y)})()},[]);function u(){const h=s.filter(S=>S.isSelected).map(S=>S.cfId);e==null||e(h)}return m.jsxs("div",{onClick:h=>h.stopPropagation(),className:A.modal,children:[m.jsxs("div",{className:A.top,children:[m.jsx("h4",{className:A.title,children:"Select Image"}),m.jsx(ne,{name:"x",width:20,height:20,hoverable:!0,onClick:()=>t(!1)})]}),m.jsxs("div",{className:A.modalContent,children:[m.jsxs("div",{className:A.top,children:[m.jsx("div",{children:"Search"}),m.jsxs("div",{children:["Selected: ",s.filter(h=>h.isSelected).length," images"]})]}),m.jsxs("div",{className:A.images,children:[m.jsxs("div",{className:A.input,children:[m.jsxs("div",{onClick:r,className:A.add,children:[m.jsx("div",{className:A.icon,children:m.jsx(ne,{name:"plus",width:20,height:20,fill:"#757575"})}),m.jsxs("div",{className:A.description,children:[m.jsx("span",{children:"Drag and drop images here, or "}),m.jsx("span",{className:A.highlight,children:"click to browse"}),m.jsx("br",{}),m.jsx("span",{className:A.accent,children:"up to 10MB."})]})]}),m.jsx("input",{type:"file",ref:n,style:{display:"none"},onChange:d})]}),i&&m.jsx(nn,{}),s.map(h=>m.jsxs("div",{className:z(A.image,{[A.selected]:h.isSelected}),children:[m.jsx("div",{className:A.checkbox,children:m.jsx(un,{value:h.isSelected,onChange:S=>{l({...h,isSelected:S})}})}),m.jsx("img",{src:`https://imagedelivery.net/${h.cfId}/w=500`,alt:"image",width:"100%",height:"100%"})]},h.id)),s.length===0&&[...new Array(5)].map(()=>m.jsx(nn,{}))]})]}),m.jsxs("div",{className:A.bottom,children:[m.jsx(Nt,{className:A.cancel,onClick:()=>t(!1),children:"Cancel"}),m.jsx(Nt,{onClick:()=>{t(!1),u()},children:"Select"})]})]})},nn=()=>m.jsx("div",{className:A.loading,children:m.jsx("div",{className:A.spinner})});exports.Button=Nt;exports.Checkbox=un;exports.ChooseImage=Mu;exports.ChooseImageModal=Lu;exports.ColorPicker=Ko;exports.DndProvider=wl;exports.HTML5Backend=hu;exports.Icon=ne;exports.Input=fo;exports.Modal=Zo;exports.Picker=Ao;exports.Radio=fi;exports.Select=Eo;exports.Submodal=Ro;exports.Switch=xo;exports.Textarea=si;exports.Tip=yi;exports.axios=j;exports.clx=z;exports.defaultPageNames=As;exports.jsxRuntimeExports=m;exports.navbarBlocks=on;exports.sizeOptions=ks;exports.styles=fe;exports.updateSettings=Qa;exports.useBlocksStore=Rs;exports.useChooseImageStore=zt;exports.useColorPickerStore=cn;exports.useDeviceStore=Ns;exports.useDrag=zl;exports.useDrop=Zl;exports.useFontsStore=Ys;exports.useLayersStore=zs;exports.useNavbarStore=Ls;exports.usePagesStore=Gs;exports.usePreviewStore=Fs;exports.useSettingsStore=Js;exports.useSubmodalStore=an;exports.useThemeSettingsStore=Ws;exports.v4=Ye;exports.weightOptions=js;
@@ -1,4 +1,5 @@
1
1
  type Size = 's' | 'm' | 'l';
2
+ export type TypeButton = 'Primary' | 'Secondary' | 'Tertiary';
2
3
  interface Props {
3
4
  onClick?: React.MouseEventHandler<HTMLButtonElement>;
4
5
  style?: React.CSSProperties;
@@ -6,6 +7,7 @@ interface Props {
6
7
  children?: React.ReactNode;
7
8
  disabled?: boolean;
8
9
  size?: Size;
10
+ type?: TypeButton;
9
11
  }
10
12
  export declare const Button: React.FC<Props>;
11
13
  export {};
@@ -1,12 +1,14 @@
1
1
  import React from 'react';
2
2
  interface Props {
3
- name: string;
3
+ name?: string;
4
4
  fill?: string;
5
+ iconComponent?: any;
5
6
  hoverable?: boolean;
6
7
  onClick?: React.MouseEventHandler<SVGSVGElement>;
7
8
  className?: string;
8
9
  width?: number;
9
10
  height?: number;
11
+ rotated?: boolean;
10
12
  }
11
13
  export declare const Icon: React.FC<Props>;
12
14
  export {};
@@ -7,6 +7,7 @@ interface Props {
7
7
  value: string;
8
8
  type?: 'text' | 'number';
9
9
  min?: number;
10
+ max?: number;
10
11
  disabled?: boolean;
11
12
  required?: boolean;
12
13
  regex?: string;
@@ -1,6 +1,9 @@
1
+ type OnChange = (images: string[]) => void;
1
2
  interface Options {
2
3
  openModal: boolean;
3
4
  setOpenModal: (openModal: boolean) => void;
5
+ onChange: OnChange | null;
6
+ setOnChange: (onChange: OnChange) => void;
4
7
  }
5
8
  export declare const useChooseImageStore: import("zustand").UseBoundStore<import("zustand").StoreApi<Options>>;
6
9
  export {};
@@ -2,7 +2,9 @@ import React from 'react';
2
2
  import { ButtonType } from '../ButtonsSettings';
3
3
  interface Props {
4
4
  buttons: ButtonType[];
5
- setButtons: React.Dispatch<React.SetStateAction<ButtonType[]>>;
5
+ setButtons: (value: ButtonType[]) => void;
6
+ deletable?: boolean;
7
+ addable?: boolean;
6
8
  }
7
9
  export declare const ButtonTypeSettings: React.FC<Props>;
8
10
  export {};
@@ -1,20 +1,21 @@
1
+ import { TypeButton } from '@shared/ui';
1
2
  import React from 'react';
2
- import { TextType } from '../TypeTexts';
3
- export type TypeButton = 'Primary' | 'Secondary' | 'Tertiary';
3
+ import { TextType } from '../TypesText';
4
4
  export type Destination = 'Open Link' | 'Go to Page';
5
5
  export interface ButtonType {
6
6
  image?: string;
7
7
  type: TypeButton;
8
8
  id: string;
9
- typeText: TextType;
9
+ typesText: TextType[];
10
10
  destination: Destination;
11
11
  link?: string;
12
+ text: string;
12
13
  }
13
14
  interface Props {
14
15
  isActiveButtons: boolean;
15
- setIsActiveButtons: React.Dispatch<React.SetStateAction<boolean>>;
16
+ setIsActiveButtons: (value: boolean) => void;
16
17
  buttons: ButtonType[];
17
- setButtons: React.Dispatch<React.SetStateAction<ButtonType[]>>;
18
+ setButtons: (value: ButtonType[]) => void;
18
19
  }
19
20
  export declare const ButtonsSettings: React.FC<Props>;
20
21
  export {};
@@ -2,7 +2,7 @@ import { ButtonType } from '.';
2
2
  import React from 'react';
3
3
  interface Props {
4
4
  activeButton: ButtonType;
5
- setActiveButton: React.Dispatch<React.SetStateAction<ButtonType | null>>;
5
+ setActiveButton: (value: ButtonType | null) => void;
6
6
  popupPosition: {
7
7
  top: number;
8
8
  left: number;
@@ -1,6 +1,7 @@
1
1
  import React from 'react';
2
2
  interface Props {
3
3
  label?: string;
4
+ onChange: (images: string[]) => void;
4
5
  }
5
6
  export declare const ChooseImage: React.FC<Props>;
6
7
  export interface Image {
@@ -1,18 +1,15 @@
1
- import React from 'react';
1
+ import { ModalOption } from './popup';
2
+ import { Other } from '../OtherSettings';
2
3
  export interface ItemBase {
3
4
  image?: string;
4
5
  name: string;
5
6
  id: string;
6
7
  }
7
- export interface Product extends ItemBase {
8
- }
9
- export interface Pages extends ItemBase {
10
- }
11
8
  interface CommomPropsBase<T extends ItemBase> {
12
9
  isActiveItems?: boolean;
13
- setIsActiveItems?: React.Dispatch<React.SetStateAction<boolean>>;
10
+ setIsActiveItems?: (value: boolean) => void;
14
11
  items: T[];
15
- setItems: React.Dispatch<React.SetStateAction<T[]>>;
12
+ setItems: (value: T[]) => void;
16
13
  title?: string;
17
14
  subtitle?: string;
18
15
  editable?: boolean;
@@ -20,11 +17,18 @@ interface CommomPropsBase<T extends ItemBase> {
20
17
  withImage?: boolean;
21
18
  deletable?: boolean;
22
19
  addable?: boolean;
23
- other?: {
24
- isItem: boolean;
25
- setIsItem: React.Dispatch<React.SetStateAction<boolean>>;
20
+ other?: Other[];
21
+ addableOptions?: Record<string, any>;
22
+ hasRangeSelector?: boolean;
23
+ rangeSelectorOptions?: {
24
+ count: number;
25
+ setCount: (value: number) => void;
26
+ min?: number;
27
+ max?: number;
28
+ step?: number;
26
29
  label?: string;
27
30
  };
31
+ modalOptions?: ModalOption<T>[];
28
32
  }
29
33
  interface SelectProps<T extends ItemBase> extends CommomPropsBase<T> {
30
34
  itemsType: 'select';
@@ -1,12 +1,56 @@
1
1
  import { ItemBase } from '.';
2
- import React from 'react';
2
+ interface ImageOption<T> {
3
+ type: 'image';
4
+ label?: string;
5
+ field: keyof T;
6
+ }
7
+ interface TextOption<T> {
8
+ type: 'text';
9
+ label?: string;
10
+ field: {
11
+ type: keyof T;
12
+ text: keyof T;
13
+ };
14
+ }
15
+ interface InputOption<T> {
16
+ type: 'input';
17
+ label?: string;
18
+ field: keyof T;
19
+ placeholder?: string;
20
+ }
21
+ interface InputSwitchOption<T> {
22
+ type: 'inputSwitch';
23
+ inputLabel?: string;
24
+ switchLabel?: string;
25
+ field: {
26
+ text: keyof T;
27
+ switch: keyof T;
28
+ };
29
+ placeholder?: string;
30
+ }
31
+ interface ListOption<T> {
32
+ type: 'list';
33
+ label?: string;
34
+ field: keyof T;
35
+ draggable?: boolean;
36
+ deletable?: boolean;
37
+ itemsOptions: string[];
38
+ }
39
+ interface SelectOption<T> {
40
+ type: 'select';
41
+ label?: string;
42
+ field: keyof T;
43
+ itemsOptions: string[];
44
+ }
45
+ export type ModalOption<T> = ImageOption<T> | TextOption<T> | InputOption<T> | InputSwitchOption<T> | ListOption<T> | SelectOption<T>;
3
46
  interface Props<T extends ItemBase> {
4
47
  activeItem: T;
5
- setActiveItem: React.Dispatch<React.SetStateAction<T | null>>;
48
+ setActiveItem: (value: T | null) => void;
6
49
  popupPosition: {
7
50
  top: number;
8
51
  left: number;
9
52
  };
53
+ modalOptions: ModalOption<T>[];
10
54
  }
11
- export declare const ProductPopup: <T extends ItemBase>(props: Props<T>) => import("react/jsx-runtime").JSX.Element;
55
+ export declare const ItemPopup: <T extends ItemBase>(props: Props<T>) => import("react/jsx-runtime").JSX.Element;
12
56
  export {};
@@ -3,8 +3,8 @@ export type Padding = 'left' | 'top' | 'right' | 'bottom';
3
3
  interface Props {
4
4
  alignment: string;
5
5
  padding: Record<Padding, number>;
6
- setAlignment: React.Dispatch<React.SetStateAction<Alignment>>;
7
- setPadding: React.Dispatch<React.SetStateAction<Record<Padding, number>>>;
6
+ setAlignment: (value: Alignment) => void;
7
+ setPadding: (value: Record<Padding, number>) => void;
8
8
  }
9
9
  export declare const LayoutSettings: React.FC<Props>;
10
10
  export {};