@storecraft/dashboard 1.0.14 → 1.0.16

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -125,7 +125,7 @@ Please report this to https://github.com/markedjs/marked.`,e){const s="<p>An err
125
125
  focus:outline-none
126
126
  font-normal transition-none`,eT=_.forwardRef(({className:t="h-10 px-3",overrideClass:e=!1,...n},r)=>{const i=e?t:`${CR} ${t}`;return f.jsx("input",{...n,ref:r,onWheel:s=>s.target.blur(),className:i})}),qe=_.forwardRef(({from:t,to:e,rounded:n="rounded-md",stroke:r,className:i,inputClsName:s="h-10 rounded-md px-3",...a},o)=>f.jsx(ot,{from:t,to:e,rounded:n,stroke:r,className:i,children:f.jsx(eT,{ref:o,className:s,...a})})),ot=({className:t,rounded:e="rounded-md",children:n,stroke:r="border",from:i="from-pink-500 dark:from-pink-600",to:s="to-kf-500 dark:to-kf-500",...a})=>f.jsx("div",{className:`bg-gradient-to-r
127
127
  ${i} ${s} ${r}
128
- ${e} ${t}`,...a,style:{"background-clip":"border-box","border-color":"transparent","background-origin":"border-box"},children:n}),Ie=(t,e={})=>({...n})=>f.jsx(ot,{...e,children:f.jsx(t,{...n})}),He=({setError:t,...e})=>f.jsx("div",{...e}),fa=({name:t,setError:e,error:n=void 0,children:r,border:i=!0,desc:s=void 0,rightView:a,cardClass:o="shelf-card",...l})=>f.jsx("div",{...l,children:f.jsxs("div",{className:`w-full text-left
128
+ ${e} ${t}`,...a,style:{"background-clip":"border-box","border-color":"transparent","background-origin":"border-box"},children:n}),Me=(t,e={})=>({...n})=>f.jsx(ot,{...e,children:f.jsx(t,{...n})}),He=({setError:t,...e})=>f.jsx("div",{...e}),fa=({name:t,setError:e,error:n=void 0,children:r,border:i=!0,desc:s=void 0,rightView:a,cardClass:o="shelf-card",...l})=>f.jsx("div",{...l,children:f.jsxs("div",{className:`w-full text-left
129
129
  ${i?"border rounded-lg shadow-sm dark:shadow-xl p-5 "+o:""}
130
130
  `,children:[(t||a)&&f.jsxs(f.Fragment,{children:[f.jsxs("div",{className:"flex flex-row justify-between items-center",children:[t&&f.jsx("div",{children:t,className:"text-base w-fit"}),a]}),f.jsx(Ct,{className:"mt-3 --mb-5"})]}),f.jsxs(de,{show:s,children:[f.jsx(Xt,{value:s,className:`text-sm shelf-text-minor-light mt-3
131
131
  tracking-wider --whitespace-pre-line`}),f.jsx(Ct,{className:"mt-3 --mb-5"})]}),f.jsx("div",{children:r,className:"mt-5"}),n&&f.jsxs("div",{className:`flex relative flex-row flex-nowrap items-center text-base
@@ -140,7 +140,7 @@ Please report this to https://github.com/markedjs/marked.`,e){const s="<p>An err
140
140
  text-gray-600 dark:text-gray-400
141
141
  text-base font-semibold tracking-tight`,loading:c,onClick:d,...l})}):null},Wn=({from:t,to:e,rounded:n="rounded-lg",stroke:r="border-2",children:i,text:s="what",className:a="h-10",btnClassName:o="",...l})=>f.jsx(ot,{from:t,to:e,rounded:n,stroke:r,className:a,children:f.jsx("button",{className:`h-full w-full align-middle text-center px-3
142
142
  rounded-md shelf-button-color-soft
143
- whitespace-nowrap ${o}`,children:i??s,...l})}),NR=({from:t,to:e,rounded:n="rounded-lg",stroke:r,...i})=>f.jsx(ot,{from:t,to:e,rounded:n,stroke:r,className:"w-fit h-fit",children:f.jsx(TR,{...i})}),ff=({Icon:t,from:e="#973cff",to:n="rgb(236 72 153)",...r})=>{const i=btoa(`gradient_${e}_${n}`);return f.jsxs(f.Fragment,{children:[f.jsx("svg",{width:"0",height:"0",className:"absolute",children:f.jsxs("linearGradient",{id:i,x1:"100%",y1:"100%",x2:"0%",y2:"0%",children:[f.jsx("stop",{stopColor:e,offset:"0%"}),f.jsx("stop",{stopColor:n,offset:"100%"})]})}),f.jsx(t,{style:{fill:`url(#${i})`},...r})]})},tT="3.7.7",AR=tT,pu=typeof Buffer=="function",h8=typeof TextDecoder=="function"?new TextDecoder:void 0,p8=typeof TextEncoder=="function"?new TextEncoder:void 0,DR="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",h1=Array.prototype.slice.call(DR),eh=(t=>{let e={};return t.forEach((n,r)=>e[n]=r),e})(h1),OR=/^(?:[A-Za-z\d+\/]{4})*?(?:[A-Za-z\d+\/]{2}(?:==)?|[A-Za-z\d+\/]{3}=?)?$/,bn=String.fromCharCode.bind(String),m8=typeof Uint8Array.from=="function"?Uint8Array.from.bind(Uint8Array):t=>new Uint8Array(Array.prototype.slice.call(t,0)),nT=t=>t.replace(/=/g,"").replace(/[+\/]/g,e=>e=="+"?"-":"_"),rT=t=>t.replace(/[^A-Za-z0-9\+\/]/g,""),iT=t=>{let e,n,r,i,s="";const a=t.length%3;for(let o=0;o<t.length;){if((n=t.charCodeAt(o++))>255||(r=t.charCodeAt(o++))>255||(i=t.charCodeAt(o++))>255)throw new TypeError("invalid character found");e=n<<16|r<<8|i,s+=h1[e>>18&63]+h1[e>>12&63]+h1[e>>6&63]+h1[e&63]}return a?s.slice(0,a-3)+"===".substring(a):s},av=typeof btoa=="function"?t=>btoa(t):pu?t=>Buffer.from(t,"binary").toString("base64"):iT,w4=pu?t=>Buffer.from(t).toString("base64"):t=>{let n=[];for(let r=0,i=t.length;r<i;r+=4096)n.push(bn.apply(null,t.subarray(r,r+4096)));return av(n.join(""))},up=(t,e=!1)=>e?nT(w4(t)):w4(t),MR=t=>{if(t.length<2){var e=t.charCodeAt(0);return e<128?t:e<2048?bn(192|e>>>6)+bn(128|e&63):bn(224|e>>>12&15)+bn(128|e>>>6&63)+bn(128|e&63)}else{var e=65536+(t.charCodeAt(0)-55296)*1024+(t.charCodeAt(1)-56320);return bn(240|e>>>18&7)+bn(128|e>>>12&63)+bn(128|e>>>6&63)+bn(128|e&63)}},IR=/[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g,sT=t=>t.replace(IR,MR),g8=pu?t=>Buffer.from(t,"utf8").toString("base64"):p8?t=>w4(p8.encode(t)):t=>av(sT(t)),Dc=(t,e=!1)=>e?nT(g8(t)):g8(t),y8=t=>Dc(t,!0),LR=/[\xC0-\xDF][\x80-\xBF]|[\xE0-\xEF][\x80-\xBF]{2}|[\xF0-\xF7][\x80-\xBF]{3}/g,PR=t=>{switch(t.length){case 4:var e=(7&t.charCodeAt(0))<<18|(63&t.charCodeAt(1))<<12|(63&t.charCodeAt(2))<<6|63&t.charCodeAt(3),n=e-65536;return bn((n>>>10)+55296)+bn((n&1023)+56320);case 3:return bn((15&t.charCodeAt(0))<<12|(63&t.charCodeAt(1))<<6|63&t.charCodeAt(2));default:return bn((31&t.charCodeAt(0))<<6|63&t.charCodeAt(1))}},aT=t=>t.replace(LR,PR),oT=t=>{if(t=t.replace(/\s+/g,""),!OR.test(t))throw new TypeError("malformed base64.");t+="==".slice(2-(t.length&3));let e,n="",r,i;for(let s=0;s<t.length;)e=eh[t.charAt(s++)]<<18|eh[t.charAt(s++)]<<12|(r=eh[t.charAt(s++)])<<6|(i=eh[t.charAt(s++)]),n+=r===64?bn(e>>16&255):i===64?bn(e>>16&255,e>>8&255):bn(e>>16&255,e>>8&255,e&255);return n},ov=typeof atob=="function"?t=>atob(rT(t)):pu?t=>Buffer.from(t,"base64").toString("binary"):oT,lT=pu?t=>m8(Buffer.from(t,"base64")):t=>m8(ov(t).split("").map(e=>e.charCodeAt(0))),cT=t=>lT(uT(t)),RR=pu?t=>Buffer.from(t,"base64").toString("utf8"):h8?t=>h8.decode(lT(t)):t=>aT(ov(t)),uT=t=>rT(t.replace(/[-_]/g,e=>e=="-"?"+":"/")),E4=t=>RR(uT(t)),jR=t=>{if(typeof t!="string")return!1;const e=t.replace(/\s+/g,"").replace(/={0,2}$/,"");return!/[^\s0-9a-zA-Z\+/]/.test(e)||!/[^\s0-9a-zA-Z\-_]/.test(e)},dT=t=>({value:t,enumerable:!1,writable:!0,configurable:!0}),fT=function(){const t=(e,n)=>Object.defineProperty(String.prototype,e,dT(n));t("fromBase64",function(){return E4(this)}),t("toBase64",function(e){return Dc(this,e)}),t("toBase64URI",function(){return Dc(this,!0)}),t("toBase64URL",function(){return Dc(this,!0)}),t("toUint8Array",function(){return cT(this)})},hT=function(){const t=(e,n)=>Object.defineProperty(Uint8Array.prototype,e,dT(n));t("toBase64",function(e){return up(this,e)}),t("toBase64URI",function(){return up(this,!0)}),t("toBase64URL",function(){return up(this,!0)})},FR=()=>{fT(),hT()},BR={version:tT,VERSION:AR,atob:ov,atobPolyfill:oT,btoa:av,btoaPolyfill:iT,fromBase64:E4,toBase64:Dc,encode:Dc,encodeURI:y8,encodeURL:y8,utob:sT,btou:aT,decode:E4,isValid:jR,fromUint8Array:up,toUint8Array:cT,extendString:fT,extendUint8Array:hT,extendBuiltins:FR},v8=t=>t.toLowerCase().split(" ").join("-"),k4=async()=>{let t;try{t=await navigator.clipboard.readText(),console.log("Content read from clipboard: ",t)}catch(e){console.error("Failed to read: ",e)}return t},C4=async t=>{try{await navigator.clipboard.writeText(t),console.log("Content copied to clipboard")}catch(e){console.error("Failed to copy: ",e)}},pT=()=>"maxTouchPoints"in navigator?navigator.maxTouchPoints>0:!1,HR=t=>JSON.parse(BR.decode(decodeURIComponent(t)));var T0=Sn.GenIcon,zR=function(e){return T0({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{d:"M2.00488 4C2.00488 3.44772 2.4526 3 3.00488 3H21.0049C21.5572 3 22.0049 3.44772 22.0049 4V9.5C20.6242 9.5 19.5049 10.6193 19.5049 12C19.5049 13.3807 20.6242 14.5 22.0049 14.5V20C22.0049 20.5523 21.5572 21 21.0049 21H3.00488C2.4526 21 2.00488 20.5523 2.00488 20V4ZM8.09024 19C8.29615 18.4174 8.85177 18 9.50488 18C10.158 18 10.7136 18.4174 10.9195 19H20.0049V16.0322C18.5232 15.2959 17.5049 13.7669 17.5049 12C17.5049 10.2331 18.5232 8.70411 20.0049 7.96776V5H10.9195C10.7136 5.5826 10.158 6 9.50488 6C8.85177 6 8.29615 5.5826 8.09024 5H4.00488V19H8.09024ZM9.50488 11C8.67646 11 8.00488 10.3284 8.00488 9.5C8.00488 8.67157 8.67646 8 9.50488 8C10.3333 8 11.0049 8.67157 11.0049 9.5C11.0049 10.3284 10.3333 11 9.50488 11ZM9.50488 16C8.67646 16 8.00488 15.3284 8.00488 14.5C8.00488 13.6716 8.67646 13 9.50488 13C10.3333 13 11.0049 13.6716 11.0049 14.5C11.0049 15.3284 10.3333 16 9.50488 16Z"}}]})(e)},UR=function(e){return T0({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{d:"M20 13C18.3221 13 16.7514 13.4592 15.4068 14.2587C16.5908 15.6438 17.5269 17.2471 18.1465 19H20V13ZM16.0037 19C14.0446 14.3021 9.4079 11 4 11V19H16.0037ZM4 9C7.82914 9 11.3232 10.4348 13.9738 12.7961C15.7047 11.6605 17.7752 11 20 11V3H21.0082C21.556 3 22 3.44495 22 3.9934V20.0066C22 20.5552 21.5447 21 21.0082 21H2.9918C2.44405 21 2 20.5551 2 20.0066V3.9934C2 3.44476 2.45531 3 2.9918 3H6V1H8V5H4V9ZM18 1V5H10V3H16V1H18ZM16.5 10C15.6716 10 15 9.32843 15 8.5C15 7.67157 15.6716 7 16.5 7C17.3284 7 18 7.67157 18 8.5C18 9.32843 17.3284 10 16.5 10Z"}}]})(e)},$R=function(e){return T0({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{d:"M3 13H11V3H3V13ZM3 21H11V15H3V21ZM13 21H21V11H13V21ZM13 3V9H21V3H13Z"}}]})(e)},VR=function(e){return T0({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{d:"M18 8H20C20.5523 8 21 8.44772 21 9V21C21 21.5523 20.5523 22 20 22H4C3.44772 22 3 21.5523 3 21V9C3 8.44772 3.44772 8 4 8H6V7C6 3.68629 8.68629 1 12 1C15.3137 1 18 3.68629 18 7V8ZM5 10V20H19V10H5ZM11 14H13V16H11V14ZM7 14H9V16H7V14ZM15 14H17V16H15V14ZM16 8V7C16 4.79086 14.2091 3 12 3C9.79086 3 8 4.79086 8 7V8H16Z"}}]})(e)},S0=Sn.GenIcon,YR=function(e){return S0({tag:"svg",attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"circle",attr:{cx:"12",cy:"12",r:"10"}},{tag:"line",attr:{x1:"8",y1:"12",x2:"16",y2:"12"}}]})(e)},WR=function(e){return S0({tag:"svg",attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"circle",attr:{cx:"12",cy:"12",r:"10"}},{tag:"line",attr:{x1:"12",y1:"8",x2:"12",y2:"16"}},{tag:"line",attr:{x1:"8",y1:"12",x2:"16",y2:"12"}}]})(e)},GR=function(e){return S0({tag:"svg",attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M19 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h11l5 5v11a2 2 0 0 1-2 2z"}},{tag:"polyline",attr:{points:"17 21 17 13 7 13 7 21"}},{tag:"polyline",attr:{points:"7 3 7 8 15 8"}}]})(e)},KR=function(e){return S0({tag:"svg",attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"circle",attr:{cx:"12",cy:"12",r:"3"}},{tag:"path",attr:{d:"M19.4 15a1.65 1.65 0 0 0 .33 1.82l.06.06a2 2 0 0 1 0 2.83 2 2 0 0 1-2.83 0l-.06-.06a1.65 1.65 0 0 0-1.82-.33 1.65 1.65 0 0 0-1 1.51V21a2 2 0 0 1-2 2 2 2 0 0 1-2-2v-.09A1.65 1.65 0 0 0 9 19.4a1.65 1.65 0 0 0-1.82.33l-.06.06a2 2 0 0 1-2.83 0 2 2 0 0 1 0-2.83l.06-.06a1.65 1.65 0 0 0 .33-1.82 1.65 1.65 0 0 0-1.51-1H3a2 2 0 0 1-2-2 2 2 0 0 1 2-2h.09A1.65 1.65 0 0 0 4.6 9a1.65 1.65 0 0 0-.33-1.82l-.06-.06a2 2 0 0 1 0-2.83 2 2 0 0 1 2.83 0l.06.06a1.65 1.65 0 0 0 1.82.33H9a1.65 1.65 0 0 0 1-1.51V3a2 2 0 0 1 2-2 2 2 0 0 1 2 2v.09a1.65 1.65 0 0 0 1 1.51 1.65 1.65 0 0 0 1.82-.33l.06-.06a2 2 0 0 1 2.83 0 2 2 0 0 1 0 2.83l-.06.06a1.65 1.65 0 0 0-.33 1.82V9a1.65 1.65 0 0 0 1.51 1H21a2 2 0 0 1 2 2 2 2 0 0 1-2 2h-.09a1.65 1.65 0 0 0-1.51 1z"}}]})(e)};const qR="@storecraft/dashboard",QR="1.0.13",ZR="Storecraft Official Dashboard",XR="MIT",JR="Tomer Shalev (https://github.com/store-craft)",ej="https://github.com/store-craft/storecraft",tj={type:"git",url:"https://github.com/store-craft/storecraft.git",directory:"packages/dashboard"},nj=["commerce","dashboard","react","storecraft"],rj="module",ij="./src/index.jsx",sj={".":{import:"./dist/lib/index.js",require:"./dist/lib/index.umd.cjs",types:"./dist/lib/src/index.d.ts"}},aj={start:"npm run dashboard:dev","dashboard:dev":"vite --host","dashboard:build":"vite build && npm run dashboard:lib:build","dashboard:lib:build":"vite build -c vite.lib.config.js","dashboard:lint":"eslint . --ext js,jsx --report-unused-disable-directives --max-warnings 0","dashboard:preview":"vite preview","dashboard:analyze":"npx vite-bundle-visualizer -c vite.lib.config.js",prepublishOnly:"npm run dashboard:build && npm version patch --force"},oj={"@storecraft/core":"^1.0.0","@storecraft/sdk":"^1.0.0","@storecraft/sdk-react-hooks":"^1.0.0","@uiw/react-md-editor":"^3.18.1","@monaco-editor/react":"^4.6.0","monaco-editor":"^0.48.0","chart.js":"^4.2.0",handlebars:"^4.7.8","js-base64":"^3.7.5",marked:"^5.0.2",react:"18.2.0","react-datepicker":"^4.10.0","react-dom":"18.2.0","react-drag-drop-container":"^6.1.1","react-icons":"^4.9.0","react-image-crop":"^10.0.7","react-inspector":"^6.0.1","react-router-dom":"^6.14.1"},lj={"@types/react":"^18.2.66","@types/react-datepicker":"^6.2.0","@types/react-dom":"^18.2.22","@types/react-image-crop":"^8.1.6","@vitejs/plugin-react":"^4.2.1",autoprefixer:"^10.4.19",eslint:"^8.57.0","eslint-plugin-react":"^7.34.1","eslint-plugin-react-hooks":"^4.6.0","eslint-plugin-react-refresh":"^0.4.6",postcss:"^8.4.38","postcss-flexbugs-fixes":"^5.0.2","postcss-import":"^14.1.0","postcss-preset-env":"^7.7.2",sass:"^1.58.3","tailwind-scrollbar":"^2.1.0",tailwindcss:"^3.4.3",vite:"^5.2.0","vite-plugin-css-injected-by-js":"^3.5.1","vite-plugin-dts":"^3.9.1"},cj=["dist"],uj={name:qR,version:QR,description:ZR,license:XR,author:JR,homepage:ej,repository:tj,keywords:nj,type:rj,module:ij,exports:sj,scripts:aj,dependencies:oj,devDependencies:lj,files:cj},dj="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAD4AAAA9CAYAAAD1VdrqAAAAAXNSR0IB2cksfwAAAAlwSFlzAAALEwAACxMBAJqcGAAAGJhJREFUeJzlOwmYXEWZf9V7r+/p6ZmeycxkkplJyIRcJCbhygFyHyqnsKgICyYgsIKurqirn4uCH3gsuwt8uPst64qfLrriwSEYXYEoIkeQKxByTJK5JzM9ffe7X9X+Ve+9np4k4OfuurrZ6unp1/XqVdV/H/W3CkG79sxPX8+rymZFU5KEEIUAvgihgJ8A/hf/AhuXf/71zF1S7yLhHS6bnIeTcCyQYBbO5VzMf4QQxpjHPO64jmtP6Ptr03yIEaqomqpGxJ7EOEVRIpRSRUxBcV4xB6HiM5hNzo7X4gFKVXkfb3jYEk2pN3+w5TvvEvOo4d6ppS2tTjtrOLjhxoK9Ewnk4dvh75BZd3kjsA13yaFP8fA5DgnohIJ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ZCJNX//wys+aY0M1tqYWYHEfotBcj6VVRfoLjJLg1p2IXioYVpbRR0aorm3B7LtS+AG5wxIxZqhDKj9jzsWlqNSOyFj4yYtaNbiEMM5unuWQMY5DSUnClUHpZxod26/1R5jNUf3uPuAKD3Zcs0+RCBTaYTEUe03OS/n2qhdwGAjLrWxJ/JUwQ92aODwSFlGJWghoJk4Ir1LFAtFwGmPIy0Wn3bJoueeKzhlQFuzzOYO2NubH1AVph7dFmuP+HUpzipRU6bSOOTyiJgSShZJypoxHrz9ZBQG81NCqLXgl1AJ6YFMWwFWFXxGTULNFpkRVBgeC4ri8UPoAdxwXJO5slbTqbUyNQyQmEwbSVHEZ4lDJBdFZA7NBZ+p/F8f0eDkJ+Qmsbco9kSE64p7YcixLu7Pcu0O0zU7gIpyMRRbooKtux3/CRMitNFcerR3AAAAAElFTkSuQmCC",fj=({children:t,...e})=>f.jsxs("svg",{viewBox:"0 0 302 53",...e,children:[t,f.jsxs("g",{className:"",children:[f.jsx("path",{d:"M 29.756 18.948 C 29.962 17.646 29.691 16.631 28.944 15.903 C 28.196 15.175 26.964 14.811 25.248 14.811 C 24.111 14.811 23.127 14.959 22.296 15.255 C 21.465 15.551 20.795 15.956 20.288 16.471 C 19.781 16.986 19.439 17.575 19.262 18.238 C 19.103 18.783 19.093 19.262 19.232 19.676 C 19.371 20.091 19.636 20.455 20.025 20.768 C 20.414 21.082 20.911 21.357 21.515 21.594 C 21.883 21.738 22.285 21.872 22.72 21.994 L 9.695 21.994 C 9.62 21.043 9.728 19.992 10.02 18.842 C 10.569 16.593 11.665 14.622 13.306 12.929 C 14.947 11.236 16.963 9.917 19.353 8.97 C 21.744 8.023 24.318 7.549 27.076 7.549 C 29.893 7.549 32.222 8.026 34.062 8.979 C 35.901 9.932 37.181 11.266 37.902 12.982 C 38.622 14.699 38.712 16.687 38.172 18.948 Z M 30.923 24.488 C 32.14 25.139 33.106 25.915 33.823 26.814 C 34.346 27.47 34.729 28.199 34.974 29 L 18.016 29 L 17.649 28.909 C 14.68 28.187 12.492 27.018 11.084 25.403 C 10.7 24.963 10.395 24.48 10.167 23.955 L 29.804 23.955 C 30.197 24.122 30.57 24.299 30.923 24.488 Z M 34.951 33.863 C 34.761 34.61 34.519 35.322 34.226 36 L 24.639 36 C 24.716 35.935 24.79 35.867 24.862 35.798 C 25.453 35.23 25.847 34.579 26.042 33.845 C 26.201 33.159 26.135 32.57 25.843 32.079 C 25.593 31.659 25.169 31.286 24.572 30.961 L 35.287 30.961 C 35.313 31.856 35.201 32.823 34.951 33.863 Z M 31.736 39.776 C 30.178 41.421 28.216 42.682 25.849 43.558 C 23.482 44.434 20.783 44.872 17.753 44.872 C 14.711 44.872 12.173 44.416 10.139 43.504 C 8.106 42.593 6.693 41.208 5.902 39.35 C 5.716 38.914 5.571 38.451 5.466 37.961 L 33.173 37.961 C 32.751 38.605 32.273 39.21 31.736 39.776 Z M 5.724 32.301 L 14.14 32.301 C 13.919 33.472 13.989 34.449 14.351 35.23 C 14.481 35.511 14.644 35.768 14.841 36 L 5.261 36 C 5.252 34.877 5.406 33.644 5.724 32.301 Z M 38.769 15.184 L 40.549 8.046 L 71.284 8.046 L 69.504 15.184 L 58.478 15.184 L 56.78 21.994 L 48.115 21.994 L 49.813 15.184 Z M 51.191 44.41 L 42.526 44.41 L 44.134 37.961 L 52.799 37.961 Z M 99.63 26.228 C 99.391 27.187 99.116 28.111 98.806 29 L 89.779 29 C 90.11 28.14 90.399 27.216 90.645 26.228 C 90.844 25.428 90.995 24.671 91.098 23.955 L 100.109 23.955 C 99.984 24.689 99.825 25.447 99.63 26.228 Z M 86.963 42.741 C 83.981 44.185 80.862 44.907 77.607 44.907 C 74.34 44.907 71.58 44.179 69.327 42.723 C 67.525 41.558 66.174 39.971 65.276 37.961 L 93.429 37.961 C 91.516 39.987 89.36 41.58 86.963 42.741 Z M 64.917 26.228 C 65.112 25.447 65.33 24.689 65.572 23.955 L 74.565 23.955 C 74.31 24.671 74.083 25.428 73.884 26.228 C 73.638 27.216 73.466 28.14 73.368 29 L 64.359 29 C 64.492 28.111 64.678 27.187 64.917 26.228 Z M 69.753 16.054 C 71.98 13.273 74.581 11.16 77.557 9.715 C 80.533 8.271 83.655 7.549 86.922 7.549 C 90.177 7.549 92.936 8.271 95.197 9.715 C 97.459 11.16 99.013 13.273 99.858 16.054 C 100.387 17.795 100.555 19.775 100.362 21.994 L 91.258 21.994 C 91.266 21.364 91.226 20.775 91.138 20.227 C 90.877 18.593 90.226 17.356 89.187 16.516 C 88.148 15.675 86.752 15.255 85 15.255 C 83.26 15.255 81.658 15.675 80.194 16.516 C 78.73 17.356 77.46 18.593 76.383 20.227 C 76.022 20.775 75.689 21.364 75.382 21.994 L 66.295 21.994 C 67.207 19.775 68.36 17.795 69.753 16.054 Z M 73.391 32.23 C 73.652 33.863 74.306 35.1 75.351 35.941 C 75.376 35.961 75.401 35.981 75.426 36 L 64.58 36 C 64.175 34.492 64.031 32.813 64.148 30.961 L 73.276 30.961 C 73.288 31.406 73.327 31.829 73.391 32.23 Z M 84.344 35.941 C 85.803 35.1 87.07 33.863 88.146 32.23 C 88.41 31.829 88.659 31.406 88.894 30.961 L 98.04 30.961 C 97.234 32.813 96.254 34.492 95.1 36 L 84.24 36 C 84.275 35.981 84.309 35.961 84.344 35.941 Z M 96.11 44.41 L 97.718 37.961 L 106.507 37.961 L 104.899 44.41 Z M 105.177 8.046 L 120.198 8.046 C 122.921 8.046 125.152 8.534 126.891 9.511 C 128.63 10.488 129.811 11.885 130.436 13.702 C 131.06 15.519 131.062 17.67 130.442 20.156 C 130.283 20.793 130.095 21.406 129.878 21.994 L 120.615 21.994 C 120.922 21.458 121.162 20.845 121.334 20.156 C 121.614 19.031 121.615 18.099 121.338 17.359 C 121.061 16.619 120.52 16.063 119.713 15.69 C 118.906 15.317 117.846 15.131 116.532 15.131 L 112.199 15.131 L 110.488 21.994 L 101.699 21.994 Z M 127.191 26.574 C 126.381 27.499 125.472 28.308 124.465 29 L 99.952 29 L 101.21 23.955 L 109.999 23.955 L 109.729 25.039 L 114.061 25.039 C 115.387 25.039 116.54 24.864 117.521 24.515 C 117.948 24.363 118.342 24.176 118.704 23.955 L 129 23.955 C 128.49 24.906 127.887 25.779 127.191 26.574 Z M 125.347 43.426 L 126.71 37.961 L 152.065 37.961 L 150.457 44.41 L 125.102 44.41 L 125.347 43.426 L 125.638 44.41 L 116.05 44.41 L 114.213 37.961 L 123.732 37.961 Z M 134.168 8.046 L 159.523 8.046 L 157.744 15.184 L 141.178 15.184 L 139.48 21.994 L 130.691 21.994 Z M 112.504 31.963 L 108.002 31.963 L 106.996 36 L 98.207 36 L 99.463 30.961 L 121.663 30.961 L 123.152 36 L 113.654 36 Z M 56.291 23.955 L 55.033 29 L 46.368 29 L 47.626 23.955 Z M 54.544 30.961 L 53.288 36 L 44.623 36 L 45.879 30.961 Z M 127.199 36 L 128.455 30.961 L 137.244 30.961 L 135.987 36 Z M 128.944 29 L 130.202 23.955 L 154.261 23.955 L 153.003 29 Z",sstyle:"fill: rgb(51, 51, 51);"}),f.jsx("path",{d:"M 188.795 19.736 L 185.933 19.736 Q 185.571 17.852 184.575 16.15 Q 183.579 14.448 182.058 13.135 Q 180.536 11.822 178.562 11.061 Q 176.588 10.3 174.234 10.3 Q 170.648 10.3 167.668 12.193 Q 164.689 14.085 162.905 17.744 Q 161.121 21.402 161.121 26.691 Q 161.121 32.015 162.905 35.664 Q 164.689 39.314 167.668 41.197 Q 170.648 43.081 174.234 43.081 Q 176.588 43.081 178.562 42.329 Q 180.536 41.578 182.058 40.265 Q 183.579 38.952 184.575 37.24 Q 185.571 35.529 185.933 33.645 L 188.795 33.645 Q 188.36 36.036 187.174 38.218 Q 185.988 40.4 184.122 42.094 Q 182.257 43.787 179.766 44.765 Q 177.276 45.743 174.234 45.743 Q 169.579 45.743 166.002 43.389 Q 162.425 41.034 160.397 36.751 Q 158.369 32.468 158.369 26.691 Q 158.369 20.913 160.397 16.63 Q 162.425 12.347 166.002 9.992 Q 169.579 7.638 174.234 7.638 Q 177.276 7.638 179.766 8.607 Q 182.257 9.576 184.122 11.269 Q 185.988 12.963 187.174 15.136 Q 188.36 17.309 188.795 19.736 Z M 192.123 45.236 L 192.123 8.145 L 203.823 8.145 Q 207.554 8.145 210.143 9.54 Q 212.733 10.934 214.092 13.406 Q 215.45 15.878 215.45 19.12 Q 215.45 22.326 214.092 24.78 Q 212.733 27.234 210.152 28.61 Q 207.572 29.987 203.859 29.987 L 193.644 29.987 L 193.644 27.379 L 203.787 27.379 Q 206.666 27.379 208.649 26.365 Q 210.632 25.35 211.647 23.494 Q 212.661 21.638 212.661 19.12 Q 212.661 16.585 211.638 14.692 Q 210.614 12.8 208.631 11.749 Q 206.648 10.699 203.75 10.699 L 194.948 10.699 L 194.948 45.236 Z M 207.916 28.465 L 217.044 45.236 L 213.784 45.236 L 204.728 28.465 Z M 218.397 45.236 L 215.445 45.236 L 228.883 8.145 L 231.98 8.145 L 245.418 45.236 L 242.466 45.236 L 230.549 11.785 L 230.332 11.785 Z M 221.385 31.146 L 239.496 31.146 L 239.496 33.718 L 221.385 33.718 Z M 247.05 45.236 L 247.05 8.145 L 268.131 8.145 L 268.131 10.699 L 249.876 10.699 L 249.876 25.387 L 266.429 25.387 L 266.429 27.958 L 249.876 27.958 L 249.876 45.236 Z M 269.583 10.699 L 269.583 8.145 L 296.024 8.145 L 296.024 10.699 L 284.216 10.699 L 284.216 45.236 L 281.391 45.236 L 281.391 10.699 Z",transform:"matrix(0.998892068862915, 0, 0, 1, 0.17177101969718933, 0)",sstyle:"fill: rgb(51, 51, 51);"})]})]}),mT=({className:t})=>f.jsx(fj,{className:"fill-[url(#a)] text-pink-500 "+t,children:f.jsx("defs",{children:f.jsxs("linearGradient",{id:"a",children:[f.jsx("stop",{offset:"0%","stop-color":"rgb(236 72 153)"}),f.jsx("stop",{offset:"100%","stop-color":"rgb(151 60 255)"})]})})}),hj=({...t})=>{const e=({})=>f.jsxs("div",{className:`rounded-lg my-auto b
143
+ whitespace-nowrap ${o}`,children:i??s,...l})}),NR=({from:t,to:e,rounded:n="rounded-lg",stroke:r,...i})=>f.jsx(ot,{from:t,to:e,rounded:n,stroke:r,className:"w-fit h-fit",children:f.jsx(TR,{...i})}),ff=({Icon:t,from:e="#973cff",to:n="rgb(236 72 153)",...r})=>{const i=btoa(`gradient_${e}_${n}`);return f.jsxs(f.Fragment,{children:[f.jsx("svg",{width:"0",height:"0",className:"absolute",children:f.jsxs("linearGradient",{id:i,x1:"100%",y1:"100%",x2:"0%",y2:"0%",children:[f.jsx("stop",{stopColor:e,offset:"0%"}),f.jsx("stop",{stopColor:n,offset:"100%"})]})}),f.jsx(t,{style:{fill:`url(#${i})`},...r})]})},tT="3.7.7",AR=tT,pu=typeof Buffer=="function",h8=typeof TextDecoder=="function"?new TextDecoder:void 0,p8=typeof TextEncoder=="function"?new TextEncoder:void 0,DR="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",h1=Array.prototype.slice.call(DR),eh=(t=>{let e={};return t.forEach((n,r)=>e[n]=r),e})(h1),OR=/^(?:[A-Za-z\d+\/]{4})*?(?:[A-Za-z\d+\/]{2}(?:==)?|[A-Za-z\d+\/]{3}=?)?$/,bn=String.fromCharCode.bind(String),m8=typeof Uint8Array.from=="function"?Uint8Array.from.bind(Uint8Array):t=>new Uint8Array(Array.prototype.slice.call(t,0)),nT=t=>t.replace(/=/g,"").replace(/[+\/]/g,e=>e=="+"?"-":"_"),rT=t=>t.replace(/[^A-Za-z0-9\+\/]/g,""),iT=t=>{let e,n,r,i,s="";const a=t.length%3;for(let o=0;o<t.length;){if((n=t.charCodeAt(o++))>255||(r=t.charCodeAt(o++))>255||(i=t.charCodeAt(o++))>255)throw new TypeError("invalid character found");e=n<<16|r<<8|i,s+=h1[e>>18&63]+h1[e>>12&63]+h1[e>>6&63]+h1[e&63]}return a?s.slice(0,a-3)+"===".substring(a):s},av=typeof btoa=="function"?t=>btoa(t):pu?t=>Buffer.from(t,"binary").toString("base64"):iT,w4=pu?t=>Buffer.from(t).toString("base64"):t=>{let n=[];for(let r=0,i=t.length;r<i;r+=4096)n.push(bn.apply(null,t.subarray(r,r+4096)));return av(n.join(""))},up=(t,e=!1)=>e?nT(w4(t)):w4(t),MR=t=>{if(t.length<2){var e=t.charCodeAt(0);return e<128?t:e<2048?bn(192|e>>>6)+bn(128|e&63):bn(224|e>>>12&15)+bn(128|e>>>6&63)+bn(128|e&63)}else{var e=65536+(t.charCodeAt(0)-55296)*1024+(t.charCodeAt(1)-56320);return bn(240|e>>>18&7)+bn(128|e>>>12&63)+bn(128|e>>>6&63)+bn(128|e&63)}},IR=/[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g,sT=t=>t.replace(IR,MR),g8=pu?t=>Buffer.from(t,"utf8").toString("base64"):p8?t=>w4(p8.encode(t)):t=>av(sT(t)),Dc=(t,e=!1)=>e?nT(g8(t)):g8(t),y8=t=>Dc(t,!0),LR=/[\xC0-\xDF][\x80-\xBF]|[\xE0-\xEF][\x80-\xBF]{2}|[\xF0-\xF7][\x80-\xBF]{3}/g,PR=t=>{switch(t.length){case 4:var e=(7&t.charCodeAt(0))<<18|(63&t.charCodeAt(1))<<12|(63&t.charCodeAt(2))<<6|63&t.charCodeAt(3),n=e-65536;return bn((n>>>10)+55296)+bn((n&1023)+56320);case 3:return bn((15&t.charCodeAt(0))<<12|(63&t.charCodeAt(1))<<6|63&t.charCodeAt(2));default:return bn((31&t.charCodeAt(0))<<6|63&t.charCodeAt(1))}},aT=t=>t.replace(LR,PR),oT=t=>{if(t=t.replace(/\s+/g,""),!OR.test(t))throw new TypeError("malformed base64.");t+="==".slice(2-(t.length&3));let e,n="",r,i;for(let s=0;s<t.length;)e=eh[t.charAt(s++)]<<18|eh[t.charAt(s++)]<<12|(r=eh[t.charAt(s++)])<<6|(i=eh[t.charAt(s++)]),n+=r===64?bn(e>>16&255):i===64?bn(e>>16&255,e>>8&255):bn(e>>16&255,e>>8&255,e&255);return n},ov=typeof atob=="function"?t=>atob(rT(t)):pu?t=>Buffer.from(t,"base64").toString("binary"):oT,lT=pu?t=>m8(Buffer.from(t,"base64")):t=>m8(ov(t).split("").map(e=>e.charCodeAt(0))),cT=t=>lT(uT(t)),RR=pu?t=>Buffer.from(t,"base64").toString("utf8"):h8?t=>h8.decode(lT(t)):t=>aT(ov(t)),uT=t=>rT(t.replace(/[-_]/g,e=>e=="-"?"+":"/")),E4=t=>RR(uT(t)),jR=t=>{if(typeof t!="string")return!1;const e=t.replace(/\s+/g,"").replace(/={0,2}$/,"");return!/[^\s0-9a-zA-Z\+/]/.test(e)||!/[^\s0-9a-zA-Z\-_]/.test(e)},dT=t=>({value:t,enumerable:!1,writable:!0,configurable:!0}),fT=function(){const t=(e,n)=>Object.defineProperty(String.prototype,e,dT(n));t("fromBase64",function(){return E4(this)}),t("toBase64",function(e){return Dc(this,e)}),t("toBase64URI",function(){return Dc(this,!0)}),t("toBase64URL",function(){return Dc(this,!0)}),t("toUint8Array",function(){return cT(this)})},hT=function(){const t=(e,n)=>Object.defineProperty(Uint8Array.prototype,e,dT(n));t("toBase64",function(e){return up(this,e)}),t("toBase64URI",function(){return up(this,!0)}),t("toBase64URL",function(){return up(this,!0)})},FR=()=>{fT(),hT()},BR={version:tT,VERSION:AR,atob:ov,atobPolyfill:oT,btoa:av,btoaPolyfill:iT,fromBase64:E4,toBase64:Dc,encode:Dc,encodeURI:y8,encodeURL:y8,utob:sT,btou:aT,decode:E4,isValid:jR,fromUint8Array:up,toUint8Array:cT,extendString:fT,extendUint8Array:hT,extendBuiltins:FR},v8=t=>t.toLowerCase().split(" ").join("-"),k4=async()=>{let t;try{t=await navigator.clipboard.readText(),console.log("Content read from clipboard: ",t)}catch(e){console.error("Failed to read: ",e)}return t},C4=async t=>{try{await navigator.clipboard.writeText(t),console.log("Content copied to clipboard")}catch(e){console.error("Failed to copy: ",e)}},pT=()=>"maxTouchPoints"in navigator?navigator.maxTouchPoints>0:!1,HR=t=>JSON.parse(BR.decode(decodeURIComponent(t)));var T0=Sn.GenIcon,zR=function(e){return T0({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{d:"M2.00488 4C2.00488 3.44772 2.4526 3 3.00488 3H21.0049C21.5572 3 22.0049 3.44772 22.0049 4V9.5C20.6242 9.5 19.5049 10.6193 19.5049 12C19.5049 13.3807 20.6242 14.5 22.0049 14.5V20C22.0049 20.5523 21.5572 21 21.0049 21H3.00488C2.4526 21 2.00488 20.5523 2.00488 20V4ZM8.09024 19C8.29615 18.4174 8.85177 18 9.50488 18C10.158 18 10.7136 18.4174 10.9195 19H20.0049V16.0322C18.5232 15.2959 17.5049 13.7669 17.5049 12C17.5049 10.2331 18.5232 8.70411 20.0049 7.96776V5H10.9195C10.7136 5.5826 10.158 6 9.50488 6C8.85177 6 8.29615 5.5826 8.09024 5H4.00488V19H8.09024ZM9.50488 11C8.67646 11 8.00488 10.3284 8.00488 9.5C8.00488 8.67157 8.67646 8 9.50488 8C10.3333 8 11.0049 8.67157 11.0049 9.5C11.0049 10.3284 10.3333 11 9.50488 11ZM9.50488 16C8.67646 16 8.00488 15.3284 8.00488 14.5C8.00488 13.6716 8.67646 13 9.50488 13C10.3333 13 11.0049 13.6716 11.0049 14.5C11.0049 15.3284 10.3333 16 9.50488 16Z"}}]})(e)},UR=function(e){return T0({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{d:"M20 13C18.3221 13 16.7514 13.4592 15.4068 14.2587C16.5908 15.6438 17.5269 17.2471 18.1465 19H20V13ZM16.0037 19C14.0446 14.3021 9.4079 11 4 11V19H16.0037ZM4 9C7.82914 9 11.3232 10.4348 13.9738 12.7961C15.7047 11.6605 17.7752 11 20 11V3H21.0082C21.556 3 22 3.44495 22 3.9934V20.0066C22 20.5552 21.5447 21 21.0082 21H2.9918C2.44405 21 2 20.5551 2 20.0066V3.9934C2 3.44476 2.45531 3 2.9918 3H6V1H8V5H4V9ZM18 1V5H10V3H16V1H18ZM16.5 10C15.6716 10 15 9.32843 15 8.5C15 7.67157 15.6716 7 16.5 7C17.3284 7 18 7.67157 18 8.5C18 9.32843 17.3284 10 16.5 10Z"}}]})(e)},$R=function(e){return T0({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{d:"M3 13H11V3H3V13ZM3 21H11V15H3V21ZM13 21H21V11H13V21ZM13 3V9H21V3H13Z"}}]})(e)},VR=function(e){return T0({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{d:"M18 8H20C20.5523 8 21 8.44772 21 9V21C21 21.5523 20.5523 22 20 22H4C3.44772 22 3 21.5523 3 21V9C3 8.44772 3.44772 8 4 8H6V7C6 3.68629 8.68629 1 12 1C15.3137 1 18 3.68629 18 7V8ZM5 10V20H19V10H5ZM11 14H13V16H11V14ZM7 14H9V16H7V14ZM15 14H17V16H15V14ZM16 8V7C16 4.79086 14.2091 3 12 3C9.79086 3 8 4.79086 8 7V8H16Z"}}]})(e)},S0=Sn.GenIcon,YR=function(e){return S0({tag:"svg",attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"circle",attr:{cx:"12",cy:"12",r:"10"}},{tag:"line",attr:{x1:"8",y1:"12",x2:"16",y2:"12"}}]})(e)},WR=function(e){return S0({tag:"svg",attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"circle",attr:{cx:"12",cy:"12",r:"10"}},{tag:"line",attr:{x1:"12",y1:"8",x2:"12",y2:"16"}},{tag:"line",attr:{x1:"8",y1:"12",x2:"16",y2:"12"}}]})(e)},GR=function(e){return S0({tag:"svg",attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M19 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h11l5 5v11a2 2 0 0 1-2 2z"}},{tag:"polyline",attr:{points:"17 21 17 13 7 13 7 21"}},{tag:"polyline",attr:{points:"7 3 7 8 15 8"}}]})(e)},KR=function(e){return S0({tag:"svg",attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"circle",attr:{cx:"12",cy:"12",r:"3"}},{tag:"path",attr:{d:"M19.4 15a1.65 1.65 0 0 0 .33 1.82l.06.06a2 2 0 0 1 0 2.83 2 2 0 0 1-2.83 0l-.06-.06a1.65 1.65 0 0 0-1.82-.33 1.65 1.65 0 0 0-1 1.51V21a2 2 0 0 1-2 2 2 2 0 0 1-2-2v-.09A1.65 1.65 0 0 0 9 19.4a1.65 1.65 0 0 0-1.82.33l-.06.06a2 2 0 0 1-2.83 0 2 2 0 0 1 0-2.83l.06-.06a1.65 1.65 0 0 0 .33-1.82 1.65 1.65 0 0 0-1.51-1H3a2 2 0 0 1-2-2 2 2 0 0 1 2-2h.09A1.65 1.65 0 0 0 4.6 9a1.65 1.65 0 0 0-.33-1.82l-.06-.06a2 2 0 0 1 0-2.83 2 2 0 0 1 2.83 0l.06.06a1.65 1.65 0 0 0 1.82.33H9a1.65 1.65 0 0 0 1-1.51V3a2 2 0 0 1 2-2 2 2 0 0 1 2 2v.09a1.65 1.65 0 0 0 1 1.51 1.65 1.65 0 0 0 1.82-.33l.06-.06a2 2 0 0 1 2.83 0 2 2 0 0 1 0 2.83l-.06.06a1.65 1.65 0 0 0-.33 1.82V9a1.65 1.65 0 0 0 1.51 1H21a2 2 0 0 1 2 2 2 2 0 0 1-2 2h-.09a1.65 1.65 0 0 0-1.51 1z"}}]})(e)};const qR="@storecraft/dashboard",QR="1.0.15",ZR="Storecraft Official Dashboard",XR="MIT",JR="Tomer Shalev (https://github.com/store-craft)",ej="https://github.com/store-craft/storecraft",tj={type:"git",url:"https://github.com/store-craft/storecraft.git",directory:"packages/dashboard"},nj=["commerce","dashboard","react","storecraft"],rj="module",ij="./src/index.jsx",sj={".":{import:"./dist/lib/index.js",require:"./dist/lib/index.umd.cjs",types:"./dist/lib/src/index.d.ts"}},aj={start:"npm run dashboard:dev","dashboard:dev":"vite --host","dashboard:build":"vite build && npm run dashboard:lib:build","dashboard:lib:build":"vite build -c vite.lib.config.js","dashboard:lint":"eslint . --ext js,jsx --report-unused-disable-directives --max-warnings 0","dashboard:preview":"vite preview","dashboard:analyze":"npx vite-bundle-visualizer -c vite.lib.config.js",prepublishOnly:"npm run dashboard:build && npm version patch --force","sc-publish":"npm publish"},oj={"@storecraft/core":"^1.0.0","@storecraft/sdk":"^1.0.0","@storecraft/sdk-react-hooks":"^1.0.0","@uiw/react-md-editor":"^3.18.1","@monaco-editor/react":"^4.6.0","monaco-editor":"^0.48.0","chart.js":"^4.2.0",handlebars:"^4.7.8","js-base64":"^3.7.5",marked:"^5.0.2",react:"18.2.0","react-datepicker":"^4.10.0","react-dom":"18.2.0","react-drag-drop-container":"^6.1.1","react-icons":"^4.9.0","react-image-crop":"^10.0.7","react-inspector":"^6.0.1","react-router-dom":"^6.14.1"},lj={"@types/react":"^18.2.66","@types/react-datepicker":"^6.2.0","@types/react-dom":"^18.2.22","@types/react-image-crop":"^8.1.6","@vitejs/plugin-react":"^4.2.1",autoprefixer:"^10.4.19",eslint:"^8.57.0","eslint-plugin-react":"^7.34.1","eslint-plugin-react-hooks":"^4.6.0","eslint-plugin-react-refresh":"^0.4.6",postcss:"^8.4.38","postcss-flexbugs-fixes":"^5.0.2","postcss-import":"^14.1.0","postcss-preset-env":"^7.7.2",sass:"^1.58.3","tailwind-scrollbar":"^2.1.0",tailwindcss:"^3.4.3",vite:"^5.2.0","vite-plugin-css-injected-by-js":"^3.5.1","vite-plugin-dts":"^3.9.1"},cj=["dist"],uj={name:qR,version:QR,description:ZR,license:XR,author:JR,homepage:ej,repository:tj,keywords:nj,type:rj,module:ij,exports:sj,scripts:aj,dependencies:oj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ntZYC8+8QGF+Od12ZXrYPCZX0C1VEGcMFnLYiKbFxF5NkSq2JUSc/A2VKJTIK1yXYOLeSOi/s1HAq8DGBQPA68wz7Fm6MpnmTOBXoxlfa3PomqRxKN+OiqNJHR1iC1rk+Jj7ZgArS0FAjFODkNclCsdba4HQWonQKT8xQGf0bC+Vgk2xcOKCGl0IbtsNSzd9Jl/LX7rn18r7hmIKVq0w8oVJuMdqbF5x17aMz0JX3BFOXeZo9yjiLkzcbzkYGFxHMFNaOsRWSIIcV0rMGUOf2X8oRmeDooVJOCO7aGXy5s98AGvWcaILDmueVB7Du13TAOmIsuqqEgmKmCPTUOqIwNaCilesiFXKoNLRZYAZ1Wp/5MIyaYEucevlPArRiEs9PBTG1TRhPbBEH17csHS2878/N8OdnZkZwUMp1zd+bUDO/3qJ8/xOUVarKDYb6ZIzz8QqaElMtF6OOJ3K0xGY8VGoP1nOKhP3Tr6/bG9uThv5ZCJNX//wys+aY0M1tqYWYHEfotBcj6VVRfoLjJLg1p2IXioYVpbRR0aorm3B7LtS+AG5wxIxZqhDKj9jzsWlqNSOyFj4yYtaNbiEMM5unuWQMY5DSUnClUHpZxod26/1R5jNUf3uPuAKD3Zcs0+RCBTaYTEUe03OS/n2qhdwGAjLrWxJ/JUwQ92aODwSFlGJWghoJk4Ir1LFAtFwGmPIy0Wn3bJoueeKzhlQFuzzOYO2NubH1AVph7dFmuP+HUpzipRU6bSOOTyiJgSShZJypoxHrz9ZBQG81NCqLXgl1AJ6YFMWwFWFXxGTULNFpkRVBgeC4ri8UPoAdxwXJO5slbTqbUyNQyQmEwbSVHEZ4lDJBdFZA7NBZ+p/F8f0eDkJ+Qmsbco9kSE64p7YcixLu7Pcu0O0zU7gIpyMRRbooKtux3/CRMitNFcerR3AAAAAElFTkSuQmCC",fj=({children:t,...e})=>f.jsxs("svg",{viewBox:"0 0 302 53",...e,children:[t,f.jsxs("g",{className:"",children:[f.jsx("path",{d:"M 29.756 18.948 C 29.962 17.646 29.691 16.631 28.944 15.903 C 28.196 15.175 26.964 14.811 25.248 14.811 C 24.111 14.811 23.127 14.959 22.296 15.255 C 21.465 15.551 20.795 15.956 20.288 16.471 C 19.781 16.986 19.439 17.575 19.262 18.238 C 19.103 18.783 19.093 19.262 19.232 19.676 C 19.371 20.091 19.636 20.455 20.025 20.768 C 20.414 21.082 20.911 21.357 21.515 21.594 C 21.883 21.738 22.285 21.872 22.72 21.994 L 9.695 21.994 C 9.62 21.043 9.728 19.992 10.02 18.842 C 10.569 16.593 11.665 14.622 13.306 12.929 C 14.947 11.236 16.963 9.917 19.353 8.97 C 21.744 8.023 24.318 7.549 27.076 7.549 C 29.893 7.549 32.222 8.026 34.062 8.979 C 35.901 9.932 37.181 11.266 37.902 12.982 C 38.622 14.699 38.712 16.687 38.172 18.948 Z M 30.923 24.488 C 32.14 25.139 33.106 25.915 33.823 26.814 C 34.346 27.47 34.729 28.199 34.974 29 L 18.016 29 L 17.649 28.909 C 14.68 28.187 12.492 27.018 11.084 25.403 C 10.7 24.963 10.395 24.48 10.167 23.955 L 29.804 23.955 C 30.197 24.122 30.57 24.299 30.923 24.488 Z M 34.951 33.863 C 34.761 34.61 34.519 35.322 34.226 36 L 24.639 36 C 24.716 35.935 24.79 35.867 24.862 35.798 C 25.453 35.23 25.847 34.579 26.042 33.845 C 26.201 33.159 26.135 32.57 25.843 32.079 C 25.593 31.659 25.169 31.286 24.572 30.961 L 35.287 30.961 C 35.313 31.856 35.201 32.823 34.951 33.863 Z M 31.736 39.776 C 30.178 41.421 28.216 42.682 25.849 43.558 C 23.482 44.434 20.783 44.872 17.753 44.872 C 14.711 44.872 12.173 44.416 10.139 43.504 C 8.106 42.593 6.693 41.208 5.902 39.35 C 5.716 38.914 5.571 38.451 5.466 37.961 L 33.173 37.961 C 32.751 38.605 32.273 39.21 31.736 39.776 Z M 5.724 32.301 L 14.14 32.301 C 13.919 33.472 13.989 34.449 14.351 35.23 C 14.481 35.511 14.644 35.768 14.841 36 L 5.261 36 C 5.252 34.877 5.406 33.644 5.724 32.301 Z M 38.769 15.184 L 40.549 8.046 L 71.284 8.046 L 69.504 15.184 L 58.478 15.184 L 56.78 21.994 L 48.115 21.994 L 49.813 15.184 Z M 51.191 44.41 L 42.526 44.41 L 44.134 37.961 L 52.799 37.961 Z M 99.63 26.228 C 99.391 27.187 99.116 28.111 98.806 29 L 89.779 29 C 90.11 28.14 90.399 27.216 90.645 26.228 C 90.844 25.428 90.995 24.671 91.098 23.955 L 100.109 23.955 C 99.984 24.689 99.825 25.447 99.63 26.228 Z M 86.963 42.741 C 83.981 44.185 80.862 44.907 77.607 44.907 C 74.34 44.907 71.58 44.179 69.327 42.723 C 67.525 41.558 66.174 39.971 65.276 37.961 L 93.429 37.961 C 91.516 39.987 89.36 41.58 86.963 42.741 Z M 64.917 26.228 C 65.112 25.447 65.33 24.689 65.572 23.955 L 74.565 23.955 C 74.31 24.671 74.083 25.428 73.884 26.228 C 73.638 27.216 73.466 28.14 73.368 29 L 64.359 29 C 64.492 28.111 64.678 27.187 64.917 26.228 Z M 69.753 16.054 C 71.98 13.273 74.581 11.16 77.557 9.715 C 80.533 8.271 83.655 7.549 86.922 7.549 C 90.177 7.549 92.936 8.271 95.197 9.715 C 97.459 11.16 99.013 13.273 99.858 16.054 C 100.387 17.795 100.555 19.775 100.362 21.994 L 91.258 21.994 C 91.266 21.364 91.226 20.775 91.138 20.227 C 90.877 18.593 90.226 17.356 89.187 16.516 C 88.148 15.675 86.752 15.255 85 15.255 C 83.26 15.255 81.658 15.675 80.194 16.516 C 78.73 17.356 77.46 18.593 76.383 20.227 C 76.022 20.775 75.689 21.364 75.382 21.994 L 66.295 21.994 C 67.207 19.775 68.36 17.795 69.753 16.054 Z M 73.391 32.23 C 73.652 33.863 74.306 35.1 75.351 35.941 C 75.376 35.961 75.401 35.981 75.426 36 L 64.58 36 C 64.175 34.492 64.031 32.813 64.148 30.961 L 73.276 30.961 C 73.288 31.406 73.327 31.829 73.391 32.23 Z M 84.344 35.941 C 85.803 35.1 87.07 33.863 88.146 32.23 C 88.41 31.829 88.659 31.406 88.894 30.961 L 98.04 30.961 C 97.234 32.813 96.254 34.492 95.1 36 L 84.24 36 C 84.275 35.981 84.309 35.961 84.344 35.941 Z M 96.11 44.41 L 97.718 37.961 L 106.507 37.961 L 104.899 44.41 Z M 105.177 8.046 L 120.198 8.046 C 122.921 8.046 125.152 8.534 126.891 9.511 C 128.63 10.488 129.811 11.885 130.436 13.702 C 131.06 15.519 131.062 17.67 130.442 20.156 C 130.283 20.793 130.095 21.406 129.878 21.994 L 120.615 21.994 C 120.922 21.458 121.162 20.845 121.334 20.156 C 121.614 19.031 121.615 18.099 121.338 17.359 C 121.061 16.619 120.52 16.063 119.713 15.69 C 118.906 15.317 117.846 15.131 116.532 15.131 L 112.199 15.131 L 110.488 21.994 L 101.699 21.994 Z M 127.191 26.574 C 126.381 27.499 125.472 28.308 124.465 29 L 99.952 29 L 101.21 23.955 L 109.999 23.955 L 109.729 25.039 L 114.061 25.039 C 115.387 25.039 116.54 24.864 117.521 24.515 C 117.948 24.363 118.342 24.176 118.704 23.955 L 129 23.955 C 128.49 24.906 127.887 25.779 127.191 26.574 Z M 125.347 43.426 L 126.71 37.961 L 152.065 37.961 L 150.457 44.41 L 125.102 44.41 L 125.347 43.426 L 125.638 44.41 L 116.05 44.41 L 114.213 37.961 L 123.732 37.961 Z M 134.168 8.046 L 159.523 8.046 L 157.744 15.184 L 141.178 15.184 L 139.48 21.994 L 130.691 21.994 Z M 112.504 31.963 L 108.002 31.963 L 106.996 36 L 98.207 36 L 99.463 30.961 L 121.663 30.961 L 123.152 36 L 113.654 36 Z M 56.291 23.955 L 55.033 29 L 46.368 29 L 47.626 23.955 Z M 54.544 30.961 L 53.288 36 L 44.623 36 L 45.879 30.961 Z M 127.199 36 L 128.455 30.961 L 137.244 30.961 L 135.987 36 Z M 128.944 29 L 130.202 23.955 L 154.261 23.955 L 153.003 29 Z",sstyle:"fill: rgb(51, 51, 51);"}),f.jsx("path",{d:"M 188.795 19.736 L 185.933 19.736 Q 185.571 17.852 184.575 16.15 Q 183.579 14.448 182.058 13.135 Q 180.536 11.822 178.562 11.061 Q 176.588 10.3 174.234 10.3 Q 170.648 10.3 167.668 12.193 Q 164.689 14.085 162.905 17.744 Q 161.121 21.402 161.121 26.691 Q 161.121 32.015 162.905 35.664 Q 164.689 39.314 167.668 41.197 Q 170.648 43.081 174.234 43.081 Q 176.588 43.081 178.562 42.329 Q 180.536 41.578 182.058 40.265 Q 183.579 38.952 184.575 37.24 Q 185.571 35.529 185.933 33.645 L 188.795 33.645 Q 188.36 36.036 187.174 38.218 Q 185.988 40.4 184.122 42.094 Q 182.257 43.787 179.766 44.765 Q 177.276 45.743 174.234 45.743 Q 169.579 45.743 166.002 43.389 Q 162.425 41.034 160.397 36.751 Q 158.369 32.468 158.369 26.691 Q 158.369 20.913 160.397 16.63 Q 162.425 12.347 166.002 9.992 Q 169.579 7.638 174.234 7.638 Q 177.276 7.638 179.766 8.607 Q 182.257 9.576 184.122 11.269 Q 185.988 12.963 187.174 15.136 Q 188.36 17.309 188.795 19.736 Z M 192.123 45.236 L 192.123 8.145 L 203.823 8.145 Q 207.554 8.145 210.143 9.54 Q 212.733 10.934 214.092 13.406 Q 215.45 15.878 215.45 19.12 Q 215.45 22.326 214.092 24.78 Q 212.733 27.234 210.152 28.61 Q 207.572 29.987 203.859 29.987 L 193.644 29.987 L 193.644 27.379 L 203.787 27.379 Q 206.666 27.379 208.649 26.365 Q 210.632 25.35 211.647 23.494 Q 212.661 21.638 212.661 19.12 Q 212.661 16.585 211.638 14.692 Q 210.614 12.8 208.631 11.749 Q 206.648 10.699 203.75 10.699 L 194.948 10.699 L 194.948 45.236 Z M 207.916 28.465 L 217.044 45.236 L 213.784 45.236 L 204.728 28.465 Z M 218.397 45.236 L 215.445 45.236 L 228.883 8.145 L 231.98 8.145 L 245.418 45.236 L 242.466 45.236 L 230.549 11.785 L 230.332 11.785 Z M 221.385 31.146 L 239.496 31.146 L 239.496 33.718 L 221.385 33.718 Z M 247.05 45.236 L 247.05 8.145 L 268.131 8.145 L 268.131 10.699 L 249.876 10.699 L 249.876 25.387 L 266.429 25.387 L 266.429 27.958 L 249.876 27.958 L 249.876 45.236 Z M 269.583 10.699 L 269.583 8.145 L 296.024 8.145 L 296.024 10.699 L 284.216 10.699 L 284.216 45.236 L 281.391 45.236 L 281.391 10.699 Z",transform:"matrix(0.998892068862915, 0, 0, 1, 0.17177101969718933, 0)",sstyle:"fill: rgb(51, 51, 51);"})]})]}),mT=({className:t})=>f.jsx(fj,{className:"fill-[url(#a)] text-pink-500 "+t,children:f.jsx("defs",{children:f.jsxs("linearGradient",{id:"a",children:[f.jsx("stop",{offset:"0%","stop-color":"rgb(236 72 153)"}),f.jsx("stop",{offset:"100%","stop-color":"rgb(151 60 255)"})]})})}),hj=({...t})=>{const e=({})=>f.jsxs("div",{className:`rounded-lg my-auto b
144
144
  bg-pink-50 dark:bg-pink-50/10 w-fit text-sm
145
145
  text-pink-500 -tracking-wideset
146
146
  py-0 px-1 --border font-semibold`,children:[f.jsx("div",{children:"docs",className:"inline-block -translate-y-px --inline"}),f.jsx("span",{children:" 📖"})]});return f.jsxs("div",{className:`relative w-full h-16 flex flex-row
@@ -348,13 +348,13 @@ data
348
348
  flex-row justify-between items-center px-3
349
349
  ${i}`,children:[f.jsx(_s,{Icon:f.jsx(dm,{className:"rotate-180"}),text:"",className:"text-lg",onClick:e}),f.jsxs("select",{name:"limit",onChange:s,value:n,className:`m-1 h-8 px-4 rounded-md text-sm
350
350
  bg-slate-50 dark:bg-slate-800
351
- --border focus:outline-none`,children:[f.jsx("option",{value:"5",children:"5"}),f.jsx("option",{value:"10",children:"10"}),f.jsx("option",{value:"15",children:"15"}),f.jsx("option",{value:"20",children:"20"})]}),f.jsx(_s,{Icon:f.jsx(dm,{}),text:"",className:"text-lg ",onClick:t})]})},Pv=_.forwardRef(({title:t=f.jsx("p",{children:"NA",className:"text-gray-500"}),onApprove:e,...n},r)=>{const[i,s]=_.useState({data:void 0,message:"NA"}),a=_.useRef();_.useImperativeHandle(r,()=>({hide:()=>a.current.hide(),show:()=>a.current.show(),setDataAndMessage:(l,c,u)=>{s({data:l,message:c}),u&&a.current.show()}}),[]);const o=_.useCallback((l,c)=>{e!==void 0&&(l.preventDefault(),l.stopPropagation(),r.current.hide(),e(i.data,c))},[i,e]);return f.jsx(ha,{ref:a,children:f.jsxs(fa,{name:t,cardClass:"shelf-card-light",className:"max-w-96 w-full",onClick:l=>l.stopPropagation(),children:[f.jsx("p",{children:i.message,className:"text-red-500 text-lg break-words w-full whitespace-pre-wrap"}),f.jsxs("div",{className:"flex flex-row justify-between mt-10 text-base",children:[f.jsx(Wn,{stroke:"border-b-2",btnClassName:"rounded-none",rounded:"rounded-none",children:"No",onClick:()=>r.current.hide()}),f.jsx(Wn,{stroke:"border-b-2",btnClassName:"rounded-none",rounded:"rounded-none",children:"Yes",onClick:l=>o(l)})]})]})})});var jY=Sn.GenIcon,zS=function(e){return jY({tag:"svg",attr:{viewBox:"0 0 15 15",fill:"none"},child:[{tag:"path",attr:{fillRule:"evenodd",clipRule:"evenodd",d:"M1 9.50006C1 10.3285 1.67157 11.0001 2.5 11.0001H4L4 10.0001H2.5C2.22386 10.0001 2 9.7762 2 9.50006L2 2.50006C2 2.22392 2.22386 2.00006 2.5 2.00006L9.5 2.00006C9.77614 2.00006 10 2.22392 10 2.50006V4.00002H5.5C4.67158 4.00002 4 4.67159 4 5.50002V12.5C4 13.3284 4.67158 14 5.5 14H12.5C13.3284 14 14 13.3284 14 12.5V5.50002C14 4.67159 13.3284 4.00002 12.5 4.00002H11V2.50006C11 1.67163 10.3284 1.00006 9.5 1.00006H2.5C1.67157 1.00006 1 1.67163 1 2.50006V9.50006ZM5 5.50002C5 5.22388 5.22386 5.00002 5.5 5.00002H12.5C12.7761 5.00002 13 5.22388 13 5.50002V12.5C13 12.7762 12.7761 13 12.5 13H5.5C5.22386 13 5 12.7762 5 12.5V5.50002Z",fill:"currentColor"}}]})(e)};const yf=({to:t,current_state:e,next_state:n,onClick:r,...i})=>{const{navWithState:s}=zi(),a=_.useCallback(o=>{e=typeof e=="function"?e():e,n=typeof n=="function"?n():n,s(t,e,n),r&&r(),o.preventDefault()},[t,r,s,e,n]);return f.jsx(on,{to:t,onClick:a,...i})},zi=()=>{const t=Ml(),e=da(),n=_.useCallback((r,i,s)=>{i=typeof i=="function"?i():i,s=typeof s=="function"?s():s,i!==void 0&&e(t,{replace:!0,state:i}),e(r,{state:s})},[e,t]);return{nav:e,navWithState:n,location:t,state:t.state}},yp=(t,e=0)=>({field:r,value:i,onChange:s})=>{const{key:a,name:o,comp_params:l}=r,[c,u]=_.useState(i??t[e]),d=_.useCallback(g=>{const y=t.find(v=>v.id==parseInt(g.target.value).toString());u(y),s&&s(y)},[t]),{className:h,...p}=l,m="h-10 px-1 w-full shelf-input-color rounded-md text-sm focus:outline-none "+h;return f.jsx("select",{name:"limit",onChange:d,value:c.id,className:m,...p,children:t.map((g,y)=>f.jsx("option",{value:g.id,children:g.name},y))})},FY="pr-3 py-2 max-w-[18rem] overflow-clip hover:overflow-x-auto inline-block whitespace-nowrap",zt=({value:t,children:e,className:n,extra:r="max-w-[8rem] md:max-w-[18rem]",...i})=>{const a=`overflow-clip hover:overflow-x-auto inline-block whitespace-nowrap ${n} ${r}`;return f.jsx("div",{className:a,...i,children:f.jsx("div",{children:t??e})})},US=({field:t,value:e,className:n,name_fn:r=o=>o,classNameDelimiter:i="text-pink-600 font-bold text-lg",delimiter:s=" / ",...a})=>{const o=e==null?void 0:e.map((l,c)=>f.jsxs("span",{children:[f.jsx("span",{children:r(l)}),c<(e==null?void 0:e.length)-1&&f.jsx("span",{children:s,className:i})]},c));return f.jsx("p",{className:`${FY} ${n}`,children:o,...a})},Ss=({field:t,value:e,...n})=>{const{key:r,name:i,comp_params:s}=t;return f.jsx("p",{children:new Date(e).toLocaleDateString(),...s,...n})},Pe=({field:t,value:e,onChange:n,type:r="text",...i})=>{const{key:s,name:a,comp_params:o}=t,l={...o,...i},{className:c,setError:u,error:d,...h}=l,p=_.useCallback(m=>{let g=m.currentTarget.value;r==="number"&&(g=parseFloat(g)),n(g)},[n,r]);return f.jsx(eT,{type:t.type,onWheel:m=>m.target.blur(),className:c,value:e??"",onChange:p,...h})},q6=({value:t,field:e,onChange:n,setError:r,...i})=>{const s=_.useCallback(async()=>{const a=await k4();console.log(a),a&&n(a)},[n,k4]);return f.jsxs("div",{...i,children:[f.jsx("div",{className:"w-full flex flex-row justify-end",children:f.jsx("p",{children:"From Clipboard",className:`w-fit underline cursor-pointer
351
+ --border focus:outline-none`,children:[f.jsx("option",{value:"5",children:"5"}),f.jsx("option",{value:"10",children:"10"}),f.jsx("option",{value:"15",children:"15"}),f.jsx("option",{value:"20",children:"20"})]}),f.jsx(_s,{Icon:f.jsx(dm,{}),text:"",className:"text-lg ",onClick:t})]})},Pv=_.forwardRef(({title:t=f.jsx("p",{children:"NA",className:"text-gray-500"}),onApprove:e,...n},r)=>{const[i,s]=_.useState({data:void 0,message:"NA"}),a=_.useRef();_.useImperativeHandle(r,()=>({hide:()=>a.current.hide(),show:()=>a.current.show(),setDataAndMessage:(l,c,u)=>{s({data:l,message:c}),u&&a.current.show()}}),[]);const o=_.useCallback((l,c)=>{e!==void 0&&(l.preventDefault(),l.stopPropagation(),r.current.hide(),e(i.data,c))},[i,e]);return f.jsx(ha,{ref:a,children:f.jsxs(fa,{name:t,cardClass:"shelf-card-light",className:"max-w-96 w-full",onClick:l=>l.stopPropagation(),children:[f.jsx("p",{children:i.message,className:"text-red-500 text-lg break-words w-full whitespace-pre-wrap"}),f.jsxs("div",{className:"flex flex-row justify-between mt-10 text-base",children:[f.jsx(Wn,{stroke:"border-b-2",btnClassName:"rounded-none",rounded:"rounded-none",children:"No",onClick:()=>r.current.hide()}),f.jsx(Wn,{stroke:"border-b-2",btnClassName:"rounded-none",rounded:"rounded-none",children:"Yes",onClick:l=>o(l)})]})]})})});var jY=Sn.GenIcon,zS=function(e){return jY({tag:"svg",attr:{viewBox:"0 0 15 15",fill:"none"},child:[{tag:"path",attr:{fillRule:"evenodd",clipRule:"evenodd",d:"M1 9.50006C1 10.3285 1.67157 11.0001 2.5 11.0001H4L4 10.0001H2.5C2.22386 10.0001 2 9.7762 2 9.50006L2 2.50006C2 2.22392 2.22386 2.00006 2.5 2.00006L9.5 2.00006C9.77614 2.00006 10 2.22392 10 2.50006V4.00002H5.5C4.67158 4.00002 4 4.67159 4 5.50002V12.5C4 13.3284 4.67158 14 5.5 14H12.5C13.3284 14 14 13.3284 14 12.5V5.50002C14 4.67159 13.3284 4.00002 12.5 4.00002H11V2.50006C11 1.67163 10.3284 1.00006 9.5 1.00006H2.5C1.67157 1.00006 1 1.67163 1 2.50006V9.50006ZM5 5.50002C5 5.22388 5.22386 5.00002 5.5 5.00002H12.5C12.7761 5.00002 13 5.22388 13 5.50002V12.5C13 12.7762 12.7761 13 12.5 13H5.5C5.22386 13 5 12.7762 5 12.5V5.50002Z",fill:"currentColor"}}]})(e)};const yf=({to:t,current_state:e,next_state:n,onClick:r,...i})=>{const{navWithState:s}=zi(),a=_.useCallback(o=>{e=typeof e=="function"?e():e,n=typeof n=="function"?n():n,s(t,e,n),r&&r(),o.preventDefault()},[t,r,s,e,n]);return f.jsx(on,{to:t,onClick:a,...i})},zi=()=>{const t=Ml(),e=da(),n=_.useCallback((r,i,s)=>{i=typeof i=="function"?i():i,s=typeof s=="function"?s():s,i!==void 0&&e(t,{replace:!0,state:i}),e(r,{state:s})},[e,t]);return{nav:e,navWithState:n,location:t,state:t.state}},yp=(t,e=0)=>({field:r,value:i,onChange:s})=>{const{key:a,name:o,comp_params:l}=r,[c,u]=_.useState(i??t[e]),d=_.useCallback(g=>{const y=t.find(v=>v.id==parseInt(g.target.value).toString());u(y),s&&s(y)},[t]),{className:h,...p}=l,m="h-10 px-1 w-full shelf-input-color rounded-md text-sm focus:outline-none "+h;return f.jsx("select",{name:"limit",onChange:d,value:c.id,className:m,...p,children:t.map((g,y)=>f.jsx("option",{value:g.id,children:g.name},y))})},FY="pr-3 py-2 max-w-[18rem] overflow-clip hover:overflow-x-auto inline-block whitespace-nowrap",zt=({value:t,children:e,className:n,extra:r="max-w-[8rem] md:max-w-[18rem]",...i})=>{const a=`overflow-clip hover:overflow-x-auto inline-block whitespace-nowrap ${n} ${r}`;return f.jsx("div",{className:a,...i,children:f.jsx("div",{children:t??e})})},US=({field:t,value:e,className:n,name_fn:r=o=>o,classNameDelimiter:i="text-pink-600 font-bold text-lg",delimiter:s=" / ",...a})=>{const o=e==null?void 0:e.map((l,c)=>f.jsxs("span",{children:[f.jsx("span",{children:r(l)}),c<(e==null?void 0:e.length)-1&&f.jsx("span",{children:s,className:i})]},c));return f.jsx("p",{className:`${FY} ${n}`,children:o,...a})},Ss=({field:t,value:e,...n})=>{const{key:r,name:i,comp_params:s}=t;return f.jsx("p",{children:new Date(e).toLocaleDateString(),...s,...n})},Le=({field:t,value:e,onChange:n,type:r="text",...i})=>{const{key:s,name:a,comp_params:o}=t,l={...o,...i},{className:c,setError:u,error:d,...h}=l,p=_.useCallback(m=>{let g=m.currentTarget.value;r==="number"&&(g=parseFloat(g)),n(g)},[n,r]);return f.jsx(eT,{type:t.type,onWheel:m=>m.target.blur(),className:c,value:e??"",onChange:p,...h})},q6=({value:t,field:e,onChange:n,setError:r,...i})=>{const s=_.useCallback(async()=>{const a=await k4();console.log(a),a&&n(a)},[n,k4]);return f.jsxs("div",{...i,children:[f.jsx("div",{className:"w-full flex flex-row justify-end",children:f.jsx("p",{children:"From Clipboard",className:`w-fit underline cursor-pointer
352
352
  shelf-text-label-color
353
353
  dark:bg-kf-50/10 p-1 rounded-md
354
- text-sm font-medium tracking-wider`,onClick:s})}),f.jsx(ot,{className:"w-full h-fit mt-2",children:f.jsx(Pe,{field:e,value:t,onChange:n,className:"w-full h-10"})})]})},j0=({value:t,field:e,onChange:n,context:r,setError:i,...s})=>{const a=_.useCallback(async()=>{const o=r.query.title.get(),l=b8(t)??b8(o);n&&n(l)},[n,r,t]);return f.jsxs("div",{...s,children:[f.jsx("div",{className:"w-full flex flex-row justify-end",children:f.jsx("p",{children:"Auto Suggest",className:`w-fit underline cursor-pointer
354
+ text-sm font-medium tracking-wider`,onClick:s})}),f.jsx(ot,{className:"w-full h-fit mt-2",children:f.jsx(Le,{field:e,value:t,onChange:n,className:"w-full h-10"})})]})},j0=({value:t,field:e,onChange:n,context:r,setError:i,...s})=>{const a=_.useCallback(async()=>{const o=r.query.title.get(),l=b8(t)??b8(o);n&&n(l)},[n,r,t]);return f.jsxs("div",{...s,children:[f.jsx("div",{className:"w-full flex flex-row justify-end",children:f.jsx("p",{children:"Auto Suggest",className:`w-fit underline cursor-pointer
355
355
  shelf-text-label-color
356
356
  dark:bg-kf-50/10 p-1 rounded-md
357
- text-sm font-medium tracking-wider`,onClick:a})}),f.jsx(ot,{className:"w-full h-fit mt-2",children:f.jsx(Pe,{field:e,value:t,onChange:n,className:"w-full h-10"})})]})},vf=({field:t,value:e=!0,onChange:n,...r})=>{const{key:i,name:s,comp_params:a}=t;({...a,...r});const[o,l]=_.useState(e),c=_.useCallback(()=>{const g=!o;l(g),n(g)},[o,n]);let u=`relative transition-all duration-300 --border
357
+ text-sm font-medium tracking-wider`,onClick:a})}),f.jsx(ot,{className:"w-full h-fit mt-2",children:f.jsx(Le,{field:e,value:t,onChange:n,className:"w-full h-10"})})]})},vf=({field:t,value:e=!0,onChange:n,...r})=>{const{key:i,name:s,comp_params:a}=t;({...a,...r});const[o,l]=_.useState(e),c=_.useCallback(()=>{const g=!o;l(g),n(g)},[o,n]);let u=`relative transition-all duration-300 --border
358
358
  rounded-3xl cursor-pointer w-16 h-8 flex flex-row`;u+=o?" bg-teal-500 ":" bg-red-400 ";const d="absolute rounded-full w-1/2 h-full bg-white border shadow-md",h="transition-all duration-300",p=o?"top-0 left-1/2":"top-0 left-0",m=d+" "+p+" "+h;return f.jsx("div",{className:u,onClick:c,children:f.jsx("div",{className:m})})},Rv=({value:t,config:e=1,process_before_copy:n=r=>r})=>{const[r,i]=_.useState(!1),s=_.useCallback(()=>{i(!0),C4(n(t)),setTimeout(()=>i(!1),2e3)},[t,n]);return f.jsxs("div",{className:`flex ${e==0?"flex-row":"flex-row-reverse"} gap-1`,children:[f.jsx(zS,{className:`text-lg cursor-pointer text-gray-500
359
359
  hover:text-gray-800 dark:hover:text-gray-400 inline`,onClick:s}),r&&f.jsx("span",{children:"(copied)",className:"text-xs"})]})},Q=(t,e={},n=!0,r=!1)=>({field:i,value:s,disabled:a,onChange:o,children:l,error:c=void 0,setError:u,context:d,...h})=>{const{key:p,desc:m,name:g,comp_params:y}=i,v={...i,comp_params:e},x=_.useMemo(()=>r?f.jsx(Rv,{value:JSON.stringify(s)}):null,[r,s]);return f.jsx(fa,{id:"card",name:g,error:c,...y,border:n,desc:m,rightView:x,setError:u,children:f.jsx(t,{field:v,value:s,onChange:o,disabled:a,children:l,error:c,setError:u,context:d,...e})})},Fr=({context:t,field:e,value:n,...r})=>{const i=_.useRef(),[s,a]=_.useState(!1),o=t.item.handle??t.item.id,l=_.useCallback(()=>{i.current.setDataAndMessage(o,`Are you sure you want to remove ${o} ?`),i.current.show()},[t]),c=_.useCallback(u=>{console.log("data_id",u),a(!0),t.deleteDocument(u).finally(()=>a(!1))},[t]);return f.jsxs("div",{className:`flex flex-row items-center text-center flex-shrink-0
360
360
  justify-end text-base overflow-clip w-fit mx-auto `,children:[!(t!=null&&t.editDocumentUrl)&&(t==null?void 0:t.viewDocumentUrl)&&f.jsx(on,{to:t.viewDocumentUrl(o),children:f.jsx(UP,{className:" text-xl text-teal-600 stroke-[0.5px] hover:stroke-[1px]"})}),(t==null?void 0:t.editDocumentUrl)&&f.jsx(yf,{to:t.editDocumentUrl(o),draggable:"false",current_state:()=>(t==null?void 0:t.getState)&&(t==null?void 0:t.getState()),children:f.jsx(jP,{className:`ml-3 text-2xl text-pink-500
@@ -472,7 +472,7 @@ data
472
472
  `}),n}function uQ(t){const e=[];let n=-1;for(;++n<t.footnoteOrder.length;){const r=t.footnoteById[t.footnoteOrder[n]];if(!r)continue;const i=t.all(r),s=String(r.identifier).toUpperCase(),a=vu(s.toLowerCase());let o=0;const l=[];for(;++o<=t.footnoteCounts[s];){const d={type:"element",tagName:"a",properties:{href:"#"+t.clobberPrefix+"fnref-"+a+(o>1?"-"+o:""),dataFootnoteBackref:!0,className:["data-footnote-backref"],ariaLabel:t.footnoteBackLabel},children:[{type:"text",value:"↩"}]};o>1&&d.children.push({type:"element",tagName:"sup",children:[{type:"text",value:String(o)}]}),l.length>0&&l.push({type:"text",value:" "}),l.push(d)}const c=i[i.length-1];if(c&&c.type==="element"&&c.tagName==="p"){const d=c.children[c.children.length-1];d&&d.type==="text"?d.value+=" ":c.children.push({type:"text",value:" "}),c.children.push(...l)}else i.push(...l);const u={type:"element",tagName:"li",properties:{id:t.clobberPrefix+"fn-"+a},children:t.wrap(i,!0)};t.patch(r,u),e.push(u)}if(e.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:t.footnoteLabelTagName,properties:{...JSON.parse(JSON.stringify(t.footnoteLabelProperties)),id:"footnote-label"},children:[{type:"text",value:t.footnoteLabel}]},{type:"text",value:`
473
473
  `},{type:"element",tagName:"ol",properties:{},children:t.wrap(e,!0)},{type:"text",value:`
474
474
  `}]}}function AN(t,e){const n=sQ(t,e),r=n.one(t,null),i=uQ(n);return i&&r.children.push({type:"text",value:`
475
- `},i),Array.isArray(r)?{type:"root",children:r}:r}const dQ=function(t,e){return t&&"run"in t?fQ(t,e):hQ(t||e)};function fQ(t,e){return(n,r,i)=>{t.run(AN(n,e),r,s=>{i(s)})}}function hQ(t){return e=>AN(e,t)}var DN={exports:{}},pQ="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED",mQ=pQ,gQ=mQ;function ON(){}function MN(){}MN.resetWarningCache=ON;var yQ=function(){function t(r,i,s,a,o,l){if(l!==gQ){var c=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw c.name="Invariant Violation",c}}t.isRequired=t;function e(){return t}var n={array:t,bigint:t,bool:t,func:t,number:t,object:t,string:t,symbol:t,any:t,arrayOf:e,element:t,elementType:t,instanceOf:e,node:t,objectOf:e,oneOf:e,oneOfType:e,shape:e,exact:e,checkPropTypes:MN,resetWarningCache:ON};return n.PropTypes=n,n};DN.exports=yQ();var vQ=DN.exports;const Me=Ir(vQ);class kf{constructor(e,n,r){this.property=e,this.normal=n,r&&(this.space=r)}}kf.prototype.property={};kf.prototype.normal={};kf.prototype.space=null;function IN(t,e){const n={},r={};let i=-1;for(;++i<t.length;)Object.assign(n,t[i].property),Object.assign(r,t[i].normal);return new kf(n,r,e)}function Ud(t){return t.toLowerCase()}class fi{constructor(e,n){this.property=e,this.attribute=n}}fi.prototype.space=null;fi.prototype.boolean=!1;fi.prototype.booleanish=!1;fi.prototype.overloadedBoolean=!1;fi.prototype.number=!1;fi.prototype.commaSeparated=!1;fi.prototype.spaceSeparated=!1;fi.prototype.commaOrSpaceSeparated=!1;fi.prototype.mustUseProperty=!1;fi.prototype.defined=!1;let xQ=0;const Le=Rl(),qt=Rl(),LN=Rl(),ae=Rl(),bt=Rl(),Lc=Rl(),vr=Rl();function Rl(){return 2**++xQ}const r9=Object.freeze(Object.defineProperty({__proto__:null,boolean:Le,booleanish:qt,commaOrSpaceSeparated:vr,commaSeparated:Lc,number:ae,overloadedBoolean:LN,spaceSeparated:bt},Symbol.toStringTag,{value:"Module"})),p2=Object.keys(r9);class Yv extends fi{constructor(e,n,r,i){let s=-1;if(super(e,n),L_(this,"space",i),typeof r=="number")for(;++s<p2.length;){const a=p2[s];L_(this,p2[s],(r&r9[a])===r9[a])}}}Yv.prototype.defined=!0;function L_(t,e,n){n&&(t[e]=n)}const _Q={}.hasOwnProperty;function xu(t){const e={},n={};let r;for(r in t.properties)if(_Q.call(t.properties,r)){const i=t.properties[r],s=new Yv(r,t.transform(t.attributes||{},r),i,t.space);t.mustUseProperty&&t.mustUseProperty.includes(r)&&(s.mustUseProperty=!0),e[r]=s,n[Ud(r)]=r,n[Ud(s.attribute)]=r}return new kf(e,n,t.space)}const PN=xu({space:"xlink",transform(t,e){return"xlink:"+e.slice(5).toLowerCase()},properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null}}),RN=xu({space:"xml",transform(t,e){return"xml:"+e.slice(3).toLowerCase()},properties:{xmlLang:null,xmlBase:null,xmlSpace:null}});function jN(t,e){return e in t?t[e]:e}function FN(t,e){return jN(t,e.toLowerCase())}const BN=xu({space:"xmlns",attributes:{xmlnsxlink:"xmlns:xlink"},transform:FN,properties:{xmlns:null,xmlnsXLink:null}}),HN=xu({transform(t,e){return e==="role"?e:"aria-"+e.slice(4).toLowerCase()},properties:{ariaActiveDescendant:null,ariaAtomic:qt,ariaAutoComplete:null,ariaBusy:qt,ariaChecked:qt,ariaColCount:ae,ariaColIndex:ae,ariaColSpan:ae,ariaControls:bt,ariaCurrent:null,ariaDescribedBy:bt,ariaDetails:null,ariaDisabled:qt,ariaDropEffect:bt,ariaErrorMessage:null,ariaExpanded:qt,ariaFlowTo:bt,ariaGrabbed:qt,ariaHasPopup:null,ariaHidden:qt,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:bt,ariaLevel:ae,ariaLive:null,ariaModal:qt,ariaMultiLine:qt,ariaMultiSelectable:qt,ariaOrientation:null,ariaOwns:bt,ariaPlaceholder:null,ariaPosInSet:ae,ariaPressed:qt,ariaReadOnly:qt,ariaRelevant:null,ariaRequired:qt,ariaRoleDescription:bt,ariaRowCount:ae,ariaRowIndex:ae,ariaRowSpan:ae,ariaSelected:qt,ariaSetSize:ae,ariaSort:null,ariaValueMax:ae,ariaValueMin:ae,ariaValueNow:ae,ariaValueText:null,role:null}}),bQ=xu({space:"html",attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},transform:FN,mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:Lc,acceptCharset:bt,accessKey:bt,action:null,allow:null,allowFullScreen:Le,allowPaymentRequest:Le,allowUserMedia:Le,alt:null,as:null,async:Le,autoCapitalize:null,autoComplete:bt,autoFocus:Le,autoPlay:Le,blocking:bt,capture:null,charSet:null,checked:Le,cite:null,className:bt,cols:ae,colSpan:null,content:null,contentEditable:qt,controls:Le,controlsList:bt,coords:ae|Lc,crossOrigin:null,data:null,dateTime:null,decoding:null,default:Le,defer:Le,dir:null,dirName:null,disabled:Le,download:LN,draggable:qt,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:Le,formTarget:null,headers:bt,height:ae,hidden:Le,high:ae,href:null,hrefLang:null,htmlFor:bt,httpEquiv:bt,id:null,imageSizes:null,imageSrcSet:null,inert:Le,inputMode:null,integrity:null,is:null,isMap:Le,itemId:null,itemProp:bt,itemRef:bt,itemScope:Le,itemType:bt,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:Le,low:ae,manifest:null,max:null,maxLength:ae,media:null,method:null,min:null,minLength:ae,multiple:Le,muted:Le,name:null,nonce:null,noModule:Le,noValidate:Le,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeToggle:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:Le,optimum:ae,pattern:null,ping:bt,placeholder:null,playsInline:Le,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:Le,referrerPolicy:null,rel:bt,required:Le,reversed:Le,rows:ae,rowSpan:ae,sandbox:bt,scope:null,scoped:Le,seamless:Le,selected:Le,shadowRootClonable:Le,shadowRootDelegatesFocus:Le,shadowRootMode:null,shape:null,size:ae,sizes:null,slot:null,span:ae,spellCheck:qt,src:null,srcDoc:null,srcLang:null,srcSet:null,start:ae,step:null,style:null,tabIndex:ae,target:null,title:null,translate:null,type:null,typeMustMatch:Le,useMap:null,value:qt,width:ae,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:bt,axis:null,background:null,bgColor:null,border:ae,borderColor:null,bottomMargin:ae,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:Le,declare:Le,event:null,face:null,frame:null,frameBorder:null,hSpace:ae,leftMargin:ae,link:null,longDesc:null,lowSrc:null,marginHeight:ae,marginWidth:ae,noResize:Le,noHref:Le,noShade:Le,noWrap:Le,object:null,profile:null,prompt:null,rev:null,rightMargin:ae,rules:null,scheme:null,scrolling:qt,standby:null,summary:null,text:null,topMargin:ae,valueType:null,version:null,vAlign:null,vLink:null,vSpace:ae,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:Le,disableRemotePlayback:Le,prefix:null,property:null,results:ae,security:null,unselectable:null}}),wQ=xu({space:"svg",attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",renderingIntent:"rendering-intent",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDashArray:"stroke-dasharray",strokeDashOffset:"stroke-dashoffset",strokeLineCap:"stroke-linecap",strokeLineJoin:"stroke-linejoin",strokeMiterLimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",transformOrigin:"transform-origin",typeOf:"typeof",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",vectorEffect:"vector-effect",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},transform:jN,properties:{about:vr,accentHeight:ae,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:ae,amplitude:ae,arabicForm:null,ascent:ae,attributeName:null,attributeType:null,azimuth:ae,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:ae,by:null,calcMode:null,capHeight:ae,className:bt,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:ae,diffuseConstant:ae,direction:null,display:null,dur:null,divisor:ae,dominantBaseline:null,download:Le,dx:null,dy:null,edgeMode:null,editable:null,elevation:ae,enableBackground:null,end:null,event:null,exponent:ae,externalResourcesRequired:null,fill:null,fillOpacity:ae,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:Lc,g2:Lc,glyphName:Lc,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:ae,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:ae,horizOriginX:ae,horizOriginY:ae,id:null,ideographic:ae,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:ae,k:ae,k1:ae,k2:ae,k3:ae,k4:ae,kernelMatrix:vr,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:ae,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:ae,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:ae,overlineThickness:ae,paintOrder:null,panose1:null,path:null,pathLength:ae,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:bt,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:ae,pointsAtY:ae,pointsAtZ:ae,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:vr,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:vr,rev:vr,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:vr,requiredFeatures:vr,requiredFonts:vr,requiredFormats:vr,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:ae,specularExponent:ae,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:ae,strikethroughThickness:ae,string:null,stroke:null,strokeDashArray:vr,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:ae,strokeOpacity:ae,strokeWidth:null,style:null,surfaceScale:ae,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:vr,tabIndex:ae,tableValues:null,target:null,targetX:ae,targetY:ae,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:vr,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:ae,underlineThickness:ae,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:ae,values:null,vAlphabetic:ae,vMathematical:ae,vectorEffect:null,vHanging:ae,vIdeographic:ae,version:null,vertAdvY:ae,vertOriginX:ae,vertOriginY:ae,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:ae,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null}}),EQ=/^data[-\w.:]+$/i,P_=/-[a-z]/g,kQ=/[A-Z]/g;function Cf(t,e){const n=Ud(e);let r=e,i=fi;if(n in t.normal)return t.property[t.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&EQ.test(e)){if(e.charAt(4)==="-"){const s=e.slice(5).replace(P_,TQ);r="data"+s.charAt(0).toUpperCase()+s.slice(1)}else{const s=e.slice(4);if(!P_.test(s)){let a=s.replace(kQ,CQ);a.charAt(0)!=="-"&&(a="-"+a),e="data"+a}}i=Yv}return new i(r,e)}function CQ(t){return"-"+t.toLowerCase()}function TQ(t){return t.charAt(1).toUpperCase()}const R_={classId:"classID",dataType:"datatype",itemId:"itemID",strokeDashArray:"strokeDasharray",strokeDashOffset:"strokeDashoffset",strokeLineCap:"strokeLinecap",strokeLineJoin:"strokeLinejoin",strokeMiterLimit:"strokeMiterlimit",typeOf:"typeof",xLinkActuate:"xlinkActuate",xLinkArcRole:"xlinkArcrole",xLinkHref:"xlinkHref",xLinkRole:"xlinkRole",xLinkShow:"xlinkShow",xLinkTitle:"xlinkTitle",xLinkType:"xlinkType",xmlnsXLink:"xmlnsXlink"},_u=IN([RN,PN,BN,HN,bQ],"html"),bu=IN([RN,PN,BN,HN,wQ],"svg");function SQ(t){if(t.allowedElements&&t.disallowedElements)throw new TypeError("Only one of `allowedElements` and `disallowedElements` should be defined");if(t.allowedElements||t.disallowedElements||t.allowElement)return e=>{SN(e,"element",(n,r,i)=>{const s=i;let a;if(t.allowedElements?a=!t.allowedElements.includes(n.tagName):t.disallowedElements&&(a=t.disallowedElements.includes(n.tagName)),!a&&t.allowElement&&typeof r=="number"&&(a=!t.allowElement(n,r,s)),a&&typeof r=="number")return t.unwrapDisallowed&&n.children?s.children.splice(r,1,...n.children):s.children.splice(r,1),r})}}var zN={exports:{}},gt={};/**
475
+ `},i),Array.isArray(r)?{type:"root",children:r}:r}const dQ=function(t,e){return t&&"run"in t?fQ(t,e):hQ(t||e)};function fQ(t,e){return(n,r,i)=>{t.run(AN(n,e),r,s=>{i(s)})}}function hQ(t){return e=>AN(e,t)}var DN={exports:{}},pQ="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED",mQ=pQ,gQ=mQ;function ON(){}function MN(){}MN.resetWarningCache=ON;var yQ=function(){function t(r,i,s,a,o,l){if(l!==gQ){var c=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw c.name="Invariant Violation",c}}t.isRequired=t;function e(){return t}var n={array:t,bigint:t,bool:t,func:t,number:t,object:t,string:t,symbol:t,any:t,arrayOf:e,element:t,elementType:t,instanceOf:e,node:t,objectOf:e,oneOf:e,oneOfType:e,shape:e,exact:e,checkPropTypes:MN,resetWarningCache:ON};return n.PropTypes=n,n};DN.exports=yQ();var vQ=DN.exports;const Ie=Ir(vQ);class kf{constructor(e,n,r){this.property=e,this.normal=n,r&&(this.space=r)}}kf.prototype.property={};kf.prototype.normal={};kf.prototype.space=null;function IN(t,e){const n={},r={};let i=-1;for(;++i<t.length;)Object.assign(n,t[i].property),Object.assign(r,t[i].normal);return new kf(n,r,e)}function Ud(t){return t.toLowerCase()}class fi{constructor(e,n){this.property=e,this.attribute=n}}fi.prototype.space=null;fi.prototype.boolean=!1;fi.prototype.booleanish=!1;fi.prototype.overloadedBoolean=!1;fi.prototype.number=!1;fi.prototype.commaSeparated=!1;fi.prototype.spaceSeparated=!1;fi.prototype.commaOrSpaceSeparated=!1;fi.prototype.mustUseProperty=!1;fi.prototype.defined=!1;let xQ=0;const Pe=Rl(),qt=Rl(),LN=Rl(),ae=Rl(),bt=Rl(),Lc=Rl(),vr=Rl();function Rl(){return 2**++xQ}const r9=Object.freeze(Object.defineProperty({__proto__:null,boolean:Pe,booleanish:qt,commaOrSpaceSeparated:vr,commaSeparated:Lc,number:ae,overloadedBoolean:LN,spaceSeparated:bt},Symbol.toStringTag,{value:"Module"})),p2=Object.keys(r9);class Yv extends fi{constructor(e,n,r,i){let s=-1;if(super(e,n),L_(this,"space",i),typeof r=="number")for(;++s<p2.length;){const a=p2[s];L_(this,p2[s],(r&r9[a])===r9[a])}}}Yv.prototype.defined=!0;function L_(t,e,n){n&&(t[e]=n)}const _Q={}.hasOwnProperty;function xu(t){const e={},n={};let r;for(r in t.properties)if(_Q.call(t.properties,r)){const i=t.properties[r],s=new Yv(r,t.transform(t.attributes||{},r),i,t.space);t.mustUseProperty&&t.mustUseProperty.includes(r)&&(s.mustUseProperty=!0),e[r]=s,n[Ud(r)]=r,n[Ud(s.attribute)]=r}return new kf(e,n,t.space)}const PN=xu({space:"xlink",transform(t,e){return"xlink:"+e.slice(5).toLowerCase()},properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null}}),RN=xu({space:"xml",transform(t,e){return"xml:"+e.slice(3).toLowerCase()},properties:{xmlLang:null,xmlBase:null,xmlSpace:null}});function jN(t,e){return e in t?t[e]:e}function FN(t,e){return jN(t,e.toLowerCase())}const BN=xu({space:"xmlns",attributes:{xmlnsxlink:"xmlns:xlink"},transform:FN,properties:{xmlns:null,xmlnsXLink:null}}),HN=xu({transform(t,e){return e==="role"?e:"aria-"+e.slice(4).toLowerCase()},properties:{ariaActiveDescendant:null,ariaAtomic:qt,ariaAutoComplete:null,ariaBusy:qt,ariaChecked:qt,ariaColCount:ae,ariaColIndex:ae,ariaColSpan:ae,ariaControls:bt,ariaCurrent:null,ariaDescribedBy:bt,ariaDetails:null,ariaDisabled:qt,ariaDropEffect:bt,ariaErrorMessage:null,ariaExpanded:qt,ariaFlowTo:bt,ariaGrabbed:qt,ariaHasPopup:null,ariaHidden:qt,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:bt,ariaLevel:ae,ariaLive:null,ariaModal:qt,ariaMultiLine:qt,ariaMultiSelectable:qt,ariaOrientation:null,ariaOwns:bt,ariaPlaceholder:null,ariaPosInSet:ae,ariaPressed:qt,ariaReadOnly:qt,ariaRelevant:null,ariaRequired:qt,ariaRoleDescription:bt,ariaRowCount:ae,ariaRowIndex:ae,ariaRowSpan:ae,ariaSelected:qt,ariaSetSize:ae,ariaSort:null,ariaValueMax:ae,ariaValueMin:ae,ariaValueNow:ae,ariaValueText:null,role:null}}),bQ=xu({space:"html",attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},transform:FN,mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:Lc,acceptCharset:bt,accessKey:bt,action:null,allow:null,allowFullScreen:Pe,allowPaymentRequest:Pe,allowUserMedia:Pe,alt:null,as:null,async:Pe,autoCapitalize:null,autoComplete:bt,autoFocus:Pe,autoPlay:Pe,blocking:bt,capture:null,charSet:null,checked:Pe,cite:null,className:bt,cols:ae,colSpan:null,content:null,contentEditable:qt,controls:Pe,controlsList:bt,coords:ae|Lc,crossOrigin:null,data:null,dateTime:null,decoding:null,default:Pe,defer:Pe,dir:null,dirName:null,disabled:Pe,download:LN,draggable:qt,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:Pe,formTarget:null,headers:bt,height:ae,hidden:Pe,high:ae,href:null,hrefLang:null,htmlFor:bt,httpEquiv:bt,id:null,imageSizes:null,imageSrcSet:null,inert:Pe,inputMode:null,integrity:null,is:null,isMap:Pe,itemId:null,itemProp:bt,itemRef:bt,itemScope:Pe,itemType:bt,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:Pe,low:ae,manifest:null,max:null,maxLength:ae,media:null,method:null,min:null,minLength:ae,multiple:Pe,muted:Pe,name:null,nonce:null,noModule:Pe,noValidate:Pe,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeToggle:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:Pe,optimum:ae,pattern:null,ping:bt,placeholder:null,playsInline:Pe,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:Pe,referrerPolicy:null,rel:bt,required:Pe,reversed:Pe,rows:ae,rowSpan:ae,sandbox:bt,scope:null,scoped:Pe,seamless:Pe,selected:Pe,shadowRootClonable:Pe,shadowRootDelegatesFocus:Pe,shadowRootMode:null,shape:null,size:ae,sizes:null,slot:null,span:ae,spellCheck:qt,src:null,srcDoc:null,srcLang:null,srcSet:null,start:ae,step:null,style:null,tabIndex:ae,target:null,title:null,translate:null,type:null,typeMustMatch:Pe,useMap:null,value:qt,width:ae,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:bt,axis:null,background:null,bgColor:null,border:ae,borderColor:null,bottomMargin:ae,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:Pe,declare:Pe,event:null,face:null,frame:null,frameBorder:null,hSpace:ae,leftMargin:ae,link:null,longDesc:null,lowSrc:null,marginHeight:ae,marginWidth:ae,noResize:Pe,noHref:Pe,noShade:Pe,noWrap:Pe,object:null,profile:null,prompt:null,rev:null,rightMargin:ae,rules:null,scheme:null,scrolling:qt,standby:null,summary:null,text:null,topMargin:ae,valueType:null,version:null,vAlign:null,vLink:null,vSpace:ae,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:Pe,disableRemotePlayback:Pe,prefix:null,property:null,results:ae,security:null,unselectable:null}}),wQ=xu({space:"svg",attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",renderingIntent:"rendering-intent",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDashArray:"stroke-dasharray",strokeDashOffset:"stroke-dashoffset",strokeLineCap:"stroke-linecap",strokeLineJoin:"stroke-linejoin",strokeMiterLimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",transformOrigin:"transform-origin",typeOf:"typeof",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",vectorEffect:"vector-effect",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},transform:jN,properties:{about:vr,accentHeight:ae,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:ae,amplitude:ae,arabicForm:null,ascent:ae,attributeName:null,attributeType:null,azimuth:ae,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:ae,by:null,calcMode:null,capHeight:ae,className:bt,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:ae,diffuseConstant:ae,direction:null,display:null,dur:null,divisor:ae,dominantBaseline:null,download:Pe,dx:null,dy:null,edgeMode:null,editable:null,elevation:ae,enableBackground:null,end:null,event:null,exponent:ae,externalResourcesRequired:null,fill:null,fillOpacity:ae,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:Lc,g2:Lc,glyphName:Lc,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:ae,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:ae,horizOriginX:ae,horizOriginY:ae,id:null,ideographic:ae,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:ae,k:ae,k1:ae,k2:ae,k3:ae,k4:ae,kernelMatrix:vr,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:ae,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:ae,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:ae,overlineThickness:ae,paintOrder:null,panose1:null,path:null,pathLength:ae,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:bt,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:ae,pointsAtY:ae,pointsAtZ:ae,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:vr,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:vr,rev:vr,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:vr,requiredFeatures:vr,requiredFonts:vr,requiredFormats:vr,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:ae,specularExponent:ae,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:ae,strikethroughThickness:ae,string:null,stroke:null,strokeDashArray:vr,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:ae,strokeOpacity:ae,strokeWidth:null,style:null,surfaceScale:ae,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:vr,tabIndex:ae,tableValues:null,target:null,targetX:ae,targetY:ae,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:vr,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:ae,underlineThickness:ae,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:ae,values:null,vAlphabetic:ae,vMathematical:ae,vectorEffect:null,vHanging:ae,vIdeographic:ae,version:null,vertAdvY:ae,vertOriginX:ae,vertOriginY:ae,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:ae,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null}}),EQ=/^data[-\w.:]+$/i,P_=/-[a-z]/g,kQ=/[A-Z]/g;function Cf(t,e){const n=Ud(e);let r=e,i=fi;if(n in t.normal)return t.property[t.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&EQ.test(e)){if(e.charAt(4)==="-"){const s=e.slice(5).replace(P_,TQ);r="data"+s.charAt(0).toUpperCase()+s.slice(1)}else{const s=e.slice(4);if(!P_.test(s)){let a=s.replace(kQ,CQ);a.charAt(0)!=="-"&&(a="-"+a),e="data"+a}}i=Yv}return new i(r,e)}function CQ(t){return"-"+t.toLowerCase()}function TQ(t){return t.charAt(1).toUpperCase()}const R_={classId:"classID",dataType:"datatype",itemId:"itemID",strokeDashArray:"strokeDasharray",strokeDashOffset:"strokeDashoffset",strokeLineCap:"strokeLinecap",strokeLineJoin:"strokeLinejoin",strokeMiterLimit:"strokeMiterlimit",typeOf:"typeof",xLinkActuate:"xlinkActuate",xLinkArcRole:"xlinkArcrole",xLinkHref:"xlinkHref",xLinkRole:"xlinkRole",xLinkShow:"xlinkShow",xLinkTitle:"xlinkTitle",xLinkType:"xlinkType",xmlnsXLink:"xmlnsXlink"},_u=IN([RN,PN,BN,HN,bQ],"html"),bu=IN([RN,PN,BN,HN,wQ],"svg");function SQ(t){if(t.allowedElements&&t.disallowedElements)throw new TypeError("Only one of `allowedElements` and `disallowedElements` should be defined");if(t.allowedElements||t.disallowedElements||t.allowElement)return e=>{SN(e,"element",(n,r,i)=>{const s=i;let a;if(t.allowedElements?a=!t.allowedElements.includes(n.tagName):t.disallowedElements&&(a=t.disallowedElements.includes(n.tagName)),!a&&t.allowElement&&typeof r=="number"&&(a=!t.allowElement(n,r,s)),a&&typeof r=="number")return t.unwrapDisallowed&&n.children?s.children.splice(r,1,...n.children):s.children.splice(r,1),r})}}var zN={exports:{}},gt={};/**
476
476
  * @license React
477
477
  * react-is.production.min.js
478
478
  *
@@ -481,7 +481,7 @@ data
481
481
  * This source code is licensed under the MIT license found in the
482
482
  * LICENSE file in the root directory of this source tree.
483
483
  */var Wv=Symbol.for("react.element"),Gv=Symbol.for("react.portal"),U0=Symbol.for("react.fragment"),$0=Symbol.for("react.strict_mode"),V0=Symbol.for("react.profiler"),Y0=Symbol.for("react.provider"),W0=Symbol.for("react.context"),NQ=Symbol.for("react.server_context"),G0=Symbol.for("react.forward_ref"),K0=Symbol.for("react.suspense"),q0=Symbol.for("react.suspense_list"),Q0=Symbol.for("react.memo"),Z0=Symbol.for("react.lazy"),AQ=Symbol.for("react.offscreen"),UN;UN=Symbol.for("react.module.reference");function hi(t){if(typeof t=="object"&&t!==null){var e=t.$$typeof;switch(e){case Wv:switch(t=t.type,t){case U0:case V0:case $0:case K0:case q0:return t;default:switch(t=t&&t.$$typeof,t){case NQ:case W0:case G0:case Z0:case Q0:case Y0:return t;default:return e}}case Gv:return e}}}gt.ContextConsumer=W0;gt.ContextProvider=Y0;gt.Element=Wv;gt.ForwardRef=G0;gt.Fragment=U0;gt.Lazy=Z0;gt.Memo=Q0;gt.Portal=Gv;gt.Profiler=V0;gt.StrictMode=$0;gt.Suspense=K0;gt.SuspenseList=q0;gt.isAsyncMode=function(){return!1};gt.isConcurrentMode=function(){return!1};gt.isContextConsumer=function(t){return hi(t)===W0};gt.isContextProvider=function(t){return hi(t)===Y0};gt.isElement=function(t){return typeof t=="object"&&t!==null&&t.$$typeof===Wv};gt.isForwardRef=function(t){return hi(t)===G0};gt.isFragment=function(t){return hi(t)===U0};gt.isLazy=function(t){return hi(t)===Z0};gt.isMemo=function(t){return hi(t)===Q0};gt.isPortal=function(t){return hi(t)===Gv};gt.isProfiler=function(t){return hi(t)===V0};gt.isStrictMode=function(t){return hi(t)===$0};gt.isSuspense=function(t){return hi(t)===K0};gt.isSuspenseList=function(t){return hi(t)===q0};gt.isValidElementType=function(t){return typeof t=="string"||typeof t=="function"||t===U0||t===V0||t===$0||t===K0||t===q0||t===AQ||typeof t=="object"&&t!==null&&(t.$$typeof===Z0||t.$$typeof===Q0||t.$$typeof===Y0||t.$$typeof===W0||t.$$typeof===G0||t.$$typeof===UN||t.getModuleId!==void 0)};gt.typeOf=hi;zN.exports=gt;var DQ=zN.exports;const OQ=Ir(DQ);function $N(t){const e=t&&typeof t=="object"&&t.type==="text"?t.value||"":t;return typeof e=="string"&&e.replace(/[ \t\n\f\r]/g,"")===""}function j_(t){const e=String(t||"").trim();return e?e.split(/[ \t\n\r\f]+/g):[]}function Kv(t){return t.join(" ").trim()}function i9(t){const e=[],n=String(t||"");let r=n.indexOf(","),i=0,s=!1;for(;!s;){r===-1&&(r=n.length,s=!0);const a=n.slice(i,r).trim();(a||!s)&&e.push(a),i=r+1,r=n.indexOf(",",i)}return e}function qv(t,e){const n=e||{};return(t[t.length-1]===""?[...t,""]:t).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}var Qv={exports:{}},F_=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,MQ=/\n/g,IQ=/^\s*/,LQ=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,PQ=/^:\s*/,RQ=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,jQ=/^[;\s]*/,FQ=/^\s+|\s+$/g,BQ=`
484
- `,B_="/",H_="*",Xo="",HQ="comment",zQ="declaration",UQ=function(t,e){if(typeof t!="string")throw new TypeError("First argument must be a string");if(!t)return[];e=e||{};var n=1,r=1;function i(m){var g=m.match(MQ);g&&(n+=g.length);var y=m.lastIndexOf(BQ);r=~y?m.length-y:r+m.length}function s(){var m={line:n,column:r};return function(g){return g.position=new a(m),c(),g}}function a(m){this.start=m,this.end={line:n,column:r},this.source=e.source}a.prototype.content=t;function o(m){var g=new Error(e.source+":"+n+":"+r+": "+m);if(g.reason=m,g.filename=e.source,g.line=n,g.column=r,g.source=t,!e.silent)throw g}function l(m){var g=m.exec(t);if(g){var y=g[0];return i(y),t=t.slice(y.length),g}}function c(){l(IQ)}function u(m){var g;for(m=m||[];g=d();)g!==!1&&m.push(g);return m}function d(){var m=s();if(!(B_!=t.charAt(0)||H_!=t.charAt(1))){for(var g=2;Xo!=t.charAt(g)&&(H_!=t.charAt(g)||B_!=t.charAt(g+1));)++g;if(g+=2,Xo===t.charAt(g-1))return o("End of comment missing");var y=t.slice(2,g-2);return r+=2,i(y),t=t.slice(g),r+=2,m({type:HQ,comment:y})}}function h(){var m=s(),g=l(LQ);if(g){if(d(),!l(PQ))return o("property missing ':'");var y=l(RQ),v=m({type:zQ,property:z_(g[0].replace(F_,Xo)),value:y?z_(y[0].replace(F_,Xo)):Xo});return l(jQ),v}}function p(){var m=[];u(m);for(var g;g=h();)g!==!1&&(m.push(g),u(m));return m}return c(),p()};function z_(t){return t?t.replace(FQ,Xo):Xo}var $Q=UQ;function VN(t,e){var n=null;if(!t||typeof t!="string")return n;for(var r,i=$Q(t),s=typeof e=="function",a,o,l=0,c=i.length;l<c;l++)r=i[l],a=r.property,o=r.value,s?e(a,o,r):o&&(n||(n={}),n[a]=o);return n}Qv.exports=VN;Qv.exports.default=VN;var VQ=Qv.exports;const YQ=Ir(VQ),s9={}.hasOwnProperty,WQ=new Set(["table","thead","tbody","tfoot","tr"]);function YN(t,e){const n=[];let r=-1,i;for(;++r<e.children.length;)i=e.children[r],i.type==="element"?n.push(GQ(t,i,r,e)):i.type==="text"?(e.type!=="element"||!WQ.has(e.tagName)||!$N(i))&&n.push(i.value):i.type==="raw"&&!t.options.skipHtml&&n.push(i.value);return n}function GQ(t,e,n,r){const i=t.options,s=i.transformLinkUri===void 0?qW:i.transformLinkUri,a=t.schema,o=e.tagName,l={};let c=a,u;if(a.space==="html"&&o==="svg"&&(c=bu,t.schema=c),e.properties)for(u in e.properties)s9.call(e.properties,u)&&qQ(l,u,e.properties[u],t);(o==="ol"||o==="ul")&&t.listDepth++;const d=YN(t,e);(o==="ol"||o==="ul")&&t.listDepth--,t.schema=a;const h=e.position||{start:{line:null,column:null,offset:null},end:{line:null,column:null,offset:null}},p=i.components&&s9.call(i.components,o)?i.components[o]:o,m=typeof p=="string"||p===M.Fragment;if(!OQ.isValidElementType(p))throw new TypeError(`Component for name \`${o}\` not defined or is not renderable`);if(l.key=n,o==="a"&&i.linkTarget&&(l.target=typeof i.linkTarget=="function"?i.linkTarget(String(l.href||""),e.children,typeof l.title=="string"?l.title:null):i.linkTarget),o==="a"&&s&&(l.href=s(String(l.href||""),e.children,typeof l.title=="string"?l.title:null)),!m&&o==="code"&&r.type==="element"&&r.tagName!=="pre"&&(l.inline=!0),!m&&(o==="h1"||o==="h2"||o==="h3"||o==="h4"||o==="h5"||o==="h6")&&(l.level=Number.parseInt(o.charAt(1),10)),o==="img"&&i.transformImageUri&&(l.src=i.transformImageUri(String(l.src||""),String(l.alt||""),typeof l.title=="string"?l.title:null)),!m&&o==="li"&&r.type==="element"){const g=KQ(e);l.checked=g&&g.properties?!!g.properties.checked:null,l.index=m2(r,e),l.ordered=r.tagName==="ol"}return!m&&(o==="ol"||o==="ul")&&(l.ordered=o==="ol",l.depth=t.listDepth),(o==="td"||o==="th")&&(l.align&&(l.style||(l.style={}),l.style.textAlign=l.align,delete l.align),m||(l.isHeader=o==="th")),!m&&o==="tr"&&r.type==="element"&&(l.isHeader=r.tagName==="thead"),i.sourcePos&&(l["data-sourcepos"]=XQ(h)),!m&&i.rawSourcePos&&(l.sourcePosition=e.position),!m&&i.includeElementIndex&&(l.index=m2(r,e),l.siblingCount=m2(r)),m||(l.node=e),d.length>0?M.createElement(p,l,d):M.createElement(p,l)}function KQ(t){let e=-1;for(;++e<t.children.length;){const n=t.children[e];if(n.type==="element"&&n.tagName==="input")return n}return null}function m2(t,e){let n=-1,r=0;for(;++n<t.children.length&&t.children[n]!==e;)t.children[n].type==="element"&&r++;return r}function qQ(t,e,n,r){const i=Cf(r.schema,e);let s=n;s==null||s!==s||(Array.isArray(s)&&(s=i.commaSeparated?qv(s):Kv(s)),i.property==="style"&&typeof s=="string"&&(s=QQ(s)),i.space&&i.property?t[s9.call(R_,i.property)?R_[i.property]:i.property]=s:i.attribute&&(t[i.attribute]=s))}function QQ(t){const e={};try{YQ(t,n)}catch{}return e;function n(r,i){const s=r.slice(0,4)==="-ms-"?`ms-${r.slice(4)}`:r;e[s.replace(/-([a-z])/g,ZQ)]=i}}function ZQ(t,e){return e.toUpperCase()}function XQ(t){return[t.start.line,":",t.start.column,"-",t.end.line,":",t.end.column].map(String).join("")}const U_={}.hasOwnProperty,JQ="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",Ch={plugins:{to:"remarkPlugins",id:"change-plugins-to-remarkplugins"},renderers:{to:"components",id:"change-renderers-to-components"},astPlugins:{id:"remove-buggy-html-in-markdown-parser"},allowDangerousHtml:{id:"remove-buggy-html-in-markdown-parser"},escapeHtml:{id:"remove-buggy-html-in-markdown-parser"},source:{to:"children",id:"change-source-to-children"},allowNode:{to:"allowElement",id:"replace-allownode-allowedtypes-and-disallowedtypes"},allowedTypes:{to:"allowedElements",id:"replace-allownode-allowedtypes-and-disallowedtypes"},disallowedTypes:{to:"disallowedElements",id:"replace-allownode-allowedtypes-and-disallowedtypes"},includeNodeIndex:{to:"includeElementIndex",id:"change-includenodeindex-to-includeelementindex"}};function WN(t){for(const s in Ch)if(U_.call(Ch,s)&&U_.call(t,s)){const a=Ch[s];console.warn(`[react-markdown] Warning: please ${a.to?`use \`${a.to}\` instead of`:"remove"} \`${s}\` (see <${JQ}#${a.id}> for more info)`),delete Ch[s]}const e=dG().use(gq).use(t.remarkPlugins||[]).use(dQ,{...t.remarkRehypeOptions,allowDangerousHtml:!0}).use(t.rehypePlugins||[]).use(SQ,t),n=new iN;typeof t.children=="string"?n.value=t.children:t.children!==void 0&&t.children!==null&&console.warn(`[react-markdown] Warning: please pass a string as \`children\` (not: \`${t.children}\`)`);const r=e.runSync(e.parse(n),n);if(r.type!=="root")throw new TypeError("Expected a `root` node");let i=M.createElement(M.Fragment,{},YN({options:t,schema:_u,listDepth:0},r));return t.className&&(i=M.createElement("div",{className:t.className},i)),i}WN.propTypes={children:Me.string,className:Me.string,allowElement:Me.func,allowedElements:Me.arrayOf(Me.string),disallowedElements:Me.arrayOf(Me.string),unwrapDisallowed:Me.bool,remarkPlugins:Me.arrayOf(Me.oneOfType([Me.object,Me.func,Me.arrayOf(Me.oneOfType([Me.bool,Me.string,Me.object,Me.func,Me.arrayOf(Me.any)]))])),rehypePlugins:Me.arrayOf(Me.oneOfType([Me.object,Me.func,Me.arrayOf(Me.oneOfType([Me.bool,Me.string,Me.object,Me.func,Me.arrayOf(Me.any)]))])),sourcePos:Me.bool,rawSourcePos:Me.bool,skipHtml:Me.bool,includeElementIndex:Me.bool,transformLinkUri:Me.oneOfType([Me.func,Me.bool]),linkTarget:Me.oneOfType([Me.func,Me.string]),transformImageUri:Me.func,components:Me.object};const eZ={tokenize:aZ,partial:!0},GN={tokenize:oZ,partial:!0},KN={tokenize:lZ,partial:!0},qN={tokenize:cZ,partial:!0},tZ={tokenize:uZ,partial:!0},QN={tokenize:iZ,previous:XN},ZN={tokenize:sZ,previous:JN},ma={tokenize:rZ,previous:eA},Os={},nZ={text:Os};let Bo=48;for(;Bo<123;)Os[Bo]=ma,Bo++,Bo===58?Bo=65:Bo===91&&(Bo=97);Os[43]=ma;Os[45]=ma;Os[46]=ma;Os[95]=ma;Os[72]=[ma,ZN];Os[104]=[ma,ZN];Os[87]=[ma,QN];Os[119]=[ma,QN];function rZ(t,e,n){const r=this;let i,s;return a;function a(d){return!a9(d)||!eA.call(r,r.previous)||Zv(r.events)?n(d):(t.enter("literalAutolink"),t.enter("literalAutolinkEmail"),o(d))}function o(d){return a9(d)?(t.consume(d),o):d===64?(t.consume(d),l):n(d)}function l(d){return d===46?t.check(tZ,u,c)(d):d===45||d===95||Ln(d)?(s=!0,t.consume(d),l):u(d)}function c(d){return t.consume(d),i=!0,l}function u(d){return s&&i&&Vn(r.previous)?(t.exit("literalAutolinkEmail"),t.exit("literalAutolink"),e(d)):n(d)}}function iZ(t,e,n){const r=this;return i;function i(a){return a!==87&&a!==119||!XN.call(r,r.previous)||Zv(r.events)?n(a):(t.enter("literalAutolink"),t.enter("literalAutolinkWww"),t.check(eZ,t.attempt(GN,t.attempt(KN,s),n),n)(a))}function s(a){return t.exit("literalAutolinkWww"),t.exit("literalAutolink"),e(a)}}function sZ(t,e,n){const r=this;let i="",s=!1;return a;function a(d){return(d===72||d===104)&&JN.call(r,r.previous)&&!Zv(r.events)?(t.enter("literalAutolink"),t.enter("literalAutolinkHttp"),i+=String.fromCodePoint(d),t.consume(d),o):n(d)}function o(d){if(Vn(d)&&i.length<5)return i+=String.fromCodePoint(d),t.consume(d),o;if(d===58){const h=i.toLowerCase();if(h==="http"||h==="https")return t.consume(d),l}return n(d)}function l(d){return d===47?(t.consume(d),s?c:(s=!0,l)):n(d)}function c(d){return d===null||Lm(d)||_t(d)||Cl(d)||F0(d)?n(d):t.attempt(GN,t.attempt(KN,u),n)(d)}function u(d){return t.exit("literalAutolinkHttp"),t.exit("literalAutolink"),e(d)}}function aZ(t,e,n){let r=0;return i;function i(a){return(a===87||a===119)&&r<3?(r++,t.consume(a),i):a===46&&r===3?(t.consume(a),s):n(a)}function s(a){return a===null?n(a):e(a)}}function oZ(t,e,n){let r,i,s;return a;function a(c){return c===46||c===95?t.check(qN,l,o)(c):c===null||_t(c)||Cl(c)||c!==45&&F0(c)?l(c):(s=!0,t.consume(c),a)}function o(c){return c===95?r=!0:(i=r,r=void 0),t.consume(c),a}function l(c){return i||r||!s?n(c):e(c)}}function lZ(t,e){let n=0,r=0;return i;function i(a){return a===40?(n++,t.consume(a),i):a===41&&r<n?s(a):a===33||a===34||a===38||a===39||a===41||a===42||a===44||a===46||a===58||a===59||a===60||a===63||a===93||a===95||a===126?t.check(qN,e,s)(a):a===null||_t(a)||Cl(a)?e(a):(t.consume(a),i)}function s(a){return a===41&&r++,t.consume(a),i}}function cZ(t,e,n){return r;function r(o){return o===33||o===34||o===39||o===41||o===42||o===44||o===46||o===58||o===59||o===63||o===95||o===126?(t.consume(o),r):o===38?(t.consume(o),s):o===93?(t.consume(o),i):o===60||o===null||_t(o)||Cl(o)?e(o):n(o)}function i(o){return o===null||o===40||o===91||_t(o)||Cl(o)?e(o):r(o)}function s(o){return Vn(o)?a(o):n(o)}function a(o){return o===59?(t.consume(o),r):Vn(o)?(t.consume(o),a):n(o)}}function uZ(t,e,n){return r;function r(s){return t.consume(s),i}function i(s){return Ln(s)?n(s):e(s)}}function XN(t){return t===null||t===40||t===42||t===95||t===91||t===93||t===126||_t(t)}function JN(t){return!Vn(t)}function eA(t){return!(t===47||a9(t))}function a9(t){return t===43||t===45||t===46||t===95||Ln(t)}function Zv(t){let e=t.length,n=!1;for(;e--;){const r=t[e][1];if((r.type==="labelLink"||r.type==="labelImage")&&!r._balanced){n=!0;break}if(r._gfmAutolinkLiteralWalkedInto){n=!1;break}}return t.length>0&&!n&&(t[t.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),n}const dZ={tokenize:xZ,partial:!0};function fZ(){return{document:{91:{tokenize:gZ,continuation:{tokenize:yZ},exit:vZ}},text:{91:{tokenize:mZ},93:{add:"after",tokenize:hZ,resolveTo:pZ}}}}function hZ(t,e,n){const r=this;let i=r.events.length;const s=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let a;for(;i--;){const l=r.events[i][1];if(l.type==="labelImage"){a=l;break}if(l.type==="gfmFootnoteCall"||l.type==="labelLink"||l.type==="label"||l.type==="image"||l.type==="link")break}return o;function o(l){if(!a||!a._balanced)return n(l);const c=Ri(r.sliceSerialize({start:a.end,end:r.now()}));return c.codePointAt(0)!==94||!s.includes(c.slice(1))?n(l):(t.enter("gfmFootnoteCallLabelMarker"),t.consume(l),t.exit("gfmFootnoteCallLabelMarker"),e(l))}}function pZ(t,e){let n=t.length;for(;n--;)if(t[n][1].type==="labelImage"&&t[n][0]==="enter"){t[n][1];break}t[n+1][1].type="data",t[n+3][1].type="gfmFootnoteCallLabelMarker";const r={type:"gfmFootnoteCall",start:Object.assign({},t[n+3][1].start),end:Object.assign({},t[t.length-1][1].end)},i={type:"gfmFootnoteCallMarker",start:Object.assign({},t[n+3][1].end),end:Object.assign({},t[n+3][1].end)};i.end.column++,i.end.offset++,i.end._bufferIndex++;const s={type:"gfmFootnoteCallString",start:Object.assign({},i.end),end:Object.assign({},t[t.length-1][1].start)},a={type:"chunkString",contentType:"string",start:Object.assign({},s.start),end:Object.assign({},s.end)},o=[t[n+1],t[n+2],["enter",r,e],t[n+3],t[n+4],["enter",i,e],["exit",i,e],["enter",s,e],["enter",a,e],["exit",a,e],["exit",s,e],t[t.length-2],t[t.length-1],["exit",r,e]];return t.splice(n,t.length-n+1,...o),t}function mZ(t,e,n){const r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let s=0,a;return o;function o(d){return t.enter("gfmFootnoteCall"),t.enter("gfmFootnoteCallLabelMarker"),t.consume(d),t.exit("gfmFootnoteCallLabelMarker"),l}function l(d){return d!==94?n(d):(t.enter("gfmFootnoteCallMarker"),t.consume(d),t.exit("gfmFootnoteCallMarker"),t.enter("gfmFootnoteCallString"),t.enter("chunkString").contentType="string",c)}function c(d){if(s>999||d===93&&!a||d===null||d===91||_t(d))return n(d);if(d===93){t.exit("chunkString");const h=t.exit("gfmFootnoteCallString");return i.includes(Ri(r.sliceSerialize(h)))?(t.enter("gfmFootnoteCallLabelMarker"),t.consume(d),t.exit("gfmFootnoteCallLabelMarker"),t.exit("gfmFootnoteCall"),e):n(d)}return _t(d)||(a=!0),s++,t.consume(d),d===92?u:c}function u(d){return d===91||d===92||d===93?(t.consume(d),s++,c):c(d)}}function gZ(t,e,n){const r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let s,a=0,o;return l;function l(m){return t.enter("gfmFootnoteDefinition")._container=!0,t.enter("gfmFootnoteDefinitionLabel"),t.enter("gfmFootnoteDefinitionLabelMarker"),t.consume(m),t.exit("gfmFootnoteDefinitionLabelMarker"),c}function c(m){return m===94?(t.enter("gfmFootnoteDefinitionMarker"),t.consume(m),t.exit("gfmFootnoteDefinitionMarker"),t.enter("gfmFootnoteDefinitionLabelString"),t.enter("chunkString").contentType="string",u):n(m)}function u(m){if(a>999||m===93&&!o||m===null||m===91||_t(m))return n(m);if(m===93){t.exit("chunkString");const g=t.exit("gfmFootnoteDefinitionLabelString");return s=Ri(r.sliceSerialize(g)),t.enter("gfmFootnoteDefinitionLabelMarker"),t.consume(m),t.exit("gfmFootnoteDefinitionLabelMarker"),t.exit("gfmFootnoteDefinitionLabel"),h}return _t(m)||(o=!0),a++,t.consume(m),m===92?d:u}function d(m){return m===91||m===92||m===93?(t.consume(m),a++,u):u(m)}function h(m){return m===58?(t.enter("definitionMarker"),t.consume(m),t.exit("definitionMarker"),i.includes(s)||i.push(s),et(t,p,"gfmFootnoteDefinitionWhitespace")):n(m)}function p(m){return e(m)}}function yZ(t,e,n){return t.check(wf,e,t.attempt(dZ,e,n))}function vZ(t){t.exit("gfmFootnoteDefinition")}function xZ(t,e,n){const r=this;return et(t,i,"gfmFootnoteDefinitionIndent",5);function i(s){const a=r.events[r.events.length-1];return a&&a[1].type==="gfmFootnoteDefinitionIndent"&&a[2].sliceSerialize(a[1],!0).length===4?e(s):n(s)}}function _Z(t){let n=(t||{}).singleTilde;const r={tokenize:s,resolveAll:i};return n==null&&(n=!0),{text:{126:r},insideSpan:{null:[r]},attentionMarkers:{null:[126]}};function i(a,o){let l=-1;for(;++l<a.length;)if(a[l][0]==="enter"&&a[l][1].type==="strikethroughSequenceTemporary"&&a[l][1]._close){let c=l;for(;c--;)if(a[c][0]==="exit"&&a[c][1].type==="strikethroughSequenceTemporary"&&a[c][1]._open&&a[l][1].end.offset-a[l][1].start.offset===a[c][1].end.offset-a[c][1].start.offset){a[l][1].type="strikethroughSequence",a[c][1].type="strikethroughSequence";const u={type:"strikethrough",start:Object.assign({},a[c][1].start),end:Object.assign({},a[l][1].end)},d={type:"strikethroughText",start:Object.assign({},a[c][1].end),end:Object.assign({},a[l][1].start)},h=[["enter",u,o],["enter",a[c][1],o],["exit",a[c][1],o],["enter",d,o]],p=o.parser.constructs.insideSpan.null;p&&Ar(h,h.length,0,B0(p,a.slice(c+1,l),o)),Ar(h,h.length,0,[["exit",d,o],["enter",a[l][1],o],["exit",a[l][1],o],["exit",u,o]]),Ar(a,c-1,l-c+3,h),l=c+h.length-2;break}}for(l=-1;++l<a.length;)a[l][1].type==="strikethroughSequenceTemporary"&&(a[l][1].type="data");return a}function s(a,o,l){const c=this.previous,u=this.events;let d=0;return h;function h(m){return c===126&&u[u.length-1][1].type!=="characterEscape"?l(m):(a.enter("strikethroughSequenceTemporary"),p(m))}function p(m){const g=Pm(c);if(m===126)return d>1?l(m):(a.consume(m),d++,p);if(d<2&&!n)return l(m);const y=a.exit("strikethroughSequenceTemporary"),v=Pm(m);return y._open=!v||v===2&&!!g,y._close=!g||g===2&&!!v,o(m)}}}class bZ{constructor(){this.map=[]}add(e,n,r){wZ(this,e,n,r)}consume(e){if(this.map.sort((s,a)=>s[0]-a[0]),this.map.length===0)return;let n=this.map.length;const r=[];for(;n>0;)n-=1,r.push(e.slice(this.map[n][0]+this.map[n][1])),r.push(this.map[n][2]),e.length=this.map[n][0];r.push([...e]),e.length=0;let i=r.pop();for(;i;)e.push(...i),i=r.pop();this.map.length=0}}function wZ(t,e,n,r){let i=0;if(!(n===0&&r.length===0)){for(;i<t.map.length;){if(t.map[i][0]===e){t.map[i][1]+=n,t.map[i][2].push(...r);return}i+=1}t.map.push([e,n,r])}}function EZ(t,e){let n=!1;const r=[];for(;e<t.length;){const i=t[e];if(n){if(i[0]==="enter")i[1].type==="tableContent"&&r.push(t[e+1][1].type==="tableDelimiterMarker"?"left":"none");else if(i[1].type==="tableContent"){if(t[e-1][1].type==="tableDelimiterMarker"){const s=r.length-1;r[s]=r[s]==="left"?"center":"right"}}else if(i[1].type==="tableDelimiterRow")break}else i[0]==="enter"&&i[1].type==="tableDelimiterRow"&&(n=!0);e+=1}return r}const kZ={flow:{null:{tokenize:CZ,resolveAll:TZ}}};function CZ(t,e,n){const r=this;let i=0,s=0,a;return o;function o(A){let L=r.events.length-1;for(;L>-1;){const X=r.events[L][1].type;if(X==="lineEnding"||X==="linePrefix")L--;else break}const $=L>-1?r.events[L][1].type:null,K=$==="tableHead"||$==="tableRow"?S:l;return K===S&&r.parser.lazy[r.now().line]?n(A):K(A)}function l(A){return t.enter("tableHead"),t.enter("tableRow"),c(A)}function c(A){return A===124||(a=!0,s+=1),u(A)}function u(A){return A===null?n(A):Se(A)?s>1?(s=0,r.interrupt=!0,t.exit("tableRow"),t.enter("lineEnding"),t.consume(A),t.exit("lineEnding"),p):n(A):Ye(A)?et(t,u,"whitespace")(A):(s+=1,a&&(a=!1,i+=1),A===124?(t.enter("tableCellDivider"),t.consume(A),t.exit("tableCellDivider"),a=!0,u):(t.enter("data"),d(A)))}function d(A){return A===null||A===124||_t(A)?(t.exit("data"),u(A)):(t.consume(A),A===92?h:d)}function h(A){return A===92||A===124?(t.consume(A),d):d(A)}function p(A){return r.interrupt=!1,r.parser.lazy[r.now().line]?n(A):(t.enter("tableDelimiterRow"),a=!1,Ye(A)?et(t,m,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(A):m(A))}function m(A){return A===45||A===58?y(A):A===124?(a=!0,t.enter("tableCellDivider"),t.consume(A),t.exit("tableCellDivider"),g):C(A)}function g(A){return Ye(A)?et(t,y,"whitespace")(A):y(A)}function y(A){return A===58?(s+=1,a=!0,t.enter("tableDelimiterMarker"),t.consume(A),t.exit("tableDelimiterMarker"),v):A===45?(s+=1,v(A)):A===null||Se(A)?w(A):C(A)}function v(A){return A===45?(t.enter("tableDelimiterFiller"),x(A)):C(A)}function x(A){return A===45?(t.consume(A),x):A===58?(a=!0,t.exit("tableDelimiterFiller"),t.enter("tableDelimiterMarker"),t.consume(A),t.exit("tableDelimiterMarker"),b):(t.exit("tableDelimiterFiller"),b(A))}function b(A){return Ye(A)?et(t,w,"whitespace")(A):w(A)}function w(A){return A===124?m(A):A===null||Se(A)?!a||i!==s?C(A):(t.exit("tableDelimiterRow"),t.exit("tableHead"),e(A)):C(A)}function C(A){return n(A)}function S(A){return t.enter("tableRow"),k(A)}function k(A){return A===124?(t.enter("tableCellDivider"),t.consume(A),t.exit("tableCellDivider"),k):A===null||Se(A)?(t.exit("tableRow"),e(A)):Ye(A)?et(t,k,"whitespace")(A):(t.enter("data"),N(A))}function N(A){return A===null||A===124||_t(A)?(t.exit("data"),k(A)):(t.consume(A),A===92?D:N)}function D(A){return A===92||A===124?(t.consume(A),N):N(A)}}function TZ(t,e){let n=-1,r=!0,i=0,s=[0,0,0,0],a=[0,0,0,0],o=!1,l=0,c,u,d;const h=new bZ;for(;++n<t.length;){const p=t[n],m=p[1];p[0]==="enter"?m.type==="tableHead"?(o=!1,l!==0&&($_(h,e,l,c,u),u=void 0,l=0),c={type:"table",start:Object.assign({},m.start),end:Object.assign({},m.end)},h.add(n,0,[["enter",c,e]])):m.type==="tableRow"||m.type==="tableDelimiterRow"?(r=!0,d=void 0,s=[0,0,0,0],a=[0,n+1,0,0],o&&(o=!1,u={type:"tableBody",start:Object.assign({},m.start),end:Object.assign({},m.end)},h.add(n,0,[["enter",u,e]])),i=m.type==="tableDelimiterRow"?2:u?3:1):i&&(m.type==="data"||m.type==="tableDelimiterMarker"||m.type==="tableDelimiterFiller")?(r=!1,a[2]===0&&(s[1]!==0&&(a[0]=a[1],d=Th(h,e,s,i,void 0,d),s=[0,0,0,0]),a[2]=n)):m.type==="tableCellDivider"&&(r?r=!1:(s[1]!==0&&(a[0]=a[1],d=Th(h,e,s,i,void 0,d)),s=a,a=[s[1],n,0,0])):m.type==="tableHead"?(o=!0,l=n):m.type==="tableRow"||m.type==="tableDelimiterRow"?(l=n,s[1]!==0?(a[0]=a[1],d=Th(h,e,s,i,n,d)):a[1]!==0&&(d=Th(h,e,a,i,n,d)),i=0):i&&(m.type==="data"||m.type==="tableDelimiterMarker"||m.type==="tableDelimiterFiller")&&(a[3]=n)}for(l!==0&&$_(h,e,l,c,u),h.consume(e.events),n=-1;++n<e.events.length;){const p=e.events[n];p[0]==="enter"&&p[1].type==="table"&&(p[1]._align=EZ(e.events,n))}return t}function Th(t,e,n,r,i,s){const a=r===1?"tableHeader":r===2?"tableDelimiter":"tableData",o="tableContent";n[0]!==0&&(s.end=Object.assign({},ec(e.events,n[0])),t.add(n[0],0,[["exit",s,e]]));const l=ec(e.events,n[1]);if(s={type:a,start:Object.assign({},l),end:Object.assign({},l)},t.add(n[1],0,[["enter",s,e]]),n[2]!==0){const c=ec(e.events,n[2]),u=ec(e.events,n[3]),d={type:o,start:Object.assign({},c),end:Object.assign({},u)};if(t.add(n[2],0,[["enter",d,e]]),r!==2){const h=e.events[n[2]],p=e.events[n[3]];if(h[1].end=Object.assign({},p[1].end),h[1].type="chunkText",h[1].contentType="text",n[3]>n[2]+1){const m=n[2]+1,g=n[3]-n[2]-1;t.add(m,g,[])}}t.add(n[3]+1,0,[["exit",d,e]])}return i!==void 0&&(s.end=Object.assign({},ec(e.events,i)),t.add(i,0,[["exit",s,e]]),s=void 0),s}function $_(t,e,n,r,i){const s=[],a=ec(e.events,n);i&&(i.end=Object.assign({},a),s.push(["exit",i,e])),r.end=Object.assign({},a),s.push(["exit",r,e]),t.add(n+1,0,s)}function ec(t,e){const n=t[e],r=n[0]==="enter"?"start":"end";return n[1][r]}const SZ={tokenize:AZ},NZ={text:{91:SZ}};function AZ(t,e,n){const r=this;return i;function i(l){return r.previous!==null||!r._gfmTasklistFirstContentOfListItem?n(l):(t.enter("taskListCheck"),t.enter("taskListCheckMarker"),t.consume(l),t.exit("taskListCheckMarker"),s)}function s(l){return _t(l)?(t.enter("taskListCheckValueUnchecked"),t.consume(l),t.exit("taskListCheckValueUnchecked"),a):l===88||l===120?(t.enter("taskListCheckValueChecked"),t.consume(l),t.exit("taskListCheckValueChecked"),a):n(l)}function a(l){return l===93?(t.enter("taskListCheckMarker"),t.consume(l),t.exit("taskListCheckMarker"),t.exit("taskListCheck"),o):n(l)}function o(l){return Se(l)?e(l):Ye(l)?t.check({tokenize:DZ},e,n)(l):n(l)}}function DZ(t,e,n){return et(t,r,"whitespace");function r(i){return i===null?n(i):e(i)}}function OZ(t){return cN([nZ,fZ(),_Z(t),kZ,NZ])}function V_(t,e){const n=String(t);if(typeof e!="string")throw new TypeError("Expected character");let r=0,i=n.indexOf(e);for(;i!==-1;)r++,i=n.indexOf(e,i+e.length);return r}function MZ(t){if(typeof t!="string")throw new TypeError("Expected a string");return t.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}const IZ=!0,Y_=!1,LZ="skip",tA=function(t,e,n,r){typeof e=="function"&&typeof n!="function"&&(r=n,n=e,e=null);const i=Vi(e),s=r?-1:1;a(t,void 0,[])();function a(o,l,c){const u=o&&typeof o=="object"?o:{};if(typeof u.type=="string"){const h=typeof u.tagName=="string"?u.tagName:typeof u.name=="string"?u.name:void 0;Object.defineProperty(d,"name",{value:"node ("+(o.type+(h?"<"+h+">":""))+")"})}return d;function d(){let h=[],p,m,g;if((!e||i(o,l,c[c.length-1]||null))&&(h=PZ(n(o,c)),h[0]===Y_))return h;if(o.children&&h[0]!==LZ)for(m=(r?o.children.length:-1)+s,g=c.concat(o);m>-1&&m<o.children.length;){if(p=a(o.children[m],m,g)(),p[0]===Y_)return p;m=typeof p[1]=="number"?p[1]:m+s}return h}}};function PZ(t){return Array.isArray(t)?t:typeof t=="number"?[IZ,t]:[t]}const RZ={}.hasOwnProperty,jZ=function(t,e,n,r){let i,s;typeof e=="string"||e instanceof RegExp?(s=[[e,n]],i=r):(s=e,i=n),i||(i={});const a=Vi(i.ignore||[]),o=FZ(s);let l=-1;for(;++l<o.length;)tA(t,"text",c);return t;function c(d,h){let p=-1,m;for(;++p<h.length;){const g=h[p];if(a(g,m?m.children.indexOf(g):void 0,m))return;m=g}if(m)return u(d,h)}function u(d,h){const p=h[h.length-1],m=o[l][0],g=o[l][1];let y=0;const v=p.children.indexOf(d);let x=!1,b=[];m.lastIndex=0;let w=m.exec(d.value);for(;w;){const C=w.index,S={index:w.index,input:w.input,stack:[...h,d]};let k=g(...w,S);if(typeof k=="string"&&(k=k.length>0?{type:"text",value:k}:void 0),k!==!1&&(y!==C&&b.push({type:"text",value:d.value.slice(y,C)}),Array.isArray(k)?b.push(...k):k&&b.push(k),y=C+w[0].length,x=!0),!m.global)break;w=m.exec(d.value)}return x?(y<d.value.length&&b.push({type:"text",value:d.value.slice(y)}),p.children.splice(v,1,...b)):b=[d],v+b.length}};function FZ(t){const e=[];if(typeof t!="object")throw new TypeError("Expected array or object as schema");if(Array.isArray(t)){let n=-1;for(;++n<t.length;)e.push([W_(t[n][0]),G_(t[n][1])])}else{let n;for(n in t)RZ.call(t,n)&&e.push([W_(n),G_(t[n])])}return e}function W_(t){return typeof t=="string"?new RegExp(MZ(t),"g"):t}function G_(t){return typeof t=="function"?t:()=>t}const g2="phrasing",y2=["autolink","link","image","label"],BZ={transforms:[WZ],enter:{literalAutolink:zZ,literalAutolinkEmail:v2,literalAutolinkHttp:v2,literalAutolinkWww:v2},exit:{literalAutolink:YZ,literalAutolinkEmail:VZ,literalAutolinkHttp:UZ,literalAutolinkWww:$Z}},HZ={unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:g2,notInConstruct:y2},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:g2,notInConstruct:y2},{character:":",before:"[ps]",after:"\\/",inConstruct:g2,notInConstruct:y2}]};function zZ(t){this.enter({type:"link",title:null,url:"",children:[]},t)}function v2(t){this.config.enter.autolinkProtocol.call(this,t)}function UZ(t){this.config.exit.autolinkProtocol.call(this,t)}function $Z(t){this.config.exit.data.call(this,t);const e=this.stack[this.stack.length-1];e.url="http://"+this.sliceSerialize(t)}function VZ(t){this.config.exit.autolinkEmail.call(this,t)}function YZ(t){this.exit(t)}function WZ(t){jZ(t,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,GZ],[/([-.\w+]+)@([-\w]+(?:\.[-\w]+)+)/g,KZ]],{ignore:["link","linkReference"]})}function GZ(t,e,n,r,i){let s="";if(!nA(i)||(/^w/i.test(e)&&(n=e+n,e="",s="http://"),!qZ(n)))return!1;const a=QZ(n+r);if(!a[0])return!1;const o={type:"link",title:null,url:s+e+a[0],children:[{type:"text",value:e+a[0]}]};return a[1]?[o,{type:"text",value:a[1]}]:o}function KZ(t,e,n,r){return!nA(r,!0)||/[-\d_]$/.test(n)?!1:{type:"link",title:null,url:"mailto:"+e+"@"+n,children:[{type:"text",value:e+"@"+n}]}}function qZ(t){const e=t.split(".");return!(e.length<2||e[e.length-1]&&(/_/.test(e[e.length-1])||!/[a-zA-Z\d]/.test(e[e.length-1]))||e[e.length-2]&&(/_/.test(e[e.length-2])||!/[a-zA-Z\d]/.test(e[e.length-2])))}function QZ(t){const e=/[!"&'),.:;<>?\]}]+$/.exec(t);if(!e)return[t,void 0];t=t.slice(0,e.index);let n=e[0],r=n.indexOf(")");const i=V_(t,"(");let s=V_(t,")");for(;r!==-1&&i>s;)t+=n.slice(0,r+1),n=n.slice(r+1),r=n.indexOf(")"),s++;return[t,n]}function nA(t,e){const n=t.input.charCodeAt(t.index-1);return(t.index===0||Cl(n)||F0(n))&&(!e||n!==47)}function rA(t){return t.label||!t.identifier?t.label||"":_N(t.identifier)}function ZZ(t,e,n){const r=e.indexStack,i=t.children||[],s=e.createTracker(n),a=[];let o=-1;for(r.push(-1);++o<i.length;){const l=i[o];r[r.length-1]=o,a.push(s.move(e.handle(l,t,e,{before:`
484
+ `,B_="/",H_="*",Xo="",HQ="comment",zQ="declaration",UQ=function(t,e){if(typeof t!="string")throw new TypeError("First argument must be a string");if(!t)return[];e=e||{};var n=1,r=1;function i(m){var g=m.match(MQ);g&&(n+=g.length);var y=m.lastIndexOf(BQ);r=~y?m.length-y:r+m.length}function s(){var m={line:n,column:r};return function(g){return g.position=new a(m),c(),g}}function a(m){this.start=m,this.end={line:n,column:r},this.source=e.source}a.prototype.content=t;function o(m){var g=new Error(e.source+":"+n+":"+r+": "+m);if(g.reason=m,g.filename=e.source,g.line=n,g.column=r,g.source=t,!e.silent)throw g}function l(m){var g=m.exec(t);if(g){var y=g[0];return i(y),t=t.slice(y.length),g}}function c(){l(IQ)}function u(m){var g;for(m=m||[];g=d();)g!==!1&&m.push(g);return m}function d(){var m=s();if(!(B_!=t.charAt(0)||H_!=t.charAt(1))){for(var g=2;Xo!=t.charAt(g)&&(H_!=t.charAt(g)||B_!=t.charAt(g+1));)++g;if(g+=2,Xo===t.charAt(g-1))return o("End of comment missing");var y=t.slice(2,g-2);return r+=2,i(y),t=t.slice(g),r+=2,m({type:HQ,comment:y})}}function h(){var m=s(),g=l(LQ);if(g){if(d(),!l(PQ))return o("property missing ':'");var y=l(RQ),v=m({type:zQ,property:z_(g[0].replace(F_,Xo)),value:y?z_(y[0].replace(F_,Xo)):Xo});return l(jQ),v}}function p(){var m=[];u(m);for(var g;g=h();)g!==!1&&(m.push(g),u(m));return m}return c(),p()};function z_(t){return t?t.replace(FQ,Xo):Xo}var $Q=UQ;function VN(t,e){var n=null;if(!t||typeof t!="string")return n;for(var r,i=$Q(t),s=typeof e=="function",a,o,l=0,c=i.length;l<c;l++)r=i[l],a=r.property,o=r.value,s?e(a,o,r):o&&(n||(n={}),n[a]=o);return n}Qv.exports=VN;Qv.exports.default=VN;var VQ=Qv.exports;const YQ=Ir(VQ),s9={}.hasOwnProperty,WQ=new Set(["table","thead","tbody","tfoot","tr"]);function YN(t,e){const n=[];let r=-1,i;for(;++r<e.children.length;)i=e.children[r],i.type==="element"?n.push(GQ(t,i,r,e)):i.type==="text"?(e.type!=="element"||!WQ.has(e.tagName)||!$N(i))&&n.push(i.value):i.type==="raw"&&!t.options.skipHtml&&n.push(i.value);return n}function GQ(t,e,n,r){const i=t.options,s=i.transformLinkUri===void 0?qW:i.transformLinkUri,a=t.schema,o=e.tagName,l={};let c=a,u;if(a.space==="html"&&o==="svg"&&(c=bu,t.schema=c),e.properties)for(u in e.properties)s9.call(e.properties,u)&&qQ(l,u,e.properties[u],t);(o==="ol"||o==="ul")&&t.listDepth++;const d=YN(t,e);(o==="ol"||o==="ul")&&t.listDepth--,t.schema=a;const h=e.position||{start:{line:null,column:null,offset:null},end:{line:null,column:null,offset:null}},p=i.components&&s9.call(i.components,o)?i.components[o]:o,m=typeof p=="string"||p===M.Fragment;if(!OQ.isValidElementType(p))throw new TypeError(`Component for name \`${o}\` not defined or is not renderable`);if(l.key=n,o==="a"&&i.linkTarget&&(l.target=typeof i.linkTarget=="function"?i.linkTarget(String(l.href||""),e.children,typeof l.title=="string"?l.title:null):i.linkTarget),o==="a"&&s&&(l.href=s(String(l.href||""),e.children,typeof l.title=="string"?l.title:null)),!m&&o==="code"&&r.type==="element"&&r.tagName!=="pre"&&(l.inline=!0),!m&&(o==="h1"||o==="h2"||o==="h3"||o==="h4"||o==="h5"||o==="h6")&&(l.level=Number.parseInt(o.charAt(1),10)),o==="img"&&i.transformImageUri&&(l.src=i.transformImageUri(String(l.src||""),String(l.alt||""),typeof l.title=="string"?l.title:null)),!m&&o==="li"&&r.type==="element"){const g=KQ(e);l.checked=g&&g.properties?!!g.properties.checked:null,l.index=m2(r,e),l.ordered=r.tagName==="ol"}return!m&&(o==="ol"||o==="ul")&&(l.ordered=o==="ol",l.depth=t.listDepth),(o==="td"||o==="th")&&(l.align&&(l.style||(l.style={}),l.style.textAlign=l.align,delete l.align),m||(l.isHeader=o==="th")),!m&&o==="tr"&&r.type==="element"&&(l.isHeader=r.tagName==="thead"),i.sourcePos&&(l["data-sourcepos"]=XQ(h)),!m&&i.rawSourcePos&&(l.sourcePosition=e.position),!m&&i.includeElementIndex&&(l.index=m2(r,e),l.siblingCount=m2(r)),m||(l.node=e),d.length>0?M.createElement(p,l,d):M.createElement(p,l)}function KQ(t){let e=-1;for(;++e<t.children.length;){const n=t.children[e];if(n.type==="element"&&n.tagName==="input")return n}return null}function m2(t,e){let n=-1,r=0;for(;++n<t.children.length&&t.children[n]!==e;)t.children[n].type==="element"&&r++;return r}function qQ(t,e,n,r){const i=Cf(r.schema,e);let s=n;s==null||s!==s||(Array.isArray(s)&&(s=i.commaSeparated?qv(s):Kv(s)),i.property==="style"&&typeof s=="string"&&(s=QQ(s)),i.space&&i.property?t[s9.call(R_,i.property)?R_[i.property]:i.property]=s:i.attribute&&(t[i.attribute]=s))}function QQ(t){const e={};try{YQ(t,n)}catch{}return e;function n(r,i){const s=r.slice(0,4)==="-ms-"?`ms-${r.slice(4)}`:r;e[s.replace(/-([a-z])/g,ZQ)]=i}}function ZQ(t,e){return e.toUpperCase()}function XQ(t){return[t.start.line,":",t.start.column,"-",t.end.line,":",t.end.column].map(String).join("")}const U_={}.hasOwnProperty,JQ="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",Ch={plugins:{to:"remarkPlugins",id:"change-plugins-to-remarkplugins"},renderers:{to:"components",id:"change-renderers-to-components"},astPlugins:{id:"remove-buggy-html-in-markdown-parser"},allowDangerousHtml:{id:"remove-buggy-html-in-markdown-parser"},escapeHtml:{id:"remove-buggy-html-in-markdown-parser"},source:{to:"children",id:"change-source-to-children"},allowNode:{to:"allowElement",id:"replace-allownode-allowedtypes-and-disallowedtypes"},allowedTypes:{to:"allowedElements",id:"replace-allownode-allowedtypes-and-disallowedtypes"},disallowedTypes:{to:"disallowedElements",id:"replace-allownode-allowedtypes-and-disallowedtypes"},includeNodeIndex:{to:"includeElementIndex",id:"change-includenodeindex-to-includeelementindex"}};function WN(t){for(const s in Ch)if(U_.call(Ch,s)&&U_.call(t,s)){const a=Ch[s];console.warn(`[react-markdown] Warning: please ${a.to?`use \`${a.to}\` instead of`:"remove"} \`${s}\` (see <${JQ}#${a.id}> for more info)`),delete Ch[s]}const e=dG().use(gq).use(t.remarkPlugins||[]).use(dQ,{...t.remarkRehypeOptions,allowDangerousHtml:!0}).use(t.rehypePlugins||[]).use(SQ,t),n=new iN;typeof t.children=="string"?n.value=t.children:t.children!==void 0&&t.children!==null&&console.warn(`[react-markdown] Warning: please pass a string as \`children\` (not: \`${t.children}\`)`);const r=e.runSync(e.parse(n),n);if(r.type!=="root")throw new TypeError("Expected a `root` node");let i=M.createElement(M.Fragment,{},YN({options:t,schema:_u,listDepth:0},r));return t.className&&(i=M.createElement("div",{className:t.className},i)),i}WN.propTypes={children:Ie.string,className:Ie.string,allowElement:Ie.func,allowedElements:Ie.arrayOf(Ie.string),disallowedElements:Ie.arrayOf(Ie.string),unwrapDisallowed:Ie.bool,remarkPlugins:Ie.arrayOf(Ie.oneOfType([Ie.object,Ie.func,Ie.arrayOf(Ie.oneOfType([Ie.bool,Ie.string,Ie.object,Ie.func,Ie.arrayOf(Ie.any)]))])),rehypePlugins:Ie.arrayOf(Ie.oneOfType([Ie.object,Ie.func,Ie.arrayOf(Ie.oneOfType([Ie.bool,Ie.string,Ie.object,Ie.func,Ie.arrayOf(Ie.any)]))])),sourcePos:Ie.bool,rawSourcePos:Ie.bool,skipHtml:Ie.bool,includeElementIndex:Ie.bool,transformLinkUri:Ie.oneOfType([Ie.func,Ie.bool]),linkTarget:Ie.oneOfType([Ie.func,Ie.string]),transformImageUri:Ie.func,components:Ie.object};const eZ={tokenize:aZ,partial:!0},GN={tokenize:oZ,partial:!0},KN={tokenize:lZ,partial:!0},qN={tokenize:cZ,partial:!0},tZ={tokenize:uZ,partial:!0},QN={tokenize:iZ,previous:XN},ZN={tokenize:sZ,previous:JN},ma={tokenize:rZ,previous:eA},Os={},nZ={text:Os};let Bo=48;for(;Bo<123;)Os[Bo]=ma,Bo++,Bo===58?Bo=65:Bo===91&&(Bo=97);Os[43]=ma;Os[45]=ma;Os[46]=ma;Os[95]=ma;Os[72]=[ma,ZN];Os[104]=[ma,ZN];Os[87]=[ma,QN];Os[119]=[ma,QN];function rZ(t,e,n){const r=this;let i,s;return a;function a(d){return!a9(d)||!eA.call(r,r.previous)||Zv(r.events)?n(d):(t.enter("literalAutolink"),t.enter("literalAutolinkEmail"),o(d))}function o(d){return a9(d)?(t.consume(d),o):d===64?(t.consume(d),l):n(d)}function l(d){return d===46?t.check(tZ,u,c)(d):d===45||d===95||Ln(d)?(s=!0,t.consume(d),l):u(d)}function c(d){return t.consume(d),i=!0,l}function u(d){return s&&i&&Vn(r.previous)?(t.exit("literalAutolinkEmail"),t.exit("literalAutolink"),e(d)):n(d)}}function iZ(t,e,n){const r=this;return i;function i(a){return a!==87&&a!==119||!XN.call(r,r.previous)||Zv(r.events)?n(a):(t.enter("literalAutolink"),t.enter("literalAutolinkWww"),t.check(eZ,t.attempt(GN,t.attempt(KN,s),n),n)(a))}function s(a){return t.exit("literalAutolinkWww"),t.exit("literalAutolink"),e(a)}}function sZ(t,e,n){const r=this;let i="",s=!1;return a;function a(d){return(d===72||d===104)&&JN.call(r,r.previous)&&!Zv(r.events)?(t.enter("literalAutolink"),t.enter("literalAutolinkHttp"),i+=String.fromCodePoint(d),t.consume(d),o):n(d)}function o(d){if(Vn(d)&&i.length<5)return i+=String.fromCodePoint(d),t.consume(d),o;if(d===58){const h=i.toLowerCase();if(h==="http"||h==="https")return t.consume(d),l}return n(d)}function l(d){return d===47?(t.consume(d),s?c:(s=!0,l)):n(d)}function c(d){return d===null||Lm(d)||_t(d)||Cl(d)||F0(d)?n(d):t.attempt(GN,t.attempt(KN,u),n)(d)}function u(d){return t.exit("literalAutolinkHttp"),t.exit("literalAutolink"),e(d)}}function aZ(t,e,n){let r=0;return i;function i(a){return(a===87||a===119)&&r<3?(r++,t.consume(a),i):a===46&&r===3?(t.consume(a),s):n(a)}function s(a){return a===null?n(a):e(a)}}function oZ(t,e,n){let r,i,s;return a;function a(c){return c===46||c===95?t.check(qN,l,o)(c):c===null||_t(c)||Cl(c)||c!==45&&F0(c)?l(c):(s=!0,t.consume(c),a)}function o(c){return c===95?r=!0:(i=r,r=void 0),t.consume(c),a}function l(c){return i||r||!s?n(c):e(c)}}function lZ(t,e){let n=0,r=0;return i;function i(a){return a===40?(n++,t.consume(a),i):a===41&&r<n?s(a):a===33||a===34||a===38||a===39||a===41||a===42||a===44||a===46||a===58||a===59||a===60||a===63||a===93||a===95||a===126?t.check(qN,e,s)(a):a===null||_t(a)||Cl(a)?e(a):(t.consume(a),i)}function s(a){return a===41&&r++,t.consume(a),i}}function cZ(t,e,n){return r;function r(o){return o===33||o===34||o===39||o===41||o===42||o===44||o===46||o===58||o===59||o===63||o===95||o===126?(t.consume(o),r):o===38?(t.consume(o),s):o===93?(t.consume(o),i):o===60||o===null||_t(o)||Cl(o)?e(o):n(o)}function i(o){return o===null||o===40||o===91||_t(o)||Cl(o)?e(o):r(o)}function s(o){return Vn(o)?a(o):n(o)}function a(o){return o===59?(t.consume(o),r):Vn(o)?(t.consume(o),a):n(o)}}function uZ(t,e,n){return r;function r(s){return t.consume(s),i}function i(s){return Ln(s)?n(s):e(s)}}function XN(t){return t===null||t===40||t===42||t===95||t===91||t===93||t===126||_t(t)}function JN(t){return!Vn(t)}function eA(t){return!(t===47||a9(t))}function a9(t){return t===43||t===45||t===46||t===95||Ln(t)}function Zv(t){let e=t.length,n=!1;for(;e--;){const r=t[e][1];if((r.type==="labelLink"||r.type==="labelImage")&&!r._balanced){n=!0;break}if(r._gfmAutolinkLiteralWalkedInto){n=!1;break}}return t.length>0&&!n&&(t[t.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),n}const dZ={tokenize:xZ,partial:!0};function fZ(){return{document:{91:{tokenize:gZ,continuation:{tokenize:yZ},exit:vZ}},text:{91:{tokenize:mZ},93:{add:"after",tokenize:hZ,resolveTo:pZ}}}}function hZ(t,e,n){const r=this;let i=r.events.length;const s=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let a;for(;i--;){const l=r.events[i][1];if(l.type==="labelImage"){a=l;break}if(l.type==="gfmFootnoteCall"||l.type==="labelLink"||l.type==="label"||l.type==="image"||l.type==="link")break}return o;function o(l){if(!a||!a._balanced)return n(l);const c=Ri(r.sliceSerialize({start:a.end,end:r.now()}));return c.codePointAt(0)!==94||!s.includes(c.slice(1))?n(l):(t.enter("gfmFootnoteCallLabelMarker"),t.consume(l),t.exit("gfmFootnoteCallLabelMarker"),e(l))}}function pZ(t,e){let n=t.length;for(;n--;)if(t[n][1].type==="labelImage"&&t[n][0]==="enter"){t[n][1];break}t[n+1][1].type="data",t[n+3][1].type="gfmFootnoteCallLabelMarker";const r={type:"gfmFootnoteCall",start:Object.assign({},t[n+3][1].start),end:Object.assign({},t[t.length-1][1].end)},i={type:"gfmFootnoteCallMarker",start:Object.assign({},t[n+3][1].end),end:Object.assign({},t[n+3][1].end)};i.end.column++,i.end.offset++,i.end._bufferIndex++;const s={type:"gfmFootnoteCallString",start:Object.assign({},i.end),end:Object.assign({},t[t.length-1][1].start)},a={type:"chunkString",contentType:"string",start:Object.assign({},s.start),end:Object.assign({},s.end)},o=[t[n+1],t[n+2],["enter",r,e],t[n+3],t[n+4],["enter",i,e],["exit",i,e],["enter",s,e],["enter",a,e],["exit",a,e],["exit",s,e],t[t.length-2],t[t.length-1],["exit",r,e]];return t.splice(n,t.length-n+1,...o),t}function mZ(t,e,n){const r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let s=0,a;return o;function o(d){return t.enter("gfmFootnoteCall"),t.enter("gfmFootnoteCallLabelMarker"),t.consume(d),t.exit("gfmFootnoteCallLabelMarker"),l}function l(d){return d!==94?n(d):(t.enter("gfmFootnoteCallMarker"),t.consume(d),t.exit("gfmFootnoteCallMarker"),t.enter("gfmFootnoteCallString"),t.enter("chunkString").contentType="string",c)}function c(d){if(s>999||d===93&&!a||d===null||d===91||_t(d))return n(d);if(d===93){t.exit("chunkString");const h=t.exit("gfmFootnoteCallString");return i.includes(Ri(r.sliceSerialize(h)))?(t.enter("gfmFootnoteCallLabelMarker"),t.consume(d),t.exit("gfmFootnoteCallLabelMarker"),t.exit("gfmFootnoteCall"),e):n(d)}return _t(d)||(a=!0),s++,t.consume(d),d===92?u:c}function u(d){return d===91||d===92||d===93?(t.consume(d),s++,c):c(d)}}function gZ(t,e,n){const r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let s,a=0,o;return l;function l(m){return t.enter("gfmFootnoteDefinition")._container=!0,t.enter("gfmFootnoteDefinitionLabel"),t.enter("gfmFootnoteDefinitionLabelMarker"),t.consume(m),t.exit("gfmFootnoteDefinitionLabelMarker"),c}function c(m){return m===94?(t.enter("gfmFootnoteDefinitionMarker"),t.consume(m),t.exit("gfmFootnoteDefinitionMarker"),t.enter("gfmFootnoteDefinitionLabelString"),t.enter("chunkString").contentType="string",u):n(m)}function u(m){if(a>999||m===93&&!o||m===null||m===91||_t(m))return n(m);if(m===93){t.exit("chunkString");const g=t.exit("gfmFootnoteDefinitionLabelString");return s=Ri(r.sliceSerialize(g)),t.enter("gfmFootnoteDefinitionLabelMarker"),t.consume(m),t.exit("gfmFootnoteDefinitionLabelMarker"),t.exit("gfmFootnoteDefinitionLabel"),h}return _t(m)||(o=!0),a++,t.consume(m),m===92?d:u}function d(m){return m===91||m===92||m===93?(t.consume(m),a++,u):u(m)}function h(m){return m===58?(t.enter("definitionMarker"),t.consume(m),t.exit("definitionMarker"),i.includes(s)||i.push(s),et(t,p,"gfmFootnoteDefinitionWhitespace")):n(m)}function p(m){return e(m)}}function yZ(t,e,n){return t.check(wf,e,t.attempt(dZ,e,n))}function vZ(t){t.exit("gfmFootnoteDefinition")}function xZ(t,e,n){const r=this;return et(t,i,"gfmFootnoteDefinitionIndent",5);function i(s){const a=r.events[r.events.length-1];return a&&a[1].type==="gfmFootnoteDefinitionIndent"&&a[2].sliceSerialize(a[1],!0).length===4?e(s):n(s)}}function _Z(t){let n=(t||{}).singleTilde;const r={tokenize:s,resolveAll:i};return n==null&&(n=!0),{text:{126:r},insideSpan:{null:[r]},attentionMarkers:{null:[126]}};function i(a,o){let l=-1;for(;++l<a.length;)if(a[l][0]==="enter"&&a[l][1].type==="strikethroughSequenceTemporary"&&a[l][1]._close){let c=l;for(;c--;)if(a[c][0]==="exit"&&a[c][1].type==="strikethroughSequenceTemporary"&&a[c][1]._open&&a[l][1].end.offset-a[l][1].start.offset===a[c][1].end.offset-a[c][1].start.offset){a[l][1].type="strikethroughSequence",a[c][1].type="strikethroughSequence";const u={type:"strikethrough",start:Object.assign({},a[c][1].start),end:Object.assign({},a[l][1].end)},d={type:"strikethroughText",start:Object.assign({},a[c][1].end),end:Object.assign({},a[l][1].start)},h=[["enter",u,o],["enter",a[c][1],o],["exit",a[c][1],o],["enter",d,o]],p=o.parser.constructs.insideSpan.null;p&&Ar(h,h.length,0,B0(p,a.slice(c+1,l),o)),Ar(h,h.length,0,[["exit",d,o],["enter",a[l][1],o],["exit",a[l][1],o],["exit",u,o]]),Ar(a,c-1,l-c+3,h),l=c+h.length-2;break}}for(l=-1;++l<a.length;)a[l][1].type==="strikethroughSequenceTemporary"&&(a[l][1].type="data");return a}function s(a,o,l){const c=this.previous,u=this.events;let d=0;return h;function h(m){return c===126&&u[u.length-1][1].type!=="characterEscape"?l(m):(a.enter("strikethroughSequenceTemporary"),p(m))}function p(m){const g=Pm(c);if(m===126)return d>1?l(m):(a.consume(m),d++,p);if(d<2&&!n)return l(m);const y=a.exit("strikethroughSequenceTemporary"),v=Pm(m);return y._open=!v||v===2&&!!g,y._close=!g||g===2&&!!v,o(m)}}}class bZ{constructor(){this.map=[]}add(e,n,r){wZ(this,e,n,r)}consume(e){if(this.map.sort((s,a)=>s[0]-a[0]),this.map.length===0)return;let n=this.map.length;const r=[];for(;n>0;)n-=1,r.push(e.slice(this.map[n][0]+this.map[n][1])),r.push(this.map[n][2]),e.length=this.map[n][0];r.push([...e]),e.length=0;let i=r.pop();for(;i;)e.push(...i),i=r.pop();this.map.length=0}}function wZ(t,e,n,r){let i=0;if(!(n===0&&r.length===0)){for(;i<t.map.length;){if(t.map[i][0]===e){t.map[i][1]+=n,t.map[i][2].push(...r);return}i+=1}t.map.push([e,n,r])}}function EZ(t,e){let n=!1;const r=[];for(;e<t.length;){const i=t[e];if(n){if(i[0]==="enter")i[1].type==="tableContent"&&r.push(t[e+1][1].type==="tableDelimiterMarker"?"left":"none");else if(i[1].type==="tableContent"){if(t[e-1][1].type==="tableDelimiterMarker"){const s=r.length-1;r[s]=r[s]==="left"?"center":"right"}}else if(i[1].type==="tableDelimiterRow")break}else i[0]==="enter"&&i[1].type==="tableDelimiterRow"&&(n=!0);e+=1}return r}const kZ={flow:{null:{tokenize:CZ,resolveAll:TZ}}};function CZ(t,e,n){const r=this;let i=0,s=0,a;return o;function o(A){let L=r.events.length-1;for(;L>-1;){const X=r.events[L][1].type;if(X==="lineEnding"||X==="linePrefix")L--;else break}const $=L>-1?r.events[L][1].type:null,K=$==="tableHead"||$==="tableRow"?S:l;return K===S&&r.parser.lazy[r.now().line]?n(A):K(A)}function l(A){return t.enter("tableHead"),t.enter("tableRow"),c(A)}function c(A){return A===124||(a=!0,s+=1),u(A)}function u(A){return A===null?n(A):Se(A)?s>1?(s=0,r.interrupt=!0,t.exit("tableRow"),t.enter("lineEnding"),t.consume(A),t.exit("lineEnding"),p):n(A):Ye(A)?et(t,u,"whitespace")(A):(s+=1,a&&(a=!1,i+=1),A===124?(t.enter("tableCellDivider"),t.consume(A),t.exit("tableCellDivider"),a=!0,u):(t.enter("data"),d(A)))}function d(A){return A===null||A===124||_t(A)?(t.exit("data"),u(A)):(t.consume(A),A===92?h:d)}function h(A){return A===92||A===124?(t.consume(A),d):d(A)}function p(A){return r.interrupt=!1,r.parser.lazy[r.now().line]?n(A):(t.enter("tableDelimiterRow"),a=!1,Ye(A)?et(t,m,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(A):m(A))}function m(A){return A===45||A===58?y(A):A===124?(a=!0,t.enter("tableCellDivider"),t.consume(A),t.exit("tableCellDivider"),g):C(A)}function g(A){return Ye(A)?et(t,y,"whitespace")(A):y(A)}function y(A){return A===58?(s+=1,a=!0,t.enter("tableDelimiterMarker"),t.consume(A),t.exit("tableDelimiterMarker"),v):A===45?(s+=1,v(A)):A===null||Se(A)?w(A):C(A)}function v(A){return A===45?(t.enter("tableDelimiterFiller"),x(A)):C(A)}function x(A){return A===45?(t.consume(A),x):A===58?(a=!0,t.exit("tableDelimiterFiller"),t.enter("tableDelimiterMarker"),t.consume(A),t.exit("tableDelimiterMarker"),b):(t.exit("tableDelimiterFiller"),b(A))}function b(A){return Ye(A)?et(t,w,"whitespace")(A):w(A)}function w(A){return A===124?m(A):A===null||Se(A)?!a||i!==s?C(A):(t.exit("tableDelimiterRow"),t.exit("tableHead"),e(A)):C(A)}function C(A){return n(A)}function S(A){return t.enter("tableRow"),k(A)}function k(A){return A===124?(t.enter("tableCellDivider"),t.consume(A),t.exit("tableCellDivider"),k):A===null||Se(A)?(t.exit("tableRow"),e(A)):Ye(A)?et(t,k,"whitespace")(A):(t.enter("data"),N(A))}function N(A){return A===null||A===124||_t(A)?(t.exit("data"),k(A)):(t.consume(A),A===92?D:N)}function D(A){return A===92||A===124?(t.consume(A),N):N(A)}}function TZ(t,e){let n=-1,r=!0,i=0,s=[0,0,0,0],a=[0,0,0,0],o=!1,l=0,c,u,d;const h=new bZ;for(;++n<t.length;){const p=t[n],m=p[1];p[0]==="enter"?m.type==="tableHead"?(o=!1,l!==0&&($_(h,e,l,c,u),u=void 0,l=0),c={type:"table",start:Object.assign({},m.start),end:Object.assign({},m.end)},h.add(n,0,[["enter",c,e]])):m.type==="tableRow"||m.type==="tableDelimiterRow"?(r=!0,d=void 0,s=[0,0,0,0],a=[0,n+1,0,0],o&&(o=!1,u={type:"tableBody",start:Object.assign({},m.start),end:Object.assign({},m.end)},h.add(n,0,[["enter",u,e]])),i=m.type==="tableDelimiterRow"?2:u?3:1):i&&(m.type==="data"||m.type==="tableDelimiterMarker"||m.type==="tableDelimiterFiller")?(r=!1,a[2]===0&&(s[1]!==0&&(a[0]=a[1],d=Th(h,e,s,i,void 0,d),s=[0,0,0,0]),a[2]=n)):m.type==="tableCellDivider"&&(r?r=!1:(s[1]!==0&&(a[0]=a[1],d=Th(h,e,s,i,void 0,d)),s=a,a=[s[1],n,0,0])):m.type==="tableHead"?(o=!0,l=n):m.type==="tableRow"||m.type==="tableDelimiterRow"?(l=n,s[1]!==0?(a[0]=a[1],d=Th(h,e,s,i,n,d)):a[1]!==0&&(d=Th(h,e,a,i,n,d)),i=0):i&&(m.type==="data"||m.type==="tableDelimiterMarker"||m.type==="tableDelimiterFiller")&&(a[3]=n)}for(l!==0&&$_(h,e,l,c,u),h.consume(e.events),n=-1;++n<e.events.length;){const p=e.events[n];p[0]==="enter"&&p[1].type==="table"&&(p[1]._align=EZ(e.events,n))}return t}function Th(t,e,n,r,i,s){const a=r===1?"tableHeader":r===2?"tableDelimiter":"tableData",o="tableContent";n[0]!==0&&(s.end=Object.assign({},ec(e.events,n[0])),t.add(n[0],0,[["exit",s,e]]));const l=ec(e.events,n[1]);if(s={type:a,start:Object.assign({},l),end:Object.assign({},l)},t.add(n[1],0,[["enter",s,e]]),n[2]!==0){const c=ec(e.events,n[2]),u=ec(e.events,n[3]),d={type:o,start:Object.assign({},c),end:Object.assign({},u)};if(t.add(n[2],0,[["enter",d,e]]),r!==2){const h=e.events[n[2]],p=e.events[n[3]];if(h[1].end=Object.assign({},p[1].end),h[1].type="chunkText",h[1].contentType="text",n[3]>n[2]+1){const m=n[2]+1,g=n[3]-n[2]-1;t.add(m,g,[])}}t.add(n[3]+1,0,[["exit",d,e]])}return i!==void 0&&(s.end=Object.assign({},ec(e.events,i)),t.add(i,0,[["exit",s,e]]),s=void 0),s}function $_(t,e,n,r,i){const s=[],a=ec(e.events,n);i&&(i.end=Object.assign({},a),s.push(["exit",i,e])),r.end=Object.assign({},a),s.push(["exit",r,e]),t.add(n+1,0,s)}function ec(t,e){const n=t[e],r=n[0]==="enter"?"start":"end";return n[1][r]}const SZ={tokenize:AZ},NZ={text:{91:SZ}};function AZ(t,e,n){const r=this;return i;function i(l){return r.previous!==null||!r._gfmTasklistFirstContentOfListItem?n(l):(t.enter("taskListCheck"),t.enter("taskListCheckMarker"),t.consume(l),t.exit("taskListCheckMarker"),s)}function s(l){return _t(l)?(t.enter("taskListCheckValueUnchecked"),t.consume(l),t.exit("taskListCheckValueUnchecked"),a):l===88||l===120?(t.enter("taskListCheckValueChecked"),t.consume(l),t.exit("taskListCheckValueChecked"),a):n(l)}function a(l){return l===93?(t.enter("taskListCheckMarker"),t.consume(l),t.exit("taskListCheckMarker"),t.exit("taskListCheck"),o):n(l)}function o(l){return Se(l)?e(l):Ye(l)?t.check({tokenize:DZ},e,n)(l):n(l)}}function DZ(t,e,n){return et(t,r,"whitespace");function r(i){return i===null?n(i):e(i)}}function OZ(t){return cN([nZ,fZ(),_Z(t),kZ,NZ])}function V_(t,e){const n=String(t);if(typeof e!="string")throw new TypeError("Expected character");let r=0,i=n.indexOf(e);for(;i!==-1;)r++,i=n.indexOf(e,i+e.length);return r}function MZ(t){if(typeof t!="string")throw new TypeError("Expected a string");return t.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}const IZ=!0,Y_=!1,LZ="skip",tA=function(t,e,n,r){typeof e=="function"&&typeof n!="function"&&(r=n,n=e,e=null);const i=Vi(e),s=r?-1:1;a(t,void 0,[])();function a(o,l,c){const u=o&&typeof o=="object"?o:{};if(typeof u.type=="string"){const h=typeof u.tagName=="string"?u.tagName:typeof u.name=="string"?u.name:void 0;Object.defineProperty(d,"name",{value:"node ("+(o.type+(h?"<"+h+">":""))+")"})}return d;function d(){let h=[],p,m,g;if((!e||i(o,l,c[c.length-1]||null))&&(h=PZ(n(o,c)),h[0]===Y_))return h;if(o.children&&h[0]!==LZ)for(m=(r?o.children.length:-1)+s,g=c.concat(o);m>-1&&m<o.children.length;){if(p=a(o.children[m],m,g)(),p[0]===Y_)return p;m=typeof p[1]=="number"?p[1]:m+s}return h}}};function PZ(t){return Array.isArray(t)?t:typeof t=="number"?[IZ,t]:[t]}const RZ={}.hasOwnProperty,jZ=function(t,e,n,r){let i,s;typeof e=="string"||e instanceof RegExp?(s=[[e,n]],i=r):(s=e,i=n),i||(i={});const a=Vi(i.ignore||[]),o=FZ(s);let l=-1;for(;++l<o.length;)tA(t,"text",c);return t;function c(d,h){let p=-1,m;for(;++p<h.length;){const g=h[p];if(a(g,m?m.children.indexOf(g):void 0,m))return;m=g}if(m)return u(d,h)}function u(d,h){const p=h[h.length-1],m=o[l][0],g=o[l][1];let y=0;const v=p.children.indexOf(d);let x=!1,b=[];m.lastIndex=0;let w=m.exec(d.value);for(;w;){const C=w.index,S={index:w.index,input:w.input,stack:[...h,d]};let k=g(...w,S);if(typeof k=="string"&&(k=k.length>0?{type:"text",value:k}:void 0),k!==!1&&(y!==C&&b.push({type:"text",value:d.value.slice(y,C)}),Array.isArray(k)?b.push(...k):k&&b.push(k),y=C+w[0].length,x=!0),!m.global)break;w=m.exec(d.value)}return x?(y<d.value.length&&b.push({type:"text",value:d.value.slice(y)}),p.children.splice(v,1,...b)):b=[d],v+b.length}};function FZ(t){const e=[];if(typeof t!="object")throw new TypeError("Expected array or object as schema");if(Array.isArray(t)){let n=-1;for(;++n<t.length;)e.push([W_(t[n][0]),G_(t[n][1])])}else{let n;for(n in t)RZ.call(t,n)&&e.push([W_(n),G_(t[n])])}return e}function W_(t){return typeof t=="string"?new RegExp(MZ(t),"g"):t}function G_(t){return typeof t=="function"?t:()=>t}const g2="phrasing",y2=["autolink","link","image","label"],BZ={transforms:[WZ],enter:{literalAutolink:zZ,literalAutolinkEmail:v2,literalAutolinkHttp:v2,literalAutolinkWww:v2},exit:{literalAutolink:YZ,literalAutolinkEmail:VZ,literalAutolinkHttp:UZ,literalAutolinkWww:$Z}},HZ={unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:g2,notInConstruct:y2},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:g2,notInConstruct:y2},{character:":",before:"[ps]",after:"\\/",inConstruct:g2,notInConstruct:y2}]};function zZ(t){this.enter({type:"link",title:null,url:"",children:[]},t)}function v2(t){this.config.enter.autolinkProtocol.call(this,t)}function UZ(t){this.config.exit.autolinkProtocol.call(this,t)}function $Z(t){this.config.exit.data.call(this,t);const e=this.stack[this.stack.length-1];e.url="http://"+this.sliceSerialize(t)}function VZ(t){this.config.exit.autolinkEmail.call(this,t)}function YZ(t){this.exit(t)}function WZ(t){jZ(t,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,GZ],[/([-.\w+]+)@([-\w]+(?:\.[-\w]+)+)/g,KZ]],{ignore:["link","linkReference"]})}function GZ(t,e,n,r,i){let s="";if(!nA(i)||(/^w/i.test(e)&&(n=e+n,e="",s="http://"),!qZ(n)))return!1;const a=QZ(n+r);if(!a[0])return!1;const o={type:"link",title:null,url:s+e+a[0],children:[{type:"text",value:e+a[0]}]};return a[1]?[o,{type:"text",value:a[1]}]:o}function KZ(t,e,n,r){return!nA(r,!0)||/[-\d_]$/.test(n)?!1:{type:"link",title:null,url:"mailto:"+e+"@"+n,children:[{type:"text",value:e+"@"+n}]}}function qZ(t){const e=t.split(".");return!(e.length<2||e[e.length-1]&&(/_/.test(e[e.length-1])||!/[a-zA-Z\d]/.test(e[e.length-1]))||e[e.length-2]&&(/_/.test(e[e.length-2])||!/[a-zA-Z\d]/.test(e[e.length-2])))}function QZ(t){const e=/[!"&'),.:;<>?\]}]+$/.exec(t);if(!e)return[t,void 0];t=t.slice(0,e.index);let n=e[0],r=n.indexOf(")");const i=V_(t,"(");let s=V_(t,")");for(;r!==-1&&i>s;)t+=n.slice(0,r+1),n=n.slice(r+1),r=n.indexOf(")"),s++;return[t,n]}function nA(t,e){const n=t.input.charCodeAt(t.index-1);return(t.index===0||Cl(n)||F0(n))&&(!e||n!==47)}function rA(t){return t.label||!t.identifier?t.label||"":_N(t.identifier)}function ZZ(t,e,n){const r=e.indexStack,i=t.children||[],s=e.createTracker(n),a=[];let o=-1;for(r.push(-1);++o<i.length;){const l=i[o];r[r.length-1]=o,a.push(s.move(e.handle(l,t,e,{before:`
485
485
  `,after:`
486
486
  `,...s.current()}))),l.type!=="list"&&(e.bulletLastUsed=void 0),o<i.length-1&&a.push(s.move(XZ(l,i[o+1],t,e)))}return r.pop(),a.join("")}function XZ(t,e,n,r){let i=r.join.length;for(;i--;){const s=r.join[i](t,e,n,r);if(s===!0||s===1)break;if(typeof s=="number")return`
487
487
  `.repeat(1+s);if(s===!1)return`
@@ -536,14 +536,14 @@ data
536
536
  - [ ] `),/^\d+.\s/.test(a)&&(b=`
537
537
  `+(parseInt(a)+1)+". "),Pc(r,b)}else if(t.code&&t.code.toLowerCase()==="keyd"&&t.ctrlKey){Dp(t);var w={start:r.selectionStart,end:r.selectionEnd},C=w;w=q1({text:r.value,selection:w});var S=r.value.slice(w.start,w.end);o.setSelectionRange({start:w.end,end:w.end}),Pc(r,`
538
538
  `+S),o.setSelectionRange({start:C.start,end:C.end})}else t.code&&t.code.toLowerCase()==="arrowup"&&t.altKey?Aw(t,-1):t.code&&t.code.toLowerCase()==="arrowdown"&&t.altKey&&Aw(t,1)}var ose=["prefixCls","onChange"],lse=["markdown","commands","fullscreen","preview","highlightEnable","extraCommands","tabSize","defaultTabEnable","dispatch"];function cse(t){var{prefixCls:e,onChange:n}=t,r=zd(t,ose),i=_.useContext(Cu),{markdown:s,commands:a,fullscreen:o,preview:l,highlightEnable:c,extraCommands:u,tabSize:d,defaultTabEnable:h,dispatch:p}=i;zd(i,lse);var m=M.useRef(null),g=M.useRef(),y=M.useRef({fullscreen:o,preview:l});_.useEffect(()=>{y.current={fullscreen:o,preview:l,highlightEnable:c}},[o,l,c]),_.useEffect(()=>{if(m.current&&p){var x=new _x(m.current);g.current=x,p({textarea:m.current,commandOrchestrator:x})}},[]);var v=x=>{ase(x,d,h),lD(x,[...a||[],...u||[]],g.current,p,y.current)};return _.useEffect(()=>(m.current&&m.current.addEventListener("keydown",v),()=>{m.current&&m.current.removeEventListener("keydown",v)}),[]),f.jsx("textarea",Ve({autoComplete:"off",autoCorrect:"off",autoCapitalize:"off",spellCheck:!1},r,{ref:m,className:e+"-text-input "+(r.className?r.className:""),value:s,onChange:x=>{p&&p({markdown:x.target.value}),n&&n(x)}}))}var use=["prefixCls","className","onScroll","renderTextarea"];function dse(t){var e=t||{},{prefixCls:n,className:r,onScroll:i,renderTextarea:s}=e,a=zd(e,use),{markdown:o,scrollTop:l,commands:c,extraCommands:u,dispatch:d}=_.useContext(Cu),h=M.useRef(null),p=M.useRef(),m=M.createRef();_.useEffect(()=>{var y={};m.current&&(y.textareaWarp=m.current||void 0,m.current.scrollTop=l||0),d&&d(Ve({},y))},[]),_.useEffect(()=>{if(h.current&&d){var y=new _x(h.current);p.current=y,d({textarea:h.current,commandOrchestrator:y})}},[]);var g={WebkitTextFillColor:"initial",overflow:"auto"};return f.jsx("div",{ref:m,className:n+"-area "+(r||""),onScroll:i,children:f.jsx("div",{className:n+"-text",children:s?M.cloneElement(s(Ve({},a,{value:o,autoComplete:"off",autoCorrect:"off",spellCheck:"false",autoCapitalize:"off",className:n+"-text-input",style:{WebkitTextFillColor:"inherit",overflow:"auto"}}),{dispatch:d,onChange:a.onChange,shortcuts:lD,useContext:{commands:c,extraCommands:u,commandOrchestrator:p.current}}),{ref:h}):f.jsx(_.Fragment,{children:f.jsx(cse,Ve({prefixCls:n},a,{style:g}))})})})}function fse(t){var{prefixCls:e,groupName:n,commands:r,children:i}=t||{},{barPopup:s={}}=_.useContext(Cu);return _.useMemo(()=>f.jsx("div",{className:e+"-toolbar-child "+(n&&s[n]?"active":""),onClick:a=>a.stopPropagation(),children:Array.isArray(r)?f.jsx(hD,Ve({commands:r},t,{isChild:!0})):i}),[r,s,n,e])}function Dw(t){var{prefixCls:e,overflow:n}=t,{fullscreen:r,preview:i,barPopup:s={},components:a,commandOrchestrator:o,dispatch:l}=_.useContext(Cu),c=_.useRef("");function u(d,h){if(l){var p={barPopup:Ve({},s)};d.keyCommand==="preview"&&(p.preview=d.value),d.keyCommand==="fullscreen"&&(p.fullscreen=!r),t.commands&&d.keyCommand==="group"?t.commands.forEach(m=>{h===m.groupName?p.barPopup[h]=!0:m.keyCommand&&(p.barPopup[m.groupName]=!1)}):(h||d.parent)&&Object.keys(p.barPopup||{}).forEach(m=>{p.barPopup[m]=!1}),Object.keys(p).length&&l(Ve({},p)),o&&o.executeCommand(d)}}return _.useEffect(()=>{document&&n&&(r?document.body.style.overflow="hidden":(c.current||(c.current=window.getComputedStyle(document.body,null).overflow),document.body.style.overflow=c.current))},[r,c,n]),f.jsx("ul",{children:(t.commands||[]).map((d,h)=>{if(d.keyCommand==="divider")return f.jsx("li",Ve({},d.liProps,{className:e+"-toolbar-divider"}),h);if(!d.keyCommand)return f.jsx(_.Fragment,{},h);var p=r&&d.keyCommand==="fullscreen"||d.keyCommand==="preview"&&i===d.value,m=d.children&&typeof d.children=="function"?d.children({getState:()=>o.getState(),textApi:o?o.textApi:void 0,close:()=>u({},d.groupName),execute:()=>u({execute:d.execute}),dispatch:l}):void 0,g=s&&i&&i==="preview"&&!/(preview|fullscreen)/.test(d.keyCommand),y=(a==null?void 0:a.toolbar)||d.render,v=y&&typeof y=="function"?y(d,!!g,u,h):null;return f.jsxs("li",Ve({},d.liProps,{className:p?"active":"",children:[v&&M.isValidElement(v)&&v,!v&&!d.buttonProps&&d.icon,!v&&d.buttonProps&&M.createElement("button",Ve({type:"button",key:h,disabled:g,"data-name":d.name},d.buttonProps,{onClick:x=>{x.stopPropagation(),u(d,d.groupName)}}),d.icon),d.children&&f.jsx(fse,{overflow:n,groupName:d.groupName,prefixCls:e,children:m,commands:Array.isArray(d.children)?d.children:void 0})]}),h)})})}function hD(t){t===void 0&&(t={});var{prefixCls:e,isChild:n,className:r}=t,{commands:i,extraCommands:s}=_.useContext(Cu);return f.jsxs("div",{className:e+"-toolbar "+r,children:[f.jsx(Dw,Ve({},t,{commands:t.commands||i||[]})),!n&&f.jsx(Dw,Ve({},t,{commands:s||[]}))]})}function Ow(t){var{hideToolbar:e,toolbarBottom:n,placement:r,overflow:i,prefixCls:s}=t;if(e||r==="bottom"&&!n||r==="top"&&n)return null;var a=n?"bottom":"";return f.jsx(hD,{prefixCls:s,overflow:i,className:a})}var hse=t=>{var{prefixCls:e,onChange:n}=t||{},r=_.useRef(null),i=_.useRef(),s=_.useRef(t.height);_.useEffect(()=>{s.current!==t.height&&(s.current=t.height)},[t.height]);function a(u){if(i.current){var d,h=u.clientY||((d=u.changedTouches[0])==null?void 0:d.clientY),p=i.current.height+h-i.current.dragY;p>=t.minHeight&&p<=t.maxHeight&&n&&n(i.current.height+(h-i.current.dragY))}}function o(){var u,d;i.current=void 0,document.removeEventListener("mousemove",a),document.removeEventListener("mouseup",o),(u=r.current)==null||u.removeEventListener("touchmove",a),(d=r.current)==null||d.removeEventListener("touchend",o)}function l(u){var d,h,p;u.preventDefault();var m=u.clientY||((d=u.changedTouches[0])==null?void 0:d.clientY);i.current={height:s.current,dragY:m},document.addEventListener("mousemove",a),document.addEventListener("mouseup",o),(h=r.current)==null||h.addEventListener("touchmove",a,{passive:!1}),(p=r.current)==null||p.addEventListener("touchend",o,{passive:!1})}_.useEffect(()=>{if(document){var u,d;(u=r.current)==null||u.addEventListener("touchstart",l,{passive:!1}),(d=r.current)==null||d.addEventListener("mousedown",l)}return()=>{if(document){var h;(h=r.current)==null||h.removeEventListener("touchstart",l),document.removeEventListener("mousemove",a)}}},[]);var c=_.useMemo(()=>f.jsx("svg",{viewBox:"0 0 512 512",height:"100%",children:f.jsx("path",{fill:"currentColor",d:"M304 256c0 26.5-21.5 48-48 48s-48-21.5-48-48 21.5-48 48-48 48 21.5 48 48zm120-48c-26.5 0-48 21.5-48 48s21.5 48 48 48 48-21.5 48-48-21.5-48-48-48zm-336 0c-26.5 0-48 21.5-48 48s21.5 48 48 48 48-21.5 48-48-21.5-48-48-48z"})}),[]);return f.jsx("div",{className:e+"-bar",ref:r,children:c})},pse=["prefixCls","className","value","commands","commandsFilter","direction","extraCommands","height","enableScroll","visibleDragbar","highlightEnable","preview","fullscreen","overflow","previewOptions","textareaProps","maxHeight","minHeight","autoFocus","tabSize","defaultTabEnable","onChange","onStatistics","onHeightChange","hideToolbar","toolbarBottom","components","renderTextarea"];function mse(t){return t===void 0&&(t={}),Object.keys(t).forEach(e=>{t[e]=!1}),t}var gse=M.forwardRef((t,e)=>{var n=t||{},{prefixCls:r="w-md-editor",className:i,value:s,commands:a=ise(),commandsFilter:o,direction:l,extraCommands:c=sse(),height:u=200,enableScroll:d=!0,visibleDragbar:h=typeof t.visiableDragbar=="boolean"?t.visiableDragbar:!0,highlightEnable:p=!0,preview:m="live",fullscreen:g=!1,overflow:y=!0,previewOptions:v={},textareaProps:x,maxHeight:b=1200,minHeight:w=100,autoFocus:C,tabSize:S=2,defaultTabEnable:k=!1,onChange:N,onStatistics:D,onHeightChange:A,hideToolbar:L,toolbarBottom:$=!1,components:K,renderTextarea:X}=n,H=zd(n,pse),U=a.map(je=>o?o(je,!1):je).filter(Boolean),G=c.map(je=>o?o(je,!0):je).filter(Boolean),[R,z]=_.useReducer(Oie,{markdown:s,preview:m,components:K,height:u,minHeight:w,highlightEnable:p,tabSize:S,defaultTabEnable:k,scrollTop:0,scrollTopPreview:0,commands:U,extraCommands:G,fullscreen:g,barPopup:{}}),O=_.useRef(null),W=_.useRef(null),Z=_.useRef(d);_.useImperativeHandle(e,()=>Ve({},R,{container:O.current,dispatch:z})),_.useMemo(()=>Z.current=d,[d]),_.useEffect(()=>{var je={};O.current&&(je.container=O.current||void 0),je.markdown=s||"",je.barPopup={},z&&z(Ve({},R,je))},[]);var I=[i,"wmde-markdown-var",l?r+"-"+l:null,r,R.preview?r+"-show-"+R.preview:null,R.fullscreen?r+"-fullscreen":null].filter(Boolean).join(" ").trim();_.useMemo(()=>s!==R.markdown&&z({markdown:s||""}),[s,R.markdown]),_.useMemo(()=>m!==R.preview&&z({preview:m}),[m]),_.useMemo(()=>S!==R.tabSize&&z({tabSize:S}),[S]),_.useMemo(()=>p!==R.highlightEnable&&z({highlightEnable:p}),[p]),_.useMemo(()=>C!==R.autoFocus&&z({autoFocus:C}),[C]),_.useMemo(()=>g!==R.fullscreen&&z({fullscreen:g}),[g]),_.useMemo(()=>u!==R.height&&z({height:u}),[u]),_.useMemo(()=>u!==R.height&&A&&A(R.height,u,R),[u,A,R]),_.useMemo(()=>a!==R.commands&&z({commands:U}),[t.commands]),_.useMemo(()=>c!==R.extraCommands&&z({extraCommands:G}),[t.extraCommands]);var ie=_.useRef(),V=_.useRef("preview"),ce=_.useRef(!1);_.useMemo(()=>{ie.current=R.textareaWarp,R.textareaWarp&&(R.textareaWarp.addEventListener("mouseover",()=>{V.current="text"}),R.textareaWarp.addEventListener("mouseleave",()=>{V.current="preview"}))},[R.textareaWarp]);var Ae=(je,Ur)=>{if(Z.current){var yn=ie.current,ze=W.current?W.current:void 0;if(ce.current||(V.current=Ur,ce.current=!0),yn&&ze){var Bn=(yn.scrollHeight-yn.offsetHeight)/(ze.scrollHeight-ze.offsetHeight);je.target===yn&&V.current==="text"&&(ze.scrollTop=yn.scrollTop/Bn),je.target===ze&&V.current==="preview"&&(yn.scrollTop=ze.scrollTop*Bn);var Hn=0;V.current==="text"?Hn=yn.scrollTop||0:V.current==="preview"&&(Hn=ze.scrollTop||0),z({scrollTop:Hn})}}},_e=r+"-preview "+(v.className||""),Ne=je=>Ae(je,"preview"),ye=_.useMemo(()=>f.jsx("div",{ref:W,className:_e,children:f.jsx(aD,Ve({},v,{onScroll:Ne,source:R.markdown||""}))}),[_e,v,R.markdown]),$t=(K==null?void 0:K.preview)&&(K==null?void 0:K.preview(R.markdown||"",R,z));$t&&M.isValidElement($t)&&(ye=f.jsx("div",{className:_e,ref:W,onScroll:Ne,children:$t}));var zr=Ve({},H.style,{height:R.height||"100%"}),gn=()=>z({barPopup:Ve({},mse(R.barPopup))}),Xn=je=>z({height:je}),Ki=je=>{if(N&&N(je.target.value,je,R),x&&x.onChange&&x.onChange(je),R.textarea&&R.textarea instanceof HTMLTextAreaElement&&D){var Ur=new _x(R.textarea),yn=Ur.getState()||{};D(Ve({},yn,{lineCount:je.target.value.split(`
539
- `).length,length:je.target.value.length}))}};return f.jsx(Cu.Provider,{value:Ve({},R,{dispatch:z}),children:f.jsxs("div",Ve({ref:O,className:I},H,{onClick:gn,style:zr,children:[f.jsx(Ow,{hideToolbar:L,toolbarBottom:$,prefixCls:r,overflow:y,placement:"top"}),f.jsxs("div",{className:r+"-content",children:[/(edit|live)/.test(R.preview||"")&&f.jsx(dse,Ve({className:r+"-input",prefixCls:r,autoFocus:C},x,{onChange:Ki,renderTextarea:(K==null?void 0:K.textarea)||X,onScroll:je=>Ae(je,"text")})),/(live|preview)/.test(R.preview||"")&&ye]}),h&&!R.fullscreen&&f.jsx(hse,{prefixCls:r,height:R.height,maxHeight:b,minHeight:w,onChange:Xn}),f.jsx(Ow,{hideToolbar:L,toolbarBottom:$,prefixCls:r,overflow:y,placement:"bottom"})]}))})}),pD=gse;pD.Markdown=aD;const ya=({field:t,value:e,onChange:n,...r})=>{const[i,s]=_.useState(e),{key:a,name:o,comp_params:l}=t;function c(u){n(u),s(u)}return f.jsx("div",{children:f.jsx(pD,{preview:"edit",value:i,onChange:c,...l,className:"bg-white dark:bg-slate-800 ",style:{color:"inherit"}})})},mi=(t,e,n,r="edit",i)=>{const s=_.useRef(),{doc:a,loading:o,hasLoaded:l,error:c,op:u,sdk:d,actions:{reload:h,reload_hard:p,upsert:m,setError:g,remove:y}}=pv(t,e),{nav:v,navWithState:x,state:b}=zi(),w=_.useMemo(()=>{let U={};try{U=i?HR(i):{}}catch{}return{...U,...a,...b!=null&&b.hasChanged?b==null?void 0:b.data:{}}},[a,i,b]),C=_.useRef(),S=(b==null?void 0:b.hasChanged)??!1,k=r==="edit",N=r==="create",D=!(k||N),A=_.useMemo(()=>({getState:()=>{var R;const U=(R=s.current.get(!1))==null?void 0:R.data,G=!!C.current.get();return{data:U,hasChanged:G}}}),[]),L=_.useCallback(async(U={})=>{const G=A.getState(),R={data:{...G==null?void 0:G.data,handle:void 0,id:void 0,updated_at:void 0,created_at:void 0,search:void 0,_published:void 0,...U},hasChanged:!0};C.current.set(!1),n&&x(`${n}/create`,G,R)},[x,A,n]),$=_.useCallback(async()=>{const U=s.current.get(),{validation:{has_errors:G,fine:R},data:z}=U,O={...w,...z};console.log("final ",O);const W=await m(O);return console.log("new doc",W),n&&v(`${n}/${W.handle??W.id}`,{replace:!0}),W},[m,v,w,n]),K=_.useCallback(async(U=!1)=>{n&&v(`${n}/${w.handle??w.id}`,{replace:!0}),await h(U)},[h,v,w,n]),X=_.useCallback(async()=>{const U=await y();return n&&v(-2),U},[y,v,n]),H=_.useMemo(()=>JSON.stringify(w),[w]);return{actions:{reloadPromise:K,reload_hard:p,savePromise:$,deletePromise:X,duplicate:L,navWithState:x,reload:h,setError:g},error:c,key:H,ref_head:C,ref_root:s,doc:w,sdk:d,isEditMode:k,isCreateMode:N,isViewMode:D,op:u,loading:o,hasChanged:S,hasLoaded:l,context:A}},yse={name:"🙋🏻‍♂️ Contact Info",key:"contact",comp:Q(He,{className:""}),comp_params:{className:"w-full"},fields:[{key:"email",name:"Email",type:"email",validate:!0,editable:!0,comp:Q(Ie(Pe),{className:"h-10"},!1),comp_params:{className:"w-full h-fit mt-5 text-gray-400"}},{key:"phone_number",name:"Phone Number",type:"number",validate:!0,editable:!0,comp:Q(Ie(Pe),{className:"h-10",type:"tel"},!1),comp_params:{className:"w-full h-fit mt-5 text-gray-400"}},{key:"customer_id",name:"User ID (UID)",type:"text",validate:!1,editable:!0,comp:Q(Ie(Pe),{className:"h-10"},!1),comp_params:{className:"w-full h-fit mt-5 text-gray-400"}}]},vse={name:"✉︎ Address Info",key:"address",comp:Q(He,{className:"w-full flex flex-row flex-wrap gap-3"}),comp_params:{className:"w-full --lg:w-1/2 "},fields:[{key:"firstname",name:"First Name",type:"text",validate:!1,editable:!0,comp:Q(Ie(Pe),{className:"h-10 w-full"},!1),comp_params:{className:"w-full lg:w-[30%] h-fit text-gray-400"}},{key:"lastname",name:"Last Name",type:"text",validate:!1,editable:!0,comp:Q(Ie(Pe),{className:"h-10"},!1),comp_params:{className:"w-full lg:w-[30%] h-fit text-gray-400"}},{key:"company",name:"Company",type:"text",validate:!1,editable:!0,comp:Q(Ie(Pe),{className:"h-10"},!1),comp_params:{className:"w-full lg:w-[30%] h-fit text-gray-400"}},{key:"street1",name:"Street #1",type:"text",validate:!1,comp:Q(Ie(Pe),{className:"h-10"},!1),comp_params:{className:"w-full lg:w-[30%] h-fit text-gray-400"}},{key:"street2",name:"Street #2",type:"text",validate:!1,comp:Q(Ie(Pe),{className:"h-10"},!1),comp_params:{className:"w-full lg:w-[30%] h-fit text-gray-400"}},{key:"city",name:"City",type:"text",validate:!1,comp:Q(Ie(Pe),{className:"h-10"},!1),comp_params:{className:"w-full lg:w-[30%] h-fit text-gray-400"}},{key:"country",name:"Country",type:"text",validate:!1,comp:Q(Ie(Pe),{className:"h-10"},!1),comp_params:{className:"w-full lg:w-[30%] h-fit text-gray-400"}},{key:"state",name:"State",type:"text",validate:!1,comp:Q(Ie(Pe),{className:"h-10"},!1),comp_params:{className:"w-full lg:w-[30%] h-fit text-gray-400"}},{key:"zip_code",name:"ZIP Code",type:"text",validate:!1,comp:Q(Ie(Pe),{className:"h-10"},!1),comp_params:{className:"w-full lg:w-[30%] h-fit text-gray-400"}},{key:"postal_code",name:"Postal Code",type:"text",validate:!1,comp:Q(Ie(Pe),{className:"h-10"},!1),comp_params:{className:"w-full lg:w-[30%] h-fit text-gray-400"}},{key:"phone_number",name:"Phone Number",type:"text",validate:!1,comp:Q(Ie(Pe),{className:"h-10"},!1),comp_params:{className:"w-full lg:w-[30%] h-fit text-gray-400"}}]},xse={name:"☑ Status",key:"status",comp:Q(He,{className:""}),comp_params:{className:"w-full"},fields:[{key:"payment",name:"Payment Status",type:"text",validate:!1,desc:"What is the payment status",defaultValue:R4.unpaid,comp:Q(Ie(yp(Object.values(R4))),{className:"text-gray-600"},!1),comp_params:{className:"text-gray-500"}},{key:"fulfillment",name:"Fulfillment Status",type:"text",validate:!1,desc:"What is the fulfillment status",defaultValue:P4.draft,comp:Q(Ie(yp(Object.values(P4))),{className:"text-gray-600"},!1),comp_params:{className:"text-gray-500 mt-5"}},{key:"checkout",name:"Checkout Status",type:"text",validate:!1,desc:"How did the costumer complete checkout",defaultValue:T8.created,comp:Q(Ie(yp(Object.values(T8))),{className:"text-gray-600"},!1),comp_params:{className:"text-gray-500 mt-5"}}]},_se={name:"Right",comp:He,comp_params:{className:"flex flex-col w-full lg:w-[19rem] gap-5"},fields:[{key:"pricing",name:"🧾 Pricing",validate:!1,desc:"Decide the total price of the order including shipping and discounts",comp:Q(eW,{}),comp_params:{className:"w-full h-fit"}},{key:"shipping_method",name:"⛟ Delivery Method",type:"compound",validate:!1,editable:!0,desc:"Decide the delivery method",comp:Q(GY,{className:"w-full --bg-red-200 "}),comp_params:{className:"w-full "}},{key:"coupons",name:"🎟️ Coupons",type:"compound",validate:!1,editable:!0,desc:"Which coupons will be applied",comp:Q(KY,{className:"w-full --bg-red-200 "}),comp_params:{className:"w-full"}},xse,{key:"tags",name:"# Tags",type:"compund",validate:!1,editable:!0,desc:"Tags help you attach small attributes",comp:Q(pa)}]},bse={name:"Main",comp:He,comp_params:{className:`w-full gap-5 items-center
539
+ `).length,length:je.target.value.length}))}};return f.jsx(Cu.Provider,{value:Ve({},R,{dispatch:z}),children:f.jsxs("div",Ve({ref:O,className:I},H,{onClick:gn,style:zr,children:[f.jsx(Ow,{hideToolbar:L,toolbarBottom:$,prefixCls:r,overflow:y,placement:"top"}),f.jsxs("div",{className:r+"-content",children:[/(edit|live)/.test(R.preview||"")&&f.jsx(dse,Ve({className:r+"-input",prefixCls:r,autoFocus:C},x,{onChange:Ki,renderTextarea:(K==null?void 0:K.textarea)||X,onScroll:je=>Ae(je,"text")})),/(live|preview)/.test(R.preview||"")&&ye]}),h&&!R.fullscreen&&f.jsx(hse,{prefixCls:r,height:R.height,maxHeight:b,minHeight:w,onChange:Xn}),f.jsx(Ow,{hideToolbar:L,toolbarBottom:$,prefixCls:r,overflow:y,placement:"bottom"})]}))})}),pD=gse;pD.Markdown=aD;const ya=({field:t,value:e,onChange:n,...r})=>{const[i,s]=_.useState(e),{key:a,name:o,comp_params:l}=t;function c(u){n(u),s(u)}return f.jsx("div",{children:f.jsx(pD,{preview:"edit",value:i,onChange:c,...l,className:"bg-white dark:bg-slate-800 ",style:{color:"inherit"}})})},mi=(t,e,n,r="edit",i)=>{const s=_.useRef(),{doc:a,loading:o,hasLoaded:l,error:c,op:u,sdk:d,actions:{reload:h,reload_hard:p,upsert:m,setError:g,remove:y}}=pv(t,e),{nav:v,navWithState:x,state:b}=zi(),w=_.useMemo(()=>{let U={};try{U=i?HR(i):{}}catch{}return{...U,...a,...b!=null&&b.hasChanged?b==null?void 0:b.data:{}}},[a,i,b]),C=_.useRef(),S=(b==null?void 0:b.hasChanged)??!1,k=r==="edit",N=r==="create",D=!(k||N),A=_.useMemo(()=>({getState:()=>{var R;const U=(R=s.current.get(!1))==null?void 0:R.data,G=!!C.current.get();return{data:U,hasChanged:G}}}),[]),L=_.useCallback(async(U={})=>{const G=A.getState(),R={data:{...G==null?void 0:G.data,handle:void 0,id:void 0,updated_at:void 0,created_at:void 0,search:void 0,_published:void 0,...U},hasChanged:!0};C.current.set(!1),n&&x(`${n}/create`,G,R)},[x,A,n]),$=_.useCallback(async()=>{const U=s.current.get(),{validation:{has_errors:G,fine:R},data:z}=U,O={...w,...z};console.log("final ",O);const W=await m(O);return console.log("new doc",W),n&&v(`${n}/${W.handle??W.id}`,{replace:!0}),W},[m,v,w,n]),K=_.useCallback(async(U=!1)=>{n&&v(`${n}/${w.handle??w.id}`,{replace:!0}),await h(U)},[h,v,w,n]),X=_.useCallback(async()=>{const U=await y();return n&&v(-2),U},[y,v,n]),H=_.useMemo(()=>JSON.stringify(w),[w]);return{actions:{reloadPromise:K,reload_hard:p,savePromise:$,deletePromise:X,duplicate:L,navWithState:x,reload:h,setError:g},error:c,key:H,ref_head:C,ref_root:s,doc:w,sdk:d,isEditMode:k,isCreateMode:N,isViewMode:D,op:u,loading:o,hasChanged:S,hasLoaded:l,context:A}},yse={name:"🙋🏻‍♂️ Contact Info",key:"contact",comp:Q(He,{className:""}),comp_params:{className:"w-full"},fields:[{key:"email",name:"Email",type:"email",validate:!0,editable:!0,comp:Q(Me(Le),{className:"h-10"},!1),comp_params:{className:"w-full h-fit mt-5 text-gray-400"}},{key:"firstname",name:"First Name",type:"text",validate:!0,editable:!0,comp:Q(Me(Le),{className:"h-10"},!1),comp_params:{className:"w-full h-fit mt-5 text-gray-400"}},{key:"lastname",name:"Last Name",type:"text",validate:!0,editable:!0,comp:Q(Me(Le),{className:"h-10"},!1),comp_params:{className:"w-full h-fit mt-5 text-gray-400"}},{key:"phone_number",name:"Phone Number",type:"number",validate:!0,editable:!0,comp:Q(Me(Le),{className:"h-10",type:"tel"},!1),comp_params:{className:"w-full h-fit mt-5 text-gray-400"}},{key:"customer_id",name:"User ID (UID)",type:"text",validate:!1,editable:!0,comp:Q(Me(Le),{className:"h-10"},!1),comp_params:{className:"w-full h-fit mt-5 text-gray-400"}}]},vse={name:"✉︎ Address Info",key:"address",comp:Q(He,{className:"w-full flex flex-row flex-wrap gap-3"}),comp_params:{className:"w-full --lg:w-1/2 "},fields:[{key:"firstname",name:"First Name",type:"text",validate:!1,editable:!0,comp:Q(Me(Le),{className:"h-10 w-full"},!1),comp_params:{className:"w-full lg:w-[30%] h-fit text-gray-400"}},{key:"lastname",name:"Last Name",type:"text",validate:!1,editable:!0,comp:Q(Me(Le),{className:"h-10"},!1),comp_params:{className:"w-full lg:w-[30%] h-fit text-gray-400"}},{key:"company",name:"Company",type:"text",validate:!1,editable:!0,comp:Q(Me(Le),{className:"h-10"},!1),comp_params:{className:"w-full lg:w-[30%] h-fit text-gray-400"}},{key:"street1",name:"Street #1",type:"text",validate:!1,comp:Q(Me(Le),{className:"h-10"},!1),comp_params:{className:"w-full lg:w-[30%] h-fit text-gray-400"}},{key:"street2",name:"Street #2",type:"text",validate:!1,comp:Q(Me(Le),{className:"h-10"},!1),comp_params:{className:"w-full lg:w-[30%] h-fit text-gray-400"}},{key:"city",name:"City",type:"text",validate:!1,comp:Q(Me(Le),{className:"h-10"},!1),comp_params:{className:"w-full lg:w-[30%] h-fit text-gray-400"}},{key:"country",name:"Country",type:"text",validate:!1,comp:Q(Me(Le),{className:"h-10"},!1),comp_params:{className:"w-full lg:w-[30%] h-fit text-gray-400"}},{key:"state",name:"State",type:"text",validate:!1,comp:Q(Me(Le),{className:"h-10"},!1),comp_params:{className:"w-full lg:w-[30%] h-fit text-gray-400"}},{key:"zip_code",name:"ZIP Code",type:"text",validate:!1,comp:Q(Me(Le),{className:"h-10"},!1),comp_params:{className:"w-full lg:w-[30%] h-fit text-gray-400"}},{key:"postal_code",name:"Postal Code",type:"text",validate:!1,comp:Q(Me(Le),{className:"h-10"},!1),comp_params:{className:"w-full lg:w-[30%] h-fit text-gray-400"}},{key:"phone_number",name:"Phone Number",type:"text",validate:!1,comp:Q(Me(Le),{className:"h-10"},!1),comp_params:{className:"w-full lg:w-[30%] h-fit text-gray-400"}}]},xse={name:"☑ Status",key:"status",comp:Q(He,{className:""}),comp_params:{className:"w-full"},fields:[{key:"payment",name:"Payment Status",type:"text",validate:!1,desc:"What is the payment status",defaultValue:R4.unpaid,comp:Q(Me(yp(Object.values(R4))),{className:"text-gray-600"},!1),comp_params:{className:"text-gray-500"}},{key:"fulfillment",name:"Fulfillment Status",type:"text",validate:!1,desc:"What is the fulfillment status",defaultValue:P4.draft,comp:Q(Me(yp(Object.values(P4))),{className:"text-gray-600"},!1),comp_params:{className:"text-gray-500 mt-5"}},{key:"checkout",name:"Checkout Status",type:"text",validate:!1,desc:"How did the costumer complete checkout",defaultValue:T8.created,comp:Q(Me(yp(Object.values(T8))),{className:"text-gray-600"},!1),comp_params:{className:"text-gray-500 mt-5"}}]},_se={name:"Right",comp:He,comp_params:{className:"flex flex-col w-full lg:w-[19rem] gap-5"},fields:[{key:"pricing",name:"🧾 Pricing",validate:!1,desc:"Decide the total price of the order including shipping and discounts",comp:Q(eW,{}),comp_params:{className:"w-full h-fit"}},{key:"shipping_method",name:"⛟ Delivery Method",type:"compound",validate:!1,editable:!0,desc:"Decide the delivery method",comp:Q(GY,{className:"w-full --bg-red-200 "}),comp_params:{className:"w-full "}},{key:"coupons",name:"🎟️ Coupons",type:"compound",validate:!1,editable:!0,desc:"Which coupons will be applied",comp:Q(KY,{className:"w-full --bg-red-200 "}),comp_params:{className:"w-full"}},xse,{key:"tags",name:"# Tags",type:"compund",validate:!1,editable:!0,desc:"Tags help you attach small attributes",comp:Q(pa)}]},bse={name:"Main",comp:He,comp_params:{className:`w-full gap-5 items-center
540
540
  lg:items-start lg:w-[35rem] flex flex-col `},fields:[{key:"payment_gateway",name:"💳 Payments",desc:"Let's see what the payment gateway status is",comp:Q(YW,{className:"w-full --bg-red-200 "}),comp_params:{className:"w-full text-xs py-auto --font-semibold"}},{key:"line_items",name:"🛍️ Line Items",type:"compound",validate:!1,editable:!0,desc:"Which items are included in the order",defaultValue:[],comp:Q(JY,{className:"w-full --bg-red-200 "}),comp_params:{className:"w-full text-xs py-auto --font-semibold"}},yse,vse,{key:"attributes",name:"Attributes",validate:!1,editable:!0,desc:"Attributes can contain richer text values than tags",comp:Q(So),comp_params:{className:"w-full"}},{key:"notes",name:"🗒 Notes",type:"text",desc:"Notes help you add extra information about the order",validate:!1,editable:!0,comp:Q(ya),comp_params:{className:"w-full"}},{name:"JSON",type:"compund",validate:!1,editable:!1,desc:"Observe the RAW data",comp:Ds,comp_params:{className:"w-full"}}]},wse={name:"Root",comp:He,comp_params:{className:`w-full gap-5 --justify-center --bg-red-100 items-center
541
541
  lg:max-w-max lg:items-start lg:w-fit flex flex-col
542
542
  lg:flex-row --mx-auto`},fields:[bse,_se]},B2=({mode:t,...e})=>{const{id:n,base:r}=fr(),{actions:{savePromise:i,deletePromise:s,reload:a,setError:o,duplicate:l,reload_hard:c},context:u,key:d,doc:h,isCreateMode:p,isEditMode:m,isViewMode:g,loading:y,hasChanged:v,hasLoaded:x,error:b,ref_head:w,ref_root:C,sdk:S,op:k}=mi("orders",n,"/pages/orders",t,r),N=_.useCallback(async L=>{const $=h;console.log("doc",h);try{const K=await S.checkout.create($,L),X=K==null?void 0:K.validation;if(console.log("valid_errors",X),X!=null&&X.length){o({messages:X});return}}catch(K){console.log("e",K),o(K);return}try{await a(!1)}catch(K){console.log("e",K)}},[i,o,S,a,h]),D=_.useMemo(()=>({...u,create_checkout:N}),[u,N]),A=_.useCallback(()=>l({payment_gateway:void 0,pricing:void 0,line_items:h.line_items.map(L=>({...L,stock_reserved:0}))}),[l,h]);return f.jsxs("div",{className:"w-full lg:min-w-fit mx-auto",children:[f.jsx($i,{major:["orders",n??"create"],className:""}),f.jsx(As,{doc:h,className:"mt-5",collectionId:"orders"}),f.jsx(Ns,{id:h==null?void 0:h.id,onClickSave:m?i:void 0,onClickCreate:p?i:void 0,onClickDelete:p?void 0:s,onClickDuplicate:p?void 0:A,onClickReload:p?void 0:async()=>a(!1),className:"mt-5 "}),f.jsx(Cs,{changes_made:v,ref:w,time:h==null?void 0:h.created_at,className:"mt-8"},h==null?void 0:h.updated_at),f.jsx(de,{show:x&&m||p,children:f.jsxs("div",{className:"w-full mx-auto ",children:[f.jsx(Hr,{error:b,className:"w-full"}),f.jsx(ci,{ref:C,field:wse,value:h??{},context:D,isViewMode:g,className:"mt-8 mx-auto"},d)]})})]})},mD=t=>t!=null&&t.firstname?(t==null?void 0:t.firstname)+(t!=null&&t.lastname?" "+(t==null?void 0:t.lastname):""):(t==null?void 0:t.email)??"anonymous",Ese=[{key:"undefined",name:"Full Name",comp:zt,transform:t=>mD(t),comp_params:{className:"font-semibold"}},{key:"email",name:"Email",comp:zt},{key:"updated_at",name:"Last Updated",comp:Ss},{key:"auth_id",name:"UID",comp:zt,comp_params:{extra:"max-w-[4rem]"}},{key:void 0,name:"Actions",comp:Fr}],Mw=({})=>{const{query_api:t,context:e,ref_actions:n,page:r,loading:i,error:s,queryCount:a,hasLoaded:o,resource:l,resource_is_probably_empty:c,actions:{onLimitChange:u,onReload:d,prev:h,next:p}}=Br("customers","/pages/customers");return f.jsx("div",{className:"h-full w-full",children:f.jsxs("div",{className:"max-w-[56rem] mx-auto",children:[f.jsx(pr,{should_onboard:c,overallCollectionCount:a,hasLoaded:o,resource:l}),f.jsx(de,{show:s,children:s==null?void 0:s.toString()}),f.jsxs("div",{className:`w-full rounded-md overflow-hidden border
543
543
  shelf-border-color shadow-md mt-5
544
- dark:shadow-slate-900`,children:[f.jsx(Ts,{isCollectionEmpty:c,ref:n,reload:d,createLink:"/pages/customers/create",searchTitle:"Search by name, email, uid...",isLoading:i}),f.jsxs(de,{show:!s&&(r==null?void 0:r.length),children:[f.jsx(hr,{context:e,data:r,fields:Ese}),f.jsx(jr,{prev:h,next:p,limit:t.limit,onLimitChange:u})]})]})]})})},kse=_.forwardRef(({resource:t,limit:e=5,context:n,schema:r,...i},s)=>{rn();const{pages:a,page:o,loading:l,error:c,queryCount:u,actions:{prev:d,next:h,query:p}}=Co(t,El,!1);return yv(),_.useEffect(()=>{p({limit:e,sortBy:["updated_at","id"]})},[p,e]),_.useImperativeHandle(s,()=>({refresh:()=>p({limit:e})}),[p,e]),f.jsxs(f.Fragment,{children:[f.jsx(hr,{context:n,data:o,fields:r}),f.jsx(jr,{prev:d,next:h,onLimitChange:void 0})]})}),Cse=({context:t,value:e,children:n,className:r,extra:i="max-w-[8rem] md:max-w-[12rem]",url_fn:s,get_state:a,...o})=>{const c=`overflow-x-auto inline-block whitespace-nowrap shelf-text-label-color ${r} ${i}`;return f.jsx("div",{className:c,...o,children:f.jsx(yf,{current_state:a,children:e??n,to:s==null?void 0:s(t.item),className:"underline"})})},Tse=({value:t,field:e,context:n,error:r,setError:i,...s})=>{const a=_.useRef([{key:"id",name:"ID",comp:({...o})=>f.jsx(Cse,{...o,url_fn:l=>`/pages/orders/${l==null?void 0:l.id}`,get_state:()=>n.getState()})},{key:"updated_at",name:"Last Updated",comp:Ss},{key:"pricing.total",name:"Price",comp:zt,comp_params:{className:"font-bold"}},{key:"status.fulfillment.name",name:"Status",comp:({value:o})=>o&&f.jsx(Xt,{value:`**\`${o.toString()}\`**`,className:"overflow-x-auto max-w-20 flex-shrink"})}]);return f.jsx("div",{...s,children:f.jsx(kse,{limit:5,resource:`customers/${t==null?void 0:t.email}/orders`,schema:a.current})})},Sse={comp:He,comp_params:{className:"w-full gap-5 items-center lg:items-start lg:w-[35rem] flex flex-col "},fields:[{key:void 0,name:"🛍️ Orders",desc:"Here are the orders made by ",comp:Q(Tse,{className:"w-full"}),comp_params:{className:"w-full h-fit"}},{key:"firstname",name:"First Name",type:"text",validate:!0,editable:!0,comp:Q(Ie(Pe),{className:"h-10 w-full"}),comp_params:{className:"w-full h-fit"}},{key:"lastname",name:"Last Name",type:"text",validate:!0,editable:!0,comp:Q(Ie(Pe),{className:"h-10 w-full"}),comp_params:{className:"w-full h-fit"}},{key:"email",name:"Email",type:"email",validate:!0,editable:!0,comp:Q(Ie(Pe),{className:"h-10 w-full"}),comp_params:{className:"w-full h-fit"}},{key:"phone_number",name:"Phone number",type:"text",validate:!1,editable:!0,comp:Q(Ie(Pe),{className:"h-10 w-full"}),comp_params:{className:"w-full h-fit"}},{key:"auth_id",name:"UID",type:"text",validate:!0,editable:!0,comp:Q(Ie(Pe),{className:"h-10 w-full"}),desc:"The authentication platform user id",comp_params:{className:"w-full h-fit"}},{key:"attributes",name:"Attributes",validate:!1,editable:!0,desc:"Attributes can contain richer text values than tags",comp:Q(So),comp_params:{className:"w-full"}},{name:"JSON",type:"compund",validate:!1,editable:!1,desc:"Observe the RAW data",comp:Ds,comp_params:{className:"w-full"}}]},Nse={key:"address",name:"📬 Address",comp:Q(He,{className:"flex flex-col gap-5"}),desc:"Address information of your user",comp_params:{className:"w-full h-fit "},fields:[{key:"street1",name:"Street 1",type:"text",validate:!1,comp:Q(Ie(Pe),{className:"h-10 w-full",placeholder:""},!1),comp_params:{className:"text-gray-500"}},{key:"street2",name:"Street 2",type:"text",validate:!1,comp:Q(Ie(Pe),{className:"h-10 w-full",placeholder:""},!1),comp_params:{className:"text-gray-500"}},{key:"city",name:"City",type:"text",validate:!1,comp:Q(Ie(Pe),{className:"h-10 w-full"},!1),comp_params:{className:"text-gray-500"}},{key:"country",name:"Country",type:"text",validate:!1,comp:Q(Ie(Pe),{className:"h-10 w-full"},!1),comp_params:{className:"text-gray-500"}},{key:"state",name:"State",type:"text",validate:!1,comp:Q(Ie(Pe),{className:"h-10 w-full"},!1),comp_params:{className:"text-gray-500"}},{key:"zip_code",name:"Zip Code",type:"text",validate:!1,comp:Q(Ie(Pe),{className:"h-10 w-full"},!1),comp_params:{className:"text-gray-500"}},{key:"postal_code",name:"Postal Code",type:"text",validate:!1,comp:Q(Ie(Pe),{className:"h-10 w-full"},!1),comp_params:{className:"text-gray-500"}}]},Ase={name:"right",comp:He,comp_params:{className:"w-full lg:w-[19rem] h-fit flex flex-col gap-5"},fields:[{key:"tags",name:"# Tags",type:"compund",validate:!1,editable:!0,comp:Q(pa),desc:"Add tags to your users to better categorize them",comp_params:{className:"w-full "}},Nse]},Dse={name:"Root",comp:He,comp_params:{className:"w-full gap-5 lg:justify-center mx-auto lg:w-fit flex flex-col justify-start lg:flex-row "},fields:[Sse,Ase]},H2=({mode:t,...e})=>{const{id:n,base:r}=fr(),{actions:{savePromise:i,deletePromise:s,reload:a},context:o,key:l,doc:c,isCreateMode:u,isEditMode:d,isViewMode:h,loading:p,hasChanged:m,hasLoaded:g,error:y,ref_head:v,ref_root:x}=mi("customers",n,"/pages/customers",t,r);return f.jsxs("div",{className:"w-full lg:min-w-fit mx-auto",children:[f.jsx($i,{major:["customers",n??"create"],className:""}),f.jsx(As,{doc:c,className:"mt-5",collectionId:"customers"}),f.jsx(Ns,{id:c==null?void 0:c.id,onClickSave:d?i:void 0,onClickCreate:u?i:void 0,onClickReload:u?void 0:async()=>a(!1),onClickDelete:u?void 0:s,className:"mt-5"}),f.jsx(Cs,{ref:v,time:c==null?void 0:c.created_at,className:"mt-8",changes_made:m},c==null?void 0:c.updated_at),f.jsx(de,{show:g&&d||u,children:f.jsxs("div",{className:"w-full max-w-[40rem] lg:w-fit lg:max-w-none mx-auto",children:[f.jsx(Hr,{error:y,className:"w-full"}),f.jsx(ci,{ref:x,field:Dse,value:c??{},context:o,isViewMode:h,className:"mt-8"},l)]})})]})},Ose=[{key:"handle",name:"Name",comp:zt,comp_params:{className:"font-semibold"}},{key:"values",name:"Values",comp:US,comp_params:{className:"font-semibold"}},{key:void 0,name:"Actions",comp:Fr,comp_params:{className:""}}],Iw=({})=>{const{query_api:t,context:e,ref_actions:n,page:r,loading:i,error:s,queryCount:a,hasLoaded:o,resource:l,resource_is_probably_empty:c,actions:{onLimitChange:u,onReload:d,prev:h,next:p}}=Br("tags","/pages/tags");return f.jsx("div",{className:"w-full h-full",children:f.jsxs("div",{className:"max-w-[56rem] mx-auto",children:[f.jsx(pr,{should_onboard:c,overallCollectionCount:a,hasLoaded:o,resource:l}),f.jsx(de,{show:s,children:s==null?void 0:s.toString()}),f.jsxs("div",{className:`w-full rounded-md overflow-hidden border
544
+ dark:shadow-slate-900`,children:[f.jsx(Ts,{isCollectionEmpty:c,ref:n,reload:d,createLink:"/pages/customers/create",searchTitle:"Search by name, email, uid...",isLoading:i}),f.jsxs(de,{show:!s&&(r==null?void 0:r.length),children:[f.jsx(hr,{context:e,data:r,fields:Ese}),f.jsx(jr,{prev:h,next:p,limit:t.limit,onLimitChange:u})]})]})]})})},kse=_.forwardRef(({resource:t,limit:e=5,context:n,schema:r,...i},s)=>{rn();const{pages:a,page:o,loading:l,error:c,queryCount:u,actions:{prev:d,next:h,query:p}}=Co(t,El,!1);return yv(),_.useEffect(()=>{p({limit:e,sortBy:["updated_at","id"]})},[p,e]),_.useImperativeHandle(s,()=>({refresh:()=>p({limit:e})}),[p,e]),f.jsxs(f.Fragment,{children:[f.jsx(hr,{context:n,data:o,fields:r}),f.jsx(jr,{prev:d,next:h,onLimitChange:void 0})]})}),Cse=({context:t,value:e,children:n,className:r,extra:i="max-w-[8rem] md:max-w-[12rem]",url_fn:s,get_state:a,...o})=>{const c=`overflow-x-auto inline-block whitespace-nowrap shelf-text-label-color ${r} ${i}`;return f.jsx("div",{className:c,...o,children:f.jsx(yf,{current_state:a,children:e??n,to:s==null?void 0:s(t.item),className:"underline"})})},Tse=({value:t,field:e,context:n,error:r,setError:i,...s})=>{const a=_.useRef([{key:"id",name:"ID",comp:({...o})=>f.jsx(Cse,{...o,url_fn:l=>`/pages/orders/${l==null?void 0:l.id}`,get_state:()=>n.getState()})},{key:"updated_at",name:"Last Updated",comp:Ss},{key:"pricing.total",name:"Price",comp:zt,comp_params:{className:"font-bold"}},{key:"status.fulfillment.name",name:"Status",comp:({value:o})=>o&&f.jsx(Xt,{value:`**\`${o.toString()}\`**`,className:"overflow-x-auto max-w-20 flex-shrink"})}]);return f.jsx("div",{...s,children:f.jsx(kse,{limit:5,resource:`customers/${t==null?void 0:t.email}/orders`,schema:a.current})})},Sse={comp:He,comp_params:{className:"w-full gap-5 items-center lg:items-start lg:w-[35rem] flex flex-col "},fields:[{key:void 0,name:"🛍️ Orders",desc:"Here are the orders made by ",comp:Q(Tse,{className:"w-full"}),comp_params:{className:"w-full h-fit"}},{key:"firstname",name:"First Name",type:"text",validate:!0,editable:!0,comp:Q(Me(Le),{className:"h-10 w-full"}),comp_params:{className:"w-full h-fit"}},{key:"lastname",name:"Last Name",type:"text",validate:!0,editable:!0,comp:Q(Me(Le),{className:"h-10 w-full"}),comp_params:{className:"w-full h-fit"}},{key:"email",name:"Email",type:"email",validate:!0,editable:!0,comp:Q(Me(Le),{className:"h-10 w-full"}),comp_params:{className:"w-full h-fit"}},{key:"phone_number",name:"Phone number",type:"text",validate:!1,editable:!0,comp:Q(Me(Le),{className:"h-10 w-full"}),comp_params:{className:"w-full h-fit"}},{key:"auth_id",name:"UID",type:"text",validate:!0,editable:!0,comp:Q(Me(Le),{className:"h-10 w-full"}),desc:"The authentication platform user id",comp_params:{className:"w-full h-fit"}},{key:"attributes",name:"Attributes",validate:!1,editable:!0,desc:"Attributes can contain richer text values than tags",comp:Q(So),comp_params:{className:"w-full"}},{name:"JSON",type:"compund",validate:!1,editable:!1,desc:"Observe the RAW data",comp:Ds,comp_params:{className:"w-full"}}]},Nse={key:"address",name:"📬 Address",comp:Q(He,{className:"flex flex-col gap-5"}),desc:"Address information of your user",comp_params:{className:"w-full h-fit "},fields:[{key:"street1",name:"Street 1",type:"text",validate:!1,comp:Q(Me(Le),{className:"h-10 w-full",placeholder:""},!1),comp_params:{className:"text-gray-500"}},{key:"street2",name:"Street 2",type:"text",validate:!1,comp:Q(Me(Le),{className:"h-10 w-full",placeholder:""},!1),comp_params:{className:"text-gray-500"}},{key:"city",name:"City",type:"text",validate:!1,comp:Q(Me(Le),{className:"h-10 w-full"},!1),comp_params:{className:"text-gray-500"}},{key:"country",name:"Country",type:"text",validate:!1,comp:Q(Me(Le),{className:"h-10 w-full"},!1),comp_params:{className:"text-gray-500"}},{key:"state",name:"State",type:"text",validate:!1,comp:Q(Me(Le),{className:"h-10 w-full"},!1),comp_params:{className:"text-gray-500"}},{key:"zip_code",name:"Zip Code",type:"text",validate:!1,comp:Q(Me(Le),{className:"h-10 w-full"},!1),comp_params:{className:"text-gray-500"}},{key:"postal_code",name:"Postal Code",type:"text",validate:!1,comp:Q(Me(Le),{className:"h-10 w-full"},!1),comp_params:{className:"text-gray-500"}}]},Ase={name:"right",comp:He,comp_params:{className:"w-full lg:w-[19rem] h-fit flex flex-col gap-5"},fields:[{key:"tags",name:"# Tags",type:"compund",validate:!1,editable:!0,comp:Q(pa),desc:"Add tags to your users to better categorize them",comp_params:{className:"w-full "}},Nse]},Dse={name:"Root",comp:He,comp_params:{className:"w-full gap-5 lg:justify-center mx-auto lg:w-fit flex flex-col justify-start lg:flex-row "},fields:[Sse,Ase]},H2=({mode:t,...e})=>{const{id:n,base:r}=fr(),{actions:{savePromise:i,deletePromise:s,reload:a},context:o,key:l,doc:c,isCreateMode:u,isEditMode:d,isViewMode:h,loading:p,hasChanged:m,hasLoaded:g,error:y,ref_head:v,ref_root:x}=mi("customers",n,"/pages/customers",t,r);return f.jsxs("div",{className:"w-full lg:min-w-fit mx-auto",children:[f.jsx($i,{major:["customers",n??"create"],className:""}),f.jsx(As,{doc:c,className:"mt-5",collectionId:"customers"}),f.jsx(Ns,{id:c==null?void 0:c.id,onClickSave:d?i:void 0,onClickCreate:u?i:void 0,onClickReload:u?void 0:async()=>a(!1),onClickDelete:u?void 0:s,className:"mt-5"}),f.jsx(Cs,{ref:v,time:c==null?void 0:c.created_at,className:"mt-8",changes_made:m},c==null?void 0:c.updated_at),f.jsx(de,{show:g&&d||u,children:f.jsxs("div",{className:"w-full max-w-[40rem] lg:w-fit lg:max-w-none mx-auto",children:[f.jsx(Hr,{error:y,className:"w-full"}),f.jsx(ci,{ref:x,field:Dse,value:c??{},context:o,isViewMode:h,className:"mt-8"},l)]})})]})},Ose=[{key:"handle",name:"Name",comp:zt,comp_params:{className:"font-semibold"}},{key:"values",name:"Values",comp:US,comp_params:{className:"font-semibold"}},{key:void 0,name:"Actions",comp:Fr,comp_params:{className:""}}],Iw=({})=>{const{query_api:t,context:e,ref_actions:n,page:r,loading:i,error:s,queryCount:a,hasLoaded:o,resource:l,resource_is_probably_empty:c,actions:{onLimitChange:u,onReload:d,prev:h,next:p}}=Br("tags","/pages/tags");return f.jsx("div",{className:"w-full h-full",children:f.jsxs("div",{className:"max-w-[56rem] mx-auto",children:[f.jsx(pr,{should_onboard:c,overallCollectionCount:a,hasLoaded:o,resource:l}),f.jsx(de,{show:s,children:s==null?void 0:s.toString()}),f.jsxs("div",{className:`w-full rounded-md overflow-hidden border
545
545
  shelf-border-color shadow-md mt-5
546
- dark:shadow-slate-900`,children:[f.jsx(Ts,{isCollectionEmpty:!1,ref:n,reload:d,createLink:"/pages/tags/create",searchTitle:"Search by name, values...",isLoading:i}),f.jsxs(de,{show:!s&&(r==null?void 0:r.length),children:[f.jsx(hr,{context:e,data:r,fields:Ose}),f.jsx(jr,{prev:h,next:p,limit:t.limit,onLimitChange:u})]})]})]})})},Mse=t=>t==null?void 0:t.match(/\S+/g),Ise=({field:t,value:e,onChange:n,...r})=>{const{key:i,name:s,comp_params:a}=t,[o,l]=_.useState(e??[]),c=_.useRef(),u=_.useCallback(h=>{const p=Mse(c.current.value.toString()).map(g=>kj(g));if(!p)return;for(let g of p)o.indexOf(g)==-1&&o.push(g);const m=[...o];n(m),l(m)},[o,n]),d=_.useCallback(h=>{const p=o.indexOf(h);if(p==-1)return;o.splice(p,1);const m=[...o];n(m),l(m)},[o,n]);return f.jsxs("div",{...a,children:[f.jsxs("div",{className:"flex flex-row items-center h-9 w-full gap-3 ",children:[f.jsx(qe,{placeholder:"space separated values",className:"flex-grow",rounded:"rounded-md",ref:c,type:"text"}),f.jsx(Wn,{children:"Add",stroke:"border-2 h-10",onClick:u})]}),f.jsx(Ui,{tags:o,onClick:d,onRemove:d,clsCapsule:"bg-pink-500",className:"mt-3"})]})},Lse=t=>{const e=Array.isArray(t)&&t.length;return[e,e?"":"Empty values"]},Pse={name:"Root",comp:He,comp_params:{className:"flex flex-col gap-5 w-full max-w-[35rem]"},fields:[{key:"handle",name:"Name",type:"text",validate:!0,desc:"Use simple key names, like `color` for quick attributes creation",comp:Q(Ie(Pe),{className:"h-9",placeholder:"enter the key / name of the tag"}),comp_params:{className:"w-full "}},{key:"values",name:"Values",type:"text",validate:!0,desc:"Use simple value names, like `red`, `green`, `white` for quick attributes creation",validator:Lse,comp:Q(Ise),comp_params:{className:"w-full"}},{key:"description",name:"📝 Description",type:"text",validate:!1,editable:!0,desc:"Describe the purpose of this tag",comp:Q(ya),comp_params:{className:"w-full"}},{name:"JSON",type:"compund",validate:!1,editable:!1,desc:"Observe the RAW data",comp:Ds,comp_params:{className:"w-full"}}]},z2=({mode:t,...e})=>{const{id:n,base:r}=fr(),{actions:{savePromise:i,deletePromise:s,reload:a},context:o,key:l,doc:c,isCreateMode:u,isEditMode:d,isViewMode:h,loading:p,hasChanged:m,hasLoaded:g,error:y,ref_head:v,ref_root:x}=mi("tags",n,"/pages/tags",t,r);return f.jsxs("div",{className:"w-full lg:min-w-fit mx-auto",children:[f.jsx($i,{major:["tags",n??"create"],className:""}),f.jsx(As,{doc:c,className:"mt-5",collectionId:"tags"}),f.jsx(Ns,{id:c.handle,onClickSave:d?i:void 0,onClickCreate:u?i:void 0,onClickReload:u?void 0:async()=>a(!1),onClickDelete:u?void 0:s,className:"mt-5"}),f.jsx(Cs,{ref:v,time:c==null?void 0:c.created_at,className:"mt-8",changes_made:m},c==null?void 0:c.updated_at),f.jsxs(de,{show:g&&d||u,children:[f.jsx(Hr,{error:y,className:"w-full max-w-[35rem] mx-auto"}),f.jsx(ci,{ref:x,field:Pse,value:c??{},context:o,isViewMode:h,className:"mx-auto"},l)]})]})},Rse=[{key:"title",name:"Title",comp:zt,comp_params:{className:"font-semibold"}},{key:"handle",name:"Handle",comp:zt,comp_params:{className:"font-semibold"}},{key:void 0,name:"Actions",comp:Fr,comp_params:{className:""}}],Lw=({})=>{const{query_api:t,context:e,ref_actions:n,page:r,loading:i,error:s,queryCount:a,hasLoaded:o,resource:l,resource_is_probably_empty:c,actions:{onLimitChange:u,onReload:d,prev:h,next:p}}=Br("templates","/apps/templates");return f.jsx("div",{className:"w-full h-full",children:f.jsxs("div",{className:"max-w-[56rem] mx-auto",children:[f.jsx(pr,{should_onboard:c,overallCollectionCount:a,hasLoaded:o,resource:l}),f.jsx(de,{show:s,children:s==null?void 0:s.toString()}),f.jsxs("div",{className:`w-full rounded-md overflow-hidden border
546
+ dark:shadow-slate-900`,children:[f.jsx(Ts,{isCollectionEmpty:!1,ref:n,reload:d,createLink:"/pages/tags/create",searchTitle:"Search by name, values...",isLoading:i}),f.jsxs(de,{show:!s&&(r==null?void 0:r.length),children:[f.jsx(hr,{context:e,data:r,fields:Ose}),f.jsx(jr,{prev:h,next:p,limit:t.limit,onLimitChange:u})]})]})]})})},Mse=t=>t==null?void 0:t.match(/\S+/g),Ise=({field:t,value:e,onChange:n,...r})=>{const{key:i,name:s,comp_params:a}=t,[o,l]=_.useState(e??[]),c=_.useRef(),u=_.useCallback(h=>{const p=Mse(c.current.value.toString()).map(g=>kj(g));if(!p)return;for(let g of p)o.indexOf(g)==-1&&o.push(g);const m=[...o];n(m),l(m)},[o,n]),d=_.useCallback(h=>{const p=o.indexOf(h);if(p==-1)return;o.splice(p,1);const m=[...o];n(m),l(m)},[o,n]);return f.jsxs("div",{...a,children:[f.jsxs("div",{className:"flex flex-row items-center h-9 w-full gap-3 ",children:[f.jsx(qe,{placeholder:"space separated values",className:"flex-grow",rounded:"rounded-md",ref:c,type:"text"}),f.jsx(Wn,{children:"Add",stroke:"border-2 h-10",onClick:u})]}),f.jsx(Ui,{tags:o,onClick:d,onRemove:d,clsCapsule:"bg-pink-500",className:"mt-3"})]})},Lse=t=>{const e=Array.isArray(t)&&t.length;return[e,e?"":"Empty values"]},Pse={name:"Root",comp:He,comp_params:{className:"flex flex-col gap-5 w-full max-w-[35rem]"},fields:[{key:"handle",name:"Name",type:"text",validate:!0,desc:"Use simple key names, like `color` for quick attributes creation",comp:Q(Me(Le),{className:"h-9",placeholder:"enter the key / name of the tag"}),comp_params:{className:"w-full "}},{key:"values",name:"Values",type:"text",validate:!0,desc:"Use simple value names, like `red`, `green`, `white` for quick attributes creation",validator:Lse,comp:Q(Ise),comp_params:{className:"w-full"}},{key:"description",name:"📝 Description",type:"text",validate:!1,editable:!0,desc:"Describe the purpose of this tag",comp:Q(ya),comp_params:{className:"w-full"}},{name:"JSON",type:"compund",validate:!1,editable:!1,desc:"Observe the RAW data",comp:Ds,comp_params:{className:"w-full"}}]},z2=({mode:t,...e})=>{const{id:n,base:r}=fr(),{actions:{savePromise:i,deletePromise:s,reload:a},context:o,key:l,doc:c,isCreateMode:u,isEditMode:d,isViewMode:h,loading:p,hasChanged:m,hasLoaded:g,error:y,ref_head:v,ref_root:x}=mi("tags",n,"/pages/tags",t,r);return f.jsxs("div",{className:"w-full lg:min-w-fit mx-auto",children:[f.jsx($i,{major:["tags",n??"create"],className:""}),f.jsx(As,{doc:c,className:"mt-5",collectionId:"tags"}),f.jsx(Ns,{id:c.handle,onClickSave:d?i:void 0,onClickCreate:u?i:void 0,onClickReload:u?void 0:async()=>a(!1),onClickDelete:u?void 0:s,className:"mt-5"}),f.jsx(Cs,{ref:v,time:c==null?void 0:c.created_at,className:"mt-8",changes_made:m},c==null?void 0:c.updated_at),f.jsxs(de,{show:g&&d||u,children:[f.jsx(Hr,{error:y,className:"w-full max-w-[35rem] mx-auto"}),f.jsx(ci,{ref:x,field:Pse,value:c??{},context:o,isViewMode:h,className:"mx-auto"},l)]})]})},Rse=[{key:"title",name:"Title",comp:zt,comp_params:{className:"font-semibold"}},{key:"handle",name:"Handle",comp:zt,comp_params:{className:"font-semibold"}},{key:void 0,name:"Actions",comp:Fr,comp_params:{className:""}}],Lw=({})=>{const{query_api:t,context:e,ref_actions:n,page:r,loading:i,error:s,queryCount:a,hasLoaded:o,resource:l,resource_is_probably_empty:c,actions:{onLimitChange:u,onReload:d,prev:h,next:p}}=Br("templates","/apps/templates");return f.jsx("div",{className:"w-full h-full",children:f.jsxs("div",{className:"max-w-[56rem] mx-auto",children:[f.jsx(pr,{should_onboard:c,overallCollectionCount:a,hasLoaded:o,resource:l}),f.jsx(de,{show:s,children:s==null?void 0:s.toString()}),f.jsxs("div",{className:`w-full rounded-md overflow-hidden border
547
547
  shelf-border-color shadow-md mt-5
548
548
  dark:shadow-slate-900`,children:[f.jsx(Ts,{isCollectionEmpty:c,ref:n,reload:d,createLink:"/apps/templates/create",searchTitle:"Search by name, values...",isLoading:i}),f.jsxs(de,{show:!s&&(r==null?void 0:r.length),children:[f.jsx(hr,{context:e,data:r,fields:Rse}),f.jsx(jr,{prev:h,next:p,limit:t.limit,onLimitChange:u})]})]})]})})};function jse(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function Pw(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function Rw(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?Pw(Object(n),!0).forEach(function(r){jse(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Pw(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function Fse(t,e){if(t==null)return{};var n={},r=Object.keys(t),i,s;for(s=0;s<r.length;s++)i=r[s],!(e.indexOf(i)>=0)&&(n[i]=t[i]);return n}function Bse(t,e){if(t==null)return{};var n=Fse(t,e),r,i;if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(t);for(i=0;i<s.length;i++)r=s[i],!(e.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(t,r)&&(n[r]=t[r])}return n}function Hse(t,e){return zse(t)||Use(t,e)||$se(t,e)||Vse()}function zse(t){if(Array.isArray(t))return t}function Use(t,e){if(!(typeof Symbol>"u"||!(Symbol.iterator in Object(t)))){var n=[],r=!0,i=!1,s=void 0;try{for(var a=t[Symbol.iterator](),o;!(r=(o=a.next()).done)&&(n.push(o.value),!(e&&n.length===e));r=!0);}catch(l){i=!0,s=l}finally{try{!r&&a.return!=null&&a.return()}finally{if(i)throw s}}return n}}function $se(t,e){if(t){if(typeof t=="string")return jw(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);if(n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set")return Array.from(t);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return jw(t,e)}}function jw(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function Vse(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
549
549
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Yse(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function Fw(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function Bw(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?Fw(Object(n),!0).forEach(function(r){Yse(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Fw(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function Wse(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return function(r){return e.reduceRight(function(i,s){return s(i)},r)}}function E1(t){return function e(){for(var n=this,r=arguments.length,i=new Array(r),s=0;s<r;s++)i[s]=arguments[s];return i.length>=t.length?t.apply(this,i):function(){for(var a=arguments.length,o=new Array(a),l=0;l<a;l++)o[l]=arguments[l];return e.apply(n,[].concat(i,o))}}}function Um(t){return{}.toString.call(t).includes("Object")}function Gse(t){return!Object.keys(t).length}function Vd(t){return typeof t=="function"}function Kse(t,e){return Object.prototype.hasOwnProperty.call(t,e)}function qse(t,e){return Um(e)||lo("changeType"),Object.keys(e).some(function(n){return!Kse(t,n)})&&lo("changeField"),e}function Qse(t){Vd(t)||lo("selectorType")}function Zse(t){Vd(t)||Um(t)||lo("handlerType"),Um(t)&&Object.values(t).some(function(e){return!Vd(e)})&&lo("handlersType")}function Xse(t){t||lo("initialIsRequired"),Um(t)||lo("initialType"),Gse(t)&&lo("initialContent")}function Jse(t,e){throw new Error(t[e]||t.default)}var eae={initialIsRequired:"initial state is required",initialType:"initial state should be an object",initialContent:"initial state shouldn't be an empty object",handlerType:"handler should be an object or a function",handlersType:"all handlers should be a functions",selectorType:"selector should be a function",changeType:"provided value of changes should be an object",changeField:'it seams you want to change a field in the state which is not specified in the "initial" state',default:"an unknown error accured in `state-local` package"},lo=E1(Jse)(eae),Uh={changes:qse,selector:Qse,handler:Zse,initial:Xse};function tae(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};Uh.initial(t),Uh.handler(e);var n={current:t},r=E1(iae)(n,e),i=E1(rae)(n),s=E1(Uh.changes)(t),a=E1(nae)(n);function o(){var c=arguments.length>0&&arguments[0]!==void 0?arguments[0]:function(u){return u};return Uh.selector(c),c(n.current)}function l(c){Wse(r,i,s,a)(c)}return[o,l]}function nae(t,e){return Vd(e)?e(t.current):e}function rae(t,e){return t.current=Bw(Bw({},t.current),e),e}function iae(t,e,n){return Vd(e)?e(t.current):Object.keys(n).forEach(function(r){var i;return(i=e[r])===null||i===void 0?void 0:i.call(e,t.current[r])}),n}var sae={create:tae},aae={paths:{vs:"https://cdn.jsdelivr.net/npm/monaco-editor@0.43.0/min/vs"}};function oae(t){return function e(){for(var n=this,r=arguments.length,i=new Array(r),s=0;s<r;s++)i[s]=arguments[s];return i.length>=t.length?t.apply(this,i):function(){for(var a=arguments.length,o=new Array(a),l=0;l<a;l++)o[l]=arguments[l];return e.apply(n,[].concat(i,o))}}}function lae(t){return{}.toString.call(t).includes("Object")}function cae(t){return t||Hw("configIsRequired"),lae(t)||Hw("configType"),t.urls?(uae(),{paths:{vs:t.urls.monacoBase}}):t}function uae(){console.warn(gD.deprecation)}function dae(t,e){throw new Error(t[e]||t.default)}var gD={configIsRequired:"the configuration object is required",configType:"the configuration object should be an object",default:"an unknown error accured in `@monaco-editor/loader` package",deprecation:`Deprecation warning!
@@ -581,7 +581,7 @@ Expecting `+L.join(", ")+", got '"+(this.terminals_[b]||b)+"'":$="Parse error on
581
581
  rounded-md border w-fit shelf-border-color
582
582
  relative text-base`,children:[f.jsx(r7,{title:"Show Preview to the right",className:"cursor-pointer z-10 transition-transform duration-100 "+(t==0?"scale-150":""),onClick:()=>n(0)}),f.jsx(r7,{title:"Show Preview to the bottom",className:"cursor-pointer rotate-90 z-10 transition-transform duration-100 "+(t==1?"scale-150":""),onClick:()=>n(1)}),f.jsx(_H,{title:"Enter Fullscreen",className:"cursor-pointer z-10 transition-transform duration-100 "+(t==2?"scale-150":""),onClick:()=>n(2)})]})},i7=({field:t,context:e,setError:n,value:r,onChange:i,...s})=>{const{isHtml:a=!0}=t.comp_params,o=wD(),[l,c]=_.useState(0),[u,d]=_.useState({}),[h,p]=_.useState(r),{darkMode:m}=Il(),g=_.useCallback(x=>{p(x),i(x)},[i]),y=_.useCallback(x=>{c(x)},[]),v=_.useMemo(()=>{try{let b=$le.compile(h)(u??{});return a||(b=`<pre>${b}</pre>`),b}catch(x){return x}},[h,u,a]);return _.useEffect(()=>e.pubsub.add_sub((x,b)=>{x==="reference_example_input"&&d(b)}),[e]),_.useEffect(()=>{o&&o.editor.defineTheme("coblat",{base:"vs-dark",inherit:!0,rules:[{background:"002240",token:""},{foreground:"e1efff",token:"punctuation - (punctuation.definition.string || punctuation.definition.comment)"},{foreground:"ff628c",token:"constant"},{foreground:"ffdd00",token:"entity"},{foreground:"ff9d00",token:"keyword"},{foreground:"ffee80",token:"storage"},{foreground:"3ad900",token:"string -string.unquoted.old-plist -string.unquoted.heredoc"},{foreground:"3ad900",token:"string.unquoted.heredoc string"},{foreground:"0088ff",fontStyle:"italic",token:"comment"},{foreground:"80ffbb",token:"support"},{foreground:"cccccc",token:"variable"},{foreground:"ff80e1",token:"variable.language"},{foreground:"ffee80",token:"meta.function-call"},{foreground:"f8f8f8",background:"800f00",token:"invalid"},{foreground:"ffffff",background:"223545",token:"text source"},{foreground:"ffffff",background:"223545",token:"string.unquoted.heredoc"},{foreground:"ffffff",background:"223545",token:"source source"},{foreground:"80fcff",fontStyle:"italic",token:"entity.other.inherited-class"},{foreground:"9eff80",token:"string.quoted source"},{foreground:"80ff82",token:"string constant"},{foreground:"80ffc2",token:"string.regexp"},{foreground:"edef7d",token:"string variable"},{foreground:"ffb054",token:"support.function"},{foreground:"eb939a",token:"support.constant"},{foreground:"ff1e00",token:"support.type.exception"},{foreground:"8996a8",token:"meta.preprocessor.c"},{foreground:"afc4db",token:"meta.preprocessor.c keyword"},{foreground:"73817d",token:"meta.sgml.html meta.doctype"},{foreground:"73817d",token:"meta.sgml.html meta.doctype entity"},{foreground:"73817d",token:"meta.sgml.html meta.doctype string"},{foreground:"73817d",token:"meta.xml-processing"},{foreground:"73817d",token:"meta.xml-processing entity"},{foreground:"73817d",token:"meta.xml-processing string"},{foreground:"9effff",token:"meta.tag"},{foreground:"9effff",token:"meta.tag entity"},{foreground:"9effff",token:"meta.selector.css entity.name.tag"},{foreground:"ffb454",token:"meta.selector.css entity.other.attribute-name.id"},{foreground:"5fe461",token:"meta.selector.css entity.other.attribute-name.class"},{foreground:"9df39f",token:"support.type.property-name.css"},{foreground:"f6f080",token:"meta.property-group support.constant.property-value.css"},{foreground:"f6f080",token:"meta.property-value support.constant.property-value.css"},{foreground:"f6aa11",token:"meta.preprocessor.at-rule keyword.control.at-rule"},{foreground:"edf080",token:"meta.property-value support.constant.named-color.css"},{foreground:"edf080",token:"meta.property-value constant"},{foreground:"eb939a",token:"meta.constructor.argument.css"},{foreground:"f8f8f8",background:"000e1a",token:"meta.diff"},{foreground:"f8f8f8",background:"000e1a",token:"meta.diff.header"},{foreground:"f8f8f8",background:"4c0900",token:"markup.deleted"},{foreground:"f8f8f8",background:"806f00",token:"markup.changed"},{foreground:"f8f8f8",background:"154f00",token:"markup.inserted"},{background:"8fddf630",token:"markup.raw"},{background:"004480",token:"markup.quote"},{background:"130d26",token:"markup.list"},{foreground:"c1afff",fontStyle:"bold",token:"markup.bold"},{foreground:"b8ffd9",fontStyle:"italic",token:"markup.italic"},{foreground:"c8e4fd",background:"001221",fontStyle:"bold",token:"markup.heading"}],colors:{"editor.foreground":"#FFFFFF","editor.background":"#1e293b","editor.selectionBackground":"#B36539BF","editor.lineHighlightBackground":"#00000059","editorCursor.foreground":"#FFFFFF","editorWhitespace.foreground":"#FFFFFF26"}})},[o]),_.useEffect(()=>{const x=b=>{l==2&&b.key==="Escape"&&c(0)};return document.addEventListener("keydown",x),()=>{document.removeEventListener("keydown",x)}},[l]),f.jsx("div",{...s,children:f.jsxs("div",{className:"flex flex-col w-full gap-5",children:[f.jsx(Wle,{onChange:y,mode:l}),l<2&&f.jsxs("div",{className:"w-full flex flex-col gap-5 relative",children:[f.jsx(d9,{options:{tabSize:2},width:"100%",height:"500px",className:"rounded-md border shelf-border-color overflow-clip",onChange:g,value:h,theme:m?"coblat":"light",defaultLanguage:"handlebars"}),f.jsx("iframe",{srcDoc:v,className:`${l==0?"absolute translate-x-10 left-full top-0 w-full ":""}
583
583
  rounded-md border shelf-border-color resize overflow-auto bg-white`,height:"500px"})]}),l==2&&f.jsxs(Yle,{className:"z-[100] fixed left-0 top-0 w-full h-full",children:[f.jsx(d9,{options:{tabSize:2},width:"100%",height:"100%",className:"--overflow-auto",onChange:g,value:h,theme:m?"coblat":"light",defaultLanguage:"handlebars"}),f.jsxs("div",{className:"w-full h-full flex-col items-center",children:[f.jsxs("div",{className:`flex flex-row items-center text-2xl
584
- shelf-plain-card-soft justify-between w-full p-3`,children:[f.jsx("span",{children:"Preview"}),f.jsx(kP,{onClick:()=>c(0),className:"cursor-pointer"})]}),f.jsx("iframe",{width:"100%",srcDoc:v,className:" border shelf-border-color bg-white",height:"100%"})]})]})]})})},s7={general_store_name:"Wush Wush Games",general_store_website:"https://wush.games/",general_store_logo_url:void 0,general_store_description:"We sell retro video games",general_confirm_email_base_url:"https://wush.games/confirm-email",general_store_support_email:"support@wush.games"},Gle={contact:{email:"john@doe.com",firstname:"John",phone_number:"000-000-000",customer_id:"cus_65f2ae6e8bf30e6cd0ca95fa"},address:{},status:{checkout:{id:0,name2:"created",name:"Created"},payment:{id:1,name:"Authorized",name2:"authorized"},fulfillment:{id:0,name2:"draft",name:"Draft"}},pricing:{evo:[{quantity_discounted:0,quantity_undiscounted:11,subtotal:1100,total:1150},{quantity_discounted:2,total_discount:100,quantity_undiscounted:9,discount:{active:!0,handle:"discount-bundle-50-off-robot-arms-and-legs-not-recursive",title:"50% OFF Bundle: robot arms and legs (not recursive)",priority:0,application:{id:0,name:"Automatic",name2:"automatic"},info:{details:{meta:{id:4,type:"bundle",name:"Bundle Discount"},extra:{fixed:0,percent:50,recursive:!1}},filters:[{meta:{id:4,type:"product",op:"p-in-tags",name:"Product has Tag"},value:["robot_arm"]},{meta:{id:4,type:"product",op:"p-in-tags",name:"Product has Tag"},value:["robot_leg"]}]}},discount_code:"discount-bundle-50-off-robot-arms-and-legs-not-recursive",subtotal:1e3,total:1050}],uid:void 0,shipping_method:{title:"",handle:"",price:50},subtotal_discount:100,subtotal_undiscounted:1100,subtotal:1e3,total:1050,quantity_total:11,quantity_discounted:2,errors:[]},line_items:[{id:"robot-leg-white",qty:3,data:{tags:["robot_leg"],qty:100,active:!0,title:"Robot Leg White",price:100}},{id:"battery",qty:5,data:{tags:["would-not-be-discounted"],qty:100,active:!0,title:"Battery",price:100}},{id:"robot-arm-red",qty:2,data:{tags:["robot_arm"],qty:100,active:!0,title:"Robot Arm Red",price:100}},{id:"robot-arm-green",qty:1,data:{tags:["robot_arm"],qty:100,active:!0,title:"Robot Arm Green",price:100}}],shipping_method:{handle:"ship-fast",title:"ship fast",price:50},id:"order_65d774c6445e4581b9e34c11",created_at:"2024-02-22T16:22:30.095Z",updated_at:"2024-02-22T16:22:30.095Z"},Kle={email:"john@dow.com",firstname:"John",lastname:"Dow",id:"cus_65f2ae6e8bf30e6cd0ca95fa"},qle=[{name:"customer",example:JSON.stringify({customer:Kle,info:s7})},{name:"order",example:JSON.stringify({order:Gle,info:s7})}],Qle=({field:t,context:e,setError:n,value:r={},onChange:i,...s})=>{const a=wD(),[o,l]=_.useState(r),{darkMode:c}=Il(),u=_.useCallback((h,p)=>{n(void 0);try{let m=JSON.parse(h);l(m),i(m)}catch(m){n((m==null?void 0:m.message)??"JSON Error")}},[i]),d=_.useMemo(()=>{try{return JSON.stringify(o,null,2)}catch(h){return h}},[o]);return _.useEffect(()=>{a&&a.editor.defineTheme("coblat",{base:"vs-dark",inherit:!0,rules:[{background:"002240",token:""},{foreground:"e1efff",token:"punctuation - (punctuation.definition.string || punctuation.definition.comment)"},{foreground:"ff628c",token:"constant"},{foreground:"ffdd00",token:"entity"},{foreground:"ff9d00",token:"keyword"},{foreground:"ffee80",token:"storage"},{foreground:"3ad900",token:"string -string.unquoted.old-plist -string.unquoted.heredoc"},{foreground:"3ad900",token:"string.unquoted.heredoc string"},{foreground:"0088ff",fontStyle:"italic",token:"comment"},{foreground:"80ffbb",token:"support"},{foreground:"cccccc",token:"variable"},{foreground:"ff80e1",token:"variable.language"},{foreground:"ffee80",token:"meta.function-call"},{foreground:"f8f8f8",background:"800f00",token:"invalid"},{foreground:"ffffff",background:"223545",token:"text source"},{foreground:"ffffff",background:"223545",token:"string.unquoted.heredoc"},{foreground:"ffffff",background:"223545",token:"source source"},{foreground:"80fcff",fontStyle:"italic",token:"entity.other.inherited-class"},{foreground:"9eff80",token:"string.quoted source"},{foreground:"80ff82",token:"string constant"},{foreground:"80ffc2",token:"string.regexp"},{foreground:"edef7d",token:"string variable"},{foreground:"ffb054",token:"support.function"},{foreground:"eb939a",token:"support.constant"},{foreground:"ff1e00",token:"support.type.exception"},{foreground:"8996a8",token:"meta.preprocessor.c"},{foreground:"afc4db",token:"meta.preprocessor.c keyword"},{foreground:"73817d",token:"meta.sgml.html meta.doctype"},{foreground:"73817d",token:"meta.sgml.html meta.doctype entity"},{foreground:"73817d",token:"meta.sgml.html meta.doctype string"},{foreground:"73817d",token:"meta.xml-processing"},{foreground:"73817d",token:"meta.xml-processing entity"},{foreground:"73817d",token:"meta.xml-processing string"},{foreground:"9effff",token:"meta.tag"},{foreground:"9effff",token:"meta.tag entity"},{foreground:"9effff",token:"meta.selector.css entity.name.tag"},{foreground:"ffb454",token:"meta.selector.css entity.other.attribute-name.id"},{foreground:"5fe461",token:"meta.selector.css entity.other.attribute-name.class"},{foreground:"9df39f",token:"support.type.property-name.css"},{foreground:"f6f080",token:"meta.property-group support.constant.property-value.css"},{foreground:"f6f080",token:"meta.property-value support.constant.property-value.css"},{foreground:"f6aa11",token:"meta.preprocessor.at-rule keyword.control.at-rule"},{foreground:"edf080",token:"meta.property-value support.constant.named-color.css"},{foreground:"edf080",token:"meta.property-value constant"},{foreground:"eb939a",token:"meta.constructor.argument.css"},{foreground:"f8f8f8",background:"000e1a",token:"meta.diff"},{foreground:"f8f8f8",background:"000e1a",token:"meta.diff.header"},{foreground:"f8f8f8",background:"4c0900",token:"markup.deleted"},{foreground:"f8f8f8",background:"806f00",token:"markup.changed"},{foreground:"f8f8f8",background:"154f00",token:"markup.inserted"},{background:"8fddf630",token:"markup.raw"},{background:"004480",token:"markup.quote"},{background:"130d26",token:"markup.list"},{foreground:"c1afff",fontStyle:"bold",token:"markup.bold"},{foreground:"b8ffd9",fontStyle:"italic",token:"markup.italic"},{foreground:"c8e4fd",background:"001221",fontStyle:"bold",token:"markup.heading"}],colors:{"editor.foreground":"#FFFFFF","editor.background":"#1e293b","editor.selectionBackground":"#B36539BF","editor.lineHighlightBackground":"#00000059","editorCursor.foreground":"#FFFFFF","editorWhitespace.foreground":"#FFFFFF26"}})},[a]),f.jsx("div",{...s,children:f.jsxs("div",{className:"flex flex-col w-full gap-5",children:[f.jsx("div",{className:"flex flex-row flex-wrap gap-3",children:f.jsx(Ui,{tags:qle,name_fn:h=>h.name,onClick:h=>{u(h.example,null)}})}),f.jsx(d9,{options:{tabSize:2},width:"100%",height:"200px",className:"rounded-md border shelf-border-color overflow-clip",onChange:u,value:d,theme:c?"coblat":"light",defaultLanguage:"json"})]})})},Zle={name:"Root",comp:He,comp_params:{className:"flex flex-col gap-5 w-full max-w-[35rem]"},fields:[{key:"title",name:"Title",type:"text",validate:!0,comp:Q(Ie(Pe,{}),{className:"h-9",placeholder:"enter the key / name of the tag"}),comp_params:{className:"w-full "}},{key:"template_html",name:"HTML Template",defaultValue:"<html></html>",desc:"Use [Handlebars](https://handlebarsjs.com/) syntax to create a fabulous `email` template",comp:Q(i7,{isHtml:!0}),comp_params:{className:"w-full"}},{key:"template_text",name:"Text Template",defaultValue:"Hello",desc:"Use [Handlebars](https://handlebarsjs.com/) syntax to create a fabulous `email` template",comp:Q(i7,{isHtml:!1}),comp_params:{className:"w-full"}},{key:"reference_example_input",name:"Example input for template",defaultValue:{},desc:"Play with various inputs for your `Handlebars` template",comp:Q(Qle),comp_params:{className:"w-full"}},{key:"description",name:"📝 Description",type:"text",validate:!1,editable:!0,desc:"Describe the purpose of this tag",comp:Q(ya),comp_params:{className:"w-full"}},{name:"JSON",type:"compund",validate:!1,editable:!1,desc:"Observe the RAW data",comp:({value:t})=>f.jsx(Ds,{value:{...t,template_html:"...",template_text:"..."}}),comp_params:{className:"w-full"}}]},e5=({mode:t,...e})=>{const{id:n,base:r}=fr(),{actions:{savePromise:i,deletePromise:s,reload:a,duplicate:o},context:l,key:c,doc:u,isCreateMode:d,isEditMode:h,isViewMode:p,loading:m,hasChanged:g,hasLoaded:y,error:v,ref_head:x,ref_root:b}=mi("templates",n,"/apps/templates",t,r),w=_.useCallback(()=>o({title:(u==null?void 0:u.title)+" duplicate"}),[u,o]);return f.jsxs("div",{className:"w-full lg:min-w-fit mx-auto",children:[f.jsx($i,{major:["templates",n??"create"],className:""}),f.jsx(As,{doc:u,className:"mt-5",collectionId:"tags"}),f.jsx(Ns,{id:u.handle,onClickSave:h?i:void 0,onClickCreate:d?i:void 0,onClickDuplicate:d?void 0:w,onClickReload:d?void 0:async()=>a(!1),onClickDelete:d?void 0:s,className:"mt-5"}),f.jsx(Cs,{ref:x,time:u==null?void 0:u.created_at,className:"mt-8",changes_made:g},u==null?void 0:u.updated_at),f.jsxs(de,{show:y&&h||d,children:[f.jsx(Hr,{error:v,className:"w-full max-w-[35rem] mx-auto"}),f.jsx(ci,{ref:b,field:Zle,value:u??{},context:l,isViewMode:p,className:"mx-auto"},c)]})]})},Xle=[{key:"title",name:"Title",comp:zt,comp_params:{className:"font-semibold max-w-[8rem] "}},{key:"price",name:"Price",comp:zt},{key:"collections",name:"Collections",comp:US,comp_params:{className:`p-3 font-bold max-w-[8rem] sm:max-w-[12rem] xl:max-w-[24rem]
584
+ shelf-plain-card-soft justify-between w-full p-3`,children:[f.jsx("span",{children:"Preview"}),f.jsx(kP,{onClick:()=>c(0),className:"cursor-pointer"})]}),f.jsx("iframe",{width:"100%",srcDoc:v,className:" border shelf-border-color bg-white",height:"100%"})]})]})]})})},s7={general_store_name:"Wush Wush Games",general_store_website:"https://wush.games/",general_store_logo_url:void 0,general_store_description:"We sell retro video games",general_confirm_email_base_url:"https://wush.games/confirm-email",general_store_support_email:"support@wush.games"},Gle={contact:{email:"john@doe.com",firstname:"John",phone_number:"000-000-000",customer_id:"cus_65f2ae6e8bf30e6cd0ca95fa"},address:{},status:{checkout:{id:0,name2:"created",name:"Created"},payment:{id:1,name:"Authorized",name2:"authorized"},fulfillment:{id:0,name2:"draft",name:"Draft"}},pricing:{evo:[{quantity_discounted:0,quantity_undiscounted:11,subtotal:1100,total:1150},{quantity_discounted:2,total_discount:100,quantity_undiscounted:9,discount:{active:!0,handle:"discount-bundle-50-off-robot-arms-and-legs-not-recursive",title:"50% OFF Bundle: robot arms and legs (not recursive)",priority:0,application:{id:0,name:"Automatic",name2:"automatic"},info:{details:{meta:{id:4,type:"bundle",name:"Bundle Discount"},extra:{fixed:0,percent:50,recursive:!1}},filters:[{meta:{id:4,type:"product",op:"p-in-tags",name:"Product has Tag"},value:["robot_arm"]},{meta:{id:4,type:"product",op:"p-in-tags",name:"Product has Tag"},value:["robot_leg"]}]}},discount_code:"discount-bundle-50-off-robot-arms-and-legs-not-recursive",subtotal:1e3,total:1050}],uid:void 0,shipping_method:{title:"",handle:"",price:50},subtotal_discount:100,subtotal_undiscounted:1100,subtotal:1e3,total:1050,quantity_total:11,quantity_discounted:2,errors:[]},line_items:[{id:"robot-leg-white",qty:3,data:{tags:["robot_leg"],qty:100,active:!0,title:"Robot Leg White",price:100}},{id:"battery",qty:5,data:{tags:["would-not-be-discounted"],qty:100,active:!0,title:"Battery",price:100}},{id:"robot-arm-red",qty:2,data:{tags:["robot_arm"],qty:100,active:!0,title:"Robot Arm Red",price:100}},{id:"robot-arm-green",qty:1,data:{tags:["robot_arm"],qty:100,active:!0,title:"Robot Arm Green",price:100}}],shipping_method:{handle:"ship-fast",title:"ship fast",price:50},id:"order_65d774c6445e4581b9e34c11",created_at:"2024-02-22T16:22:30.095Z",updated_at:"2024-02-22T16:22:30.095Z"},Kle={email:"john@dow.com",firstname:"John",lastname:"Dow",id:"cus_65f2ae6e8bf30e6cd0ca95fa"},qle=[{name:"customer",example:JSON.stringify({customer:Kle,info:s7})},{name:"order",example:JSON.stringify({order:Gle,info:s7})}],Qle=({field:t,context:e,setError:n,value:r={},onChange:i,...s})=>{const a=wD(),[o,l]=_.useState(r),{darkMode:c}=Il(),u=_.useCallback((h,p)=>{n(void 0);try{let m=JSON.parse(h);l(m),i(m)}catch(m){n((m==null?void 0:m.message)??"JSON Error")}},[i]),d=_.useMemo(()=>{try{return JSON.stringify(o,null,2)}catch(h){return h}},[o]);return _.useEffect(()=>{a&&a.editor.defineTheme("coblat",{base:"vs-dark",inherit:!0,rules:[{background:"002240",token:""},{foreground:"e1efff",token:"punctuation - (punctuation.definition.string || punctuation.definition.comment)"},{foreground:"ff628c",token:"constant"},{foreground:"ffdd00",token:"entity"},{foreground:"ff9d00",token:"keyword"},{foreground:"ffee80",token:"storage"},{foreground:"3ad900",token:"string -string.unquoted.old-plist -string.unquoted.heredoc"},{foreground:"3ad900",token:"string.unquoted.heredoc string"},{foreground:"0088ff",fontStyle:"italic",token:"comment"},{foreground:"80ffbb",token:"support"},{foreground:"cccccc",token:"variable"},{foreground:"ff80e1",token:"variable.language"},{foreground:"ffee80",token:"meta.function-call"},{foreground:"f8f8f8",background:"800f00",token:"invalid"},{foreground:"ffffff",background:"223545",token:"text source"},{foreground:"ffffff",background:"223545",token:"string.unquoted.heredoc"},{foreground:"ffffff",background:"223545",token:"source source"},{foreground:"80fcff",fontStyle:"italic",token:"entity.other.inherited-class"},{foreground:"9eff80",token:"string.quoted source"},{foreground:"80ff82",token:"string constant"},{foreground:"80ffc2",token:"string.regexp"},{foreground:"edef7d",token:"string variable"},{foreground:"ffb054",token:"support.function"},{foreground:"eb939a",token:"support.constant"},{foreground:"ff1e00",token:"support.type.exception"},{foreground:"8996a8",token:"meta.preprocessor.c"},{foreground:"afc4db",token:"meta.preprocessor.c keyword"},{foreground:"73817d",token:"meta.sgml.html meta.doctype"},{foreground:"73817d",token:"meta.sgml.html meta.doctype entity"},{foreground:"73817d",token:"meta.sgml.html meta.doctype string"},{foreground:"73817d",token:"meta.xml-processing"},{foreground:"73817d",token:"meta.xml-processing entity"},{foreground:"73817d",token:"meta.xml-processing string"},{foreground:"9effff",token:"meta.tag"},{foreground:"9effff",token:"meta.tag entity"},{foreground:"9effff",token:"meta.selector.css entity.name.tag"},{foreground:"ffb454",token:"meta.selector.css entity.other.attribute-name.id"},{foreground:"5fe461",token:"meta.selector.css entity.other.attribute-name.class"},{foreground:"9df39f",token:"support.type.property-name.css"},{foreground:"f6f080",token:"meta.property-group support.constant.property-value.css"},{foreground:"f6f080",token:"meta.property-value support.constant.property-value.css"},{foreground:"f6aa11",token:"meta.preprocessor.at-rule keyword.control.at-rule"},{foreground:"edf080",token:"meta.property-value support.constant.named-color.css"},{foreground:"edf080",token:"meta.property-value constant"},{foreground:"eb939a",token:"meta.constructor.argument.css"},{foreground:"f8f8f8",background:"000e1a",token:"meta.diff"},{foreground:"f8f8f8",background:"000e1a",token:"meta.diff.header"},{foreground:"f8f8f8",background:"4c0900",token:"markup.deleted"},{foreground:"f8f8f8",background:"806f00",token:"markup.changed"},{foreground:"f8f8f8",background:"154f00",token:"markup.inserted"},{background:"8fddf630",token:"markup.raw"},{background:"004480",token:"markup.quote"},{background:"130d26",token:"markup.list"},{foreground:"c1afff",fontStyle:"bold",token:"markup.bold"},{foreground:"b8ffd9",fontStyle:"italic",token:"markup.italic"},{foreground:"c8e4fd",background:"001221",fontStyle:"bold",token:"markup.heading"}],colors:{"editor.foreground":"#FFFFFF","editor.background":"#1e293b","editor.selectionBackground":"#B36539BF","editor.lineHighlightBackground":"#00000059","editorCursor.foreground":"#FFFFFF","editorWhitespace.foreground":"#FFFFFF26"}})},[a]),f.jsx("div",{...s,children:f.jsxs("div",{className:"flex flex-col w-full gap-5",children:[f.jsx("div",{className:"flex flex-row flex-wrap gap-3",children:f.jsx(Ui,{tags:qle,name_fn:h=>h.name,onClick:h=>{u(h.example,null)}})}),f.jsx(d9,{options:{tabSize:2},width:"100%",height:"200px",className:"rounded-md border shelf-border-color overflow-clip",onChange:u,value:d,theme:c?"coblat":"light",defaultLanguage:"json"})]})})},Zle={name:"Root",comp:He,comp_params:{className:"flex flex-col gap-5 w-full max-w-[35rem]"},fields:[{key:"title",name:"Title",type:"text",validate:!0,comp:Q(Me(Le,{}),{className:"h-9",placeholder:"enter the key / name of the tag"}),comp_params:{className:"w-full "}},{key:"template_html",name:"HTML Template",defaultValue:"<html></html>",desc:"Use [Handlebars](https://handlebarsjs.com/) syntax to create a fabulous `email` template",comp:Q(i7,{isHtml:!0}),comp_params:{className:"w-full"}},{key:"template_text",name:"Text Template",defaultValue:"Hello",desc:"Use [Handlebars](https://handlebarsjs.com/) syntax to create a fabulous `email` template",comp:Q(i7,{isHtml:!1}),comp_params:{className:"w-full"}},{key:"reference_example_input",name:"Example input for template",defaultValue:{},desc:"Play with various inputs for your `Handlebars` template",comp:Q(Qle),comp_params:{className:"w-full"}},{key:"description",name:"📝 Description",type:"text",validate:!1,editable:!0,desc:"Describe the purpose of this tag",comp:Q(ya),comp_params:{className:"w-full"}},{name:"JSON",type:"compund",validate:!1,editable:!1,desc:"Observe the RAW data",comp:({value:t})=>f.jsx(Ds,{value:{...t,template_html:"...",template_text:"..."}}),comp_params:{className:"w-full"}}]},e5=({mode:t,...e})=>{const{id:n,base:r}=fr(),{actions:{savePromise:i,deletePromise:s,reload:a,duplicate:o},context:l,key:c,doc:u,isCreateMode:d,isEditMode:h,isViewMode:p,loading:m,hasChanged:g,hasLoaded:y,error:v,ref_head:x,ref_root:b}=mi("templates",n,"/apps/templates",t,r),w=_.useCallback(()=>o({title:(u==null?void 0:u.title)+" duplicate"}),[u,o]);return f.jsxs("div",{className:"w-full lg:min-w-fit mx-auto",children:[f.jsx($i,{major:["templates",n??"create"],className:""}),f.jsx(As,{doc:u,className:"mt-5",collectionId:"tags"}),f.jsx(Ns,{id:u.handle,onClickSave:h?i:void 0,onClickCreate:d?i:void 0,onClickDuplicate:d?void 0:w,onClickReload:d?void 0:async()=>a(!1),onClickDelete:d?void 0:s,className:"mt-5"}),f.jsx(Cs,{ref:x,time:u==null?void 0:u.created_at,className:"mt-8",changes_made:g},u==null?void 0:u.updated_at),f.jsxs(de,{show:y&&h||d,children:[f.jsx(Hr,{error:v,className:"w-full max-w-[35rem] mx-auto"}),f.jsx(ci,{ref:b,field:Zle,value:u??{},context:l,isViewMode:p,className:"mx-auto"},c)]})]})},Xle=[{key:"title",name:"Title",comp:zt,comp_params:{className:"font-semibold max-w-[8rem] "}},{key:"price",name:"Price",comp:zt},{key:"collections",name:"Collections",comp:US,comp_params:{className:`p-3 font-bold max-w-[8rem] sm:max-w-[12rem] xl:max-w-[24rem]
585
585
  inline-block whitespace-nowrap`,name_fn:t=>t.handle}},{key:"updated_at",name:"Last Updated",comp:Ss},{key:void 0,name:"Actions",comp:Fr,comp_params:{className:""}}],a7=({})=>{const{query_api:t,context:e,ref_actions:n,page:r,loading:i,error:s,queryCount:a,hasLoaded:o,resource:l,resource_is_probably_empty:c,actions:{onLimitChange:u,onReload:d,prev:h,next:p}}=Br("products","/pages/products");return f.jsx("div",{className:"w-full h-full",children:f.jsxs("div",{className:"max-w-[56rem] mx-auto",children:[f.jsx(pr,{should_onboard:c,overallCollectionCount:a,hasLoaded:o,resource:l}),f.jsxs("div",{className:`w-full rounded-md overflow-hidden border
586
586
  shelf-border-color shadow-md mt-5
587
587
  dark:shadow-slate-900 `,children:[f.jsx(de,{show:s,children:s==null?void 0:s.toString()}),f.jsx(Ts,{isCollectionEmpty:c,ref:n,reload:d,createLink:"/pages/products/create",searchTitle:"Search by Name, Handle, Tag values, Collections...",isLoading:i}),f.jsxs(de,{show:!s&&(r==null?void 0:r.length),children:[f.jsx(hr,{context:e,data:r,fields:Xle}),f.jsx(jr,{prev:h,next:p,limit:t.limit,onLimitChange:u})]})]})]})})},Wm={x:0,y:0,width:0,height:0,unit:"px"},Kl=(t,e,n)=>Math.min(Math.max(t,e),n),Jle=(...t)=>t.filter(e=>e&&typeof e=="string").join(" "),o7=(t,e)=>t===e||t.width===e.width&&t.height===e.height&&t.x===e.x&&t.y===e.y&&t.unit===e.unit;function ql(t,e,n){return t.unit==="%"?{...Wm,...t,unit:"%"}:{unit:"%",x:t.x?t.x/e*100:0,y:t.y?t.y/n*100:0,width:t.width?t.width/e*100:0,height:t.height?t.height/n*100:0}}function Sa(t,e,n){return t.unit?t.unit==="px"?{...Wm,...t,unit:"px"}:{unit:"px",x:t.x?t.x*e/100:0,y:t.y?t.y*n/100:0,width:t.width?t.width*e/100:0,height:t.height?t.height*n/100:0}:{...Wm,...t,unit:"px"}}function l7(t,e,n,r,i,s=0,a=0,o=r,l=i){const c={...t};let u=Math.min(s,r),d=Math.min(a,i),h=Math.min(o,r),p=Math.min(l,i);e&&(e>1?(u=a?a*e:u,d=u/e,h=o*e):(d=s?s/e:d,u=d*e,p=l/e)),c.y<0&&(c.height=Math.max(c.height+c.y,d),c.y=0),c.x<0&&(c.width=Math.max(c.width+c.x,u),c.x=0);const m=r-(c.x+c.width);m<0&&(c.x=Math.min(c.x,r-u),c.width+=m);const g=i-(c.y+c.height);if(g<0&&(c.y=Math.min(c.y,i-d),c.height+=g),c.width<u&&((n==="sw"||n=="nw")&&(c.x-=u-c.width),c.width=u),c.height<d&&((n==="nw"||n=="ne")&&(c.y-=d-c.height),c.height=d),c.width>h&&((n==="sw"||n=="nw")&&(c.x-=h-c.width),c.width=h),c.height>p&&((n==="nw"||n=="ne")&&(c.y-=p-c.height),c.height=p),e){const y=c.width/c.height;if(y<e){const v=Math.max(c.width/e,d);(n==="nw"||n=="ne")&&(c.y-=v-c.height),c.height=v}else if(y>e){const v=Math.max(c.height*e,u);(n==="sw"||n=="nw")&&(c.x-=v-c.width),c.width=v}}return c}function ece(t,e,n,r){const i={...t};return e==="ArrowLeft"?r==="nw"?(i.x-=n,i.y-=n,i.width+=n,i.height+=n):r==="w"?(i.x-=n,i.width+=n):r==="sw"?(i.x-=n,i.width+=n,i.height+=n):r==="ne"?(i.y+=n,i.width-=n,i.height-=n):r==="e"?i.width-=n:r==="se"&&(i.width-=n,i.height-=n):e==="ArrowRight"&&(r==="nw"?(i.x+=n,i.y+=n,i.width-=n,i.height-=n):r==="w"?(i.x+=n,i.width-=n):r==="sw"?(i.x+=n,i.width-=n,i.height-=n):r==="ne"?(i.y-=n,i.width+=n,i.height+=n):r==="e"?i.width+=n:r==="se"&&(i.width+=n,i.height+=n)),e==="ArrowUp"?r==="nw"?(i.x-=n,i.y-=n,i.width+=n,i.height+=n):r==="n"?(i.y-=n,i.height+=n):r==="ne"?(i.y-=n,i.width+=n,i.height+=n):r==="sw"?(i.x+=n,i.width-=n,i.height-=n):r==="s"?i.height-=n:r==="se"&&(i.width-=n,i.height-=n):e==="ArrowDown"&&(r==="nw"?(i.x+=n,i.y+=n,i.width-=n,i.height-=n):r==="n"?(i.y+=n,i.height-=n):r==="ne"?(i.y+=n,i.width-=n,i.height-=n):r==="sw"?(i.x-=n,i.width+=n,i.height+=n):r==="s"?i.height+=n:r==="se"&&(i.width+=n,i.height+=n)),i}const Ql={capture:!0,passive:!1},Oo=class ki extends _.PureComponent{constructor(){super(...arguments),this.docMoveBound=!1,this.mouseDownOnCrop=!1,this.dragStarted=!1,this.evData={startClientX:0,startClientY:0,startCropX:0,startCropY:0,clientX:0,clientY:0,isResize:!0},this.componentRef=_.createRef(),this.mediaRef=_.createRef(),this.initChangeCalled=!1,this.state={cropIsActive:!1,newCropIsBeingDrawn:!1},this.onCropPointerDown=e=>{const{crop:n,disabled:r}=this.props,i=this.getBox();if(!n)return;const s=Sa(n,i.width,i.height);if(r)return;e.cancelable&&e.preventDefault(),this.bindDocMove(),this.componentRef.current.focus({preventScroll:!0});const a=e.target.dataset.ord,o=!!a;let l=e.clientX,c=e.clientY,u=s.x,d=s.y;if(a){const h=e.clientX-i.x,p=e.clientY-i.y;let m=0,g=0;a==="ne"||a=="e"?(m=h-(s.x+s.width),g=p-s.y,u=s.x,d=s.y+s.height):a==="se"||a==="s"?(m=h-(s.x+s.width),g=p-(s.y+s.height),u=s.x,d=s.y):a==="sw"||a=="w"?(m=h-s.x,g=p-(s.y+s.height),u=s.x+s.width,d=s.y):(a==="nw"||a=="n")&&(m=h-s.x,g=p-s.y,u=s.x+s.width,d=s.y+s.height),l=u+i.x+m,c=d+i.y+g}this.evData={startClientX:l,startClientY:c,startCropX:u,startCropY:d,clientX:e.clientX,clientY:e.clientY,isResize:o,ord:a},this.mouseDownOnCrop=!0,this.setState({cropIsActive:!0})},this.onComponentPointerDown=e=>{const{crop:n,disabled:r,locked:i,keepSelection:s,onChange:a}=this.props,o=this.getBox();if(r||i||s&&n)return;e.cancelable&&e.preventDefault(),this.bindDocMove(),this.componentRef.current.focus({preventScroll:!0});const l=e.clientX-o.x,c=e.clientY-o.y,u={unit:"px",x:l,y:c,width:0,height:0};this.evData={startClientX:e.clientX,startClientY:e.clientY,startCropX:l,startCropY:c,clientX:e.clientX,clientY:e.clientY,isResize:!0},this.mouseDownOnCrop=!0,a(Sa(u,o.width,o.height),ql(u,o.width,o.height)),this.setState({cropIsActive:!0,newCropIsBeingDrawn:!0})},this.onDocPointerMove=e=>{const{crop:n,disabled:r,onChange:i,onDragStart:s}=this.props,a=this.getBox();if(r||!n||!this.mouseDownOnCrop)return;e.cancelable&&e.preventDefault(),this.dragStarted||(this.dragStarted=!0,s&&s(e));const{evData:o}=this;o.clientX=e.clientX,o.clientY=e.clientY;let l;o.isResize?l=this.resizeCrop():l=this.dragCrop(),o7(n,l)||i(Sa(l,a.width,a.height),ql(l,a.width,a.height))},this.onComponentKeyDown=e=>{const{crop:n,disabled:r,onChange:i,onComplete:s}=this.props;if(r)return;const a=e.key;let o=!1;if(!n)return;const l=this.getBox(),c=this.makePixelCrop(l),u=(navigator.platform.match("Mac")?e.metaKey:e.ctrlKey)?ki.nudgeStepLarge:e.shiftKey?ki.nudgeStepMedium:ki.nudgeStep;if(a==="ArrowLeft"?(c.x-=u,o=!0):a==="ArrowRight"?(c.x+=u,o=!0):a==="ArrowUp"?(c.y-=u,o=!0):a==="ArrowDown"&&(c.y+=u,o=!0),o){e.cancelable&&e.preventDefault(),c.x=Kl(c.x,0,l.width-c.width),c.y=Kl(c.y,0,l.height-c.height);const d=Sa(c,l.width,l.height),h=ql(c,l.width,l.height);i(d,h),s&&s(d,h)}},this.onHandlerKeyDown=(e,n)=>{const{aspect:r=0,crop:i,disabled:s,minWidth:a=0,minHeight:o=0,maxWidth:l,maxHeight:c,onChange:u,onComplete:d}=this.props,h=this.getBox();if(s||!i)return;if(e.key==="ArrowUp"||e.key==="ArrowDown"||e.key==="ArrowLeft"||e.key==="ArrowRight")e.stopPropagation(),e.preventDefault();else return;const p=(navigator.platform.match("Mac")?e.metaKey:e.ctrlKey)?ki.nudgeStepLarge:e.shiftKey?ki.nudgeStepMedium:ki.nudgeStep,m=Sa(i,h.width,h.height),g=ece(m,e.key,p,n),y=l7(g,r,n,h.width,h.height,a,o,l,c);if(!o7(i,y)){const v=ql(y,h.width,h.height);u(y,v),d&&d(y,v)}},this.onDocPointerDone=e=>{const{crop:n,disabled:r,onComplete:i,onDragEnd:s}=this.props,a=this.getBox();this.unbindDocMove(),!(r||!n)&&this.mouseDownOnCrop&&(this.mouseDownOnCrop=!1,this.dragStarted=!1,s&&s(e),i&&i(Sa(n,a.width,a.height),ql(n,a.width,a.height)),this.setState({cropIsActive:!1,newCropIsBeingDrawn:!1}))},this.onDragFocus=e=>{var n;(n=this.componentRef.current)==null||n.scrollTo(0,0)}}get document(){return document}getBox(){const e=this.mediaRef.current;if(!e)return{x:0,y:0,width:0,height:0};const{x:n,y:r,width:i,height:s}=e.getBoundingClientRect();return{x:n,y:r,width:i,height:s}}componentDidUpdate(e){const{crop:n,onComplete:r}=this.props;if(r&&!e.crop&&n){const{width:i,height:s}=this.getBox();i&&s&&r(Sa(n,i,s),ql(n,i,s))}}componentWillUnmount(){this.resizeObserver&&this.resizeObserver.disconnect()}bindDocMove(){this.docMoveBound||(this.document.addEventListener("pointermove",this.onDocPointerMove,Ql),this.document.addEventListener("pointerup",this.onDocPointerDone,Ql),this.document.addEventListener("pointercancel",this.onDocPointerDone,Ql),this.docMoveBound=!0)}unbindDocMove(){this.docMoveBound&&(this.document.removeEventListener("pointermove",this.onDocPointerMove,Ql),this.document.removeEventListener("pointerup",this.onDocPointerDone,Ql),this.document.removeEventListener("pointercancel",this.onDocPointerDone,Ql),this.docMoveBound=!1)}getCropStyle(){const{crop:e}=this.props;if(e)return{top:`${e.y}${e.unit}`,left:`${e.x}${e.unit}`,width:`${e.width}${e.unit}`,height:`${e.height}${e.unit}`}}dragCrop(){const{evData:e}=this,n=this.getBox(),r=this.makePixelCrop(n),i=e.clientX-e.startClientX,s=e.clientY-e.startClientY;return r.x=Kl(e.startCropX+i,0,n.width-r.width),r.y=Kl(e.startCropY+s,0,n.height-r.height),r}getPointRegion(e,n,r,i){const{evData:s}=this,a=s.clientX-e.x,o=s.clientY-e.y;let l;i&&n?l=n==="nw"||n==="n"||n==="ne":l=o<s.startCropY;let c;return r&&n?c=n==="nw"||n==="w"||n==="sw":c=a<s.startCropX,c?l?"nw":"sw":l?"ne":"se"}resolveMinDimensions(e,n,r=0,i=0){let s=Math.min(r,e.width),a=Math.min(i,e.height);return!n||!s&&!a?[s,a]:n>1?s?[s,s/n]:[a*n,a]:a?[a*n,a]:[s,s/n]}resizeCrop(){const{evData:e}=this,{aspect:n=0,maxWidth:r,maxHeight:i}=this.props,s=this.getBox(),[a,o]=this.resolveMinDimensions(s,n,this.props.minWidth,this.props.minHeight);let l=this.makePixelCrop(s),c=this.getPointRegion(s,e.ord,a,o);const u=e.ord||c;let d=e.clientX-e.startClientX,h=e.clientY-e.startClientY;(a&&u==="nw"||u==="w"||u==="sw")&&(d=Math.min(d,-a)),(o&&u==="nw"||u==="n"||u==="ne")&&(h=Math.min(h,-o));const p={unit:"px",x:0,y:0,width:0,height:0};c==="ne"?(p.x=e.startCropX,p.width=d,n?(p.height=p.width/n,p.y=e.startCropY-p.height):(p.height=Math.abs(h),p.y=e.startCropY-p.height)):c==="se"?(p.x=e.startCropX,p.y=e.startCropY,p.width=d,n?p.height=p.width/n:p.height=h):c==="sw"?(p.x=e.startCropX+d,p.y=e.startCropY,p.width=Math.abs(d),n?p.height=p.width/n:p.height=h):c==="nw"&&(p.x=e.startCropX+d,p.width=Math.abs(d),n?(p.height=p.width/n,p.y=e.startCropY-p.height):(p.height=Math.abs(h),p.y=e.startCropY+h));const m=l7(p,n,c,s.width,s.height,a,o,r,i);return n||ki.xyOrds.indexOf(u)>-1?l=m:ki.xOrds.indexOf(u)>-1?(l.x=m.x,l.width=m.width):ki.yOrds.indexOf(u)>-1&&(l.y=m.y,l.height=m.height),l.x=Kl(l.x,0,s.width-l.width),l.y=Kl(l.y,0,s.height-l.height),l}createCropSelection(){const{ariaLabels:e=ki.defaultProps.ariaLabels,disabled:n,locked:r,renderSelectionAddon:i,ruleOfThirds:s,crop:a}=this.props,o=this.getCropStyle();if(a)return M.createElement("div",{style:o,className:"ReactCrop__crop-selection",onPointerDown:this.onCropPointerDown,"aria-label":e.cropArea,tabIndex:0,onKeyDown:this.onComponentKeyDown,role:"group"},!n&&!r&&M.createElement("div",{className:"ReactCrop__drag-elements",onFocus:this.onDragFocus},M.createElement("div",{className:"ReactCrop__drag-bar ord-n","data-ord":"n"}),M.createElement("div",{className:"ReactCrop__drag-bar ord-e","data-ord":"e"}),M.createElement("div",{className:"ReactCrop__drag-bar ord-s","data-ord":"s"}),M.createElement("div",{className:"ReactCrop__drag-bar ord-w","data-ord":"w"}),M.createElement("div",{className:"ReactCrop__drag-handle ord-nw","data-ord":"nw",tabIndex:0,"aria-label":e.nwDragHandle,onKeyDown:l=>this.onHandlerKeyDown(l,"nw"),role:"button"}),M.createElement("div",{className:"ReactCrop__drag-handle ord-n","data-ord":"n",tabIndex:0,"aria-label":e.nDragHandle,onKeyDown:l=>this.onHandlerKeyDown(l,"n"),role:"button"}),M.createElement("div",{className:"ReactCrop__drag-handle ord-ne","data-ord":"ne",tabIndex:0,"aria-label":e.neDragHandle,onKeyDown:l=>this.onHandlerKeyDown(l,"ne"),role:"button"}),M.createElement("div",{className:"ReactCrop__drag-handle ord-e","data-ord":"e",tabIndex:0,"aria-label":e.eDragHandle,onKeyDown:l=>this.onHandlerKeyDown(l,"e"),role:"button"}),M.createElement("div",{className:"ReactCrop__drag-handle ord-se","data-ord":"se",tabIndex:0,"aria-label":e.seDragHandle,onKeyDown:l=>this.onHandlerKeyDown(l,"se"),role:"button"}),M.createElement("div",{className:"ReactCrop__drag-handle ord-s","data-ord":"s",tabIndex:0,"aria-label":e.sDragHandle,onKeyDown:l=>this.onHandlerKeyDown(l,"s"),role:"button"}),M.createElement("div",{className:"ReactCrop__drag-handle ord-sw","data-ord":"sw",tabIndex:0,"aria-label":e.swDragHandle,onKeyDown:l=>this.onHandlerKeyDown(l,"sw"),role:"button"}),M.createElement("div",{className:"ReactCrop__drag-handle ord-w","data-ord":"w",tabIndex:0,"aria-label":e.wDragHandle,onKeyDown:l=>this.onHandlerKeyDown(l,"w"),role:"button"})),i&&M.createElement("div",{className:"ReactCrop__selection-addon",onMouseDown:l=>l.stopPropagation()},i(this.state)),s&&M.createElement(M.Fragment,null,M.createElement("div",{className:"ReactCrop__rule-of-thirds-hz"}),M.createElement("div",{className:"ReactCrop__rule-of-thirds-vt"})))}makePixelCrop(e){const n={...Wm,...this.props.crop||{}};return Sa(n,e.width,e.height)}render(){const{aspect:e,children:n,circularCrop:r,className:i,crop:s,disabled:a,locked:o,style:l,ruleOfThirds:c}=this.props,{cropIsActive:u,newCropIsBeingDrawn:d}=this.state,h=s?this.createCropSelection():null,p=Jle("ReactCrop",i,u&&"ReactCrop--active",a&&"ReactCrop--disabled",o&&"ReactCrop--locked",d&&"ReactCrop--new-crop",s&&e&&"ReactCrop--fixed-aspect",s&&r&&"ReactCrop--circular-crop",s&&c&&"ReactCrop--rule-of-thirds",!this.dragStarted&&s&&!s.width&&!s.height&&"ReactCrop--invisible-crop",r&&"ReactCrop--no-animate");return M.createElement("div",{ref:this.componentRef,className:p,style:l},M.createElement("div",{ref:this.mediaRef,className:"ReactCrop__child-wrapper",onPointerDown:this.onComponentPointerDown},n),h)}};Oo.xOrds=["e","w"];Oo.yOrds=["n","s"];Oo.xyOrds=["nw","ne","se","sw"];Oo.nudgeStep=1;Oo.nudgeStepMedium=10;Oo.nudgeStepLarge=100;Oo.defaultProps={ariaLabels:{cropArea:"Use the arrow keys to move the crop selection area",nwDragHandle:"Use the arrow keys to move the north west drag handle to change the crop selection area",nDragHandle:"Use the up and down arrow keys to move the north drag handle to change the crop selection area",neDragHandle:"Use the arrow keys to move the north east drag handle to change the crop selection area",eDragHandle:"Use the up and down arrow keys to move the east drag handle to change the crop selection area",seDragHandle:"Use the arrow keys to move the south east drag handle to change the crop selection area",sDragHandle:"Use the up and down arrow keys to move the south drag handle to change the crop selection area",swDragHandle:"Use the arrow keys to move the south west drag handle to change the crop selection area",wDragHandle:"Use the up and down arrow keys to move the west drag handle to change the crop selection area"}};let tce=Oo;const nce=(t=!1)=>{const[e,n]=_.useState(t),r=_.useCallback(()=>{n(i=>!i)},[]);return[e,r]};var BD={exports:{}};/*!
@@ -653,13 +653,13 @@ Valid keys: `+JSON.stringify(Object.keys(R),null," "));var ye=Ne(V,_e,Z,I,ie+".
653
653
  flex-shrink-0`,onClick:n})]})},vce=({field:t,context:e,value:n=[],onChange:r,setError:i,...s})=>{const[a,o]=_.useState(n??[]),l=_.useRef(),c=_.useCallback(d=>{const h=[...d.filter(p=>a.find(m=>m.handle===p.handle)===void 0),...a];o(h),console.log("pra",h),r&&r(h),l.current.hide()},[a,r]),u=_.useCallback(d=>{const h=a.filter(p=>p.handle!==d);o(h),r&&r(h)},[a,r]);return f.jsxs("div",{...s,children:[f.jsx(Wn,{children:"Browse products",stroke:"border-2",className:"w-40 h-10 mx-auto",onClick:()=>l.current.show()}),f.jsx(ha,{ref:l,children:f.jsx(_f,{onSave:c,onCancel:()=>l.current.hide()})}),(a==null?void 0:a.length)>0&&f.jsx(Ct,{className:"mt-5"}),a.map(d=>f.jsx(yce,{product:d,context:e,onRemove:()=>u(d.handle)},d.handle))]})};var Wh,xce=new Uint8Array(16);function _ce(){if(!Wh&&(Wh=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||typeof msCrypto<"u"&&typeof msCrypto.getRandomValues=="function"&&msCrypto.getRandomValues.bind(msCrypto),!Wh))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return Wh(xce)}const bce=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;function wce(t){return typeof t=="string"&&bce.test(t)}var vn=[];for(var n5=0;n5<256;++n5)vn.push((n5+256).toString(16).substr(1));function Ece(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,n=(vn[t[e+0]]+vn[t[e+1]]+vn[t[e+2]]+vn[t[e+3]]+"-"+vn[t[e+4]]+vn[t[e+5]]+"-"+vn[t[e+6]]+vn[t[e+7]]+"-"+vn[t[e+8]]+vn[t[e+9]]+"-"+vn[t[e+10]]+vn[t[e+11]]+vn[t[e+12]]+vn[t[e+13]]+vn[t[e+14]]+vn[t[e+15]]).toLowerCase();if(!wce(n))throw TypeError("Stringified UUID is invalid");return n}function R9(t,e,n){t=t||{};var r=t.random||(t.rng||_ce)();if(r[6]=r[6]&15|64,r[8]=r[8]&63|128,e){n=n||0;for(var i=0;i<16;++i)e[n+i]=r[i];return e}return Ece(r)}const kce=({option:t,onRemove:e,onChange:n})=>{var u;const[r,i]=_.useState(t),s=_.useRef(),a=_.useCallback(d=>{i(d),n&&n(d)},[n]),o=_.useCallback(d=>{var p;const h={...r,values:[...(p=r==null?void 0:r.values)==null?void 0:p.filter(m=>(m==null?void 0:m.id)!==(d==null?void 0:d.id))]};a(h)},[r,a]),l=_.useCallback(d=>{const h=d.currentTarget.value;console.log("name",h);const p={...r,name:h};a(p)},[r,a]),c=_.useCallback(d=>{var y;const h=String(s.current.value);if((h==null?void 0:h.trim())==="")return;const p={id:R9(),value:h};if((y=r==null?void 0:r.values)==null?void 0:y.some(v=>v.value===p.value))return;const g={...r,values:[p,...(r==null?void 0:r.values)??[]]};a(g)},[r,R9,a]);return f.jsxs("div",{className:"relative w-full shadow-md",children:[f.jsxs("fieldset",{className:"border shelf-border-color p-5 ",children:[f.jsx("legend",{className:"text-base",children:f.jsx(qe,{ref:s,placeholder:"Option Name",from:"from-kf-400",to:"to-pink-400/25",inputClsName:" text-base px-1 shelf-input-color hover:ring-pink-400 hover:ring-2 rounded-md h-10",overrideClass:!0,onChange:l,value:r==null?void 0:r.name,type:"text",rounded:"rounded-md"})}),f.jsx(de,{show:(((u=r==null?void 0:r.values)==null?void 0:u.length)??0)>0,children:f.jsx(Ui,{tags:r==null?void 0:r.values,name_fn:d=>d==null?void 0:d.value,onRemove:o,onClick:o})}),f.jsxs("div",{className:"flex flex-row items-center h-fit w-full mt-5 gap-3",children:[f.jsx(qe,{ref:s,placeholder:"Add new option",inputClsName:"text-base px-1 shelf-card w-full rounded-md h-10 hover:ring-pink-400 hover:ring-2",overrideClass:!0,type:"text",className:"mt-1 flex-1",rounded:"rounded-md",stroke:"border-b"}),f.jsx(Wn,{children:"add",className:"h-10 ",onClick:c})]})]}),f.jsx(HC,{className:"absolute right-0 top-0 cursor-pointer text-xl",onClick:d=>e(r)})]})},Cce=({options:t=[],onChange:e})=>{const[n,r]=_.useState(t),i=_.useCallback(o=>{const l=n==null?void 0:n.findIndex(u=>u.id===o.id);if(l<0)return;let c=[...n];c[l]=o,r(c),e&&e(c)},[n,e]),s=_.useCallback(o=>{let l=[...n.filter(c=>c.id!==o.id)];r(l),e&&e(l)},[n,e]),a=_.useCallback(()=>{const o={id:R9(),name:"",values:[]},l=[...n,o];r(l),e&&e(l)},[n,e]);return f.jsxs("div",{className:"w-full flex flex-col gap-5 items-center",children:[t.map(o=>f.jsx(kce,{option:o,onRemove:s,onChange:i},o==null?void 0:o.id)),f.jsx(ff,{onClick:a,Icon:BC,className:`cursor-pointer text-6xl hover:scale-110
654
654
  transition-transform`})]})},$D=(t,e=[])=>{let n=[];if(t==e.length)return[];if(t==e.length-1)return e[t].map(i=>[i]);let r=$D(t+1,e)??[[]];for(let i=0;i<e[t].length;i++)for(let s=0;s<r.length;s++){const a=[e[t][i],...r[s]];n.push(a)}return n},Tce=(t,e)=>t.every(n=>e.some(r=>r.option_id===n.option_id&&r.value_id===n.value_id)),Sce=({combination:t,options:e,context:n,setError:r})=>{var d,h;_.useEffect(()=>{n==null||n.query.all.get()},[n]);const i=_.useMemo(()=>t.map(p=>e.find(m=>m.id===p.option_id).values.find(m=>m.id==p.value_id).value).join(" / "),[t,e]),s=(h=(d=n==null?void 0:n.data)==null?void 0:d.variants)==null?void 0:h.reduce((p,m)=>(p[m.handle]={product:m,selection:m.variant_hint},p),{}),a=_.useMemo(()=>{var p,m;return s&&((m=(p=Object.values(s).find(g=>Tce(t,g.selection)))==null?void 0:p.product)==null?void 0:m.handle)},[s,t]),{navWithState:o}=zi(),l=_.useCallback(async()=>{const p=(n==null?void 0:n.getState)&&(n==null?void 0:n.getState()),m=`/pages/products/${a}`;o(m,p)},[a,o,n]),c=_.useCallback(async()=>{try{n!=null&&n.removeVariant&&await n.removeVariant(a)}catch(p){console.log(p),r("There was a problem removing the variant 😔")}},[a,o,n]),u=_.useCallback(async()=>{try{await(n==null?void 0:n.preCreateVariant());const p=n==null?void 0:n.getState(),m={...n==null?void 0:n.data,...p==null?void 0:p.data},g={data:{...m,handle:void 0,id:void 0,parent_handle:m.handle,parent_id:m.id,variant_hint:t,title:`${m.title} ${i}`},hasChanged:!0};o("/pages/products/create",p,g)}catch(p){r("Unable to save this parent document 😔"),console.error(p)}},[n,o,t,i]);return f.jsxs("div",{className:`w-full flex flex-row justify-between
655
655
  shelf-border-color border-b pb-3`,children:[f.jsxs("div",{className:"flex flex-row gap-1 items-center",children:[f.jsx(de,{show:!!a,children:f.jsx(MC,{className:"text-lg text-green-500"})}),f.jsx("p",{children:i,className:"text-base font-medium flex-1"})]}),f.jsxs(nv,{toggle:!!a,children:[f.jsxs("div",{className:"flex flex-row gap-3 flex-shrink-0 items-center",children:[f.jsx(Ac,{children:f.jsx(_s,{Icon:void 0,text:"remove",show:!0,onClick:c,keep_text_on_load:!0,classNameLoading:"text-xs",className:"w-fit underline "})}),f.jsx("span",{children:"/",className:"font-normal text-xl"}),f.jsx(Ac,{children:f.jsx("span",{children:"view",className:"cursor-pointer",onClick:l})})]}),f.jsx(Ac,{children:f.jsx(_s,{Icon:void 0,text:"create",show:!0,onClick:u,keep_text_on_load:!0,classNameLoading:"text-xs",className:"w-fit underline "})})]})]})},Nce=({options:t,context:e,setError:n})=>{const r=_.useMemo(()=>{const i=t==null?void 0:t.map(a=>a.values.map(o=>({option_id:a.id,value_id:o.id}))).filter(a=>a.length>=2);return $D(0,i)},[t]);return f.jsx("div",{className:"w-full flex flex-col gap-2",children:r.map(i=>f.jsx(Sce,{combination:i,context:e,options:t,setError:n},i==null?void 0:i.map(s=>s.value_id).join("_")))})},Ace="‼️ Create at least ONE Option with two values",Dce=({context:t,...e})=>{const n=t==null?void 0:t.data;return f.jsxs("div",{className:"text-base",children:[f.jsx("span",{children:"This product is a variant of "}),f.jsx(yf,{to:`/pages/products/${n==null?void 0:n.parent_handle}`,current_state:t==null?void 0:t.getState,children:f.jsx(Ac,{children:n==null?void 0:n.parent_handle})})]})},Oce=({value:t,onChange:e,context:n,setError:r,...i})=>{var l,c;const[s,a]=_.useState(t),o=_.useCallback(u=>{a(u),e&&e(u)},[s,e]);return(l=n==null?void 0:n.data)!=null&&l.parent_handle?f.jsx(Dce,{context:n}):(c=n==null?void 0:n.data)!=null&&c.handle?f.jsx("div",{...i,children:f.jsxs("div",{className:"flex flex-col gap-5 w-full items-center",children:[f.jsx("p",{children:"Product Options",className:"text-xl w-full font-semibold"}),f.jsx(Cce,{options:s,onChange:o}),f.jsx(Ct,{className:"w-full ",dashed:!0}),f.jsxs("div",{className:"flex flex-row w-full items-center gap-1",children:[f.jsx(QP,{className:"text-xl "}),f.jsx("p",{children:"Variants",className:"text-xl w-full font-semibold"})]}),f.jsxs(nv,{toggle:(s==null?void 0:s.length)??!1,className:"w-full",children:[f.jsx(Nce,{options:s,context:n,setError:r}),f.jsx("div",{className:"w-full shelf-text-minor-light text-base",children:Ace})]})]})}):"You have to create the product before you add variants"},Mce=({value:t,onClick:e})=>f.jsxs("div",{className:`w-full flex flex-col gap-2
656
- py-3 border-b shelf-border-color`,children:[f.jsxs("div",{className:"flex flex-row justify-between items-center",children:[f.jsx(Ac,{children:f.jsx("a",{onClick:()=>e(t),className:"cursor-pointer",children:f.jsx("span",{children:t==null?void 0:t.title})})}),f.jsx(Xt,{value:`**\`${t.info.details.meta.name}\`**`,className:"text-right"})]}),f.jsx(Xt,{value:(t==null?void 0:t.description)??"Discount does not have `description`"})]}),Ice=({field:t,context:e,value:n=[],onChange:r,setError:i,...s})=>{const a=n.length>0,{navWithState:o}=zi(),l=_.useCallback(c=>{const u=e==null?void 0:e.getState();o(`/pages/discounts/${c.handle}`,u)},[o,e]);return f.jsxs("div",{...s,children:[f.jsx(de,{show:!a,children:f.jsx(Xt,{value:"This `product` is not **eligible** for `discounts`"})}),f.jsx(de,{show:a,children:f.jsx("div",{className:"flex flex-col max-h-52 overflow-y-scroll",children:n.map(c=>f.jsx(Mce,{value:c,onClick:l},c.id))})})]})},Lce={name:"Root",comp:He,comp_params:{className:"w-full lg:w-[35rem] flex flex-col gap-5"},fields:[{key:"discounts",name:"🎁 Eligible Discounts",desc:"The following discounts may be applied to this product",comp:Q(Ice,{className:""},!0,!1),comp_params:{className:"w-full h-fit"}},{key:"title",name:"Title",type:"text",validate:!0,editable:!0,desc:"Give an accurate title of the product",comp:Q(Ie(Pe),{className:"h-10"},!0,!0),comp_params:{className:"w-full h-fit"}},{key:"handle",name:"🔗 Handle",type:"text",validate:!1,editable:!0,comp:Q(j0,{className:"w-full h-fit"}),desc:`Product handle uniquely identifies the product.
657
- Will be computed automatically if not filled by the product title`,comp_params:{className:"w-full h-fit"}},{key:"isbn",name:"ISBN 𝄃𝄃𝄂𝄂𝄀𝄁𝄃𝄂𝄂𝄃",type:"text",validate:!1,editable:!0,comp:Q(q6),desc:"Set ISBN identifier",comp_params:{className:"w-full h-fit"}},{key:"variants_options",name:"Product Variants",validate:!1,editable:!0,comp:Q(Oce,{className:"w-full h-fit"}),desc:"Product variants represent children product, that varies with options, such as SIZE / COLOR for a shirt",comp_params:{className:"w-full h-fit"}},{key:"description",name:"📝 Description",type:"text",validate:!1,editable:!0,desc:"Further describe the product you are selling",comp:Q(ya),comp_params:{className:"w-full"}},{key:"media",name:"📀 Media",type:"text",validate:!1,editable:!0,desc:"Manage and edit your media files",comp:Q(Nu),comp_params:{className:"w-full"}},{key:"video",name:"🎥 Video",type:"text",validate:!1,editable:!0,comp:Q(q6),desc:"Add a video, that demonstrates the product",comp_params:{className:"w-full h-fit"}},{key:"price",name:"🏷️ Price",type:"number",validate:!0,editable:!0,comp:Q(Ie(Pe),{className:"h-10",type:"number"}),desc:"How much will you sell the product for ?",comp_params:{className:"w-full"}},{key:"compare_at_price",name:"Compare At Price",type:"number",validate:!1,editable:!0,desc:"Compare at price reveals the competitiveness of your price",comp:Q(Ie(Pe),{className:"h-10",type:"number"}),comp_params:{className:"w-full"}},{key:"qty",name:"📦 Quantity",type:"number",validate:!0,editable:!0,desc:"How many units you have in stock for that product",comp:Q(Ie(Pe),{className:"h-10",type:"number",min:"0",step:"1"}),comp_params:{className:"w-full"}},{key:"attributes",name:"Attributes",validate:!1,editable:!0,desc:"Attributes can contain richer text values than tags",comp:Q(So),comp_params:{className:"w-full"}},{name:"JSON",type:"compund",validate:!1,editable:!1,desc:"Observe the RAW data",comp:Ds,comp_params:{className:"w-full"}}]},Pce={name:"Root2",comp:He,comp_params:{className:"w-full lg:w-[19rem] flex flex-col gap-5"},fields:[{key:"active",name:"Active",validate:!0,desc:"activate or deactivate the product (It won't be published in a collection)",editable:!0,defaultValue:!0,comp:Q(vf,{className:"text-gray-600"},!0),comp_params:{className:"w-full"}},{key:"related_products",name:"Related Products",type:"compund",validate:!1,editable:!0,desc:"Which other products are similar ? Offer your customers similar products",comp:Q(vce)},{key:"tags",name:"# Tags",type:"compund",validate:!1,editable:!0,desc:"Tags help you attach attributes to products",comp:Q(pa)},{key:"collections",name:"🗂️ Collections",type:"compund",validate:!1,editable:!0,desc:"Which collections does this product belong to ?",comp:Q(b1,{resource:"collections",slug:"/pages/collections"})}]},Rce={name:"Root",comp:He,comp_params:{className:"w-full --max-w-[35rem] --bg-red-100 items-center lg:max-w-max lg:items-start lg:w-fit flex flex-col lg:flex-row gap-5 mx-auto"},fields:[Lce,Pce]},r5=({mode:t,...e})=>{const{id:n,base:r}=fr(),{actions:{savePromise:i,deletePromise:s,duplicate:a,reload:o},context:l,key:c,sdk:u,doc:d,isCreateMode:h,isEditMode:p,isViewMode:m,loading:g,hasChanged:y,hasLoaded:v,error:x,ref_head:b,ref_root:w}=mi("products",n,"/pages/products",t,r),C=_.useCallback(()=>a({discounts:void 0,title:(d==null?void 0:d.title)+" duplicate"}),[d,a]),S=_.useMemo(()=>({...l,getState:()=>{const D=l.getState();return console.log("state",D),D==null||delete D.variants,{data:D.data,hasChanged:D.hasChanged}},removeVariant:async D=>{await u.products.remove(D),await o()},preCreateVariant:async()=>{var A,L;const D=(L=(A=w.current.get(!1))==null?void 0:A.data)==null?void 0:L.variants_options;await u.products.upsert({...d,variants_options:D})}}),[d,o,l]),k=!!(d!=null&&d.parent_handle);let N=[n??"create"];return k&&(N=[d==null?void 0:d.parent_handle,"variants",...N]),f.jsxs("div",{className:"w-full lg:min-w-fit mx-auto",children:[f.jsx($i,{major:["products",...N],className:""}),f.jsx(As,{doc:d,className:"mt-5",collectionId:"products"}),f.jsx(Ns,{onClickSave:p?i:void 0,onClickCreate:h?i:void 0,onClickDelete:h?void 0:s,onClickDuplicate:h?void 0:C,onClickReload:h?void 0:()=>o(!1),id:n,className:"mt-5"}),f.jsx(Cs,{ref:b,time:d==null?void 0:d.created_at,className:"mt-8",changes_made:y},d==null?void 0:d.updated_at),f.jsx(de,{show:v&&p||h,children:f.jsxs("div",{className:"w-full max-w-[40rem] lg:w-fit lg:max-w-none mx-auto",children:[f.jsx(Hr,{error:x,className:"w-full"}),f.jsx(ci,{ref:w,context:S,field:Rce,value:d??{},isViewMode:m,className:"mt-8"},c)]})})]})},jce=[{key:"title",name:"Title",comp:zt,comp_params:{className:"font-semibold",extra:"max-w-[10rem] md:max-w-[18rem]"}},{key:"updated_at",name:"Last Updated",comp:Ss},{key:void 0,name:"Actions",comp:Fr,comp_params:{className:""}}],u7=({})=>{const{query_api:t,context:e,ref_actions:n,page:r,loading:i,hasLoaded:s,error:a,queryCount:o,resource:l,resource_is_probably_empty:c,actions:{onLimitChange:u,onReload:d,prev:h,next:p}}=Br("collections","/pages/collections");return f.jsx("div",{className:"h-full w-full",children:f.jsxs("div",{className:"max-w-[56rem] mx-auto",children:[f.jsx(de,{show:!a,children:f.jsx(pr,{should_onboard:c,overallCollectionCount:o,hasLoaded:s,resource:l})}),f.jsx(de,{show:a,children:a==null?void 0:a.toString()}),f.jsxs("div",{className:`w-full rounded-md overflow-hidden border
656
+ py-3 border-b shelf-border-color`,children:[f.jsxs("div",{className:"flex flex-row justify-between items-center",children:[f.jsx(Ac,{children:f.jsx("a",{onClick:()=>e(t),className:"cursor-pointer",children:f.jsx("span",{children:t==null?void 0:t.title})})}),f.jsx(Xt,{value:`**\`${t.info.details.meta.name}\`**`,className:"text-right"})]}),f.jsx(Xt,{value:(t==null?void 0:t.description)??"Discount does not have `description`"})]}),Ice=({field:t,context:e,value:n=[],onChange:r,setError:i,...s})=>{const a=n.length>0,{navWithState:o}=zi(),l=_.useCallback(c=>{const u=e==null?void 0:e.getState();o(`/pages/discounts/${c.handle}`,u)},[o,e]);return f.jsxs("div",{...s,children:[f.jsx(de,{show:!a,children:f.jsx(Xt,{value:"This `product` is not **eligible** for `discounts`"})}),f.jsx(de,{show:a,children:f.jsx("div",{className:"flex flex-col max-h-52 overflow-y-scroll",children:n.map(c=>f.jsx(Mce,{value:c,onClick:l},c.id))})})]})},Lce={name:"Root",comp:He,comp_params:{className:"w-full lg:w-[35rem] flex flex-col gap-5"},fields:[{key:"discounts",name:"🎁 Eligible Discounts",desc:"The following discounts may be applied to this product",comp:Q(Ice,{className:""},!0,!1),comp_params:{className:"w-full h-fit"}},{key:"title",name:"Title",type:"text",validate:!0,editable:!0,desc:"Give an accurate title of the product",comp:Q(Me(Le),{className:"h-10"},!0,!0),comp_params:{className:"w-full h-fit"}},{key:"handle",name:"🔗 Handle",type:"text",validate:!1,editable:!0,comp:Q(j0,{className:"w-full h-fit"}),desc:`Product handle uniquely identifies the product.
657
+ Will be computed automatically if not filled by the product title`,comp_params:{className:"w-full h-fit"}},{key:"isbn",name:"ISBN 𝄃𝄃𝄂𝄂𝄀𝄁𝄃𝄂𝄂𝄃",type:"text",validate:!1,editable:!0,comp:Q(q6),desc:"Set ISBN identifier",comp_params:{className:"w-full h-fit"}},{key:"variants_options",name:"Product Variants",validate:!1,editable:!0,comp:Q(Oce,{className:"w-full h-fit"}),desc:"Product variants represent children product, that varies with options, such as SIZE / COLOR for a shirt",comp_params:{className:"w-full h-fit"}},{key:"description",name:"📝 Description",type:"text",validate:!1,editable:!0,desc:"Further describe the product you are selling",comp:Q(ya),comp_params:{className:"w-full"}},{key:"media",name:"📀 Media",type:"text",validate:!1,editable:!0,desc:"Manage and edit your media files",comp:Q(Nu),comp_params:{className:"w-full"}},{key:"video",name:"🎥 Video",type:"text",validate:!1,editable:!0,comp:Q(q6),desc:"Add a video, that demonstrates the product",comp_params:{className:"w-full h-fit"}},{key:"price",name:"🏷️ Price",type:"number",validate:!0,editable:!0,comp:Q(Me(Le),{className:"h-10",type:"number"}),desc:"How much will you sell the product for ?",comp_params:{className:"w-full"}},{key:"compare_at_price",name:"Compare At Price",type:"number",validate:!1,editable:!0,desc:"Compare at price reveals the competitiveness of your price",comp:Q(Me(Le),{className:"h-10",type:"number"}),comp_params:{className:"w-full"}},{key:"qty",name:"📦 Quantity",type:"number",validate:!0,editable:!0,desc:"How many units you have in stock for that product",comp:Q(Me(Le),{className:"h-10",type:"number",min:"0",step:"1"}),comp_params:{className:"w-full"}},{key:"attributes",name:"Attributes",validate:!1,editable:!0,desc:"Attributes can contain richer text values than tags",comp:Q(So),comp_params:{className:"w-full"}},{name:"JSON",type:"compund",validate:!1,editable:!1,desc:"Observe the RAW data",comp:Ds,comp_params:{className:"w-full"}}]},Pce={name:"Root2",comp:He,comp_params:{className:"w-full lg:w-[19rem] flex flex-col gap-5"},fields:[{key:"active",name:"Active",validate:!0,desc:"activate or deactivate the product (It won't be published in a collection)",editable:!0,defaultValue:!0,comp:Q(vf,{className:"text-gray-600"},!0),comp_params:{className:"w-full"}},{key:"related_products",name:"Related Products",type:"compund",validate:!1,editable:!0,desc:"Which other products are similar ? Offer your customers similar products",comp:Q(vce)},{key:"tags",name:"# Tags",type:"compund",validate:!1,editable:!0,desc:"Tags help you attach attributes to products",comp:Q(pa)},{key:"collections",name:"🗂️ Collections",type:"compund",validate:!1,editable:!0,desc:"Which collections does this product belong to ?",comp:Q(b1,{resource:"collections",slug:"/pages/collections"})}]},Rce={name:"Root",comp:He,comp_params:{className:"w-full --max-w-[35rem] --bg-red-100 items-center lg:max-w-max lg:items-start lg:w-fit flex flex-col lg:flex-row gap-5 mx-auto"},fields:[Lce,Pce]},r5=({mode:t,...e})=>{const{id:n,base:r}=fr(),{actions:{savePromise:i,deletePromise:s,duplicate:a,reload:o},context:l,key:c,sdk:u,doc:d,isCreateMode:h,isEditMode:p,isViewMode:m,loading:g,hasChanged:y,hasLoaded:v,error:x,ref_head:b,ref_root:w}=mi("products",n,"/pages/products",t,r),C=_.useCallback(()=>a({discounts:void 0,title:(d==null?void 0:d.title)+" duplicate"}),[d,a]),S=_.useMemo(()=>({...l,getState:()=>{const D=l.getState();return console.log("state",D),D==null||delete D.variants,{data:D.data,hasChanged:D.hasChanged}},removeVariant:async D=>{await u.products.remove(D),await o()},preCreateVariant:async()=>{var A,L;const D=(L=(A=w.current.get(!1))==null?void 0:A.data)==null?void 0:L.variants_options;await u.products.upsert({...d,variants_options:D})}}),[d,o,l]),k=!!(d!=null&&d.parent_handle);let N=[n??"create"];return k&&(N=[d==null?void 0:d.parent_handle,"variants",...N]),f.jsxs("div",{className:"w-full lg:min-w-fit mx-auto",children:[f.jsx($i,{major:["products",...N],className:""}),f.jsx(As,{doc:d,className:"mt-5",collectionId:"products"}),f.jsx(Ns,{onClickSave:p?i:void 0,onClickCreate:h?i:void 0,onClickDelete:h?void 0:s,onClickDuplicate:h?void 0:C,onClickReload:h?void 0:()=>o(!1),id:n,className:"mt-5"}),f.jsx(Cs,{ref:b,time:d==null?void 0:d.created_at,className:"mt-8",changes_made:y},d==null?void 0:d.updated_at),f.jsx(de,{show:v&&p||h,children:f.jsxs("div",{className:"w-full max-w-[40rem] lg:w-fit lg:max-w-none mx-auto",children:[f.jsx(Hr,{error:x,className:"w-full"}),f.jsx(ci,{ref:w,context:S,field:Rce,value:d??{},isViewMode:m,className:"mt-8"},c)]})})]})},jce=[{key:"title",name:"Title",comp:zt,comp_params:{className:"font-semibold",extra:"max-w-[10rem] md:max-w-[18rem]"}},{key:"updated_at",name:"Last Updated",comp:Ss},{key:void 0,name:"Actions",comp:Fr,comp_params:{className:""}}],u7=({})=>{const{query_api:t,context:e,ref_actions:n,page:r,loading:i,hasLoaded:s,error:a,queryCount:o,resource:l,resource_is_probably_empty:c,actions:{onLimitChange:u,onReload:d,prev:h,next:p}}=Br("collections","/pages/collections");return f.jsx("div",{className:"h-full w-full",children:f.jsxs("div",{className:"max-w-[56rem] mx-auto",children:[f.jsx(de,{show:!a,children:f.jsx(pr,{should_onboard:c,overallCollectionCount:o,hasLoaded:s,resource:l})}),f.jsx(de,{show:a,children:a==null?void 0:a.toString()}),f.jsxs("div",{className:`w-full rounded-md overflow-hidden border
658
658
  shelf-border-color shadow-md mt-5
659
659
  dark:shadow-slate-900 `,children:[f.jsx(Ts,{isCollectionEmpty:!1,ref:n,reload:d,createLink:"/pages/collections/create",searchTitle:"Search by Name or Handle",isLoading:i}),f.jsxs(de,{show:!a&&(r==null?void 0:r.length),children:[f.jsx(hr,{context:e,data:r,fields:jce}),f.jsx(jr,{prev:h,next:p,limit:t.limit,onLimitChange:u})]})]})]})})},Fce=[{key:"title",name:"Title",comp:zt},{key:"updated_at",name:"Last Updated",comp:Ss},{key:void 0,name:"Actions",comp:Fr}],Bce=_.forwardRef(({collection_handle_or_id:t,limit:e=5,context:n,onLoaded:r,...i},s)=>{const{sdk:a}=rn(),{pages:o,page:l,loading:c,error:u,queryCount:d,actions:{prev:h,next:p,query:m}}=Co(`collections/${t}/products`,El,!1),g=yv();_.useEffect(()=>{r&&r(d)},[d,r]),_.useEffect(()=>{m({limit:e,sortBy:["updated_at","id"]})},[m,e]),_.useImperativeHandle(s,()=>({refresh:()=>m({limit:e})}),[m,e]);const y=_.useMemo(()=>({getState:()=>n==null?void 0:n.getState(),editDocumentUrl:v=>`/pages/products/${v}`,deleteDocument:async v=>{const x=l.findIndex(C=>C.id===v||C.handle===v);if(x==-1)return;const b=n.data,w=l[x];await a.products.batchRemoveProductsFromCollection([w],b),l.splice(x,1),g()}}),[g,l,n]);return f.jsxs(f.Fragment,{children:[f.jsx(hr,{context:y,data:l,fields:Fce}),f.jsx(jr,{prev:h,next:p,onLimitChange:void 0})]})}),Hce=({value:t,context:e})=>{const{sdk:n}=rn(),[r,i]=_.useState(!1),[s,a]=_.useState(-1),[o,l]=_.useState(void 0),c=_.useRef(),u=_.useRef(),d=_.useCallback(async h=>{i(!0);try{await n.products.batchAddProductsToCollection(h,t),u.current.refresh()}catch{l(o)}finally{i(!1)}c.current.hide()},[o,t==null?void 0:t.handle]);return f.jsxs(fa,{name:"🎁 Products in collection "+(s>=0?s:""),className:"w-full --lg:w-[30rem] h-fit",border:!0,error:o,children:[f.jsxs(de,{show:t==null?void 0:t.handle,children:[f.jsx(Bce,{ref:u,collection_handle_or_id:t==null?void 0:t.handle,context:e,onLoaded:a}),f.jsx("div",{className:"flex flex-row justify-end",children:f.jsxs("div",{className:"flex flex-row items-center w-fit gap-3 mt-7",children:[f.jsx("span",{children:"Add Product",className:"text-gray-500"}),f.jsx(ot,{className:`text-gray-500 text-sm w-fit mx-auto
660
660
  shadow-gray-800/25 shadow-lg hover:scale-110
661
661
  transition-transform cursor-pointer`,stroke:"border-2",rounded:"rounded-full",from:"from-pink-500",to:"to-kf-500",onClick:()=>!r&&c.current.show(),children:f.jsx(wH,{className:"text-4xl text-white "+(r?"animate-spin":"")})})]})}),f.jsx(ha,{ref:c,children:f.jsx(_f,{onSave:d,onCancel:()=>c.current.hide()})})]}),f.jsx(de,{show:!(t!=null&&t.handle),children:f.jsx("p",{children:`Only after Collection is created,
662
- you will be able to add products here`,className:"text-2xl font-semibold text-gray-400"})})]})},zce=({collectionId:t,value:e})=>{const[n,r]=_.useState([]),[i,s]=_.useState(),{sdk:a}=rn();t=(e==null?void 0:e.handle)??t;const o=_.useCallback(async(l=!0)=>{try{s(void 0),await a.collections.bulkAddRemoveTags(t,n,l)}catch(c){console.error(c),s((c==null?void 0:c.message)??String(c))}},[n,t]);return t?f.jsxs(fa,{name:"Add tags to all products in Collection",className:"w-full h-fit",error:i,desc:"Add/Remove all tags at once",children:[f.jsx(pa,{className:"w-full h-fit",onChange:r}),f.jsx(Ct,{className:"my-5"}),f.jsxs("div",{className:"flex flex-row justify-between w-full --mt-5",children:[f.jsx(Zr,{text:"Add Tags",keep_text_on_load:!0,className:"w-fit",onClick:l=>o(!0)}),f.jsx(Zr,{text:"Remove Tags",keep_text_on_load:!0,className:"w-fit",onClick:l=>o(!1)})]})]}):null},Uce={name:"Root",comp:He,comp_params:{className:"w-full flex flex-col gap-5 max-w- lg:w-[35rem]"},fields:[{comp:Hce,comp_params:{className:"w-full"}},{key:"title",name:"Title",type:"text",validate:!0,editable:!0,desc:"Give an efficient title to the collection, e.g. - Women shirts",comp:Q(Ie(Pe),{className:"w-full h-10"}),comp_params:{className:"w-full h-fit"}},{key:"handle",name:"🔗 Handle",type:"text",validate:!1,editable:!0,desc:`A handle uniquely identifies the collection.
662
+ you will be able to add products here`,className:"text-2xl font-semibold text-gray-400"})})]})},zce=({collectionId:t,value:e})=>{const[n,r]=_.useState([]),[i,s]=_.useState(),{sdk:a}=rn();t=(e==null?void 0:e.handle)??t;const o=_.useCallback(async(l=!0)=>{try{s(void 0),await a.collections.bulkAddRemoveTags(t,n,l)}catch(c){console.error(c),s((c==null?void 0:c.message)??String(c))}},[n,t]);return t?f.jsxs(fa,{name:"Add tags to all products in Collection",className:"w-full h-fit",error:i,desc:"Add/Remove all tags at once",children:[f.jsx(pa,{className:"w-full h-fit",onChange:r}),f.jsx(Ct,{className:"my-5"}),f.jsxs("div",{className:"flex flex-row justify-between w-full --mt-5",children:[f.jsx(Zr,{text:"Add Tags",keep_text_on_load:!0,className:"w-fit",onClick:l=>o(!0)}),f.jsx(Zr,{text:"Remove Tags",keep_text_on_load:!0,className:"w-fit",onClick:l=>o(!1)})]})]}):null},Uce={name:"Root",comp:He,comp_params:{className:"w-full flex flex-col gap-5 max-w- lg:w-[35rem]"},fields:[{comp:Hce,comp_params:{className:"w-full"}},{key:"title",name:"Title",type:"text",validate:!0,editable:!0,desc:"Give an efficient title to the collection, e.g. - Women shirts",comp:Q(Me(Le),{className:"w-full h-10"}),comp_params:{className:"w-full h-fit"}},{key:"handle",name:"🔗 Handle",type:"text",validate:!1,editable:!0,desc:`A handle uniquely identifies the collection.
663
663
  Will be computed automatically if not filled by the product title`,comp:Q(j0,{className:"w-full h-fit"}),comp_params:{className:"w-full h-fit"}},{key:"desc",name:"📝 Description",type:"text",validate:!1,editable:!0,desc:"Describe the collection for your customers",comp:Q(ya),comp_params:{className:"w-full"}},{key:"media",name:"🎥 Media",validate:!1,editable:!0,desc:"Manage and edit your media files",comp:Q(Nu),comp_params:{className:"w-full"}},{key:"attributes",name:"Attributes",validate:!1,editable:!0,desc:"Attributes can contain richer text values than tags",comp:Q(So),comp_params:{className:"w-full"}},{name:"JSON",type:"compund",validate:!1,editable:!1,desc:"Observe the RAW data",comp:Ds,comp_params:{className:"w-full"}}]},$ce={name:"Main",comp:He,comp_params:{className:`w-full items-center lg:items-start lg:w-[18rem]
664
664
  flex flex-col gap-5`},fields:[{key:"active",name:"Active",validate:!0,desc:"activate or deactivate the collection",editable:!0,defaultValue:!0,comp:Q(vf,{className:"text-gray-600"},!0),comp_params:{className:"w-full"}},{key:"tags",name:"# Tags",type:"compund",validate:!1,editable:!0,desc:"Use tags to attach attributes to the collection",comp:Q(pa),comp_params:{className:"w-full "}},{comp:zce,comp_params:{className:"w-full"}}]},Vce={name:"Root",comp:He,comp_params:{className:"w-full gap-5 --justify-center --bg-red-100 items-center lg:max-w-max lg:items-start lg:w-fit flex flex-col lg:flex-row --mx-auto"},fields:[Uce,$ce]},Yce=({onClickSave:t=void 0,onClickCreate:e=void 0,onClickDelete:n=void 0,onClickPublish:r=void 0,onClickDuplicate:i=void 0,onClickReload:s,id:a,className:o})=>f.jsx(Ns,{id:a,className:o,onClickCreate:e,onClickDelete:n,onClickDuplicate:i,onClickReload:s,onClickSave:t,children:f.jsx(Zr,{Icon:f.jsx(tv,{}),text:"publish",keep_text_on_load:!0,show:!!r,onClick:r,className:""})}),i5=({mode:t,...e})=>{const{id:n,base:r}=fr(),{actions:{savePromise:i,deletePromise:s,setError:a,reload:o,navWithState:l,duplicate:c},context:u,key:d,sdk:h,doc:p,isCreateMode:m,isEditMode:g,isViewMode:y,loading:v,hasChanged:x,hasLoaded:b,error:w,ref_head:C,ref_root:S}=mi("collections",n,"/pages/collections",t,r),k=_.useCallback(()=>c({title:(p==null?void 0:p.title)+" duplicate"}),[p,c]),N=_.useCallback(async()=>{await i(),a(void 0);try{await h.collections.publish(n,400),await o()}catch(D){a({messages:[{message:D.toString()}]})}},[n,i,o]);return f.jsxs("div",{className:"w-full lg:min-w-fit mx-auto",children:[f.jsx($i,{major:["collections",n??"create"],className:""}),f.jsx(As,{doc:p,className:"mt-5",collectionId:"collections"}),f.jsx(Yce,{onClickSave:g?i:void 0,onClickCreate:m?i:void 0,onClickPublish:m?void 0:N,onClickDelete:m?void 0:s,onClickDuplicate:m?void 0:k,onClickReload:m?void 0:async()=>o(!1),id:n,className:"mt-5"}),f.jsx(Cs,{changes_made:x,ref:C,time:p==null?void 0:p.created_at,className:"mt-8"},p==null?void 0:p.updated_at),f.jsx(de,{show:b&&g||m,children:f.jsxs("div",{className:"w-full max-w-[40rem] lg:w-fit lg:max-w-none mx-auto",children:[f.jsx(Hr,{error:w,className:"w-full"}),f.jsx(ci,{ref:S,field:Vce,context:u,value:p??{},isViewMode:y,className:"mt-8"},d)]})})]})},Ip=t=>{switch(t){case Er.regular.type:return"bg-teal-600 dark:bg-teal-600/40";case Er.bulk.type:return"bg-red-400 dark:bg-red-400/40";case Er.buy_x_get_y.type:return"bg-cyan-500 dark:bg-cyan-500/40";case Er.order.type:return"bg-kf-400 dark:bg-kf-400/40";case Er.bundle.type:return"bg-sky-500 dark:bg-sky-400/40";default:return"bg-slate-400 dark:bg-slate-400/20"}},Wce=({value:t,...e})=>{const n=_.useMemo(()=>{var i;return(i=Object.values(Er).find(s=>s.type===(t==null?void 0:t.type)))==null?void 0:i.name.split(" ")[0]},[t]),r="text-white rounded-xl py-px px-2 whitespace-nowrap border shelf-border-color-blend "+Ip(t==null?void 0:t.type);return f.jsx("span",{className:r+" bg-",children:n})},Gce=({...t})=>f.jsxs("div",{...t,children:[f.jsxs("div",{className:"flex flex-row gap-2 flex-wrap",children:[f.jsx(on,{to:"/pages/discounts",draggable:"false",children:f.jsx(Ka,{value:"all",bgColor:"bg-pink-400 dark:bg-pink-400/60"})}),Object.values(Er).filter(e=>!!e.type).map(e=>f.jsx(on,{draggable:"false",to:`/pages/discounts/q/vql=type:${e.id}`,children:f.jsx(Ka,{value:e.name,bgColor:Ip(e.type)})},e.id))]}),f.jsxs("div",{className:"flex flex-row flex-wrap gap-2 mt-1",children:[Object.values(Zc).map(e=>f.jsx(on,{draggable:"false",to:`/pages/discounts/q/vql=app:${e.name.toLowerCase()}`,children:f.jsx(Ka,{value:e.name,bgColor:Ip("")})},e.id)),[{name:"enabled",v:!0},{name:"disabled",v:!1}].map((e,n)=>f.jsx(on,{draggable:"false",to:`/pages/discounts/q/vql=active:${e.v}`,children:f.jsx(Ka,{value:e.name,bgColor:Ip(void 0)})},n))]})]}),Kce=({value:t,context:e,...n})=>{const r=e.item.active?"bg-teal-500":"bg-red-500",i="whitespace-nowrap pr-2 font-semibold text-base max-w-[150px] sm:max-w-max overflow-clip hover:overflow-x-auto",s=e.item.application.id===Zc.Manual.id;return f.jsxs("div",{className:i,children:[f.jsx("span",{children:t}),s&&f.jsx(zR,{className:`block --text-xl text-white --p-0.5
665
665
  align-middle text-center ${r}`}),!s&&f.jsx("span",{children:"AUTO",className:`block text-xs text-white w-fit px-1 border shelf-border-color-blend
@@ -694,7 +694,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
694
694
  `,c+=`> Also, This \`discount\` was applied in **${a.affected_orders_count}** \`orders\`
695
695
 
696
696
  `),f.jsx("div",{...i,children:f.jsx(de,{show:a.loaded,children:f.jsx(Xt,{value:c})})})},lpe=t=>t===void 0?[!1,"Empty Code"]:/\s/g.test(t)?[!1,"Code cannot contain whitespace/s"]:[!0,void 0],cpe={key:"info",name:"Info",comp:He,comp_params:{className:"w-full flex flex-col gap-5"},validate:!1,fields:[{key:"filters",name:"🔎 Filters",validate:!0,validator:Lhe,desc:"Define which products or orders (by date, amount or customers) are eligible for discount",comp:Q(jO,{className:"w-full h-9"},!0),comp_params:{className:"w-full"}},{key:"details",name:"⚙️ Discount Details",validate:!0,validator:Ghe,desc:"Choose the type of discount and its behaviour",comp:Q(ape,{className:"w-full h-9"},!0),comp_params:{className:"w-full"}}]},upe={name:"Main",comp:He,comp_params:{className:`w-full --max-w-[35rem] gap-5 items-center
697
- lg:items-start lg:w-[35rem] flex flex-col `},fields:[{key:"title",name:"Title",type:"text",validate:!0,desc:"A short and catchy title: 10% OFF for Orders above 100$",comp:Q(Ie(Pe),{className:"w-full h-10"},!0),comp_params:{className:"w-full"}},{key:"handle",name:"🎟️ Discount Code",type:"text",validate:!0,validator:lpe,editable:!0,desc:"A short word identifier for the discount",comp:Q(j0,{className:"w-full h-fit",type:"text",placeholder:"code ..."}),comp_params:{className:"w-full text-xs py-auto --font-semibold"}},cpe,{key:"media",name:"🎥 Media",type:"text",desc:"Manage and edit your media files",validate:!1,editable:!0,comp:Q(Nu),comp_params:{className:"w-full"}},{key:"description",name:"📝 Description",type:"text",validate:!1,desc:"Optional description",comp:Q(ya),comp_params:{className:"w-full"}},{name:"JSON",type:"compund",validate:!1,editable:!1,desc:"Observe the RAW data",comp:Ds,comp_params:{className:"w-full"}}]},dpe=`
697
+ lg:items-start lg:w-[35rem] flex flex-col `},fields:[{key:"title",name:"Title",type:"text",validate:!0,desc:"A short and catchy title: 10% OFF for Orders above 100$",comp:Q(Me(Le),{className:"w-full h-10"},!0),comp_params:{className:"w-full"}},{key:"handle",name:"🎟️ Discount Code",type:"text",validate:!0,validator:lpe,editable:!0,desc:"A short word identifier for the discount",comp:Q(j0,{className:"w-full h-fit",type:"text",placeholder:"code ..."}),comp_params:{className:"w-full text-xs py-auto --font-semibold"}},cpe,{key:"media",name:"🎥 Media",type:"text",desc:"Manage and edit your media files",validate:!1,editable:!0,comp:Q(Nu),comp_params:{className:"w-full"}},{key:"description",name:"📝 Description",type:"text",validate:!1,desc:"Optional description",comp:Q(ya),comp_params:{className:"w-full"}},{name:"JSON",type:"compund",validate:!1,editable:!1,desc:"Observe the RAW data",comp:Ds,comp_params:{className:"w-full"}}]},dpe=`
698
698
  Order determines the order in which automatic discounts are applied.
699
699
  <br/><br/>
700
700
  Discounts are arranged as a stack and the order of application is important.
@@ -707,17 +707,17 @@ Decide whether the discount is:
707
707
  - **Automatically** applied, or
708
708
  - **Coupon** (applied by user)
709
709
  `,hpe={name:"Main",comp:He,comp_params:{className:`w-full items-center lg:items-start lg:w-[18rem]
710
- flex flex-col gap-5`},fields:[{key:"active",name:"Enable",validate:!0,desc:"Enable or disable the discount",editable:!0,defaultValue:!0,comp:Q(vf,{className:"text-gray-600"},!0),comp_params:{className:"w-full"}},{key:void 0,name:"🚀 Performance",desc:"This is how this discount performs",comp:Q(ope,{className:""},!0),comp_params:{className:"w-full"}},{key:"application",name:"Automatic or Coupon",validate:!0,desc:fpe,editable:!0,defaultValue:Zc.Auto,comp:Q(Ie(yp(Object.values(Zc))),{className:"text-gray-600"},!0),comp_params:{className:"w-full text-xs py-auto --font-semibold "}},{key:"priority",name:"Order of discount",type:"number",validate:!0,desc:dpe,editable:!0,comp:Q(Ie(Pe),{className:"h-10",type:"number",min:"0",step:"1"},!0),comp_params:{className:"w-full text-xs py-auto --font-semibold "}},{key:"tags",name:"# Tags",type:"compund",validate:!1,editable:!0,desc:"Use Tags to quickly attach small attributes, that describe things",comp:Q(pa),comp_params:{className:"w-full "}},{key:"attributes",name:"Attributes",validate:!1,editable:!0,desc:"Attributes can contain richer text values than tags",comp:Q(So),comp_params:{className:"w-full"}}]},ppe={name:"Root",comp:He,comp_params:{className:"w-full gap-5 --justify-center --bg-red-100 items-center lg:max-w-max lg:items-start lg:w-fit flex flex-col lg:flex-row --mx-auto"},fields:[upe,hpe]},mpe=({onClickSave:t=void 0,onClickCreate:e=void 0,onClickDelete:n=void 0,onClickPublish:r=void 0,onClickDuplicate:i=void 0,onClickReload:s,id:a,className:o,isExported:l=!1})=>f.jsx(Ns,{id:a,className:o,onClickCreate:e,onClickDelete:n,onClickDuplicate:i,onClickReload:s,onClickSave:t,children:f.jsx(Zr,{Icon:f.jsx(jC,{}),text:`${l?"update":"create"} collection`,show:!!r,onClick:r,className:""})}),g5=({mode:t,...e})=>{const{id:n,base:r}=fr(),{actions:{savePromise:i,deletePromise:s,reload:a,setError:o,duplicate:l},context:c,key:u,sdk:d,doc:h,isCreateMode:p,isEditMode:m,isViewMode:g,loading:y,hasChanged:v,hasLoaded:x,error:b,ref_head:w,ref_root:C}=mi("discounts",n,"/pages/discounts",t,r),S=_.useCallback(async()=>{await i(),await a(),o(void 0);try{await a()}catch(k){console.log("e",k),o({error:{messages:[{message:k.toString()}]}})}},[i,a]);return f.jsxs("div",{className:"w-full lg:min-w-fit mx-auto",children:[f.jsx($i,{major:["discounts",n??"create"],className:""}),f.jsx(As,{doc:h,className:"mt-5",collectionId:"discounts"}),f.jsx(mpe,{onClickSave:m?i:void 0,onClickCreate:p?i:void 0,onClickPublish:p?void 0:S,onClickDelete:p?void 0:s,onClickDuplicate:p?void 0:()=>l({title:(h==null?void 0:h.title)+" duplicate"}),onClickReload:p?void 0:async()=>a(!1),id:h==null?void 0:h.id,isExported:!!(h!=null&&h.published),className:"mt-5"}),f.jsx(Cs,{changes_made:v,ref:w,time:h==null?void 0:h.created_at,className:"mt-8"},h==null?void 0:h.updated_at),f.jsx(de,{show:x&&m||p,children:f.jsxs("div",{className:"w-full max-w-[40rem] lg:w-fit lg:max-w-none mx-auto",children:[f.jsx(Hr,{error:b,className:"w-full"}),f.jsx(ci,{ref:C,field:ppe,value:h??{},context:c,isViewMode:g,className:"mt-8 mx-auto"},u)]})})]})},gpe=[{key:"title",name:"Title",comp:zt,comp_params:{className:"font-semibold",extra:"max-w-[10rem] md:max-w-[18rem]"}},{key:"price",name:"Price",comp:zt,comp_params:{className:"font-semibold",extra:"max-w-[10rem] md:max-w-[18rem]"}},{key:"updated_at",name:"Last Updated",comp:Ss},{key:void 0,name:"Actions",comp:Fr,comp_params:{className:""}}],rE=({})=>{const{query_api:t,context:e,ref_actions:n,page:r,loading:i,error:s,queryCount:a,hasLoaded:o,resource:l,resource_is_probably_empty:c,actions:{onLimitChange:u,onReload:d,prev:h,next:p}}=Br("shipping","/pages/shipping-methods");return f.jsx("div",{className:"h-full w-full",children:f.jsxs("div",{className:"max-w-[56rem] mx-auto",children:[f.jsx(pr,{should_onboard:c,overallCollectionCount:a,hasLoaded:o,resource:l}),f.jsx(de,{show:s,children:s==null?void 0:s.toString()}),f.jsxs("div",{className:`w-full rounded-md overflow-hidden border
710
+ flex flex-col gap-5`},fields:[{key:"active",name:"Enable",validate:!0,desc:"Enable or disable the discount",editable:!0,defaultValue:!0,comp:Q(vf,{className:"text-gray-600"},!0),comp_params:{className:"w-full"}},{key:void 0,name:"🚀 Performance",desc:"This is how this discount performs",comp:Q(ope,{className:""},!0),comp_params:{className:"w-full"}},{key:"application",name:"Automatic or Coupon",validate:!0,desc:fpe,editable:!0,defaultValue:Zc.Auto,comp:Q(Me(yp(Object.values(Zc))),{className:"text-gray-600"},!0),comp_params:{className:"w-full text-xs py-auto --font-semibold "}},{key:"priority",name:"Order of discount",type:"number",validate:!0,desc:dpe,editable:!0,comp:Q(Me(Le),{className:"h-10",type:"number",min:"0",step:"1"},!0),comp_params:{className:"w-full text-xs py-auto --font-semibold "}},{key:"tags",name:"# Tags",type:"compund",validate:!1,editable:!0,desc:"Use Tags to quickly attach small attributes, that describe things",comp:Q(pa),comp_params:{className:"w-full "}},{key:"attributes",name:"Attributes",validate:!1,editable:!0,desc:"Attributes can contain richer text values than tags",comp:Q(So),comp_params:{className:"w-full"}}]},ppe={name:"Root",comp:He,comp_params:{className:"w-full gap-5 --justify-center --bg-red-100 items-center lg:max-w-max lg:items-start lg:w-fit flex flex-col lg:flex-row --mx-auto"},fields:[upe,hpe]},mpe=({onClickSave:t=void 0,onClickCreate:e=void 0,onClickDelete:n=void 0,onClickPublish:r=void 0,onClickDuplicate:i=void 0,onClickReload:s,id:a,className:o,isExported:l=!1})=>f.jsx(Ns,{id:a,className:o,onClickCreate:e,onClickDelete:n,onClickDuplicate:i,onClickReload:s,onClickSave:t,children:f.jsx(Zr,{Icon:f.jsx(jC,{}),text:`${l?"update":"create"} collection`,show:!!r,onClick:r,className:""})}),g5=({mode:t,...e})=>{const{id:n,base:r}=fr(),{actions:{savePromise:i,deletePromise:s,reload:a,setError:o,duplicate:l},context:c,key:u,sdk:d,doc:h,isCreateMode:p,isEditMode:m,isViewMode:g,loading:y,hasChanged:v,hasLoaded:x,error:b,ref_head:w,ref_root:C}=mi("discounts",n,"/pages/discounts",t,r),S=_.useCallback(async()=>{await i(),await a(),o(void 0);try{await a()}catch(k){console.log("e",k),o({error:{messages:[{message:k.toString()}]}})}},[i,a]);return f.jsxs("div",{className:"w-full lg:min-w-fit mx-auto",children:[f.jsx($i,{major:["discounts",n??"create"],className:""}),f.jsx(As,{doc:h,className:"mt-5",collectionId:"discounts"}),f.jsx(mpe,{onClickSave:m?i:void 0,onClickCreate:p?i:void 0,onClickPublish:p?void 0:S,onClickDelete:p?void 0:s,onClickDuplicate:p?void 0:()=>l({title:(h==null?void 0:h.title)+" duplicate"}),onClickReload:p?void 0:async()=>a(!1),id:h==null?void 0:h.id,isExported:!!(h!=null&&h.published),className:"mt-5"}),f.jsx(Cs,{changes_made:v,ref:w,time:h==null?void 0:h.created_at,className:"mt-8"},h==null?void 0:h.updated_at),f.jsx(de,{show:x&&m||p,children:f.jsxs("div",{className:"w-full max-w-[40rem] lg:w-fit lg:max-w-none mx-auto",children:[f.jsx(Hr,{error:b,className:"w-full"}),f.jsx(ci,{ref:C,field:ppe,value:h??{},context:c,isViewMode:g,className:"mt-8 mx-auto"},u)]})})]})},gpe=[{key:"title",name:"Title",comp:zt,comp_params:{className:"font-semibold",extra:"max-w-[10rem] md:max-w-[18rem]"}},{key:"price",name:"Price",comp:zt,comp_params:{className:"font-semibold",extra:"max-w-[10rem] md:max-w-[18rem]"}},{key:"updated_at",name:"Last Updated",comp:Ss},{key:void 0,name:"Actions",comp:Fr,comp_params:{className:""}}],rE=({})=>{const{query_api:t,context:e,ref_actions:n,page:r,loading:i,error:s,queryCount:a,hasLoaded:o,resource:l,resource_is_probably_empty:c,actions:{onLimitChange:u,onReload:d,prev:h,next:p}}=Br("shipping","/pages/shipping-methods");return f.jsx("div",{className:"h-full w-full",children:f.jsxs("div",{className:"max-w-[56rem] mx-auto",children:[f.jsx(pr,{should_onboard:c,overallCollectionCount:a,hasLoaded:o,resource:l}),f.jsx(de,{show:s,children:s==null?void 0:s.toString()}),f.jsxs("div",{className:`w-full rounded-md overflow-hidden border
711
711
  shelf-border-color shadow-md mt-5
712
- dark:shadow-slate-900`,children:[f.jsx(Ts,{isCollectionEmpty:c,ref:n,reload:d,createLink:"/pages/shipping-methods/create",searchTitle:"Search by Name or Handle",isLoading:i}),f.jsxs(de,{show:!s&&(r==null?void 0:r.length),children:[f.jsx(hr,{context:e,data:r,fields:gpe}),f.jsx(jr,{prev:h,next:p,limit:t.limit,onLimitChange:u})]})]})]})})},ype={name:"Root",comp:He,comp_params:{className:"w-full lg:w-[35rem] flex flex-col gap-5"},fields:[{key:"title",name:"Title",type:"text",validate:!0,editable:!0,desc:"The name of the shipping method",comp:Q(Ie(Pe),{className:"h-10"}),comp_params:{className:"w-full h-fit"}},{key:"description",name:"📝 Description",type:"text",validate:!1,editable:!0,desc:"Optional description",comp:Q(ya),comp_params:{className:"w-full"}},{key:"media",name:"🎬 Media",type:"text",validate:!1,editable:!0,desc:"Manage and edit your media files",comp:Q(Nu),comp_params:{className:"w-full"}},{key:"attributes",name:"Attributes",validate:!1,editable:!0,desc:"Attributes can contain richer text values than tags",comp:Q(So),comp_params:{className:"w-full"}},{name:"JSON",type:"compund",validate:!1,editable:!1,desc:"Observe the RAW data",comp:Ds,comp_params:{className:"w-full"}}]},vpe={name:"Root2",comp:He,comp_params:{className:"w-full lg:w-[19rem] flex flex-col gap-5"},fields:[{key:"active",name:"Active",validate:!0,desc:"activate or deactivate the shipping method",editable:!0,defaultValue:!0,comp:Q(vf,{className:"text-gray-600"},!0),comp_params:{className:"w-full"}},{key:"price",name:"🏷️ Price",type:"number",validate:!0,editable:!0,desc:"The price of the shipping method",comp:Q(Ie(Pe),{className:"h-10",min:"0",type:"number"}),comp_params:{className:"w-full h-fit"}},{key:"tags",name:"# Tags",type:"compund",validate:!1,editable:!0,desc:"Tags help you attach extra attributes to your methods",comp:Q(pa)}]},xpe={name:"Root",comp:He,comp_params:{className:`w-full --max-w-[35rem] --bg-red-100 items-center
712
+ dark:shadow-slate-900`,children:[f.jsx(Ts,{isCollectionEmpty:c,ref:n,reload:d,createLink:"/pages/shipping-methods/create",searchTitle:"Search by Name or Handle",isLoading:i}),f.jsxs(de,{show:!s&&(r==null?void 0:r.length),children:[f.jsx(hr,{context:e,data:r,fields:gpe}),f.jsx(jr,{prev:h,next:p,limit:t.limit,onLimitChange:u})]})]})]})})},ype={name:"Root",comp:He,comp_params:{className:"w-full lg:w-[35rem] flex flex-col gap-5"},fields:[{key:"title",name:"Title",type:"text",validate:!0,editable:!0,desc:"The name of the shipping method",comp:Q(Me(Le),{className:"h-10"}),comp_params:{className:"w-full h-fit"}},{key:"description",name:"📝 Description",type:"text",validate:!1,editable:!0,desc:"Optional description",comp:Q(ya),comp_params:{className:"w-full"}},{key:"media",name:"🎬 Media",type:"text",validate:!1,editable:!0,desc:"Manage and edit your media files",comp:Q(Nu),comp_params:{className:"w-full"}},{key:"attributes",name:"Attributes",validate:!1,editable:!0,desc:"Attributes can contain richer text values than tags",comp:Q(So),comp_params:{className:"w-full"}},{name:"JSON",type:"compund",validate:!1,editable:!1,desc:"Observe the RAW data",comp:Ds,comp_params:{className:"w-full"}}]},vpe={name:"Root2",comp:He,comp_params:{className:"w-full lg:w-[19rem] flex flex-col gap-5"},fields:[{key:"active",name:"Active",validate:!0,desc:"activate or deactivate the shipping method",editable:!0,defaultValue:!0,comp:Q(vf,{className:"text-gray-600"},!0),comp_params:{className:"w-full"}},{key:"price",name:"🏷️ Price",type:"number",validate:!0,editable:!0,desc:"The price of the shipping method",comp:Q(Me(Le),{className:"h-10",min:"0",type:"number"}),comp_params:{className:"w-full h-fit"}},{key:"tags",name:"# Tags",type:"compund",validate:!1,editable:!0,desc:"Tags help you attach extra attributes to your methods",comp:Q(pa)}]},xpe={name:"Root",comp:He,comp_params:{className:`w-full --max-w-[35rem] --bg-red-100 items-center
713
713
  lg:max-w-max lg:items-start lg:w-fit flex flex-col
714
714
  lg:flex-row gap-5 mx-auto`},fields:[ype,vpe]},_pe=({onClickSave:t=void 0,onClickCreate:e=void 0,onClickDelete:n=void 0,onClickPublish:r=void 0,onClickDuplicate:i=void 0,onClickReload:s,id:a,className:o})=>f.jsx(Ns,{id:a,className:o,onClickCreate:e,onClickDelete:n,onClickDuplicate:i,onClickReload:s,onClickSave:t,children:f.jsx(Zr,{Icon:tv,text:"publish",show:!!r,onClick:r,className:""})}),y5=({mode:t,...e})=>{const{id:n,base:r}=fr(),{actions:{savePromise:i,deletePromise:s,reload:a,duplicate:o},context:l,key:c,doc:u,isCreateMode:d,isEditMode:h,isViewMode:p,loading:m,hasChanged:g,hasLoaded:y,error:v,ref_head:x,ref_root:b}=mi("shipping",n,"/pages/shipping-methods",t,r),w=_.useCallback(()=>o({title:(u==null?void 0:u.title)+" duplicate"}),[u,o]);return f.jsxs("div",{className:"w-full lg:min-w-fit mx-auto",children:[f.jsx($i,{major:["shipping",n??"create"],className:""}),f.jsx(As,{doc:u,className:"mt-5",collectionId:"shipping"}),f.jsx(_pe,{id:u==null?void 0:u.handle,className:"mt-5",onClickSave:h?i:void 0,onClickCreate:d?i:void 0,onClickDuplicate:d?void 0:w,onClickReload:d?void 0:async()=>a(!1),onClickDelete:d?void 0:s}),f.jsx(Cs,{changes_made:g,ref:x,time:u==null?void 0:u.created_at,className:"mt-8"},u==null?void 0:u.updated_at),f.jsx(de,{show:y&&h||d,children:f.jsxs("div",{className:"w-full max-w-[40rem] lg:w-fit lg:max-w-none mx-auto",children:[f.jsx(Hr,{error:v,className:"w-full"}),f.jsx(ci,{ref:b,field:xpe,value:u??{},isViewMode:p,context:l,className:"mt-8"},c)]})})]})},bpe=[{key:"title",name:"Title",comp:zt,comp_params:{className:"font-semibold "}},{key:"handle",name:"Handle",comp:zt},{key:"updated_at",name:"Last Updated",comp:Ss},{key:void 0,name:"Actions",comp:Fr,comp_params:{className:""}}],iE=({})=>{const{query_api:t,context:e,ref_actions:n,page:r,loading:i,error:s,queryCount:a,hasLoaded:o,resource:l,resource_is_probably_empty:c,actions:{onLimitChange:u,onReload:d,prev:h,next:p}}=Br("storefronts","/pages/storefronts");return f.jsx("div",{className:"h-full w-full",children:f.jsxs("div",{className:"max-w-[56rem] mx-auto",children:[f.jsx(pr,{should_onboard:c,overallCollectionCount:a,hasLoaded:o,resource:l}),f.jsx(de,{show:s,children:s==null?void 0:s.toString()}),f.jsxs("div",{className:`w-full rounded-md overflow-hidden border
715
715
  shelf-border-color shadow-md mt-5
716
- dark:shadow-slate-900`,children:[f.jsx(Ts,{isCollectionEmpty:c,ref:n,reload:d,createLink:"/pages/storefronts/create",searchTitle:"Search by title or handle",isLoading:i}),f.jsxs(de,{show:!s&&(r==null?void 0:r.length),children:[f.jsx(hr,{context:e,data:r,fields:bpe}),f.jsx(jr,{prev:h,next:p,limit:t.limit,onLimitChange:u})]})]})]})})},wpe=({field:t,context:e,value:n=[],onChange:r})=>{const i=_.useRef(),{navWithState:s}=zi(),a=_.useCallback(c=>{r(n.filter(u=>u.handle!==c.handle))},[n,r]),o=_.useCallback(c=>{const u=c.handle??c.id;s(`/pages/products/${u}`,e==null?void 0:e.getState())},[s,e]),l=_.useCallback(c=>{const u=[...c.filter(d=>!n.find(h=>h.handle===d.handle)),...n];r(u),i.current.hide()},[n,r]);return f.jsxs("div",{className:"w-full",children:[f.jsx(Wn,{children:"Browse products",className:"--w-fit h-10 w-40 mx-auto",onClick:()=>i.current.show()}),f.jsx(ha,{ref:i,children:f.jsx(_f,{onSave:l,onCancel:()=>i.current.hide()})}),(n==null?void 0:n.length)>0&&f.jsx(Ct,{className:"my-5"}),f.jsx(Ui,{onClick:o,onRemove:a,name_fn:c=>c.title,tags:n,className:"mt-5"})]})},Epe={name:"Root",comp:He,comp_params:{className:"w-full lg:w-[34rem] flex flex-col gap-5"},fields:[{key:"title",name:"Title",type:"text",validate:!0,editable:!0,desc:"Give your store a title",comp:Q(Ie(Pe),{className:"h-10"}),comp_params:{className:"w-full h-fit"}},{key:"handle",name:"🔗 Handle",type:"text",validate:!1,editable:!0,desc:"An identifier for your store",comp:Q(j0,{className:"w-full h-fit"}),comp_params:{className:"w-full h-fit"}},{key:"products",name:"🛍️ Products",type:"text",validate:!1,editable:!0,desc:"Decide which specific products are used by the Store Front",comp:Q(wpe,{className:"h-10"}),comp_params:{className:"w-full h-fit"}},{key:"collections",name:"🗂️ Collections",type:"text",validate:!1,editable:!0,desc:"Decide which collections meta data is used by the Store Front",comp:Q(b1,{className:"w-full",add_all:!0,resource:"collections",name_fn:t=>t.title,slug:"/pages/collections"}),comp_params:{className:"w-full h-fit"}},{key:"discounts",name:"🎟️ Discounts",type:"text",validate:!1,editable:!0,desc:"Decide which discounts are used by the Store Front",comp:Q(b1,{className:"w-full",add_all:!0,resource:"discounts",transform_fn:t=>t.filter(e=>e.application.id===Zc.Auto.id&&e.active),slug:"/pages/discounts"}),comp_params:{className:"w-full h-fit"}},{key:"shipping_methods",name:"🚚 Shipping Methods",type:"text",validate:!1,editable:!0,desc:"Decide which Shipping methods are used by the Store Front",comp:Q(b1,{className:"w-full",add_all:!0,resource:"shipping",name_fn:t=>t.title,slug:"/pages/shipping-methods"}),comp_params:{className:"w-full h-fit"}},{key:"posts",name:"✍🏼 Posts",type:"text",validate:!1,editable:!0,desc:"Decide which Notes / Posts are used by the Store Front",comp:Q(b1,{className:"w-full",add_all:!0,resource:"posts",name_fn:t=>t.title,slug:"/pages/posts"}),comp_params:{className:"w-full h-fit"}},{key:"description",name:"📝 Description",type:"text",validate:!1,editable:!0,comp:Q(ya),comp_params:{className:"w-full"}},{key:"media",name:"🖼️ Media",type:"text",validate:!1,editable:!0,desc:"Manage and edit your media files",comp:Q(Nu),comp_params:{className:"w-full "}},{key:"video",name:"🎥 Video",type:"text",validate:!1,editable:!0,desc:"Add a video url to your store front",comp:Q(Ie(Pe),{className:"h-10"}),comp_params:{className:"w-full h-fit"}},{name:"JSON",type:"compund",validate:!1,editable:!1,desc:"Observe the RAW data",comp:Ds,comp_params:{className:"w-full"}}]},kpe={name:"Root2",comp:He,comp_params:{className:"w-full lg:w-[19rem] flex flex-col gap-5"},fields:[{key:"active",name:"Enable",validate:!0,desc:"Enable or disable the discount",editable:!0,defaultValue:!0,comp:Q(vf,{className:"text-gray-600"},!0),comp_params:{className:"w-full"}},{key:"tags",name:"# Tags",type:"compund",validate:!1,editable:!0,desc:"Tags help you attach extra attributes to your store",comp:Q(pa)},{key:"attributes",name:"Attributes",validate:!1,editable:!0,desc:"Attributes can contain richer text values than tags",comp:Q(So),comp_params:{className:"w-full"}}]},Cpe={name:"Root",comp:He,comp_params:{className:`w-full --max-w-[35rem] --bg-red-100 items-center
716
+ dark:shadow-slate-900`,children:[f.jsx(Ts,{isCollectionEmpty:c,ref:n,reload:d,createLink:"/pages/storefronts/create",searchTitle:"Search by title or handle",isLoading:i}),f.jsxs(de,{show:!s&&(r==null?void 0:r.length),children:[f.jsx(hr,{context:e,data:r,fields:bpe}),f.jsx(jr,{prev:h,next:p,limit:t.limit,onLimitChange:u})]})]})]})})},wpe=({field:t,context:e,value:n=[],onChange:r})=>{const i=_.useRef(),{navWithState:s}=zi(),a=_.useCallback(c=>{r(n.filter(u=>u.handle!==c.handle))},[n,r]),o=_.useCallback(c=>{const u=c.handle??c.id;s(`/pages/products/${u}`,e==null?void 0:e.getState())},[s,e]),l=_.useCallback(c=>{const u=[...c.filter(d=>!n.find(h=>h.handle===d.handle)),...n];r(u),i.current.hide()},[n,r]);return f.jsxs("div",{className:"w-full",children:[f.jsx(Wn,{children:"Browse products",className:"--w-fit h-10 w-40 mx-auto",onClick:()=>i.current.show()}),f.jsx(ha,{ref:i,children:f.jsx(_f,{onSave:l,onCancel:()=>i.current.hide()})}),(n==null?void 0:n.length)>0&&f.jsx(Ct,{className:"my-5"}),f.jsx(Ui,{onClick:o,onRemove:a,name_fn:c=>c.title,tags:n,className:"mt-5"})]})},Epe={name:"Root",comp:He,comp_params:{className:"w-full lg:w-[34rem] flex flex-col gap-5"},fields:[{key:"title",name:"Title",type:"text",validate:!0,editable:!0,desc:"Give your store a title",comp:Q(Me(Le),{className:"h-10"}),comp_params:{className:"w-full h-fit"}},{key:"handle",name:"🔗 Handle",type:"text",validate:!1,editable:!0,desc:"An identifier for your store",comp:Q(j0,{className:"w-full h-fit"}),comp_params:{className:"w-full h-fit"}},{key:"products",name:"🛍️ Products",type:"text",validate:!1,editable:!0,desc:"Decide which specific products are used by the Store Front",comp:Q(wpe,{className:"h-10"}),comp_params:{className:"w-full h-fit"}},{key:"collections",name:"🗂️ Collections",type:"text",validate:!1,editable:!0,desc:"Decide which collections meta data is used by the Store Front",comp:Q(b1,{className:"w-full",add_all:!0,resource:"collections",name_fn:t=>t.title,slug:"/pages/collections"}),comp_params:{className:"w-full h-fit"}},{key:"discounts",name:"🎟️ Discounts",type:"text",validate:!1,editable:!0,desc:"Decide which discounts are used by the Store Front",comp:Q(b1,{className:"w-full",add_all:!0,resource:"discounts",transform_fn:t=>t.filter(e=>e.application.id===Zc.Auto.id&&e.active),slug:"/pages/discounts"}),comp_params:{className:"w-full h-fit"}},{key:"shipping_methods",name:"🚚 Shipping Methods",type:"text",validate:!1,editable:!0,desc:"Decide which Shipping methods are used by the Store Front",comp:Q(b1,{className:"w-full",add_all:!0,resource:"shipping",name_fn:t=>t.title,slug:"/pages/shipping-methods"}),comp_params:{className:"w-full h-fit"}},{key:"posts",name:"✍🏼 Posts",type:"text",validate:!1,editable:!0,desc:"Decide which Notes / Posts are used by the Store Front",comp:Q(b1,{className:"w-full",add_all:!0,resource:"posts",name_fn:t=>t.title,slug:"/pages/posts"}),comp_params:{className:"w-full h-fit"}},{key:"description",name:"📝 Description",type:"text",validate:!1,editable:!0,comp:Q(ya),comp_params:{className:"w-full"}},{key:"media",name:"🖼️ Media",type:"text",validate:!1,editable:!0,desc:"Manage and edit your media files",comp:Q(Nu),comp_params:{className:"w-full "}},{key:"video",name:"🎥 Video",type:"text",validate:!1,editable:!0,desc:"Add a video url to your store front",comp:Q(Me(Le),{className:"h-10"}),comp_params:{className:"w-full h-fit"}},{name:"JSON",type:"compund",validate:!1,editable:!1,desc:"Observe the RAW data",comp:Ds,comp_params:{className:"w-full"}}]},kpe={name:"Root2",comp:He,comp_params:{className:"w-full lg:w-[19rem] flex flex-col gap-5"},fields:[{key:"active",name:"Enable",validate:!0,desc:"Enable or disable the discount",editable:!0,defaultValue:!0,comp:Q(vf,{className:"text-gray-600"},!0),comp_params:{className:"w-full"}},{key:"tags",name:"# Tags",type:"compund",validate:!1,editable:!0,desc:"Tags help you attach extra attributes to your store",comp:Q(pa)},{key:"attributes",name:"Attributes",validate:!1,editable:!0,desc:"Attributes can contain richer text values than tags",comp:Q(So),comp_params:{className:"w-full"}}]},Cpe={name:"Root",comp:He,comp_params:{className:`w-full --max-w-[35rem] --bg-red-100 items-center
717
717
  lg:max-w-max lg:items-start lg:w-fit flex flex-col
718
718
  lg:flex-row gap-5 mx-auto`},fields:[Epe,kpe]},Tpe=({onClickSave:t=void 0,onClickCreate:e=void 0,onClickDelete:n=void 0,onClickPublish:r=void 0,onClickDuplicate:i=void 0,onClickReload:s,id:a,className:o})=>f.jsx(Ns,{id:a,className:o,onClickCreate:e,onClickDelete:n,onClickDuplicate:i,onClickReload:s,onClickSave:t,children:f.jsx(Zr,{Icon:f.jsx(tv,{}),text:"publish",keep_text_on_load:!0,show:!!r,onClick:r,className:""})}),v5=({mode:t,...e})=>{const{id:n,base:r}=fr(),{actions:{reloadPromise:i,savePromise:s,deletePromise:a,reload:o,duplicate:l,setError:c},context:u,key:d,sdk:h,doc:p,isCreateMode:m,isEditMode:g,isViewMode:y,loading:v,hasChanged:x,hasLoaded:b,error:w,ref_head:C,ref_root:S}=mi("storefronts",n,"/pages/storefronts",t,r),k=_.useCallback(()=>l({title:(p==null?void 0:p.title)+" duplicate"}),[p,l]),N=_.useCallback(async()=>{await s(),c(void 0);try{await h.storefronts.publish(n),await o()}catch(D){c({messages:[{message:D.toString()}]})}},[s,o,n]);return f.jsxs("div",{className:"w-full lg:min-w-fit mx-auto",children:[f.jsx($i,{major:["storefronts",n??"create"],className:""}),f.jsx(As,{doc:p,className:"mt-5",collectionId:"storefronts"}),f.jsx(Tpe,{id:(p==null?void 0:p.handle)??(p==null?void 0:p.id),className:"mt-5",onClickSave:g?s:void 0,onClickCreate:m?s:void 0,onClickPublish:m?void 0:N,onClickDuplicate:m?void 0:k,onClickReload:m?void 0:i,onClickDelete:m?void 0:a}),f.jsx(Cs,{changes_made:x,ref:C,time:p==null?void 0:p.created_at,className:"mt-8"},p==null?void 0:p.updated_at),f.jsx(de,{show:b&&g||m,children:f.jsxs("div",{className:"w-full max-w-[40rem] lg:w-fit lg:max-w-none mx-auto",children:[f.jsx(Hr,{error:w,className:"w-full"}),f.jsx(ci,{ref:S,field:Cpe,value:p??{},isViewMode:y,context:u,className:"mt-8"},d)]})})]})},Spe=[{key:"title",name:"Title",comp:zt,comp_params:{className:"font-semibold"}},{key:"updated_at",name:"Last Updated ",comp:Ss,comp_params:{className:"font-semibold"}},{key:void 0,name:"Actions",comp:Fr,comp_params:{className:""}}],sE=({})=>{const{query_api:t,context:e,ref_actions:n,page:r,loading:i,error:s,queryCount:a,hasLoaded:o,resource:l,resource_is_probably_empty:c,actions:{onLimitChange:u,onReload:d,prev:h,next:p}}=Br("posts","/pages/posts");return f.jsx("div",{className:"w-full h-full overflow-x-clip",children:f.jsxs("div",{className:"max-w-[56rem] mx-auto --overflow-x-clip",children:[f.jsx(pr,{should_onboard:c,overallCollectionCount:a,hasLoaded:o,resource:l}),f.jsx(de,{show:s,children:s==null?void 0:s.toString()}),f.jsxs("div",{className:`w-full rounded-md overflow-hidden shadow-md
719
719
  dark:shadow-slate-900 border mt-5
720
- shelf-border-color`,children:[f.jsx(Ts,{isCollectionEmpty:c,ref:n,reload:d,createLink:"/pages/posts/create",searchTitle:"Search by name, values...",isLoading:i}),f.jsxs(de,{show:!s&&(r==null?void 0:r.length),children:[f.jsx(hr,{context:e,data:r,fields:Spe}),f.jsx(jr,{prev:h,next:p,limit:t.limit,onLimitChange:u})]})]})]})})},Npe={name:"Root",comp:He,comp_params:{className:"w-full lg:w-[35rem] flex flex-col gap-5"},fields:[{key:"title",name:"Title",type:"text",validate:!0,desc:"A short title for the post",comp:Q(Ie(Pe),{className:"h-9",placeholder:"enter a title"}),comp_params:{className:"w-full "}},{key:"text",name:"📝 Post",type:"text",validate:!1,editable:!0,desc:"Write your post with Markdown and HTML",comp:Q(ya),comp_params:{className:"w-full"}},{key:"media",name:"🎬 Media",validate:!1,editable:!0,desc:"Manage and edit your media files",comp:Q(Nu),comp_params:{className:"w-full"}},{key:"attributes",name:"Attributes",validate:!1,editable:!0,desc:"Attributes can contain richer text values than tags",comp:Q(So),comp_params:{className:"w-full"}}]},Ape={name:"Root2",comp:He,comp_params:{className:"w-full lg:w-[19rem] flex flex-col gap-5"},fields:[{key:"tags",name:"# Tags",type:"compund",validate:!1,editable:!0,desc:"Tags help you attach attributes",comp:Q(pa)}]},Dpe={name:"Root",comp:He,comp_params:{className:"w-full items-center lg:max-w-max lg:items-start lg:w-fit flex flex-col lg:flex-row gap-5 mx-auto"},fields:[Npe,Ape]},x5=({mode:t,...e})=>{const{id:n,base:r}=fr(),{actions:{savePromise:i,deletePromise:s,reload:a,duplicate:o},context:l,key:c,doc:u,isCreateMode:d,isEditMode:h,isViewMode:p,loading:m,hasChanged:g,hasLoaded:y,error:v,ref_head:x,ref_root:b}=mi("posts",n,"/pages/posts",t,r);return _.useCallback(()=>o({title:(u==null?void 0:u.title)+" duplicate"}),[u,o]),f.jsxs("div",{className:"w-full lg:min-w-fit mx-auto",children:[f.jsx($i,{major:["posts",n??"create"],className:""}),f.jsx(As,{doc:u,className:"mt-5",collectionId:"posts"}),f.jsx(Ns,{onClickSave:h?i:void 0,onClickCreate:d?i:void 0,onClickDelete:d?void 0:s,className:"mt-5"}),f.jsx(Cs,{ref:x,time:u==null?void 0:u.created_at,className:"mt-8",changes_made:g},u==null?void 0:u.updated_at),f.jsxs(de,{show:y&&h||d,children:[f.jsx(Hr,{error:v,className:"w-full max-w-[55rem] mx-auto"}),f.jsx(ci,{ref:b,field:Dpe,value:u??{},context:l,isViewMode:p,className:"mx-auto"},u==null?void 0:u.updated_at)]})]})},mg="data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4KPHN2ZyB2aWV3Qm94PSIwIDAgMjU2IDI1NiIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgeG1sbnM6Yng9Imh0dHBzOi8vYm94eS1zdmcuY29tIj4KICA8ZGVmcz4KICAgIDxsaW5lYXJHcmFkaWVudCBpZD0iZ3JhZGllbnQtMC0wIiBncmFkaWVudFVuaXRzPSJ1c2VyU3BhY2VPblVzZSIgeDE9IjEyOCIgeTE9IjAiIHgyPSIxMjgiIHkyPSIyNTYiIHhsaW5rOmhyZWY9IiNncmFkaWVudC0wIi8+CiAgICA8bGluZWFyR3JhZGllbnQgaWQ9ImdyYWRpZW50LTAiIGJ4OnBpbm5lZD0idHJ1ZSI+CiAgICAgIDxzdG9wIG9mZnNldD0iMCIgc3R5bGU9InN0b3AtY29sb3I6IHJnYig2LCAyLCA4KTsiLz4KICAgICAgPHN0b3Agb2Zmc2V0PSIxIiBzdHlsZT0ic3RvcC1jb2xvcjogcmdiKDIwMywgNjAsIDE3OCk7Ii8+CiAgICA8L2xpbmVhckdyYWRpZW50PgogICAgPGZpbHRlciBpZD0iZHJvcC1zaGFkb3ctZmlsdGVyLTEiIGNvbG9yLWludGVycG9sYXRpb24tZmlsdGVycz0ic1JHQiIgeD0iLTUwJSIgeT0iLTUwJSIgd2lkdGg9IjIwMCUiIGhlaWdodD0iMjAwJSIgYng6cHJlc2V0PSJkcm9wLXNoYWRvdyAxIDAgMCA5IDAuMzIgI2QzMDJkZCI+Ci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jYxMiA5MS43MiBMIDE2Ny4xMjQgOTEuNzIgWiIgc3R5bGU9ImZpbGw6IHJnYigyNTUsIDI1NSwgMjU1KTsiLz4KPC9zdmc+",Ope=({value:t,children:e,className:n,context:r,extra:i="max-w-[8rem] md:max-w-[18rem]",...s})=>{var l,c;const o=`overflow-x-auto flex flex-row items-center gap-2 inline-block whitespace-nowrap ${n} ${i}`;return f.jsxs("div",{className:o,...s,children:[f.jsx("img",{src:((c=(l=r==null?void 0:r.item)==null?void 0:l.info)==null?void 0:c.logo_url)??mg,className:"rounded-md w-6 h-6 object-cover border dark:opacity-80"}),f.jsx("div",{children:t??e})]})},Mpe=[{key:"info.name",name:"Name",comp:Ope,comp_params:{className:"font-semibold",extra:"max-w-[10rem] md:max-w-[18rem]"}},{key:"handle",name:"Handle",comp:zt,comp_params:{className:"font-semibold",extra:"max-w-[10rem] md:max-w-[18rem]"}},{key:void 0,name:"Actions",comp:Fr,comp_params:{className:""}}],Ipe=({})=>{const{context:t,page:e,loading:n,error:r,queryCount:i,hasLoaded:s,resource:a,resource_is_probably_empty:o}=Br("payments/gateways","/pages/payment-gateways"),l=_.useMemo(()=>{const{viewDocumentUrl:c}=t;return{viewDocumentUrl:c}},[t]);return f.jsx("div",{className:"h-full w-full",children:f.jsxs("div",{className:"max-w-[56rem] mx-auto",children:[f.jsx(de,{show:!r,children:f.jsx(pr,{should_onboard:o,overallCollectionCount:(e==null?void 0:e.length)??0,hasLoaded:s,resource:a})}),f.jsx(de,{show:r,children:r==null?void 0:r.toString()}),f.jsx("div",{className:`w-full rounded-md overflow-hidden border
720
+ shelf-border-color`,children:[f.jsx(Ts,{isCollectionEmpty:c,ref:n,reload:d,createLink:"/pages/posts/create",searchTitle:"Search by name, values...",isLoading:i}),f.jsxs(de,{show:!s&&(r==null?void 0:r.length),children:[f.jsx(hr,{context:e,data:r,fields:Spe}),f.jsx(jr,{prev:h,next:p,limit:t.limit,onLimitChange:u})]})]})]})})},Npe={name:"Root",comp:He,comp_params:{className:"w-full lg:w-[35rem] flex flex-col gap-5"},fields:[{key:"title",name:"Title",type:"text",validate:!0,desc:"A short title for the post",comp:Q(Me(Le),{className:"h-9",placeholder:"enter a title"}),comp_params:{className:"w-full "}},{key:"text",name:"📝 Post",type:"text",validate:!1,editable:!0,desc:"Write your post with Markdown and HTML",comp:Q(ya),comp_params:{className:"w-full"}},{key:"media",name:"🎬 Media",validate:!1,editable:!0,desc:"Manage and edit your media files",comp:Q(Nu),comp_params:{className:"w-full"}},{key:"attributes",name:"Attributes",validate:!1,editable:!0,desc:"Attributes can contain richer text values than tags",comp:Q(So),comp_params:{className:"w-full"}}]},Ape={name:"Root2",comp:He,comp_params:{className:"w-full lg:w-[19rem] flex flex-col gap-5"},fields:[{key:"tags",name:"# Tags",type:"compund",validate:!1,editable:!0,desc:"Tags help you attach attributes",comp:Q(pa)}]},Dpe={name:"Root",comp:He,comp_params:{className:"w-full items-center lg:max-w-max lg:items-start lg:w-fit flex flex-col lg:flex-row gap-5 mx-auto"},fields:[Npe,Ape]},x5=({mode:t,...e})=>{const{id:n,base:r}=fr(),{actions:{savePromise:i,deletePromise:s,reload:a,duplicate:o},context:l,key:c,doc:u,isCreateMode:d,isEditMode:h,isViewMode:p,loading:m,hasChanged:g,hasLoaded:y,error:v,ref_head:x,ref_root:b}=mi("posts",n,"/pages/posts",t,r);return _.useCallback(()=>o({title:(u==null?void 0:u.title)+" duplicate"}),[u,o]),f.jsxs("div",{className:"w-full lg:min-w-fit mx-auto",children:[f.jsx($i,{major:["posts",n??"create"],className:""}),f.jsx(As,{doc:u,className:"mt-5",collectionId:"posts"}),f.jsx(Ns,{onClickSave:h?i:void 0,onClickCreate:d?i:void 0,onClickDelete:d?void 0:s,className:"mt-5"}),f.jsx(Cs,{ref:x,time:u==null?void 0:u.created_at,className:"mt-8",changes_made:g},u==null?void 0:u.updated_at),f.jsxs(de,{show:y&&h||d,children:[f.jsx(Hr,{error:v,className:"w-full max-w-[55rem] mx-auto"}),f.jsx(ci,{ref:b,field:Dpe,value:u??{},context:l,isViewMode:p,className:"mx-auto"},u==null?void 0:u.updated_at)]})]})},mg="data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4KPHN2ZyB2aWV3Qm94PSIwIDAgMjU2IDI1NiIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgeG1sbnM6Yng9Imh0dHBzOi8vYm94eS1zdmcuY29tIj4KICA8ZGVmcz4KICAgIDxsaW5lYXJHcmFkaWVudCBpZD0iZ3JhZGllbnQtMC0wIiBncmFkaWVudFVuaXRzPSJ1c2VyU3BhY2VPblVzZSIgeDE9IjEyOCIgeTE9IjAiIHgyPSIxMjgiIHkyPSIyNTYiIHhsaW5rOmhyZWY9IiNncmFkaWVudC0wIi8+CiAgICA8bGluZWFyR3JhZGllbnQgaWQ9ImdyYWRpZW50LTAiIGJ4OnBpbm5lZD0idHJ1ZSI+CiAgICAgIDxzdG9wIG9mZnNldD0iMCIgc3R5bGU9InN0b3AtY29sb3I6IHJnYig2LCAyLCA4KTsiLz4KICAgICAgPHN0b3Agb2Zmc2V0PSIxIiBzdHlsZT0ic3RvcC1jb2xvcjogcmdiKDIwMywgNjAsIDE3OCk7Ii8+CiAgICA8L2xpbmVhckdyYWRpZW50PgogICAgPGZpbHRlciBpZD0iZHJvcC1zaGFkb3ctZmlsdGVyLTEiIGNvbG9yLWludGVycG9sYXRpb24tZmlsdGVycz0ic1JHQiIgeD0iLTUwJSIgeT0iLTUwJSIgd2lkdGg9IjIwMCUiIGhlaWdodD0iMjAwJSIgYng6cHJlc2V0PSJkcm9wLXNoYWRvdyAxIDAgMCA5IDAuMzIgI2QzMDJkZCI+CiAgICAgIDxmZUdhdXNzaWFuQmx1ciBpbj0iU291cmNlQWxwaGEiIHN0ZERldmlhdGlvbj0iOSIvPgogICAgICA8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TsiLz4KPC9zdmc+",Ope=({value:t,children:e,className:n,context:r,extra:i="max-w-[8rem] md:max-w-[18rem]",...s})=>{var l,c;const o=`overflow-x-auto flex flex-row items-center gap-2 inline-block whitespace-nowrap ${n} ${i}`;return f.jsxs("div",{className:o,...s,children:[f.jsx("img",{src:((c=(l=r==null?void 0:r.item)==null?void 0:l.info)==null?void 0:c.logo_url)??mg,className:"rounded-md w-6 h-6 object-cover border dark:opacity-80"}),f.jsx("div",{children:t??e})]})},Mpe=[{key:"info.name",name:"Name",comp:Ope,comp_params:{className:"font-semibold",extra:"max-w-[10rem] md:max-w-[18rem]"}},{key:"handle",name:"Handle",comp:zt,comp_params:{className:"font-semibold",extra:"max-w-[10rem] md:max-w-[18rem]"}},{key:void 0,name:"Actions",comp:Fr,comp_params:{className:""}}],Ipe=({})=>{const{context:t,page:e,loading:n,error:r,queryCount:i,hasLoaded:s,resource:a,resource_is_probably_empty:o}=Br("payments/gateways","/pages/payment-gateways"),l=_.useMemo(()=>{const{viewDocumentUrl:c}=t;return{viewDocumentUrl:c}},[t]);return f.jsx("div",{className:"h-full w-full",children:f.jsxs("div",{className:"max-w-[56rem] mx-auto",children:[f.jsx(de,{show:!r,children:f.jsx(pr,{should_onboard:o,overallCollectionCount:(e==null?void 0:e.length)??0,hasLoaded:s,resource:a})}),f.jsx(de,{show:r,children:r==null?void 0:r.toString()}),f.jsx("div",{className:`w-full rounded-md overflow-hidden border
721
721
  shelf-border-color shadow-md mt-5
722
722
  dark:shadow-slate-900`,children:f.jsx(de,{show:!r&&(e==null?void 0:e.length),children:f.jsx(hr,{context:l,data:e,fields:Mpe})})})]})})},Lpe={name:"Root",comp:He,comp_params:{className:"w-full lg:w-[35rem] flex flex-col gap-5"},fields:[{key:"handle",name:"Handle",type:"text",validate:!1,editable:!0,comp:Q(Xt,{},!0,!0),comp_params:{className:"w-full"}},{key:"info",comp:He,comp_params:{className:"flex flex-col gap-5 w-full"},fields:[{key:"name",name:"Name",type:"text",validate:!1,editable:!0,comp:Q(Xt),comp_params:{className:"w-full"}},{key:"description",name:"Description",comp:Q(Xt),comp_params:{className:"w-full"}},{key:"url",name:"URL",type:"text",validate:!1,editable:!0,comp:Q(Xt),comp_params:{className:"w-full"}}]}]},Ppe={name:"Root2",comp:He,comp_params:{className:"w-full lg:w-[19rem] flex flex-col gap-5"},fields:[{key:"config",name:"Config",desc:"RAW Config JSON data",comp:Q(zv,{name:"tomer"},!0,!0),comp_params:{className:"w-full"}}]},Rpe={name:"Root",comp:He,comp_params:{className:"w-full items-center lg:max-w-max lg:items-start lg:w-fit flex flex-col lg:flex-row gap-5 mx-auto"},fields:[Lpe,Ppe]},jpe=({className:t,...e})=>f.jsx("img",{className:"rounded-md object-cover border dark:opacity-80 "+t,...e}),Fpe=({})=>{var c,u;const{id:t}=fr(),{context:e,key:n,doc:r,loading:i,hasLoaded:s,error:a,ref_root:o}=mi("payments/gateways",t,"/pages/payment-gateways"),l=(c=r==null?void 0:r.info)==null?void 0:c.logo_url;return f.jsxs("div",{className:"w-full lg:min-w-fit mx-auto",children:[f.jsxs("div",{className:"flex flex-col --justify-between --h-full",children:[f.jsx("span",{children:"Payment Gateway",className:"text-3xl text-black dark:text-gray-300"}),f.jsxs("div",{className:"flex flex-row items-center gap-2 h-20",children:[f.jsx(jpe,{src:l??mg,className:"w-8 h-8"}),f.jsx("span",{children:(u=r==null?void 0:r.info)==null?void 0:u.name,className:"text-3xl text-gray-500 tracking-wide"})]})]}),f.jsx(Ct,{className:"mt-5"}),f.jsxs(de,{show:s,children:[f.jsx(Hr,{error:a,className:"w-full max-w-[35rem] mx-auto"}),f.jsx(ci,{ref:o,field:Rpe,value:r??{},context:e,isViewMode:!1,className:"mx-auto"},n)]})]})},Bpe=({value:t,children:e,className:n,context:r,extra:i="max-w-[8rem] md:max-w-[18rem]",...s})=>{var l,c,u,d;(c=(l=r.item)==null?void 0:l.info)==null||c.logo_url;const o=`overflow-x-auto flex flex-row items-center gap-2 inline-block whitespace-nowrap ${n} ${i}`;return f.jsxs("div",{className:o,...s,children:[f.jsx("img",{src:((d=(u=r==null?void 0:r.item)==null?void 0:u.info)==null?void 0:d.logo_url)??mg,className:"rounded-md w-6 h-6 object-cover border dark:opacity-80"}),f.jsx("div",{children:t??e})]})},Hpe=[{key:"info.name",name:"Name",comp:Bpe,comp_params:{className:"font-semibold",extra:"max-w-[10rem] md:max-w-[18rem]"}},{key:"handle",name:"Handle",comp:zt,comp_params:{className:"font-semibold",extra:"max-w-[10rem] md:max-w-[18rem]"}},{key:void 0,name:"Actions",comp:Fr,comp_params:{className:""}}],zpe=({})=>{const{context:t,page:e,loading:n,error:r,queryCount:i,hasLoaded:s,resource:a,resource_is_probably_empty:o}=Br("extensions","/apps/extensions"),l=_.useMemo(()=>{const{viewDocumentUrl:c}=t;return{viewDocumentUrl:c}},[t]);return f.jsx("div",{className:"h-full w-full",children:f.jsxs("div",{className:"max-w-[56rem] mx-auto",children:[f.jsx(pr,{should_onboard:o,overallCollectionCount:(e==null?void 0:e.length)??0,hasLoaded:s,resource:a}),f.jsx(de,{show:r,children:r==null?void 0:r.toString()}),f.jsx(de,{show:!r&&e,children:f.jsx("div",{className:`w-full rounded-md overflow-hidden border
723
723
  shelf-border-color shadow-md mt-5