@billgangcom/theme-lib 1.32.0 → 1.33.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/builder/constants/theme-settings.d.ts +15 -1
- package/dist/builder/store/useColorPickerStore.d.ts +19 -0
- package/dist/builder/store/useThemeSettingsStore.d.ts +1 -1
- package/dist/builder/ui/ColorPicker/index.d.ts +1 -0
- package/dist/builder.cjs.js +31 -11
- package/dist/builder.es.js +1996 -1595
- package/dist/{index-8_Sn0J5j.cjs → index-CZcNDk0w.cjs} +18 -18
- package/dist/{index-CC_0JpL1.js → index-DSREXVyt.js} +862 -760
- package/dist/ui/ButtonsSettings/index.d.ts +2 -0
- package/dist/ui.cjs.js +1 -1
- package/dist/ui.es.js +926 -905
- package/package.json +1 -1
package/dist/ui.cjs.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("./index-8_Sn0J5j.cjs"),h=require("react");require("@phosphor-icons/react");const Rt="_wrapper_9rr5j_2",yt="_alignmentBlock_9rr5j_8",It="_title_9rr5j_15",kt="_subtitle_9rr5j_22",$t="_alignmentContent_9rr5j_29",wt="_alignments_9rr5j_37",Nt="_alignment_9rr5j_8",Ct="_circle_9rr5j_58",St="_paddings_9rr5j_65",Bt="_padding_9rr5j_65",Tt="_input_9rr5j_84",G={wrapper:Rt,alignmentBlock:yt,title:It,subtitle:kt,alignmentContent:$t,alignments:wt,alignment:Nt,circle:Ct,paddings:St,padding:Bt,input:Tt},Pt=["topLeft","top","topRight","left","center","right","bottomLeft","bottom","bottomRight"],At=["left","top","right","bottom"],Ot=x=>{const{alignment:i,padding:e,setPadding:n,setAlignment:o}=x;function r(){switch(i){case"left":case"topLeft":case"bottomLeft":return"TextAlignLeft";case"right":case"topRight":case"bottomRight":return"TextAlignRight";case"center":case"top":case"bottom":return"TextAlignCenter";default:return"TextAlignCenter"}}function c(s){switch(s){case"left":return"AlignLeft";case"right":return"AlignRight";case"top":return"AlignTop";case"bottom":return"AlignBottom"}}return t.jsxRuntimeExports.jsxs("div",{className:G.layout,children:[t.jsxRuntimeExports.jsx("h3",{className:G.title,children:"Layout"}),t.jsxRuntimeExports.jsxs("div",{className:G.alignmentBlock,children:[t.jsxRuntimeExports.jsx("h5",{className:G.subtitle,children:"Alignment"}),t.jsxRuntimeExports.jsxs("div",{className:G.alignmentContent,children:[t.jsxRuntimeExports.jsx("div",{className:G.alignments,children:Pt.map(s=>t.jsxRuntimeExports.jsxs("div",{onClick:()=>{o(s)},className:G.alignment,children:[s!==i&&t.jsxRuntimeExports.jsx("div",{className:G.circle}),s===i&&t.jsxRuntimeExports.jsx(t.Icon,{name:r(),fill:"#FF3F19",width:22,height:22})]},s))}),t.jsxRuntimeExports.jsx("div",{className:G.paddings,children:At.map(s=>t.jsxRuntimeExports.jsxs("label",{className:G.padding,children:[t.jsxRuntimeExports.jsx("div",{children:t.jsxRuntimeExports.jsx(t.Icon,{name:c(s),width:20,height:20})}),t.jsxRuntimeExports.jsx(t.Input,{type:"text",value:String(e[s]),onChange:a=>n({...e,[s]:Number(a)}),paddingless:!0,borderless:!0})]},s))})]})]})]})},qt="_title_18dz7_1",Dt="_subtitle_18dz7_5",Lt="_header_18dz7_12",Mt="_text_18dz7_13",Ht="_top_18dz7_21",Ft="_itemsBlock_18dz7_30",st={title:qt,subtitle:Dt,header:Lt,text:Mt,top:Ht,itemsBlock:Ft},Vt="_typeTexts_rcw8p_1",Ut="_block_rcw8p_8",zt="_active_rcw8p_21",ut={typeTexts:Vt,block:Ut,active:zt},Yt=["bold","italic","underline","strike-through","code"],dt=x=>{const{typesText:i,setTypesText:e}=x;function n(o){switch(o){case"bold":return"TextB";case"italic":return"TextItalic";case"code":return"CodeSimple";case"strike-through":return"TextStrikethrough";case"underline":return"TextUnderline"}}return t.jsxRuntimeExports.jsx("div",{className:ut.typeTexts,children:Yt.map(o=>t.jsxRuntimeExports.jsx("div",{className:t.clx(ut.block,{[ut.active]:i.includes(o)}),onClick:()=>{const r=[...i];if(r.includes(o)){const c=r.filter(s=>s!==o);e(c)}else r.push(o),e(r)},children:t.jsxRuntimeExports.jsx(t.Icon,{name:n(o),fill:i.includes(o)?"#252525":"#757575",width:20,height:20})},String(o)))})},pt=x=>{const{typesText:i,isActiveText:e,setIsActiveText:n,text:o,setText:r,setTypesText:c,title:s,subtitle:a="Items"}=x;return t.jsxRuntimeExports.jsxs("div",{className:st.text,children:[(s||e!==void 0)&&t.jsxRuntimeExports.jsxs("div",{className:st.top,children:[s&&t.jsxRuntimeExports.jsx("h3",{className:st.title,children:s}),e!==void 0&&n&&t.jsxRuntimeExports.jsx(t.Switch,{current:e,onChange:u=>n(u)})]}),t.jsxRuntimeExports.jsxs("div",{className:st.itemsBlock,children:[t.jsxRuntimeExports.jsx("h5",{className:st.subtitle,children:a}),t.jsxRuntimeExports.jsx(t.Textarea,{onChange:u=>r(u),value:o,maxLength:150}),t.jsxRuntimeExports.jsx(dt,{typesText:i,setTypesText:c})]})]})},Gt="_title_fyopx_1",Wt="_subtitle_fyopx_5",Xt="_header_fyopx_12",Jt="_text_fyopx_13",Qt="_productsBlock_fyopx_14",Kt="_top_fyopx_26",Zt="_itemsBlock_fyopx_35",te="_typeTexts_fyopx_41",ee="_block_fyopx_48",se="_active_fyopx_61",ne="_products_fyopx_14",oe="_product_fyopx_14",ie="_button_fyopx_80",re="_disabled_fyopx_91",ce="_image_fyopx_95",ae="_info_fyopx_102",le="_name_fyopx_114",ue="_buttons_fyopx_118",xe="_modal_fyopx_125",de="_link_fyopx_145",pe="_modalOptions_fyopx_151",H={title:Gt,subtitle:Wt,header:Xt,text:Jt,productsBlock:Qt,top:Kt,itemsBlock:Zt,typeTexts:te,block:ee,active:se,products:ne,product:oe,button:ie,disabled:re,image:ce,info:ae,name:le,buttons:ue,modal:xe,link:de,modalOptions:pe},me=h.forwardRef((x,i)=>{const{activeItem:e,setActiveItem:n,popupPosition:o,modalOptions:r,setIsOpenModal:c}=x;return t.jsxRuntimeExports.jsxs("div",{ref:i,className:H.modal,onClick:s=>{s.stopPropagation()},style:{top:`${o.top}px`,left:`${o.left}px`},children:[t.jsxRuntimeExports.jsxs("div",{className:H.top,children:[t.jsxRuntimeExports.jsx("h3",{className:H.title,children:e.name}),t.jsxRuntimeExports.jsx(t.Icon,{name:"X",height:20,width:20,hoverable:!0,onClick:()=>{n(null),c(!1)}})]}),t.jsxRuntimeExports.jsx("div",{className:H.modalOptions,children:r.map(s=>{if(s.type==="image")return t.jsxRuntimeExports.jsx(t.ChooseImage,{label:"Put up an attractive image",activeImage:e[s.field],onChange:a=>{const u={...e,[s.field]:a};n(u)}},String(s.field));if(s.type==="text")return t.jsxRuntimeExports.jsx(pt,{typesText:e[s.field.type],setTypesText:a=>{const u={...e,[s.field.type]:a};n(u)},text:e[s.field.text]||"",setText:a=>{const u={...e,[s.field.text]:a};n(u)},subtitle:s.label});if(s.type==="input")return t.jsxRuntimeExports.jsx(t.Input,{onChange:a=>{const u={...e,[s.field]:a};n(u)},value:e[s.field]||"",label:s.label,placeholder:s.placeholder});if(s.type==="inputSwitch")return t.jsxRuntimeExports.jsxs("div",{className:H.link,children:[t.jsxRuntimeExports.jsx(t.Input,{onChange:a=>{const u={...e,[s.field.text]:a};n(u)},value:e[s.field.text]||"",label:s.inputLabel,placeholder:s.placeholder}),t.jsxRuntimeExports.jsx(t.Switch,{current:!!e[s.field.switch]||!1,label:s.switchLabel,onChange:a=>{const u={...e,[s.field.switch]:a};n(u)}})]});if(s.type==="list")return t.jsxRuntimeExports.jsx(ht,{items:e[s.field]||[],setItems:a=>{const u={...e,[s.field]:a};n(u)},itemsType:"select",draggable:s.draggable||!1,itemsOptions:s.itemsOptions,deletable:s.deletable||!1,editable:!1,subtitle:s.label});if(s.type==="select")return t.jsxRuntimeExports.jsx(t.Select,{options:s.itemsOptions,onChange:a=>{const u={...e,[s.field]:a};n(u)},label:s.label,value:e[s.field]||"String",leftAddon:s.leftAddon&&s.leftAddon==="icon"&&t.jsxRuntimeExports.jsx(t.Icon,{name:e[s.field]})})})})]})}),he="_other_g74jx_1",_e="_subtitle_g74jx_7",je="_items_g74jx_14",xt={other:he,subtitle:_e,items:je},at=x=>{const{items:i,title:e="Other"}=x;return t.jsxRuntimeExports.jsxs("div",{className:xt.other,children:[t.jsxRuntimeExports.jsx("h5",{className:xt.subtitle,children:e}),t.jsxRuntimeExports.jsx("div",{className:xt.items,children:i.map((n,o)=>t.jsxRuntimeExports.jsx(t.Switch,{current:n.isItem,onChange:r=>n.setIsItem(r),label:n.label,hasBackground:!0,paddingless:!1},o))})]})},ge=x=>{const{index:i,moveProduct:e,children:n}=x,[,o]=t.useDrop({accept:"product",hover(s){s.index!==i&&(e(s.index,i),s.index=i)}}),[{isDragging:r},c]=t.useDrag({type:"product",item:{index:i},collect:s=>({isDragging:s.isDragging()})});return t.jsxRuntimeExports.jsx("div",{ref:s=>c(o(s)),className:`${H.product} ${r?H.dragging:""}`,children:n})},ht=x=>{const{isActiveItems:i,setIsActiveItems:e,items:n,setItems:o,other:r,title:c,subtitle:s,editable:a=!0,draggable:u=!1,withImage:E=!1,deletable:l=!0,addable:C=!0,itemsType:m,itemsPlaceholder:_="",itemsOptions:p,hasRangeSelector:T=!1,rangeSelectorOptions:D,modalOptions:S,addableOptions:P={},limit:$,autoScrollInterval:w}=x,[j,f]=h.useState(null),[L,v]=h.useState({top:0,left:0}),[b,I]=h.useState(null),A=h.useRef(null),[O,F]=h.useState(!1),J=(d,N)=>{const R=[...n],[Y]=R.splice(d,1);R.splice(N,0,Y),o(R)};h.useEffect(()=>{const d=()=>{f(null),F(!1)};return document.body.addEventListener("click",d),f(null),F(!1),()=>{f(null),F(!1),document.body.removeEventListener("click",d)}},[]),h.useEffect(()=>{if(j){const d=[...n].map(N=>N.id===j.id?j:N);o(d)}},[j]),h.useEffect(()=>{if(A.current&&b){const d=A.current.getBoundingClientRect().height,N=window.innerHeight;let R=b.top;R+d>N+window.scrollY&&(R=N+window.scrollY-d-200),R<0&&(R=10),v({top:R,left:b.left})}},[A.current,b]);const Z=(d,N)=>{d.stopPropagation();const R=d.target.getBoundingClientRect();I({top:R.top+window.scrollY,left:R.left-30}),f(N),F(!0)};function g(d){if(E)return d?t.jsxRuntimeExports.jsx("img",{src:`https://imagedelivery.net/${d[0]}/w=1000`,alt:"image",width:16,height:16}):t.jsxRuntimeExports.jsx(t.Icon,{name:"Image",width:16,height:16,fill:"#757575"})}const B=(d,N)=>{var Y;const R=t.jsxRuntimeExports.jsxs(t.jsxRuntimeExports.Fragment,{children:[u&&t.jsxRuntimeExports.jsx("div",{children:t.jsxRuntimeExports.jsx(t.Icon,{name:"DotsSixVertical",hoverable:!0,width:20,height:20})}),m==="select"&&t.jsxRuntimeExports.jsx(t.Select,{onChange:q=>{const et=[...n].map(Q=>Q.id===d.id?{...d,name:q}:Q);f({...d,name:q}),o([...et])},value:d.name,options:p.filter(q=>!n.find(U=>U.name===q.name)).map(q=>q.name),leftAddon:g(d.images)}),m==="input"&&t.jsxRuntimeExports.jsx(t.Input,{onChange:q=>{const et=[...n].map(Q=>Q.id===d.id?{...d,name:q}:Q);o([...et])},value:d.name,placeholder:_}),m==="image"&&t.jsxRuntimeExports.jsx(t.ChooseImage,{onChange:q=>{const et=[...n].map(Q=>Q.id===d.id?{...d,images:q}:Q);o([...et])},activeImage:(Y=n.find(q=>q.id===d.id))==null?void 0:Y.images[0]}),t.jsxRuntimeExports.jsxs("div",{className:H.buttons,children:[a&&t.jsxRuntimeExports.jsx(t.Icon,{name:"Sliders",hoverable:!0,width:20,height:20,onClick:q=>Z(q,d)}),l&&t.jsxRuntimeExports.jsx(t.Icon,{name:"Trash",hoverable:!0,width:20,height:20,fill:"#C12A2A",onClick:()=>o(n.filter(q=>q.id!==d.id))})]})]});return u?t.jsxRuntimeExports.jsx(ge,{product:d,index:N,moveProduct:J,children:R},d.id):t.jsxRuntimeExports.jsx("div",{className:H.product,children:R},d.id)};return t.jsxRuntimeExports.jsxs("div",{className:H.productsBlock,children:[(c||i!==void 0)&&t.jsxRuntimeExports.jsxs("div",{className:H.top,children:[c&&t.jsxRuntimeExports.jsx("h3",{className:H.title,children:c}),i!==void 0&&t.jsxRuntimeExports.jsx(t.Switch,{current:i,onChange:d=>e==null?void 0:e(d)})]}),j&&a&&S&&O&&t.jsxRuntimeExports.jsx(me,{ref:A,activeItem:j,setActiveItem:f,popupPosition:L,modalOptions:S,setIsOpenModal:F}),T&&D&&t.jsxRuntimeExports.jsx(lt,{...D}),t.jsxRuntimeExports.jsxs("div",{className:H.products,children:[s&&t.jsxRuntimeExports.jsx("h5",{className:H.subtitle,children:s}),u?t.jsxRuntimeExports.jsx(t.DndProvider,{backend:t.HTML5Backend,children:n.map((d,N)=>B(d,N))}):n.map((d,N)=>B(d,N)),C&&t.jsxRuntimeExports.jsxs(t.Button,{withoutHover:!0,className:t.clx(H.button,{[H.disabled]:!!($&&$<=n.length||n.length===(p==null?void 0:p.length))}),size:"s",disabled:!!($&&$<=n.length||n.length===(p==null?void 0:p.length)),onClick:()=>{const d=[...n];let N=null;if(p){for(let R=0;R<p.length;R++)if(!n.find(Y=>Y.id===p[R].id)){N=p[R];break}}m==="select"?d.push({name:N?N.name:p[0].name,id:(N==null?void 0:N.id)||p[0].id,...P}):m==="input"?d.push({name:"",id:t.v4(),...P}):d.push({name:`Image ${n.length+1}`,id:t.v4(),...P}),o(d)},children:[t.jsxRuntimeExports.jsx("span",{children:"Add Option"}),t.jsxRuntimeExports.jsx(t.Icon,{name:"Plus",width:16,height:16})]})]}),r!==void 0&&t.jsxRuntimeExports.jsx(at,{items:r}),w!==void 0&&t.jsxRuntimeExports.jsx(t.Input,{label:"Auto scroll interval",type:"number",value:String(w.scrollInterval),onChange:d=>w.setScrollInterval(Number(d)),min:.1,max:100,style:{width:"100%"},postfix:"sec."})]})},fe="_title_fyopx_1",be="_subtitle_fyopx_5",ve="_header_fyopx_12",Ee="_text_fyopx_13",Re="_productsBlock_fyopx_14",ye="_top_fyopx_26",Ie="_itemsBlock_fyopx_35",ke="_typeTexts_fyopx_41",$e="_block_fyopx_48",we="_active_fyopx_61",Ne="_products_fyopx_14",Ce="_product_fyopx_14",Se="_button_fyopx_80",Be="_disabled_fyopx_91",Te="_image_fyopx_95",Pe="_info_fyopx_102",Ae="_name_fyopx_114",Oe="_buttons_fyopx_118",qe="_modal_fyopx_125",De="_link_fyopx_145",Le="_modalOptions_fyopx_151",X={title:fe,subtitle:be,header:ve,text:Ee,productsBlock:Re,top:ye,itemsBlock:Ie,typeTexts:ke,block:$e,active:we,products:Ne,product:Ce,button:Se,disabled:Be,image:Te,info:Pe,name:Ae,buttons:Oe,modal:qe,link:De,modalOptions:Le},Me=x=>{const{isActiveItems:i,setIsActiveItems:e,items:n,setItems:o,other:r,title:c,subtitle:s,draggable:a=!1,withImage:u=!1,addable:E=!0,itemsOptions:l,hasRangeSelector:C=!1,rangeSelectorOptions:m,limit:_,autoScrollInterval:p}=x;function T(S){if(u)return S?t.jsxRuntimeExports.jsx("img",{src:`https://imagedelivery.net/${S[0]}/w=1000`,alt:"image",width:16,height:16}):t.jsxRuntimeExports.jsx(t.Icon,{name:"Image",width:16,height:16,fill:"#757575"})}const D=S=>{const P=l.find(w=>w.id===S);if(!P)return;const $=t.jsxRuntimeExports.jsxs(t.jsxRuntimeExports.Fragment,{children:[a&&t.jsxRuntimeExports.jsx("div",{children:t.jsxRuntimeExports.jsx(t.Icon,{name:"DotsSixVertical",hoverable:!0,width:20,height:20})}),t.jsxRuntimeExports.jsx(t.Select,{onChange:w=>{const j=[...n],f=l.find(b=>b.name===w);if(!f)return;const L=f.id,v=j.map(b=>b===S?L:b);o([...v])},value:P.name,options:l.filter(w=>!n.find(j=>j===w.id)).map(w=>w.name),leftAddon:T(P.images)}),t.jsxRuntimeExports.jsx("div",{className:X.buttons,children:t.jsxRuntimeExports.jsx(t.Icon,{name:"Trash",hoverable:!0,width:20,height:20,fill:"#C12A2A",onClick:()=>o(n.filter(w=>w!==S))})})]});return t.jsxRuntimeExports.jsx("div",{className:X.product,children:$},S)};return t.jsxRuntimeExports.jsxs("div",{className:X.productsBlock,children:[(c||i!==void 0)&&t.jsxRuntimeExports.jsxs("div",{className:X.top,children:[c&&t.jsxRuntimeExports.jsx("h3",{className:X.title,children:c}),i!==void 0&&t.jsxRuntimeExports.jsx(t.Switch,{current:i,onChange:S=>e==null?void 0:e(S)})]}),C&&m&&t.jsxRuntimeExports.jsx(lt,{...m}),t.jsxRuntimeExports.jsxs("div",{className:X.products,children:[s&&t.jsxRuntimeExports.jsx("h5",{className:X.subtitle,children:s}),n.map(S=>D(S)),E&&t.jsxRuntimeExports.jsxs(t.Button,{withoutHover:!0,className:t.clx(X.button,{[X.disabled]:!!(_&&_<=n.length||n.length===l.length)}),size:"s",disabled:!!(_&&_<=n.length||n.length===l.length),onClick:()=>{const S=[...n];let P=null;if(l){for(let $=0;$<l.length;$++)if(!n.find(w=>w===l[$].id)){P=l[$];break}}S.push((P==null?void 0:P.id)||l[0].id),o(S)},children:[t.jsxRuntimeExports.jsx("span",{children:"Add Option"}),t.jsxRuntimeExports.jsx(t.Icon,{name:"Plus",width:16,height:16})]})]}),r!==void 0&&t.jsxRuntimeExports.jsx(at,{items:r}),p!==void 0&&t.jsxRuntimeExports.jsx(t.Input,{label:"Auto scroll interval",type:"number",value:String(p.scrollInterval),onChange:S=>p.setScrollInterval(Number(S)),min:.1,max:100,style:{width:"100%"},postfix:"sec."})]})},He="_title_fyopx_1",Fe="_subtitle_fyopx_5",Ve="_header_fyopx_12",Ue="_text_fyopx_13",ze="_productsBlock_fyopx_14",Ye="_top_fyopx_26",Ge="_itemsBlock_fyopx_35",We="_typeTexts_fyopx_41",Xe="_block_fyopx_48",Je="_active_fyopx_61",Qe="_products_fyopx_14",Ke="_product_fyopx_14",Ze="_button_fyopx_80",ts="_disabled_fyopx_91",es="_image_fyopx_95",ss="_info_fyopx_102",ns="_name_fyopx_114",os="_buttons_fyopx_118",is="_modal_fyopx_125",rs="_link_fyopx_145",cs="_modalOptions_fyopx_151",V={title:He,subtitle:Fe,header:Ve,text:Ue,productsBlock:ze,top:Ye,itemsBlock:Ge,typeTexts:We,block:Xe,active:Je,products:Qe,product:Ke,button:Ze,disabled:ts,image:es,info:ss,name:ns,buttons:os,modal:is,link:rs,modalOptions:cs},as=h.forwardRef((x,i)=>{const{activeItem:e,setActiveItem:n,popupPosition:o,modalOptions:r,setIsOpenModal:c}=x;return t.jsxRuntimeExports.jsxs("div",{ref:i,className:V.modal,onClick:s=>{s.stopPropagation()},style:{top:`${o.top}px`,left:`${o.left}px`},children:[t.jsxRuntimeExports.jsxs("div",{className:V.top,children:[t.jsxRuntimeExports.jsx("h3",{className:V.title,children:e.name}),t.jsxRuntimeExports.jsx(t.Icon,{name:"X",height:20,width:20,hoverable:!0,onClick:()=>{n(null),c(!1)}})]}),t.jsxRuntimeExports.jsx("div",{className:V.modalOptions,children:r.map(s=>{if(s.type==="image")return t.jsxRuntimeExports.jsx(t.ChooseImage,{label:"Put up an attractive image",activeImage:e[s.field],onChange:a=>{const u={...e,[s.field]:a};n(u)}},String(s.field));if(s.type==="text")return t.jsxRuntimeExports.jsx(pt,{typesText:e[s.field.type],setTypesText:a=>{const u={...e,[s.field.type]:a};n(u)},text:e[s.field.text]||"",setText:a=>{const u={...e,[s.field.text]:a};n(u)},subtitle:s.label});if(s.type==="input")return t.jsxRuntimeExports.jsx(t.Input,{onChange:a=>{const u={...e,[s.field]:a};n(u)},value:e[s.field]||"",label:s.label,placeholder:s.placeholder});if(s.type==="inputSwitch")return t.jsxRuntimeExports.jsxs("div",{className:V.link,children:[t.jsxRuntimeExports.jsx(t.Input,{onChange:a=>{const u={...e,[s.field.text]:a};n(u)},value:e[s.field.text]||"",label:s.inputLabel,placeholder:s.placeholder}),t.jsxRuntimeExports.jsx(t.Switch,{current:!!e[s.field.switch]||!1,label:s.switchLabel,onChange:a=>{const u={...e,[s.field.switch]:a};n(u)}})]});if(s.type==="select")return t.jsxRuntimeExports.jsx(t.Select,{options:s.itemsOptions,onChange:a=>{const u={...e,[s.field]:a};n(u)},label:s.label,value:e[s.field]||"String",leftAddon:s.leftAddon&&s.leftAddon==="icon"&&t.jsxRuntimeExports.jsx(t.Icon,{name:e[s.field]})})})})]})}),ls=x=>{const{index:i,moveProduct:e,children:n}=x,[,o]=t.useDrop({accept:"product",hover(s){s.index!==i&&(e(s.index,i),s.index=i)}}),[{isDragging:r},c]=t.useDrag({type:"product",item:{index:i},collect:s=>({isDragging:s.isDragging()})});return t.jsxRuntimeExports.jsx("div",{ref:s=>c(o(s)),className:`${V.product} ${r?V.dragging:""}`,children:n})},us=x=>{const{isActiveItems:i,setIsActiveItems:e,items:n,setItems:o,other:r,title:c,subtitle:s,editable:a=!0,draggable:u=!1,withImage:E=!1,deletable:l=!0,addable:C=!0,itemsType:m,itemsPlaceholder:_="",itemsOptions:p,hasRangeSelector:T=!1,rangeSelectorOptions:D,modalOptions:S,addableOptions:P={}}=x,[$,w]=h.useState(null),[j,f]=h.useState({top:0,left:0}),[L,v]=h.useState(null),b=h.useRef(null),[I,A]=h.useState(!1),O=(g,B)=>{const d=[...n],[N]=d.splice(g,1);d.splice(B,0,N),o(d)};h.useEffect(()=>{const g=()=>{w(null),A(!1)};return document.body.addEventListener("click",g),w(null),A(!1),()=>{w(null),A(!1),document.body.removeEventListener("click",g)}},[]),h.useEffect(()=>{if($){const g=[...n].map(B=>B.id===$.id?$:B);o(g)}},[$]),h.useEffect(()=>{if(b.current&&L){const g=b.current.getBoundingClientRect().height,B=window.innerHeight;let d=L.top;d+g>B+window.scrollY&&(d=B+window.scrollY-g-200),d<0&&(d=10),f({top:d,left:L.left})}},[b.current,L]);const F=(g,B)=>{g.stopPropagation();const d=g.target.getBoundingClientRect();v({top:d.top+window.scrollY,left:d.left-30}),w(B),A(!0)};function J(g){if(E)return g?t.jsxRuntimeExports.jsx("img",{src:`https://imagedelivery.net/${g[0]}/w=1000`,alt:"image",width:16,height:16}):t.jsxRuntimeExports.jsx(t.Icon,{name:"Image",width:16,height:16,fill:"#757575"})}const Z=(g,B)=>{var N;const d=t.jsxRuntimeExports.jsxs(t.jsxRuntimeExports.Fragment,{children:[u&&t.jsxRuntimeExports.jsx("div",{children:t.jsxRuntimeExports.jsx(t.Icon,{name:"DotsSixVertical",hoverable:!0,width:20,height:20})}),m==="select"&&t.jsxRuntimeExports.jsx(t.Select,{onChange:R=>{const q=[...n].map(U=>U.id===g.id?{...g,name:R}:U);w({...g,name:R}),o([...q])},value:g.name,options:p.filter(R=>!n.find(Y=>Y.name===R)),leftAddon:J(g.images)}),m==="input"&&t.jsxRuntimeExports.jsx(t.Input,{onChange:R=>{const q=[...n].map(U=>U.id===g.id?{...g,name:R}:U);o([...q])},value:g.name,placeholder:_}),m==="image"&&t.jsxRuntimeExports.jsx(t.ChooseImage,{onChange:R=>{const q=[...n].map(U=>U.id===g.id?{...g,images:R}:U);o([...q])},activeImage:(N=n.find(R=>R.id===g.id))==null?void 0:N.images[0]}),t.jsxRuntimeExports.jsxs("div",{className:V.buttons,children:[a&&t.jsxRuntimeExports.jsx(t.Icon,{name:"Sliders",hoverable:!0,width:20,height:20,onClick:R=>F(R,g)}),l&&t.jsxRuntimeExports.jsx(t.Icon,{name:"Trash",hoverable:!0,width:20,height:20,fill:"#C12A2A",onClick:()=>o(n.filter(R=>R.id!==g.id))})]})]});return u?t.jsxRuntimeExports.jsx(ls,{product:g,index:B,moveProduct:O,children:d},g.id):t.jsxRuntimeExports.jsx("div",{className:V.product,children:d},g.id)};return t.jsxRuntimeExports.jsxs("div",{className:V.productsBlock,children:[(c||i!==void 0)&&t.jsxRuntimeExports.jsxs("div",{className:V.top,children:[c&&t.jsxRuntimeExports.jsx("h3",{className:V.title,children:c}),i!==void 0&&t.jsxRuntimeExports.jsx(t.Switch,{current:i,onChange:g=>e==null?void 0:e(g)})]}),$&&a&&S&&I&&t.jsxRuntimeExports.jsx(as,{ref:b,activeItem:$,setActiveItem:w,popupPosition:j,modalOptions:S,setIsOpenModal:A}),T&&D&&t.jsxRuntimeExports.jsx(lt,{...D}),t.jsxRuntimeExports.jsxs("div",{className:V.products,children:[s&&t.jsxRuntimeExports.jsx("h5",{className:V.subtitle,children:s}),u?t.jsxRuntimeExports.jsx(t.DndProvider,{backend:t.HTML5Backend,children:n.map((g,B)=>Z(g,B))}):n.map((g,B)=>Z(g,B)),C&&t.jsxRuntimeExports.jsxs(t.Button,{withoutHover:!0,className:V.button,size:"s",onClick:()=>{const g=[...n];let B=null;if(p){for(let d=0;d<p.length;d++)if(!n.find(N=>N.name===p[d])){B=p[d];break}}m==="select"?g.push({name:B||p[0],id:t.v4(),...P}):m==="input"?g.push({name:"",id:t.v4(),...P}):g.push({name:`Image ${n.length+1}`,id:t.v4(),...P}),o(g)},children:[t.jsxRuntimeExports.jsx("span",{children:"Add Option"}),t.jsxRuntimeExports.jsx(t.Icon,{name:"Plus",width:16,height:16})]})]}),r!==void 0&&t.jsxRuntimeExports.jsx(at,{items:r})]})},xs="_title_dkxs6_1",ds="_subtitle_dkxs6_5",ps="_header_dkxs6_12",ms="_text_dkxs6_13",hs="_productsBlock_dkxs6_14",_s="_buttonsBlock_dkxs6_15",js="_top_dkxs6_26",gs="_itemsBlock_dkxs6_35",fs="_typeTexts_dkxs6_41",bs="_block_dkxs6_48",vs="_active_dkxs6_60",Es="_products_dkxs6_14",Rs="_product_dkxs6_14",ys="_button_dkxs6_15",Is="_image_dkxs6_90",ks="_info_dkxs6_97",$s="_name_dkxs6_109",ws="_buttons_dkxs6_15",Ns="_modal_dkxs6_120",Cs="_other_dkxs6_140",Ss="_options_dkxs6_146",tt={title:xs,subtitle:ds,header:ps,text:ms,productsBlock:hs,buttonsBlock:_s,top:js,itemsBlock:gs,typeTexts:fs,block:bs,active:vs,products:Es,product:Rs,button:ys,image:Is,info:ks,name:$s,buttons:ws,modal:Ns,other:Cs,options:Ss},Bs=h.forwardRef((x,i)=>{const{activeButton:e,setActiveButton:n,popupPosition:o}=x,[r,c]=h.useState(e.typesText),[s,a]=h.useState(e.destination),[u,E]=h.useState(e.link||""),[l,C]=h.useState(e.text||"");return h.useEffect(()=>{n({...e,...{text:l,link:u,destination:s,typesText:r}})},[r,s,u,l]),t.jsxRuntimeExports.jsxs("div",{className:tt.modal,onClick:m=>{m.stopPropagation()},style:{top:`${o.top}px`,left:`${o.left}px`},ref:i,children:[t.jsxRuntimeExports.jsxs("div",{className:tt.top,children:[t.jsxRuntimeExports.jsx("h3",{className:tt.title,children:e.type}),t.jsxRuntimeExports.jsx(t.Icon,{name:"X",height:20,width:20,hoverable:!0,onClick:()=>n(null)})]}),t.jsxRuntimeExports.jsxs("div",{className:tt.options,children:[t.jsxRuntimeExports.jsx(t.Select,{label:"Destination",onChange:m=>a(m),options:["Go to Page","Open Link"],value:s}),s==="Go to Page"?t.jsxRuntimeExports.jsx(t.Select,{label:"Go to",onChange:()=>{},options:[],value:"Homepage"}):t.jsxRuntimeExports.jsx(t.Input,{onChange:m=>E(m),value:u,placeholder:"https://",label:"Link"}),t.jsxRuntimeExports.jsx(t.Switch,{current:!1,label:"Open in new tab"}),t.jsxRuntimeExports.jsx(t.Textarea,{onChange:m=>C(m),value:l,label:"Text",maxLength:150}),t.jsxRuntimeExports.jsx(dt,{typesText:r,setTypesText:c})]})]})}),Ts="_subtitle_m8qel_1",Ps="_header_m8qel_8",As="_text_m8qel_9",Os="_productsBlock_m8qel_10",qs="_buttonsBlock_m8qel_11",Ds="_top_m8qel_23",Ls="_itemsBlock_m8qel_32",Ms="_typeTexts_m8qel_38",Hs="_block_m8qel_45",Fs="_active_m8qel_58",Vs="_products_m8qel_10",Us="_product_m8qel_10",zs="_button_m8qel_11",Ys="_image_m8qel_88",Gs="_info_m8qel_95",Ws="_name_m8qel_107",Xs="_buttons_m8qel_11",Js="_modal_m8qel_118",Qs="_other_m8qel_137",Ks="_options_m8qel_143",nt={subtitle:Ts,header:Ps,text:As,productsBlock:Os,buttonsBlock:qs,top:Ds,itemsBlock:Ls,typeTexts:Ms,block:Hs,active:Fs,products:Vs,product:Us,button:zs,image:Ys,info:Gs,name:Ws,buttons:Xs,modal:Js,other:Qs,options:Ks},_t=x=>{const{buttons:i,setButtons:e,deletable:n=!0,addable:o=!0}=x,[r,c]=h.useState(null),[s,a]=h.useState({top:0,left:0}),[u,E]=h.useState(null),l=h.useRef(null);h.useEffect(()=>{const m=()=>{c(null)};return document.body.addEventListener("click",m),c(null),()=>{c(null),document.body.removeEventListener("click",m)}},[]),h.useEffect(()=>{if(r){const m=[...i].map(_=>_.id===r.id?r:_);e(m)}},[r]),h.useEffect(()=>{if(l.current&&u){const m=l.current.getBoundingClientRect().height,_=window.innerHeight;let p=u.top;p+m>_+window.scrollY&&(p=_+window.scrollY-m-200),p<0&&(p=10),a({top:p,left:u.left})}},[l.current,u]);const C=(m,_)=>{m.stopPropagation();const p=m.target.getBoundingClientRect();E({top:p.top+window.scrollY,left:p.left-30}),c(_)};return t.jsxRuntimeExports.jsxs("div",{className:nt.products,children:[t.jsxRuntimeExports.jsx("h5",{className:nt.subtitle,children:"Button Type"}),i.map(m=>t.jsxRuntimeExports.jsxs("div",{className:nt.product,children:[t.jsxRuntimeExports.jsx(t.Select,{onChange:_=>{const T=[...i].map(D=>D.id===m.id?{...m,type:_}:D);e(T)},value:m.type,options:["Primary","Secondary","Tertiary"]}),t.jsxRuntimeExports.jsxs("div",{className:nt.buttons,children:[t.jsxRuntimeExports.jsx(t.Icon,{name:"Sliders",hoverable:!0,width:20,height:20,onClick:_=>{C(_,m)}}),n&&t.jsxRuntimeExports.jsx(t.Icon,{name:"Trash",hoverable:!0,onClick:()=>{const _=i.filter(p=>p.id!==m.id);e(_)},width:20,height:20,fill:"#C12A2A"})]})]},m.id)),r&&t.jsxRuntimeExports.jsx(Bs,{ref:l,activeButton:r,setActiveButton:c,popupPosition:s}),o&&t.jsxRuntimeExports.jsxs(t.Button,{withoutHover:!0,className:nt.button,size:"s",onClick:()=>{const m=[...i];m.push({type:"Primary",id:t.v4(),typesText:[],destination:"Go to Page",text:"Button Name"}),e(m)},children:[t.jsxRuntimeExports.jsx("span",{children:"Add Option"}),t.jsxRuntimeExports.jsx(t.Icon,{name:"Plus",width:16,height:16})]})]})},Zs=x=>{const{isActiveButtons:i,setIsActiveButtons:e,buttons:n,setButtons:o}=x;return t.jsxRuntimeExports.jsx(t.jsxRuntimeExports.Fragment,{children:t.jsxRuntimeExports.jsxs("div",{className:tt.buttonsBlock,children:[t.jsxRuntimeExports.jsxs("div",{className:tt.top,children:[t.jsxRuntimeExports.jsx("h3",{className:tt.title,children:"Buttons"}),t.jsxRuntimeExports.jsx(t.Switch,{current:i,onChange:r=>e(r)})]}),t.jsxRuntimeExports.jsx(_t,{buttons:n,setButtons:o})]})})},tn="_wrapper_m18qi_1",en="_subtitle_m18qi_7",sn="_content_m18qi_14",nn="_range_m18qi_22",on="_track_m18qi_27",rn="_progress_m18qi_36",cn="_dots_m18qi_46",an="_dot_m18qi_46",ln="_active_m18qi_65",un="_input_m18qi_77",xn="_countBlock_m18qi_91",dn="_count_m18qi_91",pn="_controls_m18qi_107",mn="_button_m18qi_113",M={wrapper:tn,subtitle:en,content:sn,range:nn,track:on,progress:rn,dots:cn,dot:an,active:ln,input:un,countBlock:xn,count:dn,controls:pn,button:mn},lt=x=>{const{label:i,min:e=1,max:n=4,step:o=1,count:r,setCount:c}=x,[s,a]=h.useState(!1),u=Array.from({length:(n-e)/o+1}),E=(r-e)/(n-e)*100,l=()=>{r<n&&c(r+o)},C=()=>{r>e&&c(r-o)},m=_=>{const p=e+_*o;c(p)};return t.jsxRuntimeExports.jsxs("div",{className:M.wrapper,children:[i&&t.jsxRuntimeExports.jsx("h5",{className:M.subtitle,children:i}),t.jsxRuntimeExports.jsxs("div",{className:M.content,children:[t.jsxRuntimeExports.jsxs("div",{className:M.range,children:[t.jsxRuntimeExports.jsx("div",{className:M.track}),t.jsxRuntimeExports.jsx("div",{className:M.progress,style:{width:`${E}%`}}),t.jsxRuntimeExports.jsx("div",{className:M.dots,children:u.map((_,p)=>{const T=p<=(r-e)/o;return t.jsxRuntimeExports.jsx("button",{onClick:()=>m(p),className:t.clx(M.dot,{[M.active]:T,[M.inactive]:!T,[M.dragging]:s}),"aria-label":`Set value to ${e+p*o}`},p)})}),t.jsxRuntimeExports.jsx("input",{type:"range",min:e,max:n,step:o,value:r,onChange:_=>c(Number(_.target.value)),onMouseDown:()=>a(!0),onMouseUp:()=>a(!1),onTouchStart:()=>a(!0),onTouchEnd:()=>a(!1),className:M.input})]}),t.jsxRuntimeExports.jsxs("div",{className:M.countBlock,children:[t.jsxRuntimeExports.jsx(t.Input,{type:"number",min:e,max:n,paddingless:!0,onChange:_=>{const p=Number(_);p>n?c(n):p<e?c(e):c(p)},value:String(r)}),t.jsxRuntimeExports.jsxs("div",{className:M.controls,children:[t.jsxRuntimeExports.jsx("button",{onClick:l,disabled:r>=n,className:M.button,"aria-label":"Increment count",children:t.jsxRuntimeExports.jsx(t.Icon,{name:"CaretUp",width:15,height:15})}),t.jsxRuntimeExports.jsx("button",{onClick:C,disabled:r<=e,className:M.button,"aria-label":"Decrement count",children:t.jsxRuntimeExports.jsx(t.Icon,{name:"CaretDown",width:15,height:15})})]})]})]})]})},hn="_title_1hw31_1",_n="_subtitle_1hw31_5",jn="_header_1hw31_12",gn="_text_1hw31_13",fn="_productsBlock_1hw31_14",bn="_top_1hw31_26",vn="_itemsBlock_1hw31_35",En="_typeTexts_1hw31_41",Rn="_block_1hw31_48",yn="_active_1hw31_61",In="_products_1hw31_14",kn="_product_1hw31_14",$n="_button_1hw31_80",wn="_image_1hw31_91",Nn="_info_1hw31_98",Cn="_name_1hw31_110",Sn="_buttons_1hw31_114",Bn="_modal_1hw31_121",Tn="_link_1hw31_141",Pn="_modalOptions_1hw31_147",z={title:hn,subtitle:_n,header:jn,text:gn,productsBlock:fn,top:bn,itemsBlock:vn,typeTexts:En,block:Rn,active:yn,products:In,product:kn,button:$n,image:wn,info:Nn,name:Cn,buttons:Sn,modal:Bn,link:Tn,modalOptions:Pn},An=x=>{const{activeItem:i,setActiveItem:e,popupPosition:n,setIsOpenModal:o,itemsOptions:r}=x,c=r.find(a=>a.id===i.listingId);if(!c)return null;function s(a,u){return a.length>u?`${a.slice(0,u)}...`:a}return t.jsxRuntimeExports.jsxs("div",{className:z.modal,onClick:a=>{a.stopPropagation()},style:{top:`${n.top}px`,left:`${n.left}px`},children:[t.jsxRuntimeExports.jsxs("div",{className:z.top,children:[t.jsxRuntimeExports.jsx("h3",{children:s(c.productData.name,20)}),t.jsxRuntimeExports.jsx(t.Icon,{name:"X",height:20,width:20,hoverable:!0,onClick:()=>{o(!1),e(null)}})]}),t.jsxRuntimeExports.jsx("div",{className:z.modalOptions,children:t.jsxRuntimeExports.jsx(t.ChooseImage,{label:"Put up an attractive image",activeImage:c.productData.images.length>0?c.productData.images[0].cfId:void 0,onChange:a=>{const u={...i,image:a[0]};e(u)}})})]})},On=x=>{const{index:i,moveProduct:e,children:n}=x,[,o]=t.useDrop({accept:"product",hover(s){s.index!==i&&(e(s.index,i),s.index=i)}}),[{isDragging:r},c]=t.useDrag({type:"product",item:{index:i},collect:s=>({isDragging:s.isDragging()})});return t.jsxRuntimeExports.jsx("div",{ref:s=>c(o(s)),className:`${z.product} ${r?z.dragging:""}`,children:n})},qn=x=>{const{isActiveItems:i,setIsActiveItems:e,items:n,setItems:o,other:r,title:c,subtitle:s,editable:a=!0,draggable:u=!1,withImage:E=!1,deletable:l=!0,addable:C=!0,itemsType:m,itemsOptions:_}=x,[p,T]=h.useState(null),[D,S]=h.useState({top:0,left:0}),[P,$]=h.useState(!1),w=(v,b)=>{const I=[...n],[A]=I.splice(v,1);I.splice(b,0,A),o(I)};h.useEffect(()=>{const v=()=>{T(null),$(!1)};return document.body.addEventListener("click",v),T(null),$(!1),()=>{T(null),$(!1),document.body.removeEventListener("click",v)}},[]),h.useEffect(()=>{if(p){const v=[...n].map(b=>b.listingId===p.listingId?p:b);o(v)}},[p]);const j=(v,b)=>{v.stopPropagation();const I=v.target.getBoundingClientRect(),A=100,O=window.innerHeight;let F=I.top+window.scrollY;F+A>O&&(F=O-A-20),$(!0),S({top:F-80,left:I.left-30}),T(b)};function f(v){if(E)return v?t.jsxRuntimeExports.jsx("img",{src:`https://imagedelivery.net/${v}/w=1000`,alt:"image",width:16,height:16}):t.jsxRuntimeExports.jsx(t.Icon,{name:"Image",width:16,height:16,fill:"#757575"})}const L=(v,b)=>{const I=_.find(O=>v.listingId===O.id);if(!I)return null;const A=t.jsxRuntimeExports.jsxs(t.jsxRuntimeExports.Fragment,{children:[u&&t.jsxRuntimeExports.jsx("div",{children:t.jsxRuntimeExports.jsx(t.Icon,{name:"DotsSixVertical",hoverable:!0,width:20,height:20})},b),m==="select"&&t.jsxRuntimeExports.jsx(t.Select,{onChange:O=>{const F=[...n],J=_.find(B=>B.productData.name===O);if(!J)return;const Z={listingId:J.id,image:J.productData.images.length>0?J.productData.images[0].cfId:""},g=F.map(B=>B.listingId===v.listingId?Z:B);T(Z),o([...g])},value:I.productData.name,options:[..._.filter(O=>!n.find(F=>F.listingId===O.id)).map(O=>O.productData.name)],leftAddon:f(v.image||I.productData.images.length>0&&I.productData.images[0].cfId||"")},b),t.jsxRuntimeExports.jsxs("div",{className:z.buttons,children:[a&&t.jsxRuntimeExports.jsx(t.Icon,{name:"Sliders",hoverable:!0,width:20,height:20,onClick:O=>j(O,v)}),l&&t.jsxRuntimeExports.jsx(t.Icon,{name:"Trash",hoverable:!0,width:20,height:20,fill:"#C12A2A",onClick:()=>o(n.filter(O=>O!==v))})]})]});return u?t.jsxRuntimeExports.jsx(On,{product:v,index:b,moveProduct:w,children:A},v.listingId):t.jsxRuntimeExports.jsx("div",{className:z.product,children:A},v.listingId)};return t.jsxRuntimeExports.jsxs("div",{className:z.productsBlock,children:[(c||i!==void 0)&&t.jsxRuntimeExports.jsxs("div",{className:z.top,children:[c&&t.jsxRuntimeExports.jsx("h3",{className:z.title,children:c}),i!==void 0&&t.jsxRuntimeExports.jsx(t.Switch,{current:i,onChange:v=>e==null?void 0:e(v)})]}),P&&p&&t.jsxRuntimeExports.jsx(An,{activeItem:p,setActiveItem:T,setIsOpenModal:$,popupPosition:D,itemsOptions:_}),t.jsxRuntimeExports.jsxs("div",{className:z.products,children:[s&&t.jsxRuntimeExports.jsx("h5",{className:z.subtitle,children:s}),u?t.jsxRuntimeExports.jsx(t.DndProvider,{backend:t.HTML5Backend,children:n.map((v,b)=>L(v,b))}):n.map((v,b)=>L(v,b)),C&&t.jsxRuntimeExports.jsxs(t.Button,{withoutHover:!0,className:z.button,size:"s",onClick:()=>{const v=[...n];for(let b=0;b<_.length;b++)if(!n.find(I=>I.listingId===_[b].id)){v.push({listingId:_[b].id,image:_[b].productData.images.length>0?_[b].productData.images[0].cfId:""});break}o(v)},disabled:n.length===_.length,children:[t.jsxRuntimeExports.jsx("span",{children:"Add Option"}),t.jsxRuntimeExports.jsx(t.Icon,{name:"Plus",width:16,height:16})]})]}),r!==void 0&&t.jsxRuntimeExports.jsx(at,{items:r})]})},Dn="_options_1w11v_1",Ln="_price_1w11v_12",Mn="_oldPrice_1w11v_19",Hn="_newPrice_1w11v_27",Fn="_animate_1w11v_34",Vn="_appearAndBounce_1w11v_1",Un="_meta_1w11v_52",zn="_info_1w11v_58",Yn="_infoRight_1w11v_66",Gn="_buttons_1w11v_73",Wn="_variants_1w11v_80",Xn="_variant_1w11v_80",Jn="_stock_1w11v_97",Qn="_variantInfo_1w11v_104",Kn="_quantity_1w11v_110",Zn="_count_1w11v_117",to="_focused_1w11v_134",eo="_button_1w11v_73",so="_activeVariant_1w11v_160",no="_chargeTypes_1w11v_164",oo="_charge_1w11v_164",io="_chargeActive_1w11v_185",ro="_title_1w11v_190",k={options:Dn,price:Ln,oldPrice:Mn,newPrice:Hn,animate:Fn,appearAndBounce:Vn,meta:Un,info:zn,infoRight:Yn,buttons:Gn,variants:Wn,variant:Xn,stock:Jn,variantInfo:Qn,quantity:Kn,count:Zn,focused:to,button:eo,activeVariant:so,chargeTypes:no,charge:oo,chargeActive:io,title:ro};var jt=(x=>(x.ONE_TIME="One-Time",x.RECURRING="Subscribe & Save",x))(jt||{});const co=x=>{var $,w;const{variants:i}=x,[e,n]=h.useState(i[0]),[o,r]=h.useState(e.chargeTypes[0]),c=t.useNavigate(),[s,a]=h.useState(1),[u,E]=h.useState(!1),{reset:l,addProductToCart:C,getProducts:m}=t.useCart(),[_,p]=h.useState(!1);h.useEffect(()=>{p(!0);const j=setTimeout(()=>p(!1),600);return()=>clearTimeout(j)},[s]);async function T(){await m(),await C({productId:x.id,productVariantId:e.id,quantity:s})}function D(){l(),T(),c("/checkout")}function S(j){if(j>=864e5){const I=Math.floor(j/864e5);return`${I} ${I===1?"day":"days"}`}else if(j>=36e5){const I=Math.floor(j/36e5);return`${I} ${I===1?"hour":"hours"}`}else if(j>=6e4){const I=Math.floor(j/6e4);return`${I} ${I===1?"minute":"minutes"}`}else{const I=Math.floor(j/1e3);return`${I} ${I===1?"second":"seconds"}`}}function P(j,f){return j.length>f?j.slice(0,f)+"...":j}return t.jsxRuntimeExports.jsxs("div",{className:k.options,children:[e.chargeTypes.length>1&&t.jsxRuntimeExports.jsx("div",{className:k.chargeTypes,children:e.chargeTypes.map(j=>t.jsxRuntimeExports.jsx("div",{className:t.clx(k.charge,{[k.chargeActive]:o===j}),onClick:()=>r(j),children:jt[j]},j))}),t.jsxRuntimeExports.jsx("div",{className:k.variants,children:i.map(j=>{var f;return t.jsxRuntimeExports.jsxs("div",{className:t.clx(k.variant,{[k.activeVariant]:e.id===j.id}),onClick:()=>n(j),children:[t.jsxRuntimeExports.jsxs("div",{className:k.variantInfo,children:[t.jsxRuntimeExports.jsx("span",{className:k.title,children:P(j.name,15)}),t.jsxRuntimeExports.jsxs("span",{children:["$",o==="ONE_TIME"?j.price.amount:j.subscriptionSettings?j.subscriptionSettings.price.amount:"Price Not Found"]})]}),t.jsxRuntimeExports.jsx("div",{children:o==="ONE_TIME"&&t.jsxRuntimeExports.jsxs("span",{className:k.stock,children:[((f=j.quantity.restrictions)==null?void 0:f.max)||j.quantity.available||0," in stock"]})})]},j.id)})}),o==="ONE_TIME"&&t.jsxRuntimeExports.jsxs("div",{className:k.quantity,children:[t.jsxRuntimeExports.jsx("button",{onClick:()=>{s>1?a(j=>j-1):a(1)},className:k.button,disabled:e.quantity.restrictions&&s<=e.quantity.restrictions.min,children:t.jsxRuntimeExports.jsx(t.Icon,{name:"Minus"})}),t.jsxRuntimeExports.jsx("label",{className:t.clx(k.count,{[k.focused]:u}),onFocus:()=>E(!0),onBlur:()=>E(!1),children:t.jsxRuntimeExports.jsx(t.Input,{type:"number",value:String(s),onChange:j=>a(Number(j)),max:(($=e.quantity.restrictions)==null?void 0:$.max)||e.quantity.available||1/0,min:((w=e.quantity.restrictions)==null?void 0:w.min)||0,style:{backgroundColor:"transparent",border:"none",textAlign:"center"}})}),t.jsxRuntimeExports.jsx("button",{onClick:()=>{a(j=>j+1)},className:k.button,disabled:!!(e.quantity.restrictions&&s>=e.quantity.restrictions.max||e.quantity.available&&s>=e.quantity.available),children:t.jsxRuntimeExports.jsx(t.Icon,{name:"Plus"})})]}),t.jsxRuntimeExports.jsxs("div",{className:k.meta,children:[t.jsxRuntimeExports.jsxs("div",{className:k.info,children:[t.jsxRuntimeExports.jsx("span",{children:"Delivery"}),t.jsxRuntimeExports.jsxs("div",{className:k.infoRight,children:[t.jsxRuntimeExports.jsx(t.Icon,{name:"Lightning",fill:"#FF3F19",width:20,height:20}),t.jsxRuntimeExports.jsx("span",{children:!e.deliveryTime||e.deliveryTime===0?"Instant":S(e.deliveryTime)})]})]}),t.jsxRuntimeExports.jsxs("div",{className:k.info,children:[t.jsxRuntimeExports.jsx("span",{children:"Price"}),t.jsxRuntimeExports.jsx("div",{className:k.infoRight,children:o==="ONE_TIME"?e.compareAtPrice&&(e.compareAtPrice.amount||0)-(e.price.amount||0)>0?t.jsxRuntimeExports.jsxs("div",{className:k.price,children:[t.jsxRuntimeExports.jsxs("span",{className:t.clx(k.newPrice,{[k.animate]:_}),children:["$ ",(e.price.amount||0)*s]}),t.jsxRuntimeExports.jsxs("span",{className:k.oldPrice,children:["$ ",(e.compareAtPrice.amount||0)*s]})]}):t.jsxRuntimeExports.jsxs("span",{className:t.clx(k.newPrice,{[k.animate]:_}),children:["$ ",(e.price.amount||0)*s]}):e.subscriptionSettings&&e.subscriptionSettings.compareAtPrice&&(e.subscriptionSettings.compareAtPrice.amount||0)-(e.subscriptionSettings.price.amount||0)>0?t.jsxRuntimeExports.jsxs("div",{className:k.price,children:[t.jsxRuntimeExports.jsxs("span",{className:t.clx(k.newPrice,{[k.animate]:_}),children:["$ ",e.subscriptionSettings.price.amount||0]}),t.jsxRuntimeExports.jsxs("span",{className:k.oldPrice,children:["$ ",e.subscriptionSettings.compareAtPrice.amount||0]})]}):e.subscriptionSettings&&t.jsxRuntimeExports.jsxs("span",{className:t.clx(k.newPrice,{[k.animate]:_}),children:["$ ",e.subscriptionSettings.price.amount||0]})})]})]}),t.jsxRuntimeExports.jsxs("div",{className:k.buttons,children:[t.jsxRuntimeExports.jsx(t.Button,{type:"Primary",onClick:()=>D(),children:t.jsxRuntimeExports.jsx("span",{children:o==="ONE_TIME"?"Buy Now":"Subscribe Now"})}),o==="ONE_TIME"&&t.jsxRuntimeExports.jsx(t.Button,{type:"Secondary",onClick:()=>T(),children:"Add to Cart"})]})]})},ao="_button_1x9be_1",lo="_login_1x9be_14",uo="_signUp_1x9be_18",xo="_buttons_1x9be_23",po="_modal_1x9be_32",mo="_info_1x9be_48",ho="_top_1x9be_55",_o="_title_1x9be_66",jo="_clear_1x9be_72",go="_activeClear_1x9be_79",fo="_count_1x9be_83",bo="_cart_1x9be_98",vo="_empty_1x9be_106",Eo="_product_1x9be_132",Ro="_products_1x9be_141",yo="_image_1x9be_149",Io="_productInfo_1x9be_155",ko="_content_1x9be_162",$o="_name_1x9be_168",wo="_price_1x9be_174",No="_productButtons_1x9be_180",Co="_productButton_1x9be_180",So="_productCount_1x9be_200",Bo="_bottom_1x9be_216",To="_subtotal_1x9be_224",Po="_block_1x9be_232",Ao="_shoppingCount_1x9be_239",Oo="_total_1x9be_259",qo="_link_1x9be_265",Do="_userInfo_1x9be_272",y={button:ao,login:lo,signUp:uo,buttons:xo,modal:po,info:mo,top:ho,title:_o,clear:jo,activeClear:go,count:fo,cart:bo,empty:vo,product:Eo,products:Ro,image:yo,productInfo:Io,content:ko,name:$o,price:wo,productButtons:No,productButton:Co,productCount:So,bottom:Bo,subtotal:To,block:Po,shoppingCount:Ao,total:Oo,link:qo,userInfo:Do},Lo="_button_15mga_1",Mo="_primary_15mga_19",Ho="_secondary_15mga_24",Fo="_tertiary_15mga_29",Vo="_content_15mga_34",ot={button:Lo,primary:Mo,secondary:Ho,tertiary:Fo,content:Vo},gt=x=>{const{children:i,onClick:e,style:n,className:o,disabled:r=!1,type:c="Primary"}=x;return t.jsxRuntimeExports.jsx("button",{className:t.clx(ot.button,o,{[ot.primary]:c==="Primary",[ot.secondary]:c==="Secondary",[ot.tertiary]:c==="Tertiary"}),onClick:e,style:{...n},disabled:r,children:c==="Tertiary"?t.jsxRuntimeExports.jsxs("div",{className:ot.content,children:[t.jsxRuntimeExports.jsx(t.Icon,{name:"ArrowRight",fill:"#757575",width:20,height:20}),i]}):t.jsxRuntimeExports.jsx(t.jsxRuntimeExports.Fragment,{children:i})})};class rt extends Error{}rt.prototype.name="InvalidTokenError";function Uo(x){return decodeURIComponent(atob(x).replace(/(.)/g,(i,e)=>{let n=e.charCodeAt(0).toString(16).toUpperCase();return n.length<2&&(n="0"+n),"%"+n}))}function zo(x){let i=x.replace(/-/g,"+").replace(/_/g,"/");switch(i.length%4){case 0:break;case 2:i+="==";break;case 3:i+="=";break;default:throw new Error("base64 string is not of the correct length")}try{return Uo(i)}catch{return atob(i)}}function Yo(x,i){if(typeof x!="string")throw new rt("Invalid token specified: must be a string");i||(i={});const e=i.header===!0?0:1,n=x.split(".")[e];if(typeof n!="string")throw new rt(`Invalid token specified: missing part #${e+1}`);let o;try{o=zo(n)}catch(r){throw new rt(`Invalid token specified: invalid base64 for part #${e+1} (${r.message})`)}try{return JSON.parse(o)}catch(r){throw new rt(`Invalid token specified: invalid json for part #${e+1} (${r.message})`)}}const Go=x=>{const{shopping:i,signUp:e}=x,n=t.useNavigate();function o(c){n(c)}const r=JSON.parse(localStorage.getItem("token")||"{}");return t.jsxRuntimeExports.jsxs("div",{className:y.buttons,children:[i&&t.jsxRuntimeExports.jsx(ft,{}),!r.data&&t.jsxRuntimeExports.jsx("div",{className:t.clx(y.button,y.login),onClick:()=>o("/customer-dash"),children:"Login"}),!r.data&&e&&t.jsxRuntimeExports.jsx("div",{className:t.clx(y.button,y.login,y.signUp),onClick:()=>o("/customer-dash"),children:"Sign Up"}),r.data&&t.jsxRuntimeExports.jsx(Et,{token:r.data})]})},ft=()=>{const[x,i]=h.useState(!1),[e,n]=h.useState([]),{cart:o,getProducts:r}=t.useCart();function c(E){for(let l=0;l<o.parts.length;l++)for(let C=0;C<E.variants.length;C++)if(o.parts[l].productVariantId===E.variants[l].id)return o.parts[l].productVariantId}function s(E){for(let l=0;l<o.parts.length;l++)for(let C=0;C<E.variants.length;C++)if(o.parts[l].productVariantId===E.variants[l].id)return o.parts[l].quantity}h.useEffect(()=>{(async()=>{const l=o.parts.map(_=>String(_.productId)),m=(await r([...l])).map(_=>({..._,activeVariantId:c(_),quantity:s(_)}));n(m)})()},[o]);function a(E){var l;return!E||!(E!=null&&E.variants)?!1:(l=E.variants.find(C=>C.id===E.activeVariantId))==null?void 0:l.subscriptionSettings}const u=o.parts.length>0&&e.length>0&&!a(e[0]);return t.jsxRuntimeExports.jsxs(t.jsxRuntimeExports.Fragment,{children:[t.jsxRuntimeExports.jsxs("div",{className:y.button,onClick:E=>{E.stopPropagation(),i(!0)},children:[t.jsxRuntimeExports.jsx(t.Icon,{name:"Handbag",fill:"var(--icon-primary)"}),u&&t.jsxRuntimeExports.jsx("div",{className:y.shoppingCount,children:o.parts.length})]}),x&&t.jsxRuntimeExports.jsx(t.Modal,{close:i,children:t.jsxRuntimeExports.jsx(bt,{activeProducts:e,isCartNotEmpty:u})})]})},bt=x=>{const{activeProducts:i,isCartNotEmpty:e}=x,{cart:n,reset:o,getTotalAndDiscount:r,updateQuantityOfProduct:c}=t.useCart(),s=t.useNavigate();function a(l){s(l)}function u(l){c({productId:l.id,productVariantId:l.activeVariantId,quantity:l.quantity+1})}function E(l){c({productId:l.id,productVariantId:l.activeVariantId,quantity:l.quantity-1})}return t.jsxRuntimeExports.jsxs("div",{className:y.modal,onClick:l=>l.stopPropagation(),children:[t.jsxRuntimeExports.jsxs("div",{className:y.top,children:[t.jsxRuntimeExports.jsxs("div",{className:y.info,children:[t.jsxRuntimeExports.jsx("span",{className:y.title,children:"Cart"}),e&&t.jsxRuntimeExports.jsx("div",{className:y.count,children:n.parts.length})]}),t.jsxRuntimeExports.jsx("button",{className:t.clx(y.clear,{[y.activeClear]:e}),disabled:!e,onClick:()=>o(),children:"Clear all"})]}),e?t.jsxRuntimeExports.jsxs("div",{className:y.cart,children:[t.jsxRuntimeExports.jsx("div",{className:y.products,children:i.map(l=>t.jsxRuntimeExports.jsxs("div",{className:y.product,children:[t.jsxRuntimeExports.jsxs("div",{className:y.productInfo,children:[t.jsxRuntimeExports.jsx("img",{src:`https://imagedelivery.net/${l.images[0].cfId}/w=500`,alt:"image",width:"100%",height:"100%",className:y.image}),t.jsxRuntimeExports.jsxs("div",{className:y.content,children:[t.jsxRuntimeExports.jsx("div",{className:y.name,children:l.name}),t.jsxRuntimeExports.jsxs("div",{className:y.price,children:["$",l.variants.find(C=>C.id===l.activeVariantId).price.amount*((l==null?void 0:l.quantity)||1)]})]})]}),t.jsxRuntimeExports.jsxs("div",{className:y.productButtons,children:[t.jsxRuntimeExports.jsx("div",{onClick:()=>{l.quantity!==1&&E(l)},className:y.productButton,children:t.jsxRuntimeExports.jsx(t.Icon,{name:"Minus",fill:"#757575",width:20,height:20})}),t.jsxRuntimeExports.jsx("div",{className:y.productCount,children:l.quantity}),t.jsxRuntimeExports.jsx("div",{onClick:()=>u(l),className:y.productButton,children:t.jsxRuntimeExports.jsx(t.Icon,{name:"Plus",fill:"#757575",width:20,height:20})})]})]},l.id))}),t.jsxRuntimeExports.jsxs("div",{className:y.bottom,children:[t.jsxRuntimeExports.jsxs("div",{className:y.subtotal,children:[t.jsxRuntimeExports.jsxs("div",{className:y.block,children:[t.jsxRuntimeExports.jsx("span",{children:"Subtotal"}),t.jsxRuntimeExports.jsx(t.Icon,{name:"Info",width:20,height:20,fill:"#757575"})]}),t.jsxRuntimeExports.jsxs("div",{className:y.total,children:["$",r().total]})]}),t.jsxRuntimeExports.jsx(gt,{onClick:()=>a("/checkout"),children:"Checkout"})]})]}):t.jsxRuntimeExports.jsx(vt,{})]})},vt=()=>t.jsxRuntimeExports.jsxs("div",{className:y.empty,children:[t.jsxRuntimeExports.jsx("div",{children:t.jsxRuntimeExports.jsx(t.Icon,{name:"Handbag"})}),t.jsxRuntimeExports.jsx("span",{children:"Your cart is empty"}),t.jsxRuntimeExports.jsxs("span",{children:["Check out the store's products and add them"," ",t.jsxRuntimeExports.jsx("a",{href:"/products",className:y.link,children:"here"})]})]}),Et=({token:x})=>{const[i,e]=h.useState("test-email@gmail.com"),n=t.useNavigate();h.useEffect(()=>{(async()=>{const c=Yo(x);e(c.email)})()},[x]);function o(r){n(r)}return t.jsxRuntimeExports.jsx("div",{className:y.userInfo,onClick:()=>o("/customer-dash"),children:t.jsxRuntimeExports.jsx("div",{children:i||"test-email@gmail.com"})})},Wo="_share_9g414_1",Xo="_modal_9g414_8",Jo="_header_9g414_14",Qo="_socials_9g414_24",Ko="_social_9g414_24",Zo="_copy_9g414_34",ti="_title_9g414_41",ei="_copyWrapper_9g414_47",si="_copyText_9g414_56",W={share:Wo,modal:Xo,header:Jo,socials:Qo,social:Ko,copy:Zo,title:ti,copyWrapper:ei,copyText:si},ni=()=>{const{isOpenModal:x,setIsOpenModal:i}=t.useShareLinkStore();function e(){i(!0)}return t.jsxRuntimeExports.jsxs(t.jsxRuntimeExports.Fragment,{children:[t.jsxRuntimeExports.jsx(t.Button,{className:W.share,onClick:n=>{n.stopPropagation(),e()},type:"Secondary",children:t.jsxRuntimeExports.jsx(t.Icon,{name:"Share",fill:"#757575"})}),x&&t.jsxRuntimeExports.jsx(t.Modal,{close:i,children:t.jsxRuntimeExports.jsx(oi,{})})]})},mt={facebook:"FacebookLogo","x.com":"TwitterLogo",telegram:"TelegramLogo",instagram:"InstagramLogo",discord:"MessengerLogo",tiktok:"TiktokLogo"},oi=()=>{const{setIsOpenModal:x}=t.useShareLinkStore(),i=window.location.href;function e(){navigator.clipboard.writeText(i)}return t.jsxRuntimeExports.jsxs("div",{className:W.modal,onClick:n=>n.stopPropagation(),children:[t.jsxRuntimeExports.jsxs("div",{className:W.header,children:[t.jsxRuntimeExports.jsx("div",{className:W.title,children:"Share this Post"}),t.jsxRuntimeExports.jsx(t.Icon,{name:"X",fill:"#757575",onClick:()=>x(!1)})]}),t.jsxRuntimeExports.jsx("div",{className:W.socials,children:Object.keys(mt).map(n=>t.jsxRuntimeExports.jsx("div",{className:W.social,children:t.jsxRuntimeExports.jsx(t.Icon,{name:mt[n]})}))}),t.jsxRuntimeExports.jsxs("div",{className:W.copyWrapper,children:[t.jsxRuntimeExports.jsx("div",{className:t.clx(W.copy,W.copyText),onClick:e,children:i}),t.jsxRuntimeExports.jsx("div",{onClick:e,className:W.copy,children:t.jsxRuntimeExports.jsx(t.Icon,{name:"Copy"})})]})]})},ii="_accordion_9e4oa_1",ri="_header_9e4oa_9",ci="_icon_9e4oa_18",ai="_open_9e4oa_21",li="_content_9e4oa_25",it={accordion:ii,header:ri,icon:ci,open:ai,content:li},ui=({title:x,content:i})=>{const[e,n]=h.useState(!1),[o,r]=h.useState(0),c=h.useRef(null),s=()=>{n(!e)};return h.useEffect(()=>{c.current&&r(e?c.current.scrollHeight:0)},[e]),t.jsxRuntimeExports.jsxs("div",{className:it.accordion,children:[t.jsxRuntimeExports.jsxs("div",{className:it.header,onClick:s,children:[t.jsxRuntimeExports.jsx("h5",{id:"h5",children:x}),t.jsxRuntimeExports.jsx("div",{className:t.clx(it.icon,{[it.open]:e}),children:t.jsxRuntimeExports.jsx(t.Icon,{name:"CaretDown"})})]}),t.jsxRuntimeExports.jsx("div",{ref:c,className:it.content,style:{height:`${o}px`},children:t.jsxRuntimeExports.jsx("p",{id:"p",children:i})})]})},xi="_wrapper_1r14x_1",di="_label_1r14x_9",pi="_input_1r14x_18",mi="_required_1r14x_35",hi="_paddingless_1r14x_39",_i="_content_1r14x_43",ji="_borderless_1r14x_58",gi="_rightIcon_1r14x_63",K={wrapper:xi,label:di,input:pi,required:mi,paddingless:hi,content:_i,borderless:ji,rightIcon:gi},fi=x=>{const{onChange:i,style:e,label:n,value:o,type:r,min:c,max:s,placeholder:a,disabled:u=!1,required:E=!1,regex:l,paddingless:C=!1,borderless:m=!1,editable:_=!1,isSearch:p=!1}=x,{themeSettings:T}=t.useThemeSettingsStore(),{inputs:D}=T,[S,P]=h.useState(!1);function $(f,L){if(f.startsWith("#")){let I,A,O;return f.length===7?(I=parseInt(f.slice(1,3),16),A=parseInt(f.slice(3,5),16),O=parseInt(f.slice(5,7),16)):f.length===4&&(I=parseInt(f[1]+f[1],16),A=parseInt(f[2]+f[2],16),O=parseInt(f[3]+f[3],16)),`rgba(${I}, ${A}, ${O}, ${L})`}const b={black:"#000000",white:"#ffffff",red:"#ff0000",green:"#00ff00",blue:"#0000ff"}[f.toLowerCase()];return b?$(b,L):f}function w(f){return Number(f)<0?String(c):f}function j(f){return!E||!l?!0:new RegExp(l).test(f)}return t.jsxRuntimeExports.jsxs("div",{className:K.wrapper,children:[n&&t.jsxRuntimeExports.jsx("label",{className:K.label,htmlFor:n,children:n}),t.jsxRuntimeExports.jsxs("div",{className:K.content,style:{paddingRight:D.general.height+15,...e,backgroundColor:$(D.field.color,D.field.opacity/100)},children:[t.jsxRuntimeExports.jsx("input",{id:n,type:r||"text",onChange:f=>{if(r==="text")i(f.target.value);else{const L=w(f.target.value);i(L)}},value:o,autoComplete:"off",placeholder:a||"Type something...",className:t.clx(K.input,{[K.required]:S&&E&&!j(o),[K.paddingless]:C,[K.borderless]:m}),min:r==="number"?c:void 0,max:r==="number"?s:void 0,disabled:u,onFocus:()=>P(!0)}),p&&t.jsxRuntimeExports.jsx("div",{className:K.rightIcon,children:t.jsxRuntimeExports.jsx(t.Icon,{name:"MagnifyingGlass",fill:"var(--icon-secondary)",width:D.general.height,height:D.general.height})}),_&&t.jsxRuntimeExports.jsx("div",{children:t.jsxRuntimeExports.jsx(t.Icon,{name:"Sliders",width:20,height:20,hoverable:!0})})]})]})},bi="_wrapper_st58d_1",vi="_label_st58d_10",Ei="_textarea_st58d_18",Ri="_length_st58d_33",ct={wrapper:bi,label:vi,textarea:Ei,length:Ri},yi=x=>{const{onChange:i,label:e,value:n,maxLength:o,placeholder:r="Type something..."}=x,[c,s]=h.useState(n.length);return t.jsxRuntimeExports.jsxs("div",{className:ct.wrapper,children:[e&&t.jsxRuntimeExports.jsx("label",{className:ct.label,htmlFor:e,children:e}),t.jsxRuntimeExports.jsx("textarea",{id:e,defaultValue:n,onChange:a=>{s(a.target.value.length),i(a.target.value)},placeholder:r,className:ct.textarea,maxLength:o}),o&&t.jsxRuntimeExports.jsxs("div",{className:ct.length,children:[c,"/",o]})]})};exports.ChooseImage=t.ChooseImage;exports.ChooseImageModal=t.ChooseImageModal;exports.Icon=t.Icon;exports.InputSettings=t.Input;exports.Loader=t.Loader;exports.Modal=t.Modal;exports.Select=t.Select;exports.Switch=t.Switch;exports.TextareaSettings=t.Textarea;exports.Accordion=ui;exports.Button=gt;exports.ButtonTypeSettings=_t;exports.ButtonsSettings=Zs;exports.CategorySettings=Me;exports.EmptyCart=vt;exports.FormSettings=us;exports.HeaderButtons=Go;exports.InputUI=fi;exports.ItemsSettings=ht;exports.LayoutSettings=Ot;exports.ListingSelector=qn;exports.ProductOptions=co;exports.RangeSelector=lt;exports.ShareLink=ni;exports.ShoppingButton=ft;exports.ShoppingModalCart=bt;exports.TextSettings=pt;exports.TextareaUI=yi;exports.TypesText=dt;exports.UserInfo=Et;
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("./index-CZcNDk0w.cjs"),m=require("react");require("@phosphor-icons/react");const Rt="_wrapper_9rr5j_2",yt="_alignmentBlock_9rr5j_8",It="_title_9rr5j_15",kt="_subtitle_9rr5j_22",$t="_alignmentContent_9rr5j_29",wt="_alignments_9rr5j_37",Nt="_alignment_9rr5j_8",Ct="_circle_9rr5j_58",St="_paddings_9rr5j_65",Tt="_padding_9rr5j_65",Bt="_input_9rr5j_84",G={wrapper:Rt,alignmentBlock:yt,title:It,subtitle:kt,alignmentContent:$t,alignments:wt,alignment:Nt,circle:Ct,paddings:St,padding:Tt,input:Bt},Pt=["topLeft","top","topRight","left","center","right","bottomLeft","bottom","bottomRight"],At=["left","top","right","bottom"],Ot=d=>{const{alignment:i,padding:e,setPadding:n,setAlignment:o}=d;function r(){switch(i){case"left":case"topLeft":case"bottomLeft":return"TextAlignLeft";case"right":case"topRight":case"bottomRight":return"TextAlignRight";case"center":case"top":case"bottom":return"TextAlignCenter";default:return"TextAlignCenter"}}function a(s){switch(s){case"left":return"AlignLeft";case"right":return"AlignRight";case"top":return"AlignTop";case"bottom":return"AlignBottom"}}return t.jsxRuntimeExports.jsxs("div",{className:G.layout,children:[t.jsxRuntimeExports.jsx("h3",{className:G.title,children:"Layout"}),t.jsxRuntimeExports.jsxs("div",{className:G.alignmentBlock,children:[t.jsxRuntimeExports.jsx("h5",{className:G.subtitle,children:"Alignment"}),t.jsxRuntimeExports.jsxs("div",{className:G.alignmentContent,children:[t.jsxRuntimeExports.jsx("div",{className:G.alignments,children:Pt.map(s=>t.jsxRuntimeExports.jsxs("div",{onClick:()=>{o(s)},className:G.alignment,children:[s!==i&&t.jsxRuntimeExports.jsx("div",{className:G.circle}),s===i&&t.jsxRuntimeExports.jsx(t.Icon,{name:r(),fill:"#FF3F19",width:22,height:22})]},s))}),t.jsxRuntimeExports.jsx("div",{className:G.paddings,children:At.map(s=>t.jsxRuntimeExports.jsxs("label",{className:G.padding,children:[t.jsxRuntimeExports.jsx("div",{children:t.jsxRuntimeExports.jsx(t.Icon,{name:a(s),width:20,height:20})}),t.jsxRuntimeExports.jsx(t.Input,{type:"text",value:String(e[s]),onChange:c=>n({...e,[s]:Number(c)}),paddingless:!0,borderless:!0})]},s))})]})]})]})},qt="_title_18dz7_1",Dt="_subtitle_18dz7_5",Lt="_header_18dz7_12",Mt="_text_18dz7_13",Ht="_top_18dz7_21",Ft="_itemsBlock_18dz7_30",nt={title:qt,subtitle:Dt,header:Lt,text:Mt,top:Ht,itemsBlock:Ft},Vt="_typeTexts_rcw8p_1",Ut="_block_rcw8p_8",zt="_active_rcw8p_21",dt={typeTexts:Vt,block:Ut,active:zt},Yt=["bold","italic","underline","strike-through","code"],pt=d=>{const{typesText:i,setTypesText:e}=d;function n(o){switch(o){case"bold":return"TextB";case"italic":return"TextItalic";case"code":return"CodeSimple";case"strike-through":return"TextStrikethrough";case"underline":return"TextUnderline"}}return t.jsxRuntimeExports.jsx("div",{className:dt.typeTexts,children:Yt.map(o=>t.jsxRuntimeExports.jsx("div",{className:t.clx(dt.block,{[dt.active]:i.includes(o)}),onClick:()=>{const r=[...i];if(r.includes(o)){const a=r.filter(s=>s!==o);e(a)}else r.push(o),e(r)},children:t.jsxRuntimeExports.jsx(t.Icon,{name:n(o),fill:i.includes(o)?"#252525":"#757575",width:20,height:20})},String(o)))})},mt=d=>{const{typesText:i,isActiveText:e,setIsActiveText:n,text:o,setText:r,setTypesText:a,title:s,subtitle:c="Items"}=d;return t.jsxRuntimeExports.jsxs("div",{className:nt.text,children:[(s||e!==void 0)&&t.jsxRuntimeExports.jsxs("div",{className:nt.top,children:[s&&t.jsxRuntimeExports.jsx("h3",{className:nt.title,children:s}),e!==void 0&&n&&t.jsxRuntimeExports.jsx(t.Switch,{current:e,onChange:u=>n(u)})]}),t.jsxRuntimeExports.jsxs("div",{className:nt.itemsBlock,children:[t.jsxRuntimeExports.jsx("h5",{className:nt.subtitle,children:c}),t.jsxRuntimeExports.jsx(t.Textarea,{onChange:u=>r(u),value:o,maxLength:150}),t.jsxRuntimeExports.jsx(pt,{typesText:i,setTypesText:a})]})]})},Gt="_title_fyopx_1",Wt="_subtitle_fyopx_5",Xt="_header_fyopx_12",Jt="_text_fyopx_13",Qt="_productsBlock_fyopx_14",Kt="_top_fyopx_26",Zt="_itemsBlock_fyopx_35",te="_typeTexts_fyopx_41",ee="_block_fyopx_48",se="_active_fyopx_61",ne="_products_fyopx_14",oe="_product_fyopx_14",ie="_button_fyopx_80",re="_disabled_fyopx_91",ae="_image_fyopx_95",ce="_info_fyopx_102",le="_name_fyopx_114",ue="_buttons_fyopx_118",de="_modal_fyopx_125",xe="_link_fyopx_145",pe="_modalOptions_fyopx_151",H={title:Gt,subtitle:Wt,header:Xt,text:Jt,productsBlock:Qt,top:Kt,itemsBlock:Zt,typeTexts:te,block:ee,active:se,products:ne,product:oe,button:ie,disabled:re,image:ae,info:ce,name:le,buttons:ue,modal:de,link:xe,modalOptions:pe},me=m.forwardRef((d,i)=>{const{activeItem:e,setActiveItem:n,popupPosition:o,modalOptions:r,setIsOpenModal:a}=d;return t.jsxRuntimeExports.jsxs("div",{ref:i,className:H.modal,onClick:s=>{s.stopPropagation()},style:{top:`${o.top}px`,left:`${o.left}px`},children:[t.jsxRuntimeExports.jsxs("div",{className:H.top,children:[t.jsxRuntimeExports.jsx("h3",{className:H.title,children:e.name}),t.jsxRuntimeExports.jsx(t.Icon,{name:"X",height:20,width:20,hoverable:!0,onClick:()=>{n(null),a(!1)}})]}),t.jsxRuntimeExports.jsx("div",{className:H.modalOptions,children:r.map(s=>{if(s.type==="image")return t.jsxRuntimeExports.jsx(t.ChooseImage,{label:"Put up an attractive image",activeImage:e[s.field],onChange:c=>{const u={...e,[s.field]:c};n(u)}},String(s.field));if(s.type==="text")return t.jsxRuntimeExports.jsx(mt,{typesText:e[s.field.type],setTypesText:c=>{const u={...e,[s.field.type]:c};n(u)},text:e[s.field.text]||"",setText:c=>{const u={...e,[s.field.text]:c};n(u)},subtitle:s.label});if(s.type==="input")return t.jsxRuntimeExports.jsx(t.Input,{onChange:c=>{const u={...e,[s.field]:c};n(u)},value:e[s.field]||"",label:s.label,placeholder:s.placeholder});if(s.type==="inputSwitch")return t.jsxRuntimeExports.jsxs("div",{className:H.link,children:[t.jsxRuntimeExports.jsx(t.Input,{onChange:c=>{const u={...e,[s.field.text]:c};n(u)},value:e[s.field.text]||"",label:s.inputLabel,placeholder:s.placeholder}),t.jsxRuntimeExports.jsx(t.Switch,{current:!!e[s.field.switch]||!1,label:s.switchLabel,onChange:c=>{const u={...e,[s.field.switch]:c};n(u)}})]});if(s.type==="list")return t.jsxRuntimeExports.jsx(_t,{items:e[s.field]||[],setItems:c=>{const u={...e,[s.field]:c};n(u)},itemsType:"select",draggable:s.draggable||!1,itemsOptions:s.itemsOptions,deletable:s.deletable||!1,editable:!1,subtitle:s.label});if(s.type==="select")return t.jsxRuntimeExports.jsx(t.Select,{options:s.itemsOptions,onChange:c=>{const u={...e,[s.field]:c};n(u)},label:s.label,value:e[s.field]||"String",leftAddon:s.leftAddon&&s.leftAddon==="icon"&&t.jsxRuntimeExports.jsx(t.Icon,{name:e[s.field]})})})})]})}),he="_other_g74jx_1",_e="_subtitle_g74jx_7",je="_items_g74jx_14",xt={other:he,subtitle:_e,items:je},lt=d=>{const{items:i,title:e="Other"}=d;return t.jsxRuntimeExports.jsxs("div",{className:xt.other,children:[t.jsxRuntimeExports.jsx("h5",{className:xt.subtitle,children:e}),t.jsxRuntimeExports.jsx("div",{className:xt.items,children:i.map((n,o)=>t.jsxRuntimeExports.jsx(t.Switch,{current:n.isItem,onChange:r=>n.setIsItem(r),label:n.label,hasBackground:!0,paddingless:!1},o))})]})},ge=d=>{const{index:i,moveProduct:e,children:n}=d,[,o]=t.useDrop({accept:"product",hover(s){s.index!==i&&(e(s.index,i),s.index=i)}}),[{isDragging:r},a]=t.useDrag({type:"product",item:{index:i},collect:s=>({isDragging:s.isDragging()})});return t.jsxRuntimeExports.jsx("div",{ref:s=>a(o(s)),className:`${H.product} ${r?H.dragging:""}`,children:n})},_t=d=>{const{isActiveItems:i,setIsActiveItems:e,items:n,setItems:o,other:r,title:a,subtitle:s,editable:c=!0,draggable:u=!1,withImage:R=!1,deletable:l=!0,addable:S=!0,itemsType:j,itemsPlaceholder:h="",itemsOptions:p,hasRangeSelector:B=!1,rangeSelectorOptions:P,modalOptions:g,addableOptions:A={},limit:$,autoScrollInterval:w}=d,[_,b]=m.useState(null),[L,E]=m.useState({top:0,left:0}),[v,I]=m.useState(null),O=m.useRef(null),[q,F]=m.useState(!1),J=(x,N)=>{const y=[...n],[Y]=y.splice(x,1);y.splice(N,0,Y),o(y)};m.useEffect(()=>{const x=()=>{b(null),F(!1)};return document.body.addEventListener("click",x),b(null),F(!1),()=>{b(null),F(!1),document.body.removeEventListener("click",x)}},[]),m.useEffect(()=>{if(_){const x=[...n].map(N=>N.id===_.id?_:N);o(x)}},[_]),m.useEffect(()=>{if(O.current&&v){const x=O.current.getBoundingClientRect().height,N=window.innerHeight;let y=v.top;y+x>N+window.scrollY&&(y=N+window.scrollY-x-200),y<0&&(y=10),E({top:y,left:v.left})}},[O.current,v]);const tt=(x,N)=>{x.stopPropagation();const y=x.target.getBoundingClientRect();I({top:y.top+window.scrollY,left:y.left-30}),b(N),F(!0)};function f(x){if(R)return x?t.jsxRuntimeExports.jsx("img",{src:`https://imagedelivery.net/${x[0]}/w=1000`,alt:"image",width:16,height:16}):t.jsxRuntimeExports.jsx(t.Icon,{name:"Image",width:16,height:16,fill:"#757575"})}const T=(x,N)=>{var Y;const y=t.jsxRuntimeExports.jsxs(t.jsxRuntimeExports.Fragment,{children:[u&&t.jsxRuntimeExports.jsx("div",{children:t.jsxRuntimeExports.jsx(t.Icon,{name:"DotsSixVertical",hoverable:!0,width:20,height:20})}),j==="select"&&t.jsxRuntimeExports.jsx(t.Select,{onChange:D=>{const st=[...n].map(Q=>Q.id===x.id?{...x,name:D}:Q);b({...x,name:D}),o([...st])},value:x.name,options:p.filter(D=>!n.find(U=>U.name===D.name)).map(D=>D.name),leftAddon:f(x.images)}),j==="input"&&t.jsxRuntimeExports.jsx(t.Input,{onChange:D=>{const st=[...n].map(Q=>Q.id===x.id?{...x,name:D}:Q);o([...st])},value:x.name,placeholder:h}),j==="image"&&t.jsxRuntimeExports.jsx(t.ChooseImage,{onChange:D=>{const st=[...n].map(Q=>Q.id===x.id?{...x,images:D}:Q);o([...st])},activeImage:(Y=n.find(D=>D.id===x.id))==null?void 0:Y.images[0]}),t.jsxRuntimeExports.jsxs("div",{className:H.buttons,children:[c&&t.jsxRuntimeExports.jsx(t.Icon,{name:"Sliders",hoverable:!0,width:20,height:20,onClick:D=>tt(D,x)}),l&&t.jsxRuntimeExports.jsx(t.Icon,{name:"Trash",hoverable:!0,width:20,height:20,fill:"#C12A2A",onClick:()=>o(n.filter(D=>D.id!==x.id))})]})]});return u?t.jsxRuntimeExports.jsx(ge,{product:x,index:N,moveProduct:J,children:y},x.id):t.jsxRuntimeExports.jsx("div",{className:H.product,children:y},x.id)};return t.jsxRuntimeExports.jsxs("div",{className:H.productsBlock,children:[(a||i!==void 0)&&t.jsxRuntimeExports.jsxs("div",{className:H.top,children:[a&&t.jsxRuntimeExports.jsx("h3",{className:H.title,children:a}),i!==void 0&&t.jsxRuntimeExports.jsx(t.Switch,{current:i,onChange:x=>e==null?void 0:e(x)})]}),_&&c&&g&&q&&t.jsxRuntimeExports.jsx(me,{ref:O,activeItem:_,setActiveItem:b,popupPosition:L,modalOptions:g,setIsOpenModal:F}),B&&P&&t.jsxRuntimeExports.jsx(ut,{...P}),t.jsxRuntimeExports.jsxs("div",{className:H.products,children:[s&&t.jsxRuntimeExports.jsx("h5",{className:H.subtitle,children:s}),u?t.jsxRuntimeExports.jsx(t.DndProvider,{backend:t.HTML5Backend,children:n.map((x,N)=>T(x,N))}):n.map((x,N)=>T(x,N)),S&&t.jsxRuntimeExports.jsxs(t.Button,{withoutHover:!0,className:t.clx(H.button,{[H.disabled]:!!($&&$<=n.length||n.length===(p==null?void 0:p.length))}),size:"s",disabled:!!($&&$<=n.length||n.length===(p==null?void 0:p.length)),onClick:()=>{const x=[...n];let N=null;if(p){for(let y=0;y<p.length;y++)if(!n.find(Y=>Y.id===p[y].id)){N=p[y];break}}j==="select"?x.push({name:N?N.name:p[0].name,id:(N==null?void 0:N.id)||p[0].id,...A}):j==="input"?x.push({name:"",id:t.v4(),...A}):x.push({name:`Image ${n.length+1}`,id:t.v4(),...A}),o(x)},children:[t.jsxRuntimeExports.jsx("span",{children:"Add Option"}),t.jsxRuntimeExports.jsx(t.Icon,{name:"Plus",width:16,height:16})]})]}),r!==void 0&&t.jsxRuntimeExports.jsx(lt,{items:r}),w!==void 0&&t.jsxRuntimeExports.jsx(t.Input,{label:"Auto scroll interval",type:"number",value:String(w.scrollInterval),onChange:x=>w.setScrollInterval(Number(x)),min:.1,max:100,style:{width:"100%"},postfix:"sec."})]})},fe="_title_fyopx_1",be="_subtitle_fyopx_5",ve="_header_fyopx_12",Ee="_text_fyopx_13",Re="_productsBlock_fyopx_14",ye="_top_fyopx_26",Ie="_itemsBlock_fyopx_35",ke="_typeTexts_fyopx_41",$e="_block_fyopx_48",we="_active_fyopx_61",Ne="_products_fyopx_14",Ce="_product_fyopx_14",Se="_button_fyopx_80",Te="_disabled_fyopx_91",Be="_image_fyopx_95",Pe="_info_fyopx_102",Ae="_name_fyopx_114",Oe="_buttons_fyopx_118",qe="_modal_fyopx_125",De="_link_fyopx_145",Le="_modalOptions_fyopx_151",X={title:fe,subtitle:be,header:ve,text:Ee,productsBlock:Re,top:ye,itemsBlock:Ie,typeTexts:ke,block:$e,active:we,products:Ne,product:Ce,button:Se,disabled:Te,image:Be,info:Pe,name:Ae,buttons:Oe,modal:qe,link:De,modalOptions:Le},Me=d=>{const{isActiveItems:i,setIsActiveItems:e,items:n,setItems:o,other:r,title:a,subtitle:s,draggable:c=!1,withImage:u=!1,addable:R=!0,itemsOptions:l,hasRangeSelector:S=!1,rangeSelectorOptions:j,limit:h,autoScrollInterval:p}=d;function B(g){if(u)return g?t.jsxRuntimeExports.jsx("img",{src:`https://imagedelivery.net/${g[0]}/w=1000`,alt:"image",width:16,height:16}):t.jsxRuntimeExports.jsx(t.Icon,{name:"Image",width:16,height:16,fill:"#757575"})}const P=g=>{const A=l.find(w=>w.id===g);if(!A)return;const $=t.jsxRuntimeExports.jsxs(t.jsxRuntimeExports.Fragment,{children:[c&&t.jsxRuntimeExports.jsx("div",{children:t.jsxRuntimeExports.jsx(t.Icon,{name:"DotsSixVertical",hoverable:!0,width:20,height:20})}),t.jsxRuntimeExports.jsx(t.Select,{onChange:w=>{const _=[...n],b=l.find(v=>v.name===w);if(!b)return;const L=b.id,E=_.map(v=>v===g?L:v);o([...E])},value:A.name,options:l.filter(w=>!n.find(_=>_===w.id)).map(w=>w.name),leftAddon:B(A.images)}),t.jsxRuntimeExports.jsx("div",{className:X.buttons,children:t.jsxRuntimeExports.jsx(t.Icon,{name:"Trash",hoverable:!0,width:20,height:20,fill:"#C12A2A",onClick:()=>o(n.filter(w=>w!==g))})})]});return t.jsxRuntimeExports.jsx("div",{className:X.product,children:$},g)};return t.jsxRuntimeExports.jsxs("div",{className:X.productsBlock,children:[(a||i!==void 0)&&t.jsxRuntimeExports.jsxs("div",{className:X.top,children:[a&&t.jsxRuntimeExports.jsx("h3",{className:X.title,children:a}),i!==void 0&&t.jsxRuntimeExports.jsx(t.Switch,{current:i,onChange:g=>e==null?void 0:e(g)})]}),S&&j&&t.jsxRuntimeExports.jsx(ut,{...j}),t.jsxRuntimeExports.jsxs("div",{className:X.products,children:[s&&t.jsxRuntimeExports.jsx("h5",{className:X.subtitle,children:s}),n.map(g=>P(g)),R&&t.jsxRuntimeExports.jsxs(t.Button,{withoutHover:!0,className:t.clx(X.button,{[X.disabled]:!!(h&&h<=n.length||n.length===l.length)}),size:"s",disabled:!!(h&&h<=n.length||n.length===l.length),onClick:()=>{const g=[...n];let A=null;if(l){for(let $=0;$<l.length;$++)if(!n.find(w=>w===l[$].id)){A=l[$];break}}g.push((A==null?void 0:A.id)||l[0].id),o(g)},children:[t.jsxRuntimeExports.jsx("span",{children:"Add Option"}),t.jsxRuntimeExports.jsx(t.Icon,{name:"Plus",width:16,height:16})]})]}),r!==void 0&&t.jsxRuntimeExports.jsx(lt,{items:r}),p!==void 0&&t.jsxRuntimeExports.jsx(t.Input,{label:"Auto scroll interval",type:"number",value:String(p.scrollInterval),onChange:g=>p.setScrollInterval(Number(g)),min:.1,max:100,style:{width:"100%"},postfix:"sec."})]})},He="_title_fyopx_1",Fe="_subtitle_fyopx_5",Ve="_header_fyopx_12",Ue="_text_fyopx_13",ze="_productsBlock_fyopx_14",Ye="_top_fyopx_26",Ge="_itemsBlock_fyopx_35",We="_typeTexts_fyopx_41",Xe="_block_fyopx_48",Je="_active_fyopx_61",Qe="_products_fyopx_14",Ke="_product_fyopx_14",Ze="_button_fyopx_80",ts="_disabled_fyopx_91",es="_image_fyopx_95",ss="_info_fyopx_102",ns="_name_fyopx_114",os="_buttons_fyopx_118",is="_modal_fyopx_125",rs="_link_fyopx_145",as="_modalOptions_fyopx_151",V={title:He,subtitle:Fe,header:Ve,text:Ue,productsBlock:ze,top:Ye,itemsBlock:Ge,typeTexts:We,block:Xe,active:Je,products:Qe,product:Ke,button:Ze,disabled:ts,image:es,info:ss,name:ns,buttons:os,modal:is,link:rs,modalOptions:as},cs=m.forwardRef((d,i)=>{const{activeItem:e,setActiveItem:n,popupPosition:o,modalOptions:r,setIsOpenModal:a}=d;return t.jsxRuntimeExports.jsxs("div",{ref:i,className:V.modal,onClick:s=>{s.stopPropagation()},style:{top:`${o.top}px`,left:`${o.left}px`},children:[t.jsxRuntimeExports.jsxs("div",{className:V.top,children:[t.jsxRuntimeExports.jsx("h3",{className:V.title,children:e.name}),t.jsxRuntimeExports.jsx(t.Icon,{name:"X",height:20,width:20,hoverable:!0,onClick:()=>{n(null),a(!1)}})]}),t.jsxRuntimeExports.jsx("div",{className:V.modalOptions,children:r.map(s=>{if(s.type==="image")return t.jsxRuntimeExports.jsx(t.ChooseImage,{label:"Put up an attractive image",activeImage:e[s.field],onChange:c=>{const u={...e,[s.field]:c};n(u)}},String(s.field));if(s.type==="text")return t.jsxRuntimeExports.jsx(mt,{typesText:e[s.field.type],setTypesText:c=>{const u={...e,[s.field.type]:c};n(u)},text:e[s.field.text]||"",setText:c=>{const u={...e,[s.field.text]:c};n(u)},subtitle:s.label});if(s.type==="input")return t.jsxRuntimeExports.jsx(t.Input,{onChange:c=>{const u={...e,[s.field]:c};n(u)},value:e[s.field]||"",label:s.label,placeholder:s.placeholder});if(s.type==="inputSwitch")return t.jsxRuntimeExports.jsxs("div",{className:V.link,children:[t.jsxRuntimeExports.jsx(t.Input,{onChange:c=>{const u={...e,[s.field.text]:c};n(u)},value:e[s.field.text]||"",label:s.inputLabel,placeholder:s.placeholder}),t.jsxRuntimeExports.jsx(t.Switch,{current:!!e[s.field.switch]||!1,label:s.switchLabel,onChange:c=>{const u={...e,[s.field.switch]:c};n(u)}})]});if(s.type==="select")return t.jsxRuntimeExports.jsx(t.Select,{options:s.itemsOptions,onChange:c=>{const u={...e,[s.field]:c};n(u)},label:s.label,value:e[s.field]||"String",leftAddon:s.leftAddon&&s.leftAddon==="icon"&&t.jsxRuntimeExports.jsx(t.Icon,{name:e[s.field]})})})})]})}),ls=d=>{const{index:i,moveProduct:e,children:n}=d,[,o]=t.useDrop({accept:"product",hover(s){s.index!==i&&(e(s.index,i),s.index=i)}}),[{isDragging:r},a]=t.useDrag({type:"product",item:{index:i},collect:s=>({isDragging:s.isDragging()})});return t.jsxRuntimeExports.jsx("div",{ref:s=>a(o(s)),className:`${V.product} ${r?V.dragging:""}`,children:n})},us=d=>{const{isActiveItems:i,setIsActiveItems:e,items:n,setItems:o,other:r,title:a,subtitle:s,editable:c=!0,draggable:u=!1,withImage:R=!1,deletable:l=!0,addable:S=!0,itemsType:j,itemsPlaceholder:h="",itemsOptions:p,hasRangeSelector:B=!1,rangeSelectorOptions:P,modalOptions:g,addableOptions:A={}}=d,[$,w]=m.useState(null),[_,b]=m.useState({top:0,left:0}),[L,E]=m.useState(null),v=m.useRef(null),[I,O]=m.useState(!1),q=(f,T)=>{const x=[...n],[N]=x.splice(f,1);x.splice(T,0,N),o(x)};m.useEffect(()=>{const f=()=>{w(null),O(!1)};return document.body.addEventListener("click",f),w(null),O(!1),()=>{w(null),O(!1),document.body.removeEventListener("click",f)}},[]),m.useEffect(()=>{if($){const f=[...n].map(T=>T.id===$.id?$:T);o(f)}},[$]),m.useEffect(()=>{if(v.current&&L){const f=v.current.getBoundingClientRect().height,T=window.innerHeight;let x=L.top;x+f>T+window.scrollY&&(x=T+window.scrollY-f-200),x<0&&(x=10),b({top:x,left:L.left})}},[v.current,L]);const F=(f,T)=>{f.stopPropagation();const x=f.target.getBoundingClientRect();E({top:x.top+window.scrollY,left:x.left-30}),w(T),O(!0)};function J(f){if(R)return f?t.jsxRuntimeExports.jsx("img",{src:`https://imagedelivery.net/${f[0]}/w=1000`,alt:"image",width:16,height:16}):t.jsxRuntimeExports.jsx(t.Icon,{name:"Image",width:16,height:16,fill:"#757575"})}const tt=(f,T)=>{var N;const x=t.jsxRuntimeExports.jsxs(t.jsxRuntimeExports.Fragment,{children:[u&&t.jsxRuntimeExports.jsx("div",{children:t.jsxRuntimeExports.jsx(t.Icon,{name:"DotsSixVertical",hoverable:!0,width:20,height:20})}),j==="select"&&t.jsxRuntimeExports.jsx(t.Select,{onChange:y=>{const D=[...n].map(U=>U.id===f.id?{...f,name:y}:U);w({...f,name:y}),o([...D])},value:f.name,options:p.filter(y=>!n.find(Y=>Y.name===y)),leftAddon:J(f.images)}),j==="input"&&t.jsxRuntimeExports.jsx(t.Input,{onChange:y=>{const D=[...n].map(U=>U.id===f.id?{...f,name:y}:U);o([...D])},value:f.name,placeholder:h}),j==="image"&&t.jsxRuntimeExports.jsx(t.ChooseImage,{onChange:y=>{const D=[...n].map(U=>U.id===f.id?{...f,images:y}:U);o([...D])},activeImage:(N=n.find(y=>y.id===f.id))==null?void 0:N.images[0]}),t.jsxRuntimeExports.jsxs("div",{className:V.buttons,children:[c&&t.jsxRuntimeExports.jsx(t.Icon,{name:"Sliders",hoverable:!0,width:20,height:20,onClick:y=>F(y,f)}),l&&t.jsxRuntimeExports.jsx(t.Icon,{name:"Trash",hoverable:!0,width:20,height:20,fill:"#C12A2A",onClick:()=>o(n.filter(y=>y.id!==f.id))})]})]});return u?t.jsxRuntimeExports.jsx(ls,{product:f,index:T,moveProduct:q,children:x},f.id):t.jsxRuntimeExports.jsx("div",{className:V.product,children:x},f.id)};return t.jsxRuntimeExports.jsxs("div",{className:V.productsBlock,children:[(a||i!==void 0)&&t.jsxRuntimeExports.jsxs("div",{className:V.top,children:[a&&t.jsxRuntimeExports.jsx("h3",{className:V.title,children:a}),i!==void 0&&t.jsxRuntimeExports.jsx(t.Switch,{current:i,onChange:f=>e==null?void 0:e(f)})]}),$&&c&&g&&I&&t.jsxRuntimeExports.jsx(cs,{ref:v,activeItem:$,setActiveItem:w,popupPosition:_,modalOptions:g,setIsOpenModal:O}),B&&P&&t.jsxRuntimeExports.jsx(ut,{...P}),t.jsxRuntimeExports.jsxs("div",{className:V.products,children:[s&&t.jsxRuntimeExports.jsx("h5",{className:V.subtitle,children:s}),u?t.jsxRuntimeExports.jsx(t.DndProvider,{backend:t.HTML5Backend,children:n.map((f,T)=>tt(f,T))}):n.map((f,T)=>tt(f,T)),S&&t.jsxRuntimeExports.jsxs(t.Button,{withoutHover:!0,className:V.button,size:"s",onClick:()=>{const f=[...n];let T=null;if(p){for(let x=0;x<p.length;x++)if(!n.find(N=>N.name===p[x])){T=p[x];break}}j==="select"?f.push({name:T||p[0],id:t.v4(),...A}):j==="input"?f.push({name:"",id:t.v4(),...A}):f.push({name:`Image ${n.length+1}`,id:t.v4(),...A}),o(f)},children:[t.jsxRuntimeExports.jsx("span",{children:"Add Option"}),t.jsxRuntimeExports.jsx(t.Icon,{name:"Plus",width:16,height:16})]})]}),r!==void 0&&t.jsxRuntimeExports.jsx(lt,{items:r})]})},ds="_title_dkxs6_1",xs="_subtitle_dkxs6_5",ps="_header_dkxs6_12",ms="_text_dkxs6_13",hs="_productsBlock_dkxs6_14",_s="_buttonsBlock_dkxs6_15",js="_top_dkxs6_26",gs="_itemsBlock_dkxs6_35",fs="_typeTexts_dkxs6_41",bs="_block_dkxs6_48",vs="_active_dkxs6_60",Es="_products_dkxs6_14",Rs="_product_dkxs6_14",ys="_button_dkxs6_15",Is="_image_dkxs6_90",ks="_info_dkxs6_97",$s="_name_dkxs6_109",ws="_buttons_dkxs6_15",Ns="_modal_dkxs6_120",Cs="_other_dkxs6_140",Ss="_options_dkxs6_146",et={title:ds,subtitle:xs,header:ps,text:ms,productsBlock:hs,buttonsBlock:_s,top:js,itemsBlock:gs,typeTexts:fs,block:bs,active:vs,products:Es,product:Rs,button:ys,image:Is,info:ks,name:$s,buttons:ws,modal:Ns,other:Cs,options:Ss},Ts=m.forwardRef((d,i)=>{const{activeButton:e,setActiveButton:n,popupPosition:o}=d,[r,a]=m.useState(e.typesText),[s,c]=m.useState(e.destination),[u,R]=m.useState(e.page),[l,S]=m.useState(e.link||""),[j,h]=m.useState(e.text||""),[p,B]=m.useState(e.openInNewTab),{pages:P}=t.usePagesStore();return m.useEffect(()=>{n({...e,...{text:j,link:l,destination:s,typesText:r,page:u,openInNewTab:p}})},[r,s,l,j,u,p]),t.jsxRuntimeExports.jsxs("div",{className:et.modal,onClick:g=>{g.stopPropagation()},style:{top:`${o.top}px`,left:`${o.left}px`},ref:i,children:[t.jsxRuntimeExports.jsxs("div",{className:et.top,children:[t.jsxRuntimeExports.jsx("h3",{className:et.title,children:e.type}),t.jsxRuntimeExports.jsx(t.Icon,{name:"X",height:20,width:20,hoverable:!0,onClick:()=>n(null)})]}),t.jsxRuntimeExports.jsxs("div",{className:et.options,children:[t.jsxRuntimeExports.jsx(t.Select,{label:"Destination",onChange:g=>c(g),options:["Go to Page","Open Link"].filter(g=>g!==s),value:s}),s==="Go to Page"?t.jsxRuntimeExports.jsx(t.Select,{label:"Go to",onChange:g=>R(g),options:P?Object.values(P).filter(g=>g.name!==u).map(g=>g.name):[],value:u}):t.jsxRuntimeExports.jsx(t.Input,{onChange:g=>S(g),value:l,placeholder:"https://",label:"Link"}),t.jsxRuntimeExports.jsx(t.Switch,{current:e.openInNewTab,label:"Open in new tab",onChange:g=>B(g)}),t.jsxRuntimeExports.jsx(t.Textarea,{onChange:g=>h(g),value:j,label:"Text",maxLength:150}),t.jsxRuntimeExports.jsx(pt,{typesText:r,setTypesText:a})]})]})}),Bs="_subtitle_m8qel_1",Ps="_header_m8qel_8",As="_text_m8qel_9",Os="_productsBlock_m8qel_10",qs="_buttonsBlock_m8qel_11",Ds="_top_m8qel_23",Ls="_itemsBlock_m8qel_32",Ms="_typeTexts_m8qel_38",Hs="_block_m8qel_45",Fs="_active_m8qel_58",Vs="_products_m8qel_10",Us="_product_m8qel_10",zs="_button_m8qel_11",Ys="_image_m8qel_88",Gs="_info_m8qel_95",Ws="_name_m8qel_107",Xs="_buttons_m8qel_11",Js="_modal_m8qel_118",Qs="_other_m8qel_137",Ks="_options_m8qel_143",ot={subtitle:Bs,header:Ps,text:As,productsBlock:Os,buttonsBlock:qs,top:Ds,itemsBlock:Ls,typeTexts:Ms,block:Hs,active:Fs,products:Vs,product:Us,button:zs,image:Ys,info:Gs,name:Ws,buttons:Xs,modal:Js,other:Qs,options:Ks},jt=d=>{const{buttons:i,setButtons:e,deletable:n=!0,addable:o=!0}=d,[r,a]=m.useState(null),[s,c]=m.useState({top:0,left:0}),[u,R]=m.useState(null),l=m.useRef(null);m.useEffect(()=>{const j=()=>{a(null)};return document.body.addEventListener("click",j),a(null),()=>{a(null),document.body.removeEventListener("click",j)}},[]),m.useEffect(()=>{if(r){const j=[...i].map(h=>h.id===r.id?r:h);e(j)}},[r]),m.useEffect(()=>{if(l.current&&u){const j=l.current.getBoundingClientRect().height,h=window.innerHeight;let p=u.top;p+j>h+window.scrollY&&(p=h+window.scrollY-j-200),p<0&&(p=10),c({top:p,left:u.left})}},[l.current,u]);const S=(j,h)=>{j.stopPropagation();const p=j.target.getBoundingClientRect();R({top:p.top+window.scrollY,left:p.left-30}),a(h)};return t.jsxRuntimeExports.jsxs("div",{className:ot.products,children:[t.jsxRuntimeExports.jsx("h5",{className:ot.subtitle,children:"Button Type"}),i.map(j=>t.jsxRuntimeExports.jsxs("div",{className:ot.product,children:[t.jsxRuntimeExports.jsx(t.Select,{onChange:h=>{const B=[...i].map(P=>P.id===j.id?{...j,type:h}:P);e(B)},value:j.type,options:["Primary","Secondary","Tertiary"]}),t.jsxRuntimeExports.jsxs("div",{className:ot.buttons,children:[t.jsxRuntimeExports.jsx(t.Icon,{name:"Sliders",hoverable:!0,width:20,height:20,onClick:h=>{S(h,j)}}),n&&t.jsxRuntimeExports.jsx(t.Icon,{name:"Trash",hoverable:!0,onClick:()=>{const h=i.filter(p=>p.id!==j.id);e(h)},width:20,height:20,fill:"#C12A2A"})]})]},j.id)),r&&t.jsxRuntimeExports.jsx(Ts,{ref:l,activeButton:r,setActiveButton:a,popupPosition:s}),o&&t.jsxRuntimeExports.jsxs(t.Button,{withoutHover:!0,className:ot.button,size:"s",onClick:()=>{const j=[...i];j.push({type:"Primary",id:t.v4(),typesText:[],destination:"Go to Page",text:"Button Name",page:"home",openInNewTab:!0}),e(j)},children:[t.jsxRuntimeExports.jsx("span",{children:"Add Option"}),t.jsxRuntimeExports.jsx(t.Icon,{name:"Plus",width:16,height:16})]})]})},Zs=d=>{const{isActiveButtons:i,setIsActiveButtons:e,buttons:n,setButtons:o}=d;return t.jsxRuntimeExports.jsx(t.jsxRuntimeExports.Fragment,{children:t.jsxRuntimeExports.jsxs("div",{className:et.buttonsBlock,children:[t.jsxRuntimeExports.jsxs("div",{className:et.top,children:[t.jsxRuntimeExports.jsx("h3",{className:et.title,children:"Buttons"}),t.jsxRuntimeExports.jsx(t.Switch,{current:i,onChange:r=>e(r)})]}),t.jsxRuntimeExports.jsx(jt,{buttons:n,setButtons:o})]})})},tn="_wrapper_m18qi_1",en="_subtitle_m18qi_7",sn="_content_m18qi_14",nn="_range_m18qi_22",on="_track_m18qi_27",rn="_progress_m18qi_36",an="_dots_m18qi_46",cn="_dot_m18qi_46",ln="_active_m18qi_65",un="_input_m18qi_77",dn="_countBlock_m18qi_91",xn="_count_m18qi_91",pn="_controls_m18qi_107",mn="_button_m18qi_113",M={wrapper:tn,subtitle:en,content:sn,range:nn,track:on,progress:rn,dots:an,dot:cn,active:ln,input:un,countBlock:dn,count:xn,controls:pn,button:mn},ut=d=>{const{label:i,min:e=1,max:n=4,step:o=1,count:r,setCount:a}=d,[s,c]=m.useState(!1),u=Array.from({length:(n-e)/o+1}),R=(r-e)/(n-e)*100,l=()=>{r<n&&a(r+o)},S=()=>{r>e&&a(r-o)},j=h=>{const p=e+h*o;a(p)};return t.jsxRuntimeExports.jsxs("div",{className:M.wrapper,children:[i&&t.jsxRuntimeExports.jsx("h5",{className:M.subtitle,children:i}),t.jsxRuntimeExports.jsxs("div",{className:M.content,children:[t.jsxRuntimeExports.jsxs("div",{className:M.range,children:[t.jsxRuntimeExports.jsx("div",{className:M.track}),t.jsxRuntimeExports.jsx("div",{className:M.progress,style:{width:`${R}%`}}),t.jsxRuntimeExports.jsx("div",{className:M.dots,children:u.map((h,p)=>{const B=p<=(r-e)/o;return t.jsxRuntimeExports.jsx("button",{onClick:()=>j(p),className:t.clx(M.dot,{[M.active]:B,[M.inactive]:!B,[M.dragging]:s}),"aria-label":`Set value to ${e+p*o}`},p)})}),t.jsxRuntimeExports.jsx("input",{type:"range",min:e,max:n,step:o,value:r,onChange:h=>a(Number(h.target.value)),onMouseDown:()=>c(!0),onMouseUp:()=>c(!1),onTouchStart:()=>c(!0),onTouchEnd:()=>c(!1),className:M.input})]}),t.jsxRuntimeExports.jsxs("div",{className:M.countBlock,children:[t.jsxRuntimeExports.jsx(t.Input,{type:"number",min:e,max:n,paddingless:!0,onChange:h=>{const p=Number(h);p>n?a(n):p<e?a(e):a(p)},value:String(r)}),t.jsxRuntimeExports.jsxs("div",{className:M.controls,children:[t.jsxRuntimeExports.jsx("button",{onClick:l,disabled:r>=n,className:M.button,"aria-label":"Increment count",children:t.jsxRuntimeExports.jsx(t.Icon,{name:"CaretUp",width:15,height:15})}),t.jsxRuntimeExports.jsx("button",{onClick:S,disabled:r<=e,className:M.button,"aria-label":"Decrement count",children:t.jsxRuntimeExports.jsx(t.Icon,{name:"CaretDown",width:15,height:15})})]})]})]})]})},hn="_title_1hw31_1",_n="_subtitle_1hw31_5",jn="_header_1hw31_12",gn="_text_1hw31_13",fn="_productsBlock_1hw31_14",bn="_top_1hw31_26",vn="_itemsBlock_1hw31_35",En="_typeTexts_1hw31_41",Rn="_block_1hw31_48",yn="_active_1hw31_61",In="_products_1hw31_14",kn="_product_1hw31_14",$n="_button_1hw31_80",wn="_image_1hw31_91",Nn="_info_1hw31_98",Cn="_name_1hw31_110",Sn="_buttons_1hw31_114",Tn="_modal_1hw31_121",Bn="_link_1hw31_141",Pn="_modalOptions_1hw31_147",z={title:hn,subtitle:_n,header:jn,text:gn,productsBlock:fn,top:bn,itemsBlock:vn,typeTexts:En,block:Rn,active:yn,products:In,product:kn,button:$n,image:wn,info:Nn,name:Cn,buttons:Sn,modal:Tn,link:Bn,modalOptions:Pn},An=d=>{const{activeItem:i,setActiveItem:e,popupPosition:n,setIsOpenModal:o,itemsOptions:r}=d,a=r.find(c=>c.id===i.listingId);if(!a)return null;function s(c,u){return c.length>u?`${c.slice(0,u)}...`:c}return t.jsxRuntimeExports.jsxs("div",{className:z.modal,onClick:c=>{c.stopPropagation()},style:{top:`${n.top}px`,left:`${n.left}px`},children:[t.jsxRuntimeExports.jsxs("div",{className:z.top,children:[t.jsxRuntimeExports.jsx("h3",{children:s(a.productData.name,20)}),t.jsxRuntimeExports.jsx(t.Icon,{name:"X",height:20,width:20,hoverable:!0,onClick:()=>{o(!1),e(null)}})]}),t.jsxRuntimeExports.jsx("div",{className:z.modalOptions,children:t.jsxRuntimeExports.jsx(t.ChooseImage,{label:"Put up an attractive image",activeImage:a.productData.images.length>0?a.productData.images[0].cfId:void 0,onChange:c=>{const u={...i,image:c[0]};e(u)}})})]})},On=d=>{const{index:i,moveProduct:e,children:n}=d,[,o]=t.useDrop({accept:"product",hover(s){s.index!==i&&(e(s.index,i),s.index=i)}}),[{isDragging:r},a]=t.useDrag({type:"product",item:{index:i},collect:s=>({isDragging:s.isDragging()})});return t.jsxRuntimeExports.jsx("div",{ref:s=>a(o(s)),className:`${z.product} ${r?z.dragging:""}`,children:n})},qn=d=>{const{isActiveItems:i,setIsActiveItems:e,items:n,setItems:o,other:r,title:a,subtitle:s,editable:c=!0,draggable:u=!1,withImage:R=!1,deletable:l=!0,addable:S=!0,itemsType:j,itemsOptions:h}=d,[p,B]=m.useState(null),[P,g]=m.useState({top:0,left:0}),[A,$]=m.useState(!1),w=(E,v)=>{const I=[...n],[O]=I.splice(E,1);I.splice(v,0,O),o(I)};m.useEffect(()=>{const E=()=>{B(null),$(!1)};return document.body.addEventListener("click",E),B(null),$(!1),()=>{B(null),$(!1),document.body.removeEventListener("click",E)}},[]),m.useEffect(()=>{if(p){const E=[...n].map(v=>v.listingId===p.listingId?p:v);o(E)}},[p]);const _=(E,v)=>{E.stopPropagation();const I=E.target.getBoundingClientRect(),O=100,q=window.innerHeight;let F=I.top+window.scrollY;F+O>q&&(F=q-O-20),$(!0),g({top:F-80,left:I.left-30}),B(v)};function b(E){if(R)return E?t.jsxRuntimeExports.jsx("img",{src:`https://imagedelivery.net/${E}/w=1000`,alt:"image",width:16,height:16}):t.jsxRuntimeExports.jsx(t.Icon,{name:"Image",width:16,height:16,fill:"#757575"})}const L=(E,v)=>{const I=h.find(q=>E.listingId===q.id);if(!I)return null;const O=t.jsxRuntimeExports.jsxs(t.jsxRuntimeExports.Fragment,{children:[u&&t.jsxRuntimeExports.jsx("div",{children:t.jsxRuntimeExports.jsx(t.Icon,{name:"DotsSixVertical",hoverable:!0,width:20,height:20})},v),j==="select"&&t.jsxRuntimeExports.jsx(t.Select,{onChange:q=>{const F=[...n],J=h.find(T=>T.productData.name===q);if(!J)return;const tt={listingId:J.id,image:J.productData.images.length>0?J.productData.images[0].cfId:""},f=F.map(T=>T.listingId===E.listingId?tt:T);B(tt),o([...f])},value:I.productData.name,options:[...h.filter(q=>!n.find(F=>F.listingId===q.id)).map(q=>q.productData.name)],leftAddon:b(E.image||I.productData.images.length>0&&I.productData.images[0].cfId||"")},v),t.jsxRuntimeExports.jsxs("div",{className:z.buttons,children:[c&&t.jsxRuntimeExports.jsx(t.Icon,{name:"Sliders",hoverable:!0,width:20,height:20,onClick:q=>_(q,E)}),l&&t.jsxRuntimeExports.jsx(t.Icon,{name:"Trash",hoverable:!0,width:20,height:20,fill:"#C12A2A",onClick:()=>o(n.filter(q=>q!==E))})]})]});return u?t.jsxRuntimeExports.jsx(On,{product:E,index:v,moveProduct:w,children:O},E.listingId):t.jsxRuntimeExports.jsx("div",{className:z.product,children:O},E.listingId)};return t.jsxRuntimeExports.jsxs("div",{className:z.productsBlock,children:[(a||i!==void 0)&&t.jsxRuntimeExports.jsxs("div",{className:z.top,children:[a&&t.jsxRuntimeExports.jsx("h3",{className:z.title,children:a}),i!==void 0&&t.jsxRuntimeExports.jsx(t.Switch,{current:i,onChange:E=>e==null?void 0:e(E)})]}),A&&p&&t.jsxRuntimeExports.jsx(An,{activeItem:p,setActiveItem:B,setIsOpenModal:$,popupPosition:P,itemsOptions:h}),t.jsxRuntimeExports.jsxs("div",{className:z.products,children:[s&&t.jsxRuntimeExports.jsx("h5",{className:z.subtitle,children:s}),u?t.jsxRuntimeExports.jsx(t.DndProvider,{backend:t.HTML5Backend,children:n.map((E,v)=>L(E,v))}):n.map((E,v)=>L(E,v)),S&&t.jsxRuntimeExports.jsxs(t.Button,{withoutHover:!0,className:z.button,size:"s",onClick:()=>{const E=[...n];for(let v=0;v<h.length;v++)if(!n.find(I=>I.listingId===h[v].id)){E.push({listingId:h[v].id,image:h[v].productData.images.length>0?h[v].productData.images[0].cfId:""});break}o(E)},disabled:n.length===h.length,children:[t.jsxRuntimeExports.jsx("span",{children:"Add Option"}),t.jsxRuntimeExports.jsx(t.Icon,{name:"Plus",width:16,height:16})]})]}),r!==void 0&&t.jsxRuntimeExports.jsx(lt,{items:r})]})},Dn="_options_1w11v_1",Ln="_price_1w11v_12",Mn="_oldPrice_1w11v_19",Hn="_newPrice_1w11v_27",Fn="_animate_1w11v_34",Vn="_appearAndBounce_1w11v_1",Un="_meta_1w11v_52",zn="_info_1w11v_58",Yn="_infoRight_1w11v_66",Gn="_buttons_1w11v_73",Wn="_variants_1w11v_80",Xn="_variant_1w11v_80",Jn="_stock_1w11v_97",Qn="_variantInfo_1w11v_104",Kn="_quantity_1w11v_110",Zn="_count_1w11v_117",to="_focused_1w11v_134",eo="_button_1w11v_73",so="_activeVariant_1w11v_160",no="_chargeTypes_1w11v_164",oo="_charge_1w11v_164",io="_chargeActive_1w11v_185",ro="_title_1w11v_190",k={options:Dn,price:Ln,oldPrice:Mn,newPrice:Hn,animate:Fn,appearAndBounce:Vn,meta:Un,info:zn,infoRight:Yn,buttons:Gn,variants:Wn,variant:Xn,stock:Jn,variantInfo:Qn,quantity:Kn,count:Zn,focused:to,button:eo,activeVariant:so,chargeTypes:no,charge:oo,chargeActive:io,title:ro};var gt=(d=>(d.ONE_TIME="One-Time",d.RECURRING="Subscribe & Save",d))(gt||{});const ao=d=>{var $,w;const{variants:i}=d,[e,n]=m.useState(i[0]),[o,r]=m.useState(e.chargeTypes[0]),a=t.useNavigate(),[s,c]=m.useState(1),[u,R]=m.useState(!1),{reset:l,addProductToCart:S,getProducts:j}=t.useCart(),[h,p]=m.useState(!1);m.useEffect(()=>{p(!0);const _=setTimeout(()=>p(!1),600);return()=>clearTimeout(_)},[s]);async function B(){await j(),await S({productId:d.id,productVariantId:e.id,quantity:s})}function P(){l(),B(),a("/checkout")}function g(_){if(_>=864e5){const I=Math.floor(_/864e5);return`${I} ${I===1?"day":"days"}`}else if(_>=36e5){const I=Math.floor(_/36e5);return`${I} ${I===1?"hour":"hours"}`}else if(_>=6e4){const I=Math.floor(_/6e4);return`${I} ${I===1?"minute":"minutes"}`}else{const I=Math.floor(_/1e3);return`${I} ${I===1?"second":"seconds"}`}}function A(_,b){return _.length>b?_.slice(0,b)+"...":_}return t.jsxRuntimeExports.jsxs("div",{className:k.options,children:[e.chargeTypes.length>1&&t.jsxRuntimeExports.jsx("div",{className:k.chargeTypes,children:e.chargeTypes.map(_=>t.jsxRuntimeExports.jsx("div",{className:t.clx(k.charge,{[k.chargeActive]:o===_}),onClick:()=>r(_),children:gt[_]},_))}),t.jsxRuntimeExports.jsx("div",{className:k.variants,children:i.map(_=>{var b;return t.jsxRuntimeExports.jsxs("div",{className:t.clx(k.variant,{[k.activeVariant]:e.id===_.id}),onClick:()=>n(_),children:[t.jsxRuntimeExports.jsxs("div",{className:k.variantInfo,children:[t.jsxRuntimeExports.jsx("span",{className:k.title,children:A(_.name,15)}),t.jsxRuntimeExports.jsxs("span",{children:["$",o==="ONE_TIME"?_.price.amount:_.subscriptionSettings?_.subscriptionSettings.price.amount:"Price Not Found"]})]}),t.jsxRuntimeExports.jsx("div",{children:o==="ONE_TIME"&&t.jsxRuntimeExports.jsxs("span",{className:k.stock,children:[((b=_.quantity.restrictions)==null?void 0:b.max)||_.quantity.available||0," in stock"]})})]},_.id)})}),o==="ONE_TIME"&&t.jsxRuntimeExports.jsxs("div",{className:k.quantity,children:[t.jsxRuntimeExports.jsx("button",{onClick:()=>{s>1?c(_=>_-1):c(1)},className:k.button,disabled:e.quantity.restrictions&&s<=e.quantity.restrictions.min,children:t.jsxRuntimeExports.jsx(t.Icon,{name:"Minus"})}),t.jsxRuntimeExports.jsx("label",{className:t.clx(k.count,{[k.focused]:u}),onFocus:()=>R(!0),onBlur:()=>R(!1),children:t.jsxRuntimeExports.jsx(t.Input,{type:"number",value:String(s),onChange:_=>c(Number(_)),max:(($=e.quantity.restrictions)==null?void 0:$.max)||e.quantity.available||1/0,min:((w=e.quantity.restrictions)==null?void 0:w.min)||0,style:{backgroundColor:"transparent",border:"none",textAlign:"center"}})}),t.jsxRuntimeExports.jsx("button",{onClick:()=>{c(_=>_+1)},className:k.button,disabled:!!(e.quantity.restrictions&&s>=e.quantity.restrictions.max||e.quantity.available&&s>=e.quantity.available),children:t.jsxRuntimeExports.jsx(t.Icon,{name:"Plus"})})]}),t.jsxRuntimeExports.jsxs("div",{className:k.meta,children:[t.jsxRuntimeExports.jsxs("div",{className:k.info,children:[t.jsxRuntimeExports.jsx("span",{children:"Delivery"}),t.jsxRuntimeExports.jsxs("div",{className:k.infoRight,children:[t.jsxRuntimeExports.jsx(t.Icon,{name:"Lightning",fill:"#FF3F19",width:20,height:20}),t.jsxRuntimeExports.jsx("span",{children:!e.deliveryTime||e.deliveryTime===0?"Instant":g(e.deliveryTime)})]})]}),t.jsxRuntimeExports.jsxs("div",{className:k.info,children:[t.jsxRuntimeExports.jsx("span",{children:"Price"}),t.jsxRuntimeExports.jsx("div",{className:k.infoRight,children:o==="ONE_TIME"?e.compareAtPrice&&(e.compareAtPrice.amount||0)-(e.price.amount||0)>0?t.jsxRuntimeExports.jsxs("div",{className:k.price,children:[t.jsxRuntimeExports.jsxs("span",{className:t.clx(k.newPrice,{[k.animate]:h}),children:["$ ",(e.price.amount||0)*s]}),t.jsxRuntimeExports.jsxs("span",{className:k.oldPrice,children:["$ ",(e.compareAtPrice.amount||0)*s]})]}):t.jsxRuntimeExports.jsxs("span",{className:t.clx(k.newPrice,{[k.animate]:h}),children:["$ ",(e.price.amount||0)*s]}):e.subscriptionSettings&&e.subscriptionSettings.compareAtPrice&&(e.subscriptionSettings.compareAtPrice.amount||0)-(e.subscriptionSettings.price.amount||0)>0?t.jsxRuntimeExports.jsxs("div",{className:k.price,children:[t.jsxRuntimeExports.jsxs("span",{className:t.clx(k.newPrice,{[k.animate]:h}),children:["$ ",e.subscriptionSettings.price.amount||0]}),t.jsxRuntimeExports.jsxs("span",{className:k.oldPrice,children:["$ ",e.subscriptionSettings.compareAtPrice.amount||0]})]}):e.subscriptionSettings&&t.jsxRuntimeExports.jsxs("span",{className:t.clx(k.newPrice,{[k.animate]:h}),children:["$ ",e.subscriptionSettings.price.amount||0]})})]})]}),t.jsxRuntimeExports.jsxs("div",{className:k.buttons,children:[t.jsxRuntimeExports.jsx(t.Button,{type:"Primary",onClick:()=>P(),children:t.jsxRuntimeExports.jsx("span",{children:o==="ONE_TIME"?"Buy Now":"Subscribe Now"})}),o==="ONE_TIME"&&t.jsxRuntimeExports.jsx(t.Button,{type:"Secondary",onClick:()=>B(),children:"Add to Cart"})]})]})},co="_button_1861a_1",lo="_login_1861a_14",uo="_signUp_1861a_18",xo="_buttons_1861a_23",po="_modal_1861a_32",mo="_info_1861a_60",ho="_top_1861a_67",_o="_title_1861a_78",jo="_clear_1861a_84",go="_activeClear_1861a_91",fo="_count_1861a_95",bo="_cart_1861a_110",vo="_empty_1861a_118",Eo="_product_1861a_144",Ro="_products_1861a_153",yo="_image_1861a_161",Io="_productInfo_1861a_167",ko="_content_1861a_174",$o="_name_1861a_180",wo="_price_1861a_186",No="_productButtons_1861a_192",Co="_productButton_1861a_192",So="_productCount_1861a_212",To="_bottom_1861a_228",Bo="_subtotal_1861a_236",Po="_block_1861a_244",Ao="_shoppingCount_1861a_251",Oo="_total_1861a_271",qo="_link_1861a_277",Do="_userInfo_1861a_284",C={button:co,login:lo,signUp:uo,buttons:xo,modal:po,info:mo,top:ho,title:_o,clear:jo,activeClear:go,count:fo,cart:bo,empty:vo,product:Eo,products:Ro,image:yo,productInfo:Io,content:ko,name:$o,price:wo,productButtons:No,productButton:Co,productCount:So,bottom:To,subtotal:Bo,block:Po,shoppingCount:Ao,total:Oo,link:qo,userInfo:Do},Lo="_button_bymeg_1",Mo="_primary_bymeg_19",Ho="_primaryHovered_bymeg_30",Fo="_secondary_bymeg_34",Vo="_secondaryHovered_bymeg_44",Uo="_tertiary_bymeg_48",zo="_tertiaryHovered_bymeg_58",Yo="_content_bymeg_62",K={button:Lo,primary:Mo,primaryHovered:Ho,secondary:Fo,secondaryHovered:Vo,tertiary:Uo,tertiaryHovered:zo,content:Yo},ct=d=>{const{children:i,onClick:e,style:n,className:o,disabled:r=!1,type:a="Primary"}=d,{themeSettings:s}=t.useThemeSettingsStore();return t.jsxRuntimeExports.jsx("button",{className:t.clx(K.button,o,{[K.primary]:a==="Primary",[K.secondary]:a==="Secondary",[K.tertiary]:a==="Tertiary",[K.primaryHovered]:a==="Primary"&&!r&&s.buttons.primary.hover,[K.secondaryHovered]:a==="Secondary"&&!r&&s.buttons.secondary.hover,[K.tertiaryHovered]:a==="Tertiary"&&!r&&s.buttons.tertiary.hover}),onClick:e,style:{...n},disabled:r,children:a==="Tertiary"?t.jsxRuntimeExports.jsxs("div",{className:K.content,children:[t.jsxRuntimeExports.jsx(t.Icon,{name:"ArrowRight",fill:"#757575",width:20,height:20}),i]}):t.jsxRuntimeExports.jsx(t.jsxRuntimeExports.Fragment,{children:i})})};class rt extends Error{}rt.prototype.name="InvalidTokenError";function Go(d){return decodeURIComponent(atob(d).replace(/(.)/g,(i,e)=>{let n=e.charCodeAt(0).toString(16).toUpperCase();return n.length<2&&(n="0"+n),"%"+n}))}function Wo(d){let i=d.replace(/-/g,"+").replace(/_/g,"/");switch(i.length%4){case 0:break;case 2:i+="==";break;case 3:i+="=";break;default:throw new Error("base64 string is not of the correct length")}try{return Go(i)}catch{return atob(i)}}function Xo(d,i){if(typeof d!="string")throw new rt("Invalid token specified: must be a string");i||(i={});const e=i.header===!0?0:1,n=d.split(".")[e];if(typeof n!="string")throw new rt(`Invalid token specified: missing part #${e+1}`);let o;try{o=Wo(n)}catch(r){throw new rt(`Invalid token specified: invalid base64 for part #${e+1} (${r.message})`)}try{return JSON.parse(o)}catch(r){throw new rt(`Invalid token specified: invalid json for part #${e+1} (${r.message})`)}}const Jo=d=>{const{shopping:i,signUp:e}=d,n=t.useNavigate();function o(a){n(a)}const r=JSON.parse(localStorage.getItem("token")||"{}");return t.jsxRuntimeExports.jsxs("div",{className:C.buttons,children:[i&&t.jsxRuntimeExports.jsx(ft,{}),!r.data&&t.jsxRuntimeExports.jsx(ct,{onClick:()=>o("/customer-dash"),type:"Secondary",style:{padding:10},children:"Login"}),!r.data&&e&&t.jsxRuntimeExports.jsx(ct,{onClick:()=>o("/customer-dash"),type:"Primary",style:{padding:10},children:"Sign Up"}),r.data&&t.jsxRuntimeExports.jsx(Et,{token:r.data})]})},ft=()=>{const[d,i]=m.useState(!1),[e,n]=m.useState([]),{cart:o,getProducts:r}=t.useCart();function a(R){for(let l=0;l<o.parts.length;l++)for(let S=0;S<R.variants.length;S++)if(o.parts[l].productVariantId===R.variants[l].id)return o.parts[l].productVariantId}function s(R){for(let l=0;l<o.parts.length;l++)for(let S=0;S<R.variants.length;S++)if(o.parts[l].productVariantId===R.variants[l].id)return o.parts[l].quantity}m.useEffect(()=>{(async()=>{const l=o.parts.map(h=>String(h.productId)),j=(await r([...l])).map(h=>({...h,activeVariantId:a(h),quantity:s(h)}));n(j)})()},[o]);function c(R){var l;return!R||!(R!=null&&R.variants)?!1:(l=R.variants.find(S=>S.id===R.activeVariantId))==null?void 0:l.subscriptionSettings}const u=o.parts.length>0&&e.length>0&&!c(e[0]);return t.jsxRuntimeExports.jsxs(t.jsxRuntimeExports.Fragment,{children:[t.jsxRuntimeExports.jsxs("div",{className:C.button,onClick:R=>{R.stopPropagation(),window.location.pathname!=="/admin/builder"&&i(!0)},children:[t.jsxRuntimeExports.jsx(t.Icon,{name:"Handbag",fill:"var(--icon-primary)"}),u&&t.jsxRuntimeExports.jsx("div",{className:C.shoppingCount,children:o.parts.length})]}),d&&t.jsxRuntimeExports.jsx(t.Modal,{close:i,children:t.jsxRuntimeExports.jsx(bt,{activeProducts:e,isCartNotEmpty:u})})]})},bt=d=>{const{activeProducts:i,isCartNotEmpty:e}=d,{cart:n,reset:o,getTotalAndDiscount:r,updateQuantityOfProduct:a}=t.useCart(),s=t.useNavigate();function c(l){s(l)}function u(l){a({productId:l.id,productVariantId:l.activeVariantId,quantity:l.quantity+1})}function R(l){a({productId:l.id,productVariantId:l.activeVariantId,quantity:l.quantity-1})}return t.jsxRuntimeExports.jsxs("div",{className:C.modal,onClick:l=>l.stopPropagation(),children:[t.jsxRuntimeExports.jsxs("div",{className:C.top,children:[t.jsxRuntimeExports.jsxs("div",{className:C.info,children:[t.jsxRuntimeExports.jsx("span",{className:C.title,children:"Cart"}),e&&t.jsxRuntimeExports.jsx("div",{className:C.count,children:n.parts.length})]}),t.jsxRuntimeExports.jsx("button",{className:t.clx(C.clear,{[C.activeClear]:e}),disabled:!e,onClick:()=>o(),children:"Clear all"})]}),e?t.jsxRuntimeExports.jsxs("div",{className:C.cart,children:[t.jsxRuntimeExports.jsx("div",{className:C.products,children:i.map(l=>t.jsxRuntimeExports.jsxs("div",{className:C.product,children:[t.jsxRuntimeExports.jsxs("div",{className:C.productInfo,children:[t.jsxRuntimeExports.jsx("img",{src:`https://imagedelivery.net/${l.images[0].cfId}/w=500`,alt:"image",width:"100%",height:"100%",className:C.image}),t.jsxRuntimeExports.jsxs("div",{className:C.content,children:[t.jsxRuntimeExports.jsx("div",{className:C.name,children:l.name}),t.jsxRuntimeExports.jsxs("div",{className:C.price,children:["$",l.variants.find(S=>S.id===l.activeVariantId).price.amount*((l==null?void 0:l.quantity)||1)]})]})]}),t.jsxRuntimeExports.jsxs("div",{className:C.productButtons,children:[t.jsxRuntimeExports.jsx("div",{onClick:()=>{l.quantity!==1&&R(l)},className:C.productButton,children:t.jsxRuntimeExports.jsx(t.Icon,{name:"Minus",fill:"#757575",width:20,height:20})}),t.jsxRuntimeExports.jsx("div",{className:C.productCount,children:l.quantity}),t.jsxRuntimeExports.jsx("div",{onClick:()=>u(l),className:C.productButton,children:t.jsxRuntimeExports.jsx(t.Icon,{name:"Plus",fill:"#757575",width:20,height:20})})]})]},l.id))}),t.jsxRuntimeExports.jsxs("div",{className:C.bottom,children:[t.jsxRuntimeExports.jsxs("div",{className:C.subtotal,children:[t.jsxRuntimeExports.jsxs("div",{className:C.block,children:[t.jsxRuntimeExports.jsx("span",{children:"Subtotal"}),t.jsxRuntimeExports.jsx(t.Icon,{name:"Info",width:20,height:20,fill:"#757575"})]}),t.jsxRuntimeExports.jsxs("div",{className:C.total,children:["$",r().total]})]}),t.jsxRuntimeExports.jsx(ct,{onClick:()=>c("/checkout"),children:"Checkout"})]})]}):t.jsxRuntimeExports.jsx(vt,{})]})},vt=()=>t.jsxRuntimeExports.jsxs("div",{className:C.empty,children:[t.jsxRuntimeExports.jsx("div",{children:t.jsxRuntimeExports.jsx(t.Icon,{name:"Handbag"})}),t.jsxRuntimeExports.jsx("span",{children:"Your cart is empty"}),t.jsxRuntimeExports.jsxs("span",{children:["Check out the store's products and add them"," ",t.jsxRuntimeExports.jsx("a",{href:"/products",className:C.link,children:"here"})]})]}),Et=({token:d})=>{const[i,e]=m.useState("test-email@gmail.com"),n=t.useNavigate();m.useEffect(()=>{(async()=>{const a=Xo(d);e(a.email)})()},[d]);function o(r){n(r)}return t.jsxRuntimeExports.jsx("div",{className:C.userInfo,onClick:()=>o("/customer-dash"),children:t.jsxRuntimeExports.jsx("div",{children:i||"test-email@gmail.com"})})},Qo="_share_9g414_1",Ko="_modal_9g414_8",Zo="_header_9g414_14",ti="_socials_9g414_24",ei="_social_9g414_24",si="_copy_9g414_34",ni="_title_9g414_41",oi="_copyWrapper_9g414_47",ii="_copyText_9g414_56",W={share:Qo,modal:Ko,header:Zo,socials:ti,social:ei,copy:si,title:ni,copyWrapper:oi,copyText:ii},ri=()=>{const{isOpenModal:d,setIsOpenModal:i}=t.useShareLinkStore();function e(){i(!0)}return t.jsxRuntimeExports.jsxs(t.jsxRuntimeExports.Fragment,{children:[t.jsxRuntimeExports.jsx(t.Button,{className:W.share,onClick:n=>{n.stopPropagation(),e()},type:"Secondary",children:t.jsxRuntimeExports.jsx(t.Icon,{name:"Share",fill:"#757575",hoverable:!0})}),d&&t.jsxRuntimeExports.jsx(t.Modal,{close:i,children:t.jsxRuntimeExports.jsx(ai,{})})]})},ht={facebook:"FacebookLogo","x.com":"TwitterLogo",telegram:"TelegramLogo",instagram:"InstagramLogo",discord:"MessengerLogo",tiktok:"TiktokLogo"},ai=()=>{const{setIsOpenModal:d}=t.useShareLinkStore(),{notification:i,setNotification:e}=t.useNotificationStore(),n=window.location.href;function o(){navigator.clipboard.writeText(n),e({message:"Link copied to clipboard",status:"success"})}return t.jsxRuntimeExports.jsxs("div",{className:W.modal,onClick:r=>r.stopPropagation(),children:[t.jsxRuntimeExports.jsxs("div",{className:W.header,children:[t.jsxRuntimeExports.jsx("div",{className:W.title,children:"Share this Post"}),t.jsxRuntimeExports.jsx(t.Icon,{name:"X",fill:"#757575",onClick:()=>d(!1),hoverable:!0})]}),t.jsxRuntimeExports.jsx("div",{className:W.socials,children:Object.keys(ht).map(r=>t.jsxRuntimeExports.jsx("div",{className:W.social,children:t.jsxRuntimeExports.jsx(t.Icon,{name:ht[r]})}))}),t.jsxRuntimeExports.jsxs("div",{className:W.copyWrapper,children:[t.jsxRuntimeExports.jsx("div",{className:t.clx(W.copy,W.copyText),onClick:o,children:n}),t.jsxRuntimeExports.jsx("div",{onClick:o,className:W.copy,children:i?t.jsxRuntimeExports.jsx(t.Icon,{name:"Check"}):t.jsxRuntimeExports.jsx(t.Icon,{name:"Copy"})})]})]})},ci="_accordion_1s1lq_1",li="_header_1s1lq_9",ui="_icon_1s1lq_18",di="_open_1s1lq_21",xi="_content_1s1lq_25",it={accordion:ci,header:li,icon:ui,open:di,content:xi},pi=({title:d,content:i})=>{const[e,n]=m.useState(!1),[o,r]=m.useState(0),a=m.useRef(null),s=()=>{n(!e)};return m.useEffect(()=>{a.current&&r(e?a.current.scrollHeight:0)},[e]),t.jsxRuntimeExports.jsxs("div",{className:it.accordion,children:[t.jsxRuntimeExports.jsxs("div",{className:it.header,onClick:s,children:[t.jsxRuntimeExports.jsx("h5",{id:"h5",children:d}),t.jsxRuntimeExports.jsx("div",{className:t.clx(it.icon,{[it.open]:e}),children:t.jsxRuntimeExports.jsx(t.Icon,{name:"CaretDown"})})]}),t.jsxRuntimeExports.jsx("div",{ref:a,className:it.content,style:{height:`${o}px`},children:t.jsxRuntimeExports.jsx("p",{id:"p",children:i})})]})},mi="_wrapper_1r14x_1",hi="_label_1r14x_9",_i="_input_1r14x_18",ji="_required_1r14x_35",gi="_paddingless_1r14x_39",fi="_content_1r14x_43",bi="_borderless_1r14x_58",vi="_rightIcon_1r14x_63",Z={wrapper:mi,label:hi,input:_i,required:ji,paddingless:gi,content:fi,borderless:bi,rightIcon:vi},Ei=d=>{const{onChange:i,style:e,label:n,value:o,type:r,min:a,max:s,placeholder:c,disabled:u=!1,required:R=!1,regex:l,paddingless:S=!1,borderless:j=!1,editable:h=!1,isSearch:p=!1}=d,{themeSettings:B}=t.useThemeSettingsStore(),{inputs:P}=B,[g,A]=m.useState(!1);function $(b,L){if(b.startsWith("#")){let I,O,q;return b.length===7?(I=parseInt(b.slice(1,3),16),O=parseInt(b.slice(3,5),16),q=parseInt(b.slice(5,7),16)):b.length===4&&(I=parseInt(b[1]+b[1],16),O=parseInt(b[2]+b[2],16),q=parseInt(b[3]+b[3],16)),`rgba(${I}, ${O}, ${q}, ${L})`}const v={black:"#000000",white:"#ffffff",red:"#ff0000",green:"#00ff00",blue:"#0000ff"}[b.toLowerCase()];return v?$(v,L):b}function w(b){return Number(b)<0?String(a):b}function _(b){return!R||!l?!0:new RegExp(l).test(b)}return t.jsxRuntimeExports.jsxs("div",{className:Z.wrapper,children:[n&&t.jsxRuntimeExports.jsx("label",{className:Z.label,htmlFor:n,children:n}),t.jsxRuntimeExports.jsxs("div",{className:Z.content,style:{paddingRight:P.general.height+15,...e,backgroundColor:$(P.field.color,P.field.opacity/100)},children:[t.jsxRuntimeExports.jsx("input",{id:n,type:r||"text",onChange:b=>{if(r==="text")i(b.target.value);else{const L=w(b.target.value);i(L)}},value:o,autoComplete:"off",placeholder:c||"Type something...",className:t.clx(Z.input,{[Z.required]:g&&R&&!_(o),[Z.paddingless]:S,[Z.borderless]:j}),min:r==="number"?a:void 0,max:r==="number"?s:void 0,disabled:u,onFocus:()=>A(!0)}),p&&t.jsxRuntimeExports.jsx("div",{className:Z.rightIcon,children:t.jsxRuntimeExports.jsx(t.Icon,{name:"MagnifyingGlass",fill:"var(--icon-secondary)",width:P.general.height,height:P.general.height})}),h&&t.jsxRuntimeExports.jsx("div",{children:t.jsxRuntimeExports.jsx(t.Icon,{name:"Sliders",width:20,height:20,hoverable:!0})})]})]})},Ri="_wrapper_st58d_1",yi="_label_st58d_10",Ii="_textarea_st58d_18",ki="_length_st58d_33",at={wrapper:Ri,label:yi,textarea:Ii,length:ki},$i=d=>{const{onChange:i,label:e,value:n,maxLength:o,placeholder:r="Type something..."}=d,[a,s]=m.useState(n.length);return t.jsxRuntimeExports.jsxs("div",{className:at.wrapper,children:[e&&t.jsxRuntimeExports.jsx("label",{className:at.label,htmlFor:e,children:e}),t.jsxRuntimeExports.jsx("textarea",{id:e,defaultValue:n,onChange:c=>{s(c.target.value.length),i(c.target.value)},placeholder:r,className:at.textarea,maxLength:o}),o&&t.jsxRuntimeExports.jsxs("div",{className:at.length,children:[a,"/",o]})]})};exports.ChooseImage=t.ChooseImage;exports.ChooseImageModal=t.ChooseImageModal;exports.Icon=t.Icon;exports.InputSettings=t.Input;exports.Loader=t.Loader;exports.Modal=t.Modal;exports.Select=t.Select;exports.Switch=t.Switch;exports.TextareaSettings=t.Textarea;exports.Accordion=pi;exports.Button=ct;exports.ButtonTypeSettings=jt;exports.ButtonsSettings=Zs;exports.CategorySettings=Me;exports.EmptyCart=vt;exports.FormSettings=us;exports.HeaderButtons=Jo;exports.InputUI=Ei;exports.ItemsSettings=_t;exports.LayoutSettings=Ot;exports.ListingSelector=qn;exports.ProductOptions=ao;exports.RangeSelector=ut;exports.ShareLink=ri;exports.ShoppingButton=ft;exports.ShoppingModalCart=bt;exports.TextSettings=mt;exports.TextareaUI=$i;exports.TypesText=pt;exports.UserInfo=Et;
|