@billgangcom/theme-lib 1.50.0 → 1.52.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/index.cjs.js CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./builder.cjs.js"),o=require("./index-DSOQcy7R.cjs");exports.App=e.App;exports.ColorVariables=e.ColorVariables;exports.hotReload=e.hotReload;exports.iconNames=e.iconNames;exports.splitTextIntoSpans=o.splitTextIntoSpans;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./builder.cjs.js"),o=require("./index-BhPRECBt.cjs");exports.App=e.App;exports.ColorVariables=e.ColorVariables;exports.hotReload=e.hotReload;exports.iconNames=e.iconNames;exports.splitTextIntoSpans=o.splitTextIntoSpans;
package/dist/index.es.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import { App as e, ColorVariables as p, hotReload as r, iconNames as s } from "./builder.es.js";
2
- import { s as l } from "./index-C87hOfMQ.js";
2
+ import { s as l } from "./index-CSt-42JF.js";
3
3
  export {
4
4
  e as App,
5
5
  p as ColorVariables,
@@ -2,7 +2,3 @@ export declare const getDynamicPage: (route: string) => Promise<{
2
2
  data: any;
3
3
  status: number;
4
4
  } | null | undefined>;
5
- export declare const getThemeAndSettings: () => Promise<{
6
- data: any;
7
- status: number;
8
- }>;
@@ -0,0 +1,5 @@
1
+ import React from 'react';
2
+ interface Props {
3
+ }
4
+ export declare const ValidationPage: React.FC<Props>;
5
+ export {};
@@ -5,7 +5,7 @@ interface Props {
5
5
  onChange: (value: string) => void;
6
6
  label?: string;
7
7
  value: string;
8
- type?: 'text' | 'number';
8
+ type?: 'text' | 'number' | 'password';
9
9
  min?: number;
10
10
  max?: number;
11
11
  disabled?: boolean;
package/dist/ui.cjs.js CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("./index-DSOQcy7R.cjs"),_=require("react");require("@phosphor-icons/react");const ut="_wrapper_1ibay_2",xt="_alignmentBlock_1ibay_8",pt="_title_1ibay_15",mt="_subtitle_1ibay_22",jt="_alignmentContent_1ibay_29",ht="_alignments_1ibay_37",_t="_alignment_1ibay_8",gt="_circle_1ibay_60",ft="_paddings_1ibay_67",bt="_padding_1ibay_67",Et="_active_1ibay_91",vt="_input_1ibay_98",F={wrapper:ut,alignmentBlock:xt,title:pt,subtitle:mt,alignmentContent:jt,alignments:ht,alignment:_t,circle:gt,paddings:ft,padding:bt,active:Et,input:vt},yt=["topLeft","top","topRight","left","center","right","bottomLeft","bottom","bottomRight"],Rt=["left","top","right","bottom"],It=u=>{const{alignment:i,padding:e,setPadding:s,setAlignment:n}=u;function l(j){switch(j){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(j){switch(j){case"left":return"AlignLeft";case"right":return"AlignRight";case"top":return"AlignTop";case"bottom":return"AlignBottom"}}const[r,m]=_.useState(null),[y,C]=_.useState(null);return t.jsxRuntimeExports.jsxs("div",{className:F.layout,children:[t.jsxRuntimeExports.jsx("h3",{className:F.title,children:"Layout"}),t.jsxRuntimeExports.jsxs("div",{className:F.alignmentBlock,children:[t.jsxRuntimeExports.jsx("h5",{className:F.subtitle,children:"Alignment"}),t.jsxRuntimeExports.jsxs("div",{className:F.alignmentContent,children:[t.jsxRuntimeExports.jsx("div",{className:F.alignments,children:yt.map(j=>t.jsxRuntimeExports.jsxs("div",{onClick:()=>{n(j)},className:F.alignment,onMouseEnter:()=>{m(j)},onMouseLeave:()=>{m(null)},children:[j!==i&&r!==j&&t.jsxRuntimeExports.jsx("div",{className:F.circle}),j!==i&&r===j&&t.jsxRuntimeExports.jsx(t.Icon,{name:l(r),fill:"#c2c2c2",width:22,height:22}),j===i&&t.jsxRuntimeExports.jsx(t.Icon,{name:l(i),fill:"#FF3F19",width:22,height:22})]},j))}),t.jsxRuntimeExports.jsx("div",{className:F.paddings,children:Rt.map(j=>t.jsxRuntimeExports.jsxs("label",{className:t.clx(F.padding,{[F.active]:y===j}),onFocus:()=>{C(j)},onBlur:()=>{C(null)},children:[t.jsxRuntimeExports.jsx("div",{children:t.jsxRuntimeExports.jsx(t.Icon,{name:a(j),width:20,height:20})}),t.jsxRuntimeExports.jsx(t.Input,{type:"number",value:String(e[j]),onChange:o=>s({...e,[j]:Number(o)}),paddingless:!0,borderless:!0})]},j))})]})]})]})},St="_title_82zux_1",Nt="_subtitle_82zux_5",kt="_header_82zux_12",Ct="_text_82zux_13",$t="_productsBlock_82zux_14",Bt="_top_82zux_26",wt="_itemsBlock_82zux_35",Pt="_typeTexts_82zux_41",Mt="_block_82zux_48",Tt="_active_82zux_61",qt="_products_82zux_14",At="_product_82zux_14",Ot="_button_82zux_80",Lt="_disabled_82zux_91",zt="_image_82zux_95",Dt="_info_82zux_102",Ht="_name_82zux_114",Ut="_buttons_82zux_118",Ft="_modal_82zux_125",Vt="_link_82zux_145",Yt="_modalOptions_82zux_151",Wt="_addButton_82zux_157",Gt="_deleteButton_82zux_179",V={title:St,subtitle:Nt,header:kt,text:Ct,productsBlock:$t,top:Bt,itemsBlock:wt,typeTexts:Pt,block:Mt,active:Tt,products:qt,product:At,button:Ot,disabled:Lt,image:zt,info:Dt,name:Ht,buttons:Ut,modal:Ft,link:Vt,modalOptions:Yt,addButton:Wt,deleteButton:Gt},Xt=u=>{const{isActiveItems:i,setIsActiveItems:e,items:s,setItems:n,other:l,title:a,subtitle:r,draggable:m=!1,withImage:y=!1,addable:C=!0,itemsOptions:j,hasRangeSelector:o=!1,rangeSelectorOptions:b,limit:d,autoScrollInterval:g,deletable:E}=u;function O(c){if(y)return c?t.jsxRuntimeExports.jsx("img",{src:`https://imagedelivery.net/${c[0]}/w=1000`,alt:"image",width:16,height:16}):t.jsxRuntimeExports.jsx(t.Icon,{name:"Image",width:16,height:16,fill:"#757575"})}const M=(c,N=!1)=>{const B=j.find(k=>k.id===c);if(!B)return;const U=t.jsxRuntimeExports.jsxs(t.jsxRuntimeExports.Fragment,{children:[m&&t.jsxRuntimeExports.jsx("div",{children:t.jsxRuntimeExports.jsx(t.Icon,{name:"DotsSixVertical",hoverable:!0,width:20,height:20})}),t.jsxRuntimeExports.jsx(t.Select,{onChange:k=>{const p=[...s],S=j.find(R=>R.name===k);if(!S)return;const x=S.id,f=p.map(R=>R===c?x:R);n([...f])},value:B.name,options:j.filter(k=>!s.find(p=>p===k.id)).map(k=>k.name),leftAddon:O(B.images)}),N&&t.jsxRuntimeExports.jsx("div",{className:V.buttons,children:t.jsxRuntimeExports.jsx("div",{className:V.deleteButton,children:t.jsxRuntimeExports.jsx(t.Icon,{name:"Trash",hoverable:!0,width:20,height:20,fill:"#C12A2A",onClick:()=>n(s.filter(k=>k!==c))})})})]});return t.jsxRuntimeExports.jsx("div",{className:V.product,children:U},c)};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:c=>e==null?void 0:e(c)})]}),o&&b&&t.jsxRuntimeExports.jsx(t.RangeSelector,{...b}),t.jsxRuntimeExports.jsxs("div",{className:V.products,children:[r&&t.jsxRuntimeExports.jsx("h5",{className:V.subtitle,children:r}),s.map(c=>M(c,E)),C&&t.jsxRuntimeExports.jsx("div",{style:{width:"100%",display:"flex",justifyContent:"center",gap:5},children:t.jsxRuntimeExports.jsx(t.Button,{withoutHover:!0,className:t.clx(V.button,{[V.disabled]:!!(d&&d<=s.length||s.length===j.length)}),size:"s",disabled:!!(d&&d<=s.length||s.length===j.length),onClick:()=>{const c=[...s];let N=null;if(j){for(let B=0;B<j.length;B++)if(!s.find(U=>U===j[B].id)){N=j[B];break}}c.push((N==null?void 0:N.id)||j[0].id),n(c)},style:{width:"fit-content"},children:t.jsxRuntimeExports.jsxs("div",{className:V.addButton,children:[t.jsxRuntimeExports.jsx("span",{children:"Add Option"}),t.jsxRuntimeExports.jsx(t.Icon,{name:"Plus",width:16,height:16})]})})})]}),l!==void 0&&t.jsxRuntimeExports.jsx(t.OtherSettings,{items:l}),g!==void 0&&t.jsxRuntimeExports.jsx(t.Input,{label:"Auto scroll interval",type:"number",value:String(g.scrollInterval),onChange:c=>g.setScrollInterval(Number(c)),min:.1,max:100,style:{width:"100%"},postfix:"sec."})]})},Qt="_title_roi3a_1",Jt="_subtitle_roi3a_5",Kt="_header_roi3a_12",Zt="_text_roi3a_13",te="_productsBlock_roi3a_14",ee="_top_roi3a_26",se="_itemsBlock_roi3a_35",ne="_typeTexts_roi3a_41",oe="_block_roi3a_48",ie="_active_roi3a_61",re="_products_roi3a_14",ae="_product_roi3a_14",ce="_button_roi3a_80",le="_disabled_roi3a_91",de="_image_roi3a_95",ue="_info_roi3a_102",xe="_name_roi3a_114",pe="_buttons_roi3a_118",me="_modal_roi3a_125",je="_link_roi3a_145",he="_modalOptions_roi3a_151",_e="_addButton_roi3a_164",ge="_deleteButton_roi3a_179",fe="_closeIcon_roi3a_191",z={title:Qt,subtitle:Jt,header:Kt,text:Zt,productsBlock:te,top:ee,itemsBlock:se,typeTexts:ne,block:oe,active:ie,products:re,product:ae,button:ce,disabled:le,image:de,info:ue,name:xe,buttons:pe,modal:me,link:je,modalOptions:he,addButton:_e,deleteButton:ge,closeIcon:fe};function be({product:u,children:i}){const{attributes:e,listeners:s,setNodeRef:n,transform:l,transition:a,isDragging:r}=t.useSortable({id:u.id}),m={transform:t.CSS.Transform.toString(l),transition:a};return t.jsxRuntimeExports.jsx("div",{ref:n,style:m,className:`${z.product} ${r?z.dragging:""}`,...e,...s,children:i})}const Ee=u=>{const{isActiveItems:i,setIsActiveItems:e,items:s,setItems:n,title:l,subtitle:a,editable:r=!0,draggable:m=!1,deletable:y=!0,addable:C=!0,itemsType:j,itemsOptions:o,addableOptions:b={},limit:d}=u,[g,E]=_.useState(null),[O,M]=_.useState(null),c=_.useRef(null),N=t.useSensors(t.useSensor(t.PointerSensor,{activationConstraint:{distance:5}}));_.useEffect(()=>{if(g){const p=[...s].map(S=>S.id===g.id?g:S);n(p)}},[g]),_.useEffect(()=>{c.current&&O&&(c.current.getBoundingClientRect().height,O.top)},[c.current,O]);const B=(p,S)=>{p.stopPropagation();const x=p.target.getBoundingClientRect();M({top:x.top+window.scrollY,left:x.left-30}),E(S)},U=p=>{const{active:S,over:x}=p;if(x&&S.id!==x.id){const f=s.findIndex(T=>T.id===S.id),R=s.findIndex(T=>T.id===x.id);if(f!==-1&&R!==-1){const T=[...s],[$]=T.splice(f,1);T.splice(R,0,$),n(T)}}},k=(p,S)=>{const x=t.jsxRuntimeExports.jsxs(t.jsxRuntimeExports.Fragment,{children:[m&&t.jsxRuntimeExports.jsx("div",{children:t.jsxRuntimeExports.jsx(t.Icon,{name:"DotsSixVertical",hoverable:!0,width:20,height:20})}),j==="select"&&o&&t.jsxRuntimeExports.jsx(t.Select,{onChange:f=>{const R=[...s],T=o.find(w=>w.name===f);if(!T)return;const $=R.map(w=>w.id===p.id?{...T,name:{"en-US":f}}:w);E({...p,name:{"en-US":f}}),n([...$])},value:p.name,options:o.filter(f=>!s.find(R=>R.name===f.name)).map(f=>f.name)}),t.jsxRuntimeExports.jsxs("div",{className:z.buttons,children:[r&&t.jsxRuntimeExports.jsx("div",{className:z.deleteButton,children:t.jsxRuntimeExports.jsx(t.Icon,{name:"Sliders",hoverable:!0,width:20,height:20,onClick:f=>B(f,p)})}),y&&t.jsxRuntimeExports.jsx("div",{className:z.deleteButton,children:t.jsxRuntimeExports.jsx(t.Icon,{name:"Trash",hoverable:!0,width:20,height:20,fill:"#C12A2A",onClick:()=>n(s.filter(f=>f.id!==p.id))})})]})]});return m?t.jsxRuntimeExports.jsx(be,{product:p,index:S,children:x},p.id):t.jsxRuntimeExports.jsx("div",{className:z.product,children:x},p.id)};return t.jsxRuntimeExports.jsxs("div",{className:z.productsBlock,children:[(l||i!==void 0)&&t.jsxRuntimeExports.jsxs("div",{className:z.top,children:[l&&t.jsxRuntimeExports.jsx("h3",{className:z.title,children:l}),i!==void 0&&t.jsxRuntimeExports.jsx(t.Switch,{current:i,onChange:p=>e==null?void 0:e(p)})]}),t.jsxRuntimeExports.jsxs("div",{className:z.products,children:[a&&t.jsxRuntimeExports.jsx("h5",{className:z.subtitle,children:a}),m?t.jsxRuntimeExports.jsx(t.DndContext,{sensors:N,onDragEnd:U,children:t.jsxRuntimeExports.jsx(t.SortableContext,{items:s.map(p=>p.id),strategy:t.verticalListSortingStrategy,children:s.map((p,S)=>k(p,S))})}):s.map((p,S)=>k(p,S)),C&&t.jsxRuntimeExports.jsx("div",{style:{width:"100%",display:"flex",justifyContent:"center"},children:t.jsxRuntimeExports.jsx(t.Button,{withoutHover:!0,className:t.clx(z.button,{[z.disabled]:!!(d&&d<=s.length||s.length===(o==null?void 0:o.length))}),size:"s",disabled:!!(d&&d<=s.length||s.length===(o==null?void 0:o.length)),onClick:()=>{const p=[...s];let S=null;if(o){for(let x=0;x<o.length;x++)if(!s.find(f=>f.id===o[x].id)){S=o[x];break}}j==="select"&&o&&p.push({name:S?S.name:o[0].name,id:(S==null?void 0:S.id)||o[0].id,...b}),n(p)},style:{width:"fit-content"},children:t.jsxRuntimeExports.jsxs("div",{className:z.addButton,children:[t.jsxRuntimeExports.jsx("span",{children:"Add Option"}),t.jsxRuntimeExports.jsx(t.Icon,{name:"Plus",width:16,height:16})]})})})]})]})};function ve(u){const{product:i,children:e}=u,{attributes:s,listeners:n,setNodeRef:l,transform:a,transition:r,isDragging:m}=t.useSortable({id:i.id}),y={transform:t.CSS.Transform.toString(a),transition:r};return t.jsxRuntimeExports.jsx("div",{ref:l,style:y,className:`${t.styles.product} ${m?t.styles.dragging:""}`,...s,...n,children:e})}const ye=u=>{const{isActiveItems:i,setIsActiveItems:e,items:s,setItems:n,other:l,title:a,subtitle:r,editable:m=!0,draggable:y=!1,withImage:C=!1,deletable:j=!0,addable:o=!0,itemsType:b,itemsPlaceholder:d="",itemsOptions:g,hasRangeSelector:E=!1,rangeSelectorOptions:O,modalOptions:M,addableOptions:c={}}=u,[N,B]=_.useState(null),[U,k]=_.useState({top:0,left:0}),[p,S]=_.useState(null),x=_.useRef(null),[f,R]=_.useState(!1),T=t.useSensors(t.useSensor(t.PointerSensor,{activationConstraint:{distance:5}}));_.useEffect(()=>{const h=()=>{B(null),R(!1)};return document.body.addEventListener("click",h),B(null),R(!1),()=>{B(null),R(!1),document.body.removeEventListener("click",h)}},[]),_.useEffect(()=>{if(N){const h=[...s].map(P=>P.id===N.id?N:P);n(h)}},[N]),_.useEffect(()=>{if(x.current&&p){const h=x.current.getBoundingClientRect().height,P=window.innerHeight;let q=p.top;q+h>P+window.scrollY-200&&(q=P+window.scrollY-h-200),q<0&&(q=10),k({top:q,left:p.left})}},[x.current,p]);const $=(h,P)=>{h.stopPropagation();const q=h.target.getBoundingClientRect();S({top:q.top+window.scrollY,left:q.left-30}),B(P),R(!0)};function w(h){if(C)return h?t.jsxRuntimeExports.jsx("img",{src:`https://imagedelivery.net/${h[0]}/w=1000`,alt:"image",width:16,height:16}):t.jsxRuntimeExports.jsx(t.Icon,{name:"Image",width:16,height:16,fill:"#757575"})}const G=h=>{const{active:P,over:q}=h;if(q&&P.id!==q.id){const A=s.findIndex(D=>D.id===P.id),K=s.findIndex(D=>D.id===q.id);if(A!==-1&&K!==-1){const D=[...s],[Y]=D.splice(A,1);D.splice(K,0,Y),n(D)}}},Z=h=>{var q;const P=t.jsxRuntimeExports.jsxs(t.jsxRuntimeExports.Fragment,{children:[y&&t.jsxRuntimeExports.jsx("div",{children:t.jsxRuntimeExports.jsx(t.Icon,{name:"DotsSixVertical",hoverable:!0,width:20,height:20})}),b==="select"&&g&&t.jsxRuntimeExports.jsx(t.Select,{onChange:A=>{const D=[...s].map(Y=>Y.id===h.id?{...h,name:{"en-US":A}}:Y);B({...h,name:{"en-US":A}}),n([...D])},value:h.name["en-US"],options:g.filter(A=>!s.find(K=>K.name["en-US"]===A)),leftAddon:w(h.images)}),b==="input"&&t.jsxRuntimeExports.jsx(t.Input,{onChange:A=>{const D=[...s].map(Y=>Y.id===h.id?{...h,name:{"en-US":A}}:Y);n([...D])},value:h.name["en-US"],placeholder:d}),b==="image"&&t.jsxRuntimeExports.jsx(t.ChooseImage,{onChange:A=>{const D=[...s].map(Y=>Y.id===h.id?{...h,images:A}:Y);n([...D])},activeImage:(q=s.find(A=>A.id===h.id))==null?void 0:q.images[0]}),t.jsxRuntimeExports.jsxs("div",{className:t.styles.buttons,children:[m&&t.jsxRuntimeExports.jsx("div",{className:t.styles.deleteButton,children:t.jsxRuntimeExports.jsx(t.Icon,{name:"Sliders",hoverable:!0,width:20,height:20,onClick:A=>$(A,h)})}),j&&t.jsxRuntimeExports.jsx("div",{className:t.styles.deleteButton,children:t.jsxRuntimeExports.jsx(t.Icon,{name:"Trash",hoverable:!0,width:20,height:20,fill:"#C12A2A",onClick:()=>n(s.filter(A=>A.id!==h.id))})})]})]});return y?t.jsxRuntimeExports.jsx(ve,{product:h,children:P},h.id):t.jsxRuntimeExports.jsx("div",{className:t.styles.product,children:P},h.id)};return t.jsxRuntimeExports.jsxs("div",{className:t.styles.productsBlock,children:[(a||i!==void 0)&&t.jsxRuntimeExports.jsxs("div",{className:t.styles.top,children:[a&&t.jsxRuntimeExports.jsx("h3",{className:t.styles.title,children:a}),i!==void 0&&t.jsxRuntimeExports.jsx(t.Switch,{current:i,onChange:h=>e==null?void 0:e(h)})]}),N&&m&&M&&f&&t.jsxRuntimeExports.jsx(t.ItemPopup,{ref:x,activeItem:N,setActiveItem:B,popupPosition:U,modalOptions:M,setIsOpenModal:R}),E&&O&&t.jsxRuntimeExports.jsx(t.RangeSelector,{...O}),t.jsxRuntimeExports.jsxs("div",{className:t.styles.products,children:[r&&t.jsxRuntimeExports.jsx("h5",{className:t.styles.subtitle,children:r}),y?t.jsxRuntimeExports.jsx(t.DndContext,{sensors:T,onDragEnd:G,children:t.jsxRuntimeExports.jsx(t.SortableContext,{items:s.map(h=>h.id),strategy:t.verticalListSortingStrategy,children:s.map(h=>Z(h))})}):s.map(h=>Z(h)),o&&t.jsxRuntimeExports.jsx("div",{style:{width:"100%",display:"flex",justifyContent:"center"},children:t.jsxRuntimeExports.jsx(t.Button,{withoutHover:!0,className:t.styles.button,size:"s",onClick:()=>{const h=[...s];let P=null;if(g){for(let q=0;q<g.length;q++)if(!s.find(A=>A.name["en-US"]===g[q])){P=g[q];break}}b==="select"&&g?h.push({name:{"en-US":P||g[0]},id:t.v4(),...c,maxSymbols:100}):b==="input"?h.push({name:{"en-US":""},id:t.v4(),...c,maxSymbols:100}):h.push({name:{"en-US":`Image ${s.length+1}`},id:t.v4(),...c,maxSymbols:100}),n(h)},style:{width:"fit-content"},children:t.jsxRuntimeExports.jsxs("div",{className:t.styles.addButton,children:[t.jsxRuntimeExports.jsx("span",{children:"Add Option"}),t.jsxRuntimeExports.jsx(t.Icon,{name:"Plus",width:16,height:16})]})})})]}),l!==void 0&&t.jsxRuntimeExports.jsx(t.OtherSettings,{items:l})]})},Re="_subtitle_jql1y_1",Ie="_header_jql1y_8",Se="_text_jql1y_9",Ne="_productsBlock_jql1y_10",ke="_buttonsBlock_jql1y_11",Ce="_top_jql1y_23",$e="_itemsBlock_jql1y_32",Be="_typeTexts_jql1y_38",we="_block_jql1y_45",Pe="_active_jql1y_58",Me="_products_jql1y_10",Te="_product_jql1y_10",qe="_button_jql1y_11",Ae="_image_jql1y_88",Oe="_info_jql1y_95",Le="_name_jql1y_107",ze="_buttons_jql1y_11",De="_modal_jql1y_118",He="_other_jql1y_138",Ue="_options_jql1y_144",Fe="_addButton_jql1y_150",Ve="_deleteButton_jql1y_165",X={subtitle:Re,header:Ie,text:Se,productsBlock:Ne,buttonsBlock:ke,top:Ce,itemsBlock:$e,typeTexts:Be,block:we,active:Pe,products:Me,product:Te,button:qe,image:Ae,info:Oe,name:Le,buttons:ze,modal:De,other:He,options:Ue,addButton:Fe,deleteButton:Ve},nt=u=>{const{buttons:i,setButtons:e,deletable:s=!0,addable:n=!0,editableLink:l=!0}=u,[a,r]=_.useState(null),[m,y]=_.useState({top:0,left:0}),[C,j]=_.useState(null),o=_.useRef(null);_.useEffect(()=>{const d=()=>{r(null)};return document.body.addEventListener("click",d),r(null),()=>{r(null),document.body.removeEventListener("click",d)}},[]),_.useEffect(()=>{if(a){const d=[...i].map(g=>g.id===a.id?a:g);e(d)}},[a]),_.useEffect(()=>{if(o.current&&C){const d=o.current.getBoundingClientRect().height,g=window.innerHeight;let E=C.top;E+d>g+window.scrollY-200&&(E=g+window.scrollY-d-200),E<0&&(E=10),y({top:E,left:C.left})}},[o.current,C]);const b=(d,g)=>{d.stopPropagation();const E=d.target.getBoundingClientRect();j({top:E.top+window.scrollY-70,left:E.left-(n?30:65)}),r(g)};return t.jsxRuntimeExports.jsxs("div",{className:X.products,children:[t.jsxRuntimeExports.jsx("h5",{className:X.subtitle,children:"Button Type"}),i.map(d=>t.jsxRuntimeExports.jsxs("div",{className:X.product,children:[t.jsxRuntimeExports.jsx(t.Select,{onChange:g=>{const O=[...i].map(M=>M.id===d.id?{...d,type:g}:M);e(O)},value:d.type,options:["Primary","Secondary","Tertiary"]}),t.jsxRuntimeExports.jsxs("div",{className:X.buttons,children:[t.jsxRuntimeExports.jsx("div",{className:X.deleteButton,children:t.jsxRuntimeExports.jsx(t.Icon,{name:"Sliders",hoverable:!0,width:20,height:20,onClick:g=>{b(g,d)}})}),s&&t.jsxRuntimeExports.jsx("div",{className:X.deleteButton,children:t.jsxRuntimeExports.jsx(t.Icon,{name:"Trash",hoverable:!0,onClick:()=>{const g=i.filter(E=>E.id!==d.id);e(g)},width:20,height:20,fill:"#C12A2A"})})]})]},d.id)),a&&t.jsxRuntimeExports.jsx(t.ButtonPopup,{ref:o,activeButton:a,setActiveButton:r,popupPosition:m,editableLink:l}),n&&t.jsxRuntimeExports.jsx("div",{style:{width:"100%",display:"flex",justifyContent:"center"},children:t.jsxRuntimeExports.jsx(t.Button,{withoutHover:!0,className:X.button,size:"s",onClick:()=>{const d=[...i];l?d.push({type:"Primary",id:t.v4(),typesText:[],text:{"en-US":"Button Name"},destination:"Go to Page",page:"",openInNewTab:!1}):d.push({type:"Primary",id:t.v4(),typesText:[],text:{"en-US":"Create Ticket"},destination:"Go to Page",page:"",openInNewTab:!1}),e(d)},style:{width:"fit-content"},children:t.jsxRuntimeExports.jsxs("div",{className:X.addButton,children:[t.jsxRuntimeExports.jsx("span",{children:"Add Option"}),t.jsxRuntimeExports.jsx(t.Icon,{name:"Plus",width:16,height:16})]})})})]})},Ye=u=>{const{isActiveButtons:i,setIsActiveButtons:e,buttons:s,setButtons:n,editableLink:l=!0}=u;return t.jsxRuntimeExports.jsx(t.jsxRuntimeExports.Fragment,{children:t.jsxRuntimeExports.jsxs("div",{className:t.styles$1.buttonsBlock,children:[t.jsxRuntimeExports.jsxs("div",{className:t.styles$1.top,children:[t.jsxRuntimeExports.jsx("h3",{className:t.styles$1.title,children:"Buttons"}),t.jsxRuntimeExports.jsx(t.Switch,{current:i,onChange:a=>e(a)})]}),t.jsxRuntimeExports.jsx(nt,{buttons:s,setButtons:n,editableLink:l})]})})},We="_title_1ropb_1",Ge="_subtitle_1ropb_5",Xe="_header_1ropb_12",Qe="_text_1ropb_13",Je="_productsBlock_1ropb_14",Ke="_top_1ropb_26",Ze="_itemsBlock_1ropb_35",ts="_typeTexts_1ropb_41",es="_block_1ropb_48",ss="_active_1ropb_61",ns="_products_1ropb_14",os="_product_1ropb_14",is="_button_1ropb_80",rs="_image_1ropb_91",as="_info_1ropb_98",cs="_name_1ropb_110",ls="_buttons_1ropb_114",ds="_modal_1ropb_121",us="_link_1ropb_142",xs="_modalOptions_1ropb_148",ps="_addButton_1ropb_161",ms="_deleteButton_1ropb_176",js="_closeIcon_1ropb_188",L={title:We,subtitle:Ge,header:Xe,text:Qe,productsBlock:Je,top:Ke,itemsBlock:Ze,typeTexts:ts,block:es,active:ss,products:ns,product:os,button:is,image:rs,info:as,name:cs,buttons:ls,modal:ds,link:us,modalOptions:xs,addButton:ps,deleteButton:ms,closeIcon:js},hs=u=>{const{activeItem:i,setActiveItem:e,popupPosition:s,setIsOpenModal:n,itemsOptions:l}=u,a=l.find(r=>r.id===i.listingId);return a?t.jsxRuntimeExports.jsxs("div",{className:L.modal,onClick:r=>{r.stopPropagation()},style:{top:`${s.top}px`,left:`${s.left}px`},children:[t.jsxRuntimeExports.jsxs("div",{className:L.top,children:[t.jsxRuntimeExports.jsx("h3",{children:t.splitTextIntoSpans(a.productData.name)}),t.jsxRuntimeExports.jsx("div",{className:L.closeIcon,children:t.jsxRuntimeExports.jsx(t.Icon,{name:"X",height:20,width:20,onClick:()=>{n(!1),e(null)}})})]}),t.jsxRuntimeExports.jsx("div",{className:L.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:r=>{const m={...i,image:r[0]};e(m)}})})]}):null};function _s(u){const{product:i,children:e}=u,{attributes:s,listeners:n,setNodeRef:l,transform:a,transition:r,isDragging:m}=t.useSortable({id:String(i.listingId)}),y={transform:t.CSS.Transform.toString(a),transition:r};return t.jsxRuntimeExports.jsx("div",{ref:l,style:y,className:`${L.product} ${m?L.dragging:""}`,...s,...n,children:e})}const gs=u=>{const{isActiveItems:i,setIsActiveItems:e,items:s,setItems:n,other:l,title:a,subtitle:r,editable:m=!0,draggable:y=!1,withImage:C=!1,deletable:j=!0,addable:o=!0,itemsType:b,itemsOptions:d}=u,[g,E]=_.useState(null),[O,M]=_.useState({top:0,left:0}),[c,N]=_.useState(!1),B=t.useSensors(t.useSensor(t.PointerSensor,{activationConstraint:{distance:5}}));_.useEffect(()=>{const x=()=>{E(null),N(!1)};return document.body.addEventListener("click",x),E(null),N(!1),()=>{E(null),N(!1),document.body.removeEventListener("click",x)}},[]),_.useEffect(()=>{if(g){const x=[...s].map(f=>f.listingId===g.listingId?g:f);n(x)}},[g]);const U=(x,f)=>{x.stopPropagation();const R=x.target.getBoundingClientRect(),T=100,$=window.innerHeight;let w=R.top+window.scrollY;w+T>$&&(w=$-T-20),N(!0),M({top:w-80,left:R.left-30}),E(f)};function k(x){if(C)return x?t.jsxRuntimeExports.jsx("img",{src:`https://imagedelivery.net/${x}/w=1000`,alt:"image",width:16,height:16}):t.jsxRuntimeExports.jsx(t.Icon,{name:"Image",width:16,height:16,fill:"#757575"})}const p=x=>{const{active:f,over:R}=x;if(R&&f.id!==R.id){const T=s.findIndex(w=>String(w.listingId)===f.id),$=s.findIndex(w=>String(w.listingId)===R.id);if(T!==-1&&$!==-1){const w=[...s],[G]=w.splice(T,1);w.splice($,0,G),n(w)}}},S=(x,f)=>{const R=d.find($=>x.listingId===$.id);if(!R)return null;const T=t.jsxRuntimeExports.jsxs(t.jsxRuntimeExports.Fragment,{children:[y&&t.jsxRuntimeExports.jsx("div",{children:t.jsxRuntimeExports.jsx(t.Icon,{name:"DotsSixVertical",hoverable:!0,width:20,height:20})}),b==="select"&&t.jsxRuntimeExports.jsx(t.Select,{onChange:$=>{const w=[...s],G=d.find(P=>P.productData.name===$);if(!G)return;const Z={listingId:G.id,image:G.productData.images.length>0?G.productData.images[0].cfId:""},h=w.map(P=>P.listingId===x.listingId?Z:P);E(Z),n([...h])},value:R.productData.name,options:[...d.filter($=>!s.find(w=>w.listingId===$.id)).map($=>$.productData.name)],leftAddon:k(x.image||R.productData.images.length>0&&R.productData.images[0].cfId||"")},f),t.jsxRuntimeExports.jsxs("div",{className:L.buttons,children:[m&&t.jsxRuntimeExports.jsx("div",{className:L.deleteButton,children:t.jsxRuntimeExports.jsx(t.Icon,{name:"Sliders",hoverable:!0,width:20,height:20,onClick:$=>U($,x)})}),j&&t.jsxRuntimeExports.jsx("div",{className:L.deleteButton,children:t.jsxRuntimeExports.jsx(t.Icon,{name:"Trash",hoverable:!0,width:20,height:20,fill:"#C12A2A",onClick:()=>n(s.filter($=>$!==x))})})]})]});return y?t.jsxRuntimeExports.jsx(_s,{product:x,children:T},x.listingId):t.jsxRuntimeExports.jsx("div",{className:L.product,children:T},x.listingId)};return t.jsxRuntimeExports.jsxs("div",{className:L.productsBlock,children:[(a||i!==void 0)&&t.jsxRuntimeExports.jsxs("div",{className:L.top,children:[a&&t.jsxRuntimeExports.jsx("h3",{className:L.title,children:a}),i!==void 0&&t.jsxRuntimeExports.jsx(t.Switch,{current:i,onChange:x=>e==null?void 0:e(x)})]}),c&&g&&t.jsxRuntimeExports.jsx(hs,{activeItem:g,setActiveItem:E,setIsOpenModal:N,popupPosition:O,itemsOptions:d}),t.jsxRuntimeExports.jsxs("div",{className:L.products,children:[r&&t.jsxRuntimeExports.jsx("h5",{className:L.subtitle,children:r}),y?t.jsxRuntimeExports.jsx(t.DndContext,{sensors:B,onDragEnd:p,children:t.jsxRuntimeExports.jsx(t.SortableContext,{items:s.map(x=>String(x.listingId)),strategy:t.verticalListSortingStrategy,children:s.map((x,f)=>S(x,f))})}):s.map((x,f)=>S(x,f)),o&&t.jsxRuntimeExports.jsx("div",{style:{width:"100%",display:"flex",justifyContent:"center"},children:t.jsxRuntimeExports.jsx(t.Button,{withoutHover:!0,className:L.button,size:"s",onClick:()=>{const x=[...s];for(let f=0;f<d.length;f++)if(!s.find(R=>R.listingId===d[f].id)){x.push({listingId:d[f].id,image:d[f].productData.images.length>0?d[f].productData.images[0].cfId:""});break}n(x)},disabled:s.length===d.length,style:{width:"fit-content"},children:t.jsxRuntimeExports.jsxs("div",{className:L.addButton,children:[t.jsxRuntimeExports.jsx("span",{children:"Add Option"}),t.jsxRuntimeExports.jsx(t.Icon,{name:"Plus",width:16,height:16})]})})})]}),l!==void 0&&t.jsxRuntimeExports.jsx(t.OtherSettings,{items:l})]})},fs="_options_6cemk_1",bs="_price_6cemk_12",Es="_oldPrice_6cemk_19",vs="_newPrice_6cemk_27",ys="_animate_6cemk_34",Rs="_appearAndBounce_6cemk_1",Is="_meta_6cemk_52",Ss="_info_6cemk_58",Ns="_infoRight_6cemk_66",ks="_buttons_6cemk_73",Cs="_variants_6cemk_80",$s="_variant_6cemk_80",Bs="_stock_6cemk_98",ws="_variantInfo_6cemk_105",Ps="_quantity_6cemk_111",Ms="_count_6cemk_118",Ts="_focused_6cemk_135",qs="_button_6cemk_73",As="_activeVariant_6cemk_161",Os="_chargeTypes_6cemk_165",Ls="_charge_6cemk_165",zs="_chargeActive_6cemk_190",Ds="_title_6cemk_198",I={options:fs,price:bs,oldPrice:Es,newPrice:vs,animate:ys,appearAndBounce:Rs,meta:Is,info:Ss,infoRight:Ns,buttons:ks,variants:Cs,variant:$s,stock:Bs,variantInfo:ws,quantity:Ps,count:Ms,focused:Ts,button:qs,activeVariant:As,chargeTypes:Os,charge:Ls,chargeActive:zs,title:Ds},Hs="_wrapper_c1dht_1",Us="_label_c1dht_9",Fs="_input_c1dht_18",Vs="_paddingless_c1dht_31",Ys="_content_c1dht_35",Ws="_contentBorder_c1dht_47",Gs="_borderless_c1dht_52",Xs="_rightIcon_c1dht_57",W={wrapper:Hs,label:Us,input:Fs,paddingless:Vs,content:Ys,contentBorder:Ws,borderless:Gs,rightIcon:Xs},ot=u=>{const{onChange:i,style:e,label:s,value:n,type:l,min:a,max:r,placeholder:m,disabled:y=!1,required:C=!1,regex:j,paddingless:o=!1,borderless:b=!1,editable:d=!1,isSearch:g=!1,centered:E=!1}=u,{themeSettings:O}=t.useThemeSettingsStore(),{inputs:M}=O,[c,N]=_.useState(!1);function B(k){return Number(k)<0?String(a):k}function U(k){return!C||!j?!0:new RegExp(j).test(k)}return t.jsxRuntimeExports.jsxs("div",{className:W.wrapper,children:[s&&t.jsxRuntimeExports.jsx("label",{className:W.label,htmlFor:s,children:s}),t.jsxRuntimeExports.jsxs("div",{className:t.clx(W.content,{[W.contentBorder]:M.border.active}),style:{...e},children:[t.jsxRuntimeExports.jsx("input",{id:s,type:l||"text",onChange:k=>{if(l==="text")i(k.target.value);else{const p=B(k.target.value);i(p)}},value:n,autoComplete:"off",placeholder:m||"Type something...",className:t.clx(W.input,{[W.required]:c&&C&&!U(n),[W.paddingless]:o,[W.borderless]:b}),min:l==="number"?a:void 0,max:l==="number"?r:void 0,disabled:y,onFocus:()=>N(!0),style:{textAlign:E?"center":"left",background:M.field.active?M.field.color:"transparent",padding:g?`7px ${Number(M.general.size)+20}px 7px 11px`:"7px 11px"}}),g&&t.jsxRuntimeExports.jsx("div",{className:W.rightIcon,children:t.jsxRuntimeExports.jsx(t.Icon,{name:"MagnifyingGlass",fill:"var(--icon-secondary)",width:M.general.size,height:M.general.size})}),d&&t.jsxRuntimeExports.jsx("div",{children:t.jsxRuntimeExports.jsx(t.Icon,{name:"Sliders",width:20,height:20,hoverable:!0})})]})]})},Qs="_button_85085_1",Js="_primary_85085_20",Ks="_primaryHovered_85085_30",Zs="_secondary_85085_34",tn="_secondaryHovered_85085_44",en="_tertiary_85085_48",sn="_tertiaryHovered_85085_58",nn="_content_85085_62",Q={button:Qs,primary:Js,primaryHovered:Ks,secondary:Zs,secondaryHovered:tn,tertiary:en,tertiaryHovered:sn,content:nn},H=u=>{const{children:i,onClick:e,style:s,className:n,disabled:l=!1,type:a="Primary"}=u,{themeSettings:r}=t.useThemeSettingsStore();return t.jsxRuntimeExports.jsx("button",{className:t.clx(Q.button,n,{[Q.primary]:a==="Primary",[Q.secondary]:a==="Secondary",[Q.tertiary]:a==="Tertiary",[Q.primaryHovered]:a==="Primary"&&!l&&r.buttons.primary.hover,[Q.secondaryHovered]:a==="Secondary"&&!l&&r.buttons.secondary.hover,[Q.tertiaryHovered]:a==="Tertiary"&&!l&&r.buttons.tertiary.hover}),onClick:e,style:{...s},disabled:l,children:a==="Tertiary"?t.jsxRuntimeExports.jsxs("div",{className:Q.content,children:[i,t.jsxRuntimeExports.jsx(t.Icon,{name:"ArrowRight",fill:"var(--icon-tertiary)",width:20,height:20})]}):t.jsxRuntimeExports.jsx(t.jsxRuntimeExports.Fragment,{children:i})})};var it=(u=>(u.ONE_TIME="One-Time",u.RECURRING="Subscribe & Save",u))(it||{});const on=u=>{var O,M;const{variants:i}=u,[e,s]=_.useState(i[0]),[n,l]=_.useState(e.chargeTypes[0]),a=t.useNavigate(),[r,m]=_.useState(1),{reset:y,addProductToCart:C,getProducts:j}=t.useCart(),[o,b]=_.useState(!1);_.useEffect(()=>{b(!0);const c=setTimeout(()=>b(!1),600);return()=>clearTimeout(c)},[r]);async function d(){await j(),await C({productId:u.id,productVariantId:e.id,quantity:r})}function g(){y(),d(),a("/checkout")}function E(c){if(c>=864e5){const p=Math.floor(c/864e5);return`${p} ${p===1?"day":"days"}`}else if(c>=36e5){const p=Math.floor(c/36e5);return`${p} ${p===1?"hour":"hours"}`}else if(c>=6e4){const p=Math.floor(c/6e4);return`${p} ${p===1?"minute":"minutes"}`}else{const p=Math.floor(c/1e3);return`${p} ${p===1?"second":"seconds"}`}}return _.useEffect(()=>{(e.quantity.available===0||!e.quantity.available)&&m(0)},[e.quantity.available]),t.jsxRuntimeExports.jsxs("div",{className:I.options,children:[e.chargeTypes.length>1&&t.jsxRuntimeExports.jsx("div",{className:I.chargeTypes,children:e.chargeTypes.map(c=>t.jsxRuntimeExports.jsx("div",{className:t.clx(I.charge,{[I.chargeActive]:n===c}),onClick:()=>l(c),children:it[c]},c))}),t.jsxRuntimeExports.jsx("div",{className:I.variants,children:i.map(c=>{var N;return t.jsxRuntimeExports.jsxs("div",{className:t.clx(I.variant,{[I.activeVariant]:e.id===c.id}),onClick:()=>s(c),children:[t.jsxRuntimeExports.jsxs("div",{className:I.variantInfo,children:[t.jsxRuntimeExports.jsx("span",{className:I.title,children:c.name}),t.jsxRuntimeExports.jsxs("span",{children:["$",n==="ONE_TIME"?c.price.amount:c.subscriptionSettings?c.subscriptionSettings.price.amount:"Price Not Found"]})]}),t.jsxRuntimeExports.jsx("div",{children:n==="ONE_TIME"&&t.jsxRuntimeExports.jsxs("span",{className:I.stock,children:[((N=c.quantity.restrictions)==null?void 0:N.max)||c.quantity.available||0," in stock"]})})]},c.id)})}),n==="ONE_TIME"&&t.jsxRuntimeExports.jsxs("div",{className:I.quantity,children:[t.jsxRuntimeExports.jsx(H,{type:"Secondary",onClick:()=>{r>1?m(c=>c-1):m(1)},className:I.button,disabled:e.quantity.available===0||e.quantity.restrictions&&r<=e.quantity.restrictions.min||Object.keys(e.quantity.restrictions||{}).length===0&&!e.quantity.available,children:t.jsxRuntimeExports.jsx(t.Icon,{name:"Minus"})}),t.jsxRuntimeExports.jsx(ot,{type:"number",value:String(r),onChange:c=>m(Number(c)),max:((O=e.quantity.restrictions)==null?void 0:O.max)||e.quantity.available||1/0,min:((M=e.quantity.restrictions)==null?void 0:M.min)||0,centered:!0,disabled:e.quantity.available===0||!e.quantity.available||Object.keys(e.quantity.restrictions||{}).length===0&&!e.quantity.available}),t.jsxRuntimeExports.jsx(H,{type:"Secondary",onClick:()=>{m(c=>c+1)},className:I.button,disabled:!!(e.quantity.restrictions&&r>=e.quantity.restrictions.max||e.quantity.available!==void 0&&r>=e.quantity.available||Object.keys(e.quantity.restrictions||{}).length===0&&!e.quantity.available),children:t.jsxRuntimeExports.jsx(t.Icon,{name:"Plus"})})]}),t.jsxRuntimeExports.jsxs("div",{className:I.meta,children:[t.jsxRuntimeExports.jsxs("div",{className:I.info,children:[t.jsxRuntimeExports.jsx("span",{children:"Delivery"}),t.jsxRuntimeExports.jsxs("div",{className:I.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":E(e.deliveryTime)})]})]}),t.jsxRuntimeExports.jsxs("div",{className:I.info,children:[t.jsxRuntimeExports.jsx("span",{children:"Price"}),t.jsxRuntimeExports.jsx("div",{className:I.infoRight,children:n==="ONE_TIME"?e.compareAtPrice&&(e.compareAtPrice.amount||0)-(e.price.amount||0)>0?t.jsxRuntimeExports.jsxs("div",{className:I.price,children:[t.jsxRuntimeExports.jsxs("span",{className:t.clx(I.newPrice,{[I.animate]:o}),children:["$ ",(e.price.amount||0)*r]}),t.jsxRuntimeExports.jsxs("span",{className:I.oldPrice,children:["$ ",(e.compareAtPrice.amount||0)*r]})]}):t.jsxRuntimeExports.jsxs("span",{className:t.clx(I.newPrice,{[I.animate]:o}),children:["$ ",(e.price.amount||0)*r]}):e.subscriptionSettings&&e.subscriptionSettings.compareAtPrice&&(e.subscriptionSettings.compareAtPrice.amount||0)-(e.subscriptionSettings.price.amount||0)>0?t.jsxRuntimeExports.jsxs("div",{className:I.price,children:[t.jsxRuntimeExports.jsxs("span",{className:t.clx(I.newPrice,{[I.animate]:o}),children:["$ ",e.subscriptionSettings.price.amount||0]}),t.jsxRuntimeExports.jsxs("span",{className:I.oldPrice,children:["$ ",e.subscriptionSettings.compareAtPrice.amount||0]})]}):e.subscriptionSettings&&t.jsxRuntimeExports.jsxs("span",{className:t.clx(I.newPrice,{[I.animate]:o}),children:["$ ",e.subscriptionSettings.price.amount||0]})})]})]}),t.jsxRuntimeExports.jsxs("div",{className:I.buttons,children:[t.jsxRuntimeExports.jsx(H,{type:"Primary",onClick:()=>g(),disabled:e.quantity.available===0||!e.quantity.available||Object.keys(e.quantity.restrictions||{}).length===0&&!e.quantity.available,children:n==="ONE_TIME"?"Buy Now":"Subscribe Now"}),n==="ONE_TIME"&&t.jsxRuntimeExports.jsx(H,{type:"Secondary",onClick:()=>d(),disabled:e.quantity.available===0||!e.quantity.available||Object.keys(e.quantity.restrictions||{}).length===0&&!e.quantity.available,children:"Add to Cart"})]})]})},rn="_button_1tdo3_1",an="_login_1tdo3_14",cn="_signUp_1tdo3_18",ln="_buttons_1tdo3_23",dn="_modal_1tdo3_32",un="_closing_1tdo3_64",xn="_info_1tdo3_113",pn="_top_1tdo3_120",mn="_title_1tdo3_131",jn="_clear_1tdo3_138",hn="_activeClear_1tdo3_145",_n="_count_1tdo3_149",gn="_cart_1tdo3_164",fn="_empty_1tdo3_172",bn="_product_1tdo3_198",En="_products_1tdo3_207",vn="_image_1tdo3_215",yn="_productInfo_1tdo3_221",Rn="_content_1tdo3_228",In="_name_1tdo3_234",Sn="_price_1tdo3_240",Nn="_productButtons_1tdo3_246",kn="_productButton_1tdo3_246",Cn="_productCount_1tdo3_266",$n="_bottom_1tdo3_282",Bn="_subtotal_1tdo3_290",wn="_block_1tdo3_298",Pn="_shoppingCount_1tdo3_305",Mn="_total_1tdo3_325",Tn="_link_1tdo3_331",qn="_userInfo_1tdo3_338",An="_pagesMobileModal_1tdo3_349",On="_pagesMobileModalContent_1tdo3_363",Ln="_pagesMobileModalHeader_1tdo3_369",zn="_pagesMobileModalFooter_1tdo3_379",v={button:rn,login:an,signUp:cn,buttons:ln,modal:dn,"slide-in-fade":"_slide-in-fade_1tdo3_1","mobile-slide-in-fade":"_mobile-slide-in-fade_1tdo3_1",closing:un,"mobile-slide-out-fade":"_mobile-slide-out-fade_1tdo3_1","slide-out-fade":"_slide-out-fade_1tdo3_1",info:xn,top:pn,title:mn,clear:jn,activeClear:hn,count:_n,cart:gn,empty:fn,product:bn,products:En,image:vn,productInfo:yn,content:Rn,name:In,price:Sn,productButtons:Nn,productButton:kn,productCount:Cn,bottom:$n,subtotal:Bn,block:wn,shoppingCount:Pn,total:Mn,link:Tn,userInfo:qn,pagesMobileModal:An,pagesMobileModalContent:On,pagesMobileModalHeader:Ln,pagesMobileModalFooter:zn},Dn=u=>{const{shopping:i,signUp:e,isShowUserInfo:s=!0}=u;return t.jsxRuntimeExports.jsxs("div",{className:v.buttons,children:[i&&t.jsxRuntimeExports.jsx(rt,{}),s&&t.jsxRuntimeExports.jsx(st,{signUp:e})]})},rt=()=>{const[u,i]=_.useState(!1),[e,s]=_.useState([]),{cart:n,getProducts:l}=t.useCart();function a(o){for(let b=0;b<n.parts.length;b++)for(let d=0;d<o.variants.length;d++)if(n.parts[b].productVariantId===o.variants[b].id)return n.parts[b].productVariantId}function r(o){for(let b=0;b<n.parts.length;b++)for(let d=0;d<o.variants.length;d++)if(n.parts[b].productVariantId===o.variants[b].id)return n.parts[b].quantity}_.useEffect(()=>{(async()=>{const b=n.parts.map(E=>String(E.productId)),g=(await l([...b])).map(E=>({...E,activeVariantId:a(E),quantity:r(E)}));s(g)})()},[n.parts.length]);function m(o){var b;return!o||!(o!=null&&o.variants)?!1:(b=o.variants.find(d=>d.id===o.activeVariantId))==null?void 0:b.subscriptionSettings}const y=n.parts.length>0&&e.length>0&&!m(e[0]),[C,j]=_.useState(!1);return t.jsxRuntimeExports.jsxs(t.jsxRuntimeExports.Fragment,{children:[t.jsxRuntimeExports.jsxs(H,{type:"Secondary",style:{padding:10},onClick:o=>{o.stopPropagation(),window.location.pathname.includes("/admin/builder")||(i(!0),j(!0))},children:[t.jsxRuntimeExports.jsx(t.Icon,{name:"Handbag",fill:"var(--icon-primary)"}),y&&t.jsxRuntimeExports.jsx("div",{className:v.shoppingCount,children:n.parts.length})]}),u&&t.jsxRuntimeExports.jsx(t.Modal,{close:()=>{j(!1),setTimeout(()=>{i(!1)},300)},withAnimation:!1,children:t.jsxRuntimeExports.jsx(at,{activeProducts:e,isCartNotEmpty:y,isOpen:C})})]})},at=u=>{const{activeProducts:i,isCartNotEmpty:e,isOpen:s}=u,{cart:n,reset:l,getTotalAndDiscount:a,updateQuantityOfProduct:r}=t.useCart(),m=t.useNavigate();function y(o){m(o)}function C(o){r({productId:o.id,productVariantId:o.activeVariantId,quantity:o.quantity+1})}function j(o){r({productId:o.id,productVariantId:o.activeVariantId,quantity:o.quantity-1})}return t.jsxRuntimeExports.jsxs("div",{className:t.clx(v.modal,{[v.closing]:!s}),onClick:o=>o.stopPropagation(),children:[t.jsxRuntimeExports.jsxs("div",{className:v.top,children:[t.jsxRuntimeExports.jsxs("div",{className:v.info,children:[t.jsxRuntimeExports.jsx("span",{className:v.title,children:"Cart"}),e&&t.jsxRuntimeExports.jsx("div",{className:v.count,children:n.parts.length})]}),t.jsxRuntimeExports.jsx("button",{className:t.clx(v.clear,{[v.activeClear]:e}),disabled:!e,onClick:l,children:"Clear all"})]}),e?t.jsxRuntimeExports.jsxs("div",{className:v.cart,children:[t.jsxRuntimeExports.jsx("div",{className:v.products,children:i.map(o=>t.jsxRuntimeExports.jsxs("div",{className:v.product,children:[t.jsxRuntimeExports.jsxs("div",{className:v.productInfo,children:[t.jsxRuntimeExports.jsx("img",{src:`https://imagedelivery.net/${o.images[0].cfId}/w=500`,alt:"image",width:"100%",height:"100%",className:v.image}),t.jsxRuntimeExports.jsxs("div",{className:v.content,children:[t.jsxRuntimeExports.jsx("div",{className:v.name,children:o.name}),t.jsxRuntimeExports.jsxs("div",{className:v.price,children:["$",o.variants.find(b=>b.id===o.activeVariantId).price.amount*((o==null?void 0:o.quantity)||1)]})]})]}),t.jsxRuntimeExports.jsxs("div",{className:v.productButtons,children:[t.jsxRuntimeExports.jsx("div",{onClick:()=>{o.quantity!==1&&j(o)},className:v.productButton,children:t.jsxRuntimeExports.jsx(t.Icon,{name:"Minus",fill:"#757575",width:20,height:20})}),t.jsxRuntimeExports.jsx("div",{className:v.productCount,children:o.quantity}),t.jsxRuntimeExports.jsx("div",{onClick:()=>C(o),className:v.productButton,children:t.jsxRuntimeExports.jsx(t.Icon,{name:"Plus",fill:"#757575",width:20,height:20})})]})]},o.id))}),t.jsxRuntimeExports.jsxs("div",{className:v.bottom,children:[t.jsxRuntimeExports.jsxs("div",{className:v.subtotal,children:[t.jsxRuntimeExports.jsxs("div",{className:v.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:v.total,children:["$",a().total]})]}),t.jsxRuntimeExports.jsx(H,{onClick:()=>y("/checkout"),children:"Checkout"})]})]}):t.jsxRuntimeExports.jsx(ct,{})]})},ct=()=>t.jsxRuntimeExports.jsxs("div",{className:v.empty,children:[t.jsxRuntimeExports.jsx("div",{children:t.jsxRuntimeExports.jsx(t.Icon,{name:"Handbag",fill:"var(--icon-secondary)"})}),t.jsxRuntimeExports.jsx("span",{children:"Empty Cart"}),t.jsxRuntimeExports.jsxs("span",{children:["You don’t have any items in your shopping cart yet,"," ",t.jsxRuntimeExports.jsx("a",{href:"/products",className:v.link,children:"view products"})]})]}),st=({signUp:u})=>{const i=JSON.parse(localStorage.getItem("token")||"{}"),{data:e}=i,s=t.useNavigate();function n(r){window.location.pathname.includes("/admin/builder")||s(r)}if(!e)return t.jsxRuntimeExports.jsxs(t.jsxRuntimeExports.Fragment,{children:[t.jsxRuntimeExports.jsx(H,{onClick:()=>n("/customer-dash"),type:"Secondary",style:{padding:10},children:"Login"}),u&&t.jsxRuntimeExports.jsx(H,{onClick:()=>n("/customer-dash"),type:"Primary",style:{padding:10},children:"Sign Up"})]});const[l,a]=_.useState("test-email@gmail.com");return _.useEffect(()=>{(async()=>{const m=t.jwtDecode(e);a(m.email)})()},[e]),t.jsxRuntimeExports.jsx("div",{className:v.userInfo,onClick:()=>n("/customer-dash"),children:t.jsxRuntimeExports.jsx("div",{children:l||"test-email@gmail.com"})})},lt=({children:u,logo:i,setIsOpen:e,signUp:s})=>{const{setIsOpen:n}=t.useModalStore(),l=()=>{n(!1),setTimeout(()=>{e(!1),n(!0)},300)};return t.jsxRuntimeExports.jsxs("div",{className:v.pagesMobileModal,onClick:a=>a.stopPropagation(),children:[t.jsxRuntimeExports.jsxs("div",{className:v.pagesMobileModalHeader,children:[t.jsxRuntimeExports.jsx("div",{children:i}),t.jsxRuntimeExports.jsx(H,{type:"Secondary",onClick:l,children:t.jsxRuntimeExports.jsx(t.Icon,{name:"X",fill:"var(--icon-primary)"})})]}),t.jsxRuntimeExports.jsx("div",{className:v.pagesMobileModalContent,children:u}),t.jsxRuntimeExports.jsx("div",{className:v.pagesMobileModalFooter,children:t.jsxRuntimeExports.jsx(st,{signUp:s})})]})},Hn=({children:u,logo:i,signUp:e})=>{const[s,n]=_.useState(!1);return t.jsxRuntimeExports.jsxs(t.jsxRuntimeExports.Fragment,{children:[t.jsxRuntimeExports.jsx(dt,{setIsOpenModal:n}),s&&t.jsxRuntimeExports.jsx(t.Modal,{close:()=>n(!1),children:t.jsxRuntimeExports.jsx(lt,{logo:i,setIsOpen:n,signUp:e,children:u})})]})},dt=u=>{const{setIsOpenModal:i}=u;return t.jsxRuntimeExports.jsx(H,{type:"Secondary",style:{padding:10},onClick:e=>{e.stopPropagation(),i(!0)},children:t.jsxRuntimeExports.jsx(t.Icon,{name:"List",fill:"var(--icon-primary)"})})},Un="_share_xddz7_1",Fn="_modal_xddz7_8",Vn="_header_xddz7_20",Yn="_socials_xddz7_30",Wn="_social_xddz7_30",Gn="_copy_xddz7_40",Xn="_title_xddz7_47",Qn="_copyWrapper_xddz7_53",Jn="_copyText_xddz7_62",Kn="_copyTextMobile_xddz7_75",Zn="_copyTextMiniMobile_xddz7_94",J={share:Un,modal:Fn,header:Vn,socials:Yn,social:Wn,copy:Gn,title:Xn,copyWrapper:Qn,copyText:Jn,copyTextMobile:Kn,copyTextMiniMobile:Zn},to=()=>{const{isOpenModal:u,setIsOpenModal:i}=t.useShareLinkStore();function e(){i(!0)}return t.jsxRuntimeExports.jsxs(t.jsxRuntimeExports.Fragment,{children:[t.jsxRuntimeExports.jsx(t.Button,{className:J.share,onClick:s=>{s.stopPropagation(),e()},type:"Secondary",children:t.jsxRuntimeExports.jsx(t.Icon,{name:"Share",fill:"#757575",hoverable:!0})}),u&&t.jsxRuntimeExports.jsx(t.Modal,{close:i,children:t.jsxRuntimeExports.jsx(eo,{})})]})},eo=()=>{const{setIsOpenModal:u}=t.useShareLinkStore(),{notification:i,setNotification:e}=t.useNotificationStore(),{setIsOpen:s}=t.useModalStore(),n=window.location.href;function l(){navigator.clipboard.writeText(n),e({message:"Link copied to clipboard",status:"success"})}function a(){s(!1),setTimeout(()=>{u(!1),s(!0)},300)}function r(m,y){return m.length>y?m.slice(0,y)+"...":m}return t.jsxRuntimeExports.jsxs("div",{className:J.modal,onClick:m=>m.stopPropagation(),children:[t.jsxRuntimeExports.jsxs("div",{className:J.header,children:[t.jsxRuntimeExports.jsx("div",{className:J.title,children:"Copy Product Link"}),t.jsxRuntimeExports.jsx(t.Icon,{name:"X",fill:"#757575",onClick:a,hoverable:!0})]}),t.jsxRuntimeExports.jsxs("div",{className:J.copyWrapper,children:[t.jsxRuntimeExports.jsxs(t.Button,{type:"Secondary",onClick:l,style:{flex:1},children:[t.jsxRuntimeExports.jsx("div",{className:J.copyText,children:r(n,100)}),t.jsxRuntimeExports.jsx("div",{className:J.copyTextMobile,children:r(n,40)}),t.jsxRuntimeExports.jsx("div",{className:J.copyTextMiniMobile,children:r(n,20)})]}),t.jsxRuntimeExports.jsx(t.Button,{type:"Secondary",onClick:l,children:i?t.jsxRuntimeExports.jsx(t.Icon,{name:"Check"}):t.jsxRuntimeExports.jsx(t.Icon,{name:"Copy"})})]})]})},so="_accordion_1s1lq_1",no="_header_1s1lq_9",oo="_icon_1s1lq_18",io="_open_1s1lq_21",ro="_content_1s1lq_25",tt={accordion:so,header:no,icon:oo,open:io,content:ro},ao=({title:u,content:i,defaultOpen:e=!1})=>{const[s,n]=_.useState(e),[l,a]=_.useState(0),r=_.useRef(null),m=()=>{n(!s)};return _.useEffect(()=>{r.current&&a(s?r.current.scrollHeight:0)},[s]),t.jsxRuntimeExports.jsxs("div",{className:tt.accordion,children:[t.jsxRuntimeExports.jsxs("div",{className:tt.header,onClick:m,children:[t.jsxRuntimeExports.jsx("h5",{id:"h5",children:u}),t.jsxRuntimeExports.jsx("div",{className:t.clx(tt.icon,{[tt.open]:s}),children:t.jsxRuntimeExports.jsx(t.Icon,{name:"CaretDown"})})]}),t.jsxRuntimeExports.jsx("div",{ref:r,className:tt.content,style:{height:`${l}px`},children:t.jsxRuntimeExports.jsx("p",{id:"p",children:i})})]})},co=({children:u,path:i,className:e,target:s="_self",id:n})=>{if(window.location.pathname.includes("/admin/builder"))return t.jsxRuntimeExports.jsx("div",{className:e,role:"link",style:{cursor:"pointer"},id:n,children:u});const l=t.useNavigate(),a=/^https?:\/\//.test(i),r=m=>{a||s==="_blank"?s==="_blank"?window.open(i,"_blank"):window.location.href=i:(m.preventDefault(),l(i,{replace:!0}))};return t.jsxRuntimeExports.jsx("div",{onClick:r,className:e,role:"link",style:{cursor:"pointer"},id:n,children:u})},lo="_buttonsBlock_1b2rb_1",uo="_slideUp_1b2rb_1",xo={buttonsBlock:lo,slideUp:uo},po=()=>t.jsxRuntimeExports.jsxs("div",{className:xo.buttonsBlock,children:[t.jsxRuntimeExports.jsx(H,{type:"Primary",style:{width:"100%"},children:"Add to Cart"}),t.jsxRuntimeExports.jsx(H,{type:"Secondary",children:"Buy"})]}),mo="_wrapper_st58d_1",jo="_label_st58d_10",ho="_textarea_st58d_18",_o="_length_st58d_33",et={wrapper:mo,label:jo,textarea:ho,length:_o},go=u=>{const{onChange:i,label:e,value:s,maxLength:n,placeholder:l="Type something..."}=u,[a,r]=_.useState(s.length);return t.jsxRuntimeExports.jsxs("div",{className:et.wrapper,children:[e&&t.jsxRuntimeExports.jsx("label",{className:et.label,htmlFor:e,children:e}),t.jsxRuntimeExports.jsx("textarea",{id:e,defaultValue:s,onChange:m=>{r(m.target.value.length),i(m.target.value)},placeholder:l,className:et.textarea,maxLength:n}),n&&t.jsxRuntimeExports.jsxs("div",{className:et.length,children:[a,"/",n]})]})};exports.ChooseImage=t.ChooseImage;exports.ChooseImageModal=t.ChooseImageModal;exports.Icon=t.Icon;exports.InputSettings=t.Input;exports.ItemsSettings=t.ItemsSettings;exports.Loader=t.Loader;exports.Modal=t.Modal;exports.RangeSelector=t.RangeSelector;exports.Select=t.Select;exports.Switch=t.Switch;exports.TextSettings=t.TextSettings;exports.TextareaSettings=t.Textarea;exports.TypesText=t.TypesText;exports.Accordion=ao;exports.BurgerMenuButton=dt;exports.Button=H;exports.ButtonTypeSettings=nt;exports.ButtonsSettings=Ye;exports.CategorySettings=Xt;exports.EmptyCart=ct;exports.FormSettings=ye;exports.HeaderButtons=Dn;exports.InputUI=ot;exports.LayoutSettings=It;exports.Link=co;exports.ListingSelector=gs;exports.PagesMobileMenu=Hn;exports.PagesMobileModal=lt;exports.PagesSettings=Ee;exports.ProductCardButtons=po;exports.ProductOptions=on;exports.ShareLink=to;exports.ShoppingButton=rt;exports.ShoppingModalCart=at;exports.TextareaUI=go;exports.UserInfo=st;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("./index-BhPRECBt.cjs"),_=require("react");require("@phosphor-icons/react");const rt="_wrapper_1ibay_2",ct="_alignmentBlock_1ibay_8",lt="_title_1ibay_15",dt="_subtitle_1ibay_22",ut="_alignmentContent_1ibay_29",xt="_alignments_1ibay_37",pt="_alignment_1ibay_8",mt="_circle_1ibay_60",jt="_paddings_1ibay_67",ht="_padding_1ibay_67",_t="_active_1ibay_91",gt="_input_1ibay_98",U={wrapper:rt,alignmentBlock:ct,title:lt,subtitle:dt,alignmentContent:ut,alignments:xt,alignment:pt,circle:mt,paddings:jt,padding:ht,active:_t,input:gt},ft=["topLeft","top","topRight","left","center","right","bottomLeft","bottom","bottomRight"],bt=["left","top","right","bottom"],Et=u=>{const{alignment:i,padding:e,setPadding:s,setAlignment:n}=u;function m(h){switch(h){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 l(h){switch(h){case"left":return"AlignLeft";case"right":return"AlignRight";case"top":return"AlignTop";case"bottom":return"AlignBottom"}}const[a,p]=_.useState(null),[I,B]=_.useState(null);return t.jsxRuntimeExports.jsxs("div",{className:U.layout,children:[t.jsxRuntimeExports.jsx("h3",{className:U.title,children:"Layout"}),t.jsxRuntimeExports.jsxs("div",{className:U.alignmentBlock,children:[t.jsxRuntimeExports.jsx("h5",{className:U.subtitle,children:"Alignment"}),t.jsxRuntimeExports.jsxs("div",{className:U.alignmentContent,children:[t.jsxRuntimeExports.jsx("div",{className:U.alignments,children:ft.map(h=>t.jsxRuntimeExports.jsxs("div",{onClick:()=>{n(h)},className:U.alignment,onMouseEnter:()=>{p(h)},onMouseLeave:()=>{p(null)},children:[h!==i&&a!==h&&t.jsxRuntimeExports.jsx("div",{className:U.circle}),h!==i&&a===h&&t.jsxRuntimeExports.jsx(t.Icon,{name:m(a),fill:"#c2c2c2",width:22,height:22}),h===i&&t.jsxRuntimeExports.jsx(t.Icon,{name:m(i),fill:"#FF3F19",width:22,height:22})]},h))}),t.jsxRuntimeExports.jsx("div",{className:U.paddings,children:bt.map(h=>t.jsxRuntimeExports.jsxs("label",{className:t.clx(U.padding,{[U.active]:I===h}),onFocus:()=>{B(h)},onBlur:()=>{B(null)},children:[t.jsxRuntimeExports.jsx("div",{children:t.jsxRuntimeExports.jsx(t.Icon,{name:l(h),width:20,height:20})}),t.jsxRuntimeExports.jsx(t.Input,{type:"number",value:String(e[h]),onChange:o=>s({...e,[h]:Number(o)}),paddingless:!0,borderless:!0})]},h))})]})]})]})},Rt="_title_82zux_1",vt="_subtitle_82zux_5",yt="_header_82zux_12",It="_text_82zux_13",St="_productsBlock_82zux_14",kt="_top_82zux_26",Nt="_itemsBlock_82zux_35",Ct="_typeTexts_82zux_41",$t="_block_82zux_48",Bt="_active_82zux_61",wt="_products_82zux_14",Pt="_product_82zux_14",Mt="_button_82zux_80",Tt="_disabled_82zux_91",qt="_image_82zux_95",At="_info_82zux_102",Ot="_name_82zux_114",Lt="_buttons_82zux_118",Dt="_modal_82zux_125",zt="_link_82zux_145",Ut="_modalOptions_82zux_151",Ht="_addButton_82zux_157",Ft="_deleteButton_82zux_179",H={title:Rt,subtitle:vt,header:yt,text:It,productsBlock:St,top:kt,itemsBlock:Nt,typeTexts:Ct,block:$t,active:Bt,products:wt,product:Pt,button:Mt,disabled:Tt,image:qt,info:At,name:Ot,buttons:Lt,modal:Dt,link:zt,modalOptions:Ut,addButton:Ht,deleteButton:Ft},Vt=u=>{const{isActiveItems:i,setIsActiveItems:e,items:s,setItems:n,other:m,title:l,subtitle:a,draggable:p=!1,withImage:I=!1,addable:B=!0,itemsOptions:h,hasRangeSelector:o=!1,rangeSelectorOptions:b,limit:c,autoScrollInterval:g,deletable:E}=u;function O(r){if(I)return r?t.jsxRuntimeExports.jsx("img",{src:`https://imagedelivery.net/${r[0]}/w=1000`,alt:"image",width:16,height:16}):t.jsxRuntimeExports.jsx(t.Icon,{name:"Image",width:16,height:16,fill:"#757575"})}const L=(r,k=!1)=>{const P=h.find(q=>q.id===r);if(!P)return;const F=t.jsxRuntimeExports.jsxs(t.jsxRuntimeExports.Fragment,{children:[p&&t.jsxRuntimeExports.jsx("div",{children:t.jsxRuntimeExports.jsx(t.Icon,{name:"DotsSixVertical",hoverable:!0,width:20,height:20})}),t.jsxRuntimeExports.jsx(t.Select,{onChange:q=>{const x=[...s],S=h.find(v=>v.name===q);if(!S)return;const d=S.id,f=x.map(v=>v===r?d:v);n([...f])},value:P.name,options:h.filter(q=>!s.find(x=>x===q.id)).map(q=>q.name),leftAddon:O(P.images)}),k&&t.jsxRuntimeExports.jsx("div",{className:H.buttons,children:t.jsxRuntimeExports.jsx("div",{className:H.deleteButton,children:t.jsxRuntimeExports.jsx(t.Icon,{name:"Trash",hoverable:!0,width:20,height:20,fill:"#C12A2A",onClick:()=>n(s.filter(q=>q!==r))})})})]});return t.jsxRuntimeExports.jsx("div",{className:H.product,children:F},r)};return t.jsxRuntimeExports.jsxs("div",{className:H.productsBlock,children:[(l||i!==void 0)&&t.jsxRuntimeExports.jsxs("div",{className:H.top,children:[l&&t.jsxRuntimeExports.jsx("h3",{className:H.title,children:l}),i!==void 0&&t.jsxRuntimeExports.jsx(t.Switch,{current:i,onChange:r=>e==null?void 0:e(r)})]}),o&&b&&t.jsxRuntimeExports.jsx(t.RangeSelector,{...b}),t.jsxRuntimeExports.jsxs("div",{className:H.products,children:[a&&t.jsxRuntimeExports.jsx("h5",{className:H.subtitle,children:a}),s.map(r=>L(r,E)),B&&t.jsxRuntimeExports.jsx("div",{style:{width:"100%",display:"flex",justifyContent:"center",gap:5},children:t.jsxRuntimeExports.jsx(t.Button,{withoutHover:!0,className:t.clx(H.button,{[H.disabled]:!!(c&&c<=s.length||s.length===h.length)}),size:"s",disabled:!!(c&&c<=s.length||s.length===h.length),onClick:()=>{const r=[...s];let k=null;if(h){for(let P=0;P<h.length;P++)if(!s.find(F=>F===h[P].id)){k=h[P];break}}r.push((k==null?void 0:k.id)||h[0].id),n(r)},style:{width:"fit-content"},children:t.jsxRuntimeExports.jsxs("div",{className:H.addButton,children:[t.jsxRuntimeExports.jsx("span",{children:"Add Option"}),t.jsxRuntimeExports.jsx(t.Icon,{name:"Plus",width:16,height:16})]})})})]}),m!==void 0&&t.jsxRuntimeExports.jsx(t.OtherSettings,{items:m}),g!==void 0&&t.jsxRuntimeExports.jsx(t.Input,{label:"Auto scroll interval",type:"number",value:String(g.scrollInterval),onChange:r=>g.setScrollInterval(Number(r)),min:.1,max:100,style:{width:"100%"},postfix:"sec."})]})},Yt="_title_roi3a_1",Wt="_subtitle_roi3a_5",Gt="_header_roi3a_12",Xt="_text_roi3a_13",Qt="_productsBlock_roi3a_14",Jt="_top_roi3a_26",Kt="_itemsBlock_roi3a_35",Zt="_typeTexts_roi3a_41",te="_block_roi3a_48",ee="_active_roi3a_61",se="_products_roi3a_14",ne="_product_roi3a_14",oe="_button_roi3a_80",ie="_disabled_roi3a_91",ae="_image_roi3a_95",re="_info_roi3a_102",ce="_name_roi3a_114",le="_buttons_roi3a_118",de="_modal_roi3a_125",ue="_link_roi3a_145",xe="_modalOptions_roi3a_151",pe="_addButton_roi3a_164",me="_deleteButton_roi3a_179",je="_closeIcon_roi3a_191",D={title:Yt,subtitle:Wt,header:Gt,text:Xt,productsBlock:Qt,top:Jt,itemsBlock:Kt,typeTexts:Zt,block:te,active:ee,products:se,product:ne,button:oe,disabled:ie,image:ae,info:re,name:ce,buttons:le,modal:de,link:ue,modalOptions:xe,addButton:pe,deleteButton:me,closeIcon:je};function he({product:u,children:i}){const{attributes:e,listeners:s,setNodeRef:n,transform:m,transition:l,isDragging:a}=t.useSortable({id:u.id}),p={transform:t.CSS.Transform.toString(m),transition:l};return t.jsxRuntimeExports.jsx("div",{ref:n,style:p,className:`${D.product} ${a?D.dragging:""}`,...e,...s,children:i})}const _e=u=>{const{isActiveItems:i,setIsActiveItems:e,items:s,setItems:n,title:m,subtitle:l,editable:a=!0,draggable:p=!1,deletable:I=!0,addable:B=!0,itemsType:h,itemsOptions:o,addableOptions:b={},limit:c}=u,[g,E]=_.useState(null),[O,L]=_.useState(null),r=_.useRef(null),k=t.useSensors(t.useSensor(t.PointerSensor,{activationConstraint:{distance:5}}));_.useEffect(()=>{if(g){const x=[...s].map(S=>S.id===g.id?g:S);n(x)}},[g]),_.useEffect(()=>{r.current&&O&&(r.current.getBoundingClientRect().height,O.top)},[r.current,O]);const P=(x,S)=>{x.stopPropagation();const d=x.target.getBoundingClientRect();L({top:d.top+window.scrollY,left:d.left-30}),E(S)},F=x=>{const{active:S,over:d}=x;if(d&&S.id!==d.id){const f=s.findIndex(w=>w.id===S.id),v=s.findIndex(w=>w.id===d.id);if(f!==-1&&v!==-1){const w=[...s],[N]=w.splice(f,1);w.splice(v,0,N),n(w)}}},q=(x,S)=>{const d=t.jsxRuntimeExports.jsxs(t.jsxRuntimeExports.Fragment,{children:[p&&t.jsxRuntimeExports.jsx("div",{children:t.jsxRuntimeExports.jsx(t.Icon,{name:"DotsSixVertical",hoverable:!0,width:20,height:20})}),h==="select"&&o&&t.jsxRuntimeExports.jsx(t.Select,{onChange:f=>{const v=[...s],w=o.find(C=>C.name===f);if(!w)return;const N=v.map(C=>C.id===x.id?{...w,name:{"en-US":f}}:C);E({...x,name:{"en-US":f}}),n([...N])},value:x.name,options:o.filter(f=>!s.find(v=>v.name===f.name)).map(f=>f.name)}),t.jsxRuntimeExports.jsxs("div",{className:D.buttons,children:[a&&t.jsxRuntimeExports.jsx("div",{className:D.deleteButton,children:t.jsxRuntimeExports.jsx(t.Icon,{name:"Sliders",hoverable:!0,width:20,height:20,onClick:f=>P(f,x)})}),I&&t.jsxRuntimeExports.jsx("div",{className:D.deleteButton,children:t.jsxRuntimeExports.jsx(t.Icon,{name:"Trash",hoverable:!0,width:20,height:20,fill:"#C12A2A",onClick:()=>n(s.filter(f=>f.id!==x.id))})})]})]});return p?t.jsxRuntimeExports.jsx(he,{product:x,index:S,children:d},x.id):t.jsxRuntimeExports.jsx("div",{className:D.product,children:d},x.id)};return t.jsxRuntimeExports.jsxs("div",{className:D.productsBlock,children:[(m||i!==void 0)&&t.jsxRuntimeExports.jsxs("div",{className:D.top,children:[m&&t.jsxRuntimeExports.jsx("h3",{className:D.title,children:m}),i!==void 0&&t.jsxRuntimeExports.jsx(t.Switch,{current:i,onChange:x=>e==null?void 0:e(x)})]}),t.jsxRuntimeExports.jsxs("div",{className:D.products,children:[l&&t.jsxRuntimeExports.jsx("h5",{className:D.subtitle,children:l}),p?t.jsxRuntimeExports.jsx(t.DndContext,{sensors:k,onDragEnd:F,children:t.jsxRuntimeExports.jsx(t.SortableContext,{items:s.map(x=>x.id),strategy:t.verticalListSortingStrategy,children:s.map((x,S)=>q(x,S))})}):s.map((x,S)=>q(x,S)),B&&t.jsxRuntimeExports.jsx("div",{style:{width:"100%",display:"flex",justifyContent:"center"},children:t.jsxRuntimeExports.jsx(t.Button,{withoutHover:!0,className:t.clx(D.button,{[D.disabled]:!!(c&&c<=s.length||s.length===(o==null?void 0:o.length))}),size:"s",disabled:!!(c&&c<=s.length||s.length===(o==null?void 0:o.length)),onClick:()=>{const x=[...s];let S=null;if(o){for(let d=0;d<o.length;d++)if(!s.find(f=>f.id===o[d].id)){S=o[d];break}}h==="select"&&o&&x.push({name:S?S.name:o[0].name,id:(S==null?void 0:S.id)||o[0].id,...b}),n(x)},style:{width:"fit-content"},children:t.jsxRuntimeExports.jsxs("div",{className:D.addButton,children:[t.jsxRuntimeExports.jsx("span",{children:"Add Option"}),t.jsxRuntimeExports.jsx(t.Icon,{name:"Plus",width:16,height:16})]})})})]})]})};function ge(u){const{product:i,children:e}=u,{attributes:s,listeners:n,setNodeRef:m,transform:l,transition:a,isDragging:p}=t.useSortable({id:i.id}),I={transform:t.CSS.Transform.toString(l),transition:a};return t.jsxRuntimeExports.jsx("div",{ref:m,style:I,className:`${t.styles.product} ${p?t.styles.dragging:""}`,...s,...n,children:e})}const fe=u=>{const{isActiveItems:i,setIsActiveItems:e,items:s,setItems:n,other:m,title:l,subtitle:a,editable:p=!0,draggable:I=!1,withImage:B=!1,deletable:h=!0,addable:o=!0,itemsType:b,itemsPlaceholder:c="",itemsOptions:g,hasRangeSelector:E=!1,rangeSelectorOptions:O,modalOptions:L,addableOptions:r={}}=u,[k,P]=_.useState(null),[F,q]=_.useState({top:0,left:0}),[x,S]=_.useState(null),d=_.useRef(null),[f,v]=_.useState(!1),w=t.useSensors(t.useSensor(t.PointerSensor,{activationConstraint:{distance:5}}));_.useEffect(()=>{const j=()=>{P(null),v(!1)};return document.body.addEventListener("click",j),P(null),v(!1),()=>{P(null),v(!1),document.body.removeEventListener("click",j)}},[]),_.useEffect(()=>{if(k){const j=[...s].map($=>$.id===k.id?k:$);n(j)}},[k]),_.useEffect(()=>{if(d.current&&x){const j=d.current.getBoundingClientRect().height,$=window.innerHeight;let M=x.top;M+j>$+window.scrollY-200&&(M=$+window.scrollY-j-200),M<0&&(M=10),q({top:M,left:x.left})}},[d.current,x]);const N=(j,$)=>{j.stopPropagation();const M=j.target.getBoundingClientRect();S({top:M.top+window.scrollY,left:M.left-30}),P($),v(!0)};function C(j){if(B)return j?t.jsxRuntimeExports.jsx("img",{src:`https://imagedelivery.net/${j[0]}/w=1000`,alt:"image",width:16,height:16}):t.jsxRuntimeExports.jsx(t.Icon,{name:"Image",width:16,height:16,fill:"#757575"})}const Y=j=>{const{active:$,over:M}=j;if(M&&$.id!==M.id){const T=s.findIndex(z=>z.id===$.id),X=s.findIndex(z=>z.id===M.id);if(T!==-1&&X!==-1){const z=[...s],[V]=z.splice(T,1);z.splice(X,0,V),n(z)}}},Q=j=>{var M;const $=t.jsxRuntimeExports.jsxs(t.jsxRuntimeExports.Fragment,{children:[I&&t.jsxRuntimeExports.jsx("div",{children:t.jsxRuntimeExports.jsx(t.Icon,{name:"DotsSixVertical",hoverable:!0,width:20,height:20})}),b==="select"&&g&&t.jsxRuntimeExports.jsx(t.Select,{onChange:T=>{const z=[...s].map(V=>V.id===j.id?{...j,name:{"en-US":T}}:V);P({...j,name:{"en-US":T}}),n([...z])},value:j.name["en-US"],options:g.filter(T=>!s.find(X=>X.name["en-US"]===T)),leftAddon:C(j.images)}),b==="input"&&t.jsxRuntimeExports.jsx(t.Input,{onChange:T=>{const z=[...s].map(V=>V.id===j.id?{...j,name:{"en-US":T}}:V);n([...z])},value:j.name["en-US"],placeholder:c}),b==="image"&&t.jsxRuntimeExports.jsx(t.ChooseImage,{onChange:T=>{const z=[...s].map(V=>V.id===j.id?{...j,images:T}:V);n([...z])},activeImage:(M=s.find(T=>T.id===j.id))==null?void 0:M.images[0]}),t.jsxRuntimeExports.jsxs("div",{className:t.styles.buttons,children:[p&&t.jsxRuntimeExports.jsx("div",{className:t.styles.deleteButton,children:t.jsxRuntimeExports.jsx(t.Icon,{name:"Sliders",hoverable:!0,width:20,height:20,onClick:T=>N(T,j)})}),h&&t.jsxRuntimeExports.jsx("div",{className:t.styles.deleteButton,children:t.jsxRuntimeExports.jsx(t.Icon,{name:"Trash",hoverable:!0,width:20,height:20,fill:"#C12A2A",onClick:()=>n(s.filter(T=>T.id!==j.id))})})]})]});return I?t.jsxRuntimeExports.jsx(ge,{product:j,children:$},j.id):t.jsxRuntimeExports.jsx("div",{className:t.styles.product,children:$},j.id)};return t.jsxRuntimeExports.jsxs("div",{className:t.styles.productsBlock,children:[(l||i!==void 0)&&t.jsxRuntimeExports.jsxs("div",{className:t.styles.top,children:[l&&t.jsxRuntimeExports.jsx("h3",{className:t.styles.title,children:l}),i!==void 0&&t.jsxRuntimeExports.jsx(t.Switch,{current:i,onChange:j=>e==null?void 0:e(j)})]}),k&&p&&L&&f&&t.jsxRuntimeExports.jsx(t.ItemPopup,{ref:d,activeItem:k,setActiveItem:P,popupPosition:F,modalOptions:L,setIsOpenModal:v}),E&&O&&t.jsxRuntimeExports.jsx(t.RangeSelector,{...O}),t.jsxRuntimeExports.jsxs("div",{className:t.styles.products,children:[a&&t.jsxRuntimeExports.jsx("h5",{className:t.styles.subtitle,children:a}),I?t.jsxRuntimeExports.jsx(t.DndContext,{sensors:w,onDragEnd:Y,children:t.jsxRuntimeExports.jsx(t.SortableContext,{items:s.map(j=>j.id),strategy:t.verticalListSortingStrategy,children:s.map(j=>Q(j))})}):s.map(j=>Q(j)),o&&t.jsxRuntimeExports.jsx("div",{style:{width:"100%",display:"flex",justifyContent:"center"},children:t.jsxRuntimeExports.jsx(t.Button,{withoutHover:!0,className:t.styles.button,size:"s",onClick:()=>{const j=[...s];let $=null;if(g){for(let M=0;M<g.length;M++)if(!s.find(T=>T.name["en-US"]===g[M])){$=g[M];break}}b==="select"&&g?j.push({name:{"en-US":$||g[0]},id:t.v4(),...r,maxSymbols:100}):b==="input"?j.push({name:{"en-US":""},id:t.v4(),...r,maxSymbols:100}):j.push({name:{"en-US":`Image ${s.length+1}`},id:t.v4(),...r,maxSymbols:100}),n(j)},style:{width:"fit-content"},children:t.jsxRuntimeExports.jsxs("div",{className:t.styles.addButton,children:[t.jsxRuntimeExports.jsx("span",{children:"Add Option"}),t.jsxRuntimeExports.jsx(t.Icon,{name:"Plus",width:16,height:16})]})})})]}),m!==void 0&&t.jsxRuntimeExports.jsx(t.OtherSettings,{items:m})]})},be="_subtitle_jql1y_1",Ee="_header_jql1y_8",Re="_text_jql1y_9",ve="_productsBlock_jql1y_10",ye="_buttonsBlock_jql1y_11",Ie="_top_jql1y_23",Se="_itemsBlock_jql1y_32",ke="_typeTexts_jql1y_38",Ne="_block_jql1y_45",Ce="_active_jql1y_58",$e="_products_jql1y_10",Be="_product_jql1y_10",we="_button_jql1y_11",Pe="_image_jql1y_88",Me="_info_jql1y_95",Te="_name_jql1y_107",qe="_buttons_jql1y_11",Ae="_modal_jql1y_118",Oe="_other_jql1y_138",Le="_options_jql1y_144",De="_addButton_jql1y_150",ze="_deleteButton_jql1y_165",W={subtitle:be,header:Ee,text:Re,productsBlock:ve,buttonsBlock:ye,top:Ie,itemsBlock:Se,typeTexts:ke,block:Ne,active:Ce,products:$e,product:Be,button:we,image:Pe,info:Me,name:Te,buttons:qe,modal:Ae,other:Oe,options:Le,addButton:De,deleteButton:ze},tt=u=>{const{buttons:i,setButtons:e,deletable:s=!0,addable:n=!0,editableLink:m=!0}=u,[l,a]=_.useState(null),[p,I]=_.useState({top:0,left:0}),[B,h]=_.useState(null),o=_.useRef(null);_.useEffect(()=>{const c=()=>{a(null)};return document.body.addEventListener("click",c),a(null),()=>{a(null),document.body.removeEventListener("click",c)}},[]),_.useEffect(()=>{if(l){const c=[...i].map(g=>g.id===l.id?l:g);e(c)}},[l]),_.useEffect(()=>{if(o.current&&B){const c=o.current.getBoundingClientRect().height,g=window.innerHeight;let E=B.top;E+c>g+window.scrollY-200&&(E=g+window.scrollY-c-200),E<0&&(E=10),I({top:E,left:B.left})}},[o.current,B]);const b=(c,g)=>{c.stopPropagation();const E=c.target.getBoundingClientRect();h({top:E.top+window.scrollY-70,left:E.left-(n?30:65)}),a(g)};return t.jsxRuntimeExports.jsxs("div",{className:W.products,children:[t.jsxRuntimeExports.jsx("h5",{className:W.subtitle,children:"Button Type"}),i.map(c=>t.jsxRuntimeExports.jsxs("div",{className:W.product,children:[t.jsxRuntimeExports.jsx(t.Select,{onChange:g=>{const O=[...i].map(L=>L.id===c.id?{...c,type:g}:L);e(O)},value:c.type,options:["Primary","Secondary","Tertiary"]}),t.jsxRuntimeExports.jsxs("div",{className:W.buttons,children:[t.jsxRuntimeExports.jsx("div",{className:W.deleteButton,children:t.jsxRuntimeExports.jsx(t.Icon,{name:"Sliders",hoverable:!0,width:20,height:20,onClick:g=>{b(g,c)}})}),s&&t.jsxRuntimeExports.jsx("div",{className:W.deleteButton,children:t.jsxRuntimeExports.jsx(t.Icon,{name:"Trash",hoverable:!0,onClick:()=>{const g=i.filter(E=>E.id!==c.id);e(g)},width:20,height:20,fill:"#C12A2A"})})]})]},c.id)),l&&t.jsxRuntimeExports.jsx(t.ButtonPopup,{ref:o,activeButton:l,setActiveButton:a,popupPosition:p,editableLink:m}),n&&t.jsxRuntimeExports.jsx("div",{style:{width:"100%",display:"flex",justifyContent:"center"},children:t.jsxRuntimeExports.jsx(t.Button,{withoutHover:!0,className:W.button,size:"s",onClick:()=>{const c=[...i];m?c.push({type:"Primary",id:t.v4(),typesText:[],text:{"en-US":"Button Name"},destination:"Go to Page",page:"",openInNewTab:!1}):c.push({type:"Primary",id:t.v4(),typesText:[],text:{"en-US":"Create Ticket"},destination:"Go to Page",page:"",openInNewTab:!1}),e(c)},style:{width:"fit-content"},children:t.jsxRuntimeExports.jsxs("div",{className:W.addButton,children:[t.jsxRuntimeExports.jsx("span",{children:"Add Option"}),t.jsxRuntimeExports.jsx(t.Icon,{name:"Plus",width:16,height:16})]})})})]})},Ue=u=>{const{isActiveButtons:i,setIsActiveButtons:e,buttons:s,setButtons:n,editableLink:m=!0}=u;return t.jsxRuntimeExports.jsx(t.jsxRuntimeExports.Fragment,{children:t.jsxRuntimeExports.jsxs("div",{className:t.styles$1.buttonsBlock,children:[t.jsxRuntimeExports.jsxs("div",{className:t.styles$1.top,children:[t.jsxRuntimeExports.jsx("h3",{className:t.styles$1.title,children:"Buttons"}),t.jsxRuntimeExports.jsx(t.Switch,{current:i,onChange:l=>e(l)})]}),t.jsxRuntimeExports.jsx(tt,{buttons:s,setButtons:n,editableLink:m})]})})},He="_title_1ropb_1",Fe="_subtitle_1ropb_5",Ve="_header_1ropb_12",Ye="_text_1ropb_13",We="_productsBlock_1ropb_14",Ge="_top_1ropb_26",Xe="_itemsBlock_1ropb_35",Qe="_typeTexts_1ropb_41",Je="_block_1ropb_48",Ke="_active_1ropb_61",Ze="_products_1ropb_14",ts="_product_1ropb_14",es="_button_1ropb_80",ss="_image_1ropb_91",ns="_info_1ropb_98",os="_name_1ropb_110",is="_buttons_1ropb_114",as="_modal_1ropb_121",rs="_link_1ropb_142",cs="_modalOptions_1ropb_148",ls="_addButton_1ropb_161",ds="_deleteButton_1ropb_176",us="_closeIcon_1ropb_188",A={title:He,subtitle:Fe,header:Ve,text:Ye,productsBlock:We,top:Ge,itemsBlock:Xe,typeTexts:Qe,block:Je,active:Ke,products:Ze,product:ts,button:es,image:ss,info:ns,name:os,buttons:is,modal:as,link:rs,modalOptions:cs,addButton:ls,deleteButton:ds,closeIcon:us},xs=u=>{const{activeItem:i,setActiveItem:e,popupPosition:s,setIsOpenModal:n,itemsOptions:m}=u,l=m.find(a=>a.id===i.listingId);return l?t.jsxRuntimeExports.jsxs("div",{className:A.modal,onClick:a=>{a.stopPropagation()},style:{top:`${s.top}px`,left:`${s.left}px`},children:[t.jsxRuntimeExports.jsxs("div",{className:A.top,children:[t.jsxRuntimeExports.jsx("h3",{children:t.splitTextIntoSpans(l.productData.name)}),t.jsxRuntimeExports.jsx("div",{className:A.closeIcon,children:t.jsxRuntimeExports.jsx(t.Icon,{name:"X",height:20,width:20,onClick:()=>{n(!1),e(null)}})})]}),t.jsxRuntimeExports.jsx("div",{className:A.modalOptions,children:t.jsxRuntimeExports.jsx(t.ChooseImage,{label:"Put up an attractive image",activeImage:l.productData.images.length>0?l.productData.images[0].cfId:void 0,onChange:a=>{const p={...i,image:a[0]};e(p)}})})]}):null};function ps(u){const{product:i,children:e}=u,{attributes:s,listeners:n,setNodeRef:m,transform:l,transition:a,isDragging:p}=t.useSortable({id:String(i.listingId)}),I={transform:t.CSS.Transform.toString(l),transition:a};return t.jsxRuntimeExports.jsx("div",{ref:m,style:I,className:`${A.product} ${p?A.dragging:""}`,...s,...n,children:e})}const ms=u=>{const{isActiveItems:i,setIsActiveItems:e,items:s,setItems:n,other:m,title:l,subtitle:a,editable:p=!0,draggable:I=!1,withImage:B=!1,deletable:h=!0,addable:o=!0,itemsType:b,itemsOptions:c}=u,[g,E]=_.useState(null),[O,L]=_.useState({top:0,left:0}),[r,k]=_.useState(!1),P=t.useSensors(t.useSensor(t.PointerSensor,{activationConstraint:{distance:5}}));_.useEffect(()=>{const d=()=>{E(null),k(!1)};return document.body.addEventListener("click",d),E(null),k(!1),()=>{E(null),k(!1),document.body.removeEventListener("click",d)}},[]),_.useEffect(()=>{if(g){const d=[...s].map(f=>f.listingId===g.listingId?g:f);n(d)}},[g]);const F=(d,f)=>{d.stopPropagation();const v=d.target.getBoundingClientRect(),w=100,N=window.innerHeight;let C=v.top+window.scrollY;C+w>N&&(C=N-w-20),k(!0),L({top:C-80,left:v.left-30}),E(f)};function q(d){if(B)return d?t.jsxRuntimeExports.jsx("img",{src:`https://imagedelivery.net/${d}/w=1000`,alt:"image",width:16,height:16}):t.jsxRuntimeExports.jsx(t.Icon,{name:"Image",width:16,height:16,fill:"#757575"})}const x=d=>{const{active:f,over:v}=d;if(v&&f.id!==v.id){const w=s.findIndex(C=>String(C.listingId)===f.id),N=s.findIndex(C=>String(C.listingId)===v.id);if(w!==-1&&N!==-1){const C=[...s],[Y]=C.splice(w,1);C.splice(N,0,Y),n(C)}}},S=(d,f)=>{const v=c.find(N=>d.listingId===N.id);if(!v)return null;const w=t.jsxRuntimeExports.jsxs(t.jsxRuntimeExports.Fragment,{children:[I&&t.jsxRuntimeExports.jsx("div",{children:t.jsxRuntimeExports.jsx(t.Icon,{name:"DotsSixVertical",hoverable:!0,width:20,height:20})}),b==="select"&&t.jsxRuntimeExports.jsx(t.Select,{onChange:N=>{const C=[...s],Y=c.find($=>$.productData.name===N);if(!Y)return;const Q={listingId:Y.id,image:Y.productData.images.length>0?Y.productData.images[0].cfId:""},j=C.map($=>$.listingId===d.listingId?Q:$);E(Q),n([...j])},value:v.productData.name,options:[...c.filter(N=>!s.find(C=>C.listingId===N.id)).map(N=>N.productData.name)],leftAddon:q(d.image||v.productData.images.length>0&&v.productData.images[0].cfId||"")},f),t.jsxRuntimeExports.jsxs("div",{className:A.buttons,children:[p&&t.jsxRuntimeExports.jsx("div",{className:A.deleteButton,children:t.jsxRuntimeExports.jsx(t.Icon,{name:"Sliders",hoverable:!0,width:20,height:20,onClick:N=>F(N,d)})}),h&&t.jsxRuntimeExports.jsx("div",{className:A.deleteButton,children:t.jsxRuntimeExports.jsx(t.Icon,{name:"Trash",hoverable:!0,width:20,height:20,fill:"#C12A2A",onClick:()=>n(s.filter(N=>N!==d))})})]})]});return I?t.jsxRuntimeExports.jsx(ps,{product:d,children:w},d.listingId):t.jsxRuntimeExports.jsx("div",{className:A.product,children:w},d.listingId)};return t.jsxRuntimeExports.jsxs("div",{className:A.productsBlock,children:[(l||i!==void 0)&&t.jsxRuntimeExports.jsxs("div",{className:A.top,children:[l&&t.jsxRuntimeExports.jsx("h3",{className:A.title,children:l}),i!==void 0&&t.jsxRuntimeExports.jsx(t.Switch,{current:i,onChange:d=>e==null?void 0:e(d)})]}),r&&g&&t.jsxRuntimeExports.jsx(xs,{activeItem:g,setActiveItem:E,setIsOpenModal:k,popupPosition:O,itemsOptions:c}),t.jsxRuntimeExports.jsxs("div",{className:A.products,children:[a&&t.jsxRuntimeExports.jsx("h5",{className:A.subtitle,children:a}),I?t.jsxRuntimeExports.jsx(t.DndContext,{sensors:P,onDragEnd:x,children:t.jsxRuntimeExports.jsx(t.SortableContext,{items:s.map(d=>String(d.listingId)),strategy:t.verticalListSortingStrategy,children:s.map((d,f)=>S(d,f))})}):s.map((d,f)=>S(d,f)),o&&t.jsxRuntimeExports.jsx("div",{style:{width:"100%",display:"flex",justifyContent:"center"},children:t.jsxRuntimeExports.jsx(t.Button,{withoutHover:!0,className:A.button,size:"s",onClick:()=>{const d=[...s];for(let f=0;f<c.length;f++)if(!s.find(v=>v.listingId===c[f].id)){d.push({listingId:c[f].id,image:c[f].productData.images.length>0?c[f].productData.images[0].cfId:""});break}n(d)},disabled:s.length===c.length,style:{width:"fit-content"},children:t.jsxRuntimeExports.jsxs("div",{className:A.addButton,children:[t.jsxRuntimeExports.jsx("span",{children:"Add Option"}),t.jsxRuntimeExports.jsx(t.Icon,{name:"Plus",width:16,height:16})]})})})]}),m!==void 0&&t.jsxRuntimeExports.jsx(t.OtherSettings,{items:m})]})},js="_options_6cemk_1",hs="_price_6cemk_12",_s="_oldPrice_6cemk_19",gs="_newPrice_6cemk_27",fs="_animate_6cemk_34",bs="_appearAndBounce_6cemk_1",Es="_meta_6cemk_52",Rs="_info_6cemk_58",vs="_infoRight_6cemk_66",ys="_buttons_6cemk_73",Is="_variants_6cemk_80",Ss="_variant_6cemk_80",ks="_stock_6cemk_98",Ns="_variantInfo_6cemk_105",Cs="_quantity_6cemk_111",$s="_count_6cemk_118",Bs="_focused_6cemk_135",ws="_button_6cemk_73",Ps="_activeVariant_6cemk_161",Ms="_chargeTypes_6cemk_165",Ts="_charge_6cemk_165",qs="_chargeActive_6cemk_190",As="_title_6cemk_198",y={options:js,price:hs,oldPrice:_s,newPrice:gs,animate:fs,appearAndBounce:bs,meta:Es,info:Rs,infoRight:vs,buttons:ys,variants:Is,variant:Ss,stock:ks,variantInfo:Ns,quantity:Cs,count:$s,focused:Bs,button:ws,activeVariant:Ps,chargeTypes:Ms,charge:Ts,chargeActive:qs,title:As};var et=(u=>(u.ONE_TIME="One-Time",u.RECURRING="Subscribe & Save",u))(et||{});const Os=u=>{var O,L;const{variants:i}=u,[e,s]=_.useState(i[0]),[n,m]=_.useState(e.chargeTypes[0]),l=t.useNavigate(),[a,p]=_.useState(1),{reset:I,addProductToCart:B,getProducts:h}=t.useCart(),[o,b]=_.useState(!1);_.useEffect(()=>{b(!0);const r=setTimeout(()=>b(!1),600);return()=>clearTimeout(r)},[a]);async function c(){await h(),await B({productId:u.id,productVariantId:e.id,quantity:a})}function g(){I(),c(),l("/checkout")}function E(r){if(r>=864e5){const x=Math.floor(r/864e5);return`${x} ${x===1?"day":"days"}`}else if(r>=36e5){const x=Math.floor(r/36e5);return`${x} ${x===1?"hour":"hours"}`}else if(r>=6e4){const x=Math.floor(r/6e4);return`${x} ${x===1?"minute":"minutes"}`}else{const x=Math.floor(r/1e3);return`${x} ${x===1?"second":"seconds"}`}}return _.useEffect(()=>{(e.quantity.available===0||!e.quantity.available)&&p(0)},[e.quantity.available]),t.jsxRuntimeExports.jsxs("div",{className:y.options,children:[e.chargeTypes.length>1&&t.jsxRuntimeExports.jsx("div",{className:y.chargeTypes,children:e.chargeTypes.map(r=>t.jsxRuntimeExports.jsx("div",{className:t.clx(y.charge,{[y.chargeActive]:n===r}),onClick:()=>m(r),children:et[r]},r))}),t.jsxRuntimeExports.jsx("div",{className:y.variants,children:i.map(r=>{var k;return t.jsxRuntimeExports.jsxs("div",{className:t.clx(y.variant,{[y.activeVariant]:e.id===r.id}),onClick:()=>s(r),children:[t.jsxRuntimeExports.jsxs("div",{className:y.variantInfo,children:[t.jsxRuntimeExports.jsx("span",{className:y.title,children:r.name}),t.jsxRuntimeExports.jsxs("span",{children:["$",n==="ONE_TIME"?r.price.amount:r.subscriptionSettings?r.subscriptionSettings.price.amount:"Price Not Found"]})]}),t.jsxRuntimeExports.jsx("div",{children:n==="ONE_TIME"&&t.jsxRuntimeExports.jsxs("span",{className:y.stock,children:[((k=r.quantity.restrictions)==null?void 0:k.max)||r.quantity.available||0," in stock"]})})]},r.id)})}),n==="ONE_TIME"&&t.jsxRuntimeExports.jsxs("div",{className:y.quantity,children:[t.jsxRuntimeExports.jsx(t.Button$1,{type:"Secondary",onClick:()=>{a>1?p(r=>r-1):p(1)},className:y.button,disabled:e.quantity.available===0||e.quantity.restrictions&&a<=e.quantity.restrictions.min||Object.keys(e.quantity.restrictions||{}).length===0&&!e.quantity.available,children:t.jsxRuntimeExports.jsx(t.Icon,{name:"Minus"})}),t.jsxRuntimeExports.jsx(t.Input$1,{type:"number",value:String(a),onChange:r=>p(Number(r)),max:((O=e.quantity.restrictions)==null?void 0:O.max)||e.quantity.available||1/0,min:((L=e.quantity.restrictions)==null?void 0:L.min)||0,centered:!0,disabled:e.quantity.available===0||!e.quantity.available||Object.keys(e.quantity.restrictions||{}).length===0&&!e.quantity.available}),t.jsxRuntimeExports.jsx(t.Button$1,{type:"Secondary",onClick:()=>{p(r=>r+1)},className:y.button,disabled:!!(e.quantity.restrictions&&a>=e.quantity.restrictions.max||e.quantity.available!==void 0&&a>=e.quantity.available||Object.keys(e.quantity.restrictions||{}).length===0&&!e.quantity.available),children:t.jsxRuntimeExports.jsx(t.Icon,{name:"Plus"})})]}),t.jsxRuntimeExports.jsxs("div",{className:y.meta,children:[t.jsxRuntimeExports.jsxs("div",{className:y.info,children:[t.jsxRuntimeExports.jsx("span",{children:"Delivery"}),t.jsxRuntimeExports.jsxs("div",{className:y.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":E(e.deliveryTime)})]})]}),t.jsxRuntimeExports.jsxs("div",{className:y.info,children:[t.jsxRuntimeExports.jsx("span",{children:"Price"}),t.jsxRuntimeExports.jsx("div",{className:y.infoRight,children:n==="ONE_TIME"?e.compareAtPrice&&(e.compareAtPrice.amount||0)-(e.price.amount||0)>0?t.jsxRuntimeExports.jsxs("div",{className:y.price,children:[t.jsxRuntimeExports.jsxs("span",{className:t.clx(y.newPrice,{[y.animate]:o}),children:["$ ",(e.price.amount||0)*a]}),t.jsxRuntimeExports.jsxs("span",{className:y.oldPrice,children:["$ ",(e.compareAtPrice.amount||0)*a]})]}):t.jsxRuntimeExports.jsxs("span",{className:t.clx(y.newPrice,{[y.animate]:o}),children:["$ ",(e.price.amount||0)*a]}):e.subscriptionSettings&&e.subscriptionSettings.compareAtPrice&&(e.subscriptionSettings.compareAtPrice.amount||0)-(e.subscriptionSettings.price.amount||0)>0?t.jsxRuntimeExports.jsxs("div",{className:y.price,children:[t.jsxRuntimeExports.jsxs("span",{className:t.clx(y.newPrice,{[y.animate]:o}),children:["$ ",e.subscriptionSettings.price.amount||0]}),t.jsxRuntimeExports.jsxs("span",{className:y.oldPrice,children:["$ ",e.subscriptionSettings.compareAtPrice.amount||0]})]}):e.subscriptionSettings&&t.jsxRuntimeExports.jsxs("span",{className:t.clx(y.newPrice,{[y.animate]:o}),children:["$ ",e.subscriptionSettings.price.amount||0]})})]})]}),t.jsxRuntimeExports.jsxs("div",{className:y.buttons,children:[t.jsxRuntimeExports.jsx(t.Button$1,{type:"Primary",onClick:()=>g(),disabled:e.quantity.available===0||!e.quantity.available||Object.keys(e.quantity.restrictions||{}).length===0&&!e.quantity.available,children:n==="ONE_TIME"?"Buy Now":"Subscribe Now"}),n==="ONE_TIME"&&t.jsxRuntimeExports.jsx(t.Button$1,{type:"Secondary",onClick:()=>c(),disabled:e.quantity.available===0||!e.quantity.available||Object.keys(e.quantity.restrictions||{}).length===0&&!e.quantity.available,children:"Add to Cart"})]})]})},Ls="_button_1tdo3_1",Ds="_login_1tdo3_14",zs="_signUp_1tdo3_18",Us="_buttons_1tdo3_23",Hs="_modal_1tdo3_32",Fs="_closing_1tdo3_64",Vs="_info_1tdo3_113",Ys="_top_1tdo3_120",Ws="_title_1tdo3_131",Gs="_clear_1tdo3_138",Xs="_activeClear_1tdo3_145",Qs="_count_1tdo3_149",Js="_cart_1tdo3_164",Ks="_empty_1tdo3_172",Zs="_product_1tdo3_198",tn="_products_1tdo3_207",en="_image_1tdo3_215",sn="_productInfo_1tdo3_221",nn="_content_1tdo3_228",on="_name_1tdo3_234",an="_price_1tdo3_240",rn="_productButtons_1tdo3_246",cn="_productButton_1tdo3_246",ln="_productCount_1tdo3_266",dn="_bottom_1tdo3_282",un="_subtotal_1tdo3_290",xn="_block_1tdo3_298",pn="_shoppingCount_1tdo3_305",mn="_total_1tdo3_325",jn="_link_1tdo3_331",hn="_userInfo_1tdo3_338",_n="_pagesMobileModal_1tdo3_349",gn="_pagesMobileModalContent_1tdo3_363",fn="_pagesMobileModalHeader_1tdo3_369",bn="_pagesMobileModalFooter_1tdo3_379",R={button:Ls,login:Ds,signUp:zs,buttons:Us,modal:Hs,"slide-in-fade":"_slide-in-fade_1tdo3_1","mobile-slide-in-fade":"_mobile-slide-in-fade_1tdo3_1",closing:Fs,"mobile-slide-out-fade":"_mobile-slide-out-fade_1tdo3_1","slide-out-fade":"_slide-out-fade_1tdo3_1",info:Vs,top:Ys,title:Ws,clear:Gs,activeClear:Xs,count:Qs,cart:Js,empty:Ks,product:Zs,products:tn,image:en,productInfo:sn,content:nn,name:on,price:an,productButtons:rn,productButton:cn,productCount:ln,bottom:dn,subtotal:un,block:xn,shoppingCount:pn,total:mn,link:jn,userInfo:hn,pagesMobileModal:_n,pagesMobileModalContent:gn,pagesMobileModalHeader:fn,pagesMobileModalFooter:bn},En=u=>{const{shopping:i,signUp:e,isShowUserInfo:s=!0}=u;return t.jsxRuntimeExports.jsxs("div",{className:R.buttons,children:[i&&t.jsxRuntimeExports.jsx(st,{}),s&&t.jsxRuntimeExports.jsx(Z,{signUp:e})]})},st=()=>{const[u,i]=_.useState(!1),[e,s]=_.useState([]),{cart:n,getProducts:m}=t.useCart();function l(o){for(let b=0;b<n.parts.length;b++)for(let c=0;c<o.variants.length;c++)if(n.parts[b].productVariantId===o.variants[b].id)return n.parts[b].productVariantId}function a(o){for(let b=0;b<n.parts.length;b++)for(let c=0;c<o.variants.length;c++)if(n.parts[b].productVariantId===o.variants[b].id)return n.parts[b].quantity}_.useEffect(()=>{(async()=>{const b=n.parts.map(E=>String(E.productId)),g=(await m([...b])).map(E=>({...E,activeVariantId:l(E),quantity:a(E)}));s(g)})()},[n.parts.length]);function p(o){var b;return!o||!(o!=null&&o.variants)?!1:(b=o.variants.find(c=>c.id===o.activeVariantId))==null?void 0:b.subscriptionSettings}const I=n.parts.length>0&&e.length>0&&!p(e[0]),[B,h]=_.useState(!1);return t.jsxRuntimeExports.jsxs(t.jsxRuntimeExports.Fragment,{children:[t.jsxRuntimeExports.jsxs(t.Button$1,{type:"Secondary",style:{padding:10},onClick:o=>{o.stopPropagation(),window.location.pathname.includes("/admin/builder")||(i(!0),h(!0))},children:[t.jsxRuntimeExports.jsx(t.Icon,{name:"Handbag",fill:"var(--icon-primary)"}),I&&t.jsxRuntimeExports.jsx("div",{className:R.shoppingCount,children:n.parts.length})]}),u&&t.jsxRuntimeExports.jsx(t.Modal,{close:()=>{h(!1),setTimeout(()=>{i(!1)},300)},withAnimation:!1,children:t.jsxRuntimeExports.jsx(nt,{activeProducts:e,isCartNotEmpty:I,isOpen:B})})]})},nt=u=>{const{activeProducts:i,isCartNotEmpty:e,isOpen:s}=u,{cart:n,reset:m,getTotalAndDiscount:l,updateQuantityOfProduct:a}=t.useCart(),p=t.useNavigate();function I(o){p(o)}function B(o){a({productId:o.id,productVariantId:o.activeVariantId,quantity:o.quantity+1})}function h(o){a({productId:o.id,productVariantId:o.activeVariantId,quantity:o.quantity-1})}return t.jsxRuntimeExports.jsxs("div",{className:t.clx(R.modal,{[R.closing]:!s}),onClick:o=>o.stopPropagation(),children:[t.jsxRuntimeExports.jsxs("div",{className:R.top,children:[t.jsxRuntimeExports.jsxs("div",{className:R.info,children:[t.jsxRuntimeExports.jsx("span",{className:R.title,children:"Cart"}),e&&t.jsxRuntimeExports.jsx("div",{className:R.count,children:n.parts.length})]}),t.jsxRuntimeExports.jsx("button",{className:t.clx(R.clear,{[R.activeClear]:e}),disabled:!e,onClick:m,children:"Clear all"})]}),e?t.jsxRuntimeExports.jsxs("div",{className:R.cart,children:[t.jsxRuntimeExports.jsx("div",{className:R.products,children:i.map(o=>t.jsxRuntimeExports.jsxs("div",{className:R.product,children:[t.jsxRuntimeExports.jsxs("div",{className:R.productInfo,children:[t.jsxRuntimeExports.jsx("img",{src:`https://imagedelivery.net/${o.images[0].cfId}/w=500`,alt:"image",width:"100%",height:"100%",className:R.image}),t.jsxRuntimeExports.jsxs("div",{className:R.content,children:[t.jsxRuntimeExports.jsx("div",{className:R.name,children:o.name}),t.jsxRuntimeExports.jsxs("div",{className:R.price,children:["$",o.variants.find(b=>b.id===o.activeVariantId).price.amount*((o==null?void 0:o.quantity)||1)]})]})]}),t.jsxRuntimeExports.jsxs("div",{className:R.productButtons,children:[t.jsxRuntimeExports.jsx("div",{onClick:()=>{o.quantity!==1&&h(o)},className:R.productButton,children:t.jsxRuntimeExports.jsx(t.Icon,{name:"Minus",fill:"#757575",width:20,height:20})}),t.jsxRuntimeExports.jsx("div",{className:R.productCount,children:o.quantity}),t.jsxRuntimeExports.jsx("div",{onClick:()=>B(o),className:R.productButton,children:t.jsxRuntimeExports.jsx(t.Icon,{name:"Plus",fill:"#757575",width:20,height:20})})]})]},o.id))}),t.jsxRuntimeExports.jsxs("div",{className:R.bottom,children:[t.jsxRuntimeExports.jsxs("div",{className:R.subtotal,children:[t.jsxRuntimeExports.jsxs("div",{className:R.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:R.total,children:["$",l().total]})]}),t.jsxRuntimeExports.jsx(t.Button$1,{onClick:()=>I("/checkout"),children:"Checkout"})]})]}):t.jsxRuntimeExports.jsx(ot,{})]})},ot=()=>t.jsxRuntimeExports.jsxs("div",{className:R.empty,children:[t.jsxRuntimeExports.jsx("div",{children:t.jsxRuntimeExports.jsx(t.Icon,{name:"Handbag",fill:"var(--icon-secondary)"})}),t.jsxRuntimeExports.jsx("span",{children:"Empty Cart"}),t.jsxRuntimeExports.jsxs("span",{children:["You don’t have any items in your shopping cart yet,"," ",t.jsxRuntimeExports.jsx("a",{href:"/products",className:R.link,children:"view products"})]})]}),Z=({signUp:u})=>{const i=JSON.parse(localStorage.getItem("token")||"{}"),{data:e}=i,s=t.useNavigate();function n(a){window.location.pathname.includes("/admin/builder")||s(a)}if(!e)return t.jsxRuntimeExports.jsxs(t.jsxRuntimeExports.Fragment,{children:[t.jsxRuntimeExports.jsx(t.Button$1,{onClick:()=>n("/customer-dash"),type:"Secondary",style:{padding:10},children:"Login"}),u&&t.jsxRuntimeExports.jsx(t.Button$1,{onClick:()=>n("/customer-dash"),type:"Primary",style:{padding:10},children:"Sign Up"})]});const[m,l]=_.useState("test-email@gmail.com");return _.useEffect(()=>{(async()=>{const p=t.jwtDecode(e);l(p.email)})()},[e]),t.jsxRuntimeExports.jsx("div",{className:R.userInfo,onClick:()=>n("/customer-dash"),children:t.jsxRuntimeExports.jsx("div",{children:m||"test-email@gmail.com"})})},it=({children:u,logo:i,setIsOpen:e,signUp:s})=>{const{setIsOpen:n}=t.useModalStore(),m=()=>{n(!1),setTimeout(()=>{e(!1),n(!0)},300)};return t.jsxRuntimeExports.jsxs("div",{className:R.pagesMobileModal,onClick:l=>l.stopPropagation(),children:[t.jsxRuntimeExports.jsxs("div",{className:R.pagesMobileModalHeader,children:[t.jsxRuntimeExports.jsx("div",{children:i}),t.jsxRuntimeExports.jsx(t.Button$1,{type:"Secondary",onClick:m,children:t.jsxRuntimeExports.jsx(t.Icon,{name:"X",fill:"var(--icon-primary)"})})]}),t.jsxRuntimeExports.jsx("div",{className:R.pagesMobileModalContent,children:u}),t.jsxRuntimeExports.jsx("div",{className:R.pagesMobileModalFooter,children:t.jsxRuntimeExports.jsx(Z,{signUp:s})})]})},Rn=({children:u,logo:i,signUp:e})=>{const[s,n]=_.useState(!1);return t.jsxRuntimeExports.jsxs(t.jsxRuntimeExports.Fragment,{children:[t.jsxRuntimeExports.jsx(at,{setIsOpenModal:n}),s&&t.jsxRuntimeExports.jsx(t.Modal,{close:()=>n(!1),children:t.jsxRuntimeExports.jsx(it,{logo:i,setIsOpen:n,signUp:e,children:u})})]})},at=u=>{const{setIsOpenModal:i}=u;return t.jsxRuntimeExports.jsx(t.Button$1,{type:"Secondary",style:{padding:10},onClick:e=>{e.stopPropagation(),i(!0)},children:t.jsxRuntimeExports.jsx(t.Icon,{name:"List",fill:"var(--icon-primary)"})})},vn="_share_xddz7_1",yn="_modal_xddz7_8",In="_header_xddz7_20",Sn="_socials_xddz7_30",kn="_social_xddz7_30",Nn="_copy_xddz7_40",Cn="_title_xddz7_47",$n="_copyWrapper_xddz7_53",Bn="_copyText_xddz7_62",wn="_copyTextMobile_xddz7_75",Pn="_copyTextMiniMobile_xddz7_94",G={share:vn,modal:yn,header:In,socials:Sn,social:kn,copy:Nn,title:Cn,copyWrapper:$n,copyText:Bn,copyTextMobile:wn,copyTextMiniMobile:Pn},Mn=()=>{const{isOpenModal:u,setIsOpenModal:i}=t.useShareLinkStore();function e(){i(!0)}return t.jsxRuntimeExports.jsxs(t.jsxRuntimeExports.Fragment,{children:[t.jsxRuntimeExports.jsx(t.Button,{className:G.share,onClick:s=>{s.stopPropagation(),e()},type:"Secondary",children:t.jsxRuntimeExports.jsx(t.Icon,{name:"Share",fill:"#757575",hoverable:!0})}),u&&t.jsxRuntimeExports.jsx(t.Modal,{close:i,children:t.jsxRuntimeExports.jsx(Tn,{})})]})},Tn=()=>{const{setIsOpenModal:u}=t.useShareLinkStore(),{notification:i,setNotification:e}=t.useNotificationStore(),{setIsOpen:s}=t.useModalStore(),n=window.location.href;function m(){navigator.clipboard.writeText(n),e({message:"Link copied to clipboard",status:"success"})}function l(){s(!1),setTimeout(()=>{u(!1),s(!0)},300)}function a(p,I){return p.length>I?p.slice(0,I)+"...":p}return t.jsxRuntimeExports.jsxs("div",{className:G.modal,onClick:p=>p.stopPropagation(),children:[t.jsxRuntimeExports.jsxs("div",{className:G.header,children:[t.jsxRuntimeExports.jsx("div",{className:G.title,children:"Copy Product Link"}),t.jsxRuntimeExports.jsx(t.Icon,{name:"X",fill:"#757575",onClick:l,hoverable:!0})]}),t.jsxRuntimeExports.jsxs("div",{className:G.copyWrapper,children:[t.jsxRuntimeExports.jsxs(t.Button,{type:"Secondary",onClick:m,style:{flex:1},children:[t.jsxRuntimeExports.jsx("div",{className:G.copyText,children:a(n,100)}),t.jsxRuntimeExports.jsx("div",{className:G.copyTextMobile,children:a(n,40)}),t.jsxRuntimeExports.jsx("div",{className:G.copyTextMiniMobile,children:a(n,20)})]}),t.jsxRuntimeExports.jsx(t.Button,{type:"Secondary",onClick:m,children:i?t.jsxRuntimeExports.jsx(t.Icon,{name:"Check"}):t.jsxRuntimeExports.jsx(t.Icon,{name:"Copy"})})]})]})},qn="_accordion_1s1lq_1",An="_header_1s1lq_9",On="_icon_1s1lq_18",Ln="_open_1s1lq_21",Dn="_content_1s1lq_25",J={accordion:qn,header:An,icon:On,open:Ln,content:Dn},zn=({title:u,content:i,defaultOpen:e=!1})=>{const[s,n]=_.useState(e),[m,l]=_.useState(0),a=_.useRef(null),p=()=>{n(!s)};return _.useEffect(()=>{a.current&&l(s?a.current.scrollHeight:0)},[s]),t.jsxRuntimeExports.jsxs("div",{className:J.accordion,children:[t.jsxRuntimeExports.jsxs("div",{className:J.header,onClick:p,children:[t.jsxRuntimeExports.jsx("h5",{id:"h5",children:u}),t.jsxRuntimeExports.jsx("div",{className:t.clx(J.icon,{[J.open]:s}),children:t.jsxRuntimeExports.jsx(t.Icon,{name:"CaretDown"})})]}),t.jsxRuntimeExports.jsx("div",{ref:a,className:J.content,style:{height:`${m}px`},children:t.jsxRuntimeExports.jsx("p",{id:"p",children:i})})]})},Un=({children:u,path:i,className:e,target:s="_self",id:n})=>{if(window.location.pathname.includes("/admin/builder"))return t.jsxRuntimeExports.jsx("div",{className:e,role:"link",style:{cursor:"pointer"},id:n,children:u});const m=t.useNavigate(),l=/^https?:\/\//.test(i),a=p=>{l||s==="_blank"?s==="_blank"?window.open(i,"_blank"):window.location.href=i:(p.preventDefault(),m(i,{replace:!0}))};return t.jsxRuntimeExports.jsx("div",{onClick:a,className:e,role:"link",style:{cursor:"pointer"},id:n,children:u})},Hn="_buttonsBlock_1b2rb_1",Fn="_slideUp_1b2rb_1",Vn={buttonsBlock:Hn,slideUp:Fn},Yn=()=>t.jsxRuntimeExports.jsxs("div",{className:Vn.buttonsBlock,children:[t.jsxRuntimeExports.jsx(t.Button$1,{type:"Primary",style:{width:"100%"},children:"Add to Cart"}),t.jsxRuntimeExports.jsx(t.Button$1,{type:"Secondary",children:"Buy"})]}),Wn="_wrapper_st58d_1",Gn="_label_st58d_10",Xn="_textarea_st58d_18",Qn="_length_st58d_33",K={wrapper:Wn,label:Gn,textarea:Xn,length:Qn},Jn=u=>{const{onChange:i,label:e,value:s,maxLength:n,placeholder:m="Type something..."}=u,[l,a]=_.useState(s.length);return t.jsxRuntimeExports.jsxs("div",{className:K.wrapper,children:[e&&t.jsxRuntimeExports.jsx("label",{className:K.label,htmlFor:e,children:e}),t.jsxRuntimeExports.jsx("textarea",{id:e,defaultValue:s,onChange:p=>{a(p.target.value.length),i(p.target.value)},placeholder:m,className:K.textarea,maxLength:n}),n&&t.jsxRuntimeExports.jsxs("div",{className:K.length,children:[l,"/",n]})]})};exports.Button=t.Button$1;exports.ChooseImage=t.ChooseImage;exports.ChooseImageModal=t.ChooseImageModal;exports.Icon=t.Icon;exports.InputSettings=t.Input;exports.InputUI=t.Input$1;exports.ItemsSettings=t.ItemsSettings;exports.Loader=t.Loader;exports.Modal=t.Modal;exports.RangeSelector=t.RangeSelector;exports.Select=t.Select;exports.Switch=t.Switch;exports.TextSettings=t.TextSettings;exports.TextareaSettings=t.Textarea;exports.TypesText=t.TypesText;exports.Accordion=zn;exports.BurgerMenuButton=at;exports.ButtonTypeSettings=tt;exports.ButtonsSettings=Ue;exports.CategorySettings=Vt;exports.EmptyCart=ot;exports.FormSettings=fe;exports.HeaderButtons=En;exports.LayoutSettings=Et;exports.Link=Un;exports.ListingSelector=ms;exports.PagesMobileMenu=Rn;exports.PagesMobileModal=it;exports.PagesSettings=_e;exports.ProductCardButtons=Yn;exports.ProductOptions=Os;exports.ShareLink=Mn;exports.ShoppingButton=st;exports.ShoppingModalCart=nt;exports.TextareaUI=Jn;exports.UserInfo=Z;