@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.
@@ -141,7 +141,7 @@ Please report this to https://github.com/markedjs/marked.`,e){const s="<p>An err
141
141
  text-gray-600 dark:text-gray-400
142
142
  text-base font-semibold tracking-tight`,loading:c,onClick:d,...l})}):null},Gn=({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(lt,{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
143
143
  rounded-md shelf-button-color-soft
144
- whitespace-nowrap ${o}`,children:i??s,...l})}),TR=({from:t,to:e,rounded:n="rounded-lg",stroke:r,...i})=>f.jsx(lt,{from:t,to:e,rounded:n,stroke:r,className:"w-fit h-fit",children:f.jsx(kR,{...i})}),N1=({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})]})},ob="3.7.7",SR=ob,bc=typeof Buffer=="function",lb=typeof TextDecoder=="function"?new TextDecoder:void 0,cb=typeof TextEncoder=="function"?new TextEncoder:void 0,A1=Array.prototype.slice.call("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="),dp=(t=>{let e={};return t.forEach((n,r)=>e[n]=r),e})(A1),NR=/^(?:[A-Za-z\d+\/]{4})*?(?:[A-Za-z\d+\/]{2}(?:==)?|[A-Za-z\d+\/]{3}=?)?$/,En=String.fromCharCode.bind(String),ub=typeof Uint8Array.from=="function"?Uint8Array.from.bind(Uint8Array):t=>new Uint8Array(Array.prototype.slice.call(t,0)),db=t=>t.replace(/=/g,"").replace(/[+\/]/g,e=>e=="+"?"-":"_"),fb=t=>t.replace(/[^A-Za-z0-9\+\/]/g,""),hb=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+=A1[e>>18&63]+A1[e>>12&63]+A1[e>>6&63]+A1[e&63]}return a?s.slice(0,a-3)+"===".substring(a):s},X5=typeof btoa=="function"?t=>btoa(t):bc?t=>Buffer.from(t,"binary").toString("base64"):hb,J5=bc?t=>Buffer.from(t).toString("base64"):t=>{let n=[];for(let r=0,i=t.length;r<i;r+=4096)n.push(En.apply(null,t.subarray(r,r+4096)));return X5(n.join(""))},fp=(t,e=!1)=>e?db(J5(t)):J5(t),AR=t=>{if(t.length<2){var e=t.charCodeAt(0);return e<128?t:e<2048?En(192|e>>>6)+En(128|e&63):En(224|e>>>12&15)+En(128|e>>>6&63)+En(128|e&63)}else{var e=65536+(t.charCodeAt(0)-55296)*1024+(t.charCodeAt(1)-56320);return En(240|e>>>18&7)+En(128|e>>>12&63)+En(128|e>>>6&63)+En(128|e&63)}},DR=/[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g,pb=t=>t.replace(DR,AR),mb=bc?t=>Buffer.from(t,"utf8").toString("base64"):cb?t=>J5(cb.encode(t)):t=>X5(pb(t)),wc=(t,e=!1)=>e?db(mb(t)):mb(t),gb=t=>wc(t,!0),OR=/[\xC0-\xDF][\x80-\xBF]|[\xE0-\xEF][\x80-\xBF]{2}|[\xF0-\xF7][\x80-\xBF]{3}/g,MR=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 En((n>>>10)+55296)+En((n&1023)+56320);case 3:return En((15&t.charCodeAt(0))<<12|(63&t.charCodeAt(1))<<6|63&t.charCodeAt(2));default:return En((31&t.charCodeAt(0))<<6|63&t.charCodeAt(1))}},yb=t=>t.replace(OR,MR),vb=t=>{if(t=t.replace(/\s+/g,""),!NR.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=dp[t.charAt(s++)]<<18|dp[t.charAt(s++)]<<12|(r=dp[t.charAt(s++)])<<6|(i=dp[t.charAt(s++)]),n+=r===64?En(e>>16&255):i===64?En(e>>16&255,e>>8&255):En(e>>16&255,e>>8&255,e&255);return n},e4=typeof atob=="function"?t=>atob(fb(t)):bc?t=>Buffer.from(t,"base64").toString("binary"):vb,xb=bc?t=>ub(Buffer.from(t,"base64")):t=>ub(e4(t).split("").map(e=>e.charCodeAt(0))),_b=t=>xb(bb(t)),IR=bc?t=>Buffer.from(t,"base64").toString("utf8"):lb?t=>lb.decode(xb(t)):t=>yb(e4(t)),bb=t=>fb(t.replace(/[-_]/g,e=>e=="-"?"+":"/")),t4=t=>IR(bb(t)),LR=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)},wb=t=>({value:t,enumerable:!1,writable:!0,configurable:!0}),Eb=function(){const t=(e,n)=>Object.defineProperty(String.prototype,e,wb(n));t("fromBase64",function(){return t4(this)}),t("toBase64",function(e){return wc(this,e)}),t("toBase64URI",function(){return wc(this,!0)}),t("toBase64URL",function(){return wc(this,!0)}),t("toUint8Array",function(){return _b(this)})},kb=function(){const t=(e,n)=>Object.defineProperty(Uint8Array.prototype,e,wb(n));t("toBase64",function(e){return fp(this,e)}),t("toBase64URI",function(){return fp(this,!0)}),t("toBase64URL",function(){return fp(this,!0)})},PR={version:ob,VERSION:SR,atob:e4,atobPolyfill:vb,btoa:X5,btoaPolyfill:hb,fromBase64:t4,toBase64:wc,encode:wc,encodeURI:gb,encodeURL:gb,utob:pb,btou:yb,decode:t4,isValid:LR,fromUint8Array:fp,toUint8Array:_b,extendString:Eb,extendUint8Array:kb,extendBuiltins:()=>{Eb(),kb()}},Cb=t=>t.toLowerCase().split(" ").join("-"),n4=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},r4=async t=>{try{await navigator.clipboard.writeText(t),console.log("Content copied to clipboard")}catch(e){console.error("Failed to copy: ",e)}},Tb=()=>"maxTouchPoints"in navigator?navigator.maxTouchPoints>0:!1,RR=t=>JSON.parse(PR.decode(decodeURIComponent(t)));var hp=wn.GenIcon,jR=function(e){return hp({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)},FR=function(e){return hp({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)},BR=function(e){return hp({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{d:"M3 13H11V3H3V13ZM3 21H11V15H3V21ZM13 21H21V11H13V21ZM13 3V9H21V3H13Z"}}]})(e)},HR=function(e){return hp({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)},pp=wn.GenIcon,zR=function(e){return pp({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)},UR=function(e){return pp({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)},$R=function(e){return pp({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)},VR=function(e){return pp({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 YR={name:"@storecraft/dashboard",version:"1.0.13",description:"Storecraft Official Dashboard",license:"MIT",author:"Tomer Shalev (https://github.com/store-craft)",homepage:"https://github.com/store-craft/storecraft",repository:{type:"git",url:"https://github.com/store-craft/storecraft.git",directory:"packages/dashboard"},keywords:["commerce","dashboard","react","storecraft"],type:"module",module:"./src/index.jsx",exports:{".":{import:"./dist/lib/index.js",require:"./dist/lib/index.umd.cjs",types:"./dist/lib/src/index.d.ts"}},scripts:{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"},dependencies:{"@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"},devDependencies:{"@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"},files:["dist"]},WR="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAD4AAAA9CAYAAAD1VdrqAAAAAXNSR0IB2cksfwAAAAlwSFlzAAALEwAACxMBAJqcGAAAGJhJREFUeJzlOwmYXEWZf9V7r+/p6ZmeycxkkplJyIRcJCbhygFyHyqnsKgICyYgsIKurqirn4uCH3gsuwt8uPst64qfLrriwSEYXYEoIkeQKxByTJK5JzM9ffe7X9X+Ve+9np4k4OfuurrZ6unp1/XqVdV/H/W3CkG79sxPX8+rymZFU5KEEIUAvgihgJ8A/hf/AhuXf/71zF1S7yLhHS6bnIeTcCyQYBbO5VzMf4QQxpjHPO64jmtP6Ptr03yIEaqomqpGxJ7EOEVRIpRSRUxBcV4xB6HiM5hNzo7X4gFKVXkfb3jYEk2pN3+w5TvvEvOo4d6ppS2tTjtrOLjhxoK9Ewnk4dvh75BZd3kjsA13yaFP8fA5DgnohIJXhCrP4x3zkKGk4Uvj9eH2xoPLdqJ4YV8dcMIQiRz7SUDOw059MKAHb76x8ZD8DY/VGac+HZ+5U39KXCn4mqsshRG2HXReBNI4mB+0LmmY8G0aAVq/loDfcOqX/tqteuf5myQN25i9ydkXhwOaH/SNNwwNGbyR4nw2tXhdVuQrgsDPpysl8DVegNm8d9DeyEF9hxlZLVXnnrHmwrvuuu+rN0nArZJztV12+sIF3xqwxoXIQYvOAHPI1mZRaAY0fsga5JD/Go9CF10Go952MElpZsGQKw+7zcNzhFEzE6bu3IgdN6lbPz/+0W3Pb+v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ULNFpkRVBgeC4ri8UPoAdxwXJO5slbTqbUyNQyQmEwbSVHEZ4lDJBdFZA7NBZ+p/F8f0eDkJ+Qmsbco9kSE64p7YcixLu7Pcu0O0zU7gIpyMRRbooKtux3/CRMitNFcerR3AAAAAElFTkSuQmCC",GR=({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);"})]})]}),Sb=({className:t})=>f.jsx(GR,{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)"})]})})}),KR=({...t})=>{const e=({})=>f.jsxs("div",{className:`rounded-lg my-auto b
144
+ whitespace-nowrap ${o}`,children:i??s,...l})}),TR=({from:t,to:e,rounded:n="rounded-lg",stroke:r,...i})=>f.jsx(lt,{from:t,to:e,rounded:n,stroke:r,className:"w-fit h-fit",children:f.jsx(kR,{...i})}),N1=({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})]})},ob="3.7.7",SR=ob,bc=typeof Buffer=="function",lb=typeof TextDecoder=="function"?new TextDecoder:void 0,cb=typeof TextEncoder=="function"?new TextEncoder:void 0,A1=Array.prototype.slice.call("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="),dp=(t=>{let e={};return t.forEach((n,r)=>e[n]=r),e})(A1),NR=/^(?:[A-Za-z\d+\/]{4})*?(?:[A-Za-z\d+\/]{2}(?:==)?|[A-Za-z\d+\/]{3}=?)?$/,En=String.fromCharCode.bind(String),ub=typeof Uint8Array.from=="function"?Uint8Array.from.bind(Uint8Array):t=>new Uint8Array(Array.prototype.slice.call(t,0)),db=t=>t.replace(/=/g,"").replace(/[+\/]/g,e=>e=="+"?"-":"_"),fb=t=>t.replace(/[^A-Za-z0-9\+\/]/g,""),hb=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+=A1[e>>18&63]+A1[e>>12&63]+A1[e>>6&63]+A1[e&63]}return a?s.slice(0,a-3)+"===".substring(a):s},X5=typeof btoa=="function"?t=>btoa(t):bc?t=>Buffer.from(t,"binary").toString("base64"):hb,J5=bc?t=>Buffer.from(t).toString("base64"):t=>{let n=[];for(let r=0,i=t.length;r<i;r+=4096)n.push(En.apply(null,t.subarray(r,r+4096)));return X5(n.join(""))},fp=(t,e=!1)=>e?db(J5(t)):J5(t),AR=t=>{if(t.length<2){var e=t.charCodeAt(0);return e<128?t:e<2048?En(192|e>>>6)+En(128|e&63):En(224|e>>>12&15)+En(128|e>>>6&63)+En(128|e&63)}else{var e=65536+(t.charCodeAt(0)-55296)*1024+(t.charCodeAt(1)-56320);return En(240|e>>>18&7)+En(128|e>>>12&63)+En(128|e>>>6&63)+En(128|e&63)}},DR=/[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g,pb=t=>t.replace(DR,AR),mb=bc?t=>Buffer.from(t,"utf8").toString("base64"):cb?t=>J5(cb.encode(t)):t=>X5(pb(t)),wc=(t,e=!1)=>e?db(mb(t)):mb(t),gb=t=>wc(t,!0),OR=/[\xC0-\xDF][\x80-\xBF]|[\xE0-\xEF][\x80-\xBF]{2}|[\xF0-\xF7][\x80-\xBF]{3}/g,MR=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 En((n>>>10)+55296)+En((n&1023)+56320);case 3:return En((15&t.charCodeAt(0))<<12|(63&t.charCodeAt(1))<<6|63&t.charCodeAt(2));default:return En((31&t.charCodeAt(0))<<6|63&t.charCodeAt(1))}},yb=t=>t.replace(OR,MR),vb=t=>{if(t=t.replace(/\s+/g,""),!NR.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=dp[t.charAt(s++)]<<18|dp[t.charAt(s++)]<<12|(r=dp[t.charAt(s++)])<<6|(i=dp[t.charAt(s++)]),n+=r===64?En(e>>16&255):i===64?En(e>>16&255,e>>8&255):En(e>>16&255,e>>8&255,e&255);return n},e4=typeof atob=="function"?t=>atob(fb(t)):bc?t=>Buffer.from(t,"base64").toString("binary"):vb,xb=bc?t=>ub(Buffer.from(t,"base64")):t=>ub(e4(t).split("").map(e=>e.charCodeAt(0))),_b=t=>xb(bb(t)),IR=bc?t=>Buffer.from(t,"base64").toString("utf8"):lb?t=>lb.decode(xb(t)):t=>yb(e4(t)),bb=t=>fb(t.replace(/[-_]/g,e=>e=="-"?"+":"/")),t4=t=>IR(bb(t)),LR=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)},wb=t=>({value:t,enumerable:!1,writable:!0,configurable:!0}),Eb=function(){const t=(e,n)=>Object.defineProperty(String.prototype,e,wb(n));t("fromBase64",function(){return t4(this)}),t("toBase64",function(e){return wc(this,e)}),t("toBase64URI",function(){return wc(this,!0)}),t("toBase64URL",function(){return wc(this,!0)}),t("toUint8Array",function(){return _b(this)})},kb=function(){const t=(e,n)=>Object.defineProperty(Uint8Array.prototype,e,wb(n));t("toBase64",function(e){return fp(this,e)}),t("toBase64URI",function(){return fp(this,!0)}),t("toBase64URL",function(){return fp(this,!0)})},PR={version:ob,VERSION:SR,atob:e4,atobPolyfill:vb,btoa:X5,btoaPolyfill:hb,fromBase64:t4,toBase64:wc,encode:wc,encodeURI:gb,encodeURL:gb,utob:pb,btou:yb,decode:t4,isValid:LR,fromUint8Array:fp,toUint8Array:_b,extendString:Eb,extendUint8Array:kb,extendBuiltins:()=>{Eb(),kb()}},Cb=t=>t.toLowerCase().split(" ").join("-"),n4=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},r4=async t=>{try{await navigator.clipboard.writeText(t),console.log("Content copied to clipboard")}catch(e){console.error("Failed to copy: ",e)}},Tb=()=>"maxTouchPoints"in navigator?navigator.maxTouchPoints>0:!1,RR=t=>JSON.parse(PR.decode(decodeURIComponent(t)));var hp=wn.GenIcon,jR=function(e){return hp({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)},FR=function(e){return hp({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)},BR=function(e){return hp({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{d:"M3 13H11V3H3V13ZM3 21H11V15H3V21ZM13 21H21V11H13V21ZM13 3V9H21V3H13Z"}}]})(e)},HR=function(e){return hp({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)},pp=wn.GenIcon,zR=function(e){return pp({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)},UR=function(e){return pp({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)},$R=function(e){return pp({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)},VR=function(e){return pp({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 YR={name:"@storecraft/dashboard",version:"1.0.15",description:"Storecraft Official Dashboard",license:"MIT",author:"Tomer Shalev (https://github.com/store-craft)",homepage:"https://github.com/store-craft/storecraft",repository:{type:"git",url:"https://github.com/store-craft/storecraft.git",directory:"packages/dashboard"},keywords:["commerce","dashboard","react","storecraft"],type:"module",module:"./src/index.jsx",exports:{".":{import:"./dist/lib/index.js",require:"./dist/lib/index.umd.cjs",types:"./dist/lib/src/index.d.ts"}},scripts:{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"},dependencies:{"@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"},devDependencies:{"@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"},files:["dist"]},WR="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAD4AAAA9CAYAAAD1VdrqAAAAAXNSR0IB2cksfwAAAAlwSFlzAAALEwAACxMBAJqcGAAAGJhJREFUeJzlOwmYXEWZf9V7r+/p6ZmeycxkkplJyIRcJCbhygFyHyqnsKgICyYgsIKurqirn4uCH3gsuwt8uPst64qfLrriwSEYXYEoIkeQKxByTJK5JzM9ffe7X9X+Ve+9np4k4OfuurrZ6unp1/XqVdV/H/W3CkG79sxPX8+rymZFU5KEEIUAvgihgJ8A/hf/AhuXf/71zF1S7yLhHS6bnIeTcCyQYBbO5VzMf4QQxpjHPO64jmtP6Ptr03yIEaqomqpGxJ7EOEVRIpRSRUxBcV4xB6HiM5hNzo7X4gFKVXkfb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zd+bUDO/3qJ8/xOUVarKDYb6ZIzz8QqaElMtF6OOJ3K0xGY8VGoP1nOKhP3Tr6/bG9uThv5ZCJNX//wys+aY0M1tqYWYHEfotBcj6VVRfoLjJLg1p2IXioYVpbRR0aorm3B7LtS+AG5wxIxZqhDKj9jzsWlqNSOyFj4yYtaNbiEMM5unuWQMY5DSUnClUHpZxod26/1R5jNUf3uPuAKD3Zcs0+RCBTaYTEUe03OS/n2qhdwGAjLrWxJ/JUwQ92aODwSFlGJWghoJk4Ir1LFAtFwGmPIy0Wn3bJoueeKzhlQFuzzOYO2NubH1AVph7dFmuP+HUpzipRU6bSOOTyiJgSShZJypoxHrz9ZBQG81NCqLXgl1AJ6YFMWwFWFXxGTULNFpkRVBgeC4ri8UPoAdxwXJO5slbTqbUyNQyQmEwbSVHEZ4lDJBdFZA7NBZ+p/F8f0eDkJ+Qmsbco9kSE64p7YcixLu7Pcu0O0zU7gIpyMRRbooKtux3/CRMitNFcerR3AAAAAElFTkSuQmCC",GR=({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);"})]})]}),Sb=({className:t})=>f.jsx(GR,{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)"})]})})}),KR=({...t})=>{const e=({})=>f.jsxs("div",{className:`rounded-lg my-auto b
145
145
  bg-pink-50 dark:bg-pink-50/10 w-fit text-sm
146
146
  text-pink-500 -tracking-wideset
147
147
  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
@@ -168,7 +168,7 @@ Please report this to https://github.com/markedjs/marked.`,e){const s="<p>An err
168
168
  `+l+` |
169
169
  `+s.line+" | "+c+`
170
170
  `+l+" | "+i4("",i.column-1," ")+i4("",d,"^")}else e+=`
171
- at `+a}return e},kc.buildMessage=function(t,e){var n={literal:function(c){return'"'+i(c.text)+'"'},class:function(c){var u=c.parts.map(function(d){return Array.isArray(d)?s(d[0])+"-"+s(d[1]):s(d)});return"["+(c.inverted?"^":"")+u.join("")+"]"},any:function(){return"any character"},end:function(){return"end of input"},other:function(c){return c.description}};function r(c){return c.charCodeAt(0).toString(16).toUpperCase()}function i(c){return c.replace(/\\/g,"\\\\").replace(/"/g,'\\"').replace(/\0/g,"\\0").replace(/\t/g,"\\t").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/[\x00-\x0F]/g,function(u){return"\\x0"+r(u)}).replace(/[\x10-\x1F\x7F-\x9F]/g,function(u){return"\\x"+r(u)})}function s(c){return c.replace(/\\/g,"\\\\").replace(/\]/g,"\\]").replace(/\^/g,"\\^").replace(/-/g,"\\-").replace(/\0/g,"\\0").replace(/\t/g,"\\t").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/[\x00-\x0F]/g,function(u){return"\\x0"+r(u)}).replace(/[\x10-\x1F\x7F-\x9F]/g,function(u){return"\\x"+r(u)})}function a(c){return n[c.type](c)}function o(c){var u=c.map(a),d,h;if(u.sort(),u.length>0){for(d=1,h=1;d<u.length;d++)u[d-1]!==u[d]&&(u[h]=u[d],h++);u.length=h}switch(u.length){case 1:return u[0];case 2:return u[0]+" or "+u[1];default:return u.slice(0,-1).join(", ")+", or "+u[u.length-1]}}function l(c){return c?'"'+i(c)+'"':"end of input"}return"Expected "+o(t)+" but "+l(e)+" found."};function nj(t,e){e=e!==void 0?e:{};var n={},r=e.grammarSource,i={expression:tr},s=tr,a="|",o="-",l="(",c=")",u="'",d='"',h=/^[^"' ()|&]/,p=/^[^']/,m=/^[^"]/,g=/^[ ]/,y=Fe("expression"),v=Fe("sum term"),x=An("|",!1),b=Fe("product term"),w=An("&",!1),C=Fe("subexpression"),S=An("-",!1),k=Fe("term"),N=An("(",!1),D=An(")",!1),A=Fe("variable"),L=vr(['"',"'"," ","(",")","|","&"],!0,!1),$=Fe("variable 1"),K=An("'",!1),X=vr(["'"],!0,!1),H=An('"',!1),U=vr(['"'],!0,!1),G=Fe("whitespace character(s)"),R=vr([" "],!1,!1),z=function(Y,te){return Ab("|",Y,te)},O=function(Y,te){return Ab("&",Y,te)},W=function(Y){return{op:"!",args:[Y]}},Z=function(Y){return Y.group=!0,Y},I=function(Y){return{op:"LEAF",value:vi().trim()}},se=function(Y){return{op:"LEAF",value:vi().trim().slice(1,-1)}},V=0,ce=0,De=[{line:1,column:1}],we=0,Ne=[],ve=0,qt;if("startRule"in e){if(!(e.startRule in i))throw new Error(`Can't start parsing from rule "`+e.startRule+'".');s=i[e.startRule]}function vi(){return t.substring(ce,V)}function An(Y,te){return{type:"literal",text:Y,ignoreCase:te}}function vr(Y,te,ue){return{type:"class",parts:Y,inverted:te,ignoreCase:ue}}function Ps(){return{type:"end"}}function Fe(Y){return{type:"other",description:Y}}function xi(Y){var te=De[Y],ue;if(te)return te;for(ue=Y-1;!De[ue];)ue--;for(te=De[ue],te={line:te.line,column:te.column};ue<Y;)t.charCodeAt(ue)===10?(te.line++,te.column=1):te.column++,ue++;return De[Y]=te,te}function Dn(Y,te,ue){var st=xi(Y),tt=xi(te),qi={source:r,start:{offset:Y,line:st.line,column:st.column},end:{offset:te,line:tt.line,column:tt.column}};return qi}function Ue(Y){V<we||(V>we&&(we=V,Ne=[]),Ne.push(Y))}function er(Y,te,ue){return new kc(kc.buildMessage(Y,te),Y,te,ue)}function tr(){var Y;return ve++,Y=Ul(),ve--,Y===n&&ve===0&&Ue(y),Y}function Ul(){var Y,te,ue,st;return ve++,Y=V,te=Mo(),te!==n?(t.charCodeAt(V)===124?(ue=a,V++):(ue=n,ve===0&&Ue(x)),ue!==n?(st=Ul(),st!==n?(ce=Y,Y=z(te,st)):(V=Y,Y=n)):(V=Y,Y=n)):(V=Y,Y=n),Y===n&&(Y=Mo()),ve--,Y===n&&(te=n,ve===0&&Ue(v)),Y}function Mo(){var Y,te,ue;return ve++,Y=V,te=Io(),te!==n?(t.charCodeAt(V)===38?V++:ve===0&&Ue(w),ue=Mo(),ue!==n?(ce=Y,Y=O(te,ue)):(V=Y,Y=n)):(V=Y,Y=n),Y===n&&(Y=Io()),ve--,Y===n&&(te=n,ve===0&&Ue(b)),Y}function Io(){var Y,te,ue;return ve++,Y=V,ne(),t.charCodeAt(V)===45?(te=o,V++):(te=n,ve===0&&Ue(S)),te!==n?(ue=$l(),ue!==n?(ne(),ce=Y,Y=W(ue)):(V=Y,Y=n)):(V=Y,Y=n),Y===n&&(Y=$l()),ve--,Y===n&&ve===0&&Ue(C),Y}function $l(){var Y,te,ue,st;return ve++,Y=q(),Y===n&&(Y=Mu()),Y===n&&(Y=V,ne(),t.charCodeAt(V)===40?(te=l,V++):(te=n,ve===0&&Ue(N)),te!==n?(ue=tr(),ue!==n?(t.charCodeAt(V)===41?(st=c,V++):(st=n,ve===0&&Ue(D)),st!==n?(ne(),ce=Y,Y=Z(ue)):(V=Y,Y=n)):(V=Y,Y=n)):(V=Y,Y=n)),ve--,Y===n&&ve===0&&Ue(k),Y}function Mu(){var Y,te,ue;if(ve++,Y=V,ne(),te=[],h.test(t.charAt(V))?(ue=t.charAt(V),V++):(ue=n,ve===0&&Ue(L)),ue!==n)for(;ue!==n;)te.push(ue),h.test(t.charAt(V))?(ue=t.charAt(V),V++):(ue=n,ve===0&&Ue(L));else te=n;return te!==n?(ue=ne(),ce=Y,Y=I()):(V=Y,Y=n),ve--,Y===n&&ve===0&&Ue(A),Y}function q(){var Y,te,ue,st,tt;if(ve++,Y=V,ne(),te=V,t.charCodeAt(V)===39?(ue=u,V++):(ue=n,ve===0&&Ue(K)),ue!==n){if(st=[],p.test(t.charAt(V))?(tt=t.charAt(V),V++):(tt=n,ve===0&&Ue(X)),tt!==n)for(;tt!==n;)st.push(tt),p.test(t.charAt(V))?(tt=t.charAt(V),V++):(tt=n,ve===0&&Ue(X));else st=n;st!==n?(t.charCodeAt(V)===39?(tt=u,V++):(tt=n,ve===0&&Ue(K)),tt!==n?(ue=[ue,st,tt],te=ue):(V=te,te=n)):(V=te,te=n)}else V=te,te=n;if(te===n)if(te=V,t.charCodeAt(V)===34?(ue=d,V++):(ue=n,ve===0&&Ue(H)),ue!==n){if(st=[],m.test(t.charAt(V))?(tt=t.charAt(V),V++):(tt=n,ve===0&&Ue(U)),tt!==n)for(;tt!==n;)st.push(tt),m.test(t.charAt(V))?(tt=t.charAt(V),V++):(tt=n,ve===0&&Ue(U));else st=n;st!==n?(t.charCodeAt(V)===34?(tt=d,V++):(tt=n,ve===0&&Ue(H)),tt!==n?(ue=[ue,st,tt],te=ue):(V=te,te=n)):(V=te,te=n)}else V=te,te=n;return te!==n?(ue=ne(),ce=Y,Y=se()):(V=Y,Y=n),ve--,Y===n&&ve===0&&Ue($),Y}function ne(){var Y,te;for(ve++,Y=[],g.test(t.charAt(V))?(te=t.charAt(V),V++):(te=n,ve===0&&Ue(R));te!==n;)Y.push(te),g.test(t.charAt(V))?(te=t.charAt(V),V++):(te=n,ve===0&&Ue(R));return ve--,te=n,ve===0&&Ue(G),Y}if(qt=s(),qt!==n&&V===t.length)return qt;throw qt!==n&&V<t.length&&Ue(Ps()),er(Ne,we<t.length?t.charAt(we):null,we<t.length?Dn(we,we+1):Dn(we,we))}class rj extends Error{constructor(e,n=400){super(JSON.stringify(e,null,2)),this.code=n,this.message=e;try{this.message_string=JSON.stringify(this.message,null,2)}catch{this.message_string=":("}}toString(){return this.message_string}}const mp=(t,e,n=400)=>{if(!t)throw new rj([{message:e}],n)},ij=(t,e="-")=>{if(typeof t!="string")return;let n=t.trim();if(n!==""&&(n=n.toLowerCase().match(/[\p{L}\d]+/gu).join(e),n.length!=0))return n},Db="sortBy",Ob="order",s4="limit",a4="limitToLast",o4="vql",Mb="startAt",Ib="startAfter",Lb="endAt",Pb="endBefore",Rb="expand",gp=(t="")=>{if(!t)return;const e=/(^[^\w]+)/g,n=/([^\w]+$)/g;let r=t.match(e),i=t.match(n),s=t.substring((r==null?void 0:r[0].length)??0);if(s=s.substring(0,s.length-((i==null?void 0:i[0].length)??0)),s!=="")return s.split(",").map(a=>{const o=a.split(":");return[o[0].trim(),o.slice(1).join(":").trim()]})},sj=(t,e=["*"])=>{var n,r;return((r=(n=t.get(Rb))==null?void 0:n.replace(/[()]/g,"").split(","))==null?void 0:r.map(i=>i.trim()).filter(Boolean))??e},aj=t=>(t??"(updated_at, id)").replace(/[()]/g,"").split(",").map(e=>e.trim()).filter(Boolean),oj=(t="desc")=>t==="asc"?"asc":"desc",lj=t=>{t=t instanceof URLSearchParams?t:new URLSearchParams(t);const e={};e.expand=sj(t),e.limit=parseInt(t.get(s4))?Math.abs(parseInt(t.get(s4))):void 0,e.limitToLast=parseInt(t.get(a4))?Math.abs(parseInt(t.get(a4))):void 0,!e.limitToLast&&!e.limit&&(e.limit=5);try{const a=t.get(o4);a&&(e.vqlParsed=nj(a))}catch(a){console.log(a),mp(!1,"VQL parsing failed",401)}e.vql=t.get(o4),e.startAt=gp(t.get(Mb)),e.startAfter=gp(t.get(Ib)),mp(!(e.startAt&&e.startAfter),"Cannot set both startAt and startAfter",401),e.endAt=gp(t.get(Lb)),e.endBefore=gp(t.get(Pb)),mp(!(e.endAt&&e.endBefore),"Cannot set both endAt and endAfter",401);const n=e.startAt||e.startAfter,r=e.endAt||e.endBefore,i=((n==null?void 0:n.length)??0)<((r==null?void 0:r.length)??0)?n:r,s=i===n?r:n;if(n&&r)for(let a=0;a<i.length;a++){const o=i[a][0],l=s[a][0];mp(o===l,`non matching keys \`${o}\`!==\`${l}\` in range cursors`,401)}return e.sortBy=aj(t.get(Db)),e.order=oj(t.get(Ob)),s&&(s!=null&&s.length)&&(e.sortBy=s.map(([a,o],l)=>a)),e},l4=t=>"("+t.join(",")+")",cj=t=>{const e=t.map(n=>`${n[0]}:${n[1]}`);return l4(e)},os=t=>{const e=new URLSearchParams;return t.order=(t==null?void 0:t.order)??"desc",t.sortBy=(t==null?void 0:t.sortBy)??["updated_at","id"],t.expand=(t==null?void 0:t.expand)??["*"],!t.limit&&!t.limitToLast&&(t.limit=5),[{cursor:t.endAt,key:Lb},{cursor:t.endBefore,key:Pb},{cursor:t.startAt,key:Mb},{cursor:t.startAfter,key:Ib}].filter(n=>{var r;return!!n.cursor&&((r=n.cursor)==null?void 0:r.length)}).forEach(n=>{e.set(n.key,cj(n.cursor))}),e.set(Ob,t.order),e.set(Db,l4(t.sortBy)),e.set(Rb,l4(t.expand)),t.vql&&e.set(o4,t.vql),t.limit&&e.set(s4,t.limit.toString()),t.limitToLast&&e.set(a4,t.limitToLast.toString()),e},jb=t=>{if(typeof t!="string")return;let e=t.trim();if(e!==""&&(e=e.toLowerCase().match(/[\p{L}\d]+/gu).join("-"),e.length!=0))return e},uj=(t,e)=>{if(!t)throw e},D1=(t,e)=>{var r;let n=(r=t==null?void 0:t.endpoint)==null?void 0:r.trim();return n=n!=null&&n.endsWith("/")?n.slice(0,-1):n,e=e!=null&&e.startsWith("/")?e.slice(1):e,n?`${n}/api/${e}`:`/api/${e}`},Ga=async(t,e,n={})=>{const r=await t.auth.working_auth_token(),i=(t.auth.authStrategy==="apikey"?"Basic":"Bearer")+` ${r}`;return await fetch(D1(t.config,e),{...n,headers:{...(n==null?void 0:n.headers)??{},Authorization:i}})},sn=async(t,e,n={})=>{const r=await Ga(t,e,n),i=r.ok;let s;try{s=await r.json()}catch(a){console.log("fetchApiWithAuth.json()",a)}if(!i)throw s;return s};async function el(t,e,n){return sn(t,`${e}/${n}`,{method:"get"})}async function Fb(t,e,n){return sn(t,`${e}`,{method:"post",body:JSON.stringify(n),headers:{"Content-Type":"application/json"}})}async function c4(t,e,n){return sn(t,`${e}/${n}`,{method:"delete"})}async function yp(t,e,n={}){const r=os(n);return sn(t,`${e}?${r.toString()}`,{method:"get"})}class Tr{constructor(e,n){_i(this,Of);_i(this,Mf);Lo(this,Of,e),Lo(this,Mf,n)}async get(e){return el(this.sdk,this.base_name,e)}async upsert(e){return Fb(this.sdk,this.base_name,e)}async remove(e){return c4(this.sdk,this.base_name,e)}async list(e){return yp(this.sdk,this.base_name,e)}get base_name(){return ft(this,Mf)}get sdk(){return ft(this,Of)}}Of=new WeakMap,Mf=new WeakMap,typeof TextDecoder=="function"&&new TextDecoder,typeof TextEncoder=="function"&&new TextEncoder;const dj=Array.prototype.slice.call("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=");(t=>{let e={};return t.forEach((n,r)=>e[n]=r),e})(dj),String.fromCharCode.bind(String),typeof Uint8Array.from=="function"&&Uint8Array.from.bind(Uint8Array);var Xe;(function(t){t.assertEqual=i=>i;function e(i){}t.assertIs=e;function n(i){throw new Error}t.assertNever=n,t.arrayToEnum=i=>{const s={};for(const a of i)s[a]=a;return s},t.getValidEnumValues=i=>{const s=t.objectKeys(i).filter(o=>typeof i[i[o]]!="number"),a={};for(const o of s)a[o]=i[o];return t.objectValues(a)},t.objectValues=i=>t.objectKeys(i).map(function(s){return i[s]}),t.objectKeys=typeof Object.keys=="function"?i=>Object.keys(i):i=>{const s=[];for(const a in i)Object.prototype.hasOwnProperty.call(i,a)&&s.push(a);return s},t.find=(i,s)=>{for(const a of i)if(s(a))return a},t.isInteger=typeof Number.isInteger=="function"?i=>Number.isInteger(i):i=>typeof i=="number"&&isFinite(i)&&Math.floor(i)===i;function r(i,s=" | "){return i.map(a=>typeof a=="string"?`'${a}'`:a).join(s)}t.joinValues=r,t.jsonStringifyReplacer=(i,s)=>typeof s=="bigint"?s.toString():s})(Xe||(Xe={}));var u4;(function(t){t.mergeShapes=(e,n)=>({...e,...n})})(u4||(u4={}));const ye=Xe.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),Ka=t=>{switch(typeof t){case"undefined":return ye.undefined;case"string":return ye.string;case"number":return isNaN(t)?ye.nan:ye.number;case"boolean":return ye.boolean;case"function":return ye.function;case"bigint":return ye.bigint;case"symbol":return ye.symbol;case"object":return Array.isArray(t)?ye.array:t===null?ye.null:t.then&&typeof t.then=="function"&&t.catch&&typeof t.catch=="function"?ye.promise:typeof Map<"u"&&t instanceof Map?ye.map:typeof Set<"u"&&t instanceof Set?ye.set:typeof Date<"u"&&t instanceof Date?ye.date:ye.object;default:return ye.unknown}},ie=Xe.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]),fj=t=>JSON.stringify(t,null,2).replace(/"([^"]+)":/g,"$1:");class Sr extends Error{constructor(e){super(),this.issues=[],this.addIssue=r=>{this.issues=[...this.issues,r]},this.addIssues=(r=[])=>{this.issues=[...this.issues,...r]};const n=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,n):this.__proto__=n,this.name="ZodError",this.issues=e}get errors(){return this.issues}format(e){const n=e||function(s){return s.message},r={_errors:[]},i=s=>{for(const a of s.issues)if(a.code==="invalid_union")a.unionErrors.map(i);else if(a.code==="invalid_return_type")i(a.returnTypeError);else if(a.code==="invalid_arguments")i(a.argumentsError);else if(a.path.length===0)r._errors.push(n(a));else{let o=r,l=0;for(;l<a.path.length;){const c=a.path[l];l===a.path.length-1?(o[c]=o[c]||{_errors:[]},o[c]._errors.push(n(a))):o[c]=o[c]||{_errors:[]},o=o[c],l++}}};return i(this),r}static assert(e){if(!(e instanceof Sr))throw new Error(`Not a ZodError: ${e}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,Xe.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(e=n=>n.message){const n={},r=[];for(const i of this.issues)i.path.length>0?(n[i.path[0]]=n[i.path[0]]||[],n[i.path[0]].push(e(i))):r.push(e(i));return{formErrors:r,fieldErrors:n}}get formErrors(){return this.flatten()}}Sr.create=t=>new Sr(t);const Cc=(t,e)=>{let n;switch(t.code){case ie.invalid_type:t.received===ye.undefined?n="Required":n=`Expected ${t.expected}, received ${t.received}`;break;case ie.invalid_literal:n=`Invalid literal value, expected ${JSON.stringify(t.expected,Xe.jsonStringifyReplacer)}`;break;case ie.unrecognized_keys:n=`Unrecognized key(s) in object: ${Xe.joinValues(t.keys,", ")}`;break;case ie.invalid_union:n="Invalid input";break;case ie.invalid_union_discriminator:n=`Invalid discriminator value. Expected ${Xe.joinValues(t.options)}`;break;case ie.invalid_enum_value:n=`Invalid enum value. Expected ${Xe.joinValues(t.options)}, received '${t.received}'`;break;case ie.invalid_arguments:n="Invalid function arguments";break;case ie.invalid_return_type:n="Invalid function return type";break;case ie.invalid_date:n="Invalid date";break;case ie.invalid_string:typeof t.validation=="object"?"includes"in t.validation?(n=`Invalid input: must include "${t.validation.includes}"`,typeof t.validation.position=="number"&&(n=`${n} at one or more positions greater than or equal to ${t.validation.position}`)):"startsWith"in t.validation?n=`Invalid input: must start with "${t.validation.startsWith}"`:"endsWith"in t.validation?n=`Invalid input: must end with "${t.validation.endsWith}"`:Xe.assertNever(t.validation):t.validation!=="regex"?n=`Invalid ${t.validation}`:n="Invalid";break;case ie.too_small:t.type==="array"?n=`Array must contain ${t.exact?"exactly":t.inclusive?"at least":"more than"} ${t.minimum} element(s)`:t.type==="string"?n=`String must contain ${t.exact?"exactly":t.inclusive?"at least":"over"} ${t.minimum} character(s)`:t.type==="number"?n=`Number must be ${t.exact?"exactly equal to ":t.inclusive?"greater than or equal to ":"greater than "}${t.minimum}`:t.type==="date"?n=`Date must be ${t.exact?"exactly equal to ":t.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(t.minimum))}`:n="Invalid input";break;case ie.too_big:t.type==="array"?n=`Array must contain ${t.exact?"exactly":t.inclusive?"at most":"less than"} ${t.maximum} element(s)`:t.type==="string"?n=`String must contain ${t.exact?"exactly":t.inclusive?"at most":"under"} ${t.maximum} character(s)`:t.type==="number"?n=`Number must be ${t.exact?"exactly":t.inclusive?"less than or equal to":"less than"} ${t.maximum}`:t.type==="bigint"?n=`BigInt must be ${t.exact?"exactly":t.inclusive?"less than or equal to":"less than"} ${t.maximum}`:t.type==="date"?n=`Date must be ${t.exact?"exactly":t.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(t.maximum))}`:n="Invalid input";break;case ie.custom:n="Invalid input";break;case ie.invalid_intersection_types:n="Intersection results could not be merged";break;case ie.not_multiple_of:n=`Number must be a multiple of ${t.multipleOf}`;break;case ie.not_finite:n="Number must be finite";break;default:n=e.defaultError,Xe.assertNever(t)}return{message:n}};let Bb=Cc;function hj(t){Bb=t}function vp(){return Bb}const xp=t=>{const{data:e,path:n,errorMaps:r,issueData:i}=t,s=[...n,...i.path||[]],a={...i,path:s};if(i.message!==void 0)return{...i,path:s,message:i.message};let o="";const l=r.filter(c=>!!c).slice().reverse();for(const c of l)o=c(a,{data:e,defaultError:o}).message;return{...i,path:s,message:o}},pj=[];function me(t,e){const n=vp(),r=xp({issueData:e,data:t.data,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,n,n===Cc?void 0:Cc].filter(i=>!!i)});t.common.issues.push(r)}class Fn{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(e,n){const r=[];for(const i of n){if(i.status==="aborted")return Oe;i.status==="dirty"&&e.dirty(),r.push(i.value)}return{status:e.value,value:r}}static async mergeObjectAsync(e,n){const r=[];for(const i of n){const s=await i.key,a=await i.value;r.push({key:s,value:a})}return Fn.mergeObjectSync(e,r)}static mergeObjectSync(e,n){const r={};for(const i of n){const{key:s,value:a}=i;if(s.status==="aborted"||a.status==="aborted")return Oe;s.status==="dirty"&&e.dirty(),a.status==="dirty"&&e.dirty(),s.value!=="__proto__"&&(typeof a.value<"u"||i.alwaysSet)&&(r[s.value]=a.value)}return{status:e.value,value:r}}}const Oe=Object.freeze({status:"aborted"}),Tc=t=>({status:"dirty",value:t}),Kn=t=>({status:"valid",value:t}),d4=t=>t.status==="aborted",f4=t=>t.status==="dirty",O1=t=>t.status==="valid",M1=t=>typeof Promise<"u"&&t instanceof Promise;function _p(t,e,n,r){if(typeof e=="function"?t!==e||!r:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return e.get(t)}function Hb(t,e,n,r,i){if(typeof e=="function"?t!==e||!i:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return e.set(t,n),n}typeof SuppressedError=="function"&&SuppressedError;var ke;(function(t){t.errToObj=e=>typeof e=="string"?{message:e}:e||{},t.toString=e=>typeof e=="string"?e:e==null?void 0:e.message})(ke||(ke={}));var I1,L1;class ls{constructor(e,n,r,i){this._cachedPath=[],this.parent=e,this.data=n,this._path=r,this._key=i}get path(){return this._cachedPath.length||(this._key instanceof Array?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}}const zb=(t,e)=>{if(O1(e))return{success:!0,data:e.value};if(!t.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;const n=new Sr(t.common.issues);return this._error=n,this._error}}};function Le(t){if(!t)return{};const{errorMap:e,invalid_type_error:n,required_error:r,description:i}=t;if(e&&(n||r))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return e?{errorMap:e,description:i}:{errorMap:(a,o)=>{var l,c;const{message:u}=t;return a.code==="invalid_enum_value"?{message:u??o.defaultError}:typeof o.data>"u"?{message:(l=u??r)!==null&&l!==void 0?l:o.defaultError}:a.code!=="invalid_type"?{message:o.defaultError}:{message:(c=u??n)!==null&&c!==void 0?c:o.defaultError}},description:i}}class je{constructor(e){this.spa=this.safeParseAsync,this._def=e,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this)}get description(){return this._def.description}_getType(e){return Ka(e.data)}_getOrReturnCtx(e,n){return n||{common:e.parent.common,data:e.data,parsedType:Ka(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}_processInputParams(e){return{status:new Fn,ctx:{common:e.parent.common,data:e.data,parsedType:Ka(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}}_parseSync(e){const n=this._parse(e);if(M1(n))throw new Error("Synchronous parse encountered promise.");return n}_parseAsync(e){const n=this._parse(e);return Promise.resolve(n)}parse(e,n){const r=this.safeParse(e,n);if(r.success)return r.data;throw r.error}safeParse(e,n){var r;const i={common:{issues:[],async:(r=n==null?void 0:n.async)!==null&&r!==void 0?r:!1,contextualErrorMap:n==null?void 0:n.errorMap},path:(n==null?void 0:n.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:Ka(e)},s=this._parseSync({data:e,path:i.path,parent:i});return zb(i,s)}async parseAsync(e,n){const r=await this.safeParseAsync(e,n);if(r.success)return r.data;throw r.error}async safeParseAsync(e,n){const r={common:{issues:[],contextualErrorMap:n==null?void 0:n.errorMap,async:!0},path:(n==null?void 0:n.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:Ka(e)},i=this._parse({data:e,path:r.path,parent:r}),s=await(M1(i)?i:Promise.resolve(i));return zb(r,s)}refine(e,n){const r=i=>typeof n=="string"||typeof n>"u"?{message:n}:typeof n=="function"?n(i):n;return this._refinement((i,s)=>{const a=e(i),o=()=>s.addIssue({code:ie.custom,...r(i)});return typeof Promise<"u"&&a instanceof Promise?a.then(l=>l?!0:(o(),!1)):a?!0:(o(),!1)})}refinement(e,n){return this._refinement((r,i)=>e(r)?!0:(i.addIssue(typeof n=="function"?n(r,i):n),!1))}_refinement(e){return new Oi({schema:this,typeName:Ae.ZodEffects,effect:{type:"refinement",refinement:e}})}superRefine(e){return this._refinement(e)}optional(){return us.create(this,this._def)}nullable(){return Xa.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return Di.create(this,this._def)}promise(){return Dc.create(this,this._def)}or(e){return F1.create([this,e],this._def)}and(e){return B1.create(this,e,this._def)}transform(e){return new Oi({...Le(this._def),schema:this,typeName:Ae.ZodEffects,effect:{type:"transform",transform:e}})}default(e){const n=typeof e=="function"?e:()=>e;return new V1({...Le(this._def),innerType:this,defaultValue:n,typeName:Ae.ZodDefault})}brand(){return new m4({typeName:Ae.ZodBranded,type:this,...Le(this._def)})}catch(e){const n=typeof e=="function"?e:()=>e;return new Y1({...Le(this._def),innerType:this,catchValue:n,typeName:Ae.ZodCatch})}describe(e){const n=this.constructor;return new n({...this._def,description:e})}pipe(e){return W1.create(this,e)}readonly(){return G1.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const mj=/^c[^\s-]{8,}$/i,gj=/^[0-9a-z]+$/,yj=/^[0-9A-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-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,Ub="((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))",Tj=new RegExp(`^${Ub}$`);function $b(t){let e="([01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d";return t.precision?e=`${e}\\.\\d{${t.precision}}`:t.precision==null&&(e=`${e}(\\.\\d+)?`),e}function Sj(t){return new RegExp(`^${$b(t)}$`)}function Vb(t){let e=`${Ub}T${$b(t)}`;const n=[];return n.push(t.local?"Z?":"Z"),t.offset&&n.push("([+-]\\d{2}:?\\d{2})"),e=`${e}(${n.join("|")})`,new RegExp(`^${e}$`)}function Nj(t,e){return!!((e==="v4"||!e)&&Ej.test(t)||(e==="v6"||!e)&&kj.test(t))}class Ai extends je{_parse(e){if(this._def.coerce&&(e.data=String(e.data)),this._getType(e)!==ye.string){const s=this._getOrReturnCtx(e);return me(s,{code:ie.invalid_type,expected:ye.string,received:s.parsedType}),Oe}const r=new Fn;let i;for(const s of this._def.checks)if(s.kind==="min")e.data.length<s.value&&(i=this._getOrReturnCtx(e,i),me(i,{code:ie.too_small,minimum:s.value,type:"string",inclusive:!0,exact:!1,message:s.message}),r.dirty());else if(s.kind==="max")e.data.length>s.value&&(i=this._getOrReturnCtx(e,i),me(i,{code:ie.too_big,maximum:s.value,type:"string",inclusive:!0,exact:!1,message:s.message}),r.dirty());else if(s.kind==="length"){const a=e.data.length>s.value,o=e.data.length<s.value;(a||o)&&(i=this._getOrReturnCtx(e,i),a?me(i,{code:ie.too_big,maximum:s.value,type:"string",inclusive:!0,exact:!0,message:s.message}):o&&me(i,{code:ie.too_small,minimum:s.value,type:"string",inclusive:!0,exact:!0,message:s.message}),r.dirty())}else if(s.kind==="email")bj.test(e.data)||(i=this._getOrReturnCtx(e,i),me(i,{validation:"email",code:ie.invalid_string,message:s.message}),r.dirty());else if(s.kind==="emoji")h4||(h4=new RegExp(wj,"u")),h4.test(e.data)||(i=this._getOrReturnCtx(e,i),me(i,{validation:"emoji",code:ie.invalid_string,message:s.message}),r.dirty());else if(s.kind==="uuid")vj.test(e.data)||(i=this._getOrReturnCtx(e,i),me(i,{validation:"uuid",code:ie.invalid_string,message:s.message}),r.dirty());else if(s.kind==="nanoid")xj.test(e.data)||(i=this._getOrReturnCtx(e,i),me(i,{validation:"nanoid",code:ie.invalid_string,message:s.message}),r.dirty());else if(s.kind==="cuid")mj.test(e.data)||(i=this._getOrReturnCtx(e,i),me(i,{validation:"cuid",code:ie.invalid_string,message:s.message}),r.dirty());else if(s.kind==="cuid2")gj.test(e.data)||(i=this._getOrReturnCtx(e,i),me(i,{validation:"cuid2",code:ie.invalid_string,message:s.message}),r.dirty());else if(s.kind==="ulid")yj.test(e.data)||(i=this._getOrReturnCtx(e,i),me(i,{validation:"ulid",code:ie.invalid_string,message:s.message}),r.dirty());else if(s.kind==="url")try{new URL(e.data)}catch{i=this._getOrReturnCtx(e,i),me(i,{validation:"url",code:ie.invalid_string,message:s.message}),r.dirty()}else s.kind==="regex"?(s.regex.lastIndex=0,s.regex.test(e.data)||(i=this._getOrReturnCtx(e,i),me(i,{validation:"regex",code:ie.invalid_string,message:s.message}),r.dirty())):s.kind==="trim"?e.data=e.data.trim():s.kind==="includes"?e.data.includes(s.value,s.position)||(i=this._getOrReturnCtx(e,i),me(i,{code:ie.invalid_string,validation:{includes:s.value,position:s.position},message:s.message}),r.dirty()):s.kind==="toLowerCase"?e.data=e.data.toLowerCase():s.kind==="toUpperCase"?e.data=e.data.toUpperCase():s.kind==="startsWith"?e.data.startsWith(s.value)||(i=this._getOrReturnCtx(e,i),me(i,{code:ie.invalid_string,validation:{startsWith:s.value},message:s.message}),r.dirty()):s.kind==="endsWith"?e.data.endsWith(s.value)||(i=this._getOrReturnCtx(e,i),me(i,{code:ie.invalid_string,validation:{endsWith:s.value},message:s.message}),r.dirty()):s.kind==="datetime"?Vb(s).test(e.data)||(i=this._getOrReturnCtx(e,i),me(i,{code:ie.invalid_string,validation:"datetime",message:s.message}),r.dirty()):s.kind==="date"?Tj.test(e.data)||(i=this._getOrReturnCtx(e,i),me(i,{code:ie.invalid_string,validation:"date",message:s.message}),r.dirty()):s.kind==="time"?Sj(s).test(e.data)||(i=this._getOrReturnCtx(e,i),me(i,{code:ie.invalid_string,validation:"time",message:s.message}),r.dirty()):s.kind==="duration"?_j.test(e.data)||(i=this._getOrReturnCtx(e,i),me(i,{validation:"duration",code:ie.invalid_string,message:s.message}),r.dirty()):s.kind==="ip"?Nj(e.data,s.version)||(i=this._getOrReturnCtx(e,i),me(i,{validation:"ip",code:ie.invalid_string,message:s.message}),r.dirty()):s.kind==="base64"?Cj.test(e.data)||(i=this._getOrReturnCtx(e,i),me(i,{validation:"base64",code:ie.invalid_string,message:s.message}),r.dirty()):Xe.assertNever(s);return{status:r.value,value:e.data}}_regex(e,n,r){return this.refinement(i=>e.test(i),{validation:n,code:ie.invalid_string,...ke.errToObj(r)})}_addCheck(e){return new Ai({...this._def,checks:[...this._def.checks,e]})}email(e){return this._addCheck({kind:"email",...ke.errToObj(e)})}url(e){return this._addCheck({kind:"url",...ke.errToObj(e)})}emoji(e){return this._addCheck({kind:"emoji",...ke.errToObj(e)})}uuid(e){return this._addCheck({kind:"uuid",...ke.errToObj(e)})}nanoid(e){return this._addCheck({kind:"nanoid",...ke.errToObj(e)})}cuid(e){return this._addCheck({kind:"cuid",...ke.errToObj(e)})}cuid2(e){return this._addCheck({kind:"cuid2",...ke.errToObj(e)})}ulid(e){return this._addCheck({kind:"ulid",...ke.errToObj(e)})}base64(e){return this._addCheck({kind:"base64",...ke.errToObj(e)})}ip(e){return this._addCheck({kind:"ip",...ke.errToObj(e)})}datetime(e){var n,r;return typeof e=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:e}):this._addCheck({kind:"datetime",precision:typeof(e==null?void 0:e.precision)>"u"?null:e==null?void 0:e.precision,offset:(n=e==null?void 0:e.offset)!==null&&n!==void 0?n:!1,local:(r=e==null?void 0:e.local)!==null&&r!==void 0?r:!1,...ke.errToObj(e==null?void 0:e.message)})}date(e){return this._addCheck({kind:"date",message:e})}time(e){return typeof e=="string"?this._addCheck({kind:"time",precision:null,message:e}):this._addCheck({kind:"time",precision:typeof(e==null?void 0:e.precision)>"u"?null:e==null?void 0:e.precision,...ke.errToObj(e==null?void 0:e.message)})}duration(e){return this._addCheck({kind:"duration",...ke.errToObj(e)})}regex(e,n){return this._addCheck({kind:"regex",regex:e,...ke.errToObj(n)})}includes(e,n){return this._addCheck({kind:"includes",value:e,position:n==null?void 0:n.position,...ke.errToObj(n==null?void 0:n.message)})}startsWith(e,n){return this._addCheck({kind:"startsWith",value:e,...ke.errToObj(n)})}endsWith(e,n){return this._addCheck({kind:"endsWith",value:e,...ke.errToObj(n)})}min(e,n){return this._addCheck({kind:"min",value:e,...ke.errToObj(n)})}max(e,n){return this._addCheck({kind:"max",value:e,...ke.errToObj(n)})}length(e,n){return this._addCheck({kind:"length",value:e,...ke.errToObj(n)})}nonempty(e){return this.min(1,ke.errToObj(e))}trim(){return new Ai({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new Ai({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new Ai({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(e=>e.kind==="datetime")}get isDate(){return!!this._def.checks.find(e=>e.kind==="date")}get isTime(){return!!this._def.checks.find(e=>e.kind==="time")}get isDuration(){return!!this._def.checks.find(e=>e.kind==="duration")}get isEmail(){return!!this._def.checks.find(e=>e.kind==="email")}get isURL(){return!!this._def.checks.find(e=>e.kind==="url")}get isEmoji(){return!!this._def.checks.find(e=>e.kind==="emoji")}get isUUID(){return!!this._def.checks.find(e=>e.kind==="uuid")}get isNANOID(){return!!this._def.checks.find(e=>e.kind==="nanoid")}get isCUID(){return!!this._def.checks.find(e=>e.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(e=>e.kind==="cuid2")}get isULID(){return!!this._def.checks.find(e=>e.kind==="ulid")}get isIP(){return!!this._def.checks.find(e=>e.kind==="ip")}get isBase64(){return!!this._def.checks.find(e=>e.kind==="base64")}get minLength(){let e=null;for(const n of this._def.checks)n.kind==="min"&&(e===null||n.value>e)&&(e=n.value);return e}get maxLength(){let e=null;for(const n of this._def.checks)n.kind==="max"&&(e===null||n.value<e)&&(e=n.value);return e}}Ai.create=t=>{var e;return new Ai({checks:[],typeName:Ae.ZodString,coerce:(e=t==null?void 0:t.coerce)!==null&&e!==void 0?e:!1,...Le(t)})};function Aj(t,e){const n=(t.toString().split(".")[1]||"").length,r=(e.toString().split(".")[1]||"").length,i=n>r?n:r,s=parseInt(t.toFixed(i).replace(".","")),a=parseInt(e.toFixed(i).replace(".",""));return s%a/Math.pow(10,i)}class qa extends je{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(e){if(this._def.coerce&&(e.data=Number(e.data)),this._getType(e)!==ye.number){const s=this._getOrReturnCtx(e);return me(s,{code:ie.invalid_type,expected:ye.number,received:s.parsedType}),Oe}let r;const i=new Fn;for(const s of this._def.checks)s.kind==="int"?Xe.isInteger(e.data)||(r=this._getOrReturnCtx(e,r),me(r,{code:ie.invalid_type,expected:"integer",received:"float",message:s.message}),i.dirty()):s.kind==="min"?(s.inclusive?e.data<s.value:e.data<=s.value)&&(r=this._getOrReturnCtx(e,r),me(r,{code:ie.too_small,minimum:s.value,type:"number",inclusive:s.inclusive,exact:!1,message:s.message}),i.dirty()):s.kind==="max"?(s.inclusive?e.data>s.value:e.data>=s.value)&&(r=this._getOrReturnCtx(e,r),me(r,{code:ie.too_big,maximum:s.value,type:"number",inclusive:s.inclusive,exact:!1,message:s.message}),i.dirty()):s.kind==="multipleOf"?Aj(e.data,s.value)!==0&&(r=this._getOrReturnCtx(e,r),me(r,{code:ie.not_multiple_of,multipleOf:s.value,message:s.message}),i.dirty()):s.kind==="finite"?Number.isFinite(e.data)||(r=this._getOrReturnCtx(e,r),me(r,{code:ie.not_finite,message:s.message}),i.dirty()):Xe.assertNever(s);return{status:i.value,value:e.data}}gte(e,n){return this.setLimit("min",e,!0,ke.toString(n))}gt(e,n){return this.setLimit("min",e,!1,ke.toString(n))}lte(e,n){return this.setLimit("max",e,!0,ke.toString(n))}lt(e,n){return this.setLimit("max",e,!1,ke.toString(n))}setLimit(e,n,r,i){return new qa({...this._def,checks:[...this._def.checks,{kind:e,value:n,inclusive:r,message:ke.toString(i)}]})}_addCheck(e){return new qa({...this._def,checks:[...this._def.checks,e]})}int(e){return this._addCheck({kind:"int",message:ke.toString(e)})}positive(e){return this._addCheck({kind:"min",value:0,inclusive:!1,message:ke.toString(e)})}negative(e){return this._addCheck({kind:"max",value:0,inclusive:!1,message:ke.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:0,inclusive:!0,message:ke.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:0,inclusive:!0,message:ke.toString(e)})}multipleOf(e,n){return this._addCheck({kind:"multipleOf",value:e,message:ke.toString(n)})}finite(e){return this._addCheck({kind:"finite",message:ke.toString(e)})}safe(e){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:ke.toString(e)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:ke.toString(e)})}get minValue(){let e=null;for(const n of this._def.checks)n.kind==="min"&&(e===null||n.value>e)&&(e=n.value);return e}get maxValue(){let e=null;for(const n of this._def.checks)n.kind==="max"&&(e===null||n.value<e)&&(e=n.value);return e}get isInt(){return!!this._def.checks.find(e=>e.kind==="int"||e.kind==="multipleOf"&&Xe.isInteger(e.value))}get isFinite(){let e=null,n=null;for(const r of this._def.checks){if(r.kind==="finite"||r.kind==="int"||r.kind==="multipleOf")return!0;r.kind==="min"?(n===null||r.value>n)&&(n=r.value):r.kind==="max"&&(e===null||r.value<e)&&(e=r.value)}return Number.isFinite(n)&&Number.isFinite(e)}}qa.create=t=>new qa({checks:[],typeName:Ae.ZodNumber,coerce:(t==null?void 0:t.coerce)||!1,...Le(t)});class Qa extends je{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(e){if(this._def.coerce&&(e.data=BigInt(e.data)),this._getType(e)!==ye.bigint){const s=this._getOrReturnCtx(e);return me(s,{code:ie.invalid_type,expected:ye.bigint,received:s.parsedType}),Oe}let r;const i=new Fn;for(const s of this._def.checks)s.kind==="min"?(s.inclusive?e.data<s.value:e.data<=s.value)&&(r=this._getOrReturnCtx(e,r),me(r,{code:ie.too_small,type:"bigint",minimum:s.value,inclusive:s.inclusive,message:s.message}),i.dirty()):s.kind==="max"?(s.inclusive?e.data>s.value:e.data>=s.value)&&(r=this._getOrReturnCtx(e,r),me(r,{code:ie.too_big,type:"bigint",maximum:s.value,inclusive:s.inclusive,message:s.message}),i.dirty()):s.kind==="multipleOf"?e.data%s.value!==BigInt(0)&&(r=this._getOrReturnCtx(e,r),me(r,{code:ie.not_multiple_of,multipleOf:s.value,message:s.message}),i.dirty()):Xe.assertNever(s);return{status:i.value,value:e.data}}gte(e,n){return this.setLimit("min",e,!0,ke.toString(n))}gt(e,n){return this.setLimit("min",e,!1,ke.toString(n))}lte(e,n){return this.setLimit("max",e,!0,ke.toString(n))}lt(e,n){return this.setLimit("max",e,!1,ke.toString(n))}setLimit(e,n,r,i){return new Qa({...this._def,checks:[...this._def.checks,{kind:e,value:n,inclusive:r,message:ke.toString(i)}]})}_addCheck(e){return new Qa({...this._def,checks:[...this._def.checks,e]})}positive(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:ke.toString(e)})}negative(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:ke.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:ke.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:ke.toString(e)})}multipleOf(e,n){return this._addCheck({kind:"multipleOf",value:e,message:ke.toString(n)})}get minValue(){let e=null;for(const n of this._def.checks)n.kind==="min"&&(e===null||n.value>e)&&(e=n.value);return e}get maxValue(){let e=null;for(const n of this._def.checks)n.kind==="max"&&(e===null||n.value<e)&&(e=n.value);return e}}Qa.create=t=>{var e;return new Qa({checks:[],typeName:Ae.ZodBigInt,coerce:(e=t==null?void 0:t.coerce)!==null&&e!==void 0?e:!1,...Le(t)})};class P1 extends je{_parse(e){if(this._def.coerce&&(e.data=!!e.data),this._getType(e)!==ye.boolean){const r=this._getOrReturnCtx(e);return me(r,{code:ie.invalid_type,expected:ye.boolean,received:r.parsedType}),Oe}return Kn(e.data)}}P1.create=t=>new P1({typeName:Ae.ZodBoolean,coerce:(t==null?void 0:t.coerce)||!1,...Le(t)});class tl extends je{_parse(e){if(this._def.coerce&&(e.data=new Date(e.data)),this._getType(e)!==ye.date){const s=this._getOrReturnCtx(e);return me(s,{code:ie.invalid_type,expected:ye.date,received:s.parsedType}),Oe}if(isNaN(e.data.getTime())){const s=this._getOrReturnCtx(e);return me(s,{code:ie.invalid_date}),Oe}const r=new Fn;let i;for(const s of this._def.checks)s.kind==="min"?e.data.getTime()<s.value&&(i=this._getOrReturnCtx(e,i),me(i,{code:ie.too_small,message:s.message,inclusive:!0,exact:!1,minimum:s.value,type:"date"}),r.dirty()):s.kind==="max"?e.data.getTime()>s.value&&(i=this._getOrReturnCtx(e,i),me(i,{code:ie.too_big,message:s.message,inclusive:!0,exact:!1,maximum:s.value,type:"date"}),r.dirty()):Xe.assertNever(s);return{status:r.value,value:new Date(e.data.getTime())}}_addCheck(e){return new tl({...this._def,checks:[...this._def.checks,e]})}min(e,n){return this._addCheck({kind:"min",value:e.getTime(),message:ke.toString(n)})}max(e,n){return this._addCheck({kind:"max",value:e.getTime(),message:ke.toString(n)})}get minDate(){let e=null;for(const n of this._def.checks)n.kind==="min"&&(e===null||n.value>e)&&(e=n.value);return e!=null?new Date(e):null}get maxDate(){let e=null;for(const n of this._def.checks)n.kind==="max"&&(e===null||n.value<e)&&(e=n.value);return e!=null?new Date(e):null}}tl.create=t=>new tl({checks:[],coerce:(t==null?void 0:t.coerce)||!1,typeName:Ae.ZodDate,...Le(t)});class bp extends je{_parse(e){if(this._getType(e)!==ye.symbol){const r=this._getOrReturnCtx(e);return me(r,{code:ie.invalid_type,expected:ye.symbol,received:r.parsedType}),Oe}return Kn(e.data)}}bp.create=t=>new bp({typeName:Ae.ZodSymbol,...Le(t)});class R1 extends je{_parse(e){if(this._getType(e)!==ye.undefined){const r=this._getOrReturnCtx(e);return me(r,{code:ie.invalid_type,expected:ye.undefined,received:r.parsedType}),Oe}return Kn(e.data)}}R1.create=t=>new R1({typeName:Ae.ZodUndefined,...Le(t)});class j1 extends je{_parse(e){if(this._getType(e)!==ye.null){const r=this._getOrReturnCtx(e);return me(r,{code:ie.invalid_type,expected:ye.null,received:r.parsedType}),Oe}return Kn(e.data)}}j1.create=t=>new j1({typeName:Ae.ZodNull,...Le(t)});class Sc extends je{constructor(){super(...arguments),this._any=!0}_parse(e){return Kn(e.data)}}Sc.create=t=>new Sc({typeName:Ae.ZodAny,...Le(t)});class nl extends je{constructor(){super(...arguments),this._unknown=!0}_parse(e){return Kn(e.data)}}nl.create=t=>new nl({typeName:Ae.ZodUnknown,...Le(t)});class Ks extends je{_parse(e){const n=this._getOrReturnCtx(e);return me(n,{code:ie.invalid_type,expected:ye.never,received:n.parsedType}),Oe}}Ks.create=t=>new Ks({typeName:Ae.ZodNever,...Le(t)});class wp extends je{_parse(e){if(this._getType(e)!==ye.undefined){const r=this._getOrReturnCtx(e);return me(r,{code:ie.invalid_type,expected:ye.void,received:r.parsedType}),Oe}return Kn(e.data)}}wp.create=t=>new wp({typeName:Ae.ZodVoid,...Le(t)});class Di extends je{_parse(e){const{ctx:n,status:r}=this._processInputParams(e),i=this._def;if(n.parsedType!==ye.array)return me(n,{code:ie.invalid_type,expected:ye.array,received:n.parsedType}),Oe;if(i.exactLength!==null){const a=n.data.length>i.exactLength.value,o=n.data.length<i.exactLength.value;(a||o)&&(me(n,{code:a?ie.too_big:ie.too_small,minimum:o?i.exactLength.value:void 0,maximum:a?i.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:i.exactLength.message}),r.dirty())}if(i.minLength!==null&&n.data.length<i.minLength.value&&(me(n,{code:ie.too_small,minimum:i.minLength.value,type:"array",inclusive:!0,exact:!1,message:i.minLength.message}),r.dirty()),i.maxLength!==null&&n.data.length>i.maxLength.value&&(me(n,{code:ie.too_big,maximum:i.maxLength.value,type:"array",inclusive:!0,exact:!1,message:i.maxLength.message}),r.dirty()),n.common.async)return Promise.all([...n.data].map((a,o)=>i.type._parseAsync(new ls(n,a,n.path,o)))).then(a=>Fn.mergeArray(r,a));const s=[...n.data].map((a,o)=>i.type._parseSync(new ls(n,a,n.path,o)));return Fn.mergeArray(r,s)}get element(){return this._def.type}min(e,n){return new Di({...this._def,minLength:{value:e,message:ke.toString(n)}})}max(e,n){return new Di({...this._def,maxLength:{value:e,message:ke.toString(n)}})}length(e,n){return new Di({...this._def,exactLength:{value:e,message:ke.toString(n)}})}nonempty(e){return this.min(1,e)}}Di.create=(t,e)=>new Di({type:t,minLength:null,maxLength:null,exactLength:null,typeName:Ae.ZodArray,...Le(e)});function Nc(t){if(t instanceof jt){const e={};for(const n in t.shape){const r=t.shape[n];e[n]=us.create(Nc(r))}return new jt({...t._def,shape:()=>e})}else return t instanceof Di?new Di({...t._def,type:Nc(t.element)}):t instanceof us?us.create(Nc(t.unwrap())):t instanceof Xa?Xa.create(Nc(t.unwrap())):t instanceof cs?cs.create(t.items.map(e=>Nc(e))):t}class jt extends je{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;const e=this._def.shape(),n=Xe.objectKeys(e);return this._cached={shape:e,keys:n}}_parse(e){if(this._getType(e)!==ye.object){const c=this._getOrReturnCtx(e);return me(c,{code:ie.invalid_type,expected:ye.object,received:c.parsedType}),Oe}const{status:r,ctx:i}=this._processInputParams(e),{shape:s,keys:a}=this._getCached(),o=[];if(!(this._def.catchall instanceof Ks&&this._def.unknownKeys==="strip"))for(const c in i.data)a.includes(c)||o.push(c);const l=[];for(const c of a){const u=s[c],d=i.data[c];l.push({key:{status:"valid",value:c},value:u._parse(new ls(i,d,i.path,c)),alwaysSet:c in i.data})}if(this._def.catchall instanceof Ks){const c=this._def.unknownKeys;if(c==="passthrough")for(const u of o)l.push({key:{status:"valid",value:u},value:{status:"valid",value:i.data[u]}});else if(c==="strict")o.length>0&&(me(i,{code:ie.unrecognized_keys,keys:o}),r.dirty());else if(c!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const c=this._def.catchall;for(const u of o){const d=i.data[u];l.push({key:{status:"valid",value:u},value:c._parse(new ls(i,d,i.path,u)),alwaysSet:u in i.data})}}return i.common.async?Promise.resolve().then(async()=>{const c=[];for(const u of l){const d=await u.key,h=await u.value;c.push({key:d,value:h,alwaysSet:u.alwaysSet})}return c}).then(c=>Fn.mergeObjectSync(r,c)):Fn.mergeObjectSync(r,l)}get shape(){return this._def.shape()}strict(e){return ke.errToObj,new jt({...this._def,unknownKeys:"strict",...e!==void 0?{errorMap:(n,r)=>{var i,s,a,o;const l=(a=(s=(i=this._def).errorMap)===null||s===void 0?void 0:s.call(i,n,r).message)!==null&&a!==void 0?a:r.defaultError;return n.code==="unrecognized_keys"?{message:(o=ke.errToObj(e).message)!==null&&o!==void 0?o:l}:{message:l}}}:{}})}strip(){return new jt({...this._def,unknownKeys:"strip"})}passthrough(){return new jt({...this._def,unknownKeys:"passthrough"})}extend(e){return new jt({...this._def,shape:()=>({...this._def.shape(),...e})})}merge(e){return new jt({unknownKeys:e._def.unknownKeys,catchall:e._def.catchall,shape:()=>({...this._def.shape(),...e._def.shape()}),typeName:Ae.ZodObject})}setKey(e,n){return this.augment({[e]:n})}catchall(e){return new jt({...this._def,catchall:e})}pick(e){const n={};return Xe.objectKeys(e).forEach(r=>{e[r]&&this.shape[r]&&(n[r]=this.shape[r])}),new jt({...this._def,shape:()=>n})}omit(e){const n={};return Xe.objectKeys(this.shape).forEach(r=>{e[r]||(n[r]=this.shape[r])}),new jt({...this._def,shape:()=>n})}deepPartial(){return Nc(this)}partial(e){const n={};return Xe.objectKeys(this.shape).forEach(r=>{const i=this.shape[r];e&&!e[r]?n[r]=i:n[r]=i.optional()}),new jt({...this._def,shape:()=>n})}required(e){const n={};return Xe.objectKeys(this.shape).forEach(r=>{if(e&&!e[r])n[r]=this.shape[r];else{let s=this.shape[r];for(;s instanceof us;)s=s._def.innerType;n[r]=s}}),new jt({...this._def,shape:()=>n})}keyof(){return Yb(Xe.objectKeys(this.shape))}}jt.create=(t,e)=>new jt({shape:()=>t,unknownKeys:"strip",catchall:Ks.create(),typeName:Ae.ZodObject,...Le(e)}),jt.strictCreate=(t,e)=>new jt({shape:()=>t,unknownKeys:"strict",catchall:Ks.create(),typeName:Ae.ZodObject,...Le(e)}),jt.lazycreate=(t,e)=>new jt({shape:t,unknownKeys:"strip",catchall:Ks.create(),typeName:Ae.ZodObject,...Le(e)});class F1 extends je{_parse(e){const{ctx:n}=this._processInputParams(e),r=this._def.options;function i(s){for(const o of s)if(o.result.status==="valid")return o.result;for(const o of s)if(o.result.status==="dirty")return n.common.issues.push(...o.ctx.common.issues),o.result;const a=s.map(o=>new Sr(o.ctx.common.issues));return me(n,{code:ie.invalid_union,unionErrors:a}),Oe}if(n.common.async)return Promise.all(r.map(async s=>{const a={...n,common:{...n.common,issues:[]},parent:null};return{result:await s._parseAsync({data:n.data,path:n.path,parent:a}),ctx:a}})).then(i);{let s;const a=[];for(const l of r){const c={...n,common:{...n.common,issues:[]},parent:null},u=l._parseSync({data:n.data,path:n.path,parent:c});if(u.status==="valid")return u;u.status==="dirty"&&!s&&(s={result:u,ctx:c}),c.common.issues.length&&a.push(c.common.issues)}if(s)return n.common.issues.push(...s.ctx.common.issues),s.result;const o=a.map(l=>new Sr(l));return me(n,{code:ie.invalid_union,unionErrors:o}),Oe}}get options(){return this._def.options}}F1.create=(t,e)=>new F1({options:t,typeName:Ae.ZodUnion,...Le(e)});const qs=t=>t instanceof z1?qs(t.schema):t instanceof Oi?qs(t.innerType()):t instanceof U1?[t.value]:t instanceof Za?t.options:t instanceof $1?Xe.objectValues(t.enum):t instanceof V1?qs(t._def.innerType):t instanceof R1?[void 0]:t instanceof j1?[null]:t instanceof us?[void 0,...qs(t.unwrap())]:t instanceof Xa?[null,...qs(t.unwrap())]:t instanceof m4||t instanceof G1?qs(t.unwrap()):t instanceof Y1?qs(t._def.innerType):[];class Ep extends je{_parse(e){const{ctx:n}=this._processInputParams(e);if(n.parsedType!==ye.object)return me(n,{code:ie.invalid_type,expected:ye.object,received:n.parsedType}),Oe;const r=this.discriminator,i=n.data[r],s=this.optionsMap.get(i);return s?n.common.async?s._parseAsync({data:n.data,path:n.path,parent:n}):s._parseSync({data:n.data,path:n.path,parent:n}):(me(n,{code:ie.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[r]}),Oe)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(e,n,r){const i=new Map;for(const s of n){const a=qs(s.shape[e]);if(!a.length)throw new Error(`A discriminator value for key \`${e}\` could not be extracted from all schema options`);for(const o of a){if(i.has(o))throw new Error(`Discriminator property ${String(e)} has duplicate value ${String(o)}`);i.set(o,s)}}return new Ep({typeName:Ae.ZodDiscriminatedUnion,discriminator:e,options:n,optionsMap:i,...Le(r)})}}function p4(t,e){const n=Ka(t),r=Ka(e);if(t===e)return{valid:!0,data:t};if(n===ye.object&&r===ye.object){const i=Xe.objectKeys(e),s=Xe.objectKeys(t).filter(o=>i.indexOf(o)!==-1),a={...t,...e};for(const o of s){const l=p4(t[o],e[o]);if(!l.valid)return{valid:!1};a[o]=l.data}return{valid:!0,data:a}}else if(n===ye.array&&r===ye.array){if(t.length!==e.length)return{valid:!1};const i=[];for(let s=0;s<t.length;s++){const a=t[s],o=e[s],l=p4(a,o);if(!l.valid)return{valid:!1};i.push(l.data)}return{valid:!0,data:i}}else return n===ye.date&&r===ye.date&&+t==+e?{valid:!0,data:t}:{valid:!1}}class B1 extends je{_parse(e){const{status:n,ctx:r}=this._processInputParams(e),i=(s,a)=>{if(d4(s)||d4(a))return Oe;const o=p4(s.value,a.value);return o.valid?((f4(s)||f4(a))&&n.dirty(),{status:n.value,value:o.data}):(me(r,{code:ie.invalid_intersection_types}),Oe)};return r.common.async?Promise.all([this._def.left._parseAsync({data:r.data,path:r.path,parent:r}),this._def.right._parseAsync({data:r.data,path:r.path,parent:r})]).then(([s,a])=>i(s,a)):i(this._def.left._parseSync({data:r.data,path:r.path,parent:r}),this._def.right._parseSync({data:r.data,path:r.path,parent:r}))}}B1.create=(t,e,n)=>new B1({left:t,right:e,typeName:Ae.ZodIntersection,...Le(n)});class cs extends je{_parse(e){const{status:n,ctx:r}=this._processInputParams(e);if(r.parsedType!==ye.array)return me(r,{code:ie.invalid_type,expected:ye.array,received:r.parsedType}),Oe;if(r.data.length<this._def.items.length)return me(r,{code:ie.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),Oe;!this._def.rest&&r.data.length>this._def.items.length&&(me(r,{code:ie.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),n.dirty());const s=[...r.data].map((a,o)=>{const l=this._def.items[o]||this._def.rest;return l?l._parse(new ls(r,a,r.path,o)):null}).filter(a=>!!a);return r.common.async?Promise.all(s).then(a=>Fn.mergeArray(n,a)):Fn.mergeArray(n,s)}get items(){return this._def.items}rest(e){return new cs({...this._def,rest:e})}}cs.create=(t,e)=>{if(!Array.isArray(t))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new cs({items:t,typeName:Ae.ZodTuple,rest:null,...Le(e)})};class H1 extends je{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){const{status:n,ctx:r}=this._processInputParams(e);if(r.parsedType!==ye.object)return me(r,{code:ie.invalid_type,expected:ye.object,received:r.parsedType}),Oe;const i=[],s=this._def.keyType,a=this._def.valueType;for(const o in r.data)i.push({key:s._parse(new ls(r,o,r.path,o)),value:a._parse(new ls(r,r.data[o],r.path,o)),alwaysSet:o in r.data});return r.common.async?Fn.mergeObjectAsync(n,i):Fn.mergeObjectSync(n,i)}get element(){return this._def.valueType}static create(e,n,r){return n instanceof je?new H1({keyType:e,valueType:n,typeName:Ae.ZodRecord,...Le(r)}):new H1({keyType:Ai.create(),valueType:e,typeName:Ae.ZodRecord,...Le(n)})}}class kp extends je{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){const{status:n,ctx:r}=this._processInputParams(e);if(r.parsedType!==ye.map)return me(r,{code:ie.invalid_type,expected:ye.map,received:r.parsedType}),Oe;const i=this._def.keyType,s=this._def.valueType,a=[...r.data.entries()].map(([o,l],c)=>({key:i._parse(new ls(r,o,r.path,[c,"key"])),value:s._parse(new ls(r,l,r.path,[c,"value"]))}));if(r.common.async){const o=new Map;return Promise.resolve().then(async()=>{for(const l of a){const c=await l.key,u=await l.value;if(c.status==="aborted"||u.status==="aborted")return Oe;(c.status==="dirty"||u.status==="dirty")&&n.dirty(),o.set(c.value,u.value)}return{status:n.value,value:o}})}else{const o=new Map;for(const l of a){const c=l.key,u=l.value;if(c.status==="aborted"||u.status==="aborted")return Oe;(c.status==="dirty"||u.status==="dirty")&&n.dirty(),o.set(c.value,u.value)}return{status:n.value,value:o}}}}kp.create=(t,e,n)=>new kp({valueType:e,keyType:t,typeName:Ae.ZodMap,...Le(n)});class rl extends je{_parse(e){const{status:n,ctx:r}=this._processInputParams(e);if(r.parsedType!==ye.set)return me(r,{code:ie.invalid_type,expected:ye.set,received:r.parsedType}),Oe;const i=this._def;i.minSize!==null&&r.data.size<i.minSize.value&&(me(r,{code:ie.too_small,minimum:i.minSize.value,type:"set",inclusive:!0,exact:!1,message:i.minSize.message}),n.dirty()),i.maxSize!==null&&r.data.size>i.maxSize.value&&(me(r,{code:ie.too_big,maximum:i.maxSize.value,type:"set",inclusive:!0,exact:!1,message:i.maxSize.message}),n.dirty());const s=this._def.valueType;function a(l){const c=new Set;for(const u of l){if(u.status==="aborted")return Oe;u.status==="dirty"&&n.dirty(),c.add(u.value)}return{status:n.value,value:c}}const o=[...r.data.values()].map((l,c)=>s._parse(new ls(r,l,r.path,c)));return r.common.async?Promise.all(o).then(l=>a(l)):a(o)}min(e,n){return new rl({...this._def,minSize:{value:e,message:ke.toString(n)}})}max(e,n){return new rl({...this._def,maxSize:{value:e,message:ke.toString(n)}})}size(e,n){return this.min(e,n).max(e,n)}nonempty(e){return this.min(1,e)}}rl.create=(t,e)=>new rl({valueType:t,minSize:null,maxSize:null,typeName:Ae.ZodSet,...Le(e)});class Ac extends je{constructor(){super(...arguments),this.validate=this.implement}_parse(e){const{ctx:n}=this._processInputParams(e);if(n.parsedType!==ye.function)return me(n,{code:ie.invalid_type,expected:ye.function,received:n.parsedType}),Oe;function r(o,l){return xp({data:o,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,vp(),Cc].filter(c=>!!c),issueData:{code:ie.invalid_arguments,argumentsError:l}})}function i(o,l){return xp({data:o,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,vp(),Cc].filter(c=>!!c),issueData:{code:ie.invalid_return_type,returnTypeError:l}})}const s={errorMap:n.common.contextualErrorMap},a=n.data;if(this._def.returns instanceof Dc){const o=this;return Kn(async function(...l){const c=new Sr([]),u=await o._def.args.parseAsync(l,s).catch(p=>{throw c.addIssue(r(l,p)),c}),d=await Reflect.apply(a,this,u);return await o._def.returns._def.type.parseAsync(d,s).catch(p=>{throw c.addIssue(i(d,p)),c})})}else{const o=this;return Kn(function(...l){const c=o._def.args.safeParse(l,s);if(!c.success)throw new Sr([r(l,c.error)]);const u=Reflect.apply(a,this,c.data),d=o._def.returns.safeParse(u,s);if(!d.success)throw new Sr([i(u,d.error)]);return d.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...e){return new Ac({...this._def,args:cs.create(e).rest(nl.create())})}returns(e){return new Ac({...this._def,returns:e})}implement(e){return this.parse(e)}strictImplement(e){return this.parse(e)}static create(e,n,r){return new Ac({args:e||cs.create([]).rest(nl.create()),returns:n||nl.create(),typeName:Ae.ZodFunction,...Le(r)})}}class z1 extends je{get schema(){return this._def.getter()}_parse(e){const{ctx:n}=this._processInputParams(e);return this._def.getter()._parse({data:n.data,path:n.path,parent:n})}}z1.create=(t,e)=>new z1({getter:t,typeName:Ae.ZodLazy,...Le(e)});class U1 extends je{_parse(e){if(e.data!==this._def.value){const n=this._getOrReturnCtx(e);return me(n,{received:n.data,code:ie.invalid_literal,expected:this._def.value}),Oe}return{status:"valid",value:e.data}}get value(){return this._def.value}}U1.create=(t,e)=>new U1({value:t,typeName:Ae.ZodLiteral,...Le(e)});function Yb(t,e){return new Za({values:t,typeName:Ae.ZodEnum,...Le(e)})}class Za extends je{constructor(){super(...arguments),I1.set(this,void 0)}_parse(e){if(typeof e.data!="string"){const n=this._getOrReturnCtx(e),r=this._def.values;return me(n,{expected:Xe.joinValues(r),received:n.parsedType,code:ie.invalid_type}),Oe}if(_p(this,I1)||Hb(this,I1,new Set(this._def.values)),!_p(this,I1).has(e.data)){const n=this._getOrReturnCtx(e),r=this._def.values;return me(n,{received:n.data,code:ie.invalid_enum_value,options:r}),Oe}return Kn(e.data)}get options(){return this._def.values}get enum(){const e={};for(const n of this._def.values)e[n]=n;return e}get Values(){const e={};for(const n of this._def.values)e[n]=n;return e}get Enum(){const e={};for(const n of this._def.values)e[n]=n;return e}extract(e,n=this._def){return Za.create(e,{...this._def,...n})}exclude(e,n=this._def){return Za.create(this.options.filter(r=>!e.includes(r)),{...this._def,...n})}}I1=new WeakMap,Za.create=Yb;class $1 extends je{constructor(){super(...arguments),L1.set(this,void 0)}_parse(e){const n=Xe.getValidEnumValues(this._def.values),r=this._getOrReturnCtx(e);if(r.parsedType!==ye.string&&r.parsedType!==ye.number){const i=Xe.objectValues(n);return me(r,{expected:Xe.joinValues(i),received:r.parsedType,code:ie.invalid_type}),Oe}if(_p(this,L1)||Hb(this,L1,new Set(Xe.getValidEnumValues(this._def.values))),!_p(this,L1).has(e.data)){const i=Xe.objectValues(n);return me(r,{received:r.data,code:ie.invalid_enum_value,options:i}),Oe}return Kn(e.data)}get enum(){return this._def.values}}L1=new WeakMap,$1.create=(t,e)=>new $1({values:t,typeName:Ae.ZodNativeEnum,...Le(e)});class Dc extends je{unwrap(){return this._def.type}_parse(e){const{ctx:n}=this._processInputParams(e);if(n.parsedType!==ye.promise&&n.common.async===!1)return me(n,{code:ie.invalid_type,expected:ye.promise,received:n.parsedType}),Oe;const r=n.parsedType===ye.promise?n.data:Promise.resolve(n.data);return Kn(r.then(i=>this._def.type.parseAsync(i,{path:n.path,errorMap:n.common.contextualErrorMap})))}}Dc.create=(t,e)=>new Dc({type:t,typeName:Ae.ZodPromise,...Le(e)});class Oi extends je{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===Ae.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(e){const{status:n,ctx:r}=this._processInputParams(e),i=this._def.effect||null,s={addIssue:a=>{me(r,a),a.fatal?n.abort():n.dirty()},get path(){return r.path}};if(s.addIssue=s.addIssue.bind(s),i.type==="preprocess"){const a=i.transform(r.data,s);if(r.common.async)return Promise.resolve(a).then(async o=>{if(n.value==="aborted")return Oe;const l=await this._def.schema._parseAsync({data:o,path:r.path,parent:r});return l.status==="aborted"?Oe:l.status==="dirty"||n.value==="dirty"?Tc(l.value):l});{if(n.value==="aborted")return Oe;const o=this._def.schema._parseSync({data:a,path:r.path,parent:r});return o.status==="aborted"?Oe:o.status==="dirty"||n.value==="dirty"?Tc(o.value):o}}if(i.type==="refinement"){const a=o=>{const l=i.refinement(o,s);if(r.common.async)return Promise.resolve(l);if(l instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return o};if(r.common.async===!1){const o=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});return o.status==="aborted"?Oe:(o.status==="dirty"&&n.dirty(),a(o.value),{status:n.value,value:o.value})}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(o=>o.status==="aborted"?Oe:(o.status==="dirty"&&n.dirty(),a(o.value).then(()=>({status:n.value,value:o.value}))))}if(i.type==="transform")if(r.common.async===!1){const a=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});if(!O1(a))return a;const o=i.transform(a.value,s);if(o instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:n.value,value:o}}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(a=>O1(a)?Promise.resolve(i.transform(a.value,s)).then(o=>({status:n.value,value:o})):a);Xe.assertNever(i)}}Oi.create=(t,e,n)=>new Oi({schema:t,typeName:Ae.ZodEffects,effect:e,...Le(n)}),Oi.createWithPreprocess=(t,e,n)=>new Oi({schema:e,effect:{type:"preprocess",transform:t},typeName:Ae.ZodEffects,...Le(n)});class us extends je{_parse(e){return this._getType(e)===ye.undefined?Kn(void 0):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}us.create=(t,e)=>new us({innerType:t,typeName:Ae.ZodOptional,...Le(e)});class Xa extends je{_parse(e){return this._getType(e)===ye.null?Kn(null):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}Xa.create=(t,e)=>new Xa({innerType:t,typeName:Ae.ZodNullable,...Le(e)});class V1 extends je{_parse(e){const{ctx:n}=this._processInputParams(e);let r=n.data;return n.parsedType===ye.undefined&&(r=this._def.defaultValue()),this._def.innerType._parse({data:r,path:n.path,parent:n})}removeDefault(){return this._def.innerType}}V1.create=(t,e)=>new V1({innerType:t,typeName:Ae.ZodDefault,defaultValue:typeof e.default=="function"?e.default:()=>e.default,...Le(e)});class Y1 extends je{_parse(e){const{ctx:n}=this._processInputParams(e),r={...n,common:{...n.common,issues:[]}},i=this._def.innerType._parse({data:r.data,path:r.path,parent:{...r}});return M1(i)?i.then(s=>({status:"valid",value:s.status==="valid"?s.value:this._def.catchValue({get error(){return new Sr(r.common.issues)},input:r.data})})):{status:"valid",value:i.status==="valid"?i.value:this._def.catchValue({get error(){return new Sr(r.common.issues)},input:r.data})}}removeCatch(){return this._def.innerType}}Y1.create=(t,e)=>new Y1({innerType:t,typeName:Ae.ZodCatch,catchValue:typeof e.catch=="function"?e.catch:()=>e.catch,...Le(e)});class Cp extends je{_parse(e){if(this._getType(e)!==ye.nan){const r=this._getOrReturnCtx(e);return me(r,{code:ie.invalid_type,expected:ye.nan,received:r.parsedType}),Oe}return{status:"valid",value:e.data}}}Cp.create=t=>new Cp({typeName:Ae.ZodNaN,...Le(t)});const Dj=Symbol("zod_brand");class m4 extends je{_parse(e){const{ctx:n}=this._processInputParams(e),r=n.data;return this._def.type._parse({data:r,path:n.path,parent:n})}unwrap(){return this._def.type}}class W1 extends je{_parse(e){const{status:n,ctx:r}=this._processInputParams(e);if(r.common.async)return(async()=>{const s=await this._def.in._parseAsync({data:r.data,path:r.path,parent:r});return s.status==="aborted"?Oe:s.status==="dirty"?(n.dirty(),Tc(s.value)):this._def.out._parseAsync({data:s.value,path:r.path,parent:r})})();{const i=this._def.in._parseSync({data:r.data,path:r.path,parent:r});return i.status==="aborted"?Oe:i.status==="dirty"?(n.dirty(),{status:"dirty",value:i.value}):this._def.out._parseSync({data:i.value,path:r.path,parent:r})}}static create(e,n){return new W1({in:e,out:n,typeName:Ae.ZodPipeline})}}class G1 extends je{_parse(e){const n=this._def.innerType._parse(e),r=i=>(O1(i)&&(i.value=Object.freeze(i.value)),i);return M1(n)?n.then(i=>r(i)):r(n)}unwrap(){return this._def.innerType}}G1.create=(t,e)=>new G1({innerType:t,typeName:Ae.ZodReadonly,...Le(e)});function Wb(t,e={},n){return t?Sc.create().superRefine((r,i)=>{var s,a;if(!t(r)){const o=typeof e=="function"?e(r):typeof e=="string"?{message:e}:e,l=(a=(s=o.fatal)!==null&&s!==void 0?s:n)!==null&&a!==void 0?a:!0,c=typeof o=="string"?{message:o}:o;i.addIssue({code:"custom",...c,fatal:l})}}):Sc.create()}const Oj={object:jt.lazycreate};var Ae;(function(t){t.ZodString="ZodString",t.ZodNumber="ZodNumber",t.ZodNaN="ZodNaN",t.ZodBigInt="ZodBigInt",t.ZodBoolean="ZodBoolean",t.ZodDate="ZodDate",t.ZodSymbol="ZodSymbol",t.ZodUndefined="ZodUndefined",t.ZodNull="ZodNull",t.ZodAny="ZodAny",t.ZodUnknown="ZodUnknown",t.ZodNever="ZodNever",t.ZodVoid="ZodVoid",t.ZodArray="ZodArray",t.ZodObject="ZodObject",t.ZodUnion="ZodUnion",t.ZodDiscriminatedUnion="ZodDiscriminatedUnion",t.ZodIntersection="ZodIntersection",t.ZodTuple="ZodTuple",t.ZodRecord="ZodRecord",t.ZodMap="ZodMap",t.ZodSet="ZodSet",t.ZodFunction="ZodFunction",t.ZodLazy="ZodLazy",t.ZodLiteral="ZodLiteral",t.ZodEnum="ZodEnum",t.ZodEffects="ZodEffects",t.ZodNativeEnum="ZodNativeEnum",t.ZodOptional="ZodOptional",t.ZodNullable="ZodNullable",t.ZodDefault="ZodDefault",t.ZodCatch="ZodCatch",t.ZodPromise="ZodPromise",t.ZodBranded="ZodBranded",t.ZodPipeline="ZodPipeline",t.ZodReadonly="ZodReadonly"})(Ae||(Ae={}));const Mj=(t,e={message:`Input not instance of ${t.name}`})=>Wb(n=>n instanceof t,e),Gb=Ai.create,Kb=qa.create,Ij=Cp.create,Lj=Qa.create,qb=P1.create,Pj=tl.create,Rj=bp.create,jj=R1.create,Fj=j1.create,Bj=Sc.create,Hj=nl.create,zj=Ks.create,Uj=wp.create,$j=Di.create,Vj=jt.create,Yj=jt.strictCreate,Wj=F1.create,Gj=Ep.create,Kj=B1.create,qj=cs.create,Qj=H1.create,Zj=kp.create,Xj=rl.create,Jj=Ac.create,eF=z1.create,tF=U1.create,nF=Za.create,rF=$1.create,iF=Dc.create,Qb=Oi.create,sF=us.create,aF=Xa.create,oF=Oi.createWithPreprocess,lF=W1.create;var E=Object.freeze({__proto__:null,defaultErrorMap:Cc,setErrorMap:hj,getErrorMap:vp,makeIssue:xp,EMPTY_PATH:pj,addIssueToContext:me,ParseStatus:Fn,INVALID:Oe,DIRTY:Tc,OK:Kn,isAborted:d4,isDirty:f4,isValid:O1,isAsync:M1,get util(){return Xe},get objectUtil(){return u4},ZodParsedType:ye,getParsedType:Ka,ZodType:je,datetimeRegex:Vb,ZodString:Ai,ZodNumber:qa,ZodBigInt:Qa,ZodBoolean:P1,ZodDate:tl,ZodSymbol:bp,ZodUndefined:R1,ZodNull:j1,ZodAny:Sc,ZodUnknown:nl,ZodNever:Ks,ZodVoid:wp,ZodArray:Di,ZodObject:jt,ZodUnion:F1,ZodDiscriminatedUnion:Ep,ZodIntersection:B1,ZodTuple:cs,ZodRecord:H1,ZodMap:kp,ZodSet:rl,ZodFunction:Ac,ZodLazy:z1,ZodLiteral:U1,ZodEnum:Za,ZodNativeEnum:$1,ZodPromise:Dc,ZodEffects:Oi,ZodTransformer:Oi,ZodOptional:us,ZodNullable:Xa,ZodDefault:V1,ZodCatch:Y1,ZodNaN:Cp,BRAND:Dj,ZodBranded:m4,ZodPipeline:W1,ZodReadonly:G1,custom:Wb,Schema:je,ZodSchema:je,late:Oj,get ZodFirstPartyTypeKind(){return Ae},coerce:{string:t=>Ai.create({...t,coerce:!0}),number:t=>qa.create({...t,coerce:!0}),boolean:t=>P1.create({...t,coerce:!0}),bigint:t=>Qa.create({...t,coerce:!0}),date:t=>tl.create({...t,coerce:!0})},any:Bj,array:$j,bigint:Lj,boolean:qb,date:Pj,discriminatedUnion:Gj,effect:Qb,enum:nF,function:Jj,instanceof:Mj,intersection:Kj,lazy:eF,literal:tF,map:Zj,nan:Ij,nativeEnum:rF,never:zj,null:Fj,nullable:aF,number:Kb,object:Vj,oboolean:()=>qb().optional(),onumber:()=>Kb().optional(),optional:sF,ostring:()=>Gb().optional(),pipeline:lF,preprocess:oF,promise:iF,record:Qj,set:Xj,strictObject:Yj,string:Gb,symbol:Rj,transformer:Qb,tuple:qj,undefined:jj,union:Wj,unknown:Hj,void:Uj,NEVER:Oe,ZodIssueCode:ie,quotelessJson:fj,ZodError:Sr});const cF=E.object({origin:E.union([E.string(),E.array(E.string())]),allowMethods:E.array(E.string()).optional(),allowHeaders:E.array(E.string()).optional(),exposeHeaders:E.array(E.string()).optional(),maxAge:E.number().optional(),credentials:E.boolean().optional()}),uF=E.object({message:E.string().optional(),code:E.string().optional(),expected:E.string().optional(),received:E.string().optional(),path:E.array(E.string()).optional()});E.object({messages:E.array(uF).optional()});const Tp=E.string(),Sp=E.string(),g4=E.object({created_at:E.string().optional().describe("ISO string creation time"),updated_at:E.string().optional().describe("ISO string update time")}).describe("Timestamps");E.object({search:E.array(E.string()).optional()}).describe("searchable");const dF=E.object({id:E.string().optional().describe("ID")}).describe("with `id`"),fF=E.object({id:E.string().describe("ID")}).describe("with `id`"),ei=E.object({id:E.string().optional().describe("Optional `id`"),handle:E.string().optional().describe("Optional `handle`")}),hF=E.object({key:E.string().describe("The key"),value:E.string().optional().describe("The value")}).describe("Attribute type, a key/value storage"),pF=E.object({iss:E.string(),sub:E.string(),aud:E.string(),exp:E.number(),nbf:E.number(),iat:E.number(),jti:E.string(),roles:E.array(E.string()).describe("User roles and authorizations")}),y4=E.object({email:E.string().email().describe("Email of user"),password:E.string().min(4).max(20).describe("password")}).describe("Auth base type"),mF=E.union([E.literal("admin"),E.literal("user"),E.string()]).describe("Role of authenticated user");y4.describe("Sign in type"),y4.and(E.object({firstname:E.string().optional().describe("(optional) readable `name` of `customer`"),lastname:E.string().optional().describe("(optional) readable `name` of `customer`")})).describe("Sign up type"),E.object({user_id_or_email:E.string().describe("User `ID` or `Email`"),current_password:E.string().describe("Current password"),new_password:E.string().describe("New password"),confirm_new_password:E.string().describe("Again New password for confirmation")}).describe("Change Password Type"),E.object({refresh_token:E.string().describe("A refresh token")}).describe("Refresh token input type");const Zb=E.object({token:E.string().describe("a token (`access` or `refresh`)"),claims:pF.partial().describe("Claims the `JSON Web Token` holds")}).describe("API token with parsed claims");E.object({apikey:E.string().describe("The `apikey` is `base64_uri(apikey@storecraft.api:{password})`.\nIt will be shown only once to the user, at the `backend`, the password hash\nwill be saved, thus, the real password is only known to the user.")}).describe("Result of `auth` `apikey` creation"),E.object({token_type:E.string().describe("The type of token, should be `bearer` or `refresh`"),user_id:E.string().describe("the `ID` of user, example `au_....`"),access_token:Zb.describe("The access token"),refresh_token:Zb.describe("The refresh token")}).describe("Result of `auth` request for `signin` / `signup` / `refresh`");const Mi=fF.extend(g4.shape).extend({media:E.array(E.string()).optional().describe("List of images urls"),attributes:E.array(hF).optional().describe("List of attributes"),tags:E.array(E.string()).optional().describe("List of tags , example ['genere_action', 'rated_M', ...]"),description:E.string().optional().describe("Rich description"),active:E.boolean().optional().describe("Is the entity active ?")});dF.extend(g4.shape).extend({handle:E.string().describe("The key name"),values:E.array(E.string()).describe("List of values, related to the key")}).omit({id:!0,handle:!0}).and(ei).describe("Tag upsert type");const v4=Mi.extend({handle:E.string().describe("The `handle` of the entity"),title:E.string().min(3,"Title should be longer than 3").describe("Title of collection"),active:E.boolean().describe("Is the entity active ?"),published:E.string().optional().describe(`Collections can be exported into
171
+ at `+a}return e},kc.buildMessage=function(t,e){var n={literal:function(c){return'"'+i(c.text)+'"'},class:function(c){var u=c.parts.map(function(d){return Array.isArray(d)?s(d[0])+"-"+s(d[1]):s(d)});return"["+(c.inverted?"^":"")+u.join("")+"]"},any:function(){return"any character"},end:function(){return"end of input"},other:function(c){return c.description}};function r(c){return c.charCodeAt(0).toString(16).toUpperCase()}function i(c){return c.replace(/\\/g,"\\\\").replace(/"/g,'\\"').replace(/\0/g,"\\0").replace(/\t/g,"\\t").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/[\x00-\x0F]/g,function(u){return"\\x0"+r(u)}).replace(/[\x10-\x1F\x7F-\x9F]/g,function(u){return"\\x"+r(u)})}function s(c){return c.replace(/\\/g,"\\\\").replace(/\]/g,"\\]").replace(/\^/g,"\\^").replace(/-/g,"\\-").replace(/\0/g,"\\0").replace(/\t/g,"\\t").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/[\x00-\x0F]/g,function(u){return"\\x0"+r(u)}).replace(/[\x10-\x1F\x7F-\x9F]/g,function(u){return"\\x"+r(u)})}function a(c){return n[c.type](c)}function o(c){var u=c.map(a),d,h;if(u.sort(),u.length>0){for(d=1,h=1;d<u.length;d++)u[d-1]!==u[d]&&(u[h]=u[d],h++);u.length=h}switch(u.length){case 1:return u[0];case 2:return u[0]+" or "+u[1];default:return u.slice(0,-1).join(", ")+", or "+u[u.length-1]}}function l(c){return c?'"'+i(c)+'"':"end of input"}return"Expected "+o(t)+" but "+l(e)+" found."};function nj(t,e){e=e!==void 0?e:{};var n={},r=e.grammarSource,i={expression:tr},s=tr,a="|",o="-",l="(",c=")",u="'",d='"',h=/^[^"' ()|&]/,p=/^[^']/,m=/^[^"]/,g=/^[ ]/,y=Fe("expression"),v=Fe("sum term"),x=An("|",!1),b=Fe("product term"),w=An("&",!1),C=Fe("subexpression"),S=An("-",!1),k=Fe("term"),N=An("(",!1),D=An(")",!1),A=Fe("variable"),L=vr(['"',"'"," ","(",")","|","&"],!0,!1),$=Fe("variable 1"),K=An("'",!1),X=vr(["'"],!0,!1),H=An('"',!1),U=vr(['"'],!0,!1),G=Fe("whitespace character(s)"),R=vr([" "],!1,!1),z=function(Y,te){return Ab("|",Y,te)},O=function(Y,te){return Ab("&",Y,te)},W=function(Y){return{op:"!",args:[Y]}},Z=function(Y){return Y.group=!0,Y},I=function(Y){return{op:"LEAF",value:vi().trim()}},se=function(Y){return{op:"LEAF",value:vi().trim().slice(1,-1)}},V=0,ce=0,De=[{line:1,column:1}],we=0,Ne=[],ve=0,qt;if("startRule"in e){if(!(e.startRule in i))throw new Error(`Can't start parsing from rule "`+e.startRule+'".');s=i[e.startRule]}function vi(){return t.substring(ce,V)}function An(Y,te){return{type:"literal",text:Y,ignoreCase:te}}function vr(Y,te,ue){return{type:"class",parts:Y,inverted:te,ignoreCase:ue}}function Ps(){return{type:"end"}}function Fe(Y){return{type:"other",description:Y}}function xi(Y){var te=De[Y],ue;if(te)return te;for(ue=Y-1;!De[ue];)ue--;for(te=De[ue],te={line:te.line,column:te.column};ue<Y;)t.charCodeAt(ue)===10?(te.line++,te.column=1):te.column++,ue++;return De[Y]=te,te}function Dn(Y,te,ue){var st=xi(Y),tt=xi(te),qi={source:r,start:{offset:Y,line:st.line,column:st.column},end:{offset:te,line:tt.line,column:tt.column}};return qi}function Ue(Y){V<we||(V>we&&(we=V,Ne=[]),Ne.push(Y))}function er(Y,te,ue){return new kc(kc.buildMessage(Y,te),Y,te,ue)}function tr(){var Y;return ve++,Y=Ul(),ve--,Y===n&&ve===0&&Ue(y),Y}function Ul(){var Y,te,ue,st;return ve++,Y=V,te=Mo(),te!==n?(t.charCodeAt(V)===124?(ue=a,V++):(ue=n,ve===0&&Ue(x)),ue!==n?(st=Ul(),st!==n?(ce=Y,Y=z(te,st)):(V=Y,Y=n)):(V=Y,Y=n)):(V=Y,Y=n),Y===n&&(Y=Mo()),ve--,Y===n&&(te=n,ve===0&&Ue(v)),Y}function Mo(){var Y,te,ue;return ve++,Y=V,te=Io(),te!==n?(t.charCodeAt(V)===38?V++:ve===0&&Ue(w),ue=Mo(),ue!==n?(ce=Y,Y=O(te,ue)):(V=Y,Y=n)):(V=Y,Y=n),Y===n&&(Y=Io()),ve--,Y===n&&(te=n,ve===0&&Ue(b)),Y}function Io(){var Y,te,ue;return ve++,Y=V,ne(),t.charCodeAt(V)===45?(te=o,V++):(te=n,ve===0&&Ue(S)),te!==n?(ue=$l(),ue!==n?(ne(),ce=Y,Y=W(ue)):(V=Y,Y=n)):(V=Y,Y=n),Y===n&&(Y=$l()),ve--,Y===n&&ve===0&&Ue(C),Y}function $l(){var Y,te,ue,st;return ve++,Y=q(),Y===n&&(Y=Mu()),Y===n&&(Y=V,ne(),t.charCodeAt(V)===40?(te=l,V++):(te=n,ve===0&&Ue(N)),te!==n?(ue=tr(),ue!==n?(t.charCodeAt(V)===41?(st=c,V++):(st=n,ve===0&&Ue(D)),st!==n?(ne(),ce=Y,Y=Z(ue)):(V=Y,Y=n)):(V=Y,Y=n)):(V=Y,Y=n)),ve--,Y===n&&ve===0&&Ue(k),Y}function Mu(){var Y,te,ue;if(ve++,Y=V,ne(),te=[],h.test(t.charAt(V))?(ue=t.charAt(V),V++):(ue=n,ve===0&&Ue(L)),ue!==n)for(;ue!==n;)te.push(ue),h.test(t.charAt(V))?(ue=t.charAt(V),V++):(ue=n,ve===0&&Ue(L));else te=n;return te!==n?(ue=ne(),ce=Y,Y=I()):(V=Y,Y=n),ve--,Y===n&&ve===0&&Ue(A),Y}function q(){var Y,te,ue,st,tt;if(ve++,Y=V,ne(),te=V,t.charCodeAt(V)===39?(ue=u,V++):(ue=n,ve===0&&Ue(K)),ue!==n){if(st=[],p.test(t.charAt(V))?(tt=t.charAt(V),V++):(tt=n,ve===0&&Ue(X)),tt!==n)for(;tt!==n;)st.push(tt),p.test(t.charAt(V))?(tt=t.charAt(V),V++):(tt=n,ve===0&&Ue(X));else st=n;st!==n?(t.charCodeAt(V)===39?(tt=u,V++):(tt=n,ve===0&&Ue(K)),tt!==n?(ue=[ue,st,tt],te=ue):(V=te,te=n)):(V=te,te=n)}else V=te,te=n;if(te===n)if(te=V,t.charCodeAt(V)===34?(ue=d,V++):(ue=n,ve===0&&Ue(H)),ue!==n){if(st=[],m.test(t.charAt(V))?(tt=t.charAt(V),V++):(tt=n,ve===0&&Ue(U)),tt!==n)for(;tt!==n;)st.push(tt),m.test(t.charAt(V))?(tt=t.charAt(V),V++):(tt=n,ve===0&&Ue(U));else st=n;st!==n?(t.charCodeAt(V)===34?(tt=d,V++):(tt=n,ve===0&&Ue(H)),tt!==n?(ue=[ue,st,tt],te=ue):(V=te,te=n)):(V=te,te=n)}else V=te,te=n;return te!==n?(ue=ne(),ce=Y,Y=se()):(V=Y,Y=n),ve--,Y===n&&ve===0&&Ue($),Y}function ne(){var Y,te;for(ve++,Y=[],g.test(t.charAt(V))?(te=t.charAt(V),V++):(te=n,ve===0&&Ue(R));te!==n;)Y.push(te),g.test(t.charAt(V))?(te=t.charAt(V),V++):(te=n,ve===0&&Ue(R));return ve--,te=n,ve===0&&Ue(G),Y}if(qt=s(),qt!==n&&V===t.length)return qt;throw qt!==n&&V<t.length&&Ue(Ps()),er(Ne,we<t.length?t.charAt(we):null,we<t.length?Dn(we,we+1):Dn(we,we))}class rj extends Error{constructor(e,n=400){super(JSON.stringify(e,null,2)),this.code=n,this.message=e;try{this.message_string=JSON.stringify(this.message,null,2)}catch{this.message_string=":("}}toString(){return this.message_string}}const mp=(t,e,n=400)=>{if(!t)throw new rj([{message:e}],n)},ij=(t,e="-")=>{if(typeof t!="string")return;let n=t.trim();if(n!==""&&(n=n.toLowerCase().match(/[\p{L}\d]+/gu).join(e),n.length!=0))return n},Db="sortBy",Ob="order",s4="limit",a4="limitToLast",o4="vql",Mb="startAt",Ib="startAfter",Lb="endAt",Pb="endBefore",Rb="expand",gp=(t="")=>{if(!t)return;const e=/(^[^\w]+)/g,n=/([^\w]+$)/g;let r=t.match(e),i=t.match(n),s=t.substring((r==null?void 0:r[0].length)??0);if(s=s.substring(0,s.length-((i==null?void 0:i[0].length)??0)),s!=="")return s.split(",").map(a=>{const o=a.split(":");return[o[0].trim(),o.slice(1).join(":").trim()]})},sj=(t,e=["*"])=>{var n,r;return((r=(n=t.get(Rb))==null?void 0:n.replace(/[()]/g,"").split(","))==null?void 0:r.map(i=>i.trim()).filter(Boolean))??e},aj=t=>(t??"(updated_at, id)").replace(/[()]/g,"").split(",").map(e=>e.trim()).filter(Boolean),oj=(t="desc")=>t==="asc"?"asc":"desc",lj=t=>{t=t instanceof URLSearchParams?t:new URLSearchParams(t);const e={};e.expand=sj(t),e.limit=parseInt(t.get(s4))?Math.abs(parseInt(t.get(s4))):void 0,e.limitToLast=parseInt(t.get(a4))?Math.abs(parseInt(t.get(a4))):void 0,!e.limitToLast&&!e.limit&&(e.limit=5);try{const a=t.get(o4);a&&(e.vqlParsed=nj(a))}catch(a){console.log(a),mp(!1,"VQL parsing failed",401)}e.vql=t.get(o4),e.startAt=gp(t.get(Mb)),e.startAfter=gp(t.get(Ib)),mp(!(e.startAt&&e.startAfter),"Cannot set both startAt and startAfter",401),e.endAt=gp(t.get(Lb)),e.endBefore=gp(t.get(Pb)),mp(!(e.endAt&&e.endBefore),"Cannot set both endAt and endAfter",401);const n=e.startAt||e.startAfter,r=e.endAt||e.endBefore,i=((n==null?void 0:n.length)??0)<((r==null?void 0:r.length)??0)?n:r,s=i===n?r:n;if(n&&r)for(let a=0;a<i.length;a++){const o=i[a][0],l=s[a][0];mp(o===l,`non matching keys \`${o}\`!==\`${l}\` in range cursors`,401)}return e.sortBy=aj(t.get(Db)),e.order=oj(t.get(Ob)),s&&(s!=null&&s.length)&&(e.sortBy=s.map(([a,o],l)=>a)),e},l4=t=>"("+t.join(",")+")",cj=t=>{const e=t.map(n=>`${n[0]}:${n[1]}`);return l4(e)},os=t=>{const e=new URLSearchParams;return t.order=(t==null?void 0:t.order)??"desc",t.sortBy=(t==null?void 0:t.sortBy)??["updated_at","id"],t.expand=(t==null?void 0:t.expand)??["*"],!t.limit&&!t.limitToLast&&(t.limit=5),[{cursor:t.endAt,key:Lb},{cursor:t.endBefore,key:Pb},{cursor:t.startAt,key:Mb},{cursor:t.startAfter,key:Ib}].filter(n=>{var r;return!!n.cursor&&((r=n.cursor)==null?void 0:r.length)}).forEach(n=>{e.set(n.key,cj(n.cursor))}),e.set(Ob,t.order),e.set(Db,l4(t.sortBy)),e.set(Rb,l4(t.expand)),t.vql&&e.set(o4,t.vql),t.limit&&e.set(s4,t.limit.toString()),t.limitToLast&&e.set(a4,t.limitToLast.toString()),e},jb=t=>{if(typeof t!="string")return;let e=t.trim();if(e!==""&&(e=e.toLowerCase().match(/[\p{L}\d]+/gu).join("-"),e.length!=0))return e},uj=(t,e)=>{if(!t)throw e},D1=(t,e)=>{var r;let n=(r=t==null?void 0:t.endpoint)==null?void 0:r.trim();return n=n!=null&&n.endsWith("/")?n.slice(0,-1):n,e=e!=null&&e.startsWith("/")?e.slice(1):e,n?`${n}/api/${e}`:`/api/${e}`},Ga=async(t,e,n={})=>{const r=await t.auth.working_auth_token(),i=(t.auth.authStrategy==="apikey"?"Basic":"Bearer")+` ${r}`;return await fetch(D1(t.config,e),{...n,headers:{...(n==null?void 0:n.headers)??{},Authorization:i}})},sn=async(t,e,n={})=>{const r=await Ga(t,e,n),i=r.ok;let s;try{s=await r.json()}catch(a){console.log("fetchApiWithAuth.json()",a)}if(!i)throw s;return s};async function el(t,e,n){return sn(t,`${e}/${n}`,{method:"get"})}async function Fb(t,e,n){return sn(t,`${e}`,{method:"post",body:JSON.stringify(n),headers:{"Content-Type":"application/json"}})}async function c4(t,e,n){return sn(t,`${e}/${n}`,{method:"delete"})}async function yp(t,e,n={}){const r=os(n);return sn(t,`${e}?${r.toString()}`,{method:"get"})}class Tr{constructor(e,n){_i(this,Of);_i(this,Mf);Lo(this,Of,e),Lo(this,Mf,n)}async get(e){return el(this.sdk,this.base_name,e)}async upsert(e){return Fb(this.sdk,this.base_name,e)}async remove(e){return c4(this.sdk,this.base_name,e)}async list(e){return yp(this.sdk,this.base_name,e)}get base_name(){return ft(this,Mf)}get sdk(){return ft(this,Of)}}Of=new WeakMap,Mf=new WeakMap,typeof TextDecoder=="function"&&new TextDecoder,typeof TextEncoder=="function"&&new TextEncoder;const dj=Array.prototype.slice.call("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=");(t=>{let e={};return t.forEach((n,r)=>e[n]=r),e})(dj),String.fromCharCode.bind(String),typeof Uint8Array.from=="function"&&Uint8Array.from.bind(Uint8Array);var Xe;(function(t){t.assertEqual=i=>i;function e(i){}t.assertIs=e;function n(i){throw new Error}t.assertNever=n,t.arrayToEnum=i=>{const s={};for(const a of i)s[a]=a;return s},t.getValidEnumValues=i=>{const s=t.objectKeys(i).filter(o=>typeof i[i[o]]!="number"),a={};for(const o of s)a[o]=i[o];return t.objectValues(a)},t.objectValues=i=>t.objectKeys(i).map(function(s){return i[s]}),t.objectKeys=typeof Object.keys=="function"?i=>Object.keys(i):i=>{const s=[];for(const a in i)Object.prototype.hasOwnProperty.call(i,a)&&s.push(a);return s},t.find=(i,s)=>{for(const a of i)if(s(a))return a},t.isInteger=typeof Number.isInteger=="function"?i=>Number.isInteger(i):i=>typeof i=="number"&&isFinite(i)&&Math.floor(i)===i;function r(i,s=" | "){return i.map(a=>typeof a=="string"?`'${a}'`:a).join(s)}t.joinValues=r,t.jsonStringifyReplacer=(i,s)=>typeof s=="bigint"?s.toString():s})(Xe||(Xe={}));var u4;(function(t){t.mergeShapes=(e,n)=>({...e,...n})})(u4||(u4={}));const ye=Xe.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),Ka=t=>{switch(typeof t){case"undefined":return ye.undefined;case"string":return ye.string;case"number":return isNaN(t)?ye.nan:ye.number;case"boolean":return ye.boolean;case"function":return ye.function;case"bigint":return ye.bigint;case"symbol":return ye.symbol;case"object":return Array.isArray(t)?ye.array:t===null?ye.null:t.then&&typeof t.then=="function"&&t.catch&&typeof t.catch=="function"?ye.promise:typeof Map<"u"&&t instanceof Map?ye.map:typeof Set<"u"&&t instanceof Set?ye.set:typeof Date<"u"&&t instanceof Date?ye.date:ye.object;default:return ye.unknown}},ie=Xe.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]),fj=t=>JSON.stringify(t,null,2).replace(/"([^"]+)":/g,"$1:");class Sr extends Error{constructor(e){super(),this.issues=[],this.addIssue=r=>{this.issues=[...this.issues,r]},this.addIssues=(r=[])=>{this.issues=[...this.issues,...r]};const n=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,n):this.__proto__=n,this.name="ZodError",this.issues=e}get errors(){return this.issues}format(e){const n=e||function(s){return s.message},r={_errors:[]},i=s=>{for(const a of s.issues)if(a.code==="invalid_union")a.unionErrors.map(i);else if(a.code==="invalid_return_type")i(a.returnTypeError);else if(a.code==="invalid_arguments")i(a.argumentsError);else if(a.path.length===0)r._errors.push(n(a));else{let o=r,l=0;for(;l<a.path.length;){const c=a.path[l];l===a.path.length-1?(o[c]=o[c]||{_errors:[]},o[c]._errors.push(n(a))):o[c]=o[c]||{_errors:[]},o=o[c],l++}}};return i(this),r}static assert(e){if(!(e instanceof Sr))throw new Error(`Not a ZodError: ${e}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,Xe.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(e=n=>n.message){const n={},r=[];for(const i of this.issues)i.path.length>0?(n[i.path[0]]=n[i.path[0]]||[],n[i.path[0]].push(e(i))):r.push(e(i));return{formErrors:r,fieldErrors:n}}get formErrors(){return this.flatten()}}Sr.create=t=>new Sr(t);const Cc=(t,e)=>{let n;switch(t.code){case ie.invalid_type:t.received===ye.undefined?n="Required":n=`Expected ${t.expected}, received ${t.received}`;break;case ie.invalid_literal:n=`Invalid literal value, expected ${JSON.stringify(t.expected,Xe.jsonStringifyReplacer)}`;break;case ie.unrecognized_keys:n=`Unrecognized key(s) in object: ${Xe.joinValues(t.keys,", ")}`;break;case ie.invalid_union:n="Invalid input";break;case ie.invalid_union_discriminator:n=`Invalid discriminator value. Expected ${Xe.joinValues(t.options)}`;break;case ie.invalid_enum_value:n=`Invalid enum value. Expected ${Xe.joinValues(t.options)}, received '${t.received}'`;break;case ie.invalid_arguments:n="Invalid function arguments";break;case ie.invalid_return_type:n="Invalid function return type";break;case ie.invalid_date:n="Invalid date";break;case ie.invalid_string:typeof t.validation=="object"?"includes"in t.validation?(n=`Invalid input: must include "${t.validation.includes}"`,typeof t.validation.position=="number"&&(n=`${n} at one or more positions greater than or equal to ${t.validation.position}`)):"startsWith"in t.validation?n=`Invalid input: must start with "${t.validation.startsWith}"`:"endsWith"in t.validation?n=`Invalid input: must end with "${t.validation.endsWith}"`:Xe.assertNever(t.validation):t.validation!=="regex"?n=`Invalid ${t.validation}`:n="Invalid";break;case ie.too_small:t.type==="array"?n=`Array must contain ${t.exact?"exactly":t.inclusive?"at least":"more than"} ${t.minimum} element(s)`:t.type==="string"?n=`String must contain ${t.exact?"exactly":t.inclusive?"at least":"over"} ${t.minimum} character(s)`:t.type==="number"?n=`Number must be ${t.exact?"exactly equal to ":t.inclusive?"greater than or equal to ":"greater than "}${t.minimum}`:t.type==="date"?n=`Date must be ${t.exact?"exactly equal to ":t.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(t.minimum))}`:n="Invalid input";break;case ie.too_big:t.type==="array"?n=`Array must contain ${t.exact?"exactly":t.inclusive?"at most":"less than"} ${t.maximum} element(s)`:t.type==="string"?n=`String must contain ${t.exact?"exactly":t.inclusive?"at most":"under"} ${t.maximum} character(s)`:t.type==="number"?n=`Number must be ${t.exact?"exactly":t.inclusive?"less than or equal to":"less than"} ${t.maximum}`:t.type==="bigint"?n=`BigInt must be ${t.exact?"exactly":t.inclusive?"less than or equal to":"less than"} ${t.maximum}`:t.type==="date"?n=`Date must be ${t.exact?"exactly":t.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(t.maximum))}`:n="Invalid input";break;case ie.custom:n="Invalid input";break;case ie.invalid_intersection_types:n="Intersection results could not be merged";break;case ie.not_multiple_of:n=`Number must be a multiple of ${t.multipleOf}`;break;case ie.not_finite:n="Number must be finite";break;default:n=e.defaultError,Xe.assertNever(t)}return{message:n}};let Bb=Cc;function hj(t){Bb=t}function vp(){return Bb}const xp=t=>{const{data:e,path:n,errorMaps:r,issueData:i}=t,s=[...n,...i.path||[]],a={...i,path:s};if(i.message!==void 0)return{...i,path:s,message:i.message};let o="";const l=r.filter(c=>!!c).slice().reverse();for(const c of l)o=c(a,{data:e,defaultError:o}).message;return{...i,path:s,message:o}},pj=[];function me(t,e){const n=vp(),r=xp({issueData:e,data:t.data,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,n,n===Cc?void 0:Cc].filter(i=>!!i)});t.common.issues.push(r)}class Fn{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(e,n){const r=[];for(const i of n){if(i.status==="aborted")return Oe;i.status==="dirty"&&e.dirty(),r.push(i.value)}return{status:e.value,value:r}}static async mergeObjectAsync(e,n){const r=[];for(const i of n){const s=await i.key,a=await i.value;r.push({key:s,value:a})}return Fn.mergeObjectSync(e,r)}static mergeObjectSync(e,n){const r={};for(const i of n){const{key:s,value:a}=i;if(s.status==="aborted"||a.status==="aborted")return Oe;s.status==="dirty"&&e.dirty(),a.status==="dirty"&&e.dirty(),s.value!=="__proto__"&&(typeof a.value<"u"||i.alwaysSet)&&(r[s.value]=a.value)}return{status:e.value,value:r}}}const Oe=Object.freeze({status:"aborted"}),Tc=t=>({status:"dirty",value:t}),Kn=t=>({status:"valid",value:t}),d4=t=>t.status==="aborted",f4=t=>t.status==="dirty",O1=t=>t.status==="valid",M1=t=>typeof Promise<"u"&&t instanceof Promise;function _p(t,e,n,r){if(typeof e=="function"?t!==e||!r:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return e.get(t)}function Hb(t,e,n,r,i){if(typeof e=="function"?t!==e||!i:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return e.set(t,n),n}typeof SuppressedError=="function"&&SuppressedError;var ke;(function(t){t.errToObj=e=>typeof e=="string"?{message:e}:e||{},t.toString=e=>typeof e=="string"?e:e==null?void 0:e.message})(ke||(ke={}));var I1,L1;class ls{constructor(e,n,r,i){this._cachedPath=[],this.parent=e,this.data=n,this._path=r,this._key=i}get path(){return this._cachedPath.length||(this._key instanceof Array?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}}const zb=(t,e)=>{if(O1(e))return{success:!0,data:e.value};if(!t.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;const n=new Sr(t.common.issues);return this._error=n,this._error}}};function Pe(t){if(!t)return{};const{errorMap:e,invalid_type_error:n,required_error:r,description:i}=t;if(e&&(n||r))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return e?{errorMap:e,description:i}:{errorMap:(a,o)=>{var l,c;const{message:u}=t;return a.code==="invalid_enum_value"?{message:u??o.defaultError}:typeof o.data>"u"?{message:(l=u??r)!==null&&l!==void 0?l:o.defaultError}:a.code!=="invalid_type"?{message:o.defaultError}:{message:(c=u??n)!==null&&c!==void 0?c:o.defaultError}},description:i}}class je{constructor(e){this.spa=this.safeParseAsync,this._def=e,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this)}get description(){return this._def.description}_getType(e){return Ka(e.data)}_getOrReturnCtx(e,n){return n||{common:e.parent.common,data:e.data,parsedType:Ka(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}_processInputParams(e){return{status:new Fn,ctx:{common:e.parent.common,data:e.data,parsedType:Ka(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}}_parseSync(e){const n=this._parse(e);if(M1(n))throw new Error("Synchronous parse encountered promise.");return n}_parseAsync(e){const n=this._parse(e);return Promise.resolve(n)}parse(e,n){const r=this.safeParse(e,n);if(r.success)return r.data;throw r.error}safeParse(e,n){var r;const i={common:{issues:[],async:(r=n==null?void 0:n.async)!==null&&r!==void 0?r:!1,contextualErrorMap:n==null?void 0:n.errorMap},path:(n==null?void 0:n.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:Ka(e)},s=this._parseSync({data:e,path:i.path,parent:i});return zb(i,s)}async parseAsync(e,n){const r=await this.safeParseAsync(e,n);if(r.success)return r.data;throw r.error}async safeParseAsync(e,n){const r={common:{issues:[],contextualErrorMap:n==null?void 0:n.errorMap,async:!0},path:(n==null?void 0:n.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:Ka(e)},i=this._parse({data:e,path:r.path,parent:r}),s=await(M1(i)?i:Promise.resolve(i));return zb(r,s)}refine(e,n){const r=i=>typeof n=="string"||typeof n>"u"?{message:n}:typeof n=="function"?n(i):n;return this._refinement((i,s)=>{const a=e(i),o=()=>s.addIssue({code:ie.custom,...r(i)});return typeof Promise<"u"&&a instanceof Promise?a.then(l=>l?!0:(o(),!1)):a?!0:(o(),!1)})}refinement(e,n){return this._refinement((r,i)=>e(r)?!0:(i.addIssue(typeof n=="function"?n(r,i):n),!1))}_refinement(e){return new Oi({schema:this,typeName:Ae.ZodEffects,effect:{type:"refinement",refinement:e}})}superRefine(e){return this._refinement(e)}optional(){return us.create(this,this._def)}nullable(){return Xa.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return Di.create(this,this._def)}promise(){return Dc.create(this,this._def)}or(e){return F1.create([this,e],this._def)}and(e){return B1.create(this,e,this._def)}transform(e){return new Oi({...Pe(this._def),schema:this,typeName:Ae.ZodEffects,effect:{type:"transform",transform:e}})}default(e){const n=typeof e=="function"?e:()=>e;return new V1({...Pe(this._def),innerType:this,defaultValue:n,typeName:Ae.ZodDefault})}brand(){return new m4({typeName:Ae.ZodBranded,type:this,...Pe(this._def)})}catch(e){const n=typeof e=="function"?e:()=>e;return new Y1({...Pe(this._def),innerType:this,catchValue:n,typeName:Ae.ZodCatch})}describe(e){const n=this.constructor;return new n({...this._def,description:e})}pipe(e){return W1.create(this,e)}readonly(){return G1.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const mj=/^c[^\s-]{8,}$/i,gj=/^[0-9a-z]+$/,yj=/^[0-9A-HJKMNP-TV-Z]{26}$/,vj=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,xj=/^[a-z0-9_-]{21}$/i,_j=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,bj=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,wj="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let h4;const Ej=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,kj=/^(([a-f0-9]{1,4}:){7}|::([a-f0-9]{1,4}:){0,6}|([a-f0-9]{1,4}:){1}:([a-f0-9]{1,4}:){0,5}|([a-f0-9]{1,4}:){2}:([a-f0-9]{1,4}:){0,4}|([a-f0-9]{1,4}:){3}:([a-f0-9]{1,4}:){0,3}|([a-f0-9]{1,4}:){4}:([a-f0-9]{1,4}:){0,2}|([a-f0-9]{1,4}:){5}:([a-f0-9]{1,4}:){0,1})([a-f0-9]{1,4}|(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2})))$/,Cj=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,Ub="((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))",Tj=new RegExp(`^${Ub}$`);function $b(t){let e="([01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d";return t.precision?e=`${e}\\.\\d{${t.precision}}`:t.precision==null&&(e=`${e}(\\.\\d+)?`),e}function Sj(t){return new RegExp(`^${$b(t)}$`)}function Vb(t){let e=`${Ub}T${$b(t)}`;const n=[];return n.push(t.local?"Z?":"Z"),t.offset&&n.push("([+-]\\d{2}:?\\d{2})"),e=`${e}(${n.join("|")})`,new RegExp(`^${e}$`)}function Nj(t,e){return!!((e==="v4"||!e)&&Ej.test(t)||(e==="v6"||!e)&&kj.test(t))}class Ai extends je{_parse(e){if(this._def.coerce&&(e.data=String(e.data)),this._getType(e)!==ye.string){const s=this._getOrReturnCtx(e);return me(s,{code:ie.invalid_type,expected:ye.string,received:s.parsedType}),Oe}const r=new Fn;let i;for(const s of this._def.checks)if(s.kind==="min")e.data.length<s.value&&(i=this._getOrReturnCtx(e,i),me(i,{code:ie.too_small,minimum:s.value,type:"string",inclusive:!0,exact:!1,message:s.message}),r.dirty());else if(s.kind==="max")e.data.length>s.value&&(i=this._getOrReturnCtx(e,i),me(i,{code:ie.too_big,maximum:s.value,type:"string",inclusive:!0,exact:!1,message:s.message}),r.dirty());else if(s.kind==="length"){const a=e.data.length>s.value,o=e.data.length<s.value;(a||o)&&(i=this._getOrReturnCtx(e,i),a?me(i,{code:ie.too_big,maximum:s.value,type:"string",inclusive:!0,exact:!0,message:s.message}):o&&me(i,{code:ie.too_small,minimum:s.value,type:"string",inclusive:!0,exact:!0,message:s.message}),r.dirty())}else if(s.kind==="email")bj.test(e.data)||(i=this._getOrReturnCtx(e,i),me(i,{validation:"email",code:ie.invalid_string,message:s.message}),r.dirty());else if(s.kind==="emoji")h4||(h4=new RegExp(wj,"u")),h4.test(e.data)||(i=this._getOrReturnCtx(e,i),me(i,{validation:"emoji",code:ie.invalid_string,message:s.message}),r.dirty());else if(s.kind==="uuid")vj.test(e.data)||(i=this._getOrReturnCtx(e,i),me(i,{validation:"uuid",code:ie.invalid_string,message:s.message}),r.dirty());else if(s.kind==="nanoid")xj.test(e.data)||(i=this._getOrReturnCtx(e,i),me(i,{validation:"nanoid",code:ie.invalid_string,message:s.message}),r.dirty());else if(s.kind==="cuid")mj.test(e.data)||(i=this._getOrReturnCtx(e,i),me(i,{validation:"cuid",code:ie.invalid_string,message:s.message}),r.dirty());else if(s.kind==="cuid2")gj.test(e.data)||(i=this._getOrReturnCtx(e,i),me(i,{validation:"cuid2",code:ie.invalid_string,message:s.message}),r.dirty());else if(s.kind==="ulid")yj.test(e.data)||(i=this._getOrReturnCtx(e,i),me(i,{validation:"ulid",code:ie.invalid_string,message:s.message}),r.dirty());else if(s.kind==="url")try{new URL(e.data)}catch{i=this._getOrReturnCtx(e,i),me(i,{validation:"url",code:ie.invalid_string,message:s.message}),r.dirty()}else s.kind==="regex"?(s.regex.lastIndex=0,s.regex.test(e.data)||(i=this._getOrReturnCtx(e,i),me(i,{validation:"regex",code:ie.invalid_string,message:s.message}),r.dirty())):s.kind==="trim"?e.data=e.data.trim():s.kind==="includes"?e.data.includes(s.value,s.position)||(i=this._getOrReturnCtx(e,i),me(i,{code:ie.invalid_string,validation:{includes:s.value,position:s.position},message:s.message}),r.dirty()):s.kind==="toLowerCase"?e.data=e.data.toLowerCase():s.kind==="toUpperCase"?e.data=e.data.toUpperCase():s.kind==="startsWith"?e.data.startsWith(s.value)||(i=this._getOrReturnCtx(e,i),me(i,{code:ie.invalid_string,validation:{startsWith:s.value},message:s.message}),r.dirty()):s.kind==="endsWith"?e.data.endsWith(s.value)||(i=this._getOrReturnCtx(e,i),me(i,{code:ie.invalid_string,validation:{endsWith:s.value},message:s.message}),r.dirty()):s.kind==="datetime"?Vb(s).test(e.data)||(i=this._getOrReturnCtx(e,i),me(i,{code:ie.invalid_string,validation:"datetime",message:s.message}),r.dirty()):s.kind==="date"?Tj.test(e.data)||(i=this._getOrReturnCtx(e,i),me(i,{code:ie.invalid_string,validation:"date",message:s.message}),r.dirty()):s.kind==="time"?Sj(s).test(e.data)||(i=this._getOrReturnCtx(e,i),me(i,{code:ie.invalid_string,validation:"time",message:s.message}),r.dirty()):s.kind==="duration"?_j.test(e.data)||(i=this._getOrReturnCtx(e,i),me(i,{validation:"duration",code:ie.invalid_string,message:s.message}),r.dirty()):s.kind==="ip"?Nj(e.data,s.version)||(i=this._getOrReturnCtx(e,i),me(i,{validation:"ip",code:ie.invalid_string,message:s.message}),r.dirty()):s.kind==="base64"?Cj.test(e.data)||(i=this._getOrReturnCtx(e,i),me(i,{validation:"base64",code:ie.invalid_string,message:s.message}),r.dirty()):Xe.assertNever(s);return{status:r.value,value:e.data}}_regex(e,n,r){return this.refinement(i=>e.test(i),{validation:n,code:ie.invalid_string,...ke.errToObj(r)})}_addCheck(e){return new Ai({...this._def,checks:[...this._def.checks,e]})}email(e){return this._addCheck({kind:"email",...ke.errToObj(e)})}url(e){return this._addCheck({kind:"url",...ke.errToObj(e)})}emoji(e){return this._addCheck({kind:"emoji",...ke.errToObj(e)})}uuid(e){return this._addCheck({kind:"uuid",...ke.errToObj(e)})}nanoid(e){return this._addCheck({kind:"nanoid",...ke.errToObj(e)})}cuid(e){return this._addCheck({kind:"cuid",...ke.errToObj(e)})}cuid2(e){return this._addCheck({kind:"cuid2",...ke.errToObj(e)})}ulid(e){return this._addCheck({kind:"ulid",...ke.errToObj(e)})}base64(e){return this._addCheck({kind:"base64",...ke.errToObj(e)})}ip(e){return this._addCheck({kind:"ip",...ke.errToObj(e)})}datetime(e){var n,r;return typeof e=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:e}):this._addCheck({kind:"datetime",precision:typeof(e==null?void 0:e.precision)>"u"?null:e==null?void 0:e.precision,offset:(n=e==null?void 0:e.offset)!==null&&n!==void 0?n:!1,local:(r=e==null?void 0:e.local)!==null&&r!==void 0?r:!1,...ke.errToObj(e==null?void 0:e.message)})}date(e){return this._addCheck({kind:"date",message:e})}time(e){return typeof e=="string"?this._addCheck({kind:"time",precision:null,message:e}):this._addCheck({kind:"time",precision:typeof(e==null?void 0:e.precision)>"u"?null:e==null?void 0:e.precision,...ke.errToObj(e==null?void 0:e.message)})}duration(e){return this._addCheck({kind:"duration",...ke.errToObj(e)})}regex(e,n){return this._addCheck({kind:"regex",regex:e,...ke.errToObj(n)})}includes(e,n){return this._addCheck({kind:"includes",value:e,position:n==null?void 0:n.position,...ke.errToObj(n==null?void 0:n.message)})}startsWith(e,n){return this._addCheck({kind:"startsWith",value:e,...ke.errToObj(n)})}endsWith(e,n){return this._addCheck({kind:"endsWith",value:e,...ke.errToObj(n)})}min(e,n){return this._addCheck({kind:"min",value:e,...ke.errToObj(n)})}max(e,n){return this._addCheck({kind:"max",value:e,...ke.errToObj(n)})}length(e,n){return this._addCheck({kind:"length",value:e,...ke.errToObj(n)})}nonempty(e){return this.min(1,ke.errToObj(e))}trim(){return new Ai({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new Ai({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new Ai({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(e=>e.kind==="datetime")}get isDate(){return!!this._def.checks.find(e=>e.kind==="date")}get isTime(){return!!this._def.checks.find(e=>e.kind==="time")}get isDuration(){return!!this._def.checks.find(e=>e.kind==="duration")}get isEmail(){return!!this._def.checks.find(e=>e.kind==="email")}get isURL(){return!!this._def.checks.find(e=>e.kind==="url")}get isEmoji(){return!!this._def.checks.find(e=>e.kind==="emoji")}get isUUID(){return!!this._def.checks.find(e=>e.kind==="uuid")}get isNANOID(){return!!this._def.checks.find(e=>e.kind==="nanoid")}get isCUID(){return!!this._def.checks.find(e=>e.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(e=>e.kind==="cuid2")}get isULID(){return!!this._def.checks.find(e=>e.kind==="ulid")}get isIP(){return!!this._def.checks.find(e=>e.kind==="ip")}get isBase64(){return!!this._def.checks.find(e=>e.kind==="base64")}get minLength(){let e=null;for(const n of this._def.checks)n.kind==="min"&&(e===null||n.value>e)&&(e=n.value);return e}get maxLength(){let e=null;for(const n of this._def.checks)n.kind==="max"&&(e===null||n.value<e)&&(e=n.value);return e}}Ai.create=t=>{var e;return new Ai({checks:[],typeName:Ae.ZodString,coerce:(e=t==null?void 0:t.coerce)!==null&&e!==void 0?e:!1,...Pe(t)})};function Aj(t,e){const n=(t.toString().split(".")[1]||"").length,r=(e.toString().split(".")[1]||"").length,i=n>r?n:r,s=parseInt(t.toFixed(i).replace(".","")),a=parseInt(e.toFixed(i).replace(".",""));return s%a/Math.pow(10,i)}class qa extends je{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(e){if(this._def.coerce&&(e.data=Number(e.data)),this._getType(e)!==ye.number){const s=this._getOrReturnCtx(e);return me(s,{code:ie.invalid_type,expected:ye.number,received:s.parsedType}),Oe}let r;const i=new Fn;for(const s of this._def.checks)s.kind==="int"?Xe.isInteger(e.data)||(r=this._getOrReturnCtx(e,r),me(r,{code:ie.invalid_type,expected:"integer",received:"float",message:s.message}),i.dirty()):s.kind==="min"?(s.inclusive?e.data<s.value:e.data<=s.value)&&(r=this._getOrReturnCtx(e,r),me(r,{code:ie.too_small,minimum:s.value,type:"number",inclusive:s.inclusive,exact:!1,message:s.message}),i.dirty()):s.kind==="max"?(s.inclusive?e.data>s.value:e.data>=s.value)&&(r=this._getOrReturnCtx(e,r),me(r,{code:ie.too_big,maximum:s.value,type:"number",inclusive:s.inclusive,exact:!1,message:s.message}),i.dirty()):s.kind==="multipleOf"?Aj(e.data,s.value)!==0&&(r=this._getOrReturnCtx(e,r),me(r,{code:ie.not_multiple_of,multipleOf:s.value,message:s.message}),i.dirty()):s.kind==="finite"?Number.isFinite(e.data)||(r=this._getOrReturnCtx(e,r),me(r,{code:ie.not_finite,message:s.message}),i.dirty()):Xe.assertNever(s);return{status:i.value,value:e.data}}gte(e,n){return this.setLimit("min",e,!0,ke.toString(n))}gt(e,n){return this.setLimit("min",e,!1,ke.toString(n))}lte(e,n){return this.setLimit("max",e,!0,ke.toString(n))}lt(e,n){return this.setLimit("max",e,!1,ke.toString(n))}setLimit(e,n,r,i){return new qa({...this._def,checks:[...this._def.checks,{kind:e,value:n,inclusive:r,message:ke.toString(i)}]})}_addCheck(e){return new qa({...this._def,checks:[...this._def.checks,e]})}int(e){return this._addCheck({kind:"int",message:ke.toString(e)})}positive(e){return this._addCheck({kind:"min",value:0,inclusive:!1,message:ke.toString(e)})}negative(e){return this._addCheck({kind:"max",value:0,inclusive:!1,message:ke.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:0,inclusive:!0,message:ke.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:0,inclusive:!0,message:ke.toString(e)})}multipleOf(e,n){return this._addCheck({kind:"multipleOf",value:e,message:ke.toString(n)})}finite(e){return this._addCheck({kind:"finite",message:ke.toString(e)})}safe(e){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:ke.toString(e)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:ke.toString(e)})}get minValue(){let e=null;for(const n of this._def.checks)n.kind==="min"&&(e===null||n.value>e)&&(e=n.value);return e}get maxValue(){let e=null;for(const n of this._def.checks)n.kind==="max"&&(e===null||n.value<e)&&(e=n.value);return e}get isInt(){return!!this._def.checks.find(e=>e.kind==="int"||e.kind==="multipleOf"&&Xe.isInteger(e.value))}get isFinite(){let e=null,n=null;for(const r of this._def.checks){if(r.kind==="finite"||r.kind==="int"||r.kind==="multipleOf")return!0;r.kind==="min"?(n===null||r.value>n)&&(n=r.value):r.kind==="max"&&(e===null||r.value<e)&&(e=r.value)}return Number.isFinite(n)&&Number.isFinite(e)}}qa.create=t=>new qa({checks:[],typeName:Ae.ZodNumber,coerce:(t==null?void 0:t.coerce)||!1,...Pe(t)});class Qa extends je{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(e){if(this._def.coerce&&(e.data=BigInt(e.data)),this._getType(e)!==ye.bigint){const s=this._getOrReturnCtx(e);return me(s,{code:ie.invalid_type,expected:ye.bigint,received:s.parsedType}),Oe}let r;const i=new Fn;for(const s of this._def.checks)s.kind==="min"?(s.inclusive?e.data<s.value:e.data<=s.value)&&(r=this._getOrReturnCtx(e,r),me(r,{code:ie.too_small,type:"bigint",minimum:s.value,inclusive:s.inclusive,message:s.message}),i.dirty()):s.kind==="max"?(s.inclusive?e.data>s.value:e.data>=s.value)&&(r=this._getOrReturnCtx(e,r),me(r,{code:ie.too_big,type:"bigint",maximum:s.value,inclusive:s.inclusive,message:s.message}),i.dirty()):s.kind==="multipleOf"?e.data%s.value!==BigInt(0)&&(r=this._getOrReturnCtx(e,r),me(r,{code:ie.not_multiple_of,multipleOf:s.value,message:s.message}),i.dirty()):Xe.assertNever(s);return{status:i.value,value:e.data}}gte(e,n){return this.setLimit("min",e,!0,ke.toString(n))}gt(e,n){return this.setLimit("min",e,!1,ke.toString(n))}lte(e,n){return this.setLimit("max",e,!0,ke.toString(n))}lt(e,n){return this.setLimit("max",e,!1,ke.toString(n))}setLimit(e,n,r,i){return new Qa({...this._def,checks:[...this._def.checks,{kind:e,value:n,inclusive:r,message:ke.toString(i)}]})}_addCheck(e){return new Qa({...this._def,checks:[...this._def.checks,e]})}positive(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:ke.toString(e)})}negative(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:ke.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:ke.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:ke.toString(e)})}multipleOf(e,n){return this._addCheck({kind:"multipleOf",value:e,message:ke.toString(n)})}get minValue(){let e=null;for(const n of this._def.checks)n.kind==="min"&&(e===null||n.value>e)&&(e=n.value);return e}get maxValue(){let e=null;for(const n of this._def.checks)n.kind==="max"&&(e===null||n.value<e)&&(e=n.value);return e}}Qa.create=t=>{var e;return new Qa({checks:[],typeName:Ae.ZodBigInt,coerce:(e=t==null?void 0:t.coerce)!==null&&e!==void 0?e:!1,...Pe(t)})};class P1 extends je{_parse(e){if(this._def.coerce&&(e.data=!!e.data),this._getType(e)!==ye.boolean){const r=this._getOrReturnCtx(e);return me(r,{code:ie.invalid_type,expected:ye.boolean,received:r.parsedType}),Oe}return Kn(e.data)}}P1.create=t=>new P1({typeName:Ae.ZodBoolean,coerce:(t==null?void 0:t.coerce)||!1,...Pe(t)});class tl extends je{_parse(e){if(this._def.coerce&&(e.data=new Date(e.data)),this._getType(e)!==ye.date){const s=this._getOrReturnCtx(e);return me(s,{code:ie.invalid_type,expected:ye.date,received:s.parsedType}),Oe}if(isNaN(e.data.getTime())){const s=this._getOrReturnCtx(e);return me(s,{code:ie.invalid_date}),Oe}const r=new Fn;let i;for(const s of this._def.checks)s.kind==="min"?e.data.getTime()<s.value&&(i=this._getOrReturnCtx(e,i),me(i,{code:ie.too_small,message:s.message,inclusive:!0,exact:!1,minimum:s.value,type:"date"}),r.dirty()):s.kind==="max"?e.data.getTime()>s.value&&(i=this._getOrReturnCtx(e,i),me(i,{code:ie.too_big,message:s.message,inclusive:!0,exact:!1,maximum:s.value,type:"date"}),r.dirty()):Xe.assertNever(s);return{status:r.value,value:new Date(e.data.getTime())}}_addCheck(e){return new tl({...this._def,checks:[...this._def.checks,e]})}min(e,n){return this._addCheck({kind:"min",value:e.getTime(),message:ke.toString(n)})}max(e,n){return this._addCheck({kind:"max",value:e.getTime(),message:ke.toString(n)})}get minDate(){let e=null;for(const n of this._def.checks)n.kind==="min"&&(e===null||n.value>e)&&(e=n.value);return e!=null?new Date(e):null}get maxDate(){let e=null;for(const n of this._def.checks)n.kind==="max"&&(e===null||n.value<e)&&(e=n.value);return e!=null?new Date(e):null}}tl.create=t=>new tl({checks:[],coerce:(t==null?void 0:t.coerce)||!1,typeName:Ae.ZodDate,...Pe(t)});class bp extends je{_parse(e){if(this._getType(e)!==ye.symbol){const r=this._getOrReturnCtx(e);return me(r,{code:ie.invalid_type,expected:ye.symbol,received:r.parsedType}),Oe}return Kn(e.data)}}bp.create=t=>new bp({typeName:Ae.ZodSymbol,...Pe(t)});class R1 extends je{_parse(e){if(this._getType(e)!==ye.undefined){const r=this._getOrReturnCtx(e);return me(r,{code:ie.invalid_type,expected:ye.undefined,received:r.parsedType}),Oe}return Kn(e.data)}}R1.create=t=>new R1({typeName:Ae.ZodUndefined,...Pe(t)});class j1 extends je{_parse(e){if(this._getType(e)!==ye.null){const r=this._getOrReturnCtx(e);return me(r,{code:ie.invalid_type,expected:ye.null,received:r.parsedType}),Oe}return Kn(e.data)}}j1.create=t=>new j1({typeName:Ae.ZodNull,...Pe(t)});class Sc extends je{constructor(){super(...arguments),this._any=!0}_parse(e){return Kn(e.data)}}Sc.create=t=>new Sc({typeName:Ae.ZodAny,...Pe(t)});class nl extends je{constructor(){super(...arguments),this._unknown=!0}_parse(e){return Kn(e.data)}}nl.create=t=>new nl({typeName:Ae.ZodUnknown,...Pe(t)});class Ks extends je{_parse(e){const n=this._getOrReturnCtx(e);return me(n,{code:ie.invalid_type,expected:ye.never,received:n.parsedType}),Oe}}Ks.create=t=>new Ks({typeName:Ae.ZodNever,...Pe(t)});class wp extends je{_parse(e){if(this._getType(e)!==ye.undefined){const r=this._getOrReturnCtx(e);return me(r,{code:ie.invalid_type,expected:ye.void,received:r.parsedType}),Oe}return Kn(e.data)}}wp.create=t=>new wp({typeName:Ae.ZodVoid,...Pe(t)});class Di extends je{_parse(e){const{ctx:n,status:r}=this._processInputParams(e),i=this._def;if(n.parsedType!==ye.array)return me(n,{code:ie.invalid_type,expected:ye.array,received:n.parsedType}),Oe;if(i.exactLength!==null){const a=n.data.length>i.exactLength.value,o=n.data.length<i.exactLength.value;(a||o)&&(me(n,{code:a?ie.too_big:ie.too_small,minimum:o?i.exactLength.value:void 0,maximum:a?i.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:i.exactLength.message}),r.dirty())}if(i.minLength!==null&&n.data.length<i.minLength.value&&(me(n,{code:ie.too_small,minimum:i.minLength.value,type:"array",inclusive:!0,exact:!1,message:i.minLength.message}),r.dirty()),i.maxLength!==null&&n.data.length>i.maxLength.value&&(me(n,{code:ie.too_big,maximum:i.maxLength.value,type:"array",inclusive:!0,exact:!1,message:i.maxLength.message}),r.dirty()),n.common.async)return Promise.all([...n.data].map((a,o)=>i.type._parseAsync(new ls(n,a,n.path,o)))).then(a=>Fn.mergeArray(r,a));const s=[...n.data].map((a,o)=>i.type._parseSync(new ls(n,a,n.path,o)));return Fn.mergeArray(r,s)}get element(){return this._def.type}min(e,n){return new Di({...this._def,minLength:{value:e,message:ke.toString(n)}})}max(e,n){return new Di({...this._def,maxLength:{value:e,message:ke.toString(n)}})}length(e,n){return new Di({...this._def,exactLength:{value:e,message:ke.toString(n)}})}nonempty(e){return this.min(1,e)}}Di.create=(t,e)=>new Di({type:t,minLength:null,maxLength:null,exactLength:null,typeName:Ae.ZodArray,...Pe(e)});function Nc(t){if(t instanceof jt){const e={};for(const n in t.shape){const r=t.shape[n];e[n]=us.create(Nc(r))}return new jt({...t._def,shape:()=>e})}else return t instanceof Di?new Di({...t._def,type:Nc(t.element)}):t instanceof us?us.create(Nc(t.unwrap())):t instanceof Xa?Xa.create(Nc(t.unwrap())):t instanceof cs?cs.create(t.items.map(e=>Nc(e))):t}class jt extends je{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;const e=this._def.shape(),n=Xe.objectKeys(e);return this._cached={shape:e,keys:n}}_parse(e){if(this._getType(e)!==ye.object){const c=this._getOrReturnCtx(e);return me(c,{code:ie.invalid_type,expected:ye.object,received:c.parsedType}),Oe}const{status:r,ctx:i}=this._processInputParams(e),{shape:s,keys:a}=this._getCached(),o=[];if(!(this._def.catchall instanceof Ks&&this._def.unknownKeys==="strip"))for(const c in i.data)a.includes(c)||o.push(c);const l=[];for(const c of a){const u=s[c],d=i.data[c];l.push({key:{status:"valid",value:c},value:u._parse(new ls(i,d,i.path,c)),alwaysSet:c in i.data})}if(this._def.catchall instanceof Ks){const c=this._def.unknownKeys;if(c==="passthrough")for(const u of o)l.push({key:{status:"valid",value:u},value:{status:"valid",value:i.data[u]}});else if(c==="strict")o.length>0&&(me(i,{code:ie.unrecognized_keys,keys:o}),r.dirty());else if(c!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const c=this._def.catchall;for(const u of o){const d=i.data[u];l.push({key:{status:"valid",value:u},value:c._parse(new ls(i,d,i.path,u)),alwaysSet:u in i.data})}}return i.common.async?Promise.resolve().then(async()=>{const c=[];for(const u of l){const d=await u.key,h=await u.value;c.push({key:d,value:h,alwaysSet:u.alwaysSet})}return c}).then(c=>Fn.mergeObjectSync(r,c)):Fn.mergeObjectSync(r,l)}get shape(){return this._def.shape()}strict(e){return ke.errToObj,new jt({...this._def,unknownKeys:"strict",...e!==void 0?{errorMap:(n,r)=>{var i,s,a,o;const l=(a=(s=(i=this._def).errorMap)===null||s===void 0?void 0:s.call(i,n,r).message)!==null&&a!==void 0?a:r.defaultError;return n.code==="unrecognized_keys"?{message:(o=ke.errToObj(e).message)!==null&&o!==void 0?o:l}:{message:l}}}:{}})}strip(){return new jt({...this._def,unknownKeys:"strip"})}passthrough(){return new jt({...this._def,unknownKeys:"passthrough"})}extend(e){return new jt({...this._def,shape:()=>({...this._def.shape(),...e})})}merge(e){return new jt({unknownKeys:e._def.unknownKeys,catchall:e._def.catchall,shape:()=>({...this._def.shape(),...e._def.shape()}),typeName:Ae.ZodObject})}setKey(e,n){return this.augment({[e]:n})}catchall(e){return new jt({...this._def,catchall:e})}pick(e){const n={};return Xe.objectKeys(e).forEach(r=>{e[r]&&this.shape[r]&&(n[r]=this.shape[r])}),new jt({...this._def,shape:()=>n})}omit(e){const n={};return Xe.objectKeys(this.shape).forEach(r=>{e[r]||(n[r]=this.shape[r])}),new jt({...this._def,shape:()=>n})}deepPartial(){return Nc(this)}partial(e){const n={};return Xe.objectKeys(this.shape).forEach(r=>{const i=this.shape[r];e&&!e[r]?n[r]=i:n[r]=i.optional()}),new jt({...this._def,shape:()=>n})}required(e){const n={};return Xe.objectKeys(this.shape).forEach(r=>{if(e&&!e[r])n[r]=this.shape[r];else{let s=this.shape[r];for(;s instanceof us;)s=s._def.innerType;n[r]=s}}),new jt({...this._def,shape:()=>n})}keyof(){return Yb(Xe.objectKeys(this.shape))}}jt.create=(t,e)=>new jt({shape:()=>t,unknownKeys:"strip",catchall:Ks.create(),typeName:Ae.ZodObject,...Pe(e)}),jt.strictCreate=(t,e)=>new jt({shape:()=>t,unknownKeys:"strict",catchall:Ks.create(),typeName:Ae.ZodObject,...Pe(e)}),jt.lazycreate=(t,e)=>new jt({shape:t,unknownKeys:"strip",catchall:Ks.create(),typeName:Ae.ZodObject,...Pe(e)});class F1 extends je{_parse(e){const{ctx:n}=this._processInputParams(e),r=this._def.options;function i(s){for(const o of s)if(o.result.status==="valid")return o.result;for(const o of s)if(o.result.status==="dirty")return n.common.issues.push(...o.ctx.common.issues),o.result;const a=s.map(o=>new Sr(o.ctx.common.issues));return me(n,{code:ie.invalid_union,unionErrors:a}),Oe}if(n.common.async)return Promise.all(r.map(async s=>{const a={...n,common:{...n.common,issues:[]},parent:null};return{result:await s._parseAsync({data:n.data,path:n.path,parent:a}),ctx:a}})).then(i);{let s;const a=[];for(const l of r){const c={...n,common:{...n.common,issues:[]},parent:null},u=l._parseSync({data:n.data,path:n.path,parent:c});if(u.status==="valid")return u;u.status==="dirty"&&!s&&(s={result:u,ctx:c}),c.common.issues.length&&a.push(c.common.issues)}if(s)return n.common.issues.push(...s.ctx.common.issues),s.result;const o=a.map(l=>new Sr(l));return me(n,{code:ie.invalid_union,unionErrors:o}),Oe}}get options(){return this._def.options}}F1.create=(t,e)=>new F1({options:t,typeName:Ae.ZodUnion,...Pe(e)});const qs=t=>t instanceof z1?qs(t.schema):t instanceof Oi?qs(t.innerType()):t instanceof U1?[t.value]:t instanceof Za?t.options:t instanceof $1?Xe.objectValues(t.enum):t instanceof V1?qs(t._def.innerType):t instanceof R1?[void 0]:t instanceof j1?[null]:t instanceof us?[void 0,...qs(t.unwrap())]:t instanceof Xa?[null,...qs(t.unwrap())]:t instanceof m4||t instanceof G1?qs(t.unwrap()):t instanceof Y1?qs(t._def.innerType):[];class Ep extends je{_parse(e){const{ctx:n}=this._processInputParams(e);if(n.parsedType!==ye.object)return me(n,{code:ie.invalid_type,expected:ye.object,received:n.parsedType}),Oe;const r=this.discriminator,i=n.data[r],s=this.optionsMap.get(i);return s?n.common.async?s._parseAsync({data:n.data,path:n.path,parent:n}):s._parseSync({data:n.data,path:n.path,parent:n}):(me(n,{code:ie.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[r]}),Oe)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(e,n,r){const i=new Map;for(const s of n){const a=qs(s.shape[e]);if(!a.length)throw new Error(`A discriminator value for key \`${e}\` could not be extracted from all schema options`);for(const o of a){if(i.has(o))throw new Error(`Discriminator property ${String(e)} has duplicate value ${String(o)}`);i.set(o,s)}}return new Ep({typeName:Ae.ZodDiscriminatedUnion,discriminator:e,options:n,optionsMap:i,...Pe(r)})}}function p4(t,e){const n=Ka(t),r=Ka(e);if(t===e)return{valid:!0,data:t};if(n===ye.object&&r===ye.object){const i=Xe.objectKeys(e),s=Xe.objectKeys(t).filter(o=>i.indexOf(o)!==-1),a={...t,...e};for(const o of s){const l=p4(t[o],e[o]);if(!l.valid)return{valid:!1};a[o]=l.data}return{valid:!0,data:a}}else if(n===ye.array&&r===ye.array){if(t.length!==e.length)return{valid:!1};const i=[];for(let s=0;s<t.length;s++){const a=t[s],o=e[s],l=p4(a,o);if(!l.valid)return{valid:!1};i.push(l.data)}return{valid:!0,data:i}}else return n===ye.date&&r===ye.date&&+t==+e?{valid:!0,data:t}:{valid:!1}}class B1 extends je{_parse(e){const{status:n,ctx:r}=this._processInputParams(e),i=(s,a)=>{if(d4(s)||d4(a))return Oe;const o=p4(s.value,a.value);return o.valid?((f4(s)||f4(a))&&n.dirty(),{status:n.value,value:o.data}):(me(r,{code:ie.invalid_intersection_types}),Oe)};return r.common.async?Promise.all([this._def.left._parseAsync({data:r.data,path:r.path,parent:r}),this._def.right._parseAsync({data:r.data,path:r.path,parent:r})]).then(([s,a])=>i(s,a)):i(this._def.left._parseSync({data:r.data,path:r.path,parent:r}),this._def.right._parseSync({data:r.data,path:r.path,parent:r}))}}B1.create=(t,e,n)=>new B1({left:t,right:e,typeName:Ae.ZodIntersection,...Pe(n)});class cs extends je{_parse(e){const{status:n,ctx:r}=this._processInputParams(e);if(r.parsedType!==ye.array)return me(r,{code:ie.invalid_type,expected:ye.array,received:r.parsedType}),Oe;if(r.data.length<this._def.items.length)return me(r,{code:ie.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),Oe;!this._def.rest&&r.data.length>this._def.items.length&&(me(r,{code:ie.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),n.dirty());const s=[...r.data].map((a,o)=>{const l=this._def.items[o]||this._def.rest;return l?l._parse(new ls(r,a,r.path,o)):null}).filter(a=>!!a);return r.common.async?Promise.all(s).then(a=>Fn.mergeArray(n,a)):Fn.mergeArray(n,s)}get items(){return this._def.items}rest(e){return new cs({...this._def,rest:e})}}cs.create=(t,e)=>{if(!Array.isArray(t))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new cs({items:t,typeName:Ae.ZodTuple,rest:null,...Pe(e)})};class H1 extends je{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){const{status:n,ctx:r}=this._processInputParams(e);if(r.parsedType!==ye.object)return me(r,{code:ie.invalid_type,expected:ye.object,received:r.parsedType}),Oe;const i=[],s=this._def.keyType,a=this._def.valueType;for(const o in r.data)i.push({key:s._parse(new ls(r,o,r.path,o)),value:a._parse(new ls(r,r.data[o],r.path,o)),alwaysSet:o in r.data});return r.common.async?Fn.mergeObjectAsync(n,i):Fn.mergeObjectSync(n,i)}get element(){return this._def.valueType}static create(e,n,r){return n instanceof je?new H1({keyType:e,valueType:n,typeName:Ae.ZodRecord,...Pe(r)}):new H1({keyType:Ai.create(),valueType:e,typeName:Ae.ZodRecord,...Pe(n)})}}class kp extends je{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){const{status:n,ctx:r}=this._processInputParams(e);if(r.parsedType!==ye.map)return me(r,{code:ie.invalid_type,expected:ye.map,received:r.parsedType}),Oe;const i=this._def.keyType,s=this._def.valueType,a=[...r.data.entries()].map(([o,l],c)=>({key:i._parse(new ls(r,o,r.path,[c,"key"])),value:s._parse(new ls(r,l,r.path,[c,"value"]))}));if(r.common.async){const o=new Map;return Promise.resolve().then(async()=>{for(const l of a){const c=await l.key,u=await l.value;if(c.status==="aborted"||u.status==="aborted")return Oe;(c.status==="dirty"||u.status==="dirty")&&n.dirty(),o.set(c.value,u.value)}return{status:n.value,value:o}})}else{const o=new Map;for(const l of a){const c=l.key,u=l.value;if(c.status==="aborted"||u.status==="aborted")return Oe;(c.status==="dirty"||u.status==="dirty")&&n.dirty(),o.set(c.value,u.value)}return{status:n.value,value:o}}}}kp.create=(t,e,n)=>new kp({valueType:e,keyType:t,typeName:Ae.ZodMap,...Pe(n)});class rl extends je{_parse(e){const{status:n,ctx:r}=this._processInputParams(e);if(r.parsedType!==ye.set)return me(r,{code:ie.invalid_type,expected:ye.set,received:r.parsedType}),Oe;const i=this._def;i.minSize!==null&&r.data.size<i.minSize.value&&(me(r,{code:ie.too_small,minimum:i.minSize.value,type:"set",inclusive:!0,exact:!1,message:i.minSize.message}),n.dirty()),i.maxSize!==null&&r.data.size>i.maxSize.value&&(me(r,{code:ie.too_big,maximum:i.maxSize.value,type:"set",inclusive:!0,exact:!1,message:i.maxSize.message}),n.dirty());const s=this._def.valueType;function a(l){const c=new Set;for(const u of l){if(u.status==="aborted")return Oe;u.status==="dirty"&&n.dirty(),c.add(u.value)}return{status:n.value,value:c}}const o=[...r.data.values()].map((l,c)=>s._parse(new ls(r,l,r.path,c)));return r.common.async?Promise.all(o).then(l=>a(l)):a(o)}min(e,n){return new rl({...this._def,minSize:{value:e,message:ke.toString(n)}})}max(e,n){return new rl({...this._def,maxSize:{value:e,message:ke.toString(n)}})}size(e,n){return this.min(e,n).max(e,n)}nonempty(e){return this.min(1,e)}}rl.create=(t,e)=>new rl({valueType:t,minSize:null,maxSize:null,typeName:Ae.ZodSet,...Pe(e)});class Ac extends je{constructor(){super(...arguments),this.validate=this.implement}_parse(e){const{ctx:n}=this._processInputParams(e);if(n.parsedType!==ye.function)return me(n,{code:ie.invalid_type,expected:ye.function,received:n.parsedType}),Oe;function r(o,l){return xp({data:o,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,vp(),Cc].filter(c=>!!c),issueData:{code:ie.invalid_arguments,argumentsError:l}})}function i(o,l){return xp({data:o,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,vp(),Cc].filter(c=>!!c),issueData:{code:ie.invalid_return_type,returnTypeError:l}})}const s={errorMap:n.common.contextualErrorMap},a=n.data;if(this._def.returns instanceof Dc){const o=this;return Kn(async function(...l){const c=new Sr([]),u=await o._def.args.parseAsync(l,s).catch(p=>{throw c.addIssue(r(l,p)),c}),d=await Reflect.apply(a,this,u);return await o._def.returns._def.type.parseAsync(d,s).catch(p=>{throw c.addIssue(i(d,p)),c})})}else{const o=this;return Kn(function(...l){const c=o._def.args.safeParse(l,s);if(!c.success)throw new Sr([r(l,c.error)]);const u=Reflect.apply(a,this,c.data),d=o._def.returns.safeParse(u,s);if(!d.success)throw new Sr([i(u,d.error)]);return d.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...e){return new Ac({...this._def,args:cs.create(e).rest(nl.create())})}returns(e){return new Ac({...this._def,returns:e})}implement(e){return this.parse(e)}strictImplement(e){return this.parse(e)}static create(e,n,r){return new Ac({args:e||cs.create([]).rest(nl.create()),returns:n||nl.create(),typeName:Ae.ZodFunction,...Pe(r)})}}class z1 extends je{get schema(){return this._def.getter()}_parse(e){const{ctx:n}=this._processInputParams(e);return this._def.getter()._parse({data:n.data,path:n.path,parent:n})}}z1.create=(t,e)=>new z1({getter:t,typeName:Ae.ZodLazy,...Pe(e)});class U1 extends je{_parse(e){if(e.data!==this._def.value){const n=this._getOrReturnCtx(e);return me(n,{received:n.data,code:ie.invalid_literal,expected:this._def.value}),Oe}return{status:"valid",value:e.data}}get value(){return this._def.value}}U1.create=(t,e)=>new U1({value:t,typeName:Ae.ZodLiteral,...Pe(e)});function Yb(t,e){return new Za({values:t,typeName:Ae.ZodEnum,...Pe(e)})}class Za extends je{constructor(){super(...arguments),I1.set(this,void 0)}_parse(e){if(typeof e.data!="string"){const n=this._getOrReturnCtx(e),r=this._def.values;return me(n,{expected:Xe.joinValues(r),received:n.parsedType,code:ie.invalid_type}),Oe}if(_p(this,I1)||Hb(this,I1,new Set(this._def.values)),!_p(this,I1).has(e.data)){const n=this._getOrReturnCtx(e),r=this._def.values;return me(n,{received:n.data,code:ie.invalid_enum_value,options:r}),Oe}return Kn(e.data)}get options(){return this._def.values}get enum(){const e={};for(const n of this._def.values)e[n]=n;return e}get Values(){const e={};for(const n of this._def.values)e[n]=n;return e}get Enum(){const e={};for(const n of this._def.values)e[n]=n;return e}extract(e,n=this._def){return Za.create(e,{...this._def,...n})}exclude(e,n=this._def){return Za.create(this.options.filter(r=>!e.includes(r)),{...this._def,...n})}}I1=new WeakMap,Za.create=Yb;class $1 extends je{constructor(){super(...arguments),L1.set(this,void 0)}_parse(e){const n=Xe.getValidEnumValues(this._def.values),r=this._getOrReturnCtx(e);if(r.parsedType!==ye.string&&r.parsedType!==ye.number){const i=Xe.objectValues(n);return me(r,{expected:Xe.joinValues(i),received:r.parsedType,code:ie.invalid_type}),Oe}if(_p(this,L1)||Hb(this,L1,new Set(Xe.getValidEnumValues(this._def.values))),!_p(this,L1).has(e.data)){const i=Xe.objectValues(n);return me(r,{received:r.data,code:ie.invalid_enum_value,options:i}),Oe}return Kn(e.data)}get enum(){return this._def.values}}L1=new WeakMap,$1.create=(t,e)=>new $1({values:t,typeName:Ae.ZodNativeEnum,...Pe(e)});class Dc extends je{unwrap(){return this._def.type}_parse(e){const{ctx:n}=this._processInputParams(e);if(n.parsedType!==ye.promise&&n.common.async===!1)return me(n,{code:ie.invalid_type,expected:ye.promise,received:n.parsedType}),Oe;const r=n.parsedType===ye.promise?n.data:Promise.resolve(n.data);return Kn(r.then(i=>this._def.type.parseAsync(i,{path:n.path,errorMap:n.common.contextualErrorMap})))}}Dc.create=(t,e)=>new Dc({type:t,typeName:Ae.ZodPromise,...Pe(e)});class Oi extends je{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===Ae.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(e){const{status:n,ctx:r}=this._processInputParams(e),i=this._def.effect||null,s={addIssue:a=>{me(r,a),a.fatal?n.abort():n.dirty()},get path(){return r.path}};if(s.addIssue=s.addIssue.bind(s),i.type==="preprocess"){const a=i.transform(r.data,s);if(r.common.async)return Promise.resolve(a).then(async o=>{if(n.value==="aborted")return Oe;const l=await this._def.schema._parseAsync({data:o,path:r.path,parent:r});return l.status==="aborted"?Oe:l.status==="dirty"||n.value==="dirty"?Tc(l.value):l});{if(n.value==="aborted")return Oe;const o=this._def.schema._parseSync({data:a,path:r.path,parent:r});return o.status==="aborted"?Oe:o.status==="dirty"||n.value==="dirty"?Tc(o.value):o}}if(i.type==="refinement"){const a=o=>{const l=i.refinement(o,s);if(r.common.async)return Promise.resolve(l);if(l instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return o};if(r.common.async===!1){const o=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});return o.status==="aborted"?Oe:(o.status==="dirty"&&n.dirty(),a(o.value),{status:n.value,value:o.value})}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(o=>o.status==="aborted"?Oe:(o.status==="dirty"&&n.dirty(),a(o.value).then(()=>({status:n.value,value:o.value}))))}if(i.type==="transform")if(r.common.async===!1){const a=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});if(!O1(a))return a;const o=i.transform(a.value,s);if(o instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:n.value,value:o}}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(a=>O1(a)?Promise.resolve(i.transform(a.value,s)).then(o=>({status:n.value,value:o})):a);Xe.assertNever(i)}}Oi.create=(t,e,n)=>new Oi({schema:t,typeName:Ae.ZodEffects,effect:e,...Pe(n)}),Oi.createWithPreprocess=(t,e,n)=>new Oi({schema:e,effect:{type:"preprocess",transform:t},typeName:Ae.ZodEffects,...Pe(n)});class us extends je{_parse(e){return this._getType(e)===ye.undefined?Kn(void 0):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}us.create=(t,e)=>new us({innerType:t,typeName:Ae.ZodOptional,...Pe(e)});class Xa extends je{_parse(e){return this._getType(e)===ye.null?Kn(null):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}Xa.create=(t,e)=>new Xa({innerType:t,typeName:Ae.ZodNullable,...Pe(e)});class V1 extends je{_parse(e){const{ctx:n}=this._processInputParams(e);let r=n.data;return n.parsedType===ye.undefined&&(r=this._def.defaultValue()),this._def.innerType._parse({data:r,path:n.path,parent:n})}removeDefault(){return this._def.innerType}}V1.create=(t,e)=>new V1({innerType:t,typeName:Ae.ZodDefault,defaultValue:typeof e.default=="function"?e.default:()=>e.default,...Pe(e)});class Y1 extends je{_parse(e){const{ctx:n}=this._processInputParams(e),r={...n,common:{...n.common,issues:[]}},i=this._def.innerType._parse({data:r.data,path:r.path,parent:{...r}});return M1(i)?i.then(s=>({status:"valid",value:s.status==="valid"?s.value:this._def.catchValue({get error(){return new Sr(r.common.issues)},input:r.data})})):{status:"valid",value:i.status==="valid"?i.value:this._def.catchValue({get error(){return new Sr(r.common.issues)},input:r.data})}}removeCatch(){return this._def.innerType}}Y1.create=(t,e)=>new Y1({innerType:t,typeName:Ae.ZodCatch,catchValue:typeof e.catch=="function"?e.catch:()=>e.catch,...Pe(e)});class Cp extends je{_parse(e){if(this._getType(e)!==ye.nan){const r=this._getOrReturnCtx(e);return me(r,{code:ie.invalid_type,expected:ye.nan,received:r.parsedType}),Oe}return{status:"valid",value:e.data}}}Cp.create=t=>new Cp({typeName:Ae.ZodNaN,...Pe(t)});const Dj=Symbol("zod_brand");class m4 extends je{_parse(e){const{ctx:n}=this._processInputParams(e),r=n.data;return this._def.type._parse({data:r,path:n.path,parent:n})}unwrap(){return this._def.type}}class W1 extends je{_parse(e){const{status:n,ctx:r}=this._processInputParams(e);if(r.common.async)return(async()=>{const s=await this._def.in._parseAsync({data:r.data,path:r.path,parent:r});return s.status==="aborted"?Oe:s.status==="dirty"?(n.dirty(),Tc(s.value)):this._def.out._parseAsync({data:s.value,path:r.path,parent:r})})();{const i=this._def.in._parseSync({data:r.data,path:r.path,parent:r});return i.status==="aborted"?Oe:i.status==="dirty"?(n.dirty(),{status:"dirty",value:i.value}):this._def.out._parseSync({data:i.value,path:r.path,parent:r})}}static create(e,n){return new W1({in:e,out:n,typeName:Ae.ZodPipeline})}}class G1 extends je{_parse(e){const n=this._def.innerType._parse(e),r=i=>(O1(i)&&(i.value=Object.freeze(i.value)),i);return M1(n)?n.then(i=>r(i)):r(n)}unwrap(){return this._def.innerType}}G1.create=(t,e)=>new G1({innerType:t,typeName:Ae.ZodReadonly,...Pe(e)});function Wb(t,e={},n){return t?Sc.create().superRefine((r,i)=>{var s,a;if(!t(r)){const o=typeof e=="function"?e(r):typeof e=="string"?{message:e}:e,l=(a=(s=o.fatal)!==null&&s!==void 0?s:n)!==null&&a!==void 0?a:!0,c=typeof o=="string"?{message:o}:o;i.addIssue({code:"custom",...c,fatal:l})}}):Sc.create()}const Oj={object:jt.lazycreate};var Ae;(function(t){t.ZodString="ZodString",t.ZodNumber="ZodNumber",t.ZodNaN="ZodNaN",t.ZodBigInt="ZodBigInt",t.ZodBoolean="ZodBoolean",t.ZodDate="ZodDate",t.ZodSymbol="ZodSymbol",t.ZodUndefined="ZodUndefined",t.ZodNull="ZodNull",t.ZodAny="ZodAny",t.ZodUnknown="ZodUnknown",t.ZodNever="ZodNever",t.ZodVoid="ZodVoid",t.ZodArray="ZodArray",t.ZodObject="ZodObject",t.ZodUnion="ZodUnion",t.ZodDiscriminatedUnion="ZodDiscriminatedUnion",t.ZodIntersection="ZodIntersection",t.ZodTuple="ZodTuple",t.ZodRecord="ZodRecord",t.ZodMap="ZodMap",t.ZodSet="ZodSet",t.ZodFunction="ZodFunction",t.ZodLazy="ZodLazy",t.ZodLiteral="ZodLiteral",t.ZodEnum="ZodEnum",t.ZodEffects="ZodEffects",t.ZodNativeEnum="ZodNativeEnum",t.ZodOptional="ZodOptional",t.ZodNullable="ZodNullable",t.ZodDefault="ZodDefault",t.ZodCatch="ZodCatch",t.ZodPromise="ZodPromise",t.ZodBranded="ZodBranded",t.ZodPipeline="ZodPipeline",t.ZodReadonly="ZodReadonly"})(Ae||(Ae={}));const Mj=(t,e={message:`Input not instance of ${t.name}`})=>Wb(n=>n instanceof t,e),Gb=Ai.create,Kb=qa.create,Ij=Cp.create,Lj=Qa.create,qb=P1.create,Pj=tl.create,Rj=bp.create,jj=R1.create,Fj=j1.create,Bj=Sc.create,Hj=nl.create,zj=Ks.create,Uj=wp.create,$j=Di.create,Vj=jt.create,Yj=jt.strictCreate,Wj=F1.create,Gj=Ep.create,Kj=B1.create,qj=cs.create,Qj=H1.create,Zj=kp.create,Xj=rl.create,Jj=Ac.create,eF=z1.create,tF=U1.create,nF=Za.create,rF=$1.create,iF=Dc.create,Qb=Oi.create,sF=us.create,aF=Xa.create,oF=Oi.createWithPreprocess,lF=W1.create;var E=Object.freeze({__proto__:null,defaultErrorMap:Cc,setErrorMap:hj,getErrorMap:vp,makeIssue:xp,EMPTY_PATH:pj,addIssueToContext:me,ParseStatus:Fn,INVALID:Oe,DIRTY:Tc,OK:Kn,isAborted:d4,isDirty:f4,isValid:O1,isAsync:M1,get util(){return Xe},get objectUtil(){return u4},ZodParsedType:ye,getParsedType:Ka,ZodType:je,datetimeRegex:Vb,ZodString:Ai,ZodNumber:qa,ZodBigInt:Qa,ZodBoolean:P1,ZodDate:tl,ZodSymbol:bp,ZodUndefined:R1,ZodNull:j1,ZodAny:Sc,ZodUnknown:nl,ZodNever:Ks,ZodVoid:wp,ZodArray:Di,ZodObject:jt,ZodUnion:F1,ZodDiscriminatedUnion:Ep,ZodIntersection:B1,ZodTuple:cs,ZodRecord:H1,ZodMap:kp,ZodSet:rl,ZodFunction:Ac,ZodLazy:z1,ZodLiteral:U1,ZodEnum:Za,ZodNativeEnum:$1,ZodPromise:Dc,ZodEffects:Oi,ZodTransformer:Oi,ZodOptional:us,ZodNullable:Xa,ZodDefault:V1,ZodCatch:Y1,ZodNaN:Cp,BRAND:Dj,ZodBranded:m4,ZodPipeline:W1,ZodReadonly:G1,custom:Wb,Schema:je,ZodSchema:je,late:Oj,get ZodFirstPartyTypeKind(){return Ae},coerce:{string:t=>Ai.create({...t,coerce:!0}),number:t=>qa.create({...t,coerce:!0}),boolean:t=>P1.create({...t,coerce:!0}),bigint:t=>Qa.create({...t,coerce:!0}),date:t=>tl.create({...t,coerce:!0})},any:Bj,array:$j,bigint:Lj,boolean:qb,date:Pj,discriminatedUnion:Gj,effect:Qb,enum:nF,function:Jj,instanceof:Mj,intersection:Kj,lazy:eF,literal:tF,map:Zj,nan:Ij,nativeEnum:rF,never:zj,null:Fj,nullable:aF,number:Kb,object:Vj,oboolean:()=>qb().optional(),onumber:()=>Kb().optional(),optional:sF,ostring:()=>Gb().optional(),pipeline:lF,preprocess:oF,promise:iF,record:Qj,set:Xj,strictObject:Yj,string:Gb,symbol:Rj,transformer:Qb,tuple:qj,undefined:jj,union:Wj,unknown:Hj,void:Uj,NEVER:Oe,ZodIssueCode:ie,quotelessJson:fj,ZodError:Sr});const cF=E.object({origin:E.union([E.string(),E.array(E.string())]),allowMethods:E.array(E.string()).optional(),allowHeaders:E.array(E.string()).optional(),exposeHeaders:E.array(E.string()).optional(),maxAge:E.number().optional(),credentials:E.boolean().optional()}),uF=E.object({message:E.string().optional(),code:E.string().optional(),expected:E.string().optional(),received:E.string().optional(),path:E.array(E.string()).optional()});E.object({messages:E.array(uF).optional()});const Tp=E.string(),Sp=E.string(),g4=E.object({created_at:E.string().optional().describe("ISO string creation time"),updated_at:E.string().optional().describe("ISO string update time")}).describe("Timestamps");E.object({search:E.array(E.string()).optional()}).describe("searchable");const dF=E.object({id:E.string().optional().describe("ID")}).describe("with `id`"),fF=E.object({id:E.string().describe("ID")}).describe("with `id`"),ei=E.object({id:E.string().optional().describe("Optional `id`"),handle:E.string().optional().describe("Optional `handle`")}),hF=E.object({key:E.string().describe("The key"),value:E.string().optional().describe("The value")}).describe("Attribute type, a key/value storage"),pF=E.object({iss:E.string(),sub:E.string(),aud:E.string(),exp:E.number(),nbf:E.number(),iat:E.number(),jti:E.string(),roles:E.array(E.string()).describe("User roles and authorizations")}),y4=E.object({email:E.string().email().describe("Email of user"),password:E.string().min(4).max(20).describe("password")}).describe("Auth base type"),mF=E.union([E.literal("admin"),E.literal("user"),E.string()]).describe("Role of authenticated user");y4.describe("Sign in type"),y4.and(E.object({firstname:E.string().optional().describe("(optional) readable `name` of `customer`"),lastname:E.string().optional().describe("(optional) readable `name` of `customer`")})).describe("Sign up type"),E.object({user_id_or_email:E.string().describe("User `ID` or `Email`"),current_password:E.string().describe("Current password"),new_password:E.string().describe("New password"),confirm_new_password:E.string().describe("Again New password for confirmation")}).describe("Change Password Type"),E.object({refresh_token:E.string().describe("A refresh token")}).describe("Refresh token input type");const Zb=E.object({token:E.string().describe("a token (`access` or `refresh`)"),claims:pF.partial().describe("Claims the `JSON Web Token` holds")}).describe("API token with parsed claims");E.object({apikey:E.string().describe("The `apikey` is `base64_uri(apikey@storecraft.api:{password})`.\nIt will be shown only once to the user, at the `backend`, the password hash\nwill be saved, thus, the real password is only known to the user.")}).describe("Result of `auth` `apikey` creation"),E.object({token_type:E.string().describe("The type of token, should be `bearer` or `refresh`"),user_id:E.string().describe("the `ID` of user, example `au_....`"),access_token:Zb.describe("The access token"),refresh_token:Zb.describe("The refresh token")}).describe("Result of `auth` request for `signin` / `signup` / `refresh`");const Mi=fF.extend(g4.shape).extend({media:E.array(E.string()).optional().describe("List of images urls"),attributes:E.array(hF).optional().describe("List of attributes"),tags:E.array(E.string()).optional().describe("List of tags , example ['genere_action', 'rated_M', ...]"),description:E.string().optional().describe("Rich description"),active:E.boolean().optional().describe("Is the entity active ?")});dF.extend(g4.shape).extend({handle:E.string().describe("The key name"),values:E.array(E.string()).describe("List of values, related to the key")}).omit({id:!0,handle:!0}).and(ei).describe("Tag upsert type");const v4=Mi.extend({handle:E.string().describe("The `handle` of the entity"),title:E.string().min(3,"Title should be longer than 3").describe("Title of collection"),active:E.boolean().describe("Is the entity active ?"),published:E.string().optional().describe(`Collections can be exported into
172
172
  json with products, this is the url`)});v4.omit({id:!0,handle:!0}).and(ei).describe("Collection upsert type");const Xb=E.object({option_id:E.string().describe("Variant option id"),value_id:E.string().describe("Variant selected value id")}).describe("Variant option selection type"),gF=E.object({id:E.string().describe("The `id` of the entity"),value:E.string().describe("The text value of the entity")}).describe("Identifiable text entity type"),il=E.object({id:E.string().describe("The `id` of the entity"),handle:E.string().describe("The `handle` of the entity")}).describe("both `id` and `handle` of entity required"),yF=E.object({name:E.string().min(3,"Name should be longer than 3").describe("Variant option name (for example 'Size')"),id:E.string().describe("Variant option id"),values:E.array(gF).describe("Variant option values\n(for example `Small` / `Medium` / `Large` ..)")}).describe("The data of a variant option"),Jb=E.object({Auto:E.object({id:E.literal(0),name:E.string().optional(),name2:E.literal("automatic")}),Manual:E.object({id:E.literal(1),name:E.string().optional(),name2:E.literal("manual")})}).describe(`Discounts can be manual(coupon) or automatic types,
173
173
  see <a href='#DiscountApplicationEnum'>#DiscountApplicationEnum</a>`),ew=E.array(E.object({id:E.string().optional().describe("`p_in_collections` filter, `id` of collection"),title:E.string().optional().describe("`p_in_collections` filter, `title` of collection"),handle:E.string().optional().describe("`p_in_collections` filter, `handle` of the collection")})).describe("Filter for product in collections"),vF=ew.describe("Filter for product not in collections"),tw=E.array(E.object({id:E.string().optional().describe("`p_in_products` filter, `id` of `product`"),title:E.string().optional().describe("`p_in_products` filter, `title` of `product`"),handle:E.string().optional().describe("`p_in_products` filter, `handle` of the `product`")})).describe("Filter for product discount, product in handles"),xF=tw.describe("Filter for product discount, product not in handles"),_F=E.array(E.string()).describe("Filter for product discount, product has tags"),bF=E.array(E.string()).describe("Filter for product discount, NOT has tags");E.object({}).describe(`Filter for product discount,
174
174
  that chooses all products`);const wF=E.object({from:E.number().optional().describe("`p_in_price_range` filter From price"),to:E.number().describe("`p_in_price_range` filter To price")}).describe("Filter for product discount, product in price range"),EF=E.object({from:E.number().optional().describe("`o_subtotal_in_range` filter From price"),to:E.number().optional().describe("`o_subtotal_in_range` filter To price")}).describe("Filter for order discount, subtotal in range"),kF=E.object({from:E.number().optional().describe("`o_items_count_in_range` filter From count"),to:E.number().optional().describe("`o_items_count_in_range` filter To count")}).describe("Filter for order discount, items count in range"),CF=E.object({from:E.string().optional().describe("`o_date_in_range` filter From date `ISO` format"),to:E.string().optional().describe("`o_date_in_range` filter To date `ISO` format")}).describe("Filter for order discount, subtotal in range"),TF=E.array(E.object({id:E.string().describe("`id` of `customer`"),email:E.string().optional().describe("(optional) `email` of `customer`"),firstname:E.string().optional().describe("(optional) readable `name` of `customer`"),lastname:E.string().optional().describe("(optional) readable `name` of `customer`")})).describe("Filter for order discount, order has customer id"),Nr=E.object({any:E.object({id:E.number().optional(),type:E.string().optional(),op:E.string().optional(),name:E.string().optional()}),p_in_collections:E.object({id:E.literal(0),type:E.literal("product"),op:E.literal("p-in-collections"),name:E.string().optional()}),p_not_in_collections:E.object({id:E.literal(1),type:E.literal("product"),op:E.literal("p-not-in-collections"),name:E.string().optional()}),p_in_products:E.object({id:E.literal(2),type:E.literal("product"),op:E.literal("p-in-products"),name:E.string().optional()}),p_not_in_products:E.object({id:E.literal(3),type:E.literal("product"),op:E.literal("p-not-in-products"),name:E.string().optional()}),p_in_tags:E.object({id:E.literal(4),type:E.literal("product"),op:E.literal("p-in-tags"),name:E.string().optional()}),p_not_in_tags:E.object({id:E.literal(5),type:E.literal("product"),op:E.literal("p-not-in-tags"),name:E.string().optional()}),p_all:E.object({id:E.literal(6),type:E.literal("product"),op:E.literal("p-all"),name:E.string().optional()}),p_in_price_range:E.object({id:E.literal(7),type:E.literal("product"),op:E.literal("p-in-price-range"),name:E.string().optional()}),o_subtotal_in_range:E.object({id:E.literal(100),type:E.literal("order"),op:E.literal("o-subtotal-in-range"),name:E.string().optional()}),o_items_count_in_range:E.object({id:E.literal(101),type:E.literal("order"),op:E.literal("o-items-count-in-range"),name:E.string().optional()}),o_date_in_range:E.object({id:E.literal(102),type:E.literal("order"),op:E.literal("o-date-in-range"),name:E.string().optional()}),o_has_customer:E.object({id:E.literal(103),type:E.literal("order"),op:E.literal("o-has-customer"),name:E.string().optional()})}),Oc=E.object({regular:E.object({id:E.literal(0),type:E.literal("regular"),name:E.string().optional()}),bulk:E.object({id:E.literal(1),type:E.literal("bulk"),name:E.string().optional()}),buy_x_get_y:E.object({id:E.literal(2),type:E.literal("buy_x_get_y"),name:E.string().optional()}),order:E.object({id:E.literal(3),type:E.literal("order"),name:E.string().optional()}),bundle:E.object({id:E.literal(4),type:E.literal("bundle"),name:E.string().optional()}),any:E.object({id:E.number().optional(),type:E.string().optional(),name:E.string().optional()})}).describe("Discount meta data,"),SF=E.object({fixed:E.number().describe("`RegularDiscountExtra` params, Fixed price addition"),percent:E.number().describe("`RegularDiscountExtra` params, Percents off")}).describe("Parameters of a regular discount"),NF=E.object({fixed:E.number().describe("`OrderDiscountExtra` params, Fixed price addition"),percent:E.number().describe("`OrderDiscountExtra` params, Percents off"),free_shipping:E.boolean().optional().describe("`OrderDiscountExtra` params, Do we have free shipping ?")}).describe("Parameters of order discount"),AF=E.object({fixed:E.number().describe("`BulkDiscountExtra` params, Fixed price addition"),percent:E.number().describe("`BulkDiscountExtra` params, Percents off"),qty:E.number().describe("`BulkDiscountExtra` params, The integer quantity\nfor which the discount is given"),recursive:E.boolean().optional().describe("`BulkDiscountExtra` params, Apply the discount as\nmany times as possible")}).describe("Parameters of bulk discount"),DF=E.object({fixed:E.number().describe("`BundleDiscountExtra` params, Fixed price addition"),percent:E.number().describe("`BundleDiscountExtra` params, Percents off"),recursive:E.boolean().optional().describe("`BundleDiscountExtra` params, Apply the discount\nas many times as possible")}).describe("Parameters of bulk discount"),nw=E.object({meta:E.union([Nr.shape.p_all,Nr.shape.p_in_collections,Nr.shape.p_not_in_collections,Nr.shape.p_in_tags,Nr.shape.p_not_in_tags,Nr.shape.p_in_products,Nr.shape.p_not_in_products,Nr.shape.p_in_price_range,Nr.shape.o_date_in_range,Nr.shape.o_has_customer,Nr.shape.o_items_count_in_range,Nr.shape.o_subtotal_in_range,Nr.shape.any]).describe("Meta data related to identifying the filter"),value:E.union([ew,vF,tw,xF,_F,bF,wF,EF,kF,CF,TF]).optional().describe("The filter params")}).describe("Discount filter schema"),Np=Mi.extend({price:E.number().min(0,"Please set a price >= 0").describe("Shipping method price"),title:E.string().min(3,"Title should be longer than 3").describe("Name of shipping method"),handle:E.string().describe("Readable `handle` of shipping")}),rw=Mi.extend({handle:E.string().describe("Unique `handle`"),title:E.string().min(3,"Title should be longer than 3").describe("Title of post"),text:E.string().describe("Rich text of post")}),iw=E.object({firstname:E.string().optional().describe("First name of recipient"),lastname:E.string().optional().describe("Last name of recipient"),phone_number:E.string().regex(/^([+]?d{1,2}[-s]?|)d{3}[-s]?d{3}[-s]?d{4}$ Invalid phone number/).optional().describe("The phone number of the recipient"),company:E.string().optional().describe("Optional company name of recipient"),street1:E.string().optional().describe("Street address 1"),street2:E.string().optional().describe("Street address 2"),city:E.string().optional().describe("City"),country:E.string().optional().describe("Country"),state:E.string().optional().describe("State"),zip_code:E.string().optional().describe("ZIP code"),postal_code:E.string().optional().describe("Postal code")}).describe("Address type");Mi.extend({auth_id:E.string().optional().describe("The `auth id` of the customer. it is the same as\ncustomer `id` with `au` prefix instead"),firstname:E.string().min(1,"Should be longer than 1 characters").optional().describe("Firstname"),lastname:E.string().min(1,"Should be longer than 1 characters").optional().describe("Lastname"),email:E.string().email().describe("Email of customer"),phone_number:E.string().regex(/^([+]?d{1,2}[-s]?|)d{3}[-s]?d{3}[-s]?d{4}$/).optional().describe("The phone number"),address:iw.optional().describe("Address info of customer")}).omit({id:!0,handle:!0}).and(ei).describe("Customer upsert type"),Mi.extend({handle:E.string().describe("Unique handle"),name:E.string().min(1,"Should be longer than 1 characters").describe("Name"),url:E.string().min(1,"Should be longer than 1 characters").describe("It's published public url"),usage:E.array(E.string()).optional().describe("List of assets using this image")}).omit({id:!0,handle:!0}).and(ei).describe("Image upsert type"),Np.omit({id:!0,handle:!0}).and(ei).describe("Shipping upsert type"),rw.omit({id:!0,handle:!0}).and(ei).describe("Post upsert type");const OF=E.union([E.literal("route"),E.literal("url")]).describe("'route' means routing inside admin panel 'url' is linking to a url"),MF=E.object({collection:E.string().describe("Which collection"),document:E.string().describe("Which document")}).describe("route inside admin panel action params"),IF=E.object({new_window:E.boolean().optional().describe("Ppen the url in new window"),url:E.string().describe("The url to open")}).describe("Action params for actions of type 'url'"),LF=E.object({firstname:E.string().optional().describe("First name"),lastname:E.string().optional().describe("Last name"),phone_number:E.string().optional().describe("Phone number"),email:E.string().optional().describe("Email"),customer_id:E.string().optional().describe("Customer `id`")}).describe("Order buyer info"),PF=E.object({id:E.string().describe("`id`"),title:E.string().min(3,"Title should be longer than 3").optional().describe("title"),message:E.union([E.literal("shipping-method-not-found"),E.literal("product-not-exists"),E.literal("product-out-of-stock"),E.literal("product-not-enough-stock"),E.literal("product-inactive")]).optional().describe("message")}).describe(`Checkouts or draft orders might be validated
@@ -349,13 +349,13 @@ data
349
349
  flex-row justify-between items-center px-3
350
350
  ${i}`,children:[f.jsx(as,{Icon:f.jsx(rp,{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
351
351
  bg-slate-50 dark:bg-slate-800
352
- --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(as,{Icon:f.jsx(rp,{}),text:"",className:"text-lg ",onClick:t})]})},h9=_.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(Xs,{ref:a,children:f.jsxs(Gs,{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(Gn,{stroke:"border-b-2",btnClassName:"rounded-none",rounded:"rounded-none",children:"No",onClick:()=>r.current.hide()}),f.jsx(Gn,{stroke:"border-b-2",btnClassName:"rounded-none",rounded:"rounded-none",children:"Yes",onClick:l=>o(l)})]})]})})});var XV=wn.GenIcon,AE=function(e){return XV({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 _d=({to:t,current_state:e,next_state:n,onClick:r,...i})=>{const{navWithState:s}=Pi(),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(un,{to:t,onClick:a,...i})},Pi=()=>{const t=Zo(),e=Ws(),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}},pm=(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))})},JV="pr-3 py-2 max-w-[18rem] overflow-clip hover:overflow-x-auto inline-block whitespace-nowrap",Ut=({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})})},DE=({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:`${JV} ${n}`,children:o,...a})},gs=({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(sb,{type:t.type,onWheel:m=>m.target.blur(),className:c,value:e??"",onChange:p,...h})},OE=({value:t,field:e,onChange:n,setError:r,...i})=>{const s=_.useCallback(async()=>{const a=await n4();console.log(a),a&&n(a)},[n,n4]);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
+ --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(as,{Icon:f.jsx(rp,{}),text:"",className:"text-lg ",onClick:t})]})},h9=_.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(Xs,{ref:a,children:f.jsxs(Gs,{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(Gn,{stroke:"border-b-2",btnClassName:"rounded-none",rounded:"rounded-none",children:"No",onClick:()=>r.current.hide()}),f.jsx(Gn,{stroke:"border-b-2",btnClassName:"rounded-none",rounded:"rounded-none",children:"Yes",onClick:l=>o(l)})]})]})})});var XV=wn.GenIcon,AE=function(e){return XV({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 _d=({to:t,current_state:e,next_state:n,onClick:r,...i})=>{const{navWithState:s}=Pi(),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(un,{to:t,onClick:a,...i})},Pi=()=>{const t=Zo(),e=Ws(),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}},pm=(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))})},JV="pr-3 py-2 max-w-[18rem] overflow-clip hover:overflow-x-auto inline-block whitespace-nowrap",Ut=({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})})},DE=({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:`${JV} ${n}`,children:o,...a})},gs=({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})},Ie=({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(sb,{type:t.type,onWheel:m=>m.target.blur(),className:c,value:e??"",onChange:p,...h})},OE=({value:t,field:e,onChange:n,setError:r,...i})=>{const s=_.useCallback(async()=>{const a=await n4();console.log(a),a&&n(a)},[n,n4]);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
353
353
  shelf-text-label-color
354
354
  dark:bg-kf-50/10 p-1 rounded-md
355
- text-sm font-medium tracking-wider`,onClick:s})}),f.jsx(lt,{className:"w-full h-fit mt-2",children:f.jsx(Pe,{field:e,value:t,onChange:n,className:"w-full h-10"})})]})},mm=({value:t,field:e,onChange:n,context:r,setError:i,...s})=>{const a=_.useCallback(async()=>{const o=r.query.title.get(),l=jb(t)??jb(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
+ text-sm font-medium tracking-wider`,onClick:s})}),f.jsx(lt,{className:"w-full h-fit mt-2",children:f.jsx(Ie,{field:e,value:t,onChange:n,className:"w-full h-10"})})]})},mm=({value:t,field:e,onChange:n,context:r,setError:i,...s})=>{const a=_.useCallback(async()=>{const o=r.query.title.get(),l=jb(t)??jb(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
356
356
  shelf-text-label-color
357
357
  dark:bg-kf-50/10 p-1 rounded-md
358
- text-sm font-medium tracking-wider`,onClick:a})}),f.jsx(lt,{className:"w-full h-fit mt-2",children:f.jsx(Pe,{field:e,value:t,onChange:n,className:"w-full h-10"})})]})},bd=({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
+ text-sm font-medium tracking-wider`,onClick:a})}),f.jsx(lt,{className:"w-full h-fit mt-2",children:f.jsx(Ie,{field:e,value:t,onChange:n,className:"w-full h-10"})})]})},bd=({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
359
359
  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})})},p9=({value:t,config:e=1,process_before_copy:n=r=>r})=>{const[r,i]=_.useState(!1),s=_.useCallback(()=>{i(!0),r4(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(AE,{className:`text-lg cursor-pointer text-gray-500
360
360
  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(p9,{value:JSON.stringify(s)}):null,[r,s]);return f.jsx(Gs,{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})})},Pr=({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
361
361
  justify-end text-base overflow-clip w-fit mx-auto `,children:[!(t!=null&&t.editDocumentUrl)&&(t==null?void 0:t.viewDocumentUrl)&&f.jsx(un,{to:t.viewDocumentUrl(o),children:f.jsx(HP,{className:" text-xl text-teal-600 stroke-[0.5px] hover:stroke-[1px]"})}),(t==null?void 0:t.editDocumentUrl)&&f.jsx(_d,{to:t.editDocumentUrl(o),draggable:"false",current_state:()=>(t==null?void 0:t.getState)&&(t==null?void 0:t.getState()),children:f.jsx(PP,{className:`ml-3 text-2xl text-pink-500
@@ -473,7 +473,7 @@ data
473
473
  `}),n}function gq(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=Vc(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:`
474
474
  `},{type:"element",tagName:"ol",properties:{},children:t.wrap(e,!0)},{type:"text",value:`
475
475
  `}]}}function nC(t,e){const n=dq(t,e),r=n.one(t,null),i=gq(n);return i&&r.children.push({type:"text",value:`
476
- `},i),Array.isArray(r)?{type:"root",children:r}:r}const yq=function(t,e){return t&&"run"in t?vq(t,e):xq(t||e)};function vq(t,e){return(n,r,i)=>{t.run(nC(n,e),r,s=>{i(s)})}}function xq(t){return e=>nC(e,t)}var rC={exports:{}},_q="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED",bq=_q,wq=bq;function iC(){}function sC(){}sC.resetWarningCache=iC;var Eq=function(){function t(r,i,s,a,o,l){if(l!==wq){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:sC,resetWarningCache:iC};return n.PropTypes=n,n};rC.exports=Eq();var kq=rC.exports;const Ie=On(kq);class Id{constructor(e,n,r){this.property=e,this.normal=n,r&&(this.space=r)}}Id.prototype.property={},Id.prototype.normal={},Id.prototype.space=null;function aC(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 Id(n,r,e)}function Ld(t){return t.toLowerCase()}class si{constructor(e,n){this.property=e,this.attribute=n}}si.prototype.space=null,si.prototype.boolean=!1,si.prototype.booleanish=!1,si.prototype.overloadedBoolean=!1,si.prototype.number=!1,si.prototype.commaSeparated=!1,si.prototype.spaceSeparated=!1,si.prototype.commaOrSpaceSeparated=!1,si.prototype.mustUseProperty=!1,si.prototype.defined=!1;let Cq=0;const Re=bl(),en=bl(),oC=bl(),ae=bl(),Tt=bl(),Yc=bl(),Hr=bl();function bl(){return 2**++Cq}const z9=Object.freeze(Object.defineProperty({__proto__:null,boolean:Re,booleanish:en,commaOrSpaceSeparated:Hr,commaSeparated:Yc,number:ae,overloadedBoolean:oC,spaceSeparated:Tt},Symbol.toStringTag,{value:"Module"})),U9=Object.keys(z9);class $9 extends si{constructor(e,n,r,i){let s=-1;if(super(e,n),lC(this,"space",i),typeof r=="number")for(;++s<U9.length;){const a=U9[s];lC(this,U9[s],(r&z9[a])===z9[a])}}}$9.prototype.defined=!0;function lC(t,e,n){n&&(t[e]=n)}const Tq={}.hasOwnProperty;function Wc(t){const e={},n={};let r;for(r in t.properties)if(Tq.call(t.properties,r)){const i=t.properties[r],s=new $9(r,t.transform(t.attributes||{},r),i,t.space);t.mustUseProperty&&t.mustUseProperty.includes(r)&&(s.mustUseProperty=!0),e[r]=s,n[Ld(r)]=r,n[Ld(s.attribute)]=r}return new Id(e,n,t.space)}const cC=Wc({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}}),uC=Wc({space:"xml",transform(t,e){return"xml:"+e.slice(3).toLowerCase()},properties:{xmlLang:null,xmlBase:null,xmlSpace:null}});function dC(t,e){return e in t?t[e]:e}function fC(t,e){return dC(t,e.toLowerCase())}const hC=Wc({space:"xmlns",attributes:{xmlnsxlink:"xmlns:xlink"},transform:fC,properties:{xmlns:null,xmlnsXLink:null}}),pC=Wc({transform(t,e){return e==="role"?e:"aria-"+e.slice(4).toLowerCase()},properties:{ariaActiveDescendant:null,ariaAtomic:en,ariaAutoComplete:null,ariaBusy:en,ariaChecked:en,ariaColCount:ae,ariaColIndex:ae,ariaColSpan:ae,ariaControls:Tt,ariaCurrent:null,ariaDescribedBy:Tt,ariaDetails:null,ariaDisabled:en,ariaDropEffect:Tt,ariaErrorMessage:null,ariaExpanded:en,ariaFlowTo:Tt,ariaGrabbed:en,ariaHasPopup:null,ariaHidden:en,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:Tt,ariaLevel:ae,ariaLive:null,ariaModal:en,ariaMultiLine:en,ariaMultiSelectable:en,ariaOrientation:null,ariaOwns:Tt,ariaPlaceholder:null,ariaPosInSet:ae,ariaPressed:en,ariaReadOnly:en,ariaRelevant:null,ariaRequired:en,ariaRoleDescription:Tt,ariaRowCount:ae,ariaRowIndex:ae,ariaRowSpan:ae,ariaSelected:en,ariaSetSize:ae,ariaSort:null,ariaValueMax:ae,ariaValueMin:ae,ariaValueNow:ae,ariaValueText:null,role:null}}),Sq=Wc({space:"html",attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},transform:fC,mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:Yc,acceptCharset:Tt,accessKey:Tt,action:null,allow:null,allowFullScreen:Re,allowPaymentRequest:Re,allowUserMedia:Re,alt:null,as:null,async:Re,autoCapitalize:null,autoComplete:Tt,autoFocus:Re,autoPlay:Re,blocking:Tt,capture:null,charSet:null,checked:Re,cite:null,className:Tt,cols:ae,colSpan:null,content:null,contentEditable:en,controls:Re,controlsList:Tt,coords:ae|Yc,crossOrigin:null,data:null,dateTime:null,decoding:null,default:Re,defer:Re,dir:null,dirName:null,disabled:Re,download:oC,draggable:en,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:Re,formTarget:null,headers:Tt,height:ae,hidden:Re,high:ae,href:null,hrefLang:null,htmlFor:Tt,httpEquiv:Tt,id:null,imageSizes:null,imageSrcSet:null,inert:Re,inputMode:null,integrity:null,is:null,isMap:Re,itemId:null,itemProp:Tt,itemRef:Tt,itemScope:Re,itemType:Tt,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:Re,low:ae,manifest:null,max:null,maxLength:ae,media:null,method:null,min:null,minLength:ae,multiple:Re,muted:Re,name:null,nonce:null,noModule:Re,noValidate:Re,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:Re,optimum:ae,pattern:null,ping:Tt,placeholder:null,playsInline:Re,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:Re,referrerPolicy:null,rel:Tt,required:Re,reversed:Re,rows:ae,rowSpan:ae,sandbox:Tt,scope:null,scoped:Re,seamless:Re,selected:Re,shadowRootClonable:Re,shadowRootDelegatesFocus:Re,shadowRootMode:null,shape:null,size:ae,sizes:null,slot:null,span:ae,spellCheck:en,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:Re,useMap:null,value:en,width:ae,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:Tt,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:Re,declare:Re,event:null,face:null,frame:null,frameBorder:null,hSpace:ae,leftMargin:ae,link:null,longDesc:null,lowSrc:null,marginHeight:ae,marginWidth:ae,noResize:Re,noHref:Re,noShade:Re,noWrap:Re,object:null,profile:null,prompt:null,rev:null,rightMargin:ae,rules:null,scheme:null,scrolling:en,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:Re,disableRemotePlayback:Re,prefix:null,property:null,results:ae,security:null,unselectable:null}}),Nq=Wc({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:dC,properties:{about:Hr,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:Tt,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:Re,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:Yc,g2:Yc,glyphName:Yc,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:Hr,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:Tt,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:ae,pointsAtY:ae,pointsAtZ:ae,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:Hr,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:Hr,rev:Hr,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:Hr,requiredFeatures:Hr,requiredFonts:Hr,requiredFormats:Hr,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:Hr,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:Hr,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:Hr,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}}),Aq=/^data[-\w.:]+$/i,mC=/-[a-z]/g,Dq=/[A-Z]/g;function Pd(t,e){const n=Ld(e);let r=e,i=si;if(n in t.normal)return t.property[t.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&Aq.test(e)){if(e.charAt(4)==="-"){const s=e.slice(5).replace(mC,Mq);r="data"+s.charAt(0).toUpperCase()+s.slice(1)}else{const s=e.slice(4);if(!mC.test(s)){let a=s.replace(Dq,Oq);a.charAt(0)!=="-"&&(a="-"+a),e="data"+a}}i=$9}return new i(r,e)}function Oq(t){return"-"+t.toLowerCase()}function Mq(t){return t.charAt(1).toUpperCase()}const gC={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"},Gc=aC([uC,cC,hC,pC,Sq],"html"),Kc=aC([uC,cC,hC,pC,Nq],"svg");function Iq(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=>{Zk(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 yC={exports:{}},gt={};/**
476
+ `},i),Array.isArray(r)?{type:"root",children:r}:r}const yq=function(t,e){return t&&"run"in t?vq(t,e):xq(t||e)};function vq(t,e){return(n,r,i)=>{t.run(nC(n,e),r,s=>{i(s)})}}function xq(t){return e=>nC(e,t)}var rC={exports:{}},_q="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED",bq=_q,wq=bq;function iC(){}function sC(){}sC.resetWarningCache=iC;var Eq=function(){function t(r,i,s,a,o,l){if(l!==wq){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:sC,resetWarningCache:iC};return n.PropTypes=n,n};rC.exports=Eq();var kq=rC.exports;const Le=On(kq);class Id{constructor(e,n,r){this.property=e,this.normal=n,r&&(this.space=r)}}Id.prototype.property={},Id.prototype.normal={},Id.prototype.space=null;function aC(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 Id(n,r,e)}function Ld(t){return t.toLowerCase()}class si{constructor(e,n){this.property=e,this.attribute=n}}si.prototype.space=null,si.prototype.boolean=!1,si.prototype.booleanish=!1,si.prototype.overloadedBoolean=!1,si.prototype.number=!1,si.prototype.commaSeparated=!1,si.prototype.spaceSeparated=!1,si.prototype.commaOrSpaceSeparated=!1,si.prototype.mustUseProperty=!1,si.prototype.defined=!1;let Cq=0;const Re=bl(),en=bl(),oC=bl(),ae=bl(),Tt=bl(),Yc=bl(),Hr=bl();function bl(){return 2**++Cq}const z9=Object.freeze(Object.defineProperty({__proto__:null,boolean:Re,booleanish:en,commaOrSpaceSeparated:Hr,commaSeparated:Yc,number:ae,overloadedBoolean:oC,spaceSeparated:Tt},Symbol.toStringTag,{value:"Module"})),U9=Object.keys(z9);class $9 extends si{constructor(e,n,r,i){let s=-1;if(super(e,n),lC(this,"space",i),typeof r=="number")for(;++s<U9.length;){const a=U9[s];lC(this,U9[s],(r&z9[a])===z9[a])}}}$9.prototype.defined=!0;function lC(t,e,n){n&&(t[e]=n)}const Tq={}.hasOwnProperty;function Wc(t){const e={},n={};let r;for(r in t.properties)if(Tq.call(t.properties,r)){const i=t.properties[r],s=new $9(r,t.transform(t.attributes||{},r),i,t.space);t.mustUseProperty&&t.mustUseProperty.includes(r)&&(s.mustUseProperty=!0),e[r]=s,n[Ld(r)]=r,n[Ld(s.attribute)]=r}return new Id(e,n,t.space)}const cC=Wc({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}}),uC=Wc({space:"xml",transform(t,e){return"xml:"+e.slice(3).toLowerCase()},properties:{xmlLang:null,xmlBase:null,xmlSpace:null}});function dC(t,e){return e in t?t[e]:e}function fC(t,e){return dC(t,e.toLowerCase())}const hC=Wc({space:"xmlns",attributes:{xmlnsxlink:"xmlns:xlink"},transform:fC,properties:{xmlns:null,xmlnsXLink:null}}),pC=Wc({transform(t,e){return e==="role"?e:"aria-"+e.slice(4).toLowerCase()},properties:{ariaActiveDescendant:null,ariaAtomic:en,ariaAutoComplete:null,ariaBusy:en,ariaChecked:en,ariaColCount:ae,ariaColIndex:ae,ariaColSpan:ae,ariaControls:Tt,ariaCurrent:null,ariaDescribedBy:Tt,ariaDetails:null,ariaDisabled:en,ariaDropEffect:Tt,ariaErrorMessage:null,ariaExpanded:en,ariaFlowTo:Tt,ariaGrabbed:en,ariaHasPopup:null,ariaHidden:en,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:Tt,ariaLevel:ae,ariaLive:null,ariaModal:en,ariaMultiLine:en,ariaMultiSelectable:en,ariaOrientation:null,ariaOwns:Tt,ariaPlaceholder:null,ariaPosInSet:ae,ariaPressed:en,ariaReadOnly:en,ariaRelevant:null,ariaRequired:en,ariaRoleDescription:Tt,ariaRowCount:ae,ariaRowIndex:ae,ariaRowSpan:ae,ariaSelected:en,ariaSetSize:ae,ariaSort:null,ariaValueMax:ae,ariaValueMin:ae,ariaValueNow:ae,ariaValueText:null,role:null}}),Sq=Wc({space:"html",attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},transform:fC,mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:Yc,acceptCharset:Tt,accessKey:Tt,action:null,allow:null,allowFullScreen:Re,allowPaymentRequest:Re,allowUserMedia:Re,alt:null,as:null,async:Re,autoCapitalize:null,autoComplete:Tt,autoFocus:Re,autoPlay:Re,blocking:Tt,capture:null,charSet:null,checked:Re,cite:null,className:Tt,cols:ae,colSpan:null,content:null,contentEditable:en,controls:Re,controlsList:Tt,coords:ae|Yc,crossOrigin:null,data:null,dateTime:null,decoding:null,default:Re,defer:Re,dir:null,dirName:null,disabled:Re,download:oC,draggable:en,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:Re,formTarget:null,headers:Tt,height:ae,hidden:Re,high:ae,href:null,hrefLang:null,htmlFor:Tt,httpEquiv:Tt,id:null,imageSizes:null,imageSrcSet:null,inert:Re,inputMode:null,integrity:null,is:null,isMap:Re,itemId:null,itemProp:Tt,itemRef:Tt,itemScope:Re,itemType:Tt,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:Re,low:ae,manifest:null,max:null,maxLength:ae,media:null,method:null,min:null,minLength:ae,multiple:Re,muted:Re,name:null,nonce:null,noModule:Re,noValidate:Re,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:Re,optimum:ae,pattern:null,ping:Tt,placeholder:null,playsInline:Re,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:Re,referrerPolicy:null,rel:Tt,required:Re,reversed:Re,rows:ae,rowSpan:ae,sandbox:Tt,scope:null,scoped:Re,seamless:Re,selected:Re,shadowRootClonable:Re,shadowRootDelegatesFocus:Re,shadowRootMode:null,shape:null,size:ae,sizes:null,slot:null,span:ae,spellCheck:en,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:Re,useMap:null,value:en,width:ae,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:Tt,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:Re,declare:Re,event:null,face:null,frame:null,frameBorder:null,hSpace:ae,leftMargin:ae,link:null,longDesc:null,lowSrc:null,marginHeight:ae,marginWidth:ae,noResize:Re,noHref:Re,noShade:Re,noWrap:Re,object:null,profile:null,prompt:null,rev:null,rightMargin:ae,rules:null,scheme:null,scrolling:en,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:Re,disableRemotePlayback:Re,prefix:null,property:null,results:ae,security:null,unselectable:null}}),Nq=Wc({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:dC,properties:{about:Hr,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:Tt,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:Re,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:Yc,g2:Yc,glyphName:Yc,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:Hr,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:Tt,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:ae,pointsAtY:ae,pointsAtZ:ae,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:Hr,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:Hr,rev:Hr,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:Hr,requiredFeatures:Hr,requiredFonts:Hr,requiredFormats:Hr,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:Hr,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:Hr,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:Hr,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}}),Aq=/^data[-\w.:]+$/i,mC=/-[a-z]/g,Dq=/[A-Z]/g;function Pd(t,e){const n=Ld(e);let r=e,i=si;if(n in t.normal)return t.property[t.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&Aq.test(e)){if(e.charAt(4)==="-"){const s=e.slice(5).replace(mC,Mq);r="data"+s.charAt(0).toUpperCase()+s.slice(1)}else{const s=e.slice(4);if(!mC.test(s)){let a=s.replace(Dq,Oq);a.charAt(0)!=="-"&&(a="-"+a),e="data"+a}}i=$9}return new i(r,e)}function Oq(t){return"-"+t.toLowerCase()}function Mq(t){return t.charAt(1).toUpperCase()}const gC={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"},Gc=aC([uC,cC,hC,pC,Sq],"html"),Kc=aC([uC,cC,hC,pC,Nq],"svg");function Iq(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=>{Zk(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 yC={exports:{}},gt={};/**
477
477
  * @license React
478
478
  * react-is.production.min.js
479
479
  *
@@ -482,7 +482,7 @@ data
482
482
  * This source code is licensed under the MIT license found in the
483
483
  * LICENSE file in the root directory of this source tree.
484
484
  */var V9=Symbol.for("react.element"),Y9=Symbol.for("react.portal"),Om=Symbol.for("react.fragment"),Mm=Symbol.for("react.strict_mode"),Im=Symbol.for("react.profiler"),Lm=Symbol.for("react.provider"),Pm=Symbol.for("react.context"),Lq=Symbol.for("react.server_context"),Rm=Symbol.for("react.forward_ref"),jm=Symbol.for("react.suspense"),Fm=Symbol.for("react.suspense_list"),Bm=Symbol.for("react.memo"),Hm=Symbol.for("react.lazy"),Pq=Symbol.for("react.offscreen"),vC;vC=Symbol.for("react.module.reference");function ai(t){if(typeof t=="object"&&t!==null){var e=t.$$typeof;switch(e){case V9:switch(t=t.type,t){case Om:case Im:case Mm:case jm:case Fm:return t;default:switch(t=t&&t.$$typeof,t){case Lq:case Pm:case Rm:case Hm:case Bm:case Lm:return t;default:return e}}case Y9:return e}}}gt.ContextConsumer=Pm,gt.ContextProvider=Lm,gt.Element=V9,gt.ForwardRef=Rm,gt.Fragment=Om,gt.Lazy=Hm,gt.Memo=Bm,gt.Portal=Y9,gt.Profiler=Im,gt.StrictMode=Mm,gt.Suspense=jm,gt.SuspenseList=Fm,gt.isAsyncMode=function(){return!1},gt.isConcurrentMode=function(){return!1},gt.isContextConsumer=function(t){return ai(t)===Pm},gt.isContextProvider=function(t){return ai(t)===Lm},gt.isElement=function(t){return typeof t=="object"&&t!==null&&t.$$typeof===V9},gt.isForwardRef=function(t){return ai(t)===Rm},gt.isFragment=function(t){return ai(t)===Om},gt.isLazy=function(t){return ai(t)===Hm},gt.isMemo=function(t){return ai(t)===Bm},gt.isPortal=function(t){return ai(t)===Y9},gt.isProfiler=function(t){return ai(t)===Im},gt.isStrictMode=function(t){return ai(t)===Mm},gt.isSuspense=function(t){return ai(t)===jm},gt.isSuspenseList=function(t){return ai(t)===Fm},gt.isValidElementType=function(t){return typeof t=="string"||typeof t=="function"||t===Om||t===Im||t===Mm||t===jm||t===Fm||t===Pq||typeof t=="object"&&t!==null&&(t.$$typeof===Hm||t.$$typeof===Bm||t.$$typeof===Lm||t.$$typeof===Pm||t.$$typeof===Rm||t.$$typeof===vC||t.getModuleId!==void 0)},gt.typeOf=ai,yC.exports=gt;var Rq=yC.exports;const jq=On(Rq);function xC(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 _C(t){const e=String(t||"").trim();return e?e.split(/[ \t\n\r\f]+/g):[]}function W9(t){return t.join(" ").trim()}function G9(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 K9(t,e){const n=e||{};return(t[t.length-1]===""?[...t,""]:t).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}var q9={exports:{}},bC=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,Fq=/\n/g,Bq=/^\s*/,Hq=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,zq=/^:\s*/,Uq=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,$q=/^[;\s]*/,Vq=/^\s+|\s+$/g,Yq=`
485
- `,wC="/",EC="*",wl="",Wq="comment",Gq="declaration",Kq=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(Fq);g&&(n+=g.length);var y=m.lastIndexOf(Yq);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(Bq)}function u(m){var g;for(m=m||[];g=d();)g!==!1&&m.push(g);return m}function d(){var m=s();if(!(wC!=t.charAt(0)||EC!=t.charAt(1))){for(var g=2;wl!=t.charAt(g)&&(EC!=t.charAt(g)||wC!=t.charAt(g+1));)++g;if(g+=2,wl===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:Wq,comment:y})}}function h(){var m=s(),g=l(Hq);if(g){if(d(),!l(zq))return o("property missing ':'");var y=l(Uq),v=m({type:Gq,property:kC(g[0].replace(bC,wl)),value:y?kC(y[0].replace(bC,wl)):wl});return l($q),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 kC(t){return t?t.replace(Vq,wl):wl}var qq=Kq;function CC(t,e){var n=null;if(!t||typeof t!="string")return n;for(var r,i=qq(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}q9.exports=CC,q9.exports.default=CC;var Qq=q9.exports;const Zq=On(Qq),Q9={}.hasOwnProperty,Xq=new Set(["table","thead","tbody","tfoot","tr"]);function TC(t,e){const n=[];let r=-1,i;for(;++r<e.children.length;)i=e.children[r],i.type==="element"?n.push(Jq(t,i,r,e)):i.type==="text"?(e.type!=="element"||!Xq.has(e.tagName)||!xC(i))&&n.push(i.value):i.type==="raw"&&!t.options.skipHtml&&n.push(i.value);return n}function Jq(t,e,n,r){const i=t.options,s=i.transformLinkUri===void 0?uW:i.transformLinkUri,a=t.schema,o=e.tagName,l={};let c=a,u;if(a.space==="html"&&o==="svg"&&(c=Kc,t.schema=c),e.properties)for(u in e.properties)Q9.call(e.properties,u)&&tQ(l,u,e.properties[u],t);(o==="ol"||o==="ul")&&t.listDepth++;const d=TC(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&&Q9.call(i.components,o)?i.components[o]:o,m=typeof p=="string"||p===M.Fragment;if(!jq.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=eQ(e);l.checked=g&&g.properties?!!g.properties.checked:null,l.index=Z9(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"]=iQ(h)),!m&&i.rawSourcePos&&(l.sourcePosition=e.position),!m&&i.includeElementIndex&&(l.index=Z9(r,e),l.siblingCount=Z9(r)),m||(l.node=e),d.length>0?M.createElement(p,l,d):M.createElement(p,l)}function eQ(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 Z9(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 tQ(t,e,n,r){const i=Pd(r.schema,e);let s=n;s==null||s!==s||(Array.isArray(s)&&(s=i.commaSeparated?K9(s):W9(s)),i.property==="style"&&typeof s=="string"&&(s=nQ(s)),i.space&&i.property?t[Q9.call(gC,i.property)?gC[i.property]:i.property]=s:i.attribute&&(t[i.attribute]=s))}function nQ(t){const e={};try{Zq(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,rQ)]=i}}function rQ(t,e){return e.toUpperCase()}function iQ(t){return[t.start.line,":",t.start.column,"-",t.end.line,":",t.end.column].map(String).join("")}const SC={}.hasOwnProperty,sQ="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",zm={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 NC(t){for(const s in zm)if(SC.call(zm,s)&&SC.call(t,s)){const a=zm[s];console.warn(`[react-markdown] Warning: please ${a.to?`use \`${a.to}\` instead of`:"remove"} \`${s}\` (see <${sQ}#${a.id}> for more info)`),delete zm[s]}const e=TW().use(wK).use(t.remarkPlugins||[]).use(yq,{...t.remarkRehypeOptions,allowDangerousHtml:!0}).use(t.rehypePlugins||[]).use(Iq,t),n=new nk;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,{},TC({options:t,schema:Gc,listDepth:0},r));return t.className&&(i=M.createElement("div",{className:t.className},i)),i}NC.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 aQ={tokenize:fQ,partial:!0},AC={tokenize:hQ,partial:!0},DC={tokenize:pQ,partial:!0},OC={tokenize:mQ,partial:!0},oQ={tokenize:gQ,partial:!0},MC={tokenize:uQ,previous:LC},IC={tokenize:dQ,previous:PC},sa={tokenize:cQ,previous:RC},bs={},lQ={text:bs};let El=48;for(;El<123;)bs[El]=sa,El++,El===58?El=65:El===91&&(El=97);bs[43]=sa,bs[45]=sa,bs[46]=sa,bs[95]=sa,bs[72]=[sa,IC],bs[104]=[sa,IC],bs[87]=[sa,MC],bs[119]=[sa,MC];function cQ(t,e,n){const r=this;let i,s;return a;function a(d){return!X9(d)||!RC.call(r,r.previous)||J9(r.events)?n(d):(t.enter("literalAutolink"),t.enter("literalAutolinkEmail"),o(d))}function o(d){return X9(d)?(t.consume(d),o):d===64?(t.consume(d),l):n(d)}function l(d){return d===46?t.check(oQ,u,c)(d):d===45||d===95||Bn(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&&Qn(r.previous)?(t.exit("literalAutolinkEmail"),t.exit("literalAutolink"),e(d)):n(d)}}function uQ(t,e,n){const r=this;return i;function i(a){return a!==87&&a!==119||!LC.call(r,r.previous)||J9(r.events)?n(a):(t.enter("literalAutolink"),t.enter("literalAutolinkWww"),t.check(aQ,t.attempt(AC,t.attempt(DC,s),n),n)(a))}function s(a){return t.exit("literalAutolinkWww"),t.exit("literalAutolink"),e(a)}}function dQ(t,e,n){const r=this;let i="",s=!1;return a;function a(d){return(d===72||d===104)&&PC.call(r,r.previous)&&!J9(r.events)?(t.enter("literalAutolink"),t.enter("literalAutolinkHttp"),i+=String.fromCodePoint(d),t.consume(d),o):n(d)}function o(d){if(Qn(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||wm(d)||bt(d)||_l(d)||Em(d)?n(d):t.attempt(AC,t.attempt(DC,u),n)(d)}function u(d){return t.exit("literalAutolinkHttp"),t.exit("literalAutolink"),e(d)}}function fQ(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 hQ(t,e,n){let r,i,s;return a;function a(c){return c===46||c===95?t.check(OC,l,o)(c):c===null||bt(c)||_l(c)||c!==45&&Em(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 pQ(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(OC,e,s)(a):a===null||bt(a)||_l(a)?e(a):(t.consume(a),i)}function s(a){return a===41&&r++,t.consume(a),i}}function mQ(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||bt(o)||_l(o)?e(o):n(o)}function i(o){return o===null||o===40||o===91||bt(o)||_l(o)?e(o):r(o)}function s(o){return Qn(o)?a(o):n(o)}function a(o){return o===59?(t.consume(o),r):Qn(o)?(t.consume(o),a):n(o)}}function gQ(t,e,n){return r;function r(s){return t.consume(s),i}function i(s){return Bn(s)?n(s):e(s)}}function LC(t){return t===null||t===40||t===42||t===95||t===91||t===93||t===126||bt(t)}function PC(t){return!Qn(t)}function RC(t){return!(t===47||X9(t))}function X9(t){return t===43||t===45||t===46||t===95||Bn(t)}function J9(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 yQ={tokenize:CQ,partial:!0};function vQ(){return{document:{91:{tokenize:wQ,continuation:{tokenize:EQ},exit:kQ}},text:{91:{tokenize:bQ},93:{add:"after",tokenize:xQ,resolveTo:_Q}}}}function xQ(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=Fi(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 _Q(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 bQ(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||bt(d))return n(d);if(d===93){t.exit("chunkString");const h=t.exit("gfmFootnoteCallString");return i.includes(Fi(r.sliceSerialize(h)))?(t.enter("gfmFootnoteCallLabelMarker"),t.consume(d),t.exit("gfmFootnoteCallLabelMarker"),t.exit("gfmFootnoteCall"),e):n(d)}return bt(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 wQ(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||bt(m))return n(m);if(m===93){t.exit("chunkString");const g=t.exit("gfmFootnoteDefinitionLabelString");return s=Fi(r.sliceSerialize(g)),t.enter("gfmFootnoteDefinitionLabelMarker"),t.consume(m),t.exit("gfmFootnoteDefinitionLabelMarker"),t.exit("gfmFootnoteDefinitionLabel"),h}return bt(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),Je(t,p,"gfmFootnoteDefinitionWhitespace")):n(m)}function p(m){return e(m)}}function EQ(t,e,n){return t.check(Dd,e,t.attempt(yQ,e,n))}function kQ(t){t.exit("gfmFootnoteDefinition")}function CQ(t,e,n){const r=this;return Je(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 TQ(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&&Br(h,h.length,0,Cm(p,a.slice(c+1,l),o)),Br(h,h.length,0,[["exit",d,o],["enter",a[l][1],o],["exit",a[l][1],o],["exit",u,o]]),Br(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=km(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=km(m);return y._open=!v||v===2&&!!g,y._close=!g||g===2&&!!v,o(m)}}}class SQ{constructor(){this.map=[]}add(e,n,r){NQ(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 NQ(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 AQ(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 DQ={flow:{null:{tokenize:OQ,resolveAll:MQ}}};function OQ(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):Ve(A)?Je(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||bt(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,Ve(A)?Je(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 Ve(A)?Je(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 Ve(A)?Je(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)):Ve(A)?Je(t,k,"whitespace")(A):(t.enter("data"),N(A))}function N(A){return A===null||A===124||bt(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 MQ(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 SQ;for(;++n<t.length;){const p=t[n],m=p[1];p[0]==="enter"?m.type==="tableHead"?(o=!1,l!==0&&(jC(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=Um(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=Um(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=Um(h,e,s,i,n,d)):a[1]!==0&&(d=Um(h,e,a,i,n,d)),i=0):i&&(m.type==="data"||m.type==="tableDelimiterMarker"||m.type==="tableDelimiterFiller")&&(a[3]=n)}for(l!==0&&jC(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=AQ(e.events,n))}return t}function Um(t,e,n,r,i,s){const a=r===1?"tableHeader":r===2?"tableDelimiter":"tableData",o="tableContent";n[0]!==0&&(s.end=Object.assign({},qc(e.events,n[0])),t.add(n[0],0,[["exit",s,e]]));const l=qc(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=qc(e.events,n[2]),u=qc(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({},qc(e.events,i)),t.add(i,0,[["exit",s,e]]),s=void 0),s}function jC(t,e,n,r,i){const s=[],a=qc(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 qc(t,e){const n=t[e],r=n[0]==="enter"?"start":"end";return n[1][r]}const IQ={text:{91:{tokenize:LQ}}};function LQ(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 bt(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):Ve(l)?t.check({tokenize:PQ},e,n)(l):n(l)}}function PQ(t,e,n){return Je(t,r,"whitespace");function r(i){return i===null?n(i):e(i)}}function RQ(t){return _k([lQ,vQ(),TQ(t),DQ,IQ])}function FC(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 jQ(t){if(typeof t!="string")throw new TypeError("Expected a string");return t.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function nme(t){return t}const FQ=!0,BC=!1,BQ="skip",HC=function(t,e,n,r){typeof e=="function"&&typeof n!="function"&&(r=n,n=e,e=null);const i=Bi(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=HQ(n(o,c)),h[0]===BC))return h;if(o.children&&h[0]!==BQ)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]===BC)return p;m=typeof p[1]=="number"?p[1]:m+s}return h}}};function HQ(t){return Array.isArray(t)?t:typeof t=="number"?[FQ,t]:[t]}const zQ={}.hasOwnProperty,UQ=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=Bi(i.ignore||[]),o=$Q(s);let l=-1;for(;++l<o.length;)HC(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 $Q(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([zC(t[n][0]),UC(t[n][1])])}else{let n;for(n in t)zQ.call(t,n)&&e.push([zC(n),UC(t[n])])}return e}function zC(t){return typeof t=="string"?new RegExp(jQ(t),"g"):t}function UC(t){return typeof t=="function"?t:()=>t}const ey="phrasing",ty=["autolink","link","image","label"],VQ={transforms:[ZQ],enter:{literalAutolink:WQ,literalAutolinkEmail:ny,literalAutolinkHttp:ny,literalAutolinkWww:ny},exit:{literalAutolink:QQ,literalAutolinkEmail:qQ,literalAutolinkHttp:GQ,literalAutolinkWww:KQ}},YQ={unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:ey,notInConstruct:ty},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:ey,notInConstruct:ty},{character:":",before:"[ps]",after:"\\/",inConstruct:ey,notInConstruct:ty}]};function WQ(t){this.enter({type:"link",title:null,url:"",children:[]},t)}function ny(t){this.config.enter.autolinkProtocol.call(this,t)}function GQ(t){this.config.exit.autolinkProtocol.call(this,t)}function KQ(t){this.config.exit.data.call(this,t);const e=this.stack[this.stack.length-1];e.url="http://"+this.sliceSerialize(t)}function qQ(t){this.config.exit.autolinkEmail.call(this,t)}function QQ(t){this.exit(t)}function ZQ(t){UQ(t,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,XQ],[/([-.\w+]+)@([-\w]+(?:\.[-\w]+)+)/g,JQ]],{ignore:["link","linkReference"]})}function XQ(t,e,n,r,i){let s="";if(!$C(i)||(/^w/i.test(e)&&(n=e+n,e="",s="http://"),!eZ(n)))return!1;const a=tZ(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 JQ(t,e,n,r){return!$C(r,!0)||/[-\d_]$/.test(n)?!1:{type:"link",title:null,url:"mailto:"+e+"@"+n,children:[{type:"text",value:e+"@"+n}]}}function eZ(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 tZ(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=FC(t,"(");let s=FC(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 $C(t,e){const n=t.input.charCodeAt(t.index-1);return(t.index===0||_l(n)||Em(n))&&(!e||n!==47)}function VC(t){return t.label||!t.identifier?t.label||"":Bk(t.identifier)}function nZ(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
+ `,wC="/",EC="*",wl="",Wq="comment",Gq="declaration",Kq=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(Fq);g&&(n+=g.length);var y=m.lastIndexOf(Yq);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(Bq)}function u(m){var g;for(m=m||[];g=d();)g!==!1&&m.push(g);return m}function d(){var m=s();if(!(wC!=t.charAt(0)||EC!=t.charAt(1))){for(var g=2;wl!=t.charAt(g)&&(EC!=t.charAt(g)||wC!=t.charAt(g+1));)++g;if(g+=2,wl===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:Wq,comment:y})}}function h(){var m=s(),g=l(Hq);if(g){if(d(),!l(zq))return o("property missing ':'");var y=l(Uq),v=m({type:Gq,property:kC(g[0].replace(bC,wl)),value:y?kC(y[0].replace(bC,wl)):wl});return l($q),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 kC(t){return t?t.replace(Vq,wl):wl}var qq=Kq;function CC(t,e){var n=null;if(!t||typeof t!="string")return n;for(var r,i=qq(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}q9.exports=CC,q9.exports.default=CC;var Qq=q9.exports;const Zq=On(Qq),Q9={}.hasOwnProperty,Xq=new Set(["table","thead","tbody","tfoot","tr"]);function TC(t,e){const n=[];let r=-1,i;for(;++r<e.children.length;)i=e.children[r],i.type==="element"?n.push(Jq(t,i,r,e)):i.type==="text"?(e.type!=="element"||!Xq.has(e.tagName)||!xC(i))&&n.push(i.value):i.type==="raw"&&!t.options.skipHtml&&n.push(i.value);return n}function Jq(t,e,n,r){const i=t.options,s=i.transformLinkUri===void 0?uW:i.transformLinkUri,a=t.schema,o=e.tagName,l={};let c=a,u;if(a.space==="html"&&o==="svg"&&(c=Kc,t.schema=c),e.properties)for(u in e.properties)Q9.call(e.properties,u)&&tQ(l,u,e.properties[u],t);(o==="ol"||o==="ul")&&t.listDepth++;const d=TC(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&&Q9.call(i.components,o)?i.components[o]:o,m=typeof p=="string"||p===M.Fragment;if(!jq.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=eQ(e);l.checked=g&&g.properties?!!g.properties.checked:null,l.index=Z9(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"]=iQ(h)),!m&&i.rawSourcePos&&(l.sourcePosition=e.position),!m&&i.includeElementIndex&&(l.index=Z9(r,e),l.siblingCount=Z9(r)),m||(l.node=e),d.length>0?M.createElement(p,l,d):M.createElement(p,l)}function eQ(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 Z9(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 tQ(t,e,n,r){const i=Pd(r.schema,e);let s=n;s==null||s!==s||(Array.isArray(s)&&(s=i.commaSeparated?K9(s):W9(s)),i.property==="style"&&typeof s=="string"&&(s=nQ(s)),i.space&&i.property?t[Q9.call(gC,i.property)?gC[i.property]:i.property]=s:i.attribute&&(t[i.attribute]=s))}function nQ(t){const e={};try{Zq(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,rQ)]=i}}function rQ(t,e){return e.toUpperCase()}function iQ(t){return[t.start.line,":",t.start.column,"-",t.end.line,":",t.end.column].map(String).join("")}const SC={}.hasOwnProperty,sQ="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",zm={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 NC(t){for(const s in zm)if(SC.call(zm,s)&&SC.call(t,s)){const a=zm[s];console.warn(`[react-markdown] Warning: please ${a.to?`use \`${a.to}\` instead of`:"remove"} \`${s}\` (see <${sQ}#${a.id}> for more info)`),delete zm[s]}const e=TW().use(wK).use(t.remarkPlugins||[]).use(yq,{...t.remarkRehypeOptions,allowDangerousHtml:!0}).use(t.rehypePlugins||[]).use(Iq,t),n=new nk;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,{},TC({options:t,schema:Gc,listDepth:0},r));return t.className&&(i=M.createElement("div",{className:t.className},i)),i}NC.propTypes={children:Le.string,className:Le.string,allowElement:Le.func,allowedElements:Le.arrayOf(Le.string),disallowedElements:Le.arrayOf(Le.string),unwrapDisallowed:Le.bool,remarkPlugins:Le.arrayOf(Le.oneOfType([Le.object,Le.func,Le.arrayOf(Le.oneOfType([Le.bool,Le.string,Le.object,Le.func,Le.arrayOf(Le.any)]))])),rehypePlugins:Le.arrayOf(Le.oneOfType([Le.object,Le.func,Le.arrayOf(Le.oneOfType([Le.bool,Le.string,Le.object,Le.func,Le.arrayOf(Le.any)]))])),sourcePos:Le.bool,rawSourcePos:Le.bool,skipHtml:Le.bool,includeElementIndex:Le.bool,transformLinkUri:Le.oneOfType([Le.func,Le.bool]),linkTarget:Le.oneOfType([Le.func,Le.string]),transformImageUri:Le.func,components:Le.object};const aQ={tokenize:fQ,partial:!0},AC={tokenize:hQ,partial:!0},DC={tokenize:pQ,partial:!0},OC={tokenize:mQ,partial:!0},oQ={tokenize:gQ,partial:!0},MC={tokenize:uQ,previous:LC},IC={tokenize:dQ,previous:PC},sa={tokenize:cQ,previous:RC},bs={},lQ={text:bs};let El=48;for(;El<123;)bs[El]=sa,El++,El===58?El=65:El===91&&(El=97);bs[43]=sa,bs[45]=sa,bs[46]=sa,bs[95]=sa,bs[72]=[sa,IC],bs[104]=[sa,IC],bs[87]=[sa,MC],bs[119]=[sa,MC];function cQ(t,e,n){const r=this;let i,s;return a;function a(d){return!X9(d)||!RC.call(r,r.previous)||J9(r.events)?n(d):(t.enter("literalAutolink"),t.enter("literalAutolinkEmail"),o(d))}function o(d){return X9(d)?(t.consume(d),o):d===64?(t.consume(d),l):n(d)}function l(d){return d===46?t.check(oQ,u,c)(d):d===45||d===95||Bn(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&&Qn(r.previous)?(t.exit("literalAutolinkEmail"),t.exit("literalAutolink"),e(d)):n(d)}}function uQ(t,e,n){const r=this;return i;function i(a){return a!==87&&a!==119||!LC.call(r,r.previous)||J9(r.events)?n(a):(t.enter("literalAutolink"),t.enter("literalAutolinkWww"),t.check(aQ,t.attempt(AC,t.attempt(DC,s),n),n)(a))}function s(a){return t.exit("literalAutolinkWww"),t.exit("literalAutolink"),e(a)}}function dQ(t,e,n){const r=this;let i="",s=!1;return a;function a(d){return(d===72||d===104)&&PC.call(r,r.previous)&&!J9(r.events)?(t.enter("literalAutolink"),t.enter("literalAutolinkHttp"),i+=String.fromCodePoint(d),t.consume(d),o):n(d)}function o(d){if(Qn(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||wm(d)||bt(d)||_l(d)||Em(d)?n(d):t.attempt(AC,t.attempt(DC,u),n)(d)}function u(d){return t.exit("literalAutolinkHttp"),t.exit("literalAutolink"),e(d)}}function fQ(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 hQ(t,e,n){let r,i,s;return a;function a(c){return c===46||c===95?t.check(OC,l,o)(c):c===null||bt(c)||_l(c)||c!==45&&Em(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 pQ(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(OC,e,s)(a):a===null||bt(a)||_l(a)?e(a):(t.consume(a),i)}function s(a){return a===41&&r++,t.consume(a),i}}function mQ(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||bt(o)||_l(o)?e(o):n(o)}function i(o){return o===null||o===40||o===91||bt(o)||_l(o)?e(o):r(o)}function s(o){return Qn(o)?a(o):n(o)}function a(o){return o===59?(t.consume(o),r):Qn(o)?(t.consume(o),a):n(o)}}function gQ(t,e,n){return r;function r(s){return t.consume(s),i}function i(s){return Bn(s)?n(s):e(s)}}function LC(t){return t===null||t===40||t===42||t===95||t===91||t===93||t===126||bt(t)}function PC(t){return!Qn(t)}function RC(t){return!(t===47||X9(t))}function X9(t){return t===43||t===45||t===46||t===95||Bn(t)}function J9(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 yQ={tokenize:CQ,partial:!0};function vQ(){return{document:{91:{tokenize:wQ,continuation:{tokenize:EQ},exit:kQ}},text:{91:{tokenize:bQ},93:{add:"after",tokenize:xQ,resolveTo:_Q}}}}function xQ(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=Fi(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 _Q(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 bQ(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||bt(d))return n(d);if(d===93){t.exit("chunkString");const h=t.exit("gfmFootnoteCallString");return i.includes(Fi(r.sliceSerialize(h)))?(t.enter("gfmFootnoteCallLabelMarker"),t.consume(d),t.exit("gfmFootnoteCallLabelMarker"),t.exit("gfmFootnoteCall"),e):n(d)}return bt(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 wQ(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||bt(m))return n(m);if(m===93){t.exit("chunkString");const g=t.exit("gfmFootnoteDefinitionLabelString");return s=Fi(r.sliceSerialize(g)),t.enter("gfmFootnoteDefinitionLabelMarker"),t.consume(m),t.exit("gfmFootnoteDefinitionLabelMarker"),t.exit("gfmFootnoteDefinitionLabel"),h}return bt(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),Je(t,p,"gfmFootnoteDefinitionWhitespace")):n(m)}function p(m){return e(m)}}function EQ(t,e,n){return t.check(Dd,e,t.attempt(yQ,e,n))}function kQ(t){t.exit("gfmFootnoteDefinition")}function CQ(t,e,n){const r=this;return Je(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 TQ(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&&Br(h,h.length,0,Cm(p,a.slice(c+1,l),o)),Br(h,h.length,0,[["exit",d,o],["enter",a[l][1],o],["exit",a[l][1],o],["exit",u,o]]),Br(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=km(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=km(m);return y._open=!v||v===2&&!!g,y._close=!g||g===2&&!!v,o(m)}}}class SQ{constructor(){this.map=[]}add(e,n,r){NQ(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 NQ(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 AQ(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 DQ={flow:{null:{tokenize:OQ,resolveAll:MQ}}};function OQ(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):Ve(A)?Je(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||bt(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,Ve(A)?Je(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 Ve(A)?Je(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 Ve(A)?Je(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)):Ve(A)?Je(t,k,"whitespace")(A):(t.enter("data"),N(A))}function N(A){return A===null||A===124||bt(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 MQ(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 SQ;for(;++n<t.length;){const p=t[n],m=p[1];p[0]==="enter"?m.type==="tableHead"?(o=!1,l!==0&&(jC(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=Um(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=Um(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=Um(h,e,s,i,n,d)):a[1]!==0&&(d=Um(h,e,a,i,n,d)),i=0):i&&(m.type==="data"||m.type==="tableDelimiterMarker"||m.type==="tableDelimiterFiller")&&(a[3]=n)}for(l!==0&&jC(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=AQ(e.events,n))}return t}function Um(t,e,n,r,i,s){const a=r===1?"tableHeader":r===2?"tableDelimiter":"tableData",o="tableContent";n[0]!==0&&(s.end=Object.assign({},qc(e.events,n[0])),t.add(n[0],0,[["exit",s,e]]));const l=qc(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=qc(e.events,n[2]),u=qc(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({},qc(e.events,i)),t.add(i,0,[["exit",s,e]]),s=void 0),s}function jC(t,e,n,r,i){const s=[],a=qc(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 qc(t,e){const n=t[e],r=n[0]==="enter"?"start":"end";return n[1][r]}const IQ={text:{91:{tokenize:LQ}}};function LQ(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 bt(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):Ve(l)?t.check({tokenize:PQ},e,n)(l):n(l)}}function PQ(t,e,n){return Je(t,r,"whitespace");function r(i){return i===null?n(i):e(i)}}function RQ(t){return _k([lQ,vQ(),TQ(t),DQ,IQ])}function FC(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 jQ(t){if(typeof t!="string")throw new TypeError("Expected a string");return t.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function nme(t){return t}const FQ=!0,BC=!1,BQ="skip",HC=function(t,e,n,r){typeof e=="function"&&typeof n!="function"&&(r=n,n=e,e=null);const i=Bi(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=HQ(n(o,c)),h[0]===BC))return h;if(o.children&&h[0]!==BQ)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]===BC)return p;m=typeof p[1]=="number"?p[1]:m+s}return h}}};function HQ(t){return Array.isArray(t)?t:typeof t=="number"?[FQ,t]:[t]}const zQ={}.hasOwnProperty,UQ=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=Bi(i.ignore||[]),o=$Q(s);let l=-1;for(;++l<o.length;)HC(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 $Q(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([zC(t[n][0]),UC(t[n][1])])}else{let n;for(n in t)zQ.call(t,n)&&e.push([zC(n),UC(t[n])])}return e}function zC(t){return typeof t=="string"?new RegExp(jQ(t),"g"):t}function UC(t){return typeof t=="function"?t:()=>t}const ey="phrasing",ty=["autolink","link","image","label"],VQ={transforms:[ZQ],enter:{literalAutolink:WQ,literalAutolinkEmail:ny,literalAutolinkHttp:ny,literalAutolinkWww:ny},exit:{literalAutolink:QQ,literalAutolinkEmail:qQ,literalAutolinkHttp:GQ,literalAutolinkWww:KQ}},YQ={unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:ey,notInConstruct:ty},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:ey,notInConstruct:ty},{character:":",before:"[ps]",after:"\\/",inConstruct:ey,notInConstruct:ty}]};function WQ(t){this.enter({type:"link",title:null,url:"",children:[]},t)}function ny(t){this.config.enter.autolinkProtocol.call(this,t)}function GQ(t){this.config.exit.autolinkProtocol.call(this,t)}function KQ(t){this.config.exit.data.call(this,t);const e=this.stack[this.stack.length-1];e.url="http://"+this.sliceSerialize(t)}function qQ(t){this.config.exit.autolinkEmail.call(this,t)}function QQ(t){this.exit(t)}function ZQ(t){UQ(t,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,XQ],[/([-.\w+]+)@([-\w]+(?:\.[-\w]+)+)/g,JQ]],{ignore:["link","linkReference"]})}function XQ(t,e,n,r,i){let s="";if(!$C(i)||(/^w/i.test(e)&&(n=e+n,e="",s="http://"),!eZ(n)))return!1;const a=tZ(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 JQ(t,e,n,r){return!$C(r,!0)||/[-\d_]$/.test(n)?!1:{type:"link",title:null,url:"mailto:"+e+"@"+n,children:[{type:"text",value:e+"@"+n}]}}function eZ(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 tZ(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=FC(t,"(");let s=FC(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 $C(t,e){const n=t.input.charCodeAt(t.index-1);return(t.index===0||_l(n)||Em(n))&&(!e||n!==47)}function VC(t){return t.label||!t.identifier?t.label||"":Bk(t.identifier)}function nZ(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:`
486
486
  `,after:`
487
487
  `,...s.current()}))),l.type!=="list"&&(e.bulletLastUsed=void 0),o<i.length-1&&a.push(s.move(rZ(l,i[o+1],t,e)))}return r.pop(),a.join("")}function rZ(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`
488
488
  `.repeat(1+s);if(s===!1)return`
@@ -537,14 +537,14 @@ data
537
537
  - [ ] `),/^\d+.\s/.test(a)&&(b=`
538
538
  `+(parseInt(a)+1)+". "),lu(r,b)}else if(t.code&&t.code.toLowerCase()==="keyd"&&t.ctrlKey){N0(t);var w={start:r.selectionStart,end:r.selectionEnd},C=w;w=Xd({text:r.value,selection:w});var S=r.value.slice(w.start,w.end);o.setSelectionRange({start:w.end,end:w.end}),lu(r,`
539
539
  `+S),o.setSelectionRange({start:C.start,end:C.end})}else t.code&&t.code.toLowerCase()==="arrowup"&&t.altKey?PN(t,-1):t.code&&t.code.toLowerCase()==="arrowdown"&&t.altKey&&PN(t,1)}var Jre=["prefixCls","onChange"],eie=["markdown","commands","fullscreen","preview","highlightEnable","extraCommands","tabSize","defaultTabEnable","dispatch"];function tie(t){var{prefixCls:e,onChange:n}=t,r=Td(t,Jre),i=_.useContext(ou),{markdown:s,commands:a,fullscreen:o,preview:l,highlightEnable:c,extraCommands:u,tabSize:d,defaultTabEnable:h,dispatch:p}=i;Td(i,eie);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 qy(m.current);g.current=x,p({textarea:m.current,commandOrchestrator:x})}},[]);var v=x=>{Xre(x,d,h),AN(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",$e({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 nie=["prefixCls","className","onScroll","renderTextarea"];function rie(t){var e=t||{},{prefixCls:n,className:r,onScroll:i,renderTextarea:s}=e,a=Td(e,nie),{markdown:o,scrollTop:l,commands:c,extraCommands:u,dispatch:d}=_.useContext(ou),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($e({},y))},[]),_.useEffect(()=>{if(h.current&&d){var y=new qy(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($e({},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:AN,useContext:{commands:c,extraCommands:u,commandOrchestrator:p.current}}),{ref:h}):f.jsx(_.Fragment,{children:f.jsx(tie,$e({prefixCls:n},a,{style:g}))})})})}function iie(t){var{prefixCls:e,groupName:n,commands:r,children:i}=t||{},{barPopup:s={}}=_.useContext(ou);return _.useMemo(()=>f.jsx("div",{className:e+"-toolbar-child "+(n&&s[n]?"active":""),onClick:a=>a.stopPropagation(),children:Array.isArray(r)?f.jsx(jN,$e({commands:r},t,{isChild:!0})):i}),[r,s,n,e])}function RN(t){var{prefixCls:e,overflow:n}=t,{fullscreen:r,preview:i,barPopup:s={},components:a,commandOrchestrator:o,dispatch:l}=_.useContext(ou),c=_.useRef("");function u(d,h){if(l){var p={barPopup:$e({},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($e({},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",$e({},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",$e({},d.liProps,{className:p?"active":"",children:[v&&M.isValidElement(v)&&v,!v&&!d.buttonProps&&d.icon,!v&&d.buttonProps&&M.createElement("button",$e({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(iie,{overflow:n,groupName:d.groupName,prefixCls:e,children:m,commands:Array.isArray(d.children)?d.children:void 0})]}),h)})})}function jN(t){t===void 0&&(t={});var{prefixCls:e,isChild:n,className:r}=t,{commands:i,extraCommands:s}=_.useContext(ou);return f.jsxs("div",{className:e+"-toolbar "+r,children:[f.jsx(RN,$e({},t,{commands:t.commands||i||[]})),!n&&f.jsx(RN,$e({},t,{commands:s||[]}))]})}function FN(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(jN,{prefixCls:s,overflow:i,className:a})}var sie=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})},aie=["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 oie(t){return t===void 0&&(t={}),Object.keys(t).forEach(e=>{t[e]=!1}),t}var lie=M.forwardRef((t,e)=>{var n=t||{},{prefixCls:r="w-md-editor",className:i,value:s,commands:a=Qre(),commandsFilter:o,direction:l,extraCommands:c=Zre(),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=Td(n,aie),U=a.map(Fe=>o?o(Fe,!1):Fe).filter(Boolean),G=c.map(Fe=>o?o(Fe,!0):Fe).filter(Boolean),[R,z]=_.useReducer(Ere,{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,()=>$e({},R,{container:O.current,dispatch:z})),_.useMemo(()=>Z.current=d,[d]),_.useEffect(()=>{var Fe={};O.current&&(Fe.container=O.current||void 0),Fe.markdown=s||"",Fe.barPopup={},z&&z($e({},R,Fe))},[]);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 se=_.useRef(),V=_.useRef("preview"),ce=_.useRef(!1);_.useMemo(()=>{se.current=R.textareaWarp,R.textareaWarp&&(R.textareaWarp.addEventListener("mouseover",()=>{V.current="text"}),R.textareaWarp.addEventListener("mouseleave",()=>{V.current="preview"}))},[R.textareaWarp]);var De=(Fe,xi)=>{if(Z.current){var Dn=se.current,Ue=W.current?W.current:void 0;if(ce.current||(V.current=xi,ce.current=!0),Dn&&Ue){var er=(Dn.scrollHeight-Dn.offsetHeight)/(Ue.scrollHeight-Ue.offsetHeight);Fe.target===Dn&&V.current==="text"&&(Ue.scrollTop=Dn.scrollTop/er),Fe.target===Ue&&V.current==="preview"&&(Dn.scrollTop=Ue.scrollTop*er);var tr=0;V.current==="text"?tr=Dn.scrollTop||0:V.current==="preview"&&(tr=Ue.scrollTop||0),z({scrollTop:tr})}}},we=r+"-preview "+(v.className||""),Ne=Fe=>De(Fe,"preview"),ve=_.useMemo(()=>f.jsx("div",{ref:W,className:we,children:f.jsx(SN,$e({},v,{onScroll:Ne,source:R.markdown||""}))}),[we,v,R.markdown]),qt=(K==null?void 0:K.preview)&&(K==null?void 0:K.preview(R.markdown||"",R,z));qt&&M.isValidElement(qt)&&(ve=f.jsx("div",{className:we,ref:W,onScroll:Ne,children:qt}));var vi=$e({},H.style,{height:R.height||"100%"}),An=()=>z({barPopup:$e({},oie(R.barPopup))}),vr=Fe=>z({height:Fe}),Ps=Fe=>{if(N&&N(Fe.target.value,Fe,R),x&&x.onChange&&x.onChange(Fe),R.textarea&&R.textarea instanceof HTMLTextAreaElement&&D){var xi=new qy(R.textarea),Dn=xi.getState()||{};D($e({},Dn,{lineCount:Fe.target.value.split(`
540
- `).length,length:Fe.target.value.length}))}};return f.jsx(ou.Provider,{value:$e({},R,{dispatch:z}),children:f.jsxs("div",$e({ref:O,className:I},H,{onClick:An,style:vi,children:[f.jsx(FN,{hideToolbar:L,toolbarBottom:$,prefixCls:r,overflow:y,placement:"top"}),f.jsxs("div",{className:r+"-content",children:[/(edit|live)/.test(R.preview||"")&&f.jsx(rie,$e({className:r+"-input",prefixCls:r,autoFocus:C},x,{onChange:Ps,renderTextarea:(K==null?void 0:K.textarea)||X,onScroll:Fe=>De(Fe,"text")})),/(live|preview)/.test(R.preview||"")&&ve]}),h&&!R.fullscreen&&f.jsx(sie,{prefixCls:r,height:R.height,maxHeight:b,minHeight:w,onChange:vr}),f.jsx(FN,{hideToolbar:L,toolbarBottom:$,prefixCls:r,overflow:y,placement:"bottom"})]}))})}),BN=lie;BN.Markdown=SN;const pa=({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(BN,{preview:"edit",value:i,onChange:c,...l,className:"bg-white dark:bg-slate-800 ",style:{color:"inherit"}})})},di=(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}}=E4(t,e),{nav:v,navWithState:x,state:b}=Pi(),w=_.useMemo(()=>{let U={};try{U=i?RR(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}},cie={name:"🙋🏻‍♂️ Contact Info",key:"contact",comp:Q(Be,{className:""}),comp_params:{className:"w-full"},fields:[{key:"email",name:"Email",type:"email",validate:!0,editable:!0,comp:Q(Me(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(Me(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(Me(Pe),{className:"h-10"},!1),comp_params:{className:"w-full h-fit mt-5 text-gray-400"}}]},uie={name:"✉︎ Address Info",key:"address",comp:Q(Be,{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(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(Me(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(Me(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(Me(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(Me(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(Me(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(Me(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(Me(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(Me(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(Me(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(Me(Pe),{className:"h-10"},!1),comp_params:{className:"w-full lg:w-[30%] h-fit text-gray-400"}}]},die={name:"☑ Status",key:"status",comp:Q(Be,{className:""}),comp_params:{className:"w-full"},fields:[{key:"payment",name:"Payment Status",type:"text",validate:!1,desc:"What is the payment status",defaultValue:b4.unpaid,comp:Q(Me(pm(Object.values(b4))),{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:_4.draft,comp:Q(Me(pm(Object.values(_4))),{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:uw.created,comp:Q(Me(pm(Object.values(uw))),{className:"text-gray-600"},!1),comp_params:{className:"text-gray-500 mt-5"}}]},fie={name:"Right",comp:Be,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(mY,{}),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(lY,{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(cY,{className:"w-full --bg-red-200 "}),comp_params:{className:"w-full"}},die,{key:"tags",name:"# Tags",type:"compund",validate:!1,editable:!0,desc:"Tags help you attach small attributes",comp:Q(ia)}]},hie={name:"Main",comp:Be,comp_params:{className:`w-full gap-5 items-center
540
+ `).length,length:Fe.target.value.length}))}};return f.jsx(ou.Provider,{value:$e({},R,{dispatch:z}),children:f.jsxs("div",$e({ref:O,className:I},H,{onClick:An,style:vi,children:[f.jsx(FN,{hideToolbar:L,toolbarBottom:$,prefixCls:r,overflow:y,placement:"top"}),f.jsxs("div",{className:r+"-content",children:[/(edit|live)/.test(R.preview||"")&&f.jsx(rie,$e({className:r+"-input",prefixCls:r,autoFocus:C},x,{onChange:Ps,renderTextarea:(K==null?void 0:K.textarea)||X,onScroll:Fe=>De(Fe,"text")})),/(live|preview)/.test(R.preview||"")&&ve]}),h&&!R.fullscreen&&f.jsx(sie,{prefixCls:r,height:R.height,maxHeight:b,minHeight:w,onChange:vr}),f.jsx(FN,{hideToolbar:L,toolbarBottom:$,prefixCls:r,overflow:y,placement:"bottom"})]}))})}),BN=lie;BN.Markdown=SN;const pa=({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(BN,{preview:"edit",value:i,onChange:c,...l,className:"bg-white dark:bg-slate-800 ",style:{color:"inherit"}})})},di=(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}}=E4(t,e),{nav:v,navWithState:x,state:b}=Pi(),w=_.useMemo(()=>{let U={};try{U=i?RR(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}},cie={name:"🙋🏻‍♂️ Contact Info",key:"contact",comp:Q(Be,{className:""}),comp_params:{className:"w-full"},fields:[{key:"email",name:"Email",type:"email",validate:!0,editable:!0,comp:Q(Me(Ie),{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(Ie),{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(Ie),{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(Ie),{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(Ie),{className:"h-10"},!1),comp_params:{className:"w-full h-fit mt-5 text-gray-400"}}]},uie={name:"✉︎ Address Info",key:"address",comp:Q(Be,{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(Ie),{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(Ie),{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(Ie),{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(Ie),{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(Ie),{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(Ie),{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(Ie),{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(Ie),{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(Ie),{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(Ie),{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(Ie),{className:"h-10"},!1),comp_params:{className:"w-full lg:w-[30%] h-fit text-gray-400"}}]},die={name:"☑ Status",key:"status",comp:Q(Be,{className:""}),comp_params:{className:"w-full"},fields:[{key:"payment",name:"Payment Status",type:"text",validate:!1,desc:"What is the payment status",defaultValue:b4.unpaid,comp:Q(Me(pm(Object.values(b4))),{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:_4.draft,comp:Q(Me(pm(Object.values(_4))),{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:uw.created,comp:Q(Me(pm(Object.values(uw))),{className:"text-gray-600"},!1),comp_params:{className:"text-gray-500 mt-5"}}]},fie={name:"Right",comp:Be,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(mY,{}),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(lY,{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(cY,{className:"w-full --bg-red-200 "}),comp_params:{className:"w-full"}},die,{key:"tags",name:"# Tags",type:"compund",validate:!1,editable:!0,desc:"Tags help you attach small attributes",comp:Q(ia)}]},hie={name:"Main",comp:Be,comp_params:{className:`w-full gap-5 items-center
541
541
  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(aW,{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(pY,{className:"w-full --bg-red-200 "}),comp_params:{className:"w-full text-xs py-auto --font-semibold"}},cie,uie,{key:"attributes",name:"Attributes",validate:!1,editable:!0,desc:"Attributes can contain richer text values than tags",comp:Q(co),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(pa),comp_params:{className:"w-full"}},{name:"JSON",type:"compund",validate:!1,editable:!1,desc:"Observe the RAW data",comp:xs,comp_params:{className:"w-full"}}]},pie={name:"Root",comp:Be,comp_params:{className:`w-full gap-5 --justify-center --bg-red-100 items-center
542
542
  lg:max-w-max lg:items-start lg:w-fit flex flex-col
543
543
  lg:flex-row --mx-auto`},fields:[hie,fie]},Qy=({mode:t,...e})=>{const{id:n,base:r}=or(),{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}=di("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(ji,{major:["orders",n??"create"],className:""}),f.jsx(vs,{doc:h,className:"mt-5",collectionId:"orders"}),f.jsx(ys,{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(ss,{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(jr,{error:b,className:"w-full"}),f.jsx(Xr,{ref:C,field:pie,value:h??{},context:D,isViewMode:g,className:"mt-8 mx-auto"},d)]})})]})},HN=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",mie=[{key:"undefined",name:"Full Name",comp:Ut,transform:t=>HN(t),comp_params:{className:"font-semibold"}},{key:"email",name:"Email",comp:Ut},{key:"updated_at",name:"Last Updated",comp:gs},{key:"auth_id",name:"UID",comp:Ut,comp_params:{extra:"max-w-[4rem]"}},{key:void 0,name:"Actions",comp:Pr}],zN=({})=>{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}}=Rr("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(dr,{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
544
  shelf-border-color shadow-md mt-5
545
- dark:shadow-slate-900`,children:[f.jsx(ms,{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(ur,{context:e,data:r,fields:mie}),f.jsx(Lr,{prev:h,next:p,limit:t.limit,onLimitChange:u})]})]})]})})},gie=_.forwardRef(({resource:t,limit:e=5,context:n,schema:r,...i},s)=>{an();const{pages:a,page:o,loading:l,error:c,queryCount:u,actions:{prev:d,next:h,query:p}}=Ja(t,sl,!1);return T4(),_.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(ur,{context:n,data:o,fields:r}),f.jsx(Lr,{prev:d,next:h,onLimitChange:void 0})]})}),yie=({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(_d,{current_state:a,children:e??n,to:s==null?void 0:s(t.item),className:"underline"})})},vie={comp:Be,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(({value:t,field:e,context:n,error:r,setError:i,...s})=>{const a=_.useRef([{key:"id",name:"ID",comp:({...o})=>f.jsx(yie,{...o,url_fn:l=>`/pages/orders/${l==null?void 0:l.id}`,get_state:()=>n.getState()})},{key:"updated_at",name:"Last Updated",comp:gs},{key:"pricing.total",name:"Price",comp:Ut,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(gie,{limit:5,resource:`customers/${t==null?void 0:t.email}/orders`,schema:a.current})})},{className:"w-full"}),comp_params:{className:"w-full h-fit"}},{key:"firstname",name:"First Name",type:"text",validate:!0,editable:!0,comp:Q(Me(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(Me(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(Me(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(Me(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(Me(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(co),comp_params:{className:"w-full"}},{name:"JSON",type:"compund",validate:!1,editable:!1,desc:"Observe the RAW data",comp:xs,comp_params:{className:"w-full"}}]},xie={key:"address",name:"📬 Address",comp:Q(Be,{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(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(Me(Pe),{className:"h-10 w-full",placeholder:""},!1),comp_params:{className:"text-gray-500"}},{key:"city",name:"City",type:"text",validate:!1,comp:Q(Me(Pe),{className:"h-10 w-full"},!1),comp_params:{className:"text-gray-500"}},{key:"country",name:"Country",type:"text",validate:!1,comp:Q(Me(Pe),{className:"h-10 w-full"},!1),comp_params:{className:"text-gray-500"}},{key:"state",name:"State",type:"text",validate:!1,comp:Q(Me(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(Me(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(Me(Pe),{className:"h-10 w-full"},!1),comp_params:{className:"text-gray-500"}}]},_ie={name:"right",comp:Be,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(ia),desc:"Add tags to your users to better categorize them",comp_params:{className:"w-full "}},xie]},bie={name:"Root",comp:Be,comp_params:{className:"w-full gap-5 lg:justify-center mx-auto lg:w-fit flex flex-col justify-start lg:flex-row "},fields:[vie,_ie]},Zy=({mode:t,...e})=>{const{id:n,base:r}=or(),{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}=di("customers",n,"/pages/customers",t,r);return f.jsxs("div",{className:"w-full lg:min-w-fit mx-auto",children:[f.jsx(ji,{major:["customers",n??"create"],className:""}),f.jsx(vs,{doc:c,className:"mt-5",collectionId:"customers"}),f.jsx(ys,{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(ss,{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(jr,{error:y,className:"w-full"}),f.jsx(Xr,{ref:x,field:bie,value:c??{},context:o,isViewMode:h,className:"mt-8"},l)]})})]})},wie=[{key:"handle",name:"Name",comp:Ut,comp_params:{className:"font-semibold"}},{key:"values",name:"Values",comp:DE,comp_params:{className:"font-semibold"}},{key:void 0,name:"Actions",comp:Pr,comp_params:{className:""}}],UN=({})=>{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}}=Rr("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(dr,{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
+ dark:shadow-slate-900`,children:[f.jsx(ms,{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(ur,{context:e,data:r,fields:mie}),f.jsx(Lr,{prev:h,next:p,limit:t.limit,onLimitChange:u})]})]})]})})},gie=_.forwardRef(({resource:t,limit:e=5,context:n,schema:r,...i},s)=>{an();const{pages:a,page:o,loading:l,error:c,queryCount:u,actions:{prev:d,next:h,query:p}}=Ja(t,sl,!1);return T4(),_.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(ur,{context:n,data:o,fields:r}),f.jsx(Lr,{prev:d,next:h,onLimitChange:void 0})]})}),yie=({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(_d,{current_state:a,children:e??n,to:s==null?void 0:s(t.item),className:"underline"})})},vie={comp:Be,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(({value:t,field:e,context:n,error:r,setError:i,...s})=>{const a=_.useRef([{key:"id",name:"ID",comp:({...o})=>f.jsx(yie,{...o,url_fn:l=>`/pages/orders/${l==null?void 0:l.id}`,get_state:()=>n.getState()})},{key:"updated_at",name:"Last Updated",comp:gs},{key:"pricing.total",name:"Price",comp:Ut,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(gie,{limit:5,resource:`customers/${t==null?void 0:t.email}/orders`,schema:a.current})})},{className:"w-full"}),comp_params:{className:"w-full h-fit"}},{key:"firstname",name:"First Name",type:"text",validate:!0,editable:!0,comp:Q(Me(Ie),{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(Ie),{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(Ie),{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(Ie),{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(Ie),{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(co),comp_params:{className:"w-full"}},{name:"JSON",type:"compund",validate:!1,editable:!1,desc:"Observe the RAW data",comp:xs,comp_params:{className:"w-full"}}]},xie={key:"address",name:"📬 Address",comp:Q(Be,{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(Ie),{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(Ie),{className:"h-10 w-full",placeholder:""},!1),comp_params:{className:"text-gray-500"}},{key:"city",name:"City",type:"text",validate:!1,comp:Q(Me(Ie),{className:"h-10 w-full"},!1),comp_params:{className:"text-gray-500"}},{key:"country",name:"Country",type:"text",validate:!1,comp:Q(Me(Ie),{className:"h-10 w-full"},!1),comp_params:{className:"text-gray-500"}},{key:"state",name:"State",type:"text",validate:!1,comp:Q(Me(Ie),{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(Ie),{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(Ie),{className:"h-10 w-full"},!1),comp_params:{className:"text-gray-500"}}]},_ie={name:"right",comp:Be,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(ia),desc:"Add tags to your users to better categorize them",comp_params:{className:"w-full "}},xie]},bie={name:"Root",comp:Be,comp_params:{className:"w-full gap-5 lg:justify-center mx-auto lg:w-fit flex flex-col justify-start lg:flex-row "},fields:[vie,_ie]},Zy=({mode:t,...e})=>{const{id:n,base:r}=or(),{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}=di("customers",n,"/pages/customers",t,r);return f.jsxs("div",{className:"w-full lg:min-w-fit mx-auto",children:[f.jsx(ji,{major:["customers",n??"create"],className:""}),f.jsx(vs,{doc:c,className:"mt-5",collectionId:"customers"}),f.jsx(ys,{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(ss,{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(jr,{error:y,className:"w-full"}),f.jsx(Xr,{ref:x,field:bie,value:c??{},context:o,isViewMode:h,className:"mt-8"},l)]})})]})},wie=[{key:"handle",name:"Name",comp:Ut,comp_params:{className:"font-semibold"}},{key:"values",name:"Values",comp:DE,comp_params:{className:"font-semibold"}},{key:void 0,name:"Actions",comp:Pr,comp_params:{className:""}}],UN=({})=>{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}}=Rr("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(dr,{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
546
  shelf-border-color shadow-md mt-5
547
- dark:shadow-slate-900`,children:[f.jsx(ms,{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(ur,{context:e,data:r,fields:wie}),f.jsx(Lr,{prev:h,next:p,limit:t.limit,onLimitChange:u})]})]})]})})},Eie=t=>t==null?void 0:t.match(/\S+/g),kie=({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=Eie(c.current.value.toString()).map(g=>ij(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(Gn,{children:"Add",stroke:"border-2 h-10",onClick:u})]}),f.jsx(Ri,{tags:o,onClick:d,onRemove:d,clsCapsule:"bg-pink-500",className:"mt-3"})]})},Cie=t=>{const e=Array.isArray(t)&&t.length;return[e,e?"":"Empty values"]},Tie={name:"Root",comp:Be,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(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:Cie,comp:Q(kie),comp_params:{className:"w-full"}},{key:"description",name:"📝 Description",type:"text",validate:!1,editable:!0,desc:"Describe the purpose of this tag",comp:Q(pa),comp_params:{className:"w-full"}},{name:"JSON",type:"compund",validate:!1,editable:!1,desc:"Observe the RAW data",comp:xs,comp_params:{className:"w-full"}}]},Xy=({mode:t,...e})=>{const{id:n,base:r}=or(),{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}=di("tags",n,"/pages/tags",t,r);return f.jsxs("div",{className:"w-full lg:min-w-fit mx-auto",children:[f.jsx(ji,{major:["tags",n??"create"],className:""}),f.jsx(vs,{doc:c,className:"mt-5",collectionId:"tags"}),f.jsx(ys,{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(ss,{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(jr,{error:y,className:"w-full max-w-[35rem] mx-auto"}),f.jsx(Xr,{ref:x,field:Tie,value:c??{},context:o,isViewMode:h,className:"mx-auto"},l)]})]})},Sie=[{key:"title",name:"Title",comp:Ut,comp_params:{className:"font-semibold"}},{key:"handle",name:"Handle",comp:Ut,comp_params:{className:"font-semibold"}},{key:void 0,name:"Actions",comp:Pr,comp_params:{className:""}}],$N=({})=>{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}}=Rr("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(dr,{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
+ dark:shadow-slate-900`,children:[f.jsx(ms,{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(ur,{context:e,data:r,fields:wie}),f.jsx(Lr,{prev:h,next:p,limit:t.limit,onLimitChange:u})]})]})]})})},Eie=t=>t==null?void 0:t.match(/\S+/g),kie=({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=Eie(c.current.value.toString()).map(g=>ij(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(Gn,{children:"Add",stroke:"border-2 h-10",onClick:u})]}),f.jsx(Ri,{tags:o,onClick:d,onRemove:d,clsCapsule:"bg-pink-500",className:"mt-3"})]})},Cie=t=>{const e=Array.isArray(t)&&t.length;return[e,e?"":"Empty values"]},Tie={name:"Root",comp:Be,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(Ie),{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:Cie,comp:Q(kie),comp_params:{className:"w-full"}},{key:"description",name:"📝 Description",type:"text",validate:!1,editable:!0,desc:"Describe the purpose of this tag",comp:Q(pa),comp_params:{className:"w-full"}},{name:"JSON",type:"compund",validate:!1,editable:!1,desc:"Observe the RAW data",comp:xs,comp_params:{className:"w-full"}}]},Xy=({mode:t,...e})=>{const{id:n,base:r}=or(),{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}=di("tags",n,"/pages/tags",t,r);return f.jsxs("div",{className:"w-full lg:min-w-fit mx-auto",children:[f.jsx(ji,{major:["tags",n??"create"],className:""}),f.jsx(vs,{doc:c,className:"mt-5",collectionId:"tags"}),f.jsx(ys,{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(ss,{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(jr,{error:y,className:"w-full max-w-[35rem] mx-auto"}),f.jsx(Xr,{ref:x,field:Tie,value:c??{},context:o,isViewMode:h,className:"mx-auto"},l)]})]})},Sie=[{key:"title",name:"Title",comp:Ut,comp_params:{className:"font-semibold"}},{key:"handle",name:"Handle",comp:Ut,comp_params:{className:"font-semibold"}},{key:void 0,name:"Actions",comp:Pr,comp_params:{className:""}}],$N=({})=>{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}}=Rr("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(dr,{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
548
548
  shelf-border-color shadow-md mt-5
549
549
  dark:shadow-slate-900`,children:[f.jsx(ms,{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(ur,{context:e,data:r,fields:Sie}),f.jsx(Lr,{prev:h,next:p,limit:t.limit,onLimitChange:u})]})]})]})})};function Nie(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function VN(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 YN(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?VN(Object(n),!0).forEach(function(r){Nie(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):VN(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function Aie(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 Die(t,e){if(t==null)return{};var n=Aie(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 Oie(t,e){return Mie(t)||Iie(t,e)||Lie(t,e)||Pie()}function Mie(t){if(Array.isArray(t))return t}function Iie(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 Lie(t,e){if(t){if(typeof t=="string")return WN(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 WN(t,e)}}function WN(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 Pie(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
550
550
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Rie(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function GN(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 KN(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?GN(Object(n),!0).forEach(function(r){Rie(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):GN(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function jie(){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 Jd(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 A0(t){return{}.toString.call(t).includes("Object")}function Fie(t){return!Object.keys(t).length}function ef(t){return typeof t=="function"}function Bie(t,e){return Object.prototype.hasOwnProperty.call(t,e)}function Hie(t,e){return A0(e)||_o("changeType"),Object.keys(e).some(function(n){return!Bie(t,n)})&&_o("changeField"),e}function zie(t){ef(t)||_o("selectorType")}function Uie(t){ef(t)||A0(t)||_o("handlerType"),A0(t)&&Object.values(t).some(function(e){return!ef(e)})&&_o("handlersType")}function $ie(t){t||_o("initialIsRequired"),A0(t)||_o("initialType"),Fie(t)&&_o("initialContent")}function Vie(t,e){throw new Error(t[e]||t.default)}var Yie={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"},_o=Jd(Vie)(Yie),D0={changes:Hie,selector:zie,handler:Uie,initial:$ie};function Wie(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};D0.initial(t),D0.handler(e);var n={current:t},r=Jd(qie)(n,e),i=Jd(Kie)(n),s=Jd(D0.changes)(t),a=Jd(Gie)(n);function o(){var c=arguments.length>0&&arguments[0]!==void 0?arguments[0]:function(u){return u};return D0.selector(c),c(n.current)}function l(c){jie(r,i,s,a)(c)}return[o,l]}function Gie(t,e){return ef(e)?e(t.current):e}function Kie(t,e){return t.current=KN(KN({},t.current),e),e}function qie(t,e,n){return ef(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 Qie={create:Wie},Zie={paths:{vs:"https://cdn.jsdelivr.net/npm/monaco-editor@0.43.0/min/vs"}};function Xie(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 Jie(t){return{}.toString.call(t).includes("Object")}function ese(t){return t||QN("configIsRequired"),Jie(t)||QN("configType"),t.urls?(tse(),{paths:{vs:t.urls.monacoBase}}):t}function tse(){console.warn(qN.deprecation)}function nse(t,e){throw new Error(t[e]||t.default)}var qN={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!
@@ -582,7 +582,7 @@ Expecting `+L.join(", ")+", got '"+(this.terminals_[b]||b)+"'":$="Parse error on
582
582
  rounded-md border w-fit shelf-border-color
583
583
  relative text-base`,children:[f.jsx(PA,{title:"Show Preview to the right",className:"cursor-pointer z-10 transition-transform duration-100 "+(t==0?"scale-150":""),onClick:()=>n(0)}),f.jsx(PA,{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(jB,{title:"Enter Fullscreen",className:"cursor-pointer z-10 transition-transform duration-100 "+(t==2?"scale-150":""),onClick:()=>n(2)})]})},RA=({field:t,context:e,setError:n,value:r,onChange:i,...s})=>{const{isHtml:a=!0}=t.comp_params,o=nA(),[l,c]=_.useState(0),[u,d]=_.useState({}),[h,p]=_.useState(r),{darkMode:m}=al(),g=_.useCallback(x=>{p(x),i(x)},[i]),y=_.useCallback(x=>{c(x)},[]),v=_.useMemo(()=>{try{let b=Loe.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(joe,{onChange:y,mode:l}),l<2&&f.jsxs("div",{className:"w-full flex flex-col gap-5 relative",children:[f.jsx(rv,{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 ":""}
584
584
  rounded-md border shelf-border-color resize overflow-auto bg-white`,height:"500px"})]}),l==2&&f.jsxs(Roe,{className:"z-[100] fixed left-0 top-0 w-full h-full",children:[f.jsx(rv,{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
585
- shelf-plain-card-soft justify-between w-full p-3`,children:[f.jsx("span",{children:"Preview"}),f.jsx(wP,{onClick:()=>c(0),className:"cursor-pointer"})]}),f.jsx("iframe",{width:"100%",srcDoc:v,className:" border shelf-border-color bg-white",height:"100%"})]})]})]})})},jA={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"},Foe={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"},Boe=[{name:"customer",example:JSON.stringify({customer:{email:"john@dow.com",firstname:"John",lastname:"Dow",id:"cus_65f2ae6e8bf30e6cd0ca95fa"},info:jA})},{name:"order",example:JSON.stringify({order:Foe,info:jA})}],Hoe=({field:t,context:e,setError:n,value:r={},onChange:i,...s})=>{const a=nA(),[o,l]=_.useState(r),{darkMode:c}=al(),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(Ri,{tags:Boe,name_fn:h=>h.name,onClick:h=>{u(h.example,null)}})}),f.jsx(rv,{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"})]})})},zoe={name:"Root",comp:Be,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(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(RA,{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(RA,{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(Hoe),comp_params:{className:"w-full"}},{key:"description",name:"📝 Description",type:"text",validate:!1,editable:!0,desc:"Describe the purpose of this tag",comp:Q(pa),comp_params:{className:"w-full"}},{name:"JSON",type:"compund",validate:!1,editable:!1,desc:"Observe the RAW data",comp:({value:t})=>f.jsx(xs,{value:{...t,template_html:"...",template_text:"..."}}),comp_params:{className:"w-full"}}]},$v=({mode:t,...e})=>{const{id:n,base:r}=or(),{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}=di("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(ji,{major:["templates",n??"create"],className:""}),f.jsx(vs,{doc:u,className:"mt-5",collectionId:"tags"}),f.jsx(ys,{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(ss,{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(jr,{error:v,className:"w-full max-w-[35rem] mx-auto"}),f.jsx(Xr,{ref:b,field:zoe,value:u??{},context:l,isViewMode:p,className:"mx-auto"},c)]})]})},Uoe=[{key:"title",name:"Title",comp:Ut,comp_params:{className:"font-semibold max-w-[8rem] "}},{key:"price",name:"Price",comp:Ut},{key:"collections",name:"Collections",comp:DE,comp_params:{className:`p-3 font-bold max-w-[8rem] sm:max-w-[12rem] xl:max-w-[24rem]
585
+ shelf-plain-card-soft justify-between w-full p-3`,children:[f.jsx("span",{children:"Preview"}),f.jsx(wP,{onClick:()=>c(0),className:"cursor-pointer"})]}),f.jsx("iframe",{width:"100%",srcDoc:v,className:" border shelf-border-color bg-white",height:"100%"})]})]})]})})},jA={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"},Foe={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"},Boe=[{name:"customer",example:JSON.stringify({customer:{email:"john@dow.com",firstname:"John",lastname:"Dow",id:"cus_65f2ae6e8bf30e6cd0ca95fa"},info:jA})},{name:"order",example:JSON.stringify({order:Foe,info:jA})}],Hoe=({field:t,context:e,setError:n,value:r={},onChange:i,...s})=>{const a=nA(),[o,l]=_.useState(r),{darkMode:c}=al(),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(Ri,{tags:Boe,name_fn:h=>h.name,onClick:h=>{u(h.example,null)}})}),f.jsx(rv,{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"})]})})},zoe={name:"Root",comp:Be,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(Ie,{}),{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(RA,{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(RA,{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(Hoe),comp_params:{className:"w-full"}},{key:"description",name:"📝 Description",type:"text",validate:!1,editable:!0,desc:"Describe the purpose of this tag",comp:Q(pa),comp_params:{className:"w-full"}},{name:"JSON",type:"compund",validate:!1,editable:!1,desc:"Observe the RAW data",comp:({value:t})=>f.jsx(xs,{value:{...t,template_html:"...",template_text:"..."}}),comp_params:{className:"w-full"}}]},$v=({mode:t,...e})=>{const{id:n,base:r}=or(),{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}=di("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(ji,{major:["templates",n??"create"],className:""}),f.jsx(vs,{doc:u,className:"mt-5",collectionId:"tags"}),f.jsx(ys,{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(ss,{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(jr,{error:v,className:"w-full max-w-[35rem] mx-auto"}),f.jsx(Xr,{ref:b,field:zoe,value:u??{},context:l,isViewMode:p,className:"mx-auto"},c)]})]})},Uoe=[{key:"title",name:"Title",comp:Ut,comp_params:{className:"font-semibold max-w-[8rem] "}},{key:"price",name:"Price",comp:Ut},{key:"collections",name:"Collections",comp:DE,comp_params:{className:`p-3 font-bold max-w-[8rem] sm:max-w-[12rem] xl:max-w-[24rem]
586
586
  inline-block whitespace-nowrap`,name_fn:t=>t.handle}},{key:"updated_at",name:"Last Updated",comp:gs},{key:void 0,name:"Actions",comp:Pr,comp_params:{className:""}}],FA=({})=>{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}}=Rr("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(dr,{should_onboard:c,overallCollectionCount:a,hasLoaded:o,resource:l}),f.jsxs("div",{className:`w-full rounded-md overflow-hidden border
587
587
  shelf-border-color shadow-md mt-5
588
588
  dark:shadow-slate-900 `,children:[f.jsx(de,{show:s,children:s==null?void 0:s.toString()}),f.jsx(ms,{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(ur,{context:e,data:r,fields:Uoe}),f.jsx(Lr,{prev:h,next:p,limit:t.limit,onLimitChange:u})]})]})]})})},H0={x:0,y:0,width:0,height:0,unit:"px"},fu=(t,e,n)=>Math.min(Math.max(t,e),n),$oe=(...t)=>t.filter(e=>e&&typeof e=="string").join(" "),BA=(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 hu(t,e,n){return t.unit==="%"?{...H0,...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 wo(t,e,n){return t.unit?t.unit==="px"?{...H0,...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}:{...H0,...t,unit:"px"}}function HA(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 Voe(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 pu={capture:!0,passive:!1},Eo=class Qi 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=wo(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(wo(u,o.width,o.height),hu(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(),BA(n,l)||i(wo(l,a.width,a.height),hu(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)?Qi.nudgeStepLarge:e.shiftKey?Qi.nudgeStepMedium:Qi.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=fu(c.x,0,l.width-c.width),c.y=fu(c.y,0,l.height-c.height);const d=wo(c,l.width,l.height),h=hu(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)?Qi.nudgeStepLarge:e.shiftKey?Qi.nudgeStepMedium:Qi.nudgeStep,m=wo(i,h.width,h.height),g=Voe(m,e.key,p,n),y=HA(g,r,n,h.width,h.height,a,o,l,c);if(!BA(i,y)){const v=hu(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(wo(n,a.width,a.height),hu(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(wo(n,i,s),hu(n,i,s))}}componentWillUnmount(){this.resizeObserver&&this.resizeObserver.disconnect()}bindDocMove(){this.docMoveBound||(this.document.addEventListener("pointermove",this.onDocPointerMove,pu),this.document.addEventListener("pointerup",this.onDocPointerDone,pu),this.document.addEventListener("pointercancel",this.onDocPointerDone,pu),this.docMoveBound=!0)}unbindDocMove(){this.docMoveBound&&(this.document.removeEventListener("pointermove",this.onDocPointerMove,pu),this.document.removeEventListener("pointerup",this.onDocPointerDone,pu),this.document.removeEventListener("pointercancel",this.onDocPointerDone,pu),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=fu(e.startCropX+i,0,n.width-r.width),r.y=fu(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=HA(p,n,c,s.width,s.height,a,o,r,i);return n||Qi.xyOrds.indexOf(u)>-1?l=m:Qi.xOrds.indexOf(u)>-1?(l.x=m.x,l.width=m.width):Qi.yOrds.indexOf(u)>-1&&(l.y=m.y,l.height=m.height),l.x=fu(l.x,0,s.width-l.width),l.y=fu(l.y,0,s.height-l.height),l}createCropSelection(){const{ariaLabels:e=Qi.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={...H0,...this.props.crop||{}};return wo(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=$oe("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)}};Eo.xOrds=["e","w"],Eo.yOrds=["n","s"],Eo.xyOrds=["nw","ne","se","sw"],Eo.nudgeStep=1,Eo.nudgeStepMedium=10,Eo.nudgeStepLarge=100,Eo.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 Yoe=Eo;const Woe=(t=!1)=>{const[e,n]=_.useState(t),r=_.useCallback(()=>{n(i=>!i)},[]);return[e,r]};var zA={exports:{}};/*!
@@ -654,13 +654,13 @@ Valid keys: `+JSON.stringify(Object.keys(R),null," "));var ve=Ne(V,we,Z,I,se+".
654
654
  flex-shrink-0`,onClick:n})]})},lle=({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(Gn,{children:"Browse products",stroke:"border-2",className:"w-40 h-10 mx-auto",onClick:()=>l.current.show()}),f.jsx(Xs,{ref:l,children:f.jsx(kd,{onSave:c,onCancel:()=>l.current.hide()})}),(a==null?void 0:a.length)>0&&f.jsx(kt,{className:"mt-5"}),a.map(d=>f.jsx(ole,{product:d,context:e,onRemove:()=>u(d.handle)},d.handle))]})};var z0,cle=new Uint8Array(16);function ule(){if(!z0&&(z0=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||typeof msCrypto<"u"&&typeof msCrypto.getRandomValues=="function"&&msCrypto.getRandomValues.bind(msCrypto),!z0))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return z0(cle)}const dle=/^(?:[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 fle(t){return typeof t=="string"&&dle.test(t)}for(var Nn=[],Yv=0;Yv<256;++Yv)Nn.push((Yv+256).toString(16).substr(1));function hle(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,n=(Nn[t[e+0]]+Nn[t[e+1]]+Nn[t[e+2]]+Nn[t[e+3]]+"-"+Nn[t[e+4]]+Nn[t[e+5]]+"-"+Nn[t[e+6]]+Nn[t[e+7]]+"-"+Nn[t[e+8]]+Nn[t[e+9]]+"-"+Nn[t[e+10]]+Nn[t[e+11]]+Nn[t[e+12]]+Nn[t[e+13]]+Nn[t[e+14]]+Nn[t[e+15]]).toLowerCase();if(!fle(n))throw TypeError("Stringified UUID is invalid");return n}function Wv(t,e,n){t=t||{};var r=t.random||(t.rng||ule)();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 hle(r)}const ple=({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:Wv(),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,Wv,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(Ri,{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(Gn,{children:"add",className:"h-10 ",onClick:c})]})]}),f.jsx(H_,{className:"absolute right-0 top-0 cursor-pointer text-xl",onClick:d=>e(r)})]})},mle=({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:Wv(),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(ple,{option:o,onRemove:s,onChange:i},o==null?void 0:o.id)),f.jsx(N1,{onClick:a,Icon:B_,className:`cursor-pointer text-6xl hover:scale-110
655
655
  transition-transform`})]})},WA=(t,e=[])=>{let n=[];if(t==e.length)return[];if(t==e.length-1)return e[t].map(i=>[i]);let r=WA(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},gle=(t,e)=>t.every(n=>e.some(r=>r.option_id===n.option_id&&r.value_id===n.value_id)),yle=({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=>gle(t,g.selection)))==null?void 0:p.product)==null?void 0:m.handle)},[s,t]),{navWithState:o}=Pi(),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
656
656
  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(M_,{className:"text-lg text-green-500"})}),f.jsx("p",{children:i,className:"text-base font-medium flex-1"})]}),f.jsxs(K5,{toggle:!!a,children:[f.jsxs("div",{className:"flex flex-row gap-3 flex-shrink-0 items-center",children:[f.jsx(_c,{children:f.jsx(as,{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(_c,{children:f.jsx("span",{children:"view",className:"cursor-pointer",onClick:l})})]}),f.jsx(_c,{children:f.jsx(as,{Icon:void 0,text:"create",show:!0,onClick:u,keep_text_on_load:!0,classNameLoading:"text-xs",className:"w-fit underline "})})]})]})},vle=({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 WA(0,i)},[t]);return f.jsx("div",{className:"w-full flex flex-col gap-2",children:r.map(i=>f.jsx(yle,{combination:i,context:e,options:t,setError:n},i==null?void 0:i.map(s=>s.value_id).join("_")))})},xle="‼️ Create at least ONE Option with two values",_le=({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(_d,{to:`/pages/products/${n==null?void 0:n.parent_handle}`,current_state:t==null?void 0:t.getState,children:f.jsx(_c,{children:n==null?void 0:n.parent_handle})})]})},ble=({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(_le,{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(mle,{options:s,onChange:o}),f.jsx(kt,{className:"w-full ",dashed:!0}),f.jsxs("div",{className:"flex flex-row w-full items-center gap-1",children:[f.jsx(KP,{className:"text-xl "}),f.jsx("p",{children:"Variants",className:"text-xl w-full font-semibold"})]}),f.jsxs(K5,{toggle:(s==null?void 0:s.length)??!1,className:"w-full",children:[f.jsx(vle,{options:s,context:n,setError:r}),f.jsx("div",{className:"w-full shelf-text-minor-light text-base",children:xle})]})]})}):"You have to create the product before you add variants"},wle=({value:t,onClick:e})=>f.jsxs("div",{className:`w-full flex flex-col gap-2
657
- py-3 border-b shelf-border-color`,children:[f.jsxs("div",{className:"flex flex-row justify-between items-center",children:[f.jsx(_c,{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`"})]}),Ele={name:"Root",comp:Be,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(({field:t,context:e,value:n=[],onChange:r,setError:i,...s})=>{const a=n.length>0,{navWithState:o}=Pi(),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(wle,{value:c,onClick:l},c.id))})})]})},{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(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(mm,{className:"w-full h-fit"}),desc:`Product handle uniquely identifies the product.
658
- 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(OE),desc:"Set ISBN identifier",comp_params:{className:"w-full h-fit"}},{key:"variants_options",name:"Product Variants",validate:!1,editable:!0,comp:Q(ble,{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(pa),comp_params:{className:"w-full"}},{key:"media",name:"📀 Media",type:"text",validate:!1,editable:!0,desc:"Manage and edit your media files",comp:Q(mu),comp_params:{className:"w-full"}},{key:"video",name:"🎥 Video",type:"text",validate:!1,editable:!0,comp:Q(OE),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(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(Me(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(Me(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(co),comp_params:{className:"w-full"}},{name:"JSON",type:"compund",validate:!1,editable:!1,desc:"Observe the RAW data",comp:xs,comp_params:{className:"w-full"}}]},kle={name:"Root2",comp:Be,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(bd,{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(lle)},{key:"tags",name:"# Tags",type:"compund",validate:!1,editable:!0,desc:"Tags help you attach attributes to products",comp:Q(ia)},{key:"collections",name:"🗂️ Collections",type:"compund",validate:!1,editable:!0,desc:"Which collections does this product belong to ?",comp:Q(Ed,{resource:"collections",slug:"/pages/collections"})}]},Cle={name:"Root",comp:Be,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:[Ele,kle]},Gv=({mode:t,...e})=>{const{id:n,base:r}=or(),{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}=di("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(ji,{major:["products",...N],className:""}),f.jsx(vs,{doc:d,className:"mt-5",collectionId:"products"}),f.jsx(ys,{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(ss,{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(jr,{error:x,className:"w-full"}),f.jsx(Xr,{ref:w,context:S,field:Cle,value:d??{},isViewMode:m,className:"mt-8"},c)]})})]})},Tle=[{key:"title",name:"Title",comp:Ut,comp_params:{className:"font-semibold",extra:"max-w-[10rem] md:max-w-[18rem]"}},{key:"updated_at",name:"Last Updated",comp:gs},{key:void 0,name:"Actions",comp:Pr,comp_params:{className:""}}],GA=({})=>{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}}=Rr("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(dr,{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
657
+ py-3 border-b shelf-border-color`,children:[f.jsxs("div",{className:"flex flex-row justify-between items-center",children:[f.jsx(_c,{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`"})]}),Ele={name:"Root",comp:Be,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(({field:t,context:e,value:n=[],onChange:r,setError:i,...s})=>{const a=n.length>0,{navWithState:o}=Pi(),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(wle,{value:c,onClick:l},c.id))})})]})},{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(Ie),{className:"h-10"},!0,!0),comp_params:{className:"w-full h-fit"}},{key:"handle",name:"🔗 Handle",type:"text",validate:!1,editable:!0,comp:Q(mm,{className:"w-full h-fit"}),desc:`Product handle uniquely identifies the product.
658
+ 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(OE),desc:"Set ISBN identifier",comp_params:{className:"w-full h-fit"}},{key:"variants_options",name:"Product Variants",validate:!1,editable:!0,comp:Q(ble,{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(pa),comp_params:{className:"w-full"}},{key:"media",name:"📀 Media",type:"text",validate:!1,editable:!0,desc:"Manage and edit your media files",comp:Q(mu),comp_params:{className:"w-full"}},{key:"video",name:"🎥 Video",type:"text",validate:!1,editable:!0,comp:Q(OE),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(Ie),{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(Ie),{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(Ie),{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(co),comp_params:{className:"w-full"}},{name:"JSON",type:"compund",validate:!1,editable:!1,desc:"Observe the RAW data",comp:xs,comp_params:{className:"w-full"}}]},kle={name:"Root2",comp:Be,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(bd,{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(lle)},{key:"tags",name:"# Tags",type:"compund",validate:!1,editable:!0,desc:"Tags help you attach attributes to products",comp:Q(ia)},{key:"collections",name:"🗂️ Collections",type:"compund",validate:!1,editable:!0,desc:"Which collections does this product belong to ?",comp:Q(Ed,{resource:"collections",slug:"/pages/collections"})}]},Cle={name:"Root",comp:Be,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:[Ele,kle]},Gv=({mode:t,...e})=>{const{id:n,base:r}=or(),{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}=di("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(ji,{major:["products",...N],className:""}),f.jsx(vs,{doc:d,className:"mt-5",collectionId:"products"}),f.jsx(ys,{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(ss,{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(jr,{error:x,className:"w-full"}),f.jsx(Xr,{ref:w,context:S,field:Cle,value:d??{},isViewMode:m,className:"mt-8"},c)]})})]})},Tle=[{key:"title",name:"Title",comp:Ut,comp_params:{className:"font-semibold",extra:"max-w-[10rem] md:max-w-[18rem]"}},{key:"updated_at",name:"Last Updated",comp:gs},{key:void 0,name:"Actions",comp:Pr,comp_params:{className:""}}],GA=({})=>{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}}=Rr("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(dr,{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
659
659
  shelf-border-color shadow-md mt-5
660
660
  dark:shadow-slate-900 `,children:[f.jsx(ms,{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(ur,{context:e,data:r,fields:Tle}),f.jsx(Lr,{prev:h,next:p,limit:t.limit,onLimitChange:u})]})]})]})})},Sle=[{key:"title",name:"Title",comp:Ut},{key:"updated_at",name:"Last Updated",comp:gs},{key:void 0,name:"Actions",comp:Pr}],Nle=_.forwardRef(({collection_handle_or_id:t,limit:e=5,context:n,onLoaded:r,...i},s)=>{const{sdk:a}=an(),{pages:o,page:l,loading:c,error:u,queryCount:d,actions:{prev:h,next:p,query:m}}=Ja(`collections/${t}/products`,sl,!1),g=T4();_.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(ur,{context:y,data:l,fields:Sle}),f.jsx(Lr,{prev:h,next:p,onLimitChange:void 0})]})}),Ale=({value:t,context:e})=>{const{sdk:n}=an(),[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(Gs,{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(Nle,{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(lt,{className:`text-gray-500 text-sm w-fit mx-auto
661
661
  shadow-gray-800/25 shadow-lg hover:scale-110
662
662
  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(BB,{className:"text-4xl text-white "+(r?"animate-spin":"")})})]})}),f.jsx(Xs,{ref:c,children:f.jsx(kd,{onSave:d,onCancel:()=>c.current.hide()})})]}),f.jsx(de,{show:!(t!=null&&t.handle),children:f.jsx("p",{children:`Only after Collection is created,
663
- you will be able to add products here`,className:"text-2xl font-semibold text-gray-400"})})]})},Dle=({collectionId:t,value:e})=>{const[n,r]=_.useState([]),[i,s]=_.useState(),{sdk:a}=an();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(Gs,{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(ia,{className:"w-full h-fit",onChange:r}),f.jsx(kt,{className:"my-5"}),f.jsxs("div",{className:"flex flex-row justify-between w-full --mt-5",children:[f.jsx(Jr,{text:"Add Tags",keep_text_on_load:!0,className:"w-fit",onClick:l=>o(!0)}),f.jsx(Jr,{text:"Remove Tags",keep_text_on_load:!0,className:"w-fit",onClick:l=>o(!1)})]})]}):null},Ole={name:"Root",comp:Be,comp_params:{className:"w-full flex flex-col gap-5 max-w- lg:w-[35rem]"},fields:[{comp:Ale,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(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.
663
+ you will be able to add products here`,className:"text-2xl font-semibold text-gray-400"})})]})},Dle=({collectionId:t,value:e})=>{const[n,r]=_.useState([]),[i,s]=_.useState(),{sdk:a}=an();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(Gs,{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(ia,{className:"w-full h-fit",onChange:r}),f.jsx(kt,{className:"my-5"}),f.jsxs("div",{className:"flex flex-row justify-between w-full --mt-5",children:[f.jsx(Jr,{text:"Add Tags",keep_text_on_load:!0,className:"w-fit",onClick:l=>o(!0)}),f.jsx(Jr,{text:"Remove Tags",keep_text_on_load:!0,className:"w-fit",onClick:l=>o(!1)})]})]}):null},Ole={name:"Root",comp:Be,comp_params:{className:"w-full flex flex-col gap-5 max-w- lg:w-[35rem]"},fields:[{comp:Ale,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(Ie),{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.
664
664
  Will be computed automatically if not filled by the product title`,comp:Q(mm,{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(pa),comp_params:{className:"w-full"}},{key:"media",name:"🎥 Media",validate:!1,editable:!0,desc:"Manage and edit your media files",comp:Q(mu),comp_params:{className:"w-full"}},{key:"attributes",name:"Attributes",validate:!1,editable:!0,desc:"Attributes can contain richer text values than tags",comp:Q(co),comp_params:{className:"w-full"}},{name:"JSON",type:"compund",validate:!1,editable:!1,desc:"Observe the RAW data",comp:xs,comp_params:{className:"w-full"}}]},Mle={name:"Main",comp:Be,comp_params:{className:`w-full items-center lg:items-start lg:w-[18rem]
665
665
  flex flex-col gap-5`},fields:[{key:"active",name:"Active",validate:!0,desc:"activate or deactivate the collection",editable:!0,defaultValue:!0,comp:Q(bd,{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(ia),comp_params:{className:"w-full "}},{comp:Dle,comp_params:{className:"w-full"}}]},Ile={name:"Root",comp:Be,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:[Ole,Mle]},Lle=({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(ys,{id:a,className:o,onClickCreate:e,onClickDelete:n,onClickDuplicate:i,onClickReload:s,onClickSave:t,children:f.jsx(Jr,{Icon:f.jsx(G5,{}),text:"publish",keep_text_on_load:!0,show:!!r,onClick:r,className:""})}),Kv=({mode:t,...e})=>{const{id:n,base:r}=or(),{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}=di("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(ji,{major:["collections",n??"create"],className:""}),f.jsx(vs,{doc:p,className:"mt-5",collectionId:"collections"}),f.jsx(Lle,{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(ss,{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(jr,{error:w,className:"w-full"}),f.jsx(Xr,{ref:S,field:Ile,context:u,value:p??{},isViewMode:y,className:"mt-8"},d)]})})]})},U0=t=>{switch(t){case Ar.regular.type:return"bg-teal-600 dark:bg-teal-600/40";case Ar.bulk.type:return"bg-red-400 dark:bg-red-400/40";case Ar.buy_x_get_y.type:return"bg-cyan-500 dark:bg-cyan-500/40";case Ar.order.type:return"bg-kf-400 dark:bg-kf-400/40";case Ar.bundle.type:return"bg-sky-500 dark:bg-sky-400/40";default:return"bg-slate-400 dark:bg-slate-400/20"}},Ple=({value:t,...e})=>{const n=_.useMemo(()=>{var i;return(i=Object.values(Ar).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 "+U0(t==null?void 0:t.type);return f.jsx("span",{className:r+" bg-",children:n})},Rle=({...t})=>f.jsxs("div",{...t,children:[f.jsxs("div",{className:"flex flex-row gap-2 flex-wrap",children:[f.jsx(un,{to:"/pages/discounts",draggable:"false",children:f.jsx(lo,{value:"all",bgColor:"bg-pink-400 dark:bg-pink-400/60"})}),Object.values(Ar).filter(e=>!!e.type).map(e=>f.jsx(un,{draggable:"false",to:`/pages/discounts/q/vql=type:${e.id}`,children:f.jsx(lo,{value:e.name,bgColor:U0(e.type)})},e.id))]}),f.jsxs("div",{className:"flex flex-row flex-wrap gap-2 mt-1",children:[Object.values(Ic).map(e=>f.jsx(un,{draggable:"false",to:`/pages/discounts/q/vql=app:${e.name.toLowerCase()}`,children:f.jsx(lo,{value:e.name,bgColor:U0("")})},e.id)),[{name:"enabled",v:!0},{name:"disabled",v:!1}].map((e,n)=>f.jsx(un,{draggable:"false",to:`/pages/discounts/q/vql=active:${e.v}`,children:f.jsx(lo,{value:e.name,bgColor:U0(void 0)})},n))]})]}),jle=[{key:"handle",name:"Code",comp:({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===Ic.Manual.id;return f.jsxs("div",{className:i,children:[f.jsx("span",{children:t}),s&&f.jsx(jR,{className:`block --text-xl text-white --p-0.5
666
666
  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
@@ -695,7 +695,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
695
695
  `,c+=`> Also, This \`discount\` was applied in **${a.affected_orders_count}** \`orders\`
696
696
 
697
697
  `),f.jsx("div",{...i,children:f.jsx(de,{show:a.loaded,children:f.jsx(Xt,{value:c})})})},Kfe=t=>t===void 0?[!1,"Empty Code"]:/\s/g.test(t)?[!1,"Code cannot contain whitespace/s"]:[!0,void 0],qfe={key:"info",name:"Info",comp:Be,comp_params:{className:"w-full flex flex-col gap-5"},validate:!1,fields:[{key:"filters",name:"🔎 Filters",validate:!0,validator:wfe,desc:"Define which products or orders (by date, amount or customers) are eligible for discount",comp:Q(OO,{className:"w-full h-9"},!0),comp_params:{className:"w-full"}},{key:"details",name:"⚙️ Discount Details",validate:!0,validator:Pfe,desc:"Choose the type of discount and its behaviour",comp:Q(Wfe,{className:"w-full h-9"},!0),comp_params:{className:"w-full"}}]},Qfe={name:"Main",comp:Be,comp_params:{className:`w-full --max-w-[35rem] gap-5 items-center
698
- 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(Pe),{className:"w-full h-10"},!0),comp_params:{className:"w-full"}},{key:"handle",name:"🎟️ Discount Code",type:"text",validate:!0,validator:Kfe,editable:!0,desc:"A short word identifier for the discount",comp:Q(mm,{className:"w-full h-fit",type:"text",placeholder:"code ..."}),comp_params:{className:"w-full text-xs py-auto --font-semibold"}},qfe,{key:"media",name:"🎥 Media",type:"text",desc:"Manage and edit your media files",validate:!1,editable:!0,comp:Q(mu),comp_params:{className:"w-full"}},{key:"description",name:"📝 Description",type:"text",validate:!1,desc:"Optional description",comp:Q(pa),comp_params:{className:"w-full"}},{name:"JSON",type:"compund",validate:!1,editable:!1,desc:"Observe the RAW data",comp:xs,comp_params:{className:"w-full"}}]},Zfe={name:"Main",comp:Be,comp_params:{className:`w-full items-center lg:items-start lg:w-[18rem]
698
+ 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(Ie),{className:"w-full h-10"},!0),comp_params:{className:"w-full"}},{key:"handle",name:"🎟️ Discount Code",type:"text",validate:!0,validator:Kfe,editable:!0,desc:"A short word identifier for the discount",comp:Q(mm,{className:"w-full h-fit",type:"text",placeholder:"code ..."}),comp_params:{className:"w-full text-xs py-auto --font-semibold"}},qfe,{key:"media",name:"🎥 Media",type:"text",desc:"Manage and edit your media files",validate:!1,editable:!0,comp:Q(mu),comp_params:{className:"w-full"}},{key:"description",name:"📝 Description",type:"text",validate:!1,desc:"Optional description",comp:Q(pa),comp_params:{className:"w-full"}},{name:"JSON",type:"compund",validate:!1,editable:!1,desc:"Observe the RAW data",comp:xs,comp_params:{className:"w-full"}}]},Zfe={name:"Main",comp:Be,comp_params:{className:`w-full items-center lg:items-start lg:w-[18rem]
699
699
  flex flex-col gap-5`},fields:[{key:"active",name:"Enable",validate:!0,desc:"Enable or disable the discount",editable:!0,defaultValue:!0,comp:Q(bd,{className:"text-gray-600"},!0),comp_params:{className:"w-full"}},{key:void 0,name:"🚀 Performance",desc:"This is how this discount performs",comp:Q(Gfe,{className:""},!0),comp_params:{className:"w-full"}},{key:"application",name:"Automatic or Coupon",validate:!0,desc:`
700
700
  Decide whether the discount is:
701
701
  - **Automatically** applied, or
@@ -708,17 +708,17 @@ Discounts are arranged as a stack and the order of application is important.
708
708
  For Example, A discount with a \`0\` order will be applied before a discount with order 10.
709
709
  <br/><br/>
710
710
  Free Shipping for orders above say 100$ should be applied last and therefore should
711
- have a high order number`,editable:!0,comp:Q(Me(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(ia),comp_params:{className:"w-full "}},{key:"attributes",name:"Attributes",validate:!1,editable:!0,desc:"Attributes can contain richer text values than tags",comp:Q(co),comp_params:{className:"w-full"}}]},Xfe={name:"Root",comp:Be,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:[Qfe,Zfe]},Jfe=({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(ys,{id:a,className:o,onClickCreate:e,onClickDelete:n,onClickDuplicate:i,onClickReload:s,onClickSave:t,children:f.jsx(Jr,{Icon:f.jsx(j_,{}),text:`${l?"update":"create"} collection`,show:!!r,onClick:r,className:""})}),Lx=({mode:t,...e})=>{const{id:n,base:r}=or(),{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}=di("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(ji,{major:["discounts",n??"create"],className:""}),f.jsx(vs,{doc:h,className:"mt-5",collectionId:"discounts"}),f.jsx(Jfe,{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(ss,{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(jr,{error:b,className:"w-full"}),f.jsx(Xr,{ref:C,field:Xfe,value:h??{},context:c,isViewMode:g,className:"mt-8 mx-auto"},u)]})})]})},ehe=[{key:"title",name:"Title",comp:Ut,comp_params:{className:"font-semibold",extra:"max-w-[10rem] md:max-w-[18rem]"}},{key:"price",name:"Price",comp:Ut,comp_params:{className:"font-semibold",extra:"max-w-[10rem] md:max-w-[18rem]"}},{key:"updated_at",name:"Last Updated",comp:gs},{key:void 0,name:"Actions",comp:Pr,comp_params:{className:""}}],LO=({})=>{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}}=Rr("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(dr,{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
+ have a high order number`,editable:!0,comp:Q(Me(Ie),{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(ia),comp_params:{className:"w-full "}},{key:"attributes",name:"Attributes",validate:!1,editable:!0,desc:"Attributes can contain richer text values than tags",comp:Q(co),comp_params:{className:"w-full"}}]},Xfe={name:"Root",comp:Be,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:[Qfe,Zfe]},Jfe=({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(ys,{id:a,className:o,onClickCreate:e,onClickDelete:n,onClickDuplicate:i,onClickReload:s,onClickSave:t,children:f.jsx(Jr,{Icon:f.jsx(j_,{}),text:`${l?"update":"create"} collection`,show:!!r,onClick:r,className:""})}),Lx=({mode:t,...e})=>{const{id:n,base:r}=or(),{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}=di("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(ji,{major:["discounts",n??"create"],className:""}),f.jsx(vs,{doc:h,className:"mt-5",collectionId:"discounts"}),f.jsx(Jfe,{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(ss,{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(jr,{error:b,className:"w-full"}),f.jsx(Xr,{ref:C,field:Xfe,value:h??{},context:c,isViewMode:g,className:"mt-8 mx-auto"},u)]})})]})},ehe=[{key:"title",name:"Title",comp:Ut,comp_params:{className:"font-semibold",extra:"max-w-[10rem] md:max-w-[18rem]"}},{key:"price",name:"Price",comp:Ut,comp_params:{className:"font-semibold",extra:"max-w-[10rem] md:max-w-[18rem]"}},{key:"updated_at",name:"Last Updated",comp:gs},{key:void 0,name:"Actions",comp:Pr,comp_params:{className:""}}],LO=({})=>{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}}=Rr("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(dr,{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
712
712
  shelf-border-color shadow-md mt-5
713
- dark:shadow-slate-900`,children:[f.jsx(ms,{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(ur,{context:e,data:r,fields:ehe}),f.jsx(Lr,{prev:h,next:p,limit:t.limit,onLimitChange:u})]})]})]})})},the={name:"Root",comp:Be,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(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(pa),comp_params:{className:"w-full"}},{key:"media",name:"🎬 Media",type:"text",validate:!1,editable:!0,desc:"Manage and edit your media files",comp:Q(mu),comp_params:{className:"w-full"}},{key:"attributes",name:"Attributes",validate:!1,editable:!0,desc:"Attributes can contain richer text values than tags",comp:Q(co),comp_params:{className:"w-full"}},{name:"JSON",type:"compund",validate:!1,editable:!1,desc:"Observe the RAW data",comp:xs,comp_params:{className:"w-full"}}]},nhe={name:"Root2",comp:Be,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(bd,{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(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(ia)}]},rhe={name:"Root",comp:Be,comp_params:{className:`w-full --max-w-[35rem] --bg-red-100 items-center
713
+ dark:shadow-slate-900`,children:[f.jsx(ms,{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(ur,{context:e,data:r,fields:ehe}),f.jsx(Lr,{prev:h,next:p,limit:t.limit,onLimitChange:u})]})]})]})})},the={name:"Root",comp:Be,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(Ie),{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(pa),comp_params:{className:"w-full"}},{key:"media",name:"🎬 Media",type:"text",validate:!1,editable:!0,desc:"Manage and edit your media files",comp:Q(mu),comp_params:{className:"w-full"}},{key:"attributes",name:"Attributes",validate:!1,editable:!0,desc:"Attributes can contain richer text values than tags",comp:Q(co),comp_params:{className:"w-full"}},{name:"JSON",type:"compund",validate:!1,editable:!1,desc:"Observe the RAW data",comp:xs,comp_params:{className:"w-full"}}]},nhe={name:"Root2",comp:Be,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(bd,{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(Ie),{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(ia)}]},rhe={name:"Root",comp:Be,comp_params:{className:`w-full --max-w-[35rem] --bg-red-100 items-center
714
714
  lg:max-w-max lg:items-start lg:w-fit flex flex-col
715
715
  lg:flex-row gap-5 mx-auto`},fields:[the,nhe]},ihe=({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(ys,{id:a,className:o,onClickCreate:e,onClickDelete:n,onClickDuplicate:i,onClickReload:s,onClickSave:t,children:f.jsx(Jr,{Icon:G5,text:"publish",show:!!r,onClick:r,className:""})}),Px=({mode:t,...e})=>{const{id:n,base:r}=or(),{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}=di("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(ji,{major:["shipping",n??"create"],className:""}),f.jsx(vs,{doc:u,className:"mt-5",collectionId:"shipping"}),f.jsx(ihe,{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(ss,{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(jr,{error:v,className:"w-full"}),f.jsx(Xr,{ref:b,field:rhe,value:u??{},isViewMode:p,context:l,className:"mt-8"},c)]})})]})},she=[{key:"title",name:"Title",comp:Ut,comp_params:{className:"font-semibold "}},{key:"handle",name:"Handle",comp:Ut},{key:"updated_at",name:"Last Updated",comp:gs},{key:void 0,name:"Actions",comp:Pr,comp_params:{className:""}}],PO=({})=>{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}}=Rr("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(dr,{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
716
716
  shelf-border-color shadow-md mt-5
717
- dark:shadow-slate-900`,children:[f.jsx(ms,{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(ur,{context:e,data:r,fields:she}),f.jsx(Lr,{prev:h,next:p,limit:t.limit,onLimitChange:u})]})]})]})})},ahe=({field:t,context:e,value:n=[],onChange:r})=>{const i=_.useRef(),{navWithState:s}=Pi(),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(Gn,{children:"Browse products",className:"--w-fit h-10 w-40 mx-auto",onClick:()=>i.current.show()}),f.jsx(Xs,{ref:i,children:f.jsx(kd,{onSave:l,onCancel:()=>i.current.hide()})}),(n==null?void 0:n.length)>0&&f.jsx(kt,{className:"my-5"}),f.jsx(Ri,{onClick:o,onRemove:a,name_fn:c=>c.title,tags:n,className:"mt-5"})]})},ohe={name:"Root",comp:Be,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(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(mm,{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(ahe,{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(Ed,{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(Ed,{className:"w-full",add_all:!0,resource:"discounts",transform_fn:t=>t.filter(e=>e.application.id===Ic.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(Ed,{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(Ed,{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(pa),comp_params:{className:"w-full"}},{key:"media",name:"🖼️ Media",type:"text",validate:!1,editable:!0,desc:"Manage and edit your media files",comp:Q(mu),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(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:xs,comp_params:{className:"w-full"}}]},lhe={name:"Root2",comp:Be,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(bd,{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(ia)},{key:"attributes",name:"Attributes",validate:!1,editable:!0,desc:"Attributes can contain richer text values than tags",comp:Q(co),comp_params:{className:"w-full"}}]},che={name:"Root",comp:Be,comp_params:{className:`w-full --max-w-[35rem] --bg-red-100 items-center
717
+ dark:shadow-slate-900`,children:[f.jsx(ms,{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(ur,{context:e,data:r,fields:she}),f.jsx(Lr,{prev:h,next:p,limit:t.limit,onLimitChange:u})]})]})]})})},ahe=({field:t,context:e,value:n=[],onChange:r})=>{const i=_.useRef(),{navWithState:s}=Pi(),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(Gn,{children:"Browse products",className:"--w-fit h-10 w-40 mx-auto",onClick:()=>i.current.show()}),f.jsx(Xs,{ref:i,children:f.jsx(kd,{onSave:l,onCancel:()=>i.current.hide()})}),(n==null?void 0:n.length)>0&&f.jsx(kt,{className:"my-5"}),f.jsx(Ri,{onClick:o,onRemove:a,name_fn:c=>c.title,tags:n,className:"mt-5"})]})},ohe={name:"Root",comp:Be,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(Ie),{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(mm,{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(ahe,{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(Ed,{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(Ed,{className:"w-full",add_all:!0,resource:"discounts",transform_fn:t=>t.filter(e=>e.application.id===Ic.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(Ed,{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(Ed,{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(pa),comp_params:{className:"w-full"}},{key:"media",name:"🖼️ Media",type:"text",validate:!1,editable:!0,desc:"Manage and edit your media files",comp:Q(mu),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(Ie),{className:"h-10"}),comp_params:{className:"w-full h-fit"}},{name:"JSON",type:"compund",validate:!1,editable:!1,desc:"Observe the RAW data",comp:xs,comp_params:{className:"w-full"}}]},lhe={name:"Root2",comp:Be,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(bd,{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(ia)},{key:"attributes",name:"Attributes",validate:!1,editable:!0,desc:"Attributes can contain richer text values than tags",comp:Q(co),comp_params:{className:"w-full"}}]},che={name:"Root",comp:Be,comp_params:{className:`w-full --max-w-[35rem] --bg-red-100 items-center
718
718
  lg:max-w-max lg:items-start lg:w-fit flex flex-col
719
719
  lg:flex-row gap-5 mx-auto`},fields:[ohe,lhe]},uhe=({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(ys,{id:a,className:o,onClickCreate:e,onClickDelete:n,onClickDuplicate:i,onClickReload:s,onClickSave:t,children:f.jsx(Jr,{Icon:f.jsx(G5,{}),text:"publish",keep_text_on_load:!0,show:!!r,onClick:r,className:""})}),Rx=({mode:t,...e})=>{const{id:n,base:r}=or(),{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}=di("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(ji,{major:["storefronts",n??"create"],className:""}),f.jsx(vs,{doc:p,className:"mt-5",collectionId:"storefronts"}),f.jsx(uhe,{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(ss,{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(jr,{error:w,className:"w-full"}),f.jsx(Xr,{ref:S,field:che,value:p??{},isViewMode:y,context:u,className:"mt-8"},d)]})})]})},dhe=[{key:"title",name:"Title",comp:Ut,comp_params:{className:"font-semibold"}},{key:"updated_at",name:"Last Updated ",comp:gs,comp_params:{className:"font-semibold"}},{key:void 0,name:"Actions",comp:Pr,comp_params:{className:""}}],RO=({})=>{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}}=Rr("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(dr,{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
720
720
  dark:shadow-slate-900 border mt-5
721
- shelf-border-color`,children:[f.jsx(ms,{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(ur,{context:e,data:r,fields:dhe}),f.jsx(Lr,{prev:h,next:p,limit:t.limit,onLimitChange:u})]})]})]})})},fhe={name:"Root",comp:Be,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(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(pa),comp_params:{className:"w-full"}},{key:"media",name:"🎬 Media",validate:!1,editable:!0,desc:"Manage and edit your media files",comp:Q(mu),comp_params:{className:"w-full"}},{key:"attributes",name:"Attributes",validate:!1,editable:!0,desc:"Attributes can contain richer text values than tags",comp:Q(co),comp_params:{className:"w-full"}}]},hhe={name:"Root2",comp:Be,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(ia)}]},phe={name:"Root",comp:Be,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:[fhe,hhe]},jx=({mode:t,...e})=>{const{id:n,base:r}=or(),{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}=di("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(ji,{major:["posts",n??"create"],className:""}),f.jsx(vs,{doc:u,className:"mt-5",collectionId:"posts"}),f.jsx(ys,{onClickSave:h?i:void 0,onClickCreate:d?i:void 0,onClickDelete:d?void 0:s,className:"mt-5"}),f.jsx(ss,{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(jr,{error:v,className:"w-full max-w-[55rem] mx-auto"}),f.jsx(Xr,{ref:b,field:phe,value:u??{},context:l,isViewMode:p,className:"mx-auto"},u==null?void 0:u.updated_at)]})]})},gg="data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4KPHN2ZyB2aWV3Qm94PSIwIDAgMjU2IDI1NiIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgeG1sbnM6Yng9Imh0dHBzOi8vYm94eS1zdmcuY29tIj4KICA8ZGVmcz4KICAgIDxsaW5lYXJHcmFkaWVudCBpZD0iZ3JhZGllbnQtMC0wIiBncmFkaWVudFVuaXRzPSJ1c2VyU3BhY2VPblVzZSIgeDE9IjEyOCIgeTE9IjAiIHgyPSIxMjgiIHkyPSIyNTYiIHhsaW5rOmhyZWY9IiN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MDguODgxIDEzOS42MzggQyA5NC42IDEzNi4xNjMgODQuMDcyIDEzMC41NDEgNzcuMjk3IDEyMi43NjcgQyA3MC41MjMgMTE0Ljk5NSA2OC44MTggMTA0LjQ3NSA3Mi4xODMgOTEuMjA3IEMgNzQuODIzIDgwLjM4NyA4MC4wOTIgNzAuOTA1IDg3Ljk4NyA2Mi43NjIgQyA5NS44ODMgNTQuNjIgMTA1LjU4MSA0OC4yNyAxMTcuMDgxIDQzLjcxNSBDIDEyOC41ODEgMzkuMTU4IDE0MC45NjQgMzYuODgxIDE1NC4yMzIgMzYuODgxIEMgMTY3Ljc4NCAzNi44ODEgMTc4Ljk4NyAzOS4xNzIgMTg3LjgzNyA0My43NTcgQyAxOTYuNjg5IDQ4LjM0MSAyMDIuODQ3IDU0Ljc2MiAyMDYuMzEyIDYzLjAyIEMgMjA5Ljc3NyA3MS4yNzYgMjEwLjIwOSA4MC44NDIgMjA3LjYxMiA5MS43MiBMIDE2Ny4xMjQgOTEuNzIgWiIgc3R5bGU9ImZpbGw6IHJnYigyNTUsIDI1NSwgMjU1KTsiLz4KPC9zdmc+",mhe=[{key:"info.name",name:"Name",comp:({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)??gg,className:"rounded-md w-6 h-6 object-cover border dark:opacity-80"}),f.jsx("div",{children:t??e})]})},comp_params:{className:"font-semibold",extra:"max-w-[10rem] md:max-w-[18rem]"}},{key:"handle",name:"Handle",comp:Ut,comp_params:{className:"font-semibold",extra:"max-w-[10rem] md:max-w-[18rem]"}},{key:void 0,name:"Actions",comp:Pr,comp_params:{className:""}}],ghe=({})=>{const{context:t,page:e,loading:n,error:r,queryCount:i,hasLoaded:s,resource:a,resource_is_probably_empty:o}=Rr("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(dr,{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
+ shelf-border-color`,children:[f.jsx(ms,{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(ur,{context:e,data:r,fields:dhe}),f.jsx(Lr,{prev:h,next:p,limit:t.limit,onLimitChange:u})]})]})]})})},fhe={name:"Root",comp:Be,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(Ie),{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(pa),comp_params:{className:"w-full"}},{key:"media",name:"🎬 Media",validate:!1,editable:!0,desc:"Manage and edit your media files",comp:Q(mu),comp_params:{className:"w-full"}},{key:"attributes",name:"Attributes",validate:!1,editable:!0,desc:"Attributes can contain richer text values than tags",comp:Q(co),comp_params:{className:"w-full"}}]},hhe={name:"Root2",comp:Be,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(ia)}]},phe={name:"Root",comp:Be,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:[fhe,hhe]},jx=({mode:t,...e})=>{const{id:n,base:r}=or(),{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}=di("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(ji,{major:["posts",n??"create"],className:""}),f.jsx(vs,{doc:u,className:"mt-5",collectionId:"posts"}),f.jsx(ys,{onClickSave:h?i:void 0,onClickCreate:d?i:void 0,onClickDelete:d?void 0:s,className:"mt-5"}),f.jsx(ss,{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(jr,{error:v,className:"w-full max-w-[55rem] mx-auto"}),f.jsx(Xr,{ref:b,field:phe,value:u??{},context:l,isViewMode:p,className:"mx-auto"},u==null?void 0:u.updated_at)]})]})},gg="data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4KPHN2ZyB2aWV3Qm94PSIwIDAgMjU2IDI1NiIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgeG1sbnM6Yng9Imh0dHBzOi8vYm94eS1zdmcuY29tIj4KICA8ZGVmcz4KICAgIDxsaW5lYXJHcmFkaWVudCBpZD0iZ3JhZGllbnQtMC0wIiBncmFkaWVudFVuaXRzPSJ1c2VyU3BhY2VPblVzZSIgeDE9IjEyOCIgeTE9IjAiIHgyPSIxMjgiIHkyPSIyNTYiIHhsaW5rOmhyZWY9IiNncmFkaWVudC0wIi8+CiAgICA8bGluZWFyR3JhZGllbnQgaWQ9ImdyYWRpZW50LTAiIGJ4OnBpbm5lZD0idHJ1ZSI+CiAg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k5NSA2OC44MTggMTA0LjQ3NSA3Mi4xODMgOTEuMjA3IEMgNzQuODIzIDgwLjM4NyA4MC4wOTIgNzAuOTA1IDg3Ljk4NyA2Mi43NjIgQyA5NS44ODMgNTQuNjIgMTA1LjU4MSA0OC4yNyAxMTcuMDgxIDQzLjcxNSBDIDEyOC41ODEgMzkuMTU4IDE0MC45NjQgMzYuODgxIDE1NC4yMzIgMzYuODgxIEMgMTY3Ljc4NCAzNi44ODEgMTc4Ljk4NyAzOS4xNzIgMTg3LjgzNyA0My43NTcgQyAxOTYuNjg5IDQ4LjM0MSAyMDIuODQ3IDU0Ljc2MiAyMDYuMzEyIDYzLjAyIEMgMjA5Ljc3NyA3MS4yNzYgMjEwLjIwOSA4MC44NDIgMjA3LjYxMiA5MS43MiBMIDE2Ny4xMjQgOTEuNzIgWiIgc3R5bGU9ImZpbGw6IHJnYigyNTUsIDI1NSwgMjU1KTsiLz4KPC9zdmc+",mhe=[{key:"info.name",name:"Name",comp:({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)??gg,className:"rounded-md w-6 h-6 object-cover border dark:opacity-80"}),f.jsx("div",{children:t??e})]})},comp_params:{className:"font-semibold",extra:"max-w-[10rem] md:max-w-[18rem]"}},{key:"handle",name:"Handle",comp:Ut,comp_params:{className:"font-semibold",extra:"max-w-[10rem] md:max-w-[18rem]"}},{key:void 0,name:"Actions",comp:Pr,comp_params:{className:""}}],ghe=({})=>{const{context:t,page:e,loading:n,error:r,queryCount:i,hasLoaded:s,resource:a,resource_is_probably_empty:o}=Rr("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(dr,{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
722
722
  shelf-border-color shadow-md mt-5
723
723
  dark:shadow-slate-900`,children:f.jsx(de,{show:!r&&(e==null?void 0:e.length),children:f.jsx(ur,{context:l,data:e,fields:mhe})})})]})})},yhe={name:"Root",comp:Be,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:Be,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"}}]}]},vhe={name:"Root2",comp:Be,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(k9,{name:"tomer"},!0,!0),comp_params:{className:"w-full"}}]},xhe={name:"Root",comp:Be,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:[yhe,vhe]},_he=({className:t,...e})=>f.jsx("img",{className:"rounded-md object-cover border dark:opacity-80 "+t,...e}),bhe=({})=>{var c,u;const{id:t}=or(),{context:e,key:n,doc:r,loading:i,hasLoaded:s,error:a,ref_root:o}=di("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(_he,{src:l??gg,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(kt,{className:"mt-5"}),f.jsxs(de,{show:s,children:[f.jsx(jr,{error:a,className:"w-full max-w-[35rem] mx-auto"}),f.jsx(Xr,{ref:o,field:xhe,value:r??{},context:e,isViewMode:!1,className:"mx-auto"},n)]})]})},whe=[{key:"info.name",name:"Name",comp:({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)??gg,className:"rounded-md w-6 h-6 object-cover border dark:opacity-80"}),f.jsx("div",{children:t??e})]})},comp_params:{className:"font-semibold",extra:"max-w-[10rem] md:max-w-[18rem]"}},{key:"handle",name:"Handle",comp:Ut,comp_params:{className:"font-semibold",extra:"max-w-[10rem] md:max-w-[18rem]"}},{key:void 0,name:"Actions",comp:Pr,comp_params:{className:""}}],Ehe=({})=>{const{context:t,page:e,loading:n,error:r,queryCount:i,hasLoaded:s,resource:a,resource_is_probably_empty:o}=Rr("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(dr,{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
724
724
  shelf-border-color shadow-md mt-5