|
1
|
|
-(()=>{"use strict";var e,t={7208(){const e=window.wp.element,t=window.wp.hooks,s=window.wp.i18n,r=window.ReactJSXRuntime,a=({checked:e,onChange:t,disabled:s})=>{const a={position:"absolute",inset:0,borderRadius:"9999px",background:e?"#00216A":"#cbd5e1",transition:"background 0.25s cubic-bezier(0.4, 0, 0.2, 1)",opacity:s?.45:1,pointerEvents:"none",willChange:"background"},l={position:"absolute",top:"50%",left:3,width:16,height:16,borderRadius:"9999px",background:"#fff",boxShadow:"0 1px 4px rgba(0,0,0,0.25)",transform:e?"translate(18px, -50%)":"translate(0px, -50%)",transition:"transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.2s ease",pointerEvents:"none",zIndex:1,willChange:"transform"},i={position:"relative",display:"inline-flex",alignItems:"center",width:40,height:22,cursor:s?"not-allowed":"pointer",flexShrink:0,userSelect:"none"};return(0,r.jsxs)("label",{style:i,children:[(0,r.jsx)("input",{type:"checkbox",checked:e,disabled:s,onChange:t,style:{position:"absolute",opacity:0,width:0,height:0,margin:0,padding:0,pointerEvents:"none"}}),(0,r.jsx)("span",{style:a}),(0,r.jsx)("span",{style:l})]})},l="inline-flex cursor-pointer items-center gap-1.5 rounded-md border border-transparent px-[18px] py-2 text-[13px] font-semibold leading-snug no-underline transition-all duration-200 disabled:cursor-not-allowed disabled:opacity-60",i=`${l} border-uks-brand bg-uks-brand text-white hover:bg-uks-brand-dark`,o=`${l} bg-gray-100 border-gray-200 text-gray-700 hover:bg-gray-200 hover:text-gray-800`,n=`${l} px-6 py-2.5 text-sm`,d=`${l} px-3 py-2.5 text-xs`,c=`${l} border-indigo-500 bg-indigo-500 text-white hover:opacity-90`,m=`${l} border-pink-500 bg-pink-500 text-white hover:opacity-90`,x=`${l} border-orange-500 bg-orange-500 text-white hover:opacity-90`,h=`${l} border-violet-500 bg-violet-500 text-white hover:opacity-90`,u=`${l} border-teal-500 bg-teal-500 text-white hover:opacity-90`,p="whitespace-nowrap text-xs font-semibold text-slate-600",b="min-w-[140px] cursor-pointer rounded-md border border-slate-200 bg-white px-3 py-1.5 text-[13px] text-slate-700 transition-all duration-200 hover:border-slate-300 focus:border-uks-brand focus:outline-none focus:ring-2 focus:ring-uks-brand",g="flex items-center justify-between border-b border-slate-100 py-2.5 last:border-b-0",f="flex items-center gap-2 text-[13px] font-medium text-slate-700",j="min-w-[120px] w-full block max-w-full rounded-md border border-slate-200 bg-white px-3 py-1.5 text-[13px] text-slate-700 focus:border-uks-brand focus:outline-none focus:ring-2 focus:ring-uks-brand disabled:cursor-not-allowed disabled:opacity-50",k="shrink-0 whitespace-nowrap rounded-md border border-solid border-gray-100 text-uks-brand px-2 py-0.5 text-[10px] font-bold shadow-sm bg-white",_={xmlns:"http://www.w3.org/2000/svg",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},w=({className:e="block h-10 w-10 sm:h-12 sm:w-12"})=>(0,r.jsxs)("svg",{className:e,version:"1.1",id:"Layer_1",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",x:"0px",y:"0px",viewBox:"0 0 500 500",style:{enableBackground:"new 0 0 500 500"},xmlSpace:"preserve",children:[(0,r.jsx)("style",{type:"text/css",dangerouslySetInnerHTML:{__html:"\n\t.st0{fill:#E30C1D;enable-background:new ;}\n\t.st1{fill:#FFFFFF;}\n"}}),(0,r.jsx)("path",{className:"st0",d:"M473.6,496.4h-447c-12.6,0-22.9-10.2-22.9-22.9v-447c0-12.4,10.2-22.9,22.9-22.9h446.8 c12.6,0,22.9,10.2,22.9,22.9v446.8C496.3,486.3,486.2,496.4,473.6,496.4z"}),(0,r.jsxs)("g",{children:[(0,r.jsx)("path",{className:"st1",d:"M374.3,364l-21.1-157.6c-1.9-14.3-14.2-25-28.6-25c0,0-0.1,0-0.1,0l-143.7,0.7c-14.5,0.1-26.8,11-28.5,25.4 l-18.6,156.9c-1,8.2,1.6,16.4,7.1,22.5s13.3,9.7,21.5,9.7h183.5c8.3,0,16.2-3.6,21.7-9.8C372.9,380.6,375.4,372.3,374.3,364z M186.4,217.1l132.8-0.6l6.4,47.6c-34.1,4.4-61,23.4-78.4,55.7c-8.5,15.8-12.9,31.5-15,41.9h-63L186.4,217.1z M268.1,361.7 c1.9-7.3,5-16.3,9.9-25.3c12-22.3,29.2-34.7,52.2-37.6l8.4,62.9H268.1z"}),(0,r.jsx)("path",{className:"st1",d:"M212.4,169.2c8.8,0,16-7.2,16-16c0-13.9,11.3-25.3,25.3-25.3c13.9,0,25.3,11.3,25.3,25.3c0,8.8,7.2,16,16,16 s16-7.2,16-16c0-31.6-25.7-57.3-57.3-57.3c-31.6,0-57.3,25.7-57.3,57.3C196.4,162.1,203.6,169.2,212.4,169.2z"})]})]}),v=({className:e="h-4 w-4"})=>(0,r.jsxs)("svg",{..._,viewBox:"0 0 24 24",className:e,children:[(0,r.jsx)("path",{d:"M18 6 6 18"}),(0,r.jsx)("path",{d:"m6 6 12 12"})]}),y=({className:e="h-4 w-4"})=>(0,r.jsxs)("svg",{..._,viewBox:"0 0 24 24",className:e,children:[(0,r.jsx)("path",{d:"M4 6h16"}),(0,r.jsx)("path",{d:"M4 12h16"}),(0,r.jsx)("path",{d:"M4 18h16"})]}),N=({className:e="h-4 w-4 block"})=>(0,r.jsxs)("svg",{..._,width:24,height:24,viewBox:"0 0 24 24",className:e,children:[(0,r.jsx)("path",{d:"M3 11h3a2 2 0 0 1 2 2v3a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-5Zm0 0a9 9 0 1 1 18 0m0 0v5a2 2 0 0 1-2 2h-1a2 2 0 0 1-2-2v-3a2 2 0 0 1 2-2h3Z"}),(0,r.jsx)("path",{d:"M21 16v2a4 4 0 0 1-4 4h-5"})]}),M=({className:e="w-5 h-5"})=>(0,r.jsxs)("svg",{..._,width:24,height:24,viewBox:"0 0 24 24",className:e,children:[(0,r.jsx)("path",{d:"M12 2v4"}),(0,r.jsx)("path",{d:"m16.2 7.8 2.9-2.9"}),(0,r.jsx)("path",{d:"M18 12h4"}),(0,r.jsx)("path",{d:"m16.2 16.2 2.9 2.9"}),(0,r.jsx)("path",{d:"M12 18v4"}),(0,r.jsx)("path",{d:"m4.9 19.1 2.9-2.9"}),(0,r.jsx)("path",{d:"M2 12h4"}),(0,r.jsx)("path",{d:"m4.9 4.9 2.9 2.9"})]}),C=({className:e="w-4 h-4 block"})=>(0,r.jsx)("svg",{..._,width:24,height:24,viewBox:"0 0 24 24",className:e,children:(0,r.jsx)("path",{d:"M11.525 2.295a.53.53 0 0 1 .95 0l2.31 4.679a2.123 2.123 0 0 0 1.595 1.16l5.166.756a.53.53 0 0 1 .294.904l-3.736 3.638a2.123 2.123 0 0 0-.611 1.878l.882 5.14a.53.53 0 0 1-.771.56l-4.618-2.428a2.122 2.122 0 0 0-1.973 0L6.396 21.01a.53.53 0 0 1-.77-.56l.881-5.139a2.122 2.122 0 0 0-.611-1.879L2.16 9.795a.53.53 0 0 1 .294-.906l5.165-.755a2.122 2.122 0 0 0 1.597-1.16z"})}),P=({className:e="w-4 h-4 block"})=>(0,r.jsx)("svg",{className:e,viewBox:"0 0 24 24",fill:"currentColor",children:(0,r.jsx)("path",{d:"M11.525 2.295a.53.53 0 0 1 .95 0l2.31 4.679a2.123 2.123 0 0 0 1.595 1.16l5.166.756a.53.53 0 0 1 .294.904l-3.736 3.638a2.123 2.123 0 0 0-.611 1.878l.882 5.14a.53.53 0 0 1-.771.56l-4.618-2.428a2.122 2.122 0 0 0-1.973 0L6.396 21.01a.53.53 0 0 1-.77-.56l.881-5.139a2.122 2.122 0 0 0-.611-1.879L2.16 9.795a.53.53 0 0 1 .294-.906l5.165-.755a2.122 2.122 0 0 0 1.597-1.16z"})}),S="h-5 w-5 block color-current",A=({className:e=S})=>(0,r.jsxs)("svg",{..._,width:24,height:24,viewBox:"0 0 24 24",className:e,children:[(0,r.jsx)("rect",{width:7,height:9,x:3,y:3,rx:1}),(0,r.jsx)("rect",{width:7,height:5,x:14,y:3,rx:1}),(0,r.jsx)("rect",{width:7,height:9,x:14,y:12,rx:1}),(0,r.jsx)("rect",{width:7,height:5,x:3,y:16,rx:1})]}),$=({className:e="h-4 w-4 block"})=>(0,r.jsxs)("svg",{..._,width:24,height:24,viewBox:"0 0 24 24",className:e,children:[(0,r.jsx)("path",{d:"m21 21-4.34-4.34"}),(0,r.jsx)("circle",{cx:11,cy:11,r:8})]}),E=({className:e="h-4 w-4"})=>(0,r.jsx)("svg",{..._,viewBox:"0 0 24 24",className:e,children:(0,r.jsx)("path",{d:"M20 6 9 17l-5-5"})}),B=({className:e="h-4 w-4 block"})=>(0,r.jsxs)("svg",{..._,width:24,height:24,viewBox:"0 0 24 24",className:e,children:[(0,r.jsx)("path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0"}),(0,r.jsx)("circle",{cx:12,cy:12,r:3})]}),L=({className:e="h-4 w-4 block"})=>(0,r.jsx)("svg",{..._,width:24,height:24,viewBox:"0 0 24 24",className:e,children:(0,r.jsx)("path",{d:"M5 5a2 2 0 0 1 3.008-1.728l11.997 6.998a2 2 0 0 1 .003 3.458l-12 7A2 2 0 0 1 5 19z"})}),F=({className:e="h-4 w-4 block"})=>(0,r.jsxs)("svg",{..._,width:24,height:24,viewBox:"0 0 24 24",className:e,children:[(0,r.jsx)("path",{d:"M6.3 20.3a2.4 2.4 0 0 0 3.4 0L12 18l-6-6-2.3 2.3a2.4 2.4 0 0 0 0 3.4Z"}),(0,r.jsx)("path",{d:"m2 22 3-3"}),(0,r.jsx)("path",{d:"M7.5 13.5 10 11"}),(0,r.jsx)("path",{d:"M10.5 16.5 13 14"}),(0,r.jsx)("path",{d:"m18 3-4 4h6l-4 4"})]}),z=({className:e="h-7 w-7",stroke:t="currentColor"})=>(0,r.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:28,height:28,viewBox:"0 0 24 24",fill:"none",stroke:t,strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round",className:e,children:[(0,r.jsx)("rect",{width:18,height:11,x:3,y:11,rx:2,ry:2}),(0,r.jsx)("path",{d:"M7 11V7a5 5 0 0 1 10 0v4"})]}),D=({className:e="h-5 w-5"})=>(0,r.jsxs)("svg",{..._,className:e,viewBox:"0 0 24 24",children:[(0,r.jsx)("path",{d:"M20 21v-2a4 4 0 0 0-4-4H8a4 4 0 0 0-4 4v2"}),(0,r.jsx)("circle",{cx:"12",cy:"7",r:"4"})]}),T=({className:e="h-5 w-5"})=>(0,r.jsxs)("svg",{..._,className:e,viewBox:"0 0 24 24",children:[(0,r.jsx)("circle",{cx:"12",cy:"12",r:"10"}),(0,r.jsx)("path",{d:"M2 12h20M12 2a15.3 15.3 0 0 1 4 10 15.3 15.3 0 0 1-4 10 15.3 15.3 0 0 1-4-10 15.3 15.3 0 0 1 4-10z"})]}),O=({className:e="h-5 w-5"})=>(0,r.jsxs)("svg",{..._,className:e,viewBox:"0 0 24 24",children:[(0,r.jsx)("path",{d:"M4 19.5A2.5 2.5 0 0 1 6.5 17H20"}),(0,r.jsx)("path",{d:"M6.5 2H20v20H6.5A2.5 2.5 0 0 1 4 19.5v-15A2.5 2.5 0 0 1 6.5 2z"})]}),W=({className:e="h-5 w-5"})=>(0,r.jsx)("svg",{..._,className:e,viewBox:"0 0 24 24",children:(0,r.jsx)("path",{d:"M21 11.5a8.38 8.38 0 0 1-.9 3.8 8.5 8.5 0 0 1-7.6 4.7 8.38 8.38 0 0 1-3.8-.9L3 21l1.9-5.7a8.38 8.38 0 0 1-.9-3.8 8.5 8.5 0 0 1 4.7-7.6 8.38 8.38 0 0 1 3.8-.9h.5a8.48 8.48 0 0 1 8 8v.5z"})}),U=({className:e="h-5 w-5"})=>(0,r.jsxs)("svg",{..._,className:e,viewBox:"0 0 24 24",children:[(0,r.jsx)("polygon",{points:"23 7 16 12 23 17 23 7"}),(0,r.jsx)("rect",{x:"1",y:"5",width:"15",height:"14",rx:"2",ry:"2"})]}),V=({className:e="h-5 w-5"})=>(0,r.jsxs)("svg",{..._,className:e,viewBox:"0 0 24 24",children:[(0,r.jsx)("path",{d:"M12 20h9"}),(0,r.jsx)("path",{d:"M16.5 3.5a2.1 2.1 0 0 1 3 3L7 19l-4 1 1-4Z"})]}),I=({className:e="h-5 w-5"})=>(0,r.jsx)("svg",{..._,className:e,viewBox:"0 0 24 24",children:(0,r.jsx)("path",{d:"M18 2h-3a5 5 0 0 0-5 5v3H7v4h3v8h4v-8h3l1-4h-4V7a1 1 0 0 1 1-1h3z"})}),H={home:({className:e=S})=>(0,r.jsxs)("svg",{..._,width:24,height:24,viewBox:"0 0 24 24",className:e,children:[(0,r.jsx)("path",{d:"M15 21v-8a1 1 0 0 0-1-1h-4a1 1 0 0 0-1 1v8"}),(0,r.jsx)("path",{d:"M3 10a2 2 0 0 1 .709-1.528l7-6a2 2 0 0 1 2.582 0l7 6A2 2 0 0 1 21 10v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z"})]}),grid:A,"currency-switcher":({className:e=S})=>(0,r.jsxs)("svg",{..._,width:24,height:24,viewBox:"0 0 24 24",className:e,children:[(0,r.jsx)("circle",{cx:"12",cy:"12",r:"10"}),(0,r.jsx)("path",{d:"M16 8h-6a2 2 0 1 0 0 4h4a2 2 0 1 1 0 4H8"}),(0,r.jsx)("path",{d:"M12 18V6"})]}),"variation-swatches":({className:e=S})=>(0,r.jsxs)("svg",{..._,width:24,height:24,viewBox:"0 0 24 24",className:e,children:[(0,r.jsx)("path",{d:"M12 2.69l5.66 5.66a8 8 0 1 1-11.31 0z"}),(0,r.jsx)("circle",{cx:"7.5",cy:"10.5",r:".5",fill:"currentColor",stroke:"none"}),(0,r.jsx)("circle",{cx:"12",cy:"7.5",r:".5",fill:"currentColor",stroke:"none"}),(0,r.jsx)("circle",{cx:"16.5",cy:"10.5",r:".5",fill:"currentColor",stroke:"none"}),(0,r.jsx)("circle",{cx:"9",cy:"15.5",r:".5",fill:"currentColor",stroke:"none"})]}),settings:A,badge:({className:e=S})=>(0,r.jsxs)("svg",{..._,width:24,height:24,viewBox:"0 0 24 24",className:e,children:[(0,r.jsx)("path",{d:"M2.586 17.414A2 2 0 0 0 2 18.828V21a1 1 0 0 0 1 1h3a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h1a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h.172a2 2 0 0 0 1.414-.586l.814-.814a6.5 6.5 0 1 0-4-4z"}),(0,r.jsx)("circle",{cx:"16.5",cy:"7.5",r:".5",fill:"currentColor"})]}),star:C,woocommerce:({className:e=S})=>(0,r.jsxs)("svg",{..._,width:24,height:24,viewBox:"0 0 24 24",className:e,children:[(0,r.jsx)("path",{d:"M15 21v-5a1 1 0 0 0-1-1h-4a1 1 0 0 0-1 1v5"}),(0,r.jsx)("path",{d:"M17.774 10.31a1.12 1.12 0 0 0-1.549 0 2.5 2.5 0 0 1-3.451 0 1.12 1.12 0 0 0-1.548 0 2.5 2.5 0 0 1-3.452 0 1.12 1.12 0 0 0-1.549 0 2.5 2.5 0 0 1-3.77-3.248l2.889-4.184A2 2 0 0 1 7 2h10a2 2 0 0 1 1.653.873l2.895 4.192a2.5 2.5 0 0 1-3.774 3.244"}),(0,r.jsx)("path",{d:"M4 10.95V19a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-8.05"})]}),edd:({className:e=S})=>(0,r.jsxs)("svg",{..._,width:24,height:24,viewBox:"0 0 24 24",className:e,children:[(0,r.jsx)("path",{d:"M21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16z"}),(0,r.jsx)("path",{d:"m7.5 4.21 4.5 2.6 4.5-2.6"}),(0,r.jsx)("path",{d:"M12 17.5V12"})]}),other:A,info:({className:e=S})=>(0,r.jsxs)("svg",{..._,width:24,height:24,viewBox:"0 0 24 24",className:e,children:[(0,r.jsx)("circle",{cx:12,cy:12,r:10}),(0,r.jsx)("path",{d:"M12 16v-4"}),(0,r.jsx)("path",{d:"M12 8h.01"})]}),"live-visitor-count":({className:e="h-5 w-5"})=>(0,r.jsxs)("svg",{..._,className:e,viewBox:"0 0 24 24",children:[(0,r.jsx)("path",{d:"M17 21v-2a4 4 0 0 0-4-4H5a4 4 0 0 0-4 4v2"}),(0,r.jsx)("circle",{cx:"9",cy:"7",r:"4"}),(0,r.jsx)("path",{d:"M23 21v-2a4 4 0 0 0-3-3.87"}),(0,r.jsx)("path",{d:"M16 3.13a4 4 0 0 1 0 7.75"})]}),"upsell-cross-sell":()=>(0,r.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round",className:"h-5 w-5 block color-current",children:[(0,r.jsx)("path",{d:"M6 2L3 6v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2V6l-3-4z"}),(0,r.jsx)("line",{x1:"3",y1:"6",x2:"21",y2:"6"}),(0,r.jsx)("path",{d:"M16 10a4 4 0 0 1-8 0"})]})},R=({version:e,isPro:a,onToggleSidebar:l,isSidebarOpen:n,isDesktop:c})=>(0,r.jsx)("div",{className:"rounded-tl-lg rounded-tr-lg border-0 border-b border-solid border-b-gray-100 bg-white px-5 py-5",children:(0,r.jsxs)("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-start sm:justify-between",children:[(0,r.jsxs)("div",{className:"flex min-w-0 items-center gap-3 sm:gap-4",children:[(0,r.jsx)("div",{className:"flex",children:(0,r.jsx)(w,{})}),(0,r.jsxs)("div",{className:"flex min-w-0 flex-col gap-1",children:[(0,r.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[(0,r.jsx)("h1",{className:"m-0 text-lg font-bold leading-tight text-slate-800 sm:text-xl",children:(0,s.__)("Ultimate Store Kit","ultimate-store-kit")}),e?(0,r.jsxs)("span",{className:"rounded-full bg-gray-100 px-2 py-0.5 text-[10px] font-semibold uppercase tracking-wide text-gray-500",children:["v",e]}):null]}),(0,r.jsx)("p",{className:"m-0 max-w-xl text-[13px] leading-snug text-gray-500 sm:text-sm",children:(0,s.__)("Build high-converting WooCommerce stores with Elementor widgets & presets.","ultimate-store-kit")})]})]}),(0,r.jsxs)("div",{className:"flex shrink-0 flex-wrap items-center gap-2",children:[(0,r.jsx)("button",{type:"button",onClick:e=>l?.(e),className:"inline-flex h-9 w-9 cursor-pointer items-center justify-center rounded-md border border-slate-200 bg-white text-slate-700 transition-colors hover:border-uks-brand/40 hover:text-uks-brand",style:{display:c?"none":"inline-flex"},"aria-expanded":n?"true":"false","aria-label":(0,s.__)("Open menu","ultimate-store-kit"),children:n?(0,r.jsx)(v,{className:"h-4 w-4"}):(0,r.jsx)(y,{className:"h-4 w-4"})}),(()=>{const e=(0,t.applyFilters)("usk.admin.pages",{});return a||e.license?null:(0,r.jsxs)("a",{href:"https://storekit.pro/pricing/",target:"_blank",rel:"noopener noreferrer",className:`${d} ${i}`,children:[(0,r.jsx)(C,{className:"w-4 h-4 block"}),(0,s.__)("Get Pro","ultimate-store-kit")]})})(),(()=>{const e=(0,t.applyFilters)("usk.admin.headerExtra",null);return e?(0,r.jsx)(e,{}):null})(),(0,r.jsxs)("a",{href:"https://bdthemes.com/support/",target:"_blank",rel:"noopener noreferrer",className:`${d} ${o} flex items-center gap-2 hover:border-uks-brand/40 hover:bg-white hover:text-uks-brand`,children:[(0,r.jsx)("span",{className:"flex h-4 w-4 items-center justify-center rounded-full border border-current text-inherit","aria-hidden":"true",children:(0,r.jsx)(N,{className:"w-4 h-4 block"})}),(0,s.__)("Help & Support","ultimate-store-kit")]})]})]})}),G=({name:e})=>{const s=(0,t.applyFilters)("usk.admin.iconMap",H),a=s[e]||s.info;return(0,r.jsx)(a,{})},K=(e,t,s)=>{if("pro"===e.widget_type&&!s)return!1;const r=e.dependency;return!!(!r||r.isInstalled&&r.isActive)&&(null!=t?"on"===t:"on"===e.default)},q=[{id:"currency-switcher",label:(0,s.__)("Currency Switcher","ultimate-store-kit"),description:(0,s.__)("Enable to allow currency switching on your store.","ultimate-store-kit"),icon:"currency-switcher",badge:"Pro",proPlaceholder:!0},{id:"variation-swatches",label:(0,s.__)("Variation Swatches","ultimate-store-kit"),description:(0,s.__)("Enable to display product variation swatches on your store.","ultimate-store-kit"),icon:"variation-swatches",badge:"Pro",proPlaceholder:!0},{id:"live-visitor-count",label:(0,s.__)("Live Visitor Count","ultimate-store-kit"),description:(0,s.__)("Display live visitor count on product pages to create urgency.","ultimate-store-kit"),icon:"live-visitor-count",badge:"Pro",proPlaceholder:!0},{id:"upsell-cross-sell",label:(0,s.__)("Upsell & Cross-Sell","ultimate-store-kit"),description:(0,s.__)("Display upsell and cross-sell products on product pages to increase sales.","ultimate-store-kit"),icon:"upsell-cross-sell",badge:"Pro",proPlaceholder:!0}],X=()=>(0,t.applyFilters)("usk.admin.placeholderModules",q),Z=[{id:"dashboard",group:(0,s.__)("Dashboard","ultimate-store-kit"),items:[{id:"welcome",label:(0,s.__)("Welcome","ultimate-store-kit"),icon:"home"}]},{id:"widgets",group:(0,s.__)("Widgets","ultimate-store-kit"),items:[{id:"woocommerce-widgets",label:(0,s.__)("WooCommerce","ultimate-store-kit"),icon:"woocommerce"},{id:"edd-widgets",label:(0,s.__)("EDD","ultimate-store-kit"),icon:"edd"},{id:"other-widgets",label:(0,s.__)("Others","ultimate-store-kit"),icon:"other"}]},{id:"modules",group:(0,s.__)("Modules","ultimate-store-kit"),items:[]},{id:"support",group:(0,s.__)("Support","ultimate-store-kit"),items:[{id:"get-pro",label:(0,s.__)("Get Pro","ultimate-store-kit"),icon:"star"},{id:"about",label:(0,s.__)("About & Info","ultimate-store-kit"),icon:"info"}]}],Y=e=>{const t=`${(e.id||"").toLowerCase()} ${(e.label||"").toLowerCase()}`;return t.includes("currency")?"currency-switcher":t.includes("swatch")||t.includes("variation")?"variation-swatches":t.includes("visitor")||t.includes("live")?"live-visitor-count":"grid"},J=({activePage:e,onNavigate:a,isPro:l,isOpen:i,isDesktop:o,onClose:n,settingsGroups:d=[]})=>{const c=(({isPro:e,settingsGroups:s=[]})=>{const r=(0,t.applyFilters)("usk.admin.navItems",Z),a=X(),l=a.map(e=>e.id);return r.map(t=>{if("modules"===t.id){const r=s.map(e=>({id:e.id,label:e.label,icon:Y(e)}));if(e)return{...t,items:[...r,...t.items]};const i=t.items.filter(e=>!l.includes(e.id));return{...t,items:[...r,...a,...i]}}return t})})({isPro:l,settingsGroups:d}),m=(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("nav",{className:"flex flex-col gap-6","aria-label":"Main",children:c.map(t=>(0,r.jsxs)("div",{children:[(0,r.jsx)("p",{className:"m-0 mb-3 px-2 text-xs font-semibold uppercase tracking-widest text-gray-400",children:t.group}),(0,r.jsx)("ul",{className:"m-0 list-none space-y-1 p-0",children:t.items.filter(e=>!(l&&"get-pro"===e.id)).map(t=>{const s=e===t.id;return(0,r.jsx)("li",{children:(0,r.jsxs)("button",{type:"button",onClick:()=>{a(t.id),window.location.hash=`#${t.id}`,n()},className:"flex w-full cursor-pointer items-center gap-3 rounded-lg border-0 px-3 py-3 text-left text-sm font-medium transition-colors "+(s?"bg-uks-brand text-white shadow-sm":"bg-transparent text-slate-700 hover:bg-gray-100 hover:text-slate-900"),children:[(0,r.jsx)(G,{name:t.icon}),(0,r.jsx)("span",{className:"flex-1",children:t.label}),t.badge&&(0,r.jsx)("span",{className:"shrink-0 whitespace-nowrap rounded-md border border-solid px-1.5 py-0.5 text-[9px] font-bold",style:{borderColor:s?"rgba(255,255,255,0.4)":"#e5e7eb",color:s?"#fff":"#6b7280",background:s?"rgba(255,255,255,0.18)":"transparent"},children:t.badge})]})},t.id)})})]},t.group))}),(0,r.jsxs)("div",{className:"mt-6 hidden rounded-xl bg-slate-100 p-4 lg:block lg:mt-8",children:[(0,r.jsxs)("span",{className:"mb-2.5 flex items-center gap-2 text-base font-bold text-slate-800",children:[(0,r.jsx)(M,{className:"w-5 h-5"}),(0,s.__)("Coming soon","ultimate-store-kit")]}),(0,r.jsx)("p",{className:"m-0 text-[12px] leading-relaxed text-slate-600",children:(0,s.__)("New items planned for upcoming updates:","ultimate-store-kit")}),(0,r.jsxs)("ul",{className:"mt-2.5 m-0 space-y-1.5 p-0 text-[12px] text-slate-600",children:[(0,r.jsxs)("li",{className:"flex items-start gap-2",children:[(0,r.jsx)("span",{className:"mt-1 h-1.5 w-1.5 rounded-full bg-uks-brand"}),(0,s.__)("7+ WooCommerce widgets","ultimate-store-kit")]}),(0,r.jsxs)("li",{className:"flex items-start gap-2",children:[(0,r.jsx)("span",{className:"mt-1 h-1.5 w-1.5 rounded-full bg-uks-brand"}),(0,s.__)("Template-based presets","ultimate-store-kit")]}),(0,r.jsxs)("li",{className:"flex items-start gap-2",children:[(0,r.jsx)("span",{className:"mt-1 h-1.5 w-1.5 rounded-full bg-uks-brand"}),(0,s.__)("Performance-focused improvements","ultimate-store-kit")]})]}),(0,r.jsx)("button",{onClick:()=>window.open("https://feedback.bdthemes.com/b/6vr2250l/feature-requests","_blank"),type:"button",className:"mt-3 inline-flex cursor-pointer items-center rounded-lg border border-uks-brand bg-white px-3 py-1.5 text-[12px] font-semibold text-uks-brand transition-colors hover:bg-uks-brand hover:text-white",children:(0,s.__)("See roadmap","ultimate-store-kit")})]})]});if(o)return(0,r.jsx)("div",{style:{display:"flex"},className:"w-64 shrink-0 flex-col justify-between self-stretch rounded-lg border border-solid border-gray-100 bg-white px-4 py-6 lg:sticky lg:top-[7.5rem]",children:m});const x=document.getElementById("wpadminbar")?.offsetHeight||0;return(0,r.jsxs)(r.Fragment,{children:[i&&(0,r.jsx)("div",{style:{display:"block",position:"fixed",top:x,left:0,right:0,bottom:0,zIndex:99998,backgroundColor:"rgba(0,0,0,0.3)"},onClick:n,"aria-hidden":"true"}),(0,r.jsxs)("div",{style:{position:"fixed",left:0,top:x,zIndex:99999,height:`calc(100vh - ${x}px)`,width:"86vw",maxWidth:"320px",display:"flex",flexDirection:"column",backgroundColor:"#fff",padding:"1rem",boxShadow:"4px 0 24px rgba(0,0,0,0.15)",transform:i?"translateX(0)":"translateX(-100%)",transition:"transform 300ms ease-out",pointerEvents:i?"auto":"none",overflowY:"auto"},children:[(0,r.jsxs)("div",{className:"mb-3 flex items-center justify-between",children:[(0,r.jsx)("p",{className:"m-0 text-sm font-bold text-slate-700",children:(0,s.__)("Navigation","ultimate-store-kit")}),(0,r.jsx)("button",{type:"button",onClick:n,className:"inline-flex h-8 w-8 cursor-pointer items-center justify-center rounded-md border border-slate-200 bg-white text-slate-500 hover:text-slate-700","aria-label":(0,s.__)("Close menu","ultimate-store-kit"),children:(0,r.jsx)(v,{className:"h-4 w-4"})})]}),m]})]})},Q=({title:e,data:t,color:a})=>{const l=t.total>0?Math.round(t.active/t.total*100):0;return(0,r.jsxs)("div",{className:"rounded-lg border border-solid border-gray-100 bg-white p-4",children:[(0,r.jsx)("h3",{className:"m-0 mb-3 text-[13px] font-semibold uppercase tracking-wide text-slate-500",children:e}),(0,r.jsxs)("div",{className:"flex items-center justify-between gap-3",children:[(0,r.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,r.jsxs)("div",{className:"flex gap-1.5 text-[13px] text-slate-700",children:[(0,r.jsx)("span",{className:"text-slate-400",children:(0,s.__)("Active:","ultimate-store-kit")}),(0,r.jsx)("strong",{children:t.active})]}),(0,r.jsxs)("div",{className:"flex gap-1.5 text-[13px] text-slate-700",children:[(0,r.jsx)("span",{className:"text-slate-400",children:(0,s.__)("Inactive:","ultimate-store-kit")}),(0,r.jsx)("strong",{children:t.inactive})]}),(0,r.jsxs)("div",{className:"flex gap-1.5 text-[13px] text-slate-700",children:[(0,r.jsx)("span",{className:"text-slate-400",children:(0,s.__)("Total:","ultimate-store-kit")}),(0,r.jsx)("strong",{children:t.total})]})]}),(0,r.jsx)("div",{className:"h-[60px] w-[60px] shrink-0",children:(0,r.jsxs)("svg",{viewBox:"0 0 36 36",className:"h-full w-full",children:[(0,r.jsx)("path",{d:"M18 2.0845 a 15.9155 15.9155 0 0 1 0 31.831 a 15.9155 15.9155 0 0 1 0 -31.831",fill:"none",stroke:"#e2e8f0",strokeWidth:"3"}),(0,r.jsx)("path",{d:"M18 2.0845 a 15.9155 15.9155 0 0 1 0 31.831 a 15.9155 15.9155 0 0 1 0 -31.831",fill:"none",stroke:a,strokeWidth:"3",strokeDasharray:`${l}, 100`}),(0,r.jsxs)("text",{x:"18",y:"20.5",className:"font-bold",textAnchor:"middle",fontSize:"8",fill:"#334155",children:[l,"%"]})]})})]})]})},ee=({widgets:a,settings:l,isPro:n=!1})=>{const p=(0,e.useMemo)(()=>{const e=a.ultimate_store_kit_active_modules||[],t=a.ultimate_store_kit_edd_modules||[],s=a.ultimate_store_kit_general_modules||[],r=l.ultimate_store_kit_active_modules||{},i=l.ultimate_store_kit_edd_modules||{},o=l.ultimate_store_kit_general_modules||{},d=(e,t)=>{let s=0,r=0;return e.forEach(e=>{if("checkbox"!==e.type)return;if(!n&&"pro"===e.widget_type)return void r++;const a=t[e.name];K(e,a,n)?s++:r++}),{active:s,inactive:r,total:s+r}},c=d(e,r),m=d(t,i),x=d(s,o);return{all:{active:c.active+m.active+x.active,inactive:c.inactive+m.inactive+x.inactive,total:c.total+m.total+x.total},wc:c,edd:m,other:x}},[a,l,n]);return(0,r.jsxs)("div",{children:[(0,r.jsxs)("div",{className:"mb-4 grid grid-cols-1 gap-4 sm:grid-cols-2 xl:grid-cols-4",children:[(0,r.jsx)(Q,{title:(0,s.__)("All Widgets","ultimate-store-kit"),data:p.all,color:"#f59e0b"}),(0,r.jsx)(Q,{title:(0,s.__)("WooCommerce","ultimate-store-kit"),data:p.wc,color:"#ef4444"}),(0,r.jsx)(Q,{title:(0,s.__)("EDD","ultimate-store-kit"),data:p.edd,color:"#10b981"}),(0,r.jsx)(Q,{title:(0,s.__)("Other","ultimate-store-kit"),data:p.other,color:"#3b82f6"})]}),(()=>{const e=(0,t.applyFilters)("usk.admin.welcomeExtra",null);return e?(0,r.jsx)(e,{}):null})(),(0,r.jsxs)("div",{className:"mb-4 grid grid-cols-1 gap-4 sm:grid-cols-2",children:[(0,r.jsxs)("div",{className:"rounded-lg border border-solid border-gray-100 bg-white p-5",children:[(0,r.jsx)("h3",{className:"m-0 mb-2 text-base font-bold text-slate-800",children:(0,s.__)("Support And Feedback","ultimate-store-kit")}),(0,r.jsxs)("p",{className:"my-2 text-[13px] leading-relaxed text-slate-500",children:[(0,s.__)("Feeling like to consult with an expert? Take live Chat support immediately from","ultimate-store-kit")," ",(0,r.jsx)("a",{href:"https://storekit.pro/",target:"_blank",rel:"noopener noreferrer",className:"font-semibold text-uks-brand hover:underline",children:"UltimateStoreKit"}),"."," ",(0,s.__)("We are always ready to help you 24/7.","ultimate-store-kit")]}),(0,r.jsx)("p",{className:"my-2 text-[13px] leading-relaxed text-slate-500",children:(0,r.jsx)("strong",{children:(0,s.__)("Or if you're facing technical issues with our plugin, then please create a support ticket","ultimate-store-kit")})}),(0,r.jsxs)("div",{className:"mt-3 flex flex-wrap gap-2",children:[(0,r.jsx)("a",{className:i,target:"_blank",rel:"noopener noreferrer",href:"https://bdthemes.com/all-knowledge-base-of-ultimate-store-kit/",children:(0,s.__)("Knowledge Base","ultimate-store-kit")}),(0,r.jsx)("a",{className:o,target:"_blank",rel:"noopener noreferrer",href:"https://bdthemes.com/support/",children:(0,s.__)("Get Support","ultimate-store-kit")})]})]}),(0,r.jsxs)("div",{className:"rounded-lg border border-solid border-gray-100 bg-white p-5",children:[(0,r.jsx)("h3",{className:"m-0 mb-2 text-base font-bold text-slate-800",children:(0,s.__)("System Requirement","ultimate-store-kit")}),(0,r.jsx)("p",{className:"mb-3 text-[13px] leading-relaxed text-slate-500",children:(0,s.__)("Make sure your server meets the minimum requirements for optimal performance.","ultimate-store-kit")}),(0,r.jsxs)("div",{children:[(0,r.jsxs)("div",{className:"flex items-center justify-between border-b border-slate-100 py-2 text-[13px] text-slate-700 last:border-b-0",children:[(0,r.jsx)("span",{children:(0,s.__)("PHP Version","ultimate-store-kit")}),(0,r.jsx)("span",{className:"rounded-lg bg-emerald-100 px-2.5 py-0.5 text-[11px] font-semibold text-emerald-800",children:(0,s.__)("OK","ultimate-store-kit")})]}),(0,r.jsxs)("div",{className:"flex items-center justify-between border-b border-slate-100 py-2 text-[13px] text-slate-700 last:border-b-0",children:[(0,r.jsx)("span",{children:(0,s.__)("Memory Limit","ultimate-store-kit")}),(0,r.jsx)("span",{className:"rounded-lg bg-emerald-100 px-2.5 py-0.5 text-[11px] font-semibold text-emerald-800",children:(0,s.__)("OK","ultimate-store-kit")})]}),(0,r.jsxs)("div",{className:"flex items-center justify-between border-b border-slate-100 py-2 text-[13px] text-slate-700 last:border-b-0",children:[(0,r.jsx)("span",{children:(0,s.__)("Max Execution Time","ultimate-store-kit")}),(0,r.jsx)("span",{className:"rounded-lg bg-emerald-100 px-2.5 py-0.5 text-[11px] font-semibold text-emerald-800",children:(0,s.__)("OK","ultimate-store-kit")})]})]})]})]}),(0,r.jsxs)("div",{className:"grid grid-cols-1 gap-4 sm:grid-cols-2",children:[(0,r.jsxs)("div",{className:"rounded-lg border border-solid border-gray-100 bg-white p-5",children:[(0,r.jsx)("h3",{className:"m-0 mb-2 text-base font-bold text-slate-800",children:(0,s.__)("Feedback","ultimate-store-kit")}),(0,r.jsx)("p",{className:"my-2 text-[13px] leading-relaxed text-slate-500",children:(0,s.__)("We are always looking for feedback from our users. If you have any suggestions or feedback, please let us know.","ultimate-store-kit")}),(0,r.jsx)("div",{className:"mt-3 flex flex-wrap gap-2",children:(0,r.jsx)("a",{className:o,target:"_blank",rel:"noopener noreferrer",href:"https://feedback.bdthemes.com/b/6vr2250l/feature-requests/",children:(0,s.__)("Request Feature","ultimate-store-kit")})})]}),(0,r.jsxs)("div",{className:"rounded-lg border border-solid border-gray-100 bg-white p-5",children:[(0,r.jsx)("h3",{className:"m-0 mb-2 text-base font-bold text-slate-800",children:(0,s.__)("Try Our Other Plugins","ultimate-store-kit")}),(0,r.jsx)("p",{className:"my-2 text-[13px] leading-relaxed text-slate-500",children:(0,s.__)("Element Pack, Prime Slider, Ultimate Post Kit, Pixel Gallery & Live Copy Paste addons for Elementor.","ultimate-store-kit")}),(0,r.jsxs)("div",{className:"mt-3 flex flex-wrap gap-2",children:[(0,r.jsx)("a",{className:`${d} ${c}`,target:"_blank",rel:"noopener noreferrer",href:"https://wordpress.org/plugins/bdthemes-element-pack-lite/",children:(0,s.__)("Element Pack","ultimate-store-kit")}),(0,r.jsx)("a",{className:`${d} ${m}`,target:"_blank",rel:"noopener noreferrer",href:"https://wordpress.org/plugins/bdthemes-prime-slider-lite/",children:(0,s.__)("Prime Slider","ultimate-store-kit")}),(0,r.jsx)("a",{className:`${d} ${x}`,target:"_blank",rel:"noopener noreferrer",href:"https://wordpress.org/plugins/ultimate-post-kit/",children:(0,s.__)("Ultimate Post Kit","ultimate-store-kit")}),(0,r.jsx)("a",{className:`${d} ${h}`,target:"_blank",rel:"noopener noreferrer",href:"https://wordpress.org/plugins/pixel-gallery/",children:(0,s.__)("Pixel Gallery","ultimate-store-kit")}),(0,r.jsx)("a",{className:`${d} ${u}`,target:"_blank",rel:"noopener noreferrer",href:"https://wordpress.org/plugins/zoloblocks/",children:(0,s.__)("ZoloBlocks","ultimate-store-kit")})]})]})]})]})},te=({allWidgets:t,allSettings:l,onSave:o,saving:c,isPro:m,widgetType:x="wc"})=>{const[h,u]=(0,e.useState)(""),[g,f]=(0,e.useState)("all"),[j,_]=(0,e.useState)("all"),w={wc:{title:(0,s.__)("WooCommerce Widgets","ultimate-store-kit"),key:"ultimate_store_kit_active_modules"},edd:{title:(0,s.__)("Easy Digital Downloads Widgets","ultimate-store-kit"),key:"ultimate_store_kit_edd_modules"},other:{title:(0,s.__)("Other Widgets","ultimate-store-kit"),key:"ultimate_store_kit_general_modules"}}[x],y=t[w.key]||[],[N,M]=(l[w.key],(0,e.useState)(()=>{const e={};return Object.keys(l).forEach(s=>{const r=l[s]||{};(t[s]||[]).forEach(t=>{"checkbox"===t.type&&(e[t.name]=void 0!==r[t.name]?r[t.name]:t.default||"off")})}),e}));(0,e.useEffect)(()=>{u(""),f("all"),_("all")},[x]);const C=(0,e.useMemo)(()=>{const e=new Set;return y.forEach(t=>{t.content_type&&t.content_type.split(" ").forEach(t=>{t&&"woocommerce"!==t&&"edd"!==t&&"new"!==t&&e.add(t)})}),Array.from(e)},[y]),P=(0,e.useMemo)(()=>y.filter(e=>!("checkbox"!==e.type||h&&!e.label.toLowerCase().includes(h.toLowerCase())||"free"===g&&"free"!==e.widget_type||"pro"===g&&"pro"!==e.widget_type||!("all"===j||e.content_type&&e.content_type.includes(j)))),[y,h,g,j]),S=(0,e.useCallback)(e=>{M(t=>({...t,[e]:"on"===t[e]?"off":"on"}))},[]),A=(0,e.useCallback)(()=>{M(e=>{const t={...e};return P.forEach(e=>{if("pro"===e.widget_type&&!m)return;const s=e.dependency;(!s||s.isInstalled&&s.isActive)&&(t[e.name]="on")}),t})},[P,m]),z=(0,e.useCallback)(()=>{M(e=>{const t={...e};return P.forEach(e=>{("pro"!==e.widget_type||m)&&(t[e.name]="off")}),t})},[P,m]),D=(0,e.useMemo)(()=>y.filter(e=>"checkbox"===e.type&&K(e,N[e.name],m)).length,[y,N,m]);return(0,r.jsxs)("div",{children:[(0,r.jsxs)("div",{className:"mb-5 flex flex-wrap items-center justify-between gap-2",children:[(0,r.jsx)("h2",{className:"m-0 text-xl font-bold text-slate-800",children:w.title}),(0,r.jsxs)("span",{className:"rounded-2xl border border-slate-200 bg-white px-3 py-1 text-[13px] text-slate-500",children:[D," / ",y.filter(e=>"checkbox"===e.type).length," ",(0,s.__)("Active","ultimate-store-kit")]})]}),(0,r.jsxs)("div",{className:"mb-5 flex flex-wrap items-center justify-between gap-3 rounded-lg border border-solid border-gray-100 bg-white px-4 py-3",children:[(0,r.jsxs)("div",{className:"flex flex-wrap items-center gap-3",children:[(0,r.jsxs)("div",{className:"relative",children:[(0,r.jsx)($,{className:"absolute right-3 top-3 h-4 w-4 block text-gray-400"}),(0,r.jsx)("input",{type:"text",className:"block w-full rounded-md border border-solid border-gray-200 bg-transparent py-2.5 pr-10 pl-3 text-sm text-slate-700 placeholder:text-gray-500 focus:border-uks-brand focus:outline-none focus:ring-2 focus:ring-uks-brand/25 sm:w-48",placeholder:(0,s.__)("Search widgets...","ultimate-store-kit"),value:h,onChange:e=>u(e.target.value)})]}),(0,r.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,r.jsx)("label",{className:p,children:(0,s.__)("Status:","ultimate-store-kit")}),(0,r.jsxs)("select",{className:b,value:g,onChange:e=>f(e.target.value),children:[(0,r.jsx)("option",{value:"all",children:(0,s.__)("All","ultimate-store-kit")}),(0,r.jsx)("option",{value:"free",children:(0,s.__)("Free","ultimate-store-kit")}),(0,r.jsx)("option",{value:"pro",children:(0,s.__)("Pro","ultimate-store-kit")})]})]}),C.length>0&&(0,r.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,r.jsx)("label",{className:p,children:(0,s.__)("Template:","ultimate-store-kit")}),(0,r.jsxs)("select",{className:b,value:j,onChange:e=>_(e.target.value),children:[(0,r.jsx)("option",{value:"all",children:(0,s.__)("All Templates","ultimate-store-kit")}),C.map(e=>(0,r.jsx)("option",{value:e,children:e.charAt(0).toUpperCase()+e.slice(1)},e))]})]})]}),(0,r.jsxs)("div",{className:"flex flex-wrap items-center gap-1.5",children:[(0,r.jsxs)("button",{type:"button",className:`${d} !rounded-lg ${D>0?"!bg-uks-brand !text-white hover:!bg-uks-brand-dark border-none":"!border !border-uks-brand/25 bg-uks-brand/5 text-uks-brand hover:bg-uks-brand/10 hover:text-uks-brand-dark"} focus:outline-none focus:ring-2 focus:ring-uks-brand focus:ring-offset-2 focus:ring-offset-white`,onClick:A,children:[(0,r.jsx)(E,{className:"h-4 w-4"}),(0,s.__)("Activate All","ultimate-store-kit")]}),(0,r.jsxs)("button",{type:"button",className:`${d} !rounded-lg ${0===D?"!bg-uks-brand !text-white hover:!bg-uks-brand-dark border-none":"!border !border-uks-brand/25 bg-uks-brand/5 text-uks-brand hover:bg-uks-brand/10 hover:text-uks-brand-dark"} focus:outline-none focus:ring-2 focus:ring-uks-brand focus:ring-offset-2 focus:ring-offset-white`,onClick:z,children:[(0,r.jsx)(v,{className:"h-4 w-4"}),(0,s.__)("Deactivate All","ultimate-store-kit")]})]})]}),(0,r.jsxs)("div",{className:"grid grid-cols-1 gap-3 rounded-lg border border-solid border-gray-100 bg-white p-5 sm:grid-cols-2 lg:grid-cols-3 2xl:grid-cols-4",children:[0===P.length&&(0,r.jsx)("div",{className:"col-span-full py-10 text-center text-sm text-slate-400",children:(0,s.__)("No widgets found.","ultimate-store-kit")}),P.map(e=>{const t="pro"===e.widget_type,l=e.dependency||null,i=l&&(!l.isInstalled||!l.isActive),o=t&&!m||i,n=K(e,N[e.name],m);return(0,r.jsxs)("div",{className:`flex flex-col justify-between gap-3 rounded-lg border border-solid border-gray-200 p-4 ${n?"border-emerald-300":""} ${o?"opacity-60 cursor-not-allowed bg-slate-100":""}`,children:[(0,r.jsxs)("div",{className:"flex items-start justify-between gap-2",children:[(0,r.jsx)("span",{className:"text-base font-semibold leading-snug text-slate-800",children:e.label}),t&&(0,r.jsx)("span",{className:k,children:(0,s.__)("Pro","ultimate-store-kit")})]}),(0,r.jsxs)("div",{className:"flex items-center justify-between",children:[(0,r.jsxs)("div",{className:"flex gap-2 items-center",children:[l?.actionUrl&&(0,r.jsxs)("a",{href:l.actionUrl,target:"install"===l.actionType?"_blank":void 0,rel:"install"===l.actionType?"noopener noreferrer":void 0,title:l.message||l.actionLabel,className:"text-gray-400 transition-colors hover:text-uks-brand flex items-center gap-1 decoration-none",style:{textDecoration:"none"},children:[(0,r.jsx)(F,{className:"w-4 h-4 block"}),(0,s.__)("Install","ultimate-store-kit")]}),e.demo_url&&!e.demo_url.startsWith("#")&&(0,r.jsxs)("a",{href:e.demo_url,target:"_blank",rel:"noopener noreferrer",title:(0,s.__)("Demo","ultimate-store-kit"),className:"text-gray-400 transition-colors hover:text-uks-brand flex items-center gap-1 decoration-none",style:{textDecoration:"none"},children:[(0,r.jsx)(B,{className:"w-4 h-4 block"}),(0,s.__)("Demo","ultimate-store-kit")]}),e.video_url&&(0,r.jsxs)("a",{href:e.video_url,target:"_blank",rel:"noopener noreferrer",title:(0,s.__)("Video","ultimate-store-kit"),className:"text-gray-400 transition-colors hover:text-uks-brand flex items-center gap-1 decoration-none",style:{textDecoration:"none"},children:[(0,r.jsx)(L,{className:"w-4 h-4 block"}),(0,s.__)("Video","ultimate-store-kit")]})]}),(0,r.jsx)(a,{checked:n,disabled:o,onChange:()=>S(e.name)})]}),i&&l?.actionUrl&&(0,r.jsxs)("div",{className:"text-[13px] leading-relaxed text-slate-500",children:[l.message," ",(0,r.jsx)("a",{href:l.actionUrl,className:"font-semibold text-uks-brand hover:underline",target:"install"===l.actionType?"_blank":void 0,rel:"install"===l.actionType?"noopener noreferrer":void 0,children:l.actionLabel})]})]},e.name)})]}),(0,r.jsx)("div",{className:"mt-6 flex justify-end pt-4",children:(0,r.jsx)("button",{type:"button",className:`${n} ${i}`,onClick:()=>{const e={};y.forEach(t=>{"checkbox"===t.type&&void 0!==N[t.name]&&(e[t.name]=N[t.name])}),o(w.key,e)},disabled:c,children:c?(0,s.__)("Saving...","ultimate-store-kit"):(0,s.__)("Save Changes","ultimate-store-kit")})})]})},se=[{group:(0,s.__)("Sales Notifications","ultimate-store-kit"),description:(0,s.__)("Configure flash sale banners, countdown timers, and promotional badges for your store.","ultimate-store-kit"),fields:[{name:"enable_flash_sale",type:"checkbox",label:(0,s.__)("Enable Flash Sale Banner","ultimate-store-kit"),description:(0,s.__)("Display a site-wide flash sale banner on product pages.","ultimate-store-kit")},{name:"flash_sale_text",type:"text",label:(0,s.__)("Flash Sale Text","ultimate-store-kit"),placeholder:(0,s.__)("🔥 Flash Sale — Up to 50% OFF!","ultimate-store-kit")},{name:"sale_badge_style",type:"select",label:(0,s.__)("Sale Badge Style","ultimate-store-kit"),options:{default:(0,s.__)("Default","ultimate-store-kit"),ribbon:(0,s.__)("Ribbon","ultimate-store-kit"),circle:(0,s.__)("Circle","ultimate-store-kit"),starburst:(0,s.__)("Starburst","ultimate-store-kit")}},{name:"sale_badge_color",type:"color",label:(0,s.__)("Sale Badge Color","ultimate-store-kit"),value:"#ef4444"},{name:"enable_countdown_timer",type:"checkbox",label:(0,s.__)("Enable Sale Countdown Timer","ultimate-store-kit"),description:(0,s.__)("Show a countdown timer on products that have a sale end date.","ultimate-store-kit")},{name:"countdown_position",type:"select",label:(0,s.__)("Countdown Position","ultimate-store-kit"),options:{above_price:(0,s.__)("Above Price","ultimate-store-kit"),below_price:(0,s.__)("Below Price","ultimate-store-kit"),above_button:(0,s.__)("Above Add to Cart","ultimate-store-kit")}},{name:"minimum_discount_percent",type:"number",label:(0,s.__)("Minimum Discount % to Show Badge","ultimate-store-kit"),value:"5",description:(0,s.__)("Only show the sale badge when the discount is at least this percentage.","ultimate-store-kit")}]}],re=()=>(0,r.jsxs)("div",{className:"pointer-events-none relative select-none opacity-70",children:[(0,r.jsxs)("div",{className:"pointer-events-auto mb-4 flex items-center justify-between rounded-usk border border-uks-brand bg-[linear-gradient(313deg,#E62A3F_0%,#00216A_100%)] px-5 py-3.5",children:[(0,r.jsxs)("div",{className:"flex items-center gap-2.5",children:[(0,r.jsx)("span",{className:"rounded-[10px] bg-[linear-gradient(313deg,#E62A3F_0%,#00216A_100%)] px-2.5 py-1 text-[10px] font-bold uppercase tracking-wide text-white",children:(0,s.__)("Pro","ultimate-store-kit")}),(0,r.jsx)("span",{className:"text-sm font-semibold text-white/90",children:(0,s.__)("Unlock these premium settings with Ultimate Store Kit Pro","ultimate-store-kit")})]}),(0,r.jsx)("a",{href:"https://bdthemes.com/ultimate-store-kit/",target:"_blank",rel:"noopener noreferrer",className:`${d} ${i}`,children:(0,s.__)("Get Pro","ultimate-store-kit")})]}),se.map((e,t)=>(0,r.jsx)("div",{className:"relative mb-4 overflow-hidden rounded-usk border border-slate-200 bg-white",children:(0,r.jsxs)("div",{className:"border-l-[3px] border-uks-brand",children:[(0,r.jsxs)("h3",{className:"m-0 flex flex-wrap items-center gap-2 border-b border-slate-200 bg-slate-100 px-5 py-3.5 text-sm font-bold text-slate-800",children:[e.group,(0,r.jsx)("span",{className:k,children:(0,s.__)("Pro","ultimate-store-kit")})]}),e.description&&(0,r.jsx)("p",{className:"m-0 px-5 pt-1 text-[13px] leading-relaxed text-slate-400",children:e.description}),(0,r.jsx)("div",{className:"px-5 py-2 opacity-60",children:e.fields.map(e=>{if("checkbox"===e.type)return(0,r.jsxs)("div",{className:`${g} flex-wrap`,children:[(0,r.jsx)("div",{className:f,children:(0,r.jsx)("span",{children:e.label})}),(0,r.jsx)("div",{className:"h-[22px] w-10 rounded-full bg-slate-200"}),e.description&&(0,r.jsx)("p",{className:"mt-1 w-full text-xs leading-snug text-slate-400",children:e.description})]},e.name);if("select"===e.type){const t=Object.keys(e.options)[0];return(0,r.jsxs)("div",{className:g,children:[(0,r.jsx)("label",{className:f,children:e.label}),(0,r.jsx)("select",{className:`${j} cursor-not-allowed opacity-60`,disabled:!0,defaultValue:t,children:Object.entries(e.options).map(([e,t])=>(0,r.jsx)("option",{value:e,children:t},e))})]},e.name)}return"color"===e.type?(0,r.jsxs)("div",{className:g,children:[(0,r.jsx)("label",{className:f,children:e.label}),(0,r.jsx)("input",{type:"color",disabled:!0,value:e.value||"#000000",readOnly:!0,className:"h-8 w-12 cursor-not-allowed rounded-md border border-slate-200 p-0.5 opacity-60"})]},e.name):"number"===e.type||"text"===e.type?(0,r.jsxs)("div",{className:g,children:[(0,r.jsx)("label",{className:f,children:e.label}),(0,r.jsx)("input",{type:e.type,className:`${j} cursor-not-allowed opacity-60`,disabled:!0,placeholder:e.placeholder||"",defaultValue:e.value||"",readOnly:!0}),e.description&&(0,r.jsx)("p",{className:"mt-1 w-full text-xs leading-snug text-slate-400",children:e.description})]},e.name):null})})]})},t))]}),ae=({widgets:l,section:o,settings:d,onSave:c,saving:m,isPro:x,activeGroup:h})=>{const[u,p]=(0,e.useState)(()=>{const e={};return l.forEach(t=>{"start_group"!==t.type&&"end_group"!==t.type&&("checkbox"===t.type?e[t.name]=void 0!==d[t.name]?d[t.name]:t.default||"off":"select"!==t.type&&"number"!==t.type&&"text"!==t.type||(e[t.name]=void 0!==d[t.name]?d[t.name]:t.default||""))}),e}),b=(e,t)=>{p(s=>({...s,[e]:t}))},g=(()=>{const e=[];let t=null;return l.forEach(r=>{"start_group"!==r.type?"end_group"!==r.type?t?t.items.push(r):(e.length&&void 0!==e[e.length-1].items||e.push({label:(0,s.__)("General","ultimate-store-kit"),items:[]}),e[e.length-1].items.push(r)):t&&(e.push(t),t=null):t={label:r.label,items:[]}}),e})(),_=h?g.filter(e=>e.label===h):g;return(0,r.jsxs)("div",{children:[(0,r.jsxs)("div",{className:"grid grid-cols-[repeat(auto-fit,minmax(420px,1fr))] items-start gap-4",children:[_.map((e,t)=>(0,r.jsxs)("div",{className:"w-full overflow-hidden rounded-usk border border-solid border-gray-100 bg-white",children:[(0,r.jsx)("h3",{className:"m-0 border-0 border-b border-solid border-b-gray-200 px-5 py-3.5 text-sm font-bold uppercase tracking-wide text-slate-700",children:e.label}),(0,r.jsx)("div",{className:"space-y-5 p-5",children:e.items.map(e=>{const t="pro"===e.widget_type,l=e.dependency||null,i=l&&(!l.isInstalled||!l.isActive),o=t&&!x||i;if("checkbox"===e.type){const n=!o&&"on"===u[e.name];return(0,r.jsxs)("div",{className:"rounded-lg border border-slate-200 bg-white",children:[(0,r.jsxs)("div",{className:"flex items-center justify-between gap-3",children:[(0,r.jsxs)("div",{className:`${f} max-w-[70%] flex-wrap`,children:[(0,r.jsxs)("span",{children:[e.label,i&&l?.actionUrl?(0,r.jsxs)(r.Fragment,{children:[" ",(0,r.jsx)("a",{href:l.actionUrl,target:"install"===l.actionType?"_blank":void 0,rel:"install"===l.actionType?"noopener noreferrer":void 0,className:"font-semibold text-uks-brand hover:underline",children:l.actionLabel})]}):null]}),t&&(0,r.jsx)("span",{className:k,children:(0,s.__)("Pro","ultimate-store-kit")})]}),(0,r.jsx)(a,{checked:n,disabled:o,onChange:()=>b(e.name,n?"off":"on")})]}),i&&l?.message&&(0,r.jsx)("div",{className:"mt-2 text-[13px] leading-relaxed text-slate-500",children:l.message})]},e.name)}return"select"===e.type?(0,r.jsxs)("div",{className:"rounded-lg border border-slate-200 bg-white",children:[(0,r.jsxs)("label",{className:f,children:[e.label,t&&(0,r.jsx)("span",{className:`${k} ml-2 align-middle`,children:(0,s.__)("Pro","ultimate-store-kit")})]}),(0,r.jsx)("select",{className:`${j} mt-2 block w-full`,value:u[e.name]||"",onChange:t=>b(e.name,t.target.value),disabled:o,children:e.options&&Object.entries(e.options).map(([e,t])=>(0,r.jsx)("option",{value:e,children:t},e))})]},e.name):"number"===e.type||"text"===e.type?(0,r.jsxs)("div",{className:"rounded-lg border border-slate-200 bg-white",children:[(0,r.jsxs)("label",{className:f,children:[e.label,t&&(0,r.jsx)("span",{className:`${k} ml-2 align-middle`,children:(0,s.__)("Pro","ultimate-store-kit")})]}),(0,r.jsx)("input",{type:e.type,className:`${j} mt-2 block w-full`,value:u[e.name]||"",onChange:t=>b(e.name,t.target.value),disabled:o})]},e.name):null})})]},t)),!x&&!h&&(0,r.jsx)(re,{}),(()=>{const e=(0,t.applyFilters)("usk.admin.settingsExtra",null);return e?(0,r.jsx)(e,{activeGroup:h}):null})()]}),(0,r.jsx)("div",{className:"mt-6 flex justify-end pt-4",children:(0,r.jsx)("button",{type:"button",className:`${n} ${i}`,onClick:()=>{c(o,u)},disabled:m,children:m?(0,s.__)("Saving...","ultimate-store-kit"):(0,s.__)("Save Changes","ultimate-store-kit")})})]})},le=[{label:(0,s.__)("Core Widgets","ultimate-store-kit"),free:!0,pro:!0,freeNote:"35+",proNote:"100+"},{label:(0,s.__)("Theme Compatibility","ultimate-store-kit"),free:!0,pro:!0},{label:(0,s.__)("Dynamic Content & Custom Fields","ultimate-store-kit"),free:!0,pro:!0},{label:(0,s.__)("Proper Documentation","ultimate-store-kit"),free:!0,pro:!0},{label:(0,s.__)("Updates & Support","ultimate-store-kit"),free:!0,pro:!0},{label:(0,s.__)("Ready Made Blocks","ultimate-store-kit"),free:!0,pro:!0},{label:(0,s.__)("Ready Made Pages","ultimate-store-kit"),free:!0,pro:!0},{label:(0,s.__)("Rooten Theme Pro Features","ultimate-store-kit"),free:!1,pro:!0},{label:(0,s.__)("Priority Support","ultimate-store-kit"),free:!1,pro:!0}],ie=({d:e,viewBox:t="0 0 24 24",filled:s=!1})=>(0,r.jsx)("svg",{className:"h-4 w-4 shrink-0 text-uks-brand",viewBox:t,fill:s?"currentColor":"none",stroke:s?"none":"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:Array.isArray(e)?e.map((e,t)=>(0,r.jsx)("path",{d:e},t)):(0,r.jsx)("path",{d:e})}),oe=[{text:(0,s.__)("Incredibly Advanced","ultimate-store-kit"),icon:(0,r.jsx)(ie,{d:"M13 2 3 14h9l-1 8 10-12h-9l1-8z"})},{text:(0,s.__)("Refund or Cancel Anytime","ultimate-store-kit"),icon:(0,r.jsx)(ie,{d:["M9 14 4 9l5-5","M4 9h10.5a5.5 5.5 0 0 1 0 11H11"]})},{text:(0,s.__)("Dynamic Content","ultimate-store-kit"),icon:(0,r.jsx)(ie,{d:["M14.5 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7.5L14.5 2z","M14 2v6h6","M8 13h8","M8 17h4"]})},{text:(0,s.__)("Super-Flexible Widgets","ultimate-store-kit"),icon:(0,r.jsx)(ie,{d:["M21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16z"]})},{text:(0,s.__)("24/7 Premium Support","ultimate-store-kit"),icon:(0,r.jsx)(ie,{d:["M21 11.5a8.38 8.38 0 0 1-.9 3.8 8.5 8.5 0 0 1-7.6 4.7 8.38 8.38 0 0 1-3.8-.9L3 21l1.9-5.7a8.38 8.38 0 0 1-.9-3.8 8.5 8.5 0 0 1 4.7-7.6 8.38 8.38 0 0 1 3.8-.9h.5a8.48 8.48 0 0 1 8 8v.5z"]})},{text:(0,s.__)("Third Party Plugins","ultimate-store-kit"),icon:(0,r.jsx)(ie,{d:["M6.3 20.3a2.4 2.4 0 0 0 3.4 0L12 18l-6-6-2.3 2.3a2.4 2.4 0 0 0 0 3.4z","m2 22 3-3","M7.5 13.5 10 11","M10.5 16.5 13 14","m18 3-4 4h6l-4 4"]})},{text:(0,s.__)("Special Discount!","ultimate-store-kit"),icon:(0,r.jsx)(ie,{d:["M9 5H2v7l6.29 6.29c.94.94 2.48.94 3.42 0l3.58-3.58c.94-.94.94-2.48 0-3.42L9 5z","M6 9.01V9"]})},{text:(0,s.__)("Custom Field Integration","ultimate-store-kit"),icon:(0,r.jsx)(ie,{d:["M12 20h9","M16.5 3.5a2.121 2.121 0 0 1 3 3L7 19l-4 1 1-4L16.5 3.5z"]})},{text:(0,s.__)("With Live Chat Support","ultimate-store-kit"),icon:(0,r.jsx)(ie,{d:["M8 12h.01","M12 12h.01","M16 12h.01","M21 12c0 4.418-4.03 8-9 8a9.863 9.863 0 0 1-4.255-.949L3 20l1.395-3.72C3.512 15.042 3 13.574 3 12c0-4.418 4.03-8 9-8s9 3.582 9 8z"]})},{text:(0,s.__)("Trusted Payment Methods","ultimate-store-kit"),icon:(0,r.jsx)(ie,{d:["M12 22s8-4 8-10V5l-8-3-8 3v7c0 6 8 10 8 10z"]})},{text:(0,s.__)("Interactive Effects","ultimate-store-kit"),icon:(0,r.jsx)(ie,{d:["M12 2v4","m16.2 7.8 2.9-2.9","M18 12h4","m16.2 16.2 2.9 2.9","M12 18v4","m4.9 19.1 2.9-2.9","M2 12h4","m4.9 4.9 2.9 2.9"]})},{text:(0,s.__)("Video Tutorial","ultimate-store-kit"),icon:(0,r.jsx)(ie,{d:["M22.54 6.42a2.78 2.78 0 0 0-1.95-1.96C18.88 4 12 4 12 4s-6.88 0-8.59.46a2.78 2.78 0 0 0-1.95 1.96A29 29 0 0 0 1 12a29 29 0 0 0 .46 5.58A2.78 2.78 0 0 0 3.41 19.6C5.12 20 12 20 12 20s6.88 0 8.59-.46a2.78 2.78 0 0 0 1.95-1.95A29 29 0 0 0 23 12a29 29 0 0 0-.46-5.58z","M9.75 15.02 15.5 12l-5.75-3.02v6.04z"]})}],ne=({isPro:e})=>e?(0,r.jsxs)("div",{className:"rounded-usk border border-slate-200 bg-white p-6 text-center sm:p-10",children:[(0,r.jsx)("div",{className:"mx-auto mb-4 flex h-14 w-14 items-center justify-center rounded-full bg-emerald-100",children:(0,r.jsx)(E,{className:"h-7 w-7 text-emerald-600"})}),(0,r.jsx)("h2",{className:"m-0 mb-2 text-xl font-bold text-slate-800",children:(0,s.__)("You already have Pro!","ultimate-store-kit")}),(0,r.jsx)("p",{className:"m-0 text-sm text-slate-500",children:(0,s.__)("Thank you for being a Pro user. You have access to all features.","ultimate-store-kit")})]}):(0,r.jsxs)("div",{className:"space-y-5",children:[(0,r.jsxs)("div",{className:"overflow-hidden rounded-usk border border-solid border-gray-100 bg-white",children:[(0,r.jsxs)("div",{className:"flex border-b border-gray-100",children:[(0,r.jsx)("div",{className:"flex flex-[2] items-center px-3 py-3 sm:px-5 sm:py-3.5",children:(0,r.jsx)("span",{className:"text-[10px] font-semibold uppercase tracking-wider text-slate-400 sm:text-[11px]",children:(0,s.__)("Features","ultimate-store-kit")})}),(0,r.jsx)("div",{className:"flex w-20 items-center justify-center border-l border-gray-100 bg-slate-50 py-3 sm:w-28 sm:py-3.5 lg:w-36",children:(0,r.jsx)("span",{className:"text-[11px] font-bold text-slate-500 sm:text-[12px]",children:(0,s.__)("Free","ultimate-store-kit")})}),(0,r.jsx)("div",{className:"flex w-20 items-center justify-center border-l border-uks-brand/30 bg-uks-brand py-3 sm:w-28 sm:py-3.5 lg:w-36",children:(0,r.jsxs)("span",{className:"inline-flex items-center gap-1 text-[11px] font-bold text-white sm:gap-1.5 sm:text-[12px]",children:[(0,r.jsx)(P,{className:"h-3 w-3"}),(0,s.__)("Pro","ultimate-store-kit")]})})]}),le.map((e,t)=>(0,r.jsxs)("div",{className:"flex items-center border-b border-gray-50 last:border-b-0 "+(t%2==1?"bg-slate-50/50":"bg-white"),children:[(0,r.jsxs)("div",{className:"flex min-w-0 flex-[2] items-center gap-2 px-3 py-3 sm:px-5 sm:py-3.5",children:[(0,r.jsx)("span",{className:"text-[12px] font-medium text-slate-700 sm:text-[13px]",children:e.label}),e.freeNote&&e.proNote&&(0,r.jsxs)("span",{className:"hidden shrink-0 rounded-full border border-slate-100 bg-white px-2 py-0.5 text-[10px] font-semibold text-slate-400 sm:inline-block",children:[e.freeNote," → ",e.proNote]})]}),(0,r.jsx)("div",{className:"flex w-20 shrink-0 items-center justify-center border-l py-3 sm:w-28 sm:py-3.5 lg:w-36 "+(t%2==1?"border-gray-100 bg-slate-50/50":"border-gray-50 bg-white"),children:e.free?(0,r.jsx)(E,{className:"mx-auto h-[18px] w-[18px] text-uks-brand"}):(0,r.jsx)(v,{className:"mx-auto h-[18px] w-[18px] text-slate-300"})}),(0,r.jsx)("div",{className:"flex w-20 shrink-0 items-center justify-center border-l border-uks-brand/20 bg-uks-brand/[0.07] py-3 sm:w-28 sm:py-3.5 lg:w-36",children:e.pro?(0,r.jsx)(E,{className:"mx-auto h-[18px] w-[18px] text-uks-brand"}):(0,r.jsx)(v,{className:"mx-auto h-[18px] w-[18px] text-slate-300"})})]},t))]}),(0,r.jsxs)("div",{className:"overflow-hidden rounded-usk border border-solid border-gray-100 bg-white",children:[(0,r.jsxs)("div",{className:"p-4 sm:p-5 lg:p-6",children:[(0,r.jsx)("p",{className:"m-0 mb-3 text-[11px] font-semibold uppercase tracking-wider text-slate-400 sm:mb-4",children:(0,s.__)("What's included with Pro","ultimate-store-kit")}),(0,r.jsx)("div",{className:"grid grid-cols-1 gap-2 xs:grid-cols-2 sm:grid-cols-3 lg:grid-cols-4",children:oe.map((e,t)=>(0,r.jsxs)("div",{className:"flex items-center gap-2 rounded-lg border border-slate-100 bg-slate-50/70 px-3 py-2.5 sm:gap-2.5",children:[(0,r.jsx)("span",{className:"shrink-0","aria-hidden":"true",children:e.icon}),(0,r.jsx)("span",{className:"text-[12px] font-medium leading-snug text-slate-600",children:e.text})]},t))})]}),(0,r.jsxs)("div",{className:"flex flex-col items-center gap-3 border-t border-uks-brand/15 bg-gradient-to-br from-uks-brand/[0.07] to-transparent px-4 py-5 text-center sm:px-6 sm:py-6",children:[(0,r.jsx)("p",{className:"m-0 text-[13px] font-semibold text-slate-700",children:(0,s.__)("Ready to unlock all Pro features?","ultimate-store-kit")}),(0,r.jsxs)("a",{href:"https://storekit.pro/pricing",target:"_blank",rel:"noopener noreferrer",className:`${n} ${i} gap-2`,children:[(0,r.jsx)(P,{className:"h-4 w-4"}),(0,s.__)("Upgrade to Pro — View Pricing","ultimate-store-kit")]}),(0,r.jsxs)("div",{className:"flex flex-wrap items-center justify-center gap-x-4 gap-y-1.5 text-[11px] text-slate-400",children:[(0,r.jsxs)("span",{className:"flex items-center gap-1",children:[(0,r.jsx)(E,{className:"h-3.5 w-3.5 text-emerald-500"}),(0,s.__)("30-day money-back","ultimate-store-kit")]}),(0,r.jsxs)("span",{className:"flex items-center gap-1",children:[(0,r.jsx)(E,{className:"h-3.5 w-3.5 text-emerald-500"}),(0,s.__)("Cancel anytime","ultimate-store-kit")]}),(0,r.jsxs)("span",{className:"flex items-center gap-1",children:[(0,r.jsx)(E,{className:"h-3.5 w-3.5 text-emerald-500"}),(0,s.__)("Instant access","ultimate-store-kit")]})]})]})]})]}),de=window.ultimateStoreKitAdminData||{},ce="font-semibold text-uks-brand no-underline transition hover:underline",me=({icon:e,label:t,children:s})=>(0,r.jsxs)("div",{className:"group flex items-center gap-4 rounded-lg border border-solid border-gray-200 bg-white p-4",children:[(0,r.jsx)("div",{className:"flex h-11 w-11 shrink-0 items-center justify-center rounded-lg bg-uks-brand/10 text-uks-brand transition group-hover:bg-uks-brand/15","aria-hidden":"true",children:e}),(0,r.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,r.jsx)("h3",{className:"m-0 mb-1 text-[11px] font-semibold uppercase tracking-wider text-slate-400",children:t}),(0,r.jsx)("div",{className:"text-sm font-semibold text-slate-800",children:s})]})]}),xe=({icon:e,title:t,desc:s,href:a})=>(0,r.jsxs)("a",{href:a,target:"_blank",rel:"noopener noreferrer",className:"group flex items-center gap-4 rounded-lg border border-solid border-gray-200 bg-white p-4 text-inherit no-underline transition hover:border-uks-brand/25",children:[(0,r.jsx)("div",{className:"flex h-11 w-11 shrink-0 items-center justify-center rounded-lg bg-uks-brand/10 text-uks-brand transition group-hover:bg-uks-brand/15","aria-hidden":"true",children:e}),(0,r.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,r.jsx)("div",{className:"text-sm font-semibold text-slate-800",children:t}),(0,r.jsx)("p",{className:"m-0 mt-0.5 text-[12px] leading-snug text-slate-500",children:s})]})]}),he=()=>{const e=Boolean(de.isPro),t=de.version||"";return(0,r.jsxs)("div",{className:"space-y-6",children:[(0,r.jsxs)("div",{className:"overflow-hidden rounded-usk border border-slate-200 bg-white",children:[(0,r.jsx)("div",{className:"bg-white p-4 sm:p-5 border border-solid border-gray-100",children:(0,r.jsxs)("div",{className:"flex max-w-3xl flex-col items-start gap-4 text-left sm:flex-row",children:[(0,r.jsx)("div",{className:"",children:(0,r.jsx)(w,{className:"w-12 h-12 block"})}),(0,r.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,r.jsxs)("div",{className:"mb-2 flex flex-wrap items-center justify-start gap-2",children:[(0,r.jsx)("h3",{className:"m-0 text-[22px] font-extrabold leading-none text-slate-900",children:(0,s.__)("Ultimate Store Kit","ultimate-store-kit")}),(0,r.jsxs)("span",{className:"inline-flex items-center rounded-full bg-uks-brand px-2.5 py-0.5 text-xs font-semibold text-white",children:["v",t]}),(0,r.jsx)("span",{className:"inline-flex items-center rounded-full px-2.5 py-0.5 text-xs font-semibold "+(e?"bg-emerald-100 text-emerald-800":"bg-slate-200 text-slate-700"),children:e?(0,s.__)("Pro","ultimate-store-kit"):(0,s.__)("Free","ultimate-store-kit")})]}),(0,r.jsx)("p",{className:"mb-4 text-[13px] leading-relaxed text-slate-600",children:(0,s.__)("Build online stores in WordPress with the powerful store builder addon for Elementor. Enjoy a wide range of customizations and easily build product grids, carousels, single product/page elements, checkouts and more.","ultimate-store-kit")}),(0,r.jsxs)("ul",{className:"m-0 flex list-none flex-wrap justify-start gap-3 p-0",children:[(0,r.jsx)("li",{className:"rounded-full py-1 px-2 border border-solid border-slate-200 bg-white/80 text-xs font-medium text-slate-600",children:(0,s.__)("Elementor widgets","ultimate-store-kit")}),(0,r.jsx)("li",{className:"rounded-full py-1 px-2 border border-solid border-slate-200 bg-white/80 text-xs font-medium text-slate-600",children:(0,s.__)("WooCommerce ready","ultimate-store-kit")}),(0,r.jsx)("li",{className:"rounded-full py-1 px-2 border border-solid border-slate-200 bg-white/80 text-xs font-medium text-slate-600",children:(0,s.__)("Store-focused UI","ultimate-store-kit")})]})]})]})}),(0,r.jsxs)("div",{className:"grid grid-cols-1 gap-px border-t border-slate-200 sm:grid-cols-3",children:[(0,r.jsxs)("div",{className:"bg-gray-100 px-4 py-3 text-center sm:text-left",children:[(0,r.jsx)("p",{className:"m-0 mb-0.5 text-[11px] font-semibold uppercase tracking-wide text-slate-400",children:(0,s.__)("Current version","ultimate-store-kit")}),(0,r.jsxs)("p",{className:"m-0 text-sm font-bold text-slate-800",children:["v",t]})]}),(0,r.jsxs)("div",{className:"bg-gray-100 px-4 py-3 text-center sm:text-left",children:[(0,r.jsx)("p",{className:"m-0 mb-0.5 text-[11px] font-semibold uppercase tracking-wide text-slate-400",children:(0,s.__)("License","ultimate-store-kit")}),(0,r.jsx)("p",{className:"m-0 text-sm font-bold text-slate-800",children:e?(0,s.__)("Pro (active)","ultimate-store-kit"):(0,s.__)("Free","ultimate-store-kit")})]}),(0,r.jsxs)("div",{className:"bg-gray-100 px-4 py-3 text-center sm:text-left",children:[(0,r.jsx)("p",{className:"m-0 mb-0.5 text-[11px] font-semibold uppercase tracking-wide text-slate-400",children:(0,s.__)("Built for","ultimate-store-kit")}),(0,r.jsx)("p",{className:"m-0 text-sm font-bold text-slate-800",children:(0,s.__)("WordPress + WooCommerce","ultimate-store-kit")})]})]})]}),(0,r.jsxs)("div",{className:"rounded-usk border border-solid border-gray-100 bg-white p-4 sm:p-5",children:[(0,r.jsx)("h3",{className:"m-0 mb-3 text-base font-bold text-slate-800",children:(0,s.__)("Product & support","ultimate-store-kit")}),(0,r.jsxs)("div",{className:"grid grid-cols-1 gap-3 sm:grid-cols-2 2xl:grid-cols-4",children:[(0,r.jsx)(me,{label:(0,s.__)("Author","ultimate-store-kit"),icon:(0,r.jsx)(D,{}),children:(0,r.jsx)("a",{href:"https://bdthemes.com/",target:"_blank",rel:"noopener noreferrer",className:ce,children:"BdThemes"})}),(0,r.jsx)(me,{label:(0,s.__)("Website","ultimate-store-kit"),icon:(0,r.jsx)(T,{}),children:(0,r.jsx)("a",{href:"https://storekit.pro/",target:"_blank",rel:"noopener noreferrer",className:ce,children:"storekit.pro"})}),(0,r.jsx)(me,{label:(0,s.__)("Documentation","ultimate-store-kit"),icon:(0,r.jsx)(O,{}),children:(0,r.jsx)("a",{href:"https://bdthemes.com/all-knowledge-base-of-ultimate-store-kit/",target:"_blank",rel:"noopener noreferrer",className:ce,children:(0,s.__)("Knowledge Base","ultimate-store-kit")})}),(0,r.jsx)(me,{label:(0,s.__)("Support","ultimate-store-kit"),icon:(0,r.jsx)(W,{}),children:(0,r.jsx)("a",{href:"https://bdthemes.com/support/",target:"_blank",rel:"noopener noreferrer",className:ce,children:(0,s.__)("Get Support","ultimate-store-kit")})})]})]}),(0,r.jsxs)("div",{className:"rounded-usk border border-solid border-gray-100 bg-white p-4 sm:p-5",children:[(0,r.jsx)("h3",{className:"m-0 mb-3 text-base font-bold text-slate-800",children:(0,s.__)("Useful links","ultimate-store-kit")}),(0,r.jsx)("ul",{className:"m-0 grid list-none grid-cols-1 gap-3 p-0 sm:grid-cols-2 2xl:grid-cols-4",children:[["https://www.youtube.com/c/bdthemes",(0,s.__)("Video tutorials","ultimate-store-kit"),(0,s.__)("Step-by-step YouTube tutorials for setup, widgets, and customization.","ultimate-store-kit"),(0,r.jsx)(U,{})],["https://feedback.bdthemes.com/b/6vr2250l/feature-requests/",(0,s.__)("Request a feature","ultimate-store-kit"),(0,s.__)("Share ideas and vote on what we build next.","ultimate-store-kit"),(0,r.jsx)(V,{})],["https://wordpress.org/plugins/ultimate-store-kit/",(0,s.__)("Rate us on WordPress.org","ultimate-store-kit"),(0,s.__)("Help others discover the plugin with a review.","ultimate-store-kit"),(0,r.jsx)(C,{className:"h-5 w-5"})],["https://www.facebook.com/groups/358290584725185",(0,s.__)("Facebook community","ultimate-store-kit"),(0,s.__)("Join our Facebook community to connect with other users and the team.","ultimate-store-kit"),(0,r.jsx)(I,{})]].map(([e,t,s,a])=>(0,r.jsx)("li",{children:(0,r.jsx)(xe,{href:e,title:t,desc:s,icon:a})},e))})]})]})},ue=()=>(0,r.jsxs)("div",{className:"relative inline-flex shrink-0 cursor-not-allowed select-none",style:{width:40,height:22},role:"presentation","aria-hidden":"true",title:(0,s.__)("Requires Pro license","ultimate-store-kit"),children:[(0,r.jsx)("span",{style:{position:"absolute",inset:0,borderRadius:9999,background:"#cbd5e1",border:"1px solid #94a3b8",boxSizing:"border-box"}}),(0,r.jsx)("span",{style:{position:"absolute",top:"50%",left:3,width:16,height:16,marginTop:-8,borderRadius:9999,background:"#ffffff",boxShadow:"0 1px 4px rgba(0,0,0,0.22)"}})]}),pe=({module:e})=>{const t=e?.label||e?.id||"",a=e?.description||"",l=e?.icon||e?.id||"grid",i="rounded-usk border border-solid border-gray-100 bg-white";return(0,r.jsxs)("div",{className:"flex flex-col gap-5",children:[(0,r.jsxs)("div",{className:`flex flex-col gap-4 p-5 sm:flex-row sm:items-center sm:justify-between ${i}`,children:[(0,r.jsxs)("div",{className:"flex min-w-0 items-center gap-3",children:[(0,r.jsx)("div",{className:"flex h-11 w-11 shrink-0 items-center justify-center rounded-xl bg-uks-brand/10 text-uks-brand","aria-hidden":"true",children:(0,r.jsx)(G,{name:l})}),(0,r.jsxs)("div",{className:"min-w-0",children:[(0,r.jsx)("h3",{className:"m-0 text-base font-bold text-slate-800",children:t}),a&&(0,r.jsx)("p",{className:"m-0 mt-1 text-[12px] leading-snug text-slate-500",children:a})]})]}),(0,r.jsx)("div",{className:"flex shrink-0 justify-end sm:pl-2",children:(0,r.jsx)(ue,{})})]}),(0,r.jsx)("div",{className:i,children:(0,r.jsxs)("div",{className:"flex flex-col items-center justify-center px-6 py-16 text-center sm:px-10 sm:py-20",children:[(0,r.jsx)("div",{className:"mx-auto mb-6 flex h-14 w-14 items-center justify-center rounded-xl bg-uks-brand/10 text-uks-brand","aria-hidden":"true",children:(0,r.jsx)(z,{className:"h-7 w-7",stroke:"currentColor"})}),(0,r.jsx)("h4",{className:"m-0 mb-2 text-lg font-bold tracking-tight text-slate-800",children:(0,s.__)("Module is currently disabled","ultimate-store-kit")}),(0,r.jsx)("p",{className:"m-0 mb-6 max-w-md text-[13px] leading-relaxed text-slate-500",children:(0,s.__)("This is a Pro feature. Upgrade to Ultimate Store Kit Pro to unlock this module and configure its settings.","ultimate-store-kit")}),(0,r.jsxs)("a",{href:"https://storekit.pro/pricing/",target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center gap-2 rounded-lg border-0 bg-uks-brand px-5 py-2.5 text-sm font-semibold text-white no-underline transition-opacity hover:opacity-90",children:[(0,r.jsx)(C,{className:"h-4 w-4"}),(0,s.__)("Get Pro","ultimate-store-kit")]})]})})]})},be=({notification:t,onDismiss:s})=>{if(!t)return null;const a="success"===t.type?"usk-toast--success":"usk-toast--error";return(0,e.createPortal)((0,r.jsx)("div",{className:"usk-toast-wrap",children:(0,r.jsxs)("div",{className:`usk-toast ${a}`,children:[(0,r.jsx)("span",{children:t.message}),(0,r.jsx)("button",{type:"button",className:"usk-toast__close",onClick:s,children:"×"})]})}),document.body)},ge=window.ultimateStoreKitAdminData||{},fe=(()=>{const e=ge.widgets?.ultimate_store_kit_other_settings||[],t=[];return e.forEach(e=>{var s;"start_group"===e.type&&t.push({id:`settings-${s=e.label,s.toLowerCase().replace(/\s+/g,"-").replace(/[^a-z0-9-]/g,"")}`,label:e.label})}),t})(),je=()=>{const e=window.location.hash.replace("#","").split("?")[0],s=X().map(e=>e.id),r=(0,t.applyFilters)("usk.admin.pages",{}),a=Object.keys(r),l=["welcome","widgets","woocommerce-widgets","edd-widgets","other-widgets","get-pro","about",...fe.map(e=>e.id),...s,...a];return(0,t.applyFilters)("usk.admin.validPages",l).includes(e)?e:"welcome"},ke=()=>{const[a,l]=(0,e.useState)(je()),[i,o]=(0,e.useState)(ge.savedSettings||{}),[n,d]=(0,e.useState)(!!ge.isPro),[c,m]=(0,e.useState)(!1),[x,h]=(0,e.useState)(null),[u,p]=(0,e.useState)(!1),[b,g]=(0,e.useState)(()=>window.innerWidth>1024);(0,e.useEffect)(()=>((0,t.addAction)("usk.admin.notify","usk-core",e=>h(e)),()=>(0,t.removeAction)("usk.admin.notify","usk-core")),[]),(0,e.useEffect)(()=>((0,t.addAction)("usk.admin.licenseChanged","usk-core",e=>{d(e),window.ultimateStoreKitAdminData.isPro=e}),()=>(0,t.removeAction)("usk.admin.licenseChanged","usk-core")),[]),(0,e.useEffect)(()=>{if(x){const e=setTimeout(()=>h(null),3e3);return()=>clearTimeout(e)}},[x]),(0,e.useEffect)(()=>{const e=()=>{l(je())};return window.addEventListener("hashchange",e),()=>window.removeEventListener("hashchange",e)},[]),(0,e.useEffect)(()=>{if("get-pro"===a){const e=(0,t.applyFilters)("usk.admin.pages",{});if(e.license||n){const t=e.license?"license":"welcome";l(t),window.location.hash=`#${t}`}}},[n,a]),(0,e.useEffect)(()=>{p(!1)},[a]),(0,e.useEffect)(()=>(document.body.style.overflow=u?"hidden":"",()=>{document.body.style.overflow=""}),[u]),(0,e.useEffect)(()=>{const e=()=>{const e=window.innerWidth>1024;g(e),e&&p(!1)};return window.addEventListener("resize",e),()=>window.removeEventListener("resize",e)},[]);const f=(0,e.useCallback)(e=>{e?.preventDefault&&e.preventDefault(),e?.stopPropagation&&e.stopPropagation(),p(e=>!e)},[]),j=(0,e.useCallback)((e,t)=>{m(!0),fetch(ge.restUrl+"settings",{method:"POST",headers:{"Content-Type":"application/json","X-WP-Nonce":ge.restNonce},body:JSON.stringify({section:e,settings:t})}).then(e=>{if(!e.ok)throw e;return e.json()}).then(r=>{o(s=>({...s,[e]:t})),h({type:"success",message:r?.message||(0,s.__)("Settings saved successfully.","ultimate-store-kit")})}).catch(()=>{h({type:"error",message:(0,s.__)("An error occurred while saving.","ultimate-store-kit")})}).finally(()=>{m(!1)})},[]);return(0,r.jsxs)("div",{className:"flex min-h-[calc(100vh-100px)] flex-col m-5 ml-0 mb-0 font-sans",children:[(0,r.jsx)(be,{notification:x,onDismiss:()=>h(null)}),(0,r.jsx)(R,{version:ge.version,isPro:n,isSidebarOpen:u,isDesktop:b,onToggleSidebar:f}),(0,r.jsx)("div",{className:"bg-slate-50",children:(0,r.jsxs)("div",{className:"flex flex-1 items-stretch p-5 gap-5",children:[(0,r.jsx)(J,{activePage:a,onNavigate:l,isPro:n,isOpen:u,isDesktop:b,onClose:()=>p(!1),settingsGroups:fe}),(0,r.jsx)("div",{className:"min-w-0 flex-1 flex flex-col",children:(0,r.jsx)("div",{className:"flex-1",children:(()=>{const e=ge.widgets||{},s=(0,t.applyFilters)("usk.admin.pages",{});if(s[a]){if(!n){const e=X().find(e=>e.id===a);if(e)return(0,r.jsx)(pe,{module:e})}const e=s[a];return(0,r.jsx)(e,{})}const l=X().find(e=>e.id===a);if(l)return(0,r.jsx)(pe,{module:l});switch(a){case"welcome":return(0,r.jsx)(ee,{widgets:e,settings:i,isPro:n});case"widgets":case"woocommerce-widgets":case"edd-widgets":case"other-widgets":{const t={"woocommerce-widgets":"wc","edd-widgets":"edd","other-widgets":"other",widgets:"wc"};return(0,r.jsx)(te,{allWidgets:e,allSettings:i,onSave:j,saving:c,isPro:n,widgetType:t[a]})}case"get-pro":return n?(0,r.jsx)(ee,{widgets:e,settings:i,isPro:n}):(0,r.jsx)(ne,{isPro:n});case"about":return(0,r.jsx)(he,{});default:{const t=fe.find(e=>e.id===a);return t?(0,r.jsx)(ae,{widgets:e.ultimate_store_kit_other_settings||[],section:"ultimate_store_kit_other_settings",settings:i.ultimate_store_kit_other_settings||{},onSave:j,saving:c,isPro:n,activeGroup:t.label}):(0,r.jsx)(ee,{widgets:e,settings:i})}}})()})})]})}),(0,r.jsxs)("footer",{className:"p-5 bg-white py-4 text-center text-sm text-slate-500 rounded-bl-lg rounded-br-lg",children:[(0,s.__)("Ultimate Store Kit Addon made with love by","ultimate-store-kit")," ",(0,r.jsx)("a",{target:"_blank",rel:"noopener noreferrer",href:"https://bdthemes.com",className:"text-uks-brand no-underline hover:underline",children:"BdThemes"}),". ",(0,s.__)("All rights reserved.","ultimate-store-kit")]})]})};document.addEventListener("DOMContentLoaded",()=>{const t=document.querySelector(".ultimate-store-kit-admin-root");t&&(0,e.createRoot)(t).render((0,r.jsx)(ke,{}))})}},s={};function r(e){var a=s[e];if(void 0!==a)return a.exports;var l=s[e]={exports:{}};return t[e](l,l.exports,r),l.exports}r.m=t,e=[],r.O=(t,s,a,l)=>{if(!s){var i=1/0;for(c=0;c<e.length;c++){for(var[s,a,l]=e[c],o=!0,n=0;n<s.length;n++)(!1&l||i>=l)&&Object.keys(r.O).every(e=>r.O[e](s[n]))?s.splice(n--,1):(o=!1,l<i&&(i=l));if(o){e.splice(c--,1);var d=a();void 0!==d&&(t=d)}}return t}l=l||0;for(var c=e.length;c>0&&e[c-1][2]>l;c--)e[c]=e[c-1];e[c]=[s,a,l]},r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),(()=>{var e={16:0,1524:0};r.O.j=t=>0===e[t];var t=(t,s)=>{var a,l,[i,o,n]=s,d=0;if(i.some(t=>0!==e[t])){for(a in o)r.o(o,a)&&(r.m[a]=o[a]);if(n)var c=n(r)}for(t&&t(s);d<i.length;d++)l=i[d],r.o(e,l)&&e[l]&&e[l][0](),e[l]=0;return r.O(c)},s=globalThis.webpackChunkultimate_store_kit=globalThis.webpackChunkultimate_store_kit||[];s.forEach(t.bind(null,0)),s.push=t.bind(null,s.push.bind(s))})();var a=r.O(void 0,[1524],()=>r(7208));a=r.O(a)})(); |
|
1
|
+(()=>{"use strict";var e={7208(){const e=window.wp.element,t=window.wp.hooks,s=window.wp.i18n,r=window.ReactJSXRuntime,a=({checked:e,onChange:t,disabled:s})=>{const a={position:"absolute",inset:0,borderRadius:"9999px",background:e?"#00216A":"#cbd5e1",transition:"background 0.25s cubic-bezier(0.4, 0, 0.2, 1)",opacity:s?.45:1,pointerEvents:"none",willChange:"background"},l={position:"absolute",top:"50%",left:3,width:16,height:16,borderRadius:"9999px",background:"#fff",boxShadow:"0 1px 4px rgba(0,0,0,0.25)",transform:e?"translate(18px, -50%)":"translate(0px, -50%)",transition:"transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.2s ease",pointerEvents:"none",zIndex:1,willChange:"transform"},i={position:"relative",display:"inline-flex",alignItems:"center",width:40,height:22,cursor:s?"not-allowed":"pointer",flexShrink:0,userSelect:"none"};return(0,r.jsxs)("label",{style:i,children:[(0,r.jsx)("input",{type:"checkbox",checked:e,disabled:s,onChange:t,style:{position:"absolute",opacity:0,width:0,height:0,margin:0,padding:0,pointerEvents:"none"}}),(0,r.jsx)("span",{style:a}),(0,r.jsx)("span",{style:l})]})},l="inline-flex cursor-pointer items-center gap-1.5 rounded-md border border-transparent px-[18px] py-2 text-[13px] font-semibold leading-snug no-underline transition-all duration-200 disabled:cursor-not-allowed disabled:opacity-60",i=`${l} border-uks-brand bg-uks-brand text-white hover:bg-uks-brand-dark`,o=`${l} bg-gray-100 border-gray-200 text-gray-700 hover:bg-gray-200 hover:text-gray-800`,n=`${l} px-6 py-2.5 text-sm`,d=`${l} px-3 py-2.5 text-xs`,c=`${l} border-indigo-500 bg-indigo-500 text-white hover:opacity-90`,m=`${l} border-pink-500 bg-pink-500 text-white hover:opacity-90`,x=`${l} border-orange-500 bg-orange-500 text-white hover:opacity-90`,h=`${l} border-violet-500 bg-violet-500 text-white hover:opacity-90`,u=`${l} border-teal-500 bg-teal-500 text-white hover:opacity-90`,p="whitespace-nowrap text-xs font-semibold text-slate-600",b="min-w-[140px] cursor-pointer rounded-md border border-slate-200 bg-white px-3 py-1.5 text-[13px] text-slate-700 transition-all duration-200 hover:border-slate-300 focus:border-uks-brand focus:outline-none focus:ring-2 focus:ring-uks-brand",g="flex items-center justify-between border-b border-slate-100 py-2.5 last:border-b-0",f="flex items-center gap-2 text-[13px] font-medium text-slate-700",j="min-w-[120px] w-full block max-w-full rounded-md border border-slate-200 bg-white px-3 py-1.5 text-[13px] text-slate-700 focus:border-uks-brand focus:outline-none focus:ring-2 focus:ring-uks-brand disabled:cursor-not-allowed disabled:opacity-50",k="shrink-0 whitespace-nowrap rounded-md border border-solid border-gray-100 text-uks-brand px-2 py-0.5 text-[10px] font-bold shadow-sm bg-white",w={xmlns:"http://www.w3.org/2000/svg",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},_=({className:e="block h-10 w-10 sm:h-12 sm:w-12"})=>(0,r.jsxs)("svg",{className:e,version:"1.1",id:"Layer_1",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",x:"0px",y:"0px",viewBox:"0 0 500 500",style:{enableBackground:"new 0 0 500 500"},xmlSpace:"preserve",children:[(0,r.jsx)("style",{type:"text/css",dangerouslySetInnerHTML:{__html:"\n\t.st0{fill:#E30C1D;enable-background:new ;}\n\t.st1{fill:#FFFFFF;}\n"}}),(0,r.jsx)("path",{className:"st0",d:"M473.6,496.4h-447c-12.6,0-22.9-10.2-22.9-22.9v-447c0-12.4,10.2-22.9,22.9-22.9h446.8 c12.6,0,22.9,10.2,22.9,22.9v446.8C496.3,486.3,486.2,496.4,473.6,496.4z"}),(0,r.jsxs)("g",{children:[(0,r.jsx)("path",{className:"st1",d:"M374.3,364l-21.1-157.6c-1.9-14.3-14.2-25-28.6-25c0,0-0.1,0-0.1,0l-143.7,0.7c-14.5,0.1-26.8,11-28.5,25.4 l-18.6,156.9c-1,8.2,1.6,16.4,7.1,22.5s13.3,9.7,21.5,9.7h183.5c8.3,0,16.2-3.6,21.7-9.8C372.9,380.6,375.4,372.3,374.3,364z M186.4,217.1l132.8-0.6l6.4,47.6c-34.1,4.4-61,23.4-78.4,55.7c-8.5,15.8-12.9,31.5-15,41.9h-63L186.4,217.1z M268.1,361.7 c1.9-7.3,5-16.3,9.9-25.3c12-22.3,29.2-34.7,52.2-37.6l8.4,62.9H268.1z"}),(0,r.jsx)("path",{className:"st1",d:"M212.4,169.2c8.8,0,16-7.2,16-16c0-13.9,11.3-25.3,25.3-25.3c13.9,0,25.3,11.3,25.3,25.3c0,8.8,7.2,16,16,16 s16-7.2,16-16c0-31.6-25.7-57.3-57.3-57.3c-31.6,0-57.3,25.7-57.3,57.3C196.4,162.1,203.6,169.2,212.4,169.2z"})]})]}),v=({className:e="h-4 w-4"})=>(0,r.jsxs)("svg",{...w,viewBox:"0 0 24 24",className:e,children:[(0,r.jsx)("path",{d:"M18 6 6 18"}),(0,r.jsx)("path",{d:"m6 6 12 12"})]}),y=({className:e="h-4 w-4"})=>(0,r.jsxs)("svg",{...w,viewBox:"0 0 24 24",className:e,children:[(0,r.jsx)("path",{d:"M4 6h16"}),(0,r.jsx)("path",{d:"M4 12h16"}),(0,r.jsx)("path",{d:"M4 18h16"})]}),N=({className:e="h-4 w-4 block"})=>(0,r.jsxs)("svg",{...w,width:24,height:24,viewBox:"0 0 24 24",className:e,children:[(0,r.jsx)("path",{d:"M3 11h3a2 2 0 0 1 2 2v3a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-5Zm0 0a9 9 0 1 1 18 0m0 0v5a2 2 0 0 1-2 2h-1a2 2 0 0 1-2-2v-3a2 2 0 0 1 2-2h3Z"}),(0,r.jsx)("path",{d:"M21 16v2a4 4 0 0 1-4 4h-5"})]}),M=({className:e="w-5 h-5"})=>(0,r.jsxs)("svg",{...w,width:24,height:24,viewBox:"0 0 24 24",className:e,children:[(0,r.jsx)("path",{d:"M12 2v4"}),(0,r.jsx)("path",{d:"m16.2 7.8 2.9-2.9"}),(0,r.jsx)("path",{d:"M18 12h4"}),(0,r.jsx)("path",{d:"m16.2 16.2 2.9 2.9"}),(0,r.jsx)("path",{d:"M12 18v4"}),(0,r.jsx)("path",{d:"m4.9 19.1 2.9-2.9"}),(0,r.jsx)("path",{d:"M2 12h4"}),(0,r.jsx)("path",{d:"m4.9 4.9 2.9 2.9"})]}),C=({className:e="w-4 h-4 block"})=>(0,r.jsx)("svg",{...w,width:24,height:24,viewBox:"0 0 24 24",className:e,children:(0,r.jsx)("path",{d:"M11.525 2.295a.53.53 0 0 1 .95 0l2.31 4.679a2.123 2.123 0 0 0 1.595 1.16l5.166.756a.53.53 0 0 1 .294.904l-3.736 3.638a2.123 2.123 0 0 0-.611 1.878l.882 5.14a.53.53 0 0 1-.771.56l-4.618-2.428a2.122 2.122 0 0 0-1.973 0L6.396 21.01a.53.53 0 0 1-.77-.56l.881-5.139a2.122 2.122 0 0 0-.611-1.879L2.16 9.795a.53.53 0 0 1 .294-.906l5.165-.755a2.122 2.122 0 0 0 1.597-1.16z"})}),P=({className:e="w-4 h-4 block"})=>(0,r.jsx)("svg",{className:e,viewBox:"0 0 24 24",fill:"currentColor",children:(0,r.jsx)("path",{d:"M11.525 2.295a.53.53 0 0 1 .95 0l2.31 4.679a2.123 2.123 0 0 0 1.595 1.16l5.166.756a.53.53 0 0 1 .294.904l-3.736 3.638a2.123 2.123 0 0 0-.611 1.878l.882 5.14a.53.53 0 0 1-.771.56l-4.618-2.428a2.122 2.122 0 0 0-1.973 0L6.396 21.01a.53.53 0 0 1-.77-.56l.881-5.139a2.122 2.122 0 0 0-.611-1.879L2.16 9.795a.53.53 0 0 1 .294-.906l5.165-.755a2.122 2.122 0 0 0 1.597-1.16z"})}),S="h-5 w-5 block color-current",$=({className:e=S})=>(0,r.jsxs)("svg",{...w,width:24,height:24,viewBox:"0 0 24 24",className:e,children:[(0,r.jsx)("rect",{width:7,height:9,x:3,y:3,rx:1}),(0,r.jsx)("rect",{width:7,height:5,x:14,y:3,rx:1}),(0,r.jsx)("rect",{width:7,height:9,x:14,y:12,rx:1}),(0,r.jsx)("rect",{width:7,height:5,x:3,y:16,rx:1})]}),A=({className:e="h-4 w-4 block"})=>(0,r.jsxs)("svg",{...w,width:24,height:24,viewBox:"0 0 24 24",className:e,children:[(0,r.jsx)("path",{d:"m21 21-4.34-4.34"}),(0,r.jsx)("circle",{cx:11,cy:11,r:8})]}),E=({className:e="h-4 w-4"})=>(0,r.jsx)("svg",{...w,viewBox:"0 0 24 24",className:e,children:(0,r.jsx)("path",{d:"M20 6 9 17l-5-5"})}),B=({className:e="h-4 w-4 block"})=>(0,r.jsxs)("svg",{...w,width:24,height:24,viewBox:"0 0 24 24",className:e,children:[(0,r.jsx)("path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0"}),(0,r.jsx)("circle",{cx:12,cy:12,r:3})]}),L=({className:e="h-4 w-4 block"})=>(0,r.jsx)("svg",{...w,width:24,height:24,viewBox:"0 0 24 24",className:e,children:(0,r.jsx)("path",{d:"M5 5a2 2 0 0 1 3.008-1.728l11.997 6.998a2 2 0 0 1 .003 3.458l-12 7A2 2 0 0 1 5 19z"})}),F=({className:e="h-4 w-4 block"})=>(0,r.jsxs)("svg",{...w,width:24,height:24,viewBox:"0 0 24 24",className:e,children:[(0,r.jsx)("path",{d:"M6.3 20.3a2.4 2.4 0 0 0 3.4 0L12 18l-6-6-2.3 2.3a2.4 2.4 0 0 0 0 3.4Z"}),(0,r.jsx)("path",{d:"m2 22 3-3"}),(0,r.jsx)("path",{d:"M7.5 13.5 10 11"}),(0,r.jsx)("path",{d:"M10.5 16.5 13 14"}),(0,r.jsx)("path",{d:"m18 3-4 4h6l-4 4"})]}),z=({className:e="h-7 w-7",stroke:t="currentColor"})=>(0,r.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:28,height:28,viewBox:"0 0 24 24",fill:"none",stroke:t,strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round",className:e,children:[(0,r.jsx)("rect",{width:18,height:11,x:3,y:11,rx:2,ry:2}),(0,r.jsx)("path",{d:"M7 11V7a5 5 0 0 1 10 0v4"})]}),D=({className:e="h-5 w-5"})=>(0,r.jsxs)("svg",{...w,className:e,viewBox:"0 0 24 24",children:[(0,r.jsx)("path",{d:"M20 21v-2a4 4 0 0 0-4-4H8a4 4 0 0 0-4 4v2"}),(0,r.jsx)("circle",{cx:"12",cy:"7",r:"4"})]}),O=({className:e="h-5 w-5"})=>(0,r.jsxs)("svg",{...w,className:e,viewBox:"0 0 24 24",children:[(0,r.jsx)("circle",{cx:"12",cy:"12",r:"10"}),(0,r.jsx)("path",{d:"M2 12h20M12 2a15.3 15.3 0 0 1 4 10 15.3 15.3 0 0 1-4 10 15.3 15.3 0 0 1-4-10 15.3 15.3 0 0 1 4-10z"})]}),T=({className:e="h-5 w-5"})=>(0,r.jsxs)("svg",{...w,className:e,viewBox:"0 0 24 24",children:[(0,r.jsx)("path",{d:"M4 19.5A2.5 2.5 0 0 1 6.5 17H20"}),(0,r.jsx)("path",{d:"M6.5 2H20v20H6.5A2.5 2.5 0 0 1 4 19.5v-15A2.5 2.5 0 0 1 6.5 2z"})]}),W=({className:e="h-5 w-5"})=>(0,r.jsx)("svg",{...w,className:e,viewBox:"0 0 24 24",children:(0,r.jsx)("path",{d:"M21 11.5a8.38 8.38 0 0 1-.9 3.8 8.5 8.5 0 0 1-7.6 4.7 8.38 8.38 0 0 1-3.8-.9L3 21l1.9-5.7a8.38 8.38 0 0 1-.9-3.8 8.5 8.5 0 0 1 4.7-7.6 8.38 8.38 0 0 1 3.8-.9h.5a8.48 8.48 0 0 1 8 8v.5z"})}),U=({className:e="h-5 w-5"})=>(0,r.jsxs)("svg",{...w,className:e,viewBox:"0 0 24 24",children:[(0,r.jsx)("polygon",{points:"23 7 16 12 23 17 23 7"}),(0,r.jsx)("rect",{x:"1",y:"5",width:"15",height:"14",rx:"2",ry:"2"})]}),V=({className:e="h-5 w-5"})=>(0,r.jsxs)("svg",{...w,className:e,viewBox:"0 0 24 24",children:[(0,r.jsx)("path",{d:"M12 20h9"}),(0,r.jsx)("path",{d:"M16.5 3.5a2.1 2.1 0 0 1 3 3L7 19l-4 1 1-4Z"})]}),I=({className:e="h-5 w-5"})=>(0,r.jsx)("svg",{...w,className:e,viewBox:"0 0 24 24",children:(0,r.jsx)("path",{d:"M18 2h-3a5 5 0 0 0-5 5v3H7v4h3v8h4v-8h3l1-4h-4V7a1 1 0 0 1 1-1h3z"})}),H={home:({className:e=S})=>(0,r.jsxs)("svg",{...w,width:24,height:24,viewBox:"0 0 24 24",className:e,children:[(0,r.jsx)("path",{d:"M15 21v-8a1 1 0 0 0-1-1h-4a1 1 0 0 0-1 1v8"}),(0,r.jsx)("path",{d:"M3 10a2 2 0 0 1 .709-1.528l7-6a2 2 0 0 1 2.582 0l7 6A2 2 0 0 1 21 10v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z"})]}),grid:$,"currency-switcher":({className:e=S})=>(0,r.jsxs)("svg",{...w,width:24,height:24,viewBox:"0 0 24 24",className:e,children:[(0,r.jsx)("circle",{cx:"12",cy:"12",r:"10"}),(0,r.jsx)("path",{d:"M16 8h-6a2 2 0 1 0 0 4h4a2 2 0 1 1 0 4H8"}),(0,r.jsx)("path",{d:"M12 18V6"})]}),"variation-swatches":({className:e=S})=>(0,r.jsxs)("svg",{...w,width:24,height:24,viewBox:"0 0 24 24",className:e,children:[(0,r.jsx)("path",{d:"M12 2.69l5.66 5.66a8 8 0 1 1-11.31 0z"}),(0,r.jsx)("circle",{cx:"7.5",cy:"10.5",r:".5",fill:"currentColor",stroke:"none"}),(0,r.jsx)("circle",{cx:"12",cy:"7.5",r:".5",fill:"currentColor",stroke:"none"}),(0,r.jsx)("circle",{cx:"16.5",cy:"10.5",r:".5",fill:"currentColor",stroke:"none"}),(0,r.jsx)("circle",{cx:"9",cy:"15.5",r:".5",fill:"currentColor",stroke:"none"})]}),settings:$,badge:({className:e=S})=>(0,r.jsxs)("svg",{...w,width:24,height:24,viewBox:"0 0 24 24",className:e,children:[(0,r.jsx)("path",{d:"M2.586 17.414A2 2 0 0 0 2 18.828V21a1 1 0 0 0 1 1h3a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h1a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h.172a2 2 0 0 0 1.414-.586l.814-.814a6.5 6.5 0 1 0-4-4z"}),(0,r.jsx)("circle",{cx:"16.5",cy:"7.5",r:".5",fill:"currentColor"})]}),star:C,woocommerce:({className:e=S})=>(0,r.jsxs)("svg",{...w,width:24,height:24,viewBox:"0 0 24 24",className:e,children:[(0,r.jsx)("path",{d:"M15 21v-5a1 1 0 0 0-1-1h-4a1 1 0 0 0-1 1v5"}),(0,r.jsx)("path",{d:"M17.774 10.31a1.12 1.12 0 0 0-1.549 0 2.5 2.5 0 0 1-3.451 0 1.12 1.12 0 0 0-1.548 0 2.5 2.5 0 0 1-3.452 0 1.12 1.12 0 0 0-1.549 0 2.5 2.5 0 0 1-3.77-3.248l2.889-4.184A2 2 0 0 1 7 2h10a2 2 0 0 1 1.653.873l2.895 4.192a2.5 2.5 0 0 1-3.774 3.244"}),(0,r.jsx)("path",{d:"M4 10.95V19a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-8.05"})]}),edd:({className:e=S})=>(0,r.jsxs)("svg",{...w,width:24,height:24,viewBox:"0 0 24 24",className:e,children:[(0,r.jsx)("path",{d:"M21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16z"}),(0,r.jsx)("path",{d:"m7.5 4.21 4.5 2.6 4.5-2.6"}),(0,r.jsx)("path",{d:"M12 17.5V12"})]}),other:$,info:({className:e=S})=>(0,r.jsxs)("svg",{...w,width:24,height:24,viewBox:"0 0 24 24",className:e,children:[(0,r.jsx)("circle",{cx:12,cy:12,r:10}),(0,r.jsx)("path",{d:"M12 16v-4"}),(0,r.jsx)("path",{d:"M12 8h.01"})]}),"live-visitor-count":({className:e="h-5 w-5"})=>(0,r.jsxs)("svg",{...w,className:e,viewBox:"0 0 24 24",children:[(0,r.jsx)("path",{d:"M17 21v-2a4 4 0 0 0-4-4H5a4 4 0 0 0-4 4v2"}),(0,r.jsx)("circle",{cx:"9",cy:"7",r:"4"}),(0,r.jsx)("path",{d:"M23 21v-2a4 4 0 0 0-3-3.87"}),(0,r.jsx)("path",{d:"M16 3.13a4 4 0 0 1 0 7.75"})]}),"upsell-cross-sell":()=>(0,r.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round",className:"h-5 w-5 block color-current",children:[(0,r.jsx)("path",{d:"M6 2L3 6v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2V6l-3-4z"}),(0,r.jsx)("line",{x1:"3",y1:"6",x2:"21",y2:"6"}),(0,r.jsx)("path",{d:"M16 10a4 4 0 0 1-8 0"})]})},R=({version:e,isPro:a,onToggleSidebar:l,isSidebarOpen:n,isDesktop:c})=>(0,r.jsx)("div",{className:"rounded-tl-lg rounded-tr-lg border-0 border-b border-solid border-b-gray-100 bg-white px-5 py-5",children:(0,r.jsxs)("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-start sm:justify-between",children:[(0,r.jsxs)("div",{className:"flex min-w-0 items-center gap-3 sm:gap-4",children:[(0,r.jsx)("div",{className:"flex",children:(0,r.jsx)(_,{})}),(0,r.jsxs)("div",{className:"flex min-w-0 flex-col gap-1",children:[(0,r.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[(0,r.jsx)("h1",{className:"m-0 text-lg font-bold leading-tight text-slate-800 sm:text-xl",children:(0,s.__)("Ultimate Store Kit","ultimate-store-kit")}),e?(0,r.jsxs)("span",{className:"rounded-full bg-gray-100 px-2 py-0.5 text-[10px] font-semibold uppercase tracking-wide text-gray-500",children:["v",e]}):null]}),(0,r.jsx)("p",{className:"m-0 max-w-xl text-[13px] leading-snug text-gray-500 sm:text-sm",children:(0,s.__)("Build high-converting WooCommerce stores with Elementor widgets & presets.","ultimate-store-kit")})]})]}),(0,r.jsxs)("div",{className:"flex shrink-0 flex-wrap items-center gap-2",children:[(0,r.jsx)("button",{type:"button",onClick:e=>l?.(e),className:"inline-flex h-9 w-9 cursor-pointer items-center justify-center rounded-md border border-slate-200 bg-white text-slate-700 transition-colors hover:border-uks-brand/40 hover:text-uks-brand",style:{display:c?"none":"inline-flex"},"aria-expanded":n?"true":"false","aria-label":(0,s.__)("Open menu","ultimate-store-kit"),children:n?(0,r.jsx)(v,{className:"h-4 w-4"}):(0,r.jsx)(y,{className:"h-4 w-4"})}),(()=>{const e=(0,t.applyFilters)("usk.admin.pages",{});return a||e.license?null:(0,r.jsxs)("a",{href:"https://storekit.pro/pricing/",target:"_blank",rel:"noopener noreferrer",className:`${d} ${i}`,children:[(0,r.jsx)(C,{className:"w-4 h-4 block"}),(0,s.__)("Get Pro","ultimate-store-kit")]})})(),(()=>{const e=(0,t.applyFilters)("usk.admin.headerExtra",null);return e?(0,r.jsx)(e,{}):null})(),(0,r.jsxs)("a",{href:"https://bdthemes.com/support/",target:"_blank",rel:"noopener noreferrer",className:`${d} ${o} flex items-center gap-2 hover:border-uks-brand/40 hover:bg-white hover:text-uks-brand`,children:[(0,r.jsx)("span",{className:"flex h-4 w-4 items-center justify-center rounded-full border border-current text-inherit","aria-hidden":"true",children:(0,r.jsx)(N,{className:"w-4 h-4 block"})}),(0,s.__)("Help & Support","ultimate-store-kit")]})]})]})}),G=({name:e})=>{const s=(0,t.applyFilters)("usk.admin.iconMap",H),a=s[e]||s.info;return(0,r.jsx)(a,{})},K=(e,t,s)=>{if("pro"===e.widget_type&&!s)return!1;const r=e.dependency;return!!(!r||r.isInstalled&&r.isActive)&&(null!=t?"on"===t:"on"===e.default)},q=[{id:"currency-switcher",label:(0,s.__)("Currency Switcher","ultimate-store-kit"),description:(0,s.__)("Enable to allow currency switching on your store.","ultimate-store-kit"),icon:"currency-switcher",badge:"Pro",proPlaceholder:!0},{id:"variation-swatches",label:(0,s.__)("Variation Swatches","ultimate-store-kit"),description:(0,s.__)("Enable to display product variation swatches on your store.","ultimate-store-kit"),icon:"variation-swatches",badge:"Pro",proPlaceholder:!0},{id:"live-visitor-count",label:(0,s.__)("Live Visitor Count","ultimate-store-kit"),description:(0,s.__)("Display live visitor count on product pages to create urgency.","ultimate-store-kit"),icon:"live-visitor-count",badge:"Pro",proPlaceholder:!0},{id:"upsell-cross-sell",label:(0,s.__)("Upsell & Cross-Sell","ultimate-store-kit"),description:(0,s.__)("Display upsell and cross-sell products on product pages to increase sales.","ultimate-store-kit"),icon:"upsell-cross-sell",badge:"Pro",proPlaceholder:!0}],X=()=>(0,t.applyFilters)("usk.admin.placeholderModules",q),Z=[{id:"dashboard",group:(0,s.__)("Dashboard","ultimate-store-kit"),items:[{id:"welcome",label:(0,s.__)("Welcome","ultimate-store-kit"),icon:"home"}]},{id:"widgets",group:(0,s.__)("Widgets","ultimate-store-kit"),items:[{id:"woocommerce-widgets",label:(0,s.__)("WooCommerce","ultimate-store-kit"),icon:"woocommerce"},{id:"edd-widgets",label:(0,s.__)("EDD","ultimate-store-kit"),icon:"edd"},{id:"other-widgets",label:(0,s.__)("Others","ultimate-store-kit"),icon:"other"}]},{id:"modules",group:(0,s.__)("Modules","ultimate-store-kit"),items:[]},{id:"support",group:(0,s.__)("Support","ultimate-store-kit"),items:[{id:"get-pro",label:(0,s.__)("Get Pro","ultimate-store-kit"),icon:"star"},{id:"about",label:(0,s.__)("About & Info","ultimate-store-kit"),icon:"info"}]}],Y=e=>{const t=`${(e.id||"").toLowerCase()} ${(e.label||"").toLowerCase()}`;return t.includes("currency")?"currency-switcher":t.includes("swatch")||t.includes("variation")?"variation-swatches":t.includes("visitor")||t.includes("live")?"live-visitor-count":"grid"},J=({activePage:e,onNavigate:a,isPro:l,isOpen:i,isDesktop:o,onClose:n,settingsGroups:d=[]})=>{const c=(({isPro:e,settingsGroups:s=[]})=>{const r=(0,t.applyFilters)("usk.admin.navItems",Z),a=X(),l=a.map(e=>e.id);return r.map(t=>{if("modules"===t.id){const r=s.map(e=>({id:e.id,label:e.label,icon:Y(e)}));if(e)return{...t,items:[...r,...t.items]};const i=t.items.filter(e=>!l.includes(e.id));return{...t,items:[...r,...a,...i]}}return t})})({isPro:l,settingsGroups:d}),m=(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("nav",{className:"flex flex-col gap-6","aria-label":"Main",children:c.map(t=>(0,r.jsxs)("div",{children:[(0,r.jsx)("p",{className:"m-0 mb-3 px-2 text-xs font-semibold uppercase tracking-widest text-gray-400",children:t.group}),(0,r.jsx)("ul",{className:"m-0 list-none space-y-1 p-0",children:t.items.filter(e=>!(l&&"get-pro"===e.id)).map(t=>{const s=e===t.id;return(0,r.jsx)("li",{children:(0,r.jsxs)("button",{type:"button",onClick:()=>{a(t.id),window.location.hash=`#${t.id}`,n()},className:"flex w-full cursor-pointer items-center gap-3 rounded-lg border-0 px-3 py-3 text-left text-sm font-medium transition-colors "+(s?"bg-uks-brand text-white shadow-sm":"bg-transparent text-slate-700 hover:bg-gray-100 hover:text-slate-900"),children:[(0,r.jsx)(G,{name:t.icon}),(0,r.jsx)("span",{className:"flex-1",children:t.label}),t.badge&&(0,r.jsx)("span",{className:"shrink-0 whitespace-nowrap rounded-md border border-solid px-1.5 py-0.5 text-[9px] font-bold",style:{borderColor:s?"rgba(255,255,255,0.4)":"#e5e7eb",color:s?"#fff":"#6b7280",background:s?"rgba(255,255,255,0.18)":"transparent"},children:t.badge})]})},t.id)})})]},t.group))}),(0,r.jsxs)("div",{className:"mt-6 hidden rounded-xl bg-slate-100 p-4 lg:block lg:mt-8",children:[(0,r.jsxs)("span",{className:"mb-2.5 flex items-center gap-2 text-base font-bold text-slate-800",children:[(0,r.jsx)(M,{className:"w-5 h-5"}),(0,s.__)("Coming soon","ultimate-store-kit")]}),(0,r.jsx)("p",{className:"m-0 text-[12px] leading-relaxed text-slate-600",children:(0,s.__)("New items planned for upcoming updates:","ultimate-store-kit")}),(0,r.jsxs)("ul",{className:"mt-2.5 m-0 space-y-1.5 p-0 text-[12px] text-slate-600",children:[(0,r.jsxs)("li",{className:"flex items-start gap-2",children:[(0,r.jsx)("span",{className:"mt-1 h-1.5 w-1.5 rounded-full bg-uks-brand"}),(0,s.__)("7+ WooCommerce widgets","ultimate-store-kit")]}),(0,r.jsxs)("li",{className:"flex items-start gap-2",children:[(0,r.jsx)("span",{className:"mt-1 h-1.5 w-1.5 rounded-full bg-uks-brand"}),(0,s.__)("Template-based presets","ultimate-store-kit")]}),(0,r.jsxs)("li",{className:"flex items-start gap-2",children:[(0,r.jsx)("span",{className:"mt-1 h-1.5 w-1.5 rounded-full bg-uks-brand"}),(0,s.__)("Performance-focused improvements","ultimate-store-kit")]})]}),(0,r.jsx)("button",{onClick:()=>window.open("https://feedback.bdthemes.com/b/6vr2250l/feature-requests","_blank"),type:"button",className:"mt-3 inline-flex cursor-pointer items-center rounded-lg border border-uks-brand bg-white px-3 py-1.5 text-[12px] font-semibold text-uks-brand transition-colors hover:bg-uks-brand hover:text-white",children:(0,s.__)("See roadmap","ultimate-store-kit")})]})]});if(o)return(0,r.jsx)("div",{style:{display:"flex"},className:"w-64 shrink-0 flex-col justify-between self-stretch rounded-lg border border-solid border-gray-100 bg-white px-4 py-6 lg:sticky lg:top-[7.5rem]",children:m});const x=document.getElementById("wpadminbar")?.offsetHeight||0;return(0,r.jsxs)(r.Fragment,{children:[i&&(0,r.jsx)("div",{style:{display:"block",position:"fixed",top:x,left:0,right:0,bottom:0,zIndex:99998,backgroundColor:"rgba(0,0,0,0.3)"},onClick:n,"aria-hidden":"true"}),(0,r.jsxs)("div",{style:{position:"fixed",left:0,top:x,zIndex:99999,height:`calc(100vh - ${x}px)`,width:"86vw",maxWidth:"320px",display:"flex",flexDirection:"column",backgroundColor:"#fff",padding:"1rem",boxShadow:"4px 0 24px rgba(0,0,0,0.15)",transform:i?"translateX(0)":"translateX(-100%)",transition:"transform 300ms ease-out",pointerEvents:i?"auto":"none",overflowY:"auto"},children:[(0,r.jsxs)("div",{className:"mb-3 flex items-center justify-between",children:[(0,r.jsx)("p",{className:"m-0 text-sm font-bold text-slate-700",children:(0,s.__)("Navigation","ultimate-store-kit")}),(0,r.jsx)("button",{type:"button",onClick:n,className:"inline-flex h-8 w-8 cursor-pointer items-center justify-center rounded-md border border-slate-200 bg-white text-slate-500 hover:text-slate-700","aria-label":(0,s.__)("Close menu","ultimate-store-kit"),children:(0,r.jsx)(v,{className:"h-4 w-4"})})]}),m]})]})},Q=({title:e,data:t,color:a})=>{const l=t.total>0?Math.round(t.active/t.total*100):0;return(0,r.jsxs)("div",{className:"rounded-lg border border-solid border-gray-100 bg-white p-4",children:[(0,r.jsx)("h3",{className:"m-0 mb-3 text-[13px] font-semibold uppercase tracking-wide text-slate-500",children:e}),(0,r.jsxs)("div",{className:"flex items-center justify-between gap-3",children:[(0,r.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,r.jsxs)("div",{className:"flex gap-1.5 text-[13px] text-slate-700",children:[(0,r.jsx)("span",{className:"text-slate-400",children:(0,s.__)("Active:","ultimate-store-kit")}),(0,r.jsx)("strong",{children:t.active})]}),(0,r.jsxs)("div",{className:"flex gap-1.5 text-[13px] text-slate-700",children:[(0,r.jsx)("span",{className:"text-slate-400",children:(0,s.__)("Inactive:","ultimate-store-kit")}),(0,r.jsx)("strong",{children:t.inactive})]}),(0,r.jsxs)("div",{className:"flex gap-1.5 text-[13px] text-slate-700",children:[(0,r.jsx)("span",{className:"text-slate-400",children:(0,s.__)("Total:","ultimate-store-kit")}),(0,r.jsx)("strong",{children:t.total})]})]}),(0,r.jsx)("div",{className:"h-[60px] w-[60px] shrink-0",children:(0,r.jsxs)("svg",{viewBox:"0 0 36 36",className:"h-full w-full",children:[(0,r.jsx)("path",{d:"M18 2.0845 a 15.9155 15.9155 0 0 1 0 31.831 a 15.9155 15.9155 0 0 1 0 -31.831",fill:"none",stroke:"#e2e8f0",strokeWidth:"3"}),(0,r.jsx)("path",{d:"M18 2.0845 a 15.9155 15.9155 0 0 1 0 31.831 a 15.9155 15.9155 0 0 1 0 -31.831",fill:"none",stroke:a,strokeWidth:"3",strokeDasharray:`${l}, 100`}),(0,r.jsxs)("text",{x:"18",y:"20.5",className:"font-bold",textAnchor:"middle",fontSize:"8",fill:"#334155",children:[l,"%"]})]})})]})]})},ee=({widgets:a,settings:l,isPro:n=!1})=>{const p=(0,e.useMemo)(()=>{const e=a.ultimate_store_kit_active_modules||[],t=a.ultimate_store_kit_edd_modules||[],s=a.ultimate_store_kit_general_modules||[],r=l.ultimate_store_kit_active_modules||{},i=l.ultimate_store_kit_edd_modules||{},o=l.ultimate_store_kit_general_modules||{},d=(e,t)=>{let s=0,r=0;return e.forEach(e=>{if("checkbox"!==e.type)return;if(!n&&"pro"===e.widget_type)return void r++;const a=t[e.name];K(e,a,n)?s++:r++}),{active:s,inactive:r,total:s+r}},c=d(e,r),m=d(t,i),x=d(s,o);return{all:{active:c.active+m.active+x.active,inactive:c.inactive+m.inactive+x.inactive,total:c.total+m.total+x.total},wc:c,edd:m,other:x}},[a,l,n]);return(0,r.jsxs)("div",{children:[(0,r.jsxs)("div",{className:"mb-4 grid grid-cols-1 gap-4 sm:grid-cols-2 xl:grid-cols-4",children:[(0,r.jsx)(Q,{title:(0,s.__)("All Widgets","ultimate-store-kit"),data:p.all,color:"#f59e0b"}),(0,r.jsx)(Q,{title:(0,s.__)("WooCommerce","ultimate-store-kit"),data:p.wc,color:"#ef4444"}),(0,r.jsx)(Q,{title:(0,s.__)("EDD","ultimate-store-kit"),data:p.edd,color:"#10b981"}),(0,r.jsx)(Q,{title:(0,s.__)("Other","ultimate-store-kit"),data:p.other,color:"#3b82f6"})]}),(()=>{const e=(0,t.applyFilters)("usk.admin.welcomeExtra",null);return e?(0,r.jsx)(e,{}):null})(),(0,r.jsxs)("div",{className:"mb-4 grid grid-cols-1 gap-4 sm:grid-cols-2",children:[(0,r.jsxs)("div",{className:"rounded-lg border border-solid border-gray-100 bg-white p-5",children:[(0,r.jsx)("h3",{className:"m-0 mb-2 text-base font-bold text-slate-800",children:(0,s.__)("Support And Feedback","ultimate-store-kit")}),(0,r.jsxs)("p",{className:"my-2 text-[13px] leading-relaxed text-slate-500",children:[(0,s.__)("Feeling like to consult with an expert? Take live Chat support immediately from","ultimate-store-kit")," ",(0,r.jsx)("a",{href:"https://storekit.pro/",target:"_blank",rel:"noopener noreferrer",className:"font-semibold text-uks-brand hover:underline",children:"UltimateStoreKit"}),"."," ",(0,s.__)("We are always ready to help you 24/7.","ultimate-store-kit")]}),(0,r.jsx)("p",{className:"my-2 text-[13px] leading-relaxed text-slate-500",children:(0,r.jsx)("strong",{children:(0,s.__)("Or if you're facing technical issues with our plugin, then please create a support ticket","ultimate-store-kit")})}),(0,r.jsxs)("div",{className:"mt-3 flex flex-wrap gap-2",children:[(0,r.jsx)("a",{className:i,target:"_blank",rel:"noopener noreferrer",href:"https://bdthemes.com/knowledge-base/ultimate-store-kit/",children:(0,s.__)("Knowledge Base","ultimate-store-kit")}),(0,r.jsx)("a",{className:o,target:"_blank",rel:"noopener noreferrer",href:"https://bdthemes.com/support/",children:(0,s.__)("Get Support","ultimate-store-kit")})]})]}),(0,r.jsxs)("div",{className:"rounded-lg border border-solid border-gray-100 bg-white p-5",children:[(0,r.jsx)("h3",{className:"m-0 mb-2 text-base font-bold text-slate-800",children:(0,s.__)("System Requirement","ultimate-store-kit")}),(0,r.jsx)("p",{className:"mb-3 text-[13px] leading-relaxed text-slate-500",children:(0,s.__)("Make sure your server meets the minimum requirements for optimal performance.","ultimate-store-kit")}),(0,r.jsxs)("div",{children:[(0,r.jsxs)("div",{className:"flex items-center justify-between border-b border-slate-100 py-2 text-[13px] text-slate-700 last:border-b-0",children:[(0,r.jsx)("span",{children:(0,s.__)("PHP Version","ultimate-store-kit")}),(0,r.jsx)("span",{className:"rounded-lg bg-emerald-100 px-2.5 py-0.5 text-[11px] font-semibold text-emerald-800",children:(0,s.__)("OK","ultimate-store-kit")})]}),(0,r.jsxs)("div",{className:"flex items-center justify-between border-b border-slate-100 py-2 text-[13px] text-slate-700 last:border-b-0",children:[(0,r.jsx)("span",{children:(0,s.__)("Memory Limit","ultimate-store-kit")}),(0,r.jsx)("span",{className:"rounded-lg bg-emerald-100 px-2.5 py-0.5 text-[11px] font-semibold text-emerald-800",children:(0,s.__)("OK","ultimate-store-kit")})]}),(0,r.jsxs)("div",{className:"flex items-center justify-between border-b border-slate-100 py-2 text-[13px] text-slate-700 last:border-b-0",children:[(0,r.jsx)("span",{children:(0,s.__)("Max Execution Time","ultimate-store-kit")}),(0,r.jsx)("span",{className:"rounded-lg bg-emerald-100 px-2.5 py-0.5 text-[11px] font-semibold text-emerald-800",children:(0,s.__)("OK","ultimate-store-kit")})]})]})]})]}),(0,r.jsxs)("div",{className:"grid grid-cols-1 gap-4 sm:grid-cols-2",children:[(0,r.jsxs)("div",{className:"rounded-lg border border-solid border-gray-100 bg-white p-5",children:[(0,r.jsx)("h3",{className:"m-0 mb-2 text-base font-bold text-slate-800",children:(0,s.__)("Feedback","ultimate-store-kit")}),(0,r.jsx)("p",{className:"my-2 text-[13px] leading-relaxed text-slate-500",children:(0,s.__)("We are always looking for feedback from our users. If you have any suggestions or feedback, please let us know.","ultimate-store-kit")}),(0,r.jsx)("div",{className:"mt-3 flex flex-wrap gap-2",children:(0,r.jsx)("a",{className:o,target:"_blank",rel:"noopener noreferrer",href:"https://feedback.bdthemes.com/b/6vr2250l/feature-requests/",children:(0,s.__)("Request Feature","ultimate-store-kit")})})]}),(0,r.jsxs)("div",{className:"rounded-lg border border-solid border-gray-100 bg-white p-5",children:[(0,r.jsx)("h3",{className:"m-0 mb-2 text-base font-bold text-slate-800",children:(0,s.__)("Try Our Other Plugins","ultimate-store-kit")}),(0,r.jsx)("p",{className:"my-2 text-[13px] leading-relaxed text-slate-500",children:(0,s.__)("Element Pack, Prime Slider, Ultimate Post Kit, Pixel Gallery & Live Copy Paste addons for Elementor.","ultimate-store-kit")}),(0,r.jsxs)("div",{className:"mt-3 flex flex-wrap gap-2",children:[(0,r.jsx)("a",{className:`${d} ${c}`,target:"_blank",rel:"noopener noreferrer",href:"https://wordpress.org/plugins/bdthemes-element-pack-lite/",children:(0,s.__)("Element Pack","ultimate-store-kit")}),(0,r.jsx)("a",{className:`${d} ${m}`,target:"_blank",rel:"noopener noreferrer",href:"https://wordpress.org/plugins/bdthemes-prime-slider-lite/",children:(0,s.__)("Prime Slider","ultimate-store-kit")}),(0,r.jsx)("a",{className:`${d} ${x}`,target:"_blank",rel:"noopener noreferrer",href:"https://wordpress.org/plugins/ultimate-post-kit/",children:(0,s.__)("Ultimate Post Kit","ultimate-store-kit")}),(0,r.jsx)("a",{className:`${d} ${h}`,target:"_blank",rel:"noopener noreferrer",href:"https://wordpress.org/plugins/pixel-gallery/",children:(0,s.__)("Pixel Gallery","ultimate-store-kit")}),(0,r.jsx)("a",{className:`${d} ${u}`,target:"_blank",rel:"noopener noreferrer",href:"https://wordpress.org/plugins/zoloblocks/",children:(0,s.__)("ZoloBlocks","ultimate-store-kit")})]})]})]})]})},te=({allWidgets:t,allSettings:l,onSave:o,saving:d,isPro:c,widgetType:m="wc"})=>{const[x,h]=(0,e.useState)(""),[u,g]=(0,e.useState)("all"),[f,j]=(0,e.useState)("all"),w={wc:{title:(0,s.__)("WooCommerce Widgets","ultimate-store-kit"),key:"ultimate_store_kit_active_modules"},edd:{title:(0,s.__)("Easy Digital Downloads Widgets","ultimate-store-kit"),key:"ultimate_store_kit_edd_modules"},other:{title:(0,s.__)("Other Widgets","ultimate-store-kit"),key:"ultimate_store_kit_general_modules"}}[m],_=t[w.key]||[],[y,N]=(l[w.key],(0,e.useState)(()=>{const e={};return Object.keys(l).forEach(s=>{const r=l[s]||{};(t[s]||[]).forEach(t=>{"checkbox"===t.type&&(e[t.name]=void 0!==r[t.name]?r[t.name]:t.default||"off")})}),e}));(0,e.useEffect)(()=>{h(""),g("all"),j("all")},[m]);const M=(0,e.useMemo)(()=>{const e=new Set;return _.forEach(t=>{t.content_type&&t.content_type.split(" ").forEach(t=>{t&&"woocommerce"!==t&&"edd"!==t&&"new"!==t&&e.add(t)})}),Array.from(e)},[_]),C=(0,e.useMemo)(()=>_.filter(e=>!("checkbox"!==e.type||x&&!e.label.toLowerCase().includes(x.toLowerCase())||"free"===u&&"free"!==e.widget_type||"pro"===u&&"pro"!==e.widget_type||!("all"===f||e.content_type&&e.content_type.includes(f)))),[_,x,u,f]),P=(0,e.useCallback)(e=>{N(t=>({...t,[e]:"on"===t[e]?"off":"on"}))},[]),S=(0,e.useCallback)(()=>{N(e=>{const t={...e};return C.forEach(e=>{if("pro"===e.widget_type&&!c)return;const s=e.dependency;(!s||s.isInstalled&&s.isActive)&&(t[e.name]="on")}),t})},[C,c]),$=(0,e.useCallback)(()=>{N(e=>{const t={...e};return C.forEach(e=>{("pro"!==e.widget_type||c)&&(t[e.name]="off")}),t})},[C,c]),z=(0,e.useMemo)(()=>_.filter(e=>"checkbox"===e.type&&K(e,y[e.name],c)).length,[_,y,c]),D="h-9 min-h-9 py-0 text-[13px] leading-none",O="inline-flex h-9 min-h-9 shrink-0 cursor-pointer items-center gap-1.5 rounded-md border px-3 py-0 text-[13px] font-semibold leading-none no-underline transition-all duration-200";return(0,r.jsxs)("div",{children:[(0,r.jsxs)("div",{className:"mb-5 flex flex-wrap items-center justify-between gap-2",children:[(0,r.jsx)("h2",{className:"m-0 text-xl font-bold text-slate-800",children:w.title}),(0,r.jsxs)("span",{className:"rounded-2xl border border-slate-200 bg-white px-3 py-1 text-[13px] text-slate-500",children:[z," / ",_.filter(e=>"checkbox"===e.type).length," ",(0,s.__)("Active","ultimate-store-kit")]})]}),(0,r.jsxs)("div",{className:"mb-5 flex flex-wrap items-center justify-between gap-3 rounded-lg border border-solid border-gray-100 bg-white px-4 py-3",children:[(0,r.jsxs)("div",{className:"flex flex-wrap items-center gap-3",children:[(0,r.jsxs)("div",{className:"relative",children:[(0,r.jsx)(A,{className:"absolute right-3 top-1/2 h-4 w-4 -translate-y-1/2 block text-gray-400"}),(0,r.jsx)("input",{type:"text",className:`${D} block w-full rounded-md border border-solid border-gray-200 bg-transparent pr-10 pl-3 text-slate-700 placeholder:text-gray-500 focus:border-uks-brand focus:outline-none focus:ring-2 focus:ring-uks-brand/25 sm:w-48`,placeholder:(0,s.__)("Search widgets...","ultimate-store-kit"),value:x,onChange:e=>h(e.target.value)})]}),(0,r.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,r.jsx)("label",{className:p,children:(0,s.__)("Status:","ultimate-store-kit")}),(0,r.jsxs)("select",{className:`${b} ${D}`,value:u,onChange:e=>g(e.target.value),children:[(0,r.jsx)("option",{value:"all",children:(0,s.__)("All","ultimate-store-kit")}),(0,r.jsx)("option",{value:"free",children:(0,s.__)("Free","ultimate-store-kit")}),(0,r.jsx)("option",{value:"pro",children:(0,s.__)("Pro","ultimate-store-kit")})]})]}),M.length>0&&(0,r.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,r.jsx)("label",{className:p,children:(0,s.__)("Template:","ultimate-store-kit")}),(0,r.jsxs)("select",{className:`${b} ${D}`,value:f,onChange:e=>j(e.target.value),children:[(0,r.jsx)("option",{value:"all",children:(0,s.__)("All Templates","ultimate-store-kit")}),M.map(e=>(0,r.jsx)("option",{value:e,children:e.charAt(0).toUpperCase()+e.slice(1)},e))]})]})]}),(0,r.jsxs)("div",{className:"flex flex-wrap items-center gap-1.5",children:[(0,r.jsxs)("button",{type:"button",className:`${O} ${z>0?"!bg-uks-brand !text-white hover:!bg-uks-brand-dark border-none":"!border !border-uks-brand/25 bg-uks-brand/5 text-uks-brand hover:bg-uks-brand/10 hover:text-uks-brand-dark"} focus:outline-none focus:ring-2 focus:ring-uks-brand focus:ring-offset-2 focus:ring-offset-white`,onClick:S,children:[(0,r.jsx)(E,{className:"h-3.5 w-3.5"}),(0,s.__)("Activate All","ultimate-store-kit")]}),(0,r.jsxs)("button",{type:"button",className:`${O} ${0===z?"!bg-uks-brand !text-white hover:!bg-uks-brand-dark border-none":"!border !border-uks-brand/25 bg-uks-brand/5 text-uks-brand hover:bg-uks-brand/10 hover:text-uks-brand-dark"} focus:outline-none focus:ring-2 focus:ring-uks-brand focus:ring-offset-2 focus:ring-offset-white`,onClick:$,children:[(0,r.jsx)(v,{className:"h-3.5 w-3.5"}),(0,s.__)("Deactivate All","ultimate-store-kit")]})]})]}),(0,r.jsxs)("div",{className:"grid grid-cols-1 gap-3 rounded-lg border border-solid border-gray-100 bg-white p-5 sm:grid-cols-2 lg:grid-cols-3 2xl:grid-cols-4",children:[0===C.length&&(0,r.jsx)("div",{className:"col-span-full py-10 text-center text-sm text-slate-400",children:(0,s.__)("No widgets found.","ultimate-store-kit")}),C.map(e=>{const t="pro"===e.widget_type,l=e.dependency||null,i=l&&(!l.isInstalled||!l.isActive),o=t&&!c||i,n=K(e,y[e.name],c);return(0,r.jsxs)("div",{className:`flex flex-col justify-between gap-3 rounded-lg border border-solid border-gray-200 p-4 ${n?"border-emerald-300":""} ${o?"opacity-60 cursor-not-allowed bg-slate-100":""}`,children:[(0,r.jsxs)("div",{className:"flex items-start justify-between gap-2",children:[(0,r.jsx)("span",{className:"text-base font-semibold leading-snug text-slate-800",children:e.label}),t&&(0,r.jsx)("span",{className:k,children:(0,s.__)("Pro","ultimate-store-kit")})]}),(0,r.jsxs)("div",{className:"flex items-center justify-between",children:[(0,r.jsxs)("div",{className:"flex gap-2 items-center",children:[l?.actionUrl&&(0,r.jsxs)("a",{href:l.actionUrl,target:"install"===l.actionType?"_blank":void 0,rel:"install"===l.actionType?"noopener noreferrer":void 0,title:l.message||l.actionLabel,className:"text-gray-400 transition-colors hover:text-uks-brand flex items-center gap-1 decoration-none",style:{textDecoration:"none"},children:[(0,r.jsx)(F,{className:"w-4 h-4 block"}),(0,s.__)("Install","ultimate-store-kit")]}),e.demo_url&&!e.demo_url.startsWith("#")&&(0,r.jsxs)("a",{href:e.demo_url,target:"_blank",rel:"noopener noreferrer",title:(0,s.__)("Demo","ultimate-store-kit"),className:"text-gray-400 transition-colors hover:text-uks-brand flex items-center gap-1 decoration-none",style:{textDecoration:"none"},children:[(0,r.jsx)(B,{className:"w-4 h-4 block"}),(0,s.__)("Demo","ultimate-store-kit")]}),e.video_url&&(0,r.jsxs)("a",{href:e.video_url,target:"_blank",rel:"noopener noreferrer",title:(0,s.__)("Video","ultimate-store-kit"),className:"text-gray-400 transition-colors hover:text-uks-brand flex items-center gap-1 decoration-none",style:{textDecoration:"none"},children:[(0,r.jsx)(L,{className:"w-4 h-4 block"}),(0,s.__)("Video","ultimate-store-kit")]})]}),(0,r.jsx)(a,{checked:n,disabled:o,onChange:()=>P(e.name)})]}),i&&l?.actionUrl&&(0,r.jsxs)("div",{className:"text-[13px] leading-relaxed text-slate-500",children:[l.message," ",(0,r.jsx)("a",{href:l.actionUrl,className:"font-semibold text-uks-brand hover:underline",target:"install"===l.actionType?"_blank":void 0,rel:"install"===l.actionType?"noopener noreferrer":void 0,children:l.actionLabel})]})]},e.name)})]}),(0,r.jsx)("div",{className:"mt-6 flex justify-end pt-4",children:(0,r.jsx)("button",{type:"button",className:`${n} ${i}`,onClick:()=>{const e={};_.forEach(t=>{"checkbox"===t.type&&void 0!==y[t.name]&&(e[t.name]=y[t.name])}),o(w.key,e)},disabled:d,children:d?(0,s.__)("Saving...","ultimate-store-kit"):(0,s.__)("Save Changes","ultimate-store-kit")})})]})},se=[{group:(0,s.__)("Sales Notifications","ultimate-store-kit"),description:(0,s.__)("Configure flash sale banners, countdown timers, and promotional badges for your store.","ultimate-store-kit"),fields:[{name:"enable_flash_sale",type:"checkbox",label:(0,s.__)("Enable Flash Sale Banner","ultimate-store-kit"),description:(0,s.__)("Display a site-wide flash sale banner on product pages.","ultimate-store-kit")},{name:"flash_sale_text",type:"text",label:(0,s.__)("Flash Sale Text","ultimate-store-kit"),placeholder:(0,s.__)("🔥 Flash Sale — Up to 50% OFF!","ultimate-store-kit")},{name:"sale_badge_style",type:"select",label:(0,s.__)("Sale Badge Style","ultimate-store-kit"),options:{default:(0,s.__)("Default","ultimate-store-kit"),ribbon:(0,s.__)("Ribbon","ultimate-store-kit"),circle:(0,s.__)("Circle","ultimate-store-kit"),starburst:(0,s.__)("Starburst","ultimate-store-kit")}},{name:"sale_badge_color",type:"color",label:(0,s.__)("Sale Badge Color","ultimate-store-kit"),value:"#ef4444"},{name:"enable_countdown_timer",type:"checkbox",label:(0,s.__)("Enable Sale Countdown Timer","ultimate-store-kit"),description:(0,s.__)("Show a countdown timer on products that have a sale end date.","ultimate-store-kit")},{name:"countdown_position",type:"select",label:(0,s.__)("Countdown Position","ultimate-store-kit"),options:{above_price:(0,s.__)("Above Price","ultimate-store-kit"),below_price:(0,s.__)("Below Price","ultimate-store-kit"),above_button:(0,s.__)("Above Add to Cart","ultimate-store-kit")}},{name:"minimum_discount_percent",type:"number",label:(0,s.__)("Minimum Discount % to Show Badge","ultimate-store-kit"),value:"5",description:(0,s.__)("Only show the sale badge when the discount is at least this percentage.","ultimate-store-kit")}]}],re=()=>(0,r.jsxs)("div",{className:"pointer-events-none relative select-none opacity-70",children:[(0,r.jsxs)("div",{className:"pointer-events-auto mb-4 flex items-center justify-between rounded-usk border border-uks-brand bg-[linear-gradient(313deg,#E62A3F_0%,#00216A_100%)] px-5 py-3.5",children:[(0,r.jsxs)("div",{className:"flex items-center gap-2.5",children:[(0,r.jsx)("span",{className:"rounded-[10px] bg-[linear-gradient(313deg,#E62A3F_0%,#00216A_100%)] px-2.5 py-1 text-[10px] font-bold uppercase tracking-wide text-white",children:(0,s.__)("Pro","ultimate-store-kit")}),(0,r.jsx)("span",{className:"text-sm font-semibold text-white/90",children:(0,s.__)("Unlock these premium settings with Ultimate Store Kit Pro","ultimate-store-kit")})]}),(0,r.jsx)("a",{href:"https://bdthemes.com/ultimate-store-kit/",target:"_blank",rel:"noopener noreferrer",className:`${d} ${i}`,children:(0,s.__)("Get Pro","ultimate-store-kit")})]}),se.map((e,t)=>(0,r.jsx)("div",{className:"relative mb-4 overflow-hidden rounded-usk border border-slate-200 bg-white",children:(0,r.jsxs)("div",{className:"border-l-[3px] border-uks-brand",children:[(0,r.jsxs)("h3",{className:"m-0 flex flex-wrap items-center gap-2 border-b border-slate-200 bg-slate-100 px-5 py-3.5 text-sm font-bold text-slate-800",children:[e.group,(0,r.jsx)("span",{className:k,children:(0,s.__)("Pro","ultimate-store-kit")})]}),e.description&&(0,r.jsx)("p",{className:"m-0 px-5 pt-1 text-[13px] leading-relaxed text-slate-400",children:e.description}),(0,r.jsx)("div",{className:"px-5 py-2 opacity-60",children:e.fields.map(e=>{if("checkbox"===e.type)return(0,r.jsxs)("div",{className:`${g} flex-wrap`,children:[(0,r.jsx)("div",{className:f,children:(0,r.jsx)("span",{children:e.label})}),(0,r.jsx)("div",{className:"h-[22px] w-10 rounded-full bg-slate-200"}),e.description&&(0,r.jsx)("p",{className:"mt-1 w-full text-xs leading-snug text-slate-400",children:e.description})]},e.name);if("select"===e.type){const t=Object.keys(e.options)[0];return(0,r.jsxs)("div",{className:g,children:[(0,r.jsx)("label",{className:f,children:e.label}),(0,r.jsx)("select",{className:`${j} cursor-not-allowed opacity-60`,disabled:!0,defaultValue:t,children:Object.entries(e.options).map(([e,t])=>(0,r.jsx)("option",{value:e,children:t},e))})]},e.name)}return"color"===e.type?(0,r.jsxs)("div",{className:g,children:[(0,r.jsx)("label",{className:f,children:e.label}),(0,r.jsx)("input",{type:"color",disabled:!0,value:e.value||"#000000",readOnly:!0,className:"h-8 w-12 cursor-not-allowed rounded-md border border-slate-200 p-0.5 opacity-60"})]},e.name):"number"===e.type||"text"===e.type?(0,r.jsxs)("div",{className:g,children:[(0,r.jsx)("label",{className:f,children:e.label}),(0,r.jsx)("input",{type:e.type,className:`${j} cursor-not-allowed opacity-60`,disabled:!0,placeholder:e.placeholder||"",defaultValue:e.value||"",readOnly:!0}),e.description&&(0,r.jsx)("p",{className:"mt-1 w-full text-xs leading-snug text-slate-400",children:e.description})]},e.name):null})})]})},t))]}),ae=({widgets:l,section:o,settings:d,onSave:c,saving:m,isPro:x,activeGroup:h})=>{const[u,p]=(0,e.useState)(()=>{const e={};return l.forEach(t=>{"start_group"!==t.type&&"end_group"!==t.type&&("checkbox"===t.type?e[t.name]=void 0!==d[t.name]?d[t.name]:t.default||"off":"select"!==t.type&&"number"!==t.type&&"text"!==t.type||(e[t.name]=void 0!==d[t.name]?d[t.name]:t.default||""))}),e}),b=(e,t)=>{p(s=>({...s,[e]:t}))},g=(()=>{const e=[];let t=null;return l.forEach(r=>{"start_group"!==r.type?"end_group"!==r.type?t?t.items.push(r):(e.length&&void 0!==e[e.length-1].items||e.push({label:(0,s.__)("General","ultimate-store-kit"),items:[]}),e[e.length-1].items.push(r)):t&&(e.push(t),t=null):t={label:r.label,items:[]}}),e})(),w=h?g.filter(e=>e.label===h):g;return(0,r.jsxs)("div",{children:[(0,r.jsxs)("div",{className:"grid grid-cols-[repeat(auto-fit,minmax(420px,1fr))] items-start gap-4",children:[w.map((e,t)=>(0,r.jsxs)("div",{className:"w-full overflow-hidden rounded-usk border border-solid border-gray-100 bg-white",children:[(0,r.jsx)("h3",{className:"m-0 border-0 border-b border-solid border-b-gray-200 px-5 py-3.5 text-sm font-bold uppercase tracking-wide text-slate-700",children:e.label}),(0,r.jsx)("div",{className:"space-y-5 p-5",children:e.items.map(e=>{const t="pro"===e.widget_type,l=e.dependency||null,i=l&&(!l.isInstalled||!l.isActive),o=t&&!x||i;if("checkbox"===e.type){const n=!o&&"on"===u[e.name];return(0,r.jsxs)("div",{className:"rounded-lg border border-slate-200 bg-white",children:[(0,r.jsxs)("div",{className:"flex items-center justify-between gap-3",children:[(0,r.jsxs)("div",{className:`${f} max-w-[70%] flex-wrap`,children:[(0,r.jsxs)("span",{children:[e.label,i&&l?.actionUrl?(0,r.jsxs)(r.Fragment,{children:[" ",(0,r.jsx)("a",{href:l.actionUrl,target:"install"===l.actionType?"_blank":void 0,rel:"install"===l.actionType?"noopener noreferrer":void 0,className:"font-semibold text-uks-brand hover:underline",children:l.actionLabel})]}):null]}),t&&(0,r.jsx)("span",{className:k,children:(0,s.__)("Pro","ultimate-store-kit")})]}),(0,r.jsx)(a,{checked:n,disabled:o,onChange:()=>b(e.name,n?"off":"on")})]}),i&&l?.message&&(0,r.jsx)("div",{className:"mt-2 text-[13px] leading-relaxed text-slate-500",children:l.message})]},e.name)}return"select"===e.type?(0,r.jsxs)("div",{className:"rounded-lg border border-slate-200 bg-white",children:[(0,r.jsxs)("label",{className:f,children:[e.label,t&&(0,r.jsx)("span",{className:`${k} ml-2 align-middle`,children:(0,s.__)("Pro","ultimate-store-kit")})]}),(0,r.jsx)("select",{className:`${j} mt-2 block w-full`,value:u[e.name]||"",onChange:t=>b(e.name,t.target.value),disabled:o,children:e.options&&Object.entries(e.options).map(([e,t])=>(0,r.jsx)("option",{value:e,children:t},e))})]},e.name):"number"===e.type||"text"===e.type?(0,r.jsxs)("div",{className:"rounded-lg border border-slate-200 bg-white",children:[(0,r.jsxs)("label",{className:f,children:[e.label,t&&(0,r.jsx)("span",{className:`${k} ml-2 align-middle`,children:(0,s.__)("Pro","ultimate-store-kit")})]}),(0,r.jsx)("input",{type:e.type,className:`${j} mt-2 block w-full`,value:u[e.name]||"",onChange:t=>b(e.name,t.target.value),disabled:o})]},e.name):null})})]},t)),!x&&!h&&(0,r.jsx)(re,{}),(()=>{const e=(0,t.applyFilters)("usk.admin.settingsExtra",null);return e?(0,r.jsx)(e,{activeGroup:h}):null})()]}),(0,r.jsx)("div",{className:"mt-6 flex justify-end pt-4",children:(0,r.jsx)("button",{type:"button",className:`${n} ${i}`,onClick:()=>{c(o,u)},disabled:m,children:m?(0,s.__)("Saving...","ultimate-store-kit"):(0,s.__)("Save Changes","ultimate-store-kit")})})]})},le=[{label:(0,s.__)("Core Widgets","ultimate-store-kit"),free:!0,pro:!0,freeNote:"35+",proNote:"100+"},{label:(0,s.__)("Theme Compatibility","ultimate-store-kit"),free:!0,pro:!0},{label:(0,s.__)("Dynamic Content & Custom Fields","ultimate-store-kit"),free:!0,pro:!0},{label:(0,s.__)("Proper Documentation","ultimate-store-kit"),free:!0,pro:!0},{label:(0,s.__)("Updates & Support","ultimate-store-kit"),free:!0,pro:!0},{label:(0,s.__)("Ready Made Blocks","ultimate-store-kit"),free:!0,pro:!0},{label:(0,s.__)("Ready Made Pages","ultimate-store-kit"),free:!0,pro:!0},{label:(0,s.__)("Rooten Theme Pro Features","ultimate-store-kit"),free:!1,pro:!0},{label:(0,s.__)("Priority Support","ultimate-store-kit"),free:!1,pro:!0}],ie=({d:e,viewBox:t="0 0 24 24",filled:s=!1})=>(0,r.jsx)("svg",{className:"h-4 w-4 shrink-0 text-uks-brand",viewBox:t,fill:s?"currentColor":"none",stroke:s?"none":"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:Array.isArray(e)?e.map((e,t)=>(0,r.jsx)("path",{d:e},t)):(0,r.jsx)("path",{d:e})}),oe=[{text:(0,s.__)("Incredibly Advanced","ultimate-store-kit"),icon:(0,r.jsx)(ie,{d:"M13 2 3 14h9l-1 8 10-12h-9l1-8z"})},{text:(0,s.__)("Refund or Cancel Anytime","ultimate-store-kit"),icon:(0,r.jsx)(ie,{d:["M9 14 4 9l5-5","M4 9h10.5a5.5 5.5 0 0 1 0 11H11"]})},{text:(0,s.__)("Dynamic Content","ultimate-store-kit"),icon:(0,r.jsx)(ie,{d:["M14.5 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7.5L14.5 2z","M14 2v6h6","M8 13h8","M8 17h4"]})},{text:(0,s.__)("Super-Flexible Widgets","ultimate-store-kit"),icon:(0,r.jsx)(ie,{d:["M21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16z"]})},{text:(0,s.__)("24/7 Premium Support","ultimate-store-kit"),icon:(0,r.jsx)(ie,{d:["M21 11.5a8.38 8.38 0 0 1-.9 3.8 8.5 8.5 0 0 1-7.6 4.7 8.38 8.38 0 0 1-3.8-.9L3 21l1.9-5.7a8.38 8.38 0 0 1-.9-3.8 8.5 8.5 0 0 1 4.7-7.6 8.38 8.38 0 0 1 3.8-.9h.5a8.48 8.48 0 0 1 8 8v.5z"]})},{text:(0,s.__)("Third Party Plugins","ultimate-store-kit"),icon:(0,r.jsx)(ie,{d:["M6.3 20.3a2.4 2.4 0 0 0 3.4 0L12 18l-6-6-2.3 2.3a2.4 2.4 0 0 0 0 3.4z","m2 22 3-3","M7.5 13.5 10 11","M10.5 16.5 13 14","m18 3-4 4h6l-4 4"]})},{text:(0,s.__)("Special Discount!","ultimate-store-kit"),icon:(0,r.jsx)(ie,{d:["M9 5H2v7l6.29 6.29c.94.94 2.48.94 3.42 0l3.58-3.58c.94-.94.94-2.48 0-3.42L9 5z","M6 9.01V9"]})},{text:(0,s.__)("Custom Field Integration","ultimate-store-kit"),icon:(0,r.jsx)(ie,{d:["M12 20h9","M16.5 3.5a2.121 2.121 0 0 1 3 3L7 19l-4 1 1-4L16.5 3.5z"]})},{text:(0,s.__)("With Live Chat Support","ultimate-store-kit"),icon:(0,r.jsx)(ie,{d:["M8 12h.01","M12 12h.01","M16 12h.01","M21 12c0 4.418-4.03 8-9 8a9.863 9.863 0 0 1-4.255-.949L3 20l1.395-3.72C3.512 15.042 3 13.574 3 12c0-4.418 4.03-8 9-8s9 3.582 9 8z"]})},{text:(0,s.__)("Trusted Payment Methods","ultimate-store-kit"),icon:(0,r.jsx)(ie,{d:["M12 22s8-4 8-10V5l-8-3-8 3v7c0 6 8 10 8 10z"]})},{text:(0,s.__)("Interactive Effects","ultimate-store-kit"),icon:(0,r.jsx)(ie,{d:["M12 2v4","m16.2 7.8 2.9-2.9","M18 12h4","m16.2 16.2 2.9 2.9","M12 18v4","m4.9 19.1 2.9-2.9","M2 12h4","m4.9 4.9 2.9 2.9"]})},{text:(0,s.__)("Video Tutorial","ultimate-store-kit"),icon:(0,r.jsx)(ie,{d:["M22.54 6.42a2.78 2.78 0 0 0-1.95-1.96C18.88 4 12 4 12 4s-6.88 0-8.59.46a2.78 2.78 0 0 0-1.95 1.96A29 29 0 0 0 1 12a29 29 0 0 0 .46 5.58A2.78 2.78 0 0 0 3.41 19.6C5.12 20 12 20 12 20s6.88 0 8.59-.46a2.78 2.78 0 0 0 1.95-1.95A29 29 0 0 0 23 12a29 29 0 0 0-.46-5.58z","M9.75 15.02 15.5 12l-5.75-3.02v6.04z"]})}],ne=({isPro:e})=>e?(0,r.jsxs)("div",{className:"rounded-usk border border-slate-200 bg-white p-6 text-center sm:p-10",children:[(0,r.jsx)("div",{className:"mx-auto mb-4 flex h-14 w-14 items-center justify-center rounded-full bg-emerald-100",children:(0,r.jsx)(E,{className:"h-7 w-7 text-emerald-600"})}),(0,r.jsx)("h2",{className:"m-0 mb-2 text-xl font-bold text-slate-800",children:(0,s.__)("You already have Pro!","ultimate-store-kit")}),(0,r.jsx)("p",{className:"m-0 text-sm text-slate-500",children:(0,s.__)("Thank you for being a Pro user. You have access to all features.","ultimate-store-kit")})]}):(0,r.jsxs)("div",{className:"space-y-5",children:[(0,r.jsxs)("div",{className:"overflow-hidden rounded-usk border border-solid border-gray-100 bg-white",children:[(0,r.jsxs)("div",{className:"flex border-b border-gray-100",children:[(0,r.jsx)("div",{className:"flex flex-[2] items-center px-3 py-3 sm:px-5 sm:py-3.5",children:(0,r.jsx)("span",{className:"text-[10px] font-semibold uppercase tracking-wider text-slate-400 sm:text-[11px]",children:(0,s.__)("Features","ultimate-store-kit")})}),(0,r.jsx)("div",{className:"flex w-20 items-center justify-center border-l border-gray-100 bg-slate-50 py-3 sm:w-28 sm:py-3.5 lg:w-36",children:(0,r.jsx)("span",{className:"text-[11px] font-bold text-slate-500 sm:text-[12px]",children:(0,s.__)("Free","ultimate-store-kit")})}),(0,r.jsx)("div",{className:"flex w-20 items-center justify-center border-l border-uks-brand/30 bg-uks-brand py-3 sm:w-28 sm:py-3.5 lg:w-36",children:(0,r.jsxs)("span",{className:"inline-flex items-center gap-1 text-[11px] font-bold text-white sm:gap-1.5 sm:text-[12px]",children:[(0,r.jsx)(P,{className:"h-3 w-3"}),(0,s.__)("Pro","ultimate-store-kit")]})})]}),le.map((e,t)=>(0,r.jsxs)("div",{className:"flex items-center border-b border-gray-50 last:border-b-0 "+(t%2==1?"bg-slate-50/50":"bg-white"),children:[(0,r.jsxs)("div",{className:"flex min-w-0 flex-[2] items-center gap-2 px-3 py-3 sm:px-5 sm:py-3.5",children:[(0,r.jsx)("span",{className:"text-[12px] font-medium text-slate-700 sm:text-[13px]",children:e.label}),e.freeNote&&e.proNote&&(0,r.jsxs)("span",{className:"hidden shrink-0 rounded-full border border-slate-100 bg-white px-2 py-0.5 text-[10px] font-semibold text-slate-400 sm:inline-block",children:[e.freeNote," → ",e.proNote]})]}),(0,r.jsx)("div",{className:"flex w-20 shrink-0 items-center justify-center border-l py-3 sm:w-28 sm:py-3.5 lg:w-36 "+(t%2==1?"border-gray-100 bg-slate-50/50":"border-gray-50 bg-white"),children:e.free?(0,r.jsx)(E,{className:"mx-auto h-[18px] w-[18px] text-uks-brand"}):(0,r.jsx)(v,{className:"mx-auto h-[18px] w-[18px] text-slate-300"})}),(0,r.jsx)("div",{className:"flex w-20 shrink-0 items-center justify-center border-l border-uks-brand/20 bg-uks-brand/[0.07] py-3 sm:w-28 sm:py-3.5 lg:w-36",children:e.pro?(0,r.jsx)(E,{className:"mx-auto h-[18px] w-[18px] text-uks-brand"}):(0,r.jsx)(v,{className:"mx-auto h-[18px] w-[18px] text-slate-300"})})]},t))]}),(0,r.jsxs)("div",{className:"overflow-hidden rounded-usk border border-solid border-gray-100 bg-white",children:[(0,r.jsxs)("div",{className:"p-4 sm:p-5 lg:p-6",children:[(0,r.jsx)("p",{className:"m-0 mb-3 text-[11px] font-semibold uppercase tracking-wider text-slate-400 sm:mb-4",children:(0,s.__)("What's included with Pro","ultimate-store-kit")}),(0,r.jsx)("div",{className:"grid grid-cols-1 gap-2 xs:grid-cols-2 sm:grid-cols-3 lg:grid-cols-4",children:oe.map((e,t)=>(0,r.jsxs)("div",{className:"flex items-center gap-2 rounded-lg border border-slate-100 bg-slate-50/70 px-3 py-2.5 sm:gap-2.5",children:[(0,r.jsx)("span",{className:"shrink-0","aria-hidden":"true",children:e.icon}),(0,r.jsx)("span",{className:"text-[12px] font-medium leading-snug text-slate-600",children:e.text})]},t))})]}),(0,r.jsxs)("div",{className:"flex flex-col items-center gap-3 border-t border-uks-brand/15 bg-gradient-to-br from-uks-brand/[0.07] to-transparent px-4 py-5 text-center sm:px-6 sm:py-6",children:[(0,r.jsx)("p",{className:"m-0 text-[13px] font-semibold text-slate-700",children:(0,s.__)("Ready to unlock all Pro features?","ultimate-store-kit")}),(0,r.jsxs)("a",{href:"https://storekit.pro/pricing",target:"_blank",rel:"noopener noreferrer",className:`${n} ${i} gap-2`,children:[(0,r.jsx)(P,{className:"h-4 w-4"}),(0,s.__)("Upgrade to Pro — View Pricing","ultimate-store-kit")]}),(0,r.jsxs)("div",{className:"flex flex-wrap items-center justify-center gap-x-4 gap-y-1.5 text-[11px] text-slate-400",children:[(0,r.jsxs)("span",{className:"flex items-center gap-1",children:[(0,r.jsx)(E,{className:"h-3.5 w-3.5 text-emerald-500"}),(0,s.__)("30-day money-back","ultimate-store-kit")]}),(0,r.jsxs)("span",{className:"flex items-center gap-1",children:[(0,r.jsx)(E,{className:"h-3.5 w-3.5 text-emerald-500"}),(0,s.__)("Cancel anytime","ultimate-store-kit")]}),(0,r.jsxs)("span",{className:"flex items-center gap-1",children:[(0,r.jsx)(E,{className:"h-3.5 w-3.5 text-emerald-500"}),(0,s.__)("Instant access","ultimate-store-kit")]})]})]})]})]}),de=window.ultimateStoreKitAdminData||{},ce="font-semibold text-uks-brand no-underline transition hover:underline",me=({icon:e,label:t,children:s})=>(0,r.jsxs)("div",{className:"group flex items-center gap-4 rounded-lg border border-solid border-gray-200 bg-white p-4",children:[(0,r.jsx)("div",{className:"flex h-11 w-11 shrink-0 items-center justify-center rounded-lg bg-uks-brand/10 text-uks-brand transition group-hover:bg-uks-brand/15","aria-hidden":"true",children:e}),(0,r.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,r.jsx)("h3",{className:"m-0 mb-1 text-[11px] font-semibold uppercase tracking-wider text-slate-400",children:t}),(0,r.jsx)("div",{className:"text-sm font-semibold text-slate-800",children:s})]})]}),xe=({icon:e,title:t,desc:s,href:a})=>(0,r.jsxs)("a",{href:a,target:"_blank",rel:"noopener noreferrer",className:"group flex items-center gap-4 rounded-lg border border-solid border-gray-200 bg-white p-4 text-inherit no-underline transition hover:border-uks-brand/25",children:[(0,r.jsx)("div",{className:"flex h-11 w-11 shrink-0 items-center justify-center rounded-lg bg-uks-brand/10 text-uks-brand transition group-hover:bg-uks-brand/15","aria-hidden":"true",children:e}),(0,r.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,r.jsx)("div",{className:"text-sm font-semibold text-slate-800",children:t}),(0,r.jsx)("p",{className:"m-0 mt-0.5 text-[12px] leading-snug text-slate-500",children:s})]})]}),he=()=>{const e=Boolean(de.isPro),t=de.version||"";return(0,r.jsxs)("div",{className:"space-y-6",children:[(0,r.jsxs)("div",{className:"overflow-hidden rounded-usk border border-slate-200 bg-white",children:[(0,r.jsx)("div",{className:"bg-white p-4 sm:p-5 border border-solid border-gray-100",children:(0,r.jsxs)("div",{className:"flex max-w-3xl flex-col items-start gap-4 text-left sm:flex-row",children:[(0,r.jsx)("div",{className:"",children:(0,r.jsx)(_,{className:"w-12 h-12 block"})}),(0,r.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,r.jsxs)("div",{className:"mb-2 flex flex-wrap items-center justify-start gap-2",children:[(0,r.jsx)("h3",{className:"m-0 text-[22px] font-extrabold leading-none text-slate-900",children:(0,s.__)("Ultimate Store Kit","ultimate-store-kit")}),(0,r.jsxs)("span",{className:"inline-flex items-center rounded-full bg-uks-brand px-2.5 py-0.5 text-xs font-semibold text-white",children:["v",t]}),(0,r.jsx)("span",{className:"inline-flex items-center rounded-full px-2.5 py-0.5 text-xs font-semibold "+(e?"bg-emerald-100 text-emerald-800":"bg-slate-200 text-slate-700"),children:e?(0,s.__)("Pro","ultimate-store-kit"):(0,s.__)("Free","ultimate-store-kit")})]}),(0,r.jsx)("p",{className:"mb-4 text-[13px] leading-relaxed text-slate-600",children:(0,s.__)("Build online stores in WordPress with the powerful store builder addon for Elementor. Enjoy a wide range of customizations and easily build product grids, carousels, single product/page elements, checkouts and more.","ultimate-store-kit")}),(0,r.jsxs)("ul",{className:"m-0 flex list-none flex-wrap justify-start gap-3 p-0",children:[(0,r.jsx)("li",{className:"rounded-full py-1 px-2 border border-solid border-slate-200 bg-white/80 text-xs font-medium text-slate-600",children:(0,s.__)("Elementor widgets","ultimate-store-kit")}),(0,r.jsx)("li",{className:"rounded-full py-1 px-2 border border-solid border-slate-200 bg-white/80 text-xs font-medium text-slate-600",children:(0,s.__)("WooCommerce ready","ultimate-store-kit")}),(0,r.jsx)("li",{className:"rounded-full py-1 px-2 border border-solid border-slate-200 bg-white/80 text-xs font-medium text-slate-600",children:(0,s.__)("Store-focused UI","ultimate-store-kit")})]})]})]})}),(0,r.jsxs)("div",{className:"grid grid-cols-1 gap-px border-t border-slate-200 sm:grid-cols-3",children:[(0,r.jsxs)("div",{className:"bg-gray-100 px-4 py-3 text-center sm:text-left",children:[(0,r.jsx)("p",{className:"m-0 mb-0.5 text-[11px] font-semibold uppercase tracking-wide text-slate-400",children:(0,s.__)("Current version","ultimate-store-kit")}),(0,r.jsxs)("p",{className:"m-0 text-sm font-bold text-slate-800",children:["v",t]})]}),(0,r.jsxs)("div",{className:"bg-gray-100 px-4 py-3 text-center sm:text-left",children:[(0,r.jsx)("p",{className:"m-0 mb-0.5 text-[11px] font-semibold uppercase tracking-wide text-slate-400",children:(0,s.__)("License","ultimate-store-kit")}),(0,r.jsx)("p",{className:"m-0 text-sm font-bold text-slate-800",children:e?(0,s.__)("Pro (active)","ultimate-store-kit"):(0,s.__)("Free","ultimate-store-kit")})]}),(0,r.jsxs)("div",{className:"bg-gray-100 px-4 py-3 text-center sm:text-left",children:[(0,r.jsx)("p",{className:"m-0 mb-0.5 text-[11px] font-semibold uppercase tracking-wide text-slate-400",children:(0,s.__)("Built for","ultimate-store-kit")}),(0,r.jsx)("p",{className:"m-0 text-sm font-bold text-slate-800",children:(0,s.__)("WordPress + WooCommerce","ultimate-store-kit")})]})]})]}),(0,r.jsxs)("div",{className:"rounded-usk border border-solid border-gray-100 bg-white p-4 sm:p-5",children:[(0,r.jsx)("h3",{className:"m-0 mb-3 text-base font-bold text-slate-800",children:(0,s.__)("Product & support","ultimate-store-kit")}),(0,r.jsxs)("div",{className:"grid grid-cols-1 gap-3 sm:grid-cols-2 2xl:grid-cols-4",children:[(0,r.jsx)(me,{label:(0,s.__)("Author","ultimate-store-kit"),icon:(0,r.jsx)(D,{}),children:(0,r.jsx)("a",{href:"https://bdthemes.com/",target:"_blank",rel:"noopener noreferrer",className:ce,children:"BdThemes"})}),(0,r.jsx)(me,{label:(0,s.__)("Website","ultimate-store-kit"),icon:(0,r.jsx)(O,{}),children:(0,r.jsx)("a",{href:"https://storekit.pro/",target:"_blank",rel:"noopener noreferrer",className:ce,children:"storekit.pro"})}),(0,r.jsx)(me,{label:(0,s.__)("Documentation","ultimate-store-kit"),icon:(0,r.jsx)(T,{}),children:(0,r.jsx)("a",{href:"https://bdthemes.com/knowledge-base/ultimate-store-kit/",target:"_blank",rel:"noopener noreferrer",className:ce,children:(0,s.__)("Knowledge Base","ultimate-store-kit")})}),(0,r.jsx)(me,{label:(0,s.__)("Support","ultimate-store-kit"),icon:(0,r.jsx)(W,{}),children:(0,r.jsx)("a",{href:"https://bdthemes.com/support/",target:"_blank",rel:"noopener noreferrer",className:ce,children:(0,s.__)("Get Support","ultimate-store-kit")})})]})]}),(0,r.jsxs)("div",{className:"rounded-usk border border-solid border-gray-100 bg-white p-4 sm:p-5",children:[(0,r.jsx)("h3",{className:"m-0 mb-3 text-base font-bold text-slate-800",children:(0,s.__)("Useful links","ultimate-store-kit")}),(0,r.jsx)("ul",{className:"m-0 grid list-none grid-cols-1 gap-3 p-0 sm:grid-cols-2 2xl:grid-cols-4",children:[["https://www.youtube.com/c/bdthemes",(0,s.__)("Video tutorials","ultimate-store-kit"),(0,s.__)("Step-by-step YouTube tutorials for setup, widgets, and customization.","ultimate-store-kit"),(0,r.jsx)(U,{})],["https://feedback.bdthemes.com/b/6vr2250l/feature-requests/",(0,s.__)("Request a feature","ultimate-store-kit"),(0,s.__)("Share ideas and vote on what we build next.","ultimate-store-kit"),(0,r.jsx)(V,{})],["https://wordpress.org/plugins/ultimate-store-kit/",(0,s.__)("Rate us on WordPress.org","ultimate-store-kit"),(0,s.__)("Help others discover the plugin with a review.","ultimate-store-kit"),(0,r.jsx)(C,{className:"h-5 w-5"})],["https://www.facebook.com/groups/358290584725185",(0,s.__)("Facebook community","ultimate-store-kit"),(0,s.__)("Join our Facebook community to connect with other users and the team.","ultimate-store-kit"),(0,r.jsx)(I,{})]].map(([e,t,s,a])=>(0,r.jsx)("li",{children:(0,r.jsx)(xe,{href:e,title:t,desc:s,icon:a})},e))})]})]})},ue=()=>(0,r.jsxs)("div",{className:"relative inline-flex shrink-0 cursor-not-allowed select-none",style:{width:40,height:22},role:"presentation","aria-hidden":"true",title:(0,s.__)("Requires Pro license","ultimate-store-kit"),children:[(0,r.jsx)("span",{style:{position:"absolute",inset:0,borderRadius:9999,background:"#cbd5e1",border:"1px solid #94a3b8",boxSizing:"border-box"}}),(0,r.jsx)("span",{style:{position:"absolute",top:"50%",left:3,width:16,height:16,marginTop:-8,borderRadius:9999,background:"#ffffff",boxShadow:"0 1px 4px rgba(0,0,0,0.22)"}})]}),pe=({module:e})=>{const t=e?.label||e?.id||"",a=e?.description||"",l=e?.icon||e?.id||"grid",i="rounded-usk border border-solid border-gray-100 bg-white";return(0,r.jsxs)("div",{className:"flex flex-col gap-5",children:[(0,r.jsxs)("div",{className:`flex flex-col gap-4 p-5 sm:flex-row sm:items-center sm:justify-between ${i}`,children:[(0,r.jsxs)("div",{className:"flex min-w-0 items-center gap-3",children:[(0,r.jsx)("div",{className:"flex h-11 w-11 shrink-0 items-center justify-center rounded-xl bg-uks-brand/10 text-uks-brand","aria-hidden":"true",children:(0,r.jsx)(G,{name:l})}),(0,r.jsxs)("div",{className:"min-w-0",children:[(0,r.jsx)("h3",{className:"m-0 text-base font-bold text-slate-800",children:t}),a&&(0,r.jsx)("p",{className:"m-0 mt-1 text-[12px] leading-snug text-slate-500",children:a})]})]}),(0,r.jsx)("div",{className:"flex shrink-0 justify-end sm:pl-2",children:(0,r.jsx)(ue,{})})]}),(0,r.jsx)("div",{className:i,children:(0,r.jsxs)("div",{className:"flex flex-col items-center justify-center px-6 py-16 text-center sm:px-10 sm:py-20",children:[(0,r.jsx)("div",{className:"mx-auto mb-6 flex h-14 w-14 items-center justify-center rounded-xl bg-uks-brand/10 text-uks-brand","aria-hidden":"true",children:(0,r.jsx)(z,{className:"h-7 w-7",stroke:"currentColor"})}),(0,r.jsx)("h4",{className:"m-0 mb-2 text-lg font-bold tracking-tight text-slate-800",children:(0,s.__)("Module is currently disabled","ultimate-store-kit")}),(0,r.jsx)("p",{className:"m-0 mb-6 max-w-md text-[13px] leading-relaxed text-slate-500",children:(0,s.__)("This is a Pro feature. Upgrade to Ultimate Store Kit Pro to unlock this module and configure its settings.","ultimate-store-kit")}),(0,r.jsxs)("a",{href:"https://storekit.pro/pricing/",target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center gap-2 rounded-lg border-0 bg-uks-brand px-5 py-2.5 text-sm font-semibold text-white no-underline transition-opacity hover:opacity-90",children:[(0,r.jsx)(C,{className:"h-4 w-4"}),(0,s.__)("Get Pro","ultimate-store-kit")]})]})})]})},be=({notification:t,onDismiss:s})=>{if(!t)return null;const a="success"===t.type?"usk-toast--success":"usk-toast--error";return(0,e.createPortal)((0,r.jsx)("div",{className:"usk-toast-wrap",children:(0,r.jsxs)("div",{className:`usk-toast ${a}`,children:[(0,r.jsx)("span",{children:t.message}),(0,r.jsx)("button",{type:"button",className:"usk-toast__close",onClick:s,children:"×"})]})}),document.body)},ge=window.ultimateStoreKitAdminData||{},fe=(()=>{const e=ge.widgets?.ultimate_store_kit_other_settings||[],t=[];return e.forEach(e=>{var s;"start_group"===e.type&&t.push({id:`settings-${s=e.label,s.toLowerCase().replace(/\s+/g,"-").replace(/[^a-z0-9-]/g,"")}`,label:e.label})}),t})(),je=()=>{const e=window.location.hash.replace("#","").split("?")[0],s=X().map(e=>e.id),r=(0,t.applyFilters)("usk.admin.pages",{}),a=Object.keys(r),l=["welcome","widgets","woocommerce-widgets","edd-widgets","other-widgets","get-pro","about",...fe.map(e=>e.id),...s,...a];return(0,t.applyFilters)("usk.admin.validPages",l).includes(e)?e:"welcome"},ke=()=>{const[a,l]=(0,e.useState)(je()),[i,o]=(0,e.useState)(ge.savedSettings||{}),[n,d]=(0,e.useState)(!!ge.isPro),[c,m]=(0,e.useState)(!1),[x,h]=(0,e.useState)(null),[u,p]=(0,e.useState)(!1),[b,g]=(0,e.useState)(()=>window.innerWidth>1024);(0,e.useEffect)(()=>((0,t.addAction)("usk.admin.notify","usk-core",e=>h(e)),()=>(0,t.removeAction)("usk.admin.notify","usk-core")),[]),(0,e.useEffect)(()=>((0,t.addAction)("usk.admin.licenseChanged","usk-core",e=>{d(e),window.ultimateStoreKitAdminData.isPro=e}),()=>(0,t.removeAction)("usk.admin.licenseChanged","usk-core")),[]),(0,e.useEffect)(()=>{if(x){const e=setTimeout(()=>h(null),3e3);return()=>clearTimeout(e)}},[x]),(0,e.useEffect)(()=>{const e=()=>{l(je())};return window.addEventListener("hashchange",e),()=>window.removeEventListener("hashchange",e)},[]),(0,e.useEffect)(()=>{if("get-pro"===a){const e=(0,t.applyFilters)("usk.admin.pages",{});if(e.license||n){const t=e.license?"license":"welcome";l(t),window.location.hash=`#${t}`}}},[n,a]),(0,e.useEffect)(()=>{p(!1)},[a]),(0,e.useEffect)(()=>(document.body.style.overflow=u?"hidden":"",()=>{document.body.style.overflow=""}),[u]),(0,e.useEffect)(()=>{const e=()=>{const e=window.innerWidth>1024;g(e),e&&p(!1)};return window.addEventListener("resize",e),()=>window.removeEventListener("resize",e)},[]);const f=(0,e.useCallback)(e=>{e?.preventDefault&&e.preventDefault(),e?.stopPropagation&&e.stopPropagation(),p(e=>!e)},[]),j=(0,e.useCallback)((e,t)=>{m(!0),fetch(ge.restUrl+"settings",{method:"POST",headers:{"Content-Type":"application/json","X-WP-Nonce":ge.restNonce},body:JSON.stringify({section:e,settings:t})}).then(e=>{if(!e.ok)throw e;return e.json()}).then(r=>{o(s=>({...s,[e]:t})),h({type:"success",message:r?.message||(0,s.__)("Settings saved successfully.","ultimate-store-kit")})}).catch(()=>{h({type:"error",message:(0,s.__)("An error occurred while saving.","ultimate-store-kit")})}).finally(()=>{m(!1)})},[]);return(0,r.jsxs)("div",{className:"flex min-h-[calc(100vh-100px)] flex-col m-5 ml-0 mb-0 font-sans",children:[(0,r.jsx)(be,{notification:x,onDismiss:()=>h(null)}),(0,r.jsx)(R,{version:ge.version,isPro:n,isSidebarOpen:u,isDesktop:b,onToggleSidebar:f}),(0,r.jsx)("div",{className:"bg-slate-50",children:(0,r.jsxs)("div",{className:"flex flex-1 items-stretch p-5 gap-5",children:[(0,r.jsx)(J,{activePage:a,onNavigate:l,isPro:n,isOpen:u,isDesktop:b,onClose:()=>p(!1),settingsGroups:fe}),(0,r.jsx)("div",{className:"min-w-0 flex-1 flex flex-col",children:(0,r.jsx)("div",{className:"flex-1",children:(()=>{const e=ge.widgets||{},s=(0,t.applyFilters)("usk.admin.pages",{});if(s[a]){if(!n){const e=X().find(e=>e.id===a);if(e)return(0,r.jsx)(pe,{module:e})}const e=s[a];return(0,r.jsx)(e,{})}const l=X().find(e=>e.id===a);if(l)return(0,r.jsx)(pe,{module:l});switch(a){case"welcome":return(0,r.jsx)(ee,{widgets:e,settings:i,isPro:n});case"widgets":case"woocommerce-widgets":case"edd-widgets":case"other-widgets":{const t={"woocommerce-widgets":"wc","edd-widgets":"edd","other-widgets":"other",widgets:"wc"};return(0,r.jsx)(te,{allWidgets:e,allSettings:i,onSave:j,saving:c,isPro:n,widgetType:t[a]})}case"get-pro":return n?(0,r.jsx)(ee,{widgets:e,settings:i,isPro:n}):(0,r.jsx)(ne,{isPro:n});case"about":return(0,r.jsx)(he,{});default:{const t=fe.find(e=>e.id===a);return t?(0,r.jsx)(ae,{widgets:e.ultimate_store_kit_other_settings||[],section:"ultimate_store_kit_other_settings",settings:i.ultimate_store_kit_other_settings||{},onSave:j,saving:c,isPro:n,activeGroup:t.label}):(0,r.jsx)(ee,{widgets:e,settings:i})}}})()})})]})}),(0,r.jsxs)("footer",{className:"p-5 bg-white py-4 text-center text-sm text-slate-500 rounded-bl-lg rounded-br-lg",children:[(0,s.__)("Ultimate Store Kit Addon made with love by","ultimate-store-kit")," ",(0,r.jsx)("a",{target:"_blank",rel:"noopener noreferrer",href:"https://bdthemes.com",className:"text-uks-brand no-underline hover:underline",children:"BdThemes"}),". ",(0,s.__)("All rights reserved.","ultimate-store-kit")]})]})};document.addEventListener("DOMContentLoaded",()=>{const t=document.querySelector(".ultimate-store-kit-admin-root");t&&(0,e.createRoot)(t).render((0,r.jsx)(ke,{}))})}};const t={};function s(r){const a=t[r];if(void 0!==a)return a.exports;const l=t[r]={exports:{}};return e[r](l,l.exports,s),l.exports}s.m=e,(()=>{const e=[];s.O=(t,r,a,l)=>{if(r){l=l||0;for(var i=e.length;i>0&&e[i-1][2]>l;i--)e[i]=e[i-1];return void(e[i]=[r,a,l])}let o=1/0;for(i=0;i<e.length;i++){let[r,a,l]=e[i],d=!0;for(var n=0;n<r.length;n++)(!1&l||o>=l)&&Object.keys(s.O).every(e=>s.O[e](r[n]))?r.splice(n--,1):(d=!1,l<o&&(o=l));if(d){e.splice(i--,1);const s=a();void 0!==s&&(t=s)}}return t}})(),s.o=(e,t)=>Object.hasOwn(e,t),(()=>{const e={16:0,1524:0};s.O.j=t=>0===e[t];const t=(t,r)=>{let[a,l,i]=r;var o,n,d=0;if(a.some(t=>0!==e[t])){for(o in l)s.o(l,o)&&(s.m[o]=l[o]);if(i)var c=i(s)}for(t&&t(r);d<a.length;d++)n=a[d],s.o(e,n)&&e[n]&&e[n][0](),e[n]=0;return s.O(c)},r=globalThis.webpackChunkultimate_store_kit||=[];r.forEach(t.bind(null,0)),r.push=t.bind(null,r.push.bind(r))})();let r=s.O(void 0,[1524],()=>s(7208));r=s.O(r)})(); |